From 3f4b9b53a007fa2bfd8e9164c49da524c69be9d7 Mon Sep 17 00:00:00 2001 From: Andrea Amorese Date: Tue, 10 Aug 2021 14:14:22 +0200 Subject: [PATCH] Built motion from commit 692e355e.|2.5.32 --- apidoc/api_project.js | 2 +- apidoc/api_project.json | 2 +- public/app/main/apps/staff/i18n/cs.json | 2 +- public/app/main/apps/staff/i18n/en.json | 2 +- public/app/main/apps/staff/i18n/et.json | 2 +- public/app/main/apps/staff/i18n/id.json | 2 +- public/app/main/apps/staff/i18n/it.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 +- 1153 files changed, 1152 insertions(+), 1152 deletions(-) create mode 100644 public/styles/app.287b5956.css delete mode 100644 public/styles/app.ea7a1be4.css diff --git a/apidoc/api_project.js b/apidoc/api_project.js index 4f9675c..8441f74 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-10T10:26:04.798Z", + "time": "2021-08-10T12:03:56.836Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/apidoc/api_project.json b/apidoc/api_project.json index 928d7d4..5cedd87 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-10T10:26:04.798Z", + "time": "2021-08-10T12:03:56.836Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/public/app/main/apps/staff/i18n/cs.json b/public/app/main/apps/staff/i18n/cs.json index 6254c0c..a276dc9 100644 --- a/public/app/main/apps/staff/i18n/cs.json +++ b/public/app/main/apps/staff/i18n/cs.json @@ -109,7 +109,7 @@ "TRANSPORT": "Set the default transports in order of preference", "HOST": "How to find the client - IP or host name. If you want the phone to register itself, use the keyword dynamic instead of Host IP", "NAT": "Changes the behaviour of Asterisk for clients behind a firewall. If any of the comma-separated options is 'no', Asterisk will ignore other settings and set nat=no", - "SIPEXPIRES": "Default: 160", + "SIPEXPIRES": "Default: 120", "SIPPORT": "Default: 5060", "TYPE": "Determines the SIP role within asterisk. User: used to authenticate incoming - Peer: for outgoing calls - Friend: covers both characteristics of the above", "CHATCAPACITY": "Maximum number of concurrent channel interactions per agent (0=unlimited)", diff --git a/public/app/main/apps/staff/i18n/en.json b/public/app/main/apps/staff/i18n/en.json index a3335ad..556f7a7 100644 --- a/public/app/main/apps/staff/i18n/en.json +++ b/public/app/main/apps/staff/i18n/en.json @@ -123,7 +123,7 @@ "TRANSPORT": "Set the default transports in order of preference", "HOST": "How to find the client - IP or host name. If you want the phone to register itself, use the keyword dynamic instead of Host IP", "NAT": "Changes the behaviour of Asterisk for clients behind a firewall. If any of the comma-separated options is 'no', Asterisk will ignore other settings and set nat=no", - "SIPEXPIRES": "Default: 160", + "SIPEXPIRES": "Default: 120", "SIPPORT": "Default: 5160", "TYPE": "Determines the SIP role within asterisk. User: used to authenticate incoming - Peer: for outgoing calls - Friend: covers both characteristics of the above", "CHATCAPACITY": "Maximum number of concurrent channel interactions per agent (0=unlimited)", diff --git a/public/app/main/apps/staff/i18n/et.json b/public/app/main/apps/staff/i18n/et.json index cf46397..0c1d40c 100644 --- a/public/app/main/apps/staff/i18n/et.json +++ b/public/app/main/apps/staff/i18n/et.json @@ -109,7 +109,7 @@ "TRANSPORT": "Set the default transports in order of preference", "HOST": "How to find the client - IP or host name. If you want the phone to register itself, use the keyword dynamic instead of Host IP", "NAT": "Changes the behaviour of Asterisk for clients behind a firewall. If any of the comma-separated options is 'no', Asterisk will ignore other settings and set nat=no", - "SIPEXPIRES": "Default: 160", + "SIPEXPIRES": "Default: 120", "SIPPORT": "Default: 5060", "TYPE": "Determines the SIP role within asterisk. User: used to authenticate incoming - Peer: for outgoing calls - Friend: covers both characteristics of the above", "CHATCAPACITY": "Maximum number of concurrent channel interactions per agent (0=unlimited)", diff --git a/public/app/main/apps/staff/i18n/id.json b/public/app/main/apps/staff/i18n/id.json index 5a06270..5efd94d 100644 --- a/public/app/main/apps/staff/i18n/id.json +++ b/public/app/main/apps/staff/i18n/id.json @@ -54,7 +54,7 @@ "NAT": "Mengubah perilaku Asterisk untuk klien di belakang firewall. Jika salah satu opsi yang dipisahkan koma adalah 'tidak', Asterisk akan mengabaikan pengaturan lain dan mengatur nat = no", "OPENCHANNELCAPACITY": "Jumlah maksimum interaksi saluran bersamaan per agen (0 = tidak terbatas)", "PICKUPGROUP": "Grup tempat agen dapat menjawab panggilan", - "SIPEXPIRES": "Default: 160", + "SIPEXPIRES": "Default: 120", "SIPPORT": "Default: 5160", "SMSCAPACITY": "Jumlah maksimum interaksi saluran bersamaan per agen (0 = tidak terbatas)", "TRANSPORT": "Setel transport default sesuai urutan preferensi", diff --git a/public/app/main/apps/staff/i18n/it.json b/public/app/main/apps/staff/i18n/it.json index db88c9f..111b886 100644 --- a/public/app/main/apps/staff/i18n/it.json +++ b/public/app/main/apps/staff/i18n/it.json @@ -111,7 +111,7 @@ "TRANSPORT": "Imposta i protocolli di default (saranno gestiti nell'ordine)", "HOST": "Come trovare il client - IP o nome host. Se si vuole che il telefono si registri autonomamente, usare la stringa 'dynamic' invece dell' IP dell'Host", "NAT": "Cambia il comportamento di asterisk per i client dietro un firewall. Se almeno una delle opzioni separate da virgola è 'no', Asterisk ignorerà tutte le altre e imposterà nat=no", - "SIPEXPIRES": "Default: 160", + "SIPEXPIRES": "Default: 120", "SIPPORT": "Default: 5160", "TYPE": "Determina il ruolo del SIP all'interno di asterisk. User: usato per identificare le chiamate in arrivo - Peer: per le chiamate in uscita - Friend: copre entrambe le caratteristiche di User e Peer", "CHATCAPACITY": "Inserire il numero massimo di interazioni concorrenti per il canale (0=illimitato)", diff --git a/public/index.html b/public/index.html index 84da41a..c96e76b 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 new file mode 100644 index 0000000..66d9e12 --- /dev/null +++ b/public/styles/app.287b5956.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: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 deleted file mode 100644 index e747992..0000000 --- a/public/styles/app.ea7a1be4.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: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 0a40fc5..39c89f5 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 _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 +var _0xddca=['script','STRING','TEXT','sequelize','exports','VIRTUAL','getDataValue','action','contactManager','jscripty','urlForward','browser','bot'];(function(_0x53ddab,_0x4ada9d){var _0x5819ac=function(_0x4d5fc8){while(--_0x4d5fc8){_0x53ddab['push'](_0x53ddab['shift']());}};_0x5819ac(++_0x4ada9d);}(_0xddca,0x92));var _0xaddc=function(_0x186376,_0x5d988a){_0x186376=_0x186376-0x0;var _0x2dbdd9=_0xddca[_0x186376];return _0x2dbdd9;};'use strict';var Sequelize=require(_0xaddc('0x0'));module[_0xaddc('0x1')]={'name':{'type':Sequelize[_0xaddc('0x2')],'get':function(_0x1fea7a){return this[_0xaddc('0x3')](_0xaddc('0x4'));}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0xaddc('0x5'),'integration','motionbar',_0xaddc('0x6'),_0xaddc('0x7'),_0xaddc('0x8'),_0xaddc('0x9'),_0xaddc('0xa')]],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize['STRING'](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[_0xaddc('0xb')](0x1000),'comment':'integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20urlForward[URL]'},'data3':{'type':Sequelize[_0xaddc('0xb')](0x1000),'comment':'motionbar[NULL,NULL,WinAppArguments]'},'data4':{'type':Sequelize[_0xaddc('0xb')](0x1000)},'data5':{'type':Sequelize['STRING'](0x1000)},'data6':{'type':Sequelize[_0xaddc('0xb')]},'data7':{'type':Sequelize[_0xaddc('0xc')]}}; \ No newline at end of file diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index 155b01c..41916e4 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 _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 +var _0xc82c=['count','limit','set','apply','save','update','then','destroy','error','stack','name','body','Action','find','params','catch','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','squel','jsforce','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined'];(function(_0x4511f7,_0x43842f){var _0x47ebd9=function(_0x4fbf26){while(--_0x4fbf26){_0x4511f7['push'](_0x4511f7['shift']());}};_0x47ebd9(++_0x43842f);}(_0xc82c,0x112));var _0xcc82=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0xc82c[_0x580576];return _0x3f55a0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcc82('0x0'));var zipdir=require(_0xcc82('0x1'));var jsonpatch=require(_0xcc82('0x2'));var rp=require(_0xcc82('0x3'));var moment=require(_0xcc82('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xcc82('0x5'));var util=require(_0xcc82('0x6'));var path=require(_0xcc82('0x7'));var sox=require(_0xcc82('0x8'));var csv=require(_0xcc82('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xcc82('0xa'));var crypto=require('crypto');var jsforce=require(_0xcc82('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xcc82('0xc'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xcc82('0xd'));var hardwareService=require(_0xcc82('0xe'));var logger=require(_0xcc82('0xf'))(_0xcc82('0x10'));var utils=require(_0xcc82('0x11'));var config=require(_0xcc82('0x12'));var licenseUtil=require(_0xcc82('0x13'));var db=require(_0xcc82('0x14'))['db'];function respondWithStatusCode(_0x4dd9d3,_0x169da8){_0x169da8=_0x169da8||0xcc;return function(_0x3f1f64){if(_0x3f1f64){return _0x4dd9d3[_0xcc82('0x15')](_0x169da8);}return _0x4dd9d3[_0xcc82('0x16')](_0x169da8)[_0xcc82('0x17')]();};}function respondWithResult(_0x2f765e,_0x4b70f4){_0x4b70f4=_0x4b70f4||0xc8;return function(_0x48adb3){if(_0x48adb3){return _0x2f765e[_0xcc82('0x16')](_0x4b70f4)[_0xcc82('0x18')](_0x48adb3);}};}function respondWithFilteredResult(_0x89ce8f,_0x59dc2f){return function(_0x232748){if(_0x232748){var _0x1d5bfe=typeof _0x59dc2f[_0xcc82('0x19')]==='undefined'&&typeof _0x59dc2f['limit']===_0xcc82('0x1a');var _0x4a327a=_0x232748[_0xcc82('0x1b')];var _0x42ed14=_0x1d5bfe?0x0:_0x59dc2f['offset'];var _0x2474b=_0x1d5bfe?_0x232748[_0xcc82('0x1b')]:_0x59dc2f[_0xcc82('0x19')]+_0x59dc2f[_0xcc82('0x1c')];var _0x15ca7d;if(_0x2474b>=_0x4a327a){_0x2474b=_0x4a327a;_0x15ca7d=0xc8;}else{_0x15ca7d=0xce;}_0x89ce8f['status'](_0x15ca7d);return _0x89ce8f[_0xcc82('0x1d')]('Content-Range',_0x42ed14+'-'+_0x2474b+'/'+_0x4a327a)[_0xcc82('0x18')](_0x232748);}return null;};}function patchUpdates(_0x48d615){return function(_0x3644aa){try{jsonpatch[_0xcc82('0x1e')](_0x3644aa,_0x48d615,!![]);}catch(_0x42118a){return BPromise['reject'](_0x42118a);}return _0x3644aa[_0xcc82('0x1f')]();};}function saveUpdates(_0x274116,_0x190300){return function(_0x40153f){if(_0x40153f){return _0x40153f[_0xcc82('0x20')](_0x274116)[_0xcc82('0x21')](function(_0x1f2660){return _0x1f2660;});}return null;};}function removeEntity(_0x489ddd,_0x9e7e89){return function(_0x248682){if(_0x248682){return _0x248682[_0xcc82('0x22')]()[_0xcc82('0x21')](function(){_0x489ddd[_0xcc82('0x16')](0xcc)[_0xcc82('0x17')]();});}};}function handleEntityNotFound(_0x1b2d25,_0x2212cc){return function(_0xda5d95){if(!_0xda5d95){_0x1b2d25[_0xcc82('0x15')](0x194);}return _0xda5d95;};}function handleError(_0x4f20d2,_0x4acbd7){_0x4acbd7=_0x4acbd7||0x1f4;return function(_0x451801){logger[_0xcc82('0x23')](_0x451801[_0xcc82('0x24')]);if(_0x451801[_0xcc82('0x25')]){delete _0x451801['name'];}_0x4f20d2[_0xcc82('0x16')](_0x4acbd7)['send'](_0x451801);};}exports[_0xcc82('0x20')]=function(_0x142016,_0x2559b3){if(_0x142016[_0xcc82('0x26')]['id']){delete _0x142016[_0xcc82('0x26')]['id'];}return db[_0xcc82('0x27')][_0xcc82('0x28')]({'where':{'id':_0x142016[_0xcc82('0x29')]['id']}})[_0xcc82('0x21')](handleEntityNotFound(_0x2559b3,null))[_0xcc82('0x21')](saveUpdates(_0x142016[_0xcc82('0x26')],null))[_0xcc82('0x21')](respondWithResult(_0x2559b3,null))[_0xcc82('0x2a')](handleError(_0x2559b3,null));};exports[_0xcc82('0x22')]=function(_0x1d7c86,_0x2e2e04){return db[_0xcc82('0x27')][_0xcc82('0x28')]({'where':{'id':_0x1d7c86[_0xcc82('0x29')]['id']}})[_0xcc82('0x21')](handleEntityNotFound(_0x2e2e04,null))[_0xcc82('0x21')](removeEntity(_0x2e2e04,null))['catch'](handleError(_0x2e2e04,null));}; \ No newline at end of file diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js index 2e45bb8..8773c4d 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 _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 +var _0x40ac=['api','moment','bluebird','request-promise','path','rimraf','./action.attributes','exports','Action','tools_actions','lodash','../../config/logger'];(function(_0xe9ea5c,_0x145675){var _0x53734e=function(_0x3f99c4){while(--_0x3f99c4){_0xe9ea5c['push'](_0xe9ea5c['shift']());}};_0x53734e(++_0x145675);}(_0x40ac,0x1de));var _0xc40a=function(_0x4f7618,_0x243df2){_0x4f7618=_0x4f7618-0x0;var _0x20ba5f=_0x40ac[_0x4f7618];return _0x20ba5f;};'use strict';var _=require(_0xc40a('0x0'));var util=require('util');var logger=require(_0xc40a('0x1'))(_0xc40a('0x2'));var moment=require(_0xc40a('0x3'));var BPromise=require(_0xc40a('0x4'));var rp=require(_0xc40a('0x5'));var fs=require('fs');var path=require(_0xc40a('0x6'));var rimraf=require(_0xc40a('0x7'));var config=require('../../config/environment');var attributes=require(_0xc40a('0x8'));module[_0xc40a('0x9')]=function(_0xd6d891,_0x5e179f){return _0xd6d891['define'](_0xc40a('0xa'),attributes,{'tableName':_0xc40a('0xb'),'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 f1ec352..b0ace53 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 _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 +var _0x5fc3=['../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','Action,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x4023ba,_0xc7a439){var _0x51ef60=function(_0x41e7d8){while(--_0x41e7d8){_0x4023ba['push'](_0x4023ba['shift']());}};_0x51ef60(++_0xc7a439);}(_0x5fc3,0xa8));var _0x35fc=function(_0x424357,_0x9ebe3e){_0x424357=_0x424357-0x0;var _0x29c68e=_0x5fc3[_0x424357];return _0x29c68e;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('Action,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('Action,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('Action,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});} \ No newline at end of file diff --git a/server/api/action/index.js b/server/api/action/index.js index 2edc85b..3d65819 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 _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 +var _0x9e99=['isAuthenticated','update','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./action.controller','/:id'];(function(_0xe4fefb,_0x57d5d8){var _0x4d17a7=function(_0x28b31e){while(--_0x28b31e){_0xe4fefb['push'](_0xe4fefb['shift']());}};_0x4d17a7(++_0x57d5d8);}(_0x9e99,0x17e));var _0x99e9=function(_0x194cb0,_0x35b219){_0x194cb0=_0x194cb0-0x0;var _0x165d12=_0x9e99[_0x194cb0];return _0x165d12;};'use strict';var multer=require(_0x99e9('0x0'));var util=require('util');var path=require(_0x99e9('0x1'));var timeout=require(_0x99e9('0x2'));var express=require(_0x99e9('0x3'));var router=express[_0x99e9('0x4')]();var fs_extra=require(_0x99e9('0x5'));var auth=require(_0x99e9('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x99e9('0x7'));var controller=require(_0x99e9('0x8'));router['put'](_0x99e9('0x9'),auth[_0x99e9('0xa')](),controller[_0x99e9('0xb')]);router[_0x99e9('0xc')](_0x99e9('0x9'),auth[_0x99e9('0xa')](),controller[_0x99e9('0xd')]);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 283a29f..d7c8612 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 _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 +var _0x1cb9=['TEXT','sequelize','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1cb9,0x14e));var _0x91cb=function(_0x3aa9d4,_0x4c3187){_0x3aa9d4=_0x3aa9d4-0x0;var _0x5e4d88=_0x1cb9[_0x3aa9d4];return _0x5e4d88;};'use strict';var Sequelize=require(_0x91cb('0x0'));module['exports']={'name':{'type':Sequelize[_0x91cb('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x91cb('0x1')]},'parent':{'type':Sequelize[_0x91cb('0x1')]},'table':{'type':Sequelize[_0x91cb('0x1')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize[_0x91cb('0x2')]}}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js index a12cbbd..73218e4 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 _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 +var _0x8bac=['desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','get','UserProfileResource','destroy','error','stack','send','index','map','AnalyticCustomReport','fieldName','key','name','query','keys','intersection','model','attributes','fields','length','nolimit','order','filters','filter','where','merge','type','options','includeAll','include','findAll','rows','catch','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','autoAssociation','CustomReports','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','DATE(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','condition','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','table','MetricId','field','function','format','replace','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignTable','%s.%s\x20=\x20%s.%s','conditions','debug','sequelize','toString','QueryTypes','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','ROUND(%s)','value','getFields','ValidationErrorItem','from','metric','clone','output','fullPath','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','fork','../../files/reports','savename','COUNT(*)','SELECT','run','runReport','foreignKey','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce'];(function(_0x5cf216,_0x9a4b47){var _0x5b4a58=function(_0x2146e7){while(--_0x2146e7){_0x5cf216['push'](_0x5cf216['shift']());}};_0x5b4a58(++_0x9a4b47);}(_0x8bac,0x134));var _0xc8ba=function(_0x3f465d,_0xbd2037){_0x3f465d=_0x3f465d-0x0;var _0x121ad1=_0x8bac[_0x3f465d];return _0x121ad1;};'use strict';var emlformat=require(_0xc8ba('0x0'));var rimraf=require(_0xc8ba('0x1'));var zipdir=require(_0xc8ba('0x2'));var jsonpatch=require(_0xc8ba('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xc8ba('0x4'));var Mustache=require(_0xc8ba('0x5'));var util=require(_0xc8ba('0x6'));var path=require('path');var sox=require(_0xc8ba('0x7'));var csv=require(_0xc8ba('0x8'));var ejs=require(_0xc8ba('0x9'));var fs=require('fs');var fs_extra=require(_0xc8ba('0xa'));var _=require(_0xc8ba('0xb'));var squel=require('squel');var crypto=require(_0xc8ba('0xc'));var jsforce=require(_0xc8ba('0xd'));var deskjs=require(_0xc8ba('0xe'));var toCsv=require(_0xc8ba('0x8'));var querystring=require('querystring');var Papa=require(_0xc8ba('0xf'));var Redis=require(_0xc8ba('0x10'));var authService=require(_0xc8ba('0x11'));var qs=require(_0xc8ba('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc8ba('0x13'));var logger=require(_0xc8ba('0x14'))(_0xc8ba('0x15'));var utils=require(_0xc8ba('0x16'));var config=require(_0xc8ba('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')['dbH'];function respondWithStatusCode(_0xea277d,_0x5bfc81){_0x5bfc81=_0x5bfc81||0xcc;return function(_0x1439cb){if(_0x1439cb){return _0xea277d[_0xc8ba('0x18')](_0x5bfc81);}return _0xea277d[_0xc8ba('0x19')](_0x5bfc81)[_0xc8ba('0x1a')]();};}function respondWithResult(_0xac1c15,_0x1e3b2d){_0x1e3b2d=_0x1e3b2d||0xc8;return function(_0x2d6864){if(_0x2d6864){return _0xac1c15[_0xc8ba('0x19')](_0x1e3b2d)[_0xc8ba('0x1b')](_0x2d6864);}};}function respondWithFilteredResult(_0x1c113d,_0x1c553c){return function(_0x500e20){if(_0x500e20){var _0x49327d=typeof _0x1c553c[_0xc8ba('0x1c')]===_0xc8ba('0x1d')&&typeof _0x1c553c[_0xc8ba('0x1e')]===_0xc8ba('0x1d');var _0x60d33a=_0x500e20[_0xc8ba('0x1f')];var _0x3b8b92=_0x49327d?0x0:_0x1c553c[_0xc8ba('0x1c')];var _0x13eb18=_0x49327d?_0x500e20['count']:_0x1c553c[_0xc8ba('0x1c')]+_0x1c553c[_0xc8ba('0x1e')];var _0x358536;if(_0x13eb18>=_0x60d33a){_0x13eb18=_0x60d33a;_0x358536=0xc8;}else{_0x358536=0xce;}_0x1c113d['status'](_0x358536);return _0x1c113d[_0xc8ba('0x20')](_0xc8ba('0x21'),_0x3b8b92+'-'+_0x13eb18+'/'+_0x60d33a)[_0xc8ba('0x1b')](_0x500e20);}return null;};}function patchUpdates(_0x321d8f){return function(_0x463476){try{jsonpatch[_0xc8ba('0x22')](_0x463476,_0x321d8f,!![]);}catch(_0x328e08){return BPromise['reject'](_0x328e08);}return _0x463476[_0xc8ba('0x23')]();};}function saveUpdates(_0x16ee82,_0xa05a9b){return function(_0x3130b2){if(_0x3130b2){return _0x3130b2['update'](_0x16ee82)[_0xc8ba('0x24')](function(_0x17adc3){return _0x17adc3;});}return null;};}function removeEntity(_0x17f571,_0x624f35){return function(_0x2bd895){if(_0x2bd895){return _0x2bd895['destroy']()[_0xc8ba('0x24')](function(){var _0x308af9=_0x2bd895[_0xc8ba('0x25')]({'plain':!![]});var _0x537055='CustomReports';return db[_0xc8ba('0x26')][_0xc8ba('0x27')]({'where':{'type':_0x537055,'resourceId':_0x308af9['id']}})[_0xc8ba('0x24')](function(){return _0x2bd895;});})[_0xc8ba('0x24')](function(){_0x17f571[_0xc8ba('0x19')](0xcc)[_0xc8ba('0x1a')]();});}};}function handleEntityNotFound(_0x26562c,_0x1121fc){return function(_0x1e9c18){if(!_0x1e9c18){_0x26562c[_0xc8ba('0x18')](0x194);}return _0x1e9c18;};}function handleError(_0x489ea9,_0x335b9f){_0x335b9f=_0x335b9f||0x1f4;return function(_0x570a75){logger[_0xc8ba('0x28')](_0x570a75[_0xc8ba('0x29')]);if(_0x570a75['name']){delete _0x570a75['name'];}_0x489ea9[_0xc8ba('0x19')](_0x335b9f)[_0xc8ba('0x2a')](_0x570a75);};}exports[_0xc8ba('0x2b')]=function(_0x31c710,_0x154bd9){var _0x2b6054={},_0x275f10={},_0x6724ab={'count':0x0,'rows':[]};var _0x2cb976=_[_0xc8ba('0x2c')](db[_0xc8ba('0x2d')]['rawAttributes'],function(_0x4a9c28){return{'name':_0x4a9c28[_0xc8ba('0x2e')],'type':_0x4a9c28['type'][_0xc8ba('0x2f')]};});_0x275f10['model']=_[_0xc8ba('0x2c')](_0x2cb976,_0xc8ba('0x30'));_0x275f10[_0xc8ba('0x31')]=_[_0xc8ba('0x32')](_0x31c710[_0xc8ba('0x31')]);_0x275f10['filters']=_[_0xc8ba('0x33')](_0x275f10[_0xc8ba('0x34')],_0x275f10['query']);_0x2b6054[_0xc8ba('0x35')]=_[_0xc8ba('0x33')](_0x275f10[_0xc8ba('0x34')],qs[_0xc8ba('0x36')](_0x31c710[_0xc8ba('0x31')][_0xc8ba('0x36')]));_0x2b6054[_0xc8ba('0x35')]=_0x2b6054[_0xc8ba('0x35')][_0xc8ba('0x37')]?_0x2b6054[_0xc8ba('0x35')]:_0x275f10[_0xc8ba('0x34')];if(!_0x31c710[_0xc8ba('0x31')]['hasOwnProperty'](_0xc8ba('0x38'))){_0x2b6054['limit']=qs['limit'](_0x31c710[_0xc8ba('0x31')][_0xc8ba('0x1e')]);_0x2b6054[_0xc8ba('0x1c')]=qs['offset'](_0x31c710[_0xc8ba('0x31')]['offset']);}_0x2b6054[_0xc8ba('0x39')]=qs['sort'](_0x31c710[_0xc8ba('0x31')]['sort']);_0x2b6054['where']=qs[_0xc8ba('0x3a')](_['pick'](_0x31c710[_0xc8ba('0x31')],_0x275f10[_0xc8ba('0x3a')]),_0x2cb976);if(_0x31c710[_0xc8ba('0x31')][_0xc8ba('0x3b')]){_0x2b6054[_0xc8ba('0x3c')]=_[_0xc8ba('0x3d')](_0x2b6054[_0xc8ba('0x3c')],{'$or':_[_0xc8ba('0x2c')](_0x2cb976,function(_0x4ba7e5){if(_0x4ba7e5[_0xc8ba('0x3e')]!=='VIRTUAL'){var _0x244337={};_0x244337[_0x4ba7e5[_0xc8ba('0x30')]]={'$like':'%'+_0x31c710[_0xc8ba('0x31')]['filter']+'%'};return _0x244337;}})});}_0x2b6054=_[_0xc8ba('0x3d')]({},_0x2b6054,_0x31c710[_0xc8ba('0x3f')]);var _0x2dde7e={'where':_0x2b6054[_0xc8ba('0x3c')]};return db[_0xc8ba('0x2d')][_0xc8ba('0x1f')](_0x2dde7e)[_0xc8ba('0x24')](function(_0x4ee5f7){_0x6724ab[_0xc8ba('0x1f')]=_0x4ee5f7;if(_0x31c710[_0xc8ba('0x31')][_0xc8ba('0x40')]){_0x2b6054[_0xc8ba('0x41')]=[{'all':!![]}];}return db[_0xc8ba('0x2d')][_0xc8ba('0x42')](_0x2b6054);})['then'](function(_0x43d117){_0x6724ab[_0xc8ba('0x43')]=_0x43d117;return _0x6724ab;})['then'](respondWithFilteredResult(_0x154bd9,_0x2b6054))[_0xc8ba('0x44')](handleError(_0x154bd9,null));};exports['show']=function(_0x5c5fc9,_0x2c5dd5){var _0x44c7bc={'raw':![],'where':{'id':_0x5c5fc9['params']['id']}},_0x1e8b3b={};_0x1e8b3b[_0xc8ba('0x34')]=_['keys'](db['AnalyticCustomReport'][_0xc8ba('0x45')]);_0x1e8b3b[_0xc8ba('0x31')]=_[_0xc8ba('0x32')](_0x5c5fc9[_0xc8ba('0x31')]);_0x1e8b3b[_0xc8ba('0x3a')]=_[_0xc8ba('0x33')](_0x1e8b3b[_0xc8ba('0x34')],_0x1e8b3b['query']);_0x44c7bc[_0xc8ba('0x35')]=_['intersection'](_0x1e8b3b['model'],qs[_0xc8ba('0x36')](_0x5c5fc9[_0xc8ba('0x31')]['fields']));_0x44c7bc['attributes']=_0x44c7bc[_0xc8ba('0x35')]['length']?_0x44c7bc['attributes']:_0x1e8b3b[_0xc8ba('0x34')];if(_0x5c5fc9[_0xc8ba('0x31')]['includeAll']){_0x44c7bc[_0xc8ba('0x41')]=[{'all':!![]}];}_0x44c7bc=_[_0xc8ba('0x3d')]({},_0x44c7bc,_0x5c5fc9['options']);return db[_0xc8ba('0x2d')][_0xc8ba('0x46')](_0x44c7bc)['then'](handleEntityNotFound(_0x2c5dd5,null))[_0xc8ba('0x24')](respondWithResult(_0x2c5dd5,null))[_0xc8ba('0x44')](handleError(_0x2c5dd5,null));};exports['create']=function(_0x117f5b,_0x3d7257){return db[_0xc8ba('0x2d')][_0xc8ba('0x47')](_0x117f5b[_0xc8ba('0x48')],{})['then'](function(_0x422e16){var _0x2a9f31=_0x117f5b[_0xc8ba('0x49')][_0xc8ba('0x25')]({'plain':!![]});if(!_0x2a9f31)throw new Error(_0xc8ba('0x4a'));if(_0x2a9f31[_0xc8ba('0x4b')]===_0xc8ba('0x49')){var _0xf842e2=_0x422e16['get']({'plain':!![]});var _0x1ba145=_0xc8ba('0x4c');return db[_0xc8ba('0x4d')][_0xc8ba('0x46')]({'where':{'name':_0x1ba145,'userProfileId':_0x2a9f31['userProfileId']},'raw':!![]})[_0xc8ba('0x24')](function(_0x2de775){if(_0x2de775&&_0x2de775[_0xc8ba('0x4e')]===0x0){return db[_0xc8ba('0x26')][_0xc8ba('0x47')]({'name':_0xf842e2['name'],'resourceId':_0xf842e2['id'],'type':_0xc8ba('0x4f'),'sectionId':_0x2de775['id']},{})[_0xc8ba('0x24')](function(){return _0x422e16;});}else{return _0x422e16;}})[_0xc8ba('0x44')](function(_0x20d5d7){logger[_0xc8ba('0x28')](_0xc8ba('0x50'),_0x20d5d7);throw _0x20d5d7;});}return _0x422e16;})[_0xc8ba('0x24')](respondWithResult(_0x3d7257,0xc9))[_0xc8ba('0x44')](handleError(_0x3d7257,null));};exports[_0xc8ba('0x51')]=function(_0x559c74,_0x336b18){if(_0x559c74[_0xc8ba('0x48')]['id']){delete _0x559c74['body']['id'];}return db['AnalyticCustomReport'][_0xc8ba('0x46')]({'where':{'id':_0x559c74[_0xc8ba('0x52')]['id']}})[_0xc8ba('0x24')](handleEntityNotFound(_0x336b18,null))['then'](saveUpdates(_0x559c74[_0xc8ba('0x48')],null))[_0xc8ba('0x24')](respondWithResult(_0x336b18,null))[_0xc8ba('0x44')](handleError(_0x336b18,null));};exports[_0xc8ba('0x27')]=function(_0x45a7be,_0x19b6b5){return db[_0xc8ba('0x2d')][_0xc8ba('0x46')]({'where':{'id':_0x45a7be[_0xc8ba('0x52')]['id']}})[_0xc8ba('0x24')](handleEntityNotFound(_0x19b6b5,null))[_0xc8ba('0x24')](removeEntity(_0x19b6b5,null))[_0xc8ba('0x44')](handleError(_0x19b6b5,null));};exports[_0xc8ba('0x53')]=function(_0x591732,_0x30a0b3){var _0x506409=0xa;var _0x41aa60=[_0xc8ba('0x54'),_0xc8ba('0x55'),_0xc8ba('0x56'),_0xc8ba('0x57')];var _0x1a086b={'SUM':_0xc8ba('0x58'),'COUNT':_0xc8ba('0x59'),'COUNT DISTINCT':_0xc8ba('0x5a'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0xc8ba('0x5b'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xc8ba('0x5c')};var _0x5a5f14={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xc8ba('0x5d'),'HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0xc8ba('0x5e')};var _0x5d8133=function(_0x4b61e4){return!_[_0xc8ba('0x5f')]([_0xc8ba('0x60'),_0xc8ba('0x61'),_0xc8ba('0x62'),_0xc8ba('0x63')],_0x4b61e4);};var _0x41c6c9=function(_0x234d25){if(!_0x234d25||!_0x234d25['rules'][_0xc8ba('0x37')]){return'';}for(var _0x455f01='(',_0xa5a765=0x0;_0xa5a765<_0x234d25[_0xc8ba('0x64')]['length'];_0xa5a765+=0x1){_0xa5a765>0x0&&(_0x455f01+='\x20'+_0x234d25[_0xc8ba('0x65')]+'\x20');_0x455f01+=_0x234d25['rules'][_0xa5a765]['group']?_0x41c6c9(_0x234d25[_0xc8ba('0x64')][_0xa5a765][_0xc8ba('0x66')]):_0x234d25[_0xc8ba('0x64')][_0xa5a765]['field']+'\x20'+_0x234d25['rules'][_0xa5a765][_0xc8ba('0x67')]+(_0x5d8133(_0x234d25[_0xc8ba('0x64')][_0xa5a765][_0xc8ba('0x67')])?'\x20'+_0x234d25['rules'][_0xa5a765]['value']:'');}return _0x455f01+')';};var _0x31b70b={'where':{'id':_0x591732[_0xc8ba('0x52')]['id']}},_0x131ce3,_0x2c27e7,_0x53c4e4,_0x58680e,_0x5d82f1;_0x31b70b=_[_0xc8ba('0x3d')]({},_0x31b70b,_0x591732[_0xc8ba('0x3f')]);return db['AnalyticCustomReport']['find'](_0x31b70b)[_0xc8ba('0x24')](function(_0x290833){if(_0x290833){_0x131ce3=_0x290833;return _0x290833['getFields']();}return null;})['then'](function(_0x31afec){if(_0x31afec){if(!_0x31afec['length']){throw new db[(_0xc8ba('0x68'))]['ValidationErrorItem'](_0xc8ba('0x69'),0x193);}_0x2c27e7=_0x31afec;return db[_0xc8ba('0x6a')][_0xc8ba('0x42')]({'raw':!![]});}return null;})[_0xc8ba('0x24')](function(_0x3bc432){if(_0x3bc432){_0x53c4e4=_[_0xc8ba('0x6b')](_0x3bc432,'id');var _0x1ddb04;var _0x35af01=squel[_0xc8ba('0x6c')]();_0x35af01['from'](_0x131ce3[_0xc8ba('0x6d')]);for(var _0x19f682=0x0;_0x19f682<_0x2c27e7[_0xc8ba('0x37')];_0x19f682+=0x1){_0x1ddb04=_0x2c27e7[_0x19f682]['MetricId']?_0x53c4e4[_0x2c27e7[_0x19f682][_0xc8ba('0x6e')]]['metric']:_0x2c27e7[_0x19f682][_0xc8ba('0x6f')];_0x1ddb04=_0x2c27e7[_0x19f682][_0xc8ba('0x70')]?_['replace'](_0x1a086b[_0x2c27e7[_0x19f682][_0xc8ba('0x70')]],'%s',_0x1ddb04):_0x1ddb04;_0x1ddb04=_0x2c27e7[_0x19f682][_0xc8ba('0x71')]?_[_0xc8ba('0x72')](_0x5a5f14[_0x2c27e7[_0x19f682][_0xc8ba('0x71')]],'%s',_0x1ddb04):_0x1ddb04;if(_0x2c27e7[_0x19f682][_0xc8ba('0x73')]){_0x35af01[_0xc8ba('0x66')](_0x1ddb04);}_0x2c27e7[_0x19f682][_0xc8ba('0x74')]&&_0x35af01[_0xc8ba('0x39')](_0x1ddb04,_0x2c27e7[_0x19f682][_0xc8ba('0x74')]===_0xc8ba('0x75')?![]:!![]);_0x35af01[_0xc8ba('0x6f')](_0x1ddb04,_0x2c27e7[_0x19f682][_0xc8ba('0x76')]||_0x1ddb04);}if(_0x131ce3[_0xc8ba('0x77')]){_0x131ce3[_0xc8ba('0x77')]=JSON[_0xc8ba('0x78')](_0x131ce3[_0xc8ba('0x77')]);for(var _0x1acafd=0x0;_0x1acafd<_0x131ce3['joins'][_0xc8ba('0x37')];_0x1acafd+=0x1){if(_0x131ce3['joins'][_0x1acafd][_0xc8ba('0x3e')]&&_[_0xc8ba('0x5f')](_0x41aa60,_0x131ce3[_0xc8ba('0x77')][_0x1acafd]['type'])&&_0x131ce3[_0xc8ba('0x77')][_0x1acafd][_0xc8ba('0x79')]&&_0x131ce3[_0xc8ba('0x77')][_0x1acafd][_0xc8ba('0x7a')]&&_0x131ce3['joins'][_0x1acafd]['foreignKey']){_0x35af01[_0x131ce3[_0xc8ba('0x77')][_0x1acafd][_0xc8ba('0x3e')]](_0x131ce3['joins'][_0x1acafd][_0xc8ba('0x7a')],null,util[_0xc8ba('0x71')](_0xc8ba('0x7b'),_0x131ce3[_0xc8ba('0x6d')],_0x131ce3[_0xc8ba('0x77')][_0x1acafd][_0xc8ba('0x79')],_0x131ce3[_0xc8ba('0x77')][_0x1acafd][_0xc8ba('0x7a')],_0x131ce3[_0xc8ba('0x77')][_0x1acafd]['foreignKey']));}}}if(_0x131ce3['conditions']){_0x131ce3[_0xc8ba('0x7c')]=JSON[_0xc8ba('0x78')](_0x131ce3['conditions']);_0x35af01[_0xc8ba('0x3c')](_0x41c6c9(_0x131ce3[_0xc8ba('0x7c')][_0xc8ba('0x66')]));}_0x5d82f1=_0x35af01['clone']();_0x35af01[_0xc8ba('0x1e')](_0x506409);_0x35af01[_0xc8ba('0x1c')](0x0);logger[_0xc8ba('0x7d')]('Limited\x20Query:',_0x35af01['toString']());return dbH[_0xc8ba('0x7e')][_0xc8ba('0x31')](_0x35af01[_0xc8ba('0x7f')](),{'type':dbH['sequelize'][_0xc8ba('0x80')]['SELECT']});}})[_0xc8ba('0x24')](respondWithResult(_0x30a0b3,null))[_0xc8ba('0x44')](handleError(_0x30a0b3,null));};function runReport(_0x145f55,_0x2d4e35,_0xc88dfd){var _0x4ae7f6=_0x2d4e35[_0xc8ba('0x30')];var _0xaa6c49=0xa;var _0x47db93=['join','left_join','right_join',_0xc8ba('0x57')];var _0x221eab={'SUM':'SUM(%s)','COUNT':_0xc8ba('0x59'),'COUNT DISTINCT':_0xc8ba('0x5a'),'MAX':_0xc8ba('0x81'),'MIN':_0xc8ba('0x82'),'AVG':_0xc8ba('0x83'),'GROUP_CONCAT':_0xc8ba('0x5b'),'GROUP_CONCAT ASC':_0xc8ba('0x84'),'GROUP_CONCAT DESC':_0xc8ba('0x5c')};var _0x9be4eb={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xc8ba('0x5d'),'HOUR':'HOUR(%s)','ROUND':_0xc8ba('0x85'),'UNIX_TIMESTAMP':_0xc8ba('0x5e')};var _0x26db19=function(_0x17087f){return!_[_0xc8ba('0x5f')]([_0xc8ba('0x60'),'IS\x20NOT\x20NULL',_0xc8ba('0x62'),_0xc8ba('0x63')],_0x17087f);};var _0x729741=function(_0x56eddb){if(!_0x56eddb||!_0x56eddb['rules'][_0xc8ba('0x37')]){return'';}for(var _0x2cf385='(',_0x43587a=0x0;_0x43587a<_0x56eddb[_0xc8ba('0x64')]['length'];_0x43587a+=0x1){_0x43587a>0x0&&(_0x2cf385+='\x20'+_0x56eddb[_0xc8ba('0x65')]+'\x20');_0x2cf385+=_0x56eddb['rules'][_0x43587a][_0xc8ba('0x66')]?_0x729741(_0x56eddb[_0xc8ba('0x64')][_0x43587a][_0xc8ba('0x66')]):_0x56eddb[_0xc8ba('0x64')][_0x43587a]['field']+'\x20'+_0x56eddb[_0xc8ba('0x64')][_0x43587a][_0xc8ba('0x67')]+(_0x26db19(_0x56eddb[_0xc8ba('0x64')][_0x43587a][_0xc8ba('0x67')])?'\x20'+_0x56eddb[_0xc8ba('0x64')][_0x43587a][_0xc8ba('0x86')]:'');}return _0x2cf385+')';};var _0x4099bf={'where':{'id':_0x145f55['id']}},_0x198d83,_0x24252b,_0x45058e,_0x2640e0,_0x4f9724;_0x4099bf=_['merge']({},_0x4099bf,_0xc88dfd);return db['AnalyticCustomReport'][_0xc8ba('0x46')](_0x4099bf)['then'](function(_0x366ce6){if(_0x366ce6){_0x198d83=_0x366ce6;return _0x366ce6[_0xc8ba('0x87')]();}return null;})[_0xc8ba('0x24')](function(_0x59048f){if(_0x59048f){if(!_0x59048f[_0xc8ba('0x37')]){throw new db[(_0xc8ba('0x68'))][(_0xc8ba('0x88'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x24252b=_0x59048f;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0xc8ba('0x24')](function(_0x401b33){if(_0x401b33){_0x45058e=_['keyBy'](_0x401b33,'id');var _0x521440;var _0x2bd025=squel[_0xc8ba('0x6c')]();_0x2bd025[_0xc8ba('0x89')](_0x198d83[_0xc8ba('0x6d')]);for(var _0x4607e8=0x0;_0x4607e8<_0x24252b[_0xc8ba('0x37')];_0x4607e8+=0x1){_0x521440=_0x24252b[_0x4607e8][_0xc8ba('0x6e')]?_0x45058e[_0x24252b[_0x4607e8][_0xc8ba('0x6e')]][_0xc8ba('0x8a')]:_0x24252b[_0x4607e8][_0xc8ba('0x6f')];_0x521440=_0x24252b[_0x4607e8][_0xc8ba('0x70')]?_[_0xc8ba('0x72')](_0x221eab[_0x24252b[_0x4607e8][_0xc8ba('0x70')]],'%s',_0x521440):_0x521440;_0x521440=_0x24252b[_0x4607e8]['format']?_['replace'](_0x9be4eb[_0x24252b[_0x4607e8][_0xc8ba('0x71')]],'%s',_0x521440):_0x521440;if(_0x24252b[_0x4607e8]['groupBy']){_0x2bd025['group'](_0x521440);}_0x24252b[_0x4607e8][_0xc8ba('0x74')]&&_0x2bd025['order'](_0x521440,_0x24252b[_0x4607e8][_0xc8ba('0x74')]===_0xc8ba('0x75')?![]:!![]);_0x2bd025[_0xc8ba('0x6f')](_0x521440,_0x24252b[_0x4607e8]['alias']||_0x521440);}if(_0x198d83[_0xc8ba('0x77')]){_0x198d83[_0xc8ba('0x77')]=JSON[_0xc8ba('0x78')](_0x198d83[_0xc8ba('0x77')]);for(var _0x5bdefb=0x0;_0x5bdefb<_0x198d83[_0xc8ba('0x77')][_0xc8ba('0x37')];_0x5bdefb+=0x1){if(_0x198d83['joins'][_0x5bdefb][_0xc8ba('0x3e')]&&_[_0xc8ba('0x5f')](_0x47db93,_0x198d83['joins'][_0x5bdefb][_0xc8ba('0x3e')])&&_0x198d83[_0xc8ba('0x77')][_0x5bdefb][_0xc8ba('0x79')]&&_0x198d83[_0xc8ba('0x77')][_0x5bdefb][_0xc8ba('0x7a')]&&_0x198d83[_0xc8ba('0x77')][_0x5bdefb]['foreignKey']){_0x2bd025[_0x198d83[_0xc8ba('0x77')][_0x5bdefb]['type']](_0x198d83[_0xc8ba('0x77')][_0x5bdefb]['foreignTable'],null,util[_0xc8ba('0x71')]('%s.%s\x20=\x20%s.%s',_0x198d83[_0xc8ba('0x6d')],_0x198d83[_0xc8ba('0x77')][_0x5bdefb][_0xc8ba('0x79')],_0x198d83[_0xc8ba('0x77')][_0x5bdefb][_0xc8ba('0x7a')],_0x198d83['joins'][_0x5bdefb]['foreignKey']));}}}if(_0x198d83[_0xc8ba('0x7c')]){_0x198d83[_0xc8ba('0x7c')]=JSON['parse'](_0x198d83['conditions']);_0x2bd025['where'](_0x729741(_0x198d83[_0xc8ba('0x7c')][_0xc8ba('0x66')]));}_0x4f9724=_0x2bd025[_0xc8ba('0x8b')]();_0x2bd025[_0xc8ba('0x1e')](_0xaa6c49);_0x2bd025[_0xc8ba('0x1c')](0x0);return;}})[_0xc8ba('0x24')](function(){if(_0x2d4e35[_0xc8ba('0x8c')]==='web'){return null;}var _0x178b5e=_[_0xc8ba('0x3d')](_0x2d4e35,{'name':_0x2d4e35[_0xc8ba('0x8d')]||_0x2d4e35['name']||_0x198d83[_0xc8ba('0x30')],'basename':_0x4ae7f6,'savename':util[_0xc8ba('0x71')](_0xc8ba('0x8e'),_0x2d4e35[_0xc8ba('0x30')]||_0x198d83[_0xc8ba('0x30')],require(_0xc8ba('0x8f'))[_0xc8ba('0x90')](0x4),_0x2d4e35['output']||_0xc8ba('0x91')),'reportId':_0x198d83['id'],'reportType':'custom'});return db[_0xc8ba('0x92')][_0xc8ba('0x47')](_0x178b5e,{'raw':!![]});})['then'](function(_0x9a31cc){if(_0x198d83[_0xc8ba('0x6d')]===_0xc8ba('0x93')){_0x4f9724[_0xc8ba('0x3c')](_0x198d83[_0xc8ba('0x6d')]+_0xc8ba('0x94'),_0x2d4e35[_0xc8ba('0x95')],_0x2d4e35[_0xc8ba('0x96')]);}else{_0x4f9724[_0xc8ba('0x3c')](_0x198d83['table']+_0xc8ba('0x97'),_0x2d4e35[_0xc8ba('0x95')],_0x2d4e35[_0xc8ba('0x96')]);}if(_0x9a31cc){logger[_0xc8ba('0x98')]('Run\x20Query:',_0x4f9724[_0xc8ba('0x7f')]());require('child_process')[_0xc8ba('0x99')](path['join'](__dirname,'../../components/export/',_0x9a31cc[_0xc8ba('0x8c')]),[_0x9a31cc['id'],_0x4f9724[_0xc8ba('0x7f')](),path[_0xc8ba('0x54')](__dirname,_0xc8ba('0x9a'),_0x9a31cc[_0xc8ba('0x9b')]),_0x4ae7f6]);return _0x9a31cc;}else{var _0x5373e6=squel[_0xc8ba('0x6c')]();_0x5373e6['from']('('+_0x4f9724[_0xc8ba('0x7f')]()+')','countTable');_0x5373e6[_0xc8ba('0x6f')](_0xc8ba('0x9c'),_0xc8ba('0x1f'));_0x4f9724['limit'](_0x2d4e35['limit']||_0xaa6c49);_0x4f9724[_0xc8ba('0x1c')](_0x2d4e35[_0xc8ba('0x1c')]||0x0);return dbH[_0xc8ba('0x7e')][_0xc8ba('0x31')](_0x5373e6[_0xc8ba('0x7f')](),{'type':dbH[_0xc8ba('0x7e')]['QueryTypes'][_0xc8ba('0x9d')]})[_0xc8ba('0x24')](function(_0x5667f2){if(!_0x5667f2['length']){_0x2640e0=0x0;}else{_0x2640e0=_0x5667f2[0x0][_0xc8ba('0x1f')]||0x0;}return dbH[_0xc8ba('0x7e')][_0xc8ba('0x31')](_0x4f9724[_0xc8ba('0x7f')](),{'type':dbH['sequelize'][_0xc8ba('0x80')][_0xc8ba('0x9d')]});})[_0xc8ba('0x24')](function(_0x18380c){return{'rows':_0x18380c||[],'count':_0x2640e0};});}});}exports[_0xc8ba('0x9e')]=function(_0x1cf7fc,_0x47c0a0){return runReport(_0x1cf7fc[_0xc8ba('0x52')],_0x1cf7fc[_0xc8ba('0x31')],_0x1cf7fc[_0xc8ba('0x3f')])[_0xc8ba('0x24')](respondWithResult(_0x47c0a0,null))[_0xc8ba('0x44')](handleError(_0x47c0a0,null));};exports[_0xc8ba('0x9f')]=runReport;exports[_0xc8ba('0x31')]=function(_0x360d61,_0x3081a3){var _0x5cff5a=0xa;var _0x25bd01=['join','left_join',_0xc8ba('0x56'),_0xc8ba('0x57')];var _0x5d416f={'SUM':'SUM(%s)','COUNT':_0xc8ba('0x59'),'COUNT DISTINCT':_0xc8ba('0x5a'),'MAX':'MAX(%s)','MIN':_0xc8ba('0x82'),'AVG':_0xc8ba('0x83'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0xc8ba('0x84'),'GROUP_CONCAT DESC':_0xc8ba('0x5c')};var _0x9bca4e={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xc8ba('0x5d'),'HOUR':'HOUR(%s)','ROUND':_0xc8ba('0x85'),'UNIX_TIMESTAMP':_0xc8ba('0x5e')};var _0x211fc3=function(_0x2c4798){return!_['includes'](['IS\x20NULL',_0xc8ba('0x61'),_0xc8ba('0x62'),_0xc8ba('0x63')],_0x2c4798);};var _0x27704e=function(_0x228483){if(!_0x228483||!_0x228483['rules'][_0xc8ba('0x37')]){return'';}for(var _0x3c3b6c='(',_0x1f9d93=0x0;_0x1f9d93<_0x228483[_0xc8ba('0x64')][_0xc8ba('0x37')];_0x1f9d93+=0x1){_0x1f9d93>0x0&&(_0x3c3b6c+='\x20'+_0x228483[_0xc8ba('0x65')]+'\x20');_0x3c3b6c+=_0x228483[_0xc8ba('0x64')][_0x1f9d93][_0xc8ba('0x66')]?_0x27704e(_0x228483[_0xc8ba('0x64')][_0x1f9d93]['group']):_0x228483['rules'][_0x1f9d93][_0xc8ba('0x6f')]+'\x20'+_0x228483[_0xc8ba('0x64')][_0x1f9d93][_0xc8ba('0x67')]+(_0x211fc3(_0x228483[_0xc8ba('0x64')][_0x1f9d93][_0xc8ba('0x67')])?'\x20'+_0x228483[_0xc8ba('0x64')][_0x1f9d93][_0xc8ba('0x86')]:'');}return _0x3c3b6c+')';};var _0x193eb1={'where':{'id':_0x360d61['params']['id']}},_0x289814,_0x59e9b2,_0x3e304d,_0x242e47,_0x33a36f;_0x193eb1=_[_0xc8ba('0x3d')]({},_0x193eb1,_0x360d61[_0xc8ba('0x3f')]);return db['AnalyticCustomReport'][_0xc8ba('0x46')](_0x193eb1)['then'](function(_0x5919c4){if(_0x5919c4){_0x289814=_0x5919c4;return _0x5919c4[_0xc8ba('0x87')]();}return null;})[_0xc8ba('0x24')](function(_0x53a6b7){if(_0x53a6b7){if(!_0x53a6b7[_0xc8ba('0x37')]){throw new db[(_0xc8ba('0x68'))][(_0xc8ba('0x88'))](_0xc8ba('0x69'),0x193);}_0x59e9b2=_0x53a6b7;return db['AnalyticMetric'][_0xc8ba('0x42')]({'raw':!![]});}return null;})[_0xc8ba('0x24')](function(_0x346eef){if(_0x346eef){_0x3e304d=_[_0xc8ba('0x6b')](_0x346eef,'id');var _0x1dff58;var _0x43a759=squel[_0xc8ba('0x6c')]();_0x43a759[_0xc8ba('0x89')](_0x289814[_0xc8ba('0x6d')]);for(var _0x454561=0x0;_0x454561<_0x59e9b2['length'];_0x454561+=0x1){_0x1dff58=_0x59e9b2[_0x454561][_0xc8ba('0x6e')]?_0x3e304d[_0x59e9b2[_0x454561]['MetricId']][_0xc8ba('0x8a')]:_0x59e9b2[_0x454561][_0xc8ba('0x6f')];_0x1dff58=_0x59e9b2[_0x454561][_0xc8ba('0x70')]?_[_0xc8ba('0x72')](_0x5d416f[_0x59e9b2[_0x454561][_0xc8ba('0x70')]],'%s',_0x1dff58):_0x1dff58;_0x1dff58=_0x59e9b2[_0x454561][_0xc8ba('0x71')]?_[_0xc8ba('0x72')](_0x9bca4e[_0x59e9b2[_0x454561][_0xc8ba('0x71')]],'%s',_0x1dff58):_0x1dff58;if(_0x59e9b2[_0x454561][_0xc8ba('0x73')]){_0x43a759[_0xc8ba('0x66')](_0x1dff58);}_0x59e9b2[_0x454561][_0xc8ba('0x74')]&&_0x43a759[_0xc8ba('0x39')](_0x1dff58,_0x59e9b2[_0x454561]['orderBy']===_0xc8ba('0x75')?![]:!![]);_0x43a759['field'](_0x1dff58,_0x59e9b2[_0x454561][_0xc8ba('0x76')]||_0x1dff58);}if(_0x289814[_0xc8ba('0x77')]){_0x289814[_0xc8ba('0x77')]=JSON[_0xc8ba('0x78')](_0x289814[_0xc8ba('0x77')]);for(var _0x12a1a4=0x0;_0x12a1a4<_0x289814[_0xc8ba('0x77')][_0xc8ba('0x37')];_0x12a1a4+=0x1){if(_0x289814[_0xc8ba('0x77')][_0x12a1a4]['type']&&_['includes'](_0x25bd01,_0x289814[_0xc8ba('0x77')][_0x12a1a4][_0xc8ba('0x3e')])&&_0x289814[_0xc8ba('0x77')][_0x12a1a4][_0xc8ba('0x79')]&&_0x289814['joins'][_0x12a1a4][_0xc8ba('0x7a')]&&_0x289814['joins'][_0x12a1a4][_0xc8ba('0xa0')]){_0x43a759[_0x289814['joins'][_0x12a1a4]['type']](_0x289814[_0xc8ba('0x77')][_0x12a1a4][_0xc8ba('0x7a')],null,util[_0xc8ba('0x71')]('%s.%s\x20=\x20%s.%s',_0x289814[_0xc8ba('0x6d')],_0x289814['joins'][_0x12a1a4]['parentKey'],_0x289814[_0xc8ba('0x77')][_0x12a1a4]['foreignTable'],_0x289814[_0xc8ba('0x77')][_0x12a1a4][_0xc8ba('0xa0')]));}}}if(_0x289814['conditions']){_0x289814[_0xc8ba('0x7c')]=JSON[_0xc8ba('0x78')](_0x289814[_0xc8ba('0x7c')]);_0x43a759[_0xc8ba('0x3c')](_0x27704e(_0x289814['conditions']['group']));}_0x33a36f=_0x43a759['clone']();_0x43a759[_0xc8ba('0x1e')](_0x5cff5a);_0x43a759[_0xc8ba('0x1c')](0x0);logger[_0xc8ba('0x7d')]('Limited\x20Query:',_0x43a759['toString']());return dbH[_0xc8ba('0x7e')][_0xc8ba('0x31')](_0x43a759['toString'](),{'type':dbH[_0xc8ba('0x7e')][_0xc8ba('0x80')]['SELECT']});}})[_0xc8ba('0x24')](function(){return{'sql':_0x33a36f[_0xc8ba('0x7f')]()};})[_0xc8ba('0x24')](respondWithResult(_0x3081a3,null))['catch'](handleError(_0x3081a3,null));}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js index 65f3101..c744e48 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 _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 +var _0x5422=['util','api','moment','bluebird','rimraf','../../config/environment','exports','analytics_custom_reports'];(function(_0x3c72e1,_0x21d408){var _0x3efb1d=function(_0x1966d1){while(--_0x1966d1){_0x3c72e1['push'](_0x3c72e1['shift']());}};_0x3efb1d(++_0x21d408);}(_0x5422,0x178));var _0x2542=function(_0x33f3db,_0x19a892){_0x33f3db=_0x33f3db-0x0;var _0x2f7cbb=_0x5422[_0x33f3db];return _0x2f7cbb;};'use strict';var _=require('lodash');var util=require(_0x2542('0x0'));var logger=require('../../config/logger')(_0x2542('0x1'));var moment=require(_0x2542('0x2'));var BPromise=require(_0x2542('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x2542('0x4'));var config=require(_0x2542('0x5'));var attributes=require('./analyticCustomReport.attributes');module[_0x2542('0x6')]=function(_0xb8e909,_0x4d4bf9){return _0xb8e909['define']('AnalyticCustomReport',attributes,{'tableName':_0x2542('0x7'),'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 8475e45..8d7955d 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 _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 +var _0x5e59=['then','info','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','AnalyticCustomReport,\x20%s,\x20%s','message','result','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','jayson/promise','request'];(function(_0x4285de,_0x2eb9cf){var _0x458d4f=function(_0x4445a0){while(--_0x4445a0){_0x4285de['push'](_0x4285de['shift']());}};_0x458d4f(++_0x2eb9cf);}(_0x5e59,0x76));var _0x95e5=function(_0x318840,_0x561b1e){_0x318840=_0x318840-0x0;var _0x223da4=_0x5e59[_0x318840];return _0x223da4;};'use strict';var _=require('lodash');var util=require(_0x95e5('0x0'));var moment=require(_0x95e5('0x1'));var BPromise=require(_0x95e5('0x2'));var rs=require(_0x95e5('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x95e5('0x4'));var logger=require(_0x95e5('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x95e5('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x38a8d5,_0x388ccc,_0x76d698){return new BPromise(function(_0x2f4354,_0x51bf2e){return client[_0x95e5('0x7')](_0x38a8d5,_0x76d698)[_0x95e5('0x8')](function(_0xdbad7f){logger[_0x95e5('0x9')]('AnalyticCustomReport,\x20%s,\x20%s',_0x388ccc,_0x95e5('0xa'));logger[_0x95e5('0xb')](_0x95e5('0xc'),_0x388ccc,_0x95e5('0xa'),JSON[_0x95e5('0xd')](_0xdbad7f));if(_0xdbad7f[_0x95e5('0xe')]){if(_0xdbad7f[_0x95e5('0xe')]['code']===0x1f4){logger[_0x95e5('0xe')](_0x95e5('0xf'),_0x388ccc,_0xdbad7f[_0x95e5('0xe')]['message']);return _0x51bf2e(_0xdbad7f['error']['message']);}logger[_0x95e5('0xe')](_0x95e5('0xf'),_0x388ccc,_0xdbad7f[_0x95e5('0xe')][_0x95e5('0x10')]);return _0x2f4354(_0xdbad7f[_0x95e5('0xe')]['message']);}else{logger[_0x95e5('0x9')](_0x95e5('0xf'),_0x388ccc,'request\x20sent');_0x2f4354(_0xdbad7f[_0x95e5('0x11')][_0x95e5('0x10')]);}})['catch'](function(_0x35d6e2){logger[_0x95e5('0xe')](_0x95e5('0xf'),_0x388ccc,_0x35d6e2);_0x51bf2e(_0x35d6e2);});});} \ No newline at end of file diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js index ad880fb..303e4ea 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 _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 +var _0xd169=['../../config/environment','get','index','isAuthenticated','show','preview','run','/:id/query','post','create','put','/:id','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x148a73,_0x1cf706){var _0x59933d=function(_0x4ac7ab){while(--_0x4ac7ab){_0x148a73['push'](_0x148a73['shift']());}};_0x59933d(++_0x1cf706);}(_0xd169,0x1f2));var _0x9d16=function(_0x4b2863,_0x494899){_0x4b2863=_0x4b2863-0x0;var _0x567d67=_0xd169[_0x4b2863];return _0x567d67;};'use strict';var multer=require(_0x9d16('0x0'));var util=require(_0x9d16('0x1'));var path=require(_0x9d16('0x2'));var timeout=require(_0x9d16('0x3'));var express=require('express');var router=express[_0x9d16('0x4')]();var fs_extra=require(_0x9d16('0x5'));var auth=require(_0x9d16('0x6'));var interaction=require(_0x9d16('0x7'));var config=require(_0x9d16('0x8'));var controller=require('./analyticCustomReport.controller');router[_0x9d16('0x9')]('/',auth['isAuthenticated'](),controller[_0x9d16('0xa')]);router[_0x9d16('0x9')]('/:id',auth[_0x9d16('0xb')](),controller[_0x9d16('0xc')]);router[_0x9d16('0x9')]('/:id/preview',auth[_0x9d16('0xb')](),controller[_0x9d16('0xd')]);router[_0x9d16('0x9')]('/:id/run',auth[_0x9d16('0xb')](),controller[_0x9d16('0xe')]);router[_0x9d16('0x9')](_0x9d16('0xf'),auth['isAuthenticated'](),controller['query']);router[_0x9d16('0x10')]('/',auth[_0x9d16('0xb')](),controller[_0x9d16('0x11')]);router[_0x9d16('0x12')](_0x9d16('0x13'),auth['isAuthenticated'](),controller[_0x9d16('0x14')]);router[_0x9d16('0x15')](_0x9d16('0x13'),auth['isAuthenticated'](),controller['destroy']);module[_0x9d16('0x16')]=router; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js index 720aeac..a4ec3a9 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 _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 +var _0xac9d=['TEXT','sequelize','exports','STRING'];(function(_0x288650,_0x46a9c1){var _0x497115=function(_0x5b95d1){while(--_0x5b95d1){_0x288650['push'](_0x288650['shift']());}};_0x497115(++_0x46a9c1);}(_0xac9d,0x14d));var _0xdac9=function(_0x259ce8,_0x798276){_0x259ce8=_0x259ce8-0x0;var _0x5ef5c2=_0xac9d[_0x259ce8];return _0x5ef5c2;};'use strict';var Sequelize=require(_0xdac9('0x0'));module[_0xdac9('0x1')]={'name':{'type':Sequelize[_0xdac9('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xdac9('0x2')]},'parent':{'type':Sequelize[_0xdac9('0x2')]},'table':{'type':Sequelize[_0xdac9('0x2')]},'conditions':{'type':Sequelize[_0xdac9('0x3')]},'joins':{'type':Sequelize[_0xdac9('0x3')]}}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js index e3a857d..070ef42 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 _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 +var _0xe2fe=['set','Content-Range','apply','reject','save','then','destroy','get','DefaultReports','UserProfileResource','sendStatus','error','name','send','index','AnalyticDefaultReport','rawAttributes','fieldName','map','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','preview','join','right_join','cross_join','SUM(%s)','COUNT(%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','rules','operator','group','field','condition','value','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','MetricId','metric','function','replace','groupBy','orderBy','alias','joins','parse','type','foreignTable','%s.%s\x20=\x20%s.%s','table','parentKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','left_join','SEC_TO_TIME(%s)','ROUND(%s)','IS\x20EMPTY','getFields','format','foreignKey','web','%s-%s.%s','randomstring','generate','output','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','Run\x20Query:','child_process','../../components/export/','savename','countTable','COUNT(*)','run','runReport','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','IS\x20NOT\x20EMPTY','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','jsforce','querystring','ioredis','../../components/auth/service','api','../../mysqldb','dbH','status','json','offset','limit','undefined','count'];(function(_0x55a1cc,_0x2d72ec){var _0x44b08e=function(_0x3a1f66){while(--_0x3a1f66){_0x55a1cc['push'](_0x55a1cc['shift']());}};_0x44b08e(++_0x2d72ec);}(_0xe2fe,0x86));var _0xee2f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe2fe[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xee2f('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xee2f('0x1'));var rp=require('request-promise');var moment=require(_0xee2f('0x2'));var BPromise=require(_0xee2f('0x3'));var Mustache=require(_0xee2f('0x4'));var util=require(_0xee2f('0x5'));var path=require(_0xee2f('0x6'));var sox=require('sox');var csv=require(_0xee2f('0x7'));var ejs=require(_0xee2f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xee2f('0x9'));var squel=require(_0xee2f('0xa'));var crypto=require('crypto');var jsforce=require(_0xee2f('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xee2f('0x7'));var querystring=require(_0xee2f('0xc'));var Papa=require('papaparse');var Redis=require(_0xee2f('0xd'));var authService=require(_0xee2f('0xe'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xee2f('0xf'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xee2f('0x10'))['db'];var dbH=require(_0xee2f('0x10'))[_0xee2f('0x11')];function respondWithStatusCode(_0x100449,_0x131874){_0x131874=_0x131874||0xcc;return function(_0x3ab91f){if(_0x3ab91f){return _0x100449['sendStatus'](_0x131874);}return _0x100449[_0xee2f('0x12')](_0x131874)['end']();};}function respondWithResult(_0x36db10,_0x271c1d){_0x271c1d=_0x271c1d||0xc8;return function(_0x48b30c){if(_0x48b30c){return _0x36db10[_0xee2f('0x12')](_0x271c1d)[_0xee2f('0x13')](_0x48b30c);}};}function respondWithFilteredResult(_0x28b614,_0x1bbf7d){return function(_0x390c2c){if(_0x390c2c){var _0x58f42a=typeof _0x1bbf7d[_0xee2f('0x14')]==='undefined'&&typeof _0x1bbf7d[_0xee2f('0x15')]===_0xee2f('0x16');var _0x502eb6=_0x390c2c['count'];var _0x40b5bc=_0x58f42a?0x0:_0x1bbf7d['offset'];var _0x69db88=_0x58f42a?_0x390c2c[_0xee2f('0x17')]:_0x1bbf7d[_0xee2f('0x14')]+_0x1bbf7d['limit'];var _0x35e1a4;if(_0x69db88>=_0x502eb6){_0x69db88=_0x502eb6;_0x35e1a4=0xc8;}else{_0x35e1a4=0xce;}_0x28b614[_0xee2f('0x12')](_0x35e1a4);return _0x28b614[_0xee2f('0x18')](_0xee2f('0x19'),_0x40b5bc+'-'+_0x69db88+'/'+_0x502eb6)[_0xee2f('0x13')](_0x390c2c);}return null;};}function patchUpdates(_0x5d36d4){return function(_0x5e73ad){try{jsonpatch[_0xee2f('0x1a')](_0x5e73ad,_0x5d36d4,!![]);}catch(_0x3a1852){return BPromise[_0xee2f('0x1b')](_0x3a1852);}return _0x5e73ad[_0xee2f('0x1c')]();};}function saveUpdates(_0x472e3b,_0xf278cc){return function(_0x39a39c){if(_0x39a39c){return _0x39a39c['update'](_0x472e3b)[_0xee2f('0x1d')](function(_0x2c47c5){return _0x2c47c5;});}return null;};}function removeEntity(_0x15ceda,_0x70e308){return function(_0x820101){if(_0x820101){return _0x820101[_0xee2f('0x1e')]()[_0xee2f('0x1d')](function(){var _0x13013f=_0x820101[_0xee2f('0x1f')]({'plain':!![]});var _0x1e394f=_0xee2f('0x20');return db[_0xee2f('0x21')][_0xee2f('0x1e')]({'where':{'type':_0x1e394f,'resourceId':_0x13013f['id']}})[_0xee2f('0x1d')](function(){return _0x820101;});})['then'](function(){_0x15ceda['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x18bdbb,_0x18ff19){return function(_0x2cb0cb){if(!_0x2cb0cb){_0x18bdbb[_0xee2f('0x22')](0x194);}return _0x2cb0cb;};}function handleError(_0x892a4e,_0x3737fd){_0x3737fd=_0x3737fd||0x1f4;return function(_0x4d8398){logger[_0xee2f('0x23')](_0x4d8398['stack']);if(_0x4d8398[_0xee2f('0x24')]){delete _0x4d8398[_0xee2f('0x24')];}_0x892a4e[_0xee2f('0x12')](_0x3737fd)[_0xee2f('0x25')](_0x4d8398);};}exports[_0xee2f('0x26')]=function(_0x47d5a6,_0x310c0b){var _0xd16e35={},_0x56706e={},_0x4ee0e1={'count':0x0,'rows':[]};var _0xd1aaac=_['map'](db[_0xee2f('0x27')][_0xee2f('0x28')],function(_0x53d9b7){return{'name':_0x53d9b7[_0xee2f('0x29')],'type':_0x53d9b7['type']['key']};});_0x56706e['model']=_[_0xee2f('0x2a')](_0xd1aaac,_0xee2f('0x24'));_0x56706e['query']=_[_0xee2f('0x2b')](_0x47d5a6[_0xee2f('0x2c')]);_0x56706e[_0xee2f('0x2d')]=_[_0xee2f('0x2e')](_0x56706e[_0xee2f('0x2f')],_0x56706e['query']);_0xd16e35[_0xee2f('0x30')]=_['intersection'](_0x56706e[_0xee2f('0x2f')],qs[_0xee2f('0x31')](_0x47d5a6[_0xee2f('0x2c')]['fields']));_0xd16e35[_0xee2f('0x30')]=_0xd16e35['attributes'][_0xee2f('0x32')]?_0xd16e35['attributes']:_0x56706e[_0xee2f('0x2f')];if(!_0x47d5a6[_0xee2f('0x2c')][_0xee2f('0x33')](_0xee2f('0x34'))){_0xd16e35[_0xee2f('0x15')]=qs[_0xee2f('0x15')](_0x47d5a6[_0xee2f('0x2c')][_0xee2f('0x15')]);_0xd16e35[_0xee2f('0x14')]=qs[_0xee2f('0x14')](_0x47d5a6[_0xee2f('0x2c')]['offset']);}_0xd16e35[_0xee2f('0x35')]=qs['sort'](_0x47d5a6[_0xee2f('0x2c')][_0xee2f('0x36')]);_0xd16e35[_0xee2f('0x37')]=qs[_0xee2f('0x2d')](_[_0xee2f('0x38')](_0x47d5a6[_0xee2f('0x2c')],_0x56706e[_0xee2f('0x2d')]),_0xd1aaac);if(_0x47d5a6[_0xee2f('0x2c')]['filter']){_0xd16e35['where']=_['merge'](_0xd16e35[_0xee2f('0x37')],{'$or':_['map'](_0xd1aaac,function(_0x4501c4){if(_0x4501c4['type']!=='VIRTUAL'){var _0x5027a6={};_0x5027a6[_0x4501c4['name']]={'$like':'%'+_0x47d5a6[_0xee2f('0x2c')][_0xee2f('0x39')]+'%'};return _0x5027a6;}})});}_0xd16e35=_[_0xee2f('0x3a')]({},_0xd16e35,_0x47d5a6[_0xee2f('0x3b')]);var _0x4823a7={'where':_0xd16e35['where']};return db[_0xee2f('0x27')]['count'](_0x4823a7)['then'](function(_0x8204dc){_0x4ee0e1[_0xee2f('0x17')]=_0x8204dc;if(_0x47d5a6[_0xee2f('0x2c')]['includeAll']){_0xd16e35[_0xee2f('0x3c')]=[{'all':!![]}];}return db[_0xee2f('0x27')][_0xee2f('0x3d')](_0xd16e35);})['then'](function(_0x5896f6){_0x4ee0e1[_0xee2f('0x3e')]=_0x5896f6;return _0x4ee0e1;})[_0xee2f('0x1d')](respondWithFilteredResult(_0x310c0b,_0xd16e35))[_0xee2f('0x3f')](handleError(_0x310c0b,null));};exports[_0xee2f('0x40')]=function(_0x541fa0,_0x20697e){var _0x1df63d={'raw':!![],'where':{'id':_0x541fa0[_0xee2f('0x41')]['id']}},_0x242e91={};_0x242e91[_0xee2f('0x2f')]=_[_0xee2f('0x2b')](db[_0xee2f('0x27')][_0xee2f('0x28')]);_0x242e91[_0xee2f('0x2c')]=_[_0xee2f('0x2b')](_0x541fa0['query']);_0x242e91['filters']=_['intersection'](_0x242e91['model'],_0x242e91[_0xee2f('0x2c')]);_0x1df63d[_0xee2f('0x30')]=_[_0xee2f('0x2e')](_0x242e91[_0xee2f('0x2f')],qs[_0xee2f('0x31')](_0x541fa0['query'][_0xee2f('0x31')]));_0x1df63d[_0xee2f('0x30')]=_0x1df63d[_0xee2f('0x30')][_0xee2f('0x32')]?_0x1df63d['attributes']:_0x242e91['model'];if(_0x541fa0['query'][_0xee2f('0x42')]){_0x1df63d['include']=[{'all':!![]}];}_0x1df63d=_['merge']({},_0x1df63d,_0x541fa0['options']);return db['AnalyticDefaultReport'][_0xee2f('0x43')](_0x1df63d)[_0xee2f('0x1d')](handleEntityNotFound(_0x20697e,null))[_0xee2f('0x1d')](respondWithResult(_0x20697e,null))['catch'](handleError(_0x20697e,null));};exports[_0xee2f('0x44')]=function(_0x57f65d,_0x3d95b8){return db[_0xee2f('0x27')][_0xee2f('0x44')](_0x57f65d[_0xee2f('0x45')],{})[_0xee2f('0x1d')](function(_0x4978eb){var _0x533ad0=_0x57f65d[_0xee2f('0x46')]['get']({'plain':!![]});if(!_0x533ad0)throw new Error(_0xee2f('0x47'));if(_0x533ad0[_0xee2f('0x48')]===_0xee2f('0x46')){var _0x88e683=_0x4978eb['get']({'plain':!![]});var _0x5df503=_0xee2f('0x49');return db[_0xee2f('0x4a')][_0xee2f('0x43')]({'where':{'name':_0x5df503,'userProfileId':_0x533ad0[_0xee2f('0x4b')]},'raw':!![]})[_0xee2f('0x1d')](function(_0x2a450f){if(_0x2a450f&&_0x2a450f[_0xee2f('0x4c')]===0x0){return db[_0xee2f('0x21')][_0xee2f('0x44')]({'name':_0x88e683[_0xee2f('0x24')],'resourceId':_0x88e683['id'],'type':_0xee2f('0x20'),'sectionId':_0x2a450f['id']},{})[_0xee2f('0x1d')](function(){return _0x4978eb;});}else{return _0x4978eb;}})['catch'](function(_0x34cb51){logger[_0xee2f('0x23')](_0xee2f('0x4d'),_0x34cb51);throw _0x34cb51;});}return _0x4978eb;})[_0xee2f('0x1d')](respondWithResult(_0x3d95b8,0xc9))['catch'](handleError(_0x3d95b8,null));};exports[_0xee2f('0x4e')]=function(_0xb3bf3f,_0x3a476f){if(_0xb3bf3f[_0xee2f('0x45')]['id']){delete _0xb3bf3f[_0xee2f('0x45')]['id'];}return db['AnalyticDefaultReport'][_0xee2f('0x43')]({'where':{'id':_0xb3bf3f['params']['id']}})['then'](handleEntityNotFound(_0x3a476f,null))[_0xee2f('0x1d')](saveUpdates(_0xb3bf3f[_0xee2f('0x45')],null))[_0xee2f('0x1d')](respondWithResult(_0x3a476f,null))[_0xee2f('0x3f')](handleError(_0x3a476f,null));};exports[_0xee2f('0x1e')]=function(_0x101e09,_0x20aaca){return db['AnalyticDefaultReport'][_0xee2f('0x43')]({'where':{'id':_0x101e09[_0xee2f('0x41')]['id']}})[_0xee2f('0x1d')](handleEntityNotFound(_0x20aaca,null))[_0xee2f('0x1d')](removeEntity(_0x20aaca,null))[_0xee2f('0x3f')](handleError(_0x20aaca,null));};exports[_0xee2f('0x4f')]=function(_0xcba6fc,_0x2b9636){var _0x1373a1=0xa;var _0x5d6c40=[_0xee2f('0x50'),'left_join',_0xee2f('0x51'),_0xee2f('0x52')];var _0x1dbbf2={'SUM':_0xee2f('0x53'),'COUNT':_0xee2f('0x54'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xee2f('0x55'),'MIN':_0xee2f('0x56'),'AVG':_0xee2f('0x57'),'GROUP_CONCAT':_0xee2f('0x58'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x4fb159={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':_0xee2f('0x59'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0xee2f('0x5a')};var _0x1421da=function(_0xd967e9){return!_[_0xee2f('0x5b')]([_0xee2f('0x5c'),_0xee2f('0x5d'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0xd967e9);};var _0x1708c5=function(_0x58e464){if(!_0x58e464||!_0x58e464[_0xee2f('0x5e')]['length']){return'';}for(var _0x7167f9='(',_0x59af84=0x0;_0x59af84<_0x58e464[_0xee2f('0x5e')][_0xee2f('0x32')];_0x59af84+=0x1){_0x59af84>0x0&&(_0x7167f9+='\x20'+_0x58e464[_0xee2f('0x5f')]+'\x20');_0x7167f9+=_0x58e464['rules'][_0x59af84][_0xee2f('0x60')]?_0x1708c5(_0x58e464[_0xee2f('0x5e')][_0x59af84][_0xee2f('0x60')]):_0x58e464[_0xee2f('0x5e')][_0x59af84][_0xee2f('0x61')]+'\x20'+_0x58e464[_0xee2f('0x5e')][_0x59af84][_0xee2f('0x62')]+(_0x1421da(_0x58e464['rules'][_0x59af84][_0xee2f('0x62')])?'\x20'+_0x58e464[_0xee2f('0x5e')][_0x59af84][_0xee2f('0x63')]:'');}return _0x7167f9+')';};var _0x353bd9={'where':{'id':_0xcba6fc[_0xee2f('0x41')]['id']}},_0x5280c7,_0x3c9d47,_0x8ccc9d,_0x15c7ff,_0x191af8;_0x353bd9=_[_0xee2f('0x3a')]({},_0x353bd9,_0xcba6fc['options']);return db[_0xee2f('0x27')][_0xee2f('0x43')](_0x353bd9)['then'](function(_0x9252e3){if(_0x9252e3){_0x5280c7=_0x9252e3;return _0x9252e3['getFields']();}return null;})[_0xee2f('0x1d')](function(_0x4ed7c9){if(_0x4ed7c9){if(!_0x4ed7c9['length']){throw new db[(_0xee2f('0x64'))][(_0xee2f('0x65'))](_0xee2f('0x66'),0x193);}_0x3c9d47=_0x4ed7c9;return db[_0xee2f('0x67')][_0xee2f('0x3d')]({'raw':!![]});}return null;})['then'](function(_0x238e7d){if(_0x238e7d){_0x8ccc9d=_[_0xee2f('0x68')](_0x238e7d,'id');var _0x42fae8;var _0x5d4fe8=squel[_0xee2f('0x69')]();_0x5d4fe8[_0xee2f('0x6a')](_0x5280c7['table']);for(var _0x1f1c55=0x0;_0x1f1c55<_0x3c9d47[_0xee2f('0x32')];_0x1f1c55+=0x1){_0x42fae8=_0x3c9d47[_0x1f1c55][_0xee2f('0x6b')]?_0x8ccc9d[_0x3c9d47[_0x1f1c55][_0xee2f('0x6b')]][_0xee2f('0x6c')]:_0x3c9d47[_0x1f1c55][_0xee2f('0x61')];_0x42fae8=_0x3c9d47[_0x1f1c55][_0xee2f('0x6d')]?_[_0xee2f('0x6e')](_0x1dbbf2[_0x3c9d47[_0x1f1c55][_0xee2f('0x6d')]],'%s',_0x42fae8):_0x42fae8;_0x42fae8=_0x3c9d47[_0x1f1c55]['format']?_['replace'](_0x4fb159[_0x3c9d47[_0x1f1c55]['format']],'%s',_0x42fae8):_0x42fae8;if(_0x3c9d47[_0x1f1c55][_0xee2f('0x6f')]){_0x5d4fe8[_0xee2f('0x60')](_0x42fae8);}_0x3c9d47[_0x1f1c55][_0xee2f('0x70')]&&_0x5d4fe8[_0xee2f('0x35')](_0x42fae8,_0x3c9d47[_0x1f1c55][_0xee2f('0x70')]==='DESC'?![]:!![]);_0x5d4fe8[_0xee2f('0x61')](_0x42fae8,_0x3c9d47[_0x1f1c55][_0xee2f('0x71')]||_0x42fae8);}if(_0x5280c7['joins']){_0x5280c7[_0xee2f('0x72')]=JSON[_0xee2f('0x73')](_0x5280c7[_0xee2f('0x72')]);for(var _0x5a7b6c=0x0;_0x5a7b6c<_0x5280c7[_0xee2f('0x72')]['length'];_0x5a7b6c+=0x1){if(_0x5280c7[_0xee2f('0x72')][_0x5a7b6c][_0xee2f('0x74')]&&_['includes'](_0x5d6c40,_0x5280c7[_0xee2f('0x72')][_0x5a7b6c][_0xee2f('0x74')])&&_0x5280c7['joins'][_0x5a7b6c]['parentKey']&&_0x5280c7['joins'][_0x5a7b6c][_0xee2f('0x75')]&&_0x5280c7['joins'][_0x5a7b6c]['foreignKey']){_0x5d4fe8[_0x5280c7[_0xee2f('0x72')][_0x5a7b6c][_0xee2f('0x74')]](_0x5280c7['joins'][_0x5a7b6c][_0xee2f('0x75')],null,util['format'](_0xee2f('0x76'),_0x5280c7[_0xee2f('0x77')],_0x5280c7[_0xee2f('0x72')][_0x5a7b6c][_0xee2f('0x78')],_0x5280c7[_0xee2f('0x72')][_0x5a7b6c][_0xee2f('0x75')],_0x5280c7[_0xee2f('0x72')][_0x5a7b6c]['foreignKey']));}}}if(_0x5280c7[_0xee2f('0x79')]){_0x5280c7[_0xee2f('0x79')]=JSON[_0xee2f('0x73')](_0x5280c7[_0xee2f('0x79')]);_0x5d4fe8[_0xee2f('0x37')](_0x1708c5(_0x5280c7['conditions'][_0xee2f('0x60')]));}_0x191af8=_0x5d4fe8[_0xee2f('0x7a')]();_0x5d4fe8[_0xee2f('0x15')](_0x1373a1);_0x5d4fe8[_0xee2f('0x14')](0x0);logger[_0xee2f('0x7b')](_0xee2f('0x7c'),_0x5d4fe8['toString']());return dbH['sequelize'][_0xee2f('0x2c')](_0x5d4fe8[_0xee2f('0x7d')](),{'type':dbH[_0xee2f('0x7e')][_0xee2f('0x7f')][_0xee2f('0x80')]});}})[_0xee2f('0x1d')](respondWithResult(_0x2b9636,null))[_0xee2f('0x3f')](handleError(_0x2b9636,null));};function runReport(_0x58c49e,_0x5b7b55,_0x2ad26d){var _0x27eabc=_0x5b7b55[_0xee2f('0x24')];var _0xc92046=0xa;var _0x38ee46=[_0xee2f('0x50'),_0xee2f('0x81'),_0xee2f('0x51'),_0xee2f('0x52')];var _0x21ac2d={'SUM':_0xee2f('0x53'),'COUNT':_0xee2f('0x54'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0xee2f('0x56'),'AVG':'AVG(%s)','GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x2ea31f={'SEC_TO_TIME':_0xee2f('0x82'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xee2f('0x83'),'UNIX_TIMESTAMP':_0xee2f('0x5a')};var _0x18e191=function(_0x4fad8f){return!_['includes']([_0xee2f('0x5c'),_0xee2f('0x5d'),_0xee2f('0x84'),'IS\x20NOT\x20EMPTY'],_0x4fad8f);};var _0xd7c8f8=function(_0x4b0611){if(!_0x4b0611||!_0x4b0611[_0xee2f('0x5e')]['length']){return'';}for(var _0x378fc9='(',_0x25a3b9=0x0;_0x25a3b9<_0x4b0611[_0xee2f('0x5e')]['length'];_0x25a3b9+=0x1){_0x25a3b9>0x0&&(_0x378fc9+='\x20'+_0x4b0611['operator']+'\x20');_0x378fc9+=_0x4b0611[_0xee2f('0x5e')][_0x25a3b9][_0xee2f('0x60')]?_0xd7c8f8(_0x4b0611[_0xee2f('0x5e')][_0x25a3b9]['group']):_0x4b0611[_0xee2f('0x5e')][_0x25a3b9][_0xee2f('0x61')]+'\x20'+_0x4b0611[_0xee2f('0x5e')][_0x25a3b9][_0xee2f('0x62')]+(_0x18e191(_0x4b0611[_0xee2f('0x5e')][_0x25a3b9][_0xee2f('0x62')])?'\x20'+_0x4b0611[_0xee2f('0x5e')][_0x25a3b9][_0xee2f('0x63')]:'');}return _0x378fc9+')';};var _0x449656={'where':{'id':_0x58c49e['id']}},_0x1db0b5,_0x9f06f9,_0x659080,_0x28bde7,_0x214f94;_0x449656=_['merge']({},_0x449656,_0x2ad26d);return db[_0xee2f('0x27')][_0xee2f('0x43')](_0x449656)[_0xee2f('0x1d')](function(_0x2f5ed7){if(_0x2f5ed7){_0x1db0b5=_0x2f5ed7;return _0x2f5ed7[_0xee2f('0x85')]();}return null;})[_0xee2f('0x1d')](function(_0x34cd09){if(_0x34cd09){if(!_0x34cd09[_0xee2f('0x32')]){throw new db[(_0xee2f('0x64'))][(_0xee2f('0x65'))](_0xee2f('0x66'),0x193);}_0x9f06f9=_0x34cd09;return db['AnalyticMetric'][_0xee2f('0x3d')]({'raw':!![]});}return null;})[_0xee2f('0x1d')](function(_0x1422e9){if(_0x1422e9){_0x659080=_[_0xee2f('0x68')](_0x1422e9,'id');var _0x53d769;var _0x15ca4e=squel[_0xee2f('0x69')]();_0x15ca4e[_0xee2f('0x6a')](_0x1db0b5['table']);for(var _0x4f02aa=0x0;_0x4f02aa<_0x9f06f9[_0xee2f('0x32')];_0x4f02aa+=0x1){_0x53d769=_0x9f06f9[_0x4f02aa]['MetricId']?_0x659080[_0x9f06f9[_0x4f02aa]['MetricId']]['metric']:_0x9f06f9[_0x4f02aa][_0xee2f('0x61')];_0x53d769=_0x9f06f9[_0x4f02aa][_0xee2f('0x6d')]?_[_0xee2f('0x6e')](_0x21ac2d[_0x9f06f9[_0x4f02aa][_0xee2f('0x6d')]],'%s',_0x53d769):_0x53d769;_0x53d769=_0x9f06f9[_0x4f02aa]['format']?_[_0xee2f('0x6e')](_0x2ea31f[_0x9f06f9[_0x4f02aa][_0xee2f('0x86')]],'%s',_0x53d769):_0x53d769;if(_0x9f06f9[_0x4f02aa][_0xee2f('0x6f')]){_0x15ca4e['group'](_0x53d769);}_0x9f06f9[_0x4f02aa][_0xee2f('0x70')]&&_0x15ca4e['order'](_0x53d769,_0x9f06f9[_0x4f02aa][_0xee2f('0x70')]==='DESC'?![]:!![]);_0x15ca4e['field'](_0x53d769,_0x9f06f9[_0x4f02aa][_0xee2f('0x71')]||_0x53d769);}if(_0x1db0b5['joins']){_0x1db0b5[_0xee2f('0x72')]=JSON['parse'](_0x1db0b5['joins']);for(var _0x149d7f=0x0;_0x149d7f<_0x1db0b5[_0xee2f('0x72')]['length'];_0x149d7f+=0x1){if(_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x74')]&&_['includes'](_0x38ee46,_0x1db0b5['joins'][_0x149d7f][_0xee2f('0x74')])&&_0x1db0b5[_0xee2f('0x72')][_0x149d7f]['parentKey']&&_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x75')]&&_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x87')]){_0x15ca4e[_0x1db0b5[_0xee2f('0x72')][_0x149d7f]['type']](_0x1db0b5['joins'][_0x149d7f]['foreignTable'],null,util[_0xee2f('0x86')](_0xee2f('0x76'),_0x1db0b5[_0xee2f('0x77')],_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x78')],_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x75')],_0x1db0b5[_0xee2f('0x72')][_0x149d7f][_0xee2f('0x87')]));}}}if(_0x1db0b5[_0xee2f('0x79')]){_0x1db0b5[_0xee2f('0x79')]=JSON[_0xee2f('0x73')](_0x1db0b5[_0xee2f('0x79')]);_0x15ca4e[_0xee2f('0x37')](_0xd7c8f8(_0x1db0b5[_0xee2f('0x79')][_0xee2f('0x60')]));}_0x214f94=_0x15ca4e['clone']();_0x15ca4e['limit'](_0xc92046);_0x15ca4e[_0xee2f('0x14')](0x0);return;}})[_0xee2f('0x1d')](function(){if(_0x5b7b55['output']===_0xee2f('0x88')){return null;}var _0x444c39=_[_0xee2f('0x3a')](_0x5b7b55,{'name':_0x5b7b55['fullPath']||_0x5b7b55[_0xee2f('0x24')]||_0x1db0b5[_0xee2f('0x24')],'basename':_0x27eabc,'savename':util[_0xee2f('0x86')](_0xee2f('0x89'),_0x5b7b55[_0xee2f('0x24')]||_0x1db0b5[_0xee2f('0x24')],require(_0xee2f('0x8a'))[_0xee2f('0x8b')](0x4),_0x5b7b55[_0xee2f('0x8c')]||'csv'),'reportId':_0x1db0b5['id'],'reportType':_0xee2f('0x8d')});return db[_0xee2f('0x8e')][_0xee2f('0x44')](_0x444c39,{'raw':!![]});})[_0xee2f('0x1d')](function(_0xe7e196){if(_0x1db0b5[_0xee2f('0x77')]===_0xee2f('0x8f')){_0x214f94[_0xee2f('0x37')](_0x1db0b5['table']+_0xee2f('0x90'),_0x5b7b55[_0xee2f('0x91')],_0x5b7b55['endDate']);}else{_0x214f94[_0xee2f('0x37')](_0x1db0b5['table']+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x5b7b55[_0xee2f('0x91')],_0x5b7b55[_0xee2f('0x92')]);}if(_0xe7e196){logger[_0xee2f('0x93')](_0xee2f('0x94'),_0x214f94[_0xee2f('0x7d')]());require(_0xee2f('0x95'))['fork'](path[_0xee2f('0x50')](__dirname,_0xee2f('0x96'),_0xe7e196['output']),[_0xe7e196['id'],_0x214f94[_0xee2f('0x7d')](),path[_0xee2f('0x50')](__dirname,'../../files/reports',_0xe7e196[_0xee2f('0x97')]),_0x27eabc]);return _0xe7e196;}else{var _0x26dd6c=squel[_0xee2f('0x69')]();_0x26dd6c[_0xee2f('0x6a')]('('+_0x214f94[_0xee2f('0x7d')]()+')',_0xee2f('0x98'));_0x26dd6c[_0xee2f('0x61')](_0xee2f('0x99'),_0xee2f('0x17'));_0x214f94[_0xee2f('0x15')](_0x5b7b55[_0xee2f('0x15')]||_0xc92046);_0x214f94[_0xee2f('0x14')](_0x5b7b55['offset']||0x0);return dbH[_0xee2f('0x7e')]['query'](_0x26dd6c['toString'](),{'type':dbH['sequelize'][_0xee2f('0x7f')]['SELECT']})[_0xee2f('0x1d')](function(_0x472f83){if(!_0x472f83[_0xee2f('0x32')]){_0x28bde7=0x0;}else{_0x28bde7=_0x472f83[0x0]['count']||0x0;}return dbH[_0xee2f('0x7e')][_0xee2f('0x2c')](_0x214f94['toString'](),{'type':dbH[_0xee2f('0x7e')][_0xee2f('0x7f')][_0xee2f('0x80')]});})[_0xee2f('0x1d')](function(_0x121a34){return{'rows':_0x121a34||[],'count':_0x28bde7};});}});}exports[_0xee2f('0x9a')]=function(_0x3d8c56,_0x5c8550){return runReport(_0x3d8c56[_0xee2f('0x41')],_0x3d8c56[_0xee2f('0x2c')],_0x3d8c56['options'])[_0xee2f('0x1d')](respondWithResult(_0x5c8550,null))[_0xee2f('0x3f')](handleError(_0x5c8550,null));};exports[_0xee2f('0x9b')]=runReport;exports['query']=function(_0x40fa57,_0x1fafcc){var _0x1163f1=0xa;var _0x162014=[_0xee2f('0x50'),_0xee2f('0x81'),'right_join',_0xee2f('0x52')];var _0xb93091={'SUM':_0xee2f('0x53'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xee2f('0x55'),'MIN':'MIN(%s)','AVG':_0xee2f('0x57'),'GROUP_CONCAT':_0xee2f('0x58'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xee2f('0x9c')};var _0x39922f={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':_0xee2f('0x59'),'ROUND':_0xee2f('0x83'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x1c9f70=function(_0xa93dc9){return!_[_0xee2f('0x5b')]([_0xee2f('0x5c'),'IS\x20NOT\x20NULL',_0xee2f('0x84'),_0xee2f('0x9d')],_0xa93dc9);};var _0x44b06b=function(_0x541ac7){if(!_0x541ac7||!_0x541ac7[_0xee2f('0x5e')][_0xee2f('0x32')]){return'';}for(var _0xa89897='(',_0x2def5c=0x0;_0x2def5c<_0x541ac7['rules']['length'];_0x2def5c+=0x1){_0x2def5c>0x0&&(_0xa89897+='\x20'+_0x541ac7[_0xee2f('0x5f')]+'\x20');_0xa89897+=_0x541ac7[_0xee2f('0x5e')][_0x2def5c][_0xee2f('0x60')]?_0x44b06b(_0x541ac7['rules'][_0x2def5c][_0xee2f('0x60')]):_0x541ac7[_0xee2f('0x5e')][_0x2def5c]['field']+'\x20'+_0x541ac7[_0xee2f('0x5e')][_0x2def5c][_0xee2f('0x62')]+(_0x1c9f70(_0x541ac7[_0xee2f('0x5e')][_0x2def5c][_0xee2f('0x62')])?'\x20'+_0x541ac7[_0xee2f('0x5e')][_0x2def5c][_0xee2f('0x63')]:'');}return _0xa89897+')';};var _0x3f9188={'where':{'id':_0x40fa57['params']['id']}},_0x236b63,_0x4ad336,_0x3370de,_0x3c8c20,_0xc9228;_0x3f9188=_[_0xee2f('0x3a')]({},_0x3f9188,_0x40fa57[_0xee2f('0x3b')]);return db[_0xee2f('0x27')][_0xee2f('0x43')](_0x3f9188)[_0xee2f('0x1d')](function(_0xa0dfdd){if(_0xa0dfdd){_0x236b63=_0xa0dfdd;return _0xa0dfdd[_0xee2f('0x85')]();}return null;})[_0xee2f('0x1d')](function(_0x298dfa){if(_0x298dfa){if(!_0x298dfa[_0xee2f('0x32')]){throw new db[(_0xee2f('0x64'))][(_0xee2f('0x65'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x4ad336=_0x298dfa;return db[_0xee2f('0x67')]['findAll']({'raw':!![]});}return null;})[_0xee2f('0x1d')](function(_0x35a1c9){if(_0x35a1c9){_0x3370de=_['keyBy'](_0x35a1c9,'id');var _0x464e9e;var _0x738f35=squel[_0xee2f('0x69')]();_0x738f35[_0xee2f('0x6a')](_0x236b63[_0xee2f('0x77')]);for(var _0xe24a8a=0x0;_0xe24a8a<_0x4ad336['length'];_0xe24a8a+=0x1){_0x464e9e=_0x4ad336[_0xe24a8a][_0xee2f('0x6b')]?_0x3370de[_0x4ad336[_0xe24a8a][_0xee2f('0x6b')]][_0xee2f('0x6c')]:_0x4ad336[_0xe24a8a][_0xee2f('0x61')];_0x464e9e=_0x4ad336[_0xe24a8a][_0xee2f('0x6d')]?_[_0xee2f('0x6e')](_0xb93091[_0x4ad336[_0xe24a8a][_0xee2f('0x6d')]],'%s',_0x464e9e):_0x464e9e;_0x464e9e=_0x4ad336[_0xe24a8a][_0xee2f('0x86')]?_[_0xee2f('0x6e')](_0x39922f[_0x4ad336[_0xe24a8a][_0xee2f('0x86')]],'%s',_0x464e9e):_0x464e9e;if(_0x4ad336[_0xe24a8a]['groupBy']){_0x738f35[_0xee2f('0x60')](_0x464e9e);}_0x4ad336[_0xe24a8a][_0xee2f('0x70')]&&_0x738f35[_0xee2f('0x35')](_0x464e9e,_0x4ad336[_0xe24a8a]['orderBy']==='DESC'?![]:!![]);_0x738f35[_0xee2f('0x61')](_0x464e9e,_0x4ad336[_0xe24a8a][_0xee2f('0x71')]||_0x464e9e);}if(_0x236b63[_0xee2f('0x72')]){_0x236b63[_0xee2f('0x72')]=JSON[_0xee2f('0x73')](_0x236b63['joins']);for(var _0x1cee16=0x0;_0x1cee16<_0x236b63[_0xee2f('0x72')]['length'];_0x1cee16+=0x1){if(_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x74')]&&_[_0xee2f('0x5b')](_0x162014,_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x74')])&&_0x236b63[_0xee2f('0x72')][_0x1cee16]['parentKey']&&_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x75')]&&_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x87')]){_0x738f35[_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x74')]](_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x75')],null,util[_0xee2f('0x86')](_0xee2f('0x76'),_0x236b63[_0xee2f('0x77')],_0x236b63['joins'][_0x1cee16][_0xee2f('0x78')],_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x75')],_0x236b63[_0xee2f('0x72')][_0x1cee16][_0xee2f('0x87')]));}}}if(_0x236b63[_0xee2f('0x79')]){_0x236b63['conditions']=JSON[_0xee2f('0x73')](_0x236b63[_0xee2f('0x79')]);_0x738f35[_0xee2f('0x37')](_0x44b06b(_0x236b63[_0xee2f('0x79')]['group']));}_0xc9228=_0x738f35[_0xee2f('0x7a')]();_0x738f35[_0xee2f('0x15')](_0x1163f1);_0x738f35[_0xee2f('0x14')](0x0);logger[_0xee2f('0x7b')](_0xee2f('0x7c'),_0x738f35[_0xee2f('0x7d')]());return dbH[_0xee2f('0x7e')][_0xee2f('0x2c')](_0x738f35['toString'](),{'type':dbH['sequelize'][_0xee2f('0x7f')][_0xee2f('0x80')]});}})[_0xee2f('0x1d')](function(){return{'sql':_0xc9228['toString']()};})[_0xee2f('0x1d')](respondWithResult(_0x1fafcc,null))['catch'](handleError(_0x1fafcc,null));}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js index 04407e3..14b3684 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 _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 +var _0xde05=['analytics_default_reports','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','exports','AnalyticDefaultReport'];(function(_0x3fc51b,_0x5b2bbf){var _0x3a5937=function(_0x4fbc7c){while(--_0x4fbc7c){_0x3fc51b['push'](_0x3fc51b['shift']());}};_0x3a5937(++_0x5b2bbf);}(_0xde05,0xc1));var _0x5de0=function(_0xcf5635,_0x538a9e){_0xcf5635=_0xcf5635-0x0;var _0x11989f=_0xde05[_0xcf5635];return _0x11989f;};'use strict';var _=require(_0x5de0('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x5de0('0x1'));var moment=require(_0x5de0('0x2'));var BPromise=require(_0x5de0('0x3'));var rp=require(_0x5de0('0x4'));var fs=require('fs');var path=require(_0x5de0('0x5'));var rimraf=require(_0x5de0('0x6'));var config=require(_0x5de0('0x7'));var attributes=require(_0x5de0('0x8'));module[_0x5de0('0x9')]=function(_0x57c732,_0x2ba42e){return _0x57c732['define'](_0x5de0('0xa'),attributes,{'tableName':_0x5de0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js index f914279..674c394 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 _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 +var _0x1a9e=['../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x432259,_0x23fdba){var _0x47b232=function(_0x57f178){while(--_0x57f178){_0x432259['push'](_0x432259['shift']());}};_0x47b232(++_0x23fdba);}(_0x1a9e,0xf7));var _0xe1a9=function(_0x3e9915,_0x3b1c47){_0x3e9915=_0x3e9915-0x0;var _0x854fc6=_0x1a9e[_0x3e9915];return _0x854fc6;};'use strict';var _=require('lodash');var util=require(_0xe1a9('0x0'));var moment=require(_0xe1a9('0x1'));var BPromise=require(_0xe1a9('0x2'));var rs=require(_0xe1a9('0x3'));var fs=require('fs');var Redis=require(_0xe1a9('0x4'));var db=require(_0xe1a9('0x5'))['db'];var utils=require(_0xe1a9('0x6'));var logger=require('../../config/logger')(_0xe1a9('0x7'));var config=require(_0xe1a9('0x8'));var jayson=require(_0xe1a9('0x9'));var client=jayson[_0xe1a9('0xa')][_0xe1a9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1c404d,_0x2c7d53,_0x4265a0){return new BPromise(function(_0x370d50,_0x1be2de){return client[_0xe1a9('0xc')](_0x1c404d,_0x4265a0)['then'](function(_0x2eeb04){logger[_0xe1a9('0xd')](_0xe1a9('0xe'),_0x2c7d53,_0xe1a9('0xf'));logger[_0xe1a9('0x10')](_0xe1a9('0x11'),_0x2c7d53,_0xe1a9('0xf'),JSON['stringify'](_0x2eeb04));if(_0x2eeb04[_0xe1a9('0x12')]){if(_0x2eeb04['error'][_0xe1a9('0x13')]===0x1f4){logger[_0xe1a9('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2c7d53,_0x2eeb04['error'][_0xe1a9('0x14')]);return _0x1be2de(_0x2eeb04[_0xe1a9('0x12')][_0xe1a9('0x14')]);}logger[_0xe1a9('0x12')](_0xe1a9('0xe'),_0x2c7d53,_0x2eeb04[_0xe1a9('0x12')]['message']);return _0x370d50(_0x2eeb04[_0xe1a9('0x12')][_0xe1a9('0x14')]);}else{logger[_0xe1a9('0xd')](_0xe1a9('0xe'),_0x2c7d53,'request\x20sent');_0x370d50(_0x2eeb04[_0xe1a9('0x15')][_0xe1a9('0x14')]);}})[_0xe1a9('0x16')](function(_0x4ab1bc){logger[_0xe1a9('0x12')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2c7d53,_0x4ab1bc);_0x1be2de(_0x4ab1bc);});});} \ No newline at end of file diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js index d001b7c..faa00d4 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 _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 +var _0x193c=['create','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','index','/:id','isAuthenticated','preview','run','/:id/query','query','post'];(function(_0x44e32b,_0x4d1915){var _0x117c4e=function(_0x2a8b74){while(--_0x2a8b74){_0x44e32b['push'](_0x44e32b['shift']());}};_0x117c4e(++_0x4d1915);}(_0x193c,0x1e0));var _0xc193=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x193c[_0x167cc1];return _0x10bc4b;};'use strict';var multer=require(_0xc193('0x0'));var util=require(_0xc193('0x1'));var path=require(_0xc193('0x2'));var timeout=require(_0xc193('0x3'));var express=require(_0xc193('0x4'));var router=express[_0xc193('0x5')]();var fs_extra=require(_0xc193('0x6'));var auth=require(_0xc193('0x7'));var interaction=require(_0xc193('0x8'));var config=require(_0xc193('0x9'));var controller=require(_0xc193('0xa'));router[_0xc193('0xb')]('/',auth['isAuthenticated'](),controller[_0xc193('0xc')]);router['get'](_0xc193('0xd'),auth[_0xc193('0xe')](),controller['show']);router[_0xc193('0xb')]('/:id/preview',auth[_0xc193('0xe')](),controller[_0xc193('0xf')]);router[_0xc193('0xb')]('/:id/run',auth['isAuthenticated'](),controller[_0xc193('0x10')]);router[_0xc193('0xb')](_0xc193('0x11'),auth[_0xc193('0xe')](),controller[_0xc193('0x12')]);router[_0xc193('0x13')]('/',auth['isAuthenticated'](),controller[_0xc193('0x14')]);router[_0xc193('0x15')]('/:id',auth[_0xc193('0xe')](),controller[_0xc193('0x16')]);router[_0xc193('0x17')](_0xc193('0xd'),auth[_0xc193('0xe')](),controller[_0xc193('0x18')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js index b8d0973..3b41546 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 _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 +var _0x5353=['scheduled','INTEGER','UNSIGNED','sequelize','exports','STRING','ENUM','csv','pdf','xlsx','DATE','manual'];(function(_0x34bc6c,_0x10d089){var _0x168820=function(_0xb058d9){while(--_0xb058d9){_0x34bc6c['push'](_0x34bc6c['shift']());}};_0x168820(++_0x10d089);}(_0x5353,0x12f));var _0x3535=function(_0x48dac9,_0xed2d9c){_0x48dac9=_0x48dac9-0x0;var _0x5348fe=_0x5353[_0x48dac9];return _0x5348fe;};'use strict';var Sequelize=require(_0x3535('0x0'));var moment=require('moment');module[_0x3535('0x1')]={'name':{'type':Sequelize[_0x3535('0x2')],'allowNull':![]},'basename':{'type':Sequelize[_0x3535('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0x3535('0x3')](_0x3535('0x4'),_0x3535('0x5'),_0x3535('0x6')),'allowNull':![],'defaultValue':_0x3535('0x4')},'savename':{'type':Sequelize[_0x3535('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0x3535('0x7')]},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize[_0x3535('0x2')],'defaultValue':'Loading'},'type':{'type':Sequelize[_0x3535('0x3')](_0x3535('0x8'),_0x3535('0x9')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0x3535('0xa')](0xb)[_0x3535('0xb')]},'reportType':{'type':Sequelize[_0x3535('0x2')]}}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js index da92367..e601fe3 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 _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 +var _0xd687=['merge','type','include','findAll','rows','catch','show','params','includeAll','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','download','output','existsSync','join','root','server/files/reports','savename','Sequelize','ValidationError','%s.%s','basename','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','reject','update','then','destroy','get','ExtractedReports','UserProfileResource','error','stack','name','index','map','AnalyticExtractedReport','rawAttributes','fieldName','key','query','keys','filters','intersection','model','fields','attributes','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter'];(function(_0xbf4647,_0x2e5f9d){var _0x5baf81=function(_0x4d2123){while(--_0x4d2123){_0xbf4647['push'](_0xbf4647['shift']());}};_0x5baf81(++_0x2e5f9d);}(_0xd687,0x193));var _0x7d68=function(_0x4b432a,_0x578c42){_0x4b432a=_0x4b432a-0x0;var _0x505158=_0xd687[_0x4b432a];return _0x505158;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7d68('0x0'));var zipdir=require(_0x7d68('0x1'));var jsonpatch=require(_0x7d68('0x2'));var rp=require(_0x7d68('0x3'));var moment=require(_0x7d68('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x7d68('0x5'));var util=require(_0x7d68('0x6'));var path=require(_0x7d68('0x7'));var sox=require(_0x7d68('0x8'));var csv=require('to-csv');var ejs=require(_0x7d68('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7d68('0xa'));var squel=require(_0x7d68('0xb'));var crypto=require(_0x7d68('0xc'));var jsforce=require(_0x7d68('0xd'));var deskjs=require(_0x7d68('0xe'));var toCsv=require('to-csv');var querystring=require(_0x7d68('0xf'));var Papa=require(_0x7d68('0x10'));var Redis=require(_0x7d68('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7d68('0x12'));var logger=require(_0x7d68('0x13'))('api');var utils=require(_0x7d68('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x7d68('0x15'))['db'];function respondWithStatusCode(_0x5ad527,_0x229918){_0x229918=_0x229918||0xcc;return function(_0x199e9a){if(_0x199e9a){return _0x5ad527[_0x7d68('0x16')](_0x229918);}return _0x5ad527[_0x7d68('0x17')](_0x229918)[_0x7d68('0x18')]();};}function respondWithResult(_0x15a28c,_0x4d9408){_0x4d9408=_0x4d9408||0xc8;return function(_0x400a33){if(_0x400a33){return _0x15a28c['status'](_0x4d9408)[_0x7d68('0x19')](_0x400a33);}};}function respondWithFilteredResult(_0x37477c,_0x455540){return function(_0x4d5fdb){if(_0x4d5fdb){var _0x2f7763=typeof _0x455540[_0x7d68('0x1a')]===_0x7d68('0x1b')&&typeof _0x455540['limit']===_0x7d68('0x1b');var _0x1d8ef0=_0x4d5fdb[_0x7d68('0x1c')];var _0x2d7833=_0x2f7763?0x0:_0x455540[_0x7d68('0x1a')];var _0xf747a9=_0x2f7763?_0x4d5fdb[_0x7d68('0x1c')]:_0x455540[_0x7d68('0x1a')]+_0x455540['limit'];var _0x561a02;if(_0xf747a9>=_0x1d8ef0){_0xf747a9=_0x1d8ef0;_0x561a02=0xc8;}else{_0x561a02=0xce;}_0x37477c[_0x7d68('0x17')](_0x561a02);return _0x37477c[_0x7d68('0x1d')](_0x7d68('0x1e'),_0x2d7833+'-'+_0xf747a9+'/'+_0x1d8ef0)[_0x7d68('0x19')](_0x4d5fdb);}return null;};}function patchUpdates(_0x12d838){return function(_0x429671){try{jsonpatch['apply'](_0x429671,_0x12d838,!![]);}catch(_0x2dcb3b){return BPromise[_0x7d68('0x1f')](_0x2dcb3b);}return _0x429671['save']();};}function saveUpdates(_0x1c2d31,_0x120fdd){return function(_0xc74a23){if(_0xc74a23){return _0xc74a23[_0x7d68('0x20')](_0x1c2d31)[_0x7d68('0x21')](function(_0x59e6cb){return _0x59e6cb;});}return null;};}function removeEntity(_0x4b31c3,_0x39afa7){return function(_0x44d7fd){if(_0x44d7fd){return _0x44d7fd[_0x7d68('0x22')]()[_0x7d68('0x21')](function(){var _0x4dfaa5=_0x44d7fd[_0x7d68('0x23')]({'plain':!![]});var _0x4c30e2=_0x7d68('0x24');return db[_0x7d68('0x25')][_0x7d68('0x22')]({'where':{'type':_0x4c30e2,'resourceId':_0x4dfaa5['id']}})[_0x7d68('0x21')](function(){return _0x44d7fd;});})[_0x7d68('0x21')](function(){_0x4b31c3[_0x7d68('0x17')](0xcc)[_0x7d68('0x18')]();});}};}function handleEntityNotFound(_0x3e47fc,_0x27a2e2){return function(_0x47b300){if(!_0x47b300){_0x3e47fc['sendStatus'](0x194);}return _0x47b300;};}function handleError(_0xf6f7ad,_0x5387fd){_0x5387fd=_0x5387fd||0x1f4;return function(_0x5221d8){logger[_0x7d68('0x26')](_0x5221d8[_0x7d68('0x27')]);if(_0x5221d8[_0x7d68('0x28')]){delete _0x5221d8[_0x7d68('0x28')];}_0xf6f7ad[_0x7d68('0x17')](_0x5387fd)['send'](_0x5221d8);};}exports[_0x7d68('0x29')]=function(_0x317ae3,_0x575d3d){var _0x4df561={},_0x24829f={},_0xdda5b1={'count':0x0,'rows':[]};var _0x189771=_[_0x7d68('0x2a')](db[_0x7d68('0x2b')][_0x7d68('0x2c')],function(_0x14cde5){return{'name':_0x14cde5[_0x7d68('0x2d')],'type':_0x14cde5['type'][_0x7d68('0x2e')]};});_0x24829f['model']=_[_0x7d68('0x2a')](_0x189771,_0x7d68('0x28'));_0x24829f[_0x7d68('0x2f')]=_[_0x7d68('0x30')](_0x317ae3['query']);_0x24829f[_0x7d68('0x31')]=_[_0x7d68('0x32')](_0x24829f[_0x7d68('0x33')],_0x24829f[_0x7d68('0x2f')]);_0x4df561['attributes']=_[_0x7d68('0x32')](_0x24829f[_0x7d68('0x33')],qs['fields'](_0x317ae3[_0x7d68('0x2f')][_0x7d68('0x34')]));_0x4df561[_0x7d68('0x35')]=_0x4df561['attributes']['length']?_0x4df561[_0x7d68('0x35')]:_0x24829f[_0x7d68('0x33')];if(!_0x317ae3['query'][_0x7d68('0x36')](_0x7d68('0x37'))){_0x4df561[_0x7d68('0x38')]=qs[_0x7d68('0x38')](_0x317ae3[_0x7d68('0x2f')][_0x7d68('0x38')]);_0x4df561[_0x7d68('0x1a')]=qs[_0x7d68('0x1a')](_0x317ae3['query'][_0x7d68('0x1a')]);}_0x4df561[_0x7d68('0x39')]=qs['sort'](_0x317ae3['query'][_0x7d68('0x3a')]);_0x4df561[_0x7d68('0x3b')]=qs[_0x7d68('0x31')](_[_0x7d68('0x3c')](_0x317ae3[_0x7d68('0x2f')],_0x24829f[_0x7d68('0x31')]),_0x189771);if(_0x317ae3[_0x7d68('0x2f')][_0x7d68('0x3d')]){_0x4df561[_0x7d68('0x3b')]=_[_0x7d68('0x3e')](_0x4df561[_0x7d68('0x3b')],{'$or':_[_0x7d68('0x2a')](_0x189771,function(_0x2e89f1){if(_0x2e89f1[_0x7d68('0x3f')]!=='VIRTUAL'){var _0x5578f2={};_0x5578f2[_0x2e89f1[_0x7d68('0x28')]]={'$like':'%'+_0x317ae3[_0x7d68('0x2f')][_0x7d68('0x3d')]+'%'};return _0x5578f2;}})});}_0x4df561=_[_0x7d68('0x3e')]({},_0x4df561,_0x317ae3['options']);var _0x4822e4={'where':_0x4df561['where']};return db[_0x7d68('0x2b')][_0x7d68('0x1c')](_0x4822e4)[_0x7d68('0x21')](function(_0x9fe927){_0xdda5b1[_0x7d68('0x1c')]=_0x9fe927;if(_0x317ae3['query']['includeAll']){_0x4df561[_0x7d68('0x40')]=[{'all':!![]}];}return db[_0x7d68('0x2b')][_0x7d68('0x41')](_0x4df561);})[_0x7d68('0x21')](function(_0x37963e){_0xdda5b1[_0x7d68('0x42')]=_0x37963e;return _0xdda5b1;})['then'](respondWithFilteredResult(_0x575d3d,_0x4df561))[_0x7d68('0x43')](handleError(_0x575d3d,null));};exports[_0x7d68('0x44')]=function(_0x4d1c48,_0x149130){var _0xfd70fa={'raw':!![],'where':{'id':_0x4d1c48[_0x7d68('0x45')]['id']}},_0x2fffee={};_0x2fffee[_0x7d68('0x33')]=_[_0x7d68('0x30')](db['AnalyticExtractedReport'][_0x7d68('0x2c')]);_0x2fffee[_0x7d68('0x2f')]=_[_0x7d68('0x30')](_0x4d1c48[_0x7d68('0x2f')]);_0x2fffee[_0x7d68('0x31')]=_[_0x7d68('0x32')](_0x2fffee[_0x7d68('0x33')],_0x2fffee[_0x7d68('0x2f')]);_0xfd70fa[_0x7d68('0x35')]=_[_0x7d68('0x32')](_0x2fffee[_0x7d68('0x33')],qs['fields'](_0x4d1c48['query'][_0x7d68('0x34')]));_0xfd70fa[_0x7d68('0x35')]=_0xfd70fa[_0x7d68('0x35')]['length']?_0xfd70fa[_0x7d68('0x35')]:_0x2fffee['model'];if(_0x4d1c48[_0x7d68('0x2f')][_0x7d68('0x46')]){_0xfd70fa[_0x7d68('0x40')]=[{'all':!![]}];}_0xfd70fa=_['merge']({},_0xfd70fa,_0x4d1c48[_0x7d68('0x47')]);return db['AnalyticExtractedReport'][_0x7d68('0x48')](_0xfd70fa)[_0x7d68('0x21')](handleEntityNotFound(_0x149130,null))['then'](respondWithResult(_0x149130,null))['catch'](handleError(_0x149130,null));};exports[_0x7d68('0x49')]=function(_0x325a78,_0xb89986){return db[_0x7d68('0x2b')][_0x7d68('0x49')](_0x325a78['body'],{})[_0x7d68('0x21')](function(_0x727f27){var _0x2d09da=_0x325a78[_0x7d68('0x4a')][_0x7d68('0x23')]({'plain':!![]});if(!_0x2d09da)throw new Error(_0x7d68('0x4b'));if(_0x2d09da[_0x7d68('0x4c')]===_0x7d68('0x4a')){var _0xd3e5e5=_0x727f27[_0x7d68('0x23')]({'plain':!![]});var _0x128c5b=_0x7d68('0x24');return db[_0x7d68('0x4d')][_0x7d68('0x48')]({'where':{'name':_0x128c5b,'userProfileId':_0x2d09da[_0x7d68('0x4e')]},'raw':!![]})[_0x7d68('0x21')](function(_0x2a6448){if(_0x2a6448&&_0x2a6448[_0x7d68('0x4f')]===0x0){return db['UserProfileResource'][_0x7d68('0x49')]({'name':_0xd3e5e5[_0x7d68('0x28')],'resourceId':_0xd3e5e5['id'],'type':_0x2a6448[_0x7d68('0x28')],'sectionId':_0x2a6448['id']},{})['then'](function(){return _0x727f27;});}else{return _0x727f27;}})[_0x7d68('0x43')](function(_0x3e5c89){logger[_0x7d68('0x26')](_0x7d68('0x50'),_0x3e5c89);throw _0x3e5c89;});}return _0x727f27;})[_0x7d68('0x21')](respondWithResult(_0xb89986,0xc9))[_0x7d68('0x43')](handleError(_0xb89986,null));};exports['update']=function(_0xdf6ac2,_0x49b67b){if(_0xdf6ac2[_0x7d68('0x51')]['id']){delete _0xdf6ac2['body']['id'];}return db[_0x7d68('0x2b')]['find']({'where':{'id':_0xdf6ac2[_0x7d68('0x45')]['id']}})[_0x7d68('0x21')](handleEntityNotFound(_0x49b67b,null))[_0x7d68('0x21')](saveUpdates(_0xdf6ac2[_0x7d68('0x51')],null))[_0x7d68('0x21')](respondWithResult(_0x49b67b,null))[_0x7d68('0x43')](handleError(_0x49b67b,null));};exports['destroy']=function(_0x7c6c50,_0x3ad9e5){return db[_0x7d68('0x2b')][_0x7d68('0x48')]({'where':{'id':_0x7c6c50['params']['id']}})[_0x7d68('0x21')](handleEntityNotFound(_0x3ad9e5,null))[_0x7d68('0x21')](removeEntity(_0x3ad9e5,null))[_0x7d68('0x43')](handleError(_0x3ad9e5,null));};exports[_0x7d68('0x52')]=function(_0x1c87c3,_0x52cd91,_0x4b69aa){return db[_0x7d68('0x2b')][_0x7d68('0x48')]({'where':{'id':_0x1c87c3['params']['id']},'attributes':['name','basename','savename',_0x7d68('0x53')],'raw':!![]})[_0x7d68('0x21')](handleEntityNotFound(_0x52cd91,null))[_0x7d68('0x21')](function(_0x36f793){if(_0x36f793){if(!fs[_0x7d68('0x54')](path[_0x7d68('0x55')](config[_0x7d68('0x56')],_0x7d68('0x57'),_0x36f793[_0x7d68('0x58')]))){throw new db[(_0x7d68('0x59'))][(_0x7d68('0x5a'))]('Report\x20not\x20found\x20or\x20empty');}if(_0x1c87c3[_0x7d68('0x2f')]['exists']){return _0x52cd91[_0x7d68('0x16')](0xc8);}return _0x52cd91[_0x7d68('0x52')](path['join'](config['root'],_0x7d68('0x57'),_0x36f793[_0x7d68('0x58')]),util['format'](_0x7d68('0x5b'),_0x36f793[_0x7d68('0x5c')]||_0x36f793['name'],_0x36f793[_0x7d68('0x53')]['toLowerCase']()));}})['catch'](handleError(_0x52cd91,null));}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js index b271442..537f39f 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 _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 +var _0xefc1=['lodash','../../config/logger','api','request-promise','path','rimraf','../../config/environment','exports','analytics_extracted_reports'];(function(_0x55c00d,_0x520cb6){var _0x254a8f=function(_0x2b3378){while(--_0x2b3378){_0x55c00d['push'](_0x55c00d['shift']());}};_0x254a8f(++_0x520cb6);}(_0xefc1,0x7e));var _0x1efc=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0xefc1[_0x618414];return _0x21c19a;};'use strict';var _=require(_0x1efc('0x0'));var util=require('util');var logger=require(_0x1efc('0x1'))(_0x1efc('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x1efc('0x3'));var fs=require('fs');var path=require(_0x1efc('0x4'));var rimraf=require(_0x1efc('0x5'));var config=require(_0x1efc('0x6'));var attributes=require('./analyticExtractedReport.attributes');module[_0x1efc('0x7')]=function(_0x1cfc17,_0x34a075){return _0x1cfc17['define']('AnalyticExtractedReport',attributes,{'tableName':_0x1efc('0x8'),'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 ae3ec80..c4ebe6d 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 _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 +var _0xaeea=['error','code','AnalyticExtractedReport,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','request\x20sent','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xaeea,0x1bf));var _0xaaee=function(_0x3c2492,_0x40ac06){_0x3c2492=_0x3c2492-0x0;var _0x2cb815=_0xaeea[_0x3c2492];return _0x2cb815;};'use strict';var _=require('lodash');var util=require(_0xaaee('0x0'));var moment=require(_0xaaee('0x1'));var BPromise=require(_0xaaee('0x2'));var rs=require(_0xaaee('0x3'));var fs=require('fs');var Redis=require(_0xaaee('0x4'));var db=require(_0xaaee('0x5'))['db'];var utils=require(_0xaaee('0x6'));var logger=require('../../config/logger')(_0xaaee('0x7'));var config=require('../../config/environment');var jayson=require(_0xaaee('0x8'));var client=jayson[_0xaaee('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1eceb5,_0x37c7e7,_0x4f85bb){return new BPromise(function(_0x362558,_0xf9a1c0){return client[_0xaaee('0xa')](_0x1eceb5,_0x4f85bb)[_0xaaee('0xb')](function(_0x360856){logger['info']('AnalyticExtractedReport,\x20%s,\x20%s',_0x37c7e7,_0xaaee('0xc'));logger['debug'](_0xaaee('0xd'),_0x37c7e7,_0xaaee('0xc'),JSON[_0xaaee('0xe')](_0x360856));if(_0x360856['error']){if(_0x360856[_0xaaee('0xf')][_0xaaee('0x10')]===0x1f4){logger[_0xaaee('0xf')](_0xaaee('0x11'),_0x37c7e7,_0x360856[_0xaaee('0xf')][_0xaaee('0x12')]);return _0xf9a1c0(_0x360856[_0xaaee('0xf')]['message']);}logger[_0xaaee('0xf')](_0xaaee('0x11'),_0x37c7e7,_0x360856[_0xaaee('0xf')]['message']);return _0x362558(_0x360856[_0xaaee('0xf')][_0xaaee('0x12')]);}else{logger[_0xaaee('0x13')](_0xaaee('0x11'),_0x37c7e7,'request\x20sent');_0x362558(_0x360856[_0xaaee('0x14')]['message']);}})[_0xaaee('0x15')](function(_0x21a250){logger[_0xaaee('0xf')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x37c7e7,_0x21a250);_0xf9a1c0(_0x21a250);});});} \ No newline at end of file diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js index f6c36f8..b4506cf 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 _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 +var _0x0765=['index','get','isAuthenticated','show','download','create','put','/:id','update','delete','destroy','util','express','Router','fs-extra','../../components/interaction/service','./analyticExtractedReport.controller'];(function(_0x3c35d0,_0x444345){var _0x205ac1=function(_0x2c3655){while(--_0x2c3655){_0x3c35d0['push'](_0x3c35d0['shift']());}};_0x205ac1(++_0x444345);}(_0x0765,0xd7));var _0x5076=function(_0x568470,_0x206c0d){_0x568470=_0x568470-0x0;var _0x508da9=_0x0765[_0x568470];return _0x508da9;};'use strict';var multer=require('multer');var util=require(_0x5076('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x5076('0x1'));var router=express[_0x5076('0x2')]();var fs_extra=require(_0x5076('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x5076('0x4'));var config=require('../../config/environment');var controller=require(_0x5076('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0x5076('0x6')]);router[_0x5076('0x7')]('/:id',auth[_0x5076('0x8')](),controller[_0x5076('0x9')]);router['get']('/:id/download',auth[_0x5076('0x8')](),controller[_0x5076('0xa')]);router['post']('/',auth[_0x5076('0x8')](),controller[_0x5076('0xb')]);router[_0x5076('0xc')](_0x5076('0xd'),auth[_0x5076('0x8')](),controller[_0x5076('0xe')]);router[_0x5076('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x5076('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js index f31bace..9b019b1 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 _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 +var _0xd7dd=['sequelize','exports','TEXT','STRING','BOOLEAN'];(function(_0x1fc27e,_0x52402c){var _0x252a06=function(_0x53fa6f){while(--_0x53fa6f){_0x1fc27e['push'](_0x1fc27e['shift']());}};_0x252a06(++_0x52402c);}(_0xd7dd,0x1c7));var _0xdd7d=function(_0x223235,_0x1dafbb){_0x223235=_0x223235-0x0;var _0x3fe560=_0xd7dd[_0x223235];return _0x3fe560;};'use strict';var Sequelize=require(_0xdd7d('0x0'));module[_0xdd7d('0x1')]={'field':{'type':Sequelize[_0xdd7d('0x2')]},'alias':{'type':Sequelize['STRING']},'function':{'type':Sequelize[_0xdd7d('0x3')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0xdd7d('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xdd7d('0x3')]},'custom':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js index 544d8ba..7a2a75e 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 _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 +var _0xe578=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','update','destroy','error','stack','name','AnalyticFieldReport','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','type','VIRTUAL','then','includeAll','include','rows','catch','show','params','length','merge','options','find','create','body','bulkCreate','bulkDestroy','ids','addFields','AnalyticCustomReport','findOne','sequelize','map','CustomReportId','findAll','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','papaparse'];(function(_0x2a4a84,_0x3e04f0){var _0x3fe657=function(_0x344457){while(--_0x344457){_0x2a4a84['push'](_0x2a4a84['shift']());}};_0x3fe657(++_0x3e04f0);}(_0xe578,0x95));var _0x8e57=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe578[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0x8e57('0x0'));var rimraf=require(_0x8e57('0x1'));var zipdir=require(_0x8e57('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8e57('0x3'));var moment=require(_0x8e57('0x4'));var BPromise=require(_0x8e57('0x5'));var Mustache=require(_0x8e57('0x6'));var util=require(_0x8e57('0x7'));var path=require(_0x8e57('0x8'));var sox=require(_0x8e57('0x9'));var csv=require(_0x8e57('0xa'));var ejs=require(_0x8e57('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x8e57('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8e57('0xd'));var toCsv=require(_0x8e57('0xa'));var querystring=require('querystring');var Papa=require(_0x8e57('0xe'));var Redis=require(_0x8e57('0xf'));var authService=require(_0x8e57('0x10'));var qs=require(_0x8e57('0x11'));var as=require(_0x8e57('0x12'));var hardwareService=require(_0x8e57('0x13'));var logger=require(_0x8e57('0x14'))(_0x8e57('0x15'));var utils=require('../../config/utils');var config=require(_0x8e57('0x16'));var licenseUtil=require(_0x8e57('0x17'));var db=require(_0x8e57('0x18'))['db'];function respondWithStatusCode(_0x2df4cf,_0x1b37d2){_0x1b37d2=_0x1b37d2||0xcc;return function(_0x1345c9){if(_0x1345c9){return _0x2df4cf[_0x8e57('0x19')](_0x1b37d2);}return _0x2df4cf[_0x8e57('0x1a')](_0x1b37d2)[_0x8e57('0x1b')]();};}function respondWithResult(_0x4f237,_0x1a5827){_0x1a5827=_0x1a5827||0xc8;return function(_0x568f30){if(_0x568f30){return _0x4f237[_0x8e57('0x1a')](_0x1a5827)[_0x8e57('0x1c')](_0x568f30);}};}function respondWithFilteredResult(_0x109874,_0x526f7b){return function(_0x43475c){if(_0x43475c){var _0x3074cd=typeof _0x526f7b[_0x8e57('0x1d')]===_0x8e57('0x1e')&&typeof _0x526f7b[_0x8e57('0x1f')]==='undefined';var _0x18f3a9=_0x43475c[_0x8e57('0x20')];var _0x2e8a2e=_0x3074cd?0x0:_0x526f7b[_0x8e57('0x1d')];var _0x2909ad=_0x3074cd?_0x43475c[_0x8e57('0x20')]:_0x526f7b[_0x8e57('0x1d')]+_0x526f7b[_0x8e57('0x1f')];var _0x8cd828;if(_0x2909ad>=_0x18f3a9){_0x2909ad=_0x18f3a9;_0x8cd828=0xc8;}else{_0x8cd828=0xce;}_0x109874[_0x8e57('0x1a')](_0x8cd828);return _0x109874[_0x8e57('0x21')]('Content-Range',_0x2e8a2e+'-'+_0x2909ad+'/'+_0x18f3a9)['json'](_0x43475c);}return null;};}function patchUpdates(_0x2c4ea1){return function(_0x3254fc){try{jsonpatch[_0x8e57('0x22')](_0x3254fc,_0x2c4ea1,!![]);}catch(_0x2d806e){return BPromise[_0x8e57('0x23')](_0x2d806e);}return _0x3254fc['save']();};}function saveUpdates(_0x322726,_0xcd997f){return function(_0x576b82){if(_0x576b82){return _0x576b82[_0x8e57('0x24')](_0x322726)['then'](function(_0x3b3413){return _0x3b3413;});}return null;};}function removeEntity(_0x5ddff4,_0x1082ea){return function(_0x74b60e){if(_0x74b60e){return _0x74b60e[_0x8e57('0x25')]()['then'](function(){_0x5ddff4['status'](0xcc)[_0x8e57('0x1b')]();});}};}function handleEntityNotFound(_0x41a4e4,_0x3ca10f){return function(_0xcd3c5f){if(!_0xcd3c5f){_0x41a4e4[_0x8e57('0x19')](0x194);}return _0xcd3c5f;};}function handleError(_0x32697f,_0x417e23){_0x417e23=_0x417e23||0x1f4;return function(_0x31b10f){logger[_0x8e57('0x26')](_0x31b10f[_0x8e57('0x27')]);if(_0x31b10f[_0x8e57('0x28')]){delete _0x31b10f[_0x8e57('0x28')];}_0x32697f['status'](_0x417e23)['send'](_0x31b10f);};}exports['index']=function(_0xe29163,_0x464688){var _0x7b5b75={},_0xe2aea={},_0x3a1c5a={'count':0x0,'rows':[]};var _0x99370b=_['map'](db[_0x8e57('0x29')][_0x8e57('0x2a')],function(_0xc2f7cd){return{'name':_0xc2f7cd['fieldName'],'type':_0xc2f7cd['type'][_0x8e57('0x2b')]};});_0xe2aea[_0x8e57('0x2c')]=_['map'](_0x99370b,_0x8e57('0x28'));_0xe2aea[_0x8e57('0x2d')]=_[_0x8e57('0x2e')](_0xe29163['query']);_0xe2aea[_0x8e57('0x2f')]=_[_0x8e57('0x30')](_0xe2aea[_0x8e57('0x2c')],_0xe2aea[_0x8e57('0x2d')]);_0x7b5b75[_0x8e57('0x31')]=_[_0x8e57('0x30')](_0xe2aea[_0x8e57('0x2c')],qs[_0x8e57('0x32')](_0xe29163[_0x8e57('0x2d')][_0x8e57('0x32')]));_0x7b5b75['attributes']=_0x7b5b75[_0x8e57('0x31')]['length']?_0x7b5b75[_0x8e57('0x31')]:_0xe2aea[_0x8e57('0x2c')];if(!_0xe29163['query'][_0x8e57('0x33')]('nolimit')){_0x7b5b75[_0x8e57('0x1f')]=qs[_0x8e57('0x1f')](_0xe29163['query'][_0x8e57('0x1f')]);_0x7b5b75[_0x8e57('0x1d')]=qs[_0x8e57('0x1d')](_0xe29163['query'][_0x8e57('0x1d')]);}_0x7b5b75[_0x8e57('0x34')]=qs[_0x8e57('0x35')](_0xe29163[_0x8e57('0x2d')][_0x8e57('0x35')]);_0x7b5b75[_0x8e57('0x36')]=qs[_0x8e57('0x2f')](_[_0x8e57('0x37')](_0xe29163['query'],_0xe2aea[_0x8e57('0x2f')]),_0x99370b);if(_0xe29163[_0x8e57('0x2d')][_0x8e57('0x38')]){_0x7b5b75['where']=_['merge'](_0x7b5b75[_0x8e57('0x36')],{'$or':_['map'](_0x99370b,function(_0xbd980e){if(_0xbd980e[_0x8e57('0x39')]!==_0x8e57('0x3a')){var _0x3e339e={};_0x3e339e[_0xbd980e[_0x8e57('0x28')]]={'$like':'%'+_0xe29163['query'][_0x8e57('0x38')]+'%'};return _0x3e339e;}})});}_0x7b5b75=_['merge']({},_0x7b5b75,_0xe29163['options']);var _0x1ffd22={'where':_0x7b5b75[_0x8e57('0x36')]};return db[_0x8e57('0x29')]['count'](_0x1ffd22)[_0x8e57('0x3b')](function(_0x2c0ba3){_0x3a1c5a[_0x8e57('0x20')]=_0x2c0ba3;if(_0xe29163[_0x8e57('0x2d')][_0x8e57('0x3c')]){_0x7b5b75[_0x8e57('0x3d')]=[{'all':!![]}];}return db['AnalyticFieldReport']['findAll'](_0x7b5b75);})[_0x8e57('0x3b')](function(_0x2e8c9d){_0x3a1c5a[_0x8e57('0x3e')]=_0x2e8c9d;return _0x3a1c5a;})[_0x8e57('0x3b')](respondWithFilteredResult(_0x464688,_0x7b5b75))[_0x8e57('0x3f')](handleError(_0x464688,null));};exports[_0x8e57('0x40')]=function(_0x523494,_0x386eae){var _0x4355e5={'raw':![],'where':{'id':_0x523494[_0x8e57('0x41')]['id']}},_0x4a2694={};_0x4a2694[_0x8e57('0x2c')]=_[_0x8e57('0x2e')](db[_0x8e57('0x29')][_0x8e57('0x2a')]);_0x4a2694[_0x8e57('0x2d')]=_[_0x8e57('0x2e')](_0x523494[_0x8e57('0x2d')]);_0x4a2694[_0x8e57('0x2f')]=_[_0x8e57('0x30')](_0x4a2694[_0x8e57('0x2c')],_0x4a2694[_0x8e57('0x2d')]);_0x4355e5[_0x8e57('0x31')]=_[_0x8e57('0x30')](_0x4a2694[_0x8e57('0x2c')],qs['fields'](_0x523494[_0x8e57('0x2d')][_0x8e57('0x32')]));_0x4355e5[_0x8e57('0x31')]=_0x4355e5[_0x8e57('0x31')][_0x8e57('0x42')]?_0x4355e5['attributes']:_0x4a2694['model'];if(_0x523494[_0x8e57('0x2d')][_0x8e57('0x3c')]){_0x4355e5[_0x8e57('0x3d')]=[{'all':!![]}];}_0x4355e5=_[_0x8e57('0x43')]({},_0x4355e5,_0x523494[_0x8e57('0x44')]);return db['AnalyticFieldReport'][_0x8e57('0x45')](_0x4355e5)['then'](handleEntityNotFound(_0x386eae,null))[_0x8e57('0x3b')](respondWithResult(_0x386eae,null))[_0x8e57('0x3f')](handleError(_0x386eae,null));};exports[_0x8e57('0x46')]=function(_0x5b7713,_0xdc3279){return db[_0x8e57('0x29')]['create'](_0x5b7713[_0x8e57('0x47')],{})['then'](respondWithResult(_0xdc3279,0xc9))['catch'](handleError(_0xdc3279,null));};exports[_0x8e57('0x48')]=function(_0x28f34b,_0x962cfb){return db[_0x8e57('0x29')][_0x8e57('0x48')](_0x28f34b[_0x8e57('0x47')],{'raw':![],'individualHooks':!![]})[_0x8e57('0x3b')](respondWithResult(_0x962cfb,0xc9))['catch'](handleError(_0x962cfb,null));};exports[_0x8e57('0x24')]=function(_0xbcffd5,_0x4f4227){if(_0xbcffd5[_0x8e57('0x47')]['id']){delete _0xbcffd5[_0x8e57('0x47')]['id'];}return db[_0x8e57('0x29')]['find']({'where':{'id':_0xbcffd5['params']['id']}})['then'](handleEntityNotFound(_0x4f4227,null))[_0x8e57('0x3b')](saveUpdates(_0xbcffd5['body'],null))['then'](respondWithResult(_0x4f4227,null))[_0x8e57('0x3f')](handleError(_0x4f4227,null));};exports[_0x8e57('0x25')]=function(_0x3531a6,_0x3d279a){return db[_0x8e57('0x29')][_0x8e57('0x45')]({'where':{'id':_0x3531a6[_0x8e57('0x41')]['id']}})[_0x8e57('0x3b')](handleEntityNotFound(_0x3d279a,null))[_0x8e57('0x3b')](removeEntity(_0x3d279a,null))['catch'](handleError(_0x3d279a,null));};exports[_0x8e57('0x49')]=function(_0x41d321,_0x2dd435){return db[_0x8e57('0x29')]['destroy']({'where':{'id':_0x41d321[_0x8e57('0x2d')][_0x8e57('0x4a')]||[]},'raw':![],'individualHooks':!![]})[_0x8e57('0x3b')](respondWithResult(_0x2dd435,0xcc))['catch'](handleError(_0x2dd435,null));};exports[_0x8e57('0x4b')]=function(_0x4ca8f7,_0x1146a1,_0x9f3cd8){return db[_0x8e57('0x4c')][_0x8e57('0x4d')]({'where':{'id':_0x4ca8f7['params']['id']}})[_0x8e57('0x3b')](handleEntityNotFound(_0x1146a1,null))[_0x8e57('0x3b')](function(_0x5a55c0){if(_0x5a55c0){return db[_0x8e57('0x4e')]['transaction'](function(_0x347a86){return db[_0x8e57('0x29')][_0x8e57('0x25')]({'where':{'CustomReportId':_0x4ca8f7[_0x8e57('0x41')]['id']},'transaction':_0x347a86})[_0x8e57('0x3b')](function(_0x4a694b){var _0x333f6f=_[_0x8e57('0x4f')](_0x4ca8f7['body'],function(_0x1d1ba6){delete _0x1d1ba6['id'];_0x1d1ba6[_0x8e57('0x50')]=_0x4ca8f7[_0x8e57('0x41')]['id'];return _0x1d1ba6;});return db['AnalyticFieldReport']['bulkCreate'](_0x333f6f,{'transaction':_0x347a86});});})[_0x8e57('0x3b')](function(){return db[_0x8e57('0x29')][_0x8e57('0x51')]({'where':{'CustomReportId':_0x4ca8f7[_0x8e57('0x41')]['id']}});});}})[_0x8e57('0x3b')](respondWithResult(_0x1146a1,null))['catch'](handleError(_0x1146a1,null));}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js index 8ae0deb..8a5c8f7 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 _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 +var _0xacdc=['util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./analyticFieldReport.attributes','AnalyticFieldReport','analytics_report_fields','lodash'];(function(_0x1ff4ef,_0x1a9987){var _0x4abf95=function(_0x16adc0){while(--_0x16adc0){_0x1ff4ef['push'](_0x1ff4ef['shift']());}};_0x4abf95(++_0x1a9987);}(_0xacdc,0x77));var _0xcacd=function(_0x28eeab,_0x123580){_0x28eeab=_0x28eeab-0x0;var _0xafcd8c=_0xacdc[_0x28eeab];return _0xafcd8c;};'use strict';var _=require(_0xcacd('0x0'));var util=require(_0xcacd('0x1'));var logger=require(_0xcacd('0x2'))(_0xcacd('0x3'));var moment=require(_0xcacd('0x4'));var BPromise=require(_0xcacd('0x5'));var rp=require(_0xcacd('0x6'));var fs=require('fs');var path=require(_0xcacd('0x7'));var rimraf=require('rimraf');var config=require(_0xcacd('0x8'));var attributes=require(_0xcacd('0x9'));module['exports']=function(_0x2372d4,_0x588112){return _0x2372d4['define'](_0xcacd('0xa'),attributes,{'tableName':_0xcacd('0xb'),'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 e7d3204..f51ebb3 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 _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 +var _0x7c8c=['AnalyticFieldReport,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','debug'];(function(_0x170eb7,_0x1ac59b){var _0x4dfeac=function(_0x350592){while(--_0x350592){_0x170eb7['push'](_0x170eb7['shift']());}};_0x4dfeac(++_0x1ac59b);}(_0x7c8c,0xa1));var _0xc7c8=function(_0x323299,_0x340bd4){_0x323299=_0x323299-0x0;var _0x2d061a=_0x7c8c[_0x323299];return _0x2d061a;};'use strict';var _=require(_0xc7c8('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc7c8('0x1'));var rs=require(_0xc7c8('0x2'));var fs=require('fs');var Redis=require(_0xc7c8('0x3'));var db=require(_0xc7c8('0x4'))['db'];var utils=require(_0xc7c8('0x5'));var logger=require(_0xc7c8('0x6'))(_0xc7c8('0x7'));var config=require(_0xc7c8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xc7c8('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x31b42c,_0x59ce26,_0x4f6920){return new BPromise(function(_0x20561a,_0x1f7540){return client[_0xc7c8('0xa')](_0x31b42c,_0x4f6920)[_0xc7c8('0xb')](function(_0x3ce029){logger[_0xc7c8('0xc')](_0xc7c8('0xd'),_0x59ce26,'request\x20sent');logger[_0xc7c8('0xe')](_0xc7c8('0xf'),_0x59ce26,'request\x20sent',JSON['stringify'](_0x3ce029));if(_0x3ce029[_0xc7c8('0x10')]){if(_0x3ce029[_0xc7c8('0x10')][_0xc7c8('0x11')]===0x1f4){logger['error'](_0xc7c8('0xd'),_0x59ce26,_0x3ce029[_0xc7c8('0x10')][_0xc7c8('0x12')]);return _0x1f7540(_0x3ce029[_0xc7c8('0x10')][_0xc7c8('0x12')]);}logger[_0xc7c8('0x10')](_0xc7c8('0xd'),_0x59ce26,_0x3ce029['error'][_0xc7c8('0x12')]);return _0x20561a(_0x3ce029['error'][_0xc7c8('0x12')]);}else{logger['info'](_0xc7c8('0xd'),_0x59ce26,_0xc7c8('0x13'));_0x20561a(_0x3ce029[_0xc7c8('0x14')]['message']);}})[_0xc7c8('0x15')](function(_0x3e0091){logger[_0xc7c8('0x10')]('AnalyticFieldReport,\x20%s,\x20%s',_0x59ce26,_0x3e0091);_0x1f7540(_0x3e0091);});});} \ No newline at end of file diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js index a3700d7..e2186a9 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(_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 +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(_0x324a18,_0x1569df){var _0x497170=function(_0x3ea588){while(--_0x3ea588){_0x324a18['push'](_0x324a18['shift']());}};_0x497170(++_0x1569df);}(_0xa9e0,0x123));var _0x0a9e=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0xa9e0[_0x56482c];return _0x5aae7a;};'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 a83d58e..19c62b8 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 _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 +var _0x2cbd=['exports','name','STRING','TEXT','sequelize'];(function(_0xa8e610,_0x64a822){var _0x5e6f49=function(_0x5e6347){while(--_0x5e6347){_0xa8e610['push'](_0xa8e610['shift']());}};_0x5e6f49(++_0x64a822);}(_0x2cbd,0x19e));var _0xd2cb=function(_0x9a3e0f,_0x2f796d){_0x9a3e0f=_0x9a3e0f-0x0;var _0x3d2a9a=_0x2cbd[_0x9a3e0f];return _0x3d2a9a;};'use strict';var Sequelize=require(_0xd2cb('0x0'));module[_0xd2cb('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xd2cb('0x2')},'table':{'type':Sequelize[_0xd2cb('0x3')]},'metric':{'type':Sequelize[_0xd2cb('0x4')]},'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 c38cba8..79fe769 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 _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 +var _0x7217=['Content-Range','apply','reject','save','update','then','destroy','get','Metrics','UserProfileResource','sendStatus','error','stack','name','send','index','map','AnalyticMetric','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','rows','catch','show','params','rawAttributes','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','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/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set'];(function(_0x3f18dc,_0x5d69b3){var _0x26bad6=function(_0x34b3ca){while(--_0x34b3ca){_0x3f18dc['push'](_0x3f18dc['shift']());}};_0x26bad6(++_0x5d69b3);}(_0x7217,0x19e));var _0x7721=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x7217[_0x3947c9];return _0x2e7871;};'use strict';var emlformat=require(_0x7721('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7721('0x1'));var jsonpatch=require(_0x7721('0x2'));var rp=require(_0x7721('0x3'));var moment=require(_0x7721('0x4'));var BPromise=require(_0x7721('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x7721('0x6'));var sox=require(_0x7721('0x7'));var csv=require(_0x7721('0x8'));var ejs=require(_0x7721('0x9'));var fs=require('fs');var fs_extra=require(_0x7721('0xa'));var _=require(_0x7721('0xb'));var squel=require(_0x7721('0xc'));var crypto=require(_0x7721('0xd'));var jsforce=require(_0x7721('0xe'));var deskjs=require(_0x7721('0xf'));var toCsv=require(_0x7721('0x8'));var querystring=require(_0x7721('0x10'));var Papa=require(_0x7721('0x11'));var Redis=require(_0x7721('0x12'));var authService=require(_0x7721('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x7721('0x14'));var hardwareService=require(_0x7721('0x15'));var logger=require(_0x7721('0x16'))(_0x7721('0x17'));var utils=require(_0x7721('0x18'));var config=require(_0x7721('0x19'));var licenseUtil=require(_0x7721('0x1a'));var db=require(_0x7721('0x1b'))['db'];function respondWithStatusCode(_0x55b4ca,_0x2911ec){_0x2911ec=_0x2911ec||0xcc;return function(_0x199930){if(_0x199930){return _0x55b4ca['sendStatus'](_0x2911ec);}return _0x55b4ca[_0x7721('0x1c')](_0x2911ec)[_0x7721('0x1d')]();};}function respondWithResult(_0x3f01c5,_0x2e9752){_0x2e9752=_0x2e9752||0xc8;return function(_0x5069da){if(_0x5069da){return _0x3f01c5[_0x7721('0x1c')](_0x2e9752)[_0x7721('0x1e')](_0x5069da);}};}function respondWithFilteredResult(_0x534f1b,_0x4e199a){return function(_0x4b183e){if(_0x4b183e){var _0x5ed54=typeof _0x4e199a[_0x7721('0x1f')]===_0x7721('0x20')&&typeof _0x4e199a[_0x7721('0x21')]==='undefined';var _0x20f669=_0x4b183e['count'];var _0x3fc09e=_0x5ed54?0x0:_0x4e199a['offset'];var _0xfec626=_0x5ed54?_0x4b183e[_0x7721('0x22')]:_0x4e199a[_0x7721('0x1f')]+_0x4e199a[_0x7721('0x21')];var _0x2286e5;if(_0xfec626>=_0x20f669){_0xfec626=_0x20f669;_0x2286e5=0xc8;}else{_0x2286e5=0xce;}_0x534f1b[_0x7721('0x1c')](_0x2286e5);return _0x534f1b[_0x7721('0x23')](_0x7721('0x24'),_0x3fc09e+'-'+_0xfec626+'/'+_0x20f669)[_0x7721('0x1e')](_0x4b183e);}return null;};}function patchUpdates(_0xaeccc4){return function(_0x4ce1db){try{jsonpatch[_0x7721('0x25')](_0x4ce1db,_0xaeccc4,!![]);}catch(_0x2c1583){return BPromise[_0x7721('0x26')](_0x2c1583);}return _0x4ce1db[_0x7721('0x27')]();};}function saveUpdates(_0x57140c,_0x28f5a6){return function(_0x512f31){if(_0x512f31){return _0x512f31[_0x7721('0x28')](_0x57140c)[_0x7721('0x29')](function(_0x3e8a4e){return _0x3e8a4e;});}return null;};}function removeEntity(_0x1caad8,_0x121cc4){return function(_0x395b15){if(_0x395b15){return _0x395b15[_0x7721('0x2a')]()['then'](function(){var _0x216f20=_0x395b15[_0x7721('0x2b')]({'plain':!![]});var _0x125564=_0x7721('0x2c');return db[_0x7721('0x2d')][_0x7721('0x2a')]({'where':{'type':_0x125564,'resourceId':_0x216f20['id']}})[_0x7721('0x29')](function(){return _0x395b15;});})[_0x7721('0x29')](function(){_0x1caad8[_0x7721('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x258ddf,_0x5b0551){return function(_0x499b87){if(!_0x499b87){_0x258ddf[_0x7721('0x2e')](0x194);}return _0x499b87;};}function handleError(_0x343c19,_0x53c904){_0x53c904=_0x53c904||0x1f4;return function(_0x158d98){logger[_0x7721('0x2f')](_0x158d98[_0x7721('0x30')]);if(_0x158d98[_0x7721('0x31')]){delete _0x158d98[_0x7721('0x31')];}_0x343c19['status'](_0x53c904)[_0x7721('0x32')](_0x158d98);};}exports[_0x7721('0x33')]=function(_0x497f9f,_0x4a25c9){var _0xfde9ec={},_0x220bbf={},_0x48f329={'count':0x0,'rows':[]};var _0x46f772=_[_0x7721('0x34')](db[_0x7721('0x35')]['rawAttributes'],function(_0x3d9a32){return{'name':_0x3d9a32[_0x7721('0x36')],'type':_0x3d9a32[_0x7721('0x37')][_0x7721('0x38')]};});_0x220bbf[_0x7721('0x39')]=_['map'](_0x46f772,_0x7721('0x31'));_0x220bbf[_0x7721('0x3a')]=_[_0x7721('0x3b')](_0x497f9f['query']);_0x220bbf[_0x7721('0x3c')]=_[_0x7721('0x3d')](_0x220bbf['model'],_0x220bbf[_0x7721('0x3a')]);_0xfde9ec['attributes']=_[_0x7721('0x3d')](_0x220bbf[_0x7721('0x39')],qs[_0x7721('0x3e')](_0x497f9f[_0x7721('0x3a')][_0x7721('0x3e')]));_0xfde9ec[_0x7721('0x3f')]=_0xfde9ec[_0x7721('0x3f')][_0x7721('0x40')]?_0xfde9ec[_0x7721('0x3f')]:_0x220bbf[_0x7721('0x39')];if(!_0x497f9f[_0x7721('0x3a')]['hasOwnProperty'](_0x7721('0x41'))){_0xfde9ec['limit']=qs[_0x7721('0x21')](_0x497f9f[_0x7721('0x3a')][_0x7721('0x21')]);_0xfde9ec[_0x7721('0x1f')]=qs[_0x7721('0x1f')](_0x497f9f[_0x7721('0x3a')]['offset']);}_0xfde9ec['order']=qs['sort'](_0x497f9f['query'][_0x7721('0x42')]);_0xfde9ec[_0x7721('0x43')]=qs[_0x7721('0x3c')](_[_0x7721('0x44')](_0x497f9f['query'],_0x220bbf[_0x7721('0x3c')]),_0x46f772);if(_0x497f9f['query'][_0x7721('0x45')]){_0xfde9ec[_0x7721('0x43')]=_['merge'](_0xfde9ec[_0x7721('0x43')],{'$or':_[_0x7721('0x34')](_0x46f772,function(_0x4e77ff){if(_0x4e77ff['type']!==_0x7721('0x46')){var _0xfc4dc4={};_0xfc4dc4[_0x4e77ff[_0x7721('0x31')]]={'$like':'%'+_0x497f9f[_0x7721('0x3a')]['filter']+'%'};return _0xfc4dc4;}})});}_0xfde9ec=_[_0x7721('0x47')]({},_0xfde9ec,_0x497f9f[_0x7721('0x48')]);var _0x40ce8c={'where':_0xfde9ec[_0x7721('0x43')]};return db[_0x7721('0x35')]['count'](_0x40ce8c)[_0x7721('0x29')](function(_0x4a2c28){_0x48f329[_0x7721('0x22')]=_0x4a2c28;if(_0x497f9f['query'][_0x7721('0x49')]){_0xfde9ec[_0x7721('0x4a')]=[{'all':!![]}];}return db[_0x7721('0x35')]['findAll'](_0xfde9ec);})[_0x7721('0x29')](function(_0x11d853){_0x48f329[_0x7721('0x4b')]=_0x11d853;return _0x48f329;})['then'](respondWithFilteredResult(_0x4a25c9,_0xfde9ec))[_0x7721('0x4c')](handleError(_0x4a25c9,null));};exports[_0x7721('0x4d')]=function(_0xdb3033,_0x2d5f35){var _0x135dbc={'raw':!![],'where':{'id':_0xdb3033[_0x7721('0x4e')]['id']}},_0x57d09b={};_0x57d09b['model']=_['keys'](db[_0x7721('0x35')][_0x7721('0x4f')]);_0x57d09b[_0x7721('0x3a')]=_[_0x7721('0x3b')](_0xdb3033[_0x7721('0x3a')]);_0x57d09b[_0x7721('0x3c')]=_[_0x7721('0x3d')](_0x57d09b[_0x7721('0x39')],_0x57d09b[_0x7721('0x3a')]);_0x135dbc[_0x7721('0x3f')]=_['intersection'](_0x57d09b['model'],qs[_0x7721('0x3e')](_0xdb3033[_0x7721('0x3a')][_0x7721('0x3e')]));_0x135dbc[_0x7721('0x3f')]=_0x135dbc['attributes'][_0x7721('0x40')]?_0x135dbc[_0x7721('0x3f')]:_0x57d09b['model'];if(_0xdb3033[_0x7721('0x3a')]['includeAll']){_0x135dbc[_0x7721('0x4a')]=[{'all':!![]}];}_0x135dbc=_['merge']({},_0x135dbc,_0xdb3033[_0x7721('0x48')]);return db[_0x7721('0x35')][_0x7721('0x50')](_0x135dbc)['then'](handleEntityNotFound(_0x2d5f35,null))[_0x7721('0x29')](respondWithResult(_0x2d5f35,null))[_0x7721('0x4c')](handleError(_0x2d5f35,null));};exports['create']=function(_0x223d93,_0x1196c2){return db[_0x7721('0x35')]['create'](_0x223d93[_0x7721('0x51')],{})['then'](function(_0xdb1ca8){var _0x310549=_0x223d93[_0x7721('0x52')][_0x7721('0x2b')]({'plain':!![]});if(!_0x310549)throw new Error(_0x7721('0x53'));if(_0x310549[_0x7721('0x54')]===_0x7721('0x52')){var _0x7fbb73=_0xdb1ca8[_0x7721('0x2b')]({'plain':!![]});var _0x3386aa=_0x7721('0x2c');return db[_0x7721('0x55')][_0x7721('0x50')]({'where':{'name':_0x3386aa,'userProfileId':_0x310549[_0x7721('0x56')]},'raw':!![]})[_0x7721('0x29')](function(_0x5b741d){if(_0x5b741d&&_0x5b741d[_0x7721('0x57')]===0x0){return db[_0x7721('0x2d')][_0x7721('0x58')]({'name':_0x7fbb73[_0x7721('0x31')],'resourceId':_0x7fbb73['id'],'type':_0x5b741d[_0x7721('0x31')],'sectionId':_0x5b741d['id']},{})[_0x7721('0x29')](function(){return _0xdb1ca8;});}else{return _0xdb1ca8;}})[_0x7721('0x4c')](function(_0x57484c){logger[_0x7721('0x2f')](_0x7721('0x59'),_0x57484c);throw _0x57484c;});}return _0xdb1ca8;})[_0x7721('0x29')](respondWithResult(_0x1196c2,0xc9))[_0x7721('0x4c')](handleError(_0x1196c2,null));};exports[_0x7721('0x28')]=function(_0x9c0d4,_0x7fbd6c){if(_0x9c0d4[_0x7721('0x51')]['id']){delete _0x9c0d4[_0x7721('0x51')]['id'];}return db[_0x7721('0x35')][_0x7721('0x50')]({'where':{'id':_0x9c0d4['params']['id']}})[_0x7721('0x29')](handleEntityNotFound(_0x7fbd6c,null))[_0x7721('0x29')](saveUpdates(_0x9c0d4[_0x7721('0x51')],null))[_0x7721('0x29')](respondWithResult(_0x7fbd6c,null))[_0x7721('0x4c')](handleError(_0x7fbd6c,null));};exports[_0x7721('0x2a')]=function(_0x41644f,_0x36fe6f){return db[_0x7721('0x35')][_0x7721('0x50')]({'where':{'id':_0x41644f[_0x7721('0x4e')]['id']}})[_0x7721('0x29')](handleEntityNotFound(_0x36fe6f,null))[_0x7721('0x29')](removeEntity(_0x36fe6f,null))[_0x7721('0x4c')](handleError(_0x36fe6f,null));}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js index 4a072af..ba5d284 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 _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 +var _0x8403=['rimraf','./analyticMetric.attributes','exports','define','AnalyticMetric','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x45d55e,_0x2fede3){var _0x29812a=function(_0x3c6830){while(--_0x3c6830){_0x45d55e['push'](_0x45d55e['shift']());}};_0x29812a(++_0x2fede3);}(_0x8403,0x1a5));var _0x3840=function(_0x12fef8,_0x282715){_0x12fef8=_0x12fef8-0x0;var _0x40e08c=_0x8403[_0x12fef8];return _0x40e08c;};'use strict';var _=require(_0x3840('0x0'));var util=require(_0x3840('0x1'));var logger=require(_0x3840('0x2'))(_0x3840('0x3'));var moment=require(_0x3840('0x4'));var BPromise=require(_0x3840('0x5'));var rp=require(_0x3840('0x6'));var fs=require('fs');var path=require(_0x3840('0x7'));var rimraf=require(_0x3840('0x8'));var config=require('../../config/environment');var attributes=require(_0x3840('0x9'));module[_0x3840('0xa')]=function(_0x1cd658,_0x233be3){return _0x1cd658[_0x3840('0xb')](_0x3840('0xc'),attributes,{'tableName':'analytics_metrics','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 1adbb20..0092c0a 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 _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 +var _0x1c04=['../../config/utils','../../config/logger','rpc','../../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','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x4679ab,_0x4fa8b7){var _0x49a203=function(_0x528df4){while(--_0x528df4){_0x4679ab['push'](_0x4679ab['shift']());}};_0x49a203(++_0x4fa8b7);}(_0x1c04,0x1a9));var _0x41c0=function(_0x58eca9,_0x219608){_0x58eca9=_0x58eca9-0x0;var _0x25a12e=_0x1c04[_0x58eca9];return _0x25a12e;};'use strict';var _=require(_0x41c0('0x0'));var util=require(_0x41c0('0x1'));var moment=require(_0x41c0('0x2'));var BPromise=require(_0x41c0('0x3'));var rs=require(_0x41c0('0x4'));var fs=require('fs');var Redis=require(_0x41c0('0x5'));var db=require(_0x41c0('0x6'))['db'];var utils=require(_0x41c0('0x7'));var logger=require(_0x41c0('0x8'))(_0x41c0('0x9'));var config=require(_0x41c0('0xa'));var jayson=require(_0x41c0('0xb'));var client=jayson[_0x41c0('0xc')][_0x41c0('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x38ec21,_0x53d973,_0x2ffe82){return new BPromise(function(_0x160cb0,_0x51d0ca){return client[_0x41c0('0xe')](_0x38ec21,_0x2ffe82)[_0x41c0('0xf')](function(_0x196698){logger[_0x41c0('0x10')](_0x41c0('0x11'),_0x53d973,_0x41c0('0x12'));logger[_0x41c0('0x13')](_0x41c0('0x14'),_0x53d973,_0x41c0('0x12'),JSON[_0x41c0('0x15')](_0x196698));if(_0x196698[_0x41c0('0x16')]){if(_0x196698[_0x41c0('0x16')][_0x41c0('0x17')]===0x1f4){logger['error'](_0x41c0('0x11'),_0x53d973,_0x196698['error'][_0x41c0('0x18')]);return _0x51d0ca(_0x196698['error'][_0x41c0('0x18')]);}logger[_0x41c0('0x16')](_0x41c0('0x11'),_0x53d973,_0x196698[_0x41c0('0x16')][_0x41c0('0x18')]);return _0x160cb0(_0x196698['error'][_0x41c0('0x18')]);}else{logger[_0x41c0('0x10')](_0x41c0('0x11'),_0x53d973,_0x41c0('0x12'));_0x160cb0(_0x196698[_0x41c0('0x19')]['message']);}})[_0x41c0('0x1a')](function(_0x421d1a){logger[_0x41c0('0x16')](_0x41c0('0x11'),_0x53d973,_0x421d1a);_0x51d0ca(_0x421d1a);});});} \ No newline at end of file diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js index 569dde5..2b65320 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 _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 +var _0x038b=['../../components/auth/service','../../components/interaction/service','./analyticMetric.controller','get','/:id','isAuthenticated','create','update','destroy','exports','util','path','connect-timeout','Router'];(function(_0x3f92c2,_0x371fe1){var _0x1e964b=function(_0x56c06e){while(--_0x56c06e){_0x3f92c2['push'](_0x3f92c2['shift']());}};_0x1e964b(++_0x371fe1);}(_0x038b,0x114));var _0xb038=function(_0x264d84,_0x40783b){_0x264d84=_0x264d84-0x0;var _0x424959=_0x038b[_0x264d84];return _0x424959;};'use strict';var multer=require('multer');var util=require(_0xb038('0x0'));var path=require(_0xb038('0x1'));var timeout=require(_0xb038('0x2'));var express=require('express');var router=express[_0xb038('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xb038('0x4'));var interaction=require(_0xb038('0x5'));var config=require('../../config/environment');var controller=require(_0xb038('0x6'));router[_0xb038('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb038('0x7')](_0xb038('0x8'),auth[_0xb038('0x9')](),controller['show']);router['post']('/',auth[_0xb038('0x9')](),controller[_0xb038('0xa')]);router['put']('/:id',auth[_0xb038('0x9')](),controller[_0xb038('0xb')]);router['delete'](_0xb038('0x8'),auth[_0xb038('0x9')](),controller[_0xb038('0xc')]);module[_0xb038('0xd')]=router; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js index 85a0f00..80090d9 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 _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 +var _0xe32f=['sequelize','TEXT'];(function(_0x4a9772,_0x238174){var _0x4719e9=function(_0x307c63){while(--_0x307c63){_0x4a9772['push'](_0x4a9772['shift']());}};_0x4719e9(++_0x238174);}(_0xe32f,0x80));var _0xfe32=function(_0x1435ff,_0x53d6c7){_0x1435ff=_0x1435ff-0x0;var _0x152fc4=_0xe32f[_0x1435ff];return _0x152fc4;};'use strict';var Sequelize=require(_0xfe32('0x0'));module['exports']={'tree':{'type':Sequelize[_0xfe32('0x1')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js index b728226..f83d695 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 _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 +var _0xb6ea=['options','include','keys','fields','includeAll','find','catch','create','body','params','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','limit','undefined','count','set','apply','reject','save','then','destroy','end','sendStatus','name','send','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','query','filters','intersection','attributes','model','length','hasOwnProperty','nolimit','order','where','pick','merge','VIRTUAL','filter'];(function(_0x51ad85,_0x2c6852){var _0x44ea75=function(_0x3ba743){while(--_0x3ba743){_0x51ad85['push'](_0x51ad85['shift']());}};_0x44ea75(++_0x2c6852);}(_0xb6ea,0x98));var _0xab6e=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xb6ea[_0x397e5f];return _0x5302b8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xab6e('0x0'));var zipdir=require(_0xab6e('0x1'));var jsonpatch=require(_0xab6e('0x2'));var rp=require(_0xab6e('0x3'));var moment=require(_0xab6e('0x4'));var BPromise=require(_0xab6e('0x5'));var Mustache=require('mustache');var util=require(_0xab6e('0x6'));var path=require(_0xab6e('0x7'));var sox=require(_0xab6e('0x8'));var csv=require(_0xab6e('0x9'));var ejs=require(_0xab6e('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xab6e('0xb'));var squel=require(_0xab6e('0xc'));var crypto=require(_0xab6e('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xab6e('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xab6e('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xab6e('0x10'));var hardwareService=require(_0xab6e('0x11'));var logger=require(_0xab6e('0x12'))(_0xab6e('0x13'));var utils=require(_0xab6e('0x14'));var config=require(_0xab6e('0x15'));var licenseUtil=require(_0xab6e('0x16'));var db=require(_0xab6e('0x17'))['db'];function respondWithStatusCode(_0x11b01c,_0x523c41){_0x523c41=_0x523c41||0xcc;return function(_0x43b738){if(_0x43b738){return _0x11b01c['sendStatus'](_0x523c41);}return _0x11b01c[_0xab6e('0x18')](_0x523c41)['end']();};}function respondWithResult(_0x65aa6f,_0x34c2b5){_0x34c2b5=_0x34c2b5||0xc8;return function(_0x4f4370){if(_0x4f4370){return _0x65aa6f[_0xab6e('0x18')](_0x34c2b5)[_0xab6e('0x19')](_0x4f4370);}};}function respondWithFilteredResult(_0x28d1cf,_0x2ad081){return function(_0x250d07){if(_0x250d07){var _0x16723e=typeof _0x2ad081[_0xab6e('0x1a')]==='undefined'&&typeof _0x2ad081[_0xab6e('0x1b')]===_0xab6e('0x1c');var _0x2883f9=_0x250d07[_0xab6e('0x1d')];var _0x1ee8c8=_0x16723e?0x0:_0x2ad081[_0xab6e('0x1a')];var _0x16981f=_0x16723e?_0x250d07[_0xab6e('0x1d')]:_0x2ad081[_0xab6e('0x1a')]+_0x2ad081[_0xab6e('0x1b')];var _0x560967;if(_0x16981f>=_0x2883f9){_0x16981f=_0x2883f9;_0x560967=0xc8;}else{_0x560967=0xce;}_0x28d1cf[_0xab6e('0x18')](_0x560967);return _0x28d1cf[_0xab6e('0x1e')]('Content-Range',_0x1ee8c8+'-'+_0x16981f+'/'+_0x2883f9)['json'](_0x250d07);}return null;};}function patchUpdates(_0x5cc9da){return function(_0x595527){try{jsonpatch[_0xab6e('0x1f')](_0x595527,_0x5cc9da,!![]);}catch(_0x5e1f10){return BPromise[_0xab6e('0x20')](_0x5e1f10);}return _0x595527[_0xab6e('0x21')]();};}function saveUpdates(_0x398dc8,_0x519698){return function(_0x435277){if(_0x435277){return _0x435277['update'](_0x398dc8)[_0xab6e('0x22')](function(_0x42d5c0){return _0x42d5c0;});}return null;};}function removeEntity(_0x4fd78f,_0x416488){return function(_0x29e883){if(_0x29e883){return _0x29e883[_0xab6e('0x23')]()[_0xab6e('0x22')](function(){_0x4fd78f[_0xab6e('0x18')](0xcc)[_0xab6e('0x24')]();});}};}function handleEntityNotFound(_0x22d759,_0x2404b7){return function(_0x44c0d4){if(!_0x44c0d4){_0x22d759[_0xab6e('0x25')](0x194);}return _0x44c0d4;};}function handleError(_0xb18593,_0x344199){_0x344199=_0x344199||0x1f4;return function(_0xc7fef7){logger['error'](_0xc7fef7['stack']);if(_0xc7fef7['name']){delete _0xc7fef7[_0xab6e('0x26')];}_0xb18593[_0xab6e('0x18')](_0x344199)[_0xab6e('0x27')](_0xc7fef7);};}exports[_0xab6e('0x28')]=function(_0x78b543,_0x369464){var _0x174ad0={},_0x4a7e50={},_0x1a0965={'count':0x0,'rows':[]};var _0x1430a2=_[_0xab6e('0x29')](db[_0xab6e('0x2a')][_0xab6e('0x2b')],function(_0x19e34d){return{'name':_0x19e34d[_0xab6e('0x2c')],'type':_0x19e34d[_0xab6e('0x2d')][_0xab6e('0x2e')]};});_0x4a7e50['model']=_[_0xab6e('0x29')](_0x1430a2,'name');_0x4a7e50['query']=_['keys'](_0x78b543[_0xab6e('0x2f')]);_0x4a7e50[_0xab6e('0x30')]=_[_0xab6e('0x31')](_0x4a7e50['model'],_0x4a7e50[_0xab6e('0x2f')]);_0x174ad0[_0xab6e('0x32')]=_[_0xab6e('0x31')](_0x4a7e50[_0xab6e('0x33')],qs['fields'](_0x78b543[_0xab6e('0x2f')]['fields']));_0x174ad0[_0xab6e('0x32')]=_0x174ad0['attributes'][_0xab6e('0x34')]?_0x174ad0[_0xab6e('0x32')]:_0x4a7e50[_0xab6e('0x33')];if(!_0x78b543[_0xab6e('0x2f')][_0xab6e('0x35')](_0xab6e('0x36'))){_0x174ad0['limit']=qs[_0xab6e('0x1b')](_0x78b543['query'][_0xab6e('0x1b')]);_0x174ad0[_0xab6e('0x1a')]=qs[_0xab6e('0x1a')](_0x78b543[_0xab6e('0x2f')]['offset']);}_0x174ad0[_0xab6e('0x37')]=qs['sort'](_0x78b543[_0xab6e('0x2f')]['sort']);_0x174ad0[_0xab6e('0x38')]=qs[_0xab6e('0x30')](_[_0xab6e('0x39')](_0x78b543[_0xab6e('0x2f')],_0x4a7e50[_0xab6e('0x30')]),_0x1430a2);if(_0x78b543['query']['filter']){_0x174ad0['where']=_[_0xab6e('0x3a')](_0x174ad0[_0xab6e('0x38')],{'$or':_[_0xab6e('0x29')](_0x1430a2,function(_0x5e62f2){if(_0x5e62f2['type']!==_0xab6e('0x3b')){var _0x29aa94={};_0x29aa94[_0x5e62f2[_0xab6e('0x26')]]={'$like':'%'+_0x78b543['query'][_0xab6e('0x3c')]+'%'};return _0x29aa94;}})});}_0x174ad0=_['merge']({},_0x174ad0,_0x78b543[_0xab6e('0x3d')]);var _0xcea011={'where':_0x174ad0[_0xab6e('0x38')]};return db[_0xab6e('0x2a')][_0xab6e('0x1d')](_0xcea011)['then'](function(_0x1204ca){_0x1a0965[_0xab6e('0x1d')]=_0x1204ca;if(_0x78b543[_0xab6e('0x2f')]['includeAll']){_0x174ad0[_0xab6e('0x3e')]=[{'all':!![]}];}return db[_0xab6e('0x2a')]['findAll'](_0x174ad0);})[_0xab6e('0x22')](function(_0x4c3e93){_0x1a0965['rows']=_0x4c3e93;return _0x1a0965;})['then'](respondWithFilteredResult(_0x369464,_0x174ad0))['catch'](handleError(_0x369464,null));};exports['show']=function(_0x1dd1e5,_0x1ae993){var _0x3c5c05={'raw':!![],'where':{'id':_0x1dd1e5['params']['id']}},_0xace466={};_0xace466[_0xab6e('0x33')]=_[_0xab6e('0x3f')](db[_0xab6e('0x2a')][_0xab6e('0x2b')]);_0xace466[_0xab6e('0x2f')]=_[_0xab6e('0x3f')](_0x1dd1e5['query']);_0xace466[_0xab6e('0x30')]=_[_0xab6e('0x31')](_0xace466['model'],_0xace466[_0xab6e('0x2f')]);_0x3c5c05['attributes']=_[_0xab6e('0x31')](_0xace466[_0xab6e('0x33')],qs['fields'](_0x1dd1e5['query'][_0xab6e('0x40')]));_0x3c5c05['attributes']=_0x3c5c05[_0xab6e('0x32')][_0xab6e('0x34')]?_0x3c5c05['attributes']:_0xace466[_0xab6e('0x33')];if(_0x1dd1e5[_0xab6e('0x2f')][_0xab6e('0x41')]){_0x3c5c05['include']=[{'all':!![]}];}_0x3c5c05=_['merge']({},_0x3c5c05,_0x1dd1e5[_0xab6e('0x3d')]);return db[_0xab6e('0x2a')][_0xab6e('0x42')](_0x3c5c05)[_0xab6e('0x22')](handleEntityNotFound(_0x1ae993,null))[_0xab6e('0x22')](respondWithResult(_0x1ae993,null))[_0xab6e('0x43')](handleError(_0x1ae993,null));};exports['create']=function(_0x4ec2d6,_0x3f2026){return db['AnalyticTreeReport'][_0xab6e('0x44')](_0x4ec2d6[_0xab6e('0x45')],{})[_0xab6e('0x22')](respondWithResult(_0x3f2026,0xc9))[_0xab6e('0x43')](handleError(_0x3f2026,null));};exports['update']=function(_0x23a6ec,_0x27f7ce){if(_0x23a6ec['body']['id']){delete _0x23a6ec[_0xab6e('0x45')]['id'];}return db['AnalyticTreeReport'][_0xab6e('0x42')]({'where':{'id':_0x23a6ec[_0xab6e('0x46')]['id']}})['then'](handleEntityNotFound(_0x27f7ce,null))['then'](saveUpdates(_0x23a6ec[_0xab6e('0x45')],null))[_0xab6e('0x22')](respondWithResult(_0x27f7ce,null))[_0xab6e('0x43')](handleError(_0x27f7ce,null));};exports['destroy']=function(_0x10372e,_0x2dcab6){return db[_0xab6e('0x2a')][_0xab6e('0x42')]({'where':{'id':_0x10372e[_0xab6e('0x46')]['id']}})[_0xab6e('0x22')](handleEntityNotFound(_0x2dcab6,null))['then'](removeEntity(_0x2dcab6,null))['catch'](handleError(_0x2dcab6,null));}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js index 31c7ec2..a279a6e 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 _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 +var _0x8bfc=['request-promise','path','rimraf','../../config/environment','./analyticTreeReport.attributes','exports','define','analytics_report_trees','lodash','util','moment','bluebird'];(function(_0x476ec2,_0x1fc7df){var _0x53422e=function(_0x3f497c){while(--_0x3f497c){_0x476ec2['push'](_0x476ec2['shift']());}};_0x53422e(++_0x1fc7df);}(_0x8bfc,0x1c4));var _0xc8bf=function(_0x409353,_0xe9f04d){_0x409353=_0x409353-0x0;var _0x4f4b59=_0x8bfc[_0x409353];return _0x4f4b59;};'use strict';var _=require(_0xc8bf('0x0'));var util=require(_0xc8bf('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xc8bf('0x2'));var BPromise=require(_0xc8bf('0x3'));var rp=require(_0xc8bf('0x4'));var fs=require('fs');var path=require(_0xc8bf('0x5'));var rimraf=require(_0xc8bf('0x6'));var config=require(_0xc8bf('0x7'));var attributes=require(_0xc8bf('0x8'));module[_0xc8bf('0x9')]=function(_0x420516,_0xa60557){return _0x420516[_0xc8bf('0xa')]('AnalyticTreeReport',attributes,{'tableName':_0xc8bf('0xb'),'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 fefa6ab..d4c3124 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 _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 +var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x18da54,_0x27c8b6){var _0x4fbe3d=function(_0x22b760){while(--_0x22b760){_0x18da54['push'](_0x18da54['shift']());}};_0x4fbe3d(++_0x27c8b6);}(_0xdb28,0x106));var _0x8db2=function(_0x2698a2,_0x475aef){_0x2698a2=_0x2698a2-0x0;var _0x237fab=_0xdb28[_0x2698a2];return _0x237fab;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});} \ No newline at end of file diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js index 57e9e0c..6bcc0b8 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 _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 +var _0x5944=['update','delete','destroy','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller','get','index','/:id','show','post','put','isAuthenticated'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x5944,0x1cb));var _0x4594=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0x5944[_0x173441];return _0x2423a8;};'use strict';var multer=require(_0x4594('0x0'));var util=require(_0x4594('0x1'));var path=require('path');var timeout=require(_0x4594('0x2'));var express=require('express');var router=express[_0x4594('0x3')]();var fs_extra=require(_0x4594('0x4'));var auth=require(_0x4594('0x5'));var interaction=require(_0x4594('0x6'));var config=require(_0x4594('0x7'));var controller=require(_0x4594('0x8'));router[_0x4594('0x9')]('/',auth['isAuthenticated'](),controller[_0x4594('0xa')]);router['get'](_0x4594('0xb'),auth['isAuthenticated'](),controller[_0x4594('0xc')]);router[_0x4594('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x4594('0xe')](_0x4594('0xb'),auth[_0x4594('0xf')](),controller[_0x4594('0x10')]);router[_0x4594('0x11')](_0x4594('0xb'),auth[_0x4594('0xf')](),controller[_0x4594('0x12')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js index 49aab06..a777709 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 _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 +var _0xb48d=['sequelize','STRING'];(function(_0x29184b,_0xb55b72){var _0x2fefd9=function(_0x598549){while(--_0x598549){_0x29184b['push'](_0x29184b['shift']());}};_0x2fefd9(++_0xb55b72);}(_0xb48d,0x194));var _0xdb48=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0xb48d[_0x243b2f];return _0xcb3c2d;};'use strict';var Sequelize=require(_0xdb48('0x0'));module['exports']={'name':{'type':Sequelize[_0xdb48('0x1')]},'basename':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xdb48('0x1')]}}; \ No newline at end of file diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js index ddaa586..8a5023a 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 _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 +var _0xf30b=['../../config/utils','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','update','destroy','then','error','stack','name','index','Attachment','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','show','rawAttributes','includeAll','find','catch','clone','params','get','omit','createdAt','updatedAt','body','create','originalname','basename','file','mimetype','download','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api'];(function(_0x2531b4,_0x1e630b){var _0x32615c=function(_0x354c88){while(--_0x354c88){_0x2531b4['push'](_0x2531b4['shift']());}};_0x32615c(++_0x1e630b);}(_0xf30b,0x1ab));var _0xbf30=function(_0x1e0de7,_0x28b328){_0x1e0de7=_0x1e0de7-0x0;var _0x212ce6=_0xf30b[_0x1e0de7];return _0x212ce6;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbf30('0x0'));var zipdir=require(_0xbf30('0x1'));var jsonpatch=require(_0xbf30('0x2'));var rp=require(_0xbf30('0x3'));var moment=require(_0xbf30('0x4'));var BPromise=require(_0xbf30('0x5'));var Mustache=require(_0xbf30('0x6'));var util=require(_0xbf30('0x7'));var path=require(_0xbf30('0x8'));var sox=require(_0xbf30('0x9'));var csv=require('to-csv');var ejs=require(_0xbf30('0xa'));var fs=require('fs');var fs_extra=require(_0xbf30('0xb'));var _=require(_0xbf30('0xc'));var squel=require(_0xbf30('0xd'));var crypto=require(_0xbf30('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xbf30('0xf'));var toCsv=require('to-csv');var querystring=require(_0xbf30('0x10'));var Papa=require('papaparse');var Redis=require(_0xbf30('0x11'));var authService=require(_0xbf30('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xbf30('0x13'));var hardwareService=require(_0xbf30('0x14'));var logger=require(_0xbf30('0x15'))(_0xbf30('0x16'));var utils=require(_0xbf30('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2bfbf3,_0x505003){_0x505003=_0x505003||0xcc;return function(_0x33316e){if(_0x33316e){return _0x2bfbf3[_0xbf30('0x18')](_0x505003);}return _0x2bfbf3[_0xbf30('0x19')](_0x505003)[_0xbf30('0x1a')]();};}function respondWithResult(_0x4ff1be,_0x285d4d){_0x285d4d=_0x285d4d||0xc8;return function(_0x2a4d94){if(_0x2a4d94){return _0x4ff1be[_0xbf30('0x19')](_0x285d4d)[_0xbf30('0x1b')](_0x2a4d94);}};}function respondWithFilteredResult(_0x38eaf5,_0x2faa16){return function(_0x12ac65){if(_0x12ac65){var _0xe9cd9a=typeof _0x2faa16[_0xbf30('0x1c')]==='undefined'&&typeof _0x2faa16[_0xbf30('0x1d')]===_0xbf30('0x1e');var _0x5f0f71=_0x12ac65[_0xbf30('0x1f')];var _0x266000=_0xe9cd9a?0x0:_0x2faa16[_0xbf30('0x1c')];var _0x4204cc=_0xe9cd9a?_0x12ac65['count']:_0x2faa16['offset']+_0x2faa16[_0xbf30('0x1d')];var _0x2f3b26;if(_0x4204cc>=_0x5f0f71){_0x4204cc=_0x5f0f71;_0x2f3b26=0xc8;}else{_0x2f3b26=0xce;}_0x38eaf5[_0xbf30('0x19')](_0x2f3b26);return _0x38eaf5[_0xbf30('0x20')](_0xbf30('0x21'),_0x266000+'-'+_0x4204cc+'/'+_0x5f0f71)['json'](_0x12ac65);}return null;};}function patchUpdates(_0x1837fc){return function(_0x319564){try{jsonpatch['apply'](_0x319564,_0x1837fc,!![]);}catch(_0x56f844){return BPromise[_0xbf30('0x22')](_0x56f844);}return _0x319564['save']();};}function saveUpdates(_0x3fe8de,_0x357619){return function(_0xb5240f){if(_0xb5240f){return _0xb5240f[_0xbf30('0x23')](_0x3fe8de)['then'](function(_0x46d5d3){return _0x46d5d3;});}return null;};}function removeEntity(_0x1ad0a2,_0x5bee21){return function(_0x4e1fad){if(_0x4e1fad){return _0x4e1fad[_0xbf30('0x24')]()[_0xbf30('0x25')](function(){_0x1ad0a2[_0xbf30('0x19')](0xcc)[_0xbf30('0x1a')]();});}};}function handleEntityNotFound(_0x500c76,_0x573bc6){return function(_0x23c461){if(!_0x23c461){_0x500c76['sendStatus'](0x194);}return _0x23c461;};}function handleError(_0xb36cc,_0x4bf75c){_0x4bf75c=_0x4bf75c||0x1f4;return function(_0x5cef28){logger[_0xbf30('0x26')](_0x5cef28[_0xbf30('0x27')]);if(_0x5cef28[_0xbf30('0x28')]){delete _0x5cef28[_0xbf30('0x28')];}_0xb36cc[_0xbf30('0x19')](_0x4bf75c)['send'](_0x5cef28);};}exports[_0xbf30('0x29')]=function(_0x44cbf7,_0x2d28d6){var _0x4c995b={},_0x59b8af={},_0x32d098={'count':0x0,'rows':[]};var _0x473346=_['map'](db[_0xbf30('0x2a')]['rawAttributes'],function(_0xde6fc0){return{'name':_0xde6fc0[_0xbf30('0x2b')],'type':_0xde6fc0[_0xbf30('0x2c')][_0xbf30('0x2d')]};});_0x59b8af[_0xbf30('0x2e')]=_[_0xbf30('0x2f')](_0x473346,'name');_0x59b8af[_0xbf30('0x30')]=_[_0xbf30('0x31')](_0x44cbf7[_0xbf30('0x30')]);_0x59b8af[_0xbf30('0x32')]=_[_0xbf30('0x33')](_0x59b8af[_0xbf30('0x2e')],_0x59b8af['query']);_0x4c995b['attributes']=_[_0xbf30('0x33')](_0x59b8af[_0xbf30('0x2e')],qs['fields'](_0x44cbf7['query'][_0xbf30('0x34')]));_0x4c995b['attributes']=_0x4c995b[_0xbf30('0x35')][_0xbf30('0x36')]?_0x4c995b['attributes']:_0x59b8af[_0xbf30('0x2e')];if(!_0x44cbf7['query'][_0xbf30('0x37')](_0xbf30('0x38'))){_0x4c995b['limit']=qs[_0xbf30('0x1d')](_0x44cbf7[_0xbf30('0x30')][_0xbf30('0x1d')]);_0x4c995b[_0xbf30('0x1c')]=qs[_0xbf30('0x1c')](_0x44cbf7[_0xbf30('0x30')][_0xbf30('0x1c')]);}_0x4c995b[_0xbf30('0x39')]=qs[_0xbf30('0x3a')](_0x44cbf7['query']['sort']);_0x4c995b[_0xbf30('0x3b')]=qs[_0xbf30('0x32')](_[_0xbf30('0x3c')](_0x44cbf7['query'],_0x59b8af[_0xbf30('0x32')]),_0x473346);if(_0x44cbf7['query']['filter']){_0x4c995b[_0xbf30('0x3b')]=_[_0xbf30('0x3d')](_0x4c995b[_0xbf30('0x3b')],{'$or':_[_0xbf30('0x2f')](_0x473346,function(_0x3e00a5){if(_0x3e00a5[_0xbf30('0x2c')]!==_0xbf30('0x3e')){var _0x406239={};_0x406239[_0x3e00a5['name']]={'$like':'%'+_0x44cbf7[_0xbf30('0x30')][_0xbf30('0x3f')]+'%'};return _0x406239;}})});}_0x4c995b=_['merge']({},_0x4c995b,_0x44cbf7[_0xbf30('0x40')]);var _0x11b140={'where':_0x4c995b['where']};return db['Attachment']['count'](_0x11b140)[_0xbf30('0x25')](function(_0x2d194d){_0x32d098[_0xbf30('0x1f')]=_0x2d194d;if(_0x44cbf7[_0xbf30('0x30')]['includeAll']){_0x4c995b[_0xbf30('0x41')]=[{'all':!![]}];}return db[_0xbf30('0x2a')][_0xbf30('0x42')](_0x4c995b);})['then'](function(_0x385935){_0x32d098['rows']=_0x385935;return _0x32d098;})[_0xbf30('0x25')](respondWithFilteredResult(_0x2d28d6,_0x4c995b))['catch'](handleError(_0x2d28d6,null));};exports[_0xbf30('0x43')]=function(_0x328809,_0x5df86b){var _0x187090={'raw':!![],'where':{'id':_0x328809['params']['id']}},_0x80fe86={};_0x80fe86[_0xbf30('0x2e')]=_[_0xbf30('0x31')](db[_0xbf30('0x2a')][_0xbf30('0x44')]);_0x80fe86[_0xbf30('0x30')]=_['keys'](_0x328809[_0xbf30('0x30')]);_0x80fe86[_0xbf30('0x32')]=_[_0xbf30('0x33')](_0x80fe86[_0xbf30('0x2e')],_0x80fe86[_0xbf30('0x30')]);_0x187090[_0xbf30('0x35')]=_[_0xbf30('0x33')](_0x80fe86['model'],qs[_0xbf30('0x34')](_0x328809['query'][_0xbf30('0x34')]));_0x187090['attributes']=_0x187090[_0xbf30('0x35')][_0xbf30('0x36')]?_0x187090[_0xbf30('0x35')]:_0x80fe86[_0xbf30('0x2e')];if(_0x328809[_0xbf30('0x30')][_0xbf30('0x45')]){_0x187090[_0xbf30('0x41')]=[{'all':!![]}];}_0x187090=_[_0xbf30('0x3d')]({},_0x187090,_0x328809[_0xbf30('0x40')]);return db[_0xbf30('0x2a')][_0xbf30('0x46')](_0x187090)[_0xbf30('0x25')](handleEntityNotFound(_0x5df86b,null))[_0xbf30('0x25')](respondWithResult(_0x5df86b,null))[_0xbf30('0x47')](handleError(_0x5df86b,null));};exports[_0xbf30('0x48')]=function(_0x5ae6bb,_0x570712){var _0x5acb54={'where':{'id':_0x5ae6bb[_0xbf30('0x49')]['id']}},_0x120d55={};_0x120d55[_0xbf30('0x2e')]=_[_0xbf30('0x31')](db[_0xbf30('0x2a')]['rawAttributes']);_0x5acb54[_0xbf30('0x35')]=_[_0xbf30('0x33')](_0x120d55[_0xbf30('0x2e')],qs['fields'](_0x5ae6bb[_0xbf30('0x30')][_0xbf30('0x34')]));_0x5acb54[_0xbf30('0x35')]=_0x5acb54[_0xbf30('0x35')][_0xbf30('0x36')]?_0x5acb54[_0xbf30('0x35')]:_0x120d55['model'];if(_0x5ae6bb[_0xbf30('0x30')][_0xbf30('0x45')]){_0x5acb54[_0xbf30('0x41')]=[{'all':!![]}];}_0x5acb54=_[_0xbf30('0x3d')]({},_0x5acb54,_0x5ae6bb['options']);return db['Attachment'][_0xbf30('0x46')](_0x5acb54)['then'](handleEntityNotFound(_0x570712,null))['then'](function(_0x1070fe){if(_0x1070fe){var _0x40bde6=_0x1070fe[_0xbf30('0x4a')]({'plain':!![]});_0x40bde6=qs[_0xbf30('0x4b')](_0x40bde6,['id',_0xbf30('0x4c'),_0xbf30('0x4d')]);_0x5ae6bb[_0xbf30('0x4e')]=_['omit'](_0x5ae6bb[_0xbf30('0x4e')],['id','createdAt','updatedAt']);return db[_0xbf30('0x2a')][_0xbf30('0x4f')](_[_0xbf30('0x3d')](_0x40bde6,_0x5ae6bb[_0xbf30('0x4e')]),{'include':_0x5ae6bb[_0xbf30('0x30')][_0xbf30('0x45')]?[{'all':!![]}]:undefined});}})[_0xbf30('0x25')](respondWithResult(_0x570712,0xc9))[_0xbf30('0x47')](handleError(_0x570712,null));};exports[_0xbf30('0x23')]=function(_0x3f1c67,_0x36a8a3){if(_0x3f1c67[_0xbf30('0x4e')]['id']){delete _0x3f1c67[_0xbf30('0x4e')]['id'];}return db[_0xbf30('0x2a')][_0xbf30('0x46')]({'where':{'id':_0x3f1c67[_0xbf30('0x49')]['id']}})['then'](handleEntityNotFound(_0x36a8a3,null))[_0xbf30('0x25')](saveUpdates(_0x3f1c67[_0xbf30('0x4e')],null))['then'](respondWithResult(_0x36a8a3,null))[_0xbf30('0x47')](handleError(_0x36a8a3,null));};exports[_0xbf30('0x24')]=function(_0x3f6e5b,_0x1550e0){return db[_0xbf30('0x2a')][_0xbf30('0x46')]({'where':{'id':_0x3f6e5b[_0xbf30('0x49')]['id']}})[_0xbf30('0x25')](handleEntityNotFound(_0x1550e0,null))[_0xbf30('0x25')](removeEntity(_0x1550e0,null))['catch'](handleError(_0x1550e0,null));};exports['create']=function(_0x43cf64,_0x3e4882,_0x32a628){_0x43cf64[_0xbf30('0x4e')][_0xbf30('0x28')]=_0x43cf64['file'][_0xbf30('0x50')];_0x43cf64['body'][_0xbf30('0x51')]=_0x43cf64['file']['filename'];_0x43cf64[_0xbf30('0x4e')][_0xbf30('0x2c')]=_0x43cf64[_0xbf30('0x52')][_0xbf30('0x53')];return db[_0xbf30('0x2a')][_0xbf30('0x4f')](_0x43cf64['body'])[_0xbf30('0x25')](respondWithResult(_0x3e4882,0xc9))[_0xbf30('0x47')](handleError(_0x3e4882,null));};exports[_0xbf30('0x54')]=function(_0x1f5f80,_0xc58e9b,_0x2e3bf1){return db[_0xbf30('0x2a')]['findOne']({'where':{'id':_0x1f5f80['params']['id']},'raw':!![]})['then'](handleEntityNotFound(_0xc58e9b,null))[_0xbf30('0x25')](function(_0x2418a5){if(_0x2418a5){var _0x1061b3=_0x2418a5[_0xbf30('0x55')]!==null;var _0x35e766=path[_0xbf30('0x56')](config[_0xbf30('0x57')],_0xbf30('0x58'));if(_0x1061b3){_0x35e766=path['join'](_0x35e766,_0xbf30('0x59'));}var _0x6f02ec=path['join'](_0x35e766,_0x2418a5[_0xbf30('0x51')]);return _0xc58e9b['download'](_0x6f02ec);}})[_0xbf30('0x47')](handleError(_0xc58e9b,null));}; \ No newline at end of file diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js index ee38897..cad8e4c 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 _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 +var _0x96ba=['exports','define','attachments','lodash','util','api','bluebird','path','rimraf','../../config/environment','./attachment.attributes'];(function(_0x4beb7a,_0x246983){var _0x50c7dd=function(_0x4c006c){while(--_0x4c006c){_0x4beb7a['push'](_0x4beb7a['shift']());}};_0x50c7dd(++_0x246983);}(_0x96ba,0x163));var _0xa96b=function(_0x544463,_0x214963){_0x544463=_0x544463-0x0;var _0x1add2a=_0x96ba[_0x544463];return _0x1add2a;};'use strict';var _=require(_0xa96b('0x0'));var util=require(_0xa96b('0x1'));var logger=require('../../config/logger')(_0xa96b('0x2'));var moment=require('moment');var BPromise=require(_0xa96b('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa96b('0x4'));var rimraf=require(_0xa96b('0x5'));var config=require(_0xa96b('0x6'));var attributes=require(_0xa96b('0x7'));module[_0xa96b('0x8')]=function(_0x4fba8c,_0x983cca){return _0x4fba8c[_0xa96b('0x9')]('Attachment',attributes,{'tableName':_0xa96b('0xa'),'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 734d002..f271baa 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 _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 +var _0x25a3=['result','catch','Attachment','create','body','options','raw','then','CreateAttachment','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x500946,_0x2c8b40){var _0x11f902=function(_0x4a6ff8){while(--_0x4a6ff8){_0x500946['push'](_0x500946['shift']());}};_0x11f902(++_0x2c8b40);}(_0x25a3,0x121));var _0x325a=function(_0xf5b11c,_0x3985c9){_0xf5b11c=_0xf5b11c-0x0;var _0x377da2=_0x25a3[_0xf5b11c];return _0x377da2;};'use strict';var _=require(_0x325a('0x0'));var util=require(_0x325a('0x1'));var moment=require(_0x325a('0x2'));var BPromise=require('bluebird');var rs=require(_0x325a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x325a('0x4'))['db'];var utils=require(_0x325a('0x5'));var logger=require(_0x325a('0x6'))('rpc');var config=require(_0x325a('0x7'));var jayson=require(_0x325a('0x8'));var client=jayson[_0x325a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x533867,_0x3bb82f,_0x209f5e){return new BPromise(function(_0x43bd79,_0x33f09a){return client['request'](_0x533867,_0x209f5e)['then'](function(_0x37e954){logger[_0x325a('0xa')](_0x325a('0xb'),_0x3bb82f,_0x325a('0xc'));logger[_0x325a('0xd')](_0x325a('0xe'),_0x3bb82f,'request\x20sent',JSON[_0x325a('0xf')](_0x37e954));if(_0x37e954[_0x325a('0x10')]){if(_0x37e954['error'][_0x325a('0x11')]===0x1f4){logger[_0x325a('0x10')](_0x325a('0xb'),_0x3bb82f,_0x37e954[_0x325a('0x10')]['message']);return _0x33f09a(_0x37e954['error'][_0x325a('0x12')]);}logger['error'](_0x325a('0xb'),_0x3bb82f,_0x37e954[_0x325a('0x10')][_0x325a('0x12')]);return _0x43bd79(_0x37e954[_0x325a('0x10')][_0x325a('0x12')]);}else{logger[_0x325a('0xa')](_0x325a('0xb'),_0x3bb82f,_0x325a('0xc'));_0x43bd79(_0x37e954[_0x325a('0x13')][_0x325a('0x12')]);}})[_0x325a('0x14')](function(_0x21315f){logger[_0x325a('0x10')](_0x325a('0xb'),_0x3bb82f,_0x21315f);_0x33f09a(_0x21315f);});});}exports['CreateAttachment']=function(_0x4cba7){var _0x4fbd50=this;return new Promise(function(_0x4a1f9f,_0x34c4c8){return db[_0x325a('0x15')][_0x325a('0x16')](_0x4cba7[_0x325a('0x17')],{'raw':_0x4cba7[_0x325a('0x18')]?_0x4cba7[_0x325a('0x18')][_0x325a('0x19')]===undefined?!![]:![]:!![]})[_0x325a('0x1a')](function(_0x347f2d){logger[_0x325a('0xa')](_0x325a('0x1b'),_0x4cba7);logger[_0x325a('0xd')]('CreateAttachment',_0x4cba7,JSON[_0x325a('0xf')](_0x347f2d));_0x4a1f9f(_0x347f2d);})[_0x325a('0x14')](function(_0x18e29f){logger[_0x325a('0x10')](_0x325a('0x1b'),_0x18e29f[_0x325a('0x12')],_0x4cba7);_0x34c4c8(_0x4fbd50['error'](0x1f4,_0x18e29f[_0x325a('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js index 48f6db2..0917d20 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 _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 +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(_0x443b5d,_0x41bd46){var _0x22602f=function(_0x3dc9fe){while(--_0x3dc9fe){_0x443b5d['push'](_0x443b5d['shift']());}};_0x22602f(++_0x41bd46);}(_0xb10b,0x12a));var _0xbb10=function(_0x5d31ee,_0x183e43){_0x5d31ee=_0x5d31ee-0x0;var _0x21c2e6=_0xb10b[_0x5d31ee];return _0x21c2e6;};'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 diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js index 5399f1d..7df774b 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 _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 +var _0x7e49=['moment','../../components/auth/service','signToken','../../config/utils','login','authenticate','google','/login','profile','email','callback','use','secret','callbackURL','Setting','findOne','blockDuration','then','find','map','emails','value','admin','user','agent','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy'];(function(_0x2ae003,_0x2a329a){var _0x58afaf=function(_0xbe6910){while(--_0xbe6910){_0x2ae003['push'](_0x2ae003['shift']());}};_0x58afaf(++_0x2a329a);}(_0x7e49,0x1dd));var _0x97e4=function(_0x50abf5,_0x4701dd){_0x50abf5=_0x50abf5-0x0;var _0x5e45c9=_0x7e49[_0x50abf5];return _0x5e45c9;};'use strict';var _=require(_0x97e4('0x0'));var passport=require(_0x97e4('0x1'));var GoogleStrategy=require(_0x97e4('0x2'))[_0x97e4('0x3')];var moment=require(_0x97e4('0x4'));var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var signToken=require(_0x97e4('0x5'))[_0x97e4('0x6')];var utils=require(_0x97e4('0x7'));exports[_0x97e4('0x8')]=passport[_0x97e4('0x9')](_0x97e4('0xa'),{'failureRedirect':_0x97e4('0xb'),'scope':[_0x97e4('0xc'),_0x97e4('0xd')],'session':![]});exports[_0x97e4('0xe')]=passport[_0x97e4('0x9')](_0x97e4('0xa'),{'failureRedirect':_0x97e4('0xb'),'session':![]});passport[_0x97e4('0xf')](new GoogleStrategy({'clientID':config[_0x97e4('0xa')]?config['google']['clientID']:'id','clientSecret':config[_0x97e4('0xa')]?config[_0x97e4('0xa')]['clientSecret']:_0x97e4('0x10'),'callbackURL':config[_0x97e4('0xa')]?config[_0x97e4('0xa')][_0x97e4('0x11')]:''},function(_0x4158b0,_0x4a2cdc,_0x291293,_0x2412f6){var _0x55f77a,_0x1b808c;return db[_0x97e4('0x12')][_0x97e4('0x13')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x97e4('0x14')],'raw':!![]})[_0x97e4('0x15')](function(_0x7b3670){_0x55f77a=_0x7b3670;return db['User'][_0x97e4('0x16')]({'where':{'email':_[_0x97e4('0x17')](_0x291293[_0x97e4('0x18')],_0x97e4('0x19')),'role':{'$or':[_0x97e4('0x1a'),_0x97e4('0x1b'),_0x97e4('0x1c')]}}});})[_0x97e4('0x15')](function(_0x5c9bc9){_0x1b808c=_0x5c9bc9;if(_0x1b808c){if(_0x1b808c[_0x97e4('0x1d')]){return _0x2412f6(_0x97e4('0x1e'));}else if(_0x55f77a[_0x97e4('0x14')]>0x0){if(_0x1b808c['blocked']){if(moment(_0x1b808c[_0x97e4('0x1f')])[_0x97e4('0x20')](_0x55f77a['blockDuration'],_0x97e4('0x21'))>moment()){return _0x2412f6(_0x97e4('0x1e'));}else{return utils[_0x97e4('0x22')](_0x1b808c,0x0,![],null)['then'](function(){return utils[_0x97e4('0x23')](_0x1b808c);})[_0x97e4('0x15')](function(){return _0x2412f6(null,_0x1b808c);});}}else{return utils[_0x97e4('0x23')](_0x1b808c)[_0x97e4('0x15')](function(){return _0x2412f6(null,_0x1b808c);});}}else{return utils[_0x97e4('0x23')](_0x1b808c)[_0x97e4('0x15')](function(){return _0x2412f6(null,_0x1b808c);});}}return _0x2412f6(_0x97e4('0x1e'));})[_0x97e4('0x24')](function(_0x369448){_0x2412f6(_0x369448);});})); \ No newline at end of file diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js index 558bb51..1d871bc 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 _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 +var _0x85b7=['callback','isMiddleware','login','setTokenCookie','exports','passport','Router','./authGoogle.controller','../user/user.controller.js','../../components/auth/service','get','/callback'];(function(_0xe65e54,_0x5dc84c){var _0x17fe72=function(_0x5e8be6){while(--_0x5e8be6){_0xe65e54['push'](_0xe65e54['shift']());}};_0x17fe72(++_0x5dc84c);}(_0x85b7,0x1f1));var _0x785b=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x85b7[_0x13d07a];return _0x5ee0ee;};'use strict';var express=require('express');var passport=require(_0x785b('0x0'));var router=express[_0x785b('0x1')]();var controller=require(_0x785b('0x2'));var userController=require(_0x785b('0x3'));var authService=require(_0x785b('0x4'));router[_0x785b('0x5')]('/',controller['login']);router[_0x785b('0x5')](_0x785b('0x6'),controller[_0x785b('0x7')],authService[_0x785b('0x8')],userController[_0x785b('0x9')],authService[_0x785b('0xa')]);module[_0x785b('0xb')]=router; \ No newline at end of file diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js index 953320f..6a6f04f 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 _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 +var _0x076b=['pass','format','\x22%s\x22\x20<%s>','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','status','send','login','local','signToken','json','online','body','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','minutes','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','xCally\x20Motion\x20Password\x20Reset','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','headers','/reset/','Reset\x20Email\x20sent!','reset','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','validatePasswordPattern','previousPasswords','resetPasswordToken','save','use','util','passport','passport-local','Strategy','jayson/promise','randomstring','moment','../../mysqldb','../../config/utils','http','findOne','allowedLoginAttempts','blockDuration','name','password','role','disabled','blocked','blockedAt','admin','then','authenticate','loginAttempts','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','clearBlockUser','add','getLicense','catch','MailAccount','find','email','Smtp','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','service','host','port','secure','authentication','auth','user'];(function(_0x86c66d,_0x10a8c8){var _0x537f30=function(_0x269c14){while(--_0x269c14){_0x86c66d['push'](_0x86c66d['shift']());}};_0x537f30(++_0x10a8c8);}(_0x076b,0x76));var _0xb076=function(_0x37bc24,_0x74f2cc){_0x37bc24=_0x37bc24-0x0;var _0x3acaa1=_0x076b[_0x37bc24];return _0x3acaa1;};'use strict';var util=require(_0xb076('0x0'));var passport=require(_0xb076('0x1'));var LocalStrategy=require(_0xb076('0x2'))[_0xb076('0x3')];var jayson=require(_0xb076('0x4'));var _=require('lodash');var rs=require(_0xb076('0x5'));var moment=require(_0xb076('0x6'));var db=require(_0xb076('0x7'))['db'];var authService=require('../../components/auth/service');var utils=require(_0xb076('0x8'));var client=jayson['client'][_0xb076('0x9')]({'port':0x232b});function localAuthenticate(_0x318c0a,_0x2562d5,_0x215362,_0x388afc){var _0x538b52,_0x4eb6d2;return db['Setting'][_0xb076('0xa')]({'where':{'id':0x1},'attributes':[_0xb076('0xb'),_0xb076('0xc')],'raw':!![]})['then'](function(_0x5bca38){_0x538b52=_0x5bca38;return _0x318c0a['findOne']({'attributes':['id',_0xb076('0xd'),_0xb076('0xe'),'salt',_0xb076('0xf'),_0xb076('0x10'),_0xb076('0x11'),_0xb076('0x12'),'loginAttempts'],'where':{'name':_0x2562d5,'role':{'$or':[_0xb076('0x13'),'user','agent']}}});})[_0xb076('0x14')](function(_0x33008c){if(!_0x33008c||_0x33008c&&_0x33008c[_0xb076('0xd')]!==_0x2562d5){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x4eb6d2=_0x33008c;return _0x4eb6d2;}})['then'](function(){_0x4eb6d2[_0xb076('0x15')](_0x215362,function(_0x281e42,_0x2c3897){var _0x137786=_0x4eb6d2[_0xb076('0x16')]+0x1;if(_0x281e42){return _0x388afc(_0x281e42);}else if(!_0x2c3897){if(_0x4eb6d2[_0xb076('0x10')]){return _0x388afc(null,![],{'message':_0xb076('0x17')});}else if(_0x538b52[_0xb076('0xb')]>0x0){if(_0x4eb6d2[_0xb076('0x11')]){if(_0x538b52[_0xb076('0xc')]>0x0){if(moment(_0x4eb6d2[_0xb076('0x12')])['add'](_0x538b52[_0xb076('0xc')],'minutes')>moment()){return _0x388afc(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils['clearBlockUser'](_0x4eb6d2,_0x137786,![],null)[_0xb076('0x14')](function(){return _0x388afc(null,![],{'message':_0xb076('0x17')});});}}else{return _0x388afc(null,![],{'message':_0xb076('0x17')});}}else{if(_0x137786>=_0x538b52[_0xb076('0xb')]){return utils[_0xb076('0x18')](_0x4eb6d2,0x0,!![],moment())[_0xb076('0x14')](function(){return _0x388afc(null,![],{'message':_0xb076('0x17')});});}else{return utils[_0xb076('0x18')](_0x4eb6d2,_0x137786,![],null)[_0xb076('0x14')](function(){return _0x388afc(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x388afc(null,![],{'message':_0xb076('0x17')});}}else{if(_0x4eb6d2[_0xb076('0x10')]){return _0x388afc(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x538b52['allowedLoginAttempts']>0x0){if(_0x4eb6d2['blocked']){if(_0x538b52[_0xb076('0xc')]>0x0){if(moment(_0x4eb6d2[_0xb076('0x12')])[_0xb076('0x19')](_0x538b52[_0xb076('0xc')],'minutes')>moment()){return _0x388afc(null,![],{'message':_0xb076('0x17')});}else{return utils[_0xb076('0x18')](_0x4eb6d2,0x0,![],null)[_0xb076('0x14')](function(){return utils[_0xb076('0x1a')](_0x4eb6d2);})[_0xb076('0x14')](function(){return _0x388afc(null,_0x4eb6d2);});}}else{return _0x388afc(null,![],{'message':_0xb076('0x17')});}}else{return utils[_0xb076('0x18')](_0x4eb6d2,0x0,![],null)[_0xb076('0x14')](function(){return utils['getLicense'](_0x4eb6d2);})[_0xb076('0x14')](function(){return _0x388afc(null,_0x4eb6d2);})[_0xb076('0x1b')](function(_0x16ffe5){return _0x388afc(null,![],_0x16ffe5);});}}else{if(_0x4eb6d2['blocked']){return _0x388afc(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0xb076('0x1a')](_0x4eb6d2)[_0xb076('0x14')](function(){return _0x388afc(null,_0x4eb6d2);});}}}});})[_0xb076('0x1b')](function(_0x2c2fed){return _0x388afc(null,![],_0x2c2fed);});}function sendServiceMail(_0x37fa4e){return db[_0xb076('0x1c')][_0xb076('0x1d')]({'where':{'service':!![]},'attributes':['id',_0xb076('0xd'),_0xb076('0x1e')],'include':[{'model':db['MailServerOut'],'as':_0xb076('0x1f')}]})['then'](function(_0x18d866){if(!_0x18d866){throw new Error(_0xb076('0x20'));}var _0x16132f={'tls':{'rejectUnauthorized':![]}};if(_0x18d866[_0xb076('0x1f')][_0xb076('0x21')]){_0x16132f[_0xb076('0x21')]=_0x18d866[_0xb076('0x1f')][_0xb076('0x21')];}else{_0x16132f[_0xb076('0x22')]=_0x18d866['Smtp'][_0xb076('0x22')];_0x16132f[_0xb076('0x23')]=_0x18d866[_0xb076('0x1f')][_0xb076('0x23')];_0x16132f[_0xb076('0x24')]=_0x18d866['Smtp'][_0xb076('0x24')];}if(_0x18d866[_0xb076('0x1f')][_0xb076('0x25')]){_0x16132f[_0xb076('0x26')]={'user':_0x18d866[_0xb076('0x1f')][_0xb076('0x27')],'pass':_0x18d866[_0xb076('0x1f')][_0xb076('0x28')]};}var _0x66e766={'account':_0x16132f,'message':_['merge']({'from':util[_0xb076('0x29')](_0xb076('0x2a'),_0x18d866['name'],_0x18d866[_0xb076('0x1e')]||_0x18d866[_0xb076('0x1f')][_0xb076('0x27')])},_0x37fa4e)};return client[_0xb076('0x2b')](_0xb076('0x2c'),_0x66e766);})[_0xb076('0x14')](function(_0x232b09){if(_0x232b09[_0xb076('0x2d')]){throw new Error(util[_0xb076('0x29')](_0xb076('0x2e'),_0x232b09[_0xb076('0x2d')][_0xb076('0x2f')]||JSON[_0xb076('0x30')](_0x232b09[_0xb076('0x2d')])));}return!![];});}function handleError(_0x297fbf,_0x451180,_0x15ce58){return _0x297fbf[_0xb076('0x31')](_0x451180||0x1f4)[_0xb076('0x32')]({'message':_0x15ce58?_0x15ce58['message']||_0x15ce58:''});}exports[_0xb076('0x33')]=function(_0x19433e,_0x2a654e,_0x36e809){passport['authenticate'](_0xb076('0x34'),function(_0x5c3438,_0xd9db30,_0x231bc6){var _0x219b42=_0x5c3438||_0x231bc6;if(_0x219b42){return handleError(_0x2a654e,0x191,_0x219b42);}if(!_0xd9db30){return handleError(_0x2a654e,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x3b1680={'payload':{'id':_0xd9db30['id'],'role':_0xd9db30['role']},'options':{'expiresIn':0x15180}};return authService[_0xb076('0x35')](_0x3b1680)[_0xb076('0x14')](function(_0xceee42){_0x2a654e[_0xb076('0x36')]({'id':_0xd9db30['id'],'token':_0xceee42,'statusCall':'','isAlreadyLogged':_0xd9db30[_0xb076('0x37')]});});}})(_0x19433e,_0x2a654e,_0x36e809);};exports['forgot']=function(_0x32e56d,_0x1c52c9,_0x5c4aae){if(!_0x32e56d[_0xb076('0x38')][_0xb076('0x1e')]){return handleError(_0x1c52c9,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x5bd7d0=rs['generate']();_0x32e56d[_0xb076('0x38')][_0xb076('0x1e')]=_0x32e56d[_0xb076('0x38')][_0xb076('0x1e')]['trim']()[_0xb076('0x39')]();var _0x42a7a1;return db['Setting']['findOne']({'where':{'id':0x1},'attributes':[_0xb076('0xb'),'blockDuration'],'raw':!![]})['then'](function(_0x5d8d59){_0x42a7a1=_0x5d8d59;return db[_0xb076('0x3a')][_0xb076('0x1d')]({'where':{'email':_0x32e56d[_0xb076('0x38')]['email']}});})[_0xb076('0x14')](function(_0x2acd99){if(!_0x2acd99){throw new Error(_0xb076('0x3b'));}if(_0x2acd99[_0xb076('0x10')]){throw new Error(_0xb076('0x3c'));}if(_0x2acd99[_0xb076('0x11')]){if(moment(_0x2acd99[_0xb076('0x12')])[_0xb076('0x19')](_0x42a7a1['blockDuration'],_0xb076('0x3d'))>moment()){throw new Error(_0xb076('0x3e'));}else{_0x2acd99[_0xb076('0x11')]=![];_0x2acd99[_0xb076('0x12')]=null;}}_0x2acd99['resetPasswordToken']=_0x5bd7d0;_0x2acd99[_0xb076('0x3f')]=Date[_0xb076('0x40')]()+0x36ee80;return _0x2acd99['save']();})[_0xb076('0x14')](function(){return sendServiceMail({'to':_0x32e56d[_0xb076('0x38')][_0xb076('0x1e')],'subject':_0xb076('0x41'),'text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0xb076('0x42')+'https://'+_0x32e56d[_0xb076('0x43')][_0xb076('0x22')]+_0xb076('0x44')+_0x5bd7d0+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})[_0xb076('0x14')](function(){_0x1c52c9[_0xb076('0x31')](0xc8)[_0xb076('0x32')]({'message':_0xb076('0x45')});})[_0xb076('0x1b')](function(_0x4a2e23){return handleError(_0x1c52c9,0x1f4,_0x4a2e23);});};exports[_0xb076('0x46')]=function(_0x263bea,_0x39512a,_0x49a659){return db[_0xb076('0x3a')][_0xb076('0x1d')]({'where':{'resetPasswordToken':_0x263bea['params']['token'],'resetPasswordExpires':{'$gt':Date[_0xb076('0x40')]()}}})['then'](function(_0x58f5d7){if(!_0x58f5d7){throw new Error(_0xb076('0x47'));}return db['Setting'][_0xb076('0xa')]({'attributes':['id',_0xb076('0x48'),_0xb076('0x49'),'passwordHistoryLimit']})[_0xb076('0x14')](function(_0x4e77b1){if(_0x4e77b1[_0xb076('0x48')])authService[_0xb076('0x4a')](_0x263bea[_0xb076('0x38')][_0xb076('0xe')]);if(!_0x4e77b1[_0xb076('0x49')]||!_0x58f5d7[_0xb076('0x4b')])return _0x58f5d7;authService['validatePasswordHistory'](_0x263bea[_0xb076('0x38')][_0xb076('0xe')],_0x58f5d7[_0xb076('0x4b')],_0x4e77b1['passwordHistoryLimit']);return _0x58f5d7;})['then'](function(){_0x58f5d7['password']=_0x263bea[_0xb076('0x38')]['password'];_0x58f5d7[_0xb076('0x4c')]=null;_0x58f5d7[_0xb076('0x3f')]=null;return _0x58f5d7[_0xb076('0x4d')]();});})[_0xb076('0x14')](function(){_0x39512a[_0xb076('0x31')](0xc8)[_0xb076('0x32')]({'message':'Password\x20reset!'});})['catch'](function(_0x57ae4e){return handleError(_0x39512a,0x1f4,_0x57ae4e);});};passport[_0xb076('0x4e')](new LocalStrategy({'usernameField':_0xb076('0xd'),'passwordField':_0xb076('0xe')},function(_0x4d7707,_0x439da1,_0x194662){return localAuthenticate(db[_0xb076('0x3a')],_0x4d7707,_0x439da1,_0x194662);})); \ No newline at end of file diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js index 07ee7bb..754a843 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 _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 +var _0x0172=['forgot','/reset/:token','exports','express','Router','post','/forgot'];(function(_0x1a4549,_0x456edf){var _0xd59845=function(_0x321213){while(--_0x321213){_0x1a4549['push'](_0x1a4549['shift']());}};_0xd59845(++_0x456edf);}(_0x0172,0x168));var _0x2017=function(_0x2ca469,_0xfb71dd){_0x2ca469=_0x2ca469-0x0;var _0x111347=_0x0172[_0x2ca469];return _0x111347;};'use strict';var express=require(_0x2017('0x0'));var router=express[_0x2017('0x1')]();var controller=require('./authLocal.controller');router[_0x2017('0x2')]('/',controller['login']);router[_0x2017('0x2')](_0x2017('0x3'),controller[_0x2017('0x4')]);router[_0x2017('0x2')](_0x2017('0x5'),controller['reset']);module[_0x2017('0x6')]=router; \ No newline at end of file diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js index fef2092..21258e8 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 _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 +var _0x6c1f=['STRING','BOOLEAN','sequelize','exports'];(function(_0x31e29a,_0x349c9b){var _0x32d892=function(_0x41cc86){while(--_0x41cc86){_0x31e29a['push'](_0x31e29a['shift']());}};_0x32d892(++_0x349c9b);}(_0x6c1f,0x8a));var _0xf6c1=function(_0x4287bd,_0x4b6c73){_0x4287bd=_0x4287bd-0x0;var _0x7a7d4b=_0x6c1f[_0x4287bd];return _0x7a7d4b;};'use strict';var Sequelize=require(_0xf6c1('0x0'));module[_0xf6c1('0x1')]={'name':{'type':Sequelize[_0xf6c1('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0xf6c1('0x2')]},'description':{'type':Sequelize[_0xf6c1('0x2')]},'status':{'type':Sequelize[_0xf6c1('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa}}; \ No newline at end of file diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js index 37f8d22..ea00aed 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 _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 +var _0xbbe7=['ejs','fs-extra','squel','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','../../mysqldb','status','end','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','sendStatus','error','name','index','Automation','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','filter','where','map','merge','options','includeAll','findAll','rows','catch','params','create','body','find','addConditions','Condition','ids','getConditions','nolimit','addActions','findOne','Action','pick','getActions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv'];(function(_0x21fe49,_0x4fe88a){var _0x196edc=function(_0xe64e7){while(--_0xe64e7){_0x21fe49['push'](_0x21fe49['shift']());}};_0x196edc(++_0x4fe88a);}(_0xbbe7,0x9e));var _0x7bbe=function(_0x2937ff,_0x2af67a){_0x2937ff=_0x2937ff-0x0;var _0x454794=_0xbbe7[_0x2937ff];return _0x454794;};'use strict';var emlformat=require(_0x7bbe('0x0'));var rimraf=require(_0x7bbe('0x1'));var zipdir=require(_0x7bbe('0x2'));var jsonpatch=require(_0x7bbe('0x3'));var rp=require(_0x7bbe('0x4'));var moment=require(_0x7bbe('0x5'));var BPromise=require(_0x7bbe('0x6'));var Mustache=require(_0x7bbe('0x7'));var util=require(_0x7bbe('0x8'));var path=require(_0x7bbe('0x9'));var sox=require(_0x7bbe('0xa'));var csv=require(_0x7bbe('0xb'));var ejs=require(_0x7bbe('0xc'));var fs=require('fs');var fs_extra=require(_0x7bbe('0xd'));var _=require('lodash');var squel=require(_0x7bbe('0xe'));var crypto=require('crypto');var jsforce=require(_0x7bbe('0xf'));var deskjs=require(_0x7bbe('0x10'));var toCsv=require('to-csv');var querystring=require(_0x7bbe('0x11'));var Papa=require('papaparse');var Redis=require(_0x7bbe('0x12'));var authService=require(_0x7bbe('0x13'));var qs=require(_0x7bbe('0x14'));var as=require(_0x7bbe('0x15'));var hardwareService=require(_0x7bbe('0x16'));var logger=require(_0x7bbe('0x17'))(_0x7bbe('0x18'));var utils=require(_0x7bbe('0x19'));var config=require(_0x7bbe('0x1a'));var licenseUtil=require(_0x7bbe('0x1b'));var db=require(_0x7bbe('0x1c'))['db'];function respondWithStatusCode(_0x1a931b,_0x3ac008){_0x3ac008=_0x3ac008||0xcc;return function(_0x3c50fa){if(_0x3c50fa){return _0x1a931b['sendStatus'](_0x3ac008);}return _0x1a931b[_0x7bbe('0x1d')](_0x3ac008)[_0x7bbe('0x1e')]();};}function respondWithResult(_0x1e8b45,_0x2fb3a3){_0x2fb3a3=_0x2fb3a3||0xc8;return function(_0xd76a51){if(_0xd76a51){return _0x1e8b45[_0x7bbe('0x1d')](_0x2fb3a3)['json'](_0xd76a51);}};}function respondWithFilteredResult(_0x38545b,_0x3b4022){return function(_0x30acde){if(_0x30acde){var _0x4ff091=typeof _0x3b4022[_0x7bbe('0x1f')]===_0x7bbe('0x20')&&typeof _0x3b4022[_0x7bbe('0x21')]===_0x7bbe('0x20');var _0x4e3a5b=_0x30acde[_0x7bbe('0x22')];var _0x238cf2=_0x4ff091?0x0:_0x3b4022[_0x7bbe('0x1f')];var _0x46dc3e=_0x4ff091?_0x30acde[_0x7bbe('0x22')]:_0x3b4022['offset']+_0x3b4022['limit'];var _0x5dab24;if(_0x46dc3e>=_0x4e3a5b){_0x46dc3e=_0x4e3a5b;_0x5dab24=0xc8;}else{_0x5dab24=0xce;}_0x38545b[_0x7bbe('0x1d')](_0x5dab24);return _0x38545b[_0x7bbe('0x23')]('Content-Range',_0x238cf2+'-'+_0x46dc3e+'/'+_0x4e3a5b)['json'](_0x30acde);}return null;};}function patchUpdates(_0x19dded){return function(_0xa2676){try{jsonpatch[_0x7bbe('0x24')](_0xa2676,_0x19dded,!![]);}catch(_0x1a0efc){return BPromise[_0x7bbe('0x25')](_0x1a0efc);}return _0xa2676[_0x7bbe('0x26')]();};}function saveUpdates(_0x40a12f,_0x3d880d){return function(_0x3bac84){if(_0x3bac84){return _0x3bac84[_0x7bbe('0x27')](_0x40a12f)[_0x7bbe('0x28')](function(_0xd2e1ed){return _0xd2e1ed;});}return null;};}function removeEntity(_0x41778f,_0x40838b){return function(_0x36ac76){if(_0x36ac76){return _0x36ac76[_0x7bbe('0x29')]()['then'](function(){_0x41778f[_0x7bbe('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x35b99e,_0x556ef9){return function(_0x3c5849){if(!_0x3c5849){_0x35b99e[_0x7bbe('0x2a')](0x194);}return _0x3c5849;};}function handleError(_0x1c99e9,_0x4c2c73){_0x4c2c73=_0x4c2c73||0x1f4;return function(_0x3566a5){logger[_0x7bbe('0x2b')](_0x3566a5['stack']);if(_0x3566a5[_0x7bbe('0x2c')]){delete _0x3566a5['name'];}_0x1c99e9[_0x7bbe('0x1d')](_0x4c2c73)['send'](_0x3566a5);};}exports[_0x7bbe('0x2d')]=function(_0x180a43,_0x2c060f){var _0x14d8ca={},_0x4d38eb={},_0x4c3096={'count':0x0,'rows':[]};var _0x3e6fd3=_['map'](db[_0x7bbe('0x2e')][_0x7bbe('0x2f')],function(_0x4b0637){return{'name':_0x4b0637[_0x7bbe('0x30')],'type':_0x4b0637[_0x7bbe('0x31')][_0x7bbe('0x32')]};});_0x4d38eb[_0x7bbe('0x33')]=_['map'](_0x3e6fd3,'name');_0x4d38eb[_0x7bbe('0x34')]=_[_0x7bbe('0x35')](_0x180a43[_0x7bbe('0x34')]);_0x4d38eb[_0x7bbe('0x36')]=_[_0x7bbe('0x37')](_0x4d38eb[_0x7bbe('0x33')],_0x4d38eb[_0x7bbe('0x34')]);_0x14d8ca[_0x7bbe('0x38')]=_[_0x7bbe('0x37')](_0x4d38eb['model'],qs[_0x7bbe('0x39')](_0x180a43['query']['fields']));_0x14d8ca['attributes']=_0x14d8ca[_0x7bbe('0x38')][_0x7bbe('0x3a')]?_0x14d8ca['attributes']:_0x4d38eb[_0x7bbe('0x33')];if(!_0x180a43[_0x7bbe('0x34')][_0x7bbe('0x3b')]('nolimit')){_0x14d8ca[_0x7bbe('0x21')]=qs['limit'](_0x180a43['query'][_0x7bbe('0x21')]);_0x14d8ca[_0x7bbe('0x1f')]=qs[_0x7bbe('0x1f')](_0x180a43['query'][_0x7bbe('0x1f')]);}_0x14d8ca[_0x7bbe('0x3c')]=qs[_0x7bbe('0x3d')](_0x180a43[_0x7bbe('0x34')][_0x7bbe('0x3d')]);_0x14d8ca['where']=qs[_0x7bbe('0x36')](_['pick'](_0x180a43['query'],_0x4d38eb[_0x7bbe('0x36')]),_0x3e6fd3);if(_0x180a43[_0x7bbe('0x34')][_0x7bbe('0x3e')]){_0x14d8ca[_0x7bbe('0x3f')]=_['merge'](_0x14d8ca[_0x7bbe('0x3f')],{'$or':_[_0x7bbe('0x40')](_0x3e6fd3,function(_0x552077){if(_0x552077[_0x7bbe('0x31')]!=='VIRTUAL'){var _0x5662f6={};_0x5662f6[_0x552077[_0x7bbe('0x2c')]]={'$like':'%'+_0x180a43[_0x7bbe('0x34')][_0x7bbe('0x3e')]+'%'};return _0x5662f6;}})});}_0x14d8ca=_[_0x7bbe('0x41')]({},_0x14d8ca,_0x180a43[_0x7bbe('0x42')]);var _0x14edc2={'where':_0x14d8ca[_0x7bbe('0x3f')]};return db['Automation'][_0x7bbe('0x22')](_0x14edc2)[_0x7bbe('0x28')](function(_0x4b2590){_0x4c3096[_0x7bbe('0x22')]=_0x4b2590;if(_0x180a43['query'][_0x7bbe('0x43')]){_0x14d8ca['include']=[{'all':!![]}];}return db[_0x7bbe('0x2e')][_0x7bbe('0x44')](_0x14d8ca);})[_0x7bbe('0x28')](function(_0x4a5564){_0x4c3096[_0x7bbe('0x45')]=_0x4a5564;return _0x4c3096;})[_0x7bbe('0x28')](respondWithFilteredResult(_0x2c060f,_0x14d8ca))[_0x7bbe('0x46')](handleError(_0x2c060f,null));};exports['show']=function(_0x493285,_0x13c18b){var _0x24a3be={'raw':![],'where':{'id':_0x493285[_0x7bbe('0x47')]['id']}},_0x32ab75={};_0x32ab75[_0x7bbe('0x33')]=_[_0x7bbe('0x35')](db[_0x7bbe('0x2e')]['rawAttributes']);_0x32ab75[_0x7bbe('0x34')]=_[_0x7bbe('0x35')](_0x493285['query']);_0x32ab75[_0x7bbe('0x36')]=_[_0x7bbe('0x37')](_0x32ab75['model'],_0x32ab75[_0x7bbe('0x34')]);_0x24a3be['attributes']=_['intersection'](_0x32ab75[_0x7bbe('0x33')],qs[_0x7bbe('0x39')](_0x493285[_0x7bbe('0x34')]['fields']));_0x24a3be[_0x7bbe('0x38')]=_0x24a3be[_0x7bbe('0x38')][_0x7bbe('0x3a')]?_0x24a3be['attributes']:_0x32ab75[_0x7bbe('0x33')];if(_0x493285[_0x7bbe('0x34')][_0x7bbe('0x43')]){_0x24a3be['include']=[{'all':!![]}];}_0x24a3be=_[_0x7bbe('0x41')]({},_0x24a3be,_0x493285['options']);return db[_0x7bbe('0x2e')]['find'](_0x24a3be)[_0x7bbe('0x28')](handleEntityNotFound(_0x13c18b,null))[_0x7bbe('0x28')](respondWithResult(_0x13c18b,null))[_0x7bbe('0x46')](handleError(_0x13c18b,null));};exports[_0x7bbe('0x48')]=function(_0x3646c5,_0x3ccf1e){return db['Automation'][_0x7bbe('0x48')](_0x3646c5[_0x7bbe('0x49')],{})['then'](respondWithResult(_0x3ccf1e,0xc9))['catch'](handleError(_0x3ccf1e,null));};exports[_0x7bbe('0x27')]=function(_0x4e937d,_0x31956b){if(_0x4e937d[_0x7bbe('0x49')]['id']){delete _0x4e937d[_0x7bbe('0x49')]['id'];}return db[_0x7bbe('0x2e')][_0x7bbe('0x4a')]({'where':{'id':_0x4e937d['params']['id']}})[_0x7bbe('0x28')](handleEntityNotFound(_0x31956b,null))['then'](saveUpdates(_0x4e937d['body'],null))[_0x7bbe('0x28')](respondWithResult(_0x31956b,null))[_0x7bbe('0x46')](handleError(_0x31956b,null));};exports[_0x7bbe('0x29')]=function(_0x3ab8c7,_0x5f08c2){return db['Automation'][_0x7bbe('0x4a')]({'where':{'id':_0x3ab8c7[_0x7bbe('0x47')]['id']}})['then'](handleEntityNotFound(_0x5f08c2,null))[_0x7bbe('0x28')](removeEntity(_0x5f08c2,null))['catch'](handleError(_0x5f08c2,null));};exports[_0x7bbe('0x4b')]=function(_0x7cb6c1,_0x360d81,_0x28556c){return db[_0x7bbe('0x4c')][_0x7bbe('0x4a')]({'where':{'id':_0x7cb6c1[_0x7bbe('0x47')]['id']}})['then'](handleEntityNotFound(_0x360d81,null))[_0x7bbe('0x28')](function(_0x2ae643){if(_0x2ae643){return _0x2ae643[_0x7bbe('0x4b')](_0x7cb6c1[_0x7bbe('0x49')][_0x7bbe('0x4d')],_['omit'](_0x7cb6c1[_0x7bbe('0x49')],['ids','id'])||{});}})[_0x7bbe('0x28')](respondWithResult(_0x360d81,null))[_0x7bbe('0x46')](handleError(_0x360d81,null));};exports[_0x7bbe('0x4e')]=function(_0x1bda8e,_0x333a6a,_0x4af8be){var _0xe8b92={};var _0x353881={};var _0x15e00;var _0x4a47d3;return db[_0x7bbe('0x2e')]['findOne']({'where':{'id':_0x1bda8e[_0x7bbe('0x47')]['id']}})['then'](handleEntityNotFound(_0x333a6a,null))[_0x7bbe('0x28')](function(_0x3c5d85){if(_0x3c5d85){_0x15e00=_0x3c5d85;_0x353881[_0x7bbe('0x33')]=_[_0x7bbe('0x35')](db['Condition'][_0x7bbe('0x2f')]);_0x353881['query']=_['keys'](_0x1bda8e[_0x7bbe('0x34')]);_0x353881[_0x7bbe('0x36')]=_[_0x7bbe('0x37')](_0x353881[_0x7bbe('0x33')],_0x353881[_0x7bbe('0x34')]);_0xe8b92['attributes']=_['intersection'](_0x353881[_0x7bbe('0x33')],qs[_0x7bbe('0x39')](_0x1bda8e[_0x7bbe('0x34')][_0x7bbe('0x39')]));_0xe8b92['attributes']=_0xe8b92['attributes'][_0x7bbe('0x3a')]?_0xe8b92[_0x7bbe('0x38')]:_0x353881['model'];_0xe8b92[_0x7bbe('0x3c')]=qs[_0x7bbe('0x3d')](_0x1bda8e[_0x7bbe('0x34')]['sort']);_0xe8b92[_0x7bbe('0x3f')]=qs[_0x7bbe('0x36')](_['pick'](_0x1bda8e[_0x7bbe('0x34')],_0x353881['filters']));if(_0x1bda8e[_0x7bbe('0x34')]['filter']){_0xe8b92[_0x7bbe('0x3f')]=_['merge'](_0xe8b92['where'],{'$or':_[_0x7bbe('0x40')](_0xe8b92[_0x7bbe('0x38')],function(_0x35ff32){var _0x27bec9={};_0x27bec9[_0x35ff32]={'$like':'%'+_0x1bda8e[_0x7bbe('0x34')][_0x7bbe('0x3e')]+'%'};return _0x27bec9;})});}_0xe8b92=_['merge']({},_0xe8b92,_0x1bda8e[_0x7bbe('0x42')]);return _0x15e00[_0x7bbe('0x4e')](_0xe8b92);}})[_0x7bbe('0x28')](function(_0x5abc9c){if(_0x5abc9c){_0x4a47d3=_0x5abc9c[_0x7bbe('0x3a')];if(!_0x1bda8e[_0x7bbe('0x34')][_0x7bbe('0x3b')](_0x7bbe('0x4f'))){_0xe8b92[_0x7bbe('0x21')]=qs[_0x7bbe('0x21')](_0x1bda8e[_0x7bbe('0x34')][_0x7bbe('0x21')]);_0xe8b92[_0x7bbe('0x1f')]=qs[_0x7bbe('0x1f')](_0x1bda8e['query'][_0x7bbe('0x1f')]);}return _0x15e00[_0x7bbe('0x4e')](_0xe8b92);}})[_0x7bbe('0x28')](function(_0x19ad40){if(_0x19ad40){return _0x19ad40?{'count':_0x4a47d3,'rows':_0x19ad40}:null;}})[_0x7bbe('0x28')](respondWithResult(_0x333a6a,null))[_0x7bbe('0x46')](handleError(_0x333a6a,null));};exports[_0x7bbe('0x50')]=function(_0x2c91ea,_0x56ac39,_0x2daa81){return db['Action']['find']({'where':{'id':_0x2c91ea['params']['id']}})[_0x7bbe('0x28')](handleEntityNotFound(_0x56ac39,null))[_0x7bbe('0x28')](function(_0x80f2ce){if(_0x80f2ce){return _0x80f2ce[_0x7bbe('0x50')](_0x2c91ea[_0x7bbe('0x49')][_0x7bbe('0x4d')],_['omit'](_0x2c91ea[_0x7bbe('0x49')],[_0x7bbe('0x4d'),'id'])||{});}})['then'](respondWithResult(_0x56ac39,null))[_0x7bbe('0x46')](handleError(_0x56ac39,null));};exports['getActions']=function(_0x25b77f,_0x934ad3,_0x1d45c2){var _0x474d78={};var _0x4001bd={};var _0x432222;var _0x32afcb;return db[_0x7bbe('0x2e')][_0x7bbe('0x51')]({'where':{'id':_0x25b77f[_0x7bbe('0x47')]['id']}})[_0x7bbe('0x28')](handleEntityNotFound(_0x934ad3,null))['then'](function(_0x5d0187){if(_0x5d0187){_0x432222=_0x5d0187;_0x4001bd[_0x7bbe('0x33')]=_[_0x7bbe('0x35')](db[_0x7bbe('0x52')][_0x7bbe('0x2f')]);_0x4001bd[_0x7bbe('0x34')]=_['keys'](_0x25b77f[_0x7bbe('0x34')]);_0x4001bd['filters']=_[_0x7bbe('0x37')](_0x4001bd[_0x7bbe('0x33')],_0x4001bd[_0x7bbe('0x34')]);_0x474d78['attributes']=_['intersection'](_0x4001bd[_0x7bbe('0x33')],qs['fields'](_0x25b77f[_0x7bbe('0x34')][_0x7bbe('0x39')]));_0x474d78[_0x7bbe('0x38')]=_0x474d78[_0x7bbe('0x38')]['length']?_0x474d78['attributes']:_0x4001bd[_0x7bbe('0x33')];_0x474d78[_0x7bbe('0x3c')]=qs[_0x7bbe('0x3d')](_0x25b77f[_0x7bbe('0x34')][_0x7bbe('0x3d')]);_0x474d78[_0x7bbe('0x3f')]=qs['filters'](_[_0x7bbe('0x53')](_0x25b77f['query'],_0x4001bd[_0x7bbe('0x36')]));if(_0x25b77f['query'][_0x7bbe('0x3e')]){_0x474d78['where']=_[_0x7bbe('0x41')](_0x474d78[_0x7bbe('0x3f')],{'$or':_[_0x7bbe('0x40')](_0x474d78[_0x7bbe('0x38')],function(_0x68876){var _0x4f8812={};_0x4f8812[_0x68876]={'$like':'%'+_0x25b77f[_0x7bbe('0x34')][_0x7bbe('0x3e')]+'%'};return _0x4f8812;})});}_0x474d78=_['merge']({},_0x474d78,_0x25b77f['options']);return _0x432222[_0x7bbe('0x54')](_0x474d78);}})['then'](function(_0x307516){if(_0x307516){_0x32afcb=_0x307516['length'];if(!_0x25b77f['query']['hasOwnProperty'](_0x7bbe('0x4f'))){_0x474d78['limit']=qs[_0x7bbe('0x21')](_0x25b77f[_0x7bbe('0x34')]['limit']);_0x474d78[_0x7bbe('0x1f')]=qs[_0x7bbe('0x1f')](_0x25b77f[_0x7bbe('0x34')][_0x7bbe('0x1f')]);}return _0x432222[_0x7bbe('0x54')](_0x474d78);}})[_0x7bbe('0x28')](function(_0x837b23){if(_0x837b23){return _0x837b23?{'count':_0x32afcb,'rows':_0x837b23}:null;}})['then'](respondWithResult(_0x934ad3,null))[_0x7bbe('0x46')](handleError(_0x934ad3,null));}; \ No newline at end of file diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js index c2f1e59..d6c9bdb 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 _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 +var _0xcf8c=['exports','define','Automation','tools_automations','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./automation.attributes'];(function(_0x5b65cd,_0x55b72e){var _0x196f72=function(_0x26409b){while(--_0x26409b){_0x5b65cd['push'](_0x5b65cd['shift']());}};_0x196f72(++_0x55b72e);}(_0xcf8c,0xd4));var _0xccf8=function(_0x448346,_0x586de2){_0x448346=_0x448346-0x0;var _0x36de4d=_0xcf8c[_0x448346];return _0x36de4d;};'use strict';var _=require(_0xccf8('0x0'));var util=require('util');var logger=require(_0xccf8('0x1'))(_0xccf8('0x2'));var moment=require('moment');var BPromise=require(_0xccf8('0x3'));var rp=require(_0xccf8('0x4'));var fs=require('fs');var path=require(_0xccf8('0x5'));var rimraf=require(_0xccf8('0x6'));var config=require(_0xccf8('0x7'));var attributes=require(_0xccf8('0x8'));module[_0xccf8('0x9')]=function(_0x584fc5,_0x3097dc){return _0x584fc5[_0xccf8('0xa')](_0xccf8('0xb'),attributes,{'tableName':_0xccf8('0xc'),'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 b048208..5ab0fad 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 _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 +var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','Automation,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x48bafc,_0x42d635){var _0x4c4822=function(_0x55c968){while(--_0x55c968){_0x48bafc['push'](_0x48bafc['shift']());}};_0x4c4822(++_0x42d635);}(_0xdb28,0x106));var _0x8db2=function(_0x457c6e,_0x85f55f){_0x457c6e=_0x457c6e-0x0;var _0x3fb66a=_0xdb28[_0x457c6e];return _0x3fb66a;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('Automation,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});} \ No newline at end of file diff --git a/server/api/automation/index.js b/server/api/automation/index.js index 8f87fdd..02de9c0 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 _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 +var _0x89b2=['./automation.controller','get','index','isAuthenticated','getConditions','/:id/actions','post','create','addConditions','addActions','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x3b151a,_0x1124a3){var _0x5d7ce4=function(_0x26e6bc){while(--_0x26e6bc){_0x3b151a['push'](_0x3b151a['shift']());}};_0x5d7ce4(++_0x1124a3);}(_0x89b2,0xc6));var _0x289b=function(_0x1e5c8d,_0x1bd355){_0x1e5c8d=_0x1e5c8d-0x0;var _0x17f720=_0x89b2[_0x1e5c8d];return _0x17f720;};'use strict';var multer=require(_0x289b('0x0'));var util=require(_0x289b('0x1'));var path=require(_0x289b('0x2'));var timeout=require(_0x289b('0x3'));var express=require(_0x289b('0x4'));var router=express[_0x289b('0x5')]();var fs_extra=require(_0x289b('0x6'));var auth=require(_0x289b('0x7'));var interaction=require(_0x289b('0x8'));var config=require(_0x289b('0x9'));var controller=require(_0x289b('0xa'));router[_0x289b('0xb')]('/',auth['isAuthenticated'](),controller[_0x289b('0xc')]);router['get']('/:id',auth[_0x289b('0xd')](),controller['show']);router['get']('/:id/conditions',auth[_0x289b('0xd')](),controller[_0x289b('0xe')]);router[_0x289b('0xb')](_0x289b('0xf'),auth[_0x289b('0xd')](),controller['getActions']);router[_0x289b('0x10')]('/',auth['isAuthenticated'](),controller[_0x289b('0x11')]);router['post']('/:id/conditions',auth[_0x289b('0xd')](),controller[_0x289b('0x12')]);router['post'](_0x289b('0xf'),auth['isAuthenticated'](),controller[_0x289b('0x13')]);router[_0x289b('0x14')](_0x289b('0x15'),auth[_0x289b('0xd')](),controller[_0x289b('0x16')]);router[_0x289b('0x17')](_0x289b('0x15'),auth[_0x289b('0xd')](),controller[_0x289b('0x18')]);module[_0x289b('0x19')]=router; \ No newline at end of file diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js index 177d931..95369e8 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 _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 +var _0x4cfa=['#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','exports','STRING','name','ENUM','ivr','BOOLEAN','Active/Disactive\x20Campaign','UNSIGNED','Max\x20200\x20calls.','INTEGER','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','never','onlyIfOpen','always','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'];(function(_0xbfa189,_0x55f10e){var _0x3243e4=function(_0x6d56d0){while(--_0x6d56d0){_0xbfa189['push'](_0xbfa189['shift']());}};_0x3243e4(++_0x55f10e);}(_0x4cfa,0x7c));var _0xa4cf=function(_0x162ece,_0x3d8f88){_0x162ece=_0x162ece-0x0;var _0x10f23c=_0x4cfa[_0x162ece];return _0x10f23c;};'use strict';var Sequelize=require(_0xa4cf('0x0'));module[_0xa4cf('0x1')]={'name':{'type':Sequelize[_0xa4cf('0x2')],'unique':_0xa4cf('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0xa4cf('0x4')](_0xa4cf('0x5')),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0xa4cf('0x2')]},'active':{'type':Sequelize[_0xa4cf('0x6')],'defaultValue':0x0,'comment':_0xa4cf('0x7')},'limitCalls':{'type':Sequelize['INTEGER'](0x4)[_0xa4cf('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xa4cf('0x9')},'dialOriginateCallerIdName':{'type':Sequelize[_0xa4cf('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xa4cf('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0xa4cf('0xa')](0x3)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xa4cf('0xb')},'dialCongestionMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xa4cf('0xc')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0xd')},'dialBusyMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0xe')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0xa4cf('0xf')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0xa4cf('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xa4cf('0x2')],'defaultValue':_0xa4cf('0x10')},'dialCheckDuplicateType':{'type':Sequelize[_0xa4cf('0x4')]('always',_0xa4cf('0x11'),_0xa4cf('0x12')),'defaultValue':_0xa4cf('0x13')},'dialAMDActive':{'type':Sequelize[_0xa4cf('0x6')],'defaultValue':0x0,'comment':_0xa4cf('0x14')},'dialAMDInitialSilence':{'type':Sequelize[_0xa4cf('0xa')](0x9)[_0xa4cf('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xa4cf('0x15')},'dialAMDGreeting':{'type':Sequelize[_0xa4cf('0xa')](0x9)[_0xa4cf('0x8')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xa4cf('0xa')](0x9)[_0xa4cf('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xa4cf('0x16')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0xa4cf('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xa4cf('0x17')},'dialAMDMinWordLength':{'type':Sequelize['INTEGER'](0x9)[_0xa4cf('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xa4cf('0x18')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xa4cf('0xa')](0x9)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xa4cf('0x19')},'dialAMDSilenceThreshold':{'type':Sequelize[_0xa4cf('0xa')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xa4cf('0x1a')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0xa4cf('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xa4cf('0x1b')},'dialOrderByScheduledAt':{'type':Sequelize[_0xa4cf('0x4')]('DESC',_0xa4cf('0x1c')),'defaultValue':_0xa4cf('0x1d')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0xa4cf('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xa4cf('0x1e')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0xa4cf('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xa4cf('0x1f')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0x20')},'dialDropMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0x21')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xa4cf('0x22')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0x23')},'dialMachineMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)[_0xa4cf('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xa4cf('0x24')},'dialMachineRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)[_0xa4cf('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0x25')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xa4cf('0xa')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xa4cf('0x26')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xa4cf('0xa')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xa4cf('0x27')}}; \ No newline at end of file diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js index 64f494d..de24c4c 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 _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 +var _0x4442=['insert','COALESCE(phone,\x27\x27)','ListId\x20=\x20?','sequelize','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','then','destroy','get','IvrCampaigns','UserProfileResource','sendStatus','error','name','send','map','Campaign','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','keys','include','find','body','role','user','UserProfileSection','userProfileId','autoAssociation','create','clone','createdAt','updatedAt','omit','update','findOne','CmHopper','length','hasOwnProperty','CampaignId','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','CmHopperBlack','CmList','getLists','addLists','ids','spread','dialCheckDuplicateType','into','fromQuery','phone','ContactId','ListId','field','NOW()','scheduledAt','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','select','cm_hopper','CampaignId\x20=\x20?'];(function(_0xc4f483,_0x3c9184){var _0x221029=function(_0x5e57d5){while(--_0x5e57d5){_0xc4f483['push'](_0xc4f483['shift']());}};_0x221029(++_0x3c9184);}(_0x4442,0x196));var _0x2444=function(_0x35f2b6,_0x50d0cb){_0x35f2b6=_0x35f2b6-0x0;var _0x36a964=_0x4442[_0x35f2b6];return _0x36a964;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2444('0x0'));var zipdir=require(_0x2444('0x1'));var jsonpatch=require(_0x2444('0x2'));var rp=require(_0x2444('0x3'));var moment=require('moment');var BPromise=require(_0x2444('0x4'));var Mustache=require(_0x2444('0x5'));var util=require('util');var path=require(_0x2444('0x6'));var sox=require(_0x2444('0x7'));var csv=require(_0x2444('0x8'));var ejs=require(_0x2444('0x9'));var fs=require('fs');var fs_extra=require(_0x2444('0xa'));var _=require(_0x2444('0xb'));var squel=require(_0x2444('0xc'));var crypto=require('crypto');var jsforce=require(_0x2444('0xd'));var deskjs=require(_0x2444('0xe'));var toCsv=require(_0x2444('0x8'));var querystring=require(_0x2444('0xf'));var Papa=require(_0x2444('0x10'));var Redis=require(_0x2444('0x11'));var authService=require(_0x2444('0x12'));var qs=require(_0x2444('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x2444('0x14'));var logger=require('../../config/logger')(_0x2444('0x15'));var utils=require(_0x2444('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x2444('0x17'));var db=require(_0x2444('0x18'))['db'];function respondWithStatusCode(_0x338490,_0x33b423){_0x33b423=_0x33b423||0xcc;return function(_0x46d6a8){if(_0x46d6a8){return _0x338490['sendStatus'](_0x33b423);}return _0x338490[_0x2444('0x19')](_0x33b423)[_0x2444('0x1a')]();};}function respondWithResult(_0x2ce89a,_0x2b2bcb){_0x2b2bcb=_0x2b2bcb||0xc8;return function(_0x44ba97){if(_0x44ba97){return _0x2ce89a[_0x2444('0x19')](_0x2b2bcb)[_0x2444('0x1b')](_0x44ba97);}};}function respondWithFilteredResult(_0x4eff09,_0x17c24d){return function(_0x24c276){if(_0x24c276){var _0x24bc86=typeof _0x17c24d[_0x2444('0x1c')]===_0x2444('0x1d')&&typeof _0x17c24d['limit']===_0x2444('0x1d');var _0x3051b1=_0x24c276[_0x2444('0x1e')];var _0x48b8a4=_0x24bc86?0x0:_0x17c24d[_0x2444('0x1c')];var _0x2b36ba=_0x24bc86?_0x24c276[_0x2444('0x1e')]:_0x17c24d[_0x2444('0x1c')]+_0x17c24d[_0x2444('0x1f')];var _0x4f8aa0;if(_0x2b36ba>=_0x3051b1){_0x2b36ba=_0x3051b1;_0x4f8aa0=0xc8;}else{_0x4f8aa0=0xce;}_0x4eff09['status'](_0x4f8aa0);return _0x4eff09[_0x2444('0x20')](_0x2444('0x21'),_0x48b8a4+'-'+_0x2b36ba+'/'+_0x3051b1)[_0x2444('0x1b')](_0x24c276);}return null;};}function patchUpdates(_0x11f384){return function(_0x36763c){try{jsonpatch[_0x2444('0x22')](_0x36763c,_0x11f384,!![]);}catch(_0x32b6e){return BPromise[_0x2444('0x23')](_0x32b6e);}return _0x36763c[_0x2444('0x24')]();};}function saveUpdates(_0x169b2d,_0x397172){return function(_0x4d2e8d){if(_0x4d2e8d){return _0x4d2e8d['update'](_0x169b2d)[_0x2444('0x25')](function(_0x1394db){return _0x1394db;});}return null;};}function removeEntity(_0x4d7f9d,_0x4d1531){return function(_0x58c336){if(_0x58c336){return _0x58c336[_0x2444('0x26')]()[_0x2444('0x25')](function(){var _0x5afc30=_0x58c336[_0x2444('0x27')]({'plain':!![]});var _0x3416f3=_0x2444('0x28');return db[_0x2444('0x29')]['destroy']({'where':{'type':_0x3416f3,'resourceId':_0x5afc30['id']}})[_0x2444('0x25')](function(){return _0x58c336;});})[_0x2444('0x25')](function(){_0x4d7f9d[_0x2444('0x19')](0xcc)[_0x2444('0x1a')]();});}};}function handleEntityNotFound(_0x4e2f2d,_0x23f85d){return function(_0x53b9b8){if(!_0x53b9b8){_0x4e2f2d[_0x2444('0x2a')](0x194);}return _0x53b9b8;};}function handleError(_0x34d516,_0x6af9e4){_0x6af9e4=_0x6af9e4||0x1f4;return function(_0x3c668){logger[_0x2444('0x2b')](_0x3c668['stack']);if(_0x3c668[_0x2444('0x2c')]){delete _0x3c668[_0x2444('0x2c')];}_0x34d516['status'](_0x6af9e4)[_0x2444('0x2d')](_0x3c668);};}exports['index']=function(_0x257226,_0x2e9cce){var _0xcfc90={},_0x288b69={},_0x2859f7={'count':0x0,'rows':[]};var _0x4cd576=_[_0x2444('0x2e')](db[_0x2444('0x2f')][_0x2444('0x30')],function(_0x46121c){return{'name':_0x46121c[_0x2444('0x31')],'type':_0x46121c[_0x2444('0x32')][_0x2444('0x33')]};});_0x288b69[_0x2444('0x34')]=_[_0x2444('0x2e')](_0x4cd576,_0x2444('0x2c'));_0x288b69[_0x2444('0x35')]=_['keys'](_0x257226['query']);_0x288b69[_0x2444('0x36')]=_[_0x2444('0x37')](_0x288b69['model'],_0x288b69[_0x2444('0x35')]);_0xcfc90[_0x2444('0x38')]=_[_0x2444('0x37')](_0x288b69[_0x2444('0x34')],qs['fields'](_0x257226['query'][_0x2444('0x39')]));_0xcfc90[_0x2444('0x38')]=_0xcfc90['attributes']['length']?_0xcfc90[_0x2444('0x38')]:_0x288b69[_0x2444('0x34')];if(!_0x257226[_0x2444('0x35')]['hasOwnProperty'](_0x2444('0x3a'))){_0xcfc90[_0x2444('0x1f')]=qs['limit'](_0x257226[_0x2444('0x35')][_0x2444('0x1f')]);_0xcfc90['offset']=qs[_0x2444('0x1c')](_0x257226[_0x2444('0x35')][_0x2444('0x1c')]);}_0xcfc90[_0x2444('0x3b')]=qs[_0x2444('0x3c')](_0x257226['query'][_0x2444('0x3c')]);_0xcfc90['where']=qs['filters'](_[_0x2444('0x3d')](_0x257226[_0x2444('0x35')],_0x288b69[_0x2444('0x36')]),_0x4cd576);if(_0x257226[_0x2444('0x35')][_0x2444('0x3e')]){_0xcfc90[_0x2444('0x3f')]=_[_0x2444('0x40')](_0xcfc90[_0x2444('0x3f')],{'$or':_[_0x2444('0x2e')](_0x4cd576,function(_0x20d986){if(_0x20d986[_0x2444('0x32')]!==_0x2444('0x41')){var _0xa3fd60={};_0xa3fd60[_0x20d986['name']]={'$like':'%'+_0x257226['query']['filter']+'%'};return _0xa3fd60;}})});}_0xcfc90=_['merge']({},_0xcfc90,_0x257226[_0x2444('0x42')]);var _0x381c5f={'where':_0xcfc90['where']};return db[_0x2444('0x2f')]['count'](_0x381c5f)[_0x2444('0x25')](function(_0x4c0f31){_0x2859f7[_0x2444('0x1e')]=_0x4c0f31;if(_0x257226[_0x2444('0x35')][_0x2444('0x43')]){_0xcfc90['include']=[{'all':!![]}];}return db[_0x2444('0x2f')][_0x2444('0x44')](_0xcfc90);})[_0x2444('0x25')](function(_0x54cd4d){_0x2859f7[_0x2444('0x45')]=_0x54cd4d;return _0x2859f7;})[_0x2444('0x25')](respondWithFilteredResult(_0x2e9cce,_0xcfc90))[_0x2444('0x46')](handleError(_0x2e9cce,null));};exports[_0x2444('0x47')]=function(_0x1336b9,_0x4fe43b){var _0x4e4fe4={'raw':![],'where':{'id':_0x1336b9[_0x2444('0x48')]['id']}},_0x4c1334={};_0x4c1334[_0x2444('0x34')]=_[_0x2444('0x49')](db[_0x2444('0x2f')][_0x2444('0x30')]);_0x4c1334[_0x2444('0x35')]=_[_0x2444('0x49')](_0x1336b9['query']);_0x4c1334[_0x2444('0x36')]=_[_0x2444('0x37')](_0x4c1334[_0x2444('0x34')],_0x4c1334[_0x2444('0x35')]);_0x4e4fe4[_0x2444('0x38')]=_['intersection'](_0x4c1334[_0x2444('0x34')],qs['fields'](_0x1336b9[_0x2444('0x35')][_0x2444('0x39')]));_0x4e4fe4[_0x2444('0x38')]=_0x4e4fe4['attributes']['length']?_0x4e4fe4[_0x2444('0x38')]:_0x4c1334[_0x2444('0x34')];if(_0x1336b9['query']['includeAll']){_0x4e4fe4[_0x2444('0x4a')]=[{'all':!![]}];}_0x4e4fe4=_[_0x2444('0x40')]({},_0x4e4fe4,_0x1336b9[_0x2444('0x42')]);return db[_0x2444('0x2f')][_0x2444('0x4b')](_0x4e4fe4)['then'](handleEntityNotFound(_0x4fe43b,null))['then'](respondWithResult(_0x4fe43b,null))['catch'](handleError(_0x4fe43b,null));};exports['create']=function(_0x402269,_0x65c68d){return db[_0x2444('0x2f')]['create'](_0x402269[_0x2444('0x4c')],{})[_0x2444('0x25')](function(_0xf6979e){var _0xbce623=_0x402269['user'][_0x2444('0x27')]({'plain':!![]});if(!_0xbce623)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xbce623[_0x2444('0x4d')]===_0x2444('0x4e')){var _0x44048c=_0xf6979e[_0x2444('0x27')]({'plain':!![]});var _0x43cb9a='IvrCampaigns';return db[_0x2444('0x4f')][_0x2444('0x4b')]({'where':{'name':_0x43cb9a,'userProfileId':_0xbce623[_0x2444('0x50')]},'raw':!![]})[_0x2444('0x25')](function(_0x54e9f7){if(_0x54e9f7&&_0x54e9f7[_0x2444('0x51')]===0x0){return db[_0x2444('0x29')][_0x2444('0x52')]({'name':_0x44048c['name'],'resourceId':_0x44048c['id'],'type':_0x54e9f7[_0x2444('0x2c')],'sectionId':_0x54e9f7['id']},{})[_0x2444('0x25')](function(){return _0xf6979e;});}else{return _0xf6979e;}})[_0x2444('0x46')](function(_0x37be5f){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x37be5f);throw _0x37be5f;});}return _0xf6979e;})[_0x2444('0x25')](respondWithResult(_0x65c68d,0xc9))[_0x2444('0x46')](handleError(_0x65c68d,null));};exports[_0x2444('0x53')]=function(_0x21dcf7,_0x3085d8){var _0x353784={'where':{'id':_0x21dcf7[_0x2444('0x48')]['id']}},_0x55eef8={};_0x55eef8['model']=_[_0x2444('0x49')](db[_0x2444('0x2f')][_0x2444('0x30')]);_0x353784['attributes']=_['intersection'](_0x55eef8['model'],qs[_0x2444('0x39')](_0x21dcf7[_0x2444('0x35')][_0x2444('0x39')]));_0x353784[_0x2444('0x38')]=_0x353784[_0x2444('0x38')]['length']?_0x353784[_0x2444('0x38')]:_0x55eef8['model'];if(_0x21dcf7[_0x2444('0x35')][_0x2444('0x43')]){_0x353784[_0x2444('0x4a')]=[{'all':!![]}];}_0x353784=_[_0x2444('0x40')]({},_0x353784,_0x21dcf7['options']);return db[_0x2444('0x2f')][_0x2444('0x4b')](_0x353784)[_0x2444('0x25')](handleEntityNotFound(_0x3085d8,null))[_0x2444('0x25')](function(_0x5e7ab0){if(_0x5e7ab0){var _0x4f745d=_0x5e7ab0['get']({'plain':!![]});_0x4f745d=qs['omit'](_0x4f745d,['id',_0x2444('0x54'),_0x2444('0x55')]);_0x21dcf7[_0x2444('0x4c')]=_[_0x2444('0x56')](_0x21dcf7[_0x2444('0x4c')],['id',_0x2444('0x54'),_0x2444('0x55')]);return db[_0x2444('0x2f')][_0x2444('0x52')](_[_0x2444('0x40')](_0x4f745d,_0x21dcf7[_0x2444('0x4c')]),{'include':_0x21dcf7[_0x2444('0x35')][_0x2444('0x43')]?[{'all':!![]}]:undefined})[_0x2444('0x25')](function(_0x801924){var _0x49b396=_0x21dcf7[_0x2444('0x4e')]['get']({'plain':!![]});if(!_0x49b396)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x49b396[_0x2444('0x4d')]===_0x2444('0x4e')){var _0x5487c5=_0x801924[_0x2444('0x27')]({'plain':!![]});var _0x5ea66a=_0x2444('0x28');return db['UserProfileSection']['find']({'where':{'name':_0x5ea66a,'userProfileId':_0x49b396[_0x2444('0x50')]},'raw':!![]})[_0x2444('0x25')](function(_0x5b6849){if(_0x5b6849&&_0x5b6849[_0x2444('0x51')]===0x0){return db[_0x2444('0x29')][_0x2444('0x52')]({'name':_0x5487c5['name'],'resourceId':_0x5487c5['id'],'type':_0x5b6849[_0x2444('0x2c')],'sectionId':_0x5b6849['id']},{})[_0x2444('0x25')](function(){return _0x801924;});}else{return _0x801924;}})[_0x2444('0x46')](function(_0x4ad8c9){logger[_0x2444('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4ad8c9);throw _0x4ad8c9;});}return _0x801924;});}})['then'](respondWithResult(_0x3085d8,0xc9))[_0x2444('0x46')](handleError(_0x3085d8,null));};exports[_0x2444('0x57')]=function(_0x17395e,_0x22dacd){if(_0x17395e[_0x2444('0x4c')]['id']){delete _0x17395e[_0x2444('0x4c')]['id'];}return db[_0x2444('0x2f')]['find']({'where':{'id':_0x17395e[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x22dacd,null))[_0x2444('0x25')](saveUpdates(_0x17395e[_0x2444('0x4c')],null))[_0x2444('0x25')](respondWithResult(_0x22dacd,null))[_0x2444('0x46')](handleError(_0x22dacd,null));};exports[_0x2444('0x26')]=function(_0x400c5d,_0x48cc50){return db[_0x2444('0x2f')][_0x2444('0x4b')]({'where':{'id':_0x400c5d['params']['id']}})['then'](handleEntityNotFound(_0x48cc50,null))[_0x2444('0x25')](removeEntity(_0x48cc50,null))['catch'](handleError(_0x48cc50,null));};exports['getHoppers']=function(_0x4b28e5,_0x34598e,_0x23f2f1){var _0x58bad4={'raw':!![],'where':{}};var _0x369e8c={};var _0x473f92={'count':0x0,'rows':[]};return db[_0x2444('0x2f')][_0x2444('0x58')]({'where':{'id':_0x4b28e5[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x34598e,null))['then'](function(_0x3fdc0f){if(_0x3fdc0f){_0x369e8c['model']=_[_0x2444('0x49')](db[_0x2444('0x59')]['rawAttributes']);_0x369e8c['query']=_[_0x2444('0x49')](_0x4b28e5[_0x2444('0x35')]);_0x369e8c[_0x2444('0x36')]=_[_0x2444('0x37')](_0x369e8c['model'],_0x369e8c[_0x2444('0x35')]);_0x58bad4['attributes']=_[_0x2444('0x37')](_0x369e8c[_0x2444('0x34')],qs[_0x2444('0x39')](_0x4b28e5[_0x2444('0x35')][_0x2444('0x39')]));_0x58bad4['attributes']=_0x58bad4['attributes'][_0x2444('0x5a')]?_0x58bad4[_0x2444('0x38')]:_0x369e8c[_0x2444('0x34')];if(!_0x4b28e5[_0x2444('0x35')][_0x2444('0x5b')]('nolimit')){_0x58bad4[_0x2444('0x1f')]=qs[_0x2444('0x1f')](_0x4b28e5[_0x2444('0x35')][_0x2444('0x1f')]);_0x58bad4['offset']=qs[_0x2444('0x1c')](_0x4b28e5[_0x2444('0x35')][_0x2444('0x1c')]);}_0x58bad4['order']=qs[_0x2444('0x3c')](_0x4b28e5[_0x2444('0x35')][_0x2444('0x3c')]);_0x58bad4[_0x2444('0x3f')]=qs['filters'](_[_0x2444('0x3d')](_0x4b28e5[_0x2444('0x35')],_0x369e8c[_0x2444('0x36')]));_0x58bad4[_0x2444('0x3f')][_0x2444('0x5c')]=_0x3fdc0f['id'];if(_0x4b28e5['query'][_0x2444('0x3e')]){_0x58bad4['where']=_[_0x2444('0x40')](_0x58bad4[_0x2444('0x3f')],{'$or':_[_0x2444('0x2e')](_0x58bad4[_0x2444('0x38')],function(_0x5a390c){var _0x1e8c1c={};_0x1e8c1c[_0x5a390c]={'$like':'%'+_0x4b28e5[_0x2444('0x35')][_0x2444('0x3e')]+'%'};return _0x1e8c1c;})});}_0x58bad4=_[_0x2444('0x40')]({},_0x58bad4,_0x4b28e5[_0x2444('0x42')]);return db[_0x2444('0x59')]['count']({'where':_0x58bad4['where']})['then'](function(_0x3ff81d){_0x473f92['count']=_0x3ff81d;if(_0x4b28e5[_0x2444('0x35')][_0x2444('0x43')]){_0x58bad4[_0x2444('0x4a')]=[{'all':!![]}];}return db[_0x2444('0x59')]['findAll'](_0x58bad4);})[_0x2444('0x25')](function(_0x33c34f){_0x473f92[_0x2444('0x45')]=_0x33c34f;return _0x473f92;});}})[_0x2444('0x25')](respondWithFilteredResult(_0x34598e,_0x58bad4))[_0x2444('0x46')](handleError(_0x34598e,null));};exports[_0x2444('0x5d')]=function(_0x3165c0,_0x2d2a05,_0x4d00b7){var _0x2b8ffc={'raw':!![],'where':{}};var _0x47dc86={};var _0x1fbdb3={'count':0x0,'rows':[]};return db[_0x2444('0x2f')][_0x2444('0x58')]({'where':{'id':_0x3165c0['params']['id']}})['then'](handleEntityNotFound(_0x2d2a05,null))[_0x2444('0x25')](function(_0x2501e2){if(_0x2501e2){_0x47dc86['model']=_[_0x2444('0x49')](db[_0x2444('0x5e')][_0x2444('0x30')]);_0x47dc86[_0x2444('0x35')]=_['keys'](_0x3165c0[_0x2444('0x35')]);_0x47dc86[_0x2444('0x36')]=_[_0x2444('0x37')](_0x47dc86[_0x2444('0x34')],_0x47dc86['query']);_0x2b8ffc[_0x2444('0x38')]=_['intersection'](_0x47dc86[_0x2444('0x34')],qs[_0x2444('0x39')](_0x3165c0[_0x2444('0x35')]['fields']));_0x2b8ffc['attributes']=_0x2b8ffc[_0x2444('0x38')][_0x2444('0x5a')]?_0x2b8ffc['attributes']:_0x47dc86[_0x2444('0x34')];if(!_0x3165c0['query']['hasOwnProperty'](_0x2444('0x3a'))){_0x2b8ffc[_0x2444('0x1f')]=qs[_0x2444('0x1f')](_0x3165c0[_0x2444('0x35')]['limit']);_0x2b8ffc['offset']=qs[_0x2444('0x1c')](_0x3165c0[_0x2444('0x35')][_0x2444('0x1c')]);}_0x2b8ffc[_0x2444('0x3b')]=qs['sort'](_0x3165c0[_0x2444('0x35')][_0x2444('0x3c')]);_0x2b8ffc[_0x2444('0x3f')]=qs['filters'](_[_0x2444('0x3d')](_0x3165c0[_0x2444('0x35')],_0x47dc86[_0x2444('0x36')]));_0x2b8ffc[_0x2444('0x3f')]['CampaignId']=_0x2501e2['id'];if(_0x3165c0[_0x2444('0x35')][_0x2444('0x3e')]){_0x2b8ffc['where']=_['merge'](_0x2b8ffc['where'],{'$or':_[_0x2444('0x2e')](_0x2b8ffc[_0x2444('0x38')],function(_0x399ea6){var _0x2876ba={};_0x2876ba[_0x399ea6]={'$like':'%'+_0x3165c0[_0x2444('0x35')][_0x2444('0x3e')]+'%'};return _0x2876ba;})});}_0x2b8ffc=_[_0x2444('0x40')]({},_0x2b8ffc,_0x3165c0['options']);return db[_0x2444('0x5e')][_0x2444('0x1e')]({'where':_0x2b8ffc[_0x2444('0x3f')]})['then'](function(_0x3f7ae3){_0x1fbdb3[_0x2444('0x1e')]=_0x3f7ae3;if(_0x3165c0['query'][_0x2444('0x43')]){_0x2b8ffc[_0x2444('0x4a')]=[{'all':!![]}];}return db[_0x2444('0x5e')][_0x2444('0x44')](_0x2b8ffc);})[_0x2444('0x25')](function(_0x54d824){_0x1fbdb3['rows']=_0x54d824;return _0x1fbdb3;});}})[_0x2444('0x25')](respondWithFilteredResult(_0x2d2a05,_0x2b8ffc))[_0x2444('0x46')](handleError(_0x2d2a05,null));};exports[_0x2444('0x5f')]=function(_0x365c50,_0x3d9688,_0x4e8ef2){var _0x309404={'raw':!![],'where':{}};var _0x5301b4={};var _0x37f3ae={'count':0x0,'rows':[]};return db['Campaign']['findOne']({'where':{'id':_0x365c50[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x3d9688,null))[_0x2444('0x25')](function(_0xf1f6a4){if(_0xf1f6a4){_0x5301b4[_0x2444('0x34')]=_['keys'](db[_0x2444('0x60')][_0x2444('0x30')]);_0x5301b4[_0x2444('0x35')]=_[_0x2444('0x49')](_0x365c50[_0x2444('0x35')]);_0x5301b4[_0x2444('0x36')]=_[_0x2444('0x37')](_0x5301b4['model'],_0x5301b4[_0x2444('0x35')]);_0x309404[_0x2444('0x38')]=_[_0x2444('0x37')](_0x5301b4['model'],qs[_0x2444('0x39')](_0x365c50['query'][_0x2444('0x39')]));_0x309404[_0x2444('0x38')]=_0x309404[_0x2444('0x38')][_0x2444('0x5a')]?_0x309404[_0x2444('0x38')]:_0x5301b4[_0x2444('0x34')];if(!_0x365c50[_0x2444('0x35')][_0x2444('0x5b')](_0x2444('0x3a'))){_0x309404[_0x2444('0x1f')]=qs[_0x2444('0x1f')](_0x365c50[_0x2444('0x35')]['limit']);_0x309404[_0x2444('0x1c')]=qs['offset'](_0x365c50['query'][_0x2444('0x1c')]);}_0x309404[_0x2444('0x3b')]=qs[_0x2444('0x3c')](_0x365c50[_0x2444('0x35')]['sort']);_0x309404[_0x2444('0x3f')]=qs['filters'](_[_0x2444('0x3d')](_0x365c50[_0x2444('0x35')],_0x5301b4[_0x2444('0x36')]));_0x309404[_0x2444('0x3f')]['CampaignId']=_0xf1f6a4['id'];if(_0x365c50[_0x2444('0x35')][_0x2444('0x3e')]){_0x309404[_0x2444('0x3f')]=_['merge'](_0x309404[_0x2444('0x3f')],{'$or':_[_0x2444('0x2e')](_0x309404[_0x2444('0x38')],function(_0x15703e){var _0x4e0ed5={};_0x4e0ed5[_0x15703e]={'$like':'%'+_0x365c50[_0x2444('0x35')][_0x2444('0x3e')]+'%'};return _0x4e0ed5;})});}_0x309404=_[_0x2444('0x40')]({},_0x309404,_0x365c50[_0x2444('0x42')]);return db['CmHopperFinal']['count']({'where':_0x309404[_0x2444('0x3f')]})[_0x2444('0x25')](function(_0x261e76){_0x37f3ae['count']=_0x261e76;if(_0x365c50[_0x2444('0x35')][_0x2444('0x43')]){_0x309404[_0x2444('0x4a')]=[{'all':!![]}];}return db[_0x2444('0x60')][_0x2444('0x44')](_0x309404);})['then'](function(_0x54c7fd){_0x37f3ae[_0x2444('0x45')]=_0x54c7fd;return _0x37f3ae;});}})['then'](respondWithFilteredResult(_0x3d9688,_0x309404))[_0x2444('0x46')](handleError(_0x3d9688,null));};exports['getHopperBlacks']=function(_0x345ea7,_0x43a2df,_0x2667b7){var _0x981f4d={'raw':!![],'where':{}};var _0x1c6667={};var _0x1709e5={'count':0x0,'rows':[]};return db['Campaign'][_0x2444('0x58')]({'where':{'id':_0x345ea7['params']['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x43a2df,null))[_0x2444('0x25')](function(_0x38dc9a){if(_0x38dc9a){_0x1c6667[_0x2444('0x34')]=_[_0x2444('0x49')](db[_0x2444('0x61')][_0x2444('0x30')]);_0x1c6667[_0x2444('0x35')]=_['keys'](_0x345ea7['query']);_0x1c6667[_0x2444('0x36')]=_[_0x2444('0x37')](_0x1c6667['model'],_0x1c6667[_0x2444('0x35')]);_0x981f4d['attributes']=_[_0x2444('0x37')](_0x1c6667['model'],qs[_0x2444('0x39')](_0x345ea7[_0x2444('0x35')][_0x2444('0x39')]));_0x981f4d[_0x2444('0x38')]=_0x981f4d['attributes'][_0x2444('0x5a')]?_0x981f4d[_0x2444('0x38')]:_0x1c6667[_0x2444('0x34')];if(!_0x345ea7['query']['hasOwnProperty'](_0x2444('0x3a'))){_0x981f4d['limit']=qs['limit'](_0x345ea7[_0x2444('0x35')][_0x2444('0x1f')]);_0x981f4d[_0x2444('0x1c')]=qs['offset'](_0x345ea7[_0x2444('0x35')]['offset']);}_0x981f4d[_0x2444('0x3b')]=qs['sort'](_0x345ea7[_0x2444('0x35')][_0x2444('0x3c')]);_0x981f4d[_0x2444('0x3f')]=qs[_0x2444('0x36')](_[_0x2444('0x3d')](_0x345ea7[_0x2444('0x35')],_0x1c6667[_0x2444('0x36')]));_0x981f4d['where'][_0x2444('0x5c')]=_0x38dc9a['id'];if(_0x345ea7[_0x2444('0x35')][_0x2444('0x3e')]){_0x981f4d[_0x2444('0x3f')]=_[_0x2444('0x40')](_0x981f4d[_0x2444('0x3f')],{'$or':_[_0x2444('0x2e')](_0x981f4d[_0x2444('0x38')],function(_0x6e9df1){var _0x40cf67={};_0x40cf67[_0x6e9df1]={'$like':'%'+_0x345ea7[_0x2444('0x35')][_0x2444('0x3e')]+'%'};return _0x40cf67;})});}_0x981f4d=_[_0x2444('0x40')]({},_0x981f4d,_0x345ea7['options']);return db[_0x2444('0x61')]['count']({'where':_0x981f4d[_0x2444('0x3f')]})[_0x2444('0x25')](function(_0x5f4900){_0x1709e5[_0x2444('0x1e')]=_0x5f4900;if(_0x345ea7[_0x2444('0x35')]['includeAll']){_0x981f4d[_0x2444('0x4a')]=[{'all':!![]}];}return db[_0x2444('0x61')][_0x2444('0x44')](_0x981f4d);})[_0x2444('0x25')](function(_0x36a451){_0x1709e5[_0x2444('0x45')]=_0x36a451;return _0x1709e5;});}})[_0x2444('0x25')](respondWithFilteredResult(_0x43a2df,_0x981f4d))[_0x2444('0x46')](handleError(_0x43a2df,null));};exports['getLists']=function(_0x27d4cf,_0xf1bb2b,_0x300b3c){var _0xebd08e={};var _0xbba9fd={};var _0x4e87e1;var _0x1a4241;return db[_0x2444('0x2f')][_0x2444('0x58')]({'where':{'id':_0x27d4cf['params']['id']}})[_0x2444('0x25')](handleEntityNotFound(_0xf1bb2b,null))['then'](function(_0x10fc9f){if(_0x10fc9f){_0x4e87e1=_0x10fc9f;_0xbba9fd[_0x2444('0x34')]=_['keys'](db[_0x2444('0x62')][_0x2444('0x30')]);_0xbba9fd[_0x2444('0x35')]=_[_0x2444('0x49')](_0x27d4cf['query']);_0xbba9fd[_0x2444('0x36')]=_[_0x2444('0x37')](_0xbba9fd[_0x2444('0x34')],_0xbba9fd[_0x2444('0x35')]);_0xebd08e[_0x2444('0x38')]=_['intersection'](_0xbba9fd[_0x2444('0x34')],qs[_0x2444('0x39')](_0x27d4cf[_0x2444('0x35')]['fields']));_0xebd08e[_0x2444('0x38')]=_0xebd08e['attributes']['length']?_0xebd08e[_0x2444('0x38')]:_0xbba9fd[_0x2444('0x34')];_0xebd08e[_0x2444('0x3b')]=qs[_0x2444('0x3c')](_0x27d4cf['query'][_0x2444('0x3c')]);_0xebd08e['where']=qs['filters'](_['pick'](_0x27d4cf[_0x2444('0x35')],_0xbba9fd[_0x2444('0x36')]));if(_0x27d4cf[_0x2444('0x35')][_0x2444('0x3e')]){_0xebd08e['where']=_['merge'](_0xebd08e[_0x2444('0x3f')],{'$or':_[_0x2444('0x2e')](_0xebd08e['attributes'],function(_0x17bebd){var _0x17c2ba={};_0x17c2ba[_0x17bebd]={'$like':'%'+_0x27d4cf[_0x2444('0x35')]['filter']+'%'};return _0x17c2ba;})});}_0xebd08e=_['merge']({},_0xebd08e,_0x27d4cf[_0x2444('0x42')]);return _0x4e87e1[_0x2444('0x63')](_0xebd08e);}})['then'](function(_0x56f6a1){if(_0x56f6a1){_0x1a4241=_0x56f6a1[_0x2444('0x5a')];if(!_0x27d4cf['query'][_0x2444('0x5b')](_0x2444('0x3a'))){_0xebd08e[_0x2444('0x1f')]=qs[_0x2444('0x1f')](_0x27d4cf[_0x2444('0x35')]['limit']);_0xebd08e[_0x2444('0x1c')]=qs[_0x2444('0x1c')](_0x27d4cf[_0x2444('0x35')][_0x2444('0x1c')]);}return _0x4e87e1[_0x2444('0x63')](_0xebd08e);}})[_0x2444('0x25')](function(_0xe270e3){if(_0xe270e3){return _0xe270e3?{'count':_0x1a4241,'rows':_0xe270e3}:null;}})[_0x2444('0x25')](respondWithResult(_0xf1bb2b,null))[_0x2444('0x46')](handleError(_0xf1bb2b,null));};exports[_0x2444('0x64')]=function(_0xdd5dfa,_0x54c124,_0x4a3e37){var _0x3a9ffe,_0x2dbaa5;return db[_0x2444('0x2f')][_0x2444('0x4b')]({'where':{'id':_0xdd5dfa[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x54c124,null))['then'](function(_0x50a889){if(_0x50a889){_0x2dbaa5=_0x50a889;return _0x50a889['addLists'](_0xdd5dfa[_0x2444('0x4c')]['ids'],_['omit'](_0xdd5dfa[_0x2444('0x4c')],[_0x2444('0x65'),'id'])||{});}return null;})[_0x2444('0x66')](function(_0x52b7d3){var _0x121339;_0x3a9ffe=_0x52b7d3||[];var _0x124964=[];if(_0x52b7d3){for(var _0x520478=0x0;_0x520478<_0x52b7d3[_0x2444('0x5a')];_0x520478+=0x1){var _0xe7b80=_0x52b7d3[_0x520478][_0x2444('0x27')]({'plain':!![]});_0x2dbaa5[_0x2444('0x67')]=_0xdd5dfa['body']['dialCheckDuplicateType']?_0xdd5dfa[_0x2444('0x4c')][_0x2444('0x67')]:_0x2dbaa5[_0x2444('0x67')];switch(_0x2dbaa5[_0x2444('0x67')]){case'always':_0x121339=squel['insert']()[_0x2444('0x68')]('cm_hopper')[_0x2444('0x69')]([_0x2444('0x6a'),'scheduledAt',_0x2444('0x6b'),_0x2444('0x6c'),_0x2444('0x5c'),_0x2444('0x54'),_0x2444('0x55')],squel['select']()[_0x2444('0x6d')]('phone',_0x2444('0x6a'))[_0x2444('0x6d')](_0x2444('0x6e'),_0x2444('0x6f'))[_0x2444('0x6d')]('id','ContactId')[_0x2444('0x6d')](_0xe7b80[_0x2444('0x70')][_0x2444('0x71')](),_0x2444('0x6c'))['field'](_0xdd5dfa['params']['id'][_0x2444('0x71')](),_0x2444('0x5c'))['field']('NOW()',_0x2444('0x54'))['field'](_0x2444('0x6e'),'updatedAt')[_0x2444('0x72')](_0x2444('0x73'))[_0x2444('0x3f')](_0x2444('0x74'))[_0x2444('0x3f')]('ListId\x20=\x20?',_0xe7b80[_0x2444('0x70')][_0x2444('0x71')]())[_0x2444('0x3f')](_0x2444('0x75'))[_0x2444('0x3f')](_0x2444('0x76'),squel[_0x2444('0x77')]()[_0x2444('0x6d')]('COALESCE(calleridnum,\x27\x27)')[_0x2444('0x72')]('cm_hopper_final')[_0x2444('0x3f')]('CampaignId\x20=\x20?',_0xdd5dfa['params']['id'][_0x2444('0x71')]()))[_0x2444('0x3f')](_0x2444('0x76'),squel[_0x2444('0x77')]()['field']('COALESCE(phone,\x27\x27)')['from'](_0x2444('0x78'))[_0x2444('0x3f')](_0x2444('0x79'),_0xdd5dfa[_0x2444('0x48')]['id'][_0x2444('0x71')]())))[_0x2444('0x71')]();break;case'onlyIfOpen':_0x121339=squel[_0x2444('0x7a')]()[_0x2444('0x68')]('cm_hopper')[_0x2444('0x69')]([_0x2444('0x6a'),_0x2444('0x6f'),_0x2444('0x6b'),_0x2444('0x6c'),'CampaignId',_0x2444('0x54'),_0x2444('0x55')],squel['select']()[_0x2444('0x6d')](_0x2444('0x6a'),_0x2444('0x6a'))[_0x2444('0x6d')](_0x2444('0x6e'),_0x2444('0x6f'))['field']('id',_0x2444('0x6b'))[_0x2444('0x6d')](_0xe7b80[_0x2444('0x70')][_0x2444('0x71')](),'ListId')[_0x2444('0x6d')](_0xdd5dfa[_0x2444('0x48')]['id'][_0x2444('0x71')](),'CampaignId')[_0x2444('0x6d')](_0x2444('0x6e'),'createdAt')[_0x2444('0x6d')]('NOW()',_0x2444('0x55'))[_0x2444('0x72')](_0x2444('0x73'))[_0x2444('0x3f')](_0x2444('0x74'))['where']('ListId\x20=\x20?',_0xe7b80[_0x2444('0x70')]['toString']())[_0x2444('0x3f')](_0x2444('0x75'))['where'](_0x2444('0x76'),squel[_0x2444('0x77')]()['field'](_0x2444('0x7b'))[_0x2444('0x72')]('cm_hopper')[_0x2444('0x3f')](_0x2444('0x79'),_0xdd5dfa[_0x2444('0x48')]['id'][_0x2444('0x71')]())))[_0x2444('0x71')]();break;default:_0x121339=squel[_0x2444('0x7a')]()[_0x2444('0x68')](_0x2444('0x78'))[_0x2444('0x69')](['phone',_0x2444('0x6f'),_0x2444('0x6b'),_0x2444('0x6c'),'CampaignId','createdAt',_0x2444('0x55')],squel['select']()['field'](_0x2444('0x6a'),_0x2444('0x6a'))[_0x2444('0x6d')]('NOW()',_0x2444('0x6f'))[_0x2444('0x6d')]('id',_0x2444('0x6b'))[_0x2444('0x6d')](_0xe7b80['CmListId'][_0x2444('0x71')](),_0x2444('0x6c'))[_0x2444('0x6d')](_0xdd5dfa['params']['id'][_0x2444('0x71')](),'CampaignId')[_0x2444('0x6d')](_0x2444('0x6e'),_0x2444('0x54'))[_0x2444('0x6d')](_0x2444('0x6e'),_0x2444('0x55'))[_0x2444('0x72')](_0x2444('0x73'))[_0x2444('0x3f')](_0x2444('0x74'))[_0x2444('0x3f')](_0x2444('0x7c'),_0xe7b80[_0x2444('0x70')][_0x2444('0x71')]())[_0x2444('0x3f')]('phone\x20IS\x20NOT\x20NULL'))['toString']();}_0x124964['push'](db[_0x2444('0x7d')]['query'](_0x121339));}return BPromise[_0x2444('0x7e')](_0x124964);}})['then'](function(){return _0x3a9ffe;})[_0x2444('0x25')](respondWithResult(_0x54c124,null))['catch'](handleError(_0x54c124,null));};exports['removeLists']=function(_0xf70d81,_0x1f0e9b,_0x1cb085){return db[_0x2444('0x2f')][_0x2444('0x4b')]({'where':{'id':_0xf70d81[_0x2444('0x48')]['id']}})['then'](handleEntityNotFound(_0x1f0e9b,null))['then'](function(_0x4d99a8){if(_0x4d99a8){return _0x4d99a8[_0x2444('0x7f')](_0xf70d81[_0x2444('0x35')][_0x2444('0x65')]);}})[_0x2444('0x25')](function(_0x1fdca2){if(_0x1fdca2){return db['CmHopper'][_0x2444('0x26')]({'where':{'ListId':_0xf70d81[_0x2444('0x35')][_0x2444('0x65')],'CampaignId':_0xf70d81[_0x2444('0x48')]['id']}})[_0x2444('0x25')](function(){return _0x1fdca2;});}})['then'](respondWithStatusCode(_0x1f0e9b,null))[_0x2444('0x46')](handleError(_0x1f0e9b,null));};exports[_0x2444('0x80')]=function(_0x24d4b6,_0x7392f3,_0x509cac){var _0x3d543f={};var _0x51e590={};var _0x3b2542;var _0x3ca287;return db['Campaign'][_0x2444('0x58')]({'where':{'id':_0x24d4b6[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x7392f3,null))[_0x2444('0x25')](function(_0x40e743){if(_0x40e743){_0x3b2542=_0x40e743;_0x51e590['model']=_[_0x2444('0x49')](db['CmList'][_0x2444('0x30')]);_0x51e590[_0x2444('0x35')]=_[_0x2444('0x49')](_0x24d4b6[_0x2444('0x35')]);_0x51e590[_0x2444('0x36')]=_[_0x2444('0x37')](_0x51e590[_0x2444('0x34')],_0x51e590[_0x2444('0x35')]);_0x3d543f[_0x2444('0x38')]=_[_0x2444('0x37')](_0x51e590[_0x2444('0x34')],qs['fields'](_0x24d4b6[_0x2444('0x35')][_0x2444('0x39')]));_0x3d543f[_0x2444('0x38')]=_0x3d543f[_0x2444('0x38')][_0x2444('0x5a')]?_0x3d543f['attributes']:_0x51e590[_0x2444('0x34')];_0x3d543f['order']=qs['sort'](_0x24d4b6[_0x2444('0x35')][_0x2444('0x3c')]);_0x3d543f[_0x2444('0x3f')]=qs[_0x2444('0x36')](_[_0x2444('0x3d')](_0x24d4b6[_0x2444('0x35')],_0x51e590[_0x2444('0x36')]));if(_0x24d4b6[_0x2444('0x35')][_0x2444('0x3e')]){_0x3d543f[_0x2444('0x3f')]=_[_0x2444('0x40')](_0x3d543f['where'],{'$or':_[_0x2444('0x2e')](_0x3d543f[_0x2444('0x38')],function(_0x348c8b){var _0x364952={};_0x364952[_0x348c8b]={'$like':'%'+_0x24d4b6['query'][_0x2444('0x3e')]+'%'};return _0x364952;})});}_0x3d543f=_[_0x2444('0x40')]({},_0x3d543f,_0x24d4b6[_0x2444('0x42')]);return _0x3b2542[_0x2444('0x80')](_0x3d543f);}})['then'](function(_0x18551b){if(_0x18551b){_0x3ca287=_0x18551b[_0x2444('0x5a')];if(!_0x24d4b6[_0x2444('0x35')]['hasOwnProperty'](_0x2444('0x3a'))){_0x3d543f[_0x2444('0x1f')]=qs[_0x2444('0x1f')](_0x24d4b6['query'][_0x2444('0x1f')]);_0x3d543f[_0x2444('0x1c')]=qs[_0x2444('0x1c')](_0x24d4b6[_0x2444('0x35')][_0x2444('0x1c')]);}return _0x3b2542[_0x2444('0x80')](_0x3d543f);}})[_0x2444('0x25')](function(_0x5d17b0){if(_0x5d17b0){return _0x5d17b0?{'count':_0x3ca287,'rows':_0x5d17b0}:null;}})[_0x2444('0x25')](respondWithResult(_0x7392f3,null))[_0x2444('0x46')](handleError(_0x7392f3,null));};exports[_0x2444('0x81')]=function(_0x28839a,_0x2f257d,_0x4d5f7e){var _0x2804b9,_0x1a35d8;return db[_0x2444('0x2f')][_0x2444('0x4b')]({'where':{'id':_0x28839a['params']['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x2f257d,null))[_0x2444('0x25')](function(_0x43c1e0){if(_0x43c1e0){_0x1a35d8=_0x43c1e0;return _0x43c1e0['addBlackLists'](_0x28839a[_0x2444('0x4c')][_0x2444('0x65')],_[_0x2444('0x56')](_0x28839a[_0x2444('0x4c')],[_0x2444('0x65'),'id'])||{});}return null;})[_0x2444('0x66')](function(_0x4ac630){var _0x7b96fa;_0x2804b9=_0x4ac630||[];var _0x278157=[];if(_0x4ac630){for(var _0x2677eb=0x0;_0x2677eb<_0x4ac630[_0x2444('0x5a')];_0x2677eb+=0x1){var _0x79623d=_0x4ac630[_0x2677eb]['get']({'plain':!![]});_0x7b96fa=squel[_0x2444('0x7a')]()[_0x2444('0x68')](_0x2444('0x82'))[_0x2444('0x69')]([_0x2444('0x6a'),_0x2444('0x6b'),_0x2444('0x6c'),_0x2444('0x5c'),_0x2444('0x54'),'updatedAt'],squel[_0x2444('0x77')]()[_0x2444('0x6d')](_0x2444('0x6a'),_0x2444('0x6a'))['field']('id',_0x2444('0x6b'))[_0x2444('0x6d')](_0x79623d[_0x2444('0x70')]['toString'](),_0x2444('0x6c'))[_0x2444('0x6d')](_0x28839a[_0x2444('0x48')]['id'][_0x2444('0x71')](),'CampaignId')['field']('NOW()',_0x2444('0x54'))[_0x2444('0x6d')](_0x2444('0x6e'),_0x2444('0x55'))[_0x2444('0x72')]('cm_contacts')[_0x2444('0x3f')]('deletedAt\x20IS\x20NULL')[_0x2444('0x3f')](_0x2444('0x7c'),_0x79623d[_0x2444('0x70')][_0x2444('0x71')]())[_0x2444('0x3f')]('phone\x20IS\x20NOT\x20NULL'))[_0x2444('0x71')]();_0x278157['push'](db['sequelize'][_0x2444('0x35')](_0x7b96fa));}return BPromise[_0x2444('0x7e')](_0x278157);}})['then'](function(){return _0x2804b9;})['then'](respondWithResult(_0x2f257d,null))[_0x2444('0x46')](handleError(_0x2f257d,null));};exports[_0x2444('0x83')]=function(_0x3627a5,_0x38803f,_0x59d10a){return db[_0x2444('0x2f')][_0x2444('0x4b')]({'where':{'id':_0x3627a5[_0x2444('0x48')]['id']}})[_0x2444('0x25')](handleEntityNotFound(_0x38803f,null))[_0x2444('0x25')](function(_0x2fd766){if(_0x2fd766){return _0x2fd766[_0x2444('0x83')](_0x3627a5[_0x2444('0x35')]['ids']);}})['then'](function(_0x7f03c9){if(_0x7f03c9){return db[_0x2444('0x61')]['destroy']({'where':{'ListId':_0x3627a5[_0x2444('0x35')][_0x2444('0x65')],'CampaignId':_0x3627a5['params']['id']}})[_0x2444('0x25')](function(){return _0x7f03c9;});}})[_0x2444('0x25')](respondWithStatusCode(_0x38803f,null))[_0x2444('0x46')](handleError(_0x38803f,null));}; \ No newline at end of file diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js index d744a6c..f72df48 100644 --- a/server/api/campaign/campaign.model.js +++ b/server/api/campaign/campaign.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_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 +var _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x16d369,_0xbbaa52){var _0x53c1ca=function(_0x49908d){while(--_0x49908d){_0x16d369['push'](_0x16d369['shift']());}};_0x53c1ca(++_0xbbaa52);}(_0x7a54,0x106));var _0x47a5=function(_0x10202a,_0x9536fe){_0x10202a=_0x10202a-0x0;var _0x496947=_0x7a54[_0x10202a];return _0x496947;};'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 diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js index 31bad7f..24641f2 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 _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 +var _0x21a3=['include','model','GetCampaign','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','message','result','Campaign','findAll','options','raw','where','attributes','limit','map'];(function(_0x41d0fa,_0x3b10d6){var _0xd3a528=function(_0x492a0c){while(--_0x492a0c){_0x41d0fa['push'](_0x41d0fa['shift']());}};_0xd3a528(++_0x3b10d6);}(_0x21a3,0x66));var _0x321a=function(_0x211f68,_0x47a58a){_0x211f68=_0x211f68-0x0;var _0x13604e=_0x21a3[_0x211f68];return _0x13604e;};'use strict';var _=require(_0x321a('0x0'));var util=require('util');var moment=require(_0x321a('0x1'));var BPromise=require(_0x321a('0x2'));var rs=require(_0x321a('0x3'));var fs=require('fs');var Redis=require(_0x321a('0x4'));var db=require(_0x321a('0x5'))['db'];var utils=require(_0x321a('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x321a('0x7'));var jayson=require(_0x321a('0x8'));var client=jayson[_0x321a('0x9')][_0x321a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5f3b81,_0x388901,_0x24a04c){return new BPromise(function(_0x10c1d3,_0xdfd6b8){return client[_0x321a('0xb')](_0x5f3b81,_0x24a04c)[_0x321a('0xc')](function(_0x2c52dc){logger[_0x321a('0xd')](_0x321a('0xe'),_0x388901,_0x321a('0xf'));logger[_0x321a('0x10')](_0x321a('0x11'),_0x388901,'request\x20sent',JSON[_0x321a('0x12')](_0x2c52dc));if(_0x2c52dc[_0x321a('0x13')]){if(_0x2c52dc['error']['code']===0x1f4){logger[_0x321a('0x13')]('Campaign,\x20%s,\x20%s',_0x388901,_0x2c52dc[_0x321a('0x13')][_0x321a('0x14')]);return _0xdfd6b8(_0x2c52dc['error']['message']);}logger[_0x321a('0x13')](_0x321a('0xe'),_0x388901,_0x2c52dc[_0x321a('0x13')][_0x321a('0x14')]);return _0x10c1d3(_0x2c52dc[_0x321a('0x13')][_0x321a('0x14')]);}else{logger[_0x321a('0xd')](_0x321a('0xe'),_0x388901,'request\x20sent');_0x10c1d3(_0x2c52dc[_0x321a('0x15')][_0x321a('0x14')]);}})['catch'](function(_0x45ceb2){logger[_0x321a('0x13')](_0x321a('0xe'),_0x388901,_0x45ceb2);_0xdfd6b8(_0x45ceb2);});});}exports['GetCampaign']=function(_0x5b1810){var _0x464bd7=this;return new Promise(function(_0x35fd6f,_0x58595b){return db[_0x321a('0x16')][_0x321a('0x17')]({'raw':_0x5b1810[_0x321a('0x18')]?_0x5b1810['options'][_0x321a('0x19')]===undefined?!![]:![]:!![],'where':_0x5b1810[_0x321a('0x18')]?_0x5b1810[_0x321a('0x18')][_0x321a('0x1a')]||null:null,'attributes':_0x5b1810[_0x321a('0x18')]?_0x5b1810[_0x321a('0x18')][_0x321a('0x1b')]||null:null,'limit':_0x5b1810[_0x321a('0x18')]?_0x5b1810[_0x321a('0x18')][_0x321a('0x1c')]||null:null,'include':_0x5b1810[_0x321a('0x18')]?_0x5b1810[_0x321a('0x18')]['include']?_[_0x321a('0x1d')](_0x5b1810[_0x321a('0x18')][_0x321a('0x1e')],function(_0x5ae154){return{'model':db[_0x5ae154[_0x321a('0x1f')]],'as':_0x5ae154['as'],'attributes':_0x5ae154[_0x321a('0x1b')],'include':_0x5ae154['include']?_['map'](_0x5ae154[_0x321a('0x1e')],function(_0x5a66c2){return{'model':db[_0x5a66c2[_0x321a('0x1f')]],'as':_0x5a66c2['as'],'attributes':_0x5a66c2[_0x321a('0x1b')],'include':_0x5a66c2[_0x321a('0x1e')]?_[_0x321a('0x1d')](_0x5a66c2[_0x321a('0x1e')],function(_0xdce138){return{'model':db[_0xdce138['model']],'as':_0xdce138['as'],'attributes':_0xdce138['attributes']};}):[]};}):[]};}):[]:[]})[_0x321a('0xc')](function(_0x105216){logger[_0x321a('0xd')]('GetCampaign',_0x5b1810);logger[_0x321a('0x10')](_0x321a('0x20'),_0x5b1810,JSON[_0x321a('0x12')](_0x105216));_0x35fd6f(_0x105216);})['catch'](function(_0x8a09bb){logger[_0x321a('0x13')](_0x321a('0x20'),_0x8a09bb[_0x321a('0x14')],_0x5b1810);_0x58595b(_0x464bd7[_0x321a('0x13')](0x1f4,_0x8a09bb[_0x321a('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js index 5591160..600fd6e 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 _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 +var _0x92df=['get','isAuthenticated','index','/:id','show','getHoppers','/:id/hopper_histories','getHopperHistories','getHopperFinals','/:id/hopper_black','getHopperBlacks','getLists','/:id/blacklists','getBlackLists','post','create','clone','/:id/lists','addLists','addBlackLists','put','destroy','removeLists','removeBlackLists','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x3a1d44,_0x167de3){var _0xe019d3=function(_0xa73766){while(--_0xa73766){_0x3a1d44['push'](_0x3a1d44['shift']());}};_0xe019d3(++_0x167de3);}(_0x92df,0x106));var _0xf92d=function(_0xeeda52,_0x228d66){_0xeeda52=_0xeeda52-0x0;var _0x1fd9ec=_0x92df[_0xeeda52];return _0x1fd9ec;};'use strict';var multer=require(_0xf92d('0x0'));var util=require(_0xf92d('0x1'));var path=require(_0xf92d('0x2'));var timeout=require(_0xf92d('0x3'));var express=require(_0xf92d('0x4'));var router=express[_0xf92d('0x5')]();var fs_extra=require(_0xf92d('0x6'));var auth=require(_0xf92d('0x7'));var interaction=require(_0xf92d('0x8'));var config=require(_0xf92d('0x9'));var controller=require('./campaign.controller');router[_0xf92d('0xa')]('/',auth[_0xf92d('0xb')](),controller[_0xf92d('0xc')]);router[_0xf92d('0xa')](_0xf92d('0xd'),auth[_0xf92d('0xb')](),controller[_0xf92d('0xe')]);router['get']('/:id/hoppers',auth['isAuthenticated'](),controller[_0xf92d('0xf')]);router[_0xf92d('0xa')](_0xf92d('0x10'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x11')]);router[_0xf92d('0xa')]('/:id/hopper_finals',auth[_0xf92d('0xb')](),controller[_0xf92d('0x12')]);router['get'](_0xf92d('0x13'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x14')]);router[_0xf92d('0xa')]('/:id/lists',auth['isAuthenticated'](),controller[_0xf92d('0x15')]);router[_0xf92d('0xa')](_0xf92d('0x16'),auth['isAuthenticated'](),controller[_0xf92d('0x17')]);router[_0xf92d('0x18')]('/',auth[_0xf92d('0xb')](),controller[_0xf92d('0x19')]);router[_0xf92d('0x18')]('/:id/clone',auth[_0xf92d('0xb')](),controller[_0xf92d('0x1a')]);router[_0xf92d('0x18')](_0xf92d('0x1b'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x1c')]);router['post']('/:id/blacklists',auth[_0xf92d('0xb')](),controller[_0xf92d('0x1d')]);router[_0xf92d('0x1e')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0xf92d('0xd'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x1f')]);router['delete'](_0xf92d('0x1b'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x20')]);router['delete'](_0xf92d('0x16'),auth[_0xf92d('0xb')](),controller[_0xf92d('0x21')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js index 16d1dcb..df3ceec 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 _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 +var _0xe111=['key','sequelize','exports','STRING','VIRTUAL','getDataValue'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe111,0x17b));var _0x1e11=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe111[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x1e11('0x0'));module[_0x1e11('0x1')]={'key':{'type':Sequelize[_0x1e11('0x2')],'allowNull':![]},'value':{'type':Sequelize['TEXT'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize[_0x1e11('0x3')],'get':function(){return this[_0x1e11('0x4')](_0x1e11('0x5'));}}}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js index 3d44e56..2b1636c 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 _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 +var _0x5ac0=['name','send','index','CannedAnswer','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','include','findAll','rows','catch','show','find','update','body','params','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','error','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','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','json','offset','undefined','limit','count','set','apply','then','destroy','get','stack'];(function(_0x4bfff5,_0xbd2a67){var _0x2383bc=function(_0x2d3f77){while(--_0x2d3f77){_0x4bfff5['push'](_0x4bfff5['shift']());}};_0x2383bc(++_0xbd2a67);}(_0x5ac0,0xe2));var _0x05ac=function(_0x1899e1,_0xca5fb4){_0x1899e1=_0x1899e1-0x0;var _0x24297b=_0x5ac0[_0x1899e1];return _0x24297b;};'use strict';var emlformat=require(_0x05ac('0x0'));var rimraf=require(_0x05ac('0x1'));var zipdir=require(_0x05ac('0x2'));var jsonpatch=require(_0x05ac('0x3'));var rp=require('request-promise');var moment=require(_0x05ac('0x4'));var BPromise=require(_0x05ac('0x5'));var Mustache=require('mustache');var util=require(_0x05ac('0x6'));var path=require(_0x05ac('0x7'));var sox=require(_0x05ac('0x8'));var csv=require(_0x05ac('0x9'));var ejs=require(_0x05ac('0xa'));var fs=require('fs');var fs_extra=require(_0x05ac('0xb'));var _=require(_0x05ac('0xc'));var squel=require(_0x05ac('0xd'));var crypto=require(_0x05ac('0xe'));var jsforce=require(_0x05ac('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x05ac('0x9'));var querystring=require(_0x05ac('0x10'));var Papa=require(_0x05ac('0x11'));var Redis=require(_0x05ac('0x12'));var authService=require(_0x05ac('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x05ac('0x14'));var hardwareService=require(_0x05ac('0x15'));var logger=require(_0x05ac('0x16'))(_0x05ac('0x17'));var utils=require(_0x05ac('0x18'));var config=require(_0x05ac('0x19'));var licenseUtil=require(_0x05ac('0x1a'));var db=require(_0x05ac('0x1b'))['db'];function respondWithStatusCode(_0x4118ab,_0x4680a2){_0x4680a2=_0x4680a2||0xcc;return function(_0x1e6da4){if(_0x1e6da4){return _0x4118ab[_0x05ac('0x1c')](_0x4680a2);}return _0x4118ab[_0x05ac('0x1d')](_0x4680a2)['end']();};}function respondWithResult(_0x324035,_0x184e05){_0x184e05=_0x184e05||0xc8;return function(_0x20e3eb){if(_0x20e3eb){return _0x324035[_0x05ac('0x1d')](_0x184e05)[_0x05ac('0x1e')](_0x20e3eb);}};}function respondWithFilteredResult(_0x16d900,_0x3a11cb){return function(_0x5e0855){if(_0x5e0855){var _0x562926=typeof _0x3a11cb[_0x05ac('0x1f')]===_0x05ac('0x20')&&typeof _0x3a11cb[_0x05ac('0x21')]===_0x05ac('0x20');var _0x57865d=_0x5e0855['count'];var _0x2d53ec=_0x562926?0x0:_0x3a11cb[_0x05ac('0x1f')];var _0x316b08=_0x562926?_0x5e0855[_0x05ac('0x22')]:_0x3a11cb['offset']+_0x3a11cb[_0x05ac('0x21')];var _0x371352;if(_0x316b08>=_0x57865d){_0x316b08=_0x57865d;_0x371352=0xc8;}else{_0x371352=0xce;}_0x16d900[_0x05ac('0x1d')](_0x371352);return _0x16d900[_0x05ac('0x23')]('Content-Range',_0x2d53ec+'-'+_0x316b08+'/'+_0x57865d)[_0x05ac('0x1e')](_0x5e0855);}return null;};}function patchUpdates(_0x5a7370){return function(_0x44f62e){try{jsonpatch[_0x05ac('0x24')](_0x44f62e,_0x5a7370,!![]);}catch(_0x171911){return BPromise['reject'](_0x171911);}return _0x44f62e['save']();};}function saveUpdates(_0x1d29cc,_0x28e5b1){return function(_0x59c830){if(_0x59c830){return _0x59c830['update'](_0x1d29cc)[_0x05ac('0x25')](function(_0x1a9c0a){return _0x1a9c0a;});}return null;};}function removeEntity(_0x534b71,_0x3884dd){return function(_0x192407){if(_0x192407){return _0x192407[_0x05ac('0x26')]()['then'](function(){var _0x2fed7c=_0x192407[_0x05ac('0x27')]({'plain':!![]});var _0x5cd84a='CannedAnswers';return db['UserProfileResource'][_0x05ac('0x26')]({'where':{'type':_0x5cd84a,'resourceId':_0x2fed7c['id']}})[_0x05ac('0x25')](function(){return _0x192407;});})['then'](function(){_0x534b71[_0x05ac('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x107952,_0x483bd0){return function(_0x10e6f9){if(!_0x10e6f9){_0x107952[_0x05ac('0x1c')](0x194);}return _0x10e6f9;};}function handleError(_0x2a75f5,_0x18037c){_0x18037c=_0x18037c||0x1f4;return function(_0x17c2be){logger['error'](_0x17c2be[_0x05ac('0x28')]);if(_0x17c2be[_0x05ac('0x29')]){delete _0x17c2be[_0x05ac('0x29')];}_0x2a75f5[_0x05ac('0x1d')](_0x18037c)[_0x05ac('0x2a')](_0x17c2be);};}exports[_0x05ac('0x2b')]=function(_0xb9c924,_0x196cf0){var _0x4851c9={},_0x2b5027={},_0xd09dee={'count':0x0,'rows':[]};var _0x39c4bb=_['map'](db[_0x05ac('0x2c')]['rawAttributes'],function(_0x19efe9){return{'name':_0x19efe9[_0x05ac('0x2d')],'type':_0x19efe9[_0x05ac('0x2e')][_0x05ac('0x2f')]};});_0x2b5027[_0x05ac('0x30')]=_[_0x05ac('0x31')](_0x39c4bb,_0x05ac('0x29'));_0x2b5027[_0x05ac('0x32')]=_[_0x05ac('0x33')](_0xb9c924['query']);_0x2b5027[_0x05ac('0x34')]=_[_0x05ac('0x35')](_0x2b5027[_0x05ac('0x30')],_0x2b5027['query']);_0x4851c9['attributes']=_[_0x05ac('0x35')](_0x2b5027['model'],qs[_0x05ac('0x36')](_0xb9c924['query']['fields']));_0x4851c9[_0x05ac('0x37')]=_0x4851c9[_0x05ac('0x37')][_0x05ac('0x38')]?_0x4851c9[_0x05ac('0x37')]:_0x2b5027['model'];if(!_0xb9c924['query'][_0x05ac('0x39')](_0x05ac('0x3a'))){_0x4851c9[_0x05ac('0x21')]=qs[_0x05ac('0x21')](_0xb9c924['query'][_0x05ac('0x21')]);_0x4851c9[_0x05ac('0x1f')]=qs[_0x05ac('0x1f')](_0xb9c924[_0x05ac('0x32')][_0x05ac('0x1f')]);}_0x4851c9[_0x05ac('0x3b')]=qs[_0x05ac('0x3c')](_0xb9c924[_0x05ac('0x32')]['sort']);_0x4851c9[_0x05ac('0x3d')]=qs['filters'](_[_0x05ac('0x3e')](_0xb9c924[_0x05ac('0x32')],_0x2b5027[_0x05ac('0x34')]),_0x39c4bb);if(_0xb9c924[_0x05ac('0x32')][_0x05ac('0x3f')]){_0x4851c9[_0x05ac('0x3d')]=_[_0x05ac('0x40')](_0x4851c9[_0x05ac('0x3d')],{'$or':[{'key':{'$like':'%'+_0xb9c924[_0x05ac('0x32')][_0x05ac('0x3f')]+'%'}},{'value':{'$like':'%'+_0xb9c924[_0x05ac('0x32')][_0x05ac('0x3f')]+'%'}}]});}_0x4851c9=_[_0x05ac('0x40')]({},_0x4851c9,_0xb9c924[_0x05ac('0x41')]);var _0x30367e={'where':_0x4851c9[_0x05ac('0x3d')]};return db[_0x05ac('0x2c')]['count'](_0x30367e)[_0x05ac('0x25')](function(_0x5223ec){_0xd09dee['count']=_0x5223ec;if(_0xb9c924['query']['includeAll']){_0x4851c9[_0x05ac('0x42')]=[{'all':!![]}];}return db[_0x05ac('0x2c')][_0x05ac('0x43')](_0x4851c9);})['then'](function(_0x828953){_0xd09dee[_0x05ac('0x44')]=_0x828953;return _0xd09dee;})[_0x05ac('0x25')](respondWithFilteredResult(_0x196cf0,_0x4851c9))[_0x05ac('0x45')](handleError(_0x196cf0,null));};exports[_0x05ac('0x46')]=function(_0x23a12e,_0x5cd4c6){var _0x3241eb={'raw':!![],'where':{'id':_0x23a12e['params']['id']}},_0x3ad68e={};_0x3ad68e[_0x05ac('0x30')]=_[_0x05ac('0x33')](db[_0x05ac('0x2c')]['rawAttributes']);_0x3ad68e[_0x05ac('0x32')]=_[_0x05ac('0x33')](_0x23a12e[_0x05ac('0x32')]);_0x3ad68e['filters']=_['intersection'](_0x3ad68e[_0x05ac('0x30')],_0x3ad68e['query']);_0x3241eb['attributes']=_[_0x05ac('0x35')](_0x3ad68e[_0x05ac('0x30')],qs[_0x05ac('0x36')](_0x23a12e[_0x05ac('0x32')][_0x05ac('0x36')]));_0x3241eb[_0x05ac('0x37')]=_0x3241eb[_0x05ac('0x37')][_0x05ac('0x38')]?_0x3241eb[_0x05ac('0x37')]:_0x3ad68e[_0x05ac('0x30')];if(_0x23a12e[_0x05ac('0x32')]['includeAll']){_0x3241eb[_0x05ac('0x42')]=[{'all':!![]}];}_0x3241eb=_['merge']({},_0x3241eb,_0x23a12e[_0x05ac('0x41')]);return db['CannedAnswer'][_0x05ac('0x47')](_0x3241eb)[_0x05ac('0x25')](handleEntityNotFound(_0x5cd4c6,null))['then'](respondWithResult(_0x5cd4c6,null))[_0x05ac('0x45')](handleError(_0x5cd4c6,null));};exports[_0x05ac('0x48')]=function(_0x471674,_0x1bd497){if(_0x471674[_0x05ac('0x49')]['id']){delete _0x471674[_0x05ac('0x49')]['id'];}return db[_0x05ac('0x2c')]['find']({'where':{'id':_0x471674['params']['id']}})[_0x05ac('0x25')](handleEntityNotFound(_0x1bd497,null))['then'](saveUpdates(_0x471674[_0x05ac('0x49')],null))['then'](respondWithResult(_0x1bd497,null))['catch'](handleError(_0x1bd497,null));};exports[_0x05ac('0x26')]=function(_0x143bca,_0x50e1f1){return db[_0x05ac('0x2c')][_0x05ac('0x47')]({'where':{'id':_0x143bca[_0x05ac('0x4a')]['id']}})[_0x05ac('0x25')](handleEntityNotFound(_0x50e1f1,null))[_0x05ac('0x25')](removeEntity(_0x50e1f1,null))['catch'](handleError(_0x50e1f1,null));};exports[_0x05ac('0x4b')]=function(_0x2ecf59,_0x2902f2){var _0x3d4d78={'key':_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x2f')]};if(_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4c')]){_0x3d4d78['MailAccountId']=_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4c')];}else if(_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4d')]){_0x3d4d78['SmsAccountId']=_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4d')];}else if(_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4e')]){_0x3d4d78[_0x05ac('0x4e')]=_0x2ecf59['body'][_0x05ac('0x4e')];}else if(_0x2ecf59[_0x05ac('0x49')][_0x05ac('0x4f')]){_0x3d4d78[_0x05ac('0x4f')]=_0x2ecf59['body'][_0x05ac('0x4f')];}return db[_0x05ac('0x2c')]['find']({'where':_0x3d4d78})[_0x05ac('0x25')](function(_0x16ed3a){if(_0x16ed3a){throw new db[(_0x05ac('0x50'))][(_0x05ac('0x51'))]('The\x20inserted\x20key\x20already\x20exists.');}return db[_0x05ac('0x2c')]['create'](_0x2ecf59[_0x05ac('0x49')]);})[_0x05ac('0x25')](function(_0x204e11){var _0xb2095c=_0x2ecf59[_0x05ac('0x52')][_0x05ac('0x27')]({'plain':!![]});if(!_0xb2095c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xb2095c[_0x05ac('0x53')]===_0x05ac('0x52')){var _0x4c7815=_0x204e11[_0x05ac('0x27')]({'plain':!![]});return db[_0x05ac('0x54')][_0x05ac('0x47')]({'where':{'name':'CannedAnswers','userProfileId':_0xb2095c[_0x05ac('0x55')]},'raw':!![]})[_0x05ac('0x25')](function(_0x560259){if(_0x560259&&_0x560259[_0x05ac('0x56')]===0x0){return db[_0x05ac('0x57')][_0x05ac('0x4b')]({'name':_0x4c7815[_0x05ac('0x29')],'resourceId':_0x4c7815['id'],'type':_0x560259[_0x05ac('0x29')],'sectionId':_0x560259['id']},{})[_0x05ac('0x25')](function(){return _0x204e11;});}else{return _0x204e11;}})[_0x05ac('0x45')](function(_0x25c1f3){logger[_0x05ac('0x58')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x25c1f3);throw _0x25c1f3;});}return _0x204e11;})['then'](respondWithResult(_0x2902f2,0xc9))[_0x05ac('0x45')](handleError(_0x2902f2,null));}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js index f0f3762..79d6c46 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 _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 +var _0x41fa=['tools_canned_answers','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cannedAnswer.attributes','exports','define','CannedAnswer'];(function(_0x2eadf4,_0x592302){var _0x44ad1a=function(_0x4c1828){while(--_0x4c1828){_0x2eadf4['push'](_0x2eadf4['shift']());}};_0x44ad1a(++_0x592302);}(_0x41fa,0x1f1));var _0xa41f=function(_0xd5160a,_0x572c4b){_0xd5160a=_0xd5160a-0x0;var _0x576cf9=_0x41fa[_0xd5160a];return _0x576cf9;};'use strict';var _=require(_0xa41f('0x0'));var util=require(_0xa41f('0x1'));var logger=require(_0xa41f('0x2'))(_0xa41f('0x3'));var moment=require(_0xa41f('0x4'));var BPromise=require(_0xa41f('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa41f('0x6'));var rimraf=require(_0xa41f('0x7'));var config=require(_0xa41f('0x8'));var attributes=require(_0xa41f('0x9'));module[_0xa41f('0xa')]=function(_0x52f5d0,_0x5d6def){return _0x52f5d0[_0xa41f('0xb')](_0xa41f('0xc'),attributes,{'tableName':_0xa41f('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xa41f('0xe')});}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js index fcb0092..bac8203 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(_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 +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(_0x5b4b02,_0x4cc661){var _0x2c9f24=function(_0x3732d5){while(--_0x3732d5){_0x5b4b02['push'](_0x5b4b02['shift']());}};_0x2c9f24(++_0x4cc661);}(_0xa9e0,0x123));var _0x0a9e=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xa9e0[_0x18a79d];return _0x4f8848;};'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 cb34a83..a04c003 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 _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 +var _0xb8b4=['multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id','show','post','create','update','delete','exports'];(function(_0x25e109,_0x6ab24c){var _0xc0f7d6=function(_0x2fb92b){while(--_0x2fb92b){_0x25e109['push'](_0x25e109['shift']());}};_0xc0f7d6(++_0x6ab24c);}(_0xb8b4,0x80));var _0x4b8b=function(_0x4e49eb,_0x15ca11){_0x4e49eb=_0x4e49eb-0x0;var _0x1bf7ee=_0xb8b4[_0x4e49eb];return _0x1bf7ee;};'use strict';var multer=require(_0x4b8b('0x0'));var util=require(_0x4b8b('0x1'));var path=require(_0x4b8b('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x4b8b('0x3')]();var fs_extra=require(_0x4b8b('0x4'));var auth=require(_0x4b8b('0x5'));var interaction=require(_0x4b8b('0x6'));var config=require('../../config/environment');var controller=require('./cannedAnswer.controller');router[_0x4b8b('0x7')]('/',auth[_0x4b8b('0x8')](),controller['index']);router[_0x4b8b('0x7')](_0x4b8b('0x9'),auth[_0x4b8b('0x8')](),controller[_0x4b8b('0xa')]);router[_0x4b8b('0xb')]('/',auth['isAuthenticated'](),controller[_0x4b8b('0xc')]);router['put'](_0x4b8b('0x9'),auth['isAuthenticated'](),controller[_0x4b8b('0xd')]);router[_0x4b8b('0xe')](_0x4b8b('0x9'),auth[_0x4b8b('0x8')](),controller['destroy']);module[_0x4b8b('0xf')]=router; \ No newline at end of file diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js index 0a322a5..6df5fb9 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 _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 +var _0xe3ee=['STRING','INTEGER','DATE','1970-01-01\x2000:00:01'];(function(_0x25a0b9,_0x86e28f){var _0x30b9ab=function(_0x883a4){while(--_0x883a4){_0x25a0b9['push'](_0x25a0b9['shift']());}};_0x30b9ab(++_0x86e28f);}(_0xe3ee,0x116));var _0xee3e=function(_0x14390e,_0x589f48){_0x14390e=_0x14390e-0x0;var _0x21b495=_0xe3ee[_0x14390e];return _0x21b495;};'use strict';var Sequelize=require('sequelize');module['exports']={'calldate':{'type':Sequelize[_0xee3e('0x0')],'allowNull':![],'defaultValue':_0xee3e('0x1')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize[_0xee3e('0x2')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0xee3e('0x2')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0xee3e('0x2')]},'duration':{'type':Sequelize[_0xee3e('0x3')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xee3e('0x3')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xee3e('0x2')]},'amaflags':{'type':Sequelize[_0xee3e('0x3')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xee3e('0x2')]},'userfield':{'type':Sequelize[_0xee3e('0x2')]},'uniqueid':{'type':Sequelize[_0xee3e('0x2')]},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize[_0xee3e('0x2')]},'peeraccount':{'type':Sequelize[_0xee3e('0x2')]},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize[_0xee3e('0x2')]}}; \ No newline at end of file diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js index a698ed1..32e9426 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 _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 +var _0xbeea=['stack','name','index','map','Cdr','type','key','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filters','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','keys','rawAttributes','length','find','create','body','params','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','apply','save','update','destroy','then','sendStatus'];(function(_0x5149c7,_0xfd2f67){var _0x5010b0=function(_0x408cb0){while(--_0x408cb0){_0x5149c7['push'](_0x5149c7['shift']());}};_0x5010b0(++_0xfd2f67);}(_0xbeea,0xb1));var _0xabee=function(_0x211009,_0x82bdb3){_0x211009=_0x211009-0x0;var _0x5320b7=_0xbeea[_0x211009];return _0x5320b7;};'use strict';var emlformat=require(_0xabee('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xabee('0x1'));var jsonpatch=require(_0xabee('0x2'));var rp=require(_0xabee('0x3'));var moment=require('moment');var BPromise=require(_0xabee('0x4'));var Mustache=require('mustache');var util=require(_0xabee('0x5'));var path=require(_0xabee('0x6'));var sox=require(_0xabee('0x7'));var csv=require(_0xabee('0x8'));var ejs=require(_0xabee('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xabee('0xa'));var crypto=require(_0xabee('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xabee('0xc'));var toCsv=require('to-csv');var querystring=require(_0xabee('0xd'));var Papa=require(_0xabee('0xe'));var Redis=require(_0xabee('0xf'));var authService=require(_0xabee('0x10'));var qs=require(_0xabee('0x11'));var as=require(_0xabee('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xabee('0x13'))(_0xabee('0x14'));var utils=require(_0xabee('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xabee('0x16'));var db=require(_0xabee('0x17'))['db'];function respondWithStatusCode(_0x16d6a5,_0x49fb73){_0x49fb73=_0x49fb73||0xcc;return function(_0x5915a1){if(_0x5915a1){return _0x16d6a5['sendStatus'](_0x49fb73);}return _0x16d6a5['status'](_0x49fb73)['end']();};}function respondWithResult(_0x113c5c,_0x370a4e){_0x370a4e=_0x370a4e||0xc8;return function(_0x38ba29){if(_0x38ba29){return _0x113c5c[_0xabee('0x18')](_0x370a4e)[_0xabee('0x19')](_0x38ba29);}};}function respondWithFilteredResult(_0x5e94ff,_0x177670){return function(_0x2d85a4){if(_0x2d85a4){var _0x2f1107=typeof _0x177670[_0xabee('0x1a')]===_0xabee('0x1b')&&typeof _0x177670[_0xabee('0x1c')]===_0xabee('0x1b');var _0x5a9562=_0x2d85a4[_0xabee('0x1d')];var _0x112bb9=_0x2f1107?0x0:_0x177670[_0xabee('0x1a')];var _0x471b24=_0x2f1107?_0x2d85a4[_0xabee('0x1d')]:_0x177670[_0xabee('0x1a')]+_0x177670['limit'];var _0x47fa3f;if(_0x471b24>=_0x5a9562){_0x471b24=_0x5a9562;_0x47fa3f=0xc8;}else{_0x47fa3f=0xce;}_0x5e94ff[_0xabee('0x18')](_0x47fa3f);return _0x5e94ff['set']('Content-Range',_0x112bb9+'-'+_0x471b24+'/'+_0x5a9562)[_0xabee('0x19')](_0x2d85a4);}return null;};}function patchUpdates(_0x443301){return function(_0x3dd1ff){try{jsonpatch[_0xabee('0x1e')](_0x3dd1ff,_0x443301,!![]);}catch(_0x2b66f5){return BPromise['reject'](_0x2b66f5);}return _0x3dd1ff[_0xabee('0x1f')]();};}function saveUpdates(_0x54014d,_0x4f5501){return function(_0x4926d7){if(_0x4926d7){return _0x4926d7[_0xabee('0x20')](_0x54014d)['then'](function(_0x870569){return _0x870569;});}return null;};}function removeEntity(_0x2834e3,_0x520bc){return function(_0x15a36c){if(_0x15a36c){return _0x15a36c[_0xabee('0x21')]()[_0xabee('0x22')](function(){_0x2834e3[_0xabee('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0xdbbf57,_0xfc419d){return function(_0x42277e){if(!_0x42277e){_0xdbbf57[_0xabee('0x23')](0x194);}return _0x42277e;};}function handleError(_0x4ae65e,_0x2aa470){_0x2aa470=_0x2aa470||0x1f4;return function(_0x123d58){logger['error'](_0x123d58[_0xabee('0x24')]);if(_0x123d58[_0xabee('0x25')]){delete _0x123d58[_0xabee('0x25')];}_0x4ae65e[_0xabee('0x18')](_0x2aa470)['send'](_0x123d58);};}exports[_0xabee('0x26')]=function(_0x2b7464,_0x1b5aee){var _0x37e780={},_0x1c4f51={},_0x116e41={'count':0x0,'rows':[]};var _0x3df00d=_[_0xabee('0x27')](db[_0xabee('0x28')]['rawAttributes'],function(_0x2a2441){return{'name':_0x2a2441['fieldName'],'type':_0x2a2441[_0xabee('0x29')][_0xabee('0x2a')]};});_0x1c4f51[_0xabee('0x2b')]=_[_0xabee('0x27')](_0x3df00d,'name');_0x1c4f51[_0xabee('0x2c')]=_['keys'](_0x2b7464[_0xabee('0x2c')]);_0x1c4f51['filters']=_[_0xabee('0x2d')](_0x1c4f51['model'],_0x1c4f51['query']);_0x37e780[_0xabee('0x2e')]=_[_0xabee('0x2d')](_0x1c4f51[_0xabee('0x2b')],qs[_0xabee('0x2f')](_0x2b7464[_0xabee('0x2c')][_0xabee('0x2f')]));_0x37e780[_0xabee('0x2e')]=_0x37e780[_0xabee('0x2e')]['length']?_0x37e780[_0xabee('0x2e')]:_0x1c4f51[_0xabee('0x2b')];if(!_0x2b7464[_0xabee('0x2c')][_0xabee('0x30')](_0xabee('0x31'))){_0x37e780[_0xabee('0x1c')]=qs[_0xabee('0x1c')](_0x2b7464[_0xabee('0x2c')][_0xabee('0x1c')]);_0x37e780[_0xabee('0x1a')]=qs[_0xabee('0x1a')](_0x2b7464[_0xabee('0x2c')][_0xabee('0x1a')]);}_0x37e780[_0xabee('0x32')]=qs[_0xabee('0x33')](_0x2b7464[_0xabee('0x2c')][_0xabee('0x33')]);_0x37e780['where']=qs['filters'](_[_0xabee('0x34')](_0x2b7464[_0xabee('0x2c')],_0x1c4f51[_0xabee('0x35')]),_0x3df00d);if(_0x2b7464[_0xabee('0x2c')]['filter']){_0x37e780[_0xabee('0x36')]=_[_0xabee('0x37')](_0x37e780[_0xabee('0x36')],{'$or':_['map'](_0x3df00d,function(_0x1a48d5){if(_0x1a48d5['type']!==_0xabee('0x38')){var _0x879d31={};_0x879d31[_0x1a48d5[_0xabee('0x25')]]={'$like':'%'+_0x2b7464[_0xabee('0x2c')]['filter']+'%'};return _0x879d31;}})});}_0x37e780=_['merge']({},_0x37e780,_0x2b7464[_0xabee('0x39')]);var _0xb76b1d={'where':_0x37e780[_0xabee('0x36')]};return db[_0xabee('0x28')][_0xabee('0x1d')](_0xb76b1d)['then'](function(_0x229b00){_0x116e41[_0xabee('0x1d')]=_0x229b00;if(_0x2b7464['query'][_0xabee('0x3a')]){_0x37e780[_0xabee('0x3b')]=[{'all':!![]}];}return db['Cdr'][_0xabee('0x3c')](_0x37e780);})[_0xabee('0x22')](function(_0x3f05ee){_0x116e41[_0xabee('0x3d')]=_0x3f05ee;return _0x116e41;})[_0xabee('0x22')](respondWithFilteredResult(_0x1b5aee,_0x37e780))[_0xabee('0x3e')](handleError(_0x1b5aee,null));};exports[_0xabee('0x3f')]=function(_0x4ee7e6,_0x36fc07){var _0x22fc91={'raw':!![],'where':{'id':_0x4ee7e6['params']['id']}},_0x206350={};_0x206350[_0xabee('0x2b')]=_[_0xabee('0x40')](db['Cdr'][_0xabee('0x41')]);_0x206350[_0xabee('0x2c')]=_['keys'](_0x4ee7e6[_0xabee('0x2c')]);_0x206350[_0xabee('0x35')]=_[_0xabee('0x2d')](_0x206350[_0xabee('0x2b')],_0x206350[_0xabee('0x2c')]);_0x22fc91[_0xabee('0x2e')]=_[_0xabee('0x2d')](_0x206350['model'],qs[_0xabee('0x2f')](_0x4ee7e6[_0xabee('0x2c')][_0xabee('0x2f')]));_0x22fc91['attributes']=_0x22fc91[_0xabee('0x2e')][_0xabee('0x42')]?_0x22fc91['attributes']:_0x206350['model'];if(_0x4ee7e6['query'][_0xabee('0x3a')]){_0x22fc91[_0xabee('0x3b')]=[{'all':!![]}];}_0x22fc91=_['merge']({},_0x22fc91,_0x4ee7e6['options']);return db[_0xabee('0x28')][_0xabee('0x43')](_0x22fc91)[_0xabee('0x22')](handleEntityNotFound(_0x36fc07,null))[_0xabee('0x22')](respondWithResult(_0x36fc07,null))[_0xabee('0x3e')](handleError(_0x36fc07,null));};exports[_0xabee('0x44')]=function(_0x430b08,_0x307d34){return db[_0xabee('0x28')][_0xabee('0x44')](_0x430b08[_0xabee('0x45')],{})[_0xabee('0x22')](respondWithResult(_0x307d34,0xc9))[_0xabee('0x3e')](handleError(_0x307d34,null));};exports[_0xabee('0x20')]=function(_0x3e277d,_0x252f60){if(_0x3e277d[_0xabee('0x45')]['id']){delete _0x3e277d[_0xabee('0x45')]['id'];}return db['Cdr'][_0xabee('0x43')]({'where':{'id':_0x3e277d[_0xabee('0x46')]['id']}})['then'](handleEntityNotFound(_0x252f60,null))['then'](saveUpdates(_0x3e277d[_0xabee('0x45')],null))[_0xabee('0x22')](respondWithResult(_0x252f60,null))[_0xabee('0x3e')](handleError(_0x252f60,null));};exports[_0xabee('0x21')]=function(_0xe2433f,_0x3d819a){return db[_0xabee('0x28')]['find']({'where':{'id':_0xe2433f[_0xabee('0x46')]['id']}})['then'](handleEntityNotFound(_0x3d819a,null))[_0xabee('0x22')](removeEntity(_0x3d819a,null))[_0xabee('0x3e')](handleError(_0x3d819a,null));};exports['describe']=function(_0x3ebd50,_0x3aaf14){return db[_0xabee('0x28')]['describe']()[_0xabee('0x22')](respondWithResult(_0x3aaf14,null))['catch'](handleError(_0x3aaf14,null));}; \ No newline at end of file diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js index cb6168d..4b1c98e 100644 --- a/server/api/cdr/cdr.model.js +++ b/server/api/cdr/cdr.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_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 +var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x14fbbe,_0xe335cd){var _0x2bc8a1=function(_0x447d5a){while(--_0x447d5a){_0x14fbbe['push'](_0x14fbbe['shift']());}};_0x2bc8a1(++_0xe335cd);}(_0x7a54,0x106));var _0x47a5=function(_0x1e7472,_0x412367){_0x1e7472=_0x1e7472-0x0;var _0x7af92a=_0x7a54[_0x1e7472];return _0x7af92a;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js index f95555a..83d2539 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 _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 +var _0xa51b=['randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','Cdr,\x20%s,\x20%s','debug','Cdr,\x20%s,\x20%s,\x20%s','error','message','info','request\x20sent','result','lodash','util'];(function(_0x33b853,_0x1c6e57){var _0x3e4a3c=function(_0x177266){while(--_0x177266){_0x33b853['push'](_0x33b853['shift']());}};_0x3e4a3c(++_0x1c6e57);}(_0xa51b,0x1d9));var _0xba51=function(_0xae12e5,_0x53980b){_0xae12e5=_0xae12e5-0x0;var _0x532654=_0xa51b[_0xae12e5];return _0x532654;};'use strict';var _=require(_0xba51('0x0'));var util=require(_0xba51('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xba51('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xba51('0x3'))['db'];var utils=require(_0xba51('0x4'));var logger=require('../../config/logger')(_0xba51('0x5'));var config=require(_0xba51('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xba51('0x7')][_0xba51('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f38b8,_0x5dd69a,_0x278c86){return new BPromise(function(_0x5c5fe7,_0x578998){return client[_0xba51('0x9')](_0x3f38b8,_0x278c86)[_0xba51('0xa')](function(_0x2c9fc5){logger['info'](_0xba51('0xb'),_0x5dd69a,'request\x20sent');logger[_0xba51('0xc')](_0xba51('0xd'),_0x5dd69a,'request\x20sent',JSON['stringify'](_0x2c9fc5));if(_0x2c9fc5[_0xba51('0xe')]){if(_0x2c9fc5[_0xba51('0xe')]['code']===0x1f4){logger[_0xba51('0xe')](_0xba51('0xb'),_0x5dd69a,_0x2c9fc5[_0xba51('0xe')][_0xba51('0xf')]);return _0x578998(_0x2c9fc5[_0xba51('0xe')][_0xba51('0xf')]);}logger[_0xba51('0xe')]('Cdr,\x20%s,\x20%s',_0x5dd69a,_0x2c9fc5[_0xba51('0xe')][_0xba51('0xf')]);return _0x5c5fe7(_0x2c9fc5[_0xba51('0xe')]['message']);}else{logger[_0xba51('0x10')]('Cdr,\x20%s,\x20%s',_0x5dd69a,_0xba51('0x11'));_0x5c5fe7(_0x2c9fc5[_0xba51('0x12')][_0xba51('0xf')]);}})['catch'](function(_0x546c8a){logger['error'](_0xba51('0xb'),_0x5dd69a,_0x546c8a);_0x578998(_0x546c8a);});});} \ No newline at end of file diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js index df7ab54..6e79edb 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(_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 +var _0xa9e0=['isAuthenticated','create','put','/:id','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cdr.controller','get','index','/describe','show','post'];(function(_0xf0ec6e,_0xa183d3){var _0x8bbc27=function(_0x39822b){while(--_0x39822b){_0xf0ec6e['push'](_0xf0ec6e['shift']());}};_0x8bbc27(++_0xa183d3);}(_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['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0xc')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0x10'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);module[_0x0a9e('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 77b34b0..4ce8e06 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 _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 +var _0x56d5=['TEXT','sequelize','exports','INTEGER','STRING','noop'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x56d5,0x1db));var _0x556d=function(_0x519dca,_0x547467){_0x519dca=_0x519dca-0x0;var _0x3c255e=_0x56d5[_0x519dca];return _0x3c255e;};'use strict';var Sequelize=require(_0x556d('0x0'));module[_0x556d('0x1')]={'priority':{'type':Sequelize[_0x556d('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x556d('0x3')],'allowNull':![],'defaultValue':_0x556d('0x4')},'appdata':{'type':Sequelize[_0x556d('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js index 1a00e46..8ea3416 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 _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 +var _0x2285=['keys','ChatApplication','rawAttributes','query','intersection','model','fields','attributes','includeAll','merge','options','find','update','body','catch','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','destroy','error','stack','name','send','params'];(function(_0x291398,_0x128ddb){var _0x421d38=function(_0x279468){while(--_0x279468){_0x291398['push'](_0x291398['shift']());}};_0x421d38(++_0x128ddb);}(_0x2285,0x177));var _0x5228=function(_0x36d058,_0x347dc4){_0x36d058=_0x36d058-0x0;var _0x6d404f=_0x2285[_0x36d058];return _0x6d404f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5228('0x0'));var zipdir=require(_0x5228('0x1'));var jsonpatch=require(_0x5228('0x2'));var rp=require(_0x5228('0x3'));var moment=require(_0x5228('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5228('0x5'));var util=require(_0x5228('0x6'));var path=require('path');var sox=require(_0x5228('0x7'));var csv=require(_0x5228('0x8'));var ejs=require(_0x5228('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5228('0xa'));var squel=require(_0x5228('0xb'));var crypto=require(_0x5228('0xc'));var jsforce=require(_0x5228('0xd'));var deskjs=require(_0x5228('0xe'));var toCsv=require(_0x5228('0x8'));var querystring=require(_0x5228('0xf'));var Papa=require(_0x5228('0x10'));var Redis=require(_0x5228('0x11'));var authService=require(_0x5228('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x5228('0x13'));var hardwareService=require(_0x5228('0x14'));var logger=require(_0x5228('0x15'))(_0x5228('0x16'));var utils=require('../../config/utils');var config=require(_0x5228('0x17'));var licenseUtil=require(_0x5228('0x18'));var db=require(_0x5228('0x19'))['db'];function respondWithStatusCode(_0x3e984a,_0x5bbdfe){_0x5bbdfe=_0x5bbdfe||0xcc;return function(_0x2a939d){if(_0x2a939d){return _0x3e984a[_0x5228('0x1a')](_0x5bbdfe);}return _0x3e984a[_0x5228('0x1b')](_0x5bbdfe)[_0x5228('0x1c')]();};}function respondWithResult(_0x19c075,_0x530f36){_0x530f36=_0x530f36||0xc8;return function(_0x4d74d7){if(_0x4d74d7){return _0x19c075[_0x5228('0x1b')](_0x530f36)[_0x5228('0x1d')](_0x4d74d7);}};}function respondWithFilteredResult(_0x55f637,_0xa4aab9){return function(_0x271e3b){if(_0x271e3b){var _0x52d74c=typeof _0xa4aab9[_0x5228('0x1e')]===_0x5228('0x1f')&&typeof _0xa4aab9[_0x5228('0x20')]===_0x5228('0x1f');var _0x5ebf0c=_0x271e3b[_0x5228('0x21')];var _0x23419b=_0x52d74c?0x0:_0xa4aab9['offset'];var _0x41b812=_0x52d74c?_0x271e3b[_0x5228('0x21')]:_0xa4aab9[_0x5228('0x1e')]+_0xa4aab9['limit'];var _0x2dfc47;if(_0x41b812>=_0x5ebf0c){_0x41b812=_0x5ebf0c;_0x2dfc47=0xc8;}else{_0x2dfc47=0xce;}_0x55f637['status'](_0x2dfc47);return _0x55f637[_0x5228('0x22')](_0x5228('0x23'),_0x23419b+'-'+_0x41b812+'/'+_0x5ebf0c)[_0x5228('0x1d')](_0x271e3b);}return null;};}function patchUpdates(_0x52d49e){return function(_0x2c6837){try{jsonpatch[_0x5228('0x24')](_0x2c6837,_0x52d49e,!![]);}catch(_0xc7949f){return BPromise[_0x5228('0x25')](_0xc7949f);}return _0x2c6837['save']();};}function saveUpdates(_0x4d19a5,_0x28aba5){return function(_0x266419){if(_0x266419){return _0x266419['update'](_0x4d19a5)[_0x5228('0x26')](function(_0x2a738d){return _0x2a738d;});}return null;};}function removeEntity(_0xd82625,_0x1ae2df){return function(_0x63ce01){if(_0x63ce01){return _0x63ce01[_0x5228('0x27')]()[_0x5228('0x26')](function(){_0xd82625['status'](0xcc)[_0x5228('0x1c')]();});}};}function handleEntityNotFound(_0x531f16,_0x253207){return function(_0x3f587d){if(!_0x3f587d){_0x531f16['sendStatus'](0x194);}return _0x3f587d;};}function handleError(_0x594edf,_0x53cb40){_0x53cb40=_0x53cb40||0x1f4;return function(_0xfc158e){logger[_0x5228('0x28')](_0xfc158e[_0x5228('0x29')]);if(_0xfc158e['name']){delete _0xfc158e[_0x5228('0x2a')];}_0x594edf[_0x5228('0x1b')](_0x53cb40)[_0x5228('0x2b')](_0xfc158e);};}exports['show']=function(_0x31fc1a,_0x21398c){var _0x3e2561={'raw':!![],'where':{'id':_0x31fc1a[_0x5228('0x2c')]['id']}},_0x2adfb5={};_0x2adfb5['model']=_[_0x5228('0x2d')](db[_0x5228('0x2e')][_0x5228('0x2f')]);_0x2adfb5[_0x5228('0x30')]=_[_0x5228('0x2d')](_0x31fc1a['query']);_0x2adfb5['filters']=_[_0x5228('0x31')](_0x2adfb5[_0x5228('0x32')],_0x2adfb5['query']);_0x3e2561['attributes']=_[_0x5228('0x31')](_0x2adfb5['model'],qs[_0x5228('0x33')](_0x31fc1a[_0x5228('0x30')]['fields']));_0x3e2561[_0x5228('0x34')]=_0x3e2561['attributes']['length']?_0x3e2561[_0x5228('0x34')]:_0x2adfb5[_0x5228('0x32')];if(_0x31fc1a[_0x5228('0x30')][_0x5228('0x35')]){_0x3e2561['include']=[{'all':!![]}];}_0x3e2561=_[_0x5228('0x36')]({},_0x3e2561,_0x31fc1a[_0x5228('0x37')]);return db[_0x5228('0x2e')][_0x5228('0x38')](_0x3e2561)[_0x5228('0x26')](handleEntityNotFound(_0x21398c,null))[_0x5228('0x26')](respondWithResult(_0x21398c,null))['catch'](handleError(_0x21398c,null));};exports[_0x5228('0x39')]=function(_0x5dce78,_0x1ca305){if(_0x5dce78[_0x5228('0x3a')]['id']){delete _0x5dce78['body']['id'];}return db['ChatApplication']['find']({'where':{'id':_0x5dce78[_0x5228('0x2c')]['id']}})[_0x5228('0x26')](handleEntityNotFound(_0x1ca305,null))[_0x5228('0x26')](saveUpdates(_0x5dce78[_0x5228('0x3a')],null))[_0x5228('0x26')](respondWithResult(_0x1ca305,null))[_0x5228('0x3b')](handleError(_0x1ca305,null));};exports['destroy']=function(_0x493a05,_0x3601fb){return db[_0x5228('0x2e')]['find']({'where':{'id':_0x493a05[_0x5228('0x2c')]['id']}})['then'](handleEntityNotFound(_0x3601fb,null))['then'](removeEntity(_0x3601fb,null))[_0x5228('0x3b')](handleError(_0x3601fb,null));}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js index b580b93..8d04f77 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 _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 +var _0xab04=['../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','exports','define','ChatApplication','chat_applications','utf8mb4_unicode_ci','lodash','util'];(function(_0x2459fd,_0x575d9b){var _0x364cd2=function(_0x4b22f6){while(--_0x4b22f6){_0x2459fd['push'](_0x2459fd['shift']());}};_0x364cd2(++_0x575d9b);}(_0xab04,0x194));var _0x4ab0=function(_0x17eba5,_0x434f32){_0x17eba5=_0x17eba5-0x0;var _0x1aa6f1=_0xab04[_0x17eba5];return _0x1aa6f1;};'use strict';var _=require(_0x4ab0('0x0'));var util=require(_0x4ab0('0x1'));var logger=require(_0x4ab0('0x2'))(_0x4ab0('0x3'));var moment=require(_0x4ab0('0x4'));var BPromise=require(_0x4ab0('0x5'));var rp=require(_0x4ab0('0x6'));var fs=require('fs');var path=require(_0x4ab0('0x7'));var rimraf=require('rimraf');var config=require(_0x4ab0('0x8'));var attributes=require('./chatApplication.attributes');module[_0x4ab0('0x9')]=function(_0x506aa6,_0x4058e7){return _0x506aa6[_0x4ab0('0xa')](_0x4ab0('0xb'),attributes,{'tableName':_0x4ab0('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x4ab0('0xd')});}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js index e4aa3d7..3db13f8 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 _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 +var _0xfca8=['../../config/logger','rpc','jayson/promise','client','http','request','info','ChatApplication,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','moment','bluebird','../../mysqldb','../../config/utils'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xfca8,0xcd));var _0x8fca=function(_0xd50857,_0x7dd99e){_0xd50857=_0xd50857-0x0;var _0x4d9908=_0xfca8[_0xd50857];return _0x4d9908;};'use strict';var _=require(_0x8fca('0x0'));var util=require('util');var moment=require(_0x8fca('0x1'));var BPromise=require(_0x8fca('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8fca('0x3'))['db'];var utils=require(_0x8fca('0x4'));var logger=require(_0x8fca('0x5'))(_0x8fca('0x6'));var config=require('../../config/environment');var jayson=require(_0x8fca('0x7'));var client=jayson[_0x8fca('0x8')][_0x8fca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x41f57b,_0x45e931,_0x4f125){return new BPromise(function(_0x4413d3,_0x494eba){return client[_0x8fca('0xa')](_0x41f57b,_0x4f125)['then'](function(_0x54ac06){logger[_0x8fca('0xb')](_0x8fca('0xc'),_0x45e931,'request\x20sent');logger[_0x8fca('0xd')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x45e931,'request\x20sent',JSON[_0x8fca('0xe')](_0x54ac06));if(_0x54ac06[_0x8fca('0xf')]){if(_0x54ac06[_0x8fca('0xf')][_0x8fca('0x10')]===0x1f4){logger[_0x8fca('0xf')]('ChatApplication,\x20%s,\x20%s',_0x45e931,_0x54ac06[_0x8fca('0xf')][_0x8fca('0x11')]);return _0x494eba(_0x54ac06[_0x8fca('0xf')][_0x8fca('0x11')]);}logger[_0x8fca('0xf')]('ChatApplication,\x20%s,\x20%s',_0x45e931,_0x54ac06[_0x8fca('0xf')][_0x8fca('0x11')]);return _0x4413d3(_0x54ac06[_0x8fca('0xf')][_0x8fca('0x11')]);}else{logger[_0x8fca('0xb')]('ChatApplication,\x20%s,\x20%s',_0x45e931,_0x8fca('0x12'));_0x4413d3(_0x54ac06[_0x8fca('0x13')][_0x8fca('0x11')]);}})[_0x8fca('0x14')](function(_0x75ad53){logger['error']('ChatApplication,\x20%s,\x20%s',_0x45e931,_0x75ad53);_0x494eba(_0x75ad53);});});} \ No newline at end of file diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js index 9d0d997..f9828a0 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 _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 +var _0x2573=['/:id','isAuthenticated','show','put','update','destroy','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get'];(function(_0x34a851,_0x2b381e){var _0x4c04b8=function(_0x24724d){while(--_0x24724d){_0x34a851['push'](_0x34a851['shift']());}};_0x4c04b8(++_0x2b381e);}(_0x2573,0x128));var _0x3257=function(_0x198f3e,_0x5a75dd){_0x198f3e=_0x198f3e-0x0;var _0xc13c6a=_0x2573[_0x198f3e];return _0xc13c6a;};'use strict';var multer=require(_0x3257('0x0'));var util=require(_0x3257('0x1'));var path=require(_0x3257('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x3257('0x3')]();var fs_extra=require(_0x3257('0x4'));var auth=require(_0x3257('0x5'));var interaction=require(_0x3257('0x6'));var config=require(_0x3257('0x7'));var controller=require(_0x3257('0x8'));router[_0x3257('0x9')](_0x3257('0xa'),auth[_0x3257('0xb')](),controller[_0x3257('0xc')]);router[_0x3257('0xd')]('/:id',auth[_0x3257('0xb')](),controller[_0x3257('0xe')]);router['delete'](_0x3257('0xa'),auth['isAuthenticated'](),controller[_0x3257('0xf')]);module[_0x3257('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 61711da..474caa3 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 _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 +var _0xaf62=['exports','STRING'];(function(_0x43e356,_0x3db334){var _0x1bad5c=function(_0x372b2b){while(--_0x372b2b){_0x43e356['push'](_0x43e356['shift']());}};_0x1bad5c(++_0x3db334);}(_0xaf62,0x174));var _0x2af6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xaf62[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0x2af6('0x0')]={'name':{'type':Sequelize[_0x2af6('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x2af6('0x1')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js index 856c508..fe44ad4 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(_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 +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(_0x602ca8,_0x568e82){var _0x26e8ab=function(_0x3fb700){while(--_0x3fb700){_0x602ca8['push'](_0x602ca8['shift']());}};_0x26e8ab(++_0x568e82);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'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 df840cf..34c2786 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 _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 +var _0xe6e9=['../../mysqldb','ChatGroup','save','update','remove','emit','hasOwnProperty','hook','events'];(function(_0x204d21,_0x5d3952){var _0x55df50=function(_0x52de7a){while(--_0x52de7a){_0x204d21['push'](_0x204d21['shift']());}};_0x55df50(++_0x5d3952);}(_0xe6e9,0x182));var _0x9e6e=function(_0x303d12,_0x5d1900){_0x303d12=_0x303d12-0x0;var _0x513dc9=_0xe6e9[_0x303d12];return _0x513dc9;};'use strict';var EventEmitter=require(_0x9e6e('0x0'));var ChatGroup=require(_0x9e6e('0x1'))['db'][_0x9e6e('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9e6e('0x3'),'afterUpdate':_0x9e6e('0x4'),'afterDestroy':_0x9e6e('0x5')};function emitEvent(_0x3313dc){return function(_0x1f6d79,_0x5f4c0b,_0x1f64e8){ChatGroupEvents[_0x9e6e('0x6')](_0x3313dc+':'+_0x1f6d79['id'],_0x1f6d79);ChatGroupEvents[_0x9e6e('0x6')](_0x3313dc,_0x1f6d79);_0x1f64e8(null);};}for(var e in events){if(events[_0x9e6e('0x7')](e)){var event=events[e];ChatGroup[_0x9e6e('0x8')](e,emitEvent(event));}}module['exports']=ChatGroupEvents; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js index ba8fbb7..16f02d7 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 _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 +var _0x5561=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatGroup.attributes','chat_groups','lodash','util'];(function(_0xfb0cfd,_0x500179){var _0x2fd8aa=function(_0xccb501){while(--_0xccb501){_0xfb0cfd['push'](_0xfb0cfd['shift']());}};_0x2fd8aa(++_0x500179);}(_0x5561,0x106));var _0x1556=function(_0x4c886e,_0x158bce){_0x4c886e=_0x4c886e-0x0;var _0x2ce400=_0x5561[_0x4c886e];return _0x2ce400;};'use strict';var _=require(_0x1556('0x0'));var util=require(_0x1556('0x1'));var logger=require(_0x1556('0x2'))(_0x1556('0x3'));var moment=require(_0x1556('0x4'));var BPromise=require(_0x1556('0x5'));var rp=require(_0x1556('0x6'));var fs=require('fs');var path=require(_0x1556('0x7'));var rimraf=require(_0x1556('0x8'));var config=require(_0x1556('0x9'));var attributes=require(_0x1556('0xa'));module['exports']=function(_0x7b620c,_0x351631){return _0x7b620c['define']('ChatGroup',attributes,{'tableName':_0x1556('0xb'),'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 59e626d..7dd17fe 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 _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 +var _0xf874=['./chatGroup.socket','request','then','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf874,0xed));var _0x4f87=function(_0x4ead8d,_0x2ff6f1){_0x4ead8d=_0x4ead8d-0x0;var _0xef15fb=_0xf874[_0x4ead8d];return _0xef15fb;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4f87('0x0'));var BPromise=require(_0x4f87('0x1'));var rs=require(_0x4f87('0x2'));var fs=require('fs');var Redis=require(_0x4f87('0x3'));var db=require(_0x4f87('0x4'))['db'];var utils=require(_0x4f87('0x5'));var logger=require('../../config/logger')(_0x4f87('0x6'));var config=require(_0x4f87('0x7'));var jayson=require(_0x4f87('0x8'));var client=jayson[_0x4f87('0x9')][_0x4f87('0xa')]({'port':0x232a});config[_0x4f87('0xb')]=_['defaults'](config[_0x4f87('0xb')],{'host':_0x4f87('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4f87('0xb')]));require(_0x4f87('0xd'))['register'](socket);function respondWithRpcPromise(_0x3464af,_0x1bf29c,_0x3493fb){return new BPromise(function(_0xbdd68f,_0x1f7745){return client[_0x4f87('0xe')](_0x3464af,_0x3493fb)[_0x4f87('0xf')](function(_0x510063){logger['info'](_0x4f87('0x10'),_0x1bf29c,_0x4f87('0x11'));logger[_0x4f87('0x12')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x1bf29c,'request\x20sent',JSON[_0x4f87('0x13')](_0x510063));if(_0x510063[_0x4f87('0x14')]){if(_0x510063[_0x4f87('0x14')]['code']===0x1f4){logger[_0x4f87('0x14')]('ChatGroup,\x20%s,\x20%s',_0x1bf29c,_0x510063[_0x4f87('0x14')][_0x4f87('0x15')]);return _0x1f7745(_0x510063['error'][_0x4f87('0x15')]);}logger[_0x4f87('0x14')](_0x4f87('0x10'),_0x1bf29c,_0x510063[_0x4f87('0x14')][_0x4f87('0x15')]);return _0xbdd68f(_0x510063[_0x4f87('0x14')]['message']);}else{logger[_0x4f87('0x16')]('ChatGroup,\x20%s,\x20%s',_0x1bf29c,_0x4f87('0x11'));_0xbdd68f(_0x510063[_0x4f87('0x17')][_0x4f87('0x15')]);}})[_0x4f87('0x18')](function(_0x12fd80){logger[_0x4f87('0x14')](_0x4f87('0x10'),_0x1bf29c,_0x12fd80);_0x1f7745(_0x12fd80);});});} \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js index 5cc19cb..5a770fd 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 _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 +var _0xe14a=['emit','register','./chatGroup.events','remove','update'];(function(_0x2c9481,_0x2bd23f){var _0x56839e=function(_0x3db161){while(--_0x3db161){_0x2c9481['push'](_0x2c9481['shift']());}};_0x56839e(++_0x2bd23f);}(_0xe14a,0x1a6));var _0xae14=function(_0x3f21bf,_0x132682){_0x3f21bf=_0x3f21bf-0x0;var _0x9761a1=_0xe14a[_0x3f21bf];return _0x9761a1;};'use strict';var ChatGroupEvents=require(_0xae14('0x0'));var events=['save',_0xae14('0x1'),_0xae14('0x2')];function createListener(_0x4ae101,_0x13a01f){return function(_0x11dd91){_0x13a01f[_0xae14('0x3')](_0x4ae101,_0x11dd91);};}function removeListener(_0x104944,_0x58c556){return function(){ChatGroupEvents['removeListener'](_0x104944,_0x58c556);};}exports[_0xae14('0x4')]=function(_0x3b7833){for(var _0x21c21e=0x0,_0xb696ef=events['length'];_0x21c21e<_0xb696ef;_0x21c21e++){var _0x1dbb1f=events[_0x21c21e];var _0x8e1bae=createListener('chatGroup:'+_0x1dbb1f,_0x3b7833);ChatGroupEvents['on'](_0x1dbb1f,_0x8e1bae);}}; \ No newline at end of file diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js index a0783d8..636be38 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 _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 +var _0x5872=['get','isAuthenticated','index','/describe','describe','/:id','/:id/unread','getUnread','/:id/members','/:id/messages','getMessages','post','create','addMessage','put','update','delete','destroy','removeMembers','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatGroup.controller'];(function(_0x42ca5d,_0x4bc7f9){var _0x5388de=function(_0x1a7765){while(--_0x1a7765){_0x42ca5d['push'](_0x42ca5d['shift']());}};_0x5388de(++_0x4bc7f9);}(_0x5872,0x6b));var _0x2587=function(_0x367336,_0x18c229){_0x367336=_0x367336-0x0;var _0x3423a7=_0x5872[_0x367336];return _0x3423a7;};'use strict';var multer=require('multer');var util=require(_0x2587('0x0'));var path=require(_0x2587('0x1'));var timeout=require(_0x2587('0x2'));var express=require(_0x2587('0x3'));var router=express[_0x2587('0x4')]();var fs_extra=require(_0x2587('0x5'));var auth=require(_0x2587('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x2587('0x7'));var controller=require(_0x2587('0x8'));router[_0x2587('0x9')]('/',auth[_0x2587('0xa')](),controller[_0x2587('0xb')]);router[_0x2587('0x9')](_0x2587('0xc'),auth[_0x2587('0xa')](),controller[_0x2587('0xd')]);router[_0x2587('0x9')](_0x2587('0xe'),auth['isAuthenticated'](),controller['show']);router[_0x2587('0x9')](_0x2587('0xf'),auth['isAuthenticated'](),controller[_0x2587('0x10')]);router[_0x2587('0x9')](_0x2587('0x11'),auth[_0x2587('0xa')](),controller['getMembers']);router['get'](_0x2587('0x12'),auth[_0x2587('0xa')](),controller[_0x2587('0x13')]);router[_0x2587('0x14')]('/',auth['isAuthenticated'](),controller[_0x2587('0x15')]);router[_0x2587('0x14')]('/:id/members',auth[_0x2587('0xa')](),controller['addMembers']);router['post'](_0x2587('0x12'),auth['isAuthenticated'](),controller[_0x2587('0x16')]);router[_0x2587('0x17')]('/:id',auth[_0x2587('0xa')](),controller[_0x2587('0x18')]);router[_0x2587('0x19')](_0x2587('0xe'),auth[_0x2587('0xa')](),controller[_0x2587('0x1a')]);router[_0x2587('0x19')](_0x2587('0x11'),auth['isAuthenticated'](),controller[_0x2587('0x1b')]);module[_0x2587('0x1c')]=router; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js index 6d2a72c..6104e08 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 _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 +var _0x4af8=['TEXT','STRING','long','DATE','BOOLEAN','ENUM','star','thumb'];(function(_0x2e3107,_0x25f970){var _0x833d69=function(_0x420e78){while(--_0x420e78){_0x2e3107['push'](_0x2e3107['shift']());}};_0x833d69(++_0x25f970);}(_0x4af8,0x1ad));var _0x84af=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0x4af8[_0xbe200f];return _0x192597;};'use strict';var Sequelize=require('sequelize');module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0x84af('0x0')](_0x84af('0x1'),_0x84af('0x2')),'defaultValue':_0x84af('0x1')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x84af('0x3')]},'mailTranscript':{'type':Sequelize[_0x84af('0x4')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x84af('0x4')]},'secondDisposition':{'type':Sequelize[_0x84af('0x4')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x84af('0x4')]},'browserName':{'type':Sequelize[_0x84af('0x4')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize[_0x84af('0x4')]},'deviceModel':{'type':Sequelize[_0x84af('0x4')]},'deviceVendor':{'type':Sequelize['STRING']},'deviceType':{'type':Sequelize[_0x84af('0x4')]},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0x84af('0x4')]},'formData':{'type':Sequelize[_0x84af('0x3')](_0x84af('0x5'))},'read1stAt':{'type':Sequelize[_0x84af('0x6')]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x84af('0x0')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x84af('0x4')]},'customerPort':{'type':Sequelize[_0x84af('0x4')]},'vidaooSessionId':{'type':Sequelize['TEXT']},'autoreplyExecuted':{'type':Sequelize[_0x84af('0x7')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js index 552f73f..2bb83bc 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 _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 +var _0x3423=['Unauthorized','attachId','ChatOfflineMessageId','server/files/attachments/','offline-chat/','join','download','root','server/files/chat/upload/','format','now','pathTranscript','Messages','%s%d','System','customer','Visitor','agentIdentifier','website_alias','agentAlias','agent_alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','direction','appendFileSync','MailServerOut','Smtp','service','host','secure','authentication','auth','pass','SendMail','\x22%s\x22\x20<%s>','mailTranscript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ChatMessage','ids','omit','getMessages','YYYY-MM-DD\x20HH:mm:ss','options','findAll','getMyMessages','alias','addTags','setTags','spread','emit','chatInteractionTags:save','removeTags','server','attachments','transcript-%d-%s.zip','firstName','secret','read','Account','Owner','get','mkdirSync','Chat','closedAt','osName','customerIp','customerPort','existsSync','pipe','out','lastName','renderFile','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','log','err','unlinkSync','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','../../components/auth/service','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./chatInteraction.socket','register','jayson/promise','http','client','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','update','destroy','end','sendStatus','stack','name','send','render','merge','body','interaction','account','Users','fullname','TagIds','forEach','push','catch','index','map','ChatInteraction','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','pick','field','color','tools_tags','select','u.id','u.fullname','ui.ChatInteractionId','user_has_chat_interactions','users','chat_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','chat_websites','a.id\x20=\x20i.ChatWebsiteId','it.ChatInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','parseSearch','sqlOperator','conditions','find','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','Contact','operator','$substring','split','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','start','Tag','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','text','some','ChatWebsiteId','where','i.ChatWebsiteId\x20IN\x20?','concat','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','isNumeric','i.id\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','group','i.id','QueryTypes','clone','DESC','t.id\x20IN\x20?','resolve','user','role','agent','getChatWebsites','i.ChatWebsiteId\x20IS\x20NULL','sequelize','toString','fields','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','a.key','Account.key','a.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','c.email','Contact.email','c.phone','Contact.phone','Contact.fax','o.fullname','Owner.fullname','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ChatInteractionId','all','rows','show','params','rawAttributes','includeAll','include','create','describe','createVidaooSession','findOne','ChatWebsite','vidaooApiKey','vidaooEscalation','vidaooNote','vidaooMetadata','email','contact','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooTopic','isNull','follow','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Sequelize','Error\x20in\x20Vidaoo\x20configuration','join_url','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','closed','disposition','AbandonInteraction','attachmentUpload','file','originalname','basename','filename','Attachment','attachmentDownload'];(function(_0x824a49,_0x32a810){var _0x5384c4=function(_0x5006dc){while(--_0x5006dc){_0x824a49['push'](_0x824a49['shift']());}};_0x5384c4(++_0x32a810);}(_0x3423,0x188));var _0x3342=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3423[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x3342('0x0'));var jsonpatch=require(_0x3342('0x1'));var rp=require(_0x3342('0x2'));var moment=require(_0x3342('0x3'));var BPromise=require(_0x3342('0x4'));var Mustache=require(_0x3342('0x5'));var util=require(_0x3342('0x6'));var path=require(_0x3342('0x7'));var sox=require(_0x3342('0x8'));var csv=require(_0x3342('0x9'));var ejs=require(_0x3342('0xa'));var fs=require('fs');var fs_extra=require(_0x3342('0xb'));var _=require(_0x3342('0xc'));var squel=require(_0x3342('0xd'));var crypto=require(_0x3342('0xe'));var jsforce=require(_0x3342('0xf'));var deskjs=require(_0x3342('0x10'));var toCsv=require(_0x3342('0x9'));var querystring=require(_0x3342('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x3342('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var pdf=require('../../components/export/pdf');var hardwareService=require('../../config/license/hardware');var logger=require(_0x3342('0x13'))(_0x3342('0x14'));var utils=require('../../config/utils');var config=require(_0x3342('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x3342('0x16'))['db'];config[_0x3342('0x17')]=_['defaults'](config[_0x3342('0x17')],{'host':_0x3342('0x18'),'port':0x18eb});var socket=require(_0x3342('0x19'))(new Redis(config[_0x3342('0x17')]));require(_0x3342('0x1a'))[_0x3342('0x1b')](socket);var jayson=require(_0x3342('0x1c'));var client=jayson['client'][_0x3342('0x1d')]({'port':0x232b});var client9004=jayson[_0x3342('0x1e')]['http']({'port':0x232c});function respondWithRpcPromise(_0x40d609,_0x2c9df0,_0x51ef91,_0x554f9c){return new BPromise(function(_0xdbbb6c,_0x143cf1){var _0x6949fc=_0x554f9c||client;return _0x6949fc[_0x3342('0x1f')](_0x40d609,_0x51ef91)[_0x3342('0x20')](function(_0x156c24){logger[_0x3342('0x21')](_0x3342('0x22'),_0x2c9df0,_0x3342('0x23'));logger['debug'](_0x3342('0x24'),_0x2c9df0,_0x3342('0x23'),JSON[_0x3342('0x25')](_0x156c24));if(_0x156c24['error']){if(_0x156c24[_0x3342('0x26')][_0x3342('0x27')]===0x1f4){logger['error'](_0x3342('0x22'),_0x2c9df0,_0x156c24[_0x3342('0x26')]['message']);return _0x143cf1(_0x156c24[_0x3342('0x26')]['message']);}logger[_0x3342('0x26')](_0x3342('0x22'),_0x2c9df0,_0x156c24[_0x3342('0x26')][_0x3342('0x28')]);return _0xdbbb6c(_0x156c24[_0x3342('0x26')][_0x3342('0x28')]);}else{logger[_0x3342('0x21')](_0x3342('0x22'),_0x2c9df0,'request\x20sent');_0xdbbb6c(_0x156c24[_0x3342('0x29')]['message']);}})['catch'](function(_0x986ab0){logger['error']('ChatInteraction,\x20%s,\x20%s',_0x2c9df0,_0x986ab0);_0x143cf1(_0x986ab0);});});}function respondWithStatusCode(_0x247ee4,_0x58f0f5){_0x58f0f5=_0x58f0f5||0xcc;return function(_0x37df78){if(_0x37df78){return _0x247ee4['sendStatus'](_0x58f0f5);}return _0x247ee4['status'](_0x58f0f5)['end']();};}function respondWithResult(_0x1497d9,_0x286c42){_0x286c42=_0x286c42||0xc8;return function(_0x1dd607){if(_0x1dd607){return _0x1497d9['status'](_0x286c42)[_0x3342('0x2a')](_0x1dd607);}};}function respondWithFilteredResult(_0x1275e2,_0x1cc542){return function(_0x272a52){if(_0x272a52){var _0x4fbfb7=typeof _0x1cc542[_0x3342('0x2b')]===_0x3342('0x2c')&&typeof _0x1cc542[_0x3342('0x2d')]===_0x3342('0x2c');var _0xf82530=_0x272a52[_0x3342('0x2e')];var _0x135760=_0x4fbfb7?0x0:_0x1cc542['offset'];var _0x2e0bde=_0x4fbfb7?_0x272a52['count']:_0x1cc542[_0x3342('0x2b')]+_0x1cc542[_0x3342('0x2d')];var _0x508f87;if(_0x2e0bde>=_0xf82530){_0x2e0bde=_0xf82530;_0x508f87=0xc8;}else{_0x508f87=0xce;}_0x1275e2[_0x3342('0x2f')](_0x508f87);return _0x1275e2[_0x3342('0x30')](_0x3342('0x31'),_0x135760+'-'+_0x2e0bde+'/'+_0xf82530)[_0x3342('0x2a')](_0x272a52);}return null;};}function patchUpdates(_0x498ded){return function(_0x3301c1){try{jsonpatch[_0x3342('0x32')](_0x3301c1,_0x498ded,!![]);}catch(_0x311cfe){return BPromise[_0x3342('0x33')](_0x311cfe);}return _0x3301c1[_0x3342('0x34')]();};}function saveUpdates(_0x26528f,_0x16fbb0){return function(_0x78c868){if(_0x78c868){return _0x78c868[_0x3342('0x35')](_0x26528f)[_0x3342('0x20')](function(_0x46cdbd){return _0x46cdbd;});}return null;};}function removeEntity(_0x30dcea,_0x5aea96){return function(_0x478c8d){if(_0x478c8d){return _0x478c8d[_0x3342('0x36')]()['then'](function(){_0x30dcea[_0x3342('0x2f')](0xcc)[_0x3342('0x37')]();});}};}function handleEntityNotFound(_0x1a74d3,_0x361d23){return function(_0x2dbc02){if(!_0x2dbc02){_0x1a74d3[_0x3342('0x38')](0x194);}return _0x2dbc02;};}function handleError(_0x956cde,_0x5d460c){_0x5d460c=_0x5d460c||0x1f4;return function(_0x4754d9){logger[_0x3342('0x26')](_0x4754d9[_0x3342('0x39')]);if(_0x4754d9[_0x3342('0x3a')]){delete _0x4754d9[_0x3342('0x3a')];}_0x956cde['status'](_0x5d460c)[_0x3342('0x3b')](_0x4754d9);};}function getMustacheRender(_0x4d1a59,_0x22ca76){return Mustache[_0x3342('0x3c')](_0x4d1a59,_[_0x3342('0x3d')](_0x22ca76[_0x3342('0x3e')],{'contact':_0x22ca76['contact'],'message':_0x22ca76[_0x3342('0x28')],'agent':_0x22ca76['agent'],'interaction':_0x22ca76[_0x3342('0x3f')],'account':_0x22ca76[_0x3342('0x40')]}))||'';}function getInteractionUsers(_0x2e815e,_0x1b58c5){return new BPromise(function(_0x40a5bd,_0xf83613){try{if(_0x1b58c5[_0x2e815e['id']]){_0x2e815e[_0x3342('0x41')]=_['map'](_0x1b58c5[_0x2e815e['id']],function(_0x3e626b){return{'id':_0x3e626b['id'],'fullname':_0x3e626b[_0x3342('0x42')]};});}}catch(_0x57cc44){_0xf83613(_0x57cc44);}_0x40a5bd(_0x2e815e);});}function getInteractionTags(_0x324205,_0x1f336c){return new BPromise(function(_0x494d28,_0x45b956){try{if(_0x324205[_0x3342('0x43')]){_0x324205['Tags']=[];_0x324205['TagIds']['split'](',')[_0x3342('0x44')](function(_0x41e727){_0x324205['Tags'][_0x3342('0x45')](_0x1f336c[_0x41e727]);});}delete _0x324205[_0x3342('0x43')];}catch(_0x2944ab){_0x45b956(_0x2944ab);}_0x494d28(_0x324205);});}function updateChatInteraction(_0x17fd01,_0x126ee4,_0x308363){return new BPromise(function(_0x34de7b,_0x4282ea){return getInteractionUsers(_0x17fd01,_0x308363)['then'](function(_0x5a787b){return getInteractionTags(_0x5a787b,_0x126ee4);})[_0x3342('0x20')](function(_0x7341fa){_0x34de7b(_0x7341fa);})[_0x3342('0x46')](function(_0xee717e){_0x4282ea(_0xee717e);});});}exports[_0x3342('0x47')]=function(_0x414fcb,_0x5e24a1){var _0x15eb49={},_0x196436={},_0x283ce9={'count':0x0,'rows':[]};var _0x309423=_[_0x3342('0x48')](db[_0x3342('0x49')]['rawAttributes'],function(_0x36baa4){return{'name':_0x36baa4['fieldName'],'type':_0x36baa4[_0x3342('0x4a')][_0x3342('0x4b')]};});_0x196436[_0x3342('0x4c')]=_[_0x3342('0x48')](_0x309423,'name');_0x196436[_0x3342('0x4d')]=_[_0x3342('0x4e')](_0x414fcb['query']);_0x196436[_0x3342('0x4f')]=_[_0x3342('0x50')](_0x196436[_0x3342('0x4c')],_0x196436[_0x3342('0x4d')]);_0x15eb49['attributes']=_[_0x3342('0x50')](_0x196436[_0x3342('0x4c')],qs['fields'](_0x414fcb[_0x3342('0x4d')]['fields']));_0x15eb49['attributes']=_0x15eb49[_0x3342('0x51')][_0x3342('0x52')]?_0x15eb49[_0x3342('0x51')]:_0x196436[_0x3342('0x4c')];if(!_0x414fcb[_0x3342('0x4d')][_0x3342('0x53')](_0x3342('0x54'))){_0x15eb49['limit']=qs['limit'](_0x414fcb[_0x3342('0x4d')]['limit']);_0x15eb49[_0x3342('0x2b')]=qs['offset'](_0x414fcb['query']['offset']);}_0x15eb49[_0x3342('0x55')]=qs[_0x3342('0x56')](_0x414fcb[_0x3342('0x4d')][_0x3342('0x56')]);_0x15eb49['where']=qs[_0x3342('0x4f')](_[_0x3342('0x57')](_0x414fcb['query'],_0x196436[_0x3342('0x4f')]),_0x309423);var _0x24d543=[];var _0x43c27a=squel['select']()[_0x3342('0x58')]('id')[_0x3342('0x58')](_0x3342('0x3a'))[_0x3342('0x58')](_0x3342('0x59'))['from'](_0x3342('0x5a'));var _0x1d5001=squel[_0x3342('0x5b')]()[_0x3342('0x58')](_0x3342('0x5c'))[_0x3342('0x58')](_0x3342('0x5d'))[_0x3342('0x58')](_0x3342('0x5e'))['from'](_0x3342('0x5f'),'ui')['left_join'](_0x3342('0x60'),'u','u.id\x20=\x20ui.UserId');var _0x49e3c6=squel['select']()['from'](_0x3342('0x61'),'i')[_0x3342('0x62')](_0x3342('0x63'),'c',_0x3342('0x64'))[_0x3342('0x62')](_0x3342('0x60'),'o',_0x3342('0x65'))[_0x3342('0x62')](_0x3342('0x66'),'a',_0x3342('0x67'))[_0x3342('0x62')]('chat_messages','me','me.ChatInteractionId\x20=\x20i.id')[_0x3342('0x62')]('chat_interaction_has_tags','it',_0x3342('0x68'))['left_join']('tools_tags','t',_0x3342('0x69'));var _0x43d39f=squel[_0x3342('0x6a')]();var _0x5d5e0f=[];var _0x58d37a=squel[_0x3342('0x6a')]();var _0x3cc92a;if(_0x414fcb['query'][_0x3342('0x6b')]){_0x3cc92a=as[_0x3342('0x6c')](_0x414fcb[_0x3342('0x4d')]['search']);var _0x23c186=_0x3cc92a[_0x3342('0x6d')];for(var _0x3dd926=0x0;_0x3dd926<_0x3cc92a[_0x3342('0x6e')][_0x3342('0x52')];_0x3dd926++){var _0x19e27b=_0x3cc92a[_0x3342('0x6e')][_0x3dd926];var _0x57942a='i';var _0x4bc9a9=_[_0x3342('0x6f')](_0x309423,['name',_0x19e27b[_0x3342('0x58')]]);if(!_0x4bc9a9){switch(_0x19e27b[_0x3342('0x58')]){case _0x3342('0x70'):if(_0x19e27b[_0x3342('0x71')]==0x1){_0x49e3c6[_0x3342('0x72')]('`'+_0x19e27b['field']+_0x3342('0x73'));}else{_0x49e3c6[_0x3342('0x72')]('`'+_0x19e27b['field']+_0x3342('0x74'));}break;case _0x3342('0x75'):if(_0x19e27b[_0x3342('0x76')]===_0x3342('0x77')){if(_0x19e27b[_0x3342('0x71')][_0x3342('0x78')]('\x20')[_0x3342('0x52')]>0x1){_0x43d39f[_0x23c186](_0x3342('0x79'),qs[_0x3342('0x7a')](_0x19e27b[_0x3342('0x71')]),null);}else{var _0x42fcd7='%'+_0x19e27b[_0x3342('0x71')]+'%';_0x43d39f[_0x23c186](_0x3342('0x7b'),_0x42fcd7,_0x42fcd7,_0x42fcd7);}}else{_0x4bc9a9=_['find'](_0x309423,['name',_0x3342('0x7c')]);_0x19e27b[_0x3342('0x58')]=_0x3342('0x7c');_0x570781=as[_0x3342('0x7d')](_0x57942a,_0x4bc9a9['type'],_0x19e27b);_0x43d39f[_0x23c186](_0x570781['text'],_0x570781[_0x3342('0x71')][_0x3342('0x7e')],_0x570781[_0x3342('0x71')][_0x3342('0x37')]);}break;case _0x3342('0x7f'):var _0x3902b6=_0x19e27b[_0x3342('0x71')][_0x3342('0x78')](',')[_0x3342('0x48')](function(_0x385d9c){return Number(_0x385d9c);});_0x3902b6['forEach'](function(_0x3392a2){_0x58d37a['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x3392a2+',%');});_0x5d5e0f=_[_0x3342('0x80')](_0x5d5e0f,_0x3902b6);break;case _0x3342('0x81'):if(_0x19e27b['operator']===_0x3342('0x77')){_0x43d39f[_0x23c186](_0x3342('0x82'),'%'+_0x19e27b['value']+'%',null);}else{_0x4bc9a9=_[_0x3342('0x6f')](_0x309423,[_0x3342('0x3a'),_0x3342('0x83')]);_0x19e27b[_0x3342('0x58')]=_0x3342('0x83');_0x570781=as[_0x3342('0x7d')](_0x57942a,_0x4bc9a9[_0x3342('0x4a')],_0x19e27b);_0x43d39f[_0x23c186](_0x570781['text'],_0x570781[_0x3342('0x71')]['start'],_0x570781['value'][_0x3342('0x37')]);}break;case _0x3342('0x3e'):_0x570781=as[_0x3342('0x7d')]('me',null,_0x19e27b);_0x43d39f[_0x23c186](_0x570781[_0x3342('0x84')],_0x570781[_0x3342('0x71')][_0x3342('0x7e')],_0x570781[_0x3342('0x71')][_0x3342('0x37')]);break;}}else{var _0x570781=as[_0x3342('0x7d')](_0x57942a,_0x4bc9a9[_0x3342('0x4a')],_0x19e27b);_0x43d39f[_0x23c186](_0x570781[_0x3342('0x84')],_0x570781[_0x3342('0x71')][_0x3342('0x7e')],_0x570781[_0x3342('0x71')][_0x3342('0x37')]);}}}else{var _0x58926c=_(_0x414fcb[_0x3342('0x4d')])[_0x3342('0x4e')]()[_0x3342('0x48')](function(_0x20203b){return _[_0x3342('0x85')](_0x309423,[_0x3342('0x3a'),_0x20203b])?_0x20203b:undefined;})['compact']()['value']();if(!_['isEmpty'](_0x58926c)){_0x58926c[_0x3342('0x44')](function(_0x21670a){if(_0x21670a===_0x3342('0x86')){_0x49e3c6[_0x3342('0x87')](_0x3342('0x88'),[][_0x3342('0x89')](_0x414fcb[_0x3342('0x4d')][_0x21670a]));}else if(_0x21670a===_0x3342('0x8a')){var _0x4b47ab=JSON[_0x3342('0x8b')](_0x414fcb[_0x3342('0x4d')][_0x21670a])[_0x3342('0x8c')];var _0x42782f=JSON['parse'](_0x414fcb[_0x3342('0x4d')][_0x21670a])[_0x3342('0x8d')];_0x49e3c6[_0x3342('0x87')](_0x3342('0x8e'),_0x4b47ab,_0x42782f);}else{if(_0x414fcb[_0x3342('0x4d')][_0x21670a]===_0x3342('0x8f')){_0x49e3c6[_0x3342('0x87')]('i.'+_0x21670a+_0x3342('0x90'));}else{_0x49e3c6[_0x3342('0x87')]('i.'+_0x21670a+'\x20=\x20?',_0x414fcb[_0x3342('0x4d')][_0x21670a]);}}});}if(_0x414fcb[_0x3342('0x4d')]['read']){if(_0x414fcb[_0x3342('0x4d')]['read']==0x1){_0x49e3c6[_0x3342('0x72')]('`unreadMessages`\x20=\x200');}else{_0x49e3c6[_0x3342('0x72')]('`unreadMessages`\x20>\x200');}}if(_0x414fcb[_0x3342('0x4d')][_0x3342('0x91')]){_0x5d5e0f=_['isArray'](_0x414fcb[_0x3342('0x4d')][_0x3342('0x91')])?_0x414fcb['query'][_0x3342('0x91')]:new Array(_0x414fcb[_0x3342('0x4d')][_0x3342('0x91')]);_0x5d5e0f[_0x3342('0x44')](function(_0x22a9ec){_0x58d37a['or'](_0x3342('0x92'),'%,'+_0x22a9ec+',%');});}if(_0x414fcb['query'][_0x3342('0x93')]){var _0x5f168b=_0x414fcb[_0x3342('0x4d')][_0x3342('0x93')][_0x3342('0x94')]('\x5c','\x5c\x5c')[_0x3342('0x94')](/'/g,'\x27\x27');if(qs[_0x3342('0x95')](_0x5f168b)){_0x43d39f['or'](_0x3342('0x96'),_0x5f168b+'%');}else{_0x43d39f['or'](_0x3342('0x97'),qs[_0x3342('0x7a')](_0x5f168b))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x5f168b+'%');}}}_0x49e3c6[_0x3342('0x87')](_0x43d39f);_0x49e3c6[_0x3342('0x98')](_0x3342('0x99'));var _0x592122={'type':db['Sequelize'][_0x3342('0x9a')]['SELECT'],'raw':!![]};var _0x59088e=_0x49e3c6[_0x3342('0x9b')]();_0x59088e[_0x3342('0x58')]('i.id');_0x59088e[_0x3342('0x58')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x3342('0x70'));if(_0x15eb49['order']){_0x15eb49['order'][_0x3342('0x44')](function(_0x2d3f3e){var _0x3131d9=_0x2d3f3e[0x0]==='contactName'?_0x2d3f3e[0x0]:'i.'+_0x2d3f3e[0x0];_0x49e3c6['order'](_0x3131d9,_0x2d3f3e[0x1]===_0x3342('0x9c')?![]:!![]);});}if(!_['isEmpty'](_0x5d5e0f)){_0x49e3c6[_0x3342('0x72')](_0x58d37a);_0x59088e[_0x3342('0x87')](_0x3342('0x9d'),_0x5d5e0f);}BPromise[_0x3342('0x9e')]()['then'](function(){if(!_0x3cc92a){if(_0x414fcb['query'][_0x3342('0x86')])return;_0x59088e[_0x3342('0x87')]('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');_0x49e3c6[_0x3342('0x87')]('i.ChatWebsiteId\x20IS\x20NOT\x20NULL');return;}if(_0x414fcb[_0x3342('0x9f')][_0x3342('0xa0')]!==_0x3342('0xa1'))return;return _0x414fcb[_0x3342('0x9f')][_0x3342('0xa2')]({'attributes':['id'],'raw':!![]})['then'](function(_0x502050){if(_['isEmpty'](_0x502050)){_0x59088e[_0x3342('0x87')](_0x3342('0xa3'));_0x49e3c6[_0x3342('0x87')]('i.ChatWebsiteId\x20IS\x20NULL');}else{_0x59088e[_0x3342('0x87')](_0x3342('0x88'),_[_0x3342('0x48')](_0x502050,'id'));_0x49e3c6[_0x3342('0x87')](_0x3342('0x88'),_[_0x3342('0x48')](_0x502050,'id'));}});})['then'](function(){if(_0x414fcb[_0x3342('0x9f')]['role']==='agent'&&!_0x3cc92a&&!_0x414fcb['query'][_0x3342('0x86')])return[];return db[_0x3342('0xa4')]['query'](_0x59088e[_0x3342('0xa5')](),_0x592122);})[_0x3342('0x20')](function(_0x55049d){_0x283ce9[_0x3342('0x2e')]=_0x55049d[_0x3342('0x52')];if(_0x283ce9[_0x3342('0x2e')]===0x0)return[];return db[_0x3342('0xa4')][_0x3342('0x4d')](_0x43c27a[_0x3342('0xa5')](),_0x592122)[_0x3342('0x20')](function(_0x132ef4){_0x24d543=_['keyBy'](_0x132ef4,'id');_0x592122=_[_0x3342('0x3d')](_0x592122,{'model':db[_0x3342('0x49')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x414fcb[_0x3342('0x4d')][_0x3342('0xa6')]){_0x15eb49[_0x3342('0x51')][_0x3342('0x44')](function(_0x2d2902){_0x49e3c6['field']('i.'+_0x2d2902);});}else{_0x49e3c6['field'](_0x3342('0xa7'),_0x3342('0x70'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xa8'),_0x3342('0xa9'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xaa'),'Account.mandatoryDisposition');_0x49e3c6[_0x3342('0x58')](_0x3342('0xab'),_0x3342('0xac'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xad'));_0x49e3c6['field'](_0x3342('0xae'),_0x3342('0xaf'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xb0'),'Contact.lastName');_0x49e3c6[_0x3342('0x58')](_0x3342('0xb1'),_0x3342('0xb2'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xb3'),_0x3342('0xb4'));_0x49e3c6[_0x3342('0x58')]('c.mobile','Contact.mobile');_0x49e3c6[_0x3342('0x58')]('c.fax',_0x3342('0xb5'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xb6'),_0x3342('0xb7'));_0x49e3c6[_0x3342('0x58')]('o.internal',_0x3342('0xb8'));_0x49e3c6[_0x3342('0x58')](_0x3342('0xb9'),'TagIds');}if(_0x15eb49['limit'])_0x49e3c6[_0x3342('0x2d')](_0x15eb49[_0x3342('0x2d')]);if(_0x15eb49[_0x3342('0x2b')])_0x49e3c6[_0x3342('0x2b')](_0x15eb49[_0x3342('0x2b')]);return db[_0x3342('0xa4')][_0x3342('0x4d')](_0x49e3c6[_0x3342('0xa5')](),_0x592122);})[_0x3342('0x20')](function(_0x304dd0){if(_0x304dd0[_0x3342('0x52')]>0x0)_0x1d5001[_0x3342('0x87')]('ui.ChatInteractionId\x20IN\x20?',_['map'](_0x304dd0,'id'));return db['sequelize'][_0x3342('0x4d')](_0x1d5001[_0x3342('0xa5')](),_0x592122)[_0x3342('0x20')](function(_0x405995){var _0x31bf5c=_['groupBy'](_0x405995,_0x3342('0xba'));var _0x1f98b5=[];_0x304dd0[_0x3342('0x44')](function(_0x537b31){_0x1f98b5[_0x3342('0x45')](updateChatInteraction(_0x537b31,_0x24d543,_0x31bf5c));});return BPromise[_0x3342('0xbb')](_0x1f98b5);});});})['then'](function(_0x501e72){_0x283ce9[_0x3342('0xbc')]=_0x501e72;return _0x283ce9;})[_0x3342('0x20')](respondWithFilteredResult(_0x5e24a1,_0x15eb49))[_0x3342('0x46')](handleError(_0x5e24a1,null));};exports[_0x3342('0xbd')]=function(_0x475ee4,_0x51b0f9){var _0x48cb53={'raw':![],'where':{'id':_0x475ee4[_0x3342('0xbe')]['id']}},_0x37fdc5={};_0x37fdc5[_0x3342('0x4c')]=_[_0x3342('0x4e')](db[_0x3342('0x49')][_0x3342('0xbf')]);_0x37fdc5[_0x3342('0x4d')]=_['keys'](_0x475ee4['query']);_0x37fdc5['filters']=_[_0x3342('0x50')](_0x37fdc5['model'],_0x37fdc5['query']);_0x48cb53['attributes']=_[_0x3342('0x50')](_0x37fdc5[_0x3342('0x4c')],qs['fields'](_0x475ee4[_0x3342('0x4d')]['fields']));_0x48cb53['attributes']=_0x48cb53[_0x3342('0x51')]['length']?_0x48cb53[_0x3342('0x51')]:_0x37fdc5[_0x3342('0x4c')];if(_0x475ee4[_0x3342('0x4d')][_0x3342('0xc0')]){_0x48cb53[_0x3342('0xc1')]=[{'all':!![]}];}_0x48cb53=_[_0x3342('0x3d')]({},_0x48cb53,_0x475ee4['options']);return db[_0x3342('0x49')][_0x3342('0x6f')](_0x48cb53)[_0x3342('0x20')](handleEntityNotFound(_0x51b0f9,null))['then'](respondWithResult(_0x51b0f9,null))[_0x3342('0x46')](handleError(_0x51b0f9,null));};exports[_0x3342('0xc2')]=function(_0x3b206a,_0x1f7b91){return db[_0x3342('0x49')][_0x3342('0xc2')](_0x3b206a['body'],{})[_0x3342('0x20')](respondWithResult(_0x1f7b91,0xc9))[_0x3342('0x46')](handleError(_0x1f7b91,null));};exports[_0x3342('0x35')]=function(_0x3b875e,_0x441c2a){if(_0x3b875e['body']['id']){delete _0x3b875e[_0x3342('0x3e')]['id'];}return db[_0x3342('0x49')][_0x3342('0x6f')]({'where':{'id':_0x3b875e[_0x3342('0xbe')]['id']}})['then'](handleEntityNotFound(_0x441c2a,null))[_0x3342('0x20')](saveUpdates(_0x3b875e['body'],null))[_0x3342('0x20')](respondWithResult(_0x441c2a,null))[_0x3342('0x46')](handleError(_0x441c2a,null));};exports[_0x3342('0x36')]=function(_0x4f4819,_0x1e67a4){return db['ChatInteraction'][_0x3342('0x6f')]({'where':{'id':_0x4f4819['params']['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x1e67a4,null))[_0x3342('0x20')](removeEntity(_0x1e67a4,null))[_0x3342('0x46')](handleError(_0x1e67a4,null));};exports['describe']=function(_0x25b867,_0x3a6d87){return db[_0x3342('0x49')][_0x3342('0xc3')]()[_0x3342('0x20')](respondWithResult(_0x3a6d87,null))[_0x3342('0x46')](handleError(_0x3a6d87,null));};exports[_0x3342('0xc4')]=function(_0x4d86c3,_0x296ae6){var _0x2d7ba8=_0x4d86c3[_0x3342('0xbe')]['id'];var _0x526a1a;var _0x27aa50;var _0x3c0eb8;return db[_0x3342('0x49')][_0x3342('0xc5')]({'where':{'id':_0x2d7ba8}})[_0x3342('0x20')](function(_0x157c6d){_0x526a1a=_0x157c6d;return db[_0x3342('0xc6')][_0x3342('0xc5')]({'where':{'id':_0x157c6d['ChatWebsiteId']},'attributes':['id',_0x3342('0xc7'),_0x3342('0xc8'),'vidaooTopic',_0x3342('0xc9'),_0x3342('0xca')],'raw':!![]});})[_0x3342('0x20')](function(_0x1e26f8){if(_0x1e26f8&&_0x1e26f8[_0x3342('0xc7')]&&_0x1e26f8[_0x3342('0xc8')]){_0x27aa50=_0x1e26f8;var _0x3c371b={'interaction':{'id':_0x2d7ba8},'agent':{'id':_0x4d86c3[_0x3342('0x9f')]['id'],'name':_0x4d86c3[_0x3342('0x9f')][_0x3342('0x3a')],'fullname':_0x4d86c3[_0x3342('0x9f')]['fullname'],'email':_0x4d86c3['user'][_0x3342('0xcb')]},'contact':_0x4d86c3[_0x3342('0x3e')][_0x3342('0xcc')],'account':_0x4d86c3[_0x3342('0x3e')][_0x3342('0x40')]};var _0x1bed4c={'rejectUnauthorized':![],'method':_0x3342('0xcd'),'url':_0x3342('0xce'),'headers':{'X-APIKEY':_0x1e26f8[_0x3342('0xc7')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x4d86c3[_0x3342('0x9f')][_0x3342('0xcb')]],'buttons':null,'topic':_0x27aa50[_0x3342('0xcf')],'note':_[_0x3342('0xd0')](_0x27aa50[_0x3342('0xc9')])?null:getMustacheRender(_0x27aa50[_0x3342('0xc9')],_0x3c371b),'metadata':null},'redirect':_0x3342('0xd1'),'json':!![]};try{if(!_['isNull'](_0x27aa50['vidaooMetadata'])){var _0x399d30=getMustacheRender(_0x27aa50[_0x3342('0xca')],_0x3c371b);var _0x4fcb8d=JSON[_0x3342('0x8b')](_0x399d30);_0x1bed4c[_0x3342('0x3e')]['metadata']=_0x4fcb8d;}}catch(_0x455b2d){throw new db['Sequelize'][(_0x3342('0xd2'))](_0x3342('0xd3'));}return rp(_0x1bed4c);}else{throw new db[(_0x3342('0xd4'))][(_0x3342('0xd2'))](_0x3342('0xd5'));}})[_0x3342('0x20')](function(_0x8f9e69){_0x3c0eb8=_0x8f9e69;if(_0x3c0eb8['id']){var _0x31014e={'body':_0x3c0eb8[_0x3342('0xd6')],'ChatWebsiteId':_0x27aa50['id'],'ChatInteractionId':_0x526a1a['id'],'direction':'out','UserId':_0x4d86c3['user']['id']};return db['ChatMessage'][_0x3342('0xc2')](_0x31014e,{});}else{throw new db[(_0x3342('0xd4'))]['ValidationError'](_0x3342('0xd7'));}})[_0x3342('0x20')](function(){return _0x526a1a[_0x3342('0xd8')]({'vidaooSessionId':_0x3c0eb8['id']});})[_0x3342('0x20')](respondWithResult(_0x296ae6,null))['catch'](handleError(_0x296ae6,null));};exports[_0x3342('0xd9')]=function(_0x2d38a7,_0x5dbba5){if(_0x2d38a7['body']['id']){delete _0x2d38a7[_0x3342('0x3e')]['id'];}return db[_0x3342('0x49')][_0x3342('0x6f')]({'where':{'id':_0x2d38a7[_0x3342('0xbe')]['id']},'include':[{'model':db[_0x3342('0xda')],'as':_0x3342('0x75')}]})['then'](handleEntityNotFound(_0x5dbba5,null))['then'](saveUpdates(_0x2d38a7[_0x3342('0x3e')],null))[_0x3342('0x20')](respondWithResult(_0x5dbba5,null))[_0x3342('0x46')](handleError(_0x5dbba5,null));};exports[_0x3342('0xdb')]=function(_0x1b87a7,_0x50b51b,_0x50470b){if(_0x1b87a7['body']['id']){delete _0x1b87a7[_0x3342('0x3e')]['id'];}return db['ChatInteraction'][_0x3342('0x6f')]({'where':{'id':_0x1b87a7[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](function(_0x24b50f){if(!_0x24b50f){logger[_0x3342('0x26')](_0x3342('0xdc'),_0x3342('0xdb'),0x194,_0x3342('0xdd'));_0x50b51b[_0x3342('0x38')](0x194);}else{if(_0x24b50f[_0x3342('0x83')]){throw new db[(_0x3342('0xd4'))][(_0x3342('0xd2'))]('Interaction\x20already\x20assigned');}}return _0x24b50f;})[_0x3342('0x20')](function(_0x32a488){if(_0x32a488){return _0x32a488[_0x3342('0x35')]({'closed':_0x1b87a7[_0x3342('0x3e')][_0x3342('0xde')],'disposition':_0x1b87a7[_0x3342('0x3e')][_0x3342('0xdf')]})[_0x3342('0x20')](function(_0x28bb21){return _0x28bb21;});}})[_0x3342('0x20')](function(_0x40aa4a){return respondWithRpcPromise(_0x3342('0xe0'),'abandon',_0x1b87a7[_0x3342('0x3e')],client9004);})[_0x3342('0x20')](respondWithResult(_0x50b51b,null))['catch'](handleError(_0x50b51b,null));};exports[_0x3342('0xe1')]=function(_0x78daec,_0x7b7120,_0x512838){_0x78daec[_0x3342('0x3e')][_0x3342('0x3a')]=_0x78daec[_0x3342('0xe2')][_0x3342('0xe3')];_0x78daec[_0x3342('0x3e')][_0x3342('0xe4')]=_0x78daec['file'][_0x3342('0xe5')];_0x78daec[_0x3342('0x3e')][_0x3342('0x4a')]=_0x78daec[_0x3342('0xe2')]['mimetype'];return db[_0x3342('0xe6')]['create'](_0x78daec['body'])[_0x3342('0x20')](respondWithResult(_0x7b7120,0xc9))[_0x3342('0x46')](handleError(_0x7b7120,null));};exports[_0x3342('0xe7')]=function(_0x22ac7c,_0x4726ab,_0x14a236){return db[_0x3342('0x49')][_0x3342('0xc5')]({'where':{'id':_0x22ac7c[_0x3342('0xbe')]['id']},'raw':!![]})[_0x3342('0x20')](handleEntityNotFound(_0x4726ab,null))['then'](function(_0x58bcc3){if(_0x58bcc3){if(_0x58bcc3[_0x3342('0xde')]){return _0x4726ab[_0x3342('0x2f')](0x193)['json']({'status':0x193,'message':_0x3342('0xe8')});}return db['Attachment'][_0x3342('0xc5')]({'where':{'id':_0x22ac7c[_0x3342('0x4d')][_0x3342('0xe9')]},'raw':!![]})['then'](handleEntityNotFound(_0x4726ab,null));}})['then'](function(_0x328f06){if(_0x328f06){var _0x2a2c38=_0x328f06[_0x3342('0xea')]!==null;var _0x41146b=path['join'](config['root'],_0x3342('0xeb'));if(_0x2a2c38){_0x41146b=path['join'](_0x41146b,_0x3342('0xec'));}var _0xcd0550=path[_0x3342('0xed')](_0x41146b,_0x328f06[_0x3342('0xe4')]);return _0x4726ab[_0x3342('0xee')](_0xcd0550);}})['catch'](handleError(_0x4726ab,null));};exports['close']=function(_0x214ff3,_0x584c31){var _0x6ea059=null;var _0x521e5a=null;var _0x5cc2ef=null;var _0x59c56a=null;if(_0x214ff3['body']['id']){delete _0x214ff3[_0x3342('0x3e')]['id'];}if(_0x214ff3[_0x3342('0x3e')]['mailTranscript']){_0x59c56a=path['join'](config[_0x3342('0xef')],_0x3342('0xf0'),util[_0x3342('0xf1')]('transcript-%s.txt',Date[_0x3342('0xf2')]()));_0x214ff3[_0x3342('0x3e')][_0x3342('0xf3')]=_0x59c56a;}return db[_0x3342('0x49')]['find']({'where':{'id':_0x214ff3[_0x3342('0xbe')]['id']},'include':[{'model':db['ChatMessage'],'as':_0x3342('0xf4'),'include':[{'model':db[_0x3342('0x81')],'as':_0x3342('0x81')}]}]})['then'](handleEntityNotFound(_0x584c31,null))[_0x3342('0x20')](saveUpdates(_0x214ff3['body'],null))[_0x3342('0x20')](function(_0xf61be3){if(_0xf61be3){_0x6ea059=_0xf61be3;return db[_0x3342('0xc6')][_0x3342('0x6f')]({'where':{'id':_0x6ea059[_0x3342('0x86')]}});}})[_0x3342('0x20')](function(_0x322dd2){if(_0x322dd2){_0x5cc2ef=_0x322dd2;return db[_0x3342('0xda')][_0x3342('0x6f')]({'where':{'id':_0x6ea059['ContactId']}});}})[_0x3342('0x20')](function(_0x45bd80){if(_0x45bd80){_0x521e5a=_0x45bd80;if(_0x59c56a){var _0x35c575=null;for(var _0x1df1cb=0x1;_0x1df1cb<_0x6ea059[_0x3342('0xf4')]['length'];++_0x1df1cb){_0x35c575=_0x6ea059['Messages'][_0x1df1cb];var _0x4cb2f5=_0x35c575[_0x3342('0x83')]?util[_0x3342('0xf1')](_0x3342('0xf5'),_0x5cc2ef['agentAlias'],_0x35c575[_0x3342('0x83')]):_0x3342('0xf6');var _0x6d520a=_0x214ff3['body'][_0x3342('0xf7')]||util['format'](_0x3342('0xf5'),_0x3342('0xf8'),_0x35c575[_0x3342('0x7c')]);switch(_0x5cc2ef[_0x3342('0xf9')]){case _0x3342('0xfa'):_0x4cb2f5=_0x35c575['UserId']?util[_0x3342('0xf1')](_0x3342('0xf5'),_0x5cc2ef[_0x3342('0xfb')],_0x35c575['UserId']):_0x3342('0xf6');break;case _0x3342('0xfc'):_0x4cb2f5=_0x35c575[_0x3342('0x83')]?_0x35c575[_0x3342('0x81')]['alias']||_0x35c575[_0x3342('0x81')][_0x3342('0x42')]:_0x3342('0xf6');break;case _0x3342('0xfd'):_0x4cb2f5=_0x35c575[_0x3342('0x83')]?_0x35c575['User'][_0x3342('0x42')]:'System';break;default:_0x4cb2f5=_0x35c575[_0x3342('0x83')]?util[_0x3342('0xf1')](_0x3342('0xf5'),_0x5cc2ef[_0x3342('0xfb')],_0x35c575['UserId']):_0x3342('0xf6');}var _0x3b0ae0=util[_0x3342('0xf1')](_0x3342('0xfe'),moment(_0x35c575['createdAt'])[_0x3342('0xf1')]('MM/DD/YYYY\x20HH:mm:ss'),_0x35c575[_0x3342('0xff')]==='in'?_0x6d520a:_0x4cb2f5,_0x35c575[_0x3342('0x3e')]);if(!_0x35c575['secret']){fs[_0x3342('0x100')](_0x59c56a,_0x3b0ae0);}}return db['MailAccount'][_0x3342('0xc5')]({'where':{'service':!![]},'include':[{'model':db[_0x3342('0x101')],'as':_0x3342('0x102'),'raw':!![]}]});}}})[_0x3342('0x20')](function(_0x1f6d84){if(_0x1f6d84&&_0x1f6d84[_0x3342('0x102')]&&_0x214ff3[_0x3342('0x3e')]){var _0x34e824={'tls':{'rejectUnauthorized':![]}};if(_0x1f6d84[_0x3342('0x102')][_0x3342('0x103')]){_0x34e824[_0x3342('0x103')]=_0x1f6d84['Smtp'][_0x3342('0x103')];}else{_0x34e824[_0x3342('0x104')]=_0x1f6d84[_0x3342('0x102')]['host'];_0x34e824['port']=_0x1f6d84[_0x3342('0x102')]['port'];_0x34e824[_0x3342('0x105')]=_0x1f6d84[_0x3342('0x102')][_0x3342('0x105')];}if(_0x1f6d84[_0x3342('0x102')][_0x3342('0x106')]){_0x34e824[_0x3342('0x107')]={'user':_0x1f6d84[_0x3342('0x102')][_0x3342('0x9f')],'pass':_0x1f6d84['Smtp'][_0x3342('0x108')]};}return respondWithRpcPromise(_0x3342('0x109'),'sendMail',{'account':_0x34e824,'message':{'from':util[_0x3342('0xf1')](_0x3342('0x10a'),_0x1f6d84[_0x3342('0x3a')],_0x1f6d84['email']||_0x1f6d84['Smtp'][_0x3342('0x9f')]),'to':_0x214ff3[_0x3342('0x3e')][_0x3342('0x10b')],'subject':'Mail\x20Transcript','text':util[_0x3342('0xf1')](_0x3342('0x10c'),_0x214ff3[_0x3342('0x3e')]['mailTranscript']),'attachments':[{'path':_0x59c56a}]}})[_0x3342('0x20')](function(){return _0x6ea059;})['catch'](function(_0x4ccbbe){console[_0x3342('0x26')](_0x4ccbbe);});}else{return _0x6ea059;}})[_0x3342('0x20')](respondWithStatusCode(_0x584c31,0xc8))[_0x3342('0x46')](handleError(_0x584c31,null));};exports[_0x3342('0x10d')]=function(_0x41e521,_0x1ab46b,_0x592f9b){return db[_0x3342('0x10e')][_0x3342('0x6f')]({'where':{'id':_0x41e521[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x1ab46b,null))[_0x3342('0x20')](function(_0x3bb70b){if(_0x3bb70b){return _0x3bb70b[_0x3342('0x10d')](_0x41e521[_0x3342('0x3e')][_0x3342('0x10f')],_[_0x3342('0x110')](_0x41e521[_0x3342('0x3e')],['ids','id'])||{});}})['then'](respondWithResult(_0x1ab46b,null))['catch'](handleError(_0x1ab46b,null));};exports[_0x3342('0x111')]=function(_0x2b46c5,_0x203409,_0x242c31){var _0x87fe8={'raw':![],'where':{}};var _0x3d594c={};var _0x4ea5cf={'count':0x0,'rows':[]};return db[_0x3342('0x49')]['findOne']({'where':{'id':_0x2b46c5[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x203409,null))[_0x3342('0x20')](function(_0x7b2e55){if(_0x7b2e55){_0x3d594c[_0x3342('0x4c')]=_[_0x3342('0x4e')](db[_0x3342('0x10e')][_0x3342('0xbf')]);_0x3d594c['query']=_[_0x3342('0x4e')](_0x2b46c5[_0x3342('0x4d')]);_0x3d594c[_0x3342('0x4f')]=_[_0x3342('0x50')](_0x3d594c['model'],_0x3d594c['query']);_0x87fe8[_0x3342('0x51')]=_['intersection'](_0x3d594c[_0x3342('0x4c')],qs[_0x3342('0xa6')](_0x2b46c5[_0x3342('0x4d')][_0x3342('0xa6')]));_0x87fe8[_0x3342('0x51')]=_0x87fe8[_0x3342('0x51')][_0x3342('0x52')]?_0x87fe8[_0x3342('0x51')]:_0x3d594c['model'];if(!_0x2b46c5[_0x3342('0x4d')][_0x3342('0x53')](_0x3342('0x54'))){_0x87fe8['limit']=qs[_0x3342('0x2d')](_0x2b46c5[_0x3342('0x4d')][_0x3342('0x2d')]);_0x87fe8[_0x3342('0x2b')]=qs[_0x3342('0x2b')](_0x2b46c5[_0x3342('0x4d')]['offset']);}_0x87fe8[_0x3342('0x55')]=qs[_0x3342('0x56')](_0x2b46c5[_0x3342('0x4d')][_0x3342('0x56')]);_0x87fe8['where']=qs['filters'](_[_0x3342('0x57')](_0x2b46c5[_0x3342('0x4d')],_0x3d594c[_0x3342('0x4f')]));_0x87fe8['where'][_0x3342('0xba')]=_0x7b2e55['id'];if(_0x2b46c5[_0x3342('0x4d')]['filter']){_0x87fe8[_0x3342('0x87')]=_[_0x3342('0x3d')](_0x87fe8[_0x3342('0x87')],{'$or':_[_0x3342('0x48')](_0x87fe8[_0x3342('0x51')],function(_0x1f9706){var _0x422e17={};_0x422e17[_0x1f9706]={'$like':'%'+_0x2b46c5[_0x3342('0x4d')][_0x3342('0x93')]+'%'};return _0x422e17;})});}if(_0x2b46c5['query'][_0x3342('0x8c')]){var _0x109c2c=_0x2b46c5[_0x3342('0x4d')][_0x3342('0x8c')][_0x3342('0x78')](',');var _0x891df3={};_0x891df3[_0x109c2c[0x0]]={'$gte':moment(_0x109c2c[0x1])[_0x3342('0xf1')](_0x3342('0x112'))};_0x87fe8[_0x3342('0x87')]=_[_0x3342('0x3d')](_0x87fe8[_0x3342('0x87')],_0x891df3);}_0x87fe8=_[_0x3342('0x3d')]({},_0x87fe8,_0x2b46c5[_0x3342('0x113')]);return db[_0x3342('0x10e')][_0x3342('0x2e')]({'where':_0x87fe8[_0x3342('0x87')]})[_0x3342('0x20')](function(_0x2dcc44){_0x4ea5cf[_0x3342('0x2e')]=_0x2dcc44;if(_0x2b46c5[_0x3342('0x4d')][_0x3342('0xc0')]){_0x87fe8['include']=[{'all':!![]}];}return db[_0x3342('0x10e')][_0x3342('0x114')](_0x87fe8);})[_0x3342('0x20')](function(_0x34b9bd){_0x4ea5cf['rows']=_0x34b9bd;return _0x4ea5cf;});}})[_0x3342('0x20')](respondWithFilteredResult(_0x203409,_0x87fe8))['catch'](handleError(_0x203409,null));};exports[_0x3342('0x115')]=function(_0x53e73b,_0x51f592,_0x8fc042){var _0x43bf9a={'where':{}},_0x12693e={},_0x564ecb={'count':0x0,'rows':[]};return db[_0x3342('0x49')][_0x3342('0xc5')]({'where':{'id':_0x53e73b[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x51f592,null))[_0x3342('0x20')](function(_0x7b2d65){if(_0x7b2d65){_0x12693e[_0x3342('0x4c')]=_['keys'](db[_0x3342('0x10e')]['rawAttributes']);_0x12693e[_0x3342('0x4d')]=_[_0x3342('0x4e')](_0x53e73b[_0x3342('0x4d')]);_0x12693e['filters']=_[_0x3342('0x50')](_0x12693e[_0x3342('0x4c')],_0x12693e[_0x3342('0x4d')]);_0x43bf9a[_0x3342('0x51')]=_[_0x3342('0x50')](_0x12693e[_0x3342('0x4c')],qs[_0x3342('0xa6')](_0x53e73b['query'][_0x3342('0xa6')]));_0x43bf9a[_0x3342('0x51')]=_0x43bf9a[_0x3342('0x51')][_0x3342('0x52')]?_0x43bf9a[_0x3342('0x51')]:_0x12693e[_0x3342('0x4c')];if(!_0x53e73b['query'][_0x3342('0x53')](_0x3342('0x54'))){_0x43bf9a['limit']=qs['limit'](_0x53e73b[_0x3342('0x4d')][_0x3342('0x2d')]);_0x43bf9a[_0x3342('0x2b')]=qs['offset'](_0x53e73b[_0x3342('0x4d')][_0x3342('0x2b')]);}_0x43bf9a[_0x3342('0x55')]=qs[_0x3342('0x56')](_0x53e73b['query'][_0x3342('0x56')]);_0x43bf9a['where']=qs['filters'](_[_0x3342('0x57')](_0x53e73b[_0x3342('0x4d')],_0x12693e['filters']));_0x43bf9a[_0x3342('0x87')][_0x3342('0xba')]=_0x7b2d65['id'];if(_0x53e73b[_0x3342('0x4d')][_0x3342('0x93')]){_0x43bf9a['where']=_[_0x3342('0x3d')](_0x43bf9a[_0x3342('0x87')],{'$or':_[_0x3342('0x48')](_0x43bf9a[_0x3342('0x51')],function(_0x1af0ab){var _0x2c36b6={};_0x2c36b6[_0x1af0ab]={'$like':'%'+_0x53e73b[_0x3342('0x4d')][_0x3342('0x93')]+'%'};return _0x2c36b6;})});}_0x43bf9a['where']['secret']=![];if(_0x53e73b[_0x3342('0x4d')]['id']){_0x43bf9a[_0x3342('0x87')]['id']={'$gt':_0x53e73b[_0x3342('0x4d')]['id']};}_0x43bf9a=_[_0x3342('0x3d')]({},_0x43bf9a,_0x53e73b['options']);return db['ChatMessage'][_0x3342('0x2e')]({'where':_0x43bf9a['where']})[_0x3342('0x20')](function(_0x408c0b){_0x564ecb[_0x3342('0x2e')]=_0x408c0b;_0x43bf9a[_0x3342('0xc1')]=[];if(_0x53e73b[_0x3342('0x4d')]['includeAgent']){_0x43bf9a[_0x3342('0xc1')][_0x3342('0x45')]({'model':db[_0x3342('0x81')],'as':_0x3342('0x81'),'attributes':['id',_0x3342('0x42'),_0x3342('0x116')]});}if(_0x53e73b[_0x3342('0x4d')][_0x3342('0xc0')]){_0x43bf9a[_0x3342('0xc1')]=[{'all':!![]}];}return db[_0x3342('0x10e')]['findAll'](_0x43bf9a);})[_0x3342('0x20')](function(_0x4ee731){_0x564ecb[_0x3342('0xbc')]=_0x4ee731;return _0x564ecb;});}})[_0x3342('0x20')](respondWithFilteredResult(_0x51f592,_0x43bf9a))[_0x3342('0x46')](handleError(_0x51f592,null));};exports[_0x3342('0x117')]=function(_0x13846a,_0x35ef7e,_0x65063d){return db[_0x3342('0x49')][_0x3342('0x6f')]({'where':{'id':_0x13846a[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x35ef7e,null))[_0x3342('0x20')](function(_0xb7cc7){if(_0xb7cc7){return _0xb7cc7[_0x3342('0x118')](_0x13846a[_0x3342('0x3e')]['ids'],_[_0x3342('0x110')](_0x13846a[_0x3342('0x3e')],['ids','id'])||{})[_0x3342('0x119')](function(){return db[_0x3342('0x7f')][_0x3342('0x114')]({'attributes':['id',_0x3342('0x3a'),_0x3342('0x59')],'where':{'id':_0x13846a[_0x3342('0x3e')][_0x3342('0x10f')]}});})[_0x3342('0x20')](function(_0x178c5d){socket[_0x3342('0x11a')](_0x3342('0x11b'),{'id':Number(_0x13846a[_0x3342('0xbe')]['id']),'tags':_0x178c5d||[]});return{'id':Number(_0x13846a[_0x3342('0xbe')]['id']),'tags':_0x178c5d||[]};});}})['then'](respondWithResult(_0x35ef7e,null))[_0x3342('0x46')](handleError(_0x35ef7e,null));};exports[_0x3342('0x11c')]=function(_0x667da3,_0x4a26c4,_0x3d4b1d){return db['ChatInteraction']['find']({'where':{'id':_0x667da3[_0x3342('0xbe')]['id']}})[_0x3342('0x20')](handleEntityNotFound(_0x4a26c4,null))[_0x3342('0x20')](function(_0x91b50b){if(_0x91b50b){return _0x91b50b[_0x3342('0x11c')](_0x667da3['query']['ids']);}})[_0x3342('0x20')](respondWithStatusCode(_0x4a26c4,null))[_0x3342('0x46')](handleError(_0x4a26c4,null));};exports[_0x3342('0xee')]=function(_0x4d7c61,_0x13d5ae){var _0x18e629=moment()['unix']()[_0x3342('0xa5')]();var _0x11f4c7=path[_0x3342('0xed')](config[_0x3342('0xef')],_0x3342('0x11d'),'files','tmp');var _0x20f322=path[_0x3342('0xed')](config[_0x3342('0xef')],_0x3342('0x11d'),'files',_0x3342('0x11e'));var _0xd16f=path[_0x3342('0xed')](_0x11f4c7,_0x18e629);var _0x5b2c37=util[_0x3342('0xf1')](_0x3342('0x11f'),_0x4d7c61[_0x3342('0xbe')]['id'],_0x18e629);var _0x212ec9=path[_0x3342('0xed')](_0x11f4c7,_0x5b2c37);var _0x143b82=[];_0x143b82[_0x3342('0x45')]({'model':db[_0x3342('0x81')],'as':_0x3342('0x81'),'attributes':['id',_0x3342('0x42')],'raw':!![]});_0x143b82[_0x3342('0x45')]({'model':db[_0x3342('0xda')],'as':_0x3342('0x75'),'attributes':['id',_0x3342('0x120'),'lastName'],'raw':!![]});if(_0x4d7c61[_0x3342('0x4d')][_0x3342('0x11e')]){_0x143b82[_0x3342('0x45')]({'model':db[_0x3342('0xe6')],'as':_0x3342('0xe6'),'raw':!![]});}var _0x49b963=[{'model':db[_0x3342('0x10e')],'as':_0x3342('0xf4'),'attributes':['id',_0x3342('0x3e'),'createdAt',_0x3342('0xff'),_0x3342('0x121'),_0x3342('0x122')],'include':_0x143b82}];_0x49b963[_0x3342('0x45')]({'model':db[_0x3342('0xc6')],'as':_0x3342('0x123'),'attributes':['id',_0x3342('0x3a')]});_0x49b963['push']({'model':db['User'],'as':_0x3342('0x124'),'attributes':['id','fullname']});return db[_0x3342('0x49')][_0x3342('0x6f')]({'where':{'id':_0x4d7c61['params']['id']},'include':_0x49b963})['then'](handleEntityNotFound(_0x13d5ae,null))[_0x3342('0x20')](function(_0x44bc75){if(_0x44bc75){var _0x3c85d2=_0x44bc75[_0x3342('0x125')]({'plain':!![]});fs[_0x3342('0x126')](_0xd16f);var _0x1597da={'channel':_0x3342('0x127'),'account':_0x3c85d2[_0x3342('0x123')][_0x3342('0x3a')],'agent':_0x3c85d2[_0x3342('0x124')]?_0x3c85d2[_0x3342('0x124')]['fullname']:'N.A.','createdAt':moment(_0x3c85d2[_0x3342('0x8a')])[_0x3342('0xf1')]('YYYY-MM-DD\x20HH:mm:ss')[_0x3342('0xa5')](),'closedAt':_0x3c85d2['closed']?moment(_0x3c85d2[_0x3342('0x128')])[_0x3342('0xf1')](_0x3342('0x112'))[_0x3342('0xa5')]():'','disposition':_0x3c85d2[_0x3342('0xdf')],'chatInfo':{'browser':_0x3c85d2['browserName'],'os':_0x3c85d2[_0x3342('0x129')],'referer':_0x3c85d2['referer'],'customerIp':_0x3c85d2[_0x3342('0x12a')],'customerPort':_0x3c85d2['customerPort']?_0x3c85d2[_0x3342('0x12b')]:'N.A.'},'messages':_(_0x3c85d2[_0x3342('0xf4')])['tail']()[_0x3342('0x93')]({'secret':![]})[_0x3342('0x48')](function(_0xf3c1bb){if(_0xf3c1bb[_0x3342('0xe6')]){var _0x437bb7=path[_0x3342('0xed')](_0x20f322,_0xf3c1bb[_0x3342('0xe6')]['basename']);if(fs[_0x3342('0x12c')](_0x437bb7)){fs['createReadStream'](_0x437bb7)[_0x3342('0x12d')](fs['createWriteStream'](path[_0x3342('0xed')](_0xd16f,_0xf3c1bb['Attachment'][_0x3342('0xe4')])));}}return{'date':moment(_0xf3c1bb[_0x3342('0x8a')])['format'](_0x3342('0x112'))[_0x3342('0xa5')](),'sender':_0xf3c1bb['direction']===_0x3342('0x12e')?_0xf3c1bb[_0x3342('0x81')]?_0xf3c1bb[_0x3342('0x81')][_0x3342('0x42')]:'System':_0xf3c1bb[_0x3342('0x75')][_0x3342('0x120')]+(_0xf3c1bb['Contact'][_0x3342('0x12f')]?'\x20'+_0xf3c1bb[_0x3342('0x75')][_0x3342('0x12f')]:''),'body':_0xf3c1bb['Attachment']?_0xf3c1bb['Attachment'][_0x3342('0xe4')]:_0xf3c1bb[_0x3342('0x3e')],'direction':_0xf3c1bb['direction']===_0x3342('0x12e')?'A':'C','secret':_0xf3c1bb['secret'],'read':_0xf3c1bb[_0x3342('0x122')],'attachment':_0xf3c1bb[_0x3342('0xe6')]};})['value']()};return ejs[_0x3342('0x130')](path[_0x3342('0xed')](config[_0x3342('0xef')],_0x3342('0x11d'),'views',_0x3342('0x131')),{'interaction':_0x1597da})[_0x3342('0x20')](function(_0x267752){var _0x47bdd3=path[_0x3342('0xed')](_0xd16f,_0x3342('0x132')+_0x3c85d2['id']+'-'+_0x18e629+_0x3342('0x133'));var _0x5b9ac8={'path':_0x47bdd3,'channel':'Chat','interactionId':_0x3c85d2['id']};return pdf[_0x3342('0x134')](_0x267752,_0x5b9ac8);})[_0x3342('0x20')](function(){return new BPromise(function(_0x567761,_0x17cb20){zipdir(_0xd16f,{'saveTo':_0x212ec9},function(_0x5fbd3c,_0x33a274){if(_0x5fbd3c)return _0x17cb20(_0x5fbd3c);return _0x567761(_0x33a274);});})[_0x3342('0x20')](function(){return new BPromise(function(_0x90ef48,_0x76b760){rimraf(_0xd16f,function(_0x1ec7ff){if(_0x1ec7ff)_0x76b760(_0x1ec7ff);return _0x90ef48();});});})[_0x3342('0x20')](function(){return _0x13d5ae[_0x3342('0xee')](_0x212ec9,_0x5b2c37,function(_0x4f3f28){if(_0x4f3f28){console[_0x3342('0x135')](_0x3342('0x136'),_0x4f3f28);}else{fs[_0x3342('0x137')](_0x212ec9);}});});});}else{return _0x13d5ae[_0x3342('0x38')](0xc8);}})[_0x3342('0x46')](handleError(_0x13d5ae,null));}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js index 70f1ecf..cc9c17e 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 _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 +var _0x889f=['remove','getUsers','setDataValue','Users','map','findAll','unreadMessages','emit','catch','hasOwnProperty','hook','exports','events','ChatInteraction','ChatMessage','save','update'];(function(_0x2fb9c8,_0x342649){var _0x575a17=function(_0x16050f){while(--_0x16050f){_0x2fb9c8['push'](_0x2fb9c8['shift']());}};_0x575a17(++_0x342649);}(_0x889f,0xc7));var _0xf889=function(_0x1e4a8e,_0x18022b){_0x1e4a8e=_0x1e4a8e-0x0;var _0x5408f9=_0x889f[_0x1e4a8e];return _0x5408f9;};'use strict';var EventEmitter=require(_0xf889('0x0'));var ChatInteraction=require('../../mysqldb')['db'][_0xf889('0x1')];var ChatMessage=require('../../mysqldb')['db'][_0xf889('0x2')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf889('0x3'),'afterUpdate':_0xf889('0x4'),'afterDestroy':_0xf889('0x5')};function emitEvent(_0x1b619b){return function(_0xa8ace,_0xf3c7de,_0x5e7c5b){_0xa8ace[_0xf889('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x14caf2){_0xa8ace[_0xf889('0x7')](_0xf889('0x8'),_0x14caf2[_0xf889('0x9')](function(_0x1c31ab){return{'id':_0x1c31ab['id']};}));return ChatMessage[_0xf889('0xa')]({'where':{'ChatInteractionId':_0xa8ace['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0xabc511){_0xa8ace[_0xf889('0x7')](_0xf889('0xb'),_0xabc511['length']);ChatInteractionEvents[_0xf889('0xc')](_0x1b619b+':'+_0xa8ace['id'],_0xa8ace);ChatInteractionEvents[_0xf889('0xc')](_0x1b619b,_0xa8ace);_0x5e7c5b(null);})[_0xf889('0xd')](_0x5e7c5b(null));};}for(var e in events){if(events[_0xf889('0xe')](e)){var event=events[e];ChatInteraction[_0xf889('0xf')](e,emitEvent(event));}}module[_0xf889('0x10')]=ChatInteractionEvents; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js index b8f8444..6782ddb 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 _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 +var _0x13eb=['format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','ChatInteraction','chat_interactions','closedAt'];(function(_0x40fdbb,_0x593eea){var _0x199b36=function(_0x2f516d){while(--_0x2f516d){_0x40fdbb['push'](_0x40fdbb['shift']());}};_0x199b36(++_0x593eea);}(_0x13eb,0x102));var _0xb13e=function(_0x3f8f5c,_0x461c6e){_0x3f8f5c=_0x3f8f5c-0x0;var _0x51f351=_0x13eb[_0x3f8f5c];return _0x51f351;};'use strict';var _=require(_0xb13e('0x0'));var util=require('util');var logger=require(_0xb13e('0x1'))(_0xb13e('0x2'));var moment=require(_0xb13e('0x3'));var BPromise=require(_0xb13e('0x4'));var rp=require(_0xb13e('0x5'));var fs=require('fs');var path=require(_0xb13e('0x6'));var rimraf=require(_0xb13e('0x7'));var config=require(_0xb13e('0x8'));var attributes=require('./chatInteraction.attributes');module[_0xb13e('0x9')]=function(_0x44aeb5,_0x1fa8cd){return _0x44aeb5[_0xb13e('0xa')](_0xb13e('0xb'),attributes,{'tableName':_0xb13e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5e3630,_0x45b84d,_0x20eadb){if(_0x5e3630['changed']('closed')){_0x5e3630[_0xb13e('0xd')]=moment()[_0xb13e('0xe')](_0xb13e('0xf'));}_0x20eadb(null,_0x5e3630);}},'charset':'utf8mb4','collate':_0xb13e('0x10')});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js index 263a07e..4eb7a4f 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 _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 +var _0xd50f=['ChatInteraction,\x20%s,\x20%s','message','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','where','limit','find','ids','omit','AddTags','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','then','info','request\x20sent','debug','stringify','error'];(function(_0x10bf6d,_0x4e2c21){var _0x45e6ab=function(_0x51dbfe){while(--_0x51dbfe){_0x10bf6d['push'](_0x10bf6d['shift']());}};_0x45e6ab(++_0x4e2c21);}(_0xd50f,0xc3));var _0xfd50=function(_0x1915b6,_0x740703){_0x1915b6=_0x1915b6-0x0;var _0x575fb3=_0xd50f[_0x1915b6];return _0x575fb3;};'use strict';var _=require('lodash');var util=require(_0xfd50('0x0'));var moment=require(_0xfd50('0x1'));var BPromise=require(_0xfd50('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfd50('0x3'))['db'];var utils=require(_0xfd50('0x4'));var logger=require('../../config/logger')(_0xfd50('0x5'));var config=require(_0xfd50('0x6'));var jayson=require(_0xfd50('0x7'));var client=jayson[_0xfd50('0x8')][_0xfd50('0x9')]({'port':0x232a});config[_0xfd50('0xa')]=_[_0xfd50('0xb')](config[_0xfd50('0xa')],{'host':_0xfd50('0xc'),'port':0x18eb});var socket=require(_0xfd50('0xd'))(new Redis(config[_0xfd50('0xa')]));require(_0xfd50('0xe'))['register'](socket);function respondWithRpcPromise(_0x2bd4c6,_0x98a494,_0x5de087){return new BPromise(function(_0x279fd4,_0x16d686){return client['request'](_0x2bd4c6,_0x5de087)[_0xfd50('0xf')](function(_0xb4d405){logger[_0xfd50('0x10')]('ChatInteraction,\x20%s,\x20%s',_0x98a494,_0xfd50('0x11'));logger[_0xfd50('0x12')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x98a494,_0xfd50('0x11'),JSON[_0xfd50('0x13')](_0xb4d405));if(_0xb4d405[_0xfd50('0x14')]){if(_0xb4d405[_0xfd50('0x14')]['code']===0x1f4){logger[_0xfd50('0x14')](_0xfd50('0x15'),_0x98a494,_0xb4d405[_0xfd50('0x14')]['message']);return _0x16d686(_0xb4d405['error'][_0xfd50('0x16')]);}logger[_0xfd50('0x14')](_0xfd50('0x15'),_0x98a494,_0xb4d405[_0xfd50('0x14')]['message']);return _0x279fd4(_0xb4d405[_0xfd50('0x14')]['message']);}else{logger[_0xfd50('0x10')]('ChatInteraction,\x20%s,\x20%s',_0x98a494,'request\x20sent');_0x279fd4(_0xb4d405['result']['message']);}})[_0xfd50('0x17')](function(_0x2e2b8d){logger['error'](_0xfd50('0x15'),_0x98a494,_0x2e2b8d);_0x16d686(_0x2e2b8d);});});}exports[_0xfd50('0x18')]=function(_0x427d5b){var _0x2548df=this;return new Promise(function(_0x353fc3,_0x219c9b){return db[_0xfd50('0x19')][_0xfd50('0x1a')](_0x427d5b[_0xfd50('0x1b')],{'raw':_0x427d5b[_0xfd50('0x1c')]?_0x427d5b['options'][_0xfd50('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x427d5b[_0xfd50('0x1c')]?_0x427d5b[_0xfd50('0x1c')][_0xfd50('0x1e')]||null:null,'attributes':_0x427d5b[_0xfd50('0x1c')]?_0x427d5b[_0xfd50('0x1c')]['attributes']||null:null,'limit':_0x427d5b[_0xfd50('0x1c')]?_0x427d5b['options'][_0xfd50('0x1f')]||null:null})[_0xfd50('0xf')](function(_0x31e251){logger[_0xfd50('0x10')](_0xfd50('0x18'),_0x427d5b);logger[_0xfd50('0x12')](_0xfd50('0x18'),_0x427d5b,JSON['stringify'](_0x31e251));_0x353fc3(_0x31e251);})[_0xfd50('0x17')](function(_0x5b1e72){logger[_0xfd50('0x14')](_0xfd50('0x18'),_0x5b1e72[_0xfd50('0x16')],_0x427d5b);_0x219c9b(_0x2548df[_0xfd50('0x14')](0x1f4,_0x5b1e72['message']));});});};exports['AddTagsToChatInteraction']=function(_0x1b5c42){return new Promise(function(_0x4d7b5a,_0x575ced){return db['ChatInteraction'][_0xfd50('0x20')]({'where':_0x1b5c42[_0xfd50('0x1c')]?_0x1b5c42['options'][_0xfd50('0x1e')]||null:null})[_0xfd50('0xf')](function(_0x5971ec){if(_0x5971ec){return _0x5971ec['addTags'](_0x1b5c42[_0xfd50('0x1b')][_0xfd50('0x21')],_[_0xfd50('0x22')](_0x1b5c42[_0xfd50('0x1b')],[_0xfd50('0x21'),'id'])||{});}})['spread'](function(_0x10d5d4){logger[_0xfd50('0x10')]('AddTags',_0x1b5c42);logger['debug'](_0xfd50('0x23'),_0x1b5c42,JSON['stringify'](_0x10d5d4));_0x4d7b5a(_0x10d5d4);})[_0xfd50('0x17')](function(_0x10e3e8){logger[_0xfd50('0x14')](_0xfd50('0x23'),_0x10e3e8[_0xfd50('0x16')],_0x1b5c42);_0x575ced(_this[_0xfd50('0x14')](0x1f4,_0x10e3e8[_0xfd50('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js index 61d3a2d..ab02379 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 _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 +var _0x59e7=['save','update','emit','removeListener','length','chatInteraction:'];(function(_0x5d4607,_0x6b5e7b){var _0x5e4a86=function(_0x46891a){while(--_0x46891a){_0x5d4607['push'](_0x5d4607['shift']());}};_0x5e4a86(++_0x6b5e7b);}(_0x59e7,0x1ce));var _0x759e=function(_0x5be4a2,_0x4962fa){_0x5be4a2=_0x5be4a2-0x0;var _0x304b22=_0x59e7[_0x5be4a2];return _0x304b22;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=[_0x759e('0x0'),'remove',_0x759e('0x1')];function createListener(_0x1f73bd,_0x2df172){return function(_0x8573a4){_0x2df172[_0x759e('0x2')](_0x1f73bd,_0x8573a4);};}function removeListener(_0x1a78c4,_0x38d28f){return function(){ChatInteractionEvents[_0x759e('0x3')](_0x1a78c4,_0x38d28f);};}exports['register']=function(_0x32c87c){for(var _0x5a73a5=0x0,_0x1db18a=events[_0x759e('0x4')];_0x5a73a5<_0x1db18a;_0x5a73a5++){var _0xd1b48b=events[_0x5a73a5];var _0x572241=createListener(_0x759e('0x5')+_0xd1b48b,_0x32c87c);ChatInteractionEvents['on'](_0xd1b48b,_0x572241);}}; \ No newline at end of file diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js index 8878809..3da4342 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 _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 +var _0x71ab=['show','/:id/attachment_download','attachmentDownload','/:id/messages','/:id/my_messages','getMyMessages','/:id/download','isAuthenticated','download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','root','server/files/attachments/','format','%s-%s','now','originalname','replace','/:id/attachment_upload','file','addMessage','tracked','chatinteraction:addtags','addTags','put','chat','chatinteraction:update','update','/:id/custom_update','customUpdate','/:id/abandon','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','/:id/tags','exports','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','get','/describe','/:id','isChatInteractionAuthorized'];(function(_0x50b70a,_0x561922){var _0x16295b=function(_0x24c79a){while(--_0x24c79a){_0x50b70a['push'](_0x50b70a['shift']());}};_0x16295b(++_0x561922);}(_0x71ab,0x162));var _0xb71a=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x71ab[_0x465028];return _0xb783d4;};'use strict';var multer=require('multer');var util=require(_0xb71a('0x0'));var path=require(_0xb71a('0x1'));var timeout=require(_0xb71a('0x2'));var express=require(_0xb71a('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xb71a('0x4'));var interaction=require(_0xb71a('0x5'));var config=require('../../config/environment');var controller=require('./chatInteraction.controller');router[_0xb71a('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb71a('0x6')](_0xb71a('0x7'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xb71a('0x8'),auth[_0xb71a('0x9')](),controller[_0xb71a('0xa')]);router['get'](_0xb71a('0xb'),auth['isChatInteractionAuthorized'](),controller[_0xb71a('0xc')]);router[_0xb71a('0x6')](_0xb71a('0xd'),auth['isAuthenticated'](),controller['getMessages']);router[_0xb71a('0x6')](_0xb71a('0xe'),auth[_0xb71a('0x9')](),controller[_0xb71a('0xf')]);router[_0xb71a('0x6')](_0xb71a('0x10'),auth[_0xb71a('0x11')](),controller[_0xb71a('0x12')]);router[_0xb71a('0x13')]('/',auth['isAuthenticated'](),controller[_0xb71a('0x14')]);router['post'](_0xb71a('0x15'),auth[_0xb71a('0x11')](),controller[_0xb71a('0x16')]);var upload=multer({'storage':multer[_0xb71a('0x17')]({'destination':function(_0x453721,_0x47016a,_0x39d611){_0x39d611(null,path['join'](config[_0xb71a('0x18')],_0xb71a('0x19')));},'filename':function(_0x5d3308,_0x2be2a1,_0x3fcd65){_0x3fcd65(null,util[_0xb71a('0x1a')](_0xb71a('0x1b'),Date[_0xb71a('0x1c')](),_0x2be2a1[_0xb71a('0x1d')][_0xb71a('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xb71a('0x13')](_0xb71a('0x1f'),upload['single'](_0xb71a('0x20')),controller['attachmentUpload']);router['post'](_0xb71a('0xd'),auth[_0xb71a('0x9')](),controller[_0xb71a('0x21')]);router[_0xb71a('0x13')]('/:id/tags',auth[_0xb71a('0x11')](),interaction[_0xb71a('0x22')]('chat',_0xb71a('0x23')),controller[_0xb71a('0x24')]);router[_0xb71a('0x25')](_0xb71a('0x8'),auth[_0xb71a('0x11')](),interaction[_0xb71a('0x22')](_0xb71a('0x26'),_0xb71a('0x27')),controller[_0xb71a('0x28')]);router[_0xb71a('0x25')](_0xb71a('0x29'),controller[_0xb71a('0x2a')]);router['put'](_0xb71a('0x2b'),auth[_0xb71a('0x9')](),controller[_0xb71a('0x2c')]);router[_0xb71a('0x25')](_0xb71a('0x2d'),controller[_0xb71a('0x2e')]);router[_0xb71a('0x2f')](_0xb71a('0x8'),auth[_0xb71a('0x11')](),interaction[_0xb71a('0x22')](_0xb71a('0x26'),_0xb71a('0x30')),controller[_0xb71a('0x31')]);router[_0xb71a('0x2f')](_0xb71a('0x32'),auth['isAuthenticated'](),controller['removeTags']);module[_0xb71a('0x33')]=router; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js index 70a1873..bc6ee23 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 _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 +var _0xcbf8=['BOOLEAN','INTEGER','TEXT','medium'];(function(_0x25103f,_0x47163f){var _0x3ca1bf=function(_0x325c99){while(--_0x325c99){_0x25103f['push'](_0x25103f['shift']());}};_0x3ca1bf(++_0x47163f);}(_0xcbf8,0x1c2));var _0x8cbf=function(_0x57af9e,_0x3ab5ec){_0x57af9e=_0x57af9e-0x0;var _0x86d9da=_0xcbf8[_0x57af9e];return _0x86d9da;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0x8cbf('0x0')](_0x8cbf('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0x8cbf('0x2')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x8cbf('0x3')]}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js index 90c0844..7ef1207 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 _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 +var _0xd712=['fullname','role','userpic','online','lastLoginAt','allowmessenger','showWebBar','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','autoAssociation','UserProfileResource','isEmpty','resourceId','push','messages','FromId','ToId','read','-createdAt','all','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','then','destroy','error','stack','name','send','index','map','ChatInternalMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','findAll','rows','catch','params','intersection','includeAll','find','create','body','get','lastMessageAt','createdAt','lastMessage','format','getUsers','User','agent','admin','user'];(function(_0x32f7d7,_0x54231b){var _0x133d09=function(_0x41a7ab){while(--_0x41a7ab){_0x32f7d7['push'](_0x32f7d7['shift']());}};_0x133d09(++_0x54231b);}(_0xd712,0x163));var _0x2d71=function(_0x12d3f1,_0x489cd5){_0x12d3f1=_0x12d3f1-0x0;var _0x2f1991=_0xd712[_0x12d3f1];return _0x2f1991;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2d71('0x0'));var jsonpatch=require(_0x2d71('0x1'));var rp=require(_0x2d71('0x2'));var moment=require(_0x2d71('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x2d71('0x4'));var util=require(_0x2d71('0x5'));var path=require(_0x2d71('0x6'));var sox=require('sox');var csv=require(_0x2d71('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2d71('0x8'));var _=require(_0x2d71('0x9'));var squel=require('squel');var crypto=require(_0x2d71('0xa'));var jsforce=require(_0x2d71('0xb'));var deskjs=require(_0x2d71('0xc'));var toCsv=require(_0x2d71('0x7'));var querystring=require(_0x2d71('0xd'));var Papa=require(_0x2d71('0xe'));var Redis=require(_0x2d71('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x2d71('0x10'));var as=require(_0x2d71('0x11'));var hardwareService=require(_0x2d71('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x2d71('0x13'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x2d71('0x14')]=_['defaults'](config[_0x2d71('0x14')],{'host':_0x2d71('0x15'),'port':0x18eb});var socket=require(_0x2d71('0x16'))(new Redis(config[_0x2d71('0x14')]));require(_0x2d71('0x17'))[_0x2d71('0x18')](socket);function respondWithStatusCode(_0xf35ec3,_0x1066ba){_0x1066ba=_0x1066ba||0xcc;return function(_0x967623){if(_0x967623){return _0xf35ec3[_0x2d71('0x19')](_0x1066ba);}return _0xf35ec3[_0x2d71('0x1a')](_0x1066ba)[_0x2d71('0x1b')]();};}function respondWithResult(_0x27b8ca,_0x1aba81){_0x1aba81=_0x1aba81||0xc8;return function(_0x59480b){if(_0x59480b){return _0x27b8ca[_0x2d71('0x1a')](_0x1aba81)[_0x2d71('0x1c')](_0x59480b);}};}function respondWithFilteredResult(_0x315623,_0x1e6751){return function(_0x5ad29f){if(_0x5ad29f){var _0x27076a=typeof _0x1e6751[_0x2d71('0x1d')]===_0x2d71('0x1e')&&typeof _0x1e6751[_0x2d71('0x1f')]==='undefined';var _0x48cafb=_0x5ad29f[_0x2d71('0x20')];var _0x37ca54=_0x27076a?0x0:_0x1e6751[_0x2d71('0x1d')];var _0x325c0b=_0x27076a?_0x5ad29f[_0x2d71('0x20')]:_0x1e6751['offset']+_0x1e6751[_0x2d71('0x1f')];var _0x301f61;if(_0x325c0b>=_0x48cafb){_0x325c0b=_0x48cafb;_0x301f61=0xc8;}else{_0x301f61=0xce;}_0x315623[_0x2d71('0x1a')](_0x301f61);return _0x315623[_0x2d71('0x21')]('Content-Range',_0x37ca54+'-'+_0x325c0b+'/'+_0x48cafb)['json'](_0x5ad29f);}return null;};}function patchUpdates(_0x1fee2a){return function(_0x39280b){try{jsonpatch[_0x2d71('0x22')](_0x39280b,_0x1fee2a,!![]);}catch(_0xb9e3fe){return BPromise['reject'](_0xb9e3fe);}return _0x39280b[_0x2d71('0x23')]();};}function saveUpdates(_0x2b73b3,_0x280432){return function(_0x3a860b){if(_0x3a860b){return _0x3a860b[_0x2d71('0x24')](_0x2b73b3)[_0x2d71('0x25')](function(_0x2e50fe){return _0x2e50fe;});}return null;};}function removeEntity(_0x59c6a8,_0x3f7fcf){return function(_0x348c59){if(_0x348c59){return _0x348c59[_0x2d71('0x26')]()['then'](function(){_0x59c6a8[_0x2d71('0x1a')](0xcc)[_0x2d71('0x1b')]();});}};}function handleEntityNotFound(_0x346d55,_0x381d6f){return function(_0x3311a9){if(!_0x3311a9){_0x346d55[_0x2d71('0x19')](0x194);}return _0x3311a9;};}function handleError(_0x18a2e2,_0x239079){_0x239079=_0x239079||0x1f4;return function(_0x379879){logger[_0x2d71('0x27')](_0x379879[_0x2d71('0x28')]);if(_0x379879['name']){delete _0x379879[_0x2d71('0x29')];}_0x18a2e2[_0x2d71('0x1a')](_0x239079)[_0x2d71('0x2a')](_0x379879);};}exports[_0x2d71('0x2b')]=function(_0x1afefc,_0x3bdd1a){var _0x41c87c={},_0x227ad7={},_0x53ec4d={'count':0x0,'rows':[]};var _0x4a307c=_[_0x2d71('0x2c')](db[_0x2d71('0x2d')][_0x2d71('0x2e')],function(_0x7b97c3){return{'name':_0x7b97c3[_0x2d71('0x2f')],'type':_0x7b97c3[_0x2d71('0x30')][_0x2d71('0x31')]};});_0x227ad7[_0x2d71('0x32')]=_['map'](_0x4a307c,_0x2d71('0x29'));_0x227ad7[_0x2d71('0x33')]=_[_0x2d71('0x34')](_0x1afefc['query']);_0x227ad7[_0x2d71('0x35')]=_['intersection'](_0x227ad7[_0x2d71('0x32')],_0x227ad7[_0x2d71('0x33')]);_0x41c87c['attributes']=_['intersection'](_0x227ad7['model'],qs['fields'](_0x1afefc['query'][_0x2d71('0x36')]));_0x41c87c[_0x2d71('0x37')]=_0x41c87c[_0x2d71('0x37')][_0x2d71('0x38')]?_0x41c87c['attributes']:_0x227ad7[_0x2d71('0x32')];if(!_0x1afefc[_0x2d71('0x33')][_0x2d71('0x39')](_0x2d71('0x3a'))){_0x41c87c[_0x2d71('0x1f')]=qs[_0x2d71('0x1f')](_0x1afefc[_0x2d71('0x33')][_0x2d71('0x1f')]);_0x41c87c[_0x2d71('0x1d')]=qs['offset'](_0x1afefc[_0x2d71('0x33')][_0x2d71('0x1d')]);}_0x41c87c[_0x2d71('0x3b')]=qs[_0x2d71('0x3c')](_0x1afefc[_0x2d71('0x33')][_0x2d71('0x3c')]);_0x41c87c['where']=qs[_0x2d71('0x35')](_[_0x2d71('0x3d')](_0x1afefc[_0x2d71('0x33')],_0x227ad7['filters']),_0x4a307c);if(_0x1afefc['query'][_0x2d71('0x3e')]){_0x41c87c[_0x2d71('0x3f')]=_[_0x2d71('0x40')](_0x41c87c[_0x2d71('0x3f')],{'$or':_[_0x2d71('0x2c')](_0x4a307c,function(_0x23bc50){if(_0x23bc50[_0x2d71('0x30')]!=='VIRTUAL'){var _0x3ef8f8={};_0x3ef8f8[_0x23bc50[_0x2d71('0x29')]]={'$like':'%'+_0x1afefc[_0x2d71('0x33')][_0x2d71('0x3e')]+'%'};return _0x3ef8f8;}})});}_0x41c87c=_['merge']({},_0x41c87c,_0x1afefc[_0x2d71('0x41')]);var _0x181b1f={'where':_0x41c87c[_0x2d71('0x3f')]};return db[_0x2d71('0x2d')][_0x2d71('0x20')](_0x181b1f)[_0x2d71('0x25')](function(_0x373089){_0x53ec4d[_0x2d71('0x20')]=_0x373089;if(_0x1afefc[_0x2d71('0x33')]['includeAll']){_0x41c87c['include']=[{'all':!![]}];}return db[_0x2d71('0x2d')][_0x2d71('0x42')](_0x41c87c);})['then'](function(_0xda41b1){_0x53ec4d[_0x2d71('0x43')]=_0xda41b1;return _0x53ec4d;})[_0x2d71('0x25')](respondWithFilteredResult(_0x3bdd1a,_0x41c87c))[_0x2d71('0x44')](handleError(_0x3bdd1a,null));};exports['show']=function(_0x120da4,_0x3d7359){var _0xbdccc2={'raw':!![],'where':{'id':_0x120da4[_0x2d71('0x45')]['id']}},_0x538242={};_0x538242[_0x2d71('0x32')]=_[_0x2d71('0x34')](db[_0x2d71('0x2d')][_0x2d71('0x2e')]);_0x538242['query']=_['keys'](_0x120da4[_0x2d71('0x33')]);_0x538242[_0x2d71('0x35')]=_[_0x2d71('0x46')](_0x538242['model'],_0x538242[_0x2d71('0x33')]);_0xbdccc2[_0x2d71('0x37')]=_[_0x2d71('0x46')](_0x538242[_0x2d71('0x32')],qs['fields'](_0x120da4[_0x2d71('0x33')]['fields']));_0xbdccc2[_0x2d71('0x37')]=_0xbdccc2[_0x2d71('0x37')][_0x2d71('0x38')]?_0xbdccc2[_0x2d71('0x37')]:_0x538242[_0x2d71('0x32')];if(_0x120da4['query'][_0x2d71('0x47')]){_0xbdccc2['include']=[{'all':!![]}];}_0xbdccc2=_['merge']({},_0xbdccc2,_0x120da4[_0x2d71('0x41')]);return db[_0x2d71('0x2d')][_0x2d71('0x48')](_0xbdccc2)[_0x2d71('0x25')](handleEntityNotFound(_0x3d7359,null))[_0x2d71('0x25')](respondWithResult(_0x3d7359,null))[_0x2d71('0x44')](handleError(_0x3d7359,null));};exports[_0x2d71('0x49')]=function(_0x5aabe8,_0x5e1134){return db[_0x2d71('0x2d')][_0x2d71('0x49')](_0x5aabe8[_0x2d71('0x4a')],{})[_0x2d71('0x25')](respondWithResult(_0x5e1134,0xc9))[_0x2d71('0x44')](handleError(_0x5e1134,null));};exports[_0x2d71('0x24')]=function(_0x5a3062,_0x5d6386){if(_0x5a3062[_0x2d71('0x4a')]['id']){delete _0x5a3062[_0x2d71('0x4a')]['id'];}return db[_0x2d71('0x2d')][_0x2d71('0x48')]({'where':{'id':_0x5a3062['params']['id']}})['then'](handleEntityNotFound(_0x5d6386,null))[_0x2d71('0x25')](saveUpdates(_0x5a3062[_0x2d71('0x4a')],null))['then'](respondWithResult(_0x5d6386,null))['catch'](handleError(_0x5d6386,null));};exports['destroy']=function(_0x295181,_0x558186){return db[_0x2d71('0x2d')][_0x2d71('0x48')]({'where':{'id':_0x295181[_0x2d71('0x45')]['id']}})['then'](handleEntityNotFound(_0x558186,null))[_0x2d71('0x25')](removeEntity(_0x558186,null))[_0x2d71('0x44')](handleError(_0x558186,null));};exports['describe']=function(_0x1d4b43,_0x3547f8){return db[_0x2d71('0x2d')]['describe']()['then'](respondWithResult(_0x3547f8,null))[_0x2d71('0x44')](handleError(_0x3547f8,null));};function wrapUser(_0x1790a0){return function(_0x39b859){var _0x526cdf=_0x1790a0[_0x2d71('0x4b')]({'plain':!![]});_0x526cdf['messages']=[];if(_0x39b859){_0x526cdf[_0x2d71('0x4c')]=_0x39b859[_0x2d71('0x4d')];_0x526cdf[_0x2d71('0x4e')]=_0x39b859;}else{_0x526cdf['lastMessageAt']=moment(0x0)[_0x2d71('0x4f')]('YYYY-MM-DD\x20HH:mm:ss');_0x526cdf[_0x2d71('0x4e')]={};}return _0x526cdf;};}exports[_0x2d71('0x50')]=function(_0x66a96d,_0x3e9d3d,_0xd404c3){var _0x1ba913=[];return db[_0x2d71('0x51')]['findAll']({'where':{'role':[_0x2d71('0x52'),_0x2d71('0x53'),_0x2d71('0x54')]},'attributes':['id',_0x2d71('0x55'),_0x2d71('0x29'),_0x2d71('0x56'),_0x2d71('0x57'),'internal',_0x2d71('0x58'),_0x2d71('0x59'),_0x2d71('0x5a'),_0x2d71('0x5b')],'order':qs[_0x2d71('0x3c')](_0x2d71('0x5c')),'include':[{'model':db[_0x2d71('0x5d')],'as':_0x2d71('0x5e'),'attributes':['id',_0x2d71('0x29'),_0x2d71('0x30')],'through':{'attributes':[]}}]})[_0x2d71('0x25')](function(_0x1cba1e){if(_0x1cba1e){var _0x1dc54c=_0x66a96d[_0x2d71('0x54')][_0x2d71('0x4b')]({'plain':!![]});if(!_0x1dc54c)throw new Error(_0x2d71('0x5f'));if(_0x1dc54c[_0x2d71('0x56')]===_0x2d71('0x54')){return db[_0x2d71('0x60')][_0x2d71('0x48')]({'where':{'name':_0x2d71('0x61'),'userProfileId':_0x1dc54c[_0x2d71('0x62')]},'raw':!![]})['then'](function(_0x1c0afe){if(_0x1c0afe){if(_0x1c0afe[_0x2d71('0x63')]===0x0){return db[_0x2d71('0x64')][_0x2d71('0x42')]({'where':{'sectionId':_0x1c0afe['id']},'raw':!![]})['then'](function(_0x522b3d){var _0x5a8d0b=[];if(_[_0x2d71('0x65')](_0x522b3d)){_0x5a8d0b=_[_0x2d71('0x3e')](_0x1cba1e,function(_0x4d85a7){if(_0x4d85a7[_0x2d71('0x56')]!==_0x2d71('0x52')){return _0x4d85a7;}});return _0x5a8d0b;}else{for(var _0x2eec97=0x0;_0x2eec97<_0x1cba1e[_0x2d71('0x38')];_0x2eec97++){var _0x54d4db=_0x1cba1e[_0x2eec97];if(_0x54d4db['role']==='agent'){var _0x5765bd=_[_0x2d71('0x48')](_0x522b3d,function(_0x1d41bc){return _0x1d41bc[_0x2d71('0x66')]===_0x54d4db['id'];});if(_0x5765bd)_0x5a8d0b[_0x2d71('0x67')](_0x54d4db);}else{_0x5a8d0b[_0x2d71('0x67')](_0x54d4db);}}return _0x5a8d0b;}});}else{return _0x1cba1e;}}else{var _0x2681c0=_[_0x2d71('0x3e')](_0x1cba1e,function(_0x593446){if(_0x593446['role']!==_0x2d71('0x52')){return _0x593446;}});return _0x2681c0;}});}else{return _0x1cba1e;}}})[_0x2d71('0x25')](function(_0x4aea9a){var _0x49cdc6=[];if(_0x4aea9a){_0x1ba913=_0x4aea9a;for(var _0x430c8a=0x0;_0x430c8a<_0x4aea9a['length'];_0x430c8a+=0x1){_0x1ba913[_0x430c8a][_0x2d71('0x68')]=[];_0x49cdc6['push'](db[_0x2d71('0x2d')][_0x2d71('0x48')]({'where':{'FromId':[_0x66a96d['user']['id'],_0x4aea9a[_0x430c8a]['id']],'ToId':[_0x66a96d[_0x2d71('0x54')]['id'],_0x4aea9a[_0x430c8a]['id']],'ChatGroupId':null},'attributes':['id',_0x2d71('0x4d'),_0x2d71('0x69'),_0x2d71('0x6a'),_0x2d71('0x6b'),_0x2d71('0x4a')],'order':qs['sort'](_0x2d71('0x6c')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x2d71('0x25')](wrapUser(_0x4aea9a[_0x430c8a])));}return BPromise[_0x2d71('0x6d')](_0x49cdc6);}return[];})[_0x2d71('0x25')](function(_0x5b03ee){return{'rows':_0x5b03ee,'count':_0x5b03ee[_0x2d71('0x38')]};})[_0x2d71('0x25')](respondWithResult(_0x3e9d3d,null))['catch'](handleError(_0x3e9d3d,null));}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js index 85fc1c2..caec693 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 _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 +var _0x90b8=['remove','emit','hook','../../mysqldb','ChatInternalMessage','save'];(function(_0x3ae475,_0x334ee0){var _0x264254=function(_0x1135de){while(--_0x1135de){_0x3ae475['push'](_0x3ae475['shift']());}};_0x264254(++_0x334ee0);}(_0x90b8,0x15f));var _0x890b=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x90b8[_0x57b54c];return _0x59cc19;};'use strict';var EventEmitter=require('events');var ChatInternalMessage=require(_0x890b('0x0'))['db'][_0x890b('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x890b('0x2'),'afterUpdate':'update','afterDestroy':_0x890b('0x3')};function emitEvent(_0x1a4354){return function(_0x2c9ca0,_0x5460f0,_0x419fa0){ChatInternalMessageEvents[_0x890b('0x4')](_0x1a4354+':'+_0x2c9ca0['id'],_0x2c9ca0);ChatInternalMessageEvents[_0x890b('0x4')](_0x1a4354,_0x2c9ca0);_0x419fa0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0x890b('0x5')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js index 5b76140..57a75d3 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 _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 +var _0xd09a=['rimraf','./chatInternalMessage.attributes','define','ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','request-promise'];(function(_0x2c0b51,_0x19800b){var _0x296233=function(_0x2cdfa1){while(--_0x2cdfa1){_0x2c0b51['push'](_0x2c0b51['shift']());}};_0x296233(++_0x19800b);}(_0xd09a,0x172));var _0xad09=function(_0x24c4b1,_0x26aa44){_0x24c4b1=_0x24c4b1-0x0;var _0x2b6701=_0xd09a[_0x24c4b1];return _0x2b6701;};'use strict';var _=require(_0xad09('0x0'));var util=require(_0xad09('0x1'));var logger=require('../../config/logger')(_0xad09('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xad09('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xad09('0x4'));var config=require('../../config/environment');var attributes=require(_0xad09('0x5'));module['exports']=function(_0x37d61c,_0x41715d){return _0x37d61c[_0xad09('0x6')](_0xad09('0x7'),attributes,{'tableName':_0xad09('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xad09('0x9'),'collate':_0xad09('0xa')});}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js index 9d5a8d6..7a802e1 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 _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 +var _0x7543=['info','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','ChatInternalMessage,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatInternalMessage.socket','register','request','then'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0x7543,0x191));var _0x3754=function(_0x13fd65,_0x516b37){_0x13fd65=_0x13fd65-0x0;var _0x16af6f=_0x7543[_0x13fd65];return _0x16af6f;};'use strict';var _=require(_0x3754('0x0'));var util=require('util');var moment=require(_0x3754('0x1'));var BPromise=require(_0x3754('0x2'));var rs=require(_0x3754('0x3'));var fs=require('fs');var Redis=require(_0x3754('0x4'));var db=require(_0x3754('0x5'))['db'];var utils=require(_0x3754('0x6'));var logger=require('../../config/logger')(_0x3754('0x7'));var config=require(_0x3754('0x8'));var jayson=require(_0x3754('0x9'));var client=jayson[_0x3754('0xa')][_0x3754('0xb')]({'port':0x232a});config[_0x3754('0xc')]=_[_0x3754('0xd')](config[_0x3754('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x3754('0xe'))(new Redis(config[_0x3754('0xc')]));require(_0x3754('0xf'))[_0x3754('0x10')](socket);function respondWithRpcPromise(_0x1a78d0,_0x34efec,_0x3350e6){return new BPromise(function(_0x389b39,_0x33f1f4){return client[_0x3754('0x11')](_0x1a78d0,_0x3350e6)[_0x3754('0x12')](function(_0x52e08d){logger[_0x3754('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x34efec,_0x3754('0x14'));logger[_0x3754('0x15')](_0x3754('0x16'),_0x34efec,_0x3754('0x14'),JSON[_0x3754('0x17')](_0x52e08d));if(_0x52e08d[_0x3754('0x18')]){if(_0x52e08d[_0x3754('0x18')]['code']===0x1f4){logger[_0x3754('0x18')](_0x3754('0x19'),_0x34efec,_0x52e08d['error'][_0x3754('0x1a')]);return _0x33f1f4(_0x52e08d['error'][_0x3754('0x1a')]);}logger[_0x3754('0x18')](_0x3754('0x19'),_0x34efec,_0x52e08d[_0x3754('0x18')][_0x3754('0x1a')]);return _0x389b39(_0x52e08d[_0x3754('0x18')][_0x3754('0x1a')]);}else{logger[_0x3754('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x34efec,_0x3754('0x14'));_0x389b39(_0x52e08d['result']['message']);}})[_0x3754('0x1b')](function(_0x2ad750){logger[_0x3754('0x18')](_0x3754('0x19'),_0x34efec,_0x2ad750);_0x33f1f4(_0x2ad750);});});} \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js index da97c47..a9930ce 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 _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 +var _0x99d9=['save','remove','update','removeListener','register','length','./chatInternalMessage.events'];(function(_0xefed29,_0x27b791){var _0x1f3d59=function(_0x4f8a51){while(--_0x4f8a51){_0xefed29['push'](_0xefed29['shift']());}};_0x1f3d59(++_0x27b791);}(_0x99d9,0x102));var _0x999d=function(_0x34179b,_0x10d96d){_0x34179b=_0x34179b-0x0;var _0x4e0c50=_0x99d9[_0x34179b];return _0x4e0c50;};'use strict';var ChatInternalMessageEvents=require(_0x999d('0x0'));var events=[_0x999d('0x1'),_0x999d('0x2'),_0x999d('0x3')];function createListener(_0x264c58,_0x191f6b){return function(_0x23169c){_0x191f6b['emit'](_0x264c58,_0x23169c);};}function removeListener(_0x653891,_0x36c3f8){return function(){ChatInternalMessageEvents[_0x999d('0x4')](_0x653891,_0x36c3f8);};}exports[_0x999d('0x5')]=function(_0x5e2725){for(var _0xf064c=0x0,_0x15c66e=events[_0x999d('0x6')];_0xf064c<_0x15c66e;_0xf064c++){var _0x933ff0=events[_0xf064c];var _0x3f9724=createListener('chatInternalMessage:'+_0x933ff0,_0x5e2725);ChatInternalMessageEvents['on'](_0x933ff0,_0x3f9724);}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js index 7084afd..3f02568 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 _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 +var _0x6f2a=['../../components/auth/service','../../config/environment','./chatInternalMessage.controller','get','index','/describe','isAuthenticated','/users','show','post','put','/:id','update','delete','destroy','multer','util','connect-timeout','express','Router','fs-extra'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6f2a,0x189));var _0xa6f2=function(_0x33fc06,_0x565c89){_0x33fc06=_0x33fc06-0x0;var _0x5ba69c=_0x6f2a[_0x33fc06];return _0x5ba69c;};'use strict';var multer=require(_0xa6f2('0x0'));var util=require(_0xa6f2('0x1'));var path=require('path');var timeout=require(_0xa6f2('0x2'));var express=require(_0xa6f2('0x3'));var router=express[_0xa6f2('0x4')]();var fs_extra=require(_0xa6f2('0x5'));var auth=require(_0xa6f2('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xa6f2('0x7'));var controller=require(_0xa6f2('0x8'));router[_0xa6f2('0x9')]('/',auth['isAuthenticated'](),controller[_0xa6f2('0xa')]);router[_0xa6f2('0x9')](_0xa6f2('0xb'),auth[_0xa6f2('0xc')](),controller['describe']);router[_0xa6f2('0x9')](_0xa6f2('0xd'),auth[_0xa6f2('0xc')](),controller['getUsers']);router['get']('/:id',auth[_0xa6f2('0xc')](),controller[_0xa6f2('0xe')]);router[_0xa6f2('0xf')]('/',auth[_0xa6f2('0xc')](),controller['create']);router[_0xa6f2('0x10')](_0xa6f2('0x11'),controller[_0xa6f2('0x12')]);router[_0xa6f2('0x13')](_0xa6f2('0x11'),auth[_0xa6f2('0xc')](),controller[_0xa6f2('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js index f613a02..88926af 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 _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 +var _0x7708=['DATE','TEXT','sequelize','exports','medium','out'];(function(_0x16e2f0,_0x54595c){var _0x2b3393=function(_0x3f3bc0){while(--_0x3f3bc0){_0x16e2f0['push'](_0x16e2f0['shift']());}};_0x2b3393(++_0x54595c);}(_0x7708,0x188));var _0x8770=function(_0x4b26b5,_0x4f71fd){_0x4b26b5=_0x4b26b5-0x0;var _0x4dec71=_0x7708[_0x4b26b5];return _0x4dec71;};'use strict';var Sequelize=require(_0x8770('0x0'));module[_0x8770('0x1')]={'body':{'type':Sequelize['TEXT'](_0x8770('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in','out'),'defaultValue':_0x8770('0x3'),'allowNull':![]},'readAt':{'type':Sequelize[_0x8770('0x4')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x8770('0x5')]}}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js index b467621..4644058 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 _0xeb84=['chat-interactions','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','Contact','get','ChatInteractionId','isNil','user','role','null','AcceptMessage','CmContact','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','manual','interface','SIP/%s','channel','accept','EventManager','acceptmessage','parse','formData','reject','chat','ChatInteraction','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','RejectMessage','event','rejectmessage','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','redis','socket.io-emitter','register','jayson/promise','http','client','request','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','sendStatus','status','json','limit','count','offset','set','Content-Range','apply','save','update','then','destroy','end','stack','name','send','index','map','ChatMessage','rawAttributes','fieldName','key','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','pick','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','catch','params','options','find','create','body','describe'];(function(_0x1579f3,_0x16473c){var _0x4dcf8c=function(_0x22fbcd){while(--_0x22fbcd){_0x1579f3['push'](_0x1579f3['shift']());}};_0x4dcf8c(++_0x16473c);}(_0xeb84,0x1b3));var _0x4eb8=function(_0x5d80de,_0x2cf15d){_0x5d80de=_0x5d80de-0x0;var _0x1c7556=_0xeb84[_0x5d80de];return _0x1c7556;};'use strict';var emlformat=require(_0x4eb8('0x0'));var rimraf=require(_0x4eb8('0x1'));var zipdir=require(_0x4eb8('0x2'));var jsonpatch=require(_0x4eb8('0x3'));var rp=require(_0x4eb8('0x4'));var moment=require(_0x4eb8('0x5'));var BPromise=require(_0x4eb8('0x6'));var Mustache=require(_0x4eb8('0x7'));var util=require('util');var path=require(_0x4eb8('0x8'));var sox=require(_0x4eb8('0x9'));var csv=require(_0x4eb8('0xa'));var ejs=require(_0x4eb8('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4eb8('0xc'));var squel=require(_0x4eb8('0xd'));var crypto=require(_0x4eb8('0xe'));var jsforce=require(_0x4eb8('0xf'));var deskjs=require(_0x4eb8('0x10'));var toCsv=require('to-csv');var querystring=require(_0x4eb8('0x11'));var Papa=require(_0x4eb8('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x4eb8('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x4eb8('0x14'))(_0x4eb8('0x15'));var utils=require('../../config/utils');var config=require(_0x4eb8('0x16'));var licenseUtil=require(_0x4eb8('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config[_0x4eb8('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x4eb8('0x19'))(new Redis(config[_0x4eb8('0x18')]));require('./chatMessage.socket')[_0x4eb8('0x1a')](socket);var jayson=require(_0x4eb8('0x1b'));var client=jayson['client'][_0x4eb8('0x1c')]({'port':0x232c});var client9002=jayson[_0x4eb8('0x1d')][_0x4eb8('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x28a8ba,_0x488e0d,_0x1b74df,_0x58300a){return new BPromise(function(_0x4ed5b1,_0x558af6){var _0x672343=_0x58300a||client;return _0x672343[_0x4eb8('0x1e')](_0x28a8ba,_0x1b74df)['then'](function(_0x4a1634){logger[_0x4eb8('0x1f')](_0x4eb8('0x20'),_0x488e0d,_0x4eb8('0x21'));logger[_0x4eb8('0x22')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x488e0d,'request\x20sent',JSON[_0x4eb8('0x23')](_0x4a1634));if(_0x4a1634[_0x4eb8('0x24')]){if(_0x4a1634[_0x4eb8('0x24')][_0x4eb8('0x25')]===0x1f4){logger[_0x4eb8('0x24')](_0x4eb8('0x20'),_0x488e0d,_0x4a1634[_0x4eb8('0x24')][_0x4eb8('0x26')]);return _0x558af6(_0x4a1634[_0x4eb8('0x24')][_0x4eb8('0x26')]);}logger[_0x4eb8('0x24')](_0x4eb8('0x20'),_0x488e0d,_0x4a1634['error'][_0x4eb8('0x26')]);return _0x4ed5b1(_0x4a1634['error'][_0x4eb8('0x26')]);}else{logger[_0x4eb8('0x1f')]('ChatMessage,\x20%s,\x20%s',_0x488e0d,_0x4eb8('0x21'));_0x4ed5b1(_0x4a1634['result'][_0x4eb8('0x26')]);}})['catch'](function(_0x4c48a2){logger[_0x4eb8('0x24')](_0x4eb8('0x20'),_0x488e0d,_0x4c48a2);_0x558af6(_0x4c48a2);});});}function respondWithStatusCode(_0x2a708f,_0xb5361c){_0xb5361c=_0xb5361c||0xcc;return function(_0x5cb5af){if(_0x5cb5af){return _0x2a708f[_0x4eb8('0x27')](_0xb5361c);}return _0x2a708f[_0x4eb8('0x28')](_0xb5361c)['end']();};}function respondWithResult(_0x14f916,_0x2deef0){_0x2deef0=_0x2deef0||0xc8;return function(_0xce6c1e){if(_0xce6c1e){return _0x14f916[_0x4eb8('0x28')](_0x2deef0)[_0x4eb8('0x29')](_0xce6c1e);}};}function respondWithFilteredResult(_0x5883b1,_0x67d5ee){return function(_0xd7203a){if(_0xd7203a){var _0x44126e=typeof _0x67d5ee['offset']==='undefined'&&typeof _0x67d5ee[_0x4eb8('0x2a')]==='undefined';var _0x145fcd=_0xd7203a[_0x4eb8('0x2b')];var _0x4843e6=_0x44126e?0x0:_0x67d5ee[_0x4eb8('0x2c')];var _0x581bf2=_0x44126e?_0xd7203a[_0x4eb8('0x2b')]:_0x67d5ee[_0x4eb8('0x2c')]+_0x67d5ee['limit'];var _0xbf313a;if(_0x581bf2>=_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=_0x4ab7f7){_0x59d015=_0x4ab7f7;_0x3245ae=0xc8;}else{_0x3245ae=0xce;}_0x33e42d[_0xda48('0x2a')](_0x3245ae);return _0x33e42d['set']('Content-Range',_0x26518a+'-'+_0x59d015+'/'+_0x4ab7f7)['json'](_0x279a65);}return null;};}function patchUpdates(_0x38d05a){return function(_0x41d704){try{jsonpatch[_0xda48('0x2f')](_0x41d704,_0x38d05a,!![]);}catch(_0x43346f){return BPromise[_0xda48('0x30')](_0x43346f);}return _0x41d704[_0xda48('0x31')]();};}function saveUpdates(_0xbaf67c,_0x3cbdfa){return function(_0x5333f5){if(_0x5333f5){return _0x5333f5['update'](_0xbaf67c)['then'](function(_0x363f1f){return _0x363f1f;});}return null;};}function removeEntity(_0xafcf1,_0xd0e737){return function(_0x34cc2d){if(_0x34cc2d){return _0x34cc2d[_0xda48('0x32')]()[_0xda48('0x33')](function(){_0xafcf1[_0xda48('0x2a')](0xcc)[_0xda48('0x29')]();});}};}function handleEntityNotFound(_0x1743ef,_0x57f19f){return function(_0x56f29f){if(!_0x56f29f){_0x1743ef[_0xda48('0x28')](0x194);}return _0x56f29f;};}function handleError(_0x1f74c1,_0x12e6a9){_0x12e6a9=_0x12e6a9||0x1f4;return function(_0x12fcec){logger[_0xda48('0x23')](_0x12fcec[_0xda48('0x34')]);if(_0x12fcec[_0xda48('0x35')]){delete _0x12fcec[_0xda48('0x35')];}_0x1f74c1[_0xda48('0x2a')](_0x12e6a9)[_0xda48('0x36')](_0x12fcec);};}exports[_0xda48('0x37')]=function(_0x1a33c7,_0xa02538){var _0x11c81f={},_0x27148b={},_0x4710cc={'count':0x0,'rows':[]};var _0x4b4869=_[_0xda48('0x38')](db[_0xda48('0x39')][_0xda48('0x3a')],function(_0x582cba){return{'name':_0x582cba['fieldName'],'type':_0x582cba[_0xda48('0x3b')][_0xda48('0x3c')]};});_0x27148b[_0xda48('0x3d')]=_[_0xda48('0x38')](_0x4b4869,'name');_0x27148b['query']=_['keys'](_0x1a33c7[_0xda48('0x3e')]);_0x27148b[_0xda48('0x3f')]=_[_0xda48('0x40')](_0x27148b[_0xda48('0x3d')],_0x27148b['query']);_0x11c81f['attributes']=_[_0xda48('0x40')](_0x27148b[_0xda48('0x3d')],qs[_0xda48('0x41')](_0x1a33c7[_0xda48('0x3e')][_0xda48('0x41')]));_0x11c81f[_0xda48('0x42')]=_0x11c81f[_0xda48('0x42')][_0xda48('0x43')]?_0x11c81f['attributes']:_0x27148b['model'];if(!_0x1a33c7['query'][_0xda48('0x44')](_0xda48('0x45'))){_0x11c81f[_0xda48('0x2c')]=qs[_0xda48('0x2c')](_0x1a33c7['query']['limit']);_0x11c81f[_0xda48('0x2e')]=qs['offset'](_0x1a33c7[_0xda48('0x3e')][_0xda48('0x2e')]);}_0x11c81f[_0xda48('0x46')]=qs[_0xda48('0x47')](_0x1a33c7[_0xda48('0x3e')][_0xda48('0x47')]);_0x11c81f[_0xda48('0x48')]=qs[_0xda48('0x3f')](_[_0xda48('0x49')](_0x1a33c7[_0xda48('0x3e')],_0x27148b[_0xda48('0x3f')]),_0x4b4869);if(_0x1a33c7[_0xda48('0x3e')]['filter']){_0x11c81f[_0xda48('0x48')]=_[_0xda48('0x4a')](_0x11c81f[_0xda48('0x48')],{'$or':_[_0xda48('0x38')](_0x4b4869,function(_0x83d831){if(_0x83d831[_0xda48('0x3b')]!==_0xda48('0x4b')){var _0x3219cc={};_0x3219cc[_0x83d831[_0xda48('0x35')]]={'$like':'%'+_0x1a33c7[_0xda48('0x3e')]['filter']+'%'};return _0x3219cc;}})});}_0x11c81f=_['merge']({},_0x11c81f,_0x1a33c7[_0xda48('0x4c')]);var _0x10366c={'where':_0x11c81f[_0xda48('0x48')]};return db[_0xda48('0x39')][_0xda48('0x2d')](_0x10366c)[_0xda48('0x33')](function(_0xdffc39){_0x4710cc['count']=_0xdffc39;if(_0x1a33c7['query'][_0xda48('0x4d')]){_0x11c81f['include']=[{'all':!![]}];}return db[_0xda48('0x39')][_0xda48('0x4e')](_0x11c81f);})[_0xda48('0x33')](function(_0x1b50bc){_0x4710cc[_0xda48('0x4f')]=_0x1b50bc;return _0x4710cc;})[_0xda48('0x33')](respondWithFilteredResult(_0xa02538,_0x11c81f))[_0xda48('0x27')](handleError(_0xa02538,null));};exports[_0xda48('0x50')]=function(_0x46b8b4,_0x4e08b9){var _0x362702={'raw':!![],'where':{'id':_0x46b8b4[_0xda48('0x51')]['id']}},_0x2fb6ba={};_0x2fb6ba[_0xda48('0x3d')]=_[_0xda48('0x52')](db[_0xda48('0x39')]['rawAttributes']);_0x2fb6ba[_0xda48('0x3e')]=_[_0xda48('0x52')](_0x46b8b4['query']);_0x2fb6ba[_0xda48('0x3f')]=_[_0xda48('0x40')](_0x2fb6ba[_0xda48('0x3d')],_0x2fb6ba['query']);_0x362702['attributes']=_[_0xda48('0x40')](_0x2fb6ba[_0xda48('0x3d')],qs[_0xda48('0x41')](_0x46b8b4[_0xda48('0x3e')][_0xda48('0x41')]));_0x362702[_0xda48('0x42')]=_0x362702[_0xda48('0x42')][_0xda48('0x43')]?_0x362702[_0xda48('0x42')]:_0x2fb6ba[_0xda48('0x3d')];if(_0x46b8b4[_0xda48('0x3e')][_0xda48('0x4d')]){_0x362702[_0xda48('0x53')]=[{'all':!![]}];}_0x362702=_[_0xda48('0x4a')]({},_0x362702,_0x46b8b4['options']);return db['ChatMessage'][_0xda48('0x54')](_0x362702)[_0xda48('0x33')](handleEntityNotFound(_0x4e08b9,null))[_0xda48('0x33')](respondWithResult(_0x4e08b9,null))[_0xda48('0x27')](handleError(_0x4e08b9,null));};exports[_0xda48('0x55')]=function(_0x27a152,_0x4d8e3f){return db['ChatMessage']['create'](_0x27a152[_0xda48('0x56')],{})[_0xda48('0x33')](respondWithResult(_0x4d8e3f,0xc9))[_0xda48('0x27')](handleError(_0x4d8e3f,null));};exports['update']=function(_0x1fae3f,_0x1a0044){if(_0x1fae3f[_0xda48('0x56')]['id']){delete _0x1fae3f[_0xda48('0x56')]['id'];}return db['ChatMessage'][_0xda48('0x54')]({'where':{'id':_0x1fae3f['params']['id']}})[_0xda48('0x33')](handleEntityNotFound(_0x1a0044,null))[_0xda48('0x33')](saveUpdates(_0x1fae3f[_0xda48('0x56')],null))['then'](respondWithResult(_0x1a0044,null))[_0xda48('0x27')](handleError(_0x1a0044,null));};exports['destroy']=function(_0x4ce970,_0xcb8c89){return db[_0xda48('0x39')][_0xda48('0x54')]({'where':{'id':_0x4ce970[_0xda48('0x51')]['id']}})['then'](handleEntityNotFound(_0xcb8c89,null))[_0xda48('0x33')](removeEntity(_0xcb8c89,null))['catch'](handleError(_0xcb8c89,null));};exports[_0xda48('0x57')]=function(_0x68b841,_0x351e8c){return db[_0xda48('0x39')][_0xda48('0x57')]()[_0xda48('0x33')](respondWithResult(_0x351e8c,null))[_0xda48('0x27')](handleError(_0x351e8c,null));};var interaction_log=require(_0xda48('0xe'))(_0xda48('0x58'));exports[_0xda48('0x59')]=function(_0xee08f,_0x8ed223,_0x4a4de9){var _0x10d394={'agent':{},'channel':_0xda48('0x5a')};if(_0xee08f['body']['id']){delete _0xee08f[_0xda48('0x56')]['id'];}_0xee08f[_0xda48('0x56')][_0xda48('0x5b')]=!![];_0xee08f[_0xda48('0x56')][_0xda48('0x5c')]=moment()[_0xda48('0x5d')]('YYYY-MM-DD\x20HH:mm:ss');_0xee08f[_0xda48('0x56')][_0xda48('0x5e')]=_0xee08f['body'][_0xda48('0x5e')]||_0xee08f[_0xda48('0x5f')]['id'];_0x10d394[_0xda48('0x60')]['id']=_0xee08f[_0xda48('0x56')][_0xda48('0x5e')];return db[_0xda48('0x39')][_0xda48('0x54')]({'where':{'id':_0xee08f['params']['id'],'UserId':null},'include':[{'model':db[_0xda48('0x61')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x8ed223,null))[_0xda48('0x33')](saveUpdates(_0xee08f[_0xda48('0x56')],null))['then'](function(_0x2155ee){if(_0x2155ee){_0x10d394[_0xda48('0x25')]=_0x2155ee[_0xda48('0x62')]({'plain':!![]});return db[_0xda48('0x63')]['find']({'where':{'id':_0x2155ee[_0xda48('0x64')]}});}return null;})[_0xda48('0x33')](handleEntityNotFound(_0x8ed223,null))[_0xda48('0x33')](function(_0x1e67a7){if(_0x1e67a7){return _0x1e67a7[_0xda48('0x65')]({'UserId':_0xee08f['body']['UserId'],'read1stAt':_[_0xda48('0x66')](_0x1e67a7[_0xda48('0x67')])?moment()['format'](_0xda48('0x68')):undefined});}return null;})[_0xda48('0x33')](function(_0x24349b){if(_0x24349b){_0x10d394[_0xda48('0x69')]=_0x24349b[_0xda48('0x62')]({'plain':!![]});interaction_log[_0xda48('0x1d')](_0xda48('0x6a'),_0xee08f[_0xda48('0x5f')]['id'],_0xee08f[_0xda48('0x5f')][_0xda48('0x35')],_0xee08f[_0xda48('0x5f')]['role'],_0x10d394[_0xda48('0x69')]['id'],_0xee08f[_0xda48('0x56')]?JSON[_0xda48('0x22')](_0xee08f[_0xda48('0x56')]):'null');return respondWithRpcPromise(_0xda48('0x6b'),'acceptMessage',_0x10d394);}return null;})[_0xda48('0x33')](function(_0x153854){return db[_0xda48('0x61')][_0xda48('0x57')]()[_0xda48('0x33')](function(_0x175b2c){var _0x55844a=[];for(var _0x2976b0=0x0;_0x2976b0=_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 +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(_0x9ff1d4,_0x1d59e7){var _0x512273=function(_0x1f8984){while(--_0x1f8984){_0x9ff1d4['push'](_0x9ff1d4['shift']());}};_0x512273(++_0x1d59e7);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'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 581cc2f..4f863c7 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 _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 +var _0x46df=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','chat_offline_messages','utf8mb4'];(function(_0x21dbda,_0x2c8305){var _0x508007=function(_0x4dfc7e){while(--_0x4dfc7e){_0x21dbda['push'](_0x21dbda['shift']());}};_0x508007(++_0x2c8305);}(_0x46df,0xbb));var _0xf46d=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x46df[_0x501510];return _0x1e6ee5;};'use strict';var _=require('lodash');var util=require(_0xf46d('0x0'));var logger=require(_0xf46d('0x1'))('api');var moment=require(_0xf46d('0x2'));var BPromise=require(_0xf46d('0x3'));var rp=require(_0xf46d('0x4'));var fs=require('fs');var path=require(_0xf46d('0x5'));var rimraf=require(_0xf46d('0x6'));var config=require(_0xf46d('0x7'));var attributes=require('./chatOfflineMessage.attributes');module[_0xf46d('0x8')]=function(_0x5cdf9a,_0x58ce3e){return _0x5cdf9a['define']('ChatOfflineMessage',attributes,{'tableName':_0xf46d('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf46d('0xa'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js index 84a7cd9..381556c 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 _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 +var _0x674a=['bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','lodash','moment'];(function(_0x5aec97,_0x24ea35){var _0x380238=function(_0x5a4c1f){while(--_0x5a4c1f){_0x5aec97['push'](_0x5aec97['shift']());}};_0x380238(++_0x24ea35);}(_0x674a,0x1a0));var _0xa674=function(_0x49a8e9,_0x248a71){_0x49a8e9=_0x49a8e9-0x0;var _0x6c6296=_0x674a[_0x49a8e9];return _0x6c6296;};'use strict';var _=require(_0xa674('0x0'));var util=require('util');var moment=require(_0xa674('0x1'));var BPromise=require(_0xa674('0x2'));var rs=require(_0xa674('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa674('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa674('0x5'))(_0xa674('0x6'));var config=require('../../config/environment');var jayson=require(_0xa674('0x7'));var client=jayson[_0xa674('0x8')][_0xa674('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x20477c,_0x5c1493,_0x5b8b64){return new BPromise(function(_0xd6736a,_0x98bcdb){return client[_0xa674('0xa')](_0x20477c,_0x5b8b64)['then'](function(_0x2fecaa){logger[_0xa674('0xb')](_0xa674('0xc'),_0x5c1493,_0xa674('0xd'));logger[_0xa674('0xe')](_0xa674('0xf'),_0x5c1493,_0xa674('0xd'),JSON[_0xa674('0x10')](_0x2fecaa));if(_0x2fecaa['error']){if(_0x2fecaa['error'][_0xa674('0x11')]===0x1f4){logger[_0xa674('0x12')](_0xa674('0xc'),_0x5c1493,_0x2fecaa[_0xa674('0x12')][_0xa674('0x13')]);return _0x98bcdb(_0x2fecaa['error']['message']);}logger['error'](_0xa674('0xc'),_0x5c1493,_0x2fecaa['error'][_0xa674('0x13')]);return _0xd6736a(_0x2fecaa['error'][_0xa674('0x13')]);}else{logger[_0xa674('0xb')](_0xa674('0xc'),_0x5c1493,_0xa674('0xd'));_0xd6736a(_0x2fecaa[_0xa674('0x14')][_0xa674('0x13')]);}})[_0xa674('0x15')](function(_0x221784){logger[_0xa674('0x12')]('ChatOfflineMessage,\x20%s,\x20%s',_0x5c1493,_0x221784);_0x98bcdb(_0x221784);});});} \ No newline at end of file diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js index e7470fc..d6bb801 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 _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 +var _0x18af=['express','Router','fs-extra','../../config/environment','get','/describe','describe','show','post','isAuthenticated','create','/:id','update','delete','destroy','exports','multer','connect-timeout'];(function(_0x3dde40,_0x4e105f){var _0x2dd7d0=function(_0x334a5b){while(--_0x334a5b){_0x3dde40['push'](_0x3dde40['shift']());}};_0x2dd7d0(++_0x4e105f);}(_0x18af,0x10c));var _0xf18a=function(_0x212d35,_0x4c2bff){_0x212d35=_0x212d35-0x0;var _0x3031f6=_0x18af[_0x212d35];return _0x3031f6;};'use strict';var multer=require(_0xf18a('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xf18a('0x1'));var express=require(_0xf18a('0x2'));var router=express[_0xf18a('0x3')]();var fs_extra=require(_0xf18a('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xf18a('0x5'));var controller=require('./chatOfflineMessage.controller');router[_0xf18a('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xf18a('0x6')](_0xf18a('0x7'),auth['isAuthenticated'](),controller[_0xf18a('0x8')]);router[_0xf18a('0x6')]('/:id',auth['isAuthenticated'](),controller[_0xf18a('0x9')]);router[_0xf18a('0xa')]('/',auth[_0xf18a('0xb')](),controller[_0xf18a('0xc')]);router['put'](_0xf18a('0xd'),auth[_0xf18a('0xb')](),controller[_0xf18a('0xe')]);router[_0xf18a('0xf')](_0xf18a('0xd'),auth[_0xf18a('0xb')](),controller[_0xf18a('0x10')]);module[_0xf18a('0x11')]=router; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js index f5f4f36..0fdde5f 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 _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 +var _0x2da9=['mouseOver','INTEGER','STRING','ENUM'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2da9,0x16a));var _0x92da=function(_0xac1751,_0x4acba3){_0xac1751=_0xac1751-0x0;var _0x2cc732=_0x2da9[_0xac1751];return _0x2cc732;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x92da('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x92da('0x1')](_0x92da('0x2'),'timeout'),'defaultValue':_0x92da('0x2')},'selector':{'type':Sequelize[_0x92da('0x0')]},'timeout':{'type':Sequelize[_0x92da('0x3')]}}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js index 76bb2bf..808f923 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 _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 +var _0x4be6=['keys','query','filters','attributes','length','include','merge','options','ChatProactiveAction','find','then','catch','body','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','to-csv','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','apply','reject','save','update','destroy','end','sendStatus','stack','name','params','model'];(function(_0xcc1ee0,_0x2b3989){var _0x2338dd=function(_0x4dc4b7){while(--_0x4dc4b7){_0xcc1ee0['push'](_0xcc1ee0['shift']());}};_0x2338dd(++_0x2b3989);}(_0x4be6,0xb5));var _0x64be=function(_0x149de2,_0x5cbeec){_0x149de2=_0x149de2-0x0;var _0x59ffeb=_0x4be6[_0x149de2];return _0x59ffeb;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x64be('0x0'));var zipdir=require(_0x64be('0x1'));var jsonpatch=require(_0x64be('0x2'));var rp=require(_0x64be('0x3'));var moment=require(_0x64be('0x4'));var BPromise=require(_0x64be('0x5'));var Mustache=require(_0x64be('0x6'));var util=require(_0x64be('0x7'));var path=require(_0x64be('0x8'));var sox=require(_0x64be('0x9'));var csv=require('to-csv');var ejs=require(_0x64be('0xa'));var fs=require('fs');var fs_extra=require(_0x64be('0xb'));var _=require(_0x64be('0xc'));var squel=require('squel');var crypto=require(_0x64be('0xd'));var jsforce=require(_0x64be('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x64be('0xf'));var querystring=require('querystring');var Papa=require(_0x64be('0x10'));var Redis=require(_0x64be('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x64be('0x12'));var as=require(_0x64be('0x13'));var hardwareService=require(_0x64be('0x14'));var logger=require(_0x64be('0x15'))('api');var utils=require(_0x64be('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x64be('0x17'));var db=require(_0x64be('0x18'))['db'];function respondWithStatusCode(_0x31d09b,_0x24c80a){_0x24c80a=_0x24c80a||0xcc;return function(_0x1fb6c7){if(_0x1fb6c7){return _0x31d09b['sendStatus'](_0x24c80a);}return _0x31d09b[_0x64be('0x19')](_0x24c80a)['end']();};}function respondWithResult(_0x6cf582,_0x15e400){_0x15e400=_0x15e400||0xc8;return function(_0x28ffc8){if(_0x28ffc8){return _0x6cf582[_0x64be('0x19')](_0x15e400)[_0x64be('0x1a')](_0x28ffc8);}};}function respondWithFilteredResult(_0x507bca,_0x54f8a9){return function(_0x87036e){if(_0x87036e){var _0xd53297=typeof _0x54f8a9[_0x64be('0x1b')]===_0x64be('0x1c')&&typeof _0x54f8a9[_0x64be('0x1d')]==='undefined';var _0x2093a9=_0x87036e[_0x64be('0x1e')];var _0x40bd2a=_0xd53297?0x0:_0x54f8a9['offset'];var _0x24deed=_0xd53297?_0x87036e[_0x64be('0x1e')]:_0x54f8a9[_0x64be('0x1b')]+_0x54f8a9[_0x64be('0x1d')];var _0x52268d;if(_0x24deed>=_0x2093a9){_0x24deed=_0x2093a9;_0x52268d=0xc8;}else{_0x52268d=0xce;}_0x507bca[_0x64be('0x19')](_0x52268d);return _0x507bca[_0x64be('0x1f')]('Content-Range',_0x40bd2a+'-'+_0x24deed+'/'+_0x2093a9)[_0x64be('0x1a')](_0x87036e);}return null;};}function patchUpdates(_0x4cb781){return function(_0x3b67ce){try{jsonpatch[_0x64be('0x20')](_0x3b67ce,_0x4cb781,!![]);}catch(_0x1be2cd){return BPromise[_0x64be('0x21')](_0x1be2cd);}return _0x3b67ce[_0x64be('0x22')]();};}function saveUpdates(_0x2a72c6,_0x482fb1){return function(_0x260d70){if(_0x260d70){return _0x260d70[_0x64be('0x23')](_0x2a72c6)['then'](function(_0x455090){return _0x455090;});}return null;};}function removeEntity(_0x5acddc,_0x16e37c){return function(_0x5b1439){if(_0x5b1439){return _0x5b1439[_0x64be('0x24')]()['then'](function(){_0x5acddc[_0x64be('0x19')](0xcc)[_0x64be('0x25')]();});}};}function handleEntityNotFound(_0x5c9fe1,_0x4f0f86){return function(_0x18ce35){if(!_0x18ce35){_0x5c9fe1[_0x64be('0x26')](0x194);}return _0x18ce35;};}function handleError(_0x4857b1,_0x5d53b6){_0x5d53b6=_0x5d53b6||0x1f4;return function(_0x591486){logger['error'](_0x591486[_0x64be('0x27')]);if(_0x591486['name']){delete _0x591486[_0x64be('0x28')];}_0x4857b1[_0x64be('0x19')](_0x5d53b6)['send'](_0x591486);};}exports['show']=function(_0x423d08,_0x5854c7){var _0x3de2ea={'raw':!![],'where':{'id':_0x423d08[_0x64be('0x29')]['id']}},_0x1e5827={};_0x1e5827[_0x64be('0x2a')]=_[_0x64be('0x2b')](db['ChatProactiveAction']['rawAttributes']);_0x1e5827[_0x64be('0x2c')]=_['keys'](_0x423d08[_0x64be('0x2c')]);_0x1e5827[_0x64be('0x2d')]=_['intersection'](_0x1e5827[_0x64be('0x2a')],_0x1e5827[_0x64be('0x2c')]);_0x3de2ea[_0x64be('0x2e')]=_['intersection'](_0x1e5827[_0x64be('0x2a')],qs['fields'](_0x423d08[_0x64be('0x2c')]['fields']));_0x3de2ea['attributes']=_0x3de2ea[_0x64be('0x2e')][_0x64be('0x2f')]?_0x3de2ea[_0x64be('0x2e')]:_0x1e5827[_0x64be('0x2a')];if(_0x423d08['query']['includeAll']){_0x3de2ea[_0x64be('0x30')]=[{'all':!![]}];}_0x3de2ea=_[_0x64be('0x31')]({},_0x3de2ea,_0x423d08[_0x64be('0x32')]);return db[_0x64be('0x33')][_0x64be('0x34')](_0x3de2ea)[_0x64be('0x35')](handleEntityNotFound(_0x5854c7,null))[_0x64be('0x35')](respondWithResult(_0x5854c7,null))[_0x64be('0x36')](handleError(_0x5854c7,null));};exports['create']=function(_0x5330a6,_0x43bd13){return db[_0x64be('0x33')]['create'](_0x5330a6[_0x64be('0x37')],{})['then'](respondWithResult(_0x43bd13,0xc9))[_0x64be('0x36')](handleError(_0x43bd13,null));};exports[_0x64be('0x23')]=function(_0x47d35f,_0x4833d6){if(_0x47d35f[_0x64be('0x37')]['id']){delete _0x47d35f[_0x64be('0x37')]['id'];}return db['ChatProactiveAction'][_0x64be('0x34')]({'where':{'id':_0x47d35f[_0x64be('0x29')]['id']}})[_0x64be('0x35')](handleEntityNotFound(_0x4833d6,null))['then'](saveUpdates(_0x47d35f['body'],null))['then'](respondWithResult(_0x4833d6,null))[_0x64be('0x36')](handleError(_0x4833d6,null));};exports['destroy']=function(_0x4f7f32,_0x571bb9){return db[_0x64be('0x33')][_0x64be('0x34')]({'where':{'id':_0x4f7f32['params']['id']}})[_0x64be('0x35')](handleEntityNotFound(_0x571bb9,null))[_0x64be('0x35')](removeEntity(_0x571bb9,null))[_0x64be('0x36')](handleError(_0x571bb9,null));}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js index 640775e..7364484 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 _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 +var _0x0e11=['exports','ChatProactiveAction','chat_proactive_actions','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment'];(function(_0x516ee9,_0x4db775){var _0x3c6b6b=function(_0x1ceef9){while(--_0x1ceef9){_0x516ee9['push'](_0x516ee9['shift']());}};_0x3c6b6b(++_0x4db775);}(_0x0e11,0x1dc));var _0x10e1=function(_0x5d218b,_0x57743b){_0x5d218b=_0x5d218b-0x0;var _0x20a9ef=_0x0e11[_0x5d218b];return _0x20a9ef;};'use strict';var _=require(_0x10e1('0x0'));var util=require(_0x10e1('0x1'));var logger=require(_0x10e1('0x2'))(_0x10e1('0x3'));var moment=require(_0x10e1('0x4'));var BPromise=require(_0x10e1('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x10e1('0x6'));var rimraf=require('rimraf');var config=require(_0x10e1('0x7'));var attributes=require('./chatProactiveAction.attributes');module[_0x10e1('0x8')]=function(_0x583763,_0x51c784){return _0x583763['define'](_0x10e1('0x9'),attributes,{'tableName':_0x10e1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js index 2c3a2e5..3879986 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 _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 +var _0xbbd9=['util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash'];(function(_0x53afe9,_0x2c9f40){var _0x396396=function(_0x1f574d){while(--_0x1f574d){_0x53afe9['push'](_0x53afe9['shift']());}};_0x396396(++_0x2c9f40);}(_0xbbd9,0xa7));var _0x9bbd=function(_0x40e854,_0x42f1f6){_0x40e854=_0x40e854-0x0;var _0x1463b3=_0xbbd9[_0x40e854];return _0x1463b3;};'use strict';var _=require(_0x9bbd('0x0'));var util=require(_0x9bbd('0x1'));var moment=require('moment');var BPromise=require(_0x9bbd('0x2'));var rs=require(_0x9bbd('0x3'));var fs=require('fs');var Redis=require(_0x9bbd('0x4'));var db=require(_0x9bbd('0x5'))['db'];var utils=require(_0x9bbd('0x6'));var logger=require(_0x9bbd('0x7'))(_0x9bbd('0x8'));var config=require('../../config/environment');var jayson=require(_0x9bbd('0x9'));var client=jayson[_0x9bbd('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5998c8,_0x393a8c,_0x41a3e6){return new BPromise(function(_0x31f777,_0x2e926b){return client['request'](_0x5998c8,_0x41a3e6)['then'](function(_0x213d68){logger[_0x9bbd('0xb')](_0x9bbd('0xc'),_0x393a8c,_0x9bbd('0xd'));logger[_0x9bbd('0xe')](_0x9bbd('0xf'),_0x393a8c,_0x9bbd('0xd'),JSON['stringify'](_0x213d68));if(_0x213d68['error']){if(_0x213d68[_0x9bbd('0x10')][_0x9bbd('0x11')]===0x1f4){logger[_0x9bbd('0x10')](_0x9bbd('0xc'),_0x393a8c,_0x213d68[_0x9bbd('0x10')][_0x9bbd('0x12')]);return _0x2e926b(_0x213d68[_0x9bbd('0x10')][_0x9bbd('0x12')]);}logger[_0x9bbd('0x10')](_0x9bbd('0xc'),_0x393a8c,_0x213d68[_0x9bbd('0x10')][_0x9bbd('0x12')]);return _0x31f777(_0x213d68[_0x9bbd('0x10')][_0x9bbd('0x12')]);}else{logger[_0x9bbd('0xb')]('ChatProactiveAction,\x20%s,\x20%s',_0x393a8c,'request\x20sent');_0x31f777(_0x213d68[_0x9bbd('0x13')][_0x9bbd('0x12')]);}})[_0x9bbd('0x14')](function(_0x2aebde){logger[_0x9bbd('0x10')](_0x9bbd('0xc'),_0x393a8c,_0x2aebde);_0x2e926b(_0x2aebde);});});} \ No newline at end of file diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js index 93df522..5b0c616 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 _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 +var _0xa630=['/:id','show','post','isAuthenticated','create','put','update','delete','destroy','exports','multer','util','express','fs-extra','../../components/interaction/service','../../config/environment','./chatProactiveAction.controller','get'];(function(_0xd45b6d,_0x1e4fde){var _0x105dc1=function(_0x58cdfd){while(--_0x58cdfd){_0xd45b6d['push'](_0xd45b6d['shift']());}};_0x105dc1(++_0x1e4fde);}(_0xa630,0xbe));var _0x0a63=function(_0x306fe8,_0x3aa547){_0x306fe8=_0x306fe8-0x0;var _0x1ba285=_0xa630[_0x306fe8];return _0x1ba285;};'use strict';var multer=require(_0x0a63('0x0'));var util=require(_0x0a63('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x0a63('0x2'));var router=express['Router']();var fs_extra=require(_0x0a63('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x0a63('0x4'));var config=require(_0x0a63('0x5'));var controller=require(_0x0a63('0x6'));router[_0x0a63('0x7')](_0x0a63('0x8'),auth['isAuthenticated'](),controller[_0x0a63('0x9')]);router[_0x0a63('0xa')]('/',auth[_0x0a63('0xb')](),controller[_0x0a63('0xc')]);router[_0x0a63('0xd')](_0x0a63('0x8'),auth['isAuthenticated'](),controller[_0x0a63('0xe')]);router[_0x0a63('0xf')](_0x0a63('0x8'),auth[_0x0a63('0xb')](),controller[_0x0a63('0x10')]);module[_0x0a63('0x11')]=router; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js index 54496fe..2443ea3 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 _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 +var _0x77a6=['rrmemory','roundrobin','sequelize','name','STRING','INTEGER'];(function(_0xfa236a,_0x14171a){var _0x57af3b=function(_0x1125b6){while(--_0x1125b6){_0xfa236a['push'](_0xfa236a['shift']());}};_0x57af3b(++_0x14171a);}(_0x77a6,0x74));var _0x677a=function(_0x36f4a5,_0x6d7aa4){_0x36f4a5=_0x36f4a5-0x0;var _0x2877b9=_0x77a6[_0x36f4a5];return _0x2877b9;};'use strict';var Sequelize=require(_0x677a('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x677a('0x1'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x677a('0x2')]},'timeout':{'type':Sequelize[_0x677a('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x677a('0x4'),'beepall',_0x677a('0x5'))}}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js index b65fcd0..aa1d7a8 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 _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 +var _0xd96f=['defaults','redis','localhost','socket.io-emitter','register','jayson/promise','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','status','end','json','undefined','offset','count','Content-Range','apply','reject','save','update','get','UserProfileResource','destroy','stack','name','send','index','map','ChatQueue','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','ChatQueues','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','findOne','UserChatQueue','ChatQueueId','User','findAndCountAll','updatedAt','createdAt','format','SIP','chatPause','getTeams','Team','ids','Agents','online','voicePause','interface','flatMap','sequelize','addTeams','each','forEach','emit','removeTeams','select','field','from','team_has_chat_queues','join','user_has_teams','ChatQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','every','TeamId','all','compact','transaction','isEmpty','removeAgents','userChatQueue:remove','addAgents','omit','spread','userChatQueue:save','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','jsforce','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util'];(function(_0x1b7368,_0x3286ed){var _0x25d54c=function(_0x2366da){while(--_0x2366da){_0x1b7368['push'](_0x1b7368['shift']());}};_0x25d54c(++_0x3286ed);}(_0xd96f,0x7e));var _0xfd96=function(_0x1c81b2,_0x2ce306){_0x1c81b2=_0x1c81b2-0x0;var _0x22d333=_0xd96f[_0x1c81b2];return _0x22d333;};'use strict';var emlformat=require(_0xfd96('0x0'));var rimraf=require(_0xfd96('0x1'));var zipdir=require(_0xfd96('0x2'));var jsonpatch=require(_0xfd96('0x3'));var rp=require(_0xfd96('0x4'));var moment=require(_0xfd96('0x5'));var BPromise=require(_0xfd96('0x6'));var Mustache=require(_0xfd96('0x7'));var util=require(_0xfd96('0x8'));var path=require(_0xfd96('0x9'));var sox=require(_0xfd96('0xa'));var csv=require(_0xfd96('0xb'));var ejs=require(_0xfd96('0xc'));var fs=require('fs');var fs_extra=require(_0xfd96('0xd'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xfd96('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xfd96('0xb'));var querystring=require(_0xfd96('0xf'));var Papa=require('papaparse');var Redis=require(_0xfd96('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xfd96('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfd96('0x12'));var logger=require(_0xfd96('0x13'))(_0xfd96('0x14'));var utils=require('../../config/utils');var config=require(_0xfd96('0x15'));var licenseUtil=require(_0xfd96('0x16'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xfd96('0x17')](config[_0xfd96('0x18')],{'host':_0xfd96('0x19'),'port':0x18eb});var socket=require(_0xfd96('0x1a'))(new Redis(config[_0xfd96('0x18')]));require('./chatQueue.socket')[_0xfd96('0x1b')](socket);var jayson=require(_0xfd96('0x1c'));var client=jayson[_0xfd96('0x1d')][_0xfd96('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0xbd8fe0,_0x35291d,_0x3d20eb,_0x1145aa){return new BPromise(function(_0x38e6a9,_0x25578e){var _0x44d124=_0x1145aa||client;return _0x44d124[_0xfd96('0x1f')](_0xbd8fe0,_0x3d20eb)[_0xfd96('0x20')](function(_0x345068){logger[_0xfd96('0x21')](_0xfd96('0x22'),_0x35291d,_0xfd96('0x23'));logger[_0xfd96('0x24')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x35291d,_0xfd96('0x23'),JSON[_0xfd96('0x25')](_0x345068));if(_0x345068[_0xfd96('0x26')]){if(_0x345068[_0xfd96('0x26')][_0xfd96('0x27')]===0x1f4){logger['error'](_0xfd96('0x22'),_0x35291d,_0x345068['error'][_0xfd96('0x28')]);return _0x25578e(_0x345068[_0xfd96('0x26')][_0xfd96('0x28')]);}logger[_0xfd96('0x26')]('ChatQueue,\x20%s,\x20%s',_0x35291d,_0x345068[_0xfd96('0x26')]['message']);return _0x38e6a9(_0x345068[_0xfd96('0x26')][_0xfd96('0x28')]);}else{logger[_0xfd96('0x21')](_0xfd96('0x22'),_0x35291d,_0xfd96('0x23'));_0x38e6a9(_0x345068[_0xfd96('0x29')][_0xfd96('0x28')]);}})[_0xfd96('0x2a')](function(_0x52ae02){logger[_0xfd96('0x26')](_0xfd96('0x22'),_0x35291d,_0x52ae02);_0x25578e(_0x52ae02);});});}function respondWithStatusCode(_0x326781,_0x330576){_0x330576=_0x330576||0xcc;return function(_0x4d575a){if(_0x4d575a){return _0x326781[_0xfd96('0x2b')](_0x330576);}return _0x326781[_0xfd96('0x2c')](_0x330576)[_0xfd96('0x2d')]();};}function respondWithResult(_0x26ed8b,_0x119f69){_0x119f69=_0x119f69||0xc8;return function(_0x3ef9e3){if(_0x3ef9e3){return _0x26ed8b['status'](_0x119f69)[_0xfd96('0x2e')](_0x3ef9e3);}};}function respondWithFilteredResult(_0x35a58c,_0x14f35a){return function(_0x1b1f31){if(_0x1b1f31){var _0xa5f5cf=typeof _0x14f35a['offset']===_0xfd96('0x2f')&&typeof _0x14f35a['limit']===_0xfd96('0x2f');var _0x74605=_0x1b1f31['count'];var _0x5eaa07=_0xa5f5cf?0x0:_0x14f35a[_0xfd96('0x30')];var _0x50bd07=_0xa5f5cf?_0x1b1f31[_0xfd96('0x31')]:_0x14f35a[_0xfd96('0x30')]+_0x14f35a['limit'];var _0x2e3ae8;if(_0x50bd07>=_0x74605){_0x50bd07=_0x74605;_0x2e3ae8=0xc8;}else{_0x2e3ae8=0xce;}_0x35a58c[_0xfd96('0x2c')](_0x2e3ae8);return _0x35a58c['set'](_0xfd96('0x32'),_0x5eaa07+'-'+_0x50bd07+'/'+_0x74605)[_0xfd96('0x2e')](_0x1b1f31);}return null;};}function patchUpdates(_0x351a6f){return function(_0xd8d26e){try{jsonpatch[_0xfd96('0x33')](_0xd8d26e,_0x351a6f,!![]);}catch(_0x26ea77){return BPromise[_0xfd96('0x34')](_0x26ea77);}return _0xd8d26e[_0xfd96('0x35')]();};}function saveUpdates(_0x186c0a,_0x2c18df){return function(_0x655040){if(_0x655040){return _0x655040[_0xfd96('0x36')](_0x186c0a)['then'](function(_0x409db7){return _0x409db7;});}return null;};}function removeEntity(_0x5a831d,_0x34020d){return function(_0x3039c0){if(_0x3039c0){return _0x3039c0['destroy']()['then'](function(){var _0x209f5e=_0x3039c0[_0xfd96('0x37')]({'plain':!![]});var _0xcc0f71='ChatQueues';return db[_0xfd96('0x38')][_0xfd96('0x39')]({'where':{'type':_0xcc0f71,'resourceId':_0x209f5e['id']}})[_0xfd96('0x20')](function(){return _0x3039c0;});})[_0xfd96('0x20')](function(){_0x5a831d[_0xfd96('0x2c')](0xcc)[_0xfd96('0x2d')]();});}};}function handleEntityNotFound(_0x5af714,_0x2f2639){return function(_0x205386){if(!_0x205386){_0x5af714['sendStatus'](0x194);}return _0x205386;};}function handleError(_0x40e161,_0x2a39f6){_0x2a39f6=_0x2a39f6||0x1f4;return function(_0x573d0d){logger[_0xfd96('0x26')](_0x573d0d[_0xfd96('0x3a')]);if(_0x573d0d[_0xfd96('0x3b')]){delete _0x573d0d[_0xfd96('0x3b')];}_0x40e161[_0xfd96('0x2c')](_0x2a39f6)[_0xfd96('0x3c')](_0x573d0d);};}exports[_0xfd96('0x3d')]=function(_0x1473f4,_0x42c4c0){var _0x16a105={},_0x4ea18={},_0x4643d4={'count':0x0,'rows':[]};var _0x4aa02c=_[_0xfd96('0x3e')](db[_0xfd96('0x3f')]['rawAttributes'],function(_0x5d87f8){return{'name':_0x5d87f8[_0xfd96('0x40')],'type':_0x5d87f8[_0xfd96('0x41')]['key']};});_0x4ea18[_0xfd96('0x42')]=_[_0xfd96('0x3e')](_0x4aa02c,'name');_0x4ea18[_0xfd96('0x43')]=_[_0xfd96('0x44')](_0x1473f4['query']);_0x4ea18[_0xfd96('0x45')]=_[_0xfd96('0x46')](_0x4ea18[_0xfd96('0x42')],_0x4ea18[_0xfd96('0x43')]);_0x16a105[_0xfd96('0x47')]=_[_0xfd96('0x46')](_0x4ea18[_0xfd96('0x42')],qs[_0xfd96('0x48')](_0x1473f4[_0xfd96('0x43')][_0xfd96('0x48')]));_0x16a105[_0xfd96('0x47')]=_0x16a105[_0xfd96('0x47')][_0xfd96('0x49')]?_0x16a105[_0xfd96('0x47')]:_0x4ea18[_0xfd96('0x42')];if(!_0x1473f4[_0xfd96('0x43')][_0xfd96('0x4a')](_0xfd96('0x4b'))){_0x16a105[_0xfd96('0x4c')]=qs[_0xfd96('0x4c')](_0x1473f4['query'][_0xfd96('0x4c')]);_0x16a105[_0xfd96('0x30')]=qs[_0xfd96('0x30')](_0x1473f4[_0xfd96('0x43')]['offset']);}_0x16a105[_0xfd96('0x4d')]=qs['sort'](_0x1473f4[_0xfd96('0x43')][_0xfd96('0x4e')]);_0x16a105[_0xfd96('0x4f')]=qs[_0xfd96('0x45')](_[_0xfd96('0x50')](_0x1473f4['query'],_0x4ea18['filters']),_0x4aa02c);if(_0x1473f4[_0xfd96('0x43')]['filter']){_0x16a105[_0xfd96('0x4f')]=_[_0xfd96('0x51')](_0x16a105[_0xfd96('0x4f')],{'$or':_[_0xfd96('0x3e')](_0x4aa02c,function(_0x544ec0){if(_0x544ec0[_0xfd96('0x41')]!=='VIRTUAL'){var _0x4809d8={};_0x4809d8[_0x544ec0['name']]={'$like':'%'+_0x1473f4[_0xfd96('0x43')][_0xfd96('0x52')]+'%'};return _0x4809d8;}})});}_0x16a105=_[_0xfd96('0x51')]({},_0x16a105,_0x1473f4[_0xfd96('0x53')]);var _0x55b5eb={'where':_0x16a105[_0xfd96('0x4f')]};return db[_0xfd96('0x3f')][_0xfd96('0x31')](_0x55b5eb)[_0xfd96('0x20')](function(_0x20f082){_0x4643d4[_0xfd96('0x31')]=_0x20f082;if(_0x1473f4['query'][_0xfd96('0x54')]){_0x16a105[_0xfd96('0x55')]=[{'all':!![]}];}return db[_0xfd96('0x3f')][_0xfd96('0x56')](_0x16a105);})['then'](function(_0x337e97){_0x4643d4[_0xfd96('0x57')]=_0x337e97;return _0x4643d4;})['then'](respondWithFilteredResult(_0x42c4c0,_0x16a105))[_0xfd96('0x2a')](handleError(_0x42c4c0,null));};exports[_0xfd96('0x58')]=function(_0x17000a,_0x302275){var _0x41764a={'raw':!![],'where':{'id':_0x17000a[_0xfd96('0x59')]['id']}},_0x251d36={};_0x251d36['model']=_[_0xfd96('0x44')](db[_0xfd96('0x3f')][_0xfd96('0x5a')]);_0x251d36['query']=_[_0xfd96('0x44')](_0x17000a[_0xfd96('0x43')]);_0x251d36[_0xfd96('0x45')]=_[_0xfd96('0x46')](_0x251d36['model'],_0x251d36[_0xfd96('0x43')]);_0x41764a[_0xfd96('0x47')]=_[_0xfd96('0x46')](_0x251d36[_0xfd96('0x42')],qs[_0xfd96('0x48')](_0x17000a[_0xfd96('0x43')]['fields']));_0x41764a[_0xfd96('0x47')]=_0x41764a[_0xfd96('0x47')][_0xfd96('0x49')]?_0x41764a[_0xfd96('0x47')]:_0x251d36[_0xfd96('0x42')];if(_0x17000a[_0xfd96('0x43')][_0xfd96('0x54')]){_0x41764a['include']=[{'all':!![]}];}_0x41764a=_[_0xfd96('0x51')]({},_0x41764a,_0x17000a[_0xfd96('0x53')]);return db[_0xfd96('0x3f')][_0xfd96('0x5b')](_0x41764a)['then'](handleEntityNotFound(_0x302275,null))['then'](respondWithResult(_0x302275,null))[_0xfd96('0x2a')](handleError(_0x302275,null));};exports['create']=function(_0x206025,_0x45d016){return db[_0xfd96('0x3f')][_0xfd96('0x5c')](_0x206025['body'],{})[_0xfd96('0x20')](function(_0x21d6b6){var _0x41ada2=_0x206025['user'][_0xfd96('0x37')]({'plain':!![]});if(!_0x41ada2)throw new Error(_0xfd96('0x5d'));if(_0x41ada2[_0xfd96('0x5e')]==='user'){var _0x17b16b=_0x21d6b6[_0xfd96('0x37')]({'plain':!![]});var _0x5dd63c=_0xfd96('0x5f');return db[_0xfd96('0x60')][_0xfd96('0x5b')]({'where':{'name':_0x5dd63c,'userProfileId':_0x41ada2['userProfileId']},'raw':!![]})[_0xfd96('0x20')](function(_0x42dea2){if(_0x42dea2&&_0x42dea2['autoAssociation']===0x0){return db[_0xfd96('0x38')][_0xfd96('0x5c')]({'name':_0x17b16b[_0xfd96('0x3b')],'resourceId':_0x17b16b['id'],'type':_0x42dea2[_0xfd96('0x3b')],'sectionId':_0x42dea2['id']},{})[_0xfd96('0x20')](function(){return _0x21d6b6;});}else{return _0x21d6b6;}})[_0xfd96('0x2a')](function(_0x41e4f4){logger[_0xfd96('0x26')](_0xfd96('0x61'),_0x41e4f4);throw _0x41e4f4;});}return _0x21d6b6;})[_0xfd96('0x20')](respondWithResult(_0x45d016,0xc9))[_0xfd96('0x2a')](handleError(_0x45d016,null));};exports[_0xfd96('0x36')]=function(_0x18a632,_0x4a831d){if(_0x18a632[_0xfd96('0x62')]['id']){delete _0x18a632[_0xfd96('0x62')]['id'];}return db[_0xfd96('0x3f')][_0xfd96('0x5b')]({'where':{'id':_0x18a632[_0xfd96('0x59')]['id']}})[_0xfd96('0x20')](handleEntityNotFound(_0x4a831d,null))[_0xfd96('0x20')](saveUpdates(_0x18a632[_0xfd96('0x62')],null))[_0xfd96('0x20')](respondWithResult(_0x4a831d,null))[_0xfd96('0x2a')](handleError(_0x4a831d,null));};exports[_0xfd96('0x39')]=function(_0x5c2c75,_0x607dcc){return db[_0xfd96('0x3f')][_0xfd96('0x5b')]({'where':{'id':_0x5c2c75[_0xfd96('0x59')]['id']}})['then'](handleEntityNotFound(_0x607dcc,null))[_0xfd96('0x20')](removeEntity(_0x607dcc,null))[_0xfd96('0x2a')](handleError(_0x607dcc,null));};exports[_0xfd96('0x63')]=function(_0x4a5e70,_0x368f61){return db['ChatQueue'][_0xfd96('0x63')]()[_0xfd96('0x20')](respondWithResult(_0x368f61,null))[_0xfd96('0x2a')](handleError(_0x368f61,null));};exports['getMembers']=function(_0x4f4518,_0x32495c,_0x3c6a3b){var _0x376249={'raw':!![],'where':{}},_0x4a58e9={},_0x4fca20;return db['ChatQueue'][_0xfd96('0x64')]({'where':{'id':_0x4f4518['params']['id']}})[_0xfd96('0x20')](handleEntityNotFound(_0x32495c,null))[_0xfd96('0x20')](function(_0x1980c2){if(_0x1980c2){_0x4fca20=_0x1980c2[_0xfd96('0x37')]({'plain':!![]});_0x4a58e9[_0xfd96('0x42')]=_[_0xfd96('0x44')](db[_0xfd96('0x65')]['rawAttributes']);_0x4a58e9[_0xfd96('0x43')]=_[_0xfd96('0x44')](_0x4f4518[_0xfd96('0x43')]);_0x4a58e9[_0xfd96('0x45')]=_[_0xfd96('0x46')](_0x4a58e9[_0xfd96('0x42')],_0x4a58e9[_0xfd96('0x43')]);_0x376249[_0xfd96('0x47')]=_[_0xfd96('0x46')](_0x4a58e9[_0xfd96('0x42')],qs[_0xfd96('0x48')](_0x4f4518['query'][_0xfd96('0x48')]));_0x376249[_0xfd96('0x47')]=_0x376249[_0xfd96('0x47')][_0xfd96('0x49')]?_0x376249['attributes']:_0x4a58e9[_0xfd96('0x42')];if(!_0x4f4518[_0xfd96('0x43')][_0xfd96('0x4a')](_0xfd96('0x4b'))){_0x376249[_0xfd96('0x4c')]=qs[_0xfd96('0x4c')](_0x4f4518[_0xfd96('0x43')][_0xfd96('0x4c')]);_0x376249[_0xfd96('0x30')]=qs['offset'](_0x4f4518[_0xfd96('0x43')][_0xfd96('0x30')]);}_0x376249[_0xfd96('0x4d')]=qs[_0xfd96('0x4e')](_0x4f4518[_0xfd96('0x43')][_0xfd96('0x4e')]);_0x376249[_0xfd96('0x4f')]=qs['filters'](_[_0xfd96('0x50')](_0x4f4518[_0xfd96('0x43')],_0x4a58e9['filters']));_0x376249[_0xfd96('0x4f')][_0xfd96('0x66')]=_0x1980c2['id'];if(_0x4f4518[_0xfd96('0x43')]['filter']){_0x376249[_0xfd96('0x4f')]=_[_0xfd96('0x51')](_0x376249['where'],{'$or':_[_0xfd96('0x3e')](_0x376249[_0xfd96('0x47')],function(_0xa81e0b){var _0x5bb034={};_0x5bb034[_0xa81e0b]={'$like':'%'+_0x4f4518[_0xfd96('0x43')][_0xfd96('0x52')]+'%'};return _0x5bb034;})});}_0x376249=_[_0xfd96('0x51')]({},_0x376249,_0x4f4518[_0xfd96('0x53')]);return db['UserChatQueue'][_0xfd96('0x56')](_0x376249);}})[_0xfd96('0x20')](function(_0x3563b1){if(_0x3563b1){return db[_0xfd96('0x67')][_0xfd96('0x68')]({'where':{'id':_[_0xfd96('0x3e')](_0x3563b1,'UserId'),'role':'agent'},'attributes':['id',_0xfd96('0x3b'),'chatPause',_0xfd96('0x69'),_0xfd96('0x6a')]});}})[_0xfd96('0x20')](function(_0x55a0c5){if(_0x55a0c5){return{'count':_0x55a0c5[_0xfd96('0x31')],'rows':_[_0xfd96('0x3e')](_0x55a0c5['rows'],function(_0x41f083){return{'membername':_0x41f083[_0xfd96('0x3b')],'UserId':_0x41f083['id'],'queue_name':_0x4fca20['name'],'ChatQueueId':_0x4fca20['id'],'interface':util[_0xfd96('0x6b')]('%s/%s',_0xfd96('0x6c'),_0x41f083[_0xfd96('0x3b')]),'penalty':0x0,'paused':_0x41f083[_0xfd96('0x6d')],'createdAt':_0x41f083['createdAt'],'updatedAt':_0x41f083[_0xfd96('0x69')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xfd96('0x20')](respondWithFilteredResult(_0x32495c,_0x376249))[_0xfd96('0x2a')](handleError(_0x32495c,null));};exports[_0xfd96('0x6e')]=function(_0x3369d0,_0x1d2dfe,_0x4cae69){var _0x336c25={};var _0x14252e={};var _0x6bbbb1;var _0x42b713;return db[_0xfd96('0x3f')][_0xfd96('0x64')]({'where':{'id':_0x3369d0[_0xfd96('0x59')]['id']}})[_0xfd96('0x20')](handleEntityNotFound(_0x1d2dfe,null))['then'](function(_0x4b0285){if(_0x4b0285){_0x6bbbb1=_0x4b0285;_0x14252e[_0xfd96('0x42')]=_[_0xfd96('0x44')](db[_0xfd96('0x6f')][_0xfd96('0x5a')]);_0x14252e[_0xfd96('0x43')]=_['keys'](_0x3369d0['query']);_0x14252e[_0xfd96('0x45')]=_[_0xfd96('0x46')](_0x14252e['model'],_0x14252e[_0xfd96('0x43')]);_0x336c25[_0xfd96('0x47')]=_[_0xfd96('0x46')](_0x14252e[_0xfd96('0x42')],qs[_0xfd96('0x48')](_0x3369d0[_0xfd96('0x43')][_0xfd96('0x48')]));_0x336c25[_0xfd96('0x47')]=_0x336c25[_0xfd96('0x47')][_0xfd96('0x49')]?_0x336c25[_0xfd96('0x47')]:_0x14252e[_0xfd96('0x42')];_0x336c25['order']=qs[_0xfd96('0x4e')](_0x3369d0[_0xfd96('0x43')]['sort']);_0x336c25[_0xfd96('0x4f')]=qs[_0xfd96('0x45')](_[_0xfd96('0x50')](_0x3369d0[_0xfd96('0x43')],_0x14252e['filters']));if(_0x3369d0['query']['filter']){_0x336c25[_0xfd96('0x4f')]=_['merge'](_0x336c25[_0xfd96('0x4f')],{'$or':_['map'](_0x336c25[_0xfd96('0x47')],function(_0x9ea4aa){var _0x43dfe6={};_0x43dfe6[_0x9ea4aa]={'$like':'%'+_0x3369d0[_0xfd96('0x43')][_0xfd96('0x52')]+'%'};return _0x43dfe6;})});}_0x336c25=_[_0xfd96('0x51')]({},_0x336c25,_0x3369d0[_0xfd96('0x53')]);return _0x6bbbb1['getTeams'](_0x336c25);}})['then'](function(_0x36be71){if(_0x36be71){_0x42b713=_0x36be71[_0xfd96('0x49')];if(!_0x3369d0['query'][_0xfd96('0x4a')](_0xfd96('0x4b'))){_0x336c25['limit']=qs['limit'](_0x3369d0[_0xfd96('0x43')]['limit']);_0x336c25[_0xfd96('0x30')]=qs['offset'](_0x3369d0[_0xfd96('0x43')][_0xfd96('0x30')]);}return _0x6bbbb1['getTeams'](_0x336c25);}})[_0xfd96('0x20')](function(_0x170ce1){if(_0x170ce1){return _0x170ce1?{'count':_0x42b713,'rows':_0x170ce1}:null;}})[_0xfd96('0x20')](respondWithResult(_0x1d2dfe,null))[_0xfd96('0x2a')](handleError(_0x1d2dfe,null));};exports['addTeams']=function(_0x3b9d40,_0x5866c1,_0x58b396){var _0x32a776=_0x3b9d40[_0xfd96('0x62')][_0xfd96('0x70')];return db[_0xfd96('0x6f')][_0xfd96('0x56')]({'where':{'id':_0x32a776},'attributes':['id'],'include':[{'model':db[_0xfd96('0x67')],'as':_0xfd96('0x71'),'attributes':['id',_0xfd96('0x3b'),_0xfd96('0x72'),_0xfd96('0x73'),_0xfd96('0x74')],'raw':!![]}]})[_0xfd96('0x20')](function(_0x450819){if(_0x450819){var _0x137a52=_[_0xfd96('0x75')](_0x450819,function(_0x3e7ad6){var _0x53087f=_0x3e7ad6[_0xfd96('0x37')]({'plain':!![]});return _0x53087f['Agents'];});return db[_0xfd96('0x3f')]['find']({'where':{'id':_0x3b9d40[_0xfd96('0x59')]['id']}})[_0xfd96('0x20')](function(_0x5ca884){return db[_0xfd96('0x76')]['transaction'](function(_0x45608b){return _0x5ca884[_0xfd96('0x77')](_0x32a776,{'transaction':_0x45608b})[_0xfd96('0x20')](function(){return BPromise[_0xfd96('0x78')](_0x137a52,function(_0x2f29ed){return db[_0xfd96('0x65')]['findOrCreate']({'where':{'UserId':_0x2f29ed['id'],'ChatQueueId':_0x3b9d40[_0xfd96('0x59')]['id']},'transaction':_0x45608b});});})['then'](function(){_0x137a52[_0xfd96('0x79')](function(_0x503eae){socket[_0xfd96('0x7a')]('userChatQueue:save',{'UserId':_0x503eae['id'],'ChatQueueId':_0x5ca884['id']});});});});});}})[_0xfd96('0x20')](respondWithStatusCode(_0x5866c1,null))[_0xfd96('0x2a')](handleError(_0x5866c1,null));};exports[_0xfd96('0x7b')]=function(_0x47d481,_0x555f1c,_0x441052){return db[_0xfd96('0x6f')][_0xfd96('0x56')]({'where':{'id':_0x47d481[_0xfd96('0x43')][_0xfd96('0x70')]},'attributes':['id'],'include':[{'model':db[_0xfd96('0x67')],'as':_0xfd96('0x71'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x555f1c,null))[_0xfd96('0x20')](function(_0x3414d8){var _0xae181f=_['map'](_0x3414d8,'id');var _0x43568e=[];var _0xa82fc=[];var _0x547fc8=squel[_0xfd96('0x7c')]();_0x547fc8[_0xfd96('0x7d')]('tq.TeamId')[_0xfd96('0x7e')](_0xfd96('0x7f'),'tq')[_0xfd96('0x80')](_0xfd96('0x81'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xfd96('0x4f')](_0xfd96('0x82'),_0x47d481[_0xfd96('0x59')]['id']);for(var _0x50491b=0x0;_0x50491b<_0x3414d8[_0xfd96('0x49')];_0x50491b+=0x1){let _0x51eee4=_0x3414d8[_0x50491b];for(var _0x46ea86=0x0;_0x46ea86<_0x51eee4[_0xfd96('0x71')][_0xfd96('0x49')];_0x46ea86+=0x1){let _0x5d4206=_0x51eee4[_0xfd96('0x71')][_0x46ea86];var _0x686a6e=_0x547fc8['clone']();_0x686a6e[_0xfd96('0x4f')](_0xfd96('0x83'),_0x5d4206['id']);_0xa82fc[_0xfd96('0x84')](db[_0xfd96('0x76')][_0xfd96('0x43')](_0x686a6e[_0xfd96('0x85')](),{'type':db['sequelize'][_0xfd96('0x86')]['SELECT']})[_0xfd96('0x20')](function(_0x8cec7d){if(_0x8cec7d['length']===0x1){return _0x5d4206['id'];}else{var _0x12c2ea=_[_0xfd96('0x87')](_[_0xfd96('0x3e')](_0x8cec7d,_0xfd96('0x88')),function(_0x396833){return _['includes'](_0xae181f,_0x396833);});if(_0x12c2ea){return _0x5d4206['id'];}}}));}}return BPromise[_0xfd96('0x89')](_0xa82fc)['then'](function(_0x5a2235){_0x43568e=_(_0x43568e)['union'](_0x5a2235)[_0xfd96('0x8a')]()['value']();return db[_0xfd96('0x3f')]['find']({'where':{'id':_0x47d481['params']['id']}})[_0xfd96('0x20')](function(_0x571648){return db['sequelize'][_0xfd96('0x8b')](function(_0x1bb60c){return _0x571648[_0xfd96('0x7b')](_0x47d481['query'][_0xfd96('0x70')],{'transaction':_0x1bb60c})[_0xfd96('0x20')](function(){if(!_[_0xfd96('0x8c')](_0x43568e)){return _0x571648[_0xfd96('0x8d')](_0x43568e,{'transaction':_0x1bb60c});}})[_0xfd96('0x20')](function(){_0x43568e[_0xfd96('0x79')](function(_0x3a6f3c){socket[_0xfd96('0x7a')](_0xfd96('0x8e'),{'UserId':_0x3a6f3c,'ChatQueueId':_0x571648['id']});});});});});});})['then'](respondWithStatusCode(_0x555f1c,null))['catch'](handleError(_0x555f1c,null));};exports[_0xfd96('0x8f')]=function(_0x3ac710,_0x5a799b,_0x39c3b6){return db[_0xfd96('0x3f')][_0xfd96('0x5b')]({'where':{'id':_0x3ac710['params']['id']}})['then'](handleEntityNotFound(_0x5a799b,null))[_0xfd96('0x20')](function(_0x47d5f6){if(_0x47d5f6){return _0x47d5f6[_0xfd96('0x8f')](_0x3ac710[_0xfd96('0x62')][_0xfd96('0x70')],_[_0xfd96('0x90')](_0x3ac710['body'],[_0xfd96('0x70'),'id'])||{})[_0xfd96('0x91')](function(_0x162b47){for(var _0x3cde5c=0x0;_0x3cde5c<_0x3ac710['body'][_0xfd96('0x70')]['length'];_0x3cde5c+=0x1){socket[_0xfd96('0x7a')](_0xfd96('0x92'),{'UserId':_0x3ac710[_0xfd96('0x62')][_0xfd96('0x70')][_0x3cde5c],'ChatQueueId':_0x3ac710['params']['id']});}return _0x162b47;});}})[_0xfd96('0x20')](respondWithResult(_0x5a799b,null))['catch'](handleError(_0x5a799b,null));};exports[_0xfd96('0x8d')]=function(_0x426e41,_0x189a63,_0xb22d5e){return db[_0xfd96('0x3f')][_0xfd96('0x5b')]({'where':{'id':_0x426e41[_0xfd96('0x59')]['id']}})[_0xfd96('0x20')](handleEntityNotFound(_0x189a63,null))[_0xfd96('0x20')](function(_0x1adc0b){if(_0x1adc0b){return _0x1adc0b[_0xfd96('0x8d')](_0x426e41[_0xfd96('0x43')][_0xfd96('0x70')])[_0xfd96('0x20')](function(){if(_[_0xfd96('0x93')](_0x426e41[_0xfd96('0x43')]['ids'])){for(var _0x134faa=0x0;_0x134faa<_0x426e41[_0xfd96('0x43')][_0xfd96('0x70')]['length'];_0x134faa+=0x1){socket[_0xfd96('0x7a')](_0xfd96('0x8e'),{'UserId':Number(_0x426e41[_0xfd96('0x43')][_0xfd96('0x70')][_0x134faa]),'ChatQueueId':Number(_0x426e41[_0xfd96('0x59')]['id'])});}}else{socket[_0xfd96('0x7a')](_0xfd96('0x8e'),{'UserId':Number(_0x426e41[_0xfd96('0x43')]['ids']),'ChatQueueId':Number(_0x426e41[_0xfd96('0x59')]['id'])});}});}})[_0xfd96('0x20')](respondWithStatusCode(_0x189a63,null))[_0xfd96('0x2a')](handleError(_0x189a63,null));};exports[_0xfd96('0x94')]=function(_0x9213b1,_0x201347,_0x35d373){var _0x59b099={};var _0xf98abd={};var _0x2e415a;var _0x1b76c6;return db[_0xfd96('0x3f')]['findOne']({'where':{'id':_0x9213b1[_0xfd96('0x59')]['id']}})[_0xfd96('0x20')](handleEntityNotFound(_0x201347,null))['then'](function(_0xe5d384){if(_0xe5d384){_0x2e415a=_0xe5d384;_0xf98abd[_0xfd96('0x42')]=_[_0xfd96('0x44')](db[_0xfd96('0x67')][_0xfd96('0x5a')]);_0xf98abd[_0xfd96('0x43')]=_['keys'](_0x9213b1[_0xfd96('0x43')]);_0xf98abd[_0xfd96('0x45')]=_['intersection'](_0xf98abd['model'],_0xf98abd['query']);_0x59b099['attributes']=_[_0xfd96('0x46')](_0xf98abd[_0xfd96('0x42')],qs['fields'](_0x9213b1[_0xfd96('0x43')][_0xfd96('0x48')]));_0x59b099['attributes']=_0x59b099[_0xfd96('0x47')][_0xfd96('0x49')]?_0x59b099[_0xfd96('0x47')]:_0xf98abd[_0xfd96('0x42')];_0x59b099['order']=qs[_0xfd96('0x4e')](_0x9213b1[_0xfd96('0x43')][_0xfd96('0x4e')]);_0x59b099[_0xfd96('0x4f')]=qs[_0xfd96('0x45')](_['pick'](_0x9213b1[_0xfd96('0x43')],_0xf98abd[_0xfd96('0x45')]));if(_0x9213b1[_0xfd96('0x43')][_0xfd96('0x52')]){_0x59b099[_0xfd96('0x4f')]=_[_0xfd96('0x51')](_0x59b099[_0xfd96('0x4f')],{'$or':_[_0xfd96('0x3e')](_0x59b099[_0xfd96('0x47')],function(_0x3844c8){var _0x2d990c={};_0x2d990c[_0x3844c8]={'$like':'%'+_0x9213b1['query']['filter']+'%'};return _0x2d990c;})});}_0x59b099=_[_0xfd96('0x51')]({},_0x59b099,_0x9213b1[_0xfd96('0x53')]);return _0x2e415a['getAgents'](_0x59b099);}})[_0xfd96('0x20')](function(_0x1fff6b){if(_0x1fff6b){_0x1b76c6=_0x1fff6b['length'];if(!_0x9213b1[_0xfd96('0x43')]['hasOwnProperty'](_0xfd96('0x4b'))){_0x59b099['limit']=qs[_0xfd96('0x4c')](_0x9213b1[_0xfd96('0x43')]['limit']);_0x59b099[_0xfd96('0x30')]=qs[_0xfd96('0x30')](_0x9213b1[_0xfd96('0x43')]['offset']);}return _0x2e415a['getAgents'](_0x59b099);}})[_0xfd96('0x20')](function(_0x574e18){if(_0x574e18){return _0x574e18?{'count':_0x1b76c6,'rows':_0x574e18}:null;}})[_0xfd96('0x20')](respondWithResult(_0x201347,null))['catch'](handleError(_0x201347,null));}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js index 93011a4..4db77a7 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 _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 +var _0xc7f4=['hook','exports','events','../../mysqldb','ChatQueue','setMaxListeners','update','emit','hasOwnProperty'];(function(_0x593bca,_0x1b226e){var _0x279ebb=function(_0x138bf6){while(--_0x138bf6){_0x593bca['push'](_0x593bca['shift']());}};_0x279ebb(++_0x1b226e);}(_0xc7f4,0x161));var _0x4c7f=function(_0x150629,_0x508a70){_0x150629=_0x150629-0x0;var _0xa9c7f6=_0xc7f4[_0x150629];return _0xa9c7f6;};'use strict';var EventEmitter=require(_0x4c7f('0x0'));var ChatQueue=require(_0x4c7f('0x1'))['db'][_0x4c7f('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x4c7f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x4c7f('0x4'),'afterDestroy':'remove'};function emitEvent(_0x465405){return function(_0x48dc6f,_0x5e3467,_0xcef2a3){ChatQueueEvents[_0x4c7f('0x5')](_0x465405+':'+_0x48dc6f['id'],_0x48dc6f);ChatQueueEvents[_0x4c7f('0x5')](_0x465405,_0x48dc6f);_0xcef2a3(null);};}for(var e in events){if(events[_0x4c7f('0x6')](e)){var event=events[e];ChatQueue[_0x4c7f('0x7')](e,emitEvent(event));}}module[_0x4c7f('0x8')]=ChatQueueEvents; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js index bde8bc5..0fcc2e5 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 _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 +var _0x4dfd=['./chatQueue.attributes','exports','define','ChatQueue','chat_queues','lodash','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x1c24bb,_0x20a80c){var _0x26851d=function(_0x322c44){while(--_0x322c44){_0x1c24bb['push'](_0x1c24bb['shift']());}};_0x26851d(++_0x20a80c);}(_0x4dfd,0x130));var _0xd4df=function(_0x359a2b,_0x29b1d9){_0x359a2b=_0x359a2b-0x0;var _0x4896ee=_0x4dfd[_0x359a2b];return _0x4896ee;};'use strict';var _=require(_0xd4df('0x0'));var util=require(_0xd4df('0x1'));var logger=require(_0xd4df('0x2'))('api');var moment=require(_0xd4df('0x3'));var BPromise=require(_0xd4df('0x4'));var rp=require(_0xd4df('0x5'));var fs=require('fs');var path=require(_0xd4df('0x6'));var rimraf=require('rimraf');var config=require(_0xd4df('0x7'));var attributes=require(_0xd4df('0x8'));module[_0xd4df('0x9')]=function(_0x1e1ac8,_0x569ec4){return _0x1e1ac8[_0xd4df('0xa')](_0xd4df('0xb'),attributes,{'tableName':_0xd4df('0xc'),'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 084a15d..a7d4aa5 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 _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 +var _0xd5e5=['ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetChatQueue','ChatQueue','findAll','options','raw','where','attributes','model','include','map','ShowChatQueue','find','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','request','then','info'];(function(_0x297f7c,_0xbaa144){var _0x5de792=function(_0x452bae){while(--_0x452bae){_0x297f7c['push'](_0x297f7c['shift']());}};_0x5de792(++_0xbaa144);}(_0xd5e5,0x187));var _0x5d5e=function(_0x4a33e9,_0x3924a4){_0x4a33e9=_0x4a33e9-0x0;var _0x295f69=_0xd5e5[_0x4a33e9];return _0x295f69;};'use strict';var _=require('lodash');var util=require(_0x5d5e('0x0'));var moment=require('moment');var BPromise=require(_0x5d5e('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5d5e('0x2'));var db=require(_0x5d5e('0x3'))['db'];var utils=require(_0x5d5e('0x4'));var logger=require(_0x5d5e('0x5'))(_0x5d5e('0x6'));var config=require(_0x5d5e('0x7'));var jayson=require(_0x5d5e('0x8'));var client=jayson['client'][_0x5d5e('0x9')]({'port':0x232a});config[_0x5d5e('0xa')]=_[_0x5d5e('0xb')](config[_0x5d5e('0xa')],{'host':_0x5d5e('0xc'),'port':0x18eb});var socket=require(_0x5d5e('0xd'))(new Redis(config[_0x5d5e('0xa')]));require(_0x5d5e('0xe'))[_0x5d5e('0xf')](socket);function respondWithRpcPromise(_0x59356d,_0x9f5850,_0x291019){return new BPromise(function(_0x1af62a,_0x45663d){return client[_0x5d5e('0x10')](_0x59356d,_0x291019)[_0x5d5e('0x11')](function(_0x408d57){logger[_0x5d5e('0x12')](_0x5d5e('0x13'),_0x9f5850,_0x5d5e('0x14'));logger[_0x5d5e('0x15')](_0x5d5e('0x16'),_0x9f5850,_0x5d5e('0x14'),JSON[_0x5d5e('0x17')](_0x408d57));if(_0x408d57[_0x5d5e('0x18')]){if(_0x408d57[_0x5d5e('0x18')][_0x5d5e('0x19')]===0x1f4){logger[_0x5d5e('0x18')](_0x5d5e('0x13'),_0x9f5850,_0x408d57['error']['message']);return _0x45663d(_0x408d57[_0x5d5e('0x18')]['message']);}logger['error'](_0x5d5e('0x13'),_0x9f5850,_0x408d57['error']['message']);return _0x1af62a(_0x408d57[_0x5d5e('0x18')][_0x5d5e('0x1a')]);}else{logger[_0x5d5e('0x12')](_0x5d5e('0x13'),_0x9f5850,_0x5d5e('0x14'));_0x1af62a(_0x408d57[_0x5d5e('0x1b')]['message']);}})[_0x5d5e('0x1c')](function(_0x235616){logger[_0x5d5e('0x18')]('ChatQueue,\x20%s,\x20%s',_0x9f5850,_0x235616);_0x45663d(_0x235616);});});}exports[_0x5d5e('0x1d')]=function(_0xdde0e1){var _0x3aaf22=this;return new Promise(function(_0x27a79c,_0x439c11){return db[_0x5d5e('0x1e')][_0x5d5e('0x1f')]({'raw':_0xdde0e1['options']?_0xdde0e1[_0x5d5e('0x20')][_0x5d5e('0x21')]===undefined?!![]:![]:!![],'where':_0xdde0e1[_0x5d5e('0x20')]?_0xdde0e1[_0x5d5e('0x20')][_0x5d5e('0x22')]||null:null,'attributes':_0xdde0e1[_0x5d5e('0x20')]?_0xdde0e1[_0x5d5e('0x20')][_0x5d5e('0x23')]||null:null,'limit':_0xdde0e1['options']?_0xdde0e1['options']['limit']||null:null,'include':_0xdde0e1[_0x5d5e('0x20')]?_0xdde0e1[_0x5d5e('0x20')]['include']?_['map'](_0xdde0e1[_0x5d5e('0x20')]['include'],function(_0x1bbd1d){return{'model':db[_0x1bbd1d[_0x5d5e('0x24')]],'as':_0x1bbd1d['as'],'attributes':_0x1bbd1d[_0x5d5e('0x23')],'include':_0x1bbd1d[_0x5d5e('0x25')]?_['map'](_0x1bbd1d[_0x5d5e('0x25')],function(_0x33d730){return{'model':db[_0x33d730[_0x5d5e('0x24')]],'as':_0x33d730['as'],'attributes':_0x33d730[_0x5d5e('0x23')],'include':_0x33d730[_0x5d5e('0x25')]?_[_0x5d5e('0x26')](_0x33d730[_0x5d5e('0x25')],function(_0x352487){return{'model':db[_0x352487[_0x5d5e('0x24')]],'as':_0x352487['as'],'attributes':_0x352487[_0x5d5e('0x23')]};}):[]};}):[]};}):[]:[]})[_0x5d5e('0x11')](function(_0x41cdfc){logger[_0x5d5e('0x12')](_0x5d5e('0x1d'),_0xdde0e1);logger[_0x5d5e('0x15')](_0x5d5e('0x1d'),_0xdde0e1,JSON['stringify'](_0x41cdfc));_0x27a79c(_0x41cdfc);})[_0x5d5e('0x1c')](function(_0x4f3af0){logger['error'](_0x5d5e('0x1d'),_0x4f3af0[_0x5d5e('0x1a')],_0xdde0e1);_0x439c11(_0x3aaf22[_0x5d5e('0x18')](0x1f4,_0x4f3af0['message']));});});};exports[_0x5d5e('0x27')]=function(_0x78418b){var _0x2116a0=this;return new Promise(function(_0x1d1cf7,_0x4a531c){return db[_0x5d5e('0x1e')][_0x5d5e('0x28')]({'raw':_0x78418b[_0x5d5e('0x20')]?_0x78418b[_0x5d5e('0x20')][_0x5d5e('0x21')]===undefined?!![]:![]:!![],'where':_0x78418b['options']?_0x78418b['options'][_0x5d5e('0x22')]||null:null,'attributes':_0x78418b[_0x5d5e('0x20')]?_0x78418b[_0x5d5e('0x20')]['attributes']||null:null,'include':_0x78418b['options']?_0x78418b[_0x5d5e('0x20')]['include']?_['map'](_0x78418b[_0x5d5e('0x20')][_0x5d5e('0x25')],function(_0x23da5d){return{'model':db[_0x23da5d[_0x5d5e('0x24')]],'as':_0x23da5d['as'],'attributes':_0x23da5d[_0x5d5e('0x23')],'include':_0x23da5d[_0x5d5e('0x25')]?_[_0x5d5e('0x26')](_0x23da5d[_0x5d5e('0x25')],function(_0x1f0113){return{'model':db[_0x1f0113[_0x5d5e('0x24')]],'as':_0x1f0113['as'],'attributes':_0x1f0113[_0x5d5e('0x23')],'include':_0x1f0113[_0x5d5e('0x25')]?_[_0x5d5e('0x26')](_0x1f0113[_0x5d5e('0x25')],function(_0xbdbfee){return{'model':db[_0xbdbfee[_0x5d5e('0x24')]],'as':_0xbdbfee['as'],'attributes':_0xbdbfee[_0x5d5e('0x23')]};}):[]};}):[]};}):[]:[]})[_0x5d5e('0x11')](function(_0x12c082){logger[_0x5d5e('0x12')]('ShowChatQueue',_0x78418b);logger[_0x5d5e('0x15')](_0x5d5e('0x27'),_0x78418b,JSON[_0x5d5e('0x17')](_0x12c082));_0x1d1cf7(_0x12c082);})[_0x5d5e('0x1c')](function(_0x660b10){logger[_0x5d5e('0x18')](_0x5d5e('0x27'),_0x660b10[_0x5d5e('0x1a')],_0x78418b);_0x4a531c(_0x2116a0['error'](0x1f4,_0x660b10[_0x5d5e('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js index 49e9ca9..79c2ea0 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 _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 +var _0x17ba=['register','length','chatQueue:','./chatQueue.events','save','update','emit','removeListener'];(function(_0x536941,_0x31acb1){var _0x382dcc=function(_0x5793d2){while(--_0x5793d2){_0x536941['push'](_0x536941['shift']());}};_0x382dcc(++_0x31acb1);}(_0x17ba,0xab));var _0xa17b=function(_0x103d77,_0x584c73){_0x103d77=_0x103d77-0x0;var _0x471a03=_0x17ba[_0x103d77];return _0x471a03;};'use strict';var ChatQueueEvents=require(_0xa17b('0x0'));var events=[_0xa17b('0x1'),'remove',_0xa17b('0x2')];function createListener(_0x4563da,_0x2806ac){return function(_0x3c60e5){_0x2806ac[_0xa17b('0x3')](_0x4563da,_0x3c60e5);};}function removeListener(_0x38c13c,_0x11d7b7){return function(){ChatQueueEvents[_0xa17b('0x4')](_0x38c13c,_0x11d7b7);};}exports[_0xa17b('0x5')]=function(_0x3cced2){for(var _0xf72ed4=0x0,_0x2e3d43=events[_0xa17b('0x6')];_0xf72ed4<_0x2e3d43;_0xf72ed4++){var _0x57f9cd=events[_0xf72ed4];var _0x2ca4d3=createListener(_0xa17b('0x7')+_0x57f9cd,_0x3cced2);ChatQueueEvents['on'](_0x57f9cd,_0x2ca4d3);}}; \ No newline at end of file diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js index e451a89..88a42dc 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 _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 +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(_0x397886,_0xa56008){var _0x24c5fc=function(_0x2559ca){while(--_0x2559ca){_0x397886['push'](_0x397886['shift']());}};_0x24c5fc(++_0xa56008);}(_0x55ca,0x126));var _0xa55c=function(_0x528342,_0x17a981){_0x528342=_0x528342-0x0;var _0x27dd91=_0x55ca[_0x528342];return _0x27dd91;};'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 diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js index 41893e7..d26201e 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 _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 +var _0x2e5a=['DATE','moment','sequelize','exports','STRING'];(function(_0x123297,_0x3b6b80){var _0x1afa6f=function(_0x41aaac){while(--_0x41aaac){_0x123297['push'](_0x123297['shift']());}};_0x1afa6f(++_0x3b6b80);}(_0x2e5a,0x182));var _0xa2e5=function(_0x3212a8,_0x53612e){_0x3212a8=_0x3212a8-0x0;var _0x5a6a53=_0x2e5a[_0x3212a8];return _0x5a6a53;};'use strict';var moment=require(_0xa2e5('0x0'));var Sequelize=require(_0xa2e5('0x1'));module[_0xa2e5('0x2')]={'uniqueid':{'type':Sequelize[_0xa2e5('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xa2e5('0x3')]},'joinAt':{'type':Sequelize[_0xa2e5('0x4')]},'leaveAt':{'type':Sequelize[_0xa2e5('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xa2e5('0x4')]},'reason':{'type':Sequelize[_0xa2e5('0x3')]}}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js index ac3bb87..b82aeb2 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 _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 +var _0x095b=['apply','save','update','error','stack','name','map','ChatQueueReport','rawAttributes','type','key','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','filter','VIRTUAL','merge','options','then','includeAll','include','findAll','catch','find','body','destroy','params','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','Content-Range'];(function(_0xdb063d,_0x490c5a){var _0x3e2aa0=function(_0xd4aa65){while(--_0xd4aa65){_0xdb063d['push'](_0xdb063d['shift']());}};_0x3e2aa0(++_0x490c5a);}(_0x095b,0x6e));var _0xb095=function(_0x277b75,_0x56cf41){_0x277b75=_0x277b75-0x0;var _0x5222d4=_0x095b[_0x277b75];return _0x5222d4;};'use strict';var emlformat=require(_0xb095('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xb095('0x1'));var jsonpatch=require(_0xb095('0x2'));var rp=require(_0xb095('0x3'));var moment=require(_0xb095('0x4'));var BPromise=require(_0xb095('0x5'));var Mustache=require('mustache');var util=require(_0xb095('0x6'));var path=require(_0xb095('0x7'));var sox=require(_0xb095('0x8'));var csv=require(_0xb095('0x9'));var ejs=require(_0xb095('0xa'));var fs=require('fs');var fs_extra=require(_0xb095('0xb'));var _=require(_0xb095('0xc'));var squel=require(_0xb095('0xd'));var crypto=require(_0xb095('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xb095('0xf'));var toCsv=require(_0xb095('0x9'));var querystring=require(_0xb095('0x10'));var Papa=require(_0xb095('0x11'));var Redis=require(_0xb095('0x12'));var authService=require(_0xb095('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb095('0x14'));var logger=require(_0xb095('0x15'))('api');var utils=require(_0xb095('0x16'));var config=require(_0xb095('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xb095('0x18'))['db'];function respondWithStatusCode(_0x5e0fb3,_0x7b6edf){_0x7b6edf=_0x7b6edf||0xcc;return function(_0x23dcc5){if(_0x23dcc5){return _0x5e0fb3[_0xb095('0x19')](_0x7b6edf);}return _0x5e0fb3[_0xb095('0x1a')](_0x7b6edf)[_0xb095('0x1b')]();};}function respondWithResult(_0x394df0,_0x781a3f){_0x781a3f=_0x781a3f||0xc8;return function(_0x4afb4d){if(_0x4afb4d){return _0x394df0[_0xb095('0x1a')](_0x781a3f)[_0xb095('0x1c')](_0x4afb4d);}};}function respondWithFilteredResult(_0x44280b,_0x2e6a89){return function(_0xd92481){if(_0xd92481){var _0x2568f8=typeof _0x2e6a89['offset']==='undefined'&&typeof _0x2e6a89['limit']===_0xb095('0x1d');var _0x2c4e86=_0xd92481[_0xb095('0x1e')];var _0x54d06=_0x2568f8?0x0:_0x2e6a89[_0xb095('0x1f')];var _0x7f0681=_0x2568f8?_0xd92481['count']:_0x2e6a89[_0xb095('0x1f')]+_0x2e6a89[_0xb095('0x20')];var _0x27e1d0;if(_0x7f0681>=_0x2c4e86){_0x7f0681=_0x2c4e86;_0x27e1d0=0xc8;}else{_0x27e1d0=0xce;}_0x44280b[_0xb095('0x1a')](_0x27e1d0);return _0x44280b['set'](_0xb095('0x21'),_0x54d06+'-'+_0x7f0681+'/'+_0x2c4e86)[_0xb095('0x1c')](_0xd92481);}return null;};}function patchUpdates(_0x2273f8){return function(_0x318687){try{jsonpatch[_0xb095('0x22')](_0x318687,_0x2273f8,!![]);}catch(_0x2af120){return BPromise['reject'](_0x2af120);}return _0x318687[_0xb095('0x23')]();};}function saveUpdates(_0x525a1a,_0x51750f){return function(_0x4ef4a9){if(_0x4ef4a9){return _0x4ef4a9[_0xb095('0x24')](_0x525a1a)['then'](function(_0x39f9de){return _0x39f9de;});}return null;};}function removeEntity(_0x4650f1,_0x2f1a8b){return function(_0x32d1e6){if(_0x32d1e6){return _0x32d1e6['destroy']()['then'](function(){_0x4650f1[_0xb095('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c6488,_0x1bbe29){return function(_0x1f1206){if(!_0x1f1206){_0x3c6488['sendStatus'](0x194);}return _0x1f1206;};}function handleError(_0x3e2095,_0x608591){_0x608591=_0x608591||0x1f4;return function(_0x3cb69f){logger[_0xb095('0x25')](_0x3cb69f[_0xb095('0x26')]);if(_0x3cb69f[_0xb095('0x27')]){delete _0x3cb69f[_0xb095('0x27')];}_0x3e2095[_0xb095('0x1a')](_0x608591)['send'](_0x3cb69f);};}exports['index']=function(_0xd6426c,_0x1d82a5){var _0x53803f={},_0x2f273f={},_0x3d00d1={'count':0x0,'rows':[]};var _0x468d94=_[_0xb095('0x28')](db[_0xb095('0x29')][_0xb095('0x2a')],function(_0xafd194){return{'name':_0xafd194['fieldName'],'type':_0xafd194[_0xb095('0x2b')][_0xb095('0x2c')]};});_0x2f273f[_0xb095('0x2d')]=_[_0xb095('0x28')](_0x468d94,_0xb095('0x27'));_0x2f273f[_0xb095('0x2e')]=_[_0xb095('0x2f')](_0xd6426c['query']);_0x2f273f['filters']=_['intersection'](_0x2f273f['model'],_0x2f273f['query']);_0x53803f[_0xb095('0x30')]=_[_0xb095('0x31')](_0x2f273f[_0xb095('0x2d')],qs[_0xb095('0x32')](_0xd6426c[_0xb095('0x2e')][_0xb095('0x32')]));_0x53803f[_0xb095('0x30')]=_0x53803f[_0xb095('0x30')][_0xb095('0x33')]?_0x53803f[_0xb095('0x30')]:_0x2f273f[_0xb095('0x2d')];if(!_0xd6426c['query'][_0xb095('0x34')](_0xb095('0x35'))){_0x53803f[_0xb095('0x20')]=qs['limit'](_0xd6426c['query'][_0xb095('0x20')]);_0x53803f[_0xb095('0x1f')]=qs[_0xb095('0x1f')](_0xd6426c[_0xb095('0x2e')]['offset']);}_0x53803f['order']=qs[_0xb095('0x36')](_0xd6426c['query'][_0xb095('0x36')]);_0x53803f[_0xb095('0x37')]=qs['filters'](_[_0xb095('0x38')](_0xd6426c[_0xb095('0x2e')],_0x2f273f[_0xb095('0x39')]),_0x468d94);if(_0xd6426c['query'][_0xb095('0x3a')]){_0x53803f[_0xb095('0x37')]=_['merge'](_0x53803f[_0xb095('0x37')],{'$or':_[_0xb095('0x28')](_0x468d94,function(_0x7dd3c9){if(_0x7dd3c9[_0xb095('0x2b')]!==_0xb095('0x3b')){var _0x3d5e17={};_0x3d5e17[_0x7dd3c9[_0xb095('0x27')]]={'$like':'%'+_0xd6426c[_0xb095('0x2e')]['filter']+'%'};return _0x3d5e17;}})});}_0x53803f=_[_0xb095('0x3c')]({},_0x53803f,_0xd6426c[_0xb095('0x3d')]);var _0x69cfbe={'where':_0x53803f[_0xb095('0x37')]};return db[_0xb095('0x29')][_0xb095('0x1e')](_0x69cfbe)[_0xb095('0x3e')](function(_0x1eb503){_0x3d00d1[_0xb095('0x1e')]=_0x1eb503;if(_0xd6426c[_0xb095('0x2e')][_0xb095('0x3f')]){_0x53803f[_0xb095('0x40')]=[{'all':!![]}];}return db[_0xb095('0x29')][_0xb095('0x41')](_0x53803f);})[_0xb095('0x3e')](function(_0x4f57ef){_0x3d00d1['rows']=_0x4f57ef;return _0x3d00d1;})[_0xb095('0x3e')](respondWithFilteredResult(_0x1d82a5,_0x53803f))[_0xb095('0x42')](handleError(_0x1d82a5,null));};exports['show']=function(_0x2a8178,_0x3f63fa){var _0x1582d5={'raw':!![],'where':{'id':_0x2a8178['params']['id']}},_0x367bce={};_0x367bce['model']=_[_0xb095('0x2f')](db[_0xb095('0x29')][_0xb095('0x2a')]);_0x367bce['query']=_['keys'](_0x2a8178['query']);_0x367bce[_0xb095('0x39')]=_['intersection'](_0x367bce[_0xb095('0x2d')],_0x367bce[_0xb095('0x2e')]);_0x1582d5[_0xb095('0x30')]=_['intersection'](_0x367bce[_0xb095('0x2d')],qs['fields'](_0x2a8178['query']['fields']));_0x1582d5[_0xb095('0x30')]=_0x1582d5['attributes'][_0xb095('0x33')]?_0x1582d5['attributes']:_0x367bce[_0xb095('0x2d')];if(_0x2a8178['query'][_0xb095('0x3f')]){_0x1582d5[_0xb095('0x40')]=[{'all':!![]}];}_0x1582d5=_[_0xb095('0x3c')]({},_0x1582d5,_0x2a8178['options']);return db[_0xb095('0x29')][_0xb095('0x43')](_0x1582d5)[_0xb095('0x3e')](handleEntityNotFound(_0x3f63fa,null))[_0xb095('0x3e')](respondWithResult(_0x3f63fa,null))[_0xb095('0x42')](handleError(_0x3f63fa,null));};exports['create']=function(_0x45c71c,_0x4ad545){return db['ChatQueueReport']['create'](_0x45c71c[_0xb095('0x44')],{})['then'](respondWithResult(_0x4ad545,0xc9))[_0xb095('0x42')](handleError(_0x4ad545,null));};exports[_0xb095('0x24')]=function(_0x5685e2,_0x32f642){if(_0x5685e2[_0xb095('0x44')]['id']){delete _0x5685e2[_0xb095('0x44')]['id'];}return db[_0xb095('0x29')][_0xb095('0x43')]({'where':{'id':_0x5685e2['params']['id']}})['then'](handleEntityNotFound(_0x32f642,null))[_0xb095('0x3e')](saveUpdates(_0x5685e2[_0xb095('0x44')],null))[_0xb095('0x3e')](respondWithResult(_0x32f642,null))['catch'](handleError(_0x32f642,null));};exports[_0xb095('0x45')]=function(_0xf0f9e6,_0x13bb46){return db[_0xb095('0x29')][_0xb095('0x43')]({'where':{'id':_0xf0f9e6[_0xb095('0x46')]['id']}})[_0xb095('0x3e')](handleEntityNotFound(_0x13bb46,null))['then'](removeEntity(_0x13bb46,null))[_0xb095('0x42')](handleError(_0x13bb46,null));};exports[_0xb095('0x47')]=function(_0x110009,_0x14b2f3){return db[_0xb095('0x29')]['describe']()[_0xb095('0x3e')](respondWithResult(_0x14b2f3,null))[_0xb095('0x42')](handleError(_0x14b2f3,null));}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js index 76ca9ea..62d93ea 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 _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 +var _0xd8b0=['define','report_chat_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x1c3131,_0xaca392){var _0xd1c0c6=function(_0x56a0d9){while(--_0x56a0d9){_0x1c3131['push'](_0x1c3131['shift']());}};_0xd1c0c6(++_0xaca392);}(_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 2f2f9e9..72a35f6 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 _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 +var _0x0131=['UpdateChatQueueReport','update','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','http','request','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','CreateChatQueueReport','ChatQueueReport','create','body','options','raw'];(function(_0x4dc8d7,_0x227916){var _0x403e33=function(_0x4c6c9b){while(--_0x4c6c9b){_0x4dc8d7['push'](_0x4dc8d7['shift']());}};_0x403e33(++_0x227916);}(_0x0131,0x1a4));var _0x1013=function(_0x5da0d9,_0x49ee54){_0x5da0d9=_0x5da0d9-0x0;var _0x4b6d2f=_0x0131[_0x5da0d9];return _0x4b6d2f;};'use strict';var _=require(_0x1013('0x0'));var util=require(_0x1013('0x1'));var moment=require(_0x1013('0x2'));var BPromise=require(_0x1013('0x3'));var rs=require(_0x1013('0x4'));var fs=require('fs');var Redis=require(_0x1013('0x5'));var db=require(_0x1013('0x6'))['db'];var utils=require(_0x1013('0x7'));var logger=require(_0x1013('0x8'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x1013('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x8c54f,_0x44dc7a,_0x528107){return new BPromise(function(_0x52239a,_0x2e91d7){return client[_0x1013('0xa')](_0x8c54f,_0x528107)[_0x1013('0xb')](function(_0x52b18e){logger['info'](_0x1013('0xc'),_0x44dc7a,_0x1013('0xd'));logger[_0x1013('0xe')](_0x1013('0xf'),_0x44dc7a,'request\x20sent',JSON[_0x1013('0x10')](_0x52b18e));if(_0x52b18e['error']){if(_0x52b18e['error'][_0x1013('0x11')]===0x1f4){logger[_0x1013('0x12')](_0x1013('0xc'),_0x44dc7a,_0x52b18e[_0x1013('0x12')][_0x1013('0x13')]);return _0x2e91d7(_0x52b18e[_0x1013('0x12')]['message']);}logger[_0x1013('0x12')](_0x1013('0xc'),_0x44dc7a,_0x52b18e[_0x1013('0x12')][_0x1013('0x13')]);return _0x52239a(_0x52b18e[_0x1013('0x12')][_0x1013('0x13')]);}else{logger['info'](_0x1013('0xc'),_0x44dc7a,_0x1013('0xd'));_0x52239a(_0x52b18e[_0x1013('0x14')]['message']);}})[_0x1013('0x15')](function(_0x4d50c6){logger['error'](_0x1013('0xc'),_0x44dc7a,_0x4d50c6);_0x2e91d7(_0x4d50c6);});});}exports[_0x1013('0x16')]=function(_0x751c44){var _0x54c731=this;return new Promise(function(_0x805f9a,_0x2cef1b){return db[_0x1013('0x17')][_0x1013('0x18')](_0x751c44[_0x1013('0x19')],{'raw':_0x751c44[_0x1013('0x1a')]?_0x751c44[_0x1013('0x1a')][_0x1013('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x314015){logger['info'](_0x1013('0x16'),_0x751c44);logger[_0x1013('0xe')](_0x1013('0x16'),_0x751c44,JSON[_0x1013('0x10')](_0x314015));_0x805f9a(_0x314015);})[_0x1013('0x15')](function(_0x2a4037){logger['error'](_0x1013('0x16'),_0x2a4037[_0x1013('0x13')],_0x751c44);_0x2cef1b(_0x54c731[_0x1013('0x12')](0x1f4,_0x2a4037[_0x1013('0x13')]));});});};exports[_0x1013('0x1c')]=function(_0x262192){var _0x26f24d=this;return new Promise(function(_0x146b81,_0x3d39bb){return db[_0x1013('0x17')][_0x1013('0x1d')](_0x262192[_0x1013('0x19')],{'raw':_0x262192[_0x1013('0x1a')]?_0x262192[_0x1013('0x1a')][_0x1013('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x262192[_0x1013('0x1a')]?_0x262192['options'][_0x1013('0x1e')]||null:null,'attributes':_0x262192[_0x1013('0x1a')]?_0x262192[_0x1013('0x1a')]['attributes']||null:null,'limit':_0x262192[_0x1013('0x1a')]?_0x262192[_0x1013('0x1a')][_0x1013('0x1f')]||null:null})['then'](function(_0x4f2bb2){logger['info']('UpdateChatQueueReport',_0x262192);logger[_0x1013('0xe')](_0x1013('0x1c'),_0x262192,JSON[_0x1013('0x10')](_0x4f2bb2));_0x146b81(_0x4f2bb2);})[_0x1013('0x15')](function(_0x56b6e7){logger[_0x1013('0x12')](_0x1013('0x1c'),_0x56b6e7[_0x1013('0x13')],_0x262192);_0x3d39bb(_0x26f24d[_0x1013('0x12')](0x1f4,_0x56b6e7[_0x1013('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js index e94f90c..f2d857a 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 _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 +var _0x67f7=['update','delete','destroy','exports','multer','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','post','put'];(function(_0x327938,_0x3b88bc){var _0x29bfb7=function(_0x415916){while(--_0x415916){_0x327938['push'](_0x327938['shift']());}};_0x29bfb7(++_0x3b88bc);}(_0x67f7,0x114));var _0x767f=function(_0x157558,_0x38f399){_0x157558=_0x157558-0x0;var _0x511d22=_0x67f7[_0x157558];return _0x511d22;};'use strict';var multer=require(_0x767f('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x767f('0x1'));var router=express[_0x767f('0x2')]();var fs_extra=require(_0x767f('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x767f('0x4'));var config=require(_0x767f('0x5'));var controller=require('./chatQueueReport.controller');router[_0x767f('0x6')]('/',auth[_0x767f('0x7')](),controller[_0x767f('0x8')]);router['get']('/describe',auth[_0x767f('0x7')](),controller['describe']);router['get'](_0x767f('0x9'),auth[_0x767f('0x7')](),controller['show']);router[_0x767f('0xa')]('/',auth[_0x767f('0x7')](),controller['create']);router[_0x767f('0xb')](_0x767f('0x9'),auth[_0x767f('0x7')](),controller[_0x767f('0xc')]);router[_0x767f('0xd')]('/:id',auth[_0x767f('0x7')](),controller[_0x767f('0xe')]);module[_0x767f('0xf')]=router; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js index 346f067..60895d6 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 _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 +var _0x9c44=['ENUM','account','agent','queue','NOW','exports','STRING'];(function(_0x4f37d4,_0x5907d2){var _0x5f1efe=function(_0x5afebd){while(--_0x5afebd){_0x4f37d4['push'](_0x4f37d4['shift']());}};_0x5f1efe(++_0x5907d2);}(_0x9c44,0x178));var _0x49c4=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x9c44[_0x18ab2a];return _0x16dcee;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x49c4('0x0')]={'uniqueid':{'type':Sequelize[_0x49c4('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x49c4('0x2')](_0x49c4('0x3'),_0x49c4('0x4'),_0x49c4('0x5')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x49c4('0x6')]}}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js index 8f50047..e9c26ef 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 _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 +var _0x08df=['rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','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','offset','undefined','count','limit','Content-Range','json','apply','reject','save','update','then','end','error','name','index','map','ChatTransferReport','fieldName','type','key','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','filters','filter','VIRTUAL','merge','includeAll','findAll','rows','show','params','rawAttributes','find','catch','create','body','destroy','describe','eml-format'];(function(_0x5b1e6d,_0x34d4e4){var _0x51bf16=function(_0x2a96cf){while(--_0x2a96cf){_0x5b1e6d['push'](_0x5b1e6d['shift']());}};_0x51bf16(++_0x34d4e4);}(_0x08df,0xe6));var _0xf08d=function(_0x1d39f6,_0x146f4a){_0x1d39f6=_0x1d39f6-0x0;var _0x3dbd7a=_0x08df[_0x1d39f6];return _0x3dbd7a;};'use strict';var emlformat=require(_0xf08d('0x0'));var rimraf=require(_0xf08d('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf08d('0x2'));var rp=require(_0xf08d('0x3'));var moment=require(_0xf08d('0x4'));var BPromise=require(_0xf08d('0x5'));var Mustache=require('mustache');var util=require(_0xf08d('0x6'));var path=require(_0xf08d('0x7'));var sox=require(_0xf08d('0x8'));var csv=require('to-csv');var ejs=require(_0xf08d('0x9'));var fs=require('fs');var fs_extra=require(_0xf08d('0xa'));var _=require(_0xf08d('0xb'));var squel=require(_0xf08d('0xc'));var crypto=require(_0xf08d('0xd'));var jsforce=require(_0xf08d('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xf08d('0xf'));var querystring=require(_0xf08d('0x10'));var Papa=require(_0xf08d('0x11'));var Redis=require(_0xf08d('0x12'));var authService=require(_0xf08d('0x13'));var qs=require(_0xf08d('0x14'));var as=require(_0xf08d('0x15'));var hardwareService=require(_0xf08d('0x16'));var logger=require('../../config/logger')(_0xf08d('0x17'));var utils=require(_0xf08d('0x18'));var config=require(_0xf08d('0x19'));var licenseUtil=require(_0xf08d('0x1a'));var db=require(_0xf08d('0x1b'))['db'];function respondWithStatusCode(_0x15d831,_0x4d5695){_0x4d5695=_0x4d5695||0xcc;return function(_0x160265){if(_0x160265){return _0x15d831[_0xf08d('0x1c')](_0x4d5695);}return _0x15d831[_0xf08d('0x1d')](_0x4d5695)['end']();};}function respondWithResult(_0x3d0105,_0x490322){_0x490322=_0x490322||0xc8;return function(_0x12be29){if(_0x12be29){return _0x3d0105[_0xf08d('0x1d')](_0x490322)['json'](_0x12be29);}};}function respondWithFilteredResult(_0xa5890,_0x526ae2){return function(_0x8bb111){if(_0x8bb111){var _0x478b32=typeof _0x526ae2[_0xf08d('0x1e')]===_0xf08d('0x1f')&&typeof _0x526ae2['limit']===_0xf08d('0x1f');var _0x1cc349=_0x8bb111[_0xf08d('0x20')];var _0x27cd51=_0x478b32?0x0:_0x526ae2[_0xf08d('0x1e')];var _0x17f295=_0x478b32?_0x8bb111[_0xf08d('0x20')]:_0x526ae2['offset']+_0x526ae2[_0xf08d('0x21')];var _0x4bea7a;if(_0x17f295>=_0x1cc349){_0x17f295=_0x1cc349;_0x4bea7a=0xc8;}else{_0x4bea7a=0xce;}_0xa5890[_0xf08d('0x1d')](_0x4bea7a);return _0xa5890['set'](_0xf08d('0x22'),_0x27cd51+'-'+_0x17f295+'/'+_0x1cc349)[_0xf08d('0x23')](_0x8bb111);}return null;};}function patchUpdates(_0x46369c){return function(_0x2662f0){try{jsonpatch[_0xf08d('0x24')](_0x2662f0,_0x46369c,!![]);}catch(_0x2b4955){return BPromise[_0xf08d('0x25')](_0x2b4955);}return _0x2662f0[_0xf08d('0x26')]();};}function saveUpdates(_0x3a4773,_0x5a3a76){return function(_0x2c73de){if(_0x2c73de){return _0x2c73de[_0xf08d('0x27')](_0x3a4773)[_0xf08d('0x28')](function(_0x3d2ff7){return _0x3d2ff7;});}return null;};}function removeEntity(_0x465b94,_0x8119b4){return function(_0x491fe4){if(_0x491fe4){return _0x491fe4['destroy']()[_0xf08d('0x28')](function(){_0x465b94[_0xf08d('0x1d')](0xcc)[_0xf08d('0x29')]();});}};}function handleEntityNotFound(_0x29064f,_0x1c148e){return function(_0x5f016e){if(!_0x5f016e){_0x29064f[_0xf08d('0x1c')](0x194);}return _0x5f016e;};}function handleError(_0xefcd5b,_0x628568){_0x628568=_0x628568||0x1f4;return function(_0x104b02){logger[_0xf08d('0x2a')](_0x104b02['stack']);if(_0x104b02[_0xf08d('0x2b')]){delete _0x104b02['name'];}_0xefcd5b[_0xf08d('0x1d')](_0x628568)['send'](_0x104b02);};}exports[_0xf08d('0x2c')]=function(_0x534973,_0xa663b6){var _0x2eb4bb={},_0x5b060a={},_0xe26869={'count':0x0,'rows':[]};var _0x4999a9=_[_0xf08d('0x2d')](db[_0xf08d('0x2e')]['rawAttributes'],function(_0x1e3917){return{'name':_0x1e3917[_0xf08d('0x2f')],'type':_0x1e3917[_0xf08d('0x30')][_0xf08d('0x31')]};});_0x5b060a[_0xf08d('0x32')]=_[_0xf08d('0x2d')](_0x4999a9,_0xf08d('0x2b'));_0x5b060a['query']=_[_0xf08d('0x33')](_0x534973[_0xf08d('0x34')]);_0x5b060a['filters']=_['intersection'](_0x5b060a[_0xf08d('0x32')],_0x5b060a[_0xf08d('0x34')]);_0x2eb4bb[_0xf08d('0x35')]=_[_0xf08d('0x36')](_0x5b060a[_0xf08d('0x32')],qs[_0xf08d('0x37')](_0x534973[_0xf08d('0x34')]['fields']));_0x2eb4bb[_0xf08d('0x35')]=_0x2eb4bb[_0xf08d('0x35')][_0xf08d('0x38')]?_0x2eb4bb['attributes']:_0x5b060a[_0xf08d('0x32')];if(!_0x534973[_0xf08d('0x34')][_0xf08d('0x39')](_0xf08d('0x3a'))){_0x2eb4bb[_0xf08d('0x21')]=qs[_0xf08d('0x21')](_0x534973['query']['limit']);_0x2eb4bb[_0xf08d('0x1e')]=qs[_0xf08d('0x1e')](_0x534973[_0xf08d('0x34')][_0xf08d('0x1e')]);}_0x2eb4bb['order']=qs[_0xf08d('0x3b')](_0x534973[_0xf08d('0x34')][_0xf08d('0x3b')]);_0x2eb4bb[_0xf08d('0x3c')]=qs['filters'](_['pick'](_0x534973[_0xf08d('0x34')],_0x5b060a[_0xf08d('0x3d')]),_0x4999a9);if(_0x534973[_0xf08d('0x34')][_0xf08d('0x3e')]){_0x2eb4bb['where']=_['merge'](_0x2eb4bb['where'],{'$or':_[_0xf08d('0x2d')](_0x4999a9,function(_0xd44acc){if(_0xd44acc[_0xf08d('0x30')]!==_0xf08d('0x3f')){var _0x5cb7dd={};_0x5cb7dd[_0xd44acc[_0xf08d('0x2b')]]={'$like':'%'+_0x534973[_0xf08d('0x34')]['filter']+'%'};return _0x5cb7dd;}})});}_0x2eb4bb=_[_0xf08d('0x40')]({},_0x2eb4bb,_0x534973['options']);var _0x437396={'where':_0x2eb4bb[_0xf08d('0x3c')]};return db['ChatTransferReport']['count'](_0x437396)[_0xf08d('0x28')](function(_0x9a5097){_0xe26869[_0xf08d('0x20')]=_0x9a5097;if(_0x534973[_0xf08d('0x34')][_0xf08d('0x41')]){_0x2eb4bb['include']=[{'all':!![]}];}return db['ChatTransferReport'][_0xf08d('0x42')](_0x2eb4bb);})[_0xf08d('0x28')](function(_0x4068e5){_0xe26869[_0xf08d('0x43')]=_0x4068e5;return _0xe26869;})[_0xf08d('0x28')](respondWithFilteredResult(_0xa663b6,_0x2eb4bb))['catch'](handleError(_0xa663b6,null));};exports[_0xf08d('0x44')]=function(_0x6f7b4e,_0x29b65a){var _0x47068f={'raw':!![],'where':{'id':_0x6f7b4e[_0xf08d('0x45')]['id']}},_0x3eba81={};_0x3eba81[_0xf08d('0x32')]=_[_0xf08d('0x33')](db[_0xf08d('0x2e')][_0xf08d('0x46')]);_0x3eba81['query']=_['keys'](_0x6f7b4e[_0xf08d('0x34')]);_0x3eba81[_0xf08d('0x3d')]=_[_0xf08d('0x36')](_0x3eba81[_0xf08d('0x32')],_0x3eba81[_0xf08d('0x34')]);_0x47068f[_0xf08d('0x35')]=_[_0xf08d('0x36')](_0x3eba81[_0xf08d('0x32')],qs[_0xf08d('0x37')](_0x6f7b4e[_0xf08d('0x34')][_0xf08d('0x37')]));_0x47068f[_0xf08d('0x35')]=_0x47068f[_0xf08d('0x35')][_0xf08d('0x38')]?_0x47068f[_0xf08d('0x35')]:_0x3eba81[_0xf08d('0x32')];if(_0x6f7b4e[_0xf08d('0x34')][_0xf08d('0x41')]){_0x47068f['include']=[{'all':!![]}];}_0x47068f=_[_0xf08d('0x40')]({},_0x47068f,_0x6f7b4e['options']);return db[_0xf08d('0x2e')][_0xf08d('0x47')](_0x47068f)[_0xf08d('0x28')](handleEntityNotFound(_0x29b65a,null))[_0xf08d('0x28')](respondWithResult(_0x29b65a,null))[_0xf08d('0x48')](handleError(_0x29b65a,null));};exports[_0xf08d('0x49')]=function(_0x3eb3e0,_0x2079ec){return db[_0xf08d('0x2e')]['create'](_0x3eb3e0[_0xf08d('0x4a')],{})[_0xf08d('0x28')](respondWithResult(_0x2079ec,0xc9))[_0xf08d('0x48')](handleError(_0x2079ec,null));};exports['update']=function(_0x3a51f1,_0x3ccc06){if(_0x3a51f1[_0xf08d('0x4a')]['id']){delete _0x3a51f1[_0xf08d('0x4a')]['id'];}return db[_0xf08d('0x2e')]['find']({'where':{'id':_0x3a51f1['params']['id']}})[_0xf08d('0x28')](handleEntityNotFound(_0x3ccc06,null))[_0xf08d('0x28')](saveUpdates(_0x3a51f1[_0xf08d('0x4a')],null))[_0xf08d('0x28')](respondWithResult(_0x3ccc06,null))[_0xf08d('0x48')](handleError(_0x3ccc06,null));};exports[_0xf08d('0x4b')]=function(_0x11c10,_0x3c6215){return db[_0xf08d('0x2e')][_0xf08d('0x47')]({'where':{'id':_0x11c10[_0xf08d('0x45')]['id']}})[_0xf08d('0x28')](handleEntityNotFound(_0x3c6215,null))[_0xf08d('0x28')](removeEntity(_0x3c6215,null))[_0xf08d('0x48')](handleError(_0x3c6215,null));};exports[_0xf08d('0x4c')]=function(_0x3dcfc4,_0x92af3b){return db[_0xf08d('0x2e')][_0xf08d('0x4c')]()[_0xf08d('0x28')](respondWithResult(_0x92af3b,null))[_0xf08d('0x48')](handleError(_0x92af3b,null));}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js index 3d7e2d9..c970110 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 _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 +var _0xad3c=['ChatTransferReport','report_chat_transfer','uniqueid','util','../../config/logger','moment','bluebird','request-promise','path','./chatTransferReport.attributes','exports'];(function(_0x59e853,_0x2aa903){var _0x31c4dd=function(_0x541a20){while(--_0x541a20){_0x59e853['push'](_0x59e853['shift']());}};_0x31c4dd(++_0x2aa903);}(_0xad3c,0x121));var _0xcad3=function(_0x3f4999,_0xe3ea6a){_0x3f4999=_0x3f4999-0x0;var _0x3dcdf4=_0xad3c[_0x3f4999];return _0x3dcdf4;};'use strict';var _=require('lodash');var util=require(_0xcad3('0x0'));var logger=require(_0xcad3('0x1'))('api');var moment=require(_0xcad3('0x2'));var BPromise=require(_0xcad3('0x3'));var rp=require(_0xcad3('0x4'));var fs=require('fs');var path=require(_0xcad3('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xcad3('0x6'));module[_0xcad3('0x7')]=function(_0x23c393,_0x1ae255){return _0x23c393['define'](_0xcad3('0x8'),attributes,{'tableName':_0xcad3('0x9'),'paranoid':![],'indexes':[{'name':_0xcad3('0xa'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js index 2973577..3ba5690 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 _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 +var _0x955a=['message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','ChatTransferReport,\x20%s,\x20%s'];(function(_0xeb31d6,_0x36dda8){var _0x2f7189=function(_0x5dd436){while(--_0x5dd436){_0xeb31d6['push'](_0xeb31d6['shift']());}};_0x2f7189(++_0x36dda8);}(_0x955a,0x76));var _0xa955=function(_0x1d8180,_0x540e0d){_0x1d8180=_0x1d8180-0x0;var _0x54c80f=_0x955a[_0x1d8180];return _0x54c80f;};'use strict';var _=require(_0xa955('0x0'));var util=require('util');var moment=require(_0xa955('0x1'));var BPromise=require(_0xa955('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa955('0x3'));var db=require(_0xa955('0x4'))['db'];var utils=require(_0xa955('0x5'));var logger=require(_0xa955('0x6'))(_0xa955('0x7'));var config=require(_0xa955('0x8'));var jayson=require(_0xa955('0x9'));var client=jayson['client'][_0xa955('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x35d1e3,_0x488516,_0x300f5f){return new BPromise(function(_0x1cf0d8,_0x58a959){return client[_0xa955('0xb')](_0x35d1e3,_0x300f5f)[_0xa955('0xc')](function(_0x195bcc){logger[_0xa955('0xd')]('ChatTransferReport,\x20%s,\x20%s',_0x488516,'request\x20sent');logger[_0xa955('0xe')](_0xa955('0xf'),_0x488516,_0xa955('0x10'),JSON[_0xa955('0x11')](_0x195bcc));if(_0x195bcc[_0xa955('0x12')]){if(_0x195bcc['error']['code']===0x1f4){logger[_0xa955('0x12')](_0xa955('0x13'),_0x488516,_0x195bcc[_0xa955('0x12')][_0xa955('0x14')]);return _0x58a959(_0x195bcc[_0xa955('0x12')][_0xa955('0x14')]);}logger['error']('ChatTransferReport,\x20%s,\x20%s',_0x488516,_0x195bcc['error']['message']);return _0x1cf0d8(_0x195bcc[_0xa955('0x12')]['message']);}else{logger[_0xa955('0xd')](_0xa955('0x13'),_0x488516,'request\x20sent');_0x1cf0d8(_0x195bcc[_0xa955('0x15')][_0xa955('0x14')]);}})[_0xa955('0x16')](function(_0x1054d2){logger[_0xa955('0x12')](_0xa955('0x13'),_0x488516,_0x1054d2);_0x58a959(_0x1054d2);});});} \ No newline at end of file diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js index 5349fc0..cdc1561 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 _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 +var _0x4e97=['../../components/interaction/service','../../config/environment','./chatTransferReport.controller','isAuthenticated','index','describe','get','show','post','create','put','update','/:id','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x3e6a06,_0x5ddcd6){var _0xcdc571=function(_0x5b0d06){while(--_0x5b0d06){_0x3e6a06['push'](_0x3e6a06['shift']());}};_0xcdc571(++_0x5ddcd6);}(_0x4e97,0x151));var _0x74e9=function(_0x2609fd,_0x567bb5){_0x2609fd=_0x2609fd-0x0;var _0x514c68=_0x4e97[_0x2609fd];return _0x514c68;};'use strict';var multer=require(_0x74e9('0x0'));var util=require(_0x74e9('0x1'));var path=require(_0x74e9('0x2'));var timeout=require(_0x74e9('0x3'));var express=require(_0x74e9('0x4'));var router=express[_0x74e9('0x5')]();var fs_extra=require(_0x74e9('0x6'));var auth=require(_0x74e9('0x7'));var interaction=require(_0x74e9('0x8'));var config=require(_0x74e9('0x9'));var controller=require(_0x74e9('0xa'));router['get']('/',auth[_0x74e9('0xb')](),controller[_0x74e9('0xc')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x74e9('0xd')]);router[_0x74e9('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x74e9('0xf')]);router[_0x74e9('0x10')]('/',auth[_0x74e9('0xb')](),controller[_0x74e9('0x11')]);router[_0x74e9('0x12')]('/:id',auth[_0x74e9('0xb')](),controller[_0x74e9('0x13')]);router['delete'](_0x74e9('0x14'),auth['isAuthenticated'](),controller[_0x74e9('0x15')]);module[_0x74e9('0x16')]=router; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js index 8203112..870e64d 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 _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 +var _0x8c88=['Comments','Leave\x20your\x20comments','offlineForm','setDataValue','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','alternate','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','randomstring','exports','STRING','email','Agent','#011F6A','INTEGER','BOOLEAN','ENUM','rounded','squared','We\x20are\x20here!','Chat','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','star','stringify','input','name','parse','getDataValue','onlineForm','textarea'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x8c88,0x1ca));var _0x88c8=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x8c88[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x88c8('0x0'));module[_0x88c8('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize[_0x88c8('0x2')],'allowNull':![],'unique':'address'},'description':{'type':Sequelize[_0x88c8('0x2')]},'mapKey':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0x3')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x4')},'customerAlias':{'type':Sequelize['STRING'],'defaultValue':'Me'},'color':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x88c8('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x88c8('0x2')],'allowNull':![],'defaultValue':_0x88c8('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x88c8('0x2')],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x88c8('0x6')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x88c8('0x2')]},'animation':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x88c8('0x8')](_0x88c8('0x9'),_0x88c8('0xa')),'defaultValue':_0x88c8('0x9')},'header_online':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0xb')},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0xc')},'offline_chat_button':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0xd')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0xe')},'download_transcript':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x88c8('0x6')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0xf')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x88c8('0x10')]},'closingQuestion':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x11')},'formSubmitSuccessMessage':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x12')},'formSubmitFailureMessage':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x13')},'noteTitle':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x14')},'placeholderMessage':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':'Type\x20a\x20message'},'closingMessage':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x15')},'closingMessageButton':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0xd')},'skipMessageButton':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x16')},'conditionAgreement':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x17')},'ratingType':{'type':Sequelize[_0x88c8('0x8')](_0x88c8('0x18'),'thumb'),'defaultValue':_0x88c8('0x18')},'ratingStarsNumber':{'type':Sequelize[_0x88c8('0x6')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x88c8('0x10')],'defaultValue':function(){return JSON[_0x88c8('0x19')]({'items':[{'type':_0x88c8('0x1a'),'variable':null,'config':{'placeholder':_0x88c8('0x1b'),'type':'text','required':!![]},'props':{'title':_0x88c8('0x1b'),'helpText':''}},{'type':_0x88c8('0x1a'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0x88c8('0x3'),'type':'email'},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue']('onlineForm')?JSON[_0x88c8('0x1c')](this[_0x88c8('0x1d')](_0x88c8('0x1e'))):{};},'set':function(_0x1d24f3){return this['setDataValue'](_0x88c8('0x1e'),JSON[_0x88c8('0x19')](_0x1d24f3));}},'offlineForm':{'type':Sequelize[_0x88c8('0x10')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x88c8('0x1a'),'props':{'title':_0x88c8('0x3'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':'email'},'variable':null},{'type':_0x88c8('0x1f'),'config':{'placeholder':_0x88c8('0x20')},'props':{'title':_0x88c8('0x20'),'helpText':_0x88c8('0x21')}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0x88c8('0x22'))?JSON[_0x88c8('0x1c')](this['getDataValue'](_0x88c8('0x22'))):{};},'set':function(_0x1f1bba){return this[_0x88c8('0x23')](_0x88c8('0x22'),JSON[_0x88c8('0x19')](_0x1f1bba));}},'token':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x88c8('0x2')]},'forwardOffline':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x88c8('0x2')]},'waitingTitle':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x24')},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0x25')},'offlineMessageSubject':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x26')},'offlineMessageBody':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x27')},'enableUnmanagedNote':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0x28')},'skipUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0x16')},'sendUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0xd')},'enableCustomerAttachment':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x88c8('0x10')],'defaultValue':function(){return _0x88c8('0x29');}},'notificationSound':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':_0x88c8('0x2a')},'waitForTheAssignedAgent':{'type':Sequelize[_0x88c8('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0x88c8('0x6')],'defaultValue':0x1e},'messagesAlignment':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x2b')},'defaultTitle':{'type':Sequelize[_0x88c8('0x2')]},'customerAvatar':{'type':Sequelize['TEXT']},'showCustomerAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x88c8('0x6')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#fafafa','validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x88c8('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x88c8('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x88c8('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':_0x88c8('0x2c')},'systemAvatar':{'type':Sequelize[_0x88c8('0x10')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x88c8('0x6')],'comment':_0x88c8('0x2d')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x328458){if(!_0x328458)this['setDataValue'](_0x88c8('0x2e'),null);this[_0x88c8('0x23')]('mandatoryDisposition',_0x328458);}},'vidaooEscalation':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize['STRING']},'vidaooTopic':{'type':Sequelize[_0x88c8('0x2')],'allowNull':![],'defaultValue':_0x88c8('0x2f')},'vidaooNote':{'type':Sequelize[_0x88c8('0x2')],'defaultValue':function(){return _0x88c8('0x30');}},'vidaooMetadata':{'type':Sequelize[_0x88c8('0x10')],'defaultValue':null},'openNewInteraction':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x88c8('0x10')]}}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js index 9c1c8a7..e597bc5 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 _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 +var _0xb62e=['removeAnswers','filename','addAvatar','file','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','server/files/images/logos/default_logo.svg','sitepic','getLicense','custom','join','root','server/files/images/logos/','download','getAvatar','agentAvatar','server/files/images/avatars/','getCustomerAvatar','showCustomerAvatar','isNil','existsSync','getSystemAvatar','notify','user-agent-parser','setUA','headers','user-agent','chat','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','updatedAt','CompanyId','ListId','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','List','DESC','Applications','applications','orderBy','priority','asc','account','Contacts','contact','cf-connecting-ip','x-forwarded-for','first','split','firstName','x-real-port','referer','browser','version','format','%s\x20%s','unknown','device','vendor','%s\x20%s\x20%s','threadId','ChatInteraction','externalUrl','interaction','spread','lastName','messageId','created','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','unshift','agent','forcedOwnership','Start','startRouting','EventManager','offline','files','createdAt','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','MailAccount','findOrCreate','server/files/templates/chatOfflineMessage.ejs','render','offlineMessageBody','originalname','mimetype','server','attachments','offline-chat','basename','openNewInteraction','sequelize','Attachment','MailServerOut','Smtp','forwardOfflineAddress','service','host','port','secure','authentication','pass','SendMail','sendMail','email','MailAccountId','toPairsIn','offlineMessageSubject','NotifyMailAccount','notifyMail','remove','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','Contact','Owner','fullname','internal','Tag','color','tag','Command','timezone','interval','iftime\x20%s','indexOf','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','No\x20timezone','getSnippet','Interval','getProactiveActions','virtual','License','Intervals','all','some','readFileSync','server/files/chat/iframe.ejs','remote','x-real-ip','connection','replace','textColor','transaction','ChatApplication','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','ChatProactiveAction','offlineForm','onlineForm','items','fromKey','getOfflineMessages','ChatOfflineMessage','Attachments','addAgents','emit','isArray','userChatWebsite:remove','getAgents','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','jayson/promise','client','http','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','offset','undefined','count','limit','set','apply','reject','update','ChatWebsites','UserProfileResource','destroy','name','send','index','Pause','mandatoryDispositionPause','map','ChatWebsite','fieldName','key','query','keys','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','includeAll','include','rows','show','params','length','options','find','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','autoAssociation','describe','addDisposition','ChatWebsiteId','Disposition','getDispositions','findOne','rawAttributes','findAll','removeDispositions','ids','addAnswer','CannedAnswer'];(function(_0x504b02,_0x330fc8){var _0x9ec60=function(_0x114667){while(--_0x114667){_0x504b02['push'](_0x504b02['shift']());}};_0x9ec60(++_0x330fc8);}(_0xb62e,0xb8));var _0xeb62=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0xb62e[_0x618414];return _0x21c19a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xeb62('0x0'));var zipdir=require(_0xeb62('0x1'));var jsonpatch=require(_0xeb62('0x2'));var rp=require('request-promise');var moment=require(_0xeb62('0x3'));var BPromise=require(_0xeb62('0x4'));var Mustache=require('mustache');var util=require(_0xeb62('0x5'));var path=require(_0xeb62('0x6'));var sox=require(_0xeb62('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xeb62('0x8'));var _=require(_0xeb62('0x9'));var squel=require(_0xeb62('0xa'));var crypto=require(_0xeb62('0xb'));var jsforce=require(_0xeb62('0xc'));var deskjs=require(_0xeb62('0xd'));var toCsv=require(_0xeb62('0xe'));var querystring=require(_0xeb62('0xf'));var Papa=require(_0xeb62('0x10'));var Redis=require(_0xeb62('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xeb62('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xeb62('0x13'));var logger=require(_0xeb62('0x14'))(_0xeb62('0x15'));var utils=require(_0xeb62('0x16'));var config=require(_0xeb62('0x17'));var licenseUtil=require(_0xeb62('0x18'));var db=require(_0xeb62('0x19'))['db'];config[_0xeb62('0x1a')]=_[_0xeb62('0x1b')](config[_0xeb62('0x1a')],{'host':_0xeb62('0x1c'),'port':0x18eb});var socket=require(_0xeb62('0x1d'))(new Redis(config[_0xeb62('0x1a')]));require(_0xeb62('0x1e'))['register'](socket);var jayson=require(_0xeb62('0x1f'));var client=jayson[_0xeb62('0x20')][_0xeb62('0x21')]({'port':0x232c});var client9002=jayson[_0xeb62('0x20')][_0xeb62('0x21')]({'port':0x232a});var client9003=jayson[_0xeb62('0x20')][_0xeb62('0x21')]({'port':0x232b});var client9001=jayson['client']['http']({'port':0x2329});function respondWithRpcPromise(_0x7eb65a,_0x5233ca,_0xacaa78,_0x6e952){return new BPromise(function(_0x5ca60d,_0x1fe9f9){var _0x52d610=_0x6e952||client;return _0x52d610[_0xeb62('0x22')](_0x7eb65a,_0xacaa78)[_0xeb62('0x23')](function(_0x50757a){logger[_0xeb62('0x24')](_0xeb62('0x25'),_0x5233ca,_0xeb62('0x26'));logger[_0xeb62('0x27')](_0xeb62('0x28'),_0x5233ca,'request\x20sent',JSON[_0xeb62('0x29')](_0x50757a));if(_0x50757a[_0xeb62('0x2a')]){if(_0x50757a[_0xeb62('0x2a')][_0xeb62('0x2b')]===0x1f4){logger['error'](_0xeb62('0x25'),_0x5233ca,_0x50757a[_0xeb62('0x2a')]['message']);return _0x1fe9f9(_0x50757a[_0xeb62('0x2a')]['message']);}logger[_0xeb62('0x2a')](_0xeb62('0x25'),_0x5233ca,_0x50757a[_0xeb62('0x2a')][_0xeb62('0x2c')]);return _0x5ca60d(_0x50757a[_0xeb62('0x2a')]['message']);}else{logger[_0xeb62('0x24')](_0xeb62('0x25'),_0x5233ca,_0xeb62('0x26'));_0x5ca60d(_0x50757a[_0xeb62('0x2d')][_0xeb62('0x2c')]);}})[_0xeb62('0x2e')](function(_0x196936){logger[_0xeb62('0x2a')](_0xeb62('0x25'),_0x5233ca,_0x196936);_0x1fe9f9(_0x196936);});});}function respondWithStatusCode(_0x5386ec,_0x54dd3d){_0x54dd3d=_0x54dd3d||0xcc;return function(_0x2c534f){if(_0x2c534f){return _0x5386ec['sendStatus'](_0x54dd3d);}return _0x5386ec[_0xeb62('0x2f')](_0x54dd3d)[_0xeb62('0x30')]();};}function respondWithResult(_0x438626,_0x475f8a){_0x475f8a=_0x475f8a||0xc8;return function(_0x4a1420){if(_0x4a1420){return _0x438626['status'](_0x475f8a)[_0xeb62('0x31')](_0x4a1420);}};}function respondWithFilteredResult(_0x141254,_0x2728ea){return function(_0x549291){if(_0x549291){var _0x42b3f4=typeof _0x2728ea[_0xeb62('0x32')]==='undefined'&&typeof _0x2728ea['limit']===_0xeb62('0x33');var _0x2948bd=_0x549291[_0xeb62('0x34')];var _0x1dedb7=_0x42b3f4?0x0:_0x2728ea[_0xeb62('0x32')];var _0x332085=_0x42b3f4?_0x549291[_0xeb62('0x34')]:_0x2728ea['offset']+_0x2728ea[_0xeb62('0x35')];var _0x3bc947;if(_0x332085>=_0x2948bd){_0x332085=_0x2948bd;_0x3bc947=0xc8;}else{_0x3bc947=0xce;}_0x141254[_0xeb62('0x2f')](_0x3bc947);return _0x141254[_0xeb62('0x36')]('Content-Range',_0x1dedb7+'-'+_0x332085+'/'+_0x2948bd)[_0xeb62('0x31')](_0x549291);}return null;};}function patchUpdates(_0xedc8e6){return function(_0x3cdd8c){try{jsonpatch[_0xeb62('0x37')](_0x3cdd8c,_0xedc8e6,!![]);}catch(_0x29281a){return BPromise[_0xeb62('0x38')](_0x29281a);}return _0x3cdd8c['save']();};}function saveUpdates(_0x2540cf,_0x3e27b0){return function(_0x5eb216){if(_0x5eb216){return _0x5eb216[_0xeb62('0x39')](_0x2540cf)[_0xeb62('0x23')](function(_0x47eb07){return _0x47eb07;});}return null;};}function removeEntity(_0x5a19d4,_0x2b1c6e){return function(_0x1e0866){if(_0x1e0866){return _0x1e0866['destroy']()[_0xeb62('0x23')](function(){var _0x14eaef=_0x1e0866['get']({'plain':!![]});var _0xcffbaa=_0xeb62('0x3a');return db[_0xeb62('0x3b')][_0xeb62('0x3c')]({'where':{'type':_0xcffbaa,'resourceId':_0x14eaef['id']}})[_0xeb62('0x23')](function(){return _0x1e0866;});})[_0xeb62('0x23')](function(){_0x5a19d4[_0xeb62('0x2f')](0xcc)[_0xeb62('0x30')]();});}};}function handleEntityNotFound(_0x4e47c3,_0x1ecc8a){return function(_0x57311e){if(!_0x57311e){_0x4e47c3['sendStatus'](0x194);}return _0x57311e;};}function handleError(_0x13f8c2,_0x39390d){_0x39390d=_0x39390d||0x1f4;return function(_0x14d393){logger[_0xeb62('0x2a')](_0x14d393['stack']);if(_0x14d393[_0xeb62('0x3d')]){delete _0x14d393[_0xeb62('0x3d')];}_0x13f8c2[_0xeb62('0x2f')](_0x39390d)[_0xeb62('0x3e')](_0x14d393);};}exports[_0xeb62('0x3f')]=function(_0x12eec2,_0x4174f7){var _0x5adae9={'include':[{'model':db[_0xeb62('0x40')],'as':_0xeb62('0x41')}]},_0x1699cc={},_0x47e9f0={'count':0x0,'rows':[]};var _0x5db4b1=_[_0xeb62('0x42')](db[_0xeb62('0x43')]['rawAttributes'],function(_0x318584){return{'name':_0x318584[_0xeb62('0x44')],'type':_0x318584['type'][_0xeb62('0x45')]};});_0x1699cc['model']=_['map'](_0x5db4b1,_0xeb62('0x3d'));_0x1699cc[_0xeb62('0x46')]=_[_0xeb62('0x47')](_0x12eec2['query']);_0x1699cc['filters']=_[_0xeb62('0x48')](_0x1699cc[_0xeb62('0x49')],_0x1699cc[_0xeb62('0x46')]);_0x5adae9[_0xeb62('0x4a')]=_['intersection'](_0x1699cc[_0xeb62('0x49')],qs['fields'](_0x12eec2[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x5adae9['attributes']=_0x5adae9['attributes']['length']?_0x5adae9[_0xeb62('0x4a')]:_0x1699cc[_0xeb62('0x49')];if(!_0x12eec2['query'][_0xeb62('0x4c')](_0xeb62('0x4d'))){_0x5adae9[_0xeb62('0x35')]=qs[_0xeb62('0x35')](_0x12eec2[_0xeb62('0x46')][_0xeb62('0x35')]);_0x5adae9[_0xeb62('0x32')]=qs[_0xeb62('0x32')](_0x12eec2[_0xeb62('0x46')][_0xeb62('0x32')]);}_0x5adae9[_0xeb62('0x4e')]=qs[_0xeb62('0x4f')](_0x12eec2[_0xeb62('0x46')]['sort']);_0x5adae9[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x12eec2['query'],_0x1699cc['filters']),_0x5db4b1);if(_0x12eec2['query'][_0xeb62('0x53')]){_0x5adae9[_0xeb62('0x50')]=_[_0xeb62('0x54')](_0x5adae9[_0xeb62('0x50')],{'$or':_[_0xeb62('0x42')](_0x5db4b1,function(_0x5c1657){if(_0x5c1657[_0xeb62('0x55')]!==_0xeb62('0x56')){var _0x2420bf={};_0x2420bf[_0x5c1657[_0xeb62('0x3d')]]={'$like':'%'+_0x12eec2[_0xeb62('0x46')][_0xeb62('0x53')]+'%'};return _0x2420bf;}})});}_0x5adae9=_['merge']({},_0x5adae9,_0x12eec2['options']);var _0x48e645={'where':_0x5adae9[_0xeb62('0x50')]};return db[_0xeb62('0x43')][_0xeb62('0x34')](_0x48e645)['then'](function(_0x2fc3fa){_0x47e9f0[_0xeb62('0x34')]=_0x2fc3fa;if(_0x12eec2['query'][_0xeb62('0x57')]){_0x5adae9[_0xeb62('0x58')]=[{'all':!![]}];}return db[_0xeb62('0x43')]['findAll'](_0x5adae9);})[_0xeb62('0x23')](function(_0x37bfde){_0x47e9f0[_0xeb62('0x59')]=_0x37bfde;return _0x47e9f0;})[_0xeb62('0x23')](respondWithFilteredResult(_0x4174f7,_0x5adae9))['catch'](handleError(_0x4174f7,null));};exports[_0xeb62('0x5a')]=function(_0x5965d3,_0x49948f){var _0x327dc3={'raw':![],'where':{'id':_0x5965d3[_0xeb62('0x5b')]['id']},'include':[{'model':db[_0xeb62('0x40')],'as':_0xeb62('0x41')}]},_0x4bff1f={};_0x4bff1f[_0xeb62('0x49')]=_[_0xeb62('0x47')](db['ChatWebsite']['rawAttributes']);_0x4bff1f[_0xeb62('0x46')]=_[_0xeb62('0x47')](_0x5965d3[_0xeb62('0x46')]);_0x4bff1f[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x4bff1f[_0xeb62('0x49')],_0x4bff1f[_0xeb62('0x46')]);_0x327dc3['attributes']=_[_0xeb62('0x48')](_0x4bff1f[_0xeb62('0x49')],qs[_0xeb62('0x4b')](_0x5965d3[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x327dc3[_0xeb62('0x4a')]=_0x327dc3[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x327dc3['attributes']:_0x4bff1f[_0xeb62('0x49')];if(_0x5965d3[_0xeb62('0x46')][_0xeb62('0x57')]){_0x327dc3[_0xeb62('0x58')]=[{'all':!![]}];}_0x327dc3=_[_0xeb62('0x54')]({},_0x327dc3,_0x5965d3[_0xeb62('0x5d')]);return db['ChatWebsite'][_0xeb62('0x5e')](_0x327dc3)['then'](handleEntityNotFound(_0x49948f,null))[_0xeb62('0x23')](respondWithResult(_0x49948f,null))[_0xeb62('0x2e')](handleError(_0x49948f,null));};exports[_0xeb62('0x5f')]=function(_0x2270fd,_0x8624b4){return db[_0xeb62('0x43')]['create'](_0x2270fd[_0xeb62('0x60')],{})[_0xeb62('0x23')](function(_0x183e6b){var _0x4c5b14=_0x2270fd['user'][_0xeb62('0x61')]({'plain':!![]});if(!_0x4c5b14)throw new Error(_0xeb62('0x62'));if(_0x4c5b14[_0xeb62('0x63')]===_0xeb62('0x64')){var _0x4c0235=_0x183e6b[_0xeb62('0x61')]({'plain':!![]});var _0x5f2035=_0xeb62('0x3a');return db[_0xeb62('0x65')][_0xeb62('0x5e')]({'where':{'name':_0x5f2035,'userProfileId':_0x4c5b14['userProfileId']},'raw':!![]})[_0xeb62('0x23')](function(_0x13bcf7){if(_0x13bcf7&&_0x13bcf7[_0xeb62('0x66')]===0x0){return db[_0xeb62('0x3b')][_0xeb62('0x5f')]({'name':_0x4c0235[_0xeb62('0x3d')],'resourceId':_0x4c0235['id'],'type':_0x13bcf7['name'],'sectionId':_0x13bcf7['id']},{})[_0xeb62('0x23')](function(){return _0x183e6b;});}else{return _0x183e6b;}})[_0xeb62('0x2e')](function(_0x5448a1){logger[_0xeb62('0x2a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5448a1);throw _0x5448a1;});}return _0x183e6b;})['then'](respondWithResult(_0x8624b4,0xc9))[_0xeb62('0x2e')](handleError(_0x8624b4,null));};exports['update']=function(_0x5949d5,_0x3219c8){if(_0x5949d5[_0xeb62('0x60')]['id']){delete _0x5949d5[_0xeb62('0x60')]['id'];}return db['ChatWebsite'][_0xeb62('0x5e')]({'where':{'id':_0x5949d5[_0xeb62('0x5b')]['id']},'include':[{'model':db[_0xeb62('0x40')],'as':_0xeb62('0x41')}]})['then'](handleEntityNotFound(_0x3219c8,null))[_0xeb62('0x23')](saveUpdates(_0x5949d5[_0xeb62('0x60')],null))[_0xeb62('0x23')](respondWithResult(_0x3219c8,null))[_0xeb62('0x2e')](handleError(_0x3219c8,null));};exports[_0xeb62('0x3c')]=function(_0x4265f8,_0xd76a1){return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x4265f8[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0xd76a1,null))[_0xeb62('0x23')](removeEntity(_0xd76a1,null))[_0xeb62('0x2e')](handleError(_0xd76a1,null));};exports[_0xeb62('0x67')]=function(_0x25e106,_0x5f2ff3){return db[_0xeb62('0x43')][_0xeb62('0x67')]()[_0xeb62('0x23')](respondWithResult(_0x5f2ff3,null))[_0xeb62('0x2e')](handleError(_0x5f2ff3,null));};exports[_0xeb62('0x68')]=function(_0x530a38,_0x301fef,_0x300ab1){if(_0x530a38[_0xeb62('0x60')]['id']){delete _0x530a38['body']['id'];}return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x530a38[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x301fef,null))[_0xeb62('0x23')](function(_0x360e34){if(_0x360e34){_0x530a38[_0xeb62('0x60')][_0xeb62('0x69')]=_0x360e34['id'];return db[_0xeb62('0x6a')][_0xeb62('0x5f')](_0x530a38['body']);}})[_0xeb62('0x23')](respondWithResult(_0x301fef,null))['catch'](handleError(_0x301fef,null));};exports[_0xeb62('0x6b')]=function(_0x47ea6f,_0x3554a9,_0x808283){var _0x2cc6d5={'raw':![],'where':{}};var _0xe18a22={};var _0x5a2365={'count':0x0,'rows':[]};return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x47ea6f['params']['id']}})['then'](handleEntityNotFound(_0x3554a9,null))['then'](function(_0x1a9cd4){if(_0x1a9cd4){_0xe18a22['model']=_[_0xeb62('0x47')](db[_0xeb62('0x6a')][_0xeb62('0x6d')]);_0xe18a22['query']=_[_0xeb62('0x47')](_0x47ea6f['query']);_0xe18a22['filters']=_[_0xeb62('0x48')](_0xe18a22[_0xeb62('0x49')],_0xe18a22['query']);_0x2cc6d5[_0xeb62('0x4a')]=_['intersection'](_0xe18a22[_0xeb62('0x49')],qs[_0xeb62('0x4b')](_0x47ea6f['query']['fields']));_0x2cc6d5[_0xeb62('0x4a')]=_0x2cc6d5[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x2cc6d5[_0xeb62('0x4a')]:_0xe18a22[_0xeb62('0x49')];if(!_0x47ea6f[_0xeb62('0x46')]['hasOwnProperty']('nolimit')){_0x2cc6d5[_0xeb62('0x35')]=qs[_0xeb62('0x35')](_0x47ea6f[_0xeb62('0x46')][_0xeb62('0x35')]);_0x2cc6d5[_0xeb62('0x32')]=qs['offset'](_0x47ea6f[_0xeb62('0x46')]['offset']);}_0x2cc6d5[_0xeb62('0x4e')]=qs[_0xeb62('0x4f')](_0x47ea6f[_0xeb62('0x46')][_0xeb62('0x4f')]);_0x2cc6d5[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x47ea6f[_0xeb62('0x46')],_0xe18a22[_0xeb62('0x51')]));_0x2cc6d5[_0xeb62('0x50')][_0xeb62('0x69')]=_0x1a9cd4['id'];if(_0x47ea6f['query']['filter']){_0x2cc6d5[_0xeb62('0x50')]=_[_0xeb62('0x54')](_0x2cc6d5['where'],{'$or':_[_0xeb62('0x42')](_0x2cc6d5[_0xeb62('0x4a')],function(_0x813940){var _0x536e58={};_0x536e58[_0x813940]={'$like':'%'+_0x47ea6f[_0xeb62('0x46')][_0xeb62('0x53')]+'%'};return _0x536e58;})});}_0x2cc6d5=_[_0xeb62('0x54')]({},_0x2cc6d5,_0x47ea6f['options']);return db[_0xeb62('0x6a')][_0xeb62('0x34')]({'where':_0x2cc6d5[_0xeb62('0x50')]})[_0xeb62('0x23')](function(_0x2bc766){_0x5a2365['count']=_0x2bc766;if(_0x47ea6f[_0xeb62('0x46')]['includeAll']){_0x2cc6d5[_0xeb62('0x58')]=[{'all':!![]}];}return db['Disposition'][_0xeb62('0x6e')](_0x2cc6d5);})[_0xeb62('0x23')](function(_0x30680c){_0x5a2365[_0xeb62('0x59')]=_0x30680c;return _0x5a2365;});}})[_0xeb62('0x23')](respondWithFilteredResult(_0x3554a9,_0x2cc6d5))['catch'](handleError(_0x3554a9,null));};exports[_0xeb62('0x6f')]=function(_0x1f8c47,_0x3b3178,_0x1d951d){return db[_0xeb62('0x43')]['find']({'where':{'id':_0x1f8c47[_0xeb62('0x5b')]['id']}})['then'](handleEntityNotFound(_0x3b3178,null))[_0xeb62('0x23')](function(_0xf4de6f){if(_0xf4de6f){return _0xf4de6f[_0xeb62('0x6f')](_0x1f8c47[_0xeb62('0x46')][_0xeb62('0x70')]);}})[_0xeb62('0x23')](respondWithStatusCode(_0x3b3178,null))['catch'](handleError(_0x3b3178,null));};exports[_0xeb62('0x71')]=function(_0x245827,_0x1625f6,_0xaf8cfd){if(_0x245827[_0xeb62('0x60')]['id']){delete _0x245827['body']['id'];}return db['ChatWebsite'][_0xeb62('0x5e')]({'where':{'id':_0x245827[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x1625f6,null))['then'](function(_0x32f96e){if(_0x32f96e){_0x245827[_0xeb62('0x60')][_0xeb62('0x69')]=_0x32f96e['id'];return db['CannedAnswer'][_0xeb62('0x5f')](_0x245827['body']);}})['then'](respondWithResult(_0x1625f6,null))[_0xeb62('0x2e')](handleError(_0x1625f6,null));};exports['getAnswers']=function(_0x44f2b9,_0x1da047,_0x4a65c0){var _0x290ee1={'raw':![],'where':{}};var _0x4262c8={};var _0x4dc88f={'count':0x0,'rows':[]};return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x44f2b9[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x1da047,null))[_0xeb62('0x23')](function(_0x532773){if(_0x532773){_0x4262c8[_0xeb62('0x49')]=_['keys'](db[_0xeb62('0x72')][_0xeb62('0x6d')]);_0x4262c8[_0xeb62('0x46')]=_[_0xeb62('0x47')](_0x44f2b9[_0xeb62('0x46')]);_0x4262c8[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x4262c8['model'],_0x4262c8[_0xeb62('0x46')]);_0x290ee1[_0xeb62('0x4a')]=_[_0xeb62('0x48')](_0x4262c8[_0xeb62('0x49')],qs[_0xeb62('0x4b')](_0x44f2b9[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x290ee1[_0xeb62('0x4a')]=_0x290ee1[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x290ee1[_0xeb62('0x4a')]:_0x4262c8[_0xeb62('0x49')];if(!_0x44f2b9['query'][_0xeb62('0x4c')]('nolimit')){_0x290ee1[_0xeb62('0x35')]=qs[_0xeb62('0x35')](_0x44f2b9[_0xeb62('0x46')]['limit']);_0x290ee1[_0xeb62('0x32')]=qs['offset'](_0x44f2b9['query'][_0xeb62('0x32')]);}_0x290ee1[_0xeb62('0x4e')]=qs['sort'](_0x44f2b9['query']['sort']);_0x290ee1[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x44f2b9[_0xeb62('0x46')],_0x4262c8[_0xeb62('0x51')]));_0x290ee1[_0xeb62('0x50')][_0xeb62('0x69')]=_0x532773['id'];if(_0x44f2b9[_0xeb62('0x46')][_0xeb62('0x53')]){_0x290ee1[_0xeb62('0x50')]=_['merge'](_0x290ee1[_0xeb62('0x50')],{'$or':_[_0xeb62('0x42')](_0x290ee1['attributes'],function(_0x2d52a5){var _0x1d260e={};_0x1d260e[_0x2d52a5]={'$like':'%'+_0x44f2b9[_0xeb62('0x46')]['filter']+'%'};return _0x1d260e;})});}_0x290ee1=_[_0xeb62('0x54')]({},_0x290ee1,_0x44f2b9['options']);return db['CannedAnswer'][_0xeb62('0x34')]({'where':_0x290ee1[_0xeb62('0x50')]})[_0xeb62('0x23')](function(_0x143cb0){_0x4dc88f[_0xeb62('0x34')]=_0x143cb0;if(_0x44f2b9[_0xeb62('0x46')][_0xeb62('0x57')]){_0x290ee1[_0xeb62('0x58')]=[{'all':!![]}];}return db[_0xeb62('0x72')][_0xeb62('0x6e')](_0x290ee1);})[_0xeb62('0x23')](function(_0x50691d){_0x4dc88f[_0xeb62('0x59')]=_0x50691d;return _0x4dc88f;});}})[_0xeb62('0x23')](respondWithFilteredResult(_0x1da047,_0x290ee1))[_0xeb62('0x2e')](handleError(_0x1da047,null));};exports[_0xeb62('0x73')]=function(_0x51f23d,_0x4e6457,_0x33023e){return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x51f23d['params']['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x4e6457,null))[_0xeb62('0x23')](function(_0x147525){if(_0x147525){return _0x147525[_0xeb62('0x73')](_0x51f23d[_0xeb62('0x46')][_0xeb62('0x70')]);}})[_0xeb62('0x23')](respondWithStatusCode(_0x4e6457,null))['catch'](handleError(_0x4e6457,null));};exports['addLogo']=function(_0x6752f6,_0x56e1c2,_0x1b55e6){_0x6752f6['body']['sitepic']=_0x6752f6['file'][_0xeb62('0x74')];return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x6752f6[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x56e1c2,null))[_0xeb62('0x23')](saveUpdates(_0x6752f6['body'],null))[_0xeb62('0x23')](respondWithResult(_0x56e1c2,null))[_0xeb62('0x2e')](handleError(_0x56e1c2,null));};exports[_0xeb62('0x75')]=function(_0x17cb1a,_0x5cec1d,_0x372f14){_0x17cb1a[_0xeb62('0x60')]['agentAvatar']=_0x17cb1a[_0xeb62('0x76')][_0xeb62('0x74')];return db['ChatWebsite'][_0xeb62('0x5e')]({'where':{'id':_0x17cb1a['params']['id']}})['then'](handleEntityNotFound(_0x5cec1d,null))[_0xeb62('0x23')](saveUpdates(_0x17cb1a[_0xeb62('0x60')],null))[_0xeb62('0x23')](respondWithResult(_0x5cec1d,null))[_0xeb62('0x2e')](handleError(_0x5cec1d,null));};exports[_0xeb62('0x77')]=function(_0x412964,_0x314b1f,_0x56a2b2){_0x412964[_0xeb62('0x60')][_0xeb62('0x78')]=_0x412964[_0xeb62('0x76')][_0xeb62('0x74')];return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x412964[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x314b1f,null))[_0xeb62('0x23')](saveUpdates(_0x412964['body'],null))[_0xeb62('0x23')](respondWithResult(_0x314b1f,null))[_0xeb62('0x2e')](handleError(_0x314b1f,null));};exports[_0xeb62('0x79')]=function(_0x3f9f6e,_0x1e81c6,_0x477984){_0x3f9f6e[_0xeb62('0x60')][_0xeb62('0x7a')]=_0x3f9f6e[_0xeb62('0x76')][_0xeb62('0x74')];return db[_0xeb62('0x43')]['find']({'where':{'id':_0x3f9f6e[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x1e81c6,null))[_0xeb62('0x23')](saveUpdates(_0x3f9f6e[_0xeb62('0x60')],null))[_0xeb62('0x23')](respondWithResult(_0x1e81c6,null))[_0xeb62('0x2e')](handleError(_0x1e81c6,null));};exports[_0xeb62('0x7b')]=function(_0x1558a0,_0xe6e0a3,_0x37edd1){var _0x5d6640=path['join'](config['root'],_0xeb62('0x7c'));var _0x2e0e54={'where':{'id':_0x1558a0[_0xeb62('0x5b')]['id']},'attributes':['id',_0xeb62('0x7d')],'raw':!![]};var _0x2de28f=![];return require(_0xeb62('0x18'))[_0xeb62('0x7e')]()[_0xeb62('0x23')](function(_0x1667b1){if(_0x1667b1){_0x2de28f=_0x1667b1[_0xeb62('0x7f')];}})[_0xeb62('0x23')](function(){return db[_0xeb62('0x43')][_0xeb62('0x5e')](_0x2e0e54);})[_0xeb62('0x23')](handleEntityNotFound(_0xe6e0a3,null))[_0xeb62('0x23')](function(_0x480b37){if(_0x480b37){if(!_['isNil'](_0x480b37[_0xeb62('0x7d')])){if(fs['existsSync'](path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0x82'),_0x480b37['sitepic']))&&_0x2de28f){_0x5d6640=path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0x82'),_0x480b37['sitepic']);}}return _0xe6e0a3[_0xeb62('0x83')](_0x5d6640);}})[_0xeb62('0x2e')](handleError(_0xe6e0a3,null));};exports[_0xeb62('0x84')]=function(_0x2b81df,_0x50215e,_0x437eca){var _0x170bc=path[_0xeb62('0x80')](config[_0xeb62('0x81')],'server/files/images/avatars/default_avatar.png');var _0x141a66={'where':{'id':_0x2b81df[_0xeb62('0x5b')]['id']},'attributes':['id',_0xeb62('0x85')],'raw':!![]};return db[_0xeb62('0x43')][_0xeb62('0x5e')](_0x141a66)[_0xeb62('0x23')](handleEntityNotFound(_0x50215e,null))['then'](function(_0xf4e3c){if(_0xf4e3c){if(!_['isNil'](_0xf4e3c[_0xeb62('0x85')])){if(fs['existsSync'](path[_0xeb62('0x80')](config['root'],_0xeb62('0x86'),_0xf4e3c[_0xeb62('0x85')]))){_0x170bc=path[_0xeb62('0x80')](config['root'],'server/files/images/avatars/',_0xf4e3c[_0xeb62('0x85')]);}}return _0x50215e[_0xeb62('0x83')](_0x170bc);}})[_0xeb62('0x2e')](handleError(_0x50215e,null));};exports[_0xeb62('0x87')]=function(_0x4322c5,_0x32d7ba,_0x1c6e98){var _0x4c6c87=path[_0xeb62('0x80')](config[_0xeb62('0x81')],'server/files/images/avatars/customer_avatar.png');var _0x12060a={'where':{'id':_0x4322c5['params']['id']},'attributes':['id',_0xeb62('0x78'),_0xeb62('0x88')],'raw':!![]};return db[_0xeb62('0x43')]['find'](_0x12060a)[_0xeb62('0x23')](handleEntityNotFound(_0x32d7ba,null))[_0xeb62('0x23')](function(_0x481813){if(_0x481813){if(!_[_0xeb62('0x89')](_0x481813[_0xeb62('0x78')])){if(fs[_0xeb62('0x8a')](path['join'](config['root'],_0xeb62('0x86'),_0x481813[_0xeb62('0x78')]))&&_0x481813[_0xeb62('0x88')]){_0x4c6c87=path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0x86'),_0x481813[_0xeb62('0x78')]);}}return _0x32d7ba[_0xeb62('0x83')](_0x4c6c87);}})['catch'](handleError(_0x32d7ba,null));};exports[_0xeb62('0x8b')]=function(_0x1dda50,_0x38b37f,_0x20b9c3){var _0x1a01aa=path[_0xeb62('0x80')](config['root'],'server/files/images/avatars/system_avatar.png');var _0x52d22c={'where':{'id':_0x1dda50['params']['id']},'attributes':['id',_0xeb62('0x7a')],'raw':!![]};return db[_0xeb62('0x43')][_0xeb62('0x5e')](_0x52d22c)[_0xeb62('0x23')](handleEntityNotFound(_0x38b37f,null))['then'](function(_0xb14bb2){if(_0xb14bb2){if(!_[_0xeb62('0x89')](_0xb14bb2[_0xeb62('0x7a')])){if(fs['existsSync'](path['join'](config[_0xeb62('0x81')],'server/files/images/avatars/',_0xb14bb2[_0xeb62('0x7a')]))){_0x1a01aa=path[_0xeb62('0x80')](config['root'],_0xeb62('0x86'),_0xb14bb2[_0xeb62('0x7a')]);}}return _0x38b37f[_0xeb62('0x83')](_0x1a01aa);}})[_0xeb62('0x2e')](handleError(_0x38b37f,null));};exports[_0xeb62('0x8c')]=function(_0x2cf5bd,_0x260657,_0x2fb598){var _0x13121f=require(_0xeb62('0x8d'));var _0x42fdad=new _0x13121f();var _0x5d4699=_0x42fdad[_0xeb62('0x8e')](_0x2cf5bd[_0xeb62('0x8f')][_0xeb62('0x90')])['getResult']();var _0x4d0b5a={'body':_0x2cf5bd['body'],'channel':_0xeb62('0x91')};var _0x3b3211=[];var _0x4dd436=[];var _0x101d2e={};var _0x1251d0=![];return db[_0xeb62('0x92')][_0xeb62('0x67')]()['then'](function(_0x3e1b59){if(!_0x3e1b59){throw new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))](_0xeb62('0x95'));}_0x3b3211=_[_0xeb62('0x96')](_['keys'](_0x3e1b59),['createdAt',_0xeb62('0x97')]);_0x4dd436=_['difference'](_[_0xeb62('0x47')](_0x3e1b59),['createdAt',_0xeb62('0x97'),_0xeb62('0x98'),_0xeb62('0x99')]);if(_0x2cf5bd[_0xeb62('0x60')]['id']){delete _0x2cf5bd['body']['id'];}if(_[_0xeb62('0x89')](_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9a')])){throw new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))](_0xeb62('0x9b'));}if(_[_0xeb62('0x89')](_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x60')])||_0x2cf5bd['body'][_0xeb62('0x60')]===''){throw new db['Sequelize'][(_0xeb62('0x94'))](_0xeb62('0x9c'));}if(_[_0xeb62('0x89')](_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9d')])){throw new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))](_0xeb62('0x9e')+_0x4dd436);}if(!_['includes'](_0x4dd436,_0x2cf5bd[_0xeb62('0x60')]['mapKey'])){throw new db['Sequelize'][(_0xeb62('0x94'))](_0xeb62('0x9f')+_0x4dd436);}_0x101d2e[_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9d')]]=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9a')];})[_0xeb62('0x23')](function(){return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x2cf5bd[_0xeb62('0x5b')]['id']},'include':[{'model':db['CmList'],'as':_0xeb62('0xa0'),'include':[{'model':db[_0xeb62('0x92')],'as':'Contacts','where':_0x101d2e,'limit':0x1,'order':[[_0xeb62('0x97'),_0xeb62('0xa1')]]}]},{'model':db['ChatApplication'],'as':_0xeb62('0xa2')}]});})[_0xeb62('0x23')](handleEntityNotFound(_0x260657,null))[_0xeb62('0x23')](function(_0x45270f){if(_0x45270f&&_0x45270f[_0xeb62('0xa0')]){_0x4d0b5a['account']=_0x45270f;_0x4d0b5a[_0xeb62('0xa3')]=_0x45270f[_0xeb62('0xa2')];_0x4d0b5a['list']=_0x45270f['List'];_0x4d0b5a[_0xeb62('0xa3')]=_[_0xeb62('0xa4')](_0x4d0b5a[_0xeb62('0xa3')],[_0xeb62('0xa5')],[_0xeb62('0xa6')]);if(_0x4d0b5a[_0xeb62('0xa7')][_0xeb62('0xa2')]){delete _0x4d0b5a[_0xeb62('0xa7')]['Applications'];}if(_0x4d0b5a['account'][_0xeb62('0xa0')]&&_0x4d0b5a[_0xeb62('0xa7')]['List'][_0xeb62('0xa8')]['length']){return _0x4d0b5a[_0xeb62('0xa7')][_0xeb62('0xa0')][_0xeb62('0xa8')][0x0];}var _0x31f42d=_[_0xeb62('0x1b')](_0x2cf5bd['body'],{'firstName':_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9a')],'ListId':_0x45270f['ListId']});_0x31f42d[_0x2cf5bd[_0xeb62('0x60')]['mapKey']]=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0x9a')];return db[_0xeb62('0x92')][_0xeb62('0x5f')](_0x31f42d,{'fields':_0x3b3211,'raw':!![]});}})[_0xeb62('0x23')](handleEntityNotFound(_0x260657,null))[_0xeb62('0x23')](function(_0x3a8223){_0x4d0b5a[_0xeb62('0xa9')]=_0x3a8223;var _0x33e70c=_0x2cf5bd[_0xeb62('0x60')]['customerIp'];if(_0x2cf5bd[_0xeb62('0x8f')]['cf-connecting-ip']){_0x33e70c=_0x2cf5bd[_0xeb62('0x8f')][_0xeb62('0xaa')];}else if(_0x2cf5bd[_0xeb62('0x8f')][_0xeb62('0xab')]){_0x33e70c=_[_0xeb62('0xac')](_0x2cf5bd[_0xeb62('0x8f')][_0xeb62('0xab')][_0xeb62('0xad')](','));}if(_0x3a8223){var _0x458600={'ContactId':_0x3a8223['id'],'ChatWebsiteId':_0x2cf5bd[_0xeb62('0x5b')]['id'],'from':(_0x3a8223[_0xeb62('0xae')]||'')+'\x20'+(_0x3a8223['lastName']||''),'customerIp':_0x33e70c,'customerPort':_0x2cf5bd[_0xeb62('0x8f')][_0xeb62('0xaf')]?_0x2cf5bd['headers']['x-real-port']:null,'referer':_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xb0')],'browserName':_0x5d4699[_0xeb62('0xb1')][_0xeb62('0x3d')]&&_0x5d4699['browser'][_0xeb62('0xb2')]?util[_0xeb62('0xb3')](_0xeb62('0xb4'),_0x5d4699['browser']['name'],_0x5d4699[_0xeb62('0xb1')][_0xeb62('0xb2')]):_0xeb62('0xb5'),'browserVersion':_0x5d4699[_0xeb62('0xb1')][_0xeb62('0xb2')]||_0xeb62('0xb5'),'osName':util[_0xeb62('0xb3')](_0xeb62('0xb4'),_0x5d4699['os']['name'],_0x5d4699['os'][_0xeb62('0xb2')]),'osVersion':_0x5d4699['os'][_0xeb62('0xb2')],'deviceModel':_0x5d4699[_0xeb62('0xb6')]['model']&&_0x5d4699[_0xeb62('0xb6')][_0xeb62('0xb7')]?util[_0xeb62('0xb3')](_0xeb62('0xb8'),_0x5d4699['device'][_0xeb62('0x49')],_0x5d4699[_0xeb62('0xb6')][_0xeb62('0xb7')],_0x5d4699[_0xeb62('0xb6')][_0xeb62('0x55')]):null,'deviceVendor':_0x5d4699[_0xeb62('0xb6')]['vendor'],'deviceType':_0x5d4699['device'][_0xeb62('0x55')],'formData':JSON[_0xeb62('0x29')](_0x2cf5bd[_0xeb62('0x60')])};var _0x2d8c88={'ChatWebsiteId':_0x2cf5bd['params']['id'],'closed':![]};if(_0x2cf5bd['body']['threadId']){_0x2d8c88[_0xeb62('0xb9')]=_0x2cf5bd[_0xeb62('0x60')]['threadId'];return db[_0xeb62('0xba')][_0xeb62('0x5e')]({'where':_0x2d8c88})['then'](function(_0x168d2e){if(_0x168d2e){return[_0x168d2e,![]];}_0x458600[_0xeb62('0xb9')]=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xb9')];_0x458600['externalUrl']=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xbb')];return db['ChatInteraction'][_0xeb62('0x5f')](_0x458600)[_0xeb62('0x23')](function(_0x41b40a){return[_0x41b40a,!![]];});});}_0x2d8c88['ContactId']=_0x3a8223['id'];if(_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xbc')]&&_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xbc')]['id']){_0x2d8c88['id']=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xbc')]['id'];return db[_0xeb62('0xba')][_0xeb62('0x5e')]({'where':_0x2d8c88})[_0xeb62('0x23')](function(_0x22eef9){if(_0x22eef9){return[_0x22eef9,![]];}return db[_0xeb62('0xba')][_0xeb62('0x5f')](_0x458600)[_0xeb62('0x23')](function(_0x50e1ee){return[_0x50e1ee,!![]];});});}return db[_0xeb62('0xba')][_0xeb62('0x5f')](_0x458600)[_0xeb62('0x23')](function(_0x5ee8be){return[_0x5ee8be,!![]];});}})[_0xeb62('0xbd')](function(_0x383240,_0x405648){if(_0x383240){_0x1251d0=_0x405648;if(!_0x405648){var _0x17c74c={'from':(_0x4d0b5a[_0xeb62('0xa9')][_0xeb62('0xae')]||'')+'\x20'+(_0x4d0b5a[_0xeb62('0xa9')][_0xeb62('0xbe')]||'')};if(_0x2cf5bd['body']['threadId']&&_0x2cf5bd[_0xeb62('0x60')]['messageId']&&_0x2cf5bd['body']['threadId']!=_0x2cf5bd['body'][_0xeb62('0xbf')]){_0x17c74c[_0xeb62('0xb9')]=_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xbf')];}return _0x383240[_0xeb62('0x39')](_0x17c74c);}else{return _0x383240;}}})[_0xeb62('0x23')](function(_0x33fd17){_0x4d0b5a[_0xeb62('0xbc')]=_0x33fd17['get']({'plain':!![]});_0x4d0b5a['interaction']['created']=_0x1251d0;if(_0x4d0b5a[_0xeb62('0xbc')][_0xeb62('0xc0')]){if(_0x4d0b5a[_0xeb62('0xa7')]['autoclose']){_0x4d0b5a[_0xeb62('0xa3')][_0xeb62('0xc1')]({'id':0x0,'priority':_0x4d0b5a[_0xeb62('0xa3')][_0xeb62('0x5c')]+0x1,'app':_0xeb62('0xc2'),'appdata':_0xeb62('0xc3'),'interval':_0xeb62('0xc4')});}}return db[_0xeb62('0xc5')][_0xeb62('0x5f')]({'body':_0x2cf5bd['body']['body'],'ChatWebsiteId':_0x2cf5bd[_0xeb62('0x5b')]['id'],'ChatInteractionId':_0x33fd17['id'],'direction':'in','ContactId':_0x4d0b5a['contact']['id'],'AttachmentId':_0x2cf5bd[_0xeb62('0x60')][_0xeb62('0xc6')]});})['then'](function(_0x52d3f1){_0x4d0b5a['message']=_0x52d3f1;if(_0x4d0b5a[_0xeb62('0xbc')][_0xeb62('0xc7')]){return db[_0xeb62('0xc8')][_0xeb62('0x5e')]({'attributes':['id','name'],'where':{'id':_0x4d0b5a[_0xeb62('0xbc')][_0xeb62('0xc7')]}})[_0xeb62('0x23')](function(_0x107af8){if(_0x107af8){_0x4d0b5a[_0xeb62('0xa3')][_0xeb62('0xc9')]({'id':0x0,'priority':0x0,'app':_0xeb62('0xca'),'appdata':_0x107af8[_0xeb62('0x3d')]+','+(_0x4d0b5a['account']['waitForTheAssignedAgent']||0xa),'interval':'*,*,*,*'});_0x4d0b5a[_0xeb62('0xcb')]=!![];}return respondWithRpcPromise(_0xeb62('0xcc'),_0xeb62('0xcd'),_0x4d0b5a);});}return respondWithRpcPromise(_0xeb62('0xcc'),_0xeb62('0xcd'),_0x4d0b5a);})['then'](function(_0x16fb0e){respondWithRpcPromise(_0xeb62('0xce'),_0xeb62('0xce'),{'event':_0xeb62('0x8c'),'message':_0x16fb0e},client9002);return _0x16fb0e;})[_0xeb62('0x23')](respondWithResult(_0x260657,null))[_0xeb62('0x2e')](handleError(_0x260657,null));};exports[_0xeb62('0xcf')]=function(_0x370b7,_0x176b38,_0x25ed53){var _0x558aab,_0x58a753,_0x502f21;var _0x4571f9=[];var _0x27cfcd=[];var _0x1d4a1e={};var _0x4b00ce=_0x370b7[_0xeb62('0xd0')]||[];var _0x196017=[];var _0x21798c;return db[_0xeb62('0x92')][_0xeb62('0x67')]()[_0xeb62('0x23')](function(_0x66399c){if(!_0x66399c){throw new db['Sequelize'][(_0xeb62('0x94'))]('no\x20available\x20attributes');}_0x27cfcd=_[_0xeb62('0x96')](_[_0xeb62('0x47')](_0x66399c),[_0xeb62('0xd1'),_0xeb62('0x97')]);_0x4571f9=_['difference'](_[_0xeb62('0x47')](_0x66399c),[_0xeb62('0xd1'),_0xeb62('0x97'),_0xeb62('0x98'),_0xeb62('0x99')]);if(_0x370b7[_0xeb62('0x60')]['id']){delete _0x370b7[_0xeb62('0x60')]['id'];}if(_[_0xeb62('0x89')](_0x370b7[_0xeb62('0x60')]['from'])){throw _0x176b38[_0xeb62('0x2f')](0x1f4)['send'](new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))](_0xeb62('0x9b')));}if(_[_0xeb62('0x89')](_0x370b7[_0xeb62('0x60')][_0xeb62('0x60')])||_0x370b7[_0xeb62('0x60')][_0xeb62('0x60')]===''){throw _0x176b38[_0xeb62('0x2f')](0x1f4)[_0xeb62('0x3e')](new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))]('body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0xeb62('0x89')](_0x370b7['body']['mapKeyOffline'])){throw _0x176b38[_0xeb62('0x2f')](0x1f4)[_0xeb62('0x3e')](new db[(_0xeb62('0x93'))][(_0xeb62('0x94'))]('mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x4571f9));}if(!_['includes'](_0x4571f9,_0x370b7['body'][_0xeb62('0xd2')])){throw _0x176b38[_0xeb62('0x2f')](0x1f4)[_0xeb62('0x3e')](new db['Sequelize'][(_0xeb62('0x94'))](_0xeb62('0xd3')+_0x4571f9));}_0x1d4a1e[_0x370b7[_0xeb62('0x60')][_0xeb62('0xd2')]]=_0x370b7['body'][_0xeb62('0x9a')];})[_0xeb62('0x23')](function(){return db['ChatWebsite'][_0xeb62('0x5e')]({'where':{'id':_0x370b7[_0xeb62('0x5b')]['id']},'include':[{'model':db[_0xeb62('0xd4')],'as':_0xeb62('0xa0')},{'model':db[_0xeb62('0xd5')],'as':_0xeb62('0xd5')}]});})[_0xeb62('0x23')](handleEntityNotFound(_0x176b38,null))['then'](function(_0x33db31){if(_0x33db31&&_0x33db31[_0xeb62('0xa0')]){_0x58a753=_0x33db31;var _0x21b3ca=_[_0xeb62('0x1b')](_0x370b7[_0xeb62('0x60')],{'firstName':_0x370b7['body'][_0xeb62('0x9a')],'phone':_0x370b7[_0xeb62('0x60')][_0xeb62('0x9a')],'ListId':_0x33db31[_0xeb62('0x99')]});_0x21b3ca[_0x370b7[_0xeb62('0x60')][_0xeb62('0xd2')]]=_0x370b7['body'][_0xeb62('0x9a')];return db[_0xeb62('0x92')][_0xeb62('0xd6')]({'where':_0x1d4a1e,'defaults':_0x21b3ca});}})[_0xeb62('0xbd')](function(_0x73219d){if(_0x73219d){_0x502f21=_0x73219d;var _0x157644=fs['readFileSync'](path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0xd7')),'utf8');var _0xda56e6=ejs[_0xeb62('0xd8')](_0x157644,{'body':_['toPairs'](_0x370b7['body'][_0xeb62('0x60')]),'bodyTitle':_0x58a753[_0xeb62('0xd9')]});return db['ChatOfflineMessage'][_0xeb62('0x5f')]({'body':_0xda56e6,'ContactId':_0x73219d['id'],'ChatWebsiteId':_0x58a753['id']});}})[_0xeb62('0x23')](function(_0x15e73e){_0x21798c=_0x15e73e;if(_0x4b00ce[_0xeb62('0x5c')]){var _0x3c813a=_0x4b00ce[_0xeb62('0x42')](function(_0x5a545c){return{'name':_0x5a545c[_0xeb62('0xda')],'basename':_0x5a545c[_0xeb62('0x74')],'type':_0x5a545c[_0xeb62('0xdb')],'ChatOfflineMessageId':_0x15e73e['id']};});_0x196017=_0x3c813a['map'](_0x58bd52=>{var _0x1bb0d0={'filename':_0x58bd52[_0xeb62('0x3d')],'path':path[_0xeb62('0x80')](config['root'],_0xeb62('0xdc'),_0xeb62('0xd0'),_0xeb62('0xdd'),_0xeb62('0xde'),_0x58bd52[_0xeb62('0xdf')])};return _0x1bb0d0;});if(!_0x58a753[_0xeb62('0xe0')]){return db[_0xeb62('0xe1')]['transaction'](function(_0x13dde4){return db[_0xeb62('0xe2')]['bulkCreate'](_0x3c813a,{'transaction':_0x13dde4});});}}})[_0xeb62('0x23')](function(){if(_0x21798c){_0x558aab=_0x21798c;return db['MailAccount'][_0xeb62('0x6c')]({'where':{'active':!![]},'include':[{'model':db[_0xeb62('0xe3')],'as':'Smtp','raw':!![]}]});}})[_0xeb62('0x23')](function(_0x1134ee){if(_0x1134ee&&_0x1134ee[_0xeb62('0xe4')]&&_0x58a753['forwardOffline']&&_0x58a753[_0xeb62('0xe5')]){var _0x37d237={'tls':{'rejectUnauthorized':![]}};if(_0x1134ee['Smtp'][_0xeb62('0xe6')]){_0x37d237[_0xeb62('0xe6')]=_0x1134ee[_0xeb62('0xe4')]['service'];}else{_0x37d237[_0xeb62('0xe7')]=_0x1134ee['Smtp'][_0xeb62('0xe7')];_0x37d237[_0xeb62('0xe8')]=_0x1134ee[_0xeb62('0xe4')][_0xeb62('0xe8')];_0x37d237[_0xeb62('0xe9')]=_0x1134ee[_0xeb62('0xe4')][_0xeb62('0xe9')];}if(_0x1134ee[_0xeb62('0xe4')][_0xeb62('0xea')]){_0x37d237['auth']={'user':_0x1134ee['Smtp']['user'],'pass':_0x1134ee[_0xeb62('0xe4')][_0xeb62('0xeb')]};}return respondWithRpcPromise(_0xeb62('0xec'),_0xeb62('0xed'),{'account':_0x37d237,'message':{'from':util[_0xeb62('0xb3')]('\x22%s\x22\x20<%s>',_0x1134ee['name'],_0x1134ee[_0xeb62('0xee')]||_0x1134ee[_0xeb62('0xe4')][_0xeb62('0x64')]),'to':_0x58a753[_0xeb62('0xe5')],'subject':_0x58a753['offlineMessageSubject'],'html':_0x558aab[_0xeb62('0x60')],'attachments':_0x196017}},client9003)[_0xeb62('0x23')](function(){return _0x558aab;})['catch'](function(_0xb6da9e){console[_0xeb62('0x2a')](_0xb6da9e);});}})[_0xeb62('0x23')](function(){if(_0x58a753&&_0x58a753['openNewInteraction']&&_0x58a753[_0xeb62('0xef')]){var _0x5a7b58=[];if(_0x4b00ce[_0xeb62('0x5c')]){_0x5a7b58=_0x4b00ce[_0xeb62('0x42')](function(_0x4372b4){return{'name':_0x4372b4['originalname'],'basename':_0x4372b4[_0xeb62('0x74')],'type':_0x4372b4['mimetype'],'ChatOfflineMessageId':_0x21798c['id']};});}var _0x21a697;if(!_[_0xeb62('0x89')](_0x58a753['subjectOffline'])){var _0x2f7717=_['map'](_0x370b7[_0xeb62('0x60')],function(_0x18e296){return _0x18e296;});var _0x825957=_[_0xeb62('0xf0')](_0x2f7717)[0x0];var _0x47b719=_['mapValues'](_0x825957,function(_0x58539d){return _0x58539d;});_0x21a697=_0x47b719[0x1][_0x58a753['subjectOffline']];}var _0x23f684={'from':_0x502f21[_0xeb62('0xee')],'firstName':_0x502f21[_0xeb62('0xae')],'lastName':_0x502f21[_0xeb62('0xbe')],'mapKey':_0xeb62('0xee'),'message':{'from':_0x502f21['email'],'to':_0x58a753[_0xeb62('0xd5')][_0xeb62('0xee')],'cc':'','subject':_[_0xeb62('0x89')](_0x21a697)?_0x58a753[_0xeb62('0xf1')]:_0x21a697,'messageId':'','sentAt':new Date(),'attach':_0x5a7b58[_0xeb62('0x5c')],'attachments':_0x5a7b58,'originChannel':'Chat','ChatWebsiteId':_0x58a753['id'],'ChatOfflineMessageId':_0x558aab['id'],'originTo':_0x58a753[_0xeb62('0xd5')][_0xeb62('0xee')]},'body':_0x558aab[_0xeb62('0x60')]};var _0x1c9464={'account':{'id':_0x58a753['MailAccountId']},'body':_0x23f684,'log':_0xeb62('0xf2')};return respondWithRpcPromise('NotifyMailAccount',_0xeb62('0xf3'),_0x1c9464,client9001)[_0xeb62('0x23')](function(){return _0x558aab;})['catch'](function(_0x5b2cd0){console['error'](_0x5b2cd0);});}return;})[_0xeb62('0x23')](function(){if(_0x558aab){return _0x558aab;}})[_0xeb62('0x23')](respondWithResult(_0x176b38,null))[_0xeb62('0x2e')](function(_0x163886){console['error'](_0xeb62('0x2e'),_0x163886);for(var _0x4ac94e of _0x4b00ce){var _0x230385=path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0xdc'),_0xeb62('0xd0'),_0xeb62('0xdd'),'offline-chat',_0x4ac94e[_0xeb62('0x74')]);fs_extra[_0xeb62('0xf4')](_0x230385)['catch'](function(_0x3060d5){console[_0xeb62('0x2a')](_0xeb62('0xf5'),_0x230385,_0x3060d5);});}});};exports[_0xeb62('0xf6')]=function(_0x48a045,_0x5b284b,_0x4867c8){return db[_0xeb62('0xba')][_0xeb62('0x5e')]({'where':{'id':_0x48a045[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x5b284b,null))[_0xeb62('0x23')](function(_0x51c120){if(_0x51c120){return _0x51c120[_0xeb62('0xf6')](_0x48a045[_0xeb62('0x60')][_0xeb62('0x70')],_[_0xeb62('0xf7')](_0x48a045[_0xeb62('0x60')],[_0xeb62('0x70'),'id'])||{});}})['then'](respondWithResult(_0x5b284b,null))['catch'](handleError(_0x5b284b,null));};exports[_0xeb62('0xf8')]=function(_0x37d901,_0x28a751,_0x5cf822){var _0x59d175={'raw':![],'where':{}};var _0x47aaf0={};var _0x2eba49={'count':0x0,'rows':[]};return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x37d901[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x28a751,null))['then'](function(_0xd0076c){if(_0xd0076c){_0x47aaf0[_0xeb62('0x49')]=_['keys'](db[_0xeb62('0xba')][_0xeb62('0x6d')]);_0x47aaf0[_0xeb62('0x46')]=_[_0xeb62('0x47')](_0x37d901[_0xeb62('0x46')]);_0x47aaf0[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x47aaf0[_0xeb62('0x49')],_0x47aaf0[_0xeb62('0x46')]);_0x59d175[_0xeb62('0x4a')]=_[_0xeb62('0x48')](_0x47aaf0[_0xeb62('0x49')],qs[_0xeb62('0x4b')](_0x37d901[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x59d175[_0xeb62('0x4a')]=_0x59d175[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x59d175[_0xeb62('0x4a')]:_0x47aaf0['model'];if(!_0x37d901[_0xeb62('0x46')][_0xeb62('0x4c')](_0xeb62('0x4d'))){_0x59d175['limit']=qs[_0xeb62('0x35')](_0x37d901[_0xeb62('0x46')]['limit']);_0x59d175[_0xeb62('0x32')]=qs[_0xeb62('0x32')](_0x37d901[_0xeb62('0x46')][_0xeb62('0x32')]);}_0x59d175['order']=qs[_0xeb62('0x4f')](_0x37d901['query'][_0xeb62('0x4f')]);_0x59d175[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x37d901[_0xeb62('0x46')],_0x47aaf0[_0xeb62('0x51')]));_0x59d175[_0xeb62('0x50')][_0xeb62('0x69')]=_0xd0076c['id'];if(_0x37d901[_0xeb62('0x46')][_0xeb62('0x53')]){_0x59d175['where']=_[_0xeb62('0x54')](_0x59d175['where'],{'$or':_[_0xeb62('0x42')](_0x59d175[_0xeb62('0x4a')],function(_0x2fd70c){var _0x18368a={};_0x18368a[_0x2fd70c]={'$like':'%'+_0x37d901['query']['filter']+'%'};return _0x18368a;})});}_0x59d175=_['merge']({},_0x59d175,_0x37d901[_0xeb62('0x5d')]);return db[_0xeb62('0xba')][_0xeb62('0x34')]({'where':_0x59d175['where']})[_0xeb62('0x23')](function(_0x284ad9){_0x2eba49[_0xeb62('0x34')]=_0x284ad9;if(_0x37d901[_0xeb62('0x46')][_0xeb62('0x57')]){_0x59d175['include']=[{'model':db[_0xeb62('0x92')],'as':_0xeb62('0xf9'),'required':![]},{'model':db[_0xeb62('0xc8')],'as':_0xeb62('0xfa'),'attributes':['name',_0xeb62('0xfb'),_0xeb62('0xfc')],'required':![]},{'model':db[_0xeb62('0xfd')],'as':'Tags','attributes':['id',_0xeb62('0x3d'),_0xeb62('0xfe')],'where':_0x37d901[_0xeb62('0x46')][_0xeb62('0xff')]?{'id':_0x37d901[_0xeb62('0x46')][_0xeb62('0xff')]}:undefined,'required':_0x37d901[_0xeb62('0x46')][_0xeb62('0xff')]?!![]:![]}];}return db['ChatInteraction'][_0xeb62('0x6e')](_0x59d175);})[_0xeb62('0x23')](function(_0xab565a){_0x2eba49[_0xeb62('0x59')]=_0xab565a;return _0x2eba49;});}})[_0xeb62('0x23')](respondWithFilteredResult(_0x28a751,_0x59d175))[_0xeb62('0x2e')](handleError(_0x28a751,null));};function iftimePromise(_0x5a8f78,_0x40cea){return respondWithRpcPromise(_0xeb62('0x100'),'getSnippet',{'command':_0x40cea[_0xeb62('0x101')]?util[_0xeb62('0xb3')]('iftime\x20%s,%s',_0x5a8f78[_0xeb62('0x102')],_0x40cea[_0xeb62('0x101')]):util['format'](_0xeb62('0x103'),_0x5a8f78[_0xeb62('0x102')])},client9002)['then'](function(_0x258846){var _0x1f1f32=_0x258846&&_0x258846[_0xeb62('0x104')]('true')>=0x0?!![]:![];logger[_0xeb62('0x24')](_0xeb62('0x105'),_0x40cea['id'],_0x5a8f78['id'],_0x5a8f78[_0xeb62('0x102')],_0x1f1f32?_0xeb62('0x106'):_0xeb62('0x107'),_0x40cea[_0xeb62('0x101')]?_0x40cea[_0xeb62('0x101')]:_0xeb62('0x108'));return _0x1f1f32;})['catch'](function(_0x582b4a){logger[_0xeb62('0x2a')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x40cea['id'],_0x5a8f78['id'],_0x5a8f78[_0xeb62('0x102')],util['inspect'](_0x582b4a,{'showHidden':![],'depth':null}),_0x40cea['timezone']?_0x40cea['timezone']:_0xeb62('0x108'));return![];});}exports[_0xeb62('0x109')]=function(_0x3df726,_0x2a8c78,_0x47b398){var _0x35dd33=0x0;var _0x4c9d1c=0x0;var _0x3ed6a5=![];var _0x1da4ec;var _0x10b757;return db[_0xeb62('0x43')][_0xeb62('0x5e')]({'where':{'id':_0x3df726[_0xeb62('0x5b')]['id']},'include':[{'model':db[_0xeb62('0x10a')],'as':_0xeb62('0x10a'),'include':[{'model':db[_0xeb62('0x10a')],'as':'Intervals','attributes':['id',_0xeb62('0x102')],'raw':!![]}]}]})[_0xeb62('0x23')](handleEntityNotFound(_0x2a8c78,null))[_0xeb62('0x23')](function(_0x367913){if(_0x367913){_0x1da4ec=_0x367913;return _0x367913[_0xeb62('0x10b')]({'raw':!![]});}})[_0xeb62('0x23')](function(_0x5c05d4){if(_0x1da4ec){if(_0x5c05d4){_0x10b757=_0x5c05d4;}}return require(_0xeb62('0x18'))[_0xeb62('0x7e')]();})[_0xeb62('0x23')](function(_0x4d2be8){if(_0x4d2be8){_0x4c9d1c=_0x4d2be8[_0xeb62('0x10c')];_0x3ed6a5=_0x4d2be8[_0xeb62('0x7f')];}})['then'](function(){return db[_0xeb62('0xba')][_0xeb62('0x34')]({'where':{'closed':![]}});})['then'](function(_0x3e5f20){_0x35dd33=_0x3e5f20;if(_0x4c9d1c&&_0x3e5f20>_0x4c9d1c){return db[_0xeb62('0x10d')]['findOne']({'where':{'id':0x1}})[_0xeb62('0x23')](function(_0x1c7661){if(_0x1c7661){_0x1c7661['increment']('chatLicenseExceeded');}});}})[_0xeb62('0x23')](function(){if(_0x1da4ec['Interval']&&_0x1da4ec[_0xeb62('0x10a')][_0xeb62('0x10e')]){var _0x4772c8=[];for(var _0x5bd5e9=0x0;_0x5bd5e9<_0x1da4ec[_0xeb62('0x10a')][_0xeb62('0x10e')][_0xeb62('0x5c')];_0x5bd5e9++){var _0x31c8fa=_0x1da4ec[_0xeb62('0x10a')]['Intervals'][_0x5bd5e9]['get']({'plain':!![]});_0x4772c8['push'](iftimePromise(_0x31c8fa,_0x1da4ec));}return BPromise[_0xeb62('0x10f')](_0x4772c8)['then'](function(_0x5fa3e2){return _[_0xeb62('0x110')](_0x5fa3e2);});}else{return!![];}})[_0xeb62('0x23')](function(_0x18e12d){var _0x3a4d31=fs[_0xeb62('0x111')](path[_0xeb62('0x80')](config[_0xeb62('0x81')],_0xeb62('0x112')),'utf8');var _0x1d6a43={'remote':_0x1da4ec[_0xeb62('0x113')],'query':querystring[_0xeb62('0x29')](_[_0xeb62('0x54')](_0x1da4ec['get']({'plain':!![]}),{'customerIp':_0x3df726[_0xeb62('0x8f')][_0xeb62('0xab')]||_0x3df726[_0xeb62('0x8f')][_0xeb62('0x114')]||_0x3df726[_0xeb62('0x115')]['remoteAddress']||_0x3df726['ip'],'referer':_0x3df726['headers'][_0xeb62('0xb0')],'openedInteractions':_0x35dd33,'maxInteractions':_0x4c9d1c,'virtual':_0x3ed6a5[_0xeb62('0x10c')],'online':_0x18e12d,'custom':_0x3ed6a5}))[_0xeb62('0x116')](/'/g,'\x5c\x27')};_0x2a8c78[_0xeb62('0x3e')](ejs[_0xeb62('0xd8')](Mustache[_0xeb62('0xd8')](_0x3a4d31,_0x1d6a43),{'proactiveActions':_0x10b757,'alignment':_0x1da4ec['alignment'],'verticalAlignment':_0x1da4ec['verticalAlignment'],'div_color':_0x1da4ec[_0xeb62('0xfe')],'text_color':_0x1da4ec[_0xeb62('0x117')],'button_color':_0x1da4ec['color_button'],'background_color':_0x1da4ec['backgroundColor']}));})[_0xeb62('0x2e')](handleError(_0x2a8c78,null));};exports['addApplications']=function(_0x32eb73,_0x43c276,_0x11fa60){return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x32eb73['params']['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x43c276,null))[_0xeb62('0x23')](function(_0xb14513){if(_0xb14513){return db[_0xeb62('0xe1')][_0xeb62('0x118')](function(_0x3111fc){return db[_0xeb62('0x119')][_0xeb62('0x3c')]({'where':{'ChatWebsiteId':_0x32eb73[_0xeb62('0x5b')]['id']},'transaction':_0x3111fc})[_0xeb62('0x23')](function(_0x5e38e5){var _0x50d5bf=_[_0xeb62('0x42')](_0x32eb73[_0xeb62('0x60')],function(_0xe88f13){_0xe88f13[_0xeb62('0x69')]=_0x32eb73[_0xeb62('0x5b')]['id'];return _0xe88f13;});return db[_0xeb62('0x119')]['bulkCreate'](_0x50d5bf,{'transaction':_0x3111fc});});})[_0xeb62('0x23')](function(){return db['ChatApplication'][_0xeb62('0x11a')]({'where':{'ChatWebsiteId':_0x32eb73[_0xeb62('0x5b')]['id']},'order':_0xeb62('0xa5')});});}})['then'](respondWithResult(_0x43c276,null))['catch'](handleError(_0x43c276,null));};exports['getApplications']=function(_0x5ad64c,_0x4e9993,_0x54e30c){var _0x1c0111={};var _0x96d8ba={};var _0x35c816;var _0x604dc1;return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x5ad64c[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x4e9993,null))['then'](function(_0x271d40){if(_0x271d40){_0x35c816=_0x271d40;_0x96d8ba[_0xeb62('0x49')]=_[_0xeb62('0x47')](db[_0xeb62('0x119')][_0xeb62('0x6d')]);_0x96d8ba[_0xeb62('0x46')]=_[_0xeb62('0x47')](_0x5ad64c['query']);_0x96d8ba[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x96d8ba[_0xeb62('0x49')],_0x96d8ba[_0xeb62('0x46')]);_0x1c0111[_0xeb62('0x4a')]=_[_0xeb62('0x48')](_0x96d8ba['model'],qs['fields'](_0x5ad64c['query']['fields']));_0x1c0111[_0xeb62('0x4a')]=_0x1c0111[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x1c0111['attributes']:_0x96d8ba[_0xeb62('0x49')];_0x1c0111[_0xeb62('0x4e')]=qs[_0xeb62('0x4f')](_0x5ad64c[_0xeb62('0x46')][_0xeb62('0x4f')]);_0x1c0111['where']=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x5ad64c['query'],_0x96d8ba[_0xeb62('0x51')]));if(_0x5ad64c[_0xeb62('0x46')][_0xeb62('0x53')]){_0x1c0111['where']=_[_0xeb62('0x54')](_0x1c0111['where'],{'$or':_[_0xeb62('0x42')](_0x1c0111[_0xeb62('0x4a')],function(_0x317522){var _0x119d65={};_0x119d65[_0x317522]={'$like':'%'+_0x5ad64c[_0xeb62('0x46')][_0xeb62('0x53')]+'%'};return _0x119d65;})});}_0x1c0111=_['merge']({},_0x1c0111,_0x5ad64c[_0xeb62('0x5d')]);return _0x35c816[_0xeb62('0x11b')](_0x1c0111);}})['then'](function(_0x3d3a43){if(_0x3d3a43){_0x604dc1=_0x3d3a43[_0xeb62('0x5c')];if(!_0x5ad64c[_0xeb62('0x46')]['hasOwnProperty']('nolimit')){_0x1c0111[_0xeb62('0x35')]=qs[_0xeb62('0x35')](_0x5ad64c[_0xeb62('0x46')][_0xeb62('0x35')]);_0x1c0111['offset']=qs[_0xeb62('0x32')](_0x5ad64c[_0xeb62('0x46')][_0xeb62('0x32')]);}return _0x35c816[_0xeb62('0x11b')](_0x1c0111);}})[_0xeb62('0x23')](function(_0xc4c017){if(_0xc4c017){return _0xc4c017?{'count':_0x604dc1,'rows':_0xc4c017}:null;}})[_0xeb62('0x23')](respondWithResult(_0x4e9993,null))[_0xeb62('0x2e')](handleError(_0x4e9993,null));};exports[_0xeb62('0x11c')]=function(_0x788ec9,_0x303e41,_0x476e27){return db[_0xeb62('0x11d')][_0xeb62('0x5e')]({'where':{'id':_0x788ec9[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x303e41,null))[_0xeb62('0x23')](function(_0x4d1969){if(_0x4d1969){return _0x4d1969['addProactiveActions'](_0x788ec9[_0xeb62('0x60')][_0xeb62('0x70')],_[_0xeb62('0xf7')](_0x788ec9[_0xeb62('0x60')],[_0xeb62('0x70'),'id'])||{});}})['then'](respondWithResult(_0x303e41,null))['catch'](handleError(_0x303e41,null));};exports['getProactiveActions']=function(_0x343647,_0x1d06ee,_0x1b97ad){var _0x50f104={};var _0x19735a={};var _0x286e50;var _0x35fba2;return db[_0xeb62('0x43')][_0xeb62('0x6c')]({'where':{'id':_0x343647['params']['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x1d06ee,null))[_0xeb62('0x23')](function(_0x64d3b0){if(_0x64d3b0){_0x286e50=_0x64d3b0;_0x19735a[_0xeb62('0x49')]=_['keys'](db[_0xeb62('0x11e')][_0xeb62('0x6d')]);_0x19735a['query']=_[_0xeb62('0x47')](_0x343647[_0xeb62('0x46')]);_0x19735a['filters']=_['intersection'](_0x19735a[_0xeb62('0x49')],_0x19735a[_0xeb62('0x46')]);_0x50f104[_0xeb62('0x4a')]=_[_0xeb62('0x48')](_0x19735a['model'],qs['fields'](_0x343647[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x50f104[_0xeb62('0x4a')]=_0x50f104[_0xeb62('0x4a')]['length']?_0x50f104[_0xeb62('0x4a')]:_0x19735a[_0xeb62('0x49')];_0x50f104['order']=qs[_0xeb62('0x4f')](_0x343647[_0xeb62('0x46')][_0xeb62('0x4f')]);_0x50f104['where']=qs[_0xeb62('0x51')](_['pick'](_0x343647[_0xeb62('0x46')],_0x19735a[_0xeb62('0x51')]));if(_0x343647[_0xeb62('0x46')][_0xeb62('0x53')]){_0x50f104[_0xeb62('0x50')]=_[_0xeb62('0x54')](_0x50f104[_0xeb62('0x50')],{'$or':_[_0xeb62('0x42')](_0x50f104['attributes'],function(_0x1a2cae){var _0x3f53f4={};_0x3f53f4[_0x1a2cae]={'$like':'%'+_0x343647['query'][_0xeb62('0x53')]+'%'};return _0x3f53f4;})});}_0x50f104=_['merge']({},_0x50f104,_0x343647[_0xeb62('0x5d')]);return _0x286e50[_0xeb62('0x10b')](_0x50f104);}})[_0xeb62('0x23')](function(_0x17ace7){if(_0x17ace7){_0x35fba2=_0x17ace7[_0xeb62('0x5c')];if(!_0x343647[_0xeb62('0x46')]['hasOwnProperty']('nolimit')){_0x50f104['limit']=qs['limit'](_0x343647[_0xeb62('0x46')][_0xeb62('0x35')]);_0x50f104[_0xeb62('0x32')]=qs['offset'](_0x343647[_0xeb62('0x46')][_0xeb62('0x32')]);}return _0x286e50['getProactiveActions'](_0x50f104);}})[_0xeb62('0x23')](function(_0x45350f){if(_0x45350f){return _0x45350f?{'count':_0x35fba2,'rows':_0x45350f}:null;}})['then'](respondWithResult(_0x1d06ee,null))[_0xeb62('0x2e')](handleError(_0x1d06ee,null));};exports['getFields']=function(_0xe7f300,_0x4c379e,_0x2c4f80){var _0x4a9f94=_0xe7f300['query']['online']==='false'?_0xeb62('0x11f'):_0xeb62('0x120');return db['ChatWebsite'][_0xeb62('0x5e')]({'attributes':['id',_0x4a9f94],'where':{'id':_0xe7f300[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x4c379e,null))['then'](function(_0x88f99b){if(_0x88f99b){var _0x3bbfec=_0x88f99b[_0x4a9f94];var _0x25bba5=_0x3bbfec&&_0x3bbfec[_0xeb62('0x121')]?_0x3bbfec[_0xeb62('0x121')]:[];_0x4c379e['send']({'fromKey':_['isNil'](_0x3bbfec[_0xeb62('0x122')])?undefined:_0x3bbfec[_0xeb62('0x122')],'count':_0x25bba5['length'],'rows':_0x25bba5});}})['catch'](handleError(_0x4c379e,null));};exports[_0xeb62('0x123')]=function(_0x10635e,_0xb031d5,_0x52e7f4){var _0x25c869={'raw':![],'where':{}};var _0x5f2a71={};var _0x234e69={'count':0x0,'rows':[]};return db[_0xeb62('0x43')]['findOne']({'where':{'id':_0x10635e[_0xeb62('0x5b')]['id']}})['then'](handleEntityNotFound(_0xb031d5,null))[_0xeb62('0x23')](function(_0x17cbda){if(_0x17cbda){_0x5f2a71[_0xeb62('0x49')]=_['keys'](db[_0xeb62('0x124')][_0xeb62('0x6d')]);_0x5f2a71[_0xeb62('0x46')]=_['keys'](_0x10635e[_0xeb62('0x46')]);_0x5f2a71[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x5f2a71[_0xeb62('0x49')],_0x5f2a71['query']);_0x25c869[_0xeb62('0x4a')]=_['intersection'](_0x5f2a71[_0xeb62('0x49')],qs['fields'](_0x10635e['query'][_0xeb62('0x4b')]));_0x25c869[_0xeb62('0x4a')]=_0x25c869[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x25c869[_0xeb62('0x4a')]:_0x5f2a71[_0xeb62('0x49')];if(!_0x10635e['query'][_0xeb62('0x4c')](_0xeb62('0x4d'))){_0x25c869['limit']=qs['limit'](_0x10635e[_0xeb62('0x46')][_0xeb62('0x35')]);_0x25c869['offset']=qs[_0xeb62('0x32')](_0x10635e['query']['offset']);}_0x25c869[_0xeb62('0x4e')]=qs[_0xeb62('0x4f')](_0x10635e[_0xeb62('0x46')][_0xeb62('0x4f')]);_0x25c869[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_[_0xeb62('0x52')](_0x10635e[_0xeb62('0x46')],_0x5f2a71[_0xeb62('0x51')]));_0x25c869['where'][_0xeb62('0x69')]=_0x17cbda['id'];if(_0x10635e[_0xeb62('0x46')]['filter']){_0x25c869[_0xeb62('0x50')]=_[_0xeb62('0x54')](_0x25c869[_0xeb62('0x50')],{'$or':_[_0xeb62('0x42')](_0x25c869['attributes'],function(_0x1df863){var _0x1fb751={};_0x1fb751[_0x1df863]={'$like':'%'+_0x10635e[_0xeb62('0x46')]['filter']+'%'};return _0x1fb751;})});}_0x25c869=_[_0xeb62('0x54')]({},_0x25c869,_0x10635e[_0xeb62('0x5d')]);return db['ChatOfflineMessage']['count']({'where':_0x25c869[_0xeb62('0x50')]})['then'](function(_0x309434){_0x234e69[_0xeb62('0x34')]=_0x309434;if(_0x10635e[_0xeb62('0x46')][_0xeb62('0x57')]){_0x25c869[_0xeb62('0x58')]=[{'all':!![]}];}else{_0x25c869[_0xeb62('0x58')]=[{'model':db[_0xeb62('0x92')],'as':'Contact','required':![]},{'model':db['Attachment'],'as':_0xeb62('0x125'),'required':![]}];}return db['ChatOfflineMessage'][_0xeb62('0x6e')](_0x25c869);})['then'](function(_0x335a4b){_0x234e69[_0xeb62('0x59')]=_0x335a4b;return _0x234e69;});}})['then'](respondWithFilteredResult(_0xb031d5,_0x25c869))[_0xeb62('0x2e')](handleError(_0xb031d5,null));};exports[_0xeb62('0x126')]=function(_0x391992,_0x213fa2,_0x3cc378){return db['ChatWebsite'][_0xeb62('0x5e')]({'where':{'id':_0x391992[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x213fa2,null))[_0xeb62('0x23')](function(_0x2492a3){if(_0x2492a3){return _0x2492a3[_0xeb62('0x126')](_0x391992[_0xeb62('0x60')]['ids'],_['omit'](_0x391992[_0xeb62('0x60')],[_0xeb62('0x70'),'id'])||{})[_0xeb62('0xbd')](function(_0x231b6e){for(var _0x13c4bc=0x0;_0x13c4bc<_0x391992[_0xeb62('0x60')][_0xeb62('0x70')][_0xeb62('0x5c')];_0x13c4bc+=0x1){socket[_0xeb62('0x127')]('userChatWebsite:save',{'UserId':_0x391992[_0xeb62('0x60')][_0xeb62('0x70')][_0x13c4bc],'ChatWebsiteId':_0x391992[_0xeb62('0x5b')]['id']});}return _0x231b6e;});}})['then'](respondWithResult(_0x213fa2,null))[_0xeb62('0x2e')](handleError(_0x213fa2,null));};exports['removeAgents']=function(_0x4802d4,_0x4eee64,_0x2c9c92){return db[_0xeb62('0x43')]['find']({'where':{'id':_0x4802d4[_0xeb62('0x5b')]['id']}})['then'](handleEntityNotFound(_0x4eee64,null))[_0xeb62('0x23')](function(_0x45d866){if(_0x45d866){return _0x45d866['removeAgents'](_0x4802d4['query'][_0xeb62('0x70')])[_0xeb62('0x23')](function(){if(_[_0xeb62('0x128')](_0x4802d4['query'][_0xeb62('0x70')])){for(var _0x86367d=0x0;_0x86367d<_0x4802d4[_0xeb62('0x46')][_0xeb62('0x70')][_0xeb62('0x5c')];_0x86367d+=0x1){socket[_0xeb62('0x127')](_0xeb62('0x129'),{'UserId':Number(_0x4802d4[_0xeb62('0x46')]['ids'][_0x86367d]),'ChatWebsiteId':Number(_0x4802d4[_0xeb62('0x5b')]['id'])});}}else{socket[_0xeb62('0x127')](_0xeb62('0x129'),{'UserId':Number(_0x4802d4[_0xeb62('0x46')]['ids']),'ChatWebsiteId':Number(_0x4802d4[_0xeb62('0x5b')]['id'])});}});}})[_0xeb62('0x23')](respondWithStatusCode(_0x4eee64,null))[_0xeb62('0x2e')](handleError(_0x4eee64,null));};exports[_0xeb62('0x12a')]=function(_0xe65f97,_0x2414d5,_0x2b5bdd){var _0x59f438={};var _0x4414f5={};var _0x4be1c8;var _0x5a0613;return db['ChatWebsite'][_0xeb62('0x6c')]({'where':{'id':_0xe65f97[_0xeb62('0x5b')]['id']}})[_0xeb62('0x23')](handleEntityNotFound(_0x2414d5,null))['then'](function(_0x116116){if(_0x116116){_0x4be1c8=_0x116116;_0x4414f5[_0xeb62('0x49')]=_[_0xeb62('0x47')](db[_0xeb62('0xc8')]['rawAttributes']);_0x4414f5[_0xeb62('0x46')]=_['keys'](_0xe65f97[_0xeb62('0x46')]);_0x4414f5[_0xeb62('0x51')]=_[_0xeb62('0x48')](_0x4414f5[_0xeb62('0x49')],_0x4414f5['query']);_0x59f438[_0xeb62('0x4a')]=_[_0xeb62('0x48')](_0x4414f5[_0xeb62('0x49')],qs[_0xeb62('0x4b')](_0xe65f97[_0xeb62('0x46')][_0xeb62('0x4b')]));_0x59f438[_0xeb62('0x4a')]=_0x59f438[_0xeb62('0x4a')][_0xeb62('0x5c')]?_0x59f438[_0xeb62('0x4a')]:_0x4414f5[_0xeb62('0x49')];_0x59f438['order']=qs[_0xeb62('0x4f')](_0xe65f97[_0xeb62('0x46')][_0xeb62('0x4f')]);_0x59f438[_0xeb62('0x50')]=qs[_0xeb62('0x51')](_['pick'](_0xe65f97[_0xeb62('0x46')],_0x4414f5[_0xeb62('0x51')]));if(_0xe65f97[_0xeb62('0x46')]['filter']){_0x59f438[_0xeb62('0x50')]=_['merge'](_0x59f438[_0xeb62('0x50')],{'$or':_['map'](_0x59f438[_0xeb62('0x4a')],function(_0x10a018){var _0x5c3a7a={};_0x5c3a7a[_0x10a018]={'$like':'%'+_0xe65f97['query'][_0xeb62('0x53')]+'%'};return _0x5c3a7a;})});}_0x59f438=_[_0xeb62('0x54')]({},_0x59f438,_0xe65f97[_0xeb62('0x5d')]);return _0x4be1c8[_0xeb62('0x12a')](_0x59f438);}})['then'](function(_0x337d7f){if(_0x337d7f){_0x5a0613=_0x337d7f['length'];if(!_0xe65f97['query'][_0xeb62('0x4c')](_0xeb62('0x4d'))){_0x59f438[_0xeb62('0x35')]=qs[_0xeb62('0x35')](_0xe65f97[_0xeb62('0x46')][_0xeb62('0x35')]);_0x59f438[_0xeb62('0x32')]=qs[_0xeb62('0x32')](_0xe65f97[_0xeb62('0x46')][_0xeb62('0x32')]);}return _0x4be1c8[_0xeb62('0x12a')](_0x59f438);}})[_0xeb62('0x23')](function(_0x22c829){if(_0x22c829){return _0x22c829?{'count':_0x5a0613,'rows':_0x22c829}:null;}})[_0xeb62('0x23')](respondWithResult(_0x2414d5,null))['catch'](handleError(_0x2414d5,null));}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js index 0b19296..cbfc9db 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 _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 +var _0xea89=['hook','exports','events','../../mysqldb','ChatWebsite','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x42228c,_0x301fa1){var _0x30704a=function(_0x22c8a1){while(--_0x22c8a1){_0x42228c['push'](_0x42228c['shift']());}};_0x30704a(++_0x301fa1);}(_0xea89,0x1e2));var _0x9ea8=function(_0x2831d7,_0x493266){_0x2831d7=_0x2831d7-0x0;var _0x3a2534=_0xea89[_0x2831d7];return _0x3a2534;};'use strict';var EventEmitter=require(_0x9ea8('0x0'));var ChatWebsite=require(_0x9ea8('0x1'))['db'][_0x9ea8('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x9ea8('0x3')](0x0);var events={'afterCreate':_0x9ea8('0x4'),'afterUpdate':'update','afterDestroy':_0x9ea8('0x5')};function emitEvent(_0x520915){return function(_0x226d05,_0x5af295,_0x44f1cc){ChatWebsiteEvents[_0x9ea8('0x6')](_0x520915+':'+_0x226d05['id'],_0x226d05);ChatWebsiteEvents[_0x9ea8('0x6')](_0x520915,_0x226d05);_0x44f1cc(null);};}for(var e in events){if(events[_0x9ea8('0x7')](e)){var event=events[e];ChatWebsite[_0x9ea8('0x8')](e,emitEvent(event));}}module[_0x9ea8('0x9')]=ChatWebsiteEvents; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js index 306ad33..e8aee96 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 _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 +var _0x9dc7=['lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatWebsite.attributes','exports','define','chat_websites'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x9dc7,0x1c7));var _0x79dc=function(_0x278cb7,_0x49fd88){_0x278cb7=_0x278cb7-0x0;var _0x44edfe=_0x9dc7[_0x278cb7];return _0x44edfe;};'use strict';var _=require(_0x79dc('0x0'));var util=require(_0x79dc('0x1'));var logger=require('../../config/logger')(_0x79dc('0x2'));var moment=require(_0x79dc('0x3'));var BPromise=require(_0x79dc('0x4'));var rp=require(_0x79dc('0x5'));var fs=require('fs');var path=require(_0x79dc('0x6'));var rimraf=require(_0x79dc('0x7'));var config=require(_0x79dc('0x8'));var attributes=require(_0x79dc('0x9'));module[_0x79dc('0xa')]=function(_0xcb8d22,_0x13b450){return _0xcb8d22[_0x79dc('0xb')]('ChatWebsite',attributes,{'tableName':_0x79dc('0xc'),'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 df9599b..15e067c 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 _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 +var _0x64e1=['request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./chatWebsite.socket','register','then','info','ChatWebsite,\x20%s,\x20%s'];(function(_0x2e68db,_0x275d04){var _0x12df4c=function(_0x1b6701){while(--_0x1b6701){_0x2e68db['push'](_0x2e68db['shift']());}};_0x12df4c(++_0x275d04);}(_0x64e1,0x9e));var _0x164e=function(_0x27af27,_0x266e18){_0x27af27=_0x27af27-0x0;var _0x3575ca=_0x64e1[_0x27af27];return _0x3575ca;};'use strict';var _=require(_0x164e('0x0'));var util=require(_0x164e('0x1'));var moment=require(_0x164e('0x2'));var BPromise=require(_0x164e('0x3'));var rs=require(_0x164e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x164e('0x5'))['db'];var utils=require(_0x164e('0x6'));var logger=require(_0x164e('0x7'))(_0x164e('0x8'));var config=require(_0x164e('0x9'));var jayson=require(_0x164e('0xa'));var client=jayson[_0x164e('0xb')][_0x164e('0xc')]({'port':0x232a});config['redis']=_[_0x164e('0xd')](config[_0x164e('0xe')],{'host':_0x164e('0xf'),'port':0x18eb});var socket=require(_0x164e('0x10'))(new Redis(config[_0x164e('0xe')]));require(_0x164e('0x11'))[_0x164e('0x12')](socket);function respondWithRpcPromise(_0x402aca,_0x4e2c66,_0x4f2fa5){return new BPromise(function(_0x5a194d,_0x551472){return client['request'](_0x402aca,_0x4f2fa5)[_0x164e('0x13')](function(_0x36c28a){logger[_0x164e('0x14')](_0x164e('0x15'),_0x4e2c66,_0x164e('0x16'));logger[_0x164e('0x17')](_0x164e('0x18'),_0x4e2c66,_0x164e('0x16'),JSON[_0x164e('0x19')](_0x36c28a));if(_0x36c28a[_0x164e('0x1a')]){if(_0x36c28a['error'][_0x164e('0x1b')]===0x1f4){logger[_0x164e('0x1a')](_0x164e('0x15'),_0x4e2c66,_0x36c28a['error'][_0x164e('0x1c')]);return _0x551472(_0x36c28a['error']['message']);}logger[_0x164e('0x1a')]('ChatWebsite,\x20%s,\x20%s',_0x4e2c66,_0x36c28a[_0x164e('0x1a')][_0x164e('0x1c')]);return _0x5a194d(_0x36c28a[_0x164e('0x1a')][_0x164e('0x1c')]);}else{logger[_0x164e('0x14')](_0x164e('0x15'),_0x4e2c66,_0x164e('0x16'));_0x5a194d(_0x36c28a[_0x164e('0x1d')][_0x164e('0x1c')]);}})['catch'](function(_0x31262b){logger[_0x164e('0x1a')](_0x164e('0x15'),_0x4e2c66,_0x31262b);_0x551472(_0x31262b);});});} \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js index 1acc975..2ba0475 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 _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 +var _0x6dfd=['length','chatWebsite:','save','remove','emit','removeListener','register'];(function(_0x313548,_0x1dccca){var _0x45e50e=function(_0x5eb13f){while(--_0x5eb13f){_0x313548['push'](_0x313548['shift']());}};_0x45e50e(++_0x1dccca);}(_0x6dfd,0x9c));var _0xd6df=function(_0x35b07e,_0x4c5a33){_0x35b07e=_0x35b07e-0x0;var _0xcb745e=_0x6dfd[_0x35b07e];return _0xcb745e;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0xd6df('0x0'),_0xd6df('0x1'),'update'];function createListener(_0x55310e,_0x16b985){return function(_0x38c9d0){_0x16b985[_0xd6df('0x2')](_0x55310e,_0x38c9d0);};}function removeListener(_0x2822c2,_0x2baf23){return function(){ChatWebsiteEvents[_0xd6df('0x3')](_0x2822c2,_0x2baf23);};}exports[_0xd6df('0x4')]=function(_0x20cacd){for(var _0x10c2e4=0x0,_0x411106=events[_0xd6df('0x5')];_0x10c2e4<_0x411106;_0x10c2e4++){var _0x1e2803=events[_0x10c2e4];var _0x11d71c=createListener(_0xd6df('0x6')+_0x1e2803,_0x20cacd);ChatWebsiteEvents['on'](_0x1e2803,_0x11d71c);}}; \ No newline at end of file diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js index b313ff1..aa19434 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 _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 +var _0x652f=['post','create','addDisposition','addAnswer','diskStorage','join','root','server/files/images/logos/','format','%s-%s','now','addLogo','originalname','/:id/avatar','single','server/files/images/avatars/','file','addCustomerAvatar','addSystemAvatar','/:id/notify','attachments','offline-chat','ensureDir','replace','extname','/:id/offline','any','offline','/:id/interactions','addApplications','addAgents','/:id','update','destroy','delete','removeDispositions','/:id/canned_answers','removeAnswers','removeAgents','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','/:id/logo','getLogo','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/snippet','getSnippet','getApplications','/:id/proactive_actions','getProactiveActions','getFields','getOfflineMessages','/:id/users','getAgents'];(function(_0x275fbb,_0x52bdd9){var _0x1a1699=function(_0x2ded23){while(--_0x2ded23){_0x275fbb['push'](_0x275fbb['shift']());}};_0x1a1699(++_0x52bdd9);}(_0x652f,0x14c));var _0xf652=function(_0x31fa73,_0x232bf7){_0x31fa73=_0x31fa73-0x0;var _0x3ea28f=_0x652f[_0x31fa73];return _0x3ea28f;};'use strict';var multer=require(_0xf652('0x0'));var util=require('util');var path=require(_0xf652('0x1'));var timeout=require(_0xf652('0x2'));var express=require('express');var router=express[_0xf652('0x3')]();var fs_extra=require(_0xf652('0x4'));var auth=require(_0xf652('0x5'));var interaction=require(_0xf652('0x6'));var config=require(_0xf652('0x7'));var controller=require(_0xf652('0x8'));router[_0xf652('0x9')]('/',auth[_0xf652('0xa')](),controller[_0xf652('0xb')]);router[_0xf652('0x9')](_0xf652('0xc'),auth[_0xf652('0xa')](),controller[_0xf652('0xd')]);router['get']('/:id',auth[_0xf652('0xa')](),controller[_0xf652('0xe')]);router[_0xf652('0x9')](_0xf652('0xf'),auth[_0xf652('0xa')](),controller[_0xf652('0x10')]);router[_0xf652('0x9')]('/:id/canned_answers',auth[_0xf652('0xa')](),controller['getAnswers']);router[_0xf652('0x9')](_0xf652('0x11'),controller[_0xf652('0x12')]);router[_0xf652('0x9')]('/:id/avatar',controller[_0xf652('0x13')]);router['get'](_0xf652('0x14'),controller[_0xf652('0x15')]);router[_0xf652('0x9')](_0xf652('0x16'),controller[_0xf652('0x17')]);router[_0xf652('0x9')]('/:id/interactions',auth[_0xf652('0xa')](),controller['getInteractions']);router[_0xf652('0x9')](_0xf652('0x18'),controller[_0xf652('0x19')]);router['get']('/:id/applications',auth[_0xf652('0xa')](),controller[_0xf652('0x1a')]);router[_0xf652('0x9')](_0xf652('0x1b'),auth['isAuthenticated'](),controller[_0xf652('0x1c')]);router[_0xf652('0x9')]('/:id/fields',controller[_0xf652('0x1d')]);router[_0xf652('0x9')]('/:id/offline_messages',auth[_0xf652('0xa')](),controller[_0xf652('0x1e')]);router[_0xf652('0x9')](_0xf652('0x1f'),auth[_0xf652('0xa')](),controller[_0xf652('0x20')]);router[_0xf652('0x21')]('/',auth[_0xf652('0xa')](),controller[_0xf652('0x22')]);router[_0xf652('0x21')]('/:id/dispositions',auth[_0xf652('0xa')](),controller[_0xf652('0x23')]);router[_0xf652('0x21')]('/:id/canned_answers',auth[_0xf652('0xa')](),controller[_0xf652('0x24')]);var upload=multer({'storage':multer[_0xf652('0x25')]({'destination':function(_0x11ad51,_0x1c0c43,_0x1c8185){_0x1c8185(null,path[_0xf652('0x26')](config[_0xf652('0x27')],_0xf652('0x28')));},'filename':function(_0x2b4daf,_0x43fc5b,_0x2b73ed){_0x2b73ed(null,util[_0xf652('0x29')](_0xf652('0x2a'),Date[_0xf652('0x2b')](),_0x43fc5b['originalname']));}})});router[_0xf652('0x21')]('/:id/logo',upload['single']('file'),controller[_0xf652('0x2c')]);var upload=multer({'storage':multer[_0xf652('0x25')]({'destination':function(_0x32a5b6,_0x133c68,_0x3b49c9){_0x3b49c9(null,path[_0xf652('0x26')](config[_0xf652('0x27')],'server/files/images/avatars/'));},'filename':function(_0x2ea090,_0x2d5280,_0x518e47){_0x518e47(null,util[_0xf652('0x29')](_0xf652('0x2a'),Date[_0xf652('0x2b')](),_0x2d5280[_0xf652('0x2d')]));}})});router[_0xf652('0x21')](_0xf652('0x2e'),upload[_0xf652('0x2f')]('file'),controller['addAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3e291f,_0x267721,_0x47e916){_0x47e916(null,path['join'](config[_0xf652('0x27')],_0xf652('0x30')));},'filename':function(_0x3b3235,_0x36e472,_0x3f34ee){_0x3f34ee(null,util[_0xf652('0x29')](_0xf652('0x2a'),Date[_0xf652('0x2b')](),_0x36e472['originalname']));}})});router[_0xf652('0x21')](_0xf652('0x14'),upload[_0xf652('0x2f')](_0xf652('0x31')),controller[_0xf652('0x32')]);var upload=multer({'storage':multer[_0xf652('0x25')]({'destination':function(_0xf1bddd,_0x4bf354,_0x2bb364){_0x2bb364(null,path[_0xf652('0x26')](config[_0xf652('0x27')],'server/files/images/avatars/'));},'filename':function(_0x410aef,_0x531da4,_0x590db5){_0x590db5(null,util['format'](_0xf652('0x2a'),Date[_0xf652('0x2b')](),_0x531da4['originalname']));}})});router[_0xf652('0x21')](_0xf652('0x16'),upload[_0xf652('0x2f')](_0xf652('0x31')),controller[_0xf652('0x33')]);router[_0xf652('0x21')](_0xf652('0x34'),controller['notify']);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x35f24c,_0x144e1e,_0x3f29ba){const _0x3d159e=path[_0xf652('0x26')](config[_0xf652('0x27')],'server/files',_0xf652('0x35'),_0xf652('0x36'));fs_extra[_0xf652('0x37')](_0x3d159e,function(){_0x3f29ba(null,_0x3d159e);});},'filename':function(_0x2314db,_0x275d2e,_0x4d685c){const _0x558f40=_0x275d2e['originalname'][_0xf652('0x38')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x10f9ac=path[_0xf652('0x39')](_0x558f40);const _0x3a36e2=Date[_0xf652('0x2b')]()+'-'+_0x558f40['replace'](_0x10f9ac,'')+_0x10f9ac;_0x4d685c(null,_0x3a36e2);}})});router[_0xf652('0x21')](_0xf652('0x3a'),offlineUploadMulter[_0xf652('0x3b')](),controller[_0xf652('0x3c')]);router[_0xf652('0x21')](_0xf652('0x3d'),auth[_0xf652('0xa')](),controller['addInteraction']);router[_0xf652('0x21')]('/:id/applications',auth[_0xf652('0xa')](),controller[_0xf652('0x3e')]);router[_0xf652('0x21')]('/:id/proactive_actions',auth[_0xf652('0xa')](),controller['addProactiveActions']);router[_0xf652('0x21')](_0xf652('0x1f'),auth[_0xf652('0xa')](),controller[_0xf652('0x3f')]);router['put'](_0xf652('0x40'),auth[_0xf652('0xa')](),controller[_0xf652('0x41')]);router['delete'](_0xf652('0x40'),auth[_0xf652('0xa')](),controller[_0xf652('0x42')]);router[_0xf652('0x43')](_0xf652('0xf'),auth['isAuthenticated'](),controller[_0xf652('0x44')]);router['delete'](_0xf652('0x45'),auth[_0xf652('0xa')](),controller[_0xf652('0x46')]);router[_0xf652('0x43')]('/:id/users',auth['isAuthenticated'](),controller[_0xf652('0x47')]);module[_0xf652('0x48')]=router; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js index b440560..94437b0 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 _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 +var _0x4e83=['sequelize','STRING','ENUM','AmazonAWS','Google'];(function(_0x1c709e,_0x47ecbf){var _0x13e119=function(_0x864899){while(--_0x864899){_0x1c709e['push'](_0x1c709e['shift']());}};_0x13e119(++_0x47ecbf);}(_0x4e83,0x1ae));var _0x34e8=function(_0x30505b,_0x3b6c06){_0x30505b=_0x30505b-0x0;var _0x4f7466=_0x4e83[_0x30505b];return _0x4f7466;};'use strict';var Sequelize=require(_0x34e8('0x0'));module['exports']={'name':{'type':Sequelize[_0x34e8('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x34e8('0x2')](_0x34e8('0x3'),_0x34e8('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'data1':{'type':Sequelize[_0x34e8('0x1')]},'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 118809d..52f76d6 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 _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 +var _0x5f66=['update','catch','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','reject','save','destroy','then','error','name','send','index','map','CloudProvider','rawAttributes','fieldName','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','show','params','find','create','body'];(function(_0x26cf39,_0x43ef3a){var _0x312c13=function(_0xea02a8){while(--_0xea02a8){_0x26cf39['push'](_0x26cf39['shift']());}};_0x312c13(++_0x43ef3a);}(_0x5f66,0x1a0));var _0x65f6=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x5f66[_0x126558];return _0x1f6d14;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x65f6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x65f6('0x1'));var rp=require(_0x65f6('0x2'));var moment=require(_0x65f6('0x3'));var BPromise=require(_0x65f6('0x4'));var Mustache=require(_0x65f6('0x5'));var util=require('util');var path=require(_0x65f6('0x6'));var sox=require('sox');var csv=require(_0x65f6('0x7'));var ejs=require(_0x65f6('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x65f6('0x9'));var crypto=require(_0x65f6('0xa'));var jsforce=require(_0x65f6('0xb'));var deskjs=require(_0x65f6('0xc'));var toCsv=require(_0x65f6('0x7'));var querystring=require(_0x65f6('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x65f6('0xe'));var qs=require(_0x65f6('0xf'));var as=require(_0x65f6('0x10'));var hardwareService=require(_0x65f6('0x11'));var logger=require('../../config/logger')(_0x65f6('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x65f6('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x419819,_0x4862a5){_0x4862a5=_0x4862a5||0xcc;return function(_0x2f964a){if(_0x2f964a){return _0x419819[_0x65f6('0x14')](_0x4862a5);}return _0x419819[_0x65f6('0x15')](_0x4862a5)[_0x65f6('0x16')]();};}function respondWithResult(_0x369f96,_0x1d29fd){_0x1d29fd=_0x1d29fd||0xc8;return function(_0x44144b){if(_0x44144b){return _0x369f96[_0x65f6('0x15')](_0x1d29fd)[_0x65f6('0x17')](_0x44144b);}};}function respondWithFilteredResult(_0x3440af,_0x59154e){return function(_0x19b9ff){if(_0x19b9ff){var _0x49a913=typeof _0x59154e['offset']===_0x65f6('0x18')&&typeof _0x59154e[_0x65f6('0x19')]===_0x65f6('0x18');var _0x1c955c=_0x19b9ff[_0x65f6('0x1a')];var _0x1f974c=_0x49a913?0x0:_0x59154e[_0x65f6('0x1b')];var _0x18380e=_0x49a913?_0x19b9ff['count']:_0x59154e['offset']+_0x59154e[_0x65f6('0x19')];var _0x5b4055;if(_0x18380e>=_0x1c955c){_0x18380e=_0x1c955c;_0x5b4055=0xc8;}else{_0x5b4055=0xce;}_0x3440af['status'](_0x5b4055);return _0x3440af['set'](_0x65f6('0x1c'),_0x1f974c+'-'+_0x18380e+'/'+_0x1c955c)[_0x65f6('0x17')](_0x19b9ff);}return null;};}function patchUpdates(_0x5114a4){return function(_0x39e19f){try{jsonpatch[_0x65f6('0x1d')](_0x39e19f,_0x5114a4,!![]);}catch(_0xbee6a4){return BPromise[_0x65f6('0x1e')](_0xbee6a4);}return _0x39e19f[_0x65f6('0x1f')]();};}function saveUpdates(_0xc139c2,_0x581374){return function(_0x197a49){if(_0x197a49){return _0x197a49['update'](_0xc139c2)['then'](function(_0x212247){return _0x212247;});}return null;};}function removeEntity(_0xd173f4,_0x524e42){return function(_0x1eeaaa){if(_0x1eeaaa){return _0x1eeaaa[_0x65f6('0x20')]()[_0x65f6('0x21')](function(){_0xd173f4[_0x65f6('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x9d7bb0,_0x59ea32){return function(_0x20a161){if(!_0x20a161){_0x9d7bb0['sendStatus'](0x194);}return _0x20a161;};}function handleError(_0x5cb131,_0x4fde2f){_0x4fde2f=_0x4fde2f||0x1f4;return function(_0x29abdb){logger[_0x65f6('0x22')](_0x29abdb['stack']);if(_0x29abdb[_0x65f6('0x23')]){delete _0x29abdb[_0x65f6('0x23')];}_0x5cb131['status'](_0x4fde2f)[_0x65f6('0x24')](_0x29abdb);};}exports[_0x65f6('0x25')]=function(_0x28d0df,_0x559330){var _0x4ac04b={},_0x488d36={},_0x266cfe={'count':0x0,'rows':[]};var _0x3c032f=_[_0x65f6('0x26')](db[_0x65f6('0x27')][_0x65f6('0x28')],function(_0x14a387){return{'name':_0x14a387[_0x65f6('0x29')],'type':_0x14a387['type']['key']};});_0x488d36[_0x65f6('0x2a')]=_[_0x65f6('0x26')](_0x3c032f,'name');_0x488d36['query']=_[_0x65f6('0x2b')](_0x28d0df[_0x65f6('0x2c')]);_0x488d36[_0x65f6('0x2d')]=_[_0x65f6('0x2e')](_0x488d36[_0x65f6('0x2a')],_0x488d36[_0x65f6('0x2c')]);_0x4ac04b['attributes']=_[_0x65f6('0x2e')](_0x488d36[_0x65f6('0x2a')],qs[_0x65f6('0x2f')](_0x28d0df['query'][_0x65f6('0x2f')]));_0x4ac04b[_0x65f6('0x30')]=_0x4ac04b[_0x65f6('0x30')][_0x65f6('0x31')]?_0x4ac04b[_0x65f6('0x30')]:_0x488d36[_0x65f6('0x2a')];if(!_0x28d0df['query'][_0x65f6('0x32')](_0x65f6('0x33'))){_0x4ac04b['limit']=qs[_0x65f6('0x19')](_0x28d0df['query'][_0x65f6('0x19')]);_0x4ac04b['offset']=qs[_0x65f6('0x1b')](_0x28d0df[_0x65f6('0x2c')]['offset']);}_0x4ac04b[_0x65f6('0x34')]=qs[_0x65f6('0x35')](_0x28d0df[_0x65f6('0x2c')]['sort']);_0x4ac04b['where']=qs[_0x65f6('0x2d')](_['pick'](_0x28d0df[_0x65f6('0x2c')],_0x488d36['filters']),_0x3c032f);if(_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x36')]){_0x4ac04b['where']=_[_0x65f6('0x37')](_0x4ac04b['where'],{'$or':_['map'](_0x3c032f,function(_0x71b16b){if(_0x71b16b[_0x65f6('0x38')]!==_0x65f6('0x39')){var _0x313be5={};_0x313be5[_0x71b16b[_0x65f6('0x23')]]={'$like':'%'+_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x36')]+'%'};return _0x313be5;}})});}_0x4ac04b=_[_0x65f6('0x37')]({},_0x4ac04b,_0x28d0df['options']);var _0x3aa254={'where':_0x4ac04b['where']};return db[_0x65f6('0x27')][_0x65f6('0x1a')](_0x3aa254)[_0x65f6('0x21')](function(_0x2ea7f7){_0x266cfe['count']=_0x2ea7f7;if(_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x3a')]){_0x4ac04b[_0x65f6('0x3b')]=[{'all':!![]}];}return db[_0x65f6('0x27')][_0x65f6('0x3c')](_0x4ac04b);})[_0x65f6('0x21')](function(_0xed4c96){_0x266cfe[_0x65f6('0x3d')]=_0xed4c96;return _0x266cfe;})[_0x65f6('0x21')](respondWithFilteredResult(_0x559330,_0x4ac04b))['catch'](handleError(_0x559330,null));};exports[_0x65f6('0x3e')]=function(_0x400ed2,_0x377ae5){var _0x181798={'raw':!![],'where':{'id':_0x400ed2[_0x65f6('0x3f')]['id']}},_0x83e2d9={};_0x83e2d9[_0x65f6('0x2a')]=_[_0x65f6('0x2b')](db[_0x65f6('0x27')][_0x65f6('0x28')]);_0x83e2d9[_0x65f6('0x2c')]=_[_0x65f6('0x2b')](_0x400ed2[_0x65f6('0x2c')]);_0x83e2d9[_0x65f6('0x2d')]=_[_0x65f6('0x2e')](_0x83e2d9[_0x65f6('0x2a')],_0x83e2d9['query']);_0x181798[_0x65f6('0x30')]=_[_0x65f6('0x2e')](_0x83e2d9[_0x65f6('0x2a')],qs[_0x65f6('0x2f')](_0x400ed2['query'][_0x65f6('0x2f')]));_0x181798[_0x65f6('0x30')]=_0x181798[_0x65f6('0x30')]['length']?_0x181798[_0x65f6('0x30')]:_0x83e2d9[_0x65f6('0x2a')];if(_0x400ed2[_0x65f6('0x2c')][_0x65f6('0x3a')]){_0x181798['include']=[{'all':!![]}];}_0x181798=_[_0x65f6('0x37')]({},_0x181798,_0x400ed2['options']);return db[_0x65f6('0x27')][_0x65f6('0x40')](_0x181798)['then'](handleEntityNotFound(_0x377ae5,null))[_0x65f6('0x21')](respondWithResult(_0x377ae5,null))['catch'](handleError(_0x377ae5,null));};exports[_0x65f6('0x41')]=function(_0x4d9b76,_0x2d1706){return db[_0x65f6('0x27')][_0x65f6('0x41')](_0x4d9b76[_0x65f6('0x42')],{})['then'](respondWithResult(_0x2d1706,0xc9))['catch'](handleError(_0x2d1706,null));};exports[_0x65f6('0x43')]=function(_0x15d3ba,_0x3b647a){if(_0x15d3ba[_0x65f6('0x42')]['id']){delete _0x15d3ba[_0x65f6('0x42')]['id'];}return db[_0x65f6('0x27')][_0x65f6('0x40')]({'where':{'id':_0x15d3ba[_0x65f6('0x3f')]['id']}})[_0x65f6('0x21')](handleEntityNotFound(_0x3b647a,null))['then'](saveUpdates(_0x15d3ba[_0x65f6('0x42')],null))[_0x65f6('0x21')](respondWithResult(_0x3b647a,null))[_0x65f6('0x44')](handleError(_0x3b647a,null));};exports['destroy']=function(_0x47e749,_0x42d453){return db['CloudProvider'][_0x65f6('0x40')]({'where':{'id':_0x47e749[_0x65f6('0x3f')]['id']}})['then'](handleEntityNotFound(_0x42d453,null))[_0x65f6('0x21')](removeEntity(_0x42d453,null))['catch'](handleError(_0x42d453,null));}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js index 0f5530a..806c833 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 _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 +var _0x643b=['../../config/environment','exports','define','CloudProvider','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x475dbd,_0x406058){var _0x1e30c2=function(_0xafb9a5){while(--_0xafb9a5){_0x475dbd['push'](_0x475dbd['shift']());}};_0x1e30c2(++_0x406058);}(_0x643b,0xdc));var _0xb643=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x643b[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0xb643('0x0'));var util=require(_0xb643('0x1'));var logger=require(_0xb643('0x2'))(_0xb643('0x3'));var moment=require(_0xb643('0x4'));var BPromise=require(_0xb643('0x5'));var rp=require(_0xb643('0x6'));var fs=require('fs');var path=require(_0xb643('0x7'));var rimraf=require('rimraf');var config=require(_0xb643('0x8'));var attributes=require('./cloudProvider.attributes');module[_0xb643('0x9')]=function(_0x3d0270,_0x524522){return _0x3d0270[_0xb643('0xa')](_0xb643('0xb'),attributes,{'tableName':'cloud_providers','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 3530e57..bc2a229 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 _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 +var _0xdec3=['moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','CloudProvider,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x1b67f6,_0x276efe){var _0x3f1a02=function(_0x585a2c){while(--_0x585a2c){_0x1b67f6['push'](_0x1b67f6['shift']());}};_0x3f1a02(++_0x276efe);}(_0xdec3,0x89));var _0x3dec=function(_0x38212c,_0x8d1af0){_0x38212c=_0x38212c-0x0;var _0x417df6=_0xdec3[_0x38212c];return _0x417df6;};'use strict';var _=require(_0x3dec('0x0'));var util=require('util');var moment=require(_0x3dec('0x1'));var BPromise=require(_0x3dec('0x2'));var rs=require(_0x3dec('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3dec('0x4'))['db'];var utils=require(_0x3dec('0x5'));var logger=require(_0x3dec('0x6'))(_0x3dec('0x7'));var config=require('../../config/environment');var jayson=require(_0x3dec('0x8'));var client=jayson[_0x3dec('0x9')][_0x3dec('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xd3208e,_0x1826ab,_0x311a74){return new BPromise(function(_0x207dcf,_0x4b32d2){return client[_0x3dec('0xb')](_0xd3208e,_0x311a74)[_0x3dec('0xc')](function(_0x599552){logger[_0x3dec('0xd')]('CloudProvider,\x20%s,\x20%s',_0x1826ab,'request\x20sent');logger[_0x3dec('0xe')](_0x3dec('0xf'),_0x1826ab,'request\x20sent',JSON[_0x3dec('0x10')](_0x599552));if(_0x599552[_0x3dec('0x11')]){if(_0x599552['error'][_0x3dec('0x12')]===0x1f4){logger[_0x3dec('0x11')](_0x3dec('0x13'),_0x1826ab,_0x599552[_0x3dec('0x11')][_0x3dec('0x14')]);return _0x4b32d2(_0x599552[_0x3dec('0x11')]['message']);}logger['error'](_0x3dec('0x13'),_0x1826ab,_0x599552['error'][_0x3dec('0x14')]);return _0x207dcf(_0x599552[_0x3dec('0x11')]['message']);}else{logger['info'](_0x3dec('0x13'),_0x1826ab,'request\x20sent');_0x207dcf(_0x599552[_0x3dec('0x15')]['message']);}})[_0x3dec('0x16')](function(_0x51cb2c){logger[_0x3dec('0x11')](_0x3dec('0x13'),_0x1826ab,_0x51cb2c);_0x4b32d2(_0x51cb2c);});});} \ No newline at end of file diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js index cafb73b..9604096 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 _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 +var _0xb408=['util','connect-timeout','express','fs-extra','../../components/auth/service','get','isAuthenticated','index','/:id','show','post','put','update','delete','exports','multer'];(function(_0x3ee1fe,_0x59f2a1){var _0x1ae57a=function(_0x1ef0c4){while(--_0x1ef0c4){_0x3ee1fe['push'](_0x3ee1fe['shift']());}};_0x1ae57a(++_0x59f2a1);}(_0xb408,0x15f));var _0x8b40=function(_0x33c8cb,_0x56cff2){_0x33c8cb=_0x33c8cb-0x0;var _0x2d28bb=_0xb408[_0x33c8cb];return _0x2d28bb;};'use strict';var multer=require(_0x8b40('0x0'));var util=require(_0x8b40('0x1'));var path=require('path');var timeout=require(_0x8b40('0x2'));var express=require(_0x8b40('0x3'));var router=express['Router']();var fs_extra=require(_0x8b40('0x4'));var auth=require(_0x8b40('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./cloudProvider.controller');router[_0x8b40('0x6')]('/',auth[_0x8b40('0x7')](),controller[_0x8b40('0x8')]);router[_0x8b40('0x6')](_0x8b40('0x9'),auth[_0x8b40('0x7')](),controller[_0x8b40('0xa')]);router[_0x8b40('0xb')]('/',auth[_0x8b40('0x7')](),controller['create']);router[_0x8b40('0xc')](_0x8b40('0x9'),auth[_0x8b40('0x7')](),controller[_0x8b40('0xd')]);router[_0x8b40('0xe')](_0x8b40('0x9'),auth['isAuthenticated'](),controller['destroy']);module[_0x8b40('0xf')]=router; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js index 26b9bb7..5872e8c 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 _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 +var _0x11cf=['exports','STRING','name','sequelize'];(function(_0x38e310,_0x429031){var _0x31865c=function(_0x229fe1){while(--_0x229fe1){_0x38e310['push'](_0x38e310['shift']());}};_0x31865c(++_0x429031);}(_0x11cf,0x10b));var _0xf11c=function(_0xc18afe,_0x2e94a0){_0xc18afe=_0xc18afe-0x0;var _0x1b6c13=_0x11cf[_0xc18afe];return _0x1b6c13;};'use strict';var Sequelize=require(_0xf11c('0x0'));module[_0xf11c('0x1')]={'name':{'type':Sequelize[_0xf11c('0x2')],'unique':_0xf11c('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xf11c('0x2')]},'companyId':{'type':Sequelize[_0xf11c('0x2')]},'website':{'type':Sequelize[_0xf11c('0x2')]},'phone':{'type':Sequelize[_0xf11c('0x2')]},'fax':{'type':Sequelize[_0xf11c('0x2')]},'type':{'type':Sequelize[_0xf11c('0x2')]},'street':{'type':Sequelize[_0xf11c('0x2')]},'postalCode':{'type':Sequelize[_0xf11c('0x2')]},'city':{'type':Sequelize[_0xf11c('0x2')]},'country':{'type':Sequelize[_0xf11c('0x2')]},'email':{'type':Sequelize[_0xf11c('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize['STRING']},'sStreet':{'type':Sequelize[_0xf11c('0x2')]},'sPostalCode':{'type':Sequelize['STRING']},'sCity':{'type':Sequelize[_0xf11c('0x2')]},'sCountry':{'type':Sequelize[_0xf11c('0x2')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js index 03f2b28..537ea39 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 _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 +var _0x1e36=['include','rows','catch','show','params','create','body','user','UserProfileSection','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','addContacts','CmContact','ids','getContacts','findOne','rawAttributes','order','filter','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','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','sendStatus','status','end','offset','undefined','limit','count','Content-Range','apply','reject','save','destroy','then','get','Companies','UserProfileResource','error','stack','name','send','CmCompany','describe','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','where','merge','map','options','includeAll'];(function(_0x5d2728,_0x437ffd){var _0x4aa031=function(_0xe562c4){while(--_0xe562c4){_0x5d2728['push'](_0x5d2728['shift']());}};_0x4aa031(++_0x437ffd);}(_0x1e36,0x1cd));var _0x61e3=function(_0x3f6bcf,_0x531e79){_0x3f6bcf=_0x3f6bcf-0x0;var _0x1c5350=_0x1e36[_0x3f6bcf];return _0x1c5350;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x61e3('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x61e3('0x1'));var rp=require(_0x61e3('0x2'));var moment=require(_0x61e3('0x3'));var BPromise=require(_0x61e3('0x4'));var Mustache=require('mustache');var util=require(_0x61e3('0x5'));var path=require(_0x61e3('0x6'));var sox=require(_0x61e3('0x7'));var csv=require(_0x61e3('0x8'));var ejs=require(_0x61e3('0x9'));var fs=require('fs');var fs_extra=require(_0x61e3('0xa'));var _=require(_0x61e3('0xb'));var squel=require(_0x61e3('0xc'));var crypto=require(_0x61e3('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x61e3('0xe'));var toCsv=require(_0x61e3('0x8'));var querystring=require(_0x61e3('0xf'));var Papa=require(_0x61e3('0x10'));var Redis=require(_0x61e3('0x11'));var authService=require(_0x61e3('0x12'));var qs=require(_0x61e3('0x13'));var as=require(_0x61e3('0x14'));var hardwareService=require(_0x61e3('0x15'));var logger=require(_0x61e3('0x16'))(_0x61e3('0x17'));var utils=require(_0x61e3('0x18'));var config=require(_0x61e3('0x19'));var licenseUtil=require(_0x61e3('0x1a'));var db=require(_0x61e3('0x1b'))['db'];function respondWithStatusCode(_0x43e814,_0x5309fd){_0x5309fd=_0x5309fd||0xcc;return function(_0x57b9be){if(_0x57b9be){return _0x43e814[_0x61e3('0x1c')](_0x5309fd);}return _0x43e814[_0x61e3('0x1d')](_0x5309fd)[_0x61e3('0x1e')]();};}function respondWithResult(_0x53d653,_0x261e2a){_0x261e2a=_0x261e2a||0xc8;return function(_0x389e63){if(_0x389e63){return _0x53d653[_0x61e3('0x1d')](_0x261e2a)['json'](_0x389e63);}};}function respondWithFilteredResult(_0x2a0c25,_0x13560e){return function(_0x5eee4b){if(_0x5eee4b){var _0x79f50=typeof _0x13560e[_0x61e3('0x1f')]===_0x61e3('0x20')&&typeof _0x13560e[_0x61e3('0x21')]===_0x61e3('0x20');var _0x16b393=_0x5eee4b[_0x61e3('0x22')];var _0x4528d6=_0x79f50?0x0:_0x13560e['offset'];var _0x12692e=_0x79f50?_0x5eee4b[_0x61e3('0x22')]:_0x13560e[_0x61e3('0x1f')]+_0x13560e['limit'];var _0x53e274;if(_0x12692e>=_0x16b393){_0x12692e=_0x16b393;_0x53e274=0xc8;}else{_0x53e274=0xce;}_0x2a0c25[_0x61e3('0x1d')](_0x53e274);return _0x2a0c25['set'](_0x61e3('0x23'),_0x4528d6+'-'+_0x12692e+'/'+_0x16b393)['json'](_0x5eee4b);}return null;};}function patchUpdates(_0xbb252f){return function(_0x2570b3){try{jsonpatch[_0x61e3('0x24')](_0x2570b3,_0xbb252f,!![]);}catch(_0x286972){return BPromise[_0x61e3('0x25')](_0x286972);}return _0x2570b3[_0x61e3('0x26')]();};}function saveUpdates(_0x419db3,_0x3203a6){return function(_0x284926){if(_0x284926){return _0x284926['update'](_0x419db3)['then'](function(_0x58630a){return _0x58630a;});}return null;};}function removeEntity(_0x59ad8,_0x408128){return function(_0x557ea3){if(_0x557ea3){return _0x557ea3[_0x61e3('0x27')]()[_0x61e3('0x28')](function(){var _0x471b50=_0x557ea3[_0x61e3('0x29')]({'plain':!![]});var _0x55deed=_0x61e3('0x2a');return db[_0x61e3('0x2b')]['destroy']({'where':{'type':_0x55deed,'resourceId':_0x471b50['id']}})[_0x61e3('0x28')](function(){return _0x557ea3;});})[_0x61e3('0x28')](function(){_0x59ad8[_0x61e3('0x1d')](0xcc)[_0x61e3('0x1e')]();});}};}function handleEntityNotFound(_0x2ca7cb,_0x3197b4){return function(_0x3b23c8){if(!_0x3b23c8){_0x2ca7cb[_0x61e3('0x1c')](0x194);}return _0x3b23c8;};}function handleError(_0x59ef59,_0xb88833){_0xb88833=_0xb88833||0x1f4;return function(_0x353684){logger[_0x61e3('0x2c')](_0x353684[_0x61e3('0x2d')]);if(_0x353684[_0x61e3('0x2e')]){delete _0x353684[_0x61e3('0x2e')];}_0x59ef59[_0x61e3('0x1d')](_0xb88833)[_0x61e3('0x2f')](_0x353684);};}exports['index']=function(_0x359e7a,_0x19bb32){var _0x2228e6={},_0x59989d={},_0x3dd147={'count':0x0,'rows':[]};return db[_0x61e3('0x30')][_0x61e3('0x31')]()[_0x61e3('0x28')](function(_0x39a0f0){_0x59989d[_0x61e3('0x32')]=_[_0x61e3('0x33')](_0x39a0f0);_0x59989d[_0x61e3('0x34')]=_[_0x61e3('0x33')](_0x359e7a[_0x61e3('0x34')]);_0x59989d[_0x61e3('0x35')]=_[_0x61e3('0x36')](_0x59989d[_0x61e3('0x32')],_0x59989d[_0x61e3('0x34')]);_0x2228e6[_0x61e3('0x37')]=_[_0x61e3('0x36')](_0x59989d[_0x61e3('0x32')],qs[_0x61e3('0x38')](_0x359e7a[_0x61e3('0x34')][_0x61e3('0x38')]));_0x2228e6['attributes']=_0x2228e6[_0x61e3('0x37')][_0x61e3('0x39')]?_0x2228e6[_0x61e3('0x37')]:_0x59989d[_0x61e3('0x32')];if(!_0x359e7a[_0x61e3('0x34')][_0x61e3('0x3a')](_0x61e3('0x3b'))){_0x2228e6[_0x61e3('0x21')]=qs['limit'](_0x359e7a[_0x61e3('0x34')]['limit']);_0x2228e6[_0x61e3('0x1f')]=qs[_0x61e3('0x1f')](_0x359e7a[_0x61e3('0x34')][_0x61e3('0x1f')]);}_0x2228e6['order']=qs[_0x61e3('0x3c')](_0x359e7a['query'][_0x61e3('0x3c')]);_0x2228e6['where']=qs['filters'](_[_0x61e3('0x3d')](_0x359e7a[_0x61e3('0x34')],_0x59989d[_0x61e3('0x35')]),_0x39a0f0);if(_0x359e7a[_0x61e3('0x34')]['filter']){_0x2228e6[_0x61e3('0x3e')]=_[_0x61e3('0x3f')](_0x2228e6[_0x61e3('0x3e')],{'$or':_[_0x61e3('0x40')](_0x2228e6[_0x61e3('0x37')],function(_0xad4f5d){var _0x1087df={};_0x1087df[_0xad4f5d]={'$like':'%'+_0x359e7a[_0x61e3('0x34')]['filter']+'%'};return _0x1087df;})});}_0x2228e6=_[_0x61e3('0x3f')]({},_0x2228e6,_0x359e7a[_0x61e3('0x41')]);var _0xc466d3={'where':_0x2228e6['where']};return db[_0x61e3('0x30')][_0x61e3('0x22')](_0xc466d3)[_0x61e3('0x28')](function(_0x2848bf){_0x3dd147[_0x61e3('0x22')]=_0x2848bf;if(_0x359e7a[_0x61e3('0x34')][_0x61e3('0x42')]){_0x2228e6[_0x61e3('0x43')]=[{'all':!![]}];}return db[_0x61e3('0x30')]['findAll'](_0x2228e6);})[_0x61e3('0x28')](function(_0x5b06c0){_0x3dd147[_0x61e3('0x44')]=_0x5b06c0;return _0x3dd147;})[_0x61e3('0x28')](respondWithFilteredResult(_0x19bb32,_0x2228e6))[_0x61e3('0x45')](handleError(_0x19bb32,null));})[_0x61e3('0x45')](handleError(_0x19bb32,null));};exports[_0x61e3('0x46')]=function(_0x568253,_0x33655d){var _0x500324={'raw':![],'where':{'id':_0x568253[_0x61e3('0x47')]['id']}},_0x211a14={};_0x211a14['model']=_[_0x61e3('0x33')](db[_0x61e3('0x30')]['rawAttributes']);_0x211a14[_0x61e3('0x34')]=_[_0x61e3('0x33')](_0x568253[_0x61e3('0x34')]);_0x211a14[_0x61e3('0x35')]=_[_0x61e3('0x36')](_0x211a14[_0x61e3('0x32')],_0x211a14[_0x61e3('0x34')]);_0x500324['attributes']=_[_0x61e3('0x36')](_0x211a14[_0x61e3('0x32')],qs[_0x61e3('0x38')](_0x568253[_0x61e3('0x34')][_0x61e3('0x38')]));_0x500324[_0x61e3('0x37')]=_0x500324[_0x61e3('0x37')]['length']?_0x500324['attributes']:_0x211a14['model'];if(_0x568253[_0x61e3('0x34')][_0x61e3('0x42')]){_0x500324[_0x61e3('0x43')]=[{'all':!![]}];}_0x500324=_[_0x61e3('0x3f')]({},_0x500324,_0x568253[_0x61e3('0x41')]);return db[_0x61e3('0x30')]['find'](_0x500324)[_0x61e3('0x28')](handleEntityNotFound(_0x33655d,null))[_0x61e3('0x28')](respondWithResult(_0x33655d,null))[_0x61e3('0x45')](handleError(_0x33655d,null));};exports[_0x61e3('0x48')]=function(_0x5b892c,_0x3b6c03){return db['CmCompany'][_0x61e3('0x48')](_0x5b892c[_0x61e3('0x49')],{})[_0x61e3('0x28')](function(_0xe9c5be){var _0xfbdd6a=_0x5b892c['user'][_0x61e3('0x29')]({'plain':!![]});if(!_0xfbdd6a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xfbdd6a['role']===_0x61e3('0x4a')){var _0x582eb6=_0xe9c5be[_0x61e3('0x29')]({'plain':!![]});var _0x56a353=_0x61e3('0x2a');return db[_0x61e3('0x4b')][_0x61e3('0x4c')]({'where':{'name':_0x56a353,'userProfileId':_0xfbdd6a[_0x61e3('0x4d')]},'raw':!![]})[_0x61e3('0x28')](function(_0x3aa573){if(_0x3aa573&&_0x3aa573['autoAssociation']===0x0){return db['UserProfileResource'][_0x61e3('0x48')]({'name':_0x582eb6[_0x61e3('0x2e')],'resourceId':_0x582eb6['id'],'type':_0x3aa573[_0x61e3('0x2e')],'sectionId':_0x3aa573['id']},{})[_0x61e3('0x28')](function(){return _0xe9c5be;});}else{return _0xe9c5be;}})[_0x61e3('0x45')](function(_0x12aebd){logger['error'](_0x61e3('0x4e'),_0x12aebd);throw _0x12aebd;});}return _0xe9c5be;})[_0x61e3('0x28')](respondWithResult(_0x3b6c03,0xc9))[_0x61e3('0x45')](handleError(_0x3b6c03,null));};exports[_0x61e3('0x4f')]=function(_0x1d66e3,_0x51193e){if(_0x1d66e3[_0x61e3('0x49')]['id']){delete _0x1d66e3[_0x61e3('0x49')]['id'];}return db[_0x61e3('0x30')][_0x61e3('0x4c')]({'where':{'id':_0x1d66e3[_0x61e3('0x47')]['id']}})[_0x61e3('0x28')](handleEntityNotFound(_0x51193e,null))[_0x61e3('0x28')](saveUpdates(_0x1d66e3['body'],null))[_0x61e3('0x28')](respondWithResult(_0x51193e,null))[_0x61e3('0x45')](handleError(_0x51193e,null));};exports[_0x61e3('0x27')]=function(_0x1dbc7d,_0xd8050a){return db[_0x61e3('0x30')][_0x61e3('0x4c')]({'where':{'id':_0x1dbc7d[_0x61e3('0x47')]['id']}})[_0x61e3('0x28')](handleEntityNotFound(_0xd8050a,null))[_0x61e3('0x28')](removeEntity(_0xd8050a,null))[_0x61e3('0x45')](handleError(_0xd8050a,null));};exports[_0x61e3('0x31')]=function(_0xe8673b,_0x123aff){return db['CmCompany'][_0x61e3('0x31')]()[_0x61e3('0x28')](respondWithResult(_0x123aff,null))[_0x61e3('0x45')](handleError(_0x123aff,null));};exports[_0x61e3('0x50')]=function(_0x19f7e1,_0x13a208,_0x1b5fa5){return db[_0x61e3('0x51')][_0x61e3('0x4c')]({'where':{'id':_0x19f7e1['params']['id']}})['then'](handleEntityNotFound(_0x13a208,null))['then'](function(_0x23d9c2){if(_0x23d9c2){return _0x23d9c2[_0x61e3('0x50')](_0x19f7e1[_0x61e3('0x49')][_0x61e3('0x52')],_['omit'](_0x19f7e1[_0x61e3('0x49')],[_0x61e3('0x52'),'id'])||{});}})['then'](respondWithResult(_0x13a208,null))[_0x61e3('0x45')](handleError(_0x13a208,null));};exports[_0x61e3('0x53')]=function(_0xeb3f6d,_0x2d5a38,_0x2c794b){var _0x4f2d20={};var _0x1f7f36={};var _0x214fa2;var _0xd0e82a;return db['CmCompany'][_0x61e3('0x54')]({'where':{'id':_0xeb3f6d['params']['id']}})[_0x61e3('0x28')](handleEntityNotFound(_0x2d5a38,null))['then'](function(_0x4a1067){if(_0x4a1067){_0x214fa2=_0x4a1067;_0x1f7f36[_0x61e3('0x32')]=_[_0x61e3('0x33')](db[_0x61e3('0x51')][_0x61e3('0x55')]);_0x1f7f36[_0x61e3('0x34')]=_[_0x61e3('0x33')](_0xeb3f6d['query']);_0x1f7f36[_0x61e3('0x35')]=_['intersection'](_0x1f7f36[_0x61e3('0x32')],_0x1f7f36[_0x61e3('0x34')]);_0x4f2d20[_0x61e3('0x37')]=_[_0x61e3('0x36')](_0x1f7f36[_0x61e3('0x32')],qs['fields'](_0xeb3f6d[_0x61e3('0x34')]['fields']));_0x4f2d20[_0x61e3('0x37')]=_0x4f2d20['attributes']['length']?_0x4f2d20[_0x61e3('0x37')]:_0x1f7f36[_0x61e3('0x32')];_0x4f2d20[_0x61e3('0x56')]=qs[_0x61e3('0x3c')](_0xeb3f6d[_0x61e3('0x34')][_0x61e3('0x3c')]);_0x4f2d20['where']=qs['filters'](_[_0x61e3('0x3d')](_0xeb3f6d[_0x61e3('0x34')],_0x1f7f36['filters']));if(_0xeb3f6d[_0x61e3('0x34')]['filter']){_0x4f2d20[_0x61e3('0x3e')]=_[_0x61e3('0x3f')](_0x4f2d20[_0x61e3('0x3e')],{'$or':_[_0x61e3('0x40')](_0x4f2d20[_0x61e3('0x37')],function(_0x5af1b2){var _0x40f75a={};_0x40f75a[_0x5af1b2]={'$like':'%'+_0xeb3f6d['query'][_0x61e3('0x57')]+'%'};return _0x40f75a;})});}_0x4f2d20=_[_0x61e3('0x3f')]({},_0x4f2d20,_0xeb3f6d[_0x61e3('0x41')]);return _0x214fa2[_0x61e3('0x53')](_0x4f2d20);}})[_0x61e3('0x28')](function(_0xdb5177){if(_0xdb5177){_0xd0e82a=_0xdb5177['length'];if(!_0xeb3f6d[_0x61e3('0x34')][_0x61e3('0x3a')]('nolimit')){_0x4f2d20[_0x61e3('0x21')]=qs[_0x61e3('0x21')](_0xeb3f6d[_0x61e3('0x34')][_0x61e3('0x21')]);_0x4f2d20[_0x61e3('0x1f')]=qs[_0x61e3('0x1f')](_0xeb3f6d['query'][_0x61e3('0x1f')]);}return _0x214fa2[_0x61e3('0x53')](_0x4f2d20);}})[_0x61e3('0x28')](function(_0x497d77){if(_0x497d77){return _0x497d77?{'count':_0xd0e82a,'rows':_0x497d77}:null;}})[_0x61e3('0x28')](respondWithResult(_0x2d5a38,null))['catch'](handleError(_0x2d5a38,null));}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js index 1366b96..fa9871c 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 _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 +var _0xf616=['util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./cmCompany.attributes','CmCompany','lodash'];(function(_0x4b860e,_0x260c4d){var _0x2ae9ab=function(_0x58484e){while(--_0x58484e){_0x4b860e['push'](_0x4b860e['shift']());}};_0x2ae9ab(++_0x260c4d);}(_0xf616,0x13e));var _0x6f61=function(_0x550d7f,_0xfbff3d){_0x550d7f=_0x550d7f-0x0;var _0x3a6d70=_0xf616[_0x550d7f];return _0x3a6d70;};'use strict';var _=require(_0x6f61('0x0'));var util=require(_0x6f61('0x1'));var logger=require(_0x6f61('0x2'))(_0x6f61('0x3'));var moment=require(_0x6f61('0x4'));var BPromise=require(_0x6f61('0x5'));var rp=require(_0x6f61('0x6'));var fs=require('fs');var path=require(_0x6f61('0x7'));var rimraf=require('rimraf');var config=require(_0x6f61('0x8'));var attributes=require(_0x6f61('0x9'));module['exports']=function(_0x5a678a,_0x40b438){return _0x5a678a['define'](_0x6f61('0xa'),attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js index 90e13c2..a58d0d5 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 _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 +var _0x99a5=['code','CmCompany,\x20%s,\x20%s','message','result','catch','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x58a38d,_0x5d90e1){var _0x4f9c9b=function(_0x5766ca){while(--_0x5766ca){_0x58a38d['push'](_0x58a38d['shift']());}};_0x4f9c9b(++_0x5d90e1);}(_0x99a5,0x8a));var _0x599a=function(_0x3ca621,_0x1481ba){_0x3ca621=_0x3ca621-0x0;var _0x14f8b8=_0x99a5[_0x3ca621];return _0x14f8b8;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x599a('0x0'));var fs=require('fs');var Redis=require(_0x599a('0x1'));var db=require('../../mysqldb')['db'];var utils=require(_0x599a('0x2'));var logger=require('../../config/logger')(_0x599a('0x3'));var config=require('../../config/environment');var jayson=require(_0x599a('0x4'));var client=jayson[_0x599a('0x5')][_0x599a('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x3f0d82,_0x330df8,_0x2ae85a){return new BPromise(function(_0x107ce0,_0x4eddb0){return client[_0x599a('0x7')](_0x3f0d82,_0x2ae85a)['then'](function(_0x5adffd){logger[_0x599a('0x8')]('CmCompany,\x20%s,\x20%s',_0x330df8,_0x599a('0x9'));logger[_0x599a('0xa')](_0x599a('0xb'),_0x330df8,'request\x20sent',JSON[_0x599a('0xc')](_0x5adffd));if(_0x5adffd['error']){if(_0x5adffd[_0x599a('0xd')][_0x599a('0xe')]===0x1f4){logger[_0x599a('0xd')](_0x599a('0xf'),_0x330df8,_0x5adffd[_0x599a('0xd')][_0x599a('0x10')]);return _0x4eddb0(_0x5adffd[_0x599a('0xd')][_0x599a('0x10')]);}logger[_0x599a('0xd')](_0x599a('0xf'),_0x330df8,_0x5adffd[_0x599a('0xd')]['message']);return _0x107ce0(_0x5adffd['error'][_0x599a('0x10')]);}else{logger[_0x599a('0x8')](_0x599a('0xf'),_0x330df8,_0x599a('0x9'));_0x107ce0(_0x5adffd[_0x599a('0x11')]['message']);}})[_0x599a('0x12')](function(_0x859d2b){logger['error'](_0x599a('0xf'),_0x330df8,_0x859d2b);_0x4eddb0(_0x859d2b);});});} \ No newline at end of file diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js index fff6ace..3ac77d9 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 _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 +var _0x15f0=['get','index','isAuthenticated','describe','/:id','show','/:id/contacts','getContacts','create','post','put','update','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCompany.controller'];(function(_0x5e580b,_0x3d8f6f){var _0x4889f9=function(_0x32a7f8){while(--_0x32a7f8){_0x5e580b['push'](_0x5e580b['shift']());}};_0x4889f9(++_0x3d8f6f);}(_0x15f0,0x116));var _0x015f=function(_0x3e0358,_0x4c796b){_0x3e0358=_0x3e0358-0x0;var _0x282a06=_0x15f0[_0x3e0358];return _0x282a06;};'use strict';var multer=require(_0x015f('0x0'));var util=require(_0x015f('0x1'));var path=require(_0x015f('0x2'));var timeout=require(_0x015f('0x3'));var express=require(_0x015f('0x4'));var router=express['Router']();var fs_extra=require(_0x015f('0x5'));var auth=require(_0x015f('0x6'));var interaction=require(_0x015f('0x7'));var config=require(_0x015f('0x8'));var controller=require(_0x015f('0x9'));router[_0x015f('0xa')]('/',auth['isAuthenticated'](),controller[_0x015f('0xb')]);router[_0x015f('0xa')]('/describe',auth[_0x015f('0xc')](),controller[_0x015f('0xd')]);router[_0x015f('0xa')](_0x015f('0xe'),auth['isAuthenticated'](),controller[_0x015f('0xf')]);router['get'](_0x015f('0x10'),auth[_0x015f('0xc')](),controller[_0x015f('0x11')]);router['post']('/',auth['isAuthenticated'](),controller[_0x015f('0x12')]);router[_0x015f('0x13')](_0x015f('0x10'),auth['isAuthenticated'](),controller['addContacts']);router[_0x015f('0x14')](_0x015f('0xe'),auth[_0x015f('0xc')](),controller[_0x015f('0x15')]);router['delete'](_0x015f('0xe'),auth['isAuthenticated'](),controller[_0x015f('0x16')]);module[_0x015f('0x17')]=router; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js index c5dc011..b6cf3d5 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 _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 +var _0x209e=['exports','STRING','INTEGER','UNSIGNED','DATE','lodash'];(function(_0x2ce122,_0x5730a0){var _0x4f7bb0=function(_0x121465){while(--_0x121465){_0x2ce122['push'](_0x2ce122['shift']());}};_0x4f7bb0(++_0x5730a0);}(_0x209e,0x1eb));var _0xe209=function(_0x12cc23,_0xc858dd){_0x12cc23=_0x12cc23-0x0;var _0x59a105=_0x209e[_0x12cc23];return _0x59a105;};'use strict';var _=require(_0xe209('0x0'));var Sequelize=require('sequelize');module[_0xe209('0x1')]={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0xe209('0x2')]},'postalCode':{'type':Sequelize[_0xe209('0x2')]},'city':{'type':Sequelize[_0xe209('0x2')]},'country':{'type':Sequelize[_0xe209('0x2')]},'dateOfBirth':{'type':Sequelize[_0xe209('0x2')]},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize[_0xe209('0x2')]},'mobile':{'type':Sequelize[_0xe209('0x2')]},'fax':{'type':Sequelize[_0xe209('0x2')]},'email':{'type':Sequelize[_0xe209('0x2')]},'url':{'type':Sequelize[_0xe209('0x2')]},'facebook':{'type':Sequelize[_0xe209('0x2')]},'fb_data':{'type':Sequelize[_0xe209('0x2')]},'twitter':{'type':Sequelize[_0xe209('0x2')]},'skype':{'type':Sequelize[_0xe209('0x2')]},'teams':{'type':Sequelize[_0xe209('0x2')]},'viber':{'type':Sequelize[_0xe209('0x2')]},'line':{'type':Sequelize[_0xe209('0x2')]},'wechat':{'type':Sequelize[_0xe209('0x2')]},'telegram':{'type':Sequelize[_0xe209('0x2')]},'UserId':{'type':Sequelize[_0xe209('0x3')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0xe209('0x4')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0xe209('0x5')],'defaultValue':Sequelize['NOW']}}; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js index 5146b58..979e005 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 _0x803d=['split','map','union','User','and','dateOfBirth','datetime','castTo','DATE','buildExpression','type','text','isNil','Contact','isEmpty','forEach','ListId','c.ListId\x20IN\x20?','concat','CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?','\x20=\x20?','isArray','tag','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','isNumeric','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','isEmail','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','c.email\x20LIKE\x20?','c.id','Sequelize','QueryTypes','SELECT','clone','having','t.id\x20IN\x20?','user','agent','getLists','c.ListId\x20IS\x20NULL','role','sequelize','count','toString','keyBy','c.firstName','c.lastName','c.phone','c.mobile','c.fax','c.email','c.ListId','c.createdAt','c.deletedAt','c.CompanyId','GROUP_CONCAT(DISTINCT\x20t.id)','TagIds','Tags','rows','catch','find','params','describe','tags','columnName','findAll','displayName','alias','custom','body','get','join','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','info','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','FaxInteraction','OpenchannelInteraction','OpenchannelMessage','ReportAgentPreview','MailQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','bulkCreate','each','duplicates','$or','findOrCreate','spread','error','$and','format','omit','pickBy','cf_%d','table','setFields','id\x20=\x20?','values','phone','CmHopper','getTags','Tag','rawAttributes','pick','merge','options','setTags','ids','ContactId','includeAll','include','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','getJscriptySessions','uploadCsv','No\x20ListId\x20specified','binding_keys','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Incorrect\x20binding\x20parameters\x20passed!','zipObject','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','pid','upload','createReadStream','path','parse','import','binding','No\x20phone\x20column\x20specified','stringify','message','start\x20child\x20process\x20correctly!','mail','chat','sms','openchannel','fax','whatsapp','voice','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','callerid','endtime','note','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','createdAt','DESC','VoiceCallReport','findAndCountAll','startCase','Website','Account','closed','closedAt','disposition','thirdDisposition','key','color','browserName','customerIp','customerPort','deviceModel','osName','ratingMessage','ratingType','ratingValue','referer','subject','substatus','externalUrl','threadId','Interaction','Owner','flatten','slice','eml-format','rimraf','request-promise','moment','bluebird','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./cmContact.socket','register','sendStatus','end','json','offset','limit','undefined','set','Content-Range','apply','reject','update','then','destroy','status','stack','name','send','index','CmContact','keys','length','startsWith','cf_','push','CmCustomField','findOne','trimStart','all','fieldType','model','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','field','from','select','cm_contacts','cm_user_has_contacts','left_join','cm_contact_has_tags','t.id\x20=\x20ct.TagId','c.deletedAt\x20IS\x20NULL','expr','parseSearch','search','conditions','value'];(function(_0x2a10e5,_0x5b53e3){var _0x1587a2=function(_0xd003c0){while(--_0xd003c0){_0x2a10e5['push'](_0x2a10e5['shift']());}};_0x1587a2(++_0x5b53e3);}(_0x803d,0xd9));var _0xd803=function(_0x1af52a,_0x38c0e7){_0x1af52a=_0x1af52a-0x0;var _0x508b2c=_0x803d[_0x1af52a];return _0x508b2c;};'use strict';var emlformat=require(_0xd803('0x0'));var rimraf=require(_0xd803('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd803('0x2'));var moment=require(_0xd803('0x3'));var BPromise=require(_0xd803('0x4'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xd803('0x5'));var csv=require(_0xd803('0x6'));var ejs=require(_0xd803('0x7'));var fs=require('fs');var fs_extra=require(_0xd803('0x8'));var _=require(_0xd803('0x9'));var squel=require(_0xd803('0xa'));var crypto=require('crypto');var jsforce=require(_0xd803('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xd803('0xc'));var qs=require(_0xd803('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd803('0xe'));var logger=require(_0xd803('0xf'))(_0xd803('0x10'));var utils=require(_0xd803('0x11'));var config=require(_0xd803('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0xd803('0x13'))['db'];config[_0xd803('0x14')]=_[_0xd803('0x15')](config[_0xd803('0x14')],{'host':_0xd803('0x16'),'port':0x18eb});var socket=require(_0xd803('0x17'))(new Redis(config[_0xd803('0x14')]));require(_0xd803('0x18'))[_0xd803('0x19')](socket);function respondWithStatusCode(_0x572328,_0x2830bc){_0x2830bc=_0x2830bc||0xcc;return function(_0x2c8e5f){if(_0x2c8e5f){return _0x572328[_0xd803('0x1a')](_0x2830bc);}return _0x572328['status'](_0x2830bc)[_0xd803('0x1b')]();};}function respondWithResult(_0x24f351,_0x1814f3){_0x1814f3=_0x1814f3||0xc8;return function(_0xc2c380){if(_0xc2c380){return _0x24f351['status'](_0x1814f3)[_0xd803('0x1c')](_0xc2c380);}};}function respondWithFilteredResult(_0x4cdbff,_0x1f10c2){return function(_0x171103){if(_0x171103){var _0x1471d6=typeof _0x1f10c2[_0xd803('0x1d')]==='undefined'&&typeof _0x1f10c2[_0xd803('0x1e')]===_0xd803('0x1f');var _0xe98f53=_0x171103['count'];var _0x573858=_0x1471d6?0x0:_0x1f10c2[_0xd803('0x1d')];var _0x5a6572=_0x1471d6?_0x171103['count']:_0x1f10c2['offset']+_0x1f10c2[_0xd803('0x1e')];var _0x22dc60;if(_0x5a6572>=_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=_0xa2e1ef){_0x417d5b=_0xa2e1ef;_0x7b8532=0xc8;}else{_0x7b8532=0xce;}_0x46f8c5['status'](_0x7b8532);return _0x46f8c5['set'](_0x3de4('0x24'),_0x40bb53+'-'+_0x417d5b+'/'+_0xa2e1ef)[_0x3de4('0x1f')](_0x241954);}return null;};}function patchUpdates(_0x49b39d){return function(_0x4d2e16){try{jsonpatch[_0x3de4('0x25')](_0x4d2e16,_0x49b39d,!![]);}catch(_0x24c16f){return BPromise[_0x3de4('0x26')](_0x24c16f);}return _0x4d2e16[_0x3de4('0x27')]();};}function saveUpdates(_0x3452d7,_0x1d211f){return function(_0x38e322){if(_0x38e322){return _0x38e322[_0x3de4('0x28')](_0x3452d7)[_0x3de4('0x29')](function(_0x4ec249){return _0x4ec249;});}return null;};}function removeEntity(_0x4c60cc,_0x5e3f35){return function(_0x37ff9e){if(_0x37ff9e){return _0x37ff9e[_0x3de4('0x2a')]()[_0x3de4('0x29')](function(){_0x4c60cc[_0x3de4('0x1d')](0xcc)[_0x3de4('0x1e')]();});}};}function handleEntityNotFound(_0x3f8129,_0x18e1cf){return function(_0x2b46d9){if(!_0x2b46d9){_0x3f8129[_0x3de4('0x1c')](0x194);}return _0x2b46d9;};}function handleError(_0x53315e,_0x3e869e){_0x3e869e=_0x3e869e||0x1f4;return function(_0x4714f7){logger[_0x3de4('0x2b')](_0x4714f7['stack']);if(_0x4714f7[_0x3de4('0x2c')]){delete _0x4714f7[_0x3de4('0x2c')];}_0x53315e[_0x3de4('0x1d')](_0x3e869e)[_0x3de4('0x2d')](_0x4714f7);};}exports[_0x3de4('0x2e')]=function(_0xcf7ce7,_0x5608ae){var _0x131d62={},_0x471dda={},_0x45c5ad={'count':0x0,'rows':[]};return db['CmContact'][_0x3de4('0x2f')]()[_0x3de4('0x29')](function(_0x2bc9c4){var _0x29d777=[];for(var _0x1a90d7=0x0;_0x1a90d70x1){_0x1ab78b['or'](_0x3de4('0x6d'),qs['getFullTextValue'](_0x379d88),null);}else{if(qs[_0x3de4('0x6e')](_0x379d88)){_0x1ab78b['or'](_0x3de4('0x6f'),_0x379d88+'%');_0x1ab78b['or']('c.phone\x20LIKE\x20?',_0x379d88+'%');_0x1ab78b['or']('c.mobile\x20LIKE\x20?',_0x379d88+'%');_0x1ab78b['or'](_0x3de4('0x70'),_0x379d88+'%');}else if(qs[_0x3de4('0x71')](_0x379d88)){_0x1ab78b['or'](_0x3de4('0x72'),_0x379d88+'%');}else{_0x1ab78b['or']('c.firstName\x20LIKE\x20?','%'+_0x379d88+'%');_0x1ab78b['or']('c.lastName\x20LIKE\x20?','%'+_0x379d88+'%');_0x1ab78b['or'](_0x3de4('0x72'),'%'+_0x379d88+'%');}}}}_0x3ff72d[_0x3de4('0x4c')](_0x1ab78b);_0x3ff72d['group'](_0x3de4('0x73'));var _0x30380a={'type':db[_0x3de4('0x74')][_0x3de4('0x75')][_0x3de4('0x76')],'raw':!![]};var _0x1b7992=_0x3ff72d[_0x3de4('0x77')]()[_0x3de4('0x42')](_0x3de4('0x73'));if(_0x131d62[_0x3de4('0x3e')]){_0x131d62[_0x3de4('0x3e')][_0x3de4('0x55')](function(_0x2fbc05){_0x3ff72d['order']('c.'+_0x2fbc05[0x0],_0x2fbc05[0x1]===_0x3de4('0x78')?![]:!![]);});}if(!_[_0x3de4('0x79')](_0x4a7ffb)){_0x3ff72d['having'](_0x5e9a97);_0x1b7992['where'](_0x3de4('0x7a'),_0x4a7ffb);}BPromise[_0x3de4('0x7b')]()['then'](function(){if(!_0x3f22e4)return;if(_0xcf7ce7[_0x3de4('0x7c')][_0x3de4('0x7d')]!==_0x3de4('0x7e'))return;if(!_[_0x3de4('0x7f')](_0x3f22e4[_0x3de4('0x50')],[_0x3de4('0x42'),'User'])){return _0xcf7ce7[_0x3de4('0x7c')][_0x3de4('0x80')]({'attributes':['id'],'raw':!![]})[_0x3de4('0x29')](function(_0x52c363){if(_[_0x3de4('0x79')](_0x52c363)){_0x1b7992[_0x3de4('0x4c')]('c.ListId\x20IS\x20NULL');_0x3ff72d[_0x3de4('0x4c')](_0x3de4('0x81'));}else{_0x1b7992[_0x3de4('0x4c')](_0x3de4('0x67'),_[_0x3de4('0x62')](_0x52c363,'id'));_0x3ff72d[_0x3de4('0x4c')](_0x3de4('0x67'),_[_0x3de4('0x62')](_0x52c363,'id'));}});}})['then'](function(){if(_0xcf7ce7[_0x3de4('0x7c')][_0x3de4('0x7d')]===_0x3de4('0x7e')&&!_0x3f22e4&&!_0xcf7ce7[_0x3de4('0x39')]['ListId'])return[];return db['sequelize'][_0x3de4('0x39')](_0x1b7992[_0x3de4('0x82')](),_0x30380a);})[_0x3de4('0x29')](function(_0x2fc29c){_0x45c5ad['count']=_0x2fc29c[_0x3de4('0x31')];if(_0x45c5ad[_0x3de4('0x23')]===0x0)return[];return db['sequelize'][_0x3de4('0x39')](_0x36de19[_0x3de4('0x82')](),_0x30380a)[_0x3de4('0x29')](function(_0x4e5bd9){_0xaa6019=_[_0x3de4('0x83')](_0x4e5bd9,'id');_0x30380a=_[_0x3de4('0x84')](_0x30380a,{'model':db['CmContact'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0xcf7ce7[_0x3de4('0x39')][_0x3de4('0x3c')]){_0x131d62[_0x3de4('0x3a')][_0x3de4('0x55')](function(_0x365add){_0x3ff72d[_0x3de4('0x42')]('c.'+_0x365add);});}else{_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x73'));_0x3ff72d['field']('c.firstName');_0x3ff72d['field'](_0x3de4('0x85'));_0x3ff72d[_0x3de4('0x42')]('c.phone');_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x86'));_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x87'));_0x3ff72d['field'](_0x3de4('0x88'));_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x89'));_0x3ff72d['field'](_0x3de4('0x8a'));_0x3ff72d['field'](_0x3de4('0x8b'));_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x8c'));_0x3ff72d[_0x3de4('0x42')](_0x3de4('0x8d'),_0x3de4('0x8e'));}if(_0x131d62[_0x3de4('0x22')])_0x3ff72d[_0x3de4('0x22')](_0x131d62[_0x3de4('0x22')]);if(_0x131d62[_0x3de4('0x20')])_0x3ff72d[_0x3de4('0x20')](_0x131d62['offset']);return db[_0x3de4('0x8f')][_0x3de4('0x39')](_0x3ff72d[_0x3de4('0x82')](),_0x30380a);});})[_0x3de4('0x29')](function(_0x6ba571){_0x6ba571['forEach'](function(_0x252fbb){if(_0x252fbb[_0x3de4('0x8e')]){_0x252fbb[_0x3de4('0x90')]=[];_0x252fbb[_0x3de4('0x8e')][_0x3de4('0x54')](',')['forEach'](function(_0x46fd80){_0x252fbb[_0x3de4('0x90')][_0x3de4('0x32')](_0xaa6019[_0x46fd80]);});}delete _0x252fbb[_0x3de4('0x8e')];});_0x45c5ad[_0x3de4('0x91')]=_0x6ba571;return _0x45c5ad;})[_0x3de4('0x29')](respondWithFilteredResult(_0x5608ae,_0x131d62));})[_0x3de4('0x92')](handleError(_0x5608ae,null));};exports[_0x3de4('0x2a')]=function(_0x2be99d,_0x478daa){return db['CmContact'][_0x3de4('0x51')]({'where':{'id':_0x2be99d[_0x3de4('0x93')]['id']}})[_0x3de4('0x29')](handleEntityNotFound(_0x478daa,null))[_0x3de4('0x29')](removeEntity(_0x478daa,null))['catch'](handleError(_0x478daa,null));};exports[_0x3de4('0x2f')]=function(_0x35d0ca,_0x1d95ce){return db[_0x3de4('0x94')][_0x3de4('0x2f')]()[_0x3de4('0x29')](function(_0x542e52){delete _0x542e52[_0x3de4('0x95')];for(var _0x544eef=0x0;_0x544eef{}\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 +var _0xfb41=['getJourney','post','/merge','create','bulkCreate','setTags','diskStorage','join','root','server/files/tmp','replace','format','%s-%s%s','originalname','extname','now','/csv','single','file','uploadCsv','basename','/upload','upload','/upload/:id','import','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/tags','getTags','/:id/hoppers','getHoppers','getHopperFinals','/:id/journey'];(function(_0x43ca77,_0x5db07d){var _0x178194=function(_0x3cb6f2){while(--_0x3cb6f2){_0x43ca77['push'](_0x43ca77['shift']());}};_0x178194(++_0x5db07d);}(_0xfb41,0xe1));var _0x1fb4=function(_0x5b70f0,_0x189655){_0x5b70f0=_0x5b70f0-0x0;var _0x49a246=_0xfb41[_0x5b70f0];return _0x49a246;};'use strict';var multer=require(_0x1fb4('0x0'));var util=require(_0x1fb4('0x1'));var path=require(_0x1fb4('0x2'));var timeout=require(_0x1fb4('0x3'));var express=require(_0x1fb4('0x4'));var router=express[_0x1fb4('0x5')]();var fs_extra=require(_0x1fb4('0x6'));var auth=require(_0x1fb4('0x7'));var interaction=require(_0x1fb4('0x8'));var config=require(_0x1fb4('0x9'));var controller=require('./cmContact.controller');router[_0x1fb4('0xa')]('/',auth[_0x1fb4('0xb')](),controller['index']);router[_0x1fb4('0xa')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x1fb4('0xa')](_0x1fb4('0xc'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0xd')]);router[_0x1fb4('0xa')](_0x1fb4('0xe'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0xf')]);router[_0x1fb4('0xa')](_0x1fb4('0x10'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x11')]);router[_0x1fb4('0xa')]('/:id/hopper_histories',auth['isAuthenticated'](),controller['getHopperHistories']);router['get']('/:id/hopper_finals',auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x12')]);router[_0x1fb4('0xa')]('/:id/jscripty_sessions',auth['isAuthenticated'](),controller['getJscriptySessions']);router[_0x1fb4('0xa')](_0x1fb4('0x13'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x14')]);router[_0x1fb4('0x15')](_0x1fb4('0x16'),auth[_0x1fb4('0xb')](),controller['merge']);router[_0x1fb4('0x15')]('/',auth['isAuthenticated'](),controller[_0x1fb4('0x17')]);router[_0x1fb4('0x15')]('/create_many',auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x18')]);router[_0x1fb4('0x15')](_0x1fb4('0xe'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x19')]);var upload=multer({'storage':multer[_0x1fb4('0x1a')]({'destination':function(_0x27d6eb,_0x31f781,_0xbf0ed5){_0xbf0ed5(null,path[_0x1fb4('0x1b')](config[_0x1fb4('0x1c')],_0x1fb4('0x1d')));},'filename':function(_0x1cecb9,_0x2c73e7,_0x5e4ecb){_0x2c73e7['originalname']=_0x2c73e7['originalname'][_0x1fb4('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5e4ecb(null,util[_0x1fb4('0x1f')](_0x1fb4('0x20'),path['basename'](_0x2c73e7[_0x1fb4('0x21')],path[_0x1fb4('0x22')](_0x2c73e7[_0x1fb4('0x21')])),Date[_0x1fb4('0x23')](),path[_0x1fb4('0x22')](_0x2c73e7[_0x1fb4('0x21')])));}})});router['post'](_0x1fb4('0x24'),upload[_0x1fb4('0x25')](_0x1fb4('0x26')),controller[_0x1fb4('0x27')]);var upload=multer({'storage':multer[_0x1fb4('0x1a')]({'destination':function(_0x2f91ff,_0x1a849f,_0x3b8b26){_0x3b8b26(null,path['join'](config[_0x1fb4('0x1c')],'server/files/tmp'));},'filename':function(_0x56bc52,_0x19f2cb,_0x41e7a6){_0x19f2cb[_0x1fb4('0x21')]=_0x19f2cb[_0x1fb4('0x21')][_0x1fb4('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x41e7a6(null,util[_0x1fb4('0x1f')]('%s-%s%s',path[_0x1fb4('0x28')](_0x19f2cb[_0x1fb4('0x21')],path[_0x1fb4('0x22')](_0x19f2cb[_0x1fb4('0x21')])),Date[_0x1fb4('0x23')](),path[_0x1fb4('0x22')](_0x19f2cb[_0x1fb4('0x21')])));}})});router['post'](_0x1fb4('0x29'),upload[_0x1fb4('0x25')]('file'),controller[_0x1fb4('0x2a')]);router[_0x1fb4('0x15')](_0x1fb4('0x2b'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x2c')]);router[_0x1fb4('0x2d')](_0x1fb4('0xc'),auth[_0x1fb4('0xb')](),controller[_0x1fb4('0x2e')]);router[_0x1fb4('0x2f')](_0x1fb4('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0x1fb4('0x30')]=router; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.attributes.js b/server/api/cmCustomField/cmCustomField.attributes.js index 5434dd6..5b4daa4 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 _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 +var _0x6eff=['setDataValue','name','select','parse','values','isArray','BOOLEAN','voice','sequelize','exports','VIRTUAL','getDataValue','alias','STRING'];(function(_0x33e7eb,_0x1525b5){var _0x5000c9=function(_0x4bfa1d){while(--_0x4bfa1d){_0x33e7eb['push'](_0x33e7eb['shift']());}};_0x5000c9(++_0x1525b5);}(_0x6eff,0xb0));var _0xf6ef=function(_0x15482e,_0x25b23c){_0x15482e=_0x15482e-0x0;var _0x4a0651=_0x6eff[_0x15482e];return _0x4a0651;};'use strict';var Sequelize=require(_0xf6ef('0x0'));var _=require('lodash');module[_0xf6ef('0x1')]={'name':{'type':Sequelize[_0xf6ef('0x2')],'get':function(_0x16e806){return this[_0xf6ef('0x3')](_0xf6ef('0x4'));}},'alias':{'type':Sequelize[_0xf6ef('0x5')],'allowNull':![],'set':function(_0x19a4d7){this[_0xf6ef('0x6')](_0xf6ef('0x4'),_0x19a4d7?_0x19a4d7:this[_0xf6ef('0x3')](_0xf6ef('0x7')));}},'type':{'type':Sequelize['STRING'],'allowNull':![]},'values':{'type':Sequelize['TEXT']('long'),'get':function(){if(this[_0xf6ef('0x3')]('type')===_0xf6ef('0x8')){return JSON[_0xf6ef('0x9')](this[_0xf6ef('0x3')](_0xf6ef('0xa')));}else{return this[_0xf6ef('0x3')](_0xf6ef('0xa'));}},'set':function(_0x49c278){if(Array[_0xf6ef('0xb')](_0x49c278)){this['setDataValue'](_0xf6ef('0xa'),JSON['stringify'](_0x49c278));}else{this[_0xf6ef('0x6')](_0xf6ef('0xa'),_0x49c278);}}},'required':{'type':Sequelize[_0xf6ef('0xc')],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0xf6ef('0xc')],'defaultValue':![]},'actionType':{'type':Sequelize['ENUM'](_0xf6ef('0xd'))}}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.controller.js b/server/api/cmCustomField/cmCustomField.controller.js index a3606fb..787ec7f 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 _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 +var _0x096c=['../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','CmCustomField','rawAttributes','fieldName','type','model','differenceBy','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','options','find','body','transaction','Sequelize','TEXT','text','number','INTEGER','switch','BOOLEAN','queryInterface','addColumn','cm_contacts','format','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x352607,_0x6ac8fa){var _0x5fd4fa=function(_0x16cd1d){while(--_0x16cd1d){_0x352607['push'](_0x352607['shift']());}};_0x5fd4fa(++_0x6ac8fa);}(_0x096c,0xa0));var _0xc096=function(_0x2304ae,_0x1f5715){_0x2304ae=_0x2304ae-0x0;var _0xb96249=_0x096c[_0x2304ae];return _0xb96249;};'use strict';var emlformat=require(_0xc096('0x0'));var rimraf=require(_0xc096('0x1'));var zipdir=require(_0xc096('0x2'));var jsonpatch=require(_0xc096('0x3'));var rp=require(_0xc096('0x4'));var moment=require(_0xc096('0x5'));var BPromise=require(_0xc096('0x6'));var Mustache=require(_0xc096('0x7'));var util=require('util');var path=require('path');var sox=require(_0xc096('0x8'));var csv=require(_0xc096('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('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc096('0x9'));var querystring=require('querystring');var Papa=require(_0xc096('0xa'));var Redis=require(_0xc096('0xb'));var authService=require(_0xc096('0xc'));var qs=require(_0xc096('0xd'));var as=require(_0xc096('0xe'));var hardwareService=require(_0xc096('0xf'));var logger=require('../../config/logger')(_0xc096('0x10'));var utils=require(_0xc096('0x11'));var config=require(_0xc096('0x12'));var licenseUtil=require(_0xc096('0x13'));var db=require(_0xc096('0x14'))['db'];function respondWithStatusCode(_0x741950,_0x2ad87e){_0x2ad87e=_0x2ad87e||0xcc;return function(_0x1bca2d){if(_0x1bca2d){return _0x741950['sendStatus'](_0x2ad87e);}return _0x741950[_0xc096('0x15')](_0x2ad87e)[_0xc096('0x16')]();};}function respondWithResult(_0x5ebccf,_0x15590d){_0x15590d=_0x15590d||0xc8;return function(_0x2c56d1){if(_0x2c56d1){return _0x5ebccf[_0xc096('0x15')](_0x15590d)[_0xc096('0x17')](_0x2c56d1);}};}function respondWithFilteredResult(_0x215ca7,_0x3d9c4c){return function(_0x47fb3e){if(_0x47fb3e){var _0x5dfc9f=typeof _0x3d9c4c['offset']===_0xc096('0x18')&&typeof _0x3d9c4c[_0xc096('0x19')]===_0xc096('0x18');var _0x5197de=_0x47fb3e['count'];var _0x141076=_0x5dfc9f?0x0:_0x3d9c4c[_0xc096('0x1a')];var _0x3e6587=_0x5dfc9f?_0x47fb3e[_0xc096('0x1b')]:_0x3d9c4c[_0xc096('0x1a')]+_0x3d9c4c[_0xc096('0x19')];var _0x573b10;if(_0x3e6587>=_0x5197de){_0x3e6587=_0x5197de;_0x573b10=0xc8;}else{_0x573b10=0xce;}_0x215ca7[_0xc096('0x15')](_0x573b10);return _0x215ca7[_0xc096('0x1c')](_0xc096('0x1d'),_0x141076+'-'+_0x3e6587+'/'+_0x5197de)['json'](_0x47fb3e);}return null;};}function patchUpdates(_0x91aa2){return function(_0x5270da){try{jsonpatch[_0xc096('0x1e')](_0x5270da,_0x91aa2,!![]);}catch(_0x2e95e4){return BPromise[_0xc096('0x1f')](_0x2e95e4);}return _0x5270da[_0xc096('0x20')]();};}function saveUpdates(_0x312700,_0x3a0718){return function(_0x386da5){if(_0x386da5){return _0x386da5[_0xc096('0x21')](_0x312700)[_0xc096('0x22')](function(_0x563374){return _0x563374;});}return null;};}function removeEntity(_0x564423,_0x3cf09c){return function(_0x247fc4){if(_0x247fc4){return _0x247fc4[_0xc096('0x23')]()['then'](function(){_0x564423['status'](0xcc)[_0xc096('0x16')]();});}};}function handleEntityNotFound(_0x36cc9e,_0x40636a){return function(_0x5ceb8d){if(!_0x5ceb8d){_0x36cc9e[_0xc096('0x24')](0x194);}return _0x5ceb8d;};}function handleError(_0x5c36b7,_0x4bf164){_0x4bf164=_0x4bf164||0x1f4;return function(_0x17544a){logger[_0xc096('0x25')](_0x17544a[_0xc096('0x26')]);if(_0x17544a[_0xc096('0x27')]){delete _0x17544a[_0xc096('0x27')];}_0x5c36b7[_0xc096('0x15')](_0x4bf164)[_0xc096('0x28')](_0x17544a);};}exports[_0xc096('0x29')]=function(_0x7109f9,_0x48fd95){var _0x2d6f22={},_0x556179={},_0x44f93f={'count':0x0,'rows':[]};var _0x5833d6=_['map'](db[_0xc096('0x2a')][_0xc096('0x2b')],function(_0x59a79d){return{'name':_0x59a79d[_0xc096('0x2c')],'type':_0x59a79d[_0xc096('0x2d')]['key']};});_0x556179[_0xc096('0x2e')]=_[_0xc096('0x2f')](_[_0xc096('0x30')](_0x5833d6,_0xc096('0x27')),['name']);_0x556179['query']=_[_0xc096('0x31')](_0x7109f9[_0xc096('0x32')]);_0x556179[_0xc096('0x33')]=_[_0xc096('0x34')](_0x556179['model'],_0x556179['query']);_0x2d6f22[_0xc096('0x35')]=_[_0xc096('0x34')](_0x556179[_0xc096('0x2e')],qs['fields'](_0x7109f9[_0xc096('0x32')][_0xc096('0x36')]));_0x2d6f22[_0xc096('0x35')]=_0x2d6f22[_0xc096('0x35')][_0xc096('0x37')]?_0x2d6f22[_0xc096('0x35')]:_0x556179[_0xc096('0x2e')];if(!_0x7109f9['query'][_0xc096('0x38')](_0xc096('0x39'))){_0x2d6f22[_0xc096('0x19')]=qs[_0xc096('0x19')](_0x7109f9[_0xc096('0x32')][_0xc096('0x19')]);_0x2d6f22[_0xc096('0x1a')]=qs[_0xc096('0x1a')](_0x7109f9['query'][_0xc096('0x1a')]);}_0x2d6f22[_0xc096('0x3a')]=qs[_0xc096('0x3b')](_0x7109f9[_0xc096('0x32')][_0xc096('0x3b')]);_0x2d6f22['where']=qs[_0xc096('0x33')](_[_0xc096('0x3c')](_0x7109f9[_0xc096('0x32')],_0x556179[_0xc096('0x33')]),_0x5833d6);if(_0x7109f9[_0xc096('0x32')][_0xc096('0x3d')]){_0x2d6f22[_0xc096('0x3e')]=_[_0xc096('0x3f')](_0x2d6f22[_0xc096('0x3e')],{'$or':_[_0xc096('0x30')](_0x5833d6,function(_0x35b512){if(_0x35b512['type']!==_0xc096('0x40')){var _0x5b9e52={};_0x5b9e52[_0x35b512[_0xc096('0x27')]]={'$like':'%'+_0x7109f9[_0xc096('0x32')]['filter']+'%'};return _0x5b9e52;}})});}_0x2d6f22=_[_0xc096('0x3f')]({},_0x2d6f22,_0x7109f9['options']);var _0x2bd105={'where':_0x2d6f22[_0xc096('0x3e')]};return db[_0xc096('0x2a')][_0xc096('0x1b')](_0x2bd105)[_0xc096('0x22')](function(_0x3349da){_0x44f93f[_0xc096('0x1b')]=_0x3349da;if(_0x7109f9['query'][_0xc096('0x41')]){_0x2d6f22[_0xc096('0x42')]=[{'all':!![]}];}return db[_0xc096('0x2a')][_0xc096('0x43')](_0x2d6f22);})[_0xc096('0x22')](function(_0x50dc90){_0x44f93f[_0xc096('0x44')]=_0x50dc90;return _0x44f93f;})[_0xc096('0x22')](respondWithFilteredResult(_0x48fd95,_0x2d6f22))[_0xc096('0x45')](handleError(_0x48fd95,null));};exports[_0xc096('0x46')]=function(_0x395efd,_0x4507aa){var _0x4b734c={'raw':!![],'where':{'id':_0x395efd[_0xc096('0x47')]['id']}},_0x12dfc7={};_0x12dfc7[_0xc096('0x2e')]=_[_0xc096('0x31')](db['CmCustomField'][_0xc096('0x2b')]);_0x12dfc7[_0xc096('0x32')]=_[_0xc096('0x31')](_0x395efd[_0xc096('0x32')]);_0x12dfc7[_0xc096('0x33')]=_['intersection'](_0x12dfc7['model'],_0x12dfc7[_0xc096('0x32')]);_0x4b734c[_0xc096('0x35')]=_[_0xc096('0x34')](_0x12dfc7[_0xc096('0x2e')],qs['fields'](_0x395efd[_0xc096('0x32')][_0xc096('0x36')]));_0x4b734c[_0xc096('0x35')]=_0x4b734c[_0xc096('0x35')]['length']?_0x4b734c['attributes']:_0x12dfc7[_0xc096('0x2e')];if(_0x395efd[_0xc096('0x32')]['includeAll']){_0x4b734c[_0xc096('0x42')]=[{'all':!![]}];}_0x4b734c=_[_0xc096('0x3f')]({},_0x4b734c,_0x395efd[_0xc096('0x48')]);return db[_0xc096('0x2a')][_0xc096('0x49')](_0x4b734c)[_0xc096('0x22')](handleEntityNotFound(_0x4507aa,null))['then'](respondWithResult(_0x4507aa,null))[_0xc096('0x45')](handleError(_0x4507aa,null));};exports[_0xc096('0x21')]=function(_0x2f2903,_0xb5c9aa){if(_0x2f2903['body']['id']){delete _0x2f2903[_0xc096('0x4a')]['id'];}return db[_0xc096('0x2a')]['find']({'where':{'id':_0x2f2903[_0xc096('0x47')]['id']}})[_0xc096('0x22')](handleEntityNotFound(_0xb5c9aa,null))[_0xc096('0x22')](saveUpdates(_0x2f2903[_0xc096('0x4a')],null))[_0xc096('0x22')](respondWithResult(_0xb5c9aa,null))[_0xc096('0x45')](handleError(_0xb5c9aa,null));};exports[_0xc096('0x23')]=function(_0x588481,_0x4e09a5){return db[_0xc096('0x2a')][_0xc096('0x49')]({'where':{'id':_0x588481['params']['id']}})[_0xc096('0x22')](handleEntityNotFound(_0x4e09a5,null))[_0xc096('0x22')](removeEntity(_0x4e09a5,null))[_0xc096('0x45')](handleError(_0x4e09a5,null));};exports['create']=function(_0x271aef,_0x2df88f){var _0x3bcda5;return db['sequelize'][_0xc096('0x4b')](function(_0xaba763){return db[_0xc096('0x2a')]['create'](_0x271aef[_0xc096('0x4a')],{'transaction':_0xaba763})[_0xc096('0x22')](function(_0x1d12f4){_0x3bcda5=_0x1d12f4;var _0x4c5f28={'type':db[_0xc096('0x4c')][_0xc096('0x4d')],'transaction':_0xaba763};switch(_0x271aef[_0xc096('0x4a')]['type']){case _0xc096('0x4e'):_0x4c5f28[_0xc096('0x2d')]=db[_0xc096('0x4c')]['TEXT'];break;case _0xc096('0x4f'):_0x4c5f28['type']=db['Sequelize'][_0xc096('0x50')];break;case _0xc096('0x51'):_0x4c5f28[_0xc096('0x2d')]=db[_0xc096('0x4c')][_0xc096('0x52')];_0x4c5f28['defaultValue']=![];break;default:}return db['sequelize'][_0xc096('0x53')][_0xc096('0x54')](_0xc096('0x55'),util[_0xc096('0x56')]('cf_%d',_0x3bcda5['id']),_0x4c5f28);})[_0xc096('0x22')](function(){return _0x3bcda5;});})['then'](respondWithResult(_0x2df88f,0xc9))[_0xc096('0x45')](handleError(_0x2df88f,null));}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.model.js b/server/api/cmCustomField/cmCustomField.model.js index 73b52e3..7ec3d4a 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 _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 +var _0x9b5d=['define','CmCustomField','cm_custom_fields','util','../../config/logger','api','moment','request-promise','path','./cmCustomField.attributes','exports'];(function(_0xc2b3ce,_0x533dfd){var _0x30e6bb=function(_0x1f24aa){while(--_0x1f24aa){_0xc2b3ce['push'](_0xc2b3ce['shift']());}};_0x30e6bb(++_0x533dfd);}(_0x9b5d,0xea));var _0xd9b5=function(_0x192656,_0x2f8088){_0x192656=_0x192656-0x0;var _0x358a77=_0x9b5d[_0x192656];return _0x358a77;};'use strict';var _=require('lodash');var util=require(_0xd9b5('0x0'));var logger=require(_0xd9b5('0x1'))(_0xd9b5('0x2'));var moment=require(_0xd9b5('0x3'));var BPromise=require('bluebird');var rp=require(_0xd9b5('0x4'));var fs=require('fs');var path=require(_0xd9b5('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd9b5('0x6'));module[_0xd9b5('0x7')]=function(_0x5651c8,_0x26e475){return _0x5651c8[_0xd9b5('0x8')](_0xd9b5('0x9'),attributes,{'tableName':_0xd9b5('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 c289be9..73a0111 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 _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 +var _0x4d2b=['stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','CmCustomField,\x20%s,\x20%s','request\x20sent','CmCustomField,\x20%s,\x20%s,\x20%s'];(function(_0x17c3e3,_0x1f64b4){var _0x16cbea=function(_0x44a3a8){while(--_0x44a3a8){_0x17c3e3['push'](_0x17c3e3['shift']());}};_0x16cbea(++_0x1f64b4);}(_0x4d2b,0x125));var _0xb4d2=function(_0x151f3a,_0x159318){_0x151f3a=_0x151f3a-0x0;var _0x154ae6=_0x4d2b[_0x151f3a];return _0x154ae6;};'use strict';var _=require(_0xb4d2('0x0'));var util=require(_0xb4d2('0x1'));var moment=require(_0xb4d2('0x2'));var BPromise=require(_0xb4d2('0x3'));var rs=require(_0xb4d2('0x4'));var fs=require('fs');var Redis=require(_0xb4d2('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb4d2('0x6'))(_0xb4d2('0x7'));var config=require(_0xb4d2('0x8'));var jayson=require(_0xb4d2('0x9'));var client=jayson['client'][_0xb4d2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3fb699,_0x354e81,_0x5cc4df){return new BPromise(function(_0x492575,_0xbc741){return client['request'](_0x3fb699,_0x5cc4df)[_0xb4d2('0xb')](function(_0x1fea2a){logger['info'](_0xb4d2('0xc'),_0x354e81,_0xb4d2('0xd'));logger['debug'](_0xb4d2('0xe'),_0x354e81,_0xb4d2('0xd'),JSON[_0xb4d2('0xf')](_0x1fea2a));if(_0x1fea2a['error']){if(_0x1fea2a[_0xb4d2('0x10')][_0xb4d2('0x11')]===0x1f4){logger[_0xb4d2('0x10')]('CmCustomField,\x20%s,\x20%s',_0x354e81,_0x1fea2a[_0xb4d2('0x10')][_0xb4d2('0x12')]);return _0xbc741(_0x1fea2a[_0xb4d2('0x10')]['message']);}logger['error'](_0xb4d2('0xc'),_0x354e81,_0x1fea2a[_0xb4d2('0x10')][_0xb4d2('0x12')]);return _0x492575(_0x1fea2a[_0xb4d2('0x10')][_0xb4d2('0x12')]);}else{logger[_0xb4d2('0x13')](_0xb4d2('0xc'),_0x354e81,_0xb4d2('0xd'));_0x492575(_0x1fea2a[_0xb4d2('0x14')][_0xb4d2('0x12')]);}})[_0xb4d2('0x15')](function(_0x7dc087){logger[_0xb4d2('0x10')](_0xb4d2('0xc'),_0x354e81,_0x7dc087);_0xbc741(_0x7dc087);});});} \ No newline at end of file diff --git a/server/api/cmCustomField/index.js b/server/api/cmCustomField/index.js index c9e8ff5..7551212 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 _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 +var _0x4a25=['get','isAuthenticated','index','/:id','show','create','delete','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./cmCustomField.controller'];(function(_0x4fb86e,_0x1445cd){var _0x755186=function(_0x3a0313){while(--_0x3a0313){_0x4fb86e['push'](_0x4fb86e['shift']());}};_0x755186(++_0x1445cd);}(_0x4a25,0x1d4));var _0x54a2=function(_0x5c619e,_0x1bccdf){_0x5c619e=_0x5c619e-0x0;var _0x445cf8=_0x4a25[_0x5c619e];return _0x445cf8;};'use strict';var multer=require(_0x54a2('0x0'));var util=require('util');var path=require(_0x54a2('0x1'));var timeout=require('connect-timeout');var express=require(_0x54a2('0x2'));var router=express[_0x54a2('0x3')]();var fs_extra=require(_0x54a2('0x4'));var auth=require(_0x54a2('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x54a2('0x6'));var controller=require(_0x54a2('0x7'));router[_0x54a2('0x8')]('/',auth[_0x54a2('0x9')](),controller[_0x54a2('0xa')]);router['get'](_0x54a2('0xb'),auth[_0x54a2('0x9')](),controller[_0x54a2('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x54a2('0xd')]);router['put'](_0x54a2('0xb'),auth[_0x54a2('0x9')](),controller['update']);router[_0x54a2('0xe')](_0x54a2('0xb'),auth['isAuthenticated'](),controller[_0x54a2('0xf')]);module[_0x54a2('0x10')]=router; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.attributes.js b/server/api/cmHopper/cmHopper.attributes.js index 50f08f8..b2b083c 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 _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 +var _0x5379=['BOOLEAN','format','INTEGER','DATE','UNSIGNED','contactListQueue','sequelize','exports','STRING'];(function(_0x2a51c3,_0x1b9fa2){var _0x406bcb=function(_0x50136a){while(--_0x50136a){_0x2a51c3['push'](_0x2a51c3['shift']());}};_0x406bcb(++_0x1b9fa2);}(_0x5379,0x180));var _0x9537=function(_0x5aaa92,_0x1dbdfb){_0x5aaa92=_0x5aaa92-0x0;var _0x2861f4=_0x5379[_0x5aaa92];return _0x2861f4;};'use strict';var moment=require('moment');var Sequelize=require(_0x9537('0x0'));module[_0x9537('0x1')]={'phone':{'type':Sequelize[_0x9537('0x2')],'allowNull':![]},'active':{'type':Sequelize[_0x9537('0x3')],'defaultValue':![]},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':moment()[_0x9537('0x4')]('YYYY-MM-DD\x20HH:mm:ss')},'countbusyretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'callback':{'type':Sequelize[_0x9537('0x3')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x9537('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x9537('0x6')]},'priority':{'type':Sequelize[_0x9537('0x5')](0x2)[_0x9537('0x7')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0x9537('0x3')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x9537('0x5')],'unique':_0x9537('0x8')},'ListId':{'type':Sequelize[_0x9537('0x5')],'unique':_0x9537('0x8')},'UserId':{'type':Sequelize[_0x9537('0x5')]},'VoiceQueueId':{'type':Sequelize[_0x9537('0x5')],'unique':'contactListQueue'},'CampaignId':{'type':Sequelize[_0x9537('0x5')]},'countnosuchnumberretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x9537('0x5')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x9537('0x5')],'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 417b4dd..44052df 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 _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 +var _0xa945=['$gte','$lt','$lte','$ne','$eq','$not','$notBetween','$in','$notIn','$like','$notLike','$iLike','$overlap','$contained','$any','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','pick','filter','merge','options','includeAll','include','rows','catch','show','length','find','create','body','params','describe','VoiceQueueId','VoiceQueue','Campaign','CampaignId','dataValues','state','statedesc','deleted','campaign','membername','user','UserId','deletedat','format','YYYY-MM-DD\x20HH:mm:ss','calleridnum','queue','ivr','CmContact','ContactId','lastName','isNil','firstName','calleridname','finally','getPreview','outbound','dialOrderByScheduledAt','sequelize','transaction','prev','isEmpty','hopperIds','priority','scheduledAt','ASC','DESC','COALESCE(CmHopper.UserId,\x200)\x20DESC','scheduledat','LOCK','UPDATE','Contact','CmCompany','Company','CmList','List','Queue','getOpenContacts','preview','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','limit','undefined','count','offset','Content-Range','json','apply','reject','update','destroy','then','error','stack','name','send','index','map','CmHopper','rawAttributes','fieldName','type','key','query','keys','filters','model','concat','$and','$gt'];(function(_0x4c17d7,_0x156e7a){var _0x48401e=function(_0x458a13){while(--_0x458a13){_0x4c17d7['push'](_0x4c17d7['shift']());}};_0x48401e(++_0x156e7a);}(_0xa945,0xe9));var _0x5a94=function(_0x1f2935,_0xa47d27){_0x1f2935=_0x1f2935-0x0;var _0x4a9d5b=_0xa945[_0x1f2935];return _0x4a9d5b;};'use strict';var emlformat=require(_0x5a94('0x0'));var rimraf=require(_0x5a94('0x1'));var zipdir=require(_0x5a94('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5a94('0x3'));var BPromise=require(_0x5a94('0x4'));var Mustache=require(_0x5a94('0x5'));var util=require(_0x5a94('0x6'));var path=require('path');var sox=require(_0x5a94('0x7'));var csv=require(_0x5a94('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5a94('0x9'));var _=require(_0x5a94('0xa'));var squel=require(_0x5a94('0xb'));var crypto=require(_0x5a94('0xc'));var jsforce=require(_0x5a94('0xd'));var deskjs=require(_0x5a94('0xe'));var toCsv=require(_0x5a94('0x8'));var querystring=require(_0x5a94('0xf'));var Papa=require(_0x5a94('0x10'));var Redis=require(_0x5a94('0x11'));var authService=require(_0x5a94('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x5a94('0x13'));var hardwareService=require(_0x5a94('0x14'));var logger=require(_0x5a94('0x15'))(_0x5a94('0x16'));var utils=require('../../config/utils');var config=require(_0x5a94('0x17'));var licenseUtil=require(_0x5a94('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1021c3,_0x15be6a){_0x15be6a=_0x15be6a||0xcc;return function(_0x2db758){if(_0x2db758){return _0x1021c3[_0x5a94('0x19')](_0x15be6a);}return _0x1021c3[_0x5a94('0x1a')](_0x15be6a)[_0x5a94('0x1b')]();};}function respondWithResult(_0x20f139,_0x5ed45e){_0x5ed45e=_0x5ed45e||0xc8;return function(_0x1f3d4e){if(_0x1f3d4e){return _0x20f139['status'](_0x5ed45e)['json'](_0x1f3d4e);}};}function respondWithFilteredResult(_0x17402f,_0x383be2){return function(_0xabc97b){if(_0xabc97b){var _0x16b5c5=typeof _0x383be2['offset']==='undefined'&&typeof _0x383be2[_0x5a94('0x1c')]===_0x5a94('0x1d');var _0x34105b=_0xabc97b[_0x5a94('0x1e')];var _0x38f120=_0x16b5c5?0x0:_0x383be2[_0x5a94('0x1f')];var _0x4dbbbb=_0x16b5c5?_0xabc97b[_0x5a94('0x1e')]:_0x383be2[_0x5a94('0x1f')]+_0x383be2[_0x5a94('0x1c')];var _0x4b587f;if(_0x4dbbbb>=_0x34105b){_0x4dbbbb=_0x34105b;_0x4b587f=0xc8;}else{_0x4b587f=0xce;}_0x17402f['status'](_0x4b587f);return _0x17402f['set'](_0x5a94('0x20'),_0x38f120+'-'+_0x4dbbbb+'/'+_0x34105b)[_0x5a94('0x21')](_0xabc97b);}return null;};}function patchUpdates(_0x2e1d27){return function(_0x12e109){try{jsonpatch[_0x5a94('0x22')](_0x12e109,_0x2e1d27,!![]);}catch(_0x505344){return BPromise[_0x5a94('0x23')](_0x505344);}return _0x12e109['save']();};}function saveUpdates(_0x4c60da,_0x34368e){return function(_0x1574f5){if(_0x1574f5){return _0x1574f5[_0x5a94('0x24')](_0x4c60da)['then'](function(_0x4c1429){return _0x4c1429;});}return null;};}function removeEntity(_0x4c4b3a,_0x399706){return function(_0x5c05d1){if(_0x5c05d1){return _0x5c05d1[_0x5a94('0x25')]()[_0x5a94('0x26')](function(){_0x4c4b3a['status'](0xcc)[_0x5a94('0x1b')]();});}};}function handleEntityNotFound(_0x5f0914,_0x2adfbd){return function(_0x5daea2){if(!_0x5daea2){_0x5f0914[_0x5a94('0x19')](0x194);}return _0x5daea2;};}function handleError(_0xe95ca9,_0x353922){_0x353922=_0x353922||0x1f4;return function(_0x28a48f){logger[_0x5a94('0x27')](_0x28a48f[_0x5a94('0x28')]);if(_0x28a48f['name']){delete _0x28a48f[_0x5a94('0x29')];}_0xe95ca9['status'](_0x353922)[_0x5a94('0x2a')](_0x28a48f);};}exports[_0x5a94('0x2b')]=function(_0x40a54a,_0x5cf2ef){var _0xcf0f0b={},_0x1e6b5f={},_0x12b543={'count':0x0,'rows':[]};var _0x415868=_[_0x5a94('0x2c')](db[_0x5a94('0x2d')][_0x5a94('0x2e')],function(_0x233059){return{'name':_0x233059[_0x5a94('0x2f')],'type':_0x233059[_0x5a94('0x30')][_0x5a94('0x31')]};});_0x1e6b5f['model']=_[_0x5a94('0x2c')](_0x415868,_0x5a94('0x29'));_0x1e6b5f[_0x5a94('0x32')]=_[_0x5a94('0x33')](_0x40a54a[_0x5a94('0x32')]);_0x1e6b5f[_0x5a94('0x34')]=_['intersection'](_0x1e6b5f[_0x5a94('0x35')],_0x1e6b5f[_0x5a94('0x32')]);_0x1e6b5f[_0x5a94('0x34')]=_[_0x5a94('0x36')](_0x1e6b5f['filters'],[_0x5a94('0x37'),'$or',_0x5a94('0x38'),_0x5a94('0x39'),_0x5a94('0x3a'),_0x5a94('0x3b'),_0x5a94('0x3c'),_0x5a94('0x3d'),_0x5a94('0x3e'),'$between',_0x5a94('0x3f'),_0x5a94('0x40'),_0x5a94('0x41'),_0x5a94('0x42'),_0x5a94('0x43'),_0x5a94('0x44'),'$notILike',_0x5a94('0x42'),_0x5a94('0x45'),'$contains',_0x5a94('0x46'),_0x5a94('0x47')]);_0xcf0f0b['attributes']=_[_0x5a94('0x48')](_0x1e6b5f[_0x5a94('0x35')],qs[_0x5a94('0x49')](_0x40a54a['query'][_0x5a94('0x49')]));_0xcf0f0b[_0x5a94('0x4a')]=_0xcf0f0b[_0x5a94('0x4a')]['length']?_0xcf0f0b[_0x5a94('0x4a')]:_0x1e6b5f[_0x5a94('0x35')];if(!_0x40a54a[_0x5a94('0x32')][_0x5a94('0x4b')](_0x5a94('0x4c'))){_0xcf0f0b[_0x5a94('0x1c')]=qs[_0x5a94('0x1c')](_0x40a54a[_0x5a94('0x32')][_0x5a94('0x1c')]);_0xcf0f0b[_0x5a94('0x1f')]=qs[_0x5a94('0x1f')](_0x40a54a[_0x5a94('0x32')][_0x5a94('0x1f')]);}_0xcf0f0b['order']=qs[_0x5a94('0x4d')](_0x40a54a['query'][_0x5a94('0x4d')]);_0xcf0f0b[_0x5a94('0x4e')]=qs[_0x5a94('0x34')](_[_0x5a94('0x4f')](_0x40a54a[_0x5a94('0x32')],_0x1e6b5f[_0x5a94('0x34')]),_0x415868);if(_0x40a54a['query'][_0x5a94('0x50')]){_0xcf0f0b[_0x5a94('0x4e')]=_[_0x5a94('0x51')](_0xcf0f0b[_0x5a94('0x4e')],{'$or':_['map'](_0x415868,function(_0x471c5e){if(_0x471c5e[_0x5a94('0x30')]!=='VIRTUAL'){var _0x2149dd={};_0x2149dd[_0x471c5e['name']]={'$like':'%'+_0x40a54a['query']['filter']+'%'};return _0x2149dd;}})});}_0xcf0f0b=_[_0x5a94('0x51')]({},_0xcf0f0b,_0x40a54a[_0x5a94('0x52')]);var _0x275c19={'where':_0xcf0f0b['where']};return db['CmHopper'][_0x5a94('0x1e')](_0x275c19)['then'](function(_0x13a1b3){_0x12b543[_0x5a94('0x1e')]=_0x13a1b3;if(_0x40a54a[_0x5a94('0x32')][_0x5a94('0x53')]){_0xcf0f0b[_0x5a94('0x54')]=[{'all':!![]}];}return db[_0x5a94('0x2d')]['findAll'](_0xcf0f0b);})[_0x5a94('0x26')](function(_0x1fc040){_0x12b543[_0x5a94('0x55')]=_0x1fc040;return _0x12b543;})[_0x5a94('0x26')](respondWithFilteredResult(_0x5cf2ef,_0xcf0f0b))[_0x5a94('0x56')](handleError(_0x5cf2ef,null));};exports[_0x5a94('0x57')]=function(_0x415bf8,_0xa0cf63){var _0x5a7700={'raw':!![],'where':{'id':_0x415bf8['params']['id']}},_0x3ac9cb={};_0x3ac9cb[_0x5a94('0x35')]=_[_0x5a94('0x33')](db[_0x5a94('0x2d')][_0x5a94('0x2e')]);_0x3ac9cb[_0x5a94('0x32')]=_[_0x5a94('0x33')](_0x415bf8[_0x5a94('0x32')]);_0x3ac9cb[_0x5a94('0x34')]=_['intersection'](_0x3ac9cb[_0x5a94('0x35')],_0x3ac9cb['query']);_0x5a7700[_0x5a94('0x4a')]=_[_0x5a94('0x48')](_0x3ac9cb[_0x5a94('0x35')],qs[_0x5a94('0x49')](_0x415bf8[_0x5a94('0x32')]['fields']));_0x5a7700[_0x5a94('0x4a')]=_0x5a7700[_0x5a94('0x4a')][_0x5a94('0x58')]?_0x5a7700[_0x5a94('0x4a')]:_0x3ac9cb[_0x5a94('0x35')];if(_0x415bf8[_0x5a94('0x32')][_0x5a94('0x53')]){_0x5a7700[_0x5a94('0x54')]=[{'all':!![]}];}_0x5a7700=_[_0x5a94('0x51')]({},_0x5a7700,_0x415bf8[_0x5a94('0x52')]);return db[_0x5a94('0x2d')][_0x5a94('0x59')](_0x5a7700)[_0x5a94('0x26')](handleEntityNotFound(_0xa0cf63,null))[_0x5a94('0x26')](respondWithResult(_0xa0cf63,null))[_0x5a94('0x56')](handleError(_0xa0cf63,null));};exports['create']=function(_0x4ec0f2,_0x77118c){return db[_0x5a94('0x2d')][_0x5a94('0x5a')](_0x4ec0f2['body'],{})[_0x5a94('0x26')](respondWithResult(_0x77118c,0xc9))[_0x5a94('0x56')](handleError(_0x77118c,null));};exports['update']=function(_0x530db8,_0xb8a88d){if(_0x530db8['body']['id']){delete _0x530db8[_0x5a94('0x5b')]['id'];}return db['CmHopper'][_0x5a94('0x59')]({'where':{'id':_0x530db8[_0x5a94('0x5c')]['id']}})['then'](handleEntityNotFound(_0xb8a88d,null))['then'](saveUpdates(_0x530db8['body'],null))['then'](respondWithResult(_0xb8a88d,null))[_0x5a94('0x56')](handleError(_0xb8a88d,null));};exports[_0x5a94('0x5d')]=function(_0x4272fb,_0x19e5bf){return db['CmHopper']['describe']()[_0x5a94('0x26')](respondWithResult(_0x19e5bf,null))['catch'](handleError(_0x19e5bf,null));};exports[_0x5a94('0x25')]=function(_0x42e39f,_0x556461){var _0x167575;return db[_0x5a94('0x2d')]['find']({'where':{'id':_0x42e39f[_0x5a94('0x5c')]['id']}})[_0x5a94('0x26')](handleEntityNotFound(_0x556461,null))[_0x5a94('0x26')](function(_0x517a59){if(_0x517a59){return _0x517a59[_0x5a94('0x25')]()[_0x5a94('0x26')](function(_0x27cfb0){return _0x27cfb0;});}})[_0x5a94('0x26')](function(_0x39c59e){_0x167575=_0x39c59e;if(_0x39c59e){if(_0x39c59e[_0x5a94('0x5e')]||_0x39c59e['CampaignId']){return db[_0x39c59e[_0x5a94('0x5e')]?_0x5a94('0x5f'):_0x5a94('0x60')]['find']({'where':{'id':_0x39c59e[_0x5a94('0x5e')]?_0x39c59e[_0x5a94('0x5e')]:_0x39c59e[_0x5a94('0x61')]},'attributes':['id',_0x5a94('0x29')],'raw':!![]});}}})[_0x5a94('0x26')](function(_0x53d930){var _0x3b7336={};if(_0x53d930){_[_0x5a94('0x51')](_0x3b7336,_['omit'](_0x167575[_0x5a94('0x62')],['createdAt','updatedAt','id']));_0x3b7336[_0x5a94('0x63')]=0x15;_0x3b7336[_0x5a94('0x64')]=_0x5a94('0x65');_0x3b7336[_0x5a94('0x66')]=_0x53d930[_0x5a94('0x29')];_0x3b7336[_0x5a94('0x67')]=_0x42e39f[_0x5a94('0x68')][_0x5a94('0x29')];_0x3b7336[_0x5a94('0x69')]=_0x42e39f[_0x5a94('0x68')]['id'];_0x3b7336[_0x5a94('0x65')]=!![];_0x3b7336[_0x5a94('0x6a')]=moment()[_0x5a94('0x6b')](_0x5a94('0x6c'));_0x3b7336[_0x5a94('0x6d')]=_0x167575['phone'];_0x3b7336['campaigntype']=_0x167575['VoiceQueueId']?_0x5a94('0x6e'):_0x5a94('0x6f');return db[_0x5a94('0x70')][_0x5a94('0x59')]({'where':{'id':_0x3b7336[_0x5a94('0x71')]},'attributes':['firstName',_0x5a94('0x72')]})[_0x5a94('0x26')](function(_0x2610c0){if(!_[_0x5a94('0x73')](_0x556461)&&!_[_0x5a94('0x73')](_0x2610c0['firstName'])){_0x3b7336['calleridname']=_0x2610c0[_0x5a94('0x74')];if(!_[_0x5a94('0x73')](_0x2610c0[_0x5a94('0x72')])){_0x3b7336[_0x5a94('0x75')]+='\x20'+_0x2610c0['lastName'];}}})[_0x5a94('0x76')](function(){return db['CmHopperFinal']['create'](_0x3b7336);});}})['then'](function(){return _0x556461['status'](0xcc)[_0x5a94('0x1b')]();})['catch'](handleError(_0x556461,null));};exports[_0x5a94('0x77')]=function(_0x2ffb29,_0x1f2cb7,_0x8d868f){var _0x5d8694=[];return db['CmContact'][_0x5a94('0x5d')]()['then'](function(_0x371308){_0x5d8694=_['keys'](_0x371308);return _0x2ffb29['user']['getVoiceQueues']({'where':{'type':_0x5a94('0x78'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id',_0x5a94('0x79')],'raw':!![]});})['then'](function(_0x439231){if(_0x439231&&_0x439231[_0x5a94('0x58')]){return db[_0x5a94('0x7a')][_0x5a94('0x7b')](function(_0x332eb3){var _0x52ffdc={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0x5a94('0x6c'))},'VoiceQueueId':{'$in':_[_0x5a94('0x2c')](_0x439231,'id')},'$or':[{'UserId':null},{'UserId':_0x2ffb29['user']['id']}]};var _0x3dfe11=[];if(_0x2ffb29['body']['direction']&&_0x2ffb29[_0x5a94('0x5b')]['direction']===_0x5a94('0x7c')){if(!_[_0x5a94('0x7d')](_0x2ffb29[_0x5a94('0x5b')][_0x5a94('0x7e')])){_0x52ffdc['id']={'$in':_0x2ffb29[_0x5a94('0x5b')][_0x5a94('0x7e')]};}_0x3dfe11=[[_0x5a94('0x7f'),'ASC'],[_0x5a94('0x80'),_0x439231[0x0]['dialOrderByScheduledAt']===_0x5a94('0x81')?_0x5a94('0x82'):_0x5a94('0x81')],db[_0x5a94('0x7a')]['literal']('COALESCE(CmHopper.UserId,\x200)\x20ASC'),['id',_0x5a94('0x82')]];}else{if(!_[_0x5a94('0x7d')](_0x2ffb29['body'][_0x5a94('0x7e')])){_0x52ffdc['id']={'$notIn':_0x2ffb29[_0x5a94('0x5b')][_0x5a94('0x7e')]};}_0x3dfe11=[[_0x5a94('0x7f'),_0x5a94('0x82')],[_0x5a94('0x80'),_0x439231[0x0][_0x5a94('0x79')]],db[_0x5a94('0x7a')]['literal'](_0x5a94('0x83')),['id','ASC']];}return db[_0x5a94('0x2d')]['findOne']({'attributes':['id',_0x5a94('0x84')],'where':_0x52ffdc,'order':_0x3dfe11,'transaction':_0x332eb3,'lock':_0x332eb3[_0x5a94('0x85')][_0x5a94('0x86')],'include':[{'model':db[_0x5a94('0x70')],'as':_0x5a94('0x87'),'attributes':_0x5d8694,'include':[{'model':db[_0x5a94('0x88')],'as':_0x5a94('0x89'),'attributes':['id',_0x5a94('0x29')]}]},{'model':db[_0x5a94('0x8a')],'as':_0x5a94('0x8b'),'attributes':['id',_0x5a94('0x29')]},{'model':db['VoiceQueue'],'as':_0x5a94('0x8c'),'attributes':['id',_0x5a94('0x29'),'dialActive']}]})['then'](function(_0x405b04){if(_0x405b04){return _0x405b04[_0x5a94('0x24')]({'UserId':_0x2ffb29[_0x5a94('0x68')]['id']},{'transaction':_0x332eb3});}});});}})['then'](handleEntityNotFound(_0x1f2cb7,null))[_0x5a94('0x26')](respondWithResult(_0x1f2cb7,null))['catch'](handleError(_0x1f2cb7,null));};exports[_0x5a94('0x8d')]=function(_0x8d26bc,_0xbc0ea3,_0x216a02){return _0x8d26bc[_0x5a94('0x68')]['getVoiceQueues']({'where':{'type':'outbound','dialActive':!![],'dialMethod':_0x5a94('0x8e')},'attributes':['id'],'raw':!![]})[_0x5a94('0x26')](function(_0x30d58c){if(_0x30d58c&&_0x30d58c[_0x5a94('0x58')]){return db[_0x5a94('0x2d')][_0x5a94('0x1e')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x5a94('0x6b')](_0x5a94('0x6c'))},'VoiceQueueId':{'$in':_['map'](_0x30d58c,'id')},'$or':[{'UserId':null},{'UserId':_0x8d26bc[_0x5a94('0x68')]['id']}]}});}return 0x0;})['then'](function(_0x35f777){if(!_[_0x5a94('0x73')](_0x35f777)&&_[_0x5a94('0x8f')](_0x35f777)){return _0xbc0ea3[_0x5a94('0x1a')](0xc8)[_0x5a94('0x21')]({'contacts':_0x35f777});}else{logger[_0x5a94('0x27')](_0x5a94('0x90'),_0x5a94('0x8d'),0x194,'entity\x20not\x20found');_0xbc0ea3['sendStatus'](0x194);}})['catch'](handleError(_0xbc0ea3,null));}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.model.js b/server/api/cmHopper/cmHopper.model.js index f1c07e0..4b8d427 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 _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 +var _0x5d17=['define','CmHopper','cm_hopper','scheduledat','phone','priority','lodash','util','moment','bluebird','request-promise','rimraf','../../config/environment','./cmHopper.attributes','exports'];(function(_0x54811b,_0x7b282e){var _0xa1b8ec=function(_0x555971){while(--_0x555971){_0x54811b['push'](_0x54811b['shift']());}};_0xa1b8ec(++_0x7b282e);}(_0x5d17,0x114));var _0x75d1=function(_0x4147ff,_0x154530){_0x4147ff=_0x4147ff-0x0;var _0x1e71e6=_0x5d17[_0x4147ff];return _0x1e71e6;};'use strict';var _=require(_0x75d1('0x0'));var util=require(_0x75d1('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x75d1('0x2'));var BPromise=require(_0x75d1('0x3'));var rp=require(_0x75d1('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x75d1('0x5'));var config=require(_0x75d1('0x6'));var attributes=require(_0x75d1('0x7'));module[_0x75d1('0x8')]=function(_0x56ac0a,_0x458681){return _0x56ac0a[_0x75d1('0x9')](_0x75d1('0xa'),attributes,{'tableName':_0x75d1('0xb'),'paranoid':![],'indexes':[{'name':_0x75d1('0xc'),'fields':[_0x75d1('0xc')]},{'name':_0x75d1('0xd'),'fields':['phone']},{'name':'priority','fields':[_0x75d1('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 58a65a2..592a2f1 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 _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 +var _0xca42=['push','all','GetContactDialer','sequelize','MoveContactManagedDialer','COUNT','literal','`scheduledat`\x20>=\x20','format','\x22%s\x22','\x20,\x201,\x20null','CountReScheduled','GetContactRecallMe','order','LOCK','GetCmHopperPreview','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','then','CmHopper,\x20%s,\x20%s','request\x20sent','debug','CmHopper,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CmHopper','findAll','options','where','attributes','limit','map','include','model','GetCmHopper','ShowCmHopper','find','info','CreateCmHopper','create','body','raw','UpdateCmHopper','update','DestroyCmHopper','destroy','CmContact','describe','transaction','UPDATE','Contact','keys','User','Agent','name','voicePause','length','UserId','includes'];(function(_0x27bb51,_0x54681e){var _0x23d6f4=function(_0x1c72af){while(--_0x1c72af){_0x27bb51['push'](_0x27bb51['shift']());}};_0x23d6f4(++_0x54681e);}(_0xca42,0x1b4));var _0x2ca4=function(_0x41e109,_0x526bab){_0x41e109=_0x41e109-0x0;var _0x434e12=_0xca42[_0x41e109];return _0x434e12;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2ca4('0x0'));var BPromise=require(_0x2ca4('0x1'));var rs=require(_0x2ca4('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2ca4('0x3'))['db'];var utils=require(_0x2ca4('0x4'));var logger=require(_0x2ca4('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x2ca4('0x6'));var client=jayson[_0x2ca4('0x7')][_0x2ca4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x415194,_0x509981,_0x534e5a){return new BPromise(function(_0x501bfa,_0x54e2ff){return client['request'](_0x415194,_0x534e5a)[_0x2ca4('0x9')](function(_0x21ab49){logger['info'](_0x2ca4('0xa'),_0x509981,_0x2ca4('0xb'));logger[_0x2ca4('0xc')](_0x2ca4('0xd'),_0x509981,_0x2ca4('0xb'),JSON[_0x2ca4('0xe')](_0x21ab49));if(_0x21ab49[_0x2ca4('0xf')]){if(_0x21ab49[_0x2ca4('0xf')][_0x2ca4('0x10')]===0x1f4){logger['error']('CmHopper,\x20%s,\x20%s',_0x509981,_0x21ab49[_0x2ca4('0xf')][_0x2ca4('0x11')]);return _0x54e2ff(_0x21ab49[_0x2ca4('0xf')][_0x2ca4('0x11')]);}logger[_0x2ca4('0xf')](_0x2ca4('0xa'),_0x509981,_0x21ab49[_0x2ca4('0xf')]['message']);return _0x501bfa(_0x21ab49['error'][_0x2ca4('0x11')]);}else{logger['info'](_0x2ca4('0xa'),_0x509981,_0x2ca4('0xb'));_0x501bfa(_0x21ab49[_0x2ca4('0x12')]['message']);}})[_0x2ca4('0x13')](function(_0x17f6a9){logger['error'](_0x2ca4('0xa'),_0x509981,_0x17f6a9);_0x54e2ff(_0x17f6a9);});});}exports['GetCmHopper']=function(_0x2c3d54){var _0x52c083=this;return new Promise(function(_0x1553cd,_0x55ce6b){return db[_0x2ca4('0x14')][_0x2ca4('0x15')]({'raw':_0x2c3d54['options']?_0x2c3d54['options']['raw']===undefined?!![]:![]:!![],'where':_0x2c3d54[_0x2ca4('0x16')]?_0x2c3d54[_0x2ca4('0x16')][_0x2ca4('0x17')]||null:null,'attributes':_0x2c3d54[_0x2ca4('0x16')]?_0x2c3d54['options'][_0x2ca4('0x18')]||null:null,'limit':_0x2c3d54[_0x2ca4('0x16')]?_0x2c3d54[_0x2ca4('0x16')][_0x2ca4('0x19')]||null:null,'include':_0x2c3d54[_0x2ca4('0x16')]?_0x2c3d54[_0x2ca4('0x16')]['include']?_[_0x2ca4('0x1a')](_0x2c3d54[_0x2ca4('0x16')][_0x2ca4('0x1b')],function(_0x45ec7c){return{'model':db[_0x45ec7c['model']],'as':_0x45ec7c['as'],'attributes':_0x45ec7c[_0x2ca4('0x18')],'include':_0x45ec7c['include']?_[_0x2ca4('0x1a')](_0x45ec7c[_0x2ca4('0x1b')],function(_0x2c9e9d){return{'model':db[_0x2c9e9d['model']],'as':_0x2c9e9d['as'],'attributes':_0x2c9e9d[_0x2ca4('0x18')],'include':_0x2c9e9d[_0x2ca4('0x1b')]?_[_0x2ca4('0x1a')](_0x2c9e9d[_0x2ca4('0x1b')],function(_0x4c8bef){return{'model':db[_0x4c8bef[_0x2ca4('0x1c')]],'as':_0x4c8bef['as'],'attributes':_0x4c8bef[_0x2ca4('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x33533){logger['info'](_0x2ca4('0x1d'),_0x2c3d54);logger[_0x2ca4('0xc')](_0x2ca4('0x1d'),_0x2c3d54,JSON[_0x2ca4('0xe')](_0x33533));_0x1553cd(_0x33533);})[_0x2ca4('0x13')](function(_0x5f2e03){logger[_0x2ca4('0xf')]('GetCmHopper',_0x5f2e03[_0x2ca4('0x11')],_0x2c3d54);_0x55ce6b(_0x52c083[_0x2ca4('0xf')](0x1f4,_0x5f2e03[_0x2ca4('0x11')]));});});};exports[_0x2ca4('0x1e')]=function(_0x455edd){var _0x3c1414=this;return new Promise(function(_0x3c5942,_0x162925){return db[_0x2ca4('0x14')][_0x2ca4('0x1f')]({'raw':_0x455edd[_0x2ca4('0x16')]?_0x455edd[_0x2ca4('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x455edd[_0x2ca4('0x16')]?_0x455edd[_0x2ca4('0x16')][_0x2ca4('0x17')]||null:null,'attributes':_0x455edd['options']?_0x455edd['options'][_0x2ca4('0x18')]||null:null,'include':_0x455edd[_0x2ca4('0x16')]?_0x455edd[_0x2ca4('0x16')]['include']?_[_0x2ca4('0x1a')](_0x455edd['options']['include'],function(_0x22b1a4){return{'model':db[_0x22b1a4[_0x2ca4('0x1c')]],'as':_0x22b1a4['as'],'attributes':_0x22b1a4['attributes'],'include':_0x22b1a4['include']?_['map'](_0x22b1a4[_0x2ca4('0x1b')],function(_0x48ab15){return{'model':db[_0x48ab15['model']],'as':_0x48ab15['as'],'attributes':_0x48ab15[_0x2ca4('0x18')],'include':_0x48ab15[_0x2ca4('0x1b')]?_[_0x2ca4('0x1a')](_0x48ab15[_0x2ca4('0x1b')],function(_0x37ac57){return{'model':db[_0x37ac57[_0x2ca4('0x1c')]],'as':_0x37ac57['as'],'attributes':_0x37ac57[_0x2ca4('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2e7afb){logger[_0x2ca4('0x20')](_0x2ca4('0x1e'),_0x455edd);logger[_0x2ca4('0xc')](_0x2ca4('0x1e'),_0x455edd,JSON['stringify'](_0x2e7afb));_0x3c5942(_0x2e7afb);})[_0x2ca4('0x13')](function(_0x5d1208){logger[_0x2ca4('0xf')]('ShowCmHopper',_0x5d1208['message'],_0x455edd);_0x162925(_0x3c1414[_0x2ca4('0xf')](0x1f4,_0x5d1208[_0x2ca4('0x11')]));});});};exports[_0x2ca4('0x21')]=function(_0x1a866c){var _0x3ad9d8=this;return new Promise(function(_0x5c0b2b,_0x37c093){return db[_0x2ca4('0x14')][_0x2ca4('0x22')](_0x1a866c[_0x2ca4('0x23')],{'raw':_0x1a866c[_0x2ca4('0x16')]?_0x1a866c[_0x2ca4('0x16')][_0x2ca4('0x24')]===undefined?!![]:![]:!![]})['then'](function(_0x477737){logger[_0x2ca4('0x20')](_0x2ca4('0x21'),_0x1a866c);logger['debug'](_0x2ca4('0x21'),_0x1a866c,JSON[_0x2ca4('0xe')](_0x477737));_0x5c0b2b(_0x477737);})[_0x2ca4('0x13')](function(_0x4e90d7){logger[_0x2ca4('0xf')](_0x2ca4('0x21'),_0x4e90d7[_0x2ca4('0x11')],_0x1a866c);_0x37c093(_0x3ad9d8[_0x2ca4('0xf')](0x1f4,_0x4e90d7[_0x2ca4('0x11')]));});});};exports[_0x2ca4('0x25')]=function(_0x4d10a4){var _0x5ef40a=this;return new Promise(function(_0x2462e3,_0x4efcae){return db[_0x2ca4('0x14')][_0x2ca4('0x26')](_0x4d10a4[_0x2ca4('0x23')],{'raw':_0x4d10a4[_0x2ca4('0x16')]?_0x4d10a4[_0x2ca4('0x16')][_0x2ca4('0x24')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d10a4['options']?_0x4d10a4[_0x2ca4('0x16')]['where']||null:null,'attributes':_0x4d10a4['options']?_0x4d10a4[_0x2ca4('0x16')][_0x2ca4('0x18')]||null:null,'limit':_0x4d10a4[_0x2ca4('0x16')]?_0x4d10a4[_0x2ca4('0x16')]['limit']||null:null})[_0x2ca4('0x9')](function(_0xef5dc0){logger[_0x2ca4('0x20')](_0x2ca4('0x25'),_0x4d10a4);logger[_0x2ca4('0xc')](_0x2ca4('0x25'),_0x4d10a4,JSON[_0x2ca4('0xe')](_0xef5dc0));_0x2462e3(_0xef5dc0);})[_0x2ca4('0x13')](function(_0x3c1642){logger[_0x2ca4('0xf')](_0x2ca4('0x25'),_0x3c1642['message'],_0x4d10a4);_0x4efcae(_0x5ef40a[_0x2ca4('0xf')](0x1f4,_0x3c1642[_0x2ca4('0x11')]));});});};exports[_0x2ca4('0x27')]=function(_0x4c7ee8){var _0xec1bc0=this;return new Promise(function(_0x26f403,_0x5bd4eb){return db[_0x2ca4('0x14')][_0x2ca4('0x28')]({'where':_0x4c7ee8[_0x2ca4('0x16')]?_0x4c7ee8[_0x2ca4('0x16')]['where']||null:null})[_0x2ca4('0x9')](function(_0x423ab7){logger[_0x2ca4('0x20')](_0x2ca4('0x27'),_0x4c7ee8);logger[_0x2ca4('0xc')](_0x2ca4('0x27'),_0x4c7ee8,JSON['stringify'](_0x423ab7));_0x26f403(_0x423ab7);})[_0x2ca4('0x13')](function(_0x1a6a8c){logger[_0x2ca4('0xf')](_0x2ca4('0x27'),_0x1a6a8c['message'],_0x4c7ee8);_0x5bd4eb(_0xec1bc0[_0x2ca4('0xf')](0x1f4,_0x1a6a8c['message']));});});};exports['GetContactDialer']=function(_0x1de7f6){var _0x51c664=this;return new Promise(function(_0x31b67a,_0x1d3e0a){return db[_0x2ca4('0x29')][_0x2ca4('0x2a')]()['then'](function(_0x478c10){return db['sequelize'][_0x2ca4('0x2b')](function(_0x18ac67){return db[_0x2ca4('0x14')][_0x2ca4('0x15')]({'where':_0x1de7f6[_0x2ca4('0x16')]?_0x1de7f6[_0x2ca4('0x16')]['where']||null:null,'attributes':_0x1de7f6['options']?_0x1de7f6['options'][_0x2ca4('0x18')]||null:null,'limit':_0x1de7f6[_0x2ca4('0x16')]?_0x1de7f6[_0x2ca4('0x16')][_0x2ca4('0x19')]||null:null,'order':_0x1de7f6[_0x2ca4('0x16')]?_0x1de7f6[_0x2ca4('0x16')]['order']||null:null,'transaction':_0x18ac67,'lock':_0x18ac67['LOCK'][_0x2ca4('0x2c')],'include':[{'model':db[_0x2ca4('0x29')],'as':_0x2ca4('0x2d'),'attributes':_[_0x2ca4('0x2e')](_0x478c10)},{'model':db[_0x2ca4('0x2f')],'as':_0x2ca4('0x30'),'attributes':['id',_0x2ca4('0x31'),_0x2ca4('0x32')]}]})[_0x2ca4('0x9')](function(_0x144f2f){var _0x5b3def=[];var _0xe618f3=[];for(var _0x2bd366=0x0;_0x2bd366<_0x144f2f[_0x2ca4('0x33')];_0x2bd366+=0x1){var _0x6821b1=_0x144f2f[_0x2bd366][_0x2ca4('0x34')];if(_0x6821b1===null){_0x5b3def['push'](_0x144f2f[_0x2bd366]['update'](_0x1de7f6[_0x2ca4('0x23')],{'transaction':_0x18ac67}));}else if(!_0xe618f3[_0x2ca4('0x35')](_0x6821b1)){_0xe618f3['push'](_0x6821b1);_0x5b3def[_0x2ca4('0x36')](_0x144f2f[_0x2bd366][_0x2ca4('0x26')](_0x1de7f6['body'],{'transaction':_0x18ac67}));}}return BPromise[_0x2ca4('0x37')](_0x5b3def);});})['then'](function(_0x2990a4){logger[_0x2ca4('0x20')](_0x2ca4('0x38'),_0x1de7f6);logger[_0x2ca4('0xc')]('GetContactDialer',_0x1de7f6,JSON[_0x2ca4('0xe')](_0x2990a4));_0x31b67a(_0x2990a4);})[_0x2ca4('0x13')](function(_0x1154c8){logger['error']('GetContactDialer',_0x1154c8[_0x2ca4('0x11')],_0x1de7f6);_0x1d3e0a(_0x51c664['error'](0x1f4,_0x1154c8[_0x2ca4('0x11')]));});});});};exports['MoveContactManagedDialer']=function(_0x486e27){var _0x45ac57=this;return new Promise(function(_0x1177bb,_0x57a24f){return db[_0x2ca4('0x39')]['transaction'](function(_0x50c887){return db['CmHopperFinal'][_0x2ca4('0x22')](_0x486e27[_0x2ca4('0x23')],{'raw':_0x486e27['options']?_0x486e27[_0x2ca4('0x16')]['raw']===undefined?!![]:![]:!![],'transaction':_0x50c887})[_0x2ca4('0x9')](function(){return db[_0x2ca4('0x14')][_0x2ca4('0x28')]({'where':_0x486e27[_0x2ca4('0x16')]?_0x486e27[_0x2ca4('0x16')][_0x2ca4('0x17')]||null:null,'transaction':_0x50c887});});})[_0x2ca4('0x9')](function(_0x3dffa0){logger[_0x2ca4('0x20')](_0x2ca4('0x3a'),_0x486e27);logger[_0x2ca4('0xc')](_0x2ca4('0x3a'),_0x486e27,JSON['stringify'](_0x3dffa0));_0x1177bb(_0x3dffa0);})[_0x2ca4('0x13')](function(_0x38cafe){logger[_0x2ca4('0xf')](_0x2ca4('0x3a'),_0x38cafe['message'],_0x486e27);_0x57a24f(_0x45ac57['error'](0x1f4,_0x38cafe[_0x2ca4('0x11')]));});});};exports['CountReScheduled']=function(_0x23b577){var _0x314bde=this;return new Promise(function(_0x4484a0,_0x4e4a57){return db[_0x2ca4('0x14')][_0x2ca4('0x15')]({'raw':_0x23b577[_0x2ca4('0x16')]?_0x23b577[_0x2ca4('0x16')][_0x2ca4('0x24')]===undefined?!![]:![]:!![],'where':_0x23b577[_0x2ca4('0x16')]?_0x23b577[_0x2ca4('0x16')][_0x2ca4('0x17')]||null:null,'attributes':[[db['sequelize']['fn'](_0x2ca4('0x3b'),db['sequelize']['fn']('IF',db[_0x2ca4('0x39')][_0x2ca4('0x3c')](_0x2ca4('0x3d')+util[_0x2ca4('0x3e')](_0x2ca4('0x3f'),moment()[_0x2ca4('0x3e')]('YYYY-MM-DD\x20HH:mm:ss'))+_0x2ca4('0x40')))),'contactsRescheduled']]})[_0x2ca4('0x9')](function(_0x2247c5){logger[_0x2ca4('0x20')](_0x2ca4('0x41'),_0x23b577);logger[_0x2ca4('0xc')](_0x2ca4('0x41'),_0x23b577,JSON['stringify'](_0x2247c5));_0x4484a0(_0x2247c5);})[_0x2ca4('0x13')](function(_0x4b10c7){logger[_0x2ca4('0xf')](_0x2ca4('0x41'),_0x4b10c7[_0x2ca4('0x11')],_0x23b577);_0x4e4a57(_0x314bde['error'](0x1f4,_0x4b10c7[_0x2ca4('0x11')]));});});};exports[_0x2ca4('0x42')]=function(_0x11d00c){var _0x48b659=this;return new Promise(function(_0x5d8387,_0x4f9965){return db[_0x2ca4('0x29')][_0x2ca4('0x2a')]()[_0x2ca4('0x9')](function(_0x4829f5){return db[_0x2ca4('0x39')][_0x2ca4('0x2b')](function(_0x225fe0){return db[_0x2ca4('0x14')][_0x2ca4('0x15')]({'where':_0x11d00c[_0x2ca4('0x16')]?_0x11d00c[_0x2ca4('0x16')][_0x2ca4('0x17')]||null:null,'attributes':_0x11d00c['options']?_0x11d00c['options'][_0x2ca4('0x18')]||null:null,'limit':0x1,'order':_0x11d00c[_0x2ca4('0x16')]?_0x11d00c[_0x2ca4('0x16')][_0x2ca4('0x43')]||null:null,'group':db[_0x2ca4('0x14')][_0x2ca4('0x34')],'transaction':_0x225fe0,'lock':_0x225fe0[_0x2ca4('0x44')][_0x2ca4('0x2c')],'include':_0x11d00c[_0x2ca4('0x16')]?_0x11d00c[_0x2ca4('0x16')]['include']?_[_0x2ca4('0x1a')](_0x11d00c[_0x2ca4('0x16')]['include'],function(_0x37178e){return{'model':db[_0x37178e[_0x2ca4('0x1c')]],'as':_0x37178e['as'],'attributes':_0x37178e[_0x2ca4('0x18')],'include':_0x37178e[_0x2ca4('0x1b')]?_['map'](_0x37178e[_0x2ca4('0x1b')],function(_0x1e6fb6){return{'model':db[_0x1e6fb6[_0x2ca4('0x1c')]],'as':_0x1e6fb6['as'],'attributes':_0x1e6fb6[_0x2ca4('0x18')],'include':_0x1e6fb6[_0x2ca4('0x1b')]?_[_0x2ca4('0x1a')](_0x1e6fb6[_0x2ca4('0x1b')],function(_0x19ca20){return{'model':db[_0x19ca20[_0x2ca4('0x1c')]],'as':_0x19ca20['as'],'attributes':_0x19ca20[_0x2ca4('0x18')]};}):[]};}):[]};}):[]:[]})[_0x2ca4('0x9')](function(_0x19e7ea){var _0x1289e2=[];for(var _0x27657e=0x0;_0x27657e<_0x19e7ea[_0x2ca4('0x33')];_0x27657e+=0x1){_0x1289e2[_0x2ca4('0x36')](_0x19e7ea[_0x27657e]['update'](_0x11d00c[_0x2ca4('0x23')],{'transaction':_0x225fe0}));}return BPromise['all'](_0x1289e2);});})[_0x2ca4('0x9')](function(_0x33143c){logger[_0x2ca4('0x20')](_0x2ca4('0x42'),_0x11d00c);logger[_0x2ca4('0xc')](_0x2ca4('0x42'),_0x11d00c,JSON[_0x2ca4('0xe')](_0x33143c));_0x5d8387(_0x33143c);})[_0x2ca4('0x13')](function(_0x22b1c9){logger[_0x2ca4('0xf')]('GetContactRecallMe',_0x22b1c9[_0x2ca4('0x11')],_0x11d00c);_0x4f9965(_0x48b659[_0x2ca4('0xf')](0x1f4,_0x22b1c9[_0x2ca4('0x11')]));});});});};exports[_0x2ca4('0x45')]=function(_0x13449c){var _0x9176d0=this;return new Promise(function(_0x16b3a5,_0x596fcc){db['CmContact'][_0x2ca4('0x2a')]()['then'](function(_0x4625c3){return db['CmHopper'][_0x2ca4('0x15')]({'raw':_0x13449c[_0x2ca4('0x16')]?_0x13449c[_0x2ca4('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x13449c[_0x2ca4('0x16')]?_0x13449c[_0x2ca4('0x16')]['where']||null:null,'attributes':_0x13449c[_0x2ca4('0x16')]?_0x13449c[_0x2ca4('0x16')][_0x2ca4('0x18')]||null:null,'limit':_0x13449c[_0x2ca4('0x16')]?_0x13449c['options'][_0x2ca4('0x19')]||null:null,'include':_0x13449c[_0x2ca4('0x16')]?_0x13449c[_0x2ca4('0x16')][_0x2ca4('0x1b')]?_[_0x2ca4('0x1a')](_0x13449c['options'][_0x2ca4('0x1b')],function(_0x148e4b){return{'model':db[_0x148e4b['model']],'as':_0x148e4b['as'],'attributes':_0x148e4b['as']==='Contact'?_[_0x2ca4('0x2e')](_0x4625c3):_0x148e4b['attributes'],'include':_0x148e4b[_0x2ca4('0x1b')]?_[_0x2ca4('0x1a')](_0x148e4b[_0x2ca4('0x1b')],function(_0x3238b8){return{'model':db[_0x3238b8[_0x2ca4('0x1c')]],'as':_0x3238b8['as'],'attributes':_0x3238b8[_0x2ca4('0x18')],'include':_0x3238b8['include']?_[_0x2ca4('0x1a')](_0x3238b8['include'],function(_0x47e901){return{'model':db[_0x47e901['model']],'as':_0x47e901['as'],'attributes':_0x47e901[_0x2ca4('0x18')]};}):[]};}):[]};}):[]:[]})[_0x2ca4('0x9')](function(_0x244f67){logger[_0x2ca4('0x20')](_0x2ca4('0x1d'),_0x13449c);logger[_0x2ca4('0xc')]('GetCmHopper',_0x13449c,JSON['stringify'](_0x244f67));_0x16b3a5(_0x244f67);})[_0x2ca4('0x13')](function(_0x1c33e4){logger[_0x2ca4('0xf')](_0x2ca4('0x1d'),_0x1c33e4['message'],_0x13449c);_0x596fcc(_0x9176d0['error'](0x1f4,_0x1c33e4[_0x2ca4('0x11')]));});});});}; \ No newline at end of file diff --git a/server/api/cmHopper/index.js b/server/api/cmHopper/index.js index 55266ae..9c7c842 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 _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 +var _0x858a=['delete','multer','util','path','connect-timeout','Router','../../components/interaction/service','../../config/environment','./cmHopper.controller','isAuthenticated','get','describe','/opencontacts','getOpenContacts','/:id','show','create','post','/preview','put'];(function(_0x134448,_0x591d7b){var _0x2d52a1=function(_0x56b840){while(--_0x56b840){_0x134448['push'](_0x134448['shift']());}};_0x2d52a1(++_0x591d7b);}(_0x858a,0x191));var _0xa858=function(_0x21549c,_0x6d64d1){_0x21549c=_0x21549c-0x0;var _0x426cbd=_0x858a[_0x21549c];return _0x426cbd;};'use strict';var multer=require(_0xa858('0x0'));var util=require(_0xa858('0x1'));var path=require(_0xa858('0x2'));var timeout=require(_0xa858('0x3'));var express=require('express');var router=express[_0xa858('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xa858('0x5'));var config=require(_0xa858('0x6'));var controller=require(_0xa858('0x7'));router['get']('/',auth[_0xa858('0x8')](),controller['index']);router[_0xa858('0x9')]('/describe',auth[_0xa858('0x8')](),controller[_0xa858('0xa')]);router[_0xa858('0x9')](_0xa858('0xb'),auth['isAuthenticated'](),controller[_0xa858('0xc')]);router[_0xa858('0x9')](_0xa858('0xd'),auth[_0xa858('0x8')](),controller[_0xa858('0xe')]);router['post']('/',auth[_0xa858('0x8')](),controller[_0xa858('0xf')]);router[_0xa858('0x10')](_0xa858('0x11'),auth[_0xa858('0x8')](),controller['getPreview']);router[_0xa858('0x12')](_0xa858('0xd'),auth[_0xa858('0x8')](),controller['update']);router[_0xa858('0x13')](_0xa858('0xd'),auth[_0xa858('0x8')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.attributes.js b/server/api/cmHopperBlack/cmHopperBlack.attributes.js index 8de073b..585ad4b 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 _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 +var _0x7da7=['sequelize','exports','contactListQueue','INTEGER','moment'];(function(_0x21b415,_0x6ce9a5){var _0x1a431b=function(_0x1ed49e){while(--_0x1ed49e){_0x21b415['push'](_0x21b415['shift']());}};_0x1a431b(++_0x6ce9a5);}(_0x7da7,0x10d));var _0x77da=function(_0x50007c,_0x1cbf11){_0x50007c=_0x50007c-0x0;var _0x5c1ec7=_0x7da7[_0x50007c];return _0x5c1ec7;};'use strict';var moment=require(_0x77da('0x0'));var Sequelize=require(_0x77da('0x1'));module[_0x77da('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'ContactId':{'type':Sequelize['INTEGER'],'unique':_0x77da('0x3')},'ListId':{'type':Sequelize[_0x77da('0x4')],'unique':'contactListQueue'},'VoiceQueueId':{'type':Sequelize[_0x77da('0x4')],'unique':_0x77da('0x3')}}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.controller.js b/server/api/cmHopperBlack/cmHopperBlack.controller.js index 21ceeee..af9d8ea 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 _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 +var _0xe928=['count','set','reject','save','destroy','then','end','name','send','map','CmHopperBlack','fieldName','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','params','rawAttributes','find','catch','update','body','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit'];(function(_0x3275bc,_0x19eeed){var _0x1db68a=function(_0xa67ecf){while(--_0xa67ecf){_0x3275bc['push'](_0x3275bc['shift']());}};_0x1db68a(++_0x19eeed);}(_0xe928,0x145));var _0x8e92=function(_0x23a246,_0x4eb2c5){_0x23a246=_0x23a246-0x0;var _0x4684a9=_0xe928[_0x23a246];return _0x4684a9;};'use strict';var emlformat=require(_0x8e92('0x0'));var rimraf=require(_0x8e92('0x1'));var zipdir=require(_0x8e92('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8e92('0x3'));var moment=require('moment');var BPromise=require(_0x8e92('0x4'));var Mustache=require(_0x8e92('0x5'));var util=require(_0x8e92('0x6'));var path=require(_0x8e92('0x7'));var sox=require('sox');var csv=require(_0x8e92('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8e92('0x9'));var _=require(_0x8e92('0xa'));var squel=require(_0x8e92('0xb'));var crypto=require(_0x8e92('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8e92('0xd'));var toCsv=require('to-csv');var querystring=require(_0x8e92('0xe'));var Papa=require(_0x8e92('0xf'));var Redis=require(_0x8e92('0x10'));var authService=require(_0x8e92('0x11'));var qs=require(_0x8e92('0x12'));var as=require(_0x8e92('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8e92('0x14'))(_0x8e92('0x15'));var utils=require(_0x8e92('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x8e92('0x17'));var db=require(_0x8e92('0x18'))['db'];function respondWithStatusCode(_0x3cbe0a,_0x3b19fa){_0x3b19fa=_0x3b19fa||0xcc;return function(_0x324f3f){if(_0x324f3f){return _0x3cbe0a[_0x8e92('0x19')](_0x3b19fa);}return _0x3cbe0a[_0x8e92('0x1a')](_0x3b19fa)['end']();};}function respondWithResult(_0x97be72,_0x5c06fd){_0x5c06fd=_0x5c06fd||0xc8;return function(_0x1cf5ee){if(_0x1cf5ee){return _0x97be72[_0x8e92('0x1a')](_0x5c06fd)['json'](_0x1cf5ee);}};}function respondWithFilteredResult(_0x101ea1,_0x57ff38){return function(_0x1d866f){if(_0x1d866f){var _0x26cce1=typeof _0x57ff38[_0x8e92('0x1b')]===_0x8e92('0x1c')&&typeof _0x57ff38[_0x8e92('0x1d')]===_0x8e92('0x1c');var _0x182e05=_0x1d866f[_0x8e92('0x1e')];var _0x55f325=_0x26cce1?0x0:_0x57ff38[_0x8e92('0x1b')];var _0x192b0b=_0x26cce1?_0x1d866f[_0x8e92('0x1e')]:_0x57ff38[_0x8e92('0x1b')]+_0x57ff38[_0x8e92('0x1d')];var _0x5ab67b;if(_0x192b0b>=_0x182e05){_0x192b0b=_0x182e05;_0x5ab67b=0xc8;}else{_0x5ab67b=0xce;}_0x101ea1[_0x8e92('0x1a')](_0x5ab67b);return _0x101ea1[_0x8e92('0x1f')]('Content-Range',_0x55f325+'-'+_0x192b0b+'/'+_0x182e05)['json'](_0x1d866f);}return null;};}function patchUpdates(_0x558694){return function(_0x334628){try{jsonpatch['apply'](_0x334628,_0x558694,!![]);}catch(_0x3d23f1){return BPromise[_0x8e92('0x20')](_0x3d23f1);}return _0x334628[_0x8e92('0x21')]();};}function saveUpdates(_0x3147ef,_0x368253){return function(_0x70f846){if(_0x70f846){return _0x70f846['update'](_0x3147ef)['then'](function(_0x53b5aa){return _0x53b5aa;});}return null;};}function removeEntity(_0x5b5ea2,_0x322765){return function(_0x3a86e4){if(_0x3a86e4){return _0x3a86e4[_0x8e92('0x22')]()[_0x8e92('0x23')](function(){_0x5b5ea2[_0x8e92('0x1a')](0xcc)[_0x8e92('0x24')]();});}};}function handleEntityNotFound(_0x585adb,_0x1b0e14){return function(_0x22cdbe){if(!_0x22cdbe){_0x585adb[_0x8e92('0x19')](0x194);}return _0x22cdbe;};}function handleError(_0x127fff,_0x40b576){_0x40b576=_0x40b576||0x1f4;return function(_0x2aaf1d){logger['error'](_0x2aaf1d['stack']);if(_0x2aaf1d['name']){delete _0x2aaf1d[_0x8e92('0x25')];}_0x127fff['status'](_0x40b576)[_0x8e92('0x26')](_0x2aaf1d);};}exports['index']=function(_0x3bfb1e,_0x492c89){var _0x208384={},_0x57c4de={},_0xc7e9c0={'count':0x0,'rows':[]};var _0x3c8897=_[_0x8e92('0x27')](db[_0x8e92('0x28')]['rawAttributes'],function(_0x456d0b){return{'name':_0x456d0b[_0x8e92('0x29')],'type':_0x456d0b['type'][_0x8e92('0x2a')]};});_0x57c4de['model']=_[_0x8e92('0x27')](_0x3c8897,_0x8e92('0x25'));_0x57c4de['query']=_[_0x8e92('0x2b')](_0x3bfb1e[_0x8e92('0x2c')]);_0x57c4de[_0x8e92('0x2d')]=_[_0x8e92('0x2e')](_0x57c4de[_0x8e92('0x2f')],_0x57c4de[_0x8e92('0x2c')]);_0x208384[_0x8e92('0x30')]=_[_0x8e92('0x2e')](_0x57c4de[_0x8e92('0x2f')],qs['fields'](_0x3bfb1e['query'][_0x8e92('0x31')]));_0x208384['attributes']=_0x208384['attributes'][_0x8e92('0x32')]?_0x208384[_0x8e92('0x30')]:_0x57c4de[_0x8e92('0x2f')];if(!_0x3bfb1e['query'][_0x8e92('0x33')](_0x8e92('0x34'))){_0x208384[_0x8e92('0x1d')]=qs['limit'](_0x3bfb1e['query'][_0x8e92('0x1d')]);_0x208384['offset']=qs[_0x8e92('0x1b')](_0x3bfb1e[_0x8e92('0x2c')][_0x8e92('0x1b')]);}_0x208384[_0x8e92('0x35')]=qs[_0x8e92('0x36')](_0x3bfb1e['query'][_0x8e92('0x36')]);_0x208384[_0x8e92('0x37')]=qs[_0x8e92('0x2d')](_['pick'](_0x3bfb1e['query'],_0x57c4de[_0x8e92('0x2d')]),_0x3c8897);if(_0x3bfb1e['query'][_0x8e92('0x38')]){_0x208384[_0x8e92('0x37')]=_[_0x8e92('0x39')](_0x208384[_0x8e92('0x37')],{'$or':_['map'](_0x3c8897,function(_0x4b74c4){if(_0x4b74c4['type']!==_0x8e92('0x3a')){var _0x5c5f5d={};_0x5c5f5d[_0x4b74c4[_0x8e92('0x25')]]={'$like':'%'+_0x3bfb1e['query']['filter']+'%'};return _0x5c5f5d;}})});}_0x208384=_['merge']({},_0x208384,_0x3bfb1e[_0x8e92('0x3b')]);var _0x3c3d83={'where':_0x208384[_0x8e92('0x37')]};return db[_0x8e92('0x28')][_0x8e92('0x1e')](_0x3c3d83)[_0x8e92('0x23')](function(_0x5e0f6f){_0xc7e9c0[_0x8e92('0x1e')]=_0x5e0f6f;if(_0x3bfb1e[_0x8e92('0x2c')][_0x8e92('0x3c')]){_0x208384[_0x8e92('0x3d')]=[{'all':!![]}];}return db['CmHopperBlack'][_0x8e92('0x3e')](_0x208384);})[_0x8e92('0x23')](function(_0x5c4a29){_0xc7e9c0[_0x8e92('0x3f')]=_0x5c4a29;return _0xc7e9c0;})[_0x8e92('0x23')](respondWithFilteredResult(_0x492c89,_0x208384))['catch'](handleError(_0x492c89,null));};exports['show']=function(_0x105114,_0x4fd1e2){var _0x543e7f={'raw':!![],'where':{'id':_0x105114[_0x8e92('0x40')]['id']}},_0x4e9683={};_0x4e9683[_0x8e92('0x2f')]=_['keys'](db[_0x8e92('0x28')][_0x8e92('0x41')]);_0x4e9683[_0x8e92('0x2c')]=_[_0x8e92('0x2b')](_0x105114['query']);_0x4e9683[_0x8e92('0x2d')]=_['intersection'](_0x4e9683[_0x8e92('0x2f')],_0x4e9683[_0x8e92('0x2c')]);_0x543e7f['attributes']=_[_0x8e92('0x2e')](_0x4e9683[_0x8e92('0x2f')],qs[_0x8e92('0x31')](_0x105114[_0x8e92('0x2c')][_0x8e92('0x31')]));_0x543e7f[_0x8e92('0x30')]=_0x543e7f[_0x8e92('0x30')][_0x8e92('0x32')]?_0x543e7f[_0x8e92('0x30')]:_0x4e9683[_0x8e92('0x2f')];if(_0x105114[_0x8e92('0x2c')][_0x8e92('0x3c')]){_0x543e7f['include']=[{'all':!![]}];}_0x543e7f=_[_0x8e92('0x39')]({},_0x543e7f,_0x105114[_0x8e92('0x3b')]);return db[_0x8e92('0x28')][_0x8e92('0x42')](_0x543e7f)['then'](handleEntityNotFound(_0x4fd1e2,null))[_0x8e92('0x23')](respondWithResult(_0x4fd1e2,null))[_0x8e92('0x43')](handleError(_0x4fd1e2,null));};exports[_0x8e92('0x44')]=function(_0x508c6e,_0x33e097){if(_0x508c6e[_0x8e92('0x45')]['id']){delete _0x508c6e[_0x8e92('0x45')]['id'];}return db[_0x8e92('0x28')][_0x8e92('0x42')]({'where':{'id':_0x508c6e[_0x8e92('0x40')]['id']}})[_0x8e92('0x23')](handleEntityNotFound(_0x33e097,null))[_0x8e92('0x23')](saveUpdates(_0x508c6e[_0x8e92('0x45')],null))[_0x8e92('0x23')](respondWithResult(_0x33e097,null))[_0x8e92('0x43')](handleError(_0x33e097,null));};exports[_0x8e92('0x22')]=function(_0x5bbe17,_0x2ce47b){return db[_0x8e92('0x28')][_0x8e92('0x42')]({'where':{'id':_0x5bbe17[_0x8e92('0x40')]['id']}})[_0x8e92('0x23')](handleEntityNotFound(_0x2ce47b,null))[_0x8e92('0x23')](removeEntity(_0x2ce47b,null))['catch'](handleError(_0x2ce47b,null));};exports[_0x8e92('0x46')]=function(_0x3d6991,_0x31d987){return db[_0x8e92('0x28')][_0x8e92('0x46')]()[_0x8e92('0x23')](respondWithResult(_0x31d987,null))[_0x8e92('0x43')](handleError(_0x31d987,null));}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.model.js b/server/api/cmHopperBlack/cmHopperBlack.model.js index a676665..65909b9 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 _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 +var _0x37d4=['moment','request-promise','rimraf','../../config/environment','define','cm_hopper_black','util','../../config/logger'];(function(_0xf48d27,_0xc761af){var _0x172722=function(_0x4722d1){while(--_0x4722d1){_0xf48d27['push'](_0xf48d27['shift']());}};_0x172722(++_0xc761af);}(_0x37d4,0x13e));var _0x437d=function(_0x57b815,_0x97285f){_0x57b815=_0x57b815-0x0;var _0x4534fb=_0x37d4[_0x57b815];return _0x4534fb;};'use strict';var _=require('lodash');var util=require(_0x437d('0x0'));var logger=require(_0x437d('0x1'))('api');var moment=require(_0x437d('0x2'));var BPromise=require('bluebird');var rp=require(_0x437d('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x437d('0x4'));var config=require(_0x437d('0x5'));var attributes=require('./cmHopperBlack.attributes');module['exports']=function(_0x6dd742,_0x19144a){return _0x6dd742[_0x437d('0x6')]('CmHopperBlack',attributes,{'tableName':_0x437d('0x7'),'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 0d6ab03..8661cf6 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 _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 +var _0x4257=['attributes','limit','include','model','map','then','debug','UpdateCmHopperBlack','update','body','stringify','DestroyCmHopperBlack','destroy','lodash','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','info','request\x20sent','error','code','message','CmHopperBlack,\x20%s,\x20%s','result','catch','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x4257,0x15a));var _0x7425=function(_0x32f041,_0x54e76f){_0x32f041=_0x32f041-0x0;var _0x2a9cd2=_0x4257[_0x32f041];return _0x2a9cd2;};'use strict';var _=require(_0x7425('0x0'));var util=require('util');var moment=require(_0x7425('0x1'));var BPromise=require('bluebird');var rs=require(_0x7425('0x2'));var fs=require('fs');var Redis=require(_0x7425('0x3'));var db=require(_0x7425('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7425('0x5'));var config=require(_0x7425('0x6'));var jayson=require(_0x7425('0x7'));var client=jayson[_0x7425('0x8')][_0x7425('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1f7c37,_0x3e71c5,_0x3ddad1){return new BPromise(function(_0x2b9826,_0x57fae5){return client['request'](_0x1f7c37,_0x3ddad1)['then'](function(_0x56cde8){logger[_0x7425('0xa')]('CmHopperBlack,\x20%s,\x20%s',_0x3e71c5,_0x7425('0xb'));logger['debug']('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x3e71c5,_0x7425('0xb'),JSON['stringify'](_0x56cde8));if(_0x56cde8[_0x7425('0xc')]){if(_0x56cde8['error'][_0x7425('0xd')]===0x1f4){logger[_0x7425('0xc')]('CmHopperBlack,\x20%s,\x20%s',_0x3e71c5,_0x56cde8[_0x7425('0xc')][_0x7425('0xe')]);return _0x57fae5(_0x56cde8[_0x7425('0xc')]['message']);}logger[_0x7425('0xc')]('CmHopperBlack,\x20%s,\x20%s',_0x3e71c5,_0x56cde8[_0x7425('0xc')][_0x7425('0xe')]);return _0x2b9826(_0x56cde8[_0x7425('0xc')][_0x7425('0xe')]);}else{logger[_0x7425('0xa')](_0x7425('0xf'),_0x3e71c5,'request\x20sent');_0x2b9826(_0x56cde8[_0x7425('0x10')][_0x7425('0xe')]);}})[_0x7425('0x11')](function(_0x2e08a8){logger[_0x7425('0xc')]('CmHopperBlack,\x20%s,\x20%s',_0x3e71c5,_0x2e08a8);_0x57fae5(_0x2e08a8);});});}exports[_0x7425('0x12')]=function(_0x48308f){var _0x503a84=this;return new Promise(function(_0x518aeb,_0x315f6d){return db[_0x7425('0x13')][_0x7425('0x14')]({'raw':_0x48308f[_0x7425('0x15')]?_0x48308f['options'][_0x7425('0x16')]===undefined?!![]:![]:!![],'where':_0x48308f['options']?_0x48308f[_0x7425('0x15')][_0x7425('0x17')]||null:null,'attributes':_0x48308f[_0x7425('0x15')]?_0x48308f[_0x7425('0x15')][_0x7425('0x18')]||null:null,'limit':_0x48308f['options']?_0x48308f[_0x7425('0x15')][_0x7425('0x19')]||null:null,'include':_0x48308f[_0x7425('0x15')]?_0x48308f[_0x7425('0x15')][_0x7425('0x1a')]?_['map'](_0x48308f[_0x7425('0x15')]['include'],function(_0x59b318){return{'model':db[_0x59b318[_0x7425('0x1b')]],'as':_0x59b318['as'],'attributes':_0x59b318[_0x7425('0x18')],'include':_0x59b318['include']?_[_0x7425('0x1c')](_0x59b318[_0x7425('0x1a')],function(_0x2c9e1d){return{'model':db[_0x2c9e1d[_0x7425('0x1b')]],'as':_0x2c9e1d['as'],'attributes':_0x2c9e1d[_0x7425('0x18')],'include':_0x2c9e1d[_0x7425('0x1a')]?_[_0x7425('0x1c')](_0x2c9e1d[_0x7425('0x1a')],function(_0x49e407){return{'model':db[_0x49e407[_0x7425('0x1b')]],'as':_0x49e407['as'],'attributes':_0x49e407[_0x7425('0x18')]};}):[]};}):[]};}):[]:[]})[_0x7425('0x1d')](function(_0x39e3cb){logger[_0x7425('0xa')](_0x7425('0x12'),_0x48308f);logger[_0x7425('0x1e')]('GetCmHopperBlack',_0x48308f,JSON['stringify'](_0x39e3cb));_0x518aeb(_0x39e3cb);})['catch'](function(_0x5786e6){logger[_0x7425('0xc')]('GetCmHopperBlack',_0x5786e6[_0x7425('0xe')],_0x48308f);_0x315f6d(_0x503a84[_0x7425('0xc')](0x1f4,_0x5786e6['message']));});});};exports[_0x7425('0x1f')]=function(_0x2bc2e7){var _0x2e5c60=this;return new Promise(function(_0x5864fe,_0x596ddb){return db[_0x7425('0x13')][_0x7425('0x20')](_0x2bc2e7[_0x7425('0x21')],{'raw':_0x2bc2e7[_0x7425('0x15')]?_0x2bc2e7[_0x7425('0x15')][_0x7425('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2bc2e7['options']?_0x2bc2e7[_0x7425('0x15')]['where']||null:null,'attributes':_0x2bc2e7[_0x7425('0x15')]?_0x2bc2e7[_0x7425('0x15')][_0x7425('0x18')]||null:null,'limit':_0x2bc2e7[_0x7425('0x15')]?_0x2bc2e7[_0x7425('0x15')][_0x7425('0x19')]||null:null})[_0x7425('0x1d')](function(_0x4c1662){logger[_0x7425('0xa')]('UpdateCmHopperBlack',_0x2bc2e7);logger['debug'](_0x7425('0x1f'),_0x2bc2e7,JSON[_0x7425('0x22')](_0x4c1662));_0x5864fe(_0x4c1662);})[_0x7425('0x11')](function(_0x5a89e2){logger[_0x7425('0xc')](_0x7425('0x1f'),_0x5a89e2[_0x7425('0xe')],_0x2bc2e7);_0x596ddb(_0x2e5c60['error'](0x1f4,_0x5a89e2['message']));});});};exports[_0x7425('0x23')]=function(_0x1e09ad){var _0x1e3d35=this;return new Promise(function(_0x5725b7,_0x129b38){return db[_0x7425('0x13')][_0x7425('0x24')]({'where':_0x1e09ad[_0x7425('0x15')]?_0x1e09ad[_0x7425('0x15')][_0x7425('0x17')]||null:null})[_0x7425('0x1d')](function(_0x5c21e5){logger['info']('DestroyCmHopperBlack',_0x1e09ad);logger['debug'](_0x7425('0x23'),_0x1e09ad,JSON[_0x7425('0x22')](_0x5c21e5));_0x5725b7(_0x5c21e5);})['catch'](function(_0x5e420f){logger[_0x7425('0xc')](_0x7425('0x23'),_0x5e420f['message'],_0x1e09ad);_0x129b38(_0x1e3d35[_0x7425('0xc')](0x1f4,_0x5e420f[_0x7425('0xe')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/index.js b/server/api/cmHopperBlack/index.js index ae1bc82..a89aa23 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 _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 +var _0xc2c7=['destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','describe','/:id','show','update','delete'];(function(_0x307d86,_0x9264f2){var _0x361745=function(_0x1b64e1){while(--_0x1b64e1){_0x307d86['push'](_0x307d86['shift']());}};_0x361745(++_0x9264f2);}(_0xc2c7,0x134));var _0x7c2c=function(_0x1b4dc1,_0x69a746){_0x1b4dc1=_0x1b4dc1-0x0;var _0xd4a175=_0xc2c7[_0x1b4dc1];return _0xd4a175;};'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('./cmHopperBlack.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['put'](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xe')]);router[_0x7c2c('0xf')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0x10')]);module[_0x7c2c('0x11')]=router; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.attributes.js b/server/api/cmHopperFinal/cmHopperFinal.attributes.js index f3f5fa1..e16e785 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 _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 +var _0x9da8=['endtime','setDataValue','BOOLEAN','sequelize','moment','exports','INTEGER','STRING','DATE','getDataValue'];(function(_0x84674,_0x36ae55){var _0x17939c=function(_0x42601b){while(--_0x42601b){_0x84674['push'](_0x84674['shift']());}};_0x17939c(++_0x36ae55);}(_0x9da8,0x1b1));var _0x89da=function(_0x15ea09,_0x2f30ab){_0x15ea09=_0x15ea09-0x0;var _0x3e9c78=_0x9da8[_0x15ea09];return _0x3e9c78;};'use strict';var Sequelize=require(_0x89da('0x0'));var moment=require(_0x89da('0x1'));module[_0x89da('0x2')]={'state':{'type':Sequelize[_0x89da('0x3')](0x2)},'statedesc':{'type':Sequelize[_0x89da('0x4')]},'scheduledat':{'type':Sequelize['DATE']},'countbusyretry':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x89da('0x4')]},'originatecalleridnum':{'type':Sequelize[_0x89da('0x4')]},'originatecalleridname':{'type':Sequelize[_0x89da('0x4')]},'calleridnum':{'type':Sequelize[_0x89da('0x4')]},'calleridname':{'type':Sequelize[_0x89da('0x4')]},'starttime':{'type':Sequelize[_0x89da('0x5')]},'responsetime':{'type':Sequelize[_0x89da('0x5')]},'answertime':{'type':Sequelize[_0x89da('0x5')]},'droptime':{'type':Sequelize[_0x89da('0x5')]},'endtime':{'type':Sequelize[_0x89da('0x5')]},'ringtime':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x89da('0x4')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize['STRING']},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0x89da('0x4')]},'disposition':{'type':Sequelize[_0x89da('0x4')]},'secondDisposition':{'type':Sequelize[_0x89da('0x4')]},'thirdDisposition':{'type':Sequelize[_0x89da('0x4')]},'dispositionat':{'type':Sequelize[_0x89da('0x5')],'set':function(_0x19b5b0){var _0x1d148c=this[_0x89da('0x6')](_0x89da('0x7'));if(_0x1d148c&&_0x19b5b0){this[_0x89da('0x8')]('followuptime',moment(_0x19b5b0)['diff'](moment(_0x1d148c),'seconds'));}return this[_0x89da('0x8')]('dispositionat',_0x19b5b0);}},'amd':{'type':Sequelize[_0x89da('0x9')],'defaultValue':![]},'fax':{'type':Sequelize[_0x89da('0x9')],'defaultValue':![]},'blacklist':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x89da('0x9')],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize[_0x89da('0x9')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x89da('0x4')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x89da('0x5')]},'deleted':{'type':Sequelize[_0x89da('0x4')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x89da('0x5')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x89da('0x5')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x89da('0x3')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x89da('0x3')],'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 e375c3c..1e2e31b 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 _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 +var _0x9536=['papaparse','../../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','offset','undefined','limit','count','set','Content-Range','reject','update','error','stack','name','index','map','CmHopperFinal','fieldName','model','query','keys','filters','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','then','includeAll','include','findAll','rows','catch','params','rawAttributes','intersection','length','options','find','body','uniqueid','countContactsQueueCampaignHopperFinal','sequelize','COUNT','noSuchContacts','literal','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','busyContacts','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','`state`\x20=\x200,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','reCallContacts','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert','into','fromQuery','phone','scheduledAt','ContactId','VoiceQueueId','createdAt','updatedAt','field','ANY_VALUE(calleridnum)','ANY_VALUE(ContactId)','ListId','NOW()','from','VoiceQueueId\x20=\x20?','state\x20=\x20?','state','toString','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','cm_hopper','calleridnum','state\x20=\x204','moveContactsIvrCampaignHopperFinal','Campaign','CampaignId','select','ANY_VALUE(ListId)','CampaignId\x20=\x20?','cm_hopper_final','group','checkContactHopper','CmHopper','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring'];(function(_0x113c76,_0x19468a){var _0x524772=function(_0xc87816){while(--_0xc87816){_0x113c76['push'](_0x113c76['shift']());}};_0x524772(++_0x19468a);}(_0x9536,0x179));var _0x6953=function(_0x52096b,_0x20bab4){_0x52096b=_0x52096b-0x0;var _0x2b1cc7=_0x9536[_0x52096b];return _0x2b1cc7;};'use strict';var emlformat=require(_0x6953('0x0'));var rimraf=require(_0x6953('0x1'));var zipdir=require(_0x6953('0x2'));var jsonpatch=require(_0x6953('0x3'));var rp=require('request-promise');var moment=require(_0x6953('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6953('0x5'));var util=require(_0x6953('0x6'));var path=require(_0x6953('0x7'));var sox=require(_0x6953('0x8'));var csv=require(_0x6953('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6953('0xa'));var _=require(_0x6953('0xb'));var squel=require(_0x6953('0xc'));var crypto=require(_0x6953('0xd'));var jsforce=require(_0x6953('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x6953('0x9'));var querystring=require(_0x6953('0xf'));var Papa=require(_0x6953('0x10'));var Redis=require('ioredis');var authService=require(_0x6953('0x11'));var qs=require(_0x6953('0x12'));var as=require(_0x6953('0x13'));var hardwareService=require(_0x6953('0x14'));var logger=require(_0x6953('0x15'))(_0x6953('0x16'));var utils=require(_0x6953('0x17'));var config=require(_0x6953('0x18'));var licenseUtil=require(_0x6953('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x358388,_0x513dd0){_0x513dd0=_0x513dd0||0xcc;return function(_0x8de91e){if(_0x8de91e){return _0x358388[_0x6953('0x1a')](_0x513dd0);}return _0x358388[_0x6953('0x1b')](_0x513dd0)[_0x6953('0x1c')]();};}function respondWithResult(_0x1b5221,_0x244713){_0x244713=_0x244713||0xc8;return function(_0x175fa9){if(_0x175fa9){return _0x1b5221[_0x6953('0x1b')](_0x244713)[_0x6953('0x1d')](_0x175fa9);}};}function respondWithFilteredResult(_0x31d182,_0xae5515){return function(_0x548473){if(_0x548473){var _0x5f49db=typeof _0xae5515[_0x6953('0x1e')]===_0x6953('0x1f')&&typeof _0xae5515[_0x6953('0x20')]===_0x6953('0x1f');var _0x510d46=_0x548473[_0x6953('0x21')];var _0x2da771=_0x5f49db?0x0:_0xae5515['offset'];var _0x10858a=_0x5f49db?_0x548473[_0x6953('0x21')]:_0xae5515[_0x6953('0x1e')]+_0xae5515[_0x6953('0x20')];var _0xc714d3;if(_0x10858a>=_0x510d46){_0x10858a=_0x510d46;_0xc714d3=0xc8;}else{_0xc714d3=0xce;}_0x31d182['status'](_0xc714d3);return _0x31d182[_0x6953('0x22')](_0x6953('0x23'),_0x2da771+'-'+_0x10858a+'/'+_0x510d46)[_0x6953('0x1d')](_0x548473);}return null;};}function patchUpdates(_0x2ba433){return function(_0x41f021){try{jsonpatch['apply'](_0x41f021,_0x2ba433,!![]);}catch(_0xf96d07){return BPromise[_0x6953('0x24')](_0xf96d07);}return _0x41f021['save']();};}function saveUpdates(_0x317979,_0x40c9d1){return function(_0xb92529){if(_0xb92529){return _0xb92529[_0x6953('0x25')](_0x317979)['then'](function(_0x37f339){return _0x37f339;});}return null;};}function removeEntity(_0x231cb2,_0x2a7f6a){return function(_0x508ea7){if(_0x508ea7){return _0x508ea7['destroy']()['then'](function(){_0x231cb2[_0x6953('0x1b')](0xcc)[_0x6953('0x1c')]();});}};}function handleEntityNotFound(_0x550be4,_0x1a32f4){return function(_0x587df0){if(!_0x587df0){_0x550be4[_0x6953('0x1a')](0x194);}return _0x587df0;};}function handleError(_0x2bf39b,_0xcdbce8){_0xcdbce8=_0xcdbce8||0x1f4;return function(_0x2cc01e){logger[_0x6953('0x26')](_0x2cc01e[_0x6953('0x27')]);if(_0x2cc01e['name']){delete _0x2cc01e[_0x6953('0x28')];}_0x2bf39b[_0x6953('0x1b')](_0xcdbce8)['send'](_0x2cc01e);};}exports[_0x6953('0x29')]=function(_0x4af39d,_0x173b3c){var _0x3b1175={},_0x426c7c={},_0x4b0325={'count':0x0,'rows':[]};var _0x131992=_[_0x6953('0x2a')](db[_0x6953('0x2b')]['rawAttributes'],function(_0x4c49fc){return{'name':_0x4c49fc[_0x6953('0x2c')],'type':_0x4c49fc['type']['key']};});_0x426c7c[_0x6953('0x2d')]=_[_0x6953('0x2a')](_0x131992,_0x6953('0x28'));_0x426c7c[_0x6953('0x2e')]=_[_0x6953('0x2f')](_0x4af39d['query']);_0x426c7c[_0x6953('0x30')]=_['intersection'](_0x426c7c[_0x6953('0x2d')],_0x426c7c[_0x6953('0x2e')]);_0x3b1175['attributes']=_['intersection'](_0x426c7c[_0x6953('0x2d')],qs[_0x6953('0x31')](_0x4af39d[_0x6953('0x2e')]['fields']));_0x3b1175[_0x6953('0x32')]=_0x3b1175['attributes']['length']?_0x3b1175['attributes']:_0x426c7c['model'];if(!_0x4af39d[_0x6953('0x2e')][_0x6953('0x33')](_0x6953('0x34'))){_0x3b1175[_0x6953('0x20')]=qs[_0x6953('0x20')](_0x4af39d[_0x6953('0x2e')]['limit']);_0x3b1175[_0x6953('0x1e')]=qs['offset'](_0x4af39d[_0x6953('0x2e')]['offset']);}_0x3b1175[_0x6953('0x35')]=qs[_0x6953('0x36')](_0x4af39d[_0x6953('0x2e')][_0x6953('0x36')]);_0x3b1175['where']=qs[_0x6953('0x30')](_[_0x6953('0x37')](_0x4af39d[_0x6953('0x2e')],_0x426c7c[_0x6953('0x30')]),_0x131992);if(_0x4af39d[_0x6953('0x2e')][_0x6953('0x38')]){_0x3b1175[_0x6953('0x39')]=_[_0x6953('0x3a')](_0x3b1175[_0x6953('0x39')],{'$or':_[_0x6953('0x2a')](_0x131992,function(_0x2d9d81){if(_0x2d9d81['type']!==_0x6953('0x3b')){var _0x3c03ab={};_0x3c03ab[_0x2d9d81[_0x6953('0x28')]]={'$like':'%'+_0x4af39d['query']['filter']+'%'};return _0x3c03ab;}})});}_0x3b1175=_[_0x6953('0x3a')]({},_0x3b1175,_0x4af39d['options']);var _0x5abaf2={'where':_0x3b1175[_0x6953('0x39')]};return db[_0x6953('0x2b')]['count'](_0x5abaf2)[_0x6953('0x3c')](function(_0x263728){_0x4b0325[_0x6953('0x21')]=_0x263728;if(_0x4af39d[_0x6953('0x2e')][_0x6953('0x3d')]){_0x3b1175[_0x6953('0x3e')]=[{'all':!![]}];}return db['CmHopperFinal'][_0x6953('0x3f')](_0x3b1175);})[_0x6953('0x3c')](function(_0x30a27a){_0x4b0325[_0x6953('0x40')]=_0x30a27a;return _0x4b0325;})[_0x6953('0x3c')](respondWithFilteredResult(_0x173b3c,_0x3b1175))[_0x6953('0x41')](handleError(_0x173b3c,null));};exports['show']=function(_0x5a40de,_0xeef91a){var _0x54d7c2={'raw':!![],'where':{'id':_0x5a40de[_0x6953('0x42')]['id']}},_0x588ff8={};_0x588ff8[_0x6953('0x2d')]=_[_0x6953('0x2f')](db[_0x6953('0x2b')][_0x6953('0x43')]);_0x588ff8['query']=_['keys'](_0x5a40de[_0x6953('0x2e')]);_0x588ff8[_0x6953('0x30')]=_['intersection'](_0x588ff8[_0x6953('0x2d')],_0x588ff8['query']);_0x54d7c2[_0x6953('0x32')]=_[_0x6953('0x44')](_0x588ff8[_0x6953('0x2d')],qs[_0x6953('0x31')](_0x5a40de['query'][_0x6953('0x31')]));_0x54d7c2[_0x6953('0x32')]=_0x54d7c2['attributes'][_0x6953('0x45')]?_0x54d7c2[_0x6953('0x32')]:_0x588ff8[_0x6953('0x2d')];if(_0x5a40de[_0x6953('0x2e')][_0x6953('0x3d')]){_0x54d7c2[_0x6953('0x3e')]=[{'all':!![]}];}_0x54d7c2=_[_0x6953('0x3a')]({},_0x54d7c2,_0x5a40de[_0x6953('0x46')]);return db[_0x6953('0x2b')][_0x6953('0x47')](_0x54d7c2)[_0x6953('0x3c')](handleEntityNotFound(_0xeef91a,null))['then'](respondWithResult(_0xeef91a,null))[_0x6953('0x41')](handleError(_0xeef91a,null));};exports['describe']=function(_0x15c142,_0x1d5979){return db[_0x6953('0x2b')]['describe']()[_0x6953('0x3c')](respondWithResult(_0x1d5979,null))[_0x6953('0x41')](handleError(_0x1d5979,null));};exports['update']=function(_0x525145,_0xbf5b61){if(_0x525145[_0x6953('0x48')][_0x6953('0x49')]){delete _0x525145[_0x6953('0x48')][_0x6953('0x49')];}return db[_0x6953('0x2b')][_0x6953('0x47')]({'where':{'uniqueid':_0x525145[_0x6953('0x42')]['id']}})[_0x6953('0x3c')](handleEntityNotFound(_0xbf5b61,null))[_0x6953('0x3c')](saveUpdates(_0x525145[_0x6953('0x48')],null))['then'](respondWithResult(_0xbf5b61,null))['catch'](handleError(_0xbf5b61,null));};exports[_0x6953('0x4a')]=function(_0x38e3e8,_0x68ab5d,_0x7bcd92){return db[_0x6953('0x2b')][_0x6953('0x3f')]({'raw':![],'where':{'VoiceQueueId':_0x38e3e8[_0x6953('0x42')]['id']},'attributes':[[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db['sequelize']['literal']('`state`\x20=\x200,\x201,\x20null'))),_0x6953('0x4d')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db['sequelize'][_0x6953('0x4e')](_0x6953('0x4f')))),_0x6953('0x50')],[db['sequelize']['fn']('COUNT',db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')]['literal']('`state`\x20=\x205,\x201,\x20null'))),_0x6953('0x51')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')]['literal'](_0x6953('0x52')))),_0x6953('0x53')],[db['sequelize']['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x54')))),_0x6953('0x55')],[db['sequelize']['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')]['literal']('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x6953('0x56')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db['sequelize'][_0x6953('0x4e')](_0x6953('0x57')))),'reCallContacts'],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x58')))),_0x6953('0x59')]]})[_0x6953('0x3c')](handleEntityNotFound(_0x68ab5d,null))['then'](respondWithResult(_0x68ab5d,null))[_0x6953('0x41')](handleError(_0x68ab5d,null));};exports[_0x6953('0x5a')]=function(_0x35ac0e,_0x57ffab,_0x479ab4){return db[_0x6953('0x2b')][_0x6953('0x3f')]({'raw':![],'where':{'CampaignId':_0x35ac0e[_0x6953('0x42')]['id']},'attributes':[[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x5b')))),_0x6953('0x4d')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x4f')))),_0x6953('0x50')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x5c')))),_0x6953('0x51')],[db[_0x6953('0x4b')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x6953('0x4b')]['literal'](_0x6953('0x52')))),_0x6953('0x53')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db['sequelize']['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x54')))),_0x6953('0x55')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')](_0x6953('0x5d')))),_0x6953('0x56')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')]['literal'](_0x6953('0x57')))),_0x6953('0x5e')],[db[_0x6953('0x4b')]['fn'](_0x6953('0x4c'),db[_0x6953('0x4b')]['fn']('IF',db[_0x6953('0x4b')][_0x6953('0x4e')]('`state`\x20=\x2019,\x201,\x20null'))),_0x6953('0x59')]]})[_0x6953('0x3c')](handleEntityNotFound(_0x57ffab,null))['then'](respondWithResult(_0x57ffab,null))[_0x6953('0x41')](handleError(_0x57ffab,null));};exports[_0x6953('0x5f')]=function(_0x41d74d,_0x5063ac,_0x4cb8a4){return db[_0x6953('0x60')][_0x6953('0x47')]({'where':{'id':_0x41d74d[_0x6953('0x42')]['id']}})[_0x6953('0x3c')](handleEntityNotFound(_0x5063ac,null))[_0x6953('0x3c')](function(_0x43a39f){var _0x3cf1c0;if(_0x43a39f){_0x3cf1c0=squel[_0x6953('0x61')]()[_0x6953('0x62')]('cm_hopper')[_0x6953('0x63')]([_0x6953('0x64'),_0x6953('0x65'),_0x6953('0x66'),'ListId',_0x6953('0x67'),_0x6953('0x68'),_0x6953('0x69')],squel['select']()[_0x6953('0x6a')](_0x6953('0x6b'),_0x6953('0x64'))[_0x6953('0x6a')]('NOW()',_0x6953('0x65'))[_0x6953('0x6a')](_0x6953('0x6c'),_0x6953('0x66'))['field']('ANY_VALUE(ListId)',_0x6953('0x6d'))[_0x6953('0x6a')]('ANY_VALUE(VoiceQueueId)','VoiceQueueId')[_0x6953('0x6a')](_0x6953('0x6e'),_0x6953('0x68'))[_0x6953('0x6a')]('NOW()',_0x6953('0x69'))[_0x6953('0x6f')]('cm_hopper_final')[_0x6953('0x39')](_0x6953('0x70'),_0x41d74d['params']['id']['toString']())['where'](_0x6953('0x71'),_0x41d74d[_0x6953('0x48')][_0x6953('0x72')][_0x6953('0x73')]())[_0x6953('0x39')](_0x6953('0x74'))[_0x6953('0x39')](_0x6953('0x75'),squel['select']()[_0x6953('0x6a')](_0x6953('0x64'))[_0x6953('0x6f')](_0x6953('0x76'))[_0x6953('0x39')](_0x6953('0x70'),_0x41d74d['params']['id'][_0x6953('0x73')]()))['where'](_0x6953('0x75'),squel['select']()[_0x6953('0x6a')](_0x6953('0x77'))[_0x6953('0x6f')]('cm_hopper_final')[_0x6953('0x39')](_0x6953('0x70'),_0x41d74d[_0x6953('0x42')]['id'][_0x6953('0x73')]())[_0x6953('0x39')](_0x6953('0x78')))['group'](_0x6953('0x66')))[_0x6953('0x73')]();return db[_0x6953('0x4b')][_0x6953('0x2e')](_0x3cf1c0);}return[];})[_0x6953('0x3c')](respondWithResult(_0x5063ac,null))[_0x6953('0x41')](handleError(_0x5063ac,null));};exports[_0x6953('0x79')]=function(_0xa26241,_0xefb593,_0x216b92){return db[_0x6953('0x7a')]['find']({'where':{'id':_0xa26241[_0x6953('0x42')]['id']}})[_0x6953('0x3c')](handleEntityNotFound(_0xefb593,null))[_0x6953('0x3c')](function(_0x396a9f){var _0x92c0bc;if(_0x396a9f){_0x92c0bc=squel[_0x6953('0x61')]()[_0x6953('0x62')](_0x6953('0x76'))[_0x6953('0x63')]([_0x6953('0x64'),_0x6953('0x65'),'ContactId',_0x6953('0x6d'),_0x6953('0x7b'),_0x6953('0x68'),'updatedAt'],squel[_0x6953('0x7c')]()['field']('ANY_VALUE(calleridnum)',_0x6953('0x64'))[_0x6953('0x6a')](_0x6953('0x6e'),_0x6953('0x65'))[_0x6953('0x6a')](_0x6953('0x6c'),_0x6953('0x66'))['field'](_0x6953('0x7d'),_0x6953('0x6d'))[_0x6953('0x6a')]('ANY_VALUE(CampaignId)',_0x6953('0x7b'))[_0x6953('0x6a')]('NOW()',_0x6953('0x68'))['field']('NOW()',_0x6953('0x69'))['from']('cm_hopper_final')[_0x6953('0x39')](_0x6953('0x7e'),_0xa26241[_0x6953('0x42')]['id']['toString']())[_0x6953('0x39')](_0x6953('0x71'),_0xa26241['body'][_0x6953('0x72')][_0x6953('0x73')]())[_0x6953('0x39')](_0x6953('0x74'))[_0x6953('0x39')](_0x6953('0x75'),squel[_0x6953('0x7c')]()[_0x6953('0x6a')](_0x6953('0x64'))['from'](_0x6953('0x76'))[_0x6953('0x39')]('CampaignId\x20=\x20?',_0xa26241[_0x6953('0x42')]['id'][_0x6953('0x73')]()))[_0x6953('0x39')](_0x6953('0x75'),squel[_0x6953('0x7c')]()[_0x6953('0x6a')](_0x6953('0x77'))['from'](_0x6953('0x7f'))[_0x6953('0x39')](_0x6953('0x7e'),_0xa26241[_0x6953('0x42')]['id'][_0x6953('0x73')]())[_0x6953('0x39')](_0x6953('0x78')))[_0x6953('0x80')](_0x6953('0x66')))['toString']();return db[_0x6953('0x4b')]['query'](_0x92c0bc);}return[];})[_0x6953('0x3c')](respondWithResult(_0xefb593,null))['catch'](handleError(_0xefb593,null));};exports[_0x6953('0x81')]=function(_0x7215ed,_0x3cb96a,_0x46bcec){return db[_0x6953('0x82')]['findOne']({'where':{'VoiceQueueId':_0x7215ed[_0x6953('0x48')]['VoiceQueueId'],'CampaignId':_0x7215ed[_0x6953('0x48')][_0x6953('0x7b')],'ContactId':_0x7215ed[_0x6953('0x48')][_0x6953('0x66')]}})['then'](handleEntityNotFound(_0x3cb96a,null))[_0x6953('0x3c')](function(_0x50f019){if(_0x50f019){return _0x50f019;}return null;})[_0x6953('0x3c')](respondWithResult(_0x3cb96a,null))[_0x6953('0x41')](handleError(_0x3cb96a,null));}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.model.js b/server/api/cmHopperFinal/cmHopperFinal.model.js index 563a89a..62049ea 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 _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 +var _0xa204=['define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','util','../../config/logger','path','rimraf','./cmHopperFinal.attributes'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xa204,0x1f4));var _0x4a20=function(_0x9d1bbe,_0x59660a){_0x9d1bbe=_0x9d1bbe-0x0;var _0x563c69=_0xa204[_0x9d1bbe];return _0x563c69;};'use strict';var _=require(_0x4a20('0x0'));var util=require(_0x4a20('0x1'));var logger=require(_0x4a20('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4a20('0x3'));var rimraf=require(_0x4a20('0x4'));var config=require('../../config/environment');var attributes=require(_0x4a20('0x5'));module['exports']=function(_0x39b219,_0x3868d5){return _0x39b219[_0x4a20('0x6')](_0x4a20('0x7'),attributes,{'tableName':_0x4a20('0x8'),'paranoid':![],'indexes':[{'name':_0x4a20('0x9'),'fields':[_0x4a20('0x9')]},{'name':_0x4a20('0xa'),'fields':[_0x4a20('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.rpc.js b/server/api/cmHopperFinal/cmHopperFinal.rpc.js index 7799541..a1d948d 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 _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 +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(_0x3c46ca,_0x431397){var _0xbb91b6=function(_0x4aac8c){while(--_0x4aac8c){_0x3c46ca['push'](_0x3c46ca['shift']());}};_0xbb91b6(++_0x431397);}(_0xb10b,0x12a));var _0xbb10=function(_0x1dbaf7,_0x3d05b3){_0x1dbaf7=_0x1dbaf7-0x0;var _0x593f05=_0xb10b[_0x1dbaf7];return _0x593f05;};'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 f9d99bc..2292811 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 _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 +var _0xc7da=['get','isAuthenticated','index','/describe','describe','/:id','show','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','post','/voice/queue/moveContacts/:id','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','put','update','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./cmHopperFinal.controller'];(function(_0x589aee,_0x140a03){var _0x2f5ed4=function(_0x3d224f){while(--_0x3d224f){_0x589aee['push'](_0x589aee['shift']());}};_0x2f5ed4(++_0x140a03);}(_0xc7da,0xf2));var _0xac7d=function(_0x398d0e,_0xeb7e50){_0x398d0e=_0x398d0e-0x0;var _0x25788b=_0xc7da[_0x398d0e];return _0x25788b;};'use strict';var multer=require(_0xac7d('0x0'));var util=require(_0xac7d('0x1'));var path=require(_0xac7d('0x2'));var timeout=require('connect-timeout');var express=require(_0xac7d('0x3'));var router=express[_0xac7d('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xac7d('0x5'));var interaction=require(_0xac7d('0x6'));var config=require('../../config/environment');var controller=require(_0xac7d('0x7'));router[_0xac7d('0x8')]('/',auth[_0xac7d('0x9')](),controller[_0xac7d('0xa')]);router[_0xac7d('0x8')](_0xac7d('0xb'),auth['isAuthenticated'](),controller[_0xac7d('0xc')]);router[_0xac7d('0x8')](_0xac7d('0xd'),auth[_0xac7d('0x9')](),controller[_0xac7d('0xe')]);router[_0xac7d('0x8')](_0xac7d('0xf'),auth['isAuthenticated'](),controller[_0xac7d('0x10')]);router[_0xac7d('0x8')](_0xac7d('0x11'),auth['isAuthenticated'](),controller[_0xac7d('0x12')]);router[_0xac7d('0x13')](_0xac7d('0x14'),auth[_0xac7d('0x9')](),controller['moveContactsQueueCampaignHopperFinal']);router[_0xac7d('0x13')](_0xac7d('0x15'),auth[_0xac7d('0x9')](),controller[_0xac7d('0x16')]);router[_0xac7d('0x13')]('/checkContactHopper',auth[_0xac7d('0x9')](),controller['checkContactHopper']);router[_0xac7d('0x17')](_0xac7d('0xd'),auth[_0xac7d('0x9')](),controller[_0xac7d('0x18')]);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 53a9c65..131850e 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 _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 +var _0xcc4b=['STRING','DATE','BOOLEAN','sequelize','exports','INTEGER'];(function(_0x11e8e3,_0x36954d){var _0x3e7262=function(_0x38f835){while(--_0x38f835){_0x11e8e3['push'](_0x11e8e3['shift']());}};_0x3e7262(++_0x36954d);}(_0xcc4b,0x19b));var _0xbcc4=function(_0x5ce2e3,_0x3dc503){_0x5ce2e3=_0x5ce2e3-0x0;var _0x3b53ab=_0xcc4b[_0x5ce2e3];return _0x3b53ab;};'use strict';var Sequelize=require(_0xbcc4('0x0'));module[_0xbcc4('0x1')]={'state':{'type':Sequelize[_0xbcc4('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xbcc4('0x3')]},'scheduledat':{'type':Sequelize[_0xbcc4('0x4')]},'countbusyretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xbcc4('0x3')]},'originatecalleridnum':{'type':Sequelize[_0xbcc4('0x3')]},'originatecalleridname':{'type':Sequelize[_0xbcc4('0x3')]},'calleridnum':{'type':Sequelize[_0xbcc4('0x3')]},'calleridname':{'type':Sequelize[_0xbcc4('0x3')]},'starttime':{'type':Sequelize[_0xbcc4('0x4')]},'responsetime':{'type':Sequelize[_0xbcc4('0x4')]},'answertime':{'type':Sequelize[_0xbcc4('0x4')]},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0xbcc4('0x4')]},'ringtime':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xbcc4('0x3')]},'campaign':{'type':Sequelize[_0xbcc4('0x3')]},'campaigntype':{'type':Sequelize[_0xbcc4('0x3')]},'membername':{'type':Sequelize[_0xbcc4('0x3')]},'reason':{'type':Sequelize[_0xbcc4('0x3')]},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize[_0xbcc4('0x5')],'defaultValue':![]},'callback':{'type':Sequelize[_0xbcc4('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xbcc4('0x4')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'editedat':{'type':Sequelize[_0xbcc4('0x4')]},'edited':{'type':Sequelize[_0xbcc4('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xbcc4('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'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 c909fb5..3f7af54 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 _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 +var _0x04f1=['include','create','body','describe','uniqueid','find','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','save','update','then','destroy','stack','name','send','CmHopperHistory','fieldName','type','key','map','query','keys','filters','intersection','attributes','model','fields','length','order','sort','where','pick','filter','merge','options','includeAll','findAll','catch','show','params'];(function(_0xf9b13c,_0x299539){var _0x226bf1=function(_0x21bb9e){while(--_0x21bb9e){_0xf9b13c['push'](_0xf9b13c['shift']());}};_0x226bf1(++_0x299539);}(_0x04f1,0xd5));var _0x104f=function(_0x58a239,_0x54c4d3){_0x58a239=_0x58a239-0x0;var _0x1d185a=_0x04f1[_0x58a239];return _0x1d185a;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x104f('0x0'));var jsonpatch=require(_0x104f('0x1'));var rp=require('request-promise');var moment=require(_0x104f('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x104f('0x3'));var util=require(_0x104f('0x4'));var path=require('path');var sox=require(_0x104f('0x5'));var csv=require(_0x104f('0x6'));var ejs=require(_0x104f('0x7'));var fs=require('fs');var fs_extra=require(_0x104f('0x8'));var _=require(_0x104f('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x104f('0xa'));var deskjs=require(_0x104f('0xb'));var toCsv=require(_0x104f('0x6'));var querystring=require(_0x104f('0xc'));var Papa=require(_0x104f('0xd'));var Redis=require('ioredis');var authService=require(_0x104f('0xe'));var qs=require(_0x104f('0xf'));var as=require(_0x104f('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x104f('0x11'));var config=require(_0x104f('0x12'));var licenseUtil=require(_0x104f('0x13'));var db=require(_0x104f('0x14'))['db'];function respondWithStatusCode(_0x1323d8,_0x498ac2){_0x498ac2=_0x498ac2||0xcc;return function(_0xc0250f){if(_0xc0250f){return _0x1323d8[_0x104f('0x15')](_0x498ac2);}return _0x1323d8[_0x104f('0x16')](_0x498ac2)[_0x104f('0x17')]();};}function respondWithResult(_0x5dc9ef,_0x560957){_0x560957=_0x560957||0xc8;return function(_0x57deda){if(_0x57deda){return _0x5dc9ef['status'](_0x560957)[_0x104f('0x18')](_0x57deda);}};}function respondWithFilteredResult(_0x5abf27,_0x3a0739){return function(_0x48db8c){if(_0x48db8c){var _0x177a2b=typeof _0x3a0739['offset']==='undefined'&&typeof _0x3a0739[_0x104f('0x19')]===_0x104f('0x1a');var _0x1d4942=_0x48db8c[_0x104f('0x1b')];var _0x5bea72=_0x177a2b?0x0:_0x3a0739[_0x104f('0x1c')];var _0x2712f4=_0x177a2b?_0x48db8c[_0x104f('0x1b')]:_0x3a0739[_0x104f('0x1c')]+_0x3a0739['limit'];var _0x49a124;if(_0x2712f4>=_0x1d4942){_0x2712f4=_0x1d4942;_0x49a124=0xc8;}else{_0x49a124=0xce;}_0x5abf27['status'](_0x49a124);return _0x5abf27[_0x104f('0x1d')](_0x104f('0x1e'),_0x5bea72+'-'+_0x2712f4+'/'+_0x1d4942)['json'](_0x48db8c);}return null;};}function patchUpdates(_0x2178c1){return function(_0x2b1a3a){try{jsonpatch['apply'](_0x2b1a3a,_0x2178c1,!![]);}catch(_0x506a8e){return BPromise['reject'](_0x506a8e);}return _0x2b1a3a[_0x104f('0x1f')]();};}function saveUpdates(_0x29d7c4,_0x4cc570){return function(_0x51e297){if(_0x51e297){return _0x51e297[_0x104f('0x20')](_0x29d7c4)[_0x104f('0x21')](function(_0x47f53e){return _0x47f53e;});}return null;};}function removeEntity(_0x3aef62,_0x4fb29c){return function(_0x4e5e23){if(_0x4e5e23){return _0x4e5e23[_0x104f('0x22')]()[_0x104f('0x21')](function(){_0x3aef62[_0x104f('0x16')](0xcc)[_0x104f('0x17')]();});}};}function handleEntityNotFound(_0x4a3f8e,_0x5dc10a){return function(_0x5b35cd){if(!_0x5b35cd){_0x4a3f8e[_0x104f('0x15')](0x194);}return _0x5b35cd;};}function handleError(_0x3ea2f6,_0x17e886){_0x17e886=_0x17e886||0x1f4;return function(_0x2b7cb0){logger['error'](_0x2b7cb0[_0x104f('0x23')]);if(_0x2b7cb0[_0x104f('0x24')]){delete _0x2b7cb0[_0x104f('0x24')];}_0x3ea2f6[_0x104f('0x16')](_0x17e886)[_0x104f('0x25')](_0x2b7cb0);};}exports['index']=function(_0x10b634,_0x22995f){var _0x17fa57={},_0x41a87f={},_0x4d53bc={'count':0x0,'rows':[]};var _0x5d9c5f=_['map'](db[_0x104f('0x26')]['rawAttributes'],function(_0x1796d8){return{'name':_0x1796d8[_0x104f('0x27')],'type':_0x1796d8[_0x104f('0x28')][_0x104f('0x29')]};});_0x41a87f['model']=_[_0x104f('0x2a')](_0x5d9c5f,_0x104f('0x24'));_0x41a87f[_0x104f('0x2b')]=_[_0x104f('0x2c')](_0x10b634[_0x104f('0x2b')]);_0x41a87f[_0x104f('0x2d')]=_[_0x104f('0x2e')](_0x41a87f['model'],_0x41a87f['query']);_0x17fa57[_0x104f('0x2f')]=_[_0x104f('0x2e')](_0x41a87f[_0x104f('0x30')],qs[_0x104f('0x31')](_0x10b634[_0x104f('0x2b')][_0x104f('0x31')]));_0x17fa57[_0x104f('0x2f')]=_0x17fa57['attributes'][_0x104f('0x32')]?_0x17fa57[_0x104f('0x2f')]:_0x41a87f[_0x104f('0x30')];if(!_0x10b634[_0x104f('0x2b')]['hasOwnProperty']('nolimit')){_0x17fa57[_0x104f('0x19')]=qs['limit'](_0x10b634['query'][_0x104f('0x19')]);_0x17fa57[_0x104f('0x1c')]=qs['offset'](_0x10b634['query'][_0x104f('0x1c')]);}_0x17fa57[_0x104f('0x33')]=qs[_0x104f('0x34')](_0x10b634['query']['sort']);_0x17fa57[_0x104f('0x35')]=qs[_0x104f('0x2d')](_[_0x104f('0x36')](_0x10b634[_0x104f('0x2b')],_0x41a87f[_0x104f('0x2d')]),_0x5d9c5f);if(_0x10b634[_0x104f('0x2b')][_0x104f('0x37')]){_0x17fa57[_0x104f('0x35')]=_[_0x104f('0x38')](_0x17fa57[_0x104f('0x35')],{'$or':_[_0x104f('0x2a')](_0x5d9c5f,function(_0x58d4b3){if(_0x58d4b3[_0x104f('0x28')]!=='VIRTUAL'){var _0x4943f0={};_0x4943f0[_0x58d4b3['name']]={'$like':'%'+_0x10b634[_0x104f('0x2b')][_0x104f('0x37')]+'%'};return _0x4943f0;}})});}_0x17fa57=_[_0x104f('0x38')]({},_0x17fa57,_0x10b634[_0x104f('0x39')]);var _0x1ef229={'where':_0x17fa57[_0x104f('0x35')]};return db[_0x104f('0x26')][_0x104f('0x1b')](_0x1ef229)[_0x104f('0x21')](function(_0x58f48e){_0x4d53bc[_0x104f('0x1b')]=_0x58f48e;if(_0x10b634[_0x104f('0x2b')][_0x104f('0x3a')]){_0x17fa57['include']=[{'all':!![]}];}return db[_0x104f('0x26')][_0x104f('0x3b')](_0x17fa57);})['then'](function(_0x3b6729){_0x4d53bc['rows']=_0x3b6729;return _0x4d53bc;})[_0x104f('0x21')](respondWithFilteredResult(_0x22995f,_0x17fa57))[_0x104f('0x3c')](handleError(_0x22995f,null));};exports[_0x104f('0x3d')]=function(_0x2c353b,_0x4ae5bb){var _0x421511={'raw':!![],'where':{'id':_0x2c353b[_0x104f('0x3e')]['id']}},_0x4cc07a={};_0x4cc07a[_0x104f('0x30')]=_[_0x104f('0x2c')](db[_0x104f('0x26')]['rawAttributes']);_0x4cc07a['query']=_['keys'](_0x2c353b[_0x104f('0x2b')]);_0x4cc07a[_0x104f('0x2d')]=_[_0x104f('0x2e')](_0x4cc07a[_0x104f('0x30')],_0x4cc07a[_0x104f('0x2b')]);_0x421511[_0x104f('0x2f')]=_[_0x104f('0x2e')](_0x4cc07a[_0x104f('0x30')],qs[_0x104f('0x31')](_0x2c353b[_0x104f('0x2b')][_0x104f('0x31')]));_0x421511['attributes']=_0x421511[_0x104f('0x2f')][_0x104f('0x32')]?_0x421511[_0x104f('0x2f')]:_0x4cc07a['model'];if(_0x2c353b[_0x104f('0x2b')]['includeAll']){_0x421511[_0x104f('0x3f')]=[{'all':!![]}];}_0x421511=_[_0x104f('0x38')]({},_0x421511,_0x2c353b[_0x104f('0x39')]);return db[_0x104f('0x26')]['find'](_0x421511)[_0x104f('0x21')](handleEntityNotFound(_0x4ae5bb,null))['then'](respondWithResult(_0x4ae5bb,null))[_0x104f('0x3c')](handleError(_0x4ae5bb,null));};exports[_0x104f('0x40')]=function(_0x3ab3af,_0x3def7d){return db[_0x104f('0x26')][_0x104f('0x40')](_0x3ab3af[_0x104f('0x41')],{})[_0x104f('0x21')](respondWithResult(_0x3def7d,0xc9))[_0x104f('0x3c')](handleError(_0x3def7d,null));};exports[_0x104f('0x42')]=function(_0x4be054,_0x26b82c){return db[_0x104f('0x26')]['describe']()['then'](respondWithResult(_0x26b82c,null))[_0x104f('0x3c')](handleError(_0x26b82c,null));};exports['update']=function(_0x18cb63,_0x2dc543){if(_0x18cb63['body'][_0x104f('0x43')]){delete _0x18cb63[_0x104f('0x41')][_0x104f('0x43')];}return db[_0x104f('0x26')][_0x104f('0x44')]({'where':{'uniqueid':_0x18cb63['params']['id']}})['then'](handleEntityNotFound(_0x2dc543,null))[_0x104f('0x21')](saveUpdates(_0x18cb63[_0x104f('0x41')],null))[_0x104f('0x21')](respondWithResult(_0x2dc543,null))[_0x104f('0x3c')](handleError(_0x2dc543,null));}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.model.js b/server/api/cmHopperHistory/cmHopperHistory.model.js index d27282b..4d1c688 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 _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 +var _0xd916=['endtime','uniqueid','lodash','util','../../config/logger','api','moment','request-promise','path','./cmHopperHistory.attributes','exports','define','CmHopperHistory','cm_hopper_history'];(function(_0x4d674b,_0x176474){var _0x535a1f=function(_0xac7726){while(--_0xac7726){_0x4d674b['push'](_0x4d674b['shift']());}};_0x535a1f(++_0x176474);}(_0xd916,0x18a));var _0x6d91=function(_0x5e5cf0,_0x2d97a9){_0x5e5cf0=_0x5e5cf0-0x0;var _0x486355=_0xd916[_0x5e5cf0];return _0x486355;};'use strict';var _=require(_0x6d91('0x0'));var util=require(_0x6d91('0x1'));var logger=require(_0x6d91('0x2'))(_0x6d91('0x3'));var moment=require(_0x6d91('0x4'));var BPromise=require('bluebird');var rp=require(_0x6d91('0x5'));var fs=require('fs');var path=require(_0x6d91('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x6d91('0x7'));module[_0x6d91('0x8')]=function(_0x59c589,_0x1f5cfc){return _0x59c589[_0x6d91('0x9')](_0x6d91('0xa'),attributes,{'tableName':_0x6d91('0xb'),'paranoid':![],'indexes':[{'name':_0x6d91('0xc'),'fields':[_0x6d91('0xc')]},{'name':_0x6d91('0xd'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.rpc.js b/server/api/cmHopperHistory/cmHopperHistory.rpc.js index d6ad14a..a08799c 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 _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 +var _0x0b40=['sequelize','col','predictiveIntervalTotalCalls','COUNT','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundReCallsDay','GetCampaignHopperHistory','findAll','ivrTotalCallsDays','ivrAnswerCallsDay','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','code','CmHopperHistory,\x20%s,\x20%s','message','info','result','catch','CreateCmHopperHistory','CmHopperHistory','create','options','raw','AvgHandleTime','where'];(function(_0x280820,_0xce9bc7){var _0x474787=function(_0x3d224e){while(--_0x3d224e){_0x280820['push'](_0x280820['shift']());}};_0x474787(++_0xce9bc7);}(_0x0b40,0xba));var _0x00b4=function(_0x9c2427,_0x17c865){_0x9c2427=_0x9c2427-0x0;var _0x51984f=_0x0b40[_0x9c2427];return _0x51984f;};'use strict';var _=require('lodash');var util=require(_0x00b4('0x0'));var moment=require(_0x00b4('0x1'));var BPromise=require('bluebird');var rs=require(_0x00b4('0x2'));var fs=require('fs');var Redis=require(_0x00b4('0x3'));var db=require(_0x00b4('0x4'))['db'];var utils=require(_0x00b4('0x5'));var logger=require(_0x00b4('0x6'))(_0x00b4('0x7'));var config=require('../../config/environment');var jayson=require(_0x00b4('0x8'));var client=jayson[_0x00b4('0x9')][_0x00b4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x120157,_0x5684ec,_0x445536){return new BPromise(function(_0x20c810,_0x3f6285){return client['request'](_0x120157,_0x445536)[_0x00b4('0xb')](function(_0x144611){logger['info']('CmHopperHistory,\x20%s,\x20%s',_0x5684ec,_0x00b4('0xc'));logger[_0x00b4('0xd')](_0x00b4('0xe'),_0x5684ec,_0x00b4('0xc'),JSON[_0x00b4('0xf')](_0x144611));if(_0x144611[_0x00b4('0x10')]){if(_0x144611[_0x00b4('0x10')][_0x00b4('0x11')]===0x1f4){logger[_0x00b4('0x10')](_0x00b4('0x12'),_0x5684ec,_0x144611[_0x00b4('0x10')][_0x00b4('0x13')]);return _0x3f6285(_0x144611['error']['message']);}logger[_0x00b4('0x10')](_0x00b4('0x12'),_0x5684ec,_0x144611[_0x00b4('0x10')][_0x00b4('0x13')]);return _0x20c810(_0x144611['error'][_0x00b4('0x13')]);}else{logger[_0x00b4('0x14')](_0x00b4('0x12'),_0x5684ec,_0x00b4('0xc'));_0x20c810(_0x144611[_0x00b4('0x15')][_0x00b4('0x13')]);}})[_0x00b4('0x16')](function(_0x56e54c){logger[_0x00b4('0x10')](_0x00b4('0x12'),_0x5684ec,_0x56e54c);_0x3f6285(_0x56e54c);});});}exports[_0x00b4('0x17')]=function(_0x3f4b1d){var _0x24a5be=this;return new Promise(function(_0x5d960a,_0x265dbd){return db[_0x00b4('0x18')][_0x00b4('0x19')](_0x3f4b1d['body'],{'raw':_0x3f4b1d[_0x00b4('0x1a')]?_0x3f4b1d[_0x00b4('0x1a')][_0x00b4('0x1b')]===undefined?!![]:![]:!![]})[_0x00b4('0xb')](function(_0xa7462a){logger['info']('CreateCmHopperHistory',_0x3f4b1d);logger[_0x00b4('0xd')](_0x00b4('0x17'),_0x3f4b1d,JSON[_0x00b4('0xf')](_0xa7462a));_0x5d960a(_0xa7462a);})[_0x00b4('0x16')](function(_0x3be8ee){logger['error'](_0x00b4('0x17'),_0x3be8ee[_0x00b4('0x13')],_0x3f4b1d);_0x265dbd(_0x24a5be['error'](0x1f4,_0x3be8ee[_0x00b4('0x13')]));});});};exports[_0x00b4('0x1c')]=function(_0xa924e2){var _0x5bd552=this;return new Promise(function(_0x130984,_0x2d8063){return db[_0x00b4('0x18')]['findAll']({'raw':_0xa924e2['options']?_0xa924e2[_0x00b4('0x1a')][_0x00b4('0x1b')]===undefined?!![]:![]:!![],'where':_0xa924e2[_0x00b4('0x1a')]?_0xa924e2[_0x00b4('0x1a')][_0x00b4('0x1d')]||null:null,'attributes':[[db[_0x00b4('0x1e')]['fn']('COUNT',db[_0x00b4('0x1e')][_0x00b4('0x1f')]('id')),_0x00b4('0x20')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x23')))),_0x00b4('0x24')],[db[_0x00b4('0x1e')]['fn']('COUNT',db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x25')))),_0x00b4('0x26')],[db['sequelize']['fn'](_0x00b4('0x21'),db['sequelize']['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')]('`state`\x20=\x2011,\x201,\x20null'))),_0x00b4('0x27')],[db['sequelize']['fn']('AVG',db['sequelize']['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x28')))),_0x00b4('0x29')],[db['sequelize']['fn']('AVG',db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x2a')))),_0x00b4('0x2b')]]})[_0x00b4('0xb')](function(_0x5c6e09){logger[_0x00b4('0x14')](_0x00b4('0x1c'),_0xa924e2);logger['debug']('AvgHandleTime',_0xa924e2,JSON[_0x00b4('0xf')](_0x5c6e09));_0x130984(_0x5c6e09);})['catch'](function(_0x5b974c){logger[_0x00b4('0x10')](_0x00b4('0x1c'),_0x5b974c[_0x00b4('0x13')],_0xa924e2);_0x2d8063(_0x5bd552['error'](0x1f4,_0x5b974c[_0x00b4('0x13')]));});});};exports[_0x00b4('0x2c')]=function(_0x171aa3){var _0x43eb92=this;return new Promise(function(_0x59c22c,_0x3f35cd){return db[_0x00b4('0x18')]['findAll']({'raw':_0x171aa3[_0x00b4('0x1a')]?_0x171aa3[_0x00b4('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x171aa3[_0x00b4('0x1a')]?_0x171aa3['options'][_0x00b4('0x1d')]||null:null,'attributes':[[_0x00b4('0x2d'),_0x00b4('0x2e')],[db['sequelize']['fn']('COUNT',db[_0x00b4('0x1e')]['fn']('IF',db['sequelize'][_0x00b4('0x22')](_0x00b4('0x2f')))),_0x00b4('0x30')],[db[_0x00b4('0x1e')]['fn']('COUNT',db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x31')))),_0x00b4('0x32')],[db['sequelize']['fn']('COUNT',db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x23')))),_0x00b4('0x33')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db['sequelize'][_0x00b4('0x22')](_0x00b4('0x34')))),_0x00b4('0x35')],[db['sequelize']['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x36')))),'outboundCongestionCallsDay'],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x37')))),_0x00b4('0x38')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x39')))),_0x00b4('0x3a')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')]('`state`\x20=\x2012,\x201,\x20null'))),_0x00b4('0x3b')],[db['sequelize']['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x3c')))),_0x00b4('0x3d')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')]('`state`\x20=\x2014,\x201,\x20null'))),'outboundOriginateFailureCallsDay'],[db[_0x00b4('0x1e')]['fn']('COUNT',db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')]['literal'](_0x00b4('0x3e')))),_0x00b4('0x3f')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db['sequelize'][_0x00b4('0x22')](_0x00b4('0x40')))),_0x00b4('0x41')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')]['literal'](_0x00b4('0x42')))),_0x00b4('0x3f')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0x00b4('0x43')]],'group':[_0x00b4('0x2d')]})[_0x00b4('0xb')](function(_0x1ce6cc){logger[_0x00b4('0x14')](_0x00b4('0x2c'),_0x171aa3);logger[_0x00b4('0xd')](_0x00b4('0x2c'),_0x171aa3,JSON[_0x00b4('0xf')](_0x1ce6cc));_0x59c22c(_0x1ce6cc);})[_0x00b4('0x16')](function(_0x1922d){logger[_0x00b4('0x10')](_0x00b4('0x2c'),_0x1922d[_0x00b4('0x13')],_0x171aa3);_0x3f35cd(_0x43eb92[_0x00b4('0x10')](0x1f4,_0x1922d['message']));});});};exports[_0x00b4('0x44')]=function(_0x3d790c){var _0x1e5d51=this;return new Promise(function(_0x4b4821,_0x473e0c){return db[_0x00b4('0x18')][_0x00b4('0x45')]({'raw':_0x3d790c['options']?_0x3d790c[_0x00b4('0x1a')][_0x00b4('0x1b')]===undefined?!![]:![]:!![],'where':_0x3d790c['options']?_0x3d790c[_0x00b4('0x1a')][_0x00b4('0x1d')]||null:null,'attributes':[[_0x00b4('0x2d'),_0x00b4('0x2e')],[db['sequelize']['fn']('COUNT',db[_0x00b4('0x1e')]['col']('id')),_0x00b4('0x46')],[db[_0x00b4('0x1e')]['fn'](_0x00b4('0x21'),db[_0x00b4('0x1e')]['fn']('IF',db[_0x00b4('0x1e')][_0x00b4('0x22')](_0x00b4('0x23')))),_0x00b4('0x47')]],'group':[_0x00b4('0x2d')]})['then'](function(_0x522640){logger[_0x00b4('0x14')](_0x00b4('0x44'),_0x3d790c);logger['debug'](_0x00b4('0x44'),_0x3d790c,JSON[_0x00b4('0xf')](_0x522640));_0x4b4821(_0x522640);})[_0x00b4('0x16')](function(_0x10007c){logger[_0x00b4('0x10')]('GetCampaignHopperHistory',_0x10007c[_0x00b4('0x13')],_0x3d790c);_0x473e0c(_0x1e5d51[_0x00b4('0x10')](0x1f4,_0x10007c['message']));});});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/index.js b/server/api/cmHopperHistory/index.js index ff15c9f..7333395 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 _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 +var _0x5636=['get','isAuthenticated','describe','/:id','show','post','put','update','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperHistory.controller'];(function(_0x2a5738,_0x209138){var _0x11f2b6=function(_0x3a01ab){while(--_0x3a01ab){_0x2a5738['push'](_0x2a5738['shift']());}};_0x11f2b6(++_0x209138);}(_0x5636,0x171));var _0x6563=function(_0x2d7565,_0x4c3792){_0x2d7565=_0x2d7565-0x0;var _0x74b6b=_0x5636[_0x2d7565];return _0x74b6b;};'use strict';var multer=require(_0x6563('0x0'));var util=require(_0x6563('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x6563('0x2'));var router=express[_0x6563('0x3')]();var fs_extra=require(_0x6563('0x4'));var auth=require(_0x6563('0x5'));var interaction=require(_0x6563('0x6'));var config=require(_0x6563('0x7'));var controller=require(_0x6563('0x8'));router[_0x6563('0x9')]('/',auth[_0x6563('0xa')](),controller['index']);router[_0x6563('0x9')]('/describe',auth[_0x6563('0xa')](),controller[_0x6563('0xb')]);router[_0x6563('0x9')](_0x6563('0xc'),auth['isAuthenticated'](),controller[_0x6563('0xd')]);router[_0x6563('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x6563('0xf')](_0x6563('0xc'),auth[_0x6563('0xa')](),controller[_0x6563('0x10')]);module[_0x6563('0x11')]=router; \ No newline at end of file diff --git a/server/api/cmList/cmList.attributes.js b/server/api/cmList/cmList.attributes.js index 36b5a1d..35758bd 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 _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 +var _0x0845=['name','STRING','sequelize'];(function(_0x3f66c7,_0x38ecd5){var _0x27843a=function(_0x44094d){while(--_0x44094d){_0x3f66c7['push'](_0x3f66c7['shift']());}};_0x27843a(++_0x38ecd5);}(_0x0845,0x125));var _0x5084=function(_0x4a4ef6,_0x1a3b21){_0x4a4ef6=_0x4a4ef6-0x0;var _0xa82e70=_0x0845[_0x4a4ef6];return _0xa82e70;};'use strict';var Sequelize=require(_0x5084('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x5084('0x1'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x5084('0x2')]},'dialPrefix':{'type':Sequelize[_0x5084('0x2')]}}; \ No newline at end of file diff --git a/server/api/cmList/cmList.controller.js b/server/api/cmList/cmList.controller.js index 5afdbfb..d57fca4 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 _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 +var _0x8f67=['reject','save','update','then','get','Lists','UserProfileResource','destroy','error','stack','name','send','index','map','CmList','rawAttributes','key','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','findAll','rows','catch','show','params','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','ListId','getDispositions','keys','hasOwnProperty','removeDispositions','ids','CmContact','tags','join','isArray','push','each','omit','success','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','CustomFields','concat','format','cf_%d','getContactsCsv','now','/tmp/list_%d_%s.csv','setHeader','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','Content-type','text/csv','findOne','sequelize','transaction','Sequelize','TEXT','type','text','number','INTEGER','switch','BOOLEAN','defaultValue','queryInterface','cm_contacts','cf_%s','getCustomFields','findAndCountAll','addAgents','emit','userCmList:save','removeAgents','userCmList:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','./cmList.socket','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply'];(function(_0x22ac5a,_0x1851d4){var _0xf143ea=function(_0x15f19d){while(--_0x15f19d){_0x22ac5a['push'](_0x22ac5a['shift']());}};_0xf143ea(++_0x1851d4);}(_0x8f67,0xfb));var _0x78f6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8f67[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x78f6('0x0'));var rimraf=require(_0x78f6('0x1'));var zipdir=require(_0x78f6('0x2'));var jsonpatch=require(_0x78f6('0x3'));var rp=require(_0x78f6('0x4'));var moment=require('moment');var BPromise=require(_0x78f6('0x5'));var Mustache=require('mustache');var util=require(_0x78f6('0x6'));var path=require(_0x78f6('0x7'));var sox=require(_0x78f6('0x8'));var csv=require(_0x78f6('0x9'));var ejs=require(_0x78f6('0xa'));var fs=require('fs');var fs_extra=require(_0x78f6('0xb'));var _=require(_0x78f6('0xc'));var squel=require(_0x78f6('0xd'));var crypto=require(_0x78f6('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x78f6('0xf'));var toCsv=require(_0x78f6('0x9'));var querystring=require(_0x78f6('0x10'));var Papa=require(_0x78f6('0x11'));var Redis=require(_0x78f6('0x12'));var authService=require(_0x78f6('0x13'));var qs=require(_0x78f6('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x78f6('0x15'));var logger=require(_0x78f6('0x16'))(_0x78f6('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x78f6('0x18'))['db'];config[_0x78f6('0x19')]=_[_0x78f6('0x1a')](config[_0x78f6('0x19')],{'host':_0x78f6('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x78f6('0x19')]));require(_0x78f6('0x1c'))['register'](socket);function respondWithStatusCode(_0xc0949e,_0x424a50){_0x424a50=_0x424a50||0xcc;return function(_0x246b4a){if(_0x246b4a){return _0xc0949e[_0x78f6('0x1d')](_0x424a50);}return _0xc0949e[_0x78f6('0x1e')](_0x424a50)['end']();};}function respondWithResult(_0xeb7675,_0x1bd30e){_0x1bd30e=_0x1bd30e||0xc8;return function(_0x4b9520){if(_0x4b9520){return _0xeb7675[_0x78f6('0x1e')](_0x1bd30e)[_0x78f6('0x1f')](_0x4b9520);}};}function respondWithFilteredResult(_0x44862d,_0xfe897a){return function(_0x6f26bb){if(_0x6f26bb){var _0x8e5323=typeof _0xfe897a[_0x78f6('0x20')]===_0x78f6('0x21')&&typeof _0xfe897a['limit']===_0x78f6('0x21');var _0x41ada3=_0x6f26bb[_0x78f6('0x22')];var _0x580098=_0x8e5323?0x0:_0xfe897a['offset'];var _0x21b428=_0x8e5323?_0x6f26bb[_0x78f6('0x22')]:_0xfe897a['offset']+_0xfe897a[_0x78f6('0x23')];var _0x39bb8b;if(_0x21b428>=_0x41ada3){_0x21b428=_0x41ada3;_0x39bb8b=0xc8;}else{_0x39bb8b=0xce;}_0x44862d['status'](_0x39bb8b);return _0x44862d[_0x78f6('0x24')](_0x78f6('0x25'),_0x580098+'-'+_0x21b428+'/'+_0x41ada3)[_0x78f6('0x1f')](_0x6f26bb);}return null;};}function patchUpdates(_0x54c6da){return function(_0x48a854){try{jsonpatch[_0x78f6('0x26')](_0x48a854,_0x54c6da,!![]);}catch(_0x5923b7){return BPromise[_0x78f6('0x27')](_0x5923b7);}return _0x48a854[_0x78f6('0x28')]();};}function saveUpdates(_0x4633b8,_0x459a87){return function(_0x4c1944){if(_0x4c1944){return _0x4c1944[_0x78f6('0x29')](_0x4633b8)[_0x78f6('0x2a')](function(_0x269708){return _0x269708;});}return null;};}function removeEntity(_0x3dce7e,_0x42be27){return function(_0x226d45){if(_0x226d45){return _0x226d45['destroy']()[_0x78f6('0x2a')](function(){var _0x46db32=_0x226d45[_0x78f6('0x2b')]({'plain':!![]});var _0x1e872a=_0x78f6('0x2c');return db[_0x78f6('0x2d')][_0x78f6('0x2e')]({'where':{'type':_0x1e872a,'resourceId':_0x46db32['id']}})[_0x78f6('0x2a')](function(){return _0x226d45;});})['then'](function(){_0x3dce7e[_0x78f6('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5cf76a,_0x56c9d7){return function(_0x3bbad7){if(!_0x3bbad7){_0x5cf76a[_0x78f6('0x1d')](0x194);}return _0x3bbad7;};}function handleError(_0x572ebc,_0x1c59b6){_0x1c59b6=_0x1c59b6||0x1f4;return function(_0x344a1a){logger[_0x78f6('0x2f')](_0x344a1a[_0x78f6('0x30')]);if(_0x344a1a['name']){delete _0x344a1a[_0x78f6('0x31')];}_0x572ebc['status'](_0x1c59b6)[_0x78f6('0x32')](_0x344a1a);};}exports[_0x78f6('0x33')]=function(_0x4018ba,_0x5e27d5){var _0x54f9cc={},_0x44f2c9={},_0x126747={'count':0x0,'rows':[]};var _0x40790c=_[_0x78f6('0x34')](db[_0x78f6('0x35')][_0x78f6('0x36')],function(_0x3048c5){return{'name':_0x3048c5['fieldName'],'type':_0x3048c5['type'][_0x78f6('0x37')]};});_0x44f2c9[_0x78f6('0x38')]=_['map'](_0x40790c,'name');_0x44f2c9['query']=_['keys'](_0x4018ba[_0x78f6('0x39')]);_0x44f2c9[_0x78f6('0x3a')]=_[_0x78f6('0x3b')](_0x44f2c9[_0x78f6('0x38')],_0x44f2c9[_0x78f6('0x39')]);_0x54f9cc[_0x78f6('0x3c')]=_['intersection'](_0x44f2c9['model'],qs[_0x78f6('0x3d')](_0x4018ba[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x54f9cc[_0x78f6('0x3c')]=_0x54f9cc[_0x78f6('0x3c')][_0x78f6('0x3e')]?_0x54f9cc[_0x78f6('0x3c')]:_0x44f2c9[_0x78f6('0x38')];if(!_0x4018ba[_0x78f6('0x39')]['hasOwnProperty'](_0x78f6('0x3f'))){_0x54f9cc[_0x78f6('0x23')]=qs['limit'](_0x4018ba[_0x78f6('0x39')]['limit']);_0x54f9cc['offset']=qs[_0x78f6('0x20')](_0x4018ba[_0x78f6('0x39')][_0x78f6('0x20')]);}_0x54f9cc[_0x78f6('0x40')]=qs[_0x78f6('0x41')](_0x4018ba['query'][_0x78f6('0x41')]);_0x54f9cc['where']=qs[_0x78f6('0x3a')](_[_0x78f6('0x42')](_0x4018ba[_0x78f6('0x39')],_0x44f2c9[_0x78f6('0x3a')]),_0x40790c);if(_0x4018ba['query'][_0x78f6('0x43')]){_0x54f9cc[_0x78f6('0x44')]=_['merge'](_0x54f9cc[_0x78f6('0x44')],{'$or':_['map'](_0x40790c,function(_0x2bbb58){if(_0x2bbb58['type']!==_0x78f6('0x45')){var _0x1a61a2={};_0x1a61a2[_0x2bbb58[_0x78f6('0x31')]]={'$like':'%'+_0x4018ba[_0x78f6('0x39')][_0x78f6('0x43')]+'%'};return _0x1a61a2;}})});}_0x54f9cc=_[_0x78f6('0x46')]({},_0x54f9cc,_0x4018ba[_0x78f6('0x47')]);var _0x332de2={'where':_0x54f9cc[_0x78f6('0x44')]};return db[_0x78f6('0x35')][_0x78f6('0x22')](_0x332de2)[_0x78f6('0x2a')](function(_0x36b41e){_0x126747[_0x78f6('0x22')]=_0x36b41e;if(_0x4018ba['query'][_0x78f6('0x48')]){_0x54f9cc['include']=[{'all':!![]}];}return db[_0x78f6('0x35')][_0x78f6('0x49')](_0x54f9cc);})['then'](function(_0x58e259){_0x126747[_0x78f6('0x4a')]=_0x58e259;return _0x126747;})[_0x78f6('0x2a')](respondWithFilteredResult(_0x5e27d5,_0x54f9cc))[_0x78f6('0x4b')](handleError(_0x5e27d5,null));};exports[_0x78f6('0x4c')]=function(_0xf9564d,_0x1192e0){var _0x51dd9a={'raw':![],'where':{'id':_0xf9564d[_0x78f6('0x4d')]['id']}},_0x19167e={};_0x19167e[_0x78f6('0x38')]=_['keys'](db[_0x78f6('0x35')][_0x78f6('0x36')]);_0x19167e[_0x78f6('0x39')]=_['keys'](_0xf9564d[_0x78f6('0x39')]);_0x19167e[_0x78f6('0x3a')]=_[_0x78f6('0x3b')](_0x19167e[_0x78f6('0x38')],_0x19167e[_0x78f6('0x39')]);_0x51dd9a[_0x78f6('0x3c')]=_[_0x78f6('0x3b')](_0x19167e['model'],qs[_0x78f6('0x3d')](_0xf9564d[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x51dd9a[_0x78f6('0x3c')]=_0x51dd9a[_0x78f6('0x3c')]['length']?_0x51dd9a[_0x78f6('0x3c')]:_0x19167e[_0x78f6('0x38')];if(_0xf9564d['query'][_0x78f6('0x48')]){_0x51dd9a[_0x78f6('0x4e')]=[{'all':!![]}];}_0x51dd9a=_[_0x78f6('0x46')]({},_0x51dd9a,_0xf9564d[_0x78f6('0x47')]);return db[_0x78f6('0x35')][_0x78f6('0x4f')](_0x51dd9a)[_0x78f6('0x2a')](handleEntityNotFound(_0x1192e0,null))[_0x78f6('0x2a')](respondWithResult(_0x1192e0,null))[_0x78f6('0x4b')](handleError(_0x1192e0,null));};exports[_0x78f6('0x50')]=function(_0x211a22,_0x322895){return db['CmList'][_0x78f6('0x50')](_0x211a22['body'],{})[_0x78f6('0x2a')](function(_0x14be32){var _0x4f0333=_0x211a22[_0x78f6('0x51')][_0x78f6('0x2b')]({'plain':!![]});if(!_0x4f0333)throw new Error(_0x78f6('0x52'));if(_0x4f0333[_0x78f6('0x53')]===_0x78f6('0x51')){var _0x572b7c=_0x14be32[_0x78f6('0x2b')]({'plain':!![]});var _0x501d28=_0x78f6('0x2c');return db[_0x78f6('0x54')][_0x78f6('0x4f')]({'where':{'name':_0x501d28,'userProfileId':_0x4f0333[_0x78f6('0x55')]},'raw':!![]})[_0x78f6('0x2a')](function(_0x29adf7){if(_0x29adf7&&_0x29adf7['autoAssociation']===0x0){return db[_0x78f6('0x2d')][_0x78f6('0x50')]({'name':_0x572b7c[_0x78f6('0x31')],'resourceId':_0x572b7c['id'],'type':_0x29adf7['name'],'sectionId':_0x29adf7['id']},{})[_0x78f6('0x2a')](function(){return _0x14be32;});}else{return _0x14be32;}})['catch'](function(_0x4515aa){logger[_0x78f6('0x2f')](_0x78f6('0x56'),_0x4515aa);throw _0x4515aa;});}return _0x14be32;})[_0x78f6('0x2a')](respondWithResult(_0x322895,0xc9))[_0x78f6('0x4b')](handleError(_0x322895,null));};exports[_0x78f6('0x29')]=function(_0x3b5f6f,_0x5c4284){if(_0x3b5f6f[_0x78f6('0x57')]['id']){delete _0x3b5f6f[_0x78f6('0x57')]['id'];}return db['CmList'][_0x78f6('0x4f')]({'where':{'id':_0x3b5f6f[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x5c4284,null))[_0x78f6('0x2a')](saveUpdates(_0x3b5f6f[_0x78f6('0x57')],null))[_0x78f6('0x2a')](respondWithResult(_0x5c4284,null))['catch'](handleError(_0x5c4284,null));};exports['destroy']=function(_0x4ace46,_0x297952){return db['CmList'][_0x78f6('0x4f')]({'where':{'id':_0x4ace46[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x297952,null))[_0x78f6('0x2a')](removeEntity(_0x297952,null))[_0x78f6('0x4b')](handleError(_0x297952,null));};exports[_0x78f6('0x58')]=function(_0x5972ec,_0x7116c1){return db[_0x78f6('0x35')][_0x78f6('0x58')]()[_0x78f6('0x2a')](respondWithResult(_0x7116c1,null))[_0x78f6('0x4b')](handleError(_0x7116c1,null));};exports['addDisposition']=function(_0x41a6eb,_0x3232e0,_0x41e038){if(_0x41a6eb[_0x78f6('0x57')]['id']){delete _0x41a6eb[_0x78f6('0x57')]['id'];}return db[_0x78f6('0x35')]['find']({'where':{'id':_0x41a6eb[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x3232e0,null))['then'](function(_0x62a83b){if(_0x62a83b){_0x41a6eb[_0x78f6('0x57')][_0x78f6('0x59')]=_0x62a83b['id'];return db['Disposition'][_0x78f6('0x50')](_0x41a6eb[_0x78f6('0x57')]);}})[_0x78f6('0x2a')](respondWithResult(_0x3232e0,null))['catch'](handleError(_0x3232e0,null));};exports[_0x78f6('0x5a')]=function(_0xf8f05f,_0x194f7e,_0x5b93c7){var _0x4f5972={'raw':![],'where':{}};var _0x3b872b={};var _0x58f29f={'count':0x0,'rows':[]};return db[_0x78f6('0x35')]['findOne']({'where':{'id':_0xf8f05f[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x194f7e,null))[_0x78f6('0x2a')](function(_0x99b5ea){if(_0x99b5ea){_0x3b872b['model']=_[_0x78f6('0x5b')](db['Disposition']['rawAttributes']);_0x3b872b['query']=_[_0x78f6('0x5b')](_0xf8f05f['query']);_0x3b872b['filters']=_[_0x78f6('0x3b')](_0x3b872b[_0x78f6('0x38')],_0x3b872b[_0x78f6('0x39')]);_0x4f5972[_0x78f6('0x3c')]=_[_0x78f6('0x3b')](_0x3b872b[_0x78f6('0x38')],qs[_0x78f6('0x3d')](_0xf8f05f[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x4f5972['attributes']=_0x4f5972[_0x78f6('0x3c')]['length']?_0x4f5972[_0x78f6('0x3c')]:_0x3b872b['model'];if(!_0xf8f05f['query'][_0x78f6('0x5c')]('nolimit')){_0x4f5972[_0x78f6('0x23')]=qs[_0x78f6('0x23')](_0xf8f05f[_0x78f6('0x39')][_0x78f6('0x23')]);_0x4f5972[_0x78f6('0x20')]=qs[_0x78f6('0x20')](_0xf8f05f[_0x78f6('0x39')][_0x78f6('0x20')]);}_0x4f5972['order']=qs[_0x78f6('0x41')](_0xf8f05f['query'][_0x78f6('0x41')]);_0x4f5972[_0x78f6('0x44')]=qs['filters'](_['pick'](_0xf8f05f[_0x78f6('0x39')],_0x3b872b[_0x78f6('0x3a')]));_0x4f5972[_0x78f6('0x44')][_0x78f6('0x59')]=_0x99b5ea['id'];if(_0xf8f05f['query'][_0x78f6('0x43')]){_0x4f5972[_0x78f6('0x44')]=_[_0x78f6('0x46')](_0x4f5972[_0x78f6('0x44')],{'$or':_['map'](_0x4f5972[_0x78f6('0x3c')],function(_0x1fffd4){var _0x125a6f={};_0x125a6f[_0x1fffd4]={'$like':'%'+_0xf8f05f[_0x78f6('0x39')]['filter']+'%'};return _0x125a6f;})});}_0x4f5972=_['merge']({},_0x4f5972,_0xf8f05f[_0x78f6('0x47')]);return db['Disposition'][_0x78f6('0x22')]({'where':_0x4f5972[_0x78f6('0x44')]})[_0x78f6('0x2a')](function(_0x33c69e){_0x58f29f[_0x78f6('0x22')]=_0x33c69e;if(_0xf8f05f[_0x78f6('0x39')][_0x78f6('0x48')]){_0x4f5972[_0x78f6('0x4e')]=[{'all':!![]}];}return db['Disposition'][_0x78f6('0x49')](_0x4f5972);})[_0x78f6('0x2a')](function(_0xdd030a){_0x58f29f['rows']=_0xdd030a;return _0x58f29f;});}})['then'](respondWithFilteredResult(_0x194f7e,_0x4f5972))[_0x78f6('0x4b')](handleError(_0x194f7e,null));};exports[_0x78f6('0x5d')]=function(_0x292f16,_0x3cea26,_0x450241){return db['CmList'][_0x78f6('0x4f')]({'where':{'id':_0x292f16[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x3cea26,null))[_0x78f6('0x2a')](function(_0x5610d3){if(_0x5610d3){return _0x5610d3['removeDispositions'](_0x292f16['query'][_0x78f6('0x5e')]);}})[_0x78f6('0x2a')](respondWithStatusCode(_0x3cea26,null))[_0x78f6('0x4b')](handleError(_0x3cea26,null));};exports['addContacts']=function(_0x1ae675,_0x186ef4,_0x3e9404){return db[_0x78f6('0x35')][_0x78f6('0x4f')]({'where':{'id':_0x1ae675[_0x78f6('0x4d')]['id']}})['then'](handleEntityNotFound(_0x186ef4,null))[_0x78f6('0x2a')](function(_0x1431dc){if(_0x1431dc){var _0x465c83=[];var _0x561fb6={'success':[],'errors':[]};return db[_0x78f6('0x5f')][_0x78f6('0x58')]()[_0x78f6('0x2a')](function(_0x528004){if(_0x1ae675[_0x78f6('0x57')]['tags']&&_['isArray'](_0x1ae675['body'][_0x78f6('0x60')])){if(_0x1ae675['body'][_0x78f6('0x60')]['length']){_0x1ae675[_0x78f6('0x57')][_0x78f6('0x60')]=_0x1ae675[_0x78f6('0x57')]['tags'][_0x78f6('0x61')](';')+';';}else{_0x1ae675[_0x78f6('0x57')]['tags']=null;}}else{_0x1ae675[_0x78f6('0x57')][_0x78f6('0x60')]=null;}if(_0x1ae675[_0x78f6('0x57')]&&_[_0x78f6('0x62')](_0x1ae675['body'])){for(var _0x5887a8=0x0;_0x5887a8<_0x1ae675[_0x78f6('0x57')][_0x78f6('0x3e')];_0x5887a8+=0x1){_0x1ae675['body'][_0x5887a8]['ListId']=_0x1ae675[_0x78f6('0x4d')]['id'];_0x465c83[_0x78f6('0x63')](_0x1ae675[_0x78f6('0x57')][_0x5887a8]);}return BPromise[_0x78f6('0x64')](_0x465c83,function(_0x5bec09){return db[_0x78f6('0x5f')]['create'](_[_0x78f6('0x65')](_0x5bec09,[_0x78f6('0x5e'),'id'])||{},{'fields':_['keys'](_0x528004),'raw':!![]})[_0x78f6('0x2a')](function(_0x5c3a72){_0x561fb6[_0x78f6('0x66')]['push'](_0x5c3a72[_0x78f6('0x67')]);})[_0x78f6('0x4b')](function(_0x2c8741){_0x561fb6[_0x78f6('0x68')][_0x78f6('0x63')]({'data':_0x5bec09,'error':_0x2c8741[_0x78f6('0x69')]});});})[_0x78f6('0x2a')](function(_0x1efce0){return _0x561fb6;})[_0x78f6('0x4b')](function(_0xc444f4){return _0xc444f4;});}else{_0x186ef4[_0x78f6('0x1e')](0x190)['json']({'message':_0x78f6('0x6a')});}});}})[_0x78f6('0x2a')](respondWithResult(_0x186ef4,null))[_0x78f6('0x4b')](handleError(_0x186ef4,null));};exports[_0x78f6('0x6b')]=function(_0x3b5b6d,_0x2ef987,_0x59edd7){var _0x4552b2;return db[_0x78f6('0x35')][_0x78f6('0x4f')]({'where':{'id':_0x3b5b6d[_0x78f6('0x4d')]['id']},'include':[{'model':db[_0x78f6('0x6c')],'as':_0x78f6('0x6d')}]})[_0x78f6('0x2a')](handleEntityNotFound(_0x2ef987,null))[_0x78f6('0x2a')](function(_0x3fc669){if(_0x3fc669){_0x4552b2=_0x3fc669;return db[_0x78f6('0x5f')]['rawAttributes'];}})[_0x78f6('0x2a')](function(_0x47fbdb){if(_0x47fbdb){var _0x4bdb8d={};var _0x3f1c32={};_0x3f1c32[_0x78f6('0x38')]=_[_0x78f6('0x6e')](_['keys'](_0x47fbdb),_['map'](_0x4552b2['CustomFields'],function(_0x4d9b16){return util[_0x78f6('0x6f')](_0x78f6('0x70'),_0x4d9b16['id']);}));_0x3f1c32[_0x78f6('0x39')]=_[_0x78f6('0x5b')](_0x3b5b6d['query']);_0x3f1c32[_0x78f6('0x3a')]=_[_0x78f6('0x3b')](_0x3f1c32[_0x78f6('0x38')],_0x3f1c32[_0x78f6('0x39')]);_0x4bdb8d[_0x78f6('0x3c')]=_['intersection'](_0x3f1c32['model'],qs[_0x78f6('0x3d')](_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x4bdb8d['attributes']=_0x4bdb8d['attributes'][_0x78f6('0x3e')]?_0x4bdb8d[_0x78f6('0x3c')]:_0x3f1c32[_0x78f6('0x38')];if(!_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x5c')](_0x78f6('0x3f'))){_0x4bdb8d[_0x78f6('0x23')]=qs['limit'](_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x23')]);_0x4bdb8d[_0x78f6('0x20')]=qs[_0x78f6('0x20')](_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x20')]);}_0x4bdb8d[_0x78f6('0x40')]=qs[_0x78f6('0x41')](_0x3b5b6d[_0x78f6('0x39')]['sort']);_0x4bdb8d[_0x78f6('0x44')]=qs[_0x78f6('0x3a')](_[_0x78f6('0x42')](_0x3b5b6d[_0x78f6('0x39')],_0x3f1c32[_0x78f6('0x3a')]));_0x4bdb8d['raw']=!![];if(_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x43')]){_0x4bdb8d['where']=_[_0x78f6('0x46')](_0x4bdb8d[_0x78f6('0x44')],{'$or':_[_0x78f6('0x34')](_0x4bdb8d[_0x78f6('0x3c')],function(_0x168734){var _0x38daf6={};_0x38daf6[_0x168734]={'$like':'%'+_0x3b5b6d[_0x78f6('0x39')][_0x78f6('0x43')]+'%'};return _0x38daf6;})});}_0x4bdb8d=_[_0x78f6('0x46')]({},_0x4bdb8d,_0x3b5b6d[_0x78f6('0x47')]);return _0x4552b2[_0x78f6('0x6b')](_0x4bdb8d);}})[_0x78f6('0x2a')](respondWithResult(_0x2ef987,null))[_0x78f6('0x4b')](handleError(_0x2ef987,null));};exports[_0x78f6('0x71')]=function(_0x1b6855,_0x59a859,_0x329396){var _0x32f914;return db[_0x78f6('0x35')][_0x78f6('0x4f')]({'where':{'id':_0x1b6855['params']['id']},'include':[{'model':db[_0x78f6('0x6c')],'as':_0x78f6('0x6d')}]})['then'](handleEntityNotFound(_0x59a859,null))['then'](function(_0x4de8bc){if(_0x4de8bc){_0x32f914=_0x4de8bc;return db[_0x78f6('0x5f')]['rawAttributes'];}})[_0x78f6('0x2a')](function(_0x1e058e){if(_0x1e058e){var _0x53fd3d={};var _0xac04a={};_0xac04a['model']=_[_0x78f6('0x6e')](_[_0x78f6('0x5b')](_0x1e058e),_[_0x78f6('0x34')](_0x32f914[_0x78f6('0x6d')],function(_0x1619bd){return util[_0x78f6('0x6f')](_0x78f6('0x70'),_0x1619bd['id']);}));_0xac04a[_0x78f6('0x39')]=_[_0x78f6('0x5b')](_0x1b6855['query']);_0xac04a[_0x78f6('0x3a')]=_[_0x78f6('0x3b')](_0xac04a[_0x78f6('0x38')],_0xac04a[_0x78f6('0x39')]);_0x53fd3d['attributes']=_[_0x78f6('0x3b')](_0xac04a[_0x78f6('0x38')],qs[_0x78f6('0x3d')](_0x1b6855['query'][_0x78f6('0x3d')]));_0x53fd3d['attributes']=_0x53fd3d[_0x78f6('0x3c')][_0x78f6('0x3e')]?_0x53fd3d['attributes']:_0xac04a[_0x78f6('0x38')];if(!_0x1b6855[_0x78f6('0x39')]['hasOwnProperty']('nolimit')){_0x53fd3d['limit']=qs[_0x78f6('0x23')](_0x1b6855['query'][_0x78f6('0x23')]);_0x53fd3d[_0x78f6('0x20')]=qs[_0x78f6('0x20')](_0x1b6855['query'][_0x78f6('0x20')]);}_0x53fd3d['order']=qs['sort'](_0x1b6855[_0x78f6('0x39')]['sort']);_0x53fd3d[_0x78f6('0x44')]=qs['filters'](_[_0x78f6('0x42')](_0x1b6855[_0x78f6('0x39')],_0xac04a['filters']));_0x53fd3d['raw']=!![];if(_0x1b6855[_0x78f6('0x39')][_0x78f6('0x43')]){_0x53fd3d[_0x78f6('0x44')]=_[_0x78f6('0x46')](_0x53fd3d[_0x78f6('0x44')],{'$or':_[_0x78f6('0x34')](_0x53fd3d['attributes'],function(_0x292777){var _0x5b0bd6={};_0x5b0bd6[_0x292777]={'$like':'%'+_0x1b6855['query']['filter']+'%'};return _0x5b0bd6;})});}_0x53fd3d=_['merge']({},_0x53fd3d,_0x1b6855[_0x78f6('0x47')]);return _0x32f914['getContacts'](_0x53fd3d);}})[_0x78f6('0x2a')](function(_0x31706d){if(!_['isEmpty'](_0x31706d)){var _0x48a9fa=toCsv(_0x31706d);var _0x3441e7=Date[_0x78f6('0x72')]();fs['writeFileSync'](util[_0x78f6('0x6f')](_0x78f6('0x73'),_0x32f914['id'],_0x3441e7),_0x48a9fa);_0x59a859[_0x78f6('0x74')](_0x78f6('0x75'),_0x78f6('0x76')+util[_0x78f6('0x6f')](_0x78f6('0x77'),_0x32f914['id'],_0x3441e7));_0x59a859[_0x78f6('0x74')](_0x78f6('0x78'),_0x78f6('0x79'));return _0x59a859['download'](util[_0x78f6('0x6f')](_0x78f6('0x73'),_0x32f914['id'],_0x3441e7));}else{return _0x59a859[_0x78f6('0x1d')](0xcc);}})[_0x78f6('0x4b')](handleError(_0x59a859,null));};exports['addCustomField']=function(_0x4a5642,_0x554b36,_0x5c0022){var _0x291c3e;delete _0x4a5642['body']['id'];return db[_0x78f6('0x35')][_0x78f6('0x7a')]({'where':{'id':_0x4a5642['params']['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x554b36,null))[_0x78f6('0x2a')](function(_0x26b585){if(_0x26b585){return db[_0x78f6('0x7b')][_0x78f6('0x7c')](function(_0x57923b){return db[_0x78f6('0x6c')]['create'](_0x4a5642['body'],{'transaction':_0x57923b})[_0x78f6('0x2a')](function(_0x31f5ca){_0x291c3e=_0x31f5ca;return _0x26b585['addCustomFields'](_0x31f5ca,{'transaction':_0x57923b});})['then'](function(){var _0x28ee96={'type':db[_0x78f6('0x7d')][_0x78f6('0x7e')],'transaction':_0x57923b};switch(_0x4a5642[_0x78f6('0x57')][_0x78f6('0x7f')]){case _0x78f6('0x80'):_0x28ee96[_0x78f6('0x7f')]=db[_0x78f6('0x7d')][_0x78f6('0x7e')];break;case _0x78f6('0x81'):_0x28ee96[_0x78f6('0x7f')]=db[_0x78f6('0x7d')][_0x78f6('0x82')];break;case _0x78f6('0x83'):_0x28ee96['type']=db[_0x78f6('0x7d')][_0x78f6('0x84')];_0x28ee96[_0x78f6('0x85')]=![];break;default:}return db['sequelize'][_0x78f6('0x86')]['addColumn'](_0x78f6('0x87'),util[_0x78f6('0x6f')](_0x78f6('0x88'),_0x291c3e['id']),_0x28ee96);})[_0x78f6('0x2a')](function(){return _0x291c3e;});});}})[_0x78f6('0x2a')](respondWithResult(_0x554b36,null))[_0x78f6('0x4b')](handleError(_0x554b36,null));};exports[_0x78f6('0x89')]=function(_0x2d4fe8,_0x22b32c,_0x1f2032){var _0x1df123={};var _0x1601ac={};var _0x12bb11;var _0x363c45;return db['CmList'][_0x78f6('0x7a')]({'where':{'id':_0x2d4fe8[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x22b32c,null))[_0x78f6('0x2a')](function(_0x463faf){if(_0x463faf){_0x12bb11=_0x463faf;_0x1601ac['model']=_['keys'](db[_0x78f6('0x6c')]['rawAttributes']);_0x1601ac['query']=_[_0x78f6('0x5b')](_0x2d4fe8[_0x78f6('0x39')]);_0x1601ac[_0x78f6('0x3a')]=_[_0x78f6('0x3b')](_0x1601ac[_0x78f6('0x38')],_0x1601ac[_0x78f6('0x39')]);_0x1df123[_0x78f6('0x3c')]=_[_0x78f6('0x3b')](_0x1601ac[_0x78f6('0x38')],qs[_0x78f6('0x3d')](_0x2d4fe8[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x1df123['attributes']=_0x1df123[_0x78f6('0x3c')][_0x78f6('0x3e')]?_0x1df123['attributes']:_0x1601ac['model'];_0x1df123[_0x78f6('0x40')]=qs[_0x78f6('0x41')](_0x2d4fe8[_0x78f6('0x39')][_0x78f6('0x41')]);_0x1df123[_0x78f6('0x44')]=qs['filters'](_[_0x78f6('0x42')](_0x2d4fe8['query'],_0x1601ac[_0x78f6('0x3a')]));_0x1df123[_0x78f6('0x44')]=_[_0x78f6('0x46')](_0x1df123[_0x78f6('0x44')],{'$or':[{'ListId':_0x463faf['id']},{'ListId':null}]});if(_0x2d4fe8[_0x78f6('0x39')][_0x78f6('0x43')]){_0x1df123['where']=_[_0x78f6('0x46')](_0x1df123[_0x78f6('0x44')],{'$or':_[_0x78f6('0x34')](_0x1df123[_0x78f6('0x3c')],function(_0x523472){var _0x174bb9={};_0x174bb9[_0x523472]={'$like':'%'+_0x2d4fe8[_0x78f6('0x39')]['filter']+'%'};return _0x174bb9;})});}_0x1df123=_[_0x78f6('0x46')]({},_0x1df123,_0x2d4fe8['options']);return db[_0x78f6('0x6c')][_0x78f6('0x8a')](_0x1df123);}})[_0x78f6('0x2a')](respondWithResult(_0x22b32c,null))[_0x78f6('0x4b')](handleError(_0x22b32c,null));};exports[_0x78f6('0x8b')]=function(_0x4898d7,_0x16f909,_0x1f1d08){return db[_0x78f6('0x35')][_0x78f6('0x4f')]({'where':{'id':_0x4898d7[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x16f909,null))['then'](function(_0x51ba62){if(_0x51ba62){return _0x51ba62[_0x78f6('0x8b')](_0x4898d7[_0x78f6('0x57')][_0x78f6('0x5e')],_['omit'](_0x4898d7[_0x78f6('0x57')],[_0x78f6('0x5e'),'id'])||{})['spread'](function(_0x59668a){for(var _0x1e88cf=0x0;_0x1e88cf<_0x4898d7[_0x78f6('0x57')]['ids'][_0x78f6('0x3e')];_0x1e88cf+=0x1){socket[_0x78f6('0x8c')](_0x78f6('0x8d'),{'UserId':_0x4898d7[_0x78f6('0x57')]['ids'][_0x1e88cf],'CmListId':_0x4898d7[_0x78f6('0x4d')]['id']});}return _0x59668a;});}})[_0x78f6('0x2a')](respondWithResult(_0x16f909,null))['catch'](handleError(_0x16f909,null));};exports[_0x78f6('0x8e')]=function(_0x596b06,_0x1d6b38,_0x2fb48d){return db[_0x78f6('0x35')][_0x78f6('0x4f')]({'where':{'id':_0x596b06[_0x78f6('0x4d')]['id']}})[_0x78f6('0x2a')](handleEntityNotFound(_0x1d6b38,null))['then'](function(_0x5d7129){if(_0x5d7129){return _0x5d7129[_0x78f6('0x8e')](_0x596b06[_0x78f6('0x39')][_0x78f6('0x5e')])['then'](function(){if(_[_0x78f6('0x62')](_0x596b06[_0x78f6('0x39')][_0x78f6('0x5e')])){for(var _0xdf645e=0x0;_0xdf645e<_0x596b06[_0x78f6('0x39')][_0x78f6('0x5e')][_0x78f6('0x3e')];_0xdf645e+=0x1){socket[_0x78f6('0x8c')](_0x78f6('0x8f'),{'UserId':Number(_0x596b06['query']['ids'][_0xdf645e]),'CmListId':Number(_0x596b06[_0x78f6('0x4d')]['id'])});}}else{socket['emit'](_0x78f6('0x8f'),{'UserId':Number(_0x596b06[_0x78f6('0x39')][_0x78f6('0x5e')]),'CmListId':Number(_0x596b06[_0x78f6('0x4d')]['id'])});}});}})[_0x78f6('0x2a')](respondWithStatusCode(_0x1d6b38,null))[_0x78f6('0x4b')](handleError(_0x1d6b38,null));};exports['getAgents']=function(_0x356d76,_0x53aa3a,_0x4190a5){var _0x2e9dd8={};var _0x4be74f={};var _0x2245b7;var _0x528dba;return db['CmList'][_0x78f6('0x7a')]({'where':{'id':_0x356d76[_0x78f6('0x4d')]['id']}})['then'](handleEntityNotFound(_0x53aa3a,null))[_0x78f6('0x2a')](function(_0x10e791){if(_0x10e791){_0x2245b7=_0x10e791;_0x4be74f[_0x78f6('0x38')]=_[_0x78f6('0x5b')](db['User']['rawAttributes']);_0x4be74f['query']=_[_0x78f6('0x5b')](_0x356d76[_0x78f6('0x39')]);_0x4be74f['filters']=_[_0x78f6('0x3b')](_0x4be74f[_0x78f6('0x38')],_0x4be74f[_0x78f6('0x39')]);_0x2e9dd8[_0x78f6('0x3c')]=_[_0x78f6('0x3b')](_0x4be74f[_0x78f6('0x38')],qs[_0x78f6('0x3d')](_0x356d76[_0x78f6('0x39')][_0x78f6('0x3d')]));_0x2e9dd8[_0x78f6('0x3c')]=_0x2e9dd8[_0x78f6('0x3c')][_0x78f6('0x3e')]?_0x2e9dd8[_0x78f6('0x3c')]:_0x4be74f['model'];_0x2e9dd8[_0x78f6('0x40')]=qs[_0x78f6('0x41')](_0x356d76[_0x78f6('0x39')][_0x78f6('0x41')]);_0x2e9dd8[_0x78f6('0x44')]=qs['filters'](_[_0x78f6('0x42')](_0x356d76[_0x78f6('0x39')],_0x4be74f[_0x78f6('0x3a')]));if(_0x356d76[_0x78f6('0x39')]['filter']){_0x2e9dd8[_0x78f6('0x44')]=_[_0x78f6('0x46')](_0x2e9dd8[_0x78f6('0x44')],{'$or':_['map'](_0x2e9dd8[_0x78f6('0x3c')],function(_0x371c34){var _0x5d6b70={};_0x5d6b70[_0x371c34]={'$like':'%'+_0x356d76[_0x78f6('0x39')][_0x78f6('0x43')]+'%'};return _0x5d6b70;})});}_0x2e9dd8=_[_0x78f6('0x46')]({},_0x2e9dd8,_0x356d76[_0x78f6('0x47')]);return _0x2245b7[_0x78f6('0x90')](_0x2e9dd8);}})[_0x78f6('0x2a')](function(_0x4c68d3){if(_0x4c68d3){_0x528dba=_0x4c68d3[_0x78f6('0x3e')];if(!_0x356d76[_0x78f6('0x39')]['hasOwnProperty'](_0x78f6('0x3f'))){_0x2e9dd8[_0x78f6('0x23')]=qs[_0x78f6('0x23')](_0x356d76[_0x78f6('0x39')][_0x78f6('0x23')]);_0x2e9dd8[_0x78f6('0x20')]=qs[_0x78f6('0x20')](_0x356d76[_0x78f6('0x39')][_0x78f6('0x20')]);}return _0x2245b7[_0x78f6('0x90')](_0x2e9dd8);}})[_0x78f6('0x2a')](function(_0x4d08a7){if(_0x4d08a7){return _0x4d08a7?{'count':_0x528dba,'rows':_0x4d08a7}:null;}})[_0x78f6('0x2a')](respondWithResult(_0x53aa3a,null))[_0x78f6('0x4b')](handleError(_0x53aa3a,null));}; \ No newline at end of file diff --git a/server/api/cmList/cmList.events.js b/server/api/cmList/cmList.events.js index b7d728a..b06ae6a 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 _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 +var _0x7217=['emit','hasOwnProperty','hook','exports','events','CmList','setMaxListeners','save','update','remove'];(function(_0x3d2438,_0x2e7922){var _0xd18de5=function(_0xe8a130){while(--_0xe8a130){_0x3d2438['push'](_0x3d2438['shift']());}};_0xd18de5(++_0x2e7922);}(_0x7217,0x19e));var _0x7721=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0x7217[_0x2160a9];return _0xa88cf7;};'use strict';var EventEmitter=require(_0x7721('0x0'));var CmList=require('../../mysqldb')['db'][_0x7721('0x1')];var CmListEvents=new EventEmitter();CmListEvents[_0x7721('0x2')](0x0);var events={'afterCreate':_0x7721('0x3'),'afterUpdate':_0x7721('0x4'),'afterDestroy':_0x7721('0x5')};function emitEvent(_0x4d6446){return function(_0x5bf160,_0x472a96,_0xce17f9){CmListEvents[_0x7721('0x6')](_0x4d6446+':'+_0x5bf160['id'],_0x5bf160);CmListEvents[_0x7721('0x6')](_0x4d6446,_0x5bf160);_0xce17f9(null);};}for(var e in events){if(events[_0x7721('0x7')](e)){var event=events[e];CmList[_0x7721('0x8')](e,emitEvent(event));}}module[_0x7721('0x9')]=CmListEvents; \ No newline at end of file diff --git a/server/api/cmList/cmList.model.js b/server/api/cmList/cmList.model.js index 374aee1..cd5ad41 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 _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 +var _0x99e9=['util','../../config/logger','api','moment','request-promise','path','rimraf','./cmList.attributes','define','CmList'];(function(_0x75f845,_0x13fcee){var _0x33e81f=function(_0x179c2){while(--_0x179c2){_0x75f845['push'](_0x75f845['shift']());}};_0x33e81f(++_0x13fcee);}(_0x99e9,0xb4));var _0x999e=function(_0x26a10d,_0xe5c001){_0x26a10d=_0x26a10d-0x0;var _0xf90201=_0x99e9[_0x26a10d];return _0xf90201;};'use strict';var _=require('lodash');var util=require(_0x999e('0x0'));var logger=require(_0x999e('0x1'))(_0x999e('0x2'));var moment=require(_0x999e('0x3'));var BPromise=require('bluebird');var rp=require(_0x999e('0x4'));var fs=require('fs');var path=require(_0x999e('0x5'));var rimraf=require(_0x999e('0x6'));var config=require('../../config/environment');var attributes=require(_0x999e('0x7'));module['exports']=function(_0x25421f,_0x1bda0a){return _0x25421f[_0x999e('0x8')](_0x999e('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 a3d8520..d44b308 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 _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 +var _0x4cc3=['lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','socket.io-emitter','./cmList.socket','request','then','info','CmList,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x4cc3,0x87));var _0x34cc=function(_0xe1f9a2,_0x307680){_0xe1f9a2=_0xe1f9a2-0x0;var _0x3a01b6=_0x4cc3[_0xe1f9a2];return _0x3a01b6;};'use strict';var _=require(_0x34cc('0x0'));var util=require(_0x34cc('0x1'));var moment=require(_0x34cc('0x2'));var BPromise=require('bluebird');var rs=require(_0x34cc('0x3'));var fs=require('fs');var Redis=require(_0x34cc('0x4'));var db=require(_0x34cc('0x5'))['db'];var utils=require(_0x34cc('0x6'));var logger=require(_0x34cc('0x7'))(_0x34cc('0x8'));var config=require(_0x34cc('0x9'));var jayson=require(_0x34cc('0xa'));var client=jayson[_0x34cc('0xb')][_0x34cc('0xc')]({'port':0x232a});config[_0x34cc('0xd')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x34cc('0xe'))(new Redis(config['redis']));require(_0x34cc('0xf'))['register'](socket);function respondWithRpcPromise(_0x35df29,_0x4ae127,_0x4396a9){return new BPromise(function(_0x5b1239,_0x38b456){return client[_0x34cc('0x10')](_0x35df29,_0x4396a9)[_0x34cc('0x11')](function(_0x454c38){logger[_0x34cc('0x12')](_0x34cc('0x13'),_0x4ae127,_0x34cc('0x14'));logger['debug']('CmList,\x20%s,\x20%s,\x20%s',_0x4ae127,_0x34cc('0x14'),JSON[_0x34cc('0x15')](_0x454c38));if(_0x454c38[_0x34cc('0x16')]){if(_0x454c38['error'][_0x34cc('0x17')]===0x1f4){logger[_0x34cc('0x16')](_0x34cc('0x13'),_0x4ae127,_0x454c38[_0x34cc('0x16')][_0x34cc('0x18')]);return _0x38b456(_0x454c38[_0x34cc('0x16')][_0x34cc('0x18')]);}logger['error'](_0x34cc('0x13'),_0x4ae127,_0x454c38['error'][_0x34cc('0x18')]);return _0x5b1239(_0x454c38[_0x34cc('0x16')][_0x34cc('0x18')]);}else{logger[_0x34cc('0x12')](_0x34cc('0x13'),_0x4ae127,'request\x20sent');_0x5b1239(_0x454c38[_0x34cc('0x19')]['message']);}})[_0x34cc('0x1a')](function(_0x3a680a){logger['error'](_0x34cc('0x13'),_0x4ae127,_0x3a680a);_0x38b456(_0x3a680a);});});} \ No newline at end of file diff --git a/server/api/cmList/cmList.socket.js b/server/api/cmList/cmList.socket.js index 1934f92..1eb791f 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 _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 +var _0x06e0=['register','remove'];(function(_0x4c8bf8,_0x34e122){var _0x3f1056=function(_0x5149cf){while(--_0x5149cf){_0x4c8bf8['push'](_0x4c8bf8['shift']());}};_0x3f1056(++_0x34e122);}(_0x06e0,0x10f));var _0x006e=function(_0x3ec412,_0x4e05a2){_0x3ec412=_0x3ec412-0x0;var _0x48a1d1=_0x06e0[_0x3ec412];return _0x48a1d1;};'use strict';var CmListEvents=require('./cmList.events');var events=['save',_0x006e('0x0'),'update'];function createListener(_0xe84f6f,_0x2b3d2d){return function(_0x5ee2f6){_0x2b3d2d['emit'](_0xe84f6f,_0x5ee2f6);};}function removeListener(_0x4acd93,_0x58f64f){return function(){CmListEvents['removeListener'](_0x4acd93,_0x58f64f);};}exports[_0x006e('0x1')]=function(_0x46371c){for(var _0x594ff3=0x0,_0x596c38=events['length'];_0x594ff3<_0x596c38;_0x594ff3++){var _0x447af3=events[_0x594ff3];var _0x1e8e90=createListener('cmList:'+_0x447af3,_0x46371c);CmListEvents['on'](_0x447af3,_0x1e8e90);}}; \ No newline at end of file diff --git a/server/api/cmList/index.js b/server/api/cmList/index.js index c3d0893..cfdff6d 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 _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 +var _0x2f05=['/:id/contacts','addContacts','addAgents','update','destroy','delete','/:id/dispositions','removeDispositions','removeAgents','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','index','get','/describe','isAuthenticated','describe','/:id','show','getDispositions','getContactsCsv','/:id/fields','getCustomFields','/:id/users','post','create','addDisposition'];(function(_0x515026,_0x1ce01b){var _0x37f356=function(_0xf46c43){while(--_0xf46c43){_0x515026['push'](_0x515026['shift']());}};_0x37f356(++_0x1ce01b);}(_0x2f05,0xaf));var _0x52f0=function(_0xa5208c,_0x168ad9){_0xa5208c=_0xa5208c-0x0;var _0x12a498=_0x2f05[_0xa5208c];return _0x12a498;};'use strict';var multer=require(_0x52f0('0x0'));var util=require('util');var path=require(_0x52f0('0x1'));var timeout=require(_0x52f0('0x2'));var express=require(_0x52f0('0x3'));var router=express[_0x52f0('0x4')]();var fs_extra=require(_0x52f0('0x5'));var auth=require(_0x52f0('0x6'));var interaction=require(_0x52f0('0x7'));var config=require('../../config/environment');var controller=require('./cmList.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x52f0('0x8')]);router[_0x52f0('0x9')](_0x52f0('0xa'),auth[_0x52f0('0xb')](),controller[_0x52f0('0xc')]);router['get'](_0x52f0('0xd'),auth[_0x52f0('0xb')](),controller[_0x52f0('0xe')]);router[_0x52f0('0x9')]('/:id/dispositions',auth[_0x52f0('0xb')](),controller[_0x52f0('0xf')]);router[_0x52f0('0x9')]('/:id/contacts',auth[_0x52f0('0xb')](),controller['getContacts']);router[_0x52f0('0x9')]('/:id/contacts/csv',auth[_0x52f0('0xb')](),controller[_0x52f0('0x10')]);router[_0x52f0('0x9')](_0x52f0('0x11'),auth['isAuthenticated'](),controller[_0x52f0('0x12')]);router[_0x52f0('0x9')](_0x52f0('0x13'),auth[_0x52f0('0xb')](),controller['getAgents']);router[_0x52f0('0x14')]('/',auth[_0x52f0('0xb')](),controller[_0x52f0('0x15')]);router['post']('/:id/dispositions',auth[_0x52f0('0xb')](),controller[_0x52f0('0x16')]);router[_0x52f0('0x14')](_0x52f0('0x17'),auth[_0x52f0('0xb')](),controller[_0x52f0('0x18')]);router['post'](_0x52f0('0x11'),auth[_0x52f0('0xb')](),controller['addCustomField']);router[_0x52f0('0x14')](_0x52f0('0x13'),auth[_0x52f0('0xb')](),controller[_0x52f0('0x19')]);router['put'](_0x52f0('0xd'),auth[_0x52f0('0xb')](),controller[_0x52f0('0x1a')]);router['delete'](_0x52f0('0xd'),auth[_0x52f0('0xb')](),controller[_0x52f0('0x1b')]);router[_0x52f0('0x1c')](_0x52f0('0x1d'),auth[_0x52f0('0xb')](),controller[_0x52f0('0x1e')]);router[_0x52f0('0x1c')]('/:id/users',auth[_0x52f0('0xb')](),controller[_0x52f0('0x1f')]);module[_0x52f0('0x20')]=router; \ No newline at end of file diff --git a/server/api/condition/condition.attributes.js b/server/api/condition/condition.attributes.js index b878a79..36c3014 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 _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 +var _0x6d10=['getDataValue','field','STRING','sequelize'];(function(_0x42a8ac,_0x3b6e01){var _0x598bee=function(_0xa4a0d3){while(--_0xa4a0d3){_0x42a8ac['push'](_0x42a8ac['shift']());}};_0x598bee(++_0x3b6e01);}(_0x6d10,0x97));var _0x06d1=function(_0x2f47ee,_0x3b7632){_0x2f47ee=_0x2f47ee-0x0;var _0x1204f9=_0x6d10[_0x2f47ee];return _0x1204f9;};'use strict';var Sequelize=require(_0x06d1('0x0'));module['exports']={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x3cd71e){return this[_0x06d1('0x1')](_0x06d1('0x2'));}},'field':{'type':Sequelize[_0x06d1('0x3')],'allowNull':![]},'operator':{'type':Sequelize[_0x06d1('0x3')],'allowNull':![]},'value':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/condition/condition.controller.js b/server/api/condition/condition.controller.js index baa8d5b..b135cca 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 _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 +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(_0x39cadf,_0xe34bb){var _0x2b4bc5=function(_0x2e0263){while(--_0x2e0263){_0x39cadf['push'](_0x39cadf['shift']());}};_0x2b4bc5(++_0xe34bb);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'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 diff --git a/server/api/condition/condition.model.js b/server/api/condition/condition.model.js index 89028ef..64a8010 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 _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 +var _0x8cf2=['bluebird','request-promise','path','rimraf','../../config/environment','./condition.attributes','exports','define','Condition','util','../../config/logger','api','moment'];(function(_0x198c0f,_0xe1f97f){var _0x1f3c2d=function(_0x94c858){while(--_0x94c858){_0x198c0f['push'](_0x198c0f['shift']());}};_0x1f3c2d(++_0xe1f97f);}(_0x8cf2,0x168));var _0x28cf=function(_0x1ab941,_0x11fb3a){_0x1ab941=_0x1ab941-0x0;var _0x1446f0=_0x8cf2[_0x1ab941];return _0x1446f0;};'use strict';var _=require('lodash');var util=require(_0x28cf('0x0'));var logger=require(_0x28cf('0x1'))(_0x28cf('0x2'));var moment=require(_0x28cf('0x3'));var BPromise=require(_0x28cf('0x4'));var rp=require(_0x28cf('0x5'));var fs=require('fs');var path=require(_0x28cf('0x6'));var rimraf=require(_0x28cf('0x7'));var config=require(_0x28cf('0x8'));var attributes=require(_0x28cf('0x9'));module[_0x28cf('0xa')]=function(_0x13b6b9,_0xd59463){return _0x13b6b9[_0x28cf('0xb')](_0x28cf('0xc'),attributes,{'tableName':'tools_conditions','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 225c73f..5a357cd 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 _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 +var _0xbaab=['Condition,\x20%s,\x20%s,\x20%s','error','code','Condition,\x20%s,\x20%s','message','info','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','then','request\x20sent'];(function(_0x5774d1,_0x54e802){var _0x49fa0c=function(_0x5b3c2f){while(--_0x5b3c2f){_0x5774d1['push'](_0x5774d1['shift']());}};_0x49fa0c(++_0x54e802);}(_0xbaab,0x1a4));var _0xbbaa=function(_0x394d32,_0x3717df){_0x394d32=_0x394d32-0x0;var _0x5d225e=_0xbaab[_0x394d32];return _0x5d225e;};'use strict';var _=require(_0xbbaa('0x0'));var util=require('util');var moment=require(_0xbbaa('0x1'));var BPromise=require(_0xbbaa('0x2'));var rs=require(_0xbbaa('0x3'));var fs=require('fs');var Redis=require(_0xbbaa('0x4'));var db=require(_0xbbaa('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xbbaa('0x6'));var jayson=require(_0xbbaa('0x7'));var client=jayson[_0xbbaa('0x8')][_0xbbaa('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x206d2c,_0x35433c,_0x3fa364){return new BPromise(function(_0x62cb75,_0x5c80f5){return client['request'](_0x206d2c,_0x3fa364)[_0xbbaa('0xa')](function(_0x15e192){logger['info']('Condition,\x20%s,\x20%s',_0x35433c,_0xbbaa('0xb'));logger['debug'](_0xbbaa('0xc'),_0x35433c,_0xbbaa('0xb'),JSON['stringify'](_0x15e192));if(_0x15e192[_0xbbaa('0xd')]){if(_0x15e192[_0xbbaa('0xd')][_0xbbaa('0xe')]===0x1f4){logger['error'](_0xbbaa('0xf'),_0x35433c,_0x15e192[_0xbbaa('0xd')][_0xbbaa('0x10')]);return _0x5c80f5(_0x15e192[_0xbbaa('0xd')][_0xbbaa('0x10')]);}logger[_0xbbaa('0xd')](_0xbbaa('0xf'),_0x35433c,_0x15e192[_0xbbaa('0xd')][_0xbbaa('0x10')]);return _0x62cb75(_0x15e192[_0xbbaa('0xd')]['message']);}else{logger[_0xbbaa('0x11')]('Condition,\x20%s,\x20%s',_0x35433c,'request\x20sent');_0x62cb75(_0x15e192['result'][_0xbbaa('0x10')]);}})['catch'](function(_0x368ddf){logger[_0xbbaa('0xd')](_0xbbaa('0xf'),_0x35433c,_0x368ddf);_0x5c80f5(_0x368ddf);});});} \ No newline at end of file diff --git a/server/api/condition/index.js b/server/api/condition/index.js index 46d4bde..8f09a0d 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 _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 +var _0xfd57=['isAuthenticated','update','delete','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./condition.controller','/:id'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xfd57,0x163));var _0x7fd5=function(_0x417539,_0x74b95a){_0x417539=_0x417539-0x0;var _0x2229ce=_0xfd57[_0x417539];return _0x2229ce;};'use strict';var multer=require('multer');var util=require(_0x7fd5('0x0'));var path=require('path');var timeout=require(_0x7fd5('0x1'));var express=require(_0x7fd5('0x2'));var router=express[_0x7fd5('0x3')]();var fs_extra=require(_0x7fd5('0x4'));var auth=require(_0x7fd5('0x5'));var interaction=require(_0x7fd5('0x6'));var config=require('../../config/environment');var controller=require(_0x7fd5('0x7'));router['put'](_0x7fd5('0x8'),auth[_0x7fd5('0x9')](),controller[_0x7fd5('0xa')]);router[_0x7fd5('0xb')](_0x7fd5('0x8'),auth[_0x7fd5('0x9')](),controller[_0x7fd5('0xc')]);module[_0x7fd5('0xd')]=router; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.attributes.js b/server/api/dashboard/dashboard.attributes.js index fcccf76..c452f62 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 _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 +var _0xb10b=['name','sequelize','STRING'];(function(_0x570dcb,_0x440ec4){var _0x44d319=function(_0x568570){while(--_0x568570){_0x570dcb['push'](_0x570dcb['shift']());}};_0x44d319(++_0x440ec4);}(_0xb10b,0x12a));var _0xbb10=function(_0x13ff4f,_0x4defc2){_0x13ff4f=_0x13ff4f-0x0;var _0xd04dee=_0xb10b[_0x13ff4f];return _0xd04dee;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'name':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'unique':_0xbb10('0x2')},'description':{'type':Sequelize[_0xbb10('0x1')]}}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index 3c1a955..ee18a21 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 _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 +var _0x16d1=['path','ejs','squel','jsforce','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','../../mysqldb','redis','localhost','./dashboard.socket','sendStatus','end','undefined','limit','offset','count','status','set','Content-Range','json','apply','reject','save','update','destroy','then','get','CustomDashboards','error','stack','name','map','Dashboard','type','key','model','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','rows','show','params','keys','rawAttributes','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','include','omit','createdAt','updatedAt','body','autoAssociation','iframe','attrUrl','attrs','value','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','counter','attrMetric','total','attrVoiceQueues','attrFontSize','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','reportType','attrReport','attrRefresh','stringify','addItem','DashboardId','DashboardItem','getItems','findOne','order','options','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x16d1,0x165));var _0x116d=function(_0xbd0987,_0x1e349c){_0xbd0987=_0xbd0987-0x0;var _0xcf3c92=_0x16d1[_0xbd0987];return _0xcf3c92;};'use strict';var emlformat=require(_0x116d('0x0'));var rimraf=require(_0x116d('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x116d('0x2'));var rp=require(_0x116d('0x3'));var moment=require(_0x116d('0x4'));var BPromise=require(_0x116d('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x116d('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x116d('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x116d('0x8'));var crypto=require('crypto');var jsforce=require(_0x116d('0x9'));var deskjs=require(_0x116d('0xa'));var toCsv=require(_0x116d('0xb'));var querystring=require(_0x116d('0xc'));var Papa=require('papaparse');var Redis=require(_0x116d('0xd'));var authService=require(_0x116d('0xe'));var qs=require(_0x116d('0xf'));var as=require(_0x116d('0x10'));var hardwareService=require(_0x116d('0x11'));var logger=require(_0x116d('0x12'))(_0x116d('0x13'));var utils=require(_0x116d('0x14'));var config=require(_0x116d('0x15'));var licenseUtil=require(_0x116d('0x16'));var db=require(_0x116d('0x17'))['db'];config[_0x116d('0x18')]=_['defaults'](config[_0x116d('0x18')],{'host':_0x116d('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x116d('0x18')]));require(_0x116d('0x1a'))['register'](socket);function respondWithStatusCode(_0x1dfe55,_0xf70edb){_0xf70edb=_0xf70edb||0xcc;return function(_0x45b11e){if(_0x45b11e){return _0x1dfe55[_0x116d('0x1b')](_0xf70edb);}return _0x1dfe55['status'](_0xf70edb)[_0x116d('0x1c')]();};}function respondWithResult(_0x8b4134,_0x3c74dc){_0x3c74dc=_0x3c74dc||0xc8;return function(_0x177b71){if(_0x177b71){return _0x8b4134['status'](_0x3c74dc)['json'](_0x177b71);}};}function respondWithFilteredResult(_0x56d38e,_0x171d9d){return function(_0xd8a46b){if(_0xd8a46b){var _0x4f5945=typeof _0x171d9d['offset']===_0x116d('0x1d')&&typeof _0x171d9d[_0x116d('0x1e')]===_0x116d('0x1d');var _0x38732a=_0xd8a46b['count'];var _0x15fee2=_0x4f5945?0x0:_0x171d9d[_0x116d('0x1f')];var _0x3afbde=_0x4f5945?_0xd8a46b[_0x116d('0x20')]:_0x171d9d[_0x116d('0x1f')]+_0x171d9d[_0x116d('0x1e')];var _0x4c94e8;if(_0x3afbde>=_0x38732a){_0x3afbde=_0x38732a;_0x4c94e8=0xc8;}else{_0x4c94e8=0xce;}_0x56d38e[_0x116d('0x21')](_0x4c94e8);return _0x56d38e[_0x116d('0x22')](_0x116d('0x23'),_0x15fee2+'-'+_0x3afbde+'/'+_0x38732a)[_0x116d('0x24')](_0xd8a46b);}return null;};}function patchUpdates(_0xae847f){return function(_0xcd3ec5){try{jsonpatch[_0x116d('0x25')](_0xcd3ec5,_0xae847f,!![]);}catch(_0x259410){return BPromise[_0x116d('0x26')](_0x259410);}return _0xcd3ec5[_0x116d('0x27')]();};}function saveUpdates(_0x4bf661,_0x4cd956){return function(_0x43ba75){if(_0x43ba75){return _0x43ba75[_0x116d('0x28')](_0x4bf661)['then'](function(_0x5ec99b){return _0x5ec99b;});}return null;};}function removeEntity(_0x3f2ba3,_0x2130b7){return function(_0x17c102){if(_0x17c102){return _0x17c102[_0x116d('0x29')]()[_0x116d('0x2a')](function(){var _0x1f3c0b=_0x17c102[_0x116d('0x2b')]({'plain':!![]});var _0x50f540=_0x116d('0x2c');return db['UserProfileResource'][_0x116d('0x29')]({'where':{'type':_0x50f540,'resourceId':_0x1f3c0b['id']}})['then'](function(){return _0x17c102;});})[_0x116d('0x2a')](function(){_0x3f2ba3[_0x116d('0x21')](0xcc)[_0x116d('0x1c')]();});}};}function handleEntityNotFound(_0x5e24b3,_0x30b417){return function(_0x444318){if(!_0x444318){_0x5e24b3[_0x116d('0x1b')](0x194);}return _0x444318;};}function handleError(_0x3918a2,_0x51be3e){_0x51be3e=_0x51be3e||0x1f4;return function(_0xbd1348){logger[_0x116d('0x2d')](_0xbd1348[_0x116d('0x2e')]);if(_0xbd1348[_0x116d('0x2f')]){delete _0xbd1348[_0x116d('0x2f')];}_0x3918a2[_0x116d('0x21')](_0x51be3e)['send'](_0xbd1348);};}exports['index']=function(_0x140ab5,_0x4e5415){var _0x47fe4f={},_0x9f9b32={},_0x1da812={'count':0x0,'rows':[]};var _0x3efe3f=_[_0x116d('0x30')](db[_0x116d('0x31')]['rawAttributes'],function(_0x4a9e82){return{'name':_0x4a9e82['fieldName'],'type':_0x4a9e82[_0x116d('0x32')][_0x116d('0x33')]};});_0x9f9b32[_0x116d('0x34')]=_[_0x116d('0x30')](_0x3efe3f,_0x116d('0x2f'));_0x9f9b32[_0x116d('0x35')]=_['keys'](_0x140ab5[_0x116d('0x35')]);_0x9f9b32['filters']=_['intersection'](_0x9f9b32['model'],_0x9f9b32[_0x116d('0x35')]);_0x47fe4f[_0x116d('0x36')]=_[_0x116d('0x37')](_0x9f9b32[_0x116d('0x34')],qs[_0x116d('0x38')](_0x140ab5[_0x116d('0x35')][_0x116d('0x38')]));_0x47fe4f[_0x116d('0x36')]=_0x47fe4f['attributes'][_0x116d('0x39')]?_0x47fe4f[_0x116d('0x36')]:_0x9f9b32[_0x116d('0x34')];if(!_0x140ab5[_0x116d('0x35')][_0x116d('0x3a')](_0x116d('0x3b'))){_0x47fe4f[_0x116d('0x1e')]=qs[_0x116d('0x1e')](_0x140ab5[_0x116d('0x35')]['limit']);_0x47fe4f['offset']=qs['offset'](_0x140ab5[_0x116d('0x35')]['offset']);}_0x47fe4f['order']=qs[_0x116d('0x3c')](_0x140ab5[_0x116d('0x35')]['sort']);_0x47fe4f[_0x116d('0x3d')]=qs[_0x116d('0x3e')](_[_0x116d('0x3f')](_0x140ab5['query'],_0x9f9b32[_0x116d('0x3e')]),_0x3efe3f);if(_0x140ab5[_0x116d('0x35')][_0x116d('0x40')]){_0x47fe4f[_0x116d('0x3d')]=_[_0x116d('0x41')](_0x47fe4f['where'],{'$or':_[_0x116d('0x30')](_0x3efe3f,function(_0x8444a6){if(_0x8444a6[_0x116d('0x32')]!==_0x116d('0x42')){var _0x347ace={};_0x347ace[_0x8444a6[_0x116d('0x2f')]]={'$like':'%'+_0x140ab5['query'][_0x116d('0x40')]+'%'};return _0x347ace;}})});}_0x47fe4f=_[_0x116d('0x41')]({},_0x47fe4f,_0x140ab5['options']);var _0x205155={'where':_0x47fe4f[_0x116d('0x3d')]};return db[_0x116d('0x31')][_0x116d('0x20')](_0x205155)['then'](function(_0x1ea9ae){_0x1da812[_0x116d('0x20')]=_0x1ea9ae;if(_0x140ab5[_0x116d('0x35')][_0x116d('0x43')]){_0x47fe4f['include']=[{'all':!![]}];}return db[_0x116d('0x31')]['findAll'](_0x47fe4f);})['then'](function(_0x5a10aa){_0x1da812[_0x116d('0x44')]=_0x5a10aa;return _0x1da812;})[_0x116d('0x2a')](respondWithFilteredResult(_0x4e5415,_0x47fe4f))['catch'](handleError(_0x4e5415,null));};exports[_0x116d('0x45')]=function(_0x1f1efe,_0x340107){var _0x4c9704={'raw':![],'where':{'id':_0x1f1efe[_0x116d('0x46')]['id']}},_0x1a29e8={};_0x1a29e8[_0x116d('0x34')]=_[_0x116d('0x47')](db[_0x116d('0x31')][_0x116d('0x48')]);_0x1a29e8[_0x116d('0x35')]=_[_0x116d('0x47')](_0x1f1efe[_0x116d('0x35')]);_0x1a29e8['filters']=_[_0x116d('0x37')](_0x1a29e8[_0x116d('0x34')],_0x1a29e8[_0x116d('0x35')]);_0x4c9704['attributes']=_['intersection'](_0x1a29e8[_0x116d('0x34')],qs[_0x116d('0x38')](_0x1f1efe[_0x116d('0x35')][_0x116d('0x38')]));_0x4c9704[_0x116d('0x36')]=_0x4c9704[_0x116d('0x36')][_0x116d('0x39')]?_0x4c9704['attributes']:_0x1a29e8[_0x116d('0x34')];if(_0x1f1efe['query']['includeAll']){_0x4c9704['include']=[{'all':!![]}];}_0x4c9704=_[_0x116d('0x41')]({},_0x4c9704,_0x1f1efe['options']);return db[_0x116d('0x31')]['find'](_0x4c9704)[_0x116d('0x2a')](handleEntityNotFound(_0x340107,null))['then'](respondWithResult(_0x340107,null))['catch'](handleError(_0x340107,null));};exports['create']=function(_0xe986d1,_0x24da97){return db[_0x116d('0x31')][_0x116d('0x49')](_0xe986d1['body'],{})[_0x116d('0x2a')](function(_0x88b3e0){var _0x2e499c=_0xe986d1[_0x116d('0x4a')][_0x116d('0x2b')]({'plain':!![]});if(!_0x2e499c)throw new Error(_0x116d('0x4b'));if(_0x2e499c[_0x116d('0x4c')]===_0x116d('0x4a')){var _0x38254b=_0x88b3e0['get']({'plain':!![]});var _0x3057aa=_0x116d('0x2c');return db[_0x116d('0x4d')][_0x116d('0x4e')]({'where':{'name':_0x3057aa,'userProfileId':_0x2e499c[_0x116d('0x4f')]},'raw':!![]})[_0x116d('0x2a')](function(_0x5f259){if(_0x5f259&&_0x5f259['autoAssociation']===0x0){return db[_0x116d('0x50')][_0x116d('0x49')]({'name':_0x38254b[_0x116d('0x2f')],'resourceId':_0x38254b['id'],'type':_0x5f259[_0x116d('0x2f')],'sectionId':_0x5f259['id']},{})[_0x116d('0x2a')](function(){return _0x88b3e0;});}else{return _0x88b3e0;}})[_0x116d('0x51')](function(_0x30f9eb){logger['error'](_0x116d('0x52'),_0x30f9eb);throw _0x30f9eb;});}return _0x88b3e0;})[_0x116d('0x2a')](respondWithResult(_0x24da97,0xc9))['catch'](handleError(_0x24da97,null));};exports[_0x116d('0x53')]=function(_0xe40ea2,_0x1f9ec8){var _0xbd8f24={'where':{'id':_0xe40ea2['params']['id']}},_0x2f21ab={};_0x2f21ab['model']=_[_0x116d('0x47')](db[_0x116d('0x31')][_0x116d('0x48')]);_0xbd8f24[_0x116d('0x36')]=_['intersection'](_0x2f21ab[_0x116d('0x34')],qs[_0x116d('0x38')](_0xe40ea2[_0x116d('0x35')][_0x116d('0x38')]));_0xbd8f24[_0x116d('0x36')]=_0xbd8f24[_0x116d('0x36')][_0x116d('0x39')]?_0xbd8f24[_0x116d('0x36')]:_0x2f21ab[_0x116d('0x34')];if(_0xe40ea2[_0x116d('0x35')][_0x116d('0x43')]){_0xbd8f24[_0x116d('0x54')]=[{'all':!![]}];}_0xbd8f24=_[_0x116d('0x41')]({},_0xbd8f24,_0xe40ea2['options']);return db[_0x116d('0x31')]['find'](_0xbd8f24)['then'](handleEntityNotFound(_0x1f9ec8,null))[_0x116d('0x2a')](function(_0x54365a){if(_0x54365a){var _0xa972ca=_0x54365a[_0x116d('0x2b')]({'plain':!![]});_0xa972ca=qs[_0x116d('0x55')](_0xa972ca,['id',_0x116d('0x56'),_0x116d('0x57')]);_0xe40ea2[_0x116d('0x58')]=_[_0x116d('0x55')](_0xe40ea2[_0x116d('0x58')],['id',_0x116d('0x56'),_0x116d('0x57')]);return db[_0x116d('0x31')]['create'](_[_0x116d('0x41')](_0xa972ca,_0xe40ea2[_0x116d('0x58')]),{'include':_0xe40ea2[_0x116d('0x35')][_0x116d('0x43')]?[{'all':!![]}]:undefined})[_0x116d('0x2a')](function(_0xa22038){var _0x5cd59b=_0xe40ea2[_0x116d('0x4a')][_0x116d('0x2b')]({'plain':!![]});if(!_0x5cd59b)throw new Error(_0x116d('0x4b'));if(_0x5cd59b[_0x116d('0x4c')]==='user'){var _0x5c0897=_0xa22038[_0x116d('0x2b')]({'plain':!![]});var _0x480fba='CustomDashboards';return db['UserProfileSection'][_0x116d('0x4e')]({'where':{'name':_0x480fba,'userProfileId':_0x5cd59b[_0x116d('0x4f')]},'raw':!![]})[_0x116d('0x2a')](function(_0x2b9491){if(_0x2b9491&&_0x2b9491[_0x116d('0x59')]===0x0){return db[_0x116d('0x50')][_0x116d('0x49')]({'name':_0x5c0897[_0x116d('0x2f')],'resourceId':_0x5c0897['id'],'type':_0x2b9491[_0x116d('0x2f')],'sectionId':_0x2b9491['id']},{})[_0x116d('0x2a')](function(){return _0xa22038;});}else{return _0xa22038;}})['catch'](function(_0x46d966){logger['error'](_0x116d('0x52'),_0x46d966);throw _0x46d966;});}return _0xa22038;});}})[_0x116d('0x2a')](respondWithResult(_0x1f9ec8,0xc9))[_0x116d('0x51')](handleError(_0x1f9ec8,null));};exports[_0x116d('0x28')]=function(_0x35d4c0,_0x52d04b){if(_0x35d4c0['body']['id']){delete _0x35d4c0[_0x116d('0x58')]['id'];}return db[_0x116d('0x31')][_0x116d('0x4e')]({'where':{'id':_0x35d4c0[_0x116d('0x46')]['id']}})[_0x116d('0x2a')](handleEntityNotFound(_0x52d04b,null))['then'](saveUpdates(_0x35d4c0[_0x116d('0x58')],null))[_0x116d('0x2a')](respondWithResult(_0x52d04b,null))[_0x116d('0x51')](handleError(_0x52d04b,null));};exports['destroy']=function(_0x5bc1cb,_0xc21826){return db[_0x116d('0x31')]['find']({'where':{'id':_0x5bc1cb['params']['id']}})[_0x116d('0x2a')](handleEntityNotFound(_0xc21826,null))[_0x116d('0x2a')](removeEntity(_0xc21826,null))[_0x116d('0x51')](handleError(_0xc21826,null));};function widgetAttributes(_0x1a4f6f){try{switch(_0x1a4f6f[_0x116d('0x32')]){case _0x116d('0x5a'):return[{'name':_0x116d('0x5b'),'value':_0x1a4f6f[_0x116d('0x5b')]||(_0x1a4f6f['attrs']&&_0x1a4f6f['attrs'][0x0]?_0x1a4f6f[_0x116d('0x5c')][0x0][_0x116d('0x5d')]:undefined)||'https://'}];case'custom':return[{'name':_0x116d('0x5e'),'value':_0x1a4f6f[_0x116d('0x5e')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x0]?_0x1a4f6f[_0x116d('0x5c')][0x0][_0x116d('0x5d')]:undefined)||''}];case _0x116d('0x5f'):return[{'name':_0x116d('0x60'),'value':_0x1a4f6f[_0x116d('0x60')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x0]?_0x1a4f6f['attrs'][0x0][_0x116d('0x5d')]:undefined)||_0x116d('0x61')},{'name':_0x116d('0x62'),'value':_0x1a4f6f[_0x116d('0x62')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f['attrs'][0x1]?_0x1a4f6f[_0x116d('0x5c')][0x1][_0x116d('0x5d')]:undefined)||_0x116d('0x63')},{'name':'attrFontSize','value':_0x1a4f6f['attrFontSize']||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x2]?_0x1a4f6f['attrs'][0x2]['value']:undefined)||0xc}];case _0x116d('0x64'):return[{'name':_0x116d('0x65'),'value':_0x1a4f6f[_0x116d('0x65')]||(_0x1a4f6f['attrs']&&_0x1a4f6f[_0x116d('0x5c')][0x0]?_0x1a4f6f[_0x116d('0x5c')][0x0][_0x116d('0x5d')]:undefined)||_0x116d('0x66')},{'name':_0x116d('0x67'),'value':_0x1a4f6f[_0x116d('0x67')]||(_0x1a4f6f['attrs']&&_0x1a4f6f['attrs'][0x1]?_0x1a4f6f[_0x116d('0x5c')][0x1][_0x116d('0x5d')]:undefined)||[]},{'name':_0x116d('0x68'),'value':_0x1a4f6f[_0x116d('0x68')]||(_0x1a4f6f['attrs']&&_0x1a4f6f[_0x116d('0x5c')][0x2]?_0x1a4f6f[_0x116d('0x5c')][0x2][_0x116d('0x5d')]:undefined)||0x14}];case'multibar-chart':case _0x116d('0x69'):return[{'name':'attrSerie1','value':_0x1a4f6f[_0x116d('0x6a')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f['attrs'][0x0]?_0x1a4f6f['attrs'][0x0][_0x116d('0x5d')]:undefined)||_0x116d('0x66')},{'name':_0x116d('0x6b'),'value':_0x1a4f6f[_0x116d('0x6b')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x1]?_0x1a4f6f[_0x116d('0x5c')][0x1][_0x116d('0x5d')]:undefined)||null},{'name':'attrSerie3','value':_0x1a4f6f[_0x116d('0x6c')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x2]?_0x1a4f6f[_0x116d('0x5c')][0x2][_0x116d('0x5d')]:undefined)||null},{'name':_0x116d('0x67'),'value':_0x1a4f6f[_0x116d('0x67')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x3]?_0x1a4f6f[_0x116d('0x5c')][0x3][_0x116d('0x5d')]:undefined)||[]}];case _0x116d('0x6d'):return[{'name':'attrReport','type':_0x1a4f6f[_0x116d('0x6e')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x0]?_0x1a4f6f[_0x116d('0x5c')][0x0]['type']:undefined)||null,'value':_0x1a4f6f[_0x116d('0x6f')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f[_0x116d('0x5c')][0x0]?_0x1a4f6f[_0x116d('0x5c')][0x0][_0x116d('0x5d')]:undefined)||null},{'name':'attrRefresh','value':_0x1a4f6f[_0x116d('0x70')]||(_0x1a4f6f[_0x116d('0x5c')]&&_0x1a4f6f['attrs'][0x1]?_0x1a4f6f['attrs'][0x1][_0x116d('0x5d')]:undefined)||0x0}];default:return[];}}catch(_0x40b6b7){logger['error']('widgetAttributes:\x20%s',JSON[_0x116d('0x71')](_0x40b6b7));return[];}}exports[_0x116d('0x72')]=function(_0x2b9764,_0xdb6a0e,_0x13684a){if(_0x2b9764['body']['id']){delete _0x2b9764[_0x116d('0x58')]['id'];}return db[_0x116d('0x31')][_0x116d('0x4e')]({'where':{'id':_0x2b9764[_0x116d('0x46')]['id']}})['then'](handleEntityNotFound(_0xdb6a0e,null))['then'](function(_0x5bd1b5){if(_0x5bd1b5){_0x2b9764[_0x116d('0x58')][_0x116d('0x73')]=_0x5bd1b5['id'];_0x2b9764['body']['attrs']=widgetAttributes(_0x2b9764[_0x116d('0x58')]);return db[_0x116d('0x74')][_0x116d('0x49')](_0x2b9764[_0x116d('0x58')]);}})['then'](respondWithResult(_0xdb6a0e,null))[_0x116d('0x51')](handleError(_0xdb6a0e,null));};exports[_0x116d('0x75')]=function(_0x9dad20,_0x4a4877,_0x2c3fd7){var _0x373f95={};var _0x56f8d0={};var _0x19eb8e;var _0x21811a;return db[_0x116d('0x31')][_0x116d('0x76')]({'where':{'id':_0x9dad20[_0x116d('0x46')]['id']}})[_0x116d('0x2a')](handleEntityNotFound(_0x4a4877,null))[_0x116d('0x2a')](function(_0x2b6c16){if(_0x2b6c16){_0x19eb8e=_0x2b6c16;_0x56f8d0[_0x116d('0x34')]=_[_0x116d('0x47')](db[_0x116d('0x74')][_0x116d('0x48')]);_0x56f8d0['query']=_[_0x116d('0x47')](_0x9dad20[_0x116d('0x35')]);_0x56f8d0[_0x116d('0x3e')]=_[_0x116d('0x37')](_0x56f8d0['model'],_0x56f8d0[_0x116d('0x35')]);_0x373f95[_0x116d('0x36')]=_[_0x116d('0x37')](_0x56f8d0[_0x116d('0x34')],qs['fields'](_0x9dad20['query'][_0x116d('0x38')]));_0x373f95[_0x116d('0x36')]=_0x373f95[_0x116d('0x36')][_0x116d('0x39')]?_0x373f95[_0x116d('0x36')]:_0x56f8d0[_0x116d('0x34')];_0x373f95[_0x116d('0x77')]=qs['sort'](_0x9dad20[_0x116d('0x35')]['sort']);_0x373f95[_0x116d('0x3d')]=qs[_0x116d('0x3e')](_[_0x116d('0x3f')](_0x9dad20['query'],_0x56f8d0[_0x116d('0x3e')]));if(_0x9dad20[_0x116d('0x35')]['filter']){_0x373f95[_0x116d('0x3d')]=_[_0x116d('0x41')](_0x373f95['where'],{'$or':_['map'](_0x373f95[_0x116d('0x36')],function(_0x345e50){var _0x35490f={};_0x35490f[_0x345e50]={'$like':'%'+_0x9dad20[_0x116d('0x35')]['filter']+'%'};return _0x35490f;})});}_0x373f95=_[_0x116d('0x41')]({},_0x373f95,_0x9dad20[_0x116d('0x78')]);return _0x19eb8e[_0x116d('0x75')](_0x373f95);}})['then'](function(_0x4e5fb7){if(_0x4e5fb7){_0x21811a=_0x4e5fb7[_0x116d('0x39')];if(!_0x9dad20[_0x116d('0x35')][_0x116d('0x3a')](_0x116d('0x3b'))){_0x373f95[_0x116d('0x1e')]=qs[_0x116d('0x1e')](_0x9dad20[_0x116d('0x35')][_0x116d('0x1e')]);_0x373f95[_0x116d('0x1f')]=qs[_0x116d('0x1f')](_0x9dad20[_0x116d('0x35')][_0x116d('0x1f')]);}return _0x19eb8e[_0x116d('0x75')](_0x373f95);}})[_0x116d('0x2a')](function(_0x9ec5ee){if(_0x9ec5ee){return _0x9ec5ee?{'count':_0x21811a,'rows':_0x9ec5ee}:null;}})['then'](respondWithResult(_0x4a4877,null))[_0x116d('0x51')](handleError(_0x4a4877,null));}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js index bd36e67..e45108b 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 _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 +var _0x5785=['exports','events','../../mysqldb','Dashboard','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x43f47b,_0x311636){var _0x4af9a6=function(_0x4fb7f0){while(--_0x4fb7f0){_0x43f47b['push'](_0x43f47b['shift']());}};_0x4af9a6(++_0x311636);}(_0x5785,0x119));var _0x5578=function(_0x4e9d3c,_0x1f4b98){_0x4e9d3c=_0x4e9d3c-0x0;var _0x2d0825=_0x5785[_0x4e9d3c];return _0x2d0825;};'use strict';var EventEmitter=require(_0x5578('0x0'));var Dashboard=require(_0x5578('0x1'))['db'][_0x5578('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0x5578('0x3')](0x0);var events={'afterCreate':_0x5578('0x4'),'afterUpdate':'update','afterDestroy':_0x5578('0x5')};function emitEvent(_0x2a3b8a){return function(_0x1af5f6,_0x8c7841,_0x3112c5){DashboardEvents[_0x5578('0x6')](_0x2a3b8a+':'+_0x1af5f6['id'],_0x1af5f6);DashboardEvents[_0x5578('0x6')](_0x2a3b8a,_0x1af5f6);_0x3112c5(null);};}for(var e in events){if(events[_0x5578('0x7')](e)){var event=events[e];Dashboard[_0x5578('0x8')](e,emitEvent(event));}}module[_0x5578('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 00325dd..91f699b 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 _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 +var _0x00b8=['util','../../config/logger','api','moment','bluebird','path','../../config/environment','./dashboard.attributes','exports','define','Dashboard','dashboards','lodash'];(function(_0x4cc662,_0x1c4825){var _0x38020e=function(_0x541046){while(--_0x541046){_0x4cc662['push'](_0x4cc662['shift']());}};_0x38020e(++_0x1c4825);}(_0x00b8,0x1e0));var _0x800b=function(_0x19754d,_0x2a3001){_0x19754d=_0x19754d-0x0;var _0x5135f2=_0x00b8[_0x19754d];return _0x5135f2;};'use strict';var _=require(_0x800b('0x0'));var util=require(_0x800b('0x1'));var logger=require(_0x800b('0x2'))(_0x800b('0x3'));var moment=require(_0x800b('0x4'));var BPromise=require(_0x800b('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x800b('0x6'));var rimraf=require('rimraf');var config=require(_0x800b('0x7'));var attributes=require(_0x800b('0x8'));module[_0x800b('0x9')]=function(_0xf9a2c7,_0x695ff3){return _0xf9a2c7[_0x800b('0xa')](_0x800b('0xb'),attributes,{'tableName':_0x800b('0xc'),'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 8d6c75d..2e22a87 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 _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 +var _0xba4d=['info','Dashboard,\x20%s,\x20%s','request\x20sent','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','localhost','socket.io-emitter','redis','./dashboard.socket','register','request','then'];(function(_0x1a48a5,_0x367138){var _0x4956fe=function(_0xaa6999){while(--_0xaa6999){_0x1a48a5['push'](_0x1a48a5['shift']());}};_0x4956fe(++_0x367138);}(_0xba4d,0x15b));var _0xdba4=function(_0x187399,_0x40c56d){_0x187399=_0x187399-0x0;var _0x40fa92=_0xba4d[_0x187399];return _0x40fa92;};'use strict';var _=require(_0xdba4('0x0'));var util=require('util');var moment=require(_0xdba4('0x1'));var BPromise=require(_0xdba4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdba4('0x3'));var db=require(_0xdba4('0x4'))['db'];var utils=require(_0xdba4('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xdba4('0x6'));var jayson=require(_0xdba4('0x7'));var client=jayson[_0xdba4('0x8')][_0xdba4('0x9')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0xdba4('0xa'),'port':0x18eb});var socket=require(_0xdba4('0xb'))(new Redis(config[_0xdba4('0xc')]));require(_0xdba4('0xd'))[_0xdba4('0xe')](socket);function respondWithRpcPromise(_0x3be539,_0x440b57,_0x15f163){return new BPromise(function(_0x3afc62,_0x12ecf1){return client[_0xdba4('0xf')](_0x3be539,_0x15f163)[_0xdba4('0x10')](function(_0x295a49){logger[_0xdba4('0x11')](_0xdba4('0x12'),_0x440b57,_0xdba4('0x13'));logger['debug'](_0xdba4('0x14'),_0x440b57,_0xdba4('0x13'),JSON[_0xdba4('0x15')](_0x295a49));if(_0x295a49['error']){if(_0x295a49['error']['code']===0x1f4){logger[_0xdba4('0x16')](_0xdba4('0x12'),_0x440b57,_0x295a49[_0xdba4('0x16')][_0xdba4('0x17')]);return _0x12ecf1(_0x295a49['error']['message']);}logger[_0xdba4('0x16')](_0xdba4('0x12'),_0x440b57,_0x295a49[_0xdba4('0x16')]['message']);return _0x3afc62(_0x295a49[_0xdba4('0x16')][_0xdba4('0x17')]);}else{logger[_0xdba4('0x11')]('Dashboard,\x20%s,\x20%s',_0x440b57,_0xdba4('0x13'));_0x3afc62(_0x295a49[_0xdba4('0x18')][_0xdba4('0x17')]);}})[_0xdba4('0x19')](function(_0x2557d1){logger['error']('Dashboard,\x20%s,\x20%s',_0x440b57,_0x2557d1);_0x12ecf1(_0x2557d1);});});} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index 5223ecf..7269d19 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 _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 +var _0x3074=['remove','emit','removeListener','./dashboard.events','save'];(function(_0x317c62,_0x26e37e){var _0x3bd6ce=function(_0x2b2e2e){while(--_0x2b2e2e){_0x317c62['push'](_0x317c62['shift']());}};_0x3bd6ce(++_0x26e37e);}(_0x3074,0xad));var _0x4307=function(_0x226c61,_0x16ee40){_0x226c61=_0x226c61-0x0;var _0xbfcda2=_0x3074[_0x226c61];return _0xbfcda2;};'use strict';var DashboardEvents=require(_0x4307('0x0'));var events=[_0x4307('0x1'),_0x4307('0x2'),'update'];function createListener(_0x48f5e0,_0x5e880a){return function(_0x31b273){_0x5e880a[_0x4307('0x3')](_0x48f5e0,_0x31b273);};}function removeListener(_0x11d0d5,_0x1cae30){return function(){DashboardEvents[_0x4307('0x4')](_0x11d0d5,_0x1cae30);};}exports['register']=function(_0x2a47a6){for(var _0x542757=0x0,_0x177652=events['length'];_0x542757<_0x177652;_0x542757++){var _0x5095f0=events[_0x542757];var _0x4919fa=createListener('dashboard:'+_0x5095f0,_0x2a47a6);DashboardEvents['on'](_0x5095f0,_0x4919fa);}}; \ No newline at end of file diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index c553714..6f88afe 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 _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 +var _0x9414=['connect-timeout','express','fs-extra','../../components/auth/service','./dashboard.controller','index','get','isAuthenticated','show','/:id/items','getItems','post','/:id/clone','clone','addItem','delete','destroy','exports','util','path'];(function(_0x1f8194,_0x3ca7ea){var _0xc17d4b=function(_0x3307f0){while(--_0x3307f0){_0x1f8194['push'](_0x1f8194['shift']());}};_0xc17d4b(++_0x3ca7ea);}(_0x9414,0x166));var _0x4941=function(_0x27bd2c,_0x24bd98){_0x27bd2c=_0x27bd2c-0x0;var _0x3784ea=_0x9414[_0x27bd2c];return _0x3784ea;};'use strict';var multer=require('multer');var util=require(_0x4941('0x0'));var path=require(_0x4941('0x1'));var timeout=require(_0x4941('0x2'));var express=require(_0x4941('0x3'));var router=express['Router']();var fs_extra=require(_0x4941('0x4'));var auth=require(_0x4941('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x4941('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x4941('0x7')]);router[_0x4941('0x8')]('/:id',auth[_0x4941('0x9')](),controller[_0x4941('0xa')]);router[_0x4941('0x8')](_0x4941('0xb'),auth[_0x4941('0x9')](),controller[_0x4941('0xc')]);router[_0x4941('0xd')]('/',auth[_0x4941('0x9')](),controller['create']);router[_0x4941('0xd')](_0x4941('0xe'),auth['isAuthenticated'](),controller[_0x4941('0xf')]);router[_0x4941('0xd')](_0x4941('0xb'),auth[_0x4941('0x9')](),controller[_0x4941('0x10')]);router['put']('/:id',auth[_0x4941('0x9')](),controller['update']);router[_0x4941('0x11')]('/:id',auth[_0x4941('0x9')](),controller[_0x4941('0x12')]);module[_0x4941('0x13')]=router; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.attributes.js b/server/api/dashboardItem/dashboardItem.attributes.js index 2aeaaf4..4df2fde 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 _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 +var _0xfcf0=['sequelize','squel','exports','STRING','TEXT','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','#2196f3'];(function(_0x2adbeb,_0x5581be){var _0x5e18a6=function(_0x84e42b){while(--_0x84e42b){_0x2adbeb['push'](_0x2adbeb['shift']());}};_0x5e18a6(++_0x5581be);}(_0xfcf0,0x138));var _0x0fcf=function(_0x23ec06,_0x561142){_0x23ec06=_0x23ec06-0x0;var _0x2831d4=_0xfcf0[_0x23ec06];return _0x2831d4;};'use strict';var Sequelize=require(_0x0fcf('0x0'));var squel=require(_0x0fcf('0x1'));var _=require('lodash');module[_0x0fcf('0x2')]={'title':{'type':Sequelize[_0x0fcf('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x0fcf('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x0fcf('0x4')]('long'),'get':function(){try{return JSON[_0x0fcf('0x5')](this[_0x0fcf('0x6')](_0x0fcf('0x7')));}catch(_0x3af316){return[];}},'set':function(_0x1bace8){try{this[_0x0fcf('0x8')](_0x0fcf('0x7'),JSON[_0x0fcf('0x9')](_0x1bace8));}catch(_0x50c575){this[_0x0fcf('0x8')](_0x0fcf('0x7'),JSON[_0x0fcf('0x9')]([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x0fcf('0xa')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x0fcf('0xa')]},'col':{'type':Sequelize[_0x0fcf('0xa')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x0fcf('0xb'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x0fcf('0xc'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x0fcf('0x3')]},'titleFontSize':{'type':Sequelize[_0x0fcf('0xa')],'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 64de295..c873526 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 _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 +var _0x9ec8=['attrSerie2','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','sendStatus','status','json','offset','undefined','limit','count','reject','save','then','destroy','end','error','name','show','params','model','keys','DashboardItem','rawAttributes','query','filters','intersection','fields','length','attributes','merge','options','find','catch','type','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','total','attrSerie1'];(function(_0x27775a,_0x5e5203){var _0x5c86ae=function(_0x3b4a98){while(--_0x3b4a98){_0x27775a['push'](_0x27775a['shift']());}};_0x5c86ae(++_0x5e5203);}(_0x9ec8,0xb8));var _0x89ec=function(_0x11ce79,_0x5fc700){_0x11ce79=_0x11ce79-0x0;var _0x1ca410=_0x9ec8[_0x11ce79];return _0x1ca410;};'use strict';var emlformat=require(_0x89ec('0x0'));var rimraf=require(_0x89ec('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x89ec('0x2'));var rp=require(_0x89ec('0x3'));var moment=require(_0x89ec('0x4'));var BPromise=require(_0x89ec('0x5'));var Mustache=require(_0x89ec('0x6'));var util=require(_0x89ec('0x7'));var path=require(_0x89ec('0x8'));var sox=require('sox');var csv=require(_0x89ec('0x9'));var ejs=require(_0x89ec('0xa'));var fs=require('fs');var fs_extra=require(_0x89ec('0xb'));var _=require(_0x89ec('0xc'));var squel=require('squel');var crypto=require(_0x89ec('0xd'));var jsforce=require(_0x89ec('0xe'));var deskjs=require(_0x89ec('0xf'));var toCsv=require(_0x89ec('0x9'));var querystring=require(_0x89ec('0x10'));var Papa=require(_0x89ec('0x11'));var Redis=require('ioredis');var authService=require(_0x89ec('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x89ec('0x13'));var logger=require(_0x89ec('0x14'))(_0x89ec('0x15'));var utils=require(_0x89ec('0x16'));var config=require(_0x89ec('0x17'));var licenseUtil=require(_0x89ec('0x18'));var db=require(_0x89ec('0x19'))['db'];config[_0x89ec('0x1a')]=_[_0x89ec('0x1b')](config[_0x89ec('0x1a')],{'host':_0x89ec('0x1c'),'port':0x18eb});var socket=require(_0x89ec('0x1d'))(new Redis(config[_0x89ec('0x1a')]));require(_0x89ec('0x1e'))[_0x89ec('0x1f')](socket);function respondWithStatusCode(_0x46db4f,_0x4bf5ef){_0x4bf5ef=_0x4bf5ef||0xcc;return function(_0x380310){if(_0x380310){return _0x46db4f[_0x89ec('0x20')](_0x4bf5ef);}return _0x46db4f[_0x89ec('0x21')](_0x4bf5ef)['end']();};}function respondWithResult(_0x11bdfa,_0x536605){_0x536605=_0x536605||0xc8;return function(_0x9ad668){if(_0x9ad668){return _0x11bdfa['status'](_0x536605)[_0x89ec('0x22')](_0x9ad668);}};}function respondWithFilteredResult(_0x5add26,_0x2f7f29){return function(_0x950d79){if(_0x950d79){var _0x1b6ae9=typeof _0x2f7f29[_0x89ec('0x23')]===_0x89ec('0x24')&&typeof _0x2f7f29[_0x89ec('0x25')]===_0x89ec('0x24');var _0x478269=_0x950d79['count'];var _0xb78e7d=_0x1b6ae9?0x0:_0x2f7f29[_0x89ec('0x23')];var _0x5e51cc=_0x1b6ae9?_0x950d79[_0x89ec('0x26')]:_0x2f7f29[_0x89ec('0x23')]+_0x2f7f29['limit'];var _0x543313;if(_0x5e51cc>=_0x478269){_0x5e51cc=_0x478269;_0x543313=0xc8;}else{_0x543313=0xce;}_0x5add26[_0x89ec('0x21')](_0x543313);return _0x5add26['set']('Content-Range',_0xb78e7d+'-'+_0x5e51cc+'/'+_0x478269)[_0x89ec('0x22')](_0x950d79);}return null;};}function patchUpdates(_0x6d7791){return function(_0x365bdc){try{jsonpatch['apply'](_0x365bdc,_0x6d7791,!![]);}catch(_0x3d334a){return BPromise[_0x89ec('0x27')](_0x3d334a);}return _0x365bdc[_0x89ec('0x28')]();};}function saveUpdates(_0x5cfba1,_0x54e635){return function(_0x455740){if(_0x455740){return _0x455740['update'](_0x5cfba1)[_0x89ec('0x29')](function(_0x4d1985){return _0x4d1985;});}return null;};}function removeEntity(_0x785448,_0x4556f9){return function(_0x1dfa83){if(_0x1dfa83){return _0x1dfa83[_0x89ec('0x2a')]()[_0x89ec('0x29')](function(){_0x785448[_0x89ec('0x21')](0xcc)[_0x89ec('0x2b')]();});}};}function handleEntityNotFound(_0x20989e,_0xca70cb){return function(_0x1d3735){if(!_0x1d3735){_0x20989e['sendStatus'](0x194);}return _0x1d3735;};}function handleError(_0x304005,_0xc7086){_0xc7086=_0xc7086||0x1f4;return function(_0x27f48e){logger[_0x89ec('0x2c')](_0x27f48e['stack']);if(_0x27f48e[_0x89ec('0x2d')]){delete _0x27f48e[_0x89ec('0x2d')];}_0x304005[_0x89ec('0x21')](_0xc7086)['send'](_0x27f48e);};}exports[_0x89ec('0x2e')]=function(_0x1db200,_0x574a40){var _0x1b8f0c={'raw':![],'where':{'id':_0x1db200[_0x89ec('0x2f')]['id']}},_0x3313a4={};_0x3313a4[_0x89ec('0x30')]=_[_0x89ec('0x31')](db[_0x89ec('0x32')][_0x89ec('0x33')]);_0x3313a4[_0x89ec('0x34')]=_[_0x89ec('0x31')](_0x1db200[_0x89ec('0x34')]);_0x3313a4[_0x89ec('0x35')]=_[_0x89ec('0x36')](_0x3313a4[_0x89ec('0x30')],_0x3313a4[_0x89ec('0x34')]);_0x1b8f0c['attributes']=_[_0x89ec('0x36')](_0x3313a4[_0x89ec('0x30')],qs[_0x89ec('0x37')](_0x1db200[_0x89ec('0x34')][_0x89ec('0x37')]));_0x1b8f0c['attributes']=_0x1b8f0c['attributes'][_0x89ec('0x38')]?_0x1b8f0c[_0x89ec('0x39')]:_0x3313a4[_0x89ec('0x30')];if(_0x1db200[_0x89ec('0x34')]['includeAll']){_0x1b8f0c['include']=[{'all':!![]}];}_0x1b8f0c=_[_0x89ec('0x3a')]({},_0x1b8f0c,_0x1db200[_0x89ec('0x3b')]);return db[_0x89ec('0x32')][_0x89ec('0x3c')](_0x1b8f0c)[_0x89ec('0x29')](handleEntityNotFound(_0x574a40,null))[_0x89ec('0x29')](respondWithResult(_0x574a40,null))[_0x89ec('0x3d')](handleError(_0x574a40,null));};exports['destroy']=function(_0x374191,_0x418038){return db[_0x89ec('0x32')][_0x89ec('0x3c')]({'where':{'id':_0x374191[_0x89ec('0x2f')]['id']}})[_0x89ec('0x29')](handleEntityNotFound(_0x418038,null))[_0x89ec('0x29')](removeEntity(_0x418038,null))['catch'](handleError(_0x418038,null));};function widgetAttributes(_0x595348){try{switch(_0x595348[_0x89ec('0x3e')]){case _0x89ec('0x3f'):return[{'name':_0x89ec('0x40'),'value':_0x595348['attrUrl']||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x0]?_0x595348[_0x89ec('0x41')][0x0][_0x89ec('0x42')]:undefined)||_0x89ec('0x43')}];case _0x89ec('0x44'):return[{'name':_0x89ec('0x45'),'value':_0x595348[_0x89ec('0x45')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x0]?_0x595348[_0x89ec('0x41')][0x0][_0x89ec('0x42')]:undefined)||''}];case _0x89ec('0x46'):return[{'name':'attrHourFormat','value':_0x595348[_0x89ec('0x47')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x0]?_0x595348[_0x89ec('0x41')][0x0]['value']:undefined)||_0x89ec('0x48')},{'name':_0x89ec('0x49'),'value':_0x595348[_0x89ec('0x49')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x1]?_0x595348[_0x89ec('0x41')][0x1]['value']:undefined)||_0x89ec('0x4a')},{'name':_0x89ec('0x4b'),'value':_0x595348[_0x89ec('0x4b')]||(_0x595348['attrs']&&_0x595348['attrs'][0x2]?_0x595348[_0x89ec('0x41')][0x2][_0x89ec('0x42')]:undefined)||0xc}];case _0x89ec('0x4c'):return[{'name':_0x89ec('0x4d'),'value':_0x595348[_0x89ec('0x4d')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x0]?_0x595348[_0x89ec('0x41')][0x0][_0x89ec('0x42')]:undefined)||_0x89ec('0x4e')},{'name':'attrVoiceQueues','value':_0x595348['attrVoiceQueues']||(_0x595348['attrs']&&_0x595348['attrs'][0x1]?_0x595348[_0x89ec('0x41')][0x1][_0x89ec('0x42')]:undefined)||[]},{'name':_0x89ec('0x4b'),'value':_0x595348[_0x89ec('0x4b')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x2]?_0x595348[_0x89ec('0x41')][0x2][_0x89ec('0x42')]:undefined)||0x14}];case'multibar-chart':case'pie-chart':return[{'name':_0x89ec('0x4f'),'value':_0x595348[_0x89ec('0x4f')]||(_0x595348[_0x89ec('0x41')]&&_0x595348['attrs'][0x0]?_0x595348[_0x89ec('0x41')][0x0][_0x89ec('0x42')]:undefined)||_0x89ec('0x4e')},{'name':'attrSerie2','value':_0x595348[_0x89ec('0x50')]||(_0x595348['attrs']&&_0x595348[_0x89ec('0x41')][0x1]?_0x595348['attrs'][0x1]['value']:undefined)||null},{'name':'attrSerie3','value':_0x595348['attrSerie3']||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x2]?_0x595348[_0x89ec('0x41')][0x2][_0x89ec('0x42')]:undefined)||null},{'name':'attrVoiceQueues','value':_0x595348['attrVoiceQueues']||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x3]?_0x595348[_0x89ec('0x41')][0x3][_0x89ec('0x42')]:undefined)||[]}];case'web-report':return[{'name':_0x89ec('0x51'),'type':_0x595348[_0x89ec('0x52')]||(_0x595348[_0x89ec('0x41')]&&_0x595348['attrs'][0x0]?_0x595348['attrs'][0x0]['type']:undefined)||null,'value':_0x595348[_0x89ec('0x51')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x0]?_0x595348['attrs'][0x0][_0x89ec('0x42')]:undefined)||null},{'name':_0x89ec('0x53'),'value':_0x595348[_0x89ec('0x53')]||(_0x595348[_0x89ec('0x41')]&&_0x595348[_0x89ec('0x41')][0x1]?_0x595348[_0x89ec('0x41')][0x1][_0x89ec('0x42')]:undefined)||0x0}];default:return[];}}catch(_0x5a4451){logger[_0x89ec('0x2c')](_0x89ec('0x54'),JSON[_0x89ec('0x55')](_0x5a4451));return[];}}exports[_0x89ec('0x56')]=function(_0x586746,_0x51e1c6){if(_0x586746[_0x89ec('0x57')]){_0x586746[_0x89ec('0x57')][_0x89ec('0x41')]=widgetAttributes(_0x586746[_0x89ec('0x57')]);}return db[_0x89ec('0x32')][_0x89ec('0x56')](_0x586746[_0x89ec('0x57')],{})[_0x89ec('0x29')](respondWithResult(_0x51e1c6,0xc9))['catch'](handleError(_0x51e1c6,null));};exports['update']=function(_0x3395e6,_0x3a921d){if(_0x3395e6[_0x89ec('0x57')]['id']){delete _0x3395e6[_0x89ec('0x57')]['id'];}_0x3395e6['body'][_0x89ec('0x41')]=widgetAttributes(_0x3395e6['body']);return db[_0x89ec('0x32')]['find']({'where':{'id':_0x3395e6[_0x89ec('0x2f')]['id']}})[_0x89ec('0x29')](handleEntityNotFound(_0x3a921d,null))[_0x89ec('0x29')](saveUpdates(_0x3395e6[_0x89ec('0x57')],null))[_0x89ec('0x29')](respondWithResult(_0x3a921d,null))[_0x89ec('0x3d')](handleError(_0x3a921d,null));}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.events.js b/server/api/dashboardItem/dashboardItem.events.js index 606d411..8322da1 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 _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 +var _0x9d4c=['hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','update','remove','emit'];(function(_0x49c057,_0xc808ed){var _0xd8f0e6=function(_0x5b9042){while(--_0x5b9042){_0x49c057['push'](_0x49c057['shift']());}};_0xd8f0e6(++_0xc808ed);}(_0x9d4c,0xaa));var _0xc9d4=function(_0x55d829,_0x43f06c){_0x55d829=_0x55d829-0x0;var _0x52163b=_0x9d4c[_0x55d829];return _0x52163b;};'use strict';var EventEmitter=require(_0xc9d4('0x0'));var DashboardItem=require(_0xc9d4('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xc9d4('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc9d4('0x3'),'afterDestroy':_0xc9d4('0x4')};function emitEvent(_0x5e30f8){return function(_0x37523a,_0x34bc43,_0x3946ab){DashboardItemEvents[_0xc9d4('0x5')](_0x5e30f8+':'+_0x37523a['id'],_0x37523a);DashboardItemEvents['emit'](_0x5e30f8,_0x37523a);_0x3946ab(null);};}for(var e in events){if(events[_0xc9d4('0x6')](e)){var event=events[e];DashboardItem['hook'](e,emitEvent(event));}}module[_0xc9d4('0x7')]=DashboardItemEvents; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.model.js b/server/api/dashboardItem/dashboardItem.model.js index 9ecfb66..ee7c5b6 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 _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 +var _0xb4aa=['../../config/environment','./dashboardItem.attributes','define','DashboardItem','dashboard_items','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x175085,_0x1aeda6){var _0x217a50=function(_0x5afd1a){while(--_0x5afd1a){_0x175085['push'](_0x175085['shift']());}};_0x217a50(++_0x1aeda6);}(_0xb4aa,0xdd));var _0xab4a=function(_0x42a76d,_0x4740c8){_0x42a76d=_0x42a76d-0x0;var _0x3b7440=_0xb4aa[_0x42a76d];return _0x3b7440;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xab4a('0x0'))(_0xab4a('0x1'));var moment=require(_0xab4a('0x2'));var BPromise=require(_0xab4a('0x3'));var rp=require(_0xab4a('0x4'));var fs=require('fs');var path=require(_0xab4a('0x5'));var rimraf=require(_0xab4a('0x6'));var config=require(_0xab4a('0x7'));var attributes=require(_0xab4a('0x8'));module['exports']=function(_0x4d67bb,_0x3a0292){return _0x4d67bb[_0xab4a('0x9')](_0xab4a('0xa'),attributes,{'tableName':_0xab4a('0xb'),'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 c74ef04..ac430b1 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 _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 +var _0xdf2e=['DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','redis','defaults','localhost','socket.io-emitter','register','info','DashboardItem,\x20%s,\x20%s','debug'];(function(_0x381887,_0x233dda){var _0x8796ae=function(_0x33ca61){while(--_0x33ca61){_0x381887['push'](_0x381887['shift']());}};_0x8796ae(++_0x233dda);}(_0xdf2e,0x70));var _0xedf2=function(_0x4e21ba,_0x18097f){_0x4e21ba=_0x4e21ba-0x0;var _0x55b94b=_0xdf2e[_0x4e21ba];return _0x55b94b;};'use strict';var _=require(_0xedf2('0x0'));var util=require(_0xedf2('0x1'));var moment=require(_0xedf2('0x2'));var BPromise=require('bluebird');var rs=require(_0xedf2('0x3'));var fs=require('fs');var Redis=require(_0xedf2('0x4'));var db=require(_0xedf2('0x5'))['db'];var utils=require(_0xedf2('0x6'));var logger=require(_0xedf2('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xedf2('0x8')][_0xedf2('0x9')]({'port':0x232a});config[_0xedf2('0xa')]=_[_0xedf2('0xb')](config['redis'],{'host':_0xedf2('0xc'),'port':0x18eb});var socket=require(_0xedf2('0xd'))(new Redis(config[_0xedf2('0xa')]));require('./dashboardItem.socket')[_0xedf2('0xe')](socket);function respondWithRpcPromise(_0x30e0b8,_0x3a31a3,_0x442d5f){return new BPromise(function(_0x377154,_0x3f4f60){return client['request'](_0x30e0b8,_0x442d5f)['then'](function(_0x2bf196){logger[_0xedf2('0xf')](_0xedf2('0x10'),_0x3a31a3,'request\x20sent');logger[_0xedf2('0x11')](_0xedf2('0x12'),_0x3a31a3,_0xedf2('0x13'),JSON[_0xedf2('0x14')](_0x2bf196));if(_0x2bf196[_0xedf2('0x15')]){if(_0x2bf196[_0xedf2('0x15')][_0xedf2('0x16')]===0x1f4){logger[_0xedf2('0x15')](_0xedf2('0x10'),_0x3a31a3,_0x2bf196[_0xedf2('0x15')]['message']);return _0x3f4f60(_0x2bf196[_0xedf2('0x15')][_0xedf2('0x17')]);}logger[_0xedf2('0x15')](_0xedf2('0x10'),_0x3a31a3,_0x2bf196['error'][_0xedf2('0x17')]);return _0x377154(_0x2bf196[_0xedf2('0x15')][_0xedf2('0x17')]);}else{logger[_0xedf2('0xf')](_0xedf2('0x10'),_0x3a31a3,_0xedf2('0x13'));_0x377154(_0x2bf196[_0xedf2('0x18')][_0xedf2('0x17')]);}})[_0xedf2('0x19')](function(_0x47cf5d){logger['error'](_0xedf2('0x10'),_0x3a31a3,_0x47cf5d);_0x3f4f60(_0x47cf5d);});});} \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.socket.js b/server/api/dashboardItem/dashboardItem.socket.js index 3293004..2ec8e33 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 _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 +var _0xfb69=['dashboardItem:','./dashboardItem.events','remove','update','emit','removeListener'];(function(_0x29ae80,_0x3579f1){var _0x5d6d71=function(_0xfaffe2){while(--_0xfaffe2){_0x29ae80['push'](_0x29ae80['shift']());}};_0x5d6d71(++_0x3579f1);}(_0xfb69,0x1ed));var _0x9fb6=function(_0x5a36eb,_0x22f894){_0x5a36eb=_0x5a36eb-0x0;var _0x13e7b8=_0xfb69[_0x5a36eb];return _0x13e7b8;};'use strict';var DashboardItemEvents=require(_0x9fb6('0x0'));var events=['save',_0x9fb6('0x1'),_0x9fb6('0x2')];function createListener(_0x38f857,_0x5742a4){return function(_0x1b29d4){_0x5742a4[_0x9fb6('0x3')](_0x38f857,_0x1b29d4);};}function removeListener(_0x3ac220,_0x5c679b){return function(){DashboardItemEvents[_0x9fb6('0x4')](_0x3ac220,_0x5c679b);};}exports['register']=function(_0x45f85e){for(var _0x22e1c3=0x0,_0x4b49da=events['length'];_0x22e1c3<_0x4b49da;_0x22e1c3++){var _0x43a0a6=events[_0x22e1c3];var _0x558069=createListener(_0x9fb6('0x5')+_0x43a0a6,_0x45f85e);DashboardItemEvents['on'](_0x43a0a6,_0x558069);}}; \ No newline at end of file diff --git a/server/api/dashboardItem/index.js b/server/api/dashboardItem/index.js index 6c8c30e..bb87114 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 _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 +var _0xabf1=['put','update','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','get','/:id','isAuthenticated','show','post','create'];(function(_0x421cf8,_0x23152c){var _0x145c48=function(_0x565862){while(--_0x565862){_0x421cf8['push'](_0x421cf8['shift']());}};_0x145c48(++_0x23152c);}(_0xabf1,0x108));var _0x1abf=function(_0x24f9d9,_0x6b4d81){_0x24f9d9=_0x24f9d9-0x0;var _0x392b6c=_0xabf1[_0x24f9d9];return _0x392b6c;};'use strict';var multer=require(_0x1abf('0x0'));var util=require('util');var path=require(_0x1abf('0x1'));var timeout=require(_0x1abf('0x2'));var express=require(_0x1abf('0x3'));var router=express[_0x1abf('0x4')]();var fs_extra=require(_0x1abf('0x5'));var auth=require(_0x1abf('0x6'));var interaction=require(_0x1abf('0x7'));var config=require(_0x1abf('0x8'));var controller=require(_0x1abf('0x9'));router[_0x1abf('0xa')](_0x1abf('0xb'),auth[_0x1abf('0xc')](),controller[_0x1abf('0xd')]);router[_0x1abf('0xe')]('/',auth['isAuthenticated'](),controller[_0x1abf('0xf')]);router[_0x1abf('0x10')](_0x1abf('0xb'),auth[_0x1abf('0xc')](),controller[_0x1abf('0x11')]);router[_0x1abf('0x12')](_0x1abf('0xb'),auth['isAuthenticated'](),controller[_0x1abf('0x13')]);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 ced44ae..8af43e5 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 _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 +var _0x59be=['third','exports','STRING','ENUM','first','second'];(function(_0x481449,_0x5051d4){var _0x258162=function(_0x53356c){while(--_0x53356c){_0x481449['push'](_0x481449['shift']());}};_0x258162(++_0x5051d4);}(_0x59be,0x12d));var _0xe59b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x59be[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0xe59b('0x0')]={'name':{'type':Sequelize[_0xe59b('0x1')],'allowNull':![]},'level':{'type':Sequelize[_0xe59b('0x2')](_0xe59b('0x3'),_0xe59b('0x4'),_0xe59b('0x5')),'allowNull':![],'defaultValue':_0xe59b('0x3')},'description':{'type':Sequelize[_0xe59b('0x1')]}}; \ No newline at end of file diff --git a/server/api/disposition/disposition.controller.js b/server/api/disposition/disposition.controller.js index 6cbe398..f07df5a 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 _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 +var _0x995a=['squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','Dispositions','UserProfileResource','error','name','send','map','Disposition','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','user','get','role','UserProfileSection','userProfileId','autoAssociation','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash'];(function(_0x5cd14d,_0x377ab4){var _0xef4832=function(_0xc7604a){while(--_0xc7604a){_0x5cd14d['push'](_0x5cd14d['shift']());}};_0xef4832(++_0x377ab4);}(_0x995a,0xa0));var _0xa995=function(_0x4d5f7c,_0x28131d){_0x4d5f7c=_0x4d5f7c-0x0;var _0x2dfb22=_0x995a[_0x4d5f7c];return _0x2dfb22;};'use strict';var emlformat=require(_0xa995('0x0'));var rimraf=require(_0xa995('0x1'));var zipdir=require(_0xa995('0x2'));var jsonpatch=require(_0xa995('0x3'));var rp=require(_0xa995('0x4'));var moment=require(_0xa995('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xa995('0x6'));var util=require(_0xa995('0x7'));var path=require(_0xa995('0x8'));var sox=require(_0xa995('0x9'));var csv=require(_0xa995('0xa'));var ejs=require(_0xa995('0xb'));var fs=require('fs');var fs_extra=require(_0xa995('0xc'));var _=require(_0xa995('0xd'));var squel=require(_0xa995('0xe'));var crypto=require(_0xa995('0xf'));var jsforce=require(_0xa995('0x10'));var deskjs=require(_0xa995('0x11'));var toCsv=require(_0xa995('0xa'));var querystring=require(_0xa995('0x12'));var Papa=require(_0xa995('0x13'));var Redis=require(_0xa995('0x14'));var authService=require(_0xa995('0x15'));var qs=require(_0xa995('0x16'));var as=require(_0xa995('0x17'));var hardwareService=require(_0xa995('0x18'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xa995('0x19'));var licenseUtil=require(_0xa995('0x1a'));var db=require(_0xa995('0x1b'))['db'];function respondWithStatusCode(_0x4b0145,_0x5bb151){_0x5bb151=_0x5bb151||0xcc;return function(_0x3bea2f){if(_0x3bea2f){return _0x4b0145[_0xa995('0x1c')](_0x5bb151);}return _0x4b0145[_0xa995('0x1d')](_0x5bb151)[_0xa995('0x1e')]();};}function respondWithResult(_0x52e8e5,_0x211096){_0x211096=_0x211096||0xc8;return function(_0x3171c8){if(_0x3171c8){return _0x52e8e5[_0xa995('0x1d')](_0x211096)[_0xa995('0x1f')](_0x3171c8);}};}function respondWithFilteredResult(_0x25c4b0,_0x306b8a){return function(_0x20a2a8){if(_0x20a2a8){var _0x2a8d56=typeof _0x306b8a[_0xa995('0x20')]===_0xa995('0x21')&&typeof _0x306b8a['limit']===_0xa995('0x21');var _0x300277=_0x20a2a8[_0xa995('0x22')];var _0x14cac1=_0x2a8d56?0x0:_0x306b8a['offset'];var _0x315934=_0x2a8d56?_0x20a2a8[_0xa995('0x22')]:_0x306b8a[_0xa995('0x20')]+_0x306b8a[_0xa995('0x23')];var _0x4d50dc;if(_0x315934>=_0x300277){_0x315934=_0x300277;_0x4d50dc=0xc8;}else{_0x4d50dc=0xce;}_0x25c4b0[_0xa995('0x1d')](_0x4d50dc);return _0x25c4b0[_0xa995('0x24')](_0xa995('0x25'),_0x14cac1+'-'+_0x315934+'/'+_0x300277)['json'](_0x20a2a8);}return null;};}function patchUpdates(_0x5f44bd){return function(_0xd38156){try{jsonpatch[_0xa995('0x26')](_0xd38156,_0x5f44bd,!![]);}catch(_0xb3497d){return BPromise[_0xa995('0x27')](_0xb3497d);}return _0xd38156[_0xa995('0x28')]();};}function saveUpdates(_0x5342ba,_0x476b9d){return function(_0x38f40c){if(_0x38f40c){return _0x38f40c[_0xa995('0x29')](_0x5342ba)[_0xa995('0x2a')](function(_0x179b5e){return _0x179b5e;});}return null;};}function removeEntity(_0x12922e,_0xef83c8){return function(_0xd0ed45){if(_0xd0ed45){return _0xd0ed45[_0xa995('0x2b')]()[_0xa995('0x2a')](function(){var _0xebf43a=_0xd0ed45['get']({'plain':!![]});var _0x1a51ca=_0xa995('0x2c');return db[_0xa995('0x2d')][_0xa995('0x2b')]({'where':{'type':_0x1a51ca,'resourceId':_0xebf43a['id']}})[_0xa995('0x2a')](function(){return _0xd0ed45;});})[_0xa995('0x2a')](function(){_0x12922e['status'](0xcc)[_0xa995('0x1e')]();});}};}function handleEntityNotFound(_0x2ce3c9,_0x4b6816){return function(_0x15e625){if(!_0x15e625){_0x2ce3c9[_0xa995('0x1c')](0x194);}return _0x15e625;};}function handleError(_0x321a96,_0x10ff60){_0x10ff60=_0x10ff60||0x1f4;return function(_0x335569){logger[_0xa995('0x2e')](_0x335569['stack']);if(_0x335569[_0xa995('0x2f')]){delete _0x335569['name'];}_0x321a96[_0xa995('0x1d')](_0x10ff60)[_0xa995('0x30')](_0x335569);};}exports['index']=function(_0x45bd44,_0x33be5f){var _0x271ebd={},_0x5eb9a0={},_0x284a37={'count':0x0,'rows':[]};var _0x4e564d=_[_0xa995('0x31')](db[_0xa995('0x32')][_0xa995('0x33')],function(_0x26da97){return{'name':_0x26da97['fieldName'],'type':_0x26da97['type'][_0xa995('0x34')]};});_0x5eb9a0[_0xa995('0x35')]=_[_0xa995('0x31')](_0x4e564d,_0xa995('0x2f'));_0x5eb9a0[_0xa995('0x36')]=_[_0xa995('0x37')](_0x45bd44[_0xa995('0x36')]);_0x5eb9a0[_0xa995('0x38')]=_[_0xa995('0x39')](_0x5eb9a0[_0xa995('0x35')],_0x5eb9a0['query']);_0x271ebd[_0xa995('0x3a')]=_['intersection'](_0x5eb9a0['model'],qs['fields'](_0x45bd44[_0xa995('0x36')][_0xa995('0x3b')]));_0x271ebd[_0xa995('0x3a')]=_0x271ebd['attributes'][_0xa995('0x3c')]?_0x271ebd[_0xa995('0x3a')]:_0x5eb9a0[_0xa995('0x35')];if(!_0x45bd44[_0xa995('0x36')][_0xa995('0x3d')](_0xa995('0x3e'))){_0x271ebd[_0xa995('0x23')]=qs[_0xa995('0x23')](_0x45bd44[_0xa995('0x36')][_0xa995('0x23')]);_0x271ebd[_0xa995('0x20')]=qs[_0xa995('0x20')](_0x45bd44[_0xa995('0x36')][_0xa995('0x20')]);}_0x271ebd[_0xa995('0x3f')]=qs['sort'](_0x45bd44[_0xa995('0x36')][_0xa995('0x40')]);_0x271ebd[_0xa995('0x41')]=qs['filters'](_[_0xa995('0x42')](_0x45bd44['query'],_0x5eb9a0[_0xa995('0x38')]),_0x4e564d);if(_0x45bd44['query'][_0xa995('0x43')]){_0x271ebd['where']=_[_0xa995('0x44')](_0x271ebd['where'],{'$or':_[_0xa995('0x31')](_0x4e564d,function(_0x526b6a){if(_0x526b6a[_0xa995('0x45')]!==_0xa995('0x46')){var _0x566c80={};_0x566c80[_0x526b6a[_0xa995('0x2f')]]={'$like':'%'+_0x45bd44[_0xa995('0x36')][_0xa995('0x43')]+'%'};return _0x566c80;}})});}_0x271ebd=_['merge']({},_0x271ebd,_0x45bd44[_0xa995('0x47')]);var _0x3ba773={'where':_0x271ebd['where']};return db['Disposition']['count'](_0x3ba773)[_0xa995('0x2a')](function(_0x4b88ca){_0x284a37[_0xa995('0x22')]=_0x4b88ca;if(_0x45bd44[_0xa995('0x36')][_0xa995('0x48')]){_0x271ebd[_0xa995('0x49')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x271ebd);})[_0xa995('0x2a')](function(_0x4d8d8b){_0x284a37[_0xa995('0x4a')]=_0x4d8d8b;return _0x284a37;})['then'](respondWithFilteredResult(_0x33be5f,_0x271ebd))[_0xa995('0x4b')](handleError(_0x33be5f,null));};exports[_0xa995('0x4c')]=function(_0x387427,_0x2388e4){var _0x58197d={'raw':!![],'where':{'id':_0x387427[_0xa995('0x4d')]['id']}},_0x32f56b={};_0x32f56b[_0xa995('0x35')]=_[_0xa995('0x37')](db[_0xa995('0x32')][_0xa995('0x33')]);_0x32f56b[_0xa995('0x36')]=_[_0xa995('0x37')](_0x387427[_0xa995('0x36')]);_0x32f56b[_0xa995('0x38')]=_['intersection'](_0x32f56b[_0xa995('0x35')],_0x32f56b['query']);_0x58197d[_0xa995('0x3a')]=_[_0xa995('0x39')](_0x32f56b[_0xa995('0x35')],qs[_0xa995('0x3b')](_0x387427[_0xa995('0x36')]['fields']));_0x58197d[_0xa995('0x3a')]=_0x58197d[_0xa995('0x3a')][_0xa995('0x3c')]?_0x58197d[_0xa995('0x3a')]:_0x32f56b['model'];if(_0x387427[_0xa995('0x36')][_0xa995('0x48')]){_0x58197d[_0xa995('0x49')]=[{'all':!![]}];}_0x58197d=_['merge']({},_0x58197d,_0x387427['options']);return db[_0xa995('0x32')][_0xa995('0x4e')](_0x58197d)[_0xa995('0x2a')](handleEntityNotFound(_0x2388e4,null))[_0xa995('0x2a')](respondWithResult(_0x2388e4,null))[_0xa995('0x4b')](handleError(_0x2388e4,null));};exports[_0xa995('0x4f')]=function(_0x568901,_0x527d9b){return db[_0xa995('0x32')]['create'](_0x568901['body'],{})[_0xa995('0x2a')](function(_0x5d87c1){var _0x4ce74c=_0x568901[_0xa995('0x50')][_0xa995('0x51')]({'plain':!![]});if(!_0x4ce74c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4ce74c[_0xa995('0x52')]===_0xa995('0x50')){var _0x267534=_0x5d87c1[_0xa995('0x51')]({'plain':!![]});var _0x166a93='Dispositions';return db[_0xa995('0x53')][_0xa995('0x4e')]({'where':{'name':_0x166a93,'userProfileId':_0x4ce74c[_0xa995('0x54')]},'raw':!![]})['then'](function(_0x1d9795){if(_0x1d9795&&_0x1d9795[_0xa995('0x55')]===0x0){return db[_0xa995('0x2d')][_0xa995('0x4f')]({'name':_0x267534[_0xa995('0x2f')],'resourceId':_0x267534['id'],'type':_0x1d9795[_0xa995('0x2f')],'sectionId':_0x1d9795['id']},{})[_0xa995('0x2a')](function(){return _0x5d87c1;});}else{return _0x5d87c1;}})[_0xa995('0x4b')](function(_0x16058b){logger[_0xa995('0x2e')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x16058b);throw _0x16058b;});}return _0x5d87c1;})[_0xa995('0x2a')](respondWithResult(_0x527d9b,0xc9))[_0xa995('0x4b')](handleError(_0x527d9b,null));};exports[_0xa995('0x29')]=function(_0x2b1378,_0x565035){if(_0x2b1378['body']['id']){delete _0x2b1378[_0xa995('0x56')]['id'];}return db['Disposition'][_0xa995('0x4e')]({'where':{'id':_0x2b1378[_0xa995('0x4d')]['id']}})['then'](handleEntityNotFound(_0x565035,null))[_0xa995('0x2a')](saveUpdates(_0x2b1378['body'],null))[_0xa995('0x2a')](respondWithResult(_0x565035,null))[_0xa995('0x4b')](handleError(_0x565035,null));};exports['destroy']=function(_0x5376f8,_0x290376){return db[_0xa995('0x32')][_0xa995('0x4e')]({'where':{'id':_0x5376f8[_0xa995('0x4d')]['id']}})[_0xa995('0x2a')](handleEntityNotFound(_0x290376,null))['then'](removeEntity(_0x290376,null))['catch'](handleError(_0x290376,null));}; \ No newline at end of file diff --git a/server/api/disposition/disposition.model.js b/server/api/disposition/disposition.model.js index f8bf29f..c72cd3f 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 _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 +var _0x351f=['moment','request-promise','path','rimraf','./disposition.attributes','define','Disposition','tools_dispositions','name_voice','name','ListId','name_chat','ChatWebsiteId','name_mail','MailAccountId','name_sms','name_fax','name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','lodash','util','../../config/logger'];(function(_0x2c81ab,_0x5a74a0){var _0x1a7818=function(_0x154dc1){while(--_0x154dc1){_0x2c81ab['push'](_0x2c81ab['shift']());}};_0x1a7818(++_0x5a74a0);}(_0x351f,0xd5));var _0xf351=function(_0x32e029,_0x52a1c4){_0x32e029=_0x32e029-0x0;var _0x56c369=_0x351f[_0x32e029];return _0x56c369;};'use strict';var _=require(_0xf351('0x0'));var util=require(_0xf351('0x1'));var logger=require(_0xf351('0x2'))('api');var moment=require(_0xf351('0x3'));var BPromise=require('bluebird');var rp=require(_0xf351('0x4'));var fs=require('fs');var path=require(_0xf351('0x5'));var rimraf=require(_0xf351('0x6'));var config=require('../../config/environment');var attributes=require(_0xf351('0x7'));module['exports']=function(_0x167ea3,_0x3808b2){return _0x167ea3[_0xf351('0x8')](_0xf351('0x9'),attributes,{'tableName':_0xf351('0xa'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xf351('0xb'),'fields':[_0xf351('0xc'),_0xf351('0xd')]},{'unique':!![],'name':_0xf351('0xe'),'fields':['name',_0xf351('0xf')]},{'unique':!![],'name':_0xf351('0x10'),'fields':['name',_0xf351('0x11')]},{'unique':!![],'name':_0xf351('0x12'),'fields':['name','SmsAccountId']},{'unique':!![],'name':_0xf351('0x13'),'fields':[_0xf351('0xc'),'FaxAccountId']},{'unique':!![],'name':_0xf351('0x14'),'fields':[_0xf351('0xc'),_0xf351('0x15')]},{'unique':!![],'name':_0xf351('0x16'),'fields':[_0xf351('0xc'),_0xf351('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 dc02281..abb969d 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(_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 +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(_0x42b80e,_0x155866){var _0x709264=function(_0xd2863f){while(--_0xd2863f){_0x42b80e['push'](_0x42b80e['shift']());}};_0x709264(++_0x155866);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3c4737,_0x2329ec){_0x3c4737=_0x3c4737-0x0;var _0x2bb926=_0xa9e0[_0x3c4737];return _0x2bb926;};'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 614e88d..312ce86 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 _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 +var _0x52df=['show','post','create','put','delete','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./disposition.controller','get','index','/:id','isAuthenticated'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x52df,0x92));var _0xf52d=function(_0x220b5f,_0x10f186){_0x220b5f=_0x220b5f-0x0;var _0x28389e=_0x52df[_0x220b5f];return _0x28389e;};'use strict';var multer=require(_0xf52d('0x0'));var util=require(_0xf52d('0x1'));var path=require(_0xf52d('0x2'));var timeout=require('connect-timeout');var express=require(_0xf52d('0x3'));var router=express[_0xf52d('0x4')]();var fs_extra=require(_0xf52d('0x5'));var auth=require(_0xf52d('0x6'));var interaction=require(_0xf52d('0x7'));var config=require(_0xf52d('0x8'));var controller=require(_0xf52d('0x9'));router[_0xf52d('0xa')]('/',auth['isAuthenticated'](),controller[_0xf52d('0xb')]);router[_0xf52d('0xa')](_0xf52d('0xc'),auth[_0xf52d('0xd')](),controller[_0xf52d('0xe')]);router[_0xf52d('0xf')]('/',auth[_0xf52d('0xd')](),controller[_0xf52d('0x10')]);router[_0xf52d('0x11')](_0xf52d('0xc'),auth[_0xf52d('0xd')](),controller['update']);router[_0xf52d('0x12')](_0xf52d('0xc'),auth[_0xf52d('0xd')](),controller['destroy']);module[_0xf52d('0x13')]=router; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.attributes.js b/server/api/faxAccount/faxAccount.attributes.js index ee1a255..5f6c9a3 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 _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 +var _0x4556=['setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','STRING','ENUM','xCALLY\x20Motion\x20Fax','localstationid','2400','4800','7200','9600','12000','14400','v17,v27,v29','INTEGER','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'];(function(_0x2c7684,_0x5e24e6){var _0x432a6e=function(_0x1e921b){while(--_0x1e921b){_0x2c7684['push'](_0x2c7684['shift']());}};_0x432a6e(++_0x5e24e6);}(_0x4556,0x8f));var _0x6455=function(_0x15df4d,_0x10e9c2){_0x15df4d=_0x15df4d-0x0;var _0x502e30=_0x4556[_0x15df4d];return _0x502e30;};'use strict';var Sequelize=require(_0x6455('0x0'));module['exports']={'name':{'type':Sequelize[_0x6455('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x6455('0x1')]},'ecm':{'type':Sequelize[_0x6455('0x2')]('yes','no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize['STRING'],'defaultValue':_0x6455('0x3')},'localstationid':{'type':Sequelize[_0x6455('0x1')],'unique':_0x6455('0x4')},'minrate':{'type':Sequelize[_0x6455('0x2')](_0x6455('0x5'),_0x6455('0x6'),_0x6455('0x7'),_0x6455('0x8'),_0x6455('0x9'),_0x6455('0xa')),'defaultValue':_0x6455('0x6')},'maxrate':{'type':Sequelize[_0x6455('0x2')]('2400',_0x6455('0x6'),_0x6455('0x7'),_0x6455('0x8'),'12000','14400'),'defaultValue':_0x6455('0xa')},'modem':{'type':Sequelize[_0x6455('0x1')],'defaultValue':_0x6455('0xb')},'gateway':{'type':Sequelize[_0x6455('0x1')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x6455('0x1')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x6455('0xc')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize['ENUM']('SIP','IAX','DADHI','KHOMP'),'defaultValue':'SIP'},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x6455('0xd')],'defaultValue':function(){return _0x6455('0xe');}},'notificationSound':{'type':Sequelize[_0x6455('0xf')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6455('0xf')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x6455('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x6455('0xf')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x6455('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6455('0xf')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6455('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6455('0xc')],'allowNull':!![],'defaultValue':null,'comment':_0x6455('0x10')},'mandatoryDisposition':{'type':Sequelize[_0x6455('0xf')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x1a53f5){if(!_0x1a53f5)this[_0x6455('0x11')](_0x6455('0x12'),null);this[_0x6455('0x11')](_0x6455('0x13'),_0x1a53f5);}}}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.controller.js b/server/api/faxAccount/faxAccount.controller.js index 312efbd..f726565 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 _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 +var _0x1a37=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxAccount.socket','register','jayson/promise','client','http','request','info','debug','FaxAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','FaxAccount,\x20%s,\x20%s','message','result','catch','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','save','update','then','FaxAccounts','UserProfileResource','destroy','stack','send','index','Pause','FaxAccount','rawAttributes','fieldName','type','key','model','map','name','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','options','include','findAll','params','mandatoryDispositionPause','keys','includeAll','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','describe','FaxAccountId','getDispositions','findOne','Disposition','rows','removeDispositions','ids','addAnswer','CannedAnswer','removeAnswers','FaxInteraction','addInteraction','CmContact','Contact','User','Owner','fullname','internal','Tag','Tags','color','tag','sequelize','transaction','FaxApplication','findAndCountAll','priority','getApplications','context','exten','localstationid','app','description','Fax\x20Extension','appdata','push','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','headerinfo','maxrate','minrate','modem','t38timeout','FAXOPT(','Wait','ReceiveFax','VoiceExtension','bulkCreate','updateAccountApplications','omit','tech','createdAt','ListId','findById','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','FaxMessage','List','Contacts','updatedAt','DESC','attachments','join','server/files/attachments','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','fax','List\x20not\x20found','Send\x20Fax\x20failed','filename','Messages','spread','out','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','papaparse','ioredis'];(function(_0x22fd6d,_0x2be6b2){var _0x416314=function(_0x46998b){while(--_0x46998b){_0x22fd6d['push'](_0x22fd6d['shift']());}};_0x416314(++_0x2be6b2);}(_0x1a37,0xb4));var _0x71a3=function(_0x2df507,_0x553862){_0x2df507=_0x2df507-0x0;var _0x1f7167=_0x1a37[_0x2df507];return _0x1f7167;};'use strict';var emlformat=require(_0x71a3('0x0'));var rimraf=require(_0x71a3('0x1'));var zipdir=require(_0x71a3('0x2'));var jsonpatch=require(_0x71a3('0x3'));var rp=require(_0x71a3('0x4'));var moment=require(_0x71a3('0x5'));var BPromise=require(_0x71a3('0x6'));var Mustache=require(_0x71a3('0x7'));var util=require(_0x71a3('0x8'));var path=require(_0x71a3('0x9'));var sox=require('sox');var csv=require(_0x71a3('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x71a3('0xb'));var _=require(_0x71a3('0xc'));var squel=require(_0x71a3('0xd'));var crypto=require(_0x71a3('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x71a3('0xf'));var Redis=require(_0x71a3('0x10'));var authService=require(_0x71a3('0x11'));var qs=require(_0x71a3('0x12'));var as=require(_0x71a3('0x13'));var hardwareService=require(_0x71a3('0x14'));var logger=require(_0x71a3('0x15'))(_0x71a3('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x71a3('0x17'))['db'];config[_0x71a3('0x18')]=_[_0x71a3('0x19')](config[_0x71a3('0x18')],{'host':_0x71a3('0x1a'),'port':0x18eb});var socket=require(_0x71a3('0x1b'))(new Redis(config[_0x71a3('0x18')]));require(_0x71a3('0x1c'))[_0x71a3('0x1d')](socket);var jayson=require(_0x71a3('0x1e'));var client=jayson[_0x71a3('0x1f')]['http']({'port':0x232c});var client9002=jayson[_0x71a3('0x1f')][_0x71a3('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x59021f,_0x4aa918,_0x41fe1c,_0x3a1c81){return new BPromise(function(_0xee797f,_0x201ed8){var _0x1af1bc=_0x3a1c81||client;return _0x1af1bc[_0x71a3('0x21')](_0x59021f,_0x41fe1c)['then'](function(_0x656cd2){logger[_0x71a3('0x22')]('FaxAccount,\x20%s,\x20%s',_0x4aa918,'request\x20sent');logger[_0x71a3('0x23')](_0x71a3('0x24'),_0x4aa918,_0x71a3('0x25'),JSON[_0x71a3('0x26')](_0x656cd2));if(_0x656cd2[_0x71a3('0x27')]){if(_0x656cd2['error'][_0x71a3('0x28')]===0x1f4){logger[_0x71a3('0x27')](_0x71a3('0x29'),_0x4aa918,_0x656cd2[_0x71a3('0x27')][_0x71a3('0x2a')]);return _0x201ed8(_0x656cd2['error'][_0x71a3('0x2a')]);}logger['error'](_0x71a3('0x29'),_0x4aa918,_0x656cd2[_0x71a3('0x27')][_0x71a3('0x2a')]);return _0xee797f(_0x656cd2[_0x71a3('0x27')][_0x71a3('0x2a')]);}else{logger[_0x71a3('0x22')]('FaxAccount,\x20%s,\x20%s',_0x4aa918,_0x71a3('0x25'));_0xee797f(_0x656cd2[_0x71a3('0x2b')][_0x71a3('0x2a')]);}})[_0x71a3('0x2c')](function(_0xb0f3aa){logger['error'](_0x71a3('0x29'),_0x4aa918,_0xb0f3aa);_0x201ed8(_0xb0f3aa);});});}function respondWithStatusCode(_0x2b414d,_0x4c1a3d){_0x4c1a3d=_0x4c1a3d||0xcc;return function(_0x412746){if(_0x412746){return _0x2b414d['sendStatus'](_0x4c1a3d);}return _0x2b414d[_0x71a3('0x2d')](_0x4c1a3d)[_0x71a3('0x2e')]();};}function respondWithResult(_0x211ea8,_0x35b5c7){_0x35b5c7=_0x35b5c7||0xc8;return function(_0x25f351){if(_0x25f351){return _0x211ea8[_0x71a3('0x2d')](_0x35b5c7)[_0x71a3('0x2f')](_0x25f351);}};}function respondWithFilteredResult(_0x242b85,_0x305eb1){return function(_0x3fc578){if(_0x3fc578){var _0x3ea7aa=typeof _0x305eb1[_0x71a3('0x30')]==='undefined'&&typeof _0x305eb1[_0x71a3('0x31')]===_0x71a3('0x32');var _0x334db0=_0x3fc578[_0x71a3('0x33')];var _0x4a750c=_0x3ea7aa?0x0:_0x305eb1[_0x71a3('0x30')];var _0x216d84=_0x3ea7aa?_0x3fc578[_0x71a3('0x33')]:_0x305eb1[_0x71a3('0x30')]+_0x305eb1[_0x71a3('0x31')];var _0xa82e46;if(_0x216d84>=_0x334db0){_0x216d84=_0x334db0;_0xa82e46=0xc8;}else{_0xa82e46=0xce;}_0x242b85[_0x71a3('0x2d')](_0xa82e46);return _0x242b85['set'](_0x71a3('0x34'),_0x4a750c+'-'+_0x216d84+'/'+_0x334db0)[_0x71a3('0x2f')](_0x3fc578);}return null;};}function patchUpdates(_0x3aaf63){return function(_0x168e9b){try{jsonpatch[_0x71a3('0x35')](_0x168e9b,_0x3aaf63,!![]);}catch(_0x73c8e7){return BPromise[_0x71a3('0x36')](_0x73c8e7);}return _0x168e9b[_0x71a3('0x37')]();};}function saveUpdates(_0x3bf186,_0x3eda28){return function(_0x2376e5){if(_0x2376e5){return _0x2376e5[_0x71a3('0x38')](_0x3bf186)[_0x71a3('0x39')](function(_0x4f9e19){return _0x4f9e19;});}return null;};}function removeEntity(_0x5a3043,_0x2e7c00){return function(_0xcd1106){if(_0xcd1106){return _0xcd1106['destroy']()[_0x71a3('0x39')](function(){var _0x437e2d=_0xcd1106['get']({'plain':!![]});var _0x2f3650=_0x71a3('0x3a');return db[_0x71a3('0x3b')][_0x71a3('0x3c')]({'where':{'type':_0x2f3650,'resourceId':_0x437e2d['id']}})[_0x71a3('0x39')](function(){return _0xcd1106;});})[_0x71a3('0x39')](function(){_0x5a3043[_0x71a3('0x2d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x86c78,_0x1392a6){return function(_0x4043e7){if(!_0x4043e7){_0x86c78['sendStatus'](0x194);}return _0x4043e7;};}function handleError(_0x3fc9d3,_0x2937cf){_0x2937cf=_0x2937cf||0x1f4;return function(_0x3dc1de){logger[_0x71a3('0x27')](_0x3dc1de[_0x71a3('0x3d')]);if(_0x3dc1de['name']){delete _0x3dc1de['name'];}_0x3fc9d3[_0x71a3('0x2d')](_0x2937cf)[_0x71a3('0x3e')](_0x3dc1de);};}exports[_0x71a3('0x3f')]=function(_0x1d7353,_0x36ed2e){var _0x4e7d61={'include':[{'model':db[_0x71a3('0x40')],'as':'mandatoryDispositionPause'}]},_0x223cfd={},_0x16d23c={'count':0x0,'rows':[]};var _0x17c467=_['map'](db[_0x71a3('0x41')][_0x71a3('0x42')],function(_0x46e6ce){return{'name':_0x46e6ce[_0x71a3('0x43')],'type':_0x46e6ce[_0x71a3('0x44')][_0x71a3('0x45')]};});_0x223cfd[_0x71a3('0x46')]=_[_0x71a3('0x47')](_0x17c467,_0x71a3('0x48'));_0x223cfd[_0x71a3('0x49')]=_['keys'](_0x1d7353[_0x71a3('0x49')]);_0x223cfd['filters']=_[_0x71a3('0x4a')](_0x223cfd[_0x71a3('0x46')],_0x223cfd[_0x71a3('0x49')]);_0x4e7d61[_0x71a3('0x4b')]=_['intersection'](_0x223cfd[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x1d7353['query'][_0x71a3('0x4c')]));_0x4e7d61[_0x71a3('0x4b')]=_0x4e7d61[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x4e7d61['attributes']:_0x223cfd[_0x71a3('0x46')];if(!_0x1d7353[_0x71a3('0x49')][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x4e7d61[_0x71a3('0x31')]=qs[_0x71a3('0x31')](_0x1d7353[_0x71a3('0x49')][_0x71a3('0x31')]);_0x4e7d61[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0x1d7353[_0x71a3('0x49')][_0x71a3('0x30')]);}_0x4e7d61[_0x71a3('0x50')]=qs[_0x71a3('0x51')](_0x1d7353[_0x71a3('0x49')][_0x71a3('0x51')]);_0x4e7d61['where']=qs[_0x71a3('0x52')](_[_0x71a3('0x53')](_0x1d7353['query'],_0x223cfd[_0x71a3('0x52')]),_0x17c467);if(_0x1d7353[_0x71a3('0x49')][_0x71a3('0x54')]){_0x4e7d61[_0x71a3('0x55')]=_[_0x71a3('0x56')](_0x4e7d61['where'],{'$or':_['map'](_0x17c467,function(_0x298143){if(_0x298143[_0x71a3('0x44')]!=='VIRTUAL'){var _0x389090={};_0x389090[_0x298143[_0x71a3('0x48')]]={'$like':'%'+_0x1d7353[_0x71a3('0x49')][_0x71a3('0x54')]+'%'};return _0x389090;}})});}_0x4e7d61=_[_0x71a3('0x56')]({},_0x4e7d61,_0x1d7353[_0x71a3('0x57')]);var _0x501a62={'where':_0x4e7d61[_0x71a3('0x55')]};return db['FaxAccount'][_0x71a3('0x33')](_0x501a62)[_0x71a3('0x39')](function(_0xc83d8){_0x16d23c[_0x71a3('0x33')]=_0xc83d8;if(_0x1d7353[_0x71a3('0x49')]['includeAll']){_0x4e7d61[_0x71a3('0x58')]=[{'all':!![]}];}return db[_0x71a3('0x41')][_0x71a3('0x59')](_0x4e7d61);})['then'](function(_0x6c34){_0x16d23c['rows']=_0x6c34;return _0x16d23c;})[_0x71a3('0x39')](respondWithFilteredResult(_0x36ed2e,_0x4e7d61))[_0x71a3('0x2c')](handleError(_0x36ed2e,null));};exports['show']=function(_0x30cea2,_0x101756){var _0xa62a74={'raw':![],'where':{'id':_0x30cea2[_0x71a3('0x5a')]['id']},'include':[{'model':db[_0x71a3('0x40')],'as':_0x71a3('0x5b')}]},_0x384f38={};_0x384f38['model']=_[_0x71a3('0x5c')](db['FaxAccount'][_0x71a3('0x42')]);_0x384f38['query']=_[_0x71a3('0x5c')](_0x30cea2[_0x71a3('0x49')]);_0x384f38[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x384f38['model'],_0x384f38['query']);_0xa62a74[_0x71a3('0x4b')]=_[_0x71a3('0x4a')](_0x384f38[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x30cea2['query']['fields']));_0xa62a74[_0x71a3('0x4b')]=_0xa62a74[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0xa62a74[_0x71a3('0x4b')]:_0x384f38[_0x71a3('0x46')];if(_0x30cea2['query'][_0x71a3('0x5d')]){_0xa62a74[_0x71a3('0x58')]=[{'all':!![]}];}_0xa62a74=_[_0x71a3('0x56')]({},_0xa62a74,_0x30cea2[_0x71a3('0x57')]);return db[_0x71a3('0x41')][_0x71a3('0x5e')](_0xa62a74)[_0x71a3('0x39')](handleEntityNotFound(_0x101756,null))[_0x71a3('0x39')](respondWithResult(_0x101756,null))['catch'](handleError(_0x101756,null));};exports[_0x71a3('0x5f')]=function(_0xf40cb0,_0x563270){return db['FaxAccount'][_0x71a3('0x5f')](_0xf40cb0[_0x71a3('0x60')],{})[_0x71a3('0x39')](function(_0x23988d){var _0x1d0488=_0xf40cb0[_0x71a3('0x61')][_0x71a3('0x62')]({'plain':!![]});if(!_0x1d0488)throw new Error(_0x71a3('0x63'));if(_0x1d0488[_0x71a3('0x64')]===_0x71a3('0x61')){var _0x532714=_0x23988d[_0x71a3('0x62')]({'plain':!![]});var _0x324ee7='FaxAccounts';return db[_0x71a3('0x65')]['find']({'where':{'name':_0x324ee7,'userProfileId':_0x1d0488['userProfileId']},'raw':!![]})[_0x71a3('0x39')](function(_0x8040d3){if(_0x8040d3&&_0x8040d3[_0x71a3('0x66')]===0x0){return db[_0x71a3('0x3b')][_0x71a3('0x5f')]({'name':_0x532714['name'],'resourceId':_0x532714['id'],'type':_0x8040d3[_0x71a3('0x48')],'sectionId':_0x8040d3['id']},{})[_0x71a3('0x39')](function(){return _0x23988d;});}else{return _0x23988d;}})['catch'](function(_0x7240bf){logger['error'](_0x71a3('0x67'),_0x7240bf);throw _0x7240bf;});}return _0x23988d;})[_0x71a3('0x39')](respondWithResult(_0x563270,0xc9))['catch'](handleError(_0x563270,null));};exports['update']=function(_0x60c653,_0x39f38b){if(_0x60c653['body']['id']){delete _0x60c653[_0x71a3('0x60')]['id'];}return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x60c653['params']['id']},'include':[{'model':db[_0x71a3('0x40')],'as':_0x71a3('0x5b')}]})[_0x71a3('0x39')](handleEntityNotFound(_0x39f38b,null))[_0x71a3('0x39')](saveUpdates(_0x60c653[_0x71a3('0x60')],null))[_0x71a3('0x39')](respondWithResult(_0x39f38b,null))[_0x71a3('0x2c')](handleError(_0x39f38b,null));};exports[_0x71a3('0x3c')]=function(_0xe03bb5,_0x4b6b75){return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0xe03bb5[_0x71a3('0x5a')]['id']}})['then'](handleEntityNotFound(_0x4b6b75,null))[_0x71a3('0x39')](removeEntity(_0x4b6b75,null))[_0x71a3('0x2c')](handleError(_0x4b6b75,null));};exports[_0x71a3('0x68')]=function(_0x2e8523,_0x265cd5){return db[_0x71a3('0x41')][_0x71a3('0x68')]()[_0x71a3('0x39')](respondWithResult(_0x265cd5,null))[_0x71a3('0x2c')](handleError(_0x265cd5,null));};exports['addDisposition']=function(_0x2e0a69,_0x5a5b72,_0x37e602){if(_0x2e0a69['body']['id']){delete _0x2e0a69['body']['id'];}return db[_0x71a3('0x41')]['find']({'where':{'id':_0x2e0a69[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x5a5b72,null))[_0x71a3('0x39')](function(_0x4aa296){if(_0x4aa296){_0x2e0a69[_0x71a3('0x60')][_0x71a3('0x69')]=_0x4aa296['id'];return db['Disposition'][_0x71a3('0x5f')](_0x2e0a69[_0x71a3('0x60')]);}})[_0x71a3('0x39')](respondWithResult(_0x5a5b72,null))[_0x71a3('0x2c')](handleError(_0x5a5b72,null));};exports[_0x71a3('0x6a')]=function(_0xd8a124,_0x21c71b,_0x30eb3c){var _0x4917ff={'raw':![],'where':{}};var _0x5a2ea0={};var _0x1377aa={'count':0x0,'rows':[]};return db[_0x71a3('0x41')][_0x71a3('0x6b')]({'where':{'id':_0xd8a124['params']['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x21c71b,null))[_0x71a3('0x39')](function(_0x56c7c2){if(_0x56c7c2){_0x5a2ea0[_0x71a3('0x46')]=_['keys'](db[_0x71a3('0x6c')][_0x71a3('0x42')]);_0x5a2ea0[_0x71a3('0x49')]=_[_0x71a3('0x5c')](_0xd8a124['query']);_0x5a2ea0[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x5a2ea0['model'],_0x5a2ea0[_0x71a3('0x49')]);_0x4917ff[_0x71a3('0x4b')]=_[_0x71a3('0x4a')](_0x5a2ea0[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0xd8a124[_0x71a3('0x49')][_0x71a3('0x4c')]));_0x4917ff[_0x71a3('0x4b')]=_0x4917ff[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x4917ff[_0x71a3('0x4b')]:_0x5a2ea0[_0x71a3('0x46')];if(!_0xd8a124['query'][_0x71a3('0x4e')]('nolimit')){_0x4917ff[_0x71a3('0x31')]=qs[_0x71a3('0x31')](_0xd8a124[_0x71a3('0x49')][_0x71a3('0x31')]);_0x4917ff[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0xd8a124[_0x71a3('0x49')][_0x71a3('0x30')]);}_0x4917ff[_0x71a3('0x50')]=qs[_0x71a3('0x51')](_0xd8a124[_0x71a3('0x49')][_0x71a3('0x51')]);_0x4917ff[_0x71a3('0x55')]=qs[_0x71a3('0x52')](_[_0x71a3('0x53')](_0xd8a124[_0x71a3('0x49')],_0x5a2ea0[_0x71a3('0x52')]));_0x4917ff[_0x71a3('0x55')][_0x71a3('0x69')]=_0x56c7c2['id'];if(_0xd8a124['query'][_0x71a3('0x54')]){_0x4917ff[_0x71a3('0x55')]=_[_0x71a3('0x56')](_0x4917ff[_0x71a3('0x55')],{'$or':_[_0x71a3('0x47')](_0x4917ff[_0x71a3('0x4b')],function(_0x35e802){var _0x5a5f84={};_0x5a5f84[_0x35e802]={'$like':'%'+_0xd8a124[_0x71a3('0x49')]['filter']+'%'};return _0x5a5f84;})});}_0x4917ff=_['merge']({},_0x4917ff,_0xd8a124['options']);return db['Disposition']['count']({'where':_0x4917ff['where']})[_0x71a3('0x39')](function(_0x3189fc){_0x1377aa[_0x71a3('0x33')]=_0x3189fc;if(_0xd8a124[_0x71a3('0x49')][_0x71a3('0x5d')]){_0x4917ff[_0x71a3('0x58')]=[{'all':!![]}];}return db[_0x71a3('0x6c')][_0x71a3('0x59')](_0x4917ff);})[_0x71a3('0x39')](function(_0x291c32){_0x1377aa[_0x71a3('0x6d')]=_0x291c32;return _0x1377aa;});}})[_0x71a3('0x39')](respondWithFilteredResult(_0x21c71b,_0x4917ff))[_0x71a3('0x2c')](handleError(_0x21c71b,null));};exports['removeDispositions']=function(_0x295213,_0x18e375,_0x27cad5){return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x295213[_0x71a3('0x5a')]['id']}})['then'](handleEntityNotFound(_0x18e375,null))['then'](function(_0x4dea94){if(_0x4dea94){return _0x4dea94[_0x71a3('0x6e')](_0x295213[_0x71a3('0x49')][_0x71a3('0x6f')]);}})['then'](respondWithStatusCode(_0x18e375,null))[_0x71a3('0x2c')](handleError(_0x18e375,null));};exports[_0x71a3('0x70')]=function(_0x401329,_0x3f5548,_0x2fb980){if(_0x401329[_0x71a3('0x60')]['id']){delete _0x401329[_0x71a3('0x60')]['id'];}return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x401329['params']['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x3f5548,null))[_0x71a3('0x39')](function(_0x48b3fc){if(_0x48b3fc){_0x401329[_0x71a3('0x60')]['FaxAccountId']=_0x48b3fc['id'];return db[_0x71a3('0x71')][_0x71a3('0x5f')](_0x401329[_0x71a3('0x60')]);}})[_0x71a3('0x39')](respondWithResult(_0x3f5548,null))[_0x71a3('0x2c')](handleError(_0x3f5548,null));};exports['getAnswers']=function(_0x471c80,_0x1bca59,_0x51a48f){var _0x1aed85={'raw':![],'where':{}};var _0x358853={};var _0xeeac56={'count':0x0,'rows':[]};return db['FaxAccount'][_0x71a3('0x6b')]({'where':{'id':_0x471c80[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x1bca59,null))['then'](function(_0x51ec7b){if(_0x51ec7b){_0x358853[_0x71a3('0x46')]=_[_0x71a3('0x5c')](db[_0x71a3('0x71')]['rawAttributes']);_0x358853[_0x71a3('0x49')]=_['keys'](_0x471c80[_0x71a3('0x49')]);_0x358853[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x358853['model'],_0x358853[_0x71a3('0x49')]);_0x1aed85['attributes']=_[_0x71a3('0x4a')](_0x358853[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x471c80[_0x71a3('0x49')][_0x71a3('0x4c')]));_0x1aed85['attributes']=_0x1aed85[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x1aed85['attributes']:_0x358853['model'];if(!_0x471c80[_0x71a3('0x49')][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x1aed85['limit']=qs[_0x71a3('0x31')](_0x471c80[_0x71a3('0x49')][_0x71a3('0x31')]);_0x1aed85[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0x471c80[_0x71a3('0x49')][_0x71a3('0x30')]);}_0x1aed85['order']=qs[_0x71a3('0x51')](_0x471c80[_0x71a3('0x49')][_0x71a3('0x51')]);_0x1aed85[_0x71a3('0x55')]=qs['filters'](_[_0x71a3('0x53')](_0x471c80[_0x71a3('0x49')],_0x358853[_0x71a3('0x52')]));_0x1aed85[_0x71a3('0x55')][_0x71a3('0x69')]=_0x51ec7b['id'];if(_0x471c80[_0x71a3('0x49')][_0x71a3('0x54')]){_0x1aed85[_0x71a3('0x55')]=_['merge'](_0x1aed85[_0x71a3('0x55')],{'$or':_['map'](_0x1aed85[_0x71a3('0x4b')],function(_0x3b48d5){var _0x212596={};_0x212596[_0x3b48d5]={'$like':'%'+_0x471c80[_0x71a3('0x49')]['filter']+'%'};return _0x212596;})});}_0x1aed85=_['merge']({},_0x1aed85,_0x471c80['options']);return db[_0x71a3('0x71')][_0x71a3('0x33')]({'where':_0x1aed85[_0x71a3('0x55')]})[_0x71a3('0x39')](function(_0x2bd58f){_0xeeac56[_0x71a3('0x33')]=_0x2bd58f;if(_0x471c80[_0x71a3('0x49')][_0x71a3('0x5d')]){_0x1aed85[_0x71a3('0x58')]=[{'all':!![]}];}return db[_0x71a3('0x71')]['findAll'](_0x1aed85);})[_0x71a3('0x39')](function(_0x209406){_0xeeac56[_0x71a3('0x6d')]=_0x209406;return _0xeeac56;});}})[_0x71a3('0x39')](respondWithFilteredResult(_0x1bca59,_0x1aed85))[_0x71a3('0x2c')](handleError(_0x1bca59,null));};exports[_0x71a3('0x72')]=function(_0x58c6be,_0x47560c,_0x5ee509){return db[_0x71a3('0x41')]['find']({'where':{'id':_0x58c6be[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x47560c,null))['then'](function(_0x39be2c){if(_0x39be2c){return _0x39be2c['removeAnswers'](_0x58c6be[_0x71a3('0x49')]['ids']);}})[_0x71a3('0x39')](respondWithStatusCode(_0x47560c,null))[_0x71a3('0x2c')](handleError(_0x47560c,null));};exports['addInteraction']=function(_0x2a620a,_0x421602,_0x31bbd9){return db[_0x71a3('0x73')][_0x71a3('0x5e')]({'where':{'id':_0x2a620a[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x421602,null))[_0x71a3('0x39')](function(_0x564019){if(_0x564019){return _0x564019[_0x71a3('0x74')](_0x2a620a[_0x71a3('0x60')][_0x71a3('0x6f')],_['omit'](_0x2a620a[_0x71a3('0x60')],[_0x71a3('0x6f'),'id'])||{});}})[_0x71a3('0x39')](respondWithResult(_0x421602,null))['catch'](handleError(_0x421602,null));};exports['getInteractions']=function(_0x2149ee,_0x435370,_0x55ae0e){var _0x34eecb={'raw':![],'where':{}};var _0x844dba={};var _0x15d28b={'count':0x0,'rows':[]};return db[_0x71a3('0x41')][_0x71a3('0x6b')]({'where':{'id':_0x2149ee[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x435370,null))['then'](function(_0xe4be10){if(_0xe4be10){_0x844dba[_0x71a3('0x46')]=_['keys'](db['FaxInteraction'][_0x71a3('0x42')]);_0x844dba[_0x71a3('0x49')]=_['keys'](_0x2149ee[_0x71a3('0x49')]);_0x844dba[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x844dba['model'],_0x844dba['query']);_0x34eecb[_0x71a3('0x4b')]=_[_0x71a3('0x4a')](_0x844dba[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x2149ee[_0x71a3('0x49')][_0x71a3('0x4c')]));_0x34eecb[_0x71a3('0x4b')]=_0x34eecb[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x34eecb['attributes']:_0x844dba[_0x71a3('0x46')];if(!_0x2149ee['query'][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x34eecb[_0x71a3('0x31')]=qs[_0x71a3('0x31')](_0x2149ee['query'][_0x71a3('0x31')]);_0x34eecb[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0x2149ee[_0x71a3('0x49')][_0x71a3('0x30')]);}_0x34eecb['order']=qs[_0x71a3('0x51')](_0x2149ee[_0x71a3('0x49')]['sort']);_0x34eecb[_0x71a3('0x55')]=qs['filters'](_[_0x71a3('0x53')](_0x2149ee[_0x71a3('0x49')],_0x844dba[_0x71a3('0x52')]));_0x34eecb[_0x71a3('0x55')][_0x71a3('0x69')]=_0xe4be10['id'];if(_0x2149ee['query'][_0x71a3('0x54')]){_0x34eecb['where']=_[_0x71a3('0x56')](_0x34eecb[_0x71a3('0x55')],{'$or':_[_0x71a3('0x47')](_0x34eecb[_0x71a3('0x4b')],function(_0x2a6d88){var _0x4521cb={};_0x4521cb[_0x2a6d88]={'$like':'%'+_0x2149ee[_0x71a3('0x49')][_0x71a3('0x54')]+'%'};return _0x4521cb;})});}_0x34eecb=_[_0x71a3('0x56')]({},_0x34eecb,_0x2149ee[_0x71a3('0x57')]);return db[_0x71a3('0x73')][_0x71a3('0x33')]({'where':_0x34eecb[_0x71a3('0x55')]})[_0x71a3('0x39')](function(_0x5ea267){_0x15d28b['count']=_0x5ea267;if(_0x2149ee['query'][_0x71a3('0x5d')]){_0x34eecb['include']=[{'model':db[_0x71a3('0x75')],'as':_0x71a3('0x76'),'required':![]},{'model':db[_0x71a3('0x77')],'as':_0x71a3('0x78'),'attributes':['name',_0x71a3('0x79'),_0x71a3('0x7a')],'required':![]},{'model':db[_0x71a3('0x7b')],'as':_0x71a3('0x7c'),'attributes':['id',_0x71a3('0x48'),_0x71a3('0x7d')],'where':_0x2149ee[_0x71a3('0x49')][_0x71a3('0x7e')]?{'id':_0x2149ee[_0x71a3('0x49')]['tag']}:undefined,'required':_0x2149ee[_0x71a3('0x49')]['tag']?!![]:![]}];}return db['FaxInteraction'][_0x71a3('0x59')](_0x34eecb);})[_0x71a3('0x39')](function(_0xcc96dc){_0x15d28b[_0x71a3('0x6d')]=_0xcc96dc;return _0x15d28b;});}})[_0x71a3('0x39')](respondWithFilteredResult(_0x435370,_0x34eecb))[_0x71a3('0x2c')](handleError(_0x435370,null));};exports['addApplications']=function(_0x299f2b,_0x1fca5c,_0xd86448){return db[_0x71a3('0x41')][_0x71a3('0x6b')]({'where':{'id':_0x299f2b[_0x71a3('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1fca5c,null))['then'](function(_0x30a6bc){if(_0x30a6bc){return db[_0x71a3('0x7f')][_0x71a3('0x80')](function(_0x52f2f1){return db[_0x71a3('0x81')][_0x71a3('0x3c')]({'where':{'FaxAccountId':_0x299f2b[_0x71a3('0x5a')]['id']},'transaction':_0x52f2f1})['then'](function(_0x53c852){var _0x27c5a1=_[_0x71a3('0x47')](_0x299f2b[_0x71a3('0x60')],function(_0xc2d8eb){_0xc2d8eb[_0x71a3('0x69')]=_0x299f2b[_0x71a3('0x5a')]['id'];return _0xc2d8eb;});return db[_0x71a3('0x81')]['bulkCreate'](_0x27c5a1,{'transaction':_0x52f2f1});});})[_0x71a3('0x39')](function(){return db[_0x71a3('0x81')][_0x71a3('0x82')]({'where':{'FaxAccountId':_0x299f2b[_0x71a3('0x5a')]['id']},'order':_0x71a3('0x83')});});}})[_0x71a3('0x39')](respondWithResult(_0x1fca5c,null))[_0x71a3('0x2c')](handleError(_0x1fca5c,null));};exports[_0x71a3('0x84')]=function(_0x57b066,_0xb7145c,_0x443189){var _0x6e4ba9={};var _0x33267c={};var _0x435b9d;var _0x358ba9;return db['FaxAccount'][_0x71a3('0x6b')]({'where':{'id':_0x57b066[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0xb7145c,null))[_0x71a3('0x39')](function(_0x1526ec){if(_0x1526ec){_0x435b9d=_0x1526ec;_0x33267c[_0x71a3('0x46')]=_[_0x71a3('0x5c')](db[_0x71a3('0x81')][_0x71a3('0x42')]);_0x33267c[_0x71a3('0x49')]=_[_0x71a3('0x5c')](_0x57b066[_0x71a3('0x49')]);_0x33267c[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x33267c[_0x71a3('0x46')],_0x33267c[_0x71a3('0x49')]);_0x6e4ba9['attributes']=_[_0x71a3('0x4a')](_0x33267c[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x57b066[_0x71a3('0x49')]['fields']));_0x6e4ba9[_0x71a3('0x4b')]=_0x6e4ba9[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x6e4ba9[_0x71a3('0x4b')]:_0x33267c[_0x71a3('0x46')];_0x6e4ba9[_0x71a3('0x50')]=qs['sort'](_0x57b066['query'][_0x71a3('0x51')]);_0x6e4ba9['where']=qs['filters'](_[_0x71a3('0x53')](_0x57b066[_0x71a3('0x49')],_0x33267c[_0x71a3('0x52')]));if(_0x57b066[_0x71a3('0x49')]['filter']){_0x6e4ba9[_0x71a3('0x55')]=_[_0x71a3('0x56')](_0x6e4ba9['where'],{'$or':_[_0x71a3('0x47')](_0x6e4ba9[_0x71a3('0x4b')],function(_0x3965d1){var _0x14b32c={};_0x14b32c[_0x3965d1]={'$like':'%'+_0x57b066[_0x71a3('0x49')][_0x71a3('0x54')]+'%'};return _0x14b32c;})});}_0x6e4ba9=_[_0x71a3('0x56')]({},_0x6e4ba9,_0x57b066[_0x71a3('0x57')]);return _0x435b9d[_0x71a3('0x84')](_0x6e4ba9);}})[_0x71a3('0x39')](function(_0x538005){if(_0x538005){_0x358ba9=_0x538005[_0x71a3('0x4d')];if(!_0x57b066[_0x71a3('0x49')][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x6e4ba9[_0x71a3('0x31')]=qs['limit'](_0x57b066[_0x71a3('0x49')]['limit']);_0x6e4ba9['offset']=qs[_0x71a3('0x30')](_0x57b066[_0x71a3('0x49')][_0x71a3('0x30')]);}return _0x435b9d['getApplications'](_0x6e4ba9);}})['then'](function(_0x38b799){if(_0x38b799){return _0x38b799?{'count':_0x358ba9,'rows':_0x38b799}:null;}})[_0x71a3('0x39')](respondWithResult(_0xb7145c,null))[_0x71a3('0x2c')](handleError(_0xb7145c,null));};function Extension(_0x45fdd4,_0x12542a,_0x1358cc,_0x353a49){this[_0x71a3('0x85')]='from-voip-provider';this[_0x71a3('0x86')]=_0x45fdd4[_0x71a3('0x87')];this[_0x71a3('0x88')]=_0x353a49;this[_0x71a3('0x44')]='system';this[_0x71a3('0x89')]=_0x71a3('0x8a');this['FaxAccountId']=_0x45fdd4['id'];this[_0x71a3('0x83')]=_0x12542a;this[_0x71a3('0x8b')]=_0x1358cc;}function createExtensionsReciveFax(_0x302ad){var _0x5c17b9=0x1;var _0x115cdd=[];_0x115cdd[_0x71a3('0x8c')](new Extension(_0x302ad,_0x5c17b9,'','Answer'));_0x5c17b9+=0x1;_0x115cdd[_0x71a3('0x8c')](new Extension(_0x302ad,_0x5c17b9,_0x71a3('0x8d'),_0x71a3('0x8e')));_0x5c17b9+=0x1;for(var _0x13b1f7 in _0x302ad){if(_0x302ad[_0x71a3('0x4e')](_0x13b1f7)&&(_0x13b1f7===_0x71a3('0x8f')||_0x13b1f7===_0x71a3('0x87')||_0x13b1f7===_0x71a3('0x90')||_0x13b1f7===_0x71a3('0x91')||_0x13b1f7===_0x71a3('0x92')||_0x13b1f7===_0x71a3('0x93')||_0x13b1f7===_0x71a3('0x94')||_0x13b1f7===_0x71a3('0x95')||_0x13b1f7===_0x71a3('0x96'))){_0x115cdd[_0x71a3('0x8c')](new Extension(_0x302ad,_0x5c17b9,_0x71a3('0x97')+_0x13b1f7+')='+_0x302ad[_0x13b1f7],'Set'));_0x5c17b9+=0x1;}}_0x115cdd[_0x71a3('0x8c')](new Extension(_0x302ad,_0x5c17b9,'6',_0x71a3('0x98')));_0x5c17b9+=0x1;_0x115cdd[_0x71a3('0x8c')](new Extension(_0x302ad,_0x5c17b9,'/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',_0x71a3('0x99')));_0x5c17b9=0x0;return _0x115cdd;}exports['addAccountApplications']=function(_0x557adb,_0x4b2324,_0xd95740){var _0x1cdf2b;return db[_0x71a3('0x7f')][_0x71a3('0x80')](function(_0x3eb84f){return db[_0x71a3('0x41')][_0x71a3('0x5f')](_0x557adb[_0x71a3('0x60')],{'transaction':_0x3eb84f})[_0x71a3('0x39')](function(_0x420c4a){_0x1cdf2b=_0x420c4a[_0x71a3('0x62')]({'plain':!![]});return db[_0x71a3('0x9a')][_0x71a3('0x9b')](createExtensionsReciveFax(_0x1cdf2b),{'transaction':_0x3eb84f});});})[_0x71a3('0x39')](function(){return _0x1cdf2b;})[_0x71a3('0x39')](respondWithResult(_0x4b2324,null))['catch'](handleError(_0x4b2324,null));};exports[_0x71a3('0x9c')]=function(_0x2df6d5,_0x27622d,_0x2bc510){var _0x50a97e;return db[_0x71a3('0x7f')][_0x71a3('0x80')](function(_0x39a201){return db[_0x71a3('0x41')][_0x71a3('0x38')](_0x2df6d5['body'],{'where':{'id':_0x2df6d5[_0x71a3('0x60')]['id']},'transaction':_0x39a201})[_0x71a3('0x39')](function(_0x44bb40){return db[_0x71a3('0x9a')][_0x71a3('0x3c')]({'where':{'FaxAccountId':_0x2df6d5[_0x71a3('0x60')]['id']},'transaction':_0x39a201})[_0x71a3('0x39')](function(_0x4a2414){return db[_0x71a3('0x9a')][_0x71a3('0x9b')](createExtensionsReciveFax(_[_0x71a3('0x9d')](_0x2df6d5[_0x71a3('0x60')],[_0x71a3('0x9e'),_0x71a3('0x45'),_0x71a3('0x9f'),'updatedAt','TrunkId',_0x71a3('0xa0')])),{'transaction':_0x39a201});});});})[_0x71a3('0x39')](function(){return db[_0x71a3('0x41')][_0x71a3('0xa1')](_0x2df6d5[_0x71a3('0x60')]['id']);})['then'](respondWithResult(_0x27622d,null))['catch'](handleError(_0x27622d,null));};exports[_0x71a3('0xa2')]=function(_0x40395d,_0x3bd294,_0x86b632){var _0x4f2bde={'raw':!![],'where':{}};var _0x46ad66={};var _0x3d5710={'count':0x0,'rows':[]};return db[_0x71a3('0x41')][_0x71a3('0x6b')]({'where':{'id':_0x40395d['params']['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x3bd294,null))['then'](function(_0x5e34be){if(_0x5e34be){_0x46ad66[_0x71a3('0x46')]=_[_0x71a3('0x5c')](db['FaxMessage']['rawAttributes']);_0x46ad66[_0x71a3('0x49')]=_['keys'](_0x40395d[_0x71a3('0x49')]);_0x46ad66[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x46ad66[_0x71a3('0x46')],_0x46ad66[_0x71a3('0x49')]);_0x4f2bde[_0x71a3('0x4b')]=_[_0x71a3('0x4a')](_0x46ad66[_0x71a3('0x46')],qs[_0x71a3('0x4c')](_0x40395d[_0x71a3('0x49')]['fields']));_0x4f2bde[_0x71a3('0x4b')]=_0x4f2bde['attributes'][_0x71a3('0x4d')]?_0x4f2bde[_0x71a3('0x4b')]:_0x46ad66[_0x71a3('0x46')];if(!_0x40395d['query'][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x4f2bde['limit']=qs[_0x71a3('0x31')](_0x40395d[_0x71a3('0x49')][_0x71a3('0x31')]);_0x4f2bde[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0x40395d[_0x71a3('0x49')][_0x71a3('0x30')]);}_0x4f2bde[_0x71a3('0x50')]=qs[_0x71a3('0x51')](_0x40395d['query'][_0x71a3('0x51')]);_0x4f2bde[_0x71a3('0x55')]=qs[_0x71a3('0x52')](_[_0x71a3('0x53')](_0x40395d['query'],_0x46ad66[_0x71a3('0x52')]));_0x4f2bde[_0x71a3('0x55')][_0x71a3('0x69')]=_0x5e34be['id'];if(_0x40395d[_0x71a3('0x49')][_0x71a3('0x54')]){_0x4f2bde[_0x71a3('0x55')]=_[_0x71a3('0x56')](_0x4f2bde[_0x71a3('0x55')],{'$or':_['map'](_0x4f2bde['attributes'],function(_0x5c2621){var _0x450006={};_0x450006[_0x5c2621]={'$like':'%'+_0x40395d['query'][_0x71a3('0x54')]+'%'};return _0x450006;})});}if(_0x40395d[_0x71a3('0x49')][_0x71a3('0xa3')]){var _0x54e625=_0x40395d[_0x71a3('0x49')][_0x71a3('0xa3')][_0x71a3('0xa4')](',');var _0x104f1e={};_0x104f1e[_0x54e625[0x0]]={'$gte':moment(_0x54e625[0x1])[_0x71a3('0xa5')](_0x71a3('0xa6'))};_0x4f2bde[_0x71a3('0x55')]=_['merge'](_0x4f2bde[_0x71a3('0x55')],_0x104f1e);}_0x4f2bde=_[_0x71a3('0x56')]({},_0x4f2bde,_0x40395d['options']);return db[_0x71a3('0xa7')][_0x71a3('0x33')]({'where':_0x4f2bde[_0x71a3('0x55')]})['then'](function(_0x5b7b22){_0x3d5710[_0x71a3('0x33')]=_0x5b7b22;if(_0x40395d[_0x71a3('0x49')][_0x71a3('0x5d')]){_0x4f2bde['include']=[{'all':!![]}];}return db[_0x71a3('0xa7')]['findAll'](_0x4f2bde);})[_0x71a3('0x39')](function(_0x226497){_0x3d5710['rows']=_0x226497;return _0x3d5710;});}})[_0x71a3('0x39')](respondWithFilteredResult(_0x3bd294,_0x4f2bde))['catch'](handleError(_0x3bd294,null));};exports[_0x71a3('0x3e')]=function(_0x50506c,_0x12896e,_0x4cf544){var _0x21ba08,_0x49a657={},_0x3b4199;if(_0x50506c[_0x71a3('0x60')]['to']){_0x3b4199=_0x50506c['body']['to'][0x0];}return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x50506c[_0x71a3('0x5a')]['id']},'include':[{'model':db['CmList'],'as':_0x71a3('0xa8'),'include':[{'model':db[_0x71a3('0x75')],'as':_0x71a3('0xa9'),'where':{'fax':_0x3b4199},'limit':0x1,'order':[[_0x71a3('0xaa'),_0x71a3('0xab')]]}]}]})['then'](handleEntityNotFound(_0x12896e,null))[_0x71a3('0x39')](function(_0x179cbb){_0x21ba08=_0x179cbb;if(_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')]&&_0x50506c[_0x71a3('0x60')]['attachments'][_0x71a3('0x4d')]){for(var _0x413a27=0x0;_0x413a27<_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')]['length'];_0x413a27+=0x1){_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][_0x413a27]={'filename':_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][_0x413a27][_0x71a3('0x48')],'id':_0x50506c[_0x71a3('0x60')]['attachments'][_0x413a27]['id'],'path':path[_0x71a3('0xad')](config['root'],_0x71a3('0xae'),_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][_0x413a27]['basename'])};}}return respondWithRpcPromise(_0x71a3('0xaf'),_0x71a3('0xaf'),{'FaxAccountId':_[_0x71a3('0xb0')](_0x50506c[_0x71a3('0x5a')]['id'])?undefined:_0x50506c['params']['id'],'path':_[_0x71a3('0xb0')](_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][0x0]['path'])?undefined:_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][0x0][_0x71a3('0x9')],'fax':_['isNil'](_0x50506c[_0x71a3('0x60')]['to'][0x0])?undefined:_0x50506c[_0x71a3('0x60')]['to'][0x0]},client9002);})['then'](function(){if(_0x21ba08){if(_[_0x71a3('0xb0')](_0x50506c['body'][_0x71a3('0xb1')])){_0x50506c['body'][_0x71a3('0xb1')]=util[_0x71a3('0xa5')](_0x71a3('0xb2'),_0x21ba08['name'],_0x21ba08[_0x71a3('0xb3')]);}if(_0x21ba08[_0x71a3('0xa8')]){if(_0x21ba08[_0x71a3('0xa8')][_0x71a3('0xa9')][_0x71a3('0x4d')]){return _0x21ba08['List']['Contacts'][0x0];}else{return db['CmContact'][_0x71a3('0x5f')](_[_0x71a3('0x19')](_0x50506c['body'],{'firstName':_0x50506c['body']['to'][0x0],'phone':_0x50506c['body']['to'][0x0],'fax':_0x50506c[_0x71a3('0x60')]['to'][0x0],'ListId':_0x21ba08['ListId']}));}}else{throw new Error(_0x71a3('0xb4'));}}else{throw new Error(_0x71a3('0xb5'));}})['then'](function(_0x7f9cf9){if(_0x7f9cf9){return db[_0x71a3('0x73')]['find']({'where':{'ContactId':_0x7f9cf9['id'],'closed':![],'FaxAccountId':_0x21ba08['id']}})['then'](function(_0x4fed1f){if(_0x4fed1f){return[_0x4fed1f,![]];}return db[_0x71a3('0x73')][_0x71a3('0x5f')]({'UserId':_0x50506c['user']['id'],'ContactId':_0x7f9cf9['id'],'FaxAccountId':_0x21ba08['id'],'fax':_0x50506c[_0x71a3('0x60')]['to'][0x0],'firstMsgDirection':'out','Messages':[_[_0x71a3('0x56')](_0x50506c[_0x71a3('0x60')],{'read':![],'body':_0x50506c['body'][_0x71a3('0xac')][0x0][_0x71a3('0xb6')],'FaxAccountId':_0x21ba08['id'],'UserId':_0x50506c[_0x71a3('0x61')]['id'],'ContactId':_0x7f9cf9['id'],'AttachmentId':_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][0x0]['id']})]},{'include':[{'model':db[_0x71a3('0xa7')],'as':_0x71a3('0xb7')}]})['then'](function(_0x9b9a55){return[_0x9b9a55,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0x71a3('0xb8')](function(_0x47bbb7,_0x7df3b0){if(_0x7df3b0){return _0x47bbb7;}return db[_0x71a3('0xa7')][_0x71a3('0x5f')]({'direction':_0x71a3('0xb9'),'read':![],'body':_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][0x0][_0x71a3('0xb6')],'FaxAccountId':_0x21ba08['id'],'FaxInteractionId':_0x47bbb7['id'],'UserId':_0x50506c[_0x71a3('0x61')]['id'],'ContactId':_0x47bbb7[_0x71a3('0xba')],'AttachmentId':_0x50506c[_0x71a3('0x60')][_0x71a3('0xac')][0x0]['id']})[_0x71a3('0x39')](function(_0x460704){_0x47bbb7[_0x71a3('0xbb')]['Messages']=[];_0x47bbb7[_0x71a3('0xbb')][_0x71a3('0xb7')][_0x71a3('0x8c')](_0x460704[_0x71a3('0xbb')]);return _0x47bbb7;});})['then'](function(_0x5c62d8){respondWithRpcPromise(_0x71a3('0xbc'),_0x71a3('0xbc'),{'FaxAccountId':_[_0x71a3('0xb0')](_0x50506c[_0x71a3('0x5a')]['id'])?undefined:_0x50506c['params']['id'],'path':_[_0x71a3('0xb0')](_0x50506c[_0x71a3('0x60')]['attachments'][0x0][_0x71a3('0x9')])?undefined:_0x50506c['body'][_0x71a3('0xac')][0x0][_0x71a3('0x9')],'fax':_[_0x71a3('0xb0')](_0x50506c[_0x71a3('0x60')]['to'][0x0])?undefined:_0x50506c[_0x71a3('0x60')]['to'][0x0],'AttachmentId':_0x50506c[_0x71a3('0x60')]['attachments'][0x0]['id']},client9002)[_0x71a3('0x39')](function(_0xb00463){logger[_0x71a3('0x22')](_0x71a3('0xbd'),_0xb00463);})[_0x71a3('0x2c')](function(_0x16f5df){logger[_0x71a3('0x22')](_0x71a3('0xbd'),_0x16f5df);});return _0x5c62d8;})['then'](respondWithResult(_0x12896e,null))[_0x71a3('0x2c')](handleError(_0x12896e,null));};exports[_0x71a3('0xbe')]=function(_0x1b51fb,_0x22b3e2,_0x18fdf5){return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x1b51fb[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x22b3e2,null))[_0x71a3('0x39')](function(_0x31e291){if(_0x31e291){return _0x31e291['addAgents'](_0x1b51fb[_0x71a3('0x60')][_0x71a3('0x6f')],_['omit'](_0x1b51fb['body'],['ids','id'])||{})[_0x71a3('0xb8')](function(_0xc88ef7){for(var _0x2d625d=0x0;_0x2d625d<_0x1b51fb[_0x71a3('0x60')]['ids'][_0x71a3('0x4d')];_0x2d625d+=0x1){socket[_0x71a3('0xbf')](_0x71a3('0xc0'),{'UserId':_0x1b51fb[_0x71a3('0x60')][_0x71a3('0x6f')][_0x2d625d],'FaxAccountId':_0x1b51fb[_0x71a3('0x5a')]['id']});}return _0xc88ef7;});}})['then'](respondWithResult(_0x22b3e2,null))['catch'](handleError(_0x22b3e2,null));};exports[_0x71a3('0xc1')]=function(_0x319f36,_0x566f9d,_0x3dbf30){return db[_0x71a3('0x41')][_0x71a3('0x5e')]({'where':{'id':_0x319f36[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x566f9d,null))[_0x71a3('0x39')](function(_0x1920f8){if(_0x1920f8){return _0x1920f8[_0x71a3('0xc1')](_0x319f36[_0x71a3('0x49')]['ids'])[_0x71a3('0x39')](function(){if(_[_0x71a3('0xc2')](_0x319f36['query'][_0x71a3('0x6f')])){for(var _0x256c49=0x0;_0x256c49<_0x319f36[_0x71a3('0x49')][_0x71a3('0x6f')][_0x71a3('0x4d')];_0x256c49+=0x1){socket['emit'](_0x71a3('0xc3'),{'UserId':Number(_0x319f36[_0x71a3('0x49')][_0x71a3('0x6f')][_0x256c49]),'FaxAccountId':Number(_0x319f36[_0x71a3('0x5a')]['id'])});}}else{socket[_0x71a3('0xbf')](_0x71a3('0xc3'),{'UserId':Number(_0x319f36[_0x71a3('0x49')][_0x71a3('0x6f')]),'FaxAccountId':Number(_0x319f36[_0x71a3('0x5a')]['id'])});}});}})[_0x71a3('0x39')](respondWithStatusCode(_0x566f9d,null))[_0x71a3('0x2c')](handleError(_0x566f9d,null));};exports[_0x71a3('0xc4')]=function(_0x562ef6,_0x4fa23f,_0x578a03){var _0x281830={};var _0x572e02={};var _0x9eada2;var _0x275c12;return db[_0x71a3('0x41')][_0x71a3('0x6b')]({'where':{'id':_0x562ef6[_0x71a3('0x5a')]['id']}})[_0x71a3('0x39')](handleEntityNotFound(_0x4fa23f,null))[_0x71a3('0x39')](function(_0x225814){if(_0x225814){_0x9eada2=_0x225814;_0x572e02[_0x71a3('0x46')]=_[_0x71a3('0x5c')](db[_0x71a3('0x77')]['rawAttributes']);_0x572e02[_0x71a3('0x49')]=_[_0x71a3('0x5c')](_0x562ef6[_0x71a3('0x49')]);_0x572e02[_0x71a3('0x52')]=_[_0x71a3('0x4a')](_0x572e02[_0x71a3('0x46')],_0x572e02[_0x71a3('0x49')]);_0x281830[_0x71a3('0x4b')]=_[_0x71a3('0x4a')](_0x572e02[_0x71a3('0x46')],qs['fields'](_0x562ef6[_0x71a3('0x49')][_0x71a3('0x4c')]));_0x281830['attributes']=_0x281830[_0x71a3('0x4b')][_0x71a3('0x4d')]?_0x281830[_0x71a3('0x4b')]:_0x572e02[_0x71a3('0x46')];_0x281830[_0x71a3('0x50')]=qs[_0x71a3('0x51')](_0x562ef6[_0x71a3('0x49')][_0x71a3('0x51')]);_0x281830[_0x71a3('0x55')]=qs[_0x71a3('0x52')](_[_0x71a3('0x53')](_0x562ef6[_0x71a3('0x49')],_0x572e02[_0x71a3('0x52')]));if(_0x562ef6[_0x71a3('0x49')]['filter']){_0x281830['where']=_[_0x71a3('0x56')](_0x281830[_0x71a3('0x55')],{'$or':_[_0x71a3('0x47')](_0x281830['attributes'],function(_0x1dc8e7){var _0x13e746={};_0x13e746[_0x1dc8e7]={'$like':'%'+_0x562ef6[_0x71a3('0x49')][_0x71a3('0x54')]+'%'};return _0x13e746;})});}_0x281830=_[_0x71a3('0x56')]({},_0x281830,_0x562ef6['options']);return _0x9eada2[_0x71a3('0xc4')](_0x281830);}})[_0x71a3('0x39')](function(_0x560e0e){if(_0x560e0e){_0x275c12=_0x560e0e[_0x71a3('0x4d')];if(!_0x562ef6['query'][_0x71a3('0x4e')](_0x71a3('0x4f'))){_0x281830[_0x71a3('0x31')]=qs[_0x71a3('0x31')](_0x562ef6[_0x71a3('0x49')][_0x71a3('0x31')]);_0x281830[_0x71a3('0x30')]=qs[_0x71a3('0x30')](_0x562ef6[_0x71a3('0x49')][_0x71a3('0x30')]);}return _0x9eada2[_0x71a3('0xc4')](_0x281830);}})[_0x71a3('0x39')](function(_0x34914b){if(_0x34914b){return _0x34914b?{'count':_0x275c12,'rows':_0x34914b}:null;}})[_0x71a3('0x39')](respondWithResult(_0x4fa23f,null))[_0x71a3('0x2c')](handleError(_0x4fa23f,null));}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.events.js b/server/api/faxAccount/faxAccount.events.js index 28990b3..104c595 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 _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 +var _0x6dbf=['remove','emit','exports','../../mysqldb','FaxAccount','setMaxListeners','save','update'];(function(_0x3305de,_0x16582f){var _0x3b5a84=function(_0x57d7e1){while(--_0x57d7e1){_0x3305de['push'](_0x3305de['shift']());}};_0x3b5a84(++_0x16582f);}(_0x6dbf,0xfb));var _0xf6db=function(_0x45b8b6,_0x2ea146){_0x45b8b6=_0x45b8b6-0x0;var _0x432d92=_0x6dbf[_0x45b8b6];return _0x432d92;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xf6db('0x0'))['db'][_0xf6db('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xf6db('0x2')](0x0);var events={'afterCreate':_0xf6db('0x3'),'afterUpdate':_0xf6db('0x4'),'afterDestroy':_0xf6db('0x5')};function emitEvent(_0x5d7e78){return function(_0x53144c,_0x357283,_0x423996){FaxAccountEvents[_0xf6db('0x6')](_0x5d7e78+':'+_0x53144c['id'],_0x53144c);FaxAccountEvents['emit'](_0x5d7e78,_0x53144c);_0x423996(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0xf6db('0x7')]=FaxAccountEvents; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.model.js b/server/api/faxAccount/faxAccount.model.js index ec95493..ab69466 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 _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 +var _0x09ee=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./faxAccount.attributes','exports','define','FaxAccount','fax_accounts'];(function(_0x182b8d,_0x3a76bb){var _0x4cfde3=function(_0x261b63){while(--_0x261b63){_0x182b8d['push'](_0x182b8d['shift']());}};_0x4cfde3(++_0x3a76bb);}(_0x09ee,0x84));var _0xe09e=function(_0x5944e9,_0xf3da60){_0x5944e9=_0x5944e9-0x0;var _0x1098b8=_0x09ee[_0x5944e9];return _0x1098b8;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe09e('0x0'))(_0xe09e('0x1'));var moment=require(_0xe09e('0x2'));var BPromise=require(_0xe09e('0x3'));var rp=require(_0xe09e('0x4'));var fs=require('fs');var path=require(_0xe09e('0x5'));var rimraf=require(_0xe09e('0x6'));var config=require('../../config/environment');var attributes=require(_0xe09e('0x7'));module[_0xe09e('0x8')]=function(_0x3181a1,_0x1f5ac1){return _0x3181a1[_0xe09e('0x9')](_0xe09e('0xa'),attributes,{'tableName':_0xe09e('0xb'),'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 cc18e62..668f09b 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 _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 +var _0x8fd4=['Sequelize','ValidationError','no\x20available\x20attributes','keys','updatedAt','difference','createdAt','CompanyId','from','from\x20is\x20mandatory','isNil','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','find','List','DESC','FaxApplication','Applications','account','applications','orderBy','asc','Contacts','ListId','create','FaxInteraction','Contact\x20not\x20found','spread','get','autoclose','push','length','unmanaged','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','UserId','name','unshift','waitForTheAssignedAgent','Start','startRouting','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./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','catch','GetFaxAccount','FaxAccount','options','attributes','limit','include','map','model','body','fax','CmContact','describe'];(function(_0x3c487b,_0x44c5e2){var _0x1d65f6=function(_0x135e6d){while(--_0x135e6d){_0x3c487b['push'](_0x3c487b['shift']());}};_0x1d65f6(++_0x44c5e2);}(_0x8fd4,0x8a));var _0x48fd=function(_0x3305de,_0x16582f){_0x3305de=_0x3305de-0x0;var _0x3b5a84=_0x8fd4[_0x3305de];return _0x3b5a84;};'use strict';var _=require('lodash');var util=require(_0x48fd('0x0'));var moment=require('moment');var BPromise=require(_0x48fd('0x1'));var rs=require(_0x48fd('0x2'));var fs=require('fs');var Redis=require(_0x48fd('0x3'));var db=require(_0x48fd('0x4'))['db'];var utils=require(_0x48fd('0x5'));var logger=require(_0x48fd('0x6'))(_0x48fd('0x7'));var config=require(_0x48fd('0x8'));var jayson=require(_0x48fd('0x9'));var client=jayson[_0x48fd('0xa')]['http']({'port':0x232c});config[_0x48fd('0xb')]=_[_0x48fd('0xc')](config[_0x48fd('0xb')],{'host':_0x48fd('0xd'),'port':0x18eb});var socket=require(_0x48fd('0xe'))(new Redis(config[_0x48fd('0xb')]));require(_0x48fd('0xf'))[_0x48fd('0x10')](socket);function respondWithRpcPromise(_0x14601b,_0x1fc63f,_0x90ee80){return new BPromise(function(_0x52aa20,_0x292c97){return client[_0x48fd('0x11')](_0x14601b,_0x90ee80)[_0x48fd('0x12')](function(_0x462bc9){logger[_0x48fd('0x13')](_0x48fd('0x14'),_0x1fc63f,_0x48fd('0x15'));logger[_0x48fd('0x16')](_0x48fd('0x17'),_0x1fc63f,_0x48fd('0x15'),JSON[_0x48fd('0x18')](_0x462bc9));if(_0x462bc9[_0x48fd('0x19')]){if(_0x462bc9[_0x48fd('0x19')][_0x48fd('0x1a')]===0x1f4){logger[_0x48fd('0x19')](_0x48fd('0x14'),_0x1fc63f,_0x462bc9[_0x48fd('0x19')][_0x48fd('0x1b')]);return _0x292c97(_0x462bc9[_0x48fd('0x19')][_0x48fd('0x1b')]);}logger[_0x48fd('0x19')](_0x48fd('0x14'),_0x1fc63f,_0x462bc9[_0x48fd('0x19')]['message']);return _0x52aa20(_0x462bc9[_0x48fd('0x19')]['message']);}else{logger['info'](_0x48fd('0x14'),_0x1fc63f,'request\x20sent');_0x52aa20(_0x462bc9[_0x48fd('0x1c')][_0x48fd('0x1b')]);}})[_0x48fd('0x1d')](function(_0x5db53d){logger[_0x48fd('0x19')](_0x48fd('0x14'),_0x1fc63f,_0x5db53d);_0x292c97(_0x5db53d);});});}exports[_0x48fd('0x1e')]=function(_0x2feca0){var _0x3ac48a=this;return new Promise(function(_0x5375e4,_0x4dbd63){return db[_0x48fd('0x1f')]['findAll']({'raw':_0x2feca0['options']?_0x2feca0[_0x48fd('0x20')]['raw']===undefined?!![]:![]:!![],'where':_0x2feca0[_0x48fd('0x20')]?_0x2feca0[_0x48fd('0x20')]['where']||null:null,'attributes':_0x2feca0[_0x48fd('0x20')]?_0x2feca0[_0x48fd('0x20')][_0x48fd('0x21')]||null:null,'limit':_0x2feca0['options']?_0x2feca0['options'][_0x48fd('0x22')]||null:null,'include':_0x2feca0[_0x48fd('0x20')]?_0x2feca0[_0x48fd('0x20')][_0x48fd('0x23')]?_[_0x48fd('0x24')](_0x2feca0[_0x48fd('0x20')]['include'],function(_0x4ac695){return{'model':db[_0x4ac695[_0x48fd('0x25')]],'as':_0x4ac695['as'],'attributes':_0x4ac695[_0x48fd('0x21')],'include':_0x4ac695[_0x48fd('0x23')]?_[_0x48fd('0x24')](_0x4ac695[_0x48fd('0x23')],function(_0x42ab35){return{'model':db[_0x42ab35[_0x48fd('0x25')]],'as':_0x42ab35['as'],'attributes':_0x42ab35[_0x48fd('0x21')],'include':_0x42ab35[_0x48fd('0x23')]?_[_0x48fd('0x24')](_0x42ab35[_0x48fd('0x23')],function(_0x11d32e){return{'model':db[_0x11d32e[_0x48fd('0x25')]],'as':_0x11d32e['as'],'attributes':_0x11d32e[_0x48fd('0x21')]};}):[]};}):[]};}):[]:[]})[_0x48fd('0x12')](function(_0x3782ee){logger[_0x48fd('0x13')](_0x48fd('0x1e'),_0x2feca0);logger[_0x48fd('0x16')](_0x48fd('0x1e'),_0x2feca0,JSON[_0x48fd('0x18')](_0x3782ee));_0x5375e4(_0x3782ee);})[_0x48fd('0x1d')](function(_0x15bd5e){logger[_0x48fd('0x19')](_0x48fd('0x1e'),_0x15bd5e[_0x48fd('0x1b')],_0x2feca0);_0x4dbd63(_0x3ac48a[_0x48fd('0x19')](0x1f4,_0x15bd5e[_0x48fd('0x1b')]));});});};exports['NotifyFaxAccount']=function(_0x1b041e,_0x193ac5,_0x4d58d5){var _0x257500=this;return new Promise(function(_0xdf9349,_0x1a45df){var _0x2ea516={'body':_0x1b041e[_0x48fd('0x26')],'channel':_0x48fd('0x27')};var _0x32cd15=[];var _0x4adf59=[];var _0x5a9ac9={};return db[_0x48fd('0x28')][_0x48fd('0x29')]()[_0x48fd('0x12')](function(_0xc67277){if(!_0xc67277){throw new db[(_0x48fd('0x2a'))][(_0x48fd('0x2b'))](_0x48fd('0x2c'));}_0x32cd15=_['difference'](_[_0x48fd('0x2d')](_0xc67277),['createdAt',_0x48fd('0x2e')]);_0x4adf59=_[_0x48fd('0x2f')](_[_0x48fd('0x2d')](_0xc67277),[_0x48fd('0x30'),_0x48fd('0x2e'),_0x48fd('0x31'),'ListId']);if(_0x1b041e['body']['id']){delete _0x1b041e[_0x48fd('0x26')]['id'];}if(_['isNil'](_0x1b041e[_0x48fd('0x26')][_0x48fd('0x32')])){throw new db[(_0x48fd('0x2a'))]['ValidationError'](_0x48fd('0x33'));}if(_[_0x48fd('0x34')](_0x1b041e[_0x48fd('0x26')]['body'])||_0x1b041e[_0x48fd('0x26')][_0x48fd('0x26')]===''){throw new db['Sequelize'][(_0x48fd('0x2b'))](_0x48fd('0x35'));}if(_['isNil'](_0x1b041e[_0x48fd('0x26')][_0x48fd('0x36')])){throw new db[(_0x48fd('0x2a'))][(_0x48fd('0x2b'))](_0x48fd('0x37')+_0x4adf59);}if(!_[_0x48fd('0x38')](_0x4adf59,_0x1b041e['body'][_0x48fd('0x36')])){throw new db[(_0x48fd('0x2a'))][(_0x48fd('0x2b'))](_0x48fd('0x39')+_0x4adf59);}_0x5a9ac9[_0x1b041e[_0x48fd('0x26')]['mapKey']]=_0x1b041e[_0x48fd('0x26')]['from'];})['then'](function(){return db[_0x48fd('0x1f')][_0x48fd('0x3a')]({'where':{'id':_0x1b041e['account']['id']},'include':[{'model':db['CmList'],'as':_0x48fd('0x3b'),'include':[{'model':db[_0x48fd('0x28')],'as':'Contacts','where':_0x5a9ac9,'limit':0x1,'order':[['updatedAt',_0x48fd('0x3c')]]}]},{'model':db[_0x48fd('0x3d')],'as':_0x48fd('0x3e')}]});})[_0x48fd('0x12')](function(_0x4e264d){if(_0x4e264d&&_0x4e264d[_0x48fd('0x3b')]){var _0x8271ec=_0x4e264d['get']({'plain':!![]});_0x2ea516[_0x48fd('0x3f')]=_0x8271ec;_0x2ea516[_0x48fd('0x40')]=_0x8271ec[_0x48fd('0x3e')];_0x2ea516['list']=_0x8271ec['List'];_0x2ea516[_0x48fd('0x40')]=_[_0x48fd('0x41')](_0x2ea516[_0x48fd('0x40')],['priority'],[_0x48fd('0x42')]);if(_0x2ea516['account'][_0x48fd('0x3e')]){delete _0x2ea516[_0x48fd('0x3f')][_0x48fd('0x3e')];}if(_0x2ea516['account']['List']&&_0x2ea516[_0x48fd('0x3f')][_0x48fd('0x3b')]['Contacts']['length']){return _0x2ea516[_0x48fd('0x3f')][_0x48fd('0x3b')][_0x48fd('0x43')][0x0];}var _0x5769a6=_[_0x48fd('0xc')](_0x1b041e[_0x48fd('0x26')],{'firstName':_0x1b041e[_0x48fd('0x26')][_0x48fd('0x32')],'ListId':_0x8271ec[_0x48fd('0x44')]});_0x5769a6[_0x1b041e['body']['mapKey']]=_0x1b041e[_0x48fd('0x26')][_0x48fd('0x32')];return db[_0x48fd('0x28')][_0x48fd('0x45')](_0x5769a6,{'fields':_0x32cd15,'raw':!![]});}})[_0x48fd('0x12')](function(_0x4c37b8){_0x2ea516['contact']=_0x4c37b8;if(_0x4c37b8){var _0x26d57d={'ContactId':_0x4c37b8['id'],'FaxAccountId':_0x1b041e['account']['id'],'fax':_0x4c37b8[_0x48fd('0x27')]};return db[_0x48fd('0x46')][_0x48fd('0x3a')]({'where':{'ContactId':_0x4c37b8['id'],'closed':![],'FaxAccountId':_0x1b041e['account']['id']}})[_0x48fd('0x12')](function(_0x5d8ef5){if(_0x5d8ef5){return[_0x5d8ef5,![]];}return db['FaxInteraction']['create'](_0x26d57d)[_0x48fd('0x12')](function(_0x1e5f75){return[_0x1e5f75,!![]];});});}else{throw new Error(_0x48fd('0x47'));}})[_0x48fd('0x48')](function(_0xf1b421,_0x322a44){var _0x147959=_0xf1b421[_0x48fd('0x49')]({'plain':!![]});if(_0x322a44){if(_0x2ea516[_0x48fd('0x3f')][_0x48fd('0x4a')]){_0x2ea516['applications'][_0x48fd('0x4b')]({'id':0x0,'priority':_0x2ea516['applications'][_0x48fd('0x4c')]+0x1,'app':'close','appdata':_0x48fd('0x4d'),'interval':_0x48fd('0x4e')});}_0x147959[_0x48fd('0x4f')]=!![];}else{_0x147959['created']=![];}_0x2ea516[_0x48fd('0x50')]=_0x147959;return db[_0x48fd('0x51')][_0x48fd('0x45')]({'body':_0x1b041e[_0x48fd('0x26')][_0x48fd('0x26')],'FaxAccountId':_0x1b041e[_0x48fd('0x3f')]['id'],'FaxInteractionId':_0xf1b421['id'],'direction':'in','ContactId':_0xf1b421[_0x48fd('0x52')],'AttachmentId':_0x1b041e[_0x48fd('0x26')][_0x48fd('0x53')]});})['then'](function(_0x2c6578){_0x2ea516[_0x48fd('0x1b')]=_0x2c6578;if(_0x2ea516['interaction'][_0x48fd('0x54')]){return db['User'][_0x48fd('0x3a')]({'attributes':['id',_0x48fd('0x55')],'where':{'id':_0x2ea516['interaction'][_0x48fd('0x54')]}})[_0x48fd('0x12')](function(_0x286e2c){if(_0x286e2c){_0x2ea516[_0x48fd('0x40')][_0x48fd('0x56')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x286e2c[_0x48fd('0x55')]+','+(_0x2ea516['account'][_0x48fd('0x57')]||0xa),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x48fd('0x58'),'startRouting',_0x2ea516);});}return respondWithRpcPromise('Start',_0x48fd('0x59'),_0x2ea516);})['then'](function(_0x5e8b2d){_0xdf9349(_0x5e8b2d);})['catch'](function(_0x879ab){_0x1a45df(_0x257500[_0x48fd('0x19')](0x1f4,_0x879ab[_0x48fd('0x1b')]));});});}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.socket.js b/server/api/faxAccount/faxAccount.socket.js index 4033b65..a3d3c24 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 _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 +var _0xed5e=['update','emit','register','length','save'];(function(_0x3906a6,_0x21b115){var _0xb53374=function(_0x1bd9cb){while(--_0x1bd9cb){_0x3906a6['push'](_0x3906a6['shift']());}};_0xb53374(++_0x21b115);}(_0xed5e,0x130));var _0xeed5=function(_0x4393f8,_0x3b47c5){_0x4393f8=_0x4393f8-0x0;var _0x554e75=_0xed5e[_0x4393f8];return _0x554e75;};'use strict';var FaxAccountEvents=require('./faxAccount.events');var events=[_0xeed5('0x0'),'remove',_0xeed5('0x1')];function createListener(_0x22af28,_0x682dcb){return function(_0x2fd011){_0x682dcb[_0xeed5('0x2')](_0x22af28,_0x2fd011);};}function removeListener(_0x1d2e1c,_0x1ba642){return function(){FaxAccountEvents['removeListener'](_0x1d2e1c,_0x1ba642);};}exports[_0xeed5('0x3')]=function(_0x2ae127){for(var _0x190ec3=0x0,_0x23333a=events[_0xeed5('0x4')];_0x190ec3<_0x23333a;_0x190ec3++){var _0xbca7c7=events[_0x190ec3];var _0x3efe71=createListener('faxAccount:'+_0xbca7c7,_0x2ae127);FaxAccountEvents['on'](_0xbca7c7,_0x3efe71);}}; \ No newline at end of file diff --git a/server/api/faxAccount/index.js b/server/api/faxAccount/index.js index 790acb3..194ac7e 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(_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 +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(_0x5ac1a5,_0x743987){var _0x4f3722=function(_0x10609a){while(--_0x10609a){_0x5ac1a5['push'](_0x5ac1a5['shift']());}};_0x4f3722(++_0x743987);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'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 73207c4..1e51351 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 _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 +var _0x5ff3=['noop','TEXT','exports','INTEGER','STRING'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0x5ff3,0x93));var _0x35ff=function(_0x3b8d66,_0x2d6289){_0x3b8d66=_0x3b8d66-0x0;var _0x13082d=_0x5ff3[_0x3b8d66];return _0x13082d;};'use strict';var Sequelize=require('sequelize');module[_0x35ff('0x0')]={'priority':{'type':Sequelize[_0x35ff('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x35ff('0x2')],'allowNull':![],'defaultValue':_0x35ff('0x3')},'appdata':{'type':Sequelize[_0x35ff('0x4')]()},'description':{'type':Sequelize[_0x35ff('0x2')]},'interval':{'type':Sequelize[_0x35ff('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 e4da17a..22537c0 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 _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 +var _0xaf23=['save','update','then','destroy','end','sendStatus','error','stack','name','send','map','FaxApplication','rawAttributes','type','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','includeAll','include','findAll','catch','show','params','options','create','body','find','eml-format','rimraf','moment','bluebird','path','sox','to-csv','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','status','offset','undefined','count','limit','set','Content-Range','reject'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xaf23,0x13d));var _0x3af2=function(_0x2d69a4,_0x32935e){_0x2d69a4=_0x2d69a4-0x0;var _0xe0705b=_0xaf23[_0x2d69a4];return _0xe0705b;};'use strict';var emlformat=require(_0x3af2('0x0'));var rimraf=require(_0x3af2('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3af2('0x2'));var BPromise=require(_0x3af2('0x3'));var Mustache=require('mustache');var util=require('util');var path=require(_0x3af2('0x4'));var sox=require(_0x3af2('0x5'));var csv=require(_0x3af2('0x6'));var ejs=require(_0x3af2('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x3af2('0x8'));var crypto=require('crypto');var jsforce=require(_0x3af2('0x9'));var deskjs=require('desk.js');var toCsv=require(_0x3af2('0x6'));var querystring=require(_0x3af2('0xa'));var Papa=require(_0x3af2('0xb'));var Redis=require(_0x3af2('0xc'));var authService=require(_0x3af2('0xd'));var qs=require(_0x3af2('0xe'));var as=require(_0x3af2('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3af2('0x10'))('api');var utils=require(_0x3af2('0x11'));var config=require('../../config/environment');var licenseUtil=require(_0x3af2('0x12'));var db=require(_0x3af2('0x13'))['db'];function respondWithStatusCode(_0x3e5a61,_0x5313be){_0x5313be=_0x5313be||0xcc;return function(_0x4cab01){if(_0x4cab01){return _0x3e5a61['sendStatus'](_0x5313be);}return _0x3e5a61[_0x3af2('0x14')](_0x5313be)['end']();};}function respondWithResult(_0x3e4786,_0x15b916){_0x15b916=_0x15b916||0xc8;return function(_0x242e6d){if(_0x242e6d){return _0x3e4786['status'](_0x15b916)['json'](_0x242e6d);}};}function respondWithFilteredResult(_0x17e282,_0x5c81f0){return function(_0x1f7217){if(_0x1f7217){var _0x27065e=typeof _0x5c81f0[_0x3af2('0x15')]===_0x3af2('0x16')&&typeof _0x5c81f0['limit']===_0x3af2('0x16');var _0x53d86f=_0x1f7217[_0x3af2('0x17')];var _0x3f46c7=_0x27065e?0x0:_0x5c81f0[_0x3af2('0x15')];var _0x590939=_0x27065e?_0x1f7217[_0x3af2('0x17')]:_0x5c81f0[_0x3af2('0x15')]+_0x5c81f0[_0x3af2('0x18')];var _0x257e6c;if(_0x590939>=_0x53d86f){_0x590939=_0x53d86f;_0x257e6c=0xc8;}else{_0x257e6c=0xce;}_0x17e282[_0x3af2('0x14')](_0x257e6c);return _0x17e282[_0x3af2('0x19')](_0x3af2('0x1a'),_0x3f46c7+'-'+_0x590939+'/'+_0x53d86f)['json'](_0x1f7217);}return null;};}function patchUpdates(_0x337983){return function(_0x3e06be){try{jsonpatch['apply'](_0x3e06be,_0x337983,!![]);}catch(_0x54719c){return BPromise[_0x3af2('0x1b')](_0x54719c);}return _0x3e06be[_0x3af2('0x1c')]();};}function saveUpdates(_0x9664bf,_0x11b23e){return function(_0xf1dae6){if(_0xf1dae6){return _0xf1dae6[_0x3af2('0x1d')](_0x9664bf)[_0x3af2('0x1e')](function(_0x145c2f){return _0x145c2f;});}return null;};}function removeEntity(_0x29d74a,_0x1b8c57){return function(_0x5871ea){if(_0x5871ea){return _0x5871ea[_0x3af2('0x1f')]()[_0x3af2('0x1e')](function(){_0x29d74a[_0x3af2('0x14')](0xcc)[_0x3af2('0x20')]();});}};}function handleEntityNotFound(_0x39c848,_0x56fad5){return function(_0x48689a){if(!_0x48689a){_0x39c848[_0x3af2('0x21')](0x194);}return _0x48689a;};}function handleError(_0x3baba9,_0x4ff23f){_0x4ff23f=_0x4ff23f||0x1f4;return function(_0x16833e){logger[_0x3af2('0x22')](_0x16833e[_0x3af2('0x23')]);if(_0x16833e[_0x3af2('0x24')]){delete _0x16833e['name'];}_0x3baba9[_0x3af2('0x14')](_0x4ff23f)[_0x3af2('0x25')](_0x16833e);};}exports['index']=function(_0xbbf93,_0x12164c){var _0x589bf2={},_0x642ba8={},_0x1959f1={'count':0x0,'rows':[]};var _0x2c9ee3=_[_0x3af2('0x26')](db[_0x3af2('0x27')][_0x3af2('0x28')],function(_0x56be5d){return{'name':_0x56be5d['fieldName'],'type':_0x56be5d[_0x3af2('0x29')][_0x3af2('0x2a')]};});_0x642ba8[_0x3af2('0x2b')]=_[_0x3af2('0x26')](_0x2c9ee3,'name');_0x642ba8['query']=_[_0x3af2('0x2c')](_0xbbf93[_0x3af2('0x2d')]);_0x642ba8[_0x3af2('0x2e')]=_[_0x3af2('0x2f')](_0x642ba8[_0x3af2('0x2b')],_0x642ba8[_0x3af2('0x2d')]);_0x589bf2[_0x3af2('0x30')]=_[_0x3af2('0x2f')](_0x642ba8[_0x3af2('0x2b')],qs[_0x3af2('0x31')](_0xbbf93[_0x3af2('0x2d')][_0x3af2('0x31')]));_0x589bf2['attributes']=_0x589bf2[_0x3af2('0x30')][_0x3af2('0x32')]?_0x589bf2[_0x3af2('0x30')]:_0x642ba8[_0x3af2('0x2b')];if(!_0xbbf93['query']['hasOwnProperty'](_0x3af2('0x33'))){_0x589bf2[_0x3af2('0x18')]=qs[_0x3af2('0x18')](_0xbbf93[_0x3af2('0x2d')][_0x3af2('0x18')]);_0x589bf2[_0x3af2('0x15')]=qs[_0x3af2('0x15')](_0xbbf93[_0x3af2('0x2d')][_0x3af2('0x15')]);}_0x589bf2[_0x3af2('0x34')]=qs[_0x3af2('0x35')](_0xbbf93[_0x3af2('0x2d')][_0x3af2('0x35')]);_0x589bf2[_0x3af2('0x36')]=qs['filters'](_[_0x3af2('0x37')](_0xbbf93['query'],_0x642ba8[_0x3af2('0x2e')]),_0x2c9ee3);if(_0xbbf93[_0x3af2('0x2d')][_0x3af2('0x38')]){_0x589bf2['where']=_['merge'](_0x589bf2['where'],{'$or':_[_0x3af2('0x26')](_0x2c9ee3,function(_0x261596){if(_0x261596[_0x3af2('0x29')]!==_0x3af2('0x39')){var _0x3ab0af={};_0x3ab0af[_0x261596[_0x3af2('0x24')]]={'$like':'%'+_0xbbf93[_0x3af2('0x2d')]['filter']+'%'};return _0x3ab0af;}})});}_0x589bf2=_[_0x3af2('0x3a')]({},_0x589bf2,_0xbbf93['options']);var _0x34d0d9={'where':_0x589bf2[_0x3af2('0x36')]};return db['FaxApplication'][_0x3af2('0x17')](_0x34d0d9)[_0x3af2('0x1e')](function(_0x406a37){_0x1959f1[_0x3af2('0x17')]=_0x406a37;if(_0xbbf93['query'][_0x3af2('0x3b')]){_0x589bf2[_0x3af2('0x3c')]=[{'all':!![]}];}return db[_0x3af2('0x27')][_0x3af2('0x3d')](_0x589bf2);})[_0x3af2('0x1e')](function(_0x4be14e){_0x1959f1['rows']=_0x4be14e;return _0x1959f1;})['then'](respondWithFilteredResult(_0x12164c,_0x589bf2))[_0x3af2('0x3e')](handleError(_0x12164c,null));};exports[_0x3af2('0x3f')]=function(_0xfbf1ab,_0x4c3eb3){var _0x2b6488={'raw':!![],'where':{'id':_0xfbf1ab[_0x3af2('0x40')]['id']}},_0x540d46={};_0x540d46[_0x3af2('0x2b')]=_['keys'](db[_0x3af2('0x27')][_0x3af2('0x28')]);_0x540d46[_0x3af2('0x2d')]=_[_0x3af2('0x2c')](_0xfbf1ab[_0x3af2('0x2d')]);_0x540d46[_0x3af2('0x2e')]=_[_0x3af2('0x2f')](_0x540d46[_0x3af2('0x2b')],_0x540d46[_0x3af2('0x2d')]);_0x2b6488['attributes']=_[_0x3af2('0x2f')](_0x540d46[_0x3af2('0x2b')],qs[_0x3af2('0x31')](_0xfbf1ab['query']['fields']));_0x2b6488[_0x3af2('0x30')]=_0x2b6488['attributes']['length']?_0x2b6488[_0x3af2('0x30')]:_0x540d46[_0x3af2('0x2b')];if(_0xfbf1ab[_0x3af2('0x2d')][_0x3af2('0x3b')]){_0x2b6488[_0x3af2('0x3c')]=[{'all':!![]}];}_0x2b6488=_['merge']({},_0x2b6488,_0xfbf1ab[_0x3af2('0x41')]);return db[_0x3af2('0x27')]['find'](_0x2b6488)[_0x3af2('0x1e')](handleEntityNotFound(_0x4c3eb3,null))[_0x3af2('0x1e')](respondWithResult(_0x4c3eb3,null))[_0x3af2('0x3e')](handleError(_0x4c3eb3,null));};exports[_0x3af2('0x42')]=function(_0x5880bc,_0x593a43){return db[_0x3af2('0x27')][_0x3af2('0x42')](_0x5880bc[_0x3af2('0x43')],{})[_0x3af2('0x1e')](respondWithResult(_0x593a43,0xc9))[_0x3af2('0x3e')](handleError(_0x593a43,null));};exports['update']=function(_0x2d0053,_0x4c5fcd){if(_0x2d0053[_0x3af2('0x43')]['id']){delete _0x2d0053[_0x3af2('0x43')]['id'];}return db['FaxApplication']['find']({'where':{'id':_0x2d0053[_0x3af2('0x40')]['id']}})['then'](handleEntityNotFound(_0x4c5fcd,null))['then'](saveUpdates(_0x2d0053['body'],null))[_0x3af2('0x1e')](respondWithResult(_0x4c5fcd,null))[_0x3af2('0x3e')](handleError(_0x4c5fcd,null));};exports[_0x3af2('0x1f')]=function(_0xea64a,_0x42815a){return db[_0x3af2('0x27')][_0x3af2('0x44')]({'where':{'id':_0xea64a[_0x3af2('0x40')]['id']}})['then'](handleEntityNotFound(_0x42815a,null))[_0x3af2('0x1e')](removeEntity(_0x42815a,null))[_0x3af2('0x3e')](handleError(_0x42815a,null));}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.model.js b/server/api/faxApplication/faxApplication.model.js index a4ce8e5..67b64d7 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 _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 +var _0x2189=['api','moment','bluebird','request-promise','./faxApplication.attributes','exports','fax_applications','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger'];(function(_0x372d70,_0x57a5c5){var _0x1afa91=function(_0x7d1bb6){while(--_0x7d1bb6){_0x372d70['push'](_0x372d70['shift']());}};_0x1afa91(++_0x57a5c5);}(_0x2189,0x13d));var _0x9218=function(_0x2e7fc1,_0xc26ea2){_0x2e7fc1=_0x2e7fc1-0x0;var _0x2cb9d8=_0x2189[_0x2e7fc1];return _0x2cb9d8;};'use strict';var _=require('lodash');var util=require(_0x9218('0x0'));var logger=require(_0x9218('0x1'))(_0x9218('0x2'));var moment=require(_0x9218('0x3'));var BPromise=require(_0x9218('0x4'));var rp=require(_0x9218('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x9218('0x6'));module[_0x9218('0x7')]=function(_0x5c0451,_0x264217){return _0x5c0451['define']('FaxApplication',attributes,{'tableName':_0x9218('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x9218('0x9'),'collate':_0x9218('0xa')});}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.rpc.js b/server/api/faxApplication/faxApplication.rpc.js index c7d5b1e..1b41f26 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 _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 +var _0x9cae=['error','code','message','result','catch','UpdateFaxApplication','FaxApplication','update','body','options','raw','where','attributes','limit','then','info','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/environment','http','request','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x411ddc,_0x117f08){var _0x9109ac=function(_0x4369f9){while(--_0x4369f9){_0x411ddc['push'](_0x411ddc['shift']());}};_0x9109ac(++_0x117f08);}(_0x9cae,0x67));var _0xe9ca=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9cae[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xe9ca('0x0'));var util=require(_0xe9ca('0x1'));var moment=require(_0xe9ca('0x2'));var BPromise=require(_0xe9ca('0x3'));var rs=require(_0xe9ca('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe9ca('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xe9ca('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe9ca('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4dc5b2,_0x34c01f,_0x243acb){return new BPromise(function(_0x5ea347,_0x3c28d3){return client[_0xe9ca('0x8')](_0x4dc5b2,_0x243acb)['then'](function(_0x377a9d){logger['info'](_0xe9ca('0x9'),_0x34c01f,_0xe9ca('0xa'));logger[_0xe9ca('0xb')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x34c01f,'request\x20sent',JSON[_0xe9ca('0xc')](_0x377a9d));if(_0x377a9d['error']){if(_0x377a9d[_0xe9ca('0xd')][_0xe9ca('0xe')]===0x1f4){logger[_0xe9ca('0xd')](_0xe9ca('0x9'),_0x34c01f,_0x377a9d[_0xe9ca('0xd')][_0xe9ca('0xf')]);return _0x3c28d3(_0x377a9d['error']['message']);}logger['error'](_0xe9ca('0x9'),_0x34c01f,_0x377a9d[_0xe9ca('0xd')][_0xe9ca('0xf')]);return _0x5ea347(_0x377a9d[_0xe9ca('0xd')]['message']);}else{logger['info'](_0xe9ca('0x9'),_0x34c01f,_0xe9ca('0xa'));_0x5ea347(_0x377a9d[_0xe9ca('0x10')][_0xe9ca('0xf')]);}})[_0xe9ca('0x11')](function(_0x18f262){logger[_0xe9ca('0xd')]('FaxApplication,\x20%s,\x20%s',_0x34c01f,_0x18f262);_0x3c28d3(_0x18f262);});});}exports[_0xe9ca('0x12')]=function(_0x54b6f1){var _0x51e637=this;return new Promise(function(_0x510576,_0x10e448){return db[_0xe9ca('0x13')][_0xe9ca('0x14')](_0x54b6f1[_0xe9ca('0x15')],{'raw':_0x54b6f1[_0xe9ca('0x16')]?_0x54b6f1[_0xe9ca('0x16')][_0xe9ca('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x54b6f1['options']?_0x54b6f1[_0xe9ca('0x16')][_0xe9ca('0x18')]||null:null,'attributes':_0x54b6f1['options']?_0x54b6f1[_0xe9ca('0x16')][_0xe9ca('0x19')]||null:null,'limit':_0x54b6f1[_0xe9ca('0x16')]?_0x54b6f1[_0xe9ca('0x16')][_0xe9ca('0x1a')]||null:null})[_0xe9ca('0x1b')](function(_0x5dbd51){logger[_0xe9ca('0x1c')](_0xe9ca('0x12'),_0x54b6f1);logger['debug'](_0xe9ca('0x12'),_0x54b6f1,JSON['stringify'](_0x5dbd51));_0x510576(_0x5dbd51);})[_0xe9ca('0x11')](function(_0x36edd6){logger[_0xe9ca('0xd')](_0xe9ca('0x12'),_0x36edd6[_0xe9ca('0xf')],_0x54b6f1);_0x10e448(_0x51e637[_0xe9ca('0xd')](0x1f4,_0x36edd6['message']));});});}; \ No newline at end of file diff --git a/server/api/faxApplication/index.js b/server/api/faxApplication/index.js index 8c29c75..5cfb0c7 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 _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 +var _0x0598=['../../components/auth/service','get','isAuthenticated','/:id','show','post','put','update','delete','destroy','exports','multer','util','connect-timeout','fs-extra'];(function(_0x390247,_0x331bb3){var _0x3c60a1=function(_0x1bbc84){while(--_0x1bbc84){_0x390247['push'](_0x390247['shift']());}};_0x3c60a1(++_0x331bb3);}(_0x0598,0x92));var _0x8059=function(_0x4f91f0,_0x1a415e){_0x4f91f0=_0x4f91f0-0x0;var _0x26bc7b=_0x0598[_0x4f91f0];return _0x26bc7b;};'use strict';var multer=require(_0x8059('0x0'));var util=require(_0x8059('0x1'));var path=require('path');var timeout=require(_0x8059('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x8059('0x3'));var auth=require(_0x8059('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./faxApplication.controller');router[_0x8059('0x5')]('/',auth[_0x8059('0x6')](),controller['index']);router['get'](_0x8059('0x7'),auth[_0x8059('0x6')](),controller[_0x8059('0x8')]);router[_0x8059('0x9')]('/',auth['isAuthenticated'](),controller['create']);router[_0x8059('0xa')](_0x8059('0x7'),auth[_0x8059('0x6')](),controller[_0x8059('0xb')]);router[_0x8059('0xc')]('/:id',auth['isAuthenticated'](),controller[_0x8059('0xd')]);module[_0x8059('0xe')]=router; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.attributes.js b/server/api/faxInteraction/faxInteraction.attributes.js index d51a59f..1e827dc 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 _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 +var _0x55f9=['exports','BOOLEAN','DATE','STRING','ENUM','out','sequelize'];(function(_0x44d00e,_0x48be13){var _0x5ee434=function(_0x1db0c4){while(--_0x1db0c4){_0x44d00e['push'](_0x44d00e['shift']());}};_0x5ee434(++_0x48be13);}(_0x55f9,0x16b));var _0x955f=function(_0x373ede,_0x257eb2){_0x373ede=_0x373ede-0x0;var _0x1ef613=_0x55f9[_0x373ede];return _0x1ef613;};'use strict';var Sequelize=require(_0x955f('0x0'));module[_0x955f('0x1')]={'closed':{'type':Sequelize[_0x955f('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x955f('0x3')]},'disposition':{'type':Sequelize[_0x955f('0x4')]},'secondDisposition':{'type':Sequelize[_0x955f('0x4')]},'thirdDisposition':{'type':Sequelize[_0x955f('0x4')]},'note':{'type':Sequelize[_0x955f('0x4')]},'read1stAt':{'type':Sequelize[_0x955f('0x3')]},'fax':{'type':Sequelize[_0x955f('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x955f('0x5')]('in',_0x955f('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x955f('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x955f('0x5')]('in',_0x955f('0x6')),'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 4cd6f53..aee5b3b 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 _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 +var _0x2484=['name','send','Users','TagIds','Tags','split','push','index','map','FaxInteraction','type','key','model','keys','query','intersection','fields','attributes','length','nolimit','order','sort','where','filters','pick','select','field','color','from','tools_tags','u.id','u.fullname','ui.FaxInteractionId','user_has_fax_interactions','left_join','users','u.id\x20=\x20ui.UserId','fax_interactions','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','fax_accounts','a.id\x20=\x20i.FaxAccountId','me.FaxInteractionId\x20=\x20i.id','fax_interaction_has_tags','t.id\x20=\x20it.TagId','expr','search','parseSearch','sqlOperator','conditions','unreadMessages','value','having','`\x20=\x200','operator','find','buildExpression','text','start','Tag','union','User','$substring','UserId','body','some','compact','isEmpty','forEach','FaxAccountId','i.FaxAccountId\x20IN\x20?','createdAt','parse','$gte','$lte','null','\x20IS\x20NULL','read','`unreadMessages`\x20=\x200','tag','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','QueryTypes','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','DESC','t.id\x20IN\x20?','resolve','user','agent','getFaxAccounts','i.FaxAccountId\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','c.lastName','Contact.lastName','c.email','Contact.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.FaxInteractionId\x20IN\x20?','groupBy','FaxInteractionId','all','catch','params','rawAttributes','includeAll','include','options','create','describe','addMessage','FaxMessage','omit','ids','getMessages','format','YYYY-MM-DD\x20HH:mm:ss','findAll','rows','spread','emit','faxInteractionTags:save','removeTags','unix','join','root','server','tmp','files','attachments','transcript-%d-%s.zip','Attachment','Messages','mkdirSync','existsSync','createReadStream','pipe','createWriteStream','log','err','unlinkSync','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','./faxInteraction.socket','register','sendStatus','json','offset','undefined','limit','count','status','set','Content-Range','reject','update','then','destroy','end','error'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2484,0x172));var _0x4248=function(_0xd31621,_0x17b567){_0xd31621=_0xd31621-0x0;var _0x2e7ac0=_0x2484[_0xd31621];return _0x2e7ac0;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x4248('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4248('0x1'));var moment=require(_0x4248('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x4248('0x3'));var util=require(_0x4248('0x4'));var path=require(_0x4248('0x5'));var sox=require(_0x4248('0x6'));var csv=require(_0x4248('0x7'));var ejs=require(_0x4248('0x8'));var fs=require('fs');var fs_extra=require(_0x4248('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x4248('0xa'));var jsforce=require(_0x4248('0xb'));var deskjs=require(_0x4248('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x4248('0xd'));var Redis=require(_0x4248('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x4248('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4248('0x10'));var utils=require(_0x4248('0x11'));var config=require('../../config/environment');var licenseUtil=require(_0x4248('0x12'));var db=require(_0x4248('0x13'))['db'];config[_0x4248('0x14')]=_[_0x4248('0x15')](config[_0x4248('0x14')],{'host':_0x4248('0x16'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4248('0x14')]));require(_0x4248('0x17'))[_0x4248('0x18')](socket);function respondWithStatusCode(_0x55ec6a,_0x56b6f9){_0x56b6f9=_0x56b6f9||0xcc;return function(_0xf09c56){if(_0xf09c56){return _0x55ec6a[_0x4248('0x19')](_0x56b6f9);}return _0x55ec6a['status'](_0x56b6f9)['end']();};}function respondWithResult(_0x5e126a,_0x4b70e4){_0x4b70e4=_0x4b70e4||0xc8;return function(_0x54a9a7){if(_0x54a9a7){return _0x5e126a['status'](_0x4b70e4)[_0x4248('0x1a')](_0x54a9a7);}};}function respondWithFilteredResult(_0x19f427,_0x341610){return function(_0x4d910b){if(_0x4d910b){var _0x9c7d6=typeof _0x341610[_0x4248('0x1b')]===_0x4248('0x1c')&&typeof _0x341610[_0x4248('0x1d')]===_0x4248('0x1c');var _0xfe5248=_0x4d910b[_0x4248('0x1e')];var _0x3c6050=_0x9c7d6?0x0:_0x341610[_0x4248('0x1b')];var _0x111c79=_0x9c7d6?_0x4d910b[_0x4248('0x1e')]:_0x341610[_0x4248('0x1b')]+_0x341610[_0x4248('0x1d')];var _0x414a78;if(_0x111c79>=_0xfe5248){_0x111c79=_0xfe5248;_0x414a78=0xc8;}else{_0x414a78=0xce;}_0x19f427[_0x4248('0x1f')](_0x414a78);return _0x19f427[_0x4248('0x20')](_0x4248('0x21'),_0x3c6050+'-'+_0x111c79+'/'+_0xfe5248)[_0x4248('0x1a')](_0x4d910b);}return null;};}function patchUpdates(_0x2016d9){return function(_0x45c034){try{jsonpatch['apply'](_0x45c034,_0x2016d9,!![]);}catch(_0x5880fa){return BPromise[_0x4248('0x22')](_0x5880fa);}return _0x45c034['save']();};}function saveUpdates(_0x559c9f,_0x951609){return function(_0x405af3){if(_0x405af3){return _0x405af3[_0x4248('0x23')](_0x559c9f)[_0x4248('0x24')](function(_0xe2f012){return _0xe2f012;});}return null;};}function removeEntity(_0x59c208,_0x532b57){return function(_0x88a9d1){if(_0x88a9d1){return _0x88a9d1[_0x4248('0x25')]()['then'](function(){_0x59c208['status'](0xcc)[_0x4248('0x26')]();});}};}function handleEntityNotFound(_0x4851d6,_0x3e5dca){return function(_0x273fb7){if(!_0x273fb7){_0x4851d6[_0x4248('0x19')](0x194);}return _0x273fb7;};}function handleError(_0x71369e,_0x323691){_0x323691=_0x323691||0x1f4;return function(_0x1bd6f9){logger[_0x4248('0x27')](_0x1bd6f9['stack']);if(_0x1bd6f9[_0x4248('0x28')]){delete _0x1bd6f9[_0x4248('0x28')];}_0x71369e[_0x4248('0x1f')](_0x323691)[_0x4248('0x29')](_0x1bd6f9);};}function getInteractionUsers(_0x189275,_0xc1f442){return new BPromise(function(_0x29c631,_0x297cd9){try{if(_0xc1f442[_0x189275['id']]){_0x189275[_0x4248('0x2a')]=_['map'](_0xc1f442[_0x189275['id']],function(_0x183a75){return{'id':_0x183a75['id'],'fullname':_0x183a75['fullname']};});}}catch(_0x26f247){_0x297cd9(_0x26f247);}_0x29c631(_0x189275);});}function getInteractionTags(_0x44f5f4,_0x3e42cb){return new BPromise(function(_0x2b5c2e,_0x5d79e8){try{if(_0x44f5f4[_0x4248('0x2b')]){_0x44f5f4[_0x4248('0x2c')]=[];_0x44f5f4[_0x4248('0x2b')][_0x4248('0x2d')](',')['forEach'](function(_0x190f89){_0x44f5f4[_0x4248('0x2c')][_0x4248('0x2e')](_0x3e42cb[_0x190f89]);});}delete _0x44f5f4[_0x4248('0x2b')];}catch(_0x3b36d6){_0x5d79e8(_0x3b36d6);}_0x2b5c2e(_0x44f5f4);});}function updateFaxInteraction(_0x1fe48d,_0x392ea8,_0x462dac){return new BPromise(function(_0x126eb9,_0x3f9db7){return getInteractionUsers(_0x1fe48d,_0x462dac)[_0x4248('0x24')](function(_0x59be96){return getInteractionTags(_0x59be96,_0x392ea8);})[_0x4248('0x24')](function(_0xeef5bb){_0x126eb9(_0xeef5bb);})['catch'](function(_0x30b34a){_0x3f9db7(_0x30b34a);});});}exports[_0x4248('0x2f')]=function(_0x2089be,_0xc2f67e){var _0x23a977={},_0x3eead6={},_0x35a605={'count':0x0,'rows':[]};var _0x3533dd=_[_0x4248('0x30')](db[_0x4248('0x31')]['rawAttributes'],function(_0x400fdf){return{'name':_0x400fdf['fieldName'],'type':_0x400fdf[_0x4248('0x32')][_0x4248('0x33')]};});_0x3eead6[_0x4248('0x34')]=_['map'](_0x3533dd,_0x4248('0x28'));_0x3eead6['query']=_[_0x4248('0x35')](_0x2089be[_0x4248('0x36')]);_0x3eead6['filters']=_[_0x4248('0x37')](_0x3eead6[_0x4248('0x34')],_0x3eead6[_0x4248('0x36')]);_0x23a977['attributes']=_[_0x4248('0x37')](_0x3eead6[_0x4248('0x34')],qs[_0x4248('0x38')](_0x2089be[_0x4248('0x36')][_0x4248('0x38')]));_0x23a977[_0x4248('0x39')]=_0x23a977[_0x4248('0x39')][_0x4248('0x3a')]?_0x23a977[_0x4248('0x39')]:_0x3eead6[_0x4248('0x34')];if(!_0x2089be['query']['hasOwnProperty'](_0x4248('0x3b'))){_0x23a977[_0x4248('0x1d')]=qs[_0x4248('0x1d')](_0x2089be[_0x4248('0x36')]['limit']);_0x23a977['offset']=qs[_0x4248('0x1b')](_0x2089be[_0x4248('0x36')][_0x4248('0x1b')]);}_0x23a977[_0x4248('0x3c')]=qs[_0x4248('0x3d')](_0x2089be[_0x4248('0x36')]['sort']);_0x23a977[_0x4248('0x3e')]=qs[_0x4248('0x3f')](_[_0x4248('0x40')](_0x2089be[_0x4248('0x36')],_0x3eead6['filters']),_0x3533dd);var _0x1c9510=[];var _0x485510=squel[_0x4248('0x41')]()[_0x4248('0x42')]('id')[_0x4248('0x42')](_0x4248('0x28'))[_0x4248('0x42')](_0x4248('0x43'))[_0x4248('0x44')](_0x4248('0x45'));var _0x177c56=squel['select']()[_0x4248('0x42')](_0x4248('0x46'))['field'](_0x4248('0x47'))['field'](_0x4248('0x48'))[_0x4248('0x44')](_0x4248('0x49'),'ui')[_0x4248('0x4a')](_0x4248('0x4b'),'u',_0x4248('0x4c'));var _0x244904=squel[_0x4248('0x41')]()['from'](_0x4248('0x4d'),'i')['left_join']('cm_contacts','c',_0x4248('0x4e'))['left_join'](_0x4248('0x4b'),'o',_0x4248('0x4f'))[_0x4248('0x4a')](_0x4248('0x50'),'a',_0x4248('0x51'))[_0x4248('0x4a')]('fax_messages','me',_0x4248('0x52'))[_0x4248('0x4a')](_0x4248('0x53'),'it','it.FaxInteractionId\x20=\x20i.id')[_0x4248('0x4a')](_0x4248('0x45'),'t',_0x4248('0x54'));var _0xa4f388=squel[_0x4248('0x55')]();var _0x229dac=[];var _0x2707e0=squel[_0x4248('0x55')]();var _0x286202;if(_0x2089be['query'][_0x4248('0x56')]){_0x286202=as[_0x4248('0x57')](_0x2089be[_0x4248('0x36')][_0x4248('0x56')]);var _0x11475d=_0x286202[_0x4248('0x58')];for(var _0x442f02=0x0;_0x442f02<_0x286202['conditions'][_0x4248('0x3a')];_0x442f02++){var _0x8f6eaf=_0x286202[_0x4248('0x59')][_0x442f02];var _0x29930e='i';var _0x466f74=_['find'](_0x3533dd,[_0x4248('0x28'),_0x8f6eaf[_0x4248('0x42')]]);if(!_0x466f74){switch(_0x8f6eaf[_0x4248('0x42')]){case _0x4248('0x5a'):if(_0x8f6eaf[_0x4248('0x5b')]==0x1){_0x244904[_0x4248('0x5c')]('`'+_0x8f6eaf[_0x4248('0x42')]+_0x4248('0x5d'));}else{_0x244904['having']('`'+_0x8f6eaf[_0x4248('0x42')]+'`\x20>\x200');}break;case'Contact':if(_0x8f6eaf[_0x4248('0x5e')]==='$substring'){if(_0x8f6eaf[_0x4248('0x5b')][_0x4248('0x2d')]('\x20')[_0x4248('0x3a')]>0x1){_0xa4f388[_0x11475d]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x8f6eaf[_0x4248('0x5b')]),null);}else{var _0x36601e='%'+_0x8f6eaf['value']+'%';_0xa4f388[_0x11475d]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x36601e,_0x36601e,_0x36601e);}}else{_0x466f74=_[_0x4248('0x5f')](_0x3533dd,[_0x4248('0x28'),'ContactId']);_0x8f6eaf['field']='ContactId';_0x3fd296=as[_0x4248('0x60')](_0x29930e,_0x466f74[_0x4248('0x32')],_0x8f6eaf);_0xa4f388[_0x11475d](_0x3fd296[_0x4248('0x61')],_0x3fd296['value'][_0x4248('0x62')],_0x3fd296[_0x4248('0x5b')][_0x4248('0x26')]);}break;case _0x4248('0x63'):var _0x35efad=_0x8f6eaf[_0x4248('0x5b')]['split'](',')[_0x4248('0x30')](function(_0x569199){return Number(_0x569199);});_0x35efad['forEach'](function(_0x359913){_0x2707e0['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x359913+',%');});_0x229dac=_[_0x4248('0x64')](_0x229dac,_0x35efad);break;case _0x4248('0x65'):if(_0x8f6eaf[_0x4248('0x5e')]===_0x4248('0x66')){_0xa4f388[_0x11475d]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x8f6eaf[_0x4248('0x5b')]+'%',null);}else{_0x466f74=_[_0x4248('0x5f')](_0x3533dd,[_0x4248('0x28'),_0x4248('0x67')]);_0x8f6eaf['field']='UserId';_0x3fd296=as[_0x4248('0x60')](_0x29930e,_0x466f74[_0x4248('0x32')],_0x8f6eaf);_0xa4f388[_0x11475d](_0x3fd296[_0x4248('0x61')],_0x3fd296[_0x4248('0x5b')][_0x4248('0x62')],_0x3fd296[_0x4248('0x5b')][_0x4248('0x26')]);}break;case _0x4248('0x68'):_0x3fd296=as['buildExpression']('me',null,_0x8f6eaf);_0xa4f388[_0x11475d](_0x3fd296[_0x4248('0x61')],_0x3fd296[_0x4248('0x5b')]['start'],_0x3fd296[_0x4248('0x5b')][_0x4248('0x26')]);break;}}else{var _0x3fd296=as[_0x4248('0x60')](_0x29930e,_0x466f74[_0x4248('0x32')],_0x8f6eaf);_0xa4f388[_0x11475d](_0x3fd296['text'],_0x3fd296[_0x4248('0x5b')]['start'],_0x3fd296['value'][_0x4248('0x26')]);}}}else{var _0x37357c=_(_0x2089be['query'])[_0x4248('0x35')]()[_0x4248('0x30')](function(_0x1329b5){return _[_0x4248('0x69')](_0x3533dd,[_0x4248('0x28'),_0x1329b5])?_0x1329b5:undefined;})[_0x4248('0x6a')]()[_0x4248('0x5b')]();if(!_[_0x4248('0x6b')](_0x37357c)){_0x37357c[_0x4248('0x6c')](function(_0x491cbd){if(_0x491cbd===_0x4248('0x6d')){_0x244904[_0x4248('0x3e')](_0x4248('0x6e'),[]['concat'](_0x2089be[_0x4248('0x36')][_0x491cbd]));}else if(_0x491cbd===_0x4248('0x6f')){var _0x4599a7=JSON[_0x4248('0x70')](_0x2089be[_0x4248('0x36')][_0x491cbd])[_0x4248('0x71')];var _0x5c9b67=JSON[_0x4248('0x70')](_0x2089be[_0x4248('0x36')][_0x491cbd])[_0x4248('0x72')];_0x244904['where']('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x4599a7,_0x5c9b67);}else{if(_0x2089be['query'][_0x491cbd]===_0x4248('0x73')){_0x244904['where']('i.'+_0x491cbd+_0x4248('0x74'));}else{_0x244904['where']('i.'+_0x491cbd+'\x20=\x20?',_0x2089be[_0x4248('0x36')][_0x491cbd]);}}});}if(_0x2089be[_0x4248('0x36')][_0x4248('0x75')]){if(_0x2089be['query']['read']==0x1){_0x244904['having'](_0x4248('0x76'));}else{_0x244904[_0x4248('0x5c')]('`unreadMessages`\x20>\x200');}}if(_0x2089be[_0x4248('0x36')][_0x4248('0x77')]){_0x229dac=_['isArray'](_0x2089be['query']['tag'])?_0x2089be[_0x4248('0x36')]['tag']:new Array(_0x2089be['query'][_0x4248('0x77')]);_0x229dac[_0x4248('0x6c')](function(_0x2994b3){_0x2707e0['or'](_0x4248('0x78'),'%,'+_0x2994b3+',%');});}if(_0x2089be['query'][_0x4248('0x79')]){var _0x5e5f59=_0x2089be[_0x4248('0x36')][_0x4248('0x79')][_0x4248('0x7a')]('\x5c','\x5c\x5c')[_0x4248('0x7a')](/'/g,'\x27\x27');if(qs[_0x4248('0x7b')](_0x5e5f59)){_0xa4f388['or'](_0x4248('0x7c'),_0x5e5f59+'%')['or'](_0x4248('0x7d'),_0x5e5f59+'%');}_0xa4f388['or'](_0x4248('0x7e'),_0x5e5f59+'%');}}_0x244904['where'](_0xa4f388);_0x244904[_0x4248('0x7f')]('i.id');var _0x38d03a={'type':db['Sequelize'][_0x4248('0x80')]['SELECT'],'raw':!![]};var _0xace460=_0x244904[_0x4248('0x81')]();_0xace460['field']('i.id');_0xace460[_0x4248('0x42')](_0x4248('0x82'),_0x4248('0x5a'));if(_0x23a977[_0x4248('0x3c')]){_0x23a977[_0x4248('0x3c')][_0x4248('0x6c')](function(_0x3e7a36){var _0x1c55ac=_0x3e7a36[0x0]===_0x4248('0x83')?_0x3e7a36[0x0]:'i.'+_0x3e7a36[0x0];_0x244904[_0x4248('0x3c')](_0x1c55ac,_0x3e7a36[0x1]===_0x4248('0x84')?![]:!![]);});}if(!_[_0x4248('0x6b')](_0x229dac)){_0x244904[_0x4248('0x5c')](_0x2707e0);_0xace460['where'](_0x4248('0x85'),_0x229dac);}BPromise[_0x4248('0x86')]()[_0x4248('0x24')](function(){if(!_0x286202){if(_0x2089be[_0x4248('0x36')][_0x4248('0x6d')])return;_0xace460['where']('i.FaxAccountId\x20IS\x20NOT\x20NULL');_0x244904[_0x4248('0x3e')]('i.FaxAccountId\x20IS\x20NOT\x20NULL');return;}if(_0x2089be[_0x4248('0x87')]['role']!==_0x4248('0x88'))return;return _0x2089be[_0x4248('0x87')][_0x4248('0x89')]({'attributes':['id'],'raw':!![]})[_0x4248('0x24')](function(_0x386e7b){if(_['isEmpty'](_0x386e7b)){_0xace460['where'](_0x4248('0x8a'));_0x244904[_0x4248('0x3e')](_0x4248('0x8a'));}else{_0xace460['where'](_0x4248('0x6e'),_[_0x4248('0x30')](_0x386e7b,'id'));_0x244904[_0x4248('0x3e')](_0x4248('0x6e'),_[_0x4248('0x30')](_0x386e7b,'id'));}});})[_0x4248('0x24')](function(){if(_0x2089be[_0x4248('0x87')]['role']==='agent'&&!_0x286202&&!_0x2089be[_0x4248('0x36')][_0x4248('0x6d')])return[];return db[_0x4248('0x8b')][_0x4248('0x36')](_0xace460['toString'](),_0x38d03a);})[_0x4248('0x24')](function(_0x32c040){_0x35a605['count']=_0x32c040['length'];if(_0x35a605['count']===0x0)return[];return db[_0x4248('0x8b')]['query'](_0x485510[_0x4248('0x8c')](),_0x38d03a)[_0x4248('0x24')](function(_0x58bca3){_0x1c9510=_[_0x4248('0x8d')](_0x58bca3,'id');_0x38d03a=_[_0x4248('0x8e')](_0x38d03a,{'model':db[_0x4248('0x31')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2089be[_0x4248('0x36')]['fields']){_0x23a977[_0x4248('0x39')][_0x4248('0x6c')](function(_0x33a2e5){_0x244904['field']('i.'+_0x33a2e5);});}else{_0x244904[_0x4248('0x42')](_0x4248('0x82'),'unreadMessages');_0x244904[_0x4248('0x42')](_0x4248('0x8f'),_0x4248('0x90'));_0x244904[_0x4248('0x42')](_0x4248('0x91'),_0x4248('0x92'));_0x244904['field'](_0x4248('0x93'),_0x4248('0x83'));_0x244904[_0x4248('0x42')](_0x4248('0x94'));_0x244904[_0x4248('0x42')](_0x4248('0x95'),'Contact.firstName');_0x244904[_0x4248('0x42')](_0x4248('0x96'),_0x4248('0x97'));_0x244904[_0x4248('0x42')](_0x4248('0x98'),'Contact.email');_0x244904['field']('c.phone',_0x4248('0x99'));_0x244904[_0x4248('0x42')](_0x4248('0x9a'),_0x4248('0x9b'));_0x244904[_0x4248('0x42')](_0x4248('0x9c'),_0x4248('0x9d'));_0x244904[_0x4248('0x42')](_0x4248('0x9e'),'Owner.fullname');_0x244904['field'](_0x4248('0x9f'),_0x4248('0xa0'));_0x244904[_0x4248('0x42')](_0x4248('0xa1'),_0x4248('0x2b'));}if(_0x23a977[_0x4248('0x1d')])_0x244904[_0x4248('0x1d')](_0x23a977[_0x4248('0x1d')]);if(_0x23a977[_0x4248('0x1b')])_0x244904['offset'](_0x23a977[_0x4248('0x1b')]);return db[_0x4248('0x8b')][_0x4248('0x36')](_0x244904['toString'](),_0x38d03a);})['then'](function(_0x340e71){if(_0x340e71[_0x4248('0x3a')]>0x0)_0x177c56[_0x4248('0x3e')](_0x4248('0xa2'),_['map'](_0x340e71,'id'));return db[_0x4248('0x8b')][_0x4248('0x36')](_0x177c56['toString'](),_0x38d03a)['then'](function(_0x3f3d05){var _0x2bf3e1=_[_0x4248('0xa3')](_0x3f3d05,_0x4248('0xa4'));var _0x58bea3=[];_0x340e71[_0x4248('0x6c')](function(_0x3e1b06){_0x58bea3[_0x4248('0x2e')](updateFaxInteraction(_0x3e1b06,_0x1c9510,_0x2bf3e1));});return BPromise[_0x4248('0xa5')](_0x58bea3);});});})[_0x4248('0x24')](function(_0x58ac83){_0x35a605['rows']=_0x58ac83;return _0x35a605;})['then'](respondWithFilteredResult(_0xc2f67e,_0x23a977))[_0x4248('0xa6')](handleError(_0xc2f67e,null));};exports['show']=function(_0x4c63f5,_0x563fe8){var _0x3a7077={'raw':![],'where':{'id':_0x4c63f5[_0x4248('0xa7')]['id']}},_0x3803dd={};_0x3803dd[_0x4248('0x34')]=_[_0x4248('0x35')](db['FaxInteraction'][_0x4248('0xa8')]);_0x3803dd[_0x4248('0x36')]=_[_0x4248('0x35')](_0x4c63f5[_0x4248('0x36')]);_0x3803dd[_0x4248('0x3f')]=_[_0x4248('0x37')](_0x3803dd[_0x4248('0x34')],_0x3803dd[_0x4248('0x36')]);_0x3a7077[_0x4248('0x39')]=_[_0x4248('0x37')](_0x3803dd[_0x4248('0x34')],qs[_0x4248('0x38')](_0x4c63f5['query']['fields']));_0x3a7077[_0x4248('0x39')]=_0x3a7077[_0x4248('0x39')][_0x4248('0x3a')]?_0x3a7077[_0x4248('0x39')]:_0x3803dd[_0x4248('0x34')];if(_0x4c63f5[_0x4248('0x36')][_0x4248('0xa9')]){_0x3a7077[_0x4248('0xaa')]=[{'all':!![]}];}_0x3a7077=_[_0x4248('0x8e')]({},_0x3a7077,_0x4c63f5[_0x4248('0xab')]);return db['FaxInteraction']['find'](_0x3a7077)[_0x4248('0x24')](handleEntityNotFound(_0x563fe8,null))[_0x4248('0x24')](respondWithResult(_0x563fe8,null))[_0x4248('0xa6')](handleError(_0x563fe8,null));};exports[_0x4248('0xac')]=function(_0x4bf4c2,_0x472904){return db[_0x4248('0x31')]['create'](_0x4bf4c2[_0x4248('0x68')],{})[_0x4248('0x24')](respondWithResult(_0x472904,0xc9))[_0x4248('0xa6')](handleError(_0x472904,null));};exports[_0x4248('0x23')]=function(_0x3e23ea,_0x2f7952){if(_0x3e23ea[_0x4248('0x68')]['id']){delete _0x3e23ea[_0x4248('0x68')]['id'];}return db['FaxInteraction'][_0x4248('0x5f')]({'where':{'id':_0x3e23ea['params']['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x2f7952,null))['then'](saveUpdates(_0x3e23ea[_0x4248('0x68')],null))[_0x4248('0x24')](respondWithResult(_0x2f7952,null))[_0x4248('0xa6')](handleError(_0x2f7952,null));};exports[_0x4248('0x25')]=function(_0x11213a,_0x1f2547){return db[_0x4248('0x31')][_0x4248('0x5f')]({'where':{'id':_0x11213a[_0x4248('0xa7')]['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x1f2547,null))['then'](removeEntity(_0x1f2547,null))[_0x4248('0xa6')](handleError(_0x1f2547,null));};exports[_0x4248('0xad')]=function(_0x17b76f,_0x59954b){return db[_0x4248('0x31')][_0x4248('0xad')]()[_0x4248('0x24')](respondWithResult(_0x59954b,null))[_0x4248('0xa6')](handleError(_0x59954b,null));};exports[_0x4248('0xae')]=function(_0x5316fd,_0x19bb96,_0x25f245){return db[_0x4248('0xaf')][_0x4248('0x5f')]({'where':{'id':_0x5316fd['params']['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x19bb96,null))[_0x4248('0x24')](function(_0x4049ce){if(_0x4049ce){return _0x4049ce[_0x4248('0xae')](_0x5316fd[_0x4248('0x68')]['ids'],_[_0x4248('0xb0')](_0x5316fd['body'],[_0x4248('0xb1'),'id'])||{});}})[_0x4248('0x24')](respondWithResult(_0x19bb96,null))[_0x4248('0xa6')](handleError(_0x19bb96,null));};exports[_0x4248('0xb2')]=function(_0x26a333,_0x2e4379,_0x39124f){var _0x3a4dac={'raw':![],'where':{}};var _0x2d23c5={};var _0x5585c6={'count':0x0,'rows':[]};return db[_0x4248('0x31')]['findOne']({'where':{'id':_0x26a333[_0x4248('0xa7')]['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x2e4379,null))['then'](function(_0x39cda5){if(_0x39cda5){_0x2d23c5[_0x4248('0x34')]=_[_0x4248('0x35')](db[_0x4248('0xaf')][_0x4248('0xa8')]);_0x2d23c5[_0x4248('0x36')]=_[_0x4248('0x35')](_0x26a333[_0x4248('0x36')]);_0x2d23c5[_0x4248('0x3f')]=_[_0x4248('0x37')](_0x2d23c5[_0x4248('0x34')],_0x2d23c5[_0x4248('0x36')]);_0x3a4dac[_0x4248('0x39')]=_[_0x4248('0x37')](_0x2d23c5[_0x4248('0x34')],qs[_0x4248('0x38')](_0x26a333['query'][_0x4248('0x38')]));_0x3a4dac[_0x4248('0x39')]=_0x3a4dac['attributes']['length']?_0x3a4dac['attributes']:_0x2d23c5[_0x4248('0x34')];if(!_0x26a333[_0x4248('0x36')]['hasOwnProperty'](_0x4248('0x3b'))){_0x3a4dac[_0x4248('0x1d')]=qs[_0x4248('0x1d')](_0x26a333['query'][_0x4248('0x1d')]);_0x3a4dac[_0x4248('0x1b')]=qs[_0x4248('0x1b')](_0x26a333[_0x4248('0x36')][_0x4248('0x1b')]);}_0x3a4dac['order']=qs[_0x4248('0x3d')](_0x26a333['query'][_0x4248('0x3d')]);_0x3a4dac[_0x4248('0x3e')]=qs['filters'](_[_0x4248('0x40')](_0x26a333[_0x4248('0x36')],_0x2d23c5['filters']));_0x3a4dac['where'][_0x4248('0xa4')]=_0x39cda5['id'];if(_0x26a333[_0x4248('0x36')][_0x4248('0x79')]){_0x3a4dac['where']=_[_0x4248('0x8e')](_0x3a4dac[_0x4248('0x3e')],{'$or':_[_0x4248('0x30')](_0x3a4dac['attributes'],function(_0x4ab9bc){var _0x1a7a3a={};_0x1a7a3a[_0x4ab9bc]={'$like':'%'+_0x26a333[_0x4248('0x36')][_0x4248('0x79')]+'%'};return _0x1a7a3a;})});}if(_0x26a333[_0x4248('0x36')][_0x4248('0x71')]){var _0x595bc4=_0x26a333[_0x4248('0x36')][_0x4248('0x71')][_0x4248('0x2d')](',');var _0x14ffe8={};_0x14ffe8[_0x595bc4[0x0]]={'$gte':moment(_0x595bc4[0x1])[_0x4248('0xb3')](_0x4248('0xb4'))};_0x3a4dac[_0x4248('0x3e')]=_[_0x4248('0x8e')](_0x3a4dac[_0x4248('0x3e')],_0x14ffe8);}_0x3a4dac=_[_0x4248('0x8e')]({},_0x3a4dac,_0x26a333[_0x4248('0xab')]);return db[_0x4248('0xaf')]['count']({'where':_0x3a4dac[_0x4248('0x3e')]})[_0x4248('0x24')](function(_0x30c650){_0x5585c6[_0x4248('0x1e')]=_0x30c650;if(_0x26a333[_0x4248('0x36')][_0x4248('0xa9')]){_0x3a4dac[_0x4248('0xaa')]=[{'all':!![]}];}return db[_0x4248('0xaf')][_0x4248('0xb5')](_0x3a4dac);})[_0x4248('0x24')](function(_0x36f8ed){_0x5585c6[_0x4248('0xb6')]=_0x36f8ed;return _0x5585c6;});}})[_0x4248('0x24')](respondWithFilteredResult(_0x2e4379,_0x3a4dac))[_0x4248('0xa6')](handleError(_0x2e4379,null));};exports['addTags']=function(_0x564371,_0x26beea,_0x6bf025){return db[_0x4248('0x31')][_0x4248('0x5f')]({'where':{'id':_0x564371[_0x4248('0xa7')]['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x26beea,null))[_0x4248('0x24')](function(_0x2d099b){if(_0x2d099b){return _0x2d099b['setTags'](_0x564371['body']['ids'],_[_0x4248('0xb0')](_0x564371[_0x4248('0x68')],[_0x4248('0xb1'),'id'])||{})[_0x4248('0xb7')](function(){return db[_0x4248('0x63')][_0x4248('0xb5')]({'attributes':['id','name','color'],'where':{'id':_0x564371['body']['ids']}});})[_0x4248('0x24')](function(_0x8c28dd){socket[_0x4248('0xb8')](_0x4248('0xb9'),{'id':Number(_0x564371[_0x4248('0xa7')]['id']),'tags':_0x8c28dd||[]});return{'id':Number(_0x564371[_0x4248('0xa7')]['id']),'tags':_0x8c28dd||[]};});}})[_0x4248('0x24')](respondWithResult(_0x26beea,null))['catch'](handleError(_0x26beea,null));};exports[_0x4248('0xba')]=function(_0x49ece8,_0x1c2ede,_0x28a4b3){return db[_0x4248('0x31')][_0x4248('0x5f')]({'where':{'id':_0x49ece8['params']['id']}})[_0x4248('0x24')](handleEntityNotFound(_0x1c2ede,null))['then'](function(_0x4bf94a){if(_0x4bf94a){return _0x4bf94a[_0x4248('0xba')](_0x49ece8[_0x4248('0x36')]['ids']);}})[_0x4248('0x24')](respondWithStatusCode(_0x1c2ede,null))['catch'](handleError(_0x1c2ede,null));};exports['download']=function(_0x194cad,_0x3bd2a6){var _0x21300a=moment()[_0x4248('0xbb')]()[_0x4248('0x8c')]();var _0x41750b=path[_0x4248('0xbc')](config[_0x4248('0xbd')],_0x4248('0xbe'),'files',_0x4248('0xbf'));var _0x20caa9=path[_0x4248('0xbc')](config[_0x4248('0xbd')],_0x4248('0xbe'),_0x4248('0xc0'),_0x4248('0xc1'));var _0x23a24e=path[_0x4248('0xbc')](_0x41750b,_0x21300a);var _0x35fbd9=util['format'](_0x4248('0xc2'),_0x194cad[_0x4248('0xa7')]['id'],_0x21300a);var _0x38c448=path['join'](_0x41750b,_0x35fbd9);var _0x3214ae=[];_0x3214ae[_0x4248('0x2e')]({'model':db[_0x4248('0xc3')],'as':_0x4248('0xc3'),'raw':!![]});var _0x288ab8=[{'model':db['FaxMessage'],'as':_0x4248('0xc4'),'attributes':['id',_0x4248('0x68'),_0x4248('0x6f')],'include':_0x3214ae}];return db[_0x4248('0x31')][_0x4248('0x5f')]({'where':{'id':_0x194cad[_0x4248('0xa7')]['id']},'include':_0x288ab8})['then'](handleEntityNotFound(_0x3bd2a6,null))[_0x4248('0x24')](function(_0x3bc27f){if(_0x3bc27f&&_0x3bc27f[_0x4248('0xc4')]){var _0x4fa56b=_0x3bc27f['get']({'plain':!![]});fs[_0x4248('0xc5')](_0x23a24e);for(var _0x326269=0x0;_0x326269<_0x4fa56b[_0x4248('0xc4')][_0x4248('0x3a')];_0x326269++){var _0x52061e=_0x4fa56b[_0x4248('0xc4')][_0x326269][_0x4248('0xc3')];if(_0x52061e){var _0x254cc6=path[_0x4248('0xbc')](_0x20caa9,_0x52061e['basename']);if(fs[_0x4248('0xc6')](_0x254cc6)){fs[_0x4248('0xc7')](_0x254cc6)[_0x4248('0xc8')](fs[_0x4248('0xc9')](path[_0x4248('0xbc')](_0x23a24e,_0x52061e['basename'])));}}}return BPromise[_0x4248('0x86')]()[_0x4248('0x24')](function(){return new BPromise(function(_0x338d8d,_0x2064bb){zipdir(_0x23a24e,{'saveTo':_0x38c448},function(_0x19cc6f,_0x1f29e8){if(_0x19cc6f)return _0x2064bb(_0x19cc6f);return _0x338d8d(_0x1f29e8);});})['then'](function(){return new BPromise(function(_0x4d441a,_0x372b51){rimraf(_0x23a24e,function(_0x1f3b7a){if(_0x1f3b7a)_0x372b51(_0x1f3b7a);return _0x4d441a();});});})['then'](function(){return _0x3bd2a6['download'](_0x38c448,_0x35fbd9,function(_0x4f3b88){if(_0x4f3b88){console[_0x4248('0xca')](_0x4248('0xcb'),_0x4f3b88);}else{fs[_0x4248('0xcc')](_0x38c448);}});});});}else{return _0x3bd2a6['sendStatus'](0xc8);}})['catch'](handleError(_0x3bd2a6,null));}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.events.js b/server/api/faxInteraction/faxInteraction.events.js index f6bbd78..99e80e4 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 _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 +var _0x472d=['setDataValue','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','save','remove','then'];(function(_0x4c49c0,_0x4adb76){var _0x596b70=function(_0x292c6b){while(--_0x292c6b){_0x4c49c0['push'](_0x4c49c0['shift']());}};_0x596b70(++_0x4adb76);}(_0x472d,0x160));var _0xd472=function(_0x5ee832,_0x357c27){_0x5ee832=_0x5ee832-0x0;var _0x25a185=_0x472d[_0x5ee832];return _0x25a185;};'use strict';var EventEmitter=require(_0xd472('0x0'));var FaxInteraction=require(_0xd472('0x1'))['db'][_0xd472('0x2')];var FaxMessage=require(_0xd472('0x1'))['db'][_0xd472('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0xd472('0x4')](0x0);var events={'afterCreate':_0xd472('0x5'),'afterUpdate':'update','afterDestroy':_0xd472('0x6')};function emitEvent(_0x4a7df2){return function(_0x276e15,_0x2de459,_0x5a4cb9){_0x276e15['getUsers']({'attributes':['id'],'raw':!![]})[_0xd472('0x7')](function(_0x3c3453){_0x276e15[_0xd472('0x8')]('Users',_0x3c3453[_0xd472('0x9')](function(_0x1dd767){return{'id':_0x1dd767['id']};}));return FaxMessage[_0xd472('0xa')]({'where':{'FaxInteractionId':_0x276e15['id'],'direction':'in','read':![]},'raw':!![]});})[_0xd472('0x7')](function(_0xdb45e2){_0x276e15[_0xd472('0x8')](_0xd472('0xb'),_0xdb45e2[_0xd472('0xc')]);FaxInteractionEvents[_0xd472('0xd')](_0x4a7df2+':'+_0x276e15['id'],_0x276e15);FaxInteractionEvents[_0xd472('0xd')](_0x4a7df2,_0x276e15);_0x5a4cb9(null);})[_0xd472('0xe')](_0x5a4cb9(null));};}for(var e in events){if(events[_0xd472('0xf')](e)){var event=events[e];FaxInteraction[_0xd472('0x10')](e,emitEvent(event));}}module[_0xd472('0x11')]=FaxInteractionEvents; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.model.js b/server/api/faxInteraction/faxInteraction.model.js index 8597aa6..6ae9b37 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 _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 +var _0x75e8=['closedAt','format','lodash','../../config/logger','api','moment','request-promise','path','../../config/environment','./faxInteraction.attributes','define','FaxInteraction','changed'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x75e8,0x1f0));var _0x875e=function(_0x324fef,_0x3839c8){_0x324fef=_0x324fef-0x0;var _0xdf5cf8=_0x75e8[_0x324fef];return _0xdf5cf8;};'use strict';var _=require(_0x875e('0x0'));var util=require('util');var logger=require(_0x875e('0x1'))(_0x875e('0x2'));var moment=require(_0x875e('0x3'));var BPromise=require('bluebird');var rp=require(_0x875e('0x4'));var fs=require('fs');var path=require(_0x875e('0x5'));var rimraf=require('rimraf');var config=require(_0x875e('0x6'));var attributes=require(_0x875e('0x7'));module['exports']=function(_0x48c0af,_0xbd20de){return _0x48c0af[_0x875e('0x8')](_0x875e('0x9'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x91d47c,_0x325ac7,_0x3e06c2){if(_0x91d47c[_0x875e('0xa')]('closed')){_0x91d47c[_0x875e('0xb')]=moment()[_0x875e('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3e06c2(null,_0x91d47c);}}});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.rpc.js b/server/api/faxInteraction/faxInteraction.rpc.js index 0ff099a..7422d4e 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 _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 +var _0x8ba2=['attributes','UpdateFaxInteraction','find','ids','AddTags','stringify','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','socket.io-emitter','register','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','FaxInteraction','body','options','raw','where'];(function(_0x441f7a,_0x576321){var _0x4821da=function(_0x5c5b52){while(--_0x5c5b52){_0x441f7a['push'](_0x441f7a['shift']());}};_0x4821da(++_0x576321);}(_0x8ba2,0xba));var _0x28ba=function(_0x5864d6,_0x4c5cde){_0x5864d6=_0x5864d6-0x0;var _0x17754f=_0x8ba2[_0x5864d6];return _0x17754f;};'use strict';var _=require(_0x28ba('0x0'));var util=require(_0x28ba('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x28ba('0x2'));var fs=require('fs');var Redis=require(_0x28ba('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x28ba('0x4'));var logger=require(_0x28ba('0x5'))(_0x28ba('0x6'));var config=require(_0x28ba('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x28ba('0x8')][_0x28ba('0x9')]({'port':0x232a});config[_0x28ba('0xa')]=_['defaults'](config[_0x28ba('0xa')],{'host':_0x28ba('0xb'),'port':0x18eb});var socket=require(_0x28ba('0xc'))(new Redis(config[_0x28ba('0xa')]));require('./faxInteraction.socket')[_0x28ba('0xd')](socket);function respondWithRpcPromise(_0x18cc42,_0x2e8d25,_0x4b8c27){return new BPromise(function(_0x1e6dcb,_0x28613c){return client[_0x28ba('0xe')](_0x18cc42,_0x4b8c27)[_0x28ba('0xf')](function(_0x412887){logger[_0x28ba('0x10')](_0x28ba('0x11'),_0x2e8d25,_0x28ba('0x12'));logger[_0x28ba('0x13')]('FaxInteraction,\x20%s,\x20%s,\x20%s',_0x2e8d25,_0x28ba('0x12'),JSON['stringify'](_0x412887));if(_0x412887[_0x28ba('0x14')]){if(_0x412887[_0x28ba('0x14')][_0x28ba('0x15')]===0x1f4){logger[_0x28ba('0x14')](_0x28ba('0x11'),_0x2e8d25,_0x412887[_0x28ba('0x14')][_0x28ba('0x16')]);return _0x28613c(_0x412887[_0x28ba('0x14')][_0x28ba('0x16')]);}logger[_0x28ba('0x14')](_0x28ba('0x11'),_0x2e8d25,_0x412887['error']['message']);return _0x1e6dcb(_0x412887[_0x28ba('0x14')]['message']);}else{logger[_0x28ba('0x10')]('FaxInteraction,\x20%s,\x20%s',_0x2e8d25,_0x28ba('0x12'));_0x1e6dcb(_0x412887[_0x28ba('0x17')][_0x28ba('0x16')]);}})[_0x28ba('0x18')](function(_0x31ca02){logger[_0x28ba('0x14')](_0x28ba('0x11'),_0x2e8d25,_0x31ca02);_0x28613c(_0x31ca02);});});}exports['UpdateFaxInteraction']=function(_0x266acf){var _0x3660c8=this;return new Promise(function(_0x4bcf0b,_0x53af56){return db[_0x28ba('0x19')]['update'](_0x266acf[_0x28ba('0x1a')],{'raw':_0x266acf['options']?_0x266acf[_0x28ba('0x1b')][_0x28ba('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x266acf[_0x28ba('0x1b')]?_0x266acf[_0x28ba('0x1b')][_0x28ba('0x1d')]||null:null,'attributes':_0x266acf[_0x28ba('0x1b')]?_0x266acf[_0x28ba('0x1b')][_0x28ba('0x1e')]||null:null,'limit':_0x266acf[_0x28ba('0x1b')]?_0x266acf[_0x28ba('0x1b')]['limit']||null:null})[_0x28ba('0xf')](function(_0x4fd9c0){logger[_0x28ba('0x10')]('UpdateFaxInteraction',_0x266acf);logger[_0x28ba('0x13')](_0x28ba('0x1f'),_0x266acf,JSON['stringify'](_0x4fd9c0));_0x4bcf0b(_0x4fd9c0);})['catch'](function(_0x733cf0){logger[_0x28ba('0x14')](_0x28ba('0x1f'),_0x733cf0[_0x28ba('0x16')],_0x266acf);_0x53af56(_0x3660c8['error'](0x1f4,_0x733cf0[_0x28ba('0x16')]));});});};exports['AddTagsToFaxInteraction']=function(_0x12493d){return new Promise(function(_0x313ea2,_0x752d75){return db['FaxInteraction'][_0x28ba('0x20')]({'where':_0x12493d[_0x28ba('0x1b')]?_0x12493d['options'][_0x28ba('0x1d')]||null:null})['then'](function(_0x259aa6){if(_0x259aa6){return _0x259aa6['addTags'](_0x12493d[_0x28ba('0x1a')]['ids'],_['omit'](_0x12493d['body'],[_0x28ba('0x21'),'id'])||{});}})['spread'](function(_0x50ed9d){logger[_0x28ba('0x10')]('AddTags',_0x12493d);logger['debug'](_0x28ba('0x22'),_0x12493d,JSON[_0x28ba('0x23')](_0x50ed9d));_0x313ea2(_0x50ed9d);})[_0x28ba('0x18')](function(_0x43b436){logger[_0x28ba('0x14')](_0x28ba('0x22'),_0x43b436[_0x28ba('0x16')],_0x12493d);_0x752d75(_this['error'](0x1f4,_0x43b436[_0x28ba('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.socket.js b/server/api/faxInteraction/faxInteraction.socket.js index 0b77150..a297f1a 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 _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 +var _0x039d=['emit','removeListener','register','length','faxInteraction:','./faxInteraction.events','remove','update'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0x039d,0xa5));var _0xd039=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x039d[_0x20a584];return _0x4b41a8;};'use strict';var FaxInteractionEvents=require(_0xd039('0x0'));var events=['save',_0xd039('0x1'),_0xd039('0x2')];function createListener(_0x3e55fe,_0x98cf34){return function(_0x59b11d){_0x98cf34[_0xd039('0x3')](_0x3e55fe,_0x59b11d);};}function removeListener(_0x299f3a,_0x479d95){return function(){FaxInteractionEvents[_0xd039('0x4')](_0x299f3a,_0x479d95);};}exports[_0xd039('0x5')]=function(_0x3aa5a6){for(var _0x365c33=0x0,_0x3fcdbc=events[_0xd039('0x6')];_0x365c33<_0x3fcdbc;_0x365c33++){var _0x5e6e43=events[_0x365c33];var _0x5e7eec=createListener(_0xd039('0x7')+_0x5e6e43,_0x3aa5a6);FaxInteractionEvents['on'](_0x5e6e43,_0x5e7eec);}}; \ No newline at end of file diff --git a/server/api/faxInteraction/index.js b/server/api/faxInteraction/index.js index 568f921..2f23408 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 _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 +var _0xd43b=['isAuthenticated','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','put','faxinteraction:update','update','delete','faxinteraction:destroy','destroy','removeTags','exports','multer','util','fs-extra','../../components/auth/service','./faxInteraction.controller','index','get','/describe'];(function(_0x47259d,_0x5c894a){var _0x231852=function(_0x4e3d41){while(--_0x4e3d41){_0x47259d['push'](_0x47259d['shift']());}};_0x231852(++_0x5c894a);}(_0xd43b,0xf8));var _0xbd43=function(_0x147533,_0x34d86f){_0x147533=_0x147533-0x0;var _0x3a4bba=_0xd43b[_0x147533];return _0x3a4bba;};'use strict';var multer=require(_0xbd43('0x0'));var util=require(_0xbd43('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xbd43('0x2'));var auth=require(_0xbd43('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbd43('0x4'));router['get']('/',auth['isAuthenticated'](),controller[_0xbd43('0x5')]);router[_0xbd43('0x6')](_0xbd43('0x7'),auth[_0xbd43('0x8')](),controller[_0xbd43('0x9')]);router['get'](_0xbd43('0xa'),auth[_0xbd43('0x8')](),controller[_0xbd43('0xb')]);router[_0xbd43('0x6')](_0xbd43('0xc'),auth[_0xbd43('0x8')](),controller[_0xbd43('0xd')]);router[_0xbd43('0x6')](_0xbd43('0xe'),auth[_0xbd43('0x8')](),controller[_0xbd43('0xf')]);router[_0xbd43('0x10')]('/',auth[_0xbd43('0x8')](),controller[_0xbd43('0x11')]);router['post']('/:id/messages',auth[_0xbd43('0x8')](),controller[_0xbd43('0x12')]);router[_0xbd43('0x10')](_0xbd43('0x13'),auth[_0xbd43('0x8')](),interaction[_0xbd43('0x14')](_0xbd43('0x15'),_0xbd43('0x16')),controller[_0xbd43('0x17')]);router[_0xbd43('0x18')]('/:id',auth[_0xbd43('0x8')](),interaction[_0xbd43('0x14')]('fax',_0xbd43('0x19')),controller[_0xbd43('0x1a')]);router[_0xbd43('0x1b')](_0xbd43('0xa'),auth[_0xbd43('0x8')](),interaction[_0xbd43('0x14')](_0xbd43('0x15'),_0xbd43('0x1c')),controller[_0xbd43('0x1d')]);router[_0xbd43('0x1b')](_0xbd43('0x13'),auth['isAuthenticated'](),controller[_0xbd43('0x1e')]);module[_0xbd43('0x1f')]=router; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.attributes.js b/server/api/faxMessage/faxMessage.attributes.js index fae232e..71cec07 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 _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 +var _0x2dae=['TEXT','medium','BOOLEAN','ENUM','out','DATE','sequelize'];(function(_0x4ffc46,_0x5e55bf){var _0x4ada67=function(_0x42da45){while(--_0x42da45){_0x4ffc46['push'](_0x4ffc46['shift']());}};_0x4ada67(++_0x5e55bf);}(_0x2dae,0xc3));var _0xe2da=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x2dae[_0x18ab2a];return _0x16dcee;};'use strict';var Sequelize=require(_0xe2da('0x0'));module['exports']={'body':{'type':Sequelize[_0xe2da('0x1')](_0xe2da('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xe2da('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0xe2da('0x4')]('in',_0xe2da('0x5')),'defaultValue':'out','allowNull':![]},'failMessage':{'type':Sequelize[_0xe2da('0x1')],'defaultValue':null},'readAt':{'type':Sequelize[_0xe2da('0x6')]}}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.controller.js b/server/api/faxMessage/faxMessage.controller.js index e68c6d9..b62cb7f 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 _0xa863=['merge','VIRTUAL','includeAll','findAll','show','params','keys','rawAttributes','include','options','update','body','find','describe','fax-interactions','accept','fax','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','Contact','get','FaxInteraction','FaxInteractionId','read1stAt','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','acceptMessage','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','SELECT','contact','manual','interface','SIP/%s','EventManager','acceptmessage','reject','interaction','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','CmContact','QueryTypes','channel','event','rejectmessage','create','findOne','isNil','Attachment','AttachmentId','SendFax','/var/opt/motion2/server/files/attachments/%s','download','join','root','files','attachments','basename','eml-format','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','squel','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','socket.io-emitter','register','jayson/promise','http','client','request','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','sendStatus','end','json','offset','undefined','limit','count','status','Content-Range','apply','save','destroy','stack','name','send','index','map','FaxMessage','fieldName','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter'];(function(_0x1ce441,_0x3c2be5){var _0x1dc7b0=function(_0x335551){while(--_0x335551){_0x1ce441['push'](_0x1ce441['shift']());}};_0x1dc7b0(++_0x3c2be5);}(_0xa863,0x1ef));var _0x3a86=function(_0x4e2669,_0x1946b8){_0x4e2669=_0x4e2669-0x0;var _0x4bdbef=_0xa863[_0x4e2669];return _0x4bdbef;};'use strict';var emlformat=require(_0x3a86('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3a86('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3a86('0x2'));var moment=require(_0x3a86('0x3'));var BPromise=require(_0x3a86('0x4'));var Mustache=require(_0x3a86('0x5'));var util=require('util');var path=require(_0x3a86('0x6'));var sox=require(_0x3a86('0x7'));var csv=require(_0x3a86('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3a86('0x9'));var squel=require(_0x3a86('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3a86('0xb'));var Papa=require(_0x3a86('0xc'));var Redis=require(_0x3a86('0xd'));var authService=require(_0x3a86('0xe'));var qs=require(_0x3a86('0xf'));var as=require(_0x3a86('0x10'));var hardwareService=require(_0x3a86('0x11'));var logger=require(_0x3a86('0x12'))('api');var utils=require(_0x3a86('0x13'));var config=require(_0x3a86('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x3a86('0x15'))['db'];config['redis']=_[_0x3a86('0x16')](config[_0x3a86('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0x3a86('0x18'))(new Redis(config[_0x3a86('0x17')]));require('./faxMessage.socket')[_0x3a86('0x19')](socket);var jayson=require(_0x3a86('0x1a'));var client=jayson['client'][_0x3a86('0x1b')]({'port':0x232c});var client9002=jayson[_0x3a86('0x1c')][_0x3a86('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x40eb7d,_0x45b6b3,_0x19ee00,_0x1657c5){return new BPromise(function(_0x5c4dc2,_0x1b4e7b){var _0x4891b4=_0x1657c5||client;return _0x4891b4[_0x3a86('0x1d')](_0x40eb7d,_0x19ee00)[_0x3a86('0x1e')](function(_0x5126a5){logger[_0x3a86('0x1f')](_0x3a86('0x20'),_0x45b6b3,_0x3a86('0x21'));logger[_0x3a86('0x22')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x45b6b3,'request\x20sent',JSON[_0x3a86('0x23')](_0x5126a5));if(_0x5126a5[_0x3a86('0x24')]){if(_0x5126a5[_0x3a86('0x24')][_0x3a86('0x25')]===0x1f4){logger[_0x3a86('0x24')](_0x3a86('0x20'),_0x45b6b3,_0x5126a5[_0x3a86('0x24')][_0x3a86('0x26')]);return _0x1b4e7b(_0x5126a5[_0x3a86('0x24')]['message']);}logger[_0x3a86('0x24')](_0x3a86('0x20'),_0x45b6b3,_0x5126a5[_0x3a86('0x24')][_0x3a86('0x26')]);return _0x5c4dc2(_0x5126a5[_0x3a86('0x24')][_0x3a86('0x26')]);}else{logger[_0x3a86('0x1f')]('FaxMessage,\x20%s,\x20%s',_0x45b6b3,_0x3a86('0x21'));_0x5c4dc2(_0x5126a5['result'][_0x3a86('0x26')]);}})[_0x3a86('0x27')](function(_0x106016){logger['error']('FaxMessage,\x20%s,\x20%s',_0x45b6b3,_0x106016);_0x1b4e7b(_0x106016);});});}function respondWithStatusCode(_0x506738,_0x23808d){_0x23808d=_0x23808d||0xcc;return function(_0x305010){if(_0x305010){return _0x506738[_0x3a86('0x28')](_0x23808d);}return _0x506738['status'](_0x23808d)[_0x3a86('0x29')]();};}function respondWithResult(_0x4052bf,_0x5e5ee3){_0x5e5ee3=_0x5e5ee3||0xc8;return function(_0x5d960a){if(_0x5d960a){return _0x4052bf['status'](_0x5e5ee3)[_0x3a86('0x2a')](_0x5d960a);}};}function respondWithFilteredResult(_0x4a87b1,_0x4adaf1){return function(_0x1ad1f7){if(_0x1ad1f7){var _0x7410e=typeof _0x4adaf1[_0x3a86('0x2b')]===_0x3a86('0x2c')&&typeof _0x4adaf1[_0x3a86('0x2d')]===_0x3a86('0x2c');var _0x3eefc1=_0x1ad1f7[_0x3a86('0x2e')];var _0x5b2238=_0x7410e?0x0:_0x4adaf1[_0x3a86('0x2b')];var _0x55de1e=_0x7410e?_0x1ad1f7['count']:_0x4adaf1['offset']+_0x4adaf1[_0x3a86('0x2d')];var _0x358b95;if(_0x55de1e>=_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=_0x3916b4){_0x1c4b58=_0x3916b4;_0x46849d=0xc8;}else{_0x46849d=0xce;}_0xe269e3['status'](_0x46849d);return _0xe269e3['set'](_0x6cc0('0x30'),_0x9903b9+'-'+_0x1c4b58+'/'+_0x3916b4)[_0x6cc0('0x2b')](_0x39c168);}return null;};}function patchUpdates(_0x3b324b){return function(_0x46257b){try{jsonpatch[_0x6cc0('0x31')](_0x46257b,_0x3b324b,!![]);}catch(_0x3a5630){return BPromise[_0x6cc0('0x32')](_0x3a5630);}return _0x46257b[_0x6cc0('0x33')]();};}function saveUpdates(_0x5972bc,_0x53047e){return function(_0x5de26c){if(_0x5de26c){return _0x5de26c[_0x6cc0('0x34')](_0x5972bc)[_0x6cc0('0x1f')](function(_0x5012e5){return _0x5012e5;});}return null;};}function removeEntity(_0xe2a3c2,_0x3c92e6){return function(_0x193df5){if(_0x193df5){return _0x193df5['destroy']()[_0x6cc0('0x1f')](function(){_0xe2a3c2['status'](0xcc)[_0x6cc0('0x2a')]();});}};}function handleEntityNotFound(_0x1026de,_0x4655fe){return function(_0x1ea7d3){if(!_0x1ea7d3){_0x1026de[_0x6cc0('0x28')](0x194);}return _0x1ea7d3;};}function handleError(_0x401f90,_0x2e4887){_0x2e4887=_0x2e4887||0x1f4;return function(_0x1662e3){logger[_0x6cc0('0x23')](_0x1662e3[_0x6cc0('0x35')]);if(_0x1662e3[_0x6cc0('0x36')]){delete _0x1662e3['name'];}_0x401f90[_0x6cc0('0x29')](_0x2e4887)['send'](_0x1662e3);};}exports[_0x6cc0('0x37')]=function(_0x456764,_0x6a7416){var _0xea789e={},_0x8aa4f6={},_0xe8d3d6={'count':0x0,'rows':[]};var _0x34a861=_['map'](db['FaxMessage'][_0x6cc0('0x38')],function(_0x13d471){return{'name':_0x13d471['fieldName'],'type':_0x13d471['type'][_0x6cc0('0x39')]};});_0x8aa4f6['model']=_[_0x6cc0('0x3a')](_0x34a861,_0x6cc0('0x36'));_0x8aa4f6['query']=_['keys'](_0x456764[_0x6cc0('0x3b')]);_0x8aa4f6[_0x6cc0('0x3c')]=_[_0x6cc0('0x3d')](_0x8aa4f6[_0x6cc0('0x3e')],_0x8aa4f6['query']);_0xea789e[_0x6cc0('0x3f')]=_[_0x6cc0('0x3d')](_0x8aa4f6[_0x6cc0('0x3e')],qs['fields'](_0x456764[_0x6cc0('0x3b')][_0x6cc0('0x40')]));_0xea789e[_0x6cc0('0x3f')]=_0xea789e[_0x6cc0('0x3f')][_0x6cc0('0x41')]?_0xea789e[_0x6cc0('0x3f')]:_0x8aa4f6[_0x6cc0('0x3e')];if(!_0x456764[_0x6cc0('0x3b')][_0x6cc0('0x42')](_0x6cc0('0x43'))){_0xea789e[_0x6cc0('0x2d')]=qs[_0x6cc0('0x2d')](_0x456764['query'][_0x6cc0('0x2d')]);_0xea789e[_0x6cc0('0x2c')]=qs['offset'](_0x456764['query'][_0x6cc0('0x2c')]);}_0xea789e[_0x6cc0('0x44')]=qs[_0x6cc0('0x45')](_0x456764[_0x6cc0('0x3b')][_0x6cc0('0x45')]);_0xea789e[_0x6cc0('0x46')]=qs[_0x6cc0('0x3c')](_['pick'](_0x456764[_0x6cc0('0x3b')],_0x8aa4f6[_0x6cc0('0x3c')]),_0x34a861);if(_0x456764[_0x6cc0('0x3b')][_0x6cc0('0x47')]){_0xea789e[_0x6cc0('0x46')]=_[_0x6cc0('0x48')](_0xea789e[_0x6cc0('0x46')],{'$or':_['map'](_0x34a861,function(_0x486d43){if(_0x486d43[_0x6cc0('0x49')]!==_0x6cc0('0x4a')){var _0x53921e={};_0x53921e[_0x486d43[_0x6cc0('0x36')]]={'$like':'%'+_0x456764[_0x6cc0('0x3b')][_0x6cc0('0x47')]+'%'};return _0x53921e;}})});}_0xea789e=_['merge']({},_0xea789e,_0x456764[_0x6cc0('0x4b')]);var _0x151cca={'where':_0xea789e[_0x6cc0('0x46')]};return db['FaxMessage'][_0x6cc0('0x2f')](_0x151cca)[_0x6cc0('0x1f')](function(_0x5f42e4){_0xe8d3d6[_0x6cc0('0x2f')]=_0x5f42e4;if(_0x456764[_0x6cc0('0x3b')]['includeAll']){_0xea789e[_0x6cc0('0x4c')]=[{'all':!![]}];}return db[_0x6cc0('0x4d')][_0x6cc0('0x4e')](_0xea789e);})[_0x6cc0('0x1f')](function(_0x32ffb4){_0xe8d3d6[_0x6cc0('0x4f')]=_0x32ffb4;return _0xe8d3d6;})[_0x6cc0('0x1f')](respondWithFilteredResult(_0x6a7416,_0xea789e))['catch'](handleError(_0x6a7416,null));};exports['show']=function(_0x5b50d2,_0x33b081){var _0x4faedd={'raw':!![],'where':{'id':_0x5b50d2['params']['id']}},_0x2766f5={};_0x2766f5['model']=_[_0x6cc0('0x50')](db['FaxMessage'][_0x6cc0('0x38')]);_0x2766f5[_0x6cc0('0x3b')]=_[_0x6cc0('0x50')](_0x5b50d2[_0x6cc0('0x3b')]);_0x2766f5[_0x6cc0('0x3c')]=_['intersection'](_0x2766f5[_0x6cc0('0x3e')],_0x2766f5['query']);_0x4faedd[_0x6cc0('0x3f')]=_[_0x6cc0('0x3d')](_0x2766f5[_0x6cc0('0x3e')],qs[_0x6cc0('0x40')](_0x5b50d2[_0x6cc0('0x3b')]['fields']));_0x4faedd[_0x6cc0('0x3f')]=_0x4faedd[_0x6cc0('0x3f')][_0x6cc0('0x41')]?_0x4faedd[_0x6cc0('0x3f')]:_0x2766f5[_0x6cc0('0x3e')];if(_0x5b50d2['query'][_0x6cc0('0x51')]){_0x4faedd[_0x6cc0('0x4c')]=[{'all':!![]}];}_0x4faedd=_[_0x6cc0('0x48')]({},_0x4faedd,_0x5b50d2['options']);return db['FaxMessage'][_0x6cc0('0x52')](_0x4faedd)[_0x6cc0('0x1f')](handleEntityNotFound(_0x33b081,null))[_0x6cc0('0x1f')](respondWithResult(_0x33b081,null))[_0x6cc0('0x27')](handleError(_0x33b081,null));};exports['update']=function(_0x457570,_0x36d262){if(_0x457570['body']['id']){delete _0x457570['body']['id'];}return db[_0x6cc0('0x4d')][_0x6cc0('0x52')]({'where':{'id':_0x457570[_0x6cc0('0x53')]['id']}})[_0x6cc0('0x1f')](handleEntityNotFound(_0x36d262,null))[_0x6cc0('0x1f')](saveUpdates(_0x457570[_0x6cc0('0x54')],null))[_0x6cc0('0x1f')](respondWithResult(_0x36d262,null))['catch'](handleError(_0x36d262,null));};exports[_0x6cc0('0x55')]=function(_0x3798a9,_0x3e6cab){return db[_0x6cc0('0x4d')][_0x6cc0('0x52')]({'where':{'id':_0x3798a9['params']['id']}})[_0x6cc0('0x1f')](handleEntityNotFound(_0x3e6cab,null))[_0x6cc0('0x1f')](removeEntity(_0x3e6cab,null))['catch'](handleError(_0x3e6cab,null));};exports[_0x6cc0('0x56')]=function(_0x1b576e,_0x466f55){return db[_0x6cc0('0x4d')][_0x6cc0('0x56')]()[_0x6cc0('0x1f')](respondWithResult(_0x466f55,null))['catch'](handleError(_0x466f55,null));};var interaction_log=require('../../config/logger')(_0x6cc0('0x57'));exports[_0x6cc0('0x58')]=function(_0x504d53,_0x57d29f,_0x51fa02){var _0x3817cf={'agent':{},'channel':_0x6cc0('0x59')};if(_0x504d53['body']['id']){delete _0x504d53[_0x6cc0('0x54')]['id'];}_0x504d53[_0x6cc0('0x54')][_0x6cc0('0x5a')]=!![];_0x504d53[_0x6cc0('0x54')]['readAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x504d53[_0x6cc0('0x54')]['UserId']=_0x504d53[_0x6cc0('0x54')][_0x6cc0('0x5b')]||_0x504d53['user']['id'];_0x3817cf[_0x6cc0('0x5c')]['id']=_0x504d53[_0x6cc0('0x54')]['UserId'];return db[_0x6cc0('0x4d')][_0x6cc0('0x52')]({'where':{'id':_0x504d53[_0x6cc0('0x53')]['id'],'UserId':null},'include':[{'model':db[_0x6cc0('0x5d')],'as':_0x6cc0('0x5e')}]})[_0x6cc0('0x1f')](handleEntityNotFound(_0x57d29f,null))[_0x6cc0('0x1f')](saveUpdates(_0x504d53['body'],null))[_0x6cc0('0x1f')](function(_0x1f0072){if(_0x1f0072){_0x3817cf[_0x6cc0('0x25')]=_0x1f0072[_0x6cc0('0x5f')]({'plain':!![]});return db[_0x6cc0('0x60')][_0x6cc0('0x52')]({'where':{'id':_0x1f0072[_0x6cc0('0x61')]}});}return null;})['then'](handleEntityNotFound(_0x57d29f,null))[_0x6cc0('0x1f')](function(_0x2f9e38){if(_0x2f9e38){return _0x2f9e38[_0x6cc0('0x34')]({'UserId':_0x504d53[_0x6cc0('0x54')][_0x6cc0('0x5b')],'read1stAt':_[_0x6cc0('0x62')](_0x2f9e38[_0x6cc0('0x63')])?moment()[_0x6cc0('0x64')](_0x6cc0('0x65')):undefined});}return null;})[_0x6cc0('0x1f')](function(_0x5c404d){if(_0x5c404d){_0x3817cf[_0x6cc0('0x66')]=_0x5c404d[_0x6cc0('0x5f')]({'plain':!![]});interaction_log['info'](_0x6cc0('0x67'),_0x504d53[_0x6cc0('0x68')]['id'],_0x504d53[_0x6cc0('0x68')]['name'],_0x504d53[_0x6cc0('0x68')][_0x6cc0('0x69')],_0x3817cf[_0x6cc0('0x66')]['id'],_0x504d53[_0x6cc0('0x54')]?JSON[_0x6cc0('0x6a')](_0x504d53[_0x6cc0('0x54')]):_0x6cc0('0x6b'));return respondWithRpcPromise('AcceptMessage',_0x6cc0('0x6c'),_0x3817cf);}return null;})['then'](function(_0x55c441){return db['CmContact']['describe']()[_0x6cc0('0x1f')](function(_0x2c3178){var _0x13366a=[];for(var _0xe57907=0x0;_0xe57907=_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 +var _0x531a=['lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','socket.io-emitter','register','end','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','then','destroy','get','FaxQueues','UserProfileResource','sendStatus','stack','name','send','index','FaxQueue','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','merge','map','VIRTUAL','filter','where','includeAll','include','findAll','rows','catch','show','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','findOne','UserFaxQueue','FaxQueueId','User','UserId','agent','faxPause','updatedAt','createdAt','format','%s/%s','pick','getTeams','addTeams','Team','Agents','online','flatMap','sequelize','transaction','forEach','emit','userFaxQueue:save','removeTeams','ids','tq.TeamId','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','toString','every','TeamId','all','compact','value','removeAgents','addAgents','omit','isArray','userFaxQueue:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra'];(function(_0x53a577,_0x297609){var _0x3cda6c=function(_0xbc764a){while(--_0xbc764a){_0x53a577['push'](_0x53a577['shift']());}};_0x3cda6c(++_0x297609);}(_0x531a,0x100));var _0xa531=function(_0x152ffe,_0x7e95d){_0x152ffe=_0x152ffe-0x0;var _0x35324c=_0x531a[_0x152ffe];return _0x35324c;};'use strict';var emlformat=require(_0xa531('0x0'));var rimraf=require(_0xa531('0x1'));var zipdir=require(_0xa531('0x2'));var jsonpatch=require(_0xa531('0x3'));var rp=require(_0xa531('0x4'));var moment=require(_0xa531('0x5'));var BPromise=require(_0xa531('0x6'));var Mustache=require(_0xa531('0x7'));var util=require(_0xa531('0x8'));var path=require(_0xa531('0x9'));var sox=require('sox');var csv=require(_0xa531('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa531('0xb'));var _=require(_0xa531('0xc'));var squel=require(_0xa531('0xd'));var crypto=require(_0xa531('0xe'));var jsforce=require(_0xa531('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xa531('0xa'));var querystring=require(_0xa531('0x10'));var Papa=require('papaparse');var Redis=require(_0xa531('0x11'));var authService=require(_0xa531('0x12'));var qs=require(_0xa531('0x13'));var as=require(_0xa531('0x14'));var hardwareService=require(_0xa531('0x15'));var logger=require('../../config/logger')(_0xa531('0x16'));var utils=require('../../config/utils');var config=require(_0xa531('0x17'));var licenseUtil=require(_0xa531('0x18'));var db=require(_0xa531('0x19'))['db'];config['redis']=_[_0xa531('0x1a')](config[_0xa531('0x1b')],{'host':'localhost','port':0x18eb});var socket=require(_0xa531('0x1c'))(new Redis(config[_0xa531('0x1b')]));require('./faxQueue.socket')[_0xa531('0x1d')](socket);function respondWithStatusCode(_0x319f1f,_0x2e2753){_0x2e2753=_0x2e2753||0xcc;return function(_0x5f3cba){if(_0x5f3cba){return _0x319f1f['sendStatus'](_0x2e2753);}return _0x319f1f['status'](_0x2e2753)[_0xa531('0x1e')]();};}function respondWithResult(_0x1668aa,_0x3c0798){_0x3c0798=_0x3c0798||0xc8;return function(_0x2082b4){if(_0x2082b4){return _0x1668aa[_0xa531('0x1f')](_0x3c0798)[_0xa531('0x20')](_0x2082b4);}};}function respondWithFilteredResult(_0x580761,_0x2d664d){return function(_0x5124a1){if(_0x5124a1){var _0x412b84=typeof _0x2d664d[_0xa531('0x21')]==='undefined'&&typeof _0x2d664d['limit']===_0xa531('0x22');var _0x40848c=_0x5124a1[_0xa531('0x23')];var _0x55a731=_0x412b84?0x0:_0x2d664d[_0xa531('0x21')];var _0x468b75=_0x412b84?_0x5124a1[_0xa531('0x23')]:_0x2d664d['offset']+_0x2d664d[_0xa531('0x24')];var _0x13904e;if(_0x468b75>=_0x40848c){_0x468b75=_0x40848c;_0x13904e=0xc8;}else{_0x13904e=0xce;}_0x580761['status'](_0x13904e);return _0x580761[_0xa531('0x25')](_0xa531('0x26'),_0x55a731+'-'+_0x468b75+'/'+_0x40848c)[_0xa531('0x20')](_0x5124a1);}return null;};}function patchUpdates(_0x18d0ef){return function(_0x240989){try{jsonpatch[_0xa531('0x27')](_0x240989,_0x18d0ef,!![]);}catch(_0x3270a6){return BPromise[_0xa531('0x28')](_0x3270a6);}return _0x240989[_0xa531('0x29')]();};}function saveUpdates(_0x39f640,_0x8e9ab3){return function(_0x3ac4eb){if(_0x3ac4eb){return _0x3ac4eb['update'](_0x39f640)[_0xa531('0x2a')](function(_0x1d0217){return _0x1d0217;});}return null;};}function removeEntity(_0x1d32ed,_0x487a8c){return function(_0x7fb52d){if(_0x7fb52d){return _0x7fb52d[_0xa531('0x2b')]()['then'](function(){var _0x4b9889=_0x7fb52d[_0xa531('0x2c')]({'plain':!![]});var _0x56b96d=_0xa531('0x2d');return db[_0xa531('0x2e')]['destroy']({'where':{'type':_0x56b96d,'resourceId':_0x4b9889['id']}})[_0xa531('0x2a')](function(){return _0x7fb52d;});})['then'](function(){_0x1d32ed[_0xa531('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x56307d,_0x5e480a){return function(_0x27bd5c){if(!_0x27bd5c){_0x56307d[_0xa531('0x2f')](0x194);}return _0x27bd5c;};}function handleError(_0x4e159a,_0x4cf27b){_0x4cf27b=_0x4cf27b||0x1f4;return function(_0x380cec){logger['error'](_0x380cec[_0xa531('0x30')]);if(_0x380cec[_0xa531('0x31')]){delete _0x380cec['name'];}_0x4e159a[_0xa531('0x1f')](_0x4cf27b)[_0xa531('0x32')](_0x380cec);};}exports[_0xa531('0x33')]=function(_0x492832,_0x362691){var _0x3c3376={},_0x4b8104={},_0x2fc577={'count':0x0,'rows':[]};var _0x13c270=_['map'](db[_0xa531('0x34')][_0xa531('0x35')],function(_0x23aa04){return{'name':_0x23aa04[_0xa531('0x36')],'type':_0x23aa04[_0xa531('0x37')][_0xa531('0x38')]};});_0x4b8104[_0xa531('0x39')]=_['map'](_0x13c270,'name');_0x4b8104[_0xa531('0x3a')]=_[_0xa531('0x3b')](_0x492832[_0xa531('0x3a')]);_0x4b8104[_0xa531('0x3c')]=_[_0xa531('0x3d')](_0x4b8104['model'],_0x4b8104[_0xa531('0x3a')]);_0x3c3376[_0xa531('0x3e')]=_[_0xa531('0x3d')](_0x4b8104[_0xa531('0x39')],qs[_0xa531('0x3f')](_0x492832[_0xa531('0x3a')][_0xa531('0x3f')]));_0x3c3376[_0xa531('0x3e')]=_0x3c3376[_0xa531('0x3e')][_0xa531('0x40')]?_0x3c3376[_0xa531('0x3e')]:_0x4b8104['model'];if(!_0x492832[_0xa531('0x3a')][_0xa531('0x41')](_0xa531('0x42'))){_0x3c3376[_0xa531('0x24')]=qs[_0xa531('0x24')](_0x492832['query'][_0xa531('0x24')]);_0x3c3376[_0xa531('0x21')]=qs[_0xa531('0x21')](_0x492832[_0xa531('0x3a')]['offset']);}_0x3c3376[_0xa531('0x43')]=qs[_0xa531('0x44')](_0x492832[_0xa531('0x3a')]['sort']);_0x3c3376['where']=qs[_0xa531('0x3c')](_['pick'](_0x492832[_0xa531('0x3a')],_0x4b8104[_0xa531('0x3c')]),_0x13c270);if(_0x492832[_0xa531('0x3a')]['filter']){_0x3c3376['where']=_[_0xa531('0x45')](_0x3c3376['where'],{'$or':_[_0xa531('0x46')](_0x13c270,function(_0x37c1ed){if(_0x37c1ed[_0xa531('0x37')]!==_0xa531('0x47')){var _0x199259={};_0x199259[_0x37c1ed[_0xa531('0x31')]]={'$like':'%'+_0x492832[_0xa531('0x3a')][_0xa531('0x48')]+'%'};return _0x199259;}})});}_0x3c3376=_[_0xa531('0x45')]({},_0x3c3376,_0x492832['options']);var _0x49d85a={'where':_0x3c3376[_0xa531('0x49')]};return db['FaxQueue'][_0xa531('0x23')](_0x49d85a)[_0xa531('0x2a')](function(_0x12d2e0){_0x2fc577['count']=_0x12d2e0;if(_0x492832[_0xa531('0x3a')][_0xa531('0x4a')]){_0x3c3376[_0xa531('0x4b')]=[{'all':!![]}];}return db[_0xa531('0x34')][_0xa531('0x4c')](_0x3c3376);})[_0xa531('0x2a')](function(_0x28eff1){_0x2fc577[_0xa531('0x4d')]=_0x28eff1;return _0x2fc577;})[_0xa531('0x2a')](respondWithFilteredResult(_0x362691,_0x3c3376))[_0xa531('0x4e')](handleError(_0x362691,null));};exports[_0xa531('0x4f')]=function(_0x16fa72,_0xca5780){var _0x4f2acd={'raw':!![],'where':{'id':_0x16fa72['params']['id']}},_0x48fe3f={};_0x48fe3f[_0xa531('0x39')]=_[_0xa531('0x3b')](db[_0xa531('0x34')][_0xa531('0x35')]);_0x48fe3f['query']=_['keys'](_0x16fa72['query']);_0x48fe3f[_0xa531('0x3c')]=_[_0xa531('0x3d')](_0x48fe3f[_0xa531('0x39')],_0x48fe3f['query']);_0x4f2acd[_0xa531('0x3e')]=_[_0xa531('0x3d')](_0x48fe3f[_0xa531('0x39')],qs[_0xa531('0x3f')](_0x16fa72['query'][_0xa531('0x3f')]));_0x4f2acd['attributes']=_0x4f2acd[_0xa531('0x3e')][_0xa531('0x40')]?_0x4f2acd[_0xa531('0x3e')]:_0x48fe3f[_0xa531('0x39')];if(_0x16fa72[_0xa531('0x3a')]['includeAll']){_0x4f2acd[_0xa531('0x4b')]=[{'all':!![]}];}_0x4f2acd=_[_0xa531('0x45')]({},_0x4f2acd,_0x16fa72[_0xa531('0x50')]);return db[_0xa531('0x34')][_0xa531('0x51')](_0x4f2acd)['then'](handleEntityNotFound(_0xca5780,null))[_0xa531('0x2a')](respondWithResult(_0xca5780,null))[_0xa531('0x4e')](handleError(_0xca5780,null));};exports['create']=function(_0x19ba40,_0x4abca4){return db[_0xa531('0x34')][_0xa531('0x52')](_0x19ba40[_0xa531('0x53')],{})['then'](function(_0x342c47){var _0x496291=_0x19ba40[_0xa531('0x54')][_0xa531('0x2c')]({'plain':!![]});if(!_0x496291)throw new Error(_0xa531('0x55'));if(_0x496291['role']==='user'){var _0x5b97a9=_0x342c47[_0xa531('0x2c')]({'plain':!![]});var _0x207e41=_0xa531('0x2d');return db['UserProfileSection'][_0xa531('0x51')]({'where':{'name':_0x207e41,'userProfileId':_0x496291[_0xa531('0x56')]},'raw':!![]})[_0xa531('0x2a')](function(_0x3c97e4){if(_0x3c97e4&&_0x3c97e4[_0xa531('0x57')]===0x0){return db[_0xa531('0x2e')]['create']({'name':_0x5b97a9[_0xa531('0x31')],'resourceId':_0x5b97a9['id'],'type':_0x3c97e4['name'],'sectionId':_0x3c97e4['id']},{})[_0xa531('0x2a')](function(){return _0x342c47;});}else{return _0x342c47;}})[_0xa531('0x4e')](function(_0x8eeecf){logger[_0xa531('0x58')](_0xa531('0x59'),_0x8eeecf);throw _0x8eeecf;});}return _0x342c47;})['then'](respondWithResult(_0x4abca4,0xc9))[_0xa531('0x4e')](handleError(_0x4abca4,null));};exports[_0xa531('0x5a')]=function(_0x3e44b2,_0x4e1a72){if(_0x3e44b2[_0xa531('0x53')]['id']){delete _0x3e44b2['body']['id'];}return db[_0xa531('0x34')]['find']({'where':{'id':_0x3e44b2['params']['id']}})['then'](handleEntityNotFound(_0x4e1a72,null))['then'](saveUpdates(_0x3e44b2['body'],null))[_0xa531('0x2a')](respondWithResult(_0x4e1a72,null))[_0xa531('0x4e')](handleError(_0x4e1a72,null));};exports[_0xa531('0x2b')]=function(_0x387f93,_0x53b5eb){return db[_0xa531('0x34')][_0xa531('0x51')]({'where':{'id':_0x387f93[_0xa531('0x5b')]['id']}})['then'](handleEntityNotFound(_0x53b5eb,null))[_0xa531('0x2a')](removeEntity(_0x53b5eb,null))['catch'](handleError(_0x53b5eb,null));};exports[_0xa531('0x5c')]=function(_0x16edc5,_0xb30d0c){return db['FaxQueue'][_0xa531('0x5c')]()[_0xa531('0x2a')](respondWithResult(_0xb30d0c,null))[_0xa531('0x4e')](handleError(_0xb30d0c,null));};exports['getMembers']=function(_0x1e6188,_0x2110c2,_0x4aee6c){var _0x4f10ad={'raw':!![],'where':{}},_0x40a286={},_0x5c11a9;return db[_0xa531('0x34')][_0xa531('0x5d')]({'where':{'id':_0x1e6188[_0xa531('0x5b')]['id']}})[_0xa531('0x2a')](handleEntityNotFound(_0x2110c2,null))[_0xa531('0x2a')](function(_0x2906a8){if(_0x2906a8){_0x5c11a9=_0x2906a8['get']({'plain':!![]});_0x40a286['model']=_[_0xa531('0x3b')](db[_0xa531('0x5e')]['rawAttributes']);_0x40a286[_0xa531('0x3a')]=_[_0xa531('0x3b')](_0x1e6188[_0xa531('0x3a')]);_0x40a286[_0xa531('0x3c')]=_[_0xa531('0x3d')](_0x40a286[_0xa531('0x39')],_0x40a286['query']);_0x4f10ad[_0xa531('0x3e')]=_[_0xa531('0x3d')](_0x40a286[_0xa531('0x39')],qs[_0xa531('0x3f')](_0x1e6188[_0xa531('0x3a')]['fields']));_0x4f10ad['attributes']=_0x4f10ad[_0xa531('0x3e')][_0xa531('0x40')]?_0x4f10ad[_0xa531('0x3e')]:_0x40a286[_0xa531('0x39')];if(!_0x1e6188[_0xa531('0x3a')][_0xa531('0x41')](_0xa531('0x42'))){_0x4f10ad[_0xa531('0x24')]=qs[_0xa531('0x24')](_0x1e6188[_0xa531('0x3a')][_0xa531('0x24')]);_0x4f10ad[_0xa531('0x21')]=qs['offset'](_0x1e6188['query'][_0xa531('0x21')]);}_0x4f10ad[_0xa531('0x43')]=qs['sort'](_0x1e6188[_0xa531('0x3a')][_0xa531('0x44')]);_0x4f10ad[_0xa531('0x49')]=qs[_0xa531('0x3c')](_['pick'](_0x1e6188['query'],_0x40a286[_0xa531('0x3c')]));_0x4f10ad['where'][_0xa531('0x5f')]=_0x2906a8['id'];if(_0x1e6188[_0xa531('0x3a')][_0xa531('0x48')]){_0x4f10ad[_0xa531('0x49')]=_[_0xa531('0x45')](_0x4f10ad[_0xa531('0x49')],{'$or':_[_0xa531('0x46')](_0x4f10ad[_0xa531('0x3e')],function(_0x345be8){var _0x57d0c0={};_0x57d0c0[_0x345be8]={'$like':'%'+_0x1e6188[_0xa531('0x3a')]['filter']+'%'};return _0x57d0c0;})});}_0x4f10ad=_[_0xa531('0x45')]({},_0x4f10ad,_0x1e6188[_0xa531('0x50')]);return db[_0xa531('0x5e')][_0xa531('0x4c')](_0x4f10ad);}})[_0xa531('0x2a')](function(_0x23985e){if(_0x23985e){return db[_0xa531('0x60')]['findAndCountAll']({'where':{'id':_[_0xa531('0x46')](_0x23985e,_0xa531('0x61')),'role':_0xa531('0x62')},'attributes':['id',_0xa531('0x31'),_0xa531('0x63'),_0xa531('0x64'),_0xa531('0x65')]});}})[_0xa531('0x2a')](function(_0xc81e24){if(_0xc81e24){return{'count':_0xc81e24[_0xa531('0x23')],'rows':_[_0xa531('0x46')](_0xc81e24['rows'],function(_0x273274){return{'membername':_0x273274[_0xa531('0x31')],'UserId':_0x273274['id'],'queue_name':_0x5c11a9['name'],'FaxQueueId':_0x5c11a9['id'],'interface':util[_0xa531('0x66')](_0xa531('0x67'),'SIP',_0x273274[_0xa531('0x31')]),'penalty':0x0,'paused':_0x273274['faxPause'],'createdAt':_0x273274[_0xa531('0x65')],'updatedAt':_0x273274[_0xa531('0x64')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xa531('0x2a')](respondWithFilteredResult(_0x2110c2,_0x4f10ad))['catch'](handleError(_0x2110c2,null));};exports['getTeams']=function(_0x21ca85,_0x488626,_0x9654b7){var _0x3b854d={};var _0x44e590={};var _0x141c26;var _0x520b3f;return db['FaxQueue']['findOne']({'where':{'id':_0x21ca85[_0xa531('0x5b')]['id']}})[_0xa531('0x2a')](handleEntityNotFound(_0x488626,null))[_0xa531('0x2a')](function(_0x571e6c){if(_0x571e6c){_0x141c26=_0x571e6c;_0x44e590['model']=_['keys'](db['Team']['rawAttributes']);_0x44e590[_0xa531('0x3a')]=_[_0xa531('0x3b')](_0x21ca85[_0xa531('0x3a')]);_0x44e590[_0xa531('0x3c')]=_['intersection'](_0x44e590[_0xa531('0x39')],_0x44e590[_0xa531('0x3a')]);_0x3b854d[_0xa531('0x3e')]=_[_0xa531('0x3d')](_0x44e590[_0xa531('0x39')],qs['fields'](_0x21ca85[_0xa531('0x3a')][_0xa531('0x3f')]));_0x3b854d[_0xa531('0x3e')]=_0x3b854d[_0xa531('0x3e')][_0xa531('0x40')]?_0x3b854d[_0xa531('0x3e')]:_0x44e590[_0xa531('0x39')];_0x3b854d['order']=qs['sort'](_0x21ca85[_0xa531('0x3a')][_0xa531('0x44')]);_0x3b854d[_0xa531('0x49')]=qs[_0xa531('0x3c')](_[_0xa531('0x68')](_0x21ca85[_0xa531('0x3a')],_0x44e590[_0xa531('0x3c')]));if(_0x21ca85[_0xa531('0x3a')][_0xa531('0x48')]){_0x3b854d[_0xa531('0x49')]=_[_0xa531('0x45')](_0x3b854d[_0xa531('0x49')],{'$or':_[_0xa531('0x46')](_0x3b854d['attributes'],function(_0x1b99b6){var _0x3f5387={};_0x3f5387[_0x1b99b6]={'$like':'%'+_0x21ca85[_0xa531('0x3a')]['filter']+'%'};return _0x3f5387;})});}_0x3b854d=_[_0xa531('0x45')]({},_0x3b854d,_0x21ca85[_0xa531('0x50')]);return _0x141c26[_0xa531('0x69')](_0x3b854d);}})[_0xa531('0x2a')](function(_0x41868b){if(_0x41868b){_0x520b3f=_0x41868b['length'];if(!_0x21ca85[_0xa531('0x3a')]['hasOwnProperty'](_0xa531('0x42'))){_0x3b854d[_0xa531('0x24')]=qs[_0xa531('0x24')](_0x21ca85['query']['limit']);_0x3b854d[_0xa531('0x21')]=qs['offset'](_0x21ca85['query'][_0xa531('0x21')]);}return _0x141c26['getTeams'](_0x3b854d);}})[_0xa531('0x2a')](function(_0x1b45ab){if(_0x1b45ab){return _0x1b45ab?{'count':_0x520b3f,'rows':_0x1b45ab}:null;}})[_0xa531('0x2a')](respondWithResult(_0x488626,null))[_0xa531('0x4e')](handleError(_0x488626,null));};exports[_0xa531('0x6a')]=function(_0x388022,_0x2a93b1,_0x40d309){var _0x34f691=_0x388022[_0xa531('0x53')]['ids'];return db[_0xa531('0x6b')][_0xa531('0x4c')]({'where':{'id':_0x34f691},'attributes':['id'],'include':[{'model':db[_0xa531('0x60')],'as':_0xa531('0x6c'),'attributes':['id',_0xa531('0x31'),_0xa531('0x6d'),'voicePause','interface'],'raw':!![]}]})[_0xa531('0x2a')](function(_0x434656){if(_0x434656){var _0xbfdc02=_[_0xa531('0x6e')](_0x434656,function(_0x265a11){var _0xc0ca65=_0x265a11[_0xa531('0x2c')]({'plain':!![]});return _0xc0ca65[_0xa531('0x6c')];});return db[_0xa531('0x34')][_0xa531('0x51')]({'where':{'id':_0x388022[_0xa531('0x5b')]['id']}})[_0xa531('0x2a')](function(_0x21f985){return db[_0xa531('0x6f')][_0xa531('0x70')](function(_0x2a5052){return _0x21f985[_0xa531('0x6a')](_0x34f691,{'transaction':_0x2a5052})[_0xa531('0x2a')](function(){return BPromise['each'](_0xbfdc02,function(_0x371886){return db[_0xa531('0x5e')]['findOrCreate']({'where':{'UserId':_0x371886['id'],'FaxQueueId':_0x388022[_0xa531('0x5b')]['id']},'transaction':_0x2a5052});});})['then'](function(){_0xbfdc02[_0xa531('0x71')](function(_0x5e0846){socket[_0xa531('0x72')](_0xa531('0x73'),{'UserId':_0x5e0846['id'],'FaxQueueId':_0x21f985['id']});});});});});}})[_0xa531('0x2a')](respondWithStatusCode(_0x2a93b1,null))['catch'](handleError(_0x2a93b1,null));};exports[_0xa531('0x74')]=function(_0x2726b9,_0x282650,_0x3b3354){return db['Team'][_0xa531('0x4c')]({'where':{'id':_0x2726b9[_0xa531('0x3a')][_0xa531('0x75')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0xa531('0x6c'),'attributes':['id'],'raw':!![]}]})[_0xa531('0x2a')](handleEntityNotFound(_0x282650,null))[_0xa531('0x2a')](function(_0x219da9){var _0x5951c4=_[_0xa531('0x46')](_0x219da9,'id');var _0x196794=[];var _0x23f38e=[];var _0x1896df=squel['select']();_0x1896df['field'](_0xa531('0x76'))['from']('team_has_fax_queues','tq')['join'](_0xa531('0x77'),'ut',_0xa531('0x78'))['where']('FaxQueueId\x20=\x20?',_0x2726b9[_0xa531('0x5b')]['id']);for(var _0x522100=0x0;_0x522100<_0x219da9[_0xa531('0x40')];_0x522100+=0x1){let _0x541039=_0x219da9[_0x522100];for(var _0xb24ec5=0x0;_0xb24ec5<_0x541039[_0xa531('0x6c')][_0xa531('0x40')];_0xb24ec5+=0x1){let _0x5d20fd=_0x541039[_0xa531('0x6c')][_0xb24ec5];var _0xcea188=_0x1896df[_0xa531('0x79')]();_0xcea188[_0xa531('0x49')]('ut.UserId\x20=\x20?',_0x5d20fd['id']);_0x23f38e['push'](db[_0xa531('0x6f')][_0xa531('0x3a')](_0xcea188[_0xa531('0x7a')](),{'type':db[_0xa531('0x6f')]['QueryTypes']['SELECT']})['then'](function(_0x34dbe9){if(_0x34dbe9[_0xa531('0x40')]===0x1){return _0x5d20fd['id'];}else{var _0x538eeb=_[_0xa531('0x7b')](_['map'](_0x34dbe9,_0xa531('0x7c')),function(_0x21f881){return _['includes'](_0x5951c4,_0x21f881);});if(_0x538eeb){return _0x5d20fd['id'];}}}));}}return BPromise[_0xa531('0x7d')](_0x23f38e)[_0xa531('0x2a')](function(_0x1b42bb){_0x196794=_(_0x196794)['union'](_0x1b42bb)[_0xa531('0x7e')]()[_0xa531('0x7f')]();return db[_0xa531('0x34')]['find']({'where':{'id':_0x2726b9[_0xa531('0x5b')]['id']}})[_0xa531('0x2a')](function(_0x560264){return db[_0xa531('0x6f')][_0xa531('0x70')](function(_0x1f2a9f){return _0x560264[_0xa531('0x74')](_0x2726b9[_0xa531('0x3a')][_0xa531('0x75')],{'transaction':_0x1f2a9f})['then'](function(){if(!_['isEmpty'](_0x196794)){return _0x560264[_0xa531('0x80')](_0x196794,{'transaction':_0x1f2a9f});}})['then'](function(){_0x196794[_0xa531('0x71')](function(_0x818e92){socket['emit']('userFaxQueue:remove',{'UserId':_0x818e92,'FaxQueueId':_0x560264['id']});});});});});});})[_0xa531('0x2a')](respondWithStatusCode(_0x282650,null))[_0xa531('0x4e')](handleError(_0x282650,null));};exports[_0xa531('0x81')]=function(_0x4a8393,_0x2cb596,_0x4faf1e){return db[_0xa531('0x34')][_0xa531('0x51')]({'where':{'id':_0x4a8393['params']['id']}})[_0xa531('0x2a')](handleEntityNotFound(_0x2cb596,null))['then'](function(_0x4da17d){if(_0x4da17d){return _0x4da17d[_0xa531('0x81')](_0x4a8393['body']['ids'],_[_0xa531('0x82')](_0x4a8393[_0xa531('0x53')],['ids','id'])||{})['spread'](function(_0x43ccbb){for(var _0x5784b0=0x0;_0x5784b0<_0x4a8393[_0xa531('0x53')][_0xa531('0x75')][_0xa531('0x40')];_0x5784b0+=0x1){socket[_0xa531('0x72')](_0xa531('0x73'),{'UserId':_0x4a8393[_0xa531('0x53')][_0xa531('0x75')][_0x5784b0],'FaxQueueId':_0x4a8393[_0xa531('0x5b')]['id']});}return _0x43ccbb;});}})[_0xa531('0x2a')](respondWithResult(_0x2cb596,null))[_0xa531('0x4e')](handleError(_0x2cb596,null));};exports[_0xa531('0x80')]=function(_0x50f01e,_0x336587,_0x2da724){return db[_0xa531('0x34')][_0xa531('0x51')]({'where':{'id':_0x50f01e[_0xa531('0x5b')]['id']}})[_0xa531('0x2a')](handleEntityNotFound(_0x336587,null))[_0xa531('0x2a')](function(_0x44361d){if(_0x44361d){return _0x44361d[_0xa531('0x80')](_0x50f01e[_0xa531('0x3a')][_0xa531('0x75')])[_0xa531('0x2a')](function(){if(_[_0xa531('0x83')](_0x50f01e[_0xa531('0x3a')]['ids'])){for(var _0x12f22a=0x0;_0x12f22a<_0x50f01e[_0xa531('0x3a')][_0xa531('0x75')]['length'];_0x12f22a+=0x1){socket[_0xa531('0x72')](_0xa531('0x84'),{'UserId':Number(_0x50f01e[_0xa531('0x3a')]['ids'][_0x12f22a]),'FaxQueueId':Number(_0x50f01e[_0xa531('0x5b')]['id'])});}}else{socket[_0xa531('0x72')](_0xa531('0x84'),{'UserId':Number(_0x50f01e[_0xa531('0x3a')][_0xa531('0x75')]),'FaxQueueId':Number(_0x50f01e['params']['id'])});}});}})['then'](respondWithStatusCode(_0x336587,null))[_0xa531('0x4e')](handleError(_0x336587,null));};exports[_0xa531('0x85')]=function(_0xd1d9b8,_0x11d57f,_0x58d621){var _0x1500d0={};var _0x45f73b={};var _0x1b54f0;var _0x574012;return db[_0xa531('0x34')]['findOne']({'where':{'id':_0xd1d9b8['params']['id']}})['then'](handleEntityNotFound(_0x11d57f,null))['then'](function(_0x532548){if(_0x532548){_0x1b54f0=_0x532548;_0x45f73b['model']=_[_0xa531('0x3b')](db['User'][_0xa531('0x35')]);_0x45f73b[_0xa531('0x3a')]=_[_0xa531('0x3b')](_0xd1d9b8[_0xa531('0x3a')]);_0x45f73b['filters']=_[_0xa531('0x3d')](_0x45f73b[_0xa531('0x39')],_0x45f73b['query']);_0x1500d0['attributes']=_[_0xa531('0x3d')](_0x45f73b['model'],qs[_0xa531('0x3f')](_0xd1d9b8[_0xa531('0x3a')][_0xa531('0x3f')]));_0x1500d0[_0xa531('0x3e')]=_0x1500d0[_0xa531('0x3e')][_0xa531('0x40')]?_0x1500d0[_0xa531('0x3e')]:_0x45f73b[_0xa531('0x39')];_0x1500d0['order']=qs[_0xa531('0x44')](_0xd1d9b8[_0xa531('0x3a')][_0xa531('0x44')]);_0x1500d0[_0xa531('0x49')]=qs[_0xa531('0x3c')](_[_0xa531('0x68')](_0xd1d9b8[_0xa531('0x3a')],_0x45f73b[_0xa531('0x3c')]));if(_0xd1d9b8[_0xa531('0x3a')]['filter']){_0x1500d0['where']=_[_0xa531('0x45')](_0x1500d0[_0xa531('0x49')],{'$or':_[_0xa531('0x46')](_0x1500d0[_0xa531('0x3e')],function(_0x4a4d31){var _0x2947e9={};_0x2947e9[_0x4a4d31]={'$like':'%'+_0xd1d9b8[_0xa531('0x3a')][_0xa531('0x48')]+'%'};return _0x2947e9;})});}_0x1500d0=_[_0xa531('0x45')]({},_0x1500d0,_0xd1d9b8[_0xa531('0x50')]);return _0x1b54f0[_0xa531('0x85')](_0x1500d0);}})[_0xa531('0x2a')](function(_0x152b92){if(_0x152b92){_0x574012=_0x152b92['length'];if(!_0xd1d9b8[_0xa531('0x3a')]['hasOwnProperty']('nolimit')){_0x1500d0[_0xa531('0x24')]=qs[_0xa531('0x24')](_0xd1d9b8[_0xa531('0x3a')]['limit']);_0x1500d0[_0xa531('0x21')]=qs[_0xa531('0x21')](_0xd1d9b8[_0xa531('0x3a')][_0xa531('0x21')]);}return _0x1b54f0['getAgents'](_0x1500d0);}})[_0xa531('0x2a')](function(_0x5d0c5b){if(_0x5d0c5b){return _0x5d0c5b?{'count':_0x574012,'rows':_0x5d0c5b}:null;}})[_0xa531('0x2a')](respondWithResult(_0x11d57f,null))[_0xa531('0x4e')](handleError(_0x11d57f,null));}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.events.js b/server/api/faxQueue/faxQueue.events.js index 7d19840..f91496c 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 _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 +var _0x4d9b=['emit','hasOwnProperty','exports','events','../../mysqldb','FaxQueue','setMaxListeners','remove'];(function(_0x55be63,_0x3a7286){var _0x1e0312=function(_0xb46ee7){while(--_0xb46ee7){_0x55be63['push'](_0x55be63['shift']());}};_0x1e0312(++_0x3a7286);}(_0x4d9b,0x1bb));var _0xb4d9=function(_0xa92146,_0x57b211){_0xa92146=_0xa92146-0x0;var _0x4687b9=_0x4d9b[_0xa92146];return _0x4687b9;};'use strict';var EventEmitter=require(_0xb4d9('0x0'));var FaxQueue=require(_0xb4d9('0x1'))['db'][_0xb4d9('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xb4d9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xb4d9('0x4')};function emitEvent(_0x1fd9de){return function(_0x2e90db,_0x522466,_0x3c32e4){FaxQueueEvents[_0xb4d9('0x5')](_0x1fd9de+':'+_0x2e90db['id'],_0x2e90db);FaxQueueEvents[_0xb4d9('0x5')](_0x1fd9de,_0x2e90db);_0x3c32e4(null);};}for(var e in events){if(events[_0xb4d9('0x6')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xb4d9('0x7')]=FaxQueueEvents; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.model.js b/server/api/faxQueue/faxQueue.model.js index 70107d4..43d5705 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 _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 +var _0x4764=['FaxQueue','fax_queues','util','moment','path','../../config/environment','./faxQueue.attributes','exports'];(function(_0x2ba665,_0x30361e){var _0xc5e4f5=function(_0x416a73){while(--_0x416a73){_0x2ba665['push'](_0x2ba665['shift']());}};_0xc5e4f5(++_0x30361e);}(_0x4764,0xf2));var _0x4476=function(_0x32c5ef,_0xf396a7){_0x32c5ef=_0x32c5ef-0x0;var _0x256703=_0x4764[_0x32c5ef];return _0x256703;};'use strict';var _=require('lodash');var util=require(_0x4476('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x4476('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4476('0x2'));var rimraf=require('rimraf');var config=require(_0x4476('0x3'));var attributes=require(_0x4476('0x4'));module[_0x4476('0x5')]=function(_0x1892fb,_0x2e9e38){return _0x1892fb['define'](_0x4476('0x6'),attributes,{'tableName':_0x4476('0x7'),'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 1b48a7c..8e2bc0a 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 _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 +var _0xe20e=['map','include','model','attributes','ShowFaxQueue','find','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./faxQueue.socket','request','then','info','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','code','FaxQueue,\x20%s,\x20%s','error','message','result','catch','GetFaxQueue','FaxQueue','findAll','options','raw'];(function(_0x2e726e,_0x3faf87){var _0x273748=function(_0x3d9fbb){while(--_0x3d9fbb){_0x2e726e['push'](_0x2e726e['shift']());}};_0x273748(++_0x3faf87);}(_0xe20e,0x136));var _0xee20=function(_0x7ce8a5,_0xa18e08){_0x7ce8a5=_0x7ce8a5-0x0;var _0x42d2f5=_0xe20e[_0x7ce8a5];return _0x42d2f5;};'use strict';var _=require(_0xee20('0x0'));var util=require('util');var moment=require(_0xee20('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xee20('0x2'));var db=require(_0xee20('0x3'))['db'];var utils=require(_0xee20('0x4'));var logger=require(_0xee20('0x5'))(_0xee20('0x6'));var config=require(_0xee20('0x7'));var jayson=require(_0xee20('0x8'));var client=jayson['client'][_0xee20('0x9')]({'port':0x232a});config[_0xee20('0xa')]=_[_0xee20('0xb')](config[_0xee20('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xee20('0xc'))(new Redis(config['redis']));require(_0xee20('0xd'))['register'](socket);function respondWithRpcPromise(_0x75257,_0x7c1347,_0x199ff0){return new BPromise(function(_0x48d7cb,_0x4bdedd){return client[_0xee20('0xe')](_0x75257,_0x199ff0)[_0xee20('0xf')](function(_0x54c772){logger[_0xee20('0x10')]('FaxQueue,\x20%s,\x20%s',_0x7c1347,_0xee20('0x11'));logger[_0xee20('0x12')](_0xee20('0x13'),_0x7c1347,_0xee20('0x11'),JSON[_0xee20('0x14')](_0x54c772));if(_0x54c772['error']){if(_0x54c772['error'][_0xee20('0x15')]===0x1f4){logger['error'](_0xee20('0x16'),_0x7c1347,_0x54c772[_0xee20('0x17')]['message']);return _0x4bdedd(_0x54c772['error'][_0xee20('0x18')]);}logger[_0xee20('0x17')](_0xee20('0x16'),_0x7c1347,_0x54c772['error']['message']);return _0x48d7cb(_0x54c772[_0xee20('0x17')]['message']);}else{logger[_0xee20('0x10')](_0xee20('0x16'),_0x7c1347,'request\x20sent');_0x48d7cb(_0x54c772[_0xee20('0x19')][_0xee20('0x18')]);}})[_0xee20('0x1a')](function(_0x437e41){logger[_0xee20('0x17')](_0xee20('0x16'),_0x7c1347,_0x437e41);_0x4bdedd(_0x437e41);});});}exports[_0xee20('0x1b')]=function(_0x4f9636){var _0x2db11f=this;return new Promise(function(_0x308573,_0x3dfb6a){return db[_0xee20('0x1c')][_0xee20('0x1d')]({'raw':_0x4f9636[_0xee20('0x1e')]?_0x4f9636[_0xee20('0x1e')][_0xee20('0x1f')]===undefined?!![]:![]:!![],'where':_0x4f9636[_0xee20('0x1e')]?_0x4f9636['options']['where']||null:null,'attributes':_0x4f9636[_0xee20('0x1e')]?_0x4f9636[_0xee20('0x1e')]['attributes']||null:null,'limit':_0x4f9636['options']?_0x4f9636[_0xee20('0x1e')]['limit']||null:null,'include':_0x4f9636[_0xee20('0x1e')]?_0x4f9636[_0xee20('0x1e')]['include']?_[_0xee20('0x20')](_0x4f9636[_0xee20('0x1e')][_0xee20('0x21')],function(_0x384b59){return{'model':db[_0x384b59[_0xee20('0x22')]],'as':_0x384b59['as'],'attributes':_0x384b59['attributes'],'include':_0x384b59['include']?_[_0xee20('0x20')](_0x384b59['include'],function(_0x3bbe33){return{'model':db[_0x3bbe33['model']],'as':_0x3bbe33['as'],'attributes':_0x3bbe33[_0xee20('0x23')],'include':_0x3bbe33['include']?_[_0xee20('0x20')](_0x3bbe33[_0xee20('0x21')],function(_0x4220e0){return{'model':db[_0x4220e0[_0xee20('0x22')]],'as':_0x4220e0['as'],'attributes':_0x4220e0[_0xee20('0x23')]};}):[]};}):[]};}):[]:[]})[_0xee20('0xf')](function(_0x35edd4){logger['info'](_0xee20('0x1b'),_0x4f9636);logger['debug'](_0xee20('0x1b'),_0x4f9636,JSON[_0xee20('0x14')](_0x35edd4));_0x308573(_0x35edd4);})['catch'](function(_0x5f294b){logger[_0xee20('0x17')](_0xee20('0x1b'),_0x5f294b['message'],_0x4f9636);_0x3dfb6a(_0x2db11f[_0xee20('0x17')](0x1f4,_0x5f294b[_0xee20('0x18')]));});});};exports[_0xee20('0x24')]=function(_0x20d9c4){var _0x60d582=this;return new Promise(function(_0xbcc51c,_0x2e1e6f){return db['FaxQueue'][_0xee20('0x25')]({'raw':_0x20d9c4['options']?_0x20d9c4[_0xee20('0x1e')][_0xee20('0x1f')]===undefined?!![]:![]:!![],'where':_0x20d9c4[_0xee20('0x1e')]?_0x20d9c4[_0xee20('0x1e')]['where']||null:null,'attributes':_0x20d9c4[_0xee20('0x1e')]?_0x20d9c4[_0xee20('0x1e')][_0xee20('0x23')]||null:null,'include':_0x20d9c4['options']?_0x20d9c4[_0xee20('0x1e')][_0xee20('0x21')]?_[_0xee20('0x20')](_0x20d9c4['options'][_0xee20('0x21')],function(_0x415d48){return{'model':db[_0x415d48[_0xee20('0x22')]],'as':_0x415d48['as'],'attributes':_0x415d48[_0xee20('0x23')],'include':_0x415d48[_0xee20('0x21')]?_[_0xee20('0x20')](_0x415d48[_0xee20('0x21')],function(_0x457478){return{'model':db[_0x457478[_0xee20('0x22')]],'as':_0x457478['as'],'attributes':_0x457478[_0xee20('0x23')],'include':_0x457478[_0xee20('0x21')]?_[_0xee20('0x20')](_0x457478[_0xee20('0x21')],function(_0x32f54c){return{'model':db[_0x32f54c[_0xee20('0x22')]],'as':_0x32f54c['as'],'attributes':_0x32f54c[_0xee20('0x23')]};}):[]};}):[]};}):[]:[]})[_0xee20('0xf')](function(_0xdd5dfd){logger[_0xee20('0x10')](_0xee20('0x24'),_0x20d9c4);logger[_0xee20('0x12')](_0xee20('0x24'),_0x20d9c4,JSON[_0xee20('0x14')](_0xdd5dfd));_0xbcc51c(_0xdd5dfd);})['catch'](function(_0x346b93){logger[_0xee20('0x17')](_0xee20('0x24'),_0x346b93[_0xee20('0x18')],_0x20d9c4);_0x2e1e6f(_0x60d582[_0xee20('0x17')](0x1f4,_0x346b93[_0xee20('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.socket.js b/server/api/faxQueue/faxQueue.socket.js index 9564515..0e1f1e9 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 _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 +var _0xdaa7=['emit','removeListener','register','length','faxQueue:','./faxQueue.events','save','remove','update'];(function(_0x3c79d1,_0x1e55d4){var _0x1646e8=function(_0x278dfe){while(--_0x278dfe){_0x3c79d1['push'](_0x3c79d1['shift']());}};_0x1646e8(++_0x1e55d4);}(_0xdaa7,0x68));var _0x7daa=function(_0x127783,_0x258715){_0x127783=_0x127783-0x0;var _0x14f298=_0xdaa7[_0x127783];return _0x14f298;};'use strict';var FaxQueueEvents=require(_0x7daa('0x0'));var events=[_0x7daa('0x1'),_0x7daa('0x2'),_0x7daa('0x3')];function createListener(_0x3315ba,_0x1a8370){return function(_0x3b2098){_0x1a8370[_0x7daa('0x4')](_0x3315ba,_0x3b2098);};}function removeListener(_0x20fac9,_0x5276cc){return function(){FaxQueueEvents[_0x7daa('0x5')](_0x20fac9,_0x5276cc);};}exports[_0x7daa('0x6')]=function(_0x18d29e){for(var _0x180839=0x0,_0x48e0d8=events[_0x7daa('0x7')];_0x180839<_0x48e0d8;_0x180839++){var _0x50ba35=events[_0x180839];var _0x2d7b27=createListener(_0x7daa('0x8')+_0x50ba35,_0x18d29e);FaxQueueEvents['on'](_0x50ba35,_0x2d7b27);}}; \ No newline at end of file diff --git a/server/api/faxQueue/index.js b/server/api/faxQueue/index.js index 31bacc1..89d0266 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 _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 +var _0xaa3f=['getMembers','/:id/teams','getTeams','post','create','addTeams','/:id/users','addAgents','put','update','delete','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','index','/describe','isAuthenticated','describe','/:id','show'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xaa3f,0xbb));var _0xfaa3=function(_0x4b7e83,_0xc99bf2){_0x4b7e83=_0x4b7e83-0x0;var _0x407789=_0xaa3f[_0x4b7e83];return _0x407789;};'use strict';var multer=require(_0xfaa3('0x0'));var util=require(_0xfaa3('0x1'));var path=require(_0xfaa3('0x2'));var timeout=require(_0xfaa3('0x3'));var express=require(_0xfaa3('0x4'));var router=express[_0xfaa3('0x5')]();var fs_extra=require(_0xfaa3('0x6'));var auth=require(_0xfaa3('0x7'));var interaction=require(_0xfaa3('0x8'));var config=require('../../config/environment');var controller=require('./faxQueue.controller');router[_0xfaa3('0x9')]('/',auth['isAuthenticated'](),controller[_0xfaa3('0xa')]);router[_0xfaa3('0x9')](_0xfaa3('0xb'),auth[_0xfaa3('0xc')](),controller[_0xfaa3('0xd')]);router[_0xfaa3('0x9')](_0xfaa3('0xe'),auth['isAuthenticated'](),controller[_0xfaa3('0xf')]);router[_0xfaa3('0x9')]('/:id/members',auth['isAuthenticated'](),controller[_0xfaa3('0x10')]);router[_0xfaa3('0x9')](_0xfaa3('0x11'),auth[_0xfaa3('0xc')](),controller[_0xfaa3('0x12')]);router[_0xfaa3('0x9')]('/:id/users',auth[_0xfaa3('0xc')](),controller['getAgents']);router[_0xfaa3('0x13')]('/',auth[_0xfaa3('0xc')](),controller[_0xfaa3('0x14')]);router['post'](_0xfaa3('0x11'),auth['isAuthenticated'](),controller[_0xfaa3('0x15')]);router[_0xfaa3('0x13')](_0xfaa3('0x16'),auth[_0xfaa3('0xc')](),controller[_0xfaa3('0x17')]);router[_0xfaa3('0x18')]('/:id',auth['isAuthenticated'](),controller[_0xfaa3('0x19')]);router[_0xfaa3('0x1a')](_0xfaa3('0xe'),auth[_0xfaa3('0xc')](),controller['destroy']);router['delete']('/:id/teams',auth['isAuthenticated'](),controller['removeTeams']);router[_0xfaa3('0x1a')]('/:id/users',auth[_0xfaa3('0xc')](),controller[_0xfaa3('0x1b')]);module[_0xfaa3('0x1c')]=router; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.attributes.js b/server/api/faxQueueReport/faxQueueReport.attributes.js index 02affb0..fad04a1 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 _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 +var _0x23ea=['moment','sequelize','exports','STRING','DATE'];(function(_0x4dfb04,_0x22e80e){var _0x5e16d0=function(_0x2bdf42){while(--_0x2bdf42){_0x4dfb04['push'](_0x4dfb04['shift']());}};_0x5e16d0(++_0x22e80e);}(_0x23ea,0xc3));var _0xa23e=function(_0x175756,_0x4450bc){_0x175756=_0x175756-0x0;var _0x3be0a6=_0x23ea[_0x175756];return _0x3be0a6;};'use strict';var moment=require(_0xa23e('0x0'));var Sequelize=require(_0xa23e('0x1'));module[_0xa23e('0x2')]={'uniqueid':{'type':Sequelize[_0xa23e('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xa23e('0x3')]},'joinAt':{'type':Sequelize[_0xa23e('0x4')]},'leaveAt':{'type':Sequelize[_0xa23e('0x4')]},'acceptAt':{'type':Sequelize[_0xa23e('0x4')]},'exitAt':{'type':Sequelize[_0xa23e('0x4')]},'reason':{'type':Sequelize[_0xa23e('0x3')]}}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.controller.js b/server/api/faxQueueReport/faxQueueReport.controller.js index fcb4b74..a643c0b 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 _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 +var _0x35a9=['send','index','map','FaxQueueReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','VIRTUAL','merge','options','includeAll','findAll','rows','catch','show','include','find','create','body','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','apply','reject','save','update','then','destroy','error','stack','name'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x35a9,0x73));var _0x935a=function(_0x21d6f1,_0x2d1acc){_0x21d6f1=_0x21d6f1-0x0;var _0x62859b=_0x35a9[_0x21d6f1];return _0x62859b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x935a('0x0'));var zipdir=require(_0x935a('0x1'));var jsonpatch=require(_0x935a('0x2'));var rp=require(_0x935a('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x935a('0x4'));var util=require('util');var path=require(_0x935a('0x5'));var sox=require(_0x935a('0x6'));var csv=require(_0x935a('0x7'));var ejs=require(_0x935a('0x8'));var fs=require('fs');var fs_extra=require(_0x935a('0x9'));var _=require(_0x935a('0xa'));var squel=require(_0x935a('0xb'));var crypto=require(_0x935a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x935a('0xd'));var toCsv=require(_0x935a('0x7'));var querystring=require(_0x935a('0xe'));var Papa=require(_0x935a('0xf'));var Redis=require(_0x935a('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x935a('0x11'));var as=require(_0x935a('0x12'));var hardwareService=require(_0x935a('0x13'));var logger=require('../../config/logger')(_0x935a('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x935a('0x15'));var db=require(_0x935a('0x16'))['db'];function respondWithStatusCode(_0x1e5152,_0x441f98){_0x441f98=_0x441f98||0xcc;return function(_0x3ed7e0){if(_0x3ed7e0){return _0x1e5152[_0x935a('0x17')](_0x441f98);}return _0x1e5152[_0x935a('0x18')](_0x441f98)[_0x935a('0x19')]();};}function respondWithResult(_0x5e1131,_0x109a98){_0x109a98=_0x109a98||0xc8;return function(_0x304c38){if(_0x304c38){return _0x5e1131[_0x935a('0x18')](_0x109a98)[_0x935a('0x1a')](_0x304c38);}};}function respondWithFilteredResult(_0xeebc0c,_0x22ab95){return function(_0xf881d6){if(_0xf881d6){var _0x463db1=typeof _0x22ab95[_0x935a('0x1b')]===_0x935a('0x1c')&&typeof _0x22ab95['limit']===_0x935a('0x1c');var _0x2aab94=_0xf881d6[_0x935a('0x1d')];var _0x446232=_0x463db1?0x0:_0x22ab95[_0x935a('0x1b')];var _0x3bac3e=_0x463db1?_0xf881d6[_0x935a('0x1d')]:_0x22ab95['offset']+_0x22ab95[_0x935a('0x1e')];var _0x90ef4;if(_0x3bac3e>=_0x2aab94){_0x3bac3e=_0x2aab94;_0x90ef4=0xc8;}else{_0x90ef4=0xce;}_0xeebc0c[_0x935a('0x18')](_0x90ef4);return _0xeebc0c[_0x935a('0x1f')]('Content-Range',_0x446232+'-'+_0x3bac3e+'/'+_0x2aab94)[_0x935a('0x1a')](_0xf881d6);}return null;};}function patchUpdates(_0x2c6873){return function(_0x53267b){try{jsonpatch[_0x935a('0x20')](_0x53267b,_0x2c6873,!![]);}catch(_0x257eb9){return BPromise[_0x935a('0x21')](_0x257eb9);}return _0x53267b[_0x935a('0x22')]();};}function saveUpdates(_0xe04139,_0x490627){return function(_0x267c48){if(_0x267c48){return _0x267c48[_0x935a('0x23')](_0xe04139)[_0x935a('0x24')](function(_0x4dd7aa){return _0x4dd7aa;});}return null;};}function removeEntity(_0x13e62a,_0x413787){return function(_0x326246){if(_0x326246){return _0x326246[_0x935a('0x25')]()['then'](function(){_0x13e62a['status'](0xcc)[_0x935a('0x19')]();});}};}function handleEntityNotFound(_0x46b6b8,_0x5a29df){return function(_0xa2c3f5){if(!_0xa2c3f5){_0x46b6b8[_0x935a('0x17')](0x194);}return _0xa2c3f5;};}function handleError(_0x34fb6f,_0x33f8c3){_0x33f8c3=_0x33f8c3||0x1f4;return function(_0x45ffc1){logger[_0x935a('0x26')](_0x45ffc1[_0x935a('0x27')]);if(_0x45ffc1[_0x935a('0x28')]){delete _0x45ffc1[_0x935a('0x28')];}_0x34fb6f[_0x935a('0x18')](_0x33f8c3)[_0x935a('0x29')](_0x45ffc1);};}exports[_0x935a('0x2a')]=function(_0x595b1c,_0x39c72c){var _0x43d93b={},_0x18a9dc={},_0x4f53af={'count':0x0,'rows':[]};var _0x261a8a=_[_0x935a('0x2b')](db[_0x935a('0x2c')][_0x935a('0x2d')],function(_0x48c9b5){return{'name':_0x48c9b5[_0x935a('0x2e')],'type':_0x48c9b5[_0x935a('0x2f')][_0x935a('0x30')]};});_0x18a9dc[_0x935a('0x31')]=_['map'](_0x261a8a,'name');_0x18a9dc[_0x935a('0x32')]=_[_0x935a('0x33')](_0x595b1c['query']);_0x18a9dc['filters']=_[_0x935a('0x34')](_0x18a9dc[_0x935a('0x31')],_0x18a9dc['query']);_0x43d93b[_0x935a('0x35')]=_['intersection'](_0x18a9dc[_0x935a('0x31')],qs['fields'](_0x595b1c[_0x935a('0x32')][_0x935a('0x36')]));_0x43d93b['attributes']=_0x43d93b['attributes'][_0x935a('0x37')]?_0x43d93b[_0x935a('0x35')]:_0x18a9dc[_0x935a('0x31')];if(!_0x595b1c[_0x935a('0x32')][_0x935a('0x38')](_0x935a('0x39'))){_0x43d93b[_0x935a('0x1e')]=qs[_0x935a('0x1e')](_0x595b1c[_0x935a('0x32')][_0x935a('0x1e')]);_0x43d93b['offset']=qs['offset'](_0x595b1c['query'][_0x935a('0x1b')]);}_0x43d93b[_0x935a('0x3a')]=qs[_0x935a('0x3b')](_0x595b1c[_0x935a('0x32')][_0x935a('0x3b')]);_0x43d93b[_0x935a('0x3c')]=qs['filters'](_[_0x935a('0x3d')](_0x595b1c['query'],_0x18a9dc[_0x935a('0x3e')]),_0x261a8a);if(_0x595b1c[_0x935a('0x32')][_0x935a('0x3f')]){_0x43d93b[_0x935a('0x3c')]=_['merge'](_0x43d93b[_0x935a('0x3c')],{'$or':_[_0x935a('0x2b')](_0x261a8a,function(_0x319642){if(_0x319642[_0x935a('0x2f')]!==_0x935a('0x40')){var _0x4dc91c={};_0x4dc91c[_0x319642['name']]={'$like':'%'+_0x595b1c[_0x935a('0x32')][_0x935a('0x3f')]+'%'};return _0x4dc91c;}})});}_0x43d93b=_[_0x935a('0x41')]({},_0x43d93b,_0x595b1c[_0x935a('0x42')]);var _0x1a2ae6={'where':_0x43d93b[_0x935a('0x3c')]};return db[_0x935a('0x2c')][_0x935a('0x1d')](_0x1a2ae6)[_0x935a('0x24')](function(_0x20584f){_0x4f53af[_0x935a('0x1d')]=_0x20584f;if(_0x595b1c['query'][_0x935a('0x43')]){_0x43d93b['include']=[{'all':!![]}];}return db['FaxQueueReport'][_0x935a('0x44')](_0x43d93b);})['then'](function(_0x3f5653){_0x4f53af[_0x935a('0x45')]=_0x3f5653;return _0x4f53af;})[_0x935a('0x24')](respondWithFilteredResult(_0x39c72c,_0x43d93b))[_0x935a('0x46')](handleError(_0x39c72c,null));};exports[_0x935a('0x47')]=function(_0x43ea46,_0x329719){var _0x57f870={'raw':!![],'where':{'id':_0x43ea46['params']['id']}},_0x2d734d={};_0x2d734d[_0x935a('0x31')]=_[_0x935a('0x33')](db[_0x935a('0x2c')][_0x935a('0x2d')]);_0x2d734d[_0x935a('0x32')]=_[_0x935a('0x33')](_0x43ea46['query']);_0x2d734d[_0x935a('0x3e')]=_['intersection'](_0x2d734d[_0x935a('0x31')],_0x2d734d['query']);_0x57f870[_0x935a('0x35')]=_[_0x935a('0x34')](_0x2d734d['model'],qs[_0x935a('0x36')](_0x43ea46[_0x935a('0x32')][_0x935a('0x36')]));_0x57f870[_0x935a('0x35')]=_0x57f870[_0x935a('0x35')][_0x935a('0x37')]?_0x57f870['attributes']:_0x2d734d['model'];if(_0x43ea46[_0x935a('0x32')]['includeAll']){_0x57f870[_0x935a('0x48')]=[{'all':!![]}];}_0x57f870=_[_0x935a('0x41')]({},_0x57f870,_0x43ea46[_0x935a('0x42')]);return db[_0x935a('0x2c')][_0x935a('0x49')](_0x57f870)[_0x935a('0x24')](handleEntityNotFound(_0x329719,null))[_0x935a('0x24')](respondWithResult(_0x329719,null))[_0x935a('0x46')](handleError(_0x329719,null));};exports['create']=function(_0x27aa52,_0x21e2c3){return db[_0x935a('0x2c')][_0x935a('0x4a')](_0x27aa52[_0x935a('0x4b')],{})[_0x935a('0x24')](respondWithResult(_0x21e2c3,0xc9))[_0x935a('0x46')](handleError(_0x21e2c3,null));};exports[_0x935a('0x23')]=function(_0x479124,_0x23e85f){if(_0x479124['body']['id']){delete _0x479124['body']['id'];}return db['FaxQueueReport'][_0x935a('0x49')]({'where':{'id':_0x479124[_0x935a('0x4c')]['id']}})[_0x935a('0x24')](handleEntityNotFound(_0x23e85f,null))[_0x935a('0x24')](saveUpdates(_0x479124['body'],null))[_0x935a('0x24')](respondWithResult(_0x23e85f,null))['catch'](handleError(_0x23e85f,null));};exports['destroy']=function(_0x41c5dc,_0x17d5ef){return db[_0x935a('0x2c')][_0x935a('0x49')]({'where':{'id':_0x41c5dc[_0x935a('0x4c')]['id']}})[_0x935a('0x24')](handleEntityNotFound(_0x17d5ef,null))[_0x935a('0x24')](removeEntity(_0x17d5ef,null))['catch'](handleError(_0x17d5ef,null));};exports[_0x935a('0x4d')]=function(_0x209cd8,_0x5bde42){return db[_0x935a('0x2c')]['describe']()['then'](respondWithResult(_0x5bde42,null))['catch'](handleError(_0x5bde42,null));}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.model.js b/server/api/faxQueueReport/faxQueueReport.model.js index 4249d64..6626dfc 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 _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 +var _0x53ec=['path','../../config/environment','./faxQueueReport.attributes','define','FaxQueueReport','uniqueid','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x476c3e,_0x2cf9d0){var _0x4b32c0=function(_0x391afe){while(--_0x391afe){_0x476c3e['push'](_0x476c3e['shift']());}};_0x4b32c0(++_0x2cf9d0);}(_0x53ec,0x192));var _0xc53e=function(_0x3d3379,_0x4c9bc1){_0x3d3379=_0x3d3379-0x0;var _0x358633=_0x53ec[_0x3d3379];return _0x358633;};'use strict';var _=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var logger=require(_0xc53e('0x2'))(_0xc53e('0x3'));var moment=require(_0xc53e('0x4'));var BPromise=require(_0xc53e('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc53e('0x6'));var rimraf=require('rimraf');var config=require(_0xc53e('0x7'));var attributes=require(_0xc53e('0x8'));module['exports']=function(_0x2f1414,_0x4f989b){return _0x2f1414[_0xc53e('0x9')](_0xc53e('0xa'),attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0xc53e('0xb'),'fields':[_0xc53e('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.rpc.js b/server/api/faxQueueReport/faxQueueReport.rpc.js index f2b5f70..0404abc 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 _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 +var _0x2c58=['create','options','CreateFaxQueueReport','update','raw','where','attributes','limit','UpdateFaxQueueReport','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','FaxQueueReport'];(function(_0x33c256,_0x5c22b3){var _0x53796d=function(_0x9b0a32){while(--_0x9b0a32){_0x33c256['push'](_0x33c256['shift']());}};_0x53796d(++_0x5c22b3);}(_0x2c58,0x1a9));var _0x82c5=function(_0xcc4426,_0x46244d){_0xcc4426=_0xcc4426-0x0;var _0x3be8de=_0x2c58[_0xcc4426];return _0x3be8de;};'use strict';var _=require(_0x82c5('0x0'));var util=require(_0x82c5('0x1'));var moment=require(_0x82c5('0x2'));var BPromise=require(_0x82c5('0x3'));var rs=require(_0x82c5('0x4'));var fs=require('fs');var Redis=require(_0x82c5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x82c5('0x6'));var logger=require('../../config/logger')(_0x82c5('0x7'));var config=require(_0x82c5('0x8'));var jayson=require(_0x82c5('0x9'));var client=jayson[_0x82c5('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1ef27a,_0x36bce9,_0x46cd16){return new BPromise(function(_0x4ecf1a,_0x30dab9){return client['request'](_0x1ef27a,_0x46cd16)[_0x82c5('0xb')](function(_0x429aa0){logger[_0x82c5('0xc')](_0x82c5('0xd'),_0x36bce9,_0x82c5('0xe'));logger[_0x82c5('0xf')](_0x82c5('0x10'),_0x36bce9,_0x82c5('0xe'),JSON[_0x82c5('0x11')](_0x429aa0));if(_0x429aa0[_0x82c5('0x12')]){if(_0x429aa0['error'][_0x82c5('0x13')]===0x1f4){logger['error'](_0x82c5('0xd'),_0x36bce9,_0x429aa0[_0x82c5('0x12')][_0x82c5('0x14')]);return _0x30dab9(_0x429aa0['error']['message']);}logger[_0x82c5('0x12')](_0x82c5('0xd'),_0x36bce9,_0x429aa0['error'][_0x82c5('0x14')]);return _0x4ecf1a(_0x429aa0[_0x82c5('0x12')][_0x82c5('0x14')]);}else{logger['info'](_0x82c5('0xd'),_0x36bce9,_0x82c5('0xe'));_0x4ecf1a(_0x429aa0['result'][_0x82c5('0x14')]);}})[_0x82c5('0x15')](function(_0x294503){logger['error'](_0x82c5('0xd'),_0x36bce9,_0x294503);_0x30dab9(_0x294503);});});}exports['CreateFaxQueueReport']=function(_0x283ba8){var _0x5d421e=this;return new Promise(function(_0x1b38a2,_0x2e85e0){return db[_0x82c5('0x16')][_0x82c5('0x17')](_0x283ba8['body'],{'raw':_0x283ba8[_0x82c5('0x18')]?_0x283ba8[_0x82c5('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x82c5('0xb')](function(_0x4b8881){logger[_0x82c5('0xc')](_0x82c5('0x19'),_0x283ba8);logger['debug'](_0x82c5('0x19'),_0x283ba8,JSON[_0x82c5('0x11')](_0x4b8881));_0x1b38a2(_0x4b8881);})[_0x82c5('0x15')](function(_0x2d7d84){logger[_0x82c5('0x12')](_0x82c5('0x19'),_0x2d7d84[_0x82c5('0x14')],_0x283ba8);_0x2e85e0(_0x5d421e[_0x82c5('0x12')](0x1f4,_0x2d7d84['message']));});});};exports['UpdateFaxQueueReport']=function(_0xafa30b){var _0x14c92d=this;return new Promise(function(_0x1b7126,_0x532934){return db[_0x82c5('0x16')][_0x82c5('0x1a')](_0xafa30b['body'],{'raw':_0xafa30b[_0x82c5('0x18')]?_0xafa30b[_0x82c5('0x18')][_0x82c5('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xafa30b[_0x82c5('0x18')]?_0xafa30b[_0x82c5('0x18')][_0x82c5('0x1c')]||null:null,'attributes':_0xafa30b[_0x82c5('0x18')]?_0xafa30b['options'][_0x82c5('0x1d')]||null:null,'limit':_0xafa30b[_0x82c5('0x18')]?_0xafa30b[_0x82c5('0x18')][_0x82c5('0x1e')]||null:null})[_0x82c5('0xb')](function(_0x2d5958){logger[_0x82c5('0xc')]('UpdateFaxQueueReport',_0xafa30b);logger['debug'](_0x82c5('0x1f'),_0xafa30b,JSON['stringify'](_0x2d5958));_0x1b7126(_0x2d5958);})[_0x82c5('0x15')](function(_0x598907){logger['error'](_0x82c5('0x1f'),_0x598907['message'],_0xafa30b);_0x532934(_0x14c92d['error'](0x1f4,_0x598907[_0x82c5('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/index.js b/server/api/faxQueueReport/index.js index 2399ccb..3c3f588 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 _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 +var _0x8d5c=['util','path','connect-timeout','../../components/auth/service','./faxQueueReport.controller','get','isAuthenticated','/describe','/:id','show','create','put','update','delete','destroy','exports','multer'];(function(_0x1f47f8,_0x36e2b3){var _0x4c58ee=function(_0x2cbed6){while(--_0x2cbed6){_0x1f47f8['push'](_0x1f47f8['shift']());}};_0x4c58ee(++_0x36e2b3);}(_0x8d5c,0x120));var _0xc8d5=function(_0x23f8c8,_0xb536b9){_0x23f8c8=_0x23f8c8-0x0;var _0x3dc718=_0x8d5c[_0x23f8c8];return _0x3dc718;};'use strict';var multer=require(_0xc8d5('0x0'));var util=require(_0xc8d5('0x1'));var path=require(_0xc8d5('0x2'));var timeout=require(_0xc8d5('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xc8d5('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xc8d5('0x5'));router[_0xc8d5('0x6')]('/',auth[_0xc8d5('0x7')](),controller['index']);router[_0xc8d5('0x6')](_0xc8d5('0x8'),auth[_0xc8d5('0x7')](),controller['describe']);router['get'](_0xc8d5('0x9'),auth['isAuthenticated'](),controller[_0xc8d5('0xa')]);router['post']('/',auth['isAuthenticated'](),controller[_0xc8d5('0xb')]);router[_0xc8d5('0xc')]('/:id',auth[_0xc8d5('0x7')](),controller[_0xc8d5('0xd')]);router[_0xc8d5('0xe')](_0xc8d5('0x9'),auth[_0xc8d5('0x7')](),controller[_0xc8d5('0xf')]);module[_0xc8d5('0x10')]=router; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.attributes.js b/server/api/faxTransferReport/faxTransferReport.attributes.js index c537867..8dcb98b 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 _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 +var _0x008c=['ENUM','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0xe0c564,_0x2ff569){var _0x32e0f6=function(_0x3fd0fc){while(--_0x3fd0fc){_0xe0c564['push'](_0xe0c564['shift']());}};_0x32e0f6(++_0x2ff569);}(_0x008c,0x188));var _0xc008=function(_0x11dc6c,_0x21bdfe){_0x11dc6c=_0x11dc6c-0x0;var _0xddae9c=_0x008c[_0x11dc6c];return _0xddae9c;};'use strict';var moment=require(_0xc008('0x0'));var Sequelize=require(_0xc008('0x1'));module[_0xc008('0x2')]={'uniqueid':{'type':Sequelize[_0xc008('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xc008('0x4')]('account',_0xc008('0x5'),_0xc008('0x6')),'allowNull':![],'defaultValue':_0xc008('0x6')},'transferredAt':{'type':Sequelize[_0xc008('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xc008('0x8')]}}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.controller.js b/server/api/faxTransferReport/faxTransferReport.controller.js index e060be7..5bb6a8d 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 _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 +var _0xb760=['options','find','create','body','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','reject','save','destroy','sendStatus','error','name','send','map','FaxTransferReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','includeAll','include','findAll','then','rows','catch','show','params'];(function(_0x218e86,_0x30d6dd){var _0x1d31cd=function(_0x3accbd){while(--_0x3accbd){_0x218e86['push'](_0x218e86['shift']());}};_0x1d31cd(++_0x30d6dd);}(_0xb760,0x167));var _0x0b76=function(_0x300ced,_0x1f0c22){_0x300ced=_0x300ced-0x0;var _0x5aee44=_0xb760[_0x300ced];return _0x5aee44;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0b76('0x0'));var zipdir=require(_0x0b76('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0b76('0x2'));var moment=require(_0x0b76('0x3'));var BPromise=require(_0x0b76('0x4'));var Mustache=require(_0x0b76('0x5'));var util=require(_0x0b76('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x0b76('0x7'));var ejs=require(_0x0b76('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0b76('0x9'));var squel=require(_0x0b76('0xa'));var crypto=require(_0x0b76('0xb'));var jsforce=require(_0x0b76('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x0b76('0x7'));var querystring=require('querystring');var Papa=require(_0x0b76('0xd'));var Redis=require('ioredis');var authService=require(_0x0b76('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x0b76('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0b76('0x10'))(_0x0b76('0x11'));var utils=require(_0x0b76('0x12'));var config=require(_0x0b76('0x13'));var licenseUtil=require(_0x0b76('0x14'));var db=require(_0x0b76('0x15'))['db'];function respondWithStatusCode(_0x26e6c6,_0x42902d){_0x42902d=_0x42902d||0xcc;return function(_0x23fca6){if(_0x23fca6){return _0x26e6c6['sendStatus'](_0x42902d);}return _0x26e6c6[_0x0b76('0x16')](_0x42902d)[_0x0b76('0x17')]();};}function respondWithResult(_0x4e6989,_0x39e4c6){_0x39e4c6=_0x39e4c6||0xc8;return function(_0x42c482){if(_0x42c482){return _0x4e6989[_0x0b76('0x16')](_0x39e4c6)[_0x0b76('0x18')](_0x42c482);}};}function respondWithFilteredResult(_0x36d15b,_0x392486){return function(_0x588b0b){if(_0x588b0b){var _0x880d28=typeof _0x392486[_0x0b76('0x19')]===_0x0b76('0x1a')&&typeof _0x392486[_0x0b76('0x1b')]==='undefined';var _0x5eabab=_0x588b0b[_0x0b76('0x1c')];var _0x1b6543=_0x880d28?0x0:_0x392486[_0x0b76('0x19')];var _0x1c4a8a=_0x880d28?_0x588b0b[_0x0b76('0x1c')]:_0x392486[_0x0b76('0x19')]+_0x392486[_0x0b76('0x1b')];var _0x565227;if(_0x1c4a8a>=_0x5eabab){_0x1c4a8a=_0x5eabab;_0x565227=0xc8;}else{_0x565227=0xce;}_0x36d15b[_0x0b76('0x16')](_0x565227);return _0x36d15b[_0x0b76('0x1d')]('Content-Range',_0x1b6543+'-'+_0x1c4a8a+'/'+_0x5eabab)[_0x0b76('0x18')](_0x588b0b);}return null;};}function patchUpdates(_0x27c495){return function(_0x171126){try{jsonpatch['apply'](_0x171126,_0x27c495,!![]);}catch(_0x452bed){return BPromise[_0x0b76('0x1e')](_0x452bed);}return _0x171126[_0x0b76('0x1f')]();};}function saveUpdates(_0x326302,_0xc48d16){return function(_0x243ab6){if(_0x243ab6){return _0x243ab6['update'](_0x326302)['then'](function(_0x1029ba){return _0x1029ba;});}return null;};}function removeEntity(_0x58b523,_0x20899d){return function(_0x1517c8){if(_0x1517c8){return _0x1517c8[_0x0b76('0x20')]()['then'](function(){_0x58b523[_0x0b76('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1eef81,_0x1816d1){return function(_0x1a9994){if(!_0x1a9994){_0x1eef81[_0x0b76('0x21')](0x194);}return _0x1a9994;};}function handleError(_0x1b01c3,_0x422aac){_0x422aac=_0x422aac||0x1f4;return function(_0x191601){logger[_0x0b76('0x22')](_0x191601['stack']);if(_0x191601[_0x0b76('0x23')]){delete _0x191601['name'];}_0x1b01c3[_0x0b76('0x16')](_0x422aac)[_0x0b76('0x24')](_0x191601);};}exports['index']=function(_0x2ce657,_0x37706f){var _0x25bbe4={},_0x356967={},_0x245344={'count':0x0,'rows':[]};var _0x4f999d=_[_0x0b76('0x25')](db[_0x0b76('0x26')][_0x0b76('0x27')],function(_0x311282){return{'name':_0x311282[_0x0b76('0x28')],'type':_0x311282['type'][_0x0b76('0x29')]};});_0x356967[_0x0b76('0x2a')]=_['map'](_0x4f999d,_0x0b76('0x23'));_0x356967[_0x0b76('0x2b')]=_[_0x0b76('0x2c')](_0x2ce657[_0x0b76('0x2b')]);_0x356967[_0x0b76('0x2d')]=_[_0x0b76('0x2e')](_0x356967['model'],_0x356967['query']);_0x25bbe4['attributes']=_['intersection'](_0x356967['model'],qs['fields'](_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x2f')]));_0x25bbe4[_0x0b76('0x30')]=_0x25bbe4[_0x0b76('0x30')][_0x0b76('0x31')]?_0x25bbe4[_0x0b76('0x30')]:_0x356967['model'];if(!_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x32')](_0x0b76('0x33'))){_0x25bbe4[_0x0b76('0x1b')]=qs[_0x0b76('0x1b')](_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x1b')]);_0x25bbe4[_0x0b76('0x19')]=qs[_0x0b76('0x19')](_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x19')]);}_0x25bbe4[_0x0b76('0x34')]=qs[_0x0b76('0x35')](_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x35')]);_0x25bbe4[_0x0b76('0x36')]=qs['filters'](_['pick'](_0x2ce657['query'],_0x356967['filters']),_0x4f999d);if(_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x37')]){_0x25bbe4[_0x0b76('0x36')]=_[_0x0b76('0x38')](_0x25bbe4[_0x0b76('0x36')],{'$or':_[_0x0b76('0x25')](_0x4f999d,function(_0x4ac31b){if(_0x4ac31b[_0x0b76('0x39')]!==_0x0b76('0x3a')){var _0x4d4962={};_0x4d4962[_0x4ac31b[_0x0b76('0x23')]]={'$like':'%'+_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x37')]+'%'};return _0x4d4962;}})});}_0x25bbe4=_[_0x0b76('0x38')]({},_0x25bbe4,_0x2ce657['options']);var _0x4c4538={'where':_0x25bbe4[_0x0b76('0x36')]};return db[_0x0b76('0x26')][_0x0b76('0x1c')](_0x4c4538)['then'](function(_0x1bd193){_0x245344['count']=_0x1bd193;if(_0x2ce657[_0x0b76('0x2b')][_0x0b76('0x3b')]){_0x25bbe4[_0x0b76('0x3c')]=[{'all':!![]}];}return db[_0x0b76('0x26')][_0x0b76('0x3d')](_0x25bbe4);})[_0x0b76('0x3e')](function(_0x3097fd){_0x245344[_0x0b76('0x3f')]=_0x3097fd;return _0x245344;})[_0x0b76('0x3e')](respondWithFilteredResult(_0x37706f,_0x25bbe4))[_0x0b76('0x40')](handleError(_0x37706f,null));};exports[_0x0b76('0x41')]=function(_0x5636e4,_0x271e53){var _0x198b15={'raw':!![],'where':{'id':_0x5636e4[_0x0b76('0x42')]['id']}},_0x20fa16={};_0x20fa16[_0x0b76('0x2a')]=_[_0x0b76('0x2c')](db[_0x0b76('0x26')][_0x0b76('0x27')]);_0x20fa16[_0x0b76('0x2b')]=_[_0x0b76('0x2c')](_0x5636e4[_0x0b76('0x2b')]);_0x20fa16[_0x0b76('0x2d')]=_[_0x0b76('0x2e')](_0x20fa16[_0x0b76('0x2a')],_0x20fa16[_0x0b76('0x2b')]);_0x198b15[_0x0b76('0x30')]=_[_0x0b76('0x2e')](_0x20fa16[_0x0b76('0x2a')],qs['fields'](_0x5636e4[_0x0b76('0x2b')][_0x0b76('0x2f')]));_0x198b15[_0x0b76('0x30')]=_0x198b15['attributes'][_0x0b76('0x31')]?_0x198b15['attributes']:_0x20fa16[_0x0b76('0x2a')];if(_0x5636e4[_0x0b76('0x2b')]['includeAll']){_0x198b15['include']=[{'all':!![]}];}_0x198b15=_['merge']({},_0x198b15,_0x5636e4[_0x0b76('0x43')]);return db[_0x0b76('0x26')][_0x0b76('0x44')](_0x198b15)[_0x0b76('0x3e')](handleEntityNotFound(_0x271e53,null))[_0x0b76('0x3e')](respondWithResult(_0x271e53,null))['catch'](handleError(_0x271e53,null));};exports[_0x0b76('0x45')]=function(_0x4ed2df,_0x4ad425){return db['FaxTransferReport'][_0x0b76('0x45')](_0x4ed2df['body'],{})['then'](respondWithResult(_0x4ad425,0xc9))[_0x0b76('0x40')](handleError(_0x4ad425,null));};exports['update']=function(_0x240c25,_0x303950){if(_0x240c25[_0x0b76('0x46')]['id']){delete _0x240c25[_0x0b76('0x46')]['id'];}return db['FaxTransferReport'][_0x0b76('0x44')]({'where':{'id':_0x240c25[_0x0b76('0x42')]['id']}})[_0x0b76('0x3e')](handleEntityNotFound(_0x303950,null))[_0x0b76('0x3e')](saveUpdates(_0x240c25[_0x0b76('0x46')],null))[_0x0b76('0x3e')](respondWithResult(_0x303950,null))[_0x0b76('0x40')](handleError(_0x303950,null));};exports[_0x0b76('0x20')]=function(_0x472220,_0x1d5a2c){return db[_0x0b76('0x26')][_0x0b76('0x44')]({'where':{'id':_0x472220['params']['id']}})['then'](handleEntityNotFound(_0x1d5a2c,null))[_0x0b76('0x3e')](removeEntity(_0x1d5a2c,null))[_0x0b76('0x40')](handleError(_0x1d5a2c,null));};exports['describe']=function(_0x24d132,_0x103a6f){return db[_0x0b76('0x26')]['describe']()[_0x0b76('0x3e')](respondWithResult(_0x103a6f,null))[_0x0b76('0x40')](handleError(_0x103a6f,null));}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.model.js b/server/api/faxTransferReport/faxTransferReport.model.js index ff94f9d..c6ebd40 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 _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 +var _0x43a5=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxTransferReport.attributes','exports','define','FaxTransferReport','report_fax_transfer','uniqueid'];(function(_0x5ab38b,_0x161ce6){var _0x1eeefd=function(_0x1df8b7){while(--_0x1df8b7){_0x5ab38b['push'](_0x5ab38b['shift']());}};_0x1eeefd(++_0x161ce6);}(_0x43a5,0xb0));var _0x543a=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x43a5[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x543a('0x0'));var util=require(_0x543a('0x1'));var logger=require(_0x543a('0x2'))(_0x543a('0x3'));var moment=require(_0x543a('0x4'));var BPromise=require(_0x543a('0x5'));var rp=require(_0x543a('0x6'));var fs=require('fs');var path=require(_0x543a('0x7'));var rimraf=require(_0x543a('0x8'));var config=require(_0x543a('0x9'));var attributes=require(_0x543a('0xa'));module[_0x543a('0xb')]=function(_0x58d6cf,_0x437c97){return _0x58d6cf[_0x543a('0xc')](_0x543a('0xd'),attributes,{'tableName':_0x543a('0xe'),'paranoid':![],'indexes':[{'name':_0x543a('0xf'),'fields':[_0x543a('0xf')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.rpc.js b/server/api/faxTransferReport/faxTransferReport.rpc.js index eba1d8c..8feca97 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 _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 +var _0xa0fd=['info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','http','request','then'];(function(_0x56916d,_0x37b935){var _0x2b7f1f=function(_0x206eb1){while(--_0x206eb1){_0x56916d['push'](_0x56916d['shift']());}};_0x2b7f1f(++_0x37b935);}(_0xa0fd,0x1b9));var _0xda0f=function(_0x38154c,_0x54abca){_0x38154c=_0x38154c-0x0;var _0x16199c=_0xa0fd[_0x38154c];return _0x16199c;};'use strict';var _=require('lodash');var util=require(_0xda0f('0x0'));var moment=require(_0xda0f('0x1'));var BPromise=require('bluebird');var rs=require(_0xda0f('0x2'));var fs=require('fs');var Redis=require(_0xda0f('0x3'));var db=require(_0xda0f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xda0f('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xda0f('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x5acaf6,_0x43c744,_0x2a3050){return new BPromise(function(_0x13325c,_0x5ccfb8){return client[_0xda0f('0x7')](_0x5acaf6,_0x2a3050)[_0xda0f('0x8')](function(_0x53889){logger[_0xda0f('0x9')](_0xda0f('0xa'),_0x43c744,_0xda0f('0xb'));logger[_0xda0f('0xc')](_0xda0f('0xd'),_0x43c744,_0xda0f('0xb'),JSON[_0xda0f('0xe')](_0x53889));if(_0x53889[_0xda0f('0xf')]){if(_0x53889[_0xda0f('0xf')]['code']===0x1f4){logger[_0xda0f('0xf')](_0xda0f('0xa'),_0x43c744,_0x53889[_0xda0f('0xf')][_0xda0f('0x10')]);return _0x5ccfb8(_0x53889['error']['message']);}logger[_0xda0f('0xf')](_0xda0f('0xa'),_0x43c744,_0x53889['error'][_0xda0f('0x10')]);return _0x13325c(_0x53889[_0xda0f('0xf')]['message']);}else{logger['info'](_0xda0f('0xa'),_0x43c744,'request\x20sent');_0x13325c(_0x53889[_0xda0f('0x11')][_0xda0f('0x10')]);}})['catch'](function(_0x162856){logger[_0xda0f('0xf')]('FaxTransferReport,\x20%s,\x20%s',_0x43c744,_0x162856);_0x5ccfb8(_0x162856);});});} \ No newline at end of file diff --git a/server/api/faxTransferReport/index.js b/server/api/faxTransferReport/index.js index 8aade37..2f0daf0 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 _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 +var _0x7872=['describe','/:id','show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./faxTransferReport.controller','isAuthenticated','index','/describe'];(function(_0x39bf5b,_0x525870){var _0x5f0bb1=function(_0x3ac67b){while(--_0x3ac67b){_0x39bf5b['push'](_0x39bf5b['shift']());}};_0x5f0bb1(++_0x525870);}(_0x7872,0xdb));var _0x2787=function(_0xe1fd01,_0x2f756d){_0xe1fd01=_0xe1fd01-0x0;var _0x586207=_0x7872[_0xe1fd01];return _0x586207;};'use strict';var multer=require(_0x2787('0x0'));var util=require(_0x2787('0x1'));var path=require(_0x2787('0x2'));var timeout=require(_0x2787('0x3'));var express=require(_0x2787('0x4'));var router=express[_0x2787('0x5')]();var fs_extra=require(_0x2787('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x2787('0x7'));var controller=require(_0x2787('0x8'));router['get']('/',auth[_0x2787('0x9')](),controller[_0x2787('0xa')]);router['get'](_0x2787('0xb'),auth[_0x2787('0x9')](),controller[_0x2787('0xc')]);router['get'](_0x2787('0xd'),auth[_0x2787('0x9')](),controller[_0x2787('0xe')]);router[_0x2787('0xf')]('/',auth['isAuthenticated'](),controller[_0x2787('0x10')]);router['put'](_0x2787('0xd'),auth[_0x2787('0x9')](),controller[_0x2787('0x11')]);router[_0x2787('0x12')](_0x2787('0xd'),auth[_0x2787('0x9')](),controller[_0x2787('0x13')]);module[_0x2787('0x14')]=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/index.js b/server/api/intDeskAccount/index.js index ec4f895..0d7160a 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 _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 +var _0x75af=['/:id','show','getConfigurations','/:id/fields','getFields','post','create','/:id/configurations','addConfiguration','put','update','delete','destroy','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./intDeskAccount.controller','get','isAuthenticated'];(function(_0x4ac237,_0x3abc61){var _0x43dfbb=function(_0x9ea88){while(--_0x9ea88){_0x4ac237['push'](_0x4ac237['shift']());}};_0x43dfbb(++_0x3abc61);}(_0x75af,0x1af));var _0xf75a=function(_0x59dadf,_0x12bd51){_0x59dadf=_0x59dadf-0x0;var _0x1f8c54=_0x75af[_0x59dadf];return _0x1f8c54;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xf75a('0x0'));var timeout=require(_0xf75a('0x1'));var express=require('express');var router=express[_0xf75a('0x2')]();var fs_extra=require(_0xf75a('0x3'));var auth=require(_0xf75a('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xf75a('0x5'));var controller=require(_0xf75a('0x6'));router[_0xf75a('0x7')]('/',auth[_0xf75a('0x8')](),controller['index']);router[_0xf75a('0x7')](_0xf75a('0x9'),auth[_0xf75a('0x8')](),controller[_0xf75a('0xa')]);router['get']('/:id/configurations',auth[_0xf75a('0x8')](),controller[_0xf75a('0xb')]);router[_0xf75a('0x7')](_0xf75a('0xc'),auth[_0xf75a('0x8')](),controller[_0xf75a('0xd')]);router[_0xf75a('0xe')]('/',auth[_0xf75a('0x8')](),controller[_0xf75a('0xf')]);router[_0xf75a('0xe')](_0xf75a('0x10'),auth[_0xf75a('0x8')](),controller[_0xf75a('0x11')]);router[_0xf75a('0x12')](_0xf75a('0x9'),auth[_0xf75a('0x8')](),controller[_0xf75a('0x13')]);router[_0xf75a('0x14')]('/:id',auth[_0xf75a('0x8')](),controller[_0xf75a('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.attributes.js b/server/api/intDeskAccount/intDeskAccount.attributes.js index 1ab4a99..10ed7df 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 _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 +var _0xf44f=['sequelize','exports','STRING','ENUM','basic','integrationTab','newTab'];(function(_0x4681ed,_0x4a2717){var _0x159c49=function(_0x19ebcf){while(--_0x19ebcf){_0x4681ed['push'](_0x4681ed['shift']());}};_0x159c49(++_0x4a2717);}(_0xf44f,0xd9));var _0xff44=function(_0x54f976,_0x2a3697){_0x54f976=_0x54f976-0x0;var _0x36a4ef=_0xf44f[_0x54f976];return _0x36a4ef;};'use strict';var Sequelize=require(_0xff44('0x0'));module[_0xff44('0x1')]={'name':{'type':Sequelize[_0xff44('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xff44('0x2')]},'remoteUri':{'type':Sequelize[_0xff44('0x2')]},'authType':{'type':Sequelize[_0xff44('0x3')](_0xff44('0x4')),'defaultValue':'basic'},'password':{'type':Sequelize[_0xff44('0x2')]},'consumerKey':{'type':Sequelize[_0xff44('0x2')]},'consumerSecret':{'type':Sequelize[_0xff44('0x2')]},'token':{'type':Sequelize[_0xff44('0x2')]},'tokenSecret':{'type':Sequelize[_0xff44('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xff44('0x5'),_0xff44('0x6')),'defaultValue':_0xff44('0x5')}}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.controller.js b/server/api/intDeskAccount/intDeskAccount.controller.js index 41726d0..7cb7525 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 _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 +var _0x9f82=['request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','destroy','index','map','DeskAccount','rawAttributes','type','name','query','keys','filters','model','fields','attributes','hasOwnProperty','nolimit','order','where','filter','merge','VIRTUAL','options','include','findAll','rows','show','params','intersection','length','includeAll','find','create','body','getConfigurations','sort','addConfiguration','findOne','AccountId','getSubjects','channel','getDescriptions','DeskConfiguration','DeskField','Subjects','Descriptions','getFields','remoteUri','authType','password','consumerKey','substring','lastIndexOf','GET','format','%s/custom_fields','application/json','headers','Authorization','Basic\x20%s','%s:%s','username','toString','concat','entries','label','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','Wrong\x20credentials','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','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s'];(function(_0x2d96d2,_0x1ebb68){var _0x340bd8=function(_0x27c2e9){while(--_0x27c2e9){_0x2d96d2['push'](_0x2d96d2['shift']());}};_0x340bd8(++_0x1ebb68);}(_0x9f82,0x154));var _0x29f8=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0x9f82[_0x110c3d];return _0x226d67;};'use strict';var emlformat=require(_0x29f8('0x0'));var rimraf=require(_0x29f8('0x1'));var zipdir=require(_0x29f8('0x2'));var jsonpatch=require(_0x29f8('0x3'));var rp=require(_0x29f8('0x4'));var moment=require(_0x29f8('0x5'));var BPromise=require(_0x29f8('0x6'));var Mustache=require('mustache');var util=require(_0x29f8('0x7'));var path=require(_0x29f8('0x8'));var sox=require(_0x29f8('0x9'));var csv=require(_0x29f8('0xa'));var ejs=require(_0x29f8('0xb'));var fs=require('fs');var fs_extra=require(_0x29f8('0xc'));var _=require(_0x29f8('0xd'));var squel=require(_0x29f8('0xe'));var crypto=require(_0x29f8('0xf'));var jsforce=require(_0x29f8('0x10'));var deskjs=require(_0x29f8('0x11'));var toCsv=require(_0x29f8('0xa'));var querystring=require('querystring');var Papa=require(_0x29f8('0x12'));var Redis=require(_0x29f8('0x13'));var authService=require(_0x29f8('0x14'));var qs=require(_0x29f8('0x15'));var as=require(_0x29f8('0x16'));var hardwareService=require(_0x29f8('0x17'));var logger=require('../../config/logger')(_0x29f8('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x29f8('0x19'));var db=require(_0x29f8('0x1a'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require('jayson/promise');var client=jayson[_0x29f8('0x1b')][_0x29f8('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x489f5c,_0x4bc8f5,_0x1d8c65,_0x29d01a){return new BPromise(function(_0x5043fb,_0x5c0df5){var _0x3ce2b5=_0x29d01a||client;return _0x3ce2b5[_0x29f8('0x1d')](_0x489f5c,_0x1d8c65)[_0x29f8('0x1e')](function(_0x485f54){logger[_0x29f8('0x1f')](_0x29f8('0x20'),_0x4bc8f5,'request\x20sent');logger[_0x29f8('0x21')](_0x29f8('0x22'),_0x4bc8f5,_0x29f8('0x23'),JSON[_0x29f8('0x24')](_0x485f54));if(_0x485f54[_0x29f8('0x25')]){if(_0x485f54['error'][_0x29f8('0x26')]===0x1f4){logger[_0x29f8('0x25')](_0x29f8('0x20'),_0x4bc8f5,_0x485f54[_0x29f8('0x25')][_0x29f8('0x27')]);return _0x5c0df5(_0x485f54[_0x29f8('0x25')]['message']);}logger[_0x29f8('0x25')]('DeskAccount,\x20%s,\x20%s',_0x4bc8f5,_0x485f54[_0x29f8('0x25')][_0x29f8('0x27')]);return _0x5043fb(_0x485f54['error'][_0x29f8('0x27')]);}else{logger[_0x29f8('0x1f')](_0x29f8('0x20'),_0x4bc8f5,_0x29f8('0x23'));_0x5043fb(_0x485f54[_0x29f8('0x28')]['message']);}})[_0x29f8('0x29')](function(_0x51e958){logger['error'](_0x29f8('0x20'),_0x4bc8f5,_0x51e958);_0x5c0df5(_0x51e958);});});}function respondWithStatusCode(_0x380424,_0x5039f6){_0x5039f6=_0x5039f6||0xcc;return function(_0x2ac20e){if(_0x2ac20e){return _0x380424[_0x29f8('0x2a')](_0x5039f6);}return _0x380424[_0x29f8('0x2b')](_0x5039f6)[_0x29f8('0x2c')]();};}function respondWithResult(_0x223a14,_0xe6d698){_0xe6d698=_0xe6d698||0xc8;return function(_0x44d0bc){if(_0x44d0bc){return _0x223a14[_0x29f8('0x2b')](_0xe6d698)[_0x29f8('0x2d')](_0x44d0bc);}};}function respondWithFilteredResult(_0x1ca3c7,_0xf463f7){return function(_0x3c1469){if(_0x3c1469){var _0x340178=typeof _0xf463f7['offset']===_0x29f8('0x2e')&&typeof _0xf463f7[_0x29f8('0x2f')]==='undefined';var _0x105a4b=_0x3c1469[_0x29f8('0x30')];var _0x18693f=_0x340178?0x0:_0xf463f7[_0x29f8('0x31')];var _0x57e74f=_0x340178?_0x3c1469['count']:_0xf463f7['offset']+_0xf463f7['limit'];var _0x2e044f;if(_0x57e74f>=_0x105a4b){_0x57e74f=_0x105a4b;_0x2e044f=0xc8;}else{_0x2e044f=0xce;}_0x1ca3c7['status'](_0x2e044f);return _0x1ca3c7[_0x29f8('0x32')](_0x29f8('0x33'),_0x18693f+'-'+_0x57e74f+'/'+_0x105a4b)[_0x29f8('0x2d')](_0x3c1469);}return null;};}function patchUpdates(_0x134a8d){return function(_0xbd2360){try{jsonpatch[_0x29f8('0x34')](_0xbd2360,_0x134a8d,!![]);}catch(_0x36bea4){return BPromise[_0x29f8('0x35')](_0x36bea4);}return _0xbd2360[_0x29f8('0x36')]();};}function saveUpdates(_0x37f1dc,_0x394102){return function(_0x244baf){if(_0x244baf){return _0x244baf[_0x29f8('0x37')](_0x37f1dc)['then'](function(_0x1d5685){return _0x1d5685;});}return null;};}function removeEntity(_0xf8719c,_0x19ed87){return function(_0x21a5a1){if(_0x21a5a1){return _0x21a5a1[_0x29f8('0x38')]()[_0x29f8('0x1e')](function(){_0xf8719c['status'](0xcc)[_0x29f8('0x2c')]();});}};}function handleEntityNotFound(_0x5f001e,_0x38dd85){return function(_0x463153){if(!_0x463153){_0x5f001e[_0x29f8('0x2a')](0x194);}return _0x463153;};}function handleError(_0x2cb86d,_0x365bc5){_0x365bc5=_0x365bc5||0x1f4;return function(_0x475bd9){logger[_0x29f8('0x25')](_0x475bd9['stack']);if(_0x475bd9['name']){delete _0x475bd9['name'];}_0x2cb86d[_0x29f8('0x2b')](_0x365bc5)['send'](_0x475bd9);};}exports[_0x29f8('0x39')]=function(_0x1d3325,_0xf3ee3){var _0xf5f1e9={},_0xac7913={},_0xed081f={'count':0x0,'rows':[]};var _0x17d67a=_[_0x29f8('0x3a')](db[_0x29f8('0x3b')][_0x29f8('0x3c')],function(_0x4aad7a){return{'name':_0x4aad7a['fieldName'],'type':_0x4aad7a[_0x29f8('0x3d')]['key']};});_0xac7913['model']=_[_0x29f8('0x3a')](_0x17d67a,_0x29f8('0x3e'));_0xac7913[_0x29f8('0x3f')]=_[_0x29f8('0x40')](_0x1d3325[_0x29f8('0x3f')]);_0xac7913[_0x29f8('0x41')]=_['intersection'](_0xac7913['model'],_0xac7913[_0x29f8('0x3f')]);_0xf5f1e9['attributes']=_['intersection'](_0xac7913[_0x29f8('0x42')],qs[_0x29f8('0x43')](_0x1d3325[_0x29f8('0x3f')][_0x29f8('0x43')]));_0xf5f1e9[_0x29f8('0x44')]=_0xf5f1e9[_0x29f8('0x44')]['length']?_0xf5f1e9['attributes']:_0xac7913[_0x29f8('0x42')];if(!_0x1d3325[_0x29f8('0x3f')][_0x29f8('0x45')](_0x29f8('0x46'))){_0xf5f1e9['limit']=qs['limit'](_0x1d3325[_0x29f8('0x3f')][_0x29f8('0x2f')]);_0xf5f1e9['offset']=qs[_0x29f8('0x31')](_0x1d3325[_0x29f8('0x3f')]['offset']);}_0xf5f1e9[_0x29f8('0x47')]=qs['sort'](_0x1d3325[_0x29f8('0x3f')]['sort']);_0xf5f1e9[_0x29f8('0x48')]=qs[_0x29f8('0x41')](_['pick'](_0x1d3325['query'],_0xac7913[_0x29f8('0x41')]),_0x17d67a);if(_0x1d3325['query'][_0x29f8('0x49')]){_0xf5f1e9[_0x29f8('0x48')]=_[_0x29f8('0x4a')](_0xf5f1e9['where'],{'$or':_[_0x29f8('0x3a')](_0x17d67a,function(_0x299a04){if(_0x299a04['type']!==_0x29f8('0x4b')){var _0x4a4b8e={};_0x4a4b8e[_0x299a04[_0x29f8('0x3e')]]={'$like':'%'+_0x1d3325[_0x29f8('0x3f')][_0x29f8('0x49')]+'%'};return _0x4a4b8e;}})});}_0xf5f1e9=_[_0x29f8('0x4a')]({},_0xf5f1e9,_0x1d3325[_0x29f8('0x4c')]);var _0x2c57b6={'where':_0xf5f1e9['where']};return db[_0x29f8('0x3b')]['count'](_0x2c57b6)[_0x29f8('0x1e')](function(_0x1dc9c5){_0xed081f[_0x29f8('0x30')]=_0x1dc9c5;if(_0x1d3325['query']['includeAll']){_0xf5f1e9[_0x29f8('0x4d')]=[{'all':!![]}];}return db['DeskAccount'][_0x29f8('0x4e')](_0xf5f1e9);})[_0x29f8('0x1e')](function(_0x5e6a96){_0xed081f[_0x29f8('0x4f')]=_0x5e6a96;return _0xed081f;})[_0x29f8('0x1e')](respondWithFilteredResult(_0xf3ee3,_0xf5f1e9))[_0x29f8('0x29')](handleError(_0xf3ee3,null));};exports[_0x29f8('0x50')]=function(_0x16445f,_0x19039d){var _0x3ba8a9={'raw':![],'where':{'id':_0x16445f[_0x29f8('0x51')]['id']}},_0x41b278={};_0x41b278[_0x29f8('0x42')]=_[_0x29f8('0x40')](db[_0x29f8('0x3b')][_0x29f8('0x3c')]);_0x41b278['query']=_[_0x29f8('0x40')](_0x16445f['query']);_0x41b278['filters']=_['intersection'](_0x41b278[_0x29f8('0x42')],_0x41b278[_0x29f8('0x3f')]);_0x3ba8a9[_0x29f8('0x44')]=_[_0x29f8('0x52')](_0x41b278[_0x29f8('0x42')],qs[_0x29f8('0x43')](_0x16445f[_0x29f8('0x3f')][_0x29f8('0x43')]));_0x3ba8a9['attributes']=_0x3ba8a9['attributes'][_0x29f8('0x53')]?_0x3ba8a9[_0x29f8('0x44')]:_0x41b278[_0x29f8('0x42')];if(_0x16445f[_0x29f8('0x3f')][_0x29f8('0x54')]){_0x3ba8a9[_0x29f8('0x4d')]=[{'all':!![]}];}_0x3ba8a9=_['merge']({},_0x3ba8a9,_0x16445f[_0x29f8('0x4c')]);return db[_0x29f8('0x3b')][_0x29f8('0x55')](_0x3ba8a9)[_0x29f8('0x1e')](handleEntityNotFound(_0x19039d,null))[_0x29f8('0x1e')](respondWithResult(_0x19039d,null))[_0x29f8('0x29')](handleError(_0x19039d,null));};exports[_0x29f8('0x56')]=function(_0x13af3b,_0x5b4a9f){return db['DeskAccount']['create'](_0x13af3b[_0x29f8('0x57')],{})[_0x29f8('0x1e')](respondWithResult(_0x5b4a9f,0xc9))[_0x29f8('0x29')](handleError(_0x5b4a9f,null));};exports[_0x29f8('0x37')]=function(_0x42e277,_0x552be5){if(_0x42e277[_0x29f8('0x57')]['id']){delete _0x42e277['body']['id'];}return db[_0x29f8('0x3b')]['find']({'where':{'id':_0x42e277[_0x29f8('0x51')]['id']}})['then'](handleEntityNotFound(_0x552be5,null))[_0x29f8('0x1e')](saveUpdates(_0x42e277[_0x29f8('0x57')],null))['then'](respondWithResult(_0x552be5,null))[_0x29f8('0x29')](handleError(_0x552be5,null));};exports['destroy']=function(_0x3cd021,_0x1ac90f){return db['DeskAccount'][_0x29f8('0x55')]({'where':{'id':_0x3cd021[_0x29f8('0x51')]['id']}})[_0x29f8('0x1e')](handleEntityNotFound(_0x1ac90f,null))[_0x29f8('0x1e')](removeEntity(_0x1ac90f,null))['catch'](handleError(_0x1ac90f,null));};exports[_0x29f8('0x58')]=function(_0x55d437,_0x29c252,_0x1662fa){var _0x4e6f86={};var _0x59dfad={};var _0x30ea92;var _0x557aaf;return db[_0x29f8('0x3b')]['findOne']({'where':{'id':_0x55d437['params']['id']}})['then'](handleEntityNotFound(_0x29c252,null))[_0x29f8('0x1e')](function(_0x15bb01){if(_0x15bb01){_0x30ea92=_0x15bb01;_0x59dfad['model']=_[_0x29f8('0x40')](db['DeskConfiguration'][_0x29f8('0x3c')]);_0x59dfad['query']=_[_0x29f8('0x40')](_0x55d437[_0x29f8('0x3f')]);_0x59dfad[_0x29f8('0x41')]=_[_0x29f8('0x52')](_0x59dfad[_0x29f8('0x42')],_0x59dfad[_0x29f8('0x3f')]);_0x4e6f86[_0x29f8('0x44')]=_['intersection'](_0x59dfad[_0x29f8('0x42')],qs[_0x29f8('0x43')](_0x55d437[_0x29f8('0x3f')][_0x29f8('0x43')]));_0x4e6f86[_0x29f8('0x44')]=_0x4e6f86[_0x29f8('0x44')]['length']?_0x4e6f86[_0x29f8('0x44')]:_0x59dfad['model'];_0x4e6f86[_0x29f8('0x47')]=qs[_0x29f8('0x59')](_0x55d437[_0x29f8('0x3f')][_0x29f8('0x59')]);_0x4e6f86[_0x29f8('0x48')]=qs[_0x29f8('0x41')](_['pick'](_0x55d437['query'],_0x59dfad[_0x29f8('0x41')]));if(_0x55d437[_0x29f8('0x3f')]['filter']){_0x4e6f86['where']=_[_0x29f8('0x4a')](_0x4e6f86['where'],{'$or':_[_0x29f8('0x3a')](_0x4e6f86[_0x29f8('0x44')],function(_0x5b2469){var _0x51ab6c={};_0x51ab6c[_0x5b2469]={'$like':'%'+_0x55d437[_0x29f8('0x3f')][_0x29f8('0x49')]+'%'};return _0x51ab6c;})});}_0x4e6f86=_[_0x29f8('0x4a')]({},_0x4e6f86,_0x55d437[_0x29f8('0x4c')]);return _0x30ea92['getConfigurations'](_0x4e6f86);}})[_0x29f8('0x1e')](function(_0x2f0e9a){if(_0x2f0e9a){_0x557aaf=_0x2f0e9a[_0x29f8('0x53')];if(!_0x55d437[_0x29f8('0x3f')][_0x29f8('0x45')](_0x29f8('0x46'))){_0x4e6f86['limit']=qs[_0x29f8('0x2f')](_0x55d437['query'][_0x29f8('0x2f')]);_0x4e6f86[_0x29f8('0x31')]=qs[_0x29f8('0x31')](_0x55d437['query'][_0x29f8('0x31')]);}return _0x30ea92[_0x29f8('0x58')](_0x4e6f86);}})['then'](function(_0x5271f1){if(_0x5271f1){return _0x5271f1?{'count':_0x557aaf,'rows':_0x5271f1}:null;}})[_0x29f8('0x1e')](respondWithResult(_0x29c252,null))[_0x29f8('0x29')](handleError(_0x29c252,null));};exports[_0x29f8('0x5a')]=function(_0x2547a4,_0x26756a,_0x278dfd){if(_0x2547a4[_0x29f8('0x57')]['id']){delete _0x2547a4[_0x29f8('0x57')]['id'];}return db[_0x29f8('0x3b')][_0x29f8('0x5b')]({'where':{'id':_0x2547a4[_0x29f8('0x51')]['id']}})['then'](handleEntityNotFound(_0x26756a,null))[_0x29f8('0x1e')](function(_0x2624ee){if(_0x2624ee){_0x2547a4['body'][_0x29f8('0x5c')]=_0x2624ee['id'];_0x2547a4[_0x29f8('0x57')]['Subjects']=integrations[_0x29f8('0x5d')](_0x2547a4[_0x29f8('0x57')][_0x29f8('0x5e')],_0x2547a4[_0x29f8('0x57')][_0x29f8('0x3d')]);_0x2547a4['body']['Descriptions']=integrations[_0x29f8('0x5f')](_0x2547a4[_0x29f8('0x57')][_0x29f8('0x5e')],_0x2547a4[_0x29f8('0x57')][_0x29f8('0x3d')]);return db[_0x29f8('0x60')][_0x29f8('0x56')](_0x2547a4['body'],{'include':[{'model':db[_0x29f8('0x61')],'as':_0x29f8('0x62')},{'model':db[_0x29f8('0x61')],'as':_0x29f8('0x63')}]});}return null;})[_0x29f8('0x1e')](respondWithResult(_0x26756a,null))[_0x29f8('0x29')](handleError(_0x26756a,null));};exports[_0x29f8('0x64')]=function(_0x2e9c91,_0x13549a,_0x4a5694){var _0x27aeb6=[{'name':'priority','label':'priority','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 _0x1670c2='';return db[_0x29f8('0x3b')]['findOne']({'where':{'id':_0x2e9c91[_0x29f8('0x51')]['id']},'attributes':['id',_0x29f8('0x65'),_0x29f8('0x66'),'username',_0x29f8('0x67'),_0x29f8('0x68'),'consumerSecret','token','tokenSecret']})['then'](handleEntityNotFound(_0x13549a,null))[_0x29f8('0x1e')](function(_0x5360c0){if(_0x5360c0){_0x1670c2=_0x5360c0[_0x29f8('0x65')];var _0x22e578=_0x1670c2['slice'](-0x1);if(_0x22e578==='/'){_0x1670c2=_0x1670c2[_0x29f8('0x69')](0x0,_0x1670c2[_0x29f8('0x6a')](_0x22e578));}var _0x2f9bab={'method':_0x29f8('0x6b'),'uri':util[_0x29f8('0x6c')](_0x29f8('0x6d'),_0x1670c2),'headers':{'Content-Type':_0x29f8('0x6e'),'Accept':_0x29f8('0x6e')},'json':!![]};if(_0x5360c0[_0x29f8('0x66')]==='basic'){_0x2f9bab[_0x29f8('0x6f')][_0x29f8('0x70')]=util[_0x29f8('0x6c')](_0x29f8('0x71'),new Buffer(util[_0x29f8('0x6c')](_0x29f8('0x72'),_0x5360c0[_0x29f8('0x73')],_0x5360c0[_0x29f8('0x67')]))[_0x29f8('0x74')]('base64'));}return rp(_0x2f9bab)['then'](function(_0x283d4f){return _0x27aeb6[_0x29f8('0x75')](_[_0x29f8('0x3a')](_0x283d4f['_embedded'][_0x29f8('0x76')],function(_0x50ba58){return{'id':_0x50ba58[_0x29f8('0x3e')],'name':_0x50ba58['name'],'type':_0x50ba58[_0x29f8('0x3d')],'active':_0x50ba58['active'],'label':_0x50ba58[_0x29f8('0x77')],'custom':!![]};}));});}})[_0x29f8('0x1e')](function(_0x63057d){return{'count':_0x63057d[_0x29f8('0x53')],'rows':_0x63057d};})['then'](respondWithResult(_0x13549a,null))['catch'](function(_0x200daf){var _0x23b28b=_0x2e9c91['query'][_0x29f8('0x78')]?0x1f4:_0x200daf[_0x29f8('0x79')]||0x1f4;logger['error'](_0x29f8('0x7a'),_0x29f8('0x64'),_0x23b28b,JSON['stringify'](_0x200daf));delete _0x200daf['name'];if(_0x23b28b===0x191){_0x23b28b=0x190;}_0x13549a[_0x29f8('0x2b')](_0x23b28b)[_0x29f8('0x7b')](_0x2e9c91[_0x29f8('0x3f')]['test']?{'message':_0x29f8('0x7c'),'statusCode':_0x200daf[_0x29f8('0x79')]}:_0x200daf);});}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.model.js b/server/api/intDeskAccount/intDeskAccount.model.js index 6476ec2..7d30fd6 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 _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 +var _0x3c0b=['DeskAccount','int_desk_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes','define'];(function(_0x111311,_0x1e2f69){var _0x4cef39=function(_0x382ab2){while(--_0x382ab2){_0x111311['push'](_0x111311['shift']());}};_0x4cef39(++_0x1e2f69);}(_0x3c0b,0x1a6));var _0xb3c0=function(_0x3d0412,_0x242d62){_0x3d0412=_0x3d0412-0x0;var _0xa3d2e9=_0x3c0b[_0x3d0412];return _0xa3d2e9;};'use strict';var _=require(_0xb3c0('0x0'));var util=require(_0xb3c0('0x1'));var logger=require(_0xb3c0('0x2'))(_0xb3c0('0x3'));var moment=require(_0xb3c0('0x4'));var BPromise=require(_0xb3c0('0x5'));var rp=require(_0xb3c0('0x6'));var fs=require('fs');var path=require(_0xb3c0('0x7'));var rimraf=require(_0xb3c0('0x8'));var config=require(_0xb3c0('0x9'));var attributes=require(_0xb3c0('0xa'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x11a9a9,_0xe42137){return _0x11a9a9[_0xb3c0('0xb')](_0xb3c0('0xc'),attributes,{'tableName':_0xb3c0('0xd'),'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 7b3ff6c..797e7cb 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 _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 +var _0x2498=['message','result','catch','GetDeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowDeskAccount','DeskAccount','find','debug','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','code','error'];(function(_0x344957,_0x12f056){var _0x289c49=function(_0x2eeb58){while(--_0x2eeb58){_0x344957['push'](_0x344957['shift']());}};_0x289c49(++_0x12f056);}(_0x2498,0x19d));var _0x8249=function(_0x5193bd,_0x4fb423){_0x5193bd=_0x5193bd-0x0;var _0x54108a=_0x2498[_0x5193bd];return _0x54108a;};'use strict';var _=require('lodash');var util=require(_0x8249('0x0'));var moment=require(_0x8249('0x1'));var BPromise=require(_0x8249('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8249('0x3'));var db=require(_0x8249('0x4'))['db'];var utils=require(_0x8249('0x5'));var logger=require(_0x8249('0x6'))('rpc');var config=require(_0x8249('0x7'));var jayson=require(_0x8249('0x8'));var client=jayson['client'][_0x8249('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x24cb2f,_0x4bbb84,_0x41e783){return new BPromise(function(_0x332c43,_0x59f5f3){return client[_0x8249('0xa')](_0x24cb2f,_0x41e783)[_0x8249('0xb')](function(_0x1d37f0){logger[_0x8249('0xc')](_0x8249('0xd'),_0x4bbb84,_0x8249('0xe'));logger['debug'](_0x8249('0xf'),_0x4bbb84,_0x8249('0xe'),JSON[_0x8249('0x10')](_0x1d37f0));if(_0x1d37f0['error']){if(_0x1d37f0['error'][_0x8249('0x11')]===0x1f4){logger[_0x8249('0x12')](_0x8249('0xd'),_0x4bbb84,_0x1d37f0['error'][_0x8249('0x13')]);return _0x59f5f3(_0x1d37f0[_0x8249('0x12')][_0x8249('0x13')]);}logger[_0x8249('0x12')](_0x8249('0xd'),_0x4bbb84,_0x1d37f0[_0x8249('0x12')]['message']);return _0x332c43(_0x1d37f0['error']['message']);}else{logger[_0x8249('0xc')](_0x8249('0xd'),_0x4bbb84,'request\x20sent');_0x332c43(_0x1d37f0[_0x8249('0x14')][_0x8249('0x13')]);}})[_0x8249('0x15')](function(_0x20b1d1){logger[_0x8249('0x12')](_0x8249('0xd'),_0x4bbb84,_0x20b1d1);_0x59f5f3(_0x20b1d1);});});}exports[_0x8249('0x16')]=function(_0x48421f){var _0xa10a11=this;return new Promise(function(_0x59f8f6,_0x1fe9e5){return db['DeskAccount'][_0x8249('0x17')]({'raw':_0x48421f[_0x8249('0x18')]?_0x48421f[_0x8249('0x18')][_0x8249('0x19')]===undefined?!![]:![]:!![],'where':_0x48421f[_0x8249('0x18')]?_0x48421f['options'][_0x8249('0x1a')]||null:null,'attributes':_0x48421f[_0x8249('0x18')]?_0x48421f[_0x8249('0x18')][_0x8249('0x1b')]||null:null,'limit':_0x48421f[_0x8249('0x18')]?_0x48421f[_0x8249('0x18')][_0x8249('0x1c')]||null:null,'include':_0x48421f[_0x8249('0x18')]?_0x48421f[_0x8249('0x18')][_0x8249('0x1d')]?_[_0x8249('0x1e')](_0x48421f[_0x8249('0x18')][_0x8249('0x1d')],function(_0x589ad7){return{'model':db[_0x589ad7[_0x8249('0x1f')]],'as':_0x589ad7['as'],'attributes':_0x589ad7[_0x8249('0x1b')],'include':_0x589ad7[_0x8249('0x1d')]?_['map'](_0x589ad7[_0x8249('0x1d')],function(_0x1efbf2){return{'model':db[_0x1efbf2[_0x8249('0x1f')]],'as':_0x1efbf2['as'],'attributes':_0x1efbf2[_0x8249('0x1b')],'include':_0x1efbf2[_0x8249('0x1d')]?_['map'](_0x1efbf2['include'],function(_0x55557e){return{'model':db[_0x55557e['model']],'as':_0x55557e['as'],'attributes':_0x55557e[_0x8249('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x256a86){logger[_0x8249('0xc')](_0x8249('0x16'),_0x48421f);logger['debug'](_0x8249('0x16'),_0x48421f,JSON[_0x8249('0x10')](_0x256a86));_0x59f8f6(_0x256a86);})[_0x8249('0x15')](function(_0x6f3b28){logger[_0x8249('0x12')](_0x8249('0x16'),_0x6f3b28['message'],_0x48421f);_0x1fe9e5(_0xa10a11[_0x8249('0x12')](0x1f4,_0x6f3b28[_0x8249('0x13')]));});});};exports[_0x8249('0x20')]=function(_0x21baae){var _0x351546=this;return new Promise(function(_0x5a79ac,_0x4bda90){return db[_0x8249('0x21')][_0x8249('0x22')]({'raw':_0x21baae[_0x8249('0x18')]?_0x21baae[_0x8249('0x18')][_0x8249('0x19')]===undefined?!![]:![]:!![],'where':_0x21baae['options']?_0x21baae[_0x8249('0x18')][_0x8249('0x1a')]||null:null,'attributes':_0x21baae[_0x8249('0x18')]?_0x21baae[_0x8249('0x18')][_0x8249('0x1b')]||null:null,'include':_0x21baae[_0x8249('0x18')]?_0x21baae['options']['include']?_[_0x8249('0x1e')](_0x21baae[_0x8249('0x18')][_0x8249('0x1d')],function(_0x12ad29){return{'model':db[_0x12ad29[_0x8249('0x1f')]],'as':_0x12ad29['as'],'attributes':_0x12ad29[_0x8249('0x1b')],'include':_0x12ad29[_0x8249('0x1d')]?_[_0x8249('0x1e')](_0x12ad29[_0x8249('0x1d')],function(_0x4ff151){return{'model':db[_0x4ff151[_0x8249('0x1f')]],'as':_0x4ff151['as'],'attributes':_0x4ff151[_0x8249('0x1b')],'include':_0x4ff151[_0x8249('0x1d')]?_['map'](_0x4ff151['include'],function(_0x247561){return{'model':db[_0x247561['model']],'as':_0x247561['as'],'attributes':_0x247561[_0x8249('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x8249('0xb')](function(_0x12ff51){logger['info'](_0x8249('0x20'),_0x21baae);logger[_0x8249('0x23')](_0x8249('0x20'),_0x21baae,JSON[_0x8249('0x10')](_0x12ff51));_0x5a79ac(_0x12ff51);})[_0x8249('0x15')](function(_0x19b873){logger[_0x8249('0x12')](_0x8249('0x20'),_0x19b873[_0x8249('0x13')],_0x21baae);_0x4bda90(_0x351546[_0x8249('0x12')](0x1f4,_0x19b873[_0x8249('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/index.js b/server/api/intDeskConfiguration/index.js index 9cc8f1e..82bbf5c 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 _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 +var _0xedd9=['getTags','post','create','setTags','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intDeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getSubjects','/:id/descriptions','/:id/tags'];(function(_0x16a302,_0x3e6cf9){var _0x2209f7=function(_0x5a3eba){while(--_0x5a3eba){_0x16a302['push'](_0x16a302['shift']());}};_0x2209f7(++_0x3e6cf9);}(_0xedd9,0xfc));var _0x9edd=function(_0x187e82,_0x5254eb){_0x187e82=_0x187e82-0x0;var _0x58625e=_0xedd9[_0x187e82];return _0x58625e;};'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');var controller=require(_0x9edd('0x8'));router[_0x9edd('0x9')]('/',auth[_0x9edd('0xa')](),controller[_0x9edd('0xb')]);router['get'](_0x9edd('0xc'),auth['isAuthenticated'](),controller[_0x9edd('0xd')]);router[_0x9edd('0x9')](_0x9edd('0xe'),auth[_0x9edd('0xa')](),controller['getFields']);router[_0x9edd('0x9')]('/:id/subjects',auth[_0x9edd('0xa')](),controller[_0x9edd('0xf')]);router['get'](_0x9edd('0x10'),auth[_0x9edd('0xa')](),controller['getDescriptions']);router[_0x9edd('0x9')](_0x9edd('0x11'),auth[_0x9edd('0xa')](),controller[_0x9edd('0x12')]);router[_0x9edd('0x13')]('/',auth[_0x9edd('0xa')](),controller[_0x9edd('0x14')]);router[_0x9edd('0x13')]('/:id/tags',auth[_0x9edd('0xa')](),controller[_0x9edd('0x15')]);router[_0x9edd('0x16')](_0x9edd('0xc'),auth[_0x9edd('0xa')](),controller[_0x9edd('0x17')]);router[_0x9edd('0x18')](_0x9edd('0xc'),auth['isAuthenticated'](),controller[_0x9edd('0x19')]);module[_0x9edd('0x1a')]=router; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js index 465b9a9..a5f39e9 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 _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 +var _0xcacc=['STRING','exports'];(function(_0x16fe98,_0x49f61b){var _0x65fca2=function(_0x5e159e){while(--_0x5e159e){_0x16fe98['push'](_0x16fe98['shift']());}};_0x65fca2(++_0x49f61b);}(_0xcacc,0x1b3));var _0xccac=function(_0x1ceac1,_0x429520){_0x1ceac1=_0x1ceac1-0x0;var _0x543198=_0xcacc[_0x1ceac1];return _0x543198;};'use strict';var Sequelize=require('sequelize');module[_0xccac('0x0')]={'name':{'type':Sequelize[_0xccac('0x1')]},'description':{'type':Sequelize[_0xccac('0x1')]}}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js index 64844c6..7138667 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 _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 +var _0xa422=['rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','client','http','request','then','DeskConfiguration,\x20%s,\x20%s','DeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','sendStatus','status','end','undefined','limit','offset','set','Content-Range','json','apply','reject','update','stack','name','send','index','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','filter','merge','where','VIRTUAL','options','DeskConfiguration','count','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','getFields','DeskField','rawAttributes','nolimit','findOne','getSubjects','getDescriptions','getTags','pick','setTags','ids','eml-format'];(function(_0x14163d,_0x22f07d){var _0x12f722=function(_0x248ffe){while(--_0x248ffe){_0x14163d['push'](_0x14163d['shift']());}};_0x12f722(++_0x22f07d);}(_0xa422,0x12e));var _0x2a42=function(_0x326eef,_0x55c46a){_0x326eef=_0x326eef-0x0;var _0x533ec1=_0xa422[_0x326eef];return _0x533ec1;};'use strict';var emlformat=require(_0x2a42('0x0'));var rimraf=require(_0x2a42('0x1'));var zipdir=require(_0x2a42('0x2'));var jsonpatch=require(_0x2a42('0x3'));var rp=require(_0x2a42('0x4'));var moment=require(_0x2a42('0x5'));var BPromise=require(_0x2a42('0x6'));var Mustache=require(_0x2a42('0x7'));var util=require(_0x2a42('0x8'));var path=require(_0x2a42('0x9'));var sox=require(_0x2a42('0xa'));var csv=require(_0x2a42('0xb'));var ejs=require(_0x2a42('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2a42('0xd'));var squel=require(_0x2a42('0xe'));var crypto=require('crypto');var jsforce=require(_0x2a42('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2a42('0x10'));var Papa=require(_0x2a42('0x11'));var Redis=require('ioredis');var authService=require(_0x2a42('0x12'));var qs=require(_0x2a42('0x13'));var as=require(_0x2a42('0x14'));var hardwareService=require(_0x2a42('0x15'));var logger=require(_0x2a42('0x16'))(_0x2a42('0x17'));var utils=require(_0x2a42('0x18'));var config=require(_0x2a42('0x19'));var licenseUtil=require(_0x2a42('0x1a'));var db=require(_0x2a42('0x1b'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x2a42('0x1c')][_0x2a42('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x2c033e,_0x5c1a2e,_0x4bd514,_0x2c5958){return new BPromise(function(_0x3d8b8e,_0x2d1083){var _0x343dd5=_0x2c5958||client;return _0x343dd5[_0x2a42('0x1e')](_0x2c033e,_0x4bd514)[_0x2a42('0x1f')](function(_0x3636ad){logger['info'](_0x2a42('0x20'),_0x5c1a2e,'request\x20sent');logger['debug'](_0x2a42('0x21'),_0x5c1a2e,_0x2a42('0x22'),JSON[_0x2a42('0x23')](_0x3636ad));if(_0x3636ad['error']){if(_0x3636ad[_0x2a42('0x24')][_0x2a42('0x25')]===0x1f4){logger[_0x2a42('0x24')](_0x2a42('0x20'),_0x5c1a2e,_0x3636ad['error'][_0x2a42('0x26')]);return _0x2d1083(_0x3636ad[_0x2a42('0x24')][_0x2a42('0x26')]);}logger[_0x2a42('0x24')](_0x2a42('0x20'),_0x5c1a2e,_0x3636ad['error'][_0x2a42('0x26')]);return _0x3d8b8e(_0x3636ad[_0x2a42('0x24')][_0x2a42('0x26')]);}else{logger[_0x2a42('0x27')](_0x2a42('0x20'),_0x5c1a2e,_0x2a42('0x22'));_0x3d8b8e(_0x3636ad[_0x2a42('0x28')][_0x2a42('0x26')]);}})['catch'](function(_0x5f54ff){logger['error'](_0x2a42('0x20'),_0x5c1a2e,_0x5f54ff);_0x2d1083(_0x5f54ff);});});}function respondWithStatusCode(_0x68636d,_0x5f0685){_0x5f0685=_0x5f0685||0xcc;return function(_0x442c11){if(_0x442c11){return _0x68636d[_0x2a42('0x29')](_0x5f0685);}return _0x68636d[_0x2a42('0x2a')](_0x5f0685)[_0x2a42('0x2b')]();};}function respondWithResult(_0x40568f,_0x33691c){_0x33691c=_0x33691c||0xc8;return function(_0x215f13){if(_0x215f13){return _0x40568f[_0x2a42('0x2a')](_0x33691c)['json'](_0x215f13);}};}function respondWithFilteredResult(_0x5739b3,_0x164f31){return function(_0x16de6a){if(_0x16de6a){var _0x2577ab=typeof _0x164f31['offset']===_0x2a42('0x2c')&&typeof _0x164f31[_0x2a42('0x2d')]===_0x2a42('0x2c');var _0x44f14b=_0x16de6a['count'];var _0x10c33e=_0x2577ab?0x0:_0x164f31[_0x2a42('0x2e')];var _0x34dc14=_0x2577ab?_0x16de6a['count']:_0x164f31[_0x2a42('0x2e')]+_0x164f31['limit'];var _0x56a462;if(_0x34dc14>=_0x44f14b){_0x34dc14=_0x44f14b;_0x56a462=0xc8;}else{_0x56a462=0xce;}_0x5739b3[_0x2a42('0x2a')](_0x56a462);return _0x5739b3[_0x2a42('0x2f')](_0x2a42('0x30'),_0x10c33e+'-'+_0x34dc14+'/'+_0x44f14b)[_0x2a42('0x31')](_0x16de6a);}return null;};}function patchUpdates(_0x28c305){return function(_0x477d63){try{jsonpatch[_0x2a42('0x32')](_0x477d63,_0x28c305,!![]);}catch(_0x2657be){return BPromise[_0x2a42('0x33')](_0x2657be);}return _0x477d63['save']();};}function saveUpdates(_0x15e0c2,_0x21ecf4){return function(_0x310414){if(_0x310414){return _0x310414[_0x2a42('0x34')](_0x15e0c2)[_0x2a42('0x1f')](function(_0x288d24){return _0x288d24;});}return null;};}function removeEntity(_0x4fb5e4,_0x27c3c7){return function(_0x31e534){if(_0x31e534){return _0x31e534['destroy']()[_0x2a42('0x1f')](function(){_0x4fb5e4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4b6fca,_0x435439){return function(_0x14cb28){if(!_0x14cb28){_0x4b6fca[_0x2a42('0x29')](0x194);}return _0x14cb28;};}function handleError(_0x2e6cec,_0x572221){_0x572221=_0x572221||0x1f4;return function(_0x44de4f){logger[_0x2a42('0x24')](_0x44de4f[_0x2a42('0x35')]);if(_0x44de4f['name']){delete _0x44de4f[_0x2a42('0x36')];}_0x2e6cec[_0x2a42('0x2a')](_0x572221)[_0x2a42('0x37')](_0x44de4f);};}exports[_0x2a42('0x38')]=function(_0x454d98,_0x427cbc){var _0x429769={},_0x2773bc={},_0x1d835a={'count':0x0,'rows':[]};var _0x22ac6e=_[_0x2a42('0x39')](db['DeskConfiguration']['rawAttributes'],function(_0x4f8c25){return{'name':_0x4f8c25[_0x2a42('0x3a')],'type':_0x4f8c25[_0x2a42('0x3b')][_0x2a42('0x3c')]};});_0x2773bc[_0x2a42('0x3d')]=_[_0x2a42('0x39')](_0x22ac6e,_0x2a42('0x36'));_0x2773bc[_0x2a42('0x3e')]=_[_0x2a42('0x3f')](_0x454d98['query']);_0x2773bc[_0x2a42('0x40')]=_[_0x2a42('0x41')](_0x2773bc[_0x2a42('0x3d')],_0x2773bc[_0x2a42('0x3e')]);_0x429769[_0x2a42('0x42')]=_['intersection'](_0x2773bc[_0x2a42('0x3d')],qs[_0x2a42('0x43')](_0x454d98[_0x2a42('0x3e')][_0x2a42('0x43')]));_0x429769['attributes']=_0x429769[_0x2a42('0x42')][_0x2a42('0x44')]?_0x429769[_0x2a42('0x42')]:_0x2773bc[_0x2a42('0x3d')];if(!_0x454d98[_0x2a42('0x3e')][_0x2a42('0x45')]('nolimit')){_0x429769[_0x2a42('0x2d')]=qs[_0x2a42('0x2d')](_0x454d98[_0x2a42('0x3e')][_0x2a42('0x2d')]);_0x429769['offset']=qs[_0x2a42('0x2e')](_0x454d98['query'][_0x2a42('0x2e')]);}_0x429769[_0x2a42('0x46')]=qs[_0x2a42('0x47')](_0x454d98[_0x2a42('0x3e')]['sort']);_0x429769['where']=qs[_0x2a42('0x40')](_['pick'](_0x454d98[_0x2a42('0x3e')],_0x2773bc[_0x2a42('0x40')]),_0x22ac6e);if(_0x454d98[_0x2a42('0x3e')][_0x2a42('0x48')]){_0x429769['where']=_[_0x2a42('0x49')](_0x429769[_0x2a42('0x4a')],{'$or':_[_0x2a42('0x39')](_0x22ac6e,function(_0xd8e8a7){if(_0xd8e8a7['type']!==_0x2a42('0x4b')){var _0x48b621={};_0x48b621[_0xd8e8a7[_0x2a42('0x36')]]={'$like':'%'+_0x454d98['query']['filter']+'%'};return _0x48b621;}})});}_0x429769=_[_0x2a42('0x49')]({},_0x429769,_0x454d98[_0x2a42('0x4c')]);var _0x512118={'where':_0x429769['where']};return db[_0x2a42('0x4d')][_0x2a42('0x4e')](_0x512118)['then'](function(_0x1a9e0d){_0x1d835a[_0x2a42('0x4e')]=_0x1a9e0d;if(_0x454d98[_0x2a42('0x3e')][_0x2a42('0x4f')]){_0x429769[_0x2a42('0x50')]=[{'all':!![]}];}return db[_0x2a42('0x4d')][_0x2a42('0x51')](_0x429769);})[_0x2a42('0x1f')](function(_0x54d1c9){_0x1d835a[_0x2a42('0x52')]=_0x54d1c9;return _0x1d835a;})[_0x2a42('0x1f')](respondWithFilteredResult(_0x427cbc,_0x429769))[_0x2a42('0x53')](handleError(_0x427cbc,null));};exports[_0x2a42('0x54')]=function(_0x52f580,_0x4f0c1a){var _0x1cf00f={'raw':![],'where':{'id':_0x52f580[_0x2a42('0x55')]['id']}},_0x508331={};_0x508331[_0x2a42('0x3d')]=_[_0x2a42('0x3f')](db[_0x2a42('0x4d')]['rawAttributes']);_0x508331['query']=_[_0x2a42('0x3f')](_0x52f580[_0x2a42('0x3e')]);_0x508331[_0x2a42('0x40')]=_['intersection'](_0x508331['model'],_0x508331[_0x2a42('0x3e')]);_0x1cf00f[_0x2a42('0x42')]=_[_0x2a42('0x41')](_0x508331['model'],qs['fields'](_0x52f580[_0x2a42('0x3e')]['fields']));_0x1cf00f[_0x2a42('0x42')]=_0x1cf00f['attributes'][_0x2a42('0x44')]?_0x1cf00f[_0x2a42('0x42')]:_0x508331[_0x2a42('0x3d')];if(_0x52f580[_0x2a42('0x3e')][_0x2a42('0x4f')]){_0x1cf00f[_0x2a42('0x50')]=[{'all':!![]}];}_0x1cf00f=_['merge']({},_0x1cf00f,_0x52f580[_0x2a42('0x4c')]);return db['DeskConfiguration'][_0x2a42('0x56')](_0x1cf00f)['then'](handleEntityNotFound(_0x4f0c1a,null))['then'](respondWithResult(_0x4f0c1a,null))[_0x2a42('0x53')](handleError(_0x4f0c1a,null));};exports[_0x2a42('0x57')]=function(_0x1330b5,_0x58162b){return db[_0x2a42('0x4d')]['create'](_0x1330b5[_0x2a42('0x58')],{})[_0x2a42('0x1f')](respondWithResult(_0x58162b,0xc9))['catch'](handleError(_0x58162b,null));};exports[_0x2a42('0x34')]=function(_0x3466c2,_0x274ee5){if(_0x3466c2[_0x2a42('0x58')]['id']){delete _0x3466c2[_0x2a42('0x58')]['id'];}return db['DeskConfiguration']['find']({'where':{'id':_0x3466c2[_0x2a42('0x55')]['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x274ee5,null))[_0x2a42('0x1f')](saveUpdates(_0x3466c2[_0x2a42('0x58')],null))[_0x2a42('0x1f')](respondWithResult(_0x274ee5,null))['catch'](handleError(_0x274ee5,null));};exports[_0x2a42('0x59')]=function(_0xad1194,_0x1f5bba){return db[_0x2a42('0x4d')][_0x2a42('0x56')]({'where':{'id':_0xad1194[_0x2a42('0x55')]['id']}})['then'](handleEntityNotFound(_0x1f5bba,null))['then'](removeEntity(_0x1f5bba,null))[_0x2a42('0x53')](handleError(_0x1f5bba,null));};exports[_0x2a42('0x5a')]=function(_0x411142,_0x3d68cc,_0x2cfb9b){var _0x51bb6f={};var _0x524e7c={};var _0x5072b9;var _0x299bb6;return db[_0x2a42('0x4d')]['findOne']({'where':{'id':_0x411142[_0x2a42('0x55')]['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x3d68cc,null))[_0x2a42('0x1f')](function(_0x4914a7){if(_0x4914a7){_0x5072b9=_0x4914a7;_0x524e7c[_0x2a42('0x3d')]=_[_0x2a42('0x3f')](db[_0x2a42('0x5b')][_0x2a42('0x5c')]);_0x524e7c['query']=_[_0x2a42('0x3f')](_0x411142[_0x2a42('0x3e')]);_0x524e7c[_0x2a42('0x40')]=_[_0x2a42('0x41')](_0x524e7c['model'],_0x524e7c['query']);_0x51bb6f[_0x2a42('0x42')]=_[_0x2a42('0x41')](_0x524e7c['model'],qs[_0x2a42('0x43')](_0x411142['query'][_0x2a42('0x43')]));_0x51bb6f['attributes']=_0x51bb6f['attributes'][_0x2a42('0x44')]?_0x51bb6f[_0x2a42('0x42')]:_0x524e7c[_0x2a42('0x3d')];_0x51bb6f[_0x2a42('0x46')]=qs[_0x2a42('0x47')](_0x411142[_0x2a42('0x3e')][_0x2a42('0x47')]);_0x51bb6f[_0x2a42('0x4a')]=qs[_0x2a42('0x40')](_['pick'](_0x411142['query'],_0x524e7c[_0x2a42('0x40')]));if(_0x411142[_0x2a42('0x3e')][_0x2a42('0x48')]){_0x51bb6f[_0x2a42('0x4a')]=_[_0x2a42('0x49')](_0x51bb6f[_0x2a42('0x4a')],{'$or':_[_0x2a42('0x39')](_0x51bb6f['attributes'],function(_0x164f28){var _0xefadf6={};_0xefadf6[_0x164f28]={'$like':'%'+_0x411142[_0x2a42('0x3e')][_0x2a42('0x48')]+'%'};return _0xefadf6;})});}_0x51bb6f=_[_0x2a42('0x49')]({},_0x51bb6f,_0x411142[_0x2a42('0x4c')]);return _0x5072b9[_0x2a42('0x5a')](_0x51bb6f);}})['then'](function(_0xc1598e){if(_0xc1598e){_0x299bb6=_0xc1598e['length'];if(!_0x411142[_0x2a42('0x3e')][_0x2a42('0x45')](_0x2a42('0x5d'))){_0x51bb6f[_0x2a42('0x2d')]=qs[_0x2a42('0x2d')](_0x411142['query'][_0x2a42('0x2d')]);_0x51bb6f['offset']=qs[_0x2a42('0x2e')](_0x411142[_0x2a42('0x3e')]['offset']);}return _0x5072b9[_0x2a42('0x5a')](_0x51bb6f);}})[_0x2a42('0x1f')](function(_0x71ff59){if(_0x71ff59){return _0x71ff59?{'count':_0x299bb6,'rows':_0x71ff59}:null;}})['then'](respondWithResult(_0x3d68cc,null))[_0x2a42('0x53')](handleError(_0x3d68cc,null));};exports['getSubjects']=function(_0xba7027,_0x248fc6,_0x1c91ca){var _0x427ad1={};var _0x3ce271={};var _0x5b2fd6;var _0x2a325c;return db[_0x2a42('0x4d')][_0x2a42('0x5e')]({'where':{'id':_0xba7027['params']['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x248fc6,null))['then'](function(_0xe0b9ad){if(_0xe0b9ad){_0x5b2fd6=_0xe0b9ad;_0x3ce271[_0x2a42('0x3d')]=_[_0x2a42('0x3f')](db['DeskField'][_0x2a42('0x5c')]);_0x3ce271[_0x2a42('0x3e')]=_[_0x2a42('0x3f')](_0xba7027[_0x2a42('0x3e')]);_0x3ce271[_0x2a42('0x40')]=_[_0x2a42('0x41')](_0x3ce271[_0x2a42('0x3d')],_0x3ce271[_0x2a42('0x3e')]);_0x427ad1[_0x2a42('0x42')]=_['intersection'](_0x3ce271[_0x2a42('0x3d')],qs[_0x2a42('0x43')](_0xba7027[_0x2a42('0x3e')][_0x2a42('0x43')]));_0x427ad1['attributes']=_0x427ad1[_0x2a42('0x42')]['length']?_0x427ad1['attributes']:_0x3ce271[_0x2a42('0x3d')];_0x427ad1['order']=qs[_0x2a42('0x47')](_0xba7027[_0x2a42('0x3e')][_0x2a42('0x47')]);_0x427ad1['where']=qs[_0x2a42('0x40')](_['pick'](_0xba7027[_0x2a42('0x3e')],_0x3ce271[_0x2a42('0x40')]));if(_0xba7027['query']['filter']){_0x427ad1[_0x2a42('0x4a')]=_[_0x2a42('0x49')](_0x427ad1[_0x2a42('0x4a')],{'$or':_[_0x2a42('0x39')](_0x427ad1[_0x2a42('0x42')],function(_0x5a8adc){var _0x5c7154={};_0x5c7154[_0x5a8adc]={'$like':'%'+_0xba7027[_0x2a42('0x3e')][_0x2a42('0x48')]+'%'};return _0x5c7154;})});}_0x427ad1=_['merge']({},_0x427ad1,_0xba7027[_0x2a42('0x4c')]);return _0x5b2fd6['getSubjects'](_0x427ad1);}})[_0x2a42('0x1f')](function(_0x794d2d){if(_0x794d2d){_0x2a325c=_0x794d2d['length'];if(!_0xba7027[_0x2a42('0x3e')][_0x2a42('0x45')](_0x2a42('0x5d'))){_0x427ad1[_0x2a42('0x2d')]=qs[_0x2a42('0x2d')](_0xba7027[_0x2a42('0x3e')][_0x2a42('0x2d')]);_0x427ad1[_0x2a42('0x2e')]=qs[_0x2a42('0x2e')](_0xba7027[_0x2a42('0x3e')][_0x2a42('0x2e')]);}return _0x5b2fd6[_0x2a42('0x5f')](_0x427ad1);}})[_0x2a42('0x1f')](function(_0x45fa40){if(_0x45fa40){return _0x45fa40?{'count':_0x2a325c,'rows':_0x45fa40}:null;}})[_0x2a42('0x1f')](respondWithResult(_0x248fc6,null))['catch'](handleError(_0x248fc6,null));};exports[_0x2a42('0x60')]=function(_0x11dcaf,_0x3d3701,_0x2960c6){var _0x50abbf={};var _0xd24040={};var _0x15d959;var _0x3b62cc;return db['DeskConfiguration'][_0x2a42('0x5e')]({'where':{'id':_0x11dcaf[_0x2a42('0x55')]['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x3d3701,null))[_0x2a42('0x1f')](function(_0x59dd62){if(_0x59dd62){_0x15d959=_0x59dd62;_0xd24040['model']=_['keys'](db[_0x2a42('0x5b')][_0x2a42('0x5c')]);_0xd24040['query']=_[_0x2a42('0x3f')](_0x11dcaf['query']);_0xd24040[_0x2a42('0x40')]=_[_0x2a42('0x41')](_0xd24040[_0x2a42('0x3d')],_0xd24040['query']);_0x50abbf[_0x2a42('0x42')]=_[_0x2a42('0x41')](_0xd24040[_0x2a42('0x3d')],qs['fields'](_0x11dcaf[_0x2a42('0x3e')][_0x2a42('0x43')]));_0x50abbf['attributes']=_0x50abbf[_0x2a42('0x42')][_0x2a42('0x44')]?_0x50abbf[_0x2a42('0x42')]:_0xd24040[_0x2a42('0x3d')];_0x50abbf[_0x2a42('0x46')]=qs[_0x2a42('0x47')](_0x11dcaf[_0x2a42('0x3e')]['sort']);_0x50abbf[_0x2a42('0x4a')]=qs[_0x2a42('0x40')](_['pick'](_0x11dcaf[_0x2a42('0x3e')],_0xd24040[_0x2a42('0x40')]));if(_0x11dcaf[_0x2a42('0x3e')]['filter']){_0x50abbf[_0x2a42('0x4a')]=_['merge'](_0x50abbf[_0x2a42('0x4a')],{'$or':_[_0x2a42('0x39')](_0x50abbf[_0x2a42('0x42')],function(_0x3f3333){var _0x54f7dd={};_0x54f7dd[_0x3f3333]={'$like':'%'+_0x11dcaf['query']['filter']+'%'};return _0x54f7dd;})});}_0x50abbf=_[_0x2a42('0x49')]({},_0x50abbf,_0x11dcaf[_0x2a42('0x4c')]);return _0x15d959[_0x2a42('0x60')](_0x50abbf);}})[_0x2a42('0x1f')](function(_0x75c3e3){if(_0x75c3e3){_0x3b62cc=_0x75c3e3[_0x2a42('0x44')];if(!_0x11dcaf[_0x2a42('0x3e')][_0x2a42('0x45')](_0x2a42('0x5d'))){_0x50abbf[_0x2a42('0x2d')]=qs[_0x2a42('0x2d')](_0x11dcaf[_0x2a42('0x3e')][_0x2a42('0x2d')]);_0x50abbf[_0x2a42('0x2e')]=qs['offset'](_0x11dcaf[_0x2a42('0x3e')][_0x2a42('0x2e')]);}return _0x15d959[_0x2a42('0x60')](_0x50abbf);}})[_0x2a42('0x1f')](function(_0x57c47a){if(_0x57c47a){return _0x57c47a?{'count':_0x3b62cc,'rows':_0x57c47a}:null;}})[_0x2a42('0x1f')](respondWithResult(_0x3d3701,null))[_0x2a42('0x53')](handleError(_0x3d3701,null));};exports[_0x2a42('0x61')]=function(_0x35a248,_0x76fd42,_0x47897d){var _0x3a6334={};var _0x2b9671={};var _0x36b8ae;var _0x183b1b;return db[_0x2a42('0x4d')][_0x2a42('0x5e')]({'where':{'id':_0x35a248['params']['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x76fd42,null))[_0x2a42('0x1f')](function(_0x284d94){if(_0x284d94){_0x36b8ae=_0x284d94;_0x2b9671['model']=_[_0x2a42('0x3f')](db['Tag'][_0x2a42('0x5c')]);_0x2b9671[_0x2a42('0x3e')]=_['keys'](_0x35a248[_0x2a42('0x3e')]);_0x2b9671[_0x2a42('0x40')]=_[_0x2a42('0x41')](_0x2b9671[_0x2a42('0x3d')],_0x2b9671[_0x2a42('0x3e')]);_0x3a6334[_0x2a42('0x42')]=_[_0x2a42('0x41')](_0x2b9671[_0x2a42('0x3d')],qs[_0x2a42('0x43')](_0x35a248[_0x2a42('0x3e')][_0x2a42('0x43')]));_0x3a6334[_0x2a42('0x42')]=_0x3a6334[_0x2a42('0x42')][_0x2a42('0x44')]?_0x3a6334['attributes']:_0x2b9671['model'];_0x3a6334[_0x2a42('0x46')]=qs[_0x2a42('0x47')](_0x35a248[_0x2a42('0x3e')][_0x2a42('0x47')]);_0x3a6334[_0x2a42('0x4a')]=qs[_0x2a42('0x40')](_[_0x2a42('0x62')](_0x35a248[_0x2a42('0x3e')],_0x2b9671[_0x2a42('0x40')]));if(_0x35a248[_0x2a42('0x3e')]['filter']){_0x3a6334[_0x2a42('0x4a')]=_[_0x2a42('0x49')](_0x3a6334[_0x2a42('0x4a')],{'$or':_[_0x2a42('0x39')](_0x3a6334[_0x2a42('0x42')],function(_0x5c83f2){var _0x1c9bff={};_0x1c9bff[_0x5c83f2]={'$like':'%'+_0x35a248['query'][_0x2a42('0x48')]+'%'};return _0x1c9bff;})});}_0x3a6334=_[_0x2a42('0x49')]({},_0x3a6334,_0x35a248[_0x2a42('0x4c')]);return _0x36b8ae[_0x2a42('0x61')](_0x3a6334);}})['then'](function(_0x5203a6){if(_0x5203a6){_0x183b1b=_0x5203a6[_0x2a42('0x44')];if(!_0x35a248[_0x2a42('0x3e')][_0x2a42('0x45')]('nolimit')){_0x3a6334[_0x2a42('0x2d')]=qs['limit'](_0x35a248['query']['limit']);_0x3a6334['offset']=qs[_0x2a42('0x2e')](_0x35a248[_0x2a42('0x3e')][_0x2a42('0x2e')]);}return _0x36b8ae[_0x2a42('0x61')](_0x3a6334);}})['then'](function(_0x2e0ef7){if(_0x2e0ef7){return _0x2e0ef7?{'count':_0x183b1b,'rows':_0x2e0ef7}:null;}})['then'](respondWithResult(_0x76fd42,null))[_0x2a42('0x53')](handleError(_0x76fd42,null));};exports[_0x2a42('0x63')]=function(_0x19bae9,_0x506996,_0xf9822d){if(_0x19bae9[_0x2a42('0x58')]['id']){delete _0x19bae9['body']['id'];}return db[_0x2a42('0x4d')][_0x2a42('0x5e')]({'where':{'id':_0x19bae9[_0x2a42('0x55')]['id']}})[_0x2a42('0x1f')](handleEntityNotFound(_0x506996,null))['then'](function(_0x4106cc){if(_0x4106cc){return _0x4106cc[_0x2a42('0x63')](_0x19bae9[_0x2a42('0x58')][_0x2a42('0x64')]||[]);}return null;})[_0x2a42('0x1f')](respondWithResult(_0x506996,null))[_0x2a42('0x53')](handleError(_0x506996,null));}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.model.js b/server/api/intDeskConfiguration/intDeskConfiguration.model.js index 800f4f0..98635bb 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 _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 +var _0xcb40=['exports','define','DeskConfiguration','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskConfiguration.attributes'];(function(_0x4cb26a,_0x16bb49){var _0x12e181=function(_0x5c5619){while(--_0x5c5619){_0x4cb26a['push'](_0x4cb26a['shift']());}};_0x12e181(++_0x16bb49);}(_0xcb40,0x1d7));var _0x0cb4=function(_0x1dd3cb,_0x413b20){_0x1dd3cb=_0x1dd3cb-0x0;var _0x53fe87=_0xcb40[_0x1dd3cb];return _0x53fe87;};'use strict';var _=require('lodash');var util=require(_0x0cb4('0x0'));var logger=require('../../config/logger')(_0x0cb4('0x1'));var moment=require(_0x0cb4('0x2'));var BPromise=require(_0x0cb4('0x3'));var rp=require(_0x0cb4('0x4'));var fs=require('fs');var path=require(_0x0cb4('0x5'));var rimraf=require(_0x0cb4('0x6'));var config=require(_0x0cb4('0x7'));var attributes=require(_0x0cb4('0x8'));module[_0x0cb4('0x9')]=function(_0x599923,_0xcbe7a5){return _0x599923[_0x0cb4('0xa')](_0x0cb4('0xb'),attributes,{'tableName':'int_desk_configurations','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 3321e7d..0316a87 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 _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 +var _0xd4a2=['request','then','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','lodash','bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x1eb652,_0x2aa768){var _0x4f30dc=function(_0xf1276c){while(--_0xf1276c){_0x1eb652['push'](_0x1eb652['shift']());}};_0x4f30dc(++_0x2aa768);}(_0xd4a2,0x173));var _0x2d4a=function(_0x1c9e82,_0x6c9a91){_0x1c9e82=_0x1c9e82-0x0;var _0x57fad6=_0xd4a2[_0x1c9e82];return _0x57fad6;};'use strict';var _=require(_0x2d4a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x2d4a('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2d4a('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x2d4a('0x3'));var logger=require('../../config/logger')(_0x2d4a('0x4'));var config=require(_0x2d4a('0x5'));var jayson=require(_0x2d4a('0x6'));var client=jayson[_0x2d4a('0x7')][_0x2d4a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x57058f,_0x45fefb,_0x41b161){return new BPromise(function(_0x1f237e,_0x29597e){return client[_0x2d4a('0x9')](_0x57058f,_0x41b161)[_0x2d4a('0xa')](function(_0xb9f016){logger[_0x2d4a('0xb')](_0x2d4a('0xc'),_0x45fefb,_0x2d4a('0xd'));logger[_0x2d4a('0xe')](_0x2d4a('0xf'),_0x45fefb,'request\x20sent',JSON['stringify'](_0xb9f016));if(_0xb9f016[_0x2d4a('0x10')]){if(_0xb9f016['error'][_0x2d4a('0x11')]===0x1f4){logger[_0x2d4a('0x10')](_0x2d4a('0xc'),_0x45fefb,_0xb9f016[_0x2d4a('0x10')][_0x2d4a('0x12')]);return _0x29597e(_0xb9f016[_0x2d4a('0x10')][_0x2d4a('0x12')]);}logger[_0x2d4a('0x10')]('DeskConfiguration,\x20%s,\x20%s',_0x45fefb,_0xb9f016['error'][_0x2d4a('0x12')]);return _0x1f237e(_0xb9f016['error'][_0x2d4a('0x12')]);}else{logger[_0x2d4a('0xb')](_0x2d4a('0xc'),_0x45fefb,_0x2d4a('0xd'));_0x1f237e(_0xb9f016['result'][_0x2d4a('0x12')]);}})['catch'](function(_0x2838fa){logger['error'](_0x2d4a('0xc'),_0x45fefb,_0x2838fa);_0x29597e(_0x2838fa);});});} \ No newline at end of file diff --git a/server/api/intDeskField/index.js b/server/api/intDeskField/index.js index bcdeb04..2d5e166 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 _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 +var _0x14c7=['express','Router','../../components/auth/service','get','isAuthenticated','index','show','post','create','/:id','update','delete','destroy','exports','multer','util','path'];(function(_0x25efdf,_0x521462){var _0x22c495=function(_0x184469){while(--_0x184469){_0x25efdf['push'](_0x25efdf['shift']());}};_0x22c495(++_0x521462);}(_0x14c7,0x1d9));var _0x714c=function(_0x39ec24,_0x5833da){_0x39ec24=_0x39ec24-0x0;var _0x11d0ce=_0x14c7[_0x39ec24];return _0x11d0ce;};'use strict';var multer=require(_0x714c('0x0'));var util=require(_0x714c('0x1'));var path=require(_0x714c('0x2'));var timeout=require('connect-timeout');var express=require(_0x714c('0x3'));var router=express[_0x714c('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x714c('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intDeskField.controller');router[_0x714c('0x6')]('/',auth[_0x714c('0x7')](),controller[_0x714c('0x8')]);router[_0x714c('0x6')]('/:id',auth[_0x714c('0x7')](),controller[_0x714c('0x9')]);router[_0x714c('0xa')]('/',auth[_0x714c('0x7')](),controller[_0x714c('0xb')]);router['put'](_0x714c('0xc'),auth['isAuthenticated'](),controller[_0x714c('0xd')]);router[_0x714c('0xe')](_0x714c('0xc'),auth[_0x714c('0x7')](),controller[_0x714c('0xf')]);module[_0x714c('0x10')]=router; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.attributes.js b/server/api/intDeskField/intDeskField.attributes.js index 7b2711b..796526f 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 _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 +var _0x089e=['picklist','customVariable','STRING','sequelize','exports','ENUM','string','variable','keyValue'];(function(_0x133296,_0xe8ff9a){var _0x193517=function(_0x161ffd){while(--_0x161ffd){_0x133296['push'](_0x133296['shift']());}};_0x193517(++_0xe8ff9a);}(_0x089e,0xff));var _0xe089=function(_0x419a98,_0x32a539){_0x419a98=_0x419a98-0x0;var _0x5c0d96=_0x089e[_0x419a98];return _0x5c0d96;};'use strict';var Sequelize=require(_0xe089('0x0'));module[_0xe089('0x1')]={'type':{'type':Sequelize[_0xe089('0x2')](_0xe089('0x3'),_0xe089('0x4'),'customVariable',_0xe089('0x5'),_0xe089('0x6')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xe089('0x2')](_0xe089('0x3'),_0xe089('0x4'),_0xe089('0x7'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe089('0x8')]}}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.controller.js b/server/api/intDeskField/intDeskField.controller.js index d02b722..f752fc8 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 _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 +var _0x1602=['pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes','fields','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','fs-extra','lodash','squel','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','update','destroy','then','stack','name','send','map','DeskField','fieldName','type','key','model','keys','query','filters','intersection','attributes','length','order','sort','where'];(function(_0x517a14,_0x3a23aa){var _0x5d508c=function(_0xc1936d){while(--_0xc1936d){_0x517a14['push'](_0x517a14['shift']());}};_0x5d508c(++_0x3a23aa);}(_0x1602,0x135));var _0x2160=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1602[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x2160('0x0'));var rimraf=require(_0x2160('0x1'));var zipdir=require(_0x2160('0x2'));var jsonpatch=require(_0x2160('0x3'));var rp=require(_0x2160('0x4'));var moment=require(_0x2160('0x5'));var BPromise=require(_0x2160('0x6'));var Mustache=require(_0x2160('0x7'));var util=require(_0x2160('0x8'));var path=require(_0x2160('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2160('0xa'));var _=require(_0x2160('0xb'));var squel=require(_0x2160('0xc'));var crypto=require('crypto');var jsforce=require(_0x2160('0xd'));var deskjs=require(_0x2160('0xe'));var toCsv=require(_0x2160('0xf'));var querystring=require('querystring');var Papa=require(_0x2160('0x10'));var Redis=require('ioredis');var authService=require(_0x2160('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x2160('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x2160('0x13'));var utils=require(_0x2160('0x14'));var config=require(_0x2160('0x15'));var licenseUtil=require(_0x2160('0x16'));var db=require(_0x2160('0x17'))['db'];function respondWithStatusCode(_0x26ac20,_0x35de77){_0x35de77=_0x35de77||0xcc;return function(_0x23a5ec){if(_0x23a5ec){return _0x26ac20[_0x2160('0x18')](_0x35de77);}return _0x26ac20[_0x2160('0x19')](_0x35de77)[_0x2160('0x1a')]();};}function respondWithResult(_0xc37a45,_0x5a227f){_0x5a227f=_0x5a227f||0xc8;return function(_0x56f61a){if(_0x56f61a){return _0xc37a45[_0x2160('0x19')](_0x5a227f)[_0x2160('0x1b')](_0x56f61a);}};}function respondWithFilteredResult(_0xff6bc5,_0x1037ed){return function(_0x35615c){if(_0x35615c){var _0x55eba5=typeof _0x1037ed[_0x2160('0x1c')]===_0x2160('0x1d')&&typeof _0x1037ed[_0x2160('0x1e')]==='undefined';var _0x1233d0=_0x35615c[_0x2160('0x1f')];var _0x429529=_0x55eba5?0x0:_0x1037ed[_0x2160('0x1c')];var _0x31aded=_0x55eba5?_0x35615c[_0x2160('0x1f')]:_0x1037ed[_0x2160('0x1c')]+_0x1037ed[_0x2160('0x1e')];var _0x24c804;if(_0x31aded>=_0x1233d0){_0x31aded=_0x1233d0;_0x24c804=0xc8;}else{_0x24c804=0xce;}_0xff6bc5[_0x2160('0x19')](_0x24c804);return _0xff6bc5[_0x2160('0x20')]('Content-Range',_0x429529+'-'+_0x31aded+'/'+_0x1233d0)[_0x2160('0x1b')](_0x35615c);}return null;};}function patchUpdates(_0x41bee8){return function(_0x1fcdfe){try{jsonpatch[_0x2160('0x21')](_0x1fcdfe,_0x41bee8,!![]);}catch(_0x1cf553){return BPromise[_0x2160('0x22')](_0x1cf553);}return _0x1fcdfe['save']();};}function saveUpdates(_0x5a67ac,_0x1a9f5e){return function(_0x23957e){if(_0x23957e){return _0x23957e[_0x2160('0x23')](_0x5a67ac)['then'](function(_0x17fea4){return _0x17fea4;});}return null;};}function removeEntity(_0x430fda,_0x25ea6b){return function(_0x365fe8){if(_0x365fe8){return _0x365fe8[_0x2160('0x24')]()[_0x2160('0x25')](function(){_0x430fda['status'](0xcc)[_0x2160('0x1a')]();});}};}function handleEntityNotFound(_0x3a8033,_0x11a429){return function(_0x2f4c70){if(!_0x2f4c70){_0x3a8033['sendStatus'](0x194);}return _0x2f4c70;};}function handleError(_0x48028d,_0xa6729f){_0xa6729f=_0xa6729f||0x1f4;return function(_0x501eb9){logger['error'](_0x501eb9[_0x2160('0x26')]);if(_0x501eb9[_0x2160('0x27')]){delete _0x501eb9['name'];}_0x48028d['status'](_0xa6729f)[_0x2160('0x28')](_0x501eb9);};}exports['index']=function(_0x443e8c,_0x396539){var _0x483fcb={},_0x13bdee={},_0x2a525e={'count':0x0,'rows':[]};var _0x558797=_[_0x2160('0x29')](db[_0x2160('0x2a')]['rawAttributes'],function(_0x3f17fa){return{'name':_0x3f17fa[_0x2160('0x2b')],'type':_0x3f17fa[_0x2160('0x2c')][_0x2160('0x2d')]};});_0x13bdee[_0x2160('0x2e')]=_['map'](_0x558797,_0x2160('0x27'));_0x13bdee['query']=_[_0x2160('0x2f')](_0x443e8c[_0x2160('0x30')]);_0x13bdee[_0x2160('0x31')]=_[_0x2160('0x32')](_0x13bdee[_0x2160('0x2e')],_0x13bdee[_0x2160('0x30')]);_0x483fcb[_0x2160('0x33')]=_[_0x2160('0x32')](_0x13bdee['model'],qs['fields'](_0x443e8c['query']['fields']));_0x483fcb[_0x2160('0x33')]=_0x483fcb[_0x2160('0x33')][_0x2160('0x34')]?_0x483fcb['attributes']:_0x13bdee['model'];if(!_0x443e8c[_0x2160('0x30')]['hasOwnProperty']('nolimit')){_0x483fcb[_0x2160('0x1e')]=qs[_0x2160('0x1e')](_0x443e8c[_0x2160('0x30')][_0x2160('0x1e')]);_0x483fcb[_0x2160('0x1c')]=qs[_0x2160('0x1c')](_0x443e8c[_0x2160('0x30')][_0x2160('0x1c')]);}_0x483fcb[_0x2160('0x35')]=qs[_0x2160('0x36')](_0x443e8c[_0x2160('0x30')]['sort']);_0x483fcb[_0x2160('0x37')]=qs[_0x2160('0x31')](_[_0x2160('0x38')](_0x443e8c[_0x2160('0x30')],_0x13bdee[_0x2160('0x31')]),_0x558797);if(_0x443e8c['query']['filter']){_0x483fcb['where']=_['merge'](_0x483fcb[_0x2160('0x37')],{'$or':_[_0x2160('0x29')](_0x558797,function(_0x259471){if(_0x259471[_0x2160('0x2c')]!==_0x2160('0x39')){var _0xb4245e={};_0xb4245e[_0x259471[_0x2160('0x27')]]={'$like':'%'+_0x443e8c[_0x2160('0x30')][_0x2160('0x3a')]+'%'};return _0xb4245e;}})});}_0x483fcb=_[_0x2160('0x3b')]({},_0x483fcb,_0x443e8c[_0x2160('0x3c')]);var _0x3a18cd={'where':_0x483fcb[_0x2160('0x37')]};return db['DeskField'][_0x2160('0x1f')](_0x3a18cd)[_0x2160('0x25')](function(_0x6bfcc){_0x2a525e[_0x2160('0x1f')]=_0x6bfcc;if(_0x443e8c['query'][_0x2160('0x3d')]){_0x483fcb[_0x2160('0x3e')]=[{'all':!![]}];}return db[_0x2160('0x2a')][_0x2160('0x3f')](_0x483fcb);})[_0x2160('0x25')](function(_0x5b494e){_0x2a525e[_0x2160('0x40')]=_0x5b494e;return _0x2a525e;})[_0x2160('0x25')](respondWithFilteredResult(_0x396539,_0x483fcb))[_0x2160('0x41')](handleError(_0x396539,null));};exports[_0x2160('0x42')]=function(_0x5a7ebb,_0x53fb8c){var _0x48b908={'raw':!![],'where':{'id':_0x5a7ebb['params']['id']}},_0x2c2586={};_0x2c2586[_0x2160('0x2e')]=_[_0x2160('0x2f')](db[_0x2160('0x2a')][_0x2160('0x43')]);_0x2c2586[_0x2160('0x30')]=_[_0x2160('0x2f')](_0x5a7ebb[_0x2160('0x30')]);_0x2c2586[_0x2160('0x31')]=_[_0x2160('0x32')](_0x2c2586[_0x2160('0x2e')],_0x2c2586[_0x2160('0x30')]);_0x48b908[_0x2160('0x33')]=_[_0x2160('0x32')](_0x2c2586[_0x2160('0x2e')],qs[_0x2160('0x44')](_0x5a7ebb['query'][_0x2160('0x44')]));_0x48b908['attributes']=_0x48b908[_0x2160('0x33')]['length']?_0x48b908[_0x2160('0x33')]:_0x2c2586[_0x2160('0x2e')];if(_0x5a7ebb[_0x2160('0x30')]['includeAll']){_0x48b908['include']=[{'all':!![]}];}_0x48b908=_[_0x2160('0x3b')]({},_0x48b908,_0x5a7ebb[_0x2160('0x3c')]);return db['DeskField'][_0x2160('0x45')](_0x48b908)['then'](handleEntityNotFound(_0x53fb8c,null))[_0x2160('0x25')](respondWithResult(_0x53fb8c,null))['catch'](handleError(_0x53fb8c,null));};exports[_0x2160('0x46')]=function(_0x587fd6,_0x16c091){return db[_0x2160('0x2a')][_0x2160('0x46')](_0x587fd6[_0x2160('0x47')],{})[_0x2160('0x25')](respondWithResult(_0x16c091,0xc9))[_0x2160('0x41')](handleError(_0x16c091,null));};exports[_0x2160('0x23')]=function(_0x41828e,_0x450f8f){if(_0x41828e[_0x2160('0x47')]['id']){delete _0x41828e[_0x2160('0x47')]['id'];}return db[_0x2160('0x2a')]['find']({'where':{'id':_0x41828e[_0x2160('0x48')]['id']}})[_0x2160('0x25')](handleEntityNotFound(_0x450f8f,null))['then'](saveUpdates(_0x41828e[_0x2160('0x47')],null))['then'](respondWithResult(_0x450f8f,null))[_0x2160('0x41')](handleError(_0x450f8f,null));};exports['destroy']=function(_0x1f9060,_0x5a78f1){return db[_0x2160('0x2a')]['find']({'where':{'id':_0x1f9060[_0x2160('0x48')]['id']}})[_0x2160('0x25')](handleEntityNotFound(_0x5a78f1,null))['then'](removeEntity(_0x5a78f1,null))[_0x2160('0x41')](handleError(_0x5a78f1,null));}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.model.js b/server/api/intDeskField/intDeskField.model.js index 772383c..3e40a42 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 _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 +var _0x41ba=['util','../../config/logger','api','moment','bluebird','request-promise','path','./intDeskField.attributes','exports','DeskField','int_desk_fields','desk_unique_index','idField','FieldId','lodash'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x41ba,0x1ee));var _0xa41b=function(_0x58064d,_0x54919a){_0x58064d=_0x58064d-0x0;var _0x267189=_0x41ba[_0x58064d];return _0x267189;};'use strict';var _=require(_0xa41b('0x0'));var util=require(_0xa41b('0x1'));var logger=require(_0xa41b('0x2'))(_0xa41b('0x3'));var moment=require(_0xa41b('0x4'));var BPromise=require(_0xa41b('0x5'));var rp=require(_0xa41b('0x6'));var fs=require('fs');var path=require(_0xa41b('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa41b('0x8'));module[_0xa41b('0x9')]=function(_0x3c14c7,_0xa605ac){return _0x3c14c7['define'](_0xa41b('0xa'),attributes,{'tableName':_0xa41b('0xb'),'paranoid':![],'indexes':[{'name':_0xa41b('0xc'),'fields':[_0xa41b('0xd'),_0xa41b('0xe')],'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 a58b676..eea86cf 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 _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 +var _0xa3f4=['randomstring','../../mysqldb','rpc','jayson/promise','http','request','info','DeskField,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird'];(function(_0x593d56,_0x10d793){var _0xb1c92c=function(_0x25f720){while(--_0x25f720){_0x593d56['push'](_0x593d56['shift']());}};_0xb1c92c(++_0x10d793);}(_0xa3f4,0x1ea));var _0x4a3f=function(_0x431e85,_0x941ba8){_0x431e85=_0x431e85-0x0;var _0x5532d4=_0xa3f4[_0x431e85];return _0x5532d4;};'use strict';var _=require(_0x4a3f('0x0'));var util=require(_0x4a3f('0x1'));var moment=require(_0x4a3f('0x2'));var BPromise=require(_0x4a3f('0x3'));var rs=require(_0x4a3f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4a3f('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4a3f('0x6'));var config=require('../../config/environment');var jayson=require(_0x4a3f('0x7'));var client=jayson['client'][_0x4a3f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x16d25d,_0x38190e,_0x1abf12){return new BPromise(function(_0x589882,_0x2eb41c){return client[_0x4a3f('0x9')](_0x16d25d,_0x1abf12)['then'](function(_0x535d33){logger[_0x4a3f('0xa')](_0x4a3f('0xb'),_0x38190e,'request\x20sent');logger[_0x4a3f('0xc')]('DeskField,\x20%s,\x20%s,\x20%s',_0x38190e,_0x4a3f('0xd'),JSON[_0x4a3f('0xe')](_0x535d33));if(_0x535d33[_0x4a3f('0xf')]){if(_0x535d33['error']['code']===0x1f4){logger[_0x4a3f('0xf')](_0x4a3f('0xb'),_0x38190e,_0x535d33[_0x4a3f('0xf')][_0x4a3f('0x10')]);return _0x2eb41c(_0x535d33[_0x4a3f('0xf')][_0x4a3f('0x10')]);}logger[_0x4a3f('0xf')](_0x4a3f('0xb'),_0x38190e,_0x535d33[_0x4a3f('0xf')]['message']);return _0x589882(_0x535d33[_0x4a3f('0xf')][_0x4a3f('0x10')]);}else{logger[_0x4a3f('0xa')](_0x4a3f('0xb'),_0x38190e,_0x4a3f('0xd'));_0x589882(_0x535d33[_0x4a3f('0x11')][_0x4a3f('0x10')]);}})[_0x4a3f('0x12')](function(_0x58886d){logger['error'](_0x4a3f('0xb'),_0x38190e,_0x58886d);_0x2eb41c(_0x58886d);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/index.js b/server/api/intDynamics365Account/index.js index 09c7d8d..ae068d0 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 _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 +var _0x10e7=['/:id','isAuthenticated','/:id/configurations','getFields','post','create','addConfiguration','update','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intDynamics365Account.controller','get','index'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x10e7,0x1c2));var _0x710e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x10e7[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x710e('0x0'));var util=require(_0x710e('0x1'));var path=require(_0x710e('0x2'));var timeout=require(_0x710e('0x3'));var express=require(_0x710e('0x4'));var router=express[_0x710e('0x5')]();var fs_extra=require(_0x710e('0x6'));var auth=require(_0x710e('0x7'));var interaction=require(_0x710e('0x8'));var config=require('../../config/environment');var controller=require(_0x710e('0x9'));router[_0x710e('0xa')]('/',auth['isAuthenticated'](),controller[_0x710e('0xb')]);router[_0x710e('0xa')](_0x710e('0xc'),auth[_0x710e('0xd')](),controller['show']);router['get'](_0x710e('0xe'),auth['isAuthenticated'](),controller['getConfigurations']);router['get']('/:id/fields',auth[_0x710e('0xd')](),controller[_0x710e('0xf')]);router[_0x710e('0x10')]('/',auth['isAuthenticated'](),controller[_0x710e('0x11')]);router['post'](_0x710e('0xe'),auth[_0x710e('0xd')](),controller[_0x710e('0x12')]);router['put'](_0x710e('0xc'),auth['isAuthenticated'](),controller[_0x710e('0x13')]);router[_0x710e('0x14')](_0x710e('0xc'),auth[_0x710e('0xd')](),controller[_0x710e('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.attributes.js b/server/api/intDynamics365Account/intDynamics365Account.attributes.js index 86ebbb4..eb39bb1 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 _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 +var _0x4433=['STRING','sequelize'];(function(_0x557f5f,_0x31d8e7){var _0x196eba=function(_0x433d89){while(--_0x433d89){_0x557f5f['push'](_0x557f5f['shift']());}};_0x196eba(++_0x31d8e7);}(_0x4433,0x11b));var _0x3443=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x4433[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x3443('0x0'));module['exports']={'name':{'type':Sequelize[_0x3443('0x1')]},'username':{'type':Sequelize[_0x3443('0x1')]},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x3443('0x1')]},'tenantId':{'type':Sequelize[_0x3443('0x1')]},'clientId':{'type':Sequelize[_0x3443('0x1')]},'clientSecret':{'type':Sequelize[_0x3443('0x1')]},'serverUrl':{'type':Sequelize[_0x3443('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x3443('0x1')]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.controller.js b/server/api/intDynamics365Account/intDynamics365Account.controller.js index a3aa029..a33d77b 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 _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 +var _0x759a=['UserLocalizedLabel','Value',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption','false',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','DisplayName','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','ejs','fs-extra','lodash','squel','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/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','end','name','send','index','map','Dynamics365Account','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','params','rawAttributes','find','create','body','destroy','getConfigurations','findOne','Dynamics365Configuration','AccountId','Subjects','getSubjects','channel','getDescriptions','Dynamics365Field','Descriptions','getFields','ticketType','incident','Incident','PhoneCall','title','description','customerid','caseorigincode','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyyominame','createdon','customeridname','customeridtype','customeridyominame','emailaddress','entitlementidname','entityimage_timestamp','escalatedon','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','kbarticleidname','masteridname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedon','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','onholdtime','overriddencreatedon','owneridtype','owneridyominame','parentcaseidname','primarycontactidname','prioritycodename','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','slaname','socialprofileidname','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','utcconversiontimezonecode','versionnumber','concat','tenantId','clientId','clientSecret','remoteUri','substring','lastIndexOf','%s/api/data/v9.0/','POST','https://login.microsoftonline.com/','password','access_token','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value','MetadataId','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','includes','LogicalName','forEach','@odata.type','PicklistAttributeMetadata','push','all','StringAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','StatusAttributeMetadata','StateAttributeMetadata','statusCode','test','Wrong\x20credentials',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','OptionSet','Options','Label'];(function(_0x29186d,_0x278107){var _0x3bbef5=function(_0x30a435){while(--_0x30a435){_0x29186d['push'](_0x29186d['shift']());}};_0x3bbef5(++_0x278107);}(_0x759a,0x1c0));var _0xa759=function(_0x103c15,_0x2304e0){_0x103c15=_0x103c15-0x0;var _0x563c43=_0x759a[_0x103c15];return _0x563c43;};'use strict';var emlformat=require(_0xa759('0x0'));var rimraf=require(_0xa759('0x1'));var zipdir=require(_0xa759('0x2'));var jsonpatch=require(_0xa759('0x3'));var rp=require(_0xa759('0x4'));var moment=require(_0xa759('0x5'));var BPromise=require(_0xa759('0x6'));var Mustache=require(_0xa759('0x7'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xa759('0x8'));var fs=require('fs');var fs_extra=require(_0xa759('0x9'));var _=require(_0xa759('0xa'));var squel=require(_0xa759('0xb'));var crypto=require(_0xa759('0xc'));var jsforce=require(_0xa759('0xd'));var deskjs=require(_0xa759('0xe'));var toCsv=require(_0xa759('0xf'));var querystring=require(_0xa759('0x10'));var Papa=require(_0xa759('0x11'));var Redis=require(_0xa759('0x12'));var authService=require(_0xa759('0x13'));var qs=require(_0xa759('0x14'));var as=require(_0xa759('0x15'));var hardwareService=require(_0xa759('0x16'));var logger=require(_0xa759('0x17'))(_0xa759('0x18'));var utils=require(_0xa759('0x19'));var config=require(_0xa759('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xa759('0x1b'))['db'];var integrations=require(_0xa759('0x1c'));var jayson=require(_0xa759('0x1d'));var client=jayson[_0xa759('0x1e')][_0xa759('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x3553cc,_0x47917e,_0xb03673,_0x2e39d7){return new BPromise(function(_0x2babce,_0x2ad142){var _0x37f18c=_0x2e39d7||client;return _0x37f18c[_0xa759('0x20')](_0x3553cc,_0xb03673)[_0xa759('0x21')](function(_0x520657){logger[_0xa759('0x22')](_0xa759('0x23'),_0x47917e,_0xa759('0x24'));logger[_0xa759('0x25')](_0xa759('0x26'),_0x47917e,'request\x20sent',JSON[_0xa759('0x27')](_0x520657));if(_0x520657[_0xa759('0x28')]){if(_0x520657['error'][_0xa759('0x29')]===0x1f4){logger['error'](_0xa759('0x23'),_0x47917e,_0x520657[_0xa759('0x28')][_0xa759('0x2a')]);return _0x2ad142(_0x520657[_0xa759('0x28')][_0xa759('0x2a')]);}logger['error'](_0xa759('0x23'),_0x47917e,_0x520657[_0xa759('0x28')]['message']);return _0x2babce(_0x520657[_0xa759('0x28')][_0xa759('0x2a')]);}else{logger['info']('Dynamics365Account,\x20%s,\x20%s',_0x47917e,_0xa759('0x24'));_0x2babce(_0x520657['result'][_0xa759('0x2a')]);}})['catch'](function(_0x5996bc){logger[_0xa759('0x28')]('Dynamics365Account,\x20%s,\x20%s',_0x47917e,_0x5996bc);_0x2ad142(_0x5996bc);});});}function respondWithStatusCode(_0x464fae,_0x5323ca){_0x5323ca=_0x5323ca||0xcc;return function(_0x121c1b){if(_0x121c1b){return _0x464fae[_0xa759('0x2b')](_0x5323ca);}return _0x464fae[_0xa759('0x2c')](_0x5323ca)['end']();};}function respondWithResult(_0x4a68b4,_0x463ec8){_0x463ec8=_0x463ec8||0xc8;return function(_0x55cf81){if(_0x55cf81){return _0x4a68b4[_0xa759('0x2c')](_0x463ec8)[_0xa759('0x2d')](_0x55cf81);}};}function respondWithFilteredResult(_0x6f3e5a,_0x4fc9f6){return function(_0x2b9ce3){if(_0x2b9ce3){var _0x5b6e57=typeof _0x4fc9f6[_0xa759('0x2e')]===_0xa759('0x2f')&&typeof _0x4fc9f6[_0xa759('0x30')]===_0xa759('0x2f');var _0x399382=_0x2b9ce3[_0xa759('0x31')];var _0x5eb3df=_0x5b6e57?0x0:_0x4fc9f6[_0xa759('0x2e')];var _0x40229f=_0x5b6e57?_0x2b9ce3['count']:_0x4fc9f6['offset']+_0x4fc9f6[_0xa759('0x30')];var _0xa5c2b1;if(_0x40229f>=_0x399382){_0x40229f=_0x399382;_0xa5c2b1=0xc8;}else{_0xa5c2b1=0xce;}_0x6f3e5a[_0xa759('0x2c')](_0xa5c2b1);return _0x6f3e5a['set'](_0xa759('0x32'),_0x5eb3df+'-'+_0x40229f+'/'+_0x399382)[_0xa759('0x2d')](_0x2b9ce3);}return null;};}function patchUpdates(_0x2cc3a3){return function(_0x4e45e9){try{jsonpatch[_0xa759('0x33')](_0x4e45e9,_0x2cc3a3,!![]);}catch(_0x5ef632){return BPromise[_0xa759('0x34')](_0x5ef632);}return _0x4e45e9[_0xa759('0x35')]();};}function saveUpdates(_0x3228b0,_0x24a0e2){return function(_0x552185){if(_0x552185){return _0x552185[_0xa759('0x36')](_0x3228b0)[_0xa759('0x21')](function(_0x31719c){return _0x31719c;});}return null;};}function removeEntity(_0x65085a,_0x37d410){return function(_0xcfbb88){if(_0xcfbb88){return _0xcfbb88['destroy']()[_0xa759('0x21')](function(){_0x65085a[_0xa759('0x2c')](0xcc)[_0xa759('0x37')]();});}};}function handleEntityNotFound(_0x4604d7,_0x23a4d4){return function(_0xb48c89){if(!_0xb48c89){_0x4604d7['sendStatus'](0x194);}return _0xb48c89;};}function handleError(_0x1d4c99,_0x441503){_0x441503=_0x441503||0x1f4;return function(_0x53d4a3){logger['error'](_0x53d4a3['stack']);if(_0x53d4a3[_0xa759('0x38')]){delete _0x53d4a3[_0xa759('0x38')];}_0x1d4c99[_0xa759('0x2c')](_0x441503)[_0xa759('0x39')](_0x53d4a3);};}exports[_0xa759('0x3a')]=function(_0x2ec1a4,_0x242d45){var _0x178e99={},_0x483c4d={},_0x23209b={'count':0x0,'rows':[]};var _0x4d8e49=_[_0xa759('0x3b')](db[_0xa759('0x3c')]['rawAttributes'],function(_0x3be9df){return{'name':_0x3be9df[_0xa759('0x3d')],'type':_0x3be9df[_0xa759('0x3e')][_0xa759('0x3f')]};});_0x483c4d[_0xa759('0x40')]=_['map'](_0x4d8e49,_0xa759('0x38'));_0x483c4d[_0xa759('0x41')]=_[_0xa759('0x42')](_0x2ec1a4['query']);_0x483c4d[_0xa759('0x43')]=_[_0xa759('0x44')](_0x483c4d['model'],_0x483c4d['query']);_0x178e99[_0xa759('0x45')]=_[_0xa759('0x44')](_0x483c4d[_0xa759('0x40')],qs[_0xa759('0x46')](_0x2ec1a4['query'][_0xa759('0x46')]));_0x178e99[_0xa759('0x45')]=_0x178e99[_0xa759('0x45')][_0xa759('0x47')]?_0x178e99['attributes']:_0x483c4d['model'];if(!_0x2ec1a4[_0xa759('0x41')][_0xa759('0x48')](_0xa759('0x49'))){_0x178e99[_0xa759('0x30')]=qs[_0xa759('0x30')](_0x2ec1a4[_0xa759('0x41')][_0xa759('0x30')]);_0x178e99[_0xa759('0x2e')]=qs[_0xa759('0x2e')](_0x2ec1a4[_0xa759('0x41')]['offset']);}_0x178e99[_0xa759('0x4a')]=qs[_0xa759('0x4b')](_0x2ec1a4[_0xa759('0x41')]['sort']);_0x178e99[_0xa759('0x4c')]=qs['filters'](_['pick'](_0x2ec1a4[_0xa759('0x41')],_0x483c4d[_0xa759('0x43')]),_0x4d8e49);if(_0x2ec1a4[_0xa759('0x41')][_0xa759('0x4d')]){_0x178e99[_0xa759('0x4c')]=_[_0xa759('0x4e')](_0x178e99[_0xa759('0x4c')],{'$or':_[_0xa759('0x3b')](_0x4d8e49,function(_0x32fd83){if(_0x32fd83[_0xa759('0x3e')]!==_0xa759('0x4f')){var _0x3e5ac9={};_0x3e5ac9[_0x32fd83['name']]={'$like':'%'+_0x2ec1a4[_0xa759('0x41')][_0xa759('0x4d')]+'%'};return _0x3e5ac9;}})});}_0x178e99=_[_0xa759('0x4e')]({},_0x178e99,_0x2ec1a4[_0xa759('0x50')]);var _0x155a1c={'where':_0x178e99[_0xa759('0x4c')]};return db[_0xa759('0x3c')]['count'](_0x155a1c)[_0xa759('0x21')](function(_0x4a4768){_0x23209b[_0xa759('0x31')]=_0x4a4768;if(_0x2ec1a4[_0xa759('0x41')][_0xa759('0x51')]){_0x178e99[_0xa759('0x52')]=[{'all':!![]}];}return db[_0xa759('0x3c')]['findAll'](_0x178e99);})['then'](function(_0x2cb11b){_0x23209b[_0xa759('0x53')]=_0x2cb11b;return _0x23209b;})['then'](respondWithFilteredResult(_0x242d45,_0x178e99))[_0xa759('0x54')](handleError(_0x242d45,null));};exports['show']=function(_0x2aa840,_0x38f514){var _0x175eec={'raw':![],'where':{'id':_0x2aa840[_0xa759('0x55')]['id']}},_0x56d891={};_0x56d891['model']=_[_0xa759('0x42')](db[_0xa759('0x3c')][_0xa759('0x56')]);_0x56d891[_0xa759('0x41')]=_['keys'](_0x2aa840[_0xa759('0x41')]);_0x56d891[_0xa759('0x43')]=_[_0xa759('0x44')](_0x56d891[_0xa759('0x40')],_0x56d891[_0xa759('0x41')]);_0x175eec[_0xa759('0x45')]=_['intersection'](_0x56d891[_0xa759('0x40')],qs[_0xa759('0x46')](_0x2aa840[_0xa759('0x41')][_0xa759('0x46')]));_0x175eec['attributes']=_0x175eec[_0xa759('0x45')][_0xa759('0x47')]?_0x175eec[_0xa759('0x45')]:_0x56d891[_0xa759('0x40')];if(_0x2aa840[_0xa759('0x41')]['includeAll']){_0x175eec[_0xa759('0x52')]=[{'all':!![]}];}_0x175eec=_[_0xa759('0x4e')]({},_0x175eec,_0x2aa840[_0xa759('0x50')]);return db[_0xa759('0x3c')][_0xa759('0x57')](_0x175eec)['then'](handleEntityNotFound(_0x38f514,null))[_0xa759('0x21')](respondWithResult(_0x38f514,null))[_0xa759('0x54')](handleError(_0x38f514,null));};exports['create']=function(_0x195213,_0x134a02){return db['Dynamics365Account'][_0xa759('0x58')](_0x195213[_0xa759('0x59')],{})[_0xa759('0x21')](respondWithResult(_0x134a02,0xc9))[_0xa759('0x54')](handleError(_0x134a02,null));};exports[_0xa759('0x36')]=function(_0x19d433,_0x67789){if(_0x19d433[_0xa759('0x59')]['id']){delete _0x19d433[_0xa759('0x59')]['id'];}return db[_0xa759('0x3c')][_0xa759('0x57')]({'where':{'id':_0x19d433[_0xa759('0x55')]['id']}})[_0xa759('0x21')](handleEntityNotFound(_0x67789,null))[_0xa759('0x21')](saveUpdates(_0x19d433[_0xa759('0x59')],null))[_0xa759('0x21')](respondWithResult(_0x67789,null))['catch'](handleError(_0x67789,null));};exports[_0xa759('0x5a')]=function(_0x4538ec,_0x404be0){return db['Dynamics365Account'][_0xa759('0x57')]({'where':{'id':_0x4538ec[_0xa759('0x55')]['id']}})[_0xa759('0x21')](handleEntityNotFound(_0x404be0,null))[_0xa759('0x21')](removeEntity(_0x404be0,null))[_0xa759('0x54')](handleError(_0x404be0,null));};exports[_0xa759('0x5b')]=function(_0x17d15e,_0x650311,_0x1f47eb){var _0x2deecf={};var _0x1b9d23={};var _0x1db974;var _0x4ca72e;return db[_0xa759('0x3c')][_0xa759('0x5c')]({'where':{'id':_0x17d15e['params']['id']}})[_0xa759('0x21')](handleEntityNotFound(_0x650311,null))['then'](function(_0x41b01f){if(_0x41b01f){_0x1db974=_0x41b01f;_0x1b9d23[_0xa759('0x40')]=_[_0xa759('0x42')](db[_0xa759('0x5d')][_0xa759('0x56')]);_0x1b9d23[_0xa759('0x41')]=_[_0xa759('0x42')](_0x17d15e[_0xa759('0x41')]);_0x1b9d23[_0xa759('0x43')]=_[_0xa759('0x44')](_0x1b9d23[_0xa759('0x40')],_0x1b9d23[_0xa759('0x41')]);_0x2deecf[_0xa759('0x45')]=_[_0xa759('0x44')](_0x1b9d23['model'],qs[_0xa759('0x46')](_0x17d15e['query']['fields']));_0x2deecf[_0xa759('0x45')]=_0x2deecf['attributes'][_0xa759('0x47')]?_0x2deecf['attributes']:_0x1b9d23[_0xa759('0x40')];_0x2deecf[_0xa759('0x4a')]=qs['sort'](_0x17d15e[_0xa759('0x41')][_0xa759('0x4b')]);_0x2deecf[_0xa759('0x4c')]=qs[_0xa759('0x43')](_['pick'](_0x17d15e[_0xa759('0x41')],_0x1b9d23[_0xa759('0x43')]));if(_0x17d15e['query'][_0xa759('0x4d')]){_0x2deecf[_0xa759('0x4c')]=_['merge'](_0x2deecf[_0xa759('0x4c')],{'$or':_['map'](_0x2deecf[_0xa759('0x45')],function(_0x1ac8bc){var _0x2589c8={};_0x2589c8[_0x1ac8bc]={'$like':'%'+_0x17d15e[_0xa759('0x41')][_0xa759('0x4d')]+'%'};return _0x2589c8;})});}_0x2deecf=_['merge']({},_0x2deecf,_0x17d15e['options']);return _0x1db974[_0xa759('0x5b')](_0x2deecf);}})['then'](function(_0x5130c3){if(_0x5130c3){_0x4ca72e=_0x5130c3[_0xa759('0x47')];if(!_0x17d15e[_0xa759('0x41')][_0xa759('0x48')](_0xa759('0x49'))){_0x2deecf[_0xa759('0x30')]=qs['limit'](_0x17d15e[_0xa759('0x41')]['limit']);_0x2deecf[_0xa759('0x2e')]=qs['offset'](_0x17d15e[_0xa759('0x41')][_0xa759('0x2e')]);}return _0x1db974[_0xa759('0x5b')](_0x2deecf);}})[_0xa759('0x21')](function(_0x4d7530){if(_0x4d7530){return _0x4d7530?{'count':_0x4ca72e,'rows':_0x4d7530}:null;}})[_0xa759('0x21')](respondWithResult(_0x650311,null))[_0xa759('0x54')](handleError(_0x650311,null));};exports['addConfiguration']=function(_0x59f74c,_0x699d5b,_0x48bca8){if(_0x59f74c[_0xa759('0x59')]['id']){delete _0x59f74c[_0xa759('0x59')]['id'];}return db[_0xa759('0x3c')][_0xa759('0x5c')]({'where':{'id':_0x59f74c['params']['id']}})[_0xa759('0x21')](handleEntityNotFound(_0x699d5b,null))[_0xa759('0x21')](function(_0x21f5e2){if(_0x21f5e2){_0x59f74c['body'][_0xa759('0x5e')]=_0x21f5e2['id'];_0x59f74c['body'][_0xa759('0x5f')]=integrations[_0xa759('0x60')](_0x59f74c['body'][_0xa759('0x61')],_0x59f74c[_0xa759('0x59')][_0xa759('0x3e')]);_0x59f74c[_0xa759('0x59')]['Descriptions']=integrations[_0xa759('0x62')](_0x59f74c[_0xa759('0x59')][_0xa759('0x61')],_0x59f74c[_0xa759('0x59')][_0xa759('0x3e')]);return db['Dynamics365Configuration'][_0xa759('0x58')](_0x59f74c[_0xa759('0x59')],{'include':[{'model':db[_0xa759('0x63')],'as':_0xa759('0x5f')},{'model':db['Dynamics365Field'],'as':_0xa759('0x64')}]});}return null;})[_0xa759('0x21')](respondWithResult(_0x699d5b,null))[_0xa759('0x54')](handleError(_0x699d5b,null));};exports[_0xa759('0x65')]=function(_0x48a5a5,_0x2e47ce,_0x5bf333){var _0x47536a=_0x48a5a5[_0xa759('0x41')][_0xa759('0x66')];var _0x1d88cc=_0x47536a===_0xa759('0x67')?_0xa759('0x68'):_0xa759('0x69');var _0x1416b7='';var _0x37cf44='';var _0x29c70a='';var _0x14f206='';var _0x44eaa8='';var _0x5bcf47='';var _0x586803='';var _0x5deb29='';var _0x186f43=[_0xa759('0x6a'),_0xa759('0x6b'),_0xa759('0x6c'),'ownerid',_0xa759('0x6d'),'subject',_0xa759('0x6e'),_0xa759('0x6f'),_0xa759('0x70'),_0xa759('0x71')];var _0x405a60=[_0xa759('0x72'),_0xa759('0x73'),'actualserviceunits',_0xa759('0x74'),_0xa759('0x75'),_0xa759('0x76'),_0xa759('0x77'),_0xa759('0x78'),_0xa759('0x79'),_0xa759('0x7a'),'createdbyname',_0xa759('0x7b'),_0xa759('0x7c'),'createdonbehalfbyname','createdonbehalfbyyominame',_0xa759('0x7d'),_0xa759('0x7e'),_0xa759('0x7f'),_0xa759('0x80'),_0xa759('0x81'),_0xa759('0x82'),'entityimage_url',_0xa759('0x83'),_0xa759('0x84'),_0xa759('0x85'),_0xa759('0x86'),_0xa759('0x87'),'influencescore',_0xa759('0x88'),'lastonholdtime',_0xa759('0x89'),'modifiedbyexternalpartyname',_0xa759('0x8a'),_0xa759('0x8b'),_0xa759('0x8c'),_0xa759('0x8d'),'modifiedonbehalfbyname',_0xa759('0x8e'),_0xa759('0x8f'),_0xa759('0x90'),_0xa759('0x91'),_0xa759('0x92'),_0xa759('0x93'),'owneridname',_0xa759('0x94'),_0xa759('0x95'),_0xa759('0x96'),_0xa759('0x97'),'primarycontactidyominame',_0xa759('0x98'),'productidname','productserialnumber',_0xa759('0x99'),_0xa759('0x9a'),_0xa759('0x9b'),_0xa759('0x9c'),_0xa759('0x9d'),'sentimentvalue','slainvokedidname',_0xa759('0x9e'),_0xa759('0x9f'),'statecode',_0xa759('0xa0'),_0xa759('0xa1'),_0xa759('0xa2'),_0xa759('0xa3'),'transactioncurrencyidname','traversedpath',_0xa759('0xa4'),_0xa759('0xa5')];var _0x581009=_0x186f43[_0xa759('0xa6')](_0x405a60);return db[_0xa759('0x3c')]['findOne']({'where':{'id':_0x48a5a5['params']['id']},'attributes':['id','username','password','remoteUri',_0xa759('0xa7'),_0xa759('0xa8'),_0xa759('0xa9')]})[_0xa759('0x21')](handleEntityNotFound(_0x2e47ce,null))['then'](function(_0x1b31bb){if(_0x1b31bb){_0x5deb29=_0x1b31bb[_0xa759('0xaa')];var _0x1a3f45=_0x5deb29['slice'](-0x1);if(_0x1a3f45==='/'){_0x5deb29=_0x5deb29[_0xa759('0xab')](0x0,_0x5deb29[_0xa759('0xac')](_0x1a3f45));}_0x586803=util['format'](_0xa759('0xad'),_0x5deb29);var _0x5814e3={'method':_0xa759('0xae'),'uri':_0xa759('0xaf')+_0x1b31bb[_0xa759('0xa7')]+'/oauth2/token','form':{'client_id':_0x1b31bb[_0xa759('0xa8')],'resource':_0x5deb29,'username':_0x1b31bb['username'],'password':_0x1b31bb[_0xa759('0xb0')],'grant_type':_0xa759('0xb0'),'client_secret':_0x1b31bb[_0xa759('0xa9')]},'json':!![]};return rp(_0x5814e3);}})['then'](function(_0x2caed4){_0x5bcf47=_0x2caed4[_0xa759('0xb1')];var _0x3980b6={'method':_0xa759('0xb2'),'uri':encodeURI(_0x586803+_0xa759('0xb3')+_0x1d88cc+'\x27'),'headers':{'Authorization':_0xa759('0xb4')+_0x5bcf47,'If-None-Match':null,'OData-Version':_0xa759('0xb5')},'json':!![]};return rp(_0x3980b6);})[_0xa759('0x21')](function(_0x15b99c){var _0x1c4ddb=_0x15b99c[_0xa759('0xb6')][0x0];var _0x32eab1=_0x1c4ddb[_0xa759('0xb7')];var _0x1fa98a={'method':_0xa759('0xb2'),'uri':_0x586803+_0xa759('0xb8')+_0x32eab1+_0xa759('0xb9'),'headers':{'Authorization':_0xa759('0xb4')+_0x5bcf47,'If-None-Match':null,'OData-Version':_0xa759('0xb5')},'json':!![]};return rp(_0x1fa98a);})[_0xa759('0x21')](function(_0x5441e8){_0x1416b7=_0x5441e8;_0x37cf44=_0x1416b7[_0xa759('0xba')];_0x37cf44=_['remove'](_0x37cf44,function(_0x4a14c2){return!_0x581009[_0xa759('0xbb')](_0x4a14c2[_0xa759('0xbc')]);});var _0x5ee264=[];var _0x53c271=[];_0x37cf44[_0xa759('0xbd')](function(_0x3d06b5){if(_0x3d06b5[_0xa759('0xbe')]){var _0x169987=_0x3d06b5['@odata.type'][_0xa759('0xab')](_0x3d06b5[_0xa759('0xbe')][_0xa759('0xac')]('.')+0x1);if(_0x169987===_0xa759('0xbf')){_0x5ee264[_0xa759('0xc0')](getSelectList(_0x586803,_0x47536a,_0x53c271,_0x1416b7['MetadataId'],_0x3d06b5['MetadataId'],_0x5bcf47));}}});return Promise[_0xa759('0xc1')](_0x5ee264);})[_0xa759('0x21')](function(_0x43e0e8){_0x29c70a=_0x43e0e8[0x0];var _0x2d2b43=[];var _0x216055=[];_0x37cf44[_0xa759('0xbd')](function(_0x2b3b69){if(!_['isNil'](_0x2b3b69[_0xa759('0xbe')])){var _0x53ece4=_0x2b3b69[_0xa759('0xbe')][_0xa759('0xab')](_0x2b3b69['@odata.type'][_0xa759('0xac')]('.')+0x1);if(_0x53ece4==='BooleanAttributeMetadata'){_0x2d2b43[_0xa759('0xc0')](getBooleanList(_0x586803,_0x47536a,_0x216055,_0x1416b7[_0xa759('0xb7')],_0x2b3b69[_0xa759('0xb7')],_0x5bcf47));}}});return Promise[_0xa759('0xc1')](_0x2d2b43);})[_0xa759('0x21')](function(_0x346e1e){_0x14f206=_0x346e1e[0x0];var _0x313b0a=[];var _0x4ebf9e=[];_0x37cf44[_0xa759('0xbd')](function(_0x2f70a1){if(_0x2f70a1[_0xa759('0xbe')]){var _0x4df46a=_0x2f70a1[_0xa759('0xbe')][_0xa759('0xab')](_0x2f70a1['@odata.type'][_0xa759('0xac')]('.')+0x1);if(_0x4df46a===_0xa759('0xc2')||_0x4df46a===_0xa759('0xc3')||_0x4df46a===_0xa759('0xc4')||_0x4df46a===_0xa759('0xc5')||_0x4df46a==='MemoAttributeMetadata'||_0x4df46a==='DateTimeAttributeMetadata'||_0x4df46a===_0xa759('0xc6')||_0x4df46a==='EntityNameAttributeMetadata'||_0x4df46a===_0xa759('0xc7')||_0x4df46a==='DecimalAttributeMetadata'){_0x313b0a['push'](getInputList(_0x586803,_0x47536a,_0x4df46a,_0x4ebf9e,_0x1416b7[_0xa759('0xb7')],_0x2f70a1['MetadataId'],_0x5bcf47));}}});return Promise[_0xa759('0xc1')](_0x313b0a);})[_0xa759('0x21')](function(_0x5ddb89){_0x44eaa8=_0x5ddb89[0x0];var _0xe7b7e4=_0x29c70a['concat'](_0x14f206)[_0xa759('0xa6')](_0x44eaa8);var _0x1ae3ba={'count':_0xe7b7e4[_0xa759('0x47')],'rows':_0xe7b7e4};return _0x1ae3ba;})[_0xa759('0x21')](respondWithResult(_0x2e47ce,null))[_0xa759('0x54')](function(_0x297dd2){var _0x420420=_0x48a5a5[_0xa759('0x41')]['test']?0x1f4:_0x297dd2[_0xa759('0xc8')]||0x1f4;logger[_0xa759('0x28')](_0x297dd2['stack']);delete _0x297dd2['name'];if(_0x420420===0x191){_0x420420=0x190;}_0x2e47ce[_0xa759('0x2c')](_0x420420)[_0xa759('0x39')](_0x48a5a5[_0xa759('0x41')][_0xa759('0xc9')]?{'message':_0xa759('0xca'),'statusCode':_0x297dd2[_0xa759('0xc8')]}:_0x297dd2);});};function getSelectList(_0xd06cc6,_0x1c74c0,_0x342173,_0x4d7a5e,_0x5c511e,_0x44aaea){var _0x5ceb82={'method':'GET','uri':_0xd06cc6+_0xa759('0xb8')+_0x4d7a5e+_0xa759('0xcb')+_0x5c511e+_0xa759('0xcc')+_0xa759('0xcd'),'headers':{'Authorization':_0xa759('0xb4')+_0x44aaea,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x5ceb82)[_0xa759('0x21')](function(_0x12eeda){var _0x2c6ed4=[];var _0x4f41c5=_0x12eeda[_0xa759('0xce')][_0xa759('0xcf')];_0x4f41c5[_0xa759('0xbd')](function(_0x466288){_0x2c6ed4[_0xa759('0xc0')]({'name':_0x466288[_0xa759('0xd0')][_0xa759('0xd1')]['Label'],'value':String(_0x466288[_0xa759('0xd2')])});});var _0x29b497={'id':_0x1c74c0+'_'+_0x12eeda[_0xa759('0xbc')],'name':_0x12eeda['DisplayName'][_0xa759('0xd1')][_0xa759('0xd0')],'custom':![],'options':_0x2c6ed4};_0x342173[_0xa759('0xc0')](_0x29b497);return _0x342173;});}function getBooleanList(_0x5f32fe,_0x4d4858,_0x26799e,_0x24afff,_0xe8185e,_0x54a787){var _0x25571d={'method':'GET','uri':_0x5f32fe+'EntityDefinitions('+_0x24afff+_0xa759('0xcb')+_0xe8185e+_0xa759('0xd3'),'headers':{'Authorization':_0xa759('0xb4')+_0x54a787,'If-None-Match':null,'OData-Version':_0xa759('0xb5')},'json':!![]};return rp(_0x25571d)[_0xa759('0x21')](function(_0x5abd39){var _0x3e3d02=[];_0x3e3d02[_0xa759('0xc0')]({'name':_0x5abd39[_0xa759('0xce')][_0xa759('0xd4')][_0xa759('0xd0')][_0xa759('0xd1')]['Label'],'value':_0xa759('0xd5')},{'name':_0x5abd39[_0xa759('0xce')][_0xa759('0xd6')]['Label']['UserLocalizedLabel'][_0xa759('0xd0')],'value':_0xa759('0xd7')});var _0x5227fe={'id':_0x4d4858+'_'+_0x5abd39[_0xa759('0xbc')],'name':_0x5abd39['DisplayName'][_0xa759('0xd1')][_0xa759('0xd0')],'custom':![],'options':_0x3e3d02};_0x26799e[_0xa759('0xc0')](_0x5227fe);return _0x26799e;});}function getInputList(_0x145831,_0x54f5f2,_0x344fca,_0x226cc9,_0x16ac3e,_0x57338b,_0x195364){var _0x5eb502={'method':_0xa759('0xb2'),'uri':_0x145831+_0xa759('0xb8')+_0x16ac3e+_0xa759('0xcb')+_0x57338b+_0xa759('0xd8')+_0x344fca+_0xa759('0xd9'),'headers':{'Authorization':_0xa759('0xb4')+_0x195364,'If-None-Match':null,'OData-Version':_0xa759('0xb5')},'json':!![]};return rp(_0x5eb502)[_0xa759('0x21')](function(_0x2a625f){var _0x5d2c0b={'id':_0x54f5f2+'_'+_0x2a625f[_0xa759('0xbc')],'name':_0x2a625f[_0xa759('0xda')]['UserLocalizedLabel']?_0x2a625f[_0xa759('0xda')][_0xa759('0xd1')][_0xa759('0xd0')]:_0x2a625f[_0xa759('0xbc')],'custom':![],'options':[]};_0x226cc9[_0xa759('0xc0')](_0x5d2c0b);return _0x226cc9;});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.model.js b/server/api/intDynamics365Account/intDynamics365Account.model.js index 21f5ef2..9777bcc 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 _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 +var _0xbaf0=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration','exports','define','Dynamics365Account','util'];(function(_0x181c0f,_0x149937){var _0x44a208=function(_0xcbafc8){while(--_0xcbafc8){_0x181c0f['push'](_0x181c0f['shift']());}};_0x44a208(++_0x149937);}(_0xbaf0,0x12a));var _0x0baf=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xbaf0[_0x5ddb1c];return _0x354adc;};'use strict';var _=require('lodash');var util=require(_0x0baf('0x0'));var logger=require(_0x0baf('0x1'))(_0x0baf('0x2'));var moment=require(_0x0baf('0x3'));var BPromise=require(_0x0baf('0x4'));var rp=require(_0x0baf('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var attributes=require(_0x0baf('0x8'));var integrations=require(_0x0baf('0x9'));module[_0x0baf('0xa')]=function(_0x335e24,_0x1a10b1){return _0x335e24[_0x0baf('0xb')](_0x0baf('0xc'),attributes,{'tableName':'int_dynamics365_accounts','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 947d6cf..c058ede 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 _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 +var _0x671b=['request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','code','error','message','catch','GetDynamics365Account','Dynamics365Account','options','raw','where','include','map','attributes','model','ShowDynamics365Account','find','util','moment','randomstring','../../config/utils','rpc','jayson/promise','client'];(function(_0x414251,_0x4239f1){var _0x4d770a=function(_0x201c74){while(--_0x201c74){_0x414251['push'](_0x414251['shift']());}};_0x4d770a(++_0x4239f1);}(_0x671b,0xcb));var _0xb671=function(_0x47ea39,_0x569093){_0x47ea39=_0x47ea39-0x0;var _0x3bd6cc=_0x671b[_0x47ea39];return _0x3bd6cc;};'use strict';var _=require('lodash');var util=require(_0xb671('0x0'));var moment=require(_0xb671('0x1'));var BPromise=require('bluebird');var rs=require(_0xb671('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xb671('0x3'));var logger=require('../../config/logger')(_0xb671('0x4'));var config=require('../../config/environment');var jayson=require(_0xb671('0x5'));var client=jayson[_0xb671('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x525372,_0x1e380a,_0x53bca3){return new BPromise(function(_0x18e42c,_0xb9367){return client[_0xb671('0x7')](_0x525372,_0x53bca3)[_0xb671('0x8')](function(_0x5810e2){logger[_0xb671('0x9')](_0xb671('0xa'),_0x1e380a,_0xb671('0xb'));logger[_0xb671('0xc')](_0xb671('0xd'),_0x1e380a,'request\x20sent',JSON[_0xb671('0xe')](_0x5810e2));if(_0x5810e2['error']){if(_0x5810e2['error'][_0xb671('0xf')]===0x1f4){logger[_0xb671('0x10')](_0xb671('0xa'),_0x1e380a,_0x5810e2[_0xb671('0x10')]['message']);return _0xb9367(_0x5810e2['error']['message']);}logger['error']('Dynamics365Account,\x20%s,\x20%s',_0x1e380a,_0x5810e2[_0xb671('0x10')][_0xb671('0x11')]);return _0x18e42c(_0x5810e2[_0xb671('0x10')][_0xb671('0x11')]);}else{logger[_0xb671('0x9')](_0xb671('0xa'),_0x1e380a,_0xb671('0xb'));_0x18e42c(_0x5810e2['result']['message']);}})[_0xb671('0x12')](function(_0x10fa14){logger[_0xb671('0x10')](_0xb671('0xa'),_0x1e380a,_0x10fa14);_0xb9367(_0x10fa14);});});}exports[_0xb671('0x13')]=function(_0x4ea9f9){var _0x3f720c=this;return new Promise(function(_0x1a3779,_0x4faaf0){return db[_0xb671('0x14')]['findAll']({'raw':_0x4ea9f9[_0xb671('0x15')]?_0x4ea9f9[_0xb671('0x15')][_0xb671('0x16')]===undefined?!![]:![]:!![],'where':_0x4ea9f9['options']?_0x4ea9f9[_0xb671('0x15')][_0xb671('0x17')]||null:null,'attributes':_0x4ea9f9[_0xb671('0x15')]?_0x4ea9f9[_0xb671('0x15')]['attributes']||null:null,'limit':_0x4ea9f9[_0xb671('0x15')]?_0x4ea9f9[_0xb671('0x15')]['limit']||null:null,'include':_0x4ea9f9[_0xb671('0x15')]?_0x4ea9f9[_0xb671('0x15')][_0xb671('0x18')]?_[_0xb671('0x19')](_0x4ea9f9['options'][_0xb671('0x18')],function(_0x25060f){return{'model':db[_0x25060f['model']],'as':_0x25060f['as'],'attributes':_0x25060f[_0xb671('0x1a')],'include':_0x25060f[_0xb671('0x18')]?_[_0xb671('0x19')](_0x25060f[_0xb671('0x18')],function(_0x596686){return{'model':db[_0x596686['model']],'as':_0x596686['as'],'attributes':_0x596686[_0xb671('0x1a')],'include':_0x596686[_0xb671('0x18')]?_[_0xb671('0x19')](_0x596686[_0xb671('0x18')],function(_0x3942e0){return{'model':db[_0x3942e0[_0xb671('0x1b')]],'as':_0x3942e0['as'],'attributes':_0x3942e0[_0xb671('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xb671('0x8')](function(_0x5e5695){logger[_0xb671('0x9')](_0xb671('0x13'),_0x4ea9f9);logger['debug'](_0xb671('0x13'),_0x4ea9f9,JSON[_0xb671('0xe')](_0x5e5695));_0x1a3779(_0x5e5695);})['catch'](function(_0x408fa8){logger[_0xb671('0x10')]('GetDynamics365Account',_0x408fa8['message'],_0x4ea9f9);_0x4faaf0(_0x3f720c['error'](0x1f4,_0x408fa8[_0xb671('0x11')]));});});};exports[_0xb671('0x1c')]=function(_0x201684){var _0x23c2aa=this;return new Promise(function(_0x3b6f10,_0x549107){return db[_0xb671('0x14')][_0xb671('0x1d')]({'raw':_0x201684[_0xb671('0x15')]?_0x201684[_0xb671('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x201684['options']?_0x201684[_0xb671('0x15')]['where']||null:null,'attributes':_0x201684[_0xb671('0x15')]?_0x201684[_0xb671('0x15')]['attributes']||null:null,'include':_0x201684[_0xb671('0x15')]?_0x201684[_0xb671('0x15')][_0xb671('0x18')]?_[_0xb671('0x19')](_0x201684[_0xb671('0x15')][_0xb671('0x18')],function(_0x5e9e3f){return{'model':db[_0x5e9e3f['model']],'as':_0x5e9e3f['as'],'attributes':_0x5e9e3f[_0xb671('0x1a')],'include':_0x5e9e3f[_0xb671('0x18')]?_[_0xb671('0x19')](_0x5e9e3f['include'],function(_0x4f1d12){return{'model':db[_0x4f1d12['model']],'as':_0x4f1d12['as'],'attributes':_0x4f1d12[_0xb671('0x1a')],'include':_0x4f1d12[_0xb671('0x18')]?_[_0xb671('0x19')](_0x4f1d12[_0xb671('0x18')],function(_0x2468a8){return{'model':db[_0x2468a8[_0xb671('0x1b')]],'as':_0x2468a8['as'],'attributes':_0x2468a8[_0xb671('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xb671('0x8')](function(_0x4bf0d3){logger[_0xb671('0x9')](_0xb671('0x1c'),_0x201684);logger[_0xb671('0xc')](_0xb671('0x1c'),_0x201684,JSON['stringify'](_0x4bf0d3));_0x3b6f10(_0x4bf0d3);})[_0xb671('0x12')](function(_0x3c0217){logger[_0xb671('0x10')](_0xb671('0x1c'),_0x3c0217[_0xb671('0x11')],_0x201684);_0x549107(_0x23c2aa[_0xb671('0x10')](0x1f4,_0x3c0217[_0xb671('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/index.js b/server/api/intDynamics365Configuration/index.js index 665ffa4..b7e654d 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 _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 +var _0xaadd=['Router','fs-extra','../../components/auth/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x3ba965,_0x228d03){var _0x17120b=function(_0x341f73){while(--_0x341f73){_0x3ba965['push'](_0x3ba965['shift']());}};_0x17120b(++_0x228d03);}(_0xaadd,0x19b));var _0xdaad=function(_0xec84d8,_0x31f774){_0xec84d8=_0xec84d8-0x0;var _0x281e56=_0xaadd[_0xec84d8];return _0x281e56;};'use strict';var multer=require(_0xdaad('0x0'));var util=require(_0xdaad('0x1'));var path=require(_0xdaad('0x2'));var timeout=require(_0xdaad('0x3'));var express=require(_0xdaad('0x4'));var router=express[_0xdaad('0x5')]();var fs_extra=require(_0xdaad('0x6'));var auth=require(_0xdaad('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xdaad('0x8'));var controller=require(_0xdaad('0x9'));router[_0xdaad('0xa')]('/',auth[_0xdaad('0xb')](),controller[_0xdaad('0xc')]);router['get'](_0xdaad('0xd'),auth[_0xdaad('0xb')](),controller[_0xdaad('0xe')]);router[_0xdaad('0xa')](_0xdaad('0xf'),auth[_0xdaad('0xb')](),controller[_0xdaad('0x10')]);router[_0xdaad('0xa')](_0xdaad('0x11'),auth[_0xdaad('0xb')](),controller[_0xdaad('0x12')]);router[_0xdaad('0xa')]('/:id/descriptions',auth[_0xdaad('0xb')](),controller['getDescriptions']);router[_0xdaad('0x13')]('/',auth['isAuthenticated'](),controller[_0xdaad('0x14')]);router[_0xdaad('0x15')](_0xdaad('0xd'),auth['isAuthenticated'](),controller[_0xdaad('0x16')]);router[_0xdaad('0x17')](_0xdaad('0xd'),auth[_0xdaad('0xb')](),controller[_0xdaad('0x18')]);module[_0xdaad('0x19')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js index 4a92ee2..69678e2 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 _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 +var _0x4979=['incident','exports','STRING'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x4979,0x1c0));var _0x9497=function(_0x5e5c4c,_0x21abba){_0x5e5c4c=_0x5e5c4c-0x0;var _0x176148=_0x4979[_0x5e5c4c];return _0x176148;};'use strict';var Sequelize=require('sequelize');module[_0x9497('0x0')]={'name':{'type':Sequelize[_0x9497('0x1')]},'description':{'type':Sequelize['STRING']},'ticketType':{'type':Sequelize['ENUM'](_0x9497('0x2'),'phonecall'),'defaultValue':'incident'}}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js index 6e20214..014a45a 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 _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 +var _0x8b97=['index','map','Dynamics365Configuration','rawAttributes','type','key','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','pick','where','merge','filter','include','findAll','rows','show','params','includeAll','find','create','body','destroy','getFields','findOne','Dynamics365Field','options','getSubjects','nolimit','getDescriptions','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','ejs','fs-extra','crypto','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','info','request\x20sent','debug','error','Dynamics365Configuration,\x20%s,\x20%s','message','result','catch','status','end','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','update','name','send'];(function(_0xb7a459,_0xc13228){var _0x104ab5=function(_0x186a0e){while(--_0x186a0e){_0xb7a459['push'](_0xb7a459['shift']());}};_0x104ab5(++_0xc13228);}(_0x8b97,0x182));var _0x78b9=function(_0x10cddd,_0x4b48e0){_0x10cddd=_0x10cddd-0x0;var _0x18f119=_0x8b97[_0x10cddd];return _0x18f119;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x78b9('0x0'));var jsonpatch=require(_0x78b9('0x1'));var rp=require(_0x78b9('0x2'));var moment=require('moment');var BPromise=require(_0x78b9('0x3'));var Mustache=require(_0x78b9('0x4'));var util=require(_0x78b9('0x5'));var path=require('path');var sox=require(_0x78b9('0x6'));var csv=require('to-csv');var ejs=require(_0x78b9('0x7'));var fs=require('fs');var fs_extra=require(_0x78b9('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x78b9('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x78b9('0xa'));var toCsv=require(_0x78b9('0xb'));var querystring=require('querystring');var Papa=require(_0x78b9('0xc'));var Redis=require(_0x78b9('0xd'));var authService=require(_0x78b9('0xe'));var qs=require(_0x78b9('0xf'));var as=require(_0x78b9('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x78b9('0x11'));var config=require(_0x78b9('0x12'));var licenseUtil=require(_0x78b9('0x13'));var db=require(_0x78b9('0x14'))['db'];var jayson=require(_0x78b9('0x15'));var client=jayson[_0x78b9('0x16')][_0x78b9('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x41cfa6,_0x3f822f,_0x38c49f,_0x18a812){return new BPromise(function(_0x3ebe0c,_0x15b877){var _0x67b87a=_0x18a812||client;return _0x67b87a[_0x78b9('0x18')](_0x41cfa6,_0x38c49f)[_0x78b9('0x19')](function(_0x3a1776){logger[_0x78b9('0x1a')]('Dynamics365Configuration,\x20%s,\x20%s',_0x3f822f,_0x78b9('0x1b'));logger[_0x78b9('0x1c')]('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0x3f822f,_0x78b9('0x1b'),JSON['stringify'](_0x3a1776));if(_0x3a1776[_0x78b9('0x1d')]){if(_0x3a1776['error']['code']===0x1f4){logger[_0x78b9('0x1d')](_0x78b9('0x1e'),_0x3f822f,_0x3a1776[_0x78b9('0x1d')][_0x78b9('0x1f')]);return _0x15b877(_0x3a1776[_0x78b9('0x1d')]['message']);}logger[_0x78b9('0x1d')](_0x78b9('0x1e'),_0x3f822f,_0x3a1776[_0x78b9('0x1d')][_0x78b9('0x1f')]);return _0x3ebe0c(_0x3a1776[_0x78b9('0x1d')]['message']);}else{logger[_0x78b9('0x1a')](_0x78b9('0x1e'),_0x3f822f,_0x78b9('0x1b'));_0x3ebe0c(_0x3a1776[_0x78b9('0x20')][_0x78b9('0x1f')]);}})[_0x78b9('0x21')](function(_0x2e6f33){logger[_0x78b9('0x1d')](_0x78b9('0x1e'),_0x3f822f,_0x2e6f33);_0x15b877(_0x2e6f33);});});}function respondWithStatusCode(_0x3efb35,_0x11d7d0){_0x11d7d0=_0x11d7d0||0xcc;return function(_0x1456bf){if(_0x1456bf){return _0x3efb35['sendStatus'](_0x11d7d0);}return _0x3efb35[_0x78b9('0x22')](_0x11d7d0)[_0x78b9('0x23')]();};}function respondWithResult(_0x18ab76,_0xd8dc6e){_0xd8dc6e=_0xd8dc6e||0xc8;return function(_0xe9a207){if(_0xe9a207){return _0x18ab76[_0x78b9('0x22')](_0xd8dc6e)['json'](_0xe9a207);}};}function respondWithFilteredResult(_0x388c96,_0x4369a2){return function(_0x1623ac){if(_0x1623ac){var _0xc3f1ad=typeof _0x4369a2[_0x78b9('0x24')]===_0x78b9('0x25')&&typeof _0x4369a2['limit']===_0x78b9('0x25');var _0xf6bbe1=_0x1623ac[_0x78b9('0x26')];var _0xcb6c21=_0xc3f1ad?0x0:_0x4369a2[_0x78b9('0x24')];var _0xcc8cc0=_0xc3f1ad?_0x1623ac[_0x78b9('0x26')]:_0x4369a2[_0x78b9('0x24')]+_0x4369a2[_0x78b9('0x27')];var _0x2e5cd2;if(_0xcc8cc0>=_0xf6bbe1){_0xcc8cc0=_0xf6bbe1;_0x2e5cd2=0xc8;}else{_0x2e5cd2=0xce;}_0x388c96['status'](_0x2e5cd2);return _0x388c96[_0x78b9('0x28')](_0x78b9('0x29'),_0xcb6c21+'-'+_0xcc8cc0+'/'+_0xf6bbe1)[_0x78b9('0x2a')](_0x1623ac);}return null;};}function patchUpdates(_0x956d13){return function(_0x4fcadd){try{jsonpatch[_0x78b9('0x2b')](_0x4fcadd,_0x956d13,!![]);}catch(_0x490cc7){return BPromise[_0x78b9('0x2c')](_0x490cc7);}return _0x4fcadd[_0x78b9('0x2d')]();};}function saveUpdates(_0x530bf8,_0xe18dc0){return function(_0x4d1119){if(_0x4d1119){return _0x4d1119[_0x78b9('0x2e')](_0x530bf8)[_0x78b9('0x19')](function(_0x327e44){return _0x327e44;});}return null;};}function removeEntity(_0x4c776a,_0x315ed8){return function(_0x4c2a2f){if(_0x4c2a2f){return _0x4c2a2f['destroy']()[_0x78b9('0x19')](function(){_0x4c776a[_0x78b9('0x22')](0xcc)[_0x78b9('0x23')]();});}};}function handleEntityNotFound(_0x3b05d5,_0x7d33a8){return function(_0xb5618){if(!_0xb5618){_0x3b05d5['sendStatus'](0x194);}return _0xb5618;};}function handleError(_0x2d5559,_0x3f3cef){_0x3f3cef=_0x3f3cef||0x1f4;return function(_0x196e33){logger['error'](_0x196e33['stack']);if(_0x196e33['name']){delete _0x196e33[_0x78b9('0x2f')];}_0x2d5559[_0x78b9('0x22')](_0x3f3cef)[_0x78b9('0x30')](_0x196e33);};}exports[_0x78b9('0x31')]=function(_0x25709d,_0x180a55){var _0x534193={},_0x31ea5d={},_0x1227ad={'count':0x0,'rows':[]};var _0x3a1e8a=_[_0x78b9('0x32')](db[_0x78b9('0x33')][_0x78b9('0x34')],function(_0xdfed59){return{'name':_0xdfed59['fieldName'],'type':_0xdfed59[_0x78b9('0x35')][_0x78b9('0x36')]};});_0x31ea5d['model']=_[_0x78b9('0x32')](_0x3a1e8a,_0x78b9('0x2f'));_0x31ea5d[_0x78b9('0x37')]=_[_0x78b9('0x38')](_0x25709d['query']);_0x31ea5d[_0x78b9('0x39')]=_[_0x78b9('0x3a')](_0x31ea5d[_0x78b9('0x3b')],_0x31ea5d[_0x78b9('0x37')]);_0x534193['attributes']=_['intersection'](_0x31ea5d[_0x78b9('0x3b')],qs[_0x78b9('0x3c')](_0x25709d[_0x78b9('0x37')][_0x78b9('0x3c')]));_0x534193[_0x78b9('0x3d')]=_0x534193[_0x78b9('0x3d')][_0x78b9('0x3e')]?_0x534193['attributes']:_0x31ea5d[_0x78b9('0x3b')];if(!_0x25709d['query'][_0x78b9('0x3f')]('nolimit')){_0x534193[_0x78b9('0x27')]=qs[_0x78b9('0x27')](_0x25709d[_0x78b9('0x37')][_0x78b9('0x27')]);_0x534193[_0x78b9('0x24')]=qs['offset'](_0x25709d[_0x78b9('0x37')]['offset']);}_0x534193[_0x78b9('0x40')]=qs[_0x78b9('0x41')](_0x25709d[_0x78b9('0x37')]['sort']);_0x534193['where']=qs[_0x78b9('0x39')](_[_0x78b9('0x42')](_0x25709d[_0x78b9('0x37')],_0x31ea5d[_0x78b9('0x39')]),_0x3a1e8a);if(_0x25709d[_0x78b9('0x37')]['filter']){_0x534193[_0x78b9('0x43')]=_[_0x78b9('0x44')](_0x534193[_0x78b9('0x43')],{'$or':_[_0x78b9('0x32')](_0x3a1e8a,function(_0x119bc7){if(_0x119bc7['type']!=='VIRTUAL'){var _0x1ec2af={};_0x1ec2af[_0x119bc7[_0x78b9('0x2f')]]={'$like':'%'+_0x25709d[_0x78b9('0x37')][_0x78b9('0x45')]+'%'};return _0x1ec2af;}})});}_0x534193=_['merge']({},_0x534193,_0x25709d['options']);var _0x509206={'where':_0x534193[_0x78b9('0x43')]};return db[_0x78b9('0x33')][_0x78b9('0x26')](_0x509206)[_0x78b9('0x19')](function(_0x256fa8){_0x1227ad['count']=_0x256fa8;if(_0x25709d[_0x78b9('0x37')]['includeAll']){_0x534193[_0x78b9('0x46')]=[{'all':!![]}];}return db[_0x78b9('0x33')][_0x78b9('0x47')](_0x534193);})[_0x78b9('0x19')](function(_0x4a00d4){_0x1227ad[_0x78b9('0x48')]=_0x4a00d4;return _0x1227ad;})[_0x78b9('0x19')](respondWithFilteredResult(_0x180a55,_0x534193))[_0x78b9('0x21')](handleError(_0x180a55,null));};exports[_0x78b9('0x49')]=function(_0xa81f37,_0x40820c){var _0x3b9204={'raw':![],'where':{'id':_0xa81f37[_0x78b9('0x4a')]['id']}},_0x1fc070={};_0x1fc070['model']=_[_0x78b9('0x38')](db[_0x78b9('0x33')][_0x78b9('0x34')]);_0x1fc070[_0x78b9('0x37')]=_[_0x78b9('0x38')](_0xa81f37[_0x78b9('0x37')]);_0x1fc070['filters']=_['intersection'](_0x1fc070['model'],_0x1fc070['query']);_0x3b9204[_0x78b9('0x3d')]=_[_0x78b9('0x3a')](_0x1fc070[_0x78b9('0x3b')],qs[_0x78b9('0x3c')](_0xa81f37[_0x78b9('0x37')][_0x78b9('0x3c')]));_0x3b9204[_0x78b9('0x3d')]=_0x3b9204[_0x78b9('0x3d')][_0x78b9('0x3e')]?_0x3b9204[_0x78b9('0x3d')]:_0x1fc070[_0x78b9('0x3b')];if(_0xa81f37[_0x78b9('0x37')][_0x78b9('0x4b')]){_0x3b9204[_0x78b9('0x46')]=[{'all':!![]}];}_0x3b9204=_[_0x78b9('0x44')]({},_0x3b9204,_0xa81f37['options']);return db['Dynamics365Configuration'][_0x78b9('0x4c')](_0x3b9204)['then'](handleEntityNotFound(_0x40820c,null))['then'](respondWithResult(_0x40820c,null))[_0x78b9('0x21')](handleError(_0x40820c,null));};exports[_0x78b9('0x4d')]=function(_0x3b23ca,_0xfb0cc3){return db['Dynamics365Configuration'][_0x78b9('0x4d')](_0x3b23ca[_0x78b9('0x4e')],{})['then'](respondWithResult(_0xfb0cc3,0xc9))[_0x78b9('0x21')](handleError(_0xfb0cc3,null));};exports[_0x78b9('0x2e')]=function(_0x5608c6,_0x4e86cc){if(_0x5608c6['body']['id']){delete _0x5608c6[_0x78b9('0x4e')]['id'];}return db[_0x78b9('0x33')][_0x78b9('0x4c')]({'where':{'id':_0x5608c6[_0x78b9('0x4a')]['id']}})[_0x78b9('0x19')](handleEntityNotFound(_0x4e86cc,null))[_0x78b9('0x19')](saveUpdates(_0x5608c6['body'],null))[_0x78b9('0x19')](respondWithResult(_0x4e86cc,null))[_0x78b9('0x21')](handleError(_0x4e86cc,null));};exports[_0x78b9('0x4f')]=function(_0x60b360,_0x12dc7b){return db['Dynamics365Configuration'][_0x78b9('0x4c')]({'where':{'id':_0x60b360[_0x78b9('0x4a')]['id']}})[_0x78b9('0x19')](handleEntityNotFound(_0x12dc7b,null))['then'](removeEntity(_0x12dc7b,null))['catch'](handleError(_0x12dc7b,null));};exports[_0x78b9('0x50')]=function(_0x27cb2f,_0x1ae3e4,_0xdd7e6f){var _0x58b9b0={};var _0x5da4d8={};var _0x19cff5;var _0x58ced4;return db[_0x78b9('0x33')][_0x78b9('0x51')]({'where':{'id':_0x27cb2f[_0x78b9('0x4a')]['id']}})[_0x78b9('0x19')](handleEntityNotFound(_0x1ae3e4,null))[_0x78b9('0x19')](function(_0x53148e){if(_0x53148e){_0x19cff5=_0x53148e;_0x5da4d8[_0x78b9('0x3b')]=_[_0x78b9('0x38')](db[_0x78b9('0x52')][_0x78b9('0x34')]);_0x5da4d8[_0x78b9('0x37')]=_[_0x78b9('0x38')](_0x27cb2f[_0x78b9('0x37')]);_0x5da4d8[_0x78b9('0x39')]=_[_0x78b9('0x3a')](_0x5da4d8[_0x78b9('0x3b')],_0x5da4d8['query']);_0x58b9b0[_0x78b9('0x3d')]=_[_0x78b9('0x3a')](_0x5da4d8['model'],qs[_0x78b9('0x3c')](_0x27cb2f['query']['fields']));_0x58b9b0['attributes']=_0x58b9b0[_0x78b9('0x3d')][_0x78b9('0x3e')]?_0x58b9b0[_0x78b9('0x3d')]:_0x5da4d8['model'];_0x58b9b0[_0x78b9('0x40')]=qs['sort'](_0x27cb2f[_0x78b9('0x37')][_0x78b9('0x41')]);_0x58b9b0[_0x78b9('0x43')]=qs[_0x78b9('0x39')](_['pick'](_0x27cb2f[_0x78b9('0x37')],_0x5da4d8[_0x78b9('0x39')]));if(_0x27cb2f['query'][_0x78b9('0x45')]){_0x58b9b0[_0x78b9('0x43')]=_['merge'](_0x58b9b0[_0x78b9('0x43')],{'$or':_[_0x78b9('0x32')](_0x58b9b0[_0x78b9('0x3d')],function(_0x13a0c9){var _0x45e8d2={};_0x45e8d2[_0x13a0c9]={'$like':'%'+_0x27cb2f[_0x78b9('0x37')]['filter']+'%'};return _0x45e8d2;})});}_0x58b9b0=_[_0x78b9('0x44')]({},_0x58b9b0,_0x27cb2f[_0x78b9('0x53')]);return _0x19cff5['getFields'](_0x58b9b0);}})['then'](function(_0x3bc973){if(_0x3bc973){_0x58ced4=_0x3bc973[_0x78b9('0x3e')];if(!_0x27cb2f['query']['hasOwnProperty']('nolimit')){_0x58b9b0[_0x78b9('0x27')]=qs[_0x78b9('0x27')](_0x27cb2f[_0x78b9('0x37')][_0x78b9('0x27')]);_0x58b9b0['offset']=qs[_0x78b9('0x24')](_0x27cb2f[_0x78b9('0x37')][_0x78b9('0x24')]);}return _0x19cff5[_0x78b9('0x50')](_0x58b9b0);}})[_0x78b9('0x19')](function(_0x3f7fc9){if(_0x3f7fc9){return _0x3f7fc9?{'count':_0x58ced4,'rows':_0x3f7fc9}:null;}})[_0x78b9('0x19')](respondWithResult(_0x1ae3e4,null))[_0x78b9('0x21')](handleError(_0x1ae3e4,null));};exports['getSubjects']=function(_0x637d31,_0x39f4ee,_0x86dee0){var _0xac9ed1={};var _0x4d911f={};var _0x3fc2fb;var _0x46ebf6;return db[_0x78b9('0x33')][_0x78b9('0x51')]({'where':{'id':_0x637d31[_0x78b9('0x4a')]['id']}})['then'](handleEntityNotFound(_0x39f4ee,null))[_0x78b9('0x19')](function(_0x1ecce2){if(_0x1ecce2){_0x3fc2fb=_0x1ecce2;_0x4d911f[_0x78b9('0x3b')]=_['keys'](db[_0x78b9('0x52')][_0x78b9('0x34')]);_0x4d911f[_0x78b9('0x37')]=_[_0x78b9('0x38')](_0x637d31[_0x78b9('0x37')]);_0x4d911f[_0x78b9('0x39')]=_[_0x78b9('0x3a')](_0x4d911f['model'],_0x4d911f[_0x78b9('0x37')]);_0xac9ed1[_0x78b9('0x3d')]=_[_0x78b9('0x3a')](_0x4d911f['model'],qs[_0x78b9('0x3c')](_0x637d31['query']['fields']));_0xac9ed1[_0x78b9('0x3d')]=_0xac9ed1[_0x78b9('0x3d')][_0x78b9('0x3e')]?_0xac9ed1[_0x78b9('0x3d')]:_0x4d911f['model'];_0xac9ed1[_0x78b9('0x40')]=qs['sort'](_0x637d31[_0x78b9('0x37')]['sort']);_0xac9ed1['where']=qs['filters'](_['pick'](_0x637d31[_0x78b9('0x37')],_0x4d911f[_0x78b9('0x39')]));if(_0x637d31['query'][_0x78b9('0x45')]){_0xac9ed1[_0x78b9('0x43')]=_[_0x78b9('0x44')](_0xac9ed1['where'],{'$or':_[_0x78b9('0x32')](_0xac9ed1[_0x78b9('0x3d')],function(_0x43ee9e){var _0x4fb808={};_0x4fb808[_0x43ee9e]={'$like':'%'+_0x637d31[_0x78b9('0x37')][_0x78b9('0x45')]+'%'};return _0x4fb808;})});}_0xac9ed1=_['merge']({},_0xac9ed1,_0x637d31[_0x78b9('0x53')]);return _0x3fc2fb[_0x78b9('0x54')](_0xac9ed1);}})[_0x78b9('0x19')](function(_0x4d3d38){if(_0x4d3d38){_0x46ebf6=_0x4d3d38['length'];if(!_0x637d31['query']['hasOwnProperty'](_0x78b9('0x55'))){_0xac9ed1['limit']=qs['limit'](_0x637d31[_0x78b9('0x37')][_0x78b9('0x27')]);_0xac9ed1[_0x78b9('0x24')]=qs['offset'](_0x637d31[_0x78b9('0x37')]['offset']);}return _0x3fc2fb[_0x78b9('0x54')](_0xac9ed1);}})[_0x78b9('0x19')](function(_0x4b9fcb){if(_0x4b9fcb){return _0x4b9fcb?{'count':_0x46ebf6,'rows':_0x4b9fcb}:null;}})[_0x78b9('0x19')](respondWithResult(_0x39f4ee,null))['catch'](handleError(_0x39f4ee,null));};exports[_0x78b9('0x56')]=function(_0x4a8a7c,_0x11998a,_0x234a8a){var _0x242597={};var _0x57619f={};var _0x1dab2f;var _0x3a95c7;return db[_0x78b9('0x33')][_0x78b9('0x51')]({'where':{'id':_0x4a8a7c[_0x78b9('0x4a')]['id']}})['then'](handleEntityNotFound(_0x11998a,null))[_0x78b9('0x19')](function(_0x4f821c){if(_0x4f821c){_0x1dab2f=_0x4f821c;_0x57619f[_0x78b9('0x3b')]=_[_0x78b9('0x38')](db[_0x78b9('0x52')][_0x78b9('0x34')]);_0x57619f[_0x78b9('0x37')]=_[_0x78b9('0x38')](_0x4a8a7c[_0x78b9('0x37')]);_0x57619f['filters']=_[_0x78b9('0x3a')](_0x57619f[_0x78b9('0x3b')],_0x57619f[_0x78b9('0x37')]);_0x242597[_0x78b9('0x3d')]=_[_0x78b9('0x3a')](_0x57619f[_0x78b9('0x3b')],qs[_0x78b9('0x3c')](_0x4a8a7c[_0x78b9('0x37')][_0x78b9('0x3c')]));_0x242597['attributes']=_0x242597['attributes'][_0x78b9('0x3e')]?_0x242597[_0x78b9('0x3d')]:_0x57619f[_0x78b9('0x3b')];_0x242597[_0x78b9('0x40')]=qs[_0x78b9('0x41')](_0x4a8a7c[_0x78b9('0x37')][_0x78b9('0x41')]);_0x242597[_0x78b9('0x43')]=qs[_0x78b9('0x39')](_[_0x78b9('0x42')](_0x4a8a7c[_0x78b9('0x37')],_0x57619f[_0x78b9('0x39')]));if(_0x4a8a7c[_0x78b9('0x37')][_0x78b9('0x45')]){_0x242597[_0x78b9('0x43')]=_[_0x78b9('0x44')](_0x242597[_0x78b9('0x43')],{'$or':_[_0x78b9('0x32')](_0x242597['attributes'],function(_0x5d54e1){var _0x56ce07={};_0x56ce07[_0x5d54e1]={'$like':'%'+_0x4a8a7c[_0x78b9('0x37')][_0x78b9('0x45')]+'%'};return _0x56ce07;})});}_0x242597=_['merge']({},_0x242597,_0x4a8a7c[_0x78b9('0x53')]);return _0x1dab2f[_0x78b9('0x56')](_0x242597);}})[_0x78b9('0x19')](function(_0x5745e0){if(_0x5745e0){_0x3a95c7=_0x5745e0['length'];if(!_0x4a8a7c['query'][_0x78b9('0x3f')](_0x78b9('0x55'))){_0x242597['limit']=qs[_0x78b9('0x27')](_0x4a8a7c['query'][_0x78b9('0x27')]);_0x242597['offset']=qs[_0x78b9('0x24')](_0x4a8a7c[_0x78b9('0x37')]['offset']);}return _0x1dab2f['getDescriptions'](_0x242597);}})[_0x78b9('0x19')](function(_0x5898f7){if(_0x5898f7){return _0x5898f7?{'count':_0x3a95c7,'rows':_0x5898f7}:null;}})[_0x78b9('0x19')](respondWithResult(_0x11998a,null))[_0x78b9('0x21')](handleError(_0x11998a,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js index fcd1b61..b8f9144 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 _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 +var _0xe14d=['util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Configuration.attributes','exports','int_dynamics365_configurations','lodash'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0xe14d,0x1ee));var _0xde14=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xe14d[_0x21aec3];return _0x288bbc;};'use strict';var _=require(_0xde14('0x0'));var util=require(_0xde14('0x1'));var logger=require(_0xde14('0x2'))(_0xde14('0x3'));var moment=require('moment');var BPromise=require(_0xde14('0x4'));var rp=require(_0xde14('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xde14('0x6'));var config=require(_0xde14('0x7'));var attributes=require(_0xde14('0x8'));module[_0xde14('0x9')]=function(_0x461af3,_0xba1514){return _0x461af3['define']('Dynamics365Configuration',attributes,{'tableName':_0xde14('0xa'),'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 721de81..113730e 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 _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 +var _0x1a4f=['http','request','then','Dynamics365Configuration,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x46bed1,_0xbdca16){var _0x4276f3=function(_0x1f760b){while(--_0x1f760b){_0x46bed1['push'](_0x46bed1['shift']());}};_0x4276f3(++_0xbdca16);}(_0x1a4f,0x1a4));var _0xf1a4=function(_0x3ec817,_0x2397ba){_0x3ec817=_0x3ec817-0x0;var _0x459f2f=_0x1a4f[_0x3ec817];return _0x459f2f;};'use strict';var _=require(_0xf1a4('0x0'));var util=require(_0xf1a4('0x1'));var moment=require(_0xf1a4('0x2'));var BPromise=require(_0xf1a4('0x3'));var rs=require(_0xf1a4('0x4'));var fs=require('fs');var Redis=require(_0xf1a4('0x5'));var db=require(_0xf1a4('0x6'))['db'];var utils=require(_0xf1a4('0x7'));var logger=require(_0xf1a4('0x8'))('rpc');var config=require(_0xf1a4('0x9'));var jayson=require(_0xf1a4('0xa'));var client=jayson[_0xf1a4('0xb')][_0xf1a4('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xf5806e,_0x3ddcaa,_0x3c816b){return new BPromise(function(_0x32004e,_0x2a1db3){return client[_0xf1a4('0xd')](_0xf5806e,_0x3c816b)[_0xf1a4('0xe')](function(_0x339058){logger['info'](_0xf1a4('0xf'),_0x3ddcaa,'request\x20sent');logger[_0xf1a4('0x10')]('Dynamics365Configuration,\x20%s,\x20%s,\x20%s',_0x3ddcaa,_0xf1a4('0x11'),JSON[_0xf1a4('0x12')](_0x339058));if(_0x339058[_0xf1a4('0x13')]){if(_0x339058[_0xf1a4('0x13')][_0xf1a4('0x14')]===0x1f4){logger[_0xf1a4('0x13')](_0xf1a4('0xf'),_0x3ddcaa,_0x339058[_0xf1a4('0x13')]['message']);return _0x2a1db3(_0x339058[_0xf1a4('0x13')][_0xf1a4('0x15')]);}logger[_0xf1a4('0x13')](_0xf1a4('0xf'),_0x3ddcaa,_0x339058['error'][_0xf1a4('0x15')]);return _0x32004e(_0x339058['error']['message']);}else{logger[_0xf1a4('0x16')]('Dynamics365Configuration,\x20%s,\x20%s',_0x3ddcaa,_0xf1a4('0x11'));_0x32004e(_0x339058[_0xf1a4('0x17')][_0xf1a4('0x15')]);}})['catch'](function(_0xabd7cf){logger[_0xf1a4('0x13')](_0xf1a4('0xf'),_0x3ddcaa,_0xabd7cf);_0x2a1db3(_0xabd7cf);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Field/index.js b/server/api/intDynamics365Field/index.js index b07786b..bac9dae 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 _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 +var _0x1c3a=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','isAuthenticated','index','get','show','post','put','/:id','update','destroy','exports','multer','util','connect-timeout','Router','fs-extra'];(function(_0x3170c4,_0x307d90){var _0x4fc4b3=function(_0x1b0cf8){while(--_0x1b0cf8){_0x3170c4['push'](_0x3170c4['shift']());}};_0x4fc4b3(++_0x307d90);}(_0x1c3a,0x164));var _0xa1c3=function(_0x4d69a6,_0x44cbe8){_0x4d69a6=_0x4d69a6-0x0;var _0x56739a=_0x1c3a[_0x4d69a6];return _0x56739a;};'use strict';var multer=require(_0xa1c3('0x0'));var util=require(_0xa1c3('0x1'));var path=require('path');var timeout=require(_0xa1c3('0x2'));var express=require('express');var router=express[_0xa1c3('0x3')]();var fs_extra=require(_0xa1c3('0x4'));var auth=require(_0xa1c3('0x5'));var interaction=require(_0xa1c3('0x6'));var config=require(_0xa1c3('0x7'));var controller=require(_0xa1c3('0x8'));router['get']('/',auth[_0xa1c3('0x9')](),controller[_0xa1c3('0xa')]);router[_0xa1c3('0xb')]('/:id',auth[_0xa1c3('0x9')](),controller[_0xa1c3('0xc')]);router[_0xa1c3('0xd')]('/',auth[_0xa1c3('0x9')](),controller['create']);router[_0xa1c3('0xe')](_0xa1c3('0xf'),auth[_0xa1c3('0x9')](),controller[_0xa1c3('0x10')]);router['delete'](_0xa1c3('0xf'),auth[_0xa1c3('0x9')](),controller[_0xa1c3('0x11')]);module[_0xa1c3('0x12')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.attributes.js b/server/api/intDynamics365Field/intDynamics365Field.attributes.js index 37055d5..87136ea 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 _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 +var _0xfe31=['STRING','ENUM','customVariable','exports','variable','keyValue','picklist','string'];(function(_0x539ce4,_0x1b908c){var _0x18046d=function(_0x3b9662){while(--_0x3b9662){_0x539ce4['push'](_0x539ce4['shift']());}};_0x18046d(++_0x1b908c);}(_0xfe31,0x163));var _0x1fe3=function(_0x26b055,_0x5dc8d6){_0x26b055=_0x26b055-0x0;var _0x3f8d89=_0xfe31[_0x26b055];return _0x3f8d89;};'use strict';var Sequelize=require('sequelize');module[_0x1fe3('0x0')]={'type':{'type':Sequelize['ENUM']('string',_0x1fe3('0x1'),'customVariable',_0x1fe3('0x2'),_0x1fe3('0x3')),'defaultValue':_0x1fe3('0x4')},'content':{'type':Sequelize[_0x1fe3('0x5')]},'key':{'type':Sequelize[_0x1fe3('0x5')]},'keyType':{'type':Sequelize[_0x1fe3('0x6')]('string',_0x1fe3('0x1'),_0x1fe3('0x7'))},'keyContent':{'type':Sequelize[_0x1fe3('0x5')]},'idField':{'type':Sequelize[_0x1fe3('0x5')]},'nameField':{'type':Sequelize[_0x1fe3('0x5')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x1fe3('0x5')]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.controller.js b/server/api/intDynamics365Field/intDynamics365Field.controller.js index 3eac0bb..7413554 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 _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 +var _0x2729=['fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','map','Dynamics365Field','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','options','includeAll','include','catch','show','params','find','create','body','eml-format','zip-dir'];(function(_0x9e6a6e,_0x33d8c3){var _0x2a5bee=function(_0x2adeee){while(--_0x2adeee){_0x9e6a6e['push'](_0x9e6a6e['shift']());}};_0x2a5bee(++_0x33d8c3);}(_0x2729,0x1cc));var _0x9272=function(_0x26c7b6,_0x189109){_0x26c7b6=_0x26c7b6-0x0;var _0xb97b3a=_0x2729[_0x26c7b6];return _0xb97b3a;};'use strict';var emlformat=require(_0x9272('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9272('0x1'));var jsonpatch=require(_0x9272('0x2'));var rp=require(_0x9272('0x3'));var moment=require(_0x9272('0x4'));var BPromise=require(_0x9272('0x5'));var Mustache=require(_0x9272('0x6'));var util=require(_0x9272('0x7'));var path=require('path');var sox=require(_0x9272('0x8'));var csv=require('to-csv');var ejs=require(_0x9272('0x9'));var fs=require('fs');var fs_extra=require(_0x9272('0xa'));var _=require(_0x9272('0xb'));var squel=require(_0x9272('0xc'));var crypto=require(_0x9272('0xd'));var jsforce=require(_0x9272('0xe'));var deskjs=require(_0x9272('0xf'));var toCsv=require(_0x9272('0x10'));var querystring=require(_0x9272('0x11'));var Papa=require(_0x9272('0x12'));var Redis=require(_0x9272('0x13'));var authService=require(_0x9272('0x14'));var qs=require(_0x9272('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9272('0x16'))(_0x9272('0x17'));var utils=require(_0x9272('0x18'));var config=require(_0x9272('0x19'));var licenseUtil=require(_0x9272('0x1a'));var db=require(_0x9272('0x1b'))['db'];function respondWithStatusCode(_0x14b75b,_0x1ef33d){_0x1ef33d=_0x1ef33d||0xcc;return function(_0xb89972){if(_0xb89972){return _0x14b75b[_0x9272('0x1c')](_0x1ef33d);}return _0x14b75b[_0x9272('0x1d')](_0x1ef33d)[_0x9272('0x1e')]();};}function respondWithResult(_0x5480b9,_0x28cbf9){_0x28cbf9=_0x28cbf9||0xc8;return function(_0x1b4833){if(_0x1b4833){return _0x5480b9[_0x9272('0x1d')](_0x28cbf9)[_0x9272('0x1f')](_0x1b4833);}};}function respondWithFilteredResult(_0x2666a8,_0x294a09){return function(_0x4605d7){if(_0x4605d7){var _0x15d96e=typeof _0x294a09[_0x9272('0x20')]===_0x9272('0x21')&&typeof _0x294a09['limit']===_0x9272('0x21');var _0x56e118=_0x4605d7['count'];var _0x15d29e=_0x15d96e?0x0:_0x294a09['offset'];var _0x3683f2=_0x15d96e?_0x4605d7[_0x9272('0x22')]:_0x294a09[_0x9272('0x20')]+_0x294a09['limit'];var _0x57ab09;if(_0x3683f2>=_0x56e118){_0x3683f2=_0x56e118;_0x57ab09=0xc8;}else{_0x57ab09=0xce;}_0x2666a8['status'](_0x57ab09);return _0x2666a8[_0x9272('0x23')](_0x9272('0x24'),_0x15d29e+'-'+_0x3683f2+'/'+_0x56e118)[_0x9272('0x1f')](_0x4605d7);}return null;};}function patchUpdates(_0x113b0f){return function(_0x23650a){try{jsonpatch[_0x9272('0x25')](_0x23650a,_0x113b0f,!![]);}catch(_0x1fa04f){return BPromise[_0x9272('0x26')](_0x1fa04f);}return _0x23650a[_0x9272('0x27')]();};}function saveUpdates(_0xc717b7,_0x172abb){return function(_0x58c849){if(_0x58c849){return _0x58c849[_0x9272('0x28')](_0xc717b7)[_0x9272('0x29')](function(_0x122155){return _0x122155;});}return null;};}function removeEntity(_0x3c2636,_0x18f9cb){return function(_0x5b6220){if(_0x5b6220){return _0x5b6220[_0x9272('0x2a')]()[_0x9272('0x29')](function(){_0x3c2636[_0x9272('0x1d')](0xcc)[_0x9272('0x1e')]();});}};}function handleEntityNotFound(_0x2970fd,_0x1e0cf4){return function(_0x3596bd){if(!_0x3596bd){_0x2970fd[_0x9272('0x1c')](0x194);}return _0x3596bd;};}function handleError(_0x2bdd56,_0x45e2ed){_0x45e2ed=_0x45e2ed||0x1f4;return function(_0x3f6e0e){logger[_0x9272('0x2b')](_0x3f6e0e['stack']);if(_0x3f6e0e['name']){delete _0x3f6e0e[_0x9272('0x2c')];}_0x2bdd56[_0x9272('0x1d')](_0x45e2ed)[_0x9272('0x2d')](_0x3f6e0e);};}exports[_0x9272('0x2e')]=function(_0x31a003,_0x1d95aa){var _0xe4399d={},_0x4c7830={},_0x5a144a={'count':0x0,'rows':[]};var _0x4602d8=_[_0x9272('0x2f')](db[_0x9272('0x30')][_0x9272('0x31')],function(_0x523c63){return{'name':_0x523c63[_0x9272('0x32')],'type':_0x523c63[_0x9272('0x33')]['key']};});_0x4c7830[_0x9272('0x34')]=_[_0x9272('0x2f')](_0x4602d8,'name');_0x4c7830[_0x9272('0x35')]=_[_0x9272('0x36')](_0x31a003[_0x9272('0x35')]);_0x4c7830[_0x9272('0x37')]=_[_0x9272('0x38')](_0x4c7830['model'],_0x4c7830['query']);_0xe4399d[_0x9272('0x39')]=_[_0x9272('0x38')](_0x4c7830[_0x9272('0x34')],qs[_0x9272('0x3a')](_0x31a003[_0x9272('0x35')]['fields']));_0xe4399d['attributes']=_0xe4399d[_0x9272('0x39')][_0x9272('0x3b')]?_0xe4399d[_0x9272('0x39')]:_0x4c7830[_0x9272('0x34')];if(!_0x31a003['query'][_0x9272('0x3c')]('nolimit')){_0xe4399d['limit']=qs[_0x9272('0x3d')](_0x31a003[_0x9272('0x35')][_0x9272('0x3d')]);_0xe4399d[_0x9272('0x20')]=qs['offset'](_0x31a003[_0x9272('0x35')]['offset']);}_0xe4399d[_0x9272('0x3e')]=qs[_0x9272('0x3f')](_0x31a003[_0x9272('0x35')][_0x9272('0x3f')]);_0xe4399d[_0x9272('0x40')]=qs['filters'](_[_0x9272('0x41')](_0x31a003[_0x9272('0x35')],_0x4c7830[_0x9272('0x37')]),_0x4602d8);if(_0x31a003[_0x9272('0x35')][_0x9272('0x42')]){_0xe4399d['where']=_[_0x9272('0x43')](_0xe4399d[_0x9272('0x40')],{'$or':_[_0x9272('0x2f')](_0x4602d8,function(_0x5d7f1b){if(_0x5d7f1b['type']!=='VIRTUAL'){var _0x3b90d5={};_0x3b90d5[_0x5d7f1b[_0x9272('0x2c')]]={'$like':'%'+_0x31a003[_0x9272('0x35')]['filter']+'%'};return _0x3b90d5;}})});}_0xe4399d=_['merge']({},_0xe4399d,_0x31a003[_0x9272('0x44')]);var _0x16168f={'where':_0xe4399d[_0x9272('0x40')]};return db['Dynamics365Field'][_0x9272('0x22')](_0x16168f)[_0x9272('0x29')](function(_0x2d4760){_0x5a144a[_0x9272('0x22')]=_0x2d4760;if(_0x31a003[_0x9272('0x35')][_0x9272('0x45')]){_0xe4399d[_0x9272('0x46')]=[{'all':!![]}];}return db[_0x9272('0x30')]['findAll'](_0xe4399d);})[_0x9272('0x29')](function(_0x528058){_0x5a144a['rows']=_0x528058;return _0x5a144a;})[_0x9272('0x29')](respondWithFilteredResult(_0x1d95aa,_0xe4399d))[_0x9272('0x47')](handleError(_0x1d95aa,null));};exports[_0x9272('0x48')]=function(_0x503aef,_0x5d032b){var _0x2ccf3a={'raw':!![],'where':{'id':_0x503aef[_0x9272('0x49')]['id']}},_0xa2254f={};_0xa2254f[_0x9272('0x34')]=_[_0x9272('0x36')](db['Dynamics365Field'][_0x9272('0x31')]);_0xa2254f['query']=_[_0x9272('0x36')](_0x503aef[_0x9272('0x35')]);_0xa2254f['filters']=_[_0x9272('0x38')](_0xa2254f[_0x9272('0x34')],_0xa2254f['query']);_0x2ccf3a[_0x9272('0x39')]=_[_0x9272('0x38')](_0xa2254f['model'],qs['fields'](_0x503aef['query'][_0x9272('0x3a')]));_0x2ccf3a[_0x9272('0x39')]=_0x2ccf3a[_0x9272('0x39')]['length']?_0x2ccf3a[_0x9272('0x39')]:_0xa2254f[_0x9272('0x34')];if(_0x503aef['query'][_0x9272('0x45')]){_0x2ccf3a[_0x9272('0x46')]=[{'all':!![]}];}_0x2ccf3a=_[_0x9272('0x43')]({},_0x2ccf3a,_0x503aef[_0x9272('0x44')]);return db[_0x9272('0x30')][_0x9272('0x4a')](_0x2ccf3a)[_0x9272('0x29')](handleEntityNotFound(_0x5d032b,null))[_0x9272('0x29')](respondWithResult(_0x5d032b,null))[_0x9272('0x47')](handleError(_0x5d032b,null));};exports[_0x9272('0x4b')]=function(_0x5053d0,_0x51596e){return db['Dynamics365Field'][_0x9272('0x4b')](_0x5053d0[_0x9272('0x4c')],{})['then'](respondWithResult(_0x51596e,0xc9))['catch'](handleError(_0x51596e,null));};exports[_0x9272('0x28')]=function(_0x1394c4,_0xba3a10){if(_0x1394c4['body']['id']){delete _0x1394c4[_0x9272('0x4c')]['id'];}return db['Dynamics365Field'][_0x9272('0x4a')]({'where':{'id':_0x1394c4[_0x9272('0x49')]['id']}})[_0x9272('0x29')](handleEntityNotFound(_0xba3a10,null))['then'](saveUpdates(_0x1394c4[_0x9272('0x4c')],null))[_0x9272('0x29')](respondWithResult(_0xba3a10,null))['catch'](handleError(_0xba3a10,null));};exports[_0x9272('0x2a')]=function(_0x22053f,_0x59352c){return db[_0x9272('0x30')]['find']({'where':{'id':_0x22053f[_0x9272('0x49')]['id']}})[_0x9272('0x29')](handleEntityNotFound(_0x59352c,null))['then'](removeEntity(_0x59352c,null))['catch'](handleError(_0x59352c,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.model.js b/server/api/intDynamics365Field/intDynamics365Field.model.js index 4e15d3c..49bd9fa 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 _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 +var _0xdddb=['Dynamics365Field','int_dynamics365_fields','dynamics365_unique_index','idField','lodash','util','moment','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Field.attributes','define'];(function(_0x2ab210,_0x57bda7){var _0x232d9d=function(_0x229d85){while(--_0x229d85){_0x2ab210['push'](_0x2ab210['shift']());}};_0x232d9d(++_0x57bda7);}(_0xdddb,0x1be));var _0xbddd=function(_0x46a47f,_0x1fd1be){_0x46a47f=_0x46a47f-0x0;var _0x4d616f=_0xdddb[_0x46a47f];return _0x4d616f;};'use strict';var _=require(_0xbddd('0x0'));var util=require(_0xbddd('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbddd('0x2'));var BPromise=require(_0xbddd('0x3'));var rp=require(_0xbddd('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbddd('0x5'));var config=require(_0xbddd('0x6'));var attributes=require(_0xbddd('0x7'));module['exports']=function(_0x13b495,_0x15729e){return _0x13b495[_0xbddd('0x8')](_0xbddd('0x9'),attributes,{'tableName':_0xbddd('0xa'),'paranoid':![],'indexes':[{'name':_0xbddd('0xb'),'fields':[_0xbddd('0xc'),'FieldId'],'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 5bbe4fd..87415d7 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 _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 +var _0xd54b=['http','request','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x3f0d91,_0x1a817a){var _0x1e4eca=function(_0x8b53c8){while(--_0x8b53c8){_0x3f0d91['push'](_0x3f0d91['shift']());}};_0x1e4eca(++_0x1a817a);}(_0xd54b,0x197));var _0xbd54=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xd54b[_0xfae23b];return _0x200640;};'use strict';var _=require(_0xbd54('0x0'));var util=require(_0xbd54('0x1'));var moment=require('moment');var BPromise=require(_0xbd54('0x2'));var rs=require(_0xbd54('0x3'));var fs=require('fs');var Redis=require(_0xbd54('0x4'));var db=require(_0xbd54('0x5'))['db'];var utils=require(_0xbd54('0x6'));var logger=require('../../config/logger')(_0xbd54('0x7'));var config=require(_0xbd54('0x8'));var jayson=require(_0xbd54('0x9'));var client=jayson[_0xbd54('0xa')][_0xbd54('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5a1e5d,_0x4fc43d,_0x2d2776){return new BPromise(function(_0x4fbcec,_0x11b55f){return client[_0xbd54('0xc')](_0x5a1e5d,_0x2d2776)[_0xbd54('0xd')](function(_0x13b28c){logger[_0xbd54('0xe')](_0xbd54('0xf'),_0x4fc43d,_0xbd54('0x10'));logger['debug']('Dynamics365Field,\x20%s,\x20%s,\x20%s',_0x4fc43d,_0xbd54('0x10'),JSON[_0xbd54('0x11')](_0x13b28c));if(_0x13b28c['error']){if(_0x13b28c[_0xbd54('0x12')]['code']===0x1f4){logger[_0xbd54('0x12')]('Dynamics365Field,\x20%s,\x20%s',_0x4fc43d,_0x13b28c[_0xbd54('0x12')]['message']);return _0x11b55f(_0x13b28c[_0xbd54('0x12')][_0xbd54('0x13')]);}logger['error']('Dynamics365Field,\x20%s,\x20%s',_0x4fc43d,_0x13b28c['error'][_0xbd54('0x13')]);return _0x4fbcec(_0x13b28c[_0xbd54('0x12')][_0xbd54('0x13')]);}else{logger[_0xbd54('0xe')](_0xbd54('0xf'),_0x4fc43d,_0xbd54('0x10'));_0x4fbcec(_0x13b28c[_0xbd54('0x14')]['message']);}})[_0xbd54('0x15')](function(_0x3845b5){logger[_0xbd54('0x12')](_0xbd54('0xf'),_0x4fc43d,_0x3845b5);_0x11b55f(_0x3845b5);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/index.js b/server/api/intFreshdeskAccount/index.js index da93309..c355cce 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 _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 +var _0x2bfe=['create','post','put','update','delete','destroy','util','path','connect-timeout','fs-extra','../../components/auth/service','../../config/environment','isAuthenticated','index','get','/:id','/:id/configurations','getConfigurations','/:id/fields','getFields'];(function(_0x311a7d,_0x4780f7){var _0x3fbadb=function(_0x13d6a3){while(--_0x13d6a3){_0x311a7d['push'](_0x311a7d['shift']());}};_0x3fbadb(++_0x4780f7);}(_0x2bfe,0x6a));var _0xe2bf=function(_0xea8947,_0x1b573d){_0xea8947=_0xea8947-0x0;var _0x2455e9=_0x2bfe[_0xea8947];return _0x2455e9;};'use strict';var multer=require('multer');var util=require(_0xe2bf('0x0'));var path=require(_0xe2bf('0x1'));var timeout=require(_0xe2bf('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xe2bf('0x3'));var auth=require(_0xe2bf('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xe2bf('0x5'));var controller=require('./intFreshdeskAccount.controller');router['get']('/',auth[_0xe2bf('0x6')](),controller[_0xe2bf('0x7')]);router[_0xe2bf('0x8')](_0xe2bf('0x9'),auth[_0xe2bf('0x6')](),controller['show']);router['get'](_0xe2bf('0xa'),auth[_0xe2bf('0x6')](),controller[_0xe2bf('0xb')]);router[_0xe2bf('0x8')](_0xe2bf('0xc'),auth[_0xe2bf('0x6')](),controller[_0xe2bf('0xd')]);router['post']('/',auth[_0xe2bf('0x6')](),controller[_0xe2bf('0xe')]);router[_0xe2bf('0xf')]('/:id/configurations',auth['isAuthenticated'](),controller['addConfiguration']);router[_0xe2bf('0x10')]('/:id',auth[_0xe2bf('0x6')](),controller[_0xe2bf('0x11')]);router[_0xe2bf('0x12')](_0xe2bf('0x9'),auth[_0xe2bf('0x6')](),controller[_0xe2bf('0x13')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js index 4e9f51f..06ff19d 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 _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 +var _0x4213=['exports','STRING','username','remoteUri','sequelize'];(function(_0x52d93b,_0x21c04d){var _0x32eff2=function(_0x1abde4){while(--_0x1abde4){_0x52d93b['push'](_0x52d93b['shift']());}};_0x32eff2(++_0x21c04d);}(_0x4213,0x77));var _0x3421=function(_0x145107,_0x229f98){_0x145107=_0x145107-0x0;var _0xd79ba6=_0x4213[_0x145107];return _0xd79ba6;};'use strict';var Sequelize=require(_0x3421('0x0'));module[_0x3421('0x1')]={'name':{'type':Sequelize[_0x3421('0x2')]},'description':{'type':Sequelize[_0x3421('0x2')]},'username':{'type':Sequelize[_0x3421('0x2')],'unique':_0x3421('0x3')},'apiKey':{'type':Sequelize[_0x3421('0x2')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x3421('0x4')},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js index 8e8df37..6fb2248 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 _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 +var _0x8c0b=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','request','then','info','FreshdeskAccount,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','apply','save','update','destroy','stack','name','send','index','map','FreshdeskAccount','rawAttributes','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','merge','type','VIRTUAL','filter','options','count','includeAll','include','findAll','rows','params','find','create','body','getConfigurations','findOne','FreshdeskConfiguration','pick','hasOwnProperty','AccountId','Subjects','getSubjects','channel','getDescriptions','FreshdeskField','Descriptions','getFields','apiKey','remoteUri','slice','substring','lastIndexOf','GET','format','%s/%s','Basic\x20%s','%s:X','toString','base64','description','priority','group','source','ticket_type','company','remove','includes','default','custom_text','custom_dropdown','label','test','getFields,\x20%s,\x20%s,\x20%s','stringify','statusCode','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','../../components/auth/service'];(function(_0x52b0ae,_0x9307d7){var _0x4adf82=function(_0x4c2788){while(--_0x4c2788){_0x52b0ae['push'](_0x52b0ae['shift']());}};_0x4adf82(++_0x9307d7);}(_0x8c0b,0x161));var _0xb8c0=function(_0x5dde90,_0x5e4759){_0x5dde90=_0x5dde90-0x0;var _0x10ef1b=_0x8c0b[_0x5dde90];return _0x10ef1b;};'use strict';var emlformat=require(_0xb8c0('0x0'));var rimraf=require(_0xb8c0('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb8c0('0x2'));var moment=require(_0xb8c0('0x3'));var BPromise=require(_0xb8c0('0x4'));var Mustache=require(_0xb8c0('0x5'));var util=require(_0xb8c0('0x6'));var path=require(_0xb8c0('0x7'));var sox=require(_0xb8c0('0x8'));var csv=require(_0xb8c0('0x9'));var ejs=require(_0xb8c0('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb8c0('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb8c0('0xc'));var deskjs=require(_0xb8c0('0xd'));var toCsv=require(_0xb8c0('0x9'));var querystring=require(_0xb8c0('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xb8c0('0xf'));var qs=require(_0xb8c0('0x10'));var as=require(_0xb8c0('0x11'));var hardwareService=require(_0xb8c0('0x12'));var logger=require(_0xb8c0('0x13'))(_0xb8c0('0x14'));var utils=require(_0xb8c0('0x15'));var config=require(_0xb8c0('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xb8c0('0x17'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xb8c0('0x18'));var client=jayson[_0xb8c0('0x19')][_0xb8c0('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x16b77a,_0x55acde,_0x351f13,_0x22a83b){return new BPromise(function(_0x56370f,_0x5d9bef){var _0x534194=_0x22a83b||client;return _0x534194[_0xb8c0('0x1b')](_0x16b77a,_0x351f13)[_0xb8c0('0x1c')](function(_0x4865d9){logger[_0xb8c0('0x1d')](_0xb8c0('0x1e'),_0x55acde,'request\x20sent');logger[_0xb8c0('0x1f')]('FreshdeskAccount,\x20%s,\x20%s,\x20%s',_0x55acde,_0xb8c0('0x20'),JSON['stringify'](_0x4865d9));if(_0x4865d9['error']){if(_0x4865d9[_0xb8c0('0x21')][_0xb8c0('0x22')]===0x1f4){logger[_0xb8c0('0x21')]('FreshdeskAccount,\x20%s,\x20%s',_0x55acde,_0x4865d9['error'][_0xb8c0('0x23')]);return _0x5d9bef(_0x4865d9[_0xb8c0('0x21')][_0xb8c0('0x23')]);}logger[_0xb8c0('0x21')](_0xb8c0('0x1e'),_0x55acde,_0x4865d9[_0xb8c0('0x21')][_0xb8c0('0x23')]);return _0x56370f(_0x4865d9[_0xb8c0('0x21')][_0xb8c0('0x23')]);}else{logger['info'](_0xb8c0('0x1e'),_0x55acde,'request\x20sent');_0x56370f(_0x4865d9[_0xb8c0('0x24')][_0xb8c0('0x23')]);}})[_0xb8c0('0x25')](function(_0x241c68){logger['error'](_0xb8c0('0x1e'),_0x55acde,_0x241c68);_0x5d9bef(_0x241c68);});});}function respondWithStatusCode(_0x310aa5,_0x2c1d4a){_0x2c1d4a=_0x2c1d4a||0xcc;return function(_0x1b4d69){if(_0x1b4d69){return _0x310aa5[_0xb8c0('0x26')](_0x2c1d4a);}return _0x310aa5[_0xb8c0('0x27')](_0x2c1d4a)['end']();};}function respondWithResult(_0x5c2885,_0xe26765){_0xe26765=_0xe26765||0xc8;return function(_0x3ba33d){if(_0x3ba33d){return _0x5c2885['status'](_0xe26765)[_0xb8c0('0x28')](_0x3ba33d);}};}function respondWithFilteredResult(_0x2135a1,_0x196363){return function(_0x31236c){if(_0x31236c){var _0x5c2e26=typeof _0x196363[_0xb8c0('0x29')]===_0xb8c0('0x2a')&&typeof _0x196363[_0xb8c0('0x2b')]===_0xb8c0('0x2a');var _0x94171a=_0x31236c['count'];var _0x4151dd=_0x5c2e26?0x0:_0x196363[_0xb8c0('0x29')];var _0x51b5cd=_0x5c2e26?_0x31236c['count']:_0x196363[_0xb8c0('0x29')]+_0x196363['limit'];var _0x188327;if(_0x51b5cd>=_0x94171a){_0x51b5cd=_0x94171a;_0x188327=0xc8;}else{_0x188327=0xce;}_0x2135a1['status'](_0x188327);return _0x2135a1['set']('Content-Range',_0x4151dd+'-'+_0x51b5cd+'/'+_0x94171a)[_0xb8c0('0x28')](_0x31236c);}return null;};}function patchUpdates(_0x1548ec){return function(_0x47c6f5){try{jsonpatch[_0xb8c0('0x2c')](_0x47c6f5,_0x1548ec,!![]);}catch(_0x48679a){return BPromise['reject'](_0x48679a);}return _0x47c6f5[_0xb8c0('0x2d')]();};}function saveUpdates(_0x9e98da,_0x30a4f8){return function(_0x4e85b3){if(_0x4e85b3){return _0x4e85b3[_0xb8c0('0x2e')](_0x9e98da)[_0xb8c0('0x1c')](function(_0x582d77){return _0x582d77;});}return null;};}function removeEntity(_0x4499b8,_0x3bc260){return function(_0x37ee21){if(_0x37ee21){return _0x37ee21[_0xb8c0('0x2f')]()[_0xb8c0('0x1c')](function(){_0x4499b8['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3192c5,_0x551d32){return function(_0x493f5a){if(!_0x493f5a){_0x3192c5[_0xb8c0('0x26')](0x194);}return _0x493f5a;};}function handleError(_0x4954f2,_0x5d7fe3){_0x5d7fe3=_0x5d7fe3||0x1f4;return function(_0x575fdf){logger[_0xb8c0('0x21')](_0x575fdf[_0xb8c0('0x30')]);if(_0x575fdf[_0xb8c0('0x31')]){delete _0x575fdf[_0xb8c0('0x31')];}_0x4954f2['status'](_0x5d7fe3)[_0xb8c0('0x32')](_0x575fdf);};}exports[_0xb8c0('0x33')]=function(_0x4fede4,_0x45d878){var _0xfe16d={},_0x50920b={},_0xbfd058={'count':0x0,'rows':[]};var _0x4dab05=_[_0xb8c0('0x34')](db[_0xb8c0('0x35')][_0xb8c0('0x36')],function(_0x1d84b8){return{'name':_0x1d84b8['fieldName'],'type':_0x1d84b8['type'][_0xb8c0('0x37')]};});_0x50920b[_0xb8c0('0x38')]=_[_0xb8c0('0x34')](_0x4dab05,'name');_0x50920b[_0xb8c0('0x39')]=_[_0xb8c0('0x3a')](_0x4fede4[_0xb8c0('0x39')]);_0x50920b[_0xb8c0('0x3b')]=_['intersection'](_0x50920b[_0xb8c0('0x38')],_0x50920b['query']);_0xfe16d[_0xb8c0('0x3c')]=_[_0xb8c0('0x3d')](_0x50920b[_0xb8c0('0x38')],qs[_0xb8c0('0x3e')](_0x4fede4['query'][_0xb8c0('0x3e')]));_0xfe16d[_0xb8c0('0x3c')]=_0xfe16d['attributes'][_0xb8c0('0x3f')]?_0xfe16d['attributes']:_0x50920b[_0xb8c0('0x38')];if(!_0x4fede4[_0xb8c0('0x39')]['hasOwnProperty'](_0xb8c0('0x40'))){_0xfe16d[_0xb8c0('0x2b')]=qs['limit'](_0x4fede4['query'][_0xb8c0('0x2b')]);_0xfe16d[_0xb8c0('0x29')]=qs[_0xb8c0('0x29')](_0x4fede4[_0xb8c0('0x39')][_0xb8c0('0x29')]);}_0xfe16d[_0xb8c0('0x41')]=qs['sort'](_0x4fede4['query'][_0xb8c0('0x42')]);_0xfe16d[_0xb8c0('0x43')]=qs[_0xb8c0('0x3b')](_['pick'](_0x4fede4[_0xb8c0('0x39')],_0x50920b[_0xb8c0('0x3b')]),_0x4dab05);if(_0x4fede4[_0xb8c0('0x39')]['filter']){_0xfe16d[_0xb8c0('0x43')]=_[_0xb8c0('0x44')](_0xfe16d['where'],{'$or':_['map'](_0x4dab05,function(_0x534f11){if(_0x534f11[_0xb8c0('0x45')]!==_0xb8c0('0x46')){var _0x18b649={};_0x18b649[_0x534f11[_0xb8c0('0x31')]]={'$like':'%'+_0x4fede4[_0xb8c0('0x39')][_0xb8c0('0x47')]+'%'};return _0x18b649;}})});}_0xfe16d=_[_0xb8c0('0x44')]({},_0xfe16d,_0x4fede4[_0xb8c0('0x48')]);var _0x5875eb={'where':_0xfe16d['where']};return db['FreshdeskAccount'][_0xb8c0('0x49')](_0x5875eb)['then'](function(_0x3b2bed){_0xbfd058[_0xb8c0('0x49')]=_0x3b2bed;if(_0x4fede4[_0xb8c0('0x39')][_0xb8c0('0x4a')]){_0xfe16d[_0xb8c0('0x4b')]=[{'all':!![]}];}return db['FreshdeskAccount'][_0xb8c0('0x4c')](_0xfe16d);})[_0xb8c0('0x1c')](function(_0x2b5d8b){_0xbfd058[_0xb8c0('0x4d')]=_0x2b5d8b;return _0xbfd058;})[_0xb8c0('0x1c')](respondWithFilteredResult(_0x45d878,_0xfe16d))[_0xb8c0('0x25')](handleError(_0x45d878,null));};exports['show']=function(_0x16e172,_0x5d45d1){var _0x3681d9={'raw':![],'where':{'id':_0x16e172[_0xb8c0('0x4e')]['id']}},_0x193884={};_0x193884[_0xb8c0('0x38')]=_[_0xb8c0('0x3a')](db[_0xb8c0('0x35')][_0xb8c0('0x36')]);_0x193884['query']=_[_0xb8c0('0x3a')](_0x16e172['query']);_0x193884[_0xb8c0('0x3b')]=_[_0xb8c0('0x3d')](_0x193884['model'],_0x193884[_0xb8c0('0x39')]);_0x3681d9[_0xb8c0('0x3c')]=_[_0xb8c0('0x3d')](_0x193884[_0xb8c0('0x38')],qs['fields'](_0x16e172[_0xb8c0('0x39')][_0xb8c0('0x3e')]));_0x3681d9[_0xb8c0('0x3c')]=_0x3681d9[_0xb8c0('0x3c')][_0xb8c0('0x3f')]?_0x3681d9[_0xb8c0('0x3c')]:_0x193884['model'];if(_0x16e172[_0xb8c0('0x39')][_0xb8c0('0x4a')]){_0x3681d9[_0xb8c0('0x4b')]=[{'all':!![]}];}_0x3681d9=_[_0xb8c0('0x44')]({},_0x3681d9,_0x16e172[_0xb8c0('0x48')]);return db[_0xb8c0('0x35')][_0xb8c0('0x4f')](_0x3681d9)['then'](handleEntityNotFound(_0x5d45d1,null))['then'](respondWithResult(_0x5d45d1,null))[_0xb8c0('0x25')](handleError(_0x5d45d1,null));};exports[_0xb8c0('0x50')]=function(_0x5edb21,_0x452912){return db[_0xb8c0('0x35')][_0xb8c0('0x50')](_0x5edb21[_0xb8c0('0x51')],{})['then'](respondWithResult(_0x452912,0xc9))[_0xb8c0('0x25')](handleError(_0x452912,null));};exports[_0xb8c0('0x2e')]=function(_0x45525a,_0x59a46a){if(_0x45525a['body']['id']){delete _0x45525a[_0xb8c0('0x51')]['id'];}return db[_0xb8c0('0x35')][_0xb8c0('0x4f')]({'where':{'id':_0x45525a[_0xb8c0('0x4e')]['id']}})[_0xb8c0('0x1c')](handleEntityNotFound(_0x59a46a,null))[_0xb8c0('0x1c')](saveUpdates(_0x45525a[_0xb8c0('0x51')],null))[_0xb8c0('0x1c')](respondWithResult(_0x59a46a,null))[_0xb8c0('0x25')](handleError(_0x59a46a,null));};exports['destroy']=function(_0x550637,_0x18a491){return db[_0xb8c0('0x35')]['find']({'where':{'id':_0x550637[_0xb8c0('0x4e')]['id']}})[_0xb8c0('0x1c')](handleEntityNotFound(_0x18a491,null))[_0xb8c0('0x1c')](removeEntity(_0x18a491,null))[_0xb8c0('0x25')](handleError(_0x18a491,null));};exports[_0xb8c0('0x52')]=function(_0x826e15,_0x34b31e,_0x2af169){var _0xffd2f3={};var _0x44b871={};var _0x50c9d8;var _0x1ad067;return db[_0xb8c0('0x35')][_0xb8c0('0x53')]({'where':{'id':_0x826e15[_0xb8c0('0x4e')]['id']}})[_0xb8c0('0x1c')](handleEntityNotFound(_0x34b31e,null))[_0xb8c0('0x1c')](function(_0x157c27){if(_0x157c27){_0x50c9d8=_0x157c27;_0x44b871[_0xb8c0('0x38')]=_[_0xb8c0('0x3a')](db[_0xb8c0('0x54')][_0xb8c0('0x36')]);_0x44b871[_0xb8c0('0x39')]=_[_0xb8c0('0x3a')](_0x826e15['query']);_0x44b871['filters']=_[_0xb8c0('0x3d')](_0x44b871[_0xb8c0('0x38')],_0x44b871[_0xb8c0('0x39')]);_0xffd2f3['attributes']=_[_0xb8c0('0x3d')](_0x44b871[_0xb8c0('0x38')],qs[_0xb8c0('0x3e')](_0x826e15[_0xb8c0('0x39')][_0xb8c0('0x3e')]));_0xffd2f3[_0xb8c0('0x3c')]=_0xffd2f3[_0xb8c0('0x3c')][_0xb8c0('0x3f')]?_0xffd2f3['attributes']:_0x44b871[_0xb8c0('0x38')];_0xffd2f3[_0xb8c0('0x41')]=qs[_0xb8c0('0x42')](_0x826e15[_0xb8c0('0x39')]['sort']);_0xffd2f3[_0xb8c0('0x43')]=qs[_0xb8c0('0x3b')](_[_0xb8c0('0x55')](_0x826e15[_0xb8c0('0x39')],_0x44b871['filters']));if(_0x826e15['query'][_0xb8c0('0x47')]){_0xffd2f3[_0xb8c0('0x43')]=_[_0xb8c0('0x44')](_0xffd2f3['where'],{'$or':_[_0xb8c0('0x34')](_0xffd2f3['attributes'],function(_0x1ba887){var _0x1ffab2={};_0x1ffab2[_0x1ba887]={'$like':'%'+_0x826e15['query']['filter']+'%'};return _0x1ffab2;})});}_0xffd2f3=_['merge']({},_0xffd2f3,_0x826e15[_0xb8c0('0x48')]);return _0x50c9d8['getConfigurations'](_0xffd2f3);}})[_0xb8c0('0x1c')](function(_0x19bcc9){if(_0x19bcc9){_0x1ad067=_0x19bcc9['length'];if(!_0x826e15[_0xb8c0('0x39')][_0xb8c0('0x56')](_0xb8c0('0x40'))){_0xffd2f3['limit']=qs[_0xb8c0('0x2b')](_0x826e15[_0xb8c0('0x39')][_0xb8c0('0x2b')]);_0xffd2f3[_0xb8c0('0x29')]=qs['offset'](_0x826e15[_0xb8c0('0x39')][_0xb8c0('0x29')]);}return _0x50c9d8[_0xb8c0('0x52')](_0xffd2f3);}})[_0xb8c0('0x1c')](function(_0x400da1){if(_0x400da1){return _0x400da1?{'count':_0x1ad067,'rows':_0x400da1}:null;}})[_0xb8c0('0x1c')](respondWithResult(_0x34b31e,null))[_0xb8c0('0x25')](handleError(_0x34b31e,null));};exports['addConfiguration']=function(_0x2be546,_0x1bbb94,_0x39bb05){if(_0x2be546[_0xb8c0('0x51')]['id']){delete _0x2be546['body']['id'];}return db['FreshdeskAccount']['findOne']({'where':{'id':_0x2be546[_0xb8c0('0x4e')]['id']}})[_0xb8c0('0x1c')](handleEntityNotFound(_0x1bbb94,null))['then'](function(_0x4018c2){if(_0x4018c2){_0x2be546['body'][_0xb8c0('0x57')]=_0x4018c2['id'];_0x2be546['body'][_0xb8c0('0x58')]=integrations[_0xb8c0('0x59')](_0x2be546[_0xb8c0('0x51')][_0xb8c0('0x5a')],_0x2be546[_0xb8c0('0x51')][_0xb8c0('0x45')]);_0x2be546[_0xb8c0('0x51')]['Descriptions']=integrations[_0xb8c0('0x5b')](_0x2be546[_0xb8c0('0x51')][_0xb8c0('0x5a')],_0x2be546['body'][_0xb8c0('0x45')]);return db[_0xb8c0('0x54')]['create'](_0x2be546[_0xb8c0('0x51')],{'include':[{'model':db[_0xb8c0('0x5c')],'as':_0xb8c0('0x58')},{'model':db[_0xb8c0('0x5c')],'as':_0xb8c0('0x5d')}]});}return null;})['then'](respondWithResult(_0x1bbb94,null))['catch'](handleError(_0x1bbb94,null));};exports[_0xb8c0('0x5e')]=function(_0x5411fc,_0x24d782,_0xa4949f){var _0x37ef55='';return db['FreshdeskAccount']['findOne']({'where':{'id':_0x5411fc[_0xb8c0('0x4e')]['id']},'attributes':['id','remoteUri',_0xb8c0('0x5f')]})[_0xb8c0('0x1c')](handleEntityNotFound(_0x24d782,null))[_0xb8c0('0x1c')](function(_0x148d2a){if(_0x148d2a){_0x37ef55=_0x148d2a[_0xb8c0('0x60')];var _0x5d002f=_0x37ef55[_0xb8c0('0x61')](-0x1);if(_0x5d002f==='/'){_0x37ef55=_0x37ef55[_0xb8c0('0x62')](0x0,_0x37ef55[_0xb8c0('0x63')](_0x5d002f));}return rp({'method':_0xb8c0('0x64'),'uri':util[_0xb8c0('0x65')](_0xb8c0('0x66'),_0x37ef55,'api/v2/ticket_fields'),'headers':{'Authorization':util[_0xb8c0('0x65')](_0xb8c0('0x67'),new Buffer(util[_0xb8c0('0x65')](_0xb8c0('0x68'),_0x148d2a[_0xb8c0('0x5f')]))[_0xb8c0('0x69')](_0xb8c0('0x6a')))},'json':!![]});}})[_0xb8c0('0x1c')](function(_0x10886b){if(_0x10886b){var _0x557f79=['requester','subject','agent',_0xb8c0('0x6b'),_0xb8c0('0x27'),_0xb8c0('0x6c'),_0xb8c0('0x6d'),_0xb8c0('0x6e'),_0xb8c0('0x6f'),'group',_0xb8c0('0x70')];_[_0xb8c0('0x71')](_0x10886b,function(_0x12b70c){return _0x557f79[_0xb8c0('0x72')](_0x12b70c[_0xb8c0('0x31')])||!_0x12b70c[_0xb8c0('0x73')]&&_0x12b70c[_0xb8c0('0x45')]!==_0xb8c0('0x74')&&_0x12b70c[_0xb8c0('0x45')]!==_0xb8c0('0x75');});return{'count':_0x10886b[_0xb8c0('0x3f')],'rows':_[_0xb8c0('0x34')](_0x10886b,function(_0x1b48db){return{'id':_0x1b48db[_0xb8c0('0x31')],'name':_0x1b48db[_0xb8c0('0x76')],'custom':!_0x1b48db[_0xb8c0('0x73')],'options':_0x1b48db['choices']?_['map'](_0x1b48db['choices'],function(_0x772dd1){return{'name':_['capitalize'](_0x772dd1),'value':_0x772dd1};}):[]};})};}})[_0xb8c0('0x1c')](respondWithResult(_0x24d782,null))['catch'](function(_0x2950a3){var _0x31bf9e=_0x5411fc[_0xb8c0('0x39')][_0xb8c0('0x77')]?0x1f4:_0x2950a3['statusCode']||0x1f4;logger[_0xb8c0('0x21')](_0xb8c0('0x78'),_0xb8c0('0x5e'),_0x31bf9e,JSON[_0xb8c0('0x79')](_0x2950a3));delete _0x2950a3[_0xb8c0('0x31')];if(_0x31bf9e===0x191){_0x31bf9e=0x190;}_0x24d782[_0xb8c0('0x27')](_0x31bf9e)[_0xb8c0('0x32')](_0x5411fc[_0xb8c0('0x39')][_0xb8c0('0x77')]?{'message':'Wrong\x20credentials','statusCode':_0x2950a3[_0xb8c0('0x7a')]}:_0x2950a3);});}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js index e492f5e..cc8cec9 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 _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 +var _0x687b=['define','FreshdeskAccount','int_freshdesk_accounts','lodash','moment','request-promise','path','../../config/environment','./intFreshdeskAccount.attributes','../../components/integrations/configuration'];(function(_0x397c32,_0x1dbb84){var _0x59fbd3=function(_0x1b5203){while(--_0x1b5203){_0x397c32['push'](_0x397c32['shift']());}};_0x59fbd3(++_0x1dbb84);}(_0x687b,0x71));var _0xb687=function(_0x53b93b,_0x1bfab1){_0x53b93b=_0x53b93b-0x0;var _0x485761=_0x687b[_0x53b93b];return _0x485761;};'use strict';var _=require(_0xb687('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xb687('0x1'));var BPromise=require('bluebird');var rp=require(_0xb687('0x2'));var fs=require('fs');var path=require(_0xb687('0x3'));var rimraf=require('rimraf');var config=require(_0xb687('0x4'));var attributes=require(_0xb687('0x5'));var integrations=require(_0xb687('0x6'));module['exports']=function(_0x419fcd,_0x5c760f){return _0x419fcd[_0xb687('0x7')](_0xb687('0x8'),attributes,{'tableName':_0xb687('0x9'),'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 8b3c3e7..afdfd32 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 _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 +var _0xffc3=['util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','FreshdeskAccount,\x20%s,\x20%s','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','findAll','options','raw','attributes','limit','include','model','map','GetFreshdeskAccount','ShowFreshdeskAccount','FreshdeskAccount'];(function(_0xd765af,_0x176212){var _0x3b9421=function(_0x59e038){while(--_0x59e038){_0xd765af['push'](_0xd765af['shift']());}};_0x3b9421(++_0x176212);}(_0xffc3,0x129));var _0x3ffc=function(_0x438386,_0x4a5ff8){_0x438386=_0x438386-0x0;var _0x580538=_0xffc3[_0x438386];return _0x580538;};'use strict';var _=require('lodash');var util=require(_0x3ffc('0x0'));var moment=require(_0x3ffc('0x1'));var BPromise=require(_0x3ffc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3ffc('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x3ffc('0x4'))(_0x3ffc('0x5'));var config=require(_0x3ffc('0x6'));var jayson=require(_0x3ffc('0x7'));var client=jayson[_0x3ffc('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x22c898,_0xe379b3,_0x1eb62d){return new BPromise(function(_0x35adc6,_0x5abb95){return client[_0x3ffc('0x9')](_0x22c898,_0x1eb62d)[_0x3ffc('0xa')](function(_0x54d40e){logger['info'](_0x3ffc('0xb'),_0xe379b3,'request\x20sent');logger[_0x3ffc('0xc')](_0x3ffc('0xd'),_0xe379b3,_0x3ffc('0xe'),JSON[_0x3ffc('0xf')](_0x54d40e));if(_0x54d40e[_0x3ffc('0x10')]){if(_0x54d40e[_0x3ffc('0x10')][_0x3ffc('0x11')]===0x1f4){logger[_0x3ffc('0x10')](_0x3ffc('0xb'),_0xe379b3,_0x54d40e[_0x3ffc('0x10')][_0x3ffc('0x12')]);return _0x5abb95(_0x54d40e[_0x3ffc('0x10')][_0x3ffc('0x12')]);}logger[_0x3ffc('0x10')](_0x3ffc('0xb'),_0xe379b3,_0x54d40e['error'][_0x3ffc('0x12')]);return _0x35adc6(_0x54d40e[_0x3ffc('0x10')][_0x3ffc('0x12')]);}else{logger[_0x3ffc('0x13')]('FreshdeskAccount,\x20%s,\x20%s',_0xe379b3,_0x3ffc('0xe'));_0x35adc6(_0x54d40e[_0x3ffc('0x14')][_0x3ffc('0x12')]);}})[_0x3ffc('0x15')](function(_0x323333){logger[_0x3ffc('0x10')]('FreshdeskAccount,\x20%s,\x20%s',_0xe379b3,_0x323333);_0x5abb95(_0x323333);});});}exports['GetFreshdeskAccount']=function(_0x480f62){var _0x2dffd1=this;return new Promise(function(_0x12c031,_0xda1897){return db['FreshdeskAccount'][_0x3ffc('0x16')]({'raw':_0x480f62[_0x3ffc('0x17')]?_0x480f62[_0x3ffc('0x17')][_0x3ffc('0x18')]===undefined?!![]:![]:!![],'where':_0x480f62[_0x3ffc('0x17')]?_0x480f62[_0x3ffc('0x17')]['where']||null:null,'attributes':_0x480f62[_0x3ffc('0x17')]?_0x480f62[_0x3ffc('0x17')][_0x3ffc('0x19')]||null:null,'limit':_0x480f62['options']?_0x480f62[_0x3ffc('0x17')][_0x3ffc('0x1a')]||null:null,'include':_0x480f62[_0x3ffc('0x17')]?_0x480f62[_0x3ffc('0x17')][_0x3ffc('0x1b')]?_['map'](_0x480f62[_0x3ffc('0x17')]['include'],function(_0x4c36c8){return{'model':db[_0x4c36c8[_0x3ffc('0x1c')]],'as':_0x4c36c8['as'],'attributes':_0x4c36c8['attributes'],'include':_0x4c36c8[_0x3ffc('0x1b')]?_[_0x3ffc('0x1d')](_0x4c36c8[_0x3ffc('0x1b')],function(_0x190459){return{'model':db[_0x190459[_0x3ffc('0x1c')]],'as':_0x190459['as'],'attributes':_0x190459[_0x3ffc('0x19')],'include':_0x190459[_0x3ffc('0x1b')]?_[_0x3ffc('0x1d')](_0x190459[_0x3ffc('0x1b')],function(_0x317efd){return{'model':db[_0x317efd[_0x3ffc('0x1c')]],'as':_0x317efd['as'],'attributes':_0x317efd['attributes']};}):[]};}):[]};}):[]:[]})[_0x3ffc('0xa')](function(_0x5f44dd){logger[_0x3ffc('0x13')](_0x3ffc('0x1e'),_0x480f62);logger[_0x3ffc('0xc')](_0x3ffc('0x1e'),_0x480f62,JSON[_0x3ffc('0xf')](_0x5f44dd));_0x12c031(_0x5f44dd);})[_0x3ffc('0x15')](function(_0xae07f1){logger[_0x3ffc('0x10')](_0x3ffc('0x1e'),_0xae07f1['message'],_0x480f62);_0xda1897(_0x2dffd1[_0x3ffc('0x10')](0x1f4,_0xae07f1[_0x3ffc('0x12')]));});});};exports[_0x3ffc('0x1f')]=function(_0x3ee549){var _0xac10a6=this;return new Promise(function(_0x1e8bb3,_0x218897){return db[_0x3ffc('0x20')]['find']({'raw':_0x3ee549[_0x3ffc('0x17')]?_0x3ee549[_0x3ffc('0x17')][_0x3ffc('0x18')]===undefined?!![]:![]:!![],'where':_0x3ee549[_0x3ffc('0x17')]?_0x3ee549['options']['where']||null:null,'attributes':_0x3ee549['options']?_0x3ee549['options'][_0x3ffc('0x19')]||null:null,'include':_0x3ee549[_0x3ffc('0x17')]?_0x3ee549[_0x3ffc('0x17')]['include']?_[_0x3ffc('0x1d')](_0x3ee549['options'][_0x3ffc('0x1b')],function(_0x47dcb1){return{'model':db[_0x47dcb1[_0x3ffc('0x1c')]],'as':_0x47dcb1['as'],'attributes':_0x47dcb1['attributes'],'include':_0x47dcb1[_0x3ffc('0x1b')]?_[_0x3ffc('0x1d')](_0x47dcb1['include'],function(_0x345b13){return{'model':db[_0x345b13[_0x3ffc('0x1c')]],'as':_0x345b13['as'],'attributes':_0x345b13['attributes'],'include':_0x345b13['include']?_[_0x3ffc('0x1d')](_0x345b13['include'],function(_0x4310b6){return{'model':db[_0x4310b6['model']],'as':_0x4310b6['as'],'attributes':_0x4310b6[_0x3ffc('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x48ab22){logger[_0x3ffc('0x13')]('ShowFreshdeskAccount',_0x3ee549);logger[_0x3ffc('0xc')](_0x3ffc('0x1f'),_0x3ee549,JSON['stringify'](_0x48ab22));_0x1e8bb3(_0x48ab22);})[_0x3ffc('0x15')](function(_0x20c18d){logger[_0x3ffc('0x10')](_0x3ffc('0x1f'),_0x20c18d[_0x3ffc('0x12')],_0x3ee549);_0x218897(_0xac10a6[_0x3ffc('0x10')](0x1f4,_0x20c18d[_0x3ffc('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/index.js b/server/api/intFreshdeskConfiguration/index.js index e4c0c30..c3c3c1c 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 _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 +var _0x9ada=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intFreshdeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','getTags','create','/:id/tags','put'];(function(_0x2ea55d,_0x55fbd9){var _0x2e94a1=function(_0x1d935d){while(--_0x1d935d){_0x2ea55d['push'](_0x2ea55d['shift']());}};_0x2e94a1(++_0x55fbd9);}(_0x9ada,0x154));var _0xa9ad=function(_0x1e2360,_0x3f8448){_0x1e2360=_0x1e2360-0x0;var _0x4a943c=_0x9ada[_0x1e2360];return _0x4a943c;};'use strict';var multer=require(_0xa9ad('0x0'));var util=require(_0xa9ad('0x1'));var path=require(_0xa9ad('0x2'));var timeout=require(_0xa9ad('0x3'));var express=require(_0xa9ad('0x4'));var router=express[_0xa9ad('0x5')]();var fs_extra=require(_0xa9ad('0x6'));var auth=require(_0xa9ad('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xa9ad('0x8'));var controller=require(_0xa9ad('0x9'));router[_0xa9ad('0xa')]('/',auth[_0xa9ad('0xb')](),controller[_0xa9ad('0xc')]);router['get'](_0xa9ad('0xd'),auth['isAuthenticated'](),controller[_0xa9ad('0xe')]);router[_0xa9ad('0xa')](_0xa9ad('0xf'),auth[_0xa9ad('0xb')](),controller['getFields']);router[_0xa9ad('0xa')](_0xa9ad('0x10'),auth[_0xa9ad('0xb')](),controller[_0xa9ad('0x11')]);router[_0xa9ad('0xa')](_0xa9ad('0x12'),auth[_0xa9ad('0xb')](),controller[_0xa9ad('0x13')]);router[_0xa9ad('0xa')]('/:id/tags',auth[_0xa9ad('0xb')](),controller[_0xa9ad('0x14')]);router['post']('/',auth['isAuthenticated'](),controller[_0xa9ad('0x15')]);router['post'](_0xa9ad('0x16'),auth[_0xa9ad('0xb')](),controller['setTags']);router[_0xa9ad('0x17')](_0xa9ad('0xd'),auth[_0xa9ad('0xb')](),controller[_0xa9ad('0x18')]);router[_0xa9ad('0x19')](_0xa9ad('0xd'),auth[_0xa9ad('0xb')](),controller[_0xa9ad('0x1a')]);module[_0xa9ad('0x1b')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js index 8ab32c7..eb8f821 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 _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 +var _0xa484=['exports','STRING','sequelize'];(function(_0x286a3b,_0x268d13){var _0x8bcb91=function(_0x179cc5){while(--_0x179cc5){_0x286a3b['push'](_0x286a3b['shift']());}};_0x8bcb91(++_0x268d13);}(_0xa484,0x8f));var _0x4a48=function(_0x2ed93c,_0x28b495){_0x2ed93c=_0x2ed93c-0x0;var _0x4c0d8a=_0xa484[_0x2ed93c];return _0x4c0d8a;};'use strict';var Sequelize=require(_0x4a48('0x0'));module[_0x4a48('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x4a48('0x2')]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js index 78e35ab..55dc657 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 _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 +var _0xe46c=['FreshdeskConfiguration,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','save','destroy','name','index','map','FreshdeskConfiguration','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','show','find','create','body','update','params','getFields','findOne','FreshdeskField','rawAttributes','nolimit','getSubjects','order','getDescriptions','getTags','setTags','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../mysqldb','jayson/promise','client','http','request','then','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x86db6b,_0x445e69){var _0x2e8a41=function(_0x29371e){while(--_0x29371e){_0x86db6b['push'](_0x86db6b['shift']());}};_0x2e8a41(++_0x445e69);}(_0xe46c,0xf5));var _0xce46=function(_0x3dc7e5,_0xed05fc){_0x3dc7e5=_0x3dc7e5-0x0;var _0x3cd354=_0xe46c[_0x3dc7e5];return _0x3cd354;};'use strict';var emlformat=require(_0xce46('0x0'));var rimraf=require(_0xce46('0x1'));var zipdir=require(_0xce46('0x2'));var jsonpatch=require(_0xce46('0x3'));var rp=require(_0xce46('0x4'));var moment=require(_0xce46('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xce46('0x6'));var util=require(_0xce46('0x7'));var path=require(_0xce46('0x8'));var sox=require(_0xce46('0x9'));var csv=require(_0xce46('0xa'));var ejs=require(_0xce46('0xb'));var fs=require('fs');var fs_extra=require(_0xce46('0xc'));var _=require(_0xce46('0xd'));var squel=require(_0xce46('0xe'));var crypto=require(_0xce46('0xf'));var jsforce=require(_0xce46('0x10'));var deskjs=require(_0xce46('0x11'));var toCsv=require(_0xce46('0xa'));var querystring=require('querystring');var Papa=require(_0xce46('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xce46('0x13'));var as=require(_0xce46('0x14'));var hardwareService=require(_0xce46('0x15'));var logger=require('../../config/logger')(_0xce46('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xce46('0x17'))['db'];var jayson=require(_0xce46('0x18'));var client=jayson[_0xce46('0x19')][_0xce46('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x1bdf1a,_0x4ca9bf,_0x3f91d4,_0x878251){return new BPromise(function(_0x59d0f0,_0x2819d8){var _0x4531e3=_0x878251||client;return _0x4531e3[_0xce46('0x1b')](_0x1bdf1a,_0x3f91d4)[_0xce46('0x1c')](function(_0x91c415){logger['info']('FreshdeskConfiguration,\x20%s,\x20%s',_0x4ca9bf,_0xce46('0x1d'));logger[_0xce46('0x1e')](_0xce46('0x1f'),_0x4ca9bf,_0xce46('0x1d'),JSON['stringify'](_0x91c415));if(_0x91c415[_0xce46('0x20')]){if(_0x91c415[_0xce46('0x20')][_0xce46('0x21')]===0x1f4){logger[_0xce46('0x20')](_0xce46('0x22'),_0x4ca9bf,_0x91c415[_0xce46('0x20')][_0xce46('0x23')]);return _0x2819d8(_0x91c415[_0xce46('0x20')]['message']);}logger['error'](_0xce46('0x22'),_0x4ca9bf,_0x91c415['error']['message']);return _0x59d0f0(_0x91c415['error'][_0xce46('0x23')]);}else{logger[_0xce46('0x24')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x4ca9bf,_0xce46('0x1d'));_0x59d0f0(_0x91c415[_0xce46('0x25')][_0xce46('0x23')]);}})[_0xce46('0x26')](function(_0x1d3b87){logger['error']('FreshdeskConfiguration,\x20%s,\x20%s',_0x4ca9bf,_0x1d3b87);_0x2819d8(_0x1d3b87);});});}function respondWithStatusCode(_0x4e7c47,_0x1f5474){_0x1f5474=_0x1f5474||0xcc;return function(_0x28f7de){if(_0x28f7de){return _0x4e7c47[_0xce46('0x27')](_0x1f5474);}return _0x4e7c47[_0xce46('0x28')](_0x1f5474)[_0xce46('0x29')]();};}function respondWithResult(_0x1cf144,_0x1d68ed){_0x1d68ed=_0x1d68ed||0xc8;return function(_0x222812){if(_0x222812){return _0x1cf144[_0xce46('0x28')](_0x1d68ed)[_0xce46('0x2a')](_0x222812);}};}function respondWithFilteredResult(_0x2dfe43,_0x1cab89){return function(_0x4d6661){if(_0x4d6661){var _0x3223b5=typeof _0x1cab89[_0xce46('0x2b')]===_0xce46('0x2c')&&typeof _0x1cab89['limit']===_0xce46('0x2c');var _0x282c4c=_0x4d6661[_0xce46('0x2d')];var _0x50d87d=_0x3223b5?0x0:_0x1cab89['offset'];var _0x49da74=_0x3223b5?_0x4d6661[_0xce46('0x2d')]:_0x1cab89[_0xce46('0x2b')]+_0x1cab89[_0xce46('0x2e')];var _0x141887;if(_0x49da74>=_0x282c4c){_0x49da74=_0x282c4c;_0x141887=0xc8;}else{_0x141887=0xce;}_0x2dfe43[_0xce46('0x28')](_0x141887);return _0x2dfe43['set'](_0xce46('0x2f'),_0x50d87d+'-'+_0x49da74+'/'+_0x282c4c)['json'](_0x4d6661);}return null;};}function patchUpdates(_0x49530e){return function(_0x2b30b9){try{jsonpatch[_0xce46('0x30')](_0x2b30b9,_0x49530e,!![]);}catch(_0x53c87d){return BPromise[_0xce46('0x31')](_0x53c87d);}return _0x2b30b9[_0xce46('0x32')]();};}function saveUpdates(_0x35565c,_0x4c2c0a){return function(_0x40e930){if(_0x40e930){return _0x40e930['update'](_0x35565c)[_0xce46('0x1c')](function(_0x2f7a52){return _0x2f7a52;});}return null;};}function removeEntity(_0x44d86a,_0x737c3b){return function(_0x1db8ce){if(_0x1db8ce){return _0x1db8ce[_0xce46('0x33')]()[_0xce46('0x1c')](function(){_0x44d86a[_0xce46('0x28')](0xcc)[_0xce46('0x29')]();});}};}function handleEntityNotFound(_0x1b27a4,_0x4db117){return function(_0x48f2ec){if(!_0x48f2ec){_0x1b27a4[_0xce46('0x27')](0x194);}return _0x48f2ec;};}function handleError(_0x4797f0,_0x1b0748){_0x1b0748=_0x1b0748||0x1f4;return function(_0x479d2d){logger[_0xce46('0x20')](_0x479d2d['stack']);if(_0x479d2d[_0xce46('0x34')]){delete _0x479d2d[_0xce46('0x34')];}_0x4797f0['status'](_0x1b0748)['send'](_0x479d2d);};}exports[_0xce46('0x35')]=function(_0x155067,_0x47ffe0){var _0x4dae62={},_0x15b508={},_0x5b1c35={'count':0x0,'rows':[]};var _0x311db4=_[_0xce46('0x36')](db[_0xce46('0x37')]['rawAttributes'],function(_0x3d0f90){return{'name':_0x3d0f90[_0xce46('0x38')],'type':_0x3d0f90[_0xce46('0x39')]['key']};});_0x15b508[_0xce46('0x3a')]=_['map'](_0x311db4,_0xce46('0x34'));_0x15b508[_0xce46('0x3b')]=_[_0xce46('0x3c')](_0x155067['query']);_0x15b508[_0xce46('0x3d')]=_[_0xce46('0x3e')](_0x15b508[_0xce46('0x3a')],_0x15b508[_0xce46('0x3b')]);_0x4dae62[_0xce46('0x3f')]=_[_0xce46('0x3e')](_0x15b508[_0xce46('0x3a')],qs[_0xce46('0x40')](_0x155067[_0xce46('0x3b')][_0xce46('0x40')]));_0x4dae62['attributes']=_0x4dae62[_0xce46('0x3f')][_0xce46('0x41')]?_0x4dae62[_0xce46('0x3f')]:_0x15b508[_0xce46('0x3a')];if(!_0x155067[_0xce46('0x3b')][_0xce46('0x42')]('nolimit')){_0x4dae62[_0xce46('0x2e')]=qs[_0xce46('0x2e')](_0x155067[_0xce46('0x3b')][_0xce46('0x2e')]);_0x4dae62[_0xce46('0x2b')]=qs[_0xce46('0x2b')](_0x155067[_0xce46('0x3b')][_0xce46('0x2b')]);}_0x4dae62['order']=qs[_0xce46('0x43')](_0x155067[_0xce46('0x3b')][_0xce46('0x43')]);_0x4dae62[_0xce46('0x44')]=qs[_0xce46('0x3d')](_[_0xce46('0x45')](_0x155067[_0xce46('0x3b')],_0x15b508[_0xce46('0x3d')]),_0x311db4);if(_0x155067['query'][_0xce46('0x46')]){_0x4dae62['where']=_[_0xce46('0x47')](_0x4dae62[_0xce46('0x44')],{'$or':_[_0xce46('0x36')](_0x311db4,function(_0x16cf4a){if(_0x16cf4a[_0xce46('0x39')]!=='VIRTUAL'){var _0x46fed6={};_0x46fed6[_0x16cf4a['name']]={'$like':'%'+_0x155067[_0xce46('0x3b')][_0xce46('0x46')]+'%'};return _0x46fed6;}})});}_0x4dae62=_['merge']({},_0x4dae62,_0x155067[_0xce46('0x48')]);var _0x5094f8={'where':_0x4dae62[_0xce46('0x44')]};return db['FreshdeskConfiguration'][_0xce46('0x2d')](_0x5094f8)[_0xce46('0x1c')](function(_0x3f5f17){_0x5b1c35['count']=_0x3f5f17;if(_0x155067['query'][_0xce46('0x49')]){_0x4dae62[_0xce46('0x4a')]=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0xce46('0x4b')](_0x4dae62);})['then'](function(_0x131878){_0x5b1c35[_0xce46('0x4c')]=_0x131878;return _0x5b1c35;})['then'](respondWithFilteredResult(_0x47ffe0,_0x4dae62))[_0xce46('0x26')](handleError(_0x47ffe0,null));};exports[_0xce46('0x4d')]=function(_0x10e85c,_0xe88a6){var _0x30387e={'raw':![],'where':{'id':_0x10e85c['params']['id']}},_0xfdaac3={};_0xfdaac3[_0xce46('0x3a')]=_[_0xce46('0x3c')](db[_0xce46('0x37')]['rawAttributes']);_0xfdaac3[_0xce46('0x3b')]=_[_0xce46('0x3c')](_0x10e85c['query']);_0xfdaac3[_0xce46('0x3d')]=_[_0xce46('0x3e')](_0xfdaac3[_0xce46('0x3a')],_0xfdaac3['query']);_0x30387e['attributes']=_[_0xce46('0x3e')](_0xfdaac3[_0xce46('0x3a')],qs['fields'](_0x10e85c[_0xce46('0x3b')]['fields']));_0x30387e[_0xce46('0x3f')]=_0x30387e[_0xce46('0x3f')][_0xce46('0x41')]?_0x30387e[_0xce46('0x3f')]:_0xfdaac3[_0xce46('0x3a')];if(_0x10e85c[_0xce46('0x3b')][_0xce46('0x49')]){_0x30387e['include']=[{'all':!![]}];}_0x30387e=_[_0xce46('0x47')]({},_0x30387e,_0x10e85c[_0xce46('0x48')]);return db['FreshdeskConfiguration'][_0xce46('0x4e')](_0x30387e)[_0xce46('0x1c')](handleEntityNotFound(_0xe88a6,null))[_0xce46('0x1c')](respondWithResult(_0xe88a6,null))[_0xce46('0x26')](handleError(_0xe88a6,null));};exports['create']=function(_0x7ec201,_0x10711a){return db['FreshdeskConfiguration'][_0xce46('0x4f')](_0x7ec201[_0xce46('0x50')],{})[_0xce46('0x1c')](respondWithResult(_0x10711a,0xc9))['catch'](handleError(_0x10711a,null));};exports[_0xce46('0x51')]=function(_0x36055f,_0x4b09ec){if(_0x36055f['body']['id']){delete _0x36055f[_0xce46('0x50')]['id'];}return db[_0xce46('0x37')]['find']({'where':{'id':_0x36055f[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x4b09ec,null))['then'](saveUpdates(_0x36055f[_0xce46('0x50')],null))[_0xce46('0x1c')](respondWithResult(_0x4b09ec,null))[_0xce46('0x26')](handleError(_0x4b09ec,null));};exports['destroy']=function(_0x13ad55,_0x1580d4){return db[_0xce46('0x37')][_0xce46('0x4e')]({'where':{'id':_0x13ad55[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x1580d4,null))[_0xce46('0x1c')](removeEntity(_0x1580d4,null))['catch'](handleError(_0x1580d4,null));};exports[_0xce46('0x53')]=function(_0x5ab917,_0x32f73c,_0x41cd91){var _0x4733e0={};var _0x15242d={};var _0x34232c;var _0x361986;return db[_0xce46('0x37')][_0xce46('0x54')]({'where':{'id':_0x5ab917[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x32f73c,null))[_0xce46('0x1c')](function(_0x1aece2){if(_0x1aece2){_0x34232c=_0x1aece2;_0x15242d['model']=_[_0xce46('0x3c')](db[_0xce46('0x55')][_0xce46('0x56')]);_0x15242d['query']=_[_0xce46('0x3c')](_0x5ab917['query']);_0x15242d['filters']=_[_0xce46('0x3e')](_0x15242d[_0xce46('0x3a')],_0x15242d[_0xce46('0x3b')]);_0x4733e0[_0xce46('0x3f')]=_[_0xce46('0x3e')](_0x15242d[_0xce46('0x3a')],qs['fields'](_0x5ab917[_0xce46('0x3b')][_0xce46('0x40')]));_0x4733e0['attributes']=_0x4733e0['attributes'][_0xce46('0x41')]?_0x4733e0[_0xce46('0x3f')]:_0x15242d[_0xce46('0x3a')];_0x4733e0['order']=qs[_0xce46('0x43')](_0x5ab917[_0xce46('0x3b')][_0xce46('0x43')]);_0x4733e0[_0xce46('0x44')]=qs[_0xce46('0x3d')](_[_0xce46('0x45')](_0x5ab917['query'],_0x15242d[_0xce46('0x3d')]));if(_0x5ab917[_0xce46('0x3b')][_0xce46('0x46')]){_0x4733e0[_0xce46('0x44')]=_[_0xce46('0x47')](_0x4733e0[_0xce46('0x44')],{'$or':_[_0xce46('0x36')](_0x4733e0[_0xce46('0x3f')],function(_0x4d7812){var _0x3e4aee={};_0x3e4aee[_0x4d7812]={'$like':'%'+_0x5ab917[_0xce46('0x3b')][_0xce46('0x46')]+'%'};return _0x3e4aee;})});}_0x4733e0=_[_0xce46('0x47')]({},_0x4733e0,_0x5ab917[_0xce46('0x48')]);return _0x34232c[_0xce46('0x53')](_0x4733e0);}})['then'](function(_0x1813cf){if(_0x1813cf){_0x361986=_0x1813cf[_0xce46('0x41')];if(!_0x5ab917['query'][_0xce46('0x42')](_0xce46('0x57'))){_0x4733e0[_0xce46('0x2e')]=qs[_0xce46('0x2e')](_0x5ab917['query'][_0xce46('0x2e')]);_0x4733e0[_0xce46('0x2b')]=qs[_0xce46('0x2b')](_0x5ab917['query'][_0xce46('0x2b')]);}return _0x34232c[_0xce46('0x53')](_0x4733e0);}})[_0xce46('0x1c')](function(_0x5578c7){if(_0x5578c7){return _0x5578c7?{'count':_0x361986,'rows':_0x5578c7}:null;}})[_0xce46('0x1c')](respondWithResult(_0x32f73c,null))[_0xce46('0x26')](handleError(_0x32f73c,null));};exports[_0xce46('0x58')]=function(_0x456d20,_0x343b2a,_0x43078b){var _0x30015e={};var _0x138ea3={};var _0x5b919a;var _0x211839;return db[_0xce46('0x37')][_0xce46('0x54')]({'where':{'id':_0x456d20[_0xce46('0x52')]['id']}})['then'](handleEntityNotFound(_0x343b2a,null))[_0xce46('0x1c')](function(_0x424fc4){if(_0x424fc4){_0x5b919a=_0x424fc4;_0x138ea3[_0xce46('0x3a')]=_[_0xce46('0x3c')](db[_0xce46('0x55')][_0xce46('0x56')]);_0x138ea3[_0xce46('0x3b')]=_[_0xce46('0x3c')](_0x456d20[_0xce46('0x3b')]);_0x138ea3['filters']=_['intersection'](_0x138ea3[_0xce46('0x3a')],_0x138ea3[_0xce46('0x3b')]);_0x30015e[_0xce46('0x3f')]=_[_0xce46('0x3e')](_0x138ea3['model'],qs[_0xce46('0x40')](_0x456d20[_0xce46('0x3b')]['fields']));_0x30015e[_0xce46('0x3f')]=_0x30015e[_0xce46('0x3f')][_0xce46('0x41')]?_0x30015e['attributes']:_0x138ea3['model'];_0x30015e[_0xce46('0x59')]=qs['sort'](_0x456d20[_0xce46('0x3b')][_0xce46('0x43')]);_0x30015e['where']=qs[_0xce46('0x3d')](_[_0xce46('0x45')](_0x456d20[_0xce46('0x3b')],_0x138ea3['filters']));if(_0x456d20[_0xce46('0x3b')][_0xce46('0x46')]){_0x30015e[_0xce46('0x44')]=_['merge'](_0x30015e['where'],{'$or':_[_0xce46('0x36')](_0x30015e[_0xce46('0x3f')],function(_0x458477){var _0x668eaa={};_0x668eaa[_0x458477]={'$like':'%'+_0x456d20['query'][_0xce46('0x46')]+'%'};return _0x668eaa;})});}_0x30015e=_[_0xce46('0x47')]({},_0x30015e,_0x456d20[_0xce46('0x48')]);return _0x5b919a[_0xce46('0x58')](_0x30015e);}})[_0xce46('0x1c')](function(_0x3982be){if(_0x3982be){_0x211839=_0x3982be[_0xce46('0x41')];if(!_0x456d20[_0xce46('0x3b')][_0xce46('0x42')](_0xce46('0x57'))){_0x30015e[_0xce46('0x2e')]=qs[_0xce46('0x2e')](_0x456d20[_0xce46('0x3b')][_0xce46('0x2e')]);_0x30015e['offset']=qs[_0xce46('0x2b')](_0x456d20[_0xce46('0x3b')][_0xce46('0x2b')]);}return _0x5b919a[_0xce46('0x58')](_0x30015e);}})[_0xce46('0x1c')](function(_0x32e470){if(_0x32e470){return _0x32e470?{'count':_0x211839,'rows':_0x32e470}:null;}})[_0xce46('0x1c')](respondWithResult(_0x343b2a,null))[_0xce46('0x26')](handleError(_0x343b2a,null));};exports[_0xce46('0x5a')]=function(_0x2c8072,_0x3e33de,_0x567d68){var _0x3bb3c9={};var _0x3f15f8={};var _0x3c8b04;var _0x5d3107;return db[_0xce46('0x37')][_0xce46('0x54')]({'where':{'id':_0x2c8072[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x3e33de,null))[_0xce46('0x1c')](function(_0x40a503){if(_0x40a503){_0x3c8b04=_0x40a503;_0x3f15f8[_0xce46('0x3a')]=_[_0xce46('0x3c')](db['FreshdeskField'][_0xce46('0x56')]);_0x3f15f8[_0xce46('0x3b')]=_[_0xce46('0x3c')](_0x2c8072[_0xce46('0x3b')]);_0x3f15f8[_0xce46('0x3d')]=_[_0xce46('0x3e')](_0x3f15f8[_0xce46('0x3a')],_0x3f15f8[_0xce46('0x3b')]);_0x3bb3c9['attributes']=_['intersection'](_0x3f15f8['model'],qs[_0xce46('0x40')](_0x2c8072['query']['fields']));_0x3bb3c9[_0xce46('0x3f')]=_0x3bb3c9[_0xce46('0x3f')][_0xce46('0x41')]?_0x3bb3c9['attributes']:_0x3f15f8[_0xce46('0x3a')];_0x3bb3c9[_0xce46('0x59')]=qs[_0xce46('0x43')](_0x2c8072[_0xce46('0x3b')][_0xce46('0x43')]);_0x3bb3c9['where']=qs[_0xce46('0x3d')](_['pick'](_0x2c8072['query'],_0x3f15f8['filters']));if(_0x2c8072[_0xce46('0x3b')]['filter']){_0x3bb3c9['where']=_[_0xce46('0x47')](_0x3bb3c9[_0xce46('0x44')],{'$or':_[_0xce46('0x36')](_0x3bb3c9[_0xce46('0x3f')],function(_0x31434f){var _0x3ef91b={};_0x3ef91b[_0x31434f]={'$like':'%'+_0x2c8072[_0xce46('0x3b')][_0xce46('0x46')]+'%'};return _0x3ef91b;})});}_0x3bb3c9=_['merge']({},_0x3bb3c9,_0x2c8072['options']);return _0x3c8b04[_0xce46('0x5a')](_0x3bb3c9);}})[_0xce46('0x1c')](function(_0x3853fa){if(_0x3853fa){_0x5d3107=_0x3853fa[_0xce46('0x41')];if(!_0x2c8072['query'][_0xce46('0x42')](_0xce46('0x57'))){_0x3bb3c9[_0xce46('0x2e')]=qs[_0xce46('0x2e')](_0x2c8072[_0xce46('0x3b')][_0xce46('0x2e')]);_0x3bb3c9[_0xce46('0x2b')]=qs['offset'](_0x2c8072['query'][_0xce46('0x2b')]);}return _0x3c8b04[_0xce46('0x5a')](_0x3bb3c9);}})[_0xce46('0x1c')](function(_0x64659b){if(_0x64659b){return _0x64659b?{'count':_0x5d3107,'rows':_0x64659b}:null;}})['then'](respondWithResult(_0x3e33de,null))[_0xce46('0x26')](handleError(_0x3e33de,null));};exports[_0xce46('0x5b')]=function(_0x356456,_0x2360f8,_0xc641ce){var _0x1a85c0={};var _0x58b7bf={};var _0x3e983d;var _0x534ec7;return db[_0xce46('0x37')]['findOne']({'where':{'id':_0x356456[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x2360f8,null))[_0xce46('0x1c')](function(_0x212a2b){if(_0x212a2b){_0x3e983d=_0x212a2b;_0x58b7bf[_0xce46('0x3a')]=_[_0xce46('0x3c')](db['Tag'][_0xce46('0x56')]);_0x58b7bf[_0xce46('0x3b')]=_['keys'](_0x356456[_0xce46('0x3b')]);_0x58b7bf[_0xce46('0x3d')]=_[_0xce46('0x3e')](_0x58b7bf[_0xce46('0x3a')],_0x58b7bf[_0xce46('0x3b')]);_0x1a85c0[_0xce46('0x3f')]=_[_0xce46('0x3e')](_0x58b7bf[_0xce46('0x3a')],qs['fields'](_0x356456[_0xce46('0x3b')]['fields']));_0x1a85c0[_0xce46('0x3f')]=_0x1a85c0[_0xce46('0x3f')][_0xce46('0x41')]?_0x1a85c0[_0xce46('0x3f')]:_0x58b7bf[_0xce46('0x3a')];_0x1a85c0[_0xce46('0x59')]=qs[_0xce46('0x43')](_0x356456[_0xce46('0x3b')][_0xce46('0x43')]);_0x1a85c0[_0xce46('0x44')]=qs[_0xce46('0x3d')](_[_0xce46('0x45')](_0x356456['query'],_0x58b7bf[_0xce46('0x3d')]));if(_0x356456[_0xce46('0x3b')]['filter']){_0x1a85c0[_0xce46('0x44')]=_[_0xce46('0x47')](_0x1a85c0[_0xce46('0x44')],{'$or':_[_0xce46('0x36')](_0x1a85c0[_0xce46('0x3f')],function(_0x49d7b9){var _0x19bcef={};_0x19bcef[_0x49d7b9]={'$like':'%'+_0x356456[_0xce46('0x3b')]['filter']+'%'};return _0x19bcef;})});}_0x1a85c0=_['merge']({},_0x1a85c0,_0x356456[_0xce46('0x48')]);return _0x3e983d[_0xce46('0x5b')](_0x1a85c0);}})['then'](function(_0x438b10){if(_0x438b10){_0x534ec7=_0x438b10[_0xce46('0x41')];if(!_0x356456[_0xce46('0x3b')][_0xce46('0x42')](_0xce46('0x57'))){_0x1a85c0[_0xce46('0x2e')]=qs[_0xce46('0x2e')](_0x356456[_0xce46('0x3b')][_0xce46('0x2e')]);_0x1a85c0[_0xce46('0x2b')]=qs[_0xce46('0x2b')](_0x356456[_0xce46('0x3b')][_0xce46('0x2b')]);}return _0x3e983d[_0xce46('0x5b')](_0x1a85c0);}})['then'](function(_0x68a5b6){if(_0x68a5b6){return _0x68a5b6?{'count':_0x534ec7,'rows':_0x68a5b6}:null;}})['then'](respondWithResult(_0x2360f8,null))['catch'](handleError(_0x2360f8,null));};exports[_0xce46('0x5c')]=function(_0x34df0d,_0x3a8b08,_0x3f8ccf){if(_0x34df0d[_0xce46('0x50')]['id']){delete _0x34df0d[_0xce46('0x50')]['id'];}return db['FreshdeskConfiguration'][_0xce46('0x54')]({'where':{'id':_0x34df0d[_0xce46('0x52')]['id']}})[_0xce46('0x1c')](handleEntityNotFound(_0x3a8b08,null))[_0xce46('0x1c')](function(_0x5000a3){if(_0x5000a3){return _0x5000a3['setTags'](_0x34df0d['body']['ids']||[]);}return null;})['then'](respondWithResult(_0x3a8b08,null))[_0xce46('0x26')](handleError(_0x3a8b08,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js index 4195168..16b0de4 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 _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 +var _0x83f0=['api','moment','bluebird','request-promise','path','rimraf','exports','define','int_freshdesk_configurations','util','../../config/logger'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0x83f0,0xae));var _0x083f=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x83f0[_0x40a045];return _0x1a687c;};'use strict';var _=require('lodash');var util=require(_0x083f('0x0'));var logger=require(_0x083f('0x1'))(_0x083f('0x2'));var moment=require(_0x083f('0x3'));var BPromise=require(_0x083f('0x4'));var rp=require(_0x083f('0x5'));var fs=require('fs');var path=require(_0x083f('0x6'));var rimraf=require(_0x083f('0x7'));var config=require('../../config/environment');var attributes=require('./intFreshdeskConfiguration.attributes');module[_0x083f('0x8')]=function(_0x3e6ca1,_0x53c398){return _0x3e6ca1[_0x083f('0x9')]('FreshdeskConfiguration',attributes,{'tableName':_0x083f('0xa'),'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 53e3736..e996737 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 _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 +var _0x45e4=['FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','info','result','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0x45e4,0x77));var _0x445e=function(_0x17777a,_0x31b31d){_0x17777a=_0x17777a-0x0;var _0x2c89f6=_0x45e4[_0x17777a];return _0x2c89f6;};'use strict';var _=require(_0x445e('0x0'));var util=require(_0x445e('0x1'));var moment=require(_0x445e('0x2'));var BPromise=require('bluebird');var rs=require(_0x445e('0x3'));var fs=require('fs');var Redis=require(_0x445e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x445e('0x5'));var logger=require(_0x445e('0x6'))(_0x445e('0x7'));var config=require(_0x445e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x445e('0x9')][_0x445e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4c28f0,_0x2d3283,_0x333fca){return new BPromise(function(_0x5dda5d,_0x4fe5d3){return client[_0x445e('0xb')](_0x4c28f0,_0x333fca)[_0x445e('0xc')](function(_0x5655c5){logger['info'](_0x445e('0xd'),_0x2d3283,_0x445e('0xe'));logger[_0x445e('0xf')](_0x445e('0x10'),_0x2d3283,_0x445e('0xe'),JSON['stringify'](_0x5655c5));if(_0x5655c5[_0x445e('0x11')]){if(_0x5655c5['error'][_0x445e('0x12')]===0x1f4){logger[_0x445e('0x11')](_0x445e('0xd'),_0x2d3283,_0x5655c5[_0x445e('0x11')][_0x445e('0x13')]);return _0x4fe5d3(_0x5655c5[_0x445e('0x11')]['message']);}logger[_0x445e('0x11')](_0x445e('0xd'),_0x2d3283,_0x5655c5['error'][_0x445e('0x13')]);return _0x5dda5d(_0x5655c5['error'][_0x445e('0x13')]);}else{logger[_0x445e('0x14')](_0x445e('0xd'),_0x2d3283,_0x445e('0xe'));_0x5dda5d(_0x5655c5[_0x445e('0x15')]['message']);}})['catch'](function(_0x36a46d){logger[_0x445e('0x11')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x2d3283,_0x36a46d);_0x4fe5d3(_0x36a46d);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskField/index.js b/server/api/intFreshdeskField/index.js index b2e688f..36b50a8 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 _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 +var _0x0a03=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskField.controller','get','isAuthenticated','index','/:id','create','put','update','delete','destroy','multer','util','path','Router'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0a03,0x12e));var _0x30a0=function(_0x3677ae,_0x530d0c){_0x3677ae=_0x3677ae-0x0;var _0x1f68ff=_0x0a03[_0x3677ae];return _0x1f68ff;};'use strict';var multer=require(_0x30a0('0x0'));var util=require(_0x30a0('0x1'));var path=require(_0x30a0('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x30a0('0x3')]();var fs_extra=require(_0x30a0('0x4'));var auth=require(_0x30a0('0x5'));var interaction=require(_0x30a0('0x6'));var config=require(_0x30a0('0x7'));var controller=require(_0x30a0('0x8'));router[_0x30a0('0x9')]('/',auth[_0x30a0('0xa')](),controller[_0x30a0('0xb')]);router[_0x30a0('0x9')](_0x30a0('0xc'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x30a0('0xa')](),controller[_0x30a0('0xd')]);router[_0x30a0('0xe')](_0x30a0('0xc'),auth[_0x30a0('0xa')](),controller[_0x30a0('0xf')]);router[_0x30a0('0x10')]('/:id',auth[_0x30a0('0xa')](),controller[_0x30a0('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.attributes.js b/server/api/intFreshdeskField/intFreshdeskField.attributes.js index eca4ff1..d2e77c4 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 _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 +var _0x36ff=['BOOLEAN','sequelize','exports','string','variable','customVariable','keyValue','picklist','STRING','ENUM'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x36ff,0x15f));var _0xf36f=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0x36ff[_0x433a86];return _0x23000c;};'use strict';var Sequelize=require(_0xf36f('0x0'));module[_0xf36f('0x1')]={'type':{'type':Sequelize['ENUM'](_0xf36f('0x2'),_0xf36f('0x3'),_0xf36f('0x4'),_0xf36f('0x5'),_0xf36f('0x6')),'defaultValue':_0xf36f('0x2')},'content':{'type':Sequelize[_0xf36f('0x7')]},'key':{'type':Sequelize[_0xf36f('0x7')]},'keyType':{'type':Sequelize[_0xf36f('0x8')](_0xf36f('0x2'),'variable',_0xf36f('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xf36f('0x7')]},'nameField':{'type':Sequelize[_0xf36f('0x7')]},'customField':{'type':Sequelize[_0xf36f('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xf36f('0x7')]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.controller.js b/server/api/intFreshdeskField/intFreshdeskField.controller.js index e77c69d..598e239 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 _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 +var _0xe605=['moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','index','map','FreshdeskField','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','catch','show','params','fields','find','create','body','eml-format','rimraf','fast-json-patch','request-promise'];(function(_0x3ac602,_0x55a838){var _0x88e2a7=function(_0x368856){while(--_0x368856){_0x3ac602['push'](_0x3ac602['shift']());}};_0x88e2a7(++_0x55a838);}(_0xe605,0x92));var _0x5e60=function(_0x120101,_0x8fda){_0x120101=_0x120101-0x0;var _0x4b6d14=_0xe605[_0x120101];return _0x4b6d14;};'use strict';var emlformat=require(_0x5e60('0x0'));var rimraf=require(_0x5e60('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5e60('0x2'));var rp=require(_0x5e60('0x3'));var moment=require(_0x5e60('0x4'));var BPromise=require(_0x5e60('0x5'));var Mustache=require(_0x5e60('0x6'));var util=require(_0x5e60('0x7'));var path=require(_0x5e60('0x8'));var sox=require(_0x5e60('0x9'));var csv=require(_0x5e60('0xa'));var ejs=require(_0x5e60('0xb'));var fs=require('fs');var fs_extra=require(_0x5e60('0xc'));var _=require(_0x5e60('0xd'));var squel=require('squel');var crypto=require(_0x5e60('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5e60('0xf'));var Papa=require(_0x5e60('0x10'));var Redis=require(_0x5e60('0x11'));var authService=require(_0x5e60('0x12'));var qs=require(_0x5e60('0x13'));var as=require(_0x5e60('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5e60('0x15'))('api');var utils=require(_0x5e60('0x16'));var config=require(_0x5e60('0x17'));var licenseUtil=require(_0x5e60('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x371df7,_0x178782){_0x178782=_0x178782||0xcc;return function(_0x1f4e14){if(_0x1f4e14){return _0x371df7[_0x5e60('0x19')](_0x178782);}return _0x371df7[_0x5e60('0x1a')](_0x178782)[_0x5e60('0x1b')]();};}function respondWithResult(_0x4fd10e,_0x209adb){_0x209adb=_0x209adb||0xc8;return function(_0x45304f){if(_0x45304f){return _0x4fd10e[_0x5e60('0x1a')](_0x209adb)[_0x5e60('0x1c')](_0x45304f);}};}function respondWithFilteredResult(_0x5b028f,_0x20af5f){return function(_0x529ffe){if(_0x529ffe){var _0x1ffd77=typeof _0x20af5f[_0x5e60('0x1d')]==='undefined'&&typeof _0x20af5f[_0x5e60('0x1e')]===_0x5e60('0x1f');var _0xaa7d05=_0x529ffe[_0x5e60('0x20')];var _0x5c485d=_0x1ffd77?0x0:_0x20af5f[_0x5e60('0x1d')];var _0x22d718=_0x1ffd77?_0x529ffe['count']:_0x20af5f[_0x5e60('0x1d')]+_0x20af5f[_0x5e60('0x1e')];var _0x17c630;if(_0x22d718>=_0xaa7d05){_0x22d718=_0xaa7d05;_0x17c630=0xc8;}else{_0x17c630=0xce;}_0x5b028f[_0x5e60('0x1a')](_0x17c630);return _0x5b028f[_0x5e60('0x21')](_0x5e60('0x22'),_0x5c485d+'-'+_0x22d718+'/'+_0xaa7d05)[_0x5e60('0x1c')](_0x529ffe);}return null;};}function patchUpdates(_0x524c93){return function(_0x3282e4){try{jsonpatch[_0x5e60('0x23')](_0x3282e4,_0x524c93,!![]);}catch(_0x228f13){return BPromise['reject'](_0x228f13);}return _0x3282e4[_0x5e60('0x24')]();};}function saveUpdates(_0x5d77dd,_0x376069){return function(_0x1a44e5){if(_0x1a44e5){return _0x1a44e5[_0x5e60('0x25')](_0x5d77dd)[_0x5e60('0x26')](function(_0x34e98d){return _0x34e98d;});}return null;};}function removeEntity(_0x2a499e,_0x2636f1){return function(_0x5d2c03){if(_0x5d2c03){return _0x5d2c03[_0x5e60('0x27')]()[_0x5e60('0x26')](function(){_0x2a499e[_0x5e60('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x45cb62,_0x56e3a5){return function(_0x2d8aac){if(!_0x2d8aac){_0x45cb62[_0x5e60('0x19')](0x194);}return _0x2d8aac;};}function handleError(_0x4a0dbc,_0x3bedea){_0x3bedea=_0x3bedea||0x1f4;return function(_0x5712f7){logger[_0x5e60('0x28')](_0x5712f7[_0x5e60('0x29')]);if(_0x5712f7['name']){delete _0x5712f7[_0x5e60('0x2a')];}_0x4a0dbc[_0x5e60('0x1a')](_0x3bedea)['send'](_0x5712f7);};}exports[_0x5e60('0x2b')]=function(_0xac9c7a,_0x52c97c){var _0x5431a8={},_0x52f668={},_0xf25956={'count':0x0,'rows':[]};var _0x235cc7=_[_0x5e60('0x2c')](db[_0x5e60('0x2d')][_0x5e60('0x2e')],function(_0x558197){return{'name':_0x558197[_0x5e60('0x2f')],'type':_0x558197[_0x5e60('0x30')]['key']};});_0x52f668[_0x5e60('0x31')]=_['map'](_0x235cc7,'name');_0x52f668[_0x5e60('0x32')]=_[_0x5e60('0x33')](_0xac9c7a[_0x5e60('0x32')]);_0x52f668[_0x5e60('0x34')]=_[_0x5e60('0x35')](_0x52f668[_0x5e60('0x31')],_0x52f668[_0x5e60('0x32')]);_0x5431a8[_0x5e60('0x36')]=_[_0x5e60('0x35')](_0x52f668[_0x5e60('0x31')],qs['fields'](_0xac9c7a[_0x5e60('0x32')]['fields']));_0x5431a8['attributes']=_0x5431a8[_0x5e60('0x36')][_0x5e60('0x37')]?_0x5431a8['attributes']:_0x52f668[_0x5e60('0x31')];if(!_0xac9c7a['query'][_0x5e60('0x38')](_0x5e60('0x39'))){_0x5431a8[_0x5e60('0x1e')]=qs[_0x5e60('0x1e')](_0xac9c7a[_0x5e60('0x32')][_0x5e60('0x1e')]);_0x5431a8[_0x5e60('0x1d')]=qs[_0x5e60('0x1d')](_0xac9c7a['query'][_0x5e60('0x1d')]);}_0x5431a8[_0x5e60('0x3a')]=qs[_0x5e60('0x3b')](_0xac9c7a[_0x5e60('0x32')][_0x5e60('0x3b')]);_0x5431a8[_0x5e60('0x3c')]=qs[_0x5e60('0x34')](_['pick'](_0xac9c7a[_0x5e60('0x32')],_0x52f668[_0x5e60('0x34')]),_0x235cc7);if(_0xac9c7a['query']['filter']){_0x5431a8[_0x5e60('0x3c')]=_[_0x5e60('0x3d')](_0x5431a8[_0x5e60('0x3c')],{'$or':_[_0x5e60('0x2c')](_0x235cc7,function(_0x31b900){if(_0x31b900['type']!==_0x5e60('0x3e')){var _0x413bf0={};_0x413bf0[_0x31b900[_0x5e60('0x2a')]]={'$like':'%'+_0xac9c7a[_0x5e60('0x32')][_0x5e60('0x3f')]+'%'};return _0x413bf0;}})});}_0x5431a8=_[_0x5e60('0x3d')]({},_0x5431a8,_0xac9c7a[_0x5e60('0x40')]);var _0x54022a={'where':_0x5431a8[_0x5e60('0x3c')]};return db[_0x5e60('0x2d')]['count'](_0x54022a)['then'](function(_0x47a6df){_0xf25956[_0x5e60('0x20')]=_0x47a6df;if(_0xac9c7a[_0x5e60('0x32')][_0x5e60('0x41')]){_0x5431a8[_0x5e60('0x42')]=[{'all':!![]}];}return db['FreshdeskField'][_0x5e60('0x43')](_0x5431a8);})[_0x5e60('0x26')](function(_0x4b6192){_0xf25956['rows']=_0x4b6192;return _0xf25956;})[_0x5e60('0x26')](respondWithFilteredResult(_0x52c97c,_0x5431a8))[_0x5e60('0x44')](handleError(_0x52c97c,null));};exports[_0x5e60('0x45')]=function(_0x38ff1d,_0x39ab09){var _0x3899ae={'raw':!![],'where':{'id':_0x38ff1d[_0x5e60('0x46')]['id']}},_0x2522d2={};_0x2522d2[_0x5e60('0x31')]=_['keys'](db[_0x5e60('0x2d')][_0x5e60('0x2e')]);_0x2522d2['query']=_[_0x5e60('0x33')](_0x38ff1d[_0x5e60('0x32')]);_0x2522d2[_0x5e60('0x34')]=_[_0x5e60('0x35')](_0x2522d2[_0x5e60('0x31')],_0x2522d2['query']);_0x3899ae[_0x5e60('0x36')]=_[_0x5e60('0x35')](_0x2522d2[_0x5e60('0x31')],qs[_0x5e60('0x47')](_0x38ff1d['query']['fields']));_0x3899ae['attributes']=_0x3899ae[_0x5e60('0x36')][_0x5e60('0x37')]?_0x3899ae[_0x5e60('0x36')]:_0x2522d2[_0x5e60('0x31')];if(_0x38ff1d[_0x5e60('0x32')][_0x5e60('0x41')]){_0x3899ae['include']=[{'all':!![]}];}_0x3899ae=_[_0x5e60('0x3d')]({},_0x3899ae,_0x38ff1d[_0x5e60('0x40')]);return db[_0x5e60('0x2d')][_0x5e60('0x48')](_0x3899ae)[_0x5e60('0x26')](handleEntityNotFound(_0x39ab09,null))[_0x5e60('0x26')](respondWithResult(_0x39ab09,null))[_0x5e60('0x44')](handleError(_0x39ab09,null));};exports['create']=function(_0x24c757,_0x3ed45d){return db[_0x5e60('0x2d')][_0x5e60('0x49')](_0x24c757[_0x5e60('0x4a')],{})[_0x5e60('0x26')](respondWithResult(_0x3ed45d,0xc9))[_0x5e60('0x44')](handleError(_0x3ed45d,null));};exports[_0x5e60('0x25')]=function(_0x1518bd,_0x350d6d){if(_0x1518bd[_0x5e60('0x4a')]['id']){delete _0x1518bd[_0x5e60('0x4a')]['id'];}return db[_0x5e60('0x2d')][_0x5e60('0x48')]({'where':{'id':_0x1518bd[_0x5e60('0x46')]['id']}})[_0x5e60('0x26')](handleEntityNotFound(_0x350d6d,null))[_0x5e60('0x26')](saveUpdates(_0x1518bd[_0x5e60('0x4a')],null))['then'](respondWithResult(_0x350d6d,null))['catch'](handleError(_0x350d6d,null));};exports[_0x5e60('0x27')]=function(_0x4d3588,_0x3525d){return db[_0x5e60('0x2d')][_0x5e60('0x48')]({'where':{'id':_0x4d3588[_0x5e60('0x46')]['id']}})[_0x5e60('0x26')](handleEntityNotFound(_0x3525d,null))[_0x5e60('0x26')](removeEntity(_0x3525d,null))['catch'](handleError(_0x3525d,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.model.js b/server/api/intFreshdeskField/intFreshdeskField.model.js index 50da285..59c8dc7 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 _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 +var _0xbbdc=['int_freshdesk_fields','lodash','util','rimraf','./intFreshdeskField.attributes','exports','define'];(function(_0x2f4311,_0xd2d511){var _0x309ccb=function(_0x3ddf5c){while(--_0x3ddf5c){_0x2f4311['push'](_0x2f4311['shift']());}};_0x309ccb(++_0xd2d511);}(_0xbbdc,0x1eb));var _0xcbbd=function(_0x47adb8,_0x591ccc){_0x47adb8=_0x47adb8-0x0;var _0x4689a8=_0xbbdc[_0x47adb8];return _0x4689a8;};'use strict';var _=require(_0xcbbd('0x0'));var util=require(_0xcbbd('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xcbbd('0x2'));var config=require('../../config/environment');var attributes=require(_0xcbbd('0x3'));module[_0xcbbd('0x4')]=function(_0x131ef0,_0x3a7454){return _0x131ef0[_0xcbbd('0x5')]('FreshdeskField',attributes,{'tableName':_0xcbbd('0x6'),'paranoid':![],'indexes':[{'name':'freshdesk_unique_index','fields':['idField','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 5e0c527..8676a32 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 _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 +var _0x7424=['request\x20sent','debug','error','code','message','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','http','request','then','FreshdeskField,\x20%s,\x20%s'];(function(_0x3e6f1a,_0x14617c){var _0x1f02cf=function(_0x519d1f){while(--_0x519d1f){_0x3e6f1a['push'](_0x3e6f1a['shift']());}};_0x1f02cf(++_0x14617c);}(_0x7424,0x16f));var _0x4742=function(_0x3bd0f7,_0x490688){_0x3bd0f7=_0x3bd0f7-0x0;var _0x5495ef=_0x7424[_0x3bd0f7];return _0x5495ef;};'use strict';var _=require(_0x4742('0x0'));var util=require(_0x4742('0x1'));var moment=require(_0x4742('0x2'));var BPromise=require('bluebird');var rs=require(_0x4742('0x3'));var fs=require('fs');var Redis=require(_0x4742('0x4'));var db=require(_0x4742('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x4742('0x6'))(_0x4742('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x4742('0x8')][_0x4742('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x224ffd,_0x55a70c,_0x1fec15){return new BPromise(function(_0x1b9758,_0x5af760){return client[_0x4742('0xa')](_0x224ffd,_0x1fec15)[_0x4742('0xb')](function(_0x452803){logger['info'](_0x4742('0xc'),_0x55a70c,_0x4742('0xd'));logger[_0x4742('0xe')]('FreshdeskField,\x20%s,\x20%s,\x20%s',_0x55a70c,_0x4742('0xd'),JSON['stringify'](_0x452803));if(_0x452803[_0x4742('0xf')]){if(_0x452803[_0x4742('0xf')][_0x4742('0x10')]===0x1f4){logger['error'](_0x4742('0xc'),_0x55a70c,_0x452803[_0x4742('0xf')]['message']);return _0x5af760(_0x452803[_0x4742('0xf')][_0x4742('0x11')]);}logger[_0x4742('0xf')]('FreshdeskField,\x20%s,\x20%s',_0x55a70c,_0x452803[_0x4742('0xf')]['message']);return _0x1b9758(_0x452803[_0x4742('0xf')][_0x4742('0x11')]);}else{logger[_0x4742('0x12')]('FreshdeskField,\x20%s,\x20%s',_0x55a70c,_0x4742('0xd'));_0x1b9758(_0x452803['result'][_0x4742('0x11')]);}})[_0x4742('0x13')](function(_0x305e4b){logger[_0x4742('0xf')](_0x4742('0xc'),_0x55a70c,_0x305e4b);_0x5af760(_0x305e4b);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/index.js b/server/api/intFreshsalesAccount/index.js index 3fab71b..4f9a74e 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 _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 +var _0x13f6=['./intFreshsalesAccount.controller','isAuthenticated','index','get','/:id/configurations','getConfigurations','/:id/fields','getFields','create','post','addConfiguration','update','delete','/:id','destroy','exports','multer','util','express','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x983914,_0x30ddca){var _0x1be870=function(_0x221d66){while(--_0x221d66){_0x983914['push'](_0x983914['shift']());}};_0x1be870(++_0x30ddca);}(_0x13f6,0x124));var _0x613f=function(_0x44abbe,_0x4894ed){_0x44abbe=_0x44abbe-0x0;var _0x3872e8=_0x13f6[_0x44abbe];return _0x3872e8;};'use strict';var multer=require(_0x613f('0x0'));var util=require(_0x613f('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x613f('0x2'));var router=express[_0x613f('0x3')]();var fs_extra=require(_0x613f('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x613f('0x5'));var config=require(_0x613f('0x6'));var controller=require(_0x613f('0x7'));router['get']('/',auth[_0x613f('0x8')](),controller[_0x613f('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0x613f('0xa')](_0x613f('0xb'),auth[_0x613f('0x8')](),controller[_0x613f('0xc')]);router['get'](_0x613f('0xd'),auth[_0x613f('0x8')](),controller[_0x613f('0xe')]);router['post']('/',auth[_0x613f('0x8')](),controller[_0x613f('0xf')]);router[_0x613f('0x10')]('/:id/configurations',auth[_0x613f('0x8')](),controller[_0x613f('0x11')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x613f('0x12')]);router[_0x613f('0x13')](_0x613f('0x14'),auth[_0x613f('0x8')](),controller[_0x613f('0x15')]);module[_0x613f('0x16')]=router; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js index eac175a..cc3efe2 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 _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 +var _0x7b84=['sequelize','exports','STRING','username','remoteUri'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0x7b84,0x17c));var _0x47b8=function(_0x208b2d,_0x9c3c3b){_0x208b2d=_0x208b2d-0x0;var _0x14d912=_0x7b84[_0x208b2d];return _0x14d912;};'use strict';var Sequelize=require(_0x47b8('0x0'));module[_0x47b8('0x1')]={'name':{'type':Sequelize[_0x47b8('0x2')]},'description':{'type':Sequelize[_0x47b8('0x2')]},'username':{'type':Sequelize[_0x47b8('0x2')],'unique':_0x47b8('0x3')},'apiKey':{'type':Sequelize[_0x47b8('0x2')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x47b8('0x4')},'serverUrl':{'type':Sequelize[_0x47b8('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js index b0ef8be..e61314c 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 _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 +var _0x833b=['to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','jayson/promise','http','then','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','error','FreshsalesAccount,\x20%s,\x20%s','message','info','result','catch','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save','destroy','sendStatus','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','FreshsalesAccount','includeAll','findAll','rows','params','include','create','body','update','find','getConfigurations','findOne','FreshsalesConfiguration','hasOwnProperty','addConfiguration','AccountId','getSubjects','channel','FreshsalesField','Descriptions','remoteUri','apiKey','slice','GET','format','/api/selector/owners','Token\x20token=','users','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','send','test','Wrong\x20credentials','rimraf','fast-json-patch','moment','mustache','util','path','sox'];(function(_0x48577a,_0x53777a){var _0x2a578f=function(_0x21fddd){while(--_0x21fddd){_0x48577a['push'](_0x48577a['shift']());}};_0x2a578f(++_0x53777a);}(_0x833b,0x131));var _0xb833=function(_0x819464,_0x46fc91){_0x819464=_0x819464-0x0;var _0x49dcc0=_0x833b[_0x819464];return _0x49dcc0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb833('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb833('0x1'));var rp=require('request-promise');var moment=require(_0xb833('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xb833('0x3'));var util=require(_0xb833('0x4'));var path=require(_0xb833('0x5'));var sox=require(_0xb833('0x6'));var csv=require(_0xb833('0x7'));var ejs=require(_0xb833('0x8'));var fs=require('fs');var fs_extra=require(_0xb833('0x9'));var _=require('lodash');var squel=require(_0xb833('0xa'));var crypto=require(_0xb833('0xb'));var jsforce=require(_0xb833('0xc'));var deskjs=require(_0xb833('0xd'));var toCsv=require(_0xb833('0x7'));var querystring=require(_0xb833('0xe'));var Papa=require(_0xb833('0xf'));var Redis=require('ioredis');var authService=require(_0xb833('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xb833('0x11'));var hardwareService=require(_0xb833('0x12'));var logger=require(_0xb833('0x13'))(_0xb833('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xb833('0x15'));var db=require(_0xb833('0x16'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xb833('0x17'));var client=jayson['client'][_0xb833('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x1622a8,_0x920804,_0x3ae32b,_0x2f08cb){return new BPromise(function(_0x42a8ac,_0x26e8c1){var _0x17d742=_0x2f08cb||client;return _0x17d742['request'](_0x1622a8,_0x3ae32b)[_0xb833('0x19')](function(_0x371871){logger['info']('FreshsalesAccount,\x20%s,\x20%s',_0x920804,_0xb833('0x1a'));logger['debug'](_0xb833('0x1b'),_0x920804,_0xb833('0x1a'),JSON['stringify'](_0x371871));if(_0x371871[_0xb833('0x1c')]){if(_0x371871[_0xb833('0x1c')]['code']===0x1f4){logger[_0xb833('0x1c')](_0xb833('0x1d'),_0x920804,_0x371871[_0xb833('0x1c')]['message']);return _0x26e8c1(_0x371871[_0xb833('0x1c')][_0xb833('0x1e')]);}logger[_0xb833('0x1c')](_0xb833('0x1d'),_0x920804,_0x371871['error']['message']);return _0x42a8ac(_0x371871[_0xb833('0x1c')][_0xb833('0x1e')]);}else{logger[_0xb833('0x1f')](_0xb833('0x1d'),_0x920804,_0xb833('0x1a'));_0x42a8ac(_0x371871[_0xb833('0x20')]['message']);}})[_0xb833('0x21')](function(_0x57defe){logger['error']('FreshsalesAccount,\x20%s,\x20%s',_0x920804,_0x57defe);_0x26e8c1(_0x57defe);});});}function respondWithStatusCode(_0x2fa0d0,_0x9e7cdb){_0x9e7cdb=_0x9e7cdb||0xcc;return function(_0x2e11d0){if(_0x2e11d0){return _0x2fa0d0['sendStatus'](_0x9e7cdb);}return _0x2fa0d0[_0xb833('0x22')](_0x9e7cdb)[_0xb833('0x23')]();};}function respondWithResult(_0x48f3ad,_0x38beb0){_0x38beb0=_0x38beb0||0xc8;return function(_0x43161a){if(_0x43161a){return _0x48f3ad['status'](_0x38beb0)[_0xb833('0x24')](_0x43161a);}};}function respondWithFilteredResult(_0x5d05ba,_0xc7d7){return function(_0x46101f){if(_0x46101f){var _0x471854=typeof _0xc7d7['offset']===_0xb833('0x25')&&typeof _0xc7d7[_0xb833('0x26')]===_0xb833('0x25');var _0x53e699=_0x46101f[_0xb833('0x27')];var _0xbfaf92=_0x471854?0x0:_0xc7d7[_0xb833('0x28')];var _0x493fc8=_0x471854?_0x46101f['count']:_0xc7d7[_0xb833('0x28')]+_0xc7d7['limit'];var _0x3830f3;if(_0x493fc8>=_0x53e699){_0x493fc8=_0x53e699;_0x3830f3=0xc8;}else{_0x3830f3=0xce;}_0x5d05ba[_0xb833('0x22')](_0x3830f3);return _0x5d05ba[_0xb833('0x29')](_0xb833('0x2a'),_0xbfaf92+'-'+_0x493fc8+'/'+_0x53e699)[_0xb833('0x24')](_0x46101f);}return null;};}function patchUpdates(_0x183ed2){return function(_0x514532){try{jsonpatch['apply'](_0x514532,_0x183ed2,!![]);}catch(_0x2b75f9){return BPromise[_0xb833('0x2b')](_0x2b75f9);}return _0x514532[_0xb833('0x2c')]();};}function saveUpdates(_0xdc485f,_0x18668c){return function(_0xf6dc69){if(_0xf6dc69){return _0xf6dc69['update'](_0xdc485f)['then'](function(_0x508b52){return _0x508b52;});}return null;};}function removeEntity(_0x2a5111,_0x37cf49){return function(_0x432d0a){if(_0x432d0a){return _0x432d0a[_0xb833('0x2d')]()[_0xb833('0x19')](function(){_0x2a5111[_0xb833('0x22')](0xcc)[_0xb833('0x23')]();});}};}function handleEntityNotFound(_0x24b874,_0xd8cbde){return function(_0x188052){if(!_0x188052){_0x24b874[_0xb833('0x2e')](0x194);}return _0x188052;};}function handleError(_0x38c9b7,_0x2c1839){_0x2c1839=_0x2c1839||0x1f4;return function(_0x5cd8c9){logger[_0xb833('0x1c')](_0x5cd8c9['stack']);if(_0x5cd8c9[_0xb833('0x2f')]){delete _0x5cd8c9['name'];}_0x38c9b7[_0xb833('0x22')](_0x2c1839)['send'](_0x5cd8c9);};}exports[_0xb833('0x30')]=function(_0x2c0d1e,_0x133875){var _0x3ed9af={},_0x56899e={},_0x2d326b={'count':0x0,'rows':[]};var _0x40ffae=_[_0xb833('0x31')](db['FreshsalesAccount'][_0xb833('0x32')],function(_0x36f5a5){return{'name':_0x36f5a5[_0xb833('0x33')],'type':_0x36f5a5[_0xb833('0x34')][_0xb833('0x35')]};});_0x56899e[_0xb833('0x36')]=_[_0xb833('0x31')](_0x40ffae,_0xb833('0x2f'));_0x56899e[_0xb833('0x37')]=_[_0xb833('0x38')](_0x2c0d1e['query']);_0x56899e[_0xb833('0x39')]=_[_0xb833('0x3a')](_0x56899e['model'],_0x56899e['query']);_0x3ed9af[_0xb833('0x3b')]=_['intersection'](_0x56899e[_0xb833('0x36')],qs['fields'](_0x2c0d1e[_0xb833('0x37')][_0xb833('0x3c')]));_0x3ed9af[_0xb833('0x3b')]=_0x3ed9af[_0xb833('0x3b')][_0xb833('0x3d')]?_0x3ed9af[_0xb833('0x3b')]:_0x56899e['model'];if(!_0x2c0d1e[_0xb833('0x37')]['hasOwnProperty'](_0xb833('0x3e'))){_0x3ed9af[_0xb833('0x26')]=qs[_0xb833('0x26')](_0x2c0d1e['query'][_0xb833('0x26')]);_0x3ed9af[_0xb833('0x28')]=qs[_0xb833('0x28')](_0x2c0d1e[_0xb833('0x37')]['offset']);}_0x3ed9af['order']=qs[_0xb833('0x3f')](_0x2c0d1e[_0xb833('0x37')][_0xb833('0x3f')]);_0x3ed9af[_0xb833('0x40')]=qs[_0xb833('0x39')](_[_0xb833('0x41')](_0x2c0d1e[_0xb833('0x37')],_0x56899e['filters']),_0x40ffae);if(_0x2c0d1e[_0xb833('0x37')][_0xb833('0x42')]){_0x3ed9af[_0xb833('0x40')]=_['merge'](_0x3ed9af['where'],{'$or':_[_0xb833('0x31')](_0x40ffae,function(_0x5e6a7c){if(_0x5e6a7c[_0xb833('0x34')]!==_0xb833('0x43')){var _0x4bec71={};_0x4bec71[_0x5e6a7c[_0xb833('0x2f')]]={'$like':'%'+_0x2c0d1e[_0xb833('0x37')][_0xb833('0x42')]+'%'};return _0x4bec71;}})});}_0x3ed9af=_[_0xb833('0x44')]({},_0x3ed9af,_0x2c0d1e[_0xb833('0x45')]);var _0x3f8a73={'where':_0x3ed9af['where']};return db[_0xb833('0x46')][_0xb833('0x27')](_0x3f8a73)[_0xb833('0x19')](function(_0x566910){_0x2d326b[_0xb833('0x27')]=_0x566910;if(_0x2c0d1e[_0xb833('0x37')][_0xb833('0x47')]){_0x3ed9af['include']=[{'all':!![]}];}return db['FreshsalesAccount'][_0xb833('0x48')](_0x3ed9af);})['then'](function(_0x4de678){_0x2d326b[_0xb833('0x49')]=_0x4de678;return _0x2d326b;})[_0xb833('0x19')](respondWithFilteredResult(_0x133875,_0x3ed9af))[_0xb833('0x21')](handleError(_0x133875,null));};exports['show']=function(_0x3cae64,_0x3fca78){var _0xda43de={'raw':![],'where':{'id':_0x3cae64[_0xb833('0x4a')]['id']}},_0x34d76b={};_0x34d76b['model']=_[_0xb833('0x38')](db['FreshsalesAccount'][_0xb833('0x32')]);_0x34d76b[_0xb833('0x37')]=_[_0xb833('0x38')](_0x3cae64['query']);_0x34d76b[_0xb833('0x39')]=_[_0xb833('0x3a')](_0x34d76b[_0xb833('0x36')],_0x34d76b['query']);_0xda43de['attributes']=_['intersection'](_0x34d76b[_0xb833('0x36')],qs['fields'](_0x3cae64[_0xb833('0x37')][_0xb833('0x3c')]));_0xda43de[_0xb833('0x3b')]=_0xda43de[_0xb833('0x3b')]['length']?_0xda43de[_0xb833('0x3b')]:_0x34d76b[_0xb833('0x36')];if(_0x3cae64[_0xb833('0x37')][_0xb833('0x47')]){_0xda43de[_0xb833('0x4b')]=[{'all':!![]}];}_0xda43de=_[_0xb833('0x44')]({},_0xda43de,_0x3cae64[_0xb833('0x45')]);return db[_0xb833('0x46')]['find'](_0xda43de)[_0xb833('0x19')](handleEntityNotFound(_0x3fca78,null))[_0xb833('0x19')](respondWithResult(_0x3fca78,null))[_0xb833('0x21')](handleError(_0x3fca78,null));};exports[_0xb833('0x4c')]=function(_0x5c8d22,_0x367491){return db['FreshsalesAccount'][_0xb833('0x4c')](_0x5c8d22[_0xb833('0x4d')],{})['then'](respondWithResult(_0x367491,0xc9))[_0xb833('0x21')](handleError(_0x367491,null));};exports[_0xb833('0x4e')]=function(_0x37eb98,_0x1794d7){if(_0x37eb98[_0xb833('0x4d')]['id']){delete _0x37eb98['body']['id'];}return db[_0xb833('0x46')][_0xb833('0x4f')]({'where':{'id':_0x37eb98['params']['id']}})[_0xb833('0x19')](handleEntityNotFound(_0x1794d7,null))['then'](saveUpdates(_0x37eb98[_0xb833('0x4d')],null))[_0xb833('0x19')](respondWithResult(_0x1794d7,null))[_0xb833('0x21')](handleError(_0x1794d7,null));};exports[_0xb833('0x2d')]=function(_0x4768bf,_0x2b21c7){return db[_0xb833('0x46')]['find']({'where':{'id':_0x4768bf['params']['id']}})['then'](handleEntityNotFound(_0x2b21c7,null))[_0xb833('0x19')](removeEntity(_0x2b21c7,null))[_0xb833('0x21')](handleError(_0x2b21c7,null));};exports[_0xb833('0x50')]=function(_0x484df0,_0xcbf0d9,_0x52208b){var _0x411b98={};var _0x3c6276={};var _0x3ddba7;var _0x8f96d5;return db[_0xb833('0x46')][_0xb833('0x51')]({'where':{'id':_0x484df0[_0xb833('0x4a')]['id']}})[_0xb833('0x19')](handleEntityNotFound(_0xcbf0d9,null))[_0xb833('0x19')](function(_0x6cad97){if(_0x6cad97){_0x3ddba7=_0x6cad97;_0x3c6276[_0xb833('0x36')]=_[_0xb833('0x38')](db[_0xb833('0x52')][_0xb833('0x32')]);_0x3c6276[_0xb833('0x37')]=_[_0xb833('0x38')](_0x484df0[_0xb833('0x37')]);_0x3c6276[_0xb833('0x39')]=_[_0xb833('0x3a')](_0x3c6276['model'],_0x3c6276[_0xb833('0x37')]);_0x411b98[_0xb833('0x3b')]=_['intersection'](_0x3c6276[_0xb833('0x36')],qs[_0xb833('0x3c')](_0x484df0[_0xb833('0x37')]['fields']));_0x411b98['attributes']=_0x411b98['attributes'][_0xb833('0x3d')]?_0x411b98[_0xb833('0x3b')]:_0x3c6276[_0xb833('0x36')];_0x411b98['order']=qs['sort'](_0x484df0[_0xb833('0x37')][_0xb833('0x3f')]);_0x411b98[_0xb833('0x40')]=qs[_0xb833('0x39')](_['pick'](_0x484df0[_0xb833('0x37')],_0x3c6276[_0xb833('0x39')]));if(_0x484df0[_0xb833('0x37')][_0xb833('0x42')]){_0x411b98[_0xb833('0x40')]=_[_0xb833('0x44')](_0x411b98[_0xb833('0x40')],{'$or':_['map'](_0x411b98[_0xb833('0x3b')],function(_0x2bd96e){var _0x2866a4={};_0x2866a4[_0x2bd96e]={'$like':'%'+_0x484df0[_0xb833('0x37')][_0xb833('0x42')]+'%'};return _0x2866a4;})});}_0x411b98=_[_0xb833('0x44')]({},_0x411b98,_0x484df0[_0xb833('0x45')]);return _0x3ddba7[_0xb833('0x50')](_0x411b98);}})[_0xb833('0x19')](function(_0xfcfb33){if(_0xfcfb33){_0x8f96d5=_0xfcfb33[_0xb833('0x3d')];if(!_0x484df0['query'][_0xb833('0x53')](_0xb833('0x3e'))){_0x411b98[_0xb833('0x26')]=qs[_0xb833('0x26')](_0x484df0[_0xb833('0x37')]['limit']);_0x411b98[_0xb833('0x28')]=qs[_0xb833('0x28')](_0x484df0[_0xb833('0x37')][_0xb833('0x28')]);}return _0x3ddba7[_0xb833('0x50')](_0x411b98);}})[_0xb833('0x19')](function(_0x147f45){if(_0x147f45){return _0x147f45?{'count':_0x8f96d5,'rows':_0x147f45}:null;}})[_0xb833('0x19')](respondWithResult(_0xcbf0d9,null))[_0xb833('0x21')](handleError(_0xcbf0d9,null));};exports[_0xb833('0x54')]=function(_0x1d56c7,_0x2fb4f2,_0x3a26da){if(_0x1d56c7[_0xb833('0x4d')]['id']){delete _0x1d56c7['body']['id'];}return db[_0xb833('0x46')]['findOne']({'where':{'id':_0x1d56c7[_0xb833('0x4a')]['id']}})[_0xb833('0x19')](handleEntityNotFound(_0x2fb4f2,null))[_0xb833('0x19')](function(_0x79367e){if(_0x79367e){_0x1d56c7[_0xb833('0x4d')][_0xb833('0x55')]=_0x79367e['id'];_0x1d56c7[_0xb833('0x4d')]['Subjects']=integrations[_0xb833('0x56')](_0x1d56c7[_0xb833('0x4d')][_0xb833('0x57')],_0x1d56c7['body'][_0xb833('0x34')]);_0x1d56c7[_0xb833('0x4d')]['Descriptions']=integrations['getDescriptions'](_0x1d56c7[_0xb833('0x4d')][_0xb833('0x57')],_0x1d56c7[_0xb833('0x4d')][_0xb833('0x34')]);return db[_0xb833('0x52')][_0xb833('0x4c')](_0x1d56c7[_0xb833('0x4d')],{'include':[{'model':db['FreshsalesField'],'as':'Subjects'},{'model':db[_0xb833('0x58')],'as':_0xb833('0x59')}]});}return null;})['then'](respondWithResult(_0x2fb4f2,null))[_0xb833('0x21')](handleError(_0x2fb4f2,null));};exports['getFields']=function(_0x440493,_0x3056e5,_0x40b60e){var _0x4176de='';var _0x161ec9='';return db[_0xb833('0x46')][_0xb833('0x51')]({'where':{'id':_0x440493[_0xb833('0x4a')]['id']},'attributes':['id','username',_0xb833('0x5a'),_0xb833('0x5b')]})[_0xb833('0x19')](handleEntityNotFound(_0x3056e5,null))[_0xb833('0x19')](function(_0x3975b6){if(_0x3975b6){_0x161ec9=_0x3975b6['username'];_0x4176de=_0x3975b6[_0xb833('0x5a')];var _0x14e10c=_0x3975b6[_0xb833('0x5a')][_0xb833('0x5c')](-0x1);if(_0x14e10c==='/'){_0x4176de=_0x4176de['substring'](0x0,_0x4176de['lastIndexOf'](_0x14e10c));}return rp({'method':_0xb833('0x5d'),'uri':util[_0xb833('0x5e')]('%s%s',_0x4176de,_0xb833('0x5f')),'headers':{'Authorization':_0xb833('0x60')+_0x3975b6[_0xb833('0x5b')]},'json':!![]});}})[_0xb833('0x19')](function(_0x593a4a){if(_0x593a4a){var _0x39a683=_0x593a4a[_0xb833('0x61')];var _0x59a644=![];var _0xc98f5f=null;for(_0xc98f5f=0x0;_0xc98f5f<_0x39a683[_0xb833('0x3d')];_0xc98f5f++){if(_0x39a683[_0xc98f5f]['email']===_0x161ec9){_0x59a644=!![];}}if(_0x59a644){return!![];}else{throw new Error({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}})[_0xb833('0x19')](respondWithResult(_0x3056e5,null))[_0xb833('0x21')](function(_0x54e7e5){var _0x580e0b=_0x440493[_0xb833('0x37')]['test']?0x1f4:_0x54e7e5[_0xb833('0x62')]||0x1f4;logger[_0xb833('0x1c')](_0xb833('0x63'),'getFields',_0x580e0b,JSON[_0xb833('0x64')](_0x54e7e5));delete _0x54e7e5[_0xb833('0x2f')];if(_0x580e0b===0x191){_0x580e0b=0x190;}_0x3056e5['status'](_0x580e0b)[_0xb833('0x65')](_0x440493['query'][_0xb833('0x66')]?{'message':_0xb833('0x67'),'statusCode':_0x54e7e5[_0xb833('0x62')]}:_0x54e7e5);});}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js index 2b13f48..8f33cca 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 _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 +var _0x7096=['rimraf','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports','define','FreshsalesAccount','int_freshsales_accounts','util','api','bluebird','request-promise','path'];(function(_0x3e7122,_0x40e109){var _0x13480f=function(_0x499da4){while(--_0x499da4){_0x3e7122['push'](_0x3e7122['shift']());}};_0x13480f(++_0x40e109);}(_0x7096,0x10c));var _0x6709=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0x7096[_0x2b5eae];return _0x5f3ac9;};'use strict';var _=require('lodash');var util=require(_0x6709('0x0'));var logger=require('../../config/logger')(_0x6709('0x1'));var moment=require('moment');var BPromise=require(_0x6709('0x2'));var rp=require(_0x6709('0x3'));var fs=require('fs');var path=require(_0x6709('0x4'));var rimraf=require(_0x6709('0x5'));var config=require(_0x6709('0x6'));var attributes=require(_0x6709('0x7'));var integrations=require(_0x6709('0x8'));module[_0x6709('0x9')]=function(_0xa35832,_0x3e2223){return _0xa35832[_0x6709('0xa')](_0x6709('0xb'),attributes,{'tableName':_0x6709('0xc'),'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 d711ecf..058f3a7 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 _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 +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(_0x34a4c0,_0x46d380){var _0x10c875=function(_0x33426f){while(--_0x33426f){_0x34a4c0['push'](_0x34a4c0['shift']());}};_0x10c875(++_0x46d380);}(_0xc1c6,0xf7));var _0x6c1c=function(_0x37fd0b,_0x136247){_0x37fd0b=_0x37fd0b-0x0;var _0x1cc1ae=_0xc1c6[_0x37fd0b];return _0x1cc1ae;};'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 diff --git a/server/api/intFreshsalesConfiguration/index.js b/server/api/intFreshsalesConfiguration/index.js index 47994d4..304f9a4 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 _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 +var _0x2576=['../../config/environment','get','index','isAuthenticated','show','/:id/subjects','getSubjects','getDescriptions','/:id/fields','getFields','post','put','/:id','destroy','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1ac43b,_0x1ee168){var _0x2f32e7=function(_0x3b36b0){while(--_0x3b36b0){_0x1ac43b['push'](_0x1ac43b['shift']());}};_0x2f32e7(++_0x1ee168);}(_0x2576,0xf5));var _0x6257=function(_0x3eeff6,_0x563580){_0x3eeff6=_0x3eeff6-0x0;var _0x1e6237=_0x2576[_0x3eeff6];return _0x1e6237;};'use strict';var multer=require(_0x6257('0x0'));var util=require(_0x6257('0x1'));var path=require('path');var timeout=require(_0x6257('0x2'));var express=require(_0x6257('0x3'));var router=express['Router']();var fs_extra=require(_0x6257('0x4'));var auth=require(_0x6257('0x5'));var interaction=require(_0x6257('0x6'));var config=require(_0x6257('0x7'));var controller=require('./intFreshsalesConfiguration.controller');router[_0x6257('0x8')]('/',auth['isAuthenticated'](),controller[_0x6257('0x9')]);router[_0x6257('0x8')]('/:id',auth[_0x6257('0xa')](),controller[_0x6257('0xb')]);router[_0x6257('0x8')](_0x6257('0xc'),auth[_0x6257('0xa')](),controller[_0x6257('0xd')]);router['get']('/:id/descriptions',auth[_0x6257('0xa')](),controller[_0x6257('0xe')]);router[_0x6257('0x8')](_0x6257('0xf'),auth[_0x6257('0xa')](),controller[_0x6257('0x10')]);router[_0x6257('0x11')]('/',auth[_0x6257('0xa')](),controller['create']);router[_0x6257('0x12')](_0x6257('0x13'),auth[_0x6257('0xa')](),controller['update']);router['delete'](_0x6257('0x13'),auth[_0x6257('0xa')](),controller[_0x6257('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js index 1f57e84..52c914e 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 _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 +var _0x6153=['exports','STRING','sequelize'];(function(_0x2080a3,_0x48acfa){var _0x8d7d17=function(_0x2dbc06){while(--_0x2dbc06){_0x2080a3['push'](_0x2080a3['shift']());}};_0x8d7d17(++_0x48acfa);}(_0x6153,0x12e));var _0x3615=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x6153[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x3615('0x0'));module[_0x3615('0x1')]={'name':{'type':Sequelize[_0x3615('0x2')]},'description':{'type':Sequelize[_0x3615('0x2')]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js index 7d16fcd..3ab95f7 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 _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 +var _0x4504=['papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','status','end','json','offset','undefined','limit','count','set','apply','save','destroy','sendStatus','stack','name','send','index','map','FreshsalesConfiguration','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','where','merge','VIRTUAL','filter','includeAll','findAll','include','find','catch','create','body','update','params','getSubjects','FreshsalesField','rawAttributes','sort','pick','options','nolimit','getDescriptions','findOne','getFields','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','fs-extra','squel','jsforce','querystring'];(function(_0x3e9402,_0x130b9e){var _0x1f5996=function(_0x5ad15c){while(--_0x5ad15c){_0x3e9402['push'](_0x3e9402['shift']());}};_0x1f5996(++_0x130b9e);}(_0x4504,0xa5));var _0x4450=function(_0x15adfc,_0x50316c){_0x15adfc=_0x15adfc-0x0;var _0x315e11=_0x4504[_0x15adfc];return _0x315e11;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x4450('0x0'));var rp=require(_0x4450('0x1'));var moment=require(_0x4450('0x2'));var BPromise=require(_0x4450('0x3'));var Mustache=require('mustache');var util=require(_0x4450('0x4'));var path=require('path');var sox=require(_0x4450('0x5'));var csv=require(_0x4450('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4450('0x7'));var _=require('lodash');var squel=require(_0x4450('0x8'));var crypto=require('crypto');var jsforce=require(_0x4450('0x9'));var deskjs=require('desk.js');var toCsv=require(_0x4450('0x6'));var querystring=require(_0x4450('0xa'));var Papa=require(_0x4450('0xb'));var Redis=require(_0x4450('0xc'));var authService=require('../../components/auth/service');var qs=require(_0x4450('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4450('0xe'));var logger=require(_0x4450('0xf'))(_0x4450('0x10'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x4450('0x11'));var db=require(_0x4450('0x12'))['db'];var jayson=require(_0x4450('0x13'));var client=jayson[_0x4450('0x14')][_0x4450('0x15')]({'port':0x232a});function respondWithRpcPromise(_0x2adacf,_0x3296d6,_0x4096de,_0x542b12){return new BPromise(function(_0x400bae,_0x5038e1){var _0x2ede6b=_0x542b12||client;return _0x2ede6b[_0x4450('0x16')](_0x2adacf,_0x4096de)[_0x4450('0x17')](function(_0x3711f7){logger['info'](_0x4450('0x18'),_0x3296d6,_0x4450('0x19'));logger[_0x4450('0x1a')](_0x4450('0x1b'),_0x3296d6,_0x4450('0x19'),JSON[_0x4450('0x1c')](_0x3711f7));if(_0x3711f7[_0x4450('0x1d')]){if(_0x3711f7[_0x4450('0x1d')][_0x4450('0x1e')]===0x1f4){logger[_0x4450('0x1d')](_0x4450('0x18'),_0x3296d6,_0x3711f7[_0x4450('0x1d')][_0x4450('0x1f')]);return _0x5038e1(_0x3711f7[_0x4450('0x1d')][_0x4450('0x1f')]);}logger[_0x4450('0x1d')](_0x4450('0x18'),_0x3296d6,_0x3711f7['error']['message']);return _0x400bae(_0x3711f7[_0x4450('0x1d')]['message']);}else{logger[_0x4450('0x20')](_0x4450('0x18'),_0x3296d6,_0x4450('0x19'));_0x400bae(_0x3711f7[_0x4450('0x21')][_0x4450('0x1f')]);}})['catch'](function(_0x20ca67){logger[_0x4450('0x1d')](_0x4450('0x18'),_0x3296d6,_0x20ca67);_0x5038e1(_0x20ca67);});});}function respondWithStatusCode(_0x38cb31,_0x5610e6){_0x5610e6=_0x5610e6||0xcc;return function(_0x424c38){if(_0x424c38){return _0x38cb31['sendStatus'](_0x5610e6);}return _0x38cb31[_0x4450('0x22')](_0x5610e6)[_0x4450('0x23')]();};}function respondWithResult(_0x3226eb,_0x95da87){_0x95da87=_0x95da87||0xc8;return function(_0x1c390a){if(_0x1c390a){return _0x3226eb['status'](_0x95da87)[_0x4450('0x24')](_0x1c390a);}};}function respondWithFilteredResult(_0x557a92,_0x409d91){return function(_0x162aa5){if(_0x162aa5){var _0x42d098=typeof _0x409d91[_0x4450('0x25')]===_0x4450('0x26')&&typeof _0x409d91[_0x4450('0x27')]===_0x4450('0x26');var _0x5245a4=_0x162aa5[_0x4450('0x28')];var _0x1a0bcc=_0x42d098?0x0:_0x409d91['offset'];var _0x1ce9ca=_0x42d098?_0x162aa5[_0x4450('0x28')]:_0x409d91[_0x4450('0x25')]+_0x409d91[_0x4450('0x27')];var _0x498fd8;if(_0x1ce9ca>=_0x5245a4){_0x1ce9ca=_0x5245a4;_0x498fd8=0xc8;}else{_0x498fd8=0xce;}_0x557a92[_0x4450('0x22')](_0x498fd8);return _0x557a92[_0x4450('0x29')]('Content-Range',_0x1a0bcc+'-'+_0x1ce9ca+'/'+_0x5245a4)['json'](_0x162aa5);}return null;};}function patchUpdates(_0x39b451){return function(_0x4822c1){try{jsonpatch[_0x4450('0x2a')](_0x4822c1,_0x39b451,!![]);}catch(_0x57ccf3){return BPromise['reject'](_0x57ccf3);}return _0x4822c1[_0x4450('0x2b')]();};}function saveUpdates(_0x5e7334,_0x1514b0){return function(_0x2c6167){if(_0x2c6167){return _0x2c6167['update'](_0x5e7334)['then'](function(_0x128e20){return _0x128e20;});}return null;};}function removeEntity(_0x29d54c,_0x55ea08){return function(_0x1df899){if(_0x1df899){return _0x1df899[_0x4450('0x2c')]()['then'](function(){_0x29d54c[_0x4450('0x22')](0xcc)[_0x4450('0x23')]();});}};}function handleEntityNotFound(_0x14613b,_0x5a84dd){return function(_0x48f11e){if(!_0x48f11e){_0x14613b[_0x4450('0x2d')](0x194);}return _0x48f11e;};}function handleError(_0x8c5048,_0x20f669){_0x20f669=_0x20f669||0x1f4;return function(_0x3c54cc){logger['error'](_0x3c54cc[_0x4450('0x2e')]);if(_0x3c54cc[_0x4450('0x2f')]){delete _0x3c54cc[_0x4450('0x2f')];}_0x8c5048[_0x4450('0x22')](_0x20f669)[_0x4450('0x30')](_0x3c54cc);};}exports[_0x4450('0x31')]=function(_0x5c1fd6,_0x47651f){var _0x1c114c={},_0x519a21={},_0x4cb291={'count':0x0,'rows':[]};var _0x2a86fe=_[_0x4450('0x32')](db[_0x4450('0x33')]['rawAttributes'],function(_0x169cc4){return{'name':_0x169cc4[_0x4450('0x34')],'type':_0x169cc4[_0x4450('0x35')][_0x4450('0x36')]};});_0x519a21['model']=_[_0x4450('0x32')](_0x2a86fe,'name');_0x519a21[_0x4450('0x37')]=_[_0x4450('0x38')](_0x5c1fd6[_0x4450('0x37')]);_0x519a21[_0x4450('0x39')]=_[_0x4450('0x3a')](_0x519a21[_0x4450('0x3b')],_0x519a21['query']);_0x1c114c[_0x4450('0x3c')]=_[_0x4450('0x3a')](_0x519a21['model'],qs[_0x4450('0x3d')](_0x5c1fd6['query']['fields']));_0x1c114c[_0x4450('0x3c')]=_0x1c114c[_0x4450('0x3c')][_0x4450('0x3e')]?_0x1c114c[_0x4450('0x3c')]:_0x519a21[_0x4450('0x3b')];if(!_0x5c1fd6['query'][_0x4450('0x3f')]('nolimit')){_0x1c114c[_0x4450('0x27')]=qs[_0x4450('0x27')](_0x5c1fd6[_0x4450('0x37')][_0x4450('0x27')]);_0x1c114c['offset']=qs[_0x4450('0x25')](_0x5c1fd6['query'][_0x4450('0x25')]);}_0x1c114c[_0x4450('0x40')]=qs['sort'](_0x5c1fd6[_0x4450('0x37')]['sort']);_0x1c114c[_0x4450('0x41')]=qs[_0x4450('0x39')](_['pick'](_0x5c1fd6[_0x4450('0x37')],_0x519a21[_0x4450('0x39')]),_0x2a86fe);if(_0x5c1fd6['query']['filter']){_0x1c114c[_0x4450('0x41')]=_[_0x4450('0x42')](_0x1c114c['where'],{'$or':_[_0x4450('0x32')](_0x2a86fe,function(_0x471f85){if(_0x471f85[_0x4450('0x35')]!==_0x4450('0x43')){var _0x943b79={};_0x943b79[_0x471f85[_0x4450('0x2f')]]={'$like':'%'+_0x5c1fd6['query'][_0x4450('0x44')]+'%'};return _0x943b79;}})});}_0x1c114c=_['merge']({},_0x1c114c,_0x5c1fd6['options']);var _0x562ff6={'where':_0x1c114c[_0x4450('0x41')]};return db[_0x4450('0x33')][_0x4450('0x28')](_0x562ff6)[_0x4450('0x17')](function(_0x56054e){_0x4cb291['count']=_0x56054e;if(_0x5c1fd6[_0x4450('0x37')][_0x4450('0x45')]){_0x1c114c['include']=[{'all':!![]}];}return db['FreshsalesConfiguration'][_0x4450('0x46')](_0x1c114c);})[_0x4450('0x17')](function(_0x574fc2){_0x4cb291['rows']=_0x574fc2;return _0x4cb291;})[_0x4450('0x17')](respondWithFilteredResult(_0x47651f,_0x1c114c))['catch'](handleError(_0x47651f,null));};exports['show']=function(_0x544d5a,_0x5de439){var _0x4bf795={'raw':![],'where':{'id':_0x544d5a['params']['id']}},_0x13229e={};_0x13229e[_0x4450('0x3b')]=_[_0x4450('0x38')](db[_0x4450('0x33')]['rawAttributes']);_0x13229e['query']=_[_0x4450('0x38')](_0x544d5a[_0x4450('0x37')]);_0x13229e['filters']=_['intersection'](_0x13229e['model'],_0x13229e[_0x4450('0x37')]);_0x4bf795[_0x4450('0x3c')]=_[_0x4450('0x3a')](_0x13229e['model'],qs[_0x4450('0x3d')](_0x544d5a[_0x4450('0x37')][_0x4450('0x3d')]));_0x4bf795[_0x4450('0x3c')]=_0x4bf795[_0x4450('0x3c')][_0x4450('0x3e')]?_0x4bf795[_0x4450('0x3c')]:_0x13229e['model'];if(_0x544d5a['query'][_0x4450('0x45')]){_0x4bf795[_0x4450('0x47')]=[{'all':!![]}];}_0x4bf795=_[_0x4450('0x42')]({},_0x4bf795,_0x544d5a['options']);return db[_0x4450('0x33')][_0x4450('0x48')](_0x4bf795)[_0x4450('0x17')](handleEntityNotFound(_0x5de439,null))[_0x4450('0x17')](respondWithResult(_0x5de439,null))[_0x4450('0x49')](handleError(_0x5de439,null));};exports[_0x4450('0x4a')]=function(_0x58bee2,_0x47731b){return db['FreshsalesConfiguration'][_0x4450('0x4a')](_0x58bee2[_0x4450('0x4b')],{})[_0x4450('0x17')](respondWithResult(_0x47731b,0xc9))[_0x4450('0x49')](handleError(_0x47731b,null));};exports[_0x4450('0x4c')]=function(_0x49ed9b,_0x25f31b){if(_0x49ed9b[_0x4450('0x4b')]['id']){delete _0x49ed9b[_0x4450('0x4b')]['id'];}return db[_0x4450('0x33')][_0x4450('0x48')]({'where':{'id':_0x49ed9b[_0x4450('0x4d')]['id']}})[_0x4450('0x17')](handleEntityNotFound(_0x25f31b,null))[_0x4450('0x17')](saveUpdates(_0x49ed9b[_0x4450('0x4b')],null))['then'](respondWithResult(_0x25f31b,null))[_0x4450('0x49')](handleError(_0x25f31b,null));};exports[_0x4450('0x2c')]=function(_0x53d651,_0x5b005d){return db['FreshsalesConfiguration'][_0x4450('0x48')]({'where':{'id':_0x53d651['params']['id']}})[_0x4450('0x17')](handleEntityNotFound(_0x5b005d,null))['then'](removeEntity(_0x5b005d,null))[_0x4450('0x49')](handleError(_0x5b005d,null));};exports[_0x4450('0x4e')]=function(_0x2082f7,_0x3a7f99,_0x511834){var _0x18d0e6={};var _0x275e88={};var _0x28b2a2;var _0x20b893;return db[_0x4450('0x33')]['findOne']({'where':{'id':_0x2082f7['params']['id']}})[_0x4450('0x17')](handleEntityNotFound(_0x3a7f99,null))['then'](function(_0x5bd826){if(_0x5bd826){_0x28b2a2=_0x5bd826;_0x275e88[_0x4450('0x3b')]=_[_0x4450('0x38')](db[_0x4450('0x4f')][_0x4450('0x50')]);_0x275e88[_0x4450('0x37')]=_[_0x4450('0x38')](_0x2082f7[_0x4450('0x37')]);_0x275e88[_0x4450('0x39')]=_[_0x4450('0x3a')](_0x275e88[_0x4450('0x3b')],_0x275e88[_0x4450('0x37')]);_0x18d0e6[_0x4450('0x3c')]=_['intersection'](_0x275e88['model'],qs[_0x4450('0x3d')](_0x2082f7[_0x4450('0x37')]['fields']));_0x18d0e6[_0x4450('0x3c')]=_0x18d0e6[_0x4450('0x3c')][_0x4450('0x3e')]?_0x18d0e6['attributes']:_0x275e88[_0x4450('0x3b')];_0x18d0e6[_0x4450('0x40')]=qs[_0x4450('0x51')](_0x2082f7[_0x4450('0x37')][_0x4450('0x51')]);_0x18d0e6['where']=qs[_0x4450('0x39')](_[_0x4450('0x52')](_0x2082f7['query'],_0x275e88['filters']));if(_0x2082f7['query'][_0x4450('0x44')]){_0x18d0e6[_0x4450('0x41')]=_[_0x4450('0x42')](_0x18d0e6['where'],{'$or':_[_0x4450('0x32')](_0x18d0e6[_0x4450('0x3c')],function(_0x3921b5){var _0x2c0a84={};_0x2c0a84[_0x3921b5]={'$like':'%'+_0x2082f7[_0x4450('0x37')]['filter']+'%'};return _0x2c0a84;})});}_0x18d0e6=_['merge']({},_0x18d0e6,_0x2082f7[_0x4450('0x53')]);return _0x28b2a2[_0x4450('0x4e')](_0x18d0e6);}})[_0x4450('0x17')](function(_0x3005fb){if(_0x3005fb){_0x20b893=_0x3005fb[_0x4450('0x3e')];if(!_0x2082f7[_0x4450('0x37')][_0x4450('0x3f')](_0x4450('0x54'))){_0x18d0e6[_0x4450('0x27')]=qs['limit'](_0x2082f7['query'][_0x4450('0x27')]);_0x18d0e6['offset']=qs[_0x4450('0x25')](_0x2082f7[_0x4450('0x37')][_0x4450('0x25')]);}return _0x28b2a2[_0x4450('0x4e')](_0x18d0e6);}})['then'](function(_0x2ec9eb){if(_0x2ec9eb){return _0x2ec9eb?{'count':_0x20b893,'rows':_0x2ec9eb}:null;}})[_0x4450('0x17')](respondWithResult(_0x3a7f99,null))[_0x4450('0x49')](handleError(_0x3a7f99,null));};exports[_0x4450('0x55')]=function(_0x10ec57,_0x4eeb8b,_0x461bc3){var _0x2a4a5d={};var _0x46393c={};var _0x486e1b;var _0x3f6522;return db[_0x4450('0x33')][_0x4450('0x56')]({'where':{'id':_0x10ec57[_0x4450('0x4d')]['id']}})[_0x4450('0x17')](handleEntityNotFound(_0x4eeb8b,null))[_0x4450('0x17')](function(_0x12f075){if(_0x12f075){_0x486e1b=_0x12f075;_0x46393c[_0x4450('0x3b')]=_[_0x4450('0x38')](db['FreshsalesField'][_0x4450('0x50')]);_0x46393c[_0x4450('0x37')]=_[_0x4450('0x38')](_0x10ec57[_0x4450('0x37')]);_0x46393c[_0x4450('0x39')]=_['intersection'](_0x46393c[_0x4450('0x3b')],_0x46393c[_0x4450('0x37')]);_0x2a4a5d['attributes']=_[_0x4450('0x3a')](_0x46393c['model'],qs[_0x4450('0x3d')](_0x10ec57[_0x4450('0x37')][_0x4450('0x3d')]));_0x2a4a5d['attributes']=_0x2a4a5d[_0x4450('0x3c')][_0x4450('0x3e')]?_0x2a4a5d[_0x4450('0x3c')]:_0x46393c[_0x4450('0x3b')];_0x2a4a5d[_0x4450('0x40')]=qs[_0x4450('0x51')](_0x10ec57['query']['sort']);_0x2a4a5d[_0x4450('0x41')]=qs[_0x4450('0x39')](_[_0x4450('0x52')](_0x10ec57['query'],_0x46393c[_0x4450('0x39')]));if(_0x10ec57[_0x4450('0x37')][_0x4450('0x44')]){_0x2a4a5d['where']=_[_0x4450('0x42')](_0x2a4a5d[_0x4450('0x41')],{'$or':_['map'](_0x2a4a5d[_0x4450('0x3c')],function(_0x21a3a7){var _0x1d03ae={};_0x1d03ae[_0x21a3a7]={'$like':'%'+_0x10ec57[_0x4450('0x37')][_0x4450('0x44')]+'%'};return _0x1d03ae;})});}_0x2a4a5d=_[_0x4450('0x42')]({},_0x2a4a5d,_0x10ec57[_0x4450('0x53')]);return _0x486e1b[_0x4450('0x55')](_0x2a4a5d);}})[_0x4450('0x17')](function(_0x2e9b2c){if(_0x2e9b2c){_0x3f6522=_0x2e9b2c[_0x4450('0x3e')];if(!_0x10ec57[_0x4450('0x37')][_0x4450('0x3f')](_0x4450('0x54'))){_0x2a4a5d[_0x4450('0x27')]=qs[_0x4450('0x27')](_0x10ec57['query']['limit']);_0x2a4a5d[_0x4450('0x25')]=qs[_0x4450('0x25')](_0x10ec57[_0x4450('0x37')][_0x4450('0x25')]);}return _0x486e1b[_0x4450('0x55')](_0x2a4a5d);}})[_0x4450('0x17')](function(_0x1c1664){if(_0x1c1664){return _0x1c1664?{'count':_0x3f6522,'rows':_0x1c1664}:null;}})[_0x4450('0x17')](respondWithResult(_0x4eeb8b,null))[_0x4450('0x49')](handleError(_0x4eeb8b,null));};exports[_0x4450('0x57')]=function(_0x35c4e2,_0x5109ee,_0x338466){var _0x24c1ef={};var _0x56917e={};var _0x322f5a;var _0x3accff;return db[_0x4450('0x33')][_0x4450('0x56')]({'where':{'id':_0x35c4e2[_0x4450('0x4d')]['id']}})['then'](handleEntityNotFound(_0x5109ee,null))[_0x4450('0x17')](function(_0x2d681a){if(_0x2d681a){_0x322f5a=_0x2d681a;_0x56917e[_0x4450('0x3b')]=_[_0x4450('0x38')](db[_0x4450('0x4f')][_0x4450('0x50')]);_0x56917e[_0x4450('0x37')]=_[_0x4450('0x38')](_0x35c4e2[_0x4450('0x37')]);_0x56917e[_0x4450('0x39')]=_[_0x4450('0x3a')](_0x56917e[_0x4450('0x3b')],_0x56917e[_0x4450('0x37')]);_0x24c1ef['attributes']=_['intersection'](_0x56917e[_0x4450('0x3b')],qs[_0x4450('0x3d')](_0x35c4e2[_0x4450('0x37')]['fields']));_0x24c1ef['attributes']=_0x24c1ef[_0x4450('0x3c')][_0x4450('0x3e')]?_0x24c1ef[_0x4450('0x3c')]:_0x56917e[_0x4450('0x3b')];_0x24c1ef[_0x4450('0x40')]=qs[_0x4450('0x51')](_0x35c4e2[_0x4450('0x37')][_0x4450('0x51')]);_0x24c1ef[_0x4450('0x41')]=qs[_0x4450('0x39')](_[_0x4450('0x52')](_0x35c4e2[_0x4450('0x37')],_0x56917e[_0x4450('0x39')]));if(_0x35c4e2['query'][_0x4450('0x44')]){_0x24c1ef['where']=_[_0x4450('0x42')](_0x24c1ef['where'],{'$or':_[_0x4450('0x32')](_0x24c1ef['attributes'],function(_0x54adda){var _0x3b08c3={};_0x3b08c3[_0x54adda]={'$like':'%'+_0x35c4e2[_0x4450('0x37')]['filter']+'%'};return _0x3b08c3;})});}_0x24c1ef=_[_0x4450('0x42')]({},_0x24c1ef,_0x35c4e2[_0x4450('0x53')]);return _0x322f5a[_0x4450('0x57')](_0x24c1ef);}})['then'](function(_0x19f3c6){if(_0x19f3c6){_0x3accff=_0x19f3c6[_0x4450('0x3e')];if(!_0x35c4e2[_0x4450('0x37')][_0x4450('0x3f')]('nolimit')){_0x24c1ef[_0x4450('0x27')]=qs['limit'](_0x35c4e2[_0x4450('0x37')][_0x4450('0x27')]);_0x24c1ef[_0x4450('0x25')]=qs[_0x4450('0x25')](_0x35c4e2[_0x4450('0x37')][_0x4450('0x25')]);}return _0x322f5a['getFields'](_0x24c1ef);}})[_0x4450('0x17')](function(_0x5829d2){if(_0x5829d2){return _0x5829d2?{'count':_0x3accff,'rows':_0x5829d2}:null;}})[_0x4450('0x17')](respondWithResult(_0x5109ee,null))['catch'](handleError(_0x5109ee,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js index 71f68b6..135f455 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 _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 +var _0x5c04=['request-promise','path','rimraf','./intFreshsalesConfiguration.attributes','exports','FreshsalesConfiguration','int_freshsales_configurations','util','../../config/logger','api','bluebird'];(function(_0x1e4e99,_0x1fcbba){var _0x44085b=function(_0x584f97){while(--_0x584f97){_0x1e4e99['push'](_0x1e4e99['shift']());}};_0x44085b(++_0x1fcbba);}(_0x5c04,0x167));var _0x45c0=function(_0x5175f9,_0x271223){_0x5175f9=_0x5175f9-0x0;var _0x9396b0=_0x5c04[_0x5175f9];return _0x9396b0;};'use strict';var _=require('lodash');var util=require(_0x45c0('0x0'));var logger=require(_0x45c0('0x1'))(_0x45c0('0x2'));var moment=require('moment');var BPromise=require(_0x45c0('0x3'));var rp=require(_0x45c0('0x4'));var fs=require('fs');var path=require(_0x45c0('0x5'));var rimraf=require(_0x45c0('0x6'));var config=require('../../config/environment');var attributes=require(_0x45c0('0x7'));module[_0x45c0('0x8')]=function(_0x4912a8,_0x453c2b){return _0x4912a8['define'](_0x45c0('0x9'),attributes,{'tableName':_0x45c0('0xa'),'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 88d6bb9..869e93c 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 _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 +var _0x3c23=['rpc','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','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x45a7a6,_0x380289){var _0x514f51=function(_0x366e28){while(--_0x366e28){_0x45a7a6['push'](_0x45a7a6['shift']());}};_0x514f51(++_0x380289);}(_0x3c23,0x14a));var _0x33c2=function(_0x56d776,_0x252211){_0x56d776=_0x56d776-0x0;var _0x2be469=_0x3c23[_0x56d776];return _0x2be469;};'use strict';var _=require(_0x33c2('0x0'));var util=require('util');var moment=require(_0x33c2('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x33c2('0x2'));var db=require(_0x33c2('0x3'))['db'];var utils=require(_0x33c2('0x4'));var logger=require(_0x33c2('0x5'))(_0x33c2('0x6'));var config=require('../../config/environment');var jayson=require(_0x33c2('0x7'));var client=jayson[_0x33c2('0x8')][_0x33c2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2af312,_0x4feea9,_0x17e358){return new BPromise(function(_0x21a669,_0x5ee714){return client[_0x33c2('0xa')](_0x2af312,_0x17e358)[_0x33c2('0xb')](function(_0x4344eb){logger[_0x33c2('0xc')](_0x33c2('0xd'),_0x4feea9,_0x33c2('0xe'));logger[_0x33c2('0xf')](_0x33c2('0x10'),_0x4feea9,_0x33c2('0xe'),JSON['stringify'](_0x4344eb));if(_0x4344eb[_0x33c2('0x11')]){if(_0x4344eb[_0x33c2('0x11')][_0x33c2('0x12')]===0x1f4){logger[_0x33c2('0x11')](_0x33c2('0xd'),_0x4feea9,_0x4344eb[_0x33c2('0x11')][_0x33c2('0x13')]);return _0x5ee714(_0x4344eb[_0x33c2('0x11')][_0x33c2('0x13')]);}logger[_0x33c2('0x11')](_0x33c2('0xd'),_0x4feea9,_0x4344eb[_0x33c2('0x11')][_0x33c2('0x13')]);return _0x21a669(_0x4344eb[_0x33c2('0x11')][_0x33c2('0x13')]);}else{logger['info'](_0x33c2('0xd'),_0x4feea9,'request\x20sent');_0x21a669(_0x4344eb['result'][_0x33c2('0x13')]);}})[_0x33c2('0x14')](function(_0x5d3dee){logger['error'](_0x33c2('0xd'),_0x4feea9,_0x5d3dee);_0x5ee714(_0x5d3dee);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesField/index.js b/server/api/intFreshsalesField/index.js index 99c764f..843288a 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 _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 +var _0x9f94=['exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','put','update','delete'];(function(_0x52a9fa,_0x13f364){var _0x13280b=function(_0x5bd93a){while(--_0x5bd93a){_0x52a9fa['push'](_0x52a9fa['shift']());}};_0x13280b(++_0x13f364);}(_0x9f94,0x1e7));var _0x49f9=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x9f94[_0x2c91e9];return _0x13f0ff;};'use strict';var multer=require(_0x49f9('0x0'));var util=require(_0x49f9('0x1'));var path=require(_0x49f9('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x49f9('0x3')]();var fs_extra=require(_0x49f9('0x4'));var auth=require(_0x49f9('0x5'));var interaction=require(_0x49f9('0x6'));var config=require(_0x49f9('0x7'));var controller=require('./intFreshsalesField.controller');router[_0x49f9('0x8')]('/',auth[_0x49f9('0x9')](),controller[_0x49f9('0xa')]);router[_0x49f9('0x8')](_0x49f9('0xb'),auth[_0x49f9('0x9')](),controller[_0x49f9('0xc')]);router[_0x49f9('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x49f9('0xe')]('/:id',auth[_0x49f9('0x9')](),controller[_0x49f9('0xf')]);router[_0x49f9('0x10')]('/:id',auth[_0x49f9('0x9')](),controller['destroy']);module[_0x49f9('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 dc99a9e..6714b86 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 _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 +var _0x63be=['string','STRING','variable','BOOLEAN','sequelize','exports','ENUM','customVariable','keyValue'];(function(_0x2a7408,_0xe64263){var _0x3dd6f9=function(_0x165642){while(--_0x165642){_0x2a7408['push'](_0x2a7408['shift']());}};_0x3dd6f9(++_0xe64263);}(_0x63be,0x1d8));var _0xe63b=function(_0x242e64,_0x543e0e){_0x242e64=_0x242e64-0x0;var _0x3e6922=_0x63be[_0x242e64];return _0x3e6922;};'use strict';var Sequelize=require(_0xe63b('0x0'));module[_0xe63b('0x1')]={'type':{'type':Sequelize[_0xe63b('0x2')]('string','variable',_0xe63b('0x3'),_0xe63b('0x4'),'picklist'),'defaultValue':_0xe63b('0x5')},'content':{'type':Sequelize[_0xe63b('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xe63b('0x2')]('string',_0xe63b('0x7'),_0xe63b('0x3'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xe63b('0x6')]},'nameField':{'type':Sequelize[_0xe63b('0x6')]},'customField':{'type':Sequelize[_0xe63b('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.controller.js b/server/api/intFreshsalesField/intFreshsalesField.controller.js index dee3c57..4822392 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 _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 +var _0x511a=['fieldName','key','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter','options','includeAll','include','findAll','catch','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','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','sendStatus','status','offset','undefined','limit','count','Content-Range','json','save','update','then','destroy','end','error','stack','name','index','map','FreshsalesField','rawAttributes'];(function(_0x427f5e,_0x55e1ba){var _0x1ff290=function(_0x224f13){while(--_0x224f13){_0x427f5e['push'](_0x427f5e['shift']());}};_0x1ff290(++_0x55e1ba);}(_0x511a,0x1df));var _0xa511=function(_0xa03eed,_0x455eb1){_0xa03eed=_0xa03eed-0x0;var _0x2699a6=_0x511a[_0xa03eed];return _0x2699a6;};'use strict';var emlformat=require(_0xa511('0x0'));var rimraf=require(_0xa511('0x1'));var zipdir=require(_0xa511('0x2'));var jsonpatch=require(_0xa511('0x3'));var rp=require(_0xa511('0x4'));var moment=require(_0xa511('0x5'));var BPromise=require(_0xa511('0x6'));var Mustache=require(_0xa511('0x7'));var util=require('util');var path=require(_0xa511('0x8'));var sox=require(_0xa511('0x9'));var csv=require(_0xa511('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa511('0xb'));var _=require('lodash');var squel=require(_0xa511('0xc'));var crypto=require(_0xa511('0xd'));var jsforce=require(_0xa511('0xe'));var deskjs=require(_0xa511('0xf'));var toCsv=require('to-csv');var querystring=require(_0xa511('0x10'));var Papa=require(_0xa511('0x11'));var Redis=require('ioredis');var authService=require(_0xa511('0x12'));var qs=require(_0xa511('0x13'));var as=require(_0xa511('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa511('0x15'))(_0xa511('0x16'));var utils=require('../../config/utils');var config=require(_0xa511('0x17'));var licenseUtil=require(_0xa511('0x18'));var db=require(_0xa511('0x19'))['db'];function respondWithStatusCode(_0x11409e,_0x2c1c8b){_0x2c1c8b=_0x2c1c8b||0xcc;return function(_0x3700a4){if(_0x3700a4){return _0x11409e[_0xa511('0x1a')](_0x2c1c8b);}return _0x11409e[_0xa511('0x1b')](_0x2c1c8b)['end']();};}function respondWithResult(_0x43d922,_0x3f5b36){_0x3f5b36=_0x3f5b36||0xc8;return function(_0x2114f9){if(_0x2114f9){return _0x43d922[_0xa511('0x1b')](_0x3f5b36)['json'](_0x2114f9);}};}function respondWithFilteredResult(_0x482957,_0x57a004){return function(_0x28dbf5){if(_0x28dbf5){var _0x512654=typeof _0x57a004[_0xa511('0x1c')]===_0xa511('0x1d')&&typeof _0x57a004[_0xa511('0x1e')]==='undefined';var _0x315c7e=_0x28dbf5[_0xa511('0x1f')];var _0x55abe9=_0x512654?0x0:_0x57a004[_0xa511('0x1c')];var _0x4d0ac5=_0x512654?_0x28dbf5[_0xa511('0x1f')]:_0x57a004['offset']+_0x57a004[_0xa511('0x1e')];var _0x192c6a;if(_0x4d0ac5>=_0x315c7e){_0x4d0ac5=_0x315c7e;_0x192c6a=0xc8;}else{_0x192c6a=0xce;}_0x482957['status'](_0x192c6a);return _0x482957['set'](_0xa511('0x20'),_0x55abe9+'-'+_0x4d0ac5+'/'+_0x315c7e)[_0xa511('0x21')](_0x28dbf5);}return null;};}function patchUpdates(_0x5f5d87){return function(_0x548863){try{jsonpatch['apply'](_0x548863,_0x5f5d87,!![]);}catch(_0x17bcb2){return BPromise['reject'](_0x17bcb2);}return _0x548863[_0xa511('0x22')]();};}function saveUpdates(_0x4d2647,_0x2fed68){return function(_0x15530f){if(_0x15530f){return _0x15530f[_0xa511('0x23')](_0x4d2647)[_0xa511('0x24')](function(_0x38aa0c){return _0x38aa0c;});}return null;};}function removeEntity(_0x2e8f22,_0x4fd334){return function(_0x442bf7){if(_0x442bf7){return _0x442bf7[_0xa511('0x25')]()[_0xa511('0x24')](function(){_0x2e8f22[_0xa511('0x1b')](0xcc)[_0xa511('0x26')]();});}};}function handleEntityNotFound(_0x400c5f,_0x1c6edf){return function(_0x53b1d4){if(!_0x53b1d4){_0x400c5f[_0xa511('0x1a')](0x194);}return _0x53b1d4;};}function handleError(_0x324664,_0x24e9fe){_0x24e9fe=_0x24e9fe||0x1f4;return function(_0x2e33b8){logger[_0xa511('0x27')](_0x2e33b8[_0xa511('0x28')]);if(_0x2e33b8['name']){delete _0x2e33b8[_0xa511('0x29')];}_0x324664['status'](_0x24e9fe)['send'](_0x2e33b8);};}exports[_0xa511('0x2a')]=function(_0x45f7a1,_0xd5b8b1){var _0x2520c8={},_0x5319ee={},_0xfd07b9={'count':0x0,'rows':[]};var _0x35a710=_[_0xa511('0x2b')](db[_0xa511('0x2c')][_0xa511('0x2d')],function(_0x22bf10){return{'name':_0x22bf10[_0xa511('0x2e')],'type':_0x22bf10['type'][_0xa511('0x2f')]};});_0x5319ee['model']=_[_0xa511('0x2b')](_0x35a710,_0xa511('0x29'));_0x5319ee[_0xa511('0x30')]=_[_0xa511('0x31')](_0x45f7a1[_0xa511('0x30')]);_0x5319ee[_0xa511('0x32')]=_[_0xa511('0x33')](_0x5319ee[_0xa511('0x34')],_0x5319ee[_0xa511('0x30')]);_0x2520c8['attributes']=_[_0xa511('0x33')](_0x5319ee[_0xa511('0x34')],qs[_0xa511('0x35')](_0x45f7a1[_0xa511('0x30')][_0xa511('0x35')]));_0x2520c8[_0xa511('0x36')]=_0x2520c8[_0xa511('0x36')][_0xa511('0x37')]?_0x2520c8[_0xa511('0x36')]:_0x5319ee[_0xa511('0x34')];if(!_0x45f7a1[_0xa511('0x30')][_0xa511('0x38')](_0xa511('0x39'))){_0x2520c8[_0xa511('0x1e')]=qs[_0xa511('0x1e')](_0x45f7a1[_0xa511('0x30')][_0xa511('0x1e')]);_0x2520c8['offset']=qs[_0xa511('0x1c')](_0x45f7a1[_0xa511('0x30')]['offset']);}_0x2520c8[_0xa511('0x3a')]=qs[_0xa511('0x3b')](_0x45f7a1[_0xa511('0x30')][_0xa511('0x3b')]);_0x2520c8[_0xa511('0x3c')]=qs['filters'](_[_0xa511('0x3d')](_0x45f7a1['query'],_0x5319ee[_0xa511('0x32')]),_0x35a710);if(_0x45f7a1['query']['filter']){_0x2520c8[_0xa511('0x3c')]=_[_0xa511('0x3e')](_0x2520c8['where'],{'$or':_[_0xa511('0x2b')](_0x35a710,function(_0x28defa){if(_0x28defa[_0xa511('0x3f')]!==_0xa511('0x40')){var _0x1c88d8={};_0x1c88d8[_0x28defa[_0xa511('0x29')]]={'$like':'%'+_0x45f7a1[_0xa511('0x30')][_0xa511('0x41')]+'%'};return _0x1c88d8;}})});}_0x2520c8=_[_0xa511('0x3e')]({},_0x2520c8,_0x45f7a1[_0xa511('0x42')]);var _0x433042={'where':_0x2520c8[_0xa511('0x3c')]};return db[_0xa511('0x2c')][_0xa511('0x1f')](_0x433042)['then'](function(_0x541bfc){_0xfd07b9['count']=_0x541bfc;if(_0x45f7a1['query'][_0xa511('0x43')]){_0x2520c8[_0xa511('0x44')]=[{'all':!![]}];}return db[_0xa511('0x2c')][_0xa511('0x45')](_0x2520c8);})[_0xa511('0x24')](function(_0x3e4c57){_0xfd07b9['rows']=_0x3e4c57;return _0xfd07b9;})[_0xa511('0x24')](respondWithFilteredResult(_0xd5b8b1,_0x2520c8))[_0xa511('0x46')](handleError(_0xd5b8b1,null));};exports['show']=function(_0x31664b,_0x1bb656){var _0x219a1c={'raw':!![],'where':{'id':_0x31664b[_0xa511('0x47')]['id']}},_0x56770f={};_0x56770f['model']=_[_0xa511('0x31')](db[_0xa511('0x2c')][_0xa511('0x2d')]);_0x56770f[_0xa511('0x30')]=_[_0xa511('0x31')](_0x31664b['query']);_0x56770f[_0xa511('0x32')]=_['intersection'](_0x56770f[_0xa511('0x34')],_0x56770f['query']);_0x219a1c[_0xa511('0x36')]=_[_0xa511('0x33')](_0x56770f['model'],qs['fields'](_0x31664b[_0xa511('0x30')]['fields']));_0x219a1c['attributes']=_0x219a1c[_0xa511('0x36')][_0xa511('0x37')]?_0x219a1c[_0xa511('0x36')]:_0x56770f[_0xa511('0x34')];if(_0x31664b[_0xa511('0x30')]['includeAll']){_0x219a1c[_0xa511('0x44')]=[{'all':!![]}];}_0x219a1c=_[_0xa511('0x3e')]({},_0x219a1c,_0x31664b[_0xa511('0x42')]);return db[_0xa511('0x2c')][_0xa511('0x48')](_0x219a1c)[_0xa511('0x24')](handleEntityNotFound(_0x1bb656,null))[_0xa511('0x24')](respondWithResult(_0x1bb656,null))[_0xa511('0x46')](handleError(_0x1bb656,null));};exports['create']=function(_0x2ce3cf,_0x5dba8a){return db['FreshsalesField'][_0xa511('0x49')](_0x2ce3cf['body'],{})[_0xa511('0x24')](respondWithResult(_0x5dba8a,0xc9))[_0xa511('0x46')](handleError(_0x5dba8a,null));};exports['update']=function(_0x412ba1,_0x4d6af4){if(_0x412ba1[_0xa511('0x4a')]['id']){delete _0x412ba1[_0xa511('0x4a')]['id'];}return db['FreshsalesField'][_0xa511('0x48')]({'where':{'id':_0x412ba1[_0xa511('0x47')]['id']}})['then'](handleEntityNotFound(_0x4d6af4,null))[_0xa511('0x24')](saveUpdates(_0x412ba1[_0xa511('0x4a')],null))[_0xa511('0x24')](respondWithResult(_0x4d6af4,null))[_0xa511('0x46')](handleError(_0x4d6af4,null));};exports[_0xa511('0x25')]=function(_0x3693d7,_0x3d73a5){return db['FreshsalesField'][_0xa511('0x48')]({'where':{'id':_0x3693d7[_0xa511('0x47')]['id']}})[_0xa511('0x24')](handleEntityNotFound(_0x3d73a5,null))[_0xa511('0x24')](removeEntity(_0x3d73a5,null))['catch'](handleError(_0x3d73a5,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.model.js b/server/api/intFreshsalesField/intFreshsalesField.model.js index 1a60d57..97d1ff2 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 _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 +var _0x0f42=['api','bluebird','path','../../config/environment','./intFreshsalesField.attributes','exports','define','int_freshsales_fields','lodash','util','../../config/logger'];(function(_0x3d37c6,_0x38f964){var _0x53d1ea=function(_0xc6e722){while(--_0xc6e722){_0x3d37c6['push'](_0x3d37c6['shift']());}};_0x53d1ea(++_0x38f964);}(_0x0f42,0x126));var _0x20f4=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x0f42[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0x20f4('0x0'));var util=require(_0x20f4('0x1'));var logger=require(_0x20f4('0x2'))(_0x20f4('0x3'));var moment=require('moment');var BPromise=require(_0x20f4('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x20f4('0x5'));var rimraf=require('rimraf');var config=require(_0x20f4('0x6'));var attributes=require(_0x20f4('0x7'));module[_0x20f4('0x8')]=function(_0x4c3214,_0x435359){return _0x4c3214[_0x20f4('0x9')]('FreshsalesField',attributes,{'tableName':_0x20f4('0xa'),'paranoid':![],'indexes':[{'name':'freshsales_unique_index','fields':['idField','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 7830931..652c89a 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 _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 +var _0x687b=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils'];(function(_0xe8129c,_0x2fb03c){var _0x709fc5=function(_0xb8e0c6){while(--_0xb8e0c6){_0xe8129c['push'](_0xe8129c['shift']());}};_0x709fc5(++_0x2fb03c);}(_0x687b,0x14a));var _0xb687=function(_0x1c44d7,_0x21dafd){_0x1c44d7=_0x1c44d7-0x0;var _0xc485e5=_0x687b[_0x1c44d7];return _0xc485e5;};'use strict';var _=require(_0xb687('0x0'));var util=require(_0xb687('0x1'));var moment=require(_0xb687('0x2'));var BPromise=require(_0xb687('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb687('0x4'))['db'];var utils=require(_0xb687('0x5'));var logger=require(_0xb687('0x6'))(_0xb687('0x7'));var config=require(_0xb687('0x8'));var jayson=require(_0xb687('0x9'));var client=jayson[_0xb687('0xa')][_0xb687('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x47ffea,_0x27b750,_0x48942b){return new BPromise(function(_0x2aea59,_0xd40346){return client['request'](_0x47ffea,_0x48942b)[_0xb687('0xc')](function(_0x21e3ab){logger[_0xb687('0xd')](_0xb687('0xe'),_0x27b750,_0xb687('0xf'));logger[_0xb687('0x10')](_0xb687('0x11'),_0x27b750,_0xb687('0xf'),JSON[_0xb687('0x12')](_0x21e3ab));if(_0x21e3ab['error']){if(_0x21e3ab[_0xb687('0x13')][_0xb687('0x14')]===0x1f4){logger[_0xb687('0x13')](_0xb687('0xe'),_0x27b750,_0x21e3ab['error']['message']);return _0xd40346(_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);}logger['error'](_0xb687('0xe'),_0x27b750,_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);return _0x2aea59(_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);}else{logger[_0xb687('0xd')](_0xb687('0xe'),_0x27b750,_0xb687('0xf'));_0x2aea59(_0x21e3ab[_0xb687('0x16')][_0xb687('0x15')]);}})[_0xb687('0x17')](function(_0x19bb29){logger['error'](_0xb687('0xe'),_0x27b750,_0x19bb29);_0xd40346(_0x19bb29);});});} \ No newline at end of file diff --git a/server/api/intSalesforceAccount/index.js b/server/api/intSalesforceAccount/index.js index 2e54338..b06c5ea 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 _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 +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(_0xbcaed1,_0x4a190b){var _0x472096=function(_0x40b7b5){while(--_0x40b7b5){_0xbcaed1['push'](_0xbcaed1['shift']());}};_0x472096(++_0x4a190b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c3c0b,_0x4ee35e){_0x5c3c0b=_0x5c3c0b-0x0;var _0x52ecd2=_0xa9e0[_0x5c3c0b];return _0x52ecd2;};'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 4f17e13..17ec828 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 _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 +var _0x5943=['newTab','sequelize','exports','STRING','username','ENUM','integrationTab'];(function(_0x51b208,_0xb6fcd4){var _0x2d3caa=function(_0x43040e){while(--_0x43040e){_0x51b208['push'](_0x51b208['shift']());}};_0x2d3caa(++_0xb6fcd4);}(_0x5943,0x1f2));var _0x3594=function(_0x344f71,_0x2f1cb7){_0x344f71=_0x344f71-0x0;var _0x59c274=_0x5943[_0x344f71];return _0x59c274;};'use strict';var Sequelize=require(_0x3594('0x0'));module[_0x3594('0x1')]={'name':{'type':Sequelize[_0x3594('0x2')]},'description':{'type':Sequelize[_0x3594('0x2')]},'username':{'type':Sequelize[_0x3594('0x2')],'unique':_0x3594('0x3')},'remoteUri':{'type':Sequelize[_0x3594('0x2')]},'password':{'type':Sequelize[_0x3594('0x2')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize['STRING']},'securityToken':{'type':Sequelize[_0x3594('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x3594('0x4')](_0x3594('0x5'),_0x3594('0x6')),'defaultValue':_0x3594('0x5')}}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js index 4c97f94..627b052 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 _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 +var _0x220e=['find','create','update','body','getConfigurations','findOne','length','order','pick','addConfiguration','Subjects','getSubjects','Descriptions','getDescriptions','channel','SalesforceField','getFields','Task','remoteUri','clientId','clientSecret','username','password','securityToken','slice','substring','lastIndexOf','Connection','concat','isNil','ticketType','describe','OwnerId','ActivityDate','IsReminderSet','IsRecurrence','Description','string','int','picklist','boolean','email','textarea','phone','includes','label','custom','picklistValues','value','True','true','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','destroy','stack','name','send','index','map','SalesforceAccount','fieldName','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','filter','merge','type','VIRTUAL','includeAll','include','findAll','show','params','rawAttributes','options'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x220e,0x1d1));var _0xe220=function(_0x4d40dd,_0x39592b){_0x4d40dd=_0x4d40dd-0x0;var _0x1c51f2=_0x220e[_0x4d40dd];return _0x1c51f2;};'use strict';var emlformat=require(_0xe220('0x0'));var rimraf=require(_0xe220('0x1'));var zipdir=require(_0xe220('0x2'));var jsonpatch=require(_0xe220('0x3'));var rp=require(_0xe220('0x4'));var moment=require(_0xe220('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xe220('0x6'));var util=require(_0xe220('0x7'));var path=require(_0xe220('0x8'));var sox=require(_0xe220('0x9'));var csv=require(_0xe220('0xa'));var ejs=require(_0xe220('0xb'));var fs=require('fs');var fs_extra=require(_0xe220('0xc'));var _=require(_0xe220('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xe220('0xe'));var deskjs=require(_0xe220('0xf'));var toCsv=require(_0xe220('0xa'));var querystring=require('querystring');var Papa=require(_0xe220('0x10'));var Redis=require(_0xe220('0x11'));var authService=require(_0xe220('0x12'));var qs=require(_0xe220('0x13'));var as=require(_0xe220('0x14'));var hardwareService=require(_0xe220('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0xe220('0x16'));var config=require(_0xe220('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xe220('0x18'))['db'];var integrations=require(_0xe220('0x19'));var jayson=require('jayson/promise');var client=jayson[_0xe220('0x1a')][_0xe220('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x379d16,_0x35a970,_0x35e310,_0x1063a6){return new BPromise(function(_0x5f58da,_0x180c2e){var _0x39f424=_0x1063a6||client;return _0x39f424[_0xe220('0x1c')](_0x379d16,_0x35e310)[_0xe220('0x1d')](function(_0x41e80f){logger[_0xe220('0x1e')](_0xe220('0x1f'),_0x35a970,_0xe220('0x20'));logger[_0xe220('0x21')](_0xe220('0x22'),_0x35a970,_0xe220('0x20'),JSON[_0xe220('0x23')](_0x41e80f));if(_0x41e80f[_0xe220('0x24')]){if(_0x41e80f[_0xe220('0x24')][_0xe220('0x25')]===0x1f4){logger[_0xe220('0x24')](_0xe220('0x1f'),_0x35a970,_0x41e80f[_0xe220('0x24')][_0xe220('0x26')]);return _0x180c2e(_0x41e80f[_0xe220('0x24')][_0xe220('0x26')]);}logger[_0xe220('0x24')]('SalesforceAccount,\x20%s,\x20%s',_0x35a970,_0x41e80f[_0xe220('0x24')][_0xe220('0x26')]);return _0x5f58da(_0x41e80f[_0xe220('0x24')]['message']);}else{logger['info']('SalesforceAccount,\x20%s,\x20%s',_0x35a970,_0xe220('0x20'));_0x5f58da(_0x41e80f['result'][_0xe220('0x26')]);}})[_0xe220('0x27')](function(_0x3c923f){logger[_0xe220('0x24')](_0xe220('0x1f'),_0x35a970,_0x3c923f);_0x180c2e(_0x3c923f);});});}function respondWithStatusCode(_0x127eea,_0x5b3373){_0x5b3373=_0x5b3373||0xcc;return function(_0x373049){if(_0x373049){return _0x127eea[_0xe220('0x28')](_0x5b3373);}return _0x127eea[_0xe220('0x29')](_0x5b3373)[_0xe220('0x2a')]();};}function respondWithResult(_0x3b1720,_0x679db6){_0x679db6=_0x679db6||0xc8;return function(_0x59728f){if(_0x59728f){return _0x3b1720['status'](_0x679db6)[_0xe220('0x2b')](_0x59728f);}};}function respondWithFilteredResult(_0x4cf8ee,_0x21386d){return function(_0xfd0b62){if(_0xfd0b62){var _0x2d3d8e=typeof _0x21386d[_0xe220('0x2c')]===_0xe220('0x2d')&&typeof _0x21386d[_0xe220('0x2e')]===_0xe220('0x2d');var _0x1c326a=_0xfd0b62['count'];var _0x266247=_0x2d3d8e?0x0:_0x21386d[_0xe220('0x2c')];var _0x170a3e=_0x2d3d8e?_0xfd0b62[_0xe220('0x2f')]:_0x21386d['offset']+_0x21386d[_0xe220('0x2e')];var _0x2cbb96;if(_0x170a3e>=_0x1c326a){_0x170a3e=_0x1c326a;_0x2cbb96=0xc8;}else{_0x2cbb96=0xce;}_0x4cf8ee[_0xe220('0x29')](_0x2cbb96);return _0x4cf8ee[_0xe220('0x30')](_0xe220('0x31'),_0x266247+'-'+_0x170a3e+'/'+_0x1c326a)[_0xe220('0x2b')](_0xfd0b62);}return null;};}function patchUpdates(_0x4556e3){return function(_0x195f8c){try{jsonpatch['apply'](_0x195f8c,_0x4556e3,!![]);}catch(_0x1fc947){return BPromise[_0xe220('0x32')](_0x1fc947);}return _0x195f8c[_0xe220('0x33')]();};}function saveUpdates(_0x1dce1d,_0x29a7ab){return function(_0x307ddc){if(_0x307ddc){return _0x307ddc['update'](_0x1dce1d)[_0xe220('0x1d')](function(_0x37083b){return _0x37083b;});}return null;};}function removeEntity(_0x227783,_0x31f22c){return function(_0x5a8a26){if(_0x5a8a26){return _0x5a8a26[_0xe220('0x34')]()[_0xe220('0x1d')](function(){_0x227783[_0xe220('0x29')](0xcc)[_0xe220('0x2a')]();});}};}function handleEntityNotFound(_0x51756e,_0x13d840){return function(_0x4af150){if(!_0x4af150){_0x51756e[_0xe220('0x28')](0x194);}return _0x4af150;};}function handleError(_0x12d8e7,_0xdb1cde){_0xdb1cde=_0xdb1cde||0x1f4;return function(_0x17fa86){logger[_0xe220('0x24')](_0x17fa86[_0xe220('0x35')]);if(_0x17fa86[_0xe220('0x36')]){delete _0x17fa86[_0xe220('0x36')];}_0x12d8e7[_0xe220('0x29')](_0xdb1cde)[_0xe220('0x37')](_0x17fa86);};}exports[_0xe220('0x38')]=function(_0x4e782e,_0x5072da){var _0x4ada13={},_0x1fc02e={},_0x1cb12c={'count':0x0,'rows':[]};var _0xa8d711=_[_0xe220('0x39')](db[_0xe220('0x3a')]['rawAttributes'],function(_0x1c569a){return{'name':_0x1c569a[_0xe220('0x3b')],'type':_0x1c569a['type'][_0xe220('0x3c')]};});_0x1fc02e[_0xe220('0x3d')]=_[_0xe220('0x39')](_0xa8d711,_0xe220('0x36'));_0x1fc02e[_0xe220('0x3e')]=_[_0xe220('0x3f')](_0x4e782e['query']);_0x1fc02e['filters']=_[_0xe220('0x40')](_0x1fc02e[_0xe220('0x3d')],_0x1fc02e[_0xe220('0x3e')]);_0x4ada13[_0xe220('0x41')]=_[_0xe220('0x40')](_0x1fc02e[_0xe220('0x3d')],qs['fields'](_0x4e782e['query'][_0xe220('0x42')]));_0x4ada13['attributes']=_0x4ada13[_0xe220('0x41')]['length']?_0x4ada13['attributes']:_0x1fc02e['model'];if(!_0x4e782e['query'][_0xe220('0x43')](_0xe220('0x44'))){_0x4ada13[_0xe220('0x2e')]=qs['limit'](_0x4e782e[_0xe220('0x3e')][_0xe220('0x2e')]);_0x4ada13[_0xe220('0x2c')]=qs[_0xe220('0x2c')](_0x4e782e['query'][_0xe220('0x2c')]);}_0x4ada13['order']=qs[_0xe220('0x45')](_0x4e782e[_0xe220('0x3e')][_0xe220('0x45')]);_0x4ada13[_0xe220('0x46')]=qs[_0xe220('0x47')](_['pick'](_0x4e782e[_0xe220('0x3e')],_0x1fc02e[_0xe220('0x47')]),_0xa8d711);if(_0x4e782e[_0xe220('0x3e')][_0xe220('0x48')]){_0x4ada13[_0xe220('0x46')]=_[_0xe220('0x49')](_0x4ada13[_0xe220('0x46')],{'$or':_['map'](_0xa8d711,function(_0x33c939){if(_0x33c939[_0xe220('0x4a')]!==_0xe220('0x4b')){var _0x860eb={};_0x860eb[_0x33c939[_0xe220('0x36')]]={'$like':'%'+_0x4e782e[_0xe220('0x3e')]['filter']+'%'};return _0x860eb;}})});}_0x4ada13=_[_0xe220('0x49')]({},_0x4ada13,_0x4e782e['options']);var _0x550daa={'where':_0x4ada13[_0xe220('0x46')]};return db[_0xe220('0x3a')]['count'](_0x550daa)[_0xe220('0x1d')](function(_0x8011b9){_0x1cb12c[_0xe220('0x2f')]=_0x8011b9;if(_0x4e782e[_0xe220('0x3e')][_0xe220('0x4c')]){_0x4ada13[_0xe220('0x4d')]=[{'all':!![]}];}return db['SalesforceAccount'][_0xe220('0x4e')](_0x4ada13);})['then'](function(_0x2d47a1){_0x1cb12c['rows']=_0x2d47a1;return _0x1cb12c;})[_0xe220('0x1d')](respondWithFilteredResult(_0x5072da,_0x4ada13))[_0xe220('0x27')](handleError(_0x5072da,null));};exports[_0xe220('0x4f')]=function(_0x1ce4de,_0x3cb14f){var _0x4760c3={'raw':![],'where':{'id':_0x1ce4de[_0xe220('0x50')]['id']}},_0x5b54d7={};_0x5b54d7['model']=_[_0xe220('0x3f')](db['SalesforceAccount'][_0xe220('0x51')]);_0x5b54d7[_0xe220('0x3e')]=_[_0xe220('0x3f')](_0x1ce4de[_0xe220('0x3e')]);_0x5b54d7[_0xe220('0x47')]=_[_0xe220('0x40')](_0x5b54d7[_0xe220('0x3d')],_0x5b54d7[_0xe220('0x3e')]);_0x4760c3[_0xe220('0x41')]=_[_0xe220('0x40')](_0x5b54d7[_0xe220('0x3d')],qs[_0xe220('0x42')](_0x1ce4de['query'][_0xe220('0x42')]));_0x4760c3['attributes']=_0x4760c3[_0xe220('0x41')]['length']?_0x4760c3['attributes']:_0x5b54d7['model'];if(_0x1ce4de[_0xe220('0x3e')][_0xe220('0x4c')]){_0x4760c3[_0xe220('0x4d')]=[{'all':!![]}];}_0x4760c3=_[_0xe220('0x49')]({},_0x4760c3,_0x1ce4de[_0xe220('0x52')]);return db[_0xe220('0x3a')][_0xe220('0x53')](_0x4760c3)[_0xe220('0x1d')](handleEntityNotFound(_0x3cb14f,null))[_0xe220('0x1d')](respondWithResult(_0x3cb14f,null))['catch'](handleError(_0x3cb14f,null));};exports[_0xe220('0x54')]=function(_0x11008b,_0x4bc882){return db[_0xe220('0x3a')][_0xe220('0x54')](_0x11008b['body'],{})['then'](respondWithResult(_0x4bc882,0xc9))[_0xe220('0x27')](handleError(_0x4bc882,null));};exports[_0xe220('0x55')]=function(_0x586a71,_0x27ff4f){if(_0x586a71[_0xe220('0x56')]['id']){delete _0x586a71[_0xe220('0x56')]['id'];}return db[_0xe220('0x3a')][_0xe220('0x53')]({'where':{'id':_0x586a71['params']['id']}})[_0xe220('0x1d')](handleEntityNotFound(_0x27ff4f,null))[_0xe220('0x1d')](saveUpdates(_0x586a71[_0xe220('0x56')],null))[_0xe220('0x1d')](respondWithResult(_0x27ff4f,null))[_0xe220('0x27')](handleError(_0x27ff4f,null));};exports[_0xe220('0x34')]=function(_0x556096,_0x50df0a){return db[_0xe220('0x3a')][_0xe220('0x53')]({'where':{'id':_0x556096[_0xe220('0x50')]['id']}})['then'](handleEntityNotFound(_0x50df0a,null))[_0xe220('0x1d')](removeEntity(_0x50df0a,null))[_0xe220('0x27')](handleError(_0x50df0a,null));};exports[_0xe220('0x57')]=function(_0x45b933,_0x5de029,_0x2285e9){var _0x19db2e={};var _0x35646e={};var _0x137a0f;var _0x155953;return db[_0xe220('0x3a')][_0xe220('0x58')]({'where':{'id':_0x45b933[_0xe220('0x50')]['id']}})[_0xe220('0x1d')](handleEntityNotFound(_0x5de029,null))[_0xe220('0x1d')](function(_0x30905f){if(_0x30905f){_0x137a0f=_0x30905f;_0x35646e[_0xe220('0x3d')]=_[_0xe220('0x3f')](db['SalesforceConfiguration'][_0xe220('0x51')]);_0x35646e[_0xe220('0x3e')]=_['keys'](_0x45b933[_0xe220('0x3e')]);_0x35646e[_0xe220('0x47')]=_[_0xe220('0x40')](_0x35646e['model'],_0x35646e['query']);_0x19db2e[_0xe220('0x41')]=_['intersection'](_0x35646e[_0xe220('0x3d')],qs['fields'](_0x45b933['query'][_0xe220('0x42')]));_0x19db2e[_0xe220('0x41')]=_0x19db2e[_0xe220('0x41')][_0xe220('0x59')]?_0x19db2e[_0xe220('0x41')]:_0x35646e[_0xe220('0x3d')];_0x19db2e[_0xe220('0x5a')]=qs[_0xe220('0x45')](_0x45b933['query'][_0xe220('0x45')]);_0x19db2e[_0xe220('0x46')]=qs[_0xe220('0x47')](_[_0xe220('0x5b')](_0x45b933[_0xe220('0x3e')],_0x35646e[_0xe220('0x47')]));if(_0x45b933[_0xe220('0x3e')][_0xe220('0x48')]){_0x19db2e[_0xe220('0x46')]=_[_0xe220('0x49')](_0x19db2e[_0xe220('0x46')],{'$or':_[_0xe220('0x39')](_0x19db2e[_0xe220('0x41')],function(_0xec739a){var _0x813e31={};_0x813e31[_0xec739a]={'$like':'%'+_0x45b933['query'][_0xe220('0x48')]+'%'};return _0x813e31;})});}_0x19db2e=_[_0xe220('0x49')]({},_0x19db2e,_0x45b933[_0xe220('0x52')]);return _0x137a0f[_0xe220('0x57')](_0x19db2e);}})[_0xe220('0x1d')](function(_0x223484){if(_0x223484){_0x155953=_0x223484[_0xe220('0x59')];if(!_0x45b933[_0xe220('0x3e')][_0xe220('0x43')](_0xe220('0x44'))){_0x19db2e[_0xe220('0x2e')]=qs[_0xe220('0x2e')](_0x45b933[_0xe220('0x3e')][_0xe220('0x2e')]);_0x19db2e[_0xe220('0x2c')]=qs[_0xe220('0x2c')](_0x45b933[_0xe220('0x3e')][_0xe220('0x2c')]);}return _0x137a0f['getConfigurations'](_0x19db2e);}})['then'](function(_0x4f9841){if(_0x4f9841){return _0x4f9841?{'count':_0x155953,'rows':_0x4f9841}:null;}})[_0xe220('0x1d')](respondWithResult(_0x5de029,null))['catch'](handleError(_0x5de029,null));};exports[_0xe220('0x5c')]=function(_0x1b0d83,_0x69094b,_0x3d02cb){if(_0x1b0d83[_0xe220('0x56')]['id']){delete _0x1b0d83[_0xe220('0x56')]['id'];}return db[_0xe220('0x3a')][_0xe220('0x58')]({'where':{'id':_0x1b0d83[_0xe220('0x50')]['id']}})[_0xe220('0x1d')](handleEntityNotFound(_0x69094b,null))[_0xe220('0x1d')](function(_0x532b36){if(_0x532b36){_0x1b0d83[_0xe220('0x56')]['AccountId']=_0x532b36['id'];_0x1b0d83[_0xe220('0x56')][_0xe220('0x5d')]=integrations[_0xe220('0x5e')](_0x1b0d83[_0xe220('0x56')]['channel'],_0x1b0d83[_0xe220('0x56')][_0xe220('0x4a')]);_0x1b0d83[_0xe220('0x56')][_0xe220('0x5f')]=integrations[_0xe220('0x60')](_0x1b0d83[_0xe220('0x56')][_0xe220('0x61')],_0x1b0d83[_0xe220('0x56')][_0xe220('0x4a')]);return db['SalesforceConfiguration'][_0xe220('0x54')](_0x1b0d83['body'],{'include':[{'model':db[_0xe220('0x62')],'as':'Subjects'},{'model':db[_0xe220('0x62')],'as':_0xe220('0x5f')}]});}return null;})[_0xe220('0x1d')](respondWithResult(_0x69094b,null))[_0xe220('0x27')](handleError(_0x69094b,null));};exports[_0xe220('0x63')]=function(_0x1076e8,_0x4da55d,_0x22e18b){var _0x3325fb;var _0x3b1e3e='';var _0x3210e1=_0xe220('0x64');return db[_0xe220('0x3a')][_0xe220('0x58')]({'where':{'id':_0x1076e8[_0xe220('0x50')]['id']},'attributes':['id',_0xe220('0x65'),_0xe220('0x66'),_0xe220('0x67'),_0xe220('0x68'),_0xe220('0x69'),_0xe220('0x6a')]})['then'](handleEntityNotFound(_0x4da55d,null))['then'](function(_0x158832){if(_0x158832){_0x3b1e3e=_0x158832[_0xe220('0x65')];var _0x4a4d9e=_0x3b1e3e[_0xe220('0x6b')](-0x1);if(_0x4a4d9e==='/'){_0x3b1e3e=_0x3b1e3e[_0xe220('0x6c')](0x0,_0x3b1e3e[_0xe220('0x6d')](_0x4a4d9e));}_0x3325fb=new jsforce[(_0xe220('0x6e'))]({'oauth2':{'loginUrl':_0x3b1e3e,'clientId':_0x158832[_0xe220('0x66')],'clientSecret':_0x158832[_0xe220('0x67')]}});return _0x3325fb['login'](_0x158832[_0xe220('0x68')],_0x158832['password'][_0xe220('0x6f')](_0x158832[_0xe220('0x6a')]));}})['then'](function(_0x38ff19){if(_0x38ff19){if(!_[_0xe220('0x70')](_0x1076e8[_0xe220('0x3e')][_0xe220('0x71')])){_0x3210e1=_0x1076e8['query']['ticketType'];}return _0x3325fb['sobject'](_0x3210e1)[_0xe220('0x72')]();}})[_0xe220('0x1d')](function(_0x53ff2c){var _0x232d79=[_0xe220('0x73'),_0xe220('0x74'),_0xe220('0x75'),_0xe220('0x76'),'Subject',_0xe220('0x77')];var _0x9ad56e=[_0xe220('0x78'),_0xe220('0x79'),_0xe220('0x7a'),_0xe220('0x7b'),_0xe220('0x7c'),_0xe220('0x7d'),_0xe220('0x7e')];if(_0x53ff2c){_['remove'](_0x53ff2c[_0xe220('0x42')],function(_0x71fe2e){return _0x232d79[_0xe220('0x7f')](_0x71fe2e[_0xe220('0x36')])||!_0x9ad56e['includes'](_0x71fe2e['type']);});return{'count':_0x53ff2c[_0xe220('0x42')]['length'],'rows':_[_0xe220('0x39')](_0x53ff2c['fields'],function(_0x148345){return{'id':_0x148345[_0xe220('0x36')],'name':_0x148345[_0xe220('0x80')],'custom':_0x148345[_0xe220('0x81')],'options':_0x148345[_0xe220('0x82')][_0xe220('0x59')]>0x0?_[_0xe220('0x39')](_0x148345[_0xe220('0x82')],function(_0xbd699){return{'name':_0xbd699[_0xe220('0x80')],'value':_0xbd699[_0xe220('0x83')]};}):_0x148345[_0xe220('0x4a')]==_0xe220('0x7b')?[{'name':_0xe220('0x84'),'value':_0xe220('0x85')},{'name':'False','value':'false'}]:[]};})};}})[_0xe220('0x1d')](respondWithResult(_0x4da55d,null))[_0xe220('0x27')](function(_0x9d8b3d){var _0x7b7a66=_0x1076e8[_0xe220('0x3e')][_0xe220('0x86')]?0x1f4:_0x9d8b3d[_0xe220('0x87')]||0x1f4;logger['error'](_0xe220('0x88'),_0xe220('0x63'),_0x7b7a66,JSON[_0xe220('0x23')](_0x9d8b3d));delete _0x9d8b3d['name'];if(_0x7b7a66===0x191){_0x7b7a66=0x190;}_0x4da55d[_0xe220('0x29')](_0x7b7a66)[_0xe220('0x37')](_0x1076e8[_0xe220('0x3e')]['test']?{'message':'Wrong\x20credentials','statusCode':_0x9d8b3d['statusCode']}:_0x9d8b3d);});}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.model.js b/server/api/intSalesforceAccount/intSalesforceAccount.model.js index b2ba419..19cd017 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 _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 +var _0x2dae=['lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intSalesforceAccount.attributes','../../components/integrations/configuration','define','SalesforceAccount','int_salesforce_accounts'];(function(_0x4b5126,_0x1934c3){var _0x3299aa=function(_0x1f3839){while(--_0x1f3839){_0x4b5126['push'](_0x4b5126['shift']());}};_0x3299aa(++_0x1934c3);}(_0x2dae,0xc3));var _0xe2da=function(_0x228ac9,_0x42f065){_0x228ac9=_0x228ac9-0x0;var _0x69fe02=_0x2dae[_0x228ac9];return _0x69fe02;};'use strict';var _=require(_0xe2da('0x0'));var util=require('util');var logger=require(_0xe2da('0x1'))(_0xe2da('0x2'));var moment=require(_0xe2da('0x3'));var BPromise=require(_0xe2da('0x4'));var rp=require(_0xe2da('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe2da('0x6'));var config=require(_0xe2da('0x7'));var attributes=require(_0xe2da('0x8'));var integrations=require(_0xe2da('0x9'));module['exports']=function(_0x3e3e25,_0x89c70b){return _0x3e3e25[_0xe2da('0xa')](_0xe2da('0xb'),attributes,{'tableName':_0xe2da('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 6242321..4fc35f8 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 _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 +var _0x872c=['raw','attributes','map','include','model','then','debug','ShowSalesforceAccount','find','where','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','GetSalesforceAccount','SalesforceAccount','findAll','options'];(function(_0x53afa6,_0x59e786){var _0x51f86a=function(_0x368385){while(--_0x368385){_0x53afa6['push'](_0x53afa6['shift']());}};_0x51f86a(++_0x59e786);}(_0x872c,0xba));var _0xc872=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x872c[_0x397e5f];return _0x5302b8;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xc872('0x0'));var BPromise=require('bluebird');var rs=require(_0xc872('0x1'));var fs=require('fs');var Redis=require(_0xc872('0x2'));var db=require(_0xc872('0x3'))['db'];var utils=require(_0xc872('0x4'));var logger=require(_0xc872('0x5'))(_0xc872('0x6'));var config=require(_0xc872('0x7'));var jayson=require(_0xc872('0x8'));var client=jayson[_0xc872('0x9')][_0xc872('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xd1d21d,_0x2e2f53,_0x467440){return new BPromise(function(_0x55ef17,_0x2e4570){return client[_0xc872('0xb')](_0xd1d21d,_0x467440)['then'](function(_0x14ba88){logger[_0xc872('0xc')](_0xc872('0xd'),_0x2e2f53,_0xc872('0xe'));logger['debug'](_0xc872('0xf'),_0x2e2f53,'request\x20sent',JSON[_0xc872('0x10')](_0x14ba88));if(_0x14ba88[_0xc872('0x11')]){if(_0x14ba88[_0xc872('0x11')][_0xc872('0x12')]===0x1f4){logger['error'](_0xc872('0xd'),_0x2e2f53,_0x14ba88[_0xc872('0x11')][_0xc872('0x13')]);return _0x2e4570(_0x14ba88[_0xc872('0x11')][_0xc872('0x13')]);}logger[_0xc872('0x11')](_0xc872('0xd'),_0x2e2f53,_0x14ba88['error'][_0xc872('0x13')]);return _0x55ef17(_0x14ba88[_0xc872('0x11')]['message']);}else{logger[_0xc872('0xc')](_0xc872('0xd'),_0x2e2f53,_0xc872('0xe'));_0x55ef17(_0x14ba88['result'][_0xc872('0x13')]);}})['catch'](function(_0x2fcf3b){logger[_0xc872('0x11')](_0xc872('0xd'),_0x2e2f53,_0x2fcf3b);_0x2e4570(_0x2fcf3b);});});}exports[_0xc872('0x14')]=function(_0x2c0d09){var _0x1f4a3f=this;return new Promise(function(_0x3388cb,_0x28d5aa){return db[_0xc872('0x15')][_0xc872('0x16')]({'raw':_0x2c0d09[_0xc872('0x17')]?_0x2c0d09[_0xc872('0x17')][_0xc872('0x18')]===undefined?!![]:![]:!![],'where':_0x2c0d09['options']?_0x2c0d09[_0xc872('0x17')]['where']||null:null,'attributes':_0x2c0d09['options']?_0x2c0d09[_0xc872('0x17')][_0xc872('0x19')]||null:null,'limit':_0x2c0d09[_0xc872('0x17')]?_0x2c0d09[_0xc872('0x17')]['limit']||null:null,'include':_0x2c0d09[_0xc872('0x17')]?_0x2c0d09['options']['include']?_[_0xc872('0x1a')](_0x2c0d09[_0xc872('0x17')][_0xc872('0x1b')],function(_0x244175){return{'model':db[_0x244175[_0xc872('0x1c')]],'as':_0x244175['as'],'attributes':_0x244175['attributes'],'include':_0x244175[_0xc872('0x1b')]?_[_0xc872('0x1a')](_0x244175[_0xc872('0x1b')],function(_0x17204b){return{'model':db[_0x17204b[_0xc872('0x1c')]],'as':_0x17204b['as'],'attributes':_0x17204b[_0xc872('0x19')],'include':_0x17204b['include']?_[_0xc872('0x1a')](_0x17204b[_0xc872('0x1b')],function(_0x3edad1){return{'model':db[_0x3edad1[_0xc872('0x1c')]],'as':_0x3edad1['as'],'attributes':_0x3edad1[_0xc872('0x19')]};}):[]};}):[]};}):[]:[]})[_0xc872('0x1d')](function(_0x4ece6a){logger[_0xc872('0xc')](_0xc872('0x14'),_0x2c0d09);logger[_0xc872('0x1e')](_0xc872('0x14'),_0x2c0d09,JSON[_0xc872('0x10')](_0x4ece6a));_0x3388cb(_0x4ece6a);})['catch'](function(_0x4ec8af){logger['error']('GetSalesforceAccount',_0x4ec8af['message'],_0x2c0d09);_0x28d5aa(_0x1f4a3f['error'](0x1f4,_0x4ec8af[_0xc872('0x13')]));});});};exports[_0xc872('0x1f')]=function(_0x49e161){var _0x9f3062=this;return new Promise(function(_0x49f5a3,_0x4e1aa8){return db['SalesforceAccount'][_0xc872('0x20')]({'raw':_0x49e161[_0xc872('0x17')]?_0x49e161['options'][_0xc872('0x18')]===undefined?!![]:![]:!![],'where':_0x49e161['options']?_0x49e161['options'][_0xc872('0x21')]||null:null,'attributes':_0x49e161[_0xc872('0x17')]?_0x49e161[_0xc872('0x17')]['attributes']||null:null,'include':_0x49e161['options']?_0x49e161[_0xc872('0x17')][_0xc872('0x1b')]?_[_0xc872('0x1a')](_0x49e161[_0xc872('0x17')][_0xc872('0x1b')],function(_0x455cd6){return{'model':db[_0x455cd6[_0xc872('0x1c')]],'as':_0x455cd6['as'],'attributes':_0x455cd6[_0xc872('0x19')],'include':_0x455cd6[_0xc872('0x1b')]?_[_0xc872('0x1a')](_0x455cd6[_0xc872('0x1b')],function(_0x2ac68c){return{'model':db[_0x2ac68c[_0xc872('0x1c')]],'as':_0x2ac68c['as'],'attributes':_0x2ac68c['attributes'],'include':_0x2ac68c[_0xc872('0x1b')]?_['map'](_0x2ac68c[_0xc872('0x1b')],function(_0x14c0b7){return{'model':db[_0x14c0b7[_0xc872('0x1c')]],'as':_0x14c0b7['as'],'attributes':_0x14c0b7[_0xc872('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x44012a){logger[_0xc872('0xc')](_0xc872('0x1f'),_0x49e161);logger[_0xc872('0x1e')](_0xc872('0x1f'),_0x49e161,JSON['stringify'](_0x44012a));_0x49f5a3(_0x44012a);})[_0xc872('0x22')](function(_0x928014){logger['error'](_0xc872('0x1f'),_0x928014[_0xc872('0x13')],_0x49e161);_0x4e1aa8(_0x9f3062[_0xc872('0x11')](0x1f4,_0x928014[_0xc872('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/index.js b/server/api/intSalesforceConfiguration/index.js index 856ea1d..fba8db4 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 _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 +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(_0x18b5e8,_0x51e875){var _0x25baed=function(_0x3fcdf9){while(--_0x3fcdf9){_0x18b5e8['push'](_0x18b5e8['shift']());}};_0x25baed(++_0x51e875);}(_0x0b0e,0x187));var _0xe0b0=function(_0x37e342,_0x160c8f){_0x37e342=_0x37e342-0x0;var _0x1768f9=_0x0b0e[_0x37e342];return _0x1768f9;};'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 diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js index 84f468c..a782d1d 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 _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 +var _0xc782=['contact','lead','nothing','account','sequelize','STRING','ENUM','Task','Case','contact_lead'];(function(_0x380498,_0x51b6ae){var _0x2e0dfe=function(_0x172e97){while(--_0x172e97){_0x380498['push'](_0x380498['shift']());}};_0x2e0dfe(++_0x51b6ae);}(_0xc782,0x130));var _0x2c78=function(_0x2a0c21,_0x51ad5e){_0x2a0c21=_0x2a0c21-0x0;var _0x28f2ff=_0xc782[_0x2a0c21];return _0x28f2ff;};'use strict';var Sequelize=require(_0x2c78('0x0'));module['exports']={'name':{'type':Sequelize[_0x2c78('0x1')]},'description':{'type':Sequelize[_0x2c78('0x1')]},'ticketType':{'type':Sequelize[_0x2c78('0x2')](_0x2c78('0x3'),_0x2c78('0x4')),'defaultValue':_0x2c78('0x3')},'moduleSearch':{'type':Sequelize[_0x2c78('0x2')](_0x2c78('0x5'),_0x2c78('0x6'),_0x2c78('0x7'),'account_contact_lead','account'),'defaultValue':_0x2c78('0x5')},'moduleCreate':{'type':Sequelize[_0x2c78('0x2')](_0x2c78('0x8'),'contact',_0x2c78('0x7'),_0x2c78('0x9')),'defaultValue':_0x2c78('0x7')},'leadId':{'type':Sequelize['STRING']},'additionalSearchAccount':{'type':Sequelize[_0x2c78('0x1')]},'additionalSearchContact':{'type':Sequelize[_0x2c78('0x1')]},'additionalSearchLead':{'type':Sequelize[_0x2c78('0x1')]}}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js index b2be1bf..ea30a36 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 _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 +var _0x4989=['index','SalesforceConfiguration','rawAttributes','fieldName','query','keys','intersection','model','attributes','fields','length','nolimit','order','sort','filters','pick','filter','where','map','type','VIRTUAL','merge','includeAll','rows','params','options','find','create','body','update','getFields','findOne','SalesforceField','hasOwnProperty','getSubjects','getDescriptions','eml-format','fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','http','request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','save','name','send'];(function(_0x4a3898,_0x4c9853){var _0x25ceb0=function(_0x528b6d){while(--_0x528b6d){_0x4a3898['push'](_0x4a3898['shift']());}};_0x25ceb0(++_0x4c9853);}(_0x4989,0x79));var _0x9498=function(_0x5528c3,_0x35a416){_0x5528c3=_0x5528c3-0x0;var _0x47ec1b=_0x4989[_0x5528c3];return _0x47ec1b;};'use strict';var emlformat=require(_0x9498('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x9498('0x1'));var rp=require(_0x9498('0x2'));var moment=require(_0x9498('0x3'));var BPromise=require(_0x9498('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x9498('0x5'));var sox=require('sox');var csv=require(_0x9498('0x6'));var ejs=require(_0x9498('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9498('0x8'));var squel=require(_0x9498('0x9'));var crypto=require(_0x9498('0xa'));var jsforce=require(_0x9498('0xb'));var deskjs=require(_0x9498('0xc'));var toCsv=require(_0x9498('0x6'));var querystring=require(_0x9498('0xd'));var Papa=require(_0x9498('0xe'));var Redis=require(_0x9498('0xf'));var authService=require(_0x9498('0x10'));var qs=require(_0x9498('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9498('0x12'));var logger=require(_0x9498('0x13'))(_0x9498('0x14'));var utils=require('../../config/utils');var config=require(_0x9498('0x15'));var licenseUtil=require(_0x9498('0x16'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson['client'][_0x9498('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x299983,_0x44d06e,_0xf84308,_0x1a1e49){return new BPromise(function(_0xfab8b9,_0x4de27c){var _0x3c2b7a=_0x1a1e49||client;return _0x3c2b7a[_0x9498('0x18')](_0x299983,_0xf84308)[_0x9498('0x19')](function(_0x2cc291){logger[_0x9498('0x1a')](_0x9498('0x1b'),_0x44d06e,_0x9498('0x1c'));logger[_0x9498('0x1d')](_0x9498('0x1e'),_0x44d06e,_0x9498('0x1c'),JSON[_0x9498('0x1f')](_0x2cc291));if(_0x2cc291[_0x9498('0x20')]){if(_0x2cc291[_0x9498('0x20')][_0x9498('0x21')]===0x1f4){logger[_0x9498('0x20')](_0x9498('0x1b'),_0x44d06e,_0x2cc291['error'][_0x9498('0x22')]);return _0x4de27c(_0x2cc291[_0x9498('0x20')][_0x9498('0x22')]);}logger[_0x9498('0x20')]('SalesforceConfiguration,\x20%s,\x20%s',_0x44d06e,_0x2cc291[_0x9498('0x20')]['message']);return _0xfab8b9(_0x2cc291[_0x9498('0x20')][_0x9498('0x22')]);}else{logger[_0x9498('0x1a')]('SalesforceConfiguration,\x20%s,\x20%s',_0x44d06e,'request\x20sent');_0xfab8b9(_0x2cc291['result'][_0x9498('0x22')]);}})[_0x9498('0x23')](function(_0x4ecf11){logger[_0x9498('0x20')](_0x9498('0x1b'),_0x44d06e,_0x4ecf11);_0x4de27c(_0x4ecf11);});});}function respondWithStatusCode(_0xcdec9a,_0x53729b){_0x53729b=_0x53729b||0xcc;return function(_0x37f483){if(_0x37f483){return _0xcdec9a[_0x9498('0x24')](_0x53729b);}return _0xcdec9a[_0x9498('0x25')](_0x53729b)[_0x9498('0x26')]();};}function respondWithResult(_0x2c4fec,_0x5e6940){_0x5e6940=_0x5e6940||0xc8;return function(_0x3d36ff){if(_0x3d36ff){return _0x2c4fec[_0x9498('0x25')](_0x5e6940)[_0x9498('0x27')](_0x3d36ff);}};}function respondWithFilteredResult(_0x54368c,_0x46f2ab){return function(_0x1af57d){if(_0x1af57d){var _0x473148=typeof _0x46f2ab[_0x9498('0x28')]===_0x9498('0x29')&&typeof _0x46f2ab['limit']==='undefined';var _0x5f53a0=_0x1af57d[_0x9498('0x2a')];var _0x191b4e=_0x473148?0x0:_0x46f2ab[_0x9498('0x28')];var _0x3ac779=_0x473148?_0x1af57d[_0x9498('0x2a')]:_0x46f2ab[_0x9498('0x28')]+_0x46f2ab[_0x9498('0x2b')];var _0x2d7cfd;if(_0x3ac779>=_0x5f53a0){_0x3ac779=_0x5f53a0;_0x2d7cfd=0xc8;}else{_0x2d7cfd=0xce;}_0x54368c['status'](_0x2d7cfd);return _0x54368c['set'](_0x9498('0x2c'),_0x191b4e+'-'+_0x3ac779+'/'+_0x5f53a0)['json'](_0x1af57d);}return null;};}function patchUpdates(_0x5edc83){return function(_0x235cd6){try{jsonpatch[_0x9498('0x2d')](_0x235cd6,_0x5edc83,!![]);}catch(_0x5237cb){return BPromise['reject'](_0x5237cb);}return _0x235cd6[_0x9498('0x2e')]();};}function saveUpdates(_0x1dedcb,_0x1489d9){return function(_0x2450d7){if(_0x2450d7){return _0x2450d7['update'](_0x1dedcb)[_0x9498('0x19')](function(_0x344454){return _0x344454;});}return null;};}function removeEntity(_0x3d8175,_0x233026){return function(_0x526262){if(_0x526262){return _0x526262['destroy']()[_0x9498('0x19')](function(){_0x3d8175[_0x9498('0x25')](0xcc)['end']();});}};}function handleEntityNotFound(_0x21ff0e,_0x4a87a0){return function(_0x2b570f){if(!_0x2b570f){_0x21ff0e[_0x9498('0x24')](0x194);}return _0x2b570f;};}function handleError(_0x133281,_0x54f446){_0x54f446=_0x54f446||0x1f4;return function(_0x284ea0){logger[_0x9498('0x20')](_0x284ea0['stack']);if(_0x284ea0[_0x9498('0x2f')]){delete _0x284ea0[_0x9498('0x2f')];}_0x133281[_0x9498('0x25')](_0x54f446)[_0x9498('0x30')](_0x284ea0);};}exports[_0x9498('0x31')]=function(_0x495917,_0x21ed97){var _0x14c29d={},_0x346ecd={},_0x38d7d9={'count':0x0,'rows':[]};var _0x503b00=_['map'](db[_0x9498('0x32')][_0x9498('0x33')],function(_0x131bf6){return{'name':_0x131bf6[_0x9498('0x34')],'type':_0x131bf6['type']['key']};});_0x346ecd['model']=_['map'](_0x503b00,_0x9498('0x2f'));_0x346ecd[_0x9498('0x35')]=_[_0x9498('0x36')](_0x495917[_0x9498('0x35')]);_0x346ecd['filters']=_[_0x9498('0x37')](_0x346ecd[_0x9498('0x38')],_0x346ecd['query']);_0x14c29d[_0x9498('0x39')]=_[_0x9498('0x37')](_0x346ecd[_0x9498('0x38')],qs[_0x9498('0x3a')](_0x495917['query']['fields']));_0x14c29d[_0x9498('0x39')]=_0x14c29d[_0x9498('0x39')][_0x9498('0x3b')]?_0x14c29d['attributes']:_0x346ecd[_0x9498('0x38')];if(!_0x495917['query']['hasOwnProperty'](_0x9498('0x3c'))){_0x14c29d[_0x9498('0x2b')]=qs[_0x9498('0x2b')](_0x495917[_0x9498('0x35')][_0x9498('0x2b')]);_0x14c29d[_0x9498('0x28')]=qs[_0x9498('0x28')](_0x495917[_0x9498('0x35')][_0x9498('0x28')]);}_0x14c29d[_0x9498('0x3d')]=qs[_0x9498('0x3e')](_0x495917[_0x9498('0x35')]['sort']);_0x14c29d['where']=qs[_0x9498('0x3f')](_[_0x9498('0x40')](_0x495917[_0x9498('0x35')],_0x346ecd['filters']),_0x503b00);if(_0x495917[_0x9498('0x35')][_0x9498('0x41')]){_0x14c29d[_0x9498('0x42')]=_['merge'](_0x14c29d[_0x9498('0x42')],{'$or':_[_0x9498('0x43')](_0x503b00,function(_0x18ebc7){if(_0x18ebc7[_0x9498('0x44')]!==_0x9498('0x45')){var _0x23eca2={};_0x23eca2[_0x18ebc7[_0x9498('0x2f')]]={'$like':'%'+_0x495917[_0x9498('0x35')][_0x9498('0x41')]+'%'};return _0x23eca2;}})});}_0x14c29d=_[_0x9498('0x46')]({},_0x14c29d,_0x495917['options']);var _0x454a4b={'where':_0x14c29d['where']};return db[_0x9498('0x32')][_0x9498('0x2a')](_0x454a4b)[_0x9498('0x19')](function(_0x8a3b25){_0x38d7d9[_0x9498('0x2a')]=_0x8a3b25;if(_0x495917[_0x9498('0x35')][_0x9498('0x47')]){_0x14c29d['include']=[{'all':!![]}];}return db[_0x9498('0x32')]['findAll'](_0x14c29d);})['then'](function(_0x5dddb8){_0x38d7d9[_0x9498('0x48')]=_0x5dddb8;return _0x38d7d9;})[_0x9498('0x19')](respondWithFilteredResult(_0x21ed97,_0x14c29d))[_0x9498('0x23')](handleError(_0x21ed97,null));};exports['show']=function(_0x449797,_0x1e4f51){var _0xd50dbf={'raw':![],'where':{'id':_0x449797[_0x9498('0x49')]['id']}},_0x55b9cc={};_0x55b9cc[_0x9498('0x38')]=_[_0x9498('0x36')](db[_0x9498('0x32')][_0x9498('0x33')]);_0x55b9cc[_0x9498('0x35')]=_['keys'](_0x449797['query']);_0x55b9cc[_0x9498('0x3f')]=_['intersection'](_0x55b9cc['model'],_0x55b9cc['query']);_0xd50dbf['attributes']=_['intersection'](_0x55b9cc[_0x9498('0x38')],qs[_0x9498('0x3a')](_0x449797[_0x9498('0x35')]['fields']));_0xd50dbf['attributes']=_0xd50dbf[_0x9498('0x39')][_0x9498('0x3b')]?_0xd50dbf['attributes']:_0x55b9cc[_0x9498('0x38')];if(_0x449797['query']['includeAll']){_0xd50dbf['include']=[{'all':!![]}];}_0xd50dbf=_[_0x9498('0x46')]({},_0xd50dbf,_0x449797[_0x9498('0x4a')]);return db[_0x9498('0x32')][_0x9498('0x4b')](_0xd50dbf)[_0x9498('0x19')](handleEntityNotFound(_0x1e4f51,null))[_0x9498('0x19')](respondWithResult(_0x1e4f51,null))['catch'](handleError(_0x1e4f51,null));};exports[_0x9498('0x4c')]=function(_0xd40633,_0x49d974){return db[_0x9498('0x32')][_0x9498('0x4c')](_0xd40633[_0x9498('0x4d')],{})[_0x9498('0x19')](respondWithResult(_0x49d974,0xc9))[_0x9498('0x23')](handleError(_0x49d974,null));};exports[_0x9498('0x4e')]=function(_0x5d3e95,_0x5593ee){if(_0x5d3e95['body']['id']){delete _0x5d3e95['body']['id'];}return db[_0x9498('0x32')][_0x9498('0x4b')]({'where':{'id':_0x5d3e95['params']['id']}})[_0x9498('0x19')](handleEntityNotFound(_0x5593ee,null))[_0x9498('0x19')](saveUpdates(_0x5d3e95[_0x9498('0x4d')],null))[_0x9498('0x19')](respondWithResult(_0x5593ee,null))[_0x9498('0x23')](handleError(_0x5593ee,null));};exports['destroy']=function(_0x14b4a0,_0xc64390){return db[_0x9498('0x32')][_0x9498('0x4b')]({'where':{'id':_0x14b4a0[_0x9498('0x49')]['id']}})[_0x9498('0x19')](handleEntityNotFound(_0xc64390,null))[_0x9498('0x19')](removeEntity(_0xc64390,null))[_0x9498('0x23')](handleError(_0xc64390,null));};exports[_0x9498('0x4f')]=function(_0x61294f,_0xeb533e,_0x1067a4){var _0x337efa={};var _0x9abe48={};var _0x523254;var _0x28426b;return db['SalesforceConfiguration'][_0x9498('0x50')]({'where':{'id':_0x61294f[_0x9498('0x49')]['id']}})[_0x9498('0x19')](handleEntityNotFound(_0xeb533e,null))[_0x9498('0x19')](function(_0x31cc90){if(_0x31cc90){_0x523254=_0x31cc90;_0x9abe48['model']=_[_0x9498('0x36')](db[_0x9498('0x51')]['rawAttributes']);_0x9abe48[_0x9498('0x35')]=_[_0x9498('0x36')](_0x61294f[_0x9498('0x35')]);_0x9abe48[_0x9498('0x3f')]=_[_0x9498('0x37')](_0x9abe48[_0x9498('0x38')],_0x9abe48['query']);_0x337efa['attributes']=_[_0x9498('0x37')](_0x9abe48['model'],qs['fields'](_0x61294f[_0x9498('0x35')]['fields']));_0x337efa['attributes']=_0x337efa[_0x9498('0x39')][_0x9498('0x3b')]?_0x337efa[_0x9498('0x39')]:_0x9abe48[_0x9498('0x38')];_0x337efa[_0x9498('0x3d')]=qs['sort'](_0x61294f[_0x9498('0x35')]['sort']);_0x337efa[_0x9498('0x42')]=qs[_0x9498('0x3f')](_[_0x9498('0x40')](_0x61294f[_0x9498('0x35')],_0x9abe48[_0x9498('0x3f')]));if(_0x61294f[_0x9498('0x35')][_0x9498('0x41')]){_0x337efa[_0x9498('0x42')]=_[_0x9498('0x46')](_0x337efa[_0x9498('0x42')],{'$or':_[_0x9498('0x43')](_0x337efa['attributes'],function(_0x2b459b){var _0x199e83={};_0x199e83[_0x2b459b]={'$like':'%'+_0x61294f[_0x9498('0x35')][_0x9498('0x41')]+'%'};return _0x199e83;})});}_0x337efa=_[_0x9498('0x46')]({},_0x337efa,_0x61294f[_0x9498('0x4a')]);return _0x523254[_0x9498('0x4f')](_0x337efa);}})['then'](function(_0x384b1c){if(_0x384b1c){_0x28426b=_0x384b1c[_0x9498('0x3b')];if(!_0x61294f['query'][_0x9498('0x52')]('nolimit')){_0x337efa[_0x9498('0x2b')]=qs[_0x9498('0x2b')](_0x61294f[_0x9498('0x35')][_0x9498('0x2b')]);_0x337efa[_0x9498('0x28')]=qs[_0x9498('0x28')](_0x61294f[_0x9498('0x35')][_0x9498('0x28')]);}return _0x523254[_0x9498('0x4f')](_0x337efa);}})[_0x9498('0x19')](function(_0x55a01c){if(_0x55a01c){return _0x55a01c?{'count':_0x28426b,'rows':_0x55a01c}:null;}})[_0x9498('0x19')](respondWithResult(_0xeb533e,null))[_0x9498('0x23')](handleError(_0xeb533e,null));};exports[_0x9498('0x53')]=function(_0x29f26c,_0x540602,_0x2b1da7){var _0x489167={};var _0x3b4fcb={};var _0x43b705;var _0x326720;return db[_0x9498('0x32')][_0x9498('0x50')]({'where':{'id':_0x29f26c['params']['id']}})[_0x9498('0x19')](handleEntityNotFound(_0x540602,null))['then'](function(_0x29936e){if(_0x29936e){_0x43b705=_0x29936e;_0x3b4fcb['model']=_['keys'](db['SalesforceField'][_0x9498('0x33')]);_0x3b4fcb[_0x9498('0x35')]=_[_0x9498('0x36')](_0x29f26c[_0x9498('0x35')]);_0x3b4fcb[_0x9498('0x3f')]=_[_0x9498('0x37')](_0x3b4fcb[_0x9498('0x38')],_0x3b4fcb['query']);_0x489167[_0x9498('0x39')]=_[_0x9498('0x37')](_0x3b4fcb[_0x9498('0x38')],qs[_0x9498('0x3a')](_0x29f26c['query']['fields']));_0x489167[_0x9498('0x39')]=_0x489167[_0x9498('0x39')][_0x9498('0x3b')]?_0x489167[_0x9498('0x39')]:_0x3b4fcb[_0x9498('0x38')];_0x489167[_0x9498('0x3d')]=qs['sort'](_0x29f26c[_0x9498('0x35')][_0x9498('0x3e')]);_0x489167[_0x9498('0x42')]=qs[_0x9498('0x3f')](_[_0x9498('0x40')](_0x29f26c[_0x9498('0x35')],_0x3b4fcb[_0x9498('0x3f')]));if(_0x29f26c['query'][_0x9498('0x41')]){_0x489167[_0x9498('0x42')]=_['merge'](_0x489167[_0x9498('0x42')],{'$or':_[_0x9498('0x43')](_0x489167[_0x9498('0x39')],function(_0x35d2ab){var _0x5d044d={};_0x5d044d[_0x35d2ab]={'$like':'%'+_0x29f26c[_0x9498('0x35')][_0x9498('0x41')]+'%'};return _0x5d044d;})});}_0x489167=_[_0x9498('0x46')]({},_0x489167,_0x29f26c[_0x9498('0x4a')]);return _0x43b705['getSubjects'](_0x489167);}})['then'](function(_0x5e8c9a){if(_0x5e8c9a){_0x326720=_0x5e8c9a[_0x9498('0x3b')];if(!_0x29f26c[_0x9498('0x35')][_0x9498('0x52')](_0x9498('0x3c'))){_0x489167[_0x9498('0x2b')]=qs[_0x9498('0x2b')](_0x29f26c[_0x9498('0x35')][_0x9498('0x2b')]);_0x489167[_0x9498('0x28')]=qs[_0x9498('0x28')](_0x29f26c[_0x9498('0x35')][_0x9498('0x28')]);}return _0x43b705[_0x9498('0x53')](_0x489167);}})[_0x9498('0x19')](function(_0x41c5ca){if(_0x41c5ca){return _0x41c5ca?{'count':_0x326720,'rows':_0x41c5ca}:null;}})[_0x9498('0x19')](respondWithResult(_0x540602,null))[_0x9498('0x23')](handleError(_0x540602,null));};exports[_0x9498('0x54')]=function(_0x25cb42,_0x338aca,_0x40c423){var _0xa6d3f7={};var _0x2b9373={};var _0x1659f9;var _0x4359e7;return db['SalesforceConfiguration'][_0x9498('0x50')]({'where':{'id':_0x25cb42[_0x9498('0x49')]['id']}})[_0x9498('0x19')](handleEntityNotFound(_0x338aca,null))['then'](function(_0x28a523){if(_0x28a523){_0x1659f9=_0x28a523;_0x2b9373['model']=_[_0x9498('0x36')](db[_0x9498('0x51')]['rawAttributes']);_0x2b9373[_0x9498('0x35')]=_[_0x9498('0x36')](_0x25cb42['query']);_0x2b9373[_0x9498('0x3f')]=_[_0x9498('0x37')](_0x2b9373[_0x9498('0x38')],_0x2b9373[_0x9498('0x35')]);_0xa6d3f7[_0x9498('0x39')]=_[_0x9498('0x37')](_0x2b9373[_0x9498('0x38')],qs[_0x9498('0x3a')](_0x25cb42[_0x9498('0x35')][_0x9498('0x3a')]));_0xa6d3f7[_0x9498('0x39')]=_0xa6d3f7['attributes']['length']?_0xa6d3f7['attributes']:_0x2b9373[_0x9498('0x38')];_0xa6d3f7['order']=qs['sort'](_0x25cb42['query']['sort']);_0xa6d3f7[_0x9498('0x42')]=qs['filters'](_[_0x9498('0x40')](_0x25cb42[_0x9498('0x35')],_0x2b9373[_0x9498('0x3f')]));if(_0x25cb42[_0x9498('0x35')][_0x9498('0x41')]){_0xa6d3f7['where']=_[_0x9498('0x46')](_0xa6d3f7[_0x9498('0x42')],{'$or':_['map'](_0xa6d3f7[_0x9498('0x39')],function(_0x39ca21){var _0x1c33c3={};_0x1c33c3[_0x39ca21]={'$like':'%'+_0x25cb42[_0x9498('0x35')][_0x9498('0x41')]+'%'};return _0x1c33c3;})});}_0xa6d3f7=_[_0x9498('0x46')]({},_0xa6d3f7,_0x25cb42[_0x9498('0x4a')]);return _0x1659f9['getDescriptions'](_0xa6d3f7);}})[_0x9498('0x19')](function(_0x2b89cd){if(_0x2b89cd){_0x4359e7=_0x2b89cd[_0x9498('0x3b')];if(!_0x25cb42[_0x9498('0x35')][_0x9498('0x52')](_0x9498('0x3c'))){_0xa6d3f7[_0x9498('0x2b')]=qs[_0x9498('0x2b')](_0x25cb42[_0x9498('0x35')][_0x9498('0x2b')]);_0xa6d3f7[_0x9498('0x28')]=qs[_0x9498('0x28')](_0x25cb42[_0x9498('0x35')][_0x9498('0x28')]);}return _0x1659f9[_0x9498('0x54')](_0xa6d3f7);}})['then'](function(_0x36b0ae){if(_0x36b0ae){return _0x36b0ae?{'count':_0x4359e7,'rows':_0x36b0ae}:null;}})[_0x9498('0x19')](respondWithResult(_0x338aca,null))[_0x9498('0x23')](handleError(_0x338aca,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js index 6e61863..be40f1c 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 _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 +var _0xd3e1=['../../config/environment','./intSalesforceConfiguration.attributes','exports','define','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0xc0ed67,_0xbd4503){var _0x55369d=function(_0x6025d2){while(--_0x6025d2){_0xc0ed67['push'](_0xc0ed67['shift']());}};_0x55369d(++_0xbd4503);}(_0xd3e1,0xa0));var _0x1d3e=function(_0x11eb3b,_0xbb02ad){_0x11eb3b=_0x11eb3b-0x0;var _0x72d60c=_0xd3e1[_0x11eb3b];return _0x72d60c;};'use strict';var _=require('lodash');var util=require(_0x1d3e('0x0'));var logger=require(_0x1d3e('0x1'))(_0x1d3e('0x2'));var moment=require(_0x1d3e('0x3'));var BPromise=require(_0x1d3e('0x4'));var rp=require(_0x1d3e('0x5'));var fs=require('fs');var path=require(_0x1d3e('0x6'));var rimraf=require(_0x1d3e('0x7'));var config=require(_0x1d3e('0x8'));var attributes=require(_0x1d3e('0x9'));module[_0x1d3e('0xa')]=function(_0x36f75e,_0x1f6e5a){return _0x36f75e[_0x1d3e('0xb')]('SalesforceConfiguration',attributes,{'tableName':'int_salesforce_configurations','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 0ca8ea5..e4cfe28 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 _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 +var _0x62bc=['rpc','../../config/environment','jayson/promise','client','http','request','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x35d4e9,_0x298c61){var _0x5c2770=function(_0x2f326a){while(--_0x2f326a){_0x35d4e9['push'](_0x35d4e9['shift']());}};_0x5c2770(++_0x298c61);}(_0x62bc,0xb8));var _0xc62b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x62bc[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xc62b('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xc62b('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc62b('0x2'))['db'];var utils=require(_0xc62b('0x3'));var logger=require(_0xc62b('0x4'))(_0xc62b('0x5'));var config=require(_0xc62b('0x6'));var jayson=require(_0xc62b('0x7'));var client=jayson[_0xc62b('0x8')][_0xc62b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x58b061,_0x31086d,_0x83127){return new BPromise(function(_0x5f2f2b,_0x4b5bc0){return client[_0xc62b('0xa')](_0x58b061,_0x83127)['then'](function(_0x28de3c){logger[_0xc62b('0xb')](_0xc62b('0xc'),_0x31086d,_0xc62b('0xd'));logger[_0xc62b('0xe')](_0xc62b('0xf'),_0x31086d,'request\x20sent',JSON['stringify'](_0x28de3c));if(_0x28de3c['error']){if(_0x28de3c[_0xc62b('0x10')][_0xc62b('0x11')]===0x1f4){logger['error']('SalesforceConfiguration,\x20%s,\x20%s',_0x31086d,_0x28de3c[_0xc62b('0x10')][_0xc62b('0x12')]);return _0x4b5bc0(_0x28de3c[_0xc62b('0x10')][_0xc62b('0x12')]);}logger[_0xc62b('0x10')](_0xc62b('0xc'),_0x31086d,_0x28de3c[_0xc62b('0x10')][_0xc62b('0x12')]);return _0x5f2f2b(_0x28de3c[_0xc62b('0x10')]['message']);}else{logger['info'](_0xc62b('0xc'),_0x31086d,'request\x20sent');_0x5f2f2b(_0x28de3c[_0xc62b('0x13')][_0xc62b('0x12')]);}})[_0xc62b('0x14')](function(_0x31e9c7){logger[_0xc62b('0x10')](_0xc62b('0xc'),_0x31086d,_0x31e9c7);_0x4b5bc0(_0x31e9c7);});});} \ No newline at end of file diff --git a/server/api/intSalesforceField/index.js b/server/api/intSalesforceField/index.js index 1474905..2d46421 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 _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 +var _0x5e87=['put','/:id','update','destroy','exports','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','create'];(function(_0x22ae56,_0x16955c){var _0x1544f5=function(_0x2d525f){while(--_0x2d525f){_0x22ae56['push'](_0x22ae56['shift']());}};_0x1544f5(++_0x16955c);}(_0x5e87,0xf5));var _0x75e8=function(_0x1b30b1,_0x48d277){_0x1b30b1=_0x1b30b1-0x0;var _0x136d74=_0x5e87[_0x1b30b1];return _0x136d74;};'use strict';var multer=require(_0x75e8('0x0'));var util=require(_0x75e8('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x75e8('0x2'));var router=express[_0x75e8('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x75e8('0x4'));var interaction=require(_0x75e8('0x5'));var config=require(_0x75e8('0x6'));var controller=require('./intSalesforceField.controller');router['get']('/',auth[_0x75e8('0x7')](),controller[_0x75e8('0x8')]);router[_0x75e8('0x9')]('/:id',auth[_0x75e8('0x7')](),controller['show']);router['post']('/',auth[_0x75e8('0x7')](),controller[_0x75e8('0xa')]);router[_0x75e8('0xb')](_0x75e8('0xc'),auth[_0x75e8('0x7')](),controller[_0x75e8('0xd')]);router['delete'](_0x75e8('0xc'),auth[_0x75e8('0x7')](),controller[_0x75e8('0xe')]);module[_0x75e8('0xf')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.attributes.js b/server/api/intSalesforceField/intSalesforceField.attributes.js index c1d66a6..e3e546b 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 _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 +var _0x0790=['sequelize','exports','ENUM','keyValue','STRING','customVariable'];(function(_0x2ce686,_0x5ee2fc){var _0x1ae987=function(_0x70598b){while(--_0x70598b){_0x2ce686['push'](_0x2ce686['shift']());}};_0x1ae987(++_0x5ee2fc);}(_0x0790,0xa8));var _0x0079=function(_0x5c2a2b,_0x22c94e){_0x5c2a2b=_0x5c2a2b-0x0;var _0x19921f=_0x0790[_0x5c2a2b];return _0x19921f;};'use strict';var Sequelize=require(_0x0079('0x0'));module[_0x0079('0x1')]={'type':{'type':Sequelize[_0x0079('0x2')]('string','variable','customVariable',_0x0079('0x3'),'picklist'),'defaultValue':'string'},'content':{'type':Sequelize[_0x0079('0x4')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM']('string','variable',_0x0079('0x5'))},'keyContent':{'type':Sequelize[_0x0079('0x4')]},'idField':{'type':Sequelize[_0x0079('0x4')]},'variableName':{'type':Sequelize[_0x0079('0x4')]}}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.controller.js b/server/api/intSalesforceField/intSalesforceField.controller.js index 44de9fe..4196587 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 _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 +var _0x1a80=['fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','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','sendStatus','end','status','offset','undefined','limit','count','set','json','reject','save','destroy','then','error','stack','name','index','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','SalesforceField','rows','catch','show','find','create','body','update','params','eml-format','rimraf','zip-dir'];(function(_0x18d3d2,_0x48809e){var _0x582ee2=function(_0xf047f9){while(--_0xf047f9){_0x18d3d2['push'](_0x18d3d2['shift']());}};_0x582ee2(++_0x48809e);}(_0x1a80,0x9b));var _0x01a8=function(_0x30c73b,_0xabc27b){_0x30c73b=_0x30c73b-0x0;var _0x350466=_0x1a80[_0x30c73b];return _0x350466;};'use strict';var emlformat=require(_0x01a8('0x0'));var rimraf=require(_0x01a8('0x1'));var zipdir=require(_0x01a8('0x2'));var jsonpatch=require(_0x01a8('0x3'));var rp=require('request-promise');var moment=require(_0x01a8('0x4'));var BPromise=require(_0x01a8('0x5'));var Mustache=require(_0x01a8('0x6'));var util=require(_0x01a8('0x7'));var path=require(_0x01a8('0x8'));var sox=require(_0x01a8('0x9'));var csv=require('to-csv');var ejs=require(_0x01a8('0xa'));var fs=require('fs');var fs_extra=require(_0x01a8('0xb'));var _=require(_0x01a8('0xc'));var squel=require(_0x01a8('0xd'));var crypto=require(_0x01a8('0xe'));var jsforce=require(_0x01a8('0xf'));var deskjs=require(_0x01a8('0x10'));var toCsv=require(_0x01a8('0x11'));var querystring=require(_0x01a8('0x12'));var Papa=require(_0x01a8('0x13'));var Redis=require('ioredis');var authService=require(_0x01a8('0x14'));var qs=require(_0x01a8('0x15'));var as=require(_0x01a8('0x16'));var hardwareService=require(_0x01a8('0x17'));var logger=require(_0x01a8('0x18'))(_0x01a8('0x19'));var utils=require(_0x01a8('0x1a'));var config=require(_0x01a8('0x1b'));var licenseUtil=require(_0x01a8('0x1c'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4a4219,_0x21367d){_0x21367d=_0x21367d||0xcc;return function(_0x4e0b62){if(_0x4e0b62){return _0x4a4219[_0x01a8('0x1d')](_0x21367d);}return _0x4a4219['status'](_0x21367d)[_0x01a8('0x1e')]();};}function respondWithResult(_0x3d5e0a,_0x29e255){_0x29e255=_0x29e255||0xc8;return function(_0x3e869b){if(_0x3e869b){return _0x3d5e0a[_0x01a8('0x1f')](_0x29e255)['json'](_0x3e869b);}};}function respondWithFilteredResult(_0x4c6133,_0x2d543d){return function(_0x3f4340){if(_0x3f4340){var _0x231678=typeof _0x2d543d[_0x01a8('0x20')]===_0x01a8('0x21')&&typeof _0x2d543d[_0x01a8('0x22')]===_0x01a8('0x21');var _0x3c04d3=_0x3f4340[_0x01a8('0x23')];var _0x5c0537=_0x231678?0x0:_0x2d543d['offset'];var _0x517ef6=_0x231678?_0x3f4340[_0x01a8('0x23')]:_0x2d543d[_0x01a8('0x20')]+_0x2d543d[_0x01a8('0x22')];var _0x4abddd;if(_0x517ef6>=_0x3c04d3){_0x517ef6=_0x3c04d3;_0x4abddd=0xc8;}else{_0x4abddd=0xce;}_0x4c6133[_0x01a8('0x1f')](_0x4abddd);return _0x4c6133[_0x01a8('0x24')]('Content-Range',_0x5c0537+'-'+_0x517ef6+'/'+_0x3c04d3)[_0x01a8('0x25')](_0x3f4340);}return null;};}function patchUpdates(_0xecdfbd){return function(_0x33f9ff){try{jsonpatch['apply'](_0x33f9ff,_0xecdfbd,!![]);}catch(_0x34291b){return BPromise[_0x01a8('0x26')](_0x34291b);}return _0x33f9ff[_0x01a8('0x27')]();};}function saveUpdates(_0xc42cce,_0x2423b3){return function(_0x1372de){if(_0x1372de){return _0x1372de['update'](_0xc42cce)['then'](function(_0x49c3f1){return _0x49c3f1;});}return null;};}function removeEntity(_0x379d35,_0x3bd104){return function(_0x54e521){if(_0x54e521){return _0x54e521[_0x01a8('0x28')]()[_0x01a8('0x29')](function(){_0x379d35['status'](0xcc)[_0x01a8('0x1e')]();});}};}function handleEntityNotFound(_0x5b0ab5,_0x3e21cc){return function(_0x5d0bf6){if(!_0x5d0bf6){_0x5b0ab5[_0x01a8('0x1d')](0x194);}return _0x5d0bf6;};}function handleError(_0x13b66a,_0x37f7c8){_0x37f7c8=_0x37f7c8||0x1f4;return function(_0x396f1e){logger[_0x01a8('0x2a')](_0x396f1e[_0x01a8('0x2b')]);if(_0x396f1e[_0x01a8('0x2c')]){delete _0x396f1e['name'];}_0x13b66a[_0x01a8('0x1f')](_0x37f7c8)['send'](_0x396f1e);};}exports[_0x01a8('0x2d')]=function(_0x293e3d,_0x251ef7){var _0x1fe00b={},_0x26bd54={},_0x3cf001={'count':0x0,'rows':[]};var _0x4b4217=_[_0x01a8('0x2e')](db['SalesforceField']['rawAttributes'],function(_0x3af283){return{'name':_0x3af283[_0x01a8('0x2f')],'type':_0x3af283[_0x01a8('0x30')][_0x01a8('0x31')]};});_0x26bd54[_0x01a8('0x32')]=_[_0x01a8('0x2e')](_0x4b4217,_0x01a8('0x2c'));_0x26bd54[_0x01a8('0x33')]=_[_0x01a8('0x34')](_0x293e3d['query']);_0x26bd54[_0x01a8('0x35')]=_[_0x01a8('0x36')](_0x26bd54['model'],_0x26bd54[_0x01a8('0x33')]);_0x1fe00b[_0x01a8('0x37')]=_['intersection'](_0x26bd54[_0x01a8('0x32')],qs[_0x01a8('0x38')](_0x293e3d[_0x01a8('0x33')]['fields']));_0x1fe00b[_0x01a8('0x37')]=_0x1fe00b[_0x01a8('0x37')][_0x01a8('0x39')]?_0x1fe00b['attributes']:_0x26bd54[_0x01a8('0x32')];if(!_0x293e3d['query'][_0x01a8('0x3a')](_0x01a8('0x3b'))){_0x1fe00b[_0x01a8('0x22')]=qs['limit'](_0x293e3d['query'][_0x01a8('0x22')]);_0x1fe00b[_0x01a8('0x20')]=qs[_0x01a8('0x20')](_0x293e3d['query'][_0x01a8('0x20')]);}_0x1fe00b[_0x01a8('0x3c')]=qs[_0x01a8('0x3d')](_0x293e3d[_0x01a8('0x33')][_0x01a8('0x3d')]);_0x1fe00b[_0x01a8('0x3e')]=qs['filters'](_[_0x01a8('0x3f')](_0x293e3d['query'],_0x26bd54[_0x01a8('0x35')]),_0x4b4217);if(_0x293e3d[_0x01a8('0x33')]['filter']){_0x1fe00b[_0x01a8('0x3e')]=_[_0x01a8('0x40')](_0x1fe00b[_0x01a8('0x3e')],{'$or':_[_0x01a8('0x2e')](_0x4b4217,function(_0x563899){if(_0x563899[_0x01a8('0x30')]!==_0x01a8('0x41')){var _0x28da0d={};_0x28da0d[_0x563899['name']]={'$like':'%'+_0x293e3d[_0x01a8('0x33')][_0x01a8('0x42')]+'%'};return _0x28da0d;}})});}_0x1fe00b=_['merge']({},_0x1fe00b,_0x293e3d[_0x01a8('0x43')]);var _0x236391={'where':_0x1fe00b[_0x01a8('0x3e')]};return db['SalesforceField']['count'](_0x236391)[_0x01a8('0x29')](function(_0x2a052f){_0x3cf001[_0x01a8('0x23')]=_0x2a052f;if(_0x293e3d['query'][_0x01a8('0x44')]){_0x1fe00b[_0x01a8('0x45')]=[{'all':!![]}];}return db[_0x01a8('0x46')]['findAll'](_0x1fe00b);})['then'](function(_0x38f2d9){_0x3cf001[_0x01a8('0x47')]=_0x38f2d9;return _0x3cf001;})['then'](respondWithFilteredResult(_0x251ef7,_0x1fe00b))[_0x01a8('0x48')](handleError(_0x251ef7,null));};exports[_0x01a8('0x49')]=function(_0x338cd9,_0x40813f){var _0x510c5f={'raw':!![],'where':{'id':_0x338cd9['params']['id']}},_0x32887f={};_0x32887f[_0x01a8('0x32')]=_[_0x01a8('0x34')](db[_0x01a8('0x46')]['rawAttributes']);_0x32887f['query']=_[_0x01a8('0x34')](_0x338cd9[_0x01a8('0x33')]);_0x32887f['filters']=_[_0x01a8('0x36')](_0x32887f[_0x01a8('0x32')],_0x32887f[_0x01a8('0x33')]);_0x510c5f['attributes']=_[_0x01a8('0x36')](_0x32887f[_0x01a8('0x32')],qs[_0x01a8('0x38')](_0x338cd9[_0x01a8('0x33')][_0x01a8('0x38')]));_0x510c5f[_0x01a8('0x37')]=_0x510c5f[_0x01a8('0x37')]['length']?_0x510c5f[_0x01a8('0x37')]:_0x32887f[_0x01a8('0x32')];if(_0x338cd9[_0x01a8('0x33')]['includeAll']){_0x510c5f[_0x01a8('0x45')]=[{'all':!![]}];}_0x510c5f=_[_0x01a8('0x40')]({},_0x510c5f,_0x338cd9[_0x01a8('0x43')]);return db['SalesforceField'][_0x01a8('0x4a')](_0x510c5f)['then'](handleEntityNotFound(_0x40813f,null))[_0x01a8('0x29')](respondWithResult(_0x40813f,null))[_0x01a8('0x48')](handleError(_0x40813f,null));};exports['create']=function(_0x524d7c,_0x39a1af){return db['SalesforceField'][_0x01a8('0x4b')](_0x524d7c[_0x01a8('0x4c')],{})[_0x01a8('0x29')](respondWithResult(_0x39a1af,0xc9))['catch'](handleError(_0x39a1af,null));};exports[_0x01a8('0x4d')]=function(_0x9509ab,_0x258d99){if(_0x9509ab[_0x01a8('0x4c')]['id']){delete _0x9509ab[_0x01a8('0x4c')]['id'];}return db['SalesforceField'][_0x01a8('0x4a')]({'where':{'id':_0x9509ab[_0x01a8('0x4e')]['id']}})[_0x01a8('0x29')](handleEntityNotFound(_0x258d99,null))[_0x01a8('0x29')](saveUpdates(_0x9509ab[_0x01a8('0x4c')],null))[_0x01a8('0x29')](respondWithResult(_0x258d99,null))[_0x01a8('0x48')](handleError(_0x258d99,null));};exports[_0x01a8('0x28')]=function(_0x110df7,_0x4589b4){return db[_0x01a8('0x46')]['find']({'where':{'id':_0x110df7[_0x01a8('0x4e')]['id']}})['then'](handleEntityNotFound(_0x4589b4,null))[_0x01a8('0x29')](removeEntity(_0x4589b4,null))[_0x01a8('0x48')](handleError(_0x4589b4,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.model.js b/server/api/intSalesforceField/intSalesforceField.model.js index 68c777b..91ea6c2 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 _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 +var _0x5144=['./intSalesforceField.attributes','exports','define','int_salesforce_fields','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x5144,0x7c));var _0x4514=function(_0x406e18,_0x4f2cd0){_0x406e18=_0x406e18-0x0;var _0x2330db=_0x5144[_0x406e18];return _0x2330db;};'use strict';var _=require(_0x4514('0x0'));var util=require(_0x4514('0x1'));var logger=require(_0x4514('0x2'))(_0x4514('0x3'));var moment=require(_0x4514('0x4'));var BPromise=require(_0x4514('0x5'));var rp=require(_0x4514('0x6'));var fs=require('fs');var path=require(_0x4514('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x4514('0x8'));module[_0x4514('0x9')]=function(_0x540ce5,_0x21601c){return _0x540ce5[_0x4514('0xa')]('SalesforceField',attributes,{'tableName':_0x4514('0xb'),'paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':['idField','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 ca462d2..850f2c7 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 _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 +var _0x8baf=['result','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x34d275,_0x5d84ee){var _0x1379cc=function(_0x320fbe){while(--_0x320fbe){_0x34d275['push'](_0x34d275['shift']());}};_0x1379cc(++_0x5d84ee);}(_0x8baf,0x7f));var _0xf8ba=function(_0x25de3e,_0x1fc895){_0x25de3e=_0x25de3e-0x0;var _0xa1dc13=_0x8baf[_0x25de3e];return _0xa1dc13;};'use strict';var _=require(_0xf8ba('0x0'));var util=require(_0xf8ba('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xf8ba('0x2'));var fs=require('fs');var Redis=require(_0xf8ba('0x3'));var db=require(_0xf8ba('0x4'))['db'];var utils=require(_0xf8ba('0x5'));var logger=require(_0xf8ba('0x6'))(_0xf8ba('0x7'));var config=require(_0xf8ba('0x8'));var jayson=require(_0xf8ba('0x9'));var client=jayson[_0xf8ba('0xa')][_0xf8ba('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x104e2d,_0x5d5918,_0x42cf14){return new BPromise(function(_0x563cba,_0x19260e){return client[_0xf8ba('0xc')](_0x104e2d,_0x42cf14)[_0xf8ba('0xd')](function(_0x5ebb6a){logger[_0xf8ba('0xe')](_0xf8ba('0xf'),_0x5d5918,_0xf8ba('0x10'));logger[_0xf8ba('0x11')](_0xf8ba('0x12'),_0x5d5918,'request\x20sent',JSON[_0xf8ba('0x13')](_0x5ebb6a));if(_0x5ebb6a[_0xf8ba('0x14')]){if(_0x5ebb6a[_0xf8ba('0x14')][_0xf8ba('0x15')]===0x1f4){logger['error']('SalesforceField,\x20%s,\x20%s',_0x5d5918,_0x5ebb6a[_0xf8ba('0x14')][_0xf8ba('0x16')]);return _0x19260e(_0x5ebb6a[_0xf8ba('0x14')][_0xf8ba('0x16')]);}logger['error'](_0xf8ba('0xf'),_0x5d5918,_0x5ebb6a[_0xf8ba('0x14')][_0xf8ba('0x16')]);return _0x563cba(_0x5ebb6a[_0xf8ba('0x14')][_0xf8ba('0x16')]);}else{logger[_0xf8ba('0xe')](_0xf8ba('0xf'),_0x5d5918,'request\x20sent');_0x563cba(_0x5ebb6a[_0xf8ba('0x17')][_0xf8ba('0x16')]);}})[_0xf8ba('0x18')](function(_0x33e64e){logger['error'](_0xf8ba('0xf'),_0x5d5918,_0x33e64e);_0x19260e(_0x33e64e);});});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/index.js b/server/api/intServicenowAccount/index.js index 7426d14..e192dba 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 _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 +var _0xa74d=['fs-extra','../../components/interaction/service','../../config/environment','./intServicenowAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','/:id/configurations','addConfiguration','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router'];(function(_0x533528,_0x409d05){var _0x3189f1=function(_0x5e63d2){while(--_0x5e63d2){_0x533528['push'](_0x533528['shift']());}};_0x3189f1(++_0x409d05);}(_0xa74d,0x1cf));var _0xda74=function(_0xa7db71,_0x29eb03){_0xa7db71=_0xa7db71-0x0;var _0x597d0f=_0xa74d[_0xa7db71];return _0x597d0f;};'use strict';var multer=require('multer');var util=require(_0xda74('0x0'));var path=require(_0xda74('0x1'));var timeout=require(_0xda74('0x2'));var express=require(_0xda74('0x3'));var router=express[_0xda74('0x4')]();var fs_extra=require(_0xda74('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xda74('0x6'));var config=require(_0xda74('0x7'));var controller=require(_0xda74('0x8'));router[_0xda74('0x9')]('/',auth[_0xda74('0xa')](),controller[_0xda74('0xb')]);router[_0xda74('0x9')](_0xda74('0xc'),auth['isAuthenticated'](),controller[_0xda74('0xd')]);router['get']('/:id/configurations',auth[_0xda74('0xa')](),controller[_0xda74('0xe')]);router['get'](_0xda74('0xf'),auth[_0xda74('0xa')](),controller[_0xda74('0x10')]);router[_0xda74('0x11')]('/',auth[_0xda74('0xa')](),controller[_0xda74('0x12')]);router[_0xda74('0x11')](_0xda74('0x13'),auth['isAuthenticated'](),controller[_0xda74('0x14')]);router[_0xda74('0x15')](_0xda74('0xc'),auth['isAuthenticated'](),controller[_0xda74('0x16')]);router[_0xda74('0x17')](_0xda74('0xc'),auth[_0xda74('0xa')](),controller[_0xda74('0x18')]);module[_0xda74('0x19')]=router; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.attributes.js b/server/api/intServicenowAccount/intServicenowAccount.attributes.js index bdefe8b..d5457ac 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 _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 +var _0xfe49=['username','exports','STRING'];(function(_0x455b35,_0x5d2b5e){var _0x1fc095=function(_0x52bfe4){while(--_0x52bfe4){_0x455b35['push'](_0x455b35['shift']());}};_0x1fc095(++_0x5d2b5e);}(_0xfe49,0x9d));var _0x9fe4=function(_0x413298,_0x3ad67b){_0x413298=_0x413298-0x0;var _0xca925e=_0xfe49[_0x413298];return _0xca925e;};'use strict';var Sequelize=require('sequelize');module[_0x9fe4('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x9fe4('0x1')]},'username':{'type':Sequelize[_0x9fe4('0x1')],'unique':_0x9fe4('0x2')},'password':{'type':Sequelize[_0x9fe4('0x1')]},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize['STRING'],'unique':'remoteUri'},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.controller.js b/server/api/intServicenowAccount/intServicenowAccount.controller.js index b1bbf9a..c7840b3 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 _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 +var _0x4fbb=['VIRTUAL','options','ServicenowAccount','includeAll','include','findAll','show','params','create','body','find','ServicenowConfiguration','order','pick','getConfigurations','findOne','AccountId','channel','Descriptions','getDescriptions','ServicenowField','Subjects','getFields','made_sla','hold_reason','knowledge','subcategory','close_code','notify','incident_state','severity','category','parent','watch_list','sys_updated_on','resolved_by','sys_updated_by','opened_by','user_input','sys_domain','sys_created_by','calendar_stc','closed_at','cmdb_ci','delivery_plan','impact','active','business_service','priority','time_worked','expected_start','opened_at','business_duration','group_list','work_end','reopened_time','resolved_at','caller_id','short_description','correlation_display','delivery_task','work_start','assignment_group','business_stc','description','sys_class_name','follow_up','parent_incident','contact_type','reopened_by','urgency','problem_id','company','activity_due','assigned_to','comments','approval','comments_and_work_notes','escalation','correlation_id','location','username','password','email','serverUrl','slice','substring','lastIndexOf','format','%s/api/now/doc/table/schema/','%s/api/now/table/','GET','incident?sysparm_display_value=all','log','incident\x20table\x20objects','assign','remove','includes','label','push','all','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','forEach','concat','ServiceNow\x20error:\x20','test','statusCode','boolean','True','false','value','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','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','../../mysqldb','../../components/integrations/configuration','jayson/promise','client','http','request','then','info','request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','error','code','ServicenowAccount,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','stack','name','send','map','rawAttributes','fieldName','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','type'];(function(_0x40a396,_0x68aba3){var _0xeb1da3=function(_0x7e5910){while(--_0x7e5910){_0x40a396['push'](_0x40a396['shift']());}};_0xeb1da3(++_0x68aba3);}(_0x4fbb,0x12b));var _0xb4fb=function(_0x6810d0,_0x4565c3){_0x6810d0=_0x6810d0-0x0;var _0x568796=_0x4fbb[_0x6810d0];return _0x568796;};'use strict';var emlformat=require(_0xb4fb('0x0'));var rimraf=require(_0xb4fb('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb4fb('0x2'));var rp=require(_0xb4fb('0x3'));var moment=require(_0xb4fb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xb4fb('0x5'));var util=require('util');var path=require(_0xb4fb('0x6'));var sox=require(_0xb4fb('0x7'));var csv=require(_0xb4fb('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb4fb('0x9'));var _=require(_0xb4fb('0xa'));var squel=require(_0xb4fb('0xb'));var crypto=require(_0xb4fb('0xc'));var jsforce=require(_0xb4fb('0xd'));var deskjs=require(_0xb4fb('0xe'));var toCsv=require(_0xb4fb('0x8'));var querystring=require('querystring');var Papa=require(_0xb4fb('0xf'));var Redis=require(_0xb4fb('0x10'));var authService=require(_0xb4fb('0x11'));var qs=require(_0xb4fb('0x12'));var as=require(_0xb4fb('0x13'));var hardwareService=require(_0xb4fb('0x14'));var logger=require(_0xb4fb('0x15'))(_0xb4fb('0x16'));var utils=require(_0xb4fb('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xb4fb('0x18'))['db'];var integrations=require(_0xb4fb('0x19'));var jayson=require(_0xb4fb('0x1a'));var client=jayson[_0xb4fb('0x1b')][_0xb4fb('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x2afdf0,_0x4ced0b,_0x34cf0c,_0x52d486){return new BPromise(function(_0x5a3245,_0x14ad06){var _0x115a9c=_0x52d486||client;return _0x115a9c[_0xb4fb('0x1d')](_0x2afdf0,_0x34cf0c)[_0xb4fb('0x1e')](function(_0x24fda7){logger[_0xb4fb('0x1f')]('ServicenowAccount,\x20%s,\x20%s',_0x4ced0b,_0xb4fb('0x20'));logger['debug'](_0xb4fb('0x21'),_0x4ced0b,_0xb4fb('0x20'),JSON['stringify'](_0x24fda7));if(_0x24fda7[_0xb4fb('0x22')]){if(_0x24fda7[_0xb4fb('0x22')][_0xb4fb('0x23')]===0x1f4){logger[_0xb4fb('0x22')](_0xb4fb('0x24'),_0x4ced0b,_0x24fda7[_0xb4fb('0x22')]['message']);return _0x14ad06(_0x24fda7[_0xb4fb('0x22')]['message']);}logger[_0xb4fb('0x22')](_0xb4fb('0x24'),_0x4ced0b,_0x24fda7['error']['message']);return _0x5a3245(_0x24fda7[_0xb4fb('0x22')][_0xb4fb('0x25')]);}else{logger[_0xb4fb('0x1f')](_0xb4fb('0x24'),_0x4ced0b,_0xb4fb('0x20'));_0x5a3245(_0x24fda7[_0xb4fb('0x26')][_0xb4fb('0x25')]);}})[_0xb4fb('0x27')](function(_0x3f16fd){logger[_0xb4fb('0x22')](_0xb4fb('0x24'),_0x4ced0b,_0x3f16fd);_0x14ad06(_0x3f16fd);});});}function respondWithStatusCode(_0x47a4de,_0x50d417){_0x50d417=_0x50d417||0xcc;return function(_0x4d796a){if(_0x4d796a){return _0x47a4de[_0xb4fb('0x28')](_0x50d417);}return _0x47a4de[_0xb4fb('0x29')](_0x50d417)[_0xb4fb('0x2a')]();};}function respondWithResult(_0x461f4d,_0x234a12){_0x234a12=_0x234a12||0xc8;return function(_0x2f5695){if(_0x2f5695){return _0x461f4d['status'](_0x234a12)[_0xb4fb('0x2b')](_0x2f5695);}};}function respondWithFilteredResult(_0x1850e3,_0x55db93){return function(_0x59715f){if(_0x59715f){var _0x3c5615=typeof _0x55db93[_0xb4fb('0x2c')]===_0xb4fb('0x2d')&&typeof _0x55db93[_0xb4fb('0x2e')]===_0xb4fb('0x2d');var _0x16d6c0=_0x59715f[_0xb4fb('0x2f')];var _0x2dedec=_0x3c5615?0x0:_0x55db93[_0xb4fb('0x2c')];var _0x3d6622=_0x3c5615?_0x59715f[_0xb4fb('0x2f')]:_0x55db93[_0xb4fb('0x2c')]+_0x55db93[_0xb4fb('0x2e')];var _0x13ef6a;if(_0x3d6622>=_0x16d6c0){_0x3d6622=_0x16d6c0;_0x13ef6a=0xc8;}else{_0x13ef6a=0xce;}_0x1850e3[_0xb4fb('0x29')](_0x13ef6a);return _0x1850e3['set'](_0xb4fb('0x30'),_0x2dedec+'-'+_0x3d6622+'/'+_0x16d6c0)[_0xb4fb('0x2b')](_0x59715f);}return null;};}function patchUpdates(_0x48bf95){return function(_0x813347){try{jsonpatch[_0xb4fb('0x31')](_0x813347,_0x48bf95,!![]);}catch(_0x283752){return BPromise[_0xb4fb('0x32')](_0x283752);}return _0x813347[_0xb4fb('0x33')]();};}function saveUpdates(_0x2cee87,_0x52899f){return function(_0x40f672){if(_0x40f672){return _0x40f672[_0xb4fb('0x34')](_0x2cee87)[_0xb4fb('0x1e')](function(_0x436c49){return _0x436c49;});}return null;};}function removeEntity(_0x4de886,_0x4cd85d){return function(_0x11b02f){if(_0x11b02f){return _0x11b02f[_0xb4fb('0x35')]()[_0xb4fb('0x1e')](function(){_0x4de886[_0xb4fb('0x29')](0xcc)[_0xb4fb('0x2a')]();});}};}function handleEntityNotFound(_0x4aac25,_0x355337){return function(_0x5f4ad7){if(!_0x5f4ad7){_0x4aac25[_0xb4fb('0x28')](0x194);}return _0x5f4ad7;};}function handleError(_0x279f89,_0x483711){_0x483711=_0x483711||0x1f4;return function(_0x32daf5){logger[_0xb4fb('0x22')](_0x32daf5[_0xb4fb('0x36')]);if(_0x32daf5[_0xb4fb('0x37')]){delete _0x32daf5[_0xb4fb('0x37')];}_0x279f89[_0xb4fb('0x29')](_0x483711)[_0xb4fb('0x38')](_0x32daf5);};}exports['index']=function(_0x225055,_0x57e557){var _0xde0598={},_0x18cc7f={},_0x4fc55d={'count':0x0,'rows':[]};var _0x487ded=_[_0xb4fb('0x39')](db['ServicenowAccount'][_0xb4fb('0x3a')],function(_0x29048e){return{'name':_0x29048e[_0xb4fb('0x3b')],'type':_0x29048e['type']['key']};});_0x18cc7f[_0xb4fb('0x3c')]=_[_0xb4fb('0x39')](_0x487ded,_0xb4fb('0x37'));_0x18cc7f[_0xb4fb('0x3d')]=_[_0xb4fb('0x3e')](_0x225055['query']);_0x18cc7f['filters']=_[_0xb4fb('0x3f')](_0x18cc7f[_0xb4fb('0x3c')],_0x18cc7f['query']);_0xde0598[_0xb4fb('0x40')]=_['intersection'](_0x18cc7f['model'],qs[_0xb4fb('0x41')](_0x225055[_0xb4fb('0x3d')]['fields']));_0xde0598['attributes']=_0xde0598[_0xb4fb('0x40')][_0xb4fb('0x42')]?_0xde0598[_0xb4fb('0x40')]:_0x18cc7f[_0xb4fb('0x3c')];if(!_0x225055[_0xb4fb('0x3d')][_0xb4fb('0x43')](_0xb4fb('0x44'))){_0xde0598['limit']=qs[_0xb4fb('0x2e')](_0x225055['query'][_0xb4fb('0x2e')]);_0xde0598['offset']=qs['offset'](_0x225055[_0xb4fb('0x3d')][_0xb4fb('0x2c')]);}_0xde0598['order']=qs[_0xb4fb('0x45')](_0x225055['query'][_0xb4fb('0x45')]);_0xde0598[_0xb4fb('0x46')]=qs[_0xb4fb('0x47')](_['pick'](_0x225055[_0xb4fb('0x3d')],_0x18cc7f[_0xb4fb('0x47')]),_0x487ded);if(_0x225055[_0xb4fb('0x3d')][_0xb4fb('0x48')]){_0xde0598[_0xb4fb('0x46')]=_[_0xb4fb('0x49')](_0xde0598[_0xb4fb('0x46')],{'$or':_[_0xb4fb('0x39')](_0x487ded,function(_0x8f4dea){if(_0x8f4dea[_0xb4fb('0x4a')]!==_0xb4fb('0x4b')){var _0x3c534f={};_0x3c534f[_0x8f4dea[_0xb4fb('0x37')]]={'$like':'%'+_0x225055[_0xb4fb('0x3d')][_0xb4fb('0x48')]+'%'};return _0x3c534f;}})});}_0xde0598=_[_0xb4fb('0x49')]({},_0xde0598,_0x225055[_0xb4fb('0x4c')]);var _0x54c2a2={'where':_0xde0598[_0xb4fb('0x46')]};return db[_0xb4fb('0x4d')][_0xb4fb('0x2f')](_0x54c2a2)[_0xb4fb('0x1e')](function(_0x1974b7){_0x4fc55d[_0xb4fb('0x2f')]=_0x1974b7;if(_0x225055['query'][_0xb4fb('0x4e')]){_0xde0598[_0xb4fb('0x4f')]=[{'all':!![]}];}return db[_0xb4fb('0x4d')][_0xb4fb('0x50')](_0xde0598);})[_0xb4fb('0x1e')](function(_0x4b6cc3){_0x4fc55d['rows']=_0x4b6cc3;return _0x4fc55d;})[_0xb4fb('0x1e')](respondWithFilteredResult(_0x57e557,_0xde0598))[_0xb4fb('0x27')](handleError(_0x57e557,null));};exports[_0xb4fb('0x51')]=function(_0x49a564,_0xd2174){var _0x567942={'raw':![],'where':{'id':_0x49a564[_0xb4fb('0x52')]['id']}},_0x212b75={};_0x212b75[_0xb4fb('0x3c')]=_[_0xb4fb('0x3e')](db[_0xb4fb('0x4d')][_0xb4fb('0x3a')]);_0x212b75[_0xb4fb('0x3d')]=_[_0xb4fb('0x3e')](_0x49a564[_0xb4fb('0x3d')]);_0x212b75['filters']=_[_0xb4fb('0x3f')](_0x212b75['model'],_0x212b75['query']);_0x567942[_0xb4fb('0x40')]=_['intersection'](_0x212b75[_0xb4fb('0x3c')],qs[_0xb4fb('0x41')](_0x49a564['query'][_0xb4fb('0x41')]));_0x567942['attributes']=_0x567942[_0xb4fb('0x40')][_0xb4fb('0x42')]?_0x567942[_0xb4fb('0x40')]:_0x212b75[_0xb4fb('0x3c')];if(_0x49a564['query'][_0xb4fb('0x4e')]){_0x567942[_0xb4fb('0x4f')]=[{'all':!![]}];}_0x567942=_['merge']({},_0x567942,_0x49a564[_0xb4fb('0x4c')]);return db['ServicenowAccount']['find'](_0x567942)[_0xb4fb('0x1e')](handleEntityNotFound(_0xd2174,null))[_0xb4fb('0x1e')](respondWithResult(_0xd2174,null))['catch'](handleError(_0xd2174,null));};exports[_0xb4fb('0x53')]=function(_0x499c6e,_0x3a4d10){return db[_0xb4fb('0x4d')][_0xb4fb('0x53')](_0x499c6e[_0xb4fb('0x54')],{})[_0xb4fb('0x1e')](respondWithResult(_0x3a4d10,0xc9))['catch'](handleError(_0x3a4d10,null));};exports[_0xb4fb('0x34')]=function(_0x5b93a5,_0xa164e6){if(_0x5b93a5[_0xb4fb('0x54')]['id']){delete _0x5b93a5[_0xb4fb('0x54')]['id'];}return db[_0xb4fb('0x4d')][_0xb4fb('0x55')]({'where':{'id':_0x5b93a5[_0xb4fb('0x52')]['id']}})[_0xb4fb('0x1e')](handleEntityNotFound(_0xa164e6,null))[_0xb4fb('0x1e')](saveUpdates(_0x5b93a5['body'],null))[_0xb4fb('0x1e')](respondWithResult(_0xa164e6,null))[_0xb4fb('0x27')](handleError(_0xa164e6,null));};exports[_0xb4fb('0x35')]=function(_0x557944,_0x5d2c06){return db[_0xb4fb('0x4d')][_0xb4fb('0x55')]({'where':{'id':_0x557944[_0xb4fb('0x52')]['id']}})[_0xb4fb('0x1e')](handleEntityNotFound(_0x5d2c06,null))[_0xb4fb('0x1e')](removeEntity(_0x5d2c06,null))[_0xb4fb('0x27')](handleError(_0x5d2c06,null));};exports['getConfigurations']=function(_0x23de5d,_0xfa197c,_0x31f417){var _0x39533a={};var _0x10f8fe={};var _0x2b9f15;var _0x2e6eea;return db['ServicenowAccount']['findOne']({'where':{'id':_0x23de5d[_0xb4fb('0x52')]['id']}})[_0xb4fb('0x1e')](handleEntityNotFound(_0xfa197c,null))[_0xb4fb('0x1e')](function(_0x5f468a){if(_0x5f468a){_0x2b9f15=_0x5f468a;_0x10f8fe['model']=_['keys'](db[_0xb4fb('0x56')][_0xb4fb('0x3a')]);_0x10f8fe[_0xb4fb('0x3d')]=_[_0xb4fb('0x3e')](_0x23de5d['query']);_0x10f8fe[_0xb4fb('0x47')]=_[_0xb4fb('0x3f')](_0x10f8fe['model'],_0x10f8fe[_0xb4fb('0x3d')]);_0x39533a[_0xb4fb('0x40')]=_[_0xb4fb('0x3f')](_0x10f8fe[_0xb4fb('0x3c')],qs[_0xb4fb('0x41')](_0x23de5d[_0xb4fb('0x3d')][_0xb4fb('0x41')]));_0x39533a['attributes']=_0x39533a[_0xb4fb('0x40')][_0xb4fb('0x42')]?_0x39533a[_0xb4fb('0x40')]:_0x10f8fe['model'];_0x39533a[_0xb4fb('0x57')]=qs[_0xb4fb('0x45')](_0x23de5d[_0xb4fb('0x3d')][_0xb4fb('0x45')]);_0x39533a[_0xb4fb('0x46')]=qs['filters'](_[_0xb4fb('0x58')](_0x23de5d[_0xb4fb('0x3d')],_0x10f8fe[_0xb4fb('0x47')]));if(_0x23de5d[_0xb4fb('0x3d')]['filter']){_0x39533a[_0xb4fb('0x46')]=_[_0xb4fb('0x49')](_0x39533a[_0xb4fb('0x46')],{'$or':_[_0xb4fb('0x39')](_0x39533a['attributes'],function(_0x3cf6b2){var _0x474178={};_0x474178[_0x3cf6b2]={'$like':'%'+_0x23de5d[_0xb4fb('0x3d')]['filter']+'%'};return _0x474178;})});}_0x39533a=_[_0xb4fb('0x49')]({},_0x39533a,_0x23de5d[_0xb4fb('0x4c')]);return _0x2b9f15[_0xb4fb('0x59')](_0x39533a);}})[_0xb4fb('0x1e')](function(_0x209dcd){if(_0x209dcd){_0x2e6eea=_0x209dcd['length'];if(!_0x23de5d[_0xb4fb('0x3d')]['hasOwnProperty']('nolimit')){_0x39533a[_0xb4fb('0x2e')]=qs['limit'](_0x23de5d[_0xb4fb('0x3d')][_0xb4fb('0x2e')]);_0x39533a[_0xb4fb('0x2c')]=qs[_0xb4fb('0x2c')](_0x23de5d[_0xb4fb('0x3d')]['offset']);}return _0x2b9f15[_0xb4fb('0x59')](_0x39533a);}})['then'](function(_0x1d7b58){if(_0x1d7b58){return _0x1d7b58?{'count':_0x2e6eea,'rows':_0x1d7b58}:null;}})['then'](respondWithResult(_0xfa197c,null))['catch'](handleError(_0xfa197c,null));};exports['addConfiguration']=function(_0x43de16,_0x3ff233,_0x180185){if(_0x43de16[_0xb4fb('0x54')]['id']){delete _0x43de16['body']['id'];}return db['ServicenowAccount'][_0xb4fb('0x5a')]({'where':{'id':_0x43de16[_0xb4fb('0x52')]['id']}})[_0xb4fb('0x1e')](handleEntityNotFound(_0x3ff233,null))[_0xb4fb('0x1e')](function(_0x451cab){if(_0x451cab){_0x43de16[_0xb4fb('0x54')][_0xb4fb('0x5b')]=_0x451cab['id'];_0x43de16[_0xb4fb('0x54')]['Subjects']=integrations['getSubjects'](_0x43de16['body'][_0xb4fb('0x5c')],_0x43de16['body'][_0xb4fb('0x4a')]);_0x43de16[_0xb4fb('0x54')][_0xb4fb('0x5d')]=integrations[_0xb4fb('0x5e')](_0x43de16[_0xb4fb('0x54')]['channel'],_0x43de16[_0xb4fb('0x54')][_0xb4fb('0x4a')]);return db['ServicenowConfiguration']['create'](_0x43de16['body'],{'include':[{'model':db[_0xb4fb('0x5f')],'as':_0xb4fb('0x60')},{'model':db[_0xb4fb('0x5f')],'as':_0xb4fb('0x5d')}]});}return null;})[_0xb4fb('0x1e')](respondWithResult(_0x3ff233,null))[_0xb4fb('0x27')](handleError(_0x3ff233,null));};exports[_0xb4fb('0x61')]=function(_0x3a5653,_0x95dac6,_0x48573f){var _0x564a35=[_0xb4fb('0x62'),_0xb4fb('0x63'),_0xb4fb('0x64'),_0xb4fb('0x65'),_0xb4fb('0x66'),_0xb4fb('0x67'),_0xb4fb('0x68'),_0xb4fb('0x69'),_0xb4fb('0x6a')];var _0x16bc60=[_0xb4fb('0x6b'),_0xb4fb('0x62'),'caused_by',_0xb4fb('0x6c'),'upon_reject',_0xb4fb('0x6d'),'child_incidents','hold_reason','approval_history','number',_0xb4fb('0x6e'),_0xb4fb('0x6f'),_0xb4fb('0x70'),_0xb4fb('0x71'),'sys_created_on',_0xb4fb('0x72'),'state',_0xb4fb('0x73'),'knowledge','order',_0xb4fb('0x74'),_0xb4fb('0x75'),_0xb4fb('0x76'),_0xb4fb('0x77'),_0xb4fb('0x78'),_0xb4fb('0x79'),'work_notes_list',_0xb4fb('0x7a'),_0xb4fb('0x7b'),'sys_domain_path','rfc',_0xb4fb('0x7c'),_0xb4fb('0x7d'),_0xb4fb('0x7e'),_0xb4fb('0x7f'),_0xb4fb('0x80'),_0xb4fb('0x81'),_0xb4fb('0x82'),_0xb4fb('0x83'),_0xb4fb('0x84'),'approval_set',_0xb4fb('0x65'),'work_notes',_0xb4fb('0x85'),_0xb4fb('0x66'),_0xb4fb('0x86'),_0xb4fb('0x87'),_0xb4fb('0x88'),_0xb4fb('0x89'),_0xb4fb('0x8a'),'additional_assignee_list',_0xb4fb('0x8b'),'calendar_duration',_0xb4fb('0x67'),_0xb4fb('0x8c'),'close_notes','closed_by',_0xb4fb('0x8d'),_0xb4fb('0x8e'),'sys_id',_0xb4fb('0x8f'),_0xb4fb('0x90'),'incident_state',_0xb4fb('0x91'),_0xb4fb('0x92'),_0xb4fb('0x93'),'reassignment_count',_0xb4fb('0x94'),_0xb4fb('0x95'),_0xb4fb('0x69'),_0xb4fb('0x96'),'sla_due',_0xb4fb('0x97'),_0xb4fb('0x98'),'due_date','sys_mod_count','reopen_count','sys_tags',_0xb4fb('0x99'),'upon_approval',_0xb4fb('0x9a'),_0xb4fb('0x9b'),_0xb4fb('0x6a')];var _0x154f8c='';var _0x560e41='';var _0x2e1c5e=[];var _0x21239b='';var _0x3095c2='';var _0x24c3f1=[];var _0x2e7dfc='';var _0x94ea85='';var _0x2c20c1={};var _0x3f3197='';return db[_0xb4fb('0x4d')]['findOne']({'where':{'id':_0x3a5653['params']['id']},'attributes':['id',_0xb4fb('0x9c'),_0xb4fb('0x9d'),_0xb4fb('0x9e'),'remoteUri',_0xb4fb('0x9f')]})['then'](handleEntityNotFound(_0x95dac6,null))[_0xb4fb('0x1e')](function(_0x52b321){if(_0x52b321){_0x3f3197=_0x52b321['remoteUri'];var _0x523a0b=_0x3f3197[_0xb4fb('0xa0')](-0x1);if(_0x523a0b==='/'){_0x3f3197=_0x3f3197[_0xb4fb('0xa1')](0x0,_0x3f3197[_0xb4fb('0xa2')](_0x523a0b));}_0x94ea85=util[_0xb4fb('0xa3')](_0xb4fb('0xa4'),_0x3f3197);_0x2e7dfc=util[_0xb4fb('0xa3')](_0xb4fb('0xa5'),_0x3f3197);_0x2c20c1={'user':_0x52b321[_0xb4fb('0x9c')],'pass':_0x52b321[_0xb4fb('0x9d')]};var _0x14ff0f={'method':_0xb4fb('0xa6'),'uri':_0x94ea85+_0xb4fb('0xa7'),'auth':_0x2c20c1,'json':!![]};return rp(_0x14ff0f);}})['then'](function(_0x34c6c7){if(_0x34c6c7[_0xb4fb('0x26')][_0xb4fb('0x42')]>0x0){_0x154f8c=_0x34c6c7[_0xb4fb('0x26')];}console[_0xb4fb('0xa8')](_0xb4fb('0xa9'),_0x154f8c);_0x24c3f1=[];_0x560e41=Object[_0xb4fb('0xaa')]([],_0x154f8c);_[_0xb4fb('0xab')](_0x560e41,function(_0x3ee762){return!_0x564a35[_0xb4fb('0xac')](_0x3ee762[_0xb4fb('0x37')]);});_0x560e41['forEach'](function(_0x47e455){var _0x186028=createFieldObject(_0x2e7dfc,_0x2c20c1,_0x47e455['internalType'],_0x47e455[_0xb4fb('0x37')],_0x47e455[_0xb4fb('0xad')],![]);_0x24c3f1[_0xb4fb('0xae')](_0x186028);});return Promise[_0xb4fb('0xaf')](_0x24c3f1);})['then'](function(_0x3e5513){_0x2e1c5e=_0x3e5513;_0x21239b=Object[_0xb4fb('0xaa')]([],_0x154f8c);console['log'](_0xb4fb('0xb0'),_0x154f8c);_[_0xb4fb('0xab')](_0x21239b,function(_0x1eb485){return _0x16bc60[_0xb4fb('0xac')](_0x1eb485['name']);});console[_0xb4fb('0xa8')](_0xb4fb('0xb1'),_0x21239b);_0x24c3f1=[];_0x21239b[_0xb4fb('0xb2')](function(_0x421c07){var _0x34e081=createFieldObject(_0x2e7dfc,_0x2c20c1,_0x421c07['internalType'],_0x421c07[_0xb4fb('0x37')],_0x421c07['label'],!![]);_0x24c3f1[_0xb4fb('0xae')](_0x34e081);});return Promise['all'](_0x24c3f1);})[_0xb4fb('0x1e')](function(_0x18061c){_0x3095c2=_0x18061c;var _0x248dd9=_0x2e1c5e[_0xb4fb('0xb3')](_0x3095c2);return{'count':_0x248dd9['length'],'rows':_0x248dd9};})[_0xb4fb('0x1e')](respondWithResult(_0x95dac6,null))[_0xb4fb('0x27')](function(_0x5546ac){console['log'](_0xb4fb('0xb4')+_0x5546ac);var _0x3fc64d=_0x3a5653['query'][_0xb4fb('0xb5')]?0x1f4:_0x5546ac[_0xb4fb('0xb6')]||0x1f4;logger[_0xb4fb('0x22')](_0x5546ac[_0xb4fb('0x36')]);delete _0x5546ac[_0xb4fb('0x37')];if(_0x3fc64d===0x191){_0x3fc64d=0x190;}_0x95dac6[_0xb4fb('0x29')](_0x3fc64d)[_0xb4fb('0x38')](_0x3a5653[_0xb4fb('0x3d')][_0xb4fb('0xb5')]?{'message':'Wrong\x20credentials','statusCode':_0x5546ac[_0xb4fb('0xb6')]}:_0x5546ac);});};function createFieldObject(_0x5b9a53,_0x534241,_0x4200bd,_0x5a146e,_0x105f89,_0x543f39){return new Promise(function(_0x449675,_0x1aadeb){var _0x35c599={'id':_0x5a146e,'name':_0x105f89,'custom':_0x543f39};if(_0x4200bd===_0xb4fb('0xb7')){_0x35c599[_0xb4fb('0x4c')]=[{'name':_0xb4fb('0xb8'),'value':'true'},{'name':'False','value':_0xb4fb('0xb9')}];_0x449675(_0x35c599);}else{var _0x226fb3={'method':'GET','uri':_0x5b9a53+'sys_choice?sysparm_query=name=incident^element='+_0x5a146e,'auth':_0x534241,'json':!![]};return rp(_0x226fb3)[_0xb4fb('0x1e')](function(_0x1a2390){var _0x402881=[];if(_0x1a2390[_0xb4fb('0x26')][_0xb4fb('0x42')]>0x0){_0x1a2390[_0xb4fb('0x26')][_0xb4fb('0xb2')](function(_0x4a1acd){if(_0x4a1acd['inactive']==='false'){var _0x340d71={'name':_0x4a1acd[_0xb4fb('0xad')],'value':_0x4a1acd[_0xb4fb('0xba')]};_0x402881[_0xb4fb('0xae')](_0x340d71);}});}_0x35c599[_0xb4fb('0x4c')]=_0x402881;if(_0x35c599['options'][_0xb4fb('0x42')]>0x0){_0x449675(_0x35c599);}else{if(_0x543f39==![]){_0x449675();}else{_0x449675(_0x35c599);}}});}});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.model.js b/server/api/intServicenowAccount/intServicenowAccount.model.js index dd415ce..bc0f354 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 _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 +var _0xa630=['moment','request-promise','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','exports','define','ServicenowAccount','int_servicenow_accounts','lodash','util'];(function(_0x7dd0e6,_0x2b4980){var _0x5f3f86=function(_0x14ec76){while(--_0x14ec76){_0x7dd0e6['push'](_0x7dd0e6['shift']());}};_0x5f3f86(++_0x2b4980);}(_0xa630,0xbe));var _0x0a63=function(_0x1fdd4c,_0x379f5e){_0x1fdd4c=_0x1fdd4c-0x0;var _0xb7b01a=_0xa630[_0x1fdd4c];return _0xb7b01a;};'use strict';var _=require(_0x0a63('0x0'));var util=require(_0x0a63('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x0a63('0x2'));var BPromise=require('bluebird');var rp=require(_0x0a63('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0a63('0x4'));var config=require(_0x0a63('0x5'));var attributes=require(_0x0a63('0x6'));var integrations=require(_0x0a63('0x7'));module[_0x0a63('0x8')]=function(_0x4b7474,_0x2760b0){return _0x4b7474[_0x0a63('0x9')](_0x0a63('0xa'),attributes,{'tableName':_0x0a63('0xb'),'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 36adb46..a18182e 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 _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 +var _0xe0e3=['info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ServicenowAccount','options','raw','where','attributes','include','map','model','GetServicenowAccount','ShowServicenowAccount','find','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x3ce485,_0x3412fb){var _0xc42652=function(_0x94ce08){while(--_0x94ce08){_0x3ce485['push'](_0x3ce485['shift']());}};_0xc42652(++_0x3412fb);}(_0xe0e3,0x126));var _0x3e0e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe0e3[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x3e0e('0x0'));var moment=require('moment');var BPromise=require(_0x3e0e('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3e0e('0x2'));var db=require(_0x3e0e('0x3'))['db'];var utils=require(_0x3e0e('0x4'));var logger=require('../../config/logger')(_0x3e0e('0x5'));var config=require(_0x3e0e('0x6'));var jayson=require(_0x3e0e('0x7'));var client=jayson[_0x3e0e('0x8')][_0x3e0e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xc05e8c,_0x1aae8e,_0x27e52b){return new BPromise(function(_0xf018e,_0x8bef03){return client[_0x3e0e('0xa')](_0xc05e8c,_0x27e52b)[_0x3e0e('0xb')](function(_0x3d3f88){logger[_0x3e0e('0xc')](_0x3e0e('0xd'),_0x1aae8e,_0x3e0e('0xe'));logger[_0x3e0e('0xf')](_0x3e0e('0x10'),_0x1aae8e,_0x3e0e('0xe'),JSON[_0x3e0e('0x11')](_0x3d3f88));if(_0x3d3f88[_0x3e0e('0x12')]){if(_0x3d3f88[_0x3e0e('0x12')][_0x3e0e('0x13')]===0x1f4){logger[_0x3e0e('0x12')](_0x3e0e('0xd'),_0x1aae8e,_0x3d3f88[_0x3e0e('0x12')][_0x3e0e('0x14')]);return _0x8bef03(_0x3d3f88[_0x3e0e('0x12')][_0x3e0e('0x14')]);}logger[_0x3e0e('0x12')](_0x3e0e('0xd'),_0x1aae8e,_0x3d3f88[_0x3e0e('0x12')][_0x3e0e('0x14')]);return _0xf018e(_0x3d3f88['error'][_0x3e0e('0x14')]);}else{logger[_0x3e0e('0xc')](_0x3e0e('0xd'),_0x1aae8e,_0x3e0e('0xe'));_0xf018e(_0x3d3f88[_0x3e0e('0x15')][_0x3e0e('0x14')]);}})[_0x3e0e('0x16')](function(_0x408c93){logger['error'](_0x3e0e('0xd'),_0x1aae8e,_0x408c93);_0x8bef03(_0x408c93);});});}exports['GetServicenowAccount']=function(_0x452c3d){var _0x52cc98=this;return new Promise(function(_0x1562f3,_0x846ddf){return db[_0x3e0e('0x17')]['findAll']({'raw':_0x452c3d[_0x3e0e('0x18')]?_0x452c3d[_0x3e0e('0x18')][_0x3e0e('0x19')]===undefined?!![]:![]:!![],'where':_0x452c3d[_0x3e0e('0x18')]?_0x452c3d[_0x3e0e('0x18')][_0x3e0e('0x1a')]||null:null,'attributes':_0x452c3d['options']?_0x452c3d['options'][_0x3e0e('0x1b')]||null:null,'limit':_0x452c3d['options']?_0x452c3d[_0x3e0e('0x18')]['limit']||null:null,'include':_0x452c3d[_0x3e0e('0x18')]?_0x452c3d[_0x3e0e('0x18')][_0x3e0e('0x1c')]?_[_0x3e0e('0x1d')](_0x452c3d['options'][_0x3e0e('0x1c')],function(_0x1193e0){return{'model':db[_0x1193e0[_0x3e0e('0x1e')]],'as':_0x1193e0['as'],'attributes':_0x1193e0[_0x3e0e('0x1b')],'include':_0x1193e0[_0x3e0e('0x1c')]?_[_0x3e0e('0x1d')](_0x1193e0[_0x3e0e('0x1c')],function(_0x5c3d2c){return{'model':db[_0x5c3d2c[_0x3e0e('0x1e')]],'as':_0x5c3d2c['as'],'attributes':_0x5c3d2c[_0x3e0e('0x1b')],'include':_0x5c3d2c[_0x3e0e('0x1c')]?_[_0x3e0e('0x1d')](_0x5c3d2c[_0x3e0e('0x1c')],function(_0x29902f){return{'model':db[_0x29902f[_0x3e0e('0x1e')]],'as':_0x29902f['as'],'attributes':_0x29902f[_0x3e0e('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3e0e('0xb')](function(_0x22709c){logger[_0x3e0e('0xc')](_0x3e0e('0x1f'),_0x452c3d);logger[_0x3e0e('0xf')](_0x3e0e('0x1f'),_0x452c3d,JSON[_0x3e0e('0x11')](_0x22709c));_0x1562f3(_0x22709c);})['catch'](function(_0x2acedc){logger['error'](_0x3e0e('0x1f'),_0x2acedc[_0x3e0e('0x14')],_0x452c3d);_0x846ddf(_0x52cc98[_0x3e0e('0x12')](0x1f4,_0x2acedc['message']));});});};exports[_0x3e0e('0x20')]=function(_0x3c293e){var _0xa4c4f3=this;return new Promise(function(_0x5937fc,_0x365cfb){return db[_0x3e0e('0x17')][_0x3e0e('0x21')]({'raw':_0x3c293e[_0x3e0e('0x18')]?_0x3c293e[_0x3e0e('0x18')][_0x3e0e('0x19')]===undefined?!![]:![]:!![],'where':_0x3c293e[_0x3e0e('0x18')]?_0x3c293e[_0x3e0e('0x18')]['where']||null:null,'attributes':_0x3c293e[_0x3e0e('0x18')]?_0x3c293e[_0x3e0e('0x18')][_0x3e0e('0x1b')]||null:null,'include':_0x3c293e['options']?_0x3c293e['options'][_0x3e0e('0x1c')]?_[_0x3e0e('0x1d')](_0x3c293e[_0x3e0e('0x18')][_0x3e0e('0x1c')],function(_0x1e8e99){return{'model':db[_0x1e8e99['model']],'as':_0x1e8e99['as'],'attributes':_0x1e8e99[_0x3e0e('0x1b')],'include':_0x1e8e99[_0x3e0e('0x1c')]?_['map'](_0x1e8e99[_0x3e0e('0x1c')],function(_0x2730de){return{'model':db[_0x2730de[_0x3e0e('0x1e')]],'as':_0x2730de['as'],'attributes':_0x2730de[_0x3e0e('0x1b')],'include':_0x2730de[_0x3e0e('0x1c')]?_['map'](_0x2730de['include'],function(_0x30e4dd){return{'model':db[_0x30e4dd[_0x3e0e('0x1e')]],'as':_0x30e4dd['as'],'attributes':_0x30e4dd[_0x3e0e('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3e0e('0xb')](function(_0x392b9d){logger[_0x3e0e('0xc')](_0x3e0e('0x20'),_0x3c293e);logger['debug'](_0x3e0e('0x20'),_0x3c293e,JSON['stringify'](_0x392b9d));_0x5937fc(_0x392b9d);})[_0x3e0e('0x16')](function(_0x2acd8e){logger[_0x3e0e('0x12')](_0x3e0e('0x20'),_0x2acd8e[_0x3e0e('0x14')],_0x3c293e);_0x365cfb(_0xa4c4f3[_0x3e0e('0x12')](0x1f4,_0x2acd8e[_0x3e0e('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/index.js b/server/api/intServicenowConfiguration/index.js index 5a97fc5..4f1df5b 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 _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 +var _0xf138=['index','/:id','/:id/fields','/:id/subjects','/:id/descriptions','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowConfiguration.controller','get','isAuthenticated'];(function(_0x238c67,_0x4c409e){var _0x51d179=function(_0x24ab46){while(--_0x24ab46){_0x238c67['push'](_0x238c67['shift']());}};_0x51d179(++_0x4c409e);}(_0xf138,0x113));var _0x8f13=function(_0x13448d,_0x506222){_0x13448d=_0x13448d-0x0;var _0x3d0c2c=_0xf138[_0x13448d];return _0x3d0c2c;};'use strict';var multer=require(_0x8f13('0x0'));var util=require(_0x8f13('0x1'));var path=require(_0x8f13('0x2'));var timeout=require(_0x8f13('0x3'));var express=require(_0x8f13('0x4'));var router=express[_0x8f13('0x5')]();var fs_extra=require(_0x8f13('0x6'));var auth=require(_0x8f13('0x7'));var interaction=require(_0x8f13('0x8'));var config=require(_0x8f13('0x9'));var controller=require(_0x8f13('0xa'));router[_0x8f13('0xb')]('/',auth[_0x8f13('0xc')](),controller[_0x8f13('0xd')]);router[_0x8f13('0xb')](_0x8f13('0xe'),auth[_0x8f13('0xc')](),controller['show']);router[_0x8f13('0xb')](_0x8f13('0xf'),auth[_0x8f13('0xc')](),controller['getFields']);router[_0x8f13('0xb')](_0x8f13('0x10'),auth[_0x8f13('0xc')](),controller['getSubjects']);router['get'](_0x8f13('0x11'),auth['isAuthenticated'](),controller['getDescriptions']);router['post']('/',auth[_0x8f13('0xc')](),controller[_0x8f13('0x12')]);router[_0x8f13('0x13')](_0x8f13('0xe'),auth[_0x8f13('0xc')](),controller[_0x8f13('0x14')]);router[_0x8f13('0x15')](_0x8f13('0xe'),auth[_0x8f13('0xc')](),controller[_0x8f13('0x16')]);module[_0x8f13('0x17')]=router; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js index de97293..134d790 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 _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 +var _0x7e08=['sequelize','exports','STRING'];(function(_0xe9e6cf,_0x395f6d){var _0x2b8851=function(_0x4d6bd4){while(--_0x4d6bd4){_0xe9e6cf['push'](_0xe9e6cf['shift']());}};_0x2b8851(++_0x395f6d);}(_0x7e08,0x1e3));var _0x87e0=function(_0xecff29,_0x5e7b37){_0xecff29=_0xecff29-0x0;var _0x2d5106=_0x7e08[_0xecff29];return _0x2d5106;};'use strict';var Sequelize=require(_0x87e0('0x0'));module[_0x87e0('0x1')]={'name':{'type':Sequelize[_0x87e0('0x2')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js index 12e350e..10e195a 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 _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 +var _0x824e=['jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','jayson/promise','client','http','request','then','info','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','ServicenowConfiguration,\x20%s,\x20%s','message','sendStatus','status','json','offset','undefined','limit','count','set','apply','update','destroy','end','stack','name','send','index','map','ServicenowConfiguration','rawAttributes','fieldName','type','key','model','filters','intersection','query','fields','attributes','hasOwnProperty','nolimit','order','sort','where','options','includeAll','findAll','rows','catch','show','params','keys','length','include','merge','find','create','body','getFields','findOne','ServicenowField','pick','filter','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0x824e,0x1cc));var _0xe824=function(_0x28a465,_0x558c2c){_0x28a465=_0x28a465-0x0;var _0x258386=_0x824e[_0x28a465];return _0x258386;};'use strict';var emlformat=require(_0xe824('0x0'));var rimraf=require(_0xe824('0x1'));var zipdir=require(_0xe824('0x2'));var jsonpatch=require(_0xe824('0x3'));var rp=require(_0xe824('0x4'));var moment=require(_0xe824('0x5'));var BPromise=require(_0xe824('0x6'));var Mustache=require(_0xe824('0x7'));var util=require(_0xe824('0x8'));var path=require(_0xe824('0x9'));var sox=require('sox');var csv=require(_0xe824('0xa'));var ejs=require(_0xe824('0xb'));var fs=require('fs');var fs_extra=require(_0xe824('0xc'));var _=require('lodash');var squel=require(_0xe824('0xd'));var crypto=require(_0xe824('0xe'));var jsforce=require(_0xe824('0xf'));var deskjs=require(_0xe824('0x10'));var toCsv=require('to-csv');var querystring=require(_0xe824('0x11'));var Papa=require(_0xe824('0x12'));var Redis=require(_0xe824('0x13'));var authService=require(_0xe824('0x14'));var qs=require(_0xe824('0x15'));var as=require(_0xe824('0x16'));var hardwareService=require(_0xe824('0x17'));var logger=require(_0xe824('0x18'))('api');var utils=require(_0xe824('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xe824('0x1a'))['db'];var jayson=require(_0xe824('0x1b'));var client=jayson[_0xe824('0x1c')][_0xe824('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x5636f1,_0x398e32,_0x1ae01d,_0x301969){return new BPromise(function(_0x52db29,_0x12f984){var _0x297067=_0x301969||client;return _0x297067[_0xe824('0x1e')](_0x5636f1,_0x1ae01d)[_0xe824('0x1f')](function(_0x26738a){logger[_0xe824('0x20')]('ServicenowConfiguration,\x20%s,\x20%s',_0x398e32,_0xe824('0x21'));logger[_0xe824('0x22')](_0xe824('0x23'),_0x398e32,_0xe824('0x21'),JSON[_0xe824('0x24')](_0x26738a));if(_0x26738a[_0xe824('0x25')]){if(_0x26738a[_0xe824('0x25')][_0xe824('0x26')]===0x1f4){logger[_0xe824('0x25')](_0xe824('0x27'),_0x398e32,_0x26738a[_0xe824('0x25')][_0xe824('0x28')]);return _0x12f984(_0x26738a[_0xe824('0x25')][_0xe824('0x28')]);}logger[_0xe824('0x25')](_0xe824('0x27'),_0x398e32,_0x26738a['error']['message']);return _0x52db29(_0x26738a[_0xe824('0x25')][_0xe824('0x28')]);}else{logger[_0xe824('0x20')](_0xe824('0x27'),_0x398e32,_0xe824('0x21'));_0x52db29(_0x26738a['result']['message']);}})['catch'](function(_0x56df86){logger[_0xe824('0x25')](_0xe824('0x27'),_0x398e32,_0x56df86);_0x12f984(_0x56df86);});});}function respondWithStatusCode(_0x17e012,_0x5f493a){_0x5f493a=_0x5f493a||0xcc;return function(_0x48d102){if(_0x48d102){return _0x17e012[_0xe824('0x29')](_0x5f493a);}return _0x17e012[_0xe824('0x2a')](_0x5f493a)['end']();};}function respondWithResult(_0x1f321e,_0x1ea7a2){_0x1ea7a2=_0x1ea7a2||0xc8;return function(_0x7f700b){if(_0x7f700b){return _0x1f321e[_0xe824('0x2a')](_0x1ea7a2)[_0xe824('0x2b')](_0x7f700b);}};}function respondWithFilteredResult(_0x46815b,_0x4ed100){return function(_0x4f18c9){if(_0x4f18c9){var _0x317cfc=typeof _0x4ed100[_0xe824('0x2c')]===_0xe824('0x2d')&&typeof _0x4ed100[_0xe824('0x2e')]===_0xe824('0x2d');var _0x46a09f=_0x4f18c9[_0xe824('0x2f')];var _0x38992a=_0x317cfc?0x0:_0x4ed100[_0xe824('0x2c')];var _0x173d28=_0x317cfc?_0x4f18c9['count']:_0x4ed100[_0xe824('0x2c')]+_0x4ed100[_0xe824('0x2e')];var _0x51ee24;if(_0x173d28>=_0x46a09f){_0x173d28=_0x46a09f;_0x51ee24=0xc8;}else{_0x51ee24=0xce;}_0x46815b[_0xe824('0x2a')](_0x51ee24);return _0x46815b[_0xe824('0x30')]('Content-Range',_0x38992a+'-'+_0x173d28+'/'+_0x46a09f)['json'](_0x4f18c9);}return null;};}function patchUpdates(_0x572b9a){return function(_0x3c5afd){try{jsonpatch[_0xe824('0x31')](_0x3c5afd,_0x572b9a,!![]);}catch(_0x4209a8){return BPromise['reject'](_0x4209a8);}return _0x3c5afd['save']();};}function saveUpdates(_0x2c2a49,_0x10a623){return function(_0x463b11){if(_0x463b11){return _0x463b11[_0xe824('0x32')](_0x2c2a49)['then'](function(_0x39db74){return _0x39db74;});}return null;};}function removeEntity(_0x4611b1,_0x2fd49d){return function(_0x1ede9e){if(_0x1ede9e){return _0x1ede9e[_0xe824('0x33')]()[_0xe824('0x1f')](function(){_0x4611b1['status'](0xcc)[_0xe824('0x34')]();});}};}function handleEntityNotFound(_0x2320e5,_0x8807f2){return function(_0x2e84b7){if(!_0x2e84b7){_0x2320e5['sendStatus'](0x194);}return _0x2e84b7;};}function handleError(_0x59ebee,_0x5a5d18){_0x5a5d18=_0x5a5d18||0x1f4;return function(_0x298f42){logger[_0xe824('0x25')](_0x298f42[_0xe824('0x35')]);if(_0x298f42[_0xe824('0x36')]){delete _0x298f42[_0xe824('0x36')];}_0x59ebee[_0xe824('0x2a')](_0x5a5d18)[_0xe824('0x37')](_0x298f42);};}exports[_0xe824('0x38')]=function(_0x6c2b12,_0x5d6ed8){var _0x32d07f={},_0x48242d={},_0x51f28f={'count':0x0,'rows':[]};var _0x1ee45c=_[_0xe824('0x39')](db[_0xe824('0x3a')][_0xe824('0x3b')],function(_0x290dec){return{'name':_0x290dec[_0xe824('0x3c')],'type':_0x290dec[_0xe824('0x3d')][_0xe824('0x3e')]};});_0x48242d[_0xe824('0x3f')]=_[_0xe824('0x39')](_0x1ee45c,_0xe824('0x36'));_0x48242d['query']=_['keys'](_0x6c2b12['query']);_0x48242d[_0xe824('0x40')]=_[_0xe824('0x41')](_0x48242d[_0xe824('0x3f')],_0x48242d[_0xe824('0x42')]);_0x32d07f['attributes']=_[_0xe824('0x41')](_0x48242d[_0xe824('0x3f')],qs[_0xe824('0x43')](_0x6c2b12[_0xe824('0x42')][_0xe824('0x43')]));_0x32d07f['attributes']=_0x32d07f['attributes']['length']?_0x32d07f[_0xe824('0x44')]:_0x48242d[_0xe824('0x3f')];if(!_0x6c2b12[_0xe824('0x42')][_0xe824('0x45')](_0xe824('0x46'))){_0x32d07f[_0xe824('0x2e')]=qs[_0xe824('0x2e')](_0x6c2b12[_0xe824('0x42')][_0xe824('0x2e')]);_0x32d07f[_0xe824('0x2c')]=qs[_0xe824('0x2c')](_0x6c2b12[_0xe824('0x42')]['offset']);}_0x32d07f[_0xe824('0x47')]=qs[_0xe824('0x48')](_0x6c2b12[_0xe824('0x42')][_0xe824('0x48')]);_0x32d07f[_0xe824('0x49')]=qs[_0xe824('0x40')](_['pick'](_0x6c2b12[_0xe824('0x42')],_0x48242d[_0xe824('0x40')]),_0x1ee45c);if(_0x6c2b12[_0xe824('0x42')]['filter']){_0x32d07f['where']=_['merge'](_0x32d07f[_0xe824('0x49')],{'$or':_[_0xe824('0x39')](_0x1ee45c,function(_0x9e3f9f){if(_0x9e3f9f[_0xe824('0x3d')]!=='VIRTUAL'){var _0x30e1b9={};_0x30e1b9[_0x9e3f9f[_0xe824('0x36')]]={'$like':'%'+_0x6c2b12[_0xe824('0x42')]['filter']+'%'};return _0x30e1b9;}})});}_0x32d07f=_['merge']({},_0x32d07f,_0x6c2b12[_0xe824('0x4a')]);var _0x291677={'where':_0x32d07f['where']};return db[_0xe824('0x3a')][_0xe824('0x2f')](_0x291677)[_0xe824('0x1f')](function(_0x11dfcf){_0x51f28f['count']=_0x11dfcf;if(_0x6c2b12[_0xe824('0x42')][_0xe824('0x4b')]){_0x32d07f['include']=[{'all':!![]}];}return db[_0xe824('0x3a')][_0xe824('0x4c')](_0x32d07f);})[_0xe824('0x1f')](function(_0x589af3){_0x51f28f[_0xe824('0x4d')]=_0x589af3;return _0x51f28f;})['then'](respondWithFilteredResult(_0x5d6ed8,_0x32d07f))[_0xe824('0x4e')](handleError(_0x5d6ed8,null));};exports[_0xe824('0x4f')]=function(_0x1ae222,_0x447dfc){var _0x33d156={'raw':![],'where':{'id':_0x1ae222[_0xe824('0x50')]['id']}},_0x5cb8af={};_0x5cb8af[_0xe824('0x3f')]=_[_0xe824('0x51')](db[_0xe824('0x3a')][_0xe824('0x3b')]);_0x5cb8af[_0xe824('0x42')]=_[_0xe824('0x51')](_0x1ae222[_0xe824('0x42')]);_0x5cb8af[_0xe824('0x40')]=_[_0xe824('0x41')](_0x5cb8af[_0xe824('0x3f')],_0x5cb8af[_0xe824('0x42')]);_0x33d156[_0xe824('0x44')]=_[_0xe824('0x41')](_0x5cb8af[_0xe824('0x3f')],qs[_0xe824('0x43')](_0x1ae222[_0xe824('0x42')]['fields']));_0x33d156['attributes']=_0x33d156[_0xe824('0x44')][_0xe824('0x52')]?_0x33d156[_0xe824('0x44')]:_0x5cb8af[_0xe824('0x3f')];if(_0x1ae222[_0xe824('0x42')][_0xe824('0x4b')]){_0x33d156[_0xe824('0x53')]=[{'all':!![]}];}_0x33d156=_[_0xe824('0x54')]({},_0x33d156,_0x1ae222[_0xe824('0x4a')]);return db[_0xe824('0x3a')][_0xe824('0x55')](_0x33d156)[_0xe824('0x1f')](handleEntityNotFound(_0x447dfc,null))[_0xe824('0x1f')](respondWithResult(_0x447dfc,null))[_0xe824('0x4e')](handleError(_0x447dfc,null));};exports[_0xe824('0x56')]=function(_0x5a57c1,_0x4db058){return db[_0xe824('0x3a')]['create'](_0x5a57c1[_0xe824('0x57')],{})[_0xe824('0x1f')](respondWithResult(_0x4db058,0xc9))[_0xe824('0x4e')](handleError(_0x4db058,null));};exports[_0xe824('0x32')]=function(_0x17e923,_0x4279f1){if(_0x17e923[_0xe824('0x57')]['id']){delete _0x17e923[_0xe824('0x57')]['id'];}return db[_0xe824('0x3a')][_0xe824('0x55')]({'where':{'id':_0x17e923['params']['id']}})[_0xe824('0x1f')](handleEntityNotFound(_0x4279f1,null))['then'](saveUpdates(_0x17e923['body'],null))[_0xe824('0x1f')](respondWithResult(_0x4279f1,null))[_0xe824('0x4e')](handleError(_0x4279f1,null));};exports[_0xe824('0x33')]=function(_0x1a2059,_0x142c3d){return db[_0xe824('0x3a')][_0xe824('0x55')]({'where':{'id':_0x1a2059[_0xe824('0x50')]['id']}})[_0xe824('0x1f')](handleEntityNotFound(_0x142c3d,null))['then'](removeEntity(_0x142c3d,null))[_0xe824('0x4e')](handleError(_0x142c3d,null));};exports[_0xe824('0x58')]=function(_0x3ac99e,_0x124f48,_0x3d75a1){var _0x30a4d={};var _0x34becc={};var _0x369cc4;var _0x3dd475;return db[_0xe824('0x3a')][_0xe824('0x59')]({'where':{'id':_0x3ac99e[_0xe824('0x50')]['id']}})['then'](handleEntityNotFound(_0x124f48,null))[_0xe824('0x1f')](function(_0x378b3a){if(_0x378b3a){_0x369cc4=_0x378b3a;_0x34becc[_0xe824('0x3f')]=_[_0xe824('0x51')](db[_0xe824('0x5a')][_0xe824('0x3b')]);_0x34becc[_0xe824('0x42')]=_[_0xe824('0x51')](_0x3ac99e[_0xe824('0x42')]);_0x34becc[_0xe824('0x40')]=_[_0xe824('0x41')](_0x34becc[_0xe824('0x3f')],_0x34becc[_0xe824('0x42')]);_0x30a4d['attributes']=_[_0xe824('0x41')](_0x34becc[_0xe824('0x3f')],qs['fields'](_0x3ac99e[_0xe824('0x42')][_0xe824('0x43')]));_0x30a4d['attributes']=_0x30a4d[_0xe824('0x44')][_0xe824('0x52')]?_0x30a4d['attributes']:_0x34becc[_0xe824('0x3f')];_0x30a4d[_0xe824('0x47')]=qs[_0xe824('0x48')](_0x3ac99e['query'][_0xe824('0x48')]);_0x30a4d['where']=qs['filters'](_[_0xe824('0x5b')](_0x3ac99e['query'],_0x34becc[_0xe824('0x40')]));if(_0x3ac99e['query'][_0xe824('0x5c')]){_0x30a4d[_0xe824('0x49')]=_[_0xe824('0x54')](_0x30a4d[_0xe824('0x49')],{'$or':_[_0xe824('0x39')](_0x30a4d[_0xe824('0x44')],function(_0x5e996b){var _0x48712e={};_0x48712e[_0x5e996b]={'$like':'%'+_0x3ac99e[_0xe824('0x42')][_0xe824('0x5c')]+'%'};return _0x48712e;})});}_0x30a4d=_['merge']({},_0x30a4d,_0x3ac99e[_0xe824('0x4a')]);return _0x369cc4[_0xe824('0x58')](_0x30a4d);}})[_0xe824('0x1f')](function(_0x5037e5){if(_0x5037e5){_0x3dd475=_0x5037e5[_0xe824('0x52')];if(!_0x3ac99e[_0xe824('0x42')][_0xe824('0x45')](_0xe824('0x46'))){_0x30a4d[_0xe824('0x2e')]=qs[_0xe824('0x2e')](_0x3ac99e[_0xe824('0x42')][_0xe824('0x2e')]);_0x30a4d[_0xe824('0x2c')]=qs[_0xe824('0x2c')](_0x3ac99e[_0xe824('0x42')][_0xe824('0x2c')]);}return _0x369cc4[_0xe824('0x58')](_0x30a4d);}})[_0xe824('0x1f')](function(_0x3625a7){if(_0x3625a7){return _0x3625a7?{'count':_0x3dd475,'rows':_0x3625a7}:null;}})[_0xe824('0x1f')](respondWithResult(_0x124f48,null))[_0xe824('0x4e')](handleError(_0x124f48,null));};exports[_0xe824('0x5d')]=function(_0x203731,_0x2e2b50,_0x521c64){var _0x5982cf={};var _0x238987={};var _0x4a30fe;var _0x49ef6e;return db['ServicenowConfiguration']['findOne']({'where':{'id':_0x203731[_0xe824('0x50')]['id']}})[_0xe824('0x1f')](handleEntityNotFound(_0x2e2b50,null))[_0xe824('0x1f')](function(_0x5cde30){if(_0x5cde30){_0x4a30fe=_0x5cde30;_0x238987[_0xe824('0x3f')]=_[_0xe824('0x51')](db['ServicenowField'][_0xe824('0x3b')]);_0x238987[_0xe824('0x42')]=_[_0xe824('0x51')](_0x203731[_0xe824('0x42')]);_0x238987[_0xe824('0x40')]=_[_0xe824('0x41')](_0x238987['model'],_0x238987[_0xe824('0x42')]);_0x5982cf[_0xe824('0x44')]=_[_0xe824('0x41')](_0x238987[_0xe824('0x3f')],qs[_0xe824('0x43')](_0x203731[_0xe824('0x42')][_0xe824('0x43')]));_0x5982cf[_0xe824('0x44')]=_0x5982cf[_0xe824('0x44')][_0xe824('0x52')]?_0x5982cf[_0xe824('0x44')]:_0x238987[_0xe824('0x3f')];_0x5982cf[_0xe824('0x47')]=qs[_0xe824('0x48')](_0x203731[_0xe824('0x42')][_0xe824('0x48')]);_0x5982cf[_0xe824('0x49')]=qs[_0xe824('0x40')](_[_0xe824('0x5b')](_0x203731[_0xe824('0x42')],_0x238987[_0xe824('0x40')]));if(_0x203731['query'][_0xe824('0x5c')]){_0x5982cf[_0xe824('0x49')]=_[_0xe824('0x54')](_0x5982cf[_0xe824('0x49')],{'$or':_['map'](_0x5982cf[_0xe824('0x44')],function(_0x48954){var _0x641bd5={};_0x641bd5[_0x48954]={'$like':'%'+_0x203731[_0xe824('0x42')]['filter']+'%'};return _0x641bd5;})});}_0x5982cf=_[_0xe824('0x54')]({},_0x5982cf,_0x203731[_0xe824('0x4a')]);return _0x4a30fe[_0xe824('0x5d')](_0x5982cf);}})[_0xe824('0x1f')](function(_0x2feaf5){if(_0x2feaf5){_0x49ef6e=_0x2feaf5[_0xe824('0x52')];if(!_0x203731['query'][_0xe824('0x45')](_0xe824('0x46'))){_0x5982cf['limit']=qs[_0xe824('0x2e')](_0x203731[_0xe824('0x42')][_0xe824('0x2e')]);_0x5982cf['offset']=qs[_0xe824('0x2c')](_0x203731['query'][_0xe824('0x2c')]);}return _0x4a30fe[_0xe824('0x5d')](_0x5982cf);}})[_0xe824('0x1f')](function(_0x1a5318){if(_0x1a5318){return _0x1a5318?{'count':_0x49ef6e,'rows':_0x1a5318}:null;}})['then'](respondWithResult(_0x2e2b50,null))[_0xe824('0x4e')](handleError(_0x2e2b50,null));};exports[_0xe824('0x5e')]=function(_0x2e5907,_0x3ef388,_0x18a298){var _0x403a4c={};var _0x579ec3={};var _0x55010e;var _0x5e11f9;return db[_0xe824('0x3a')]['findOne']({'where':{'id':_0x2e5907[_0xe824('0x50')]['id']}})[_0xe824('0x1f')](handleEntityNotFound(_0x3ef388,null))[_0xe824('0x1f')](function(_0x544588){if(_0x544588){_0x55010e=_0x544588;_0x579ec3['model']=_[_0xe824('0x51')](db[_0xe824('0x5a')][_0xe824('0x3b')]);_0x579ec3[_0xe824('0x42')]=_[_0xe824('0x51')](_0x2e5907[_0xe824('0x42')]);_0x579ec3[_0xe824('0x40')]=_['intersection'](_0x579ec3[_0xe824('0x3f')],_0x579ec3[_0xe824('0x42')]);_0x403a4c[_0xe824('0x44')]=_[_0xe824('0x41')](_0x579ec3[_0xe824('0x3f')],qs['fields'](_0x2e5907[_0xe824('0x42')]['fields']));_0x403a4c[_0xe824('0x44')]=_0x403a4c['attributes'][_0xe824('0x52')]?_0x403a4c[_0xe824('0x44')]:_0x579ec3[_0xe824('0x3f')];_0x403a4c[_0xe824('0x47')]=qs[_0xe824('0x48')](_0x2e5907[_0xe824('0x42')][_0xe824('0x48')]);_0x403a4c[_0xe824('0x49')]=qs[_0xe824('0x40')](_[_0xe824('0x5b')](_0x2e5907[_0xe824('0x42')],_0x579ec3[_0xe824('0x40')]));if(_0x2e5907['query'][_0xe824('0x5c')]){_0x403a4c['where']=_[_0xe824('0x54')](_0x403a4c[_0xe824('0x49')],{'$or':_[_0xe824('0x39')](_0x403a4c['attributes'],function(_0x2c9faf){var _0x38306e={};_0x38306e[_0x2c9faf]={'$like':'%'+_0x2e5907['query'][_0xe824('0x5c')]+'%'};return _0x38306e;})});}_0x403a4c=_[_0xe824('0x54')]({},_0x403a4c,_0x2e5907[_0xe824('0x4a')]);return _0x55010e[_0xe824('0x5e')](_0x403a4c);}})['then'](function(_0x470067){if(_0x470067){_0x5e11f9=_0x470067[_0xe824('0x52')];if(!_0x2e5907[_0xe824('0x42')][_0xe824('0x45')](_0xe824('0x46'))){_0x403a4c[_0xe824('0x2e')]=qs['limit'](_0x2e5907[_0xe824('0x42')][_0xe824('0x2e')]);_0x403a4c[_0xe824('0x2c')]=qs[_0xe824('0x2c')](_0x2e5907[_0xe824('0x42')]['offset']);}return _0x55010e[_0xe824('0x5e')](_0x403a4c);}})['then'](function(_0x31ad33){if(_0x31ad33){return _0x31ad33?{'count':_0x5e11f9,'rows':_0x31ad33}:null;}})[_0xe824('0x1f')](respondWithResult(_0x3ef388,null))[_0xe824('0x4e')](handleError(_0x3ef388,null));}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js index 08b2811..22a9ea8 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 _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 +var _0x3f8c=['exports','define','ServicenowConfiguration','int_servicenow_configurations','../../config/logger','api','moment','bluebird'];(function(_0x22b68a,_0x2bffc3){var _0x1ac67a=function(_0x25f9d5){while(--_0x25f9d5){_0x22b68a['push'](_0x22b68a['shift']());}};_0x1ac67a(++_0x2bffc3);}(_0x3f8c,0x104));var _0xc3f8=function(_0x1cad94,_0x539ec7){_0x1cad94=_0x1cad94-0x0;var _0x3a959c=_0x3f8c[_0x1cad94];return _0x3a959c;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xc3f8('0x0'))(_0xc3f8('0x1'));var moment=require(_0xc3f8('0x2'));var BPromise=require(_0xc3f8('0x3'));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('./intServicenowConfiguration.attributes');module[_0xc3f8('0x4')]=function(_0x1a6976,_0x3a4e2f){return _0x1a6976[_0xc3f8('0x5')](_0xc3f8('0x6'),attributes,{'tableName':_0xc3f8('0x7'),'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 6beee5a..f9abca8 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 _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 +var _0xc492=['jayson/promise','http','request','then','info','request\x20sent','error','ServicenowConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis','../../config/logger','rpc'];(function(_0x555b1d,_0x239b1b){var _0x4e97ee=function(_0x119715){while(--_0x119715){_0x555b1d['push'](_0x555b1d['shift']());}};_0x4e97ee(++_0x239b1b);}(_0xc492,0xd7));var _0x2c49=function(_0x5a81e4,_0x3b79cc){_0x5a81e4=_0x5a81e4-0x0;var _0x658ae9=_0xc492[_0x5a81e4];return _0x658ae9;};'use strict';var _=require(_0x2c49('0x0'));var util=require(_0x2c49('0x1'));var moment=require(_0x2c49('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2c49('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2c49('0x4'))(_0x2c49('0x5'));var config=require('../../config/environment');var jayson=require(_0x2c49('0x6'));var client=jayson['client'][_0x2c49('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x9c10f7,_0x4c76dd,_0xe7b4cb){return new BPromise(function(_0x17f596,_0x26f8c1){return client[_0x2c49('0x8')](_0x9c10f7,_0xe7b4cb)[_0x2c49('0x9')](function(_0x5684e5){logger[_0x2c49('0xa')]('ServicenowConfiguration,\x20%s,\x20%s',_0x4c76dd,'request\x20sent');logger['debug']('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x4c76dd,_0x2c49('0xb'),JSON['stringify'](_0x5684e5));if(_0x5684e5[_0x2c49('0xc')]){if(_0x5684e5[_0x2c49('0xc')]['code']===0x1f4){logger[_0x2c49('0xc')](_0x2c49('0xd'),_0x4c76dd,_0x5684e5[_0x2c49('0xc')][_0x2c49('0xe')]);return _0x26f8c1(_0x5684e5[_0x2c49('0xc')][_0x2c49('0xe')]);}logger['error'](_0x2c49('0xd'),_0x4c76dd,_0x5684e5[_0x2c49('0xc')][_0x2c49('0xe')]);return _0x17f596(_0x5684e5[_0x2c49('0xc')][_0x2c49('0xe')]);}else{logger['info'](_0x2c49('0xd'),_0x4c76dd,_0x2c49('0xb'));_0x17f596(_0x5684e5[_0x2c49('0xf')][_0x2c49('0xe')]);}})[_0x2c49('0x10')](function(_0x88e972){logger[_0x2c49('0xc')](_0x2c49('0xd'),_0x4c76dd,_0x88e972);_0x26f8c1(_0x88e972);});});} \ No newline at end of file diff --git a/server/api/intServicenowField/index.js b/server/api/intServicenowField/index.js index 9cdef71..be6756a 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 _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 +var _0x0036=['express','fs-extra','../../components/auth/service','../../components/interaction/service','./intServicenowField.controller','get','isAuthenticated','index','/:id','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x45fe42,_0x1aa6a0){var _0x1cdae0=function(_0x1f9a75){while(--_0x1f9a75){_0x45fe42['push'](_0x45fe42['shift']());}};_0x1cdae0(++_0x1aa6a0);}(_0x0036,0xac));var _0x6003=function(_0x3a85f2,_0x2ea4b6){_0x3a85f2=_0x3a85f2-0x0;var _0x4a1bb2=_0x0036[_0x3a85f2];return _0x4a1bb2;};'use strict';var multer=require(_0x6003('0x0'));var util=require(_0x6003('0x1'));var path=require(_0x6003('0x2'));var timeout=require(_0x6003('0x3'));var express=require(_0x6003('0x4'));var router=express['Router']();var fs_extra=require(_0x6003('0x5'));var auth=require(_0x6003('0x6'));var interaction=require(_0x6003('0x7'));var config=require('../../config/environment');var controller=require(_0x6003('0x8'));router[_0x6003('0x9')]('/',auth[_0x6003('0xa')](),controller[_0x6003('0xb')]);router[_0x6003('0x9')](_0x6003('0xc'),auth[_0x6003('0xa')](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x6003('0xc'),auth[_0x6003('0xa')](),controller['update']);router[_0x6003('0xd')](_0x6003('0xc'),auth[_0x6003('0xa')](),controller[_0x6003('0xe')]);module[_0x6003('0xf')]=router; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.attributes.js b/server/api/intServicenowField/intServicenowField.attributes.js index 931a0b0..573a8f4 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 _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 +var _0xed93=['string','variable','customVariable','keyValue','picklist','STRING','sequelize'];(function(_0x1a744f,_0x3146a1){var _0x3a2228=function(_0x365379){while(--_0x365379){_0x1a744f['push'](_0x1a744f['shift']());}};_0x3a2228(++_0x3146a1);}(_0xed93,0x84));var _0x3ed9=function(_0x109cdb,_0x2864e1){_0x109cdb=_0x109cdb-0x0;var _0x35dab8=_0xed93[_0x109cdb];return _0x35dab8;};'use strict';var Sequelize=require(_0x3ed9('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x3ed9('0x1'),_0x3ed9('0x2'),_0x3ed9('0x3'),_0x3ed9('0x4'),_0x3ed9('0x5')),'defaultValue':_0x3ed9('0x1')},'content':{'type':Sequelize[_0x3ed9('0x6')]},'key':{'type':Sequelize[_0x3ed9('0x6')]},'keyType':{'type':Sequelize['ENUM']('string',_0x3ed9('0x2'),'customVariable')},'keyContent':{'type':Sequelize[_0x3ed9('0x6')]},'idField':{'type':Sequelize[_0x3ed9('0x6')]},'nameField':{'type':Sequelize[_0x3ed9('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.controller.js b/server/api/intServicenowField/intServicenowField.controller.js index bb2e71a..0229312 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 _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 +var _0xacfa=['rawAttributes','fieldName','type','model','name','query','keys','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','ServicenowField','count','include','rows','show','intersection','includeAll','find','catch','body','destroy','params','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','Content-Range','apply','reject','save','update','then','error','stack','send','index','map'];(function(_0xed0640,_0x57b209){var _0x3cf9db=function(_0x45c0ac){while(--_0x45c0ac){_0xed0640['push'](_0xed0640['shift']());}};_0x3cf9db(++_0x57b209);}(_0xacfa,0xf0));var _0xaacf=function(_0x6aaf7a,_0x2ddf35){_0x6aaf7a=_0x6aaf7a-0x0;var _0x522e20=_0xacfa[_0x6aaf7a];return _0x522e20;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xaacf('0x0'));var moment=require(_0xaacf('0x1'));var BPromise=require(_0xaacf('0x2'));var Mustache=require(_0xaacf('0x3'));var util=require(_0xaacf('0x4'));var path=require(_0xaacf('0x5'));var sox=require(_0xaacf('0x6'));var csv=require(_0xaacf('0x7'));var ejs=require(_0xaacf('0x8'));var fs=require('fs');var fs_extra=require(_0xaacf('0x9'));var _=require(_0xaacf('0xa'));var squel=require('squel');var crypto=require(_0xaacf('0xb'));var jsforce=require(_0xaacf('0xc'));var deskjs=require(_0xaacf('0xd'));var toCsv=require(_0xaacf('0x7'));var querystring=require('querystring');var Papa=require(_0xaacf('0xe'));var Redis=require(_0xaacf('0xf'));var authService=require(_0xaacf('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xaacf('0x11'));var hardwareService=require(_0xaacf('0x12'));var logger=require('../../config/logger')(_0xaacf('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xaacf('0x14'));var db=require(_0xaacf('0x15'))['db'];function respondWithStatusCode(_0x271ae0,_0x5a688a){_0x5a688a=_0x5a688a||0xcc;return function(_0x34eeee){if(_0x34eeee){return _0x271ae0[_0xaacf('0x16')](_0x5a688a);}return _0x271ae0[_0xaacf('0x17')](_0x5a688a)[_0xaacf('0x18')]();};}function respondWithResult(_0x3dcf46,_0x244d6f){_0x244d6f=_0x244d6f||0xc8;return function(_0x47ce2f){if(_0x47ce2f){return _0x3dcf46[_0xaacf('0x17')](_0x244d6f)[_0xaacf('0x19')](_0x47ce2f);}};}function respondWithFilteredResult(_0x2e342e,_0x578e46){return function(_0x194473){if(_0x194473){var _0x5837b6=typeof _0x578e46[_0xaacf('0x1a')]===_0xaacf('0x1b')&&typeof _0x578e46[_0xaacf('0x1c')]===_0xaacf('0x1b');var _0x43d2b7=_0x194473['count'];var _0x2a0d8a=_0x5837b6?0x0:_0x578e46[_0xaacf('0x1a')];var _0x38f6a5=_0x5837b6?_0x194473['count']:_0x578e46[_0xaacf('0x1a')]+_0x578e46[_0xaacf('0x1c')];var _0x2bb6b0;if(_0x38f6a5>=_0x43d2b7){_0x38f6a5=_0x43d2b7;_0x2bb6b0=0xc8;}else{_0x2bb6b0=0xce;}_0x2e342e['status'](_0x2bb6b0);return _0x2e342e['set'](_0xaacf('0x1d'),_0x2a0d8a+'-'+_0x38f6a5+'/'+_0x43d2b7)[_0xaacf('0x19')](_0x194473);}return null;};}function patchUpdates(_0x551acc){return function(_0x1c86d9){try{jsonpatch[_0xaacf('0x1e')](_0x1c86d9,_0x551acc,!![]);}catch(_0x210312){return BPromise[_0xaacf('0x1f')](_0x210312);}return _0x1c86d9[_0xaacf('0x20')]();};}function saveUpdates(_0x3e733c,_0x12bb12){return function(_0x198021){if(_0x198021){return _0x198021[_0xaacf('0x21')](_0x3e733c)[_0xaacf('0x22')](function(_0x2a9a7c){return _0x2a9a7c;});}return null;};}function removeEntity(_0x59bac9,_0x494b82){return function(_0x5d941d){if(_0x5d941d){return _0x5d941d['destroy']()['then'](function(){_0x59bac9[_0xaacf('0x17')](0xcc)[_0xaacf('0x18')]();});}};}function handleEntityNotFound(_0x1f1a79,_0x2c9865){return function(_0xf69cd5){if(!_0xf69cd5){_0x1f1a79['sendStatus'](0x194);}return _0xf69cd5;};}function handleError(_0xc85fc,_0x55aa1b){_0x55aa1b=_0x55aa1b||0x1f4;return function(_0x30e344){logger[_0xaacf('0x23')](_0x30e344[_0xaacf('0x24')]);if(_0x30e344['name']){delete _0x30e344['name'];}_0xc85fc['status'](_0x55aa1b)[_0xaacf('0x25')](_0x30e344);};}exports[_0xaacf('0x26')]=function(_0x1bb838,_0x1b4d15){var _0x3c3549={},_0x490a34={},_0xbbfd6c={'count':0x0,'rows':[]};var _0x379e86=_[_0xaacf('0x27')](db['ServicenowField'][_0xaacf('0x28')],function(_0x646518){return{'name':_0x646518[_0xaacf('0x29')],'type':_0x646518[_0xaacf('0x2a')]['key']};});_0x490a34[_0xaacf('0x2b')]=_[_0xaacf('0x27')](_0x379e86,_0xaacf('0x2c'));_0x490a34[_0xaacf('0x2d')]=_[_0xaacf('0x2e')](_0x1bb838[_0xaacf('0x2d')]);_0x490a34['filters']=_['intersection'](_0x490a34[_0xaacf('0x2b')],_0x490a34[_0xaacf('0x2d')]);_0x3c3549[_0xaacf('0x2f')]=_['intersection'](_0x490a34[_0xaacf('0x2b')],qs[_0xaacf('0x30')](_0x1bb838['query'][_0xaacf('0x30')]));_0x3c3549[_0xaacf('0x2f')]=_0x3c3549[_0xaacf('0x2f')]['length']?_0x3c3549[_0xaacf('0x2f')]:_0x490a34[_0xaacf('0x2b')];if(!_0x1bb838[_0xaacf('0x2d')][_0xaacf('0x31')](_0xaacf('0x32'))){_0x3c3549[_0xaacf('0x1c')]=qs[_0xaacf('0x1c')](_0x1bb838[_0xaacf('0x2d')][_0xaacf('0x1c')]);_0x3c3549[_0xaacf('0x1a')]=qs[_0xaacf('0x1a')](_0x1bb838[_0xaacf('0x2d')][_0xaacf('0x1a')]);}_0x3c3549[_0xaacf('0x33')]=qs[_0xaacf('0x34')](_0x1bb838[_0xaacf('0x2d')][_0xaacf('0x34')]);_0x3c3549[_0xaacf('0x35')]=qs['filters'](_['pick'](_0x1bb838['query'],_0x490a34[_0xaacf('0x36')]),_0x379e86);if(_0x1bb838[_0xaacf('0x2d')][_0xaacf('0x37')]){_0x3c3549[_0xaacf('0x35')]=_[_0xaacf('0x38')](_0x3c3549[_0xaacf('0x35')],{'$or':_[_0xaacf('0x27')](_0x379e86,function(_0x190c9b){if(_0x190c9b[_0xaacf('0x2a')]!==_0xaacf('0x39')){var _0x244ed7={};_0x244ed7[_0x190c9b['name']]={'$like':'%'+_0x1bb838['query'][_0xaacf('0x37')]+'%'};return _0x244ed7;}})});}_0x3c3549=_[_0xaacf('0x38')]({},_0x3c3549,_0x1bb838['options']);var _0xfae266={'where':_0x3c3549[_0xaacf('0x35')]};return db[_0xaacf('0x3a')][_0xaacf('0x3b')](_0xfae266)[_0xaacf('0x22')](function(_0x35f32e){_0xbbfd6c['count']=_0x35f32e;if(_0x1bb838[_0xaacf('0x2d')]['includeAll']){_0x3c3549[_0xaacf('0x3c')]=[{'all':!![]}];}return db[_0xaacf('0x3a')]['findAll'](_0x3c3549);})[_0xaacf('0x22')](function(_0x54fc68){_0xbbfd6c[_0xaacf('0x3d')]=_0x54fc68;return _0xbbfd6c;})[_0xaacf('0x22')](respondWithFilteredResult(_0x1b4d15,_0x3c3549))['catch'](handleError(_0x1b4d15,null));};exports[_0xaacf('0x3e')]=function(_0x28d340,_0x33e2b1){var _0x4cbb82={'raw':!![],'where':{'id':_0x28d340['params']['id']}},_0x3f320c={};_0x3f320c[_0xaacf('0x2b')]=_[_0xaacf('0x2e')](db[_0xaacf('0x3a')][_0xaacf('0x28')]);_0x3f320c[_0xaacf('0x2d')]=_['keys'](_0x28d340[_0xaacf('0x2d')]);_0x3f320c[_0xaacf('0x36')]=_[_0xaacf('0x3f')](_0x3f320c[_0xaacf('0x2b')],_0x3f320c[_0xaacf('0x2d')]);_0x4cbb82['attributes']=_['intersection'](_0x3f320c[_0xaacf('0x2b')],qs[_0xaacf('0x30')](_0x28d340[_0xaacf('0x2d')][_0xaacf('0x30')]));_0x4cbb82[_0xaacf('0x2f')]=_0x4cbb82[_0xaacf('0x2f')]['length']?_0x4cbb82[_0xaacf('0x2f')]:_0x3f320c[_0xaacf('0x2b')];if(_0x28d340['query'][_0xaacf('0x40')]){_0x4cbb82[_0xaacf('0x3c')]=[{'all':!![]}];}_0x4cbb82=_[_0xaacf('0x38')]({},_0x4cbb82,_0x28d340['options']);return db[_0xaacf('0x3a')][_0xaacf('0x41')](_0x4cbb82)['then'](handleEntityNotFound(_0x33e2b1,null))[_0xaacf('0x22')](respondWithResult(_0x33e2b1,null))[_0xaacf('0x42')](handleError(_0x33e2b1,null));};exports['create']=function(_0x4988f5,_0x129bcb){return db['ServicenowField']['create'](_0x4988f5[_0xaacf('0x43')],{})['then'](respondWithResult(_0x129bcb,0xc9))['catch'](handleError(_0x129bcb,null));};exports[_0xaacf('0x21')]=function(_0x30d0a3,_0x3a3996){if(_0x30d0a3['body']['id']){delete _0x30d0a3['body']['id'];}return db[_0xaacf('0x3a')][_0xaacf('0x41')]({'where':{'id':_0x30d0a3['params']['id']}})[_0xaacf('0x22')](handleEntityNotFound(_0x3a3996,null))[_0xaacf('0x22')](saveUpdates(_0x30d0a3[_0xaacf('0x43')],null))['then'](respondWithResult(_0x3a3996,null))[_0xaacf('0x42')](handleError(_0x3a3996,null));};exports[_0xaacf('0x44')]=function(_0x4968a0,_0x5ae497){return db[_0xaacf('0x3a')][_0xaacf('0x41')]({'where':{'id':_0x4968a0[_0xaacf('0x45')]['id']}})[_0xaacf('0x22')](handleEntityNotFound(_0x5ae497,null))[_0xaacf('0x22')](removeEntity(_0x5ae497,null))[_0xaacf('0x42')](handleError(_0x5ae497,null));}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.model.js b/server/api/intServicenowField/intServicenowField.model.js index 2d2df70..065df77 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 _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 +var _0x85d0=['../../config/logger','api','bluebird','request-promise','path','../../config/environment','./intServicenowField.attributes','exports','ServicenowField','int_servicenow_fields','servicenow_unique_index','idField','FieldId'];(function(_0x794207,_0x54a989){var _0x4ee1c9=function(_0x136ea4){while(--_0x136ea4){_0x794207['push'](_0x794207['shift']());}};_0x4ee1c9(++_0x54a989);}(_0x85d0,0x145));var _0x085d=function(_0x4bf4d3,_0x63f10f){_0x4bf4d3=_0x4bf4d3-0x0;var _0x4b1c7a=_0x85d0[_0x4bf4d3];return _0x4b1c7a;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x085d('0x0'))(_0x085d('0x1'));var moment=require('moment');var BPromise=require(_0x085d('0x2'));var rp=require(_0x085d('0x3'));var fs=require('fs');var path=require(_0x085d('0x4'));var rimraf=require('rimraf');var config=require(_0x085d('0x5'));var attributes=require(_0x085d('0x6'));module[_0x085d('0x7')]=function(_0x11e729,_0x2fc2d3){return _0x11e729['define'](_0x085d('0x8'),attributes,{'tableName':_0x085d('0x9'),'paranoid':![],'indexes':[{'name':_0x085d('0xa'),'fields':[_0x085d('0xb'),_0x085d('0xc')],'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 3d3ad43..e7cc00a 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 _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 +var _0x9ffd=['ServicenowField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','ServicenowField,\x20%s,\x20%s','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','debug'];(function(_0x240f6e,_0x5c4133){var _0x1e7bc7=function(_0x3da895){while(--_0x3da895){_0x240f6e['push'](_0x240f6e['shift']());}};_0x1e7bc7(++_0x5c4133);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x25998e,_0x585e85){_0x25998e=_0x25998e-0x0;var _0x510fd5=_0x9ffd[_0x25998e];return _0x510fd5;};'use strict';var _=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var moment=require(_0xd9ff('0x2'));var BPromise=require('bluebird');var rs=require(_0xd9ff('0x3'));var fs=require('fs');var Redis=require(_0xd9ff('0x4'));var db=require(_0xd9ff('0x5'))['db'];var utils=require(_0xd9ff('0x6'));var logger=require('../../config/logger')(_0xd9ff('0x7'));var config=require(_0xd9ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9ff('0x9')][_0xd9ff('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x13ea8c,_0x270eb2,_0x45c60a){return new BPromise(function(_0x66282d,_0x13954e){return client[_0xd9ff('0xb')](_0x13ea8c,_0x45c60a)[_0xd9ff('0xc')](function(_0x58e728){logger['info']('ServicenowField,\x20%s,\x20%s',_0x270eb2,'request\x20sent');logger[_0xd9ff('0xd')](_0xd9ff('0xe'),_0x270eb2,_0xd9ff('0xf'),JSON[_0xd9ff('0x10')](_0x58e728));if(_0x58e728[_0xd9ff('0x11')]){if(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x12')]===0x1f4){logger[_0xd9ff('0x11')]('ServicenowField,\x20%s,\x20%s',_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x13954e(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x13')]);}logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x66282d(_0x58e728[_0xd9ff('0x11')]['message']);}else{logger[_0xd9ff('0x15')]('ServicenowField,\x20%s,\x20%s',_0x270eb2,'request\x20sent');_0x66282d(_0x58e728['result']['message']);}})[_0xd9ff('0x16')](function(_0x4f9d6d){logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x4f9d6d);_0x13954e(_0x4f9d6d);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/index.js b/server/api/intSugarcrmAccount/index.js index d3babff..95cb7ef 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(_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 +var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x506a7f,_0x5c5b26){var _0xe552ee=function(_0x2a8719){while(--_0x2a8719){_0x506a7f['push'](_0x506a7f['shift']());}};_0xe552ee(++_0x5c5b26);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'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 diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js index 22ebda4..e0f2427 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(_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 +var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x5817e4,_0x57a3b9){var _0x1b840d=function(_0xf0c43a){while(--_0xf0c43a){_0x5817e4['push'](_0x5817e4['shift']());}};_0x1b840d(++_0x57a3b9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0xa9e0[_0x4709c0];return _0x13348b;};'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 5f224fa..d763caf 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 _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 +var _0xf23e=['debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','sendStatus','stack','name','send','map','SugarcrmAccount','rawAttributes','type','keys','query','filters','intersection','model','attributes','fields','length','nolimit','sort','where','pick','filter','merge','options','includeAll','include','catch','show','params','create','body','find','getConfigurations','SugarcrmConfiguration','addConfiguration','findOne','AccountId','getSubjects','channel','Descriptions','getDescriptions','SugarcrmField','Subjects','getFields','created_by','description','duration_hours','parent_type','parent_name','username','password','remoteUri','slice','substring','lastIndexOf','POST','%s%s','/service/v4_1/rest.php','JSON','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','Password\x20Expired','format','get_module_fields','values','module_fields','label','endsWith','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent'];(function(_0x36fbd4,_0x2bc694){var _0x2d25a2=function(_0x21a08a){while(--_0x21a08a){_0x36fbd4['push'](_0x36fbd4['shift']());}};_0x2d25a2(++_0x2bc694);}(_0xf23e,0xd2));var _0xef23=function(_0x2070da,_0x45e586){_0x2070da=_0x2070da-0x0;var _0x4f9fe1=_0xf23e[_0x2070da];return _0x4f9fe1;};'use strict';var emlformat=require(_0xef23('0x0'));var rimraf=require(_0xef23('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xef23('0x2'));var rp=require(_0xef23('0x3'));var moment=require(_0xef23('0x4'));var BPromise=require(_0xef23('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xef23('0x6'));var sox=require(_0xef23('0x7'));var csv=require(_0xef23('0x8'));var ejs=require(_0xef23('0x9'));var fs=require('fs');var fs_extra=require(_0xef23('0xa'));var _=require(_0xef23('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xef23('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xef23('0x8'));var querystring=require(_0xef23('0xd'));var Papa=require(_0xef23('0xe'));var Redis=require(_0xef23('0xf'));var authService=require(_0xef23('0x10'));var qs=require(_0xef23('0x11'));var as=require(_0xef23('0x12'));var hardwareService=require(_0xef23('0x13'));var logger=require('../../config/logger')(_0xef23('0x14'));var utils=require(_0xef23('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xef23('0x16'));var db=require(_0xef23('0x17'))['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0xef23('0x18'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x508e1b,_0x7a300c,_0x4d9186,_0x447557){return new BPromise(function(_0x36a81f,_0x13df3b){var _0x253cf6=_0x447557||client;return _0x253cf6['request'](_0x508e1b,_0x4d9186)['then'](function(_0x4a1ffd){logger[_0xef23('0x19')](_0xef23('0x1a'),_0x7a300c,_0xef23('0x1b'));logger[_0xef23('0x1c')](_0xef23('0x1d'),_0x7a300c,_0xef23('0x1b'),JSON[_0xef23('0x1e')](_0x4a1ffd));if(_0x4a1ffd[_0xef23('0x1f')]){if(_0x4a1ffd[_0xef23('0x1f')][_0xef23('0x20')]===0x1f4){logger[_0xef23('0x1f')](_0xef23('0x1a'),_0x7a300c,_0x4a1ffd[_0xef23('0x1f')]['message']);return _0x13df3b(_0x4a1ffd[_0xef23('0x1f')][_0xef23('0x21')]);}logger[_0xef23('0x1f')](_0xef23('0x1a'),_0x7a300c,_0x4a1ffd[_0xef23('0x1f')][_0xef23('0x21')]);return _0x36a81f(_0x4a1ffd[_0xef23('0x1f')]['message']);}else{logger[_0xef23('0x19')](_0xef23('0x1a'),_0x7a300c,_0xef23('0x1b'));_0x36a81f(_0x4a1ffd[_0xef23('0x22')][_0xef23('0x21')]);}})['catch'](function(_0x266257){logger[_0xef23('0x1f')]('SugarcrmAccount,\x20%s,\x20%s',_0x7a300c,_0x266257);_0x13df3b(_0x266257);});});}function respondWithStatusCode(_0x3fff6c,_0x14ee02){_0x14ee02=_0x14ee02||0xcc;return function(_0x198eff){if(_0x198eff){return _0x3fff6c['sendStatus'](_0x14ee02);}return _0x3fff6c[_0xef23('0x23')](_0x14ee02)[_0xef23('0x24')]();};}function respondWithResult(_0x2ecbc8,_0x46dfa7){_0x46dfa7=_0x46dfa7||0xc8;return function(_0x5d3f5d){if(_0x5d3f5d){return _0x2ecbc8[_0xef23('0x23')](_0x46dfa7)[_0xef23('0x25')](_0x5d3f5d);}};}function respondWithFilteredResult(_0x26972c,_0x42fc3a){return function(_0x3461ef){if(_0x3461ef){var _0x6c7226=typeof _0x42fc3a[_0xef23('0x26')]===_0xef23('0x27')&&typeof _0x42fc3a[_0xef23('0x28')]==='undefined';var _0xc88cc6=_0x3461ef[_0xef23('0x29')];var _0x3c3f1f=_0x6c7226?0x0:_0x42fc3a[_0xef23('0x26')];var _0x3d94d2=_0x6c7226?_0x3461ef[_0xef23('0x29')]:_0x42fc3a[_0xef23('0x26')]+_0x42fc3a[_0xef23('0x28')];var _0x35b796;if(_0x3d94d2>=_0xc88cc6){_0x3d94d2=_0xc88cc6;_0x35b796=0xc8;}else{_0x35b796=0xce;}_0x26972c[_0xef23('0x23')](_0x35b796);return _0x26972c['set'](_0xef23('0x2a'),_0x3c3f1f+'-'+_0x3d94d2+'/'+_0xc88cc6)[_0xef23('0x25')](_0x3461ef);}return null;};}function patchUpdates(_0x3f9f84){return function(_0x4ef74f){try{jsonpatch[_0xef23('0x2b')](_0x4ef74f,_0x3f9f84,!![]);}catch(_0x59115b){return BPromise[_0xef23('0x2c')](_0x59115b);}return _0x4ef74f['save']();};}function saveUpdates(_0x711e6a,_0x10cad1){return function(_0x321bf4){if(_0x321bf4){return _0x321bf4[_0xef23('0x2d')](_0x711e6a)[_0xef23('0x2e')](function(_0x545f82){return _0x545f82;});}return null;};}function removeEntity(_0xbf238d,_0x149868){return function(_0x5e474e){if(_0x5e474e){return _0x5e474e['destroy']()[_0xef23('0x2e')](function(){_0xbf238d[_0xef23('0x23')](0xcc)[_0xef23('0x24')]();});}};}function handleEntityNotFound(_0x3f744e,_0x40a5e6){return function(_0x4fe39f){if(!_0x4fe39f){_0x3f744e[_0xef23('0x2f')](0x194);}return _0x4fe39f;};}function handleError(_0x1e5b9d,_0x3529d2){_0x3529d2=_0x3529d2||0x1f4;return function(_0x495ca8){logger['error'](_0x495ca8[_0xef23('0x30')]);if(_0x495ca8[_0xef23('0x31')]){delete _0x495ca8[_0xef23('0x31')];}_0x1e5b9d[_0xef23('0x23')](_0x3529d2)[_0xef23('0x32')](_0x495ca8);};}exports['index']=function(_0xe18113,_0x4e6e91){var _0xd7b81a={},_0x15e9f9={},_0x10d988={'count':0x0,'rows':[]};var _0x4ed3a7=_[_0xef23('0x33')](db[_0xef23('0x34')][_0xef23('0x35')],function(_0x59a9a7){return{'name':_0x59a9a7['fieldName'],'type':_0x59a9a7[_0xef23('0x36')]['key']};});_0x15e9f9['model']=_[_0xef23('0x33')](_0x4ed3a7,_0xef23('0x31'));_0x15e9f9['query']=_[_0xef23('0x37')](_0xe18113[_0xef23('0x38')]);_0x15e9f9[_0xef23('0x39')]=_[_0xef23('0x3a')](_0x15e9f9[_0xef23('0x3b')],_0x15e9f9[_0xef23('0x38')]);_0xd7b81a[_0xef23('0x3c')]=_[_0xef23('0x3a')](_0x15e9f9[_0xef23('0x3b')],qs[_0xef23('0x3d')](_0xe18113[_0xef23('0x38')]['fields']));_0xd7b81a['attributes']=_0xd7b81a[_0xef23('0x3c')][_0xef23('0x3e')]?_0xd7b81a[_0xef23('0x3c')]:_0x15e9f9[_0xef23('0x3b')];if(!_0xe18113[_0xef23('0x38')]['hasOwnProperty'](_0xef23('0x3f'))){_0xd7b81a[_0xef23('0x28')]=qs[_0xef23('0x28')](_0xe18113[_0xef23('0x38')][_0xef23('0x28')]);_0xd7b81a[_0xef23('0x26')]=qs['offset'](_0xe18113[_0xef23('0x38')][_0xef23('0x26')]);}_0xd7b81a['order']=qs[_0xef23('0x40')](_0xe18113[_0xef23('0x38')][_0xef23('0x40')]);_0xd7b81a[_0xef23('0x41')]=qs[_0xef23('0x39')](_[_0xef23('0x42')](_0xe18113[_0xef23('0x38')],_0x15e9f9[_0xef23('0x39')]),_0x4ed3a7);if(_0xe18113[_0xef23('0x38')][_0xef23('0x43')]){_0xd7b81a[_0xef23('0x41')]=_['merge'](_0xd7b81a['where'],{'$or':_[_0xef23('0x33')](_0x4ed3a7,function(_0x431e96){if(_0x431e96[_0xef23('0x36')]!=='VIRTUAL'){var _0x1fc676={};_0x1fc676[_0x431e96['name']]={'$like':'%'+_0xe18113[_0xef23('0x38')][_0xef23('0x43')]+'%'};return _0x1fc676;}})});}_0xd7b81a=_[_0xef23('0x44')]({},_0xd7b81a,_0xe18113[_0xef23('0x45')]);var _0x187cca={'where':_0xd7b81a[_0xef23('0x41')]};return db[_0xef23('0x34')]['count'](_0x187cca)[_0xef23('0x2e')](function(_0x282659){_0x10d988[_0xef23('0x29')]=_0x282659;if(_0xe18113[_0xef23('0x38')][_0xef23('0x46')]){_0xd7b81a[_0xef23('0x47')]=[{'all':!![]}];}return db['SugarcrmAccount']['findAll'](_0xd7b81a);})[_0xef23('0x2e')](function(_0x3188cf){_0x10d988['rows']=_0x3188cf;return _0x10d988;})[_0xef23('0x2e')](respondWithFilteredResult(_0x4e6e91,_0xd7b81a))[_0xef23('0x48')](handleError(_0x4e6e91,null));};exports[_0xef23('0x49')]=function(_0x55348e,_0x8867b1){var _0x3cdacb={'raw':![],'where':{'id':_0x55348e[_0xef23('0x4a')]['id']}},_0x4804db={};_0x4804db['model']=_['keys'](db[_0xef23('0x34')][_0xef23('0x35')]);_0x4804db[_0xef23('0x38')]=_[_0xef23('0x37')](_0x55348e[_0xef23('0x38')]);_0x4804db[_0xef23('0x39')]=_[_0xef23('0x3a')](_0x4804db[_0xef23('0x3b')],_0x4804db[_0xef23('0x38')]);_0x3cdacb[_0xef23('0x3c')]=_[_0xef23('0x3a')](_0x4804db[_0xef23('0x3b')],qs['fields'](_0x55348e[_0xef23('0x38')][_0xef23('0x3d')]));_0x3cdacb['attributes']=_0x3cdacb[_0xef23('0x3c')][_0xef23('0x3e')]?_0x3cdacb['attributes']:_0x4804db[_0xef23('0x3b')];if(_0x55348e['query']['includeAll']){_0x3cdacb['include']=[{'all':!![]}];}_0x3cdacb=_['merge']({},_0x3cdacb,_0x55348e['options']);return db['SugarcrmAccount']['find'](_0x3cdacb)['then'](handleEntityNotFound(_0x8867b1,null))[_0xef23('0x2e')](respondWithResult(_0x8867b1,null))[_0xef23('0x48')](handleError(_0x8867b1,null));};exports[_0xef23('0x4b')]=function(_0x4aff5d,_0x3325ba){return db[_0xef23('0x34')]['create'](_0x4aff5d[_0xef23('0x4c')],{})[_0xef23('0x2e')](respondWithResult(_0x3325ba,0xc9))[_0xef23('0x48')](handleError(_0x3325ba,null));};exports[_0xef23('0x2d')]=function(_0x376022,_0x2f6740){if(_0x376022['body']['id']){delete _0x376022['body']['id'];}return db['SugarcrmAccount']['find']({'where':{'id':_0x376022['params']['id']}})['then'](handleEntityNotFound(_0x2f6740,null))[_0xef23('0x2e')](saveUpdates(_0x376022[_0xef23('0x4c')],null))['then'](respondWithResult(_0x2f6740,null))['catch'](handleError(_0x2f6740,null));};exports['destroy']=function(_0x3886b0,_0xca6d20){return db[_0xef23('0x34')][_0xef23('0x4d')]({'where':{'id':_0x3886b0['params']['id']}})['then'](handleEntityNotFound(_0xca6d20,null))[_0xef23('0x2e')](removeEntity(_0xca6d20,null))[_0xef23('0x48')](handleError(_0xca6d20,null));};exports[_0xef23('0x4e')]=function(_0x49765a,_0xee1d72,_0x52c966){var _0x93bf82={};var _0x2e12f7={};var _0x3405b6;var _0x33867e;return db[_0xef23('0x34')]['findOne']({'where':{'id':_0x49765a['params']['id']}})[_0xef23('0x2e')](handleEntityNotFound(_0xee1d72,null))['then'](function(_0x35da7b){if(_0x35da7b){_0x3405b6=_0x35da7b;_0x2e12f7[_0xef23('0x3b')]=_['keys'](db[_0xef23('0x4f')][_0xef23('0x35')]);_0x2e12f7[_0xef23('0x38')]=_[_0xef23('0x37')](_0x49765a[_0xef23('0x38')]);_0x2e12f7['filters']=_['intersection'](_0x2e12f7[_0xef23('0x3b')],_0x2e12f7[_0xef23('0x38')]);_0x93bf82['attributes']=_[_0xef23('0x3a')](_0x2e12f7[_0xef23('0x3b')],qs[_0xef23('0x3d')](_0x49765a[_0xef23('0x38')][_0xef23('0x3d')]));_0x93bf82[_0xef23('0x3c')]=_0x93bf82[_0xef23('0x3c')][_0xef23('0x3e')]?_0x93bf82['attributes']:_0x2e12f7[_0xef23('0x3b')];_0x93bf82['order']=qs[_0xef23('0x40')](_0x49765a[_0xef23('0x38')][_0xef23('0x40')]);_0x93bf82[_0xef23('0x41')]=qs['filters'](_['pick'](_0x49765a[_0xef23('0x38')],_0x2e12f7['filters']));if(_0x49765a[_0xef23('0x38')][_0xef23('0x43')]){_0x93bf82[_0xef23('0x41')]=_[_0xef23('0x44')](_0x93bf82[_0xef23('0x41')],{'$or':_[_0xef23('0x33')](_0x93bf82[_0xef23('0x3c')],function(_0x39c92a){var _0x36ee33={};_0x36ee33[_0x39c92a]={'$like':'%'+_0x49765a[_0xef23('0x38')]['filter']+'%'};return _0x36ee33;})});}_0x93bf82=_['merge']({},_0x93bf82,_0x49765a['options']);return _0x3405b6[_0xef23('0x4e')](_0x93bf82);}})['then'](function(_0x4e1345){if(_0x4e1345){_0x33867e=_0x4e1345[_0xef23('0x3e')];if(!_0x49765a[_0xef23('0x38')]['hasOwnProperty'](_0xef23('0x3f'))){_0x93bf82[_0xef23('0x28')]=qs[_0xef23('0x28')](_0x49765a[_0xef23('0x38')]['limit']);_0x93bf82['offset']=qs[_0xef23('0x26')](_0x49765a[_0xef23('0x38')][_0xef23('0x26')]);}return _0x3405b6[_0xef23('0x4e')](_0x93bf82);}})[_0xef23('0x2e')](function(_0x49c038){if(_0x49c038){return _0x49c038?{'count':_0x33867e,'rows':_0x49c038}:null;}})[_0xef23('0x2e')](respondWithResult(_0xee1d72,null))['catch'](handleError(_0xee1d72,null));};exports[_0xef23('0x50')]=function(_0x56e2d4,_0x2b3d59,_0x313116){if(_0x56e2d4[_0xef23('0x4c')]['id']){delete _0x56e2d4['body']['id'];}return db['SugarcrmAccount'][_0xef23('0x51')]({'where':{'id':_0x56e2d4[_0xef23('0x4a')]['id']}})[_0xef23('0x2e')](handleEntityNotFound(_0x2b3d59,null))[_0xef23('0x2e')](function(_0x503c2f){if(_0x503c2f){_0x56e2d4[_0xef23('0x4c')][_0xef23('0x52')]=_0x503c2f['id'];_0x56e2d4[_0xef23('0x4c')]['Subjects']=integrations[_0xef23('0x53')](_0x56e2d4[_0xef23('0x4c')][_0xef23('0x54')],_0x56e2d4[_0xef23('0x4c')]['type']);_0x56e2d4['body'][_0xef23('0x55')]=integrations[_0xef23('0x56')](_0x56e2d4[_0xef23('0x4c')]['channel'],_0x56e2d4['body'][_0xef23('0x36')]);return db['SugarcrmConfiguration'][_0xef23('0x4b')](_0x56e2d4[_0xef23('0x4c')],{'include':[{'model':db[_0xef23('0x57')],'as':_0xef23('0x58')},{'model':db['SugarcrmField'],'as':_0xef23('0x55')}]});}return null;})['then'](respondWithResult(_0x2b3d59,null))[_0xef23('0x48')](handleError(_0x2b3d59,null));};exports[_0xef23('0x59')]=function(_0x27deed,_0x1fe649,_0x496ebd){var _0x374a33='';var _0x4dadc6=['id',_0xef23('0x31'),'assigned_user_id',_0xef23('0x5a'),_0xef23('0x5b'),'date_start',_0xef23('0x5c'),'duration_minutes','parent_id',_0xef23('0x5d'),_0xef23('0x5e'),'direction'];return db[_0xef23('0x34')]['findOne']({'where':{'id':_0x27deed[_0xef23('0x4a')]['id']},'attributes':['id',_0xef23('0x5f'),_0xef23('0x60'),'remoteUri']})[_0xef23('0x2e')](handleEntityNotFound(_0x1fe649,null))[_0xef23('0x2e')](function(_0x3dacad){if(_0x3dacad){_0x374a33=_0x3dacad[_0xef23('0x61')];var _0x139a00=_0x374a33[_0xef23('0x62')](-0x1);if(_0x139a00==='/'){_0x374a33=_0x374a33[_0xef23('0x63')](0x0,_0x374a33[_0xef23('0x64')](_0x139a00));}return rp({'method':_0xef23('0x65'),'uri':util['format'](_0xef23('0x66'),_0x374a33,_0xef23('0x67')),'json':!![],'form':{'method':'login','input_type':_0xef23('0x68'),'response_type':'JSON','rest_data':JSON[_0xef23('0x1e')]({'user_auth':{'user_name':_0x3dacad[_0xef23('0x5f')],'password':_0x3dacad[_0xef23('0x60')],'encryption':_0xef23('0x69')},'application':_0xef23('0x6a')})}});}})['then'](function(_0x814375){if(_0x814375&&_0x814375[_0xef23('0x31')]!==_0xef23('0x6b')&&_0x814375[_0xef23('0x31')]!==_0xef23('0x6c')){return rp({'method':_0xef23('0x65'),'uri':util[_0xef23('0x6d')]('%s%s',_0x374a33,_0xef23('0x67')),'json':!![],'form':{'method':_0xef23('0x6e'),'input_type':'JSON','response_type':_0xef23('0x68'),'rest_data':JSON[_0xef23('0x1e')]({'session':_0x814375['id'],'module_name':'Calls'})}})[_0xef23('0x2e')](function(_0x41cbe1){if(_0x41cbe1){var _0x3b10d0=_[_0xef23('0x6f')](_0x41cbe1[_0xef23('0x70')]);_['remove'](_0x3b10d0,function(_0x56e877){return _0x4dadc6['includes'](_0x56e877[_0xef23('0x31')]);});return{'count':_0x3b10d0[_0xef23('0x3e')],'rows':_['map'](_0x3b10d0,function(_0x2ed647){return{'id':_0x2ed647[_0xef23('0x31')],'name':_0x2ed647[_0xef23('0x71')],'custom':_[_0xef23('0x72')](_0x2ed647[_0xef23('0x31')],'_c')?!![]:![],'options':_0x2ed647[_0xef23('0x45')]?_[_0xef23('0x33')](_[_0xef23('0x6f')](_0x2ed647['options']),function(_0xfd1b6c){return{'name':_0xfd1b6c['value'],'value':_0xfd1b6c[_0xef23('0x31')]};}):[]};})};}})[_0xef23('0x2e')](respondWithResult(_0x1fe649,null))[_0xef23('0x48')](function(_0xb0cb4){var _0x23d36d=_0x27deed[_0xef23('0x38')][_0xef23('0x73')]?0x1f4:_0xb0cb4[_0xef23('0x74')]||0x1f4;logger[_0xef23('0x1f')](_0xef23('0x75'),'getFields',_0x23d36d,JSON[_0xef23('0x1e')](_0xb0cb4));delete _0xb0cb4['name'];if(_0x23d36d===0x191){_0x23d36d=0x190;}_0x1fe649['status'](_0x23d36d)['send'](_0x27deed[_0xef23('0x38')][_0xef23('0x73')]?{'message':_0xef23('0x76'),'statusCode':_0xb0cb4[_0xef23('0x74')]}:_0xb0cb4);});}else{var _0x56b727=0x1f4;_0x1fe649[_0xef23('0x23')](_0x56b727)['send']({'message':_0xef23('0x76'),'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 f1d043d..b2d5389 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 _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 +var _0x3625=['../../components/integrations/configuration','exports','define','SugarcrmAccount','int_sugarcrm_accounts','lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','./intSugarcrmAccount.attributes'];(function(_0x4980dd,_0x11be6d){var _0x175759=function(_0x3c49d3){while(--_0x3c49d3){_0x4980dd['push'](_0x4980dd['shift']());}};_0x175759(++_0x11be6d);}(_0x3625,0x18d));var _0x5362=function(_0xb6ead6,_0x3d63fe){_0xb6ead6=_0xb6ead6-0x0;var _0x4b76a2=_0x3625[_0xb6ead6];return _0x4b76a2;};'use strict';var _=require(_0x5362('0x0'));var util=require(_0x5362('0x1'));var logger=require('../../config/logger')(_0x5362('0x2'));var moment=require(_0x5362('0x3'));var BPromise=require(_0x5362('0x4'));var rp=require(_0x5362('0x5'));var fs=require('fs');var path=require(_0x5362('0x6'));var rimraf=require('rimraf');var config=require(_0x5362('0x7'));var attributes=require(_0x5362('0x8'));var integrations=require(_0x5362('0x9'));module[_0x5362('0xa')]=function(_0x125030,_0x24ca16){return _0x125030[_0x5362('0xb')](_0x5362('0xc'),attributes,{'tableName':_0x5362('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 496fde0..bd29d4e 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 _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 +var _0xfa55=['rpc','../../config/environment','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','SugarcrmAccount','findAll','options','raw','where','attributes','include','map','model','GetSugarcrmAccount','ShowSugarcrmAccount','find','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x3da832,_0x2133f1){var _0xe602f2=function(_0xb7b2f){while(--_0xb7b2f){_0x3da832['push'](_0x3da832['shift']());}};_0xe602f2(++_0x2133f1);}(_0xfa55,0x184));var _0x5fa5=function(_0x1a1f8e,_0x2dfbdd){_0x1a1f8e=_0x1a1f8e-0x0;var _0x4daf8b=_0xfa55[_0x1a1f8e];return _0x4daf8b;};'use strict';var _=require(_0x5fa5('0x0'));var util=require(_0x5fa5('0x1'));var moment=require(_0x5fa5('0x2'));var BPromise=require('bluebird');var rs=require(_0x5fa5('0x3'));var fs=require('fs');var Redis=require(_0x5fa5('0x4'));var db=require(_0x5fa5('0x5'))['db'];var utils=require(_0x5fa5('0x6'));var logger=require(_0x5fa5('0x7'))(_0x5fa5('0x8'));var config=require(_0x5fa5('0x9'));var jayson=require(_0x5fa5('0xa'));var client=jayson[_0x5fa5('0xb')][_0x5fa5('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x588258,_0x367c86,_0x154adb){return new BPromise(function(_0x5dbaba,_0x4bf5c9){return client[_0x5fa5('0xd')](_0x588258,_0x154adb)[_0x5fa5('0xe')](function(_0x524d89){logger[_0x5fa5('0xf')](_0x5fa5('0x10'),_0x367c86,_0x5fa5('0x11'));logger[_0x5fa5('0x12')](_0x5fa5('0x13'),_0x367c86,_0x5fa5('0x11'),JSON[_0x5fa5('0x14')](_0x524d89));if(_0x524d89[_0x5fa5('0x15')]){if(_0x524d89[_0x5fa5('0x15')][_0x5fa5('0x16')]===0x1f4){logger[_0x5fa5('0x15')]('SugarcrmAccount,\x20%s,\x20%s',_0x367c86,_0x524d89[_0x5fa5('0x15')][_0x5fa5('0x17')]);return _0x4bf5c9(_0x524d89[_0x5fa5('0x15')][_0x5fa5('0x17')]);}logger[_0x5fa5('0x15')](_0x5fa5('0x10'),_0x367c86,_0x524d89[_0x5fa5('0x15')][_0x5fa5('0x17')]);return _0x5dbaba(_0x524d89['error']['message']);}else{logger[_0x5fa5('0xf')](_0x5fa5('0x10'),_0x367c86,_0x5fa5('0x11'));_0x5dbaba(_0x524d89['result'][_0x5fa5('0x17')]);}})['catch'](function(_0x4f380a){logger[_0x5fa5('0x15')](_0x5fa5('0x10'),_0x367c86,_0x4f380a);_0x4bf5c9(_0x4f380a);});});}exports['GetSugarcrmAccount']=function(_0x56096e){var _0x4bc353=this;return new Promise(function(_0x4aaf8d,_0x5e5c00){return db[_0x5fa5('0x18')][_0x5fa5('0x19')]({'raw':_0x56096e[_0x5fa5('0x1a')]?_0x56096e[_0x5fa5('0x1a')][_0x5fa5('0x1b')]===undefined?!![]:![]:!![],'where':_0x56096e[_0x5fa5('0x1a')]?_0x56096e['options'][_0x5fa5('0x1c')]||null:null,'attributes':_0x56096e['options']?_0x56096e['options'][_0x5fa5('0x1d')]||null:null,'limit':_0x56096e[_0x5fa5('0x1a')]?_0x56096e[_0x5fa5('0x1a')]['limit']||null:null,'include':_0x56096e[_0x5fa5('0x1a')]?_0x56096e[_0x5fa5('0x1a')][_0x5fa5('0x1e')]?_[_0x5fa5('0x1f')](_0x56096e['options'][_0x5fa5('0x1e')],function(_0x3b2313){return{'model':db[_0x3b2313[_0x5fa5('0x20')]],'as':_0x3b2313['as'],'attributes':_0x3b2313[_0x5fa5('0x1d')],'include':_0x3b2313[_0x5fa5('0x1e')]?_[_0x5fa5('0x1f')](_0x3b2313[_0x5fa5('0x1e')],function(_0x88c7cf){return{'model':db[_0x88c7cf[_0x5fa5('0x20')]],'as':_0x88c7cf['as'],'attributes':_0x88c7cf[_0x5fa5('0x1d')],'include':_0x88c7cf[_0x5fa5('0x1e')]?_[_0x5fa5('0x1f')](_0x88c7cf[_0x5fa5('0x1e')],function(_0x47a1e0){return{'model':db[_0x47a1e0['model']],'as':_0x47a1e0['as'],'attributes':_0x47a1e0[_0x5fa5('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5fa5('0xe')](function(_0x50a473){logger[_0x5fa5('0xf')]('GetSugarcrmAccount',_0x56096e);logger[_0x5fa5('0x12')]('GetSugarcrmAccount',_0x56096e,JSON['stringify'](_0x50a473));_0x4aaf8d(_0x50a473);})['catch'](function(_0x1c8c6d){logger['error'](_0x5fa5('0x21'),_0x1c8c6d['message'],_0x56096e);_0x5e5c00(_0x4bc353['error'](0x1f4,_0x1c8c6d[_0x5fa5('0x17')]));});});};exports[_0x5fa5('0x22')]=function(_0x332a78){var _0x543fd9=this;return new Promise(function(_0x32c0db,_0x9d5d85){return db[_0x5fa5('0x18')][_0x5fa5('0x23')]({'raw':_0x332a78[_0x5fa5('0x1a')]?_0x332a78[_0x5fa5('0x1a')][_0x5fa5('0x1b')]===undefined?!![]:![]:!![],'where':_0x332a78[_0x5fa5('0x1a')]?_0x332a78[_0x5fa5('0x1a')][_0x5fa5('0x1c')]||null:null,'attributes':_0x332a78[_0x5fa5('0x1a')]?_0x332a78[_0x5fa5('0x1a')][_0x5fa5('0x1d')]||null:null,'include':_0x332a78['options']?_0x332a78[_0x5fa5('0x1a')][_0x5fa5('0x1e')]?_[_0x5fa5('0x1f')](_0x332a78[_0x5fa5('0x1a')]['include'],function(_0x153e5d){return{'model':db[_0x153e5d[_0x5fa5('0x20')]],'as':_0x153e5d['as'],'attributes':_0x153e5d[_0x5fa5('0x1d')],'include':_0x153e5d[_0x5fa5('0x1e')]?_[_0x5fa5('0x1f')](_0x153e5d['include'],function(_0x2c776a){return{'model':db[_0x2c776a['model']],'as':_0x2c776a['as'],'attributes':_0x2c776a[_0x5fa5('0x1d')],'include':_0x2c776a['include']?_['map'](_0x2c776a[_0x5fa5('0x1e')],function(_0x16c327){return{'model':db[_0x16c327['model']],'as':_0x16c327['as'],'attributes':_0x16c327[_0x5fa5('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5fa5('0xe')](function(_0x5188cd){logger[_0x5fa5('0xf')](_0x5fa5('0x22'),_0x332a78);logger[_0x5fa5('0x12')](_0x5fa5('0x22'),_0x332a78,JSON['stringify'](_0x5188cd));_0x32c0db(_0x5188cd);})['catch'](function(_0x14f288){logger[_0x5fa5('0x15')](_0x5fa5('0x22'),_0x14f288[_0x5fa5('0x17')],_0x332a78);_0x9d5d85(_0x543fd9[_0x5fa5('0x15')](0x1f4,_0x14f288[_0x5fa5('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/index.js b/server/api/intSugarcrmConfiguration/index.js index 46a570d..93f4771 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 _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 +var _0x13e8=['path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','/:id/fields','getFields','getDescriptions','post','update','delete','destroy','exports','multer'];(function(_0xf0dee7,_0x319bc2){var _0x5b3696=function(_0x1d70ca){while(--_0x1d70ca){_0xf0dee7['push'](_0xf0dee7['shift']());}};_0x5b3696(++_0x319bc2);}(_0x13e8,0x8b));var _0x813e=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x13e8[_0x59ee6f];return _0x4c0979;};'use strict';var multer=require(_0x813e('0x0'));var util=require('util');var path=require(_0x813e('0x1'));var timeout=require(_0x813e('0x2'));var express=require('express');var router=express[_0x813e('0x3')]();var fs_extra=require(_0x813e('0x4'));var auth=require(_0x813e('0x5'));var interaction=require(_0x813e('0x6'));var config=require(_0x813e('0x7'));var controller=require('./intSugarcrmConfiguration.controller');router[_0x813e('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x813e('0x8')](_0x813e('0x9'),auth[_0x813e('0xa')](),controller[_0x813e('0xb')]);router[_0x813e('0x8')](_0x813e('0xc'),auth[_0x813e('0xa')](),controller[_0x813e('0xd')]);router['get']('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0x813e('0x8')]('/:id/descriptions',auth[_0x813e('0xa')](),controller[_0x813e('0xe')]);router[_0x813e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x813e('0x9'),auth[_0x813e('0xa')](),controller[_0x813e('0x10')]);router[_0x813e('0x11')](_0x813e('0x9'),auth['isAuthenticated'](),controller[_0x813e('0x12')]);module[_0x813e('0x13')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js index 6dc6466..7477bd4 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 _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 +var _0x9530=['exports','STRING'];(function(_0x3dfaff,_0x579203){var _0x15c096=function(_0x229224){while(--_0x229224){_0x3dfaff['push'](_0x3dfaff['shift']());}};_0x15c096(++_0x579203);}(_0x9530,0x11a));var _0x0953=function(_0x101b78,_0x165f12){_0x101b78=_0x101b78-0x0;var _0x584370=_0x9530[_0x101b78];return _0x584370;};'use strict';var Sequelize=require('sequelize');module[_0x0953('0x0')]={'name':{'type':Sequelize[_0x0953('0x1')]},'description':{'type':Sequelize[_0x0953('0x1')]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js index 2ecf2f5..c80acdc 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 _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 +var _0xbf56=['model','map','keys','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filters','filter','VIRTUAL','options','include','findAll','rows','show','includeAll','find','create','body','update','params','destroy','getFields','findOne','SugarcrmField','pick','merge','getSubjects','getDescriptions','order','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','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/environment','../../config/license/util','../../mysqldb','jayson/promise','client','request','then','info','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','SugarcrmConfiguration,\x20%s,\x20%s','result','catch','sendStatus','end','status','json','undefined','limit','count','offset','reject','save','stack','name','send','index','SugarcrmConfiguration','rawAttributes','type','key'];(function(_0x53e12f,_0x17e9e9){var _0x2be3e2=function(_0x26cf02){while(--_0x26cf02){_0x53e12f['push'](_0x53e12f['shift']());}};_0x2be3e2(++_0x17e9e9);}(_0xbf56,0x13d));var _0x6bf5=function(_0x37bc02,_0x38aec3){_0x37bc02=_0x37bc02-0x0;var _0x5ccf9a=_0xbf56[_0x37bc02];return _0x5ccf9a;};'use strict';var emlformat=require(_0x6bf5('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6bf5('0x1'));var rp=require('request-promise');var moment=require(_0x6bf5('0x2'));var BPromise=require(_0x6bf5('0x3'));var Mustache=require(_0x6bf5('0x4'));var util=require(_0x6bf5('0x5'));var path=require(_0x6bf5('0x6'));var sox=require(_0x6bf5('0x7'));var csv=require(_0x6bf5('0x8'));var ejs=require(_0x6bf5('0x9'));var fs=require('fs');var fs_extra=require(_0x6bf5('0xa'));var _=require('lodash');var squel=require(_0x6bf5('0xb'));var crypto=require(_0x6bf5('0xc'));var jsforce=require(_0x6bf5('0xd'));var deskjs=require(_0x6bf5('0xe'));var toCsv=require(_0x6bf5('0x8'));var querystring=require('querystring');var Papa=require(_0x6bf5('0xf'));var Redis=require(_0x6bf5('0x10'));var authService=require(_0x6bf5('0x11'));var qs=require(_0x6bf5('0x12'));var as=require(_0x6bf5('0x13'));var hardwareService=require(_0x6bf5('0x14'));var logger=require(_0x6bf5('0x15'))(_0x6bf5('0x16'));var utils=require(_0x6bf5('0x17'));var config=require(_0x6bf5('0x18'));var licenseUtil=require(_0x6bf5('0x19'));var db=require(_0x6bf5('0x1a'))['db'];var jayson=require(_0x6bf5('0x1b'));var client=jayson[_0x6bf5('0x1c')]['http']({'port':0x232a});function respondWithRpcPromise(_0x49d5d8,_0x3ef66d,_0x586dd1,_0x4144c2){return new BPromise(function(_0x58143c,_0x20a74e){var _0xaa0087=_0x4144c2||client;return _0xaa0087[_0x6bf5('0x1d')](_0x49d5d8,_0x586dd1)[_0x6bf5('0x1e')](function(_0x2c2ac8){logger[_0x6bf5('0x1f')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x3ef66d,_0x6bf5('0x20'));logger[_0x6bf5('0x21')](_0x6bf5('0x22'),_0x3ef66d,_0x6bf5('0x20'),JSON['stringify'](_0x2c2ac8));if(_0x2c2ac8[_0x6bf5('0x23')]){if(_0x2c2ac8[_0x6bf5('0x23')][_0x6bf5('0x24')]===0x1f4){logger[_0x6bf5('0x23')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x3ef66d,_0x2c2ac8['error'][_0x6bf5('0x25')]);return _0x20a74e(_0x2c2ac8[_0x6bf5('0x23')][_0x6bf5('0x25')]);}logger[_0x6bf5('0x23')](_0x6bf5('0x26'),_0x3ef66d,_0x2c2ac8['error']['message']);return _0x58143c(_0x2c2ac8['error'][_0x6bf5('0x25')]);}else{logger['info'](_0x6bf5('0x26'),_0x3ef66d,'request\x20sent');_0x58143c(_0x2c2ac8[_0x6bf5('0x27')][_0x6bf5('0x25')]);}})[_0x6bf5('0x28')](function(_0x72c370){logger[_0x6bf5('0x23')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x3ef66d,_0x72c370);_0x20a74e(_0x72c370);});});}function respondWithStatusCode(_0x52bd1a,_0x15cf2b){_0x15cf2b=_0x15cf2b||0xcc;return function(_0x5161bf){if(_0x5161bf){return _0x52bd1a[_0x6bf5('0x29')](_0x15cf2b);}return _0x52bd1a['status'](_0x15cf2b)[_0x6bf5('0x2a')]();};}function respondWithResult(_0x195564,_0x4e0e78){_0x4e0e78=_0x4e0e78||0xc8;return function(_0x421c2f){if(_0x421c2f){return _0x195564[_0x6bf5('0x2b')](_0x4e0e78)[_0x6bf5('0x2c')](_0x421c2f);}};}function respondWithFilteredResult(_0x2a99e2,_0x16a3d5){return function(_0x39582a){if(_0x39582a){var _0x243adc=typeof _0x16a3d5['offset']===_0x6bf5('0x2d')&&typeof _0x16a3d5[_0x6bf5('0x2e')]===_0x6bf5('0x2d');var _0x354efe=_0x39582a[_0x6bf5('0x2f')];var _0x5504f8=_0x243adc?0x0:_0x16a3d5[_0x6bf5('0x30')];var _0x4a329d=_0x243adc?_0x39582a[_0x6bf5('0x2f')]:_0x16a3d5[_0x6bf5('0x30')]+_0x16a3d5['limit'];var _0x498d31;if(_0x4a329d>=_0x354efe){_0x4a329d=_0x354efe;_0x498d31=0xc8;}else{_0x498d31=0xce;}_0x2a99e2[_0x6bf5('0x2b')](_0x498d31);return _0x2a99e2['set']('Content-Range',_0x5504f8+'-'+_0x4a329d+'/'+_0x354efe)[_0x6bf5('0x2c')](_0x39582a);}return null;};}function patchUpdates(_0x585cce){return function(_0x4a66a3){try{jsonpatch['apply'](_0x4a66a3,_0x585cce,!![]);}catch(_0x238bf5){return BPromise[_0x6bf5('0x31')](_0x238bf5);}return _0x4a66a3[_0x6bf5('0x32')]();};}function saveUpdates(_0x4a93e7,_0x41ac86){return function(_0x5efb1d){if(_0x5efb1d){return _0x5efb1d['update'](_0x4a93e7)[_0x6bf5('0x1e')](function(_0x18a667){return _0x18a667;});}return null;};}function removeEntity(_0x5f1c10,_0x48fbd9){return function(_0x1f937b){if(_0x1f937b){return _0x1f937b['destroy']()[_0x6bf5('0x1e')](function(){_0x5f1c10['status'](0xcc)[_0x6bf5('0x2a')]();});}};}function handleEntityNotFound(_0x5b1b47,_0x161ca1){return function(_0x392082){if(!_0x392082){_0x5b1b47[_0x6bf5('0x29')](0x194);}return _0x392082;};}function handleError(_0x2074fa,_0x345c1c){_0x345c1c=_0x345c1c||0x1f4;return function(_0x55acb8){logger['error'](_0x55acb8[_0x6bf5('0x33')]);if(_0x55acb8[_0x6bf5('0x34')]){delete _0x55acb8[_0x6bf5('0x34')];}_0x2074fa['status'](_0x345c1c)[_0x6bf5('0x35')](_0x55acb8);};}exports[_0x6bf5('0x36')]=function(_0x4ca5a7,_0x41c92c){var _0x58f747={},_0x107ca9={},_0x929b21={'count':0x0,'rows':[]};var _0x15bb66=_['map'](db[_0x6bf5('0x37')][_0x6bf5('0x38')],function(_0x51d273){return{'name':_0x51d273['fieldName'],'type':_0x51d273[_0x6bf5('0x39')][_0x6bf5('0x3a')]};});_0x107ca9[_0x6bf5('0x3b')]=_[_0x6bf5('0x3c')](_0x15bb66,_0x6bf5('0x34'));_0x107ca9['query']=_[_0x6bf5('0x3d')](_0x4ca5a7[_0x6bf5('0x3e')]);_0x107ca9['filters']=_[_0x6bf5('0x3f')](_0x107ca9[_0x6bf5('0x3b')],_0x107ca9[_0x6bf5('0x3e')]);_0x58f747['attributes']=_[_0x6bf5('0x3f')](_0x107ca9[_0x6bf5('0x3b')],qs[_0x6bf5('0x40')](_0x4ca5a7[_0x6bf5('0x3e')][_0x6bf5('0x40')]));_0x58f747[_0x6bf5('0x41')]=_0x58f747[_0x6bf5('0x41')][_0x6bf5('0x42')]?_0x58f747[_0x6bf5('0x41')]:_0x107ca9['model'];if(!_0x4ca5a7['query'][_0x6bf5('0x43')](_0x6bf5('0x44'))){_0x58f747[_0x6bf5('0x2e')]=qs[_0x6bf5('0x2e')](_0x4ca5a7[_0x6bf5('0x3e')][_0x6bf5('0x2e')]);_0x58f747['offset']=qs['offset'](_0x4ca5a7[_0x6bf5('0x3e')][_0x6bf5('0x30')]);}_0x58f747['order']=qs[_0x6bf5('0x45')](_0x4ca5a7['query']['sort']);_0x58f747[_0x6bf5('0x46')]=qs[_0x6bf5('0x47')](_['pick'](_0x4ca5a7[_0x6bf5('0x3e')],_0x107ca9[_0x6bf5('0x47')]),_0x15bb66);if(_0x4ca5a7['query'][_0x6bf5('0x48')]){_0x58f747[_0x6bf5('0x46')]=_['merge'](_0x58f747[_0x6bf5('0x46')],{'$or':_[_0x6bf5('0x3c')](_0x15bb66,function(_0x500452){if(_0x500452['type']!==_0x6bf5('0x49')){var _0x7d10d3={};_0x7d10d3[_0x500452['name']]={'$like':'%'+_0x4ca5a7['query']['filter']+'%'};return _0x7d10d3;}})});}_0x58f747=_['merge']({},_0x58f747,_0x4ca5a7[_0x6bf5('0x4a')]);var _0x4de549={'where':_0x58f747[_0x6bf5('0x46')]};return db[_0x6bf5('0x37')][_0x6bf5('0x2f')](_0x4de549)[_0x6bf5('0x1e')](function(_0x542b49){_0x929b21[_0x6bf5('0x2f')]=_0x542b49;if(_0x4ca5a7[_0x6bf5('0x3e')]['includeAll']){_0x58f747[_0x6bf5('0x4b')]=[{'all':!![]}];}return db[_0x6bf5('0x37')][_0x6bf5('0x4c')](_0x58f747);})[_0x6bf5('0x1e')](function(_0x1fce48){_0x929b21[_0x6bf5('0x4d')]=_0x1fce48;return _0x929b21;})[_0x6bf5('0x1e')](respondWithFilteredResult(_0x41c92c,_0x58f747))['catch'](handleError(_0x41c92c,null));};exports[_0x6bf5('0x4e')]=function(_0x150700,_0x2f2ec4){var _0x1a6374={'raw':![],'where':{'id':_0x150700['params']['id']}},_0x180b13={};_0x180b13[_0x6bf5('0x3b')]=_[_0x6bf5('0x3d')](db[_0x6bf5('0x37')][_0x6bf5('0x38')]);_0x180b13['query']=_[_0x6bf5('0x3d')](_0x150700[_0x6bf5('0x3e')]);_0x180b13[_0x6bf5('0x47')]=_['intersection'](_0x180b13[_0x6bf5('0x3b')],_0x180b13[_0x6bf5('0x3e')]);_0x1a6374[_0x6bf5('0x41')]=_[_0x6bf5('0x3f')](_0x180b13[_0x6bf5('0x3b')],qs[_0x6bf5('0x40')](_0x150700[_0x6bf5('0x3e')]['fields']));_0x1a6374['attributes']=_0x1a6374[_0x6bf5('0x41')][_0x6bf5('0x42')]?_0x1a6374[_0x6bf5('0x41')]:_0x180b13[_0x6bf5('0x3b')];if(_0x150700[_0x6bf5('0x3e')][_0x6bf5('0x4f')]){_0x1a6374[_0x6bf5('0x4b')]=[{'all':!![]}];}_0x1a6374=_['merge']({},_0x1a6374,_0x150700[_0x6bf5('0x4a')]);return db[_0x6bf5('0x37')][_0x6bf5('0x50')](_0x1a6374)[_0x6bf5('0x1e')](handleEntityNotFound(_0x2f2ec4,null))['then'](respondWithResult(_0x2f2ec4,null))[_0x6bf5('0x28')](handleError(_0x2f2ec4,null));};exports[_0x6bf5('0x51')]=function(_0xb77673,_0xa7733a){return db[_0x6bf5('0x37')][_0x6bf5('0x51')](_0xb77673[_0x6bf5('0x52')],{})['then'](respondWithResult(_0xa7733a,0xc9))[_0x6bf5('0x28')](handleError(_0xa7733a,null));};exports[_0x6bf5('0x53')]=function(_0x190659,_0x13a6b5){if(_0x190659[_0x6bf5('0x52')]['id']){delete _0x190659[_0x6bf5('0x52')]['id'];}return db[_0x6bf5('0x37')]['find']({'where':{'id':_0x190659[_0x6bf5('0x54')]['id']}})[_0x6bf5('0x1e')](handleEntityNotFound(_0x13a6b5,null))[_0x6bf5('0x1e')](saveUpdates(_0x190659['body'],null))[_0x6bf5('0x1e')](respondWithResult(_0x13a6b5,null))[_0x6bf5('0x28')](handleError(_0x13a6b5,null));};exports[_0x6bf5('0x55')]=function(_0x4559b1,_0x4a04c5){return db['SugarcrmConfiguration'][_0x6bf5('0x50')]({'where':{'id':_0x4559b1[_0x6bf5('0x54')]['id']}})['then'](handleEntityNotFound(_0x4a04c5,null))[_0x6bf5('0x1e')](removeEntity(_0x4a04c5,null))[_0x6bf5('0x28')](handleError(_0x4a04c5,null));};exports[_0x6bf5('0x56')]=function(_0x5d45f0,_0x3efe71,_0x75403d){var _0xbfe7a3={};var _0x169c48={};var _0x451002;var _0x74910f;return db['SugarcrmConfiguration'][_0x6bf5('0x57')]({'where':{'id':_0x5d45f0['params']['id']}})[_0x6bf5('0x1e')](handleEntityNotFound(_0x3efe71,null))[_0x6bf5('0x1e')](function(_0x550261){if(_0x550261){_0x451002=_0x550261;_0x169c48['model']=_[_0x6bf5('0x3d')](db[_0x6bf5('0x58')][_0x6bf5('0x38')]);_0x169c48['query']=_[_0x6bf5('0x3d')](_0x5d45f0[_0x6bf5('0x3e')]);_0x169c48['filters']=_['intersection'](_0x169c48[_0x6bf5('0x3b')],_0x169c48[_0x6bf5('0x3e')]);_0xbfe7a3[_0x6bf5('0x41')]=_['intersection'](_0x169c48['model'],qs['fields'](_0x5d45f0[_0x6bf5('0x3e')]['fields']));_0xbfe7a3[_0x6bf5('0x41')]=_0xbfe7a3[_0x6bf5('0x41')][_0x6bf5('0x42')]?_0xbfe7a3[_0x6bf5('0x41')]:_0x169c48['model'];_0xbfe7a3['order']=qs[_0x6bf5('0x45')](_0x5d45f0[_0x6bf5('0x3e')]['sort']);_0xbfe7a3[_0x6bf5('0x46')]=qs['filters'](_[_0x6bf5('0x59')](_0x5d45f0[_0x6bf5('0x3e')],_0x169c48[_0x6bf5('0x47')]));if(_0x5d45f0[_0x6bf5('0x3e')]['filter']){_0xbfe7a3[_0x6bf5('0x46')]=_[_0x6bf5('0x5a')](_0xbfe7a3[_0x6bf5('0x46')],{'$or':_[_0x6bf5('0x3c')](_0xbfe7a3[_0x6bf5('0x41')],function(_0x3d75c0){var _0x4271ae={};_0x4271ae[_0x3d75c0]={'$like':'%'+_0x5d45f0[_0x6bf5('0x3e')]['filter']+'%'};return _0x4271ae;})});}_0xbfe7a3=_['merge']({},_0xbfe7a3,_0x5d45f0[_0x6bf5('0x4a')]);return _0x451002[_0x6bf5('0x56')](_0xbfe7a3);}})[_0x6bf5('0x1e')](function(_0x599627){if(_0x599627){_0x74910f=_0x599627[_0x6bf5('0x42')];if(!_0x5d45f0[_0x6bf5('0x3e')][_0x6bf5('0x43')](_0x6bf5('0x44'))){_0xbfe7a3[_0x6bf5('0x2e')]=qs[_0x6bf5('0x2e')](_0x5d45f0['query'][_0x6bf5('0x2e')]);_0xbfe7a3['offset']=qs[_0x6bf5('0x30')](_0x5d45f0[_0x6bf5('0x3e')][_0x6bf5('0x30')]);}return _0x451002[_0x6bf5('0x56')](_0xbfe7a3);}})['then'](function(_0x1a3a77){if(_0x1a3a77){return _0x1a3a77?{'count':_0x74910f,'rows':_0x1a3a77}:null;}})[_0x6bf5('0x1e')](respondWithResult(_0x3efe71,null))[_0x6bf5('0x28')](handleError(_0x3efe71,null));};exports[_0x6bf5('0x5b')]=function(_0x3865de,_0x36c8a9,_0x201825){var _0x5b595f={};var _0x520d4d={};var _0x532e04;var _0x1b244a;return db[_0x6bf5('0x37')][_0x6bf5('0x57')]({'where':{'id':_0x3865de['params']['id']}})['then'](handleEntityNotFound(_0x36c8a9,null))[_0x6bf5('0x1e')](function(_0x4561f4){if(_0x4561f4){_0x532e04=_0x4561f4;_0x520d4d[_0x6bf5('0x3b')]=_[_0x6bf5('0x3d')](db[_0x6bf5('0x58')]['rawAttributes']);_0x520d4d[_0x6bf5('0x3e')]=_[_0x6bf5('0x3d')](_0x3865de[_0x6bf5('0x3e')]);_0x520d4d[_0x6bf5('0x47')]=_[_0x6bf5('0x3f')](_0x520d4d[_0x6bf5('0x3b')],_0x520d4d[_0x6bf5('0x3e')]);_0x5b595f[_0x6bf5('0x41')]=_[_0x6bf5('0x3f')](_0x520d4d[_0x6bf5('0x3b')],qs[_0x6bf5('0x40')](_0x3865de[_0x6bf5('0x3e')]['fields']));_0x5b595f[_0x6bf5('0x41')]=_0x5b595f[_0x6bf5('0x41')][_0x6bf5('0x42')]?_0x5b595f['attributes']:_0x520d4d[_0x6bf5('0x3b')];_0x5b595f['order']=qs[_0x6bf5('0x45')](_0x3865de['query'][_0x6bf5('0x45')]);_0x5b595f[_0x6bf5('0x46')]=qs[_0x6bf5('0x47')](_[_0x6bf5('0x59')](_0x3865de[_0x6bf5('0x3e')],_0x520d4d[_0x6bf5('0x47')]));if(_0x3865de[_0x6bf5('0x3e')][_0x6bf5('0x48')]){_0x5b595f['where']=_['merge'](_0x5b595f[_0x6bf5('0x46')],{'$or':_[_0x6bf5('0x3c')](_0x5b595f['attributes'],function(_0x260cf6){var _0x47edd6={};_0x47edd6[_0x260cf6]={'$like':'%'+_0x3865de['query'][_0x6bf5('0x48')]+'%'};return _0x47edd6;})});}_0x5b595f=_['merge']({},_0x5b595f,_0x3865de[_0x6bf5('0x4a')]);return _0x532e04[_0x6bf5('0x5b')](_0x5b595f);}})[_0x6bf5('0x1e')](function(_0x1ae338){if(_0x1ae338){_0x1b244a=_0x1ae338[_0x6bf5('0x42')];if(!_0x3865de[_0x6bf5('0x3e')][_0x6bf5('0x43')](_0x6bf5('0x44'))){_0x5b595f[_0x6bf5('0x2e')]=qs[_0x6bf5('0x2e')](_0x3865de[_0x6bf5('0x3e')]['limit']);_0x5b595f[_0x6bf5('0x30')]=qs[_0x6bf5('0x30')](_0x3865de['query']['offset']);}return _0x532e04[_0x6bf5('0x5b')](_0x5b595f);}})[_0x6bf5('0x1e')](function(_0x32935f){if(_0x32935f){return _0x32935f?{'count':_0x1b244a,'rows':_0x32935f}:null;}})[_0x6bf5('0x1e')](respondWithResult(_0x36c8a9,null))[_0x6bf5('0x28')](handleError(_0x36c8a9,null));};exports[_0x6bf5('0x5c')]=function(_0x454d32,_0x99a261,_0x44f6a2){var _0x31739c={};var _0x5101dd={};var _0x226975;var _0x2359d9;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x454d32['params']['id']}})['then'](handleEntityNotFound(_0x99a261,null))[_0x6bf5('0x1e')](function(_0x21fa40){if(_0x21fa40){_0x226975=_0x21fa40;_0x5101dd['model']=_[_0x6bf5('0x3d')](db[_0x6bf5('0x58')][_0x6bf5('0x38')]);_0x5101dd[_0x6bf5('0x3e')]=_[_0x6bf5('0x3d')](_0x454d32[_0x6bf5('0x3e')]);_0x5101dd['filters']=_['intersection'](_0x5101dd[_0x6bf5('0x3b')],_0x5101dd['query']);_0x31739c['attributes']=_[_0x6bf5('0x3f')](_0x5101dd[_0x6bf5('0x3b')],qs[_0x6bf5('0x40')](_0x454d32[_0x6bf5('0x3e')][_0x6bf5('0x40')]));_0x31739c['attributes']=_0x31739c[_0x6bf5('0x41')][_0x6bf5('0x42')]?_0x31739c[_0x6bf5('0x41')]:_0x5101dd['model'];_0x31739c[_0x6bf5('0x5d')]=qs[_0x6bf5('0x45')](_0x454d32[_0x6bf5('0x3e')][_0x6bf5('0x45')]);_0x31739c[_0x6bf5('0x46')]=qs[_0x6bf5('0x47')](_[_0x6bf5('0x59')](_0x454d32['query'],_0x5101dd[_0x6bf5('0x47')]));if(_0x454d32[_0x6bf5('0x3e')][_0x6bf5('0x48')]){_0x31739c[_0x6bf5('0x46')]=_[_0x6bf5('0x5a')](_0x31739c[_0x6bf5('0x46')],{'$or':_['map'](_0x31739c['attributes'],function(_0x3a9e28){var _0x378f95={};_0x378f95[_0x3a9e28]={'$like':'%'+_0x454d32[_0x6bf5('0x3e')]['filter']+'%'};return _0x378f95;})});}_0x31739c=_[_0x6bf5('0x5a')]({},_0x31739c,_0x454d32[_0x6bf5('0x4a')]);return _0x226975['getDescriptions'](_0x31739c);}})[_0x6bf5('0x1e')](function(_0x6f7cb2){if(_0x6f7cb2){_0x2359d9=_0x6f7cb2['length'];if(!_0x454d32[_0x6bf5('0x3e')][_0x6bf5('0x43')]('nolimit')){_0x31739c[_0x6bf5('0x2e')]=qs['limit'](_0x454d32['query'][_0x6bf5('0x2e')]);_0x31739c[_0x6bf5('0x30')]=qs[_0x6bf5('0x30')](_0x454d32['query'][_0x6bf5('0x30')]);}return _0x226975[_0x6bf5('0x5c')](_0x31739c);}})[_0x6bf5('0x1e')](function(_0x36dda2){if(_0x36dda2){return _0x36dda2?{'count':_0x2359d9,'rows':_0x36dda2}:null;}})['then'](respondWithResult(_0x99a261,null))[_0x6bf5('0x28')](handleError(_0x99a261,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js index 6caa05c..72dd17e 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 _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 +var _0x1259=['../../config/logger','api','bluebird','path','rimraf','../../config/environment','./intSugarcrmConfiguration.attributes','exports','define','SugarcrmConfiguration','lodash','util'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x1259,0x11e));var _0x9125=function(_0x1e440c,_0x3b2ca5){_0x1e440c=_0x1e440c-0x0;var _0x3cfab5=_0x1259[_0x1e440c];return _0x3cfab5;};'use strict';var _=require(_0x9125('0x0'));var util=require(_0x9125('0x1'));var logger=require(_0x9125('0x2'))(_0x9125('0x3'));var moment=require('moment');var BPromise=require(_0x9125('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9125('0x5'));var rimraf=require(_0x9125('0x6'));var config=require(_0x9125('0x7'));var attributes=require(_0x9125('0x8'));module[_0x9125('0x9')]=function(_0x1287ee,_0x21401f){return _0x1287ee[_0x9125('0xa')](_0x9125('0xb'),attributes,{'tableName':'int_sugarcrm_configurations','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 e2c4501..11fd06d 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 _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 +var _0xa4b9=['ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','then','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x3f7a3d,_0x42dbfa){var _0x272beb=function(_0x151dcb){while(--_0x151dcb){_0x3f7a3d['push'](_0x3f7a3d['shift']());}};_0x272beb(++_0x42dbfa);}(_0xa4b9,0x119));var _0x9a4b=function(_0x2568c9,_0x465a5d){_0x2568c9=_0x2568c9-0x0;var _0x5dd463=_0xa4b9[_0x2568c9];return _0x5dd463;};'use strict';var _=require(_0x9a4b('0x0'));var util=require(_0x9a4b('0x1'));var moment=require(_0x9a4b('0x2'));var BPromise=require(_0x9a4b('0x3'));var rs=require(_0x9a4b('0x4'));var fs=require('fs');var Redis=require(_0x9a4b('0x5'));var db=require(_0x9a4b('0x6'))['db'];var utils=require(_0x9a4b('0x7'));var logger=require(_0x9a4b('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x9a4b('0x9'));var client=jayson[_0x9a4b('0xa')][_0x9a4b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5484ca,_0x1b691d,_0x5da057){return new BPromise(function(_0x3e64fd,_0x35c1da){return client['request'](_0x5484ca,_0x5da057)[_0x9a4b('0xc')](function(_0x529a3f){logger['info'](_0x9a4b('0xd'),_0x1b691d,_0x9a4b('0xe'));logger[_0x9a4b('0xf')](_0x9a4b('0x10'),_0x1b691d,_0x9a4b('0xe'),JSON['stringify'](_0x529a3f));if(_0x529a3f[_0x9a4b('0x11')]){if(_0x529a3f['error'][_0x9a4b('0x12')]===0x1f4){logger[_0x9a4b('0x11')](_0x9a4b('0xd'),_0x1b691d,_0x529a3f[_0x9a4b('0x11')]['message']);return _0x35c1da(_0x529a3f['error'][_0x9a4b('0x13')]);}logger[_0x9a4b('0x11')](_0x9a4b('0xd'),_0x1b691d,_0x529a3f['error']['message']);return _0x3e64fd(_0x529a3f[_0x9a4b('0x11')][_0x9a4b('0x13')]);}else{logger['info'](_0x9a4b('0xd'),_0x1b691d,_0x9a4b('0xe'));_0x3e64fd(_0x529a3f[_0x9a4b('0x14')][_0x9a4b('0x13')]);}})[_0x9a4b('0x15')](function(_0x1b4a58){logger['error'](_0x9a4b('0xd'),_0x1b691d,_0x1b4a58);_0x35c1da(_0x1b4a58);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmField/index.js b/server/api/intSugarcrmField/index.js index 7e83909..dbbaa10 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 _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 +var _0xf47f=['../../components/interaction/service','../../config/environment','get','isAuthenticated','index','post','create','put','update','/:id','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0x3bbad5,_0x39f834){var _0x338d99=function(_0x8ffdc9){while(--_0x8ffdc9){_0x3bbad5['push'](_0x3bbad5['shift']());}};_0x338d99(++_0x39f834);}(_0xf47f,0x1e7));var _0xff47=function(_0x11aaed,_0x4c1b6b){_0x11aaed=_0x11aaed-0x0;var _0x407d2e=_0xf47f[_0x11aaed];return _0x407d2e;};'use strict';var multer=require(_0xff47('0x0'));var util=require(_0xff47('0x1'));var path=require(_0xff47('0x2'));var timeout=require(_0xff47('0x3'));var express=require(_0xff47('0x4'));var router=express['Router']();var fs_extra=require(_0xff47('0x5'));var auth=require(_0xff47('0x6'));var interaction=require(_0xff47('0x7'));var config=require(_0xff47('0x8'));var controller=require('./intSugarcrmField.controller');router[_0xff47('0x9')]('/',auth[_0xff47('0xa')](),controller[_0xff47('0xb')]);router['get']('/:id',auth[_0xff47('0xa')](),controller['show']);router[_0xff47('0xc')]('/',auth[_0xff47('0xa')](),controller[_0xff47('0xd')]);router[_0xff47('0xe')]('/:id',auth[_0xff47('0xa')](),controller[_0xff47('0xf')]);router['delete'](_0xff47('0x10'),auth[_0xff47('0xa')](),controller[_0xff47('0x11')]);module[_0xff47('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 e4cc941..9b3365d 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 _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 +var _0x2fd2=['string','variable','customVariable','picklist','STRING','BOOLEAN','exports','ENUM'];(function(_0x496013,_0x161129){var _0x498de4=function(_0xbc12f5){while(--_0xbc12f5){_0x496013['push'](_0x496013['shift']());}};_0x498de4(++_0x161129);}(_0x2fd2,0x16e));var _0x22fd=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x2fd2[_0x501510];return _0x1e6ee5;};'use strict';var Sequelize=require('sequelize');module[_0x22fd('0x0')]={'type':{'type':Sequelize[_0x22fd('0x1')](_0x22fd('0x2'),_0x22fd('0x3'),_0x22fd('0x4'),'keyValue',_0x22fd('0x5')),'defaultValue':_0x22fd('0x2')},'content':{'type':Sequelize[_0x22fd('0x6')]},'key':{'type':Sequelize[_0x22fd('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0x22fd('0x2'),_0x22fd('0x3'),_0x22fd('0x4'))},'keyContent':{'type':Sequelize[_0x22fd('0x6')]},'idField':{'type':Sequelize[_0x22fd('0x6')]},'nameField':{'type':Sequelize[_0x22fd('0x6')]},'customField':{'type':Sequelize[_0x22fd('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.controller.js b/server/api/intSugarcrmField/intSugarcrmField.controller.js index d42d68c..48b1bc7 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 _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 +var _0xf80b=['fieldName','key','model','map','name','keys','query','filters','intersection','fields','attributes','nolimit','order','sort','pick','filter','where','merge','type','VIRTUAL','options','include','findAll','show','params','length','includeAll','find','create','body','catch','destroy','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','ejs','fs-extra','lodash','squel','crypto','jsforce','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','status','json','undefined','limit','count','offset','Content-Range','apply','save','update','then','end','sendStatus','stack','send','SugarcrmField','rawAttributes'];(function(_0x58a488,_0x577911){var _0x71b35f=function(_0x10016e){while(--_0x10016e){_0x58a488['push'](_0x58a488['shift']());}};_0x71b35f(++_0x577911);}(_0xf80b,0x192));var _0xbf80=function(_0x5ef363,_0x519549){_0x5ef363=_0x5ef363-0x0;var _0x5f07fd=_0xf80b[_0x5ef363];return _0x5f07fd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbf80('0x0'));var zipdir=require(_0xbf80('0x1'));var jsonpatch=require(_0xbf80('0x2'));var rp=require('request-promise');var moment=require(_0xbf80('0x3'));var BPromise=require(_0xbf80('0x4'));var Mustache=require(_0xbf80('0x5'));var util=require(_0xbf80('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xbf80('0x7'));var fs=require('fs');var fs_extra=require(_0xbf80('0x8'));var _=require(_0xbf80('0x9'));var squel=require(_0xbf80('0xa'));var crypto=require(_0xbf80('0xb'));var jsforce=require(_0xbf80('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xbf80('0xd'));var querystring=require(_0xbf80('0xe'));var Papa=require('papaparse');var Redis=require(_0xbf80('0xf'));var authService=require(_0xbf80('0x10'));var qs=require(_0xbf80('0x11'));var as=require(_0xbf80('0x12'));var hardwareService=require(_0xbf80('0x13'));var logger=require(_0xbf80('0x14'))(_0xbf80('0x15'));var utils=require(_0xbf80('0x16'));var config=require(_0xbf80('0x17'));var licenseUtil=require(_0xbf80('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x36bea2,_0x3a5e2c){_0x3a5e2c=_0x3a5e2c||0xcc;return function(_0x4f3144){if(_0x4f3144){return _0x36bea2['sendStatus'](_0x3a5e2c);}return _0x36bea2[_0xbf80('0x19')](_0x3a5e2c)['end']();};}function respondWithResult(_0x3f6e72,_0x58bfe1){_0x58bfe1=_0x58bfe1||0xc8;return function(_0x4f3d9e){if(_0x4f3d9e){return _0x3f6e72[_0xbf80('0x19')](_0x58bfe1)[_0xbf80('0x1a')](_0x4f3d9e);}};}function respondWithFilteredResult(_0x82066e,_0x111423){return function(_0x2e9554){if(_0x2e9554){var _0x5d8951=typeof _0x111423['offset']===_0xbf80('0x1b')&&typeof _0x111423[_0xbf80('0x1c')]===_0xbf80('0x1b');var _0x760daf=_0x2e9554[_0xbf80('0x1d')];var _0x33ed05=_0x5d8951?0x0:_0x111423['offset'];var _0x3b9b76=_0x5d8951?_0x2e9554[_0xbf80('0x1d')]:_0x111423[_0xbf80('0x1e')]+_0x111423[_0xbf80('0x1c')];var _0x1ef360;if(_0x3b9b76>=_0x760daf){_0x3b9b76=_0x760daf;_0x1ef360=0xc8;}else{_0x1ef360=0xce;}_0x82066e[_0xbf80('0x19')](_0x1ef360);return _0x82066e['set'](_0xbf80('0x1f'),_0x33ed05+'-'+_0x3b9b76+'/'+_0x760daf)['json'](_0x2e9554);}return null;};}function patchUpdates(_0x1508ab){return function(_0x1d2005){try{jsonpatch[_0xbf80('0x20')](_0x1d2005,_0x1508ab,!![]);}catch(_0x38d428){return BPromise['reject'](_0x38d428);}return _0x1d2005[_0xbf80('0x21')]();};}function saveUpdates(_0x4e3569,_0x2ee65d){return function(_0x44a010){if(_0x44a010){return _0x44a010[_0xbf80('0x22')](_0x4e3569)[_0xbf80('0x23')](function(_0x4338df){return _0x4338df;});}return null;};}function removeEntity(_0xee96bf,_0x467dd8){return function(_0x419029){if(_0x419029){return _0x419029['destroy']()[_0xbf80('0x23')](function(){_0xee96bf[_0xbf80('0x19')](0xcc)[_0xbf80('0x24')]();});}};}function handleEntityNotFound(_0x474327,_0xd24a1c){return function(_0x43195d){if(!_0x43195d){_0x474327[_0xbf80('0x25')](0x194);}return _0x43195d;};}function handleError(_0x1c0a19,_0x1810e5){_0x1810e5=_0x1810e5||0x1f4;return function(_0x323b34){logger['error'](_0x323b34[_0xbf80('0x26')]);if(_0x323b34['name']){delete _0x323b34['name'];}_0x1c0a19[_0xbf80('0x19')](_0x1810e5)[_0xbf80('0x27')](_0x323b34);};}exports['index']=function(_0x4f2078,_0x1315bc){var _0x20aee8={},_0x4ad920={},_0x122061={'count':0x0,'rows':[]};var _0x3532ce=_['map'](db[_0xbf80('0x28')][_0xbf80('0x29')],function(_0x5c2984){return{'name':_0x5c2984[_0xbf80('0x2a')],'type':_0x5c2984['type'][_0xbf80('0x2b')]};});_0x4ad920[_0xbf80('0x2c')]=_[_0xbf80('0x2d')](_0x3532ce,_0xbf80('0x2e'));_0x4ad920['query']=_[_0xbf80('0x2f')](_0x4f2078[_0xbf80('0x30')]);_0x4ad920[_0xbf80('0x31')]=_[_0xbf80('0x32')](_0x4ad920[_0xbf80('0x2c')],_0x4ad920[_0xbf80('0x30')]);_0x20aee8['attributes']=_[_0xbf80('0x32')](_0x4ad920[_0xbf80('0x2c')],qs[_0xbf80('0x33')](_0x4f2078[_0xbf80('0x30')]['fields']));_0x20aee8[_0xbf80('0x34')]=_0x20aee8[_0xbf80('0x34')]['length']?_0x20aee8[_0xbf80('0x34')]:_0x4ad920['model'];if(!_0x4f2078[_0xbf80('0x30')]['hasOwnProperty'](_0xbf80('0x35'))){_0x20aee8[_0xbf80('0x1c')]=qs[_0xbf80('0x1c')](_0x4f2078['query'][_0xbf80('0x1c')]);_0x20aee8[_0xbf80('0x1e')]=qs[_0xbf80('0x1e')](_0x4f2078[_0xbf80('0x30')][_0xbf80('0x1e')]);}_0x20aee8[_0xbf80('0x36')]=qs[_0xbf80('0x37')](_0x4f2078[_0xbf80('0x30')][_0xbf80('0x37')]);_0x20aee8['where']=qs[_0xbf80('0x31')](_[_0xbf80('0x38')](_0x4f2078[_0xbf80('0x30')],_0x4ad920[_0xbf80('0x31')]),_0x3532ce);if(_0x4f2078[_0xbf80('0x30')][_0xbf80('0x39')]){_0x20aee8[_0xbf80('0x3a')]=_[_0xbf80('0x3b')](_0x20aee8[_0xbf80('0x3a')],{'$or':_[_0xbf80('0x2d')](_0x3532ce,function(_0xc78af0){if(_0xc78af0[_0xbf80('0x3c')]!==_0xbf80('0x3d')){var _0x34930c={};_0x34930c[_0xc78af0['name']]={'$like':'%'+_0x4f2078['query']['filter']+'%'};return _0x34930c;}})});}_0x20aee8=_[_0xbf80('0x3b')]({},_0x20aee8,_0x4f2078[_0xbf80('0x3e')]);var _0x246c12={'where':_0x20aee8[_0xbf80('0x3a')]};return db[_0xbf80('0x28')][_0xbf80('0x1d')](_0x246c12)[_0xbf80('0x23')](function(_0x2acae8){_0x122061['count']=_0x2acae8;if(_0x4f2078[_0xbf80('0x30')]['includeAll']){_0x20aee8[_0xbf80('0x3f')]=[{'all':!![]}];}return db['SugarcrmField'][_0xbf80('0x40')](_0x20aee8);})[_0xbf80('0x23')](function(_0x37cf2d){_0x122061['rows']=_0x37cf2d;return _0x122061;})['then'](respondWithFilteredResult(_0x1315bc,_0x20aee8))['catch'](handleError(_0x1315bc,null));};exports[_0xbf80('0x41')]=function(_0x150fd6,_0x5d5b9){var _0xbdfe14={'raw':!![],'where':{'id':_0x150fd6[_0xbf80('0x42')]['id']}},_0x5f1c74={};_0x5f1c74[_0xbf80('0x2c')]=_[_0xbf80('0x2f')](db['SugarcrmField'][_0xbf80('0x29')]);_0x5f1c74[_0xbf80('0x30')]=_[_0xbf80('0x2f')](_0x150fd6[_0xbf80('0x30')]);_0x5f1c74[_0xbf80('0x31')]=_['intersection'](_0x5f1c74[_0xbf80('0x2c')],_0x5f1c74[_0xbf80('0x30')]);_0xbdfe14[_0xbf80('0x34')]=_[_0xbf80('0x32')](_0x5f1c74[_0xbf80('0x2c')],qs[_0xbf80('0x33')](_0x150fd6[_0xbf80('0x30')]['fields']));_0xbdfe14['attributes']=_0xbdfe14[_0xbf80('0x34')][_0xbf80('0x43')]?_0xbdfe14['attributes']:_0x5f1c74[_0xbf80('0x2c')];if(_0x150fd6[_0xbf80('0x30')][_0xbf80('0x44')]){_0xbdfe14[_0xbf80('0x3f')]=[{'all':!![]}];}_0xbdfe14=_[_0xbf80('0x3b')]({},_0xbdfe14,_0x150fd6[_0xbf80('0x3e')]);return db[_0xbf80('0x28')][_0xbf80('0x45')](_0xbdfe14)[_0xbf80('0x23')](handleEntityNotFound(_0x5d5b9,null))[_0xbf80('0x23')](respondWithResult(_0x5d5b9,null))['catch'](handleError(_0x5d5b9,null));};exports[_0xbf80('0x46')]=function(_0x3498b5,_0x332a3f){return db['SugarcrmField'][_0xbf80('0x46')](_0x3498b5[_0xbf80('0x47')],{})[_0xbf80('0x23')](respondWithResult(_0x332a3f,0xc9))[_0xbf80('0x48')](handleError(_0x332a3f,null));};exports[_0xbf80('0x22')]=function(_0x2c52fb,_0x2501ed){if(_0x2c52fb[_0xbf80('0x47')]['id']){delete _0x2c52fb[_0xbf80('0x47')]['id'];}return db[_0xbf80('0x28')][_0xbf80('0x45')]({'where':{'id':_0x2c52fb[_0xbf80('0x42')]['id']}})[_0xbf80('0x23')](handleEntityNotFound(_0x2501ed,null))[_0xbf80('0x23')](saveUpdates(_0x2c52fb[_0xbf80('0x47')],null))[_0xbf80('0x23')](respondWithResult(_0x2501ed,null))[_0xbf80('0x48')](handleError(_0x2501ed,null));};exports[_0xbf80('0x49')]=function(_0x53d372,_0x568f8f){return db[_0xbf80('0x28')][_0xbf80('0x45')]({'where':{'id':_0x53d372[_0xbf80('0x42')]['id']}})['then'](handleEntityNotFound(_0x568f8f,null))[_0xbf80('0x23')](removeEntity(_0x568f8f,null))[_0xbf80('0x48')](handleError(_0x568f8f,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.model.js b/server/api/intSugarcrmField/intSugarcrmField.model.js index 7d2396e..e5e7f3b 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 _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 +var _0x7daa=['api','moment','bluebird','request-promise','path','rimraf','./intSugarcrmField.attributes','exports','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','FieldId','lodash','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7daa,0xcf));var _0xa7da=function(_0x5822a6,_0x2a525e){_0x5822a6=_0x5822a6-0x0;var _0x808e4c=_0x7daa[_0x5822a6];return _0x808e4c;};'use strict';var _=require(_0xa7da('0x0'));var util=require(_0xa7da('0x1'));var logger=require(_0xa7da('0x2'))(_0xa7da('0x3'));var moment=require(_0xa7da('0x4'));var BPromise=require(_0xa7da('0x5'));var rp=require(_0xa7da('0x6'));var fs=require('fs');var path=require(_0xa7da('0x7'));var rimraf=require(_0xa7da('0x8'));var config=require('../../config/environment');var attributes=require(_0xa7da('0x9'));module[_0xa7da('0xa')]=function(_0x152de9,_0xc7925d){return _0x152de9['define'](_0xa7da('0xb'),attributes,{'tableName':_0xa7da('0xc'),'paranoid':![],'indexes':[{'name':_0xa7da('0xd'),'fields':['idField',_0xa7da('0xe')],'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 3ecba23..a51f889 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 _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 +var _0x1b4a=['randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','request','then','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','lodash','util','moment'];(function(_0x4c5a41,_0x49a16e){var _0x2d6a29=function(_0xec7bf){while(--_0xec7bf){_0x4c5a41['push'](_0x4c5a41['shift']());}};_0x2d6a29(++_0x49a16e);}(_0x1b4a,0x1b6));var _0xa1b4=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x1b4a[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0xa1b4('0x0'));var util=require(_0xa1b4('0x1'));var moment=require(_0xa1b4('0x2'));var BPromise=require('bluebird');var rs=require(_0xa1b4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa1b4('0x4'))['db'];var utils=require(_0xa1b4('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xa1b4('0x6'));var jayson=require(_0xa1b4('0x7'));var client=jayson[_0xa1b4('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x53707f,_0x58dccf,_0x481abd){return new BPromise(function(_0x2f1e0e,_0x576121){return client[_0xa1b4('0x9')](_0x53707f,_0x481abd)[_0xa1b4('0xa')](function(_0x3380f4){logger['info'](_0xa1b4('0xb'),_0x58dccf,_0xa1b4('0xc'));logger[_0xa1b4('0xd')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x58dccf,'request\x20sent',JSON[_0xa1b4('0xe')](_0x3380f4));if(_0x3380f4[_0xa1b4('0xf')]){if(_0x3380f4[_0xa1b4('0xf')][_0xa1b4('0x10')]===0x1f4){logger[_0xa1b4('0xf')](_0xa1b4('0xb'),_0x58dccf,_0x3380f4[_0xa1b4('0xf')][_0xa1b4('0x11')]);return _0x576121(_0x3380f4[_0xa1b4('0xf')][_0xa1b4('0x11')]);}logger[_0xa1b4('0xf')]('SugarcrmField,\x20%s,\x20%s',_0x58dccf,_0x3380f4[_0xa1b4('0xf')][_0xa1b4('0x11')]);return _0x2f1e0e(_0x3380f4['error'][_0xa1b4('0x11')]);}else{logger[_0xa1b4('0x12')](_0xa1b4('0xb'),_0x58dccf,_0xa1b4('0xc'));_0x2f1e0e(_0x3380f4[_0xa1b4('0x13')][_0xa1b4('0x11')]);}})[_0xa1b4('0x14')](function(_0x1fddce){logger[_0xa1b4('0xf')](_0xa1b4('0xb'),_0x58dccf,_0x1fddce);_0x576121(_0x1fddce);});});} \ No newline at end of file diff --git a/server/api/intVtigerAccount/index.js b/server/api/intVtigerAccount/index.js index 9273344..0fdd1f5 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 _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 +var _0x7bbd=['getFields','addConfiguration','put','update','delete','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerAccount.controller','get','/:id','isAuthenticated','show','/:id/configurations','getConfigurations'];(function(_0x1e9ebd,_0x2a87ec){var _0x40afbf=function(_0x525336){while(--_0x525336){_0x1e9ebd['push'](_0x1e9ebd['shift']());}};_0x40afbf(++_0x2a87ec);}(_0x7bbd,0x12c));var _0xd7bb=function(_0x17bd42,_0x4e07c2){_0x17bd42=_0x17bd42-0x0;var _0x3031af=_0x7bbd[_0x17bd42];return _0x3031af;};'use strict';var multer=require(_0xd7bb('0x0'));var util=require('util');var path=require(_0xd7bb('0x1'));var timeout=require(_0xd7bb('0x2'));var express=require(_0xd7bb('0x3'));var router=express['Router']();var fs_extra=require(_0xd7bb('0x4'));var auth=require(_0xd7bb('0x5'));var interaction=require(_0xd7bb('0x6'));var config=require(_0xd7bb('0x7'));var controller=require(_0xd7bb('0x8'));router[_0xd7bb('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xd7bb('0x9')](_0xd7bb('0xa'),auth[_0xd7bb('0xb')](),controller[_0xd7bb('0xc')]);router[_0xd7bb('0x9')](_0xd7bb('0xd'),auth['isAuthenticated'](),controller[_0xd7bb('0xe')]);router['get']('/:id/fields',auth[_0xd7bb('0xb')](),controller[_0xd7bb('0xf')]);router['post']('/',auth[_0xd7bb('0xb')](),controller['create']);router['post']('/:id/configurations',auth['isAuthenticated'](),controller[_0xd7bb('0x10')]);router[_0xd7bb('0x11')](_0xd7bb('0xa'),auth[_0xd7bb('0xb')](),controller[_0xd7bb('0x12')]);router[_0xd7bb('0x13')]('/:id',auth[_0xd7bb('0xb')](),controller['destroy']);module[_0xd7bb('0x14')]=router; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.attributes.js b/server/api/intVtigerAccount/intVtigerAccount.attributes.js index 6f15f5f..3caf907 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 _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 +var _0x1255=['exports','STRING'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x1255,0x124));var _0x5125=function(_0x5d54b7,_0x5ab0a8){_0x5d54b7=_0x5d54b7-0x0;var _0x21e143=_0x1255[_0x5d54b7];return _0x21e143;};'use strict';var Sequelize=require('sequelize');module[_0x5125('0x0')]={'name':{'type':Sequelize[_0x5125('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x5125('0x1')]},'username':{'type':Sequelize[_0x5125('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x5125('0x1')],'allowNull':![],'defaultValue':'HelpDesk'},'remoteUri':{'type':Sequelize[_0x5125('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'accessKey':{'type':Sequelize[_0x5125('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 06adaf8..2e27e5b 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 _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 +var _0x48e4=['hasOwnProperty','nolimit','addConfiguration','AccountId','Subjects','Descriptions','getDescriptions','channel','VtigerField','md5','getFields','username','description','moduleName','serverUrl','accessKey','remoteUri','slice','substring','format','getchallenge','success','POST','login','token','GET','sessionName','autogenerated','reference','owner','remove','includes','false','cf_','picklist','picklistValues','label','value','vTiger\x20error:\x20','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','eml-format','zip-dir','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','client','http','then','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','VtigerAccount,\x20%s,\x20%s','message','info','result','catch','sendStatus','json','offset','undefined','limit','count','status','set','Content-Range','save','update','destroy','end','stack','name','send','index','VtigerAccount','rawAttributes','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','pick','filter','merge','where','map','type','VIRTUAL','includeAll','rows','show','params','include','options','find','body','getConfigurations','findOne','VtigerConfiguration'];(function(_0xb1ac47,_0x643ac1){var _0x2d964d=function(_0x1b6188){while(--_0x1b6188){_0xb1ac47['push'](_0xb1ac47['shift']());}};_0x2d964d(++_0x643ac1);}(_0x48e4,0xae));var _0x448e=function(_0x4a2ad2,_0x32aee6){_0x4a2ad2=_0x4a2ad2-0x0;var _0x4b6a93=_0x48e4[_0x4a2ad2];return _0x4b6a93;};'use strict';var emlformat=require(_0x448e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x448e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x448e('0x2'));var moment=require(_0x448e('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x448e('0x4'));var path=require(_0x448e('0x5'));var sox=require(_0x448e('0x6'));var csv=require(_0x448e('0x7'));var ejs=require(_0x448e('0x8'));var fs=require('fs');var fs_extra=require(_0x448e('0x9'));var _=require(_0x448e('0xa'));var squel=require(_0x448e('0xb'));var crypto=require(_0x448e('0xc'));var jsforce=require(_0x448e('0xd'));var deskjs=require(_0x448e('0xe'));var toCsv=require(_0x448e('0x7'));var querystring=require(_0x448e('0xf'));var Papa=require(_0x448e('0x10'));var Redis=require(_0x448e('0x11'));var authService=require(_0x448e('0x12'));var qs=require(_0x448e('0x13'));var as=require(_0x448e('0x14'));var hardwareService=require(_0x448e('0x15'));var logger=require('../../config/logger')(_0x448e('0x16'));var utils=require(_0x448e('0x17'));var config=require(_0x448e('0x18'));var licenseUtil=require(_0x448e('0x19'));var db=require(_0x448e('0x1a'))['db'];var integrations=require(_0x448e('0x1b'));var jayson=require('jayson/promise');var client=jayson[_0x448e('0x1c')][_0x448e('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x3467be,_0x153596,_0xfdc632,_0x423abc){return new BPromise(function(_0x1917e2,_0x458041){var _0x2319f3=_0x423abc||client;return _0x2319f3['request'](_0x3467be,_0xfdc632)[_0x448e('0x1e')](function(_0x5acb51){logger['info']('VtigerAccount,\x20%s,\x20%s',_0x153596,'request\x20sent');logger[_0x448e('0x1f')](_0x448e('0x20'),_0x153596,_0x448e('0x21'),JSON['stringify'](_0x5acb51));if(_0x5acb51[_0x448e('0x22')]){if(_0x5acb51[_0x448e('0x22')]['code']===0x1f4){logger[_0x448e('0x22')](_0x448e('0x23'),_0x153596,_0x5acb51['error'][_0x448e('0x24')]);return _0x458041(_0x5acb51[_0x448e('0x22')]['message']);}logger[_0x448e('0x22')](_0x448e('0x23'),_0x153596,_0x5acb51[_0x448e('0x22')]['message']);return _0x1917e2(_0x5acb51[_0x448e('0x22')][_0x448e('0x24')]);}else{logger[_0x448e('0x25')](_0x448e('0x23'),_0x153596,_0x448e('0x21'));_0x1917e2(_0x5acb51[_0x448e('0x26')][_0x448e('0x24')]);}})[_0x448e('0x27')](function(_0x3af711){logger[_0x448e('0x22')](_0x448e('0x23'),_0x153596,_0x3af711);_0x458041(_0x3af711);});});}function respondWithStatusCode(_0x2a579c,_0x3c8141){_0x3c8141=_0x3c8141||0xcc;return function(_0x56b2ae){if(_0x56b2ae){return _0x2a579c[_0x448e('0x28')](_0x3c8141);}return _0x2a579c['status'](_0x3c8141)['end']();};}function respondWithResult(_0x58a44a,_0x55ed6a){_0x55ed6a=_0x55ed6a||0xc8;return function(_0x397e4f){if(_0x397e4f){return _0x58a44a['status'](_0x55ed6a)[_0x448e('0x29')](_0x397e4f);}};}function respondWithFilteredResult(_0x35ff65,_0x13f169){return function(_0x2eedcd){if(_0x2eedcd){var _0x210ccf=typeof _0x13f169[_0x448e('0x2a')]===_0x448e('0x2b')&&typeof _0x13f169[_0x448e('0x2c')]==='undefined';var _0x218f7d=_0x2eedcd[_0x448e('0x2d')];var _0x93f7cc=_0x210ccf?0x0:_0x13f169[_0x448e('0x2a')];var _0x48e36f=_0x210ccf?_0x2eedcd[_0x448e('0x2d')]:_0x13f169[_0x448e('0x2a')]+_0x13f169[_0x448e('0x2c')];var _0x3c1752;if(_0x48e36f>=_0x218f7d){_0x48e36f=_0x218f7d;_0x3c1752=0xc8;}else{_0x3c1752=0xce;}_0x35ff65[_0x448e('0x2e')](_0x3c1752);return _0x35ff65[_0x448e('0x2f')](_0x448e('0x30'),_0x93f7cc+'-'+_0x48e36f+'/'+_0x218f7d)[_0x448e('0x29')](_0x2eedcd);}return null;};}function patchUpdates(_0x1371d8){return function(_0x268005){try{jsonpatch['apply'](_0x268005,_0x1371d8,!![]);}catch(_0x4de8ee){return BPromise['reject'](_0x4de8ee);}return _0x268005[_0x448e('0x31')]();};}function saveUpdates(_0x222c66,_0x5ef61f){return function(_0x544a33){if(_0x544a33){return _0x544a33[_0x448e('0x32')](_0x222c66)[_0x448e('0x1e')](function(_0x580193){return _0x580193;});}return null;};}function removeEntity(_0x4ae5ba,_0x4c61b8){return function(_0x17e456){if(_0x17e456){return _0x17e456[_0x448e('0x33')]()['then'](function(){_0x4ae5ba[_0x448e('0x2e')](0xcc)[_0x448e('0x34')]();});}};}function handleEntityNotFound(_0x3aafe6,_0x4bf578){return function(_0x54f6b0){if(!_0x54f6b0){_0x3aafe6[_0x448e('0x28')](0x194);}return _0x54f6b0;};}function handleError(_0x1a02e5,_0x4ffd14){_0x4ffd14=_0x4ffd14||0x1f4;return function(_0x2a1afb){logger[_0x448e('0x22')](_0x2a1afb[_0x448e('0x35')]);if(_0x2a1afb[_0x448e('0x36')]){delete _0x2a1afb[_0x448e('0x36')];}_0x1a02e5[_0x448e('0x2e')](_0x4ffd14)[_0x448e('0x37')](_0x2a1afb);};}exports[_0x448e('0x38')]=function(_0x551791,_0x286b56){var _0x2a7868={},_0x479c2c={},_0x256624={'count':0x0,'rows':[]};var _0x1da3a1=_['map'](db[_0x448e('0x39')][_0x448e('0x3a')],function(_0x281395){return{'name':_0x281395['fieldName'],'type':_0x281395['type'][_0x448e('0x3b')]};});_0x479c2c[_0x448e('0x3c')]=_['map'](_0x1da3a1,_0x448e('0x36'));_0x479c2c[_0x448e('0x3d')]=_[_0x448e('0x3e')](_0x551791[_0x448e('0x3d')]);_0x479c2c[_0x448e('0x3f')]=_['intersection'](_0x479c2c[_0x448e('0x3c')],_0x479c2c[_0x448e('0x3d')]);_0x2a7868['attributes']=_[_0x448e('0x40')](_0x479c2c[_0x448e('0x3c')],qs[_0x448e('0x41')](_0x551791[_0x448e('0x3d')][_0x448e('0x41')]));_0x2a7868[_0x448e('0x42')]=_0x2a7868['attributes'][_0x448e('0x43')]?_0x2a7868[_0x448e('0x42')]:_0x479c2c['model'];if(!_0x551791['query']['hasOwnProperty']('nolimit')){_0x2a7868['limit']=qs['limit'](_0x551791[_0x448e('0x3d')]['limit']);_0x2a7868[_0x448e('0x2a')]=qs[_0x448e('0x2a')](_0x551791[_0x448e('0x3d')][_0x448e('0x2a')]);}_0x2a7868[_0x448e('0x44')]=qs[_0x448e('0x45')](_0x551791[_0x448e('0x3d')][_0x448e('0x45')]);_0x2a7868['where']=qs[_0x448e('0x3f')](_[_0x448e('0x46')](_0x551791[_0x448e('0x3d')],_0x479c2c['filters']),_0x1da3a1);if(_0x551791['query'][_0x448e('0x47')]){_0x2a7868['where']=_[_0x448e('0x48')](_0x2a7868[_0x448e('0x49')],{'$or':_[_0x448e('0x4a')](_0x1da3a1,function(_0xfab989){if(_0xfab989[_0x448e('0x4b')]!==_0x448e('0x4c')){var _0x256950={};_0x256950[_0xfab989[_0x448e('0x36')]]={'$like':'%'+_0x551791[_0x448e('0x3d')][_0x448e('0x47')]+'%'};return _0x256950;}})});}_0x2a7868=_[_0x448e('0x48')]({},_0x2a7868,_0x551791['options']);var _0x136c4a={'where':_0x2a7868['where']};return db[_0x448e('0x39')][_0x448e('0x2d')](_0x136c4a)[_0x448e('0x1e')](function(_0x3facfb){_0x256624[_0x448e('0x2d')]=_0x3facfb;if(_0x551791[_0x448e('0x3d')][_0x448e('0x4d')]){_0x2a7868['include']=[{'all':!![]}];}return db[_0x448e('0x39')]['findAll'](_0x2a7868);})[_0x448e('0x1e')](function(_0x62803c){_0x256624[_0x448e('0x4e')]=_0x62803c;return _0x256624;})[_0x448e('0x1e')](respondWithFilteredResult(_0x286b56,_0x2a7868))['catch'](handleError(_0x286b56,null));};exports[_0x448e('0x4f')]=function(_0x5e2f5c,_0x56e074){var _0x192563={'raw':![],'where':{'id':_0x5e2f5c[_0x448e('0x50')]['id']}},_0x292f7d={};_0x292f7d['model']=_['keys'](db[_0x448e('0x39')][_0x448e('0x3a')]);_0x292f7d[_0x448e('0x3d')]=_['keys'](_0x5e2f5c[_0x448e('0x3d')]);_0x292f7d['filters']=_[_0x448e('0x40')](_0x292f7d[_0x448e('0x3c')],_0x292f7d[_0x448e('0x3d')]);_0x192563[_0x448e('0x42')]=_[_0x448e('0x40')](_0x292f7d[_0x448e('0x3c')],qs[_0x448e('0x41')](_0x5e2f5c['query'][_0x448e('0x41')]));_0x192563[_0x448e('0x42')]=_0x192563['attributes']['length']?_0x192563['attributes']:_0x292f7d['model'];if(_0x5e2f5c['query']['includeAll']){_0x192563[_0x448e('0x51')]=[{'all':!![]}];}_0x192563=_[_0x448e('0x48')]({},_0x192563,_0x5e2f5c[_0x448e('0x52')]);return db[_0x448e('0x39')][_0x448e('0x53')](_0x192563)[_0x448e('0x1e')](handleEntityNotFound(_0x56e074,null))[_0x448e('0x1e')](respondWithResult(_0x56e074,null))['catch'](handleError(_0x56e074,null));};exports['create']=function(_0x399a11,_0x18ea1f){return db[_0x448e('0x39')]['create'](_0x399a11[_0x448e('0x54')],{})[_0x448e('0x1e')](respondWithResult(_0x18ea1f,0xc9))[_0x448e('0x27')](handleError(_0x18ea1f,null));};exports[_0x448e('0x32')]=function(_0x12c095,_0x1f815f){if(_0x12c095[_0x448e('0x54')]['id']){delete _0x12c095[_0x448e('0x54')]['id'];}return db[_0x448e('0x39')][_0x448e('0x53')]({'where':{'id':_0x12c095['params']['id']}})['then'](handleEntityNotFound(_0x1f815f,null))[_0x448e('0x1e')](saveUpdates(_0x12c095[_0x448e('0x54')],null))[_0x448e('0x1e')](respondWithResult(_0x1f815f,null))[_0x448e('0x27')](handleError(_0x1f815f,null));};exports[_0x448e('0x33')]=function(_0x496074,_0x1f95d6){return db[_0x448e('0x39')][_0x448e('0x53')]({'where':{'id':_0x496074[_0x448e('0x50')]['id']}})[_0x448e('0x1e')](handleEntityNotFound(_0x1f95d6,null))['then'](removeEntity(_0x1f95d6,null))[_0x448e('0x27')](handleError(_0x1f95d6,null));};exports[_0x448e('0x55')]=function(_0x256b67,_0x57b55b,_0x2bc4e9){var _0x2e170d={};var _0x10d0d5={};var _0x326e7e;var _0x38014d;return db[_0x448e('0x39')][_0x448e('0x56')]({'where':{'id':_0x256b67[_0x448e('0x50')]['id']}})[_0x448e('0x1e')](handleEntityNotFound(_0x57b55b,null))[_0x448e('0x1e')](function(_0x4f43b9){if(_0x4f43b9){_0x326e7e=_0x4f43b9;_0x10d0d5['model']=_[_0x448e('0x3e')](db[_0x448e('0x57')][_0x448e('0x3a')]);_0x10d0d5[_0x448e('0x3d')]=_[_0x448e('0x3e')](_0x256b67[_0x448e('0x3d')]);_0x10d0d5[_0x448e('0x3f')]=_['intersection'](_0x10d0d5[_0x448e('0x3c')],_0x10d0d5[_0x448e('0x3d')]);_0x2e170d[_0x448e('0x42')]=_['intersection'](_0x10d0d5['model'],qs[_0x448e('0x41')](_0x256b67[_0x448e('0x3d')][_0x448e('0x41')]));_0x2e170d['attributes']=_0x2e170d[_0x448e('0x42')][_0x448e('0x43')]?_0x2e170d['attributes']:_0x10d0d5['model'];_0x2e170d[_0x448e('0x44')]=qs[_0x448e('0x45')](_0x256b67[_0x448e('0x3d')][_0x448e('0x45')]);_0x2e170d[_0x448e('0x49')]=qs[_0x448e('0x3f')](_[_0x448e('0x46')](_0x256b67[_0x448e('0x3d')],_0x10d0d5[_0x448e('0x3f')]));if(_0x256b67['query']['filter']){_0x2e170d[_0x448e('0x49')]=_[_0x448e('0x48')](_0x2e170d['where'],{'$or':_['map'](_0x2e170d[_0x448e('0x42')],function(_0x38e4b0){var _0x161f1a={};_0x161f1a[_0x38e4b0]={'$like':'%'+_0x256b67[_0x448e('0x3d')]['filter']+'%'};return _0x161f1a;})});}_0x2e170d=_[_0x448e('0x48')]({},_0x2e170d,_0x256b67[_0x448e('0x52')]);return _0x326e7e[_0x448e('0x55')](_0x2e170d);}})[_0x448e('0x1e')](function(_0xc4f9a7){if(_0xc4f9a7){_0x38014d=_0xc4f9a7['length'];if(!_0x256b67['query'][_0x448e('0x58')](_0x448e('0x59'))){_0x2e170d[_0x448e('0x2c')]=qs[_0x448e('0x2c')](_0x256b67['query']['limit']);_0x2e170d[_0x448e('0x2a')]=qs['offset'](_0x256b67[_0x448e('0x3d')][_0x448e('0x2a')]);}return _0x326e7e[_0x448e('0x55')](_0x2e170d);}})[_0x448e('0x1e')](function(_0x5f5a86){if(_0x5f5a86){return _0x5f5a86?{'count':_0x38014d,'rows':_0x5f5a86}:null;}})['then'](respondWithResult(_0x57b55b,null))[_0x448e('0x27')](handleError(_0x57b55b,null));};exports[_0x448e('0x5a')]=function(_0x4cb327,_0x2802f3,_0x1c9dca){if(_0x4cb327['body']['id']){delete _0x4cb327[_0x448e('0x54')]['id'];}return db[_0x448e('0x39')]['findOne']({'where':{'id':_0x4cb327[_0x448e('0x50')]['id']}})[_0x448e('0x1e')](handleEntityNotFound(_0x2802f3,null))[_0x448e('0x1e')](function(_0x2ebec9){if(_0x2ebec9){_0x4cb327[_0x448e('0x54')][_0x448e('0x5b')]=_0x2ebec9['id'];_0x4cb327[_0x448e('0x54')][_0x448e('0x5c')]=integrations['getSubjects'](_0x4cb327[_0x448e('0x54')]['channel'],_0x4cb327[_0x448e('0x54')][_0x448e('0x4b')]);_0x4cb327[_0x448e('0x54')][_0x448e('0x5d')]=integrations[_0x448e('0x5e')](_0x4cb327[_0x448e('0x54')][_0x448e('0x5f')],_0x4cb327[_0x448e('0x54')][_0x448e('0x4b')]);return db['VtigerConfiguration']['create'](_0x4cb327['body'],{'include':[{'model':db[_0x448e('0x60')],'as':_0x448e('0x5c')},{'model':db[_0x448e('0x60')],'as':_0x448e('0x5d')}]});}return null;})[_0x448e('0x1e')](respondWithResult(_0x2802f3,null))['catch'](handleError(_0x2802f3,null));};var md5=require(_0x448e('0x61'));exports[_0x448e('0x62')]=function(_0x184602,_0x274dab,_0x2455b4){var _0x521220=null;var _0x449cfa=null;var _0x1e2140=null;var _0x33c3b2=null;var _0x5563a5='';return db[_0x448e('0x39')][_0x448e('0x56')]({'where':{'id':_0x184602['params']['id']},'attributes':['id',_0x448e('0x36'),_0x448e('0x63'),_0x448e('0x64'),_0x448e('0x65'),'remoteUri',_0x448e('0x66'),_0x448e('0x67')]})[_0x448e('0x1e')](handleEntityNotFound(_0x274dab,null))[_0x448e('0x1e')](function(_0x116adc){if(_0x116adc){_0x521220=_0x116adc[_0x448e('0x63')];_0x449cfa=_0x116adc[_0x448e('0x67')];_0x1e2140=_0x116adc['moduleName'];_0x5563a5=_0x116adc[_0x448e('0x68')];var _0x258566=_0x5563a5[_0x448e('0x69')](-0x1);if(_0x258566==='/'){_0x5563a5=_0x5563a5[_0x448e('0x6a')](0x0,_0x5563a5['lastIndexOf'](_0x258566));}_0x33c3b2=util[_0x448e('0x6b')]('%s/webservice.php',_0x5563a5);var _0x185624={'method':'GET','uri':_0x33c3b2,'qs':{'operation':_0x448e('0x6c'),'username':_0x116adc[_0x448e('0x63')]},'json':!![]};return rp(_0x185624);}})[_0x448e('0x1e')](function(_0x3cf789){if(_0x3cf789[_0x448e('0x6d')]){var _0x307181={'method':_0x448e('0x6e'),'uri':_0x33c3b2,'form':{'operation':_0x448e('0x6f'),'username':_0x521220,'accessKey':md5(_0x3cf789[_0x448e('0x26')][_0x448e('0x70')]+_0x449cfa)},'json':!![]};return rp(_0x307181);}})['then'](function(_0x5917bb){if(_0x5917bb[_0x448e('0x6d')]){var _0xc4215c={'method':_0x448e('0x71'),'uri':_0x33c3b2,'qs':{'operation':'describe','username':_0x521220,'sessionName':_0x5917bb[_0x448e('0x26')][_0x448e('0x72')],'elementType':_0x1e2140},'json':!![]};return rp(_0xc4215c);}})[_0x448e('0x1e')](function(_0x2ba932){if(_0x2ba932[_0x448e('0x6d')]){var _0x177378=[_0x448e('0x73'),_0x448e('0x74'),_0x448e('0x75')];_[_0x448e('0x76')](_0x2ba932['result']['fields'],function(_0x4dec1f){return _0x177378[_0x448e('0x77')](_0x4dec1f[_0x448e('0x4b')]['name']);});_[_0x448e('0x76')](_0x2ba932[_0x448e('0x26')][_0x448e('0x41')],function(_0x271041){return _0x271041['editable']===_0x448e('0x78');});return{'count':_0x2ba932[_0x448e('0x26')][_0x448e('0x41')][_0x448e('0x43')],'rows':_[_0x448e('0x4a')](_0x2ba932['result'][_0x448e('0x41')],function(_0xe4d7b7){return{'id':_0xe4d7b7['name'],'name':_0xe4d7b7['label'],'custom':_['startsWith'](_0xe4d7b7[_0x448e('0x36')],_0x448e('0x79'))?!![]:![],'options':_0xe4d7b7['type'][_0x448e('0x36')]===_0x448e('0x7a')&&_0xe4d7b7[_0x448e('0x4b')][_0x448e('0x7b')][_0x448e('0x43')]>0x0?_[_0x448e('0x4a')](_0xe4d7b7[_0x448e('0x4b')][_0x448e('0x7b')],function(_0x3281ed){return{'name':_0x3281ed[_0x448e('0x7c')],'value':_0x3281ed[_0x448e('0x7d')]};}):[]};})};}})['then'](respondWithResult(_0x274dab,null))['catch'](function(_0x58b674){console['log'](_0x448e('0x7e')+_0x58b674);var _0x32c1a5=_0x184602['query'][_0x448e('0x7f')]?0x1f4:_0x58b674[_0x448e('0x80')]||0x1f4;logger[_0x448e('0x22')](_0x448e('0x81'),_0x448e('0x62'),_0x32c1a5,JSON[_0x448e('0x82')](_0x58b674));delete _0x58b674[_0x448e('0x36')];if(_0x32c1a5===0x191){_0x32c1a5=0x190;}_0x274dab[_0x448e('0x2e')](_0x32c1a5)['send'](_0x184602[_0x448e('0x3d')][_0x448e('0x7f')]?{'message':'Wrong\x20credentials','statusCode':_0x58b674[_0x448e('0x80')]}:_0x58b674);});}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.model.js b/server/api/intVtigerAccount/intVtigerAccount.model.js index fd483e6..2e46ea9 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 _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 +var _0x9506=['lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','VtigerAccount','int_vtiger_accounts'];(function(_0x11005e,_0x20c3d2){var _0x29338f=function(_0x3384e9){while(--_0x3384e9){_0x11005e['push'](_0x11005e['shift']());}};_0x29338f(++_0x20c3d2);}(_0x9506,0x108));var _0x6950=function(_0x15a781,_0x5b76b2){_0x15a781=_0x15a781-0x0;var _0x4a8c12=_0x9506[_0x15a781];return _0x4a8c12;};'use strict';var _=require(_0x6950('0x0'));var util=require(_0x6950('0x1'));var logger=require(_0x6950('0x2'))('api');var moment=require('moment');var BPromise=require(_0x6950('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6950('0x4'));var rimraf=require(_0x6950('0x5'));var config=require(_0x6950('0x6'));var attributes=require(_0x6950('0x7'));var integrations=require(_0x6950('0x8'));module['exports']=function(_0x5b4176,_0x1a55d3){return _0x5b4176['define'](_0x6950('0x9'),attributes,{'tableName':_0x6950('0xa'),'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 681366c..2d6d7df 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 _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 +var _0xde2c=['findAll','options','raw','where','limit','include','model','attributes','GetVtigerAccount','stringify','find','map','ShowVtigerAccount','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','VtigerAccount'];(function(_0x19ddfd,_0x2bd2d9){var _0x523a04=function(_0x11dee9){while(--_0x11dee9){_0x19ddfd['push'](_0x19ddfd['shift']());}};_0x523a04(++_0x2bd2d9);}(_0xde2c,0x7f));var _0xcde2=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0xde2c[_0x22f8ab];return _0x2a70e5;};'use strict';var _=require(_0xcde2('0x0'));var util=require(_0xcde2('0x1'));var moment=require(_0xcde2('0x2'));var BPromise=require(_0xcde2('0x3'));var rs=require(_0xcde2('0x4'));var fs=require('fs');var Redis=require(_0xcde2('0x5'));var db=require(_0xcde2('0x6'))['db'];var utils=require(_0xcde2('0x7'));var logger=require('../../config/logger')(_0xcde2('0x8'));var config=require(_0xcde2('0x9'));var jayson=require(_0xcde2('0xa'));var client=jayson[_0xcde2('0xb')][_0xcde2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x53c558,_0x2b27ef,_0x385e83){return new BPromise(function(_0x9c7036,_0x544235){return client['request'](_0x53c558,_0x385e83)[_0xcde2('0xd')](function(_0x1c8b3c){logger['info'](_0xcde2('0xe'),_0x2b27ef,_0xcde2('0xf'));logger[_0xcde2('0x10')](_0xcde2('0x11'),_0x2b27ef,'request\x20sent',JSON['stringify'](_0x1c8b3c));if(_0x1c8b3c[_0xcde2('0x12')]){if(_0x1c8b3c[_0xcde2('0x12')][_0xcde2('0x13')]===0x1f4){logger[_0xcde2('0x12')](_0xcde2('0xe'),_0x2b27ef,_0x1c8b3c[_0xcde2('0x12')]['message']);return _0x544235(_0x1c8b3c[_0xcde2('0x12')]['message']);}logger[_0xcde2('0x12')]('VtigerAccount,\x20%s,\x20%s',_0x2b27ef,_0x1c8b3c['error'][_0xcde2('0x14')]);return _0x9c7036(_0x1c8b3c[_0xcde2('0x12')][_0xcde2('0x14')]);}else{logger[_0xcde2('0x15')](_0xcde2('0xe'),_0x2b27ef,'request\x20sent');_0x9c7036(_0x1c8b3c[_0xcde2('0x16')]['message']);}})[_0xcde2('0x17')](function(_0x198840){logger[_0xcde2('0x12')](_0xcde2('0xe'),_0x2b27ef,_0x198840);_0x544235(_0x198840);});});}exports['GetVtigerAccount']=function(_0x4fd5aa){var _0x4fe586=this;return new Promise(function(_0x2b4468,_0x582e84){return db[_0xcde2('0x18')][_0xcde2('0x19')]({'raw':_0x4fd5aa[_0xcde2('0x1a')]?_0x4fd5aa['options'][_0xcde2('0x1b')]===undefined?!![]:![]:!![],'where':_0x4fd5aa[_0xcde2('0x1a')]?_0x4fd5aa[_0xcde2('0x1a')][_0xcde2('0x1c')]||null:null,'attributes':_0x4fd5aa[_0xcde2('0x1a')]?_0x4fd5aa['options']['attributes']||null:null,'limit':_0x4fd5aa['options']?_0x4fd5aa[_0xcde2('0x1a')][_0xcde2('0x1d')]||null:null,'include':_0x4fd5aa[_0xcde2('0x1a')]?_0x4fd5aa[_0xcde2('0x1a')][_0xcde2('0x1e')]?_['map'](_0x4fd5aa[_0xcde2('0x1a')]['include'],function(_0x280d8c){return{'model':db[_0x280d8c[_0xcde2('0x1f')]],'as':_0x280d8c['as'],'attributes':_0x280d8c[_0xcde2('0x20')],'include':_0x280d8c['include']?_['map'](_0x280d8c[_0xcde2('0x1e')],function(_0x207a12){return{'model':db[_0x207a12[_0xcde2('0x1f')]],'as':_0x207a12['as'],'attributes':_0x207a12[_0xcde2('0x20')],'include':_0x207a12[_0xcde2('0x1e')]?_['map'](_0x207a12[_0xcde2('0x1e')],function(_0x45275a){return{'model':db[_0x45275a[_0xcde2('0x1f')]],'as':_0x45275a['as'],'attributes':_0x45275a['attributes']};}):[]};}):[]};}):[]:[]})[_0xcde2('0xd')](function(_0x348ca1){logger[_0xcde2('0x15')](_0xcde2('0x21'),_0x4fd5aa);logger[_0xcde2('0x10')](_0xcde2('0x21'),_0x4fd5aa,JSON[_0xcde2('0x22')](_0x348ca1));_0x2b4468(_0x348ca1);})[_0xcde2('0x17')](function(_0x5bf1e6){logger[_0xcde2('0x12')]('GetVtigerAccount',_0x5bf1e6[_0xcde2('0x14')],_0x4fd5aa);_0x582e84(_0x4fe586[_0xcde2('0x12')](0x1f4,_0x5bf1e6[_0xcde2('0x14')]));});});};exports['ShowVtigerAccount']=function(_0xae46dc){var _0x28fedd=this;return new Promise(function(_0x58afb1,_0x26ec42){return db[_0xcde2('0x18')][_0xcde2('0x23')]({'raw':_0xae46dc[_0xcde2('0x1a')]?_0xae46dc[_0xcde2('0x1a')][_0xcde2('0x1b')]===undefined?!![]:![]:!![],'where':_0xae46dc[_0xcde2('0x1a')]?_0xae46dc[_0xcde2('0x1a')]['where']||null:null,'attributes':_0xae46dc[_0xcde2('0x1a')]?_0xae46dc[_0xcde2('0x1a')][_0xcde2('0x20')]||null:null,'include':_0xae46dc[_0xcde2('0x1a')]?_0xae46dc['options'][_0xcde2('0x1e')]?_[_0xcde2('0x24')](_0xae46dc[_0xcde2('0x1a')][_0xcde2('0x1e')],function(_0x498339){return{'model':db[_0x498339[_0xcde2('0x1f')]],'as':_0x498339['as'],'attributes':_0x498339[_0xcde2('0x20')],'include':_0x498339[_0xcde2('0x1e')]?_[_0xcde2('0x24')](_0x498339['include'],function(_0xb9c8d2){return{'model':db[_0xb9c8d2[_0xcde2('0x1f')]],'as':_0xb9c8d2['as'],'attributes':_0xb9c8d2[_0xcde2('0x20')],'include':_0xb9c8d2[_0xcde2('0x1e')]?_[_0xcde2('0x24')](_0xb9c8d2['include'],function(_0x2cd313){return{'model':db[_0x2cd313[_0xcde2('0x1f')]],'as':_0x2cd313['as'],'attributes':_0x2cd313[_0xcde2('0x20')]};}):[]};}):[]};}):[]:[]})[_0xcde2('0xd')](function(_0x4a64c1){logger['info'](_0xcde2('0x25'),_0xae46dc);logger[_0xcde2('0x10')](_0xcde2('0x25'),_0xae46dc,JSON[_0xcde2('0x22')](_0x4a64c1));_0x58afb1(_0x4a64c1);})[_0xcde2('0x17')](function(_0x45af6e){logger[_0xcde2('0x12')](_0xcde2('0x25'),_0x45af6e[_0xcde2('0x14')],_0xae46dc);_0x26ec42(_0x28fedd['error'](0x1f4,_0x45af6e[_0xcde2('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/index.js b/server/api/intVtigerConfiguration/index.js index ed7408a..8486138 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 _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 +var _0x2859=['multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','post','put','update','delete','destroy'];(function(_0x417e0a,_0x446db8){var _0x223dab=function(_0x56978c){while(--_0x56978c){_0x417e0a['push'](_0x417e0a['shift']());}};_0x223dab(++_0x446db8);}(_0x2859,0x90));var _0x9285=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0x2859[_0xc4001c];return _0x49f7bc;};'use strict';var multer=require(_0x9285('0x0'));var util=require(_0x9285('0x1'));var path=require(_0x9285('0x2'));var timeout=require(_0x9285('0x3'));var express=require(_0x9285('0x4'));var router=express[_0x9285('0x5')]();var fs_extra=require(_0x9285('0x6'));var auth=require(_0x9285('0x7'));var interaction=require(_0x9285('0x8'));var config=require('../../config/environment');var controller=require('./intVtigerConfiguration.controller');router[_0x9285('0x9')]('/',auth[_0x9285('0xa')](),controller[_0x9285('0xb')]);router[_0x9285('0x9')](_0x9285('0xc'),auth[_0x9285('0xa')](),controller[_0x9285('0xd')]);router['get'](_0x9285('0xe'),auth[_0x9285('0xa')](),controller[_0x9285('0xf')]);router[_0x9285('0x9')](_0x9285('0x10'),auth[_0x9285('0xa')](),controller['getSubjects']);router['get'](_0x9285('0x11'),auth[_0x9285('0xa')](),controller[_0x9285('0x12')]);router[_0x9285('0x13')]('/',auth[_0x9285('0xa')](),controller['create']);router[_0x9285('0x14')](_0x9285('0xc'),auth[_0x9285('0xa')](),controller[_0x9285('0x15')]);router[_0x9285('0x16')](_0x9285('0xc'),auth[_0x9285('0xa')](),controller[_0x9285('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 35b2956..0fccbc3 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 _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 +var _0x9ec9=['STRING','sequelize','exports'];(function(_0x3418cf,_0x24b5b9){var _0x323adc=function(_0x92fe0b){while(--_0x92fe0b){_0x3418cf['push'](_0x3418cf['shift']());}};_0x323adc(++_0x24b5b9);}(_0x9ec9,0x1c9));var _0x99ec=function(_0x117576,_0x1ced1a){_0x117576=_0x117576-0x0;var _0x4533f5=_0x9ec9[_0x117576];return _0x4533f5;};'use strict';var Sequelize=require(_0x99ec('0x0'));module[_0x99ec('0x1')]={'name':{'type':Sequelize[_0x99ec('0x2')]},'description':{'type':Sequelize[_0x99ec('0x2')]}}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js index cd62e07..dbcefab 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 _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 +var _0x858a=['type','key','model','query','filters','intersection','fields','length','attributes','nolimit','order','sort','where','pick','filter','VIRTUAL','options','VtigerConfiguration','includeAll','include','findAll','rows','params','rawAttributes','keys','create','body','update','find','getFields','findOne','VtigerField','merge','hasOwnProperty','getSubjects','getDescriptions','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','jayson/promise','http','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','destroy','stack','name','send','map','fieldName'];(function(_0x334f9a,_0x542f01){var _0x2b219d=function(_0x25bb3e){while(--_0x25bb3e){_0x334f9a['push'](_0x334f9a['shift']());}};_0x2b219d(++_0x542f01);}(_0x858a,0xde));var _0xa858=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0x858a[_0x36c5b0];return _0xf19333;};'use strict';var emlformat=require(_0xa858('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa858('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa858('0x2'));var moment=require(_0xa858('0x3'));var BPromise=require(_0xa858('0x4'));var Mustache=require(_0xa858('0x5'));var util=require(_0xa858('0x6'));var path=require(_0xa858('0x7'));var sox=require(_0xa858('0x8'));var csv=require('to-csv');var ejs=require(_0xa858('0x9'));var fs=require('fs');var fs_extra=require(_0xa858('0xa'));var _=require(_0xa858('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xa858('0xc'));var deskjs=require(_0xa858('0xd'));var toCsv=require(_0xa858('0xe'));var querystring=require(_0xa858('0xf'));var Papa=require(_0xa858('0x10'));var Redis=require(_0xa858('0x11'));var authService=require(_0xa858('0x12'));var qs=require(_0xa858('0x13'));var as=require(_0xa858('0x14'));var hardwareService=require(_0xa858('0x15'));var logger=require(_0xa858('0x16'))(_0xa858('0x17'));var utils=require(_0xa858('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xa858('0x19'))['db'];var jayson=require(_0xa858('0x1a'));var client=jayson['client'][_0xa858('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x2c342f,_0xf8650e,_0x500de7,_0x5bf9f2){return new BPromise(function(_0x2dc8ee,_0x541519){var _0x2e3b13=_0x5bf9f2||client;return _0x2e3b13['request'](_0x2c342f,_0x500de7)[_0xa858('0x1c')](function(_0x17f102){logger[_0xa858('0x1d')](_0xa858('0x1e'),_0xf8650e,_0xa858('0x1f'));logger[_0xa858('0x20')](_0xa858('0x21'),_0xf8650e,'request\x20sent',JSON[_0xa858('0x22')](_0x17f102));if(_0x17f102[_0xa858('0x23')]){if(_0x17f102['error']['code']===0x1f4){logger[_0xa858('0x23')](_0xa858('0x1e'),_0xf8650e,_0x17f102[_0xa858('0x23')][_0xa858('0x24')]);return _0x541519(_0x17f102[_0xa858('0x23')][_0xa858('0x24')]);}logger[_0xa858('0x23')]('VtigerConfiguration,\x20%s,\x20%s',_0xf8650e,_0x17f102[_0xa858('0x23')][_0xa858('0x24')]);return _0x2dc8ee(_0x17f102['error']['message']);}else{logger[_0xa858('0x1d')](_0xa858('0x1e'),_0xf8650e,_0xa858('0x1f'));_0x2dc8ee(_0x17f102[_0xa858('0x25')][_0xa858('0x24')]);}})[_0xa858('0x26')](function(_0x40901c){logger[_0xa858('0x23')](_0xa858('0x1e'),_0xf8650e,_0x40901c);_0x541519(_0x40901c);});});}function respondWithStatusCode(_0x2ffb3b,_0x1f400e){_0x1f400e=_0x1f400e||0xcc;return function(_0x1f2263){if(_0x1f2263){return _0x2ffb3b[_0xa858('0x27')](_0x1f400e);}return _0x2ffb3b['status'](_0x1f400e)[_0xa858('0x28')]();};}function respondWithResult(_0x529dbe,_0x382771){_0x382771=_0x382771||0xc8;return function(_0x6d5123){if(_0x6d5123){return _0x529dbe[_0xa858('0x29')](_0x382771)[_0xa858('0x2a')](_0x6d5123);}};}function respondWithFilteredResult(_0x5948ed,_0x55527c){return function(_0x384bc6){if(_0x384bc6){var _0x40472a=typeof _0x55527c['offset']===_0xa858('0x2b')&&typeof _0x55527c[_0xa858('0x2c')]===_0xa858('0x2b');var _0x482c96=_0x384bc6[_0xa858('0x2d')];var _0x3bf666=_0x40472a?0x0:_0x55527c[_0xa858('0x2e')];var _0x5836a5=_0x40472a?_0x384bc6[_0xa858('0x2d')]:_0x55527c['offset']+_0x55527c[_0xa858('0x2c')];var _0x83e7d5;if(_0x5836a5>=_0x482c96){_0x5836a5=_0x482c96;_0x83e7d5=0xc8;}else{_0x83e7d5=0xce;}_0x5948ed[_0xa858('0x29')](_0x83e7d5);return _0x5948ed[_0xa858('0x2f')](_0xa858('0x30'),_0x3bf666+'-'+_0x5836a5+'/'+_0x482c96)[_0xa858('0x2a')](_0x384bc6);}return null;};}function patchUpdates(_0x484ba){return function(_0xbac0a0){try{jsonpatch[_0xa858('0x31')](_0xbac0a0,_0x484ba,!![]);}catch(_0x38cbf8){return BPromise[_0xa858('0x32')](_0x38cbf8);}return _0xbac0a0['save']();};}function saveUpdates(_0x492bc7,_0x10d1b6){return function(_0x999bd7){if(_0x999bd7){return _0x999bd7['update'](_0x492bc7)['then'](function(_0x476373){return _0x476373;});}return null;};}function removeEntity(_0xed62d5,_0x5bf26d){return function(_0x5bb6af){if(_0x5bb6af){return _0x5bb6af[_0xa858('0x33')]()[_0xa858('0x1c')](function(){_0xed62d5[_0xa858('0x29')](0xcc)[_0xa858('0x28')]();});}};}function handleEntityNotFound(_0x4e40dc,_0x4d6987){return function(_0x542e20){if(!_0x542e20){_0x4e40dc[_0xa858('0x27')](0x194);}return _0x542e20;};}function handleError(_0x25edca,_0x3884f5){_0x3884f5=_0x3884f5||0x1f4;return function(_0x7338e8){logger[_0xa858('0x23')](_0x7338e8[_0xa858('0x34')]);if(_0x7338e8[_0xa858('0x35')]){delete _0x7338e8[_0xa858('0x35')];}_0x25edca['status'](_0x3884f5)[_0xa858('0x36')](_0x7338e8);};}exports['index']=function(_0x4ff06f,_0x1ed1fb){var _0x3378d6={},_0x36595e={},_0x50408a={'count':0x0,'rows':[]};var _0x27b160=_[_0xa858('0x37')](db['VtigerConfiguration']['rawAttributes'],function(_0x1ba7f3){return{'name':_0x1ba7f3[_0xa858('0x38')],'type':_0x1ba7f3[_0xa858('0x39')][_0xa858('0x3a')]};});_0x36595e[_0xa858('0x3b')]=_[_0xa858('0x37')](_0x27b160,_0xa858('0x35'));_0x36595e['query']=_['keys'](_0x4ff06f[_0xa858('0x3c')]);_0x36595e[_0xa858('0x3d')]=_[_0xa858('0x3e')](_0x36595e[_0xa858('0x3b')],_0x36595e[_0xa858('0x3c')]);_0x3378d6['attributes']=_['intersection'](_0x36595e[_0xa858('0x3b')],qs[_0xa858('0x3f')](_0x4ff06f[_0xa858('0x3c')]['fields']));_0x3378d6['attributes']=_0x3378d6['attributes'][_0xa858('0x40')]?_0x3378d6[_0xa858('0x41')]:_0x36595e[_0xa858('0x3b')];if(!_0x4ff06f[_0xa858('0x3c')]['hasOwnProperty'](_0xa858('0x42'))){_0x3378d6[_0xa858('0x2c')]=qs[_0xa858('0x2c')](_0x4ff06f[_0xa858('0x3c')][_0xa858('0x2c')]);_0x3378d6[_0xa858('0x2e')]=qs[_0xa858('0x2e')](_0x4ff06f[_0xa858('0x3c')]['offset']);}_0x3378d6[_0xa858('0x43')]=qs[_0xa858('0x44')](_0x4ff06f[_0xa858('0x3c')][_0xa858('0x44')]);_0x3378d6[_0xa858('0x45')]=qs['filters'](_[_0xa858('0x46')](_0x4ff06f[_0xa858('0x3c')],_0x36595e[_0xa858('0x3d')]),_0x27b160);if(_0x4ff06f['query'][_0xa858('0x47')]){_0x3378d6[_0xa858('0x45')]=_['merge'](_0x3378d6[_0xa858('0x45')],{'$or':_[_0xa858('0x37')](_0x27b160,function(_0x37ed21){if(_0x37ed21[_0xa858('0x39')]!==_0xa858('0x48')){var _0x4ca5e0={};_0x4ca5e0[_0x37ed21[_0xa858('0x35')]]={'$like':'%'+_0x4ff06f[_0xa858('0x3c')][_0xa858('0x47')]+'%'};return _0x4ca5e0;}})});}_0x3378d6=_['merge']({},_0x3378d6,_0x4ff06f[_0xa858('0x49')]);var _0x2f1fc0={'where':_0x3378d6['where']};return db[_0xa858('0x4a')]['count'](_0x2f1fc0)[_0xa858('0x1c')](function(_0x3e115f){_0x50408a['count']=_0x3e115f;if(_0x4ff06f[_0xa858('0x3c')][_0xa858('0x4b')]){_0x3378d6[_0xa858('0x4c')]=[{'all':!![]}];}return db[_0xa858('0x4a')][_0xa858('0x4d')](_0x3378d6);})['then'](function(_0x2cd1b1){_0x50408a[_0xa858('0x4e')]=_0x2cd1b1;return _0x50408a;})[_0xa858('0x1c')](respondWithFilteredResult(_0x1ed1fb,_0x3378d6))[_0xa858('0x26')](handleError(_0x1ed1fb,null));};exports['show']=function(_0x2669d0,_0x23c080){var _0x4c50e6={'raw':![],'where':{'id':_0x2669d0[_0xa858('0x4f')]['id']}},_0x7b8749={};_0x7b8749[_0xa858('0x3b')]=_['keys'](db['VtigerConfiguration'][_0xa858('0x50')]);_0x7b8749[_0xa858('0x3c')]=_[_0xa858('0x51')](_0x2669d0['query']);_0x7b8749[_0xa858('0x3d')]=_[_0xa858('0x3e')](_0x7b8749[_0xa858('0x3b')],_0x7b8749['query']);_0x4c50e6['attributes']=_[_0xa858('0x3e')](_0x7b8749[_0xa858('0x3b')],qs[_0xa858('0x3f')](_0x2669d0['query'][_0xa858('0x3f')]));_0x4c50e6[_0xa858('0x41')]=_0x4c50e6[_0xa858('0x41')][_0xa858('0x40')]?_0x4c50e6[_0xa858('0x41')]:_0x7b8749[_0xa858('0x3b')];if(_0x2669d0['query'][_0xa858('0x4b')]){_0x4c50e6[_0xa858('0x4c')]=[{'all':!![]}];}_0x4c50e6=_['merge']({},_0x4c50e6,_0x2669d0[_0xa858('0x49')]);return db[_0xa858('0x4a')]['find'](_0x4c50e6)['then'](handleEntityNotFound(_0x23c080,null))[_0xa858('0x1c')](respondWithResult(_0x23c080,null))[_0xa858('0x26')](handleError(_0x23c080,null));};exports[_0xa858('0x52')]=function(_0xfacea7,_0x564402){return db['VtigerConfiguration'][_0xa858('0x52')](_0xfacea7[_0xa858('0x53')],{})[_0xa858('0x1c')](respondWithResult(_0x564402,0xc9))['catch'](handleError(_0x564402,null));};exports[_0xa858('0x54')]=function(_0x291a13,_0x497183){if(_0x291a13[_0xa858('0x53')]['id']){delete _0x291a13[_0xa858('0x53')]['id'];}return db[_0xa858('0x4a')]['find']({'where':{'id':_0x291a13[_0xa858('0x4f')]['id']}})[_0xa858('0x1c')](handleEntityNotFound(_0x497183,null))[_0xa858('0x1c')](saveUpdates(_0x291a13[_0xa858('0x53')],null))[_0xa858('0x1c')](respondWithResult(_0x497183,null))[_0xa858('0x26')](handleError(_0x497183,null));};exports[_0xa858('0x33')]=function(_0x2eafc0,_0x5e7bd9){return db[_0xa858('0x4a')][_0xa858('0x55')]({'where':{'id':_0x2eafc0[_0xa858('0x4f')]['id']}})[_0xa858('0x1c')](handleEntityNotFound(_0x5e7bd9,null))[_0xa858('0x1c')](removeEntity(_0x5e7bd9,null))[_0xa858('0x26')](handleError(_0x5e7bd9,null));};exports[_0xa858('0x56')]=function(_0x17690c,_0x2656d1,_0x5c2e9d){var _0x196408={};var _0x6d7a04={};var _0x9d7210;var _0x336081;return db['VtigerConfiguration'][_0xa858('0x57')]({'where':{'id':_0x17690c[_0xa858('0x4f')]['id']}})[_0xa858('0x1c')](handleEntityNotFound(_0x2656d1,null))[_0xa858('0x1c')](function(_0x32100b){if(_0x32100b){_0x9d7210=_0x32100b;_0x6d7a04[_0xa858('0x3b')]=_['keys'](db[_0xa858('0x58')][_0xa858('0x50')]);_0x6d7a04['query']=_[_0xa858('0x51')](_0x17690c['query']);_0x6d7a04['filters']=_['intersection'](_0x6d7a04[_0xa858('0x3b')],_0x6d7a04['query']);_0x196408[_0xa858('0x41')]=_['intersection'](_0x6d7a04['model'],qs[_0xa858('0x3f')](_0x17690c['query'][_0xa858('0x3f')]));_0x196408[_0xa858('0x41')]=_0x196408[_0xa858('0x41')][_0xa858('0x40')]?_0x196408[_0xa858('0x41')]:_0x6d7a04[_0xa858('0x3b')];_0x196408[_0xa858('0x43')]=qs[_0xa858('0x44')](_0x17690c[_0xa858('0x3c')][_0xa858('0x44')]);_0x196408[_0xa858('0x45')]=qs[_0xa858('0x3d')](_[_0xa858('0x46')](_0x17690c['query'],_0x6d7a04['filters']));if(_0x17690c[_0xa858('0x3c')][_0xa858('0x47')]){_0x196408[_0xa858('0x45')]=_[_0xa858('0x59')](_0x196408[_0xa858('0x45')],{'$or':_['map'](_0x196408[_0xa858('0x41')],function(_0x391fdb){var _0x269a12={};_0x269a12[_0x391fdb]={'$like':'%'+_0x17690c[_0xa858('0x3c')][_0xa858('0x47')]+'%'};return _0x269a12;})});}_0x196408=_[_0xa858('0x59')]({},_0x196408,_0x17690c[_0xa858('0x49')]);return _0x9d7210[_0xa858('0x56')](_0x196408);}})['then'](function(_0x54defb){if(_0x54defb){_0x336081=_0x54defb[_0xa858('0x40')];if(!_0x17690c['query'][_0xa858('0x5a')]('nolimit')){_0x196408[_0xa858('0x2c')]=qs[_0xa858('0x2c')](_0x17690c[_0xa858('0x3c')][_0xa858('0x2c')]);_0x196408['offset']=qs[_0xa858('0x2e')](_0x17690c['query'][_0xa858('0x2e')]);}return _0x9d7210[_0xa858('0x56')](_0x196408);}})[_0xa858('0x1c')](function(_0x32cecd){if(_0x32cecd){return _0x32cecd?{'count':_0x336081,'rows':_0x32cecd}:null;}})['then'](respondWithResult(_0x2656d1,null))[_0xa858('0x26')](handleError(_0x2656d1,null));};exports[_0xa858('0x5b')]=function(_0x2f8d73,_0x13cc3,_0x252f91){var _0x26468c={};var _0xa2b698={};var _0x36b04c;var _0x37d147;return db[_0xa858('0x4a')][_0xa858('0x57')]({'where':{'id':_0x2f8d73['params']['id']}})[_0xa858('0x1c')](handleEntityNotFound(_0x13cc3,null))[_0xa858('0x1c')](function(_0x177b51){if(_0x177b51){_0x36b04c=_0x177b51;_0xa2b698[_0xa858('0x3b')]=_['keys'](db[_0xa858('0x58')][_0xa858('0x50')]);_0xa2b698[_0xa858('0x3c')]=_['keys'](_0x2f8d73[_0xa858('0x3c')]);_0xa2b698[_0xa858('0x3d')]=_[_0xa858('0x3e')](_0xa2b698[_0xa858('0x3b')],_0xa2b698[_0xa858('0x3c')]);_0x26468c[_0xa858('0x41')]=_['intersection'](_0xa2b698[_0xa858('0x3b')],qs[_0xa858('0x3f')](_0x2f8d73[_0xa858('0x3c')][_0xa858('0x3f')]));_0x26468c[_0xa858('0x41')]=_0x26468c['attributes']['length']?_0x26468c['attributes']:_0xa2b698[_0xa858('0x3b')];_0x26468c[_0xa858('0x43')]=qs[_0xa858('0x44')](_0x2f8d73['query'][_0xa858('0x44')]);_0x26468c[_0xa858('0x45')]=qs[_0xa858('0x3d')](_['pick'](_0x2f8d73[_0xa858('0x3c')],_0xa2b698['filters']));if(_0x2f8d73[_0xa858('0x3c')]['filter']){_0x26468c[_0xa858('0x45')]=_[_0xa858('0x59')](_0x26468c[_0xa858('0x45')],{'$or':_['map'](_0x26468c['attributes'],function(_0x4dfbfe){var _0xdd373e={};_0xdd373e[_0x4dfbfe]={'$like':'%'+_0x2f8d73[_0xa858('0x3c')][_0xa858('0x47')]+'%'};return _0xdd373e;})});}_0x26468c=_[_0xa858('0x59')]({},_0x26468c,_0x2f8d73[_0xa858('0x49')]);return _0x36b04c[_0xa858('0x5b')](_0x26468c);}})[_0xa858('0x1c')](function(_0x13c645){if(_0x13c645){_0x37d147=_0x13c645[_0xa858('0x40')];if(!_0x2f8d73[_0xa858('0x3c')][_0xa858('0x5a')](_0xa858('0x42'))){_0x26468c[_0xa858('0x2c')]=qs[_0xa858('0x2c')](_0x2f8d73['query']['limit']);_0x26468c['offset']=qs[_0xa858('0x2e')](_0x2f8d73[_0xa858('0x3c')][_0xa858('0x2e')]);}return _0x36b04c[_0xa858('0x5b')](_0x26468c);}})['then'](function(_0x38bb64){if(_0x38bb64){return _0x38bb64?{'count':_0x37d147,'rows':_0x38bb64}:null;}})[_0xa858('0x1c')](respondWithResult(_0x13cc3,null))['catch'](handleError(_0x13cc3,null));};exports['getDescriptions']=function(_0x962dbb,_0x22dbba,_0x10c96d){var _0x385683={};var _0x487e30={};var _0x519c3e;var _0x406fc3;return db[_0xa858('0x4a')]['findOne']({'where':{'id':_0x962dbb[_0xa858('0x4f')]['id']}})[_0xa858('0x1c')](handleEntityNotFound(_0x22dbba,null))['then'](function(_0x27658f){if(_0x27658f){_0x519c3e=_0x27658f;_0x487e30[_0xa858('0x3b')]=_[_0xa858('0x51')](db['VtigerField'][_0xa858('0x50')]);_0x487e30[_0xa858('0x3c')]=_[_0xa858('0x51')](_0x962dbb['query']);_0x487e30[_0xa858('0x3d')]=_[_0xa858('0x3e')](_0x487e30[_0xa858('0x3b')],_0x487e30[_0xa858('0x3c')]);_0x385683[_0xa858('0x41')]=_[_0xa858('0x3e')](_0x487e30[_0xa858('0x3b')],qs[_0xa858('0x3f')](_0x962dbb[_0xa858('0x3c')][_0xa858('0x3f')]));_0x385683[_0xa858('0x41')]=_0x385683[_0xa858('0x41')][_0xa858('0x40')]?_0x385683[_0xa858('0x41')]:_0x487e30['model'];_0x385683[_0xa858('0x43')]=qs[_0xa858('0x44')](_0x962dbb[_0xa858('0x3c')][_0xa858('0x44')]);_0x385683[_0xa858('0x45')]=qs[_0xa858('0x3d')](_[_0xa858('0x46')](_0x962dbb['query'],_0x487e30[_0xa858('0x3d')]));if(_0x962dbb[_0xa858('0x3c')][_0xa858('0x47')]){_0x385683[_0xa858('0x45')]=_[_0xa858('0x59')](_0x385683['where'],{'$or':_['map'](_0x385683[_0xa858('0x41')],function(_0x2b6c56){var _0x5e025f={};_0x5e025f[_0x2b6c56]={'$like':'%'+_0x962dbb[_0xa858('0x3c')][_0xa858('0x47')]+'%'};return _0x5e025f;})});}_0x385683=_['merge']({},_0x385683,_0x962dbb[_0xa858('0x49')]);return _0x519c3e[_0xa858('0x5c')](_0x385683);}})['then'](function(_0x4d9ae3){if(_0x4d9ae3){_0x406fc3=_0x4d9ae3[_0xa858('0x40')];if(!_0x962dbb[_0xa858('0x3c')][_0xa858('0x5a')](_0xa858('0x42'))){_0x385683[_0xa858('0x2c')]=qs['limit'](_0x962dbb[_0xa858('0x3c')][_0xa858('0x2c')]);_0x385683[_0xa858('0x2e')]=qs[_0xa858('0x2e')](_0x962dbb[_0xa858('0x3c')]['offset']);}return _0x519c3e[_0xa858('0x5c')](_0x385683);}})[_0xa858('0x1c')](function(_0xe5a18a){if(_0xe5a18a){return _0xe5a18a?{'count':_0x406fc3,'rows':_0xe5a18a}:null;}})[_0xa858('0x1c')](respondWithResult(_0x22dbba,null))[_0xa858('0x26')](handleError(_0x22dbba,null));}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js index a571f2d..937356b 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 _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 +var _0xd84a=['VtigerConfiguration','lodash','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./intVtigerConfiguration.attributes','exports','define'];(function(_0x56acaf,_0xaf1203){var _0x5b3fd8=function(_0x3f5784){while(--_0x3f5784){_0x56acaf['push'](_0x56acaf['shift']());}};_0x5b3fd8(++_0xaf1203);}(_0xd84a,0xfe));var _0xad84=function(_0x4bf793,_0x404922){_0x4bf793=_0x4bf793-0x0;var _0x55a44b=_0xd84a[_0x4bf793];return _0x55a44b;};'use strict';var _=require(_0xad84('0x0'));var util=require(_0xad84('0x1'));var logger=require(_0xad84('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xad84('0x3'));var fs=require('fs');var path=require(_0xad84('0x4'));var rimraf=require(_0xad84('0x5'));var config=require(_0xad84('0x6'));var attributes=require(_0xad84('0x7'));module[_0xad84('0x8')]=function(_0x15487c,_0x33226e){return _0x15487c[_0xad84('0x9')](_0xad84('0xa'),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 563c4f2..11a7444 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 _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 +var _0x0c88=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','VtigerConfiguration,\x20%s,\x20%s','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','lodash','moment'];(function(_0x3679a5,_0x46e7ba){var _0x52b455=function(_0x4524e6){while(--_0x4524e6){_0x3679a5['push'](_0x3679a5['shift']());}};_0x52b455(++_0x46e7ba);}(_0x0c88,0x106));var _0x80c8=function(_0x42ebba,_0x4cbf87){_0x42ebba=_0x42ebba-0x0;var _0x3fd2af=_0x0c88[_0x42ebba];return _0x3fd2af;};'use strict';var _=require(_0x80c8('0x0'));var util=require('util');var moment=require(_0x80c8('0x1'));var BPromise=require(_0x80c8('0x2'));var rs=require(_0x80c8('0x3'));var fs=require('fs');var Redis=require(_0x80c8('0x4'));var db=require(_0x80c8('0x5'))['db'];var utils=require(_0x80c8('0x6'));var logger=require(_0x80c8('0x7'))(_0x80c8('0x8'));var config=require(_0x80c8('0x9'));var jayson=require(_0x80c8('0xa'));var client=jayson[_0x80c8('0xb')][_0x80c8('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x38b0be,_0x4f3400,_0x56d79c){return new BPromise(function(_0x1da0f2,_0x3cccaa){return client[_0x80c8('0xd')](_0x38b0be,_0x56d79c)['then'](function(_0x3c2884){logger[_0x80c8('0xe')](_0x80c8('0xf'),_0x4f3400,'request\x20sent');logger['debug'](_0x80c8('0x10'),_0x4f3400,'request\x20sent',JSON[_0x80c8('0x11')](_0x3c2884));if(_0x3c2884[_0x80c8('0x12')]){if(_0x3c2884[_0x80c8('0x12')][_0x80c8('0x13')]===0x1f4){logger[_0x80c8('0x12')](_0x80c8('0xf'),_0x4f3400,_0x3c2884[_0x80c8('0x12')][_0x80c8('0x14')]);return _0x3cccaa(_0x3c2884['error'][_0x80c8('0x14')]);}logger['error'](_0x80c8('0xf'),_0x4f3400,_0x3c2884['error'][_0x80c8('0x14')]);return _0x1da0f2(_0x3c2884[_0x80c8('0x12')][_0x80c8('0x14')]);}else{logger['info'](_0x80c8('0xf'),_0x4f3400,_0x80c8('0x15'));_0x1da0f2(_0x3c2884[_0x80c8('0x16')][_0x80c8('0x14')]);}})[_0x80c8('0x17')](function(_0x1e4139){logger['error'](_0x80c8('0xf'),_0x4f3400,_0x1e4139);_0x3cccaa(_0x1e4139);});});} \ No newline at end of file diff --git a/server/api/intVtigerField/index.js b/server/api/intVtigerField/index.js index 95c1d63..e157172 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 _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 +var _0x6302=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerField.controller','isAuthenticated','index','/:id','show','create','put','exports','multer','util','connect-timeout','Router'];(function(_0x28ea86,_0x15dee1){var _0x45bf56=function(_0x20013f){while(--_0x20013f){_0x28ea86['push'](_0x28ea86['shift']());}};_0x45bf56(++_0x15dee1);}(_0x6302,0x11c));var _0x2630=function(_0xcda446,_0x3f8f5f){_0xcda446=_0xcda446-0x0;var _0x1dfcee=_0x6302[_0xcda446];return _0x1dfcee;};'use strict';var multer=require(_0x2630('0x0'));var util=require(_0x2630('0x1'));var path=require('path');var timeout=require(_0x2630('0x2'));var express=require('express');var router=express[_0x2630('0x3')]();var fs_extra=require(_0x2630('0x4'));var auth=require(_0x2630('0x5'));var interaction=require(_0x2630('0x6'));var config=require(_0x2630('0x7'));var controller=require(_0x2630('0x8'));router['get']('/',auth[_0x2630('0x9')](),controller[_0x2630('0xa')]);router['get'](_0x2630('0xb'),auth[_0x2630('0x9')](),controller[_0x2630('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x2630('0xd')]);router[_0x2630('0xe')]('/:id',auth[_0x2630('0x9')](),controller['update']);router['delete'](_0x2630('0xb'),auth[_0x2630('0x9')](),controller['destroy']);module[_0x2630('0xf')]=router; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.attributes.js b/server/api/intVtigerField/intVtigerField.attributes.js index df8e79d..7fa59ef 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 _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 +var _0x4578=['string','STRING','sequelize','exports','ENUM','variable','keyValue','picklist'];(function(_0xeec31d,_0x189f0c){var _0x5915e1=function(_0x2cf944){while(--_0x2cf944){_0xeec31d['push'](_0xeec31d['shift']());}};_0x5915e1(++_0x189f0c);}(_0x4578,0x14a));var _0x8457=function(_0x2983ac,_0x56402d){_0x2983ac=_0x2983ac-0x0;var _0x24798d=_0x4578[_0x2983ac];return _0x24798d;};'use strict';var Sequelize=require(_0x8457('0x0'));module[_0x8457('0x1')]={'type':{'type':Sequelize[_0x8457('0x2')]('string',_0x8457('0x3'),'customVariable',_0x8457('0x4'),_0x8457('0x5')),'defaultValue':_0x8457('0x6')},'content':{'type':Sequelize[_0x8457('0x7')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x8457('0x2')](_0x8457('0x6'),_0x8457('0x3'),'customVariable')},'keyContent':{'type':Sequelize[_0x8457('0x7')]},'idField':{'type':Sequelize[_0x8457('0x7')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8457('0x7')]}}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.controller.js b/server/api/intVtigerField/intVtigerField.controller.js index 46d8594..190f414 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 _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 +var _0xb0eb=['../../mysqldb','status','json','undefined','limit','count','offset','apply','reject','update','then','destroy','end','sendStatus','error','stack','name','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','VtigerField','findAll','catch','params','create','body','find','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x30c649,_0x2ebbac){var _0x3edfb9=function(_0xab82f5){while(--_0xab82f5){_0x30c649['push'](_0x30c649['shift']());}};_0x3edfb9(++_0x2ebbac);}(_0xb0eb,0x79));var _0xbb0e=function(_0x56e7e2,_0x7c29bb){_0x56e7e2=_0x56e7e2-0x0;var _0x53468f=_0xb0eb[_0x56e7e2];return _0x53468f;};'use strict';var emlformat=require(_0xbb0e('0x0'));var rimraf=require(_0xbb0e('0x1'));var zipdir=require(_0xbb0e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbb0e('0x3'));var moment=require('moment');var BPromise=require(_0xbb0e('0x4'));var Mustache=require(_0xbb0e('0x5'));var util=require(_0xbb0e('0x6'));var path=require(_0xbb0e('0x7'));var sox=require(_0xbb0e('0x8'));var csv=require(_0xbb0e('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbb0e('0xa'));var _=require(_0xbb0e('0xb'));var squel=require(_0xbb0e('0xc'));var crypto=require(_0xbb0e('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xbb0e('0xe'));var toCsv=require(_0xbb0e('0x9'));var querystring=require(_0xbb0e('0xf'));var Papa=require('papaparse');var Redis=require(_0xbb0e('0x10'));var authService=require(_0xbb0e('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xbb0e('0x12'));var hardwareService=require(_0xbb0e('0x13'));var logger=require(_0xbb0e('0x14'))(_0xbb0e('0x15'));var utils=require(_0xbb0e('0x16'));var config=require(_0xbb0e('0x17'));var licenseUtil=require(_0xbb0e('0x18'));var db=require(_0xbb0e('0x19'))['db'];function respondWithStatusCode(_0x2b4ff5,_0x3760de){_0x3760de=_0x3760de||0xcc;return function(_0x976d3){if(_0x976d3){return _0x2b4ff5['sendStatus'](_0x3760de);}return _0x2b4ff5[_0xbb0e('0x1a')](_0x3760de)['end']();};}function respondWithResult(_0x5bb62b,_0x4899a6){_0x4899a6=_0x4899a6||0xc8;return function(_0x43cfad){if(_0x43cfad){return _0x5bb62b[_0xbb0e('0x1a')](_0x4899a6)[_0xbb0e('0x1b')](_0x43cfad);}};}function respondWithFilteredResult(_0x31bf63,_0x3511b0){return function(_0x4bc006){if(_0x4bc006){var _0x498702=typeof _0x3511b0['offset']===_0xbb0e('0x1c')&&typeof _0x3511b0[_0xbb0e('0x1d')]==='undefined';var _0x38533e=_0x4bc006['count'];var _0x268549=_0x498702?0x0:_0x3511b0['offset'];var _0x47c968=_0x498702?_0x4bc006[_0xbb0e('0x1e')]:_0x3511b0[_0xbb0e('0x1f')]+_0x3511b0[_0xbb0e('0x1d')];var _0x28cc24;if(_0x47c968>=_0x38533e){_0x47c968=_0x38533e;_0x28cc24=0xc8;}else{_0x28cc24=0xce;}_0x31bf63[_0xbb0e('0x1a')](_0x28cc24);return _0x31bf63['set']('Content-Range',_0x268549+'-'+_0x47c968+'/'+_0x38533e)['json'](_0x4bc006);}return null;};}function patchUpdates(_0x5ea4b0){return function(_0x3b971b){try{jsonpatch[_0xbb0e('0x20')](_0x3b971b,_0x5ea4b0,!![]);}catch(_0x535bd8){return BPromise[_0xbb0e('0x21')](_0x535bd8);}return _0x3b971b['save']();};}function saveUpdates(_0xe3ba3f,_0x386069){return function(_0x16a0dd){if(_0x16a0dd){return _0x16a0dd[_0xbb0e('0x22')](_0xe3ba3f)[_0xbb0e('0x23')](function(_0x266143){return _0x266143;});}return null;};}function removeEntity(_0x3ec1c1,_0x4ad48f){return function(_0x568838){if(_0x568838){return _0x568838[_0xbb0e('0x24')]()[_0xbb0e('0x23')](function(){_0x3ec1c1[_0xbb0e('0x1a')](0xcc)[_0xbb0e('0x25')]();});}};}function handleEntityNotFound(_0x33d476,_0x663f5f){return function(_0x2dbb19){if(!_0x2dbb19){_0x33d476[_0xbb0e('0x26')](0x194);}return _0x2dbb19;};}function handleError(_0x1bd811,_0x3672e0){_0x3672e0=_0x3672e0||0x1f4;return function(_0x114893){logger[_0xbb0e('0x27')](_0x114893[_0xbb0e('0x28')]);if(_0x114893[_0xbb0e('0x29')]){delete _0x114893[_0xbb0e('0x29')];}_0x1bd811['status'](_0x3672e0)['send'](_0x114893);};}exports[_0xbb0e('0x2a')]=function(_0x1ef4d4,_0x4b32f7){var _0x411d16={},_0x575b55={},_0x715d72={'count':0x0,'rows':[]};var _0x32cffd=_[_0xbb0e('0x2b')](db['VtigerField'][_0xbb0e('0x2c')],function(_0x416e2f){return{'name':_0x416e2f[_0xbb0e('0x2d')],'type':_0x416e2f['type'][_0xbb0e('0x2e')]};});_0x575b55[_0xbb0e('0x2f')]=_[_0xbb0e('0x2b')](_0x32cffd,_0xbb0e('0x29'));_0x575b55[_0xbb0e('0x30')]=_[_0xbb0e('0x31')](_0x1ef4d4[_0xbb0e('0x30')]);_0x575b55[_0xbb0e('0x32')]=_[_0xbb0e('0x33')](_0x575b55[_0xbb0e('0x2f')],_0x575b55[_0xbb0e('0x30')]);_0x411d16[_0xbb0e('0x34')]=_[_0xbb0e('0x33')](_0x575b55['model'],qs[_0xbb0e('0x35')](_0x1ef4d4[_0xbb0e('0x30')]['fields']));_0x411d16[_0xbb0e('0x34')]=_0x411d16[_0xbb0e('0x34')][_0xbb0e('0x36')]?_0x411d16['attributes']:_0x575b55[_0xbb0e('0x2f')];if(!_0x1ef4d4['query']['hasOwnProperty'](_0xbb0e('0x37'))){_0x411d16['limit']=qs[_0xbb0e('0x1d')](_0x1ef4d4[_0xbb0e('0x30')][_0xbb0e('0x1d')]);_0x411d16[_0xbb0e('0x1f')]=qs[_0xbb0e('0x1f')](_0x1ef4d4[_0xbb0e('0x30')]['offset']);}_0x411d16[_0xbb0e('0x38')]=qs['sort'](_0x1ef4d4[_0xbb0e('0x30')][_0xbb0e('0x39')]);_0x411d16['where']=qs[_0xbb0e('0x32')](_[_0xbb0e('0x3a')](_0x1ef4d4[_0xbb0e('0x30')],_0x575b55['filters']),_0x32cffd);if(_0x1ef4d4[_0xbb0e('0x30')][_0xbb0e('0x3b')]){_0x411d16[_0xbb0e('0x3c')]=_[_0xbb0e('0x3d')](_0x411d16[_0xbb0e('0x3c')],{'$or':_['map'](_0x32cffd,function(_0x32415f){if(_0x32415f['type']!==_0xbb0e('0x3e')){var _0x2ce303={};_0x2ce303[_0x32415f[_0xbb0e('0x29')]]={'$like':'%'+_0x1ef4d4['query']['filter']+'%'};return _0x2ce303;}})});}_0x411d16=_[_0xbb0e('0x3d')]({},_0x411d16,_0x1ef4d4[_0xbb0e('0x3f')]);var _0x150b80={'where':_0x411d16[_0xbb0e('0x3c')]};return db['VtigerField'][_0xbb0e('0x1e')](_0x150b80)['then'](function(_0x391718){_0x715d72[_0xbb0e('0x1e')]=_0x391718;if(_0x1ef4d4[_0xbb0e('0x30')][_0xbb0e('0x40')]){_0x411d16[_0xbb0e('0x41')]=[{'all':!![]}];}return db[_0xbb0e('0x42')][_0xbb0e('0x43')](_0x411d16);})['then'](function(_0x32652f){_0x715d72['rows']=_0x32652f;return _0x715d72;})[_0xbb0e('0x23')](respondWithFilteredResult(_0x4b32f7,_0x411d16))[_0xbb0e('0x44')](handleError(_0x4b32f7,null));};exports['show']=function(_0x52d168,_0x146b17){var _0x23f408={'raw':!![],'where':{'id':_0x52d168[_0xbb0e('0x45')]['id']}},_0x50f5aa={};_0x50f5aa[_0xbb0e('0x2f')]=_['keys'](db['VtigerField']['rawAttributes']);_0x50f5aa['query']=_['keys'](_0x52d168[_0xbb0e('0x30')]);_0x50f5aa['filters']=_[_0xbb0e('0x33')](_0x50f5aa[_0xbb0e('0x2f')],_0x50f5aa[_0xbb0e('0x30')]);_0x23f408[_0xbb0e('0x34')]=_[_0xbb0e('0x33')](_0x50f5aa[_0xbb0e('0x2f')],qs[_0xbb0e('0x35')](_0x52d168[_0xbb0e('0x30')][_0xbb0e('0x35')]));_0x23f408[_0xbb0e('0x34')]=_0x23f408[_0xbb0e('0x34')]['length']?_0x23f408[_0xbb0e('0x34')]:_0x50f5aa['model'];if(_0x52d168[_0xbb0e('0x30')][_0xbb0e('0x40')]){_0x23f408[_0xbb0e('0x41')]=[{'all':!![]}];}_0x23f408=_['merge']({},_0x23f408,_0x52d168[_0xbb0e('0x3f')]);return db[_0xbb0e('0x42')]['find'](_0x23f408)[_0xbb0e('0x23')](handleEntityNotFound(_0x146b17,null))[_0xbb0e('0x23')](respondWithResult(_0x146b17,null))[_0xbb0e('0x44')](handleError(_0x146b17,null));};exports['create']=function(_0x57b59d,_0x551d06){return db['VtigerField'][_0xbb0e('0x46')](_0x57b59d[_0xbb0e('0x47')],{})['then'](respondWithResult(_0x551d06,0xc9))['catch'](handleError(_0x551d06,null));};exports['update']=function(_0x5bdeb0,_0x54a488){if(_0x5bdeb0[_0xbb0e('0x47')]['id']){delete _0x5bdeb0[_0xbb0e('0x47')]['id'];}return db[_0xbb0e('0x42')][_0xbb0e('0x48')]({'where':{'id':_0x5bdeb0[_0xbb0e('0x45')]['id']}})[_0xbb0e('0x23')](handleEntityNotFound(_0x54a488,null))[_0xbb0e('0x23')](saveUpdates(_0x5bdeb0[_0xbb0e('0x47')],null))[_0xbb0e('0x23')](respondWithResult(_0x54a488,null))[_0xbb0e('0x44')](handleError(_0x54a488,null));};exports[_0xbb0e('0x24')]=function(_0x14a89a,_0x20efa4){return db[_0xbb0e('0x42')][_0xbb0e('0x48')]({'where':{'id':_0x14a89a[_0xbb0e('0x45')]['id']}})[_0xbb0e('0x23')](handleEntityNotFound(_0x20efa4,null))['then'](removeEntity(_0x20efa4,null))[_0xbb0e('0x44')](handleError(_0x20efa4,null));}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.model.js b/server/api/intVtigerField/intVtigerField.model.js index 8184a12..7c7c4e9 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 _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 +var _0x0829=['idField','FieldId','lodash','util','api','bluebird','path','rimraf','../../config/environment','./intVtigerField.attributes','int_vtiger_fields'];(function(_0x304b67,_0x31cb39){var _0x493afb=function(_0x21dce3){while(--_0x21dce3){_0x304b67['push'](_0x304b67['shift']());}};_0x493afb(++_0x31cb39);}(_0x0829,0x1a4));var _0x9082=function(_0x48b371,_0x3b7253){_0x48b371=_0x48b371-0x0;var _0x18f6f5=_0x0829[_0x48b371];return _0x18f6f5;};'use strict';var _=require(_0x9082('0x0'));var util=require(_0x9082('0x1'));var logger=require('../../config/logger')(_0x9082('0x2'));var moment=require('moment');var BPromise=require(_0x9082('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9082('0x4'));var rimraf=require(_0x9082('0x5'));var config=require(_0x9082('0x6'));var attributes=require(_0x9082('0x7'));module['exports']=function(_0xb8d4d2,_0x460e55){return _0xb8d4d2['define']('VtigerField',attributes,{'tableName':_0x9082('0x8'),'paranoid':![],'indexes':[{'name':'vtiger_unique_index','fields':[_0x9082('0x9'),_0x9082('0xa')],'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 c11a1eb..c654dbd 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 _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 +var _0xd5f7=['../../config/logger','rpc','jayson/promise','http','request','then','info','request\x20sent','debug','VtigerField,\x20%s,\x20%s,\x20%s','stringify','error','VtigerField,\x20%s,\x20%s','message','result','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x1feefc,_0x2b9493){var _0x2b87e3=function(_0x377ec3){while(--_0x377ec3){_0x1feefc['push'](_0x1feefc['shift']());}};_0x2b87e3(++_0x2b9493);}(_0xd5f7,0x120));var _0x7d5f=function(_0x3366d7,_0x2d9454){_0x3366d7=_0x3366d7-0x0;var _0x580892=_0xd5f7[_0x3366d7];return _0x580892;};'use strict';var _=require(_0x7d5f('0x0'));var util=require('util');var moment=require(_0x7d5f('0x1'));var BPromise=require('bluebird');var rs=require(_0x7d5f('0x2'));var fs=require('fs');var Redis=require(_0x7d5f('0x3'));var db=require(_0x7d5f('0x4'))['db'];var utils=require(_0x7d5f('0x5'));var logger=require(_0x7d5f('0x6'))(_0x7d5f('0x7'));var config=require('../../config/environment');var jayson=require(_0x7d5f('0x8'));var client=jayson['client'][_0x7d5f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4e184b,_0x1258e3,_0x1f22df){return new BPromise(function(_0x63b41a,_0x14ef30){return client[_0x7d5f('0xa')](_0x4e184b,_0x1f22df)[_0x7d5f('0xb')](function(_0x4f8470){logger[_0x7d5f('0xc')]('VtigerField,\x20%s,\x20%s',_0x1258e3,_0x7d5f('0xd'));logger[_0x7d5f('0xe')](_0x7d5f('0xf'),_0x1258e3,_0x7d5f('0xd'),JSON[_0x7d5f('0x10')](_0x4f8470));if(_0x4f8470[_0x7d5f('0x11')]){if(_0x4f8470[_0x7d5f('0x11')]['code']===0x1f4){logger[_0x7d5f('0x11')](_0x7d5f('0x12'),_0x1258e3,_0x4f8470[_0x7d5f('0x11')][_0x7d5f('0x13')]);return _0x14ef30(_0x4f8470['error'][_0x7d5f('0x13')]);}logger[_0x7d5f('0x11')](_0x7d5f('0x12'),_0x1258e3,_0x4f8470[_0x7d5f('0x11')][_0x7d5f('0x13')]);return _0x63b41a(_0x4f8470[_0x7d5f('0x11')][_0x7d5f('0x13')]);}else{logger[_0x7d5f('0xc')](_0x7d5f('0x12'),_0x1258e3,_0x7d5f('0xd'));_0x63b41a(_0x4f8470[_0x7d5f('0x14')][_0x7d5f('0x13')]);}})['catch'](function(_0x5203f3){logger[_0x7d5f('0x11')](_0x7d5f('0x12'),_0x1258e3,_0x5203f3);_0x14ef30(_0x5203f3);});});} \ No newline at end of file diff --git a/server/api/intZendeskAccount/index.js b/server/api/intZendeskAccount/index.js index f19c63f..438f80b 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 _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 +var _0xcfb8=['getFields','post','create','addConfiguration','put','update','delete','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','/:id','show','getConfigurations','/:id/fields'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xcfb8,0x1c1));var _0x8cfb=function(_0xa362b5,_0x5e2d7d){_0xa362b5=_0xa362b5-0x0;var _0x2b84a5=_0xcfb8[_0xa362b5];return _0x2b84a5;};'use strict';var multer=require(_0x8cfb('0x0'));var util=require(_0x8cfb('0x1'));var path=require('path');var timeout=require(_0x8cfb('0x2'));var express=require(_0x8cfb('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x8cfb('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x8cfb('0x5'));var controller=require(_0x8cfb('0x6'));router[_0x8cfb('0x7')]('/',auth[_0x8cfb('0x8')](),controller['index']);router[_0x8cfb('0x7')](_0x8cfb('0x9'),auth['isAuthenticated'](),controller[_0x8cfb('0xa')]);router[_0x8cfb('0x7')]('/:id/configurations',auth[_0x8cfb('0x8')](),controller[_0x8cfb('0xb')]);router[_0x8cfb('0x7')](_0x8cfb('0xc'),auth[_0x8cfb('0x8')](),controller[_0x8cfb('0xd')]);router[_0x8cfb('0xe')]('/',auth[_0x8cfb('0x8')](),controller[_0x8cfb('0xf')]);router[_0x8cfb('0xe')]('/:id/configurations',auth[_0x8cfb('0x8')](),controller[_0x8cfb('0x10')]);router[_0x8cfb('0x11')]('/:id',auth[_0x8cfb('0x8')](),controller[_0x8cfb('0x12')]);router[_0x8cfb('0x13')]('/:id',auth[_0x8cfb('0x8')](),controller['destroy']);module[_0x8cfb('0x14')]=router; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.attributes.js b/server/api/intZendeskAccount/intZendeskAccount.attributes.js index 7352aaa..cd2c018 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 _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 +var _0x6363=['token','newTab','sequelize','STRING','username','remoteUri','ENUM','password'];(function(_0x33d18a,_0x1de268){var _0x27c3db=function(_0xbb0da6){while(--_0xbb0da6){_0x33d18a['push'](_0x33d18a['shift']());}};_0x27c3db(++_0x1de268);}(_0x6363,0x13a));var _0x3636=function(_0x5f5bd1,_0x53816a){_0x5f5bd1=_0x5f5bd1-0x0;var _0x22d441=_0x6363[_0x5f5bd1];return _0x22d441;};'use strict';var Sequelize=require(_0x3636('0x0'));module['exports']={'name':{'type':Sequelize[_0x3636('0x1')]},'description':{'type':Sequelize[_0x3636('0x1')]},'username':{'type':Sequelize[_0x3636('0x1')],'unique':_0x3636('0x2')},'password':{'type':Sequelize[_0x3636('0x1')]},'token':{'type':Sequelize[_0x3636('0x1')]},'remoteUri':{'type':Sequelize[_0x3636('0x1')],'unique':_0x3636('0x3')},'authType':{'type':Sequelize[_0x3636('0x4')](_0x3636('0x5'),_0x3636('0x6')),'defaultValue':_0x3636('0x5')},'serverUrl':{'type':Sequelize[_0x3636('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x3636('0x4')]('integrationTab',_0x3636('0x7')),'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 743b97b..735dac7 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 _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 +var _0x314c=['VIRTUAL','merge','include','findAll','rows','show','includeAll','find','create','body','params','destroy','getConfigurations','findOne','ZendeskConfiguration','addConfiguration','AccountId','Subjects','channel','getDescriptions','ZendeskField','Descriptions','getFields','username','password','token','authType','remoteUri','substring','lastIndexOf','GET','format','ticket_fields','headers','Basic\x20%s','%s:%s','toString','%s/token:%s','base64','Sequelize','ValidationError','subject','description','group','assignee','remove','includes','position','system_field_options','custom_field_options','statusCode','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','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','../../components/integrations/configuration','client','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','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','sendStatus','stack','name','send','index','map','ZendeskAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x314c,0xb9));var _0xc314=function(_0x1f36bb,_0x8af718){_0x1f36bb=_0x1f36bb-0x0;var _0xaf97fa=_0x314c[_0x1f36bb];return _0xaf97fa;};'use strict';var emlformat=require(_0xc314('0x0'));var rimraf=require(_0xc314('0x1'));var zipdir=require(_0xc314('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xc314('0x3'));var BPromise=require(_0xc314('0x4'));var Mustache=require(_0xc314('0x5'));var util=require('util');var path=require(_0xc314('0x6'));var sox=require(_0xc314('0x7'));var csv=require(_0xc314('0x8'));var ejs=require(_0xc314('0x9'));var fs=require('fs');var fs_extra=require(_0xc314('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc314('0xb'));var deskjs=require(_0xc314('0xc'));var toCsv=require(_0xc314('0x8'));var querystring=require(_0xc314('0xd'));var Papa=require(_0xc314('0xe'));var Redis=require(_0xc314('0xf'));var authService=require(_0xc314('0x10'));var qs=require(_0xc314('0x11'));var as=require(_0xc314('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc314('0x13'))(_0xc314('0x14'));var utils=require(_0xc314('0x15'));var config=require(_0xc314('0x16'));var licenseUtil=require(_0xc314('0x17'));var db=require(_0xc314('0x18'))['db'];var integrations=require(_0xc314('0x19'));var jayson=require('jayson/promise');var client=jayson[_0xc314('0x1a')][_0xc314('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x16579c,_0x402825,_0x48dceb,_0x3e566f){return new BPromise(function(_0x398b63,_0x35bf3b){var _0x2fe3ce=_0x3e566f||client;return _0x2fe3ce[_0xc314('0x1c')](_0x16579c,_0x48dceb)[_0xc314('0x1d')](function(_0xcd18d7){logger[_0xc314('0x1e')](_0xc314('0x1f'),_0x402825,_0xc314('0x20'));logger[_0xc314('0x21')](_0xc314('0x22'),_0x402825,_0xc314('0x20'),JSON[_0xc314('0x23')](_0xcd18d7));if(_0xcd18d7[_0xc314('0x24')]){if(_0xcd18d7[_0xc314('0x24')][_0xc314('0x25')]===0x1f4){logger[_0xc314('0x24')](_0xc314('0x1f'),_0x402825,_0xcd18d7[_0xc314('0x24')]['message']);return _0x35bf3b(_0xcd18d7[_0xc314('0x24')][_0xc314('0x26')]);}logger[_0xc314('0x24')](_0xc314('0x1f'),_0x402825,_0xcd18d7[_0xc314('0x24')][_0xc314('0x26')]);return _0x398b63(_0xcd18d7[_0xc314('0x24')][_0xc314('0x26')]);}else{logger[_0xc314('0x1e')](_0xc314('0x1f'),_0x402825,_0xc314('0x20'));_0x398b63(_0xcd18d7[_0xc314('0x27')][_0xc314('0x26')]);}})[_0xc314('0x28')](function(_0x52dedf){logger[_0xc314('0x24')]('ZendeskAccount,\x20%s,\x20%s',_0x402825,_0x52dedf);_0x35bf3b(_0x52dedf);});});}function respondWithStatusCode(_0x474598,_0x5875ff){_0x5875ff=_0x5875ff||0xcc;return function(_0x494d0d){if(_0x494d0d){return _0x474598['sendStatus'](_0x5875ff);}return _0x474598[_0xc314('0x29')](_0x5875ff)[_0xc314('0x2a')]();};}function respondWithResult(_0x558b9c,_0x57df03){_0x57df03=_0x57df03||0xc8;return function(_0x36e57a){if(_0x36e57a){return _0x558b9c[_0xc314('0x29')](_0x57df03)[_0xc314('0x2b')](_0x36e57a);}};}function respondWithFilteredResult(_0x1dd9c1,_0x2876bd){return function(_0x40c053){if(_0x40c053){var _0x320d84=typeof _0x2876bd[_0xc314('0x2c')]===_0xc314('0x2d')&&typeof _0x2876bd[_0xc314('0x2e')]==='undefined';var _0x550489=_0x40c053['count'];var _0x3f5a43=_0x320d84?0x0:_0x2876bd['offset'];var _0xc39d6f=_0x320d84?_0x40c053[_0xc314('0x2f')]:_0x2876bd[_0xc314('0x2c')]+_0x2876bd[_0xc314('0x2e')];var _0x54160c;if(_0xc39d6f>=_0x550489){_0xc39d6f=_0x550489;_0x54160c=0xc8;}else{_0x54160c=0xce;}_0x1dd9c1[_0xc314('0x29')](_0x54160c);return _0x1dd9c1[_0xc314('0x30')](_0xc314('0x31'),_0x3f5a43+'-'+_0xc39d6f+'/'+_0x550489)[_0xc314('0x2b')](_0x40c053);}return null;};}function patchUpdates(_0x1a687b){return function(_0x5deb0c){try{jsonpatch[_0xc314('0x32')](_0x5deb0c,_0x1a687b,!![]);}catch(_0x299e30){return BPromise[_0xc314('0x33')](_0x299e30);}return _0x5deb0c[_0xc314('0x34')]();};}function saveUpdates(_0x356f3d,_0x417a38){return function(_0x23367c){if(_0x23367c){return _0x23367c[_0xc314('0x35')](_0x356f3d)['then'](function(_0x458df1){return _0x458df1;});}return null;};}function removeEntity(_0x216dd8,_0x59e670){return function(_0x44cbd1){if(_0x44cbd1){return _0x44cbd1['destroy']()[_0xc314('0x1d')](function(){_0x216dd8['status'](0xcc)[_0xc314('0x2a')]();});}};}function handleEntityNotFound(_0x124567,_0x1071d9){return function(_0x4a302e){if(!_0x4a302e){_0x124567[_0xc314('0x36')](0x194);}return _0x4a302e;};}function handleError(_0x3f6666,_0x30db68){_0x30db68=_0x30db68||0x1f4;return function(_0x75d74f){logger['error'](_0x75d74f[_0xc314('0x37')]);if(_0x75d74f[_0xc314('0x38')]){delete _0x75d74f['name'];}_0x3f6666[_0xc314('0x29')](_0x30db68)[_0xc314('0x39')](_0x75d74f);};}exports[_0xc314('0x3a')]=function(_0x21fb90,_0x1228da){var _0x15f529={},_0x5ca981={},_0x271ce8={'count':0x0,'rows':[]};var _0x16dfdc=_[_0xc314('0x3b')](db[_0xc314('0x3c')][_0xc314('0x3d')],function(_0x496b2d){return{'name':_0x496b2d[_0xc314('0x3e')],'type':_0x496b2d[_0xc314('0x3f')][_0xc314('0x40')]};});_0x5ca981[_0xc314('0x41')]=_['map'](_0x16dfdc,_0xc314('0x38'));_0x5ca981[_0xc314('0x42')]=_[_0xc314('0x43')](_0x21fb90['query']);_0x5ca981[_0xc314('0x44')]=_[_0xc314('0x45')](_0x5ca981[_0xc314('0x41')],_0x5ca981[_0xc314('0x42')]);_0x15f529[_0xc314('0x46')]=_[_0xc314('0x45')](_0x5ca981[_0xc314('0x41')],qs['fields'](_0x21fb90[_0xc314('0x42')][_0xc314('0x47')]));_0x15f529[_0xc314('0x46')]=_0x15f529['attributes'][_0xc314('0x48')]?_0x15f529['attributes']:_0x5ca981[_0xc314('0x41')];if(!_0x21fb90[_0xc314('0x42')]['hasOwnProperty'](_0xc314('0x49'))){_0x15f529[_0xc314('0x2e')]=qs[_0xc314('0x2e')](_0x21fb90[_0xc314('0x42')]['limit']);_0x15f529['offset']=qs[_0xc314('0x2c')](_0x21fb90['query'][_0xc314('0x2c')]);}_0x15f529[_0xc314('0x4a')]=qs[_0xc314('0x4b')](_0x21fb90[_0xc314('0x42')]['sort']);_0x15f529['where']=qs[_0xc314('0x44')](_[_0xc314('0x4c')](_0x21fb90['query'],_0x5ca981['filters']),_0x16dfdc);if(_0x21fb90[_0xc314('0x42')][_0xc314('0x4d')]){_0x15f529['where']=_['merge'](_0x15f529[_0xc314('0x4e')],{'$or':_[_0xc314('0x3b')](_0x16dfdc,function(_0x41c203){if(_0x41c203[_0xc314('0x3f')]!==_0xc314('0x4f')){var _0x2b2272={};_0x2b2272[_0x41c203[_0xc314('0x38')]]={'$like':'%'+_0x21fb90[_0xc314('0x42')][_0xc314('0x4d')]+'%'};return _0x2b2272;}})});}_0x15f529=_[_0xc314('0x50')]({},_0x15f529,_0x21fb90['options']);var _0x8d88de={'where':_0x15f529[_0xc314('0x4e')]};return db['ZendeskAccount'][_0xc314('0x2f')](_0x8d88de)[_0xc314('0x1d')](function(_0x55fdce){_0x271ce8[_0xc314('0x2f')]=_0x55fdce;if(_0x21fb90[_0xc314('0x42')]['includeAll']){_0x15f529[_0xc314('0x51')]=[{'all':!![]}];}return db['ZendeskAccount'][_0xc314('0x52')](_0x15f529);})['then'](function(_0x2e9a34){_0x271ce8[_0xc314('0x53')]=_0x2e9a34;return _0x271ce8;})[_0xc314('0x1d')](respondWithFilteredResult(_0x1228da,_0x15f529))[_0xc314('0x28')](handleError(_0x1228da,null));};exports[_0xc314('0x54')]=function(_0x1286d9,_0x2bd180){var _0x230a46={'raw':![],'where':{'id':_0x1286d9['params']['id']}},_0x1ee059={};_0x1ee059[_0xc314('0x41')]=_[_0xc314('0x43')](db[_0xc314('0x3c')][_0xc314('0x3d')]);_0x1ee059[_0xc314('0x42')]=_[_0xc314('0x43')](_0x1286d9[_0xc314('0x42')]);_0x1ee059['filters']=_['intersection'](_0x1ee059[_0xc314('0x41')],_0x1ee059[_0xc314('0x42')]);_0x230a46[_0xc314('0x46')]=_[_0xc314('0x45')](_0x1ee059[_0xc314('0x41')],qs[_0xc314('0x47')](_0x1286d9[_0xc314('0x42')][_0xc314('0x47')]));_0x230a46[_0xc314('0x46')]=_0x230a46[_0xc314('0x46')]['length']?_0x230a46['attributes']:_0x1ee059[_0xc314('0x41')];if(_0x1286d9['query'][_0xc314('0x55')]){_0x230a46['include']=[{'all':!![]}];}_0x230a46=_[_0xc314('0x50')]({},_0x230a46,_0x1286d9['options']);return db[_0xc314('0x3c')][_0xc314('0x56')](_0x230a46)[_0xc314('0x1d')](handleEntityNotFound(_0x2bd180,null))['then'](respondWithResult(_0x2bd180,null))['catch'](handleError(_0x2bd180,null));};exports['create']=function(_0x1b0bc2,_0x3bcb62){return db[_0xc314('0x3c')][_0xc314('0x57')](_0x1b0bc2[_0xc314('0x58')],{})['then'](respondWithResult(_0x3bcb62,0xc9))[_0xc314('0x28')](handleError(_0x3bcb62,null));};exports[_0xc314('0x35')]=function(_0x555899,_0x1f8d48){if(_0x555899[_0xc314('0x58')]['id']){delete _0x555899[_0xc314('0x58')]['id'];}return db[_0xc314('0x3c')]['find']({'where':{'id':_0x555899[_0xc314('0x59')]['id']}})['then'](handleEntityNotFound(_0x1f8d48,null))['then'](saveUpdates(_0x555899[_0xc314('0x58')],null))['then'](respondWithResult(_0x1f8d48,null))[_0xc314('0x28')](handleError(_0x1f8d48,null));};exports[_0xc314('0x5a')]=function(_0x17eaf6,_0x527ba4){return db['ZendeskAccount'][_0xc314('0x56')]({'where':{'id':_0x17eaf6[_0xc314('0x59')]['id']}})[_0xc314('0x1d')](handleEntityNotFound(_0x527ba4,null))[_0xc314('0x1d')](removeEntity(_0x527ba4,null))[_0xc314('0x28')](handleError(_0x527ba4,null));};exports[_0xc314('0x5b')]=function(_0x17b162,_0x25042a,_0x288e2e){var _0x3280e1={};var _0x14ca4d={};var _0x1c00b7;var _0x3be5d2;return db[_0xc314('0x3c')][_0xc314('0x5c')]({'where':{'id':_0x17b162['params']['id']}})[_0xc314('0x1d')](handleEntityNotFound(_0x25042a,null))[_0xc314('0x1d')](function(_0x337a15){if(_0x337a15){_0x1c00b7=_0x337a15;_0x14ca4d[_0xc314('0x41')]=_[_0xc314('0x43')](db[_0xc314('0x5d')]['rawAttributes']);_0x14ca4d[_0xc314('0x42')]=_['keys'](_0x17b162['query']);_0x14ca4d[_0xc314('0x44')]=_[_0xc314('0x45')](_0x14ca4d[_0xc314('0x41')],_0x14ca4d[_0xc314('0x42')]);_0x3280e1[_0xc314('0x46')]=_[_0xc314('0x45')](_0x14ca4d[_0xc314('0x41')],qs[_0xc314('0x47')](_0x17b162[_0xc314('0x42')]['fields']));_0x3280e1[_0xc314('0x46')]=_0x3280e1[_0xc314('0x46')][_0xc314('0x48')]?_0x3280e1[_0xc314('0x46')]:_0x14ca4d[_0xc314('0x41')];_0x3280e1['order']=qs[_0xc314('0x4b')](_0x17b162[_0xc314('0x42')][_0xc314('0x4b')]);_0x3280e1[_0xc314('0x4e')]=qs['filters'](_['pick'](_0x17b162[_0xc314('0x42')],_0x14ca4d[_0xc314('0x44')]));if(_0x17b162['query'][_0xc314('0x4d')]){_0x3280e1[_0xc314('0x4e')]=_['merge'](_0x3280e1[_0xc314('0x4e')],{'$or':_[_0xc314('0x3b')](_0x3280e1[_0xc314('0x46')],function(_0x129167){var _0x18d411={};_0x18d411[_0x129167]={'$like':'%'+_0x17b162[_0xc314('0x42')][_0xc314('0x4d')]+'%'};return _0x18d411;})});}_0x3280e1=_[_0xc314('0x50')]({},_0x3280e1,_0x17b162['options']);return _0x1c00b7[_0xc314('0x5b')](_0x3280e1);}})[_0xc314('0x1d')](function(_0x157605){if(_0x157605){_0x3be5d2=_0x157605[_0xc314('0x48')];if(!_0x17b162['query']['hasOwnProperty']('nolimit')){_0x3280e1[_0xc314('0x2e')]=qs[_0xc314('0x2e')](_0x17b162[_0xc314('0x42')][_0xc314('0x2e')]);_0x3280e1[_0xc314('0x2c')]=qs[_0xc314('0x2c')](_0x17b162[_0xc314('0x42')][_0xc314('0x2c')]);}return _0x1c00b7[_0xc314('0x5b')](_0x3280e1);}})[_0xc314('0x1d')](function(_0xd3d7fc){if(_0xd3d7fc){return _0xd3d7fc?{'count':_0x3be5d2,'rows':_0xd3d7fc}:null;}})['then'](respondWithResult(_0x25042a,null))[_0xc314('0x28')](handleError(_0x25042a,null));};exports[_0xc314('0x5e')]=function(_0x1e9223,_0x31eb1d,_0x23d9d8){if(_0x1e9223[_0xc314('0x58')]['id']){delete _0x1e9223[_0xc314('0x58')]['id'];}return db[_0xc314('0x3c')]['findOne']({'where':{'id':_0x1e9223['params']['id']}})['then'](handleEntityNotFound(_0x31eb1d,null))[_0xc314('0x1d')](function(_0x436ab6){if(_0x436ab6){_0x1e9223[_0xc314('0x58')][_0xc314('0x5f')]=_0x436ab6['id'];_0x1e9223['body'][_0xc314('0x60')]=integrations['getSubjects'](_0x1e9223[_0xc314('0x58')][_0xc314('0x61')],_0x1e9223[_0xc314('0x58')]['type']);_0x1e9223[_0xc314('0x58')]['Descriptions']=integrations[_0xc314('0x62')](_0x1e9223[_0xc314('0x58')][_0xc314('0x61')],_0x1e9223[_0xc314('0x58')][_0xc314('0x3f')]);return db[_0xc314('0x5d')][_0xc314('0x57')](_0x1e9223['body'],{'include':[{'model':db[_0xc314('0x63')],'as':'Subjects'},{'model':db[_0xc314('0x63')],'as':_0xc314('0x64')}]});}return null;})[_0xc314('0x1d')](respondWithResult(_0x31eb1d,null))['catch'](handleError(_0x31eb1d,null));};exports[_0xc314('0x65')]=function(_0x442049,_0x2ce87c,_0x20aa81){var _0xcabf0b='';return db['ZendeskAccount'][_0xc314('0x5c')]({'where':{'id':_0x442049['params']['id']},'attributes':['id',_0xc314('0x66'),_0xc314('0x67'),_0xc314('0x68'),_0xc314('0x69'),_0xc314('0x6a')]})['then'](handleEntityNotFound(_0x2ce87c,null))[_0xc314('0x1d')](function(_0x56865b){if(_0x56865b){_0xcabf0b=_0x56865b[_0xc314('0x6a')];var _0x187356=_0xcabf0b['slice'](-0x1);if(_0x187356==='/'){_0xcabf0b=_0xcabf0b[_0xc314('0x6b')](0x0,_0xcabf0b[_0xc314('0x6c')](_0x187356));}var _0x1dccfb={'method':_0xc314('0x6d'),'uri':util[_0xc314('0x6e')]('%s/%s',_0xcabf0b,_0xc314('0x6f')),'json':!![]};switch(_0x56865b['authType']){case _0xc314('0x67'):_0x1dccfb[_0xc314('0x70')]={'Authorization':util['format'](_0xc314('0x71'),new Buffer(util[_0xc314('0x6e')](_0xc314('0x72'),_0x56865b[_0xc314('0x66')],_0x56865b['password']))[_0xc314('0x73')]('base64'))};break;case _0xc314('0x68'):_0x1dccfb[_0xc314('0x70')]={'Authorization':util['format']('Basic\x20%s',new Buffer(util[_0xc314('0x6e')](_0xc314('0x74'),_0x56865b[_0xc314('0x66')],_0x56865b[_0xc314('0x68')]))[_0xc314('0x73')](_0xc314('0x75')))};break;default:throw new db[(_0xc314('0x76'))][(_0xc314('0x77'))]('Unknown\x20authentication\x20type');}return rp(_0x1dccfb);}})[_0xc314('0x1d')](function(_0x5778d7){if(_0x5778d7){var _0x284d36=[_0xc314('0x78'),_0xc314('0x79'),_0xc314('0x7a'),_0xc314('0x7b')];_[_0xc314('0x7c')](_0x5778d7[_0xc314('0x6f')],function(_0x18cbef){return _0x284d36[_0xc314('0x7d')](_0x18cbef[_0xc314('0x3f')]);});return{'count':_0x5778d7[_0xc314('0x6f')][_0xc314('0x48')],'rows':_['map'](_0x5778d7[_0xc314('0x6f')],function(_0x5d42dc){return{'id':_0x5d42dc['id'],'name':_0x5d42dc[_0xc314('0x7e')]>0x7?_0x5d42dc['title']:_0x5d42dc[_0xc314('0x3f')],'custom':_0x5d42dc['position']>0x7?!![]:![],'options':_0x5d42dc[_0xc314('0x7f')]?_0x5d42dc[_0xc314('0x7f')]:_0x5d42dc[_0xc314('0x80')]?_0x5d42dc['custom_field_options']:[]};})};}})['then'](respondWithResult(_0x2ce87c,null))['catch'](function(_0x178d0b){var _0x387029=_0x442049[_0xc314('0x42')]['test']?0x1f4:_0x178d0b[_0xc314('0x81')]||0x1f4;logger[_0xc314('0x24')]('getFields,\x20%s,\x20%s,\x20%s',_0xc314('0x65'),_0x387029,JSON[_0xc314('0x23')](_0x178d0b));delete _0x178d0b[_0xc314('0x38')];if(_0x387029===0x191){_0x387029=0x190;}_0x2ce87c[_0xc314('0x29')](_0x387029)[_0xc314('0x39')](_0x442049['query'][_0xc314('0x82')]?{'message':_0xc314('0x83'),'statusCode':_0x178d0b[_0xc314('0x81')]}:_0x178d0b);});}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.model.js b/server/api/intZendeskAccount/intZendeskAccount.model.js index 3276d47..0a95dfc 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 _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 +var _0xb9ca=['bluebird','request-promise','path','../../config/environment','./intZendeskAccount.attributes','../../components/integrations/configuration','exports','define','ZendeskAccount','int_zendesk_accounts','lodash','../../config/logger','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb9ca,0x176));var _0xab9c=function(_0x17a33e,_0x1b38fe){_0x17a33e=_0x17a33e-0x0;var _0x4801d0=_0xb9ca[_0x17a33e];return _0x4801d0;};'use strict';var _=require(_0xab9c('0x0'));var util=require('util');var logger=require(_0xab9c('0x1'))('api');var moment=require(_0xab9c('0x2'));var BPromise=require(_0xab9c('0x3'));var rp=require(_0xab9c('0x4'));var fs=require('fs');var path=require(_0xab9c('0x5'));var rimraf=require('rimraf');var config=require(_0xab9c('0x6'));var attributes=require(_0xab9c('0x7'));var integrations=require(_0xab9c('0x8'));module[_0xab9c('0x9')]=function(_0x5ba821,_0x5afd53){return _0x5ba821[_0xab9c('0xa')](_0xab9c('0xb'),attributes,{'tableName':_0xab9c('0xc'),'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 858141d..65d07b5 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 _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 +var _0xf033=['debug','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','GetZendeskAccount','ZendeskAccount','findAll','options','where','attributes','include','model','map','ShowZendeskAccount','find','raw'];(function(_0x323413,_0x421d63){var _0xe2aca0=function(_0x427f9c){while(--_0x427f9c){_0x323413['push'](_0x323413['shift']());}};_0xe2aca0(++_0x421d63);}(_0xf033,0x6e));var _0x3f03=function(_0x332005,_0x24edf1){_0x332005=_0x332005-0x0;var _0x4393e1=_0xf033[_0x332005];return _0x4393e1;};'use strict';var _=require('lodash');var util=require(_0x3f03('0x0'));var moment=require(_0x3f03('0x1'));var BPromise=require(_0x3f03('0x2'));var rs=require(_0x3f03('0x3'));var fs=require('fs');var Redis=require(_0x3f03('0x4'));var db=require(_0x3f03('0x5'))['db'];var utils=require(_0x3f03('0x6'));var logger=require(_0x3f03('0x7'))('rpc');var config=require(_0x3f03('0x8'));var jayson=require(_0x3f03('0x9'));var client=jayson[_0x3f03('0xa')][_0x3f03('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xd3338,_0x84686f,_0x179b42){return new BPromise(function(_0x361630,_0x4b6903){return client[_0x3f03('0xc')](_0xd3338,_0x179b42)[_0x3f03('0xd')](function(_0x13bd7b){logger[_0x3f03('0xe')](_0x3f03('0xf'),_0x84686f,_0x3f03('0x10'));logger['debug'](_0x3f03('0x11'),_0x84686f,_0x3f03('0x10'),JSON[_0x3f03('0x12')](_0x13bd7b));if(_0x13bd7b['error']){if(_0x13bd7b['error'][_0x3f03('0x13')]===0x1f4){logger['error'](_0x3f03('0xf'),_0x84686f,_0x13bd7b[_0x3f03('0x14')][_0x3f03('0x15')]);return _0x4b6903(_0x13bd7b['error'][_0x3f03('0x15')]);}logger['error'](_0x3f03('0xf'),_0x84686f,_0x13bd7b[_0x3f03('0x14')][_0x3f03('0x15')]);return _0x361630(_0x13bd7b[_0x3f03('0x14')][_0x3f03('0x15')]);}else{logger[_0x3f03('0xe')](_0x3f03('0xf'),_0x84686f,_0x3f03('0x10'));_0x361630(_0x13bd7b['result'][_0x3f03('0x15')]);}})['catch'](function(_0x3a451c){logger[_0x3f03('0x14')]('ZendeskAccount,\x20%s,\x20%s',_0x84686f,_0x3a451c);_0x4b6903(_0x3a451c);});});}exports[_0x3f03('0x16')]=function(_0x2b14fc){var _0x1a0e55=this;return new Promise(function(_0x47ae5b,_0x2960aa){return db[_0x3f03('0x17')][_0x3f03('0x18')]({'raw':_0x2b14fc[_0x3f03('0x19')]?_0x2b14fc['options']['raw']===undefined?!![]:![]:!![],'where':_0x2b14fc['options']?_0x2b14fc['options'][_0x3f03('0x1a')]||null:null,'attributes':_0x2b14fc['options']?_0x2b14fc['options'][_0x3f03('0x1b')]||null:null,'limit':_0x2b14fc[_0x3f03('0x19')]?_0x2b14fc['options']['limit']||null:null,'include':_0x2b14fc['options']?_0x2b14fc['options'][_0x3f03('0x1c')]?_['map'](_0x2b14fc['options'][_0x3f03('0x1c')],function(_0x53b864){return{'model':db[_0x53b864[_0x3f03('0x1d')]],'as':_0x53b864['as'],'attributes':_0x53b864[_0x3f03('0x1b')],'include':_0x53b864[_0x3f03('0x1c')]?_[_0x3f03('0x1e')](_0x53b864[_0x3f03('0x1c')],function(_0x2d6c20){return{'model':db[_0x2d6c20[_0x3f03('0x1d')]],'as':_0x2d6c20['as'],'attributes':_0x2d6c20[_0x3f03('0x1b')],'include':_0x2d6c20['include']?_[_0x3f03('0x1e')](_0x2d6c20[_0x3f03('0x1c')],function(_0x4a2135){return{'model':db[_0x4a2135['model']],'as':_0x4a2135['as'],'attributes':_0x4a2135[_0x3f03('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3f03('0xd')](function(_0x46dee2){logger['info'](_0x3f03('0x16'),_0x2b14fc);logger['debug'](_0x3f03('0x16'),_0x2b14fc,JSON[_0x3f03('0x12')](_0x46dee2));_0x47ae5b(_0x46dee2);})['catch'](function(_0x43c793){logger[_0x3f03('0x14')](_0x3f03('0x16'),_0x43c793[_0x3f03('0x15')],_0x2b14fc);_0x2960aa(_0x1a0e55[_0x3f03('0x14')](0x1f4,_0x43c793['message']));});});};exports[_0x3f03('0x1f')]=function(_0x3323a4){var _0xc677e9=this;return new Promise(function(_0x599c2c,_0xe4fe17){return db[_0x3f03('0x17')][_0x3f03('0x20')]({'raw':_0x3323a4['options']?_0x3323a4['options'][_0x3f03('0x21')]===undefined?!![]:![]:!![],'where':_0x3323a4[_0x3f03('0x19')]?_0x3323a4[_0x3f03('0x19')]['where']||null:null,'attributes':_0x3323a4[_0x3f03('0x19')]?_0x3323a4[_0x3f03('0x19')]['attributes']||null:null,'include':_0x3323a4[_0x3f03('0x19')]?_0x3323a4['options'][_0x3f03('0x1c')]?_['map'](_0x3323a4['options'][_0x3f03('0x1c')],function(_0x3445a7){return{'model':db[_0x3445a7[_0x3f03('0x1d')]],'as':_0x3445a7['as'],'attributes':_0x3445a7[_0x3f03('0x1b')],'include':_0x3445a7[_0x3f03('0x1c')]?_['map'](_0x3445a7['include'],function(_0x3a43dc){return{'model':db[_0x3a43dc[_0x3f03('0x1d')]],'as':_0x3a43dc['as'],'attributes':_0x3a43dc[_0x3f03('0x1b')],'include':_0x3a43dc[_0x3f03('0x1c')]?_['map'](_0x3a43dc[_0x3f03('0x1c')],function(_0x11c3d6){return{'model':db[_0x11c3d6[_0x3f03('0x1d')]],'as':_0x11c3d6['as'],'attributes':_0x11c3d6['attributes']};}):[]};}):[]};}):[]:[]})[_0x3f03('0xd')](function(_0x40ff88){logger[_0x3f03('0xe')](_0x3f03('0x1f'),_0x3323a4);logger[_0x3f03('0x22')](_0x3f03('0x1f'),_0x3323a4,JSON[_0x3f03('0x12')](_0x40ff88));_0x599c2c(_0x40ff88);})[_0x3f03('0x23')](function(_0x28e690){logger[_0x3f03('0x14')]('ShowZendeskAccount',_0x28e690['message'],_0x3323a4);_0xe4fe17(_0xc677e9[_0x3f03('0x14')](0x1f4,_0x28e690[_0x3f03('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/index.js b/server/api/intZendeskConfiguration/index.js index 5e6c848..88abe9e 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 _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 +var _0x878f=['../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','get','/:id','/:id/fields','/:id/subjects','isAuthenticated','/:id/descriptions','getDescriptions','/:id/tags','getTags','create','post','setTags','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x3b76f7,_0x566c53){var _0x43984e=function(_0x164f77){while(--_0x164f77){_0x3b76f7['push'](_0x3b76f7['shift']());}};_0x43984e(++_0x566c53);}(_0x878f,0x173));var _0xf878=function(_0x304d9d,_0x3f1cd4){_0x304d9d=_0x304d9d-0x0;var _0x381124=_0x878f[_0x304d9d];return _0x381124;};'use strict';var multer=require('multer');var util=require(_0xf878('0x0'));var path=require(_0xf878('0x1'));var timeout=require(_0xf878('0x2'));var express=require(_0xf878('0x3'));var router=express[_0xf878('0x4')]();var fs_extra=require(_0xf878('0x5'));var auth=require(_0xf878('0x6'));var interaction=require(_0xf878('0x7'));var config=require(_0xf878('0x8'));var controller=require(_0xf878('0x9'));router[_0xf878('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xf878('0xa')](_0xf878('0xb'),auth['isAuthenticated'](),controller['show']);router['get'](_0xf878('0xc'),auth['isAuthenticated'](),controller['getFields']);router[_0xf878('0xa')](_0xf878('0xd'),auth[_0xf878('0xe')](),controller['getSubjects']);router[_0xf878('0xa')](_0xf878('0xf'),auth['isAuthenticated'](),controller[_0xf878('0x10')]);router['get'](_0xf878('0x11'),auth[_0xf878('0xe')](),controller[_0xf878('0x12')]);router['post']('/',auth[_0xf878('0xe')](),controller[_0xf878('0x13')]);router[_0xf878('0x14')]('/:id/tags',auth[_0xf878('0xe')](),controller[_0xf878('0x15')]);router[_0xf878('0x16')]('/:id',auth['isAuthenticated'](),controller[_0xf878('0x17')]);router[_0xf878('0x18')](_0xf878('0xb'),auth[_0xf878('0xe')](),controller[_0xf878('0x19')]);module[_0xf878('0x1a')]=router; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js index 56f5bb0..2258bb7 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 _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 +var _0xb904=['STRING','exports'];(function(_0x1732ab,_0x3ea517){var _0xe332c2=function(_0x2be6d6){while(--_0x2be6d6){_0x1732ab['push'](_0x1732ab['shift']());}};_0xe332c2(++_0x3ea517);}(_0xb904,0x119));var _0x4b90=function(_0x10c087,_0x5e0a77){_0x10c087=_0x10c087-0x0;var _0x37b416=_0xb904[_0x10c087];return _0x37b416;};'use strict';var Sequelize=require('sequelize');module[_0x4b90('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x4b90('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js index 6acf734..5e99c5c 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 _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 +var _0x03a6=['moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','ZendeskConfiguration,\x20%s,\x20%s','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','update','destroy','sendStatus','stack','send','index','rawAttributes','type','key','map','name','query','keys','intersection','attributes','fields','length','model','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','VIRTUAL','options','ZendeskConfiguration','include','findAll','rows','catch','show','params','includeAll','find','create','body','getFields','findOne','ZendeskField','getSubjects','getDescriptions','getTags','Tag','setTags','ids','rimraf','fast-json-patch','request-promise'];(function(_0x451daf,_0xde12fa){var _0x15ee2c=function(_0x3bd5dc){while(--_0x3bd5dc){_0x451daf['push'](_0x451daf['shift']());}};_0x15ee2c(++_0xde12fa);}(_0x03a6,0x185));var _0x603a=function(_0x37d13b,_0x43d74c){_0x37d13b=_0x37d13b-0x0;var _0xaf04a1=_0x03a6[_0x37d13b];return _0xaf04a1;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x603a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x603a('0x1'));var rp=require(_0x603a('0x2'));var moment=require(_0x603a('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x603a('0x4'));var util=require(_0x603a('0x5'));var path=require(_0x603a('0x6'));var sox=require(_0x603a('0x7'));var csv=require(_0x603a('0x8'));var ejs=require(_0x603a('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x603a('0xa'));var squel=require(_0x603a('0xb'));var crypto=require(_0x603a('0xc'));var jsforce=require(_0x603a('0xd'));var deskjs=require(_0x603a('0xe'));var toCsv=require(_0x603a('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x603a('0xf'));var authService=require(_0x603a('0x10'));var qs=require(_0x603a('0x11'));var as=require(_0x603a('0x12'));var hardwareService=require(_0x603a('0x13'));var logger=require(_0x603a('0x14'))(_0x603a('0x15'));var utils=require(_0x603a('0x16'));var config=require(_0x603a('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var jayson=require(_0x603a('0x18'));var client=jayson[_0x603a('0x19')][_0x603a('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x55ae95,_0x10690f,_0x178b54,_0x41325f){return new BPromise(function(_0x3d4fe1,_0x59c457){var _0x1490fa=_0x41325f||client;return _0x1490fa[_0x603a('0x1b')](_0x55ae95,_0x178b54)[_0x603a('0x1c')](function(_0x1357bd){logger[_0x603a('0x1d')](_0x603a('0x1e'),_0x10690f,'request\x20sent');logger[_0x603a('0x1f')](_0x603a('0x20'),_0x10690f,_0x603a('0x21'),JSON[_0x603a('0x22')](_0x1357bd));if(_0x1357bd[_0x603a('0x23')]){if(_0x1357bd['error'][_0x603a('0x24')]===0x1f4){logger[_0x603a('0x23')]('ZendeskConfiguration,\x20%s,\x20%s',_0x10690f,_0x1357bd[_0x603a('0x23')]['message']);return _0x59c457(_0x1357bd[_0x603a('0x23')][_0x603a('0x25')]);}logger['error']('ZendeskConfiguration,\x20%s,\x20%s',_0x10690f,_0x1357bd['error'][_0x603a('0x25')]);return _0x3d4fe1(_0x1357bd[_0x603a('0x23')][_0x603a('0x25')]);}else{logger[_0x603a('0x1d')](_0x603a('0x1e'),_0x10690f,'request\x20sent');_0x3d4fe1(_0x1357bd['result'][_0x603a('0x25')]);}})['catch'](function(_0x5699d7){logger[_0x603a('0x23')](_0x603a('0x1e'),_0x10690f,_0x5699d7);_0x59c457(_0x5699d7);});});}function respondWithStatusCode(_0x1022db,_0x4cf157){_0x4cf157=_0x4cf157||0xcc;return function(_0x4bf773){if(_0x4bf773){return _0x1022db['sendStatus'](_0x4cf157);}return _0x1022db[_0x603a('0x26')](_0x4cf157)[_0x603a('0x27')]();};}function respondWithResult(_0x3cb00c,_0xab812b){_0xab812b=_0xab812b||0xc8;return function(_0x255d82){if(_0x255d82){return _0x3cb00c['status'](_0xab812b)[_0x603a('0x28')](_0x255d82);}};}function respondWithFilteredResult(_0x48b376,_0x22743d){return function(_0x1a052b){if(_0x1a052b){var _0x1fa33f=typeof _0x22743d['offset']==='undefined'&&typeof _0x22743d['limit']===_0x603a('0x29');var _0x1bca80=_0x1a052b[_0x603a('0x2a')];var _0x5bb8b6=_0x1fa33f?0x0:_0x22743d[_0x603a('0x2b')];var _0x353c5b=_0x1fa33f?_0x1a052b[_0x603a('0x2a')]:_0x22743d[_0x603a('0x2b')]+_0x22743d[_0x603a('0x2c')];var _0x40a313;if(_0x353c5b>=_0x1bca80){_0x353c5b=_0x1bca80;_0x40a313=0xc8;}else{_0x40a313=0xce;}_0x48b376[_0x603a('0x26')](_0x40a313);return _0x48b376[_0x603a('0x2d')](_0x603a('0x2e'),_0x5bb8b6+'-'+_0x353c5b+'/'+_0x1bca80)[_0x603a('0x28')](_0x1a052b);}return null;};}function patchUpdates(_0x9c02b){return function(_0x558a9e){try{jsonpatch[_0x603a('0x2f')](_0x558a9e,_0x9c02b,!![]);}catch(_0x494d19){return BPromise[_0x603a('0x30')](_0x494d19);}return _0x558a9e['save']();};}function saveUpdates(_0x1704fd,_0x57384f){return function(_0x4553a4){if(_0x4553a4){return _0x4553a4[_0x603a('0x31')](_0x1704fd)[_0x603a('0x1c')](function(_0x4e7978){return _0x4e7978;});}return null;};}function removeEntity(_0x597d1a,_0x14bb89){return function(_0x8f2fde){if(_0x8f2fde){return _0x8f2fde[_0x603a('0x32')]()['then'](function(){_0x597d1a[_0x603a('0x26')](0xcc)[_0x603a('0x27')]();});}};}function handleEntityNotFound(_0x329ace,_0x3127a6){return function(_0x46bb4e){if(!_0x46bb4e){_0x329ace[_0x603a('0x33')](0x194);}return _0x46bb4e;};}function handleError(_0x532e12,_0x23edc4){_0x23edc4=_0x23edc4||0x1f4;return function(_0x4ed830){logger[_0x603a('0x23')](_0x4ed830[_0x603a('0x34')]);if(_0x4ed830['name']){delete _0x4ed830['name'];}_0x532e12[_0x603a('0x26')](_0x23edc4)[_0x603a('0x35')](_0x4ed830);};}exports[_0x603a('0x36')]=function(_0x3bbf3b,_0x57c274){var _0x473cca={},_0xd125df={},_0x3cb898={'count':0x0,'rows':[]};var _0x26f99d=_['map'](db['ZendeskConfiguration'][_0x603a('0x37')],function(_0x527ccd){return{'name':_0x527ccd['fieldName'],'type':_0x527ccd[_0x603a('0x38')][_0x603a('0x39')]};});_0xd125df['model']=_[_0x603a('0x3a')](_0x26f99d,_0x603a('0x3b'));_0xd125df[_0x603a('0x3c')]=_[_0x603a('0x3d')](_0x3bbf3b[_0x603a('0x3c')]);_0xd125df['filters']=_[_0x603a('0x3e')](_0xd125df['model'],_0xd125df[_0x603a('0x3c')]);_0x473cca[_0x603a('0x3f')]=_[_0x603a('0x3e')](_0xd125df['model'],qs[_0x603a('0x40')](_0x3bbf3b[_0x603a('0x3c')]['fields']));_0x473cca[_0x603a('0x3f')]=_0x473cca[_0x603a('0x3f')][_0x603a('0x41')]?_0x473cca[_0x603a('0x3f')]:_0xd125df[_0x603a('0x42')];if(!_0x3bbf3b[_0x603a('0x3c')][_0x603a('0x43')](_0x603a('0x44'))){_0x473cca[_0x603a('0x2c')]=qs[_0x603a('0x2c')](_0x3bbf3b[_0x603a('0x3c')][_0x603a('0x2c')]);_0x473cca[_0x603a('0x2b')]=qs[_0x603a('0x2b')](_0x3bbf3b['query'][_0x603a('0x2b')]);}_0x473cca[_0x603a('0x45')]=qs[_0x603a('0x46')](_0x3bbf3b['query'][_0x603a('0x46')]);_0x473cca[_0x603a('0x47')]=qs['filters'](_[_0x603a('0x48')](_0x3bbf3b[_0x603a('0x3c')],_0xd125df[_0x603a('0x49')]),_0x26f99d);if(_0x3bbf3b[_0x603a('0x3c')][_0x603a('0x4a')]){_0x473cca[_0x603a('0x47')]=_[_0x603a('0x4b')](_0x473cca[_0x603a('0x47')],{'$or':_[_0x603a('0x3a')](_0x26f99d,function(_0x3ebb9a){if(_0x3ebb9a[_0x603a('0x38')]!==_0x603a('0x4c')){var _0x3ed174={};_0x3ed174[_0x3ebb9a['name']]={'$like':'%'+_0x3bbf3b[_0x603a('0x3c')][_0x603a('0x4a')]+'%'};return _0x3ed174;}})});}_0x473cca=_[_0x603a('0x4b')]({},_0x473cca,_0x3bbf3b[_0x603a('0x4d')]);var _0x3a3a85={'where':_0x473cca[_0x603a('0x47')]};return db[_0x603a('0x4e')]['count'](_0x3a3a85)['then'](function(_0x3ff474){_0x3cb898[_0x603a('0x2a')]=_0x3ff474;if(_0x3bbf3b[_0x603a('0x3c')]['includeAll']){_0x473cca[_0x603a('0x4f')]=[{'all':!![]}];}return db['ZendeskConfiguration'][_0x603a('0x50')](_0x473cca);})[_0x603a('0x1c')](function(_0x5eeed2){_0x3cb898[_0x603a('0x51')]=_0x5eeed2;return _0x3cb898;})[_0x603a('0x1c')](respondWithFilteredResult(_0x57c274,_0x473cca))[_0x603a('0x52')](handleError(_0x57c274,null));};exports[_0x603a('0x53')]=function(_0x4c0a4f,_0xe9b0e6){var _0x12a643={'raw':![],'where':{'id':_0x4c0a4f[_0x603a('0x54')]['id']}},_0x32887d={};_0x32887d['model']=_['keys'](db[_0x603a('0x4e')]['rawAttributes']);_0x32887d[_0x603a('0x3c')]=_['keys'](_0x4c0a4f[_0x603a('0x3c')]);_0x32887d[_0x603a('0x49')]=_[_0x603a('0x3e')](_0x32887d['model'],_0x32887d['query']);_0x12a643[_0x603a('0x3f')]=_['intersection'](_0x32887d['model'],qs['fields'](_0x4c0a4f[_0x603a('0x3c')]['fields']));_0x12a643[_0x603a('0x3f')]=_0x12a643[_0x603a('0x3f')][_0x603a('0x41')]?_0x12a643[_0x603a('0x3f')]:_0x32887d[_0x603a('0x42')];if(_0x4c0a4f['query'][_0x603a('0x55')]){_0x12a643[_0x603a('0x4f')]=[{'all':!![]}];}_0x12a643=_[_0x603a('0x4b')]({},_0x12a643,_0x4c0a4f[_0x603a('0x4d')]);return db['ZendeskConfiguration'][_0x603a('0x56')](_0x12a643)['then'](handleEntityNotFound(_0xe9b0e6,null))['then'](respondWithResult(_0xe9b0e6,null))[_0x603a('0x52')](handleError(_0xe9b0e6,null));};exports[_0x603a('0x57')]=function(_0x337e33,_0x16b4e7){return db[_0x603a('0x4e')][_0x603a('0x57')](_0x337e33[_0x603a('0x58')],{})[_0x603a('0x1c')](respondWithResult(_0x16b4e7,0xc9))[_0x603a('0x52')](handleError(_0x16b4e7,null));};exports[_0x603a('0x31')]=function(_0x21fe8d,_0xf2665e){if(_0x21fe8d[_0x603a('0x58')]['id']){delete _0x21fe8d[_0x603a('0x58')]['id'];}return db[_0x603a('0x4e')][_0x603a('0x56')]({'where':{'id':_0x21fe8d[_0x603a('0x54')]['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0xf2665e,null))[_0x603a('0x1c')](saveUpdates(_0x21fe8d[_0x603a('0x58')],null))[_0x603a('0x1c')](respondWithResult(_0xf2665e,null))[_0x603a('0x52')](handleError(_0xf2665e,null));};exports[_0x603a('0x32')]=function(_0x4a7755,_0x2a07f2){return db[_0x603a('0x4e')]['find']({'where':{'id':_0x4a7755[_0x603a('0x54')]['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0x2a07f2,null))['then'](removeEntity(_0x2a07f2,null))['catch'](handleError(_0x2a07f2,null));};exports[_0x603a('0x59')]=function(_0x59f27b,_0x548f31,_0x16a4bb){var _0x48b485={};var _0xdf3050={};var _0x401510;var _0x793e40;return db['ZendeskConfiguration'][_0x603a('0x5a')]({'where':{'id':_0x59f27b['params']['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0x548f31,null))[_0x603a('0x1c')](function(_0x4cdfbd){if(_0x4cdfbd){_0x401510=_0x4cdfbd;_0xdf3050[_0x603a('0x42')]=_[_0x603a('0x3d')](db[_0x603a('0x5b')][_0x603a('0x37')]);_0xdf3050[_0x603a('0x3c')]=_[_0x603a('0x3d')](_0x59f27b[_0x603a('0x3c')]);_0xdf3050[_0x603a('0x49')]=_[_0x603a('0x3e')](_0xdf3050[_0x603a('0x42')],_0xdf3050[_0x603a('0x3c')]);_0x48b485[_0x603a('0x3f')]=_[_0x603a('0x3e')](_0xdf3050['model'],qs[_0x603a('0x40')](_0x59f27b[_0x603a('0x3c')][_0x603a('0x40')]));_0x48b485[_0x603a('0x3f')]=_0x48b485[_0x603a('0x3f')][_0x603a('0x41')]?_0x48b485[_0x603a('0x3f')]:_0xdf3050['model'];_0x48b485[_0x603a('0x45')]=qs[_0x603a('0x46')](_0x59f27b[_0x603a('0x3c')]['sort']);_0x48b485[_0x603a('0x47')]=qs[_0x603a('0x49')](_['pick'](_0x59f27b[_0x603a('0x3c')],_0xdf3050[_0x603a('0x49')]));if(_0x59f27b[_0x603a('0x3c')][_0x603a('0x4a')]){_0x48b485['where']=_[_0x603a('0x4b')](_0x48b485[_0x603a('0x47')],{'$or':_[_0x603a('0x3a')](_0x48b485[_0x603a('0x3f')],function(_0x149970){var _0x20a306={};_0x20a306[_0x149970]={'$like':'%'+_0x59f27b[_0x603a('0x3c')]['filter']+'%'};return _0x20a306;})});}_0x48b485=_['merge']({},_0x48b485,_0x59f27b[_0x603a('0x4d')]);return _0x401510[_0x603a('0x59')](_0x48b485);}})[_0x603a('0x1c')](function(_0x45d2f7){if(_0x45d2f7){_0x793e40=_0x45d2f7[_0x603a('0x41')];if(!_0x59f27b[_0x603a('0x3c')][_0x603a('0x43')](_0x603a('0x44'))){_0x48b485['limit']=qs[_0x603a('0x2c')](_0x59f27b['query'][_0x603a('0x2c')]);_0x48b485['offset']=qs[_0x603a('0x2b')](_0x59f27b[_0x603a('0x3c')][_0x603a('0x2b')]);}return _0x401510[_0x603a('0x59')](_0x48b485);}})[_0x603a('0x1c')](function(_0x48a247){if(_0x48a247){return _0x48a247?{'count':_0x793e40,'rows':_0x48a247}:null;}})[_0x603a('0x1c')](respondWithResult(_0x548f31,null))[_0x603a('0x52')](handleError(_0x548f31,null));};exports[_0x603a('0x5c')]=function(_0x2de3ce,_0x20ef15,_0x1eda19){var _0x223b66={};var _0x1964ee={};var _0x1779b8;var _0x354cdd;return db[_0x603a('0x4e')][_0x603a('0x5a')]({'where':{'id':_0x2de3ce[_0x603a('0x54')]['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0x20ef15,null))[_0x603a('0x1c')](function(_0x1f3b33){if(_0x1f3b33){_0x1779b8=_0x1f3b33;_0x1964ee[_0x603a('0x42')]=_[_0x603a('0x3d')](db[_0x603a('0x5b')][_0x603a('0x37')]);_0x1964ee['query']=_['keys'](_0x2de3ce[_0x603a('0x3c')]);_0x1964ee['filters']=_['intersection'](_0x1964ee[_0x603a('0x42')],_0x1964ee[_0x603a('0x3c')]);_0x223b66[_0x603a('0x3f')]=_['intersection'](_0x1964ee[_0x603a('0x42')],qs['fields'](_0x2de3ce[_0x603a('0x3c')][_0x603a('0x40')]));_0x223b66[_0x603a('0x3f')]=_0x223b66[_0x603a('0x3f')][_0x603a('0x41')]?_0x223b66['attributes']:_0x1964ee[_0x603a('0x42')];_0x223b66[_0x603a('0x45')]=qs[_0x603a('0x46')](_0x2de3ce[_0x603a('0x3c')][_0x603a('0x46')]);_0x223b66['where']=qs[_0x603a('0x49')](_[_0x603a('0x48')](_0x2de3ce[_0x603a('0x3c')],_0x1964ee[_0x603a('0x49')]));if(_0x2de3ce[_0x603a('0x3c')][_0x603a('0x4a')]){_0x223b66[_0x603a('0x47')]=_[_0x603a('0x4b')](_0x223b66[_0x603a('0x47')],{'$or':_[_0x603a('0x3a')](_0x223b66[_0x603a('0x3f')],function(_0x202b7b){var _0x2e7d9c={};_0x2e7d9c[_0x202b7b]={'$like':'%'+_0x2de3ce[_0x603a('0x3c')][_0x603a('0x4a')]+'%'};return _0x2e7d9c;})});}_0x223b66=_[_0x603a('0x4b')]({},_0x223b66,_0x2de3ce['options']);return _0x1779b8[_0x603a('0x5c')](_0x223b66);}})[_0x603a('0x1c')](function(_0x501a3f){if(_0x501a3f){_0x354cdd=_0x501a3f[_0x603a('0x41')];if(!_0x2de3ce['query']['hasOwnProperty'](_0x603a('0x44'))){_0x223b66['limit']=qs[_0x603a('0x2c')](_0x2de3ce['query'][_0x603a('0x2c')]);_0x223b66[_0x603a('0x2b')]=qs[_0x603a('0x2b')](_0x2de3ce[_0x603a('0x3c')]['offset']);}return _0x1779b8['getSubjects'](_0x223b66);}})[_0x603a('0x1c')](function(_0x45898a){if(_0x45898a){return _0x45898a?{'count':_0x354cdd,'rows':_0x45898a}:null;}})[_0x603a('0x1c')](respondWithResult(_0x20ef15,null))[_0x603a('0x52')](handleError(_0x20ef15,null));};exports[_0x603a('0x5d')]=function(_0x446926,_0x53dcec,_0x2de47d){var _0x36457a={};var _0x28aaac={};var _0x146489;var _0x34d1bf;return db['ZendeskConfiguration'][_0x603a('0x5a')]({'where':{'id':_0x446926[_0x603a('0x54')]['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0x53dcec,null))[_0x603a('0x1c')](function(_0x819eb5){if(_0x819eb5){_0x146489=_0x819eb5;_0x28aaac[_0x603a('0x42')]=_[_0x603a('0x3d')](db[_0x603a('0x5b')][_0x603a('0x37')]);_0x28aaac['query']=_['keys'](_0x446926[_0x603a('0x3c')]);_0x28aaac[_0x603a('0x49')]=_[_0x603a('0x3e')](_0x28aaac['model'],_0x28aaac['query']);_0x36457a[_0x603a('0x3f')]=_['intersection'](_0x28aaac[_0x603a('0x42')],qs['fields'](_0x446926[_0x603a('0x3c')]['fields']));_0x36457a[_0x603a('0x3f')]=_0x36457a[_0x603a('0x3f')][_0x603a('0x41')]?_0x36457a[_0x603a('0x3f')]:_0x28aaac[_0x603a('0x42')];_0x36457a['order']=qs[_0x603a('0x46')](_0x446926[_0x603a('0x3c')][_0x603a('0x46')]);_0x36457a[_0x603a('0x47')]=qs[_0x603a('0x49')](_['pick'](_0x446926[_0x603a('0x3c')],_0x28aaac['filters']));if(_0x446926[_0x603a('0x3c')]['filter']){_0x36457a['where']=_[_0x603a('0x4b')](_0x36457a[_0x603a('0x47')],{'$or':_['map'](_0x36457a[_0x603a('0x3f')],function(_0x37d7e7){var _0x3bbca9={};_0x3bbca9[_0x37d7e7]={'$like':'%'+_0x446926[_0x603a('0x3c')][_0x603a('0x4a')]+'%'};return _0x3bbca9;})});}_0x36457a=_[_0x603a('0x4b')]({},_0x36457a,_0x446926[_0x603a('0x4d')]);return _0x146489[_0x603a('0x5d')](_0x36457a);}})[_0x603a('0x1c')](function(_0x32a030){if(_0x32a030){_0x34d1bf=_0x32a030[_0x603a('0x41')];if(!_0x446926[_0x603a('0x3c')]['hasOwnProperty'](_0x603a('0x44'))){_0x36457a[_0x603a('0x2c')]=qs['limit'](_0x446926[_0x603a('0x3c')][_0x603a('0x2c')]);_0x36457a[_0x603a('0x2b')]=qs[_0x603a('0x2b')](_0x446926['query'][_0x603a('0x2b')]);}return _0x146489[_0x603a('0x5d')](_0x36457a);}})['then'](function(_0x4fe48b){if(_0x4fe48b){return _0x4fe48b?{'count':_0x34d1bf,'rows':_0x4fe48b}:null;}})[_0x603a('0x1c')](respondWithResult(_0x53dcec,null))[_0x603a('0x52')](handleError(_0x53dcec,null));};exports[_0x603a('0x5e')]=function(_0x32535d,_0x288372,_0x423fd4){var _0x2f2ae1={};var _0xce4989={};var _0xc830fd;var _0x2f8b41;return db['ZendeskConfiguration'][_0x603a('0x5a')]({'where':{'id':_0x32535d[_0x603a('0x54')]['id']}})['then'](handleEntityNotFound(_0x288372,null))[_0x603a('0x1c')](function(_0x40fdc6){if(_0x40fdc6){_0xc830fd=_0x40fdc6;_0xce4989[_0x603a('0x42')]=_[_0x603a('0x3d')](db[_0x603a('0x5f')][_0x603a('0x37')]);_0xce4989[_0x603a('0x3c')]=_['keys'](_0x32535d['query']);_0xce4989[_0x603a('0x49')]=_[_0x603a('0x3e')](_0xce4989['model'],_0xce4989['query']);_0x2f2ae1[_0x603a('0x3f')]=_[_0x603a('0x3e')](_0xce4989[_0x603a('0x42')],qs['fields'](_0x32535d['query'][_0x603a('0x40')]));_0x2f2ae1['attributes']=_0x2f2ae1[_0x603a('0x3f')][_0x603a('0x41')]?_0x2f2ae1[_0x603a('0x3f')]:_0xce4989[_0x603a('0x42')];_0x2f2ae1[_0x603a('0x45')]=qs[_0x603a('0x46')](_0x32535d[_0x603a('0x3c')]['sort']);_0x2f2ae1[_0x603a('0x47')]=qs['filters'](_[_0x603a('0x48')](_0x32535d[_0x603a('0x3c')],_0xce4989[_0x603a('0x49')]));if(_0x32535d[_0x603a('0x3c')][_0x603a('0x4a')]){_0x2f2ae1[_0x603a('0x47')]=_[_0x603a('0x4b')](_0x2f2ae1[_0x603a('0x47')],{'$or':_['map'](_0x2f2ae1[_0x603a('0x3f')],function(_0x4c28d9){var _0x1a0c62={};_0x1a0c62[_0x4c28d9]={'$like':'%'+_0x32535d[_0x603a('0x3c')][_0x603a('0x4a')]+'%'};return _0x1a0c62;})});}_0x2f2ae1=_[_0x603a('0x4b')]({},_0x2f2ae1,_0x32535d[_0x603a('0x4d')]);return _0xc830fd[_0x603a('0x5e')](_0x2f2ae1);}})[_0x603a('0x1c')](function(_0x494090){if(_0x494090){_0x2f8b41=_0x494090[_0x603a('0x41')];if(!_0x32535d[_0x603a('0x3c')][_0x603a('0x43')](_0x603a('0x44'))){_0x2f2ae1[_0x603a('0x2c')]=qs[_0x603a('0x2c')](_0x32535d[_0x603a('0x3c')][_0x603a('0x2c')]);_0x2f2ae1['offset']=qs[_0x603a('0x2b')](_0x32535d[_0x603a('0x3c')]['offset']);}return _0xc830fd[_0x603a('0x5e')](_0x2f2ae1);}})[_0x603a('0x1c')](function(_0xff44a4){if(_0xff44a4){return _0xff44a4?{'count':_0x2f8b41,'rows':_0xff44a4}:null;}})[_0x603a('0x1c')](respondWithResult(_0x288372,null))['catch'](handleError(_0x288372,null));};exports['setTags']=function(_0x13b20d,_0x5ee4d2,_0x13b485){if(_0x13b20d['body']['id']){delete _0x13b20d[_0x603a('0x58')]['id'];}return db['ZendeskConfiguration'][_0x603a('0x5a')]({'where':{'id':_0x13b20d[_0x603a('0x54')]['id']}})[_0x603a('0x1c')](handleEntityNotFound(_0x5ee4d2,null))[_0x603a('0x1c')](function(_0x397b7e){if(_0x397b7e){return _0x397b7e[_0x603a('0x60')](_0x13b20d['body'][_0x603a('0x61')]||[]);}return null;})[_0x603a('0x1c')](respondWithResult(_0x5ee4d2,null))[_0x603a('0x52')](handleError(_0x5ee4d2,null));}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js index a4118ee..cafbd1e 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 _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 +var _0xf7b4=['path','rimraf','../../config/environment','./intZendeskConfiguration.attributes','exports','define','ZendeskConfiguration','int_zendesk_configurations','lodash','api','moment'];(function(_0x112734,_0x23d44f){var _0x267ca3=function(_0x16011){while(--_0x16011){_0x112734['push'](_0x112734['shift']());}};_0x267ca3(++_0x23d44f);}(_0xf7b4,0x152));var _0x4f7b=function(_0x348b8d,_0x5f21a8){_0x348b8d=_0x348b8d-0x0;var _0x459b4b=_0xf7b4[_0x348b8d];return _0x459b4b;};'use strict';var _=require(_0x4f7b('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4f7b('0x1'));var moment=require(_0x4f7b('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4f7b('0x3'));var rimraf=require(_0x4f7b('0x4'));var config=require(_0x4f7b('0x5'));var attributes=require(_0x4f7b('0x6'));module[_0x4f7b('0x7')]=function(_0x2637f0,_0x427f8b){return _0x2637f0[_0x4f7b('0x8')](_0x4f7b('0x9'),attributes,{'tableName':_0x4f7b('0xa'),'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 c926ace..f67e6ac 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 _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 +var _0x4bdf=['../../config/environment','http','request','then','info','request\x20sent','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','ZendeskConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x103ffb,_0x16dd7a){var _0x4e4c6a=function(_0x11f6ad){while(--_0x11f6ad){_0x103ffb['push'](_0x103ffb['shift']());}};_0x4e4c6a(++_0x16dd7a);}(_0x4bdf,0x14f));var _0xf4bd=function(_0x1df58f,_0x31c9d3){_0x1df58f=_0x1df58f-0x0;var _0x4e5b83=_0x4bdf[_0x1df58f];return _0x4e5b83;};'use strict';var _=require(_0xf4bd('0x0'));var util=require(_0xf4bd('0x1'));var moment=require(_0xf4bd('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf4bd('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xf4bd('0x4'));var logger=require(_0xf4bd('0x5'))(_0xf4bd('0x6'));var config=require(_0xf4bd('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xf4bd('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2400b6,_0x251947,_0x1b4bde){return new BPromise(function(_0x1ae79b,_0x236ab4){return client[_0xf4bd('0x9')](_0x2400b6,_0x1b4bde)[_0xf4bd('0xa')](function(_0x4fc39c){logger[_0xf4bd('0xb')]('ZendeskConfiguration,\x20%s,\x20%s',_0x251947,_0xf4bd('0xc'));logger['debug'](_0xf4bd('0xd'),_0x251947,_0xf4bd('0xc'),JSON['stringify'](_0x4fc39c));if(_0x4fc39c[_0xf4bd('0xe')]){if(_0x4fc39c['error']['code']===0x1f4){logger[_0xf4bd('0xe')](_0xf4bd('0xf'),_0x251947,_0x4fc39c[_0xf4bd('0xe')][_0xf4bd('0x10')]);return _0x236ab4(_0x4fc39c[_0xf4bd('0xe')]['message']);}logger['error'](_0xf4bd('0xf'),_0x251947,_0x4fc39c['error'][_0xf4bd('0x10')]);return _0x1ae79b(_0x4fc39c[_0xf4bd('0xe')][_0xf4bd('0x10')]);}else{logger[_0xf4bd('0xb')](_0xf4bd('0xf'),_0x251947,_0xf4bd('0xc'));_0x1ae79b(_0x4fc39c[_0xf4bd('0x11')]['message']);}})[_0xf4bd('0x12')](function(_0x45dbf1){logger[_0xf4bd('0xe')](_0xf4bd('0xf'),_0x251947,_0x45dbf1);_0x236ab4(_0x45dbf1);});});} \ No newline at end of file diff --git a/server/api/intZendeskField/index.js b/server/api/intZendeskField/index.js index cf29606..a2d9e5a 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 _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 +var _0xa1c6=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskField.controller','get','index','isAuthenticated','show','post','create','put','/:id','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x3c3b01,_0xbaa847){var _0xda6617=function(_0x38649a){while(--_0x38649a){_0x3c3b01['push'](_0x3c3b01['shift']());}};_0xda6617(++_0xbaa847);}(_0xa1c6,0xbf));var _0x6a1c=function(_0x3ec351,_0x49470d){_0x3ec351=_0x3ec351-0x0;var _0x4b26bc=_0xa1c6[_0x3ec351];return _0x4b26bc;};'use strict';var multer=require(_0x6a1c('0x0'));var util=require(_0x6a1c('0x1'));var path=require(_0x6a1c('0x2'));var timeout=require(_0x6a1c('0x3'));var express=require(_0x6a1c('0x4'));var router=express[_0x6a1c('0x5')]();var fs_extra=require(_0x6a1c('0x6'));var auth=require(_0x6a1c('0x7'));var interaction=require(_0x6a1c('0x8'));var config=require(_0x6a1c('0x9'));var controller=require(_0x6a1c('0xa'));router[_0x6a1c('0xb')]('/',auth['isAuthenticated'](),controller[_0x6a1c('0xc')]);router[_0x6a1c('0xb')]('/:id',auth[_0x6a1c('0xd')](),controller[_0x6a1c('0xe')]);router[_0x6a1c('0xf')]('/',auth[_0x6a1c('0xd')](),controller[_0x6a1c('0x10')]);router[_0x6a1c('0x11')](_0x6a1c('0x12'),auth['isAuthenticated'](),controller[_0x6a1c('0x13')]);router[_0x6a1c('0x14')](_0x6a1c('0x12'),auth['isAuthenticated'](),controller['destroy']);module[_0x6a1c('0x15')]=router; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.attributes.js b/server/api/intZendeskField/intZendeskField.attributes.js index f875a7f..d6d6bdd 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 _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 +var _0x0cf9=['ENUM','string','variable','customVariable','keyValue','STRING','exports'];(function(_0x5c5c52,_0x36d085){var _0x4229ff=function(_0x3806df){while(--_0x3806df){_0x5c5c52['push'](_0x5c5c52['shift']());}};_0x4229ff(++_0x36d085);}(_0x0cf9,0x1e9));var _0x90cf=function(_0x255ac0,_0x3f6645){_0x255ac0=_0x255ac0-0x0;var _0x437bf1=_0x0cf9[_0x255ac0];return _0x437bf1;};'use strict';var Sequelize=require('sequelize');module[_0x90cf('0x0')]={'type':{'type':Sequelize[_0x90cf('0x1')](_0x90cf('0x2'),_0x90cf('0x3'),_0x90cf('0x4'),_0x90cf('0x5'),'picklist'),'defaultValue':_0x90cf('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x90cf('0x6')]},'keyType':{'type':Sequelize[_0x90cf('0x1')](_0x90cf('0x2'),'variable',_0x90cf('0x4'))},'keyContent':{'type':Sequelize[_0x90cf('0x6')]},'idField':{'type':Sequelize[_0x90cf('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x90cf('0x6')]}}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.controller.js b/server/api/intZendeskField/intZendeskField.controller.js index c6876a7..096bac0 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 _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 +var _0x2dae=['undefined','limit','offset','count','Content-Range','json','apply','save','update','then','error','stack','name','send','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','where','VIRTUAL','ZendeskField','includeAll','include','findAll','rows','catch','params','keys','merge','find','create','body','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','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','../../mysqldb','sendStatus','status','end'];(function(_0x53dbef,_0x578aae){var _0x55e026=function(_0x8bfdbb){while(--_0x8bfdbb){_0x53dbef['push'](_0x53dbef['shift']());}};_0x55e026(++_0x578aae);}(_0x2dae,0xc3));var _0xe2da=function(_0x80f51a,_0x32e95e){_0x80f51a=_0x80f51a-0x0;var _0x327148=_0x2dae[_0x80f51a];return _0x327148;};'use strict';var emlformat=require(_0xe2da('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe2da('0x1'));var jsonpatch=require(_0xe2da('0x2'));var rp=require(_0xe2da('0x3'));var moment=require(_0xe2da('0x4'));var BPromise=require(_0xe2da('0x5'));var Mustache=require('mustache');var util=require(_0xe2da('0x6'));var path=require(_0xe2da('0x7'));var sox=require(_0xe2da('0x8'));var csv=require(_0xe2da('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe2da('0xa'));var _=require(_0xe2da('0xb'));var squel=require(_0xe2da('0xc'));var crypto=require(_0xe2da('0xd'));var jsforce=require(_0xe2da('0xe'));var deskjs=require(_0xe2da('0xf'));var toCsv=require(_0xe2da('0x9'));var querystring=require(_0xe2da('0x10'));var Papa=require(_0xe2da('0x11'));var Redis=require('ioredis');var authService=require(_0xe2da('0x12'));var qs=require(_0xe2da('0x13'));var as=require(_0xe2da('0x14'));var hardwareService=require(_0xe2da('0x15'));var logger=require(_0xe2da('0x16'))(_0xe2da('0x17'));var utils=require(_0xe2da('0x18'));var config=require(_0xe2da('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xe2da('0x1a'))['db'];function respondWithStatusCode(_0x5200b1,_0x4377c6){_0x4377c6=_0x4377c6||0xcc;return function(_0x245ad7){if(_0x245ad7){return _0x5200b1[_0xe2da('0x1b')](_0x4377c6);}return _0x5200b1[_0xe2da('0x1c')](_0x4377c6)[_0xe2da('0x1d')]();};}function respondWithResult(_0x5660b5,_0x295a86){_0x295a86=_0x295a86||0xc8;return function(_0x48584b){if(_0x48584b){return _0x5660b5[_0xe2da('0x1c')](_0x295a86)['json'](_0x48584b);}};}function respondWithFilteredResult(_0x586b27,_0x403d1c){return function(_0x3dfc52){if(_0x3dfc52){var _0x33f919=typeof _0x403d1c['offset']===_0xe2da('0x1e')&&typeof _0x403d1c[_0xe2da('0x1f')]===_0xe2da('0x1e');var _0x33568f=_0x3dfc52['count'];var _0x45bb92=_0x33f919?0x0:_0x403d1c[_0xe2da('0x20')];var _0x417363=_0x33f919?_0x3dfc52[_0xe2da('0x21')]:_0x403d1c[_0xe2da('0x20')]+_0x403d1c['limit'];var _0x56eeb1;if(_0x417363>=_0x33568f){_0x417363=_0x33568f;_0x56eeb1=0xc8;}else{_0x56eeb1=0xce;}_0x586b27[_0xe2da('0x1c')](_0x56eeb1);return _0x586b27['set'](_0xe2da('0x22'),_0x45bb92+'-'+_0x417363+'/'+_0x33568f)[_0xe2da('0x23')](_0x3dfc52);}return null;};}function patchUpdates(_0x332193){return function(_0x203d36){try{jsonpatch[_0xe2da('0x24')](_0x203d36,_0x332193,!![]);}catch(_0x3e22de){return BPromise['reject'](_0x3e22de);}return _0x203d36[_0xe2da('0x25')]();};}function saveUpdates(_0x53cc4e,_0x30efdc){return function(_0x191d38){if(_0x191d38){return _0x191d38[_0xe2da('0x26')](_0x53cc4e)[_0xe2da('0x27')](function(_0x30dea4){return _0x30dea4;});}return null;};}function removeEntity(_0x1e45e9,_0x38f2c4){return function(_0x221e98){if(_0x221e98){return _0x221e98['destroy']()[_0xe2da('0x27')](function(){_0x1e45e9[_0xe2da('0x1c')](0xcc)[_0xe2da('0x1d')]();});}};}function handleEntityNotFound(_0x14704d,_0x3778dc){return function(_0x230fb8){if(!_0x230fb8){_0x14704d[_0xe2da('0x1b')](0x194);}return _0x230fb8;};}function handleError(_0x56c37e,_0x2adc49){_0x2adc49=_0x2adc49||0x1f4;return function(_0x3e23d7){logger[_0xe2da('0x28')](_0x3e23d7[_0xe2da('0x29')]);if(_0x3e23d7[_0xe2da('0x2a')]){delete _0x3e23d7[_0xe2da('0x2a')];}_0x56c37e[_0xe2da('0x1c')](_0x2adc49)[_0xe2da('0x2b')](_0x3e23d7);};}exports['index']=function(_0x487a7c,_0x5e259a){var _0x3c4845={},_0x8c91db={},_0x4146ad={'count':0x0,'rows':[]};var _0x1ab91a=_['map'](db['ZendeskField'][_0xe2da('0x2c')],function(_0x1ec8ca){return{'name':_0x1ec8ca[_0xe2da('0x2d')],'type':_0x1ec8ca[_0xe2da('0x2e')][_0xe2da('0x2f')]};});_0x8c91db[_0xe2da('0x30')]=_[_0xe2da('0x31')](_0x1ab91a,_0xe2da('0x2a'));_0x8c91db[_0xe2da('0x32')]=_['keys'](_0x487a7c['query']);_0x8c91db[_0xe2da('0x33')]=_[_0xe2da('0x34')](_0x8c91db[_0xe2da('0x30')],_0x8c91db[_0xe2da('0x32')]);_0x3c4845[_0xe2da('0x35')]=_[_0xe2da('0x34')](_0x8c91db[_0xe2da('0x30')],qs[_0xe2da('0x36')](_0x487a7c[_0xe2da('0x32')][_0xe2da('0x36')]));_0x3c4845[_0xe2da('0x35')]=_0x3c4845[_0xe2da('0x35')][_0xe2da('0x37')]?_0x3c4845[_0xe2da('0x35')]:_0x8c91db[_0xe2da('0x30')];if(!_0x487a7c[_0xe2da('0x32')][_0xe2da('0x38')](_0xe2da('0x39'))){_0x3c4845['limit']=qs[_0xe2da('0x1f')](_0x487a7c[_0xe2da('0x32')][_0xe2da('0x1f')]);_0x3c4845['offset']=qs[_0xe2da('0x20')](_0x487a7c[_0xe2da('0x32')][_0xe2da('0x20')]);}_0x3c4845['order']=qs['sort'](_0x487a7c[_0xe2da('0x32')][_0xe2da('0x3a')]);_0x3c4845['where']=qs[_0xe2da('0x33')](_[_0xe2da('0x3b')](_0x487a7c[_0xe2da('0x32')],_0x8c91db[_0xe2da('0x33')]),_0x1ab91a);if(_0x487a7c[_0xe2da('0x32')]['filter']){_0x3c4845[_0xe2da('0x3c')]=_['merge'](_0x3c4845['where'],{'$or':_[_0xe2da('0x31')](_0x1ab91a,function(_0x561afb){if(_0x561afb[_0xe2da('0x2e')]!==_0xe2da('0x3d')){var _0x54d8a3={};_0x54d8a3[_0x561afb[_0xe2da('0x2a')]]={'$like':'%'+_0x487a7c[_0xe2da('0x32')]['filter']+'%'};return _0x54d8a3;}})});}_0x3c4845=_['merge']({},_0x3c4845,_0x487a7c['options']);var _0x2d9c0a={'where':_0x3c4845[_0xe2da('0x3c')]};return db[_0xe2da('0x3e')][_0xe2da('0x21')](_0x2d9c0a)[_0xe2da('0x27')](function(_0xdf6ea6){_0x4146ad[_0xe2da('0x21')]=_0xdf6ea6;if(_0x487a7c['query'][_0xe2da('0x3f')]){_0x3c4845[_0xe2da('0x40')]=[{'all':!![]}];}return db[_0xe2da('0x3e')][_0xe2da('0x41')](_0x3c4845);})[_0xe2da('0x27')](function(_0x5a1550){_0x4146ad[_0xe2da('0x42')]=_0x5a1550;return _0x4146ad;})[_0xe2da('0x27')](respondWithFilteredResult(_0x5e259a,_0x3c4845))[_0xe2da('0x43')](handleError(_0x5e259a,null));};exports['show']=function(_0x24d748,_0x279f67){var _0x1529f4={'raw':!![],'where':{'id':_0x24d748[_0xe2da('0x44')]['id']}},_0x4096c5={};_0x4096c5[_0xe2da('0x30')]=_[_0xe2da('0x45')](db[_0xe2da('0x3e')]['rawAttributes']);_0x4096c5[_0xe2da('0x32')]=_[_0xe2da('0x45')](_0x24d748[_0xe2da('0x32')]);_0x4096c5[_0xe2da('0x33')]=_[_0xe2da('0x34')](_0x4096c5['model'],_0x4096c5[_0xe2da('0x32')]);_0x1529f4[_0xe2da('0x35')]=_[_0xe2da('0x34')](_0x4096c5[_0xe2da('0x30')],qs[_0xe2da('0x36')](_0x24d748[_0xe2da('0x32')][_0xe2da('0x36')]));_0x1529f4['attributes']=_0x1529f4[_0xe2da('0x35')]['length']?_0x1529f4[_0xe2da('0x35')]:_0x4096c5[_0xe2da('0x30')];if(_0x24d748[_0xe2da('0x32')]['includeAll']){_0x1529f4[_0xe2da('0x40')]=[{'all':!![]}];}_0x1529f4=_[_0xe2da('0x46')]({},_0x1529f4,_0x24d748['options']);return db[_0xe2da('0x3e')][_0xe2da('0x47')](_0x1529f4)[_0xe2da('0x27')](handleEntityNotFound(_0x279f67,null))['then'](respondWithResult(_0x279f67,null))[_0xe2da('0x43')](handleError(_0x279f67,null));};exports['create']=function(_0x4e9444,_0x16a393){return db['ZendeskField'][_0xe2da('0x48')](_0x4e9444[_0xe2da('0x49')],{})['then'](respondWithResult(_0x16a393,0xc9))[_0xe2da('0x43')](handleError(_0x16a393,null));};exports[_0xe2da('0x26')]=function(_0x482547,_0x4a6d80){if(_0x482547[_0xe2da('0x49')]['id']){delete _0x482547['body']['id'];}return db[_0xe2da('0x3e')][_0xe2da('0x47')]({'where':{'id':_0x482547[_0xe2da('0x44')]['id']}})[_0xe2da('0x27')](handleEntityNotFound(_0x4a6d80,null))[_0xe2da('0x27')](saveUpdates(_0x482547[_0xe2da('0x49')],null))[_0xe2da('0x27')](respondWithResult(_0x4a6d80,null))[_0xe2da('0x43')](handleError(_0x4a6d80,null));};exports[_0xe2da('0x4a')]=function(_0x515f9b,_0x3ce9a8){return db[_0xe2da('0x3e')][_0xe2da('0x47')]({'where':{'id':_0x515f9b['params']['id']}})[_0xe2da('0x27')](handleEntityNotFound(_0x3ce9a8,null))[_0xe2da('0x27')](removeEntity(_0x3ce9a8,null))[_0xe2da('0x43')](handleError(_0x3ce9a8,null));}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.model.js b/server/api/intZendeskField/intZendeskField.model.js index 652630a..c9ad75b 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 _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 +var _0xd934=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./intZendeskField.attributes','exports','define','ZendeskField','int_zendesk_fields','zendesk_unique_index','idField','FieldId'];(function(_0x287cdb,_0x4761f8){var _0x480d30=function(_0x2b54a4){while(--_0x2b54a4){_0x287cdb['push'](_0x287cdb['shift']());}};_0x480d30(++_0x4761f8);}(_0xd934,0x176));var _0x4d93=function(_0x2fd2a4,_0x3f26dc){_0x2fd2a4=_0x2fd2a4-0x0;var _0x183498=_0xd934[_0x2fd2a4];return _0x183498;};'use strict';var _=require(_0x4d93('0x0'));var util=require(_0x4d93('0x1'));var logger=require(_0x4d93('0x2'))(_0x4d93('0x3'));var moment=require(_0x4d93('0x4'));var BPromise=require(_0x4d93('0x5'));var rp=require(_0x4d93('0x6'));var fs=require('fs');var path=require(_0x4d93('0x7'));var rimraf=require('rimraf');var config=require(_0x4d93('0x8'));var attributes=require(_0x4d93('0x9'));module[_0x4d93('0xa')]=function(_0x3477da,_0x9df088){return _0x3477da[_0x4d93('0xb')](_0x4d93('0xc'),attributes,{'tableName':_0x4d93('0xd'),'paranoid':![],'indexes':[{'name':_0x4d93('0xe'),'fields':[_0x4d93('0xf'),_0x4d93('0x10')],'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 a659310..141f85b 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 _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 +var _0x1ae8=['rpc','jayson/promise','client','http','info','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x883ae8,_0x3170fb){var _0x36ff38=function(_0x581eab){while(--_0x581eab){_0x883ae8['push'](_0x883ae8['shift']());}};_0x36ff38(++_0x3170fb);}(_0x1ae8,0x174));var _0x81ae=function(_0x17a146,_0x3c086d){_0x17a146=_0x17a146-0x0;var _0x4125b1=_0x1ae8[_0x17a146];return _0x4125b1;};'use strict';var _=require(_0x81ae('0x0'));var util=require(_0x81ae('0x1'));var moment=require(_0x81ae('0x2'));var BPromise=require('bluebird');var rs=require(_0x81ae('0x3'));var fs=require('fs');var Redis=require(_0x81ae('0x4'));var db=require(_0x81ae('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x81ae('0x6'));var config=require('../../config/environment');var jayson=require(_0x81ae('0x7'));var client=jayson[_0x81ae('0x8')][_0x81ae('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ebb03,_0x5d5c54,_0x1ece1b){return new BPromise(function(_0x3435de,_0x24c99f){return client['request'](_0x3ebb03,_0x1ece1b)['then'](function(_0x28f1d4){logger[_0x81ae('0xa')](_0x81ae('0xb'),_0x5d5c54,_0x81ae('0xc'));logger[_0x81ae('0xd')](_0x81ae('0xe'),_0x5d5c54,_0x81ae('0xc'),JSON[_0x81ae('0xf')](_0x28f1d4));if(_0x28f1d4[_0x81ae('0x10')]){if(_0x28f1d4[_0x81ae('0x10')][_0x81ae('0x11')]===0x1f4){logger[_0x81ae('0x10')]('ZendeskField,\x20%s,\x20%s',_0x5d5c54,_0x28f1d4['error']['message']);return _0x24c99f(_0x28f1d4[_0x81ae('0x10')][_0x81ae('0x12')]);}logger[_0x81ae('0x10')](_0x81ae('0xb'),_0x5d5c54,_0x28f1d4['error']['message']);return _0x3435de(_0x28f1d4[_0x81ae('0x10')][_0x81ae('0x12')]);}else{logger['info'](_0x81ae('0xb'),_0x5d5c54,_0x81ae('0xc'));_0x3435de(_0x28f1d4[_0x81ae('0x13')][_0x81ae('0x12')]);}})[_0x81ae('0x14')](function(_0x1021fc){logger['error']('ZendeskField,\x20%s,\x20%s',_0x5d5c54,_0x1021fc);_0x24c99f(_0x1021fc);});});} \ No newline at end of file diff --git a/server/api/intZohoAccount/index.js b/server/api/intZohoAccount/index.js index 0bb16fc..35e089e 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 _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 +var _0xccd3=['/:id','getFields','post','create','/:id/configurations','addConfiguration','update','delete','destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../config/environment','./intZohoAccount.controller','isAuthenticated','index','get'];(function(_0x310b1e,_0xdd0eca){var _0x254f1f=function(_0x5848e6){while(--_0x5848e6){_0x310b1e['push'](_0x310b1e['shift']());}};_0x254f1f(++_0xdd0eca);}(_0xccd3,0xfa));var _0x3ccd=function(_0x3f7a0d,_0x29e65b){_0x3f7a0d=_0x3f7a0d-0x0;var _0x2f9129=_0xccd3[_0x3f7a0d];return _0x2f9129;};'use strict';var multer=require(_0x3ccd('0x0'));var util=require(_0x3ccd('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x3ccd('0x2')]();var fs_extra=require(_0x3ccd('0x3'));var auth=require(_0x3ccd('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x3ccd('0x5'));var controller=require(_0x3ccd('0x6'));router['get']('/',auth[_0x3ccd('0x7')](),controller[_0x3ccd('0x8')]);router[_0x3ccd('0x9')](_0x3ccd('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x3ccd('0x9')]('/:id/configurations',auth['isAuthenticated'](),controller['getConfigurations']);router[_0x3ccd('0x9')]('/:id/fields',auth[_0x3ccd('0x7')](),controller[_0x3ccd('0xb')]);router[_0x3ccd('0xc')]('/',auth[_0x3ccd('0x7')](),controller[_0x3ccd('0xd')]);router[_0x3ccd('0xc')](_0x3ccd('0xe'),auth[_0x3ccd('0x7')](),controller[_0x3ccd('0xf')]);router['put']('/:id',auth[_0x3ccd('0x7')](),controller[_0x3ccd('0x10')]);router[_0x3ccd('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x3ccd('0x12')]);module[_0x3ccd('0x13')]=router; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.attributes.js b/server/api/intZohoAccount/intZohoAccount.attributes.js index 8f0ddf4..478d263 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 _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 +var _0x5c12=['exports','STRING'];(function(_0x44dce2,_0x4fe1db){var _0x394b3b=function(_0x2b2569){while(--_0x2b2569){_0x44dce2['push'](_0x44dce2['shift']());}};_0x394b3b(++_0x4fe1db);}(_0x5c12,0x188));var _0x25c1=function(_0x115d5b,_0x26aff2){_0x115d5b=_0x115d5b-0x0;var _0x6cfc50=_0x5c12[_0x115d5b];return _0x6cfc50;};'use strict';var Sequelize=require('sequelize');module[_0x25c1('0x0')]={'name':{'type':Sequelize[_0x25c1('0x1')]},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x25c1('0x1')]},'zone':{'type':Sequelize[_0x25c1('0x1')]},'clientId':{'type':Sequelize[_0x25c1('0x1')]},'clientSecret':{'type':Sequelize[_0x25c1('0x1')]},'serverUrl':{'type':Sequelize[_0x25c1('0x1')],'allowNull':![]},'code':{'type':Sequelize[_0x25c1('0x1')]},'refreshToken':{'type':Sequelize[_0x25c1('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.controller.js b/server/api/intZohoAccount/intZohoAccount.controller.js index 1a922ea..c2f4a2f 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 _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 +var _0xcd02=['../../config/environment','jayson/promise','client','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','ZohoAccount','count','includeAll','include','findAll','rows','show','options','find','create','update','body','findOne','params','ZohoConfiguration','getConfigurations','Subjects','getSubjects','Descriptions','getDescriptions','channel','ZohoField','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','clientSecret','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','getFields','host','serverUrl','com','slice','substring','lastIndexOf','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','includes','api_name','push','display_label','custom_field','data_type','picklist','pick_list_values','test','statusCode','Wrong\x20credentials','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','fs-extra','lodash','squel','desk.js','to-csv','querystring','papaparse','ioredis','../../config/logger','api'];(function(_0x3740fe,_0x6c543c){var _0x55492b=function(_0x1f851f){while(--_0x1f851f){_0x3740fe['push'](_0x3740fe['shift']());}};_0x55492b(++_0x6c543c);}(_0xcd02,0x78));var _0x2cd0=function(_0x3266bf,_0x3e7376){_0x3266bf=_0x3266bf-0x0;var _0x4dcb91=_0xcd02[_0x3266bf];return _0x4dcb91;};'use strict';var emlformat=require(_0x2cd0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2cd0('0x1'));var jsonpatch=require(_0x2cd0('0x2'));var rp=require(_0x2cd0('0x3'));var moment=require(_0x2cd0('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2cd0('0x5'));var util=require(_0x2cd0('0x6'));var path=require(_0x2cd0('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2cd0('0x8'));var _=require(_0x2cd0('0x9'));var squel=require(_0x2cd0('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x2cd0('0xb'));var toCsv=require(_0x2cd0('0xc'));var querystring=require(_0x2cd0('0xd'));var Papa=require(_0x2cd0('0xe'));var Redis=require(_0x2cd0('0xf'));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(_0x2cd0('0x10'))(_0x2cd0('0x11'));var utils=require('../../config/utils');var config=require(_0x2cd0('0x12'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');var jayson=require(_0x2cd0('0x13'));var client=jayson[_0x2cd0('0x14')]['http']({'port':0x232a});function respondWithRpcPromise(_0xafb3dc,_0xa94b3,_0x187fb7,_0x4164c5){return new BPromise(function(_0x3a75d1,_0x8960bd){var _0x567bc8=_0x4164c5||client;return _0x567bc8[_0x2cd0('0x15')](_0xafb3dc,_0x187fb7)[_0x2cd0('0x16')](function(_0x177816){logger[_0x2cd0('0x17')](_0x2cd0('0x18'),_0xa94b3,_0x2cd0('0x19'));logger[_0x2cd0('0x1a')]('ZohoAccount,\x20%s,\x20%s,\x20%s',_0xa94b3,_0x2cd0('0x19'),JSON[_0x2cd0('0x1b')](_0x177816));if(_0x177816[_0x2cd0('0x1c')]){if(_0x177816[_0x2cd0('0x1c')][_0x2cd0('0x1d')]===0x1f4){logger['error'](_0x2cd0('0x18'),_0xa94b3,_0x177816['error']['message']);return _0x8960bd(_0x177816['error']['message']);}logger[_0x2cd0('0x1c')](_0x2cd0('0x18'),_0xa94b3,_0x177816[_0x2cd0('0x1c')][_0x2cd0('0x1e')]);return _0x3a75d1(_0x177816['error'][_0x2cd0('0x1e')]);}else{logger['info'](_0x2cd0('0x18'),_0xa94b3,_0x2cd0('0x19'));_0x3a75d1(_0x177816[_0x2cd0('0x1f')][_0x2cd0('0x1e')]);}})[_0x2cd0('0x20')](function(_0x5a580a){logger[_0x2cd0('0x1c')](_0x2cd0('0x18'),_0xa94b3,_0x5a580a);_0x8960bd(_0x5a580a);});});}function respondWithStatusCode(_0xab2ac6,_0x5bba7a){_0x5bba7a=_0x5bba7a||0xcc;return function(_0x4bf11a){if(_0x4bf11a){return _0xab2ac6[_0x2cd0('0x21')](_0x5bba7a);}return _0xab2ac6[_0x2cd0('0x22')](_0x5bba7a)[_0x2cd0('0x23')]();};}function respondWithResult(_0x4aff0b,_0x347fbe){_0x347fbe=_0x347fbe||0xc8;return function(_0x26f1da){if(_0x26f1da){return _0x4aff0b['status'](_0x347fbe)[_0x2cd0('0x24')](_0x26f1da);}};}function respondWithFilteredResult(_0x5631be,_0x260c16){return function(_0x38c6ed){if(_0x38c6ed){var _0x2ca1ba=typeof _0x260c16['offset']===_0x2cd0('0x25')&&typeof _0x260c16[_0x2cd0('0x26')]===_0x2cd0('0x25');var _0x1cacfe=_0x38c6ed['count'];var _0x2be37e=_0x2ca1ba?0x0:_0x260c16[_0x2cd0('0x27')];var _0xfd74d2=_0x2ca1ba?_0x38c6ed['count']:_0x260c16[_0x2cd0('0x27')]+_0x260c16['limit'];var _0x1c6fde;if(_0xfd74d2>=_0x1cacfe){_0xfd74d2=_0x1cacfe;_0x1c6fde=0xc8;}else{_0x1c6fde=0xce;}_0x5631be[_0x2cd0('0x22')](_0x1c6fde);return _0x5631be[_0x2cd0('0x28')](_0x2cd0('0x29'),_0x2be37e+'-'+_0xfd74d2+'/'+_0x1cacfe)[_0x2cd0('0x24')](_0x38c6ed);}return null;};}function patchUpdates(_0x13a155){return function(_0x5b9b29){try{jsonpatch[_0x2cd0('0x2a')](_0x5b9b29,_0x13a155,!![]);}catch(_0x9276d5){return BPromise[_0x2cd0('0x2b')](_0x9276d5);}return _0x5b9b29[_0x2cd0('0x2c')]();};}function saveUpdates(_0x4f6a16,_0x41d93c){return function(_0x1d995a){if(_0x1d995a){return _0x1d995a['update'](_0x4f6a16)[_0x2cd0('0x16')](function(_0x1e7ce0){return _0x1e7ce0;});}return null;};}function removeEntity(_0x13e2da,_0x9544a4){return function(_0x2d3f42){if(_0x2d3f42){return _0x2d3f42[_0x2cd0('0x2d')]()[_0x2cd0('0x16')](function(){_0x13e2da[_0x2cd0('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x33b24c,_0x30731f){return function(_0x2c7fbe){if(!_0x2c7fbe){_0x33b24c[_0x2cd0('0x21')](0x194);}return _0x2c7fbe;};}function handleError(_0x481eff,_0x347a85){_0x347a85=_0x347a85||0x1f4;return function(_0x285cc4){logger['error'](_0x285cc4[_0x2cd0('0x2e')]);if(_0x285cc4[_0x2cd0('0x2f')]){delete _0x285cc4['name'];}_0x481eff[_0x2cd0('0x22')](_0x347a85)[_0x2cd0('0x30')](_0x285cc4);};}exports[_0x2cd0('0x31')]=function(_0x481c3f,_0x4205cb){var _0x5e6702={},_0x3c42a6={},_0x371044={'count':0x0,'rows':[]};var _0x3f60b9=_[_0x2cd0('0x32')](db['ZohoAccount'][_0x2cd0('0x33')],function(_0x3b7885){return{'name':_0x3b7885[_0x2cd0('0x34')],'type':_0x3b7885[_0x2cd0('0x35')][_0x2cd0('0x36')]};});_0x3c42a6['model']=_[_0x2cd0('0x32')](_0x3f60b9,_0x2cd0('0x2f'));_0x3c42a6[_0x2cd0('0x37')]=_[_0x2cd0('0x38')](_0x481c3f['query']);_0x3c42a6[_0x2cd0('0x39')]=_[_0x2cd0('0x3a')](_0x3c42a6[_0x2cd0('0x3b')],_0x3c42a6[_0x2cd0('0x37')]);_0x5e6702[_0x2cd0('0x3c')]=_[_0x2cd0('0x3a')](_0x3c42a6[_0x2cd0('0x3b')],qs[_0x2cd0('0x3d')](_0x481c3f[_0x2cd0('0x37')][_0x2cd0('0x3d')]));_0x5e6702[_0x2cd0('0x3c')]=_0x5e6702['attributes'][_0x2cd0('0x3e')]?_0x5e6702[_0x2cd0('0x3c')]:_0x3c42a6['model'];if(!_0x481c3f[_0x2cd0('0x37')]['hasOwnProperty'](_0x2cd0('0x3f'))){_0x5e6702[_0x2cd0('0x26')]=qs[_0x2cd0('0x26')](_0x481c3f[_0x2cd0('0x37')]['limit']);_0x5e6702[_0x2cd0('0x27')]=qs[_0x2cd0('0x27')](_0x481c3f[_0x2cd0('0x37')][_0x2cd0('0x27')]);}_0x5e6702[_0x2cd0('0x40')]=qs[_0x2cd0('0x41')](_0x481c3f[_0x2cd0('0x37')][_0x2cd0('0x41')]);_0x5e6702[_0x2cd0('0x42')]=qs[_0x2cd0('0x39')](_[_0x2cd0('0x43')](_0x481c3f[_0x2cd0('0x37')],_0x3c42a6['filters']),_0x3f60b9);if(_0x481c3f[_0x2cd0('0x37')][_0x2cd0('0x44')]){_0x5e6702[_0x2cd0('0x42')]=_[_0x2cd0('0x45')](_0x5e6702[_0x2cd0('0x42')],{'$or':_['map'](_0x3f60b9,function(_0x15f67e){if(_0x15f67e['type']!==_0x2cd0('0x46')){var _0x549734={};_0x549734[_0x15f67e[_0x2cd0('0x2f')]]={'$like':'%'+_0x481c3f[_0x2cd0('0x37')][_0x2cd0('0x44')]+'%'};return _0x549734;}})});}_0x5e6702=_[_0x2cd0('0x45')]({},_0x5e6702,_0x481c3f['options']);var _0x450c49={'where':_0x5e6702[_0x2cd0('0x42')]};return db[_0x2cd0('0x47')][_0x2cd0('0x48')](_0x450c49)[_0x2cd0('0x16')](function(_0x3e4c6c){_0x371044[_0x2cd0('0x48')]=_0x3e4c6c;if(_0x481c3f['query'][_0x2cd0('0x49')]){_0x5e6702[_0x2cd0('0x4a')]=[{'all':!![]}];}return db[_0x2cd0('0x47')][_0x2cd0('0x4b')](_0x5e6702);})['then'](function(_0x58d260){_0x371044[_0x2cd0('0x4c')]=_0x58d260;return _0x371044;})[_0x2cd0('0x16')](respondWithFilteredResult(_0x4205cb,_0x5e6702))[_0x2cd0('0x20')](handleError(_0x4205cb,null));};exports[_0x2cd0('0x4d')]=function(_0xa40419,_0x2a6697){var _0x333c57={'raw':![],'where':{'id':_0xa40419['params']['id']}},_0x540151={};_0x540151[_0x2cd0('0x3b')]=_[_0x2cd0('0x38')](db[_0x2cd0('0x47')][_0x2cd0('0x33')]);_0x540151['query']=_[_0x2cd0('0x38')](_0xa40419['query']);_0x540151['filters']=_['intersection'](_0x540151['model'],_0x540151[_0x2cd0('0x37')]);_0x333c57[_0x2cd0('0x3c')]=_['intersection'](_0x540151['model'],qs['fields'](_0xa40419[_0x2cd0('0x37')]['fields']));_0x333c57[_0x2cd0('0x3c')]=_0x333c57[_0x2cd0('0x3c')]['length']?_0x333c57['attributes']:_0x540151[_0x2cd0('0x3b')];if(_0xa40419['query']['includeAll']){_0x333c57[_0x2cd0('0x4a')]=[{'all':!![]}];}_0x333c57=_[_0x2cd0('0x45')]({},_0x333c57,_0xa40419[_0x2cd0('0x4e')]);return db[_0x2cd0('0x47')][_0x2cd0('0x4f')](_0x333c57)[_0x2cd0('0x16')](handleEntityNotFound(_0x2a6697,null))[_0x2cd0('0x16')](respondWithResult(_0x2a6697,null))['catch'](handleError(_0x2a6697,null));};exports[_0x2cd0('0x50')]=function(_0x1ecad5,_0x19bf06){return db[_0x2cd0('0x47')]['create'](_0x1ecad5['body'],{})[_0x2cd0('0x16')](respondWithResult(_0x19bf06,0xc9))[_0x2cd0('0x20')](handleError(_0x19bf06,null));};exports[_0x2cd0('0x51')]=function(_0x48cb50,_0x256fc6){if(_0x48cb50['body']['id']){delete _0x48cb50[_0x2cd0('0x52')]['id'];}return db[_0x2cd0('0x47')][_0x2cd0('0x4f')]({'where':{'id':_0x48cb50['params']['id']}})[_0x2cd0('0x16')](handleEntityNotFound(_0x256fc6,null))[_0x2cd0('0x16')](saveUpdates(_0x48cb50['body'],null))[_0x2cd0('0x16')](respondWithResult(_0x256fc6,null))[_0x2cd0('0x20')](handleError(_0x256fc6,null));};exports[_0x2cd0('0x2d')]=function(_0x3679c3,_0x3310f0){return db[_0x2cd0('0x47')]['find']({'where':{'id':_0x3679c3['params']['id']}})['then'](handleEntityNotFound(_0x3310f0,null))[_0x2cd0('0x16')](removeEntity(_0x3310f0,null))[_0x2cd0('0x20')](handleError(_0x3310f0,null));};exports['getConfigurations']=function(_0x442583,_0x43d236,_0x1dbc36){var _0x3cbc77={};var _0x3eda5d={};var _0x4a7f84;var _0x4f65e3;return db[_0x2cd0('0x47')][_0x2cd0('0x53')]({'where':{'id':_0x442583[_0x2cd0('0x54')]['id']}})[_0x2cd0('0x16')](handleEntityNotFound(_0x43d236,null))[_0x2cd0('0x16')](function(_0x351071){if(_0x351071){_0x4a7f84=_0x351071;_0x3eda5d[_0x2cd0('0x3b')]=_[_0x2cd0('0x38')](db[_0x2cd0('0x55')]['rawAttributes']);_0x3eda5d[_0x2cd0('0x37')]=_[_0x2cd0('0x38')](_0x442583['query']);_0x3eda5d['filters']=_[_0x2cd0('0x3a')](_0x3eda5d[_0x2cd0('0x3b')],_0x3eda5d[_0x2cd0('0x37')]);_0x3cbc77[_0x2cd0('0x3c')]=_[_0x2cd0('0x3a')](_0x3eda5d[_0x2cd0('0x3b')],qs[_0x2cd0('0x3d')](_0x442583[_0x2cd0('0x37')]['fields']));_0x3cbc77['attributes']=_0x3cbc77[_0x2cd0('0x3c')][_0x2cd0('0x3e')]?_0x3cbc77[_0x2cd0('0x3c')]:_0x3eda5d['model'];_0x3cbc77['order']=qs[_0x2cd0('0x41')](_0x442583[_0x2cd0('0x37')][_0x2cd0('0x41')]);_0x3cbc77[_0x2cd0('0x42')]=qs[_0x2cd0('0x39')](_['pick'](_0x442583[_0x2cd0('0x37')],_0x3eda5d['filters']));if(_0x442583['query'][_0x2cd0('0x44')]){_0x3cbc77[_0x2cd0('0x42')]=_[_0x2cd0('0x45')](_0x3cbc77['where'],{'$or':_[_0x2cd0('0x32')](_0x3cbc77['attributes'],function(_0x21a14e){var _0x255dbc={};_0x255dbc[_0x21a14e]={'$like':'%'+_0x442583[_0x2cd0('0x37')]['filter']+'%'};return _0x255dbc;})});}_0x3cbc77=_[_0x2cd0('0x45')]({},_0x3cbc77,_0x442583['options']);return _0x4a7f84[_0x2cd0('0x56')](_0x3cbc77);}})[_0x2cd0('0x16')](function(_0x5af27d){if(_0x5af27d){_0x4f65e3=_0x5af27d['length'];if(!_0x442583[_0x2cd0('0x37')]['hasOwnProperty'](_0x2cd0('0x3f'))){_0x3cbc77['limit']=qs['limit'](_0x442583['query']['limit']);_0x3cbc77[_0x2cd0('0x27')]=qs[_0x2cd0('0x27')](_0x442583['query'][_0x2cd0('0x27')]);}return _0x4a7f84[_0x2cd0('0x56')](_0x3cbc77);}})[_0x2cd0('0x16')](function(_0x51456b){if(_0x51456b){return _0x51456b?{'count':_0x4f65e3,'rows':_0x51456b}:null;}})[_0x2cd0('0x16')](respondWithResult(_0x43d236,null))[_0x2cd0('0x20')](handleError(_0x43d236,null));};exports['addConfiguration']=function(_0x32efa5,_0x5f39cd,_0x986b21){if(_0x32efa5[_0x2cd0('0x52')]['id']){delete _0x32efa5[_0x2cd0('0x52')]['id'];}return db[_0x2cd0('0x47')]['findOne']({'where':{'id':_0x32efa5[_0x2cd0('0x54')]['id']}})['then'](handleEntityNotFound(_0x5f39cd,null))[_0x2cd0('0x16')](function(_0x4a46a0){if(_0x4a46a0){_0x32efa5['body']['AccountId']=_0x4a46a0['id'];_0x32efa5[_0x2cd0('0x52')][_0x2cd0('0x57')]=integrations[_0x2cd0('0x58')](_0x32efa5[_0x2cd0('0x52')]['channel'],_0x32efa5['body']['type']);_0x32efa5[_0x2cd0('0x52')][_0x2cd0('0x59')]=integrations[_0x2cd0('0x5a')](_0x32efa5['body'][_0x2cd0('0x5b')],_0x32efa5[_0x2cd0('0x52')]['type']);return db[_0x2cd0('0x55')][_0x2cd0('0x50')](_0x32efa5[_0x2cd0('0x52')],{'include':[{'model':db[_0x2cd0('0x5c')],'as':_0x2cd0('0x57')},{'model':db[_0x2cd0('0x5c')],'as':_0x2cd0('0x59')}]});}return null;})['then'](respondWithResult(_0x5f39cd,null))['catch'](handleError(_0x5f39cd,null));};function getAccessToken(_0x1d63cb){return new Promise(function(_0xddd2e9,_0xc2ff49){var _0x8c01a5;switch(_0x1d63cb[_0x2cd0('0x5d')]){case'US':_0x8c01a5='https://accounts.zoho.com';break;case'AU':_0x8c01a5=_0x2cd0('0x5e');break;case'EU':_0x8c01a5=_0x2cd0('0x5f');break;case'IN':_0x8c01a5=_0x2cd0('0x60');break;case'CN':_0x8c01a5=_0x2cd0('0x61');break;default:_0x8c01a5=_0x2cd0('0x5f');break;}var _0x3d0e2b={'method':_0x2cd0('0x62'),'uri':_0x8c01a5+_0x2cd0('0x63'),'qs':{'refresh_token':_0x1d63cb[_0x2cd0('0x64')],'client_id':_0x1d63cb[_0x2cd0('0x65')],'client_secret':_0x1d63cb[_0x2cd0('0x66')],'grant_type':_0x2cd0('0x67')},'json':!![]};return rp(_0x3d0e2b)[_0x2cd0('0x16')](function(_0x356f26){if(_0x356f26[_0x2cd0('0x68')]){_0xddd2e9(_0x356f26[_0x2cd0('0x68')]);}else{_0xc2ff49(_0x2cd0('0x69'));}})[_0x2cd0('0x20')](function(_0x1bb31e){_0xc2ff49(_0x1bb31e);});});}exports[_0x2cd0('0x6a')]=function(_0x1fcbc8,_0x3a305d,_0x376929){var _0x10f5bf,_0x3f1917,_0x35c23f,_0xb4acb7,_0x427258;return db[_0x2cd0('0x47')][_0x2cd0('0x53')]({'where':{'id':_0x1fcbc8[_0x2cd0('0x54')]['id']},'attributes':['id',_0x2cd0('0x6b'),_0x2cd0('0x5d'),_0x2cd0('0x65'),_0x2cd0('0x66'),_0x2cd0('0x6c'),_0x2cd0('0x1d'),_0x2cd0('0x64')]})[_0x2cd0('0x16')](handleEntityNotFound(_0x3a305d,null))['then'](function(_0x15c7fd){_0x427258=_0x15c7fd;_0x10f5bf=_0x427258['host'];_0x3f1917=_0x10f5bf==='zoho.eu'?'eu':_0x2cd0('0x6d');_0x35c23f=_0x427258[_0x2cd0('0x6c')];var _0x3ec3d3=_0x35c23f[_0x2cd0('0x6e')](-0x1);if(_0x3ec3d3==='/'||_0x3ec3d3==='\x5c'||_0x3ec3d3===':'){_0x35c23f=_0x35c23f[_0x2cd0('0x6f')](0x0,_0x35c23f[_0x2cd0('0x70')](_0x3ec3d3));}if(!_0x427258[_0x2cd0('0x64')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x427258);})[_0x2cd0('0x16')](function(_0x1fffba){if(_0x1fffba){return rp({'method':'GET','uri':util[_0x2cd0('0x71')](_0x2cd0('0x72'),_0x3f1917),'qs':{'module':_0x2cd0('0x73')},'headers':{'Authorization':_0x2cd0('0x74')+_0x1fffba},'json':!![]});}})[_0x2cd0('0x16')](function(_0x2aca98){if(_0x2aca98){if(_0x2aca98['response']&&_0x2aca98[_0x2cd0('0x75')]['error']){throw new Error(_0x2aca98['response']['error'][_0x2cd0('0x1e')]);}var _0x5a2067=[];var _0x4f653d=[];var _0x289121=[_0x2cd0('0x76'),_0x2cd0('0x77'),_0x2cd0('0x78'),_0x2cd0('0x79'),_0x2cd0('0x7a'),_0x2cd0('0x7b'),_0x2cd0('0x7c'),_0x2cd0('0x7d')];_0x4f653d=_[_0x2cd0('0x7e')](_0x2aca98[_0x2cd0('0x3d')],function(_0x16db69){return _0x289121[_0x2cd0('0x7f')](_0x16db69[_0x2cd0('0x80')]);});for(var _0x39f36e=0x0;_0x39f36e<_0x4f653d['length'];_0x39f36e++){if(_0x4f653d[_0x39f36e]['system_mandatory']===![]){_0x5a2067[_0x2cd0('0x81')]({'id':_0x4f653d[_0x39f36e]['id'],'name':_0x4f653d[_0x39f36e][_0x2cd0('0x82')],'custom':_0x4f653d[_0x39f36e][_0x2cd0('0x83')],'options':_0x4f653d[_0x39f36e][_0x2cd0('0x84')]===_0x2cd0('0x85')&&_0x4f653d[_0x39f36e][_0x2cd0('0x86')]['length']>-0x1?_['map'](_0x4f653d[_0x39f36e][_0x2cd0('0x86')],function(_0x8f95c4){return{'name':_0x8f95c4,'value':_0x8f95c4};}):[]});}}return{'count':_0x5a2067[_0x2cd0('0x3e')],'rows':_0x5a2067};}else{return{'count':0x0,'rows':[]};}})[_0x2cd0('0x16')](respondWithResult(_0x3a305d,null))[_0x2cd0('0x20')](function(_0x432c13){var _0x1d7d88=_0x1fcbc8['query'][_0x2cd0('0x87')]?0x1f4:_0x432c13[_0x2cd0('0x88')]||0x1f4;logger[_0x2cd0('0x1c')]('getFields,\x20%s,\x20%s,\x20%s',_0x2cd0('0x6a'),_0x1d7d88,JSON[_0x2cd0('0x1b')](_0x432c13));delete _0x432c13[_0x2cd0('0x2f')];if(_0x1d7d88===0x191){_0x1d7d88=0x190;}_0x3a305d[_0x2cd0('0x22')](_0x1d7d88)[_0x2cd0('0x30')](_0x1fcbc8[_0x2cd0('0x37')][_0x2cd0('0x87')]?{'message':_0x2cd0('0x89'),'statusCode':_0x432c13[_0x2cd0('0x88')]}:_0x432c13);});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.model.js b/server/api/intZohoAccount/intZohoAccount.model.js index dedd8c1..23c06ce 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 _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 +var _0xcc41=['refresh_token','refreshToken','format','name','error','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','catch','inspect','substring','https://accounts.zoho.com.cn','application/x-www-form-urlencoded','info','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','lodash','util','moment','bluebird','request-promise','../../components/integrations/configuration','exports','define','ZohoAccount','changed','zone','serverUrl','clientId','clientSecret','code','host','slice','lastIndexOf','https://accounts.zoho.com','https://accounts.zoho.in','https://accounts.zoho.eu','POST','/oauth/v2/token','authorization_code','then','parse'];(function(_0x192ba7,_0x3aca74){var _0x5aa8bb=function(_0x23e4cd){while(--_0x23e4cd){_0x192ba7['push'](_0x192ba7['shift']());}};_0x5aa8bb(++_0x3aca74);}(_0xcc41,0xf7));var _0x1cc4=function(_0x3447b0,_0x263d63){_0x3447b0=_0x3447b0-0x0;var _0x1f8e79=_0xcc41[_0x3447b0];return _0x1f8e79;};'use strict';var _=require(_0x1cc4('0x0'));var util=require(_0x1cc4('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x1cc4('0x2'));var BPromise=require(_0x1cc4('0x3'));var rp=require(_0x1cc4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intZohoAccount.attributes');var integrations=require(_0x1cc4('0x5'));module[_0x1cc4('0x6')]=function(_0x25549c,_0x372a91){return _0x25549c[_0x1cc4('0x7')](_0x1cc4('0x8'),attributes,{'tableName':'int_zoho_accounts','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x1061eb,_0x367cf1,_0x405a98){if(_0x1061eb[_0x1cc4('0x9')](_0x1cc4('0xa'))||_0x1061eb[_0x1cc4('0x9')](_0x1cc4('0xb'))||_0x1061eb['changed'](_0x1cc4('0xc'))||_0x1061eb[_0x1cc4('0x9')](_0x1cc4('0xd'))||_0x1061eb['changed'](_0x1cc4('0xe'))||_0x1061eb[_0x1cc4('0x9')](_0x1cc4('0xf'))){var _0x595782,_0x6f3c0f;_0x595782=_0x1061eb[_0x1cc4('0xb')];var _0x4098d0=_0x595782[_0x1cc4('0x10')](-0x1);if(_0x4098d0==='/'||_0x4098d0==='\x5c'||_0x4098d0===':'){_0x595782=_0x595782['substring'](0x0,_0x595782[_0x1cc4('0x11')](_0x4098d0));}switch(_0x1061eb['zone']){case'US':_0x6f3c0f=_0x1cc4('0x12');break;case'AU':_0x6f3c0f='https://accounts.zoho.com.au';break;case'IN':_0x6f3c0f=_0x1cc4('0x13');break;case'CN':_0x6f3c0f='https://accounts.zoho.com.cn';break;default:_0x6f3c0f=_0x1cc4('0x14');break;}var _0x455ce8={'method':_0x1cc4('0x15'),'uri':_0x6f3c0f+_0x1cc4('0x16'),'form':{'grant_type':_0x1cc4('0x17'),'client_id':_0x1061eb[_0x1cc4('0xc')],'client_secret':_0x1061eb[_0x1cc4('0xd')],'redirect_uri':_0x1061eb['serverUrl'],'code':_0x1061eb[_0x1cc4('0xe')]},'headers':{'Content-Type':'application/x-www-form-urlencoded'}};return rp(_0x455ce8)[_0x1cc4('0x18')](function(_0x4185e4){var _0x2af746=JSON[_0x1cc4('0x19')](_0x4185e4);if(_0x2af746[_0x1cc4('0x1a')]){_0x1061eb[_0x1cc4('0x1b')]=_0x2af746[_0x1cc4('0x1a')];logger['info'](util[_0x1cc4('0x1c')]('ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d',_0x1061eb[_0x1cc4('0x1d')],_0x1061eb['id']));}else{logger[_0x1cc4('0x1e')](util[_0x1cc4('0x1c')](_0x1cc4('0x1f'),_0x1061eb['name'],_0x1061eb['id']),util['inspect'](_0x2af746,{'showHidden':![],'depth':null}));}return _0x405a98(null,_0x367cf1);})[_0x1cc4('0x20')](function(_0x5ca1a9){logger[_0x1cc4('0x1e')](util[_0x1cc4('0x1c')](_0x1cc4('0x1f'),_0x1061eb[_0x1cc4('0x1d')],_0x1061eb['id']),util[_0x1cc4('0x21')](parsedResult,{'showHidden':![],'depth':null}));return _0x405a98(_0x5ca1a9);});}else{return _0x405a98(null,_0x367cf1);}},'beforeUpdate':function(_0x1b138b,_0x59aa35,_0x537183){if(_0x1b138b[_0x1cc4('0x9')](_0x1cc4('0xa'))||_0x1b138b[_0x1cc4('0x9')](_0x1cc4('0xb'))||_0x1b138b[_0x1cc4('0x9')]('clientId')||_0x1b138b[_0x1cc4('0x9')](_0x1cc4('0xd'))||_0x1b138b[_0x1cc4('0x9')](_0x1cc4('0xe'))||_0x1b138b[_0x1cc4('0x9')](_0x1cc4('0xf'))){var _0x515853,_0x33ede8;_0x515853=_0x1b138b[_0x1cc4('0xb')];var _0x29c199=_0x515853[_0x1cc4('0x10')](-0x1);if(_0x29c199==='/'||_0x29c199==='\x5c'||_0x29c199===':'){_0x515853=_0x515853[_0x1cc4('0x22')](0x0,_0x515853[_0x1cc4('0x11')](_0x29c199));}switch(_0x1b138b[_0x1cc4('0xa')]){case'US':_0x33ede8=_0x1cc4('0x12');break;case'AU':_0x33ede8='https://accounts.zoho.com.au';break;case'IN':_0x33ede8='https://accounts.zoho.in';break;case'CN':_0x33ede8=_0x1cc4('0x23');break;default:_0x33ede8=_0x1cc4('0x14');break;}var _0x8c8936={'method':'POST','uri':_0x33ede8+_0x1cc4('0x16'),'form':{'grant_type':'authorization_code','client_id':_0x1b138b[_0x1cc4('0xc')],'client_secret':_0x1b138b['clientSecret'],'redirect_uri':_0x1b138b[_0x1cc4('0xb')],'code':_0x1b138b[_0x1cc4('0xe')]},'headers':{'Content-Type':_0x1cc4('0x24')}};return rp(_0x8c8936)[_0x1cc4('0x18')](function(_0x270baf){var _0x16bfd9=JSON[_0x1cc4('0x19')](_0x270baf);if(_0x16bfd9[_0x1cc4('0x1a')]){_0x1b138b['refreshToken']=_0x16bfd9['refresh_token'];logger[_0x1cc4('0x25')](util['format'](_0x1cc4('0x26'),_0x1b138b['name'],_0x1b138b['id']));}else{logger[_0x1cc4('0x1e')](util[_0x1cc4('0x1c')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x1b138b[_0x1cc4('0x1d')],_0x1b138b['id']),util[_0x1cc4('0x21')](_0x16bfd9,{'showHidden':![],'depth':null}));}return _0x537183(null,_0x59aa35);})[_0x1cc4('0x20')](function(_0x2160ce){logger[_0x1cc4('0x1e')](util['format'](_0x1cc4('0x1f'),_0x1b138b[_0x1cc4('0x1d')],_0x1b138b['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x537183(_0x2160ce);});}else{return _0x537183(null,_0x59aa35);}}}});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.rpc.js b/server/api/intZohoAccount/intZohoAccount.rpc.js index f415cc3..82d945e 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 _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 +var _0xdeb3=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','GetZohoAccount','ZohoAccount','options','where','limit','include','map','model','attributes','debug','catch','ShowZohoAccount','raw','util','moment','bluebird'];(function(_0x345dcd,_0x5b55c8){var _0x17d916=function(_0x5e1605){while(--_0x5e1605){_0x345dcd['push'](_0x345dcd['shift']());}};_0x17d916(++_0x5b55c8);}(_0xdeb3,0xb7));var _0x3deb=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xdeb3[_0x42cae2];return _0x5f256f;};'use strict';var _=require('lodash');var util=require(_0x3deb('0x0'));var moment=require(_0x3deb('0x1'));var BPromise=require(_0x3deb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3deb('0x3'))['db'];var utils=require(_0x3deb('0x4'));var logger=require(_0x3deb('0x5'))(_0x3deb('0x6'));var config=require(_0x3deb('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x3deb('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x469e98,_0x5455e4,_0x37db86){return new BPromise(function(_0x1bf486,_0x3e983a){return client[_0x3deb('0x9')](_0x469e98,_0x37db86)[_0x3deb('0xa')](function(_0x1a4974){logger[_0x3deb('0xb')](_0x3deb('0xc'),_0x5455e4,_0x3deb('0xd'));logger['debug']('ZohoAccount,\x20%s,\x20%s,\x20%s',_0x5455e4,_0x3deb('0xd'),JSON[_0x3deb('0xe')](_0x1a4974));if(_0x1a4974[_0x3deb('0xf')]){if(_0x1a4974['error'][_0x3deb('0x10')]===0x1f4){logger[_0x3deb('0xf')](_0x3deb('0xc'),_0x5455e4,_0x1a4974[_0x3deb('0xf')]['message']);return _0x3e983a(_0x1a4974['error']['message']);}logger[_0x3deb('0xf')](_0x3deb('0xc'),_0x5455e4,_0x1a4974[_0x3deb('0xf')]['message']);return _0x1bf486(_0x1a4974[_0x3deb('0xf')][_0x3deb('0x11')]);}else{logger['info'](_0x3deb('0xc'),_0x5455e4,_0x3deb('0xd'));_0x1bf486(_0x1a4974['result'][_0x3deb('0x11')]);}})['catch'](function(_0x465f33){logger['error']('ZohoAccount,\x20%s,\x20%s',_0x5455e4,_0x465f33);_0x3e983a(_0x465f33);});});}exports[_0x3deb('0x12')]=function(_0x23c4b9){var _0xd036ad=this;return new Promise(function(_0x9ba4f,_0x8b65f){return db[_0x3deb('0x13')]['findAll']({'raw':_0x23c4b9[_0x3deb('0x14')]?_0x23c4b9[_0x3deb('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x23c4b9[_0x3deb('0x14')]?_0x23c4b9[_0x3deb('0x14')][_0x3deb('0x15')]||null:null,'attributes':_0x23c4b9[_0x3deb('0x14')]?_0x23c4b9[_0x3deb('0x14')]['attributes']||null:null,'limit':_0x23c4b9[_0x3deb('0x14')]?_0x23c4b9[_0x3deb('0x14')][_0x3deb('0x16')]||null:null,'include':_0x23c4b9[_0x3deb('0x14')]?_0x23c4b9[_0x3deb('0x14')][_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x23c4b9[_0x3deb('0x14')][_0x3deb('0x17')],function(_0x487283){return{'model':db[_0x487283[_0x3deb('0x19')]],'as':_0x487283['as'],'attributes':_0x487283['attributes'],'include':_0x487283[_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x487283[_0x3deb('0x17')],function(_0x392fec){return{'model':db[_0x392fec[_0x3deb('0x19')]],'as':_0x392fec['as'],'attributes':_0x392fec[_0x3deb('0x1a')],'include':_0x392fec[_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x392fec[_0x3deb('0x17')],function(_0x2789cd){return{'model':db[_0x2789cd[_0x3deb('0x19')]],'as':_0x2789cd['as'],'attributes':_0x2789cd[_0x3deb('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x3deb('0xa')](function(_0x1ffbd3){logger[_0x3deb('0xb')](_0x3deb('0x12'),_0x23c4b9);logger[_0x3deb('0x1b')](_0x3deb('0x12'),_0x23c4b9,JSON[_0x3deb('0xe')](_0x1ffbd3));_0x9ba4f(_0x1ffbd3);})[_0x3deb('0x1c')](function(_0x4c72c7){logger[_0x3deb('0xf')](_0x3deb('0x12'),_0x4c72c7['message'],_0x23c4b9);_0x8b65f(_0xd036ad[_0x3deb('0xf')](0x1f4,_0x4c72c7['message']));});});};exports[_0x3deb('0x1d')]=function(_0x346abf){var _0x13b79f=this;return new Promise(function(_0x48e3aa,_0x1a017e){return db[_0x3deb('0x13')]['find']({'raw':_0x346abf[_0x3deb('0x14')]?_0x346abf[_0x3deb('0x14')][_0x3deb('0x1e')]===undefined?!![]:![]:!![],'where':_0x346abf[_0x3deb('0x14')]?_0x346abf[_0x3deb('0x14')][_0x3deb('0x15')]||null:null,'attributes':_0x346abf[_0x3deb('0x14')]?_0x346abf[_0x3deb('0x14')]['attributes']||null:null,'include':_0x346abf[_0x3deb('0x14')]?_0x346abf[_0x3deb('0x14')][_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x346abf[_0x3deb('0x14')][_0x3deb('0x17')],function(_0x2cae74){return{'model':db[_0x2cae74[_0x3deb('0x19')]],'as':_0x2cae74['as'],'attributes':_0x2cae74[_0x3deb('0x1a')],'include':_0x2cae74[_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x2cae74[_0x3deb('0x17')],function(_0x1da3a0){return{'model':db[_0x1da3a0[_0x3deb('0x19')]],'as':_0x1da3a0['as'],'attributes':_0x1da3a0[_0x3deb('0x1a')],'include':_0x1da3a0[_0x3deb('0x17')]?_[_0x3deb('0x18')](_0x1da3a0[_0x3deb('0x17')],function(_0x16a6ff){return{'model':db[_0x16a6ff['model']],'as':_0x16a6ff['as'],'attributes':_0x16a6ff[_0x3deb('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x3deb('0xa')](function(_0x390610){logger[_0x3deb('0xb')]('ShowZohoAccount',_0x346abf);logger[_0x3deb('0x1b')](_0x3deb('0x1d'),_0x346abf,JSON[_0x3deb('0xe')](_0x390610));_0x48e3aa(_0x390610);})[_0x3deb('0x1c')](function(_0x27c214){logger['error']('ShowZohoAccount',_0x27c214[_0x3deb('0x11')],_0x346abf);_0x1a017e(_0x13b79f[_0x3deb('0xf')](0x1f4,_0x27c214[_0x3deb('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/index.js b/server/api/intZohoConfiguration/index.js index 385b683..87fa2ec 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 _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 +var _0xc204=['getDescriptions','put','/:id','update','delete','destroy','exports','express','../../components/auth/service','../../config/environment','isAuthenticated','get','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions'];(function(_0x3be963,_0xa29233){var _0x4bfb14=function(_0x88ce4f){while(--_0x88ce4f){_0x3be963['push'](_0x3be963['shift']());}};_0x4bfb14(++_0xa29233);}(_0xc204,0x1f4));var _0x4c20=function(_0xa7d2bb,_0x309797){_0xa7d2bb=_0xa7d2bb-0x0;var _0x48919a=_0xc204[_0xa7d2bb];return _0x48919a;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x4c20('0x0'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x4c20('0x1'));var interaction=require('../../components/interaction/service');var config=require(_0x4c20('0x2'));var controller=require('./intZohoConfiguration.controller');router['get']('/',auth[_0x4c20('0x3')](),controller['index']);router[_0x4c20('0x4')]('/:id',auth['isAuthenticated'](),controller[_0x4c20('0x5')]);router[_0x4c20('0x4')](_0x4c20('0x6'),auth['isAuthenticated'](),controller['getFields']);router[_0x4c20('0x4')](_0x4c20('0x7'),auth['isAuthenticated'](),controller[_0x4c20('0x8')]);router[_0x4c20('0x4')](_0x4c20('0x9'),auth[_0x4c20('0x3')](),controller[_0x4c20('0xa')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x4c20('0xb')](_0x4c20('0xc'),auth[_0x4c20('0x3')](),controller[_0x4c20('0xd')]);router[_0x4c20('0xe')](_0x4c20('0xc'),auth[_0x4c20('0x3')](),controller[_0x4c20('0xf')]);module[_0x4c20('0x10')]=router; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js index 4eea4df..fd7b056 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 _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 +var _0x7aaf=['contact_lead','sequelize','STRING','ENUM','nothing','contact','lead'];(function(_0x8bb4c1,_0x2d6e53){var _0x67a6e1=function(_0x1155e5){while(--_0x1155e5){_0x8bb4c1['push'](_0x8bb4c1['shift']());}};_0x67a6e1(++_0x2d6e53);}(_0x7aaf,0x1eb));var _0xf7aa=function(_0x2e66bc,_0x3435be){_0x2e66bc=_0x2e66bc-0x0;var _0x4f0c58=_0x7aaf[_0x2e66bc];return _0x4f0c58;};'use strict';var Sequelize=require(_0xf7aa('0x0'));module['exports']={'name':{'type':Sequelize[_0xf7aa('0x1')]},'moduleCreate':{'type':Sequelize[_0xf7aa('0x2')]('lead','contact',_0xf7aa('0x3')),'defaultValue':'lead'},'moduleSearch':{'type':Sequelize[_0xf7aa('0x2')]('contact_lead',_0xf7aa('0x4'),_0xf7aa('0x5')),'defaultValue':_0xf7aa('0x6')},'description':{'type':Sequelize[_0xf7aa('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js index 255e058..f8d88ce 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 _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 +var _0xf0bf=['count','set','Content-Range','json','apply','reject','update','then','destroy','name','index','ZohoConfiguration','rawAttributes','fieldName','key','model','map','keys','query','intersection','attributes','fields','length','sort','where','filters','pick','filter','type','VIRTUAL','options','include','show','params','includeAll','merge','find','create','body','getFields','findOne','ZohoField','order','hasOwnProperty','getSubjects','getDescriptions','nolimit','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','http','request','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','end','status','offset','limit','undefined'];(function(_0x574a06,_0xe0078e){var _0x34905a=function(_0x27bb13){while(--_0x27bb13){_0x574a06['push'](_0x574a06['shift']());}};_0x34905a(++_0xe0078e);}(_0xf0bf,0xe3));var _0xff0b=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0xf0bf[_0x22f8ab];return _0x2a70e5;};'use strict';var emlformat=require(_0xff0b('0x0'));var rimraf=require(_0xff0b('0x1'));var zipdir=require(_0xff0b('0x2'));var jsonpatch=require(_0xff0b('0x3'));var rp=require('request-promise');var moment=require(_0xff0b('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xff0b('0x5'));var util=require(_0xff0b('0x6'));var path=require('path');var sox=require(_0xff0b('0x7'));var csv=require(_0xff0b('0x8'));var ejs=require(_0xff0b('0x9'));var fs=require('fs');var fs_extra=require(_0xff0b('0xa'));var _=require(_0xff0b('0xb'));var squel=require(_0xff0b('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xff0b('0xd'));var Papa=require(_0xff0b('0xe'));var Redis=require(_0xff0b('0xf'));var authService=require(_0xff0b('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xff0b('0x11'));var hardwareService=require(_0xff0b('0x12'));var logger=require(_0xff0b('0x13'))('api');var utils=require(_0xff0b('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xff0b('0x15'));var db=require(_0xff0b('0x16'))['db'];var jayson=require(_0xff0b('0x17'));var client=jayson['client'][_0xff0b('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x43f397,_0x5c21d8,_0x315074,_0x36b1ba){return new BPromise(function(_0x3afc92,_0xdf22b0){var _0x389dfd=_0x36b1ba||client;return _0x389dfd[_0xff0b('0x19')](_0x43f397,_0x315074)['then'](function(_0x5c310d){logger['info'](_0xff0b('0x1a'),_0x5c21d8,_0xff0b('0x1b'));logger[_0xff0b('0x1c')](_0xff0b('0x1d'),_0x5c21d8,'request\x20sent',JSON[_0xff0b('0x1e')](_0x5c310d));if(_0x5c310d[_0xff0b('0x1f')]){if(_0x5c310d['error'][_0xff0b('0x20')]===0x1f4){logger[_0xff0b('0x1f')]('ZohoConfiguration,\x20%s,\x20%s',_0x5c21d8,_0x5c310d[_0xff0b('0x1f')]['message']);return _0xdf22b0(_0x5c310d[_0xff0b('0x1f')][_0xff0b('0x21')]);}logger['error'](_0xff0b('0x1a'),_0x5c21d8,_0x5c310d[_0xff0b('0x1f')]['message']);return _0x3afc92(_0x5c310d[_0xff0b('0x1f')][_0xff0b('0x21')]);}else{logger[_0xff0b('0x22')](_0xff0b('0x1a'),_0x5c21d8,_0xff0b('0x1b'));_0x3afc92(_0x5c310d[_0xff0b('0x23')][_0xff0b('0x21')]);}})[_0xff0b('0x24')](function(_0x4caa9a){logger[_0xff0b('0x1f')](_0xff0b('0x1a'),_0x5c21d8,_0x4caa9a);_0xdf22b0(_0x4caa9a);});});}function respondWithStatusCode(_0x2c0b44,_0x4396b9){_0x4396b9=_0x4396b9||0xcc;return function(_0x4672b8){if(_0x4672b8){return _0x2c0b44[_0xff0b('0x25')](_0x4396b9);}return _0x2c0b44['status'](_0x4396b9)[_0xff0b('0x26')]();};}function respondWithResult(_0x4e65e3,_0x406093){_0x406093=_0x406093||0xc8;return function(_0x2aa188){if(_0x2aa188){return _0x4e65e3[_0xff0b('0x27')](_0x406093)['json'](_0x2aa188);}};}function respondWithFilteredResult(_0x13af28,_0x97085c){return function(_0x29784f){if(_0x29784f){var _0x429103=typeof _0x97085c[_0xff0b('0x28')]==='undefined'&&typeof _0x97085c[_0xff0b('0x29')]===_0xff0b('0x2a');var _0x431697=_0x29784f[_0xff0b('0x2b')];var _0x3c342d=_0x429103?0x0:_0x97085c[_0xff0b('0x28')];var _0x53cbc1=_0x429103?_0x29784f[_0xff0b('0x2b')]:_0x97085c[_0xff0b('0x28')]+_0x97085c['limit'];var _0x10d833;if(_0x53cbc1>=_0x431697){_0x53cbc1=_0x431697;_0x10d833=0xc8;}else{_0x10d833=0xce;}_0x13af28['status'](_0x10d833);return _0x13af28[_0xff0b('0x2c')](_0xff0b('0x2d'),_0x3c342d+'-'+_0x53cbc1+'/'+_0x431697)[_0xff0b('0x2e')](_0x29784f);}return null;};}function patchUpdates(_0x3916e8){return function(_0xd3fac6){try{jsonpatch[_0xff0b('0x2f')](_0xd3fac6,_0x3916e8,!![]);}catch(_0x4bf7b4){return BPromise[_0xff0b('0x30')](_0x4bf7b4);}return _0xd3fac6['save']();};}function saveUpdates(_0x2757e8,_0x85b4e){return function(_0x4fc56a){if(_0x4fc56a){return _0x4fc56a[_0xff0b('0x31')](_0x2757e8)[_0xff0b('0x32')](function(_0x11a667){return _0x11a667;});}return null;};}function removeEntity(_0x501d58,_0x4a09cb){return function(_0x41e616){if(_0x41e616){return _0x41e616[_0xff0b('0x33')]()[_0xff0b('0x32')](function(){_0x501d58[_0xff0b('0x27')](0xcc)[_0xff0b('0x26')]();});}};}function handleEntityNotFound(_0x151ab7,_0x12b915){return function(_0x5a997a){if(!_0x5a997a){_0x151ab7[_0xff0b('0x25')](0x194);}return _0x5a997a;};}function handleError(_0x5ebe2d,_0x327b1f){_0x327b1f=_0x327b1f||0x1f4;return function(_0x20f99c){logger[_0xff0b('0x1f')](_0x20f99c['stack']);if(_0x20f99c[_0xff0b('0x34')]){delete _0x20f99c[_0xff0b('0x34')];}_0x5ebe2d[_0xff0b('0x27')](_0x327b1f)['send'](_0x20f99c);};}exports[_0xff0b('0x35')]=function(_0x48c984,_0x5d5c32){var _0x18df69={},_0x4e73a9={},_0x82dc6c={'count':0x0,'rows':[]};var _0x5b11d=_['map'](db[_0xff0b('0x36')][_0xff0b('0x37')],function(_0x42a319){return{'name':_0x42a319[_0xff0b('0x38')],'type':_0x42a319['type'][_0xff0b('0x39')]};});_0x4e73a9[_0xff0b('0x3a')]=_[_0xff0b('0x3b')](_0x5b11d,_0xff0b('0x34'));_0x4e73a9['query']=_[_0xff0b('0x3c')](_0x48c984[_0xff0b('0x3d')]);_0x4e73a9['filters']=_[_0xff0b('0x3e')](_0x4e73a9[_0xff0b('0x3a')],_0x4e73a9['query']);_0x18df69[_0xff0b('0x3f')]=_['intersection'](_0x4e73a9[_0xff0b('0x3a')],qs[_0xff0b('0x40')](_0x48c984[_0xff0b('0x3d')]['fields']));_0x18df69[_0xff0b('0x3f')]=_0x18df69[_0xff0b('0x3f')][_0xff0b('0x41')]?_0x18df69[_0xff0b('0x3f')]:_0x4e73a9[_0xff0b('0x3a')];if(!_0x48c984[_0xff0b('0x3d')]['hasOwnProperty']('nolimit')){_0x18df69[_0xff0b('0x29')]=qs[_0xff0b('0x29')](_0x48c984[_0xff0b('0x3d')][_0xff0b('0x29')]);_0x18df69[_0xff0b('0x28')]=qs['offset'](_0x48c984['query'][_0xff0b('0x28')]);}_0x18df69['order']=qs[_0xff0b('0x42')](_0x48c984[_0xff0b('0x3d')][_0xff0b('0x42')]);_0x18df69[_0xff0b('0x43')]=qs[_0xff0b('0x44')](_[_0xff0b('0x45')](_0x48c984[_0xff0b('0x3d')],_0x4e73a9[_0xff0b('0x44')]),_0x5b11d);if(_0x48c984[_0xff0b('0x3d')][_0xff0b('0x46')]){_0x18df69['where']=_['merge'](_0x18df69['where'],{'$or':_['map'](_0x5b11d,function(_0x4c1e72){if(_0x4c1e72[_0xff0b('0x47')]!==_0xff0b('0x48')){var _0x297d38={};_0x297d38[_0x4c1e72['name']]={'$like':'%'+_0x48c984[_0xff0b('0x3d')][_0xff0b('0x46')]+'%'};return _0x297d38;}})});}_0x18df69=_['merge']({},_0x18df69,_0x48c984[_0xff0b('0x49')]);var _0x3d5954={'where':_0x18df69['where']};return db[_0xff0b('0x36')][_0xff0b('0x2b')](_0x3d5954)['then'](function(_0x5bc0ac){_0x82dc6c['count']=_0x5bc0ac;if(_0x48c984[_0xff0b('0x3d')]['includeAll']){_0x18df69[_0xff0b('0x4a')]=[{'all':!![]}];}return db[_0xff0b('0x36')]['findAll'](_0x18df69);})['then'](function(_0x140a6d){_0x82dc6c['rows']=_0x140a6d;return _0x82dc6c;})[_0xff0b('0x32')](respondWithFilteredResult(_0x5d5c32,_0x18df69))[_0xff0b('0x24')](handleError(_0x5d5c32,null));};exports[_0xff0b('0x4b')]=function(_0xe2a438,_0x4a31a2){var _0x21002f={'raw':![],'where':{'id':_0xe2a438[_0xff0b('0x4c')]['id']}},_0x5877b7={};_0x5877b7[_0xff0b('0x3a')]=_[_0xff0b('0x3c')](db['ZohoConfiguration'][_0xff0b('0x37')]);_0x5877b7[_0xff0b('0x3d')]=_['keys'](_0xe2a438[_0xff0b('0x3d')]);_0x5877b7[_0xff0b('0x44')]=_[_0xff0b('0x3e')](_0x5877b7[_0xff0b('0x3a')],_0x5877b7[_0xff0b('0x3d')]);_0x21002f[_0xff0b('0x3f')]=_[_0xff0b('0x3e')](_0x5877b7['model'],qs[_0xff0b('0x40')](_0xe2a438[_0xff0b('0x3d')][_0xff0b('0x40')]));_0x21002f[_0xff0b('0x3f')]=_0x21002f[_0xff0b('0x3f')][_0xff0b('0x41')]?_0x21002f['attributes']:_0x5877b7['model'];if(_0xe2a438[_0xff0b('0x3d')][_0xff0b('0x4d')]){_0x21002f[_0xff0b('0x4a')]=[{'all':!![]}];}_0x21002f=_[_0xff0b('0x4e')]({},_0x21002f,_0xe2a438[_0xff0b('0x49')]);return db[_0xff0b('0x36')][_0xff0b('0x4f')](_0x21002f)[_0xff0b('0x32')](handleEntityNotFound(_0x4a31a2,null))[_0xff0b('0x32')](respondWithResult(_0x4a31a2,null))[_0xff0b('0x24')](handleError(_0x4a31a2,null));};exports[_0xff0b('0x50')]=function(_0x506f9c,_0x56f7f4){return db['ZohoConfiguration']['create'](_0x506f9c[_0xff0b('0x51')],{})[_0xff0b('0x32')](respondWithResult(_0x56f7f4,0xc9))[_0xff0b('0x24')](handleError(_0x56f7f4,null));};exports[_0xff0b('0x31')]=function(_0x5e2932,_0x2e67aa){if(_0x5e2932[_0xff0b('0x51')]['id']){delete _0x5e2932['body']['id'];}return db[_0xff0b('0x36')][_0xff0b('0x4f')]({'where':{'id':_0x5e2932['params']['id']}})[_0xff0b('0x32')](handleEntityNotFound(_0x2e67aa,null))[_0xff0b('0x32')](saveUpdates(_0x5e2932[_0xff0b('0x51')],null))[_0xff0b('0x32')](respondWithResult(_0x2e67aa,null))[_0xff0b('0x24')](handleError(_0x2e67aa,null));};exports['destroy']=function(_0x2b84cf,_0x577da4){return db['ZohoConfiguration'][_0xff0b('0x4f')]({'where':{'id':_0x2b84cf[_0xff0b('0x4c')]['id']}})['then'](handleEntityNotFound(_0x577da4,null))[_0xff0b('0x32')](removeEntity(_0x577da4,null))[_0xff0b('0x24')](handleError(_0x577da4,null));};exports[_0xff0b('0x52')]=function(_0x997c08,_0x505a14,_0x28ee16){var _0x1507ee={};var _0x49c98d={};var _0x139038;var _0x1eae90;return db[_0xff0b('0x36')][_0xff0b('0x53')]({'where':{'id':_0x997c08[_0xff0b('0x4c')]['id']}})[_0xff0b('0x32')](handleEntityNotFound(_0x505a14,null))[_0xff0b('0x32')](function(_0x2be926){if(_0x2be926){_0x139038=_0x2be926;_0x49c98d[_0xff0b('0x3a')]=_['keys'](db[_0xff0b('0x54')][_0xff0b('0x37')]);_0x49c98d[_0xff0b('0x3d')]=_[_0xff0b('0x3c')](_0x997c08['query']);_0x49c98d[_0xff0b('0x44')]=_['intersection'](_0x49c98d[_0xff0b('0x3a')],_0x49c98d[_0xff0b('0x3d')]);_0x1507ee[_0xff0b('0x3f')]=_['intersection'](_0x49c98d[_0xff0b('0x3a')],qs[_0xff0b('0x40')](_0x997c08['query'][_0xff0b('0x40')]));_0x1507ee[_0xff0b('0x3f')]=_0x1507ee[_0xff0b('0x3f')][_0xff0b('0x41')]?_0x1507ee[_0xff0b('0x3f')]:_0x49c98d[_0xff0b('0x3a')];_0x1507ee[_0xff0b('0x55')]=qs['sort'](_0x997c08[_0xff0b('0x3d')]['sort']);_0x1507ee['where']=qs['filters'](_[_0xff0b('0x45')](_0x997c08[_0xff0b('0x3d')],_0x49c98d[_0xff0b('0x44')]));if(_0x997c08[_0xff0b('0x3d')][_0xff0b('0x46')]){_0x1507ee[_0xff0b('0x43')]=_[_0xff0b('0x4e')](_0x1507ee[_0xff0b('0x43')],{'$or':_[_0xff0b('0x3b')](_0x1507ee[_0xff0b('0x3f')],function(_0x454f5d){var _0x9b7428={};_0x9b7428[_0x454f5d]={'$like':'%'+_0x997c08[_0xff0b('0x3d')][_0xff0b('0x46')]+'%'};return _0x9b7428;})});}_0x1507ee=_[_0xff0b('0x4e')]({},_0x1507ee,_0x997c08[_0xff0b('0x49')]);return _0x139038[_0xff0b('0x52')](_0x1507ee);}})[_0xff0b('0x32')](function(_0x2bd81b){if(_0x2bd81b){_0x1eae90=_0x2bd81b[_0xff0b('0x41')];if(!_0x997c08[_0xff0b('0x3d')][_0xff0b('0x56')]('nolimit')){_0x1507ee['limit']=qs[_0xff0b('0x29')](_0x997c08[_0xff0b('0x3d')][_0xff0b('0x29')]);_0x1507ee[_0xff0b('0x28')]=qs[_0xff0b('0x28')](_0x997c08['query'][_0xff0b('0x28')]);}return _0x139038['getFields'](_0x1507ee);}})['then'](function(_0x1590c8){if(_0x1590c8){return _0x1590c8?{'count':_0x1eae90,'rows':_0x1590c8}:null;}})['then'](respondWithResult(_0x505a14,null))[_0xff0b('0x24')](handleError(_0x505a14,null));};exports[_0xff0b('0x57')]=function(_0x41bebf,_0x4ee5a1,_0x56b95f){var _0x311498={};var _0x58cbeb={};var _0x4cc975;var _0x4a3c73;return db[_0xff0b('0x36')][_0xff0b('0x53')]({'where':{'id':_0x41bebf[_0xff0b('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4ee5a1,null))[_0xff0b('0x32')](function(_0x5ef23d){if(_0x5ef23d){_0x4cc975=_0x5ef23d;_0x58cbeb[_0xff0b('0x3a')]=_[_0xff0b('0x3c')](db[_0xff0b('0x54')][_0xff0b('0x37')]);_0x58cbeb['query']=_[_0xff0b('0x3c')](_0x41bebf[_0xff0b('0x3d')]);_0x58cbeb[_0xff0b('0x44')]=_[_0xff0b('0x3e')](_0x58cbeb[_0xff0b('0x3a')],_0x58cbeb['query']);_0x311498[_0xff0b('0x3f')]=_['intersection'](_0x58cbeb[_0xff0b('0x3a')],qs[_0xff0b('0x40')](_0x41bebf[_0xff0b('0x3d')][_0xff0b('0x40')]));_0x311498[_0xff0b('0x3f')]=_0x311498[_0xff0b('0x3f')][_0xff0b('0x41')]?_0x311498[_0xff0b('0x3f')]:_0x58cbeb[_0xff0b('0x3a')];_0x311498[_0xff0b('0x55')]=qs[_0xff0b('0x42')](_0x41bebf['query']['sort']);_0x311498[_0xff0b('0x43')]=qs[_0xff0b('0x44')](_[_0xff0b('0x45')](_0x41bebf['query'],_0x58cbeb[_0xff0b('0x44')]));if(_0x41bebf[_0xff0b('0x3d')][_0xff0b('0x46')]){_0x311498[_0xff0b('0x43')]=_[_0xff0b('0x4e')](_0x311498['where'],{'$or':_['map'](_0x311498['attributes'],function(_0x47dea1){var _0x12c172={};_0x12c172[_0x47dea1]={'$like':'%'+_0x41bebf['query']['filter']+'%'};return _0x12c172;})});}_0x311498=_[_0xff0b('0x4e')]({},_0x311498,_0x41bebf[_0xff0b('0x49')]);return _0x4cc975['getSubjects'](_0x311498);}})[_0xff0b('0x32')](function(_0x3ec69d){if(_0x3ec69d){_0x4a3c73=_0x3ec69d['length'];if(!_0x41bebf[_0xff0b('0x3d')][_0xff0b('0x56')]('nolimit')){_0x311498[_0xff0b('0x29')]=qs['limit'](_0x41bebf[_0xff0b('0x3d')]['limit']);_0x311498[_0xff0b('0x28')]=qs[_0xff0b('0x28')](_0x41bebf[_0xff0b('0x3d')][_0xff0b('0x28')]);}return _0x4cc975[_0xff0b('0x57')](_0x311498);}})['then'](function(_0x5f1501){if(_0x5f1501){return _0x5f1501?{'count':_0x4a3c73,'rows':_0x5f1501}:null;}})[_0xff0b('0x32')](respondWithResult(_0x4ee5a1,null))[_0xff0b('0x24')](handleError(_0x4ee5a1,null));};exports[_0xff0b('0x58')]=function(_0xaefa2c,_0x2ab81d,_0x86e8c2){var _0x19dbeb={};var _0x4db578={};var _0x4543fd;var _0x5a2fee;return db[_0xff0b('0x36')][_0xff0b('0x53')]({'where':{'id':_0xaefa2c[_0xff0b('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2ab81d,null))[_0xff0b('0x32')](function(_0x167987){if(_0x167987){_0x4543fd=_0x167987;_0x4db578[_0xff0b('0x3a')]=_[_0xff0b('0x3c')](db['ZohoField'][_0xff0b('0x37')]);_0x4db578[_0xff0b('0x3d')]=_[_0xff0b('0x3c')](_0xaefa2c[_0xff0b('0x3d')]);_0x4db578[_0xff0b('0x44')]=_[_0xff0b('0x3e')](_0x4db578[_0xff0b('0x3a')],_0x4db578[_0xff0b('0x3d')]);_0x19dbeb[_0xff0b('0x3f')]=_[_0xff0b('0x3e')](_0x4db578['model'],qs['fields'](_0xaefa2c[_0xff0b('0x3d')]['fields']));_0x19dbeb[_0xff0b('0x3f')]=_0x19dbeb[_0xff0b('0x3f')]['length']?_0x19dbeb['attributes']:_0x4db578[_0xff0b('0x3a')];_0x19dbeb[_0xff0b('0x55')]=qs[_0xff0b('0x42')](_0xaefa2c[_0xff0b('0x3d')][_0xff0b('0x42')]);_0x19dbeb['where']=qs[_0xff0b('0x44')](_[_0xff0b('0x45')](_0xaefa2c[_0xff0b('0x3d')],_0x4db578[_0xff0b('0x44')]));if(_0xaefa2c[_0xff0b('0x3d')]['filter']){_0x19dbeb[_0xff0b('0x43')]=_[_0xff0b('0x4e')](_0x19dbeb[_0xff0b('0x43')],{'$or':_['map'](_0x19dbeb[_0xff0b('0x3f')],function(_0x551253){var _0x2bcf73={};_0x2bcf73[_0x551253]={'$like':'%'+_0xaefa2c['query'][_0xff0b('0x46')]+'%'};return _0x2bcf73;})});}_0x19dbeb=_[_0xff0b('0x4e')]({},_0x19dbeb,_0xaefa2c[_0xff0b('0x49')]);return _0x4543fd[_0xff0b('0x58')](_0x19dbeb);}})[_0xff0b('0x32')](function(_0x17caae){if(_0x17caae){_0x5a2fee=_0x17caae['length'];if(!_0xaefa2c['query'][_0xff0b('0x56')](_0xff0b('0x59'))){_0x19dbeb[_0xff0b('0x29')]=qs[_0xff0b('0x29')](_0xaefa2c[_0xff0b('0x3d')][_0xff0b('0x29')]);_0x19dbeb[_0xff0b('0x28')]=qs['offset'](_0xaefa2c[_0xff0b('0x3d')][_0xff0b('0x28')]);}return _0x4543fd['getDescriptions'](_0x19dbeb);}})[_0xff0b('0x32')](function(_0x3cc795){if(_0x3cc795){return _0x3cc795?{'count':_0x5a2fee,'rows':_0x3cc795}:null;}})[_0xff0b('0x32')](respondWithResult(_0x2ab81d,null))[_0xff0b('0x24')](handleError(_0x2ab81d,null));}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.model.js b/server/api/intZohoConfiguration/intZohoConfiguration.model.js index 9c37464..72d84c1 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 _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 +var _0xff0b=['util','../../config/logger','api','bluebird','path','../../config/environment','exports','define','ZohoConfiguration','lodash'];(function(_0x45c3b4,_0x2d4b61){var _0x245036=function(_0x46b344){while(--_0x46b344){_0x45c3b4['push'](_0x45c3b4['shift']());}};_0x245036(++_0x2d4b61);}(_0xff0b,0xf9));var _0xbff0=function(_0x5da954,_0x37eab7){_0x5da954=_0x5da954-0x0;var _0x4c4ec9=_0xff0b[_0x5da954];return _0x4c4ec9;};'use strict';var _=require(_0xbff0('0x0'));var util=require(_0xbff0('0x1'));var logger=require(_0xbff0('0x2'))(_0xbff0('0x3'));var moment=require('moment');var BPromise=require(_0xbff0('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbff0('0x5'));var rimraf=require('rimraf');var config=require(_0xbff0('0x6'));var attributes=require('./intZohoConfiguration.attributes');module[_0xbff0('0x7')]=function(_0x3f94ba,_0x2e500d){return _0x3f94ba[_0xbff0('0x8')](_0xbff0('0x9'),attributes,{'tableName':'int_zoho_configurations','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 ed553da..113ae5a 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 _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 +var _0x33e5=['request','then','info','ZohoConfiguration,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http'];(function(_0x4312aa,_0x3fb34c){var _0x503e03=function(_0x4b9d24){while(--_0x4b9d24){_0x4312aa['push'](_0x4312aa['shift']());}};_0x503e03(++_0x3fb34c);}(_0x33e5,0x98));var _0x533e=function(_0x440d01,_0x5d865c){_0x440d01=_0x440d01-0x0;var _0x575033=_0x33e5[_0x440d01];return _0x575033;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x533e('0x0'));var rs=require(_0x533e('0x1'));var fs=require('fs');var Redis=require(_0x533e('0x2'));var db=require(_0x533e('0x3'))['db'];var utils=require(_0x533e('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x533e('0x5'));var jayson=require(_0x533e('0x6'));var client=jayson['client'][_0x533e('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x293652,_0x121648,_0x1bb36f){return new BPromise(function(_0x390001,_0x382ad3){return client[_0x533e('0x8')](_0x293652,_0x1bb36f)[_0x533e('0x9')](function(_0x4f98b1){logger[_0x533e('0xa')](_0x533e('0xb'),_0x121648,'request\x20sent');logger[_0x533e('0xc')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0x121648,_0x533e('0xd'),JSON[_0x533e('0xe')](_0x4f98b1));if(_0x4f98b1[_0x533e('0xf')]){if(_0x4f98b1[_0x533e('0xf')][_0x533e('0x10')]===0x1f4){logger[_0x533e('0xf')](_0x533e('0xb'),_0x121648,_0x4f98b1[_0x533e('0xf')][_0x533e('0x11')]);return _0x382ad3(_0x4f98b1['error']['message']);}logger[_0x533e('0xf')]('ZohoConfiguration,\x20%s,\x20%s',_0x121648,_0x4f98b1[_0x533e('0xf')][_0x533e('0x11')]);return _0x390001(_0x4f98b1[_0x533e('0xf')][_0x533e('0x11')]);}else{logger[_0x533e('0xa')](_0x533e('0xb'),_0x121648,_0x533e('0xd'));_0x390001(_0x4f98b1[_0x533e('0x12')][_0x533e('0x11')]);}})[_0x533e('0x13')](function(_0x4a44b7){logger[_0x533e('0xf')](_0x533e('0xb'),_0x121648,_0x4a44b7);_0x382ad3(_0x4a44b7);});});} \ No newline at end of file diff --git a/server/api/intZohoField/index.js b/server/api/intZohoField/index.js index 0da6258..562b72e 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 _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 +var _0xb908=['/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','show','post','put'];(function(_0x1fcc7d,_0x4eb620){var _0x3daa39=function(_0x2b90f9){while(--_0x2b90f9){_0x1fcc7d['push'](_0x1fcc7d['shift']());}};_0x3daa39(++_0x4eb620);}(_0xb908,0x9d));var _0x8b90=function(_0x350aeb,_0x3d265a){_0x350aeb=_0x350aeb-0x0;var _0x3c5273=_0xb908[_0x350aeb];return _0x3c5273;};'use strict';var multer=require(_0x8b90('0x0'));var util=require(_0x8b90('0x1'));var path=require(_0x8b90('0x2'));var timeout=require(_0x8b90('0x3'));var express=require(_0x8b90('0x4'));var router=express[_0x8b90('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x8b90('0x6'));var interaction=require(_0x8b90('0x7'));var config=require('../../config/environment');var controller=require('./intZohoField.controller');router[_0x8b90('0x8')]('/',auth[_0x8b90('0x9')](),controller[_0x8b90('0xa')]);router['get']('/:id',auth[_0x8b90('0x9')](),controller[_0x8b90('0xb')]);router[_0x8b90('0xc')]('/',auth[_0x8b90('0x9')](),controller['create']);router[_0x8b90('0xd')](_0x8b90('0xe'),auth[_0x8b90('0x9')](),controller[_0x8b90('0xf')]);router[_0x8b90('0x10')]('/:id',auth[_0x8b90('0x9')](),controller[_0x8b90('0x11')]);module[_0x8b90('0x12')]=router; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.attributes.js b/server/api/intZohoField/intZohoField.attributes.js index b981da3..f0f3cb3 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 _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 +var _0x2ed5=['customVariable','keyValue','picklist','STRING','sequelize','exports','ENUM','string','variable'];(function(_0x53b16b,_0x2a6550){var _0x5d10f3=function(_0x4fe533){while(--_0x4fe533){_0x53b16b['push'](_0x53b16b['shift']());}};_0x5d10f3(++_0x2a6550);}(_0x2ed5,0x1d8));var _0x52ed=function(_0x53d2d4,_0x1f63eb){_0x53d2d4=_0x53d2d4-0x0;var _0x2128d2=_0x2ed5[_0x53d2d4];return _0x2128d2;};'use strict';var Sequelize=require(_0x52ed('0x0'));module[_0x52ed('0x1')]={'type':{'type':Sequelize[_0x52ed('0x2')](_0x52ed('0x3'),_0x52ed('0x4'),_0x52ed('0x5'),_0x52ed('0x6'),_0x52ed('0x7')),'defaultValue':_0x52ed('0x3')},'content':{'type':Sequelize[_0x52ed('0x8')]},'key':{'type':Sequelize[_0x52ed('0x8')]},'keyType':{'type':Sequelize[_0x52ed('0x2')](_0x52ed('0x3'),'variable',_0x52ed('0x5'))},'keyContent':{'type':Sequelize[_0x52ed('0x8')]},'idField':{'type':Sequelize[_0x52ed('0x8')]},'nameField':{'type':Sequelize[_0x52ed('0x8')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x52ed('0x8')]}}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.controller.js b/server/api/intZohoField/intZohoField.controller.js index 13d4935..97c175f 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 _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 +var _0x37b2=['undefined','limit','count','Content-Range','apply','save','update','destroy','then','stack','name','send','map','ZohoField','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','keys','find','catch','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x37b2,0x14d));var _0x237b=function(_0x2b3a40,_0x386ecd){_0x2b3a40=_0x2b3a40-0x0;var _0x2ad588=_0x37b2[_0x2b3a40];return _0x2ad588;};'use strict';var emlformat=require(_0x237b('0x0'));var rimraf=require(_0x237b('0x1'));var zipdir=require(_0x237b('0x2'));var jsonpatch=require(_0x237b('0x3'));var rp=require(_0x237b('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x237b('0x5'));var path=require(_0x237b('0x6'));var sox=require(_0x237b('0x7'));var csv=require(_0x237b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x237b('0x9'));var squel=require(_0x237b('0xa'));var crypto=require(_0x237b('0xb'));var jsforce=require(_0x237b('0xc'));var deskjs=require(_0x237b('0xd'));var toCsv=require(_0x237b('0x8'));var querystring=require('querystring');var Papa=require(_0x237b('0xe'));var Redis=require('ioredis');var authService=require(_0x237b('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x237b('0x10'));var logger=require(_0x237b('0x11'))(_0x237b('0x12'));var utils=require(_0x237b('0x13'));var config=require(_0x237b('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x237b('0x15'))['db'];function respondWithStatusCode(_0x2115a1,_0x4854fd){_0x4854fd=_0x4854fd||0xcc;return function(_0x37572d){if(_0x37572d){return _0x2115a1[_0x237b('0x16')](_0x4854fd);}return _0x2115a1[_0x237b('0x17')](_0x4854fd)[_0x237b('0x18')]();};}function respondWithResult(_0x2766e4,_0x13d4d2){_0x13d4d2=_0x13d4d2||0xc8;return function(_0x21fc32){if(_0x21fc32){return _0x2766e4['status'](_0x13d4d2)[_0x237b('0x19')](_0x21fc32);}};}function respondWithFilteredResult(_0x5f2fbb,_0x5ceeea){return function(_0x19b574){if(_0x19b574){var _0x589fe0=typeof _0x5ceeea[_0x237b('0x1a')]===_0x237b('0x1b')&&typeof _0x5ceeea[_0x237b('0x1c')]===_0x237b('0x1b');var _0x538bc3=_0x19b574[_0x237b('0x1d')];var _0x5dc500=_0x589fe0?0x0:_0x5ceeea[_0x237b('0x1a')];var _0x27fcad=_0x589fe0?_0x19b574[_0x237b('0x1d')]:_0x5ceeea['offset']+_0x5ceeea['limit'];var _0x56094a;if(_0x27fcad>=_0x538bc3){_0x27fcad=_0x538bc3;_0x56094a=0xc8;}else{_0x56094a=0xce;}_0x5f2fbb[_0x237b('0x17')](_0x56094a);return _0x5f2fbb['set'](_0x237b('0x1e'),_0x5dc500+'-'+_0x27fcad+'/'+_0x538bc3)[_0x237b('0x19')](_0x19b574);}return null;};}function patchUpdates(_0x2e8978){return function(_0x3578d6){try{jsonpatch[_0x237b('0x1f')](_0x3578d6,_0x2e8978,!![]);}catch(_0x15f497){return BPromise['reject'](_0x15f497);}return _0x3578d6[_0x237b('0x20')]();};}function saveUpdates(_0x48cd53,_0x55c8c2){return function(_0x928e18){if(_0x928e18){return _0x928e18[_0x237b('0x21')](_0x48cd53)['then'](function(_0x2872b9){return _0x2872b9;});}return null;};}function removeEntity(_0x57f064,_0x3340aa){return function(_0x4ec85c){if(_0x4ec85c){return _0x4ec85c[_0x237b('0x22')]()[_0x237b('0x23')](function(){_0x57f064[_0x237b('0x17')](0xcc)[_0x237b('0x18')]();});}};}function handleEntityNotFound(_0x3fe2a9,_0x400d2d){return function(_0x2ac5d7){if(!_0x2ac5d7){_0x3fe2a9['sendStatus'](0x194);}return _0x2ac5d7;};}function handleError(_0xc4e3b4,_0xea5ff3){_0xea5ff3=_0xea5ff3||0x1f4;return function(_0x4583cb){logger['error'](_0x4583cb[_0x237b('0x24')]);if(_0x4583cb[_0x237b('0x25')]){delete _0x4583cb[_0x237b('0x25')];}_0xc4e3b4[_0x237b('0x17')](_0xea5ff3)[_0x237b('0x26')](_0x4583cb);};}exports['index']=function(_0x2bf3b8,_0x27883d){var _0x20d17f={},_0x781f0a={},_0x2dc100={'count':0x0,'rows':[]};var _0x3e0f92=_[_0x237b('0x27')](db[_0x237b('0x28')][_0x237b('0x29')],function(_0x299600){return{'name':_0x299600[_0x237b('0x2a')],'type':_0x299600[_0x237b('0x2b')][_0x237b('0x2c')]};});_0x781f0a[_0x237b('0x2d')]=_[_0x237b('0x27')](_0x3e0f92,_0x237b('0x25'));_0x781f0a[_0x237b('0x2e')]=_['keys'](_0x2bf3b8[_0x237b('0x2e')]);_0x781f0a[_0x237b('0x2f')]=_[_0x237b('0x30')](_0x781f0a[_0x237b('0x2d')],_0x781f0a['query']);_0x20d17f['attributes']=_[_0x237b('0x30')](_0x781f0a[_0x237b('0x2d')],qs[_0x237b('0x31')](_0x2bf3b8[_0x237b('0x2e')]['fields']));_0x20d17f[_0x237b('0x32')]=_0x20d17f['attributes'][_0x237b('0x33')]?_0x20d17f['attributes']:_0x781f0a[_0x237b('0x2d')];if(!_0x2bf3b8[_0x237b('0x2e')]['hasOwnProperty'](_0x237b('0x34'))){_0x20d17f[_0x237b('0x1c')]=qs['limit'](_0x2bf3b8[_0x237b('0x2e')][_0x237b('0x1c')]);_0x20d17f[_0x237b('0x1a')]=qs['offset'](_0x2bf3b8[_0x237b('0x2e')][_0x237b('0x1a')]);}_0x20d17f[_0x237b('0x35')]=qs[_0x237b('0x36')](_0x2bf3b8[_0x237b('0x2e')][_0x237b('0x36')]);_0x20d17f['where']=qs[_0x237b('0x2f')](_[_0x237b('0x37')](_0x2bf3b8[_0x237b('0x2e')],_0x781f0a['filters']),_0x3e0f92);if(_0x2bf3b8[_0x237b('0x2e')][_0x237b('0x38')]){_0x20d17f[_0x237b('0x39')]=_[_0x237b('0x3a')](_0x20d17f['where'],{'$or':_[_0x237b('0x27')](_0x3e0f92,function(_0x5a4afd){if(_0x5a4afd['type']!==_0x237b('0x3b')){var _0x278831={};_0x278831[_0x5a4afd[_0x237b('0x25')]]={'$like':'%'+_0x2bf3b8['query'][_0x237b('0x38')]+'%'};return _0x278831;}})});}_0x20d17f=_[_0x237b('0x3a')]({},_0x20d17f,_0x2bf3b8[_0x237b('0x3c')]);var _0x1b0dd0={'where':_0x20d17f[_0x237b('0x39')]};return db[_0x237b('0x28')]['count'](_0x1b0dd0)['then'](function(_0x4cb2bd){_0x2dc100[_0x237b('0x1d')]=_0x4cb2bd;if(_0x2bf3b8[_0x237b('0x2e')][_0x237b('0x3d')]){_0x20d17f[_0x237b('0x3e')]=[{'all':!![]}];}return db[_0x237b('0x28')][_0x237b('0x3f')](_0x20d17f);})[_0x237b('0x23')](function(_0x222b22){_0x2dc100[_0x237b('0x40')]=_0x222b22;return _0x2dc100;})['then'](respondWithFilteredResult(_0x27883d,_0x20d17f))['catch'](handleError(_0x27883d,null));};exports[_0x237b('0x41')]=function(_0x3f1088,_0x20acf2){var _0x3dc317={'raw':!![],'where':{'id':_0x3f1088[_0x237b('0x42')]['id']}},_0x2a9980={};_0x2a9980[_0x237b('0x2d')]=_[_0x237b('0x43')](db['ZohoField'][_0x237b('0x29')]);_0x2a9980[_0x237b('0x2e')]=_[_0x237b('0x43')](_0x3f1088[_0x237b('0x2e')]);_0x2a9980[_0x237b('0x2f')]=_[_0x237b('0x30')](_0x2a9980['model'],_0x2a9980[_0x237b('0x2e')]);_0x3dc317[_0x237b('0x32')]=_[_0x237b('0x30')](_0x2a9980['model'],qs[_0x237b('0x31')](_0x3f1088[_0x237b('0x2e')][_0x237b('0x31')]));_0x3dc317[_0x237b('0x32')]=_0x3dc317['attributes'][_0x237b('0x33')]?_0x3dc317[_0x237b('0x32')]:_0x2a9980['model'];if(_0x3f1088['query'][_0x237b('0x3d')]){_0x3dc317['include']=[{'all':!![]}];}_0x3dc317=_['merge']({},_0x3dc317,_0x3f1088[_0x237b('0x3c')]);return db[_0x237b('0x28')][_0x237b('0x44')](_0x3dc317)[_0x237b('0x23')](handleEntityNotFound(_0x20acf2,null))['then'](respondWithResult(_0x20acf2,null))[_0x237b('0x45')](handleError(_0x20acf2,null));};exports[_0x237b('0x46')]=function(_0x475024,_0x529f0f){return db[_0x237b('0x28')][_0x237b('0x46')](_0x475024[_0x237b('0x47')],{})[_0x237b('0x23')](respondWithResult(_0x529f0f,0xc9))['catch'](handleError(_0x529f0f,null));};exports[_0x237b('0x21')]=function(_0x1e0ff4,_0x2a538a){if(_0x1e0ff4[_0x237b('0x47')]['id']){delete _0x1e0ff4['body']['id'];}return db[_0x237b('0x28')]['find']({'where':{'id':_0x1e0ff4['params']['id']}})['then'](handleEntityNotFound(_0x2a538a,null))[_0x237b('0x23')](saveUpdates(_0x1e0ff4[_0x237b('0x47')],null))[_0x237b('0x23')](respondWithResult(_0x2a538a,null))[_0x237b('0x45')](handleError(_0x2a538a,null));};exports[_0x237b('0x22')]=function(_0x577cb3,_0x3ca364){return db['ZohoField'][_0x237b('0x44')]({'where':{'id':_0x577cb3[_0x237b('0x42')]['id']}})[_0x237b('0x23')](handleEntityNotFound(_0x3ca364,null))['then'](removeEntity(_0x3ca364,null))[_0x237b('0x45')](handleError(_0x3ca364,null));}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.model.js b/server/api/intZohoField/intZohoField.model.js index a4e6313..c59b979 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 _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 +var _0x6d38=['util','../../config/logger','api','request-promise','rimraf','../../config/environment','./intZohoField.attributes','define','ZohoField','idField','FieldId'];(function(_0x56482c,_0x16118d){var _0x5aae7a=function(_0x52512f){while(--_0x52512f){_0x56482c['push'](_0x56482c['shift']());}};_0x5aae7a(++_0x16118d);}(_0x6d38,0x1ef));var _0x86d3=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x6d38[_0xa464c9];return _0x3d73c4;};'use strict';var _=require('lodash');var util=require(_0x86d3('0x0'));var logger=require(_0x86d3('0x1'))(_0x86d3('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x86d3('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x86d3('0x4'));var config=require(_0x86d3('0x5'));var attributes=require(_0x86d3('0x6'));module['exports']=function(_0x2d8272,_0xfbbc15){return _0x2d8272[_0x86d3('0x7')](_0x86d3('0x8'),attributes,{'tableName':'int_zoho_fields','paranoid':![],'indexes':[{'name':'zoho_unique_index','fields':[_0x86d3('0x9'),_0x86d3('0xa')],'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 ecc225a..65255ef 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 _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 +var _0x20e6=['error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x3ba748,_0x4b8fb9){var _0x5b04e2=function(_0x16bb9e){while(--_0x16bb9e){_0x3ba748['push'](_0x3ba748['shift']());}};_0x5b04e2(++_0x4b8fb9);}(_0x20e6,0x65));var _0x620e=function(_0x504d79,_0x3eb3ad){_0x504d79=_0x504d79-0x0;var _0xcb892c=_0x20e6[_0x504d79];return _0xcb892c;};'use strict';var _=require(_0x620e('0x0'));var util=require(_0x620e('0x1'));var moment=require(_0x620e('0x2'));var BPromise=require(_0x620e('0x3'));var rs=require(_0x620e('0x4'));var fs=require('fs');var Redis=require(_0x620e('0x5'));var db=require(_0x620e('0x6'))['db'];var utils=require(_0x620e('0x7'));var logger=require(_0x620e('0x8'))(_0x620e('0x9'));var config=require(_0x620e('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x620e('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x350fa9,_0x12648c,_0x1b9e29){return new BPromise(function(_0x116121,_0x4efe8b){return client['request'](_0x350fa9,_0x1b9e29)[_0x620e('0xc')](function(_0x556214){logger[_0x620e('0xd')](_0x620e('0xe'),_0x12648c,_0x620e('0xf'));logger[_0x620e('0x10')](_0x620e('0x11'),_0x12648c,_0x620e('0xf'),JSON[_0x620e('0x12')](_0x556214));if(_0x556214[_0x620e('0x13')]){if(_0x556214[_0x620e('0x13')][_0x620e('0x14')]===0x1f4){logger[_0x620e('0x13')]('ZohoField,\x20%s,\x20%s',_0x12648c,_0x556214[_0x620e('0x13')]['message']);return _0x4efe8b(_0x556214[_0x620e('0x13')]['message']);}logger[_0x620e('0x13')](_0x620e('0xe'),_0x12648c,_0x556214[_0x620e('0x13')]['message']);return _0x116121(_0x556214[_0x620e('0x13')][_0x620e('0x15')]);}else{logger['info']('ZohoField,\x20%s,\x20%s',_0x12648c,_0x620e('0xf'));_0x116121(_0x556214[_0x620e('0x16')][_0x620e('0x15')]);}})[_0x620e('0x17')](function(_0xc1ed0d){logger[_0x620e('0x13')]('ZohoField,\x20%s,\x20%s',_0x12648c,_0xc1ed0d);_0x4efe8b(_0xc1ed0d);});});} \ No newline at end of file diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 4a3e486..c26c125 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 _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 +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x3d9f47,_0x6a785b){var _0x25797f=function(_0x29e77d){while(--_0x29e77d){_0x3d9f47['push'](_0x3d9f47['shift']());}};_0x25797f(++_0x6a785b);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x21bfab,_0x2fee48){_0x21bfab=_0x21bfab-0x0;var _0x4db318=_0xcb91[_0x21bfab];return _0x4db318;};'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 diff --git a/server/api/integration/integration.attributes.js b/server/api/integration/integration.attributes.js index bb1d076..4ffdc7b 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 _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 +var _0xa75b=['INTEGER','BOOLEAN','sequelize','unique_name_and_version','STRING','app.js'];(function(_0x3064cd,_0x33a432){var _0x246830=function(_0x59946d){while(--_0x59946d){_0x3064cd['push'](_0x3064cd['shift']());}};_0x246830(++_0x33a432);}(_0xa75b,0x170));var _0xba75=function(_0x17ea98,_0xc94f7d){_0x17ea98=_0x17ea98-0x0;var _0x18eb3e=_0xa75b[_0x17ea98];return _0x18eb3e;};'use strict';var Sequelize=require(_0xba75('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xba75('0x1')},'version':{'type':Sequelize[_0xba75('0x2')],'allowNull':![],'unique':_0xba75('0x1')},'main':{'type':Sequelize[_0xba75('0x2')],'defaultValue':_0xba75('0x3')},'filename':{'type':Sequelize[_0xba75('0x2')]},'path':{'type':Sequelize[_0xba75('0x2')]},'type':{'type':Sequelize[_0xba75('0x2')]},'size':{'type':Sequelize[_0xba75('0x4')]},'active':{'type':Sequelize[_0xba75('0x5')],'defaultValue':![]},'author':{'type':Sequelize[_0xba75('0x2')]},'logo':{'type':Sequelize[_0xba75('0x2')]},'state':{'type':Sequelize[_0xba75('0x2')],'unique':'state'},'description':{'type':Sequelize['STRING']},'title':{'type':Sequelize[_0xba75('0x2')]},'remoteUri':{'type':Sequelize['STRING']},'link':{'type':Sequelize['STRING'],'defaultValue':'#'}}; \ No newline at end of file diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index ba496d4..998080c 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(_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 +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(_0x34b368,_0x10c15f){var _0x22daf6=function(_0x3b3e0b){while(--_0x3b3e0b){_0x34b368['push'](_0x34b368['shift']());}};_0x22daf6(++_0x10c15f);}(_0xafc4,0x69));var _0x4afc=function(_0x3092fe,_0x1844e0){_0x3092fe=_0x3092fe-0x0;var _0x5d128c=_0xafc4[_0x3092fe];return _0x5d128c;};'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 ab1fa5b..c61a0cd 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 _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 +var _0x7aba=['util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./integration.attributes','exports','integrations'];(function(_0x33cfc7,_0x551538){var _0x197975=function(_0x34e94c){while(--_0x34e94c){_0x33cfc7['push'](_0x33cfc7['shift']());}};_0x197975(++_0x551538);}(_0x7aba,0x118));var _0xa7ab=function(_0x3a52ba,_0x2130dc){_0x3a52ba=_0x3a52ba-0x0;var _0x5e42a5=_0x7aba[_0x3a52ba];return _0x5e42a5;};'use strict';var _=require('lodash');var util=require(_0xa7ab('0x0'));var logger=require(_0xa7ab('0x1'))(_0xa7ab('0x2'));var moment=require(_0xa7ab('0x3'));var BPromise=require(_0xa7ab('0x4'));var rp=require(_0xa7ab('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xa7ab('0x6'));var attributes=require(_0xa7ab('0x7'));module[_0xa7ab('0x8')]=function(_0xed63cb,_0x546ea6){return _0xed63cb['define']('Integration',attributes,{'tableName':_0xa7ab('0x9'),'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 a766f38..9928d92 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 _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 +var _0x66fa=['util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','then','info','Integration,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','Integration,\x20%s,\x20%s','message','catch','lodash'];(function(_0x26edcf,_0x18a669){var _0x331ba2=function(_0x35c733){while(--_0x35c733){_0x26edcf['push'](_0x26edcf['shift']());}};_0x331ba2(++_0x18a669);}(_0x66fa,0x117));var _0xa66f=function(_0x4b4e57,_0x30724c){_0x4b4e57=_0x4b4e57-0x0;var _0x39ba0d=_0x66fa[_0x4b4e57];return _0x39ba0d;};'use strict';var _=require(_0xa66f('0x0'));var util=require(_0xa66f('0x1'));var moment=require('moment');var BPromise=require(_0xa66f('0x2'));var rs=require(_0xa66f('0x3'));var fs=require('fs');var Redis=require(_0xa66f('0x4'));var db=require(_0xa66f('0x5'))['db'];var utils=require(_0xa66f('0x6'));var logger=require(_0xa66f('0x7'))(_0xa66f('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xa66f('0x9')][_0xa66f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f0b78,_0x1d02fc,_0x38b58b){return new BPromise(function(_0x5096bf,_0x39c1ef){return client['request'](_0x2f0b78,_0x38b58b)[_0xa66f('0xb')](function(_0x597c7c){logger[_0xa66f('0xc')]('Integration,\x20%s,\x20%s',_0x1d02fc,'request\x20sent');logger['debug'](_0xa66f('0xd'),_0x1d02fc,_0xa66f('0xe'),JSON['stringify'](_0x597c7c));if(_0x597c7c[_0xa66f('0xf')]){if(_0x597c7c['error'][_0xa66f('0x10')]===0x1f4){logger['error'](_0xa66f('0x11'),_0x1d02fc,_0x597c7c[_0xa66f('0xf')][_0xa66f('0x12')]);return _0x39c1ef(_0x597c7c['error']['message']);}logger[_0xa66f('0xf')]('Integration,\x20%s,\x20%s',_0x1d02fc,_0x597c7c['error']['message']);return _0x5096bf(_0x597c7c[_0xa66f('0xf')][_0xa66f('0x12')]);}else{logger[_0xa66f('0xc')](_0xa66f('0x11'),_0x1d02fc,_0xa66f('0xe'));_0x5096bf(_0x597c7c['result']['message']);}})[_0xa66f('0x13')](function(_0x32d338){logger[_0xa66f('0xf')](_0xa66f('0x11'),_0x1d02fc,_0x32d338);_0x39c1ef(_0x32d338);});});} \ No newline at end of file diff --git a/server/api/integrationReport/index.js b/server/api/integrationReport/index.js index 3fa155f..fbbc816 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 _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 +var _0x6d38=['path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','./integrationReport.controller','isAuthenticated','index','get','/describe','/:id','create','update','destroy','exports','util'];(function(_0x10112e,_0x492fb6){var _0x4491c1=function(_0x39f14d){while(--_0x39f14d){_0x10112e['push'](_0x10112e['shift']());}};_0x4491c1(++_0x492fb6);}(_0x6d38,0x1ef));var _0x86d3=function(_0x278e3c,_0x1c9cfd){_0x278e3c=_0x278e3c-0x0;var _0x3e2d9b=_0x6d38[_0x278e3c];return _0x3e2d9b;};'use strict';var multer=require('multer');var util=require(_0x86d3('0x0'));var path=require(_0x86d3('0x1'));var timeout=require(_0x86d3('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x86d3('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x86d3('0x4'));var config=require(_0x86d3('0x5'));var controller=require(_0x86d3('0x6'));router['get']('/',auth[_0x86d3('0x7')](),controller[_0x86d3('0x8')]);router[_0x86d3('0x9')](_0x86d3('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x86d3('0x9')](_0x86d3('0xb'),auth[_0x86d3('0x7')](),controller['show']);router['post']('/',auth[_0x86d3('0x7')](),controller[_0x86d3('0xc')]);router['put']('/:id',auth[_0x86d3('0x7')](),controller[_0x86d3('0xd')]);router['delete'](_0x86d3('0xb'),auth['isAuthenticated'](),controller[_0x86d3('0xe')]);module[_0x86d3('0xf')]=router; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.attributes.js b/server/api/integrationReport/integrationReport.attributes.js index f8bc718..2da5644 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 _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 +var _0x3acd=['RECEIVED','FAILED','exports','STRING','INTEGER','DATE','BOOLEAN','TEXT','ENUM','SENT'];(function(_0x53f402,_0x326920){var _0x45a76d=function(_0x51f590){while(--_0x51f590){_0x53f402['push'](_0x53f402['shift']());}};_0x45a76d(++_0x326920);}(_0x3acd,0x98));var _0xd3ac=function(_0x31231d,_0x47b87a){_0x31231d=_0x31231d-0x0;var _0xcedf2=_0x3acd[_0x31231d];return _0xcedf2;};'use strict';var Sequelize=require('sequelize');module[_0xd3ac('0x0')]={'integration':{'type':Sequelize[_0xd3ac('0x1')]},'eventChannel':{'type':Sequelize['STRING']},'exitStatus':{'type':Sequelize['STRING']},'ticketId':{'type':Sequelize[_0xd3ac('0x1')]},'integrationId':{'type':Sequelize[_0xd3ac('0x2')]},'contacts':{'type':Sequelize[_0xd3ac('0x1')]},'uniqueid':{'type':Sequelize[_0xd3ac('0x1')]},'calleridnum':{'type':Sequelize[_0xd3ac('0x1')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0xd3ac('0x1')]},'membername':{'type':Sequelize[_0xd3ac('0x1')]},'agentcalledAt':{'type':Sequelize[_0xd3ac('0x3')]},'agentconnectAt':{'type':Sequelize[_0xd3ac('0x3')]},'holdtime':{'type':Sequelize[_0xd3ac('0x2')]},'agentcomplete':{'type':Sequelize[_0xd3ac('0x4')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0xd3ac('0x3')]},'talktime':{'type':Sequelize[_0xd3ac('0x2')]},'agentacw':{'type':Sequelize[_0xd3ac('0x4')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xd3ac('0x2')]},'reason':{'type':Sequelize[_0xd3ac('0x1')]},'agentringnoanswer':{'type':Sequelize[_0xd3ac('0x4')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdump':{'type':Sequelize[_0xd3ac('0x4')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0xd3ac('0x3')]},'lastevent':{'type':Sequelize[_0xd3ac('0x1')]},'channel':{'type':Sequelize[_0xd3ac('0x1')]},'channelstate':{'type':Sequelize[_0xd3ac('0x2')]},'channelstatedesc':{'type':Sequelize[_0xd3ac('0x1')]},'connectedlinenum':{'type':Sequelize[_0xd3ac('0x1')]},'connectedlinename':{'type':Sequelize[_0xd3ac('0x1')]},'language':{'type':Sequelize[_0xd3ac('0x1')]},'accountcode':{'type':Sequelize[_0xd3ac('0x1')]},'context':{'type':Sequelize[_0xd3ac('0x1')]},'exten':{'type':Sequelize[_0xd3ac('0x1')]},'priority':{'type':Sequelize[_0xd3ac('0x1')]},'destchannel':{'type':Sequelize[_0xd3ac('0x1')]},'destchannelstate':{'type':Sequelize[_0xd3ac('0x2')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0xd3ac('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0xd3ac('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xd3ac('0x1')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xd3ac('0x1')]},'destcontext':{'type':Sequelize[_0xd3ac('0x1')]},'destexten':{'type':Sequelize[_0xd3ac('0x1')]},'destpriority':{'type':Sequelize[_0xd3ac('0x1')]},'destuniqueid':{'type':Sequelize[_0xd3ac('0x1')]},'messageId':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0xd3ac('0x1')]},'subject':{'type':Sequelize[_0xd3ac('0x1')]},'from':{'type':Sequelize[_0xd3ac('0x1')]},'to':{'type':Sequelize[_0xd3ac('0x1')]},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0xd3ac('0x5')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0xd3ac('0x5')]},'status':{'type':Sequelize[_0xd3ac('0x6')](_0xd3ac('0x7'),'SENDING',_0xd3ac('0x8'),_0xd3ac('0x9'))},'url':{'type':Sequelize[_0xd3ac('0x1')]},'app':{'type':Sequelize[_0xd3ac('0x1')]},'appdata':{'type':Sequelize[_0xd3ac('0x1')]},'projectId':{'type':Sequelize[_0xd3ac('0x2')]}}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.controller.js b/server/api/integrationReport/integrationReport.controller.js index f65c674..de1abbc 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 _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 +var _0x293e=['type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','map','VIRTUAL','options','IntegrationReport','includeAll','findAll','rows','catch','show','include','create','body','find','params','describe','eml-format','rimraf','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','apply','reject','update','then','destroy','error','stack','name','index','rawAttributes','fieldName'];(function(_0x35f83e,_0x30ec55){var _0x249b05=function(_0x2c2fcc){while(--_0x2c2fcc){_0x35f83e['push'](_0x35f83e['shift']());}};_0x249b05(++_0x30ec55);}(_0x293e,0x103));var _0xe293=function(_0x349c75,_0x5efd3b){_0x349c75=_0x349c75-0x0;var _0x3232cc=_0x293e[_0x349c75];return _0x3232cc;};'use strict';var emlformat=require(_0xe293('0x0'));var rimraf=require(_0xe293('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xe293('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe293('0x3'));var util=require(_0xe293('0x4'));var path=require(_0xe293('0x5'));var sox=require(_0xe293('0x6'));var csv=require(_0xe293('0x7'));var ejs=require(_0xe293('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe293('0x9'));var squel=require('squel');var crypto=require(_0xe293('0xa'));var jsforce=require(_0xe293('0xb'));var deskjs=require(_0xe293('0xc'));var toCsv=require('to-csv');var querystring=require(_0xe293('0xd'));var Papa=require('papaparse');var Redis=require(_0xe293('0xe'));var authService=require(_0xe293('0xf'));var qs=require(_0xe293('0x10'));var as=require(_0xe293('0x11'));var hardwareService=require(_0xe293('0x12'));var logger=require(_0xe293('0x13'))('api');var utils=require(_0xe293('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xe293('0x15'))['db'];function respondWithStatusCode(_0x1f105e,_0x4b74df){_0x4b74df=_0x4b74df||0xcc;return function(_0x3c4ea8){if(_0x3c4ea8){return _0x1f105e[_0xe293('0x16')](_0x4b74df);}return _0x1f105e[_0xe293('0x17')](_0x4b74df)[_0xe293('0x18')]();};}function respondWithResult(_0x342e2d,_0x42d8fe){_0x42d8fe=_0x42d8fe||0xc8;return function(_0x55a50d){if(_0x55a50d){return _0x342e2d[_0xe293('0x17')](_0x42d8fe)[_0xe293('0x19')](_0x55a50d);}};}function respondWithFilteredResult(_0x59bc7e,_0xc43c64){return function(_0x49d8bf){if(_0x49d8bf){var _0x547e38=typeof _0xc43c64[_0xe293('0x1a')]===_0xe293('0x1b')&&typeof _0xc43c64['limit']===_0xe293('0x1b');var _0xaaa227=_0x49d8bf['count'];var _0x30e85a=_0x547e38?0x0:_0xc43c64[_0xe293('0x1a')];var _0x25bc7c=_0x547e38?_0x49d8bf[_0xe293('0x1c')]:_0xc43c64['offset']+_0xc43c64['limit'];var _0x28f87d;if(_0x25bc7c>=_0xaaa227){_0x25bc7c=_0xaaa227;_0x28f87d=0xc8;}else{_0x28f87d=0xce;}_0x59bc7e[_0xe293('0x17')](_0x28f87d);return _0x59bc7e[_0xe293('0x1d')]('Content-Range',_0x30e85a+'-'+_0x25bc7c+'/'+_0xaaa227)[_0xe293('0x19')](_0x49d8bf);}return null;};}function patchUpdates(_0x401a81){return function(_0x3d06a1){try{jsonpatch[_0xe293('0x1e')](_0x3d06a1,_0x401a81,!![]);}catch(_0x4db6d7){return BPromise[_0xe293('0x1f')](_0x4db6d7);}return _0x3d06a1['save']();};}function saveUpdates(_0x1a0a93,_0xc0efb8){return function(_0x97e3b3){if(_0x97e3b3){return _0x97e3b3[_0xe293('0x20')](_0x1a0a93)[_0xe293('0x21')](function(_0x53d4c3){return _0x53d4c3;});}return null;};}function removeEntity(_0x52d55f,_0x2af6d4){return function(_0x16916a){if(_0x16916a){return _0x16916a[_0xe293('0x22')]()['then'](function(){_0x52d55f[_0xe293('0x17')](0xcc)[_0xe293('0x18')]();});}};}function handleEntityNotFound(_0x589609,_0xd74db){return function(_0x26e98d){if(!_0x26e98d){_0x589609[_0xe293('0x16')](0x194);}return _0x26e98d;};}function handleError(_0x28cc9b,_0x5b4b30){_0x5b4b30=_0x5b4b30||0x1f4;return function(_0x1c8e9a){logger[_0xe293('0x23')](_0x1c8e9a[_0xe293('0x24')]);if(_0x1c8e9a[_0xe293('0x25')]){delete _0x1c8e9a[_0xe293('0x25')];}_0x28cc9b[_0xe293('0x17')](_0x5b4b30)['send'](_0x1c8e9a);};}exports[_0xe293('0x26')]=function(_0x1f6459,_0x428c49){var _0x5d0561={},_0x59ec63={},_0x43fe4e={'count':0x0,'rows':[]};var _0x1bfba3=_['map'](db['IntegrationReport'][_0xe293('0x27')],function(_0x496857){return{'name':_0x496857[_0xe293('0x28')],'type':_0x496857[_0xe293('0x29')][_0xe293('0x2a')]};});_0x59ec63[_0xe293('0x2b')]=_['map'](_0x1bfba3,_0xe293('0x25'));_0x59ec63[_0xe293('0x2c')]=_[_0xe293('0x2d')](_0x1f6459[_0xe293('0x2c')]);_0x59ec63[_0xe293('0x2e')]=_[_0xe293('0x2f')](_0x59ec63[_0xe293('0x2b')],_0x59ec63[_0xe293('0x2c')]);_0x5d0561['attributes']=_[_0xe293('0x2f')](_0x59ec63[_0xe293('0x2b')],qs[_0xe293('0x30')](_0x1f6459[_0xe293('0x2c')]['fields']));_0x5d0561[_0xe293('0x31')]=_0x5d0561[_0xe293('0x31')][_0xe293('0x32')]?_0x5d0561[_0xe293('0x31')]:_0x59ec63[_0xe293('0x2b')];if(!_0x1f6459[_0xe293('0x2c')][_0xe293('0x33')](_0xe293('0x34'))){_0x5d0561['limit']=qs[_0xe293('0x35')](_0x1f6459[_0xe293('0x2c')]['limit']);_0x5d0561[_0xe293('0x1a')]=qs[_0xe293('0x1a')](_0x1f6459[_0xe293('0x2c')][_0xe293('0x1a')]);}_0x5d0561[_0xe293('0x36')]=qs[_0xe293('0x37')](_0x1f6459['query'][_0xe293('0x37')]);_0x5d0561['where']=qs[_0xe293('0x2e')](_[_0xe293('0x38')](_0x1f6459[_0xe293('0x2c')],_0x59ec63['filters']),_0x1bfba3);if(_0x1f6459[_0xe293('0x2c')][_0xe293('0x39')]){_0x5d0561[_0xe293('0x3a')]=_[_0xe293('0x3b')](_0x5d0561[_0xe293('0x3a')],{'$or':_[_0xe293('0x3c')](_0x1bfba3,function(_0x30cbad){if(_0x30cbad[_0xe293('0x29')]!==_0xe293('0x3d')){var _0x3d039f={};_0x3d039f[_0x30cbad[_0xe293('0x25')]]={'$like':'%'+_0x1f6459[_0xe293('0x2c')]['filter']+'%'};return _0x3d039f;}})});}_0x5d0561=_['merge']({},_0x5d0561,_0x1f6459[_0xe293('0x3e')]);var _0x3a7856={'where':_0x5d0561[_0xe293('0x3a')]};return db[_0xe293('0x3f')][_0xe293('0x1c')](_0x3a7856)[_0xe293('0x21')](function(_0x454c11){_0x43fe4e[_0xe293('0x1c')]=_0x454c11;if(_0x1f6459['query'][_0xe293('0x40')]){_0x5d0561['include']=[{'all':!![]}];}return db['IntegrationReport'][_0xe293('0x41')](_0x5d0561);})[_0xe293('0x21')](function(_0x163ff3){_0x43fe4e[_0xe293('0x42')]=_0x163ff3;return _0x43fe4e;})[_0xe293('0x21')](respondWithFilteredResult(_0x428c49,_0x5d0561))[_0xe293('0x43')](handleError(_0x428c49,null));};exports[_0xe293('0x44')]=function(_0x33a372,_0x3e1ea0){var _0x2abbda={'raw':![],'where':{'id':_0x33a372['params']['id']}},_0x380e9b={};_0x380e9b[_0xe293('0x2b')]=_[_0xe293('0x2d')](db[_0xe293('0x3f')]['rawAttributes']);_0x380e9b[_0xe293('0x2c')]=_[_0xe293('0x2d')](_0x33a372['query']);_0x380e9b[_0xe293('0x2e')]=_[_0xe293('0x2f')](_0x380e9b[_0xe293('0x2b')],_0x380e9b['query']);_0x2abbda[_0xe293('0x31')]=_[_0xe293('0x2f')](_0x380e9b[_0xe293('0x2b')],qs[_0xe293('0x30')](_0x33a372[_0xe293('0x2c')][_0xe293('0x30')]));_0x2abbda[_0xe293('0x31')]=_0x2abbda[_0xe293('0x31')][_0xe293('0x32')]?_0x2abbda[_0xe293('0x31')]:_0x380e9b['model'];if(_0x33a372[_0xe293('0x2c')][_0xe293('0x40')]){_0x2abbda[_0xe293('0x45')]=[{'all':!![]}];}_0x2abbda=_[_0xe293('0x3b')]({},_0x2abbda,_0x33a372['options']);return db[_0xe293('0x3f')]['find'](_0x2abbda)[_0xe293('0x21')](handleEntityNotFound(_0x3e1ea0,null))['then'](respondWithResult(_0x3e1ea0,null))['catch'](handleError(_0x3e1ea0,null));};exports[_0xe293('0x46')]=function(_0x2d7953,_0x18dfb9){return db['IntegrationReport'][_0xe293('0x46')](_0x2d7953['body'],{})[_0xe293('0x21')](respondWithResult(_0x18dfb9,0xc9))[_0xe293('0x43')](handleError(_0x18dfb9,null));};exports['update']=function(_0x3bc869,_0x44e35e){if(_0x3bc869[_0xe293('0x47')]['id']){delete _0x3bc869[_0xe293('0x47')]['id'];}return db['IntegrationReport'][_0xe293('0x48')]({'where':{'id':_0x3bc869[_0xe293('0x49')]['id']}})[_0xe293('0x21')](handleEntityNotFound(_0x44e35e,null))[_0xe293('0x21')](saveUpdates(_0x3bc869[_0xe293('0x47')],null))['then'](respondWithResult(_0x44e35e,null))[_0xe293('0x43')](handleError(_0x44e35e,null));};exports['destroy']=function(_0x537cb6,_0xd1acdb){return db[_0xe293('0x3f')]['find']({'where':{'id':_0x537cb6[_0xe293('0x49')]['id']}})[_0xe293('0x21')](handleEntityNotFound(_0xd1acdb,null))['then'](removeEntity(_0xd1acdb,null))[_0xe293('0x43')](handleError(_0xd1acdb,null));};exports[_0xe293('0x4a')]=function(_0x5c49c7,_0x42ae14){return db[_0xe293('0x3f')][_0xe293('0x4a')]()[_0xe293('0x21')](respondWithResult(_0x42ae14,null))[_0xe293('0x43')](handleError(_0x42ae14,null));}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.model.js b/server/api/integrationReport/integrationReport.model.js index 83ae3bb..a15b7b3 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 _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 +var _0x8bcf=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./integrationReport.attributes','exports','define','IntegrationReport','report_integration','lodash'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x8bcf,0xdf));var _0xf8bc=function(_0x4f1128,_0x4f9573){_0x4f1128=_0x4f1128-0x0;var _0x384d91=_0x8bcf[_0x4f1128];return _0x384d91;};'use strict';var _=require(_0xf8bc('0x0'));var util=require(_0xf8bc('0x1'));var logger=require(_0xf8bc('0x2'))('api');var moment=require(_0xf8bc('0x3'));var BPromise=require(_0xf8bc('0x4'));var rp=require(_0xf8bc('0x5'));var fs=require('fs');var path=require(_0xf8bc('0x6'));var rimraf=require(_0xf8bc('0x7'));var config=require(_0xf8bc('0x8'));var attributes=require(_0xf8bc('0x9'));module[_0xf8bc('0xa')]=function(_0x19135e,_0x2d5b4a){return _0x19135e[_0xf8bc('0xb')](_0xf8bc('0xc'),attributes,{'tableName':_0xf8bc('0xd'),'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 e29f2c7..92a0b76 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 _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 +var _0x1967=['then','info','IntegrationReport,\x20%s,\x20%s','IntegrationReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request'];(function(_0x1da04e,_0x31024b){var _0xdd8c41=function(_0x2036f9){while(--_0x2036f9){_0x1da04e['push'](_0x1da04e['shift']());}};_0xdd8c41(++_0x31024b);}(_0x1967,0x173));var _0x7196=function(_0x4554f6,_0x59d283){_0x4554f6=_0x4554f6-0x0;var _0x1fb4e9=_0x1967[_0x4554f6];return _0x1fb4e9;};'use strict';var _=require('lodash');var util=require(_0x7196('0x0'));var moment=require(_0x7196('0x1'));var BPromise=require(_0x7196('0x2'));var rs=require(_0x7196('0x3'));var fs=require('fs');var Redis=require(_0x7196('0x4'));var db=require(_0x7196('0x5'))['db'];var utils=require(_0x7196('0x6'));var logger=require(_0x7196('0x7'))(_0x7196('0x8'));var config=require(_0x7196('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x7196('0xa')][_0x7196('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x194746,_0x40e0af,_0x266a6e){return new BPromise(function(_0xad78a,_0x510c72){return client[_0x7196('0xc')](_0x194746,_0x266a6e)[_0x7196('0xd')](function(_0x3f846e){logger[_0x7196('0xe')](_0x7196('0xf'),_0x40e0af,'request\x20sent');logger['debug'](_0x7196('0x10'),_0x40e0af,_0x7196('0x11'),JSON[_0x7196('0x12')](_0x3f846e));if(_0x3f846e[_0x7196('0x13')]){if(_0x3f846e[_0x7196('0x13')][_0x7196('0x14')]===0x1f4){logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x3f846e[_0x7196('0x13')][_0x7196('0x15')]);return _0x510c72(_0x3f846e[_0x7196('0x13')]['message']);}logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x3f846e[_0x7196('0x13')][_0x7196('0x15')]);return _0xad78a(_0x3f846e['error'][_0x7196('0x15')]);}else{logger['info'](_0x7196('0xf'),_0x40e0af,_0x7196('0x11'));_0xad78a(_0x3f846e[_0x7196('0x16')][_0x7196('0x15')]);}})[_0x7196('0x17')](function(_0x2e3e0e){logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x2e3e0e);_0x510c72(_0x2e3e0e);});});} \ No newline at end of file diff --git a/server/api/interval/index.js b/server/api/interval/index.js index 433a9be..b911f83 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 _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 +var _0x83f7=['/:id/sub_intervals','getIntervals','create','post','addInterval','/:id/sub_intervals/create_many','addIntervals','put','update','delete','/:id','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./interval.controller','get','isAuthenticated','index','show'];(function(_0xb85fd5,_0x3362ae){var _0x34228e=function(_0x1e62fa){while(--_0x1e62fa){_0xb85fd5['push'](_0xb85fd5['shift']());}};_0x34228e(++_0x3362ae);}(_0x83f7,0x84));var _0x783f=function(_0x97a80,_0x52d233){_0x97a80=_0x97a80-0x0;var _0x21823d=_0x83f7[_0x97a80];return _0x21823d;};'use strict';var multer=require(_0x783f('0x0'));var util=require(_0x783f('0x1'));var path=require(_0x783f('0x2'));var timeout=require('connect-timeout');var express=require(_0x783f('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x783f('0x4'));var interaction=require(_0x783f('0x5'));var config=require(_0x783f('0x6'));var controller=require(_0x783f('0x7'));router[_0x783f('0x8')]('/',auth[_0x783f('0x9')](),controller[_0x783f('0xa')]);router[_0x783f('0x8')]('/:id',auth[_0x783f('0x9')](),controller[_0x783f('0xb')]);router[_0x783f('0x8')](_0x783f('0xc'),auth['isAuthenticated'](),controller[_0x783f('0xd')]);router['post']('/',auth[_0x783f('0x9')](),controller[_0x783f('0xe')]);router[_0x783f('0xf')](_0x783f('0xc'),auth[_0x783f('0x9')](),controller[_0x783f('0x10')]);router[_0x783f('0xf')](_0x783f('0x11'),auth['isAuthenticated'](),controller[_0x783f('0x12')]);router[_0x783f('0x13')]('/:id',auth[_0x783f('0x9')](),controller[_0x783f('0x14')]);router[_0x783f('0x15')](_0x783f('0x16'),auth[_0x783f('0x9')](),controller['destroy']);module[_0x783f('0x17')]=router; \ No newline at end of file diff --git a/server/api/interval/interval.attributes.js b/server/api/interval/interval.attributes.js index 2db438f..ccd583f 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 _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 +var _0x4f59=['STRING','sequelize','exports'];(function(_0x1225ec,_0x253d8b){var _0x1c7ccd=function(_0x252815){while(--_0x252815){_0x1225ec['push'](_0x1225ec['shift']());}};_0x1c7ccd(++_0x253d8b);}(_0x4f59,0x130));var _0x94f5=function(_0xdaab62,_0x2728ab){_0xdaab62=_0xdaab62-0x0;var _0x13d767=_0x4f59[_0xdaab62];return _0x13d767;};'use strict';var Sequelize=require(_0x94f5('0x0'));module[_0x94f5('0x1')]={'name':{'type':Sequelize[_0x94f5('0x2')]},'description':{'type':Sequelize[_0x94f5('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 be5344c..4fecc47 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 _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 +var _0x2e5c=['eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','../../components/extensions/rewrite','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','destroy','get','UserProfileResource','then','sendStatus','error','stack','name','send','index','map','fieldName','key','query','keys','filters','model','fields','attributes','length','order','sort','pick','filter','where','merge','VIRTUAL','Interval','includeAll','include','findAll','rows','show','params','rawAttributes','intersection','options','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Intervals','userProfileId','autoAssociation','update','body','addInterval','IntervalId','getIntervals','findOne','hasOwnProperty','addIntervals','sequelize','bulkCreate'];(function(_0x438912,_0x3f7f74){var _0x18112f=function(_0x1b8ac9){while(--_0x1b8ac9){_0x438912['push'](_0x438912['shift']());}};_0x18112f(++_0x3f7f74);}(_0x2e5c,0x1c7));var _0xc2e5=function(_0x255d5b,_0x4f6f35){_0x255d5b=_0x255d5b-0x0;var _0x3e141a=_0x2e5c[_0x255d5b];return _0x3e141a;};'use strict';var emlformat=require(_0xc2e5('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xc2e5('0x1'));var rp=require(_0xc2e5('0x2'));var moment=require(_0xc2e5('0x3'));var BPromise=require(_0xc2e5('0x4'));var Mustache=require(_0xc2e5('0x5'));var util=require(_0xc2e5('0x6'));var path=require(_0xc2e5('0x7'));var sox=require('sox');var csv=require(_0xc2e5('0x8'));var ejs=require(_0xc2e5('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc2e5('0xa'));var squel=require(_0xc2e5('0xb'));var crypto=require(_0xc2e5('0xc'));var jsforce=require(_0xc2e5('0xd'));var deskjs=require(_0xc2e5('0xe'));var toCsv=require('to-csv');var querystring=require(_0xc2e5('0xf'));var Papa=require(_0xc2e5('0x10'));var Redis=require(_0xc2e5('0x11'));var authService=require(_0xc2e5('0x12'));var qs=require(_0xc2e5('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc2e5('0x14'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xc2e5('0x15'));var licenseUtil=require(_0xc2e5('0x16'));var db=require(_0xc2e5('0x17'))['db'];var extensions=require(_0xc2e5('0x18'));function respondWithStatusCode(_0x4e8da1,_0x43af93){_0x43af93=_0x43af93||0xcc;return function(_0x209e31){if(_0x209e31){return _0x4e8da1['sendStatus'](_0x43af93);}return _0x4e8da1[_0xc2e5('0x19')](_0x43af93)[_0xc2e5('0x1a')]();};}function respondWithResult(_0x1984c6,_0xd7b8ec){_0xd7b8ec=_0xd7b8ec||0xc8;return function(_0x2d167a){if(_0x2d167a){return _0x1984c6[_0xc2e5('0x19')](_0xd7b8ec)[_0xc2e5('0x1b')](_0x2d167a);}};}function respondWithFilteredResult(_0x21a054,_0x2c1dcd){return function(_0x1384cf){if(_0x1384cf){var _0x137e93=typeof _0x2c1dcd[_0xc2e5('0x1c')]==='undefined'&&typeof _0x2c1dcd[_0xc2e5('0x1d')]===_0xc2e5('0x1e');var _0x2b29a3=_0x1384cf[_0xc2e5('0x1f')];var _0x134464=_0x137e93?0x0:_0x2c1dcd[_0xc2e5('0x1c')];var _0x90cb7=_0x137e93?_0x1384cf['count']:_0x2c1dcd[_0xc2e5('0x1c')]+_0x2c1dcd[_0xc2e5('0x1d')];var _0x583ea3;if(_0x90cb7>=_0x2b29a3){_0x90cb7=_0x2b29a3;_0x583ea3=0xc8;}else{_0x583ea3=0xce;}_0x21a054['status'](_0x583ea3);return _0x21a054[_0xc2e5('0x20')](_0xc2e5('0x21'),_0x134464+'-'+_0x90cb7+'/'+_0x2b29a3)[_0xc2e5('0x1b')](_0x1384cf);}return null;};}function patchUpdates(_0xe47923){return function(_0x41627c){try{jsonpatch[_0xc2e5('0x22')](_0x41627c,_0xe47923,!![]);}catch(_0x363be0){return BPromise['reject'](_0x363be0);}return _0x41627c['save']();};}function saveUpdates(_0x20de8c,_0x592e2e){return function(_0x34658f){if(_0x34658f){return _0x34658f['update'](_0x20de8c)['then'](function(_0x48692c){return _0x48692c;});}return null;};}function removeEntity(_0x545ea8,_0x15558a){return function(_0x5a54c3){if(_0x5a54c3){return _0x5a54c3[_0xc2e5('0x23')]()['then'](function(){var _0xd994a4=_0x5a54c3[_0xc2e5('0x24')]({'plain':!![]});var _0x539621='Intervals';return db[_0xc2e5('0x25')][_0xc2e5('0x23')]({'where':{'type':_0x539621,'resourceId':_0xd994a4['id']}})[_0xc2e5('0x26')](function(){return _0x5a54c3;});})[_0xc2e5('0x26')](function(){_0x545ea8[_0xc2e5('0x19')](0xcc)[_0xc2e5('0x1a')]();});}};}function handleEntityNotFound(_0x5633f2,_0x4f9a1f){return function(_0x10998b){if(!_0x10998b){_0x5633f2[_0xc2e5('0x27')](0x194);}return _0x10998b;};}function handleError(_0x248fb5,_0x17f29f){_0x17f29f=_0x17f29f||0x1f4;return function(_0x40bb16){logger[_0xc2e5('0x28')](_0x40bb16[_0xc2e5('0x29')]);if(_0x40bb16[_0xc2e5('0x2a')]){delete _0x40bb16['name'];}_0x248fb5[_0xc2e5('0x19')](_0x17f29f)[_0xc2e5('0x2b')](_0x40bb16);};}exports[_0xc2e5('0x2c')]=function(_0x509ba9,_0x592fee){var _0x1073d3={},_0x3ec1b6={},_0x3e4294={'count':0x0,'rows':[]};var _0x30ebb4=_[_0xc2e5('0x2d')](db['Interval']['rawAttributes'],function(_0x10a8e2){return{'name':_0x10a8e2[_0xc2e5('0x2e')],'type':_0x10a8e2['type'][_0xc2e5('0x2f')]};});_0x3ec1b6['model']=_['map'](_0x30ebb4,_0xc2e5('0x2a'));_0x3ec1b6[_0xc2e5('0x30')]=_[_0xc2e5('0x31')](_0x509ba9[_0xc2e5('0x30')]);_0x3ec1b6[_0xc2e5('0x32')]=_['intersection'](_0x3ec1b6['model'],_0x3ec1b6[_0xc2e5('0x30')]);_0x1073d3['attributes']=_['intersection'](_0x3ec1b6[_0xc2e5('0x33')],qs[_0xc2e5('0x34')](_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x34')]));_0x1073d3[_0xc2e5('0x35')]=_0x1073d3[_0xc2e5('0x35')][_0xc2e5('0x36')]?_0x1073d3['attributes']:_0x3ec1b6[_0xc2e5('0x33')];if(!_0x509ba9[_0xc2e5('0x30')]['hasOwnProperty']('nolimit')){_0x1073d3[_0xc2e5('0x1d')]=qs['limit'](_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x1d')]);_0x1073d3[_0xc2e5('0x1c')]=qs[_0xc2e5('0x1c')](_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x1c')]);}_0x1073d3[_0xc2e5('0x37')]=qs[_0xc2e5('0x38')](_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x38')]);_0x1073d3['where']=qs[_0xc2e5('0x32')](_[_0xc2e5('0x39')](_0x509ba9['query'],_0x3ec1b6[_0xc2e5('0x32')]),_0x30ebb4);if(_0x509ba9['query'][_0xc2e5('0x3a')]){_0x1073d3[_0xc2e5('0x3b')]=_[_0xc2e5('0x3c')](_0x1073d3[_0xc2e5('0x3b')],{'$or':_[_0xc2e5('0x2d')](_0x30ebb4,function(_0x3a0974){if(_0x3a0974['type']!==_0xc2e5('0x3d')){var _0x660b82={};_0x660b82[_0x3a0974[_0xc2e5('0x2a')]]={'$like':'%'+_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x3a')]+'%'};return _0x660b82;}})});}_0x1073d3=_['merge']({},_0x1073d3,_0x509ba9['options']);var _0x2f4e04={'where':_0x1073d3[_0xc2e5('0x3b')]};return db[_0xc2e5('0x3e')][_0xc2e5('0x1f')](_0x2f4e04)[_0xc2e5('0x26')](function(_0x123663){_0x3e4294['count']=_0x123663;if(_0x509ba9[_0xc2e5('0x30')][_0xc2e5('0x3f')]){_0x1073d3[_0xc2e5('0x40')]=[{'all':!![]}];}return db[_0xc2e5('0x3e')][_0xc2e5('0x41')](_0x1073d3);})[_0xc2e5('0x26')](function(_0xef35d3){_0x3e4294[_0xc2e5('0x42')]=_0xef35d3;return _0x3e4294;})['then'](respondWithFilteredResult(_0x592fee,_0x1073d3))['catch'](handleError(_0x592fee,null));};exports[_0xc2e5('0x43')]=function(_0xbc3c48,_0x20d93a){var _0x27e9e4={'raw':!![],'where':{'id':_0xbc3c48[_0xc2e5('0x44')]['id']}},_0x1fa25b={};_0x1fa25b['model']=_['keys'](db[_0xc2e5('0x3e')][_0xc2e5('0x45')]);_0x1fa25b[_0xc2e5('0x30')]=_[_0xc2e5('0x31')](_0xbc3c48[_0xc2e5('0x30')]);_0x1fa25b['filters']=_[_0xc2e5('0x46')](_0x1fa25b['model'],_0x1fa25b['query']);_0x27e9e4[_0xc2e5('0x35')]=_[_0xc2e5('0x46')](_0x1fa25b[_0xc2e5('0x33')],qs['fields'](_0xbc3c48[_0xc2e5('0x30')]['fields']));_0x27e9e4['attributes']=_0x27e9e4[_0xc2e5('0x35')][_0xc2e5('0x36')]?_0x27e9e4[_0xc2e5('0x35')]:_0x1fa25b['model'];if(_0xbc3c48[_0xc2e5('0x30')][_0xc2e5('0x3f')]){_0x27e9e4[_0xc2e5('0x40')]=[{'all':!![]}];}_0x27e9e4=_[_0xc2e5('0x3c')]({},_0x27e9e4,_0xbc3c48[_0xc2e5('0x47')]);return db[_0xc2e5('0x3e')][_0xc2e5('0x48')](_0x27e9e4)[_0xc2e5('0x26')](handleEntityNotFound(_0x20d93a,null))[_0xc2e5('0x26')](respondWithResult(_0x20d93a,null))[_0xc2e5('0x49')](handleError(_0x20d93a,null));};exports[_0xc2e5('0x4a')]=function(_0x5b885d,_0x438256){return db[_0xc2e5('0x3e')]['create'](_0x5b885d['body'],{})[_0xc2e5('0x26')](function(_0x4db999){var _0x2874b5=_0x5b885d[_0xc2e5('0x4b')][_0xc2e5('0x24')]({'plain':!![]});if(!_0x2874b5)throw new Error(_0xc2e5('0x4c'));if(_0x2874b5[_0xc2e5('0x4d')]===_0xc2e5('0x4b')){var _0x147c3b=_0x4db999[_0xc2e5('0x24')]({'plain':!![]});var _0xbcb4fd=_0xc2e5('0x4e');return db['UserProfileSection']['find']({'where':{'name':_0xbcb4fd,'userProfileId':_0x2874b5[_0xc2e5('0x4f')]},'raw':!![]})['then'](function(_0x3e01cc){if(_0x3e01cc&&_0x3e01cc[_0xc2e5('0x50')]===0x0){return db[_0xc2e5('0x25')][_0xc2e5('0x4a')]({'name':_0x147c3b[_0xc2e5('0x2a')],'resourceId':_0x147c3b['id'],'type':_0x3e01cc[_0xc2e5('0x2a')],'sectionId':_0x3e01cc['id']},{})[_0xc2e5('0x26')](function(){return _0x4db999;});}else{return _0x4db999;}})['catch'](function(_0x5cb3c2){logger[_0xc2e5('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5cb3c2);throw _0x5cb3c2;});}return _0x4db999;})[_0xc2e5('0x26')](respondWithResult(_0x438256,0xc9))['catch'](handleError(_0x438256,null));};exports[_0xc2e5('0x51')]=function(_0x3520e8,_0x95dc5b){if(_0x3520e8[_0xc2e5('0x52')]['id']){delete _0x3520e8[_0xc2e5('0x52')]['id'];}return db['Interval']['find']({'where':{'id':_0x3520e8[_0xc2e5('0x44')]['id']}})[_0xc2e5('0x26')](handleEntityNotFound(_0x95dc5b,null))[_0xc2e5('0x26')](saveUpdates(_0x3520e8['body'],null))['then'](respondWithResult(_0x95dc5b,null))['catch'](handleError(_0x95dc5b,null));};exports[_0xc2e5('0x23')]=function(_0x5485d4,_0x13d6cb){return db[_0xc2e5('0x3e')][_0xc2e5('0x48')]({'where':{'id':_0x5485d4[_0xc2e5('0x44')]['id']}})[_0xc2e5('0x26')](handleEntityNotFound(_0x13d6cb,null))[_0xc2e5('0x26')](removeEntity(_0x13d6cb,null))[_0xc2e5('0x49')](handleError(_0x13d6cb,null));};exports[_0xc2e5('0x53')]=function(_0x2d9722,_0x49a8aa,_0x40e566){if(_0x2d9722[_0xc2e5('0x52')]['id']){delete _0x2d9722[_0xc2e5('0x52')]['id'];}return db['Interval'][_0xc2e5('0x48')]({'where':{'id':_0x2d9722[_0xc2e5('0x44')]['id']}})[_0xc2e5('0x26')](handleEntityNotFound(_0x49a8aa,null))['then'](function(_0x5cf324){if(_0x5cf324){_0x2d9722[_0xc2e5('0x52')][_0xc2e5('0x54')]=_0x5cf324['id'];return db['Interval']['create'](_0x2d9722['body']);}})[_0xc2e5('0x26')](respondWithResult(_0x49a8aa,null))['catch'](handleError(_0x49a8aa,null));};exports[_0xc2e5('0x55')]=function(_0x41f7ea,_0x2d3aa7,_0x12e800){var _0x49b50a={};var _0x3ce1fe={};var _0x6531f4;var _0x4226b0;return db['Interval'][_0xc2e5('0x56')]({'where':{'id':_0x41f7ea[_0xc2e5('0x44')]['id']}})[_0xc2e5('0x26')](handleEntityNotFound(_0x2d3aa7,null))['then'](function(_0x488e20){if(_0x488e20){_0x6531f4=_0x488e20;_0x3ce1fe[_0xc2e5('0x33')]=_[_0xc2e5('0x31')](db[_0xc2e5('0x3e')][_0xc2e5('0x45')]);_0x3ce1fe[_0xc2e5('0x30')]=_[_0xc2e5('0x31')](_0x41f7ea[_0xc2e5('0x30')]);_0x3ce1fe[_0xc2e5('0x32')]=_['intersection'](_0x3ce1fe[_0xc2e5('0x33')],_0x3ce1fe[_0xc2e5('0x30')]);_0x49b50a[_0xc2e5('0x35')]=_[_0xc2e5('0x46')](_0x3ce1fe[_0xc2e5('0x33')],qs[_0xc2e5('0x34')](_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x34')]));_0x49b50a['attributes']=_0x49b50a['attributes'][_0xc2e5('0x36')]?_0x49b50a[_0xc2e5('0x35')]:_0x3ce1fe[_0xc2e5('0x33')];_0x49b50a[_0xc2e5('0x37')]=qs[_0xc2e5('0x38')](_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x38')]);_0x49b50a[_0xc2e5('0x3b')]=qs[_0xc2e5('0x32')](_[_0xc2e5('0x39')](_0x41f7ea[_0xc2e5('0x30')],_0x3ce1fe[_0xc2e5('0x32')]));if(_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x3a')]){_0x49b50a[_0xc2e5('0x3b')]=_[_0xc2e5('0x3c')](_0x49b50a[_0xc2e5('0x3b')],{'$or':_['map'](_0x49b50a[_0xc2e5('0x35')],function(_0x256053){var _0x4332a9={};_0x4332a9[_0x256053]={'$like':'%'+_0x41f7ea['query'][_0xc2e5('0x3a')]+'%'};return _0x4332a9;})});}_0x49b50a=_[_0xc2e5('0x3c')]({},_0x49b50a,_0x41f7ea[_0xc2e5('0x47')]);return _0x6531f4[_0xc2e5('0x55')](_0x49b50a);}})[_0xc2e5('0x26')](function(_0x58faab){if(_0x58faab){_0x4226b0=_0x58faab[_0xc2e5('0x36')];if(!_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x57')]('nolimit')){_0x49b50a['limit']=qs[_0xc2e5('0x1d')](_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x1d')]);_0x49b50a[_0xc2e5('0x1c')]=qs[_0xc2e5('0x1c')](_0x41f7ea[_0xc2e5('0x30')][_0xc2e5('0x1c')]);}return _0x6531f4[_0xc2e5('0x55')](_0x49b50a);}})[_0xc2e5('0x26')](function(_0x24f2ea){if(_0x24f2ea){return _0x24f2ea?{'count':_0x4226b0,'rows':_0x24f2ea}:null;}})[_0xc2e5('0x26')](respondWithResult(_0x2d3aa7,null))[_0xc2e5('0x49')](handleError(_0x2d3aa7,null));};exports[_0xc2e5('0x58')]=function(_0x1f0e08,_0x3df51a,_0x26f0c8){return db[_0xc2e5('0x3e')][_0xc2e5('0x56')]({'where':{'id':_0x1f0e08[_0xc2e5('0x44')]['id']}})[_0xc2e5('0x26')](handleEntityNotFound(_0x3df51a,null))['then'](function(_0x178dca){if(_0x178dca){return db[_0xc2e5('0x59')]['transaction'](function(_0x9b99fc){return db[_0xc2e5('0x3e')][_0xc2e5('0x23')]({'where':{'IntervalId':_0x1f0e08[_0xc2e5('0x44')]['id']},'transaction':_0x9b99fc})[_0xc2e5('0x26')](function(_0x1b7b9e){var _0x1dd9eb=_[_0xc2e5('0x2d')](_0x1f0e08[_0xc2e5('0x52')],function(_0x4e52f1){delete _0x4e52f1['id'];_0x4e52f1['IntervalId']=_0x1f0e08[_0xc2e5('0x44')]['id'];return _0x4e52f1;});return db[_0xc2e5('0x3e')][_0xc2e5('0x5a')](_0x1dd9eb,{'transaction':_0x9b99fc});});})['then'](function(){return db['Interval'][_0xc2e5('0x41')]({'where':{'IntervalId':_0x1f0e08['params']['id']}});});}})[_0xc2e5('0x26')](respondWithResult(_0x3df51a,null))[_0xc2e5('0x49')](handleError(_0x3df51a,null));}; \ No newline at end of file diff --git a/server/api/interval/interval.model.js b/server/api/interval/interval.model.js index 970876c..50babac 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 _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 +var _0xa30d=['define','Interval','tools_intervals','rewrite','lodash','../../config/logger','moment','request-promise','../../config/environment','./interval.attributes','../../components/extensions/rewrite','exports'];(function(_0x18faa3,_0x574a9f){var _0x1ba073=function(_0x498dc9){while(--_0x498dc9){_0x18faa3['push'](_0x18faa3['shift']());}};_0x1ba073(++_0x574a9f);}(_0xa30d,0x64));var _0xda30=function(_0x4b7982,_0x251320){_0x4b7982=_0x4b7982-0x0;var _0x3d74d3=_0xa30d[_0x4b7982];return _0x3d74d3;};'use strict';var _=require(_0xda30('0x0'));var util=require('util');var logger=require(_0xda30('0x1'))('api');var moment=require(_0xda30('0x2'));var BPromise=require('bluebird');var rp=require(_0xda30('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xda30('0x4'));var attributes=require(_0xda30('0x5'));var extensions=require(_0xda30('0x6'));module[_0xda30('0x7')]=function(_0x41e210,_0x596c73){return _0x41e210[_0xda30('0x8')](_0xda30('0x9'),attributes,{'tableName':_0xda30('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x2dca98,_0xb2bb08){extensions[_0xda30('0xb')](_0x41e210,_0x2dca98);},'afterBulkCreate':function(_0x2edf9b,_0x15d73e,_0x6c5b00){_0x6c5b00();extensions[_0xda30('0xb')](_0x41e210,_0x2edf9b[0x0]);},'afterUpdate':function(_0x2f94a9,_0x1d2371){extensions[_0xda30('0xb')](_0x41e210,_0x2f94a9);},'afterDestroy':function(_0x5e3a62,_0x277456){extensions[_0xda30('0xb')](_0x41e210,_0x5e3a62);}}});}; \ No newline at end of file diff --git a/server/api/interval/interval.rpc.js b/server/api/interval/interval.rpc.js index 07d134f..b76d314 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(_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 +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(_0x45313f,_0x46caf4){var _0x402910=function(_0x4883d8){while(--_0x4883d8){_0x45313f['push'](_0x45313f['shift']());}};_0x402910(++_0x46caf4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47e7cb,_0x4c1b8d){_0x47e7cb=_0x47e7cb-0x0;var _0x2a8874=_0xa9e0[_0x47e7cb];return _0x2a8874;};'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 9c42b6a..7eb6505 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 _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 +var _0x5f66=['send','exports','Router','./jira.controller','post','isAuthenticated'];(function(_0x46428c,_0x20ab75){var _0x16a677=function(_0x2b0817){while(--_0x2b0817){_0x46428c['push'](_0x46428c['shift']());}};_0x16a677(++_0x20ab75);}(_0x5f66,0x1a0));var _0x65f6=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x5f66[_0x5d4607];return _0x5e4a86;};'use strict';var express=require('express');var router=express[_0x65f6('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x65f6('0x1'));router[_0x65f6('0x2')]('/',auth[_0x65f6('0x3')](),controller[_0x65f6('0x4')]);module[_0x65f6('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 bbcf8d6..d60c249 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 _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 +var _0x9277=['toString','base64','stringify','request','setEncoding','utf8','data','end','statusCode','json','parse','status','api.jira','write','openIssue','send','body','headers','socket','remoteAddress','connection','https','../../config/logger','support','3eAmWpBVP0','key','MOTGUI','summary','Report','\x20from\x20','description','issuetype','Bug','fields','customfield_11500','email','customfield_11501','newToken','customfield_11503','name','customfield_11504','customfield_10102','track.xcallymotion.com','POST','application/json','Basic\x20'];(function(_0x3857f2,_0x6639dd){var _0xa2623a=function(_0x196319){while(--_0x196319){_0x3857f2['push'](_0x3857f2['shift']());}};_0xa2623a(++_0x6639dd);}(_0x9277,0x71));var _0x7927=function(_0x43a4c2,_0x4e400f){_0x43a4c2=_0x43a4c2-0x0;var _0x3cd4fb=_0x9277[_0x43a4c2];return _0x3cd4fb;};'use strict';var BPromise=require('bluebird');var https=require(_0x7927('0x0'));var logger=require(_0x7927('0x1'))('api');var USERNAME=_0x7927('0x2');var PASSWORD=_0x7927('0x3');function openIssue(_0x55fb6c,_0x48afeb){var _0x547a2c={'fields':{'project':{'key':_0x55fb6c[_0x7927('0x4')]||_0x7927('0x5')},'summary':(_0x55fb6c[_0x7927('0x6')]||_0x7927('0x7'))+_0x7927('0x8')+_0x55fb6c['ip'],'description':_0x55fb6c[_0x7927('0x9')]||JSON['stringify'](_0x55fb6c),'issuetype':{'name':_0x55fb6c[_0x7927('0xa')]||_0x7927('0xb')}}};_0x547a2c[_0x7927('0xc')][_0x7927('0xd')]=_0x55fb6c[_0x7927('0xe')];_0x547a2c['fields'][_0x7927('0xf')]=_0x55fb6c['oldToken'];_0x547a2c[_0x7927('0xc')]['customfield_11502']=_0x55fb6c[_0x7927('0x10')];_0x547a2c['fields'][_0x7927('0x11')]=_0x55fb6c[_0x7927('0x12')];_0x547a2c[_0x7927('0xc')][_0x7927('0x13')]=_0x55fb6c['reason'];_0x547a2c[_0x7927('0xc')][_0x7927('0x14')]=_0x55fb6c['ip'];var _0x51f772={'host':_0x7927('0x15'),'port':0x1bb,'path':'/rest/api/2/issue','method':_0x7927('0x16'),'timeout':0x4e20,'headers':{'Content-Type':_0x7927('0x17'),'Authorization':_0x7927('0x18')+new Buffer(USERNAME+':'+PASSWORD)[_0x7927('0x19')](_0x7927('0x1a'))}};var _0x232b04=JSON[_0x7927('0x1b')](_0x547a2c);var _0x486e58=https[_0x7927('0x1c')](_0x51f772,function(_0x5deeca){_0x5deeca[_0x7927('0x1d')](_0x7927('0x1e'));var _0x298947='';_0x5deeca['on'](_0x7927('0x1f'),function(_0x5e4427){_0x298947+=_0x5e4427;});_0x5deeca['on'](_0x7927('0x20'),function(){if(_0x48afeb){return _0x48afeb['status'](_0x5deeca[_0x7927('0x21')])[_0x7927('0x22')](JSON[_0x7927('0x23')](_0x298947));}});});_0x486e58['on']('error',function(_0x1a5317){if(_0x48afeb){return _0x48afeb[_0x7927('0x24')](0x1f4)[_0x7927('0x22')]({'errors':[{'message':'Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','type':_0x7927('0x25')}]});}});_0x486e58[_0x7927('0x26')](_0x232b04);_0x486e58[_0x7927('0x20')]();}exports[_0x7927('0x27')]=openIssue;exports[_0x7927('0x28')]=function(_0x15a538,_0x204b7){_0x15a538[_0x7927('0x29')]['ip']=_0x15a538[_0x7927('0x2a')]['x-forwarded-for']||_0x15a538['connection']['remoteAddress']||_0x15a538[_0x7927('0x2b')][_0x7927('0x2c')]||_0x15a538[_0x7927('0x2d')][_0x7927('0x2b')]['remoteAddress'];return openIssue(_0x15a538[_0x7927('0x29')],_0x204b7);}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/index.js b/server/api/jscriptyAnswerReport/index.js index c76fbae..5dd1dde 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 _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 +var _0xa9e0=['isAuthenticated','create','put','/:id','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','get','index','/describe','show','post'];(function(_0x4cce65,_0x40021e){var _0x4d1b45=function(_0x54d290){while(--_0x54d290){_0x4cce65['push'](_0x4cce65['shift']());}};_0x4d1b45(++_0x40021e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa9e0[_0x4cf98e];return _0x1623ac;};'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('0xc')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0x10'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);module[_0x0a9e('0x12')]=router; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js index c872862..025035f 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(_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 +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x7a54,0x106));var _0x47a5=function(_0x144492,_0x7920bb){_0x144492=_0x144492-0x0;var _0x1e045b=_0x7a54[_0x144492];return _0x1e045b;};'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 bd3da12..9821944 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 _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 +var _0x6ec2=['Content-Range','apply','save','update','stack','name','send','index','JscriptyAnswerReport','rawAttributes','fieldName','type','key','map','query','filters','model','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','then','includeAll','include','findAll','catch','show','keys','length','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count'];(function(_0x3aa1f0,_0x3ee7c9){var _0x520581=function(_0x34824){while(--_0x34824){_0x3aa1f0['push'](_0x3aa1f0['shift']());}};_0x520581(++_0x3ee7c9);}(_0x6ec2,0x78));var _0x26ec=function(_0x234406,_0x454c70){_0x234406=_0x234406-0x0;var _0x2ca77f=_0x6ec2[_0x234406];return _0x2ca77f;};'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 Redis=require(_0x26ec('0x10'));var authService=require(_0x26ec('0x11'));var qs=require(_0x26ec('0x12'));var as=require(_0x26ec('0x13'));var hardwareService=require(_0x26ec('0x14'));var logger=require(_0x26ec('0x15'))(_0x26ec('0x16'));var utils=require(_0x26ec('0x17'));var config=require(_0x26ec('0x18'));var licenseUtil=require(_0x26ec('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5212e4,_0x2d869a){_0x2d869a=_0x2d869a||0xcc;return function(_0x1bec27){if(_0x1bec27){return _0x5212e4[_0x26ec('0x1a')](_0x2d869a);}return _0x5212e4[_0x26ec('0x1b')](_0x2d869a)[_0x26ec('0x1c')]();};}function respondWithResult(_0xff29e5,_0x30cbd3){_0x30cbd3=_0x30cbd3||0xc8;return function(_0x49467a){if(_0x49467a){return _0xff29e5[_0x26ec('0x1b')](_0x30cbd3)[_0x26ec('0x1d')](_0x49467a);}};}function respondWithFilteredResult(_0x302bde,_0x7f9bb2){return function(_0x4f9950){if(_0x4f9950){var _0x4d366c=typeof _0x7f9bb2[_0x26ec('0x1e')]===_0x26ec('0x1f')&&typeof _0x7f9bb2[_0x26ec('0x20')]===_0x26ec('0x1f');var _0x49dc68=_0x4f9950[_0x26ec('0x21')];var _0x176613=_0x4d366c?0x0:_0x7f9bb2['offset'];var _0x5ef1e5=_0x4d366c?_0x4f9950['count']:_0x7f9bb2[_0x26ec('0x1e')]+_0x7f9bb2[_0x26ec('0x20')];var _0x60511e;if(_0x5ef1e5>=_0x49dc68){_0x5ef1e5=_0x49dc68;_0x60511e=0xc8;}else{_0x60511e=0xce;}_0x302bde['status'](_0x60511e);return _0x302bde['set'](_0x26ec('0x22'),_0x176613+'-'+_0x5ef1e5+'/'+_0x49dc68)[_0x26ec('0x1d')](_0x4f9950);}return null;};}function patchUpdates(_0x33a28b){return function(_0x2f4d14){try{jsonpatch[_0x26ec('0x23')](_0x2f4d14,_0x33a28b,!![]);}catch(_0xe199f2){return BPromise['reject'](_0xe199f2);}return _0x2f4d14[_0x26ec('0x24')]();};}function saveUpdates(_0x29c34a,_0x2a9e82){return function(_0x46f766){if(_0x46f766){return _0x46f766[_0x26ec('0x25')](_0x29c34a)['then'](function(_0x5202e6){return _0x5202e6;});}return null;};}function removeEntity(_0x2204ba,_0x16154d){return function(_0x65aea3){if(_0x65aea3){return _0x65aea3['destroy']()['then'](function(){_0x2204ba[_0x26ec('0x1b')](0xcc)[_0x26ec('0x1c')]();});}};}function handleEntityNotFound(_0x16aba4,_0x365fac){return function(_0x4030ea){if(!_0x4030ea){_0x16aba4[_0x26ec('0x1a')](0x194);}return _0x4030ea;};}function handleError(_0x439f78,_0x4e9cf8){_0x4e9cf8=_0x4e9cf8||0x1f4;return function(_0x50fedc){logger['error'](_0x50fedc[_0x26ec('0x26')]);if(_0x50fedc[_0x26ec('0x27')]){delete _0x50fedc[_0x26ec('0x27')];}_0x439f78[_0x26ec('0x1b')](_0x4e9cf8)[_0x26ec('0x28')](_0x50fedc);};}exports[_0x26ec('0x29')]=function(_0x3268e9,_0x4a1371){var _0x30231e={},_0x5d10ba={},_0x38e942={'count':0x0,'rows':[]};var _0x355c4e=_['map'](db[_0x26ec('0x2a')][_0x26ec('0x2b')],function(_0x139d24){return{'name':_0x139d24[_0x26ec('0x2c')],'type':_0x139d24[_0x26ec('0x2d')][_0x26ec('0x2e')]};});_0x5d10ba['model']=_[_0x26ec('0x2f')](_0x355c4e,'name');_0x5d10ba[_0x26ec('0x30')]=_['keys'](_0x3268e9[_0x26ec('0x30')]);_0x5d10ba[_0x26ec('0x31')]=_['intersection'](_0x5d10ba[_0x26ec('0x32')],_0x5d10ba[_0x26ec('0x30')]);_0x30231e[_0x26ec('0x33')]=_[_0x26ec('0x34')](_0x5d10ba[_0x26ec('0x32')],qs[_0x26ec('0x35')](_0x3268e9['query']['fields']));_0x30231e['attributes']=_0x30231e['attributes']['length']?_0x30231e[_0x26ec('0x33')]:_0x5d10ba[_0x26ec('0x32')];if(!_0x3268e9[_0x26ec('0x30')][_0x26ec('0x36')](_0x26ec('0x37'))){_0x30231e['limit']=qs[_0x26ec('0x20')](_0x3268e9[_0x26ec('0x30')][_0x26ec('0x20')]);_0x30231e[_0x26ec('0x1e')]=qs[_0x26ec('0x1e')](_0x3268e9['query'][_0x26ec('0x1e')]);}_0x30231e[_0x26ec('0x38')]=qs[_0x26ec('0x39')](_0x3268e9[_0x26ec('0x30')][_0x26ec('0x39')]);_0x30231e[_0x26ec('0x3a')]=qs[_0x26ec('0x31')](_[_0x26ec('0x3b')](_0x3268e9[_0x26ec('0x30')],_0x5d10ba[_0x26ec('0x31')]),_0x355c4e);if(_0x3268e9['query']['filter']){_0x30231e[_0x26ec('0x3a')]=_[_0x26ec('0x3c')](_0x30231e['where'],{'$or':_[_0x26ec('0x2f')](_0x355c4e,function(_0x4cbe80){if(_0x4cbe80[_0x26ec('0x2d')]!==_0x26ec('0x3d')){var _0x11fc8c={};_0x11fc8c[_0x4cbe80[_0x26ec('0x27')]]={'$like':'%'+_0x3268e9[_0x26ec('0x30')][_0x26ec('0x3e')]+'%'};return _0x11fc8c;}})});}_0x30231e=_['merge']({},_0x30231e,_0x3268e9[_0x26ec('0x3f')]);var _0x3441f4={'where':_0x30231e[_0x26ec('0x3a')]};return db[_0x26ec('0x2a')][_0x26ec('0x21')](_0x3441f4)[_0x26ec('0x40')](function(_0x440ed3){_0x38e942[_0x26ec('0x21')]=_0x440ed3;if(_0x3268e9[_0x26ec('0x30')][_0x26ec('0x41')]){_0x30231e[_0x26ec('0x42')]=[{'all':!![]}];}return db[_0x26ec('0x2a')][_0x26ec('0x43')](_0x30231e);})[_0x26ec('0x40')](function(_0x20a6dd){_0x38e942['rows']=_0x20a6dd;return _0x38e942;})[_0x26ec('0x40')](respondWithFilteredResult(_0x4a1371,_0x30231e))[_0x26ec('0x44')](handleError(_0x4a1371,null));};exports[_0x26ec('0x45')]=function(_0x611b8f,_0x452bbb){var _0x1be9f7={'raw':!![],'where':{'id':_0x611b8f['params']['id']}},_0x58faf4={};_0x58faf4[_0x26ec('0x32')]=_['keys'](db[_0x26ec('0x2a')][_0x26ec('0x2b')]);_0x58faf4[_0x26ec('0x30')]=_[_0x26ec('0x46')](_0x611b8f[_0x26ec('0x30')]);_0x58faf4[_0x26ec('0x31')]=_[_0x26ec('0x34')](_0x58faf4[_0x26ec('0x32')],_0x58faf4['query']);_0x1be9f7[_0x26ec('0x33')]=_[_0x26ec('0x34')](_0x58faf4[_0x26ec('0x32')],qs['fields'](_0x611b8f[_0x26ec('0x30')][_0x26ec('0x35')]));_0x1be9f7[_0x26ec('0x33')]=_0x1be9f7[_0x26ec('0x33')][_0x26ec('0x47')]?_0x1be9f7[_0x26ec('0x33')]:_0x58faf4[_0x26ec('0x32')];if(_0x611b8f[_0x26ec('0x30')][_0x26ec('0x41')]){_0x1be9f7[_0x26ec('0x42')]=[{'all':!![]}];}_0x1be9f7=_[_0x26ec('0x3c')]({},_0x1be9f7,_0x611b8f[_0x26ec('0x3f')]);return db[_0x26ec('0x2a')][_0x26ec('0x48')](_0x1be9f7)['then'](handleEntityNotFound(_0x452bbb,null))['then'](respondWithResult(_0x452bbb,null))[_0x26ec('0x44')](handleError(_0x452bbb,null));};exports['create']=function(_0x4f873e,_0x1350d0){return db[_0x26ec('0x2a')][_0x26ec('0x49')](_0x4f873e['body'],{})['then'](respondWithResult(_0x1350d0,0xc9))['catch'](handleError(_0x1350d0,null));};exports['update']=function(_0x3faf2b,_0x583a22){if(_0x3faf2b[_0x26ec('0x4a')]['id']){delete _0x3faf2b[_0x26ec('0x4a')]['id'];}return db['JscriptyAnswerReport']['find']({'where':{'id':_0x3faf2b[_0x26ec('0x4b')]['id']}})[_0x26ec('0x40')](handleEntityNotFound(_0x583a22,null))['then'](saveUpdates(_0x3faf2b[_0x26ec('0x4a')],null))[_0x26ec('0x40')](respondWithResult(_0x583a22,null))['catch'](handleError(_0x583a22,null));};exports['destroy']=function(_0x34ee55,_0x125459){return db[_0x26ec('0x2a')]['find']({'where':{'id':_0x34ee55[_0x26ec('0x4b')]['id']}})['then'](handleEntityNotFound(_0x125459,null))[_0x26ec('0x40')](removeEntity(_0x125459,null))[_0x26ec('0x44')](handleError(_0x125459,null));};exports[_0x26ec('0x4c')]=function(_0x4750a2,_0x43f2fe){return db[_0x26ec('0x2a')]['describe']()[_0x26ec('0x40')](respondWithResult(_0x43f2fe,null))[_0x26ec('0x44')](handleError(_0x43f2fe,null));}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js index 4cbaa45..72e4275 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 _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 +var _0x2fe9=['request-promise','rimraf','../../config/environment','./jscriptyAnswerReport.attributes','define','JscriptyAnswerReport','lodash','util','../../config/logger','api','moment'];(function(_0x1878c9,_0x4c46f0){var _0x4c07e3=function(_0x550183){while(--_0x550183){_0x1878c9['push'](_0x1878c9['shift']());}};_0x4c07e3(++_0x4c46f0);}(_0x2fe9,0x7f));var _0x92fe=function(_0x451b47,_0x234ce7){_0x451b47=_0x451b47-0x0;var _0x2a834d=_0x2fe9[_0x451b47];return _0x2a834d;};'use strict';var _=require(_0x92fe('0x0'));var util=require(_0x92fe('0x1'));var logger=require(_0x92fe('0x2'))(_0x92fe('0x3'));var moment=require(_0x92fe('0x4'));var BPromise=require('bluebird');var rp=require(_0x92fe('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x92fe('0x6'));var config=require(_0x92fe('0x7'));var attributes=require(_0x92fe('0x8'));module['exports']=function(_0x5134ae,_0x618a80){return _0x5134ae[_0x92fe('0x9')](_0x92fe('0xa'),attributes,{'tableName':'report_jscripty_answers','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 fcc026d..9af8fd8 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 _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 +var _0x6445=['client','http','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x36d203,_0x3653f3){var _0x2f9e62=function(_0x461a77){while(--_0x461a77){_0x36d203['push'](_0x36d203['shift']());}};_0x2f9e62(++_0x3653f3);}(_0x6445,0xe5));var _0x5644=function(_0x567748,_0x16e339){_0x567748=_0x567748-0x0;var _0x1034be=_0x6445[_0x567748];return _0x1034be;};'use strict';var _=require(_0x5644('0x0'));var util=require(_0x5644('0x1'));var moment=require(_0x5644('0x2'));var BPromise=require(_0x5644('0x3'));var rs=require(_0x5644('0x4'));var fs=require('fs');var Redis=require(_0x5644('0x5'));var db=require(_0x5644('0x6'))['db'];var utils=require(_0x5644('0x7'));var logger=require(_0x5644('0x8'))(_0x5644('0x9'));var config=require('../../config/environment');var jayson=require(_0x5644('0xa'));var client=jayson[_0x5644('0xb')][_0x5644('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x27685b,_0x3686b3,_0x36a125){return new BPromise(function(_0x38dea2,_0xa31ff1){return client[_0x5644('0xd')](_0x27685b,_0x36a125)[_0x5644('0xe')](function(_0x4ef83a){logger[_0x5644('0xf')](_0x5644('0x10'),_0x3686b3,'request\x20sent');logger['debug']('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x3686b3,'request\x20sent',JSON[_0x5644('0x11')](_0x4ef83a));if(_0x4ef83a[_0x5644('0x12')]){if(_0x4ef83a[_0x5644('0x12')][_0x5644('0x13')]===0x1f4){logger[_0x5644('0x12')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x3686b3,_0x4ef83a[_0x5644('0x12')]['message']);return _0xa31ff1(_0x4ef83a['error'][_0x5644('0x14')]);}logger[_0x5644('0x12')](_0x5644('0x10'),_0x3686b3,_0x4ef83a[_0x5644('0x12')][_0x5644('0x14')]);return _0x38dea2(_0x4ef83a[_0x5644('0x12')][_0x5644('0x14')]);}else{logger[_0x5644('0xf')](_0x5644('0x10'),_0x3686b3,_0x5644('0x15'));_0x38dea2(_0x4ef83a[_0x5644('0x16')][_0x5644('0x14')]);}})[_0x5644('0x17')](function(_0x4ab358){logger[_0x5644('0x12')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x3686b3,_0x4ab358);_0xa31ff1(_0x4ab358);});});} \ No newline at end of file diff --git a/server/api/jscriptyProject/index.js b/server/api/jscriptyProject/index.js index 1653d17..afbaead 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 _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 +var _0x44f9=['exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','/:id','show','/:id/sessions','getAnswers','30s','getSummary','create','post','/:id/clone','clone','put','update','destroy'];(function(_0x5a0b7e,_0xe77ec1){var _0x2deb0f=function(_0x2a53d0){while(--_0x2a53d0){_0x5a0b7e['push'](_0x5a0b7e['shift']());}};_0x2deb0f(++_0xe77ec1);}(_0x44f9,0x79));var _0x944f=function(_0x186376,_0x5d988a){_0x186376=_0x186376-0x0;var _0x2dbdd9=_0x44f9[_0x186376];return _0x2dbdd9;};'use strict';var multer=require(_0x944f('0x0'));var util=require(_0x944f('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x944f('0x2'));var router=express[_0x944f('0x3')]();var fs_extra=require(_0x944f('0x4'));var auth=require(_0x944f('0x5'));var interaction=require(_0x944f('0x6'));var config=require(_0x944f('0x7'));var controller=require('./jscriptyProject.controller');router['get']('/',auth[_0x944f('0x8')](),controller['index']);router[_0x944f('0x9')](_0x944f('0xa'),auth[_0x944f('0x8')](),controller[_0x944f('0xb')]);router['get'](_0x944f('0xc'),auth[_0x944f('0x8')](),controller['getSessions']);router[_0x944f('0x9')]('/:id/answers',auth[_0x944f('0x8')](),controller[_0x944f('0xd')]);router['get']('/:id/summary',auth[_0x944f('0x8')](),timeout(_0x944f('0xe')),controller[_0x944f('0xf')]);router['post']('/',auth[_0x944f('0x8')](),controller[_0x944f('0x10')]);router[_0x944f('0x11')](_0x944f('0x12'),auth[_0x944f('0x8')](),controller[_0x944f('0x13')]);router[_0x944f('0x14')](_0x944f('0xa'),auth[_0x944f('0x8')](),controller[_0x944f('0x15')]);router['delete'](_0x944f('0xa'),auth[_0x944f('0x8')](),controller[_0x944f('0x16')]);module[_0x944f('0x17')]=router; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.attributes.js b/server/api/jscriptyProject/jscriptyProject.attributes.js index bd3d524..111b289 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 _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 +var _0xcc40=['getDataValue','description','BOOLEAN','sequelize','lodash','exports','name','STRING','long','setDataValue','formData','stringify','isString','format'];(function(_0x2d4ea7,_0x1cc8f1){var _0x3685a9=function(_0x56dac9){while(--_0x56dac9){_0x2d4ea7['push'](_0x2d4ea7['shift']());}};_0x3685a9(++_0x1cc8f1);}(_0xcc40,0xe3));var _0x0cc4=function(_0x54d98a,_0x3493a9){_0x54d98a=_0x54d98a-0x0;var _0x49c50e=_0xcc40[_0x54d98a];return _0x49c50e;};'use strict';var Sequelize=require(_0x0cc4('0x0'));var _=require(_0x0cc4('0x1'));var util=require('util');module[_0x0cc4('0x2')]={'name':{'type':Sequelize['STRING'],'unique':_0x0cc4('0x3')},'description':{'type':Sequelize[_0x0cc4('0x4')]},'formData':{'type':Sequelize['TEXT'](_0x0cc4('0x5')),'set':function(_0x3f5dcf){if(_['isObjectLike'](_0x3f5dcf)){this[_0x0cc4('0x6')](_0x0cc4('0x7'),JSON[_0x0cc4('0x8')](_0x3f5dcf));}else if(_[_0x0cc4('0x9')](_0x3f5dcf)){this[_0x0cc4('0x6')]('formData',_0x3f5dcf);}else{this[_0x0cc4('0x6')](_0x0cc4('0x7'),util[_0x0cc4('0xa')]('{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}',this[_0x0cc4('0xb')]('name')||'',this['getDataValue'](_0x0cc4('0xc'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0x0cc4('0xd')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.controller.js b/server/api/jscriptyProject/jscriptyProject.controller.js index aedf619..63a7cbc 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 _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 +var _0xe809=['autoAssociation','catch','error','clone','params','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Projects','userProfileId','destroy','getSessions','findOne','JscriptySessionReport','order','ProjectId','JscriptyAnswerReport','number','fromCharCode','toString','indexOf','replace','getSummary','starttime','parse','startTime','JscriptyQuestionReport','-createdAt','questionId','question','format','YYYY-MM-DD\x20HH:mm:ss','answer','isEmpty','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','setHeader','Content-disposition','attachment;\x20filename=','Content-type','text/csv','download','sendStatus','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','fs-extra','squel','jsforce','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','status','offset','limit','undefined','count','set','Content-Range','apply','reject','save','UserProfileResource','then','end','stack','name','send','index','JscriptyProject','rawAttributes','fieldName','type','key','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','VIRTUAL','options','include','findAll','rows','includeAll','find','create','body','user','get','UserProfileSection'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xe809,0xa1));var _0x9e80=function(_0x550f6c,_0xe9b7b6){_0x550f6c=_0x550f6c-0x0;var _0x2a4624=_0xe809[_0x550f6c];return _0x2a4624;};'use strict';var emlformat=require(_0x9e80('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9e80('0x1'));var jsonpatch=require(_0x9e80('0x2'));var rp=require('request-promise');var moment=require(_0x9e80('0x3'));var BPromise=require(_0x9e80('0x4'));var Mustache=require(_0x9e80('0x5'));var util=require(_0x9e80('0x6'));var path=require('path');var sox=require(_0x9e80('0x7'));var csv=require(_0x9e80('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9e80('0x9'));var _=require('lodash');var squel=require(_0x9e80('0xa'));var crypto=require('crypto');var jsforce=require(_0x9e80('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x9e80('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x9e80('0xc'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x9e80('0xd'));var hardwareService=require(_0x9e80('0xe'));var logger=require('../../config/logger')(_0x9e80('0xf'));var utils=require('../../config/utils');var config=require(_0x9e80('0x10'));var licenseUtil=require(_0x9e80('0x11'));var db=require(_0x9e80('0x12'))['db'];function respondWithStatusCode(_0x21e7d2,_0x217de8){_0x217de8=_0x217de8||0xcc;return function(_0x3def81){if(_0x3def81){return _0x21e7d2['sendStatus'](_0x217de8);}return _0x21e7d2[_0x9e80('0x13')](_0x217de8)['end']();};}function respondWithResult(_0x2fe3b9,_0x3dea93){_0x3dea93=_0x3dea93||0xc8;return function(_0x39214c){if(_0x39214c){return _0x2fe3b9[_0x9e80('0x13')](_0x3dea93)['json'](_0x39214c);}};}function respondWithFilteredResult(_0x4032b2,_0x37830a){return function(_0x1ff160){if(_0x1ff160){var _0xdcb167=typeof _0x37830a[_0x9e80('0x14')]==='undefined'&&typeof _0x37830a[_0x9e80('0x15')]===_0x9e80('0x16');var _0x4eb474=_0x1ff160[_0x9e80('0x17')];var _0x32c51a=_0xdcb167?0x0:_0x37830a[_0x9e80('0x14')];var _0x64eec0=_0xdcb167?_0x1ff160[_0x9e80('0x17')]:_0x37830a['offset']+_0x37830a[_0x9e80('0x15')];var _0x54bfc3;if(_0x64eec0>=_0x4eb474){_0x64eec0=_0x4eb474;_0x54bfc3=0xc8;}else{_0x54bfc3=0xce;}_0x4032b2[_0x9e80('0x13')](_0x54bfc3);return _0x4032b2[_0x9e80('0x18')](_0x9e80('0x19'),_0x32c51a+'-'+_0x64eec0+'/'+_0x4eb474)['json'](_0x1ff160);}return null;};}function patchUpdates(_0x5098c1){return function(_0xc8d2dc){try{jsonpatch[_0x9e80('0x1a')](_0xc8d2dc,_0x5098c1,!![]);}catch(_0x347a52){return BPromise[_0x9e80('0x1b')](_0x347a52);}return _0xc8d2dc[_0x9e80('0x1c')]();};}function saveUpdates(_0x23e1cc,_0x184772){return function(_0x5603b3){if(_0x5603b3){return _0x5603b3['update'](_0x23e1cc)['then'](function(_0x3a0cb2){return _0x3a0cb2;});}return null;};}function removeEntity(_0x345d91,_0x2c3abd){return function(_0xbf6b54){if(_0xbf6b54){return _0xbf6b54['destroy']()['then'](function(){var _0x1e145d=_0xbf6b54['get']({'plain':!![]});var _0x4ae93d='Projects';return db[_0x9e80('0x1d')]['destroy']({'where':{'type':_0x4ae93d,'resourceId':_0x1e145d['id']}})[_0x9e80('0x1e')](function(){return _0xbf6b54;});})[_0x9e80('0x1e')](function(){_0x345d91[_0x9e80('0x13')](0xcc)[_0x9e80('0x1f')]();});}};}function handleEntityNotFound(_0x27c198,_0x4c81db){return function(_0x124948){if(!_0x124948){_0x27c198['sendStatus'](0x194);}return _0x124948;};}function handleError(_0x816603,_0x1eddd3){_0x1eddd3=_0x1eddd3||0x1f4;return function(_0xf7bf17){logger['error'](_0xf7bf17[_0x9e80('0x20')]);if(_0xf7bf17['name']){delete _0xf7bf17[_0x9e80('0x21')];}_0x816603[_0x9e80('0x13')](_0x1eddd3)[_0x9e80('0x22')](_0xf7bf17);};}exports[_0x9e80('0x23')]=function(_0xb24205,_0x3c5156){var _0x559643={},_0x1ff3f6={},_0x4414e4={'count':0x0,'rows':[]};var _0x206250=_['map'](db[_0x9e80('0x24')][_0x9e80('0x25')],function(_0x5042db){return{'name':_0x5042db[_0x9e80('0x26')],'type':_0x5042db[_0x9e80('0x27')][_0x9e80('0x28')]};});_0x1ff3f6[_0x9e80('0x29')]=_['map'](_0x206250,_0x9e80('0x21'));_0x1ff3f6['query']=_[_0x9e80('0x2a')](_0xb24205[_0x9e80('0x2b')]);_0x1ff3f6[_0x9e80('0x2c')]=_['intersection'](_0x1ff3f6[_0x9e80('0x29')],_0x1ff3f6[_0x9e80('0x2b')]);_0x559643[_0x9e80('0x2d')]=_[_0x9e80('0x2e')](_0x1ff3f6[_0x9e80('0x29')],qs[_0x9e80('0x2f')](_0xb24205[_0x9e80('0x2b')][_0x9e80('0x2f')]));_0x559643[_0x9e80('0x2d')]=_0x559643[_0x9e80('0x2d')][_0x9e80('0x30')]?_0x559643[_0x9e80('0x2d')]:_0x1ff3f6['model'];if(!_0xb24205[_0x9e80('0x2b')][_0x9e80('0x31')](_0x9e80('0x32'))){_0x559643[_0x9e80('0x15')]=qs[_0x9e80('0x15')](_0xb24205[_0x9e80('0x2b')][_0x9e80('0x15')]);_0x559643[_0x9e80('0x14')]=qs[_0x9e80('0x14')](_0xb24205['query']['offset']);}_0x559643['order']=qs['sort'](_0xb24205[_0x9e80('0x2b')][_0x9e80('0x33')]);_0x559643[_0x9e80('0x34')]=qs[_0x9e80('0x2c')](_[_0x9e80('0x35')](_0xb24205[_0x9e80('0x2b')],_0x1ff3f6[_0x9e80('0x2c')]),_0x206250);if(_0xb24205['query'][_0x9e80('0x36')]){_0x559643[_0x9e80('0x34')]=_[_0x9e80('0x37')](_0x559643[_0x9e80('0x34')],{'$or':_[_0x9e80('0x38')](_0x206250,function(_0x564c1e){if(_0x564c1e[_0x9e80('0x27')]!==_0x9e80('0x39')){var _0x22b798={};_0x22b798[_0x564c1e[_0x9e80('0x21')]]={'$like':'%'+_0xb24205[_0x9e80('0x2b')]['filter']+'%'};return _0x22b798;}})});}_0x559643=_[_0x9e80('0x37')]({},_0x559643,_0xb24205[_0x9e80('0x3a')]);var _0x485535={'where':_0x559643[_0x9e80('0x34')]};return db[_0x9e80('0x24')][_0x9e80('0x17')](_0x485535)['then'](function(_0x23c0d9){_0x4414e4[_0x9e80('0x17')]=_0x23c0d9;if(_0xb24205[_0x9e80('0x2b')]['includeAll']){_0x559643[_0x9e80('0x3b')]=[{'all':!![]}];}return db['JscriptyProject'][_0x9e80('0x3c')](_0x559643);})[_0x9e80('0x1e')](function(_0xfbc4){_0x4414e4[_0x9e80('0x3d')]=_0xfbc4;return _0x4414e4;})[_0x9e80('0x1e')](respondWithFilteredResult(_0x3c5156,_0x559643))['catch'](handleError(_0x3c5156,null));};exports['show']=function(_0x2d8ab4,_0x36e9){var _0x4146fe={'raw':![],'where':{'id':_0x2d8ab4['params']['id']}},_0x57fa63={};_0x57fa63[_0x9e80('0x29')]=_[_0x9e80('0x2a')](db[_0x9e80('0x24')]['rawAttributes']);_0x57fa63['query']=_[_0x9e80('0x2a')](_0x2d8ab4[_0x9e80('0x2b')]);_0x57fa63['filters']=_[_0x9e80('0x2e')](_0x57fa63[_0x9e80('0x29')],_0x57fa63[_0x9e80('0x2b')]);_0x4146fe[_0x9e80('0x2d')]=_['intersection'](_0x57fa63[_0x9e80('0x29')],qs['fields'](_0x2d8ab4[_0x9e80('0x2b')][_0x9e80('0x2f')]));_0x4146fe[_0x9e80('0x2d')]=_0x4146fe['attributes'][_0x9e80('0x30')]?_0x4146fe['attributes']:_0x57fa63[_0x9e80('0x29')];if(_0x2d8ab4[_0x9e80('0x2b')][_0x9e80('0x3e')]){_0x4146fe[_0x9e80('0x3b')]=[{'all':!![]}];}_0x4146fe=_['merge']({},_0x4146fe,_0x2d8ab4[_0x9e80('0x3a')]);return db[_0x9e80('0x24')][_0x9e80('0x3f')](_0x4146fe)[_0x9e80('0x1e')](handleEntityNotFound(_0x36e9,null))[_0x9e80('0x1e')](respondWithResult(_0x36e9,null))['catch'](handleError(_0x36e9,null));};exports[_0x9e80('0x40')]=function(_0x23c46b,_0x40930c){return db['JscriptyProject'][_0x9e80('0x40')](_0x23c46b[_0x9e80('0x41')],{})['then'](function(_0x4b1e53){var _0x55362c=_0x23c46b[_0x9e80('0x42')]['get']({'plain':!![]});if(!_0x55362c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x55362c['role']===_0x9e80('0x42')){var _0xa445a=_0x4b1e53[_0x9e80('0x43')]({'plain':!![]});var _0x2553c4='Projects';return db[_0x9e80('0x44')][_0x9e80('0x3f')]({'where':{'name':_0x2553c4,'userProfileId':_0x55362c['userProfileId']},'raw':!![]})[_0x9e80('0x1e')](function(_0x27ea67){if(_0x27ea67&&_0x27ea67[_0x9e80('0x45')]===0x0){return db[_0x9e80('0x1d')][_0x9e80('0x40')]({'name':_0xa445a['name'],'resourceId':_0xa445a['id'],'type':_0x27ea67['name'],'sectionId':_0x27ea67['id']},{})[_0x9e80('0x1e')](function(){return _0x4b1e53;});}else{return _0x4b1e53;}})[_0x9e80('0x46')](function(_0x354bfa){logger[_0x9e80('0x47')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x354bfa);throw _0x354bfa;});}return _0x4b1e53;})[_0x9e80('0x1e')](respondWithResult(_0x40930c,0xc9))[_0x9e80('0x46')](handleError(_0x40930c,null));};exports[_0x9e80('0x48')]=function(_0xb1ea5f,_0x338866){var _0x47ed23={'where':{'id':_0xb1ea5f[_0x9e80('0x49')]['id']}},_0x5888df={};_0x5888df[_0x9e80('0x29')]=_[_0x9e80('0x2a')](db[_0x9e80('0x24')][_0x9e80('0x25')]);_0x47ed23[_0x9e80('0x2d')]=_[_0x9e80('0x2e')](_0x5888df[_0x9e80('0x29')],qs[_0x9e80('0x2f')](_0xb1ea5f[_0x9e80('0x2b')][_0x9e80('0x2f')]));_0x47ed23[_0x9e80('0x2d')]=_0x47ed23[_0x9e80('0x2d')][_0x9e80('0x30')]?_0x47ed23['attributes']:_0x5888df[_0x9e80('0x29')];if(_0xb1ea5f[_0x9e80('0x2b')]['includeAll']){_0x47ed23['include']=[{'all':!![]}];}_0x47ed23=_['merge']({},_0x47ed23,_0xb1ea5f[_0x9e80('0x3a')]);return db['JscriptyProject']['find'](_0x47ed23)[_0x9e80('0x1e')](handleEntityNotFound(_0x338866,null))[_0x9e80('0x1e')](function(_0x3c125c){if(_0x3c125c){var _0x2bf9aa=_0x3c125c[_0x9e80('0x43')]({'plain':!![]});_0x2bf9aa=qs[_0x9e80('0x4a')](_0x2bf9aa,['id',_0x9e80('0x4b'),_0x9e80('0x4c')]);_0xb1ea5f['body']=_[_0x9e80('0x4a')](_0xb1ea5f[_0x9e80('0x41')],['id',_0x9e80('0x4b'),_0x9e80('0x4c')]);return db[_0x9e80('0x24')]['create'](_[_0x9e80('0x37')](_0x2bf9aa,_0xb1ea5f[_0x9e80('0x41')]),{'include':_0xb1ea5f['query'][_0x9e80('0x3e')]?[{'all':!![]}]:undefined})[_0x9e80('0x1e')](function(_0x28db6e){var _0x5b57c6=_0xb1ea5f[_0x9e80('0x42')][_0x9e80('0x43')]({'plain':!![]});if(!_0x5b57c6)throw new Error(_0x9e80('0x4d'));if(_0x5b57c6[_0x9e80('0x4e')]===_0x9e80('0x42')){var _0x2543a7=_0x28db6e['get']({'plain':!![]});var _0x2e9268=_0x9e80('0x4f');return db[_0x9e80('0x44')][_0x9e80('0x3f')]({'where':{'name':_0x2e9268,'userProfileId':_0x5b57c6[_0x9e80('0x50')]},'raw':!![]})[_0x9e80('0x1e')](function(_0x377aab){if(_0x377aab&&_0x377aab['autoAssociation']===0x0){return db[_0x9e80('0x1d')]['create']({'name':_0x2543a7[_0x9e80('0x21')],'resourceId':_0x2543a7['id'],'type':_0x377aab[_0x9e80('0x21')],'sectionId':_0x377aab['id']},{})['then'](function(){return _0x28db6e;});}else{return _0x28db6e;}})[_0x9e80('0x46')](function(_0x4780d1){logger[_0x9e80('0x47')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4780d1);throw _0x4780d1;});}return _0x28db6e;});}})[_0x9e80('0x1e')](respondWithResult(_0x338866,0xc9))['catch'](handleError(_0x338866,null));};exports['update']=function(_0x597876,_0x1b96e3){if(_0x597876['body']['id']){delete _0x597876[_0x9e80('0x41')]['id'];}return db[_0x9e80('0x24')][_0x9e80('0x3f')]({'where':{'id':_0x597876[_0x9e80('0x49')]['id']}})[_0x9e80('0x1e')](handleEntityNotFound(_0x1b96e3,null))[_0x9e80('0x1e')](saveUpdates(_0x597876[_0x9e80('0x41')],null))[_0x9e80('0x1e')](respondWithResult(_0x1b96e3,null))[_0x9e80('0x46')](handleError(_0x1b96e3,null));};exports[_0x9e80('0x51')]=function(_0x4149d6,_0x4a7b07){return db[_0x9e80('0x24')][_0x9e80('0x3f')]({'where':{'id':_0x4149d6[_0x9e80('0x49')]['id']}})[_0x9e80('0x1e')](handleEntityNotFound(_0x4a7b07,null))[_0x9e80('0x1e')](removeEntity(_0x4a7b07,null))[_0x9e80('0x46')](handleError(_0x4a7b07,null));};exports[_0x9e80('0x52')]=function(_0x1215c0,_0x3b0fa1,_0x2ff4b0){var _0x56d264={'raw':!![],'where':{}};var _0x59b06c={};var _0x28c178={'count':0x0,'rows':[]};return db['JscriptyProject'][_0x9e80('0x53')]({'where':{'id':_0x1215c0[_0x9e80('0x49')]['id']}})[_0x9e80('0x1e')](handleEntityNotFound(_0x3b0fa1,null))['then'](function(_0x778d7c){if(_0x778d7c){_0x59b06c[_0x9e80('0x29')]=_[_0x9e80('0x2a')](db[_0x9e80('0x54')]['rawAttributes']);_0x59b06c[_0x9e80('0x2b')]=_[_0x9e80('0x2a')](_0x1215c0['query']);_0x59b06c[_0x9e80('0x2c')]=_[_0x9e80('0x2e')](_0x59b06c['model'],_0x59b06c['query']);_0x56d264[_0x9e80('0x2d')]=_['intersection'](_0x59b06c[_0x9e80('0x29')],qs['fields'](_0x1215c0[_0x9e80('0x2b')][_0x9e80('0x2f')]));_0x56d264['attributes']=_0x56d264['attributes'][_0x9e80('0x30')]?_0x56d264['attributes']:_0x59b06c[_0x9e80('0x29')];if(!_0x1215c0[_0x9e80('0x2b')][_0x9e80('0x31')](_0x9e80('0x32'))){_0x56d264[_0x9e80('0x15')]=qs[_0x9e80('0x15')](_0x1215c0[_0x9e80('0x2b')][_0x9e80('0x15')]);_0x56d264[_0x9e80('0x14')]=qs[_0x9e80('0x14')](_0x1215c0[_0x9e80('0x2b')]['offset']);}_0x56d264[_0x9e80('0x55')]=qs[_0x9e80('0x33')](_0x1215c0[_0x9e80('0x2b')]['sort']);_0x56d264['where']=qs[_0x9e80('0x2c')](_['pick'](_0x1215c0[_0x9e80('0x2b')],_0x59b06c[_0x9e80('0x2c')]));_0x56d264['where'][_0x9e80('0x56')]=_0x778d7c['id'];if(_0x1215c0[_0x9e80('0x2b')][_0x9e80('0x36')]){_0x56d264[_0x9e80('0x34')]=_[_0x9e80('0x37')](_0x56d264[_0x9e80('0x34')],{'$or':_[_0x9e80('0x38')](_0x56d264['attributes'],function(_0x2e39b8){var _0x5d3ea6={};_0x5d3ea6[_0x2e39b8]={'$like':'%'+_0x1215c0[_0x9e80('0x2b')][_0x9e80('0x36')]+'%'};return _0x5d3ea6;})});}_0x56d264=_[_0x9e80('0x37')]({},_0x56d264,_0x1215c0[_0x9e80('0x3a')]);return db[_0x9e80('0x54')][_0x9e80('0x17')]({'where':_0x56d264['where']})[_0x9e80('0x1e')](function(_0x463a34){_0x28c178[_0x9e80('0x17')]=_0x463a34;if(_0x1215c0['query']['includeAll']){_0x56d264[_0x9e80('0x3b')]=[{'all':!![]}];}return db[_0x9e80('0x54')][_0x9e80('0x3c')](_0x56d264);})[_0x9e80('0x1e')](function(_0xdcb8a9){_0x28c178[_0x9e80('0x3d')]=_0xdcb8a9;return _0x28c178;});}})[_0x9e80('0x1e')](respondWithFilteredResult(_0x3b0fa1,_0x56d264))[_0x9e80('0x46')](handleError(_0x3b0fa1,null));};exports['getAnswers']=function(_0x2001eb,_0x1f0cbe,_0x4e2ea1){var _0x1a9b70={'raw':!![],'where':{}};var _0xbb8416={};var _0x3ad839={'count':0x0,'rows':[]};return db['JscriptyProject'][_0x9e80('0x53')]({'where':{'id':_0x2001eb[_0x9e80('0x49')]['id']}})['then'](handleEntityNotFound(_0x1f0cbe,null))[_0x9e80('0x1e')](function(_0x4cbc06){if(_0x4cbc06){_0xbb8416[_0x9e80('0x29')]=_[_0x9e80('0x2a')](db[_0x9e80('0x57')][_0x9e80('0x25')]);_0xbb8416['query']=_[_0x9e80('0x2a')](_0x2001eb[_0x9e80('0x2b')]);_0xbb8416[_0x9e80('0x2c')]=_['intersection'](_0xbb8416[_0x9e80('0x29')],_0xbb8416[_0x9e80('0x2b')]);_0x1a9b70[_0x9e80('0x2d')]=_[_0x9e80('0x2e')](_0xbb8416[_0x9e80('0x29')],qs[_0x9e80('0x2f')](_0x2001eb[_0x9e80('0x2b')]['fields']));_0x1a9b70['attributes']=_0x1a9b70['attributes']['length']?_0x1a9b70[_0x9e80('0x2d')]:_0xbb8416['model'];if(!_0x2001eb[_0x9e80('0x2b')][_0x9e80('0x31')](_0x9e80('0x32'))){_0x1a9b70['limit']=qs['limit'](_0x2001eb[_0x9e80('0x2b')][_0x9e80('0x15')]);_0x1a9b70[_0x9e80('0x14')]=qs['offset'](_0x2001eb['query']['offset']);}_0x1a9b70[_0x9e80('0x55')]=qs['sort'](_0x2001eb[_0x9e80('0x2b')]['sort']);_0x1a9b70['where']=qs[_0x9e80('0x2c')](_['pick'](_0x2001eb[_0x9e80('0x2b')],_0xbb8416[_0x9e80('0x2c')]));_0x1a9b70['where'][_0x9e80('0x56')]=_0x4cbc06['id'];if(_0x2001eb[_0x9e80('0x2b')][_0x9e80('0x36')]){_0x1a9b70[_0x9e80('0x34')]=_[_0x9e80('0x37')](_0x1a9b70[_0x9e80('0x34')],{'$or':_[_0x9e80('0x38')](_0x1a9b70[_0x9e80('0x2d')],function(_0x15d3ea){var _0x1a6183={};_0x1a6183[_0x15d3ea]={'$like':'%'+_0x2001eb[_0x9e80('0x2b')][_0x9e80('0x36')]+'%'};return _0x1a6183;})});}_0x1a9b70=_['merge']({},_0x1a9b70,_0x2001eb[_0x9e80('0x3a')]);return db[_0x9e80('0x57')][_0x9e80('0x17')]({'where':_0x1a9b70[_0x9e80('0x34')]})[_0x9e80('0x1e')](function(_0x1e4050){_0x3ad839[_0x9e80('0x17')]=_0x1e4050;if(_0x2001eb[_0x9e80('0x2b')]['includeAll']){_0x1a9b70[_0x9e80('0x3b')]=[{'all':!![]}];}return db['JscriptyAnswerReport'][_0x9e80('0x3c')](_0x1a9b70);})[_0x9e80('0x1e')](function(_0x3c66e3){_0x3ad839[_0x9e80('0x3d')]=_0x3c66e3;return _0x3ad839;});}})['then'](respondWithFilteredResult(_0x1f0cbe,_0x1a9b70))[_0x9e80('0x46')](handleError(_0x1f0cbe,null));};function char(_0x52781c){return _0x9e80('0x58')===typeof _0x52781c?String[_0x9e80('0x59')]['apply'](null,arguments):_0x52781c;}function needsEncapsulation(_0x49014b){return!!_0x49014b&&(_0x49014b[_0x9e80('0x5a')]()[_0x9e80('0x5b')](char(0xd))>=0x0||_0x49014b[_0x9e80('0x5a')]()[_0x9e80('0x5b')](char(0xa))>=0x0||_0x49014b[_0x9e80('0x5a')]()['indexOf'](char(0x2c))>=0x0||_0x49014b[_0x9e80('0x5a')]()[_0x9e80('0x5b')](char(0x22))>=0x0);}function encapsulate(_0x338108){var _0xd7d7d9=char(0x22),_0x25bdf0='\x5c'+char(0x22),_0x124e9c=_0x338108['toString']()[_0x9e80('0x5c')](new RegExp(_0xd7d7d9,'g'),_0x25bdf0);return _0xd7d7d9+_0x124e9c+_0xd7d7d9;}exports[_0x9e80('0x5d')]=function(_0x1ed224,_0x4e468a,_0x2174f8){var _0x5ae0cc,_0x480612;var _0x3c9dde={'where':{'ProjectId':_0x1ed224['params']['id']}};if(_0x1ed224[_0x9e80('0x2b')]['startTime']){_0x3c9dde[_0x9e80('0x34')][_0x9e80('0x5e')]=JSON[_0x9e80('0x5f')](_0x1ed224['query'][_0x9e80('0x60')]);}return db[_0x9e80('0x54')][_0x9e80('0x3c')](_0x3c9dde)[_0x9e80('0x1e')](handleEntityNotFound(_0x4e468a,null))[_0x9e80('0x1e')](function(_0x326d1f){if(_0x326d1f){_0x5ae0cc=_0x326d1f;return db[_0x9e80('0x61')][_0x9e80('0x3c')]({'where':{'SessionId':{'$in':_[_0x9e80('0x38')](_0x5ae0cc,'id')},'ProjectId':_0x1ed224[_0x9e80('0x49')]['id']},'order':_0x9e80('0x62')});}})[_0x9e80('0x1e')](handleEntityNotFound(_0x4e468a,null))[_0x9e80('0x1e')](function(_0x39241c){if(_0x39241c){_0x480612=_0x39241c;var _0x2026e0={};for(var _0x18c72a=0x0,_0x3a1289=_0x480612[_0x9e80('0x30')];_0x18c72a<_0x3a1289;_0x18c72a++){if(!_0x2026e0[_0x9e80('0x31')](_0x480612[_0x18c72a][_0x9e80('0x63')])){_0x2026e0[_0x480612[_0x18c72a]['questionId']]=needsEncapsulation(_0x480612[_0x18c72a]['question'])?encapsulate(_0x480612[_0x18c72a][_0x9e80('0x64')]):_0x480612[_0x18c72a]['question'];}}var _0x217dbb=[],_0x16d10f={};for(var _0xe5ff3=0x0,_0x532e71=_0x5ae0cc['length'];_0xe5ff3<_0x532e71;_0xe5ff3++){_0x16d10f={'ProjectId':_0x1ed224['params']['id'],'SessionId':_0x5ae0cc[_0xe5ff3]['id'],'StartTime':moment(_0x5ae0cc[_0xe5ff3][_0x9e80('0x5e')])[_0x9e80('0x65')](_0x9e80('0x66'))};for(var _0x3d56b7=0x0,_0x52f3cf=_0x480612['length'];_0x3d56b7<_0x52f3cf;_0x3d56b7++){if(_0x480612[_0x3d56b7]['SessionId']==_0x5ae0cc[_0xe5ff3]['id']&&_0x2026e0[_0x9e80('0x31')](_0x480612[_0x3d56b7]['questionId'])){_0x16d10f[_0x2026e0[_0x480612[_0x3d56b7][_0x9e80('0x63')]]]=_0x480612[_0x3d56b7][_0x9e80('0x67')];}}for(var _0x3b9aa0 in _0x2026e0){if(!_0x16d10f[_0x9e80('0x31')](_0x2026e0[_0x3b9aa0])){_0x16d10f[_0x2026e0[_0x3b9aa0]]=null;}}_0x217dbb['push'](_0x16d10f);}return _0x217dbb;}})['then'](function(_0x526fec){if(!_[_0x9e80('0x68')](_0x526fec)){var _0x4c9582=toCsv(_0x526fec);var _0xb3bcb3=Date[_0x9e80('0x69')]();fs[_0x9e80('0x6a')](util[_0x9e80('0x65')](_0x9e80('0x6b'),_0x1ed224[_0x9e80('0x49')]['id'],_0xb3bcb3),_0x4c9582);_0x4e468a[_0x9e80('0x6c')](_0x9e80('0x6d'),_0x9e80('0x6e')+util[_0x9e80('0x65')]('Jscripty_Project_%d_Summary_%s.csv',_0x1ed224[_0x9e80('0x49')]['id'],_0xb3bcb3));_0x4e468a[_0x9e80('0x6c')](_0x9e80('0x6f'),_0x9e80('0x70'));return _0x4e468a[_0x9e80('0x71')](util['format']('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x1ed224['params']['id'],_0xb3bcb3));}else{return _0x4e468a[_0x9e80('0x72')](0xcc);}})[_0x9e80('0x46')](handleError(_0x4e468a,null));}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.model.js b/server/api/jscriptyProject/jscriptyProject.model.js index efee33a..d1dddf1 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 _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 +var _0x4be6=['jscripty_projects','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyProject.attributes','define'];(function(_0x2407a9,_0x506375){var _0x1cce1f=function(_0x334a83){while(--_0x334a83){_0x2407a9['push'](_0x2407a9['shift']());}};_0x1cce1f(++_0x506375);}(_0x4be6,0xb5));var _0x64be=function(_0x587845,_0x3115b9){_0x587845=_0x587845-0x0;var _0x1c2292=_0x4be6[_0x587845];return _0x1c2292;};'use strict';var _=require('lodash');var util=require(_0x64be('0x0'));var logger=require(_0x64be('0x1'))(_0x64be('0x2'));var moment=require(_0x64be('0x3'));var BPromise=require(_0x64be('0x4'));var rp=require(_0x64be('0x5'));var fs=require('fs');var path=require(_0x64be('0x6'));var rimraf=require(_0x64be('0x7'));var config=require(_0x64be('0x8'));var attributes=require(_0x64be('0x9'));module['exports']=function(_0x131822,_0x2430e2){return _0x131822[_0x64be('0xa')]('JscriptyProject',attributes,{'tableName':_0x64be('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 acfb607..22a180f 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 _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 +var _0x9c44=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then','request\x20sent','debug','stringify','code','error','message','JscriptyProject,\x20%s,\x20%s','info','result','catch','moment','bluebird'];(function(_0xa6fb1f,_0x1f484b){var _0x23879d=function(_0x426b66){while(--_0x426b66){_0xa6fb1f['push'](_0xa6fb1f['shift']());}};_0x23879d(++_0x1f484b);}(_0x9c44,0x178));var _0x49c4=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x9c44[_0xb0f7c3];return _0x28ea68;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x49c4('0x0'));var BPromise=require(_0x49c4('0x1'));var rs=require(_0x49c4('0x2'));var fs=require('fs');var Redis=require(_0x49c4('0x3'));var db=require(_0x49c4('0x4'))['db'];var utils=require(_0x49c4('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x49c4('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x49c4('0x7')][_0x49c4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x69bc41,_0x2c4e2e,_0x436234){return new BPromise(function(_0x511d53,_0x11c586){return client[_0x49c4('0x9')](_0x69bc41,_0x436234)[_0x49c4('0xa')](function(_0x4487ca){logger['info']('JscriptyProject,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));logger[_0x49c4('0xc')]('JscriptyProject,\x20%s,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'),JSON[_0x49c4('0xd')](_0x4487ca));if(_0x4487ca['error']){if(_0x4487ca['error'][_0x49c4('0xe')]===0x1f4){logger[_0x49c4('0xf')]('JscriptyProject,\x20%s,\x20%s',_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x11c586(_0x4487ca['error'][_0x49c4('0x10')]);}logger[_0x49c4('0xf')](_0x49c4('0x11'),_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x511d53(_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);}else{logger[_0x49c4('0x12')]('JscriptyProject,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));_0x511d53(_0x4487ca[_0x49c4('0x13')][_0x49c4('0x10')]);}})[_0x49c4('0x14')](function(_0x2abc78){logger['error'](_0x49c4('0x11'),_0x2c4e2e,_0x2abc78);_0x11c586(_0x2abc78);});});} \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/index.js b/server/api/jscriptyQuestionReport/index.js index 9eb7b10..a4d1a89 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 _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 +var _0xbe9a=['express','Router','../../components/interaction/service','../../config/environment','./jscriptyQuestionReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout'];(function(_0x3f5dca,_0x59472b){var _0x5b833a=function(_0x1cb84b){while(--_0x1cb84b){_0x3f5dca['push'](_0x3f5dca['shift']());}};_0x5b833a(++_0x59472b);}(_0xbe9a,0x1b4));var _0xabe9=function(_0x3bc5a2,_0x24626d){_0x3bc5a2=_0x3bc5a2-0x0;var _0x1af600=_0xbe9a[_0x3bc5a2];return _0x1af600;};'use strict';var multer=require(_0xabe9('0x0'));var util=require(_0xabe9('0x1'));var path=require(_0xabe9('0x2'));var timeout=require(_0xabe9('0x3'));var express=require(_0xabe9('0x4'));var router=express[_0xabe9('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xabe9('0x6'));var config=require(_0xabe9('0x7'));var controller=require(_0xabe9('0x8'));router[_0xabe9('0x9')]('/',auth[_0xabe9('0xa')](),controller[_0xabe9('0xb')]);router[_0xabe9('0x9')](_0xabe9('0xc'),auth[_0xabe9('0xa')](),controller[_0xabe9('0xd')]);router[_0xabe9('0x9')](_0xabe9('0xe'),auth[_0xabe9('0xa')](),controller[_0xabe9('0xf')]);router[_0xabe9('0x10')]('/',auth[_0xabe9('0xa')](),controller[_0xabe9('0x11')]);router[_0xabe9('0x12')](_0xabe9('0xe'),auth[_0xabe9('0xa')](),controller[_0xabe9('0x13')]);router['delete'](_0xabe9('0xe'),auth[_0xabe9('0xa')](),controller[_0xabe9('0x14')]);module[_0xabe9('0x15')]=router; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js index 01548af..26aa2d8 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(_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 +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x45d55e,_0x2fede3){var _0x29812a=function(_0x3c6830){while(--_0x3c6830){_0x45d55e['push'](_0x45d55e['shift']());}};_0x29812a(++_0x2fede3);}(_0x7a54,0x106));var _0x47a5=function(_0x523764,_0x5c3e6c){_0x523764=_0x523764-0x0;var _0x18f920=_0x7a54[_0x523764];return _0x18f920;};'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 bdb75c6..c80b331 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 _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 +var _0x3a03=['destroy','sendStatus','stack','name','send','index','map','JscriptyQuestionReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','where','filters','merge','VIRTUAL','options','count','includeAll','findAll','rows','catch','show','params','include','find','create','body','describe','rimraf','zip-dir','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','status','end','json','offset','undefined','limit','set','apply','reject','save','update','then'];(function(_0x3732d4,_0x46447d){var _0x155edf=function(_0x546c7f){while(--_0x546c7f){_0x3732d4['push'](_0x3732d4['shift']());}};_0x155edf(++_0x46447d);}(_0x3a03,0x6e));var _0x33a0=function(_0x52e25d,_0x86145e){_0x52e25d=_0x52e25d-0x0;var _0x3762ff=_0x3a03[_0x52e25d];return _0x3762ff;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x33a0('0x0'));var zipdir=require(_0x33a0('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x33a0('0x2'));var moment=require(_0x33a0('0x3'));var BPromise=require(_0x33a0('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x33a0('0x5'));var sox=require(_0x33a0('0x6'));var csv=require(_0x33a0('0x7'));var ejs=require(_0x33a0('0x8'));var fs=require('fs');var fs_extra=require(_0x33a0('0x9'));var _=require('lodash');var squel=require(_0x33a0('0xa'));var crypto=require(_0x33a0('0xb'));var jsforce=require(_0x33a0('0xc'));var deskjs=require(_0x33a0('0xd'));var toCsv=require(_0x33a0('0x7'));var querystring=require(_0x33a0('0xe'));var Papa=require(_0x33a0('0xf'));var Redis=require(_0x33a0('0x10'));var authService=require(_0x33a0('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x33a0('0x12'));var logger=require(_0x33a0('0x13'))('api');var utils=require(_0x33a0('0x14'));var config=require(_0x33a0('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x241ffb,_0x47c875){_0x47c875=_0x47c875||0xcc;return function(_0x7da9b){if(_0x7da9b){return _0x241ffb['sendStatus'](_0x47c875);}return _0x241ffb[_0x33a0('0x16')](_0x47c875)[_0x33a0('0x17')]();};}function respondWithResult(_0x5bfc94,_0x494825){_0x494825=_0x494825||0xc8;return function(_0x321ba9){if(_0x321ba9){return _0x5bfc94[_0x33a0('0x16')](_0x494825)[_0x33a0('0x18')](_0x321ba9);}};}function respondWithFilteredResult(_0x981bff,_0x333e4e){return function(_0x383a08){if(_0x383a08){var _0x165f91=typeof _0x333e4e[_0x33a0('0x19')]==='undefined'&&typeof _0x333e4e['limit']===_0x33a0('0x1a');var _0x4dd415=_0x383a08['count'];var _0x4fb4e7=_0x165f91?0x0:_0x333e4e[_0x33a0('0x19')];var _0x383145=_0x165f91?_0x383a08['count']:_0x333e4e[_0x33a0('0x19')]+_0x333e4e[_0x33a0('0x1b')];var _0x55bd78;if(_0x383145>=_0x4dd415){_0x383145=_0x4dd415;_0x55bd78=0xc8;}else{_0x55bd78=0xce;}_0x981bff['status'](_0x55bd78);return _0x981bff[_0x33a0('0x1c')]('Content-Range',_0x4fb4e7+'-'+_0x383145+'/'+_0x4dd415)[_0x33a0('0x18')](_0x383a08);}return null;};}function patchUpdates(_0x25854f){return function(_0x20bf4c){try{jsonpatch[_0x33a0('0x1d')](_0x20bf4c,_0x25854f,!![]);}catch(_0x1a1d95){return BPromise[_0x33a0('0x1e')](_0x1a1d95);}return _0x20bf4c[_0x33a0('0x1f')]();};}function saveUpdates(_0x1240f7,_0x59b22a){return function(_0x93beb9){if(_0x93beb9){return _0x93beb9[_0x33a0('0x20')](_0x1240f7)[_0x33a0('0x21')](function(_0x148243){return _0x148243;});}return null;};}function removeEntity(_0x27a2bb,_0x28e797){return function(_0x2d1c2d){if(_0x2d1c2d){return _0x2d1c2d[_0x33a0('0x22')]()['then'](function(){_0x27a2bb['status'](0xcc)[_0x33a0('0x17')]();});}};}function handleEntityNotFound(_0x165a9d,_0x3fd9ef){return function(_0xd92d6f){if(!_0xd92d6f){_0x165a9d[_0x33a0('0x23')](0x194);}return _0xd92d6f;};}function handleError(_0x5503dc,_0x3d1250){_0x3d1250=_0x3d1250||0x1f4;return function(_0x434df2){logger['error'](_0x434df2[_0x33a0('0x24')]);if(_0x434df2[_0x33a0('0x25')]){delete _0x434df2['name'];}_0x5503dc[_0x33a0('0x16')](_0x3d1250)[_0x33a0('0x26')](_0x434df2);};}exports[_0x33a0('0x27')]=function(_0x4a66cf,_0x5fe9b4){var _0x24129e={},_0x2911ce={},_0x404ccd={'count':0x0,'rows':[]};var _0xcbe008=_[_0x33a0('0x28')](db[_0x33a0('0x29')][_0x33a0('0x2a')],function(_0x3ba412){return{'name':_0x3ba412[_0x33a0('0x2b')],'type':_0x3ba412[_0x33a0('0x2c')][_0x33a0('0x2d')]};});_0x2911ce[_0x33a0('0x2e')]=_[_0x33a0('0x28')](_0xcbe008,_0x33a0('0x25'));_0x2911ce[_0x33a0('0x2f')]=_[_0x33a0('0x30')](_0x4a66cf[_0x33a0('0x2f')]);_0x2911ce['filters']=_[_0x33a0('0x31')](_0x2911ce[_0x33a0('0x2e')],_0x2911ce[_0x33a0('0x2f')]);_0x24129e[_0x33a0('0x32')]=_['intersection'](_0x2911ce[_0x33a0('0x2e')],qs[_0x33a0('0x33')](_0x4a66cf[_0x33a0('0x2f')][_0x33a0('0x33')]));_0x24129e[_0x33a0('0x32')]=_0x24129e[_0x33a0('0x32')][_0x33a0('0x34')]?_0x24129e[_0x33a0('0x32')]:_0x2911ce[_0x33a0('0x2e')];if(!_0x4a66cf['query'][_0x33a0('0x35')]('nolimit')){_0x24129e[_0x33a0('0x1b')]=qs['limit'](_0x4a66cf['query'][_0x33a0('0x1b')]);_0x24129e[_0x33a0('0x19')]=qs[_0x33a0('0x19')](_0x4a66cf['query'][_0x33a0('0x19')]);}_0x24129e['order']=qs[_0x33a0('0x36')](_0x4a66cf[_0x33a0('0x2f')]['sort']);_0x24129e[_0x33a0('0x37')]=qs[_0x33a0('0x38')](_['pick'](_0x4a66cf['query'],_0x2911ce[_0x33a0('0x38')]),_0xcbe008);if(_0x4a66cf[_0x33a0('0x2f')]['filter']){_0x24129e[_0x33a0('0x37')]=_[_0x33a0('0x39')](_0x24129e['where'],{'$or':_['map'](_0xcbe008,function(_0x58977f){if(_0x58977f[_0x33a0('0x2c')]!==_0x33a0('0x3a')){var _0x5979c6={};_0x5979c6[_0x58977f[_0x33a0('0x25')]]={'$like':'%'+_0x4a66cf[_0x33a0('0x2f')]['filter']+'%'};return _0x5979c6;}})});}_0x24129e=_[_0x33a0('0x39')]({},_0x24129e,_0x4a66cf[_0x33a0('0x3b')]);var _0x167960={'where':_0x24129e[_0x33a0('0x37')]};return db[_0x33a0('0x29')]['count'](_0x167960)['then'](function(_0x380d2d){_0x404ccd[_0x33a0('0x3c')]=_0x380d2d;if(_0x4a66cf[_0x33a0('0x2f')][_0x33a0('0x3d')]){_0x24129e['include']=[{'all':!![]}];}return db[_0x33a0('0x29')][_0x33a0('0x3e')](_0x24129e);})[_0x33a0('0x21')](function(_0x1ccdbf){_0x404ccd[_0x33a0('0x3f')]=_0x1ccdbf;return _0x404ccd;})[_0x33a0('0x21')](respondWithFilteredResult(_0x5fe9b4,_0x24129e))[_0x33a0('0x40')](handleError(_0x5fe9b4,null));};exports[_0x33a0('0x41')]=function(_0x4fe2bc,_0x320faf){var _0x3937fd={'raw':!![],'where':{'id':_0x4fe2bc[_0x33a0('0x42')]['id']}},_0x40cafe={};_0x40cafe[_0x33a0('0x2e')]=_[_0x33a0('0x30')](db[_0x33a0('0x29')][_0x33a0('0x2a')]);_0x40cafe['query']=_[_0x33a0('0x30')](_0x4fe2bc[_0x33a0('0x2f')]);_0x40cafe[_0x33a0('0x38')]=_[_0x33a0('0x31')](_0x40cafe[_0x33a0('0x2e')],_0x40cafe[_0x33a0('0x2f')]);_0x3937fd[_0x33a0('0x32')]=_[_0x33a0('0x31')](_0x40cafe[_0x33a0('0x2e')],qs[_0x33a0('0x33')](_0x4fe2bc[_0x33a0('0x2f')][_0x33a0('0x33')]));_0x3937fd[_0x33a0('0x32')]=_0x3937fd[_0x33a0('0x32')]['length']?_0x3937fd[_0x33a0('0x32')]:_0x40cafe[_0x33a0('0x2e')];if(_0x4fe2bc[_0x33a0('0x2f')][_0x33a0('0x3d')]){_0x3937fd[_0x33a0('0x43')]=[{'all':!![]}];}_0x3937fd=_['merge']({},_0x3937fd,_0x4fe2bc[_0x33a0('0x3b')]);return db[_0x33a0('0x29')][_0x33a0('0x44')](_0x3937fd)[_0x33a0('0x21')](handleEntityNotFound(_0x320faf,null))[_0x33a0('0x21')](respondWithResult(_0x320faf,null))[_0x33a0('0x40')](handleError(_0x320faf,null));};exports[_0x33a0('0x45')]=function(_0x3cf696,_0x49c623){return db['JscriptyQuestionReport'][_0x33a0('0x45')](_0x3cf696['body'],{})[_0x33a0('0x21')](respondWithResult(_0x49c623,0xc9))['catch'](handleError(_0x49c623,null));};exports['update']=function(_0x2bbb12,_0x4676a9){if(_0x2bbb12[_0x33a0('0x46')]['id']){delete _0x2bbb12[_0x33a0('0x46')]['id'];}return db[_0x33a0('0x29')][_0x33a0('0x44')]({'where':{'id':_0x2bbb12[_0x33a0('0x42')]['id']}})[_0x33a0('0x21')](handleEntityNotFound(_0x4676a9,null))['then'](saveUpdates(_0x2bbb12['body'],null))['then'](respondWithResult(_0x4676a9,null))[_0x33a0('0x40')](handleError(_0x4676a9,null));};exports['destroy']=function(_0x3d43c4,_0xb7fb6a){return db[_0x33a0('0x29')][_0x33a0('0x44')]({'where':{'id':_0x3d43c4[_0x33a0('0x42')]['id']}})[_0x33a0('0x21')](handleEntityNotFound(_0xb7fb6a,null))[_0x33a0('0x21')](removeEntity(_0xb7fb6a,null))['catch'](handleError(_0xb7fb6a,null));};exports[_0x33a0('0x47')]=function(_0x494263,_0x2062c4){return db[_0x33a0('0x29')][_0x33a0('0x47')]()[_0x33a0('0x21')](respondWithResult(_0x2062c4,null))[_0x33a0('0x40')](handleError(_0x2062c4,null));}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js index 494ff06..07544ec 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 _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 +var _0xc9eb=['./jscriptyQuestionReport.attributes','exports','define','JscriptyQuestionReport','report_jscripty_questions','lodash','util','../../config/logger','request-promise','rimraf','../../config/environment'];(function(_0x44cb33,_0x19358c){var _0x48336d=function(_0x57004b){while(--_0x57004b){_0x44cb33['push'](_0x44cb33['shift']());}};_0x48336d(++_0x19358c);}(_0xc9eb,0x7e));var _0xbc9e=function(_0x141cdc,_0xa038e9){_0x141cdc=_0x141cdc-0x0;var _0x2d7d88=_0xc9eb[_0x141cdc];return _0x2d7d88;};'use strict';var _=require(_0xbc9e('0x0'));var util=require(_0xbc9e('0x1'));var logger=require(_0xbc9e('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xbc9e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbc9e('0x4'));var config=require(_0xbc9e('0x5'));var attributes=require(_0xbc9e('0x6'));module[_0xbc9e('0x7')]=function(_0x356a62,_0x2a8dde){return _0x356a62[_0xbc9e('0x8')](_0xbc9e('0x9'),attributes,{'tableName':_0xbc9e('0xa'),'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 3244cb4..67b5d76 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 _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 +var _0xea18=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x21988f,_0x3f7096){var _0x4ae937=function(_0x344b4a){while(--_0x344b4a){_0x21988f['push'](_0x21988f['shift']());}};_0x4ae937(++_0x3f7096);}(_0xea18,0x1c9));var _0x8ea1=function(_0x458d69,_0x3edb06){_0x458d69=_0x458d69-0x0;var _0x28049c=_0xea18[_0x458d69];return _0x28049c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x8ea1('0x0'));var rs=require(_0x8ea1('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8ea1('0x2'))['db'];var utils=require(_0x8ea1('0x3'));var logger=require(_0x8ea1('0x4'))(_0x8ea1('0x5'));var config=require(_0x8ea1('0x6'));var jayson=require(_0x8ea1('0x7'));var client=jayson[_0x8ea1('0x8')][_0x8ea1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5a762f,_0x447936,_0x39e48a){return new BPromise(function(_0x238116,_0x5e7413){return client[_0x8ea1('0xa')](_0x5a762f,_0x39e48a)[_0x8ea1('0xb')](function(_0x3473c2){logger[_0x8ea1('0xc')](_0x8ea1('0xd'),_0x447936,_0x8ea1('0xe'));logger[_0x8ea1('0xf')]('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x447936,_0x8ea1('0xe'),JSON['stringify'](_0x3473c2));if(_0x3473c2[_0x8ea1('0x10')]){if(_0x3473c2['error'][_0x8ea1('0x11')]===0x1f4){logger[_0x8ea1('0x10')](_0x8ea1('0xd'),_0x447936,_0x3473c2['error'][_0x8ea1('0x12')]);return _0x5e7413(_0x3473c2[_0x8ea1('0x10')][_0x8ea1('0x12')]);}logger[_0x8ea1('0x10')](_0x8ea1('0xd'),_0x447936,_0x3473c2[_0x8ea1('0x10')][_0x8ea1('0x12')]);return _0x238116(_0x3473c2[_0x8ea1('0x10')][_0x8ea1('0x12')]);}else{logger[_0x8ea1('0xc')](_0x8ea1('0xd'),_0x447936,_0x8ea1('0xe'));_0x238116(_0x3473c2[_0x8ea1('0x13')]['message']);}})[_0x8ea1('0x14')](function(_0x25129c){logger['error'](_0x8ea1('0xd'),_0x447936,_0x25129c);_0x5e7413(_0x25129c);});});} \ No newline at end of file diff --git a/server/api/jscriptySessionReport/index.js b/server/api/jscriptySessionReport/index.js index 6b0942a..444a252 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 _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 +var _0xb7dc=['describe','/:id','/:id/questions','create','put','delete','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptySessionReport.controller','get','isAuthenticated','/describe'];(function(_0x5e7623,_0x5713f2){var _0x2d5120=function(_0x3e9b2a){while(--_0x3e9b2a){_0x5e7623['push'](_0x5e7623['shift']());}};_0x2d5120(++_0x5713f2);}(_0xb7dc,0xa8));var _0xcb7d=function(_0x50f6e0,_0x422356){_0x50f6e0=_0x50f6e0-0x0;var _0x5ebbfb=_0xb7dc[_0x50f6e0];return _0x5ebbfb;};'use strict';var multer=require(_0xcb7d('0x0'));var util=require(_0xcb7d('0x1'));var path=require(_0xcb7d('0x2'));var timeout=require(_0xcb7d('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xcb7d('0x4'));var auth=require(_0xcb7d('0x5'));var interaction=require(_0xcb7d('0x6'));var config=require(_0xcb7d('0x7'));var controller=require(_0xcb7d('0x8'));router[_0xcb7d('0x9')]('/',auth[_0xcb7d('0xa')](),controller['index']);router[_0xcb7d('0x9')](_0xcb7d('0xb'),auth['isAuthenticated'](),controller[_0xcb7d('0xc')]);router['get'](_0xcb7d('0xd'),auth[_0xcb7d('0xa')](),controller['show']);router['get'](_0xcb7d('0xe'),auth['isAuthenticated'](),controller['getQuestions']);router['post']('/',auth['isAuthenticated'](),controller[_0xcb7d('0xf')]);router[_0xcb7d('0x10')](_0xcb7d('0xd'),auth['isAuthenticated'](),controller['update']);router[_0xcb7d('0x11')](_0xcb7d('0xd'),auth[_0xcb7d('0xa')](),controller[_0xcb7d('0x12')]);module[_0xcb7d('0x13')]=router; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js index 246c758..cb44184 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 _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 +var _0x7982=['DATE','setDataValue','starttime','endtime','format','STRING','BOOLEAN','moment','sequelize','exports'];(function(_0x5bf21b,_0x1ec193){var _0x31ffa3=function(_0x4053dd){while(--_0x4053dd){_0x5bf21b['push'](_0x5bf21b['shift']());}};_0x31ffa3(++_0x1ec193);}(_0x7982,0x1f1));var _0x2798=function(_0x42245d,_0x51758f){_0x42245d=_0x42245d-0x0;var _0x4b211a=_0x7982[_0x42245d];return _0x4b211a;};'use strict';var moment=require(_0x2798('0x0'));var Sequelize=require(_0x2798('0x1'));module[_0x2798('0x2')]={'starttime':{'type':Sequelize[_0x2798('0x3')],'set':function(_0xa1afea){this[_0x2798('0x4')](_0x2798('0x5'),_0xa1afea);this[_0x2798('0x4')](_0x2798('0x6'),moment()[_0x2798('0x7')]('YYYY-MM-DD\x20HH:mm:ss'));}},'endtime':{'type':Sequelize[_0x2798('0x3')]},'membername':{'type':Sequelize[_0x2798('0x8')]},'projectname':{'type':Sequelize[_0x2798('0x8')]},'queue':{'type':Sequelize[_0x2798('0x8')]},'uniqueid':{'type':Sequelize[_0x2798('0x8')]},'calleridname':{'type':Sequelize[_0x2798('0x8')]},'calleridnum':{'type':Sequelize[_0x2798('0x8')]},'completed':{'type':Sequelize[_0x2798('0x9')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js index c180e45..f83e289 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 _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 +var _0x1e88=['lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','end','error','stack','name','send','index','map','JscriptySessionReport','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','include','findAll','rows','catch','keys','options','find','create','update','body','params','destroy','describe','getQuestions','findOne','JscriptyQuestionReport','SessionId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra'];(function(_0x367995,_0x129ae2){var _0x22daa8=function(_0x4a2ceb){while(--_0x4a2ceb){_0x367995['push'](_0x367995['shift']());}};_0x22daa8(++_0x129ae2);}(_0x1e88,0x19d));var _0x81e8=function(_0x2c93be,_0x2cc132){_0x2c93be=_0x2c93be-0x0;var _0x2c0ca6=_0x1e88[_0x2c93be];return _0x2c0ca6;};'use strict';var emlformat=require(_0x81e8('0x0'));var rimraf=require(_0x81e8('0x1'));var zipdir=require(_0x81e8('0x2'));var jsonpatch=require(_0x81e8('0x3'));var rp=require(_0x81e8('0x4'));var moment=require(_0x81e8('0x5'));var BPromise=require(_0x81e8('0x6'));var Mustache=require(_0x81e8('0x7'));var util=require('util');var path=require(_0x81e8('0x8'));var sox=require(_0x81e8('0x9'));var csv=require(_0x81e8('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x81e8('0xb'));var _=require(_0x81e8('0xc'));var squel=require(_0x81e8('0xd'));var crypto=require(_0x81e8('0xe'));var jsforce=require(_0x81e8('0xf'));var deskjs=require(_0x81e8('0x10'));var toCsv=require('to-csv');var querystring=require(_0x81e8('0x11'));var Papa=require(_0x81e8('0x12'));var Redis=require(_0x81e8('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x81e8('0x14'));var hardwareService=require(_0x81e8('0x15'));var logger=require(_0x81e8('0x16'))(_0x81e8('0x17'));var utils=require(_0x81e8('0x18'));var config=require(_0x81e8('0x19'));var licenseUtil=require(_0x81e8('0x1a'));var db=require(_0x81e8('0x1b'))['db'];function respondWithStatusCode(_0x59c8d6,_0x2f2429){_0x2f2429=_0x2f2429||0xcc;return function(_0x479788){if(_0x479788){return _0x59c8d6[_0x81e8('0x1c')](_0x2f2429);}return _0x59c8d6[_0x81e8('0x1d')](_0x2f2429)['end']();};}function respondWithResult(_0x286408,_0x2c2ab7){_0x2c2ab7=_0x2c2ab7||0xc8;return function(_0xea9b56){if(_0xea9b56){return _0x286408[_0x81e8('0x1d')](_0x2c2ab7)[_0x81e8('0x1e')](_0xea9b56);}};}function respondWithFilteredResult(_0x35308a,_0x2122ee){return function(_0x31674a){if(_0x31674a){var _0x4881b4=typeof _0x2122ee[_0x81e8('0x1f')]===_0x81e8('0x20')&&typeof _0x2122ee[_0x81e8('0x21')]===_0x81e8('0x20');var _0x7333c2=_0x31674a[_0x81e8('0x22')];var _0x22e1a7=_0x4881b4?0x0:_0x2122ee[_0x81e8('0x1f')];var _0x183984=_0x4881b4?_0x31674a['count']:_0x2122ee['offset']+_0x2122ee[_0x81e8('0x21')];var _0x2985d5;if(_0x183984>=_0x7333c2){_0x183984=_0x7333c2;_0x2985d5=0xc8;}else{_0x2985d5=0xce;}_0x35308a[_0x81e8('0x1d')](_0x2985d5);return _0x35308a[_0x81e8('0x23')](_0x81e8('0x24'),_0x22e1a7+'-'+_0x183984+'/'+_0x7333c2)[_0x81e8('0x1e')](_0x31674a);}return null;};}function patchUpdates(_0x55f099){return function(_0x373bb1){try{jsonpatch[_0x81e8('0x25')](_0x373bb1,_0x55f099,!![]);}catch(_0xa47a75){return BPromise[_0x81e8('0x26')](_0xa47a75);}return _0x373bb1['save']();};}function saveUpdates(_0x1475ea,_0x444ac4){return function(_0x516027){if(_0x516027){return _0x516027['update'](_0x1475ea)[_0x81e8('0x27')](function(_0x45a688){return _0x45a688;});}return null;};}function removeEntity(_0x4c978b,_0x1250b2){return function(_0xc2beb9){if(_0xc2beb9){return _0xc2beb9['destroy']()[_0x81e8('0x27')](function(){_0x4c978b[_0x81e8('0x1d')](0xcc)[_0x81e8('0x28')]();});}};}function handleEntityNotFound(_0x26e674,_0x53a554){return function(_0x35e1ac){if(!_0x35e1ac){_0x26e674[_0x81e8('0x1c')](0x194);}return _0x35e1ac;};}function handleError(_0x45160b,_0x17904b){_0x17904b=_0x17904b||0x1f4;return function(_0x4d46dd){logger[_0x81e8('0x29')](_0x4d46dd[_0x81e8('0x2a')]);if(_0x4d46dd[_0x81e8('0x2b')]){delete _0x4d46dd[_0x81e8('0x2b')];}_0x45160b[_0x81e8('0x1d')](_0x17904b)[_0x81e8('0x2c')](_0x4d46dd);};}exports[_0x81e8('0x2d')]=function(_0x4a7b46,_0x149b57){var _0x3f8ae6={},_0x18932d={},_0x5a2be8={'count':0x0,'rows':[]};var _0x150197=_[_0x81e8('0x2e')](db[_0x81e8('0x2f')][_0x81e8('0x30')],function(_0x84726c){return{'name':_0x84726c['fieldName'],'type':_0x84726c[_0x81e8('0x31')][_0x81e8('0x32')]};});_0x18932d[_0x81e8('0x33')]=_['map'](_0x150197,_0x81e8('0x2b'));_0x18932d[_0x81e8('0x34')]=_['keys'](_0x4a7b46[_0x81e8('0x34')]);_0x18932d[_0x81e8('0x35')]=_[_0x81e8('0x36')](_0x18932d[_0x81e8('0x33')],_0x18932d['query']);_0x3f8ae6[_0x81e8('0x37')]=_[_0x81e8('0x36')](_0x18932d[_0x81e8('0x33')],qs['fields'](_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x38')]));_0x3f8ae6[_0x81e8('0x37')]=_0x3f8ae6['attributes'][_0x81e8('0x39')]?_0x3f8ae6[_0x81e8('0x37')]:_0x18932d[_0x81e8('0x33')];if(!_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x3a')](_0x81e8('0x3b'))){_0x3f8ae6[_0x81e8('0x21')]=qs[_0x81e8('0x21')](_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x21')]);_0x3f8ae6[_0x81e8('0x1f')]=qs[_0x81e8('0x1f')](_0x4a7b46['query'][_0x81e8('0x1f')]);}_0x3f8ae6[_0x81e8('0x3c')]=qs[_0x81e8('0x3d')](_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x3d')]);_0x3f8ae6[_0x81e8('0x3e')]=qs[_0x81e8('0x35')](_[_0x81e8('0x3f')](_0x4a7b46['query'],_0x18932d[_0x81e8('0x35')]),_0x150197);if(_0x4a7b46[_0x81e8('0x34')]['filter']){_0x3f8ae6['where']=_[_0x81e8('0x40')](_0x3f8ae6[_0x81e8('0x3e')],{'$or':_['map'](_0x150197,function(_0x4c6c64){if(_0x4c6c64[_0x81e8('0x31')]!==_0x81e8('0x41')){var _0x4748ff={};_0x4748ff[_0x4c6c64[_0x81e8('0x2b')]]={'$like':'%'+_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x42')]+'%'};return _0x4748ff;}})});}_0x3f8ae6=_[_0x81e8('0x40')]({},_0x3f8ae6,_0x4a7b46['options']);var _0xfa333f={'where':_0x3f8ae6[_0x81e8('0x3e')]};return db[_0x81e8('0x2f')]['count'](_0xfa333f)[_0x81e8('0x27')](function(_0x546b51){_0x5a2be8[_0x81e8('0x22')]=_0x546b51;if(_0x4a7b46[_0x81e8('0x34')][_0x81e8('0x43')]){_0x3f8ae6[_0x81e8('0x44')]=[{'all':!![]}];}return db[_0x81e8('0x2f')][_0x81e8('0x45')](_0x3f8ae6);})[_0x81e8('0x27')](function(_0x1abd40){_0x5a2be8[_0x81e8('0x46')]=_0x1abd40;return _0x5a2be8;})[_0x81e8('0x27')](respondWithFilteredResult(_0x149b57,_0x3f8ae6))[_0x81e8('0x47')](handleError(_0x149b57,null));};exports['show']=function(_0x1c522d,_0x2567b4){var _0x476d5f={'raw':!![],'where':{'id':_0x1c522d['params']['id']}},_0x562efc={};_0x562efc['model']=_[_0x81e8('0x48')](db[_0x81e8('0x2f')][_0x81e8('0x30')]);_0x562efc[_0x81e8('0x34')]=_[_0x81e8('0x48')](_0x1c522d[_0x81e8('0x34')]);_0x562efc['filters']=_[_0x81e8('0x36')](_0x562efc[_0x81e8('0x33')],_0x562efc[_0x81e8('0x34')]);_0x476d5f['attributes']=_[_0x81e8('0x36')](_0x562efc[_0x81e8('0x33')],qs[_0x81e8('0x38')](_0x1c522d[_0x81e8('0x34')][_0x81e8('0x38')]));_0x476d5f['attributes']=_0x476d5f[_0x81e8('0x37')]['length']?_0x476d5f[_0x81e8('0x37')]:_0x562efc['model'];if(_0x1c522d[_0x81e8('0x34')][_0x81e8('0x43')]){_0x476d5f[_0x81e8('0x44')]=[{'all':!![]}];}_0x476d5f=_['merge']({},_0x476d5f,_0x1c522d[_0x81e8('0x49')]);return db[_0x81e8('0x2f')][_0x81e8('0x4a')](_0x476d5f)[_0x81e8('0x27')](handleEntityNotFound(_0x2567b4,null))['then'](respondWithResult(_0x2567b4,null))['catch'](handleError(_0x2567b4,null));};exports[_0x81e8('0x4b')]=function(_0x3ef46d,_0x935d0b){return db[_0x81e8('0x2f')][_0x81e8('0x4b')](_0x3ef46d['body'],{})['then'](respondWithResult(_0x935d0b,0xc9))[_0x81e8('0x47')](handleError(_0x935d0b,null));};exports[_0x81e8('0x4c')]=function(_0x28db64,_0x17d0c8){if(_0x28db64['body']['id']){delete _0x28db64[_0x81e8('0x4d')]['id'];}return db[_0x81e8('0x2f')][_0x81e8('0x4a')]({'where':{'id':_0x28db64[_0x81e8('0x4e')]['id']}})['then'](handleEntityNotFound(_0x17d0c8,null))[_0x81e8('0x27')](saveUpdates(_0x28db64['body'],null))[_0x81e8('0x27')](respondWithResult(_0x17d0c8,null))[_0x81e8('0x47')](handleError(_0x17d0c8,null));};exports[_0x81e8('0x4f')]=function(_0x3e11e8,_0x5400e2){return db[_0x81e8('0x2f')][_0x81e8('0x4a')]({'where':{'id':_0x3e11e8[_0x81e8('0x4e')]['id']}})[_0x81e8('0x27')](handleEntityNotFound(_0x5400e2,null))[_0x81e8('0x27')](removeEntity(_0x5400e2,null))[_0x81e8('0x47')](handleError(_0x5400e2,null));};exports[_0x81e8('0x50')]=function(_0x33f840,_0x2a1682){return db[_0x81e8('0x2f')][_0x81e8('0x50')]()[_0x81e8('0x27')](respondWithResult(_0x2a1682,null))['catch'](handleError(_0x2a1682,null));};exports[_0x81e8('0x51')]=function(_0x26ad64,_0x586dfe,_0x2629ff){var _0x18bf8d={'raw':!![],'where':{}};var _0x102288={};var _0x4347fe={'count':0x0,'rows':[]};return db[_0x81e8('0x2f')][_0x81e8('0x52')]({'where':{'id':_0x26ad64[_0x81e8('0x4e')]['id']}})[_0x81e8('0x27')](handleEntityNotFound(_0x586dfe,null))[_0x81e8('0x27')](function(_0x5b533c){if(_0x5b533c){_0x102288[_0x81e8('0x33')]=_[_0x81e8('0x48')](db[_0x81e8('0x53')][_0x81e8('0x30')]);_0x102288['query']=_[_0x81e8('0x48')](_0x26ad64[_0x81e8('0x34')]);_0x102288[_0x81e8('0x35')]=_['intersection'](_0x102288[_0x81e8('0x33')],_0x102288[_0x81e8('0x34')]);_0x18bf8d[_0x81e8('0x37')]=_['intersection'](_0x102288[_0x81e8('0x33')],qs[_0x81e8('0x38')](_0x26ad64[_0x81e8('0x34')][_0x81e8('0x38')]));_0x18bf8d[_0x81e8('0x37')]=_0x18bf8d[_0x81e8('0x37')][_0x81e8('0x39')]?_0x18bf8d[_0x81e8('0x37')]:_0x102288[_0x81e8('0x33')];if(!_0x26ad64[_0x81e8('0x34')][_0x81e8('0x3a')](_0x81e8('0x3b'))){_0x18bf8d[_0x81e8('0x21')]=qs[_0x81e8('0x21')](_0x26ad64[_0x81e8('0x34')][_0x81e8('0x21')]);_0x18bf8d['offset']=qs[_0x81e8('0x1f')](_0x26ad64['query'][_0x81e8('0x1f')]);}_0x18bf8d['order']=qs[_0x81e8('0x3d')](_0x26ad64[_0x81e8('0x34')][_0x81e8('0x3d')]);_0x18bf8d[_0x81e8('0x3e')]=qs[_0x81e8('0x35')](_['pick'](_0x26ad64[_0x81e8('0x34')],_0x102288[_0x81e8('0x35')]));_0x18bf8d[_0x81e8('0x3e')][_0x81e8('0x54')]=_0x5b533c['id'];if(_0x26ad64[_0x81e8('0x34')][_0x81e8('0x42')]){_0x18bf8d['where']=_['merge'](_0x18bf8d[_0x81e8('0x3e')],{'$or':_[_0x81e8('0x2e')](_0x18bf8d[_0x81e8('0x37')],function(_0xc9a93b){var _0x4a2df5={};_0x4a2df5[_0xc9a93b]={'$like':'%'+_0x26ad64['query'][_0x81e8('0x42')]+'%'};return _0x4a2df5;})});}_0x18bf8d=_[_0x81e8('0x40')]({},_0x18bf8d,_0x26ad64[_0x81e8('0x49')]);return db['JscriptyQuestionReport']['count']({'where':_0x18bf8d[_0x81e8('0x3e')]})[_0x81e8('0x27')](function(_0x3548ad){_0x4347fe['count']=_0x3548ad;if(_0x26ad64[_0x81e8('0x34')][_0x81e8('0x43')]){_0x18bf8d[_0x81e8('0x44')]=[{'all':!![]}];}return db['JscriptyQuestionReport'][_0x81e8('0x45')](_0x18bf8d);})[_0x81e8('0x27')](function(_0x502556){_0x4347fe['rows']=_0x502556;return _0x4347fe;});}})['then'](respondWithFilteredResult(_0x586dfe,_0x18bf8d))['catch'](handleError(_0x586dfe,null));}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.model.js b/server/api/jscriptySessionReport/jscriptySessionReport.model.js index 2509984..8f99038 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 _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 +var _0xbff5=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','exports','define','JscriptySessionReport','report_jscripty_sessions'];(function(_0x4c84b7,_0x205020){var _0x4faef0=function(_0x273983){while(--_0x273983){_0x4c84b7['push'](_0x4c84b7['shift']());}};_0x4faef0(++_0x205020);}(_0xbff5,0x1bc));var _0x5bff=function(_0x36fc4c,_0xdeae79){_0x36fc4c=_0x36fc4c-0x0;var _0x1469fd=_0xbff5[_0x36fc4c];return _0x1469fd;};'use strict';var _=require(_0x5bff('0x0'));var util=require(_0x5bff('0x1'));var logger=require(_0x5bff('0x2'))(_0x5bff('0x3'));var moment=require(_0x5bff('0x4'));var BPromise=require(_0x5bff('0x5'));var rp=require(_0x5bff('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5bff('0x7'));var config=require('../../config/environment');var attributes=require('./jscriptySessionReport.attributes');module[_0x5bff('0x8')]=function(_0x1d8650,_0x151add){return _0x1d8650[_0x5bff('0x9')](_0x5bff('0xa'),attributes,{'tableName':_0x5bff('0xb'),'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 a2fdcce..9045d26 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 _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 +var _0x0adf=['request\x20sent','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','stringify','code','error','JscriptySessionReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info'];(function(_0x5659c0,_0x5f2532){var _0x36e3c0=function(_0x247a5f){while(--_0x247a5f){_0x5659c0['push'](_0x5659c0['shift']());}};_0x36e3c0(++_0x5f2532);}(_0x0adf,0x1d2));var _0xf0ad=function(_0x2d3a75,_0x441324){_0x2d3a75=_0x2d3a75-0x0;var _0x523719=_0x0adf[_0x2d3a75];return _0x523719;};'use strict';var _=require(_0xf0ad('0x0'));var util=require(_0xf0ad('0x1'));var moment=require(_0xf0ad('0x2'));var BPromise=require('bluebird');var rs=require(_0xf0ad('0x3'));var fs=require('fs');var Redis=require(_0xf0ad('0x4'));var db=require(_0xf0ad('0x5'))['db'];var utils=require(_0xf0ad('0x6'));var logger=require(_0xf0ad('0x7'))(_0xf0ad('0x8'));var config=require(_0xf0ad('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf0ad('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2eca0e,_0x44cf37,_0x170574){return new BPromise(function(_0x41c99d,_0xa9a315){return client[_0xf0ad('0xb')](_0x2eca0e,_0x170574)[_0xf0ad('0xc')](function(_0x5bdf69){logger[_0xf0ad('0xd')]('JscriptySessionReport,\x20%s,\x20%s',_0x44cf37,_0xf0ad('0xe'));logger[_0xf0ad('0xf')](_0xf0ad('0x10'),_0x44cf37,_0xf0ad('0xe'),JSON[_0xf0ad('0x11')](_0x5bdf69));if(_0x5bdf69['error']){if(_0x5bdf69['error'][_0xf0ad('0x12')]===0x1f4){logger[_0xf0ad('0x13')](_0xf0ad('0x14'),_0x44cf37,_0x5bdf69[_0xf0ad('0x13')]['message']);return _0xa9a315(_0x5bdf69[_0xf0ad('0x13')][_0xf0ad('0x15')]);}logger['error']('JscriptySessionReport,\x20%s,\x20%s',_0x44cf37,_0x5bdf69['error'][_0xf0ad('0x15')]);return _0x41c99d(_0x5bdf69['error'][_0xf0ad('0x15')]);}else{logger[_0xf0ad('0xd')](_0xf0ad('0x14'),_0x44cf37,_0xf0ad('0xe'));_0x41c99d(_0x5bdf69[_0xf0ad('0x16')]['message']);}})[_0xf0ad('0x17')](function(_0x285ab0){logger[_0xf0ad('0x13')](_0xf0ad('0x14'),_0x44cf37,_0x285ab0);_0xa9a315(_0x285ab0);});});} \ No newline at end of file diff --git a/server/api/license/index.js b/server/api/license/index.js index 3c0d62f..4155b7c 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 _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 +var _0x8cce=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./license.controller','get','index','put','/:id','isAuthenticated','update','exports','multer','util'];(function(_0x314ee0,_0x2c854d){var _0x2c618a=function(_0x7c5729){while(--_0x7c5729){_0x314ee0['push'](_0x314ee0['shift']());}};_0x2c618a(++_0x2c854d);}(_0x8cce,0xee));var _0xe8cc=function(_0x3bc7f3,_0x115923){_0x3bc7f3=_0x3bc7f3-0x0;var _0x2335ff=_0x8cce[_0x3bc7f3];return _0x2335ff;};'use strict';var multer=require(_0xe8cc('0x0'));var util=require(_0xe8cc('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xe8cc('0x2'));var router=express[_0xe8cc('0x3')]();var fs_extra=require(_0xe8cc('0x4'));var auth=require(_0xe8cc('0x5'));var interaction=require(_0xe8cc('0x6'));var config=require(_0xe8cc('0x7'));var controller=require(_0xe8cc('0x8'));router[_0xe8cc('0x9')]('/',controller[_0xe8cc('0xa')]);router[_0xe8cc('0xb')](_0xe8cc('0xc'),auth[_0xe8cc('0xd')](),controller[_0xe8cc('0xe')]);module[_0xe8cc('0xf')]=router; \ No newline at end of file diff --git a/server/api/license/license.attributes.js b/server/api/license/license.attributes.js index 3a55a87..d3899e6 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 _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 +var _0xee31=['sequelize','TEXT','STRING'];(function(_0x2ae174,_0x3f1048){var _0x1b0506=function(_0x14aaf2){while(--_0x14aaf2){_0x2ae174['push'](_0x2ae174['shift']());}};_0x1b0506(++_0x3f1048);}(_0xee31,0x171));var _0x1ee3=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xee31[_0x42cae2];return _0x5f256f;};'use strict';var Sequelize=require(_0x1ee3('0x0'));module['exports']={'license':{'type':Sequelize[_0x1ee3('0x1')]},'data1':{'type':Sequelize['STRING']},'data2':{'type':Sequelize[_0x1ee3('0x2')]},'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 af82a97..2da7bc6 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 _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 +var _0x2ef3=['length','options','then','catch','body','params','get','checkLicense','demo','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','index','model','keys','rawAttributes','query','filters','intersection','attributes','fields'];(function(_0x7b3ebf,_0x58145b){var _0x2a8186=function(_0xa4899c){while(--_0xa4899c){_0x7b3ebf['push'](_0x7b3ebf['shift']());}};_0x2a8186(++_0x58145b);}(_0x2ef3,0xba));var _0x32ef=function(_0x1cc03f,_0x487698){_0x1cc03f=_0x1cc03f-0x0;var _0xb2b834=_0x2ef3[_0x1cc03f];return _0xb2b834;};'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);};}var utilLicense=require('../../config/license/util');exports[_0x32ef('0x29')]=function(_0x2f5d06,_0x5a04cd){var _0x12de1a={'raw':!![],'where':{'id':0x1}},_0x3c569d={};_0x3c569d[_0x32ef('0x2a')]=_[_0x32ef('0x2b')](db['License'][_0x32ef('0x2c')]);_0x3c569d[_0x32ef('0x2d')]=_[_0x32ef('0x2b')](_0x2f5d06[_0x32ef('0x2d')]);_0x3c569d[_0x32ef('0x2e')]=_[_0x32ef('0x2f')](_0x3c569d[_0x32ef('0x2a')],_0x3c569d['query']);_0x12de1a[_0x32ef('0x30')]=_['intersection'](_0x3c569d[_0x32ef('0x2a')],qs[_0x32ef('0x31')](_0x2f5d06['query'][_0x32ef('0x31')]));_0x12de1a[_0x32ef('0x30')]=_0x12de1a[_0x32ef('0x30')][_0x32ef('0x32')]?_0x12de1a[_0x32ef('0x30')]:_0x3c569d['model'];_0x12de1a=_['merge']({},_0x12de1a,_0x2f5d06[_0x32ef('0x33')]);return utilLicense['getLicense'](_0x12de1a)[_0x32ef('0x34')](respondWithResult(_0x5a04cd,null))[_0x32ef('0x35')](handleError(_0x5a04cd,null));};exports[_0x32ef('0x24')]=function(_0x390670,_0x389583){if(_0x390670[_0x32ef('0x36')]['id']){delete _0x390670['body']['id'];}return db['License']['find']({'where':{'id':_0x390670[_0x32ef('0x37')]['id']}})[_0x32ef('0x34')](handleEntityNotFound(_0x389583,null))[_0x32ef('0x34')](function(_0x5f2443){var _0x4fb402=_0x5f2443[_0x32ef('0x38')]({'plain':!![]});return utilLicense[_0x32ef('0x39')](_0x4fb402,_0x390670[_0x32ef('0x36')]['key']);})['then'](function(_0xcbdec8){if(!_0xcbdec8[_0x32ef('0x3a')]){return saveUpdates(_0x390670[_0x32ef('0x36')],null);}return _0xcbdec8;})[_0x32ef('0x34')](respondWithResult(_0x389583,null))[_0x32ef('0x35')](handleError(_0x389583,null));}; \ No newline at end of file diff --git a/server/api/license/license.model.js b/server/api/license/license.model.js index d71af72..f9b55f8 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 _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 +var _0x755b=['license','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./license.attributes','exports','define','License'];(function(_0x1ba874,_0x3d9c8f){var _0x2c7b59=function(_0x16184d){while(--_0x16184d){_0x1ba874['push'](_0x1ba874['shift']());}};_0x2c7b59(++_0x3d9c8f);}(_0x755b,0x15f));var _0xb755=function(_0x4279ce,_0x358d3a){_0x4279ce=_0x4279ce-0x0;var _0x1a354a=_0x755b[_0x4279ce];return _0x1a354a;};'use strict';var _=require(_0xb755('0x0'));var util=require(_0xb755('0x1'));var logger=require(_0xb755('0x2'))(_0xb755('0x3'));var moment=require('moment');var BPromise=require(_0xb755('0x4'));var rp=require(_0xb755('0x5'));var fs=require('fs');var path=require(_0xb755('0x6'));var rimraf=require(_0xb755('0x7'));var config=require(_0xb755('0x8'));var attributes=require(_0xb755('0x9'));module[_0xb755('0xa')]=function(_0x4698ff,_0x234094){return _0x4698ff[_0xb755('0xb')](_0xb755('0xc'),attributes,{'tableName':_0xb755('0xd'),'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 9a7eb46..8df46ba 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 _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 +var _0xa4bf=['message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','then','info','License,\x20%s,\x20%s','request\x20sent','License,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x18fb16,_0x45edbc){var _0x147b0d=function(_0x5b1b00){while(--_0x5b1b00){_0x18fb16['push'](_0x18fb16['shift']());}};_0x147b0d(++_0x45edbc);}(_0xa4bf,0xde));var _0xfa4b=function(_0x40686f,_0x3f24bf){_0x40686f=_0x40686f-0x0;var _0x53b21c=_0xa4bf[_0x40686f];return _0x53b21c;};'use strict';var _=require(_0xfa4b('0x0'));var util=require(_0xfa4b('0x1'));var moment=require(_0xfa4b('0x2'));var BPromise=require(_0xfa4b('0x3'));var rs=require(_0xfa4b('0x4'));var fs=require('fs');var Redis=require(_0xfa4b('0x5'));var db=require(_0xfa4b('0x6'))['db'];var utils=require(_0xfa4b('0x7'));var logger=require('../../config/logger')(_0xfa4b('0x8'));var config=require('../../config/environment');var jayson=require(_0xfa4b('0x9'));var client=jayson[_0xfa4b('0xa')][_0xfa4b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3732b0,_0x542764,_0x4a48a6){return new BPromise(function(_0x28d8d5,_0x58677a){return client['request'](_0x3732b0,_0x4a48a6)[_0xfa4b('0xc')](function(_0x324991){logger[_0xfa4b('0xd')](_0xfa4b('0xe'),_0x542764,_0xfa4b('0xf'));logger['debug'](_0xfa4b('0x10'),_0x542764,_0xfa4b('0xf'),JSON[_0xfa4b('0x11')](_0x324991));if(_0x324991[_0xfa4b('0x12')]){if(_0x324991['error'][_0xfa4b('0x13')]===0x1f4){logger[_0xfa4b('0x12')](_0xfa4b('0xe'),_0x542764,_0x324991[_0xfa4b('0x12')][_0xfa4b('0x14')]);return _0x58677a(_0x324991[_0xfa4b('0x12')][_0xfa4b('0x14')]);}logger[_0xfa4b('0x12')](_0xfa4b('0xe'),_0x542764,_0x324991[_0xfa4b('0x12')][_0xfa4b('0x14')]);return _0x28d8d5(_0x324991[_0xfa4b('0x12')][_0xfa4b('0x14')]);}else{logger[_0xfa4b('0xd')](_0xfa4b('0xe'),_0x542764,_0xfa4b('0xf'));_0x28d8d5(_0x324991[_0xfa4b('0x15')][_0xfa4b('0x14')]);}})['catch'](function(_0x4bc6b2){logger[_0xfa4b('0x12')](_0xfa4b('0xe'),_0x542764,_0x4bc6b2);_0x58677a(_0x4bc6b2);});});} \ No newline at end of file diff --git a/server/api/mailAccount/index.js b/server/api/mailAccount/index.js index b3237c3..e6e8820 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 _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 +var _0xa4de=['util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','/describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','/:id/applications','/:id/messages','getMessages','/:id/verify','verifySmtp','getAgents','post','addDisposition','addAnswer','create','addImap','/:id/out_servers','addSmtp','/:id/interactions','addInteraction','addApplications','/:id/send','send','/:id/users','addAgents','put','delete','removeDispositions','removeAnswers','removeImap','removeSmtp','destroy','removeAgents','exports','multer'];(function(_0x2df724,_0x411382){var _0x1b2504=function(_0x1d3cd1){while(--_0x1d3cd1){_0x2df724['push'](_0x2df724['shift']());}};_0x1b2504(++_0x411382);}(_0xa4de,0xf4));var _0xea4d=function(_0x4be9db,_0x4b2c1b){_0x4be9db=_0x4be9db-0x0;var _0x20f265=_0xa4de[_0x4be9db];return _0x20f265;};'use strict';var multer=require(_0xea4d('0x0'));var util=require(_0xea4d('0x1'));var path=require('path');var timeout=require(_0xea4d('0x2'));var express=require(_0xea4d('0x3'));var router=express[_0xea4d('0x4')]();var fs_extra=require(_0xea4d('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xea4d('0x6'));var config=require(_0xea4d('0x7'));var controller=require(_0xea4d('0x8'));router[_0xea4d('0x9')]('/',auth[_0xea4d('0xa')](),controller['index']);router[_0xea4d('0x9')](_0xea4d('0xb'),auth[_0xea4d('0xa')](),controller['describe']);router[_0xea4d('0x9')](_0xea4d('0xc'),auth['isAuthenticated'](),controller[_0xea4d('0xd')]);router[_0xea4d('0x9')](_0xea4d('0xe'),auth[_0xea4d('0xa')](),controller[_0xea4d('0xf')]);router[_0xea4d('0x9')](_0xea4d('0x10'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x11')]);router[_0xea4d('0x9')](_0xea4d('0x12'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x13')]);router[_0xea4d('0x9')]('/:id/out_servers',auth[_0xea4d('0xa')](),controller['getSmtp']);router[_0xea4d('0x9')]('/:id/interactions',auth[_0xea4d('0xa')](),controller['getInteractions']);router['get'](_0xea4d('0x14'),auth['isAuthenticated'](),controller['getApplications']);router[_0xea4d('0x9')](_0xea4d('0x15'),auth['isAuthenticated'](),controller[_0xea4d('0x16')]);router['get'](_0xea4d('0x17'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x18')]);router[_0xea4d('0x9')]('/:id/users',auth[_0xea4d('0xa')](),controller[_0xea4d('0x19')]);router[_0xea4d('0x1a')](_0xea4d('0xe'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x1b')]);router[_0xea4d('0x1a')]('/:id/canned_answers',auth[_0xea4d('0xa')](),controller[_0xea4d('0x1c')]);router[_0xea4d('0x1a')]('/',auth[_0xea4d('0xa')](),controller[_0xea4d('0x1d')]);router['post'](_0xea4d('0x12'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x1e')]);router[_0xea4d('0x1a')](_0xea4d('0x1f'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x20')]);router['post'](_0xea4d('0x21'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x22')]);router[_0xea4d('0x1a')](_0xea4d('0x14'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x23')]);router[_0xea4d('0x1a')](_0xea4d('0x24'),auth['isAuthenticated'](),controller[_0xea4d('0x25')]);router['post'](_0xea4d('0x26'),auth['isAuthenticated'](),controller[_0xea4d('0x27')]);router[_0xea4d('0x28')](_0xea4d('0xc'),auth[_0xea4d('0xa')](),controller['update']);router[_0xea4d('0x29')](_0xea4d('0xe'),auth['isAuthenticated'](),controller[_0xea4d('0x2a')]);router[_0xea4d('0x29')](_0xea4d('0x10'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x2b')]);router['delete']('/:id/in_servers',auth['isAuthenticated'](),controller[_0xea4d('0x2c')]);router['delete'](_0xea4d('0x1f'),auth['isAuthenticated'](),controller[_0xea4d('0x2d')]);router[_0xea4d('0x29')](_0xea4d('0xc'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x2e')]);router[_0xea4d('0x29')](_0xea4d('0x26'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x2f')]);module[_0xea4d('0x30')]=router; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.attributes.js b/server/api/mailAccount/mailAccount.attributes.js index 3ff0392..fb97a38 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 _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 +var _0x1cc7=['TEXT','INTEGER','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}
Subject\x20:\x20{{message.subject}}','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','STRING','BOOLEAN'];(function(_0x53ecfd,_0xeaa79c){var _0x464ed6=function(_0x1ef0fe){while(--_0x1ef0fe){_0x53ecfd['push'](_0x53ecfd['shift']());}};_0x464ed6(++_0xeaa79c);}(_0x1cc7,0x15a));var _0x71cc=function(_0x202144,_0x1fef33){_0x202144=_0x202144-0x0;var _0x566258=_0x1cc7[_0x202144];return _0x566258;};'use strict';var Sequelize=require(_0x71cc('0x0'));module[_0x71cc('0x1')]={'description':{'type':Sequelize[_0x71cc('0x2')]},'name':{'type':Sequelize['STRING'],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x71cc('0x3')],'defaultValue':!![]},'key':{'type':Sequelize[_0x71cc('0x2')],'allowNull':![]},'template':{'type':Sequelize[_0x71cc('0x4')]},'markAsUnread':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fontFamily':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'Arial,Helvetica,sans-serif'},'fontSize':{'type':Sequelize[_0x71cc('0x5')](0x2)['UNSIGNED'],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x71cc('0x4')],'defaultValue':function(){return _0x71cc('0x6');}},'notificationSound':{'type':Sequelize[_0x71cc('0x3')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x71cc('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x71cc('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x71cc('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x71cc('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x71cc('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0xeb4747){if(!_0xeb4747)this[_0x71cc('0x7')](_0x71cc('0x8'),null);this['setDataValue'](_0x71cc('0x9'),_0xeb4747);}}}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.controller.js b/server/api/mailAccount/mailAccount.controller.js index 4f232d2..6480cc3 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 _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 +var _0x0bde=['split','format','YYYY-MM-DD\x20HH:mm:ss','true','send','CmList','Contacts','updatedAt','DESC','from','email','attachments','join','server/files/attachments','service','pass','secure','auth','SendMail','List\x20not\x20found','List','messageId','subject','attach','out','Interaction','VerifySmtp','verifySmtp','Sequelize','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','omit','spread','emit','userMailAccount:save','removeAgents','isArray','userMailAccount:remove','getAgents','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','html-to-text','juice','ioredis','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./mailAccount.socket','register','jayson/promise','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','end','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','destroy','get','MailAccounts','UserProfileResource','name','index','Imap','MailServerOut','Pause','mandatoryDispositionPause','map','MailAccount','rawAttributes','type','key','model','filters','intersection','query','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','include','findAll','rows','show','params','Smtp','keys','includeAll','find','update','body','MailServerIn','describe','addDisposition','MailAccountId','Disposition','findOne','removeDispositions','ids','addAnswer','CannedAnswer','create','getAnswers','removeAnswers','ListId','active','description','isNil','cservice','cauthentication','user','cuser','password','cpassword','authentication','host','port','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','addImap','removeImap','getSmtp','MailInteraction','addInteraction','getInteractions','CmContact','User','Owner','fullname','internal','Tag','Tags','color','tag','addApplications','sequelize','MailApplication','bulkCreate','findAndCountAll','priority','getApplications','getMessages','MailMessage','$gte'];(function(_0x588448,_0x1c3c43){var _0x537b07=function(_0x5095bf){while(--_0x5095bf){_0x588448['push'](_0x588448['shift']());}};_0x537b07(++_0x1c3c43);}(_0x0bde,0xe7));var _0xe0bd=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0bde[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe0bd('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe0bd('0x1'));var rp=require(_0xe0bd('0x2'));var moment=require(_0xe0bd('0x3'));var BPromise=require(_0xe0bd('0x4'));var Mustache=require(_0xe0bd('0x5'));var util=require('util');var path=require(_0xe0bd('0x6'));var sox=require(_0xe0bd('0x7'));var csv=require(_0xe0bd('0x8'));var ejs=require(_0xe0bd('0x9'));var fs=require('fs');var fs_extra=require(_0xe0bd('0xa'));var _=require(_0xe0bd('0xb'));var squel=require(_0xe0bd('0xc'));var crypto=require('crypto');var jsforce=require(_0xe0bd('0xd'));var deskjs=require(_0xe0bd('0xe'));var toCsv=require(_0xe0bd('0x8'));var querystring=require(_0xe0bd('0xf'));var Papa=require(_0xe0bd('0x10'));var htmlToText=require(_0xe0bd('0x11'));var juice=require(_0xe0bd('0x12'));var Redis=require(_0xe0bd('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe0bd('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0xe0bd('0x15'));var config=require(_0xe0bd('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xe0bd('0x17'))['db'];config['redis']=_[_0xe0bd('0x18')](config[_0xe0bd('0x19')],{'host':_0xe0bd('0x1a'),'port':0x18eb});var socket=require(_0xe0bd('0x1b'))(new Redis(config[_0xe0bd('0x19')]));require(_0xe0bd('0x1c'))[_0xe0bd('0x1d')](socket);var jayson=require(_0xe0bd('0x1e'));var client=jayson['client']['http']({'port':0x232b});function respondWithRpcPromise(_0x4fb006,_0x2ff887,_0x8179fb,_0x2cd832){return new BPromise(function(_0x379ea2,_0x464958){var _0x55f304=_0x2cd832||client;return _0x55f304['request'](_0x4fb006,_0x8179fb)[_0xe0bd('0x1f')](function(_0x4ac920){logger[_0xe0bd('0x20')](_0xe0bd('0x21'),_0x2ff887,_0xe0bd('0x22'));logger[_0xe0bd('0x23')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x2ff887,_0xe0bd('0x22'),JSON[_0xe0bd('0x24')](_0x4ac920));if(_0x4ac920[_0xe0bd('0x25')]){if(_0x4ac920['error'][_0xe0bd('0x26')]===0x1f4){logger[_0xe0bd('0x25')](_0xe0bd('0x21'),_0x2ff887,_0x4ac920['error'][_0xe0bd('0x27')]);return _0x464958(_0x4ac920[_0xe0bd('0x25')][_0xe0bd('0x27')]);}logger['error'](_0xe0bd('0x21'),_0x2ff887,_0x4ac920['error'][_0xe0bd('0x27')]);return _0x379ea2(_0x4ac920[_0xe0bd('0x25')]['message']);}else{logger[_0xe0bd('0x20')](_0xe0bd('0x21'),_0x2ff887,_0xe0bd('0x22'));_0x379ea2(_0x4ac920[_0xe0bd('0x28')][_0xe0bd('0x27')]);}})[_0xe0bd('0x29')](function(_0x2096a2){logger[_0xe0bd('0x25')]('MailAccount,\x20%s,\x20%s',_0x2ff887,_0x2096a2);_0x464958(_0x2096a2);});});}function respondWithStatusCode(_0x54e38d,_0x275f14){_0x275f14=_0x275f14||0xcc;return function(_0x39c98e){if(_0x39c98e){return _0x54e38d['sendStatus'](_0x275f14);}return _0x54e38d['status'](_0x275f14)[_0xe0bd('0x2a')]();};}function respondWithResult(_0x303f9d,_0x403f37){_0x403f37=_0x403f37||0xc8;return function(_0x1b5861){if(_0x1b5861){return _0x303f9d['status'](_0x403f37)[_0xe0bd('0x2b')](_0x1b5861);}};}function respondWithFilteredResult(_0x4ef39b,_0x9146fe){return function(_0x170874){if(_0x170874){var _0x42bea7=typeof _0x9146fe[_0xe0bd('0x2c')]===_0xe0bd('0x2d')&&typeof _0x9146fe[_0xe0bd('0x2e')]===_0xe0bd('0x2d');var _0x2d31e9=_0x170874[_0xe0bd('0x2f')];var _0x36e0f7=_0x42bea7?0x0:_0x9146fe[_0xe0bd('0x2c')];var _0x12d506=_0x42bea7?_0x170874[_0xe0bd('0x2f')]:_0x9146fe['offset']+_0x9146fe[_0xe0bd('0x2e')];var _0x32acd0;if(_0x12d506>=_0x2d31e9){_0x12d506=_0x2d31e9;_0x32acd0=0xc8;}else{_0x32acd0=0xce;}_0x4ef39b[_0xe0bd('0x30')](_0x32acd0);return _0x4ef39b[_0xe0bd('0x31')](_0xe0bd('0x32'),_0x36e0f7+'-'+_0x12d506+'/'+_0x2d31e9)[_0xe0bd('0x2b')](_0x170874);}return null;};}function patchUpdates(_0x56b770){return function(_0x507c7a){try{jsonpatch[_0xe0bd('0x33')](_0x507c7a,_0x56b770,!![]);}catch(_0x324795){return BPromise[_0xe0bd('0x34')](_0x324795);}return _0x507c7a[_0xe0bd('0x35')]();};}function saveUpdates(_0x371451,_0x249bd2){return function(_0x457727){if(_0x457727){return _0x457727['update'](_0x371451)[_0xe0bd('0x1f')](function(_0x429e19){return _0x429e19;});}return null;};}function removeEntity(_0x355697,_0x4391de){return function(_0x320352){if(_0x320352){return _0x320352[_0xe0bd('0x36')]()['then'](function(){var _0xd82ced=_0x320352[_0xe0bd('0x37')]({'plain':!![]});var _0x24b857=_0xe0bd('0x38');return db[_0xe0bd('0x39')]['destroy']({'where':{'type':_0x24b857,'resourceId':_0xd82ced['id']}})['then'](function(){return _0x320352;});})[_0xe0bd('0x1f')](function(){_0x355697[_0xe0bd('0x30')](0xcc)[_0xe0bd('0x2a')]();});}};}function handleEntityNotFound(_0x568e46,_0x8a331){return function(_0x4eefae){if(!_0x4eefae){_0x568e46['sendStatus'](0x194);}return _0x4eefae;};}function handleError(_0x670469,_0x124d47){_0x124d47=_0x124d47||0x1f4;return function(_0x4d8695){logger['error'](_0x4d8695['stack']);if(_0x4d8695[_0xe0bd('0x3a')]){delete _0x4d8695[_0xe0bd('0x3a')];}_0x670469[_0xe0bd('0x30')](_0x124d47)['send'](_0x4d8695);};}exports[_0xe0bd('0x3b')]=function(_0x2b4814,_0x1e6823){var _0x47feb4={'include':[{'model':db['MailServerIn'],'as':_0xe0bd('0x3c')},{'model':db[_0xe0bd('0x3d')],'as':'Smtp'},{'model':db[_0xe0bd('0x3e')],'as':_0xe0bd('0x3f')}]},_0x5b9c9f={},_0x307cfa={'count':0x0,'rows':[]};var _0x194915=_[_0xe0bd('0x40')](db[_0xe0bd('0x41')][_0xe0bd('0x42')],function(_0x39501e){return{'name':_0x39501e['fieldName'],'type':_0x39501e[_0xe0bd('0x43')][_0xe0bd('0x44')]};});_0x5b9c9f[_0xe0bd('0x45')]=_[_0xe0bd('0x40')](_0x194915,_0xe0bd('0x3a'));_0x5b9c9f['query']=_['keys'](_0x2b4814['query']);_0x5b9c9f[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x5b9c9f[_0xe0bd('0x45')],_0x5b9c9f[_0xe0bd('0x48')]);_0x47feb4['attributes']=_['intersection'](_0x5b9c9f[_0xe0bd('0x45')],qs[_0xe0bd('0x49')](_0x2b4814[_0xe0bd('0x48')][_0xe0bd('0x49')]));_0x47feb4[_0xe0bd('0x4a')]=_0x47feb4[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x47feb4['attributes']:_0x5b9c9f[_0xe0bd('0x45')];if(!_0x2b4814['query'][_0xe0bd('0x4c')](_0xe0bd('0x4d'))){_0x47feb4['limit']=qs['limit'](_0x2b4814[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0x47feb4[_0xe0bd('0x2c')]=qs[_0xe0bd('0x2c')](_0x2b4814[_0xe0bd('0x48')][_0xe0bd('0x2c')]);}_0x47feb4[_0xe0bd('0x4e')]=qs[_0xe0bd('0x4f')](_0x2b4814[_0xe0bd('0x48')]['sort']);_0x47feb4[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_[_0xe0bd('0x51')](_0x2b4814['query'],_0x5b9c9f[_0xe0bd('0x46')]),_0x194915);if(_0x2b4814[_0xe0bd('0x48')]['filter']){_0x47feb4[_0xe0bd('0x50')]=_[_0xe0bd('0x52')](_0x47feb4['where'],{'$or':_[_0xe0bd('0x40')](_0x194915,function(_0x45ed55){if(_0x45ed55[_0xe0bd('0x43')]!=='VIRTUAL'){var _0x4bbc16={};_0x4bbc16[_0x45ed55[_0xe0bd('0x3a')]]={'$like':'%'+_0x2b4814[_0xe0bd('0x48')][_0xe0bd('0x53')]+'%'};return _0x4bbc16;}})});}_0x47feb4=_[_0xe0bd('0x52')]({},_0x47feb4,_0x2b4814[_0xe0bd('0x54')]);var _0x38f17e={'where':_0x47feb4[_0xe0bd('0x50')]};return db[_0xe0bd('0x41')]['count'](_0x38f17e)['then'](function(_0x49c5fb){_0x307cfa[_0xe0bd('0x2f')]=_0x49c5fb;if(_0x2b4814[_0xe0bd('0x48')]['includeAll']){_0x47feb4[_0xe0bd('0x55')]=[{'all':!![]}];}return db[_0xe0bd('0x41')][_0xe0bd('0x56')](_0x47feb4);})[_0xe0bd('0x1f')](function(_0x2f19ec){_0x307cfa[_0xe0bd('0x57')]=_0x2f19ec;return _0x307cfa;})[_0xe0bd('0x1f')](respondWithFilteredResult(_0x1e6823,_0x47feb4))[_0xe0bd('0x29')](handleError(_0x1e6823,null));};exports[_0xe0bd('0x58')]=function(_0x2631f5,_0x503939){var _0x392bef={'raw':![],'where':{'id':_0x2631f5[_0xe0bd('0x59')]['id']},'include':[{'model':db['MailServerIn'],'as':_0xe0bd('0x3c')},{'model':db[_0xe0bd('0x3d')],'as':_0xe0bd('0x5a')},{'model':db[_0xe0bd('0x3e')],'as':_0xe0bd('0x3f')}]},_0x7993df={};_0x7993df[_0xe0bd('0x45')]=_[_0xe0bd('0x5b')](db[_0xe0bd('0x41')][_0xe0bd('0x42')]);_0x7993df['query']=_[_0xe0bd('0x5b')](_0x2631f5[_0xe0bd('0x48')]);_0x7993df[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x7993df['model'],_0x7993df[_0xe0bd('0x48')]);_0x392bef[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x7993df['model'],qs['fields'](_0x2631f5[_0xe0bd('0x48')][_0xe0bd('0x49')]));_0x392bef['attributes']=_0x392bef[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x392bef[_0xe0bd('0x4a')]:_0x7993df[_0xe0bd('0x45')];if(_0x2631f5['query'][_0xe0bd('0x5c')]){_0x392bef[_0xe0bd('0x55')]=[{'all':!![]}];}_0x392bef=_[_0xe0bd('0x52')]({},_0x392bef,_0x2631f5[_0xe0bd('0x54')]);return db[_0xe0bd('0x41')][_0xe0bd('0x5d')](_0x392bef)[_0xe0bd('0x1f')](handleEntityNotFound(_0x503939,null))['then'](respondWithResult(_0x503939,null))[_0xe0bd('0x29')](handleError(_0x503939,null));};exports[_0xe0bd('0x5e')]=function(_0xb0b8eb,_0x218a17){if(_0xb0b8eb[_0xe0bd('0x5f')]['id']){delete _0xb0b8eb[_0xe0bd('0x5f')]['id'];}return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0xb0b8eb[_0xe0bd('0x59')]['id']},'include':[{'model':db[_0xe0bd('0x60')],'as':_0xe0bd('0x3c')},{'model':db[_0xe0bd('0x3d')],'as':_0xe0bd('0x5a')},{'model':db[_0xe0bd('0x3e')],'as':_0xe0bd('0x3f')}]})[_0xe0bd('0x1f')](handleEntityNotFound(_0x218a17,null))[_0xe0bd('0x1f')](saveUpdates(_0xb0b8eb[_0xe0bd('0x5f')],null))[_0xe0bd('0x1f')](function(_0x8e61d6){if(_0x8e61d6&&_0xb0b8eb[_0xe0bd('0x5f')][_0xe0bd('0x3c')]){return db[_0xe0bd('0x60')]['update'](_0xb0b8eb['body'][_0xe0bd('0x3c')],{'where':{'MailAccountId':_0x8e61d6['id']}})[_0xe0bd('0x1f')](function(){return _0x8e61d6;});}return _0x8e61d6;})[_0xe0bd('0x1f')](function(_0x58df12){if(_0x58df12&&_0xb0b8eb['body']['Smtp']){return db[_0xe0bd('0x3d')][_0xe0bd('0x5e')](_0xb0b8eb['body'][_0xe0bd('0x5a')],{'where':{'MailAccountId':_0x58df12['id']}})['then'](function(){return _0x58df12;});}return _0x58df12;})[_0xe0bd('0x1f')](respondWithResult(_0x218a17,null))[_0xe0bd('0x29')](handleError(_0x218a17,null));};exports[_0xe0bd('0x61')]=function(_0x57bdee,_0x50d740){return db['MailAccount'][_0xe0bd('0x61')]()[_0xe0bd('0x1f')](respondWithResult(_0x50d740,null))[_0xe0bd('0x29')](handleError(_0x50d740,null));};exports[_0xe0bd('0x62')]=function(_0x3f3ee0,_0x371557,_0x4d49ad){if(_0x3f3ee0[_0xe0bd('0x5f')]['id']){delete _0x3f3ee0[_0xe0bd('0x5f')]['id'];}return db['MailAccount'][_0xe0bd('0x5d')]({'where':{'id':_0x3f3ee0[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x371557,null))[_0xe0bd('0x1f')](function(_0x18c16b){if(_0x18c16b){_0x3f3ee0[_0xe0bd('0x5f')][_0xe0bd('0x63')]=_0x18c16b['id'];return db[_0xe0bd('0x64')]['create'](_0x3f3ee0[_0xe0bd('0x5f')]);}})[_0xe0bd('0x1f')](respondWithResult(_0x371557,null))[_0xe0bd('0x29')](handleError(_0x371557,null));};exports['getDispositions']=function(_0x34bf6b,_0x26d673,_0xa63133){var _0x4c7b03={'raw':![],'where':{}};var _0x5f238f={};var _0x305870={'count':0x0,'rows':[]};return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0x34bf6b['params']['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x26d673,null))[_0xe0bd('0x1f')](function(_0x29bbde){if(_0x29bbde){_0x5f238f['model']=_[_0xe0bd('0x5b')](db['Disposition']['rawAttributes']);_0x5f238f['query']=_[_0xe0bd('0x5b')](_0x34bf6b[_0xe0bd('0x48')]);_0x5f238f[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x5f238f['model'],_0x5f238f['query']);_0x4c7b03[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x5f238f[_0xe0bd('0x45')],qs[_0xe0bd('0x49')](_0x34bf6b[_0xe0bd('0x48')][_0xe0bd('0x49')]));_0x4c7b03[_0xe0bd('0x4a')]=_0x4c7b03[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x4c7b03[_0xe0bd('0x4a')]:_0x5f238f['model'];if(!_0x34bf6b[_0xe0bd('0x48')]['hasOwnProperty'](_0xe0bd('0x4d'))){_0x4c7b03[_0xe0bd('0x2e')]=qs[_0xe0bd('0x2e')](_0x34bf6b[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0x4c7b03[_0xe0bd('0x2c')]=qs[_0xe0bd('0x2c')](_0x34bf6b['query'][_0xe0bd('0x2c')]);}_0x4c7b03[_0xe0bd('0x4e')]=qs['sort'](_0x34bf6b[_0xe0bd('0x48')][_0xe0bd('0x4f')]);_0x4c7b03[_0xe0bd('0x50')]=qs['filters'](_['pick'](_0x34bf6b[_0xe0bd('0x48')],_0x5f238f[_0xe0bd('0x46')]));_0x4c7b03['where'][_0xe0bd('0x63')]=_0x29bbde['id'];if(_0x34bf6b[_0xe0bd('0x48')]['filter']){_0x4c7b03['where']=_[_0xe0bd('0x52')](_0x4c7b03[_0xe0bd('0x50')],{'$or':_[_0xe0bd('0x40')](_0x4c7b03[_0xe0bd('0x4a')],function(_0x4e3815){var _0x2a1c72={};_0x2a1c72[_0x4e3815]={'$like':'%'+_0x34bf6b['query'][_0xe0bd('0x53')]+'%'};return _0x2a1c72;})});}_0x4c7b03=_[_0xe0bd('0x52')]({},_0x4c7b03,_0x34bf6b[_0xe0bd('0x54')]);return db[_0xe0bd('0x64')][_0xe0bd('0x2f')]({'where':_0x4c7b03[_0xe0bd('0x50')]})[_0xe0bd('0x1f')](function(_0x38e44f){_0x305870[_0xe0bd('0x2f')]=_0x38e44f;if(_0x34bf6b[_0xe0bd('0x48')]['includeAll']){_0x4c7b03[_0xe0bd('0x55')]=[{'all':!![]}];}return db[_0xe0bd('0x64')][_0xe0bd('0x56')](_0x4c7b03);})['then'](function(_0x37240f){_0x305870[_0xe0bd('0x57')]=_0x37240f;return _0x305870;});}})[_0xe0bd('0x1f')](respondWithFilteredResult(_0x26d673,_0x4c7b03))[_0xe0bd('0x29')](handleError(_0x26d673,null));};exports[_0xe0bd('0x66')]=function(_0xd263f7,_0x582a57,_0x46b629){return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0xd263f7[_0xe0bd('0x59')]['id']}})['then'](handleEntityNotFound(_0x582a57,null))[_0xe0bd('0x1f')](function(_0x44b6bd){if(_0x44b6bd){return _0x44b6bd[_0xe0bd('0x66')](_0xd263f7[_0xe0bd('0x48')][_0xe0bd('0x67')]);}})['then'](respondWithStatusCode(_0x582a57,null))[_0xe0bd('0x29')](handleError(_0x582a57,null));};exports[_0xe0bd('0x68')]=function(_0x3a1131,_0x2c9827,_0xf43f30){if(_0x3a1131[_0xe0bd('0x5f')]['id']){delete _0x3a1131[_0xe0bd('0x5f')]['id'];}return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x3a1131[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x2c9827,null))[_0xe0bd('0x1f')](function(_0x19761b){if(_0x19761b){_0x3a1131[_0xe0bd('0x5f')][_0xe0bd('0x63')]=_0x19761b['id'];return db[_0xe0bd('0x69')][_0xe0bd('0x6a')](_0x3a1131[_0xe0bd('0x5f')]);}})['then'](respondWithResult(_0x2c9827,null))[_0xe0bd('0x29')](handleError(_0x2c9827,null));};exports[_0xe0bd('0x6b')]=function(_0x30953c,_0x52287d,_0x2782de){var _0x1ae29c={'raw':![],'where':{}};var _0x2f5176={};var _0x44eb60={'count':0x0,'rows':[]};return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0x30953c[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x52287d,null))[_0xe0bd('0x1f')](function(_0x531f39){if(_0x531f39){_0x2f5176['model']=_['keys'](db[_0xe0bd('0x69')][_0xe0bd('0x42')]);_0x2f5176[_0xe0bd('0x48')]=_['keys'](_0x30953c[_0xe0bd('0x48')]);_0x2f5176[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x2f5176[_0xe0bd('0x45')],_0x2f5176[_0xe0bd('0x48')]);_0x1ae29c[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x2f5176[_0xe0bd('0x45')],qs[_0xe0bd('0x49')](_0x30953c[_0xe0bd('0x48')]['fields']));_0x1ae29c['attributes']=_0x1ae29c[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x1ae29c[_0xe0bd('0x4a')]:_0x2f5176[_0xe0bd('0x45')];if(!_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x4c')](_0xe0bd('0x4d'))){_0x1ae29c[_0xe0bd('0x2e')]=qs['limit'](_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0x1ae29c[_0xe0bd('0x2c')]=qs[_0xe0bd('0x2c')](_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x2c')]);}_0x1ae29c[_0xe0bd('0x4e')]=qs[_0xe0bd('0x4f')](_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x4f')]);_0x1ae29c[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_[_0xe0bd('0x51')](_0x30953c[_0xe0bd('0x48')],_0x2f5176['filters']));_0x1ae29c[_0xe0bd('0x50')]['MailAccountId']=_0x531f39['id'];if(_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x53')]){_0x1ae29c['where']=_[_0xe0bd('0x52')](_0x1ae29c[_0xe0bd('0x50')],{'$or':_['map'](_0x1ae29c[_0xe0bd('0x4a')],function(_0x3b4991){var _0x5b0f12={};_0x5b0f12[_0x3b4991]={'$like':'%'+_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x53')]+'%'};return _0x5b0f12;})});}_0x1ae29c=_['merge']({},_0x1ae29c,_0x30953c[_0xe0bd('0x54')]);return db[_0xe0bd('0x69')][_0xe0bd('0x2f')]({'where':_0x1ae29c[_0xe0bd('0x50')]})[_0xe0bd('0x1f')](function(_0x2b17de){_0x44eb60[_0xe0bd('0x2f')]=_0x2b17de;if(_0x30953c[_0xe0bd('0x48')][_0xe0bd('0x5c')]){_0x1ae29c[_0xe0bd('0x55')]=[{'all':!![]}];}return db[_0xe0bd('0x69')][_0xe0bd('0x56')](_0x1ae29c);})[_0xe0bd('0x1f')](function(_0x1c876b){_0x44eb60['rows']=_0x1c876b;return _0x44eb60;});}})[_0xe0bd('0x1f')](respondWithFilteredResult(_0x52287d,_0x1ae29c))[_0xe0bd('0x29')](handleError(_0x52287d,null));};exports[_0xe0bd('0x6c')]=function(_0x2d4b3a,_0x103fb0,_0x4c70f5){return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x2d4b3a[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x103fb0,null))[_0xe0bd('0x1f')](function(_0x69e2ce){if(_0x69e2ce){return _0x69e2ce[_0xe0bd('0x6c')](_0x2d4b3a[_0xe0bd('0x48')]['ids']);}})[_0xe0bd('0x1f')](respondWithStatusCode(_0x103fb0,null))['catch'](handleError(_0x103fb0,null));};exports[_0xe0bd('0x6a')]=function(_0x424833,_0x831272){var _0x301628={'name':_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x3a')],'key':_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x44')],'email':_0x424833['body']['email'],'ListId':_0x424833['body'][_0xe0bd('0x6d')],'active':!_['isNil'](_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x6e')])?_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x6e')]:!![],'description':_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x6f')]||null,'Imap':{},'Smtp':{}};if(_[_0xe0bd('0x70')](_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x71')])){if(_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x72')]){_0x301628[_0xe0bd('0x3c')][_0xe0bd('0x73')]=_0x301628['Smtp'][_0xe0bd('0x73')]=_0x424833['body'][_0xe0bd('0x74')];_0x301628['Imap'][_0xe0bd('0x75')]=_0x301628['Smtp']['pass']=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x76')];}else{_0x301628[_0xe0bd('0x3c')][_0xe0bd('0x77')]=_0x301628['Smtp'][_0xe0bd('0x77')]=![];}_0x301628[_0xe0bd('0x3c')]['host']=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x3c')][_0xe0bd('0x78')];_0x301628['Imap'][_0xe0bd('0x79')]=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x3c')]['port'];_0x301628[_0xe0bd('0x5a')]['host']=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x5a')]['host'];_0x301628[_0xe0bd('0x5a')][_0xe0bd('0x79')]=_0x424833[_0xe0bd('0x5f')]['Smtp'][_0xe0bd('0x79')];}else{_0x301628[_0xe0bd('0x3c')]['service']=_0x301628[_0xe0bd('0x5a')]['service']=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x71')];_0x301628[_0xe0bd('0x3c')][_0xe0bd('0x73')]=_0x301628['Smtp'][_0xe0bd('0x73')]=_0x424833['body'][_0xe0bd('0x74')];_0x301628[_0xe0bd('0x3c')]['password']=_0x301628[_0xe0bd('0x5a')]['pass']=_0x424833[_0xe0bd('0x5f')][_0xe0bd('0x76')];}return db[_0xe0bd('0x41')][_0xe0bd('0x6a')](_0x301628,{'include':[{'model':db[_0xe0bd('0x3d')],'as':_0xe0bd('0x5a')},{'model':db['MailServerIn'],'as':_0xe0bd('0x3c')}]})['then'](function(_0x26cfc0){var _0x2cbe53=_0x424833['user'][_0xe0bd('0x37')]({'plain':!![]});if(!_0x2cbe53)throw new Error(_0xe0bd('0x7a'));if(_0x2cbe53[_0xe0bd('0x7b')]==='user'){var _0x116816=_0x26cfc0[_0xe0bd('0x37')]({'plain':!![]});return db[_0xe0bd('0x7c')]['find']({'where':{'name':'MailAccounts','userProfileId':_0x2cbe53[_0xe0bd('0x7d')]},'raw':!![]})[_0xe0bd('0x1f')](function(_0x27669b){if(_0x27669b&&_0x27669b['autoAssociation']===0x0){return db[_0xe0bd('0x39')][_0xe0bd('0x6a')]({'name':_0x116816[_0xe0bd('0x3a')],'resourceId':_0x116816['id'],'type':_0x27669b[_0xe0bd('0x3a')],'sectionId':_0x27669b['id']},{})[_0xe0bd('0x1f')](function(){return _0x26cfc0;});}else{return _0x26cfc0;}})[_0xe0bd('0x29')](function(_0x156ba2){logger[_0xe0bd('0x25')](_0xe0bd('0x7e'),_0x156ba2);throw _0x156ba2;});}return _0x26cfc0;})[_0xe0bd('0x1f')](respondWithResult(_0x831272,0xc9))[_0xe0bd('0x29')](handleError(_0x831272,null));};exports[_0xe0bd('0x7f')]=function(_0x4e482b,_0x152589,_0x5e33d0){return db['MailAccount']['findOne']({'where':{'id':_0x4e482b[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x152589,null))[_0xe0bd('0x1f')](function(_0x2a5713){if(_0x2a5713){return _0x2a5713['getImap']();}return null;})[_0xe0bd('0x1f')](respondWithResult(_0x152589,null))['catch'](handleError(_0x152589,null));};exports[_0xe0bd('0x80')]=function(_0x441e45,_0xd09c82,_0x287e5b){if(_0x441e45[_0xe0bd('0x5f')]['id']){delete _0x441e45[_0xe0bd('0x5f')]['id'];}return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x441e45[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0xd09c82,null))[_0xe0bd('0x1f')](function(_0xfd7c81){if(_0xfd7c81){_0x441e45[_0xe0bd('0x5f')]['MailAccountId']=_0xfd7c81['id'];return db[_0xe0bd('0x60')][_0xe0bd('0x6a')](_0x441e45[_0xe0bd('0x5f')]);}})[_0xe0bd('0x1f')](respondWithResult(_0xd09c82,null))[_0xe0bd('0x29')](handleError(_0xd09c82,null));};exports[_0xe0bd('0x81')]=function(_0x36813d,_0x148b03,_0x2de86a){return db['MailAccount'][_0xe0bd('0x65')]({'where':{'id':_0x36813d[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x148b03,null))[_0xe0bd('0x1f')](function(_0x483dcb){if(_0x483dcb){return _0x483dcb['setImap'](null);}return null;})['then'](respondWithStatusCode(_0x148b03,null))['catch'](handleError(_0x148b03,null));};exports[_0xe0bd('0x82')]=function(_0x2c6003,_0x55a755,_0x314bef){return db['MailAccount'][_0xe0bd('0x65')]({'where':{'id':_0x2c6003[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x55a755,null))[_0xe0bd('0x1f')](function(_0x571508){if(_0x571508){return _0x571508[_0xe0bd('0x82')]();}return null;})['then'](respondWithResult(_0x55a755,null))[_0xe0bd('0x29')](handleError(_0x55a755,null));};exports['addSmtp']=function(_0x364efa,_0x2f77ce,_0x1005d5){if(_0x364efa[_0xe0bd('0x5f')]['id']){delete _0x364efa[_0xe0bd('0x5f')]['id'];}return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x364efa[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x2f77ce,null))[_0xe0bd('0x1f')](function(_0x57159b){if(_0x57159b){_0x364efa[_0xe0bd('0x5f')][_0xe0bd('0x63')]=_0x57159b['id'];return db[_0xe0bd('0x3d')][_0xe0bd('0x6a')](_0x364efa[_0xe0bd('0x5f')]);}})[_0xe0bd('0x1f')](respondWithResult(_0x2f77ce,null))[_0xe0bd('0x29')](handleError(_0x2f77ce,null));};exports['removeSmtp']=function(_0x11de10,_0x328626,_0x4d5940){return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0x11de10[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x328626,null))[_0xe0bd('0x1f')](function(_0x2c796b){if(_0x2c796b){return _0x2c796b['setSmtp'](null);}return null;})['then'](respondWithStatusCode(_0x328626,null))['catch'](handleError(_0x328626,null));};exports['addInteraction']=function(_0xf0bde2,_0x218705,_0x40b093){return db[_0xe0bd('0x83')][_0xe0bd('0x5d')]({'where':{'id':_0xf0bde2[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x218705,null))['then'](function(_0x18e9ae){if(_0x18e9ae){return _0x18e9ae[_0xe0bd('0x84')](_0xf0bde2[_0xe0bd('0x5f')]['ids'],_['omit'](_0xf0bde2[_0xe0bd('0x5f')],[_0xe0bd('0x67'),'id'])||{});}})[_0xe0bd('0x1f')](respondWithResult(_0x218705,null))[_0xe0bd('0x29')](handleError(_0x218705,null));};exports[_0xe0bd('0x85')]=function(_0xaec6de,_0x69302d,_0x315d17){var _0xd31252={'raw':![],'where':{}};var _0xfea45d={};var _0x44b052={'count':0x0,'rows':[]};return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0xaec6de[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x69302d,null))[_0xe0bd('0x1f')](function(_0x339e1c){if(_0x339e1c){_0xfea45d[_0xe0bd('0x45')]=_[_0xe0bd('0x5b')](db[_0xe0bd('0x83')][_0xe0bd('0x42')]);_0xfea45d['query']=_[_0xe0bd('0x5b')](_0xaec6de[_0xe0bd('0x48')]);_0xfea45d[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0xfea45d[_0xe0bd('0x45')],_0xfea45d[_0xe0bd('0x48')]);_0xd31252[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0xfea45d[_0xe0bd('0x45')],qs['fields'](_0xaec6de[_0xe0bd('0x48')][_0xe0bd('0x49')]));_0xd31252['attributes']=_0xd31252[_0xe0bd('0x4a')]['length']?_0xd31252[_0xe0bd('0x4a')]:_0xfea45d['model'];if(!_0xaec6de['query'][_0xe0bd('0x4c')]('nolimit')){_0xd31252['limit']=qs[_0xe0bd('0x2e')](_0xaec6de[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0xd31252[_0xe0bd('0x2c')]=qs['offset'](_0xaec6de['query']['offset']);}_0xd31252['order']=qs[_0xe0bd('0x4f')](_0xaec6de[_0xe0bd('0x48')][_0xe0bd('0x4f')]);_0xd31252[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_['pick'](_0xaec6de['query'],_0xfea45d[_0xe0bd('0x46')]));_0xd31252[_0xe0bd('0x50')][_0xe0bd('0x63')]=_0x339e1c['id'];if(_0xaec6de[_0xe0bd('0x48')][_0xe0bd('0x53')]){_0xd31252[_0xe0bd('0x50')]=_[_0xe0bd('0x52')](_0xd31252[_0xe0bd('0x50')],{'$or':_[_0xe0bd('0x40')](_0xd31252['attributes'],function(_0x13ccdc){var _0x534e92={};_0x534e92[_0x13ccdc]={'$like':'%'+_0xaec6de[_0xe0bd('0x48')]['filter']+'%'};return _0x534e92;})});}_0xd31252=_[_0xe0bd('0x52')]({},_0xd31252,_0xaec6de['options']);return db[_0xe0bd('0x83')]['count']({'where':_0xd31252['where']})[_0xe0bd('0x1f')](function(_0x4a954b){_0x44b052[_0xe0bd('0x2f')]=_0x4a954b;if(_0xaec6de[_0xe0bd('0x48')][_0xe0bd('0x5c')]){_0xd31252[_0xe0bd('0x55')]=[{'model':db[_0xe0bd('0x86')],'as':'Contact','required':![]},{'model':db[_0xe0bd('0x87')],'as':_0xe0bd('0x88'),'attributes':[_0xe0bd('0x3a'),_0xe0bd('0x89'),_0xe0bd('0x8a')],'required':![]},{'model':db[_0xe0bd('0x8b')],'as':_0xe0bd('0x8c'),'attributes':['id',_0xe0bd('0x3a'),_0xe0bd('0x8d')],'where':_0xaec6de['query'][_0xe0bd('0x8e')]?{'id':_0xaec6de[_0xe0bd('0x48')]['tag']}:undefined,'required':_0xaec6de[_0xe0bd('0x48')]['tag']?!![]:![]}];}return db[_0xe0bd('0x83')][_0xe0bd('0x56')](_0xd31252);})[_0xe0bd('0x1f')](function(_0x569dd5){_0x44b052[_0xe0bd('0x57')]=_0x569dd5;return _0x44b052;});}})[_0xe0bd('0x1f')](respondWithFilteredResult(_0x69302d,_0xd31252))['catch'](handleError(_0x69302d,null));};exports[_0xe0bd('0x8f')]=function(_0x4a8c2d,_0x4ade05,_0x4f92d5){return db['MailAccount'][_0xe0bd('0x65')]({'where':{'id':_0x4a8c2d[_0xe0bd('0x59')]['id']}})['then'](handleEntityNotFound(_0x4ade05,null))[_0xe0bd('0x1f')](function(_0x22cab7){if(_0x22cab7){return db[_0xe0bd('0x90')]['transaction'](function(_0x5dae6a){return db[_0xe0bd('0x91')][_0xe0bd('0x36')]({'where':{'MailAccountId':_0x4a8c2d[_0xe0bd('0x59')]['id']},'transaction':_0x5dae6a})['then'](function(_0x5e56d8){var _0x1fd5fb=_[_0xe0bd('0x40')](_0x4a8c2d[_0xe0bd('0x5f')],function(_0xc98287){_0xc98287['MailAccountId']=_0x4a8c2d[_0xe0bd('0x59')]['id'];return _0xc98287;});return db['MailApplication'][_0xe0bd('0x92')](_0x1fd5fb,{'transaction':_0x5dae6a});});})[_0xe0bd('0x1f')](function(){return db['MailApplication'][_0xe0bd('0x93')]({'where':{'MailAccountId':_0x4a8c2d[_0xe0bd('0x59')]['id']},'order':_0xe0bd('0x94')});});}})[_0xe0bd('0x1f')](respondWithResult(_0x4ade05,null))[_0xe0bd('0x29')](handleError(_0x4ade05,null));};exports[_0xe0bd('0x95')]=function(_0x2cad9f,_0x1471e5,_0x9e1b4c){var _0x6b5901={};var _0x42fdc0={};var _0x929d35;var _0x275719;return db['MailAccount'][_0xe0bd('0x65')]({'where':{'id':_0x2cad9f[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x1471e5,null))[_0xe0bd('0x1f')](function(_0x2fde95){if(_0x2fde95){_0x929d35=_0x2fde95;_0x42fdc0[_0xe0bd('0x45')]=_[_0xe0bd('0x5b')](db[_0xe0bd('0x91')][_0xe0bd('0x42')]);_0x42fdc0[_0xe0bd('0x48')]=_['keys'](_0x2cad9f[_0xe0bd('0x48')]);_0x42fdc0[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x42fdc0[_0xe0bd('0x45')],_0x42fdc0[_0xe0bd('0x48')]);_0x6b5901[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x42fdc0[_0xe0bd('0x45')],qs[_0xe0bd('0x49')](_0x2cad9f[_0xe0bd('0x48')][_0xe0bd('0x49')]));_0x6b5901['attributes']=_0x6b5901[_0xe0bd('0x4a')]['length']?_0x6b5901['attributes']:_0x42fdc0[_0xe0bd('0x45')];_0x6b5901[_0xe0bd('0x4e')]=qs[_0xe0bd('0x4f')](_0x2cad9f[_0xe0bd('0x48')]['sort']);_0x6b5901[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_['pick'](_0x2cad9f[_0xe0bd('0x48')],_0x42fdc0[_0xe0bd('0x46')]));if(_0x2cad9f[_0xe0bd('0x48')][_0xe0bd('0x53')]){_0x6b5901[_0xe0bd('0x50')]=_[_0xe0bd('0x52')](_0x6b5901[_0xe0bd('0x50')],{'$or':_[_0xe0bd('0x40')](_0x6b5901['attributes'],function(_0x2ebf42){var _0x1bcf92={};_0x1bcf92[_0x2ebf42]={'$like':'%'+_0x2cad9f[_0xe0bd('0x48')]['filter']+'%'};return _0x1bcf92;})});}_0x6b5901=_[_0xe0bd('0x52')]({},_0x6b5901,_0x2cad9f[_0xe0bd('0x54')]);return _0x929d35[_0xe0bd('0x95')](_0x6b5901);}})['then'](function(_0x16bc50){if(_0x16bc50){_0x275719=_0x16bc50[_0xe0bd('0x4b')];if(!_0x2cad9f[_0xe0bd('0x48')][_0xe0bd('0x4c')](_0xe0bd('0x4d'))){_0x6b5901[_0xe0bd('0x2e')]=qs['limit'](_0x2cad9f['query'][_0xe0bd('0x2e')]);_0x6b5901['offset']=qs[_0xe0bd('0x2c')](_0x2cad9f['query'][_0xe0bd('0x2c')]);}return _0x929d35[_0xe0bd('0x95')](_0x6b5901);}})[_0xe0bd('0x1f')](function(_0x37dbfe){if(_0x37dbfe){return _0x37dbfe?{'count':_0x275719,'rows':_0x37dbfe}:null;}})['then'](respondWithResult(_0x1471e5,null))[_0xe0bd('0x29')](handleError(_0x1471e5,null));};exports[_0xe0bd('0x96')]=function(_0x1a019f,_0x2f6b94,_0x10245d){var _0x3409b3={'raw':!![],'where':{}};var _0x3cc1e1={};var _0x44dce9={'count':0x0,'rows':[]};return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0x1a019f['params']['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x2f6b94,null))[_0xe0bd('0x1f')](function(_0x2e617c){if(_0x2e617c){_0x3cc1e1['model']=_[_0xe0bd('0x5b')](db[_0xe0bd('0x97')][_0xe0bd('0x42')]);_0x3cc1e1['query']=_[_0xe0bd('0x5b')](_0x1a019f[_0xe0bd('0x48')]);_0x3cc1e1[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x3cc1e1[_0xe0bd('0x45')],_0x3cc1e1[_0xe0bd('0x48')]);_0x3409b3[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x3cc1e1[_0xe0bd('0x45')],qs[_0xe0bd('0x49')](_0x1a019f['query'][_0xe0bd('0x49')]));_0x3409b3[_0xe0bd('0x4a')]=_0x3409b3[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x3409b3[_0xe0bd('0x4a')]:_0x3cc1e1['model'];if(!_0x1a019f[_0xe0bd('0x48')][_0xe0bd('0x4c')](_0xe0bd('0x4d'))){_0x3409b3['limit']=qs['limit'](_0x1a019f[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0x3409b3[_0xe0bd('0x2c')]=qs[_0xe0bd('0x2c')](_0x1a019f[_0xe0bd('0x48')][_0xe0bd('0x2c')]);}_0x3409b3[_0xe0bd('0x4e')]=qs[_0xe0bd('0x4f')](_0x1a019f['query'][_0xe0bd('0x4f')]);_0x3409b3[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_['pick'](_0x1a019f[_0xe0bd('0x48')],_0x3cc1e1['filters']));_0x3409b3[_0xe0bd('0x50')][_0xe0bd('0x63')]=_0x2e617c['id'];if(_0x1a019f[_0xe0bd('0x48')]['filter']){_0x3409b3[_0xe0bd('0x50')]=_['merge'](_0x3409b3[_0xe0bd('0x50')],{'$or':_[_0xe0bd('0x40')](_0x3409b3[_0xe0bd('0x4a')],function(_0x89082){var _0x1bc0bc={};_0x1bc0bc[_0x89082]={'$like':'%'+_0x1a019f[_0xe0bd('0x48')][_0xe0bd('0x53')]+'%'};return _0x1bc0bc;})});}if(_0x1a019f['query'][_0xe0bd('0x98')]){var _0x238726=_0x1a019f[_0xe0bd('0x48')][_0xe0bd('0x98')][_0xe0bd('0x99')](',');var _0x58e7f2={};_0x58e7f2[_0x238726[0x0]]={'$gte':moment(_0x238726[0x1])[_0xe0bd('0x9a')](_0xe0bd('0x9b'))};_0x3409b3['where']=_['merge'](_0x3409b3[_0xe0bd('0x50')],_0x58e7f2);}_0x3409b3=_[_0xe0bd('0x52')]({},_0x3409b3,_0x1a019f['options']);return db[_0xe0bd('0x97')][_0xe0bd('0x2f')]({'where':_0x3409b3[_0xe0bd('0x50')]})['then'](function(_0x1dee8a){_0x44dce9[_0xe0bd('0x2f')]=_0x1dee8a;if(_0x1a019f['query']['includeAll']){_0x3409b3[_0xe0bd('0x55')]=[{'all':!![]}];}return db[_0xe0bd('0x97')][_0xe0bd('0x56')](_0x3409b3);})[_0xe0bd('0x1f')](function(_0x53085e){if(_0x1a019f[_0xe0bd('0x48')]['inlineCss']===_0xe0bd('0x9c')){for(var _0x3c5fdb=0x0;_0x3c5fdb<_0x53085e[_0xe0bd('0x4b')];_0x3c5fdb++){_0x53085e[_0x3c5fdb][_0xe0bd('0x5f')]=juice(_0x53085e[_0x3c5fdb][_0xe0bd('0x5f')]);}}_0x44dce9[_0xe0bd('0x57')]=_0x53085e;return _0x44dce9;});}})[_0xe0bd('0x1f')](respondWithFilteredResult(_0x2f6b94,_0x3409b3))[_0xe0bd('0x29')](handleError(_0x2f6b94,null));};exports[_0xe0bd('0x9d')]=function(_0x424374,_0xafcd0b,_0x231684){var _0x5226c3,_0x58c7cc={},_0x23034a;if(_0x424374[_0xe0bd('0x5f')]['to']){_0x23034a=_0x424374[_0xe0bd('0x5f')]['to']['split'](',')[0x0];}return db['MailAccount'][_0xe0bd('0x5d')]({'where':{'id':_0x424374[_0xe0bd('0x59')]['id']},'include':[{'model':db[_0xe0bd('0x9e')],'as':'List','include':[{'model':db[_0xe0bd('0x86')],'as':_0xe0bd('0x9f'),'where':{'email':_0x23034a},'limit':0x1,'order':[[_0xe0bd('0xa0'),_0xe0bd('0xa1')]]}]},{'model':db[_0xe0bd('0x3d')],'as':'Smtp','raw':!![]}]})[_0xe0bd('0x1f')](handleEntityNotFound(_0xafcd0b,null))[_0xe0bd('0x1f')](function(_0x2ef274){if(_0x2ef274){_0x5226c3=_0x2ef274;if(_0x2ef274['Smtp']){if(_[_0xe0bd('0x70')](_0x424374['body'][_0xe0bd('0xa2')])){_0x424374[_0xe0bd('0x5f')][_0xe0bd('0xa2')]=util['format']('%s\x20<%s>',_0x2ef274[_0xe0bd('0x3a')],_0x2ef274[_0xe0bd('0xa3')]||_0x2ef274[_0xe0bd('0x5a')]['user']);}if(_0x424374['body'][_0xe0bd('0xa4')]&&_0x424374[_0xe0bd('0x5f')][_0xe0bd('0xa4')][_0xe0bd('0x4b')]){for(var _0xcbc9a4=0x0;_0xcbc9a4<_0x424374[_0xe0bd('0x5f')]['attachments'][_0xe0bd('0x4b')];_0xcbc9a4+=0x1){_0x424374[_0xe0bd('0x5f')]['attachments'][_0xcbc9a4]={'filename':_0x424374[_0xe0bd('0x5f')][_0xe0bd('0xa4')][_0xcbc9a4]['name'],'path':path[_0xe0bd('0xa5')](config['root'],_0xe0bd('0xa6'),_0x424374[_0xe0bd('0x5f')][_0xe0bd('0xa4')][_0xcbc9a4]['basename'])};}}var _0x3047cb={'tls':{'rejectUnauthorized':![]}};if(_[_0xe0bd('0x70')](_0x2ef274['Smtp'][_0xe0bd('0xa7')])){if(_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0x77')]){_0x3047cb['auth']={'user':_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0x73')],'pass':_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0xa8')]};}_0x3047cb['host']=_0x2ef274[_0xe0bd('0x5a')]['host'];_0x3047cb[_0xe0bd('0x79')]=_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0x79')];_0x3047cb[_0xe0bd('0xa9')]=_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0xa9')];}else{_0x3047cb[_0xe0bd('0xa7')]=_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0xa7')];_0x3047cb[_0xe0bd('0xaa')]={'user':_0x2ef274['Smtp']['user'],'pass':_0x2ef274[_0xe0bd('0x5a')][_0xe0bd('0xa8')]};}return respondWithRpcPromise(_0xe0bd('0xab'),'sendMail',{'account':_0x3047cb,'message':_0x424374[_0xe0bd('0x5f')]});}else{throw new Error(_0xe0bd('0xac'));}}})[_0xe0bd('0x1f')](function(_0x32875f){if(_0x32875f){_0x58c7cc=_0x32875f;if(_0x5226c3['List']){if(_0x5226c3['List'][_0xe0bd('0x9f')][_0xe0bd('0x4b')]){return _0x5226c3[_0xe0bd('0xad')]['Contacts'][0x0];}else{return db['CmContact'][_0xe0bd('0x6a')](_['defaults'](_0x424374[_0xe0bd('0x5f')],{'firstName':_0x424374[_0xe0bd('0x5f')]['to'],'email':_0x424374[_0xe0bd('0x5f')]['to'],'phone':_0x424374[_0xe0bd('0x5f')]['to'],'ListId':_0x5226c3[_0xe0bd('0x6d')]}));}}else{throw new Error('List\x20not\x20found');}}})[_0xe0bd('0x1f')](function(_0x4ee6b6){if(_0x4ee6b6){var _0x3e03d6={'UserId':_0x424374[_0xe0bd('0x73')]['id'],'ContactId':_0x4ee6b6['id'],'MailAccountId':_0x5226c3['id'],'inReplyTo':_0x58c7cc[_0xe0bd('0xae')],'to':_0x424374['body'][_0xe0bd('0xa2')],'cc':_0x424374['body']['cc'],'subject':_0x424374['body'][_0xe0bd('0xaf')],'attach':_0x424374['body'][_0xe0bd('0xb0')],'firstMsgDirection':_0xe0bd('0xb1'),'lastMsgAt':moment()[_0xe0bd('0x9a')](_0xe0bd('0x9b')),'lastMsgDirection':_0xe0bd('0xb1'),'Messages':[_[_0xe0bd('0x52')](_0x424374['body'],{'messageId':_0x58c7cc[_0xe0bd('0xae')],'sentAt':moment()[_0xe0bd('0x9a')](_0xe0bd('0x9b')),'read':!![],'MailAccountId':_0x5226c3['id'],'UserId':_0x424374[_0xe0bd('0x73')]['id'],'ContactId':_0x4ee6b6['id']})]};if(_0x424374[_0xe0bd('0x5f')]['Interaction']){_0x3e03d6=_[_0xe0bd('0x52')](_0x3e03d6,_0x424374['body'][_0xe0bd('0xb2')]);}return db[_0xe0bd('0x83')]['create'](_0x3e03d6,{'include':[{'model':db[_0xe0bd('0x97')],'as':'Messages'}]});}})[_0xe0bd('0x1f')](respondWithResult(_0xafcd0b,null))['catch'](handleError(_0xafcd0b,null));};exports['verifySmtp']=function(_0x548a8d,_0x5a1f02,_0x2ecc80){return db['MailAccount'][_0xe0bd('0x5d')]({'where':{'id':_0x548a8d[_0xe0bd('0x59')]['id']},'include':[{'model':db['MailServerOut'],'as':_0xe0bd('0x5a'),'raw':!![]}]})['then'](handleEntityNotFound(_0x5a1f02,null))[_0xe0bd('0x1f')](function(_0x534401){if(_0x534401&&_0x534401[_0xe0bd('0x5a')]){var _0x23ffde={'id':_0x534401['id'],'tls':{'rejectUnauthorized':![]}};if(_0x534401[_0xe0bd('0x5a')][_0xe0bd('0xa7')]){_0x23ffde['service']=_0x534401[_0xe0bd('0x5a')][_0xe0bd('0xa7')];}else{_0x23ffde[_0xe0bd('0x78')]=_0x534401['Smtp'][_0xe0bd('0x78')];_0x23ffde[_0xe0bd('0x79')]=_0x534401[_0xe0bd('0x5a')][_0xe0bd('0x79')];_0x23ffde[_0xe0bd('0xa9')]=_0x534401[_0xe0bd('0x5a')][_0xe0bd('0xa9')];}if(_0x534401[_0xe0bd('0x5a')]['authentication']){_0x23ffde[_0xe0bd('0xaa')]={'user':_0x534401[_0xe0bd('0x5a')][_0xe0bd('0x73')],'pass':_0x534401[_0xe0bd('0x5a')]['pass']};}return respondWithRpcPromise(_0xe0bd('0xb3'),_0xe0bd('0xb4'),{'account':_0x23ffde});}})[_0xe0bd('0x1f')](respondWithResult(_0x5a1f02,null))[_0xe0bd('0x29')](handleError(_0x5a1f02,null));};exports[_0xe0bd('0x36')]=function(_0x1a23aa,_0x1d84e2){return db['MailAccount'][_0xe0bd('0x5d')]({'where':{'id':_0x1a23aa[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x1d84e2,null))['then'](function(_0x278b34){if(_0x278b34&&_0x278b34[_0xe0bd('0xa7')]){throw new db[(_0xe0bd('0xb5'))]['ValidationError'](_0xe0bd('0xb6'));}return _0x278b34;})['then'](removeEntity(_0x1d84e2,null))[_0xe0bd('0x29')](handleError(_0x1d84e2,null));};exports[_0xe0bd('0xb7')]=function(_0x1fd292,_0x50873f,_0x1d8ab0){return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x1fd292['params']['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x50873f,null))['then'](function(_0x40beb6){if(_0x40beb6){return _0x40beb6['addAgents'](_0x1fd292[_0xe0bd('0x5f')][_0xe0bd('0x67')],_[_0xe0bd('0xb8')](_0x1fd292[_0xe0bd('0x5f')],['ids','id'])||{})[_0xe0bd('0xb9')](function(_0x22f0c7){for(var _0x20a795=0x0;_0x20a795<_0x1fd292[_0xe0bd('0x5f')][_0xe0bd('0x67')][_0xe0bd('0x4b')];_0x20a795+=0x1){socket[_0xe0bd('0xba')](_0xe0bd('0xbb'),{'UserId':_0x1fd292[_0xe0bd('0x5f')][_0xe0bd('0x67')][_0x20a795],'MailAccountId':_0x1fd292['params']['id']});}return _0x22f0c7;});}})[_0xe0bd('0x1f')](respondWithResult(_0x50873f,null))['catch'](handleError(_0x50873f,null));};exports[_0xe0bd('0xbc')]=function(_0x18f36b,_0x2ce1f4,_0xb63482){return db[_0xe0bd('0x41')][_0xe0bd('0x5d')]({'where':{'id':_0x18f36b[_0xe0bd('0x59')]['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x2ce1f4,null))[_0xe0bd('0x1f')](function(_0xbf1121){if(_0xbf1121){return _0xbf1121[_0xe0bd('0xbc')](_0x18f36b[_0xe0bd('0x48')][_0xe0bd('0x67')])[_0xe0bd('0x1f')](function(){if(_[_0xe0bd('0xbd')](_0x18f36b[_0xe0bd('0x48')][_0xe0bd('0x67')])){for(var _0x2ef7a0=0x0;_0x2ef7a0<_0x18f36b[_0xe0bd('0x48')]['ids'][_0xe0bd('0x4b')];_0x2ef7a0+=0x1){socket['emit'](_0xe0bd('0xbe'),{'UserId':Number(_0x18f36b[_0xe0bd('0x48')][_0xe0bd('0x67')][_0x2ef7a0]),'MailAccountId':Number(_0x18f36b[_0xe0bd('0x59')]['id'])});}}else{socket[_0xe0bd('0xba')](_0xe0bd('0xbe'),{'UserId':Number(_0x18f36b[_0xe0bd('0x48')][_0xe0bd('0x67')]),'MailAccountId':Number(_0x18f36b[_0xe0bd('0x59')]['id'])});}});}})[_0xe0bd('0x1f')](respondWithStatusCode(_0x2ce1f4,null))[_0xe0bd('0x29')](handleError(_0x2ce1f4,null));};exports['getAgents']=function(_0x269604,_0x4a06bf,_0x10605a){var _0x4b6bbb={};var _0x33ef63={};var _0x2f6d39;var _0x1bf629;return db[_0xe0bd('0x41')][_0xe0bd('0x65')]({'where':{'id':_0x269604['params']['id']}})[_0xe0bd('0x1f')](handleEntityNotFound(_0x4a06bf,null))[_0xe0bd('0x1f')](function(_0x5381e0){if(_0x5381e0){_0x2f6d39=_0x5381e0;_0x33ef63[_0xe0bd('0x45')]=_[_0xe0bd('0x5b')](db[_0xe0bd('0x87')][_0xe0bd('0x42')]);_0x33ef63['query']=_[_0xe0bd('0x5b')](_0x269604['query']);_0x33ef63[_0xe0bd('0x46')]=_[_0xe0bd('0x47')](_0x33ef63[_0xe0bd('0x45')],_0x33ef63['query']);_0x4b6bbb[_0xe0bd('0x4a')]=_[_0xe0bd('0x47')](_0x33ef63[_0xe0bd('0x45')],qs['fields'](_0x269604['query'][_0xe0bd('0x49')]));_0x4b6bbb[_0xe0bd('0x4a')]=_0x4b6bbb[_0xe0bd('0x4a')][_0xe0bd('0x4b')]?_0x4b6bbb['attributes']:_0x33ef63['model'];_0x4b6bbb[_0xe0bd('0x4e')]=qs[_0xe0bd('0x4f')](_0x269604[_0xe0bd('0x48')][_0xe0bd('0x4f')]);_0x4b6bbb[_0xe0bd('0x50')]=qs[_0xe0bd('0x46')](_[_0xe0bd('0x51')](_0x269604[_0xe0bd('0x48')],_0x33ef63[_0xe0bd('0x46')]));if(_0x269604[_0xe0bd('0x48')]['filter']){_0x4b6bbb[_0xe0bd('0x50')]=_[_0xe0bd('0x52')](_0x4b6bbb[_0xe0bd('0x50')],{'$or':_[_0xe0bd('0x40')](_0x4b6bbb[_0xe0bd('0x4a')],function(_0x4ee6ef){var _0x4ca38e={};_0x4ca38e[_0x4ee6ef]={'$like':'%'+_0x269604[_0xe0bd('0x48')]['filter']+'%'};return _0x4ca38e;})});}_0x4b6bbb=_[_0xe0bd('0x52')]({},_0x4b6bbb,_0x269604[_0xe0bd('0x54')]);return _0x2f6d39[_0xe0bd('0xbf')](_0x4b6bbb);}})[_0xe0bd('0x1f')](function(_0x5d9d4f){if(_0x5d9d4f){_0x1bf629=_0x5d9d4f[_0xe0bd('0x4b')];if(!_0x269604['query'][_0xe0bd('0x4c')](_0xe0bd('0x4d'))){_0x4b6bbb['limit']=qs[_0xe0bd('0x2e')](_0x269604[_0xe0bd('0x48')][_0xe0bd('0x2e')]);_0x4b6bbb[_0xe0bd('0x2c')]=qs[_0xe0bd('0x2c')](_0x269604[_0xe0bd('0x48')][_0xe0bd('0x2c')]);}return _0x2f6d39[_0xe0bd('0xbf')](_0x4b6bbb);}})[_0xe0bd('0x1f')](function(_0x2706db){if(_0x2706db){return _0x2706db?{'count':_0x1bf629,'rows':_0x2706db}:null;}})['then'](respondWithResult(_0x4a06bf,null))[_0xe0bd('0x29')](handleError(_0x4a06bf,null));}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.events.js b/server/api/mailAccount/mailAccount.events.js index 977a2be..59657df 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 _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 +var _0x07d7=['exports','events','../../mysqldb','MailAccount','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x612ff8,_0xbba487){var _0x5d6636=function(_0x177405){while(--_0x177405){_0x612ff8['push'](_0x612ff8['shift']());}};_0x5d6636(++_0xbba487);}(_0x07d7,0x85));var _0x707d=function(_0x56916d,_0x37b935){_0x56916d=_0x56916d-0x0;var _0x2b7f1f=_0x07d7[_0x56916d];return _0x2b7f1f;};'use strict';var EventEmitter=require(_0x707d('0x0'));var MailAccount=require(_0x707d('0x1'))['db'][_0x707d('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x707d('0x3')](0x0);var events={'afterCreate':_0x707d('0x4'),'afterUpdate':_0x707d('0x5'),'afterDestroy':_0x707d('0x6')};function emitEvent(_0x3d6fed){return function(_0x38c520,_0x2a5ddd,_0x3b44c7){MailAccountEvents[_0x707d('0x7')](_0x3d6fed+':'+_0x38c520['id'],_0x38c520);MailAccountEvents[_0x707d('0x7')](_0x3d6fed,_0x38c520);_0x3b44c7(null);};}for(var e in events){if(events[_0x707d('0x8')](e)){var event=events[e];MailAccount[_0x707d('0x9')](e,emitEvent(event));}}module[_0x707d('0xa')]=MailAccountEvents; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js index 02f2397..cd36162 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 _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 +var _0x5aec=['exports','MailAccount','mail_accounts','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailAccount.attributes'];(function(_0x11c29f,_0x5d44ff){var _0x351f54=function(_0x5e2b03){while(--_0x5e2b03){_0x11c29f['push'](_0x11c29f['shift']());}};_0x351f54(++_0x5d44ff);}(_0x5aec,0x114));var _0xc5ae=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0x5aec[_0x209941];return _0x1e8729;};'use strict';var _=require(_0xc5ae('0x0'));var util=require('util');var logger=require(_0xc5ae('0x1'))(_0xc5ae('0x2'));var moment=require(_0xc5ae('0x3'));var BPromise=require(_0xc5ae('0x4'));var rp=require(_0xc5ae('0x5'));var fs=require('fs');var path=require(_0xc5ae('0x6'));var rimraf=require(_0xc5ae('0x7'));var config=require(_0xc5ae('0x8'));var attributes=require(_0xc5ae('0x9'));module[_0xc5ae('0xa')]=function(_0x2ebc16,_0x23128d){return _0x2ebc16['define'](_0xc5ae('0xb'),attributes,{'tableName':_0xc5ae('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 97df84f..a635ddd 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 _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 +var _0x8baf=['../../config/utils','rpc','../../config/environment','client','redis','defaults','socket.io-emitter','./mailAccount.socket','register','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','GetMailAccount','MailAccount','findAll','options','raw','where','attributes','limit','include','model','map','catch','ShowMailAccount','find','stringify','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','createdAt','updatedAt','CompanyId','isNil','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','from','account','CmList','List','DESC','MailApplication','Applications','MailServerOut','Smtp','get','applications','list','orderBy','priority','asc','autoclose','push','length','close','Contacts','ListId','create','List\x20not\x20found','contact','messageId','generate','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','Messages','inReplyTo','Contact\x20not\x20found','update','interaction','created','MailMessage','attachments','originTo','originCc','bcc','originChannel','Email','ChatOfflineMessageId','Attachment','Attachments','User','name','agent','waitForTheAssignedAgent','*,*,*,*','Start','startRouting','lodash','util','bluebird','randomstring','../../mysqldb'];(function(_0x18ee68,_0x43c94a){var _0x1f5e1b=function(_0x4d4ea4){while(--_0x4d4ea4){_0x18ee68['push'](_0x18ee68['shift']());}};_0x1f5e1b(++_0x43c94a);}(_0x8baf,0xd7));var _0xf8ba=function(_0x276794,_0x282d61){_0x276794=_0x276794-0x0;var _0xe6ecfb=_0x8baf[_0x276794];return _0xe6ecfb;};'use strict';var _=require(_0xf8ba('0x0'));var util=require(_0xf8ba('0x1'));var moment=require('moment');var BPromise=require(_0xf8ba('0x2'));var rs=require(_0xf8ba('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf8ba('0x4'))['db'];var utils=require(_0xf8ba('0x5'));var logger=require('../../config/logger')(_0xf8ba('0x6'));var config=require(_0xf8ba('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf8ba('0x8')]['http']({'port':0x232c});config[_0xf8ba('0x9')]=_[_0xf8ba('0xa')](config[_0xf8ba('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xf8ba('0xb'))(new Redis(config[_0xf8ba('0x9')]));require(_0xf8ba('0xc'))[_0xf8ba('0xd')](socket);function respondWithRpcPromise(_0x1ed58c,_0x1d7d13,_0x3557f2){return new BPromise(function(_0x432ca7,_0x27317e){return client['request'](_0x1ed58c,_0x3557f2)[_0xf8ba('0xe')](function(_0x3af722){logger[_0xf8ba('0xf')](_0xf8ba('0x10'),_0x1d7d13,_0xf8ba('0x11'));logger[_0xf8ba('0x12')](_0xf8ba('0x13'),_0x1d7d13,_0xf8ba('0x11'),JSON['stringify'](_0x3af722));if(_0x3af722[_0xf8ba('0x14')]){if(_0x3af722[_0xf8ba('0x14')][_0xf8ba('0x15')]===0x1f4){logger[_0xf8ba('0x14')]('MailAccount,\x20%s,\x20%s',_0x1d7d13,_0x3af722[_0xf8ba('0x14')][_0xf8ba('0x16')]);return _0x27317e(_0x3af722[_0xf8ba('0x14')][_0xf8ba('0x16')]);}logger[_0xf8ba('0x14')](_0xf8ba('0x10'),_0x1d7d13,_0x3af722[_0xf8ba('0x14')]['message']);return _0x432ca7(_0x3af722['error'][_0xf8ba('0x16')]);}else{logger['info']('MailAccount,\x20%s,\x20%s',_0x1d7d13,_0xf8ba('0x11'));_0x432ca7(_0x3af722[_0xf8ba('0x17')]['message']);}})['catch'](function(_0x58e0eb){logger[_0xf8ba('0x14')](_0xf8ba('0x10'),_0x1d7d13,_0x58e0eb);_0x27317e(_0x58e0eb);});});}exports[_0xf8ba('0x18')]=function(_0x52b166){var _0xd26daf=this;return new Promise(function(_0xf12eda,_0x581c84){return db[_0xf8ba('0x19')][_0xf8ba('0x1a')]({'raw':_0x52b166[_0xf8ba('0x1b')]?_0x52b166[_0xf8ba('0x1b')][_0xf8ba('0x1c')]===undefined?!![]:![]:!![],'where':_0x52b166[_0xf8ba('0x1b')]?_0x52b166[_0xf8ba('0x1b')][_0xf8ba('0x1d')]||null:null,'attributes':_0x52b166[_0xf8ba('0x1b')]?_0x52b166['options'][_0xf8ba('0x1e')]||null:null,'limit':_0x52b166[_0xf8ba('0x1b')]?_0x52b166['options'][_0xf8ba('0x1f')]||null:null,'include':_0x52b166[_0xf8ba('0x1b')]?_0x52b166[_0xf8ba('0x1b')][_0xf8ba('0x20')]?_['map'](_0x52b166['options'][_0xf8ba('0x20')],function(_0x553f58){return{'model':db[_0x553f58[_0xf8ba('0x21')]],'as':_0x553f58['as'],'attributes':_0x553f58[_0xf8ba('0x1e')],'include':_0x553f58[_0xf8ba('0x20')]?_[_0xf8ba('0x22')](_0x553f58['include'],function(_0x1445dd){return{'model':db[_0x1445dd[_0xf8ba('0x21')]],'as':_0x1445dd['as'],'attributes':_0x1445dd[_0xf8ba('0x1e')],'include':_0x1445dd[_0xf8ba('0x20')]?_[_0xf8ba('0x22')](_0x1445dd[_0xf8ba('0x20')],function(_0x5a92c7){return{'model':db[_0x5a92c7[_0xf8ba('0x21')]],'as':_0x5a92c7['as'],'attributes':_0x5a92c7[_0xf8ba('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xf8ba('0xe')](function(_0x2fb9af){logger['info'](_0xf8ba('0x18'),_0x52b166);logger[_0xf8ba('0x12')](_0xf8ba('0x18'),_0x52b166,JSON['stringify'](_0x2fb9af));_0xf12eda(_0x2fb9af);})[_0xf8ba('0x23')](function(_0x1fe4e2){logger[_0xf8ba('0x14')](_0xf8ba('0x18'),_0x1fe4e2[_0xf8ba('0x16')],_0x52b166);_0x581c84(_0xd26daf[_0xf8ba('0x14')](0x1f4,_0x1fe4e2['message']));});});};exports[_0xf8ba('0x24')]=function(_0x6c0e18){var _0x263bf2=this;return new Promise(function(_0x5c6991,_0x5f3e53){return db[_0xf8ba('0x19')][_0xf8ba('0x25')]({'raw':_0x6c0e18[_0xf8ba('0x1b')]?_0x6c0e18[_0xf8ba('0x1b')][_0xf8ba('0x1c')]===undefined?!![]:![]:!![],'where':_0x6c0e18['options']?_0x6c0e18[_0xf8ba('0x1b')]['where']||null:null,'attributes':_0x6c0e18[_0xf8ba('0x1b')]?_0x6c0e18['options']['attributes']||null:null,'include':_0x6c0e18['options']?_0x6c0e18[_0xf8ba('0x1b')][_0xf8ba('0x20')]?_[_0xf8ba('0x22')](_0x6c0e18[_0xf8ba('0x1b')]['include'],function(_0x336cef){return{'model':db[_0x336cef['model']],'as':_0x336cef['as'],'attributes':_0x336cef[_0xf8ba('0x1e')],'include':_0x336cef[_0xf8ba('0x20')]?_[_0xf8ba('0x22')](_0x336cef['include'],function(_0x986814){return{'model':db[_0x986814['model']],'as':_0x986814['as'],'attributes':_0x986814[_0xf8ba('0x1e')],'include':_0x986814[_0xf8ba('0x20')]?_['map'](_0x986814['include'],function(_0x3f37db){return{'model':db[_0x3f37db['model']],'as':_0x3f37db['as'],'attributes':_0x3f37db[_0xf8ba('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x369fb5){logger[_0xf8ba('0xf')](_0xf8ba('0x24'),_0x6c0e18);logger[_0xf8ba('0x12')](_0xf8ba('0x24'),_0x6c0e18,JSON[_0xf8ba('0x26')](_0x369fb5));_0x5c6991(_0x369fb5);})['catch'](function(_0x5b17aa){logger[_0xf8ba('0x14')]('ShowMailAccount',_0x5b17aa[_0xf8ba('0x16')],_0x6c0e18);_0x5f3e53(_0x263bf2[_0xf8ba('0x14')](0x1f4,_0x5b17aa[_0xf8ba('0x16')]));});});};exports[_0xf8ba('0x27')]=function(_0x2ce4a5){var _0x37ee5a=this;return new Promise(function(_0x556ee2,_0x21b8ca){var _0x22231b={'body':_0x2ce4a5[_0xf8ba('0x28')],'channel':_0xf8ba('0x29')};var _0x3cc8e3=_[_0xf8ba('0x2a')](_[_0xf8ba('0x2b')](db[_0xf8ba('0x2c')][_0xf8ba('0x2d')]),[_0xf8ba('0x2e'),_0xf8ba('0x2f'),_0xf8ba('0x30'),'ListId']);var _0x284e27=![];if(_0x2ce4a5[_0xf8ba('0x28')]['id']){delete _0x2ce4a5[_0xf8ba('0x28')]['id'];}if(_[_0xf8ba('0x31')](_0x2ce4a5[_0xf8ba('0x28')]['from'])){return _0x21b8ca(_0x37ee5a[_0xf8ba('0x14')](0x1f4,_0xf8ba('0x32')));}if(_[_0xf8ba('0x31')](_0x2ce4a5['body'][_0xf8ba('0x28')])||_0x2ce4a5['body']['body']===''){return _0x21b8ca(_0x37ee5a[_0xf8ba('0x14')](0x1f4,_0xf8ba('0x33')));}if(_['isNil'](_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x34')])){return _0x21b8ca(_0x37ee5a[_0xf8ba('0x14')](0x1f4,_0xf8ba('0x35')+_0x3cc8e3));}if(!_[_0xf8ba('0x36')](_0x3cc8e3,_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x34')])){return _0x21b8ca(_0x37ee5a[_0xf8ba('0x14')](0x1f4,_0xf8ba('0x37')+_0x3cc8e3));}var _0x2aea59={};_0x2aea59[_0x2ce4a5['body'][_0xf8ba('0x34')]]=_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x38')];return db[_0xf8ba('0x19')][_0xf8ba('0x25')]({'where':{'id':_0x2ce4a5[_0xf8ba('0x39')]['id']},'include':[{'model':db[_0xf8ba('0x3a')],'as':_0xf8ba('0x3b'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x2aea59,'limit':0x1,'order':[['updatedAt',_0xf8ba('0x3c')]]}]},{'model':db[_0xf8ba('0x3d')],'as':_0xf8ba('0x3e')},{'model':db[_0xf8ba('0x3f')],'as':_0xf8ba('0x40')}]})[_0xf8ba('0xe')](function(_0x1187bc){if(_0x1187bc&&_0x1187bc[_0xf8ba('0x3b')]){var _0x3b64f1=_0x1187bc[_0xf8ba('0x41')]({'plain':!![]});_0x22231b['account']=_['omit'](_0x3b64f1,['Applications',_0xf8ba('0x3b')]);_0x22231b[_0xf8ba('0x42')]=_0x3b64f1[_0xf8ba('0x3e')];_0x22231b[_0xf8ba('0x43')]=_0x3b64f1[_0xf8ba('0x3b')];_0x22231b[_0xf8ba('0x42')]=_[_0xf8ba('0x44')](_0x22231b['applications'],[_0xf8ba('0x45')],[_0xf8ba('0x46')]);if(_0x22231b[_0xf8ba('0x39')]&&_0x22231b[_0xf8ba('0x39')][_0xf8ba('0x47')]){_0x22231b[_0xf8ba('0x42')][_0xf8ba('0x48')]({'id':0x0,'priority':_0x22231b['applications'][_0xf8ba('0x49')]+0x1,'app':_0xf8ba('0x4a'),'appdata':_0xf8ba('0x47'),'interval':'*,*,*,*'});}if(_0x22231b[_0xf8ba('0x39')][_0xf8ba('0x3e')]){delete _0x22231b[_0xf8ba('0x39')][_0xf8ba('0x3e')];}if(_0x22231b['account'][_0xf8ba('0x3b')]){delete _0x22231b[_0xf8ba('0x39')][_0xf8ba('0x3b')];}if(_0x3b64f1[_0xf8ba('0x3b')][_0xf8ba('0x4b')][_0xf8ba('0x49')]){return _0x3b64f1[_0xf8ba('0x3b')][_0xf8ba('0x4b')][0x0];}var _0x40d876=_[_0xf8ba('0xa')](_0x2ce4a5[_0xf8ba('0x28')],{'firstName':_0x2ce4a5['body'][_0xf8ba('0x38')],'ListId':_0x3b64f1[_0xf8ba('0x4c')]});_0x40d876[_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x34')]]=_0x2ce4a5['body'][_0xf8ba('0x38')];return db[_0xf8ba('0x2c')][_0xf8ba('0x4d')](_0x40d876);}else{throw new Error(_0xf8ba('0x4e'));}})[_0xf8ba('0xe')](function(_0x54802c){_0x22231b[_0xf8ba('0x4f')]=_0x54802c;if(_0x54802c){if(!_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x50')]){_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x50')]=rs[_0xf8ba('0x51')]()+'\x20'+_0x2ce4a5[_0xf8ba('0x28')]['message'][_0xf8ba('0x38')];}var _0x33e3d7={'ContactId':_0x54802c['id'],'MailAccountId':_0x2ce4a5['account']['id'],'inReplyTo':_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x50')],'to':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x38')],'cc':_0x2ce4a5['body'][_0xf8ba('0x16')]['cc'],'subject':_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x52')],'attach':_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x53')],'lastMsgAt':moment()[_0xf8ba('0x54')](_0xf8ba('0x55')),'lastMsgDirection':'in'};return db[_0xf8ba('0x56')][_0xf8ba('0x25')]({'where':{'closed':![],'MailAccountId':_0x2ce4a5[_0xf8ba('0x39')]['id']},'include':[{'model':db['MailMessage'],'as':_0xf8ba('0x57'),'attributes':[_0xf8ba('0x50')],'where':{'messageId':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x58')]}}]})[_0xf8ba('0xe')](function(_0xc2a77b){if(_0xc2a77b){return[_0xc2a77b,![]];}return db[_0xf8ba('0x56')][_0xf8ba('0x4d')](_0x33e3d7)[_0xf8ba('0xe')](function(_0x51f920){return[_0x51f920,!![]];});});}else{throw new Error(_0xf8ba('0x59'));}})['spread'](function(_0x422726,_0x5c50e0){if(_0x422726){_0x284e27=_0x5c50e0;if(!_0x5c50e0){return _0x422726[_0xf8ba('0x5a')]({'inReplyTo':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x50')],'to':_0x2ce4a5[_0xf8ba('0x28')]['message'][_0xf8ba('0x38')],'cc':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')]['cc'],'subject':_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x52')],'attach':_0x422726[_0xf8ba('0x53')]?_0x422726[_0xf8ba('0x53')]:_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x53')],'substatus':null,'substatusAt':moment()[_0xf8ba('0x54')](_0xf8ba('0x55')),'lastMsgAt':moment()[_0xf8ba('0x54')](_0xf8ba('0x55')),'lastMsgDirection':'in'});}else{return _0x422726;}}})['then'](function(_0x2c31c6){_0x22231b['interaction']=_0x2c31c6[_0xf8ba('0x41')]({'plain':!![]});_0x22231b[_0xf8ba('0x5b')][_0xf8ba('0x5c')]=_0x284e27;return db[_0xf8ba('0x5d')]['create']({'body':_0x2ce4a5[_0xf8ba('0x28')]['body'],'MailAccountId':_0x2ce4a5[_0xf8ba('0x39')]['id'],'MailInteractionId':_0x2c31c6['id'],'direction':'in','ContactId':_0x22231b['contact']['id'],'messageId':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x50')],'from':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x38')],'to':_0x2ce4a5[_0xf8ba('0x28')]['message']['to'],'cc':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')]['cc'],'subject':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x52')],'attach':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x53')],'Attachments':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x5e')],'originTo':_0x2ce4a5[_0xf8ba('0x28')]['message'][_0xf8ba('0x5f')],'originCc':_0x2ce4a5['body'][_0xf8ba('0x16')][_0xf8ba('0x60')],'bcc':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x61')],'ChatWebsiteId':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')]['ChatWebsiteId']||null,'originChannel':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x62')]||_0xf8ba('0x63'),'ChatOfflineMessageId':_0x2ce4a5[_0xf8ba('0x28')][_0xf8ba('0x16')][_0xf8ba('0x64')]||null},{'include':[{'model':db[_0xf8ba('0x65')],'as':_0xf8ba('0x66')}]});})['then'](function(_0x59c2b1){_0x22231b[_0xf8ba('0x16')]=_0x59c2b1;if(_0x22231b[_0xf8ba('0x5b')]['UserId']){return db[_0xf8ba('0x67')][_0xf8ba('0x25')]({'attributes':['id',_0xf8ba('0x68')],'where':{'id':_0x22231b[_0xf8ba('0x5b')]['UserId']}})['then'](function(_0x2ec0a4){if(_0x2ec0a4){_0x22231b[_0xf8ba('0x42')]['unshift']({'id':0x0,'priority':0x0,'app':_0xf8ba('0x69'),'appdata':_0x2ec0a4['name']+','+(_0x22231b[_0xf8ba('0x39')][_0xf8ba('0x6a')]||0xa),'interval':_0xf8ba('0x6b')});}return respondWithRpcPromise(_0xf8ba('0x6c'),_0xf8ba('0x6d'),_0x22231b);});}return respondWithRpcPromise('Start','startRouting',_0x22231b);})[_0xf8ba('0xe')](function(_0x4c5294){_0x556ee2(_0x4c5294);})[_0xf8ba('0x23')](function(_0x47ffdf){_0x21b8ca(_0x37ee5a[_0xf8ba('0x14')](0x1f4,_0x47ffdf[_0xf8ba('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.socket.js b/server/api/mailAccount/mailAccount.socket.js index 1c5fe4b..ebfb20f 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 _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 +var _0x87ad=['remove','update','emit','register','length','mailAccount:','./mailAccount.events','save'];(function(_0x206801,_0xb81807){var _0x21d1fc=function(_0xd43bbf){while(--_0xd43bbf){_0x206801['push'](_0x206801['shift']());}};_0x21d1fc(++_0xb81807);}(_0x87ad,0x76));var _0xd87a=function(_0x1d993b,_0x36bd8f){_0x1d993b=_0x1d993b-0x0;var _0xf17911=_0x87ad[_0x1d993b];return _0xf17911;};'use strict';var MailAccountEvents=require(_0xd87a('0x0'));var events=[_0xd87a('0x1'),_0xd87a('0x2'),_0xd87a('0x3')];function createListener(_0x42dbe5,_0x5aed6f){return function(_0x549152){_0x5aed6f[_0xd87a('0x4')](_0x42dbe5,_0x549152);};}function removeListener(_0x40cf6f,_0x362529){return function(){MailAccountEvents['removeListener'](_0x40cf6f,_0x362529);};}exports[_0xd87a('0x5')]=function(_0x5c81f7){for(var _0x18ece2=0x0,_0x4bb2e8=events[_0xd87a('0x6')];_0x18ece2<_0x4bb2e8;_0x18ece2++){var _0x11bf47=events[_0x18ece2];var _0x50610d=createListener(_0xd87a('0x7')+_0x11bf47,_0x5c81f7);MailAccountEvents['on'](_0x11bf47,_0x50610d);}}; \ No newline at end of file diff --git a/server/api/mailApplication/index.js b/server/api/mailApplication/index.js index 851cb63..4e6224b 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 _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 +var _0x9400=['update','delete','/:id','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailApplication.controller','get','isAuthenticated','show','put'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0x9400,0x103));var _0x0940=function(_0x4a6bb6,_0x314c18){_0x4a6bb6=_0x4a6bb6-0x0;var _0x181a77=_0x9400[_0x4a6bb6];return _0x181a77;};'use strict';var multer=require(_0x0940('0x0'));var util=require(_0x0940('0x1'));var path=require(_0x0940('0x2'));var timeout=require('connect-timeout');var express=require(_0x0940('0x3'));var router=express[_0x0940('0x4')]();var fs_extra=require(_0x0940('0x5'));var auth=require(_0x0940('0x6'));var interaction=require(_0x0940('0x7'));var config=require('../../config/environment');var controller=require(_0x0940('0x8'));router[_0x0940('0x9')]('/:id',auth[_0x0940('0xa')](),controller[_0x0940('0xb')]);router[_0x0940('0xc')]('/:id',auth[_0x0940('0xa')](),controller[_0x0940('0xd')]);router[_0x0940('0xe')](_0x0940('0xf'),auth[_0x0940('0xa')](),controller[_0x0940('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.attributes.js b/server/api/mailApplication/mailApplication.attributes.js index 724fb4f..93d8260 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 _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 +var _0xbd63=['INTEGER','STRING','noop','TEXT','exports'];(function(_0xe45501,_0x5dfd0e){var _0x5f4b00=function(_0x5a1681){while(--_0x5a1681){_0xe45501['push'](_0xe45501['shift']());}};_0x5f4b00(++_0x5dfd0e);}(_0xbd63,0x81));var _0x3bd6=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xbd63[_0x46698a];return _0x356db0;};'use strict';var Sequelize=require('sequelize');module[_0x3bd6('0x0')]={'priority':{'type':Sequelize[_0x3bd6('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x3bd6('0x2')],'allowNull':![],'defaultValue':_0x3bd6('0x3')},'appdata':{'type':Sequelize[_0x3bd6('0x4')]()},'description':{'type':Sequelize[_0x3bd6('0x2')]},'interval':{'type':Sequelize[_0x3bd6('0x2')],'defaultValue':'*,*,*,*'}}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.controller.js b/server/api/mailApplication/mailApplication.controller.js index fdc1c7a..3a03cd5 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 _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 +var _0x9bde=['../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','then','destroy','error','name','send','show','model','keys','MailApplication','rawAttributes','query','filters','intersection','attributes','fields','length','includeAll','include','merge','options','find','catch','update','body','params','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment'];(function(_0x26224c,_0x1a354c){var _0x4c2bc5=function(_0x179343){while(--_0x179343){_0x26224c['push'](_0x26224c['shift']());}};_0x4c2bc5(++_0x1a354c);}(_0x9bde,0xe1));var _0xe9bd=function(_0x32cc41,_0x100671){_0x32cc41=_0x32cc41-0x0;var _0x157d7a=_0x9bde[_0x32cc41];return _0x157d7a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe9bd('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe9bd('0x1'));var rp=require('request-promise');var moment=require(_0xe9bd('0x2'));var BPromise=require(_0xe9bd('0x3'));var Mustache=require(_0xe9bd('0x4'));var util=require(_0xe9bd('0x5'));var path=require(_0xe9bd('0x6'));var sox=require(_0xe9bd('0x7'));var csv=require(_0xe9bd('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe9bd('0x9'));var _=require(_0xe9bd('0xa'));var squel=require(_0xe9bd('0xb'));var crypto=require(_0xe9bd('0xc'));var jsforce=require(_0xe9bd('0xd'));var deskjs=require(_0xe9bd('0xe'));var toCsv=require(_0xe9bd('0x8'));var querystring=require(_0xe9bd('0xf'));var Papa=require(_0xe9bd('0x10'));var Redis=require(_0xe9bd('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xe9bd('0x12'));var hardwareService=require(_0xe9bd('0x13'));var logger=require(_0xe9bd('0x14'))('api');var utils=require(_0xe9bd('0x15'));var config=require(_0xe9bd('0x16'));var licenseUtil=require(_0xe9bd('0x17'));var db=require(_0xe9bd('0x18'))['db'];function respondWithStatusCode(_0x5e022a,_0x2c1d98){_0x2c1d98=_0x2c1d98||0xcc;return function(_0x4ac319){if(_0x4ac319){return _0x5e022a[_0xe9bd('0x19')](_0x2c1d98);}return _0x5e022a[_0xe9bd('0x1a')](_0x2c1d98)[_0xe9bd('0x1b')]();};}function respondWithResult(_0x51109f,_0x47ba5e){_0x47ba5e=_0x47ba5e||0xc8;return function(_0x46a95e){if(_0x46a95e){return _0x51109f[_0xe9bd('0x1a')](_0x47ba5e)[_0xe9bd('0x1c')](_0x46a95e);}};}function respondWithFilteredResult(_0x46a59b,_0x3360bd){return function(_0x389e7b){if(_0x389e7b){var _0x45a9f2=typeof _0x3360bd['offset']===_0xe9bd('0x1d')&&typeof _0x3360bd[_0xe9bd('0x1e')]===_0xe9bd('0x1d');var _0x494b27=_0x389e7b[_0xe9bd('0x1f')];var _0x3bae08=_0x45a9f2?0x0:_0x3360bd[_0xe9bd('0x20')];var _0x330733=_0x45a9f2?_0x389e7b['count']:_0x3360bd[_0xe9bd('0x20')]+_0x3360bd['limit'];var _0xc6b661;if(_0x330733>=_0x494b27){_0x330733=_0x494b27;_0xc6b661=0xc8;}else{_0xc6b661=0xce;}_0x46a59b['status'](_0xc6b661);return _0x46a59b[_0xe9bd('0x21')](_0xe9bd('0x22'),_0x3bae08+'-'+_0x330733+'/'+_0x494b27)[_0xe9bd('0x1c')](_0x389e7b);}return null;};}function patchUpdates(_0x3dda13){return function(_0x1acb82){try{jsonpatch[_0xe9bd('0x23')](_0x1acb82,_0x3dda13,!![]);}catch(_0x6593ce){return BPromise['reject'](_0x6593ce);}return _0x1acb82[_0xe9bd('0x24')]();};}function saveUpdates(_0x28cd17,_0x4ecaf5){return function(_0x37aec1){if(_0x37aec1){return _0x37aec1['update'](_0x28cd17)[_0xe9bd('0x25')](function(_0x1b9cc9){return _0x1b9cc9;});}return null;};}function removeEntity(_0x36f8c0,_0xf02209){return function(_0x5bc4bf){if(_0x5bc4bf){return _0x5bc4bf[_0xe9bd('0x26')]()[_0xe9bd('0x25')](function(){_0x36f8c0[_0xe9bd('0x1a')](0xcc)[_0xe9bd('0x1b')]();});}};}function handleEntityNotFound(_0x2641be,_0xb52d45){return function(_0x399f3c){if(!_0x399f3c){_0x2641be[_0xe9bd('0x19')](0x194);}return _0x399f3c;};}function handleError(_0x1ae889,_0x5987af){_0x5987af=_0x5987af||0x1f4;return function(_0x3c211a){logger[_0xe9bd('0x27')](_0x3c211a['stack']);if(_0x3c211a[_0xe9bd('0x28')]){delete _0x3c211a[_0xe9bd('0x28')];}_0x1ae889[_0xe9bd('0x1a')](_0x5987af)[_0xe9bd('0x29')](_0x3c211a);};}exports[_0xe9bd('0x2a')]=function(_0x183601,_0x519f48){var _0x5b7f1d={'raw':!![],'where':{'id':_0x183601['params']['id']}},_0x1de54c={};_0x1de54c[_0xe9bd('0x2b')]=_[_0xe9bd('0x2c')](db[_0xe9bd('0x2d')][_0xe9bd('0x2e')]);_0x1de54c[_0xe9bd('0x2f')]=_['keys'](_0x183601['query']);_0x1de54c[_0xe9bd('0x30')]=_[_0xe9bd('0x31')](_0x1de54c[_0xe9bd('0x2b')],_0x1de54c[_0xe9bd('0x2f')]);_0x5b7f1d[_0xe9bd('0x32')]=_[_0xe9bd('0x31')](_0x1de54c[_0xe9bd('0x2b')],qs[_0xe9bd('0x33')](_0x183601[_0xe9bd('0x2f')]['fields']));_0x5b7f1d[_0xe9bd('0x32')]=_0x5b7f1d[_0xe9bd('0x32')][_0xe9bd('0x34')]?_0x5b7f1d['attributes']:_0x1de54c['model'];if(_0x183601[_0xe9bd('0x2f')][_0xe9bd('0x35')]){_0x5b7f1d[_0xe9bd('0x36')]=[{'all':!![]}];}_0x5b7f1d=_[_0xe9bd('0x37')]({},_0x5b7f1d,_0x183601[_0xe9bd('0x38')]);return db[_0xe9bd('0x2d')][_0xe9bd('0x39')](_0x5b7f1d)[_0xe9bd('0x25')](handleEntityNotFound(_0x519f48,null))[_0xe9bd('0x25')](respondWithResult(_0x519f48,null))[_0xe9bd('0x3a')](handleError(_0x519f48,null));};exports[_0xe9bd('0x3b')]=function(_0x549dd1,_0x2ad46e){if(_0x549dd1[_0xe9bd('0x3c')]['id']){delete _0x549dd1[_0xe9bd('0x3c')]['id'];}return db[_0xe9bd('0x2d')][_0xe9bd('0x39')]({'where':{'id':_0x549dd1[_0xe9bd('0x3d')]['id']}})['then'](handleEntityNotFound(_0x2ad46e,null))[_0xe9bd('0x25')](saveUpdates(_0x549dd1[_0xe9bd('0x3c')],null))['then'](respondWithResult(_0x2ad46e,null))[_0xe9bd('0x3a')](handleError(_0x2ad46e,null));};exports[_0xe9bd('0x26')]=function(_0x4c7d47,_0x4b1da0){return db[_0xe9bd('0x2d')][_0xe9bd('0x39')]({'where':{'id':_0x4c7d47['params']['id']}})[_0xe9bd('0x25')](handleEntityNotFound(_0x4b1da0,null))[_0xe9bd('0x25')](removeEntity(_0x4b1da0,null))[_0xe9bd('0x3a')](handleError(_0x4b1da0,null));}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.model.js b/server/api/mailApplication/mailApplication.model.js index 8fd74b3..3dfcc76 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 _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 +var _0x9aba=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','MailApplication','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x9aba,0x1eb));var _0xa9ab=function(_0x544acd,_0x155321){_0x544acd=_0x544acd-0x0;var _0x5e9f5d=_0x9aba[_0x544acd];return _0x5e9f5d;};'use strict';var _=require(_0xa9ab('0x0'));var util=require(_0xa9ab('0x1'));var logger=require(_0xa9ab('0x2'))(_0xa9ab('0x3'));var moment=require(_0xa9ab('0x4'));var BPromise=require(_0xa9ab('0x5'));var rp=require(_0xa9ab('0x6'));var fs=require('fs');var path=require(_0xa9ab('0x7'));var rimraf=require(_0xa9ab('0x8'));var config=require(_0xa9ab('0x9'));var attributes=require('./mailApplication.attributes');module['exports']=function(_0x53abff,_0x43131b){return _0x53abff[_0xa9ab('0xa')](_0xa9ab('0xb'),attributes,{'tableName':'mail_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xa9ab('0xc')});}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.rpc.js b/server/api/mailApplication/mailApplication.rpc.js index 72a4942..f16d890 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 _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 +var _0xebb1=['MailApplication,\x20%s,\x20%s','MailApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','update','body','options','raw','where','attributes','debug','UpdateMailApplication','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xebb1,0x1e3));var _0x1ebb=function(_0x5da148,_0x181fbe){_0x5da148=_0x5da148-0x0;var _0x300ee6=_0xebb1[_0x5da148];return _0x300ee6;};'use strict';var _=require('lodash');var util=require(_0x1ebb('0x0'));var moment=require(_0x1ebb('0x1'));var BPromise=require(_0x1ebb('0x2'));var rs=require(_0x1ebb('0x3'));var fs=require('fs');var Redis=require(_0x1ebb('0x4'));var db=require(_0x1ebb('0x5'))['db'];var utils=require(_0x1ebb('0x6'));var logger=require(_0x1ebb('0x7'))(_0x1ebb('0x8'));var config=require(_0x1ebb('0x9'));var jayson=require(_0x1ebb('0xa'));var client=jayson['client'][_0x1ebb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2d3115,_0x5159b3,_0x5f4f64){return new BPromise(function(_0x5da402,_0x3acbb3){return client['request'](_0x2d3115,_0x5f4f64)[_0x1ebb('0xc')](function(_0x57ecfe){logger['info'](_0x1ebb('0xd'),_0x5159b3,'request\x20sent');logger['debug'](_0x1ebb('0xe'),_0x5159b3,_0x1ebb('0xf'),JSON[_0x1ebb('0x10')](_0x57ecfe));if(_0x57ecfe[_0x1ebb('0x11')]){if(_0x57ecfe[_0x1ebb('0x11')][_0x1ebb('0x12')]===0x1f4){logger['error'](_0x1ebb('0xd'),_0x5159b3,_0x57ecfe[_0x1ebb('0x11')][_0x1ebb('0x13')]);return _0x3acbb3(_0x57ecfe[_0x1ebb('0x11')][_0x1ebb('0x13')]);}logger[_0x1ebb('0x11')]('MailApplication,\x20%s,\x20%s',_0x5159b3,_0x57ecfe['error'][_0x1ebb('0x13')]);return _0x5da402(_0x57ecfe[_0x1ebb('0x11')]['message']);}else{logger[_0x1ebb('0x14')](_0x1ebb('0xd'),_0x5159b3,_0x1ebb('0xf'));_0x5da402(_0x57ecfe[_0x1ebb('0x15')][_0x1ebb('0x13')]);}})[_0x1ebb('0x16')](function(_0x874c95){logger[_0x1ebb('0x11')](_0x1ebb('0xd'),_0x5159b3,_0x874c95);_0x3acbb3(_0x874c95);});});}exports['UpdateMailApplication']=function(_0xb1fbc8){var _0x4b5a33=this;return new Promise(function(_0x2b90f5,_0x855ae2){return db['MailApplication'][_0x1ebb('0x17')](_0xb1fbc8[_0x1ebb('0x18')],{'raw':_0xb1fbc8[_0x1ebb('0x19')]?_0xb1fbc8[_0x1ebb('0x19')][_0x1ebb('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xb1fbc8[_0x1ebb('0x19')]?_0xb1fbc8['options'][_0x1ebb('0x1b')]||null:null,'attributes':_0xb1fbc8[_0x1ebb('0x19')]?_0xb1fbc8[_0x1ebb('0x19')][_0x1ebb('0x1c')]||null:null,'limit':_0xb1fbc8[_0x1ebb('0x19')]?_0xb1fbc8[_0x1ebb('0x19')]['limit']||null:null})[_0x1ebb('0xc')](function(_0x4f941d){logger[_0x1ebb('0x14')]('UpdateMailApplication',_0xb1fbc8);logger[_0x1ebb('0x1d')](_0x1ebb('0x1e'),_0xb1fbc8,JSON[_0x1ebb('0x10')](_0x4f941d));_0x2b90f5(_0x4f941d);})['catch'](function(_0x386cc4){logger[_0x1ebb('0x11')](_0x1ebb('0x1e'),_0x386cc4['message'],_0xb1fbc8);_0x855ae2(_0x4b5a33['error'](0x1f4,_0x386cc4[_0x1ebb('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/index.js b/server/api/mailInteraction/index.js index c17e4d8..6e9388d 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 _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 +var _0x4ba6=['/:id','show','/:id/messages','getMessages','/:id/download','create','post','mail','mailinteraction:addtags','addTags','put','mailinteraction:update','delete','mailinteraction:destroy','destroy','/:id/tags','exports','multer','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailInteraction.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x586f3b,_0x120c59){var _0x40ddc2=function(_0x5ea425){while(--_0x5ea425){_0x586f3b['push'](_0x586f3b['shift']());}};_0x40ddc2(++_0x120c59);}(_0x4ba6,0x11f));var _0x64ba=function(_0x5a474d,_0x3c85e2){_0x5a474d=_0x5a474d-0x0;var _0x512f2a=_0x4ba6[_0x5a474d];return _0x512f2a;};'use strict';var multer=require(_0x64ba('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x64ba('0x1'));var router=express[_0x64ba('0x2')]();var fs_extra=require(_0x64ba('0x3'));var auth=require(_0x64ba('0x4'));var interaction=require(_0x64ba('0x5'));var config=require(_0x64ba('0x6'));var controller=require(_0x64ba('0x7'));router['get']('/',auth[_0x64ba('0x8')](),controller[_0x64ba('0x9')]);router[_0x64ba('0xa')](_0x64ba('0xb'),auth[_0x64ba('0x8')](),controller[_0x64ba('0xc')]);router[_0x64ba('0xa')](_0x64ba('0xd'),auth[_0x64ba('0x8')](),controller[_0x64ba('0xe')]);router[_0x64ba('0xa')](_0x64ba('0xf'),auth[_0x64ba('0x8')](),controller[_0x64ba('0x10')]);router[_0x64ba('0xa')](_0x64ba('0x11'),auth['isAuthenticated'](),controller['download']);router['post']('/',auth[_0x64ba('0x8')](),controller[_0x64ba('0x12')]);router['post'](_0x64ba('0xf'),auth[_0x64ba('0x8')](),controller['addMessage']);router[_0x64ba('0x13')]('/:id/tags',auth[_0x64ba('0x8')](),interaction['tracked'](_0x64ba('0x14'),_0x64ba('0x15')),controller[_0x64ba('0x16')]);router[_0x64ba('0x17')](_0x64ba('0xd'),auth['isAuthenticated'](),interaction['tracked'](_0x64ba('0x14'),_0x64ba('0x18')),controller['update']);router[_0x64ba('0x19')](_0x64ba('0xd'),auth[_0x64ba('0x8')](),interaction['tracked'](_0x64ba('0x14'),_0x64ba('0x1a')),controller[_0x64ba('0x1b')]);router[_0x64ba('0x19')](_0x64ba('0x1c'),auth[_0x64ba('0x8')](),controller['removeTags']);module[_0x64ba('0x1d')]=router; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.attributes.js b/server/api/mailInteraction/mailInteraction.attributes.js index 69f0679..40054da 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 _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 +var _0x5562=['BOOLEAN','DATE','STRING','TEXT','long','ENUM','out','sequelize','iconv','exports'];(function(_0x147cad,_0x2bd961){var _0x4dd766=function(_0x5bb26f){while(--_0x5bb26f){_0x147cad['push'](_0x147cad['shift']());}};_0x4dd766(++_0x2bd961);}(_0x5562,0x133));var _0x2556=function(_0x197185,_0x251145){_0x197185=_0x197185-0x0;var _0x2c8af1=_0x5562[_0x197185];return _0x2c8af1;};'use strict';var Sequelize=require(_0x2556('0x0'));var iconv=require(_0x2556('0x1'));module[_0x2556('0x2')]={'closed':{'type':Sequelize[_0x2556('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x2556('0x4')]},'disposition':{'type':Sequelize[_0x2556('0x5')]},'secondDisposition':{'type':Sequelize[_0x2556('0x5')]},'thirdDisposition':{'type':Sequelize[_0x2556('0x5')]},'note':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0x2556('0x5')](0x1fe)},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x2556('0x6')](_0x2556('0x7'))},'subject':{'type':Sequelize[_0x2556('0x6')]()},'attach':{'type':Sequelize[_0x2556('0x3')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x2556('0x4')]},'substatus':{'type':Sequelize['STRING'](0x3c)},'substatusAt':{'type':Sequelize[_0x2556('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x2556('0x8')]('in',_0x2556('0x9')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x2556('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x2556('0x8')]('in',_0x2556('0x9')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x2556('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 cd601c4..1728a66 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 _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 +var _0x793c=['expr','search','parseSearch','conditions','find','unreadMessages','value','having','`\x20=\x200','Contact','$substring','length','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','start','end','Tag','union','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','some','compact','MailAccountId','i.MailAccountId\x20IN\x20?','concat','parse','$lte','null','\x20IS\x20NULL','read','isArray','tag','filter','replace','isNumeric','i.id\x20LIKE\x20?','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)','order','contactName','DESC','t.id\x20IN\x20?','resolve','i.MailAccountId\x20IS\x20NOT\x20NULL','user','role','agent','isEmpty','i.MailAccountId\x20IS\x20NULL','toString','sequelize','keyBy','merge','a.key','Account.key','Account.mandatoryDisposition','i.createdAt','i.updatedAt','i.closed','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.disposition','i.to','i.ContactId','i.MailAccountId','i.UserId','c.firstName','Contact.firstName','c.lastName','Contact.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.MailInteractionId\x20IN\x20?','groupBy','MailInteractionId','Setting','enableEmailPreview','all','rows','show','params','keys','MailInteraction','includeAll','options','create','body','describe','addMessage','ids','omit','getMessages','$gte','format','YYYY-MM-DD\x20HH:mm:ss','findAll','true','addTags','setTags','spread','mailInteractionTags:save','removeTags','download','unix','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','Attachments','bcc','subject','Messages','get','createdAt','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','existsSync','build','writeFileSync','log','err','unlinkSync','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','desk.js','querystring','papaparse','html-to-text','juice','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','error','name','send','Users','map','TagIds','split','forEach','Tags','push','MailMessage','findOne','out','plainBody','-id','lastMsgText','trimStart','catch','then','index','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','select','field','color','from','tools_tags','u.id','u.fullname','ui.MailInteractionId','left_join','mail_interactions','cm_contacts','users','o.id\x20=\x20i.UserId','mail_accounts','me.MailInteractionId\x20=\x20i.id','it.MailInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId'];(function(_0x297c55,_0x34fa75){var _0x120389=function(_0x595108){while(--_0x595108){_0x297c55['push'](_0x297c55['shift']());}};_0x120389(++_0x34fa75);}(_0x793c,0x99));var _0xc793=function(_0x42bc91,_0x41f40a){_0x42bc91=_0x42bc91-0x0;var _0x3f5507=_0x793c[_0x42bc91];return _0x3f5507;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc793('0x0'));var jsonpatch=require(_0xc793('0x1'));var rp=require(_0xc793('0x2'));var moment=require(_0xc793('0x3'));var BPromise=require(_0xc793('0x4'));var Mustache=require(_0xc793('0x5'));var util=require(_0xc793('0x6'));var path=require('path');var sox=require(_0xc793('0x7'));var csv=require(_0xc793('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xc793('0x9'));var _=require(_0xc793('0xa'));var squel=require(_0xc793('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xc793('0xc'));var toCsv=require(_0xc793('0x8'));var querystring=require(_0xc793('0xd'));var Papa=require(_0xc793('0xe'));var htmlToText=require(_0xc793('0xf'));var juice=require(_0xc793('0x10'));var Redis=require(_0xc793('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xc793('0x12'));var as=require(_0xc793('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc793('0x14'));var utils=require('../../config/utils');var config=require(_0xc793('0x15'));var licenseUtil=require(_0xc793('0x16'));var db=require(_0xc793('0x17'))['db'];config[_0xc793('0x18')]=_[_0xc793('0x19')](config[_0xc793('0x18')],{'host':_0xc793('0x1a'),'port':0x18eb});var socket=require(_0xc793('0x1b'))(new Redis(config['redis']));require('./mailInteraction.socket')[_0xc793('0x1c')](socket);function respondWithStatusCode(_0x3f349b,_0x3028ea){_0x3028ea=_0x3028ea||0xcc;return function(_0x34889a){if(_0x34889a){return _0x3f349b[_0xc793('0x1d')](_0x3028ea);}return _0x3f349b[_0xc793('0x1e')](_0x3028ea)['end']();};}function respondWithResult(_0x1ee3a4,_0x249e0e){_0x249e0e=_0x249e0e||0xc8;return function(_0x26d0d0){if(_0x26d0d0){return _0x1ee3a4[_0xc793('0x1e')](_0x249e0e)[_0xc793('0x1f')](_0x26d0d0);}};}function respondWithFilteredResult(_0x45485a,_0x6d1223){return function(_0x2db984){if(_0x2db984){var _0x59ee34=typeof _0x6d1223[_0xc793('0x20')]===_0xc793('0x21')&&typeof _0x6d1223[_0xc793('0x22')]===_0xc793('0x21');var _0x11182f=_0x2db984[_0xc793('0x23')];var _0x879eb1=_0x59ee34?0x0:_0x6d1223['offset'];var _0x264f24=_0x59ee34?_0x2db984[_0xc793('0x23')]:_0x6d1223['offset']+_0x6d1223['limit'];var _0x2aad8c;if(_0x264f24>=_0x11182f){_0x264f24=_0x11182f;_0x2aad8c=0xc8;}else{_0x2aad8c=0xce;}_0x45485a[_0xc793('0x1e')](_0x2aad8c);return _0x45485a['set'](_0xc793('0x24'),_0x879eb1+'-'+_0x264f24+'/'+_0x11182f)[_0xc793('0x1f')](_0x2db984);}return null;};}function patchUpdates(_0x222476){return function(_0x29e1b9){try{jsonpatch[_0xc793('0x25')](_0x29e1b9,_0x222476,!![]);}catch(_0x468b2b){return BPromise[_0xc793('0x26')](_0x468b2b);}return _0x29e1b9[_0xc793('0x27')]();};}function saveUpdates(_0x5d897e,_0x345788){return function(_0x4ee2c9){if(_0x4ee2c9){return _0x4ee2c9[_0xc793('0x28')](_0x5d897e)['then'](function(_0x205795){return _0x205795;});}return null;};}function removeEntity(_0x475c99,_0x18a611){return function(_0x3aafb8){if(_0x3aafb8){return _0x3aafb8[_0xc793('0x29')]()['then'](function(){_0x475c99['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3963af,_0x43fac8){return function(_0x23bac4){if(!_0x23bac4){_0x3963af[_0xc793('0x1d')](0x194);}return _0x23bac4;};}function handleError(_0x19b081,_0x142dad){_0x142dad=_0x142dad||0x1f4;return function(_0x26d88d){logger[_0xc793('0x2a')](_0x26d88d['stack']);if(_0x26d88d[_0xc793('0x2b')]){delete _0x26d88d[_0xc793('0x2b')];}_0x19b081[_0xc793('0x1e')](_0x142dad)[_0xc793('0x2c')](_0x26d88d);};}function getInteractionUsers(_0x3ed746,_0x3455e5){return new BPromise(function(_0x2e853a,_0x4ba7f0){try{if(_0x3455e5[_0x3ed746['id']]){_0x3ed746[_0xc793('0x2d')]=_[_0xc793('0x2e')](_0x3455e5[_0x3ed746['id']],function(_0x10acce){return{'id':_0x10acce['id'],'fullname':_0x10acce['fullname']};});}}catch(_0x93c3bd){_0x4ba7f0(_0x93c3bd);}_0x2e853a(_0x3ed746);});}function getInteractionTags(_0x383b5d,_0xac5a25){return new BPromise(function(_0x1f1940,_0x71826a){try{if(_0x383b5d[_0xc793('0x2f')]){_0x383b5d['Tags']=[];_0x383b5d['TagIds'][_0xc793('0x30')](',')[_0xc793('0x31')](function(_0x52d037){_0x383b5d[_0xc793('0x32')][_0xc793('0x33')](_0xac5a25[_0x52d037]);});}delete _0x383b5d['TagIds'];}catch(_0x435e76){_0x71826a(_0x435e76);}_0x1f1940(_0x383b5d);});}function getLastMessageText(_0x4b146e){return new BPromise(function(_0x493a6a,_0x5c5af8){return db[_0xc793('0x34')][_0xc793('0x35')]({'where':{'$and':[{'MailInteractionId':_0x4b146e['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':_0xc793('0x36')},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0xc793('0x37')],'order':_0xc793('0x38'),'raw':!![]})['then'](function(_0x3e7901){if(_0x3e7901&&_0x3e7901[_0xc793('0x37')]){_0x4b146e[_0xc793('0x39')]=_[_0xc793('0x3a')](_0x3e7901['plainBody']);}_0x493a6a(_0x4b146e);})[_0xc793('0x3b')](function(_0x21af2a){_0x5c5af8(_0x21af2a);});});}function updateMailInteraction(_0x435c14,_0x1d54e0,_0x3c8fc4,_0x3c023e){return new BPromise(function(_0x5ae98d,_0x351901){return getInteractionUsers(_0x435c14,_0x3c8fc4)[_0xc793('0x3c')](function(_0x53307c){return getInteractionTags(_0x53307c,_0x1d54e0);})['then'](function(_0x5da501){if(_0x3c023e){_0x5ae98d(getLastMessageText(_0x5da501));}else{_0x5ae98d(_0x5da501);}})[_0xc793('0x3b')](function(_0x555f22){_0x351901(_0x555f22);});});}exports[_0xc793('0x3d')]=function(_0x2f2773,_0x1b630d){var _0xb2fb26={},_0x169897={},_0x48c21e={'count':0x0,'rows':[]};var _0x126e23=_[_0xc793('0x2e')](db['MailInteraction'][_0xc793('0x3e')],function(_0x1aee19){return{'name':_0x1aee19[_0xc793('0x3f')],'type':_0x1aee19[_0xc793('0x40')][_0xc793('0x41')]};});_0x169897[_0xc793('0x42')]=_[_0xc793('0x2e')](_0x126e23,'name');_0x169897['query']=_['keys'](_0x2f2773[_0xc793('0x43')]);_0x169897[_0xc793('0x44')]=_[_0xc793('0x45')](_0x169897[_0xc793('0x42')],_0x169897[_0xc793('0x43')]);_0xb2fb26[_0xc793('0x46')]=_['intersection'](_0x169897[_0xc793('0x42')],qs[_0xc793('0x47')](_0x2f2773[_0xc793('0x43')]['fields']));_0xb2fb26[_0xc793('0x46')]=_0xb2fb26[_0xc793('0x46')]['length']?_0xb2fb26['attributes']:_0x169897[_0xc793('0x42')];if(!_0x2f2773[_0xc793('0x43')][_0xc793('0x48')](_0xc793('0x49'))){_0xb2fb26['limit']=qs[_0xc793('0x22')](_0x2f2773[_0xc793('0x43')][_0xc793('0x22')]);_0xb2fb26['offset']=qs[_0xc793('0x20')](_0x2f2773[_0xc793('0x43')][_0xc793('0x20')]);}_0xb2fb26['order']=qs[_0xc793('0x4a')](_0x2f2773['query'][_0xc793('0x4a')]);_0xb2fb26[_0xc793('0x4b')]=qs[_0xc793('0x44')](_['pick'](_0x2f2773[_0xc793('0x43')],_0x169897['filters']),_0x126e23);var _0x45eb23=[];var _0x160ec0=squel[_0xc793('0x4c')]()[_0xc793('0x4d')]('id')['field'](_0xc793('0x2b'))[_0xc793('0x4d')](_0xc793('0x4e'))[_0xc793('0x4f')](_0xc793('0x50'));var _0x1311b8=squel[_0xc793('0x4c')]()[_0xc793('0x4d')](_0xc793('0x51'))['field'](_0xc793('0x52'))[_0xc793('0x4d')](_0xc793('0x53'))[_0xc793('0x4f')]('user_has_mail_interactions','ui')[_0xc793('0x54')]('users','u','u.id\x20=\x20ui.UserId');var _0x50e068=squel[_0xc793('0x4c')]()[_0xc793('0x4f')](_0xc793('0x55'),'i')[_0xc793('0x54')](_0xc793('0x56'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0xc793('0x54')](_0xc793('0x57'),'o',_0xc793('0x58'))[_0xc793('0x54')](_0xc793('0x59'),'a','a.id\x20=\x20i.MailAccountId')['left_join']('mail_messages','me',_0xc793('0x5a'))['left_join']('mail_interaction_has_tags','it',_0xc793('0x5b'))[_0xc793('0x54')](_0xc793('0x50'),'t',_0xc793('0x5c'));var _0x47e4d8=squel['expr']();var _0x913281=[];var _0x36d187=squel[_0xc793('0x5d')]();var _0x4db0d4;if(_0x2f2773[_0xc793('0x43')][_0xc793('0x5e')]){_0x4db0d4=as[_0xc793('0x5f')](_0x2f2773[_0xc793('0x43')]['search']);var _0x2d088d=_0x4db0d4['sqlOperator'];for(var _0x30dd11=0x0;_0x30dd11<_0x4db0d4[_0xc793('0x60')]['length'];_0x30dd11++){var _0x420dc2=_0x4db0d4[_0xc793('0x60')][_0x30dd11];var _0x584c84='i';var _0xcd863b=_[_0xc793('0x61')](_0x126e23,[_0xc793('0x2b'),_0x420dc2[_0xc793('0x4d')]]);if(!_0xcd863b){switch(_0x420dc2[_0xc793('0x4d')]){case _0xc793('0x62'):if(_0x420dc2[_0xc793('0x63')]==0x1){_0x50e068[_0xc793('0x64')]('`'+_0x420dc2[_0xc793('0x4d')]+_0xc793('0x65'));}else{_0x50e068['having']('`'+_0x420dc2['field']+'`\x20>\x200');}break;case _0xc793('0x66'):if(_0x420dc2['operator']===_0xc793('0x67')){if(_0x420dc2[_0xc793('0x63')][_0xc793('0x30')]('\x20')[_0xc793('0x68')]>0x1){_0x47e4d8[_0x2d088d](_0xc793('0x69'),qs[_0xc793('0x6a')](_0x420dc2[_0xc793('0x63')]),null);}else{var _0x2cbd89='%'+_0x420dc2['value']+'%';_0x47e4d8[_0x2d088d](_0xc793('0x6b'),_0x2cbd89,_0x2cbd89,_0x2cbd89);}}else{_0xcd863b=_[_0xc793('0x61')](_0x126e23,[_0xc793('0x2b'),_0xc793('0x6c')]);_0x420dc2[_0xc793('0x4d')]=_0xc793('0x6c');_0x301d09=as[_0xc793('0x6d')](_0x584c84,_0xcd863b[_0xc793('0x40')],_0x420dc2);_0x47e4d8[_0x2d088d](_0x301d09[_0xc793('0x6e')],_0x301d09['value'][_0xc793('0x6f')],_0x301d09[_0xc793('0x63')][_0xc793('0x70')]);}break;case _0xc793('0x71'):var _0x299de5=_0x420dc2[_0xc793('0x63')]['split'](',')['map'](function(_0x3b4b31){return Number(_0x3b4b31);});_0x299de5[_0xc793('0x31')](function(_0x5e4eef){_0x36d187['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x5e4eef+',%');});_0x913281=_[_0xc793('0x72')](_0x913281,_0x299de5);break;case _0xc793('0x73'):if(_0x420dc2['operator']==='$substring'){_0x47e4d8[_0x2d088d](_0xc793('0x74'),'%'+_0x420dc2['value']+'%',null);}else{_0xcd863b=_[_0xc793('0x61')](_0x126e23,[_0xc793('0x2b'),'UserId']);_0x420dc2[_0xc793('0x4d')]=_0xc793('0x75');_0x301d09=as['buildExpression'](_0x584c84,_0xcd863b[_0xc793('0x40')],_0x420dc2);_0x47e4d8[_0x2d088d](_0x301d09[_0xc793('0x6e')],_0x301d09['value']['start'],_0x301d09[_0xc793('0x63')][_0xc793('0x70')]);}break;case'plainBody':_0x301d09=as[_0xc793('0x6d')]('me',null,_0x420dc2);_0x47e4d8[_0x2d088d](_0x301d09[_0xc793('0x6e')],_0x301d09[_0xc793('0x63')][_0xc793('0x6f')],_0x301d09[_0xc793('0x63')][_0xc793('0x70')]);break;}}else{var _0x301d09=as[_0xc793('0x6d')](_0x584c84,_0xcd863b[_0xc793('0x40')],_0x420dc2);_0x47e4d8[_0x2d088d](_0x301d09[_0xc793('0x6e')],_0x301d09[_0xc793('0x63')][_0xc793('0x6f')],_0x301d09[_0xc793('0x63')][_0xc793('0x70')]);}}}else{var _0xf85920=_(_0x2f2773[_0xc793('0x43')])['keys']()[_0xc793('0x2e')](function(_0x55314a){return _[_0xc793('0x76')](_0x126e23,[_0xc793('0x2b'),_0x55314a])?_0x55314a:undefined;})[_0xc793('0x77')]()['value']();if(!_['isEmpty'](_0xf85920)){_0xf85920[_0xc793('0x31')](function(_0x30dd31){if(_0x30dd31===_0xc793('0x78')){_0x50e068['where'](_0xc793('0x79'),[][_0xc793('0x7a')](_0x2f2773[_0xc793('0x43')][_0x30dd31]));}else if(_0x30dd31==='createdAt'){var _0x3adff0=JSON['parse'](_0x2f2773[_0xc793('0x43')][_0x30dd31])['$gte'];var _0x510dad=JSON[_0xc793('0x7b')](_0x2f2773[_0xc793('0x43')][_0x30dd31])[_0xc793('0x7c')];_0x50e068[_0xc793('0x4b')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x3adff0,_0x510dad);}else{if(_0x2f2773[_0xc793('0x43')][_0x30dd31]===_0xc793('0x7d')){_0x50e068['where']('i.'+_0x30dd31+_0xc793('0x7e'));}else{_0x50e068[_0xc793('0x4b')]('i.'+_0x30dd31+'\x20=\x20?',_0x2f2773[_0xc793('0x43')][_0x30dd31]);}}});}if(_0x2f2773['query']['read']){if(_0x2f2773[_0xc793('0x43')][_0xc793('0x7f')]==0x1){_0x50e068[_0xc793('0x64')]('`unreadMessages`\x20=\x200');}else{_0x50e068[_0xc793('0x64')]('`unreadMessages`\x20>\x200');}}if(_0x2f2773[_0xc793('0x43')]['tag']){_0x913281=_[_0xc793('0x80')](_0x2f2773[_0xc793('0x43')][_0xc793('0x81')])?_0x2f2773[_0xc793('0x43')][_0xc793('0x81')]:new Array(_0x2f2773[_0xc793('0x43')][_0xc793('0x81')]);_0x913281['forEach'](function(_0x42643b){_0x36d187['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x42643b+',%');});}if(_0x2f2773[_0xc793('0x43')][_0xc793('0x82')]){var _0x320032=_0x2f2773['query'][_0xc793('0x82')]['replace']('\x5c','\x5c\x5c')[_0xc793('0x83')](/'/g,'\x27\x27');if(qs[_0xc793('0x84')](_0x320032)){_0x47e4d8['or'](_0xc793('0x85'),_0x320032+'%');}else if(qs['isEmail'](_0x320032)){_0x47e4d8['or'](_0xc793('0x86'),_0x320032+'%');}else{_0x47e4d8['or'](_0xc793('0x87'),qs[_0xc793('0x6a')](_0x320032))['or'](_0xc793('0x88'),qs['getFullTextValue'](_0x320032));}}}_0x50e068[_0xc793('0x4b')](_0x47e4d8);_0x50e068[_0xc793('0x89')](_0xc793('0x8a'));var _0x24fe49={'type':db[_0xc793('0x8b')][_0xc793('0x8c')][_0xc793('0x8d')],'raw':!![]};var _0x1e5071=_0x50e068[_0xc793('0x8e')]();_0x1e5071[_0xc793('0x4d')](_0xc793('0x8a'));_0x1e5071[_0xc793('0x4d')](_0xc793('0x8f'),'unreadMessages');if(_0xb2fb26[_0xc793('0x90')]){_0xb2fb26['order'][_0xc793('0x31')](function(_0x8d867){var _0x48e705=_0x8d867[0x0]===_0xc793('0x91')?_0x8d867[0x0]:'i.'+_0x8d867[0x0];_0x50e068[_0xc793('0x90')](_0x48e705,_0x8d867[0x1]===_0xc793('0x92')?![]:!![]);});}if(!_['isEmpty'](_0x913281)){_0x50e068[_0xc793('0x64')](_0x36d187);_0x1e5071['where'](_0xc793('0x93'),_0x913281);}BPromise[_0xc793('0x94')]()[_0xc793('0x3c')](function(){if(!_0x4db0d4){if(_0x2f2773[_0xc793('0x43')][_0xc793('0x78')])return;_0x1e5071[_0xc793('0x4b')]('i.MailAccountId\x20IS\x20NOT\x20NULL');_0x50e068['where'](_0xc793('0x95'));return;}if(_0x2f2773[_0xc793('0x96')][_0xc793('0x97')]!==_0xc793('0x98'))return;return _0x2f2773[_0xc793('0x96')]['getMailAccounts']({'attributes':['id'],'raw':!![]})[_0xc793('0x3c')](function(_0x3cd069){if(_[_0xc793('0x99')](_0x3cd069)){_0x1e5071[_0xc793('0x4b')](_0xc793('0x9a'));_0x50e068[_0xc793('0x4b')](_0xc793('0x9a'));}else{_0x1e5071[_0xc793('0x4b')](_0xc793('0x79'),_[_0xc793('0x2e')](_0x3cd069,'id'));_0x50e068['where']('i.MailAccountId\x20IN\x20?',_[_0xc793('0x2e')](_0x3cd069,'id'));}});})[_0xc793('0x3c')](function(){if(_0x2f2773['user'][_0xc793('0x97')]===_0xc793('0x98')&&!_0x4db0d4&&!_0x2f2773[_0xc793('0x43')]['MailAccountId'])return[];return db['sequelize'][_0xc793('0x43')](_0x1e5071[_0xc793('0x9b')](),_0x24fe49);})[_0xc793('0x3c')](function(_0x3aa47a){_0x48c21e[_0xc793('0x23')]=_0x3aa47a[_0xc793('0x68')];if(_0x48c21e[_0xc793('0x23')]===0x0)return[];return db[_0xc793('0x9c')]['query'](_0x160ec0['toString'](),_0x24fe49)['then'](function(_0x47f0dd){_0x45eb23=_[_0xc793('0x9d')](_0x47f0dd,'id');_0x24fe49=_[_0xc793('0x9e')](_0x24fe49,{'model':db['MailInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2f2773[_0xc793('0x43')][_0xc793('0x47')]){_0xb2fb26['attributes']['forEach'](function(_0x55bfbf){_0x50e068[_0xc793('0x4d')]('i.'+_0x55bfbf);});}else{_0x50e068[_0xc793('0x4d')](_0xc793('0x8f'),_0xc793('0x62'));_0x50e068[_0xc793('0x4d')](_0xc793('0x9f'),_0xc793('0xa0'));_0x50e068[_0xc793('0x4d')]('a.mandatoryDisposition',_0xc793('0xa1'));_0x50e068['field']('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',_0xc793('0x91'));_0x50e068[_0xc793('0x4d')]('i.id');_0x50e068[_0xc793('0x4d')](_0xc793('0xa2'));_0x50e068['field'](_0xc793('0xa3'));_0x50e068[_0xc793('0x4d')](_0xc793('0xa4'));_0x50e068[_0xc793('0x4d')]('i.closedAt');_0x50e068[_0xc793('0x4d')](_0xc793('0xa5'));_0x50e068[_0xc793('0x4d')](_0xc793('0xa6'));_0x50e068[_0xc793('0x4d')](_0xc793('0xa7'));_0x50e068[_0xc793('0x4d')](_0xc793('0xa8'));_0x50e068['field'](_0xc793('0xa9'));_0x50e068['field']('i.secondDisposition');_0x50e068[_0xc793('0x4d')]('i.thirdDisposition');_0x50e068[_0xc793('0x4d')]('i.substatus');_0x50e068[_0xc793('0x4d')](_0xc793('0xaa'));_0x50e068['field'](_0xc793('0xab'));_0x50e068[_0xc793('0x4d')](_0xc793('0xac'));_0x50e068[_0xc793('0x4d')](_0xc793('0xad'));_0x50e068[_0xc793('0x4d')](_0xc793('0xae'),_0xc793('0xaf'));_0x50e068[_0xc793('0x4d')](_0xc793('0xb0'),_0xc793('0xb1'));_0x50e068[_0xc793('0x4d')](_0xc793('0xb2'),_0xc793('0xb3'));_0x50e068[_0xc793('0x4d')](_0xc793('0xb4'),_0xc793('0xb5'));_0x50e068[_0xc793('0x4d')](_0xc793('0xb6'),_0xc793('0xb7'));_0x50e068['field'](_0xc793('0xb8'),_0xc793('0xb9'));_0x50e068[_0xc793('0x4d')](_0xc793('0xba'),_0xc793('0xbb'));_0x50e068[_0xc793('0x4d')](_0xc793('0xbc'),_0xc793('0xbd'));_0x50e068[_0xc793('0x4d')](_0xc793('0xbe'),_0xc793('0x2f'));}if(_0xb2fb26[_0xc793('0x22')])_0x50e068[_0xc793('0x22')](_0xb2fb26[_0xc793('0x22')]);if(_0xb2fb26['offset'])_0x50e068[_0xc793('0x20')](_0xb2fb26[_0xc793('0x20')]);return db[_0xc793('0x9c')][_0xc793('0x43')](_0x50e068['toString'](),_0x24fe49);})[_0xc793('0x3c')](function(_0x281177){if(_0x281177[_0xc793('0x68')]>0x0)_0x1311b8['where'](_0xc793('0xbf'),_[_0xc793('0x2e')](_0x281177,'id'));return db[_0xc793('0x9c')]['query'](_0x1311b8['toString'](),_0x24fe49)[_0xc793('0x3c')](function(_0x292573){var _0x548f85=_[_0xc793('0xc0')](_0x292573,_0xc793('0xc1'));var _0x49856c=[];return db[_0xc793('0xc2')][_0xc793('0x35')]({'attributes':[_0xc793('0xc3')],'raw':!![]})[_0xc793('0x3c')](function(_0x3a3837){var _0x414c53=_0x3a3837['enableEmailPreview'];_0x281177[_0xc793('0x31')](function(_0x404aa6){_0x49856c[_0xc793('0x33')](updateMailInteraction(_0x404aa6,_0x45eb23,_0x548f85,_0x414c53));});return BPromise[_0xc793('0xc4')](_0x49856c);});});});})['then'](function(_0x173f27){_0x48c21e[_0xc793('0xc5')]=_0x173f27;return _0x48c21e;})[_0xc793('0x3c')](respondWithFilteredResult(_0x1b630d,_0xb2fb26))[_0xc793('0x3b')](handleError(_0x1b630d,null));};exports[_0xc793('0xc6')]=function(_0xd7484c,_0x27d048){var _0x24936a={'raw':![],'where':{'id':_0xd7484c[_0xc793('0xc7')]['id']}},_0x527d9e={};_0x527d9e[_0xc793('0x42')]=_[_0xc793('0xc8')](db[_0xc793('0xc9')]['rawAttributes']);_0x527d9e[_0xc793('0x43')]=_[_0xc793('0xc8')](_0xd7484c[_0xc793('0x43')]);_0x527d9e['filters']=_[_0xc793('0x45')](_0x527d9e[_0xc793('0x42')],_0x527d9e[_0xc793('0x43')]);_0x24936a[_0xc793('0x46')]=_['intersection'](_0x527d9e[_0xc793('0x42')],qs[_0xc793('0x47')](_0xd7484c[_0xc793('0x43')][_0xc793('0x47')]));_0x24936a[_0xc793('0x46')]=_0x24936a['attributes'][_0xc793('0x68')]?_0x24936a[_0xc793('0x46')]:_0x527d9e[_0xc793('0x42')];if(_0xd7484c[_0xc793('0x43')][_0xc793('0xca')]){_0x24936a['include']=[{'all':!![]}];}_0x24936a=_[_0xc793('0x9e')]({},_0x24936a,_0xd7484c[_0xc793('0xcb')]);return db['MailInteraction'][_0xc793('0x61')](_0x24936a)[_0xc793('0x3c')](handleEntityNotFound(_0x27d048,null))['then'](respondWithResult(_0x27d048,null))[_0xc793('0x3b')](handleError(_0x27d048,null));};exports[_0xc793('0xcc')]=function(_0x2cb13a,_0x5ced9c){return db[_0xc793('0xc9')][_0xc793('0xcc')](_0x2cb13a['body'],{})[_0xc793('0x3c')](respondWithResult(_0x5ced9c,0xc9))[_0xc793('0x3b')](handleError(_0x5ced9c,null));};exports[_0xc793('0x28')]=function(_0x4710e3,_0x26332c){if(_0x4710e3['body']['id']){delete _0x4710e3[_0xc793('0xcd')]['id'];}return db[_0xc793('0xc9')][_0xc793('0x61')]({'where':{'id':_0x4710e3[_0xc793('0xc7')]['id']}})[_0xc793('0x3c')](handleEntityNotFound(_0x26332c,null))[_0xc793('0x3c')](saveUpdates(_0x4710e3['body'],null))[_0xc793('0x3c')](respondWithResult(_0x26332c,null))['catch'](handleError(_0x26332c,null));};exports['destroy']=function(_0x59f2bb,_0x3a1fc5){return db[_0xc793('0xc9')][_0xc793('0x61')]({'where':{'id':_0x59f2bb[_0xc793('0xc7')]['id']}})[_0xc793('0x3c')](handleEntityNotFound(_0x3a1fc5,null))['then'](removeEntity(_0x3a1fc5,null))[_0xc793('0x3b')](handleError(_0x3a1fc5,null));};exports['describe']=function(_0x475c9f,_0xc230){return db['MailInteraction'][_0xc793('0xce')]()[_0xc793('0x3c')](respondWithResult(_0xc230,null))[_0xc793('0x3b')](handleError(_0xc230,null));};exports[_0xc793('0xcf')]=function(_0xd10be7,_0x10bc96,_0x33e5e9){return db['MailMessage'][_0xc793('0x61')]({'where':{'id':_0xd10be7[_0xc793('0xc7')]['id']}})[_0xc793('0x3c')](handleEntityNotFound(_0x10bc96,null))[_0xc793('0x3c')](function(_0x598907){if(_0x598907){return _0x598907[_0xc793('0xcf')](_0xd10be7[_0xc793('0xcd')][_0xc793('0xd0')],_[_0xc793('0xd1')](_0xd10be7[_0xc793('0xcd')],[_0xc793('0xd0'),'id'])||{});}})[_0xc793('0x3c')](respondWithResult(_0x10bc96,null))['catch'](handleError(_0x10bc96,null));};exports[_0xc793('0xd2')]=function(_0x4ef905,_0x268d3e,_0x4453ea){var _0x1504d8={'raw':![],'where':{}};var _0x357fba={};var _0x2a423b={'count':0x0,'rows':[]};return db[_0xc793('0xc9')][_0xc793('0x35')]({'where':{'id':_0x4ef905[_0xc793('0xc7')]['id']}})['then'](handleEntityNotFound(_0x268d3e,null))[_0xc793('0x3c')](function(_0xda8a00){if(_0xda8a00){_0x357fba[_0xc793('0x42')]=_[_0xc793('0xc8')](db['MailMessage'][_0xc793('0x3e')]);_0x357fba[_0xc793('0x43')]=_[_0xc793('0xc8')](_0x4ef905[_0xc793('0x43')]);_0x357fba[_0xc793('0x44')]=_['intersection'](_0x357fba[_0xc793('0x42')],_0x357fba[_0xc793('0x43')]);_0x1504d8[_0xc793('0x46')]=_[_0xc793('0x45')](_0x357fba[_0xc793('0x42')],qs[_0xc793('0x47')](_0x4ef905[_0xc793('0x43')][_0xc793('0x47')]));_0x1504d8['attributes']=_0x1504d8[_0xc793('0x46')]['length']?_0x1504d8['attributes']:_0x357fba[_0xc793('0x42')];if(!_0x4ef905['query'][_0xc793('0x48')](_0xc793('0x49'))){_0x1504d8[_0xc793('0x22')]=qs[_0xc793('0x22')](_0x4ef905['query'][_0xc793('0x22')]);_0x1504d8[_0xc793('0x20')]=qs['offset'](_0x4ef905[_0xc793('0x43')][_0xc793('0x20')]);}_0x1504d8[_0xc793('0x90')]=qs[_0xc793('0x4a')](_0x4ef905['query'][_0xc793('0x4a')]);_0x1504d8[_0xc793('0x4b')]=qs[_0xc793('0x44')](_['pick'](_0x4ef905[_0xc793('0x43')],_0x357fba['filters']));_0x1504d8['where'][_0xc793('0xc1')]=_0xda8a00['id'];if(_0x4ef905[_0xc793('0x43')][_0xc793('0x82')]){_0x1504d8[_0xc793('0x4b')]=_['merge'](_0x1504d8[_0xc793('0x4b')],{'$or':_[_0xc793('0x2e')](_0x1504d8[_0xc793('0x46')],function(_0x15be2e){var _0x23b798={};_0x23b798[_0x15be2e]={'$like':'%'+_0x4ef905[_0xc793('0x43')][_0xc793('0x82')]+'%'};return _0x23b798;})});}if(_0x4ef905[_0xc793('0x43')][_0xc793('0xd3')]){var _0x59f6da=_0x4ef905[_0xc793('0x43')][_0xc793('0xd3')][_0xc793('0x30')](',');var _0x5ac9dc={};_0x5ac9dc[_0x59f6da[0x0]]={'$gte':moment(_0x59f6da[0x1])[_0xc793('0xd4')](_0xc793('0xd5'))};_0x1504d8[_0xc793('0x4b')]=_[_0xc793('0x9e')](_0x1504d8[_0xc793('0x4b')],_0x5ac9dc);}_0x1504d8=_[_0xc793('0x9e')]({},_0x1504d8,_0x4ef905[_0xc793('0xcb')]);return db[_0xc793('0x34')][_0xc793('0x23')]({'where':_0x1504d8['where']})[_0xc793('0x3c')](function(_0x153059){_0x2a423b[_0xc793('0x23')]=_0x153059;if(_0x4ef905['query']['includeAll']){_0x1504d8['include']=[{'all':!![]}];}return db[_0xc793('0x34')][_0xc793('0xd6')](_0x1504d8);})[_0xc793('0x3c')](function(_0x23c43f){if(_0x4ef905[_0xc793('0x43')]['inlineCss']===_0xc793('0xd7')){for(var _0x3aace1=0x0;_0x3aace1<_0x23c43f[_0xc793('0x68')];_0x3aace1++){_0x23c43f[_0x3aace1]['body']=juice(_0x23c43f[_0x3aace1][_0xc793('0xcd')]);}}_0x2a423b[_0xc793('0xc5')]=_0x23c43f;return _0x2a423b;});}})[_0xc793('0x3c')](respondWithFilteredResult(_0x268d3e,_0x1504d8))[_0xc793('0x3b')](handleError(_0x268d3e,null));};exports[_0xc793('0xd8')]=function(_0x4d8e00,_0x149c88,_0x37ff42){return db[_0xc793('0xc9')][_0xc793('0x61')]({'where':{'id':_0x4d8e00[_0xc793('0xc7')]['id']}})['then'](handleEntityNotFound(_0x149c88,null))[_0xc793('0x3c')](function(_0x1ca19c){if(_0x1ca19c){return _0x1ca19c[_0xc793('0xd9')](_0x4d8e00[_0xc793('0xcd')]['ids'],_[_0xc793('0xd1')](_0x4d8e00[_0xc793('0xcd')],['ids','id'])||{})[_0xc793('0xda')](function(){return db['Tag']['findAll']({'attributes':['id',_0xc793('0x2b'),'color'],'where':{'id':_0x4d8e00[_0xc793('0xcd')][_0xc793('0xd0')]}});})[_0xc793('0x3c')](function(_0xf32d2d){socket['emit'](_0xc793('0xdb'),{'id':Number(_0x4d8e00[_0xc793('0xc7')]['id']),'tags':_0xf32d2d||[]});return{'id':Number(_0x4d8e00['params']['id']),'tags':_0xf32d2d||[]};});}})[_0xc793('0x3c')](respondWithResult(_0x149c88,null))[_0xc793('0x3b')](handleError(_0x149c88,null));};exports[_0xc793('0xdc')]=function(_0x2edde6,_0x41a5de,_0x56126f){return db['MailInteraction'][_0xc793('0x61')]({'where':{'id':_0x2edde6[_0xc793('0xc7')]['id']}})[_0xc793('0x3c')](handleEntityNotFound(_0x41a5de,null))[_0xc793('0x3c')](function(_0x47cdc7){if(_0x47cdc7){return _0x47cdc7[_0xc793('0xdc')](_0x2edde6[_0xc793('0x43')][_0xc793('0xd0')]);}})[_0xc793('0x3c')](respondWithStatusCode(_0x41a5de,null))[_0xc793('0x3b')](handleError(_0x41a5de,null));};exports[_0xc793('0xdd')]=function(_0x494c34,_0x2bc293){var _0x137eea=moment()[_0xc793('0xde')]()[_0xc793('0x9b')]();var _0x2aff41=path[_0xc793('0xdf')](config[_0xc793('0xe0')],_0xc793('0xe1'),_0xc793('0xe2'),_0xc793('0xe3'));var _0x2881fb=path[_0xc793('0xdf')](config[_0xc793('0xe0')],'server',_0xc793('0xe2'),_0xc793('0xe4'));var _0x23a6fc=path[_0xc793('0xdf')](_0x2aff41,_0x137eea);var _0x501214=util['format'](_0xc793('0xe5'),_0x494c34[_0xc793('0xc7')]['id'],_0x137eea);var _0x28068c=path[_0xc793('0xdf')](_0x2aff41,_0x501214);var _0x248305=[];if(_0x494c34[_0xc793('0x43')]['attachments']){_0x248305[_0xc793('0x33')]({'model':db['Attachment'],'as':_0xc793('0xe6'),'raw':!![]});}var _0x355dcf=[{'model':db[_0xc793('0x34')],'as':'Messages','attributes':['id',_0xc793('0xcd'),_0xc793('0x4f'),'to','cc',_0xc793('0xe7'),_0xc793('0xe8'),'createdAt'],'where':{'secret':![]},'order':qs[_0xc793('0x4a')]('id'),'include':_0x248305}];return db['MailInteraction']['find']({'where':{'id':_0x494c34[_0xc793('0xc7')]['id']},'include':_0x355dcf})['then'](handleEntityNotFound(_0x2bc293,null))[_0xc793('0x3c')](function(_0x1b68be){if(_0x1b68be&&_0x1b68be[_0xc793('0xe9')]){var _0x97bdba=_0x1b68be[_0xc793('0xea')]({'plain':!![]});fs['mkdirSync'](_0x23a6fc);return BPromise['each'](_0x97bdba[_0xc793('0xe9')],function(_0x2beaae,_0x503acb){var _0x2102e4={'from':_0x2beaae['from'],'to':_0x2beaae['to'],'subject':_0x2beaae[_0xc793('0xe8')],'html':_0x2beaae['body'],'headers':{'Date':moment(_0x2beaae[_0xc793('0xeb')])[_0xc793('0xd4')](_0xc793('0xec'))},'attachments':[]};if(_0x2beaae['cc']){_0x2102e4[_0xc793('0xed')]['Cc']=_0x2beaae['cc'];}if(_0x2beaae['bcc']){_0x2102e4[_0xc793('0xed')][_0xc793('0xee')]=_0x2beaae[_0xc793('0xe7')];}return new BPromise(function(_0xaa6c37,_0x3f7714){if(_0x2beaae[_0xc793('0xe6')]){for(var _0x57c21=0x0;_0x57c21<_0x2beaae['Attachments'][_0xc793('0x68')];_0x57c21++){var _0x59a97f=_0x2beaae[_0xc793('0xe6')][_0x57c21];var _0x1a8f30=path[_0xc793('0xdf')](_0x2881fb,_0x59a97f[_0xc793('0xef')]);if(fs[_0xc793('0xf0')](_0x1a8f30)){_0x2102e4[_0xc793('0xe4')]['push']({'name':_0x59a97f[_0xc793('0x2b')],'contentType':_0x59a97f['type'],'data':fs['readFileSync'](_0x1a8f30)});}}}emlformat[_0xc793('0xf1')](_0x2102e4,function(_0x472952,_0xa6212){if(_0x472952)return _0x3f7714(_0x472952);fs[_0xc793('0xf2')](path['join'](_0x23a6fc,util['format']('message%d.eml',_0x503acb)),_0xa6212);return _0xaa6c37(_0xa6212);});});})['then'](function(){return new BPromise(function(_0x29d2ef,_0x45b733){zipdir(_0x23a6fc,{'saveTo':_0x28068c},function(_0x58e920,_0x2a7ff9){if(_0x58e920)return _0x45b733(_0x58e920);return _0x29d2ef(_0x2a7ff9);});})[_0xc793('0x3c')](function(){return new BPromise(function(_0x31489f,_0x10a078){rimraf(_0x23a6fc,function(_0x50a796){if(_0x50a796)_0x10a078(_0x50a796);return _0x31489f();});});})['then'](function(){return _0x2bc293[_0xc793('0xdd')](_0x28068c,_0x501214,function(_0x57bcc3){if(_0x57bcc3){console[_0xc793('0xf3')](_0xc793('0xf4'),_0x57bcc3);}else{fs[_0xc793('0xf5')](_0x28068c);}});});});}else{return _0x2bc293['sendStatus'](0xc8);}})[_0xc793('0x3b')](handleError(_0x2bc293,null));}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.events.js b/server/api/mailInteraction/mailInteraction.events.js index 1e47569..c76364f 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 _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 +var _0x8739=['update','remove','getUsers','then','setDataValue','Users','map','findAll','length','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailInteraction','MailMessage','setMaxListeners'];(function(_0x579329,_0x5a28b1){var _0x5940bb=function(_0x5857f8){while(--_0x5857f8){_0x579329['push'](_0x579329['shift']());}};_0x5940bb(++_0x5a28b1);}(_0x8739,0x1ab));var _0x9873=function(_0x78ad3e,_0x3ffc08){_0x78ad3e=_0x78ad3e-0x0;var _0x5a534b=_0x8739[_0x78ad3e];return _0x5a534b;};'use strict';var EventEmitter=require(_0x9873('0x0'));var MailInteraction=require(_0x9873('0x1'))['db'][_0x9873('0x2')];var MailMessage=require('../../mysqldb')['db'][_0x9873('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x9873('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9873('0x5'),'afterDestroy':_0x9873('0x6')};function emitEvent(_0x51b8c1){return function(_0x43bd36,_0x276e71,_0xe30f9c){_0x43bd36[_0x9873('0x7')]({'attributes':['id'],'raw':!![]})[_0x9873('0x8')](function(_0x56f2d2){_0x43bd36[_0x9873('0x9')](_0x9873('0xa'),_0x56f2d2[_0x9873('0xb')](function(_0x26377c){return{'id':_0x26377c['id']};}));return MailMessage[_0x9873('0xc')]({'where':{'MailInteractionId':_0x43bd36['id'],'direction':'in','read':![]},'raw':!![]});})[_0x9873('0x8')](function(_0x561afc){_0x43bd36[_0x9873('0x9')]('unreadMessages',_0x561afc[_0x9873('0xd')]);MailInteractionEvents['emit'](_0x51b8c1+':'+_0x43bd36['id'],_0x43bd36);MailInteractionEvents[_0x9873('0xe')](_0x51b8c1,_0x43bd36);_0xe30f9c(null);})['catch'](_0xe30f9c(null));};}for(var e in events){if(events[_0x9873('0xf')](e)){var event=events[e];MailInteraction[_0x9873('0x10')](e,emitEvent(event));}}module[_0x9873('0x11')]=MailInteractionEvents; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.model.js b/server/api/mailInteraction/mailInteraction.model.js index 1587764..f3426ce 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 _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 +var _0xb699=['get','MailMessage','update','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','mail_interactions','fti_mail_interactions','subject','substatus','substatusAt','format','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','changed','models'];(function(_0x5c47d8,_0x47eff2){var _0x5988c7=function(_0x4eb1db){while(--_0x4eb1db){_0x5c47d8['push'](_0x5c47d8['shift']());}};_0x5988c7(++_0x47eff2);}(_0xb699,0x7f));var _0x9b69=function(_0x5deef6,_0x1c6c1d){_0x5deef6=_0x5deef6-0x0;var _0x4e0053=_0xb699[_0x5deef6];return _0x4e0053;};'use strict';var _=require(_0x9b69('0x0'));var util=require(_0x9b69('0x1'));var logger=require(_0x9b69('0x2'))(_0x9b69('0x3'));var moment=require(_0x9b69('0x4'));var BPromise=require(_0x9b69('0x5'));var rp=require(_0x9b69('0x6'));var fs=require('fs');var path=require(_0x9b69('0x7'));var rimraf=require(_0x9b69('0x8'));var config=require(_0x9b69('0x9'));var attributes=require('./mailInteraction.attributes');module[_0x9b69('0xa')]=function(_0x2ba711,_0x15bd42){return _0x2ba711[_0x9b69('0xb')]('MailInteraction',attributes,{'tableName':_0x9b69('0xc'),'paranoid':![],'indexes':[{'name':_0x9b69('0xd'),'fields':[_0x9b69('0xe'),'to'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2893c3,_0x467dfa,_0xa533a4){if(_0x2893c3[_0x9b69('0xf')]){_0x2893c3[_0x9b69('0x10')]=moment()[_0x9b69('0x11')](_0x9b69('0x12'));}if(_0x2893c3[_0x9b69('0x13')]){_0x2893c3[_0x9b69('0x14')]=moment()['format'](_0x9b69('0x12'));}_0xa533a4(null,_0x467dfa);},'beforeUpdate':function(_0x12690a,_0x397ea5,_0x32dcc0){if(_0x12690a['changed'](_0x9b69('0xf'))){_0x12690a[_0x9b69('0x10')]=_0x12690a[_0x9b69('0xf')]?moment()[_0x9b69('0x11')](_0x9b69('0x12')):null;}if(_0x12690a[_0x9b69('0x15')](_0x9b69('0x13'))){_0x12690a[_0x9b69('0x14')]=moment()[_0x9b69('0x11')](_0x9b69('0x12'));_0x12690a[_0x9b69('0xf')]=null;_0x12690a[_0x9b69('0x10')]=null;}_0x32dcc0(null,_0x12690a);},'afterUpdate':function(_0x2e98c7,_0x7952e5,_0x1543f2){var _0x1e2575=_0x2ba711[_0x9b69('0x16')];var _0x2e97b8=_0x2e98c7[_0x9b69('0x17')]({'plain':!![]});if(_0x2e97b8['closed']){return _0x1e2575[_0x9b69('0x18')][_0x9b69('0x19')]({'read':!![]},{'where':{'MailInteractionId':_0x2e97b8['id']}})[_0x9b69('0x1a')](function(){_0x1543f2();})[_0x9b69('0x1b')](function(_0x1bf9e6){_0x1543f2(_0x1bf9e6);});}else{_0x1543f2();}}},'charset':_0x9b69('0x1c'),'collate':_0x9b69('0x1d')});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.rpc.js b/server/api/mailInteraction/mailInteraction.rpc.js index cca709a..0c7f7c6 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 _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 +var _0xa5aa=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','defaults','redis','socket.io-emitter','./mailInteraction.socket','request','info','MailInteraction,\x20%s,\x20%s','request\x20sent','debug','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateMailInteraction','MailInteraction','update','options','raw','where','attributes','then','AddTagsToMailInteraction','find','addTags','body','ids','omit','spread','AddTags','lodash','util'];(function(_0x42e1a0,_0x1b9b93){var _0x2bd888=function(_0x180ceb){while(--_0x180ceb){_0x42e1a0['push'](_0x42e1a0['shift']());}};_0x2bd888(++_0x1b9b93);}(_0xa5aa,0x1ac));var _0xaa5a=function(_0x1180e1,_0x35fc31){_0x1180e1=_0x1180e1-0x0;var _0x500047=_0xa5aa[_0x1180e1];return _0x500047;};'use strict';var _=require(_0xaa5a('0x0'));var util=require(_0xaa5a('0x1'));var moment=require('moment');var BPromise=require(_0xaa5a('0x2'));var rs=require(_0xaa5a('0x3'));var fs=require('fs');var Redis=require(_0xaa5a('0x4'));var db=require(_0xaa5a('0x5'))['db'];var utils=require(_0xaa5a('0x6'));var logger=require(_0xaa5a('0x7'))('rpc');var config=require(_0xaa5a('0x8'));var jayson=require(_0xaa5a('0x9'));var client=jayson[_0xaa5a('0xa')]['http']({'port':0x232a});config['redis']=_[_0xaa5a('0xb')](config[_0xaa5a('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xaa5a('0xd'))(new Redis(config[_0xaa5a('0xc')]));require(_0xaa5a('0xe'))['register'](socket);function respondWithRpcPromise(_0x1711cc,_0x1f57cd,_0x771d06){return new BPromise(function(_0x338653,_0x2db481){return client[_0xaa5a('0xf')](_0x1711cc,_0x771d06)['then'](function(_0x7dc4c2){logger[_0xaa5a('0x10')](_0xaa5a('0x11'),_0x1f57cd,_0xaa5a('0x12'));logger[_0xaa5a('0x13')](_0xaa5a('0x14'),_0x1f57cd,_0xaa5a('0x12'),JSON[_0xaa5a('0x15')](_0x7dc4c2));if(_0x7dc4c2[_0xaa5a('0x16')]){if(_0x7dc4c2[_0xaa5a('0x16')][_0xaa5a('0x17')]===0x1f4){logger[_0xaa5a('0x16')]('MailInteraction,\x20%s,\x20%s',_0x1f57cd,_0x7dc4c2[_0xaa5a('0x16')][_0xaa5a('0x18')]);return _0x2db481(_0x7dc4c2[_0xaa5a('0x16')]['message']);}logger[_0xaa5a('0x16')](_0xaa5a('0x11'),_0x1f57cd,_0x7dc4c2[_0xaa5a('0x16')][_0xaa5a('0x18')]);return _0x338653(_0x7dc4c2[_0xaa5a('0x16')][_0xaa5a('0x18')]);}else{logger[_0xaa5a('0x10')](_0xaa5a('0x11'),_0x1f57cd,_0xaa5a('0x12'));_0x338653(_0x7dc4c2[_0xaa5a('0x19')][_0xaa5a('0x18')]);}})[_0xaa5a('0x1a')](function(_0x127d71){logger[_0xaa5a('0x16')](_0xaa5a('0x11'),_0x1f57cd,_0x127d71);_0x2db481(_0x127d71);});});}exports[_0xaa5a('0x1b')]=function(_0x222e5e){var _0x57cc60=this;return new Promise(function(_0x20ec46,_0xb9156c){return db[_0xaa5a('0x1c')][_0xaa5a('0x1d')](_0x222e5e['body'],{'raw':_0x222e5e[_0xaa5a('0x1e')]?_0x222e5e[_0xaa5a('0x1e')][_0xaa5a('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x222e5e[_0xaa5a('0x1e')]?_0x222e5e[_0xaa5a('0x1e')][_0xaa5a('0x20')]||null:null,'attributes':_0x222e5e[_0xaa5a('0x1e')]?_0x222e5e[_0xaa5a('0x1e')][_0xaa5a('0x21')]||null:null,'limit':_0x222e5e['options']?_0x222e5e[_0xaa5a('0x1e')]['limit']||null:null})[_0xaa5a('0x22')](function(_0xbe9ce1){logger[_0xaa5a('0x10')](_0xaa5a('0x1b'),_0x222e5e);logger[_0xaa5a('0x13')]('UpdateMailInteraction',_0x222e5e,JSON[_0xaa5a('0x15')](_0xbe9ce1));_0x20ec46(_0xbe9ce1);})[_0xaa5a('0x1a')](function(_0x4e2311){logger[_0xaa5a('0x16')]('UpdateMailInteraction',_0x4e2311[_0xaa5a('0x18')],_0x222e5e);_0xb9156c(_0x57cc60[_0xaa5a('0x16')](0x1f4,_0x4e2311[_0xaa5a('0x18')]));});});};exports[_0xaa5a('0x23')]=function(_0x4117a6){return new Promise(function(_0x10208d,_0x57cd56){return db[_0xaa5a('0x1c')][_0xaa5a('0x24')]({'where':_0x4117a6['options']?_0x4117a6[_0xaa5a('0x1e')][_0xaa5a('0x20')]||null:null})['then'](function(_0x287cc6){if(_0x287cc6){return _0x287cc6[_0xaa5a('0x25')](_0x4117a6[_0xaa5a('0x26')][_0xaa5a('0x27')],_[_0xaa5a('0x28')](_0x4117a6[_0xaa5a('0x26')],['ids','id'])||{});}})[_0xaa5a('0x29')](function(_0x1c877b){logger[_0xaa5a('0x10')](_0xaa5a('0x2a'),_0x4117a6);logger['debug']('AddTags',_0x4117a6,JSON[_0xaa5a('0x15')](_0x1c877b));_0x10208d(_0x1c877b);})[_0xaa5a('0x1a')](function(_0x4e1665){logger[_0xaa5a('0x16')]('AddTags',_0x4e1665['message'],_0x4117a6);_0x57cd56(_this[_0xaa5a('0x16')](0x1f4,_0x4e1665[_0xaa5a('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.socket.js b/server/api/mailInteraction/mailInteraction.socket.js index ec35f9d..6825ef3 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 _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 +var _0x83e8=['register','length','./mailInteraction.events','save','update','emit'];(function(_0x4d21ff,_0x19d202){var _0x22b554=function(_0x4473c5){while(--_0x4473c5){_0x4d21ff['push'](_0x4d21ff['shift']());}};_0x22b554(++_0x19d202);}(_0x83e8,0x110));var _0x883e=function(_0x1f26ab,_0x53a769){_0x1f26ab=_0x1f26ab-0x0;var _0x3b7c1a=_0x83e8[_0x1f26ab];return _0x3b7c1a;};'use strict';var MailInteractionEvents=require(_0x883e('0x0'));var events=[_0x883e('0x1'),'remove',_0x883e('0x2')];function createListener(_0x590426,_0x542951){return function(_0x1b3bfd){_0x542951[_0x883e('0x3')](_0x590426,_0x1b3bfd);};}function removeListener(_0x4022d6,_0x3268d0){return function(){MailInteractionEvents['removeListener'](_0x4022d6,_0x3268d0);};}exports[_0x883e('0x4')]=function(_0x15ca1e){for(var _0x66bcaf=0x0,_0xfaadda=events[_0x883e('0x5')];_0x66bcaf<_0xfaadda;_0x66bcaf++){var _0x368087=events[_0x66bcaf];var _0x1c563f=createListener('mailInteraction:'+_0x368087,_0x15ca1e);MailInteractionEvents['on'](_0x368087,_0x1c563f);}}; \ No newline at end of file diff --git a/server/api/mailMessage/index.js b/server/api/mailMessage/index.js index bcfacbd..c19e932 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 _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 +var _0xf4d4=['post','tracked','create','put','/:id','/:id/accept','accept','/:id/reject','reject','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','index','/describe','show','/:id/download','isAuthenticated','download'];(function(_0x595686,_0x4a2767){var _0x2d6db8=function(_0x37043f){while(--_0x37043f){_0x595686['push'](_0x595686['shift']());}};_0x2d6db8(++_0x4a2767);}(_0xf4d4,0xf3));var _0x4f4d=function(_0x3a3473,_0x49e97e){_0x3a3473=_0x3a3473-0x0;var _0x32122f=_0xf4d4[_0x3a3473];return _0x32122f;};'use strict';var multer=require(_0x4f4d('0x0'));var util=require(_0x4f4d('0x1'));var path=require(_0x4f4d('0x2'));var timeout=require('connect-timeout');var express=require(_0x4f4d('0x3'));var router=express[_0x4f4d('0x4')]();var fs_extra=require(_0x4f4d('0x5'));var auth=require(_0x4f4d('0x6'));var interaction=require(_0x4f4d('0x7'));var config=require(_0x4f4d('0x8'));var controller=require(_0x4f4d('0x9'));router[_0x4f4d('0xa')]('/',auth['isAuthenticated'](),controller[_0x4f4d('0xb')]);router['get'](_0x4f4d('0xc'),auth['isAuthenticated'](),controller['describe']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x4f4d('0xd')]);router['get'](_0x4f4d('0xe'),auth[_0x4f4d('0xf')](),controller[_0x4f4d('0x10')]);router[_0x4f4d('0x11')]('/',auth['isAuthenticated'](),interaction[_0x4f4d('0x12')]('mail','mailmessage:create'),controller[_0x4f4d('0x13')]);router[_0x4f4d('0x14')](_0x4f4d('0x15'),auth['isAuthenticated'](),controller['update']);router[_0x4f4d('0x14')](_0x4f4d('0x16'),auth['isAuthenticated'](),controller[_0x4f4d('0x17')]);router[_0x4f4d('0x14')](_0x4f4d('0x18'),auth[_0x4f4d('0xf')](),controller[_0x4f4d('0x19')]);router['delete'](_0x4f4d('0x15'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.attributes.js b/server/api/mailMessage/mailMessage.attributes.js index 7e6be27..95feb79 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 _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 +var _0x2d35=['out','STRING','DATE','INTEGER','Email','Chat','sequelize','lodash','exports','TEXT','long','medium','ENUM'];(function(_0x36185c,_0x12943d){var _0x46ced5=function(_0x1d6396){while(--_0x1d6396){_0x36185c['push'](_0x36185c['shift']());}};_0x46ced5(++_0x12943d);}(_0x2d35,0xaf));var _0x52d3=function(_0x462ae9,_0x48d643){_0x462ae9=_0x462ae9-0x0;var _0x177395=_0x2d35[_0x462ae9];return _0x177395;};'use strict';var Sequelize=require(_0x52d3('0x0'));var _=require(_0x52d3('0x1'));module[_0x52d3('0x2')]={'body':{'type':Sequelize[_0x52d3('0x3')](_0x52d3('0x4')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x52d3('0x3')](_0x52d3('0x5'))},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x52d3('0x6')]('in',_0x52d3('0x7')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0x52d3('0x8')](0x1fe)},'from':{'type':Sequelize[_0x52d3('0x8')]},'to':{'type':Sequelize[_0x52d3('0x3')]('long')},'cc':{'type':Sequelize[_0x52d3('0x3')]('long')},'bcc':{'type':Sequelize[_0x52d3('0x3')](_0x52d3('0x4'))},'subject':{'type':Sequelize[_0x52d3('0x3')]},'sentAt':{'type':Sequelize[_0x52d3('0x9')]},'attach':{'type':Sequelize[_0x52d3('0xa')],'defaultValue':0x0},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'readAt':{'type':Sequelize[_0x52d3('0x9')]},'originTo':{'type':Sequelize[_0x52d3('0x3')](_0x52d3('0x4'))},'originCc':{'type':Sequelize['TEXT'](_0x52d3('0x4'))},'originChannel':{'type':Sequelize[_0x52d3('0x6')](_0x52d3('0xb'),_0x52d3('0xc')),'defaultValue':_0x52d3('0xb'),'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.controller.js b/server/api/mailMessage/mailMessage.controller.js index a9040b1..2f0e0e2 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 _0x21eb=['filter','options','MailMessage','includeAll','include','rows','catch','show','params','find','body','describe','create','direction','out','split','MailAccountId','List','CmContact','Contacts','updatedAt','DESC','MailServerOut','Smtp','service','host','port','secure','user','pass','auth','attachments','join','defaults','ListId','List\x20not\x20found','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','mail-interactions','mail','read','readAt','UserId','agent','Contact','get','MailInteraction','MailInteractionId','isNil','read1stAt','interaction','role','null','AcceptMessage','cf_','push','ContactId','Sequelize','SELECT','contact','manual','SIP/%s','channel','event','accept','EventManager','acceptmessage','rejectMessage','startsWith','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','QueryTypes','rejectmessage','download','unix','root','files','tmp','message-%s.eml','bcc','subject','createdAt','Attachments','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','existsSync','build','writeFileSync','log','unlinkSync','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','localhost','socket.io-emitter','register','jayson/promise','http','client','request','info','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','stack','name','index','map','rawAttributes','type','key','model','query','keys','attributes','intersection','fields','length','order','sort','where','filters','pick','merge'];(function(_0x50d5af,_0x255aa1){var _0x51cc5f=function(_0x3e92a8){while(--_0x3e92a8){_0x50d5af['push'](_0x50d5af['shift']());}};_0x51cc5f(++_0x255aa1);}(_0x21eb,0x1aa));var _0xb21e=function(_0x1c204f,_0x199f46){_0x1c204f=_0x1c204f-0x0;var _0x371b83=_0x21eb[_0x1c204f];return _0x371b83;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xb21e('0x0'));var rp=require(_0xb21e('0x1'));var moment=require(_0xb21e('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xb21e('0x3'));var util=require(_0xb21e('0x4'));var path=require(_0xb21e('0x5'));var sox=require(_0xb21e('0x6'));var csv=require(_0xb21e('0x7'));var ejs=require(_0xb21e('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb21e('0x9'));var squel=require('squel');var crypto=require(_0xb21e('0xa'));var jsforce=require(_0xb21e('0xb'));var deskjs=require(_0xb21e('0xc'));var toCsv=require(_0xb21e('0x7'));var querystring=require('querystring');var Papa=require(_0xb21e('0xd'));var Redis=require(_0xb21e('0xe'));var authService=require(_0xb21e('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0xb21e('0x10'));var hardwareService=require(_0xb21e('0x11'));var logger=require(_0xb21e('0x12'))(_0xb21e('0x13'));var utils=require(_0xb21e('0x14'));var config=require(_0xb21e('0x15'));var licenseUtil=require(_0xb21e('0x16'));var db=require('../../mysqldb')['db'];config[_0xb21e('0x17')]=_['defaults'](config[_0xb21e('0x17')],{'host':_0xb21e('0x18'),'port':0x18eb});var socket=require(_0xb21e('0x19'))(new Redis(config[_0xb21e('0x17')]));require('./mailMessage.socket')[_0xb21e('0x1a')](socket);var jayson=require(_0xb21e('0x1b'));var client=jayson['client'][_0xb21e('0x1c')]({'port':0x232c});var client9003=jayson['client'][_0xb21e('0x1c')]({'port':0x232b});var client9002=jayson[_0xb21e('0x1d')][_0xb21e('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x26c2ae,_0xaa76f1,_0x4c5c1a,_0x5d5843){return new BPromise(function(_0x2a61f5,_0x10cc8b){var _0x571232=_0x5d5843||client;return _0x571232[_0xb21e('0x1e')](_0x26c2ae,_0x4c5c1a)['then'](function(_0x43fa39){logger[_0xb21e('0x1f')](_0xb21e('0x20'),_0xaa76f1,_0xb21e('0x21'));logger[_0xb21e('0x22')](_0xb21e('0x23'),_0xaa76f1,_0xb21e('0x21'),JSON[_0xb21e('0x24')](_0x43fa39));if(_0x43fa39[_0xb21e('0x25')]){if(_0x43fa39[_0xb21e('0x25')]['code']===0x1f4){logger['error']('MailMessage,\x20%s,\x20%s',_0xaa76f1,_0x43fa39[_0xb21e('0x25')]['message']);return _0x10cc8b(_0x43fa39[_0xb21e('0x25')][_0xb21e('0x26')]);}logger['error']('MailMessage,\x20%s,\x20%s',_0xaa76f1,_0x43fa39[_0xb21e('0x25')][_0xb21e('0x26')]);return _0x2a61f5(_0x43fa39[_0xb21e('0x25')][_0xb21e('0x26')]);}else{logger[_0xb21e('0x1f')](_0xb21e('0x20'),_0xaa76f1,_0xb21e('0x21'));_0x2a61f5(_0x43fa39['result'][_0xb21e('0x26')]);}})['catch'](function(_0x2fa680){logger[_0xb21e('0x25')](_0xb21e('0x20'),_0xaa76f1,_0x2fa680);_0x10cc8b(_0x2fa680);});});}function respondWithStatusCode(_0x52e29a,_0xd59b9f){_0xd59b9f=_0xd59b9f||0xcc;return function(_0x46c3df){if(_0x46c3df){return _0x52e29a[_0xb21e('0x27')](_0xd59b9f);}return _0x52e29a[_0xb21e('0x28')](_0xd59b9f)['end']();};}function respondWithResult(_0x548603,_0x333335){_0x333335=_0x333335||0xc8;return function(_0x3f24c4){if(_0x3f24c4){return _0x548603[_0xb21e('0x28')](_0x333335)[_0xb21e('0x29')](_0x3f24c4);}};}function respondWithFilteredResult(_0x2949e3,_0x1cbb5a){return function(_0x52ac80){if(_0x52ac80){var _0x3a8554=typeof _0x1cbb5a[_0xb21e('0x2a')]===_0xb21e('0x2b')&&typeof _0x1cbb5a[_0xb21e('0x2c')]===_0xb21e('0x2b');var _0x3897a0=_0x52ac80[_0xb21e('0x2d')];var _0x23b85c=_0x3a8554?0x0:_0x1cbb5a[_0xb21e('0x2a')];var _0x36625a=_0x3a8554?_0x52ac80[_0xb21e('0x2d')]:_0x1cbb5a[_0xb21e('0x2a')]+_0x1cbb5a[_0xb21e('0x2c')];var _0x37d9ab;if(_0x36625a>=_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=_0x5d9dac){_0x25e27e=_0x5d9dac;_0x5df385=0xc8;}else{_0x5df385=0xce;}_0x38a6f1[_0x4840('0x2e')](_0x5df385);return _0x38a6f1[_0x4840('0x2f')](_0x4840('0x30'),_0x4163f6+'-'+_0x25e27e+'/'+_0x5d9dac)[_0x4840('0x31')](_0x237039);}return null;};}function patchUpdates(_0x43b19a){return function(_0x3150a9){try{jsonpatch[_0x4840('0x32')](_0x3150a9,_0x43b19a,!![]);}catch(_0x18371b){return BPromise[_0x4840('0x33')](_0x18371b);}return _0x3150a9[_0x4840('0x34')]();};}function saveUpdates(_0x5ca1d3,_0x34e3ff){return function(_0x304279){if(_0x304279){return _0x304279[_0x4840('0x35')](_0x5ca1d3)['then'](function(_0x1970da){return _0x1970da;});}return null;};}function removeEntity(_0x393380,_0x2f0dcd){return function(_0x55d830){if(_0x55d830){return _0x55d830[_0x4840('0x36')]()[_0x4840('0x37')](function(){_0x393380[_0x4840('0x2e')](0xcc)[_0x4840('0x38')]();});}};}function handleEntityNotFound(_0x5841ca,_0x2513b0){return function(_0x166562){if(!_0x166562){_0x5841ca[_0x4840('0x39')](0x194);}return _0x166562;};}function handleError(_0x382236,_0x18f48c){_0x18f48c=_0x18f48c||0x1f4;return function(_0xd256f1){logger[_0x4840('0x26')](_0xd256f1[_0x4840('0x3a')]);if(_0xd256f1[_0x4840('0x3b')]){delete _0xd256f1[_0x4840('0x3b')];}_0x382236[_0x4840('0x2e')](_0x18f48c)['send'](_0xd256f1);};}exports[_0x4840('0x3c')]=function(_0x5bed54,_0x3b2494){var _0x3c252f={},_0x51ad8e={},_0x400a7c={'count':0x0,'rows':[]};var _0x402ab2=_['map'](db[_0x4840('0x3d')][_0x4840('0x3e')],function(_0x2deb83){return{'name':_0x2deb83[_0x4840('0x3f')],'type':_0x2deb83[_0x4840('0x40')]['key']};});_0x51ad8e[_0x4840('0x41')]=_[_0x4840('0x42')](_0x402ab2,_0x4840('0x3b'));_0x51ad8e[_0x4840('0x43')]=_[_0x4840('0x44')](_0x5bed54['query']);_0x51ad8e['filters']=_[_0x4840('0x45')](_0x51ad8e['model'],_0x51ad8e[_0x4840('0x43')]);_0x3c252f[_0x4840('0x46')]=_['intersection'](_0x51ad8e[_0x4840('0x41')],qs[_0x4840('0x47')](_0x5bed54['query'][_0x4840('0x47')]));_0x3c252f[_0x4840('0x46')]=_0x3c252f[_0x4840('0x46')][_0x4840('0x48')]?_0x3c252f['attributes']:_0x51ad8e[_0x4840('0x41')];if(!_0x5bed54[_0x4840('0x43')][_0x4840('0x49')](_0x4840('0x4a'))){_0x3c252f[_0x4840('0x2b')]=qs['limit'](_0x5bed54[_0x4840('0x43')][_0x4840('0x2b')]);_0x3c252f[_0x4840('0x2d')]=qs[_0x4840('0x2d')](_0x5bed54[_0x4840('0x43')][_0x4840('0x2d')]);}_0x3c252f[_0x4840('0x4b')]=qs[_0x4840('0x4c')](_0x5bed54[_0x4840('0x43')]['sort']);_0x3c252f[_0x4840('0x4d')]=qs[_0x4840('0x4e')](_[_0x4840('0x4f')](_0x5bed54[_0x4840('0x43')],_0x51ad8e[_0x4840('0x4e')]),_0x402ab2);if(_0x5bed54[_0x4840('0x43')][_0x4840('0x50')]){_0x3c252f['where']=_['merge'](_0x3c252f['where'],{'$or':_[_0x4840('0x42')](_0x402ab2,function(_0x3ac560){if(_0x3ac560[_0x4840('0x40')]!==_0x4840('0x51')){var _0x80081={};_0x80081[_0x3ac560['name']]={'$like':'%'+_0x5bed54[_0x4840('0x43')][_0x4840('0x50')]+'%'};return _0x80081;}})});}_0x3c252f=_['merge']({},_0x3c252f,_0x5bed54[_0x4840('0x52')]);var _0x56a63c={'where':_0x3c252f[_0x4840('0x4d')]};return db[_0x4840('0x3d')]['count'](_0x56a63c)[_0x4840('0x37')](function(_0x5ddad7){_0x400a7c[_0x4840('0x2c')]=_0x5ddad7;if(_0x5bed54['query']['includeAll']){_0x3c252f['include']=[{'all':!![]}];}return db['MailMessage'][_0x4840('0x53')](_0x3c252f);})['then'](function(_0x43f89a){_0x400a7c[_0x4840('0x54')]=_0x43f89a;return _0x400a7c;})[_0x4840('0x37')](respondWithFilteredResult(_0x3b2494,_0x3c252f))[_0x4840('0x29')](handleError(_0x3b2494,null));};exports[_0x4840('0x55')]=function(_0x56c49a,_0x5c290a){var _0x2fffbf={'raw':!![],'where':{'id':_0x56c49a[_0x4840('0x56')]['id']}},_0x2f7e06={};_0x2f7e06['model']=_[_0x4840('0x44')](db['MailMessage'][_0x4840('0x3e')]);_0x2f7e06[_0x4840('0x43')]=_[_0x4840('0x44')](_0x56c49a['query']);_0x2f7e06['filters']=_[_0x4840('0x45')](_0x2f7e06[_0x4840('0x41')],_0x2f7e06[_0x4840('0x43')]);_0x2fffbf['attributes']=_[_0x4840('0x45')](_0x2f7e06[_0x4840('0x41')],qs[_0x4840('0x47')](_0x56c49a[_0x4840('0x43')]['fields']));_0x2fffbf[_0x4840('0x46')]=_0x2fffbf[_0x4840('0x46')][_0x4840('0x48')]?_0x2fffbf[_0x4840('0x46')]:_0x2f7e06[_0x4840('0x41')];if(_0x56c49a[_0x4840('0x43')][_0x4840('0x57')]){_0x2fffbf[_0x4840('0x58')]=[{'all':!![]}];}_0x2fffbf=_['merge']({},_0x2fffbf,_0x56c49a[_0x4840('0x52')]);return db['MailMessage'][_0x4840('0x59')](_0x2fffbf)[_0x4840('0x37')](handleEntityNotFound(_0x5c290a,null))[_0x4840('0x37')](respondWithResult(_0x5c290a,null))[_0x4840('0x29')](handleError(_0x5c290a,null));};exports['update']=function(_0x21b4dd,_0xeaea4e){if(_0x21b4dd['body']['id']){delete _0x21b4dd['body']['id'];}return db[_0x4840('0x3d')]['find']({'where':{'id':_0x21b4dd[_0x4840('0x56')]['id']}})[_0x4840('0x37')](handleEntityNotFound(_0xeaea4e,null))[_0x4840('0x37')](saveUpdates(_0x21b4dd[_0x4840('0x5a')],null))[_0x4840('0x37')](respondWithResult(_0xeaea4e,null))[_0x4840('0x29')](handleError(_0xeaea4e,null));};exports[_0x4840('0x36')]=function(_0xe23b31,_0x39fe32){return db['MailMessage'][_0x4840('0x59')]({'where':{'id':_0xe23b31[_0x4840('0x56')]['id']}})[_0x4840('0x37')](handleEntityNotFound(_0x39fe32,null))[_0x4840('0x37')](removeEntity(_0x39fe32,null))[_0x4840('0x29')](handleError(_0x39fe32,null));};exports[_0x4840('0x5b')]=function(_0x3e85fb,_0xa61ffe){return db['MailMessage']['describe']()[_0x4840('0x37')](respondWithResult(_0xa61ffe,null))[_0x4840('0x29')](handleError(_0xa61ffe,null));};exports[_0x4840('0x5c')]=function(_0x2eae41,_0x15a046){return db[_0x4840('0x3d')]['create'](_0x2eae41['body'])[_0x4840('0x37')](function(_0x505354){if(_0x505354){if(_0x505354[_0x4840('0x5d')]===_0x4840('0x5e')&&!_0x505354[_0x4840('0x5f')]){var _0x2b00a2,_0x73247a,_0xaeb879;if(_0x2eae41['body']['to']){_0x73247a=_0x2eae41[_0x4840('0x5a')]['to'][_0x4840('0x60')](',')[0x0];}return db[_0x4840('0x61')][_0x4840('0x62')]({'where':{'id':_0x505354[_0x4840('0x63')]},'include':[{'model':db[_0x4840('0x64')],'as':'List','include':[{'model':db[_0x4840('0x65')],'as':'Contacts','where':{'email':_0x73247a},'limit':0x1,'order':[['updatedAt',_0x4840('0x66')]]}]},{'model':db['MailServerOut'],'as':'Smtp','raw':!![]}]})[_0x4840('0x37')](function(_0x3d702d){_0x2b00a2=_0x3d702d;if(_0x2b00a2&&_0x2b00a2[_0x4840('0x67')]){var _0x1fdd57={'tls':{'rejectUnauthorized':![]}};if(_[_0x4840('0x68')](_0x2b00a2['Smtp'][_0x4840('0x69')])){_0x1fdd57[_0x4840('0x6a')]=_0x2b00a2[_0x4840('0x67')][_0x4840('0x6a')];_0x1fdd57[_0x4840('0x6b')]=_0x2b00a2[_0x4840('0x67')]['port'];_0x1fdd57[_0x4840('0x6c')]=_0x2b00a2['Smtp'][_0x4840('0x6c')];if(_0x2b00a2[_0x4840('0x67')]['authentication']){_0x1fdd57[_0x4840('0x6d')]={'user':_0x2b00a2['Smtp'][_0x4840('0x6e')],'pass':_0x2b00a2[_0x4840('0x67')][_0x4840('0x6f')]};}}else{_0x1fdd57[_0x4840('0x69')]=_0x2b00a2[_0x4840('0x67')][_0x4840('0x69')];_0x1fdd57[_0x4840('0x6d')]={'user':_0x2b00a2[_0x4840('0x67')][_0x4840('0x6e')],'pass':_0x2b00a2[_0x4840('0x67')][_0x4840('0x6f')]};_0x1fdd57[_0x4840('0x6c')]=_0x2b00a2[_0x4840('0x67')][_0x4840('0x6c')];}if(_0x2eae41[_0x4840('0x5a')][_0x4840('0x70')]&&_0x2eae41[_0x4840('0x5a')]['attachments']['length']){for(var _0x35324f=0x0;_0x35324f<_0x2eae41['body'][_0x4840('0x70')][_0x4840('0x48')];_0x35324f+=0x1){_0x2eae41[_0x4840('0x5a')][_0x4840('0x70')][_0x35324f]={'filename':_0x2eae41[_0x4840('0x5a')]['attachments'][_0x35324f][_0x4840('0x3b')],'path':path['join'](config[_0x4840('0x71')],_0x4840('0x72'),_0x2eae41[_0x4840('0x5a')]['attachments'][_0x35324f]['basename'])};}}_0xaeb879={'account':_0x1fdd57,'message':_0x2eae41[_0x4840('0x5a')]};return;}})[_0x4840('0x37')](function(){if(_0x2b00a2[_0x4840('0x73')]){if(_0x2b00a2['List'][_0x4840('0x74')][_0x4840('0x48')]){return _0x2b00a2[_0x4840('0x73')][_0x4840('0x74')][0x0];}else{return db[_0x4840('0x65')][_0x4840('0x5c')](_['defaults'](_0x2eae41[_0x4840('0x5a')],{'firstName':_0x2eae41[_0x4840('0x5a')]['to'],'email':_0x2eae41['body']['to'],'phone':_0x2eae41[_0x4840('0x5a')]['to'],'ListId':_0x2b00a2['ListId']}));}}else{throw new Error(_0x4840('0x75'));}})[_0x4840('0x37')](function(){if(_0xaeb879){return respondWithRpcPromise('SendMail','sendMail',_0xaeb879,client9003)[_0x4840('0x37')](function(_0x44d5ab){return _0x505354[_0x4840('0x35')]({'read':!![],'messageId':_0x44d5ab[_0x4840('0x76')],'sentAt':moment()[_0x4840('0x77')]('YYYY-MM-DD\x20HH:mm:ss')});})[_0x4840('0x29')](function(_0x17d010){logger['error']('%s',JSON[_0x4840('0x25')](_0x17d010));return _0x505354;});}return _0x505354;});}return _0x505354;}})[_0x4840('0x37')](respondWithResult(_0x15a046,0xc9))[_0x4840('0x29')](handleError(_0x15a046,null));};var interaction_log=require(_0x4840('0x14'))(_0x4840('0x78'));exports[_0x4840('0x79')]=function(_0x4d9f35,_0x4ac154,_0xbe8167){var _0x5938f7={'agent':{},'channel':_0x4840('0x7a')};if(_0x4d9f35[_0x4840('0x5a')]['id']){delete _0x4d9f35[_0x4840('0x5a')]['id'];}_0x4d9f35[_0x4840('0x5a')][_0x4840('0x7b')]=!![];_0x4d9f35[_0x4840('0x5a')][_0x4840('0x7c')]=moment()[_0x4840('0x77')](_0x4840('0x7d'));_0x4d9f35[_0x4840('0x5a')][_0x4840('0x7e')]=_0x4d9f35['body']['UserId']||_0x4d9f35[_0x4840('0x6e')]['id'];_0x5938f7[_0x4840('0x7f')]['id']=_0x4d9f35[_0x4840('0x5a')][_0x4840('0x7e')];return db[_0x4840('0x3d')]['find']({'where':{'id':_0x4d9f35['params']['id'],'UserId':null},'include':[{'model':db[_0x4840('0x65')],'as':_0x4840('0x80')}]})['then'](handleEntityNotFound(_0x4ac154,null))['then'](saveUpdates(_0x4d9f35[_0x4840('0x5a')],null))[_0x4840('0x37')](function(_0x2566a7){if(_0x2566a7){_0x5938f7[_0x4840('0x27')]=_0x2566a7[_0x4840('0x81')]({'plain':!![]});return db[_0x4840('0x82')][_0x4840('0x59')]({'where':{'id':_0x2566a7[_0x4840('0x83')]}});}return null;})[_0x4840('0x37')](handleEntityNotFound(_0x4ac154,null))[_0x4840('0x37')](function(_0xe1db8b){if(_0xe1db8b){return _0xe1db8b[_0x4840('0x35')]({'UserId':_0x4d9f35[_0x4840('0x5a')][_0x4840('0x7e')],'read1stAt':_['isNil'](_0xe1db8b[_0x4840('0x84')])?moment()[_0x4840('0x77')](_0x4840('0x7d')):undefined});}return null;})[_0x4840('0x37')](function(_0x1e1f0a){if(_0x1e1f0a){_0x5938f7['interaction']=_0x1e1f0a[_0x4840('0x81')]({'plain':!![]});interaction_log['info'](_0x4840('0x85'),_0x4d9f35['user']['id'],_0x4d9f35[_0x4840('0x6e')][_0x4840('0x3b')],_0x4d9f35[_0x4840('0x6e')][_0x4840('0x86')],_0x5938f7['interaction']['id'],_0x4d9f35[_0x4840('0x5a')]?JSON[_0x4840('0x25')](_0x4d9f35[_0x4840('0x5a')]):_0x4840('0x87'));return respondWithRpcPromise(_0x4840('0x88'),'acceptMessage',_0x5938f7);}return null;})[_0x4840('0x37')](function(_0x2cb231){return db[_0x4840('0x65')][_0x4840('0x5b')]()['then'](function(_0x5a6afd){var _0x57a603=[];for(var _0x5910d7=0x0;_0x5910d7=_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 +var _0x1df0=['apply','reject','save','update','then','get','MailQueues','UserProfileResource','destroy','end','sendStatus','error','stack','name','send','map','MailQueue','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','includeAll','findAll','catch','show','include','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','params','describe','getMembers','findOne','UserMailQueue','hasOwnProperty','MailQueueId','User','findAndCountAll','UserId','agent','mailPause','createdAt','rows','format','%s/%s','SIP','updatedAt','getTeams','Team','online','voicePause','interface','flatMap','Agents','addTeams','each','forEach','emit','userMailQueue:save','removeTeams','ids','select','field','tq.TeamId','from','team_has_mail_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','clone','sequelize','toString','every','TeamId','includes','union','value','transaction','isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','spread','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','register','status','json','limit','count','offset','set','Content-Range'];(function(_0x269e5a,_0x1cbe9f){var _0x32ed5a=function(_0x54eb97){while(--_0x54eb97){_0x269e5a['push'](_0x269e5a['shift']());}};_0x32ed5a(++_0x1cbe9f);}(_0x1df0,0x19c));var _0x01df=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x1df0[_0x5d4607];return _0x5e4a86;};'use strict';var emlformat=require(_0x01df('0x0'));var rimraf=require(_0x01df('0x1'));var zipdir=require(_0x01df('0x2'));var jsonpatch=require(_0x01df('0x3'));var rp=require(_0x01df('0x4'));var moment=require(_0x01df('0x5'));var BPromise=require(_0x01df('0x6'));var Mustache=require(_0x01df('0x7'));var util=require(_0x01df('0x8'));var path=require(_0x01df('0x9'));var sox=require(_0x01df('0xa'));var csv=require(_0x01df('0xb'));var ejs=require(_0x01df('0xc'));var fs=require('fs');var fs_extra=require(_0x01df('0xd'));var _=require('lodash');var squel=require(_0x01df('0xe'));var crypto=require(_0x01df('0xf'));var jsforce=require(_0x01df('0x10'));var deskjs=require(_0x01df('0x11'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x01df('0x12'));var Redis=require(_0x01df('0x13'));var authService=require(_0x01df('0x14'));var qs=require(_0x01df('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x01df('0x16'));var logger=require(_0x01df('0x17'))(_0x01df('0x18'));var utils=require(_0x01df('0x19'));var config=require(_0x01df('0x1a'));var licenseUtil=require(_0x01df('0x1b'));var db=require('../../mysqldb')['db'];config[_0x01df('0x1c')]=_[_0x01df('0x1d')](config[_0x01df('0x1c')],{'host':_0x01df('0x1e'),'port':0x18eb});var socket=require(_0x01df('0x1f'))(new Redis(config[_0x01df('0x1c')]));require(_0x01df('0x20'))[_0x01df('0x21')](socket);function respondWithStatusCode(_0x6874b5,_0x1d16e7){_0x1d16e7=_0x1d16e7||0xcc;return function(_0x3cb0b0){if(_0x3cb0b0){return _0x6874b5['sendStatus'](_0x1d16e7);}return _0x6874b5[_0x01df('0x22')](_0x1d16e7)['end']();};}function respondWithResult(_0x28366d,_0x59586e){_0x59586e=_0x59586e||0xc8;return function(_0x740f93){if(_0x740f93){return _0x28366d[_0x01df('0x22')](_0x59586e)[_0x01df('0x23')](_0x740f93);}};}function respondWithFilteredResult(_0x3c0fd0,_0x53ab95){return function(_0x16e31f){if(_0x16e31f){var _0x177a73=typeof _0x53ab95['offset']==='undefined'&&typeof _0x53ab95[_0x01df('0x24')]==='undefined';var _0x5744ff=_0x16e31f[_0x01df('0x25')];var _0x2e8a82=_0x177a73?0x0:_0x53ab95[_0x01df('0x26')];var _0x29baae=_0x177a73?_0x16e31f[_0x01df('0x25')]:_0x53ab95['offset']+_0x53ab95['limit'];var _0x16c430;if(_0x29baae>=_0x5744ff){_0x29baae=_0x5744ff;_0x16c430=0xc8;}else{_0x16c430=0xce;}_0x3c0fd0['status'](_0x16c430);return _0x3c0fd0[_0x01df('0x27')](_0x01df('0x28'),_0x2e8a82+'-'+_0x29baae+'/'+_0x5744ff)[_0x01df('0x23')](_0x16e31f);}return null;};}function patchUpdates(_0x62be9){return function(_0x149a1c){try{jsonpatch[_0x01df('0x29')](_0x149a1c,_0x62be9,!![]);}catch(_0x183dcc){return BPromise[_0x01df('0x2a')](_0x183dcc);}return _0x149a1c[_0x01df('0x2b')]();};}function saveUpdates(_0x4f0762,_0xe6965c){return function(_0x6b1695){if(_0x6b1695){return _0x6b1695[_0x01df('0x2c')](_0x4f0762)['then'](function(_0x27e7b5){return _0x27e7b5;});}return null;};}function removeEntity(_0x30b9b6,_0x5324bb){return function(_0xc249b4){if(_0xc249b4){return _0xc249b4['destroy']()[_0x01df('0x2d')](function(){var _0x12775a=_0xc249b4[_0x01df('0x2e')]({'plain':!![]});var _0x20f470=_0x01df('0x2f');return db[_0x01df('0x30')][_0x01df('0x31')]({'where':{'type':_0x20f470,'resourceId':_0x12775a['id']}})['then'](function(){return _0xc249b4;});})[_0x01df('0x2d')](function(){_0x30b9b6[_0x01df('0x22')](0xcc)[_0x01df('0x32')]();});}};}function handleEntityNotFound(_0x5a24ea,_0x447f85){return function(_0x152b43){if(!_0x152b43){_0x5a24ea[_0x01df('0x33')](0x194);}return _0x152b43;};}function handleError(_0xc698ac,_0x383520){_0x383520=_0x383520||0x1f4;return function(_0x46f857){logger[_0x01df('0x34')](_0x46f857[_0x01df('0x35')]);if(_0x46f857[_0x01df('0x36')]){delete _0x46f857['name'];}_0xc698ac['status'](_0x383520)[_0x01df('0x37')](_0x46f857);};}exports['index']=function(_0xf93b75,_0x3e8234){var _0x24ea12={},_0x2aaa58={},_0x2d515f={'count':0x0,'rows':[]};var _0xa3843b=_[_0x01df('0x38')](db[_0x01df('0x39')][_0x01df('0x3a')],function(_0x3cdfb8){return{'name':_0x3cdfb8[_0x01df('0x3b')],'type':_0x3cdfb8[_0x01df('0x3c')][_0x01df('0x3d')]};});_0x2aaa58[_0x01df('0x3e')]=_[_0x01df('0x38')](_0xa3843b,_0x01df('0x36'));_0x2aaa58[_0x01df('0x3f')]=_[_0x01df('0x40')](_0xf93b75[_0x01df('0x3f')]);_0x2aaa58[_0x01df('0x41')]=_[_0x01df('0x42')](_0x2aaa58[_0x01df('0x3e')],_0x2aaa58[_0x01df('0x3f')]);_0x24ea12[_0x01df('0x43')]=_[_0x01df('0x42')](_0x2aaa58[_0x01df('0x3e')],qs[_0x01df('0x44')](_0xf93b75['query'][_0x01df('0x44')]));_0x24ea12[_0x01df('0x43')]=_0x24ea12[_0x01df('0x43')][_0x01df('0x45')]?_0x24ea12['attributes']:_0x2aaa58[_0x01df('0x3e')];if(!_0xf93b75[_0x01df('0x3f')]['hasOwnProperty'](_0x01df('0x46'))){_0x24ea12[_0x01df('0x24')]=qs[_0x01df('0x24')](_0xf93b75[_0x01df('0x3f')]['limit']);_0x24ea12[_0x01df('0x26')]=qs[_0x01df('0x26')](_0xf93b75[_0x01df('0x3f')]['offset']);}_0x24ea12[_0x01df('0x47')]=qs['sort'](_0xf93b75[_0x01df('0x3f')][_0x01df('0x48')]);_0x24ea12[_0x01df('0x49')]=qs[_0x01df('0x41')](_[_0x01df('0x4a')](_0xf93b75[_0x01df('0x3f')],_0x2aaa58[_0x01df('0x41')]),_0xa3843b);if(_0xf93b75['query'][_0x01df('0x4b')]){_0x24ea12[_0x01df('0x49')]=_['merge'](_0x24ea12['where'],{'$or':_[_0x01df('0x38')](_0xa3843b,function(_0x412a80){if(_0x412a80['type']!==_0x01df('0x4c')){var _0x44e282={};_0x44e282[_0x412a80[_0x01df('0x36')]]={'$like':'%'+_0xf93b75['query'][_0x01df('0x4b')]+'%'};return _0x44e282;}})});}_0x24ea12=_[_0x01df('0x4d')]({},_0x24ea12,_0xf93b75['options']);var _0x21718b={'where':_0x24ea12['where']};return db[_0x01df('0x39')][_0x01df('0x25')](_0x21718b)['then'](function(_0x6518a6){_0x2d515f['count']=_0x6518a6;if(_0xf93b75[_0x01df('0x3f')][_0x01df('0x4e')]){_0x24ea12['include']=[{'all':!![]}];}return db[_0x01df('0x39')][_0x01df('0x4f')](_0x24ea12);})[_0x01df('0x2d')](function(_0xd5b81f){_0x2d515f['rows']=_0xd5b81f;return _0x2d515f;})[_0x01df('0x2d')](respondWithFilteredResult(_0x3e8234,_0x24ea12))[_0x01df('0x50')](handleError(_0x3e8234,null));};exports[_0x01df('0x51')]=function(_0x591fb2,_0x1a5229){var _0x93c0a0={'raw':!![],'where':{'id':_0x591fb2['params']['id']}},_0x4943f4={};_0x4943f4[_0x01df('0x3e')]=_['keys'](db[_0x01df('0x39')][_0x01df('0x3a')]);_0x4943f4['query']=_['keys'](_0x591fb2[_0x01df('0x3f')]);_0x4943f4[_0x01df('0x41')]=_[_0x01df('0x42')](_0x4943f4[_0x01df('0x3e')],_0x4943f4[_0x01df('0x3f')]);_0x93c0a0[_0x01df('0x43')]=_['intersection'](_0x4943f4[_0x01df('0x3e')],qs[_0x01df('0x44')](_0x591fb2[_0x01df('0x3f')][_0x01df('0x44')]));_0x93c0a0[_0x01df('0x43')]=_0x93c0a0[_0x01df('0x43')][_0x01df('0x45')]?_0x93c0a0[_0x01df('0x43')]:_0x4943f4['model'];if(_0x591fb2[_0x01df('0x3f')][_0x01df('0x4e')]){_0x93c0a0[_0x01df('0x52')]=[{'all':!![]}];}_0x93c0a0=_['merge']({},_0x93c0a0,_0x591fb2[_0x01df('0x53')]);return db[_0x01df('0x39')]['find'](_0x93c0a0)[_0x01df('0x2d')](handleEntityNotFound(_0x1a5229,null))[_0x01df('0x2d')](respondWithResult(_0x1a5229,null))['catch'](handleError(_0x1a5229,null));};exports[_0x01df('0x54')]=function(_0x306732,_0x3af56c){return db[_0x01df('0x39')][_0x01df('0x54')](_0x306732[_0x01df('0x55')],{})[_0x01df('0x2d')](function(_0x4386f0){var _0x1410ca=_0x306732[_0x01df('0x56')][_0x01df('0x2e')]({'plain':!![]});if(!_0x1410ca)throw new Error(_0x01df('0x57'));if(_0x1410ca[_0x01df('0x58')]===_0x01df('0x56')){var _0x326be8=_0x4386f0[_0x01df('0x2e')]({'plain':!![]});var _0x3a56ad=_0x01df('0x2f');return db[_0x01df('0x59')][_0x01df('0x5a')]({'where':{'name':_0x3a56ad,'userProfileId':_0x1410ca[_0x01df('0x5b')]},'raw':!![]})[_0x01df('0x2d')](function(_0x5f283e){if(_0x5f283e&&_0x5f283e[_0x01df('0x5c')]===0x0){return db[_0x01df('0x30')][_0x01df('0x54')]({'name':_0x326be8[_0x01df('0x36')],'resourceId':_0x326be8['id'],'type':_0x5f283e[_0x01df('0x36')],'sectionId':_0x5f283e['id']},{})[_0x01df('0x2d')](function(){return _0x4386f0;});}else{return _0x4386f0;}})[_0x01df('0x50')](function(_0x4070a8){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4070a8);throw _0x4070a8;});}return _0x4386f0;})[_0x01df('0x2d')](respondWithResult(_0x3af56c,0xc9))[_0x01df('0x50')](handleError(_0x3af56c,null));};exports[_0x01df('0x2c')]=function(_0x5822bb,_0xb37ba9){if(_0x5822bb['body']['id']){delete _0x5822bb['body']['id'];}return db[_0x01df('0x39')][_0x01df('0x5a')]({'where':{'id':_0x5822bb['params']['id']}})[_0x01df('0x2d')](handleEntityNotFound(_0xb37ba9,null))[_0x01df('0x2d')](saveUpdates(_0x5822bb[_0x01df('0x55')],null))['then'](respondWithResult(_0xb37ba9,null))[_0x01df('0x50')](handleError(_0xb37ba9,null));};exports[_0x01df('0x31')]=function(_0x2c0142,_0x5de2b4){return db['MailQueue'][_0x01df('0x5a')]({'where':{'id':_0x2c0142[_0x01df('0x5d')]['id']}})[_0x01df('0x2d')](handleEntityNotFound(_0x5de2b4,null))[_0x01df('0x2d')](removeEntity(_0x5de2b4,null))['catch'](handleError(_0x5de2b4,null));};exports[_0x01df('0x5e')]=function(_0x549cb6,_0x2f8548){return db[_0x01df('0x39')][_0x01df('0x5e')]()[_0x01df('0x2d')](respondWithResult(_0x2f8548,null))[_0x01df('0x50')](handleError(_0x2f8548,null));};exports[_0x01df('0x5f')]=function(_0xca861f,_0x139621,_0x7fa0cd){var _0x22908b={'raw':!![],'where':{}},_0x1816a7={},_0x4c592c;return db[_0x01df('0x39')][_0x01df('0x60')]({'where':{'id':_0xca861f[_0x01df('0x5d')]['id']}})['then'](handleEntityNotFound(_0x139621,null))[_0x01df('0x2d')](function(_0x3d9f45){if(_0x3d9f45){_0x4c592c=_0x3d9f45['get']({'plain':!![]});_0x1816a7[_0x01df('0x3e')]=_[_0x01df('0x40')](db[_0x01df('0x61')][_0x01df('0x3a')]);_0x1816a7['query']=_[_0x01df('0x40')](_0xca861f[_0x01df('0x3f')]);_0x1816a7[_0x01df('0x41')]=_[_0x01df('0x42')](_0x1816a7['model'],_0x1816a7[_0x01df('0x3f')]);_0x22908b[_0x01df('0x43')]=_[_0x01df('0x42')](_0x1816a7[_0x01df('0x3e')],qs[_0x01df('0x44')](_0xca861f[_0x01df('0x3f')][_0x01df('0x44')]));_0x22908b[_0x01df('0x43')]=_0x22908b[_0x01df('0x43')]['length']?_0x22908b[_0x01df('0x43')]:_0x1816a7[_0x01df('0x3e')];if(!_0xca861f['query'][_0x01df('0x62')](_0x01df('0x46'))){_0x22908b[_0x01df('0x24')]=qs[_0x01df('0x24')](_0xca861f[_0x01df('0x3f')][_0x01df('0x24')]);_0x22908b[_0x01df('0x26')]=qs[_0x01df('0x26')](_0xca861f[_0x01df('0x3f')][_0x01df('0x26')]);}_0x22908b[_0x01df('0x47')]=qs[_0x01df('0x48')](_0xca861f[_0x01df('0x3f')][_0x01df('0x48')]);_0x22908b[_0x01df('0x49')]=qs['filters'](_[_0x01df('0x4a')](_0xca861f[_0x01df('0x3f')],_0x1816a7['filters']));_0x22908b['where'][_0x01df('0x63')]=_0x3d9f45['id'];if(_0xca861f[_0x01df('0x3f')][_0x01df('0x4b')]){_0x22908b[_0x01df('0x49')]=_[_0x01df('0x4d')](_0x22908b[_0x01df('0x49')],{'$or':_[_0x01df('0x38')](_0x22908b[_0x01df('0x43')],function(_0x5bb29c){var _0x4c9abf={};_0x4c9abf[_0x5bb29c]={'$like':'%'+_0xca861f[_0x01df('0x3f')][_0x01df('0x4b')]+'%'};return _0x4c9abf;})});}_0x22908b=_[_0x01df('0x4d')]({},_0x22908b,_0xca861f['options']);return db[_0x01df('0x61')][_0x01df('0x4f')](_0x22908b);}})['then'](function(_0x40b66c){if(_0x40b66c){return db[_0x01df('0x64')][_0x01df('0x65')]({'where':{'id':_[_0x01df('0x38')](_0x40b66c,_0x01df('0x66')),'role':_0x01df('0x67')},'attributes':['id',_0x01df('0x36'),_0x01df('0x68'),'updatedAt',_0x01df('0x69')]});}})['then'](function(_0x3960f3){if(_0x3960f3){return{'count':_0x3960f3[_0x01df('0x25')],'rows':_[_0x01df('0x38')](_0x3960f3[_0x01df('0x6a')],function(_0x43c466){return{'membername':_0x43c466[_0x01df('0x36')],'UserId':_0x43c466['id'],'queue_name':_0x4c592c['name'],'MailQueueId':_0x4c592c['id'],'interface':util[_0x01df('0x6b')](_0x01df('0x6c'),_0x01df('0x6d'),_0x43c466['name']),'penalty':0x0,'paused':_0x43c466[_0x01df('0x68')],'createdAt':_0x43c466[_0x01df('0x69')],'updatedAt':_0x43c466[_0x01df('0x6e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x01df('0x2d')](respondWithFilteredResult(_0x139621,_0x22908b))[_0x01df('0x50')](handleError(_0x139621,null));};exports[_0x01df('0x6f')]=function(_0x5dc07d,_0x3a84fc,_0xf7bd0){var _0x3e0ff1={};var _0x84d67f={};var _0x138808;var _0x5189f2;return db[_0x01df('0x39')][_0x01df('0x60')]({'where':{'id':_0x5dc07d['params']['id']}})['then'](handleEntityNotFound(_0x3a84fc,null))[_0x01df('0x2d')](function(_0x1efe54){if(_0x1efe54){_0x138808=_0x1efe54;_0x84d67f[_0x01df('0x3e')]=_['keys'](db[_0x01df('0x70')][_0x01df('0x3a')]);_0x84d67f[_0x01df('0x3f')]=_[_0x01df('0x40')](_0x5dc07d[_0x01df('0x3f')]);_0x84d67f['filters']=_[_0x01df('0x42')](_0x84d67f['model'],_0x84d67f[_0x01df('0x3f')]);_0x3e0ff1[_0x01df('0x43')]=_['intersection'](_0x84d67f['model'],qs[_0x01df('0x44')](_0x5dc07d[_0x01df('0x3f')]['fields']));_0x3e0ff1[_0x01df('0x43')]=_0x3e0ff1['attributes'][_0x01df('0x45')]?_0x3e0ff1[_0x01df('0x43')]:_0x84d67f[_0x01df('0x3e')];_0x3e0ff1[_0x01df('0x47')]=qs[_0x01df('0x48')](_0x5dc07d[_0x01df('0x3f')]['sort']);_0x3e0ff1[_0x01df('0x49')]=qs[_0x01df('0x41')](_[_0x01df('0x4a')](_0x5dc07d['query'],_0x84d67f[_0x01df('0x41')]));if(_0x5dc07d['query'][_0x01df('0x4b')]){_0x3e0ff1[_0x01df('0x49')]=_[_0x01df('0x4d')](_0x3e0ff1['where'],{'$or':_[_0x01df('0x38')](_0x3e0ff1[_0x01df('0x43')],function(_0x29492c){var _0x1ab42a={};_0x1ab42a[_0x29492c]={'$like':'%'+_0x5dc07d[_0x01df('0x3f')][_0x01df('0x4b')]+'%'};return _0x1ab42a;})});}_0x3e0ff1=_[_0x01df('0x4d')]({},_0x3e0ff1,_0x5dc07d[_0x01df('0x53')]);return _0x138808[_0x01df('0x6f')](_0x3e0ff1);}})[_0x01df('0x2d')](function(_0x147c51){if(_0x147c51){_0x5189f2=_0x147c51['length'];if(!_0x5dc07d[_0x01df('0x3f')][_0x01df('0x62')](_0x01df('0x46'))){_0x3e0ff1[_0x01df('0x24')]=qs[_0x01df('0x24')](_0x5dc07d[_0x01df('0x3f')][_0x01df('0x24')]);_0x3e0ff1['offset']=qs[_0x01df('0x26')](_0x5dc07d[_0x01df('0x3f')]['offset']);}return _0x138808[_0x01df('0x6f')](_0x3e0ff1);}})[_0x01df('0x2d')](function(_0xe30025){if(_0xe30025){return _0xe30025?{'count':_0x5189f2,'rows':_0xe30025}:null;}})[_0x01df('0x2d')](respondWithResult(_0x3a84fc,null))['catch'](handleError(_0x3a84fc,null));};exports['addTeams']=function(_0x16af7b,_0x26b870,_0x1b83f2){var _0x4208d1=_0x16af7b[_0x01df('0x55')]['ids'];return db['Team'][_0x01df('0x4f')]({'where':{'id':_0x4208d1},'attributes':['id'],'include':[{'model':db[_0x01df('0x64')],'as':'Agents','attributes':['id',_0x01df('0x36'),_0x01df('0x71'),_0x01df('0x72'),_0x01df('0x73')],'raw':!![]}]})[_0x01df('0x2d')](function(_0x1e5e6e){if(_0x1e5e6e){var _0x3aef56=_[_0x01df('0x74')](_0x1e5e6e,function(_0x37fef0){var _0x1a7aa7=_0x37fef0[_0x01df('0x2e')]({'plain':!![]});return _0x1a7aa7[_0x01df('0x75')];});return db[_0x01df('0x39')][_0x01df('0x5a')]({'where':{'id':_0x16af7b[_0x01df('0x5d')]['id']}})[_0x01df('0x2d')](function(_0x17229a){return db['sequelize']['transaction'](function(_0x1fec63){return _0x17229a[_0x01df('0x76')](_0x4208d1,{'transaction':_0x1fec63})[_0x01df('0x2d')](function(){return BPromise[_0x01df('0x77')](_0x3aef56,function(_0x365dbb){return db['UserMailQueue']['findOrCreate']({'where':{'UserId':_0x365dbb['id'],'MailQueueId':_0x16af7b[_0x01df('0x5d')]['id']},'transaction':_0x1fec63});});})[_0x01df('0x2d')](function(){_0x3aef56[_0x01df('0x78')](function(_0x542dbf){socket[_0x01df('0x79')](_0x01df('0x7a'),{'UserId':_0x542dbf['id'],'MailQueueId':_0x17229a['id']});});});});});}})[_0x01df('0x2d')](respondWithStatusCode(_0x26b870,null))['catch'](handleError(_0x26b870,null));};exports[_0x01df('0x7b')]=function(_0x47fc9d,_0x3cc30a,_0x26cbc2){return db[_0x01df('0x70')]['findAll']({'where':{'id':_0x47fc9d[_0x01df('0x3f')][_0x01df('0x7c')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x01df('0x75'),'attributes':['id'],'raw':!![]}]})[_0x01df('0x2d')](handleEntityNotFound(_0x3cc30a,null))[_0x01df('0x2d')](function(_0x565d3c){var _0x3f0544=_[_0x01df('0x38')](_0x565d3c,'id');var _0x174f95=[];var _0x52d34f=[];var _0x12eecf=squel[_0x01df('0x7d')]();_0x12eecf[_0x01df('0x7e')](_0x01df('0x7f'))[_0x01df('0x80')](_0x01df('0x81'),'tq')[_0x01df('0x82')](_0x01df('0x83'),'ut',_0x01df('0x84'))['where'](_0x01df('0x85'),_0x47fc9d[_0x01df('0x5d')]['id']);for(var _0x2086e5=0x0;_0x2086e5<_0x565d3c[_0x01df('0x45')];_0x2086e5+=0x1){let _0x8e6bc8=_0x565d3c[_0x2086e5];for(var _0x569c08=0x0;_0x569c08<_0x8e6bc8[_0x01df('0x75')][_0x01df('0x45')];_0x569c08+=0x1){let _0x136c7f=_0x8e6bc8[_0x01df('0x75')][_0x569c08];var _0x28dec5=_0x12eecf[_0x01df('0x86')]();_0x28dec5['where']('ut.UserId\x20=\x20?',_0x136c7f['id']);_0x52d34f['push'](db[_0x01df('0x87')]['query'](_0x28dec5[_0x01df('0x88')](),{'type':db[_0x01df('0x87')]['QueryTypes']['SELECT']})['then'](function(_0x114940){if(_0x114940['length']===0x1){return _0x136c7f['id'];}else{var _0x32da71=_[_0x01df('0x89')](_[_0x01df('0x38')](_0x114940,_0x01df('0x8a')),function(_0x4bcd0e){return _[_0x01df('0x8b')](_0x3f0544,_0x4bcd0e);});if(_0x32da71){return _0x136c7f['id'];}}}));}}return BPromise['all'](_0x52d34f)[_0x01df('0x2d')](function(_0x3c79e4){_0x174f95=_(_0x174f95)[_0x01df('0x8c')](_0x3c79e4)['compact']()[_0x01df('0x8d')]();return db[_0x01df('0x39')][_0x01df('0x5a')]({'where':{'id':_0x47fc9d[_0x01df('0x5d')]['id']}})['then'](function(_0x3f8df4){return db[_0x01df('0x87')][_0x01df('0x8e')](function(_0x38944c){return _0x3f8df4[_0x01df('0x7b')](_0x47fc9d[_0x01df('0x3f')][_0x01df('0x7c')],{'transaction':_0x38944c})[_0x01df('0x2d')](function(){if(!_[_0x01df('0x8f')](_0x174f95)){return _0x3f8df4[_0x01df('0x90')](_0x174f95,{'transaction':_0x38944c});}})[_0x01df('0x2d')](function(){_0x174f95[_0x01df('0x78')](function(_0x3cce50){socket[_0x01df('0x79')](_0x01df('0x91'),{'UserId':_0x3cce50,'MailQueueId':_0x3f8df4['id']});});});});});});})[_0x01df('0x2d')](respondWithStatusCode(_0x3cc30a,null))[_0x01df('0x50')](handleError(_0x3cc30a,null));};exports['addAgents']=function(_0x52c043,_0x2bc4f7,_0x5abf32){return db['MailQueue'][_0x01df('0x5a')]({'where':{'id':_0x52c043[_0x01df('0x5d')]['id']}})[_0x01df('0x2d')](handleEntityNotFound(_0x2bc4f7,null))[_0x01df('0x2d')](function(_0x3dc27e){if(_0x3dc27e){return _0x3dc27e[_0x01df('0x92')](_0x52c043[_0x01df('0x55')]['ids'],_[_0x01df('0x93')](_0x52c043[_0x01df('0x55')],[_0x01df('0x7c'),'id'])||{})[_0x01df('0x94')](function(_0x3fe177){for(var _0x491d3a=0x0;_0x491d3a<_0x52c043[_0x01df('0x55')]['ids'][_0x01df('0x45')];_0x491d3a+=0x1){socket[_0x01df('0x79')](_0x01df('0x7a'),{'UserId':_0x52c043[_0x01df('0x55')]['ids'][_0x491d3a],'MailQueueId':_0x52c043[_0x01df('0x5d')]['id']});}return _0x3fe177;});}})[_0x01df('0x2d')](respondWithResult(_0x2bc4f7,null))['catch'](handleError(_0x2bc4f7,null));};exports[_0x01df('0x90')]=function(_0x379da7,_0x3efba5,_0x29ae3a){return db[_0x01df('0x39')][_0x01df('0x5a')]({'where':{'id':_0x379da7[_0x01df('0x5d')]['id']}})[_0x01df('0x2d')](handleEntityNotFound(_0x3efba5,null))[_0x01df('0x2d')](function(_0x4819ce){if(_0x4819ce){return _0x4819ce[_0x01df('0x90')](_0x379da7['query']['ids'])['then'](function(){if(_[_0x01df('0x95')](_0x379da7[_0x01df('0x3f')][_0x01df('0x7c')])){for(var _0x30fbda=0x0;_0x30fbda<_0x379da7[_0x01df('0x3f')][_0x01df('0x7c')][_0x01df('0x45')];_0x30fbda+=0x1){socket[_0x01df('0x79')]('userMailQueue:remove',{'UserId':Number(_0x379da7[_0x01df('0x3f')]['ids'][_0x30fbda]),'MailQueueId':Number(_0x379da7[_0x01df('0x5d')]['id'])});}}else{socket[_0x01df('0x79')]('userMailQueue:remove',{'UserId':Number(_0x379da7[_0x01df('0x3f')][_0x01df('0x7c')]),'MailQueueId':Number(_0x379da7[_0x01df('0x5d')]['id'])});}});}})[_0x01df('0x2d')](respondWithStatusCode(_0x3efba5,null))['catch'](handleError(_0x3efba5,null));};exports[_0x01df('0x96')]=function(_0x3b0e6c,_0x234712,_0x43c3d1){var _0x2e07a9={};var _0xd71abf={};var _0x2e795b;var _0x5ad35c;return db[_0x01df('0x39')][_0x01df('0x60')]({'where':{'id':_0x3b0e6c[_0x01df('0x5d')]['id']}})[_0x01df('0x2d')](handleEntityNotFound(_0x234712,null))[_0x01df('0x2d')](function(_0x5bd98f){if(_0x5bd98f){_0x2e795b=_0x5bd98f;_0xd71abf[_0x01df('0x3e')]=_[_0x01df('0x40')](db[_0x01df('0x64')][_0x01df('0x3a')]);_0xd71abf[_0x01df('0x3f')]=_[_0x01df('0x40')](_0x3b0e6c['query']);_0xd71abf[_0x01df('0x41')]=_[_0x01df('0x42')](_0xd71abf[_0x01df('0x3e')],_0xd71abf[_0x01df('0x3f')]);_0x2e07a9[_0x01df('0x43')]=_['intersection'](_0xd71abf['model'],qs[_0x01df('0x44')](_0x3b0e6c[_0x01df('0x3f')]['fields']));_0x2e07a9[_0x01df('0x43')]=_0x2e07a9[_0x01df('0x43')]['length']?_0x2e07a9[_0x01df('0x43')]:_0xd71abf[_0x01df('0x3e')];_0x2e07a9[_0x01df('0x47')]=qs['sort'](_0x3b0e6c[_0x01df('0x3f')][_0x01df('0x48')]);_0x2e07a9[_0x01df('0x49')]=qs['filters'](_[_0x01df('0x4a')](_0x3b0e6c[_0x01df('0x3f')],_0xd71abf[_0x01df('0x41')]));if(_0x3b0e6c[_0x01df('0x3f')][_0x01df('0x4b')]){_0x2e07a9['where']=_[_0x01df('0x4d')](_0x2e07a9[_0x01df('0x49')],{'$or':_[_0x01df('0x38')](_0x2e07a9[_0x01df('0x43')],function(_0x551486){var _0x1e5408={};_0x1e5408[_0x551486]={'$like':'%'+_0x3b0e6c[_0x01df('0x3f')]['filter']+'%'};return _0x1e5408;})});}_0x2e07a9=_[_0x01df('0x4d')]({},_0x2e07a9,_0x3b0e6c['options']);return _0x2e795b[_0x01df('0x96')](_0x2e07a9);}})[_0x01df('0x2d')](function(_0x552623){if(_0x552623){_0x5ad35c=_0x552623[_0x01df('0x45')];if(!_0x3b0e6c[_0x01df('0x3f')]['hasOwnProperty'](_0x01df('0x46'))){_0x2e07a9[_0x01df('0x24')]=qs[_0x01df('0x24')](_0x3b0e6c['query']['limit']);_0x2e07a9[_0x01df('0x26')]=qs[_0x01df('0x26')](_0x3b0e6c[_0x01df('0x3f')]['offset']);}return _0x2e795b[_0x01df('0x96')](_0x2e07a9);}})['then'](function(_0x4e13ef){if(_0x4e13ef){return _0x4e13ef?{'count':_0x5ad35c,'rows':_0x4e13ef}:null;}})[_0x01df('0x2d')](respondWithResult(_0x234712,null))[_0x01df('0x50')](handleError(_0x234712,null));}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.events.js b/server/api/mailQueue/mailQueue.events.js index cffdd7a..a185a66 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 _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 +var _0x4cf6=['exports','events','../../mysqldb','remove','emit','hasOwnProperty','hook'];(function(_0x42bb6d,_0x412255){var _0x1db89b=function(_0x5da43a){while(--_0x5da43a){_0x42bb6d['push'](_0x42bb6d['shift']());}};_0x1db89b(++_0x412255);}(_0x4cf6,0x104));var _0x64cf=function(_0x421853,_0x26234c){_0x421853=_0x421853-0x0;var _0x5ceb30=_0x4cf6[_0x421853];return _0x5ceb30;};'use strict';var EventEmitter=require(_0x64cf('0x0'));var MailQueue=require(_0x64cf('0x1'))['db']['MailQueue'];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x64cf('0x2')};function emitEvent(_0x48c156){return function(_0x1c1439,_0x48c82a,_0x58d804){MailQueueEvents['emit'](_0x48c156+':'+_0x1c1439['id'],_0x1c1439);MailQueueEvents[_0x64cf('0x3')](_0x48c156,_0x1c1439);_0x58d804(null);};}for(var e in events){if(events[_0x64cf('0x4')](e)){var event=events[e];MailQueue[_0x64cf('0x5')](e,emitEvent(event));}}module[_0x64cf('0x6')]=MailQueueEvents; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.model.js b/server/api/mailQueue/mailQueue.model.js index 7de0f3e..58f8866 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 _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 +var _0x55a1=['define','MailQueue','mail_queues','../../config/logger','api','moment','path','rimraf','../../config/environment','exports'];(function(_0x44474f,_0x431580){var _0x427d97=function(_0x53f7d4){while(--_0x53f7d4){_0x44474f['push'](_0x44474f['shift']());}};_0x427d97(++_0x431580);}(_0x55a1,0xfd));var _0x155a=function(_0x5017d6,_0x531d0c){_0x5017d6=_0x5017d6-0x0;var _0x35e5ea=_0x55a1[_0x5017d6];return _0x35e5ea;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x155a('0x0'))(_0x155a('0x1'));var moment=require(_0x155a('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x155a('0x3'));var rimraf=require(_0x155a('0x4'));var config=require(_0x155a('0x5'));var attributes=require('./mailQueue.attributes');module[_0x155a('0x6')]=function(_0x5af4b9,_0x1089a1){return _0x5af4b9[_0x155a('0x7')](_0x155a('0x8'),attributes,{'tableName':_0x155a('0x9'),'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 e741fba..651c011 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 _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 +var _0x078c=['then','MailQueue,\x20%s,\x20%s','request\x20sent','MailQueue,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','GetMailQueue','MailQueue','options','attributes','limit','include','map','model','ShowMailQueue','find','raw','where','debug','stringify','util','moment','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register'];(function(_0x57dae8,_0x8a67da){var _0x504624=function(_0x2ab53d){while(--_0x2ab53d){_0x57dae8['push'](_0x57dae8['shift']());}};_0x504624(++_0x8a67da);}(_0x078c,0x86));var _0xc078=function(_0x108d5f,_0x33f82d){_0x108d5f=_0x108d5f-0x0;var _0x456ea3=_0x078c[_0x108d5f];return _0x456ea3;};'use strict';var _=require('lodash');var util=require(_0xc078('0x0'));var moment=require(_0xc078('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc078('0x2'))['db'];var utils=require(_0xc078('0x3'));var logger=require('../../config/logger')(_0xc078('0x4'));var config=require(_0xc078('0x5'));var jayson=require(_0xc078('0x6'));var client=jayson[_0xc078('0x7')][_0xc078('0x8')]({'port':0x232a});config[_0xc078('0x9')]=_[_0xc078('0xa')](config[_0xc078('0x9')],{'host':_0xc078('0xb'),'port':0x18eb});var socket=require(_0xc078('0xc'))(new Redis(config[_0xc078('0x9')]));require('./mailQueue.socket')[_0xc078('0xd')](socket);function respondWithRpcPromise(_0x18786e,_0x54a888,_0x33afae){return new BPromise(function(_0x50d0f6,_0xc49d0d){return client['request'](_0x18786e,_0x33afae)[_0xc078('0xe')](function(_0x58a27a){logger['info'](_0xc078('0xf'),_0x54a888,_0xc078('0x10'));logger['debug'](_0xc078('0x11'),_0x54a888,_0xc078('0x10'),JSON['stringify'](_0x58a27a));if(_0x58a27a[_0xc078('0x12')]){if(_0x58a27a[_0xc078('0x12')]['code']===0x1f4){logger[_0xc078('0x12')](_0xc078('0xf'),_0x54a888,_0x58a27a['error']['message']);return _0xc49d0d(_0x58a27a[_0xc078('0x12')]['message']);}logger[_0xc078('0x12')](_0xc078('0xf'),_0x54a888,_0x58a27a[_0xc078('0x12')]['message']);return _0x50d0f6(_0x58a27a[_0xc078('0x12')][_0xc078('0x13')]);}else{logger[_0xc078('0x14')](_0xc078('0xf'),_0x54a888,_0xc078('0x10'));_0x50d0f6(_0x58a27a[_0xc078('0x15')][_0xc078('0x13')]);}})[_0xc078('0x16')](function(_0x3f8ba8){logger['error']('MailQueue,\x20%s,\x20%s',_0x54a888,_0x3f8ba8);_0xc49d0d(_0x3f8ba8);});});}exports[_0xc078('0x17')]=function(_0x15168b){var _0x4cbd9c=this;return new Promise(function(_0x58afa5,_0x1bb9e6){return db[_0xc078('0x18')]['findAll']({'raw':_0x15168b[_0xc078('0x19')]?_0x15168b[_0xc078('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x15168b[_0xc078('0x19')]?_0x15168b['options']['where']||null:null,'attributes':_0x15168b[_0xc078('0x19')]?_0x15168b[_0xc078('0x19')][_0xc078('0x1a')]||null:null,'limit':_0x15168b['options']?_0x15168b['options'][_0xc078('0x1b')]||null:null,'include':_0x15168b[_0xc078('0x19')]?_0x15168b[_0xc078('0x19')][_0xc078('0x1c')]?_[_0xc078('0x1d')](_0x15168b[_0xc078('0x19')][_0xc078('0x1c')],function(_0x1066b1){return{'model':db[_0x1066b1[_0xc078('0x1e')]],'as':_0x1066b1['as'],'attributes':_0x1066b1[_0xc078('0x1a')],'include':_0x1066b1['include']?_[_0xc078('0x1d')](_0x1066b1[_0xc078('0x1c')],function(_0x2f11f5){return{'model':db[_0x2f11f5[_0xc078('0x1e')]],'as':_0x2f11f5['as'],'attributes':_0x2f11f5['attributes'],'include':_0x2f11f5[_0xc078('0x1c')]?_['map'](_0x2f11f5[_0xc078('0x1c')],function(_0x1d1969){return{'model':db[_0x1d1969[_0xc078('0x1e')]],'as':_0x1d1969['as'],'attributes':_0x1d1969[_0xc078('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xb3caa2){logger[_0xc078('0x14')](_0xc078('0x17'),_0x15168b);logger['debug'](_0xc078('0x17'),_0x15168b,JSON['stringify'](_0xb3caa2));_0x58afa5(_0xb3caa2);})['catch'](function(_0x2aeb14){logger[_0xc078('0x12')](_0xc078('0x17'),_0x2aeb14[_0xc078('0x13')],_0x15168b);_0x1bb9e6(_0x4cbd9c[_0xc078('0x12')](0x1f4,_0x2aeb14['message']));});});};exports[_0xc078('0x1f')]=function(_0x3e535d){var _0x414c3f=this;return new Promise(function(_0x528d07,_0x4e2e3a){return db[_0xc078('0x18')][_0xc078('0x20')]({'raw':_0x3e535d[_0xc078('0x19')]?_0x3e535d[_0xc078('0x19')][_0xc078('0x21')]===undefined?!![]:![]:!![],'where':_0x3e535d['options']?_0x3e535d[_0xc078('0x19')][_0xc078('0x22')]||null:null,'attributes':_0x3e535d['options']?_0x3e535d[_0xc078('0x19')][_0xc078('0x1a')]||null:null,'include':_0x3e535d['options']?_0x3e535d[_0xc078('0x19')]['include']?_[_0xc078('0x1d')](_0x3e535d[_0xc078('0x19')][_0xc078('0x1c')],function(_0x130836){return{'model':db[_0x130836[_0xc078('0x1e')]],'as':_0x130836['as'],'attributes':_0x130836['attributes'],'include':_0x130836['include']?_['map'](_0x130836[_0xc078('0x1c')],function(_0x2792b8){return{'model':db[_0x2792b8[_0xc078('0x1e')]],'as':_0x2792b8['as'],'attributes':_0x2792b8[_0xc078('0x1a')],'include':_0x2792b8[_0xc078('0x1c')]?_[_0xc078('0x1d')](_0x2792b8[_0xc078('0x1c')],function(_0x136848){return{'model':db[_0x136848[_0xc078('0x1e')]],'as':_0x136848['as'],'attributes':_0x136848[_0xc078('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x49119a){logger[_0xc078('0x14')](_0xc078('0x1f'),_0x3e535d);logger[_0xc078('0x23')]('ShowMailQueue',_0x3e535d,JSON[_0xc078('0x24')](_0x49119a));_0x528d07(_0x49119a);})[_0xc078('0x16')](function(_0x129628){logger[_0xc078('0x12')](_0xc078('0x1f'),_0x129628[_0xc078('0x13')],_0x3e535d);_0x4e2e3a(_0x414c3f[_0xc078('0x12')](0x1f4,_0x129628['message']));});});}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.socket.js b/server/api/mailQueue/mailQueue.socket.js index b96dd47..0019d8b 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 _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 +var _0x1943=['removeListener','register','length','mailQueue:','./mailQueue.events','save','remove','update','emit'];(function(_0xdc0320,_0x3f10a4){var _0x415c21=function(_0x597a1c){while(--_0x597a1c){_0xdc0320['push'](_0xdc0320['shift']());}};_0x415c21(++_0x3f10a4);}(_0x1943,0x124));var _0x3194=function(_0x42e6ff,_0x32723c){_0x42e6ff=_0x42e6ff-0x0;var _0x42c05b=_0x1943[_0x42e6ff];return _0x42c05b;};'use strict';var MailQueueEvents=require(_0x3194('0x0'));var events=[_0x3194('0x1'),_0x3194('0x2'),_0x3194('0x3')];function createListener(_0x5b5c1b,_0x3c3aa5){return function(_0x4f8c63){_0x3c3aa5[_0x3194('0x4')](_0x5b5c1b,_0x4f8c63);};}function removeListener(_0x48e2a2,_0x4d62c9){return function(){MailQueueEvents[_0x3194('0x5')](_0x48e2a2,_0x4d62c9);};}exports[_0x3194('0x6')]=function(_0x10f7f3){for(var _0x59e4f3=0x0,_0x431c9d=events[_0x3194('0x7')];_0x59e4f3<_0x431c9d;_0x59e4f3++){var _0xfa5116=events[_0x59e4f3];var _0x30ee64=createListener(_0x3194('0x8')+_0xfa5116,_0x10f7f3);MailQueueEvents['on'](_0xfa5116,_0x30ee64);}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/index.js b/server/api/mailQueueReport/index.js index b4208c9..fbc4629 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 _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 +var _0xf8a5=['util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./mailQueueReport.controller','isAuthenticated','index','describe','get','/:id','show','create','put','delete','destroy','exports','multer'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xf8a5,0x11c));var _0x5f8a=function(_0x2f9345,_0x23aa3c){_0x2f9345=_0x2f9345-0x0;var _0x5b99a4=_0xf8a5[_0x2f9345];return _0x5b99a4;};'use strict';var multer=require(_0x5f8a('0x0'));var util=require(_0x5f8a('0x1'));var path=require('path');var timeout=require(_0x5f8a('0x2'));var express=require(_0x5f8a('0x3'));var router=express['Router']();var fs_extra=require(_0x5f8a('0x4'));var auth=require(_0x5f8a('0x5'));var interaction=require(_0x5f8a('0x6'));var config=require('../../config/environment');var controller=require(_0x5f8a('0x7'));router['get']('/',auth[_0x5f8a('0x8')](),controller[_0x5f8a('0x9')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x5f8a('0xa')]);router[_0x5f8a('0xb')](_0x5f8a('0xc'),auth['isAuthenticated'](),controller[_0x5f8a('0xd')]);router['post']('/',auth[_0x5f8a('0x8')](),controller[_0x5f8a('0xe')]);router[_0x5f8a('0xf')]('/:id',auth[_0x5f8a('0x8')](),controller['update']);router[_0x5f8a('0x10')]('/:id',auth[_0x5f8a('0x8')](),controller[_0x5f8a('0x11')]);module[_0x5f8a('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 8e34054..7b650e5 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 _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 +var _0xcfc9=['STRING','DATE','moment','sequelize','exports'];(function(_0x218adc,_0x3c70b4){var _0xce3a64=function(_0x16ee04){while(--_0x16ee04){_0x218adc['push'](_0x218adc['shift']());}};_0xce3a64(++_0x3c70b4);}(_0xcfc9,0x75));var _0x9cfc=function(_0x2b0e30,_0x311fae){_0x2b0e30=_0x2b0e30-0x0;var _0x412b03=_0xcfc9[_0x2b0e30];return _0x412b03;};'use strict';var moment=require(_0x9cfc('0x0'));var Sequelize=require(_0x9cfc('0x1'));module[_0x9cfc('0x2')]={'uniqueid':{'type':Sequelize[_0x9cfc('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x9cfc('0x4')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x9cfc('0x4')]},'reason':{'type':Sequelize[_0x9cfc('0x3')]}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.controller.js b/server/api/mailQueueReport/mailQueueReport.controller.js index 858d9c8..3ebbcf2 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 _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 +var _0x5204=['fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','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','undefined','limit','count','offset','set','reject','save','update','destroy','error','stack','name','send','map','MailQueueReport','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','filter','options','includeAll','include','findAll','then','rows','params','keys','rawAttributes','catch','create','body','find','describe','eml-format','rimraf'];(function(_0x4da886,_0x4b6e85){var _0xd86f03=function(_0x2a8d81){while(--_0x2a8d81){_0x4da886['push'](_0x4da886['shift']());}};_0xd86f03(++_0x4b6e85);}(_0x5204,0xdf));var _0x4520=function(_0x456b57,_0x58691a){_0x456b57=_0x456b57-0x0;var _0x18f49f=_0x5204[_0x456b57];return _0x18f49f;};'use strict';var emlformat=require(_0x4520('0x0'));var rimraf=require(_0x4520('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4520('0x2'));var rp=require(_0x4520('0x3'));var moment=require(_0x4520('0x4'));var BPromise=require(_0x4520('0x5'));var Mustache=require(_0x4520('0x6'));var util=require('util');var path=require(_0x4520('0x7'));var sox=require('sox');var csv=require(_0x4520('0x8'));var ejs=require(_0x4520('0x9'));var fs=require('fs');var fs_extra=require(_0x4520('0xa'));var _=require(_0x4520('0xb'));var squel=require(_0x4520('0xc'));var crypto=require(_0x4520('0xd'));var jsforce=require(_0x4520('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x4520('0x8'));var querystring=require('querystring');var Papa=require(_0x4520('0xf'));var Redis=require(_0x4520('0x10'));var authService=require(_0x4520('0x11'));var qs=require(_0x4520('0x12'));var as=require(_0x4520('0x13'));var hardwareService=require(_0x4520('0x14'));var logger=require(_0x4520('0x15'))(_0x4520('0x16'));var utils=require(_0x4520('0x17'));var config=require(_0x4520('0x18'));var licenseUtil=require(_0x4520('0x19'));var db=require(_0x4520('0x1a'))['db'];function respondWithStatusCode(_0x3c7a5d,_0x508ea6){_0x508ea6=_0x508ea6||0xcc;return function(_0x2e3c64){if(_0x2e3c64){return _0x3c7a5d[_0x4520('0x1b')](_0x508ea6);}return _0x3c7a5d[_0x4520('0x1c')](_0x508ea6)[_0x4520('0x1d')]();};}function respondWithResult(_0x426836,_0x34d383){_0x34d383=_0x34d383||0xc8;return function(_0x32950a){if(_0x32950a){return _0x426836['status'](_0x34d383)[_0x4520('0x1e')](_0x32950a);}};}function respondWithFilteredResult(_0x20de6b,_0x1ab841){return function(_0x15a31f){if(_0x15a31f){var _0x32d8aa=typeof _0x1ab841['offset']===_0x4520('0x1f')&&typeof _0x1ab841[_0x4520('0x20')]===_0x4520('0x1f');var _0x283ad4=_0x15a31f[_0x4520('0x21')];var _0x2e00f4=_0x32d8aa?0x0:_0x1ab841[_0x4520('0x22')];var _0x4ba69f=_0x32d8aa?_0x15a31f[_0x4520('0x21')]:_0x1ab841[_0x4520('0x22')]+_0x1ab841[_0x4520('0x20')];var _0x460521;if(_0x4ba69f>=_0x283ad4){_0x4ba69f=_0x283ad4;_0x460521=0xc8;}else{_0x460521=0xce;}_0x20de6b['status'](_0x460521);return _0x20de6b[_0x4520('0x23')]('Content-Range',_0x2e00f4+'-'+_0x4ba69f+'/'+_0x283ad4)['json'](_0x15a31f);}return null;};}function patchUpdates(_0x4c46c5){return function(_0x2b9456){try{jsonpatch['apply'](_0x2b9456,_0x4c46c5,!![]);}catch(_0x39e196){return BPromise[_0x4520('0x24')](_0x39e196);}return _0x2b9456[_0x4520('0x25')]();};}function saveUpdates(_0x534b15,_0x3199a9){return function(_0x4000d4){if(_0x4000d4){return _0x4000d4[_0x4520('0x26')](_0x534b15)['then'](function(_0x198c34){return _0x198c34;});}return null;};}function removeEntity(_0x847d15,_0x24eacd){return function(_0x3a4680){if(_0x3a4680){return _0x3a4680[_0x4520('0x27')]()['then'](function(){_0x847d15[_0x4520('0x1c')](0xcc)[_0x4520('0x1d')]();});}};}function handleEntityNotFound(_0x3532aa,_0x3e2906){return function(_0x57306b){if(!_0x57306b){_0x3532aa[_0x4520('0x1b')](0x194);}return _0x57306b;};}function handleError(_0x4602a4,_0x92168b){_0x92168b=_0x92168b||0x1f4;return function(_0x21e1f3){logger[_0x4520('0x28')](_0x21e1f3[_0x4520('0x29')]);if(_0x21e1f3[_0x4520('0x2a')]){delete _0x21e1f3[_0x4520('0x2a')];}_0x4602a4[_0x4520('0x1c')](_0x92168b)[_0x4520('0x2b')](_0x21e1f3);};}exports['index']=function(_0x222dbd,_0x5c1a0b){var _0x7ce8d2={},_0x14778a={},_0x43b4a2={'count':0x0,'rows':[]};var _0x157293=_[_0x4520('0x2c')](db[_0x4520('0x2d')]['rawAttributes'],function(_0x2c32ce){return{'name':_0x2c32ce['fieldName'],'type':_0x2c32ce[_0x4520('0x2e')]['key']};});_0x14778a[_0x4520('0x2f')]=_['map'](_0x157293,_0x4520('0x2a'));_0x14778a['query']=_['keys'](_0x222dbd[_0x4520('0x30')]);_0x14778a[_0x4520('0x31')]=_[_0x4520('0x32')](_0x14778a['model'],_0x14778a[_0x4520('0x30')]);_0x7ce8d2[_0x4520('0x33')]=_[_0x4520('0x32')](_0x14778a[_0x4520('0x2f')],qs['fields'](_0x222dbd['query'][_0x4520('0x34')]));_0x7ce8d2[_0x4520('0x33')]=_0x7ce8d2['attributes'][_0x4520('0x35')]?_0x7ce8d2[_0x4520('0x33')]:_0x14778a[_0x4520('0x2f')];if(!_0x222dbd[_0x4520('0x30')][_0x4520('0x36')](_0x4520('0x37'))){_0x7ce8d2['limit']=qs[_0x4520('0x20')](_0x222dbd[_0x4520('0x30')]['limit']);_0x7ce8d2[_0x4520('0x22')]=qs['offset'](_0x222dbd[_0x4520('0x30')][_0x4520('0x22')]);}_0x7ce8d2['order']=qs['sort'](_0x222dbd['query'][_0x4520('0x38')]);_0x7ce8d2[_0x4520('0x39')]=qs[_0x4520('0x31')](_[_0x4520('0x3a')](_0x222dbd[_0x4520('0x30')],_0x14778a[_0x4520('0x31')]),_0x157293);if(_0x222dbd[_0x4520('0x30')]['filter']){_0x7ce8d2[_0x4520('0x39')]=_[_0x4520('0x3b')](_0x7ce8d2[_0x4520('0x39')],{'$or':_['map'](_0x157293,function(_0x16d489){if(_0x16d489[_0x4520('0x2e')]!=='VIRTUAL'){var _0x57b155={};_0x57b155[_0x16d489[_0x4520('0x2a')]]={'$like':'%'+_0x222dbd[_0x4520('0x30')][_0x4520('0x3c')]+'%'};return _0x57b155;}})});}_0x7ce8d2=_[_0x4520('0x3b')]({},_0x7ce8d2,_0x222dbd[_0x4520('0x3d')]);var _0x5ca832={'where':_0x7ce8d2['where']};return db['MailQueueReport'][_0x4520('0x21')](_0x5ca832)['then'](function(_0x43dc36){_0x43b4a2['count']=_0x43dc36;if(_0x222dbd['query'][_0x4520('0x3e')]){_0x7ce8d2[_0x4520('0x3f')]=[{'all':!![]}];}return db[_0x4520('0x2d')][_0x4520('0x40')](_0x7ce8d2);})[_0x4520('0x41')](function(_0x59d646){_0x43b4a2[_0x4520('0x42')]=_0x59d646;return _0x43b4a2;})[_0x4520('0x41')](respondWithFilteredResult(_0x5c1a0b,_0x7ce8d2))['catch'](handleError(_0x5c1a0b,null));};exports['show']=function(_0x3780e4,_0x2ff306){var _0x500c45={'raw':!![],'where':{'id':_0x3780e4[_0x4520('0x43')]['id']}},_0x2978d5={};_0x2978d5[_0x4520('0x2f')]=_[_0x4520('0x44')](db['MailQueueReport'][_0x4520('0x45')]);_0x2978d5[_0x4520('0x30')]=_[_0x4520('0x44')](_0x3780e4[_0x4520('0x30')]);_0x2978d5[_0x4520('0x31')]=_[_0x4520('0x32')](_0x2978d5[_0x4520('0x2f')],_0x2978d5[_0x4520('0x30')]);_0x500c45[_0x4520('0x33')]=_[_0x4520('0x32')](_0x2978d5[_0x4520('0x2f')],qs[_0x4520('0x34')](_0x3780e4[_0x4520('0x30')][_0x4520('0x34')]));_0x500c45[_0x4520('0x33')]=_0x500c45[_0x4520('0x33')][_0x4520('0x35')]?_0x500c45['attributes']:_0x2978d5[_0x4520('0x2f')];if(_0x3780e4[_0x4520('0x30')]['includeAll']){_0x500c45['include']=[{'all':!![]}];}_0x500c45=_['merge']({},_0x500c45,_0x3780e4['options']);return db[_0x4520('0x2d')]['find'](_0x500c45)[_0x4520('0x41')](handleEntityNotFound(_0x2ff306,null))[_0x4520('0x41')](respondWithResult(_0x2ff306,null))[_0x4520('0x46')](handleError(_0x2ff306,null));};exports[_0x4520('0x47')]=function(_0x177c4e,_0x5e3eef){return db[_0x4520('0x2d')][_0x4520('0x47')](_0x177c4e[_0x4520('0x48')],{})[_0x4520('0x41')](respondWithResult(_0x5e3eef,0xc9))[_0x4520('0x46')](handleError(_0x5e3eef,null));};exports[_0x4520('0x26')]=function(_0x737ba4,_0x1e4821){if(_0x737ba4[_0x4520('0x48')]['id']){delete _0x737ba4[_0x4520('0x48')]['id'];}return db[_0x4520('0x2d')][_0x4520('0x49')]({'where':{'id':_0x737ba4['params']['id']}})['then'](handleEntityNotFound(_0x1e4821,null))[_0x4520('0x41')](saveUpdates(_0x737ba4[_0x4520('0x48')],null))[_0x4520('0x41')](respondWithResult(_0x1e4821,null))['catch'](handleError(_0x1e4821,null));};exports[_0x4520('0x27')]=function(_0x2288a7,_0x3f9a4c){return db['MailQueueReport'][_0x4520('0x49')]({'where':{'id':_0x2288a7[_0x4520('0x43')]['id']}})[_0x4520('0x41')](handleEntityNotFound(_0x3f9a4c,null))['then'](removeEntity(_0x3f9a4c,null))['catch'](handleError(_0x3f9a4c,null));};exports[_0x4520('0x4a')]=function(_0x24a6a4,_0x24269e){return db[_0x4520('0x2d')][_0x4520('0x4a')]()[_0x4520('0x41')](respondWithResult(_0x24269e,null))[_0x4520('0x46')](handleError(_0x24269e,null));}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.model.js b/server/api/mailQueueReport/mailQueueReport.model.js index 98176f9..2514bfc 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 _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 +var _0xec22=['lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','./mailQueueReport.attributes','define','MailQueueReport','uniqueid'];(function(_0x37ee87,_0x2b2b62){var _0x4ffc88=function(_0x306abf){while(--_0x306abf){_0x37ee87['push'](_0x37ee87['shift']());}};_0x4ffc88(++_0x2b2b62);}(_0xec22,0x78));var _0x2ec2=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xec22[_0x413feb];return _0x40ee88;};'use strict';var _=require(_0x2ec2('0x0'));var util=require(_0x2ec2('0x1'));var logger=require('../../config/logger')(_0x2ec2('0x2'));var moment=require(_0x2ec2('0x3'));var BPromise=require(_0x2ec2('0x4'));var rp=require(_0x2ec2('0x5'));var fs=require('fs');var path=require(_0x2ec2('0x6'));var rimraf=require('rimraf');var config=require(_0x2ec2('0x7'));var attributes=require(_0x2ec2('0x8'));module['exports']=function(_0x647e9f,_0x4f7a52){return _0x647e9f[_0x2ec2('0x9')](_0x2ec2('0xa'),attributes,{'tableName':'report_mail_queue','paranoid':![],'indexes':[{'name':_0x2ec2('0xb'),'fields':[_0x2ec2('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 5115288..2d8e288 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 _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 +var _0x5f2f=['error','code','message','request\x20sent','result','catch','CreateMailQueueReport','MailQueueReport','create','body','options','raw','UpdateMailQueueReport','update','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','MailQueueReport,\x20%s,\x20%s','debug','stringify'];(function(_0x510d62,_0x4266b0){var _0x2dee6a=function(_0x3e85e0){while(--_0x3e85e0){_0x510d62['push'](_0x510d62['shift']());}};_0x2dee6a(++_0x4266b0);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2f52df,_0x6aa5cd){_0x2f52df=_0x2f52df-0x0;var _0x417524=_0x5f2f[_0x2f52df];return _0x417524;};'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')]('MailQueueReport,\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);});});}exports[_0xf5f2('0x17')]=function(_0x20fccd){var _0x28e097=this;return new Promise(function(_0x4ff59b,_0x3ee69){return db[_0xf5f2('0x18')][_0xf5f2('0x19')](_0x20fccd[_0xf5f2('0x1a')],{'raw':_0x20fccd['options']?_0x20fccd[_0xf5f2('0x1b')][_0xf5f2('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x47acfc){logger[_0xf5f2('0xd')](_0xf5f2('0x17'),_0x20fccd);logger['debug'](_0xf5f2('0x17'),_0x20fccd,JSON[_0xf5f2('0x10')](_0x47acfc));_0x4ff59b(_0x47acfc);})[_0xf5f2('0x16')](function(_0x39c024){logger[_0xf5f2('0x11')]('CreateMailQueueReport',_0x39c024[_0xf5f2('0x13')],_0x20fccd);_0x3ee69(_0x28e097[_0xf5f2('0x11')](0x1f4,_0x39c024[_0xf5f2('0x13')]));});});};exports[_0xf5f2('0x1d')]=function(_0x287ad5){var _0x5bdf4a=this;return new Promise(function(_0x529f07,_0x5f1124){return db[_0xf5f2('0x18')][_0xf5f2('0x1e')](_0x287ad5[_0xf5f2('0x1a')],{'raw':_0x287ad5[_0xf5f2('0x1b')]?_0x287ad5[_0xf5f2('0x1b')][_0xf5f2('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x287ad5[_0xf5f2('0x1b')]?_0x287ad5[_0xf5f2('0x1b')]['where']||null:null,'attributes':_0x287ad5[_0xf5f2('0x1b')]?_0x287ad5[_0xf5f2('0x1b')][_0xf5f2('0x1f')]||null:null,'limit':_0x287ad5[_0xf5f2('0x1b')]?_0x287ad5[_0xf5f2('0x1b')][_0xf5f2('0x20')]||null:null})['then'](function(_0x53cb96){logger[_0xf5f2('0xd')](_0xf5f2('0x1d'),_0x287ad5);logger[_0xf5f2('0xf')]('UpdateMailQueueReport',_0x287ad5,JSON['stringify'](_0x53cb96));_0x529f07(_0x53cb96);})[_0xf5f2('0x16')](function(_0x50b8a2){logger[_0xf5f2('0x11')](_0xf5f2('0x1d'),_0x50b8a2[_0xf5f2('0x13')],_0x287ad5);_0x5f1124(_0x5bdf4a['error'](0x1f4,_0x50b8a2['message']));});});}; \ No newline at end of file diff --git a/server/api/mailServerIn/index.js b/server/api/mailServerIn/index.js index d4ada1b..d5ea5ff 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 _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 +var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x3fed80,_0x1baabc){var _0x584609=function(_0x46db81){while(--_0x46db81){_0x3fed80['push'](_0x3fed80['shift']());}};_0x584609(++_0x1baabc);}(_0xedd9,0xfc));var _0x9edd=function(_0x739790,_0x386ffb){_0x739790=_0x739790-0x0;var _0xf7cbc0=_0xedd9[_0x739790];return _0xf7cbc0;};'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 diff --git a/server/api/mailServerIn/mailServerIn.attributes.js b/server/api/mailServerIn/mailServerIn.attributes.js index 94b768c..2d8b98f 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 _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 +var _0x1b32=['BOOLEAN','INTEGER','INBOX','exports','STRING'];(function(_0x5edcd8,_0xd8a6ca){var _0x2263cc=function(_0x17df45){while(--_0x17df45){_0x5edcd8['push'](_0x5edcd8['shift']());}};_0x2263cc(++_0xd8a6ca);}(_0x1b32,0x85));var _0x21b3=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x1b32[_0x2c7618];return _0x5ce3f0;};'use strict';var Sequelize=require('sequelize');module[_0x21b3('0x0')]={'description':{'type':Sequelize[_0x21b3('0x1')]},'host':{'type':Sequelize[_0x21b3('0x1')]},'authentication':{'type':Sequelize[_0x21b3('0x2')],'defaultValue':!![]},'user':{'type':Sequelize[_0x21b3('0x1')]},'password':{'type':Sequelize[_0x21b3('0x1')]},'port':{'type':Sequelize[_0x21b3('0x3')]},'tls':{'type':Sequelize[_0x21b3('0x2')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x21b3('0x1')],'defaultValue':_0x21b3('0x4')},'connTimeout':{'type':Sequelize[_0x21b3('0x3')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x21b3('0x3')],'defaultValue':0x5},'service':{'type':Sequelize[_0x21b3('0x1')]}}; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.model.js b/server/api/mailServerIn/mailServerIn.model.js index fbb8ec0..83312d7 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 _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 +var _0x08a4=['rimraf','../../config/environment','exports','define','MailServerIn','lodash','api','bluebird','request-promise','path'];(function(_0x56f161,_0x44e3){var _0x4c1b8d=function(_0xbf0525){while(--_0xbf0525){_0x56f161['push'](_0x56f161['shift']());}};_0x4c1b8d(++_0x44e3);}(_0x08a4,0x73));var _0x408a=function(_0x592f37,_0x26979d){_0x592f37=_0x592f37-0x0;var _0x401547=_0x08a4[_0x592f37];return _0x401547;};'use strict';var _=require(_0x408a('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x408a('0x1'));var moment=require('moment');var BPromise=require(_0x408a('0x2'));var rp=require(_0x408a('0x3'));var fs=require('fs');var path=require(_0x408a('0x4'));var rimraf=require(_0x408a('0x5'));var config=require(_0x408a('0x6'));var attributes=require('./mailServerIn.attributes');module[_0x408a('0x7')]=function(_0x5becf1,_0x3b8270){return _0x5becf1[_0x408a('0x8')](_0x408a('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 1f63c3e..c0e6e19 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 _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 +var _0xf474=['request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','GetMailServerIn','findAll','options','raw','where','attributes','limit','map','include','model','then','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','MailServerIn,\x20%s,\x20%s'];(function(_0x205d4f,_0x1551d7){var _0x2a740b=function(_0x3c9995){while(--_0x3c9995){_0x205d4f['push'](_0x205d4f['shift']());}};_0x2a740b(++_0x1551d7);}(_0xf474,0x13e));var _0x4f47=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xf474[_0x413feb];return _0x40ee88;};'use strict';var _=require(_0x4f47('0x0'));var util=require('util');var moment=require(_0x4f47('0x1'));var BPromise=require(_0x4f47('0x2'));var rs=require(_0x4f47('0x3'));var fs=require('fs');var Redis=require(_0x4f47('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4f47('0x5'));var logger=require(_0x4f47('0x6'))(_0x4f47('0x7'));var config=require(_0x4f47('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x4f47('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x35d270,_0x422d59,_0x278ce2){return new BPromise(function(_0x194360,_0x1a3810){return client[_0x4f47('0xa')](_0x35d270,_0x278ce2)['then'](function(_0x2acd21){logger['info'](_0x4f47('0xb'),_0x422d59,_0x4f47('0xc'));logger[_0x4f47('0xd')](_0x4f47('0xe'),_0x422d59,'request\x20sent',JSON[_0x4f47('0xf')](_0x2acd21));if(_0x2acd21[_0x4f47('0x10')]){if(_0x2acd21[_0x4f47('0x10')][_0x4f47('0x11')]===0x1f4){logger[_0x4f47('0x10')](_0x4f47('0xb'),_0x422d59,_0x2acd21[_0x4f47('0x10')][_0x4f47('0x12')]);return _0x1a3810(_0x2acd21[_0x4f47('0x10')][_0x4f47('0x12')]);}logger[_0x4f47('0x10')]('MailServerIn,\x20%s,\x20%s',_0x422d59,_0x2acd21[_0x4f47('0x10')][_0x4f47('0x12')]);return _0x194360(_0x2acd21[_0x4f47('0x10')][_0x4f47('0x12')]);}else{logger[_0x4f47('0x13')]('MailServerIn,\x20%s,\x20%s',_0x422d59,_0x4f47('0xc'));_0x194360(_0x2acd21[_0x4f47('0x14')][_0x4f47('0x12')]);}})['catch'](function(_0x3a6afd){logger[_0x4f47('0x10')](_0x4f47('0xb'),_0x422d59,_0x3a6afd);_0x1a3810(_0x3a6afd);});});}exports[_0x4f47('0x15')]=function(_0x3a178e){var _0x22e4fb=this;return new Promise(function(_0x1805b7,_0x310009){return db['MailServerIn'][_0x4f47('0x16')]({'raw':_0x3a178e[_0x4f47('0x17')]?_0x3a178e[_0x4f47('0x17')][_0x4f47('0x18')]===undefined?!![]:![]:!![],'where':_0x3a178e[_0x4f47('0x17')]?_0x3a178e['options'][_0x4f47('0x19')]||null:null,'attributes':_0x3a178e[_0x4f47('0x17')]?_0x3a178e[_0x4f47('0x17')][_0x4f47('0x1a')]||null:null,'limit':_0x3a178e[_0x4f47('0x17')]?_0x3a178e[_0x4f47('0x17')][_0x4f47('0x1b')]||null:null,'include':_0x3a178e[_0x4f47('0x17')]?_0x3a178e[_0x4f47('0x17')]['include']?_[_0x4f47('0x1c')](_0x3a178e[_0x4f47('0x17')][_0x4f47('0x1d')],function(_0xff188a){return{'model':db[_0xff188a[_0x4f47('0x1e')]],'as':_0xff188a['as'],'attributes':_0xff188a[_0x4f47('0x1a')],'include':_0xff188a[_0x4f47('0x1d')]?_['map'](_0xff188a[_0x4f47('0x1d')],function(_0x361b85){return{'model':db[_0x361b85[_0x4f47('0x1e')]],'as':_0x361b85['as'],'attributes':_0x361b85['attributes'],'include':_0x361b85[_0x4f47('0x1d')]?_[_0x4f47('0x1c')](_0x361b85['include'],function(_0x4f0bba){return{'model':db[_0x4f0bba['model']],'as':_0x4f0bba['as'],'attributes':_0x4f0bba['attributes']};}):[]};}):[]};}):[]:[]})[_0x4f47('0x1f')](function(_0x2aa531){logger[_0x4f47('0x13')]('GetMailServerIn',_0x3a178e);logger['debug'](_0x4f47('0x15'),_0x3a178e,JSON[_0x4f47('0xf')](_0x2aa531));_0x1805b7(_0x2aa531);})[_0x4f47('0x20')](function(_0x2202b2){logger[_0x4f47('0x10')](_0x4f47('0x15'),_0x2202b2[_0x4f47('0x12')],_0x3a178e);_0x310009(_0x22e4fb[_0x4f47('0x10')](0x1f4,_0x2202b2[_0x4f47('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/mailServerOut/index.js b/server/api/mailServerOut/index.js index 8b16c97..68bbeae 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 _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 +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(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0x7a54,0x106));var _0x47a5=function(_0x376093,_0x29906c){_0x376093=_0x376093-0x0;var _0x2637ff=_0x7a54[_0x376093];return _0x2637ff;};'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 diff --git a/server/api/mailServerOut/mailServerOut.attributes.js b/server/api/mailServerOut/mailServerOut.attributes.js index 84834eb..67b05f0 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 _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 +var _0x0ab8=['STRING','BOOLEAN','sequelize'];(function(_0x569683,_0x3fb5d7){var _0x4968ef=function(_0x562356){while(--_0x562356){_0x569683['push'](_0x569683['shift']());}};_0x4968ef(++_0x3fb5d7);}(_0x0ab8,0x182));var _0x80ab=function(_0x193a51,_0x2a9b7e){_0x193a51=_0x193a51-0x0;var _0xbece=_0x0ab8[_0x193a51];return _0xbece;};'use strict';var Sequelize=require(_0x80ab('0x0'));module['exports']={'description':{'type':Sequelize[_0x80ab('0x1')]},'host':{'type':Sequelize[_0x80ab('0x1')]},'user':{'type':Sequelize['STRING']},'pass':{'type':Sequelize[_0x80ab('0x1')]},'port':{'type':Sequelize['INTEGER']},'secure':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'service':{'type':Sequelize[_0x80ab('0x1')]},'authentication':{'type':Sequelize[_0x80ab('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 d4fc6d4..5c474ef 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 _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 +var _0x4327=['request-promise','moment','bluebird','mustache','util','path','sox','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','count','limit','json','save','update','then','destroy','end','error','stack','name','send','index','map','MailServerOut','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','create','body','find','rimraf','zip-dir'];(function(_0x5da25e,_0x6db8aa){var _0x4cfaef=function(_0x4aebd7){while(--_0x4aebd7){_0x5da25e['push'](_0x5da25e['shift']());}};_0x4cfaef(++_0x6db8aa);}(_0x4327,0x122));var _0x7432=function(_0x4971ca,_0x2ae39a){_0x4971ca=_0x4971ca-0x0;var _0x10c18e=_0x4327[_0x4971ca];return _0x10c18e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7432('0x0'));var zipdir=require(_0x7432('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7432('0x2'));var moment=require(_0x7432('0x3'));var BPromise=require(_0x7432('0x4'));var Mustache=require(_0x7432('0x5'));var util=require(_0x7432('0x6'));var path=require(_0x7432('0x7'));var sox=require(_0x7432('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7432('0x9'));var squel=require(_0x7432('0xa'));var crypto=require('crypto');var jsforce=require(_0x7432('0xb'));var deskjs=require(_0x7432('0xc'));var toCsv=require(_0x7432('0xd'));var querystring=require(_0x7432('0xe'));var Papa=require(_0x7432('0xf'));var Redis=require(_0x7432('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x7432('0x11'));var as=require(_0x7432('0x12'));var hardwareService=require(_0x7432('0x13'));var logger=require('../../config/logger')(_0x7432('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x7432('0x15'));var db=require(_0x7432('0x16'))['db'];function respondWithStatusCode(_0x2e28f8,_0x274c5a){_0x274c5a=_0x274c5a||0xcc;return function(_0x4ccc6f){if(_0x4ccc6f){return _0x2e28f8[_0x7432('0x17')](_0x274c5a);}return _0x2e28f8[_0x7432('0x18')](_0x274c5a)['end']();};}function respondWithResult(_0x15f142,_0x27d208){_0x27d208=_0x27d208||0xc8;return function(_0x43f436){if(_0x43f436){return _0x15f142['status'](_0x27d208)['json'](_0x43f436);}};}function respondWithFilteredResult(_0x56cb57,_0x51597c){return function(_0x22eaa6){if(_0x22eaa6){var _0x2cc166=typeof _0x51597c[_0x7432('0x19')]==='undefined'&&typeof _0x51597c['limit']===_0x7432('0x1a');var _0x5d9820=_0x22eaa6[_0x7432('0x1b')];var _0x142cea=_0x2cc166?0x0:_0x51597c['offset'];var _0x572449=_0x2cc166?_0x22eaa6[_0x7432('0x1b')]:_0x51597c[_0x7432('0x19')]+_0x51597c[_0x7432('0x1c')];var _0x18f381;if(_0x572449>=_0x5d9820){_0x572449=_0x5d9820;_0x18f381=0xc8;}else{_0x18f381=0xce;}_0x56cb57['status'](_0x18f381);return _0x56cb57['set']('Content-Range',_0x142cea+'-'+_0x572449+'/'+_0x5d9820)[_0x7432('0x1d')](_0x22eaa6);}return null;};}function patchUpdates(_0x477695){return function(_0x101b57){try{jsonpatch['apply'](_0x101b57,_0x477695,!![]);}catch(_0x2aa24b){return BPromise['reject'](_0x2aa24b);}return _0x101b57[_0x7432('0x1e')]();};}function saveUpdates(_0x4b51b0,_0x235ede){return function(_0x23d028){if(_0x23d028){return _0x23d028[_0x7432('0x1f')](_0x4b51b0)[_0x7432('0x20')](function(_0x12d9d6){return _0x12d9d6;});}return null;};}function removeEntity(_0x25bb26,_0x2028b6){return function(_0x37c084){if(_0x37c084){return _0x37c084[_0x7432('0x21')]()[_0x7432('0x20')](function(){_0x25bb26[_0x7432('0x18')](0xcc)[_0x7432('0x22')]();});}};}function handleEntityNotFound(_0x4d65fb,_0x228d9e){return function(_0x2cdb7f){if(!_0x2cdb7f){_0x4d65fb[_0x7432('0x17')](0x194);}return _0x2cdb7f;};}function handleError(_0x34aea5,_0x1fdf40){_0x1fdf40=_0x1fdf40||0x1f4;return function(_0x44fed9){logger[_0x7432('0x23')](_0x44fed9[_0x7432('0x24')]);if(_0x44fed9['name']){delete _0x44fed9[_0x7432('0x25')];}_0x34aea5[_0x7432('0x18')](_0x1fdf40)[_0x7432('0x26')](_0x44fed9);};}exports[_0x7432('0x27')]=function(_0x2aa1c2,_0x112142){var _0x5941a6={},_0x247891={},_0x405e87={'count':0x0,'rows':[]};var _0x50e855=_[_0x7432('0x28')](db[_0x7432('0x29')][_0x7432('0x2a')],function(_0x1961a7){return{'name':_0x1961a7[_0x7432('0x2b')],'type':_0x1961a7[_0x7432('0x2c')][_0x7432('0x2d')]};});_0x247891[_0x7432('0x2e')]=_[_0x7432('0x28')](_0x50e855,_0x7432('0x25'));_0x247891[_0x7432('0x2f')]=_[_0x7432('0x30')](_0x2aa1c2['query']);_0x247891[_0x7432('0x31')]=_['intersection'](_0x247891['model'],_0x247891[_0x7432('0x2f')]);_0x5941a6[_0x7432('0x32')]=_[_0x7432('0x33')](_0x247891[_0x7432('0x2e')],qs['fields'](_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x34')]));_0x5941a6[_0x7432('0x32')]=_0x5941a6['attributes'][_0x7432('0x35')]?_0x5941a6[_0x7432('0x32')]:_0x247891['model'];if(!_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x36')](_0x7432('0x37'))){_0x5941a6[_0x7432('0x1c')]=qs['limit'](_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x1c')]);_0x5941a6['offset']=qs['offset'](_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x19')]);}_0x5941a6[_0x7432('0x38')]=qs[_0x7432('0x39')](_0x2aa1c2['query'][_0x7432('0x39')]);_0x5941a6[_0x7432('0x3a')]=qs[_0x7432('0x31')](_[_0x7432('0x3b')](_0x2aa1c2['query'],_0x247891[_0x7432('0x31')]),_0x50e855);if(_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x3c')]){_0x5941a6[_0x7432('0x3a')]=_[_0x7432('0x3d')](_0x5941a6[_0x7432('0x3a')],{'$or':_[_0x7432('0x28')](_0x50e855,function(_0x4fcc72){if(_0x4fcc72[_0x7432('0x2c')]!==_0x7432('0x3e')){var _0x18740e={};_0x18740e[_0x4fcc72['name']]={'$like':'%'+_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x3c')]+'%'};return _0x18740e;}})});}_0x5941a6=_[_0x7432('0x3d')]({},_0x5941a6,_0x2aa1c2[_0x7432('0x3f')]);var _0x1c608c={'where':_0x5941a6[_0x7432('0x3a')]};return db[_0x7432('0x29')][_0x7432('0x1b')](_0x1c608c)[_0x7432('0x20')](function(_0x537979){_0x405e87[_0x7432('0x1b')]=_0x537979;if(_0x2aa1c2[_0x7432('0x2f')][_0x7432('0x40')]){_0x5941a6[_0x7432('0x41')]=[{'all':!![]}];}return db[_0x7432('0x29')][_0x7432('0x42')](_0x5941a6);})[_0x7432('0x20')](function(_0x3991ca){_0x405e87['rows']=_0x3991ca;return _0x405e87;})[_0x7432('0x20')](respondWithFilteredResult(_0x112142,_0x5941a6))[_0x7432('0x43')](handleError(_0x112142,null));};exports[_0x7432('0x44')]=function(_0x38465f,_0x1de11b){var _0x2ca74b={'raw':!![],'where':{'id':_0x38465f[_0x7432('0x45')]['id']}},_0x161dd8={};_0x161dd8[_0x7432('0x2e')]=_[_0x7432('0x30')](db[_0x7432('0x29')]['rawAttributes']);_0x161dd8['query']=_[_0x7432('0x30')](_0x38465f[_0x7432('0x2f')]);_0x161dd8[_0x7432('0x31')]=_[_0x7432('0x33')](_0x161dd8['model'],_0x161dd8['query']);_0x2ca74b[_0x7432('0x32')]=_['intersection'](_0x161dd8[_0x7432('0x2e')],qs[_0x7432('0x34')](_0x38465f['query'][_0x7432('0x34')]));_0x2ca74b['attributes']=_0x2ca74b[_0x7432('0x32')][_0x7432('0x35')]?_0x2ca74b[_0x7432('0x32')]:_0x161dd8[_0x7432('0x2e')];if(_0x38465f[_0x7432('0x2f')]['includeAll']){_0x2ca74b['include']=[{'all':!![]}];}_0x2ca74b=_[_0x7432('0x3d')]({},_0x2ca74b,_0x38465f[_0x7432('0x3f')]);return db[_0x7432('0x29')]['find'](_0x2ca74b)['then'](handleEntityNotFound(_0x1de11b,null))[_0x7432('0x20')](respondWithResult(_0x1de11b,null))['catch'](handleError(_0x1de11b,null));};exports['create']=function(_0x266de6,_0x11c923){return db[_0x7432('0x29')][_0x7432('0x46')](_0x266de6[_0x7432('0x47')],{})[_0x7432('0x20')](respondWithResult(_0x11c923,0xc9))['catch'](handleError(_0x11c923,null));};exports[_0x7432('0x1f')]=function(_0x2ea957,_0x3666db){if(_0x2ea957[_0x7432('0x47')]['id']){delete _0x2ea957[_0x7432('0x47')]['id'];}return db['MailServerOut']['find']({'where':{'id':_0x2ea957[_0x7432('0x45')]['id']}})['then'](handleEntityNotFound(_0x3666db,null))[_0x7432('0x20')](saveUpdates(_0x2ea957[_0x7432('0x47')],null))[_0x7432('0x20')](respondWithResult(_0x3666db,null))[_0x7432('0x43')](handleError(_0x3666db,null));};exports[_0x7432('0x21')]=function(_0x3611bb,_0x46d256){return db[_0x7432('0x29')][_0x7432('0x48')]({'where':{'id':_0x3611bb['params']['id']}})[_0x7432('0x20')](handleEntityNotFound(_0x46d256,null))[_0x7432('0x20')](removeEntity(_0x46d256,null))['catch'](handleError(_0x46d256,null));}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.model.js b/server/api/mailServerOut/mailServerOut.model.js index 915b770..462fb1e 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 _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 +var _0xea13=['util','../../config/logger','api','request-promise','path','../../config/environment','./mailServerOut.attributes','exports','define','MailServerOut','mail_servers_out','lodash'];(function(_0x3d9aa5,_0x25bf32){var _0x35cfc8=function(_0x33ff77){while(--_0x33ff77){_0x3d9aa5['push'](_0x3d9aa5['shift']());}};_0x35cfc8(++_0x25bf32);}(_0xea13,0x6b));var _0x3ea1=function(_0x503b7e,_0x672ae2){_0x503b7e=_0x503b7e-0x0;var _0x5447f6=_0xea13[_0x503b7e];return _0x5447f6;};'use strict';var _=require(_0x3ea1('0x0'));var util=require(_0x3ea1('0x1'));var logger=require(_0x3ea1('0x2'))(_0x3ea1('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x3ea1('0x4'));var fs=require('fs');var path=require(_0x3ea1('0x5'));var rimraf=require('rimraf');var config=require(_0x3ea1('0x6'));var attributes=require(_0x3ea1('0x7'));module[_0x3ea1('0x8')]=function(_0x26ec78,_0x3354d2){return _0x26ec78[_0x3ea1('0x9')](_0x3ea1('0xa'),attributes,{'tableName':_0x3ea1('0xb'),'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 dffa83d..7c49100 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 _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 +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(_0x56a2f3,_0x282c48){var _0x13d48c=function(_0x46cfd0){while(--_0x46cfd0){_0x56a2f3['push'](_0x56a2f3['shift']());}};_0x13d48c(++_0x282c48);}(_0x5f2f,0x73));var _0xf5f2=function(_0x272095,_0xa02b0b){_0x272095=_0x272095-0x0;var _0x321dad=_0x5f2f[_0x272095];return _0x321dad;};'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 d2039ab..289598b 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 _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 +var _0xacff=['fs-extra','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','/:id','show','post','put','update','delete','destroy','exports','multer','path','express'];(function(_0x1ffce8,_0x59df47){var _0x1033f1=function(_0x176446){while(--_0x176446){_0x1ffce8['push'](_0x1ffce8['shift']());}};_0x1033f1(++_0x59df47);}(_0xacff,0xfc));var _0xfacf=function(_0x4133de,_0x5ef217){_0x4133de=_0x4133de-0x0;var _0x17b9ab=_0xacff[_0x4133de];return _0x17b9ab;};'use strict';var multer=require(_0xfacf('0x0'));var util=require('util');var path=require(_0xfacf('0x1'));var timeout=require('connect-timeout');var express=require(_0xfacf('0x2'));var router=express['Router']();var fs_extra=require(_0xfacf('0x3'));var auth=require(_0xfacf('0x4'));var interaction=require(_0xfacf('0x5'));var config=require('../../config/environment');var controller=require('./mailSubstatus.controller');router['get']('/',auth[_0xfacf('0x6')](),controller[_0xfacf('0x7')]);router[_0xfacf('0x8')]('/describe',auth[_0xfacf('0x6')](),controller['describe']);router[_0xfacf('0x8')](_0xfacf('0x9'),auth[_0xfacf('0x6')](),controller[_0xfacf('0xa')]);router[_0xfacf('0xb')]('/',auth[_0xfacf('0x6')](),controller['create']);router[_0xfacf('0xc')](_0xfacf('0x9'),auth[_0xfacf('0x6')](),controller[_0xfacf('0xd')]);router[_0xfacf('0xe')](_0xfacf('0x9'),auth[_0xfacf('0x6')](),controller[_0xfacf('0xf')]);module[_0xfacf('0x10')]=router; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.attributes.js b/server/api/mailSubstatus/mailSubstatus.attributes.js index 1dc280b..ee361a8 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 _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 +var _0xa899=['exports','STRING','sequelize'];(function(_0x352311,_0x5b2dfc){var _0x15c3c6=function(_0x22860d){while(--_0x22860d){_0x352311['push'](_0x352311['shift']());}};_0x15c3c6(++_0x5b2dfc);}(_0xa899,0x155));var _0x9a89=function(_0x578275,_0xe7ae46){_0x578275=_0x578275-0x0;var _0xf78041=_0xa899[_0x578275];return _0xf78041;};'use strict';var Sequelize=require(_0x9a89('0x0'));module[_0x9a89('0x1')]={'name':{'type':Sequelize[_0x9a89('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x9a89('0x2')]}}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.controller.js b/server/api/mailSubstatus/mailSubstatus.controller.js index df4e75b..00e9cbf 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 _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 +var _0xc477=['fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','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','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','MailSubstatus','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','merge','type','VIRTUAL','filter','options','include','rows','show','params','rawAttributes','includeAll','find','catch','create','body','describe','rimraf','zip-dir'];(function(_0x50bf05,_0x31153d){var _0x4d3716=function(_0x3964bc){while(--_0x3964bc){_0x50bf05['push'](_0x50bf05['shift']());}};_0x4d3716(++_0x31153d);}(_0xc477,0xe5));var _0x7c47=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0xc477[_0x1ddedd];return _0xa3e1ac;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7c47('0x0'));var zipdir=require(_0x7c47('0x1'));var jsonpatch=require(_0x7c47('0x2'));var rp=require(_0x7c47('0x3'));var moment=require(_0x7c47('0x4'));var BPromise=require(_0x7c47('0x5'));var Mustache=require(_0x7c47('0x6'));var util=require(_0x7c47('0x7'));var path=require(_0x7c47('0x8'));var sox=require(_0x7c47('0x9'));var csv=require(_0x7c47('0xa'));var ejs=require(_0x7c47('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x7c47('0xc'));var jsforce=require(_0x7c47('0xd'));var deskjs=require(_0x7c47('0xe'));var toCsv=require(_0x7c47('0xa'));var querystring=require(_0x7c47('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x7c47('0x10'));var qs=require(_0x7c47('0x11'));var as=require(_0x7c47('0x12'));var hardwareService=require(_0x7c47('0x13'));var logger=require(_0x7c47('0x14'))(_0x7c47('0x15'));var utils=require(_0x7c47('0x16'));var config=require(_0x7c47('0x17'));var licenseUtil=require(_0x7c47('0x18'));var db=require(_0x7c47('0x19'))['db'];function respondWithStatusCode(_0x1c6d21,_0x2653d2){_0x2653d2=_0x2653d2||0xcc;return function(_0x11026a){if(_0x11026a){return _0x1c6d21[_0x7c47('0x1a')](_0x2653d2);}return _0x1c6d21[_0x7c47('0x1b')](_0x2653d2)[_0x7c47('0x1c')]();};}function respondWithResult(_0x90f140,_0x22cb1b){_0x22cb1b=_0x22cb1b||0xc8;return function(_0x245883){if(_0x245883){return _0x90f140[_0x7c47('0x1b')](_0x22cb1b)[_0x7c47('0x1d')](_0x245883);}};}function respondWithFilteredResult(_0x5a2c72,_0x5efd28){return function(_0x3f8fb8){if(_0x3f8fb8){var _0x3e4e66=typeof _0x5efd28[_0x7c47('0x1e')]===_0x7c47('0x1f')&&typeof _0x5efd28[_0x7c47('0x20')]==='undefined';var _0x779682=_0x3f8fb8[_0x7c47('0x21')];var _0x326eab=_0x3e4e66?0x0:_0x5efd28[_0x7c47('0x1e')];var _0x2ec5fc=_0x3e4e66?_0x3f8fb8[_0x7c47('0x21')]:_0x5efd28['offset']+_0x5efd28[_0x7c47('0x20')];var _0x8f2468;if(_0x2ec5fc>=_0x779682){_0x2ec5fc=_0x779682;_0x8f2468=0xc8;}else{_0x8f2468=0xce;}_0x5a2c72[_0x7c47('0x1b')](_0x8f2468);return _0x5a2c72[_0x7c47('0x22')](_0x7c47('0x23'),_0x326eab+'-'+_0x2ec5fc+'/'+_0x779682)[_0x7c47('0x1d')](_0x3f8fb8);}return null;};}function patchUpdates(_0x4360de){return function(_0x14c59e){try{jsonpatch[_0x7c47('0x24')](_0x14c59e,_0x4360de,!![]);}catch(_0x401991){return BPromise[_0x7c47('0x25')](_0x401991);}return _0x14c59e[_0x7c47('0x26')]();};}function saveUpdates(_0x1a07fc,_0x4b7949){return function(_0x8c481b){if(_0x8c481b){return _0x8c481b[_0x7c47('0x27')](_0x1a07fc)[_0x7c47('0x28')](function(_0xccd869){return _0xccd869;});}return null;};}function removeEntity(_0x79a1f8,_0x1e5623){return function(_0x48fb10){if(_0x48fb10){return _0x48fb10[_0x7c47('0x29')]()[_0x7c47('0x28')](function(){_0x79a1f8[_0x7c47('0x1b')](0xcc)[_0x7c47('0x1c')]();});}};}function handleEntityNotFound(_0x33b393,_0xe7df79){return function(_0x5b0761){if(!_0x5b0761){_0x33b393[_0x7c47('0x1a')](0x194);}return _0x5b0761;};}function handleError(_0x306afb,_0x49b771){_0x49b771=_0x49b771||0x1f4;return function(_0x250ec7){logger[_0x7c47('0x2a')](_0x250ec7[_0x7c47('0x2b')]);if(_0x250ec7[_0x7c47('0x2c')]){delete _0x250ec7[_0x7c47('0x2c')];}_0x306afb[_0x7c47('0x1b')](_0x49b771)[_0x7c47('0x2d')](_0x250ec7);};}exports[_0x7c47('0x2e')]=function(_0x1d2a7e,_0x52d55b){var _0xcc6c16={},_0x522882={},_0x221c2f={'count':0x0,'rows':[]};var _0x26dfb8=_[_0x7c47('0x2f')](db[_0x7c47('0x30')]['rawAttributes'],function(_0x4c1fd2){return{'name':_0x4c1fd2['fieldName'],'type':_0x4c1fd2['type']['key']};});_0x522882[_0x7c47('0x31')]=_[_0x7c47('0x2f')](_0x26dfb8,'name');_0x522882[_0x7c47('0x32')]=_[_0x7c47('0x33')](_0x1d2a7e[_0x7c47('0x32')]);_0x522882[_0x7c47('0x34')]=_[_0x7c47('0x35')](_0x522882[_0x7c47('0x31')],_0x522882[_0x7c47('0x32')]);_0xcc6c16['attributes']=_[_0x7c47('0x35')](_0x522882[_0x7c47('0x31')],qs[_0x7c47('0x36')](_0x1d2a7e[_0x7c47('0x32')][_0x7c47('0x36')]));_0xcc6c16[_0x7c47('0x37')]=_0xcc6c16[_0x7c47('0x37')][_0x7c47('0x38')]?_0xcc6c16[_0x7c47('0x37')]:_0x522882['model'];if(!_0x1d2a7e[_0x7c47('0x32')][_0x7c47('0x39')](_0x7c47('0x3a'))){_0xcc6c16['limit']=qs[_0x7c47('0x20')](_0x1d2a7e[_0x7c47('0x32')][_0x7c47('0x20')]);_0xcc6c16['offset']=qs['offset'](_0x1d2a7e['query']['offset']);}_0xcc6c16['order']=qs[_0x7c47('0x3b')](_0x1d2a7e[_0x7c47('0x32')][_0x7c47('0x3b')]);_0xcc6c16[_0x7c47('0x3c')]=qs['filters'](_['pick'](_0x1d2a7e[_0x7c47('0x32')],_0x522882['filters']),_0x26dfb8);if(_0x1d2a7e['query']['filter']){_0xcc6c16[_0x7c47('0x3c')]=_[_0x7c47('0x3d')](_0xcc6c16[_0x7c47('0x3c')],{'$or':_[_0x7c47('0x2f')](_0x26dfb8,function(_0x3f6fc4){if(_0x3f6fc4[_0x7c47('0x3e')]!==_0x7c47('0x3f')){var _0x9be25={};_0x9be25[_0x3f6fc4[_0x7c47('0x2c')]]={'$like':'%'+_0x1d2a7e[_0x7c47('0x32')][_0x7c47('0x40')]+'%'};return _0x9be25;}})});}_0xcc6c16=_[_0x7c47('0x3d')]({},_0xcc6c16,_0x1d2a7e[_0x7c47('0x41')]);var _0x172747={'where':_0xcc6c16[_0x7c47('0x3c')]};return db[_0x7c47('0x30')][_0x7c47('0x21')](_0x172747)[_0x7c47('0x28')](function(_0x34039a){_0x221c2f[_0x7c47('0x21')]=_0x34039a;if(_0x1d2a7e[_0x7c47('0x32')]['includeAll']){_0xcc6c16[_0x7c47('0x42')]=[{'all':!![]}];}return db['MailSubstatus']['findAll'](_0xcc6c16);})[_0x7c47('0x28')](function(_0xdfb279){_0x221c2f[_0x7c47('0x43')]=_0xdfb279;return _0x221c2f;})['then'](respondWithFilteredResult(_0x52d55b,_0xcc6c16))['catch'](handleError(_0x52d55b,null));};exports[_0x7c47('0x44')]=function(_0x460ce0,_0x478d56){var _0x430210={'raw':!![],'where':{'id':_0x460ce0[_0x7c47('0x45')]['id']}},_0x2ea75e={};_0x2ea75e['model']=_[_0x7c47('0x33')](db[_0x7c47('0x30')][_0x7c47('0x46')]);_0x2ea75e[_0x7c47('0x32')]=_[_0x7c47('0x33')](_0x460ce0[_0x7c47('0x32')]);_0x2ea75e[_0x7c47('0x34')]=_[_0x7c47('0x35')](_0x2ea75e[_0x7c47('0x31')],_0x2ea75e['query']);_0x430210['attributes']=_[_0x7c47('0x35')](_0x2ea75e['model'],qs[_0x7c47('0x36')](_0x460ce0[_0x7c47('0x32')][_0x7c47('0x36')]));_0x430210[_0x7c47('0x37')]=_0x430210['attributes'][_0x7c47('0x38')]?_0x430210['attributes']:_0x2ea75e[_0x7c47('0x31')];if(_0x460ce0[_0x7c47('0x32')][_0x7c47('0x47')]){_0x430210[_0x7c47('0x42')]=[{'all':!![]}];}_0x430210=_[_0x7c47('0x3d')]({},_0x430210,_0x460ce0[_0x7c47('0x41')]);return db[_0x7c47('0x30')][_0x7c47('0x48')](_0x430210)[_0x7c47('0x28')](handleEntityNotFound(_0x478d56,null))[_0x7c47('0x28')](respondWithResult(_0x478d56,null))[_0x7c47('0x49')](handleError(_0x478d56,null));};exports[_0x7c47('0x4a')]=function(_0x1417e8,_0x229bc6){return db[_0x7c47('0x30')][_0x7c47('0x4a')](_0x1417e8[_0x7c47('0x4b')],{})[_0x7c47('0x28')](respondWithResult(_0x229bc6,0xc9))[_0x7c47('0x49')](handleError(_0x229bc6,null));};exports[_0x7c47('0x27')]=function(_0x4f0976,_0xbe5819){if(_0x4f0976[_0x7c47('0x4b')]['id']){delete _0x4f0976[_0x7c47('0x4b')]['id'];}return db[_0x7c47('0x30')][_0x7c47('0x48')]({'where':{'id':_0x4f0976[_0x7c47('0x45')]['id']}})[_0x7c47('0x28')](handleEntityNotFound(_0xbe5819,null))['then'](saveUpdates(_0x4f0976['body'],null))[_0x7c47('0x28')](respondWithResult(_0xbe5819,null))[_0x7c47('0x49')](handleError(_0xbe5819,null));};exports[_0x7c47('0x29')]=function(_0x230080,_0x123ba6){return db['MailSubstatus'][_0x7c47('0x48')]({'where':{'id':_0x230080['params']['id']}})[_0x7c47('0x28')](handleEntityNotFound(_0x123ba6,null))['then'](removeEntity(_0x123ba6,null))[_0x7c47('0x49')](handleError(_0x123ba6,null));};exports[_0x7c47('0x4c')]=function(_0x5b93fb,_0x175678){return db[_0x7c47('0x30')]['describe']()[_0x7c47('0x28')](respondWithResult(_0x175678,null))['catch'](handleError(_0x175678,null));}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.model.js b/server/api/mailSubstatus/mailSubstatus.model.js index 53de25d..9773582 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 _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 +var _0xee15=['MailSubstatus','mail_substatuses','lodash','util','../../config/logger','api','moment','path','rimraf','./mailSubstatus.attributes','exports','define'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xee15,0x6e));var _0x5ee1=function(_0xf0ec6e,_0xa183d3){_0xf0ec6e=_0xf0ec6e-0x0;var _0x8bbc27=_0xee15[_0xf0ec6e];return _0x8bbc27;};'use strict';var _=require(_0x5ee1('0x0'));var util=require(_0x5ee1('0x1'));var logger=require(_0x5ee1('0x2'))(_0x5ee1('0x3'));var moment=require(_0x5ee1('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5ee1('0x5'));var rimraf=require(_0x5ee1('0x6'));var config=require('../../config/environment');var attributes=require(_0x5ee1('0x7'));module[_0x5ee1('0x8')]=function(_0x185822,_0x2960f4){return _0x185822[_0x5ee1('0x9')](_0x5ee1('0xa'),attributes,{'tableName':_0x5ee1('0xb'),'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 3e48e3e..7104814 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 _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 +var _0x00ff=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','MailSubstatus,\x20%s,\x20%s','debug','MailSubstatus,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','lodash','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x5cae03,_0x5dc181){var _0x20f445=function(_0x4a2364){while(--_0x4a2364){_0x5cae03['push'](_0x5cae03['shift']());}};_0x20f445(++_0x5dc181);}(_0x00ff,0xf6));var _0xf00f=function(_0x54c506,_0x512714){_0x54c506=_0x54c506-0x0;var _0x3b24c2=_0x00ff[_0x54c506];return _0x3b24c2;};'use strict';var _=require(_0xf00f('0x0'));var util=require(_0xf00f('0x1'));var moment=require(_0xf00f('0x2'));var BPromise=require(_0xf00f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf00f('0x4'));var db=require(_0xf00f('0x5'))['db'];var utils=require(_0xf00f('0x6'));var logger=require(_0xf00f('0x7'))(_0xf00f('0x8'));var config=require(_0xf00f('0x9'));var jayson=require(_0xf00f('0xa'));var client=jayson[_0xf00f('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x248b44,_0x28b804,_0x39bfaa){return new BPromise(function(_0x329a55,_0x1825ee){return client['request'](_0x248b44,_0x39bfaa)['then'](function(_0x3d9fab){logger['info'](_0xf00f('0xc'),_0x28b804,'request\x20sent');logger[_0xf00f('0xd')](_0xf00f('0xe'),_0x28b804,_0xf00f('0xf'),JSON[_0xf00f('0x10')](_0x3d9fab));if(_0x3d9fab[_0xf00f('0x11')]){if(_0x3d9fab['error']['code']===0x1f4){logger[_0xf00f('0x11')](_0xf00f('0xc'),_0x28b804,_0x3d9fab[_0xf00f('0x11')][_0xf00f('0x12')]);return _0x1825ee(_0x3d9fab[_0xf00f('0x11')][_0xf00f('0x12')]);}logger['error']('MailSubstatus,\x20%s,\x20%s',_0x28b804,_0x3d9fab['error'][_0xf00f('0x12')]);return _0x329a55(_0x3d9fab['error'][_0xf00f('0x12')]);}else{logger[_0xf00f('0x13')](_0xf00f('0xc'),_0x28b804,_0xf00f('0xf'));_0x329a55(_0x3d9fab[_0xf00f('0x14')][_0xf00f('0x12')]);}})['catch'](function(_0x447e4f){logger[_0xf00f('0x11')]('MailSubstatus,\x20%s,\x20%s',_0x28b804,_0x447e4f);_0x1825ee(_0x447e4f);});});} \ No newline at end of file diff --git a/server/api/mailTransferReport/index.js b/server/api/mailTransferReport/index.js index ea8f19b..3a5b2fb 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 _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 +var _0xcf32=['post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailTransferReport.controller','get','index','/describe','isAuthenticated','/:id','show'];(function(_0x267217,_0x370314){var _0x6b5832=function(_0x4929c3){while(--_0x4929c3){_0x267217['push'](_0x267217['shift']());}};_0x6b5832(++_0x370314);}(_0xcf32,0x8a));var _0x2cf3=function(_0x14b4b2,_0x42aed0){_0x14b4b2=_0x14b4b2-0x0;var _0x2710fd=_0xcf32[_0x14b4b2];return _0x2710fd;};'use strict';var multer=require(_0x2cf3('0x0'));var util=require(_0x2cf3('0x1'));var path=require(_0x2cf3('0x2'));var timeout=require(_0x2cf3('0x3'));var express=require('express');var router=express[_0x2cf3('0x4')]();var fs_extra=require(_0x2cf3('0x5'));var auth=require(_0x2cf3('0x6'));var interaction=require(_0x2cf3('0x7'));var config=require(_0x2cf3('0x8'));var controller=require(_0x2cf3('0x9'));router[_0x2cf3('0xa')]('/',auth['isAuthenticated'](),controller[_0x2cf3('0xb')]);router['get'](_0x2cf3('0xc'),auth[_0x2cf3('0xd')](),controller['describe']);router['get'](_0x2cf3('0xe'),auth[_0x2cf3('0xd')](),controller[_0x2cf3('0xf')]);router[_0x2cf3('0x10')]('/',auth[_0x2cf3('0xd')](),controller[_0x2cf3('0x11')]);router['put']('/:id',auth[_0x2cf3('0xd')](),controller[_0x2cf3('0x12')]);router[_0x2cf3('0x13')]('/:id',auth[_0x2cf3('0xd')](),controller[_0x2cf3('0x14')]);module[_0x2cf3('0x15')]=router; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.attributes.js b/server/api/mailTransferReport/mailTransferReport.attributes.js index ea03a74..2509cb9 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 _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 +var _0xf4eb=['NOW','moment','account','queue','DATE'];(function(_0x32c6de,_0x291336){var _0x2cb723=function(_0x119499){while(--_0x119499){_0x32c6de['push'](_0x32c6de['shift']());}};_0x2cb723(++_0x291336);}(_0xf4eb,0xec));var _0xbf4e=function(_0x5e5bbe,_0x555527){_0x5e5bbe=_0x5e5bbe-0x0;var _0x556b04=_0xf4eb[_0x5e5bbe];return _0x556b04;};'use strict';var moment=require(_0xbf4e('0x0'));var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xbf4e('0x1'),'agent','queue'),'allowNull':![],'defaultValue':_0xbf4e('0x2')},'transferredAt':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':Sequelize[_0xbf4e('0x4')]}}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.controller.js b/server/api/mailTransferReport/mailTransferReport.controller.js index 9716fa4..39ada42 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 _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 +var _0x30e5=['../../mysqldb','sendStatus','status','undefined','limit','count','offset','set','Content-Range','json','apply','reject','then','destroy','end','error','stack','name','send','index','map','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','VIRTUAL','options','MailTransferReport','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','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','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x3f199f,_0x55bc4c){var _0x26e61a=function(_0x3b444b){while(--_0x3b444b){_0x3f199f['push'](_0x3f199f['shift']());}};_0x26e61a(++_0x55bc4c);}(_0x30e5,0x1cf));var _0x530e=function(_0x21bc1a,_0x5099bc){_0x21bc1a=_0x21bc1a-0x0;var _0x5ab6e7=_0x30e5[_0x21bc1a];return _0x5ab6e7;};'use strict';var emlformat=require(_0x530e('0x0'));var rimraf=require(_0x530e('0x1'));var zipdir=require(_0x530e('0x2'));var jsonpatch=require(_0x530e('0x3'));var rp=require(_0x530e('0x4'));var moment=require(_0x530e('0x5'));var BPromise=require(_0x530e('0x6'));var Mustache=require(_0x530e('0x7'));var util=require(_0x530e('0x8'));var path=require(_0x530e('0x9'));var sox=require(_0x530e('0xa'));var csv=require(_0x530e('0xb'));var ejs=require(_0x530e('0xc'));var fs=require('fs');var fs_extra=require(_0x530e('0xd'));var _=require(_0x530e('0xe'));var squel=require(_0x530e('0xf'));var crypto=require(_0x530e('0x10'));var jsforce=require(_0x530e('0x11'));var deskjs=require(_0x530e('0x12'));var toCsv=require(_0x530e('0xb'));var querystring=require(_0x530e('0x13'));var Papa=require(_0x530e('0x14'));var Redis=require(_0x530e('0x15'));var authService=require(_0x530e('0x16'));var qs=require(_0x530e('0x17'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x530e('0x18'));var logger=require('../../config/logger')(_0x530e('0x19'));var utils=require(_0x530e('0x1a'));var config=require(_0x530e('0x1b'));var licenseUtil=require(_0x530e('0x1c'));var db=require(_0x530e('0x1d'))['db'];function respondWithStatusCode(_0x291044,_0x549220){_0x549220=_0x549220||0xcc;return function(_0x48302d){if(_0x48302d){return _0x291044[_0x530e('0x1e')](_0x549220);}return _0x291044[_0x530e('0x1f')](_0x549220)['end']();};}function respondWithResult(_0x29bcd1,_0x3ccabd){_0x3ccabd=_0x3ccabd||0xc8;return function(_0x9f1fb1){if(_0x9f1fb1){return _0x29bcd1[_0x530e('0x1f')](_0x3ccabd)['json'](_0x9f1fb1);}};}function respondWithFilteredResult(_0x403dbf,_0x3ba4c2){return function(_0x4a8bd3){if(_0x4a8bd3){var _0x599441=typeof _0x3ba4c2['offset']===_0x530e('0x20')&&typeof _0x3ba4c2[_0x530e('0x21')]===_0x530e('0x20');var _0xd16ae3=_0x4a8bd3[_0x530e('0x22')];var _0x4ccfcb=_0x599441?0x0:_0x3ba4c2[_0x530e('0x23')];var _0x42c850=_0x599441?_0x4a8bd3['count']:_0x3ba4c2[_0x530e('0x23')]+_0x3ba4c2[_0x530e('0x21')];var _0x4bc490;if(_0x42c850>=_0xd16ae3){_0x42c850=_0xd16ae3;_0x4bc490=0xc8;}else{_0x4bc490=0xce;}_0x403dbf[_0x530e('0x1f')](_0x4bc490);return _0x403dbf[_0x530e('0x24')](_0x530e('0x25'),_0x4ccfcb+'-'+_0x42c850+'/'+_0xd16ae3)[_0x530e('0x26')](_0x4a8bd3);}return null;};}function patchUpdates(_0x4dea8a){return function(_0x3a49c8){try{jsonpatch[_0x530e('0x27')](_0x3a49c8,_0x4dea8a,!![]);}catch(_0x144cb2){return BPromise[_0x530e('0x28')](_0x144cb2);}return _0x3a49c8['save']();};}function saveUpdates(_0x405e07,_0x38f62c){return function(_0x50609a){if(_0x50609a){return _0x50609a['update'](_0x405e07)[_0x530e('0x29')](function(_0x14e934){return _0x14e934;});}return null;};}function removeEntity(_0x45733e,_0x58b3d9){return function(_0x4118f5){if(_0x4118f5){return _0x4118f5[_0x530e('0x2a')]()[_0x530e('0x29')](function(){_0x45733e[_0x530e('0x1f')](0xcc)[_0x530e('0x2b')]();});}};}function handleEntityNotFound(_0x226f2b,_0x39c854){return function(_0x1b5efd){if(!_0x1b5efd){_0x226f2b[_0x530e('0x1e')](0x194);}return _0x1b5efd;};}function handleError(_0x242da8,_0x294619){_0x294619=_0x294619||0x1f4;return function(_0x5e94d9){logger[_0x530e('0x2c')](_0x5e94d9[_0x530e('0x2d')]);if(_0x5e94d9[_0x530e('0x2e')]){delete _0x5e94d9[_0x530e('0x2e')];}_0x242da8[_0x530e('0x1f')](_0x294619)[_0x530e('0x2f')](_0x5e94d9);};}exports[_0x530e('0x30')]=function(_0x577c80,_0x4ba1ec){var _0x25055a={},_0x545f22={},_0x507bda={'count':0x0,'rows':[]};var _0x4af329=_[_0x530e('0x31')](db['MailTransferReport']['rawAttributes'],function(_0x1ca4c7){return{'name':_0x1ca4c7[_0x530e('0x32')],'type':_0x1ca4c7[_0x530e('0x33')][_0x530e('0x34')]};});_0x545f22[_0x530e('0x35')]=_['map'](_0x4af329,_0x530e('0x2e'));_0x545f22[_0x530e('0x36')]=_[_0x530e('0x37')](_0x577c80[_0x530e('0x36')]);_0x545f22['filters']=_[_0x530e('0x38')](_0x545f22[_0x530e('0x35')],_0x545f22[_0x530e('0x36')]);_0x25055a[_0x530e('0x39')]=_[_0x530e('0x38')](_0x545f22['model'],qs[_0x530e('0x3a')](_0x577c80[_0x530e('0x36')][_0x530e('0x3a')]));_0x25055a[_0x530e('0x39')]=_0x25055a[_0x530e('0x39')][_0x530e('0x3b')]?_0x25055a[_0x530e('0x39')]:_0x545f22[_0x530e('0x35')];if(!_0x577c80[_0x530e('0x36')][_0x530e('0x3c')]('nolimit')){_0x25055a['limit']=qs[_0x530e('0x21')](_0x577c80[_0x530e('0x36')][_0x530e('0x21')]);_0x25055a['offset']=qs['offset'](_0x577c80[_0x530e('0x36')]['offset']);}_0x25055a[_0x530e('0x3d')]=qs[_0x530e('0x3e')](_0x577c80[_0x530e('0x36')][_0x530e('0x3e')]);_0x25055a[_0x530e('0x3f')]=qs['filters'](_['pick'](_0x577c80['query'],_0x545f22[_0x530e('0x40')]),_0x4af329);if(_0x577c80[_0x530e('0x36')][_0x530e('0x41')]){_0x25055a[_0x530e('0x3f')]=_[_0x530e('0x42')](_0x25055a[_0x530e('0x3f')],{'$or':_[_0x530e('0x31')](_0x4af329,function(_0x5d4028){if(_0x5d4028[_0x530e('0x33')]!==_0x530e('0x43')){var _0x2ae14b={};_0x2ae14b[_0x5d4028[_0x530e('0x2e')]]={'$like':'%'+_0x577c80['query'][_0x530e('0x41')]+'%'};return _0x2ae14b;}})});}_0x25055a=_[_0x530e('0x42')]({},_0x25055a,_0x577c80[_0x530e('0x44')]);var _0x31e0f8={'where':_0x25055a['where']};return db[_0x530e('0x45')][_0x530e('0x22')](_0x31e0f8)[_0x530e('0x29')](function(_0x4c3c90){_0x507bda[_0x530e('0x22')]=_0x4c3c90;if(_0x577c80[_0x530e('0x36')][_0x530e('0x46')]){_0x25055a[_0x530e('0x47')]=[{'all':!![]}];}return db[_0x530e('0x45')][_0x530e('0x48')](_0x25055a);})['then'](function(_0x1c7bab){_0x507bda[_0x530e('0x49')]=_0x1c7bab;return _0x507bda;})['then'](respondWithFilteredResult(_0x4ba1ec,_0x25055a))[_0x530e('0x4a')](handleError(_0x4ba1ec,null));};exports[_0x530e('0x4b')]=function(_0x10c257,_0x4f0dc3){var _0x5d3fd9={'raw':!![],'where':{'id':_0x10c257['params']['id']}},_0x2d6bc3={};_0x2d6bc3[_0x530e('0x35')]=_[_0x530e('0x37')](db[_0x530e('0x45')][_0x530e('0x4c')]);_0x2d6bc3['query']=_[_0x530e('0x37')](_0x10c257['query']);_0x2d6bc3[_0x530e('0x40')]=_[_0x530e('0x38')](_0x2d6bc3[_0x530e('0x35')],_0x2d6bc3[_0x530e('0x36')]);_0x5d3fd9[_0x530e('0x39')]=_[_0x530e('0x38')](_0x2d6bc3[_0x530e('0x35')],qs[_0x530e('0x3a')](_0x10c257[_0x530e('0x36')]['fields']));_0x5d3fd9['attributes']=_0x5d3fd9[_0x530e('0x39')][_0x530e('0x3b')]?_0x5d3fd9[_0x530e('0x39')]:_0x2d6bc3[_0x530e('0x35')];if(_0x10c257[_0x530e('0x36')]['includeAll']){_0x5d3fd9[_0x530e('0x47')]=[{'all':!![]}];}_0x5d3fd9=_['merge']({},_0x5d3fd9,_0x10c257[_0x530e('0x44')]);return db[_0x530e('0x45')][_0x530e('0x4d')](_0x5d3fd9)[_0x530e('0x29')](handleEntityNotFound(_0x4f0dc3,null))['then'](respondWithResult(_0x4f0dc3,null))['catch'](handleError(_0x4f0dc3,null));};exports[_0x530e('0x4e')]=function(_0x3b3425,_0x350912){return db['MailTransferReport']['create'](_0x3b3425['body'],{})[_0x530e('0x29')](respondWithResult(_0x350912,0xc9))['catch'](handleError(_0x350912,null));};exports[_0x530e('0x4f')]=function(_0x493db7,_0x1a0ff0){if(_0x493db7[_0x530e('0x50')]['id']){delete _0x493db7['body']['id'];}return db[_0x530e('0x45')][_0x530e('0x4d')]({'where':{'id':_0x493db7[_0x530e('0x51')]['id']}})[_0x530e('0x29')](handleEntityNotFound(_0x1a0ff0,null))[_0x530e('0x29')](saveUpdates(_0x493db7[_0x530e('0x50')],null))[_0x530e('0x29')](respondWithResult(_0x1a0ff0,null))[_0x530e('0x4a')](handleError(_0x1a0ff0,null));};exports['destroy']=function(_0x4f83b3,_0x1cfd74){return db[_0x530e('0x45')][_0x530e('0x4d')]({'where':{'id':_0x4f83b3['params']['id']}})[_0x530e('0x29')](handleEntityNotFound(_0x1cfd74,null))[_0x530e('0x29')](removeEntity(_0x1cfd74,null))[_0x530e('0x4a')](handleError(_0x1cfd74,null));};exports['describe']=function(_0x2cb101,_0x1e1117){return db[_0x530e('0x45')]['describe']()[_0x530e('0x29')](respondWithResult(_0x1e1117,null))[_0x530e('0x4a')](handleError(_0x1e1117,null));}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.model.js b/server/api/mailTransferReport/mailTransferReport.model.js index 05712e2..518a93d 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 _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 +var _0x26d1=['../../config/logger','api','moment','bluebird','rimraf','./mailTransferReport.attributes','exports','define','report_mail_transfer','uniqueid','lodash'];(function(_0x18b68b,_0x56ecdf){var _0x45967a=function(_0x2cdf03){while(--_0x2cdf03){_0x18b68b['push'](_0x18b68b['shift']());}};_0x45967a(++_0x56ecdf);}(_0x26d1,0x8e));var _0x126d=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x26d1[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0x126d('0x0'));var util=require('util');var logger=require(_0x126d('0x1'))(_0x126d('0x2'));var moment=require(_0x126d('0x3'));var BPromise=require(_0x126d('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x126d('0x5'));var config=require('../../config/environment');var attributes=require(_0x126d('0x6'));module[_0x126d('0x7')]=function(_0x442e04,_0x449ed0){return _0x442e04[_0x126d('0x8')]('MailTransferReport',attributes,{'tableName':_0x126d('0x9'),'paranoid':![],'indexes':[{'name':_0x126d('0xa'),'fields':[_0x126d('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.rpc.js b/server/api/mailTransferReport/mailTransferReport.rpc.js index 67cb505..c61595f 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 _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 +var _0xae1f=['result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x537e04,_0x4c3191){var _0x15a35f=function(_0x569eae){while(--_0x569eae){_0x537e04['push'](_0x537e04['shift']());}};_0x15a35f(++_0x4c3191);}(_0xae1f,0x178));var _0xfae1=function(_0x4394b6,_0x12357f){_0x4394b6=_0x4394b6-0x0;var _0x360244=_0xae1f[_0x4394b6];return _0x360244;};'use strict';var _=require(_0xfae1('0x0'));var util=require(_0xfae1('0x1'));var moment=require(_0xfae1('0x2'));var BPromise=require(_0xfae1('0x3'));var rs=require(_0xfae1('0x4'));var fs=require('fs');var Redis=require(_0xfae1('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xfae1('0x6'));var logger=require(_0xfae1('0x7'))(_0xfae1('0x8'));var config=require(_0xfae1('0x9'));var jayson=require(_0xfae1('0xa'));var client=jayson[_0xfae1('0xb')][_0xfae1('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x53f578,_0x29003e,_0x3c7619){return new BPromise(function(_0x249616,_0x1da02b){return client[_0xfae1('0xd')](_0x53f578,_0x3c7619)[_0xfae1('0xe')](function(_0x8bd434){logger[_0xfae1('0xf')](_0xfae1('0x10'),_0x29003e,_0xfae1('0x11'));logger[_0xfae1('0x12')](_0xfae1('0x13'),_0x29003e,_0xfae1('0x11'),JSON[_0xfae1('0x14')](_0x8bd434));if(_0x8bd434[_0xfae1('0x15')]){if(_0x8bd434[_0xfae1('0x15')][_0xfae1('0x16')]===0x1f4){logger['error']('MailTransferReport,\x20%s,\x20%s',_0x29003e,_0x8bd434['error'][_0xfae1('0x17')]);return _0x1da02b(_0x8bd434[_0xfae1('0x15')][_0xfae1('0x17')]);}logger['error']('MailTransferReport,\x20%s,\x20%s',_0x29003e,_0x8bd434[_0xfae1('0x15')]['message']);return _0x249616(_0x8bd434[_0xfae1('0x15')][_0xfae1('0x17')]);}else{logger[_0xfae1('0xf')](_0xfae1('0x10'),_0x29003e,_0xfae1('0x11'));_0x249616(_0x8bd434[_0xfae1('0x18')][_0xfae1('0x17')]);}})['catch'](function(_0x16f0c1){logger[_0xfae1('0x15')](_0xfae1('0x10'),_0x29003e,_0x16f0c1);_0x1da02b(_0x16f0c1);});});} \ No newline at end of file diff --git a/server/api/memberReport/index.js b/server/api/memberReport/index.js index 01f823a..cd3b82d 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 _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 +var _0xadbd=['connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./memberReport.controller','get','index','isAuthenticated','/:id','show','post','create','put','delete','destroy','exports','multer','util','path'];(function(_0x527a53,_0x3265d6){var _0x2332f5=function(_0x3b2d90){while(--_0x3b2d90){_0x527a53['push'](_0x527a53['shift']());}};_0x2332f5(++_0x3265d6);}(_0xadbd,0x129));var _0xdadb=function(_0x22ca91,_0x2e2ac6){_0x22ca91=_0x22ca91-0x0;var _0x3b03e4=_0xadbd[_0x22ca91];return _0x3b03e4;};'use strict';var multer=require(_0xdadb('0x0'));var util=require(_0xdadb('0x1'));var path=require(_0xdadb('0x2'));var timeout=require(_0xdadb('0x3'));var express=require(_0xdadb('0x4'));var router=express['Router']();var fs_extra=require(_0xdadb('0x5'));var auth=require(_0xdadb('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xdadb('0x7'));var controller=require(_0xdadb('0x8'));router[_0xdadb('0x9')]('/',auth['isAuthenticated'](),controller[_0xdadb('0xa')]);router[_0xdadb('0x9')]('/describe',auth[_0xdadb('0xb')](),controller['describe']);router[_0xdadb('0x9')](_0xdadb('0xc'),auth['isAuthenticated'](),controller[_0xdadb('0xd')]);router[_0xdadb('0xe')]('/',auth['isAuthenticated'](),controller[_0xdadb('0xf')]);router[_0xdadb('0x10')](_0xdadb('0xc'),auth['isAuthenticated'](),controller['update']);router[_0xdadb('0x11')](_0xdadb('0xc'),auth[_0xdadb('0xb')](),controller[_0xdadb('0x12')]);module[_0xdadb('0x13')]=router; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.attributes.js b/server/api/memberReport/memberReport.attributes.js index d018cc3..fe269e1 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 _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 +var _0x79d8=['seconds','setDataValue','exitAt','duration','talk:[start]','talk:[dial\x20string]','talk:[queue]','sequelize','moment','exports','STRING','LOGIN,\x20PAUSE,\x20TALKING','INTEGER','DATE','getDataValue','diff'];(function(_0x510f53,_0x571572){var _0x2ad842=function(_0x3f3ee5){while(--_0x3f3ee5){_0x510f53['push'](_0x510f53['shift']());}};_0x2ad842(++_0x571572);}(_0x79d8,0x67));var _0x879d=function(_0x4ea8c4,_0x19fcfc){_0x4ea8c4=_0x4ea8c4-0x0;var _0x546e84=_0x79d8[_0x4ea8c4];return _0x546e84;};'use strict';var Sequelize=require(_0x879d('0x0'));var moment=require(_0x879d('0x1'));module[_0x879d('0x2')]={'channel':{'type':Sequelize[_0x879d('0x3')]},'membername':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0x879d('0x3')]},'type':{'type':Sequelize[_0x879d('0x3')],'defaultValue':'DEFAULT\x20PAUSE','comment':_0x879d('0x4')},'duration':{'type':Sequelize[_0x879d('0x5')]},'enterAt':{'type':Sequelize[_0x879d('0x6')]},'exitAt':{'type':Sequelize['DATE'],'set':function(_0x2d578e){var _0x46ed21=moment(_0x2d578e);var _0x142181=moment(this[_0x879d('0x7')]('enterAt'));var _0x257050=_0x46ed21[_0x879d('0x8')](_0x142181,_0x879d('0x9'));this[_0x879d('0xa')](_0x879d('0xb'),_0x2d578e);this['setDataValue'](_0x879d('0xc'),_0x257050||null);}},'data1':{'type':Sequelize['STRING'],'comment':'talk:[inbound,\x20outbound],\x20pause:[reason]'},'data2':{'type':Sequelize[_0x879d('0x3')],'comment':_0x879d('0xd')},'data3':{'type':Sequelize[_0x879d('0x3')],'comment':'talk:[destination]'},'data4':{'type':Sequelize[_0x879d('0x3')],'comment':_0x879d('0xe')},'data5':{'type':Sequelize['STRING'],'comment':_0x879d('0xf')},'role':{'type':Sequelize[_0x879d('0x3')]},'internal':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0x879d('0x3')]}}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.controller.js b/server/api/memberReport/memberReport.controller.js index 46e65c4..3c7b20e 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 _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 +var _0x34e8=['path','sox','to-csv','fs-extra','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','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','map','MemberReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll','catch','show','params','keys','include','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util'];(function(_0x2892da,_0x191a40){var _0x28cff2=function(_0x57023d){while(--_0x57023d){_0x2892da['push'](_0x2892da['shift']());}};_0x28cff2(++_0x191a40);}(_0x34e8,0x12c));var _0x834e=function(_0x14df16,_0x244307){_0x14df16=_0x14df16-0x0;var _0x335a8e=_0x34e8[_0x14df16];return _0x335a8e;};'use strict';var emlformat=require(_0x834e('0x0'));var rimraf=require(_0x834e('0x1'));var zipdir=require(_0x834e('0x2'));var jsonpatch=require(_0x834e('0x3'));var rp=require('request-promise');var moment=require(_0x834e('0x4'));var BPromise=require(_0x834e('0x5'));var Mustache=require(_0x834e('0x6'));var util=require(_0x834e('0x7'));var path=require(_0x834e('0x8'));var sox=require(_0x834e('0x9'));var csv=require(_0x834e('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x834e('0xb'));var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0xa'));var querystring=require(_0x834e('0x10'));var Papa=require(_0x834e('0x11'));var Redis=require(_0x834e('0x12'));var authService=require(_0x834e('0x13'));var qs=require(_0x834e('0x14'));var as=require(_0x834e('0x15'));var hardwareService=require(_0x834e('0x16'));var logger=require(_0x834e('0x17'))(_0x834e('0x18'));var utils=require(_0x834e('0x19'));var config=require(_0x834e('0x1a'));var licenseUtil=require(_0x834e('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5e5b6d,_0x6cd9b9){_0x6cd9b9=_0x6cd9b9||0xcc;return function(_0x58a27e){if(_0x58a27e){return _0x5e5b6d[_0x834e('0x1c')](_0x6cd9b9);}return _0x5e5b6d[_0x834e('0x1d')](_0x6cd9b9)[_0x834e('0x1e')]();};}function respondWithResult(_0x21cc0a,_0x50e860){_0x50e860=_0x50e860||0xc8;return function(_0x43156c){if(_0x43156c){return _0x21cc0a[_0x834e('0x1d')](_0x50e860)['json'](_0x43156c);}};}function respondWithFilteredResult(_0x316205,_0x4a9cdc){return function(_0x38a8cd){if(_0x38a8cd){var _0x36d443=typeof _0x4a9cdc['offset']===_0x834e('0x1f')&&typeof _0x4a9cdc[_0x834e('0x20')]===_0x834e('0x1f');var _0x50b3f6=_0x38a8cd[_0x834e('0x21')];var _0x211e9a=_0x36d443?0x0:_0x4a9cdc[_0x834e('0x22')];var _0xb993a1=_0x36d443?_0x38a8cd[_0x834e('0x21')]:_0x4a9cdc[_0x834e('0x22')]+_0x4a9cdc[_0x834e('0x20')];var _0x595515;if(_0xb993a1>=_0x50b3f6){_0xb993a1=_0x50b3f6;_0x595515=0xc8;}else{_0x595515=0xce;}_0x316205[_0x834e('0x1d')](_0x595515);return _0x316205[_0x834e('0x23')](_0x834e('0x24'),_0x211e9a+'-'+_0xb993a1+'/'+_0x50b3f6)[_0x834e('0x25')](_0x38a8cd);}return null;};}function patchUpdates(_0x4ab05d){return function(_0x45a630){try{jsonpatch[_0x834e('0x26')](_0x45a630,_0x4ab05d,!![]);}catch(_0x5a05c0){return BPromise[_0x834e('0x27')](_0x5a05c0);}return _0x45a630[_0x834e('0x28')]();};}function saveUpdates(_0x8d406e,_0x5c55ca){return function(_0x4e3f48){if(_0x4e3f48){return _0x4e3f48[_0x834e('0x29')](_0x8d406e)[_0x834e('0x2a')](function(_0x589dde){return _0x589dde;});}return null;};}function removeEntity(_0x25ee1d,_0x1dc1e0){return function(_0x58f4fd){if(_0x58f4fd){return _0x58f4fd[_0x834e('0x2b')]()[_0x834e('0x2a')](function(){_0x25ee1d[_0x834e('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x24fcf7,_0x3e310f){return function(_0x5e1cc5){if(!_0x5e1cc5){_0x24fcf7['sendStatus'](0x194);}return _0x5e1cc5;};}function handleError(_0x1e713a,_0x508a1d){_0x508a1d=_0x508a1d||0x1f4;return function(_0x2826ec){logger[_0x834e('0x2c')](_0x2826ec[_0x834e('0x2d')]);if(_0x2826ec[_0x834e('0x2e')]){delete _0x2826ec[_0x834e('0x2e')];}_0x1e713a[_0x834e('0x1d')](_0x508a1d)['send'](_0x2826ec);};}exports['index']=function(_0x4dc64a,_0x58c1d7){var _0x2c7a8d={},_0x567cea={},_0x106d6a={'count':0x0,'rows':[]};var _0x5dacc1=_[_0x834e('0x2f')](db[_0x834e('0x30')][_0x834e('0x31')],function(_0x1e026a){return{'name':_0x1e026a[_0x834e('0x32')],'type':_0x1e026a[_0x834e('0x33')][_0x834e('0x34')]};});_0x567cea[_0x834e('0x35')]=_[_0x834e('0x2f')](_0x5dacc1,'name');_0x567cea[_0x834e('0x36')]=_['keys'](_0x4dc64a[_0x834e('0x36')]);_0x567cea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],_0x567cea[_0x834e('0x36')]);_0x2c7a8d[_0x834e('0x39')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x4dc64a[_0x834e('0x36')]['fields']));_0x2c7a8d[_0x834e('0x39')]=_0x2c7a8d[_0x834e('0x39')][_0x834e('0x3b')]?_0x2c7a8d[_0x834e('0x39')]:_0x567cea['model'];if(!_0x4dc64a[_0x834e('0x36')][_0x834e('0x3c')]('nolimit')){_0x2c7a8d['limit']=qs['limit'](_0x4dc64a[_0x834e('0x36')][_0x834e('0x20')]);_0x2c7a8d[_0x834e('0x22')]=qs[_0x834e('0x22')](_0x4dc64a[_0x834e('0x36')][_0x834e('0x22')]);}_0x2c7a8d['order']=qs[_0x834e('0x3d')](_0x4dc64a['query'][_0x834e('0x3d')]);_0x2c7a8d[_0x834e('0x3e')]=qs['filters'](_[_0x834e('0x3f')](_0x4dc64a[_0x834e('0x36')],_0x567cea['filters']),_0x5dacc1);if(_0x4dc64a['query'][_0x834e('0x40')]){_0x2c7a8d[_0x834e('0x3e')]=_[_0x834e('0x41')](_0x2c7a8d[_0x834e('0x3e')],{'$or':_[_0x834e('0x2f')](_0x5dacc1,function(_0x4ca43c){if(_0x4ca43c[_0x834e('0x33')]!=='VIRTUAL'){var _0x50c243={};_0x50c243[_0x4ca43c[_0x834e('0x2e')]]={'$like':'%'+_0x4dc64a['query'][_0x834e('0x40')]+'%'};return _0x50c243;}})});}_0x2c7a8d=_[_0x834e('0x41')]({},_0x2c7a8d,_0x4dc64a[_0x834e('0x42')]);var _0x3c59af={'where':_0x2c7a8d[_0x834e('0x3e')]};return db['MemberReport'][_0x834e('0x21')](_0x3c59af)[_0x834e('0x2a')](function(_0x38f266){_0x106d6a['count']=_0x38f266;if(_0x4dc64a[_0x834e('0x36')][_0x834e('0x43')]){_0x2c7a8d['include']=[{'all':!![]}];}return db[_0x834e('0x30')]['findAll'](_0x2c7a8d);})[_0x834e('0x2a')](function(_0x585335){_0x106d6a['rows']=_0x585335;return _0x106d6a;})['then'](respondWithFilteredResult(_0x58c1d7,_0x2c7a8d))[_0x834e('0x44')](handleError(_0x58c1d7,null));};exports[_0x834e('0x45')]=function(_0x3bcbf4,_0xbc1571){var _0x8ad264={'raw':!![],'where':{'id':_0x3bcbf4[_0x834e('0x46')]['id']}},_0x23feea={};_0x23feea['model']=_[_0x834e('0x47')](db['MemberReport'][_0x834e('0x31')]);_0x23feea['query']=_[_0x834e('0x47')](_0x3bcbf4['query']);_0x23feea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x23feea['model'],_0x23feea[_0x834e('0x36')]);_0x8ad264[_0x834e('0x39')]=_[_0x834e('0x38')](_0x23feea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x3bcbf4[_0x834e('0x36')][_0x834e('0x3a')]));_0x8ad264[_0x834e('0x39')]=_0x8ad264[_0x834e('0x39')][_0x834e('0x3b')]?_0x8ad264['attributes']:_0x23feea[_0x834e('0x35')];if(_0x3bcbf4[_0x834e('0x36')]['includeAll']){_0x8ad264[_0x834e('0x48')]=[{'all':!![]}];}_0x8ad264=_[_0x834e('0x41')]({},_0x8ad264,_0x3bcbf4[_0x834e('0x42')]);return db[_0x834e('0x30')][_0x834e('0x49')](_0x8ad264)[_0x834e('0x2a')](handleEntityNotFound(_0xbc1571,null))['then'](respondWithResult(_0xbc1571,null))['catch'](handleError(_0xbc1571,null));};exports[_0x834e('0x4a')]=function(_0x1a5444,_0x30568e){return db[_0x834e('0x30')][_0x834e('0x4a')](_0x1a5444[_0x834e('0x4b')],{})[_0x834e('0x2a')](respondWithResult(_0x30568e,0xc9))[_0x834e('0x44')](handleError(_0x30568e,null));};exports[_0x834e('0x29')]=function(_0x390c45,_0xf02f0d){if(_0x390c45[_0x834e('0x4b')]['id']){delete _0x390c45[_0x834e('0x4b')]['id'];}return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x390c45[_0x834e('0x46')]['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0xf02f0d,null))[_0x834e('0x2a')](saveUpdates(_0x390c45[_0x834e('0x4b')],null))[_0x834e('0x2a')](respondWithResult(_0xf02f0d,null))['catch'](handleError(_0xf02f0d,null));};exports[_0x834e('0x2b')]=function(_0x1f08b9,_0x4e73e0){return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x1f08b9['params']['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0x4e73e0,null))[_0x834e('0x2a')](removeEntity(_0x4e73e0,null))[_0x834e('0x44')](handleError(_0x4e73e0,null));};exports[_0x834e('0x4c')]=function(_0x4288e4,_0xb77aab){return db[_0x834e('0x30')]['describe']()[_0x834e('0x2a')](respondWithResult(_0xb77aab,null))[_0x834e('0x44')](handleError(_0xb77aab,null));}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.model.js b/server/api/memberReport/memberReport.model.js index 33f4e4c..df86549 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 _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 +var _0x4380=['lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./memberReport.attributes','exports','define','membername_interface','interface'];(function(_0xc6fa6a,_0x2c4ad6){var _0xb3c77d=function(_0x4786a5){while(--_0x4786a5){_0xc6fa6a['push'](_0xc6fa6a['shift']());}};_0xb3c77d(++_0x2c4ad6);}(_0x4380,0xb6));var _0x0438=function(_0x95fb9c,_0x157d50){_0x95fb9c=_0x95fb9c-0x0;var _0x1b1f24=_0x4380[_0x95fb9c];return _0x1b1f24;};'use strict';var _=require(_0x0438('0x0'));var util=require('util');var logger=require(_0x0438('0x1'))(_0x0438('0x2'));var moment=require(_0x0438('0x3'));var BPromise=require('bluebird');var rp=require(_0x0438('0x4'));var fs=require('fs');var path=require(_0x0438('0x5'));var rimraf=require(_0x0438('0x6'));var config=require(_0x0438('0x7'));var attributes=require(_0x0438('0x8'));module[_0x0438('0x9')]=function(_0x439287,_0x370ac0){return _0x439287[_0x0438('0xa')]('MemberReport',attributes,{'tableName':'report_member','paranoid':![],'indexes':[{'name':_0x0438('0xb'),'fields':['membername',_0x0438('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.rpc.js b/server/api/memberReport/memberReport.rpc.js index 996e9c0..7fb8823 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 _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 +var _0xa2c8=['CreateMemberReport','UpdateMemberReport','update','body','where','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','jayson/promise','client','http','info','MemberReport,\x20%s,\x20%s','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','GetMemberReport','MemberReport','findAll','options','raw','attributes','limit','include','map','model','then','create'];(function(_0x4de7ad,_0x25fcc9){var _0x33317e=function(_0x3254b1){while(--_0x3254b1){_0x4de7ad['push'](_0x4de7ad['shift']());}};_0x33317e(++_0x25fcc9);}(_0xa2c8,0x99));var _0x8a2c=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xa2c8[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8a2c('0x0'));var util=require(_0x8a2c('0x1'));var moment=require(_0x8a2c('0x2'));var BPromise=require(_0x8a2c('0x3'));var rs=require(_0x8a2c('0x4'));var fs=require('fs');var Redis=require(_0x8a2c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8a2c('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x8a2c('0x7'));var client=jayson[_0x8a2c('0x8')][_0x8a2c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1031fb,_0x4e007c,_0xe1e335){return new BPromise(function(_0x1d2885,_0x43745f){return client['request'](_0x1031fb,_0xe1e335)['then'](function(_0x4c237a){logger[_0x8a2c('0xa')](_0x8a2c('0xb'),_0x4e007c,'request\x20sent');logger[_0x8a2c('0xc')](_0x8a2c('0xd'),_0x4e007c,_0x8a2c('0xe'),JSON[_0x8a2c('0xf')](_0x4c237a));if(_0x4c237a[_0x8a2c('0x10')]){if(_0x4c237a[_0x8a2c('0x10')]['code']===0x1f4){logger[_0x8a2c('0x10')](_0x8a2c('0xb'),_0x4e007c,_0x4c237a['error'][_0x8a2c('0x11')]);return _0x43745f(_0x4c237a[_0x8a2c('0x10')]['message']);}logger['error']('MemberReport,\x20%s,\x20%s',_0x4e007c,_0x4c237a['error'][_0x8a2c('0x11')]);return _0x1d2885(_0x4c237a[_0x8a2c('0x10')][_0x8a2c('0x11')]);}else{logger['info']('MemberReport,\x20%s,\x20%s',_0x4e007c,_0x8a2c('0xe'));_0x1d2885(_0x4c237a[_0x8a2c('0x12')][_0x8a2c('0x11')]);}})[_0x8a2c('0x13')](function(_0x4388b0){logger[_0x8a2c('0x10')](_0x8a2c('0xb'),_0x4e007c,_0x4388b0);_0x43745f(_0x4388b0);});});}exports[_0x8a2c('0x14')]=function(_0x48d922){var _0x5d98f4=this;return new Promise(function(_0x41226b,_0x28d25b){return db[_0x8a2c('0x15')][_0x8a2c('0x16')]({'raw':_0x48d922[_0x8a2c('0x17')]?_0x48d922[_0x8a2c('0x17')][_0x8a2c('0x18')]===undefined?!![]:![]:!![],'where':_0x48d922['options']?_0x48d922[_0x8a2c('0x17')]['where']||null:null,'attributes':_0x48d922[_0x8a2c('0x17')]?_0x48d922[_0x8a2c('0x17')][_0x8a2c('0x19')]||null:null,'limit':_0x48d922[_0x8a2c('0x17')]?_0x48d922[_0x8a2c('0x17')][_0x8a2c('0x1a')]||null:null,'include':_0x48d922[_0x8a2c('0x17')]?_0x48d922[_0x8a2c('0x17')][_0x8a2c('0x1b')]?_[_0x8a2c('0x1c')](_0x48d922['options'][_0x8a2c('0x1b')],function(_0x5acc49){return{'model':db[_0x5acc49[_0x8a2c('0x1d')]],'as':_0x5acc49['as'],'attributes':_0x5acc49[_0x8a2c('0x19')],'include':_0x5acc49[_0x8a2c('0x1b')]?_[_0x8a2c('0x1c')](_0x5acc49[_0x8a2c('0x1b')],function(_0x305949){return{'model':db[_0x305949['model']],'as':_0x305949['as'],'attributes':_0x305949['attributes'],'include':_0x305949[_0x8a2c('0x1b')]?_[_0x8a2c('0x1c')](_0x305949[_0x8a2c('0x1b')],function(_0x292103){return{'model':db[_0x292103['model']],'as':_0x292103['as'],'attributes':_0x292103[_0x8a2c('0x19')]};}):[]};}):[]};}):[]:[]})[_0x8a2c('0x1e')](function(_0x2fc23a){logger[_0x8a2c('0xa')](_0x8a2c('0x14'),_0x48d922);logger[_0x8a2c('0xc')]('GetMemberReport',_0x48d922,JSON[_0x8a2c('0xf')](_0x2fc23a));_0x41226b(_0x2fc23a);})[_0x8a2c('0x13')](function(_0xbe6057){logger['error'](_0x8a2c('0x14'),_0xbe6057['message'],_0x48d922);_0x28d25b(_0x5d98f4[_0x8a2c('0x10')](0x1f4,_0xbe6057['message']));});});};exports['CreateMemberReport']=function(_0x42b208){var _0x2be286=this;return new Promise(function(_0x5edce2,_0x106f49){return db[_0x8a2c('0x15')][_0x8a2c('0x1f')](_0x42b208['body'],{'raw':_0x42b208[_0x8a2c('0x17')]?_0x42b208[_0x8a2c('0x17')][_0x8a2c('0x18')]===undefined?!![]:![]:!![]})[_0x8a2c('0x1e')](function(_0x21cb4a){logger['info'](_0x8a2c('0x20'),_0x42b208);logger[_0x8a2c('0xc')](_0x8a2c('0x20'),_0x42b208,JSON[_0x8a2c('0xf')](_0x21cb4a));_0x5edce2(_0x21cb4a);})[_0x8a2c('0x13')](function(_0x2f6f5c){logger['error'](_0x8a2c('0x20'),_0x2f6f5c[_0x8a2c('0x11')],_0x42b208);_0x106f49(_0x2be286['error'](0x1f4,_0x2f6f5c[_0x8a2c('0x11')]));});});};exports[_0x8a2c('0x21')]=function(_0x3f1b9b){var _0x24113a=this;return new Promise(function(_0x462ce2,_0x23a250){return db[_0x8a2c('0x15')][_0x8a2c('0x22')](_0x3f1b9b[_0x8a2c('0x23')],{'raw':_0x3f1b9b['options']?_0x3f1b9b[_0x8a2c('0x17')][_0x8a2c('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f1b9b[_0x8a2c('0x17')]?_0x3f1b9b[_0x8a2c('0x17')][_0x8a2c('0x24')]||null:null,'attributes':_0x3f1b9b[_0x8a2c('0x17')]?_0x3f1b9b['options'][_0x8a2c('0x19')]||null:null,'limit':_0x3f1b9b[_0x8a2c('0x17')]?_0x3f1b9b[_0x8a2c('0x17')]['limit']||null:null})[_0x8a2c('0x1e')](function(_0x22e5dd){logger[_0x8a2c('0xa')](_0x8a2c('0x21'),_0x3f1b9b);logger[_0x8a2c('0xc')]('UpdateMemberReport',_0x3f1b9b,JSON['stringify'](_0x22e5dd));_0x462ce2(_0x22e5dd);})[_0x8a2c('0x13')](function(_0x2b0590){logger['error'](_0x8a2c('0x21'),_0x2b0590[_0x8a2c('0x11')],_0x3f1b9b);_0x23a250(_0x24113a['error'](0x1f4,_0x2b0590['message']));});});}; \ No newline at end of file diff --git a/server/api/migration/index.js b/server/api/migration/index.js index dbf6e40..53c9e1d 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 _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 +var _0xa454=['express','Router','fs-extra','../../components/auth/service','../../config/environment','./migration.controller','get','index','exports','multer','util'];(function(_0x5e8c78,_0x55aace){var _0x118481=function(_0x2e565f){while(--_0x2e565f){_0x5e8c78['push'](_0x5e8c78['shift']());}};_0x118481(++_0x55aace);}(_0xa454,0xa3));var _0x4a45=function(_0x520c31,_0x33d5f6){_0x520c31=_0x520c31-0x0;var _0x34047e=_0xa454[_0x520c31];return _0x34047e;};'use strict';var multer=require(_0x4a45('0x0'));var util=require(_0x4a45('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x4a45('0x2'));var router=express[_0x4a45('0x3')]();var fs_extra=require(_0x4a45('0x4'));var auth=require(_0x4a45('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4a45('0x6'));var controller=require(_0x4a45('0x7'));router[_0x4a45('0x8')]('/',controller[_0x4a45('0x9')]);module[_0x4a45('0xa')]=router; \ No newline at end of file diff --git a/server/api/migration/migration.attributes.js b/server/api/migration/migration.attributes.js index 1a3cf0d..ac35223 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 _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 +var _0x3d51=['STRING','version','sequelize','exports'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x3d51,0x7a));var _0x13d5=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x3d51[_0x432682];return _0x463d05;};'use strict';var Sequelize=require(_0x13d5('0x0'));module[_0x13d5('0x1')]={'version':{'type':Sequelize[_0x13d5('0x2')],'unique':_0x13d5('0x3')}}; \ No newline at end of file diff --git a/server/api/migration/migration.controller.js b/server/api/migration/migration.controller.js index ba8c1d1..0b7e986 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 _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 +var _0x36b9=['crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','index','map','fieldName','key','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options','Migration','include','findAll','rows','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel'];(function(_0x45c3f2,_0x346d0c){var _0x4663b1=function(_0x455ecf){while(--_0x455ecf){_0x45c3f2['push'](_0x45c3f2['shift']());}};_0x4663b1(++_0x346d0c);}(_0x36b9,0xba));var _0x936b=function(_0x38d059,_0x3c6aa2){_0x38d059=_0x38d059-0x0;var _0x2aed52=_0x36b9[_0x38d059];return _0x2aed52;};'use strict';var emlformat=require(_0x936b('0x0'));var rimraf=require(_0x936b('0x1'));var zipdir=require(_0x936b('0x2'));var jsonpatch=require(_0x936b('0x3'));var rp=require(_0x936b('0x4'));var moment=require(_0x936b('0x5'));var BPromise=require(_0x936b('0x6'));var Mustache=require(_0x936b('0x7'));var util=require('util');var path=require(_0x936b('0x8'));var sox=require(_0x936b('0x9'));var csv=require(_0x936b('0xa'));var ejs=require(_0x936b('0xb'));var fs=require('fs');var fs_extra=require(_0x936b('0xc'));var _=require(_0x936b('0xd'));var squel=require(_0x936b('0xe'));var crypto=require(_0x936b('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x936b('0x10'));var toCsv=require('to-csv');var querystring=require(_0x936b('0x11'));var Papa=require(_0x936b('0x12'));var Redis=require('ioredis');var authService=require(_0x936b('0x13'));var qs=require(_0x936b('0x14'));var as=require(_0x936b('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x936b('0x16'))('api');var utils=require(_0x936b('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x936b('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2ce999,_0x1cd77e){_0x1cd77e=_0x1cd77e||0xcc;return function(_0x5ced15){if(_0x5ced15){return _0x2ce999[_0x936b('0x19')](_0x1cd77e);}return _0x2ce999[_0x936b('0x1a')](_0x1cd77e)[_0x936b('0x1b')]();};}function respondWithResult(_0x2fc821,_0x49fcd0){_0x49fcd0=_0x49fcd0||0xc8;return function(_0x585f31){if(_0x585f31){return _0x2fc821[_0x936b('0x1a')](_0x49fcd0)['json'](_0x585f31);}};}function respondWithFilteredResult(_0x526e7d,_0x551377){return function(_0x393962){if(_0x393962){var _0x5a7ed5=typeof _0x551377[_0x936b('0x1c')]===_0x936b('0x1d')&&typeof _0x551377['limit']===_0x936b('0x1d');var _0x3cfd39=_0x393962['count'];var _0x43a29c=_0x5a7ed5?0x0:_0x551377['offset'];var _0x4d83c1=_0x5a7ed5?_0x393962[_0x936b('0x1e')]:_0x551377[_0x936b('0x1c')]+_0x551377[_0x936b('0x1f')];var _0xec9a49;if(_0x4d83c1>=_0x3cfd39){_0x4d83c1=_0x3cfd39;_0xec9a49=0xc8;}else{_0xec9a49=0xce;}_0x526e7d[_0x936b('0x1a')](_0xec9a49);return _0x526e7d[_0x936b('0x20')](_0x936b('0x21'),_0x43a29c+'-'+_0x4d83c1+'/'+_0x3cfd39)['json'](_0x393962);}return null;};}function patchUpdates(_0x199da9){return function(_0x4d51e3){try{jsonpatch[_0x936b('0x22')](_0x4d51e3,_0x199da9,!![]);}catch(_0x2ee58b){return BPromise[_0x936b('0x23')](_0x2ee58b);}return _0x4d51e3[_0x936b('0x24')]();};}function saveUpdates(_0x548765,_0x2540af){return function(_0x494483){if(_0x494483){return _0x494483[_0x936b('0x25')](_0x548765)[_0x936b('0x26')](function(_0x147ae1){return _0x147ae1;});}return null;};}function removeEntity(_0x3fe0ea,_0x37d4e8){return function(_0x5d5716){if(_0x5d5716){return _0x5d5716[_0x936b('0x27')]()[_0x936b('0x26')](function(){_0x3fe0ea[_0x936b('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4441d6,_0x54d381){return function(_0xab378c){if(!_0xab378c){_0x4441d6[_0x936b('0x19')](0x194);}return _0xab378c;};}function handleError(_0x52eb95,_0x22be91){_0x22be91=_0x22be91||0x1f4;return function(_0x29f70c){logger[_0x936b('0x28')](_0x29f70c[_0x936b('0x29')]);if(_0x29f70c[_0x936b('0x2a')]){delete _0x29f70c[_0x936b('0x2a')];}_0x52eb95[_0x936b('0x1a')](_0x22be91)['send'](_0x29f70c);};}exports[_0x936b('0x2b')]=function(_0x5f2176,_0x130e61){var _0x436fe0={},_0xbee44b={},_0x2189a6={'count':0x0,'rows':[]};var _0x56898f=_[_0x936b('0x2c')](db['Migration']['rawAttributes'],function(_0x423b3d){return{'name':_0x423b3d[_0x936b('0x2d')],'type':_0x423b3d['type'][_0x936b('0x2e')]};});_0xbee44b[_0x936b('0x2f')]=_[_0x936b('0x2c')](_0x56898f,_0x936b('0x2a'));_0xbee44b[_0x936b('0x30')]=_['keys'](_0x5f2176[_0x936b('0x30')]);_0xbee44b[_0x936b('0x31')]=_[_0x936b('0x32')](_0xbee44b['model'],_0xbee44b[_0x936b('0x30')]);_0x436fe0[_0x936b('0x33')]=_[_0x936b('0x32')](_0xbee44b[_0x936b('0x2f')],qs['fields'](_0x5f2176['query'][_0x936b('0x34')]));_0x436fe0[_0x936b('0x33')]=_0x436fe0[_0x936b('0x33')][_0x936b('0x35')]?_0x436fe0[_0x936b('0x33')]:_0xbee44b[_0x936b('0x2f')];if(!_0x5f2176[_0x936b('0x30')]['hasOwnProperty'](_0x936b('0x36'))){_0x436fe0[_0x936b('0x1f')]=qs['limit'](_0x5f2176[_0x936b('0x30')][_0x936b('0x1f')]);_0x436fe0[_0x936b('0x1c')]=qs[_0x936b('0x1c')](_0x5f2176[_0x936b('0x30')][_0x936b('0x1c')]);}_0x436fe0[_0x936b('0x37')]=qs[_0x936b('0x38')](_0x5f2176[_0x936b('0x30')]['sort']);_0x436fe0[_0x936b('0x39')]=qs[_0x936b('0x31')](_['pick'](_0x5f2176[_0x936b('0x30')],_0xbee44b[_0x936b('0x31')]),_0x56898f);if(_0x5f2176[_0x936b('0x30')][_0x936b('0x3a')]){_0x436fe0[_0x936b('0x39')]=_[_0x936b('0x3b')](_0x436fe0[_0x936b('0x39')],{'$or':_[_0x936b('0x2c')](_0x56898f,function(_0xe523){if(_0xe523['type']!==_0x936b('0x3c')){var _0x3c339e={};_0x3c339e[_0xe523['name']]={'$like':'%'+_0x5f2176[_0x936b('0x30')]['filter']+'%'};return _0x3c339e;}})});}_0x436fe0=_[_0x936b('0x3b')]({},_0x436fe0,_0x5f2176[_0x936b('0x3d')]);var _0x514776={'where':_0x436fe0[_0x936b('0x39')]};return db[_0x936b('0x3e')][_0x936b('0x1e')](_0x514776)[_0x936b('0x26')](function(_0x21042e){_0x2189a6[_0x936b('0x1e')]=_0x21042e;if(_0x5f2176[_0x936b('0x30')]['includeAll']){_0x436fe0[_0x936b('0x3f')]=[{'all':!![]}];}return db[_0x936b('0x3e')][_0x936b('0x40')](_0x436fe0);})[_0x936b('0x26')](function(_0x44f37a){_0x2189a6[_0x936b('0x41')]=_0x44f37a;return _0x2189a6;})[_0x936b('0x26')](respondWithFilteredResult(_0x130e61,_0x436fe0))[_0x936b('0x42')](handleError(_0x130e61,null));}; \ No newline at end of file diff --git a/server/api/migration/migration.model.js b/server/api/migration/migration.model.js index eaaf3ba..431038c 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 _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 +var _0x0a1d=['path','rimraf','../../config/environment','./migration.attributes','define','Migration','migrations','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x1c2a85,_0xdc4c86){var _0x410074=function(_0x3218c7){while(--_0x3218c7){_0x1c2a85['push'](_0x1c2a85['shift']());}};_0x410074(++_0xdc4c86);}(_0x0a1d,0x96));var _0xd0a1=function(_0x528bd9,_0x423058){_0x528bd9=_0x528bd9-0x0;var _0xc3b56d=_0x0a1d[_0x528bd9];return _0xc3b56d;};'use strict';var _=require('lodash');var util=require(_0xd0a1('0x0'));var logger=require(_0xd0a1('0x1'))(_0xd0a1('0x2'));var moment=require(_0xd0a1('0x3'));var BPromise=require(_0xd0a1('0x4'));var rp=require(_0xd0a1('0x5'));var fs=require('fs');var path=require(_0xd0a1('0x6'));var rimraf=require(_0xd0a1('0x7'));var config=require(_0xd0a1('0x8'));var attributes=require(_0xd0a1('0x9'));module['exports']=function(_0x3d03b0,_0x4f4627){return _0x3d03b0[_0xd0a1('0xa')](_0xd0a1('0xb'),attributes,{'tableName':_0xd0a1('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 85d36be..cebf17c 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 _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 +var _0x4e61=['result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','error','message','Migration,\x20%s,\x20%s'];(function(_0x38aa50,_0x2e1973){var _0x53abb8=function(_0x5b0013){while(--_0x5b0013){_0x38aa50['push'](_0x38aa50['shift']());}};_0x53abb8(++_0x2e1973);}(_0x4e61,0x8c));var _0x14e6=function(_0x29df9a,_0x42aff3){_0x29df9a=_0x29df9a-0x0;var _0x3a8e96=_0x4e61[_0x29df9a];return _0x3a8e96;};'use strict';var _=require(_0x14e6('0x0'));var util=require(_0x14e6('0x1'));var moment=require(_0x14e6('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x14e6('0x3'));var db=require(_0x14e6('0x4'))['db'];var utils=require(_0x14e6('0x5'));var logger=require(_0x14e6('0x6'))(_0x14e6('0x7'));var config=require(_0x14e6('0x8'));var jayson=require(_0x14e6('0x9'));var client=jayson[_0x14e6('0xa')][_0x14e6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x9f9c31,_0x2a5bc1,_0x91ca48){return new BPromise(function(_0x34b4eb,_0x1200e5){return client[_0x14e6('0xc')](_0x9f9c31,_0x91ca48)[_0x14e6('0xd')](function(_0x17eeed){logger[_0x14e6('0xe')]('Migration,\x20%s,\x20%s',_0x2a5bc1,_0x14e6('0xf'));logger[_0x14e6('0x10')](_0x14e6('0x11'),_0x2a5bc1,_0x14e6('0xf'),JSON['stringify'](_0x17eeed));if(_0x17eeed['error']){if(_0x17eeed['error']['code']===0x1f4){logger[_0x14e6('0x12')]('Migration,\x20%s,\x20%s',_0x2a5bc1,_0x17eeed['error'][_0x14e6('0x13')]);return _0x1200e5(_0x17eeed[_0x14e6('0x12')][_0x14e6('0x13')]);}logger['error'](_0x14e6('0x14'),_0x2a5bc1,_0x17eeed[_0x14e6('0x12')][_0x14e6('0x13')]);return _0x34b4eb(_0x17eeed[_0x14e6('0x12')][_0x14e6('0x13')]);}else{logger['info'](_0x14e6('0x14'),_0x2a5bc1,_0x14e6('0xf'));_0x34b4eb(_0x17eeed[_0x14e6('0x15')][_0x14e6('0x13')]);}})[_0x14e6('0x16')](function(_0x4d6d42){logger[_0x14e6('0x12')]('Migration,\x20%s,\x20%s',_0x2a5bc1,_0x4d6d42);_0x1200e5(_0x4d6d42);});});} \ No newline at end of file diff --git a/server/api/network/index.js b/server/api/network/index.js index 40b3f37..27fe847 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 _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 +var _0xd7be=['isAuthenticated','index','/:id','show','post','create','put','update','delete','exports','multer','util','path','fs-extra','../../components/interaction/service','../../config/environment','get'];(function(_0x4359d0,_0x33a430){var _0x22c591=function(_0x5df74c){while(--_0x5df74c){_0x4359d0['push'](_0x4359d0['shift']());}};_0x22c591(++_0x33a430);}(_0xd7be,0xf8));var _0xed7b=function(_0x5c5eb6,_0x4965aa){_0x5c5eb6=_0x5c5eb6-0x0;var _0x27c604=_0xd7be[_0x5c5eb6];return _0x27c604;};'use strict';var multer=require(_0xed7b('0x0'));var util=require(_0xed7b('0x1'));var path=require(_0xed7b('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xed7b('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xed7b('0x4'));var config=require(_0xed7b('0x5'));var controller=require('./network.controller');router[_0xed7b('0x6')]('/',auth[_0xed7b('0x7')](),controller[_0xed7b('0x8')]);router[_0xed7b('0x6')](_0xed7b('0x9'),auth[_0xed7b('0x7')](),controller[_0xed7b('0xa')]);router[_0xed7b('0xb')]('/',auth[_0xed7b('0x7')](),controller[_0xed7b('0xc')]);router[_0xed7b('0xd')](_0xed7b('0x9'),auth[_0xed7b('0x7')](),controller[_0xed7b('0xe')]);router[_0xed7b('0xf')](_0xed7b('0x9'),auth[_0xed7b('0x7')](),controller['destroy']);module[_0xed7b('0x10')]=router; \ No newline at end of file diff --git a/server/api/network/network.attributes.js b/server/api/network/network.attributes.js index 374f954..6a00f49 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 _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 +var _0x4e9e=['STRING','sequelize','ENUM','localnet','externip','stun'];(function(_0x18e1fa,_0x5db350){var _0x1fac5d=function(_0x4a312a){while(--_0x4a312a){_0x18e1fa['push'](_0x18e1fa['shift']());}};_0x1fac5d(++_0x5db350);}(_0x4e9e,0x1c3));var _0xe4e9=function(_0x471ac2,_0x3f459e){_0x471ac2=_0x471ac2-0x0;var _0x46eb4c=_0x4e9e[_0x471ac2];return _0x46eb4c;};'use strict';var Sequelize=require(_0xe4e9('0x0'));module['exports']={'type':{'type':Sequelize[_0xe4e9('0x1')](_0xe4e9('0x2'),_0xe4e9('0x3'),_0xe4e9('0x4'),'turn')},'value':{'type':Sequelize[_0xe4e9('0x5')]},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xe4e9('0x5')]}}; \ No newline at end of file diff --git a/server/api/network/network.controller.js b/server/api/network/network.controller.js index 9cc9373..2eb5924 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 _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 +var _0xd7f9=['Network','rows','show','params','include','find','create','transaction','body','findAll','STUN','root','server/files/templates/stun_multiple.ejs','utf8','render','writeFileSync','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','readFileSync','join','server/files/templates/turn_multiple.ejs','/etc/asterisk/turn_xcally.conf','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','chan_sip.so','sequelize','toUpperCase','TURN','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','jayson/promise','client','request','Network,\x20%s,\x20%s','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','destroy','sendStatus','stack','name','send','index','rawAttributes','fieldName','type','key','map','keys','query','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','VIRTUAL','merge','options','includeAll'];(function(_0x16daa2,_0x1e33b0){var _0x21a13=function(_0x4b7117){while(--_0x4b7117){_0x16daa2['push'](_0x16daa2['shift']());}};_0x21a13(++_0x1e33b0);}(_0xd7f9,0x8b));var _0x9d7f=function(_0x5e77db,_0x356d1c){_0x5e77db=_0x5e77db-0x0;var _0x34b675=_0xd7f9[_0x5e77db];return _0x34b675;};'use strict';var emlformat=require(_0x9d7f('0x0'));var rimraf=require(_0x9d7f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9d7f('0x2'));var rp=require(_0x9d7f('0x3'));var moment=require(_0x9d7f('0x4'));var BPromise=require(_0x9d7f('0x5'));var Mustache=require(_0x9d7f('0x6'));var util=require(_0x9d7f('0x7'));var path=require(_0x9d7f('0x8'));var sox=require(_0x9d7f('0x9'));var csv=require(_0x9d7f('0xa'));var ejs=require(_0x9d7f('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9d7f('0xc'));var squel=require('squel');var crypto=require(_0x9d7f('0xd'));var jsforce=require(_0x9d7f('0xe'));var deskjs=require(_0x9d7f('0xf'));var toCsv=require(_0x9d7f('0xa'));var querystring=require(_0x9d7f('0x10'));var Papa=require(_0x9d7f('0x11'));var Redis=require(_0x9d7f('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x9d7f('0x13'));var as=require(_0x9d7f('0x14'));var hardwareService=require(_0x9d7f('0x15'));var logger=require(_0x9d7f('0x16'))(_0x9d7f('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var jayson=require(_0x9d7f('0x18'));var client=jayson[_0x9d7f('0x19')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2a31fd,_0x23fcef,_0x335376,_0x13d9a8){return new BPromise(function(_0x577e46,_0x1fd831){var _0x1c187b=_0x13d9a8||client;return _0x1c187b[_0x9d7f('0x1a')](_0x2a31fd,_0x335376)['then'](function(_0x40dd51){logger['info'](_0x9d7f('0x1b'),_0x23fcef,_0x9d7f('0x1c'));logger[_0x9d7f('0x1d')](_0x9d7f('0x1e'),_0x23fcef,'request\x20sent',JSON[_0x9d7f('0x1f')](_0x40dd51));if(_0x40dd51[_0x9d7f('0x20')]){if(_0x40dd51['error']['code']===0x1f4){logger[_0x9d7f('0x20')](_0x9d7f('0x1b'),_0x23fcef,_0x40dd51['error'][_0x9d7f('0x21')]);return _0x1fd831(_0x40dd51['error']['message']);}logger[_0x9d7f('0x20')](_0x9d7f('0x1b'),_0x23fcef,_0x40dd51[_0x9d7f('0x20')][_0x9d7f('0x21')]);return _0x577e46(_0x40dd51[_0x9d7f('0x20')][_0x9d7f('0x21')]);}else{logger[_0x9d7f('0x22')](_0x9d7f('0x1b'),_0x23fcef,_0x9d7f('0x1c'));_0x577e46(_0x40dd51[_0x9d7f('0x23')][_0x9d7f('0x21')]);}})[_0x9d7f('0x24')](function(_0x579a4c){logger[_0x9d7f('0x20')](_0x9d7f('0x1b'),_0x23fcef,_0x579a4c);_0x1fd831(_0x579a4c);});});}function respondWithStatusCode(_0x6afa55,_0x4a453f){_0x4a453f=_0x4a453f||0xcc;return function(_0x50ddef){if(_0x50ddef){return _0x6afa55['sendStatus'](_0x4a453f);}return _0x6afa55['status'](_0x4a453f)['end']();};}function respondWithResult(_0x31c41c,_0x48e9e5){_0x48e9e5=_0x48e9e5||0xc8;return function(_0x4deb35){if(_0x4deb35){return _0x31c41c[_0x9d7f('0x25')](_0x48e9e5)[_0x9d7f('0x26')](_0x4deb35);}};}function respondWithFilteredResult(_0x3d8d26,_0x389d73){return function(_0x38e508){if(_0x38e508){var _0x4f956c=typeof _0x389d73[_0x9d7f('0x27')]===_0x9d7f('0x28')&&typeof _0x389d73[_0x9d7f('0x29')]===_0x9d7f('0x28');var _0x2efdf9=_0x38e508['count'];var _0x2a4d0a=_0x4f956c?0x0:_0x389d73[_0x9d7f('0x27')];var _0x3ffaf2=_0x4f956c?_0x38e508[_0x9d7f('0x2a')]:_0x389d73[_0x9d7f('0x27')]+_0x389d73[_0x9d7f('0x29')];var _0x27804e;if(_0x3ffaf2>=_0x2efdf9){_0x3ffaf2=_0x2efdf9;_0x27804e=0xc8;}else{_0x27804e=0xce;}_0x3d8d26[_0x9d7f('0x25')](_0x27804e);return _0x3d8d26['set'](_0x9d7f('0x2b'),_0x2a4d0a+'-'+_0x3ffaf2+'/'+_0x2efdf9)['json'](_0x38e508);}return null;};}function patchUpdates(_0x4dbb67){return function(_0x221f40){try{jsonpatch[_0x9d7f('0x2c')](_0x221f40,_0x4dbb67,!![]);}catch(_0x2827ed){return BPromise[_0x9d7f('0x2d')](_0x2827ed);}return _0x221f40['save']();};}function saveUpdates(_0x403486,_0x5207d2){return function(_0x4d2a33){if(_0x4d2a33){return _0x4d2a33[_0x9d7f('0x2e')](_0x403486)[_0x9d7f('0x2f')](function(_0x27b003){return _0x27b003;});}return null;};}function removeEntity(_0x2fe93a,_0x3165fe){return function(_0x3b45c0){if(_0x3b45c0){return _0x3b45c0[_0x9d7f('0x30')]()[_0x9d7f('0x2f')](function(){_0x2fe93a[_0x9d7f('0x25')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5171a5,_0x14eb89){return function(_0x4eda3a){if(!_0x4eda3a){_0x5171a5[_0x9d7f('0x31')](0x194);}return _0x4eda3a;};}function handleError(_0x104540,_0x1ab470){_0x1ab470=_0x1ab470||0x1f4;return function(_0x375223){logger['error'](_0x375223[_0x9d7f('0x32')]);if(_0x375223[_0x9d7f('0x33')]){delete _0x375223[_0x9d7f('0x33')];}_0x104540['status'](_0x1ab470)[_0x9d7f('0x34')](_0x375223);};}exports[_0x9d7f('0x35')]=function(_0x21d8ec,_0x572e9c){var _0x467335={},_0x20cb5c={},_0x4b5e10={'count':0x0,'rows':[]};var _0x44f4ab=_['map'](db['Network'][_0x9d7f('0x36')],function(_0x3fcae6){return{'name':_0x3fcae6[_0x9d7f('0x37')],'type':_0x3fcae6[_0x9d7f('0x38')][_0x9d7f('0x39')]};});_0x20cb5c['model']=_[_0x9d7f('0x3a')](_0x44f4ab,'name');_0x20cb5c['query']=_[_0x9d7f('0x3b')](_0x21d8ec[_0x9d7f('0x3c')]);_0x20cb5c['filters']=_[_0x9d7f('0x3d')](_0x20cb5c['model'],_0x20cb5c[_0x9d7f('0x3c')]);_0x467335['attributes']=_[_0x9d7f('0x3d')](_0x20cb5c[_0x9d7f('0x3e')],qs[_0x9d7f('0x3f')](_0x21d8ec[_0x9d7f('0x3c')]['fields']));_0x467335[_0x9d7f('0x40')]=_0x467335['attributes'][_0x9d7f('0x41')]?_0x467335[_0x9d7f('0x40')]:_0x20cb5c['model'];if(!_0x21d8ec['query'][_0x9d7f('0x42')](_0x9d7f('0x43'))){_0x467335[_0x9d7f('0x29')]=qs[_0x9d7f('0x29')](_0x21d8ec['query']['limit']);_0x467335['offset']=qs[_0x9d7f('0x27')](_0x21d8ec[_0x9d7f('0x3c')]['offset']);}_0x467335[_0x9d7f('0x44')]=qs[_0x9d7f('0x45')](_0x21d8ec[_0x9d7f('0x3c')][_0x9d7f('0x45')]);_0x467335[_0x9d7f('0x46')]=qs[_0x9d7f('0x47')](_['pick'](_0x21d8ec[_0x9d7f('0x3c')],_0x20cb5c[_0x9d7f('0x47')]),_0x44f4ab);if(_0x21d8ec[_0x9d7f('0x3c')][_0x9d7f('0x48')]){_0x467335[_0x9d7f('0x46')]=_['merge'](_0x467335[_0x9d7f('0x46')],{'$or':_[_0x9d7f('0x3a')](_0x44f4ab,function(_0x203f26){if(_0x203f26[_0x9d7f('0x38')]!==_0x9d7f('0x49')){var _0x5467c3={};_0x5467c3[_0x203f26[_0x9d7f('0x33')]]={'$like':'%'+_0x21d8ec[_0x9d7f('0x3c')][_0x9d7f('0x48')]+'%'};return _0x5467c3;}})});}_0x467335=_[_0x9d7f('0x4a')]({},_0x467335,_0x21d8ec[_0x9d7f('0x4b')]);var _0x3ea268={'where':_0x467335[_0x9d7f('0x46')]};return db['Network'][_0x9d7f('0x2a')](_0x3ea268)[_0x9d7f('0x2f')](function(_0x261bb8){_0x4b5e10[_0x9d7f('0x2a')]=_0x261bb8;if(_0x21d8ec['query'][_0x9d7f('0x4c')]){_0x467335['include']=[{'all':!![]}];}return db[_0x9d7f('0x4d')]['findAll'](_0x467335);})[_0x9d7f('0x2f')](function(_0x277f53){_0x4b5e10[_0x9d7f('0x4e')]=_0x277f53;return _0x4b5e10;})['then'](respondWithFilteredResult(_0x572e9c,_0x467335))[_0x9d7f('0x24')](handleError(_0x572e9c,null));};exports[_0x9d7f('0x4f')]=function(_0x26741d,_0x265990){var _0x283af2={'raw':!![],'where':{'id':_0x26741d[_0x9d7f('0x50')]['id']}},_0xf01cb9={};_0xf01cb9[_0x9d7f('0x3e')]=_[_0x9d7f('0x3b')](db['Network']['rawAttributes']);_0xf01cb9[_0x9d7f('0x3c')]=_[_0x9d7f('0x3b')](_0x26741d[_0x9d7f('0x3c')]);_0xf01cb9[_0x9d7f('0x47')]=_[_0x9d7f('0x3d')](_0xf01cb9['model'],_0xf01cb9[_0x9d7f('0x3c')]);_0x283af2[_0x9d7f('0x40')]=_[_0x9d7f('0x3d')](_0xf01cb9['model'],qs['fields'](_0x26741d[_0x9d7f('0x3c')][_0x9d7f('0x3f')]));_0x283af2[_0x9d7f('0x40')]=_0x283af2[_0x9d7f('0x40')][_0x9d7f('0x41')]?_0x283af2['attributes']:_0xf01cb9[_0x9d7f('0x3e')];if(_0x26741d[_0x9d7f('0x3c')][_0x9d7f('0x4c')]){_0x283af2[_0x9d7f('0x51')]=[{'all':!![]}];}_0x283af2=_['merge']({},_0x283af2,_0x26741d[_0x9d7f('0x4b')]);return db[_0x9d7f('0x4d')][_0x9d7f('0x52')](_0x283af2)[_0x9d7f('0x2f')](handleEntityNotFound(_0x265990,null))[_0x9d7f('0x2f')](respondWithResult(_0x265990,null))[_0x9d7f('0x24')](handleError(_0x265990,null));};exports[_0x9d7f('0x53')]=function(_0x387b89,_0x179196,_0x3d4901){var _0x2bc30c;return db['sequelize'][_0x9d7f('0x54')](function(_0x452856){return db[_0x9d7f('0x4d')][_0x9d7f('0x53')](_0x387b89[_0x9d7f('0x55')],{'raw':!![]})[_0x9d7f('0x2f')](function(_0x5ce150){_0x2bc30c=_0x5ce150;return db['Network'][_0x9d7f('0x56')]({'where':{'type':_0x387b89['body']['type']},'raw':!![]});})['then'](function(_0x1b346f){if(_0x2bc30c['type']['toUpperCase']()==_0x9d7f('0x57')){var _0x543242=fs['readFileSync'](path['join'](config[_0x9d7f('0x58')],_0x9d7f('0x59')),_0x9d7f('0x5a'));var _0x37ebc6=ejs[_0x9d7f('0x5b')](_0x543242,{'networks':_0x1b346f||[]});fs[_0x9d7f('0x5c')](_0x9d7f('0x5d'),_0x37ebc6);return respondWithRpcPromise(_0x9d7f('0x5e'),'create',{'module':_0x9d7f('0x5f')});}else if(_0x2bc30c[_0x9d7f('0x38')]['toUpperCase']()=='TURN'){var _0x5347a3=fs[_0x9d7f('0x60')](path[_0x9d7f('0x61')](config['root'],_0x9d7f('0x62')),_0x9d7f('0x5a'));var _0x522a38=ejs[_0x9d7f('0x5b')](_0x5347a3,{'networks':_0x1b346f||[]});fs['writeFileSync'](_0x9d7f('0x63'),_0x522a38);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x53'),{'module':_0x9d7f('0x5f')});}else{var _0x2b80db=fs[_0x9d7f('0x60')](path[_0x9d7f('0x61')](config['root'],_0x9d7f('0x64')),_0x9d7f('0x5a'));var _0x598534=ejs['render'](_0x2b80db,{'networks':_0x1b346f||[]});fs[_0x9d7f('0x5c')](util[_0x9d7f('0x65')](_0x9d7f('0x66'),_0x387b89[_0x9d7f('0x55')][_0x9d7f('0x38')][_0x9d7f('0x67')]()),_0x598534);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x53'),{'module':_0x9d7f('0x68')});}return null;})[_0x9d7f('0x2f')](function(){return _0x2bc30c;});})['then'](respondWithResult(_0x179196,0xc9))['catch'](handleError(_0x179196,null));};exports[_0x9d7f('0x2e')]=function(_0x2cbe45,_0x38e219,_0x199156){var _0x53863c;return db[_0x9d7f('0x69')]['transaction'](function(_0x3e9335){return db[_0x9d7f('0x4d')][_0x9d7f('0x52')]({'where':{'id':_0x2cbe45[_0x9d7f('0x50')]['id']}})[_0x9d7f('0x2f')](handleEntityNotFound(_0x38e219,null))[_0x9d7f('0x2f')](saveUpdates(_0x2cbe45['body'],null))['then'](function(_0x2a5a82){if(_0x2a5a82){_0x53863c=_0x2a5a82;return db[_0x9d7f('0x4d')]['findAll']({'where':{'type':_0x53863c[_0x9d7f('0x38')]},'raw':!![]});}return null;})['then'](function(_0xb047c){if(_0x53863c['type'][_0x9d7f('0x6a')]()=='STUN'){var _0x4495d8=fs[_0x9d7f('0x60')](path['join'](config[_0x9d7f('0x58')],_0x9d7f('0x59')),'utf8');var _0x3bd330=ejs[_0x9d7f('0x5b')](_0x4495d8,{'networks':_0xb047c||[]});fs['writeFileSync'](_0x9d7f('0x5d'),_0x3bd330);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x2e'),{'module':_0x9d7f('0x5f')});}else if(_0x53863c[_0x9d7f('0x38')][_0x9d7f('0x6a')]()==_0x9d7f('0x6b')){var _0x41227f=fs[_0x9d7f('0x60')](path[_0x9d7f('0x61')](config[_0x9d7f('0x58')],_0x9d7f('0x62')),_0x9d7f('0x5a'));var _0x194ec1=ejs[_0x9d7f('0x5b')](_0x41227f,{'networks':_0xb047c||[]});fs[_0x9d7f('0x5c')](_0x9d7f('0x63'),_0x194ec1);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x2e'),{'module':_0x9d7f('0x5f')});}else{var _0x2749f6=fs[_0x9d7f('0x60')](path[_0x9d7f('0x61')](config['root'],'server/files/templates/network.ejs'),'utf8');var _0x2718a4=ejs[_0x9d7f('0x5b')](_0x2749f6,{'networks':_0xb047c||[]});fs[_0x9d7f('0x5c')](util[_0x9d7f('0x65')](_0x9d7f('0x66'),_0x2cbe45[_0x9d7f('0x55')][_0x9d7f('0x38')][_0x9d7f('0x67')]()),_0x2718a4);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x2e'),{'module':'chan_sip.so'});}return null;})[_0x9d7f('0x2f')](function(_0x382f56){if(_0x382f56){return _0x53863c;}return null;});})[_0x9d7f('0x2f')](respondWithResult(_0x38e219,null))[_0x9d7f('0x24')](handleError(_0x38e219,null));};exports['destroy']=function(_0x4131b5,_0x2133ff,_0x4de13f){var _0x19ed4a;return db[_0x9d7f('0x4d')][_0x9d7f('0x52')]({'where':{'id':_0x4131b5[_0x9d7f('0x50')]['id']}})[_0x9d7f('0x2f')](function(_0x5e91cf){_0x19ed4a=_0x5e91cf;return _0x5e91cf;})[_0x9d7f('0x2f')](handleEntityNotFound(_0x2133ff,null))[_0x9d7f('0x2f')](removeEntity(_0x2133ff,null))['then'](function(){if(_0x19ed4a){return db['Network']['findAll']({'where':{'type':_0x19ed4a[_0x9d7f('0x38')]},'raw':!![]});}})['then'](function(_0x2c4c41){if(_0x19ed4a[_0x9d7f('0x38')]['toUpperCase']()==_0x9d7f('0x57')){var _0x541277=fs[_0x9d7f('0x60')](path[_0x9d7f('0x61')](config[_0x9d7f('0x58')],_0x9d7f('0x59')),'utf8');var _0x4aa4c2=ejs[_0x9d7f('0x5b')](_0x541277,{'networks':_0x2c4c41||[]});fs[_0x9d7f('0x5c')](_0x9d7f('0x5d'),_0x4aa4c2);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x30'),{'module':_0x9d7f('0x5f')});}else if(_0x19ed4a['type'][_0x9d7f('0x6a')]()==_0x9d7f('0x6b')){var _0x13724f=fs['readFileSync'](path['join'](config[_0x9d7f('0x58')],_0x9d7f('0x62')),'utf8');var _0x27901b=ejs['render'](_0x13724f,{'networks':_0x2c4c41||[]});fs[_0x9d7f('0x5c')](_0x9d7f('0x63'),_0x27901b);return respondWithRpcPromise(_0x9d7f('0x5e'),_0x9d7f('0x30'),{'module':_0x9d7f('0x5f')});}else{var _0x5ed339=fs['readFileSync'](path[_0x9d7f('0x61')](config[_0x9d7f('0x58')],'server/files/templates/network.ejs'),_0x9d7f('0x5a'));var _0x23ba7a=ejs['render'](_0x5ed339,{'networks':_0x2c4c41||[]});fs[_0x9d7f('0x5c')](util[_0x9d7f('0x65')]('/etc/asterisk/sip_xcally_%s.conf',_0x4131b5[_0x9d7f('0x55')][_0x9d7f('0x38')][_0x9d7f('0x67')]()),_0x23ba7a);return respondWithRpcPromise(_0x9d7f('0x5e'),'destroy',{'module':_0x9d7f('0x68')});}return null;})[_0x9d7f('0x24')](handleError(_0x2133ff,null));}; \ No newline at end of file diff --git a/server/api/network/network.model.js b/server/api/network/network.model.js index fff2458..cf6b99d 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 _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 +var _0xa25c=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./network.attributes','Network','network'];(function(_0xc6476c,_0x1cddbc){var _0x405c43=function(_0x1276c5){while(--_0x1276c5){_0xc6476c['push'](_0xc6476c['shift']());}};_0x405c43(++_0x1cddbc);}(_0xa25c,0x13f));var _0xca25=function(_0x267bc0,_0x6f9283){_0x267bc0=_0x267bc0-0x0;var _0x2734ab=_0xa25c[_0x267bc0];return _0x2734ab;};'use strict';var _=require('lodash');var util=require(_0xca25('0x0'));var logger=require(_0xca25('0x1'))(_0xca25('0x2'));var moment=require(_0xca25('0x3'));var BPromise=require(_0xca25('0x4'));var rp=require(_0xca25('0x5'));var fs=require('fs');var path=require(_0xca25('0x6'));var rimraf=require(_0xca25('0x7'));var config=require('../../config/environment');var attributes=require(_0xca25('0x8'));module['exports']=function(_0x4ec046,_0xae1996){return _0x4ec046['define'](_0xca25('0x9'),attributes,{'tableName':_0xca25('0xa'),'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 e6381ec..5c14aec 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 _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 +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(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x7a54,0x106));var _0x47a5=function(_0x5b8383,_0x23cf21){_0x5b8383=_0x5b8383-0x0;var _0x13f780=_0x7a54[_0x5b8383];return _0x13f780;};'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 f5e6a53..21d98cb 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 _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 +var _0xabc3=['addAgents','/:id/send','update','delete','destroy','removeDispositions','removeAnswers','exports','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelAccount.controller','isAuthenticated','get','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/applications','getApplications','getInteractions','getAgents','post','create','addAnswer','/:id/notify','notify','addApplications','/:id/users'];(function(_0x1bb07c,_0x18ef63){var _0x15f1d4=function(_0x5b25e0){while(--_0x5b25e0){_0x1bb07c['push'](_0x1bb07c['shift']());}};_0x15f1d4(++_0x18ef63);}(_0xabc3,0x1dc));var _0x3abc=function(_0x37dea8,_0x470221){_0x37dea8=_0x37dea8-0x0;var _0x230113=_0xabc3[_0x37dea8];return _0x230113;};'use strict';var multer=require(_0x3abc('0x0'));var util=require(_0x3abc('0x1'));var path=require('path');var timeout=require(_0x3abc('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x3abc('0x3'));var interaction=require(_0x3abc('0x4'));var config=require(_0x3abc('0x5'));var controller=require(_0x3abc('0x6'));router['get']('/',auth[_0x3abc('0x7')](),controller['index']);router[_0x3abc('0x8')](_0x3abc('0x9'),auth['isAuthenticated'](),controller[_0x3abc('0xa')]);router['get'](_0x3abc('0xb'),auth['isAuthenticated'](),controller[_0x3abc('0xc')]);router[_0x3abc('0x8')](_0x3abc('0xd'),auth['isAuthenticated'](),controller[_0x3abc('0xe')]);router[_0x3abc('0x8')](_0x3abc('0xf'),auth[_0x3abc('0x7')](),controller[_0x3abc('0x10')]);router['get'](_0x3abc('0x11'),auth['isAuthenticated'](),controller[_0x3abc('0x12')]);router[_0x3abc('0x8')]('/:id/interactions',auth[_0x3abc('0x7')](),controller[_0x3abc('0x13')]);router[_0x3abc('0x8')]('/:id/users',auth[_0x3abc('0x7')](),controller[_0x3abc('0x14')]);router[_0x3abc('0x15')]('/',auth['isAuthenticated'](),controller[_0x3abc('0x16')]);router[_0x3abc('0x15')](_0x3abc('0xd'),auth['isAuthenticated'](),controller['addDisposition']);router[_0x3abc('0x15')](_0x3abc('0xf'),auth['isAuthenticated'](),controller[_0x3abc('0x17')]);router[_0x3abc('0x15')](_0x3abc('0x18'),controller[_0x3abc('0x19')]);router[_0x3abc('0x15')](_0x3abc('0x11'),auth[_0x3abc('0x7')](),controller[_0x3abc('0x1a')]);router[_0x3abc('0x15')](_0x3abc('0x1b'),auth[_0x3abc('0x7')](),controller[_0x3abc('0x1c')]);router['post'](_0x3abc('0x1d'),auth[_0x3abc('0x7')](),controller['send']);router['put'](_0x3abc('0xb'),auth['isAuthenticated'](),controller[_0x3abc('0x1e')]);router[_0x3abc('0x1f')](_0x3abc('0xb'),auth['isAuthenticated'](),controller[_0x3abc('0x20')]);router[_0x3abc('0x1f')]('/:id/dispositions',auth[_0x3abc('0x7')](),controller[_0x3abc('0x21')]);router[_0x3abc('0x1f')](_0x3abc('0xf'),auth[_0x3abc('0x7')](),controller[_0x3abc('0x22')]);router['delete']('/:id/users',auth[_0x3abc('0x7')](),controller['removeAgents']);module[_0x3abc('0x23')]=router; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.attributes.js b/server/api/openchannelAccount/openchannelAccount.attributes.js index 3d16764..f042413 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 _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 +var _0x0df6=['randomstring','name','STRING','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition'];(function(_0x415f3a,_0x2c01a8){var _0x38ad7d=function(_0x256e81){while(--_0x256e81){_0x415f3a['push'](_0x415f3a['shift']());}};_0x38ad7d(++_0x2c01a8);}(_0x0df6,0xaa));var _0x60df=function(_0x2401ba,_0x1dc903){_0x2401ba=_0x2401ba-0x0;var _0x28d6a5=_0x0df6[_0x2401ba];return _0x28d6a5;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x60df('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x60df('0x1'),'allowNull':![]},'description':{'type':Sequelize[_0x60df('0x2')]},'token':{'type':Sequelize[_0x60df('0x2')],'defaultValue':function(){return rs['generate']();}},'replyUri':{'type':Sequelize['STRING'],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x60df('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x60df('0x3');}},'notificationSound':{'type':Sequelize[_0x60df('0x4')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x60df('0x4')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x60df('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x60df('0x2')]},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x60df('0x4')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x60df('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x60df('0x5')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x60df('0x6'),'set':function(_0x51c5c2){if(!_0x51c5c2)this[_0x60df('0x7')](_0x60df('0x8'),null);this[_0x60df('0x7')](_0x60df('0x9'),_0x51c5c2);}}}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.controller.js b/server/api/openchannelAccount/openchannelAccount.controller.js index 008689d..479c619 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 _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 +var _0x87d6=['Contact','Owner','fullname','Tag','Tags','color','tag','addAgents','omit','emit','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','Messages','dataValues','push','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./openchannelAccount.socket','register','jayson/promise','client','http','request','then','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','update','destroy','OpenchannelAccounts','stack','name','send','index','Pause','mandatoryDispositionPause','map','OpenchannelAccount','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','params','rawAttributes','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','OpenchannelAccountId','findOne','Disposition','include','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','nolimit','removeAnswers','notify','openchannel','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','isNil','from','from\x20is\x20mandatory','ValidationError','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','DESC','Applications','List','account','applications','list','orderBy','priority','asc','contact','lastName','threadId','OpenchannelInteraction','externalUrl','spread','messageId','interaction','created','autoclose','close','*,*,*,*','OpenchannelMessage','AttachmentId','User','unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','OpenchannelApplication','findAndCountAll','getApplications','getInteractions'];(function(_0x4e3e3b,_0x19bbfd){var _0x7f3f27=function(_0x3b854f){while(--_0x3b854f){_0x4e3e3b['push'](_0x4e3e3b['shift']());}};_0x7f3f27(++_0x19bbfd);}(_0x87d6,0xce));var _0x687d=function(_0x54de5d,_0x1f8b26){_0x54de5d=_0x54de5d-0x0;var _0x1b349e=_0x87d6[_0x54de5d];return _0x1b349e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x687d('0x0'));var zipdir=require(_0x687d('0x1'));var jsonpatch=require(_0x687d('0x2'));var rp=require('request-promise');var moment=require(_0x687d('0x3'));var BPromise=require(_0x687d('0x4'));var Mustache=require(_0x687d('0x5'));var util=require(_0x687d('0x6'));var path=require(_0x687d('0x7'));var sox=require(_0x687d('0x8'));var csv=require('to-csv');var ejs=require(_0x687d('0x9'));var fs=require('fs');var fs_extra=require(_0x687d('0xa'));var _=require(_0x687d('0xb'));var squel=require(_0x687d('0xc'));var crypto=require(_0x687d('0xd'));var jsforce=require(_0x687d('0xe'));var deskjs=require(_0x687d('0xf'));var toCsv=require(_0x687d('0x10'));var querystring=require(_0x687d('0x11'));var Papa=require('papaparse');var Redis=require(_0x687d('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x687d('0x13'));var as=require(_0x687d('0x14'));var hardwareService=require(_0x687d('0x15'));var logger=require(_0x687d('0x16'))('api');var utils=require(_0x687d('0x17'));var config=require(_0x687d('0x18'));var licenseUtil=require(_0x687d('0x19'));var db=require(_0x687d('0x1a'))['db'];config[_0x687d('0x1b')]=_[_0x687d('0x1c')](config[_0x687d('0x1b')],{'host':_0x687d('0x1d'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x687d('0x1b')]));require(_0x687d('0x1e'))[_0x687d('0x1f')](socket);var jayson=require(_0x687d('0x20'));var client=jayson[_0x687d('0x21')][_0x687d('0x22')]({'port':0x232c});var client9002=jayson[_0x687d('0x21')][_0x687d('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x6b333e,_0x4ad46e,_0x29041c,_0x59d008){return new BPromise(function(_0x384795,_0x1c0345){var _0x4ee265=_0x59d008||client;return _0x4ee265[_0x687d('0x23')](_0x6b333e,_0x29041c)[_0x687d('0x24')](function(_0x4a85ea){logger[_0x687d('0x25')](_0x687d('0x26'),_0x4ad46e,_0x687d('0x27'));logger[_0x687d('0x28')](_0x687d('0x29'),_0x4ad46e,_0x687d('0x27'),JSON[_0x687d('0x2a')](_0x4a85ea));if(_0x4a85ea[_0x687d('0x2b')]){if(_0x4a85ea[_0x687d('0x2b')]['code']===0x1f4){logger[_0x687d('0x2b')](_0x687d('0x26'),_0x4ad46e,_0x4a85ea['error'][_0x687d('0x2c')]);return _0x1c0345(_0x4a85ea[_0x687d('0x2b')]['message']);}logger[_0x687d('0x2b')](_0x687d('0x26'),_0x4ad46e,_0x4a85ea[_0x687d('0x2b')][_0x687d('0x2c')]);return _0x384795(_0x4a85ea[_0x687d('0x2b')][_0x687d('0x2c')]);}else{logger[_0x687d('0x25')](_0x687d('0x26'),_0x4ad46e,_0x687d('0x27'));_0x384795(_0x4a85ea[_0x687d('0x2d')][_0x687d('0x2c')]);}})[_0x687d('0x2e')](function(_0x1be7cd){logger['error'](_0x687d('0x26'),_0x4ad46e,_0x1be7cd);_0x1c0345(_0x1be7cd);});});}function respondWithStatusCode(_0x13eb44,_0x20f941){_0x20f941=_0x20f941||0xcc;return function(_0x108245){if(_0x108245){return _0x13eb44[_0x687d('0x2f')](_0x20f941);}return _0x13eb44[_0x687d('0x30')](_0x20f941)[_0x687d('0x31')]();};}function respondWithResult(_0x5e70db,_0x1950ac){_0x1950ac=_0x1950ac||0xc8;return function(_0x3e5002){if(_0x3e5002){return _0x5e70db[_0x687d('0x30')](_0x1950ac)[_0x687d('0x32')](_0x3e5002);}};}function respondWithFilteredResult(_0x1a8ffb,_0x213172){return function(_0x4cf2f8){if(_0x4cf2f8){var _0x11139f=typeof _0x213172[_0x687d('0x33')]==='undefined'&&typeof _0x213172[_0x687d('0x34')]===_0x687d('0x35');var _0x202dab=_0x4cf2f8[_0x687d('0x36')];var _0x4f2c64=_0x11139f?0x0:_0x213172[_0x687d('0x33')];var _0x45df61=_0x11139f?_0x4cf2f8[_0x687d('0x36')]:_0x213172[_0x687d('0x33')]+_0x213172[_0x687d('0x34')];var _0x38611f;if(_0x45df61>=_0x202dab){_0x45df61=_0x202dab;_0x38611f=0xc8;}else{_0x38611f=0xce;}_0x1a8ffb[_0x687d('0x30')](_0x38611f);return _0x1a8ffb[_0x687d('0x37')]('Content-Range',_0x4f2c64+'-'+_0x45df61+'/'+_0x202dab)[_0x687d('0x32')](_0x4cf2f8);}return null;};}function patchUpdates(_0x51c1f3){return function(_0x15a9b2){try{jsonpatch[_0x687d('0x38')](_0x15a9b2,_0x51c1f3,!![]);}catch(_0x3a7069){return BPromise['reject'](_0x3a7069);}return _0x15a9b2['save']();};}function saveUpdates(_0x460408,_0x2e9618){return function(_0x5c30f6){if(_0x5c30f6){return _0x5c30f6[_0x687d('0x39')](_0x460408)[_0x687d('0x24')](function(_0x10fb46){return _0x10fb46;});}return null;};}function removeEntity(_0x35299c,_0x5462e8){return function(_0x428c5d){if(_0x428c5d){return _0x428c5d[_0x687d('0x3a')]()[_0x687d('0x24')](function(){var _0x23ef8a=_0x428c5d['get']({'plain':!![]});var _0x226e62=_0x687d('0x3b');return db['UserProfileResource']['destroy']({'where':{'type':_0x226e62,'resourceId':_0x23ef8a['id']}})['then'](function(){return _0x428c5d;});})[_0x687d('0x24')](function(){_0x35299c['status'](0xcc)[_0x687d('0x31')]();});}};}function handleEntityNotFound(_0x164bbd,_0x4cfc38){return function(_0x6f2321){if(!_0x6f2321){_0x164bbd['sendStatus'](0x194);}return _0x6f2321;};}function handleError(_0x3f0ba1,_0x147cfc){_0x147cfc=_0x147cfc||0x1f4;return function(_0x9b2185){logger[_0x687d('0x2b')](_0x9b2185[_0x687d('0x3c')]);if(_0x9b2185[_0x687d('0x3d')]){delete _0x9b2185[_0x687d('0x3d')];}_0x3f0ba1['status'](_0x147cfc)[_0x687d('0x3e')](_0x9b2185);};}exports[_0x687d('0x3f')]=function(_0x7b99e4,_0xdf67e9){var _0x2106a6={'include':[{'model':db[_0x687d('0x40')],'as':_0x687d('0x41')}]},_0x1bdef5={},_0x40d82d={'count':0x0,'rows':[]};var _0xec9fc8=_[_0x687d('0x42')](db[_0x687d('0x43')]['rawAttributes'],function(_0x11bfa0){return{'name':_0x11bfa0[_0x687d('0x44')],'type':_0x11bfa0[_0x687d('0x45')]['key']};});_0x1bdef5['model']=_[_0x687d('0x42')](_0xec9fc8,_0x687d('0x3d'));_0x1bdef5[_0x687d('0x46')]=_[_0x687d('0x47')](_0x7b99e4[_0x687d('0x46')]);_0x1bdef5[_0x687d('0x48')]=_[_0x687d('0x49')](_0x1bdef5[_0x687d('0x4a')],_0x1bdef5[_0x687d('0x46')]);_0x2106a6[_0x687d('0x4b')]=_[_0x687d('0x49')](_0x1bdef5['model'],qs[_0x687d('0x4c')](_0x7b99e4[_0x687d('0x46')]['fields']));_0x2106a6[_0x687d('0x4b')]=_0x2106a6['attributes'][_0x687d('0x4d')]?_0x2106a6[_0x687d('0x4b')]:_0x1bdef5['model'];if(!_0x7b99e4[_0x687d('0x46')][_0x687d('0x4e')]('nolimit')){_0x2106a6['limit']=qs[_0x687d('0x34')](_0x7b99e4['query'][_0x687d('0x34')]);_0x2106a6['offset']=qs[_0x687d('0x33')](_0x7b99e4[_0x687d('0x46')][_0x687d('0x33')]);}_0x2106a6[_0x687d('0x4f')]=qs[_0x687d('0x50')](_0x7b99e4[_0x687d('0x46')][_0x687d('0x50')]);_0x2106a6[_0x687d('0x51')]=qs[_0x687d('0x48')](_[_0x687d('0x52')](_0x7b99e4[_0x687d('0x46')],_0x1bdef5['filters']),_0xec9fc8);if(_0x7b99e4['query'][_0x687d('0x53')]){_0x2106a6[_0x687d('0x51')]=_[_0x687d('0x54')](_0x2106a6[_0x687d('0x51')],{'$or':_['map'](_0xec9fc8,function(_0xde85d){if(_0xde85d[_0x687d('0x45')]!==_0x687d('0x55')){var _0x3046bd={};_0x3046bd[_0xde85d[_0x687d('0x3d')]]={'$like':'%'+_0x7b99e4[_0x687d('0x46')]['filter']+'%'};return _0x3046bd;}})});}_0x2106a6=_[_0x687d('0x54')]({},_0x2106a6,_0x7b99e4[_0x687d('0x56')]);var _0x3d9029={'where':_0x2106a6[_0x687d('0x51')]};return db[_0x687d('0x43')][_0x687d('0x36')](_0x3d9029)[_0x687d('0x24')](function(_0x2613a5){_0x40d82d['count']=_0x2613a5;if(_0x7b99e4[_0x687d('0x46')][_0x687d('0x57')]){_0x2106a6['include']=[{'all':!![]}];}return db[_0x687d('0x43')][_0x687d('0x58')](_0x2106a6);})[_0x687d('0x24')](function(_0x2099b1){_0x40d82d[_0x687d('0x59')]=_0x2099b1;return _0x40d82d;})['then'](respondWithFilteredResult(_0xdf67e9,_0x2106a6))[_0x687d('0x2e')](handleError(_0xdf67e9,null));};exports['show']=function(_0x2497ce,_0x3d5d0a){var _0x39cfe6={'raw':![],'where':{'id':_0x2497ce[_0x687d('0x5a')]['id']},'include':[{'model':db[_0x687d('0x40')],'as':_0x687d('0x41')}]},_0x1a84db={};_0x1a84db['model']=_['keys'](db[_0x687d('0x43')][_0x687d('0x5b')]);_0x1a84db[_0x687d('0x46')]=_[_0x687d('0x47')](_0x2497ce['query']);_0x1a84db[_0x687d('0x48')]=_[_0x687d('0x49')](_0x1a84db['model'],_0x1a84db[_0x687d('0x46')]);_0x39cfe6[_0x687d('0x4b')]=_[_0x687d('0x49')](_0x1a84db[_0x687d('0x4a')],qs['fields'](_0x2497ce[_0x687d('0x46')][_0x687d('0x4c')]));_0x39cfe6[_0x687d('0x4b')]=_0x39cfe6[_0x687d('0x4b')][_0x687d('0x4d')]?_0x39cfe6[_0x687d('0x4b')]:_0x1a84db[_0x687d('0x4a')];if(_0x2497ce[_0x687d('0x46')][_0x687d('0x57')]){_0x39cfe6['include']=[{'all':!![]}];}_0x39cfe6=_[_0x687d('0x54')]({},_0x39cfe6,_0x2497ce['options']);return db['OpenchannelAccount'][_0x687d('0x5c')](_0x39cfe6)[_0x687d('0x24')](handleEntityNotFound(_0x3d5d0a,null))[_0x687d('0x24')](respondWithResult(_0x3d5d0a,null))[_0x687d('0x2e')](handleError(_0x3d5d0a,null));};exports['create']=function(_0x4af6e6,_0x271681){return db[_0x687d('0x43')][_0x687d('0x5d')](_0x4af6e6[_0x687d('0x5e')],{})[_0x687d('0x24')](function(_0x313f05){var _0x343969=_0x4af6e6[_0x687d('0x5f')][_0x687d('0x60')]({'plain':!![]});if(!_0x343969)throw new Error(_0x687d('0x61'));if(_0x343969['role']===_0x687d('0x5f')){var _0x408c23=_0x313f05['get']({'plain':!![]});var _0x71d5eb=_0x687d('0x3b');return db[_0x687d('0x62')][_0x687d('0x5c')]({'where':{'name':_0x71d5eb,'userProfileId':_0x343969[_0x687d('0x63')]},'raw':!![]})['then'](function(_0x410e04){if(_0x410e04&&_0x410e04['autoAssociation']===0x0){return db[_0x687d('0x64')]['create']({'name':_0x408c23[_0x687d('0x3d')],'resourceId':_0x408c23['id'],'type':_0x410e04[_0x687d('0x3d')],'sectionId':_0x410e04['id']},{})[_0x687d('0x24')](function(){return _0x313f05;});}else{return _0x313f05;}})[_0x687d('0x2e')](function(_0x164f2d){logger['error'](_0x687d('0x65'),_0x164f2d);throw _0x164f2d;});}return _0x313f05;})['then'](respondWithResult(_0x271681,0xc9))[_0x687d('0x2e')](handleError(_0x271681,null));};exports[_0x687d('0x39')]=function(_0x5962a0,_0x2919e1){if(_0x5962a0['body']['id']){delete _0x5962a0[_0x687d('0x5e')]['id'];}return db[_0x687d('0x43')][_0x687d('0x5c')]({'where':{'id':_0x5962a0[_0x687d('0x5a')]['id']},'include':[{'model':db[_0x687d('0x40')],'as':_0x687d('0x41')}]})[_0x687d('0x24')](handleEntityNotFound(_0x2919e1,null))['then'](saveUpdates(_0x5962a0['body'],null))['then'](respondWithResult(_0x2919e1,null))[_0x687d('0x2e')](handleError(_0x2919e1,null));};exports[_0x687d('0x3a')]=function(_0x52eb3c,_0x3c9580){return db[_0x687d('0x43')]['find']({'where':{'id':_0x52eb3c[_0x687d('0x5a')]['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x3c9580,null))[_0x687d('0x24')](removeEntity(_0x3c9580,null))['catch'](handleError(_0x3c9580,null));};exports['describe']=function(_0x2ffcf3,_0x2b6424){return db[_0x687d('0x43')][_0x687d('0x66')]()[_0x687d('0x24')](respondWithResult(_0x2b6424,null))[_0x687d('0x2e')](handleError(_0x2b6424,null));};exports[_0x687d('0x67')]=function(_0x4349d0,_0x76e2ca,_0x5cf756){if(_0x4349d0[_0x687d('0x5e')]['id']){delete _0x4349d0[_0x687d('0x5e')]['id'];}return db[_0x687d('0x43')][_0x687d('0x5c')]({'where':{'id':_0x4349d0[_0x687d('0x5a')]['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x76e2ca,null))['then'](function(_0x3a385f){if(_0x3a385f){_0x4349d0[_0x687d('0x5e')][_0x687d('0x68')]=_0x3a385f['id'];return db['Disposition'][_0x687d('0x5d')](_0x4349d0[_0x687d('0x5e')]);}})[_0x687d('0x24')](respondWithResult(_0x76e2ca,null))[_0x687d('0x2e')](handleError(_0x76e2ca,null));};exports['getDispositions']=function(_0x5346df,_0x171ccf,_0x915d0c){var _0x35eba5={'raw':![],'where':{}};var _0x4b51d8={};var _0x5ad5cc={'count':0x0,'rows':[]};return db[_0x687d('0x43')][_0x687d('0x69')]({'where':{'id':_0x5346df['params']['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x171ccf,null))['then'](function(_0x279e7a){if(_0x279e7a){_0x4b51d8[_0x687d('0x4a')]=_['keys'](db[_0x687d('0x6a')]['rawAttributes']);_0x4b51d8['query']=_[_0x687d('0x47')](_0x5346df[_0x687d('0x46')]);_0x4b51d8[_0x687d('0x48')]=_[_0x687d('0x49')](_0x4b51d8[_0x687d('0x4a')],_0x4b51d8[_0x687d('0x46')]);_0x35eba5[_0x687d('0x4b')]=_[_0x687d('0x49')](_0x4b51d8[_0x687d('0x4a')],qs[_0x687d('0x4c')](_0x5346df[_0x687d('0x46')][_0x687d('0x4c')]));_0x35eba5['attributes']=_0x35eba5[_0x687d('0x4b')][_0x687d('0x4d')]?_0x35eba5[_0x687d('0x4b')]:_0x4b51d8['model'];if(!_0x5346df['query'][_0x687d('0x4e')]('nolimit')){_0x35eba5[_0x687d('0x34')]=qs[_0x687d('0x34')](_0x5346df[_0x687d('0x46')]['limit']);_0x35eba5['offset']=qs[_0x687d('0x33')](_0x5346df['query']['offset']);}_0x35eba5[_0x687d('0x4f')]=qs[_0x687d('0x50')](_0x5346df[_0x687d('0x46')]['sort']);_0x35eba5[_0x687d('0x51')]=qs[_0x687d('0x48')](_['pick'](_0x5346df[_0x687d('0x46')],_0x4b51d8[_0x687d('0x48')]));_0x35eba5[_0x687d('0x51')][_0x687d('0x68')]=_0x279e7a['id'];if(_0x5346df[_0x687d('0x46')]['filter']){_0x35eba5[_0x687d('0x51')]=_[_0x687d('0x54')](_0x35eba5[_0x687d('0x51')],{'$or':_[_0x687d('0x42')](_0x35eba5[_0x687d('0x4b')],function(_0x5112b7){var _0x2c2595={};_0x2c2595[_0x5112b7]={'$like':'%'+_0x5346df[_0x687d('0x46')][_0x687d('0x53')]+'%'};return _0x2c2595;})});}_0x35eba5=_[_0x687d('0x54')]({},_0x35eba5,_0x5346df['options']);return db[_0x687d('0x6a')][_0x687d('0x36')]({'where':_0x35eba5[_0x687d('0x51')]})[_0x687d('0x24')](function(_0x50953a){_0x5ad5cc[_0x687d('0x36')]=_0x50953a;if(_0x5346df['query'][_0x687d('0x57')]){_0x35eba5[_0x687d('0x6b')]=[{'all':!![]}];}return db[_0x687d('0x6a')][_0x687d('0x58')](_0x35eba5);})[_0x687d('0x24')](function(_0x1d2bf4){_0x5ad5cc[_0x687d('0x59')]=_0x1d2bf4;return _0x5ad5cc;});}})[_0x687d('0x24')](respondWithFilteredResult(_0x171ccf,_0x35eba5))[_0x687d('0x2e')](handleError(_0x171ccf,null));};exports[_0x687d('0x6c')]=function(_0x4ba675,_0x16d326,_0x19a43d){return db[_0x687d('0x43')]['find']({'where':{'id':_0x4ba675['params']['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x16d326,null))[_0x687d('0x24')](function(_0x5b5cba){if(_0x5b5cba){return _0x5b5cba[_0x687d('0x6c')](_0x4ba675['query'][_0x687d('0x6d')]);}})['then'](respondWithStatusCode(_0x16d326,null))['catch'](handleError(_0x16d326,null));};exports[_0x687d('0x6e')]=function(_0x27efb1,_0x582158,_0x4b4efb){if(_0x27efb1[_0x687d('0x5e')]['id']){delete _0x27efb1['body']['id'];}return db[_0x687d('0x43')]['find']({'where':{'id':_0x27efb1['params']['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x582158,null))[_0x687d('0x24')](function(_0x5387bf){if(_0x5387bf){_0x27efb1['body']['OpenchannelAccountId']=_0x5387bf['id'];return db[_0x687d('0x6f')]['create'](_0x27efb1[_0x687d('0x5e')]);}})[_0x687d('0x24')](respondWithResult(_0x582158,null))[_0x687d('0x2e')](handleError(_0x582158,null));};exports[_0x687d('0x70')]=function(_0x558148,_0x1a5c30,_0x48e477){var _0x26b9be={'raw':![],'where':{}};var _0x20fd33={};var _0x126576={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0x687d('0x69')]({'where':{'id':_0x558148[_0x687d('0x5a')]['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x1a5c30,null))[_0x687d('0x24')](function(_0x21a701){if(_0x21a701){_0x20fd33[_0x687d('0x4a')]=_['keys'](db['CannedAnswer'][_0x687d('0x5b')]);_0x20fd33[_0x687d('0x46')]=_[_0x687d('0x47')](_0x558148[_0x687d('0x46')]);_0x20fd33[_0x687d('0x48')]=_[_0x687d('0x49')](_0x20fd33['model'],_0x20fd33[_0x687d('0x46')]);_0x26b9be[_0x687d('0x4b')]=_[_0x687d('0x49')](_0x20fd33[_0x687d('0x4a')],qs['fields'](_0x558148[_0x687d('0x46')][_0x687d('0x4c')]));_0x26b9be[_0x687d('0x4b')]=_0x26b9be[_0x687d('0x4b')][_0x687d('0x4d')]?_0x26b9be[_0x687d('0x4b')]:_0x20fd33[_0x687d('0x4a')];if(!_0x558148[_0x687d('0x46')]['hasOwnProperty'](_0x687d('0x71'))){_0x26b9be[_0x687d('0x34')]=qs[_0x687d('0x34')](_0x558148['query']['limit']);_0x26b9be[_0x687d('0x33')]=qs[_0x687d('0x33')](_0x558148[_0x687d('0x46')]['offset']);}_0x26b9be['order']=qs[_0x687d('0x50')](_0x558148['query']['sort']);_0x26b9be[_0x687d('0x51')]=qs[_0x687d('0x48')](_[_0x687d('0x52')](_0x558148['query'],_0x20fd33[_0x687d('0x48')]));_0x26b9be[_0x687d('0x51')][_0x687d('0x68')]=_0x21a701['id'];if(_0x558148[_0x687d('0x46')][_0x687d('0x53')]){_0x26b9be[_0x687d('0x51')]=_[_0x687d('0x54')](_0x26b9be[_0x687d('0x51')],{'$or':_[_0x687d('0x42')](_0x26b9be[_0x687d('0x4b')],function(_0x50637d){var _0x2a57a8={};_0x2a57a8[_0x50637d]={'$like':'%'+_0x558148[_0x687d('0x46')][_0x687d('0x53')]+'%'};return _0x2a57a8;})});}_0x26b9be=_[_0x687d('0x54')]({},_0x26b9be,_0x558148[_0x687d('0x56')]);return db[_0x687d('0x6f')][_0x687d('0x36')]({'where':_0x26b9be[_0x687d('0x51')]})[_0x687d('0x24')](function(_0xd4b5f){_0x126576[_0x687d('0x36')]=_0xd4b5f;if(_0x558148[_0x687d('0x46')][_0x687d('0x57')]){_0x26b9be['include']=[{'all':!![]}];}return db[_0x687d('0x6f')][_0x687d('0x58')](_0x26b9be);})['then'](function(_0x10f7c3){_0x126576[_0x687d('0x59')]=_0x10f7c3;return _0x126576;});}})[_0x687d('0x24')](respondWithFilteredResult(_0x1a5c30,_0x26b9be))['catch'](handleError(_0x1a5c30,null));};exports[_0x687d('0x72')]=function(_0x413ef2,_0x4eb9cb,_0x3cba7b){return db[_0x687d('0x43')]['find']({'where':{'id':_0x413ef2[_0x687d('0x5a')]['id']}})['then'](handleEntityNotFound(_0x4eb9cb,null))[_0x687d('0x24')](function(_0x2f9d3c){if(_0x2f9d3c){return _0x2f9d3c[_0x687d('0x72')](_0x413ef2[_0x687d('0x46')]['ids']);}})['then'](respondWithStatusCode(_0x4eb9cb,null))['catch'](handleError(_0x4eb9cb,null));};exports[_0x687d('0x73')]=function(_0x4a0bdd,_0x54991a,_0x124828){var _0x5b89ef={'body':_0x4a0bdd[_0x687d('0x5e')],'channel':_0x687d('0x74')};var _0x404fc5=[];var _0x282848=[];var _0x303300={};var _0x3288f0=![];return db[_0x687d('0x75')][_0x687d('0x66')]()['then'](function(_0x55cf82){if(!_0x55cf82){throw new db[(_0x687d('0x76'))]['ValidationError'](_0x687d('0x77'));}_0x404fc5=_[_0x687d('0x78')](_[_0x687d('0x47')](_0x55cf82),[_0x687d('0x79'),_0x687d('0x7a')]);_0x282848=_['difference'](_[_0x687d('0x47')](_0x55cf82),[_0x687d('0x79'),_0x687d('0x7a'),_0x687d('0x7b'),_0x687d('0x7c')]);if(_0x4a0bdd[_0x687d('0x5e')]['id']){delete _0x4a0bdd['body']['id'];}if(_[_0x687d('0x7d')](_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x7e')])){throw new db[(_0x687d('0x76'))]['ValidationError'](_0x687d('0x7f'));}if(_[_0x687d('0x7d')](_0x4a0bdd[_0x687d('0x5e')]['body'])||_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x5e')]===''){throw new db[(_0x687d('0x76'))][(_0x687d('0x80'))](_0x687d('0x81'));}if(_[_0x687d('0x7d')](_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x82')])){throw new db[(_0x687d('0x76'))][(_0x687d('0x80'))](_0x687d('0x83')+_0x282848);}if(!_[_0x687d('0x84')](_0x282848,_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x82')])){throw new db[(_0x687d('0x76'))][(_0x687d('0x80'))](_0x687d('0x85')+_0x282848);}_0x303300[_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x82')]]=_0x4a0bdd['body'][_0x687d('0x7e')];})[_0x687d('0x24')](function(){return db[_0x687d('0x43')][_0x687d('0x5c')]({'where':{'id':_0x4a0bdd['params']['id']},'include':[{'model':db[_0x687d('0x86')],'as':'List','include':[{'model':db['CmContact'],'as':_0x687d('0x87'),'where':_0x303300,'limit':0x1,'order':[['updatedAt',_0x687d('0x88')]]}]},{'model':db['OpenchannelApplication'],'as':_0x687d('0x89')}]});})[_0x687d('0x24')](handleEntityNotFound(_0x54991a,null))[_0x687d('0x24')](function(_0x21d499){if(_0x21d499&&_0x21d499[_0x687d('0x8a')]){_0x5b89ef[_0x687d('0x8b')]=_0x21d499;_0x5b89ef[_0x687d('0x8c')]=_0x21d499['Applications'];_0x5b89ef[_0x687d('0x8d')]=_0x21d499['List'];_0x5b89ef[_0x687d('0x8c')]=_[_0x687d('0x8e')](_0x5b89ef[_0x687d('0x8c')],[_0x687d('0x8f')],[_0x687d('0x90')]);if(_0x5b89ef[_0x687d('0x8b')]['Applications']){delete _0x5b89ef[_0x687d('0x8b')][_0x687d('0x89')];}if(_0x5b89ef[_0x687d('0x8b')][_0x687d('0x8a')]&&_0x5b89ef['account'][_0x687d('0x8a')][_0x687d('0x87')]['length']){return _0x5b89ef[_0x687d('0x8b')][_0x687d('0x8a')]['Contacts'][0x0];}var _0x4f3312=_[_0x687d('0x1c')](_0x4a0bdd[_0x687d('0x5e')],{'firstName':_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x7e')],'ListId':_0x21d499[_0x687d('0x7c')]});_0x4f3312[_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x82')]]=_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x7e')];return db[_0x687d('0x75')]['create'](_0x4f3312,{'fields':_0x404fc5,'raw':!![]});}})[_0x687d('0x24')](handleEntityNotFound(_0x54991a,null))[_0x687d('0x24')](function(_0x3b79a4){_0x5b89ef[_0x687d('0x91')]=_0x3b79a4;if(_0x3b79a4){var _0x545600={'ContactId':_0x3b79a4['id'],'OpenchannelAccountId':_0x4a0bdd['params']['id'],'from':(_0x3b79a4['firstName']||'')+'\x20'+(_0x3b79a4[_0x687d('0x92')]||'')};var _0x2cd334={'OpenchannelAccountId':_0x4a0bdd[_0x687d('0x5a')]['id'],'closed':![]};if(_0x4a0bdd['body'][_0x687d('0x93')]){_0x2cd334['threadId']=_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x93')];return db[_0x687d('0x94')]['find']({'where':_0x2cd334})['then'](function(_0x1d1887){if(_0x1d1887){return[_0x1d1887,![]];}_0x545600[_0x687d('0x93')]=_0x4a0bdd['body']['threadId'];_0x545600[_0x687d('0x95')]=_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x95')];return db['OpenchannelInteraction']['create'](_0x545600)[_0x687d('0x24')](function(_0x2ff579){return[_0x2ff579,!![]];});});}else{_0x2cd334[_0x687d('0x93')]=null;}_0x2cd334['ContactId']=_0x3b79a4['id'];return db[_0x687d('0x94')][_0x687d('0x5c')]({'where':_0x2cd334})[_0x687d('0x24')](function(_0x20ca33){if(_0x20ca33){return[_0x20ca33,![]];}return db[_0x687d('0x94')][_0x687d('0x5d')](_0x545600)['then'](function(_0x4926cd){return[_0x4926cd,!![]];});});}})[_0x687d('0x96')](function(_0x23ddee,_0x4dd075){if(_0x23ddee){_0x3288f0=_0x4dd075;if(!_0x4dd075){var _0x1d9c37={'from':(_0x5b89ef[_0x687d('0x91')]['firstName']||'')+'\x20'+(_0x5b89ef['contact'][_0x687d('0x92')]||'')};if(_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x93')]&&_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x97')]&&_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x93')]!=_0x4a0bdd[_0x687d('0x5e')]['messageId']){_0x1d9c37[_0x687d('0x93')]=_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x97')];}return _0x23ddee[_0x687d('0x39')](_0x1d9c37);}else{return _0x23ddee;}}})[_0x687d('0x24')](function(_0x545e79){_0x5b89ef[_0x687d('0x98')]=_0x545e79['get']({'plain':!![]});_0x5b89ef[_0x687d('0x98')][_0x687d('0x99')]=_0x3288f0;if(_0x5b89ef[_0x687d('0x98')][_0x687d('0x99')]){if(_0x5b89ef[_0x687d('0x8b')][_0x687d('0x9a')]){_0x5b89ef[_0x687d('0x8c')]['push']({'id':0x0,'priority':_0x5b89ef[_0x687d('0x8c')][_0x687d('0x4d')]+0x1,'app':_0x687d('0x9b'),'appdata':'unmanaged','interval':_0x687d('0x9c')});}}return db[_0x687d('0x9d')]['create']({'body':_0x4a0bdd[_0x687d('0x5e')]['body'],'OpenchannelAccountId':_0x4a0bdd[_0x687d('0x5a')]['id'],'OpenchannelInteractionId':_0x545e79['id'],'direction':'in','ContactId':_0x5b89ef['contact']['id'],'AttachmentId':_0x4a0bdd[_0x687d('0x5e')][_0x687d('0x9e')]});})[_0x687d('0x24')](function(_0x585d5c){_0x5b89ef[_0x687d('0x2c')]=_0x585d5c;if(_0x5b89ef[_0x687d('0x98')]['UserId']){return db[_0x687d('0x9f')][_0x687d('0x5c')]({'attributes':['id',_0x687d('0x3d')],'where':{'id':_0x5b89ef[_0x687d('0x98')]['UserId']}})[_0x687d('0x24')](function(_0xeafd72){if(_0xeafd72){_0x5b89ef[_0x687d('0x8c')][_0x687d('0xa0')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0xeafd72[_0x687d('0x3d')]+','+(_0x5b89ef[_0x687d('0x8b')][_0x687d('0xa1')]||0xa),'interval':_0x687d('0x9c')});_0x5b89ef[_0x687d('0xa2')]=![];}return respondWithRpcPromise(_0x687d('0xa3'),'startRouting',_0x5b89ef);});}return respondWithRpcPromise(_0x687d('0xa3'),_0x687d('0xa4'),_0x5b89ef);})[_0x687d('0x24')](function(_0x2e5dd2){respondWithRpcPromise(_0x687d('0xa5'),_0x687d('0xa5'),{'event':'notify','message':_0x2e5dd2},client9002);return _0x2e5dd2;})['then'](respondWithResult(_0x54991a,null))[_0x687d('0x2e')](handleError(_0x54991a,null));};exports['addApplications']=function(_0x38976b,_0x1a3022,_0x3690b1){return db['OpenchannelAccount'][_0x687d('0x69')]({'where':{'id':_0x38976b['params']['id']}})['then'](handleEntityNotFound(_0x1a3022,null))[_0x687d('0x24')](function(_0x4fa502){if(_0x4fa502){return db['sequelize']['transaction'](function(_0xfac05b){return db[_0x687d('0xa6')][_0x687d('0x3a')]({'where':{'OpenchannelAccountId':_0x38976b[_0x687d('0x5a')]['id']},'transaction':_0xfac05b})[_0x687d('0x24')](function(_0x4d8aa8){var _0x1c3d0f=_['map'](_0x38976b['body'],function(_0x341099){_0x341099[_0x687d('0x68')]=_0x38976b[_0x687d('0x5a')]['id'];return _0x341099;});return db[_0x687d('0xa6')]['bulkCreate'](_0x1c3d0f,{'transaction':_0xfac05b});});})[_0x687d('0x24')](function(){return db[_0x687d('0xa6')][_0x687d('0xa7')]({'where':{'OpenchannelAccountId':_0x38976b[_0x687d('0x5a')]['id']},'order':'priority'});});}})['then'](respondWithResult(_0x1a3022,null))['catch'](handleError(_0x1a3022,null));};exports[_0x687d('0xa8')]=function(_0x470b99,_0x1b2a84,_0x362e44){var _0x249ec1={};var _0x43696f={};var _0xa3a0f2;var _0x4b5d13;return db[_0x687d('0x43')][_0x687d('0x69')]({'where':{'id':_0x470b99['params']['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x1b2a84,null))[_0x687d('0x24')](function(_0x552384){if(_0x552384){_0xa3a0f2=_0x552384;_0x43696f[_0x687d('0x4a')]=_['keys'](db[_0x687d('0xa6')][_0x687d('0x5b')]);_0x43696f[_0x687d('0x46')]=_[_0x687d('0x47')](_0x470b99[_0x687d('0x46')]);_0x43696f[_0x687d('0x48')]=_[_0x687d('0x49')](_0x43696f[_0x687d('0x4a')],_0x43696f[_0x687d('0x46')]);_0x249ec1[_0x687d('0x4b')]=_['intersection'](_0x43696f['model'],qs[_0x687d('0x4c')](_0x470b99['query'][_0x687d('0x4c')]));_0x249ec1['attributes']=_0x249ec1[_0x687d('0x4b')][_0x687d('0x4d')]?_0x249ec1[_0x687d('0x4b')]:_0x43696f[_0x687d('0x4a')];_0x249ec1['order']=qs[_0x687d('0x50')](_0x470b99[_0x687d('0x46')]['sort']);_0x249ec1[_0x687d('0x51')]=qs[_0x687d('0x48')](_[_0x687d('0x52')](_0x470b99[_0x687d('0x46')],_0x43696f[_0x687d('0x48')]));if(_0x470b99[_0x687d('0x46')][_0x687d('0x53')]){_0x249ec1[_0x687d('0x51')]=_[_0x687d('0x54')](_0x249ec1[_0x687d('0x51')],{'$or':_[_0x687d('0x42')](_0x249ec1[_0x687d('0x4b')],function(_0x599b46){var _0x26af37={};_0x26af37[_0x599b46]={'$like':'%'+_0x470b99[_0x687d('0x46')][_0x687d('0x53')]+'%'};return _0x26af37;})});}_0x249ec1=_['merge']({},_0x249ec1,_0x470b99['options']);return _0xa3a0f2[_0x687d('0xa8')](_0x249ec1);}})[_0x687d('0x24')](function(_0x2a7b48){if(_0x2a7b48){_0x4b5d13=_0x2a7b48[_0x687d('0x4d')];if(!_0x470b99['query']['hasOwnProperty'](_0x687d('0x71'))){_0x249ec1[_0x687d('0x34')]=qs['limit'](_0x470b99[_0x687d('0x46')][_0x687d('0x34')]);_0x249ec1[_0x687d('0x33')]=qs['offset'](_0x470b99['query'][_0x687d('0x33')]);}return _0xa3a0f2[_0x687d('0xa8')](_0x249ec1);}})['then'](function(_0x264161){if(_0x264161){return _0x264161?{'count':_0x4b5d13,'rows':_0x264161}:null;}})['then'](respondWithResult(_0x1b2a84,null))[_0x687d('0x2e')](handleError(_0x1b2a84,null));};exports[_0x687d('0xa9')]=function(_0x364181,_0x3b1a0a,_0x33dac5){var _0x20879f={'raw':![],'where':{}};var _0x5aa618={};var _0x43faab={'count':0x0,'rows':[]};return db[_0x687d('0x43')][_0x687d('0x69')]({'where':{'id':_0x364181[_0x687d('0x5a')]['id']}})['then'](handleEntityNotFound(_0x3b1a0a,null))[_0x687d('0x24')](function(_0x29b96e){if(_0x29b96e){_0x5aa618[_0x687d('0x4a')]=_[_0x687d('0x47')](db[_0x687d('0x94')][_0x687d('0x5b')]);_0x5aa618[_0x687d('0x46')]=_[_0x687d('0x47')](_0x364181[_0x687d('0x46')]);_0x5aa618['filters']=_[_0x687d('0x49')](_0x5aa618['model'],_0x5aa618[_0x687d('0x46')]);_0x20879f[_0x687d('0x4b')]=_[_0x687d('0x49')](_0x5aa618[_0x687d('0x4a')],qs[_0x687d('0x4c')](_0x364181[_0x687d('0x46')][_0x687d('0x4c')]));_0x20879f['attributes']=_0x20879f[_0x687d('0x4b')]['length']?_0x20879f[_0x687d('0x4b')]:_0x5aa618[_0x687d('0x4a')];if(!_0x364181['query']['hasOwnProperty']('nolimit')){_0x20879f[_0x687d('0x34')]=qs[_0x687d('0x34')](_0x364181['query'][_0x687d('0x34')]);_0x20879f[_0x687d('0x33')]=qs['offset'](_0x364181[_0x687d('0x46')]['offset']);}_0x20879f[_0x687d('0x4f')]=qs['sort'](_0x364181[_0x687d('0x46')][_0x687d('0x50')]);_0x20879f[_0x687d('0x51')]=qs[_0x687d('0x48')](_[_0x687d('0x52')](_0x364181[_0x687d('0x46')],_0x5aa618[_0x687d('0x48')]));_0x20879f[_0x687d('0x51')][_0x687d('0x68')]=_0x29b96e['id'];if(_0x364181[_0x687d('0x46')][_0x687d('0x53')]){_0x20879f[_0x687d('0x51')]=_['merge'](_0x20879f['where'],{'$or':_['map'](_0x20879f[_0x687d('0x4b')],function(_0x1ec82e){var _0x3ca69c={};_0x3ca69c[_0x1ec82e]={'$like':'%'+_0x364181[_0x687d('0x46')]['filter']+'%'};return _0x3ca69c;})});}_0x20879f=_[_0x687d('0x54')]({},_0x20879f,_0x364181['options']);return db[_0x687d('0x94')][_0x687d('0x36')]({'where':_0x20879f['where']})[_0x687d('0x24')](function(_0x369ae6){_0x43faab['count']=_0x369ae6;if(_0x364181[_0x687d('0x46')][_0x687d('0x57')]){_0x20879f[_0x687d('0x6b')]=[{'model':db[_0x687d('0x75')],'as':_0x687d('0xaa'),'required':![]},{'model':db['User'],'as':_0x687d('0xab'),'attributes':[_0x687d('0x3d'),_0x687d('0xac'),'internal'],'required':![]},{'model':db[_0x687d('0xad')],'as':_0x687d('0xae'),'attributes':['id','name',_0x687d('0xaf')],'where':_0x364181[_0x687d('0x46')][_0x687d('0xb0')]?{'id':_0x364181[_0x687d('0x46')]['tag']}:undefined,'required':_0x364181['query'][_0x687d('0xb0')]?!![]:![]}];}return db[_0x687d('0x94')]['findAll'](_0x20879f);})[_0x687d('0x24')](function(_0x5865ed){_0x43faab[_0x687d('0x59')]=_0x5865ed;return _0x43faab;});}})[_0x687d('0x24')](respondWithFilteredResult(_0x3b1a0a,_0x20879f))['catch'](handleError(_0x3b1a0a,null));};exports[_0x687d('0xb1')]=function(_0x51a633,_0x32a69a,_0x19a422){return db[_0x687d('0x43')][_0x687d('0x5c')]({'where':{'id':_0x51a633[_0x687d('0x5a')]['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x32a69a,null))[_0x687d('0x24')](function(_0x5ea441){if(_0x5ea441){return _0x5ea441['addAgents'](_0x51a633[_0x687d('0x5e')][_0x687d('0x6d')],_[_0x687d('0xb2')](_0x51a633['body'],[_0x687d('0x6d'),'id'])||{})[_0x687d('0x96')](function(_0x5a030d){for(var _0x9cbfe5=0x0;_0x9cbfe5<_0x51a633[_0x687d('0x5e')][_0x687d('0x6d')][_0x687d('0x4d')];_0x9cbfe5+=0x1){socket[_0x687d('0xb3')](_0x687d('0xb4'),{'UserId':_0x51a633[_0x687d('0x5e')][_0x687d('0x6d')][_0x9cbfe5],'OpenchannelAccountId':_0x51a633[_0x687d('0x5a')]['id']});}return _0x5a030d;});}})[_0x687d('0x24')](respondWithResult(_0x32a69a,null))['catch'](handleError(_0x32a69a,null));};exports[_0x687d('0xb5')]=function(_0x39d49f,_0x59f023,_0x125460){return db['OpenchannelAccount'][_0x687d('0x5c')]({'where':{'id':_0x39d49f[_0x687d('0x5a')]['id']}})[_0x687d('0x24')](handleEntityNotFound(_0x59f023,null))[_0x687d('0x24')](function(_0x159d10){if(_0x159d10){return _0x159d10['removeAgents'](_0x39d49f[_0x687d('0x46')][_0x687d('0x6d')])['then'](function(){if(_[_0x687d('0xb6')](_0x39d49f[_0x687d('0x46')][_0x687d('0x6d')])){for(var _0x469a4d=0x0;_0x469a4d<_0x39d49f[_0x687d('0x46')][_0x687d('0x6d')][_0x687d('0x4d')];_0x469a4d+=0x1){socket[_0x687d('0xb3')](_0x687d('0xb7'),{'UserId':Number(_0x39d49f[_0x687d('0x46')][_0x687d('0x6d')][_0x469a4d]),'OpenchannelAccountId':Number(_0x39d49f[_0x687d('0x5a')]['id'])});}}else{socket[_0x687d('0xb3')](_0x687d('0xb7'),{'UserId':Number(_0x39d49f[_0x687d('0x46')][_0x687d('0x6d')]),'OpenchannelAccountId':Number(_0x39d49f['params']['id'])});}});}})['then'](respondWithStatusCode(_0x59f023,null))['catch'](handleError(_0x59f023,null));};exports[_0x687d('0xb8')]=function(_0x169b00,_0xfcd9ce,_0x2abbe6){var _0x30ed87={};var _0xfaf94f={};var _0x591a4f;var _0x3eaf9a;return db[_0x687d('0x43')]['findOne']({'where':{'id':_0x169b00[_0x687d('0x5a')]['id']}})['then'](handleEntityNotFound(_0xfcd9ce,null))['then'](function(_0x3a8394){if(_0x3a8394){_0x591a4f=_0x3a8394;_0xfaf94f[_0x687d('0x4a')]=_[_0x687d('0x47')](db[_0x687d('0x9f')][_0x687d('0x5b')]);_0xfaf94f[_0x687d('0x46')]=_[_0x687d('0x47')](_0x169b00['query']);_0xfaf94f[_0x687d('0x48')]=_['intersection'](_0xfaf94f[_0x687d('0x4a')],_0xfaf94f['query']);_0x30ed87[_0x687d('0x4b')]=_['intersection'](_0xfaf94f[_0x687d('0x4a')],qs[_0x687d('0x4c')](_0x169b00[_0x687d('0x46')][_0x687d('0x4c')]));_0x30ed87[_0x687d('0x4b')]=_0x30ed87['attributes'][_0x687d('0x4d')]?_0x30ed87[_0x687d('0x4b')]:_0xfaf94f[_0x687d('0x4a')];_0x30ed87[_0x687d('0x4f')]=qs[_0x687d('0x50')](_0x169b00[_0x687d('0x46')][_0x687d('0x50')]);_0x30ed87[_0x687d('0x51')]=qs[_0x687d('0x48')](_[_0x687d('0x52')](_0x169b00[_0x687d('0x46')],_0xfaf94f[_0x687d('0x48')]));if(_0x169b00[_0x687d('0x46')][_0x687d('0x53')]){_0x30ed87['where']=_[_0x687d('0x54')](_0x30ed87[_0x687d('0x51')],{'$or':_['map'](_0x30ed87[_0x687d('0x4b')],function(_0x2e6f13){var _0x2a7d24={};_0x2a7d24[_0x2e6f13]={'$like':'%'+_0x169b00['query'][_0x687d('0x53')]+'%'};return _0x2a7d24;})});}_0x30ed87=_[_0x687d('0x54')]({},_0x30ed87,_0x169b00[_0x687d('0x56')]);return _0x591a4f['getAgents'](_0x30ed87);}})[_0x687d('0x24')](function(_0x4c4802){if(_0x4c4802){_0x3eaf9a=_0x4c4802[_0x687d('0x4d')];if(!_0x169b00[_0x687d('0x46')][_0x687d('0x4e')](_0x687d('0x71'))){_0x30ed87['limit']=qs[_0x687d('0x34')](_0x169b00['query'][_0x687d('0x34')]);_0x30ed87[_0x687d('0x33')]=qs['offset'](_0x169b00[_0x687d('0x46')][_0x687d('0x33')]);}return _0x591a4f[_0x687d('0xb8')](_0x30ed87);}})[_0x687d('0x24')](function(_0x4386f2){if(_0x4386f2){return _0x4386f2?{'count':_0x3eaf9a,'rows':_0x4386f2}:null;}})[_0x687d('0x24')](respondWithResult(_0xfcd9ce,null))[_0x687d('0x2e')](handleError(_0xfcd9ce,null));};exports[_0x687d('0x3e')]=function(_0x433855,_0x5b31eb,_0x11079b){var _0x4fa09e,_0x3f9c4c,_0x1d32cd;if(_[_0x687d('0x7d')](_0x433855[_0x687d('0x5e')][_0x687d('0x5e')])||_0x433855[_0x687d('0x5e')][_0x687d('0x5e')]===''){throw new db[(_0x687d('0x76'))][(_0x687d('0x80'))](_0x687d('0x81'));}if(_[_0x687d('0x7d')](_0x433855[_0x687d('0x5e')]['to'])){}_0x4fa09e=_0x433855['body']['to'];return db[_0x687d('0x43')]['findOne']({'where':{'id':_0x433855[_0x687d('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5b31eb,null))['then'](function(_0x2d1ed2){if(_0x2d1ed2){return db['OpenchannelAccount'][_0x687d('0x5c')]({'where':{'id':_0x2d1ed2['id']},'include':[{'model':db[_0x687d('0x86')],'as':_0x687d('0x8a'),'include':[{'model':db[_0x687d('0x75')],'as':_0x687d('0x87'),'where':{[_0x2d1ed2[_0x687d('0x82')]]:_0x4fa09e},'limit':0x1,'order':[[_0x687d('0x7a'),_0x687d('0x88')]]}]}]})[_0x687d('0x24')](handleEntityNotFound(_0x5b31eb,null))[_0x687d('0x24')](function(_0x8a23f7){if(_0x8a23f7&&_0x8a23f7['List']){_0x3f9c4c=_0x8a23f7[_0x687d('0x60')]({'plain':!![]});if(_0x3f9c4c[_0x687d('0x8a')]&&_0x3f9c4c['List'][_0x687d('0x87')][_0x687d('0x4d')]){return _0x3f9c4c[_0x687d('0x8a')][_0x687d('0x87')][0x0];}return db[_0x687d('0x75')][_0x687d('0x5d')](_[_0x687d('0x1c')](_0x433855['body'],{'firstName':_0x4fa09e,[_0x8a23f7[_0x687d('0x82')]]:_0x4fa09e,'phone':_0x4fa09e,'ListId':_0x3f9c4c[_0x687d('0x7c')]}));}})[_0x687d('0x24')](handleEntityNotFound(_0x5b31eb,null))[_0x687d('0x24')](function(_0x1bf600){if(_0x1bf600){_0x1d32cd=_0x1bf600;return db[_0x687d('0x94')][_0x687d('0x5c')]({'where':{'ContactId':_0x1d32cd['id'],'closed':![],'OpenchannelAccountId':_0x3f9c4c['id']}})[_0x687d('0x24')](function(_0x2bc3a3){if(_0x2bc3a3){return[_0x2bc3a3,![]];}return db['OpenchannelInteraction'][_0x687d('0x5d')]({'UserId':_0x433855[_0x687d('0x5f')]['id'],'ContactId':_0x1d32cd['id'],'OpenchannelAccountId':_0x3f9c4c['id'],'lastMsgDirection':'out','Messages':[_[_0x687d('0x54')](_0x433855[_0x687d('0x5e')],{'read':![],'body':_0x433855[_0x687d('0x5e')][_0x687d('0x5e')],'OpenchannelAccountId':_0x3f9c4c['id'],'UserId':_0x433855[_0x687d('0x5f')]['id'],'ContactId':_0x1d32cd['id']})]},{'include':[{'model':db[_0x687d('0x9d')],'as':_0x687d('0xb9')}]})[_0x687d('0x24')](function(_0x2c1261){return[_0x2c1261,!![]];});});}})[_0x687d('0x96')](function(_0x507fa3,_0x3c86c9){if(_0x3c86c9){return _0x507fa3;}return db[_0x687d('0x9d')][_0x687d('0x5d')](_[_0x687d('0x54')](_0x433855['body'],{'read':![],'body':_0x433855[_0x687d('0x5e')][_0x687d('0x5e')],'OpenchannelAccountId':_0x3f9c4c['id'],'OpenchannelInteractionId':_0x507fa3['id'],'UserId':_0x433855['user']['id'],'ContactId':_0x1d32cd['id']}))['then'](function(_0x2ef6a8){_0x507fa3[_0x687d('0xba')][_0x687d('0xb9')]=[];_0x507fa3[_0x687d('0xba')][_0x687d('0xb9')][_0x687d('0xbb')](_0x2ef6a8['dataValues']);return _0x507fa3;});});}})[_0x687d('0x24')](respondWithResult(_0x5b31eb,null))[_0x687d('0x2e')](handleError(_0x5b31eb,null));}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.events.js b/server/api/openchannelAccount/openchannelAccount.events.js index 92ccaab..c733227 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 _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 +var _0x9c44=['save','update','remove','emit','hasOwnProperty','hook','exports','OpenchannelAccount','setMaxListeners'];(function(_0x1cd865,_0xa27450){var _0x378352=function(_0x42cb06){while(--_0x42cb06){_0x1cd865['push'](_0x1cd865['shift']());}};_0x378352(++_0xa27450);}(_0x9c44,0x178));var _0x49c4=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0x9c44[_0x50a0c2];return _0x5ebadd;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require('../../mysqldb')['db'][_0x49c4('0x0')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x49c4('0x1')](0x0);var events={'afterCreate':_0x49c4('0x2'),'afterUpdate':_0x49c4('0x3'),'afterDestroy':_0x49c4('0x4')};function emitEvent(_0x2ad237){return function(_0x4e0313,_0x4941f1,_0x41a183){OpenchannelAccountEvents['emit'](_0x2ad237+':'+_0x4e0313['id'],_0x4e0313);OpenchannelAccountEvents[_0x49c4('0x5')](_0x2ad237,_0x4e0313);_0x41a183(null);};}for(var e in events){if(events[_0x49c4('0x6')](e)){var event=events[e];OpenchannelAccount[_0x49c4('0x7')](e,emitEvent(event));}}module[_0x49c4('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 92a3bf5..96f7a5f 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(_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 +var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x5d56a2,_0x44c60b){var _0x344079=function(_0x359189){while(--_0x359189){_0x5d56a2['push'](_0x5d56a2['shift']());}};_0x344079(++_0x44c60b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47b58b,_0x41a189){_0x47b58b=_0x47b58b-0x0;var _0x46bebe=_0xa9e0[_0x47b58b];return _0x46bebe;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var 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 d882db6..b25a119 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 _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 +var _0x3070=['register','request','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','redis','localhost','./openchannelAccount.socket'];(function(_0x27ff2b,_0x913e17){var _0x2825af=function(_0x3be8ee){while(--_0x3be8ee){_0x27ff2b['push'](_0x27ff2b['shift']());}};_0x2825af(++_0x913e17);}(_0x3070,0x75));var _0x0307=function(_0x349ff2,_0xad0a4f){_0x349ff2=_0x349ff2-0x0;var _0x38dd0a=_0x3070[_0x349ff2];return _0x38dd0a;};'use strict';var _=require('lodash');var util=require(_0x0307('0x0'));var moment=require('moment');var BPromise=require(_0x0307('0x1'));var rs=require(_0x0307('0x2'));var fs=require('fs');var Redis=require(_0x0307('0x3'));var db=require(_0x0307('0x4'))['db'];var utils=require(_0x0307('0x5'));var logger=require(_0x0307('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0307('0x7'));var client=jayson[_0x0307('0x8')][_0x0307('0x9')]({'port':0x232a});config[_0x0307('0xa')]=_['defaults'](config[_0x0307('0xa')],{'host':_0x0307('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0307('0xa')]));require(_0x0307('0xc'))[_0x0307('0xd')](socket);function respondWithRpcPromise(_0xd40e5d,_0x18d426,_0x33c001){return new BPromise(function(_0x10513a,_0x461212){return client[_0x0307('0xe')](_0xd40e5d,_0x33c001)['then'](function(_0x41d9a0){logger['info'](_0x0307('0xf'),_0x18d426,_0x0307('0x10'));logger[_0x0307('0x11')](_0x0307('0x12'),_0x18d426,_0x0307('0x10'),JSON[_0x0307('0x13')](_0x41d9a0));if(_0x41d9a0[_0x0307('0x14')]){if(_0x41d9a0[_0x0307('0x14')][_0x0307('0x15')]===0x1f4){logger[_0x0307('0x14')](_0x0307('0xf'),_0x18d426,_0x41d9a0[_0x0307('0x14')][_0x0307('0x16')]);return _0x461212(_0x41d9a0[_0x0307('0x14')][_0x0307('0x16')]);}logger['error'](_0x0307('0xf'),_0x18d426,_0x41d9a0[_0x0307('0x14')][_0x0307('0x16')]);return _0x10513a(_0x41d9a0['error']['message']);}else{logger[_0x0307('0x17')](_0x0307('0xf'),_0x18d426,_0x0307('0x10'));_0x10513a(_0x41d9a0[_0x0307('0x18')][_0x0307('0x16')]);}})[_0x0307('0x19')](function(_0x1f97ca){logger['error'](_0x0307('0xf'),_0x18d426,_0x1f97ca);_0x461212(_0x1f97ca);});});} \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.socket.js b/server/api/openchannelAccount/openchannelAccount.socket.js index ae0075e..6859953 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 _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 +var _0x6ff1=['./openchannelAccount.events','save','remove','update','removeListener','register','openchannelAccount:'];(function(_0x51b8e7,_0x5c70fb){var _0x81fd25=function(_0x20c527){while(--_0x20c527){_0x51b8e7['push'](_0x51b8e7['shift']());}};_0x81fd25(++_0x5c70fb);}(_0x6ff1,0x10a));var _0x16ff=function(_0x2bae53,_0xfc14e6){_0x2bae53=_0x2bae53-0x0;var _0xf0726f=_0x6ff1[_0x2bae53];return _0xf0726f;};'use strict';var OpenchannelAccountEvents=require(_0x16ff('0x0'));var events=[_0x16ff('0x1'),_0x16ff('0x2'),_0x16ff('0x3')];function createListener(_0x4e4d9c,_0x50cd8a){return function(_0x1402f0){_0x50cd8a['emit'](_0x4e4d9c,_0x1402f0);};}function removeListener(_0x1db386,_0x2bf329){return function(){OpenchannelAccountEvents[_0x16ff('0x4')](_0x1db386,_0x2bf329);};}exports[_0x16ff('0x5')]=function(_0x5325dd){for(var _0x4f3752=0x0,_0x560612=events['length'];_0x4f3752<_0x560612;_0x4f3752++){var _0x133612=events[_0x4f3752];var _0x218c28=createListener(_0x16ff('0x6')+_0x133612,_0x5325dd);OpenchannelAccountEvents['on'](_0x133612,_0x218c28);}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/index.js b/server/api/openchannelApplication/index.js index 10c7186..36a1608 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 _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 +var _0x3a1b=['exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelApplication.controller','get','isAuthenticated','index','post','put','/:id','update','delete'];(function(_0x30b1b0,_0x497f80){var _0xe9b6ad=function(_0x515a1f){while(--_0x515a1f){_0x30b1b0['push'](_0x30b1b0['shift']());}};_0xe9b6ad(++_0x497f80);}(_0x3a1b,0xa3));var _0xb3a1=function(_0x1694f5,_0x49b7c3){_0x1694f5=_0x1694f5-0x0;var _0x5b4321=_0x3a1b[_0x1694f5];return _0x5b4321;};'use strict';var multer=require(_0xb3a1('0x0'));var util=require('util');var path=require(_0xb3a1('0x1'));var timeout=require(_0xb3a1('0x2'));var express=require(_0xb3a1('0x3'));var router=express['Router']();var fs_extra=require(_0xb3a1('0x4'));var auth=require(_0xb3a1('0x5'));var interaction=require(_0xb3a1('0x6'));var config=require(_0xb3a1('0x7'));var controller=require(_0xb3a1('0x8'));router[_0xb3a1('0x9')]('/',auth[_0xb3a1('0xa')](),controller[_0xb3a1('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0xb3a1('0xc')]('/',auth[_0xb3a1('0xa')](),controller['create']);router[_0xb3a1('0xd')](_0xb3a1('0xe'),auth[_0xb3a1('0xa')](),controller[_0xb3a1('0xf')]);router[_0xb3a1('0x10')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0xb3a1('0x11')]=router; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.attributes.js b/server/api/openchannelApplication/openchannelApplication.attributes.js index 6489b5a..60a12b9 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 _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 +var _0x6b15=['STRING','sequelize','exports','INTEGER','noop'];(function(_0x512178,_0x28a618){var _0x2b8818=function(_0x268ce0){while(--_0x268ce0){_0x512178['push'](_0x512178['shift']());}};_0x2b8818(++_0x28a618);}(_0x6b15,0x1c8));var _0x56b1=function(_0x4c3d6a,_0x43aa83){_0x4c3d6a=_0x4c3d6a-0x0;var _0x1a4224=_0x6b15[_0x4c3d6a];return _0x1a4224;};'use strict';var Sequelize=require(_0x56b1('0x0'));module[_0x56b1('0x1')]={'priority':{'type':Sequelize[_0x56b1('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x56b1('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x56b1('0x4')]},'interval':{'type':Sequelize[_0x56b1('0x4')],'defaultValue':'*,*,*,*'}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.controller.js b/server/api/openchannelApplication/openchannelApplication.controller.js index 7b2c9b8..b876fcc 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 _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 +var _0x5803=['mustache','util','path','sox','lodash','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','reject','update','then','destroy','stack','name','send','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','OpenchannelApplication','length','find','catch','create','body','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird'];(function(_0x2c6735,_0x5cdfde){var _0x26e9d8=function(_0x182b49){while(--_0x182b49){_0x2c6735['push'](_0x2c6735['shift']());}};_0x26e9d8(++_0x5cdfde);}(_0x5803,0x162));var _0x3580=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x5803[_0x59ee6f];return _0x4c0979;};'use strict';var emlformat=require(_0x3580('0x0'));var rimraf=require(_0x3580('0x1'));var zipdir=require(_0x3580('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3580('0x3'));var moment=require(_0x3580('0x4'));var BPromise=require(_0x3580('0x5'));var Mustache=require(_0x3580('0x6'));var util=require(_0x3580('0x7'));var path=require(_0x3580('0x8'));var sox=require(_0x3580('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3580('0xa'));var squel=require('squel');var crypto=require(_0x3580('0xb'));var jsforce=require(_0x3580('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x3580('0xd'));var querystring=require(_0x3580('0xe'));var Papa=require(_0x3580('0xf'));var Redis=require(_0x3580('0x10'));var authService=require(_0x3580('0x11'));var qs=require(_0x3580('0x12'));var as=require(_0x3580('0x13'));var hardwareService=require(_0x3580('0x14'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x3580('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x3580('0x16'))['db'];function respondWithStatusCode(_0x205e28,_0x3065b5){_0x3065b5=_0x3065b5||0xcc;return function(_0x2eba07){if(_0x2eba07){return _0x205e28[_0x3580('0x17')](_0x3065b5);}return _0x205e28[_0x3580('0x18')](_0x3065b5)[_0x3580('0x19')]();};}function respondWithResult(_0x31c4c8,_0x5b07c6){_0x5b07c6=_0x5b07c6||0xc8;return function(_0x58447b){if(_0x58447b){return _0x31c4c8[_0x3580('0x18')](_0x5b07c6)[_0x3580('0x1a')](_0x58447b);}};}function respondWithFilteredResult(_0xdb0d0d,_0x388ce9){return function(_0x45d491){if(_0x45d491){var _0x33ba4c=typeof _0x388ce9['offset']==='undefined'&&typeof _0x388ce9[_0x3580('0x1b')]===_0x3580('0x1c');var _0x2781a3=_0x45d491[_0x3580('0x1d')];var _0x1e25b9=_0x33ba4c?0x0:_0x388ce9[_0x3580('0x1e')];var _0x59590f=_0x33ba4c?_0x45d491['count']:_0x388ce9[_0x3580('0x1e')]+_0x388ce9[_0x3580('0x1b')];var _0x3b37e8;if(_0x59590f>=_0x2781a3){_0x59590f=_0x2781a3;_0x3b37e8=0xc8;}else{_0x3b37e8=0xce;}_0xdb0d0d[_0x3580('0x18')](_0x3b37e8);return _0xdb0d0d[_0x3580('0x1f')](_0x3580('0x20'),_0x1e25b9+'-'+_0x59590f+'/'+_0x2781a3)[_0x3580('0x1a')](_0x45d491);}return null;};}function patchUpdates(_0x2e8d20){return function(_0x3124bb){try{jsonpatch[_0x3580('0x21')](_0x3124bb,_0x2e8d20,!![]);}catch(_0x49a0d6){return BPromise[_0x3580('0x22')](_0x49a0d6);}return _0x3124bb['save']();};}function saveUpdates(_0x1a45b9,_0x3b1cb4){return function(_0x236c3a){if(_0x236c3a){return _0x236c3a[_0x3580('0x23')](_0x1a45b9)[_0x3580('0x24')](function(_0x5271f3){return _0x5271f3;});}return null;};}function removeEntity(_0x1cf973,_0xd3f502){return function(_0x43ff65){if(_0x43ff65){return _0x43ff65[_0x3580('0x25')]()[_0x3580('0x24')](function(){_0x1cf973[_0x3580('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x202cb6,_0x1d57d7){return function(_0x5bc131){if(!_0x5bc131){_0x202cb6['sendStatus'](0x194);}return _0x5bc131;};}function handleError(_0x30c878,_0x13fbfe){_0x13fbfe=_0x13fbfe||0x1f4;return function(_0x326788){logger['error'](_0x326788[_0x3580('0x26')]);if(_0x326788[_0x3580('0x27')]){delete _0x326788[_0x3580('0x27')];}_0x30c878['status'](_0x13fbfe)[_0x3580('0x28')](_0x326788);};}exports['index']=function(_0x3a5773,_0x56f267){var _0x5976d3={},_0x1e46c1={},_0x238f4b={'count':0x0,'rows':[]};var _0x245258=_['map'](db['OpenchannelApplication'][_0x3580('0x29')],function(_0x3ea7dd){return{'name':_0x3ea7dd['fieldName'],'type':_0x3ea7dd[_0x3580('0x2a')][_0x3580('0x2b')]};});_0x1e46c1[_0x3580('0x2c')]=_[_0x3580('0x2d')](_0x245258,_0x3580('0x27'));_0x1e46c1[_0x3580('0x2e')]=_[_0x3580('0x2f')](_0x3a5773[_0x3580('0x2e')]);_0x1e46c1[_0x3580('0x30')]=_[_0x3580('0x31')](_0x1e46c1[_0x3580('0x2c')],_0x1e46c1['query']);_0x5976d3[_0x3580('0x32')]=_[_0x3580('0x31')](_0x1e46c1[_0x3580('0x2c')],qs[_0x3580('0x33')](_0x3a5773[_0x3580('0x2e')][_0x3580('0x33')]));_0x5976d3[_0x3580('0x32')]=_0x5976d3[_0x3580('0x32')]['length']?_0x5976d3[_0x3580('0x32')]:_0x1e46c1[_0x3580('0x2c')];if(!_0x3a5773['query'][_0x3580('0x34')]('nolimit')){_0x5976d3[_0x3580('0x1b')]=qs[_0x3580('0x1b')](_0x3a5773[_0x3580('0x2e')][_0x3580('0x1b')]);_0x5976d3[_0x3580('0x1e')]=qs[_0x3580('0x1e')](_0x3a5773[_0x3580('0x2e')][_0x3580('0x1e')]);}_0x5976d3[_0x3580('0x35')]=qs[_0x3580('0x36')](_0x3a5773[_0x3580('0x2e')][_0x3580('0x36')]);_0x5976d3[_0x3580('0x37')]=qs[_0x3580('0x30')](_['pick'](_0x3a5773[_0x3580('0x2e')],_0x1e46c1['filters']),_0x245258);if(_0x3a5773[_0x3580('0x2e')][_0x3580('0x38')]){_0x5976d3['where']=_[_0x3580('0x39')](_0x5976d3[_0x3580('0x37')],{'$or':_['map'](_0x245258,function(_0x443c27){if(_0x443c27[_0x3580('0x2a')]!==_0x3580('0x3a')){var _0xb15a31={};_0xb15a31[_0x443c27['name']]={'$like':'%'+_0x3a5773['query'][_0x3580('0x38')]+'%'};return _0xb15a31;}})});}_0x5976d3=_[_0x3580('0x39')]({},_0x5976d3,_0x3a5773[_0x3580('0x3b')]);var _0x5cd5fb={'where':_0x5976d3['where']};return db['OpenchannelApplication'][_0x3580('0x1d')](_0x5cd5fb)[_0x3580('0x24')](function(_0x4effa4){_0x238f4b['count']=_0x4effa4;if(_0x3a5773[_0x3580('0x2e')][_0x3580('0x3c')]){_0x5976d3[_0x3580('0x3d')]=[{'all':!![]}];}return db['OpenchannelApplication'][_0x3580('0x3e')](_0x5976d3);})['then'](function(_0x3ec64d){_0x238f4b[_0x3580('0x3f')]=_0x3ec64d;return _0x238f4b;})[_0x3580('0x24')](respondWithFilteredResult(_0x56f267,_0x5976d3))['catch'](handleError(_0x56f267,null));};exports[_0x3580('0x40')]=function(_0x460bb3,_0x584707){var _0x17b428={'raw':!![],'where':{'id':_0x460bb3['params']['id']}},_0x48d518={};_0x48d518[_0x3580('0x2c')]=_[_0x3580('0x2f')](db[_0x3580('0x41')]['rawAttributes']);_0x48d518[_0x3580('0x2e')]=_['keys'](_0x460bb3['query']);_0x48d518[_0x3580('0x30')]=_['intersection'](_0x48d518['model'],_0x48d518[_0x3580('0x2e')]);_0x17b428[_0x3580('0x32')]=_[_0x3580('0x31')](_0x48d518[_0x3580('0x2c')],qs['fields'](_0x460bb3[_0x3580('0x2e')][_0x3580('0x33')]));_0x17b428[_0x3580('0x32')]=_0x17b428[_0x3580('0x32')][_0x3580('0x42')]?_0x17b428['attributes']:_0x48d518[_0x3580('0x2c')];if(_0x460bb3[_0x3580('0x2e')][_0x3580('0x3c')]){_0x17b428[_0x3580('0x3d')]=[{'all':!![]}];}_0x17b428=_[_0x3580('0x39')]({},_0x17b428,_0x460bb3['options']);return db[_0x3580('0x41')][_0x3580('0x43')](_0x17b428)['then'](handleEntityNotFound(_0x584707,null))[_0x3580('0x24')](respondWithResult(_0x584707,null))[_0x3580('0x44')](handleError(_0x584707,null));};exports['create']=function(_0x3b380f,_0x45c972){return db[_0x3580('0x41')][_0x3580('0x45')](_0x3b380f['body'],{})[_0x3580('0x24')](respondWithResult(_0x45c972,0xc9))[_0x3580('0x44')](handleError(_0x45c972,null));};exports['update']=function(_0x124d17,_0x4a31d9){if(_0x124d17[_0x3580('0x46')]['id']){delete _0x124d17[_0x3580('0x46')]['id'];}return db[_0x3580('0x41')][_0x3580('0x43')]({'where':{'id':_0x124d17[_0x3580('0x47')]['id']}})[_0x3580('0x24')](handleEntityNotFound(_0x4a31d9,null))[_0x3580('0x24')](saveUpdates(_0x124d17[_0x3580('0x46')],null))[_0x3580('0x24')](respondWithResult(_0x4a31d9,null))[_0x3580('0x44')](handleError(_0x4a31d9,null));};exports[_0x3580('0x25')]=function(_0x469974,_0x1d0f37){return db[_0x3580('0x41')][_0x3580('0x43')]({'where':{'id':_0x469974[_0x3580('0x47')]['id']}})['then'](handleEntityNotFound(_0x1d0f37,null))[_0x3580('0x24')](removeEntity(_0x1d0f37,null))[_0x3580('0x44')](handleError(_0x1d0f37,null));}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.model.js b/server/api/openchannelApplication/openchannelApplication.model.js index 42e21fc..7619059 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 _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 +var _0x5815=['moment','bluebird','rimraf','./openchannelApplication.attributes','define','OpenchannelApplication','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','../../config/logger','api'];(function(_0x1b966e,_0x1a5fdd){var _0x4c90d4=function(_0xfaaf32){while(--_0xfaaf32){_0x1b966e['push'](_0x1b966e['shift']());}};_0x4c90d4(++_0x1a5fdd);}(_0x5815,0x1ed));var _0x5581=function(_0x87a706,_0x116dd0){_0x87a706=_0x87a706-0x0;var _0x52a464=_0x5815[_0x87a706];return _0x52a464;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x5581('0x0'))(_0x5581('0x1'));var moment=require(_0x5581('0x2'));var BPromise=require(_0x5581('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x5581('0x4'));var config=require('../../config/environment');var attributes=require(_0x5581('0x5'));module['exports']=function(_0x48c22c,_0x2ca03f){return _0x48c22c[_0x5581('0x6')](_0x5581('0x7'),attributes,{'tableName':_0x5581('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5581('0x9'),'collate':_0x5581('0xa')});}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.rpc.js b/server/api/openchannelApplication/openchannelApplication.rpc.js index 12936ad..e1137e0 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 _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 +var _0xe44d=['stringify','error','code','message','result','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','options','raw','where','attributes','limit','then','debug','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','OpenchannelApplication,\x20%s,\x20%s,\x20%s'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe44d,0x118));var _0xde44=function(_0x26462c,_0xd20a35){_0x26462c=_0x26462c-0x0;var _0x509a42=_0xe44d[_0x26462c];return _0x509a42;};'use strict';var _=require(_0xde44('0x0'));var util=require('util');var moment=require(_0xde44('0x1'));var BPromise=require(_0xde44('0x2'));var rs=require(_0xde44('0x3'));var fs=require('fs');var Redis=require(_0xde44('0x4'));var db=require(_0xde44('0x5'))['db'];var utils=require(_0xde44('0x6'));var logger=require(_0xde44('0x7'))('rpc');var config=require(_0xde44('0x8'));var jayson=require(_0xde44('0x9'));var client=jayson[_0xde44('0xa')][_0xde44('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x57ba29,_0x1a53d6,_0x5da359){return new BPromise(function(_0x305706,_0x37f48f){return client[_0xde44('0xc')](_0x57ba29,_0x5da359)['then'](function(_0x30e49b){logger[_0xde44('0xd')](_0xde44('0xe'),_0x1a53d6,_0xde44('0xf'));logger['debug'](_0xde44('0x10'),_0x1a53d6,_0xde44('0xf'),JSON[_0xde44('0x11')](_0x30e49b));if(_0x30e49b[_0xde44('0x12')]){if(_0x30e49b[_0xde44('0x12')][_0xde44('0x13')]===0x1f4){logger['error'](_0xde44('0xe'),_0x1a53d6,_0x30e49b[_0xde44('0x12')]['message']);return _0x37f48f(_0x30e49b[_0xde44('0x12')][_0xde44('0x14')]);}logger['error'](_0xde44('0xe'),_0x1a53d6,_0x30e49b[_0xde44('0x12')][_0xde44('0x14')]);return _0x305706(_0x30e49b[_0xde44('0x12')][_0xde44('0x14')]);}else{logger['info']('OpenchannelApplication,\x20%s,\x20%s',_0x1a53d6,_0xde44('0xf'));_0x305706(_0x30e49b[_0xde44('0x15')][_0xde44('0x14')]);}})[_0xde44('0x16')](function(_0x109c86){logger[_0xde44('0x12')](_0xde44('0xe'),_0x1a53d6,_0x109c86);_0x37f48f(_0x109c86);});});}exports[_0xde44('0x17')]=function(_0x412443){var _0x24862c=this;return new Promise(function(_0x29aa2b,_0x52e622){return db[_0xde44('0x18')][_0xde44('0x19')](_0x412443['body'],{'raw':_0x412443[_0xde44('0x1a')]?_0x412443['options'][_0xde44('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x412443[_0xde44('0x1a')]?_0x412443['options'][_0xde44('0x1c')]||null:null,'attributes':_0x412443[_0xde44('0x1a')]?_0x412443[_0xde44('0x1a')][_0xde44('0x1d')]||null:null,'limit':_0x412443[_0xde44('0x1a')]?_0x412443['options'][_0xde44('0x1e')]||null:null})[_0xde44('0x1f')](function(_0x4a5b3a){logger['info']('UpdateOpenchannelApplication',_0x412443);logger[_0xde44('0x20')](_0xde44('0x17'),_0x412443,JSON[_0xde44('0x11')](_0x4a5b3a));_0x29aa2b(_0x4a5b3a);})[_0xde44('0x16')](function(_0x463931){logger[_0xde44('0x12')](_0xde44('0x17'),_0x463931[_0xde44('0x14')],_0x412443);_0x52e622(_0x24862c[_0xde44('0x12')](0x1f4,_0x463931[_0xde44('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/index.js b/server/api/openchannelInteraction/index.js index 420b730..c57634e 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 _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 +var _0x39b9=['/describe','describe','/:id','/:id/messages','getMessages','/:id/download','download','post','addMessage','tracked','openchannel','openchannelinteraction:addtags','put','openchannelinteraction:update','update','delete','openchannelinteraction:destroy','/:id/tags','removeTags','exports','multer','util','express','fs-extra','../../components/interaction/service','../../config/environment','./openchannelInteraction.controller','get','isAuthenticated','index'];(function(_0x5bc27a,_0x32e2d1){var _0x2c8a4d=function(_0x1a7dd9){while(--_0x1a7dd9){_0x5bc27a['push'](_0x5bc27a['shift']());}};_0x2c8a4d(++_0x32e2d1);}(_0x39b9,0x19a));var _0x939b=function(_0x5249d3,_0x2cfcf7){_0x5249d3=_0x5249d3-0x0;var _0x19a882=_0x39b9[_0x5249d3];return _0x19a882;};'use strict';var multer=require(_0x939b('0x0'));var util=require(_0x939b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x939b('0x2'));var router=express['Router']();var fs_extra=require(_0x939b('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x939b('0x4'));var config=require(_0x939b('0x5'));var controller=require(_0x939b('0x6'));router[_0x939b('0x7')]('/',auth[_0x939b('0x8')](),controller[_0x939b('0x9')]);router[_0x939b('0x7')](_0x939b('0xa'),auth['isAuthenticated'](),controller[_0x939b('0xb')]);router[_0x939b('0x7')](_0x939b('0xc'),auth[_0x939b('0x8')](),controller['show']);router[_0x939b('0x7')](_0x939b('0xd'),auth[_0x939b('0x8')](),controller[_0x939b('0xe')]);router['get'](_0x939b('0xf'),auth[_0x939b('0x8')](),controller[_0x939b('0x10')]);router[_0x939b('0x11')]('/',auth[_0x939b('0x8')](),controller['create']);router[_0x939b('0x11')](_0x939b('0xd'),auth[_0x939b('0x8')](),controller[_0x939b('0x12')]);router[_0x939b('0x11')]('/:id/tags',auth[_0x939b('0x8')](),interaction[_0x939b('0x13')](_0x939b('0x14'),_0x939b('0x15')),controller['addTags']);router[_0x939b('0x16')](_0x939b('0xc'),auth[_0x939b('0x8')](),interaction[_0x939b('0x13')](_0x939b('0x14'),_0x939b('0x17')),controller[_0x939b('0x18')]);router[_0x939b('0x19')](_0x939b('0xc'),auth['isAuthenticated'](),interaction[_0x939b('0x13')](_0x939b('0x14'),_0x939b('0x1a')),controller['destroy']);router[_0x939b('0x19')](_0x939b('0x1b'),auth[_0x939b('0x8')](),controller[_0x939b('0x1c')]);module[_0x939b('0x1d')]=router; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.attributes.js b/server/api/openchannelInteraction/openchannelInteraction.attributes.js index 6bf6061..4141c01 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 _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 +var _0xe0cc=['exports','BOOLEAN','STRING','DATE','ENUM','out','sequelize'];(function(_0x10de99,_0xdd42d){var _0x8550e5=function(_0x3c1aae){while(--_0x3c1aae){_0x10de99['push'](_0x10de99['shift']());}};_0x8550e5(++_0xdd42d);}(_0xe0cc,0x1cd));var _0xce0c=function(_0x266757,_0x3dbc25){_0x266757=_0x266757-0x0;var _0x314a6b=_0xe0cc[_0x266757];return _0x314a6b;};'use strict';var Sequelize=require(_0xce0c('0x0'));module[_0xce0c('0x1')]={'closed':{'type':Sequelize[_0xce0c('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xce0c('0x3')]},'secondDisposition':{'type':Sequelize[_0xce0c('0x3')]},'thirdDisposition':{'type':Sequelize[_0xce0c('0x3')]},'note':{'type':Sequelize[_0xce0c('0x3')]},'read1stAt':{'type':Sequelize[_0xce0c('0x4')]},'threadId':{'type':Sequelize[_0xce0c('0x3')]},'externalUrl':{'type':Sequelize[_0xce0c('0x3')]},'lastMsgAt':{'type':Sequelize[_0xce0c('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xce0c('0x5')]('in',_0xce0c('0x6')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0xce0c('0x3')]},'autoreplyExecuted':{'type':Sequelize[_0xce0c('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.controller.js b/server/api/openchannelInteraction/openchannelInteraction.controller.js index 4861999..34e9c05 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 _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 +var _0xe862=['OpenchannelMessage','ids','omit','getMessages','findOne','sort','split','format','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','emit','openchannelInteractionTags:save','removeTags','download','unix','join','root','files','tmp','attachments','transcript-%d-%s.zip','CmContact','Contact','firstName','lastName','Attachment','Messages','direction','secret','OpenchannelAccount','Account','Owner','mkdirSync','Openchannel','N.A.','closed','closedAt','disposition','threadId','Public','Private','basename','existsSync','createReadStream','pipe','createWriteStream','System','renderFile','server','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','log','err','unlinkSync','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/export/pdf','api','../../config/license/util','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','update','destroy','then','error','name','send','Users','map','fullname','TagIds','forEach','Tags','push','catch','index','OpenchannelInteraction','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','where','pick','field','color','from','tools_tags','select','u.id','u.fullname','ui.OpenchannelInteractionId','user_has_openchannel_interactions','left_join','users','openchannel_interactions','cm_contacts','openchannel_accounts','a.id\x20=\x20i.OpenchannelAccountId','openchannel_messages','me.OpenchannelInteractionId\x20=\x20i.id','openchannel_interaction_has_tags','t.id\x20=\x20it.TagId','expr','search','sqlOperator','length','conditions','find','unreadMessages','value','having','`\x20=\x200','`\x20>\x200','$substring','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','ContactId','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','buildExpression','some','compact','isEmpty','OpenchannelAccountId','i.OpenchannelAccountId\x20IN\x20?','concat','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','isArray','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?','group','Sequelize','QueryTypes','SELECT','i.id','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','order','DESC','t.id\x20IN\x20?','resolve','i.OpenchannelAccountId\x20IS\x20NOT\x20NULL','user','role','agent','sequelize','toString','merge','Account.key','a.mandatoryDisposition','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','i.*','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.OpenchannelInteractionId\x20IN\x20?','groupBy','OpenchannelInteractionId','all','rows','show','params','includeAll','include','options','create','body','addMessage'];(function(_0x2b1fb7,_0x344277){var _0x1dcef3=function(_0x5944c4){while(--_0x5944c4){_0x2b1fb7['push'](_0x2b1fb7['shift']());}};_0x1dcef3(++_0x344277);}(_0xe862,0x130));var _0x2e86=function(_0x2b817a,_0x4bcba5){_0x2b817a=_0x2b817a-0x0;var _0x209041=_0xe862[_0x2b817a];return _0x209041;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2e86('0x0'));var jsonpatch=require(_0x2e86('0x1'));var rp=require(_0x2e86('0x2'));var moment=require(_0x2e86('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x2e86('0x4'));var util=require(_0x2e86('0x5'));var path=require(_0x2e86('0x6'));var sox=require(_0x2e86('0x7'));var csv=require(_0x2e86('0x8'));var ejs=require(_0x2e86('0x9'));var fs=require('fs');var fs_extra=require(_0x2e86('0xa'));var _=require(_0x2e86('0xb'));var squel=require(_0x2e86('0xc'));var crypto=require(_0x2e86('0xd'));var jsforce=require(_0x2e86('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2e86('0xf'));var Papa=require('papaparse');var Redis=require(_0x2e86('0x10'));var authService=require(_0x2e86('0x11'));var qs=require(_0x2e86('0x12'));var as=require('../../components/parsers/advancedSearch');var pdf=require(_0x2e86('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x2e86('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x2e86('0x15'));var db=require('../../mysqldb')['db'];config[_0x2e86('0x16')]=_[_0x2e86('0x17')](config[_0x2e86('0x16')],{'host':_0x2e86('0x18'),'port':0x18eb});var socket=require(_0x2e86('0x19'))(new Redis(config[_0x2e86('0x16')]));require('./openchannelInteraction.socket')[_0x2e86('0x1a')](socket);function respondWithStatusCode(_0x21f488,_0x31ffc9){_0x31ffc9=_0x31ffc9||0xcc;return function(_0x437481){if(_0x437481){return _0x21f488[_0x2e86('0x1b')](_0x31ffc9);}return _0x21f488[_0x2e86('0x1c')](_0x31ffc9)[_0x2e86('0x1d')]();};}function respondWithResult(_0x102251,_0x248f9e){_0x248f9e=_0x248f9e||0xc8;return function(_0x4d3371){if(_0x4d3371){return _0x102251[_0x2e86('0x1c')](_0x248f9e)[_0x2e86('0x1e')](_0x4d3371);}};}function respondWithFilteredResult(_0x352b2e,_0xf9ce36){return function(_0x5bf815){if(_0x5bf815){var _0x10ab69=typeof _0xf9ce36[_0x2e86('0x1f')]===_0x2e86('0x20')&&typeof _0xf9ce36['limit']===_0x2e86('0x20');var _0x1b8cb1=_0x5bf815[_0x2e86('0x21')];var _0x200c83=_0x10ab69?0x0:_0xf9ce36[_0x2e86('0x1f')];var _0x8a46d8=_0x10ab69?_0x5bf815[_0x2e86('0x21')]:_0xf9ce36[_0x2e86('0x1f')]+_0xf9ce36[_0x2e86('0x22')];var _0xfdd069;if(_0x8a46d8>=_0x1b8cb1){_0x8a46d8=_0x1b8cb1;_0xfdd069=0xc8;}else{_0xfdd069=0xce;}_0x352b2e[_0x2e86('0x1c')](_0xfdd069);return _0x352b2e[_0x2e86('0x23')](_0x2e86('0x24'),_0x200c83+'-'+_0x8a46d8+'/'+_0x1b8cb1)[_0x2e86('0x1e')](_0x5bf815);}return null;};}function patchUpdates(_0x569d5e){return function(_0x165fd){try{jsonpatch[_0x2e86('0x25')](_0x165fd,_0x569d5e,!![]);}catch(_0x354fbe){return BPromise[_0x2e86('0x26')](_0x354fbe);}return _0x165fd['save']();};}function saveUpdates(_0x55bd9e,_0x182cc6){return function(_0x3a8768){if(_0x3a8768){return _0x3a8768[_0x2e86('0x27')](_0x55bd9e)['then'](function(_0x7dc8f3){return _0x7dc8f3;});}return null;};}function removeEntity(_0x48dc86,_0x1c996e){return function(_0x56e117){if(_0x56e117){return _0x56e117[_0x2e86('0x28')]()[_0x2e86('0x29')](function(){_0x48dc86[_0x2e86('0x1c')](0xcc)[_0x2e86('0x1d')]();});}};}function handleEntityNotFound(_0x16071a,_0xf9363){return function(_0x4c90cf){if(!_0x4c90cf){_0x16071a[_0x2e86('0x1b')](0x194);}return _0x4c90cf;};}function handleError(_0x106a66,_0x453813){_0x453813=_0x453813||0x1f4;return function(_0x1c7198){logger[_0x2e86('0x2a')](_0x1c7198['stack']);if(_0x1c7198[_0x2e86('0x2b')]){delete _0x1c7198['name'];}_0x106a66[_0x2e86('0x1c')](_0x453813)[_0x2e86('0x2c')](_0x1c7198);};}function getInteractionUsers(_0x3a2d64,_0x4035bc){return new BPromise(function(_0x1c3e14,_0x5834cf){try{if(_0x4035bc[_0x3a2d64['id']]){_0x3a2d64[_0x2e86('0x2d')]=_[_0x2e86('0x2e')](_0x4035bc[_0x3a2d64['id']],function(_0x31ad70){return{'id':_0x31ad70['id'],'fullname':_0x31ad70[_0x2e86('0x2f')]};});}}catch(_0x239109){_0x5834cf(_0x239109);}_0x1c3e14(_0x3a2d64);});}function getInteractionTags(_0x3b1d01,_0x345872){return new BPromise(function(_0x51bdad,_0x1c6ae7){try{if(_0x3b1d01[_0x2e86('0x30')]){_0x3b1d01['Tags']=[];_0x3b1d01['TagIds']['split'](',')[_0x2e86('0x31')](function(_0x313b5e){_0x3b1d01[_0x2e86('0x32')][_0x2e86('0x33')](_0x345872[_0x313b5e]);});}delete _0x3b1d01['TagIds'];}catch(_0x51cffe){_0x1c6ae7(_0x51cffe);}_0x51bdad(_0x3b1d01);});}function updateOpenchannelInteraction(_0x37c676,_0xc1dca8,_0x2ad35d){return new BPromise(function(_0x274993,_0x4bd830){return getInteractionUsers(_0x37c676,_0x2ad35d)['then'](function(_0x355a1a){return getInteractionTags(_0x355a1a,_0xc1dca8);})['then'](function(_0x3af3dc){_0x274993(_0x3af3dc);})[_0x2e86('0x34')](function(_0x255983){_0x4bd830(_0x255983);});});}exports[_0x2e86('0x35')]=function(_0x2fc290,_0x3b89c3){var _0x1655a2={},_0x5e4244={},_0x6a3c72={'count':0x0,'rows':[]};var _0x1712c9=_[_0x2e86('0x2e')](db[_0x2e86('0x36')][_0x2e86('0x37')],function(_0x199d1a){return{'name':_0x199d1a[_0x2e86('0x38')],'type':_0x199d1a[_0x2e86('0x39')][_0x2e86('0x3a')]};});_0x5e4244[_0x2e86('0x3b')]=_['map'](_0x1712c9,'name');_0x5e4244['query']=_[_0x2e86('0x3c')](_0x2fc290[_0x2e86('0x3d')]);_0x5e4244[_0x2e86('0x3e')]=_[_0x2e86('0x3f')](_0x5e4244[_0x2e86('0x3b')],_0x5e4244[_0x2e86('0x3d')]);_0x1655a2[_0x2e86('0x40')]=_[_0x2e86('0x3f')](_0x5e4244[_0x2e86('0x3b')],qs[_0x2e86('0x41')](_0x2fc290['query'][_0x2e86('0x41')]));_0x1655a2[_0x2e86('0x40')]=_0x1655a2[_0x2e86('0x40')]['length']?_0x1655a2[_0x2e86('0x40')]:_0x5e4244[_0x2e86('0x3b')];if(!_0x2fc290['query'][_0x2e86('0x42')](_0x2e86('0x43'))){_0x1655a2[_0x2e86('0x22')]=qs[_0x2e86('0x22')](_0x2fc290['query'][_0x2e86('0x22')]);_0x1655a2[_0x2e86('0x1f')]=qs[_0x2e86('0x1f')](_0x2fc290['query'][_0x2e86('0x1f')]);}_0x1655a2['order']=qs['sort'](_0x2fc290[_0x2e86('0x3d')]['sort']);_0x1655a2[_0x2e86('0x44')]=qs['filters'](_[_0x2e86('0x45')](_0x2fc290[_0x2e86('0x3d')],_0x5e4244[_0x2e86('0x3e')]),_0x1712c9);var _0x5368b3=[];var _0x270598=squel['select']()[_0x2e86('0x46')]('id')[_0x2e86('0x46')](_0x2e86('0x2b'))[_0x2e86('0x46')](_0x2e86('0x47'))[_0x2e86('0x48')](_0x2e86('0x49'));var _0x37a31c=squel[_0x2e86('0x4a')]()['field'](_0x2e86('0x4b'))['field'](_0x2e86('0x4c'))[_0x2e86('0x46')](_0x2e86('0x4d'))['from'](_0x2e86('0x4e'),'ui')[_0x2e86('0x4f')](_0x2e86('0x50'),'u','u.id\x20=\x20ui.UserId');var _0x4cefb7=squel['select']()[_0x2e86('0x48')](_0x2e86('0x51'),'i')['left_join'](_0x2e86('0x52'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x2e86('0x4f')]('users','o','o.id\x20=\x20i.UserId')[_0x2e86('0x4f')](_0x2e86('0x53'),'a',_0x2e86('0x54'))[_0x2e86('0x4f')](_0x2e86('0x55'),'me',_0x2e86('0x56'))['left_join'](_0x2e86('0x57'),'it','it.OpenchannelInteractionId\x20=\x20i.id')[_0x2e86('0x4f')](_0x2e86('0x49'),'t',_0x2e86('0x58'));var _0x166075=squel[_0x2e86('0x59')]();var _0x5eb148=[];var _0x4063bc=squel[_0x2e86('0x59')]();var _0x2d195e;if(_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x5a')]){_0x2d195e=as['parseSearch'](_0x2fc290['query'][_0x2e86('0x5a')]);var _0xcbef42=_0x2d195e[_0x2e86('0x5b')];for(var _0xeded49=0x0;_0xeded49<_0x2d195e['conditions'][_0x2e86('0x5c')];_0xeded49++){var _0xe71c5a=_0x2d195e[_0x2e86('0x5d')][_0xeded49];var _0xff3018='i';var _0x3636e3=_[_0x2e86('0x5e')](_0x1712c9,['name',_0xe71c5a[_0x2e86('0x46')]]);if(!_0x3636e3){switch(_0xe71c5a['field']){case _0x2e86('0x5f'):if(_0xe71c5a[_0x2e86('0x60')]==0x1){_0x4cefb7[_0x2e86('0x61')]('`'+_0xe71c5a[_0x2e86('0x46')]+_0x2e86('0x62'));}else{_0x4cefb7[_0x2e86('0x61')]('`'+_0xe71c5a[_0x2e86('0x46')]+_0x2e86('0x63'));}break;case'Contact':if(_0xe71c5a['operator']===_0x2e86('0x64')){if(_0xe71c5a['value']['split']('\x20')[_0x2e86('0x5c')]>0x1){_0x166075[_0xcbef42](_0x2e86('0x65'),qs[_0x2e86('0x66')](_0xe71c5a['value']),null);}else{var _0x3ad066='%'+_0xe71c5a[_0x2e86('0x60')]+'%';_0x166075[_0xcbef42]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x3ad066,_0x3ad066,_0x3ad066);}}else{_0x3636e3=_['find'](_0x1712c9,[_0x2e86('0x2b'),_0x2e86('0x67')]);_0xe71c5a[_0x2e86('0x46')]=_0x2e86('0x67');_0x186036=as['buildExpression'](_0xff3018,_0x3636e3[_0x2e86('0x39')],_0xe71c5a);_0x166075[_0xcbef42](_0x186036[_0x2e86('0x68')],_0x186036[_0x2e86('0x60')][_0x2e86('0x69')],_0x186036[_0x2e86('0x60')][_0x2e86('0x1d')]);}break;case _0x2e86('0x6a'):var _0x51a78e=_0xe71c5a[_0x2e86('0x60')]['split'](',')[_0x2e86('0x2e')](function(_0x2390e2){return Number(_0x2390e2);});_0x51a78e[_0x2e86('0x31')](function(_0x3a9fb0){_0x4063bc['or'](_0x2e86('0x6b'),'%,'+_0x3a9fb0+',%');});_0x5eb148=_[_0x2e86('0x6c')](_0x5eb148,_0x51a78e);break;case _0x2e86('0x6d'):if(_0xe71c5a[_0x2e86('0x6e')]===_0x2e86('0x64')){_0x166075[_0xcbef42](_0x2e86('0x6f'),'%'+_0xe71c5a[_0x2e86('0x60')]+'%',null);}else{_0x3636e3=_[_0x2e86('0x5e')](_0x1712c9,['name',_0x2e86('0x70')]);_0xe71c5a[_0x2e86('0x46')]=_0x2e86('0x70');_0x186036=as[_0x2e86('0x71')](_0xff3018,_0x3636e3[_0x2e86('0x39')],_0xe71c5a);_0x166075[_0xcbef42](_0x186036[_0x2e86('0x68')],_0x186036[_0x2e86('0x60')][_0x2e86('0x69')],_0x186036[_0x2e86('0x60')][_0x2e86('0x1d')]);}break;case'body':_0x186036=as[_0x2e86('0x71')]('me',null,_0xe71c5a);_0x166075[_0xcbef42](_0x186036['text'],_0x186036['value'][_0x2e86('0x69')],_0x186036[_0x2e86('0x60')][_0x2e86('0x1d')]);break;}}else{var _0x186036=as['buildExpression'](_0xff3018,_0x3636e3[_0x2e86('0x39')],_0xe71c5a);_0x166075[_0xcbef42](_0x186036[_0x2e86('0x68')],_0x186036['value'][_0x2e86('0x69')],_0x186036[_0x2e86('0x60')][_0x2e86('0x1d')]);}}}else{var _0x4927bc=_(_0x2fc290[_0x2e86('0x3d')])['keys']()['map'](function(_0x41ef22){return _[_0x2e86('0x72')](_0x1712c9,[_0x2e86('0x2b'),_0x41ef22])?_0x41ef22:undefined;})[_0x2e86('0x73')]()['value']();if(!_[_0x2e86('0x74')](_0x4927bc)){_0x4927bc['forEach'](function(_0x385f8e){if(_0x385f8e===_0x2e86('0x75')){_0x4cefb7['where'](_0x2e86('0x76'),[][_0x2e86('0x77')](_0x2fc290[_0x2e86('0x3d')][_0x385f8e]));}else if(_0x385f8e===_0x2e86('0x78')){var _0x5240bb=JSON[_0x2e86('0x79')](_0x2fc290[_0x2e86('0x3d')][_0x385f8e])[_0x2e86('0x7a')];var _0x489b8e=JSON[_0x2e86('0x79')](_0x2fc290['query'][_0x385f8e])[_0x2e86('0x7b')];_0x4cefb7[_0x2e86('0x44')](_0x2e86('0x7c'),_0x5240bb,_0x489b8e);}else{if(_0x2fc290['query'][_0x385f8e]==='null'){_0x4cefb7[_0x2e86('0x44')]('i.'+_0x385f8e+_0x2e86('0x7d'));}else{_0x4cefb7[_0x2e86('0x44')]('i.'+_0x385f8e+_0x2e86('0x7e'),_0x2fc290['query'][_0x385f8e]);}}});}if(_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x7f')]){if(_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x7f')]==0x1){_0x4cefb7[_0x2e86('0x61')](_0x2e86('0x80'));}else{_0x4cefb7[_0x2e86('0x61')](_0x2e86('0x81'));}}if(_0x2fc290['query'][_0x2e86('0x82')]){_0x5eb148=_[_0x2e86('0x83')](_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x82')])?_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x82')]:new Array(_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x82')]);_0x5eb148[_0x2e86('0x31')](function(_0x15549a){_0x4063bc['or'](_0x2e86('0x6b'),'%,'+_0x15549a+',%');});}if(_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x84')]){var _0x53892b=_0x2fc290['query'][_0x2e86('0x84')][_0x2e86('0x85')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs[_0x2e86('0x86')](_0x53892b)){_0x166075['or'](_0x2e86('0x87'),_0x53892b+'%');}else{_0x166075['or'](_0x2e86('0x88'),qs[_0x2e86('0x66')](_0x53892b))['or']('i.from\x20LIKE\x20?',_0x53892b+'%')['or'](_0x2e86('0x89'),_0x53892b+'%');}}}_0x4cefb7[_0x2e86('0x44')](_0x166075);_0x4cefb7[_0x2e86('0x8a')]('i.id');var _0x32bdd5={'type':db[_0x2e86('0x8b')][_0x2e86('0x8c')][_0x2e86('0x8d')],'raw':!![]};var _0x56455f=_0x4cefb7['clone']();_0x56455f['field'](_0x2e86('0x8e'));_0x56455f[_0x2e86('0x46')](_0x2e86('0x8f'),'unreadMessages');if(_0x1655a2['order']){_0x1655a2['order'][_0x2e86('0x31')](function(_0x2ab43f){var _0x326201=_0x2ab43f[0x0]===_0x2e86('0x90')?_0x2ab43f[0x0]:'i.'+_0x2ab43f[0x0];_0x4cefb7[_0x2e86('0x91')](_0x326201,_0x2ab43f[0x1]===_0x2e86('0x92')?![]:!![]);});}if(!_['isEmpty'](_0x5eb148)){_0x4cefb7[_0x2e86('0x61')](_0x4063bc);_0x56455f[_0x2e86('0x44')](_0x2e86('0x93'),_0x5eb148);}BPromise[_0x2e86('0x94')]()[_0x2e86('0x29')](function(){if(!_0x2d195e){if(_0x2fc290['query'][_0x2e86('0x75')])return;_0x56455f[_0x2e86('0x44')](_0x2e86('0x95'));_0x4cefb7[_0x2e86('0x44')]('i.OpenchannelAccountId\x20IS\x20NOT\x20NULL');return;}if(_0x2fc290[_0x2e86('0x96')][_0x2e86('0x97')]!==_0x2e86('0x98'))return;return _0x2fc290[_0x2e86('0x96')]['getOpenchannelAccounts']({'attributes':['id'],'raw':!![]})[_0x2e86('0x29')](function(_0x3e1aee){if(_[_0x2e86('0x74')](_0x3e1aee)){_0x56455f[_0x2e86('0x44')]('i.OpenchannelAccountId\x20IS\x20NULL');_0x4cefb7['where']('i.OpenchannelAccountId\x20IS\x20NULL');}else{_0x56455f[_0x2e86('0x44')](_0x2e86('0x76'),_[_0x2e86('0x2e')](_0x3e1aee,'id'));_0x4cefb7['where'](_0x2e86('0x76'),_['map'](_0x3e1aee,'id'));}});})[_0x2e86('0x29')](function(){if(_0x2fc290['user'][_0x2e86('0x97')]==='agent'&&!_0x2d195e&&!_0x2fc290[_0x2e86('0x3d')][_0x2e86('0x75')])return[];return db[_0x2e86('0x99')][_0x2e86('0x3d')](_0x56455f[_0x2e86('0x9a')](),_0x32bdd5);})[_0x2e86('0x29')](function(_0x36aa4f){_0x6a3c72[_0x2e86('0x21')]=_0x36aa4f[_0x2e86('0x5c')];if(_0x6a3c72['count']===0x0)return[];return db['sequelize']['query'](_0x270598['toString'](),_0x32bdd5)[_0x2e86('0x29')](function(_0x3d5ed2){_0x5368b3=_['keyBy'](_0x3d5ed2,'id');_0x32bdd5=_[_0x2e86('0x9b')](_0x32bdd5,{'model':db['OpenchannelInteraction'],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2fc290['query'][_0x2e86('0x41')]){_0x1655a2[_0x2e86('0x40')][_0x2e86('0x31')](function(_0x1a996c){_0x4cefb7[_0x2e86('0x46')]('i.'+_0x1a996c);});}else{_0x4cefb7[_0x2e86('0x46')](_0x2e86('0x8f'),_0x2e86('0x5f'));_0x4cefb7[_0x2e86('0x46')]('a.key',_0x2e86('0x9c'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0x9d'),_0x2e86('0x9e'));_0x4cefb7['field'](_0x2e86('0x9f'),_0x2e86('0x90'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xa0'));_0x4cefb7[_0x2e86('0x46')]('c.firstName',_0x2e86('0xa1'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xa2'),_0x2e86('0xa3'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xa4'),_0x2e86('0xa5'));_0x4cefb7['field'](_0x2e86('0xa6'),'Contact.phone');_0x4cefb7['field'](_0x2e86('0xa7'),_0x2e86('0xa8'));_0x4cefb7['field'](_0x2e86('0xa9'),_0x2e86('0xaa'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xab'),_0x2e86('0xac'));_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xad'),'Owner.internal');_0x4cefb7[_0x2e86('0x46')](_0x2e86('0xae'),_0x2e86('0x30'));}if(_0x1655a2['limit'])_0x4cefb7[_0x2e86('0x22')](_0x1655a2[_0x2e86('0x22')]);if(_0x1655a2[_0x2e86('0x1f')])_0x4cefb7[_0x2e86('0x1f')](_0x1655a2[_0x2e86('0x1f')]);return db['sequelize'][_0x2e86('0x3d')](_0x4cefb7[_0x2e86('0x9a')](),_0x32bdd5);})[_0x2e86('0x29')](function(_0x42a085){if(_0x42a085[_0x2e86('0x5c')]>0x0)_0x37a31c['where'](_0x2e86('0xaf'),_[_0x2e86('0x2e')](_0x42a085,'id'));return db['sequelize'][_0x2e86('0x3d')](_0x37a31c[_0x2e86('0x9a')](),_0x32bdd5)[_0x2e86('0x29')](function(_0x490d55){var _0x4d4fd4=_[_0x2e86('0xb0')](_0x490d55,_0x2e86('0xb1'));var _0x5270bb=[];_0x42a085['forEach'](function(_0x439bbb){_0x5270bb['push'](updateOpenchannelInteraction(_0x439bbb,_0x5368b3,_0x4d4fd4));});return BPromise[_0x2e86('0xb2')](_0x5270bb);});});})[_0x2e86('0x29')](function(_0x1b0b3f){_0x6a3c72[_0x2e86('0xb3')]=_0x1b0b3f;return _0x6a3c72;})['then'](respondWithFilteredResult(_0x3b89c3,_0x1655a2))[_0x2e86('0x34')](handleError(_0x3b89c3,null));};exports[_0x2e86('0xb4')]=function(_0x24892d,_0x730bb9){var _0x20632a={};if(_0x24892d[_0x2e86('0x3d')][_0x2e86('0x39')]&&_0x24892d[_0x2e86('0x3d')][_0x2e86('0x39')]===_0x2e86('0x48')){_0x20632a[_0x2e86('0x48')]=_0x24892d[_0x2e86('0xb5')]['id'];}else{_0x20632a['id']=_0x24892d[_0x2e86('0xb5')]['id'];}var _0x1ae9a0={'raw':![],'where':_0x20632a},_0x1f3808={};_0x1f3808[_0x2e86('0x3b')]=_[_0x2e86('0x3c')](db['OpenchannelInteraction'][_0x2e86('0x37')]);_0x1f3808[_0x2e86('0x3d')]=_['keys'](_0x24892d['query']);_0x1f3808[_0x2e86('0x3e')]=_['intersection'](_0x1f3808[_0x2e86('0x3b')],_0x1f3808[_0x2e86('0x3d')]);_0x1ae9a0[_0x2e86('0x40')]=_['intersection'](_0x1f3808[_0x2e86('0x3b')],qs[_0x2e86('0x41')](_0x24892d[_0x2e86('0x3d')][_0x2e86('0x41')]));_0x1ae9a0['attributes']=_0x1ae9a0[_0x2e86('0x40')][_0x2e86('0x5c')]?_0x1ae9a0[_0x2e86('0x40')]:_0x1f3808[_0x2e86('0x3b')];if(_0x24892d[_0x2e86('0x3d')][_0x2e86('0xb6')]){_0x1ae9a0[_0x2e86('0xb7')]=[{'all':!![]}];}_0x1ae9a0=_[_0x2e86('0x9b')]({},_0x1ae9a0,_0x24892d[_0x2e86('0xb8')]);return db[_0x2e86('0x36')]['find'](_0x1ae9a0)[_0x2e86('0x29')](handleEntityNotFound(_0x730bb9,null))[_0x2e86('0x29')](respondWithResult(_0x730bb9,null))[_0x2e86('0x34')](handleError(_0x730bb9,null));};exports[_0x2e86('0xb9')]=function(_0x23e009,_0xd5d2b8){return db[_0x2e86('0x36')][_0x2e86('0xb9')](_0x23e009['body'],{})[_0x2e86('0x29')](respondWithResult(_0xd5d2b8,0xc9))['catch'](handleError(_0xd5d2b8,null));};exports[_0x2e86('0x27')]=function(_0xb5ac1,_0x2d44de){if(_0xb5ac1['body']['id']){delete _0xb5ac1[_0x2e86('0xba')]['id'];}return db[_0x2e86('0x36')][_0x2e86('0x5e')]({'where':{'id':_0xb5ac1[_0x2e86('0xb5')]['id']}})[_0x2e86('0x29')](handleEntityNotFound(_0x2d44de,null))[_0x2e86('0x29')](saveUpdates(_0xb5ac1[_0x2e86('0xba')],null))['then'](respondWithResult(_0x2d44de,null))['catch'](handleError(_0x2d44de,null));};exports[_0x2e86('0x28')]=function(_0x531d13,_0x5de79e){return db[_0x2e86('0x36')][_0x2e86('0x5e')]({'where':{'id':_0x531d13[_0x2e86('0xb5')]['id']}})[_0x2e86('0x29')](handleEntityNotFound(_0x5de79e,null))[_0x2e86('0x29')](removeEntity(_0x5de79e,null))[_0x2e86('0x34')](handleError(_0x5de79e,null));};exports['describe']=function(_0x3f04a0,_0x111b58){return db[_0x2e86('0x36')]['describe']()[_0x2e86('0x29')](respondWithResult(_0x111b58,null))['catch'](handleError(_0x111b58,null));};exports[_0x2e86('0xbb')]=function(_0x17a49b,_0x1ac610,_0xb2ae8f){return db[_0x2e86('0xbc')][_0x2e86('0x5e')]({'where':{'id':_0x17a49b[_0x2e86('0xb5')]['id']}})[_0x2e86('0x29')](handleEntityNotFound(_0x1ac610,null))[_0x2e86('0x29')](function(_0x40e769){if(_0x40e769){return _0x40e769['addMessage'](_0x17a49b[_0x2e86('0xba')][_0x2e86('0xbd')],_[_0x2e86('0xbe')](_0x17a49b[_0x2e86('0xba')],[_0x2e86('0xbd'),'id'])||{});}})['then'](respondWithResult(_0x1ac610,null))[_0x2e86('0x34')](handleError(_0x1ac610,null));};exports[_0x2e86('0xbf')]=function(_0x51076b,_0x42b851,_0x4838dd){var _0x1f5bf9={'raw':![],'where':{}};var _0x2d1d67={};var _0x4aeee8={'count':0x0,'rows':[]};return db[_0x2e86('0x36')][_0x2e86('0xc0')]({'where':{'id':_0x51076b[_0x2e86('0xb5')]['id']}})['then'](handleEntityNotFound(_0x42b851,null))[_0x2e86('0x29')](function(_0x2a44f7){if(_0x2a44f7){_0x2d1d67[_0x2e86('0x3b')]=_[_0x2e86('0x3c')](db[_0x2e86('0xbc')][_0x2e86('0x37')]);_0x2d1d67[_0x2e86('0x3d')]=_[_0x2e86('0x3c')](_0x51076b['query']);_0x2d1d67['filters']=_[_0x2e86('0x3f')](_0x2d1d67['model'],_0x2d1d67[_0x2e86('0x3d')]);_0x1f5bf9[_0x2e86('0x40')]=_[_0x2e86('0x3f')](_0x2d1d67[_0x2e86('0x3b')],qs[_0x2e86('0x41')](_0x51076b[_0x2e86('0x3d')][_0x2e86('0x41')]));_0x1f5bf9[_0x2e86('0x40')]=_0x1f5bf9[_0x2e86('0x40')]['length']?_0x1f5bf9[_0x2e86('0x40')]:_0x2d1d67['model'];if(!_0x51076b['query']['hasOwnProperty'](_0x2e86('0x43'))){_0x1f5bf9[_0x2e86('0x22')]=qs['limit'](_0x51076b['query'][_0x2e86('0x22')]);_0x1f5bf9[_0x2e86('0x1f')]=qs[_0x2e86('0x1f')](_0x51076b[_0x2e86('0x3d')][_0x2e86('0x1f')]);}_0x1f5bf9[_0x2e86('0x91')]=qs[_0x2e86('0xc1')](_0x51076b[_0x2e86('0x3d')][_0x2e86('0xc1')]);_0x1f5bf9[_0x2e86('0x44')]=qs[_0x2e86('0x3e')](_[_0x2e86('0x45')](_0x51076b['query'],_0x2d1d67[_0x2e86('0x3e')]));_0x1f5bf9['where'][_0x2e86('0xb1')]=_0x2a44f7['id'];if(_0x51076b[_0x2e86('0x3d')][_0x2e86('0x84')]){_0x1f5bf9[_0x2e86('0x44')]=_[_0x2e86('0x9b')](_0x1f5bf9[_0x2e86('0x44')],{'$or':_['map'](_0x1f5bf9[_0x2e86('0x40')],function(_0x1f70ff){var _0x5e37a7={};_0x5e37a7[_0x1f70ff]={'$like':'%'+_0x51076b[_0x2e86('0x3d')][_0x2e86('0x84')]+'%'};return _0x5e37a7;})});}if(_0x51076b['query'][_0x2e86('0x7a')]){var _0x146069=_0x51076b[_0x2e86('0x3d')][_0x2e86('0x7a')][_0x2e86('0xc2')](',');var _0xc4a192={};_0xc4a192[_0x146069[0x0]]={'$gte':moment(_0x146069[0x1])[_0x2e86('0xc3')](_0x2e86('0xc4'))};_0x1f5bf9['where']=_[_0x2e86('0x9b')](_0x1f5bf9[_0x2e86('0x44')],_0xc4a192);}_0x1f5bf9=_[_0x2e86('0x9b')]({},_0x1f5bf9,_0x51076b[_0x2e86('0xb8')]);return db[_0x2e86('0xbc')][_0x2e86('0x21')]({'where':_0x1f5bf9[_0x2e86('0x44')]})[_0x2e86('0x29')](function(_0x34e9fd){_0x4aeee8['count']=_0x34e9fd;if(_0x51076b[_0x2e86('0x3d')][_0x2e86('0xb6')]){_0x1f5bf9[_0x2e86('0xb7')]=[{'all':!![]}];}return db[_0x2e86('0xbc')][_0x2e86('0xc5')](_0x1f5bf9);})[_0x2e86('0x29')](function(_0x162bb1){_0x4aeee8[_0x2e86('0xb3')]=_0x162bb1;return _0x4aeee8;});}})[_0x2e86('0x29')](respondWithFilteredResult(_0x42b851,_0x1f5bf9))[_0x2e86('0x34')](handleError(_0x42b851,null));};exports[_0x2e86('0xc6')]=function(_0x332caf,_0x26577f,_0x472b9f){return db[_0x2e86('0x36')][_0x2e86('0x5e')]({'where':{'id':_0x332caf['params']['id']}})[_0x2e86('0x29')](handleEntityNotFound(_0x26577f,null))[_0x2e86('0x29')](function(_0x375c78){if(_0x375c78){return _0x375c78['setTags'](_0x332caf[_0x2e86('0xba')][_0x2e86('0xbd')],_[_0x2e86('0xbe')](_0x332caf[_0x2e86('0xba')],[_0x2e86('0xbd'),'id'])||{})['spread'](function(){return db['Tag'][_0x2e86('0xc5')]({'attributes':['id','name',_0x2e86('0x47')],'where':{'id':_0x332caf['body'][_0x2e86('0xbd')]}});})[_0x2e86('0x29')](function(_0x2b223e){socket[_0x2e86('0xc7')](_0x2e86('0xc8'),{'id':Number(_0x332caf[_0x2e86('0xb5')]['id']),'tags':_0x2b223e||[]});return{'id':Number(_0x332caf['params']['id']),'tags':_0x2b223e||[]};});}})[_0x2e86('0x29')](respondWithResult(_0x26577f,null))[_0x2e86('0x34')](handleError(_0x26577f,null));};exports[_0x2e86('0xc9')]=function(_0x3d267a,_0x3f1075,_0x1f275a){return db[_0x2e86('0x36')][_0x2e86('0x5e')]({'where':{'id':_0x3d267a[_0x2e86('0xb5')]['id']}})[_0x2e86('0x29')](handleEntityNotFound(_0x3f1075,null))[_0x2e86('0x29')](function(_0x3aede8){if(_0x3aede8){return _0x3aede8[_0x2e86('0xc9')](_0x3d267a[_0x2e86('0x3d')][_0x2e86('0xbd')]);}})['then'](respondWithStatusCode(_0x3f1075,null))[_0x2e86('0x34')](handleError(_0x3f1075,null));};exports[_0x2e86('0xca')]=function(_0x474d4f,_0x3c3436){var _0x323844=moment()[_0x2e86('0xcb')]()['toString']();var _0x391828=path[_0x2e86('0xcc')](config[_0x2e86('0xcd')],'server',_0x2e86('0xce'),_0x2e86('0xcf'));var _0x4750c9=path[_0x2e86('0xcc')](config[_0x2e86('0xcd')],'server',_0x2e86('0xce'),_0x2e86('0xd0'));var _0x22a5a7=path[_0x2e86('0xcc')](_0x391828,_0x323844);var _0x2c561b=util['format'](_0x2e86('0xd1'),_0x474d4f['params']['id'],_0x323844);var _0x345c29=path[_0x2e86('0xcc')](_0x391828,_0x2c561b);var _0x155ba6=[];_0x155ba6['push']({'model':db[_0x2e86('0x6d')],'as':_0x2e86('0x6d'),'attributes':['id',_0x2e86('0x2f')],'raw':!![]});_0x155ba6[_0x2e86('0x33')]({'model':db[_0x2e86('0xd2')],'as':_0x2e86('0xd3'),'attributes':['id',_0x2e86('0xd4'),_0x2e86('0xd5')],'raw':!![]});if(_0x474d4f['query'][_0x2e86('0xd0')]){_0x155ba6[_0x2e86('0x33')]({'model':db[_0x2e86('0xd6')],'as':_0x2e86('0xd6'),'raw':!![]});}var _0x529ae8=[{'model':db[_0x2e86('0xbc')],'as':_0x2e86('0xd7'),'attributes':['id',_0x2e86('0xba'),_0x2e86('0x78'),_0x2e86('0xd8'),_0x2e86('0xd9'),_0x2e86('0x7f')],'include':_0x155ba6}];_0x529ae8[_0x2e86('0x33')]({'model':db[_0x2e86('0xda')],'as':_0x2e86('0xdb'),'attributes':['id',_0x2e86('0x2b')]});_0x529ae8['push']({'model':db[_0x2e86('0x6d')],'as':_0x2e86('0xdc'),'attributes':['id',_0x2e86('0x2f')]});return db[_0x2e86('0x36')][_0x2e86('0x5e')]({'where':{'id':_0x474d4f[_0x2e86('0xb5')]['id']},'include':_0x529ae8})[_0x2e86('0x29')](handleEntityNotFound(_0x3c3436,null))[_0x2e86('0x29')](function(_0x1d6f47){if(_0x1d6f47){var _0x324f3f=_0x1d6f47['get']({'plain':!![]});fs[_0x2e86('0xdd')](_0x22a5a7);var _0x9628f6={'channel':_0x2e86('0xde'),'account':_0x324f3f['Account'][_0x2e86('0x2b')],'agent':_0x324f3f[_0x2e86('0xdc')]?_0x324f3f[_0x2e86('0xdc')][_0x2e86('0x2f')]:_0x2e86('0xdf'),'createdAt':moment(_0x324f3f[_0x2e86('0x78')])['format'](_0x2e86('0xc4'))[_0x2e86('0x9a')](),'closedAt':_0x324f3f[_0x2e86('0xe0')]?moment(_0x324f3f[_0x2e86('0xe1')])[_0x2e86('0xc3')](_0x2e86('0xc4'))[_0x2e86('0x9a')]():'','disposition':_0x324f3f[_0x2e86('0xe2')],'visibility':_0x324f3f[_0x2e86('0xe3')]?_0x2e86('0xe4'):_0x2e86('0xe5'),'messages':_(_0x324f3f[_0x2e86('0xd7')])[_0x2e86('0x84')]({'secret':![]})[_0x2e86('0x2e')](function(_0xff5fd7){if(_0xff5fd7[_0x2e86('0xd6')]){var _0x54a8aa=path[_0x2e86('0xcc')](_0x4750c9,_0xff5fd7[_0x2e86('0xd6')][_0x2e86('0xe6')]);if(fs[_0x2e86('0xe7')](_0x54a8aa)){fs[_0x2e86('0xe8')](_0x54a8aa)[_0x2e86('0xe9')](fs[_0x2e86('0xea')](path[_0x2e86('0xcc')](_0x22a5a7,_0xff5fd7[_0x2e86('0xd6')][_0x2e86('0xe6')])));}}return{'date':moment(_0xff5fd7[_0x2e86('0x78')])[_0x2e86('0xc3')](_0x2e86('0xc4'))[_0x2e86('0x9a')](),'sender':_0xff5fd7[_0x2e86('0xd8')]==='out'?_0xff5fd7[_0x2e86('0x6d')]?_0xff5fd7[_0x2e86('0x6d')][_0x2e86('0x2f')]:_0x2e86('0xeb'):_0xff5fd7[_0x2e86('0xd3')][_0x2e86('0xd4')]+(_0xff5fd7['Contact'][_0x2e86('0xd5')]?'\x20'+_0xff5fd7[_0x2e86('0xd3')][_0x2e86('0xd5')]:''),'body':_0xff5fd7[_0x2e86('0xd6')]?_0xff5fd7[_0x2e86('0xd6')][_0x2e86('0xe6')]:_0xff5fd7[_0x2e86('0xba')],'direction':_0xff5fd7[_0x2e86('0xd8')]==='out'?'A':'C','secret':_0xff5fd7[_0x2e86('0xd9')],'read':_0xff5fd7[_0x2e86('0x7f')],'attachment':_0xff5fd7[_0x2e86('0xd6')]};})[_0x2e86('0x60')]()};return ejs[_0x2e86('0xec')](path[_0x2e86('0xcc')](config[_0x2e86('0xcd')],_0x2e86('0xed'),_0x2e86('0xee'),_0x2e86('0xef')),{'interaction':_0x9628f6})[_0x2e86('0x29')](function(_0x238f3a){var _0x328612=path['join'](_0x22a5a7,_0x2e86('0xf0')+_0x324f3f['id']+'-'+_0x323844+_0x2e86('0xf1'));var _0x8e5012={'path':_0x328612,'channel':'Openchannel','interactionId':_0x324f3f['id']};return pdf[_0x2e86('0xf2')](_0x238f3a,_0x8e5012);})[_0x2e86('0x29')](function(){return new BPromise(function(_0x5e8c21,_0x20b76f){zipdir(_0x22a5a7,{'saveTo':_0x345c29},function(_0x2ed64c,_0x212213){if(_0x2ed64c)return _0x20b76f(_0x2ed64c);return _0x5e8c21(_0x212213);});})[_0x2e86('0x29')](function(){return new BPromise(function(_0x176023,_0x533c22){rimraf(_0x22a5a7,function(_0x3057c0){if(_0x3057c0)_0x533c22(_0x3057c0);return _0x176023();});});})['then'](function(){return _0x3c3436[_0x2e86('0xca')](_0x345c29,_0x2c561b,function(_0x44395f){if(_0x44395f){console[_0x2e86('0xf3')](_0x2e86('0xf4'),_0x44395f);}else{fs[_0x2e86('0xf5')](_0x345c29);}});});});}else{return _0x3c3436[_0x2e86('0x1b')](0xc8);}})[_0x2e86('0x34')](handleError(_0x3c3436,null));}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.events.js b/server/api/openchannelInteraction/openchannelInteraction.events.js index 8883912..8e1b50a 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 _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 +var _0xf0ae=['then','setDataValue','Users','findAll','length','emit','hook','exports','events','../../mysqldb','OpenchannelInteraction','OpenchannelMessage','update','remove','getUsers'];(function(_0x16c541,_0x152720){var _0xcc54dc=function(_0x3986b0){while(--_0x3986b0){_0x16c541['push'](_0x16c541['shift']());}};_0xcc54dc(++_0x152720);}(_0xf0ae,0x80));var _0xef0a=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0xf0ae[_0x126558];return _0x1f6d14;};'use strict';var EventEmitter=require(_0xef0a('0x0'));var OpenchannelInteraction=require(_0xef0a('0x1'))['db'][_0xef0a('0x2')];var OpenchannelMessage=require(_0xef0a('0x1'))['db'][_0xef0a('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xef0a('0x4'),'afterDestroy':_0xef0a('0x5')};function emitEvent(_0x60a9b8){return function(_0x380e14,_0x37fe51,_0x345a4c){_0x380e14[_0xef0a('0x6')]({'attributes':['id'],'raw':!![]})[_0xef0a('0x7')](function(_0x5cfa6a){_0x380e14[_0xef0a('0x8')](_0xef0a('0x9'),_0x5cfa6a['map'](function(_0x478382){return{'id':_0x478382['id']};}));return OpenchannelMessage[_0xef0a('0xa')]({'where':{'OpenchannelInteractionId':_0x380e14['id'],'direction':'in','read':![]},'raw':!![]});})[_0xef0a('0x7')](function(_0x4716cb){_0x380e14[_0xef0a('0x8')]('unreadMessages',_0x4716cb[_0xef0a('0xb')]);OpenchannelInteractionEvents[_0xef0a('0xc')](_0x60a9b8+':'+_0x380e14['id'],_0x380e14);OpenchannelInteractionEvents[_0xef0a('0xc')](_0x60a9b8,_0x380e14);_0x345a4c(null);})['catch'](_0x345a4c(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelInteraction[_0xef0a('0xd')](e,emitEvent(event));}}module[_0xef0a('0xe')]=OpenchannelInteractionEvents; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.model.js b/server/api/openchannelInteraction/openchannelInteraction.model.js index 333e427..89a80b5 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 _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 +var _0x0602=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','bluebird','request-promise','../../config/environment','define','openchannel_interactions','changed','closed'];(function(_0x54defc,_0x627178){var _0x1955d3=function(_0x299afe){while(--_0x299afe){_0x54defc['push'](_0x54defc['shift']());}};_0x1955d3(++_0x627178);}(_0x0602,0x1b2));var _0x2060=function(_0xbf14c6,_0x5e3b2d){_0xbf14c6=_0xbf14c6-0x0;var _0x59aabb=_0x0602[_0xbf14c6];return _0x59aabb;};'use strict';var _=require(_0x2060('0x0'));var util=require('util');var logger=require(_0x2060('0x1'))(_0x2060('0x2'));var moment=require('moment');var BPromise=require(_0x2060('0x3'));var rp=require(_0x2060('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x2060('0x5'));var attributes=require('./openchannelInteraction.attributes');module['exports']=function(_0xedcf0b,_0x32f8e8){return _0xedcf0b[_0x2060('0x6')]('OpenchannelInteraction',attributes,{'tableName':_0x2060('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2af254,_0x508e6f,_0x247ae9){if(_0x2af254[_0x2060('0x8')](_0x2060('0x9'))){_0x2af254['closedAt']=moment()[_0x2060('0xa')](_0x2060('0xb'));}_0x247ae9(null,_0x2af254);}}});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.rpc.js b/server/api/openchannelInteraction/openchannelInteraction.rpc.js index e56541c..1ec9eb8 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 _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 +var _0x6fa4=['redis','defaults','socket.io-emitter','./openchannelInteraction.socket','register','request','info','request\x20sent','debug','stringify','error','code','message','OpenchannelInteraction,\x20%s,\x20%s','catch','OpenchannelInteraction','update','options','raw','where','attributes','limit','then','UpdateOpenchannelInteraction','AddTagsToOpenchannelInteraction','find','addTags','omit','body','AddTags','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x25ce81,_0x3faf44){var _0x49fc90=function(_0x391a30){while(--_0x391a30){_0x25ce81['push'](_0x25ce81['shift']());}};_0x49fc90(++_0x3faf44);}(_0x6fa4,0x1a1));var _0x46fa=function(_0x2b88f3,_0x16adbe){_0x2b88f3=_0x2b88f3-0x0;var _0x4f26de=_0x6fa4[_0x2b88f3];return _0x4f26de;};'use strict';var _=require(_0x46fa('0x0'));var util=require(_0x46fa('0x1'));var moment=require(_0x46fa('0x2'));var BPromise=require(_0x46fa('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x46fa('0x4'));var db=require(_0x46fa('0x5'))['db'];var utils=require(_0x46fa('0x6'));var logger=require(_0x46fa('0x7'))(_0x46fa('0x8'));var config=require(_0x46fa('0x9'));var jayson=require(_0x46fa('0xa'));var client=jayson[_0x46fa('0xb')][_0x46fa('0xc')]({'port':0x232a});config[_0x46fa('0xd')]=_[_0x46fa('0xe')](config[_0x46fa('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0x46fa('0xf'))(new Redis(config[_0x46fa('0xd')]));require(_0x46fa('0x10'))[_0x46fa('0x11')](socket);function respondWithRpcPromise(_0x3c5f10,_0x5bd65f,_0x48d478){return new BPromise(function(_0x30eca1,_0x12baf6){return client[_0x46fa('0x12')](_0x3c5f10,_0x48d478)['then'](function(_0x204c13){logger[_0x46fa('0x13')]('OpenchannelInteraction,\x20%s,\x20%s',_0x5bd65f,_0x46fa('0x14'));logger[_0x46fa('0x15')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x5bd65f,_0x46fa('0x14'),JSON[_0x46fa('0x16')](_0x204c13));if(_0x204c13[_0x46fa('0x17')]){if(_0x204c13[_0x46fa('0x17')][_0x46fa('0x18')]===0x1f4){logger[_0x46fa('0x17')]('OpenchannelInteraction,\x20%s,\x20%s',_0x5bd65f,_0x204c13[_0x46fa('0x17')][_0x46fa('0x19')]);return _0x12baf6(_0x204c13[_0x46fa('0x17')][_0x46fa('0x19')]);}logger['error'](_0x46fa('0x1a'),_0x5bd65f,_0x204c13[_0x46fa('0x17')][_0x46fa('0x19')]);return _0x30eca1(_0x204c13[_0x46fa('0x17')][_0x46fa('0x19')]);}else{logger[_0x46fa('0x13')](_0x46fa('0x1a'),_0x5bd65f,_0x46fa('0x14'));_0x30eca1(_0x204c13['result'][_0x46fa('0x19')]);}})[_0x46fa('0x1b')](function(_0x5c1326){logger[_0x46fa('0x17')](_0x46fa('0x1a'),_0x5bd65f,_0x5c1326);_0x12baf6(_0x5c1326);});});}exports['UpdateOpenchannelInteraction']=function(_0x355698){var _0x2e17a1=this;return new Promise(function(_0xcc878f,_0x480c7d){return db[_0x46fa('0x1c')][_0x46fa('0x1d')](_0x355698['body'],{'raw':_0x355698[_0x46fa('0x1e')]?_0x355698[_0x46fa('0x1e')][_0x46fa('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x355698[_0x46fa('0x1e')]?_0x355698[_0x46fa('0x1e')][_0x46fa('0x20')]||null:null,'attributes':_0x355698['options']?_0x355698[_0x46fa('0x1e')][_0x46fa('0x21')]||null:null,'limit':_0x355698['options']?_0x355698[_0x46fa('0x1e')][_0x46fa('0x22')]||null:null})[_0x46fa('0x23')](function(_0x3e80b4){logger[_0x46fa('0x13')](_0x46fa('0x24'),_0x355698);logger[_0x46fa('0x15')](_0x46fa('0x24'),_0x355698,JSON[_0x46fa('0x16')](_0x3e80b4));_0xcc878f(_0x3e80b4);})[_0x46fa('0x1b')](function(_0x2b2e20){logger['error'](_0x46fa('0x24'),_0x2b2e20[_0x46fa('0x19')],_0x355698);_0x480c7d(_0x2e17a1[_0x46fa('0x17')](0x1f4,_0x2b2e20[_0x46fa('0x19')]));});});};exports[_0x46fa('0x25')]=function(_0x4c99e4){return new Promise(function(_0xc2eb99,_0x3fdf00){return db[_0x46fa('0x1c')][_0x46fa('0x26')]({'where':_0x4c99e4['options']?_0x4c99e4[_0x46fa('0x1e')][_0x46fa('0x20')]||null:null})[_0x46fa('0x23')](function(_0x5565ca){if(_0x5565ca){return _0x5565ca[_0x46fa('0x27')](_0x4c99e4['body']['ids'],_[_0x46fa('0x28')](_0x4c99e4[_0x46fa('0x29')],['ids','id'])||{});}})['spread'](function(_0x2ba9fc){logger[_0x46fa('0x13')]('AddTags',_0x4c99e4);logger['debug'](_0x46fa('0x2a'),_0x4c99e4,JSON[_0x46fa('0x16')](_0x2ba9fc));_0xc2eb99(_0x2ba9fc);})[_0x46fa('0x1b')](function(_0x2429dd){logger[_0x46fa('0x17')](_0x46fa('0x2a'),_0x2429dd['message'],_0x4c99e4);_0x3fdf00(_this['error'](0x1f4,_0x2429dd[_0x46fa('0x19')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.socket.js b/server/api/openchannelInteraction/openchannelInteraction.socket.js index d18df79..1f1f27d 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 _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 +var _0x4a49=['remove','update','removeListener','register','length','openchannelInteraction:','save'];(function(_0x58826e,_0x42e54d){var _0x3579b3=function(_0x21ac78){while(--_0x21ac78){_0x58826e['push'](_0x58826e['shift']());}};_0x3579b3(++_0x42e54d);}(_0x4a49,0x133));var _0x94a4=function(_0x2d7ad1,_0x2af8a8){_0x2d7ad1=_0x2d7ad1-0x0;var _0x8b03c2=_0x4a49[_0x2d7ad1];return _0x8b03c2;};'use strict';var OpenchannelInteractionEvents=require('./openchannelInteraction.events');var events=[_0x94a4('0x0'),_0x94a4('0x1'),_0x94a4('0x2')];function createListener(_0x8ddf79,_0x2ca1f3){return function(_0x25037f){_0x2ca1f3['emit'](_0x8ddf79,_0x25037f);};}function removeListener(_0x1f68cc,_0x12c863){return function(){OpenchannelInteractionEvents[_0x94a4('0x3')](_0x1f68cc,_0x12c863);};}exports[_0x94a4('0x4')]=function(_0x15ddee){for(var _0x999bf9=0x0,_0x3a9b3f=events[_0x94a4('0x5')];_0x999bf9<_0x3a9b3f;_0x999bf9++){var _0x4d465e=events[_0x999bf9];var _0x297070=createListener(_0x94a4('0x6')+_0x4d465e,_0x15ddee);OpenchannelInteractionEvents['on'](_0x4d465e,_0x297070);}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/index.js b/server/api/openchannelMessage/index.js index f88e55a..22bb066 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 _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 +var _0xe706=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelMessage.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','tracked','openchannel','openchannelmessage:create','create','update','put','/:id/accept','accept','/:id/reject','exports','multer','util','path','express','Router'];(function(_0x448be7,_0x39ad08){var _0x49f681=function(_0x7866d2){while(--_0x7866d2){_0x448be7['push'](_0x448be7['shift']());}};_0x49f681(++_0x39ad08);}(_0xe706,0xa3));var _0x6e70=function(_0x135704,_0x539aee){_0x135704=_0x135704-0x0;var _0x24e9fd=_0xe706[_0x135704];return _0x24e9fd;};'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'));var controller=require(_0x6e70('0x9'));router[_0x6e70('0xa')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0xc')]);router[_0x6e70('0xa')](_0x6e70('0xd'),auth[_0x6e70('0xb')](),controller[_0x6e70('0xe')]);router[_0x6e70('0xa')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x10')]);router[_0x6e70('0x11')]('/',auth[_0x6e70('0xb')](),interaction[_0x6e70('0x12')](_0x6e70('0x13'),_0x6e70('0x14')),controller[_0x6e70('0x15')]);router['put']('/:id',auth[_0x6e70('0xb')](),controller[_0x6e70('0x16')]);router[_0x6e70('0x17')](_0x6e70('0x18'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x19')]);router[_0x6e70('0x17')](_0x6e70('0x1a'),auth['isAuthenticated'](),controller['reject']);router['delete'](_0x6e70('0xf'),auth['isAuthenticated'](),controller['destroy']);module[_0x6e70('0x1b')]=router; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.attributes.js b/server/api/openchannelMessage/openchannelMessage.attributes.js index d56d87f..82d1ec3 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 _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 +var _0xee4e=['DATE','STRING','sequelize','exports','TEXT','BOOLEAN','ENUM','out'];(function(_0x54b77e,_0x1b05ef){var _0x2d1f15=function(_0x6af5dd){while(--_0x6af5dd){_0x54b77e['push'](_0x54b77e['shift']());}};_0x2d1f15(++_0x1b05ef);}(_0xee4e,0x122));var _0xeee4=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xee4e[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require(_0xeee4('0x0'));module[_0xeee4('0x1')]={'body':{'type':Sequelize[_0xeee4('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xeee4('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0xeee4('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0xeee4('0x4')]('in',_0xeee4('0x5')),'defaultValue':_0xeee4('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0xeee4('0x6')]},'providerName':{'type':Sequelize[_0xeee4('0x7')]},'providerResponse':{'type':Sequelize[_0xeee4('0x2')]}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.controller.js b/server/api/openchannelMessage/openchannelMessage.controller.js index 18bc482..da4b6ba 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 _0xf500=['nolimit','order','sort','pick','where','merge','map','type','VIRTUAL','filter','options','includeAll','include','show','keys','find','create','body','openchannel-interactions','openchannel','read','readAt','format','UserId','agent','params','Contact','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','user','null','AcceptMessage','describe','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','Sequelize','QueryTypes','manual','interface','channel','event','accept','EventManager','acceptmessage','role','RejectMessage','startsWith','ContactId','SELECT','contact','SIP/%s','fast-json-patch','moment','util','path','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','request','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','update','destroy','name','send','OpenchannelMessage','rawAttributes','fieldName','model','filters','intersection','query','attributes','fields','length','hasOwnProperty'];(function(_0x5b553c,_0x30b06b){var _0x28a4e4=function(_0x333113){while(--_0x333113){_0x5b553c['push'](_0x5b553c['shift']());}};_0x28a4e4(++_0x30b06b);}(_0xf500,0xb5));var _0x0f50=function(_0xd22d95,_0xc59f8f){_0xd22d95=_0xd22d95-0x0;var _0x15d7a3=_0xf500[_0xd22d95];return _0x15d7a3;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0f50('0x0'));var rp=require('request-promise');var moment=require(_0x0f50('0x1'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x0f50('0x2'));var path=require(_0x0f50('0x3'));var sox=require('sox');var csv=require(_0x0f50('0x4'));var ejs=require(_0x0f50('0x5'));var fs=require('fs');var fs_extra=require(_0x0f50('0x6'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x0f50('0x7'));var jsforce=require(_0x0f50('0x8'));var deskjs=require('desk.js');var toCsv=require(_0x0f50('0x4'));var querystring=require(_0x0f50('0x9'));var Papa=require(_0x0f50('0xa'));var Redis=require(_0x0f50('0xb'));var authService=require(_0x0f50('0xc'));var qs=require(_0x0f50('0xd'));var as=require(_0x0f50('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0f50('0xf'))('api');var utils=require(_0x0f50('0x10'));var config=require(_0x0f50('0x11'));var licenseUtil=require('../../config/license/util');var db=require(_0x0f50('0x12'))['db'];config[_0x0f50('0x13')]=_[_0x0f50('0x14')](config[_0x0f50('0x13')],{'host':_0x0f50('0x15'),'port':0x18eb});var socket=require(_0x0f50('0x16'))(new Redis(config[_0x0f50('0x13')]));require(_0x0f50('0x17'))[_0x0f50('0x18')](socket);var jayson=require(_0x0f50('0x19'));var client=jayson[_0x0f50('0x1a')][_0x0f50('0x1b')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1fc225,_0x1627e9,_0x48c88d,_0x5ff256){return new BPromise(function(_0x31cbc0,_0x10074a){var _0x3e16b8=_0x5ff256||client;return _0x3e16b8[_0x0f50('0x1c')](_0x1fc225,_0x48c88d)[_0x0f50('0x1d')](function(_0x2e80b6){logger[_0x0f50('0x1e')](_0x0f50('0x1f'),_0x1627e9,_0x0f50('0x20'));logger[_0x0f50('0x21')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x1627e9,_0x0f50('0x20'),JSON[_0x0f50('0x22')](_0x2e80b6));if(_0x2e80b6[_0x0f50('0x23')]){if(_0x2e80b6[_0x0f50('0x23')]['code']===0x1f4){logger[_0x0f50('0x23')](_0x0f50('0x1f'),_0x1627e9,_0x2e80b6[_0x0f50('0x23')][_0x0f50('0x24')]);return _0x10074a(_0x2e80b6['error'][_0x0f50('0x24')]);}logger[_0x0f50('0x23')]('OpenchannelMessage,\x20%s,\x20%s',_0x1627e9,_0x2e80b6['error'][_0x0f50('0x24')]);return _0x31cbc0(_0x2e80b6[_0x0f50('0x23')][_0x0f50('0x24')]);}else{logger[_0x0f50('0x1e')]('OpenchannelMessage,\x20%s,\x20%s',_0x1627e9,'request\x20sent');_0x31cbc0(_0x2e80b6[_0x0f50('0x25')]['message']);}})[_0x0f50('0x26')](function(_0x48e94f){logger['error'](_0x0f50('0x1f'),_0x1627e9,_0x48e94f);_0x10074a(_0x48e94f);});});}function respondWithStatusCode(_0x3fb331,_0x1374c9){_0x1374c9=_0x1374c9||0xcc;return function(_0x579df6){if(_0x579df6){return _0x3fb331[_0x0f50('0x27')](_0x1374c9);}return _0x3fb331[_0x0f50('0x28')](_0x1374c9)['end']();};}function respondWithResult(_0x4c99ac,_0x2534dd){_0x2534dd=_0x2534dd||0xc8;return function(_0x157bf7){if(_0x157bf7){return _0x4c99ac[_0x0f50('0x28')](_0x2534dd)[_0x0f50('0x29')](_0x157bf7);}};}function respondWithFilteredResult(_0xef264f,_0x59524c){return function(_0x28d0f1){if(_0x28d0f1){var _0x1fe03b=typeof _0x59524c[_0x0f50('0x2a')]===_0x0f50('0x2b')&&typeof _0x59524c[_0x0f50('0x2c')]===_0x0f50('0x2b');var _0x418b39=_0x28d0f1[_0x0f50('0x2d')];var _0x3fdb50=_0x1fe03b?0x0:_0x59524c['offset'];var _0x3074c9=_0x1fe03b?_0x28d0f1[_0x0f50('0x2d')]:_0x59524c[_0x0f50('0x2a')]+_0x59524c[_0x0f50('0x2c')];var _0x4842ff;if(_0x3074c9>=_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=_0x3becf9){_0x393715=_0x3becf9;_0x5da3e0=0xc8;}else{_0x5da3e0=0xce;}_0x2662bb[_0xca97('0x2e')](_0x5da3e0);return _0x2662bb[_0xca97('0x35')](_0xca97('0x36'),_0x2c6758+'-'+_0x393715+'/'+_0x3becf9)['json'](_0x38db93);}return null;};}function patchUpdates(_0xfb3315){return function(_0xb74a4){try{jsonpatch[_0xca97('0x37')](_0xb74a4,_0xfb3315,!![]);}catch(_0x53bc59){return BPromise[_0xca97('0x38')](_0x53bc59);}return _0xb74a4['save']();};}function saveUpdates(_0x1424f9,_0xec86f0){return function(_0x45dcf2){if(_0x45dcf2){return _0x45dcf2[_0xca97('0x39')](_0x1424f9)['then'](function(_0x23d03c){return _0x23d03c;});}return null;};}function removeEntity(_0x2be695,_0x57d97d){return function(_0x11de90){if(_0x11de90){return _0x11de90['destroy']()[_0xca97('0x23')](function(){_0x2be695[_0xca97('0x2e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x174459,_0x25ac57){return function(_0x3adc0f){if(!_0x3adc0f){_0x174459[_0xca97('0x2d')](0x194);}return _0x3adc0f;};}function handleError(_0x36d730,_0x71cd5e){_0x71cd5e=_0x71cd5e||0x1f4;return function(_0x1ddd7f){logger[_0xca97('0x2a')](_0x1ddd7f[_0xca97('0x3a')]);if(_0x1ddd7f['name']){delete _0x1ddd7f[_0xca97('0x3b')];}_0x36d730[_0xca97('0x2e')](_0x71cd5e)['send'](_0x1ddd7f);};}exports['index']=function(_0x296306,_0x9c591c){var _0x492b55={},_0x4e63d3={},_0x5cc51e={'count':0x0,'rows':[]};var _0x207d58=_[_0xca97('0x3c')](db[_0xca97('0x3d')][_0xca97('0x3e')],function(_0x26ed8b){return{'name':_0x26ed8b[_0xca97('0x3f')],'type':_0x26ed8b[_0xca97('0x40')][_0xca97('0x41')]};});_0x4e63d3[_0xca97('0x42')]=_['map'](_0x207d58,_0xca97('0x3b'));_0x4e63d3[_0xca97('0x43')]=_['keys'](_0x296306[_0xca97('0x43')]);_0x4e63d3['filters']=_[_0xca97('0x44')](_0x4e63d3[_0xca97('0x42')],_0x4e63d3['query']);_0x492b55['attributes']=_[_0xca97('0x44')](_0x4e63d3[_0xca97('0x42')],qs[_0xca97('0x45')](_0x296306['query'][_0xca97('0x45')]));_0x492b55[_0xca97('0x46')]=_0x492b55[_0xca97('0x46')][_0xca97('0x47')]?_0x492b55[_0xca97('0x46')]:_0x4e63d3[_0xca97('0x42')];if(!_0x296306['query'][_0xca97('0x48')](_0xca97('0x49'))){_0x492b55[_0xca97('0x33')]=qs[_0xca97('0x33')](_0x296306['query'][_0xca97('0x33')]);_0x492b55[_0xca97('0x31')]=qs[_0xca97('0x31')](_0x296306[_0xca97('0x43')][_0xca97('0x31')]);}_0x492b55[_0xca97('0x4a')]=qs['sort'](_0x296306['query'][_0xca97('0x4b')]);_0x492b55[_0xca97('0x4c')]=qs['filters'](_[_0xca97('0x4d')](_0x296306[_0xca97('0x43')],_0x4e63d3[_0xca97('0x4e')]),_0x207d58);if(_0x296306[_0xca97('0x43')][_0xca97('0x4f')]){_0x492b55['where']=_[_0xca97('0x50')](_0x492b55[_0xca97('0x4c')],{'$or':_[_0xca97('0x3c')](_0x207d58,function(_0x3e448a){if(_0x3e448a[_0xca97('0x40')]!=='VIRTUAL'){var _0x22b697={};_0x22b697[_0x3e448a[_0xca97('0x3b')]]={'$like':'%'+_0x296306[_0xca97('0x43')][_0xca97('0x4f')]+'%'};return _0x22b697;}})});}_0x492b55=_['merge']({},_0x492b55,_0x296306[_0xca97('0x51')]);var _0x2bb508={'where':_0x492b55['where']};return db[_0xca97('0x3d')][_0xca97('0x34')](_0x2bb508)[_0xca97('0x23')](function(_0x566b4a){_0x5cc51e[_0xca97('0x34')]=_0x566b4a;if(_0x296306[_0xca97('0x43')][_0xca97('0x52')]){_0x492b55[_0xca97('0x53')]=[{'all':!![]}];}return db[_0xca97('0x3d')][_0xca97('0x54')](_0x492b55);})['then'](function(_0x5dbfec){_0x5cc51e['rows']=_0x5dbfec;return _0x5cc51e;})[_0xca97('0x23')](respondWithFilteredResult(_0x9c591c,_0x492b55))[_0xca97('0x55')](handleError(_0x9c591c,null));};exports[_0xca97('0x56')]=function(_0x4e6662,_0x6fad04){var _0x5034e7={'raw':!![],'where':{'id':_0x4e6662['params']['id']}},_0x473ed5={};_0x473ed5['model']=_[_0xca97('0x57')](db[_0xca97('0x3d')][_0xca97('0x3e')]);_0x473ed5['query']=_[_0xca97('0x57')](_0x4e6662['query']);_0x473ed5[_0xca97('0x4e')]=_[_0xca97('0x44')](_0x473ed5[_0xca97('0x42')],_0x473ed5['query']);_0x5034e7[_0xca97('0x46')]=_[_0xca97('0x44')](_0x473ed5[_0xca97('0x42')],qs[_0xca97('0x45')](_0x4e6662[_0xca97('0x43')][_0xca97('0x45')]));_0x5034e7[_0xca97('0x46')]=_0x5034e7['attributes'][_0xca97('0x47')]?_0x5034e7[_0xca97('0x46')]:_0x473ed5['model'];if(_0x4e6662['query'][_0xca97('0x52')]){_0x5034e7[_0xca97('0x53')]=[{'all':!![]}];}_0x5034e7=_['merge']({},_0x5034e7,_0x4e6662[_0xca97('0x51')]);return db[_0xca97('0x3d')][_0xca97('0x58')](_0x5034e7)['then'](handleEntityNotFound(_0x6fad04,null))['then'](respondWithResult(_0x6fad04,null))[_0xca97('0x55')](handleError(_0x6fad04,null));};exports[_0xca97('0x59')]=function(_0x80fde3,_0x21d21b){return db[_0xca97('0x3d')]['create'](_0x80fde3['body'],{})[_0xca97('0x23')](respondWithResult(_0x21d21b,0xc9))[_0xca97('0x55')](handleError(_0x21d21b,null));};exports['update']=function(_0x41a741,_0x36c0f2){if(_0x41a741[_0xca97('0x5a')]['id']){delete _0x41a741[_0xca97('0x5a')]['id'];}return db[_0xca97('0x3d')][_0xca97('0x58')]({'where':{'id':_0x41a741[_0xca97('0x5b')]['id']}})['then'](handleEntityNotFound(_0x36c0f2,null))[_0xca97('0x23')](saveUpdates(_0x41a741[_0xca97('0x5a')],null))[_0xca97('0x23')](respondWithResult(_0x36c0f2,null))[_0xca97('0x55')](handleError(_0x36c0f2,null));};exports['destroy']=function(_0x1a2434,_0x23c811){return db['OpenchannelMessage'][_0xca97('0x58')]({'where':{'id':_0x1a2434[_0xca97('0x5b')]['id']}})[_0xca97('0x23')](handleEntityNotFound(_0x23c811,null))[_0xca97('0x23')](removeEntity(_0x23c811,null))[_0xca97('0x55')](handleError(_0x23c811,null));};exports[_0xca97('0x5c')]=function(_0x56ddf0,_0x2eb4eb){return db[_0xca97('0x3d')][_0xca97('0x5c')]()[_0xca97('0x23')](respondWithResult(_0x2eb4eb,null))[_0xca97('0x55')](handleError(_0x2eb4eb,null));};var interaction_log=require(_0xca97('0x14'))(_0xca97('0x5d'));exports[_0xca97('0x5e')]=function(_0x197b79,_0x3fd9b2,_0x1669ce){var _0x30172a={'agent':{},'channel':_0xca97('0x5f')};if(_0x197b79[_0xca97('0x5a')]['id']){delete _0x197b79[_0xca97('0x5a')]['id'];}_0x197b79[_0xca97('0x5a')][_0xca97('0x60')]=!![];_0x197b79[_0xca97('0x5a')][_0xca97('0x61')]=moment()[_0xca97('0x62')]('YYYY-MM-DD\x20HH:mm:ss');_0x197b79['body'][_0xca97('0x63')]=_0x197b79[_0xca97('0x5a')][_0xca97('0x63')]||_0x197b79[_0xca97('0x64')]['id'];_0x30172a[_0xca97('0x65')]['id']=_0x197b79['body'][_0xca97('0x63')];return db[_0xca97('0x3d')][_0xca97('0x58')]({'where':{'id':_0x197b79['params']['id'],'UserId':null},'include':[{'model':db[_0xca97('0x66')],'as':_0xca97('0x67')}]})[_0xca97('0x23')](handleEntityNotFound(_0x3fd9b2,null))[_0xca97('0x23')](saveUpdates(_0x197b79['body'],null))['then'](function(_0x508f92){if(_0x508f92){_0x30172a[_0xca97('0x2c')]=_0x508f92[_0xca97('0x68')]({'plain':!![]});return db[_0xca97('0x69')]['find']({'where':{'id':_0x508f92[_0xca97('0x6a')]}});}return null;})[_0xca97('0x23')](handleEntityNotFound(_0x3fd9b2,null))['then'](function(_0x3c886f){if(_0x3c886f){return _0x3c886f[_0xca97('0x39')]({'UserId':_0x197b79['body'][_0xca97('0x63')],'read1stAt':_[_0xca97('0x6b')](_0x3c886f['read1stAt'])?moment()['format'](_0xca97('0x6c')):undefined});}return null;})[_0xca97('0x23')](function(_0x35746f){if(_0x35746f){_0x30172a['interaction']=_0x35746f[_0xca97('0x68')]({'plain':!![]});interaction_log[_0xca97('0x24')](_0xca97('0x6d'),_0x197b79[_0xca97('0x64')]['id'],_0x197b79['user'][_0xca97('0x3b')],_0x197b79[_0xca97('0x64')][_0xca97('0x6e')],_0x30172a['interaction']['id'],_0x197b79['body']?JSON[_0xca97('0x29')](_0x197b79[_0xca97('0x5a')]):_0xca97('0x6f'));return respondWithRpcPromise(_0xca97('0x70'),'acceptMessage',_0x30172a);}return null;})[_0xca97('0x23')](function(_0x56d69c){return db[_0xca97('0x66')][_0xca97('0x5c')]()['then'](function(_0x61a14a){var _0x231fe7=[];for(var _0x58098c=0x0;_0x58098c=_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 +var _0xf571=['defaults','localhost','socket.io-emitter','./openchannelQueue.socket','register','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','destroy','get','error','stack','name','index','map','OpenchannelQueue','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','catch','show','rawAttributes','keys','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','describe','getMembers','findOne','UserOpenchannelQueue','OpenchannelQueueId','User','findAndCountAll','UserId','agent','openchannelPause','createdAt','rows','format','%s/%s','SIP','updatedAt','Team','getTeams','addTeams','ids','Agents','online','voicePause','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','removeTeams','select','field','tq.TeamId','from','team_has_openchannel_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','compact','value','isEmpty','userOpenchannelQueue:remove','addAgents','spread','userOpenchannelQueue:save','removeAgents','isArray','getAgents','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis'];(function(_0x44d8b3,_0x3891c1){var _0x326dc2=function(_0x1b3feb){while(--_0x1b3feb){_0x44d8b3['push'](_0x44d8b3['shift']());}};_0x326dc2(++_0x3891c1);}(_0xf571,0x1a2));var _0x1f57=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf571[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0x1f57('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1f57('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1f57('0x2'));var moment=require(_0x1f57('0x3'));var BPromise=require(_0x1f57('0x4'));var Mustache=require(_0x1f57('0x5'));var util=require(_0x1f57('0x6'));var path=require(_0x1f57('0x7'));var sox=require(_0x1f57('0x8'));var csv=require(_0x1f57('0x9'));var ejs=require(_0x1f57('0xa'));var fs=require('fs');var fs_extra=require(_0x1f57('0xb'));var _=require(_0x1f57('0xc'));var squel=require(_0x1f57('0xd'));var crypto=require(_0x1f57('0xe'));var jsforce=require(_0x1f57('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x1f57('0x9'));var querystring=require(_0x1f57('0x10'));var Papa=require(_0x1f57('0x11'));var Redis=require(_0x1f57('0x12'));var authService=require(_0x1f57('0x13'));var qs=require(_0x1f57('0x14'));var as=require(_0x1f57('0x15'));var hardwareService=require(_0x1f57('0x16'));var logger=require(_0x1f57('0x17'))(_0x1f57('0x18'));var utils=require('../../config/utils');var config=require(_0x1f57('0x19'));var licenseUtil=require(_0x1f57('0x1a'));var db=require(_0x1f57('0x1b'))['db'];config[_0x1f57('0x1c')]=_[_0x1f57('0x1d')](config[_0x1f57('0x1c')],{'host':_0x1f57('0x1e'),'port':0x18eb});var socket=require(_0x1f57('0x1f'))(new Redis(config['redis']));require(_0x1f57('0x20'))[_0x1f57('0x21')](socket);function respondWithStatusCode(_0x5dbe01,_0x4e010c){_0x4e010c=_0x4e010c||0xcc;return function(_0x216a48){if(_0x216a48){return _0x5dbe01['sendStatus'](_0x4e010c);}return _0x5dbe01[_0x1f57('0x22')](_0x4e010c)[_0x1f57('0x23')]();};}function respondWithResult(_0x131c1f,_0x5e187a){_0x5e187a=_0x5e187a||0xc8;return function(_0xb2b61f){if(_0xb2b61f){return _0x131c1f['status'](_0x5e187a)[_0x1f57('0x24')](_0xb2b61f);}};}function respondWithFilteredResult(_0x2ebfb9,_0x89d033){return function(_0x3613cb){if(_0x3613cb){var _0x2ef256=typeof _0x89d033[_0x1f57('0x25')]===_0x1f57('0x26')&&typeof _0x89d033[_0x1f57('0x27')]==='undefined';var _0x56865a=_0x3613cb[_0x1f57('0x28')];var _0x2cb183=_0x2ef256?0x0:_0x89d033['offset'];var _0x221e6b=_0x2ef256?_0x3613cb[_0x1f57('0x28')]:_0x89d033[_0x1f57('0x25')]+_0x89d033[_0x1f57('0x27')];var _0x233db6;if(_0x221e6b>=_0x56865a){_0x221e6b=_0x56865a;_0x233db6=0xc8;}else{_0x233db6=0xce;}_0x2ebfb9[_0x1f57('0x22')](_0x233db6);return _0x2ebfb9['set'](_0x1f57('0x29'),_0x2cb183+'-'+_0x221e6b+'/'+_0x56865a)[_0x1f57('0x24')](_0x3613cb);}return null;};}function patchUpdates(_0xbf9439){return function(_0x3adb6d){try{jsonpatch[_0x1f57('0x2a')](_0x3adb6d,_0xbf9439,!![]);}catch(_0x42c926){return BPromise[_0x1f57('0x2b')](_0x42c926);}return _0x3adb6d['save']();};}function saveUpdates(_0x1b26fc,_0xe03214){return function(_0x74b984){if(_0x74b984){return _0x74b984[_0x1f57('0x2c')](_0x1b26fc)[_0x1f57('0x2d')](function(_0x172f3a){return _0x172f3a;});}return null;};}function removeEntity(_0x49dec4,_0x2851e0){return function(_0xa5127b){if(_0xa5127b){return _0xa5127b[_0x1f57('0x2e')]()['then'](function(){var _0x58c93d=_0xa5127b[_0x1f57('0x2f')]({'plain':!![]});var _0x511fb9='OpenchannelQueues';return db['UserProfileResource'][_0x1f57('0x2e')]({'where':{'type':_0x511fb9,'resourceId':_0x58c93d['id']}})[_0x1f57('0x2d')](function(){return _0xa5127b;});})['then'](function(){_0x49dec4[_0x1f57('0x22')](0xcc)[_0x1f57('0x23')]();});}};}function handleEntityNotFound(_0x469374,_0x37ebc8){return function(_0x558735){if(!_0x558735){_0x469374['sendStatus'](0x194);}return _0x558735;};}function handleError(_0x4602fd,_0x3be0c7){_0x3be0c7=_0x3be0c7||0x1f4;return function(_0x11af48){logger[_0x1f57('0x30')](_0x11af48[_0x1f57('0x31')]);if(_0x11af48[_0x1f57('0x32')]){delete _0x11af48[_0x1f57('0x32')];}_0x4602fd[_0x1f57('0x22')](_0x3be0c7)['send'](_0x11af48);};}exports[_0x1f57('0x33')]=function(_0x215974,_0x359220){var _0x947b4f={},_0x2d7528={},_0x259bd4={'count':0x0,'rows':[]};var _0x3fa688=_[_0x1f57('0x34')](db[_0x1f57('0x35')]['rawAttributes'],function(_0x42a802){return{'name':_0x42a802[_0x1f57('0x36')],'type':_0x42a802[_0x1f57('0x37')][_0x1f57('0x38')]};});_0x2d7528[_0x1f57('0x39')]=_[_0x1f57('0x34')](_0x3fa688,_0x1f57('0x32'));_0x2d7528[_0x1f57('0x3a')]=_['keys'](_0x215974[_0x1f57('0x3a')]);_0x2d7528[_0x1f57('0x3b')]=_[_0x1f57('0x3c')](_0x2d7528[_0x1f57('0x39')],_0x2d7528['query']);_0x947b4f[_0x1f57('0x3d')]=_[_0x1f57('0x3c')](_0x2d7528[_0x1f57('0x39')],qs[_0x1f57('0x3e')](_0x215974['query'][_0x1f57('0x3e')]));_0x947b4f[_0x1f57('0x3d')]=_0x947b4f[_0x1f57('0x3d')][_0x1f57('0x3f')]?_0x947b4f[_0x1f57('0x3d')]:_0x2d7528['model'];if(!_0x215974[_0x1f57('0x3a')][_0x1f57('0x40')](_0x1f57('0x41'))){_0x947b4f[_0x1f57('0x27')]=qs[_0x1f57('0x27')](_0x215974[_0x1f57('0x3a')][_0x1f57('0x27')]);_0x947b4f['offset']=qs[_0x1f57('0x25')](_0x215974[_0x1f57('0x3a')][_0x1f57('0x25')]);}_0x947b4f[_0x1f57('0x42')]=qs['sort'](_0x215974['query'][_0x1f57('0x43')]);_0x947b4f['where']=qs['filters'](_[_0x1f57('0x44')](_0x215974[_0x1f57('0x3a')],_0x2d7528[_0x1f57('0x3b')]),_0x3fa688);if(_0x215974[_0x1f57('0x3a')][_0x1f57('0x45')]){_0x947b4f[_0x1f57('0x46')]=_[_0x1f57('0x47')](_0x947b4f[_0x1f57('0x46')],{'$or':_['map'](_0x3fa688,function(_0x20fc4b){if(_0x20fc4b[_0x1f57('0x37')]!==_0x1f57('0x48')){var _0x5c93a8={};_0x5c93a8[_0x20fc4b[_0x1f57('0x32')]]={'$like':'%'+_0x215974['query']['filter']+'%'};return _0x5c93a8;}})});}_0x947b4f=_[_0x1f57('0x47')]({},_0x947b4f,_0x215974[_0x1f57('0x49')]);var _0x35e3c7={'where':_0x947b4f[_0x1f57('0x46')]};return db[_0x1f57('0x35')][_0x1f57('0x28')](_0x35e3c7)['then'](function(_0x405411){_0x259bd4[_0x1f57('0x28')]=_0x405411;if(_0x215974[_0x1f57('0x3a')]['includeAll']){_0x947b4f[_0x1f57('0x4a')]=[{'all':!![]}];}return db[_0x1f57('0x35')][_0x1f57('0x4b')](_0x947b4f);})[_0x1f57('0x2d')](function(_0x38fc32){_0x259bd4['rows']=_0x38fc32;return _0x259bd4;})[_0x1f57('0x2d')](respondWithFilteredResult(_0x359220,_0x947b4f))[_0x1f57('0x4c')](handleError(_0x359220,null));};exports[_0x1f57('0x4d')]=function(_0xe30f2a,_0x3d6863){var _0x28e841={'raw':!![],'where':{'id':_0xe30f2a['params']['id']}},_0x1b8f44={};_0x1b8f44[_0x1f57('0x39')]=_['keys'](db[_0x1f57('0x35')][_0x1f57('0x4e')]);_0x1b8f44['query']=_[_0x1f57('0x4f')](_0xe30f2a['query']);_0x1b8f44[_0x1f57('0x3b')]=_[_0x1f57('0x3c')](_0x1b8f44[_0x1f57('0x39')],_0x1b8f44[_0x1f57('0x3a')]);_0x28e841[_0x1f57('0x3d')]=_[_0x1f57('0x3c')](_0x1b8f44[_0x1f57('0x39')],qs[_0x1f57('0x3e')](_0xe30f2a['query']['fields']));_0x28e841[_0x1f57('0x3d')]=_0x28e841[_0x1f57('0x3d')][_0x1f57('0x3f')]?_0x28e841[_0x1f57('0x3d')]:_0x1b8f44[_0x1f57('0x39')];if(_0xe30f2a[_0x1f57('0x3a')]['includeAll']){_0x28e841[_0x1f57('0x4a')]=[{'all':!![]}];}_0x28e841=_['merge']({},_0x28e841,_0xe30f2a['options']);return db[_0x1f57('0x35')][_0x1f57('0x50')](_0x28e841)[_0x1f57('0x2d')](handleEntityNotFound(_0x3d6863,null))[_0x1f57('0x2d')](respondWithResult(_0x3d6863,null))['catch'](handleError(_0x3d6863,null));};exports[_0x1f57('0x51')]=function(_0x59f6ed,_0x2c23d5){return db['OpenchannelQueue']['create'](_0x59f6ed['body'],{})[_0x1f57('0x2d')](function(_0x475c70){var _0x4b71d8=_0x59f6ed[_0x1f57('0x52')]['get']({'plain':!![]});if(!_0x4b71d8)throw new Error(_0x1f57('0x53'));if(_0x4b71d8[_0x1f57('0x54')]===_0x1f57('0x52')){var _0x5700e4=_0x475c70[_0x1f57('0x2f')]({'plain':!![]});var _0x3ccc36='OpenchannelQueues';return db[_0x1f57('0x55')][_0x1f57('0x50')]({'where':{'name':_0x3ccc36,'userProfileId':_0x4b71d8[_0x1f57('0x56')]},'raw':!![]})[_0x1f57('0x2d')](function(_0x2e4332){if(_0x2e4332&&_0x2e4332['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x5700e4[_0x1f57('0x32')],'resourceId':_0x5700e4['id'],'type':_0x2e4332[_0x1f57('0x32')],'sectionId':_0x2e4332['id']},{})[_0x1f57('0x2d')](function(){return _0x475c70;});}else{return _0x475c70;}})['catch'](function(_0x333fee){logger[_0x1f57('0x30')](_0x1f57('0x57'),_0x333fee);throw _0x333fee;});}return _0x475c70;})['then'](respondWithResult(_0x2c23d5,0xc9))[_0x1f57('0x4c')](handleError(_0x2c23d5,null));};exports[_0x1f57('0x2c')]=function(_0x3ff4a5,_0xf5a667){if(_0x3ff4a5[_0x1f57('0x58')]['id']){delete _0x3ff4a5[_0x1f57('0x58')]['id'];}return db[_0x1f57('0x35')]['find']({'where':{'id':_0x3ff4a5[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0xf5a667,null))['then'](saveUpdates(_0x3ff4a5[_0x1f57('0x58')],null))[_0x1f57('0x2d')](respondWithResult(_0xf5a667,null))[_0x1f57('0x4c')](handleError(_0xf5a667,null));};exports['destroy']=function(_0x49e743,_0x4d4a0){return db[_0x1f57('0x35')][_0x1f57('0x50')]({'where':{'id':_0x49e743[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0x4d4a0,null))[_0x1f57('0x2d')](removeEntity(_0x4d4a0,null))['catch'](handleError(_0x4d4a0,null));};exports[_0x1f57('0x5a')]=function(_0x4e435d,_0x5c56db){return db[_0x1f57('0x35')]['describe']()['then'](respondWithResult(_0x5c56db,null))[_0x1f57('0x4c')](handleError(_0x5c56db,null));};exports[_0x1f57('0x5b')]=function(_0x5c5cc7,_0x463a3b,_0x384f20){var _0xb12719={'raw':!![],'where':{}},_0x1a7eb4={},_0x82cd95;return db[_0x1f57('0x35')][_0x1f57('0x5c')]({'where':{'id':_0x5c5cc7[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0x463a3b,null))[_0x1f57('0x2d')](function(_0x4d9633){if(_0x4d9633){_0x82cd95=_0x4d9633[_0x1f57('0x2f')]({'plain':!![]});_0x1a7eb4['model']=_[_0x1f57('0x4f')](db[_0x1f57('0x5d')][_0x1f57('0x4e')]);_0x1a7eb4[_0x1f57('0x3a')]=_[_0x1f57('0x4f')](_0x5c5cc7[_0x1f57('0x3a')]);_0x1a7eb4[_0x1f57('0x3b')]=_[_0x1f57('0x3c')](_0x1a7eb4[_0x1f57('0x39')],_0x1a7eb4['query']);_0xb12719[_0x1f57('0x3d')]=_[_0x1f57('0x3c')](_0x1a7eb4[_0x1f57('0x39')],qs[_0x1f57('0x3e')](_0x5c5cc7[_0x1f57('0x3a')][_0x1f57('0x3e')]));_0xb12719[_0x1f57('0x3d')]=_0xb12719['attributes'][_0x1f57('0x3f')]?_0xb12719['attributes']:_0x1a7eb4[_0x1f57('0x39')];if(!_0x5c5cc7['query'][_0x1f57('0x40')](_0x1f57('0x41'))){_0xb12719['limit']=qs['limit'](_0x5c5cc7[_0x1f57('0x3a')]['limit']);_0xb12719['offset']=qs[_0x1f57('0x25')](_0x5c5cc7[_0x1f57('0x3a')]['offset']);}_0xb12719[_0x1f57('0x42')]=qs[_0x1f57('0x43')](_0x5c5cc7[_0x1f57('0x3a')][_0x1f57('0x43')]);_0xb12719[_0x1f57('0x46')]=qs[_0x1f57('0x3b')](_[_0x1f57('0x44')](_0x5c5cc7[_0x1f57('0x3a')],_0x1a7eb4[_0x1f57('0x3b')]));_0xb12719[_0x1f57('0x46')][_0x1f57('0x5e')]=_0x4d9633['id'];if(_0x5c5cc7[_0x1f57('0x3a')][_0x1f57('0x45')]){_0xb12719[_0x1f57('0x46')]=_['merge'](_0xb12719[_0x1f57('0x46')],{'$or':_[_0x1f57('0x34')](_0xb12719['attributes'],function(_0x20a3ca){var _0x3835fb={};_0x3835fb[_0x20a3ca]={'$like':'%'+_0x5c5cc7[_0x1f57('0x3a')]['filter']+'%'};return _0x3835fb;})});}_0xb12719=_['merge']({},_0xb12719,_0x5c5cc7[_0x1f57('0x49')]);return db['UserOpenchannelQueue']['findAll'](_0xb12719);}})[_0x1f57('0x2d')](function(_0x2acc99){if(_0x2acc99){return db[_0x1f57('0x5f')][_0x1f57('0x60')]({'where':{'id':_['map'](_0x2acc99,_0x1f57('0x61')),'role':_0x1f57('0x62')},'attributes':['id',_0x1f57('0x32'),_0x1f57('0x63'),'updatedAt',_0x1f57('0x64')]});}})['then'](function(_0x167bb8){if(_0x167bb8){return{'count':_0x167bb8[_0x1f57('0x28')],'rows':_[_0x1f57('0x34')](_0x167bb8[_0x1f57('0x65')],function(_0x3cc49d){return{'membername':_0x3cc49d[_0x1f57('0x32')],'UserId':_0x3cc49d['id'],'queue_name':_0x82cd95[_0x1f57('0x32')],'OpenchannelQueueId':_0x82cd95['id'],'interface':util[_0x1f57('0x66')](_0x1f57('0x67'),_0x1f57('0x68'),_0x3cc49d['name']),'penalty':0x0,'paused':_0x3cc49d['openchannelPause'],'createdAt':_0x3cc49d[_0x1f57('0x64')],'updatedAt':_0x3cc49d[_0x1f57('0x69')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x1f57('0x2d')](respondWithFilteredResult(_0x463a3b,_0xb12719))[_0x1f57('0x4c')](handleError(_0x463a3b,null));};exports['getTeams']=function(_0x37f395,_0x2af1a9,_0x3fb758){var _0x304a8d={};var _0x35c6bf={};var _0x3d929c;var _0x4ec814;return db['OpenchannelQueue'][_0x1f57('0x5c')]({'where':{'id':_0x37f395[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0x2af1a9,null))[_0x1f57('0x2d')](function(_0x2a9b56){if(_0x2a9b56){_0x3d929c=_0x2a9b56;_0x35c6bf['model']=_[_0x1f57('0x4f')](db[_0x1f57('0x6a')][_0x1f57('0x4e')]);_0x35c6bf[_0x1f57('0x3a')]=_[_0x1f57('0x4f')](_0x37f395[_0x1f57('0x3a')]);_0x35c6bf[_0x1f57('0x3b')]=_[_0x1f57('0x3c')](_0x35c6bf[_0x1f57('0x39')],_0x35c6bf['query']);_0x304a8d[_0x1f57('0x3d')]=_['intersection'](_0x35c6bf[_0x1f57('0x39')],qs[_0x1f57('0x3e')](_0x37f395[_0x1f57('0x3a')][_0x1f57('0x3e')]));_0x304a8d[_0x1f57('0x3d')]=_0x304a8d[_0x1f57('0x3d')]['length']?_0x304a8d[_0x1f57('0x3d')]:_0x35c6bf['model'];_0x304a8d['order']=qs['sort'](_0x37f395['query']['sort']);_0x304a8d[_0x1f57('0x46')]=qs[_0x1f57('0x3b')](_[_0x1f57('0x44')](_0x37f395[_0x1f57('0x3a')],_0x35c6bf[_0x1f57('0x3b')]));if(_0x37f395['query']['filter']){_0x304a8d['where']=_[_0x1f57('0x47')](_0x304a8d[_0x1f57('0x46')],{'$or':_[_0x1f57('0x34')](_0x304a8d[_0x1f57('0x3d')],function(_0x3cb3e1){var _0x215c4d={};_0x215c4d[_0x3cb3e1]={'$like':'%'+_0x37f395[_0x1f57('0x3a')][_0x1f57('0x45')]+'%'};return _0x215c4d;})});}_0x304a8d=_[_0x1f57('0x47')]({},_0x304a8d,_0x37f395[_0x1f57('0x49')]);return _0x3d929c[_0x1f57('0x6b')](_0x304a8d);}})[_0x1f57('0x2d')](function(_0x499a81){if(_0x499a81){_0x4ec814=_0x499a81[_0x1f57('0x3f')];if(!_0x37f395[_0x1f57('0x3a')][_0x1f57('0x40')](_0x1f57('0x41'))){_0x304a8d[_0x1f57('0x27')]=qs[_0x1f57('0x27')](_0x37f395[_0x1f57('0x3a')][_0x1f57('0x27')]);_0x304a8d[_0x1f57('0x25')]=qs['offset'](_0x37f395[_0x1f57('0x3a')][_0x1f57('0x25')]);}return _0x3d929c[_0x1f57('0x6b')](_0x304a8d);}})[_0x1f57('0x2d')](function(_0x44e9ee){if(_0x44e9ee){return _0x44e9ee?{'count':_0x4ec814,'rows':_0x44e9ee}:null;}})[_0x1f57('0x2d')](respondWithResult(_0x2af1a9,null))[_0x1f57('0x4c')](handleError(_0x2af1a9,null));};exports[_0x1f57('0x6c')]=function(_0x27683f,_0x39be68,_0x17c7a9){var _0x1329d8=_0x27683f[_0x1f57('0x58')][_0x1f57('0x6d')];return db[_0x1f57('0x6a')][_0x1f57('0x4b')]({'where':{'id':_0x1329d8},'attributes':['id'],'include':[{'model':db[_0x1f57('0x5f')],'as':_0x1f57('0x6e'),'attributes':['id',_0x1f57('0x32'),_0x1f57('0x6f'),_0x1f57('0x70'),'interface'],'raw':!![]}]})[_0x1f57('0x2d')](function(_0x2c67b1){if(_0x2c67b1){var _0x17db20=_[_0x1f57('0x71')](_0x2c67b1,function(_0x4c9175){var _0x49b146=_0x4c9175['get']({'plain':!![]});return _0x49b146[_0x1f57('0x6e')];});return db['OpenchannelQueue']['find']({'where':{'id':_0x27683f['params']['id']}})[_0x1f57('0x2d')](function(_0x1c7a5a){return db[_0x1f57('0x72')][_0x1f57('0x73')](function(_0x1b485c){return _0x1c7a5a[_0x1f57('0x6c')](_0x1329d8,{'transaction':_0x1b485c})[_0x1f57('0x2d')](function(){return BPromise[_0x1f57('0x74')](_0x17db20,function(_0x542c39){return db[_0x1f57('0x5d')][_0x1f57('0x75')]({'where':{'UserId':_0x542c39['id'],'OpenchannelQueueId':_0x27683f[_0x1f57('0x59')]['id']},'transaction':_0x1b485c});});})[_0x1f57('0x2d')](function(){_0x17db20[_0x1f57('0x76')](function(_0x450701){socket[_0x1f57('0x77')]('userOpenchannelQueue:save',{'UserId':_0x450701['id'],'OpenchannelQueueId':_0x1c7a5a['id']});});});});});}})[_0x1f57('0x2d')](respondWithStatusCode(_0x39be68,null))[_0x1f57('0x4c')](handleError(_0x39be68,null));};exports[_0x1f57('0x78')]=function(_0x1f28ab,_0x3068da,_0x9f2e86){return db['Team'][_0x1f57('0x4b')]({'where':{'id':_0x1f28ab[_0x1f57('0x3a')][_0x1f57('0x6d')]},'attributes':['id'],'include':[{'model':db[_0x1f57('0x5f')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x3068da,null))[_0x1f57('0x2d')](function(_0x3f2938){var _0x254b2c=_[_0x1f57('0x34')](_0x3f2938,'id');var _0x24a288=[];var _0x454cd7=[];var _0x4cf846=squel[_0x1f57('0x79')]();_0x4cf846[_0x1f57('0x7a')](_0x1f57('0x7b'))[_0x1f57('0x7c')](_0x1f57('0x7d'),'tq')[_0x1f57('0x7e')](_0x1f57('0x7f'),'ut',_0x1f57('0x80'))['where'](_0x1f57('0x81'),_0x1f28ab['params']['id']);for(var _0x4973c0=0x0;_0x4973c0<_0x3f2938[_0x1f57('0x3f')];_0x4973c0+=0x1){let _0x5a44ff=_0x3f2938[_0x4973c0];for(var _0x3af452=0x0;_0x3af452<_0x5a44ff[_0x1f57('0x6e')][_0x1f57('0x3f')];_0x3af452+=0x1){let _0x169af4=_0x5a44ff[_0x1f57('0x6e')][_0x3af452];var _0x4385ca=_0x4cf846[_0x1f57('0x82')]();_0x4385ca[_0x1f57('0x46')](_0x1f57('0x83'),_0x169af4['id']);_0x454cd7[_0x1f57('0x84')](db[_0x1f57('0x72')][_0x1f57('0x3a')](_0x4385ca[_0x1f57('0x85')](),{'type':db['sequelize'][_0x1f57('0x86')][_0x1f57('0x87')]})[_0x1f57('0x2d')](function(_0x21aeaf){if(_0x21aeaf[_0x1f57('0x3f')]===0x1){return _0x169af4['id'];}else{var _0x1c62c1=_[_0x1f57('0x88')](_['map'](_0x21aeaf,_0x1f57('0x89')),function(_0x316939){return _['includes'](_0x254b2c,_0x316939);});if(_0x1c62c1){return _0x169af4['id'];}}}));}}return BPromise[_0x1f57('0x8a')](_0x454cd7)[_0x1f57('0x2d')](function(_0x2f335a){_0x24a288=_(_0x24a288)['union'](_0x2f335a)[_0x1f57('0x8b')]()[_0x1f57('0x8c')]();return db['OpenchannelQueue']['find']({'where':{'id':_0x1f28ab[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](function(_0x4ffbb2){return db[_0x1f57('0x72')][_0x1f57('0x73')](function(_0x95b9cc){return _0x4ffbb2[_0x1f57('0x78')](_0x1f28ab[_0x1f57('0x3a')]['ids'],{'transaction':_0x95b9cc})[_0x1f57('0x2d')](function(){if(!_[_0x1f57('0x8d')](_0x24a288)){return _0x4ffbb2['removeAgents'](_0x24a288,{'transaction':_0x95b9cc});}})[_0x1f57('0x2d')](function(){_0x24a288[_0x1f57('0x76')](function(_0x3955f6){socket[_0x1f57('0x77')](_0x1f57('0x8e'),{'UserId':_0x3955f6,'OpenchannelQueueId':_0x4ffbb2['id']});});});});});});})[_0x1f57('0x2d')](respondWithStatusCode(_0x3068da,null))[_0x1f57('0x4c')](handleError(_0x3068da,null));};exports[_0x1f57('0x8f')]=function(_0x5411cc,_0x2d9c42,_0x4a44b9){return db[_0x1f57('0x35')]['find']({'where':{'id':_0x5411cc['params']['id']}})['then'](handleEntityNotFound(_0x2d9c42,null))[_0x1f57('0x2d')](function(_0x13c28f){if(_0x13c28f){return _0x13c28f['addAgents'](_0x5411cc['body'][_0x1f57('0x6d')],_['omit'](_0x5411cc[_0x1f57('0x58')],[_0x1f57('0x6d'),'id'])||{})[_0x1f57('0x90')](function(_0x1eab06){for(var _0x259b29=0x0;_0x259b29<_0x5411cc[_0x1f57('0x58')][_0x1f57('0x6d')][_0x1f57('0x3f')];_0x259b29+=0x1){socket['emit'](_0x1f57('0x91'),{'UserId':_0x5411cc[_0x1f57('0x58')][_0x1f57('0x6d')][_0x259b29],'OpenchannelQueueId':_0x5411cc[_0x1f57('0x59')]['id']});}return _0x1eab06;});}})[_0x1f57('0x2d')](respondWithResult(_0x2d9c42,null))[_0x1f57('0x4c')](handleError(_0x2d9c42,null));};exports[_0x1f57('0x92')]=function(_0x317d83,_0x1e496a,_0x324ff3){return db[_0x1f57('0x35')][_0x1f57('0x50')]({'where':{'id':_0x317d83[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0x1e496a,null))[_0x1f57('0x2d')](function(_0xbf388a){if(_0xbf388a){return _0xbf388a[_0x1f57('0x92')](_0x317d83[_0x1f57('0x3a')][_0x1f57('0x6d')])[_0x1f57('0x2d')](function(){if(_[_0x1f57('0x93')](_0x317d83['query'][_0x1f57('0x6d')])){for(var _0x1487a9=0x0;_0x1487a9<_0x317d83[_0x1f57('0x3a')]['ids'][_0x1f57('0x3f')];_0x1487a9+=0x1){socket[_0x1f57('0x77')](_0x1f57('0x8e'),{'UserId':Number(_0x317d83[_0x1f57('0x3a')][_0x1f57('0x6d')][_0x1487a9]),'OpenchannelQueueId':Number(_0x317d83[_0x1f57('0x59')]['id'])});}}else{socket[_0x1f57('0x77')](_0x1f57('0x8e'),{'UserId':Number(_0x317d83['query']['ids']),'OpenchannelQueueId':Number(_0x317d83['params']['id'])});}});}})['then'](respondWithStatusCode(_0x1e496a,null))[_0x1f57('0x4c')](handleError(_0x1e496a,null));};exports['getAgents']=function(_0x5a48ce,_0x5504b2,_0x123187){var _0x496ec3={};var _0x4bbe7a={};var _0x566ca1;var _0x26c337;return db[_0x1f57('0x35')]['findOne']({'where':{'id':_0x5a48ce[_0x1f57('0x59')]['id']}})[_0x1f57('0x2d')](handleEntityNotFound(_0x5504b2,null))[_0x1f57('0x2d')](function(_0x31830e){if(_0x31830e){_0x566ca1=_0x31830e;_0x4bbe7a['model']=_[_0x1f57('0x4f')](db[_0x1f57('0x5f')][_0x1f57('0x4e')]);_0x4bbe7a[_0x1f57('0x3a')]=_[_0x1f57('0x4f')](_0x5a48ce[_0x1f57('0x3a')]);_0x4bbe7a[_0x1f57('0x3b')]=_[_0x1f57('0x3c')](_0x4bbe7a[_0x1f57('0x39')],_0x4bbe7a[_0x1f57('0x3a')]);_0x496ec3[_0x1f57('0x3d')]=_[_0x1f57('0x3c')](_0x4bbe7a[_0x1f57('0x39')],qs[_0x1f57('0x3e')](_0x5a48ce[_0x1f57('0x3a')][_0x1f57('0x3e')]));_0x496ec3[_0x1f57('0x3d')]=_0x496ec3[_0x1f57('0x3d')][_0x1f57('0x3f')]?_0x496ec3['attributes']:_0x4bbe7a['model'];_0x496ec3[_0x1f57('0x42')]=qs['sort'](_0x5a48ce[_0x1f57('0x3a')][_0x1f57('0x43')]);_0x496ec3['where']=qs[_0x1f57('0x3b')](_['pick'](_0x5a48ce[_0x1f57('0x3a')],_0x4bbe7a[_0x1f57('0x3b')]));if(_0x5a48ce['query']['filter']){_0x496ec3[_0x1f57('0x46')]=_['merge'](_0x496ec3[_0x1f57('0x46')],{'$or':_[_0x1f57('0x34')](_0x496ec3[_0x1f57('0x3d')],function(_0x239776){var _0x2842f4={};_0x2842f4[_0x239776]={'$like':'%'+_0x5a48ce['query'][_0x1f57('0x45')]+'%'};return _0x2842f4;})});}_0x496ec3=_['merge']({},_0x496ec3,_0x5a48ce[_0x1f57('0x49')]);return _0x566ca1['getAgents'](_0x496ec3);}})[_0x1f57('0x2d')](function(_0x249145){if(_0x249145){_0x26c337=_0x249145[_0x1f57('0x3f')];if(!_0x5a48ce[_0x1f57('0x3a')][_0x1f57('0x40')]('nolimit')){_0x496ec3[_0x1f57('0x27')]=qs[_0x1f57('0x27')](_0x5a48ce[_0x1f57('0x3a')][_0x1f57('0x27')]);_0x496ec3[_0x1f57('0x25')]=qs[_0x1f57('0x25')](_0x5a48ce[_0x1f57('0x3a')]['offset']);}return _0x566ca1[_0x1f57('0x94')](_0x496ec3);}})[_0x1f57('0x2d')](function(_0x1cf248){if(_0x1cf248){return _0x1cf248?{'count':_0x26c337,'rows':_0x1cf248}:null;}})['then'](respondWithResult(_0x5504b2,null))['catch'](handleError(_0x5504b2,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.events.js b/server/api/openchannelQueue/openchannelQueue.events.js index 0729de3..bf8b75c 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 _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 +var _0x1610=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x23bc85,_0x19addc){var _0x177dfd=function(_0x134ab5){while(--_0x134ab5){_0x23bc85['push'](_0x23bc85['shift']());}};_0x177dfd(++_0x19addc);}(_0x1610,0x170));var _0x0161=function(_0x5244b3,_0x23ac87){_0x5244b3=_0x5244b3-0x0;var _0x7c877c=_0x1610[_0x5244b3];return _0x7c877c;};'use strict';var EventEmitter=require(_0x0161('0x0'));var OpenchannelQueue=require(_0x0161('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x0161('0x2')](0x0);var events={'afterCreate':_0x0161('0x3'),'afterUpdate':_0x0161('0x4'),'afterDestroy':_0x0161('0x5')};function emitEvent(_0x50640a){return function(_0x5bfb75,_0x1ae913,_0x9d1e60){OpenchannelQueueEvents[_0x0161('0x6')](_0x50640a+':'+_0x5bfb75['id'],_0x5bfb75);OpenchannelQueueEvents[_0x0161('0x6')](_0x50640a,_0x5bfb75);_0x9d1e60(null);};}for(var e in events){if(events[_0x0161('0x7')](e)){var event=events[e];OpenchannelQueue[_0x0161('0x8')](e,emitEvent(event));}}module[_0x0161('0x9')]=OpenchannelQueueEvents; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.model.js b/server/api/openchannelQueue/openchannelQueue.model.js index f2663cd..8917d09 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 _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 +var _0x0392=['request-promise','path','rimraf','./openchannelQueue.attributes','exports','define','OpenchannelQueue','openchannel_queues','util','../../config/logger','moment'];(function(_0x3e04e3,_0x1de9fd){var _0x30e81f=function(_0x3fdc25){while(--_0x3fdc25){_0x3e04e3['push'](_0x3e04e3['shift']());}};_0x30e81f(++_0x1de9fd);}(_0x0392,0x131));var _0x2039=function(_0x490486,_0xd8363f){_0x490486=_0x490486-0x0;var _0x3eb33d=_0x0392[_0x490486];return _0x3eb33d;};'use strict';var _=require('lodash');var util=require(_0x2039('0x0'));var logger=require(_0x2039('0x1'))('api');var moment=require(_0x2039('0x2'));var BPromise=require('bluebird');var rp=require(_0x2039('0x3'));var fs=require('fs');var path=require(_0x2039('0x4'));var rimraf=require(_0x2039('0x5'));var config=require('../../config/environment');var attributes=require(_0x2039('0x6'));module[_0x2039('0x7')]=function(_0x21b90d,_0x57c8b8){return _0x21b90d[_0x2039('0x8')](_0x2039('0x9'),attributes,{'tableName':_0x2039('0xa'),'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 fbb5669..952a81c 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 _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 +var _0x619b=['findAll','raw','options','where','attributes','limit','include','map','model','debug','ShowOpenchannelQueue','OpenchannelQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','socket.io-emitter','./openchannelQueue.socket','register','request','then','info','request\x20sent','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelQueue,\x20%s,\x20%s','message','result','catch','GetOpenchannelQueue'];(function(_0xae08b4,_0xfa5c94){var _0x5aead2=function(_0x5e181d){while(--_0x5e181d){_0xae08b4['push'](_0xae08b4['shift']());}};_0x5aead2(++_0xfa5c94);}(_0x619b,0x1e6));var _0xb619=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x619b[_0x618414];return _0x21c19a;};'use strict';var _=require(_0xb619('0x0'));var util=require(_0xb619('0x1'));var moment=require(_0xb619('0x2'));var BPromise=require(_0xb619('0x3'));var rs=require(_0xb619('0x4'));var fs=require('fs');var Redis=require(_0xb619('0x5'));var db=require(_0xb619('0x6'))['db'];var utils=require(_0xb619('0x7'));var logger=require(_0xb619('0x8'))(_0xb619('0x9'));var config=require('../../config/environment');var jayson=require(_0xb619('0xa'));var client=jayson[_0xb619('0xb')]['http']({'port':0x232a});config['redis']=_[_0xb619('0xc')](config[_0xb619('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0xb619('0xe'))(new Redis(config[_0xb619('0xd')]));require(_0xb619('0xf'))[_0xb619('0x10')](socket);function respondWithRpcPromise(_0x32e9fd,_0x32bc5b,_0x2952ae){return new BPromise(function(_0x2d836c,_0x3d5e08){return client[_0xb619('0x11')](_0x32e9fd,_0x2952ae)[_0xb619('0x12')](function(_0x450259){logger[_0xb619('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x32bc5b,_0xb619('0x14'));logger['debug'](_0xb619('0x15'),_0x32bc5b,_0xb619('0x14'),JSON[_0xb619('0x16')](_0x450259));if(_0x450259[_0xb619('0x17')]){if(_0x450259[_0xb619('0x17')][_0xb619('0x18')]===0x1f4){logger[_0xb619('0x17')](_0xb619('0x19'),_0x32bc5b,_0x450259['error'][_0xb619('0x1a')]);return _0x3d5e08(_0x450259[_0xb619('0x17')][_0xb619('0x1a')]);}logger[_0xb619('0x17')](_0xb619('0x19'),_0x32bc5b,_0x450259[_0xb619('0x17')][_0xb619('0x1a')]);return _0x2d836c(_0x450259[_0xb619('0x17')]['message']);}else{logger[_0xb619('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x32bc5b,'request\x20sent');_0x2d836c(_0x450259[_0xb619('0x1b')][_0xb619('0x1a')]);}})[_0xb619('0x1c')](function(_0x3cda1b){logger[_0xb619('0x17')](_0xb619('0x19'),_0x32bc5b,_0x3cda1b);_0x3d5e08(_0x3cda1b);});});}exports[_0xb619('0x1d')]=function(_0x3a3c31){var _0x47f2d2=this;return new Promise(function(_0x4eeabb,_0x117b61){return db['OpenchannelQueue'][_0xb619('0x1e')]({'raw':_0x3a3c31['options']?_0x3a3c31['options'][_0xb619('0x1f')]===undefined?!![]:![]:!![],'where':_0x3a3c31[_0xb619('0x20')]?_0x3a3c31['options'][_0xb619('0x21')]||null:null,'attributes':_0x3a3c31[_0xb619('0x20')]?_0x3a3c31[_0xb619('0x20')][_0xb619('0x22')]||null:null,'limit':_0x3a3c31[_0xb619('0x20')]?_0x3a3c31[_0xb619('0x20')][_0xb619('0x23')]||null:null,'include':_0x3a3c31[_0xb619('0x20')]?_0x3a3c31[_0xb619('0x20')][_0xb619('0x24')]?_[_0xb619('0x25')](_0x3a3c31[_0xb619('0x20')][_0xb619('0x24')],function(_0x17f8c2){return{'model':db[_0x17f8c2[_0xb619('0x26')]],'as':_0x17f8c2['as'],'attributes':_0x17f8c2[_0xb619('0x22')],'include':_0x17f8c2[_0xb619('0x24')]?_[_0xb619('0x25')](_0x17f8c2['include'],function(_0x484272){return{'model':db[_0x484272[_0xb619('0x26')]],'as':_0x484272['as'],'attributes':_0x484272['attributes'],'include':_0x484272[_0xb619('0x24')]?_[_0xb619('0x25')](_0x484272[_0xb619('0x24')],function(_0x4d3ec1){return{'model':db[_0x4d3ec1[_0xb619('0x26')]],'as':_0x4d3ec1['as'],'attributes':_0x4d3ec1[_0xb619('0x22')]};}):[]};}):[]};}):[]:[]})[_0xb619('0x12')](function(_0x3e9841){logger['info'](_0xb619('0x1d'),_0x3a3c31);logger[_0xb619('0x27')](_0xb619('0x1d'),_0x3a3c31,JSON['stringify'](_0x3e9841));_0x4eeabb(_0x3e9841);})[_0xb619('0x1c')](function(_0x555b7c){logger[_0xb619('0x17')](_0xb619('0x1d'),_0x555b7c['message'],_0x3a3c31);_0x117b61(_0x47f2d2[_0xb619('0x17')](0x1f4,_0x555b7c[_0xb619('0x1a')]));});});};exports[_0xb619('0x28')]=function(_0x5cb3ba){var _0x5203e1=this;return new Promise(function(_0xc85dc1,_0x12563a){return db[_0xb619('0x29')][_0xb619('0x2a')]({'raw':_0x5cb3ba[_0xb619('0x20')]?_0x5cb3ba[_0xb619('0x20')][_0xb619('0x1f')]===undefined?!![]:![]:!![],'where':_0x5cb3ba[_0xb619('0x20')]?_0x5cb3ba[_0xb619('0x20')][_0xb619('0x21')]||null:null,'attributes':_0x5cb3ba[_0xb619('0x20')]?_0x5cb3ba[_0xb619('0x20')][_0xb619('0x22')]||null:null,'include':_0x5cb3ba[_0xb619('0x20')]?_0x5cb3ba['options'][_0xb619('0x24')]?_[_0xb619('0x25')](_0x5cb3ba[_0xb619('0x20')]['include'],function(_0x12c63d){return{'model':db[_0x12c63d[_0xb619('0x26')]],'as':_0x12c63d['as'],'attributes':_0x12c63d[_0xb619('0x22')],'include':_0x12c63d[_0xb619('0x24')]?_[_0xb619('0x25')](_0x12c63d[_0xb619('0x24')],function(_0x55efe6){return{'model':db[_0x55efe6['model']],'as':_0x55efe6['as'],'attributes':_0x55efe6['attributes'],'include':_0x55efe6[_0xb619('0x24')]?_[_0xb619('0x25')](_0x55efe6['include'],function(_0x466940){return{'model':db[_0x466940['model']],'as':_0x466940['as'],'attributes':_0x466940['attributes']};}):[]};}):[]};}):[]:[]})[_0xb619('0x12')](function(_0x273f57){logger[_0xb619('0x13')](_0xb619('0x28'),_0x5cb3ba);logger[_0xb619('0x27')](_0xb619('0x28'),_0x5cb3ba,JSON['stringify'](_0x273f57));_0xc85dc1(_0x273f57);})[_0xb619('0x1c')](function(_0x226a41){logger[_0xb619('0x17')](_0xb619('0x28'),_0x226a41['message'],_0x5cb3ba);_0x12563a(_0x5203e1[_0xb619('0x17')](0x1f4,_0x226a41['message']));});});}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.socket.js b/server/api/openchannelQueue/openchannelQueue.socket.js index 20f5fce..cad2dc2 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 _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 +var _0xd0ac=['remove','update','emit','register','length','openchannelQueue:','save'];(function(_0x3d355a,_0x12fc90){var _0x1aca22=function(_0x3c0a7d){while(--_0x3c0a7d){_0x3d355a['push'](_0x3d355a['shift']());}};_0x1aca22(++_0x12fc90);}(_0xd0ac,0x99));var _0xcd0a=function(_0x1cf4af,_0x198298){_0x1cf4af=_0x1cf4af-0x0;var _0x38f587=_0xd0ac[_0x1cf4af];return _0x38f587;};'use strict';var OpenchannelQueueEvents=require('./openchannelQueue.events');var events=[_0xcd0a('0x0'),_0xcd0a('0x1'),_0xcd0a('0x2')];function createListener(_0x1e90bc,_0x564c0f){return function(_0x21cb7c){_0x564c0f[_0xcd0a('0x3')](_0x1e90bc,_0x21cb7c);};}function removeListener(_0x4ae888,_0x466fd9){return function(){OpenchannelQueueEvents['removeListener'](_0x4ae888,_0x466fd9);};}exports[_0xcd0a('0x4')]=function(_0xf206d7){for(var _0x389c0a=0x0,_0x43ca22=events[_0xcd0a('0x5')];_0x389c0a<_0x43ca22;_0x389c0a++){var _0x2c556c=events[_0x389c0a];var _0x5c9c2f=createListener(_0xcd0a('0x6')+_0x2c556c,_0xf206d7);OpenchannelQueueEvents['on'](_0x2c556c,_0x5c9c2f);}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/index.js b/server/api/openchannelQueueReport/index.js index e217c81..b332ab7 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 _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 +var _0x45f0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','index','/describe','show','post','create','put','/:id','update','delete','exports','util','express'];(function(_0x39d1dc,_0x1dc490){var _0xaaaafa=function(_0xb7f3c1){while(--_0xb7f3c1){_0x39d1dc['push'](_0x39d1dc['shift']());}};_0xaaaafa(++_0x1dc490);}(_0x45f0,0x83));var _0x045f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x45f0[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x045f('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x045f('0x1'));var router=express[_0x045f('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x045f('0x3'));var interaction=require(_0x045f('0x4'));var config=require(_0x045f('0x5'));var controller=require(_0x045f('0x6'));router[_0x045f('0x7')]('/',auth[_0x045f('0x8')](),controller[_0x045f('0x9')]);router[_0x045f('0x7')](_0x045f('0xa'),auth[_0x045f('0x8')](),controller['describe']);router[_0x045f('0x7')]('/:id',auth[_0x045f('0x8')](),controller[_0x045f('0xb')]);router[_0x045f('0xc')]('/',auth[_0x045f('0x8')](),controller[_0x045f('0xd')]);router[_0x045f('0xe')](_0x045f('0xf'),auth[_0x045f('0x8')](),controller[_0x045f('0x10')]);router[_0x045f('0x11')](_0x045f('0xf'),auth[_0x045f('0x8')](),controller['destroy']);module[_0x045f('0x12')]=router; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js index a96e702..ef4d363 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 _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 +var _0x0017=['exports','STRING','DATE'];(function(_0x170941,_0x38d105){var _0x50e48d=function(_0x1eb49a){while(--_0x1eb49a){_0x170941['push'](_0x170941['shift']());}};_0x50e48d(++_0x38d105);}(_0x0017,0x9f));var _0x7001=function(_0x4801a0,_0x252c24){_0x4801a0=_0x4801a0-0x0;var _0x338e26=_0x0017[_0x4801a0];return _0x338e26;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x7001('0x0')]={'uniqueid':{'type':Sequelize[_0x7001('0x1')],'allowNull':![]},'from':{'type':Sequelize[_0x7001('0x1')]},'joinAt':{'type':Sequelize[_0x7001('0x2')]},'leaveAt':{'type':Sequelize[_0x7001('0x2')]},'acceptAt':{'type':Sequelize[_0x7001('0x2')]},'exitAt':{'type':Sequelize[_0x7001('0x2')]},'reason':{'type':Sequelize[_0x7001('0x1')]}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js index 2693c30..884cf79 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 _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 +var _0x43a0=['../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','json','reject','update','destroy','then','error','stack','name','map','OpenchannelQueueReport','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','where','merge','VIRTUAL','filter','includeAll','include','findAll','rows','show','params','keys','options','find','catch','create','body','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x124822,_0x391152){var _0x57ffbc=function(_0x96d46f){while(--_0x96d46f){_0x124822['push'](_0x124822['shift']());}};_0x57ffbc(++_0x391152);}(_0x43a0,0x7f));var _0x043a=function(_0x577582,_0x2140ba){_0x577582=_0x577582-0x0;var _0x527197=_0x43a0[_0x577582];return _0x527197;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x043a('0x0'));var zipdir=require(_0x043a('0x1'));var jsonpatch=require(_0x043a('0x2'));var rp=require('request-promise');var moment=require(_0x043a('0x3'));var BPromise=require(_0x043a('0x4'));var Mustache=require('mustache');var util=require(_0x043a('0x5'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x043a('0x6'));var fs=require('fs');var fs_extra=require(_0x043a('0x7'));var _=require(_0x043a('0x8'));var squel=require(_0x043a('0x9'));var crypto=require(_0x043a('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x043a('0xb'));var toCsv=require('to-csv');var querystring=require(_0x043a('0xc'));var Papa=require(_0x043a('0xd'));var Redis=require('ioredis');var authService=require(_0x043a('0xe'));var qs=require(_0x043a('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x043a('0x10'));var logger=require(_0x043a('0x11'))('api');var utils=require(_0x043a('0x12'));var config=require(_0x043a('0x13'));var licenseUtil=require(_0x043a('0x14'));var db=require(_0x043a('0x15'))['db'];function respondWithStatusCode(_0x4ebfbd,_0x5abcbf){_0x5abcbf=_0x5abcbf||0xcc;return function(_0x2cdf1b){if(_0x2cdf1b){return _0x4ebfbd[_0x043a('0x16')](_0x5abcbf);}return _0x4ebfbd[_0x043a('0x17')](_0x5abcbf)[_0x043a('0x18')]();};}function respondWithResult(_0x3d32d9,_0x572120){_0x572120=_0x572120||0xc8;return function(_0x12294c){if(_0x12294c){return _0x3d32d9[_0x043a('0x17')](_0x572120)['json'](_0x12294c);}};}function respondWithFilteredResult(_0x7a5df3,_0x4989e8){return function(_0x23a7ad){if(_0x23a7ad){var _0x5b1eb4=typeof _0x4989e8[_0x043a('0x19')]===_0x043a('0x1a')&&typeof _0x4989e8['limit']===_0x043a('0x1a');var _0x2c5b1d=_0x23a7ad[_0x043a('0x1b')];var _0x570d10=_0x5b1eb4?0x0:_0x4989e8[_0x043a('0x19')];var _0x4ebcb7=_0x5b1eb4?_0x23a7ad[_0x043a('0x1b')]:_0x4989e8[_0x043a('0x19')]+_0x4989e8[_0x043a('0x1c')];var _0x53236c;if(_0x4ebcb7>=_0x2c5b1d){_0x4ebcb7=_0x2c5b1d;_0x53236c=0xc8;}else{_0x53236c=0xce;}_0x7a5df3[_0x043a('0x17')](_0x53236c);return _0x7a5df3[_0x043a('0x1d')](_0x043a('0x1e'),_0x570d10+'-'+_0x4ebcb7+'/'+_0x2c5b1d)[_0x043a('0x1f')](_0x23a7ad);}return null;};}function patchUpdates(_0x53d287){return function(_0x1f2120){try{jsonpatch['apply'](_0x1f2120,_0x53d287,!![]);}catch(_0x10bff3){return BPromise[_0x043a('0x20')](_0x10bff3);}return _0x1f2120['save']();};}function saveUpdates(_0x315e14,_0x34554b){return function(_0xfd8174){if(_0xfd8174){return _0xfd8174[_0x043a('0x21')](_0x315e14)['then'](function(_0x436fee){return _0x436fee;});}return null;};}function removeEntity(_0x1a3595,_0xdad23d){return function(_0x4f626e){if(_0x4f626e){return _0x4f626e[_0x043a('0x22')]()[_0x043a('0x23')](function(){_0x1a3595[_0x043a('0x17')](0xcc)[_0x043a('0x18')]();});}};}function handleEntityNotFound(_0x48214c,_0x4bbc77){return function(_0x353025){if(!_0x353025){_0x48214c[_0x043a('0x16')](0x194);}return _0x353025;};}function handleError(_0x18d899,_0x2f35ba){_0x2f35ba=_0x2f35ba||0x1f4;return function(_0x530b4f){logger[_0x043a('0x24')](_0x530b4f[_0x043a('0x25')]);if(_0x530b4f[_0x043a('0x26')]){delete _0x530b4f[_0x043a('0x26')];}_0x18d899[_0x043a('0x17')](_0x2f35ba)['send'](_0x530b4f);};}exports['index']=function(_0x410708,_0x241ff7){var _0x18b529={},_0x5cee33={},_0x3dcbfd={'count':0x0,'rows':[]};var _0x1fbc95=_[_0x043a('0x27')](db[_0x043a('0x28')][_0x043a('0x29')],function(_0x5ad29b){return{'name':_0x5ad29b[_0x043a('0x2a')],'type':_0x5ad29b[_0x043a('0x2b')][_0x043a('0x2c')]};});_0x5cee33[_0x043a('0x2d')]=_[_0x043a('0x27')](_0x1fbc95,'name');_0x5cee33[_0x043a('0x2e')]=_['keys'](_0x410708[_0x043a('0x2e')]);_0x5cee33['filters']=_[_0x043a('0x2f')](_0x5cee33['model'],_0x5cee33[_0x043a('0x2e')]);_0x18b529[_0x043a('0x30')]=_[_0x043a('0x2f')](_0x5cee33[_0x043a('0x2d')],qs[_0x043a('0x31')](_0x410708[_0x043a('0x2e')][_0x043a('0x31')]));_0x18b529[_0x043a('0x30')]=_0x18b529['attributes'][_0x043a('0x32')]?_0x18b529[_0x043a('0x30')]:_0x5cee33['model'];if(!_0x410708[_0x043a('0x2e')][_0x043a('0x33')](_0x043a('0x34'))){_0x18b529[_0x043a('0x1c')]=qs['limit'](_0x410708[_0x043a('0x2e')][_0x043a('0x1c')]);_0x18b529[_0x043a('0x19')]=qs[_0x043a('0x19')](_0x410708[_0x043a('0x2e')]['offset']);}_0x18b529[_0x043a('0x35')]=qs['sort'](_0x410708['query'][_0x043a('0x36')]);_0x18b529['where']=qs[_0x043a('0x37')](_[_0x043a('0x38')](_0x410708['query'],_0x5cee33[_0x043a('0x37')]),_0x1fbc95);if(_0x410708[_0x043a('0x2e')]['filter']){_0x18b529[_0x043a('0x39')]=_[_0x043a('0x3a')](_0x18b529[_0x043a('0x39')],{'$or':_['map'](_0x1fbc95,function(_0x26ddd6){if(_0x26ddd6[_0x043a('0x2b')]!==_0x043a('0x3b')){var _0x51770d={};_0x51770d[_0x26ddd6[_0x043a('0x26')]]={'$like':'%'+_0x410708['query'][_0x043a('0x3c')]+'%'};return _0x51770d;}})});}_0x18b529=_[_0x043a('0x3a')]({},_0x18b529,_0x410708['options']);var _0x5451ba={'where':_0x18b529[_0x043a('0x39')]};return db[_0x043a('0x28')][_0x043a('0x1b')](_0x5451ba)[_0x043a('0x23')](function(_0x3a915f){_0x3dcbfd[_0x043a('0x1b')]=_0x3a915f;if(_0x410708[_0x043a('0x2e')][_0x043a('0x3d')]){_0x18b529[_0x043a('0x3e')]=[{'all':!![]}];}return db[_0x043a('0x28')][_0x043a('0x3f')](_0x18b529);})[_0x043a('0x23')](function(_0x23355a){_0x3dcbfd[_0x043a('0x40')]=_0x23355a;return _0x3dcbfd;})[_0x043a('0x23')](respondWithFilteredResult(_0x241ff7,_0x18b529))['catch'](handleError(_0x241ff7,null));};exports[_0x043a('0x41')]=function(_0x3e1d9f,_0x12bcac){var _0x529348={'raw':!![],'where':{'id':_0x3e1d9f[_0x043a('0x42')]['id']}},_0x26d2c3={};_0x26d2c3['model']=_[_0x043a('0x43')](db[_0x043a('0x28')]['rawAttributes']);_0x26d2c3[_0x043a('0x2e')]=_[_0x043a('0x43')](_0x3e1d9f['query']);_0x26d2c3[_0x043a('0x37')]=_['intersection'](_0x26d2c3[_0x043a('0x2d')],_0x26d2c3[_0x043a('0x2e')]);_0x529348['attributes']=_[_0x043a('0x2f')](_0x26d2c3['model'],qs[_0x043a('0x31')](_0x3e1d9f['query']['fields']));_0x529348[_0x043a('0x30')]=_0x529348[_0x043a('0x30')][_0x043a('0x32')]?_0x529348[_0x043a('0x30')]:_0x26d2c3[_0x043a('0x2d')];if(_0x3e1d9f[_0x043a('0x2e')]['includeAll']){_0x529348[_0x043a('0x3e')]=[{'all':!![]}];}_0x529348=_[_0x043a('0x3a')]({},_0x529348,_0x3e1d9f[_0x043a('0x44')]);return db[_0x043a('0x28')][_0x043a('0x45')](_0x529348)[_0x043a('0x23')](handleEntityNotFound(_0x12bcac,null))[_0x043a('0x23')](respondWithResult(_0x12bcac,null))[_0x043a('0x46')](handleError(_0x12bcac,null));};exports[_0x043a('0x47')]=function(_0x4bd0fb,_0x1888f9){return db[_0x043a('0x28')][_0x043a('0x47')](_0x4bd0fb[_0x043a('0x48')],{})[_0x043a('0x23')](respondWithResult(_0x1888f9,0xc9))['catch'](handleError(_0x1888f9,null));};exports[_0x043a('0x21')]=function(_0x52a49a,_0x4df1e4){if(_0x52a49a[_0x043a('0x48')]['id']){delete _0x52a49a['body']['id'];}return db[_0x043a('0x28')][_0x043a('0x45')]({'where':{'id':_0x52a49a[_0x043a('0x42')]['id']}})['then'](handleEntityNotFound(_0x4df1e4,null))[_0x043a('0x23')](saveUpdates(_0x52a49a[_0x043a('0x48')],null))[_0x043a('0x23')](respondWithResult(_0x4df1e4,null))['catch'](handleError(_0x4df1e4,null));};exports[_0x043a('0x22')]=function(_0x317788,_0x23c029){return db['OpenchannelQueueReport'][_0x043a('0x45')]({'where':{'id':_0x317788[_0x043a('0x42')]['id']}})[_0x043a('0x23')](handleEntityNotFound(_0x23c029,null))['then'](removeEntity(_0x23c029,null))[_0x043a('0x46')](handleError(_0x23c029,null));};exports[_0x043a('0x49')]=function(_0x467907,_0x51bd73){return db['OpenchannelQueueReport'][_0x043a('0x49')]()['then'](respondWithResult(_0x51bd73,null))[_0x043a('0x46')](handleError(_0x51bd73,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.model.js b/server/api/openchannelQueueReport/openchannelQueueReport.model.js index 233c944..24c1b81 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 _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 +var _0x5fc3=['util','api','moment','bluebird','request-promise','path','../../config/environment','./openchannelQueueReport.attributes','exports','define','report_openchannel_queue','uniqueid','lodash'];(function(_0x2d4c44,_0x13cd5c){var _0x17b36b=function(_0x300ca2){while(--_0x300ca2){_0x2d4c44['push'](_0x2d4c44['shift']());}};_0x17b36b(++_0x13cd5c);}(_0x5fc3,0xa8));var _0x35fc=function(_0x51b1a5,_0x285a4f){_0x51b1a5=_0x51b1a5-0x0;var _0x15c738=_0x5fc3[_0x51b1a5];return _0x15c738;};'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')]('OpenchannelQueueReport',attributes,{'tableName':_0x35fc('0xb'),'paranoid':![],'indexes':[{'name':_0x35fc('0xc'),'fields':[_0x35fc('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js index c9d5197..bbafa51 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 _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 +var _0x28f2=['catch','UpdateOpenchannelQueueReport','update','body','where','attributes','limit','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','OpenchannelQueueReport,\x20%s,\x20%s','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','OpenchannelQueueReport','options','raw','CreateOpenchannelQueueReport'];(function(_0x7b510d,_0x415850){var _0xc9854b=function(_0x16c784){while(--_0x16c784){_0x7b510d['push'](_0x7b510d['shift']());}};_0xc9854b(++_0x415850);}(_0x28f2,0x193));var _0x228f=function(_0x41f714,_0x46141a){_0x41f714=_0x41f714-0x0;var _0x726b24=_0x28f2[_0x41f714];return _0x726b24;};'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')]('OpenchannelQueueReport,\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);});});}exports['CreateOpenchannelQueueReport']=function(_0x2d4819){var _0x4e1968=this;return new Promise(function(_0x33e32e,_0x5b33a6){return db[_0x228f('0x16')]['create'](_0x2d4819['body'],{'raw':_0x2d4819[_0x228f('0x17')]?_0x2d4819['options'][_0x228f('0x18')]===undefined?!![]:![]:!![]})[_0x228f('0xc')](function(_0x1294a8){logger[_0x228f('0xd')](_0x228f('0x19'),_0x2d4819);logger[_0x228f('0xf')](_0x228f('0x19'),_0x2d4819,JSON[_0x228f('0x12')](_0x1294a8));_0x33e32e(_0x1294a8);})[_0x228f('0x1a')](function(_0x4ee0c9){logger[_0x228f('0x13')](_0x228f('0x19'),_0x4ee0c9[_0x228f('0x15')],_0x2d4819);_0x5b33a6(_0x4e1968[_0x228f('0x13')](0x1f4,_0x4ee0c9[_0x228f('0x15')]));});});};exports[_0x228f('0x1b')]=function(_0x33e882){var _0x20c111=this;return new Promise(function(_0x2dcf68,_0x56fbc2){return db[_0x228f('0x16')][_0x228f('0x1c')](_0x33e882[_0x228f('0x1d')],{'raw':_0x33e882[_0x228f('0x17')]?_0x33e882[_0x228f('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x33e882[_0x228f('0x17')]?_0x33e882['options'][_0x228f('0x1e')]||null:null,'attributes':_0x33e882['options']?_0x33e882['options'][_0x228f('0x1f')]||null:null,'limit':_0x33e882[_0x228f('0x17')]?_0x33e882[_0x228f('0x17')][_0x228f('0x20')]||null:null})[_0x228f('0xc')](function(_0x2c964e){logger[_0x228f('0xd')](_0x228f('0x1b'),_0x33e882);logger[_0x228f('0xf')](_0x228f('0x1b'),_0x33e882,JSON[_0x228f('0x12')](_0x2c964e));_0x2dcf68(_0x2c964e);})[_0x228f('0x1a')](function(_0xc25917){logger[_0x228f('0x13')](_0x228f('0x1b'),_0xc25917['message'],_0x33e882);_0x56fbc2(_0x20c111[_0x228f('0x13')](0x1f4,_0xc25917[_0x228f('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/index.js b/server/api/openchannelTransferReport/index.js index 21c1030..6c43552 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 _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 +var _0x947d=['path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller','get','isAuthenticated','/describe','describe','show','post','create','put','delete','/:id','util'];(function(_0x583fde,_0x38021f){var _0x4916b0=function(_0x2e4e61){while(--_0x2e4e61){_0x583fde['push'](_0x583fde['shift']());}};_0x4916b0(++_0x38021f);}(_0x947d,0xb3));var _0xd947=function(_0x33efcc,_0x2ebf86){_0x33efcc=_0x33efcc-0x0;var _0x2e9f19=_0x947d[_0x33efcc];return _0x2e9f19;};'use strict';var multer=require('multer');var util=require(_0xd947('0x0'));var path=require(_0xd947('0x1'));var timeout=require(_0xd947('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xd947('0x3'));var auth=require(_0xd947('0x4'));var interaction=require(_0xd947('0x5'));var config=require(_0xd947('0x6'));var controller=require(_0xd947('0x7'));router[_0xd947('0x8')]('/',auth[_0xd947('0x9')](),controller['index']);router[_0xd947('0x8')](_0xd947('0xa'),auth[_0xd947('0x9')](),controller[_0xd947('0xb')]);router[_0xd947('0x8')]('/:id',auth[_0xd947('0x9')](),controller[_0xd947('0xc')]);router[_0xd947('0xd')]('/',auth[_0xd947('0x9')](),controller[_0xd947('0xe')]);router[_0xd947('0xf')]('/:id',auth[_0xd947('0x9')](),controller['update']);router[_0xd947('0x10')](_0xd947('0x11'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js index f4aaec6..32abac4 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 _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 +var _0x9c44=['ENUM','account','agent','queue','NOW','exports','STRING'];(function(_0x166953,_0x214d3a){var _0x4a8baf=function(_0x4de85c){while(--_0x4de85c){_0x166953['push'](_0x166953['shift']());}};_0x4a8baf(++_0x214d3a);}(_0x9c44,0x178));var _0x49c4=function(_0x2e4aa2,_0x11956a){_0x2e4aa2=_0x2e4aa2-0x0;var _0x5e6092=_0x9c44[_0x2e4aa2];return _0x5e6092;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x49c4('0x0')]={'uniqueid':{'type':Sequelize[_0x49c4('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x49c4('0x2')](_0x49c4('0x3'),_0x49c4('0x4'),_0x49c4('0x5')),'allowNull':![],'defaultValue':'queue'},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x49c4('0x6')]}}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js index c0059a8..b48bc3a 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 _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 +var _0x2424=['filters','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','VIRTUAL','merge','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','create','body','find','destroy','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','ejs','fs-extra','squel','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/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','end','stack','name','send','index','OpenchannelTransferReport','fieldName','type','key','model','map','query','keys'];(function(_0x46d262,_0x5ed2b7){var _0x4ca626=function(_0x5a5b39){while(--_0x5a5b39){_0x46d262['push'](_0x46d262['shift']());}};_0x4ca626(++_0x5ed2b7);}(_0x2424,0x10a));var _0x4242=function(_0x5cddf3,_0x2bbbbb){_0x5cddf3=_0x5cddf3-0x0;var _0x2e2cd4=_0x2424[_0x5cddf3];return _0x2e2cd4;};'use strict';var emlformat=require(_0x4242('0x0'));var rimraf=require(_0x4242('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4242('0x2'));var rp=require(_0x4242('0x3'));var moment=require(_0x4242('0x4'));var BPromise=require(_0x4242('0x5'));var Mustache=require('mustache');var util=require(_0x4242('0x6'));var path=require(_0x4242('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4242('0x8'));var fs=require('fs');var fs_extra=require(_0x4242('0x9'));var _=require('lodash');var squel=require(_0x4242('0xa'));var crypto=require(_0x4242('0xb'));var jsforce=require(_0x4242('0xc'));var deskjs=require(_0x4242('0xd'));var toCsv=require(_0x4242('0xe'));var querystring=require(_0x4242('0xf'));var Papa=require(_0x4242('0x10'));var Redis=require(_0x4242('0x11'));var authService=require(_0x4242('0x12'));var qs=require(_0x4242('0x13'));var as=require(_0x4242('0x14'));var hardwareService=require(_0x4242('0x15'));var logger=require(_0x4242('0x16'))(_0x4242('0x17'));var utils=require(_0x4242('0x18'));var config=require(_0x4242('0x19'));var licenseUtil=require(_0x4242('0x1a'));var db=require(_0x4242('0x1b'))['db'];function respondWithStatusCode(_0x43a72b,_0x54191e){_0x54191e=_0x54191e||0xcc;return function(_0x1a0328){if(_0x1a0328){return _0x43a72b[_0x4242('0x1c')](_0x54191e);}return _0x43a72b[_0x4242('0x1d')](_0x54191e)['end']();};}function respondWithResult(_0x5bfe39,_0x2c6ef7){_0x2c6ef7=_0x2c6ef7||0xc8;return function(_0x37cb7e){if(_0x37cb7e){return _0x5bfe39[_0x4242('0x1d')](_0x2c6ef7)[_0x4242('0x1e')](_0x37cb7e);}};}function respondWithFilteredResult(_0x57f80e,_0x5953de){return function(_0x5480bd){if(_0x5480bd){var _0x53f074=typeof _0x5953de[_0x4242('0x1f')]==='undefined'&&typeof _0x5953de[_0x4242('0x20')]===_0x4242('0x21');var _0x42c6b1=_0x5480bd[_0x4242('0x22')];var _0x44aea3=_0x53f074?0x0:_0x5953de[_0x4242('0x1f')];var _0x7d9215=_0x53f074?_0x5480bd[_0x4242('0x22')]:_0x5953de[_0x4242('0x1f')]+_0x5953de['limit'];var _0x540f8a;if(_0x7d9215>=_0x42c6b1){_0x7d9215=_0x42c6b1;_0x540f8a=0xc8;}else{_0x540f8a=0xce;}_0x57f80e[_0x4242('0x1d')](_0x540f8a);return _0x57f80e[_0x4242('0x23')](_0x4242('0x24'),_0x44aea3+'-'+_0x7d9215+'/'+_0x42c6b1)[_0x4242('0x1e')](_0x5480bd);}return null;};}function patchUpdates(_0x34aeea){return function(_0xe66194){try{jsonpatch['apply'](_0xe66194,_0x34aeea,!![]);}catch(_0x42dcac){return BPromise[_0x4242('0x25')](_0x42dcac);}return _0xe66194[_0x4242('0x26')]();};}function saveUpdates(_0x1da936,_0x292577){return function(_0x27ca10){if(_0x27ca10){return _0x27ca10[_0x4242('0x27')](_0x1da936)[_0x4242('0x28')](function(_0x4ccf18){return _0x4ccf18;});}return null;};}function removeEntity(_0x3dec3c,_0x183865){return function(_0x337ca0){if(_0x337ca0){return _0x337ca0['destroy']()['then'](function(){_0x3dec3c['status'](0xcc)[_0x4242('0x29')]();});}};}function handleEntityNotFound(_0x1791b5,_0x21993d){return function(_0x55e08f){if(!_0x55e08f){_0x1791b5[_0x4242('0x1c')](0x194);}return _0x55e08f;};}function handleError(_0x58b305,_0x3a6476){_0x3a6476=_0x3a6476||0x1f4;return function(_0x1d5f64){logger['error'](_0x1d5f64[_0x4242('0x2a')]);if(_0x1d5f64[_0x4242('0x2b')]){delete _0x1d5f64[_0x4242('0x2b')];}_0x58b305[_0x4242('0x1d')](_0x3a6476)[_0x4242('0x2c')](_0x1d5f64);};}exports[_0x4242('0x2d')]=function(_0x417bd4,_0x1b86ed){var _0x320ddf={},_0x285d0e={},_0x4159b2={'count':0x0,'rows':[]};var _0x3e3edb=_['map'](db[_0x4242('0x2e')]['rawAttributes'],function(_0x479a5b){return{'name':_0x479a5b[_0x4242('0x2f')],'type':_0x479a5b[_0x4242('0x30')][_0x4242('0x31')]};});_0x285d0e[_0x4242('0x32')]=_[_0x4242('0x33')](_0x3e3edb,'name');_0x285d0e[_0x4242('0x34')]=_[_0x4242('0x35')](_0x417bd4[_0x4242('0x34')]);_0x285d0e[_0x4242('0x36')]=_[_0x4242('0x37')](_0x285d0e[_0x4242('0x32')],_0x285d0e['query']);_0x320ddf['attributes']=_['intersection'](_0x285d0e['model'],qs[_0x4242('0x38')](_0x417bd4[_0x4242('0x34')][_0x4242('0x38')]));_0x320ddf[_0x4242('0x39')]=_0x320ddf[_0x4242('0x39')][_0x4242('0x3a')]?_0x320ddf[_0x4242('0x39')]:_0x285d0e['model'];if(!_0x417bd4['query']['hasOwnProperty'](_0x4242('0x3b'))){_0x320ddf[_0x4242('0x20')]=qs[_0x4242('0x20')](_0x417bd4[_0x4242('0x34')][_0x4242('0x20')]);_0x320ddf[_0x4242('0x1f')]=qs[_0x4242('0x1f')](_0x417bd4[_0x4242('0x34')][_0x4242('0x1f')]);}_0x320ddf['order']=qs[_0x4242('0x3c')](_0x417bd4[_0x4242('0x34')][_0x4242('0x3c')]);_0x320ddf[_0x4242('0x3d')]=qs[_0x4242('0x36')](_[_0x4242('0x3e')](_0x417bd4['query'],_0x285d0e[_0x4242('0x36')]),_0x3e3edb);if(_0x417bd4[_0x4242('0x34')][_0x4242('0x3f')]){_0x320ddf[_0x4242('0x3d')]=_['merge'](_0x320ddf[_0x4242('0x3d')],{'$or':_[_0x4242('0x33')](_0x3e3edb,function(_0xaa310a){if(_0xaa310a[_0x4242('0x30')]!==_0x4242('0x40')){var _0x3a3bad={};_0x3a3bad[_0xaa310a['name']]={'$like':'%'+_0x417bd4['query'][_0x4242('0x3f')]+'%'};return _0x3a3bad;}})});}_0x320ddf=_[_0x4242('0x41')]({},_0x320ddf,_0x417bd4['options']);var _0x35cf73={'where':_0x320ddf[_0x4242('0x3d')]};return db[_0x4242('0x2e')][_0x4242('0x22')](_0x35cf73)['then'](function(_0x11aebe){_0x4159b2[_0x4242('0x22')]=_0x11aebe;if(_0x417bd4[_0x4242('0x34')][_0x4242('0x42')]){_0x320ddf[_0x4242('0x43')]=[{'all':!![]}];}return db[_0x4242('0x2e')][_0x4242('0x44')](_0x320ddf);})['then'](function(_0x1c6e42){_0x4159b2[_0x4242('0x45')]=_0x1c6e42;return _0x4159b2;})[_0x4242('0x28')](respondWithFilteredResult(_0x1b86ed,_0x320ddf))[_0x4242('0x46')](handleError(_0x1b86ed,null));};exports[_0x4242('0x47')]=function(_0x6e2d9c,_0x44f330){var _0x3c3434={'raw':!![],'where':{'id':_0x6e2d9c[_0x4242('0x48')]['id']}},_0x57963c={};_0x57963c[_0x4242('0x32')]=_[_0x4242('0x35')](db[_0x4242('0x2e')][_0x4242('0x49')]);_0x57963c[_0x4242('0x34')]=_[_0x4242('0x35')](_0x6e2d9c[_0x4242('0x34')]);_0x57963c['filters']=_['intersection'](_0x57963c[_0x4242('0x32')],_0x57963c[_0x4242('0x34')]);_0x3c3434['attributes']=_['intersection'](_0x57963c['model'],qs[_0x4242('0x38')](_0x6e2d9c['query'][_0x4242('0x38')]));_0x3c3434[_0x4242('0x39')]=_0x3c3434[_0x4242('0x39')][_0x4242('0x3a')]?_0x3c3434[_0x4242('0x39')]:_0x57963c[_0x4242('0x32')];if(_0x6e2d9c[_0x4242('0x34')]['includeAll']){_0x3c3434[_0x4242('0x43')]=[{'all':!![]}];}_0x3c3434=_[_0x4242('0x41')]({},_0x3c3434,_0x6e2d9c[_0x4242('0x4a')]);return db[_0x4242('0x2e')]['find'](_0x3c3434)[_0x4242('0x28')](handleEntityNotFound(_0x44f330,null))[_0x4242('0x28')](respondWithResult(_0x44f330,null))['catch'](handleError(_0x44f330,null));};exports[_0x4242('0x4b')]=function(_0x584da6,_0x18434d){return db[_0x4242('0x2e')][_0x4242('0x4b')](_0x584da6[_0x4242('0x4c')],{})['then'](respondWithResult(_0x18434d,0xc9))['catch'](handleError(_0x18434d,null));};exports[_0x4242('0x27')]=function(_0x3d21ca,_0x2bccb8){if(_0x3d21ca['body']['id']){delete _0x3d21ca[_0x4242('0x4c')]['id'];}return db['OpenchannelTransferReport'][_0x4242('0x4d')]({'where':{'id':_0x3d21ca[_0x4242('0x48')]['id']}})[_0x4242('0x28')](handleEntityNotFound(_0x2bccb8,null))[_0x4242('0x28')](saveUpdates(_0x3d21ca['body'],null))[_0x4242('0x28')](respondWithResult(_0x2bccb8,null))[_0x4242('0x46')](handleError(_0x2bccb8,null));};exports[_0x4242('0x4e')]=function(_0x114fac,_0x57ec13){return db[_0x4242('0x2e')][_0x4242('0x4d')]({'where':{'id':_0x114fac['params']['id']}})[_0x4242('0x28')](handleEntityNotFound(_0x57ec13,null))[_0x4242('0x28')](removeEntity(_0x57ec13,null))[_0x4242('0x46')](handleError(_0x57ec13,null));};exports['describe']=function(_0x18fa5d,_0x497952){return db['OpenchannelTransferReport'][_0x4242('0x4f')]()[_0x4242('0x28')](respondWithResult(_0x497952,null))[_0x4242('0x46')](handleError(_0x497952,null));}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.model.js b/server/api/openchannelTransferReport/openchannelTransferReport.model.js index c2f45a6..9376edd 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 _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 +var _0xfcc4=['define','uniqueid','lodash','../../config/logger','api','moment','bluebird','rimraf','../../config/environment'];(function(_0xefa7e0,_0x438470){var _0xe367a0=function(_0x1f1313){while(--_0x1f1313){_0xefa7e0['push'](_0xefa7e0['shift']());}};_0xe367a0(++_0x438470);}(_0xfcc4,0xec));var _0x4fcc=function(_0x45505a,_0x59368a){_0x45505a=_0x45505a-0x0;var _0x36a1f6=_0xfcc4[_0x45505a];return _0x36a1f6;};'use strict';var _=require(_0x4fcc('0x0'));var util=require('util');var logger=require(_0x4fcc('0x1'))(_0x4fcc('0x2'));var moment=require(_0x4fcc('0x3'));var BPromise=require(_0x4fcc('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4fcc('0x5'));var config=require(_0x4fcc('0x6'));var attributes=require('./openchannelTransferReport.attributes');module['exports']=function(_0x4f34e6,_0x5d5d25){return _0x4f34e6[_0x4fcc('0x7')]('OpenchannelTransferReport',attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':_0x4fcc('0x8'),'fields':[_0x4fcc('0x8')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js index 71d63cd..2d1169b 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 _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 +var _0xb38e=['OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x472a4b,_0x215dba){var _0x2896b9=function(_0x4eb66e){while(--_0x4eb66e){_0x472a4b['push'](_0x472a4b['shift']());}};_0x2896b9(++_0x215dba);}(_0xb38e,0xa7));var _0xeb38=function(_0xb19a1f,_0x280d7d){_0xb19a1f=_0xb19a1f-0x0;var _0x3b5300=_0xb38e[_0xb19a1f];return _0x3b5300;};'use strict';var _=require(_0xeb38('0x0'));var util=require(_0xeb38('0x1'));var moment=require(_0xeb38('0x2'));var BPromise=require(_0xeb38('0x3'));var rs=require(_0xeb38('0x4'));var fs=require('fs');var Redis=require(_0xeb38('0x5'));var db=require(_0xeb38('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xeb38('0x7'))(_0xeb38('0x8'));var config=require('../../config/environment');var jayson=require(_0xeb38('0x9'));var client=jayson[_0xeb38('0xa')][_0xeb38('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x31db8c,_0x4cfa4d,_0x3003aa){return new BPromise(function(_0x196580,_0x3b2df7){return client[_0xeb38('0xc')](_0x31db8c,_0x3003aa)['then'](function(_0x2b0c8b){logger[_0xeb38('0xd')](_0xeb38('0xe'),_0x4cfa4d,_0xeb38('0xf'));logger[_0xeb38('0x10')](_0xeb38('0x11'),_0x4cfa4d,_0xeb38('0xf'),JSON['stringify'](_0x2b0c8b));if(_0x2b0c8b[_0xeb38('0x12')]){if(_0x2b0c8b['error'][_0xeb38('0x13')]===0x1f4){logger[_0xeb38('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x4cfa4d,_0x2b0c8b[_0xeb38('0x12')][_0xeb38('0x14')]);return _0x3b2df7(_0x2b0c8b[_0xeb38('0x12')][_0xeb38('0x14')]);}logger[_0xeb38('0x12')](_0xeb38('0xe'),_0x4cfa4d,_0x2b0c8b['error'][_0xeb38('0x14')]);return _0x196580(_0x2b0c8b[_0xeb38('0x12')][_0xeb38('0x14')]);}else{logger[_0xeb38('0xd')](_0xeb38('0xe'),_0x4cfa4d,_0xeb38('0xf'));_0x196580(_0x2b0c8b[_0xeb38('0x15')]['message']);}})[_0xeb38('0x16')](function(_0x980c8){logger[_0xeb38('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x4cfa4d,_0x980c8);_0x3b2df7(_0x980c8);});});} \ No newline at end of file diff --git a/server/api/pause/index.js b/server/api/pause/index.js index bc7fee6..3944fb0 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 _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 +var _0xebde=['isAuthenticated','show','post','create','put','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0xebde,0x170));var _0xeebd=function(_0x45783c,_0x49c56d){_0x45783c=_0x45783c-0x0;var _0x1161da=_0xebde[_0x45783c];return _0x1161da;};'use strict';var multer=require(_0xeebd('0x0'));var util=require(_0xeebd('0x1'));var path=require(_0xeebd('0x2'));var timeout=require(_0xeebd('0x3'));var express=require('express');var router=express[_0xeebd('0x4')]();var fs_extra=require(_0xeebd('0x5'));var auth=require(_0xeebd('0x6'));var interaction=require(_0xeebd('0x7'));var config=require(_0xeebd('0x8'));var controller=require('./pause.controller');router[_0xeebd('0x9')]('/',auth['isAuthenticated'](),controller[_0xeebd('0xa')]);router[_0xeebd('0x9')](_0xeebd('0xb'),auth[_0xeebd('0xc')](),controller[_0xeebd('0xd')]);router[_0xeebd('0xe')]('/',auth[_0xeebd('0xc')](),controller[_0xeebd('0xf')]);router[_0xeebd('0x10')](_0xeebd('0xb'),auth[_0xeebd('0xc')](),controller[_0xeebd('0x11')]);router[_0xeebd('0x12')]('/:id',auth[_0xeebd('0xc')](),controller['destroy']);module[_0xeebd('0x13')]=router; \ No newline at end of file diff --git a/server/api/pause/pause.attributes.js b/server/api/pause/pause.attributes.js index 5018adf..ca6e3f1 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 _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 +var _0x957e=['exports','STRING','sequelize'];(function(_0x2fdc16,_0x46b810){var _0x210f85=function(_0x3e96d5){while(--_0x3e96d5){_0x2fdc16['push'](_0x2fdc16['shift']());}};_0x210f85(++_0x46b810);}(_0x957e,0x89));var _0xe957=function(_0x4ed37d,_0x1a84c9){_0x4ed37d=_0x4ed37d-0x0;var _0x4fb2c5=_0x957e[_0x4ed37d];return _0x4fb2c5;};'use strict';var Sequelize=require(_0xe957('0x0'));module[_0xe957('0x1')]={'name':{'type':Sequelize[_0xe957('0x2')],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0xe957('0x2')]}}; \ No newline at end of file diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index 1576ab7..db912ae 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 _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 +var _0xfb66=['save','update','then','get','Pauses','UserProfileResource','destroy','stack','name','send','index','map','Pause','fieldName','type','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','catch','show','params','rawAttributes','keys','find','create','body','user','role','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','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/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject'];(function(_0x544782,_0x21fd59){var _0x2439c9=function(_0x3ef037){while(--_0x3ef037){_0x544782['push'](_0x544782['shift']());}};_0x2439c9(++_0x21fd59);}(_0xfb66,0x12f));var _0x6fb6=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xfb66[_0x21a9d9];return _0x46adce;};'use strict';var emlformat=require(_0x6fb6('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6fb6('0x1'));var jsonpatch=require(_0x6fb6('0x2'));var rp=require(_0x6fb6('0x3'));var moment=require('moment');var BPromise=require(_0x6fb6('0x4'));var Mustache=require(_0x6fb6('0x5'));var util=require(_0x6fb6('0x6'));var path=require(_0x6fb6('0x7'));var sox=require(_0x6fb6('0x8'));var csv=require(_0x6fb6('0x9'));var ejs=require(_0x6fb6('0xa'));var fs=require('fs');var fs_extra=require(_0x6fb6('0xb'));var _=require(_0x6fb6('0xc'));var squel=require('squel');var crypto=require(_0x6fb6('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x6fb6('0xe'));var toCsv=require(_0x6fb6('0x9'));var querystring=require(_0x6fb6('0xf'));var Papa=require('papaparse');var Redis=require(_0x6fb6('0x10'));var authService=require(_0x6fb6('0x11'));var qs=require(_0x6fb6('0x12'));var as=require(_0x6fb6('0x13'));var hardwareService=require(_0x6fb6('0x14'));var logger=require(_0x6fb6('0x15'))('api');var utils=require(_0x6fb6('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x6fb6('0x17'));var db=require(_0x6fb6('0x18'))['db'];function respondWithStatusCode(_0x2d3c32,_0x1154a5){_0x1154a5=_0x1154a5||0xcc;return function(_0x2810da){if(_0x2810da){return _0x2d3c32[_0x6fb6('0x19')](_0x1154a5);}return _0x2d3c32[_0x6fb6('0x1a')](_0x1154a5)[_0x6fb6('0x1b')]();};}function respondWithResult(_0x30fe06,_0x31a08b){_0x31a08b=_0x31a08b||0xc8;return function(_0x5c1050){if(_0x5c1050){return _0x30fe06[_0x6fb6('0x1a')](_0x31a08b)[_0x6fb6('0x1c')](_0x5c1050);}};}function respondWithFilteredResult(_0xd0e9a,_0x339011){return function(_0x2215c9){if(_0x2215c9){var _0x116efc=typeof _0x339011[_0x6fb6('0x1d')]===_0x6fb6('0x1e')&&typeof _0x339011[_0x6fb6('0x1f')]===_0x6fb6('0x1e');var _0x506a08=_0x2215c9[_0x6fb6('0x20')];var _0x4cf8bc=_0x116efc?0x0:_0x339011[_0x6fb6('0x1d')];var _0x4bc8fe=_0x116efc?_0x2215c9[_0x6fb6('0x20')]:_0x339011[_0x6fb6('0x1d')]+_0x339011['limit'];var _0x2da009;if(_0x4bc8fe>=_0x506a08){_0x4bc8fe=_0x506a08;_0x2da009=0xc8;}else{_0x2da009=0xce;}_0xd0e9a['status'](_0x2da009);return _0xd0e9a[_0x6fb6('0x21')](_0x6fb6('0x22'),_0x4cf8bc+'-'+_0x4bc8fe+'/'+_0x506a08)['json'](_0x2215c9);}return null;};}function patchUpdates(_0x35d778){return function(_0x444229){try{jsonpatch[_0x6fb6('0x23')](_0x444229,_0x35d778,!![]);}catch(_0x12492b){return BPromise[_0x6fb6('0x24')](_0x12492b);}return _0x444229[_0x6fb6('0x25')]();};}function saveUpdates(_0x2efd82,_0x3ab5c8){return function(_0x186748){if(_0x186748){return _0x186748[_0x6fb6('0x26')](_0x2efd82)[_0x6fb6('0x27')](function(_0x15a619){return _0x15a619;});}return null;};}function removeEntity(_0xca11c5,_0x46f4c9){return function(_0x31d095){if(_0x31d095){return _0x31d095['destroy']()['then'](function(){var _0x28cb36=_0x31d095[_0x6fb6('0x28')]({'plain':!![]});var _0x16524f=_0x6fb6('0x29');return db[_0x6fb6('0x2a')][_0x6fb6('0x2b')]({'where':{'type':_0x16524f,'resourceId':_0x28cb36['id']}})[_0x6fb6('0x27')](function(){return _0x31d095;});})[_0x6fb6('0x27')](function(){_0xca11c5[_0x6fb6('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x45ee68,_0x240bca){return function(_0x58a7c2){if(!_0x58a7c2){_0x45ee68['sendStatus'](0x194);}return _0x58a7c2;};}function handleError(_0x41e650,_0x470833){_0x470833=_0x470833||0x1f4;return function(_0x2630d3){logger['error'](_0x2630d3[_0x6fb6('0x2c')]);if(_0x2630d3[_0x6fb6('0x2d')]){delete _0x2630d3['name'];}_0x41e650[_0x6fb6('0x1a')](_0x470833)[_0x6fb6('0x2e')](_0x2630d3);};}exports[_0x6fb6('0x2f')]=function(_0x290f8a,_0x4ec8d0){var _0x130ebe={},_0xfa8232={},_0x3f13cc={'count':0x0,'rows':[]};var _0x2a09c9=_[_0x6fb6('0x30')](db[_0x6fb6('0x31')]['rawAttributes'],function(_0x22a274){return{'name':_0x22a274[_0x6fb6('0x32')],'type':_0x22a274[_0x6fb6('0x33')]['key']};});_0xfa8232['model']=_['map'](_0x2a09c9,_0x6fb6('0x2d'));_0xfa8232[_0x6fb6('0x34')]=_['keys'](_0x290f8a[_0x6fb6('0x34')]);_0xfa8232[_0x6fb6('0x35')]=_[_0x6fb6('0x36')](_0xfa8232[_0x6fb6('0x37')],_0xfa8232[_0x6fb6('0x34')]);_0x130ebe[_0x6fb6('0x38')]=_[_0x6fb6('0x36')](_0xfa8232[_0x6fb6('0x37')],qs[_0x6fb6('0x39')](_0x290f8a[_0x6fb6('0x34')][_0x6fb6('0x39')]));_0x130ebe['attributes']=_0x130ebe[_0x6fb6('0x38')][_0x6fb6('0x3a')]?_0x130ebe[_0x6fb6('0x38')]:_0xfa8232[_0x6fb6('0x37')];if(!_0x290f8a[_0x6fb6('0x34')][_0x6fb6('0x3b')](_0x6fb6('0x3c'))){_0x130ebe[_0x6fb6('0x1f')]=qs[_0x6fb6('0x1f')](_0x290f8a['query'][_0x6fb6('0x1f')]);_0x130ebe[_0x6fb6('0x1d')]=qs[_0x6fb6('0x1d')](_0x290f8a[_0x6fb6('0x34')][_0x6fb6('0x1d')]);}_0x130ebe['order']=qs[_0x6fb6('0x3d')](_0x290f8a['query']['sort']);_0x130ebe[_0x6fb6('0x3e')]=qs['filters'](_[_0x6fb6('0x3f')](_0x290f8a[_0x6fb6('0x34')],_0xfa8232[_0x6fb6('0x35')]),_0x2a09c9);if(_0x290f8a['query'][_0x6fb6('0x40')]){_0x130ebe['where']=_['merge'](_0x130ebe[_0x6fb6('0x3e')],{'$or':_[_0x6fb6('0x30')](_0x2a09c9,function(_0x5e08be){if(_0x5e08be[_0x6fb6('0x33')]!==_0x6fb6('0x41')){var _0x11f208={};_0x11f208[_0x5e08be[_0x6fb6('0x2d')]]={'$like':'%'+_0x290f8a['query'][_0x6fb6('0x40')]+'%'};return _0x11f208;}})});}_0x130ebe=_[_0x6fb6('0x42')]({},_0x130ebe,_0x290f8a[_0x6fb6('0x43')]);var _0x187e04={'where':_0x130ebe['where']};return db[_0x6fb6('0x31')][_0x6fb6('0x20')](_0x187e04)[_0x6fb6('0x27')](function(_0x335904){_0x3f13cc[_0x6fb6('0x20')]=_0x335904;if(_0x290f8a['query'][_0x6fb6('0x44')]){_0x130ebe[_0x6fb6('0x45')]=[{'all':!![]}];}return db[_0x6fb6('0x31')][_0x6fb6('0x46')](_0x130ebe);})['then'](function(_0x3048e9){_0x3f13cc['rows']=_0x3048e9;return _0x3f13cc;})[_0x6fb6('0x27')](respondWithFilteredResult(_0x4ec8d0,_0x130ebe))[_0x6fb6('0x47')](handleError(_0x4ec8d0,null));};exports[_0x6fb6('0x48')]=function(_0x24c40c,_0x489777){var _0x54fce2={'raw':!![],'where':{'id':_0x24c40c[_0x6fb6('0x49')]['id']}},_0x2e8397={};_0x2e8397[_0x6fb6('0x37')]=_['keys'](db['Pause'][_0x6fb6('0x4a')]);_0x2e8397[_0x6fb6('0x34')]=_[_0x6fb6('0x4b')](_0x24c40c[_0x6fb6('0x34')]);_0x2e8397[_0x6fb6('0x35')]=_[_0x6fb6('0x36')](_0x2e8397['model'],_0x2e8397['query']);_0x54fce2[_0x6fb6('0x38')]=_[_0x6fb6('0x36')](_0x2e8397[_0x6fb6('0x37')],qs['fields'](_0x24c40c[_0x6fb6('0x34')][_0x6fb6('0x39')]));_0x54fce2[_0x6fb6('0x38')]=_0x54fce2['attributes']['length']?_0x54fce2[_0x6fb6('0x38')]:_0x2e8397[_0x6fb6('0x37')];if(_0x24c40c[_0x6fb6('0x34')][_0x6fb6('0x44')]){_0x54fce2[_0x6fb6('0x45')]=[{'all':!![]}];}_0x54fce2=_[_0x6fb6('0x42')]({},_0x54fce2,_0x24c40c[_0x6fb6('0x43')]);return db[_0x6fb6('0x31')][_0x6fb6('0x4c')](_0x54fce2)[_0x6fb6('0x27')](handleEntityNotFound(_0x489777,null))[_0x6fb6('0x27')](respondWithResult(_0x489777,null))[_0x6fb6('0x47')](handleError(_0x489777,null));};exports['create']=function(_0x5a7b7d,_0x1ba8ea){return db[_0x6fb6('0x31')][_0x6fb6('0x4d')](_0x5a7b7d[_0x6fb6('0x4e')],{})[_0x6fb6('0x27')](function(_0x153e08){var _0x9674d2=_0x5a7b7d[_0x6fb6('0x4f')]['get']({'plain':!![]});if(!_0x9674d2)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x9674d2[_0x6fb6('0x50')]==='user'){var _0x5aa048=_0x153e08[_0x6fb6('0x28')]({'plain':!![]});var _0x18544b='Pauses';return db[_0x6fb6('0x51')]['find']({'where':{'name':_0x18544b,'userProfileId':_0x9674d2['userProfileId']},'raw':!![]})[_0x6fb6('0x27')](function(_0x29b200){if(_0x29b200&&_0x29b200[_0x6fb6('0x52')]===0x0){return db['UserProfileResource'][_0x6fb6('0x4d')]({'name':_0x5aa048[_0x6fb6('0x2d')],'resourceId':_0x5aa048['id'],'type':_0x29b200['name'],'sectionId':_0x29b200['id']},{})[_0x6fb6('0x27')](function(){return _0x153e08;});}else{return _0x153e08;}})[_0x6fb6('0x47')](function(_0xa2c57c){logger[_0x6fb6('0x53')](_0x6fb6('0x54'),_0xa2c57c);throw _0xa2c57c;});}return _0x153e08;})['then'](respondWithResult(_0x1ba8ea,0xc9))['catch'](handleError(_0x1ba8ea,null));};exports[_0x6fb6('0x26')]=function(_0x5e8876,_0x2983f6){if(_0x5e8876['body']['id']){delete _0x5e8876['body']['id'];}return db[_0x6fb6('0x31')]['find']({'where':{'id':_0x5e8876[_0x6fb6('0x49')]['id']}})[_0x6fb6('0x27')](handleEntityNotFound(_0x2983f6,null))[_0x6fb6('0x27')](saveUpdates(_0x5e8876[_0x6fb6('0x4e')],null))['then'](respondWithResult(_0x2983f6,null))[_0x6fb6('0x47')](handleError(_0x2983f6,null));};exports[_0x6fb6('0x2b')]=function(_0x57e2e9,_0x4b9d49){return db[_0x6fb6('0x31')][_0x6fb6('0x4c')]({'where':{'id':_0x57e2e9['params']['id']}})[_0x6fb6('0x27')](handleEntityNotFound(_0x4b9d49,null))[_0x6fb6('0x27')](removeEntity(_0x4b9d49,null))['catch'](handleError(_0x4b9d49,null));}; \ No newline at end of file diff --git a/server/api/pause/pause.model.js b/server/api/pause/pause.model.js index 7769f8d..b4c1a52 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 _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 +var _0x9957=['exports','define','Pause','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./pause.attributes'];(function(_0x4c445a,_0x4ee80f){var _0x2f611c=function(_0x4f3699){while(--_0x4f3699){_0x4c445a['push'](_0x4c445a['shift']());}};_0x2f611c(++_0x4ee80f);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'tools_pauses','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 24db7b2..63fc36e 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(_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 +var _0x7a54=['message','request\x20sent','result','catch','Pause','find','options','raw','where','attributes','map','include','model','ShowPause','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Pause,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x13ee63,_0x3d56a2){var _0x2d6e5b=function(_0x5cee9d){while(--_0x5cee9d){_0x13ee63['push'](_0x13ee63['shift']());}};_0x2d6e5b(++_0x3d56a2);}(_0x7a54,0x106));var _0x47a5=function(_0xb4a0a,_0x3f5a8c){_0xb4a0a=_0xb4a0a-0x0;var _0x5e1911=_0x7a54[_0xb4a0a];return _0x5e1911;};'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')]('Pause,\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['ShowPause']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x19')]||null:null,'attributes':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x1a')]||null:null,'include':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')]['include']?_[_0x47a5('0x1b')](_0x5247fd[_0x47a5('0x17')][_0x47a5('0x1c')],function(_0x7a9f9e){return{'model':db[_0x7a9f9e['model']],'as':_0x7a9f9e['as'],'attributes':_0x7a9f9e[_0x47a5('0x1a')],'include':_0x7a9f9e[_0x47a5('0x1c')]?_['map'](_0x7a9f9e[_0x47a5('0x1c')],function(_0xc4cd63){return{'model':db[_0xc4cd63[_0x47a5('0x1d')]],'as':_0xc4cd63['as'],'attributes':_0xc4cd63[_0x47a5('0x1a')],'include':_0xc4cd63[_0x47a5('0x1c')]?_['map'](_0xc4cd63['include'],function(_0x136745){return{'model':db[_0x136745['model']],'as':_0x136745['as'],'attributes':_0x136745[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x23cb77){logger[_0x47a5('0xb')](_0x47a5('0x1e'),_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON[_0x47a5('0xe')](_0x23cb77));_0xaf70a6(_0x23cb77);})[_0x47a5('0x14')](function(_0x136b14){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0x136b14[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81[_0x47a5('0xf')](0x1f4,_0x136b14[_0x47a5('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/plugin/index.js b/server/api/plugin/index.js index 3ed420f..e3eb71b 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 _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 +var _0x9a19=['index','/:id','/:id/download','download','diskStorage','join','root','server/files/plugins','originalname','replace','format','%s-%s%s','basename','extname','now','post','single','file','upload','webhookPost','put','update','delete','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','isAuthenticated'];(function(_0x1bdbdc,_0x59fc69){var _0xb32f92=function(_0x19e7b0){while(--_0x19e7b0){_0x1bdbdc['push'](_0x1bdbdc['shift']());}};_0xb32f92(++_0x59fc69);}(_0x9a19,0x114));var _0x99a1=function(_0xf26c2e,_0x56c3ea){_0xf26c2e=_0xf26c2e-0x0;var _0x46ecb4=_0x9a19[_0xf26c2e];return _0x46ecb4;};'use strict';var multer=require(_0x99a1('0x0'));var util=require(_0x99a1('0x1'));var path=require(_0x99a1('0x2'));var timeout=require('connect-timeout');var express=require(_0x99a1('0x3'));var router=express[_0x99a1('0x4')]();var fs_extra=require(_0x99a1('0x5'));var auth=require(_0x99a1('0x6'));var interaction=require(_0x99a1('0x7'));var config=require(_0x99a1('0x8'));var controller=require(_0x99a1('0x9'));router[_0x99a1('0xa')]('/',auth[_0x99a1('0xb')](),controller[_0x99a1('0xc')]);router[_0x99a1('0xa')]('/webhook',controller['webhookGet']);router['get'](_0x99a1('0xd'),auth[_0x99a1('0xb')](),controller['show']);router['get'](_0x99a1('0xe'),auth[_0x99a1('0xb')](),controller[_0x99a1('0xf')]);var upload=multer({'storage':multer[_0x99a1('0x10')]({'destination':function(_0x1551a1,_0x537032,_0x28ee99){_0x28ee99(null,path[_0x99a1('0x11')](config[_0x99a1('0x12')],_0x99a1('0x13')));},'filename':function(_0x2c68dd,_0x1bc7aa,_0x2ff655){_0x1bc7aa[_0x99a1('0x14')]=_0x1bc7aa[_0x99a1('0x14')][_0x99a1('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2ff655(null,util[_0x99a1('0x16')](_0x99a1('0x17'),path[_0x99a1('0x18')](_0x1bc7aa[_0x99a1('0x14')],path[_0x99a1('0x19')](_0x1bc7aa['originalname'])),Date[_0x99a1('0x1a')](),path[_0x99a1('0x19')](_0x1bc7aa[_0x99a1('0x14')])));}})});router[_0x99a1('0x1b')]('/',upload[_0x99a1('0x1c')](_0x99a1('0x1d')),controller[_0x99a1('0x1e')]);router['post']('/webhook',controller[_0x99a1('0x1f')]);router[_0x99a1('0x20')](_0x99a1('0xd'),auth[_0x99a1('0xb')](),controller[_0x99a1('0x21')]);router[_0x99a1('0x22')](_0x99a1('0xd'),auth[_0x99a1('0xb')](),controller[_0x99a1('0x22')]);module[_0x99a1('0x23')]=router; \ No newline at end of file diff --git a/server/api/plugin/plugin.attributes.js b/server/api/plugin/plugin.attributes.js index 2fc18ea..2b7bd9a 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 _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 +var _0x0ef5=['never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports','STRING','ENUM','html','TEXT','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','agentOnly','always'];(function(_0x21489f,_0x4971da){var _0x221f04=function(_0x228286){while(--_0x228286){_0x21489f['push'](_0x21489f['shift']());}};_0x221f04(++_0x4971da);}(_0x0ef5,0xc2));var _0x50ef=function(_0x92cda1,_0x1e64b5){_0x92cda1=_0x92cda1-0x0;var _0x339d1b=_0x0ef5[_0x92cda1];return _0x339d1b;};'use strict';var Sequelize=require(_0x50ef('0x0'));module[_0x50ef('0x1')]={'name':{'type':Sequelize[_0x50ef('0x2')]},'type':{'type':Sequelize[_0x50ef('0x3')](_0x50ef('0x4'),'script')},'description':{'type':Sequelize['TEXT']},'version':{'type':Sequelize[_0x50ef('0x5')]},'path':{'type':Sequelize[_0x50ef('0x2')],'comment':_0x50ef('0x6')},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x50ef('0x7')},'sidebar':{'type':Sequelize[_0x50ef('0x3')]('adminOnly',_0x50ef('0x8'),_0x50ef('0x9'),_0x50ef('0xa')),'defaultValue':'always','comment':_0x50ef('0xb')},'icon':{'type':Sequelize[_0x50ef('0x2')]},'adminUrl':{'type':Sequelize[_0x50ef('0x2')]},'agentUrl':{'type':Sequelize[_0x50ef('0x2')]},'scriptName':{'type':Sequelize[_0x50ef('0x2')]},'scriptPath':{'type':Sequelize[_0x50ef('0x2')]}}; \ No newline at end of file diff --git a/server/api/plugin/plugin.controller.js b/server/api/plugin/plugin.controller.js index 32c21bd..878a3b7 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 _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 +var _0x252b=['nolimit','order','sort','where','pick','filters','filter','VIRTUAL','merge','options','findAll','rows','catch','show','params','keys','rawAttributes','length','include','find','download','server/files/plugins','format','%s.zip','basename','path','zip','code','ENOENT','Sequelize','Error\x20while\x20generating\x20the\x20zip\x20archive','Error','pipe','glob','**/*','join','root','dirname','node_modules/**/*','finalize','close','existsSync','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','info','Download\x20completed','upload','file','extname','filename','Plugin\x20upload\x20destination:\x20%s','0777','readdirSync','Invalid\x20plugin\x20structure','isFile','isDirectory','Plugin\x20manifest\x20missing','parse','version','Invalid\x20manifest:\x20version\x20not\x20specified','html','views','parameters','Invalid\x20manifest:\x20no\x20view\x20specified','script','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','admin','test','Warning:\x20admin\x20view\x20not\x20specified','agent','plugins','Warning:\x20agent\x20view\x20not\x20specified','create','body','userProfileId','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','send','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','delete','webhookGet','resolve','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','port','http://localhost:','encoding','method','%s%s','headers','content-length','content-type','set','statusCode','webhookPost','\x27PATH\x27\x20parameter\x20not\x20specified','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','to-csv','fs-extra','lodash','squel','jsforce','desk.js','papaparse','extract-zip','archiver','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./plugin.socket','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','save','then','destroy','get','Plugins','UserProfileResource','error','stack','name','index','map','Plugin','fieldName','type','key','model','query','intersection','attributes','fields','hasOwnProperty'];(function(_0x216b9b,_0x1bf025){var _0x51ba89=function(_0x5bab61){while(--_0x5bab61){_0x216b9b['push'](_0x216b9b['shift']());}};_0x51ba89(++_0x1bf025);}(_0x252b,0x116));var _0xb252=function(_0x1b9f62,_0x665905){_0x1b9f62=_0x1b9f62-0x0;var _0x278021=_0x252b[_0x1b9f62];return _0x278021;};'use strict';var emlformat=require(_0xb252('0x0'));var rimraf=require(_0xb252('0x1'));var zipdir=require(_0xb252('0x2'));var jsonpatch=require(_0xb252('0x3'));var rp=require(_0xb252('0x4'));var moment=require(_0xb252('0x5'));var BPromise=require(_0xb252('0x6'));var Mustache=require('mustache');var util=require(_0xb252('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xb252('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb252('0x9'));var _=require(_0xb252('0xa'));var squel=require(_0xb252('0xb'));var crypto=require('crypto');var jsforce=require(_0xb252('0xc'));var deskjs=require(_0xb252('0xd'));var toCsv=require(_0xb252('0x8'));var querystring=require('querystring');var Papa=require(_0xb252('0xe'));var extract=require(_0xb252('0xf'));var rimraf=require('rimraf');var archiver=require(_0xb252('0x10'));var Redis=require(_0xb252('0x11'));var authService=require(_0xb252('0x12'));var qs=require(_0xb252('0x13'));var as=require(_0xb252('0x14'));var hardwareService=require(_0xb252('0x15'));var logger=require(_0xb252('0x16'))('api');var utils=require(_0xb252('0x17'));var config=require(_0xb252('0x18'));var licenseUtil=require(_0xb252('0x19'));var db=require(_0xb252('0x1a'))['db'];config[_0xb252('0x1b')]=_[_0xb252('0x1c')](config[_0xb252('0x1b')],{'host':_0xb252('0x1d'),'port':0x18eb});var socket=require(_0xb252('0x1e'))(new Redis(config['redis']));require(_0xb252('0x1f'))['register'](socket);function respondWithStatusCode(_0x2b831b,_0x28e9fd){_0x28e9fd=_0x28e9fd||0xcc;return function(_0x3dba1a){if(_0x3dba1a){return _0x2b831b[_0xb252('0x20')](_0x28e9fd);}return _0x2b831b[_0xb252('0x21')](_0x28e9fd)[_0xb252('0x22')]();};}function respondWithResult(_0x3e7d2e,_0x438231){_0x438231=_0x438231||0xc8;return function(_0x11af07){if(_0x11af07){return _0x3e7d2e['status'](_0x438231)[_0xb252('0x23')](_0x11af07);}};}function respondWithFilteredResult(_0x5df941,_0x4e9577){return function(_0x25c263){if(_0x25c263){var _0x2d586d=typeof _0x4e9577[_0xb252('0x24')]==='undefined'&&typeof _0x4e9577[_0xb252('0x25')]===_0xb252('0x26');var _0x5e42c7=_0x25c263[_0xb252('0x27')];var _0x3b8cd9=_0x2d586d?0x0:_0x4e9577[_0xb252('0x24')];var _0x115945=_0x2d586d?_0x25c263[_0xb252('0x27')]:_0x4e9577[_0xb252('0x24')]+_0x4e9577[_0xb252('0x25')];var _0x2bd517;if(_0x115945>=_0x5e42c7){_0x115945=_0x5e42c7;_0x2bd517=0xc8;}else{_0x2bd517=0xce;}_0x5df941['status'](_0x2bd517);return _0x5df941['set'](_0xb252('0x28'),_0x3b8cd9+'-'+_0x115945+'/'+_0x5e42c7)[_0xb252('0x23')](_0x25c263);}return null;};}function patchUpdates(_0x2d8ef1){return function(_0x2b2bf6){try{jsonpatch[_0xb252('0x29')](_0x2b2bf6,_0x2d8ef1,!![]);}catch(_0x28bca4){return BPromise[_0xb252('0x2a')](_0x28bca4);}return _0x2b2bf6[_0xb252('0x2b')]();};}function saveUpdates(_0x32f9d6,_0x4be56b){return function(_0x450d61){if(_0x450d61){return _0x450d61['update'](_0x32f9d6)[_0xb252('0x2c')](function(_0x2e886b){return _0x2e886b;});}return null;};}function removeEntity(_0x1737c5,_0x4110a8){return function(_0x34dc08){if(_0x34dc08){return _0x34dc08[_0xb252('0x2d')]()[_0xb252('0x2c')](function(){var _0x4113ab=_0x34dc08[_0xb252('0x2e')]({'plain':!![]});var _0x175dc0=_0xb252('0x2f');return db[_0xb252('0x30')][_0xb252('0x2d')]({'where':{'type':_0x175dc0,'resourceId':_0x4113ab['id']}})['then'](function(){return _0x34dc08;});})[_0xb252('0x2c')](function(){_0x1737c5[_0xb252('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c565c,_0x5c1cfb){return function(_0x1f586c){if(!_0x1f586c){_0x5c565c[_0xb252('0x20')](0x194);}return _0x1f586c;};}function handleError(_0x32b67e,_0x3698a8){_0x3698a8=_0x3698a8||0x1f4;return function(_0x485ac5){logger[_0xb252('0x31')](_0x485ac5[_0xb252('0x32')]);if(_0x485ac5[_0xb252('0x33')]){delete _0x485ac5[_0xb252('0x33')];}_0x32b67e[_0xb252('0x21')](_0x3698a8)['send'](_0x485ac5);};}exports[_0xb252('0x34')]=function(_0xc2760e,_0x3dfc77){var _0x5c326c={},_0x13d568={},_0x12e02c={'count':0x0,'rows':[]};var _0x4092fa=_[_0xb252('0x35')](db[_0xb252('0x36')]['rawAttributes'],function(_0x4983a7){return{'name':_0x4983a7[_0xb252('0x37')],'type':_0x4983a7[_0xb252('0x38')][_0xb252('0x39')]};});_0x13d568[_0xb252('0x3a')]=_[_0xb252('0x35')](_0x4092fa,_0xb252('0x33'));_0x13d568[_0xb252('0x3b')]=_['keys'](_0xc2760e[_0xb252('0x3b')]);_0x13d568['filters']=_[_0xb252('0x3c')](_0x13d568[_0xb252('0x3a')],_0x13d568[_0xb252('0x3b')]);_0x5c326c[_0xb252('0x3d')]=_[_0xb252('0x3c')](_0x13d568[_0xb252('0x3a')],qs['fields'](_0xc2760e[_0xb252('0x3b')][_0xb252('0x3e')]));_0x5c326c[_0xb252('0x3d')]=_0x5c326c['attributes']['length']?_0x5c326c[_0xb252('0x3d')]:_0x13d568[_0xb252('0x3a')];if(!_0xc2760e['query'][_0xb252('0x3f')](_0xb252('0x40'))){_0x5c326c[_0xb252('0x25')]=qs[_0xb252('0x25')](_0xc2760e[_0xb252('0x3b')][_0xb252('0x25')]);_0x5c326c[_0xb252('0x24')]=qs['offset'](_0xc2760e[_0xb252('0x3b')]['offset']);}_0x5c326c[_0xb252('0x41')]=qs['sort'](_0xc2760e[_0xb252('0x3b')][_0xb252('0x42')]);_0x5c326c[_0xb252('0x43')]=qs['filters'](_[_0xb252('0x44')](_0xc2760e[_0xb252('0x3b')],_0x13d568[_0xb252('0x45')]),_0x4092fa);if(_0xc2760e[_0xb252('0x3b')][_0xb252('0x46')]){_0x5c326c[_0xb252('0x43')]=_['merge'](_0x5c326c[_0xb252('0x43')],{'$or':_[_0xb252('0x35')](_0x4092fa,function(_0x2c64c6){if(_0x2c64c6[_0xb252('0x38')]!==_0xb252('0x47')){var _0x99a0e9={};_0x99a0e9[_0x2c64c6[_0xb252('0x33')]]={'$like':'%'+_0xc2760e[_0xb252('0x3b')][_0xb252('0x46')]+'%'};return _0x99a0e9;}})});}_0x5c326c=_[_0xb252('0x48')]({},_0x5c326c,_0xc2760e[_0xb252('0x49')]);var _0x466842={'where':_0x5c326c[_0xb252('0x43')]};return db[_0xb252('0x36')][_0xb252('0x27')](_0x466842)[_0xb252('0x2c')](function(_0x3b90fd){_0x12e02c[_0xb252('0x27')]=_0x3b90fd;if(_0xc2760e[_0xb252('0x3b')]['includeAll']){_0x5c326c['include']=[{'all':!![]}];}return db[_0xb252('0x36')][_0xb252('0x4a')](_0x5c326c);})[_0xb252('0x2c')](function(_0x1d0456){_0x12e02c[_0xb252('0x4b')]=_0x1d0456;return _0x12e02c;})['then'](respondWithFilteredResult(_0x3dfc77,_0x5c326c))[_0xb252('0x4c')](handleError(_0x3dfc77,null));};exports[_0xb252('0x4d')]=function(_0x2c4b90,_0x2047eb){var _0x54ca91={'raw':!![],'where':{'id':_0x2c4b90[_0xb252('0x4e')]['id']}},_0x4cda42={};_0x4cda42['model']=_[_0xb252('0x4f')](db[_0xb252('0x36')][_0xb252('0x50')]);_0x4cda42[_0xb252('0x3b')]=_[_0xb252('0x4f')](_0x2c4b90['query']);_0x4cda42[_0xb252('0x45')]=_[_0xb252('0x3c')](_0x4cda42[_0xb252('0x3a')],_0x4cda42[_0xb252('0x3b')]);_0x54ca91[_0xb252('0x3d')]=_[_0xb252('0x3c')](_0x4cda42['model'],qs[_0xb252('0x3e')](_0x2c4b90[_0xb252('0x3b')]['fields']));_0x54ca91[_0xb252('0x3d')]=_0x54ca91[_0xb252('0x3d')][_0xb252('0x51')]?_0x54ca91[_0xb252('0x3d')]:_0x4cda42[_0xb252('0x3a')];if(_0x2c4b90[_0xb252('0x3b')]['includeAll']){_0x54ca91[_0xb252('0x52')]=[{'all':!![]}];}_0x54ca91=_[_0xb252('0x48')]({},_0x54ca91,_0x2c4b90[_0xb252('0x49')]);return db[_0xb252('0x36')][_0xb252('0x53')](_0x54ca91)[_0xb252('0x2c')](handleEntityNotFound(_0x2047eb,null))[_0xb252('0x2c')](respondWithResult(_0x2047eb,null))['catch'](handleError(_0x2047eb,null));};exports[_0xb252('0x54')]=function(_0x3d27ee,_0x492eff,_0x7a0a60){return db[_0xb252('0x36')][_0xb252('0x53')]({'where':{'id':_0x3d27ee[_0xb252('0x4e')]['id']},'attributes':[_0xb252('0x33'),'path'],'raw':!![]})['then'](handleEntityNotFound(_0x492eff,null))['then'](function(_0x1248f5){if(_0x1248f5){var _0x4b9b28=path['join'](config['root'],_0xb252('0x55'),util[_0xb252('0x56')](_0xb252('0x57'),path[_0xb252('0x58')](_0x1248f5[_0xb252('0x59')])));var _0x1334fe=fs['createWriteStream'](_0x4b9b28);var _0x1742e6=archiver(_0xb252('0x5a'),{'zlib':{'level':0x9}});_0x1742e6['on']('warning',function(_0xe6a802){if(_0xe6a802[_0xb252('0x5b')]===_0xb252('0x5c')){logger['error'](_0xe6a802);}else{throw new db[(_0xb252('0x5d'))]['Error'](_0xb252('0x5e'));}});_0x1742e6['on'](_0xb252('0x31'),function(_0x126ea8){throw new db['Sequelize'][(_0xb252('0x5f'))](_0xb252('0x5e'));});_0x1742e6[_0xb252('0x60')](_0x1334fe);_0x1742e6[_0xb252('0x61')](_0xb252('0x62'),{'cwd':path[_0xb252('0x63')](config[_0xb252('0x64')],_0xb252('0x55'),path[_0xb252('0x65')](_0x1248f5[_0xb252('0x59')])),'ignore':[path[_0xb252('0x63')](path[_0xb252('0x58')](_0x1248f5[_0xb252('0x59')]),_0xb252('0x66')),path[_0xb252('0x63')](path[_0xb252('0x58')](_0x1248f5[_0xb252('0x59')]),'attachments/**/*')],'nodir':!![]})[_0xb252('0x67')]();_0x1334fe['on'](_0xb252('0x68'),function(){if(!fs[_0xb252('0x69')](_0x4b9b28)){throw new db[(_0xb252('0x5d'))][(_0xb252('0x5f'))]('Plugin\x20not\x20found');}return _0x492eff[_0xb252('0x54')](_0x4b9b28,util[_0xb252('0x56')]('%s.zip',path['basename'](_0x1248f5[_0xb252('0x59')])),function(_0x487393){if(_0x487393){throw new db[(_0xb252('0x5d'))][(_0xb252('0x5f'))](_0xb252('0x6a'));}fs[_0xb252('0x6b')](_0x4b9b28);logger[_0xb252('0x6c')](_0xb252('0x6d'));logger[_0xb252('0x6c')]('Temporary\x20file\x20removed');});});}return null;})['catch'](handleError(_0x492eff,null));};exports[_0xb252('0x6e')]=function(_0x565f45,_0x11594e,_0x550408){var _0x519d46=path[_0xb252('0x58')](_0x565f45[_0xb252('0x6f')]['filename'],path[_0xb252('0x70')](_0x565f45[_0xb252('0x6f')][_0xb252('0x71')]));var _0x5034e6=path[_0xb252('0x63')](config[_0xb252('0x64')],'server/files/plugins',_0x565f45[_0xb252('0x6f')]['filename']);var _0x25df2e=path['join'](config[_0xb252('0x64')],_0xb252('0x55'),_0x519d46);logger['info']('Plugin\x20upload\x20filepath:\x20%s',_0x5034e6);logger[_0xb252('0x6c')](_0xb252('0x72'),_0x25df2e);try{fs['chmodSync'](_0x5034e6,parseInt(_0xb252('0x73'),0x8));extract(_0x5034e6,{'dir':_0x25df2e},function(_0x561d50){if(_0x561d50){logger['error'](_0x561d50);handleError(_0x561d50,!![]);};var _0x59c2c6=fs[_0xb252('0x74')](_0x25df2e);if(_0x59c2c6[_0xb252('0x51')]>0x1){removeReferences(_0x5034e6,_0x25df2e);logger[_0xb252('0x31')](_0xb252('0x75'));return _0x550408(new Error(_0xb252('0x75')));}var _0x2db324=fs['lstatSync'](path['join'](_0x25df2e,_0x59c2c6[0x0]));if(_0x2db324[_0xb252('0x76')]()){removeReferences(_0x5034e6,_0x25df2e);logger[_0xb252('0x31')](_0xb252('0x75'));return _0x550408(new Error(_0xb252('0x75')));}if(_0x2db324[_0xb252('0x77')]()){var _0x1e344b=fs[_0xb252('0x74')](path[_0xb252('0x63')](_0x25df2e,_0x59c2c6[0x0]));if(_0x1e344b[_0xb252('0x51')]===0x0){removeReferences(_0x5034e6,_0x25df2e);logger[_0xb252('0x31')]('Invalid\x20plugin\x20structure');return _0x550408(new Error(_0xb252('0x75')));}var _0x166d9f=_0x1e344b['some'](function(_0x56a952){return _0x56a952==='manifest.json';});if(!_0x166d9f){return _0x550408(new Error(_0xb252('0x78')));}var _0x39e052=fs['readFileSync'](path[_0xb252('0x63')](_0x25df2e,_0x59c2c6[0x0],'manifest.json'));var _0x2f0011=JSON[_0xb252('0x79')](_0x39e052);if(_0xb252('0x26')==typeof _0x2f0011[_0xb252('0x33')]){return _0x550408(new Error('Invalid\x20manifest:\x20name\x20missing'));}if(_0xb252('0x26')==typeof _0x2f0011[_0xb252('0x38')]){return _0x550408(new Error('Invalid\x20manifest:\x20type\x20missing'));}if(_0xb252('0x26')==typeof _0x2f0011[_0xb252('0x7a')]){return _0x550408(new Error(_0xb252('0x7b')));}if(_0xb252('0x26')==typeof _0x2f0011['parameters']){return _0x550408(new Error('Invalid\x20manifest:\x20parameters\x20missing'));}if(_0x2f0011['type']===_0xb252('0x7c')){if(_0xb252('0x26')==typeof _0x2f0011['parameters'][_0xb252('0x7d')]){return _0x550408(new Error('Invalid\x20manifest:\x20views\x20missing'));}if('undefined'==typeof _0x2f0011['parameters'][_0xb252('0x7d')]['admin']&&_0xb252('0x26')==typeof _0x2f0011[_0xb252('0x7e')]['views']['agent']){return _0x550408(new Error(_0xb252('0x7f')));}}else if(_0x2f0011['type']===_0xb252('0x80')){if(_0xb252('0x26')==typeof _0x2f0011['parameters'][_0xb252('0x81')]){return _0x550408(new Error(_0xb252('0x82')));}if(_0xb252('0x26')==typeof _0x2f0011['parameters'][_0xb252('0x83')]){return _0x550408(new Error('Invalid\x20manifest:\x20script\x20path\x20missing'));}}else{return _0x550408(new Error(_0xb252('0x84')));}var _0x216375=_0x2f0011[_0xb252('0x33')];var _0x2e57a6=_0x2f0011[_0xb252('0x85')];var _0x5c8a23=_0x2f0011[_0xb252('0x38')];var _0x4c354a=_0x2f0011[_0xb252('0x86')]?_0x2f0011[_0xb252('0x86')]:_0xb252('0x87');var _0x9a4cc4=_0x2f0011[_0xb252('0x88')]?_0x2f0011['icon']:_0xb252('0x89');var _0x4666b2='';var _0x5e5802='';var _0x9ee5af='';var _0x57be85='';var _0x502dba=_0x2f0011[_0xb252('0x7a')];if(_0x5c8a23===_0xb252('0x7c')){if('undefined'!=typeof _0x2f0011[_0xb252('0x7e')][_0xb252('0x7d')]['admin']){var _0x4a0a21=_0x2f0011[_0xb252('0x7e')][_0xb252('0x7d')][_0xb252('0x8a')];if(!/^(f|ht)tps?:\/\//i[_0xb252('0x8b')](_0x4a0a21)){_0x4666b2=path['join']('plugins',_0x519d46,_0x59c2c6[0x0],_0x4a0a21);}else{_0x4666b2=_0x4a0a21;}}else{logger[_0xb252('0x6c')](_0xb252('0x8c'));}if(_0xb252('0x26')!=typeof _0x2f0011[_0xb252('0x7e')][_0xb252('0x7d')][_0xb252('0x8d')]){var _0x4d3f46=_0x2f0011['parameters']['views'][_0xb252('0x8d')];if(!/^(f|ht)tps?:\/\//i[_0xb252('0x8b')](_0x4d3f46)){_0x5e5802=path[_0xb252('0x63')](_0xb252('0x8e'),_0x519d46,_0x59c2c6[0x0],_0x4d3f46);}else{_0x5e5802=_0x4d3f46;}}else{logger['info'](_0xb252('0x8f'));}}else if(_0x5c8a23===_0xb252('0x80')){_0x9ee5af=_0x2f0011[_0xb252('0x7e')]['scriptName'];_0x57be85=_0x2f0011[_0xb252('0x7e')][_0xb252('0x83')];if(_0xb252('0x26')!=typeof _0x2f0011[_0xb252('0x7e')][_0xb252('0x7d')]){if(_0xb252('0x26')!=typeof _0x2f0011[_0xb252('0x7e')]['views'][_0xb252('0x8a')]){var _0x4a0a21=_0x2f0011['parameters']['views'][_0xb252('0x8a')];if(!/^(f|ht)tps?:\/\//i['test'](_0x4a0a21)){_0x4666b2=path[_0xb252('0x63')](_0xb252('0x8e'),_0x519d46,_0x59c2c6[0x0],_0x4a0a21);}else{_0x4666b2=_0x4a0a21;}}if('undefined'!=typeof _0x2f0011[_0xb252('0x7e')]['views']['agent']){var _0x4d3f46=_0x2f0011[_0xb252('0x7e')][_0xb252('0x7d')][_0xb252('0x8d')];if(!/^(f|ht)tps?:\/\//i[_0xb252('0x8b')](_0x4d3f46)){_0x5e5802=path[_0xb252('0x63')](_0xb252('0x8e'),_0x519d46,_0x59c2c6[0x0],_0x4d3f46);}else{_0x5e5802=_0x4d3f46;}}}}var _0x36e877={'name':_0x216375,'description':_0x2e57a6,'path':path[_0xb252('0x63')](_0x519d46,_0x59c2c6[0x0]),'type':_0x5c8a23,'sidebar':_0x4c354a,'icon':_0x9a4cc4,'adminUrl':_0x4666b2,'agentUrl':_0x5e5802,'scriptName':_0x9ee5af,'scriptPath':_0x57be85,'version':_0x502dba};removeReferences(_0x5034e6,null);return db[_0xb252('0x36')][_0xb252('0x90')](_0x36e877)[_0xb252('0x2c')](function(_0x166d99){var _0x2d5975={'role':_0x565f45[_0xb252('0x91')]['role'],'userProfileId':_0x565f45['body'][_0xb252('0x92')]};if(!_0x2d5975)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2d5975['role']===_0xb252('0x93')){var _0x110d87=_0x166d99[_0xb252('0x2e')]({'plain':!![]});return db[_0xb252('0x94')][_0xb252('0x53')]({'where':{'name':_0xb252('0x2f'),'userProfileId':_0x2d5975[_0xb252('0x92')]},'raw':!![]})[_0xb252('0x2c')](function(_0x1dc4a2){if(_0x1dc4a2&&_0x1dc4a2[_0xb252('0x95')]===0x0){return db[_0xb252('0x30')][_0xb252('0x90')]({'name':_0x110d87[_0xb252('0x33')],'resourceId':_0x110d87['id'],'type':_0x1dc4a2[_0xb252('0x33')],'sectionId':_0x1dc4a2['id']},{})['then'](function(){return _0x166d99;});}else{return _0x166d99;}})[_0xb252('0x4c')](function(_0x178100){logger['error'](_0xb252('0x96'),_0x178100);throw _0x178100;});}return _0x166d99;})[_0xb252('0x2c')](respondWithResult(_0x11594e,null))[_0xb252('0x4c')](handleError(_0x11594e,null));}});}catch(_0x2b1b27){_0x11594e[_0xb252('0x21')](0x1f4)[_0xb252('0x97')](_0x2b1b27);}};function removeReferences(_0x231c9f,_0x41d2c9){try{if(_0x231c9f){fs['unlinkSync'](_0x231c9f);logger['info'](_0xb252('0x98'));}if(_0x41d2c9){rimraf(_0x41d2c9,function(){});logger['info'](_0xb252('0x99'));}}catch(_0x3521eb){logger['error'](_0x3521eb);}}exports['update']=function(_0x5492f3,_0x4ae2e8,_0x3b7597){return db['Plugin'][_0xb252('0x53')]({'where':{'id':_0x5492f3['params']['id']}})[_0xb252('0x2c')](handleEntityNotFound(_0x4ae2e8,null))[_0xb252('0x2c')](saveUpdates(_0x5492f3[_0xb252('0x91')],null))[_0xb252('0x2c')](respondWithResult(_0x4ae2e8,null))['catch'](handleError(_0x4ae2e8,null));};exports[_0xb252('0x9a')]=function(_0x5a974c,_0x2034f1,_0x1b9307){return db['Plugin'][_0xb252('0x53')]({'where':{'id':_0x5a974c[_0xb252('0x4e')]['id']}})[_0xb252('0x2c')](function(_0x3e9959){if(_0x3e9959){return _0x3e9959['destroy']();}})[_0xb252('0x2c')](function(_0x38c4f9){rimraf(path[_0xb252('0x63')](config[_0xb252('0x64')],_0xb252('0x55'),path[_0xb252('0x65')](_0x38c4f9['path'])),function(){});return _0x38c4f9;})['then'](handleEntityNotFound(_0x2034f1,null))[_0xb252('0x2c')](respondWithStatusCode(_0x2034f1,null))[_0xb252('0x4c')](handleError(_0x2034f1,null));};exports[_0xb252('0x9b')]=function(_0xf6bcf0,_0x5646d6,_0x38fc7a){return BPromise[_0xb252('0x9c')]()[_0xb252('0x2c')](function(){if(!_0xf6bcf0['query'][_0xb252('0x59')]){throw new Error('\x27PATH\x27\x20parameter\x20not\x20specified');}if(!_0xf6bcf0['query']['port']){throw new Error(_0xb252('0x9d'));}var _0x5f1fd6=_0xf6bcf0['query'][_0xb252('0x9e')]?_0xf6bcf0['query'][_0xb252('0x9e')]+':'+_0xf6bcf0['query'][_0xb252('0x9f')]:_0xb252('0xa0')+_0xf6bcf0[_0xb252('0x3b')]['port'];var _0x469434=_0xf6bcf0['query'][_0xb252('0x23')]?_0xf6bcf0[_0xb252('0x3b')][_0xb252('0x23')]:!![];var _0x4d5089=_0xf6bcf0[_0xb252('0x3b')][_0xb252('0xa1')]?_0xf6bcf0['query'][_0xb252('0xa1')]:null;var _0x33b969={'method':_0xf6bcf0[_0xb252('0xa2')],'uri':util[_0xb252('0x56')](_0xb252('0xa3'),_0x5f1fd6,_0xf6bcf0[_0xb252('0x3b')][_0xb252('0x59')]),'json':_0x469434,'resolveWithFullResponse':!![],'encoding':_0x4d5089,'qs':_0xf6bcf0[_0xb252('0x3b')]};if(_0xf6bcf0[_0xb252('0xa4')]){_0x33b969[_0xb252('0xa4')]=_0xf6bcf0['headers'];if(_0x33b969['headers'][_0xb252('0xa5')]){delete _0x33b969[_0xb252('0xa4')][_0xb252('0xa5')];}}if(_0x33b969[_0xb252('0xa4')][_0xb252('0xa6')]){delete _0x33b969[_0xb252('0xa4')][_0xb252('0xa6')];}return rp(_0x33b969);})['then'](function(_0x12a3c1){if(_0x12a3c1){_0x5646d6[_0xb252('0xa7')](_0x12a3c1['headers']);logger[_0xb252('0x6c')](_0x12a3c1[_0xb252('0x91')]);if(_['endsWith'](_0xf6bcf0[_0xb252('0x3b')]['path'],_0xb252('0x54'))&&_0x12a3c1[_0xb252('0xa8')]==0x1f4){return _0x5646d6[_0xb252('0x20')](_0x12a3c1[_0xb252('0xa8')]);}else{return _0x5646d6[_0xb252('0x21')](_0x12a3c1[_0xb252('0xa8')])[_0xb252('0x97')](_0x12a3c1['body']);}}else{return _0x5646d6['sendStatus'](0xc8);}})[_0xb252('0x4c')](handleError(_0x5646d6,null));};exports[_0xb252('0xa9')]=function(_0x2399cb,_0x518d41,_0x355a7f){return BPromise[_0xb252('0x9c')]()[_0xb252('0x2c')](function(){if(!_0x2399cb[_0xb252('0x3b')][_0xb252('0x59')]){throw new Error(_0xb252('0xaa'));}if(!_0x2399cb[_0xb252('0x3b')][_0xb252('0x9f')]){throw new Error(_0xb252('0x9d'));}var _0x5e924d=_0x2399cb[_0xb252('0x3b')]['hostname']?_0x2399cb[_0xb252('0x3b')][_0xb252('0x9e')]+':'+_0x2399cb[_0xb252('0x3b')]['port']:'http://localhost:'+_0x2399cb[_0xb252('0x3b')][_0xb252('0x9f')];var _0x35265e=_0x2399cb['query']['json']?_0x2399cb[_0xb252('0x3b')]['json']:!![];var _0x1e8340=_0x2399cb[_0xb252('0x3b')]['encoding']?_0x2399cb['query'][_0xb252('0xa1')]:null;var _0x1ee528={'method':_0x2399cb[_0xb252('0xa2')],'uri':util['format']('%s%s',_0x5e924d,_0x2399cb[_0xb252('0x3b')][_0xb252('0x59')]),'json':_0x35265e,'resolveWithFullResponse':!![],'encoding':_0x1e8340,'body':_0x2399cb[_0xb252('0x91')]};if(_0x2399cb[_0xb252('0xa4')]){_0x1ee528[_0xb252('0xa4')]=_0x2399cb[_0xb252('0xa4')];if(_0x1ee528[_0xb252('0xa4')]['content-length']){delete _0x1ee528[_0xb252('0xa4')][_0xb252('0xa5')];}}if(_0x1ee528[_0xb252('0xa4')][_0xb252('0xa6')]){delete _0x1ee528[_0xb252('0xa4')][_0xb252('0xa6')];}return rp(_0x1ee528);})[_0xb252('0x2c')](function(_0x4dba6e){if(_0x4dba6e){_0x518d41[_0xb252('0xa7')](_0x4dba6e['headers']);logger[_0xb252('0x6c')](_0x4dba6e[_0xb252('0x91')]);return _0x518d41[_0xb252('0x21')](_0x4dba6e[_0xb252('0xa8')])[_0xb252('0x97')](_0x4dba6e[_0xb252('0x91')]);}else{return _0x518d41[_0xb252('0x20')](0xc8);}})[_0xb252('0x4c')](handleError(_0x518d41,null));}; \ No newline at end of file diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index 6249fbf..a80917b 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 _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 +var _0x3c6c=['remove','emit','hasOwnProperty','events','Plugin','setMaxListeners','save','update'];(function(_0x2fb534,_0x1d88a3){var _0x391369=function(_0x14ab6f){while(--_0x14ab6f){_0x2fb534['push'](_0x2fb534['shift']());}};_0x391369(++_0x1d88a3);}(_0x3c6c,0x7b));var _0xc3c6=function(_0x283cfe,_0x5decf6){_0x283cfe=_0x283cfe-0x0;var _0x4be24b=_0x3c6c[_0x283cfe];return _0x4be24b;};'use strict';var EventEmitter=require(_0xc3c6('0x0'));var Plugin=require('../../mysqldb')['db'][_0xc3c6('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0xc3c6('0x2')](0x0);var events={'afterCreate':_0xc3c6('0x3'),'afterUpdate':_0xc3c6('0x4'),'afterDestroy':_0xc3c6('0x5')};function emitEvent(_0x37f15a){return function(_0x65a78,_0x34db2e,_0x5f5672){PluginEvents[_0xc3c6('0x6')](_0x37f15a+':'+_0x65a78['id'],_0x65a78);PluginEvents['emit'](_0x37f15a,_0x65a78);_0x5f5672(null);};}for(var e in events){if(events[_0xc3c6('0x7')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module['exports']=PluginEvents; \ No newline at end of file diff --git a/server/api/plugin/plugin.model.js b/server/api/plugin/plugin.model.js index 9f3e603..d7978eb 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 _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 +var _0x2eea=['exports','plugins','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','./plugin.attributes'];(function(_0x237137,_0x365aa8){var _0x3ac14c=function(_0x1f311a){while(--_0x1f311a){_0x237137['push'](_0x237137['shift']());}};_0x3ac14c(++_0x365aa8);}(_0x2eea,0x188));var _0xa2ee=function(_0x39eb50,_0x5fedfb){_0x39eb50=_0x39eb50-0x0;var _0x1350f3=_0x2eea[_0x39eb50];return _0x1350f3;};'use strict';var _=require(_0xa2ee('0x0'));var util=require('util');var logger=require(_0xa2ee('0x1'))(_0xa2ee('0x2'));var moment=require('moment');var BPromise=require(_0xa2ee('0x3'));var rp=require(_0xa2ee('0x4'));var fs=require('fs');var path=require(_0xa2ee('0x5'));var rimraf=require(_0xa2ee('0x6'));var config=require('../../config/environment');var attributes=require(_0xa2ee('0x7'));module[_0xa2ee('0x8')]=function(_0x1d3495,_0x418c0c){return _0x1d3495['define']('Plugin',attributes,{'tableName':_0xa2ee('0x9'),'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 de6063e..696b6ae 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 _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 +var _0xcc7f=['result','Plugin','create','body','options','raw','CreatePlugin','debug','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','defaults','socket.io-emitter','register','then','info','Plugin,\x20%s,\x20%s','request\x20sent','Plugin,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x48a509,_0x30df45){var _0x4155e9=function(_0x29301f){while(--_0x29301f){_0x48a509['push'](_0x48a509['shift']());}};_0x4155e9(++_0x30df45);}(_0xcc7f,0x1e9));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 moment=require(_0xfcc7('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfcc7('0x3'));var db=require(_0xfcc7('0x4'))['db'];var utils=require(_0xfcc7('0x5'));var logger=require(_0xfcc7('0x6'))(_0xfcc7('0x7'));var config=require('../../config/environment');var jayson=require(_0xfcc7('0x8'));var client=jayson[_0xfcc7('0x9')]['http']({'port':0x232a});config[_0xfcc7('0xa')]=_[_0xfcc7('0xb')](config[_0xfcc7('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xfcc7('0xc'))(new Redis(config[_0xfcc7('0xa')]));require('./plugin.socket')[_0xfcc7('0xd')](socket);function respondWithRpcPromise(_0xb3c4d1,_0x15f5ac,_0x4ff13e){return new BPromise(function(_0x4f3922,_0x3a1514){return client['request'](_0xb3c4d1,_0x4ff13e)[_0xfcc7('0xe')](function(_0x3571a2){logger[_0xfcc7('0xf')](_0xfcc7('0x10'),_0x15f5ac,_0xfcc7('0x11'));logger['debug'](_0xfcc7('0x12'),_0x15f5ac,_0xfcc7('0x11'),JSON[_0xfcc7('0x13')](_0x3571a2));if(_0x3571a2[_0xfcc7('0x14')]){if(_0x3571a2[_0xfcc7('0x14')][_0xfcc7('0x15')]===0x1f4){logger[_0xfcc7('0x14')]('Plugin,\x20%s,\x20%s',_0x15f5ac,_0x3571a2[_0xfcc7('0x14')][_0xfcc7('0x16')]);return _0x3a1514(_0x3571a2[_0xfcc7('0x14')]['message']);}logger[_0xfcc7('0x14')](_0xfcc7('0x10'),_0x15f5ac,_0x3571a2[_0xfcc7('0x14')][_0xfcc7('0x16')]);return _0x4f3922(_0x3571a2[_0xfcc7('0x14')]['message']);}else{logger['info'](_0xfcc7('0x10'),_0x15f5ac,_0xfcc7('0x11'));_0x4f3922(_0x3571a2[_0xfcc7('0x17')][_0xfcc7('0x16')]);}})['catch'](function(_0x3d5c30){logger[_0xfcc7('0x14')](_0xfcc7('0x10'),_0x15f5ac,_0x3d5c30);_0x3a1514(_0x3d5c30);});});}exports['CreatePlugin']=function(_0x19948a){var _0x197e7f=this;return new Promise(function(_0x2a443b,_0x34a7d5){return db[_0xfcc7('0x18')][_0xfcc7('0x19')](_0x19948a[_0xfcc7('0x1a')],{'raw':_0x19948a[_0xfcc7('0x1b')]?_0x19948a['options'][_0xfcc7('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x193694){logger[_0xfcc7('0xf')](_0xfcc7('0x1d'),_0x19948a);logger[_0xfcc7('0x1e')](_0xfcc7('0x1d'),_0x19948a,JSON['stringify'](_0x193694));_0x2a443b(_0x193694);})[_0xfcc7('0x1f')](function(_0x2b6596){logger[_0xfcc7('0x14')](_0xfcc7('0x1d'),_0x2b6596[_0xfcc7('0x16')],_0x19948a);_0x34a7d5(_0x197e7f['error'](0x1f4,_0x2b6596['message']));});});}; \ No newline at end of file diff --git a/server/api/plugin/plugin.socket.js b/server/api/plugin/plugin.socket.js index 2d28a99..5835e0c 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 _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 +var _0x1c1a=['remove','emit','removeListener','register','length','save'];(function(_0x2714ec,_0x36daa4){var _0x2608e5=function(_0x408468){while(--_0x408468){_0x2714ec['push'](_0x2714ec['shift']());}};_0x2608e5(++_0x36daa4);}(_0x1c1a,0x6b));var _0xa1c1=function(_0x17695c,_0x1ae915){_0x17695c=_0x17695c-0x0;var _0x18bc20=_0x1c1a[_0x17695c];return _0x18bc20;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xa1c1('0x0'),_0xa1c1('0x1'),'update'];function createListener(_0x4d6012,_0x502f8a){return function(_0x48a3d6){_0x502f8a[_0xa1c1('0x2')](_0x4d6012,_0x48a3d6);};}function removeListener(_0x3e2e59,_0x552dd6){return function(){PluginEvents[_0xa1c1('0x3')](_0x3e2e59,_0x552dd6);};}exports[_0xa1c1('0x4')]=function(_0x1245df){for(var _0x4c63d9=0x0,_0x10c9c9=events[_0xa1c1('0x5')];_0x4c63d9<_0x10c9c9;_0x4c63d9++){var _0x56776f=events[_0x4c63d9];var _0x568be6=createListener('plugin:'+_0x56776f,_0x1245df);PluginEvents['on'](_0x56776f,_0x568be6);}}; \ No newline at end of file diff --git a/server/api/pm2/index.js b/server/api/pm2/index.js index d92d945..34e033b 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(_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 +var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x144d9b,_0x513e88){var _0xea999b=function(_0x1c629c){while(--_0x1c629c){_0x144d9b['push'](_0x144d9b['shift']());}};_0xea999b(++_0x513e88);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'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 7be5387..fe9ad77 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 _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 +var _0xfe57=['bluebird','sendStatus','status','json','error','stack','send','info','index','list','express','name','motion2','length','then','catch','describe','params','create','body','script','join','../../files/plugins','cwd','chdir','dirname','start','dump','Missing\x20name\x20and/or\x20path','update','restart','stop','Unknown\x20status','destroy','delete','Unknown\x20id','lodash','../../config/pm2','path','child_process','exec'];(function(_0x4f5208,_0x607caa){var _0x494100=function(_0x5a389c){while(--_0x5a389c){_0x4f5208['push'](_0x4f5208['shift']());}};_0x494100(++_0x607caa);}(_0xfe57,0x195));var _0x7fe5=function(_0x1b1e76,_0x31695b){_0x1b1e76=_0x1b1e76-0x0;var _0x3d743a=_0xfe57[_0x1b1e76];return _0x3d743a;};'use strict';var _=require(_0x7fe5('0x0'));var pm2=require(_0x7fe5('0x1'));var logger=require('../../config/logger')('api');var path=require(_0x7fe5('0x2'));var exec=require(_0x7fe5('0x3'))[_0x7fe5('0x4')];var BPromise=require(_0x7fe5('0x5'));function handleEntityNotFound(_0x89ad5f,_0x1254d2){return function(_0x41f5f4){if(!_0x41f5f4){_0x89ad5f[_0x7fe5('0x6')](0x194);;}return _0x41f5f4;};}function respondWithResult(_0x22e850,_0x188cfb){_0x188cfb=_0x188cfb||0xc8;return function(_0xd6146b){if(_0xd6146b){return _0x22e850[_0x7fe5('0x7')](_0x188cfb)[_0x7fe5('0x8')](_0xd6146b);}return null;};}function handleError(_0x4ab081,_0x13b391){_0x13b391=_0x13b391||0x1f4;return function(_0x5ef757){logger[_0x7fe5('0x9')](_0x5ef757[_0x7fe5('0xa')]);if(_0x5ef757['name']){delete _0x5ef757['name'];}_0x4ab081[_0x7fe5('0x7')](_0x13b391)[_0x7fe5('0xb')](_0x5ef757);};}function execChildProcess(){return new BPromise(function(_0x4b92d3,_0x35913b){exec('npm\x20install',function(_0x48d10b,_0xdb5182,_0x84bb93){logger[_0x7fe5('0xc')](_0xdb5182);logger[_0x7fe5('0xc')](_0x84bb93);if(_0x48d10b){logger['error'](_0x48d10b);return _0x35913b(_0x48d10b);}return _0x4b92d3(_0xdb5182);});});}exports[_0x7fe5('0xd')]=function(_0x16bed9,_0x579fd3){return pm2[_0x7fe5('0xe')]()['then'](function(_0x1f84b5){if(_0x1f84b5){var _0x2d297b=_['reject'](_0x1f84b5,function(_0x1ce051){return _0x1ce051['name']===_0x7fe5('0xf')||_0x1ce051[_0x7fe5('0x10')]===_0x7fe5('0x11');});return{'rows':_0x2d297b,'count':_0x2d297b[_0x7fe5('0x12')]};}return null;})[_0x7fe5('0x13')](respondWithResult(_0x579fd3,null))[_0x7fe5('0x14')](handleError(_0x579fd3,null));};exports['show']=function(_0x166e23,_0x3c7dd3){return pm2[_0x7fe5('0x15')](_0x166e23[_0x7fe5('0x16')]['id'])[_0x7fe5('0x13')](respondWithResult(_0x3c7dd3,null))[_0x7fe5('0x13')](handleEntityNotFound(_0x3c7dd3,null))[_0x7fe5('0x14')](handleError(_0x3c7dd3,null));};exports[_0x7fe5('0x17')]=function(_0x478523,_0x3b98cd){if(_0x478523['body']['name']&&_0x478523[_0x7fe5('0x18')][_0x7fe5('0x19')]){var _0x2f6592=path[_0x7fe5('0x1a')](__dirname,_0x7fe5('0x1b'),_0x478523[_0x7fe5('0x18')][_0x7fe5('0x19')]);var _0xdd9df7=process[_0x7fe5('0x1c')]();process[_0x7fe5('0x1d')](path[_0x7fe5('0x1e')](_0x2f6592));return execChildProcess()[_0x7fe5('0x13')](function(_0x54ee98){process[_0x7fe5('0x1d')](_0xdd9df7);return pm2[_0x7fe5('0x1f')]({'name':_0x478523[_0x7fe5('0x18')]['name'],'script':_0x2f6592});})[_0x7fe5('0x13')](function(_0x48ee56){pm2[_0x7fe5('0x20')]();return _0x48ee56[0x0];})['then'](respondWithResult(_0x3b98cd,0xc9))[_0x7fe5('0x14')](handleError(_0x3b98cd,null));}else{return _0x3b98cd[_0x7fe5('0x7')](0x1f4)[_0x7fe5('0xb')]({'message':_0x7fe5('0x21')});}};exports[_0x7fe5('0x22')]=function(_0x4393c3,_0x5bfe23){if(_0x4393c3['body']['id']){delete _0x4393c3[_0x7fe5('0x18')]['id'];}var _0x450759={'online':_0x7fe5('0x23'),'stopped':_0x7fe5('0x24')};if(_0x450759['hasOwnProperty'](_0x4393c3[_0x7fe5('0x18')]['status'])){return pm2[_0x450759[_0x4393c3[_0x7fe5('0x18')][_0x7fe5('0x7')]]](_0x4393c3[_0x7fe5('0x16')]['id'])[_0x7fe5('0x13')](respondWithResult(_0x5bfe23,0xc8))[_0x7fe5('0x14')](handleError(_0x5bfe23,null));}else{return _0x5bfe23[_0x7fe5('0x7')](0x1f4)['send']({'message':_0x7fe5('0x25')});}};exports[_0x7fe5('0x26')]=function(_0x5ec0b4,_0xfc1189){if(_0x5ec0b4[_0x7fe5('0x18')]['id']){delete _0x5ec0b4[_0x7fe5('0x18')]['id'];}if(_0x5ec0b4[_0x7fe5('0x16')]['id']){return pm2[_0x7fe5('0x27')](_0x5ec0b4['params']['id'])['then'](function(_0x13623e){pm2[_0x7fe5('0x20')]();return _0x13623e[0x0];})[_0x7fe5('0x13')](respondWithResult(_0xfc1189,null))[_0x7fe5('0x14')](handleError(_0xfc1189,null));}else{return _0xfc1189['status'](0x1f4)[_0x7fe5('0xb')]({'message':_0x7fe5('0x28')});}}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/index.js b/server/api/reportAgentPreview/index.js index 69f8555..11a9222 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 _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 +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x284370,_0x268063){var _0x43ff7e=function(_0x5913c9){while(--_0x5913c9){_0x284370['push'](_0x284370['shift']());}};_0x43ff7e(++_0x268063);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x5a6961,_0xd41ca6){_0x5a6961=_0x5a6961-0x0;var _0x4af0a6=_0xcb91[_0x5a6961];return _0x4af0a6;};'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 diff --git a/server/api/reportAgentPreview/reportAgentPreview.attributes.js b/server/api/reportAgentPreview/reportAgentPreview.attributes.js index 9c97ff1..f2c59cc 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 _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 +var _0xe314=['exports','INTEGER','STRING','DATE'];(function(_0x33b259,_0x2036be){var _0xf95548=function(_0x5b3424){while(--_0x5b3424){_0x33b259['push'](_0x33b259['shift']());}};_0xf95548(++_0x2036be);}(_0xe314,0x7c));var _0x4e31=function(_0x4f7e74,_0x2592bc){_0x4f7e74=_0x4f7e74-0x0;var _0x3537f3=_0xe314[_0x4f7e74];return _0x3537f3;};'use strict';var Sequelize=require('sequelize');module[_0x4e31('0x0')]={'state':{'type':Sequelize[_0x4e31('0x1')](0x2)},'statedesc':{'type':Sequelize[_0x4e31('0x2')]},'scheduledat':{'type':Sequelize[_0x4e31('0x3')]},'uniqueid':{'type':Sequelize[_0x4e31('0x2')]},'starttime':{'type':Sequelize[_0x4e31('0x3')]},'responsetime':{'type':Sequelize[_0x4e31('0x3')]},'ringtime':{'type':Sequelize[_0x4e31('0x1')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0x4e31('0x2')]},'campaigntype':{'type':Sequelize[_0x4e31('0x2')]},'membername':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.model.js b/server/api/reportAgentPreview/reportAgentPreview.model.js index 9e13f2c..b7fd4db 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 _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 +var _0xb92d=['path','rimraf','../../config/environment','./reportAgentPreview.attributes','define','ReportAgentPreview','report_agent_preview','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x9dfc10,_0x19c2d5){var _0x4f938a=function(_0x12b1e5){while(--_0x12b1e5){_0x9dfc10['push'](_0x9dfc10['shift']());}};_0x4f938a(++_0x19c2d5);}(_0xb92d,0x77));var _0xdb92=function(_0xd8f7bd,_0x45dc8c){_0xd8f7bd=_0xd8f7bd-0x0;var _0x1bd5ee=_0xb92d[_0xd8f7bd];return _0x1bd5ee;};'use strict';var _=require(_0xdb92('0x0'));var util=require(_0xdb92('0x1'));var logger=require(_0xdb92('0x2'))(_0xdb92('0x3'));var moment=require(_0xdb92('0x4'));var BPromise=require(_0xdb92('0x5'));var rp=require(_0xdb92('0x6'));var fs=require('fs');var path=require(_0xdb92('0x7'));var rimraf=require(_0xdb92('0x8'));var config=require(_0xdb92('0x9'));var attributes=require(_0xdb92('0xa'));module['exports']=function(_0x7cbd60,_0x34c775){return _0x7cbd60[_0xdb92('0xb')](_0xdb92('0xc'),attributes,{'tableName':_0xdb92('0xd'),'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 e9c83f7..1eebe75 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 _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 +var _0x15ec=['ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','body','options','raw','then','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info'];(function(_0x9a8458,_0x4791cd){var _0x25cff7=function(_0x14a890){while(--_0x14a890){_0x9a8458['push'](_0x9a8458['shift']());}};_0x25cff7(++_0x4791cd);}(_0x15ec,0x1bf));var _0xc15e=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x15ec[_0x618414];return _0x21c19a;};'use strict';var _=require(_0xc15e('0x0'));var util=require(_0xc15e('0x1'));var moment=require(_0xc15e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc15e('0x3'));var db=require(_0xc15e('0x4'))['db'];var utils=require(_0xc15e('0x5'));var logger=require(_0xc15e('0x6'))('rpc');var config=require(_0xc15e('0x7'));var jayson=require(_0xc15e('0x8'));var client=jayson['client'][_0xc15e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x479772,_0x2cd62a,_0x20d3aa){return new BPromise(function(_0x45142f,_0x496735){return client[_0xc15e('0xa')](_0x479772,_0x20d3aa)['then'](function(_0x2ed02b){logger[_0xc15e('0xb')](_0xc15e('0xc'),_0x2cd62a,_0xc15e('0xd'));logger[_0xc15e('0xe')](_0xc15e('0xf'),_0x2cd62a,_0xc15e('0xd'),JSON['stringify'](_0x2ed02b));if(_0x2ed02b[_0xc15e('0x10')]){if(_0x2ed02b[_0xc15e('0x10')][_0xc15e('0x11')]===0x1f4){logger[_0xc15e('0x10')]('ReportAgentPreview,\x20%s,\x20%s',_0x2cd62a,_0x2ed02b[_0xc15e('0x10')][_0xc15e('0x12')]);return _0x496735(_0x2ed02b[_0xc15e('0x10')][_0xc15e('0x12')]);}logger['error'](_0xc15e('0xc'),_0x2cd62a,_0x2ed02b['error'][_0xc15e('0x12')]);return _0x45142f(_0x2ed02b[_0xc15e('0x10')][_0xc15e('0x12')]);}else{logger[_0xc15e('0xb')](_0xc15e('0xc'),_0x2cd62a,_0xc15e('0xd'));_0x45142f(_0x2ed02b[_0xc15e('0x13')]['message']);}})[_0xc15e('0x14')](function(_0x33abc4){logger[_0xc15e('0x10')]('ReportAgentPreview,\x20%s,\x20%s',_0x2cd62a,_0x33abc4);_0x496735(_0x33abc4);});});}exports[_0xc15e('0x15')]=function(_0x16227c){var _0x1b6fb3=this;return new Promise(function(_0x214733,_0x3b0b95){return db[_0xc15e('0x16')]['create'](_0x16227c[_0xc15e('0x17')],{'raw':_0x16227c[_0xc15e('0x18')]?_0x16227c['options'][_0xc15e('0x19')]===undefined?!![]:![]:!![]})[_0xc15e('0x1a')](function(_0x2142e2){logger[_0xc15e('0xb')](_0xc15e('0x15'),_0x16227c);logger[_0xc15e('0xe')]('CreateReportAgentPreview',_0x16227c,JSON['stringify'](_0x2142e2));_0x214733(_0x2142e2);})['catch'](function(_0x42403b){logger[_0xc15e('0x10')](_0xc15e('0x15'),_0x42403b[_0xc15e('0x12')],_0x16227c);_0x3b0b95(_0x1b6fb3[_0xc15e('0x10')](0x1f4,_0x42403b[_0xc15e('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/rpc/index.js b/server/api/rpc/index.js index abe3d04..685392d 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 _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 +var _0x6c82=['faxQueuesWaitingInteractions','/mail/queues/:id/notify','queueNotify','mail','showMailQueues','/chat/queues/:id/notify','chat','/chat/queues/:id','showChatQueues','post','/fax/queues/:id/notify','fax','/fax/queues/:id','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','sms','/whatsapp/queues/:id/notify','whatsapp','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','/agents/:id/notify','multer','util','Router','../../components/auth/service','./rpc.controller','get','/voice/channels','isAuthenticated','voiceChannels','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','voiceQueues','/chat/queues','chatQueues','/mail/queues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','whatsappQueues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','voiceQueuesChannels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','/voice/queues/:id','showVoiceQueues','put','updateVoiceQueue','/outbound','/outbound/channels','outboundChannels','agents','agentCapacity','/telephones','/trunks','/campaigns','campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions'];(function(_0x1d0d66,_0x1733d3){var _0x5f56cd=function(_0x5bd71b){while(--_0x5bd71b){_0x1d0d66['push'](_0x1d0d66['shift']());}};_0x5f56cd(++_0x1733d3);}(_0x6c82,0x1af));var _0x26c8=function(_0x6c734b,_0x320c31){_0x6c734b=_0x6c734b-0x0;var _0x1ae157=_0x6c82[_0x6c734b];return _0x1ae157;};'use strict';var multer=require(_0x26c8('0x0'));var util=require(_0x26c8('0x1'));var path=require('path');var express=require('express');var router=express[_0x26c8('0x2')]();var auth=require(_0x26c8('0x3'));var controller=require(_0x26c8('0x4'));router[_0x26c8('0x5')](_0x26c8('0x6'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x8')]);router[_0x26c8('0x5')](_0x26c8('0x9'),auth[_0x26c8('0x7')](),controller[_0x26c8('0xa')]);router[_0x26c8('0x5')](_0x26c8('0xb'),auth['isAuthenticated'](),controller[_0x26c8('0xc')]);router['get']('/voice/queues',auth[_0x26c8('0x7')](),controller[_0x26c8('0xd')]);router[_0x26c8('0x5')](_0x26c8('0xe'),auth[_0x26c8('0x7')](),controller[_0x26c8('0xf')]);router['get'](_0x26c8('0x10'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x11')]);router[_0x26c8('0x5')](_0x26c8('0x12'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x13')]);router[_0x26c8('0x5')](_0x26c8('0x14'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x15')]);router[_0x26c8('0x5')](_0x26c8('0x16'),auth[_0x26c8('0x7')](),controller['smsQueues']);router[_0x26c8('0x5')]('/whatsapp/queues',auth['isAuthenticated'](),controller[_0x26c8('0x17')]);router[_0x26c8('0x5')]('/fax/queues',auth[_0x26c8('0x7')](),controller[_0x26c8('0x18')]);router[_0x26c8('0x5')](_0x26c8('0x19'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x1a')]);router[_0x26c8('0x5')]('/voice/queues/channels',auth[_0x26c8('0x7')](),controller[_0x26c8('0x1b')]);router[_0x26c8('0x5')](_0x26c8('0x1c'),auth['isAuthenticated'](),controller[_0x26c8('0x1d')]);router[_0x26c8('0x5')](_0x26c8('0x1e'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x1f')]);router[_0x26c8('0x5')]('/voice/queues/channels/:uniqueid/redirect/:exten',auth[_0x26c8('0x7')](),controller['voiceQueuesChannelRedirect']);router['get'](_0x26c8('0x20'),auth['isAuthenticated'](),controller[_0x26c8('0x21')]);router[_0x26c8('0x22')](_0x26c8('0x20'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x23')]);router[_0x26c8('0x5')](_0x26c8('0x24'),auth['isAuthenticated'](),controller['outbound']);router[_0x26c8('0x5')](_0x26c8('0x25'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x26')]);router[_0x26c8('0x5')]('/agents',auth[_0x26c8('0x7')](),controller[_0x26c8('0x27')]);router[_0x26c8('0x22')]('/agents/:id/capacity',auth['isAuthenticated'](),controller[_0x26c8('0x28')]);router[_0x26c8('0x5')](_0x26c8('0x29'),auth['isAuthenticated'](),controller['telephones']);router[_0x26c8('0x5')](_0x26c8('0x2a'),auth[_0x26c8('0x7')](),controller['trunks']);router['get'](_0x26c8('0x2b'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x2c')]);router[_0x26c8('0x5')](_0x26c8('0x2d'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x2e')]);router['get'](_0x26c8('0x2f'),auth[_0x26c8('0x7')](),controller['chatQueuesWaitingInteractions']);router[_0x26c8('0x5')]('/mail/queues/waitinginteractions',auth[_0x26c8('0x7')](),controller[_0x26c8('0x30')]);router['get'](_0x26c8('0x31'),auth[_0x26c8('0x7')](),controller['openchannelQueuesWaitingInteractions']);router[_0x26c8('0x5')]('/openchannel/queues/:id/waitinginteractions',auth[_0x26c8('0x7')](),controller['openchannelQueuesIdWaitingInteractions']);router[_0x26c8('0x5')](_0x26c8('0x32'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x33')]);router[_0x26c8('0x5')](_0x26c8('0x34'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x35')]);router[_0x26c8('0x5')](_0x26c8('0x36'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x37')]);router['post'](_0x26c8('0x38'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x39')](_0x26c8('0x3a')));router['get']('/mail/queues/:id',auth['isAuthenticated'](),controller[_0x26c8('0x3b')]);router['post'](_0x26c8('0x3c'),auth['isAuthenticated'](),controller[_0x26c8('0x39')](_0x26c8('0x3d')));router[_0x26c8('0x5')](_0x26c8('0x3e'),auth['isAuthenticated'](),controller[_0x26c8('0x3f')]);router[_0x26c8('0x40')](_0x26c8('0x41'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x39')](_0x26c8('0x42')));router[_0x26c8('0x5')](_0x26c8('0x43'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x44')]);router[_0x26c8('0x40')](_0x26c8('0x45'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x39')](_0x26c8('0x46')));router[_0x26c8('0x5')](_0x26c8('0x47'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x48')]);router['post'](_0x26c8('0x49'),auth['isAuthenticated'](),controller['queueNotify'](_0x26c8('0x4a')));router[_0x26c8('0x40')](_0x26c8('0x4b'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x39')](_0x26c8('0x4c')));router['get'](_0x26c8('0x4d'),auth[_0x26c8('0x7')](),controller[_0x26c8('0x4e')]);router[_0x26c8('0x5')](_0x26c8('0x4f'),auth[_0x26c8('0x7')](),controller['showWhatsappQueues']);router[_0x26c8('0x40')](_0x26c8('0x50'),auth[_0x26c8('0x7')](),controller['agentNotify']);module['exports']=router; \ No newline at end of file diff --git a/server/api/rpc/rpc.controller.js b/server/api/rpc/rpc.controller.js index 9f4ba18..f085434 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 _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 +var _0xbd51=['chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','openchannelQueuesIdWaitingInteractions','type','filter','map','queue_id','value','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','chat','Website','findOne','\x20Queue\x20not\x20found','Message','messageId','Interaction','Account','\x20Message\x20not\x20found','update','MessageId','InteractionId','From','QueueId','create','Start','queue','*,*,*,*','Channel\x20field\x20is\x20mandatory','channel','capitalize','Agent\x20not\x20found','TransferReport','agentTransferTimeout','bluebird','lodash','util','../../mysqldb','../../config/logger','client','http','request','error','code','message','catch','status','json','stack','send','isNil','rows','find','voiceChannels','VoiceChannels','query','then','voiceChannelMixMonitor','VoiceChannelMixMonitor','merge','params','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','voiceQueues','VoiceQueues','showVoiceQueues','updateVoiceQueue','UpdateVoiceQueue','body','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','Outbound','outboundChannels','OutboundChannels','Agents','interaction','user','name','hasOwnProperty','MemberReport','findAll','INTERACTION','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','interface','SIP/%s','agent','internal','capacity','telephones','Telephones','trunks','Trunks','campaigns','Campaigns','chatQueues','showChatQueues','mailQueues','MailQueues','mailAccounts','MailAccounts','openchannelQueues','showOpenchannelQueues','smsQueues','showSmsQueues','whatsappQueues','WhatsappQueues','showWhatsappQueues','FaxQueues','showFaxQueues','faxAccounts','FaxAccounts'];(function(_0xd3fb91,_0xfc54c0){var _0x33438c=function(_0x924998){while(--_0x924998){_0xd3fb91['push'](_0xd3fb91['shift']());}};_0x33438c(++_0xfc54c0);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x4012b8,_0x2385f6){_0x4012b8=_0x4012b8-0x0;var _0x787e66=_0xbd51[_0x4012b8];return _0x787e66;};'use strict';var BPromise=require(_0x1bd5('0x0'));var moment=require('moment');var _=require(_0x1bd5('0x1'));var util=require(_0x1bd5('0x2'));var db=require(_0x1bd5('0x3'))['db'];var logger=require(_0x1bd5('0x4'))('api');var jayson=require('jayson/promise');var amiClient=jayson['client']['http']({'port':0x232a});var mailClient=jayson[_0x1bd5('0x5')][_0x1bd5('0x6')]({'port':0x232b});var routingClient=jayson[_0x1bd5('0x5')]['http']({'port':0x232c});function respondWithRpcPromise(_0x29abea,_0x30a385,_0x19077c){return new BPromise(function(_0x27d58f,_0xd8418f){var _0x4a7f90=_0x19077c?_0x19077c:amiClient;return _0x4a7f90[_0x1bd5('0x7')](_0x29abea,_0x30a385)['then'](function(_0x2bd975){if(_0x2bd975[_0x1bd5('0x8')]){if(_0x2bd975[_0x1bd5('0x8')][_0x1bd5('0x9')]===0x1f4){return _0xd8418f(_0x2bd975[_0x1bd5('0x8')][_0x1bd5('0xa')]);}return _0x27d58f(_0x2bd975['error'][_0x1bd5('0xa')]);}else{_0x27d58f(_0x2bd975['result']);}})[_0x1bd5('0xb')](function(_0x24e38c){_0xd8418f(_0x24e38c);});});}function respondWithResult(_0x37e8e1,_0x14606b){_0x14606b=_0x14606b||0xc8;return function(_0x177be0){if(_0x177be0){return _0x37e8e1[_0x1bd5('0xc')](_0x14606b)[_0x1bd5('0xd')](_0x177be0);}return _0x37e8e1['sendStatus'](0x194);};}function handleError(_0x5650b5,_0x8b2390){_0x8b2390=_0x8b2390||0x1f4;return function(_0x6d2c40){logger[_0x1bd5('0x8')](_0x6d2c40[_0x1bd5('0xe')]);if(_0x6d2c40['name']){delete _0x6d2c40['name'];}_0x5650b5[_0x1bd5('0xc')](_0x8b2390)[_0x1bd5('0xf')](_0x6d2c40);};}function findById(_0x2b2c57){return function(_0x4793dd){if(!_[_0x1bd5('0x10')](_0x2b2c57)&&!_[_0x1bd5('0x10')](_0x4793dd)&&!_[_0x1bd5('0x10')](_0x4793dd[_0x1bd5('0x11')])){return _[_0x1bd5('0x12')](_0x4793dd['rows'],function(_0x53ad5e){return _0x53ad5e['id']==_0x2b2c57;});}return null;};}exports[_0x1bd5('0x13')]=function(_0x260827,_0x476bd1){return respondWithRpcPromise(_0x1bd5('0x14'),_0x260827[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x476bd1,null))[_0x1bd5('0xb')](handleError(_0x476bd1,null));};exports[_0x1bd5('0x17')]=function(_0x456051,_0xb1ac1e){return respondWithRpcPromise(_0x1bd5('0x18'),_[_0x1bd5('0x19')](_0x456051[_0x1bd5('0x15')],_0x456051[_0x1bd5('0x1a')]))[_0x1bd5('0x16')](respondWithResult(_0xb1ac1e,null))[_0x1bd5('0xb')](handleError(_0xb1ac1e,null));};exports[_0x1bd5('0x1b')]=function(_0x29c340,_0x5567c9){return respondWithRpcPromise(_0x1bd5('0x1c'),_['merge'](_0x29c340[_0x1bd5('0x15')],_0x29c340[_0x1bd5('0x1a')]))[_0x1bd5('0x16')](respondWithResult(_0x5567c9,null))['catch'](handleError(_0x5567c9,null));};exports[_0x1bd5('0x1d')]=function(_0x4fa37c,_0x2ed551){return respondWithRpcPromise(_0x1bd5('0x1e'),_0x4fa37c[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x2ed551,null))['catch'](handleError(_0x2ed551,null));};exports[_0x1bd5('0x1f')]=function(_0x69bb17,_0x20245c){return respondWithRpcPromise(_0x1bd5('0x1e'),_0x69bb17['query'])[_0x1bd5('0x16')](findById(_0x69bb17[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x20245c,null))[_0x1bd5('0xb')](handleError(_0x20245c,null));};exports[_0x1bd5('0x20')]=function(_0xc73670,_0x4e72b2){return respondWithRpcPromise(_0x1bd5('0x21'),_[_0x1bd5('0x19')](_0xc73670[_0x1bd5('0x22')],_0xc73670['params']))[_0x1bd5('0x16')](respondWithResult(_0x4e72b2,null))[_0x1bd5('0xb')](handleError(_0x4e72b2,null));};exports[_0x1bd5('0x23')]=function(_0x3430bf,_0x1f4456){return respondWithRpcPromise(_0x1bd5('0x24'),_['merge'](_0x3430bf['query'],_0x3430bf[_0x1bd5('0x1a')]))[_0x1bd5('0x16')](respondWithResult(_0x1f4456,null))['catch'](handleError(_0x1f4456,null));};exports[_0x1bd5('0x25')]=function(_0x198b88,_0x1efa8c){return respondWithRpcPromise(_0x1bd5('0x26'),_0x198b88['query'])[_0x1bd5('0x16')](respondWithResult(_0x1efa8c,null))[_0x1bd5('0xb')](handleError(_0x1efa8c,null));};exports[_0x1bd5('0x27')]=function(_0x233743,_0x209ce1){return respondWithRpcPromise(_0x1bd5('0x28'),_[_0x1bd5('0x19')](_0x233743[_0x1bd5('0x15')],_0x233743['params']))[_0x1bd5('0x16')](respondWithResult(_0x209ce1,null))[_0x1bd5('0xb')](handleError(_0x209ce1,null));};exports[_0x1bd5('0x29')]=function(_0x24c92e,_0x11a6d2){return respondWithRpcPromise(_0x1bd5('0x2a'),_[_0x1bd5('0x19')](_0x24c92e['query'],_0x24c92e[_0x1bd5('0x1a')]))[_0x1bd5('0x16')](respondWithResult(_0x11a6d2,null))[_0x1bd5('0xb')](handleError(_0x11a6d2,null));};exports[_0x1bd5('0x2b')]=function(_0x3cf898,_0x192ca7){return respondWithRpcPromise(_0x1bd5('0x2c'),_['merge'](_0x3cf898['query'],_0x3cf898[_0x1bd5('0x1a')]))[_0x1bd5('0x16')](respondWithResult(_0x192ca7,null))[_0x1bd5('0xb')](handleError(_0x192ca7,null));};exports['outbound']=function(_0x4595a0,_0x5af974){return respondWithRpcPromise(_0x1bd5('0x2d'),_0x4595a0[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x5af974,null))[_0x1bd5('0xb')](handleError(_0x5af974,null));};exports[_0x1bd5('0x2e')]=function(_0x2470ec,_0x41096d){return respondWithRpcPromise(_0x1bd5('0x2f'),_0x2470ec['query'])[_0x1bd5('0x16')](respondWithResult(_0x41096d,null))[_0x1bd5('0xb')](handleError(_0x41096d,null));};exports['agents']=function(_0x3b5a0d,_0x77ebcf){var _0x20b25c;return respondWithRpcPromise('Agents',_0x3b5a0d[_0x1bd5('0x15')])[_0x1bd5('0x16')](function(_0x2997a2){_0x20b25c=_0x2997a2;return respondWithRpcPromise(_0x1bd5('0x30'),_0x3b5a0d['query'],routingClient);})[_0x1bd5('0x16')](function(_0x22f437){return _[_0x1bd5('0x19')]({},_0x22f437,_0x20b25c);})[_0x1bd5('0x16')](respondWithResult(_0x77ebcf,null))['catch'](handleError(_0x77ebcf,null));};exports['agentCapacity']=function(_0x40eeff,_0x35afc7){if(_0x40eeff[_0x1bd5('0x22')]&&_0x40eeff['body'][_0x1bd5('0x31')]&&_0x40eeff[_0x1bd5('0x32')]&&_0x40eeff['user'][_0x1bd5('0x33')]){for(var _0x5761b8 in _0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x31')]){if(_0x40eeff['body'][_0x1bd5('0x31')][_0x1bd5('0x34')](_0x5761b8)){db[_0x1bd5('0x35')][_0x1bd5('0x36')]({'where':{'channel':_0x5761b8,'membername':_0x40eeff[_0x1bd5('0x32')][_0x1bd5('0x33')],'type':_0x1bd5('0x37'),'exitAt':null,'uniqueid':_0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x31')][_0x5761b8]&&_0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x31')][_0x5761b8][_0x1bd5('0x38')]?{'$notIn':_0x40eeff['body'][_0x1bd5('0x31')][_0x5761b8]}:{'$ne':null}}})[_0x1bd5('0x16')](function(_0x335125){var _0x52ade4=moment()[_0x1bd5('0x39')](_0x1bd5('0x3a'));for(var _0x5bb8a6=0x0,_0x1dbde9=_0x335125['length'];_0x5bb8a6<_0x1dbde9;_0x5bb8a6+=0x1){_0x335125[_0x5bb8a6][_0x1bd5('0x3b')]({'exitAt':_0x52ade4});}});for(var _0x558fec=0x0;_0x558fec<_0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x31')][_0x5761b8]['length'];_0x558fec+=0x1){db[_0x1bd5('0x35')]['findOrCreate']({'where':{'channel':_0x5761b8,'membername':_0x40eeff[_0x1bd5('0x32')][_0x1bd5('0x33')],'type':_0x1bd5('0x37'),'uniqueid':_0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x31')][_0x5761b8][_0x558fec],'exitAt':null},'defaults':{'channel':_0x5761b8,'membername':_0x40eeff[_0x1bd5('0x32')][_0x1bd5('0x33')],'interface':_[_0x1bd5('0x10')](_0x40eeff['user'][_0x1bd5('0x3c')])?util[_0x1bd5('0x39')](_0x1bd5('0x3d'),_0x40eeff[_0x1bd5('0x32')][_0x1bd5('0x33')]):_0x40eeff[_0x1bd5('0x32')]['interface'],'type':_0x1bd5('0x37'),'enterAt':moment()[_0x1bd5('0x39')](_0x1bd5('0x3a')),'role':_0x1bd5('0x3e'),'internal':_0x40eeff[_0x1bd5('0x32')][_0x1bd5('0x3f')],'uniqueid':_0x40eeff[_0x1bd5('0x22')]['interaction'][_0x5761b8][_0x558fec]}});}}}}return respondWithRpcPromise('AgentCapacity',{'id':_0x40eeff[_0x1bd5('0x1a')]['id'],'capacity':_0x40eeff[_0x1bd5('0x22')][_0x1bd5('0x40')]},routingClient)['then'](respondWithResult(_0x35afc7,null))[_0x1bd5('0xb')](handleError(_0x35afc7,null));};exports[_0x1bd5('0x41')]=function(_0x1ad2ff,_0x1f2d7e){return respondWithRpcPromise(_0x1bd5('0x42'),_0x1ad2ff[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x1f2d7e,null))['catch'](handleError(_0x1f2d7e,null));};exports[_0x1bd5('0x43')]=function(_0x2bcd23,_0x4f2d91){return respondWithRpcPromise(_0x1bd5('0x44'),_0x2bcd23['query'])[_0x1bd5('0x16')](respondWithResult(_0x4f2d91,null))['catch'](handleError(_0x4f2d91,null));};exports[_0x1bd5('0x45')]=function(_0x555ba1,_0x5a011e){return respondWithRpcPromise(_0x1bd5('0x46'),_0x555ba1[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x5a011e,null))[_0x1bd5('0xb')](handleError(_0x5a011e,null));};exports[_0x1bd5('0x47')]=function(_0x33f011,_0x35c478){return respondWithRpcPromise('ChatQueues',_0x33f011[_0x1bd5('0x15')],routingClient)['then'](respondWithResult(_0x35c478,null))[_0x1bd5('0xb')](handleError(_0x35c478,null));};exports[_0x1bd5('0x48')]=function(_0x2cc5ba,_0x5a8132){return respondWithRpcPromise('ChatQueues',_0x2cc5ba[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](findById(_0x2cc5ba[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x5a8132,null))[_0x1bd5('0xb')](handleError(_0x5a8132,null));};exports[_0x1bd5('0x49')]=function(_0x46e36c,_0x383a68){return respondWithRpcPromise(_0x1bd5('0x4a'),_0x46e36c[_0x1bd5('0x15')],routingClient)['then'](respondWithResult(_0x383a68,null))[_0x1bd5('0xb')](handleError(_0x383a68,null));};exports['showMailQueues']=function(_0x2fe8f4,_0x34d93b){return respondWithRpcPromise(_0x1bd5('0x4a'),_0x2fe8f4['query'],routingClient)[_0x1bd5('0x16')](findById(_0x2fe8f4[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x34d93b,null))['catch'](handleError(_0x34d93b,null));};exports[_0x1bd5('0x4b')]=function(_0x10103a,_0x39f973){return respondWithRpcPromise(_0x1bd5('0x4c'),_0x10103a['query'],mailClient)['then'](respondWithResult(_0x39f973,null))[_0x1bd5('0xb')](handleError(_0x39f973,null));};exports[_0x1bd5('0x4d')]=function(_0x1790af,_0x54a8c4){return respondWithRpcPromise('OpenchannelQueues',_0x1790af[_0x1bd5('0x15')],routingClient)['then'](respondWithResult(_0x54a8c4,null))[_0x1bd5('0xb')](handleError(_0x54a8c4,null));};exports[_0x1bd5('0x4e')]=function(_0x5068ae,_0x32f646){return respondWithRpcPromise('OpenchannelQueues',_0x5068ae[_0x1bd5('0x15')],routingClient)['then'](findById(_0x5068ae[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x32f646,null))['catch'](handleError(_0x32f646,null));};exports[_0x1bd5('0x4f')]=function(_0x19f765,_0x47ca3f){return respondWithRpcPromise('SmsQueues',_0x19f765[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x47ca3f,null))['catch'](handleError(_0x47ca3f,null));};exports[_0x1bd5('0x50')]=function(_0x40b508,_0x5da595){return respondWithRpcPromise('SmsQueues',_0x40b508[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](findById(_0x40b508[_0x1bd5('0x1a')]['id']))['then'](respondWithResult(_0x5da595,null))[_0x1bd5('0xb')](handleError(_0x5da595,null));};exports[_0x1bd5('0x51')]=function(_0x5c1db7,_0x4b317d){return respondWithRpcPromise(_0x1bd5('0x52'),_0x5c1db7[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x4b317d,null))[_0x1bd5('0xb')](handleError(_0x4b317d,null));};exports[_0x1bd5('0x53')]=function(_0x53c6de,_0x3827d7){return respondWithRpcPromise('WhatsappQueues',_0x53c6de[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](findById(_0x53c6de[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x3827d7,null))['catch'](handleError(_0x3827d7,null));};exports['faxQueues']=function(_0x3a7dd6,_0x36d62e){return respondWithRpcPromise(_0x1bd5('0x54'),_0x3a7dd6[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x36d62e,null))[_0x1bd5('0xb')](handleError(_0x36d62e,null));};exports[_0x1bd5('0x55')]=function(_0xc080d5,_0x1a35cf){return respondWithRpcPromise(_0x1bd5('0x54'),_0xc080d5[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](findById(_0xc080d5[_0x1bd5('0x1a')]['id']))[_0x1bd5('0x16')](respondWithResult(_0x1a35cf,null))[_0x1bd5('0xb')](handleError(_0x1a35cf,null));};exports[_0x1bd5('0x56')]=function(_0x1b99ff,_0x195176){return respondWithRpcPromise(_0x1bd5('0x57'),_0x1b99ff[_0x1bd5('0x15')])[_0x1bd5('0x16')](respondWithResult(_0x195176,null))[_0x1bd5('0xb')](handleError(_0x195176,null));};exports[_0x1bd5('0x58')]=function(_0x3ddf27,_0x56e99c){return respondWithRpcPromise(_0x1bd5('0x59'),_0x3ddf27[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x56e99c,null))[_0x1bd5('0xb')](handleError(_0x56e99c,null));};exports[_0x1bd5('0x5a')]=function(_0x37a6f3,_0x1e282c){return respondWithRpcPromise('MailQueuesWaitingInteractions',_0x37a6f3[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x1e282c,null))[_0x1bd5('0xb')](handleError(_0x1e282c,null));};exports[_0x1bd5('0x5b')]=function(_0x590b3d,_0x2ed59d){return respondWithRpcPromise(_0x1bd5('0x5c'),_0x590b3d[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x2ed59d,null))[_0x1bd5('0xb')](handleError(_0x2ed59d,null));};exports[_0x1bd5('0x5d')]=function(_0x32a878,_0x4cc7a5){return respondWithRpcPromise(_0x1bd5('0x5c'),_0x32a878['query'],routingClient)['then'](function(_0x34f98c){if(_0x32a878['query'][_0x1bd5('0x5e')]!==undefined){var _0x1a4ee6=_(_0x34f98c['rows'])[_0x1bd5('0x5f')]([_0x32a878[_0x1bd5('0x15')][_0x1bd5('0x5e')],_0x32a878[_0x1bd5('0x1a')]['id']])[_0x1bd5('0x60')](_0x1bd5('0x61'))['uniq']()[_0x1bd5('0x62')]();return _0x34f98c[_0x1bd5('0x11')][_0x1bd5('0x5f')](function(_0x1c9cec){return _0x1a4ee6['indexOf'](_0x1c9cec['queue_id'])>-0x1;});}else{return _0x34f98c[_0x1bd5('0x11')][_0x1bd5('0x5f')](function(_0x2fe037){return _0x2fe037[_0x1bd5('0x61')]===parseInt(_0x32a878['params']['id']);});}})[_0x1bd5('0x16')](respondWithResult(_0x4cc7a5,null))['catch'](handleError(_0x4cc7a5,null));};exports['smsQueuesWaitingInteractions']=function(_0x3a203f,_0x5045f9){return respondWithRpcPromise(_0x1bd5('0x63'),_0x3a203f[_0x1bd5('0x15')],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x5045f9,null))[_0x1bd5('0xb')](handleError(_0x5045f9,null));};exports[_0x1bd5('0x64')]=function(_0xab4ed6,_0x232077){return respondWithRpcPromise(_0x1bd5('0x65'),_0xab4ed6[_0x1bd5('0x15')],routingClient)['then'](respondWithResult(_0x232077,null))[_0x1bd5('0xb')](handleError(_0x232077,null));};exports['faxQueuesWaitingInteractions']=function(_0x58c715,_0x59b491){return respondWithRpcPromise(_0x1bd5('0x66'),_0x58c715['query'],routingClient)[_0x1bd5('0x16')](respondWithResult(_0x59b491,null))[_0x1bd5('0xb')](handleError(_0x59b491,null));};exports[_0x1bd5('0x67')]=function(_0x4a3f74){return function(_0x201968,_0x91bcf8){var _0x3410f8,_0x52cd5f;var _0xfc9282=_['capitalize'](_0x4a3f74);var _0x327eb6=_0x4a3f74===_0x1bd5('0x68')?_0x1bd5('0x69'):'Account';return db[_0xfc9282+'Queue'][_0x1bd5('0x6a')]({'raw':!![],'where':{'id':_0x201968['params']['id']}})[_0x1bd5('0x16')](function(_0x53be05){if(_[_0x1bd5('0x10')](_0x53be05)){throw new Error(_0xfc9282+_0x1bd5('0x6b'));}_0x3410f8=_0x53be05;return db[_0xfc9282+_0x1bd5('0x6c')][_0x1bd5('0x6a')]({'where':{'id':_0x201968[_0x1bd5('0x22')][_0x1bd5('0x6d')]},'include':[{'model':db[_0xfc9282+_0x1bd5('0x6e')],'as':_0x1bd5('0x6e')},{'model':db[_0xfc9282+_0x327eb6],'as':_0x1bd5('0x6f')}]});})[_0x1bd5('0x16')](function(_0x3c90dc){if(_[_0x1bd5('0x10')](_0x3c90dc)){throw new Error(_0xfc9282+_0x1bd5('0x70'));}_0x52cd5f=_0x3c90dc;return _0x3c90dc[_0x1bd5('0x71')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x2a1b4a={'uniqueid':_0x4a3f74+'.'+_0x52cd5f['id']+'.'+_0x52cd5f[_0x1bd5('0x6e')]['id'],'FromUserId':_0x201968[_0x1bd5('0x32')]['id'],'type':'queue'};_0x2a1b4a[_0xfc9282+_0x1bd5('0x72')]=_0x52cd5f['id'];_0x2a1b4a[_0xfc9282+_0x1bd5('0x73')]=_0x52cd5f['Interaction']['id'];_0x2a1b4a[_0x1bd5('0x74')+_0xfc9282+_0x327eb6+'Id']=_0x52cd5f[_0x1bd5('0x6f')]['id'];_0x2a1b4a['To'+_0xfc9282+_0x1bd5('0x75')]=_0x3410f8['id'];return db[_0xfc9282+'TransferReport'][_0x1bd5('0x76')](_0x2a1b4a);})[_0x1bd5('0x16')](function(){return respondWithRpcPromise(_0x1bd5('0x77'),{'channel':_0x4a3f74,'interaction':_0x52cd5f[_0x1bd5('0x6e')],'message':_0x52cd5f,'account':_0x52cd5f['Account'],'applications':[{'id':0x0,'priority':0x1,'app':_0x1bd5('0x78'),'appdata':_0x3410f8[_0x1bd5('0x33')]+','+(_0x52cd5f[_0x1bd5('0x6f')]['queueTransferTimeout']||0x12c),'interval':_0x1bd5('0x79')}]},routingClient);})[_0x1bd5('0x16')](respondWithResult(_0x91bcf8,null))['catch'](handleError(_0x91bcf8,null));};};exports['agentNotify']=function(_0x4230e9,_0x182d75){var _0x5c9098,_0x5d6b17;if(_[_0x1bd5('0x10')](_0x4230e9['body']['channel'])){throw new Error(_0x1bd5('0x7a'));}var _0x5cb13d=_0x4230e9[_0x1bd5('0x22')][_0x1bd5('0x7b')];var _0x5df043=_[_0x1bd5('0x7c')](_0x5cb13d);var _0x254c8d=_0x5cb13d===_0x1bd5('0x68')?'Website':_0x1bd5('0x6f');return db['User'][_0x1bd5('0x6a')]({'raw':!![],'where':{'id':_0x4230e9[_0x1bd5('0x1a')]['id'],'role':_0x1bd5('0x3e')}})[_0x1bd5('0x16')](function(_0x2f9dff){if(_['isNil'](_0x2f9dff)){throw new Error(_0x1bd5('0x7d'));}_0x5c9098=_0x2f9dff;return db[_0x5df043+'Message'][_0x1bd5('0x6a')]({'where':{'id':_0x4230e9['body']['messageId']},'include':[{'model':db[_0x5df043+_0x1bd5('0x6e')],'as':_0x1bd5('0x6e')},{'model':db[_0x5df043+_0x254c8d],'as':_0x1bd5('0x6f')}]});})[_0x1bd5('0x16')](function(_0x4c9931){if(_[_0x1bd5('0x10')](_0x4c9931)){throw new Error(_0x5df043+_0x1bd5('0x70'));}_0x5d6b17=_0x4c9931;return _0x4c9931[_0x1bd5('0x71')]({'read':0x0,'readAt':null,'UserId':null});})[_0x1bd5('0x16')](function(){var _0x15e584={'uniqueid':_0x5cb13d+'.'+_0x5d6b17['id']+'.'+_0x5d6b17[_0x1bd5('0x6e')]['id'],'FromUserId':_0x4230e9[_0x1bd5('0x32')]['id'],'type':_0x1bd5('0x78'),'ToUserId':_0x5c9098['id']};_0x15e584[_0x5df043+_0x1bd5('0x72')]=_0x5d6b17['id'];_0x15e584[_0x5df043+_0x1bd5('0x73')]=_0x5d6b17[_0x1bd5('0x6e')]['id'];_0x15e584[_0x1bd5('0x74')+_0x5df043+_0x254c8d+'Id']=_0x5d6b17[_0x1bd5('0x6f')]['id'];return db[_0x5df043+_0x1bd5('0x7e')]['create'](_0x15e584);})[_0x1bd5('0x16')](function(){return respondWithRpcPromise(_0x1bd5('0x77'),{'channel':_0x5cb13d,'interaction':_0x5d6b17[_0x1bd5('0x6e')],'message':_0x5d6b17,'account':_0x5d6b17[_0x1bd5('0x6f')],'applications':[{'id':0x0,'priority':0x1,'app':_0x1bd5('0x3e'),'appdata':_0x5c9098[_0x1bd5('0x33')]+','+(_0x5d6b17[_0x1bd5('0x6f')][_0x1bd5('0x7f')]||0x12c),'interval':_0x1bd5('0x79')}]},routingClient);})[_0x1bd5('0x16')](respondWithResult(_0x182d75,null))[_0x1bd5('0xb')](handleError(_0x182d75,null));}; \ No newline at end of file diff --git a/server/api/schedule/index.js b/server/api/schedule/index.js index 8c940cf..d55c084 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 _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 +var _0xe4df=['fs-extra','../../components/interaction/service','../../config/environment','./schedule.controller','get','index','isAuthenticated','show','create','put','update','destroy','exports','util','path','connect-timeout','express'];(function(_0x45783c,_0x49c56d){var _0x1161da=function(_0x3c5d41){while(--_0x3c5d41){_0x45783c['push'](_0x45783c['shift']());}};_0x1161da(++_0x49c56d);}(_0xe4df,0x161));var _0xfe4d=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xe4df[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require('multer');var util=require(_0xfe4d('0x0'));var path=require(_0xfe4d('0x1'));var timeout=require(_0xfe4d('0x2'));var express=require(_0xfe4d('0x3'));var router=express['Router']();var fs_extra=require(_0xfe4d('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xfe4d('0x5'));var config=require(_0xfe4d('0x6'));var controller=require(_0xfe4d('0x7'));router[_0xfe4d('0x8')]('/',auth['isAuthenticated'](),controller[_0xfe4d('0x9')]);router[_0xfe4d('0x8')]('/:id',auth[_0xfe4d('0xa')](),controller[_0xfe4d('0xb')]);router[_0xfe4d('0x8')]('/:id/run',auth[_0xfe4d('0xa')](),controller['run']);router['post']('/',auth[_0xfe4d('0xa')](),controller[_0xfe4d('0xc')]);router[_0xfe4d('0xd')]('/:id',auth['isAuthenticated'](),controller[_0xfe4d('0xe')]);router['delete']('/:id',auth[_0xfe4d('0xa')](),controller[_0xfe4d('0xf')]);module[_0xfe4d('0x10')]=router; \ No newline at end of file diff --git a/server/api/schedule/schedule.attributes.js b/server/api/schedule/schedule.attributes.js index cb430ce..c709a9b 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 _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 +var _0xf7a9=['INTEGER','ENUM','years','quarters','months','weeks','days','minutes','csv','pdf','xlsx','custom','BOOLEAN','sequelize','exports','STRING'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xf7a9,0x1cd));var _0x9f7a=function(_0x5610e5,_0xe6e7a8){_0x5610e5=_0x5610e5-0x0;var _0x54341d=_0xf7a9[_0x5610e5];return _0x54341d;};'use strict';var Sequelize=require(_0x9f7a('0x0'));module[_0x9f7a('0x1')]={'name':{'type':Sequelize[_0x9f7a('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x9f7a('0x2')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize['DATE'],'allowNull':![]},'endAt':{'type':Sequelize['DATE'],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0x9f7a('0x3')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x9f7a('0x4')](_0x9f7a('0x5'),_0x9f7a('0x6'),_0x9f7a('0x7'),_0x9f7a('0x8'),_0x9f7a('0x9'),'hours',_0x9f7a('0xa')),'allowNull':![],'defaultValue':_0x9f7a('0x9')},'output':{'type':Sequelize[_0x9f7a('0x4')](_0x9f7a('0xb'),_0x9f7a('0xc'),_0x9f7a('0xd')),'allowNull':![],'defaultValue':_0x9f7a('0xb')},'type':{'type':Sequelize[_0x9f7a('0x4')](_0x9f7a('0xe'),'default'),'allowNull':![],'defaultValue':_0x9f7a('0xe')},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0x9f7a('0x2')]},'cc':{'type':Sequelize['TEXT']},'bcc':{'type':Sequelize['TEXT']},'sendIfEmpty':{'type':Sequelize[_0x9f7a('0xf')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/schedule/schedule.controller.js b/server/api/schedule/schedule.controller.js index 0aed536..d145406 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 _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 +var _0x0cfa=['ejs','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','get','Scheduler','UserProfileResource','end','sendStatus','error','name','send','index','map','Schedule','fieldName','type','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','run','../../config/schedule','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv'];(function(_0x3ca51b,_0x24861e){var _0x21715d=function(_0x2b5021){while(--_0x2b5021){_0x3ca51b['push'](_0x3ca51b['shift']());}};_0x21715d(++_0x24861e);}(_0x0cfa,0xa2));var _0xa0cf=function(_0x7ff16b,_0x37f901){_0x7ff16b=_0x7ff16b-0x0;var _0x5d8299=_0x0cfa[_0x7ff16b];return _0x5d8299;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa0cf('0x0'));var zipdir=require(_0xa0cf('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa0cf('0x2'));var moment=require(_0xa0cf('0x3'));var BPromise=require(_0xa0cf('0x4'));var Mustache=require(_0xa0cf('0x5'));var util=require(_0xa0cf('0x6'));var path=require(_0xa0cf('0x7'));var sox=require(_0xa0cf('0x8'));var csv=require(_0xa0cf('0x9'));var ejs=require(_0xa0cf('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xa0cf('0xb'));var crypto=require(_0xa0cf('0xc'));var jsforce=require(_0xa0cf('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xa0cf('0x9'));var querystring=require(_0xa0cf('0xe'));var Papa=require(_0xa0cf('0xf'));var Redis=require(_0xa0cf('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xa0cf('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa0cf('0x12'))('api');var utils=require(_0xa0cf('0x13'));var config=require(_0xa0cf('0x14'));var licenseUtil=require(_0xa0cf('0x15'));var db=require(_0xa0cf('0x16'))['db'];function respondWithStatusCode(_0x1d92e0,_0x45991b){_0x45991b=_0x45991b||0xcc;return function(_0x26b26e){if(_0x26b26e){return _0x1d92e0['sendStatus'](_0x45991b);}return _0x1d92e0[_0xa0cf('0x17')](_0x45991b)['end']();};}function respondWithResult(_0x2d384d,_0x4fb237){_0x4fb237=_0x4fb237||0xc8;return function(_0x51b170){if(_0x51b170){return _0x2d384d['status'](_0x4fb237)['json'](_0x51b170);}};}function respondWithFilteredResult(_0x4b2512,_0x19c631){return function(_0x353eb2){if(_0x353eb2){var _0x3bafac=typeof _0x19c631[_0xa0cf('0x18')]===_0xa0cf('0x19')&&typeof _0x19c631[_0xa0cf('0x1a')]===_0xa0cf('0x19');var _0x2556b4=_0x353eb2[_0xa0cf('0x1b')];var _0x121957=_0x3bafac?0x0:_0x19c631[_0xa0cf('0x18')];var _0x428cc4=_0x3bafac?_0x353eb2[_0xa0cf('0x1b')]:_0x19c631['offset']+_0x19c631[_0xa0cf('0x1a')];var _0x23baaa;if(_0x428cc4>=_0x2556b4){_0x428cc4=_0x2556b4;_0x23baaa=0xc8;}else{_0x23baaa=0xce;}_0x4b2512[_0xa0cf('0x17')](_0x23baaa);return _0x4b2512[_0xa0cf('0x1c')](_0xa0cf('0x1d'),_0x121957+'-'+_0x428cc4+'/'+_0x2556b4)[_0xa0cf('0x1e')](_0x353eb2);}return null;};}function patchUpdates(_0x162385){return function(_0xa8b7b8){try{jsonpatch[_0xa0cf('0x1f')](_0xa8b7b8,_0x162385,!![]);}catch(_0x3f87d8){return BPromise[_0xa0cf('0x20')](_0x3f87d8);}return _0xa8b7b8[_0xa0cf('0x21')]();};}function saveUpdates(_0x3510aa,_0x9ddb0f){return function(_0x513972){if(_0x513972){return _0x513972[_0xa0cf('0x22')](_0x3510aa)[_0xa0cf('0x23')](function(_0x378a93){return _0x378a93;});}return null;};}function removeEntity(_0x2d2be8,_0x418ea1){return function(_0x41e08a){if(_0x41e08a){return _0x41e08a[_0xa0cf('0x24')]()[_0xa0cf('0x23')](function(){var _0x3c64a7=_0x41e08a[_0xa0cf('0x25')]({'plain':!![]});var _0x30be8c=_0xa0cf('0x26');return db[_0xa0cf('0x27')][_0xa0cf('0x24')]({'where':{'type':_0x30be8c,'resourceId':_0x3c64a7['id']}})[_0xa0cf('0x23')](function(){return _0x41e08a;});})[_0xa0cf('0x23')](function(){_0x2d2be8[_0xa0cf('0x17')](0xcc)[_0xa0cf('0x28')]();});}};}function handleEntityNotFound(_0x629390,_0x4a689a){return function(_0x495521){if(!_0x495521){_0x629390[_0xa0cf('0x29')](0x194);}return _0x495521;};}function handleError(_0x410ae3,_0x562ae5){_0x562ae5=_0x562ae5||0x1f4;return function(_0x2c30aa){logger[_0xa0cf('0x2a')](_0x2c30aa['stack']);if(_0x2c30aa['name']){delete _0x2c30aa[_0xa0cf('0x2b')];}_0x410ae3[_0xa0cf('0x17')](_0x562ae5)[_0xa0cf('0x2c')](_0x2c30aa);};}exports[_0xa0cf('0x2d')]=function(_0x35e48a,_0x2b5e3e){var _0x18e0eb={},_0x2965eb={},_0x5928ae={'count':0x0,'rows':[]};var _0x165a13=_[_0xa0cf('0x2e')](db[_0xa0cf('0x2f')]['rawAttributes'],function(_0x232427){return{'name':_0x232427[_0xa0cf('0x30')],'type':_0x232427[_0xa0cf('0x31')]['key']};});_0x2965eb[_0xa0cf('0x32')]=_[_0xa0cf('0x2e')](_0x165a13,'name');_0x2965eb['query']=_[_0xa0cf('0x33')](_0x35e48a['query']);_0x2965eb[_0xa0cf('0x34')]=_[_0xa0cf('0x35')](_0x2965eb[_0xa0cf('0x32')],_0x2965eb[_0xa0cf('0x36')]);_0x18e0eb[_0xa0cf('0x37')]=_[_0xa0cf('0x35')](_0x2965eb[_0xa0cf('0x32')],qs[_0xa0cf('0x38')](_0x35e48a[_0xa0cf('0x36')]['fields']));_0x18e0eb[_0xa0cf('0x37')]=_0x18e0eb[_0xa0cf('0x37')][_0xa0cf('0x39')]?_0x18e0eb[_0xa0cf('0x37')]:_0x2965eb[_0xa0cf('0x32')];if(!_0x35e48a[_0xa0cf('0x36')][_0xa0cf('0x3a')]('nolimit')){_0x18e0eb[_0xa0cf('0x1a')]=qs[_0xa0cf('0x1a')](_0x35e48a['query'][_0xa0cf('0x1a')]);_0x18e0eb[_0xa0cf('0x18')]=qs['offset'](_0x35e48a[_0xa0cf('0x36')][_0xa0cf('0x18')]);}_0x18e0eb[_0xa0cf('0x3b')]=qs[_0xa0cf('0x3c')](_0x35e48a[_0xa0cf('0x36')][_0xa0cf('0x3c')]);_0x18e0eb[_0xa0cf('0x3d')]=qs[_0xa0cf('0x34')](_[_0xa0cf('0x3e')](_0x35e48a[_0xa0cf('0x36')],_0x2965eb[_0xa0cf('0x34')]),_0x165a13);if(_0x35e48a[_0xa0cf('0x36')]['filter']){_0x18e0eb[_0xa0cf('0x3d')]=_[_0xa0cf('0x3f')](_0x18e0eb[_0xa0cf('0x3d')],{'$or':_[_0xa0cf('0x2e')](_0x165a13,function(_0x47aa3d){if(_0x47aa3d[_0xa0cf('0x31')]!==_0xa0cf('0x40')){var _0x2fad28={};_0x2fad28[_0x47aa3d['name']]={'$like':'%'+_0x35e48a[_0xa0cf('0x36')]['filter']+'%'};return _0x2fad28;}})});}_0x18e0eb=_['merge']({},_0x18e0eb,_0x35e48a['options']);var _0x513d93={'where':_0x18e0eb[_0xa0cf('0x3d')]};return db['Schedule'][_0xa0cf('0x1b')](_0x513d93)[_0xa0cf('0x23')](function(_0x10a2c3){_0x5928ae[_0xa0cf('0x1b')]=_0x10a2c3;if(_0x35e48a[_0xa0cf('0x36')][_0xa0cf('0x41')]){_0x18e0eb[_0xa0cf('0x42')]=[{'all':!![]}];}return db[_0xa0cf('0x2f')][_0xa0cf('0x43')](_0x18e0eb);})['then'](function(_0x192c92){_0x5928ae[_0xa0cf('0x44')]=_0x192c92;return _0x5928ae;})[_0xa0cf('0x23')](respondWithFilteredResult(_0x2b5e3e,_0x18e0eb))[_0xa0cf('0x45')](handleError(_0x2b5e3e,null));};exports[_0xa0cf('0x46')]=function(_0x84faab,_0x2d6062){var _0x28c30c={'raw':![],'where':{'id':_0x84faab[_0xa0cf('0x47')]['id']}},_0x2b79b8={};_0x2b79b8['model']=_[_0xa0cf('0x33')](db[_0xa0cf('0x2f')][_0xa0cf('0x48')]);_0x2b79b8[_0xa0cf('0x36')]=_[_0xa0cf('0x33')](_0x84faab[_0xa0cf('0x36')]);_0x2b79b8['filters']=_['intersection'](_0x2b79b8['model'],_0x2b79b8['query']);_0x28c30c[_0xa0cf('0x37')]=_[_0xa0cf('0x35')](_0x2b79b8[_0xa0cf('0x32')],qs[_0xa0cf('0x38')](_0x84faab[_0xa0cf('0x36')]['fields']));_0x28c30c[_0xa0cf('0x37')]=_0x28c30c['attributes']['length']?_0x28c30c[_0xa0cf('0x37')]:_0x2b79b8[_0xa0cf('0x32')];if(_0x84faab[_0xa0cf('0x36')]['includeAll']){_0x28c30c[_0xa0cf('0x42')]=[{'all':!![]}];}_0x28c30c=_[_0xa0cf('0x3f')]({},_0x28c30c,_0x84faab[_0xa0cf('0x49')]);return db['Schedule'][_0xa0cf('0x4a')](_0x28c30c)['then'](handleEntityNotFound(_0x2d6062,null))[_0xa0cf('0x23')](respondWithResult(_0x2d6062,null))[_0xa0cf('0x45')](handleError(_0x2d6062,null));};exports['create']=function(_0xa3b53d,_0x2a9ea0){return db['Schedule'][_0xa0cf('0x4b')](_0xa3b53d[_0xa0cf('0x4c')],{})[_0xa0cf('0x23')](function(_0x272d3d){var _0x2da244=_0xa3b53d[_0xa0cf('0x4d')][_0xa0cf('0x25')]({'plain':!![]});if(!_0x2da244)throw new Error(_0xa0cf('0x4e'));if(_0x2da244[_0xa0cf('0x4f')]===_0xa0cf('0x4d')){var _0x4471b9=_0x272d3d[_0xa0cf('0x25')]({'plain':!![]});var _0x33c306=_0xa0cf('0x26');return db[_0xa0cf('0x50')]['find']({'where':{'name':_0x33c306,'userProfileId':_0x2da244[_0xa0cf('0x51')]},'raw':!![]})[_0xa0cf('0x23')](function(_0x31d30b){if(_0x31d30b&&_0x31d30b[_0xa0cf('0x52')]===0x0){return db[_0xa0cf('0x27')][_0xa0cf('0x4b')]({'name':_0x4471b9['name'],'resourceId':_0x4471b9['id'],'type':_0x31d30b[_0xa0cf('0x2b')],'sectionId':_0x31d30b['id']},{})[_0xa0cf('0x23')](function(){return _0x272d3d;});}else{return _0x272d3d;}})['catch'](function(_0x17ef8a){logger[_0xa0cf('0x2a')](_0xa0cf('0x53'),_0x17ef8a);throw _0x17ef8a;});}return _0x272d3d;})[_0xa0cf('0x23')](respondWithResult(_0x2a9ea0,0xc9))[_0xa0cf('0x45')](handleError(_0x2a9ea0,null));};exports['update']=function(_0x598317,_0x21afff){if(_0x598317['body']['id']){delete _0x598317[_0xa0cf('0x4c')]['id'];}return db[_0xa0cf('0x2f')][_0xa0cf('0x4a')]({'where':{'id':_0x598317[_0xa0cf('0x47')]['id']}})[_0xa0cf('0x23')](handleEntityNotFound(_0x21afff,null))[_0xa0cf('0x23')](saveUpdates(_0x598317[_0xa0cf('0x4c')],null))[_0xa0cf('0x23')](respondWithResult(_0x21afff,null))[_0xa0cf('0x45')](handleError(_0x21afff,null));};exports[_0xa0cf('0x24')]=function(_0x2561bd,_0x5d11b5){return db[_0xa0cf('0x2f')][_0xa0cf('0x4a')]({'where':{'id':_0x2561bd[_0xa0cf('0x47')]['id']}})['then'](handleEntityNotFound(_0x5d11b5,null))['then'](removeEntity(_0x5d11b5,null))[_0xa0cf('0x45')](handleError(_0x5d11b5,null));};exports[_0xa0cf('0x54')]=function(_0x522846,_0x17cae6,_0x1aefe1){var _0x4c5f9a=require(_0xa0cf('0x55'));return db[_0xa0cf('0x2f')][_0xa0cf('0x4a')]({'where':{'id':_0x522846[_0xa0cf('0x47')]['id']},'raw':!![]})[_0xa0cf('0x23')](handleEntityNotFound(_0x17cae6,null))[_0xa0cf('0x23')](function(){_0x4c5f9a[_0xa0cf('0x54')](_0x522846[_0xa0cf('0x47')]['id']);})[_0xa0cf('0x23')](respondWithStatusCode(_0x17cae6,null))[_0xa0cf('0x45')](handleError(_0x17cae6,null));}; \ No newline at end of file diff --git a/server/api/schedule/schedule.model.js b/server/api/schedule/schedule.model.js index 28a924f..58923d7 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 _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 +var _0xad62=['define','Schedule','tools_schedules','lodash','util','../../config/logger','api','moment','request-promise','rimraf','./schedule.attributes','exports'];(function(_0x7a319d,_0x235959){var _0x5c6b4e=function(_0x2e5b17){while(--_0x2e5b17){_0x7a319d['push'](_0x7a319d['shift']());}};_0x5c6b4e(++_0x235959);}(_0xad62,0x147));var _0x2ad6=function(_0x4c8992,_0x20a7f2){_0x4c8992=_0x4c8992-0x0;var _0x2f2e5d=_0xad62[_0x4c8992];return _0x2f2e5d;};'use strict';var _=require(_0x2ad6('0x0'));var util=require(_0x2ad6('0x1'));var logger=require(_0x2ad6('0x2'))(_0x2ad6('0x3'));var moment=require(_0x2ad6('0x4'));var BPromise=require('bluebird');var rp=require(_0x2ad6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2ad6('0x6'));var config=require('../../config/environment');var attributes=require(_0x2ad6('0x7'));module[_0x2ad6('0x8')]=function(_0x4dd7a4,_0x2d17ee){return _0x4dd7a4[_0x2ad6('0x9')](_0x2ad6('0xa'),attributes,{'tableName':_0x2ad6('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 a9c2844..1c1c874 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 _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 +var _0x8a88=['rpc','../../config/environment','client','http','request','info','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','Schedule,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x195015,_0x449e01){var _0xcb5d73=function(_0x371aaf){while(--_0x371aaf){_0x195015['push'](_0x195015['shift']());}};_0xcb5d73(++_0x449e01);}(_0x8a88,0xec));var _0x88a8=function(_0x5a7650,_0x454cd1){_0x5a7650=_0x5a7650-0x0;var _0x1b8bfc=_0x8a88[_0x5a7650];return _0x1b8bfc;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x88a8('0x0'));var BPromise=require(_0x88a8('0x1'));var rs=require(_0x88a8('0x2'));var fs=require('fs');var Redis=require(_0x88a8('0x3'));var db=require(_0x88a8('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x88a8('0x5'))(_0x88a8('0x6'));var config=require(_0x88a8('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x88a8('0x8')][_0x88a8('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4d43af,_0x4b085c,_0x1e2d45){return new BPromise(function(_0x5c1f21,_0x1ea9a5){return client[_0x88a8('0xa')](_0x4d43af,_0x1e2d45)['then'](function(_0x1af279){logger[_0x88a8('0xb')]('Schedule,\x20%s,\x20%s',_0x4b085c,_0x88a8('0xc'));logger[_0x88a8('0xd')](_0x88a8('0xe'),_0x4b085c,_0x88a8('0xc'),JSON[_0x88a8('0xf')](_0x1af279));if(_0x1af279['error']){if(_0x1af279[_0x88a8('0x10')][_0x88a8('0x11')]===0x1f4){logger[_0x88a8('0x10')](_0x88a8('0x12'),_0x4b085c,_0x1af279['error'][_0x88a8('0x13')]);return _0x1ea9a5(_0x1af279['error'][_0x88a8('0x13')]);}logger['error'](_0x88a8('0x12'),_0x4b085c,_0x1af279[_0x88a8('0x10')]['message']);return _0x5c1f21(_0x1af279[_0x88a8('0x10')][_0x88a8('0x13')]);}else{logger[_0x88a8('0xb')]('Schedule,\x20%s,\x20%s',_0x4b085c,_0x88a8('0xc'));_0x5c1f21(_0x1af279[_0x88a8('0x14')][_0x88a8('0x13')]);}})[_0x88a8('0x15')](function(_0xc3a953){logger['error'](_0x88a8('0x12'),_0x4b085c,_0xc3a953);_0x1ea9a5(_0xc3a953);});});} \ No newline at end of file diff --git a/server/api/screenRecording/index.js b/server/api/screenRecording/index.js index 8ee1d75..1b65e8c 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 _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 +var _0xa41d=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./screenRecording.controller','get','isAuthenticated','describe','/:id','show','download','post','create','put','update','delete','exports','multer','util'];(function(_0x126175,_0x392fca){var _0x598264=function(_0xd3fdc6){while(--_0xd3fdc6){_0x126175['push'](_0x126175['shift']());}};_0x598264(++_0x392fca);}(_0xa41d,0x1b6));var _0xda41=function(_0x3c0f80,_0x55c8a4){_0x3c0f80=_0x3c0f80-0x0;var _0x597cd8=_0xa41d[_0x3c0f80];return _0x597cd8;};'use strict';var multer=require(_0xda41('0x0'));var util=require(_0xda41('0x1'));var path=require(_0xda41('0x2'));var timeout=require(_0xda41('0x3'));var express=require(_0xda41('0x4'));var router=express[_0xda41('0x5')]();var fs_extra=require(_0xda41('0x6'));var auth=require(_0xda41('0x7'));var interaction=require(_0xda41('0x8'));var config=require('../../config/environment');var controller=require(_0xda41('0x9'));router[_0xda41('0xa')]('/',auth[_0xda41('0xb')](),controller['index']);router[_0xda41('0xa')]('/describe',auth[_0xda41('0xb')](),controller[_0xda41('0xc')]);router[_0xda41('0xa')](_0xda41('0xd'),auth['isAuthenticated'](),controller[_0xda41('0xe')]);router[_0xda41('0xa')]('/:id/download',auth[_0xda41('0xb')](),controller[_0xda41('0xf')]);router[_0xda41('0x10')]('/',auth[_0xda41('0xb')](),controller[_0xda41('0x11')]);router[_0xda41('0x12')](_0xda41('0xd'),auth[_0xda41('0xb')](),controller[_0xda41('0x13')]);router[_0xda41('0x14')](_0xda41('0xd'),auth[_0xda41('0xb')](),controller['destroy']);module[_0xda41('0x15')]=router; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.attributes.js b/server/api/screenRecording/screenRecording.attributes.js index 7049f4c..493082c 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 _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 +var _0xf3f9=['getDataValue','value','extname','STRING','replace','setDataValue','INTEGER','closedAt','duration','DATE','startedAt','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','sequelize','moment','../../config/environment','exports','VIRTUAL'];(function(_0x265003,_0xf0f023){var _0x33c743=function(_0x326a5d){while(--_0x326a5d){_0x265003['push'](_0x265003['shift']());}};_0x33c743(++_0xf0f023);}(_0xf3f9,0x1de));var _0x9f3f=function(_0x53329c,_0x5de292){_0x53329c=_0x53329c-0x0;var _0x1f4f60=_0xf3f9[_0x53329c];return _0x1f4f60;};'use strict';var Sequelize=require(_0x9f3f('0x0'));var moment=require(_0x9f3f('0x1'));var path=require('path');var config=require(_0x9f3f('0x2'));module[_0x9f3f('0x3')]={'format':{'type':Sequelize[_0x9f3f('0x4')],'get':function(){return this[_0x9f3f('0x5')](_0x9f3f('0x6'))?path[_0x9f3f('0x7')](this[_0x9f3f('0x5')]('value')):undefined;}},'interactionid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x9f3f('0x8')]},'value':{'type':Sequelize['STRING'],'set':function(_0x17b150){var _0x4a9a17=_0x17b150[_0x9f3f('0x9')](/\\/g,'/');this[_0x9f3f('0xa')](_0x9f3f('0x6'),_0x4a9a17);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x9f3f('0xb')],'set':function(_0x588c31){this['setDataValue']('startedAt',moment()['subtract'](_0x588c31,'ms'));this[_0x9f3f('0xa')](_0x9f3f('0xc'),moment());this[_0x9f3f('0xa')](_0x9f3f('0xd'),_0x588c31);}},'startedAt':{'type':Sequelize[_0x9f3f('0xe')],'get':function(){return moment(this[_0x9f3f('0x5')](_0x9f3f('0xf')))[_0x9f3f('0x10')](_0x9f3f('0x11'))[_0x9f3f('0x12')]();}},'closedAt':{'type':Sequelize[_0x9f3f('0xe')],'get':function(){return moment(this[_0x9f3f('0x5')]('closedAt'))[_0x9f3f('0x10')](_0x9f3f('0x11'))['toString']();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x9f3f('0x5')](_0x9f3f('0x13')))[_0x9f3f('0x10')](_0x9f3f('0x11'))[_0x9f3f('0x12')]();}},'updatedAt':{'type':Sequelize[_0x9f3f('0xe')],'get':function(){return moment(this['getDataValue'](_0x9f3f('0x14')))[_0x9f3f('0x10')](_0x9f3f('0x11'))[_0x9f3f('0x12')]();}}}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.controller.js b/server/api/screenRecording/screenRecording.controller.js index efadd55..608eb2c 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 _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 +var _0x7217=['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','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','stack','send','index','map','ScreenRecording','fieldName','type','model','differenceBy','format','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','name','options','includeAll','rows','catch','params','rawAttributes','intersection','find','create','body','duration','createdAt','closedAt','value','describe','../../components/encryptor','uniqueid','join','root','server/files/screen_recordings','decryptFile','ValidationError','filename','extname','unlink','message','ScreenRecording\x20not\x20found','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','existsSync','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird'];(function(_0x53e0b4,_0x10c8a4){var _0x1950c1=function(_0x53a5f1){while(--_0x53a5f1){_0x53e0b4['push'](_0x53e0b4['shift']());}};_0x1950c1(++_0x10c8a4);}(_0x7217,0x19e));var _0x7721=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0x7217[_0xf50820];return _0x2a9b10;};'use strict';var emlformat=require(_0x7721('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7721('0x1'));var jsonpatch=require(_0x7721('0x2'));var rp=require(_0x7721('0x3'));var moment=require(_0x7721('0x4'));var BPromise=require(_0x7721('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x7721('0x6'));var sox=require(_0x7721('0x7'));var csv=require(_0x7721('0x8'));var ejs=require(_0x7721('0x9'));var fs=require('fs');var fs_extra=require(_0x7721('0xa'));var _=require(_0x7721('0xb'));var squel=require(_0x7721('0xc'));var crypto=require(_0x7721('0xd'));var jsforce=require(_0x7721('0xe'));var deskjs=require(_0x7721('0xf'));var toCsv=require(_0x7721('0x8'));var querystring=require(_0x7721('0x10'));var Papa=require(_0x7721('0x11'));var Redis=require(_0x7721('0x12'));var authService=require(_0x7721('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x7721('0x14'));var hardwareService=require(_0x7721('0x15'));var logger=require(_0x7721('0x16'))(_0x7721('0x17'));var utils=require(_0x7721('0x18'));var config=require(_0x7721('0x19'));var licenseUtil=require(_0x7721('0x1a'));var db=require(_0x7721('0x1b'))['db'];function respondWithStatusCode(_0x55b4ca,_0x2911ec){_0x2911ec=_0x2911ec||0xcc;return function(_0x199930){if(_0x199930){return _0x55b4ca['sendStatus'](_0x2911ec);}return _0x55b4ca[_0x7721('0x1c')](_0x2911ec)[_0x7721('0x1d')]();};}function respondWithResult(_0x3f01c5,_0x2e9752){_0x2e9752=_0x2e9752||0xc8;return function(_0x5069da){if(_0x5069da){return _0x3f01c5[_0x7721('0x1c')](_0x2e9752)[_0x7721('0x1e')](_0x5069da);}};}function respondWithFilteredResult(_0x534f1b,_0x4e199a){return function(_0x4b183e){if(_0x4b183e){var _0x5ed54=typeof _0x4e199a[_0x7721('0x1f')]===_0x7721('0x20')&&typeof _0x4e199a[_0x7721('0x21')]==='undefined';var _0x20f669=_0x4b183e['count'];var _0x3fc09e=_0x5ed54?0x0:_0x4e199a['offset'];var _0xfec626=_0x5ed54?_0x4b183e[_0x7721('0x22')]:_0x4e199a[_0x7721('0x1f')]+_0x4e199a[_0x7721('0x21')];var _0x2286e5;if(_0xfec626>=_0x20f669){_0xfec626=_0x20f669;_0x2286e5=0xc8;}else{_0x2286e5=0xce;}_0x534f1b[_0x7721('0x1c')](_0x2286e5);return _0x534f1b[_0x7721('0x23')](_0x7721('0x24'),_0x3fc09e+'-'+_0xfec626+'/'+_0x20f669)[_0x7721('0x1e')](_0x4b183e);}return null;};}function patchUpdates(_0xaeccc4){return function(_0x4ce1db){try{jsonpatch[_0x7721('0x25')](_0x4ce1db,_0xaeccc4,!![]);}catch(_0x2c1583){return BPromise[_0x7721('0x26')](_0x2c1583);}return _0x4ce1db[_0x7721('0x27')]();};}function saveUpdates(_0x57140c,_0x28f5a6){return function(_0x512f31){if(_0x512f31){return _0x512f31[_0x7721('0x28')](_0x57140c)[_0x7721('0x29')](function(_0x3e8a4e){return _0x3e8a4e;});}return null;};}function removeEntity(_0x1caad8,_0x121cc4){return function(_0x395b15){if(_0x395b15){return _0x395b15[_0x7721('0x2a')]()['then'](function(){_0x1caad8[_0x7721('0x1c')](0xcc)[_0x7721('0x1d')]();});}};}function handleEntityNotFound(_0x125564,_0x1f67c7){return function(_0x40d550){if(!_0x40d550){_0x125564[_0x7721('0x2b')](0x194);}return _0x40d550;};}function handleError(_0x424e05,_0xf753f1){_0xf753f1=_0xf753f1||0x1f4;return function(_0x40f367){logger['error'](_0x40f367[_0x7721('0x2c')]);if(_0x40f367['name']){delete _0x40f367['name'];}_0x424e05[_0x7721('0x1c')](_0xf753f1)[_0x7721('0x2d')](_0x40f367);};}exports[_0x7721('0x2e')]=function(_0x158d98,_0x1ea4d){var _0x37b9f0={},_0xd7d703={},_0x1da2d8={'count':0x0,'rows':[]};var _0x5c54f0=_[_0x7721('0x2f')](db[_0x7721('0x30')]['rawAttributes'],function(_0x4a25c9){return{'name':_0x4a25c9[_0x7721('0x31')],'type':_0x4a25c9[_0x7721('0x32')]['key']};});_0xd7d703[_0x7721('0x33')]=_[_0x7721('0x34')](_[_0x7721('0x2f')](_0x5c54f0,'name'),[_0x7721('0x35')]);_0xd7d703[_0x7721('0x36')]=_[_0x7721('0x37')](_0x158d98[_0x7721('0x36')]);_0xd7d703[_0x7721('0x38')]=_['intersection'](_0xd7d703[_0x7721('0x33')],_0xd7d703[_0x7721('0x36')]);_0x37b9f0[_0x7721('0x39')]=_['intersection'](_0xd7d703[_0x7721('0x33')],qs[_0x7721('0x3a')](_0x158d98['query'][_0x7721('0x3a')]));_0x37b9f0['attributes']=_0x37b9f0[_0x7721('0x39')][_0x7721('0x3b')]?_0x37b9f0[_0x7721('0x39')]:_0xd7d703[_0x7721('0x33')];if(!_0x158d98[_0x7721('0x36')][_0x7721('0x3c')](_0x7721('0x3d'))){_0x37b9f0[_0x7721('0x21')]=qs[_0x7721('0x21')](_0x158d98[_0x7721('0x36')][_0x7721('0x21')]);_0x37b9f0['offset']=qs[_0x7721('0x1f')](_0x158d98['query'][_0x7721('0x1f')]);}_0x37b9f0[_0x7721('0x3e')]=qs[_0x7721('0x3f')](_0x158d98[_0x7721('0x36')][_0x7721('0x3f')]);_0x37b9f0[_0x7721('0x40')]=qs['filters'](_['pick'](_0x158d98['query'],_0xd7d703['filters']),_0x5c54f0);if(_0x158d98[_0x7721('0x36')][_0x7721('0x41')]){_0x37b9f0[_0x7721('0x40')]=_[_0x7721('0x42')](_0x37b9f0['where'],{'$or':_[_0x7721('0x2f')](_0x5c54f0,function(_0x4cf659){if(_0x4cf659[_0x7721('0x32')]!==_0x7721('0x43')){var _0x5a278e={};_0x5a278e[_0x4cf659[_0x7721('0x44')]]={'$like':'%'+_0x158d98[_0x7721('0x36')]['filter']+'%'};return _0x5a278e;}})});}_0x37b9f0=_['merge']({},_0x37b9f0,_0x158d98[_0x7721('0x45')]);var _0xfc4dc4={'where':_0x37b9f0[_0x7721('0x40')]};return db[_0x7721('0x30')]['count'](_0xfc4dc4)[_0x7721('0x29')](function(_0x120de9){_0x1da2d8[_0x7721('0x22')]=_0x120de9;if(_0x158d98[_0x7721('0x36')][_0x7721('0x46')]){_0x37b9f0['include']=[{'all':!![]}];}return db[_0x7721('0x30')]['findAll'](_0x37b9f0);})[_0x7721('0x29')](function(_0x4a5b59){_0x1da2d8[_0x7721('0x47')]=_0x4a5b59;return _0x1da2d8;})[_0x7721('0x29')](respondWithFilteredResult(_0x1ea4d,_0x37b9f0))[_0x7721('0x48')](handleError(_0x1ea4d,null));};exports['show']=function(_0x1453d4,_0x11d853){var _0x1ad315={'raw':![],'where':{'id':_0x1453d4[_0x7721('0x49')]['id']}},_0x481fa8={};_0x481fa8[_0x7721('0x33')]=_[_0x7721('0x37')](db[_0x7721('0x30')][_0x7721('0x4a')]);_0x481fa8[_0x7721('0x36')]=_[_0x7721('0x37')](_0x1453d4['query']);_0x481fa8['filters']=_[_0x7721('0x4b')](_0x481fa8[_0x7721('0x33')],_0x481fa8[_0x7721('0x36')]);_0x1ad315[_0x7721('0x39')]=_[_0x7721('0x4b')](_0x481fa8[_0x7721('0x33')],qs[_0x7721('0x3a')](_0x1453d4[_0x7721('0x36')][_0x7721('0x3a')]));_0x1ad315[_0x7721('0x39')]=_0x1ad315['attributes']['length']?_0x1ad315[_0x7721('0x39')]:_0x481fa8[_0x7721('0x33')];if(_0x1453d4[_0x7721('0x36')][_0x7721('0x46')]){_0x1ad315['include']=[{'all':!![]}];}_0x1ad315=_[_0x7721('0x42')]({},_0x1ad315,_0x1453d4[_0x7721('0x45')]);return db['ScreenRecording'][_0x7721('0x4c')](_0x1ad315)['then'](handleEntityNotFound(_0x11d853,null))[_0x7721('0x29')](respondWithResult(_0x11d853,null))['catch'](handleError(_0x11d853,null));};exports[_0x7721('0x4d')]=function(_0x196be4,_0xf17c40){return db['ScreenRecording'][_0x7721('0x4d')](_0x196be4[_0x7721('0x4e')],{})['then'](respondWithResult(_0xf17c40,0xc9))[_0x7721('0x48')](handleError(_0xf17c40,null));};exports[_0x7721('0x28')]=function(_0xf88e8c,_0x5c4078){if(_0xf88e8c[_0x7721('0x4e')]['id']){delete _0xf88e8c['body']['id'];}delete _0xf88e8c[_0x7721('0x4e')][_0x7721('0x4f')];delete _0xf88e8c[_0x7721('0x4e')][_0x7721('0x50')];delete _0xf88e8c[_0x7721('0x4e')][_0x7721('0x51')];delete _0xf88e8c[_0x7721('0x4e')][_0x7721('0x52')];return db[_0x7721('0x30')][_0x7721('0x4c')]({'where':{'id':_0xf88e8c[_0x7721('0x49')]['id']}})[_0x7721('0x29')](handleEntityNotFound(_0x5c4078,null))[_0x7721('0x29')](saveUpdates(_0xf88e8c[_0x7721('0x4e')],null))[_0x7721('0x29')](respondWithResult(_0x5c4078,null))['catch'](handleError(_0x5c4078,null));};exports[_0x7721('0x53')]=function(_0x2f6f30,_0x8e1214){return db[_0x7721('0x30')][_0x7721('0x53')]()[_0x7721('0x29')](respondWithResult(_0x8e1214,null))[_0x7721('0x48')](handleError(_0x8e1214,null));};exports['download']=function(_0x234bee,_0x17036e,_0x134908){var _0x3b7382=require(_0x7721('0x54'));var _0x9c0d4=![];var _0x7fbd6c={};if(_0x234bee[_0x7721('0x36')][_0x7721('0x32')]&&_0x234bee[_0x7721('0x36')][_0x7721('0x32')]==='uniqueid'){_0x7fbd6c[_0x7721('0x55')]=_0x234bee[_0x7721('0x49')]['id'];}else{_0x7fbd6c['id']=_0x234bee[_0x7721('0x49')]['id'];}return db[_0x7721('0x30')][_0x7721('0x4c')]({'where':_0x7fbd6c,'attributes':['id',_0x7721('0x52')],'raw':!![]})[_0x7721('0x29')](handleEntityNotFound(_0x17036e,null))[_0x7721('0x29')](function(_0x360882){if(_0x360882){var _0x287452=path[_0x7721('0x56')](config[_0x7721('0x57')],_0x7721('0x58'),_0x360882[_0x7721('0x52')]);var _0x300ea4=util['format']('%s.cypher',_0x287452);if(fs['existsSync'](_0x300ea4)){_0x9c0d4=!![];return _0x3b7382[_0x7721('0x59')](_0x300ea4,_0x287452,config['secrets']['recording'])['then'](function(){return _0x360882;});}return _0x360882;}})['then'](function(_0x47925a){if(_0x47925a){var _0x219181=path[_0x7721('0x56')](config['root'],_0x7721('0x58'),_0x47925a['value']);if(!fs['existsSync'](_0x219181)){throw new db['Sequelize'][(_0x7721('0x5a'))]('ScreenRecording\x20not\x20found');}if(_0x47925a['filename']){return _0x17036e['download'](_0x219181,_0x47925a[_0x7721('0x5b')]+path[_0x7721('0x5c')](_0x219181),function(){if(_0x9c0d4){fs[_0x7721('0x5d')](_0x219181);}});}else{return _0x17036e['download'](_0x219181,function(_0x2a025c){if(_0x9c0d4){fs[_0x7721('0x5d')](_0x219181);}});}}})[_0x7721('0x48')](function(_0x168343){if(_0x168343[_0x7721('0x5e')]===_0x7721('0x5f')){_0x17036e[_0x7721('0x1c')](0x194)[_0x7721('0x2d')](_0x7721('0x60'));}else{return handleError(_0x17036e,null);}});};exports[_0x7721('0x2a')]=function(_0x3b03cf,_0x10666e){return db[_0x7721('0x30')][_0x7721('0x4c')]({'where':{'id':_0x3b03cf[_0x7721('0x49')]['id']}})['then'](function(_0x233e5d){if(_[_0x7721('0x61')](_0x233e5d)){throw new ReferenceError(_0x7721('0x62'));}return _0x233e5d;})[_0x7721('0x29')](function(_0x542e30){var _0x103009=path[_0x7721('0x56')](config['root'],_0x7721('0x58'),_0x542e30['value']);logger[_0x7721('0x63')](_0x7721('0x64'),_0x103009);if(!_[_0x7721('0x61')](_0x542e30[_0x7721('0x52')])&&fs[_0x7721('0x65')](_0x103009)){logger[_0x7721('0x63')](_0x7721('0x66')+_0x103009+_0x7721('0x67'));fs[_0x7721('0x68')](_0x103009);}_0x103009=_0x103009+'.cypher';if(!_[_0x7721('0x61')](_0x542e30[_0x7721('0x52')])&&fs[_0x7721('0x65')](_0x103009)){logger[_0x7721('0x63')](_0x7721('0x66')+_0x103009+_0x7721('0x67'));fs[_0x7721('0x68')](_0x103009);}return _0x542e30;})['then'](function(_0xb6f2f2){if(!_0xb6f2f2)throw new InternalError();return _0xb6f2f2[_0x7721('0x2a')]();})['then'](function(){_0x10666e[_0x7721('0x1c')](0xcc)['end']();})[_0x7721('0x48')](handleError(_0x10666e,null));}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.model.js b/server/api/screenRecording/screenRecording.model.js index 6828a89..53eb5b4 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 _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 +var _0xdd8d=['ScreenRecording','screen_recordings','interactionid','lodash','bluebird','request-promise','rimraf','../../config/environment','exports','define'];(function(_0x1602fb,_0x20b6b3){var _0x461831=function(_0x4a19f1){while(--_0x4a19f1){_0x1602fb['push'](_0x1602fb['shift']());}};_0x461831(++_0x20b6b3);}(_0xdd8d,0x107));var _0xddd8=function(_0x5b45da,_0x52bb87){_0x5b45da=_0x5b45da-0x0;var _0x2327f7=_0xdd8d[_0x5b45da];return _0x2327f7;};'use strict';var _=require(_0xddd8('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xddd8('0x1'));var rp=require(_0xddd8('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xddd8('0x3'));var config=require(_0xddd8('0x4'));var attributes=require('./screenRecording.attributes');module[_0xddd8('0x5')]=function(_0x19cc43,_0x5961b6){return _0x19cc43[_0xddd8('0x6')](_0xddd8('0x7'),attributes,{'tableName':_0xddd8('0x8'),'paranoid':![],'indexes':[{'name':_0xddd8('0x9'),'fields':[_0xddd8('0x9')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.rpc.js b/server/api/screenRecording/screenRecording.rpc.js index dda06e1..ff70703 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 _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 +var _0xe8e7=['jayson/promise','http','request','info','ScreenRecording,\x20%s,\x20%s','ScreenRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','../../config/utils','rpc','../../config/environment'];(function(_0x43cc3b,_0x2f3963){var _0x44fe5e=function(_0x101a19){while(--_0x101a19){_0x43cc3b['push'](_0x43cc3b['shift']());}};_0x44fe5e(++_0x2f3963);}(_0xe8e7,0x71));var _0x7e8e=function(_0x18ef22,_0x59b059){_0x18ef22=_0x18ef22-0x0;var _0x1c1393=_0xe8e7[_0x18ef22];return _0x1c1393;};'use strict';var _=require(_0x7e8e('0x0'));var util=require(_0x7e8e('0x1'));var moment=require('moment');var BPromise=require(_0x7e8e('0x2'));var rs=require(_0x7e8e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7e8e('0x4'));var logger=require('../../config/logger')(_0x7e8e('0x5'));var config=require(_0x7e8e('0x6'));var jayson=require(_0x7e8e('0x7'));var client=jayson['client'][_0x7e8e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x36734f,_0x33571b,_0x318887){return new BPromise(function(_0x47b0ba,_0x568a94){return client[_0x7e8e('0x9')](_0x36734f,_0x318887)['then'](function(_0x16277b){logger[_0x7e8e('0xa')](_0x7e8e('0xb'),_0x33571b,'request\x20sent');logger['debug'](_0x7e8e('0xc'),_0x33571b,_0x7e8e('0xd'),JSON[_0x7e8e('0xe')](_0x16277b));if(_0x16277b[_0x7e8e('0xf')]){if(_0x16277b[_0x7e8e('0xf')][_0x7e8e('0x10')]===0x1f4){logger['error'](_0x7e8e('0xb'),_0x33571b,_0x16277b[_0x7e8e('0xf')][_0x7e8e('0x11')]);return _0x568a94(_0x16277b[_0x7e8e('0xf')]['message']);}logger[_0x7e8e('0xf')](_0x7e8e('0xb'),_0x33571b,_0x16277b[_0x7e8e('0xf')][_0x7e8e('0x11')]);return _0x47b0ba(_0x16277b[_0x7e8e('0xf')][_0x7e8e('0x11')]);}else{logger[_0x7e8e('0xa')](_0x7e8e('0xb'),_0x33571b,_0x7e8e('0xd'));_0x47b0ba(_0x16277b[_0x7e8e('0x12')][_0x7e8e('0x11')]);}})[_0x7e8e('0x13')](function(_0x56a21d){logger[_0x7e8e('0xf')](_0x7e8e('0xb'),_0x33571b,_0x56a21d);_0x568a94(_0x56a21d);});});} \ No newline at end of file diff --git a/server/api/setting/index.js b/server/api/setting/index.js index b8d3f6b..2b2a6e1 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 _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 +var _0x07c3=['fs-extra','../../components/auth/service','../../components/interaction/service','./setting.controller','get','isAuthenticated','/now','getDate','/:id','show','/:id/logo','/:id/logo_login','getLogoLogin','/:id/gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','join','root','server/files/images/logos/','format','logo','originalname','post','single','file','diskStorage','%s%s','logologin','extname','addLogoLogin','preferred','addPreferred','put','update','exports','multer','util','path'];(function(_0x411c71,_0x6e611){var _0x2aa80a=function(_0x5d5378){while(--_0x5d5378){_0x411c71['push'](_0x411c71['shift']());}};_0x2aa80a(++_0x6e611);}(_0x07c3,0x9d));var _0x307c=function(_0x33f7e1,_0x48d209){_0x33f7e1=_0x33f7e1-0x0;var _0x23bab4=_0x07c3[_0x33f7e1];return _0x23bab4;};'use strict';var multer=require(_0x307c('0x0'));var util=require(_0x307c('0x1'));var path=require(_0x307c('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x307c('0x3'));var auth=require(_0x307c('0x4'));var interaction=require(_0x307c('0x5'));var config=require('../../config/environment');var controller=require(_0x307c('0x6'));router[_0x307c('0x7')]('/',auth[_0x307c('0x8')](),controller['index']);router[_0x307c('0x7')](_0x307c('0x9'),controller[_0x307c('0xa')]);router[_0x307c('0x7')](_0x307c('0xb'),controller[_0x307c('0xc')]);router[_0x307c('0x7')](_0x307c('0xd'),controller['getLogo']);router[_0x307c('0x7')](_0x307c('0xe'),controller[_0x307c('0xf')]);router[_0x307c('0x7')](_0x307c('0x10'),controller['gdpr']);router['get'](_0x307c('0x11'),controller[_0x307c('0x12')]);router[_0x307c('0x7')](_0x307c('0x13'),controller[_0x307c('0x14')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x8fb959,_0x262544,_0x1aa624){_0x1aa624(null,path[_0x307c('0x15')](config[_0x307c('0x16')],_0x307c('0x17')));},'filename':function(_0x5a71f8,_0x299e57,_0xe7eca5){_0xe7eca5(null,util[_0x307c('0x18')]('%s%s',_0x307c('0x19'),path['extname'](_0x299e57[_0x307c('0x1a')])));}})});router[_0x307c('0x1b')](_0x307c('0xd'),upload[_0x307c('0x1c')](_0x307c('0x1d')),controller['addLogo']);var upload=multer({'storage':multer[_0x307c('0x1e')]({'destination':function(_0x252fff,_0x593dce,_0x15931a){_0x15931a(null,path['join'](config[_0x307c('0x16')],_0x307c('0x17')));},'filename':function(_0x2c9f1c,_0x429ae0,_0x130af2){_0x130af2(null,util[_0x307c('0x18')](_0x307c('0x1f'),_0x307c('0x20'),path[_0x307c('0x21')](_0x429ae0[_0x307c('0x1a')])));}})});router[_0x307c('0x1b')](_0x307c('0xe'),upload[_0x307c('0x1c')]('file'),controller[_0x307c('0x22')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xb4beff,_0x428f8f,_0x1eac5e){_0x1eac5e(null,path[_0x307c('0x15')](config[_0x307c('0x16')],_0x307c('0x17')));},'filename':function(_0x146223,_0x4cfceb,_0x589ef4){_0x589ef4(null,util[_0x307c('0x18')]('%s%s',_0x307c('0x23'),path['extname'](_0x4cfceb[_0x307c('0x1a')])));}})});router[_0x307c('0x1b')](_0x307c('0x11'),upload['single'](_0x307c('0x1d')),controller[_0x307c('0x24')]);var upload=multer({'storage':multer[_0x307c('0x1e')]({'destination':function(_0x466b55,_0x5205c6,_0x19cac4){_0x19cac4(null,path[_0x307c('0x15')](config[_0x307c('0x16')],_0x307c('0x17')));},'filename':function(_0x500e5b,_0x1ac579,_0x2701a6){_0x2701a6(null,util['format']('%s%s','favicon',path['extname'](_0x1ac579['originalname'])));}})});router[_0x307c('0x1b')](_0x307c('0x13'),upload['single'](_0x307c('0x1d')),controller['addFavicon']);router[_0x307c('0x25')]('/:id',auth[_0x307c('0x8')](),controller[_0x307c('0x26')]);module[_0x307c('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 cce23a5..3954873 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 _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 +var _0xadb5=['https://www.xcally.com/bar/phonebar/autoupdater.xml','UNSIGNED','exports','min_internal','INTEGER','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted','BOOLEAN'];(function(_0x1bd323,_0x1c16ab){var _0x13097b=function(_0x4cc5de){while(--_0x4cc5de){_0x1bd323['push'](_0x1bd323['shift']());}};_0x13097b(++_0x1c16ab);}(_0xadb5,0xad));var _0x5adb=function(_0x2ea171,_0x51af8b){_0x2ea171=_0x2ea171-0x0;var _0x2d2379=_0xadb5[_0x2ea171];return _0x2d2379;};'use strict';var Sequelize=require('sequelize');module[_0x5adb('0x0')]={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':_0x5adb('0x1'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x5adb('0x2')](0xb),'unique':_0x5adb('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x5adb('0x4')],'defaultValue':_0x5adb('0x5')},'logo':{'type':Sequelize[_0x5adb('0x4')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x5adb('0x4')]},'defaultLoginLogo':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x5adb('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x5adb('0x4')]},'turnaddr':{'type':Sequelize[_0x5adb('0x4')]},'turnusername':{'type':Sequelize[_0x5adb('0x4')]},'turnpassword':{'type':Sequelize[_0x5adb('0x4')]},'pageTitle':{'type':Sequelize[_0x5adb('0x4')]},'defaultPageTitle':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x5adb('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize['STRING'],'defaultValue':_0x5adb('0x7')},'enableEmailPreview':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'split':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x5adb('0x4')],'defaultValue':'alternate'},'chatTimeout':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x5adb('0x4')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0x5adb('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x5adb('0x4')]},'defaultFavicon':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize[_0x5adb('0x2')]},'transcribeRegion':{'type':Sequelize[_0x5adb('0x4')]},'sentiment':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x5adb('0x2')]},'sentimentRegion':{'type':Sequelize[_0x5adb('0x4')]},'language':{'type':Sequelize['STRING']},'bucket':{'type':Sequelize[_0x5adb('0x4')]},'googleSsoEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize['INTEGER'](0x2)[_0x5adb('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x5adb('0x2')](0x2)[_0x5adb('0x8')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x5adb('0x2')](0x2)[_0x5adb('0x8')],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x5adb('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize[_0x5adb('0x2')],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x5adb('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 ab09fb9..f4c9232 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 _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 +var _0xcb4f=['code','Setting,\x20%s,\x20%s','message','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','stack','name','send','map','Setting','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','findAll','show','params','include','options','find','body','addLogo','file','filename','logo','addLogoLogin','loginLogo','getLogo','server/files/images/logos','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','join','root','toLower','default_logo.svg','upperFirst','existsSync','Sequelize','ValidationError','\x20not\x20found','download','getLogoLogin','default_loginLogo.svg','default','custom','gdpr','addPreferred','getLicense','default_preferred.png','addFavicon','getFavicon','default_favicon.ico','getDate','utcOffset','now','format','YYYY-MM-DD\x20HH:mm:ss:SSS','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','client','info','request\x20sent','stringify','error'];(function(_0x34145e,_0x689e31){var _0x27ed04=function(_0x297fc7){while(--_0x297fc7){_0x34145e['push'](_0x34145e['shift']());}};_0x27ed04(++_0x689e31);}(_0xcb4f,0x147));var _0xfcb4=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0xcb4f[_0x1e7b16];return _0x37fadc;};'use strict';var emlformat=require(_0xfcb4('0x0'));var rimraf=require(_0xfcb4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfcb4('0x2'));var rp=require(_0xfcb4('0x3'));var moment=require(_0xfcb4('0x4'));var BPromise=require(_0xfcb4('0x5'));var Mustache=require(_0xfcb4('0x6'));var util=require('util');var path=require(_0xfcb4('0x7'));var sox=require(_0xfcb4('0x8'));var csv=require(_0xfcb4('0x9'));var ejs=require(_0xfcb4('0xa'));var fs=require('fs');var fs_extra=require(_0xfcb4('0xb'));var _=require(_0xfcb4('0xc'));var squel=require(_0xfcb4('0xd'));var crypto=require('crypto');var jsforce=require(_0xfcb4('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xfcb4('0x9'));var querystring=require(_0xfcb4('0xf'));var Papa=require(_0xfcb4('0x10'));var Redis=require(_0xfcb4('0x11'));var authService=require(_0xfcb4('0x12'));var qs=require(_0xfcb4('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xfcb4('0x14'))(_0xfcb4('0x15'));var utils=require(_0xfcb4('0x16'));var config=require(_0xfcb4('0x17'));var licenseUtil=require(_0xfcb4('0x18'));var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var client=jayson[_0xfcb4('0x19')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1a07ea,_0x58af0a,_0x7899e3,_0x60dbbe){return new BPromise(function(_0x3caf19,_0x6a8350){var _0x311883=_0x60dbbe||client;return _0x311883['request'](_0x1a07ea,_0x7899e3)['then'](function(_0x5b3dd9){logger[_0xfcb4('0x1a')]('Setting,\x20%s,\x20%s',_0x58af0a,_0xfcb4('0x1b'));logger['debug']('Setting,\x20%s,\x20%s,\x20%s',_0x58af0a,_0xfcb4('0x1b'),JSON[_0xfcb4('0x1c')](_0x5b3dd9));if(_0x5b3dd9[_0xfcb4('0x1d')]){if(_0x5b3dd9['error'][_0xfcb4('0x1e')]===0x1f4){logger[_0xfcb4('0x1d')](_0xfcb4('0x1f'),_0x58af0a,_0x5b3dd9[_0xfcb4('0x1d')][_0xfcb4('0x20')]);return _0x6a8350(_0x5b3dd9['error'][_0xfcb4('0x20')]);}logger['error'](_0xfcb4('0x1f'),_0x58af0a,_0x5b3dd9[_0xfcb4('0x1d')]['message']);return _0x3caf19(_0x5b3dd9[_0xfcb4('0x1d')]['message']);}else{logger[_0xfcb4('0x1a')](_0xfcb4('0x1f'),_0x58af0a,'request\x20sent');_0x3caf19(_0x5b3dd9['result'][_0xfcb4('0x20')]);}})[_0xfcb4('0x21')](function(_0x56e6d4){logger[_0xfcb4('0x1d')]('Setting,\x20%s,\x20%s',_0x58af0a,_0x56e6d4);_0x6a8350(_0x56e6d4);});});}function respondWithStatusCode(_0xf5a712,_0x129947){_0x129947=_0x129947||0xcc;return function(_0x3ebaec){if(_0x3ebaec){return _0xf5a712[_0xfcb4('0x22')](_0x129947);}return _0xf5a712[_0xfcb4('0x23')](_0x129947)[_0xfcb4('0x24')]();};}function respondWithResult(_0x42d502,_0x7a2d68){_0x7a2d68=_0x7a2d68||0xc8;return function(_0x4c0224){if(_0x4c0224){return _0x42d502['status'](_0x7a2d68)[_0xfcb4('0x25')](_0x4c0224);}};}function respondWithFilteredResult(_0x777325,_0x546074){return function(_0x391bf1){if(_0x391bf1){var _0x4d6b23=typeof _0x546074[_0xfcb4('0x26')]===_0xfcb4('0x27')&&typeof _0x546074[_0xfcb4('0x28')]===_0xfcb4('0x27');var _0xd1ae15=_0x391bf1['count'];var _0x226476=_0x4d6b23?0x0:_0x546074[_0xfcb4('0x26')];var _0x566399=_0x4d6b23?_0x391bf1[_0xfcb4('0x29')]:_0x546074['offset']+_0x546074[_0xfcb4('0x28')];var _0x2522c5;if(_0x566399>=_0xd1ae15){_0x566399=_0xd1ae15;_0x2522c5=0xc8;}else{_0x2522c5=0xce;}_0x777325[_0xfcb4('0x23')](_0x2522c5);return _0x777325[_0xfcb4('0x2a')](_0xfcb4('0x2b'),_0x226476+'-'+_0x566399+'/'+_0xd1ae15)['json'](_0x391bf1);}return null;};}function patchUpdates(_0x7ce866){return function(_0x3e1482){try{jsonpatch[_0xfcb4('0x2c')](_0x3e1482,_0x7ce866,!![]);}catch(_0x28d268){return BPromise['reject'](_0x28d268);}return _0x3e1482[_0xfcb4('0x2d')]();};}function saveUpdates(_0x243a9f,_0x110373){return function(_0x57be4c){if(_0x57be4c){return _0x57be4c[_0xfcb4('0x2e')](_0x243a9f)[_0xfcb4('0x2f')](function(_0x42f511){return _0x42f511;});}return null;};}function removeEntity(_0x18677f,_0x573c57){return function(_0x3611eb){if(_0x3611eb){return _0x3611eb['destroy']()[_0xfcb4('0x2f')](function(){_0x18677f['status'](0xcc)[_0xfcb4('0x24')]();});}};}function handleEntityNotFound(_0x7eba57,_0x1ff4e2){return function(_0x15a009){if(!_0x15a009){_0x7eba57[_0xfcb4('0x22')](0x194);}return _0x15a009;};}function handleError(_0x3fb1c3,_0x30a7c6){_0x30a7c6=_0x30a7c6||0x1f4;return function(_0x318866){logger[_0xfcb4('0x1d')](_0x318866[_0xfcb4('0x30')]);if(_0x318866[_0xfcb4('0x31')]){delete _0x318866[_0xfcb4('0x31')];}_0x3fb1c3['status'](_0x30a7c6)[_0xfcb4('0x32')](_0x318866);};}exports['index']=function(_0x13f1c9,_0x67ebf9){var _0x30f2e9={},_0x39fd8f={},_0x148978={'count':0x0,'rows':[]};var _0x46db5a=_[_0xfcb4('0x33')](db[_0xfcb4('0x34')][_0xfcb4('0x35')],function(_0x20e87a){return{'name':_0x20e87a[_0xfcb4('0x36')],'type':_0x20e87a[_0xfcb4('0x37')][_0xfcb4('0x38')]};});_0x39fd8f[_0xfcb4('0x39')]=_[_0xfcb4('0x33')](_0x46db5a,_0xfcb4('0x31'));_0x39fd8f['query']=_[_0xfcb4('0x3a')](_0x13f1c9[_0xfcb4('0x3b')]);_0x39fd8f[_0xfcb4('0x3c')]=_[_0xfcb4('0x3d')](_0x39fd8f[_0xfcb4('0x39')],_0x39fd8f['query']);_0x30f2e9['attributes']=_[_0xfcb4('0x3d')](_0x39fd8f['model'],qs[_0xfcb4('0x3e')](_0x13f1c9[_0xfcb4('0x3b')][_0xfcb4('0x3e')]));_0x30f2e9[_0xfcb4('0x3f')]=_0x30f2e9[_0xfcb4('0x3f')]['length']?_0x30f2e9[_0xfcb4('0x3f')]:_0x39fd8f[_0xfcb4('0x39')];if(!_0x13f1c9[_0xfcb4('0x3b')]['hasOwnProperty']('nolimit')){_0x30f2e9[_0xfcb4('0x28')]=qs[_0xfcb4('0x28')](_0x13f1c9[_0xfcb4('0x3b')][_0xfcb4('0x28')]);_0x30f2e9['offset']=qs[_0xfcb4('0x26')](_0x13f1c9['query'][_0xfcb4('0x26')]);}_0x30f2e9[_0xfcb4('0x40')]=qs[_0xfcb4('0x41')](_0x13f1c9['query'][_0xfcb4('0x41')]);_0x30f2e9['where']=qs[_0xfcb4('0x3c')](_[_0xfcb4('0x42')](_0x13f1c9['query'],_0x39fd8f['filters']),_0x46db5a);if(_0x13f1c9[_0xfcb4('0x3b')][_0xfcb4('0x43')]){_0x30f2e9[_0xfcb4('0x44')]=_[_0xfcb4('0x45')](_0x30f2e9[_0xfcb4('0x44')],{'$or':_[_0xfcb4('0x33')](_0x46db5a,function(_0x3a9360){if(_0x3a9360[_0xfcb4('0x37')]!==_0xfcb4('0x46')){var _0x4f99a7={};_0x4f99a7[_0x3a9360[_0xfcb4('0x31')]]={'$like':'%'+_0x13f1c9[_0xfcb4('0x3b')][_0xfcb4('0x43')]+'%'};return _0x4f99a7;}})});}_0x30f2e9=_['merge']({},_0x30f2e9,_0x13f1c9['options']);var _0x184442={'where':_0x30f2e9[_0xfcb4('0x44')]};return db[_0xfcb4('0x34')]['count'](_0x184442)['then'](function(_0x1c5318){_0x148978['count']=_0x1c5318;if(_0x13f1c9[_0xfcb4('0x3b')][_0xfcb4('0x47')]){_0x30f2e9['include']=[{'all':!![]}];}return db[_0xfcb4('0x34')][_0xfcb4('0x48')](_0x30f2e9);})['then'](function(_0x591567){_0x148978['rows']=_0x591567;return _0x148978;})['then'](respondWithFilteredResult(_0x67ebf9,_0x30f2e9))[_0xfcb4('0x21')](handleError(_0x67ebf9,null));};exports[_0xfcb4('0x49')]=function(_0x74d161,_0x3a0fe6){var _0x4683da={'raw':![],'where':{'id':_0x74d161[_0xfcb4('0x4a')]['id']}},_0xa2d6c6={};_0xa2d6c6['model']=_['keys'](db['Setting']['rawAttributes']);_0xa2d6c6[_0xfcb4('0x3b')]=_[_0xfcb4('0x3a')](_0x74d161[_0xfcb4('0x3b')]);_0xa2d6c6['filters']=_[_0xfcb4('0x3d')](_0xa2d6c6[_0xfcb4('0x39')],_0xa2d6c6[_0xfcb4('0x3b')]);_0x4683da[_0xfcb4('0x3f')]=_['intersection'](_0xa2d6c6[_0xfcb4('0x39')],qs[_0xfcb4('0x3e')](_0x74d161['query']['fields']));_0x4683da['attributes']=_0x4683da['attributes']['length']?_0x4683da[_0xfcb4('0x3f')]:_0xa2d6c6[_0xfcb4('0x39')];if(_0x74d161[_0xfcb4('0x3b')][_0xfcb4('0x47')]){_0x4683da[_0xfcb4('0x4b')]=[{'all':!![]}];}_0x4683da=_[_0xfcb4('0x45')]({},_0x4683da,_0x74d161[_0xfcb4('0x4c')]);return db[_0xfcb4('0x34')][_0xfcb4('0x4d')](_0x4683da)[_0xfcb4('0x2f')](handleEntityNotFound(_0x3a0fe6,null))[_0xfcb4('0x2f')](respondWithResult(_0x3a0fe6,null))[_0xfcb4('0x21')](handleError(_0x3a0fe6,null));};exports[_0xfcb4('0x2e')]=function(_0x264fe1,_0x4d3683){if(_0x264fe1[_0xfcb4('0x4e')]['id']){delete _0x264fe1[_0xfcb4('0x4e')]['id'];}return db[_0xfcb4('0x34')]['find']({'where':{'id':_0x264fe1['params']['id']}})[_0xfcb4('0x2f')](handleEntityNotFound(_0x4d3683,null))[_0xfcb4('0x2f')](saveUpdates(_0x264fe1[_0xfcb4('0x4e')],null))[_0xfcb4('0x2f')](respondWithResult(_0x4d3683,null))[_0xfcb4('0x21')](handleError(_0x4d3683,null));};exports[_0xfcb4('0x4f')]=function(_0x59e11e,_0x55aab0,_0x4fc0ef){if(_0x59e11e[_0xfcb4('0x50')]&&_0x59e11e[_0xfcb4('0x50')][_0xfcb4('0x51')]){_0x59e11e[_0xfcb4('0x4e')][_0xfcb4('0x52')]=_0x59e11e['file']['filename'];}return db[_0xfcb4('0x34')]['find']({'where':{'id':_0x59e11e[_0xfcb4('0x4a')]['id']}})['then'](handleEntityNotFound(_0x55aab0,null))['then'](saveUpdates(_0x59e11e[_0xfcb4('0x4e')],null))['then'](respondWithResult(_0x55aab0,null))[_0xfcb4('0x21')](handleError(_0x55aab0,null));};exports[_0xfcb4('0x53')]=function(_0x699b11,_0x2a3d31,_0x56bd68){if(_0x699b11[_0xfcb4('0x50')]&&_0x699b11[_0xfcb4('0x50')]['filename']){_0x699b11[_0xfcb4('0x4e')][_0xfcb4('0x54')]=_0x699b11[_0xfcb4('0x50')]['filename'];}return db['Setting'][_0xfcb4('0x4d')]({'where':{'id':_0x699b11[_0xfcb4('0x4a')]['id']}})[_0xfcb4('0x2f')](handleEntityNotFound(_0x2a3d31,null))['then'](saveUpdates(_0x699b11[_0xfcb4('0x4e')],null))['then'](respondWithResult(_0x2a3d31,null))['catch'](handleError(_0x2a3d31,null));};var utilLicense=require('../../config/license/util');exports[_0xfcb4('0x55')]=function(_0xfa4f76,_0xbec23a,_0x4f2bc6){var _0x2f9df5=_0xfcb4('0x56');var _0x587a85={'custom':![]};return utilLicense['getLicense']()['then'](function(_0x2ae9f4){if(_0x2ae9f4){_0x587a85=_0x2ae9f4;}return db[_0xfcb4('0x34')][_0xfcb4('0x4d')]({'where':{'id':_0xfa4f76[_0xfcb4('0x4a')]['id']},'attributes':[_0xfcb4('0x52'),_0xfcb4('0x54'),_0xfcb4('0x57'),_0xfcb4('0x58'),_0xfcb4('0x59'),_0xfcb4('0x5a'),_0xfcb4('0x5b'),_0xfcb4('0x5c')],'raw':!![]});})['then'](handleEntityNotFound(_0xbec23a,null))[_0xfcb4('0x2f')](function(_0x4b5c8e){if(_0x4b5c8e){var _0x580d9a=_0x4b5c8e['logo']&&fs['existsSync'](path[_0xfcb4('0x5d')](config[_0xfcb4('0x5e')],_0x2f9df5,_['toLower'](_0x4b5c8e[_0xfcb4('0x52')])))?path[_0xfcb4('0x5d')](config[_0xfcb4('0x5e')],_0x2f9df5,_['toLower'](_0x4b5c8e[_0xfcb4('0x52')])):path['join'](config[_0xfcb4('0x5e')],_0x2f9df5,_[_0xfcb4('0x5f')](_0xfcb4('0x60')));var _0x954c6a='default'+_[_0xfcb4('0x61')](_0xfcb4('0x52'));if(_0x4b5c8e[_0x954c6a]||!_0x587a85['custom']){_0x580d9a=path['join'](config[_0xfcb4('0x5e')],_0x2f9df5,_['toLower']('default_logo.svg'));}if(!fs[_0xfcb4('0x62')](_0x580d9a)){throw new db[(_0xfcb4('0x63'))][(_0xfcb4('0x64'))](_[_0xfcb4('0x61')](_0xfcb4('0x52'))+_0xfcb4('0x65'));}return _0xbec23a[_0xfcb4('0x66')](_0x580d9a);}})[_0xfcb4('0x21')](handleError(_0xbec23a,null));};var utilLicense=require('../../config/license/util');exports[_0xfcb4('0x67')]=function(_0x33a7ae,_0x5a4ed3,_0x26c9cc){var _0x854ac1=_0xfcb4('0x56');var _0x3be177={'custom':![]};return utilLicense['getLicense']()[_0xfcb4('0x2f')](function(_0x4cff5e){if(_0x4cff5e){_0x3be177=_0x4cff5e;}return db[_0xfcb4('0x34')][_0xfcb4('0x4d')]({'where':{'id':_0x33a7ae[_0xfcb4('0x4a')]['id']},'attributes':[_0xfcb4('0x52'),'loginLogo',_0xfcb4('0x57'),_0xfcb4('0x58'),'defaultLogo',_0xfcb4('0x5a'),_0xfcb4('0x5b'),_0xfcb4('0x5c')],'raw':!![]});})['then'](handleEntityNotFound(_0x5a4ed3,null))[_0xfcb4('0x2f')](function(_0x44228f){if(_0x44228f){var _0x384366=_0x44228f[_0xfcb4('0x54')]&&fs[_0xfcb4('0x62')](path[_0xfcb4('0x5d')](config['root'],_0x854ac1,_[_0xfcb4('0x5f')](_0x44228f[_0xfcb4('0x54')])))?path['join'](config[_0xfcb4('0x5e')],_0x854ac1,_[_0xfcb4('0x5f')](_0x44228f[_0xfcb4('0x54')])):path['join'](config['root'],_0x854ac1,_[_0xfcb4('0x5f')](_0xfcb4('0x68')));var _0x57b9ab=_0xfcb4('0x69')+_[_0xfcb4('0x61')](_0xfcb4('0x54'));if(_0x44228f[_0x57b9ab]||!_0x3be177[_0xfcb4('0x6a')]){_0x384366=path[_0xfcb4('0x5d')](config['root'],_0x854ac1,_['toLower'](_0xfcb4('0x68')));}if(!fs['existsSync'](_0x384366)){throw new db[(_0xfcb4('0x63'))][(_0xfcb4('0x64'))](_[_0xfcb4('0x61')](_0xfcb4('0x54'))+_0xfcb4('0x65'));}return _0x5a4ed3['download'](_0x384366);}})['catch'](handleError(_0x5a4ed3,null));};exports[_0xfcb4('0x6b')]=function(_0x10084c,_0xe51d27){return db[_0xfcb4('0x34')][_0xfcb4('0x4d')]({'where':{'id':_0x10084c[_0xfcb4('0x4a')]['id']},'attributes':['securePassword']})[_0xfcb4('0x2f')](respondWithResult(_0xe51d27,null))[_0xfcb4('0x21')](handleError(_0xe51d27,null));};exports[_0xfcb4('0x6c')]=function(_0x56f746,_0x39b345,_0x2d8662){if(_0x56f746[_0xfcb4('0x50')]&&_0x56f746['file'][_0xfcb4('0x51')]){_0x56f746['body'][_0xfcb4('0x57')]=_0x56f746[_0xfcb4('0x50')]['filename'];}return db['Setting'][_0xfcb4('0x4d')]({'where':{'id':_0x56f746[_0xfcb4('0x4a')]['id']}})[_0xfcb4('0x2f')](handleEntityNotFound(_0x39b345,null))[_0xfcb4('0x2f')](saveUpdates(_0x56f746[_0xfcb4('0x4e')],null))[_0xfcb4('0x2f')](respondWithResult(_0x39b345,null))[_0xfcb4('0x21')](handleError(_0x39b345,null));};var utilLicense=require(_0xfcb4('0x18'));exports['getPreferred']=function(_0x508dbd,_0x4562e5,_0x2467e4){var _0x516269='server/files/images/logos';var _0x3a0af5={'custom':![]};return utilLicense[_0xfcb4('0x6d')]()[_0xfcb4('0x2f')](function(_0x11986a){if(_0x11986a){_0x3a0af5=_0x11986a;}return db[_0xfcb4('0x34')]['find']({'where':{'id':_0x508dbd[_0xfcb4('0x4a')]['id']},'attributes':[_0xfcb4('0x52'),'loginLogo',_0xfcb4('0x57'),_0xfcb4('0x58'),'defaultLogo',_0xfcb4('0x5a'),_0xfcb4('0x5b'),'defaultFavicon'],'raw':!![]});})[_0xfcb4('0x2f')](handleEntityNotFound(_0x4562e5,null))[_0xfcb4('0x2f')](function(_0x365977){if(_0x365977){var _0x1706e3=_0x365977[_0xfcb4('0x57')]&&fs[_0xfcb4('0x62')](path['join'](config[_0xfcb4('0x5e')],_0x516269,_[_0xfcb4('0x5f')](_0x365977[_0xfcb4('0x57')])))?path[_0xfcb4('0x5d')](config['root'],_0x516269,_['toLower'](_0x365977[_0xfcb4('0x57')])):path[_0xfcb4('0x5d')](config['root'],_0x516269,_[_0xfcb4('0x5f')](_0xfcb4('0x6e')));var _0x1965c6=_0xfcb4('0x69')+_['upperFirst'](_0xfcb4('0x57'));if(_0x365977[_0x1965c6]||!_0x3a0af5[_0xfcb4('0x6a')]||!_0x3a0af5[_0xfcb4('0x57')]){_0x1706e3=path['join'](config[_0xfcb4('0x5e')],_0x516269,_['toLower']('default_preferred.png'));}if(!fs[_0xfcb4('0x62')](_0x1706e3)){throw new db[(_0xfcb4('0x63'))]['ValidationError'](_['upperFirst'](_0xfcb4('0x57'))+'\x20not\x20found');}return _0x4562e5['download'](_0x1706e3);}})[_0xfcb4('0x21')](handleError(_0x4562e5,null));};exports[_0xfcb4('0x6f')]=function(_0x4bd434,_0x1a9138,_0x15f80c){if(_0x4bd434[_0xfcb4('0x50')]&&_0x4bd434[_0xfcb4('0x50')][_0xfcb4('0x51')]){_0x4bd434[_0xfcb4('0x4e')][_0xfcb4('0x58')]=_0x4bd434[_0xfcb4('0x50')]['filename'];}return db[_0xfcb4('0x34')][_0xfcb4('0x4d')]({'where':{'id':_0x4bd434[_0xfcb4('0x4a')]['id']}})['then'](handleEntityNotFound(_0x1a9138,null))[_0xfcb4('0x2f')](saveUpdates(_0x4bd434['body'],null))['then'](respondWithResult(_0x1a9138,null))['catch'](handleError(_0x1a9138,null));};var utilLicense=require(_0xfcb4('0x18'));exports[_0xfcb4('0x70')]=function(_0x34c898,_0x8652ba,_0x740f05){var _0x5c5f0e=_0xfcb4('0x56');var _0x17df71={'custom':![]};return utilLicense['getLicense']()['then'](function(_0x4584d0){if(_0x4584d0){_0x17df71=_0x4584d0;}return db[_0xfcb4('0x34')][_0xfcb4('0x4d')]({'where':{'id':_0x34c898[_0xfcb4('0x4a')]['id']},'attributes':[_0xfcb4('0x52'),_0xfcb4('0x54'),_0xfcb4('0x57'),_0xfcb4('0x58'),_0xfcb4('0x59'),_0xfcb4('0x5a'),_0xfcb4('0x5b'),_0xfcb4('0x5c')],'raw':!![]});})['then'](handleEntityNotFound(_0x8652ba,null))[_0xfcb4('0x2f')](function(_0x96eb4b){if(_0x96eb4b){var _0x2fc81c=_0x96eb4b[_0xfcb4('0x58')]&&fs[_0xfcb4('0x62')](path[_0xfcb4('0x5d')](config['root'],_0x5c5f0e,_[_0xfcb4('0x5f')](_0x96eb4b[_0xfcb4('0x58')])))?path[_0xfcb4('0x5d')](config['root'],_0x5c5f0e,_['toLower'](_0x96eb4b['favicon'])):path[_0xfcb4('0x5d')](config[_0xfcb4('0x5e')],_0x5c5f0e,_[_0xfcb4('0x5f')](_0xfcb4('0x71')));var _0x2317f0=_0xfcb4('0x69')+_[_0xfcb4('0x61')]('favicon');if(_0x96eb4b[_0x2317f0]||!_0x17df71[_0xfcb4('0x6a')]){_0x2fc81c=path[_0xfcb4('0x5d')](config[_0xfcb4('0x5e')],_0x5c5f0e,_[_0xfcb4('0x5f')](_0xfcb4('0x71')));}if(!fs[_0xfcb4('0x62')](_0x2fc81c)){throw new db[(_0xfcb4('0x63'))]['ValidationError'](_[_0xfcb4('0x61')](_0xfcb4('0x58'))+_0xfcb4('0x65'));}return _0x8652ba['download'](_0x2fc81c);}})[_0xfcb4('0x21')](handleError(_0x8652ba,null));};exports[_0xfcb4('0x72')]=function(_0x4bc437,_0x150994){var _0x16203b={'offset':moment()[_0xfcb4('0x73')]()};_0x16203b[_0xfcb4('0x74')]=moment()[_0xfcb4('0x73')](_0x16203b[_0xfcb4('0x26')])[_0xfcb4('0x75')](_0xfcb4('0x76'));return _0x150994[_0xfcb4('0x23')](0xc8)[_0xfcb4('0x32')](_0x16203b);}; \ No newline at end of file diff --git a/server/api/setting/setting.model.js b/server/api/setting/setting.model.js index c6deda9..d78c288 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 _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 +var _0xe14b=['bluebird','path','./setting.attributes','exports','define','Setting','settings','lodash','util','moment'];(function(_0x3d629a,_0x6bc605){var _0x2c4e45=function(_0x2ea792){while(--_0x2ea792){_0x3d629a['push'](_0x3d629a['shift']());}};_0x2c4e45(++_0x6bc605);}(_0xe14b,0x93));var _0xbe14=function(_0x2ab0fb,_0x263734){_0x2ab0fb=_0x2ab0fb-0x0;var _0x179860=_0xe14b[_0x2ab0fb];return _0x179860;};'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 diff --git a/server/api/setting/setting.rpc.js b/server/api/setting/setting.rpc.js index eb3979e..df10965 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 _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 +var _0x3539=['ShowSetting','find','options','raw','attributes','include','map','model','debug','stringify','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','Setting,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','Setting,\x20%s,\x20%s','message','catch'];(function(_0x243217,_0x522951){var _0x478029=function(_0x18d053){while(--_0x18d053){_0x243217['push'](_0x243217['shift']());}};_0x478029(++_0x522951);}(_0x3539,0x1ea));var _0x9353=function(_0x55b67a,_0x5348ce){_0x55b67a=_0x55b67a-0x0;var _0x636d97=_0x3539[_0x55b67a];return _0x636d97;};'use strict';var _=require('lodash');var util=require(_0x9353('0x0'));var moment=require(_0x9353('0x1'));var BPromise=require(_0x9353('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9353('0x3'));var db=require(_0x9353('0x4'))['db'];var utils=require(_0x9353('0x5'));var logger=require('../../config/logger')(_0x9353('0x6'));var config=require(_0x9353('0x7'));var jayson=require(_0x9353('0x8'));var client=jayson['client'][_0x9353('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1f1520,_0x1d0656,_0x263396){return new BPromise(function(_0x5789b9,_0x160c14){return client[_0x9353('0xa')](_0x1f1520,_0x263396)[_0x9353('0xb')](function(_0x458304){logger[_0x9353('0xc')]('Setting,\x20%s,\x20%s',_0x1d0656,'request\x20sent');logger['debug'](_0x9353('0xd'),_0x1d0656,_0x9353('0xe'),JSON['stringify'](_0x458304));if(_0x458304[_0x9353('0xf')]){if(_0x458304[_0x9353('0xf')][_0x9353('0x10')]===0x1f4){logger[_0x9353('0xf')](_0x9353('0x11'),_0x1d0656,_0x458304['error'][_0x9353('0x12')]);return _0x160c14(_0x458304[_0x9353('0xf')][_0x9353('0x12')]);}logger[_0x9353('0xf')](_0x9353('0x11'),_0x1d0656,_0x458304['error'][_0x9353('0x12')]);return _0x5789b9(_0x458304[_0x9353('0xf')][_0x9353('0x12')]);}else{logger[_0x9353('0xc')](_0x9353('0x11'),_0x1d0656,_0x9353('0xe'));_0x5789b9(_0x458304['result'][_0x9353('0x12')]);}})[_0x9353('0x13')](function(_0x2dd03a){logger['error'](_0x9353('0x11'),_0x1d0656,_0x2dd03a);_0x160c14(_0x2dd03a);});});}exports[_0x9353('0x14')]=function(_0x27e6fd){var _0x5e2706=this;return new Promise(function(_0x3deffd,_0x51933c){return db['Setting'][_0x9353('0x15')]({'raw':_0x27e6fd[_0x9353('0x16')]?_0x27e6fd[_0x9353('0x16')][_0x9353('0x17')]===undefined?!![]:![]:!![],'where':_0x27e6fd['options']?_0x27e6fd['options']['where']||null:null,'attributes':_0x27e6fd[_0x9353('0x16')]?_0x27e6fd[_0x9353('0x16')][_0x9353('0x18')]||null:null,'include':_0x27e6fd[_0x9353('0x16')]?_0x27e6fd[_0x9353('0x16')][_0x9353('0x19')]?_[_0x9353('0x1a')](_0x27e6fd[_0x9353('0x16')][_0x9353('0x19')],function(_0x54053d){return{'model':db[_0x54053d[_0x9353('0x1b')]],'as':_0x54053d['as'],'attributes':_0x54053d[_0x9353('0x18')],'include':_0x54053d[_0x9353('0x19')]?_[_0x9353('0x1a')](_0x54053d[_0x9353('0x19')],function(_0xbe6bd8){return{'model':db[_0xbe6bd8[_0x9353('0x1b')]],'as':_0xbe6bd8['as'],'attributes':_0xbe6bd8[_0x9353('0x18')],'include':_0xbe6bd8['include']?_[_0x9353('0x1a')](_0xbe6bd8[_0x9353('0x19')],function(_0x452909){return{'model':db[_0x452909[_0x9353('0x1b')]],'as':_0x452909['as'],'attributes':_0x452909[_0x9353('0x18')]};}):[]};}):[]};}):[]:[]})[_0x9353('0xb')](function(_0x4390c4){logger[_0x9353('0xc')](_0x9353('0x14'),_0x27e6fd);logger[_0x9353('0x1c')](_0x9353('0x14'),_0x27e6fd,JSON[_0x9353('0x1d')](_0x4390c4));_0x3deffd(_0x4390c4);})[_0x9353('0x13')](function(_0x3126a3){logger['error']('ShowSetting',_0x3126a3[_0x9353('0x12')],_0x27e6fd);_0x51933c(_0x5e2706[_0x9353('0xf')](0x1f4,_0x3126a3[_0x9353('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/index.js b/server/api/smsAccount/index.js index 5683fd0..4d64239 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 _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 +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(_0x37176a,_0x6a3d95){var _0x8058a=function(_0x487d7f){while(--_0x487d7f){_0x37176a['push'](_0x37176a['shift']());}};_0x8058a(++_0x6a3d95);}(_0x9957,0x93));var _0x7995=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x9957[_0x1ac595];return _0x455fff;};'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 diff --git a/server/api/smsAccount/smsAccount.attributes.js b/server/api/smsAccount/smsAccount.attributes.js index e549e80..13df4a1 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 _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 +var _0xc327=['plivo','clickatell','bandwidth','csc','infobip','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','setDataValue','mandatoryDisposition','sequelize','randomstring','exports','STRING','name'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xc327,0x182));var _0x7c32=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0xc327[_0x126558];return _0x1f6d14;};'use strict';var Sequelize=require(_0x7c32('0x0'));var rs=require(_0x7c32('0x1'));module[_0x7c32('0x2')]={'name':{'type':Sequelize[_0x7c32('0x3')],'unique':_0x7c32('0x4'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize[_0x7c32('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x7c32('0x3')],'defaultValue':function(){return rs['generate']();}},'phone':{'type':Sequelize[_0x7c32('0x3')]},'type':{'type':Sequelize['ENUM']('twilio','skebby','connectel','clicksend',_0x7c32('0x5'),_0x7c32('0x6'),_0x7c32('0x7'),_0x7c32('0x8'),_0x7c32('0x9'),'intelepeer')},'accountSid':{'type':Sequelize[_0x7c32('0x3')]},'authId':{'type':Sequelize[_0x7c32('0x3')]},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize['ENUM']('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x7c32('0x3')]},'apiKey':{'type':Sequelize[_0x7c32('0x3')]},'applicationId':{'type':Sequelize[_0x7c32('0x3')]},'accountId':{'type':Sequelize[_0x7c32('0x3')]},'senderString':{'type':Sequelize['STRING']},'deliveryReport':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':![]},'description':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x7c32('0xb')],'defaultValue':function(){return _0x7c32('0xc');}},'notificationSound':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x7c32('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x7c32('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x7c32('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':_0x7c32('0xe')},'mandatoryDisposition':{'type':Sequelize[_0x7c32('0xa')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x5067e3){if(!_0x5067e3)this[_0x7c32('0xf')]('mandatoryDispositionPauseId',null);this[_0x7c32('0xf')](_0x7c32('0x10'),_0x5067e3);}}}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.controller.js b/server/api/smsAccount/smsAccount.controller.js index ae4c900..b57d3aa 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 _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 +var _0x95a4=['includeAll','include','findAll','rows','show','params','Pause','find','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','SmsAccounts','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','SmsAccountId','Disposition','findOne','nolimit','removeDispositions','ids','CannedAnswer','getAnswers','removeAnswers','notify','SmsApplication','Applications','applications','orderBy','priority','asc','account','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','createdAt','difference','updatedAt','CompanyId','ListId','mobile','twilio','from','From','Body','messageId','MessageSid','text','connectel','clicksend','plivo','Text','MessageUUID','results','csc','originatingAddress','segmentedMessage','replyMessageId','bandwidth','intelepeer','refid','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','SmsInteraction','spread','interaction','created','push','close','unmanaged','*,*,*,*','ContactId','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','Start','startRouting','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','Content-Type','text/xml','\x0a','addApplications','sequelize','bulkCreate','getApplications','getInteractions','Contact','Owner','fullname','internal','Tags','color','tag','to\x20is\x20mandatory','DESC','get','List','out','SmsMessage','Messages','dataValues','received\x20delivery\x20report\x20from','inspect','skebby','skebby_dispatch_id','requestid','statusInt','message_id','status_code','groupName','DELIVERED','clickatell','redif','infobip','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','message-delivered','DELIVRD','statusGet','message-id','state','omit','isArray','emit','userSmsAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../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','./smsAccount.socket','register','jayson/promise','client','http','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','UserProfileResource','destroy','stack','name','send','index','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','VIRTUAL','merge','options'];(function(_0x202925,_0x21f58e){var _0x439825=function(_0x2318f4){while(--_0x2318f4){_0x202925['push'](_0x202925['shift']());}};_0x439825(++_0x21f58e);}(_0x95a4,0x8d));var _0x495a=function(_0x42f038,_0x23123e){_0x42f038=_0x42f038-0x0;var _0x26a5ef=_0x95a4[_0x42f038];return _0x26a5ef;};'use strict';var emlformat=require(_0x495a('0x0'));var rimraf=require(_0x495a('0x1'));var zipdir=require(_0x495a('0x2'));var jsonpatch=require(_0x495a('0x3'));var rp=require(_0x495a('0x4'));var moment=require(_0x495a('0x5'));var BPromise=require(_0x495a('0x6'));var Mustache=require(_0x495a('0x7'));var util=require(_0x495a('0x8'));var path=require(_0x495a('0x9'));var sox=require(_0x495a('0xa'));var csv=require(_0x495a('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x495a('0xc'));var _=require(_0x495a('0xd'));var squel=require(_0x495a('0xe'));var crypto=require(_0x495a('0xf'));var jsforce=require(_0x495a('0x10'));var deskjs=require(_0x495a('0x11'));var toCsv=require(_0x495a('0xb'));var querystring=require(_0x495a('0x12'));var Papa=require(_0x495a('0x13'));var Redis=require('ioredis');var authService=require(_0x495a('0x14'));var qs=require(_0x495a('0x15'));var as=require(_0x495a('0x16'));var hardwareService=require(_0x495a('0x17'));var logger=require(_0x495a('0x18'))(_0x495a('0x19'));var utils=require(_0x495a('0x1a'));var config=require('../../config/environment');var licenseUtil=require(_0x495a('0x1b'));var db=require(_0x495a('0x1c'))['db'];config[_0x495a('0x1d')]=_[_0x495a('0x1e')](config['redis'],{'host':_0x495a('0x1f'),'port':0x18eb});var socket=require(_0x495a('0x20'))(new Redis(config[_0x495a('0x1d')]));require(_0x495a('0x21'))[_0x495a('0x22')](socket);var jayson=require(_0x495a('0x23'));var client=jayson[_0x495a('0x24')][_0x495a('0x25')]({'port':0x232c});function respondWithRpcPromise(_0x539d98,_0x3d4c67,_0x5c7e9e,_0x363cac){return new BPromise(function(_0x7e182d,_0x27e825){var _0x3be935=_0x363cac||client;return _0x3be935[_0x495a('0x26')](_0x539d98,_0x5c7e9e)[_0x495a('0x27')](function(_0x1f7377){logger[_0x495a('0x28')](_0x495a('0x29'),_0x3d4c67,_0x495a('0x2a'));logger[_0x495a('0x2b')](_0x495a('0x2c'),_0x3d4c67,_0x495a('0x2a'),JSON['stringify'](_0x1f7377));if(_0x1f7377['error']){if(_0x1f7377[_0x495a('0x2d')][_0x495a('0x2e')]===0x1f4){logger[_0x495a('0x2d')](_0x495a('0x29'),_0x3d4c67,_0x1f7377['error'][_0x495a('0x2f')]);return _0x27e825(_0x1f7377[_0x495a('0x2d')][_0x495a('0x2f')]);}logger['error'](_0x495a('0x29'),_0x3d4c67,_0x1f7377[_0x495a('0x2d')][_0x495a('0x2f')]);return _0x7e182d(_0x1f7377[_0x495a('0x2d')][_0x495a('0x2f')]);}else{logger[_0x495a('0x28')](_0x495a('0x29'),_0x3d4c67,_0x495a('0x2a'));_0x7e182d(_0x1f7377[_0x495a('0x30')][_0x495a('0x2f')]);}})[_0x495a('0x31')](function(_0x2191d8){logger[_0x495a('0x2d')](_0x495a('0x29'),_0x3d4c67,_0x2191d8);_0x27e825(_0x2191d8);});});}function respondWithStatusCode(_0x1026b7,_0x51d535){_0x51d535=_0x51d535||0xcc;return function(_0x5b26da){if(_0x5b26da){return _0x1026b7[_0x495a('0x32')](_0x51d535);}return _0x1026b7[_0x495a('0x33')](_0x51d535)[_0x495a('0x34')]();};}function respondWithResult(_0x36112e,_0x4d7269){_0x4d7269=_0x4d7269||0xc8;return function(_0x54e2a4){if(_0x54e2a4){return _0x36112e[_0x495a('0x33')](_0x4d7269)[_0x495a('0x35')](_0x54e2a4);}};}function respondWithFilteredResult(_0x51b5f5,_0x2fad79){return function(_0x803021){if(_0x803021){var _0x4beaf4=typeof _0x2fad79[_0x495a('0x36')]==='undefined'&&typeof _0x2fad79[_0x495a('0x37')]===_0x495a('0x38');var _0x28186b=_0x803021['count'];var _0x4fd1d1=_0x4beaf4?0x0:_0x2fad79[_0x495a('0x36')];var _0x5f480d=_0x4beaf4?_0x803021[_0x495a('0x39')]:_0x2fad79[_0x495a('0x36')]+_0x2fad79[_0x495a('0x37')];var _0xad6f46;if(_0x5f480d>=_0x28186b){_0x5f480d=_0x28186b;_0xad6f46=0xc8;}else{_0xad6f46=0xce;}_0x51b5f5['status'](_0xad6f46);return _0x51b5f5[_0x495a('0x3a')](_0x495a('0x3b'),_0x4fd1d1+'-'+_0x5f480d+'/'+_0x28186b)[_0x495a('0x35')](_0x803021);}return null;};}function patchUpdates(_0x4eeca5){return function(_0x380b1f){try{jsonpatch['apply'](_0x380b1f,_0x4eeca5,!![]);}catch(_0x3b6986){return BPromise[_0x495a('0x3c')](_0x3b6986);}return _0x380b1f[_0x495a('0x3d')]();};}function saveUpdates(_0x562cee,_0x5b6a1c){return function(_0x51c6ab){if(_0x51c6ab){return _0x51c6ab[_0x495a('0x3e')](_0x562cee)['then'](function(_0x33b462){return _0x33b462;});}return null;};}function removeEntity(_0x45461e,_0x346d38){return function(_0x4f487d){if(_0x4f487d){return _0x4f487d['destroy']()[_0x495a('0x27')](function(){var _0x5e8813=_0x4f487d['get']({'plain':!![]});var _0x110bde='SmsAccounts';return db[_0x495a('0x3f')][_0x495a('0x40')]({'where':{'type':_0x110bde,'resourceId':_0x5e8813['id']}})['then'](function(){return _0x4f487d;});})['then'](function(){_0x45461e[_0x495a('0x33')](0xcc)['end']();});}};}function handleEntityNotFound(_0x522158,_0x398b58){return function(_0x20545f){if(!_0x20545f){_0x522158[_0x495a('0x32')](0x194);}return _0x20545f;};}function handleError(_0x26ba5a,_0x2a0507){_0x2a0507=_0x2a0507||0x1f4;return function(_0x50ddf3){logger[_0x495a('0x2d')](_0x50ddf3[_0x495a('0x41')]);if(_0x50ddf3[_0x495a('0x42')]){delete _0x50ddf3['name'];}_0x26ba5a[_0x495a('0x33')](_0x2a0507)[_0x495a('0x43')](_0x50ddf3);};}exports[_0x495a('0x44')]=function(_0x793eca,_0xc1a7f){var _0x3e6cf4={'include':[{'model':db['Pause'],'as':_0x495a('0x45')}]},_0x3eeb63={},_0x47f5ee={'count':0x0,'rows':[]};var _0x18ad1f=_[_0x495a('0x46')](db[_0x495a('0x47')][_0x495a('0x48')],function(_0x3a1356){return{'name':_0x3a1356[_0x495a('0x49')],'type':_0x3a1356[_0x495a('0x4a')][_0x495a('0x4b')]};});_0x3eeb63[_0x495a('0x4c')]=_[_0x495a('0x46')](_0x18ad1f,_0x495a('0x42'));_0x3eeb63[_0x495a('0x4d')]=_[_0x495a('0x4e')](_0x793eca['query']);_0x3eeb63[_0x495a('0x4f')]=_[_0x495a('0x50')](_0x3eeb63[_0x495a('0x4c')],_0x3eeb63['query']);_0x3e6cf4[_0x495a('0x51')]=_['intersection'](_0x3eeb63[_0x495a('0x4c')],qs[_0x495a('0x52')](_0x793eca[_0x495a('0x4d')]['fields']));_0x3e6cf4[_0x495a('0x51')]=_0x3e6cf4[_0x495a('0x51')][_0x495a('0x53')]?_0x3e6cf4[_0x495a('0x51')]:_0x3eeb63[_0x495a('0x4c')];if(!_0x793eca[_0x495a('0x4d')][_0x495a('0x54')]('nolimit')){_0x3e6cf4[_0x495a('0x37')]=qs[_0x495a('0x37')](_0x793eca[_0x495a('0x4d')]['limit']);_0x3e6cf4[_0x495a('0x36')]=qs[_0x495a('0x36')](_0x793eca['query'][_0x495a('0x36')]);}_0x3e6cf4[_0x495a('0x55')]=qs[_0x495a('0x56')](_0x793eca[_0x495a('0x4d')][_0x495a('0x56')]);_0x3e6cf4['where']=qs[_0x495a('0x4f')](_[_0x495a('0x57')](_0x793eca['query'],_0x3eeb63[_0x495a('0x4f')]),_0x18ad1f);if(_0x793eca[_0x495a('0x4d')][_0x495a('0x58')]){_0x3e6cf4[_0x495a('0x59')]=_['merge'](_0x3e6cf4[_0x495a('0x59')],{'$or':_[_0x495a('0x46')](_0x18ad1f,function(_0x1e0b77){if(_0x1e0b77[_0x495a('0x4a')]!==_0x495a('0x5a')){var _0x57cfbe={};_0x57cfbe[_0x1e0b77[_0x495a('0x42')]]={'$like':'%'+_0x793eca[_0x495a('0x4d')][_0x495a('0x58')]+'%'};return _0x57cfbe;}})});}_0x3e6cf4=_[_0x495a('0x5b')]({},_0x3e6cf4,_0x793eca[_0x495a('0x5c')]);var _0x4053f7={'where':_0x3e6cf4[_0x495a('0x59')]};return db[_0x495a('0x47')]['count'](_0x4053f7)[_0x495a('0x27')](function(_0x2e05ba){_0x47f5ee[_0x495a('0x39')]=_0x2e05ba;if(_0x793eca['query'][_0x495a('0x5d')]){_0x3e6cf4[_0x495a('0x5e')]=[{'all':!![]}];}return db[_0x495a('0x47')][_0x495a('0x5f')](_0x3e6cf4);})[_0x495a('0x27')](function(_0x5da619){_0x47f5ee[_0x495a('0x60')]=_0x5da619;return _0x47f5ee;})[_0x495a('0x27')](respondWithFilteredResult(_0xc1a7f,_0x3e6cf4))[_0x495a('0x31')](handleError(_0xc1a7f,null));};exports[_0x495a('0x61')]=function(_0x3d19d4,_0x272b1e){var _0xb8ff29={'raw':![],'where':{'id':_0x3d19d4[_0x495a('0x62')]['id']},'include':[{'model':db[_0x495a('0x63')],'as':'mandatoryDispositionPause'}]},_0x42d788={};_0x42d788[_0x495a('0x4c')]=_[_0x495a('0x4e')](db[_0x495a('0x47')][_0x495a('0x48')]);_0x42d788[_0x495a('0x4d')]=_[_0x495a('0x4e')](_0x3d19d4[_0x495a('0x4d')]);_0x42d788[_0x495a('0x4f')]=_['intersection'](_0x42d788['model'],_0x42d788[_0x495a('0x4d')]);_0xb8ff29['attributes']=_[_0x495a('0x50')](_0x42d788[_0x495a('0x4c')],qs[_0x495a('0x52')](_0x3d19d4[_0x495a('0x4d')]['fields']));_0xb8ff29[_0x495a('0x51')]=_0xb8ff29[_0x495a('0x51')][_0x495a('0x53')]?_0xb8ff29[_0x495a('0x51')]:_0x42d788['model'];if(_0x3d19d4['query']['includeAll']){_0xb8ff29[_0x495a('0x5e')]=[{'all':!![]}];}_0xb8ff29=_[_0x495a('0x5b')]({},_0xb8ff29,_0x3d19d4[_0x495a('0x5c')]);return db[_0x495a('0x47')][_0x495a('0x64')](_0xb8ff29)[_0x495a('0x27')](handleEntityNotFound(_0x272b1e,null))[_0x495a('0x27')](respondWithResult(_0x272b1e,null))['catch'](handleError(_0x272b1e,null));};exports['create']=function(_0x2d4977,_0xd66ea7){return db[_0x495a('0x47')]['create'](_0x2d4977['body'],{})[_0x495a('0x27')](function(_0x1a7d64){var _0x19d953=_0x2d4977[_0x495a('0x65')]['get']({'plain':!![]});if(!_0x19d953)throw new Error(_0x495a('0x66'));if(_0x19d953[_0x495a('0x67')]===_0x495a('0x65')){var _0x5c77f6=_0x1a7d64['get']({'plain':!![]});var _0x42be2a=_0x495a('0x68');return db[_0x495a('0x69')][_0x495a('0x64')]({'where':{'name':_0x42be2a,'userProfileId':_0x19d953[_0x495a('0x6a')]},'raw':!![]})[_0x495a('0x27')](function(_0x533ce0){if(_0x533ce0&&_0x533ce0[_0x495a('0x6b')]===0x0){return db[_0x495a('0x3f')][_0x495a('0x6c')]({'name':_0x5c77f6[_0x495a('0x42')],'resourceId':_0x5c77f6['id'],'type':_0x533ce0[_0x495a('0x42')],'sectionId':_0x533ce0['id']},{})['then'](function(){return _0x1a7d64;});}else{return _0x1a7d64;}})[_0x495a('0x31')](function(_0x1ca550){logger[_0x495a('0x2d')](_0x495a('0x6d'),_0x1ca550);throw _0x1ca550;});}return _0x1a7d64;})[_0x495a('0x27')](respondWithResult(_0xd66ea7,0xc9))[_0x495a('0x31')](handleError(_0xd66ea7,null));};exports['update']=function(_0x33e0ff,_0x39dc49){if(_0x33e0ff[_0x495a('0x6e')]['id']){delete _0x33e0ff[_0x495a('0x6e')]['id'];}return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x33e0ff['params']['id']},'include':[{'model':db['Pause'],'as':_0x495a('0x45')}]})[_0x495a('0x27')](handleEntityNotFound(_0x39dc49,null))[_0x495a('0x27')](saveUpdates(_0x33e0ff[_0x495a('0x6e')],null))[_0x495a('0x27')](respondWithResult(_0x39dc49,null))[_0x495a('0x31')](handleError(_0x39dc49,null));};exports['destroy']=function(_0x497e27,_0x293d23){return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x497e27[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x293d23,null))[_0x495a('0x27')](removeEntity(_0x293d23,null))[_0x495a('0x31')](handleError(_0x293d23,null));};exports[_0x495a('0x6f')]=function(_0x4cfc72,_0x5ed1e7){return db[_0x495a('0x47')]['describe']()[_0x495a('0x27')](respondWithResult(_0x5ed1e7,null))[_0x495a('0x31')](handleError(_0x5ed1e7,null));};exports[_0x495a('0x70')]=function(_0x55602c,_0x301f6b,_0x53a157){if(_0x55602c['body']['id']){delete _0x55602c[_0x495a('0x6e')]['id'];}return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x55602c[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x301f6b,null))[_0x495a('0x27')](function(_0x4fc833){if(_0x4fc833){_0x55602c['body'][_0x495a('0x71')]=_0x4fc833['id'];return db[_0x495a('0x72')][_0x495a('0x6c')](_0x55602c['body']);}})['then'](respondWithResult(_0x301f6b,null))[_0x495a('0x31')](handleError(_0x301f6b,null));};exports['getDispositions']=function(_0x571637,_0x1025da,_0x26a4d4){var _0x480ad0={'raw':![],'where':{}};var _0x97f5e4={};var _0x18fe41={'count':0x0,'rows':[]};return db['SmsAccount'][_0x495a('0x73')]({'where':{'id':_0x571637[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x1025da,null))[_0x495a('0x27')](function(_0x12aedd){if(_0x12aedd){_0x97f5e4['model']=_[_0x495a('0x4e')](db['Disposition']['rawAttributes']);_0x97f5e4[_0x495a('0x4d')]=_['keys'](_0x571637[_0x495a('0x4d')]);_0x97f5e4[_0x495a('0x4f')]=_[_0x495a('0x50')](_0x97f5e4['model'],_0x97f5e4['query']);_0x480ad0[_0x495a('0x51')]=_['intersection'](_0x97f5e4['model'],qs[_0x495a('0x52')](_0x571637['query'][_0x495a('0x52')]));_0x480ad0[_0x495a('0x51')]=_0x480ad0['attributes'][_0x495a('0x53')]?_0x480ad0['attributes']:_0x97f5e4[_0x495a('0x4c')];if(!_0x571637[_0x495a('0x4d')][_0x495a('0x54')](_0x495a('0x74'))){_0x480ad0[_0x495a('0x37')]=qs[_0x495a('0x37')](_0x571637[_0x495a('0x4d')][_0x495a('0x37')]);_0x480ad0['offset']=qs['offset'](_0x571637[_0x495a('0x4d')][_0x495a('0x36')]);}_0x480ad0['order']=qs[_0x495a('0x56')](_0x571637[_0x495a('0x4d')]['sort']);_0x480ad0[_0x495a('0x59')]=qs[_0x495a('0x4f')](_[_0x495a('0x57')](_0x571637[_0x495a('0x4d')],_0x97f5e4['filters']));_0x480ad0['where'][_0x495a('0x71')]=_0x12aedd['id'];if(_0x571637[_0x495a('0x4d')]['filter']){_0x480ad0[_0x495a('0x59')]=_[_0x495a('0x5b')](_0x480ad0['where'],{'$or':_[_0x495a('0x46')](_0x480ad0['attributes'],function(_0x132b9e){var _0x4e8194={};_0x4e8194[_0x132b9e]={'$like':'%'+_0x571637['query'][_0x495a('0x58')]+'%'};return _0x4e8194;})});}_0x480ad0=_[_0x495a('0x5b')]({},_0x480ad0,_0x571637[_0x495a('0x5c')]);return db[_0x495a('0x72')][_0x495a('0x39')]({'where':_0x480ad0[_0x495a('0x59')]})[_0x495a('0x27')](function(_0x4ee494){_0x18fe41[_0x495a('0x39')]=_0x4ee494;if(_0x571637[_0x495a('0x4d')]['includeAll']){_0x480ad0[_0x495a('0x5e')]=[{'all':!![]}];}return db[_0x495a('0x72')][_0x495a('0x5f')](_0x480ad0);})[_0x495a('0x27')](function(_0x3d8b0a){_0x18fe41[_0x495a('0x60')]=_0x3d8b0a;return _0x18fe41;});}})[_0x495a('0x27')](respondWithFilteredResult(_0x1025da,_0x480ad0))[_0x495a('0x31')](handleError(_0x1025da,null));};exports[_0x495a('0x75')]=function(_0x2b8b12,_0x4507a0,_0x23f09b){return db[_0x495a('0x47')]['find']({'where':{'id':_0x2b8b12[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x4507a0,null))[_0x495a('0x27')](function(_0x3f4a19){if(_0x3f4a19){return _0x3f4a19[_0x495a('0x75')](_0x2b8b12['query'][_0x495a('0x76')]);}})[_0x495a('0x27')](respondWithStatusCode(_0x4507a0,null))[_0x495a('0x31')](handleError(_0x4507a0,null));};exports['addAnswer']=function(_0x21dfdf,_0xb390bf,_0x276246){if(_0x21dfdf['body']['id']){delete _0x21dfdf[_0x495a('0x6e')]['id'];}return db['SmsAccount']['find']({'where':{'id':_0x21dfdf[_0x495a('0x62')]['id']}})['then'](handleEntityNotFound(_0xb390bf,null))['then'](function(_0x585215){if(_0x585215){_0x21dfdf['body'][_0x495a('0x71')]=_0x585215['id'];return db[_0x495a('0x77')][_0x495a('0x6c')](_0x21dfdf['body']);}})[_0x495a('0x27')](respondWithResult(_0xb390bf,null))[_0x495a('0x31')](handleError(_0xb390bf,null));};exports[_0x495a('0x78')]=function(_0x122bab,_0x12c3c0,_0xf3132f){var _0x33ca24={'raw':![],'where':{}};var _0x120f03={};var _0x7e109b={'count':0x0,'rows':[]};return db[_0x495a('0x47')][_0x495a('0x73')]({'where':{'id':_0x122bab[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x12c3c0,null))[_0x495a('0x27')](function(_0x1eea81){if(_0x1eea81){_0x120f03[_0x495a('0x4c')]=_['keys'](db[_0x495a('0x77')][_0x495a('0x48')]);_0x120f03[_0x495a('0x4d')]=_['keys'](_0x122bab[_0x495a('0x4d')]);_0x120f03['filters']=_[_0x495a('0x50')](_0x120f03[_0x495a('0x4c')],_0x120f03[_0x495a('0x4d')]);_0x33ca24['attributes']=_[_0x495a('0x50')](_0x120f03[_0x495a('0x4c')],qs['fields'](_0x122bab['query'][_0x495a('0x52')]));_0x33ca24['attributes']=_0x33ca24[_0x495a('0x51')][_0x495a('0x53')]?_0x33ca24['attributes']:_0x120f03[_0x495a('0x4c')];if(!_0x122bab['query']['hasOwnProperty'](_0x495a('0x74'))){_0x33ca24[_0x495a('0x37')]=qs[_0x495a('0x37')](_0x122bab['query'][_0x495a('0x37')]);_0x33ca24['offset']=qs[_0x495a('0x36')](_0x122bab[_0x495a('0x4d')][_0x495a('0x36')]);}_0x33ca24[_0x495a('0x55')]=qs[_0x495a('0x56')](_0x122bab[_0x495a('0x4d')][_0x495a('0x56')]);_0x33ca24[_0x495a('0x59')]=qs[_0x495a('0x4f')](_[_0x495a('0x57')](_0x122bab[_0x495a('0x4d')],_0x120f03[_0x495a('0x4f')]));_0x33ca24[_0x495a('0x59')][_0x495a('0x71')]=_0x1eea81['id'];if(_0x122bab['query']['filter']){_0x33ca24[_0x495a('0x59')]=_['merge'](_0x33ca24[_0x495a('0x59')],{'$or':_[_0x495a('0x46')](_0x33ca24[_0x495a('0x51')],function(_0x105c2f){var _0x328d2e={};_0x328d2e[_0x105c2f]={'$like':'%'+_0x122bab[_0x495a('0x4d')][_0x495a('0x58')]+'%'};return _0x328d2e;})});}_0x33ca24=_[_0x495a('0x5b')]({},_0x33ca24,_0x122bab[_0x495a('0x5c')]);return db[_0x495a('0x77')][_0x495a('0x39')]({'where':_0x33ca24[_0x495a('0x59')]})['then'](function(_0x263651){_0x7e109b[_0x495a('0x39')]=_0x263651;if(_0x122bab[_0x495a('0x4d')][_0x495a('0x5d')]){_0x33ca24[_0x495a('0x5e')]=[{'all':!![]}];}return db['CannedAnswer'][_0x495a('0x5f')](_0x33ca24);})[_0x495a('0x27')](function(_0x46a4a1){_0x7e109b[_0x495a('0x60')]=_0x46a4a1;return _0x7e109b;});}})[_0x495a('0x27')](respondWithFilteredResult(_0x12c3c0,_0x33ca24))[_0x495a('0x31')](handleError(_0x12c3c0,null));};exports[_0x495a('0x79')]=function(_0x2143a5,_0x3a4de4,_0x5a565e){return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x2143a5[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x3a4de4,null))[_0x495a('0x27')](function(_0x3e8176){if(_0x3e8176){return _0x3e8176[_0x495a('0x79')](_0x2143a5[_0x495a('0x4d')][_0x495a('0x76')]);}})['then'](respondWithStatusCode(_0x3a4de4,null))[_0x495a('0x31')](handleError(_0x3a4de4,null));};exports[_0x495a('0x7a')]=function(_0x2c9a97,_0x45adeb,_0x10a53f){var _0x7e418f={'channel':'sms'};var _0x230ec9=[];var _0x72a12c=[];var _0x2fbc05={};return db['SmsAccount'][_0x495a('0x64')]({'where':{'id':_0x2c9a97[_0x495a('0x62')]['id']},'include':[{'model':db[_0x495a('0x7b')],'as':_0x495a('0x7c')}]})[_0x495a('0x27')](handleEntityNotFound(_0x45adeb,null))[_0x495a('0x27')](function(_0x144ed3){_0x7e418f['account']=_0x144ed3;_0x7e418f[_0x495a('0x7d')]=_[_0x495a('0x7e')](_0x144ed3[_0x495a('0x7c')],[_0x495a('0x7f')],[_0x495a('0x80')]);if(_0x7e418f[_0x495a('0x81')][_0x495a('0x7c')]){delete _0x7e418f[_0x495a('0x81')][_0x495a('0x7c')];}return db[_0x495a('0x82')][_0x495a('0x6f')]();})['then'](function(_0x4043dd){if(!_0x4043dd){throw new db[(_0x495a('0x83'))][(_0x495a('0x84'))](_0x495a('0x85'));}_0x230ec9=_['difference'](_[_0x495a('0x4e')](_0x4043dd),[_0x495a('0x86'),'updatedAt']);_0x72a12c=_[_0x495a('0x87')](_['keys'](_0x4043dd),[_0x495a('0x86'),_0x495a('0x88'),_0x495a('0x89'),_0x495a('0x8a')]);_0x7e418f['body']={'mapKey':_0x495a('0x8b')};if(_0x7e418f[_0x495a('0x81')][_0x495a('0x4a')]){switch(_0x7e418f[_0x495a('0x81')]['type']){case _0x495a('0x8c'):_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x8e')];_0x7e418f['body'][_0x495a('0x6e')]=_0x2c9a97['body'][_0x495a('0x8f')];_0x7e418f[_0x495a('0x6e')][_0x495a('0x90')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x91')];break;case'skebby':_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]='+'+_0x2c9a97[_0x495a('0x6e')]['sender'];_0x7e418f[_0x495a('0x6e')][_0x495a('0x6e')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x92')];break;case _0x495a('0x93'):_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]=_0x2c9a97['body'][_0x495a('0x8d')];_0x7e418f['body'][_0x495a('0x6e')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x2f')];break;case _0x495a('0x94'):_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x8d')];_0x7e418f['body'][_0x495a('0x6e')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x6e')];_0x7e418f[_0x495a('0x6e')][_0x495a('0x90')]=_0x2c9a97[_0x495a('0x6e')]['message_id'];break;case _0x495a('0x95'):_0x7e418f['body']['from']=_0x2c9a97['body'][_0x495a('0x8e')];_0x7e418f[_0x495a('0x6e')][_0x495a('0x6e')]=_0x2c9a97['body'][_0x495a('0x96')];_0x7e418f['body'][_0x495a('0x90')]=_0x2c9a97['body'][_0x495a('0x97')];break;case'infobip':_0x7e418f[_0x495a('0x6e')]['from']='+'+_0x2c9a97[_0x495a('0x6e')][_0x495a('0x98')][0x0]['from'];_0x7e418f[_0x495a('0x6e')][_0x495a('0x6e')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x98')][0x0][_0x495a('0x92')];_0x7e418f['body'][_0x495a('0x90')]=_0x2c9a97['body'][_0x495a('0x98')][0x0][_0x495a('0x90')];break;case _0x495a('0x99'):_0x7e418f['body'][_0x495a('0x8d')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x9a')];_0x7e418f[_0x495a('0x6e')][_0x495a('0x6e')]=_0x2c9a97['body'][_0x495a('0x9b')][_0x495a('0x2f')];break;case'clickatell':_0x7e418f['body'][_0x495a('0x8d')]=_0x2c9a97['body']['fromNumber'];_0x7e418f[_0x495a('0x6e')]['body']=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x92')];_0x7e418f[_0x495a('0x6e')]['messageId']=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x9c')];break;case _0x495a('0x9d'):_0x7e418f[_0x495a('0x6e')][_0x495a('0x90')]=_0x2c9a97[_0x495a('0x6e')][0x0]['message']['id'];_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]=_0x2c9a97[_0x495a('0x6e')][0x0][_0x495a('0x2f')]['from'];_0x7e418f[_0x495a('0x6e')]['body']=_0x2c9a97['body'][0x0][_0x495a('0x2f')][_0x495a('0x92')];break;case _0x495a('0x9e'):_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x8d')];_0x7e418f['body'][_0x495a('0x6e')]=_0x2c9a97[_0x495a('0x6e')][_0x495a('0x2f')];_0x7e418f[_0x495a('0x6e')][_0x495a('0x90')]=_0x2c9a97['body'][_0x495a('0x9f')];break;}}if(_0x7e418f[_0x495a('0x6e')]['id']){delete _0x7e418f['body']['id'];}if(_[_0x495a('0xa0')](_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')])){throw new db[(_0x495a('0x83'))][(_0x495a('0x84'))]('from\x20is\x20mandatory');}if(_['isNil'](_0x7e418f[_0x495a('0x6e')]['body'])||_0x7e418f[_0x495a('0x6e')][_0x495a('0x6e')]===''){throw new db[(_0x495a('0x83'))]['ValidationError'](_0x495a('0xa1'));}if(_[_0x495a('0xa0')](_0x7e418f[_0x495a('0x6e')][_0x495a('0xa2')])){throw new db['Sequelize'][(_0x495a('0x84'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x72a12c);}if(!_['includes'](_0x72a12c,_0x7e418f['body']['mapKey'])){throw new db[(_0x495a('0x83'))][(_0x495a('0x84'))](_0x495a('0xa3')+_0x72a12c);}_0x2fbc05[_0x7e418f['body']['mapKey']]=_0x7e418f[_0x495a('0x6e')]['from'];return db[_0x495a('0xa4')]['find']({'where':{'id':_0x7e418f[_0x495a('0x81')][_0x495a('0x8a')]},'include':[{'model':db['CmContact'],'as':_0x495a('0xa5'),'where':_0x2fbc05,'limit':0x1,'order':[[_0x495a('0x88'),'DESC']]}]});})[_0x495a('0x27')](handleEntityNotFound(_0x45adeb,null))[_0x495a('0x27')](function(_0x254d44){if(_0x254d44){_0x7e418f['list']=_['omit'](_0x254d44,['Contacts']);if(_0x254d44[_0x495a('0xa5')][_0x495a('0x53')]){return _0x254d44[_0x495a('0xa5')][0x0];}var _0x39b8c9=_[_0x495a('0x1e')](_0x7e418f[_0x495a('0x6e')],{'firstName':_0x7e418f[_0x495a('0x6e')]['from'],'ListId':_0x254d44['id']});_0x39b8c9[_0x7e418f[_0x495a('0x6e')][_0x495a('0xa2')]]=_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')];return db[_0x495a('0x82')]['create'](_0x39b8c9,{'fields':_0x230ec9,'raw':!![]});}})[_0x495a('0x27')](handleEntityNotFound(_0x45adeb,null))[_0x495a('0x27')](function(_0x41ddd0){if(_0x41ddd0){_0x7e418f['contact']=_0x41ddd0;var _0x2537a6={'ContactId':_0x41ddd0['id'],'phone':_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')],'SmsAccountId':_0x2c9a97[_0x495a('0x62')]['id']};var _0xe352ad={'ContactId':_0x41ddd0['id'],'SmsAccountId':_0x2c9a97[_0x495a('0x62')]['id'],'closed':![]};return db[_0x495a('0xa6')]['find']({'where':_0xe352ad})[_0x495a('0x27')](function(_0x540661){if(_0x540661){return[_0x540661,![]];}return db[_0x495a('0xa6')][_0x495a('0x6c')](_0x2537a6)[_0x495a('0x27')](function(_0x4d9d1c){return[_0x4d9d1c,!![]];});});}})[_0x495a('0xa7')](function(_0x5d722b,_0x1db1f1){_0x7e418f['interaction']=_0x5d722b['get']({'plain':!![]});_0x7e418f[_0x495a('0xa8')][_0x495a('0xa9')]=![];if(_0x1db1f1){if(_0x7e418f['account']['autoclose']){_0x7e418f[_0x495a('0x7d')][_0x495a('0xaa')]({'id':0x0,'priority':_0x7e418f['applications'][_0x495a('0x53')]+0x1,'app':_0x495a('0xab'),'appdata':_0x495a('0xac'),'interval':_0x495a('0xad')});}_0x7e418f['interaction'][_0x495a('0xa9')]=!![];}return db['SmsMessage']['create']({'phone':_0x7e418f[_0x495a('0x6e')][_0x495a('0x8d')],'messageId':_0x7e418f[_0x495a('0x6e')][_0x495a('0x90')],'body':_0x7e418f['body']['body'],'SmsAccountId':_0x2c9a97[_0x495a('0x62')]['id'],'SmsInteractionId':_0x5d722b['id'],'direction':'in','ContactId':_0x5d722b[_0x495a('0xae')],'AttachmentId':_0x7e418f[_0x495a('0x6e')][_0x495a('0xaf')]});})['then'](function(_0x56907f){_0x7e418f[_0x495a('0x2f')]=_0x56907f;if(_0x7e418f['interaction'][_0x495a('0xb0')]){return db[_0x495a('0xb1')][_0x495a('0x64')]({'attributes':['id',_0x495a('0x42')],'where':{'id':_0x7e418f['interaction'][_0x495a('0xb0')]}})[_0x495a('0x27')](function(_0x30a9d6){if(_0x30a9d6){_0x7e418f[_0x495a('0x7d')][_0x495a('0xb2')]({'id':0x0,'priority':0x0,'app':_0x495a('0xb3'),'appdata':_0x30a9d6[_0x495a('0x42')]+','+(_0x7e418f[_0x495a('0x81')][_0x495a('0xb4')]||0xa),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x495a('0xb5'),_0x495a('0xb6'),_0x7e418f);});}return respondWithRpcPromise(_0x495a('0xb5'),_0x495a('0xb6'),_0x7e418f);})[_0x495a('0x27')](function(_0x96b095){if(_0x96b095){var _0x59e1de=0xc8;var _0x38ee46='receiveMessage';logger['info'](_0x495a('0x2c'),_0x38ee46,_0x59e1de,_0x495a('0xb7'));logger[_0x495a('0x2b')](_0x495a('0xb8'),_0x38ee46,_0x59e1de,_0x495a('0xb7'),JSON[_0x495a('0xb9')](_0x96b095));if(_0x7e418f['account'][_0x495a('0x4a')]===_0x495a('0x8c')){return _0x45adeb[_0x495a('0x33')](_0x59e1de)['set'](_0x495a('0xba'),_0x495a('0xbb'))[_0x495a('0x43')](_0x495a('0xbc'));}else{return _0x45adeb[_0x495a('0x33')](_0x59e1de)['json'](_0x96b095);}}})[_0x495a('0x31')](handleError(_0x45adeb,null));};exports[_0x495a('0xbd')]=function(_0x49cf86,_0x4ef552,_0x4ad215){return db[_0x495a('0x47')][_0x495a('0x73')]({'where':{'id':_0x49cf86[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x4ef552,null))[_0x495a('0x27')](function(_0x445f35){if(_0x445f35){return db[_0x495a('0xbe')]['transaction'](function(_0x37b4cc){return db[_0x495a('0x7b')]['destroy']({'where':{'SmsAccountId':_0x49cf86[_0x495a('0x62')]['id']},'transaction':_0x37b4cc})[_0x495a('0x27')](function(_0xd30cd6){var _0x364949=_['map'](_0x49cf86[_0x495a('0x6e')],function(_0x1eff00){_0x1eff00[_0x495a('0x71')]=_0x49cf86[_0x495a('0x62')]['id'];return _0x1eff00;});return db[_0x495a('0x7b')][_0x495a('0xbf')](_0x364949,{'transaction':_0x37b4cc});});})[_0x495a('0x27')](function(){return db['SmsApplication']['findAndCountAll']({'where':{'SmsAccountId':_0x49cf86['params']['id']},'order':'priority'});});}})[_0x495a('0x27')](respondWithResult(_0x4ef552,null))[_0x495a('0x31')](handleError(_0x4ef552,null));};exports[_0x495a('0xc0')]=function(_0x37e726,_0x53ecef,_0x1bd28f){var _0x352584={};var _0x4bf131={};var _0x348587;var _0x27911b;return db[_0x495a('0x47')]['findOne']({'where':{'id':_0x37e726['params']['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x53ecef,null))[_0x495a('0x27')](function(_0x3e39b2){if(_0x3e39b2){_0x348587=_0x3e39b2;_0x4bf131[_0x495a('0x4c')]=_[_0x495a('0x4e')](db['SmsApplication']['rawAttributes']);_0x4bf131['query']=_[_0x495a('0x4e')](_0x37e726[_0x495a('0x4d')]);_0x4bf131[_0x495a('0x4f')]=_[_0x495a('0x50')](_0x4bf131['model'],_0x4bf131['query']);_0x352584[_0x495a('0x51')]=_['intersection'](_0x4bf131[_0x495a('0x4c')],qs['fields'](_0x37e726['query'][_0x495a('0x52')]));_0x352584[_0x495a('0x51')]=_0x352584[_0x495a('0x51')][_0x495a('0x53')]?_0x352584[_0x495a('0x51')]:_0x4bf131[_0x495a('0x4c')];_0x352584[_0x495a('0x55')]=qs[_0x495a('0x56')](_0x37e726['query'][_0x495a('0x56')]);_0x352584[_0x495a('0x59')]=qs[_0x495a('0x4f')](_[_0x495a('0x57')](_0x37e726[_0x495a('0x4d')],_0x4bf131['filters']));if(_0x37e726[_0x495a('0x4d')]['filter']){_0x352584[_0x495a('0x59')]=_[_0x495a('0x5b')](_0x352584[_0x495a('0x59')],{'$or':_[_0x495a('0x46')](_0x352584['attributes'],function(_0xcb2534){var _0x2e3239={};_0x2e3239[_0xcb2534]={'$like':'%'+_0x37e726[_0x495a('0x4d')][_0x495a('0x58')]+'%'};return _0x2e3239;})});}_0x352584=_[_0x495a('0x5b')]({},_0x352584,_0x37e726[_0x495a('0x5c')]);return _0x348587[_0x495a('0xc0')](_0x352584);}})[_0x495a('0x27')](function(_0x537f79){if(_0x537f79){_0x27911b=_0x537f79[_0x495a('0x53')];if(!_0x37e726[_0x495a('0x4d')][_0x495a('0x54')](_0x495a('0x74'))){_0x352584[_0x495a('0x37')]=qs['limit'](_0x37e726[_0x495a('0x4d')][_0x495a('0x37')]);_0x352584[_0x495a('0x36')]=qs[_0x495a('0x36')](_0x37e726[_0x495a('0x4d')][_0x495a('0x36')]);}return _0x348587[_0x495a('0xc0')](_0x352584);}})['then'](function(_0x4c3ed9){if(_0x4c3ed9){return _0x4c3ed9?{'count':_0x27911b,'rows':_0x4c3ed9}:null;}})[_0x495a('0x27')](respondWithResult(_0x53ecef,null))[_0x495a('0x31')](handleError(_0x53ecef,null));};exports[_0x495a('0xc1')]=function(_0x1958c6,_0x8a4c57,_0x556f96){var _0x535c94={'raw':![],'where':{}};var _0x301100={};var _0x5a325c={'count':0x0,'rows':[]};return db[_0x495a('0x47')][_0x495a('0x73')]({'where':{'id':_0x1958c6['params']['id']}})['then'](handleEntityNotFound(_0x8a4c57,null))['then'](function(_0x2888cc){if(_0x2888cc){_0x301100[_0x495a('0x4c')]=_['keys'](db['SmsInteraction'][_0x495a('0x48')]);_0x301100[_0x495a('0x4d')]=_[_0x495a('0x4e')](_0x1958c6[_0x495a('0x4d')]);_0x301100[_0x495a('0x4f')]=_[_0x495a('0x50')](_0x301100[_0x495a('0x4c')],_0x301100[_0x495a('0x4d')]);_0x535c94[_0x495a('0x51')]=_[_0x495a('0x50')](_0x301100[_0x495a('0x4c')],qs[_0x495a('0x52')](_0x1958c6[_0x495a('0x4d')][_0x495a('0x52')]));_0x535c94['attributes']=_0x535c94['attributes'][_0x495a('0x53')]?_0x535c94[_0x495a('0x51')]:_0x301100[_0x495a('0x4c')];if(!_0x1958c6[_0x495a('0x4d')][_0x495a('0x54')](_0x495a('0x74'))){_0x535c94[_0x495a('0x37')]=qs['limit'](_0x1958c6['query'][_0x495a('0x37')]);_0x535c94[_0x495a('0x36')]=qs['offset'](_0x1958c6[_0x495a('0x4d')][_0x495a('0x36')]);}_0x535c94[_0x495a('0x55')]=qs[_0x495a('0x56')](_0x1958c6[_0x495a('0x4d')][_0x495a('0x56')]);_0x535c94[_0x495a('0x59')]=qs[_0x495a('0x4f')](_[_0x495a('0x57')](_0x1958c6[_0x495a('0x4d')],_0x301100['filters']));_0x535c94[_0x495a('0x59')][_0x495a('0x71')]=_0x2888cc['id'];if(_0x1958c6[_0x495a('0x4d')]['filter']){_0x535c94[_0x495a('0x59')]=_[_0x495a('0x5b')](_0x535c94[_0x495a('0x59')],{'$or':_[_0x495a('0x46')](_0x535c94[_0x495a('0x51')],function(_0x1b9b4a){var _0x43f896={};_0x43f896[_0x1b9b4a]={'$like':'%'+_0x1958c6[_0x495a('0x4d')]['filter']+'%'};return _0x43f896;})});}_0x535c94=_[_0x495a('0x5b')]({},_0x535c94,_0x1958c6[_0x495a('0x5c')]);return db['SmsInteraction'][_0x495a('0x39')]({'where':_0x535c94[_0x495a('0x59')]})[_0x495a('0x27')](function(_0x18d8cd){_0x5a325c[_0x495a('0x39')]=_0x18d8cd;if(_0x1958c6['query'][_0x495a('0x5d')]){_0x535c94['include']=[{'model':db['CmContact'],'as':_0x495a('0xc2'),'required':![]},{'model':db['User'],'as':_0x495a('0xc3'),'attributes':['name',_0x495a('0xc4'),_0x495a('0xc5')],'required':![]},{'model':db['Tag'],'as':_0x495a('0xc6'),'attributes':['id','name',_0x495a('0xc7')],'where':_0x1958c6['query'][_0x495a('0xc8')]?{'id':_0x1958c6[_0x495a('0x4d')][_0x495a('0xc8')]}:undefined,'required':_0x1958c6[_0x495a('0x4d')][_0x495a('0xc8')]?!![]:![]}];}return db['SmsInteraction'][_0x495a('0x5f')](_0x535c94);})[_0x495a('0x27')](function(_0x573131){_0x5a325c[_0x495a('0x60')]=_0x573131;return _0x5a325c;});}})['then'](respondWithFilteredResult(_0x8a4c57,_0x535c94))['catch'](handleError(_0x8a4c57,null));};exports[_0x495a('0x43')]=function(_0x45963c,_0x187644,_0x55ed95){var _0x4f8681,_0x16e269,_0x25faae;if(_[_0x495a('0xa0')](_0x45963c[_0x495a('0x6e')][_0x495a('0x6e')])||_0x45963c[_0x495a('0x6e')]['body']===''){throw new db[(_0x495a('0x83'))][(_0x495a('0x84'))](_0x495a('0xa1'));}if(_[_0x495a('0xa0')](_0x45963c[_0x495a('0x6e')]['to'])){throw new db['Sequelize']['ValidationError'](_0x495a('0xc9'));}_0x4f8681=_0x45963c[_0x495a('0x6e')]['to'];return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x45963c['params']['id']},'include':[{'model':db[_0x495a('0xa4')],'as':'List','include':[{'model':db['CmContact'],'as':_0x495a('0xa5'),'where':{'mobile':_0x4f8681},'limit':0x1,'order':[[_0x495a('0x88'),_0x495a('0xca')]]}]}]})[_0x495a('0x27')](handleEntityNotFound(_0x187644,null))[_0x495a('0x27')](function(_0x2b5b7a){if(_0x2b5b7a&&_0x2b5b7a['List']){_0x16e269=_0x2b5b7a[_0x495a('0xcb')]({'plain':!![]});if(_0x16e269[_0x495a('0xcc')]&&_0x16e269[_0x495a('0xcc')][_0x495a('0xa5')]['length']){return _0x16e269[_0x495a('0xcc')][_0x495a('0xa5')][0x0];}return db[_0x495a('0x82')][_0x495a('0x6c')](_['defaults'](_0x45963c[_0x495a('0x6e')],{'firstName':_0x4f8681,'mobile':_0x4f8681,'phone':_0x4f8681,'ListId':_0x16e269[_0x495a('0x8a')]}));}})[_0x495a('0x27')](handleEntityNotFound(_0x187644,null))[_0x495a('0x27')](function(_0x4d3299){if(_0x4d3299){_0x25faae=_0x4d3299;return db['SmsInteraction']['find']({'where':{'ContactId':_0x25faae['id'],'closed':![],'SmsAccountId':_0x16e269['id']}})[_0x495a('0x27')](function(_0x12fc9d){if(_0x12fc9d){return[_0x12fc9d,![]];}return db[_0x495a('0xa6')][_0x495a('0x6c')]({'UserId':_0x45963c[_0x495a('0x65')]['id'],'ContactId':_0x25faae['id'],'SmsAccountId':_0x16e269['id'],'phone':_0x4f8681,'firstMsgDirection':_0x495a('0xcd'),'Messages':[_['merge'](_0x45963c[_0x495a('0x6e')],{'read':![],'body':_0x45963c[_0x495a('0x6e')][_0x495a('0x6e')],'phone':_0x4f8681,'SmsAccountId':_0x16e269['id'],'UserId':_0x45963c['user']['id'],'ContactId':_0x25faae['id']})]},{'include':[{'model':db[_0x495a('0xce')],'as':_0x495a('0xcf')}]})[_0x495a('0x27')](function(_0x37f172){return[_0x37f172,!![]];});});}})['spread'](function(_0x378f2f,_0xc8ad9b){if(_0xc8ad9b){return _0x378f2f;}return db[_0x495a('0xce')]['create'](_['merge'](_0x45963c[_0x495a('0x6e')],{'read':![],'body':_0x45963c[_0x495a('0x6e')][_0x495a('0x6e')],'phone':_0x4f8681,'SmsAccountId':_0x16e269['id'],'SmsInteractionId':_0x378f2f['id'],'UserId':_0x45963c['user']['id'],'ContactId':_0x25faae['id']}))[_0x495a('0x27')](function(_0x426d56){_0x378f2f[_0x495a('0xd0')][_0x495a('0xcf')]=[];_0x378f2f[_0x495a('0xd0')][_0x495a('0xcf')]['push'](_0x426d56[_0x495a('0xd0')]);return _0x378f2f;});})[_0x495a('0x27')](respondWithResult(_0x187644,null))['catch'](handleError(_0x187644,null));};exports[_0x495a('0x33')]=function(_0x14e48b,_0xa07777,_0x101109){if(_0x14e48b[_0x495a('0x6e')]['id']){delete _0x14e48b[_0x495a('0x6e')]['id'];}var _0x29ab7d,_0x2e7f35,_0x15e622;return db['SmsAccount'][_0x495a('0x64')]({'where':{'id':_0x14e48b['params']['id']}})[_0x495a('0x27')](handleEntityNotFound(_0xa07777,null))[_0x495a('0x27')](function(_0x32e987){if(_0x32e987){_0x15e622=_0x32e987;logger[_0x495a('0x2b')](_0x495a('0x2c'),_0x495a('0x33'),_0x495a('0xd1'),_0x32e987['type'],util[_0x495a('0xd2')](_0x14e48b['body'],{'showHidden':![],'depth':null}));switch(_0x32e987[_0x495a('0x4a')]){case _0x495a('0xd3'):if(_0x14e48b[_0x495a('0x6e')][_0x495a('0xd4')]&&_0x14e48b['body']['status']){_0x2e7f35=_0x14e48b['body']['status'];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x14e48b[_0x495a('0x6e')][_0x495a('0xd4')]}});}break;case _0x495a('0x93'):if(_0x14e48b[_0x495a('0x6e')][_0x495a('0xd5')]&&_0x14e48b[_0x495a('0x6e')][_0x495a('0xd6')]){_0x2e7f35=_0x14e48b['body']['statusInt'];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x14e48b[_0x495a('0x6e')][_0x495a('0xd5')]}});}break;case'clicksend':if(_0x14e48b['body'][_0x495a('0xd7')]&&_0x14e48b[_0x495a('0x6e')][_0x495a('0xd8')]){_0x2e7f35=_0x14e48b['body'][_0x495a('0xd8')];return db[_0x495a('0xce')]['find']({'where':{'messageId':_0x14e48b['body']['message_id']}});}break;case'infobip':var _0x509144=_0x14e48b['body']['results'][0x0];if(_0x509144[_0x495a('0x90')]&&_0x509144['status'][_0x495a('0xd9')]===_0x495a('0xda')){_0x2e7f35=_0x509144['status'][_0x495a('0xd9')];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x509144[_0x495a('0x90')]}});}break;case _0x495a('0xdb'):if(_0x14e48b[_0x495a('0x6e')][_0x495a('0x90')]&&_0x14e48b[_0x495a('0x6e')][_0x495a('0x33')]){_0x2e7f35=_0x14e48b[_0x495a('0x6e')]['status'];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x14e48b[_0x495a('0x6e')][_0x495a('0x90')]}});}break;case _0x495a('0x9d'):if(_0x14e48b[_0x495a('0x6e')][0x0][_0x495a('0x2f')]['id']){_0x2e7f35=_0x14e48b[_0x495a('0x6e')][0x0][_0x495a('0x4a')];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x14e48b['body'][0x0][_0x495a('0x2f')]['id']}});}break;case'intelepeer':if(_0x14e48b['body']['redif']&&_0x14e48b[_0x495a('0x6e')]['status']){_0x2e7f35=_0x14e48b[_0x495a('0x6e')][_0x495a('0x33')];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x14e48b[_0x495a('0x6e')][_0x495a('0xdc')]}});}break;}}})[_0x495a('0x27')](handleEntityNotFound(_0xa07777,null))[_0x495a('0x27')](function(_0x13e5af){if(_0x13e5af){_0x29ab7d=_0x13e5af;switch(_0x15e622['type']){case _0x495a('0xd3'):if(_0x2e7f35===_0x495a('0xda')){return _0x29ab7d[_0x495a('0x3e')]({'read':!![]});}else{logger['error'](_0x495a('0x2c'),_0x495a('0x33'),_0x495a('0xd3'),util[_0x495a('0xd2')](_0x14e48b[_0x495a('0x6e')],{'showHidden':![],'depth':null}));}break;case _0x495a('0x93'):if(_0x2e7f35==='1'){return _0x29ab7d[_0x495a('0x3e')]({'read':!![]});}else{logger[_0x495a('0x2d')](_0x495a('0x2c'),'status',_0x495a('0xd3'),util[_0x495a('0xd2')](_0x14e48b[_0x495a('0x6e')],{'showHidden':![],'depth':null}));}break;case _0x495a('0x94'):if(!_0x14e48b[_0x495a('0x6e')]['error_code']&&_0x2e7f35>=0xc8&&_0x2e7f35<=0xce){return _0x29ab7d['update']({'read':!![]});}else{logger[_0x495a('0x2d')](_0x495a('0x2c'),_0x495a('0x33'),_0x495a('0x94'),util[_0x495a('0xd2')](_0x14e48b[_0x495a('0x6e')],{'showHidden':![],'depth':null}));}break;case _0x495a('0xdd'):var _0x379999=_0x14e48b[_0x495a('0x6e')]['results'][0x0];if(_0x379999[_0x495a('0x33')]['groupName']==='DELIVERED'){return _0x29ab7d[_0x495a('0x3e')]({'read':!![]});}else{logger[_0x495a('0x2d')]('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0x495a('0xdd'),util[_0x495a('0xd2')](_0x14e48b['body'],{'showHidden':![],'depth':null}));}break;case _0x495a('0xdb'):if(_0x2e7f35==_0x495a('0xde')||_0x2e7f35==_0x495a('0xdf')){return _0x29ab7d[_0x495a('0x3e')]({'read':!![]});}else{logger[_0x495a('0x2d')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x495a('0x33'),_0x495a('0xdb'),util[_0x495a('0xd2')](_0x14e48b['body'],{'showHidden':![],'depth':null}));}break;case _0x495a('0x9d'):if(_0x2e7f35==_0x495a('0xe0')){return _0x29ab7d[_0x495a('0x3e')]({'read':!![]});}else{logger[_0x495a('0x2d')](_0x495a('0x2c'),_0x495a('0x33'),'bandwidth',util['inspect'](_0x14e48b[_0x495a('0x6e')],{'showHidden':![],'depth':null}));}break;case _0x495a('0x9e'):if(_0x2e7f35===_0x495a('0xe1')||_0x2e7f35==='ACCEPTD'){return _0x29ab7d['update']({'read':!![]});}else{logger[_0x495a('0x2d')](_0x495a('0x2c'),'status',_0x495a('0x9e'),util[_0x495a('0xd2')](_0x14e48b['body'],{'showHidden':![],'depth':null}));}break;}return _0x29ab7d;}})[_0x495a('0x27')](respondWithResult(_0xa07777,null))[_0x495a('0x31')](handleError(_0xa07777,null));};exports[_0x495a('0xe2')]=function(_0x394f87,_0x1acd68,_0x76c044){var _0x3c7205,_0x5d2625,_0x32c638;return db['SmsAccount']['find']({'where':{'id':_0x394f87[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x1acd68,null))[_0x495a('0x27')](function(_0x254da7){if(_0x254da7){_0x32c638=_0x254da7;logger['debug'](_0x495a('0x2c'),_0x495a('0x33'),_0x495a('0xd1'),_0x254da7[_0x495a('0x4a')],util[_0x495a('0xd2')](_0x394f87[_0x495a('0x4d')],{'showHidden':![],'depth':null}));switch(_0x254da7[_0x495a('0x4a')]){case _0x495a('0x99'):if(_0x394f87[_0x495a('0x4d')][_0x495a('0xe3')]&&_0x394f87[_0x495a('0x4d')][_0x495a('0xe4')]){_0x5d2625=_0x394f87[_0x495a('0x4d')][_0x495a('0xe4')];return db[_0x495a('0xce')][_0x495a('0x64')]({'where':{'messageId':_0x394f87['query']['message-id']}});}break;}}})[_0x495a('0x27')](handleEntityNotFound(_0x1acd68,null))[_0x495a('0x27')](function(_0x583992){if(_0x583992){_0x3c7205=_0x583992;switch(_0x32c638[_0x495a('0x4a')]){case _0x495a('0x99'):if(_0x5d2625==='2'||_0x5d2625==='6'){return _0x3c7205[_0x495a('0x3e')]({'read':!![]});}else{logger[_0x495a('0x2d')](_0x495a('0x2c'),_0x495a('0x33'),_0x495a('0x99'),util[_0x495a('0xd2')](_0x394f87[_0x495a('0x4d')],{'showHidden':![],'depth':null}));};break;}return _0x3c7205;}})[_0x495a('0x27')](respondWithResult(_0x1acd68,null))[_0x495a('0x31')](handleError(_0x1acd68,null));};exports['addAgents']=function(_0x56fb52,_0x198288,_0x2abc00){return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x56fb52['params']['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x198288,null))['then'](function(_0x285d26){if(_0x285d26){return _0x285d26['addAgents'](_0x56fb52[_0x495a('0x6e')][_0x495a('0x76')],_[_0x495a('0xe5')](_0x56fb52['body'],[_0x495a('0x76'),'id'])||{})[_0x495a('0xa7')](function(_0x32ddbb){for(var _0x4b00af=0x0;_0x4b00af<_0x56fb52['body']['ids']['length'];_0x4b00af+=0x1){socket['emit']('userSmsAccount:save',{'UserId':_0x56fb52['body'][_0x495a('0x76')][_0x4b00af],'SmsAccountId':_0x56fb52['params']['id']});}return _0x32ddbb;});}})[_0x495a('0x27')](respondWithResult(_0x198288,null))['catch'](handleError(_0x198288,null));};exports['removeAgents']=function(_0x6167c4,_0x2de69e,_0x31421d){return db[_0x495a('0x47')][_0x495a('0x64')]({'where':{'id':_0x6167c4[_0x495a('0x62')]['id']}})['then'](handleEntityNotFound(_0x2de69e,null))[_0x495a('0x27')](function(_0x508526){if(_0x508526){return _0x508526['removeAgents'](_0x6167c4['query'][_0x495a('0x76')])['then'](function(){if(_[_0x495a('0xe6')](_0x6167c4[_0x495a('0x4d')][_0x495a('0x76')])){for(var _0xaab7dd=0x0;_0xaab7dd<_0x6167c4[_0x495a('0x4d')][_0x495a('0x76')][_0x495a('0x53')];_0xaab7dd+=0x1){socket['emit']('userSmsAccount:remove',{'UserId':Number(_0x6167c4[_0x495a('0x4d')][_0x495a('0x76')][_0xaab7dd]),'SmsAccountId':Number(_0x6167c4[_0x495a('0x62')]['id'])});}}else{socket[_0x495a('0xe7')](_0x495a('0xe8'),{'UserId':Number(_0x6167c4['query']['ids']),'SmsAccountId':Number(_0x6167c4[_0x495a('0x62')]['id'])});}});}})[_0x495a('0x27')](respondWithStatusCode(_0x2de69e,null))['catch'](handleError(_0x2de69e,null));};exports[_0x495a('0xe9')]=function(_0x3bd21d,_0x2ece39,_0x36a47d){var _0x3d526f={};var _0x345dc9={};var _0x425985;var _0x4cfd89;return db['SmsAccount']['findOne']({'where':{'id':_0x3bd21d[_0x495a('0x62')]['id']}})[_0x495a('0x27')](handleEntityNotFound(_0x2ece39,null))['then'](function(_0x79b783){if(_0x79b783){_0x425985=_0x79b783;_0x345dc9[_0x495a('0x4c')]=_['keys'](db['User'][_0x495a('0x48')]);_0x345dc9[_0x495a('0x4d')]=_[_0x495a('0x4e')](_0x3bd21d[_0x495a('0x4d')]);_0x345dc9[_0x495a('0x4f')]=_['intersection'](_0x345dc9[_0x495a('0x4c')],_0x345dc9[_0x495a('0x4d')]);_0x3d526f[_0x495a('0x51')]=_[_0x495a('0x50')](_0x345dc9[_0x495a('0x4c')],qs[_0x495a('0x52')](_0x3bd21d['query'][_0x495a('0x52')]));_0x3d526f[_0x495a('0x51')]=_0x3d526f[_0x495a('0x51')][_0x495a('0x53')]?_0x3d526f['attributes']:_0x345dc9[_0x495a('0x4c')];_0x3d526f[_0x495a('0x55')]=qs[_0x495a('0x56')](_0x3bd21d[_0x495a('0x4d')][_0x495a('0x56')]);_0x3d526f[_0x495a('0x59')]=qs['filters'](_[_0x495a('0x57')](_0x3bd21d[_0x495a('0x4d')],_0x345dc9[_0x495a('0x4f')]));if(_0x3bd21d[_0x495a('0x4d')]['filter']){_0x3d526f[_0x495a('0x59')]=_[_0x495a('0x5b')](_0x3d526f[_0x495a('0x59')],{'$or':_[_0x495a('0x46')](_0x3d526f[_0x495a('0x51')],function(_0x5f3fbf){var _0x5034d4={};_0x5034d4[_0x5f3fbf]={'$like':'%'+_0x3bd21d[_0x495a('0x4d')][_0x495a('0x58')]+'%'};return _0x5034d4;})});}_0x3d526f=_[_0x495a('0x5b')]({},_0x3d526f,_0x3bd21d[_0x495a('0x5c')]);return _0x425985[_0x495a('0xe9')](_0x3d526f);}})[_0x495a('0x27')](function(_0x4b9327){if(_0x4b9327){_0x4cfd89=_0x4b9327[_0x495a('0x53')];if(!_0x3bd21d['query'][_0x495a('0x54')](_0x495a('0x74'))){_0x3d526f[_0x495a('0x37')]=qs[_0x495a('0x37')](_0x3bd21d[_0x495a('0x4d')]['limit']);_0x3d526f[_0x495a('0x36')]=qs[_0x495a('0x36')](_0x3bd21d[_0x495a('0x4d')][_0x495a('0x36')]);}return _0x425985[_0x495a('0xe9')](_0x3d526f);}})[_0x495a('0x27')](function(_0x4af628){if(_0x4af628){return _0x4af628?{'count':_0x4cfd89,'rows':_0x4af628}:null;}})[_0x495a('0x27')](respondWithResult(_0x2ece39,null))[_0x495a('0x31')](handleError(_0x2ece39,null));}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.events.js b/server/api/smsAccount/smsAccount.events.js index 4cc353f..59ec7ed 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 _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 +var _0x57d6=['hook','exports','events','../../mysqldb','SmsAccount','save','update','emit','hasOwnProperty'];(function(_0x2ff4bd,_0x4780a6){var _0x28edc6=function(_0x792380){while(--_0x792380){_0x2ff4bd['push'](_0x2ff4bd['shift']());}};_0x28edc6(++_0x4780a6);}(_0x57d6,0x1d6));var _0x657d=function(_0x4343c6,_0xe154c3){_0x4343c6=_0x4343c6-0x0;var _0x18c217=_0x57d6[_0x4343c6];return _0x18c217;};'use strict';var EventEmitter=require(_0x657d('0x0'));var SmsAccount=require(_0x657d('0x1'))['db'][_0x657d('0x2')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x657d('0x3'),'afterUpdate':_0x657d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x248986){return function(_0xb7b101,_0x3e9e21,_0x4689cc){SmsAccountEvents[_0x657d('0x5')](_0x248986+':'+_0xb7b101['id'],_0xb7b101);SmsAccountEvents[_0x657d('0x5')](_0x248986,_0xb7b101);_0x4689cc(null);};}for(var e in events){if(events[_0x657d('0x6')](e)){var event=events[e];SmsAccount[_0x657d('0x7')](e,emitEvent(event));}}module[_0x657d('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 ead9cae..b1714d5 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 _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 +var _0xe6e4=['sms_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./smsAccount.attributes','define'];(function(_0x47aa64,_0xfb8a07){var _0x549c7a=function(_0x266165){while(--_0x266165){_0x47aa64['push'](_0x47aa64['shift']());}};_0x549c7a(++_0xfb8a07);}(_0xe6e4,0xc1));var _0x4e6e=function(_0xf0f9ae,_0x3b02ef){_0xf0f9ae=_0xf0f9ae-0x0;var _0x46b898=_0xe6e4[_0xf0f9ae];return _0x46b898;};'use strict';var _=require(_0x4e6e('0x0'));var util=require(_0x4e6e('0x1'));var logger=require(_0x4e6e('0x2'))(_0x4e6e('0x3'));var moment=require(_0x4e6e('0x4'));var BPromise=require(_0x4e6e('0x5'));var rp=require(_0x4e6e('0x6'));var fs=require('fs');var path=require(_0x4e6e('0x7'));var rimraf=require(_0x4e6e('0x8'));var config=require('../../config/environment');var attributes=require(_0x4e6e('0x9'));module['exports']=function(_0x5b7441,_0x3f753a){return _0x5b7441[_0x4e6e('0xa')]('SmsAccount',attributes,{'tableName':_0x4e6e('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 f3d93ae..db2278d 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 _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 +var _0x11c0=['./smsAccount.socket','register','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','SmsAccount','options','where','attributes','map','include','model','ShowSmsAccount','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter'];(function(_0x2712b5,_0x3d7da2){var _0x272e5c=function(_0x452405){while(--_0x452405){_0x2712b5['push'](_0x2712b5['shift']());}};_0x272e5c(++_0x3d7da2);}(_0x11c0,0x163));var _0x011c=function(_0x4f8ccb,_0x1fe79a){_0x4f8ccb=_0x4f8ccb-0x0;var _0x1d84ad=_0x11c0[_0x4f8ccb];return _0x1d84ad;};'use strict';var _=require(_0x011c('0x0'));var util=require(_0x011c('0x1'));var moment=require(_0x011c('0x2'));var BPromise=require(_0x011c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x011c('0x4'))['db'];var utils=require(_0x011c('0x5'));var logger=require(_0x011c('0x6'))(_0x011c('0x7'));var config=require(_0x011c('0x8'));var jayson=require(_0x011c('0x9'));var client=jayson[_0x011c('0xa')][_0x011c('0xb')]({'port':0x232a});config[_0x011c('0xc')]=_['defaults'](config[_0x011c('0xc')],{'host':_0x011c('0xd'),'port':0x18eb});var socket=require(_0x011c('0xe'))(new Redis(config[_0x011c('0xc')]));require(_0x011c('0xf'))[_0x011c('0x10')](socket);function respondWithRpcPromise(_0x571adb,_0x396d4d,_0x4a10e1){return new BPromise(function(_0x48b1e2,_0x5e52a3){return client['request'](_0x571adb,_0x4a10e1)[_0x011c('0x11')](function(_0x5c5eb1){logger[_0x011c('0x12')](_0x011c('0x13'),_0x396d4d,_0x011c('0x14'));logger[_0x011c('0x15')](_0x011c('0x16'),_0x396d4d,_0x011c('0x14'),JSON[_0x011c('0x17')](_0x5c5eb1));if(_0x5c5eb1[_0x011c('0x18')]){if(_0x5c5eb1[_0x011c('0x18')][_0x011c('0x19')]===0x1f4){logger[_0x011c('0x18')](_0x011c('0x13'),_0x396d4d,_0x5c5eb1[_0x011c('0x18')][_0x011c('0x1a')]);return _0x5e52a3(_0x5c5eb1[_0x011c('0x18')]['message']);}logger[_0x011c('0x18')]('SmsAccount,\x20%s,\x20%s',_0x396d4d,_0x5c5eb1[_0x011c('0x18')][_0x011c('0x1a')]);return _0x48b1e2(_0x5c5eb1[_0x011c('0x18')][_0x011c('0x1a')]);}else{logger['info'](_0x011c('0x13'),_0x396d4d,_0x011c('0x14'));_0x48b1e2(_0x5c5eb1[_0x011c('0x1b')]['message']);}})[_0x011c('0x1c')](function(_0xb375e9){logger['error'](_0x011c('0x13'),_0x396d4d,_0xb375e9);_0x5e52a3(_0xb375e9);});});}exports['ShowSmsAccount']=function(_0x1eefb2){var _0x1bd447=this;return new Promise(function(_0x4421af,_0xff73e6){return db[_0x011c('0x1d')]['find']({'raw':_0x1eefb2[_0x011c('0x1e')]?_0x1eefb2[_0x011c('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x1eefb2[_0x011c('0x1e')]?_0x1eefb2[_0x011c('0x1e')][_0x011c('0x1f')]||null:null,'attributes':_0x1eefb2[_0x011c('0x1e')]?_0x1eefb2[_0x011c('0x1e')][_0x011c('0x20')]||null:null,'include':_0x1eefb2[_0x011c('0x1e')]?_0x1eefb2[_0x011c('0x1e')]['include']?_[_0x011c('0x21')](_0x1eefb2[_0x011c('0x1e')][_0x011c('0x22')],function(_0xef9e7f){return{'model':db[_0xef9e7f[_0x011c('0x23')]],'as':_0xef9e7f['as'],'attributes':_0xef9e7f[_0x011c('0x20')],'include':_0xef9e7f[_0x011c('0x22')]?_['map'](_0xef9e7f[_0x011c('0x22')],function(_0x19894b){return{'model':db[_0x19894b[_0x011c('0x23')]],'as':_0x19894b['as'],'attributes':_0x19894b[_0x011c('0x20')],'include':_0x19894b[_0x011c('0x22')]?_[_0x011c('0x21')](_0x19894b[_0x011c('0x22')],function(_0x5afbdb){return{'model':db[_0x5afbdb['model']],'as':_0x5afbdb['as'],'attributes':_0x5afbdb[_0x011c('0x20')]};}):[]};}):[]};}):[]:[]})[_0x011c('0x11')](function(_0x28c1cc){logger[_0x011c('0x12')](_0x011c('0x24'),_0x1eefb2);logger['debug']('ShowSmsAccount',_0x1eefb2,JSON[_0x011c('0x17')](_0x28c1cc));_0x4421af(_0x28c1cc);})[_0x011c('0x1c')](function(_0x112ed0){logger[_0x011c('0x18')](_0x011c('0x24'),_0x112ed0['message'],_0x1eefb2);_0xff73e6(_0x1bd447[_0x011c('0x18')](0x1f4,_0x112ed0['message']));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.socket.js b/server/api/smsAccount/smsAccount.socket.js index b703f4a..6654984 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(_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 +var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0xa9e0[_0x1cfa0d];return _0xe33279;};'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 f60487c..6dc7831 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 _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 +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(_0xd41f5c,_0x1a0034){var _0x3bb21e=function(_0x411d4b){while(--_0x411d4b){_0xd41f5c['push'](_0xd41f5c['shift']());}};_0x3bb21e(++_0x1a0034);}(_0x7217,0x19e));var _0x7721=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x7217[_0x4243a3];return _0x1b2a33;};'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 adf01d6..1d45a51 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 _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 +var _0x9be1=['sequelize','exports','STRING','TEXT','*,*,*,*'];(function(_0x3d274f,_0x33e6a7){var _0x3fcdae=function(_0x4cad40){while(--_0x4cad40){_0x3d274f['push'](_0x3d274f['shift']());}};_0x3fcdae(++_0x33e6a7);}(_0x9be1,0x69));var _0x19be=function(_0x34bd47,_0x306336){_0x34bd47=_0x34bd47-0x0;var _0x172738=_0x9be1[_0x34bd47];return _0x172738;};'use strict';var Sequelize=require(_0x19be('0x0'));module[_0x19be('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x19be('0x2')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x19be('0x3')]()},'description':{'type':Sequelize[_0x19be('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x19be('0x4')}}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.controller.js b/server/api/smsApplication/smsApplication.controller.js index d21fba6..9b9c695 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 _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 +var _0x05ef=['query','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','merge','where','options','includeAll','include','findAll','catch','params','rawAttributes','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','then','name','send','index','map','SmsApplication','fieldName','key','keys'];(function(_0xf4708,_0x9a827a){var _0x2ce099=function(_0x3bc403){while(--_0x3bc403){_0xf4708['push'](_0xf4708['shift']());}};_0x2ce099(++_0x9a827a);}(_0x05ef,0x64));var _0xf05e=function(_0xa3d443,_0x121b37){_0xa3d443=_0xa3d443-0x0;var _0x489486=_0x05ef[_0xa3d443];return _0x489486;};'use strict';var emlformat=require(_0xf05e('0x0'));var rimraf=require(_0xf05e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf05e('0x2'));var rp=require(_0xf05e('0x3'));var moment=require(_0xf05e('0x4'));var BPromise=require(_0xf05e('0x5'));var Mustache=require('mustache');var util=require(_0xf05e('0x6'));var path=require(_0xf05e('0x7'));var sox=require(_0xf05e('0x8'));var csv=require('to-csv');var ejs=require(_0xf05e('0x9'));var fs=require('fs');var fs_extra=require(_0xf05e('0xa'));var _=require(_0xf05e('0xb'));var squel=require('squel');var crypto=require(_0xf05e('0xc'));var jsforce=require(_0xf05e('0xd'));var deskjs=require(_0xf05e('0xe'));var toCsv=require(_0xf05e('0xf'));var querystring=require(_0xf05e('0x10'));var Papa=require(_0xf05e('0x11'));var Redis=require(_0xf05e('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xf05e('0x13'));var as=require(_0xf05e('0x14'));var hardwareService=require(_0xf05e('0x15'));var logger=require(_0xf05e('0x16'))(_0xf05e('0x17'));var utils=require(_0xf05e('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xf05e('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1b26ac,_0x1e1364){_0x1e1364=_0x1e1364||0xcc;return function(_0x72334f){if(_0x72334f){return _0x1b26ac[_0xf05e('0x1a')](_0x1e1364);}return _0x1b26ac[_0xf05e('0x1b')](_0x1e1364)[_0xf05e('0x1c')]();};}function respondWithResult(_0x203d0f,_0x467eaa){_0x467eaa=_0x467eaa||0xc8;return function(_0x334f52){if(_0x334f52){return _0x203d0f[_0xf05e('0x1b')](_0x467eaa)[_0xf05e('0x1d')](_0x334f52);}};}function respondWithFilteredResult(_0x513b33,_0x32e3a1){return function(_0x23d9ab){if(_0x23d9ab){var _0x12a546=typeof _0x32e3a1[_0xf05e('0x1e')]===_0xf05e('0x1f')&&typeof _0x32e3a1['limit']===_0xf05e('0x1f');var _0x23e683=_0x23d9ab['count'];var _0x4d9201=_0x12a546?0x0:_0x32e3a1[_0xf05e('0x1e')];var _0x5376c4=_0x12a546?_0x23d9ab[_0xf05e('0x20')]:_0x32e3a1[_0xf05e('0x1e')]+_0x32e3a1[_0xf05e('0x21')];var _0x87db9;if(_0x5376c4>=_0x23e683){_0x5376c4=_0x23e683;_0x87db9=0xc8;}else{_0x87db9=0xce;}_0x513b33[_0xf05e('0x1b')](_0x87db9);return _0x513b33[_0xf05e('0x22')](_0xf05e('0x23'),_0x4d9201+'-'+_0x5376c4+'/'+_0x23e683)[_0xf05e('0x1d')](_0x23d9ab);}return null;};}function patchUpdates(_0x54214a){return function(_0x19592b){try{jsonpatch[_0xf05e('0x24')](_0x19592b,_0x54214a,!![]);}catch(_0x2e9f36){return BPromise[_0xf05e('0x25')](_0x2e9f36);}return _0x19592b[_0xf05e('0x26')]();};}function saveUpdates(_0x20bb5e,_0x404d99){return function(_0xfd78e3){if(_0xfd78e3){return _0xfd78e3[_0xf05e('0x27')](_0x20bb5e)['then'](function(_0x4ff09e){return _0x4ff09e;});}return null;};}function removeEntity(_0x4470c2,_0x2fc091){return function(_0x342eeb){if(_0x342eeb){return _0x342eeb[_0xf05e('0x28')]()[_0xf05e('0x29')](function(){_0x4470c2[_0xf05e('0x1b')](0xcc)[_0xf05e('0x1c')]();});}};}function handleEntityNotFound(_0x45c340,_0x17cfb6){return function(_0x4af5eb){if(!_0x4af5eb){_0x45c340[_0xf05e('0x1a')](0x194);}return _0x4af5eb;};}function handleError(_0x19d53d,_0x1fd111){_0x1fd111=_0x1fd111||0x1f4;return function(_0x37ce80){logger['error'](_0x37ce80['stack']);if(_0x37ce80[_0xf05e('0x2a')]){delete _0x37ce80[_0xf05e('0x2a')];}_0x19d53d[_0xf05e('0x1b')](_0x1fd111)[_0xf05e('0x2b')](_0x37ce80);};}exports[_0xf05e('0x2c')]=function(_0x185f30,_0x5ce8b3){var _0x2676de={},_0x459976={},_0x1b0633={'count':0x0,'rows':[]};var _0x30aee3=_[_0xf05e('0x2d')](db[_0xf05e('0x2e')]['rawAttributes'],function(_0x113ef0){return{'name':_0x113ef0[_0xf05e('0x2f')],'type':_0x113ef0['type'][_0xf05e('0x30')]};});_0x459976['model']=_[_0xf05e('0x2d')](_0x30aee3,'name');_0x459976['query']=_[_0xf05e('0x31')](_0x185f30[_0xf05e('0x32')]);_0x459976['filters']=_['intersection'](_0x459976[_0xf05e('0x33')],_0x459976[_0xf05e('0x32')]);_0x2676de[_0xf05e('0x34')]=_[_0xf05e('0x35')](_0x459976['model'],qs[_0xf05e('0x36')](_0x185f30['query'][_0xf05e('0x36')]));_0x2676de[_0xf05e('0x34')]=_0x2676de[_0xf05e('0x34')][_0xf05e('0x37')]?_0x2676de[_0xf05e('0x34')]:_0x459976[_0xf05e('0x33')];if(!_0x185f30['query'][_0xf05e('0x38')](_0xf05e('0x39'))){_0x2676de[_0xf05e('0x21')]=qs[_0xf05e('0x21')](_0x185f30[_0xf05e('0x32')]['limit']);_0x2676de[_0xf05e('0x1e')]=qs[_0xf05e('0x1e')](_0x185f30[_0xf05e('0x32')]['offset']);}_0x2676de[_0xf05e('0x3a')]=qs[_0xf05e('0x3b')](_0x185f30[_0xf05e('0x32')][_0xf05e('0x3b')]);_0x2676de['where']=qs[_0xf05e('0x3c')](_[_0xf05e('0x3d')](_0x185f30[_0xf05e('0x32')],_0x459976[_0xf05e('0x3c')]),_0x30aee3);if(_0x185f30[_0xf05e('0x32')][_0xf05e('0x3e')]){_0x2676de['where']=_[_0xf05e('0x3f')](_0x2676de[_0xf05e('0x40')],{'$or':_['map'](_0x30aee3,function(_0x2269d2){if(_0x2269d2['type']!=='VIRTUAL'){var _0x4fb81a={};_0x4fb81a[_0x2269d2['name']]={'$like':'%'+_0x185f30[_0xf05e('0x32')][_0xf05e('0x3e')]+'%'};return _0x4fb81a;}})});}_0x2676de=_['merge']({},_0x2676de,_0x185f30[_0xf05e('0x41')]);var _0x372d13={'where':_0x2676de[_0xf05e('0x40')]};return db[_0xf05e('0x2e')][_0xf05e('0x20')](_0x372d13)[_0xf05e('0x29')](function(_0x1f4e3d){_0x1b0633[_0xf05e('0x20')]=_0x1f4e3d;if(_0x185f30[_0xf05e('0x32')][_0xf05e('0x42')]){_0x2676de[_0xf05e('0x43')]=[{'all':!![]}];}return db[_0xf05e('0x2e')][_0xf05e('0x44')](_0x2676de);})['then'](function(_0x1137ff){_0x1b0633['rows']=_0x1137ff;return _0x1b0633;})['then'](respondWithFilteredResult(_0x5ce8b3,_0x2676de))[_0xf05e('0x45')](handleError(_0x5ce8b3,null));};exports['show']=function(_0x38c4fc,_0x310942){var _0xb27dbd={'raw':!![],'where':{'id':_0x38c4fc[_0xf05e('0x46')]['id']}},_0x4c303b={};_0x4c303b['model']=_[_0xf05e('0x31')](db[_0xf05e('0x2e')][_0xf05e('0x47')]);_0x4c303b[_0xf05e('0x32')]=_[_0xf05e('0x31')](_0x38c4fc[_0xf05e('0x32')]);_0x4c303b['filters']=_[_0xf05e('0x35')](_0x4c303b['model'],_0x4c303b['query']);_0xb27dbd[_0xf05e('0x34')]=_['intersection'](_0x4c303b[_0xf05e('0x33')],qs['fields'](_0x38c4fc[_0xf05e('0x32')][_0xf05e('0x36')]));_0xb27dbd[_0xf05e('0x34')]=_0xb27dbd[_0xf05e('0x34')][_0xf05e('0x37')]?_0xb27dbd['attributes']:_0x4c303b[_0xf05e('0x33')];if(_0x38c4fc[_0xf05e('0x32')][_0xf05e('0x42')]){_0xb27dbd[_0xf05e('0x43')]=[{'all':!![]}];}_0xb27dbd=_[_0xf05e('0x3f')]({},_0xb27dbd,_0x38c4fc[_0xf05e('0x41')]);return db['SmsApplication'][_0xf05e('0x48')](_0xb27dbd)[_0xf05e('0x29')](handleEntityNotFound(_0x310942,null))[_0xf05e('0x29')](respondWithResult(_0x310942,null))[_0xf05e('0x45')](handleError(_0x310942,null));};exports[_0xf05e('0x49')]=function(_0xccdae3,_0x4c3d4f){return db['SmsApplication'][_0xf05e('0x49')](_0xccdae3['body'],{})[_0xf05e('0x29')](respondWithResult(_0x4c3d4f,0xc9))[_0xf05e('0x45')](handleError(_0x4c3d4f,null));};exports[_0xf05e('0x27')]=function(_0x3d3738,_0x124d0d){if(_0x3d3738['body']['id']){delete _0x3d3738[_0xf05e('0x4a')]['id'];}return db[_0xf05e('0x2e')]['find']({'where':{'id':_0x3d3738[_0xf05e('0x46')]['id']}})[_0xf05e('0x29')](handleEntityNotFound(_0x124d0d,null))[_0xf05e('0x29')](saveUpdates(_0x3d3738['body'],null))['then'](respondWithResult(_0x124d0d,null))[_0xf05e('0x45')](handleError(_0x124d0d,null));};exports[_0xf05e('0x28')]=function(_0x596392,_0x4144ee){return db['SmsApplication'][_0xf05e('0x48')]({'where':{'id':_0x596392[_0xf05e('0x46')]['id']}})[_0xf05e('0x29')](handleEntityNotFound(_0x4144ee,null))[_0xf05e('0x29')](removeEntity(_0x4144ee,null))[_0xf05e('0x45')](handleError(_0x4144ee,null));}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.model.js b/server/api/smsApplication/smsApplication.model.js index 71ac170..2284ad8 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 _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 +var _0x9e1f=['exports','define','SmsApplication','sms_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./smsApplication.attributes'];(function(_0x1e691f,_0x215f5f){var _0x5b37cb=function(_0x1ffe30){while(--_0x1ffe30){_0x1e691f['push'](_0x1e691f['shift']());}};_0x5b37cb(++_0x215f5f);}(_0x9e1f,0x9c));var _0xf9e1=function(_0xaa0f1,_0x5c0217){_0xaa0f1=_0xaa0f1-0x0;var _0x1ba692=_0x9e1f[_0xaa0f1];return _0x1ba692;};'use strict';var _=require(_0xf9e1('0x0'));var util=require(_0xf9e1('0x1'));var logger=require(_0xf9e1('0x2'))(_0xf9e1('0x3'));var moment=require(_0xf9e1('0x4'));var BPromise=require(_0xf9e1('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xf9e1('0x6'));var config=require(_0xf9e1('0x7'));var attributes=require(_0xf9e1('0x8'));module[_0xf9e1('0x9')]=function(_0x21a7b3,_0x512d06){return _0x21a7b3[_0xf9e1('0xa')](_0xf9e1('0xb'),attributes,{'tableName':_0xf9e1('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf9e1('0xd'),'collate':_0xf9e1('0xe')});}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.rpc.js b/server/api/smsApplication/smsApplication.rpc.js index f9b947a..4da9fa6 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 _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 +var _0xaaee=['../../config/environment','jayson/promise','client','http','request','then','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0xc51691,_0x130639){var _0x1e2d1c=function(_0x4d770f){while(--_0x4d770f){_0xc51691['push'](_0xc51691['shift']());}};_0x1e2d1c(++_0x130639);}(_0xaaee,0xa9));var _0xeaae=function(_0x12cd43,_0x252393){_0x12cd43=_0x12cd43-0x0;var _0x1d9d52=_0xaaee[_0x12cd43];return _0x1d9d52;};'use strict';var _=require(_0xeaae('0x0'));var util=require('util');var moment=require(_0xeaae('0x1'));var BPromise=require(_0xeaae('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeaae('0x3'));var db=require(_0xeaae('0x4'))['db'];var utils=require(_0xeaae('0x5'));var logger=require(_0xeaae('0x6'))('rpc');var config=require(_0xeaae('0x7'));var jayson=require(_0xeaae('0x8'));var client=jayson[_0xeaae('0x9')][_0xeaae('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3633ec,_0x30422f,_0x58b332){return new BPromise(function(_0x275d1c,_0x1701a9){return client[_0xeaae('0xb')](_0x3633ec,_0x58b332)[_0xeaae('0xc')](function(_0x3ec6d0){logger[_0xeaae('0xd')](_0xeaae('0xe'),_0x30422f,_0xeaae('0xf'));logger[_0xeaae('0x10')]('SmsApplication,\x20%s,\x20%s,\x20%s',_0x30422f,_0xeaae('0xf'),JSON[_0xeaae('0x11')](_0x3ec6d0));if(_0x3ec6d0[_0xeaae('0x12')]){if(_0x3ec6d0['error']['code']===0x1f4){logger[_0xeaae('0x12')](_0xeaae('0xe'),_0x30422f,_0x3ec6d0[_0xeaae('0x12')]['message']);return _0x1701a9(_0x3ec6d0[_0xeaae('0x12')][_0xeaae('0x13')]);}logger[_0xeaae('0x12')](_0xeaae('0xe'),_0x30422f,_0x3ec6d0['error']['message']);return _0x275d1c(_0x3ec6d0[_0xeaae('0x12')][_0xeaae('0x13')]);}else{logger[_0xeaae('0xd')](_0xeaae('0xe'),_0x30422f,'request\x20sent');_0x275d1c(_0x3ec6d0[_0xeaae('0x14')]['message']);}})[_0xeaae('0x15')](function(_0x1184c4){logger[_0xeaae('0x12')](_0xeaae('0xe'),_0x30422f,_0x1184c4);_0x1701a9(_0x1184c4);});});} \ No newline at end of file diff --git a/server/api/smsInteraction/index.js b/server/api/smsInteraction/index.js index c6c2fb7..1571868 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 _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 +var _0xb7e7=['download','post','create','addMessage','/:id/tags','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','update','delete','tracked','smsinteraction:destroy','destroy','removeTags','exports','multer','path','express','fs-extra','../../components/interaction/service','../../config/environment','./smsInteraction.controller','index','get','/describe','describe','/:id','isAuthenticated','show','/:id/messages','getMessages','/:id/download'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xb7e7,0x121));var _0x7b7e=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0xb7e7[_0x3ea913];return _0x2b4f28;};'use strict';var multer=require(_0x7b7e('0x0'));var util=require('util');var path=require(_0x7b7e('0x1'));var timeout=require('connect-timeout');var express=require(_0x7b7e('0x2'));var router=express['Router']();var fs_extra=require(_0x7b7e('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var controller=require(_0x7b7e('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x7b7e('0x7')]);router[_0x7b7e('0x8')](_0x7b7e('0x9'),auth['isAuthenticated'](),controller[_0x7b7e('0xa')]);router[_0x7b7e('0x8')](_0x7b7e('0xb'),auth[_0x7b7e('0xc')](),controller[_0x7b7e('0xd')]);router[_0x7b7e('0x8')](_0x7b7e('0xe'),auth['isAuthenticated'](),controller[_0x7b7e('0xf')]);router[_0x7b7e('0x8')](_0x7b7e('0x10'),auth[_0x7b7e('0xc')](),controller[_0x7b7e('0x11')]);router[_0x7b7e('0x12')]('/',auth[_0x7b7e('0xc')](),controller[_0x7b7e('0x13')]);router[_0x7b7e('0x12')]('/:id/messages',auth[_0x7b7e('0xc')](),controller[_0x7b7e('0x14')]);router['post'](_0x7b7e('0x15'),auth['isAuthenticated'](),interaction['tracked'](_0x7b7e('0x16'),_0x7b7e('0x17')),controller[_0x7b7e('0x18')]);router[_0x7b7e('0x19')](_0x7b7e('0xb'),auth['isAuthenticated'](),interaction['tracked'](_0x7b7e('0x16'),_0x7b7e('0x1a')),controller[_0x7b7e('0x1b')]);router[_0x7b7e('0x1c')](_0x7b7e('0xb'),auth[_0x7b7e('0xc')](),interaction[_0x7b7e('0x1d')](_0x7b7e('0x16'),_0x7b7e('0x1e')),controller[_0x7b7e('0x1f')]);router[_0x7b7e('0x1c')](_0x7b7e('0x15'),auth[_0x7b7e('0xc')](),controller[_0x7b7e('0x20')]);module[_0x7b7e('0x21')]=router; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.attributes.js b/server/api/smsInteraction/smsInteraction.attributes.js index 48da20e..902c67a 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 _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 +var _0x98a7=['exports','BOOLEAN','DATE','STRING','out','ENUM','sequelize','moment'];(function(_0x1df2c5,_0x43b1ed){var _0x3d9522=function(_0x211b06){while(--_0x211b06){_0x1df2c5['push'](_0x1df2c5['shift']());}};_0x3d9522(++_0x43b1ed);}(_0x98a7,0x9e));var _0x798a=function(_0x522bde,_0x33a2d8){_0x522bde=_0x522bde-0x0;var _0x39bbdf=_0x98a7[_0x522bde];return _0x39bbdf;};'use strict';var Sequelize=require(_0x798a('0x0'));var moment=require(_0x798a('0x1'));module[_0x798a('0x2')]={'closed':{'type':Sequelize[_0x798a('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x798a('0x4')]},'disposition':{'type':Sequelize[_0x798a('0x5')]},'secondDisposition':{'type':Sequelize[_0x798a('0x5')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x798a('0x5')]},'phone':{'type':Sequelize[_0x798a('0x5')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0x798a('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x798a('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x798a('0x7')]('in',_0x798a('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x798a('0x3')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.controller.js b/server/api/smsInteraction/smsInteraction.controller.js index 2b11387..b4ad818 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 _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 +var _0xd626=['../../components/export/pdf','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','register','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','then','sendStatus','error','stack','name','Users','map','fullname','Tags','TagIds','split','forEach','push','catch','index','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','select','field','color','from','tools_tags','u.id','u.fullname','ui.SmsInteractionId','left_join','users','u.id\x20=\x20ui.UserId','sms_interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','sms_accounts','me.SmsInteractionId\x20=\x20i.id','it.SmsInteractionId\x20=\x20i.id','t.id\x20=\x20it.TagId','expr','search','sqlOperator','conditions','unreadMessages','value','having','Contact','operator','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?','find','ContactId','Tag','union','User','$substring','UserId','text','start','body','buildExpression','some','concat','$gte','parse','$lte','null','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20>\x200','tag','isArray','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','filter','replace','isNumeric','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','i.id','Sequelize','QueryTypes','SELECT','clone','order','DESC','isEmpty','t.id\x20IN\x20?','SmsAccountId','i.SmsAccountId\x20IS\x20NOT\x20NULL','user','role','getSmsAccounts','i.SmsAccountId\x20IS\x20NULL','i.SmsAccountId\x20IN\x20?','agent','sequelize','count','toString','keyBy','merge','SmsInteraction','a.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.*','Contact.firstName','c.email','Contact.email','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','GROUP_CONCAT(DISTINCT\x20t.id)','all','rows','show','params','includeAll','include','create','update','describe','SmsMessage','addMessage','ids','getMessages','findOne','format','options','findAll','addTags','setTags','omit','spread','emit','smsInteractionTags:save','removeTags','download','unix','join','root','files','server','attachments','CmContact','lastName','Messages','createdAt','direction','secret','SmsAccount','mkdirSync','Account','Owner','YYYY-MM-DD\x20HH:mm:ss','closedAt','disposition','out','System','firstName','downloadInteraction.ejs','.pdf','Sms','createPdfFromHTML','log','fast-json-patch','bluebird','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'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0xd626,0x1a8));var _0x6d62=function(_0xd626e4,_0x1ac55d){_0xd626e4=_0xd626e4-0x0;var _0x3a839e=_0xd626[_0xd626e4];return _0x3a839e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6d62('0x0'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x6d62('0x1'));var Mustache=require('mustache');var util=require(_0x6d62('0x2'));var path=require(_0x6d62('0x3'));var sox=require('sox');var csv=require(_0x6d62('0x4'));var ejs=require(_0x6d62('0x5'));var fs=require('fs');var fs_extra=require(_0x6d62('0x6'));var _=require(_0x6d62('0x7'));var squel=require(_0x6d62('0x8'));var crypto=require(_0x6d62('0x9'));var jsforce=require(_0x6d62('0xa'));var deskjs=require(_0x6d62('0xb'));var toCsv=require('to-csv');var querystring=require(_0x6d62('0xc'));var Papa=require(_0x6d62('0xd'));var Redis=require(_0x6d62('0xe'));var authService=require(_0x6d62('0xf'));var qs=require(_0x6d62('0x10'));var as=require(_0x6d62('0x11'));var pdf=require(_0x6d62('0x12'));var hardwareService=require(_0x6d62('0x13'));var logger=require(_0x6d62('0x14'))(_0x6d62('0x15'));var utils=require(_0x6d62('0x16'));var config=require(_0x6d62('0x17'));var licenseUtil=require(_0x6d62('0x18'));var db=require(_0x6d62('0x19'))['db'];config[_0x6d62('0x1a')]=_[_0x6d62('0x1b')](config[_0x6d62('0x1a')],{'host':_0x6d62('0x1c'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./smsInteraction.socket')[_0x6d62('0x1d')](socket);function respondWithStatusCode(_0x37381d,_0x1b98fb){_0x1b98fb=_0x1b98fb||0xcc;return function(_0xd3716f){if(_0xd3716f){return _0x37381d['sendStatus'](_0x1b98fb);}return _0x37381d[_0x6d62('0x1e')](_0x1b98fb)[_0x6d62('0x1f')]();};}function respondWithResult(_0x64cf82,_0x1644d1){_0x1644d1=_0x1644d1||0xc8;return function(_0x54a79a){if(_0x54a79a){return _0x64cf82[_0x6d62('0x1e')](_0x1644d1)[_0x6d62('0x20')](_0x54a79a);}};}function respondWithFilteredResult(_0x1c4342,_0x432052){return function(_0x4eb34a){if(_0x4eb34a){var _0x4b8544=typeof _0x432052[_0x6d62('0x21')]===_0x6d62('0x22')&&typeof _0x432052[_0x6d62('0x23')]===_0x6d62('0x22');var _0x31a589=_0x4eb34a['count'];var _0x1c16a0=_0x4b8544?0x0:_0x432052[_0x6d62('0x21')];var _0x173d93=_0x4b8544?_0x4eb34a['count']:_0x432052[_0x6d62('0x21')]+_0x432052['limit'];var _0x55dcbe;if(_0x173d93>=_0x31a589){_0x173d93=_0x31a589;_0x55dcbe=0xc8;}else{_0x55dcbe=0xce;}_0x1c4342[_0x6d62('0x1e')](_0x55dcbe);return _0x1c4342[_0x6d62('0x24')](_0x6d62('0x25'),_0x1c16a0+'-'+_0x173d93+'/'+_0x31a589)[_0x6d62('0x20')](_0x4eb34a);}return null;};}function patchUpdates(_0x573cf1){return function(_0x4e4cbb){try{jsonpatch[_0x6d62('0x26')](_0x4e4cbb,_0x573cf1,!![]);}catch(_0x2b25fa){return BPromise[_0x6d62('0x27')](_0x2b25fa);}return _0x4e4cbb[_0x6d62('0x28')]();};}function saveUpdates(_0x4f3dc7,_0x4a56e1){return function(_0x2fecdb){if(_0x2fecdb){return _0x2fecdb['update'](_0x4f3dc7)[_0x6d62('0x29')](function(_0x226635){return _0x226635;});}return null;};}function removeEntity(_0x14ebfa,_0x3ab72c){return function(_0x1ec71e){if(_0x1ec71e){return _0x1ec71e['destroy']()['then'](function(){_0x14ebfa[_0x6d62('0x1e')](0xcc)[_0x6d62('0x1f')]();});}};}function handleEntityNotFound(_0x28e19b,_0x343345){return function(_0x3ae9a6){if(!_0x3ae9a6){_0x28e19b[_0x6d62('0x2a')](0x194);}return _0x3ae9a6;};}function handleError(_0x19122e,_0x19ad41){_0x19ad41=_0x19ad41||0x1f4;return function(_0x2256e2){logger[_0x6d62('0x2b')](_0x2256e2[_0x6d62('0x2c')]);if(_0x2256e2[_0x6d62('0x2d')]){delete _0x2256e2[_0x6d62('0x2d')];}_0x19122e['status'](_0x19ad41)['send'](_0x2256e2);};}function getInteractionUsers(_0x341cc8,_0x5dbd1d){return new BPromise(function(_0x5194b9,_0x58c686){try{if(_0x5dbd1d[_0x341cc8['id']]){_0x341cc8[_0x6d62('0x2e')]=_[_0x6d62('0x2f')](_0x5dbd1d[_0x341cc8['id']],function(_0x413048){return{'id':_0x413048['id'],'fullname':_0x413048[_0x6d62('0x30')]};});}}catch(_0x541e97){_0x58c686(_0x541e97);}_0x5194b9(_0x341cc8);});}function getInteractionTags(_0x4345d8,_0x2ad002){return new BPromise(function(_0x1b17d1,_0x174ac7){try{if(_0x4345d8['TagIds']){_0x4345d8[_0x6d62('0x31')]=[];_0x4345d8[_0x6d62('0x32')][_0x6d62('0x33')](',')[_0x6d62('0x34')](function(_0x9867bb){_0x4345d8['Tags'][_0x6d62('0x35')](_0x2ad002[_0x9867bb]);});}delete _0x4345d8[_0x6d62('0x32')];}catch(_0x9fd1d2){_0x174ac7(_0x9fd1d2);}_0x1b17d1(_0x4345d8);});}function updateSmsInteraction(_0x353c5a,_0x426769,_0x38199b){return new BPromise(function(_0x2dd0d6,_0x3f6fe3){return getInteractionUsers(_0x353c5a,_0x38199b)[_0x6d62('0x29')](function(_0x365df0){return getInteractionTags(_0x365df0,_0x426769);})[_0x6d62('0x29')](function(_0x32965e){_0x2dd0d6(_0x32965e);})[_0x6d62('0x36')](function(_0x58829b){_0x3f6fe3(_0x58829b);});});}exports[_0x6d62('0x37')]=function(_0x2d5390,_0x4a1d10){var _0x4d9257={},_0x18238d={},_0x49730f={'count':0x0,'rows':[]};var _0x391f05=_['map'](db['SmsInteraction'][_0x6d62('0x38')],function(_0x3d7091){return{'name':_0x3d7091[_0x6d62('0x39')],'type':_0x3d7091[_0x6d62('0x3a')]['key']};});_0x18238d['model']=_[_0x6d62('0x2f')](_0x391f05,'name');_0x18238d[_0x6d62('0x3b')]=_[_0x6d62('0x3c')](_0x2d5390[_0x6d62('0x3b')]);_0x18238d[_0x6d62('0x3d')]=_[_0x6d62('0x3e')](_0x18238d[_0x6d62('0x3f')],_0x18238d[_0x6d62('0x3b')]);_0x4d9257[_0x6d62('0x40')]=_['intersection'](_0x18238d['model'],qs[_0x6d62('0x41')](_0x2d5390['query'][_0x6d62('0x41')]));_0x4d9257['attributes']=_0x4d9257[_0x6d62('0x40')][_0x6d62('0x42')]?_0x4d9257['attributes']:_0x18238d[_0x6d62('0x3f')];if(!_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x43')](_0x6d62('0x44'))){_0x4d9257[_0x6d62('0x23')]=qs[_0x6d62('0x23')](_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x23')]);_0x4d9257['offset']=qs[_0x6d62('0x21')](_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x21')]);}_0x4d9257['order']=qs[_0x6d62('0x45')](_0x2d5390['query']['sort']);_0x4d9257[_0x6d62('0x46')]=qs['filters'](_[_0x6d62('0x47')](_0x2d5390[_0x6d62('0x3b')],_0x18238d[_0x6d62('0x3d')]),_0x391f05);var _0x2a0470=[];var _0x3a135f=squel[_0x6d62('0x48')]()[_0x6d62('0x49')]('id')[_0x6d62('0x49')]('name')[_0x6d62('0x49')](_0x6d62('0x4a'))[_0x6d62('0x4b')](_0x6d62('0x4c'));var _0x4536dd=squel['select']()['field'](_0x6d62('0x4d'))[_0x6d62('0x49')](_0x6d62('0x4e'))['field'](_0x6d62('0x4f'))[_0x6d62('0x4b')]('user_has_sms_interactions','ui')[_0x6d62('0x50')](_0x6d62('0x51'),'u',_0x6d62('0x52'));var _0x4d81c5=squel[_0x6d62('0x48')]()[_0x6d62('0x4b')](_0x6d62('0x53'),'i')[_0x6d62('0x50')](_0x6d62('0x54'),'c',_0x6d62('0x55'))[_0x6d62('0x50')]('users','o','o.id\x20=\x20i.UserId')['left_join'](_0x6d62('0x56'),'a','a.id\x20=\x20i.SmsAccountId')[_0x6d62('0x50')]('sms_messages','me',_0x6d62('0x57'))[_0x6d62('0x50')]('sms_interaction_has_tags','it',_0x6d62('0x58'))['left_join']('tools_tags','t',_0x6d62('0x59'));var _0x2d0bf2=squel['expr']();var _0x5185ea=[];var _0x2a1edd=squel[_0x6d62('0x5a')]();var _0x26352e;if(_0x2d5390['query'][_0x6d62('0x5b')]){_0x26352e=as['parseSearch'](_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x5b')]);var _0x5a3025=_0x26352e[_0x6d62('0x5c')];for(var _0x49e38a=0x0;_0x49e38a<_0x26352e[_0x6d62('0x5d')][_0x6d62('0x42')];_0x49e38a++){var _0x532656=_0x26352e[_0x6d62('0x5d')][_0x49e38a];var _0x28dc68='i';var _0x4b17e=_['find'](_0x391f05,['name',_0x532656['field']]);if(!_0x4b17e){switch(_0x532656[_0x6d62('0x49')]){case _0x6d62('0x5e'):if(_0x532656[_0x6d62('0x5f')]==0x1){_0x4d81c5['having']('`'+_0x532656['field']+'`\x20=\x200');}else{_0x4d81c5[_0x6d62('0x60')]('`'+_0x532656[_0x6d62('0x49')]+'`\x20>\x200');}break;case _0x6d62('0x61'):if(_0x532656[_0x6d62('0x62')]==='$substring'){if(_0x532656[_0x6d62('0x5f')][_0x6d62('0x33')]('\x20')[_0x6d62('0x42')]>0x1){_0x2d0bf2[_0x5a3025](_0x6d62('0x63'),qs['getFullTextValue'](_0x532656['value']),null);}else{var _0x2c03f7='%'+_0x532656['value']+'%';_0x2d0bf2[_0x5a3025](_0x6d62('0x64'),_0x2c03f7,_0x2c03f7,_0x2c03f7);}}else{_0x4b17e=_[_0x6d62('0x65')](_0x391f05,[_0x6d62('0x2d'),_0x6d62('0x66')]);_0x532656[_0x6d62('0x49')]=_0x6d62('0x66');_0xe0ad4a=as['buildExpression'](_0x28dc68,_0x4b17e['type'],_0x532656);_0x2d0bf2[_0x5a3025](_0xe0ad4a['text'],_0xe0ad4a[_0x6d62('0x5f')]['start'],_0xe0ad4a[_0x6d62('0x5f')]['end']);}break;case _0x6d62('0x67'):var _0x3f5213=_0x532656[_0x6d62('0x5f')][_0x6d62('0x33')](',')[_0x6d62('0x2f')](function(_0x56244c){return Number(_0x56244c);});_0x3f5213['forEach'](function(_0xceb709){_0x2a1edd['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0xceb709+',%');});_0x5185ea=_[_0x6d62('0x68')](_0x5185ea,_0x3f5213);break;case _0x6d62('0x69'):if(_0x532656[_0x6d62('0x62')]===_0x6d62('0x6a')){_0x2d0bf2[_0x5a3025]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x532656[_0x6d62('0x5f')]+'%',null);}else{_0x4b17e=_[_0x6d62('0x65')](_0x391f05,['name',_0x6d62('0x6b')]);_0x532656[_0x6d62('0x49')]='UserId';_0xe0ad4a=as['buildExpression'](_0x28dc68,_0x4b17e[_0x6d62('0x3a')],_0x532656);_0x2d0bf2[_0x5a3025](_0xe0ad4a[_0x6d62('0x6c')],_0xe0ad4a['value'][_0x6d62('0x6d')],_0xe0ad4a['value'][_0x6d62('0x1f')]);}break;case _0x6d62('0x6e'):_0xe0ad4a=as[_0x6d62('0x6f')]('me',null,_0x532656);_0x2d0bf2[_0x5a3025](_0xe0ad4a[_0x6d62('0x6c')],_0xe0ad4a['value'][_0x6d62('0x6d')],_0xe0ad4a['value'][_0x6d62('0x1f')]);break;}}else{var _0xe0ad4a=as[_0x6d62('0x6f')](_0x28dc68,_0x4b17e[_0x6d62('0x3a')],_0x532656);_0x2d0bf2[_0x5a3025](_0xe0ad4a[_0x6d62('0x6c')],_0xe0ad4a['value'][_0x6d62('0x6d')],_0xe0ad4a[_0x6d62('0x5f')][_0x6d62('0x1f')]);}}}else{var _0x7c21a9=_(_0x2d5390[_0x6d62('0x3b')])[_0x6d62('0x3c')]()['map'](function(_0x13af64){return _[_0x6d62('0x70')](_0x391f05,['name',_0x13af64])?_0x13af64:undefined;})['compact']()[_0x6d62('0x5f')]();if(!_['isEmpty'](_0x7c21a9)){_0x7c21a9[_0x6d62('0x34')](function(_0x72f636){if(_0x72f636==='SmsAccountId'){_0x4d81c5['where']('i.SmsAccountId\x20IN\x20?',[][_0x6d62('0x71')](_0x2d5390['query'][_0x72f636]));}else if(_0x72f636==='createdAt'){var _0x1da582=JSON['parse'](_0x2d5390[_0x6d62('0x3b')][_0x72f636])[_0x6d62('0x72')];var _0x2dc126=JSON[_0x6d62('0x73')](_0x2d5390[_0x6d62('0x3b')][_0x72f636])[_0x6d62('0x74')];_0x4d81c5['where']('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x1da582,_0x2dc126);}else{if(_0x2d5390['query'][_0x72f636]===_0x6d62('0x75')){_0x4d81c5[_0x6d62('0x46')]('i.'+_0x72f636+_0x6d62('0x76'));}else{_0x4d81c5[_0x6d62('0x46')]('i.'+_0x72f636+_0x6d62('0x77'),_0x2d5390['query'][_0x72f636]);}}});}if(_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x78')]){if(_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x78')]==0x1){_0x4d81c5[_0x6d62('0x60')]('`unreadMessages`\x20=\x200');}else{_0x4d81c5['having'](_0x6d62('0x79'));}}if(_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x7a')]){_0x5185ea=_[_0x6d62('0x7b')](_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x7a')])?_0x2d5390[_0x6d62('0x3b')]['tag']:new Array(_0x2d5390['query'][_0x6d62('0x7a')]);_0x5185ea[_0x6d62('0x34')](function(_0x22be0d){_0x2a1edd['or'](_0x6d62('0x7c'),'%,'+_0x22be0d+',%');});}if(_0x2d5390['query'][_0x6d62('0x7d')]){var _0x3bb590=_0x2d5390['query'][_0x6d62('0x7d')][_0x6d62('0x7e')]('\x5c','\x5c\x5c')[_0x6d62('0x7e')](/'/g,'\x27\x27');if(qs[_0x6d62('0x7f')](_0x3bb590)){_0x2d0bf2['or']('i.id\x20LIKE\x20?',_0x3bb590+'%')['or'](_0x6d62('0x80'),_0x3bb590+'%');}else{_0x2d0bf2['or'](_0x6d62('0x81'),qs[_0x6d62('0x82')](_0x3bb590))['or']('CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?',_0x3bb590+'%');}}}_0x4d81c5['where'](_0x2d0bf2);_0x4d81c5['group'](_0x6d62('0x83'));var _0x1fe263={'type':db[_0x6d62('0x84')][_0x6d62('0x85')][_0x6d62('0x86')],'raw':!![]};var _0x33e36f=_0x4d81c5[_0x6d62('0x87')]();_0x33e36f[_0x6d62('0x49')]('i.id');_0x33e36f[_0x6d62('0x49')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x6d62('0x5e'));if(_0x4d9257[_0x6d62('0x88')]){_0x4d9257[_0x6d62('0x88')]['forEach'](function(_0x20fc09){var _0x56cd50=_0x20fc09[0x0]==='contactName'?_0x20fc09[0x0]:'i.'+_0x20fc09[0x0];_0x4d81c5[_0x6d62('0x88')](_0x56cd50,_0x20fc09[0x1]===_0x6d62('0x89')?![]:!![]);});}if(!_[_0x6d62('0x8a')](_0x5185ea)){_0x4d81c5['having'](_0x2a1edd);_0x33e36f['where'](_0x6d62('0x8b'),_0x5185ea);}BPromise['resolve']()[_0x6d62('0x29')](function(){if(!_0x26352e){if(_0x2d5390['query'][_0x6d62('0x8c')])return;_0x33e36f['where'](_0x6d62('0x8d'));_0x4d81c5[_0x6d62('0x46')]('i.SmsAccountId\x20IS\x20NOT\x20NULL');return;}if(_0x2d5390[_0x6d62('0x8e')][_0x6d62('0x8f')]!=='agent')return;return _0x2d5390['user'][_0x6d62('0x90')]({'attributes':['id'],'raw':!![]})[_0x6d62('0x29')](function(_0x5d3489){if(_[_0x6d62('0x8a')](_0x5d3489)){_0x33e36f[_0x6d62('0x46')](_0x6d62('0x91'));_0x4d81c5[_0x6d62('0x46')](_0x6d62('0x91'));}else{_0x33e36f[_0x6d62('0x46')](_0x6d62('0x92'),_[_0x6d62('0x2f')](_0x5d3489,'id'));_0x4d81c5[_0x6d62('0x46')](_0x6d62('0x92'),_[_0x6d62('0x2f')](_0x5d3489,'id'));}});})[_0x6d62('0x29')](function(){if(_0x2d5390[_0x6d62('0x8e')][_0x6d62('0x8f')]===_0x6d62('0x93')&&!_0x26352e&&!_0x2d5390['query'][_0x6d62('0x8c')])return[];return db[_0x6d62('0x94')]['query'](_0x33e36f['toString'](),_0x1fe263);})['then'](function(_0x36f2cf){_0x49730f[_0x6d62('0x95')]=_0x36f2cf[_0x6d62('0x42')];if(_0x49730f['count']===0x0)return[];return db[_0x6d62('0x94')][_0x6d62('0x3b')](_0x3a135f[_0x6d62('0x96')](),_0x1fe263)[_0x6d62('0x29')](function(_0x3a46de){_0x2a0470=_[_0x6d62('0x97')](_0x3a46de,'id');_0x1fe263=_[_0x6d62('0x98')](_0x1fe263,{'model':db[_0x6d62('0x99')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0x2d5390[_0x6d62('0x3b')][_0x6d62('0x41')]){_0x4d9257[_0x6d62('0x40')][_0x6d62('0x34')](function(_0x5efa11){_0x4d81c5['field']('i.'+_0x5efa11);});}else{_0x4d81c5[_0x6d62('0x49')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x6d62('0x5e'));_0x4d81c5['field']('a.key','Account.key');_0x4d81c5[_0x6d62('0x49')](_0x6d62('0x9a'),'Account.mandatoryDisposition');_0x4d81c5[_0x6d62('0x49')](_0x6d62('0x9b'),_0x6d62('0x9c'));_0x4d81c5[_0x6d62('0x49')](_0x6d62('0x9d'));_0x4d81c5[_0x6d62('0x49')]('c.firstName',_0x6d62('0x9e'));_0x4d81c5['field']('c.lastName','Contact.lastName');_0x4d81c5[_0x6d62('0x49')](_0x6d62('0x9f'),_0x6d62('0xa0'));_0x4d81c5['field']('c.phone','Contact.phone');_0x4d81c5[_0x6d62('0x49')](_0x6d62('0xa1'),_0x6d62('0xa2'));_0x4d81c5[_0x6d62('0x49')](_0x6d62('0xa3'),_0x6d62('0xa4'));_0x4d81c5[_0x6d62('0x49')](_0x6d62('0xa5'),_0x6d62('0xa6'));_0x4d81c5['field'](_0x6d62('0xa7'),'Owner.internal');_0x4d81c5[_0x6d62('0x49')](_0x6d62('0xa8'),_0x6d62('0x32'));}if(_0x4d9257[_0x6d62('0x23')])_0x4d81c5[_0x6d62('0x23')](_0x4d9257[_0x6d62('0x23')]);if(_0x4d9257[_0x6d62('0x21')])_0x4d81c5[_0x6d62('0x21')](_0x4d9257['offset']);return db['sequelize']['query'](_0x4d81c5['toString'](),_0x1fe263);})[_0x6d62('0x29')](function(_0xdedf7){if(_0xdedf7['length']>0x0)_0x4536dd[_0x6d62('0x46')]('ui.SmsInteractionId\x20IN\x20?',_[_0x6d62('0x2f')](_0xdedf7,'id'));return db[_0x6d62('0x94')][_0x6d62('0x3b')](_0x4536dd[_0x6d62('0x96')](),_0x1fe263)['then'](function(_0x490351){var _0x30e845=_['groupBy'](_0x490351,'SmsInteractionId');var _0x15d48b=[];_0xdedf7[_0x6d62('0x34')](function(_0x516305){_0x15d48b[_0x6d62('0x35')](updateSmsInteraction(_0x516305,_0x2a0470,_0x30e845));});return BPromise[_0x6d62('0xa9')](_0x15d48b);});});})[_0x6d62('0x29')](function(_0x424259){_0x49730f[_0x6d62('0xaa')]=_0x424259;return _0x49730f;})[_0x6d62('0x29')](respondWithFilteredResult(_0x4a1d10,_0x4d9257))['catch'](handleError(_0x4a1d10,null));};exports[_0x6d62('0xab')]=function(_0x26955d,_0x5ad43a){var _0xa75c48={'raw':![],'where':{'id':_0x26955d[_0x6d62('0xac')]['id']}},_0x56927e={};_0x56927e[_0x6d62('0x3f')]=_[_0x6d62('0x3c')](db[_0x6d62('0x99')][_0x6d62('0x38')]);_0x56927e[_0x6d62('0x3b')]=_[_0x6d62('0x3c')](_0x26955d[_0x6d62('0x3b')]);_0x56927e[_0x6d62('0x3d')]=_['intersection'](_0x56927e['model'],_0x56927e[_0x6d62('0x3b')]);_0xa75c48[_0x6d62('0x40')]=_['intersection'](_0x56927e[_0x6d62('0x3f')],qs['fields'](_0x26955d[_0x6d62('0x3b')]['fields']));_0xa75c48['attributes']=_0xa75c48[_0x6d62('0x40')][_0x6d62('0x42')]?_0xa75c48[_0x6d62('0x40')]:_0x56927e['model'];if(_0x26955d['query'][_0x6d62('0xad')]){_0xa75c48[_0x6d62('0xae')]=[{'all':!![]}];}_0xa75c48=_[_0x6d62('0x98')]({},_0xa75c48,_0x26955d['options']);return db['SmsInteraction']['find'](_0xa75c48)[_0x6d62('0x29')](handleEntityNotFound(_0x5ad43a,null))[_0x6d62('0x29')](respondWithResult(_0x5ad43a,null))[_0x6d62('0x36')](handleError(_0x5ad43a,null));};exports['create']=function(_0x3676e6,_0x27ca49){return db['SmsInteraction'][_0x6d62('0xaf')](_0x3676e6[_0x6d62('0x6e')],{})['then'](respondWithResult(_0x27ca49,0xc9))[_0x6d62('0x36')](handleError(_0x27ca49,null));};exports[_0x6d62('0xb0')]=function(_0x43a45d,_0xc991c6){if(_0x43a45d[_0x6d62('0x6e')]['id']){delete _0x43a45d['body']['id'];}return db[_0x6d62('0x99')]['find']({'where':{'id':_0x43a45d['params']['id']}})[_0x6d62('0x29')](handleEntityNotFound(_0xc991c6,null))['then'](saveUpdates(_0x43a45d[_0x6d62('0x6e')],null))[_0x6d62('0x29')](respondWithResult(_0xc991c6,null))[_0x6d62('0x36')](handleError(_0xc991c6,null));};exports['destroy']=function(_0x45fe3c,_0x563f79){return db[_0x6d62('0x99')][_0x6d62('0x65')]({'where':{'id':_0x45fe3c[_0x6d62('0xac')]['id']}})[_0x6d62('0x29')](handleEntityNotFound(_0x563f79,null))['then'](removeEntity(_0x563f79,null))[_0x6d62('0x36')](handleError(_0x563f79,null));};exports[_0x6d62('0xb1')]=function(_0x4d4f89,_0x10e0b3){return db[_0x6d62('0x99')][_0x6d62('0xb1')]()[_0x6d62('0x29')](respondWithResult(_0x10e0b3,null))[_0x6d62('0x36')](handleError(_0x10e0b3,null));};exports['addMessage']=function(_0x128453,_0x2b84e7,_0x3a15a2){return db[_0x6d62('0xb2')][_0x6d62('0x65')]({'where':{'id':_0x128453[_0x6d62('0xac')]['id']}})['then'](handleEntityNotFound(_0x2b84e7,null))['then'](function(_0x54ff5c){if(_0x54ff5c){return _0x54ff5c[_0x6d62('0xb3')](_0x128453[_0x6d62('0x6e')][_0x6d62('0xb4')],_['omit'](_0x128453[_0x6d62('0x6e')],[_0x6d62('0xb4'),'id'])||{});}})[_0x6d62('0x29')](respondWithResult(_0x2b84e7,null))[_0x6d62('0x36')](handleError(_0x2b84e7,null));};exports[_0x6d62('0xb5')]=function(_0x378237,_0x2932b0,_0x48abfe){var _0x13691d={'raw':![],'where':{}};var _0x26ebea={};var _0x19d806={'count':0x0,'rows':[]};return db['SmsInteraction'][_0x6d62('0xb6')]({'where':{'id':_0x378237[_0x6d62('0xac')]['id']}})[_0x6d62('0x29')](handleEntityNotFound(_0x2932b0,null))[_0x6d62('0x29')](function(_0x2bbf71){if(_0x2bbf71){_0x26ebea[_0x6d62('0x3f')]=_['keys'](db['SmsMessage'][_0x6d62('0x38')]);_0x26ebea[_0x6d62('0x3b')]=_[_0x6d62('0x3c')](_0x378237['query']);_0x26ebea[_0x6d62('0x3d')]=_[_0x6d62('0x3e')](_0x26ebea[_0x6d62('0x3f')],_0x26ebea[_0x6d62('0x3b')]);_0x13691d['attributes']=_[_0x6d62('0x3e')](_0x26ebea['model'],qs['fields'](_0x378237[_0x6d62('0x3b')]['fields']));_0x13691d['attributes']=_0x13691d[_0x6d62('0x40')][_0x6d62('0x42')]?_0x13691d[_0x6d62('0x40')]:_0x26ebea[_0x6d62('0x3f')];if(!_0x378237['query']['hasOwnProperty'](_0x6d62('0x44'))){_0x13691d['limit']=qs['limit'](_0x378237['query'][_0x6d62('0x23')]);_0x13691d[_0x6d62('0x21')]=qs[_0x6d62('0x21')](_0x378237[_0x6d62('0x3b')]['offset']);}_0x13691d[_0x6d62('0x88')]=qs[_0x6d62('0x45')](_0x378237[_0x6d62('0x3b')][_0x6d62('0x45')]);_0x13691d[_0x6d62('0x46')]=qs['filters'](_[_0x6d62('0x47')](_0x378237['query'],_0x26ebea['filters']));_0x13691d['where']['SmsInteractionId']=_0x2bbf71['id'];if(_0x378237['query'][_0x6d62('0x7d')]){_0x13691d[_0x6d62('0x46')]=_[_0x6d62('0x98')](_0x13691d[_0x6d62('0x46')],{'$or':_[_0x6d62('0x2f')](_0x13691d[_0x6d62('0x40')],function(_0x405432){var _0x6630fd={};_0x6630fd[_0x405432]={'$like':'%'+_0x378237[_0x6d62('0x3b')]['filter']+'%'};return _0x6630fd;})});}if(_0x378237[_0x6d62('0x3b')]['$gte']){var _0x1b05aa=_0x378237[_0x6d62('0x3b')]['$gte'][_0x6d62('0x33')](',');var _0x1c6abd={};_0x1c6abd[_0x1b05aa[0x0]]={'$gte':moment(_0x1b05aa[0x1])[_0x6d62('0xb7')]('YYYY-MM-DD\x20HH:mm:ss')};_0x13691d[_0x6d62('0x46')]=_[_0x6d62('0x98')](_0x13691d[_0x6d62('0x46')],_0x1c6abd);}_0x13691d=_['merge']({},_0x13691d,_0x378237[_0x6d62('0xb8')]);return db['SmsMessage']['count']({'where':_0x13691d['where']})[_0x6d62('0x29')](function(_0x162211){_0x19d806[_0x6d62('0x95')]=_0x162211;if(_0x378237[_0x6d62('0x3b')]['includeAll']){_0x13691d[_0x6d62('0xae')]=[{'all':!![]}];}return db['SmsMessage'][_0x6d62('0xb9')](_0x13691d);})[_0x6d62('0x29')](function(_0x4cee39){_0x19d806[_0x6d62('0xaa')]=_0x4cee39;return _0x19d806;});}})[_0x6d62('0x29')](respondWithFilteredResult(_0x2932b0,_0x13691d))[_0x6d62('0x36')](handleError(_0x2932b0,null));};exports[_0x6d62('0xba')]=function(_0x5a8342,_0x5a8498,_0x5e2d6a){return db[_0x6d62('0x99')]['find']({'where':{'id':_0x5a8342['params']['id']}})[_0x6d62('0x29')](handleEntityNotFound(_0x5a8498,null))[_0x6d62('0x29')](function(_0x3cfd5a){if(_0x3cfd5a){return _0x3cfd5a[_0x6d62('0xbb')](_0x5a8342['body']['ids'],_[_0x6d62('0xbc')](_0x5a8342[_0x6d62('0x6e')],[_0x6d62('0xb4'),'id'])||{})[_0x6d62('0xbd')](function(){return db[_0x6d62('0x67')][_0x6d62('0xb9')]({'attributes':['id',_0x6d62('0x2d'),_0x6d62('0x4a')],'where':{'id':_0x5a8342['body'][_0x6d62('0xb4')]}});})[_0x6d62('0x29')](function(_0x16f266){socket[_0x6d62('0xbe')](_0x6d62('0xbf'),{'id':Number(_0x5a8342[_0x6d62('0xac')]['id']),'tags':_0x16f266||[]});return{'id':Number(_0x5a8342[_0x6d62('0xac')]['id']),'tags':_0x16f266||[]};});}})[_0x6d62('0x29')](respondWithResult(_0x5a8498,null))[_0x6d62('0x36')](handleError(_0x5a8498,null));};exports[_0x6d62('0xc0')]=function(_0x531bd8,_0xc5d492,_0x5e9ac4){return db[_0x6d62('0x99')]['find']({'where':{'id':_0x531bd8[_0x6d62('0xac')]['id']}})['then'](handleEntityNotFound(_0xc5d492,null))[_0x6d62('0x29')](function(_0x333e63){if(_0x333e63){return _0x333e63[_0x6d62('0xc0')](_0x531bd8[_0x6d62('0x3b')][_0x6d62('0xb4')]);}})['then'](respondWithStatusCode(_0xc5d492,null))[_0x6d62('0x36')](handleError(_0xc5d492,null));};exports[_0x6d62('0xc1')]=function(_0x564239,_0x1e6ff5){var _0x126519=moment()[_0x6d62('0xc2')]()[_0x6d62('0x96')]();var _0x57c137=path[_0x6d62('0xc3')](config[_0x6d62('0xc4')],'server',_0x6d62('0xc5'),'tmp');var _0x32d52e=path[_0x6d62('0xc3')](config['root'],_0x6d62('0xc6'),_0x6d62('0xc5'),_0x6d62('0xc7'));var _0x1d6a14=path[_0x6d62('0xc3')](_0x57c137,_0x126519);var _0xfa1385=util[_0x6d62('0xb7')]('transcript-%d-%s.zip',_0x564239[_0x6d62('0xac')]['id'],_0x126519);var _0x2af882=path[_0x6d62('0xc3')](_0x57c137,_0xfa1385);var _0x50a18d=[];_0x50a18d[_0x6d62('0x35')]({'model':db[_0x6d62('0x69')],'as':_0x6d62('0x69'),'attributes':['id',_0x6d62('0x30')],'raw':!![]});_0x50a18d[_0x6d62('0x35')]({'model':db[_0x6d62('0xc8')],'as':'Contact','attributes':['id','firstName',_0x6d62('0xc9')],'raw':!![]});var _0x619f12=[{'model':db[_0x6d62('0xb2')],'as':_0x6d62('0xca'),'attributes':['id',_0x6d62('0x6e'),_0x6d62('0xcb'),_0x6d62('0xcc'),_0x6d62('0xcd'),'read'],'include':_0x50a18d}];_0x619f12[_0x6d62('0x35')]({'model':db[_0x6d62('0xce')],'as':'Account','attributes':['id',_0x6d62('0x2d')]});_0x619f12[_0x6d62('0x35')]({'model':db[_0x6d62('0x69')],'as':'Owner','attributes':['id',_0x6d62('0x30')]});return db[_0x6d62('0x99')][_0x6d62('0x65')]({'where':{'id':_0x564239[_0x6d62('0xac')]['id']},'include':_0x619f12})[_0x6d62('0x29')](handleEntityNotFound(_0x1e6ff5,null))['then'](function(_0xe832ee){if(_0xe832ee){var _0x23158a=_0xe832ee['get']({'plain':!![]});fs[_0x6d62('0xcf')](_0x1d6a14);var _0x533804={'channel':'Sms','account':_0x23158a[_0x6d62('0xd0')]['name'],'agent':_0x23158a[_0x6d62('0xd1')]?_0x23158a['Owner'][_0x6d62('0x30')]:'N.A.','createdAt':moment(_0x23158a[_0x6d62('0xcb')])[_0x6d62('0xb7')](_0x6d62('0xd2'))[_0x6d62('0x96')](),'closedAt':_0x23158a['closed']?moment(_0x23158a[_0x6d62('0xd3')])[_0x6d62('0xb7')](_0x6d62('0xd2'))[_0x6d62('0x96')]():'','disposition':_0x23158a[_0x6d62('0xd4')],'messages':_(_0x23158a[_0x6d62('0xca')])[_0x6d62('0x7d')]({'secret':![]})[_0x6d62('0x2f')](function(_0x3dbf6b){return{'date':moment(_0x3dbf6b[_0x6d62('0xcb')])[_0x6d62('0xb7')](_0x6d62('0xd2'))[_0x6d62('0x96')](),'sender':_0x3dbf6b[_0x6d62('0xcc')]===_0x6d62('0xd5')?_0x3dbf6b[_0x6d62('0x69')]?_0x3dbf6b[_0x6d62('0x69')][_0x6d62('0x30')]:_0x6d62('0xd6'):_0x3dbf6b[_0x6d62('0x61')][_0x6d62('0xd7')]+(_0x3dbf6b[_0x6d62('0x61')]['lastName']?'\x20'+_0x3dbf6b[_0x6d62('0x61')][_0x6d62('0xc9')]:''),'body':_0x3dbf6b['body'],'direction':_0x3dbf6b['direction']===_0x6d62('0xd5')?'A':'C','secret':_0x3dbf6b[_0x6d62('0xcd')],'read':_0x3dbf6b[_0x6d62('0x78')]};})['value']()};return ejs['renderFile'](path['join'](config[_0x6d62('0xc4')],_0x6d62('0xc6'),'views',_0x6d62('0xd8')),{'interaction':_0x533804})[_0x6d62('0x29')](function(_0x30a6bb){var _0x2ae571=path[_0x6d62('0xc3')](_0x1d6a14,'transcript-'+_0x23158a['id']+'-'+_0x126519+_0x6d62('0xd9'));var _0x57c3b8={'path':_0x2ae571,'channel':_0x6d62('0xda'),'interactionId':_0x23158a['id']};return pdf[_0x6d62('0xdb')](_0x30a6bb,_0x57c3b8);})[_0x6d62('0x29')](function(){return new BPromise(function(_0x5f1866,_0xc057f3){zipdir(_0x1d6a14,{'saveTo':_0x2af882},function(_0x5710b1,_0x454519){if(_0x5710b1)return _0xc057f3(_0x5710b1);return _0x5f1866(_0x454519);});})[_0x6d62('0x29')](function(){return new BPromise(function(_0x442ea0,_0x86269f){rimraf(_0x1d6a14,function(_0x3b53f9){if(_0x3b53f9)_0x86269f(_0x3b53f9);return _0x442ea0();});});})['then'](function(){return _0x1e6ff5['download'](_0x2af882,_0xfa1385,function(_0x1d1ec1){if(_0x1d1ec1){console[_0x6d62('0xdc')]('err',_0x1d1ec1);}else{fs['unlinkSync'](_0x2af882);}});});});}else{return _0x1e6ff5['sendStatus'](0xc8);}})[_0x6d62('0x36')](handleError(_0x1e6ff5,null));}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.events.js b/server/api/smsInteraction/smsInteraction.events.js index bd972cd..ed3d0f2 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 _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 +var _0x6343=['then','map','findAll','setDataValue','emit','hasOwnProperty','hook','exports','SmsInteraction','../../mysqldb','remove'];(function(_0x1435e4,_0x1153a4){var _0x22c74a=function(_0x23ad95){while(--_0x23ad95){_0x1435e4['push'](_0x1435e4['shift']());}};_0x22c74a(++_0x1153a4);}(_0x6343,0x168));var _0x3634=function(_0x3f04ef,_0x33d2cb){_0x3f04ef=_0x3f04ef-0x0;var _0x10a19b=_0x6343[_0x3f04ef];return _0x10a19b;};'use strict';var EventEmitter=require('events');var SmsInteraction=require('../../mysqldb')['db'][_0x3634('0x0')];var SmsMessage=require(_0x3634('0x1'))['db']['SmsMessage'];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x3634('0x2')};function emitEvent(_0x420510){return function(_0x57c5e4,_0x247964,_0x388c18){_0x57c5e4['getUsers']({'attributes':['id'],'raw':!![]})[_0x3634('0x3')](function(_0xd40513){_0x57c5e4['setDataValue']('Users',_0xd40513[_0x3634('0x4')](function(_0x1bcdb2){return{'id':_0x1bcdb2['id']};}));return SmsMessage[_0x3634('0x5')]({'where':{'SmsInteractionId':_0x57c5e4['id'],'direction':'in','read':![]},'raw':!![]});})[_0x3634('0x3')](function(_0x2e8e8b){_0x57c5e4[_0x3634('0x6')]('unreadMessages',_0x2e8e8b['length']);SmsInteractionEvents[_0x3634('0x7')](_0x420510+':'+_0x57c5e4['id'],_0x57c5e4);SmsInteractionEvents[_0x3634('0x7')](_0x420510,_0x57c5e4);_0x388c18(null);})['catch'](_0x388c18(null));};}for(var e in events){if(events[_0x3634('0x8')](e)){var event=events[e];SmsInteraction[_0x3634('0x9')](e,emitEvent(event));}}module[_0x3634('0xa')]=SmsInteractionEvents; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.model.js b/server/api/smsInteraction/smsInteraction.model.js index 06f9dd0..4f4a983 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 _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 +var _0x89d9=['define','SmsInteraction','sms_interactions','changed','closed','YYYY-MM-DD\x20HH:mm:ss','lodash','util','moment','path','rimraf','../../config/environment','./smsInteraction.attributes'];(function(_0x4e43a0,_0x567e6f){var _0x41699b=function(_0x458937){while(--_0x458937){_0x4e43a0['push'](_0x4e43a0['shift']());}};_0x41699b(++_0x567e6f);}(_0x89d9,0x172));var _0x989d=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x89d9[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0x989d('0x0'));var util=require(_0x989d('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x989d('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x989d('0x3'));var rimraf=require(_0x989d('0x4'));var config=require(_0x989d('0x5'));var attributes=require(_0x989d('0x6'));module['exports']=function(_0x40dcb8,_0x3051a6){return _0x40dcb8[_0x989d('0x7')](_0x989d('0x8'),attributes,{'tableName':_0x989d('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x20435f,_0x421600,_0x46d297){if(_0x20435f[_0x989d('0xa')](_0x989d('0xb'))){_0x20435f['closedAt']=moment()['format'](_0x989d('0xc'));}_0x46d297(null,_0x20435f);}}});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.rpc.js b/server/api/smsInteraction/smsInteraction.rpc.js index 1282fe4..c5762ab 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 _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 +var _0x5f96=['error','message','info','result','catch','SmsInteraction','update','body','options','raw','where','attributes','then','AddTagsToSmsInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','request\x20sent','debug','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify'];(function(_0xf4a713,_0x381676){var _0x4e9975=function(_0x58f089){while(--_0x58f089){_0xf4a713['push'](_0xf4a713['shift']());}};_0x4e9975(++_0x381676);}(_0x5f96,0x15c));var _0x65f9=function(_0x4a53d,_0x58a95e){_0x4a53d=_0x4a53d-0x0;var _0x27410e=_0x5f96[_0x4a53d];return _0x27410e;};'use strict';var _=require(_0x65f9('0x0'));var util=require(_0x65f9('0x1'));var moment=require(_0x65f9('0x2'));var BPromise=require(_0x65f9('0x3'));var rs=require(_0x65f9('0x4'));var fs=require('fs');var Redis=require(_0x65f9('0x5'));var db=require(_0x65f9('0x6'))['db'];var utils=require(_0x65f9('0x7'));var logger=require(_0x65f9('0x8'))(_0x65f9('0x9'));var config=require('../../config/environment');var jayson=require(_0x65f9('0xa'));var client=jayson[_0x65f9('0xb')]['http']({'port':0x232a});config[_0x65f9('0xc')]=_[_0x65f9('0xd')](config[_0x65f9('0xc')],{'host':_0x65f9('0xe'),'port':0x18eb});var socket=require(_0x65f9('0xf'))(new Redis(config[_0x65f9('0xc')]));require(_0x65f9('0x10'))['register'](socket);function respondWithRpcPromise(_0x5e6c14,_0x9145bc,_0x35ad7f){return new BPromise(function(_0x41d4b0,_0x3badbd){return client['request'](_0x5e6c14,_0x35ad7f)['then'](function(_0xa7aa76){logger['info']('SmsInteraction,\x20%s,\x20%s',_0x9145bc,_0x65f9('0x11'));logger[_0x65f9('0x12')](_0x65f9('0x13'),_0x9145bc,_0x65f9('0x11'),JSON[_0x65f9('0x14')](_0xa7aa76));if(_0xa7aa76[_0x65f9('0x15')]){if(_0xa7aa76[_0x65f9('0x15')]['code']===0x1f4){logger[_0x65f9('0x15')]('SmsInteraction,\x20%s,\x20%s',_0x9145bc,_0xa7aa76['error'][_0x65f9('0x16')]);return _0x3badbd(_0xa7aa76['error']['message']);}logger[_0x65f9('0x15')]('SmsInteraction,\x20%s,\x20%s',_0x9145bc,_0xa7aa76['error']['message']);return _0x41d4b0(_0xa7aa76[_0x65f9('0x15')]['message']);}else{logger[_0x65f9('0x17')]('SmsInteraction,\x20%s,\x20%s',_0x9145bc,_0x65f9('0x11'));_0x41d4b0(_0xa7aa76[_0x65f9('0x18')]['message']);}})[_0x65f9('0x19')](function(_0x495b7f){logger[_0x65f9('0x15')]('SmsInteraction,\x20%s,\x20%s',_0x9145bc,_0x495b7f);_0x3badbd(_0x495b7f);});});}exports['UpdateSmsInteraction']=function(_0x4d0429){var _0x1f6b05=this;return new Promise(function(_0xa77ff9,_0x3229cb){return db[_0x65f9('0x1a')][_0x65f9('0x1b')](_0x4d0429[_0x65f9('0x1c')],{'raw':_0x4d0429[_0x65f9('0x1d')]?_0x4d0429[_0x65f9('0x1d')][_0x65f9('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4d0429[_0x65f9('0x1d')]?_0x4d0429[_0x65f9('0x1d')][_0x65f9('0x1f')]||null:null,'attributes':_0x4d0429['options']?_0x4d0429[_0x65f9('0x1d')][_0x65f9('0x20')]||null:null,'limit':_0x4d0429['options']?_0x4d0429[_0x65f9('0x1d')]['limit']||null:null})[_0x65f9('0x21')](function(_0x4974ee){logger[_0x65f9('0x17')]('UpdateSmsInteraction',_0x4d0429);logger[_0x65f9('0x12')]('UpdateSmsInteraction',_0x4d0429,JSON[_0x65f9('0x14')](_0x4974ee));_0xa77ff9(_0x4974ee);})[_0x65f9('0x19')](function(_0x3bfd3e){logger['error']('UpdateSmsInteraction',_0x3bfd3e[_0x65f9('0x16')],_0x4d0429);_0x3229cb(_0x1f6b05['error'](0x1f4,_0x3bfd3e[_0x65f9('0x16')]));});});};exports[_0x65f9('0x22')]=function(_0x3d1e04){return new Promise(function(_0x5e6c94,_0x448520){return db[_0x65f9('0x1a')][_0x65f9('0x23')]({'where':_0x3d1e04[_0x65f9('0x1d')]?_0x3d1e04[_0x65f9('0x1d')]['where']||null:null})[_0x65f9('0x21')](function(_0x18563f){if(_0x18563f){return _0x18563f[_0x65f9('0x24')](_0x3d1e04[_0x65f9('0x1c')][_0x65f9('0x25')],_[_0x65f9('0x26')](_0x3d1e04[_0x65f9('0x1c')],[_0x65f9('0x25'),'id'])||{});}})[_0x65f9('0x27')](function(_0x43a40b){logger[_0x65f9('0x17')](_0x65f9('0x28'),_0x3d1e04);logger[_0x65f9('0x12')](_0x65f9('0x28'),_0x3d1e04,JSON[_0x65f9('0x14')](_0x43a40b));_0x5e6c94(_0x43a40b);})[_0x65f9('0x19')](function(_0x1bf8c9){logger['error'](_0x65f9('0x28'),_0x1bf8c9[_0x65f9('0x16')],_0x3d1e04);_0x448520(_this[_0x65f9('0x15')](0x1f4,_0x1bf8c9[_0x65f9('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.socket.js b/server/api/smsInteraction/smsInteraction.socket.js index da44129..0ac9276 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 _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 +var _0x7ac9=['removeListener','length','save','update','emit'];(function(_0x3b9aac,_0x2d2b89){var _0x3f06fb=function(_0x52c5f7){while(--_0x52c5f7){_0x3b9aac['push'](_0x3b9aac['shift']());}};_0x3f06fb(++_0x2d2b89);}(_0x7ac9,0x17e));var _0x97ac=function(_0x49b978,_0x3d7d01){_0x49b978=_0x49b978-0x0;var _0x2cb081=_0x7ac9[_0x49b978];return _0x2cb081;};'use strict';var SmsInteractionEvents=require('./smsInteraction.events');var events=[_0x97ac('0x0'),'remove',_0x97ac('0x1')];function createListener(_0x1ffcbc,_0x4edddf){return function(_0xec9c3a){_0x4edddf[_0x97ac('0x2')](_0x1ffcbc,_0xec9c3a);};}function removeListener(_0x2353aa,_0x19f01a){return function(){SmsInteractionEvents[_0x97ac('0x3')](_0x2353aa,_0x19f01a);};}exports['register']=function(_0xd343ce){for(var _0x3e6dfb=0x0,_0x51f4b8=events[_0x97ac('0x4')];_0x3e6dfb<_0x51f4b8;_0x3e6dfb++){var _0x36e76=events[_0x3e6dfb];var _0x3479eb=createListener('smsInteraction:'+_0x36e76,_0xd343ce);SmsInteractionEvents['on'](_0x36e76,_0x3479eb);}}; \ No newline at end of file diff --git a/server/api/smsMessage/index.js b/server/api/smsMessage/index.js index 311fd6f..4511b60 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 _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 +var _0x11ec=['create','/:id/status','status','put','update','/:id/accept','/:id/reject','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./smsMessage.controller','get','isAuthenticated','/describe','describe','/:id','post','smsmessage:create'];(function(_0x46d41b,_0x11bc9b){var _0x25c03a=function(_0x43de70){while(--_0x43de70){_0x46d41b['push'](_0x46d41b['shift']());}};_0x25c03a(++_0x11bc9b);}(_0x11ec,0xda));var _0xc11e=function(_0x3c7d53,_0x2826d0){_0x3c7d53=_0x3c7d53-0x0;var _0x2c8387=_0x11ec[_0x3c7d53];return _0x2c8387;};'use strict';var multer=require(_0xc11e('0x0'));var util=require(_0xc11e('0x1'));var path=require(_0xc11e('0x2'));var timeout=require(_0xc11e('0x3'));var express=require(_0xc11e('0x4'));var router=express[_0xc11e('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xc11e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xc11e('0x7'));var controller=require(_0xc11e('0x8'));router[_0xc11e('0x9')]('/',auth[_0xc11e('0xa')](),controller['index']);router[_0xc11e('0x9')](_0xc11e('0xb'),auth['isAuthenticated'](),controller[_0xc11e('0xc')]);router['get'](_0xc11e('0xd'),auth['isAuthenticated'](),controller['show']);router[_0xc11e('0xe')]('/',auth[_0xc11e('0xa')](),interaction['tracked']('sms',_0xc11e('0xf')),controller[_0xc11e('0x10')]);router[_0xc11e('0xe')](_0xc11e('0x11'),controller[_0xc11e('0x12')]);router[_0xc11e('0x13')](_0xc11e('0xd'),auth['isAuthenticated'](),controller[_0xc11e('0x14')]);router[_0xc11e('0x13')](_0xc11e('0x15'),auth[_0xc11e('0xa')](),controller['accept']);router[_0xc11e('0x13')](_0xc11e('0x16'),auth[_0xc11e('0xa')](),controller['reject']);router[_0xc11e('0x17')]('/:id',auth[_0xc11e('0xa')](),controller[_0xc11e('0x18')]);module[_0xc11e('0x19')]=router; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.attributes.js b/server/api/smsMessage/smsMessage.attributes.js index 9be6f32..eaeb0c5 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 _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 +var _0x643e=['DATE','sequelize','TEXT','BOOLEAN','out','STRING'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x643e,0x193));var _0xe643=function(_0x2af481,_0x2f5976){_0x2af481=_0x2af481-0x0;var _0x509d39=_0x643e[_0x2af481];return _0x509d39;};'use strict';var Sequelize=require(_0xe643('0x0'));module['exports']={'body':{'type':Sequelize[_0xe643('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xe643('0x2')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in','out'),'defaultValue':_0xe643('0x3'),'allowNull':![]},'messageId':{'type':Sequelize[_0xe643('0x4')](0xbe)},'phone':{'type':Sequelize[_0xe643('0x4')]},'readAt':{'type':Sequelize[_0xe643('0x5')]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0xe643('0x1')]}}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.controller.js b/server/api/smsMessage/smsMessage.controller.js index 42b5ae1..4f86fa7 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 _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 +var _0xb138=['CmContact','get','read1stAt','interaction','info','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','startsWith','cf_','push','ContactId','Sequelize','QueryTypes','SELECT','contact','manual','SIP/%s','channel','event','EventManager','acceptmessage','reject','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','rejectmessage','SmsAccount','SmsAccountId','received\x20delivery\x20report\x20from','inspect','twilio','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','sent','delivered','Status','infobip','results','groupName','DELIVERED','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','client','http','request','then','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsMessage,\x20%s,\x20%s','message','sendStatus','status','end','json','undefined','limit','count','offset','set','save','update','stack','name','send','index','map','SmsMessage','rawAttributes','fieldName','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','where','pick','filter','merge','type','options','includeAll','findAll','rows','catch','params','keys','include','find','create','body','destroy','describe','sms-interactions','accept','sms','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent'];(function(_0x239122,_0x18489a){var _0x4d9657=function(_0x4a4d9f){while(--_0x4a4d9f){_0x239122['push'](_0x239122['shift']());}};_0x4d9657(++_0x18489a);}(_0xb138,0x1dd));var _0x8b13=function(_0x440371,_0x2c532e){_0x440371=_0x440371-0x0;var _0x50ff5e=_0xb138[_0x440371];return _0x50ff5e;};'use strict';var emlformat=require(_0x8b13('0x0'));var rimraf=require(_0x8b13('0x1'));var zipdir=require(_0x8b13('0x2'));var jsonpatch=require(_0x8b13('0x3'));var rp=require(_0x8b13('0x4'));var moment=require(_0x8b13('0x5'));var BPromise=require(_0x8b13('0x6'));var Mustache=require('mustache');var util=require(_0x8b13('0x7'));var path=require(_0x8b13('0x8'));var sox=require(_0x8b13('0x9'));var csv=require('to-csv');var ejs=require(_0x8b13('0xa'));var fs=require('fs');var fs_extra=require(_0x8b13('0xb'));var _=require('lodash');var squel=require(_0x8b13('0xc'));var crypto=require(_0x8b13('0xd'));var jsforce=require(_0x8b13('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x8b13('0xf'));var querystring=require(_0x8b13('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x8b13('0x11'));var qs=require(_0x8b13('0x12'));var as=require(_0x8b13('0x13'));var hardwareService=require(_0x8b13('0x14'));var logger=require(_0x8b13('0x15'))('api');var utils=require(_0x8b13('0x16'));var config=require(_0x8b13('0x17'));var licenseUtil=require(_0x8b13('0x18'));var db=require(_0x8b13('0x19'))['db'];config[_0x8b13('0x1a')]=_[_0x8b13('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x8b13('0x1c'))(new Redis(config[_0x8b13('0x1a')]));require('./smsMessage.socket')['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x8b13('0x1d')][_0x8b13('0x1e')]({'port':0x232c});var client9002=jayson[_0x8b13('0x1d')][_0x8b13('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x13f956,_0x542357,_0x1c6c99,_0xea7881){return new BPromise(function(_0x393bc1,_0x178f15){var _0x3eed21=_0xea7881||client;return _0x3eed21[_0x8b13('0x1f')](_0x13f956,_0x1c6c99)[_0x8b13('0x20')](function(_0x441ddc){logger['info']('SmsMessage,\x20%s,\x20%s',_0x542357,_0x8b13('0x21'));logger[_0x8b13('0x22')](_0x8b13('0x23'),_0x542357,_0x8b13('0x21'),JSON[_0x8b13('0x24')](_0x441ddc));if(_0x441ddc[_0x8b13('0x25')]){if(_0x441ddc['error'][_0x8b13('0x26')]===0x1f4){logger[_0x8b13('0x25')](_0x8b13('0x27'),_0x542357,_0x441ddc['error']['message']);return _0x178f15(_0x441ddc[_0x8b13('0x25')][_0x8b13('0x28')]);}logger['error'](_0x8b13('0x27'),_0x542357,_0x441ddc[_0x8b13('0x25')][_0x8b13('0x28')]);return _0x393bc1(_0x441ddc[_0x8b13('0x25')][_0x8b13('0x28')]);}else{logger['info'](_0x8b13('0x27'),_0x542357,_0x8b13('0x21'));_0x393bc1(_0x441ddc['result'][_0x8b13('0x28')]);}})['catch'](function(_0x420772){logger[_0x8b13('0x25')]('SmsMessage,\x20%s,\x20%s',_0x542357,_0x420772);_0x178f15(_0x420772);});});}function respondWithStatusCode(_0x3f1756,_0x3223d8){_0x3223d8=_0x3223d8||0xcc;return function(_0x4f8e58){if(_0x4f8e58){return _0x3f1756[_0x8b13('0x29')](_0x3223d8);}return _0x3f1756[_0x8b13('0x2a')](_0x3223d8)[_0x8b13('0x2b')]();};}function respondWithResult(_0x4048e4,_0x27fef3){_0x27fef3=_0x27fef3||0xc8;return function(_0x54cdfc){if(_0x54cdfc){return _0x4048e4[_0x8b13('0x2a')](_0x27fef3)[_0x8b13('0x2c')](_0x54cdfc);}};}function respondWithFilteredResult(_0x3475d8,_0x1511bf){return function(_0x114b01){if(_0x114b01){var _0x2bb51d=typeof _0x1511bf['offset']===_0x8b13('0x2d')&&typeof _0x1511bf[_0x8b13('0x2e')]===_0x8b13('0x2d');var _0x9d2377=_0x114b01[_0x8b13('0x2f')];var _0x29946e=_0x2bb51d?0x0:_0x1511bf[_0x8b13('0x30')];var _0x44bce2=_0x2bb51d?_0x114b01[_0x8b13('0x2f')]:_0x1511bf['offset']+_0x1511bf[_0x8b13('0x2e')];var _0x193965;if(_0x44bce2>=_0x9d2377){_0x44bce2=_0x9d2377;_0x193965=0xc8;}else{_0x193965=0xce;}_0x3475d8[_0x8b13('0x2a')](_0x193965);return _0x3475d8[_0x8b13('0x31')]('Content-Range',_0x29946e+'-'+_0x44bce2+'/'+_0x9d2377)['json'](_0x114b01);}return null;};}function patchUpdates(_0xb7771d){return function(_0x5cedea){try{jsonpatch['apply'](_0x5cedea,_0xb7771d,!![]);}catch(_0x3b1dfa){return BPromise['reject'](_0x3b1dfa);}return _0x5cedea[_0x8b13('0x32')]();};}function saveUpdates(_0x408626,_0x40fc29){return function(_0x39a3d2){if(_0x39a3d2){return _0x39a3d2[_0x8b13('0x33')](_0x408626)[_0x8b13('0x20')](function(_0x1fcd82){return _0x1fcd82;});}return null;};}function removeEntity(_0x33313c,_0x269743){return function(_0x1b313d){if(_0x1b313d){return _0x1b313d['destroy']()[_0x8b13('0x20')](function(){_0x33313c[_0x8b13('0x2a')](0xcc)[_0x8b13('0x2b')]();});}};}function handleEntityNotFound(_0x4141db,_0x1ff25c){return function(_0x24179a){if(!_0x24179a){_0x4141db[_0x8b13('0x29')](0x194);}return _0x24179a;};}function handleError(_0x241687,_0x5c67b1){_0x5c67b1=_0x5c67b1||0x1f4;return function(_0x219bdf){logger['error'](_0x219bdf[_0x8b13('0x34')]);if(_0x219bdf[_0x8b13('0x35')]){delete _0x219bdf[_0x8b13('0x35')];}_0x241687[_0x8b13('0x2a')](_0x5c67b1)[_0x8b13('0x36')](_0x219bdf);};}exports[_0x8b13('0x37')]=function(_0x4ec1a5,_0x499ccf){var _0xe6963d={},_0x5daee9={},_0x3ed902={'count':0x0,'rows':[]};var _0x5b7591=_[_0x8b13('0x38')](db[_0x8b13('0x39')][_0x8b13('0x3a')],function(_0x2bc877){return{'name':_0x2bc877[_0x8b13('0x3b')],'type':_0x2bc877['type']['key']};});_0x5daee9[_0x8b13('0x3c')]=_['map'](_0x5b7591,_0x8b13('0x35'));_0x5daee9[_0x8b13('0x3d')]=_['keys'](_0x4ec1a5[_0x8b13('0x3d')]);_0x5daee9[_0x8b13('0x3e')]=_[_0x8b13('0x3f')](_0x5daee9[_0x8b13('0x3c')],_0x5daee9[_0x8b13('0x3d')]);_0xe6963d[_0x8b13('0x40')]=_[_0x8b13('0x3f')](_0x5daee9['model'],qs['fields'](_0x4ec1a5['query'][_0x8b13('0x41')]));_0xe6963d[_0x8b13('0x40')]=_0xe6963d[_0x8b13('0x40')][_0x8b13('0x42')]?_0xe6963d[_0x8b13('0x40')]:_0x5daee9[_0x8b13('0x3c')];if(!_0x4ec1a5['query'][_0x8b13('0x43')]('nolimit')){_0xe6963d[_0x8b13('0x2e')]=qs['limit'](_0x4ec1a5[_0x8b13('0x3d')][_0x8b13('0x2e')]);_0xe6963d[_0x8b13('0x30')]=qs[_0x8b13('0x30')](_0x4ec1a5[_0x8b13('0x3d')][_0x8b13('0x30')]);}_0xe6963d[_0x8b13('0x44')]=qs['sort'](_0x4ec1a5['query']['sort']);_0xe6963d[_0x8b13('0x45')]=qs[_0x8b13('0x3e')](_[_0x8b13('0x46')](_0x4ec1a5[_0x8b13('0x3d')],_0x5daee9['filters']),_0x5b7591);if(_0x4ec1a5['query'][_0x8b13('0x47')]){_0xe6963d['where']=_[_0x8b13('0x48')](_0xe6963d[_0x8b13('0x45')],{'$or':_[_0x8b13('0x38')](_0x5b7591,function(_0x28ae75){if(_0x28ae75[_0x8b13('0x49')]!=='VIRTUAL'){var _0x2df766={};_0x2df766[_0x28ae75[_0x8b13('0x35')]]={'$like':'%'+_0x4ec1a5[_0x8b13('0x3d')][_0x8b13('0x47')]+'%'};return _0x2df766;}})});}_0xe6963d=_[_0x8b13('0x48')]({},_0xe6963d,_0x4ec1a5[_0x8b13('0x4a')]);var _0xf6dc93={'where':_0xe6963d[_0x8b13('0x45')]};return db[_0x8b13('0x39')]['count'](_0xf6dc93)[_0x8b13('0x20')](function(_0x59d863){_0x3ed902[_0x8b13('0x2f')]=_0x59d863;if(_0x4ec1a5[_0x8b13('0x3d')][_0x8b13('0x4b')]){_0xe6963d['include']=[{'all':!![]}];}return db[_0x8b13('0x39')][_0x8b13('0x4c')](_0xe6963d);})[_0x8b13('0x20')](function(_0x4129c0){_0x3ed902[_0x8b13('0x4d')]=_0x4129c0;return _0x3ed902;})[_0x8b13('0x20')](respondWithFilteredResult(_0x499ccf,_0xe6963d))[_0x8b13('0x4e')](handleError(_0x499ccf,null));};exports['show']=function(_0x2c8594,_0x4c833d){var _0x19b70b={'raw':!![],'where':{'id':_0x2c8594[_0x8b13('0x4f')]['id']}},_0x16bc31={};_0x16bc31[_0x8b13('0x3c')]=_[_0x8b13('0x50')](db[_0x8b13('0x39')][_0x8b13('0x3a')]);_0x16bc31[_0x8b13('0x3d')]=_[_0x8b13('0x50')](_0x2c8594[_0x8b13('0x3d')]);_0x16bc31[_0x8b13('0x3e')]=_[_0x8b13('0x3f')](_0x16bc31[_0x8b13('0x3c')],_0x16bc31[_0x8b13('0x3d')]);_0x19b70b[_0x8b13('0x40')]=_[_0x8b13('0x3f')](_0x16bc31[_0x8b13('0x3c')],qs['fields'](_0x2c8594[_0x8b13('0x3d')][_0x8b13('0x41')]));_0x19b70b['attributes']=_0x19b70b[_0x8b13('0x40')][_0x8b13('0x42')]?_0x19b70b[_0x8b13('0x40')]:_0x16bc31[_0x8b13('0x3c')];if(_0x2c8594[_0x8b13('0x3d')][_0x8b13('0x4b')]){_0x19b70b[_0x8b13('0x51')]=[{'all':!![]}];}_0x19b70b=_[_0x8b13('0x48')]({},_0x19b70b,_0x2c8594[_0x8b13('0x4a')]);return db[_0x8b13('0x39')][_0x8b13('0x52')](_0x19b70b)[_0x8b13('0x20')](handleEntityNotFound(_0x4c833d,null))[_0x8b13('0x20')](respondWithResult(_0x4c833d,null))[_0x8b13('0x4e')](handleError(_0x4c833d,null));};exports[_0x8b13('0x53')]=function(_0x49e5f4,_0x1e0b0b){return db[_0x8b13('0x39')]['create'](_0x49e5f4[_0x8b13('0x54')],{})[_0x8b13('0x20')](respondWithResult(_0x1e0b0b,0xc9))[_0x8b13('0x4e')](handleError(_0x1e0b0b,null));};exports[_0x8b13('0x33')]=function(_0x1263f4,_0x4f81ae){if(_0x1263f4[_0x8b13('0x54')]['id']){delete _0x1263f4[_0x8b13('0x54')]['id'];}return db[_0x8b13('0x39')]['find']({'where':{'id':_0x1263f4[_0x8b13('0x4f')]['id']}})[_0x8b13('0x20')](handleEntityNotFound(_0x4f81ae,null))['then'](saveUpdates(_0x1263f4[_0x8b13('0x54')],null))[_0x8b13('0x20')](respondWithResult(_0x4f81ae,null))[_0x8b13('0x4e')](handleError(_0x4f81ae,null));};exports[_0x8b13('0x55')]=function(_0x49e5cd,_0x13c8bd){return db[_0x8b13('0x39')]['find']({'where':{'id':_0x49e5cd[_0x8b13('0x4f')]['id']}})[_0x8b13('0x20')](handleEntityNotFound(_0x13c8bd,null))[_0x8b13('0x20')](removeEntity(_0x13c8bd,null))[_0x8b13('0x4e')](handleError(_0x13c8bd,null));};exports['describe']=function(_0x2bdc5c,_0x3b785d){return db[_0x8b13('0x39')][_0x8b13('0x56')]()[_0x8b13('0x20')](respondWithResult(_0x3b785d,null))[_0x8b13('0x4e')](handleError(_0x3b785d,null));};var interaction_log=require('../../config/logger')(_0x8b13('0x57'));exports[_0x8b13('0x58')]=function(_0x445283,_0x4f2bcc,_0xe7f2fc){var _0x576c91={'agent':{},'channel':_0x8b13('0x59')};if(_0x445283[_0x8b13('0x54')]['id']){delete _0x445283['body']['id'];}_0x445283['body']['read']=!![];_0x445283['body']['readAt']=moment()[_0x8b13('0x5a')](_0x8b13('0x5b'));_0x445283['body'][_0x8b13('0x5c')]=_0x445283['body'][_0x8b13('0x5c')]||_0x445283[_0x8b13('0x5d')]['id'];_0x576c91[_0x8b13('0x5e')]['id']=_0x445283[_0x8b13('0x54')][_0x8b13('0x5c')];return db[_0x8b13('0x39')][_0x8b13('0x52')]({'where':{'id':_0x445283['params']['id'],'UserId':null},'include':[{'model':db[_0x8b13('0x5f')],'as':'Contact'}]})[_0x8b13('0x20')](handleEntityNotFound(_0x4f2bcc,null))[_0x8b13('0x20')](saveUpdates(_0x445283[_0x8b13('0x54')],null))[_0x8b13('0x20')](function(_0x3fff75){if(_0x3fff75){_0x576c91[_0x8b13('0x28')]=_0x3fff75[_0x8b13('0x60')]({'plain':!![]});return db['SmsInteraction'][_0x8b13('0x52')]({'where':{'id':_0x3fff75['SmsInteractionId']}});}return null;})[_0x8b13('0x20')](handleEntityNotFound(_0x4f2bcc,null))[_0x8b13('0x20')](function(_0x51db28){if(_0x51db28){return _0x51db28[_0x8b13('0x33')]({'UserId':_0x445283[_0x8b13('0x54')]['UserId'],'read1stAt':_['isNil'](_0x51db28[_0x8b13('0x61')])?moment()[_0x8b13('0x5a')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x8b13('0x20')](function(_0x43dfcc){if(_0x43dfcc){_0x576c91[_0x8b13('0x62')]=_0x43dfcc['get']({'plain':!![]});interaction_log[_0x8b13('0x63')](_0x8b13('0x64'),_0x445283[_0x8b13('0x5d')]['id'],_0x445283[_0x8b13('0x5d')]['name'],_0x445283[_0x8b13('0x5d')][_0x8b13('0x65')],_0x576c91['interaction']['id'],_0x445283[_0x8b13('0x54')]?JSON[_0x8b13('0x24')](_0x445283[_0x8b13('0x54')]):_0x8b13('0x66'));return respondWithRpcPromise(_0x8b13('0x67'),_0x8b13('0x68'),_0x576c91);}return null;})[_0x8b13('0x20')](function(_0x1bb954){return db[_0x8b13('0x5f')][_0x8b13('0x56')]()[_0x8b13('0x20')](function(_0x46c25c){var _0x26b888=[];for(var _0x1db235=0x0;_0x1db235=0x0){return _0xa97f27[_0x8b13('0x33')]({'read':!![]});}else{logger['error'](_0x8b13('0x84'),_0x8b13('0x2a'),'plivio',util['inspect'](_0x7bdc14['body'],{'showHidden':![],'depth':null}));}break;case _0x8b13('0x8b'):var _0x37507e=_0x7bdc14[_0x8b13('0x54')][_0x8b13('0x8c')][0x0];if(_0x37507e[_0x8b13('0x2a')][_0x8b13('0x8d')]===_0x8b13('0x8e')){return _0xa97f27[_0x8b13('0x33')]({'read':!![]});}else{logger['error'](_0x8b13('0x84'),'status',_0x8b13('0x8b'),util['inspect'](_0x7bdc14[_0x8b13('0x54')],{'showHidden':![],'depth':null}));}break;}return _0xa97f27;}})[_0x8b13('0x20')](respondWithResult(_0x5f190a,null))['catch'](handleError(_0x5f190a,null));}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.events.js b/server/api/smsMessage/smsMessage.events.js index d7b878f..2141cc7 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 _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 +var _0x84bf=['save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners'];(function(_0x37ffea,_0x25b006){var _0x2e2615=function(_0x5e6c74){while(--_0x5e6c74){_0x37ffea['push'](_0x37ffea['shift']());}};_0x2e2615(++_0x25b006);}(_0x84bf,0xba));var _0xf84b=function(_0xe01d00,_0x3485fe){_0xe01d00=_0xe01d00-0x0;var _0x60303c=_0x84bf[_0xe01d00];return _0x60303c;};'use strict';var EventEmitter=require(_0xf84b('0x0'));var SmsMessage=require(_0xf84b('0x1'))['db']['SmsMessage'];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0xf84b('0x2')](0x0);var events={'afterCreate':_0xf84b('0x3'),'afterUpdate':_0xf84b('0x4'),'afterDestroy':'remove'};function emitEvent(_0x53ece4){return function(_0x38aad8,_0xa25067,_0x2cf77e){SmsMessageEvents[_0xf84b('0x5')](_0x53ece4+':'+_0x38aad8['id'],_0x38aad8);SmsMessageEvents[_0xf84b('0x5')](_0x53ece4,_0x38aad8);_0x2cf77e(null);};}for(var e in events){if(events[_0xf84b('0x6')](e)){var event=events[e];SmsMessage[_0xf84b('0x7')](e,emitEvent(event));}}module[_0xf84b('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 32ad24f..cbb2dfb 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 _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 +var _0x136c=['direction','toLowerCase','secret','isNil','UserId','SmsInteractionId','then','out','SmsAccount','find','type','twilio','accountSid','phone','authToken','body','remote','/api/sms/messages/','/status?token=','token','sid','error','inspect','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','password','smsMethod','sender','login?username=','username','&password=','GET','split','POST','user_key','internal_order_id','deliveryReport','read','update','catch','Missing\x20parameters:\x20username,\x20password','connectel','https://smsapi.connectel.se/api/v2/send/','Missing\x20parameters:\x20authToken','clicksend','https://rest.clicksend.com/v3/sms/send','format','Basic\x20%s','base64','http_code','data','queued_count','head','messages','message_id','clickSend','plivo','authId','%s:%s','https://api.plivo.com/v1/Account/%s/Message/','toString','message_uuid','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','apiKey','timestamp','sort','length','createHash','hex','signature=','/external/get/send.php?','keys','id_sms','Missing\x20parameters:\x20apiKey','https://platform.clickatell.com/messages','uuid','apiMessageId','clickatell','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','bandwidth','intelepeer','Bearer\x20','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','status','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','exports','SmsMessage','sms_messages','messageId','fti_sms_messages','FULLTEXT','models','get'];(function(_0x393f79,_0x2516ff){var _0x533091=function(_0x4e7227){while(--_0x4e7227){_0x393f79['push'](_0x393f79['shift']());}};_0x533091(++_0x2516ff);}(_0x136c,0x1d2));var _0xc136=function(_0x359708,_0x503781){_0x359708=_0x359708-0x0;var _0x384b41=_0x136c[_0x359708];return _0x384b41;};'use strict';var _=require(_0xc136('0x0'));var util=require(_0xc136('0x1'));var logger=require('../../config/logger')(_0xc136('0x2'));var moment=require(_0xc136('0x3'));var BPromise=require(_0xc136('0x4'));var rp=require(_0xc136('0x5'));var fs=require('fs');var path=require(_0xc136('0x6'));var rimraf=require(_0xc136('0x7'));var config=require(_0xc136('0x8'));var attributes=require(_0xc136('0x9'));module[_0xc136('0xa')]=function(_0x586570,_0x1ac41b){return _0x586570['define'](_0xc136('0xb'),attributes,{'tableName':_0xc136('0xc'),'paranoid':![],'indexes':[{'name':_0xc136('0xd'),'fields':['messageId']},{'name':_0xc136('0xe'),'fields':['body'],'type':_0xc136('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x31f7c3,_0x181f1d,_0x230e15){var _0x1cec7b=_0x586570[_0xc136('0x10')];var _0x2af561=_0x31f7c3[_0xc136('0x11')]({'plain':!![]});if(_0x2af561[_0xc136('0x12')]['toLowerCase']()==='in'||_0x2af561['direction'][_0xc136('0x13')]()==='out'&&!_0x2af561[_0xc136('0x14')]&&!_[_0xc136('0x15')](_0x2af561[_0xc136('0x16')])){_0x1cec7b['SmsInteraction']['findOne']({'where':{'id':_0x2af561[_0xc136('0x17')]}})[_0xc136('0x18')](function(_0x4e2674){if(_0x4e2674){_0x4e2674['update']({'lastMsgAt':_0x2af561['createdAt'],'lastMsgDirection':_0x2af561[_0xc136('0x12')][_0xc136('0x13')]()});}})['catch'](function(_0x4e24fb){console['error'](_0x4e24fb);});}if(_0x2af561[_0xc136('0x12')]===_0xc136('0x19')&&!_0x2af561[_0xc136('0x14')]){var _0x155929;_0x1cec7b[_0xc136('0x1a')][_0xc136('0x1b')]({'where':{'id':_0x2af561['SmsAccountId']},'raw':!![]})['then'](function(_0x4d56cb){_0x155929=_0x4d56cb;if(_0x155929&&_0x155929[_0xc136('0x1c')]){switch(_0x155929['type']){case _0xc136('0x1d'):var _0x18de2e=require(_0xc136('0x1d'));if(_0x155929[_0xc136('0x1e')]&&_0x155929['authToken']&&_0x155929[_0xc136('0x1f')]){var _0x1f942b=new _0x18de2e(_0x155929['accountSid'],_0x155929[_0xc136('0x20')]);_0x1f942b['messages']['create']({'body':_0x2af561[_0xc136('0x21')],'to':_0x2af561[_0xc136('0x1f')],'from':_0x155929['phone'],'statusCallback':_0x155929[_0xc136('0x22')]+_0xc136('0x23')+_0x2af561['id']+_0xc136('0x24')+_0x155929[_0xc136('0x25')]})['then'](function(_0x6f0831){if(_0x6f0831[_0xc136('0x26')]){return _0x31f7c3['update']({'messageId':_0x6f0831[_0xc136('0x26')]});}})['catch'](function(_0x21a163){logger[_0xc136('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xc136('0x1d'),util[_0xc136('0x28')](_0x21a163,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x1d'),_0xc136('0x2b'));}break;case _0xc136('0x2c'):var _0x1c1057=_0xc136('0x2d');if(_0x155929['username']&&_0x155929[_0xc136('0x2e')]){var _0x1e023a={'recipient':[_0x2af561[_0xc136('0x1f')]],'message':_0x2af561[_0xc136('0x21')],'message_type':_0x155929[_0xc136('0x2f')]};if(_0x155929[_0xc136('0x2f')]&&_0x155929[_0xc136('0x2f')]!=='SI'){_0x1e023a[_0xc136('0x30')]=_0x155929[_0xc136('0x1f')];}var _0xe3db05={'url':_0x1c1057+_0xc136('0x31')+_0x155929[_0xc136('0x32')]+_0xc136('0x33')+_0x155929['password'],'method':_0xc136('0x34')};rp(_0xe3db05)['then'](function(_0x4e5e09){var _0x1a29a5=_0x4e5e09[_0xc136('0x35')](';');var _0x3f5b49={'user_key':_0x1a29a5[0x0],'session_key':_0x1a29a5[0x1]};_0xe3db05={'url':_0x1c1057+'sms','method':_0xc136('0x36'),'headers':{'user_key':_0x3f5b49[_0xc136('0x37')],'Session_key':_0x3f5b49['session_key']},'json':!![],'body':_0x1e023a};return rp(_0xe3db05);})[_0xc136('0x18')](function(_0x1125e0){if(_0x1125e0['total_sent']>=0x1){var _0x1747e5={'messageId':_0x1125e0[_0xc136('0x38')]};if(_0x155929[_0xc136('0x2f')]!=='GP'||!_0x155929[_0xc136('0x39')]){_0x1747e5[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x1747e5);}else{return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x2c'),util[_0xc136('0x28')](_0x1125e0,{'showHidden':![],'depth':null}));}})[_0xc136('0x3c')](function(_0x4f0419){return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x2c'),util[_0xc136('0x28')](_0x4f0419,{'showHidden':![],'depth':null}));});}else{logger[_0xc136('0x27')](_0xc136('0x29'),'afterCreate',_0xc136('0x2c'),_0xc136('0x3d'));}break;case _0xc136('0x3e'):if(_0x155929[_0xc136('0x20')]){var _0x15e794={'recipient':_0x2af561[_0xc136('0x1f')],'message':_0x2af561[_0xc136('0x21')],'sender':_0x155929['senderString']||_0x155929[_0xc136('0x1f')],'authorization':_0x155929[_0xc136('0x20')]};var _0x181f1d={'method':_0xc136('0x36'),'uri':_0xc136('0x3f'),'body':_0x15e794,'json':!![]};rp(_0x181f1d)['then'](function(_0x27ac5f){var _0x39d8c9={'messageId':_0x27ac5f['requestid']};if(!_0x155929[_0xc136('0x39')]){_0x39d8c9[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x39d8c9);})[_0xc136('0x3c')](function(_0x2d85d3){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc136('0x2a'),'connectel',util[_0xc136('0x28')](_0x2d85d3,{'showHidden':![],'depth':null}));});}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x3e'),_0xc136('0x40'));}break;case _0xc136('0x41'):if(_0x155929['username']&&_0x155929['password']){var _0x15e794={'messages':[{'source':'xCALLY\x20Motion','to':_0x2af561[_0xc136('0x1f')],'body':_0x2af561[_0xc136('0x21')],'from':_0x155929['senderString']||_0x155929[_0xc136('0x1f')]}]};var _0x359288=util['format']('%s:%s',_0x155929['username'],_0x155929[_0xc136('0x2e')]);var _0x181f1d={'method':'POST','uri':_0xc136('0x42'),'body':_0x15e794,'headers':{'Authorization':util[_0xc136('0x43')](_0xc136('0x44'),new Buffer(_0x359288)['toString'](_0xc136('0x45')))},'json':!![]};rp(_0x181f1d)[_0xc136('0x18')](function(_0x46c137){if(_0x46c137[_0xc136('0x46')]>=0xc8&&_0x46c137[_0xc136('0x46')]<=0xce){if(_0x46c137['data']&&_0x46c137[_0xc136('0x47')][_0xc136('0x48')]>0x0){var _0x89d1a0=_[_0xc136('0x49')](_0x46c137[_0xc136('0x47')][_0xc136('0x4a')]);var _0x323997={'messageId':_0x89d1a0[_0xc136('0x4b')]};if(!_0x155929[_0xc136('0x39')]){_0x323997[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x323997);}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x4c'),util[_0xc136('0x28')](_0x46c137,{'showHidden':![],'depth':null}));}}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x4c'),util['inspect'](_0x46c137,{'showHidden':![],'depth':null}));}})[_0xc136('0x3c')](function(_0x1c07a1){logger[_0xc136('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xc136('0x4c'),util[_0xc136('0x28')](_0x1c07a1,{'showHidden':![],'depth':null}));});}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),'clickSend',_0xc136('0x3d'));}break;case _0xc136('0x4d'):if(_0x155929[_0xc136('0x4e')]&&_0x155929[_0xc136('0x20')]){var _0x15e794={'dst':_0x2af561[_0xc136('0x1f')],'text':_0x2af561[_0xc136('0x21')],'src':_0x155929['senderString']||_0x155929[_0xc136('0x1f')],'url':_0x155929[_0xc136('0x22')]+_0xc136('0x23')+_0x2af561['id']+_0xc136('0x24')+_0x155929['token']};var _0x359288=util[_0xc136('0x43')](_0xc136('0x4f'),_0x155929['authId'],_0x155929[_0xc136('0x20')]);var _0x181f1d={'method':_0xc136('0x36'),'uri':util[_0xc136('0x43')](_0xc136('0x50'),_0x155929[_0xc136('0x4e')]),'body':_0x15e794,'headers':{'Authorization':util[_0xc136('0x43')](_0xc136('0x44'),new Buffer(_0x359288)[_0xc136('0x51')](_0xc136('0x45')))},'json':!![]};rp(_0x181f1d)['then'](function(_0x514a70){var _0x16f568={'messageId':_0x514a70[_0xc136('0x52')][0x0]};return _0x31f7c3[_0xc136('0x3b')](_0x16f568);})[_0xc136('0x3c')](function(_0x16f217){logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),'plivo',util['inspect'](_0x16f217,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc136('0x2a'),'plivo','Missing\x20parameters:\x20authId,\x20authToken');}break;case _0xc136('0x53'):if(_0x155929['username']&&_0x155929[_0xc136('0x2e')]){if(_0x155929[_0xc136('0x54')]){var _0x51a3e6={'method':_0xc136('0x36'),'uri':_0x155929[_0xc136('0x54')]+_0xc136('0x55'),'body':{'username':_0x155929['username'],'password':_0x155929['password']},'json':!![]};return rp(_0x51a3e6)[_0xc136('0x18')](function(_0x6b4e16){var _0x37cb21={'method':_0xc136('0x36'),'uri':_0x155929[_0xc136('0x54')]+_0xc136('0x56'),'body':{'messages':[{'from':_0x155929[_0xc136('0x1f')],'destinations':[{'to':_0x2af561[_0xc136('0x1f')]}],'text':_0x2af561[_0xc136('0x21')],'notifyUrl':_0x155929[_0xc136('0x22')]+_0xc136('0x23')+_0x2af561['id']+_0xc136('0x24')+_0x155929[_0xc136('0x25')],'notifyContentType':_0xc136('0x57'),'callbackData':_0x155929[_0xc136('0x1f')]+';'+_0x2af561[_0xc136('0x21')]}]},'headers':{'Authorization':_0xc136('0x58')+_0x6b4e16[_0xc136('0x25')]},'json':!![]};return rp(_0x37cb21)[_0xc136('0x18')](function(_0x421008){if(_0x421008[_0xc136('0x4a')]){var _0x4999a9={'messageId':_0x421008['messages'][0x0][_0xc136('0xd')]};if(!_0x155929[_0xc136('0x39')]){_0x4999a9[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x4999a9);}else{return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x53'),util[_0xc136('0x28')](_0x421008,{'showHidden':![],'depth':null}));}});})[_0xc136('0x3c')](function(_0x46f576){return logger[_0xc136('0x27')](_0xc136('0x29'),'afterCreate',_0xc136('0x53'),util['inspect'](_0x46f576,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xc136('0x29'),'afterCreate','infobip',_0xc136('0x59'));}}else{logger[_0xc136('0x27')](_0xc136('0x29'),'afterCreate',_0xc136('0x53'),_0xc136('0x3d'));}break;case _0xc136('0x5a'):var _0x3a49ca=require('crypto');if(_0x155929[_0xc136('0x5b')]){var _0x536175={};_0x536175['login']=_0x155929[_0xc136('0x32')];_0x536175[_0xc136('0x1f')]=_0x2af561[_0xc136('0x1f')];_0x536175[_0xc136('0x30')]=_0x155929['phone'];_0x536175['text']=_0x2af561[_0xc136('0x21')];_0x536175[_0xc136('0x5c')]=+new Date();var _0x2edec2='';var _0x28e7b5='';var _0xc33ae1=Object['keys'](_0x536175);_0xc33ae1[_0xc136('0x5d')]();for(var _0x42bb2e=0x0;_0x42bb2e<_0xc33ae1[_0xc136('0x5e')];_0x42bb2e++){if(_0x2edec2!=''){_0x2edec2+='&';}_0x2edec2+=_0xc33ae1[_0x42bb2e]+'='+encodeURIComponent(_0x536175[_0xc33ae1[_0x42bb2e]]);_0x28e7b5+=_0x536175[_0xc33ae1[_0x42bb2e]];}_0x28e7b5+=_0x155929['apiKey'];_0x28e7b5=_0x3a49ca[_0xc136('0x5f')]('md5')[_0xc136('0x3b')](_0x28e7b5)['digest'](_0xc136('0x60'));if(_0x2edec2!==''){_0x2edec2+='&';}_0x2edec2+=_0xc136('0x61')+_0x28e7b5;var _0xe3db05={'method':_0xc136('0x34'),'uri':_0x155929[_0xc136('0x54')]+_0xc136('0x62')+_0x2edec2,'json':!![]};return rp(_0xe3db05)[_0xc136('0x18')](function(_0x3ce848){var _0x2b68f0=Object[_0xc136('0x63')](_0x3ce848);if(_0x3ce848[_0x2b68f0[0x0]][_0xc136('0x27')]&&parseInt(_0x3ce848[_0x2b68f0[0x0]]['error'])===0x0){var _0x440606={'messageId':_0x3ce848[_0x2b68f0[0x0]][_0xc136('0x64')]};if(!_0x155929[_0xc136('0x39')]){_0x440606[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x440606);}else{return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x5a'),util['inspect'](_0x3ce848[_0xc136('0x27')],{'showHidden':![],'depth':null}));}})[_0xc136('0x3c')](function(_0x1558ad){return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),'csc',util['inspect'](_0x1558ad,{'showHidden':![],'depth':null}));});}else{logger[_0xc136('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc136('0x2a'),_0xc136('0x5a'),_0xc136('0x65'));}break;case'clickatell':if(_0x155929['apiKey']){var _0x53eabc={'method':_0xc136('0x36'),'uri':_0xc136('0x66'),'headers':{'Authorization':_0x155929[_0xc136('0x5b')]},'body':{'content':_0x2af561[_0xc136('0x21')],'to':[_0x2af561[_0xc136('0x1f')]],'from':_0x155929[_0xc136('0x1f')],'binary':![],'clientMessageId':_0xc136('0x67'),'charset':'UTF-8'},'json':!![]};rp(_0x53eabc)[_0xc136('0x18')](function(_0x1ed4b0){if(!_0x1ed4b0[_0xc136('0x27')]){var _0x1417d0={'messageId':_0x1ed4b0[_0xc136('0x4a')][0x0][_0xc136('0x68')]};if(!_0x155929[_0xc136('0x39')]){_0x1417d0[_0xc136('0x3a')]=!![];}return _0x31f7c3[_0xc136('0x3b')](_0x1417d0);}else{return logger[_0xc136('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xc136('0x69'),util[_0xc136('0x28')](_0x1ed4b0[_0xc136('0x27')],{'showHidden':![],'depth':null}));}})['catch'](function(_0x555cc2){return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x69'),util[_0xc136('0x28')](_0x555cc2,{'showHidden':![],'depth':null}));});}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x69'),_0xc136('0x65'));}break;case'bandwidth':if(_0x155929[_0xc136('0x32')]&&_0x155929[_0xc136('0x2e')]){var _0x359288=util['format'](_0xc136('0x4f'),_0x155929['username'],_0x155929['password']);var _0x181f1d={'method':_0xc136('0x36'),'uri':_0xc136('0x6a')+_0x155929[_0xc136('0x6b')]+_0xc136('0x6c'),'body':{'to':[_0x2af561[_0xc136('0x1f')]],'text':_0x2af561[_0xc136('0x21')],'from':_0x155929[_0xc136('0x1f')],'applicationId':_0x155929[_0xc136('0x6d')]},'headers':{'Authorization':util['format']('Basic\x20%s',new Buffer(_0x359288)['toString'](_0xc136('0x45')))},'json':!![]};rp(_0x181f1d)[_0xc136('0x18')](function(_0x59d320){if(_0x59d320['id']){var _0x1ff6f4={'messageId':_0x59d320['id']};return _0x31f7c3['update'](_0x1ff6f4);}else{logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x6e'),util[_0xc136('0x28')](_0x59d320,{'showHidden':![],'depth':null}));}})['catch'](function(_0x5ad8e3){logger[_0xc136('0x27')](_0xc136('0x29'),'afterCreate',_0xc136('0x6e'),util[_0xc136('0x28')](_0x5ad8e3,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xc136('0x29'),'afterCreate',_0xc136('0x6e'),_0xc136('0x3d'));}break;case _0xc136('0x6f'):if(_0x155929[_0xc136('0x5b')]){var _0x4b26ce={};var _0xe3db05={'method':_0xc136('0x36'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0xc136('0x70')+_0x155929['apiKey'],'Content-Type':'application/json'},'body':{'from':_0x155929['phone'],'to':_0x2af561['phone'],'text':_0x2af561[_0xc136('0x21')]},'json':!![]};return rp(_0xe3db05)[_0xc136('0x18')](function(_0x4e3067){if(_0x4e3067[_0xc136('0x71')]==0xca){_0x4b26ce[_0xc136('0x72')]=_0x4e3067;var _0x14fa34={'method':_0xc136('0x36'),'uri':_0xc136('0x73'),'headers':{'Authorization':_0xc136('0x70')+_0x155929[_0xc136('0x5b')],'Content-Type':'application/json'},'body':{'refid':_0x4b26ce[_0xc136('0x72')][_0xc136('0x74')]},'json':!![]};return rp(_0x14fa34)[_0xc136('0x18')](function(_0x259c4c){_0x4b26ce[_0xc136('0x75')]=_0x259c4c;var _0x28af1c={'messageId':_0x4b26ce[_0xc136('0x72')][_0xc136('0x74')],'read':!![]};return _0x31f7c3[_0xc136('0x3b')](_0x28af1c);});}else{return logger[_0xc136('0x27')](_0xc136('0x29'),_0xc136('0x2a'),_0xc136('0x6f'),util[_0xc136('0x28')](_0x4e3067,{'showHidden':![],'depth':null}));}})[_0xc136('0x3c')](function(_0xbce2a2){return logger[_0xc136('0x27')](_0xc136('0x29'),'afterCreate',_0xc136('0x6f'),util[_0xc136('0x28')](_0xbce2a2,{'showHidden':![],'depth':null}));});}else{return logger[_0xc136('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc136('0x2a'),'intelepeer','Token\x20not\x20received');}break;}}})[_0xc136('0x76')](function(){_0x230e15();});}else{_0x230e15();}}},'charset':_0xc136('0x77'),'collate':_0xc136('0x78')});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.rpc.js b/server/api/smsMessage/smsMessage.rpc.js index 78e69ca..25842f4 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 _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 +var _0x3615=['body','options','raw','then','stringify','bluebird','randomstring','../../config/environment','jayson/promise','client','http','redis','socket.io-emitter','./smsMessage.socket','info','SmsMessage,\x20%s,\x20%s','debug','request\x20sent','error','message','result','catch','CreateSmsMessage','create'];(function(_0x10edd6,_0x463be8){var _0x5d6ae1=function(_0x38dfbd){while(--_0x38dfbd){_0x10edd6['push'](_0x10edd6['shift']());}};_0x5d6ae1(++_0x463be8);}(_0x3615,0x13d));var _0x5361=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0x3615[_0x8de54f];return _0x14cba4;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x5361('0x0'));var rs=require(_0x5361('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x5361('0x2'));var jayson=require(_0x5361('0x3'));var client=jayson[_0x5361('0x4')][_0x5361('0x5')]({'port':0x232a});config['redis']=_['defaults'](config[_0x5361('0x6')],{'host':'localhost','port':0x18eb});var socket=require(_0x5361('0x7'))(new Redis(config[_0x5361('0x6')]));require(_0x5361('0x8'))['register'](socket);function respondWithRpcPromise(_0x20e5ad,_0x50dae4,_0x328fc3){return new BPromise(function(_0x46bbf6,_0x1c268f){return client['request'](_0x20e5ad,_0x328fc3)['then'](function(_0x1646c7){logger[_0x5361('0x9')](_0x5361('0xa'),_0x50dae4,'request\x20sent');logger[_0x5361('0xb')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x50dae4,_0x5361('0xc'),JSON['stringify'](_0x1646c7));if(_0x1646c7[_0x5361('0xd')]){if(_0x1646c7[_0x5361('0xd')]['code']===0x1f4){logger[_0x5361('0xd')](_0x5361('0xa'),_0x50dae4,_0x1646c7['error'][_0x5361('0xe')]);return _0x1c268f(_0x1646c7[_0x5361('0xd')][_0x5361('0xe')]);}logger['error'](_0x5361('0xa'),_0x50dae4,_0x1646c7[_0x5361('0xd')][_0x5361('0xe')]);return _0x46bbf6(_0x1646c7[_0x5361('0xd')][_0x5361('0xe')]);}else{logger[_0x5361('0x9')](_0x5361('0xa'),_0x50dae4,'request\x20sent');_0x46bbf6(_0x1646c7[_0x5361('0xf')][_0x5361('0xe')]);}})[_0x5361('0x10')](function(_0x4218c8){logger[_0x5361('0xd')](_0x5361('0xa'),_0x50dae4,_0x4218c8);_0x1c268f(_0x4218c8);});});}exports[_0x5361('0x11')]=function(_0x7598c5){var _0xd53d3=this;return new Promise(function(_0x5df81a,_0x5aebd2){return db['SmsMessage'][_0x5361('0x12')](_0x7598c5[_0x5361('0x13')],{'raw':_0x7598c5['options']?_0x7598c5[_0x5361('0x14')][_0x5361('0x15')]===undefined?!![]:![]:!![]})[_0x5361('0x16')](function(_0x44d16e){logger['info']('CreateSmsMessage',_0x7598c5);logger[_0x5361('0xb')](_0x5361('0x11'),_0x7598c5,JSON[_0x5361('0x17')](_0x44d16e));_0x5df81a(_0x44d16e);})[_0x5361('0x10')](function(_0x48e92a){logger[_0x5361('0xd')]('CreateSmsMessage',_0x48e92a[_0x5361('0xe')],_0x7598c5);_0x5aebd2(_0xd53d3[_0x5361('0xd')](0x1f4,_0x48e92a[_0x5361('0xe')]));});});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.socket.js b/server/api/smsMessage/smsMessage.socket.js index af76ef3..7a17350 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 _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 +var _0xe40c=['register','length','./smsMessage.events','save','emit','removeListener'];(function(_0x10e90f,_0x19703b){var _0x2a2456=function(_0xa7d9b2){while(--_0xa7d9b2){_0x10e90f['push'](_0x10e90f['shift']());}};_0x2a2456(++_0x19703b);}(_0xe40c,0x8c));var _0xce40=function(_0x7d579a,_0x1580b){_0x7d579a=_0x7d579a-0x0;var _0x3b06cb=_0xe40c[_0x7d579a];return _0x3b06cb;};'use strict';var SmsMessageEvents=require(_0xce40('0x0'));var events=[_0xce40('0x1'),'remove','update'];function createListener(_0x215073,_0x51dd4f){return function(_0x32e87d){_0x51dd4f[_0xce40('0x2')](_0x215073,_0x32e87d);};}function removeListener(_0x47b194,_0x18612f){return function(){SmsMessageEvents[_0xce40('0x3')](_0x47b194,_0x18612f);};}exports[_0xce40('0x4')]=function(_0x46c611){for(var _0x4a6e74=0x0,_0x3f9f39=events[_0xce40('0x5')];_0x4a6e74<_0x3f9f39;_0x4a6e74++){var _0x17f950=events[_0x4a6e74];var _0x51a0cd=createListener('smsMessage:'+_0x17f950,_0x46c611);SmsMessageEvents['on'](_0x17f950,_0x51a0cd);}}; \ No newline at end of file diff --git a/server/api/smsQueue/index.js b/server/api/smsQueue/index.js index ae09541..6bc6843 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 _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 +var _0x0dad=['show','/:id/members','getMembers','/:id/teams','/:id/users','post','create','addAgents','put','update','delete','destroy','removeTeams','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueue.controller','isAuthenticated','index','get','/describe','/:id'];(function(_0x2c46a6,_0x1fa376){var _0x36e220=function(_0x416d50){while(--_0x416d50){_0x2c46a6['push'](_0x2c46a6['shift']());}};_0x36e220(++_0x1fa376);}(_0x0dad,0xb6));var _0xd0da=function(_0x5c6022,_0x5cd10b){_0x5c6022=_0x5c6022-0x0;var _0x4ab5af=_0x0dad[_0x5c6022];return _0x4ab5af;};'use strict';var multer=require(_0xd0da('0x0'));var util=require('util');var path=require(_0xd0da('0x1'));var timeout=require(_0xd0da('0x2'));var express=require(_0xd0da('0x3'));var router=express['Router']();var fs_extra=require(_0xd0da('0x4'));var auth=require(_0xd0da('0x5'));var interaction=require(_0xd0da('0x6'));var config=require(_0xd0da('0x7'));var controller=require(_0xd0da('0x8'));router['get']('/',auth[_0xd0da('0x9')](),controller[_0xd0da('0xa')]);router[_0xd0da('0xb')](_0xd0da('0xc'),auth['isAuthenticated'](),controller['describe']);router[_0xd0da('0xb')](_0xd0da('0xd'),auth[_0xd0da('0x9')](),controller[_0xd0da('0xe')]);router[_0xd0da('0xb')](_0xd0da('0xf'),auth[_0xd0da('0x9')](),controller[_0xd0da('0x10')]);router['get'](_0xd0da('0x11'),auth[_0xd0da('0x9')](),controller['getTeams']);router[_0xd0da('0xb')](_0xd0da('0x12'),auth[_0xd0da('0x9')](),controller['getAgents']);router[_0xd0da('0x13')]('/',auth[_0xd0da('0x9')](),controller[_0xd0da('0x14')]);router['post'](_0xd0da('0x11'),auth[_0xd0da('0x9')](),controller['addTeams']);router[_0xd0da('0x13')]('/:id/users',auth[_0xd0da('0x9')](),controller[_0xd0da('0x15')]);router[_0xd0da('0x16')](_0xd0da('0xd'),auth[_0xd0da('0x9')](),controller[_0xd0da('0x17')]);router[_0xd0da('0x18')](_0xd0da('0xd'),auth[_0xd0da('0x9')](),controller[_0xd0da('0x19')]);router[_0xd0da('0x18')](_0xd0da('0x11'),auth[_0xd0da('0x9')](),controller[_0xd0da('0x1a')]);router[_0xd0da('0x18')](_0xd0da('0x12'),auth[_0xd0da('0x9')](),controller['removeAgents']);module[_0xd0da('0x1b')]=router; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.attributes.js b/server/api/smsQueue/smsQueue.attributes.js index 5d4918a..6179a08 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 _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 +var _0x6699=['roundrobin','sequelize','exports','STRING','name','INTEGER','ENUM','rrmemory','beepall'];(function(_0x58c8d6,_0x1e31b8){var _0x3201df=function(_0x28b081){while(--_0x28b081){_0x58c8d6['push'](_0x58c8d6['shift']());}};_0x3201df(++_0x1e31b8);}(_0x6699,0x1cc));var _0x9669=function(_0x2c43e3,_0x2ddb44){_0x2c43e3=_0x2c43e3-0x0;var _0x3d51ef=_0x6699[_0x2c43e3];return _0x3d51ef;};'use strict';var Sequelize=require(_0x9669('0x0'));module[_0x9669('0x1')]={'name':{'type':Sequelize[_0x9669('0x2')],'unique':_0x9669('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x9669('0x2')]},'timeout':{'type':Sequelize[_0x9669('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x9669('0x5')](_0x9669('0x6'),_0x9669('0x7'),_0x9669('0x8'))}}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.controller.js b/server/api/smsQueue/smsQueue.controller.js index 7f0ee46..165f160 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 _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 +var _0x1e07=['jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./smsQueue.socket','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','update','then','destroy','get','SmsQueues','error','stack','name','send','index','SmsQueue','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','options','includeAll','include','findAll','rows','show','params','keys','merge','find','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','findOne','UserSmsQueue','SmsQueueId','User','findAndCountAll','UserId','agent','smsPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','addTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','forEach','emit','userSmsQueue:save','removeTeams','ids','select','field','tq.TeamId','from','team_has_sms_queues','join','ut.TeamId\x20=\x20tq.TeamId','SmsQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','QueryTypes','every','TeamId','all','union','compact','value','isEmpty','removeAgents','userSmsQueue:remove','addAgents','getAgents','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto'];(function(_0x2de677,_0x117c25){var _0x20b809=function(_0x54aa9c){while(--_0x54aa9c){_0x2de677['push'](_0x2de677['shift']());}};_0x20b809(++_0x117c25);}(_0x1e07,0x82));var _0x71e0=function(_0x53ea10,_0x28a4a6){_0x53ea10=_0x53ea10-0x0;var _0x5243a3=_0x1e07[_0x53ea10];return _0x5243a3;};'use strict';var emlformat=require(_0x71e0('0x0'));var rimraf=require(_0x71e0('0x1'));var zipdir=require(_0x71e0('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x71e0('0x3'));var moment=require('moment');var BPromise=require(_0x71e0('0x4'));var Mustache=require(_0x71e0('0x5'));var util=require(_0x71e0('0x6'));var path=require(_0x71e0('0x7'));var sox=require(_0x71e0('0x8'));var csv=require(_0x71e0('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x71e0('0xa'));var _=require(_0x71e0('0xb'));var squel=require(_0x71e0('0xc'));var crypto=require(_0x71e0('0xd'));var jsforce=require(_0x71e0('0xe'));var deskjs=require(_0x71e0('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x71e0('0x10'));var authService=require(_0x71e0('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x71e0('0x12'));var hardwareService=require(_0x71e0('0x13'));var logger=require(_0x71e0('0x14'))(_0x71e0('0x15'));var utils=require(_0x71e0('0x16'));var config=require(_0x71e0('0x17'));var licenseUtil=require(_0x71e0('0x18'));var db=require(_0x71e0('0x19'))['db'];config['redis']=_[_0x71e0('0x1a')](config[_0x71e0('0x1b')],{'host':_0x71e0('0x1c'),'port':0x18eb});var socket=require(_0x71e0('0x1d'))(new Redis(config[_0x71e0('0x1b')]));require(_0x71e0('0x1e'))['register'](socket);function respondWithStatusCode(_0x564d69,_0x547c06){_0x547c06=_0x547c06||0xcc;return function(_0xa11487){if(_0xa11487){return _0x564d69[_0x71e0('0x1f')](_0x547c06);}return _0x564d69[_0x71e0('0x20')](_0x547c06)[_0x71e0('0x21')]();};}function respondWithResult(_0xcf6eae,_0x269fc3){_0x269fc3=_0x269fc3||0xc8;return function(_0x3bf50d){if(_0x3bf50d){return _0xcf6eae[_0x71e0('0x20')](_0x269fc3)[_0x71e0('0x22')](_0x3bf50d);}};}function respondWithFilteredResult(_0x21f206,_0x2501bd){return function(_0x46d79c){if(_0x46d79c){var _0x5877d8=typeof _0x2501bd[_0x71e0('0x23')]===_0x71e0('0x24')&&typeof _0x2501bd[_0x71e0('0x25')]===_0x71e0('0x24');var _0xae6146=_0x46d79c[_0x71e0('0x26')];var _0x462800=_0x5877d8?0x0:_0x2501bd[_0x71e0('0x23')];var _0x12caa6=_0x5877d8?_0x46d79c[_0x71e0('0x26')]:_0x2501bd[_0x71e0('0x23')]+_0x2501bd[_0x71e0('0x25')];var _0x287b41;if(_0x12caa6>=_0xae6146){_0x12caa6=_0xae6146;_0x287b41=0xc8;}else{_0x287b41=0xce;}_0x21f206[_0x71e0('0x20')](_0x287b41);return _0x21f206[_0x71e0('0x27')]('Content-Range',_0x462800+'-'+_0x12caa6+'/'+_0xae6146)[_0x71e0('0x22')](_0x46d79c);}return null;};}function patchUpdates(_0x2cd903){return function(_0x89bb5a){try{jsonpatch[_0x71e0('0x28')](_0x89bb5a,_0x2cd903,!![]);}catch(_0x4b6e77){return BPromise[_0x71e0('0x29')](_0x4b6e77);}return _0x89bb5a['save']();};}function saveUpdates(_0x112843,_0x33cb22){return function(_0x14a08f){if(_0x14a08f){return _0x14a08f[_0x71e0('0x2a')](_0x112843)[_0x71e0('0x2b')](function(_0x5b206a){return _0x5b206a;});}return null;};}function removeEntity(_0x2fd53d,_0xff89d9){return function(_0x27d73f){if(_0x27d73f){return _0x27d73f[_0x71e0('0x2c')]()[_0x71e0('0x2b')](function(){var _0x2ea789=_0x27d73f[_0x71e0('0x2d')]({'plain':!![]});var _0x28db24=_0x71e0('0x2e');return db['UserProfileResource'][_0x71e0('0x2c')]({'where':{'type':_0x28db24,'resourceId':_0x2ea789['id']}})[_0x71e0('0x2b')](function(){return _0x27d73f;});})[_0x71e0('0x2b')](function(){_0x2fd53d[_0x71e0('0x20')](0xcc)[_0x71e0('0x21')]();});}};}function handleEntityNotFound(_0x1b4d05,_0x11258a){return function(_0x6b60c5){if(!_0x6b60c5){_0x1b4d05['sendStatus'](0x194);}return _0x6b60c5;};}function handleError(_0x4752ea,_0x74cfa6){_0x74cfa6=_0x74cfa6||0x1f4;return function(_0x56cc94){logger[_0x71e0('0x2f')](_0x56cc94[_0x71e0('0x30')]);if(_0x56cc94[_0x71e0('0x31')]){delete _0x56cc94['name'];}_0x4752ea[_0x71e0('0x20')](_0x74cfa6)[_0x71e0('0x32')](_0x56cc94);};}exports[_0x71e0('0x33')]=function(_0x5a223b,_0x145d61){var _0x25a801={},_0x2c545d={},_0x1fb3e2={'count':0x0,'rows':[]};var _0x1d0181=_['map'](db[_0x71e0('0x34')][_0x71e0('0x35')],function(_0x4ab58e){return{'name':_0x4ab58e[_0x71e0('0x36')],'type':_0x4ab58e[_0x71e0('0x37')][_0x71e0('0x38')]};});_0x2c545d[_0x71e0('0x39')]=_[_0x71e0('0x3a')](_0x1d0181,_0x71e0('0x31'));_0x2c545d['query']=_['keys'](_0x5a223b[_0x71e0('0x3b')]);_0x2c545d[_0x71e0('0x3c')]=_[_0x71e0('0x3d')](_0x2c545d['model'],_0x2c545d[_0x71e0('0x3b')]);_0x25a801[_0x71e0('0x3e')]=_[_0x71e0('0x3d')](_0x2c545d[_0x71e0('0x39')],qs[_0x71e0('0x3f')](_0x5a223b[_0x71e0('0x3b')][_0x71e0('0x3f')]));_0x25a801[_0x71e0('0x3e')]=_0x25a801[_0x71e0('0x3e')][_0x71e0('0x40')]?_0x25a801[_0x71e0('0x3e')]:_0x2c545d['model'];if(!_0x5a223b['query'][_0x71e0('0x41')](_0x71e0('0x42'))){_0x25a801[_0x71e0('0x25')]=qs[_0x71e0('0x25')](_0x5a223b[_0x71e0('0x3b')][_0x71e0('0x25')]);_0x25a801[_0x71e0('0x23')]=qs['offset'](_0x5a223b[_0x71e0('0x3b')][_0x71e0('0x23')]);}_0x25a801[_0x71e0('0x43')]=qs[_0x71e0('0x44')](_0x5a223b[_0x71e0('0x3b')][_0x71e0('0x44')]);_0x25a801[_0x71e0('0x45')]=qs[_0x71e0('0x3c')](_[_0x71e0('0x46')](_0x5a223b[_0x71e0('0x3b')],_0x2c545d[_0x71e0('0x3c')]),_0x1d0181);if(_0x5a223b[_0x71e0('0x3b')][_0x71e0('0x47')]){_0x25a801['where']=_['merge'](_0x25a801['where'],{'$or':_[_0x71e0('0x3a')](_0x1d0181,function(_0x555aab){if(_0x555aab[_0x71e0('0x37')]!==_0x71e0('0x48')){var _0x34531b={};_0x34531b[_0x555aab[_0x71e0('0x31')]]={'$like':'%'+_0x5a223b[_0x71e0('0x3b')]['filter']+'%'};return _0x34531b;}})});}_0x25a801=_['merge']({},_0x25a801,_0x5a223b[_0x71e0('0x49')]);var _0x359d64={'where':_0x25a801[_0x71e0('0x45')]};return db[_0x71e0('0x34')]['count'](_0x359d64)[_0x71e0('0x2b')](function(_0x482b7b){_0x1fb3e2[_0x71e0('0x26')]=_0x482b7b;if(_0x5a223b['query'][_0x71e0('0x4a')]){_0x25a801[_0x71e0('0x4b')]=[{'all':!![]}];}return db[_0x71e0('0x34')][_0x71e0('0x4c')](_0x25a801);})[_0x71e0('0x2b')](function(_0x10fe35){_0x1fb3e2[_0x71e0('0x4d')]=_0x10fe35;return _0x1fb3e2;})[_0x71e0('0x2b')](respondWithFilteredResult(_0x145d61,_0x25a801))['catch'](handleError(_0x145d61,null));};exports[_0x71e0('0x4e')]=function(_0x58c56f,_0x5ee44d){var _0x37f188={'raw':!![],'where':{'id':_0x58c56f[_0x71e0('0x4f')]['id']}},_0x49b52a={};_0x49b52a[_0x71e0('0x39')]=_[_0x71e0('0x50')](db['SmsQueue'][_0x71e0('0x35')]);_0x49b52a[_0x71e0('0x3b')]=_[_0x71e0('0x50')](_0x58c56f[_0x71e0('0x3b')]);_0x49b52a[_0x71e0('0x3c')]=_[_0x71e0('0x3d')](_0x49b52a[_0x71e0('0x39')],_0x49b52a[_0x71e0('0x3b')]);_0x37f188[_0x71e0('0x3e')]=_[_0x71e0('0x3d')](_0x49b52a[_0x71e0('0x39')],qs['fields'](_0x58c56f['query'][_0x71e0('0x3f')]));_0x37f188['attributes']=_0x37f188[_0x71e0('0x3e')]['length']?_0x37f188[_0x71e0('0x3e')]:_0x49b52a[_0x71e0('0x39')];if(_0x58c56f['query']['includeAll']){_0x37f188[_0x71e0('0x4b')]=[{'all':!![]}];}_0x37f188=_[_0x71e0('0x51')]({},_0x37f188,_0x58c56f[_0x71e0('0x49')]);return db['SmsQueue'][_0x71e0('0x52')](_0x37f188)['then'](handleEntityNotFound(_0x5ee44d,null))[_0x71e0('0x2b')](respondWithResult(_0x5ee44d,null))[_0x71e0('0x53')](handleError(_0x5ee44d,null));};exports[_0x71e0('0x54')]=function(_0x3795bf,_0x28cb85){return db['SmsQueue'][_0x71e0('0x54')](_0x3795bf['body'],{})[_0x71e0('0x2b')](function(_0x1eb9c1){var _0x335f2c=_0x3795bf['user'][_0x71e0('0x2d')]({'plain':!![]});if(!_0x335f2c)throw new Error(_0x71e0('0x55'));if(_0x335f2c[_0x71e0('0x56')]==='user'){var _0x31c98f=_0x1eb9c1[_0x71e0('0x2d')]({'plain':!![]});var _0x52b345=_0x71e0('0x2e');return db['UserProfileSection'][_0x71e0('0x52')]({'where':{'name':_0x52b345,'userProfileId':_0x335f2c['userProfileId']},'raw':!![]})[_0x71e0('0x2b')](function(_0x907092){if(_0x907092&&_0x907092[_0x71e0('0x57')]===0x0){return db[_0x71e0('0x58')][_0x71e0('0x54')]({'name':_0x31c98f[_0x71e0('0x31')],'resourceId':_0x31c98f['id'],'type':_0x907092['name'],'sectionId':_0x907092['id']},{})[_0x71e0('0x2b')](function(){return _0x1eb9c1;});}else{return _0x1eb9c1;}})[_0x71e0('0x53')](function(_0x4adfaf){logger[_0x71e0('0x2f')](_0x71e0('0x59'),_0x4adfaf);throw _0x4adfaf;});}return _0x1eb9c1;})[_0x71e0('0x2b')](respondWithResult(_0x28cb85,0xc9))['catch'](handleError(_0x28cb85,null));};exports[_0x71e0('0x2a')]=function(_0x1733f7,_0x3135ac){if(_0x1733f7['body']['id']){delete _0x1733f7['body']['id'];}return db['SmsQueue'][_0x71e0('0x52')]({'where':{'id':_0x1733f7[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0x3135ac,null))[_0x71e0('0x2b')](saveUpdates(_0x1733f7[_0x71e0('0x5a')],null))[_0x71e0('0x2b')](respondWithResult(_0x3135ac,null))[_0x71e0('0x53')](handleError(_0x3135ac,null));};exports[_0x71e0('0x2c')]=function(_0x463435,_0x11d0a){return db[_0x71e0('0x34')][_0x71e0('0x52')]({'where':{'id':_0x463435[_0x71e0('0x4f')]['id']}})['then'](handleEntityNotFound(_0x11d0a,null))['then'](removeEntity(_0x11d0a,null))[_0x71e0('0x53')](handleError(_0x11d0a,null));};exports[_0x71e0('0x5b')]=function(_0x3e5693,_0x1cb7a3){return db[_0x71e0('0x34')]['describe']()[_0x71e0('0x2b')](respondWithResult(_0x1cb7a3,null))['catch'](handleError(_0x1cb7a3,null));};exports['getMembers']=function(_0x2644a3,_0x4f26b1,_0x2c29e0){var _0x57cbd7={'raw':!![],'where':{}},_0x222b09={},_0x9fc984;return db[_0x71e0('0x34')][_0x71e0('0x5c')]({'where':{'id':_0x2644a3[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0x4f26b1,null))[_0x71e0('0x2b')](function(_0x328d05){if(_0x328d05){_0x9fc984=_0x328d05[_0x71e0('0x2d')]({'plain':!![]});_0x222b09['model']=_[_0x71e0('0x50')](db[_0x71e0('0x5d')][_0x71e0('0x35')]);_0x222b09[_0x71e0('0x3b')]=_['keys'](_0x2644a3[_0x71e0('0x3b')]);_0x222b09[_0x71e0('0x3c')]=_['intersection'](_0x222b09[_0x71e0('0x39')],_0x222b09['query']);_0x57cbd7['attributes']=_['intersection'](_0x222b09[_0x71e0('0x39')],qs['fields'](_0x2644a3[_0x71e0('0x3b')][_0x71e0('0x3f')]));_0x57cbd7['attributes']=_0x57cbd7[_0x71e0('0x3e')][_0x71e0('0x40')]?_0x57cbd7['attributes']:_0x222b09[_0x71e0('0x39')];if(!_0x2644a3['query'][_0x71e0('0x41')](_0x71e0('0x42'))){_0x57cbd7[_0x71e0('0x25')]=qs[_0x71e0('0x25')](_0x2644a3[_0x71e0('0x3b')]['limit']);_0x57cbd7[_0x71e0('0x23')]=qs[_0x71e0('0x23')](_0x2644a3[_0x71e0('0x3b')][_0x71e0('0x23')]);}_0x57cbd7['order']=qs['sort'](_0x2644a3[_0x71e0('0x3b')][_0x71e0('0x44')]);_0x57cbd7[_0x71e0('0x45')]=qs[_0x71e0('0x3c')](_[_0x71e0('0x46')](_0x2644a3[_0x71e0('0x3b')],_0x222b09[_0x71e0('0x3c')]));_0x57cbd7[_0x71e0('0x45')][_0x71e0('0x5e')]=_0x328d05['id'];if(_0x2644a3['query'][_0x71e0('0x47')]){_0x57cbd7[_0x71e0('0x45')]=_['merge'](_0x57cbd7[_0x71e0('0x45')],{'$or':_[_0x71e0('0x3a')](_0x57cbd7[_0x71e0('0x3e')],function(_0x136fcc){var _0x1eaaa7={};_0x1eaaa7[_0x136fcc]={'$like':'%'+_0x2644a3[_0x71e0('0x3b')]['filter']+'%'};return _0x1eaaa7;})});}_0x57cbd7=_[_0x71e0('0x51')]({},_0x57cbd7,_0x2644a3[_0x71e0('0x49')]);return db['UserSmsQueue'][_0x71e0('0x4c')](_0x57cbd7);}})[_0x71e0('0x2b')](function(_0x47c9cc){if(_0x47c9cc){return db[_0x71e0('0x5f')][_0x71e0('0x60')]({'where':{'id':_[_0x71e0('0x3a')](_0x47c9cc,_0x71e0('0x61')),'role':_0x71e0('0x62')},'attributes':['id',_0x71e0('0x31'),_0x71e0('0x63'),_0x71e0('0x64'),_0x71e0('0x65')]});}})['then'](function(_0x3ca047){if(_0x3ca047){return{'count':_0x3ca047[_0x71e0('0x26')],'rows':_[_0x71e0('0x3a')](_0x3ca047[_0x71e0('0x4d')],function(_0x1deff7){return{'membername':_0x1deff7[_0x71e0('0x31')],'UserId':_0x1deff7['id'],'queue_name':_0x9fc984[_0x71e0('0x31')],'SmsQueueId':_0x9fc984['id'],'interface':util[_0x71e0('0x66')](_0x71e0('0x67'),_0x71e0('0x68'),_0x1deff7['name']),'penalty':0x0,'paused':_0x1deff7[_0x71e0('0x63')],'createdAt':_0x1deff7[_0x71e0('0x65')],'updatedAt':_0x1deff7[_0x71e0('0x64')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x71e0('0x2b')](respondWithFilteredResult(_0x4f26b1,_0x57cbd7))[_0x71e0('0x53')](handleError(_0x4f26b1,null));};exports['getTeams']=function(_0x2ad088,_0x37c193,_0x50b378){var _0x1a5077={};var _0xd0064e={};var _0x222b56;var _0x56012b;return db[_0x71e0('0x34')][_0x71e0('0x5c')]({'where':{'id':_0x2ad088['params']['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0x37c193,null))['then'](function(_0x1fdb75){if(_0x1fdb75){_0x222b56=_0x1fdb75;_0xd0064e[_0x71e0('0x39')]=_[_0x71e0('0x50')](db[_0x71e0('0x69')][_0x71e0('0x35')]);_0xd0064e[_0x71e0('0x3b')]=_[_0x71e0('0x50')](_0x2ad088[_0x71e0('0x3b')]);_0xd0064e[_0x71e0('0x3c')]=_[_0x71e0('0x3d')](_0xd0064e['model'],_0xd0064e['query']);_0x1a5077[_0x71e0('0x3e')]=_[_0x71e0('0x3d')](_0xd0064e[_0x71e0('0x39')],qs[_0x71e0('0x3f')](_0x2ad088[_0x71e0('0x3b')]['fields']));_0x1a5077[_0x71e0('0x3e')]=_0x1a5077['attributes'][_0x71e0('0x40')]?_0x1a5077['attributes']:_0xd0064e[_0x71e0('0x39')];_0x1a5077['order']=qs['sort'](_0x2ad088[_0x71e0('0x3b')]['sort']);_0x1a5077['where']=qs['filters'](_['pick'](_0x2ad088[_0x71e0('0x3b')],_0xd0064e[_0x71e0('0x3c')]));if(_0x2ad088[_0x71e0('0x3b')][_0x71e0('0x47')]){_0x1a5077[_0x71e0('0x45')]=_[_0x71e0('0x51')](_0x1a5077[_0x71e0('0x45')],{'$or':_['map'](_0x1a5077[_0x71e0('0x3e')],function(_0x5eb4ff){var _0x3517be={};_0x3517be[_0x5eb4ff]={'$like':'%'+_0x2ad088[_0x71e0('0x3b')][_0x71e0('0x47')]+'%'};return _0x3517be;})});}_0x1a5077=_[_0x71e0('0x51')]({},_0x1a5077,_0x2ad088['options']);return _0x222b56['getTeams'](_0x1a5077);}})[_0x71e0('0x2b')](function(_0x549b02){if(_0x549b02){_0x56012b=_0x549b02[_0x71e0('0x40')];if(!_0x2ad088[_0x71e0('0x3b')][_0x71e0('0x41')](_0x71e0('0x42'))){_0x1a5077[_0x71e0('0x25')]=qs[_0x71e0('0x25')](_0x2ad088[_0x71e0('0x3b')][_0x71e0('0x25')]);_0x1a5077[_0x71e0('0x23')]=qs['offset'](_0x2ad088[_0x71e0('0x3b')][_0x71e0('0x23')]);}return _0x222b56[_0x71e0('0x6a')](_0x1a5077);}})[_0x71e0('0x2b')](function(_0x69a7c8){if(_0x69a7c8){return _0x69a7c8?{'count':_0x56012b,'rows':_0x69a7c8}:null;}})[_0x71e0('0x2b')](respondWithResult(_0x37c193,null))[_0x71e0('0x53')](handleError(_0x37c193,null));};exports[_0x71e0('0x6b')]=function(_0x387b26,_0x10e6c0,_0x54ccf3){var _0x38f54a=_0x387b26[_0x71e0('0x5a')]['ids'];return db[_0x71e0('0x69')]['findAll']({'where':{'id':_0x38f54a},'attributes':['id'],'include':[{'model':db[_0x71e0('0x5f')],'as':_0x71e0('0x6c'),'attributes':['id',_0x71e0('0x31'),_0x71e0('0x6d'),_0x71e0('0x6e'),_0x71e0('0x6f')],'raw':!![]}]})['then'](function(_0x32bd13){if(_0x32bd13){var _0xc52bbf=_[_0x71e0('0x70')](_0x32bd13,function(_0x5e1a77){var _0x189254=_0x5e1a77[_0x71e0('0x2d')]({'plain':!![]});return _0x189254[_0x71e0('0x6c')];});return db[_0x71e0('0x34')][_0x71e0('0x52')]({'where':{'id':_0x387b26['params']['id']}})['then'](function(_0x2f4c69){return db[_0x71e0('0x71')][_0x71e0('0x72')](function(_0xf9cf96){return _0x2f4c69[_0x71e0('0x6b')](_0x38f54a,{'transaction':_0xf9cf96})[_0x71e0('0x2b')](function(){return BPromise[_0x71e0('0x73')](_0xc52bbf,function(_0x389a36){return db[_0x71e0('0x5d')]['findOrCreate']({'where':{'UserId':_0x389a36['id'],'SmsQueueId':_0x387b26[_0x71e0('0x4f')]['id']},'transaction':_0xf9cf96});});})[_0x71e0('0x2b')](function(){_0xc52bbf[_0x71e0('0x74')](function(_0x7fbcae){socket[_0x71e0('0x75')](_0x71e0('0x76'),{'UserId':_0x7fbcae['id'],'SmsQueueId':_0x2f4c69['id']});});});});});}})['then'](respondWithStatusCode(_0x10e6c0,null))[_0x71e0('0x53')](handleError(_0x10e6c0,null));};exports[_0x71e0('0x77')]=function(_0x8ba528,_0x148b6f,_0x4146cb){return db[_0x71e0('0x69')][_0x71e0('0x4c')]({'where':{'id':_0x8ba528[_0x71e0('0x3b')][_0x71e0('0x78')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x71e0('0x6c'),'attributes':['id'],'raw':!![]}]})[_0x71e0('0x2b')](handleEntityNotFound(_0x148b6f,null))['then'](function(_0x31c8e8){var _0x9e6bb7=_['map'](_0x31c8e8,'id');var _0x8a8067=[];var _0x3e2e29=[];var _0x485543=squel[_0x71e0('0x79')]();_0x485543[_0x71e0('0x7a')](_0x71e0('0x7b'))[_0x71e0('0x7c')](_0x71e0('0x7d'),'tq')[_0x71e0('0x7e')]('user_has_teams','ut',_0x71e0('0x7f'))['where'](_0x71e0('0x80'),_0x8ba528[_0x71e0('0x4f')]['id']);for(var _0x46a9d9=0x0;_0x46a9d9<_0x31c8e8[_0x71e0('0x40')];_0x46a9d9+=0x1){let _0x41b4d4=_0x31c8e8[_0x46a9d9];for(var _0x26a296=0x0;_0x26a296<_0x41b4d4['Agents']['length'];_0x26a296+=0x1){let _0x454fcb=_0x41b4d4[_0x71e0('0x6c')][_0x26a296];var _0x4af323=_0x485543[_0x71e0('0x81')]();_0x4af323[_0x71e0('0x45')](_0x71e0('0x82'),_0x454fcb['id']);_0x3e2e29[_0x71e0('0x83')](db['sequelize'][_0x71e0('0x3b')](_0x4af323['toString'](),{'type':db[_0x71e0('0x71')][_0x71e0('0x84')]['SELECT']})[_0x71e0('0x2b')](function(_0x164ddd){if(_0x164ddd[_0x71e0('0x40')]===0x1){return _0x454fcb['id'];}else{var _0x394231=_[_0x71e0('0x85')](_[_0x71e0('0x3a')](_0x164ddd,_0x71e0('0x86')),function(_0x360606){return _['includes'](_0x9e6bb7,_0x360606);});if(_0x394231){return _0x454fcb['id'];}}}));}}return BPromise[_0x71e0('0x87')](_0x3e2e29)[_0x71e0('0x2b')](function(_0xa562a4){_0x8a8067=_(_0x8a8067)[_0x71e0('0x88')](_0xa562a4)[_0x71e0('0x89')]()[_0x71e0('0x8a')]();return db[_0x71e0('0x34')][_0x71e0('0x52')]({'where':{'id':_0x8ba528[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](function(_0xe647ad){return db[_0x71e0('0x71')][_0x71e0('0x72')](function(_0x253a2d){return _0xe647ad[_0x71e0('0x77')](_0x8ba528[_0x71e0('0x3b')]['ids'],{'transaction':_0x253a2d})['then'](function(){if(!_[_0x71e0('0x8b')](_0x8a8067)){return _0xe647ad[_0x71e0('0x8c')](_0x8a8067,{'transaction':_0x253a2d});}})[_0x71e0('0x2b')](function(){_0x8a8067[_0x71e0('0x74')](function(_0x4851f1){socket[_0x71e0('0x75')](_0x71e0('0x8d'),{'UserId':_0x4851f1,'SmsQueueId':_0xe647ad['id']});});});});});});})[_0x71e0('0x2b')](respondWithStatusCode(_0x148b6f,null))['catch'](handleError(_0x148b6f,null));};exports[_0x71e0('0x8e')]=function(_0x41eef6,_0xfceac2,_0x59b6ea){return db['SmsQueue'][_0x71e0('0x52')]({'where':{'id':_0x41eef6[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0xfceac2,null))['then'](function(_0x45280c){if(_0x45280c){return _0x45280c[_0x71e0('0x8e')](_0x41eef6[_0x71e0('0x5a')][_0x71e0('0x78')],_['omit'](_0x41eef6[_0x71e0('0x5a')],[_0x71e0('0x78'),'id'])||{})['spread'](function(_0x47485a){for(var _0xb51c2e=0x0;_0xb51c2e<_0x41eef6['body'][_0x71e0('0x78')][_0x71e0('0x40')];_0xb51c2e+=0x1){socket[_0x71e0('0x75')](_0x71e0('0x76'),{'UserId':_0x41eef6[_0x71e0('0x5a')][_0x71e0('0x78')][_0xb51c2e],'SmsQueueId':_0x41eef6[_0x71e0('0x4f')]['id']});}return _0x47485a;});}})['then'](respondWithResult(_0xfceac2,null))[_0x71e0('0x53')](handleError(_0xfceac2,null));};exports[_0x71e0('0x8c')]=function(_0x54a0b1,_0x29b48b,_0x1b032e){return db[_0x71e0('0x34')]['find']({'where':{'id':_0x54a0b1[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0x29b48b,null))[_0x71e0('0x2b')](function(_0x529c0e){if(_0x529c0e){return _0x529c0e[_0x71e0('0x8c')](_0x54a0b1[_0x71e0('0x3b')]['ids'])[_0x71e0('0x2b')](function(){if(_['isArray'](_0x54a0b1['query']['ids'])){for(var _0x5a98d9=0x0;_0x5a98d9<_0x54a0b1['query'][_0x71e0('0x78')][_0x71e0('0x40')];_0x5a98d9+=0x1){socket[_0x71e0('0x75')](_0x71e0('0x8d'),{'UserId':Number(_0x54a0b1[_0x71e0('0x3b')]['ids'][_0x5a98d9]),'SmsQueueId':Number(_0x54a0b1[_0x71e0('0x4f')]['id'])});}}else{socket[_0x71e0('0x75')]('userSmsQueue:remove',{'UserId':Number(_0x54a0b1['query'][_0x71e0('0x78')]),'SmsQueueId':Number(_0x54a0b1[_0x71e0('0x4f')]['id'])});}});}})[_0x71e0('0x2b')](respondWithStatusCode(_0x29b48b,null))[_0x71e0('0x53')](handleError(_0x29b48b,null));};exports[_0x71e0('0x8f')]=function(_0x4e7628,_0x253e32,_0x5ab2b7){var _0x247250={};var _0x12abdd={};var _0x2ef270;var _0x2104fe;return db[_0x71e0('0x34')]['findOne']({'where':{'id':_0x4e7628[_0x71e0('0x4f')]['id']}})[_0x71e0('0x2b')](handleEntityNotFound(_0x253e32,null))[_0x71e0('0x2b')](function(_0x13cf73){if(_0x13cf73){_0x2ef270=_0x13cf73;_0x12abdd[_0x71e0('0x39')]=_['keys'](db[_0x71e0('0x5f')][_0x71e0('0x35')]);_0x12abdd[_0x71e0('0x3b')]=_['keys'](_0x4e7628['query']);_0x12abdd[_0x71e0('0x3c')]=_[_0x71e0('0x3d')](_0x12abdd[_0x71e0('0x39')],_0x12abdd[_0x71e0('0x3b')]);_0x247250[_0x71e0('0x3e')]=_[_0x71e0('0x3d')](_0x12abdd[_0x71e0('0x39')],qs[_0x71e0('0x3f')](_0x4e7628['query'][_0x71e0('0x3f')]));_0x247250[_0x71e0('0x3e')]=_0x247250['attributes'][_0x71e0('0x40')]?_0x247250[_0x71e0('0x3e')]:_0x12abdd[_0x71e0('0x39')];_0x247250['order']=qs[_0x71e0('0x44')](_0x4e7628[_0x71e0('0x3b')]['sort']);_0x247250[_0x71e0('0x45')]=qs['filters'](_['pick'](_0x4e7628[_0x71e0('0x3b')],_0x12abdd[_0x71e0('0x3c')]));if(_0x4e7628[_0x71e0('0x3b')][_0x71e0('0x47')]){_0x247250['where']=_[_0x71e0('0x51')](_0x247250['where'],{'$or':_[_0x71e0('0x3a')](_0x247250[_0x71e0('0x3e')],function(_0x24f2b3){var _0x3adb8a={};_0x3adb8a[_0x24f2b3]={'$like':'%'+_0x4e7628['query'][_0x71e0('0x47')]+'%'};return _0x3adb8a;})});}_0x247250=_[_0x71e0('0x51')]({},_0x247250,_0x4e7628[_0x71e0('0x49')]);return _0x2ef270[_0x71e0('0x8f')](_0x247250);}})[_0x71e0('0x2b')](function(_0x47fe11){if(_0x47fe11){_0x2104fe=_0x47fe11[_0x71e0('0x40')];if(!_0x4e7628['query'][_0x71e0('0x41')](_0x71e0('0x42'))){_0x247250[_0x71e0('0x25')]=qs['limit'](_0x4e7628[_0x71e0('0x3b')][_0x71e0('0x25')]);_0x247250[_0x71e0('0x23')]=qs['offset'](_0x4e7628[_0x71e0('0x3b')][_0x71e0('0x23')]);}return _0x2ef270[_0x71e0('0x8f')](_0x247250);}})[_0x71e0('0x2b')](function(_0x5f4017){if(_0x5f4017){return _0x5f4017?{'count':_0x2104fe,'rows':_0x5f4017}:null;}})[_0x71e0('0x2b')](respondWithResult(_0x253e32,null))[_0x71e0('0x53')](handleError(_0x253e32,null));}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.events.js b/server/api/smsQueue/smsQueue.events.js index 2f32db1..70399c4 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 _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 +var _0xc3b7=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','SmsQueue','update'];(function(_0x13934c,_0x201ad0){var _0x3e0588=function(_0xcab523){while(--_0xcab523){_0x13934c['push'](_0x13934c['shift']());}};_0x3e0588(++_0x201ad0);}(_0xc3b7,0xa7));var _0x7c3b=function(_0x54ed8f,_0x450aed){_0x54ed8f=_0x54ed8f-0x0;var _0x4b668a=_0xc3b7[_0x54ed8f];return _0x4b668a;};'use strict';var EventEmitter=require(_0x7c3b('0x0'));var SmsQueue=require(_0x7c3b('0x1'))['db'][_0x7c3b('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x7c3b('0x3'),'afterDestroy':_0x7c3b('0x4')};function emitEvent(_0x54dd7e){return function(_0x283025,_0x5a5c56,_0x15de76){SmsQueueEvents[_0x7c3b('0x5')](_0x54dd7e+':'+_0x283025['id'],_0x283025);SmsQueueEvents[_0x7c3b('0x5')](_0x54dd7e,_0x283025);_0x15de76(null);};}for(var e in events){if(events[_0x7c3b('0x6')](e)){var event=events[e];SmsQueue[_0x7c3b('0x7')](e,emitEvent(event));}}module[_0x7c3b('0x8')]=SmsQueueEvents; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.model.js b/server/api/smsQueue/smsQueue.model.js index 9d21e30..25a2635 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 _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 +var _0x92fc=['rimraf','../../config/environment','./smsQueue.attributes','exports','define','SmsQueue','lodash','../../config/logger','moment','bluebird','path'];(function(_0x512454,_0x2108e9){var _0x329cd0=function(_0x1715a4){while(--_0x1715a4){_0x512454['push'](_0x512454['shift']());}};_0x329cd0(++_0x2108e9);}(_0x92fc,0x69));var _0xc92f=function(_0x2a9ec5,_0xed23b){_0x2a9ec5=_0x2a9ec5-0x0;var _0x52c7c0=_0x92fc[_0x2a9ec5];return _0x52c7c0;};'use strict';var _=require(_0xc92f('0x0'));var util=require('util');var logger=require(_0xc92f('0x1'))('api');var moment=require(_0xc92f('0x2'));var BPromise=require(_0xc92f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc92f('0x4'));var rimraf=require(_0xc92f('0x5'));var config=require(_0xc92f('0x6'));var attributes=require(_0xc92f('0x7'));module[_0xc92f('0x8')]=function(_0x2c476d,_0x5ab51f){return _0x2c476d[_0xc92f('0x9')](_0xc92f('0xa'),attributes,{'tableName':'sms_queues','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 f9170d9..e02d3ed 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 _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 +var _0x0941=['info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetSmsQueue','SmsQueue','findAll','raw','options','limit','include','map','model','attributes','then','ShowSmsQueue','find','where','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','defaults','redis','localhost','socket.io-emitter','./smsQueue.socket','register','request'];(function(_0x37e4c8,_0x2cf6da){var _0x136d53=function(_0xede06){while(--_0xede06){_0x37e4c8['push'](_0x37e4c8['shift']());}};_0x136d53(++_0x2cf6da);}(_0x0941,0x114));var _0x1094=function(_0x59fcf5,_0x4a95e4){_0x59fcf5=_0x59fcf5-0x0;var _0x42f90e=_0x0941[_0x59fcf5];return _0x42f90e;};'use strict';var _=require(_0x1094('0x0'));var util=require('util');var moment=require(_0x1094('0x1'));var BPromise=require(_0x1094('0x2'));var rs=require(_0x1094('0x3'));var fs=require('fs');var Redis=require(_0x1094('0x4'));var db=require(_0x1094('0x5'))['db'];var utils=require(_0x1094('0x6'));var logger=require('../../config/logger')(_0x1094('0x7'));var config=require(_0x1094('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x1094('0x9')][_0x1094('0xa')]({'port':0x232a});config['redis']=_[_0x1094('0xb')](config[_0x1094('0xc')],{'host':_0x1094('0xd'),'port':0x18eb});var socket=require(_0x1094('0xe'))(new Redis(config[_0x1094('0xc')]));require(_0x1094('0xf'))[_0x1094('0x10')](socket);function respondWithRpcPromise(_0x5d2348,_0x2349a3,_0x2ad1e8){return new BPromise(function(_0x4f4594,_0x5576df){return client[_0x1094('0x11')](_0x5d2348,_0x2ad1e8)['then'](function(_0x1509da){logger[_0x1094('0x12')](_0x1094('0x13'),_0x2349a3,_0x1094('0x14'));logger[_0x1094('0x15')](_0x1094('0x16'),_0x2349a3,_0x1094('0x14'),JSON[_0x1094('0x17')](_0x1509da));if(_0x1509da['error']){if(_0x1509da[_0x1094('0x18')][_0x1094('0x19')]===0x1f4){logger[_0x1094('0x18')](_0x1094('0x13'),_0x2349a3,_0x1509da['error'][_0x1094('0x1a')]);return _0x5576df(_0x1509da['error'][_0x1094('0x1a')]);}logger[_0x1094('0x18')](_0x1094('0x13'),_0x2349a3,_0x1509da['error']['message']);return _0x4f4594(_0x1509da[_0x1094('0x18')][_0x1094('0x1a')]);}else{logger[_0x1094('0x12')](_0x1094('0x13'),_0x2349a3,_0x1094('0x14'));_0x4f4594(_0x1509da['result'][_0x1094('0x1a')]);}})[_0x1094('0x1b')](function(_0x2edc92){logger['error']('SmsQueue,\x20%s,\x20%s',_0x2349a3,_0x2edc92);_0x5576df(_0x2edc92);});});}exports[_0x1094('0x1c')]=function(_0x583080){var _0x215dfa=this;return new Promise(function(_0x1dd92e,_0x399b29){return db[_0x1094('0x1d')][_0x1094('0x1e')]({'raw':_0x583080['options']?_0x583080['options'][_0x1094('0x1f')]===undefined?!![]:![]:!![],'where':_0x583080[_0x1094('0x20')]?_0x583080[_0x1094('0x20')]['where']||null:null,'attributes':_0x583080[_0x1094('0x20')]?_0x583080['options']['attributes']||null:null,'limit':_0x583080[_0x1094('0x20')]?_0x583080['options'][_0x1094('0x21')]||null:null,'include':_0x583080['options']?_0x583080[_0x1094('0x20')][_0x1094('0x22')]?_[_0x1094('0x23')](_0x583080[_0x1094('0x20')]['include'],function(_0x261d57){return{'model':db[_0x261d57[_0x1094('0x24')]],'as':_0x261d57['as'],'attributes':_0x261d57['attributes'],'include':_0x261d57[_0x1094('0x22')]?_['map'](_0x261d57[_0x1094('0x22')],function(_0x4c379e){return{'model':db[_0x4c379e[_0x1094('0x24')]],'as':_0x4c379e['as'],'attributes':_0x4c379e[_0x1094('0x25')],'include':_0x4c379e['include']?_[_0x1094('0x23')](_0x4c379e[_0x1094('0x22')],function(_0x7ae67d){return{'model':db[_0x7ae67d[_0x1094('0x24')]],'as':_0x7ae67d['as'],'attributes':_0x7ae67d['attributes']};}):[]};}):[]};}):[]:[]})[_0x1094('0x26')](function(_0x13a75e){logger[_0x1094('0x12')](_0x1094('0x1c'),_0x583080);logger[_0x1094('0x15')]('GetSmsQueue',_0x583080,JSON[_0x1094('0x17')](_0x13a75e));_0x1dd92e(_0x13a75e);})[_0x1094('0x1b')](function(_0x273865){logger[_0x1094('0x18')](_0x1094('0x1c'),_0x273865[_0x1094('0x1a')],_0x583080);_0x399b29(_0x215dfa[_0x1094('0x18')](0x1f4,_0x273865[_0x1094('0x1a')]));});});};exports[_0x1094('0x27')]=function(_0x588529){var _0x48d2e7=this;return new Promise(function(_0x14f24b,_0x4cc4c0){return db[_0x1094('0x1d')][_0x1094('0x28')]({'raw':_0x588529['options']?_0x588529[_0x1094('0x20')][_0x1094('0x1f')]===undefined?!![]:![]:!![],'where':_0x588529[_0x1094('0x20')]?_0x588529[_0x1094('0x20')][_0x1094('0x29')]||null:null,'attributes':_0x588529[_0x1094('0x20')]?_0x588529['options'][_0x1094('0x25')]||null:null,'include':_0x588529[_0x1094('0x20')]?_0x588529[_0x1094('0x20')][_0x1094('0x22')]?_['map'](_0x588529['options'][_0x1094('0x22')],function(_0xe62c42){return{'model':db[_0xe62c42[_0x1094('0x24')]],'as':_0xe62c42['as'],'attributes':_0xe62c42['attributes'],'include':_0xe62c42['include']?_['map'](_0xe62c42[_0x1094('0x22')],function(_0x406797){return{'model':db[_0x406797['model']],'as':_0x406797['as'],'attributes':_0x406797[_0x1094('0x25')],'include':_0x406797[_0x1094('0x22')]?_['map'](_0x406797[_0x1094('0x22')],function(_0x481786){return{'model':db[_0x481786[_0x1094('0x24')]],'as':_0x481786['as'],'attributes':_0x481786[_0x1094('0x25')]};}):[]};}):[]};}):[]:[]})[_0x1094('0x26')](function(_0x41e272){logger['info']('ShowSmsQueue',_0x588529);logger[_0x1094('0x15')](_0x1094('0x27'),_0x588529,JSON['stringify'](_0x41e272));_0x14f24b(_0x41e272);})['catch'](function(_0x12ccd1){logger['error'](_0x1094('0x27'),_0x12ccd1[_0x1094('0x1a')],_0x588529);_0x4cc4c0(_0x48d2e7[_0x1094('0x18')](0x1f4,_0x12ccd1[_0x1094('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.socket.js b/server/api/smsQueue/smsQueue.socket.js index 8421357..1852ba5 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 _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 +var _0xa7d3=['length','smsQueue:','update','emit','removeListener','register'];(function(_0x4ae936,_0x13dc14){var _0x20b511=function(_0x10b4d6){while(--_0x10b4d6){_0x4ae936['push'](_0x4ae936['shift']());}};_0x20b511(++_0x13dc14);}(_0xa7d3,0x18e));var _0x3a7d=function(_0x442e2d,_0x4d84c3){_0x442e2d=_0x442e2d-0x0;var _0x157780=_0xa7d3[_0x442e2d];return _0x157780;};'use strict';var SmsQueueEvents=require('./smsQueue.events');var events=['save','remove',_0x3a7d('0x0')];function createListener(_0x1810ac,_0x1b04c2){return function(_0x3d42b6){_0x1b04c2[_0x3a7d('0x1')](_0x1810ac,_0x3d42b6);};}function removeListener(_0x1bafc6,_0x2c4b0a){return function(){SmsQueueEvents[_0x3a7d('0x2')](_0x1bafc6,_0x2c4b0a);};}exports[_0x3a7d('0x3')]=function(_0x2890a2){for(var _0x31ed23=0x0,_0x1a4238=events[_0x3a7d('0x4')];_0x31ed23<_0x1a4238;_0x31ed23++){var _0xba96da=events[_0x31ed23];var _0x42d53c=createListener(_0x3a7d('0x5')+_0xba96da,_0x2890a2);SmsQueueEvents['on'](_0xba96da,_0x42d53c);}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/index.js b/server/api/smsQueueReport/index.js index 55bd19e..dabd51e 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 _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 +var _0x018c=['/:id','show','post','create','put','update','delete','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueueReport.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x333798,_0x9f6561){var _0x389f4e=function(_0x193b28){while(--_0x193b28){_0x333798['push'](_0x333798['shift']());}};_0x389f4e(++_0x9f6561);}(_0x018c,0xda));var _0xc018=function(_0x1798d4,_0x2f35e3){_0x1798d4=_0x1798d4-0x0;var _0xfd608d=_0x018c[_0x1798d4];return _0xfd608d;};'use strict';var multer=require(_0xc018('0x0'));var util=require(_0xc018('0x1'));var path=require(_0xc018('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xc018('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xc018('0x4'));var interaction=require(_0xc018('0x5'));var config=require(_0xc018('0x6'));var controller=require(_0xc018('0x7'));router['get']('/',auth[_0xc018('0x8')](),controller[_0xc018('0x9')]);router[_0xc018('0xa')](_0xc018('0xb'),auth[_0xc018('0x8')](),controller[_0xc018('0xc')]);router[_0xc018('0xa')](_0xc018('0xd'),auth[_0xc018('0x8')](),controller[_0xc018('0xe')]);router[_0xc018('0xf')]('/',auth[_0xc018('0x8')](),controller[_0xc018('0x10')]);router[_0xc018('0x11')](_0xc018('0xd'),auth[_0xc018('0x8')](),controller[_0xc018('0x12')]);router[_0xc018('0x13')]('/:id',auth[_0xc018('0x8')](),controller['destroy']);module[_0xc018('0x14')]=router; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.attributes.js b/server/api/smsQueueReport/smsQueueReport.attributes.js index fc74485..907b436 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 _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 +var _0x99c9=['DATE','moment','sequelize','exports','STRING'];(function(_0x3a2a20,_0x48e10a){var _0x366ec2=function(_0x15a9b0){while(--_0x15a9b0){_0x3a2a20['push'](_0x3a2a20['shift']());}};_0x366ec2(++_0x48e10a);}(_0x99c9,0x13c));var _0x999c=function(_0x1203f,_0x554bbc){_0x1203f=_0x1203f-0x0;var _0x365f0a=_0x99c9[_0x1203f];return _0x365f0a;};'use strict';var moment=require(_0x999c('0x0'));var Sequelize=require(_0x999c('0x1'));module[_0x999c('0x2')]={'uniqueid':{'type':Sequelize[_0x999c('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x999c('0x3')]},'joinAt':{'type':Sequelize[_0x999c('0x4')]},'leaveAt':{'type':Sequelize[_0x999c('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x999c('0x4')]},'reason':{'type':Sequelize[_0x999c('0x3')]}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.controller.js b/server/api/smsQueueReport/smsQueueReport.controller.js index 76d9a7b..1c5c28d 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 _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 +var _0x761c=['../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','update','then','destroy','stack','name','index','map','SmsQueueReport','rawAttributes','fieldName','type','key','model','keys','filters','intersection','attributes','query','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','include','find','create','body','describe','zip-dir','fast-json-patch','moment','bluebird','util','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x761c,0xcb));var _0xc761=function(_0xe83e88,_0x29a3cb){_0xe83e88=_0xe83e88-0x0;var _0x4d6d58=_0x761c[_0xe83e88];return _0x4d6d58;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc761('0x0'));var jsonpatch=require(_0xc761('0x1'));var rp=require('request-promise');var moment=require(_0xc761('0x2'));var BPromise=require(_0xc761('0x3'));var Mustache=require('mustache');var util=require(_0xc761('0x4'));var path=require('path');var sox=require(_0xc761('0x5'));var csv=require(_0xc761('0x6'));var ejs=require(_0xc761('0x7'));var fs=require('fs');var fs_extra=require(_0xc761('0x8'));var _=require('lodash');var squel=require(_0xc761('0x9'));var crypto=require('crypto');var jsforce=require(_0xc761('0xa'));var deskjs=require(_0xc761('0xb'));var toCsv=require(_0xc761('0x6'));var querystring=require('querystring');var Papa=require(_0xc761('0xc'));var Redis=require('ioredis');var authService=require(_0xc761('0xd'));var qs=require(_0xc761('0xe'));var as=require(_0xc761('0xf'));var hardwareService=require(_0xc761('0x10'));var logger=require(_0xc761('0x11'))(_0xc761('0x12'));var utils=require('../../config/utils');var config=require(_0xc761('0x13'));var licenseUtil=require(_0xc761('0x14'));var db=require(_0xc761('0x15'))['db'];function respondWithStatusCode(_0xc25d33,_0x186d7f){_0x186d7f=_0x186d7f||0xcc;return function(_0x3a9d9a){if(_0x3a9d9a){return _0xc25d33[_0xc761('0x16')](_0x186d7f);}return _0xc25d33[_0xc761('0x17')](_0x186d7f)[_0xc761('0x18')]();};}function respondWithResult(_0x25b868,_0x1cf641){_0x1cf641=_0x1cf641||0xc8;return function(_0x2121ed){if(_0x2121ed){return _0x25b868[_0xc761('0x17')](_0x1cf641)[_0xc761('0x19')](_0x2121ed);}};}function respondWithFilteredResult(_0x309bd9,_0x41be2c){return function(_0x4c8f25){if(_0x4c8f25){var _0x18d4e0=typeof _0x41be2c[_0xc761('0x1a')]==='undefined'&&typeof _0x41be2c[_0xc761('0x1b')]===_0xc761('0x1c');var _0x1c4750=_0x4c8f25['count'];var _0x1c7ede=_0x18d4e0?0x0:_0x41be2c[_0xc761('0x1a')];var _0x3b2122=_0x18d4e0?_0x4c8f25[_0xc761('0x1d')]:_0x41be2c[_0xc761('0x1a')]+_0x41be2c[_0xc761('0x1b')];var _0x47e3ac;if(_0x3b2122>=_0x1c4750){_0x3b2122=_0x1c4750;_0x47e3ac=0xc8;}else{_0x47e3ac=0xce;}_0x309bd9['status'](_0x47e3ac);return _0x309bd9[_0xc761('0x1e')](_0xc761('0x1f'),_0x1c7ede+'-'+_0x3b2122+'/'+_0x1c4750)[_0xc761('0x19')](_0x4c8f25);}return null;};}function patchUpdates(_0x807624){return function(_0x357e0b){try{jsonpatch[_0xc761('0x20')](_0x357e0b,_0x807624,!![]);}catch(_0x25ac91){return BPromise[_0xc761('0x21')](_0x25ac91);}return _0x357e0b['save']();};}function saveUpdates(_0x24f683,_0x5ee1c8){return function(_0x23074e){if(_0x23074e){return _0x23074e[_0xc761('0x22')](_0x24f683)[_0xc761('0x23')](function(_0x8eac1){return _0x8eac1;});}return null;};}function removeEntity(_0x1519e7,_0x40c267){return function(_0x5034c7){if(_0x5034c7){return _0x5034c7[_0xc761('0x24')]()[_0xc761('0x23')](function(){_0x1519e7[_0xc761('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5d83f1,_0xaf3253){return function(_0x409a1c){if(!_0x409a1c){_0x5d83f1[_0xc761('0x16')](0x194);}return _0x409a1c;};}function handleError(_0x51fff8,_0x3cb065){_0x3cb065=_0x3cb065||0x1f4;return function(_0x1cc7f2){logger['error'](_0x1cc7f2[_0xc761('0x25')]);if(_0x1cc7f2[_0xc761('0x26')]){delete _0x1cc7f2[_0xc761('0x26')];}_0x51fff8[_0xc761('0x17')](_0x3cb065)['send'](_0x1cc7f2);};}exports[_0xc761('0x27')]=function(_0x7dc8d9,_0x3d2035){var _0x48b46a={},_0x2945f2={},_0x33062a={'count':0x0,'rows':[]};var _0x2a9eab=_[_0xc761('0x28')](db[_0xc761('0x29')][_0xc761('0x2a')],function(_0x2118fd){return{'name':_0x2118fd[_0xc761('0x2b')],'type':_0x2118fd[_0xc761('0x2c')][_0xc761('0x2d')]};});_0x2945f2[_0xc761('0x2e')]=_['map'](_0x2a9eab,_0xc761('0x26'));_0x2945f2['query']=_[_0xc761('0x2f')](_0x7dc8d9['query']);_0x2945f2[_0xc761('0x30')]=_[_0xc761('0x31')](_0x2945f2[_0xc761('0x2e')],_0x2945f2['query']);_0x48b46a[_0xc761('0x32')]=_[_0xc761('0x31')](_0x2945f2[_0xc761('0x2e')],qs['fields'](_0x7dc8d9[_0xc761('0x33')][_0xc761('0x34')]));_0x48b46a[_0xc761('0x32')]=_0x48b46a[_0xc761('0x32')]['length']?_0x48b46a[_0xc761('0x32')]:_0x2945f2[_0xc761('0x2e')];if(!_0x7dc8d9[_0xc761('0x33')][_0xc761('0x35')](_0xc761('0x36'))){_0x48b46a['limit']=qs[_0xc761('0x1b')](_0x7dc8d9[_0xc761('0x33')]['limit']);_0x48b46a[_0xc761('0x1a')]=qs['offset'](_0x7dc8d9[_0xc761('0x33')][_0xc761('0x1a')]);}_0x48b46a[_0xc761('0x37')]=qs[_0xc761('0x38')](_0x7dc8d9[_0xc761('0x33')][_0xc761('0x38')]);_0x48b46a[_0xc761('0x39')]=qs['filters'](_['pick'](_0x7dc8d9[_0xc761('0x33')],_0x2945f2[_0xc761('0x30')]),_0x2a9eab);if(_0x7dc8d9[_0xc761('0x33')][_0xc761('0x3a')]){_0x48b46a[_0xc761('0x39')]=_[_0xc761('0x3b')](_0x48b46a[_0xc761('0x39')],{'$or':_['map'](_0x2a9eab,function(_0x3910ae){if(_0x3910ae[_0xc761('0x2c')]!==_0xc761('0x3c')){var _0x13dd1f={};_0x13dd1f[_0x3910ae[_0xc761('0x26')]]={'$like':'%'+_0x7dc8d9[_0xc761('0x33')]['filter']+'%'};return _0x13dd1f;}})});}_0x48b46a=_[_0xc761('0x3b')]({},_0x48b46a,_0x7dc8d9[_0xc761('0x3d')]);var _0x55ac59={'where':_0x48b46a[_0xc761('0x39')]};return db[_0xc761('0x29')][_0xc761('0x1d')](_0x55ac59)[_0xc761('0x23')](function(_0x3c61c2){_0x33062a[_0xc761('0x1d')]=_0x3c61c2;if(_0x7dc8d9[_0xc761('0x33')][_0xc761('0x3e')]){_0x48b46a['include']=[{'all':!![]}];}return db['SmsQueueReport'][_0xc761('0x3f')](_0x48b46a);})[_0xc761('0x23')](function(_0x58892a){_0x33062a[_0xc761('0x40')]=_0x58892a;return _0x33062a;})['then'](respondWithFilteredResult(_0x3d2035,_0x48b46a))[_0xc761('0x41')](handleError(_0x3d2035,null));};exports[_0xc761('0x42')]=function(_0x197e35,_0x32cc59){var _0x442991={'raw':!![],'where':{'id':_0x197e35[_0xc761('0x43')]['id']}},_0x47b2ab={};_0x47b2ab[_0xc761('0x2e')]=_[_0xc761('0x2f')](db['SmsQueueReport'][_0xc761('0x2a')]);_0x47b2ab[_0xc761('0x33')]=_[_0xc761('0x2f')](_0x197e35['query']);_0x47b2ab[_0xc761('0x30')]=_[_0xc761('0x31')](_0x47b2ab[_0xc761('0x2e')],_0x47b2ab[_0xc761('0x33')]);_0x442991['attributes']=_['intersection'](_0x47b2ab[_0xc761('0x2e')],qs[_0xc761('0x34')](_0x197e35[_0xc761('0x33')][_0xc761('0x34')]));_0x442991['attributes']=_0x442991[_0xc761('0x32')]['length']?_0x442991['attributes']:_0x47b2ab['model'];if(_0x197e35['query'][_0xc761('0x3e')]){_0x442991[_0xc761('0x44')]=[{'all':!![]}];}_0x442991=_[_0xc761('0x3b')]({},_0x442991,_0x197e35[_0xc761('0x3d')]);return db[_0xc761('0x29')][_0xc761('0x45')](_0x442991)[_0xc761('0x23')](handleEntityNotFound(_0x32cc59,null))[_0xc761('0x23')](respondWithResult(_0x32cc59,null))[_0xc761('0x41')](handleError(_0x32cc59,null));};exports[_0xc761('0x46')]=function(_0x19734e,_0x125c5e){return db[_0xc761('0x29')][_0xc761('0x46')](_0x19734e[_0xc761('0x47')],{})['then'](respondWithResult(_0x125c5e,0xc9))[_0xc761('0x41')](handleError(_0x125c5e,null));};exports['update']=function(_0x4b18a9,_0x311578){if(_0x4b18a9[_0xc761('0x47')]['id']){delete _0x4b18a9[_0xc761('0x47')]['id'];}return db[_0xc761('0x29')][_0xc761('0x45')]({'where':{'id':_0x4b18a9[_0xc761('0x43')]['id']}})[_0xc761('0x23')](handleEntityNotFound(_0x311578,null))[_0xc761('0x23')](saveUpdates(_0x4b18a9[_0xc761('0x47')],null))['then'](respondWithResult(_0x311578,null))[_0xc761('0x41')](handleError(_0x311578,null));};exports[_0xc761('0x24')]=function(_0x5333a0,_0x37e05b){return db['SmsQueueReport']['find']({'where':{'id':_0x5333a0['params']['id']}})[_0xc761('0x23')](handleEntityNotFound(_0x37e05b,null))[_0xc761('0x23')](removeEntity(_0x37e05b,null))['catch'](handleError(_0x37e05b,null));};exports[_0xc761('0x48')]=function(_0x1de81c,_0x2ad359){return db[_0xc761('0x29')][_0xc761('0x48')]()[_0xc761('0x23')](respondWithResult(_0x2ad359,null))[_0xc761('0x41')](handleError(_0x2ad359,null));}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.model.js b/server/api/smsQueueReport/smsQueueReport.model.js index d7d91ff..6b9b541 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 _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 +var _0xd8b0=['define','report_sms_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x342eef,_0x1fd17d){var _0x2a30c0=function(_0x31c3b1){while(--_0x31c3b1){_0x342eef['push'](_0x342eef['shift']());}};_0x2a30c0(++_0x1fd17d);}(_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 diff --git a/server/api/smsQueueReport/smsQueueReport.rpc.js b/server/api/smsQueueReport/smsQueueReport.rpc.js index 0c67f42..c76dcb4 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 _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 +var _0x1774=['info','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','raw','UpdateSmsQueueReport','attributes','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x10791d,_0x2562b6){var _0x1b4f9c=function(_0x3b2815){while(--_0x3b2815){_0x10791d['push'](_0x10791d['shift']());}};_0x1b4f9c(++_0x2562b6);}(_0x1774,0x1cb));var _0x4177=function(_0x2838ce,_0x6c9f9c){_0x2838ce=_0x2838ce-0x0;var _0x1f8a06=_0x1774[_0x2838ce];return _0x1f8a06;};'use strict';var _=require(_0x4177('0x0'));var util=require(_0x4177('0x1'));var moment=require(_0x4177('0x2'));var BPromise=require(_0x4177('0x3'));var rs=require(_0x4177('0x4'));var fs=require('fs');var Redis=require(_0x4177('0x5'));var db=require(_0x4177('0x6'))['db'];var utils=require(_0x4177('0x7'));var logger=require(_0x4177('0x8'))(_0x4177('0x9'));var config=require(_0x4177('0xa'));var jayson=require(_0x4177('0xb'));var client=jayson[_0x4177('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1fd65d,_0x1d87f5,_0x283f8d){return new BPromise(function(_0x4c266c,_0x5a7455){return client['request'](_0x1fd65d,_0x283f8d)[_0x4177('0xd')](function(_0x5ef09e){logger['info'](_0x4177('0xe'),_0x1d87f5,_0x4177('0xf'));logger[_0x4177('0x10')](_0x4177('0x11'),_0x1d87f5,_0x4177('0xf'),JSON['stringify'](_0x5ef09e));if(_0x5ef09e[_0x4177('0x12')]){if(_0x5ef09e[_0x4177('0x12')][_0x4177('0x13')]===0x1f4){logger[_0x4177('0x12')](_0x4177('0xe'),_0x1d87f5,_0x5ef09e['error'][_0x4177('0x14')]);return _0x5a7455(_0x5ef09e[_0x4177('0x12')][_0x4177('0x14')]);}logger[_0x4177('0x12')](_0x4177('0xe'),_0x1d87f5,_0x5ef09e[_0x4177('0x12')][_0x4177('0x14')]);return _0x4c266c(_0x5ef09e[_0x4177('0x12')][_0x4177('0x14')]);}else{logger[_0x4177('0x15')]('SmsQueueReport,\x20%s,\x20%s',_0x1d87f5,_0x4177('0xf'));_0x4c266c(_0x5ef09e[_0x4177('0x16')][_0x4177('0x14')]);}})[_0x4177('0x17')](function(_0x5a3a19){logger[_0x4177('0x12')](_0x4177('0xe'),_0x1d87f5,_0x5a3a19);_0x5a7455(_0x5a3a19);});});}exports[_0x4177('0x18')]=function(_0x5edd92){var _0x31a2fc=this;return new Promise(function(_0xef18e7,_0x496ddb){return db[_0x4177('0x19')][_0x4177('0x1a')](_0x5edd92[_0x4177('0x1b')],{'raw':_0x5edd92['options']?_0x5edd92[_0x4177('0x1c')][_0x4177('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x48dce7){logger[_0x4177('0x15')](_0x4177('0x18'),_0x5edd92);logger[_0x4177('0x10')](_0x4177('0x18'),_0x5edd92,JSON['stringify'](_0x48dce7));_0xef18e7(_0x48dce7);})['catch'](function(_0x2c999e){logger['error'](_0x4177('0x18'),_0x2c999e[_0x4177('0x14')],_0x5edd92);_0x496ddb(_0x31a2fc[_0x4177('0x12')](0x1f4,_0x2c999e[_0x4177('0x14')]));});});};exports[_0x4177('0x1e')]=function(_0x2a4ca0){var _0xdb8f=this;return new Promise(function(_0x518e01,_0x40fc05){return db[_0x4177('0x19')]['update'](_0x2a4ca0['body'],{'raw':_0x2a4ca0['options']?_0x2a4ca0[_0x4177('0x1c')][_0x4177('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2a4ca0[_0x4177('0x1c')]?_0x2a4ca0[_0x4177('0x1c')]['where']||null:null,'attributes':_0x2a4ca0['options']?_0x2a4ca0['options'][_0x4177('0x1f')]||null:null,'limit':_0x2a4ca0[_0x4177('0x1c')]?_0x2a4ca0['options']['limit']||null:null})[_0x4177('0xd')](function(_0xe242cd){logger[_0x4177('0x15')]('UpdateSmsQueueReport',_0x2a4ca0);logger[_0x4177('0x10')]('UpdateSmsQueueReport',_0x2a4ca0,JSON['stringify'](_0xe242cd));_0x518e01(_0xe242cd);})[_0x4177('0x17')](function(_0x16d45c){logger[_0x4177('0x12')](_0x4177('0x1e'),_0x16d45c[_0x4177('0x14')],_0x2a4ca0);_0x40fc05(_0xdb8f['error'](0x1f4,_0x16d45c[_0x4177('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/smsTransferReport/index.js b/server/api/smsTransferReport/index.js index ea36046..60d916e 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 _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 +var _0x23f4=['exports','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','isAuthenticated','/describe','describe','/:id','put','update','destroy'];(function(_0xb97b43,_0x29aeb3){var _0x476e7a=function(_0x390c35){while(--_0x390c35){_0xb97b43['push'](_0xb97b43['shift']());}};_0x476e7a(++_0x29aeb3);}(_0x23f4,0x1ee));var _0x423f=function(_0x13e87b,_0x12bfb2){_0x13e87b=_0x13e87b-0x0;var _0x28650b=_0x23f4[_0x13e87b];return _0x28650b;};'use strict';var multer=require('multer');var util=require(_0x423f('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x423f('0x1'));var router=express[_0x423f('0x2')]();var fs_extra=require(_0x423f('0x3'));var auth=require(_0x423f('0x4'));var interaction=require(_0x423f('0x5'));var config=require(_0x423f('0x6'));var controller=require(_0x423f('0x7'));router[_0x423f('0x8')]('/',auth[_0x423f('0x9')](),controller['index']);router[_0x423f('0x8')](_0x423f('0xa'),auth['isAuthenticated'](),controller[_0x423f('0xb')]);router[_0x423f('0x8')](_0x423f('0xc'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x423f('0x9')](),controller['create']);router[_0x423f('0xd')](_0x423f('0xc'),auth[_0x423f('0x9')](),controller[_0x423f('0xe')]);router['delete'](_0x423f('0xc'),auth[_0x423f('0x9')](),controller[_0x423f('0xf')]);module[_0x423f('0x10')]=router; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.attributes.js b/server/api/smsTransferReport/smsTransferReport.attributes.js index 3b5b5fe..02ec8b3 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 _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 +var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0x1ddbae,_0x591992){var _0x4a9749=function(_0x534cde){while(--_0x534cde){_0x1ddbae['push'](_0x1ddbae['shift']());}};_0x4a9749(++_0x591992);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x5e0bfe,_0x747312){_0x5e0bfe=_0x5e0bfe-0x0;var _0x6468b8=_0xf3cd[_0x5e0bfe];return _0x6468b8;};'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 a9d8890..d09700e 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 _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 +var _0x5a1d=['model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','SmsTransferReport','includeAll','findAll','rows','catch','params','include','find','create','body','destroy','describe','rimraf','zip-dir','fast-json-patch','mustache','util','path','sox','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type'];(function(_0x2a2ee5,_0x13c3cb){var _0x21975e=function(_0x52e6de){while(--_0x52e6de){_0x2a2ee5['push'](_0x2a2ee5['shift']());}};_0x21975e(++_0x13c3cb);}(_0x5a1d,0x64));var _0xd5a1=function(_0x5f336a,_0x122801){_0x5f336a=_0x5f336a-0x0;var _0x38b0ae=_0x5a1d[_0x5f336a];return _0x38b0ae;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd5a1('0x0'));var zipdir=require(_0xd5a1('0x1'));var jsonpatch=require(_0xd5a1('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xd5a1('0x3'));var util=require(_0xd5a1('0x4'));var path=require(_0xd5a1('0x5'));var sox=require(_0xd5a1('0x6'));var csv=require('to-csv');var ejs=require(_0xd5a1('0x7'));var fs=require('fs');var fs_extra=require(_0xd5a1('0x8'));var _=require('lodash');var squel=require(_0xd5a1('0x9'));var crypto=require('crypto');var jsforce=require(_0xd5a1('0xa'));var deskjs=require(_0xd5a1('0xb'));var toCsv=require('to-csv');var querystring=require(_0xd5a1('0xc'));var Papa=require(_0xd5a1('0xd'));var Redis=require('ioredis');var authService=require(_0xd5a1('0xe'));var qs=require(_0xd5a1('0xf'));var as=require(_0xd5a1('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd5a1('0x11'))(_0xd5a1('0x12'));var utils=require(_0xd5a1('0x13'));var config=require(_0xd5a1('0x14'));var licenseUtil=require(_0xd5a1('0x15'));var db=require(_0xd5a1('0x16'))['db'];function respondWithStatusCode(_0x58e37c,_0x1000ec){_0x1000ec=_0x1000ec||0xcc;return function(_0x2740b4){if(_0x2740b4){return _0x58e37c['sendStatus'](_0x1000ec);}return _0x58e37c[_0xd5a1('0x17')](_0x1000ec)[_0xd5a1('0x18')]();};}function respondWithResult(_0x75a0f0,_0x415a9f){_0x415a9f=_0x415a9f||0xc8;return function(_0x46aa68){if(_0x46aa68){return _0x75a0f0[_0xd5a1('0x17')](_0x415a9f)[_0xd5a1('0x19')](_0x46aa68);}};}function respondWithFilteredResult(_0x159bdb,_0x53ed6d){return function(_0xda31ae){if(_0xda31ae){var _0x400bd8=typeof _0x53ed6d[_0xd5a1('0x1a')]===_0xd5a1('0x1b')&&typeof _0x53ed6d[_0xd5a1('0x1c')]===_0xd5a1('0x1b');var _0x396ef4=_0xda31ae[_0xd5a1('0x1d')];var _0x1ab185=_0x400bd8?0x0:_0x53ed6d[_0xd5a1('0x1a')];var _0x332871=_0x400bd8?_0xda31ae[_0xd5a1('0x1d')]:_0x53ed6d[_0xd5a1('0x1a')]+_0x53ed6d[_0xd5a1('0x1c')];var _0x239f17;if(_0x332871>=_0x396ef4){_0x332871=_0x396ef4;_0x239f17=0xc8;}else{_0x239f17=0xce;}_0x159bdb['status'](_0x239f17);return _0x159bdb['set'](_0xd5a1('0x1e'),_0x1ab185+'-'+_0x332871+'/'+_0x396ef4)[_0xd5a1('0x19')](_0xda31ae);}return null;};}function patchUpdates(_0x52ed97){return function(_0x15ea57){try{jsonpatch[_0xd5a1('0x1f')](_0x15ea57,_0x52ed97,!![]);}catch(_0x16b481){return BPromise[_0xd5a1('0x20')](_0x16b481);}return _0x15ea57['save']();};}function saveUpdates(_0x5c438e,_0x3494aa){return function(_0x6b7568){if(_0x6b7568){return _0x6b7568[_0xd5a1('0x21')](_0x5c438e)['then'](function(_0x3c7f11){return _0x3c7f11;});}return null;};}function removeEntity(_0x4fb65b,_0xefe5b1){return function(_0x78d162){if(_0x78d162){return _0x78d162['destroy']()[_0xd5a1('0x22')](function(){_0x4fb65b[_0xd5a1('0x17')](0xcc)[_0xd5a1('0x18')]();});}};}function handleEntityNotFound(_0x2e04ea,_0x19f40f){return function(_0x1c3226){if(!_0x1c3226){_0x2e04ea['sendStatus'](0x194);}return _0x1c3226;};}function handleError(_0x2402dd,_0x264d50){_0x264d50=_0x264d50||0x1f4;return function(_0x167ec2){logger[_0xd5a1('0x23')](_0x167ec2[_0xd5a1('0x24')]);if(_0x167ec2[_0xd5a1('0x25')]){delete _0x167ec2['name'];}_0x2402dd[_0xd5a1('0x17')](_0x264d50)[_0xd5a1('0x26')](_0x167ec2);};}exports[_0xd5a1('0x27')]=function(_0x4bf6f5,_0x2cb035){var _0x71f3d1={},_0xaa04d6={},_0x5d05ff={'count':0x0,'rows':[]};var _0x49b5e8=_[_0xd5a1('0x28')](db['SmsTransferReport'][_0xd5a1('0x29')],function(_0x5b08aa){return{'name':_0x5b08aa[_0xd5a1('0x2a')],'type':_0x5b08aa[_0xd5a1('0x2b')]['key']};});_0xaa04d6[_0xd5a1('0x2c')]=_['map'](_0x49b5e8,_0xd5a1('0x25'));_0xaa04d6[_0xd5a1('0x2d')]=_[_0xd5a1('0x2e')](_0x4bf6f5[_0xd5a1('0x2d')]);_0xaa04d6['filters']=_[_0xd5a1('0x2f')](_0xaa04d6[_0xd5a1('0x2c')],_0xaa04d6[_0xd5a1('0x2d')]);_0x71f3d1[_0xd5a1('0x30')]=_[_0xd5a1('0x2f')](_0xaa04d6[_0xd5a1('0x2c')],qs['fields'](_0x4bf6f5[_0xd5a1('0x2d')][_0xd5a1('0x31')]));_0x71f3d1[_0xd5a1('0x30')]=_0x71f3d1['attributes'][_0xd5a1('0x32')]?_0x71f3d1[_0xd5a1('0x30')]:_0xaa04d6[_0xd5a1('0x2c')];if(!_0x4bf6f5[_0xd5a1('0x2d')][_0xd5a1('0x33')]('nolimit')){_0x71f3d1['limit']=qs[_0xd5a1('0x1c')](_0x4bf6f5['query'][_0xd5a1('0x1c')]);_0x71f3d1[_0xd5a1('0x1a')]=qs[_0xd5a1('0x1a')](_0x4bf6f5['query'][_0xd5a1('0x1a')]);}_0x71f3d1[_0xd5a1('0x34')]=qs['sort'](_0x4bf6f5[_0xd5a1('0x2d')][_0xd5a1('0x35')]);_0x71f3d1[_0xd5a1('0x36')]=qs[_0xd5a1('0x37')](_[_0xd5a1('0x38')](_0x4bf6f5[_0xd5a1('0x2d')],_0xaa04d6[_0xd5a1('0x37')]),_0x49b5e8);if(_0x4bf6f5[_0xd5a1('0x2d')][_0xd5a1('0x39')]){_0x71f3d1[_0xd5a1('0x36')]=_[_0xd5a1('0x3a')](_0x71f3d1['where'],{'$or':_[_0xd5a1('0x28')](_0x49b5e8,function(_0x497a11){if(_0x497a11[_0xd5a1('0x2b')]!==_0xd5a1('0x3b')){var _0x4641b2={};_0x4641b2[_0x497a11[_0xd5a1('0x25')]]={'$like':'%'+_0x4bf6f5['query'][_0xd5a1('0x39')]+'%'};return _0x4641b2;}})});}_0x71f3d1=_[_0xd5a1('0x3a')]({},_0x71f3d1,_0x4bf6f5['options']);var _0x2983ac={'where':_0x71f3d1['where']};return db[_0xd5a1('0x3c')][_0xd5a1('0x1d')](_0x2983ac)[_0xd5a1('0x22')](function(_0x59f6e6){_0x5d05ff[_0xd5a1('0x1d')]=_0x59f6e6;if(_0x4bf6f5[_0xd5a1('0x2d')][_0xd5a1('0x3d')]){_0x71f3d1['include']=[{'all':!![]}];}return db['SmsTransferReport'][_0xd5a1('0x3e')](_0x71f3d1);})[_0xd5a1('0x22')](function(_0x498ade){_0x5d05ff[_0xd5a1('0x3f')]=_0x498ade;return _0x5d05ff;})[_0xd5a1('0x22')](respondWithFilteredResult(_0x2cb035,_0x71f3d1))[_0xd5a1('0x40')](handleError(_0x2cb035,null));};exports['show']=function(_0x4c2dfd,_0x3d31c1){var _0x32fea7={'raw':!![],'where':{'id':_0x4c2dfd[_0xd5a1('0x41')]['id']}},_0x2dbd28={};_0x2dbd28['model']=_['keys'](db[_0xd5a1('0x3c')][_0xd5a1('0x29')]);_0x2dbd28['query']=_[_0xd5a1('0x2e')](_0x4c2dfd[_0xd5a1('0x2d')]);_0x2dbd28['filters']=_['intersection'](_0x2dbd28[_0xd5a1('0x2c')],_0x2dbd28[_0xd5a1('0x2d')]);_0x32fea7[_0xd5a1('0x30')]=_[_0xd5a1('0x2f')](_0x2dbd28[_0xd5a1('0x2c')],qs[_0xd5a1('0x31')](_0x4c2dfd['query'][_0xd5a1('0x31')]));_0x32fea7[_0xd5a1('0x30')]=_0x32fea7[_0xd5a1('0x30')][_0xd5a1('0x32')]?_0x32fea7['attributes']:_0x2dbd28['model'];if(_0x4c2dfd[_0xd5a1('0x2d')][_0xd5a1('0x3d')]){_0x32fea7[_0xd5a1('0x42')]=[{'all':!![]}];}_0x32fea7=_['merge']({},_0x32fea7,_0x4c2dfd['options']);return db['SmsTransferReport'][_0xd5a1('0x43')](_0x32fea7)[_0xd5a1('0x22')](handleEntityNotFound(_0x3d31c1,null))[_0xd5a1('0x22')](respondWithResult(_0x3d31c1,null))[_0xd5a1('0x40')](handleError(_0x3d31c1,null));};exports[_0xd5a1('0x44')]=function(_0x4b0a7a,_0x47f7db){return db[_0xd5a1('0x3c')]['create'](_0x4b0a7a[_0xd5a1('0x45')],{})[_0xd5a1('0x22')](respondWithResult(_0x47f7db,0xc9))['catch'](handleError(_0x47f7db,null));};exports[_0xd5a1('0x21')]=function(_0x49f1cd,_0x4909f1){if(_0x49f1cd['body']['id']){delete _0x49f1cd['body']['id'];}return db[_0xd5a1('0x3c')][_0xd5a1('0x43')]({'where':{'id':_0x49f1cd[_0xd5a1('0x41')]['id']}})[_0xd5a1('0x22')](handleEntityNotFound(_0x4909f1,null))[_0xd5a1('0x22')](saveUpdates(_0x49f1cd['body'],null))[_0xd5a1('0x22')](respondWithResult(_0x4909f1,null))['catch'](handleError(_0x4909f1,null));};exports[_0xd5a1('0x46')]=function(_0x3694ee,_0x2ee0c6){return db[_0xd5a1('0x3c')][_0xd5a1('0x43')]({'where':{'id':_0x3694ee['params']['id']}})[_0xd5a1('0x22')](handleEntityNotFound(_0x2ee0c6,null))[_0xd5a1('0x22')](removeEntity(_0x2ee0c6,null))[_0xd5a1('0x40')](handleError(_0x2ee0c6,null));};exports[_0xd5a1('0x47')]=function(_0x1f4d64,_0x2bf712){return db['SmsTransferReport']['describe']()[_0xd5a1('0x22')](respondWithResult(_0x2bf712,null))[_0xd5a1('0x40')](handleError(_0x2bf712,null));}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.model.js b/server/api/smsTransferReport/smsTransferReport.model.js index bbf5218..b43d76d 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 _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 +var _0x7266=['moment','path','rimraf','exports','define','SmsTransferReport','report_sms_transfer','uniqueid','lodash','util','../../config/logger','api'];(function(_0x22af77,_0x11d457){var _0x5c9e16=function(_0x15031e){while(--_0x15031e){_0x22af77['push'](_0x22af77['shift']());}};_0x5c9e16(++_0x11d457);}(_0x7266,0xec));var _0x6726=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x7266[_0x4243a3];return _0x1b2a33;};'use strict';var _=require(_0x6726('0x0'));var util=require(_0x6726('0x1'));var logger=require(_0x6726('0x2'))(_0x6726('0x3'));var moment=require(_0x6726('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x6726('0x5'));var rimraf=require(_0x6726('0x6'));var config=require('../../config/environment');var attributes=require('./smsTransferReport.attributes');module[_0x6726('0x7')]=function(_0x41c7c8,_0x1c2cfd){return _0x41c7c8[_0x6726('0x8')](_0x6726('0x9'),attributes,{'tableName':_0x6726('0xa'),'paranoid':![],'indexes':[{'name':_0x6726('0xb'),'fields':[_0x6726('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 790ce1c..5abc7c2 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 _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 +var _0xe4d6=['stringify','code','error','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then','SmsTransferReport,\x20%s,\x20%s','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x33619b,_0x4ca61c){var _0x43e1e5=function(_0x2c52f4){while(--_0x2c52f4){_0x33619b['push'](_0x33619b['shift']());}};_0x43e1e5(++_0x4ca61c);}(_0xe4d6,0xd7));var _0x6e4d=function(_0x2199ea,_0x400f01){_0x2199ea=_0x2199ea-0x0;var _0x22307d=_0xe4d6[_0x2199ea];return _0x22307d;};'use strict';var _=require(_0x6e4d('0x0'));var util=require(_0x6e4d('0x1'));var moment=require(_0x6e4d('0x2'));var BPromise=require(_0x6e4d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6e4d('0x4'));var db=require(_0x6e4d('0x5'))['db'];var utils=require(_0x6e4d('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6e4d('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x6e4d('0x8')][_0x6e4d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x241d30,_0x907c47,_0x14706a){return new BPromise(function(_0x50f0cc,_0x4ba2fc){return client[_0x6e4d('0xa')](_0x241d30,_0x14706a)[_0x6e4d('0xb')](function(_0x472876){logger['info'](_0x6e4d('0xc'),_0x907c47,'request\x20sent');logger[_0x6e4d('0xd')](_0x6e4d('0xe'),_0x907c47,_0x6e4d('0xf'),JSON[_0x6e4d('0x10')](_0x472876));if(_0x472876['error']){if(_0x472876['error'][_0x6e4d('0x11')]===0x1f4){logger[_0x6e4d('0x12')](_0x6e4d('0xc'),_0x907c47,_0x472876[_0x6e4d('0x12')][_0x6e4d('0x13')]);return _0x4ba2fc(_0x472876[_0x6e4d('0x12')][_0x6e4d('0x13')]);}logger[_0x6e4d('0x12')](_0x6e4d('0xc'),_0x907c47,_0x472876['error'][_0x6e4d('0x13')]);return _0x50f0cc(_0x472876[_0x6e4d('0x12')][_0x6e4d('0x13')]);}else{logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x907c47,_0x6e4d('0xf'));_0x50f0cc(_0x472876['result'][_0x6e4d('0x13')]);}})[_0x6e4d('0x14')](function(_0x4c792c){logger[_0x6e4d('0x12')]('SmsTransferReport,\x20%s,\x20%s',_0x907c47,_0x4c792c);_0x4ba2fc(_0x4c792c);});});} \ No newline at end of file diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 78f35e2..d28c834 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 _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 +var _0x7873=['connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','show','download','diskStorage','root','originalname','replace','format','basename','extname','single','create','put','update','delete','exports','multer','util','path'];(function(_0x198e14,_0x1652c0){var _0x54db3e=function(_0x5b5bc0){while(--_0x5b5bc0){_0x198e14['push'](_0x198e14['shift']());}};_0x54db3e(++_0x1652c0);}(_0x7873,0x11f));var _0x3787=function(_0x5ea866,_0x4896ab){_0x5ea866=_0x5ea866-0x0;var _0x2d3c92=_0x7873[_0x5ea866];return _0x2d3c92;};'use strict';var multer=require(_0x3787('0x0'));var util=require(_0x3787('0x1'));var path=require(_0x3787('0x2'));var timeout=require(_0x3787('0x3'));var express=require(_0x3787('0x4'));var router=express['Router']();var fs_extra=require(_0x3787('0x5'));var auth=require(_0x3787('0x6'));var interaction=require(_0x3787('0x7'));var config=require(_0x3787('0x8'));var controller=require(_0x3787('0x9'));router[_0x3787('0xa')]('/',auth[_0x3787('0xb')](),controller[_0x3787('0xc')]);router['get'](_0x3787('0xd'),auth['isAuthenticated'](),controller[_0x3787('0xe')]);router[_0x3787('0xa')]('/:id/download',auth[_0x3787('0xb')](),controller[_0x3787('0xf')]);var upload=multer({'storage':multer[_0x3787('0x10')]({'destination':function(_0x3da4ca,_0x37a933,_0xdb6465){_0xdb6465(null,path['join'](config[_0x3787('0x11')],'server/files/sounds/original/'));},'filename':function(_0x5ca14f,_0x26d5ba,_0x4f8ebb){_0x26d5ba[_0x3787('0x12')]=_0x26d5ba['originalname'][_0x3787('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4f8ebb(null,util[_0x3787('0x14')]('%s-%s%s',path[_0x3787('0x15')](_0x26d5ba[_0x3787('0x12')],path[_0x3787('0x16')](_0x26d5ba[_0x3787('0x12')])),Date['now'](),path[_0x3787('0x16')](_0x26d5ba[_0x3787('0x12')])));}})});router['post']('/',upload[_0x3787('0x17')]('file'),controller[_0x3787('0x18')]);router[_0x3787('0x19')](_0x3787('0xd'),auth[_0x3787('0xb')](),controller[_0x3787('0x1a')]);router[_0x3787('0x1b')](_0x3787('0xd'),auth[_0x3787('0xb')](),controller[_0x3787('0x1b')]);module[_0x3787('0x1c')]=router; \ No newline at end of file diff --git a/server/api/sound/sound.attributes.js b/server/api/sound/sound.attributes.js index 84680e8..f94d8d7 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 _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 +var _0xee68=['STRING','name','FLOAT','INTEGER','sequelize','exports'];(function(_0x2053ea,_0x1ab2d4){var _0x2232c4=function(_0x4230df){while(--_0x4230df){_0x2053ea['push'](_0x2053ea['shift']());}};_0x2232c4(++_0x1ab2d4);}(_0xee68,0x13c));var _0x8ee6=function(_0x1b3564,_0x16c919){_0x1b3564=_0x1b3564-0x0;var _0x504069=_0xee68[_0x1b3564];return _0x504069;};'use strict';var Sequelize=require(_0x8ee6('0x0'));module[_0x8ee6('0x1')]={'name':{'type':Sequelize[_0x8ee6('0x2')],'unique':_0x8ee6('0x3'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize['STRING'],'defaultValue':''},'description':{'type':Sequelize[_0x8ee6('0x2')]},'original_format':{'type':Sequelize[_0x8ee6('0x2')]},'original_duration':{'type':Sequelize[_0x8ee6('0x4')]},'original_sampleCount':{'type':Sequelize['BIGINT']},'original_channelCount':{'type':Sequelize[_0x8ee6('0x5')]},'original_bitRate':{'type':Sequelize['BIGINT']},'original_sampleRate':{'type':Sequelize[_0x8ee6('0x5')]},'converted_format':{'type':Sequelize['STRING']},'converted_duration':{'type':Sequelize[_0x8ee6('0x4')]},'converted_sampleCount':{'type':Sequelize['BIGINT']},'converted_channelCount':{'type':Sequelize[_0x8ee6('0x5')]},'converted_bitRate':{'type':Sequelize['BIGINT']},'converted_sampleRate':{'type':Sequelize[_0x8ee6('0x5')]}}; \ No newline at end of file diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index 8b8b49c..437f6dd 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 _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 +var _0xd3d1=['originalname','extname','basename','filename','substring','wav','server/files/sounds/original','Sound\x20upload\x20filepath:\x20%s','info','0777','transcode','src','duration','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','converted_duration','converted_sampleCount','converted_channelCount','converted_bitRate','converted_sampleRate','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','description','delete','original_format','unlinkSync','eml-format','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','set','reject','save','update','then','destroy','get','Sounds','UserProfileResource','error','stack','name','send','index','map','Sound','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','VIRTUAL','merge','options','include','findAll','rows','catch','show','includeAll','find','download','params','save_name','converted_format','existsSync','root','Sequelize','ValidationError','Sound\x20not\x20found','join','server/files/sounds/converted','format','%s.%s','create','file'];(function(_0x364b32,_0x4dec35){var _0x3f3ea0=function(_0x1911a8){while(--_0x1911a8){_0x364b32['push'](_0x364b32['shift']());}};_0x3f3ea0(++_0x4dec35);}(_0xd3d1,0x9f));var _0x1d3d=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0xd3d1[_0x2c91e9];return _0x13f0ff;};'use strict';var emlformat=require(_0x1d3d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1d3d('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1d3d('0x2'));var moment=require('moment');var BPromise=require(_0x1d3d('0x3'));var Mustache=require(_0x1d3d('0x4'));var util=require(_0x1d3d('0x5'));var path=require('path');var sox=require(_0x1d3d('0x6'));var csv=require(_0x1d3d('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1d3d('0x8'));var _=require(_0x1d3d('0x9'));var squel=require(_0x1d3d('0xa'));var crypto=require(_0x1d3d('0xb'));var jsforce=require(_0x1d3d('0xc'));var deskjs=require(_0x1d3d('0xd'));var toCsv=require(_0x1d3d('0x7'));var querystring=require('querystring');var Papa=require(_0x1d3d('0xe'));var Redis=require(_0x1d3d('0xf'));var authService=require(_0x1d3d('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1d3d('0x11'));var logger=require('../../config/logger')(_0x1d3d('0x12'));var utils=require(_0x1d3d('0x13'));var config=require(_0x1d3d('0x14'));var licenseUtil=require(_0x1d3d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x59e772,_0x1cd858){_0x1cd858=_0x1cd858||0xcc;return function(_0x12085d){if(_0x12085d){return _0x59e772[_0x1d3d('0x16')](_0x1cd858);}return _0x59e772[_0x1d3d('0x17')](_0x1cd858)[_0x1d3d('0x18')]();};}function respondWithResult(_0x1e64d4,_0x3365fe){_0x3365fe=_0x3365fe||0xc8;return function(_0x4e028a){if(_0x4e028a){return _0x1e64d4[_0x1d3d('0x17')](_0x3365fe)[_0x1d3d('0x19')](_0x4e028a);}};}function respondWithFilteredResult(_0x6972d9,_0x1772e7){return function(_0x22eec2){if(_0x22eec2){var _0x24c15a=typeof _0x1772e7['offset']===_0x1d3d('0x1a')&&typeof _0x1772e7[_0x1d3d('0x1b')]===_0x1d3d('0x1a');var _0x1a1678=_0x22eec2[_0x1d3d('0x1c')];var _0x120a47=_0x24c15a?0x0:_0x1772e7[_0x1d3d('0x1d')];var _0x3538b1=_0x24c15a?_0x22eec2[_0x1d3d('0x1c')]:_0x1772e7[_0x1d3d('0x1d')]+_0x1772e7[_0x1d3d('0x1b')];var _0x126506;if(_0x3538b1>=_0x1a1678){_0x3538b1=_0x1a1678;_0x126506=0xc8;}else{_0x126506=0xce;}_0x6972d9['status'](_0x126506);return _0x6972d9[_0x1d3d('0x1e')]('Content-Range',_0x120a47+'-'+_0x3538b1+'/'+_0x1a1678)['json'](_0x22eec2);}return null;};}function patchUpdates(_0x186459){return function(_0x407ea2){try{jsonpatch['apply'](_0x407ea2,_0x186459,!![]);}catch(_0xc85474){return BPromise[_0x1d3d('0x1f')](_0xc85474);}return _0x407ea2[_0x1d3d('0x20')]();};}function saveUpdates(_0x46b3f1,_0x37b44b){return function(_0x161ae1){if(_0x161ae1){return _0x161ae1[_0x1d3d('0x21')](_0x46b3f1)[_0x1d3d('0x22')](function(_0x32e6ab){return _0x32e6ab;});}return null;};}function removeEntity(_0x26a5c4,_0x16a6e5){return function(_0x4b9e1b){if(_0x4b9e1b){return _0x4b9e1b[_0x1d3d('0x23')]()[_0x1d3d('0x22')](function(){var _0x410069=_0x4b9e1b[_0x1d3d('0x24')]({'plain':!![]});var _0x4b7692=_0x1d3d('0x25');return db[_0x1d3d('0x26')][_0x1d3d('0x23')]({'where':{'type':_0x4b7692,'resourceId':_0x410069['id']}})[_0x1d3d('0x22')](function(){return _0x4b9e1b;});})[_0x1d3d('0x22')](function(){_0x26a5c4[_0x1d3d('0x17')](0xcc)[_0x1d3d('0x18')]();});}};}function handleEntityNotFound(_0x23c44e,_0xa8176f){return function(_0x4ab116){if(!_0x4ab116){_0x23c44e[_0x1d3d('0x16')](0x194);}return _0x4ab116;};}function handleError(_0x1a68b5,_0x12173a){_0x12173a=_0x12173a||0x1f4;return function(_0x15b86c){logger[_0x1d3d('0x27')](_0x15b86c[_0x1d3d('0x28')]);if(_0x15b86c[_0x1d3d('0x29')]){delete _0x15b86c[_0x1d3d('0x29')];}_0x1a68b5['status'](_0x12173a)[_0x1d3d('0x2a')](_0x15b86c);};}exports[_0x1d3d('0x2b')]=function(_0x14bfd4,_0xec44d6){var _0x5ce0a1={},_0x4296ee={},_0x38724e={'count':0x0,'rows':[]};var _0x4ac66e=_[_0x1d3d('0x2c')](db[_0x1d3d('0x2d')]['rawAttributes'],function(_0x464842){return{'name':_0x464842['fieldName'],'type':_0x464842['type'][_0x1d3d('0x2e')]};});_0x4296ee[_0x1d3d('0x2f')]=_[_0x1d3d('0x2c')](_0x4ac66e,_0x1d3d('0x29'));_0x4296ee[_0x1d3d('0x30')]=_[_0x1d3d('0x31')](_0x14bfd4[_0x1d3d('0x30')]);_0x4296ee['filters']=_[_0x1d3d('0x32')](_0x4296ee[_0x1d3d('0x2f')],_0x4296ee['query']);_0x5ce0a1[_0x1d3d('0x33')]=_['intersection'](_0x4296ee[_0x1d3d('0x2f')],qs[_0x1d3d('0x34')](_0x14bfd4[_0x1d3d('0x30')][_0x1d3d('0x34')]));_0x5ce0a1[_0x1d3d('0x33')]=_0x5ce0a1[_0x1d3d('0x33')][_0x1d3d('0x35')]?_0x5ce0a1[_0x1d3d('0x33')]:_0x4296ee[_0x1d3d('0x2f')];if(!_0x14bfd4['query'][_0x1d3d('0x36')](_0x1d3d('0x37'))){_0x5ce0a1['limit']=qs[_0x1d3d('0x1b')](_0x14bfd4[_0x1d3d('0x30')][_0x1d3d('0x1b')]);_0x5ce0a1[_0x1d3d('0x1d')]=qs[_0x1d3d('0x1d')](_0x14bfd4[_0x1d3d('0x30')][_0x1d3d('0x1d')]);}_0x5ce0a1[_0x1d3d('0x38')]=qs[_0x1d3d('0x39')](_0x14bfd4[_0x1d3d('0x30')][_0x1d3d('0x39')]);_0x5ce0a1[_0x1d3d('0x3a')]=qs['filters'](_[_0x1d3d('0x3b')](_0x14bfd4['query'],_0x4296ee[_0x1d3d('0x3c')]),_0x4ac66e);if(_0x14bfd4[_0x1d3d('0x30')][_0x1d3d('0x3d')]){_0x5ce0a1[_0x1d3d('0x3a')]=_['merge'](_0x5ce0a1['where'],{'$or':_[_0x1d3d('0x2c')](_0x4ac66e,function(_0xb09539){if(_0xb09539['type']!==_0x1d3d('0x3e')){var _0x1b3c61={};_0x1b3c61[_0xb09539[_0x1d3d('0x29')]]={'$like':'%'+_0x14bfd4[_0x1d3d('0x30')]['filter']+'%'};return _0x1b3c61;}})});}_0x5ce0a1=_[_0x1d3d('0x3f')]({},_0x5ce0a1,_0x14bfd4[_0x1d3d('0x40')]);var _0x2a9616={'where':_0x5ce0a1[_0x1d3d('0x3a')]};return db[_0x1d3d('0x2d')]['count'](_0x2a9616)['then'](function(_0x5029f2){_0x38724e['count']=_0x5029f2;if(_0x14bfd4[_0x1d3d('0x30')]['includeAll']){_0x5ce0a1[_0x1d3d('0x41')]=[{'all':!![]}];}return db[_0x1d3d('0x2d')][_0x1d3d('0x42')](_0x5ce0a1);})[_0x1d3d('0x22')](function(_0x7896d9){_0x38724e[_0x1d3d('0x43')]=_0x7896d9;return _0x38724e;})[_0x1d3d('0x22')](respondWithFilteredResult(_0xec44d6,_0x5ce0a1))[_0x1d3d('0x44')](handleError(_0xec44d6,null));};exports[_0x1d3d('0x45')]=function(_0x13edc5,_0x5f39e3){var _0x142e81={'raw':!![],'where':{'id':_0x13edc5['params']['id']}},_0x174355={};_0x174355[_0x1d3d('0x2f')]=_['keys'](db['Sound']['rawAttributes']);_0x174355[_0x1d3d('0x30')]=_['keys'](_0x13edc5[_0x1d3d('0x30')]);_0x174355[_0x1d3d('0x3c')]=_['intersection'](_0x174355[_0x1d3d('0x2f')],_0x174355[_0x1d3d('0x30')]);_0x142e81[_0x1d3d('0x33')]=_[_0x1d3d('0x32')](_0x174355[_0x1d3d('0x2f')],qs[_0x1d3d('0x34')](_0x13edc5[_0x1d3d('0x30')][_0x1d3d('0x34')]));_0x142e81[_0x1d3d('0x33')]=_0x142e81[_0x1d3d('0x33')][_0x1d3d('0x35')]?_0x142e81[_0x1d3d('0x33')]:_0x174355[_0x1d3d('0x2f')];if(_0x13edc5[_0x1d3d('0x30')][_0x1d3d('0x46')]){_0x142e81[_0x1d3d('0x41')]=[{'all':!![]}];}_0x142e81=_[_0x1d3d('0x3f')]({},_0x142e81,_0x13edc5[_0x1d3d('0x40')]);return db[_0x1d3d('0x2d')][_0x1d3d('0x47')](_0x142e81)[_0x1d3d('0x22')](handleEntityNotFound(_0x5f39e3,null))[_0x1d3d('0x22')](respondWithResult(_0x5f39e3,null))['catch'](handleError(_0x5f39e3,null));};exports[_0x1d3d('0x48')]=function(_0x26f0cf,_0x432312,_0x9c66d2){return db['Sound']['find']({'where':{'id':_0x26f0cf[_0x1d3d('0x49')]['id']},'attributes':[_0x1d3d('0x29'),_0x1d3d('0x4a'),_0x1d3d('0x4b')],'raw':!![]})[_0x1d3d('0x22')](handleEntityNotFound(_0x432312,null))[_0x1d3d('0x22')](function(_0x3c3711){if(_0x3c3711){if(!fs[_0x1d3d('0x4c')](path['join'](config[_0x1d3d('0x4d')],'server/files/sounds/converted',_0x3c3711[_0x1d3d('0x4a')]+'.'+_0x3c3711[_0x1d3d('0x4b')]))){throw new db[(_0x1d3d('0x4e'))][(_0x1d3d('0x4f'))](_0x1d3d('0x50'));}return _0x432312[_0x1d3d('0x48')](path[_0x1d3d('0x51')](config[_0x1d3d('0x4d')],_0x1d3d('0x52'),util[_0x1d3d('0x53')](_0x1d3d('0x54'),_0x3c3711[_0x1d3d('0x4a')],_0x3c3711['converted_format'])),util['format']('%s.%s',_0x3c3711['name'],_0x3c3711[_0x1d3d('0x4b')]));}return null;})[_0x1d3d('0x44')](handleError(_0x432312,null));};exports[_0x1d3d('0x55')]=function(_0x5935b9,_0x86d467,_0x15396f){var _0x13523b={'name':path['basename'](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x57')],path[_0x1d3d('0x58')](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x57')])),'save_name':path[_0x1d3d('0x59')](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x5a')],path[_0x1d3d('0x58')](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x5a')])),'original_format':path[_0x1d3d('0x58')](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x57')])[_0x1d3d('0x5b')](0x1),'converted_format':_0x1d3d('0x5c')};var _0x5ccead=path[_0x1d3d('0x51')](config[_0x1d3d('0x4d')],_0x1d3d('0x5d'),_0x5935b9['file'][_0x1d3d('0x5a')]);var _0x520bd5=path[_0x1d3d('0x51')](config[_0x1d3d('0x4d')],_0x1d3d('0x52'),util[_0x1d3d('0x53')]('%s.%s',path[_0x1d3d('0x59')](_0x5935b9[_0x1d3d('0x56')][_0x1d3d('0x5a')],path[_0x1d3d('0x58')](_0x5935b9['file'][_0x1d3d('0x5a')])),_0x13523b['converted_format']));logger['info'](_0x1d3d('0x5e'),_0x5ccead);logger[_0x1d3d('0x5f')]('Sound\x20upload\x20destination:\x20%s',_0x520bd5);try{fs['chmodSync'](_0x5ccead,parseInt(_0x1d3d('0x60'),0x8));var _0x5be7fc=sox[_0x1d3d('0x61')](_0x5ccead,_0x520bd5,{'sampleRate':0x1f40,'format':_0x1d3d('0x5c'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x5be7fc['on'](_0x1d3d('0x27'),function(_0xa8acd5){fs['unlinkSync'](_0x5ccead);_0x86d467[_0x1d3d('0x17')](0x1f4)[_0x1d3d('0x2a')](_0xa8acd5);});_0x5be7fc['on'](_0x1d3d('0x62'),function(_0x1f49fd){_0x13523b['original_duration']=isNaN(_0x1f49fd[_0x1d3d('0x63')])?null:_0x1f49fd[_0x1d3d('0x63')]*0x3e8;_0x13523b['original_sampleCount']=isNaN(_0x1f49fd['sampleCount'])?null:_0x1f49fd[_0x1d3d('0x64')];_0x13523b[_0x1d3d('0x65')]=isNaN(_0x1f49fd[_0x1d3d('0x66')])?null:_0x1f49fd['channelCount'];_0x13523b[_0x1d3d('0x67')]=isNaN(_0x1f49fd['bitRate'])?null:_0x1f49fd[_0x1d3d('0x68')];_0x13523b[_0x1d3d('0x69')]=isNaN(_0x1f49fd[_0x1d3d('0x6a')])?null:_0x1f49fd[_0x1d3d('0x6a')];});_0x5be7fc['on']('dest',function(_0x1092b3){_0x13523b[_0x1d3d('0x6b')]=isNaN(_0x1092b3[_0x1d3d('0x63')])?null:_0x1092b3[_0x1d3d('0x63')]*0x3e8;_0x13523b[_0x1d3d('0x6c')]=isNaN(_0x1092b3[_0x1d3d('0x64')])?null:_0x1092b3[_0x1d3d('0x64')];_0x13523b[_0x1d3d('0x6d')]=isNaN(_0x1092b3[_0x1d3d('0x66')])?null:_0x1092b3[_0x1d3d('0x66')];_0x13523b[_0x1d3d('0x6e')]=isNaN(_0x1092b3[_0x1d3d('0x68')])?null:_0x1092b3[_0x1d3d('0x68')];_0x13523b[_0x1d3d('0x6f')]=isNaN(_0x1092b3[_0x1d3d('0x6a')])?null:_0x1092b3[_0x1d3d('0x6a')];});_0x5be7fc['on'](_0x1d3d('0x18'),function(){fs['chmodSync'](_0x520bd5,parseInt(_0x1d3d('0x60'),0x8));return db['Sound'][_0x1d3d('0x55')](_0x13523b)[_0x1d3d('0x22')](function(_0x34bfba){var _0x3b07c3={'role':_0x5935b9[_0x1d3d('0x70')][_0x1d3d('0x71')],'userProfileId':_0x5935b9['body'][_0x1d3d('0x72')]};if(!_0x3b07c3)throw new Error(_0x1d3d('0x73'));if(_0x3b07c3[_0x1d3d('0x71')]===_0x1d3d('0x74')){var _0x2f9c97=_0x34bfba[_0x1d3d('0x24')]({'plain':!![]});return db[_0x1d3d('0x75')]['find']({'where':{'name':_0x1d3d('0x25'),'userProfileId':_0x3b07c3['userProfileId']},'raw':!![]})[_0x1d3d('0x22')](function(_0x51492c){if(_0x51492c&&_0x51492c['autoAssociation']===0x0){return db[_0x1d3d('0x26')][_0x1d3d('0x55')]({'name':_0x2f9c97[_0x1d3d('0x29')],'resourceId':_0x2f9c97['id'],'type':_0x51492c[_0x1d3d('0x29')],'sectionId':_0x51492c['id']},{})[_0x1d3d('0x22')](function(){return _0x34bfba;});}else{return _0x34bfba;}})[_0x1d3d('0x44')](function(_0x376e7d){logger[_0x1d3d('0x27')](_0x1d3d('0x76'),_0x376e7d);throw _0x376e7d;});}return _0x34bfba;})['then'](respondWithResult(_0x86d467,null))['catch'](handleError(_0x86d467,null));});_0x5be7fc['start']();}catch(_0x6782d3){_0x86d467['status'](0x1f4)[_0x1d3d('0x2a')](_0x6782d3);}};exports['update']=function(_0x503ac3,_0x5d0328,_0x5b21be){return db[_0x1d3d('0x2d')][_0x1d3d('0x47')]({'where':{'id':_0x503ac3['params']['id']}})[_0x1d3d('0x22')](handleEntityNotFound(_0x5d0328,null))[_0x1d3d('0x22')](saveUpdates(_[_0x1d3d('0x3b')](_0x503ac3[_0x1d3d('0x70')],[_0x1d3d('0x29'),_0x1d3d('0x77')]),null))[_0x1d3d('0x22')](respondWithResult(_0x5d0328,null))['catch'](handleError(_0x5d0328,null));};exports[_0x1d3d('0x78')]=function(_0x437373,_0x1e6f57,_0x591822){return db[_0x1d3d('0x2d')][_0x1d3d('0x47')]({'where':{'id':_0x437373['params']['id']}})[_0x1d3d('0x22')](function(_0x2b919f){if(_0x2b919f){return _0x2b919f[_0x1d3d('0x23')]();}})[_0x1d3d('0x22')](function(_0x542600){var _0x2cf24e=path[_0x1d3d('0x51')](config[_0x1d3d('0x4d')],_0x1d3d('0x5d'),util['format'](_0x1d3d('0x54'),_0x542600[_0x1d3d('0x4a')],_0x542600[_0x1d3d('0x79')]));var _0x21e04f=path['join'](config[_0x1d3d('0x4d')],_0x1d3d('0x52'),util[_0x1d3d('0x53')](_0x1d3d('0x54'),_0x542600[_0x1d3d('0x4a')],_0x542600[_0x1d3d('0x4b')]));fs[_0x1d3d('0x7a')](_0x2cf24e);fs[_0x1d3d('0x7a')](_0x21e04f);return _0x542600;})['then'](function(_0x5c7dd7){if(_0x5c7dd7){return _0x1e6f57[_0x1d3d('0x17')](0xcc)[_0x1d3d('0x18')]();}})['then'](handleEntityNotFound(_0x1e6f57,null))[_0x1d3d('0x44')](handleError(_0x1e6f57,null));}; \ No newline at end of file diff --git a/server/api/sound/sound.model.js b/server/api/sound/sound.model.js index 59178fc..94f5999 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 _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 +var _0x2250=['lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./sound.attributes','exports','define','Sound','tools_sounds'];(function(_0x82129b,_0x484ae9){var _0x2ae5dc=function(_0x299e34){while(--_0x299e34){_0x82129b['push'](_0x82129b['shift']());}};_0x2ae5dc(++_0x484ae9);}(_0x2250,0x104));var _0x0225=function(_0x373096,_0x4d37aa){_0x373096=_0x373096-0x0;var _0x14a6d0=_0x2250[_0x373096];return _0x14a6d0;};'use strict';var _=require(_0x0225('0x0'));var util=require('util');var logger=require(_0x0225('0x1'))(_0x0225('0x2'));var moment=require(_0x0225('0x3'));var BPromise=require('bluebird');var rp=require(_0x0225('0x4'));var fs=require('fs');var path=require(_0x0225('0x5'));var rimraf=require(_0x0225('0x6'));var config=require(_0x0225('0x7'));var attributes=require(_0x0225('0x8'));module[_0x0225('0x9')]=function(_0x5e2477,_0x45a55f){return _0x5e2477[_0x0225('0xa')](_0x0225('0xb'),attributes,{'tableName':_0x0225('0xc'),'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 e9b0bd7..d1e38be 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 _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 +var _0xb973=['../../config/logger','rpc','../../config/environment','request','then','Sound,\x20%s,\x20%s','request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','Sound','find','options','where','attributes','include','map','model','ShowSound','lodash','bluebird','randomstring','ioredis'];(function(_0x2abd0d,_0x343ef1){var _0x5da587=function(_0x30ae77){while(--_0x30ae77){_0x2abd0d['push'](_0x2abd0d['shift']());}};_0x5da587(++_0x343ef1);}(_0xb973,0x1bc));var _0x3b97=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb973[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3b97('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3b97('0x1'));var rs=require(_0x3b97('0x2'));var fs=require('fs');var Redis=require(_0x3b97('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3b97('0x4'))(_0x3b97('0x5'));var config=require(_0x3b97('0x6'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2f9f78,_0x430158,_0x345288){return new BPromise(function(_0x4cb49c,_0x4bd859){return client[_0x3b97('0x7')](_0x2f9f78,_0x345288)[_0x3b97('0x8')](function(_0x20b4b9){logger['info'](_0x3b97('0x9'),_0x430158,_0x3b97('0xa'));logger[_0x3b97('0xb')](_0x3b97('0xc'),_0x430158,_0x3b97('0xa'),JSON[_0x3b97('0xd')](_0x20b4b9));if(_0x20b4b9[_0x3b97('0xe')]){if(_0x20b4b9['error']['code']===0x1f4){logger[_0x3b97('0xe')](_0x3b97('0x9'),_0x430158,_0x20b4b9[_0x3b97('0xe')][_0x3b97('0xf')]);return _0x4bd859(_0x20b4b9[_0x3b97('0xe')][_0x3b97('0xf')]);}logger['error'](_0x3b97('0x9'),_0x430158,_0x20b4b9[_0x3b97('0xe')][_0x3b97('0xf')]);return _0x4cb49c(_0x20b4b9[_0x3b97('0xe')][_0x3b97('0xf')]);}else{logger[_0x3b97('0x10')](_0x3b97('0x9'),_0x430158,'request\x20sent');_0x4cb49c(_0x20b4b9[_0x3b97('0x11')]['message']);}})[_0x3b97('0x12')](function(_0x33844b){logger[_0x3b97('0xe')]('Sound,\x20%s,\x20%s',_0x430158,_0x33844b);_0x4bd859(_0x33844b);});});}exports['ShowSound']=function(_0x25fa0f){var _0x4fd748=this;return new Promise(function(_0x56995e,_0x305053){return db[_0x3b97('0x13')][_0x3b97('0x14')]({'raw':_0x25fa0f[_0x3b97('0x15')]?_0x25fa0f['options']['raw']===undefined?!![]:![]:!![],'where':_0x25fa0f[_0x3b97('0x15')]?_0x25fa0f['options'][_0x3b97('0x16')]||null:null,'attributes':_0x25fa0f[_0x3b97('0x15')]?_0x25fa0f[_0x3b97('0x15')][_0x3b97('0x17')]||null:null,'include':_0x25fa0f[_0x3b97('0x15')]?_0x25fa0f[_0x3b97('0x15')][_0x3b97('0x18')]?_[_0x3b97('0x19')](_0x25fa0f[_0x3b97('0x15')][_0x3b97('0x18')],function(_0x38fe3c){return{'model':db[_0x38fe3c['model']],'as':_0x38fe3c['as'],'attributes':_0x38fe3c[_0x3b97('0x17')],'include':_0x38fe3c[_0x3b97('0x18')]?_[_0x3b97('0x19')](_0x38fe3c[_0x3b97('0x18')],function(_0x5294b0){return{'model':db[_0x5294b0[_0x3b97('0x1a')]],'as':_0x5294b0['as'],'attributes':_0x5294b0[_0x3b97('0x17')],'include':_0x5294b0[_0x3b97('0x18')]?_[_0x3b97('0x19')](_0x5294b0['include'],function(_0x40799a){return{'model':db[_0x40799a[_0x3b97('0x1a')]],'as':_0x40799a['as'],'attributes':_0x40799a[_0x3b97('0x17')]};}):[]};}):[]};}):[]:[]})[_0x3b97('0x8')](function(_0x362965){logger['info'](_0x3b97('0x1b'),_0x25fa0f);logger[_0x3b97('0xb')](_0x3b97('0x1b'),_0x25fa0f,JSON['stringify'](_0x362965));_0x56995e(_0x362965);})['catch'](function(_0x548e0e){logger[_0x3b97('0xe')](_0x3b97('0x1b'),_0x548e0e['message'],_0x25fa0f);_0x305053(_0x4fd748[_0x3b97('0xe')](0x1f4,_0x548e0e[_0x3b97('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/squareMessage/index.js b/server/api/squareMessage/index.js index 9eec518..61887ec 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 _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 +var _0x5eb8=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','isAuthenticated','index','/:id','show','put','update','delete','exports','path','connect-timeout','express','Router'];(function(_0x37cf14,_0x6e1467){var _0x2af6ed=function(_0x22d831){while(--_0x22d831){_0x37cf14['push'](_0x37cf14['shift']());}};_0x2af6ed(++_0x6e1467);}(_0x5eb8,0xb0));var _0x85eb=function(_0x12a201,_0x30aaba){_0x12a201=_0x12a201-0x0;var _0x52a4d2=_0x5eb8[_0x12a201];return _0x52a4d2;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x85eb('0x0'));var timeout=require(_0x85eb('0x1'));var express=require(_0x85eb('0x2'));var router=express[_0x85eb('0x3')]();var fs_extra=require(_0x85eb('0x4'));var auth=require(_0x85eb('0x5'));var interaction=require(_0x85eb('0x6'));var config=require(_0x85eb('0x7'));var controller=require(_0x85eb('0x8'));router[_0x85eb('0x9')]('/',auth[_0x85eb('0xa')](),controller[_0x85eb('0xb')]);router['get'](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller[_0x85eb('0xd')]);router['post']('/',auth[_0x85eb('0xa')](),controller['create']);router[_0x85eb('0xe')](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller[_0x85eb('0xf')]);router[_0x85eb('0x10')](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller['destroy']);module[_0x85eb('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 c6b93fa..2896f4f 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 _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 +var _0xa2a7=['STRING','exports','TEXT','medium','ENUM','out'];(function(_0xb9473f,_0xfae446){var _0x3d4559=function(_0x55bf2c){while(--_0x55bf2c){_0xb9473f['push'](_0xb9473f['shift']());}};_0x3d4559(++_0xfae446);}(_0xa2a7,0xfd));var _0x7a2a=function(_0x5bd426,_0x4878e5){_0x5bd426=_0x5bd426-0x0;var _0x23a7eb=_0xa2a7[_0x5bd426];return _0x23a7eb;};'use strict';var Sequelize=require('sequelize');module[_0x7a2a('0x0')]={'uniqueid':{'type':Sequelize['STRING']},'body':{'type':Sequelize[_0x7a2a('0x1')](_0x7a2a('0x2')),'allowNull':![]},'direction':{'type':Sequelize[_0x7a2a('0x3')]('in','out'),'defaultValue':_0x7a2a('0x4'),'allowNull':![]},'providerName':{'type':Sequelize[_0x7a2a('0x5')]},'providerResponse':{'type':Sequelize[_0x7a2a('0x1')]}}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.controller.js b/server/api/squareMessage/squareMessage.controller.js index 9ee18a6..3568527 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 _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 +var _0x29b1=['ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/license/util','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','then','stack','name','send','index','map','SquareMessage','rawAttributes','fieldName','type','model','query','intersection','attributes','length','hasOwnProperty','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','keys','fields','create','body','update','find','destroy','rimraf','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse'];(function(_0x829b63,_0x55b91c){var _0x1664ab=function(_0x567d37){while(--_0x567d37){_0x829b63['push'](_0x829b63['shift']());}};_0x1664ab(++_0x55b91c);}(_0x29b1,0xbb));var _0x129b=function(_0x1f9f37,_0x18776e){_0x1f9f37=_0x1f9f37-0x0;var _0x21c080=_0x29b1[_0x1f9f37];return _0x21c080;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x129b('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x129b('0x1'));var BPromise=require(_0x129b('0x2'));var Mustache=require(_0x129b('0x3'));var util=require('util');var path=require(_0x129b('0x4'));var sox=require(_0x129b('0x5'));var csv=require(_0x129b('0x6'));var ejs=require(_0x129b('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x129b('0x8'));var squel=require(_0x129b('0x9'));var crypto=require(_0x129b('0xa'));var jsforce=require(_0x129b('0xb'));var deskjs=require(_0x129b('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x129b('0xd'));var Redis=require(_0x129b('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x129b('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x129b('0x10'));var logger=require('../../config/logger')(_0x129b('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x129b('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x14bb9e,_0x2d91ae){_0x2d91ae=_0x2d91ae||0xcc;return function(_0x9c34e9){if(_0x9c34e9){return _0x14bb9e[_0x129b('0x13')](_0x2d91ae);}return _0x14bb9e['status'](_0x2d91ae)[_0x129b('0x14')]();};}function respondWithResult(_0x31af49,_0x1d2d9d){_0x1d2d9d=_0x1d2d9d||0xc8;return function(_0x3e8cdd){if(_0x3e8cdd){return _0x31af49[_0x129b('0x15')](_0x1d2d9d)[_0x129b('0x16')](_0x3e8cdd);}};}function respondWithFilteredResult(_0x27cc3c,_0xccd96f){return function(_0x3fb558){if(_0x3fb558){var _0x1e28b2=typeof _0xccd96f[_0x129b('0x17')]===_0x129b('0x18')&&typeof _0xccd96f[_0x129b('0x19')]===_0x129b('0x18');var _0x5fb732=_0x3fb558[_0x129b('0x1a')];var _0xdaa9d7=_0x1e28b2?0x0:_0xccd96f[_0x129b('0x17')];var _0x40047e=_0x1e28b2?_0x3fb558[_0x129b('0x1a')]:_0xccd96f[_0x129b('0x17')]+_0xccd96f[_0x129b('0x19')];var _0x1f4394;if(_0x40047e>=_0x5fb732){_0x40047e=_0x5fb732;_0x1f4394=0xc8;}else{_0x1f4394=0xce;}_0x27cc3c['status'](_0x1f4394);return _0x27cc3c[_0x129b('0x1b')](_0x129b('0x1c'),_0xdaa9d7+'-'+_0x40047e+'/'+_0x5fb732)[_0x129b('0x16')](_0x3fb558);}return null;};}function patchUpdates(_0x52d3e9){return function(_0x1457a6){try{jsonpatch['apply'](_0x1457a6,_0x52d3e9,!![]);}catch(_0x4ba9fb){return BPromise[_0x129b('0x1d')](_0x4ba9fb);}return _0x1457a6[_0x129b('0x1e')]();};}function saveUpdates(_0x5ca376,_0xad9cd0){return function(_0x220e97){if(_0x220e97){return _0x220e97['update'](_0x5ca376)['then'](function(_0x51cc74){return _0x51cc74;});}return null;};}function removeEntity(_0x10f641,_0x49c772){return function(_0xff1d67){if(_0xff1d67){return _0xff1d67['destroy']()[_0x129b('0x1f')](function(){_0x10f641['status'](0xcc)[_0x129b('0x14')]();});}};}function handleEntityNotFound(_0x1cb446,_0x330e9e){return function(_0x4e2105){if(!_0x4e2105){_0x1cb446[_0x129b('0x13')](0x194);}return _0x4e2105;};}function handleError(_0x23a35c,_0x53de1c){_0x53de1c=_0x53de1c||0x1f4;return function(_0xab26ee){logger['error'](_0xab26ee[_0x129b('0x20')]);if(_0xab26ee['name']){delete _0xab26ee[_0x129b('0x21')];}_0x23a35c[_0x129b('0x15')](_0x53de1c)[_0x129b('0x22')](_0xab26ee);};}exports[_0x129b('0x23')]=function(_0x10cc9e,_0xc8b344){var _0x3286e2={},_0x401c41={},_0x5388d2={'count':0x0,'rows':[]};var _0x29f816=_[_0x129b('0x24')](db[_0x129b('0x25')][_0x129b('0x26')],function(_0x26f1e2){return{'name':_0x26f1e2[_0x129b('0x27')],'type':_0x26f1e2[_0x129b('0x28')]['key']};});_0x401c41[_0x129b('0x29')]=_[_0x129b('0x24')](_0x29f816,_0x129b('0x21'));_0x401c41[_0x129b('0x2a')]=_['keys'](_0x10cc9e[_0x129b('0x2a')]);_0x401c41['filters']=_[_0x129b('0x2b')](_0x401c41[_0x129b('0x29')],_0x401c41['query']);_0x3286e2[_0x129b('0x2c')]=_[_0x129b('0x2b')](_0x401c41[_0x129b('0x29')],qs['fields'](_0x10cc9e[_0x129b('0x2a')]['fields']));_0x3286e2[_0x129b('0x2c')]=_0x3286e2[_0x129b('0x2c')][_0x129b('0x2d')]?_0x3286e2[_0x129b('0x2c')]:_0x401c41[_0x129b('0x29')];if(!_0x10cc9e['query'][_0x129b('0x2e')]('nolimit')){_0x3286e2[_0x129b('0x19')]=qs[_0x129b('0x19')](_0x10cc9e[_0x129b('0x2a')]['limit']);_0x3286e2['offset']=qs[_0x129b('0x17')](_0x10cc9e[_0x129b('0x2a')]['offset']);}_0x3286e2[_0x129b('0x2f')]=qs['sort'](_0x10cc9e['query'][_0x129b('0x30')]);_0x3286e2[_0x129b('0x31')]=qs[_0x129b('0x32')](_['pick'](_0x10cc9e[_0x129b('0x2a')],_0x401c41['filters']),_0x29f816);if(_0x10cc9e['query'][_0x129b('0x33')]){_0x3286e2[_0x129b('0x31')]=_[_0x129b('0x34')](_0x3286e2[_0x129b('0x31')],{'$or':_[_0x129b('0x24')](_0x29f816,function(_0xe5631e){if(_0xe5631e[_0x129b('0x28')]!==_0x129b('0x35')){var _0x1fb955={};_0x1fb955[_0xe5631e[_0x129b('0x21')]]={'$like':'%'+_0x10cc9e[_0x129b('0x2a')][_0x129b('0x33')]+'%'};return _0x1fb955;}})});}_0x3286e2=_['merge']({},_0x3286e2,_0x10cc9e[_0x129b('0x36')]);var _0x964798={'where':_0x3286e2[_0x129b('0x31')]};return db[_0x129b('0x25')][_0x129b('0x1a')](_0x964798)[_0x129b('0x1f')](function(_0x34839a){_0x5388d2['count']=_0x34839a;if(_0x10cc9e[_0x129b('0x2a')][_0x129b('0x37')]){_0x3286e2['include']=[{'all':!![]}];}return db[_0x129b('0x25')][_0x129b('0x38')](_0x3286e2);})[_0x129b('0x1f')](function(_0xc6a93f){_0x5388d2[_0x129b('0x39')]=_0xc6a93f;return _0x5388d2;})[_0x129b('0x1f')](respondWithFilteredResult(_0xc8b344,_0x3286e2))[_0x129b('0x3a')](handleError(_0xc8b344,null));};exports['show']=function(_0x4b9d34,_0x36c22a){var _0x29a4a7={'raw':!![],'where':{'id':_0x4b9d34[_0x129b('0x3b')]['id']}},_0x5e76cc={};_0x5e76cc['model']=_['keys'](db[_0x129b('0x25')][_0x129b('0x26')]);_0x5e76cc[_0x129b('0x2a')]=_[_0x129b('0x3c')](_0x4b9d34['query']);_0x5e76cc[_0x129b('0x32')]=_['intersection'](_0x5e76cc[_0x129b('0x29')],_0x5e76cc['query']);_0x29a4a7[_0x129b('0x2c')]=_['intersection'](_0x5e76cc[_0x129b('0x29')],qs['fields'](_0x4b9d34[_0x129b('0x2a')][_0x129b('0x3d')]));_0x29a4a7['attributes']=_0x29a4a7[_0x129b('0x2c')][_0x129b('0x2d')]?_0x29a4a7['attributes']:_0x5e76cc[_0x129b('0x29')];if(_0x4b9d34[_0x129b('0x2a')][_0x129b('0x37')]){_0x29a4a7['include']=[{'all':!![]}];}_0x29a4a7=_[_0x129b('0x34')]({},_0x29a4a7,_0x4b9d34[_0x129b('0x36')]);return db[_0x129b('0x25')]['find'](_0x29a4a7)[_0x129b('0x1f')](handleEntityNotFound(_0x36c22a,null))[_0x129b('0x1f')](respondWithResult(_0x36c22a,null))['catch'](handleError(_0x36c22a,null));};exports[_0x129b('0x3e')]=function(_0x562960,_0x2aefa8){return db[_0x129b('0x25')][_0x129b('0x3e')](_0x562960[_0x129b('0x3f')],{})[_0x129b('0x1f')](respondWithResult(_0x2aefa8,0xc9))[_0x129b('0x3a')](handleError(_0x2aefa8,null));};exports[_0x129b('0x40')]=function(_0x13e29a,_0x31116a){if(_0x13e29a['body']['id']){delete _0x13e29a[_0x129b('0x3f')]['id'];}return db['SquareMessage'][_0x129b('0x41')]({'where':{'id':_0x13e29a[_0x129b('0x3b')]['id']}})[_0x129b('0x1f')](handleEntityNotFound(_0x31116a,null))['then'](saveUpdates(_0x13e29a[_0x129b('0x3f')],null))['then'](respondWithResult(_0x31116a,null))['catch'](handleError(_0x31116a,null));};exports[_0x129b('0x42')]=function(_0x4eea3c,_0x15bd08){return db['SquareMessage'][_0x129b('0x41')]({'where':{'id':_0x4eea3c[_0x129b('0x3b')]['id']}})[_0x129b('0x1f')](handleEntityNotFound(_0x15bd08,null))[_0x129b('0x1f')](removeEntity(_0x15bd08,null))[_0x129b('0x3a')](handleError(_0x15bd08,null));}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.model.js b/server/api/squareMessage/squareMessage.model.js index 2f8c5c2..4c06576 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 _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 +var _0x2b95=['path','rimraf','./squareMessage.attributes','exports','define','lodash','api'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x2b95,0x171));var _0x52b9=function(_0x500c0,_0xdb6a03){_0x500c0=_0x500c0-0x0;var _0xdd146f=_0x2b95[_0x500c0];return _0xdd146f;};'use strict';var _=require(_0x52b9('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x52b9('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x52b9('0x2'));var rimraf=require(_0x52b9('0x3'));var config=require('../../config/environment');var attributes=require(_0x52b9('0x4'));module[_0x52b9('0x5')]=function(_0x42b987,_0x11dc23){return _0x42b987[_0x52b9('0x6')]('SquareMessage',attributes,{'tableName':'square_messages','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 e496ea2..c10c209 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 _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 +var _0x56a1=['catch','CreateSquareMessage','SquareMessage','create','body','options','raw','then','debug','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','SquareMessage,\x20%s,\x20%s','request\x20sent','SquareMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x71e49a,_0x45eb2c){var _0x3cb055=function(_0x56e139){while(--_0x56e139){_0x71e49a['push'](_0x71e49a['shift']());}};_0x3cb055(++_0x45eb2c);}(_0x56a1,0x7d));var _0x156a=function(_0x4e7d25,_0x58285f){_0x4e7d25=_0x4e7d25-0x0;var _0x526fe6=_0x56a1[_0x4e7d25];return _0x526fe6;};'use strict';var _=require(_0x156a('0x0'));var util=require(_0x156a('0x1'));var moment=require(_0x156a('0x2'));var BPromise=require('bluebird');var rs=require(_0x156a('0x3'));var fs=require('fs');var Redis=require(_0x156a('0x4'));var db=require(_0x156a('0x5'))['db'];var utils=require(_0x156a('0x6'));var logger=require('../../config/logger')(_0x156a('0x7'));var config=require('../../config/environment');var jayson=require(_0x156a('0x8'));var client=jayson[_0x156a('0x9')][_0x156a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5546b5,_0x928c54,_0x186136){return new BPromise(function(_0x3fd952,_0x461b72){return client[_0x156a('0xb')](_0x5546b5,_0x186136)['then'](function(_0x58d439){logger[_0x156a('0xc')](_0x156a('0xd'),_0x928c54,_0x156a('0xe'));logger['debug'](_0x156a('0xf'),_0x928c54,_0x156a('0xe'),JSON[_0x156a('0x10')](_0x58d439));if(_0x58d439[_0x156a('0x11')]){if(_0x58d439['error'][_0x156a('0x12')]===0x1f4){logger[_0x156a('0x11')]('SquareMessage,\x20%s,\x20%s',_0x928c54,_0x58d439['error'][_0x156a('0x13')]);return _0x461b72(_0x58d439['error']['message']);}logger[_0x156a('0x11')](_0x156a('0xd'),_0x928c54,_0x58d439[_0x156a('0x11')][_0x156a('0x13')]);return _0x3fd952(_0x58d439[_0x156a('0x11')][_0x156a('0x13')]);}else{logger[_0x156a('0xc')]('SquareMessage,\x20%s,\x20%s',_0x928c54,_0x156a('0xe'));_0x3fd952(_0x58d439['result'][_0x156a('0x13')]);}})[_0x156a('0x14')](function(_0x7dd5d){logger[_0x156a('0x11')](_0x156a('0xd'),_0x928c54,_0x7dd5d);_0x461b72(_0x7dd5d);});});}exports[_0x156a('0x15')]=function(_0x4c71cf){var _0x1a627b=this;return new Promise(function(_0x59b052,_0x1e4b17){return db[_0x156a('0x16')][_0x156a('0x17')](_0x4c71cf[_0x156a('0x18')],{'raw':_0x4c71cf[_0x156a('0x19')]?_0x4c71cf[_0x156a('0x19')][_0x156a('0x1a')]===undefined?!![]:![]:!![]})[_0x156a('0x1b')](function(_0x37b0f2){logger['info'](_0x156a('0x15'),_0x4c71cf);logger[_0x156a('0x1c')](_0x156a('0x15'),_0x4c71cf,JSON[_0x156a('0x10')](_0x37b0f2));_0x59b052(_0x37b0f2);})[_0x156a('0x14')](function(_0x15defe){logger[_0x156a('0x11')](_0x156a('0x15'),_0x15defe[_0x156a('0x13')],_0x4c71cf);_0x1e4b17(_0x1a627b[_0x156a('0x11')](0x1f4,_0x15defe[_0x156a('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/squareOdbc/index.js b/server/api/squareOdbc/index.js index 99096a0..a36a52e 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 _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 +var _0xad95=['/:id/test','15s','test','post','create','put','update','delete','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show'];(function(_0x53b071,_0x1e4fcf){var _0xf1c6c1=function(_0x19b204){while(--_0x19b204){_0x53b071['push'](_0x53b071['shift']());}};_0xf1c6c1(++_0x1e4fcf);}(_0xad95,0x119));var _0x5ad9=function(_0x261fed,_0x3ecfaa){_0x261fed=_0x261fed-0x0;var _0x260435=_0xad95[_0x261fed];return _0x260435;};'use strict';var multer=require(_0x5ad9('0x0'));var util=require('util');var path=require(_0x5ad9('0x1'));var timeout=require(_0x5ad9('0x2'));var express=require(_0x5ad9('0x3'));var router=express['Router']();var fs_extra=require(_0x5ad9('0x4'));var auth=require(_0x5ad9('0x5'));var interaction=require(_0x5ad9('0x6'));var config=require(_0x5ad9('0x7'));var controller=require('./squareOdbc.controller');router[_0x5ad9('0x8')]('/',auth['isAuthenticated'](),controller[_0x5ad9('0x9')]);router[_0x5ad9('0x8')](_0x5ad9('0xa'),auth[_0x5ad9('0xb')](),controller[_0x5ad9('0xc')]);router[_0x5ad9('0x8')](_0x5ad9('0xd'),auth['isAuthenticated'](),timeout(_0x5ad9('0xe')),controller[_0x5ad9('0xf')]);router[_0x5ad9('0x10')]('/',auth[_0x5ad9('0xb')](),controller[_0x5ad9('0x11')]);router[_0x5ad9('0x12')]('/:id',auth[_0x5ad9('0xb')](),controller[_0x5ad9('0x13')]);router[_0x5ad9('0x14')](_0x5ad9('0xa'),auth[_0x5ad9('0xb')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.attributes.js b/server/api/squareOdbc/squareOdbc.attributes.js index fe62ce6..7b3432e 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 _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 +var _0x846a=['name','sequelize','exports','STRING'];(function(_0x2ae2ad,_0xac5b0c){var _0x26dbd7=function(_0x5e685b){while(--_0x5e685b){_0x2ae2ad['push'](_0x2ae2ad['shift']());}};_0x26dbd7(++_0xac5b0c);}(_0x846a,0x1b1));var _0xa846=function(_0x6840f5,_0x17d32b){_0x6840f5=_0x6840f5-0x0;var _0x7e4794=_0x846a[_0x6840f5];return _0x7e4794;};'use strict';var Sequelize=require(_0xa846('0x0'));module[_0xa846('0x1')]={'name':{'type':Sequelize[_0xa846('0x2')],'unique':_0xa846('0x3'),'allowNull':![]},'dsn':{'type':Sequelize[_0xa846('0x2')]},'description':{'type':Sequelize[_0xa846('0x2')]}}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.controller.js b/server/api/squareOdbc/squareOdbc.controller.js index 94b941b..4b42cee 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 _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 +var _0xed66=['../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','apply','reject','save','then','get','ODBC','destroy','stack','name','map','SquareOdbc','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','findAll','catch','params','keys','includeAll','include','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','UserProfileResource','create','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','test','dsn','odbc','openSync','closeSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x2a4702,_0x14d7a4){var _0x943198=function(_0x54543b){while(--_0x54543b){_0x2a4702['push'](_0x2a4702['shift']());}};_0x943198(++_0x14d7a4);}(_0xed66,0x1a7));var _0x6ed6=function(_0x28b12e,_0x59f4f5){_0x28b12e=_0x28b12e-0x0;var _0x2c3bd1=_0xed66[_0x28b12e];return _0x2c3bd1;};'use strict';var emlformat=require(_0x6ed6('0x0'));var rimraf=require(_0x6ed6('0x1'));var zipdir=require(_0x6ed6('0x2'));var jsonpatch=require(_0x6ed6('0x3'));var rp=require(_0x6ed6('0x4'));var moment=require(_0x6ed6('0x5'));var BPromise=require(_0x6ed6('0x6'));var Mustache=require(_0x6ed6('0x7'));var util=require(_0x6ed6('0x8'));var path=require(_0x6ed6('0x9'));var sox=require(_0x6ed6('0xa'));var csv=require(_0x6ed6('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6ed6('0xc'));var _=require(_0x6ed6('0xd'));var squel=require('squel');var crypto=require(_0x6ed6('0xe'));var jsforce=require(_0x6ed6('0xf'));var deskjs=require(_0x6ed6('0x10'));var toCsv=require('to-csv');var querystring=require(_0x6ed6('0x11'));var Papa=require('papaparse');var Redis=require(_0x6ed6('0x12'));var authService=require(_0x6ed6('0x13'));var qs=require(_0x6ed6('0x14'));var as=require(_0x6ed6('0x15'));var hardwareService=require(_0x6ed6('0x16'));var logger=require(_0x6ed6('0x17'))(_0x6ed6('0x18'));var utils=require(_0x6ed6('0x19'));var config=require(_0x6ed6('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x6ed6('0x1b'))['db'];function respondWithStatusCode(_0x49bde9,_0x5047c2){_0x5047c2=_0x5047c2||0xcc;return function(_0x2f4288){if(_0x2f4288){return _0x49bde9[_0x6ed6('0x1c')](_0x5047c2);}return _0x49bde9[_0x6ed6('0x1d')](_0x5047c2)[_0x6ed6('0x1e')]();};}function respondWithResult(_0x37f1d0,_0x188799){_0x188799=_0x188799||0xc8;return function(_0x401229){if(_0x401229){return _0x37f1d0[_0x6ed6('0x1d')](_0x188799)[_0x6ed6('0x1f')](_0x401229);}};}function respondWithFilteredResult(_0x53b633,_0x5db14b){return function(_0x368bbd){if(_0x368bbd){var _0x41f5b1=typeof _0x5db14b['offset']===_0x6ed6('0x20')&&typeof _0x5db14b[_0x6ed6('0x21')]==='undefined';var _0x297222=_0x368bbd[_0x6ed6('0x22')];var _0x4dd3ad=_0x41f5b1?0x0:_0x5db14b[_0x6ed6('0x23')];var _0x4e067c=_0x41f5b1?_0x368bbd[_0x6ed6('0x22')]:_0x5db14b[_0x6ed6('0x23')]+_0x5db14b[_0x6ed6('0x21')];var _0x3d7be0;if(_0x4e067c>=_0x297222){_0x4e067c=_0x297222;_0x3d7be0=0xc8;}else{_0x3d7be0=0xce;}_0x53b633['status'](_0x3d7be0);return _0x53b633[_0x6ed6('0x24')]('Content-Range',_0x4dd3ad+'-'+_0x4e067c+'/'+_0x297222)[_0x6ed6('0x1f')](_0x368bbd);}return null;};}function patchUpdates(_0x21ff23){return function(_0x1dd303){try{jsonpatch[_0x6ed6('0x25')](_0x1dd303,_0x21ff23,!![]);}catch(_0x48c608){return BPromise[_0x6ed6('0x26')](_0x48c608);}return _0x1dd303[_0x6ed6('0x27')]();};}function saveUpdates(_0xa79d74,_0x4d7d9e){return function(_0x197be4){if(_0x197be4){return _0x197be4['update'](_0xa79d74)['then'](function(_0x6f86ca){return _0x6f86ca;});}return null;};}function removeEntity(_0x2ec359,_0x40c306){return function(_0x39819b){if(_0x39819b){return _0x39819b['destroy']()[_0x6ed6('0x28')](function(){var _0x8fbafe=_0x39819b[_0x6ed6('0x29')]({'plain':!![]});var _0x48ee20=_0x6ed6('0x2a');return db['UserProfileResource'][_0x6ed6('0x2b')]({'where':{'type':_0x48ee20,'resourceId':_0x8fbafe['id']}})['then'](function(){return _0x39819b;});})['then'](function(){_0x2ec359[_0x6ed6('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x295621,_0x3e8e53){return function(_0x54cfac){if(!_0x54cfac){_0x295621[_0x6ed6('0x1c')](0x194);}return _0x54cfac;};}function handleError(_0x33cb5d,_0x4a8091){_0x4a8091=_0x4a8091||0x1f4;return function(_0x3f04d3){logger['error'](_0x3f04d3[_0x6ed6('0x2c')]);if(_0x3f04d3[_0x6ed6('0x2d')]){delete _0x3f04d3[_0x6ed6('0x2d')];}_0x33cb5d['status'](_0x4a8091)['send'](_0x3f04d3);};}exports['index']=function(_0x4e43b8,_0x3a20a0){var _0x34071a={},_0x1d2dd6={},_0x1f4f7d={'count':0x0,'rows':[]};var _0x3c25bb=_[_0x6ed6('0x2e')](db[_0x6ed6('0x2f')][_0x6ed6('0x30')],function(_0x5a7d02){return{'name':_0x5a7d02[_0x6ed6('0x31')],'type':_0x5a7d02[_0x6ed6('0x32')][_0x6ed6('0x33')]};});_0x1d2dd6[_0x6ed6('0x34')]=_[_0x6ed6('0x2e')](_0x3c25bb,'name');_0x1d2dd6[_0x6ed6('0x35')]=_['keys'](_0x4e43b8[_0x6ed6('0x35')]);_0x1d2dd6[_0x6ed6('0x36')]=_[_0x6ed6('0x37')](_0x1d2dd6[_0x6ed6('0x34')],_0x1d2dd6[_0x6ed6('0x35')]);_0x34071a[_0x6ed6('0x38')]=_[_0x6ed6('0x37')](_0x1d2dd6[_0x6ed6('0x34')],qs[_0x6ed6('0x39')](_0x4e43b8[_0x6ed6('0x35')][_0x6ed6('0x39')]));_0x34071a['attributes']=_0x34071a['attributes'][_0x6ed6('0x3a')]?_0x34071a[_0x6ed6('0x38')]:_0x1d2dd6['model'];if(!_0x4e43b8[_0x6ed6('0x35')]['hasOwnProperty'](_0x6ed6('0x3b'))){_0x34071a[_0x6ed6('0x21')]=qs[_0x6ed6('0x21')](_0x4e43b8[_0x6ed6('0x35')][_0x6ed6('0x21')]);_0x34071a[_0x6ed6('0x23')]=qs[_0x6ed6('0x23')](_0x4e43b8['query'][_0x6ed6('0x23')]);}_0x34071a[_0x6ed6('0x3c')]=qs[_0x6ed6('0x3d')](_0x4e43b8[_0x6ed6('0x35')][_0x6ed6('0x3d')]);_0x34071a[_0x6ed6('0x3e')]=qs[_0x6ed6('0x36')](_[_0x6ed6('0x3f')](_0x4e43b8[_0x6ed6('0x35')],_0x1d2dd6['filters']),_0x3c25bb);if(_0x4e43b8[_0x6ed6('0x35')][_0x6ed6('0x40')]){_0x34071a['where']=_['merge'](_0x34071a[_0x6ed6('0x3e')],{'$or':_[_0x6ed6('0x2e')](_0x3c25bb,function(_0x38556c){if(_0x38556c[_0x6ed6('0x32')]!==_0x6ed6('0x41')){var _0x112459={};_0x112459[_0x38556c[_0x6ed6('0x2d')]]={'$like':'%'+_0x4e43b8['query']['filter']+'%'};return _0x112459;}})});}_0x34071a=_[_0x6ed6('0x42')]({},_0x34071a,_0x4e43b8[_0x6ed6('0x43')]);var _0x209deb={'where':_0x34071a[_0x6ed6('0x3e')]};return db[_0x6ed6('0x2f')][_0x6ed6('0x22')](_0x209deb)[_0x6ed6('0x28')](function(_0x5c053f){_0x1f4f7d['count']=_0x5c053f;if(_0x4e43b8[_0x6ed6('0x35')]['includeAll']){_0x34071a['include']=[{'all':!![]}];}return db[_0x6ed6('0x2f')][_0x6ed6('0x44')](_0x34071a);})[_0x6ed6('0x28')](function(_0x398ebc){_0x1f4f7d['rows']=_0x398ebc;return _0x1f4f7d;})[_0x6ed6('0x28')](respondWithFilteredResult(_0x3a20a0,_0x34071a))[_0x6ed6('0x45')](handleError(_0x3a20a0,null));};exports['show']=function(_0x390e87,_0x2d0566){var _0x16b56e={'raw':!![],'where':{'id':_0x390e87[_0x6ed6('0x46')]['id']}},_0x1d3214={};_0x1d3214[_0x6ed6('0x34')]=_[_0x6ed6('0x47')](db[_0x6ed6('0x2f')][_0x6ed6('0x30')]);_0x1d3214[_0x6ed6('0x35')]=_[_0x6ed6('0x47')](_0x390e87[_0x6ed6('0x35')]);_0x1d3214[_0x6ed6('0x36')]=_['intersection'](_0x1d3214[_0x6ed6('0x34')],_0x1d3214['query']);_0x16b56e[_0x6ed6('0x38')]=_[_0x6ed6('0x37')](_0x1d3214[_0x6ed6('0x34')],qs['fields'](_0x390e87[_0x6ed6('0x35')]['fields']));_0x16b56e[_0x6ed6('0x38')]=_0x16b56e['attributes'][_0x6ed6('0x3a')]?_0x16b56e[_0x6ed6('0x38')]:_0x1d3214[_0x6ed6('0x34')];if(_0x390e87[_0x6ed6('0x35')][_0x6ed6('0x48')]){_0x16b56e[_0x6ed6('0x49')]=[{'all':!![]}];}_0x16b56e=_[_0x6ed6('0x42')]({},_0x16b56e,_0x390e87[_0x6ed6('0x43')]);return db[_0x6ed6('0x2f')][_0x6ed6('0x4a')](_0x16b56e)['then'](handleEntityNotFound(_0x2d0566,null))['then'](respondWithResult(_0x2d0566,null))[_0x6ed6('0x45')](handleError(_0x2d0566,null));};exports['create']=function(_0x432f77,_0x2a6cff){return db[_0x6ed6('0x2f')]['create'](_0x432f77[_0x6ed6('0x4b')],{})[_0x6ed6('0x28')](function(_0x1652ce){var _0x50115d=_0x432f77[_0x6ed6('0x4c')][_0x6ed6('0x29')]({'plain':!![]});if(!_0x50115d)throw new Error(_0x6ed6('0x4d'));if(_0x50115d[_0x6ed6('0x4e')]==='user'){var _0x5d1748=_0x1652ce[_0x6ed6('0x29')]({'plain':!![]});var _0x2875a6=_0x6ed6('0x2a');return db['UserProfileSection']['find']({'where':{'name':_0x2875a6,'userProfileId':_0x50115d[_0x6ed6('0x4f')]},'raw':!![]})[_0x6ed6('0x28')](function(_0x23944){if(_0x23944&&_0x23944['autoAssociation']===0x0){return db[_0x6ed6('0x50')][_0x6ed6('0x51')]({'name':_0x5d1748[_0x6ed6('0x2d')],'resourceId':_0x5d1748['id'],'type':_0x23944[_0x6ed6('0x2d')],'sectionId':_0x23944['id']},{})[_0x6ed6('0x28')](function(){return _0x1652ce;});}else{return _0x1652ce;}})[_0x6ed6('0x45')](function(_0x5b4bbd){logger[_0x6ed6('0x52')](_0x6ed6('0x53'),_0x5b4bbd);throw _0x5b4bbd;});}return _0x1652ce;})[_0x6ed6('0x28')](respondWithResult(_0x2a6cff,0xc9))[_0x6ed6('0x45')](handleError(_0x2a6cff,null));};exports['update']=function(_0x10b16e,_0x32154a){if(_0x10b16e['body']['id']){delete _0x10b16e[_0x6ed6('0x4b')]['id'];}return db[_0x6ed6('0x2f')][_0x6ed6('0x4a')]({'where':{'id':_0x10b16e[_0x6ed6('0x46')]['id']}})[_0x6ed6('0x28')](handleEntityNotFound(_0x32154a,null))[_0x6ed6('0x28')](saveUpdates(_0x10b16e['body'],null))[_0x6ed6('0x28')](respondWithResult(_0x32154a,null))['catch'](handleError(_0x32154a,null));};exports[_0x6ed6('0x2b')]=function(_0x26cf31,_0x1ab573){return db['SquareOdbc'][_0x6ed6('0x4a')]({'where':{'id':_0x26cf31[_0x6ed6('0x46')]['id']}})[_0x6ed6('0x28')](handleEntityNotFound(_0x1ab573,null))['then'](removeEntity(_0x1ab573,null))[_0x6ed6('0x45')](handleError(_0x1ab573,null));};exports[_0x6ed6('0x54')]=function(_0x576935,_0xfacf78,_0x42e75c){var _0x1b1499;return db[_0x6ed6('0x2f')][_0x6ed6('0x4a')]({'where':{'id':_0x576935[_0x6ed6('0x46')]['id']},'attributes':['id',_0x6ed6('0x55')]})[_0x6ed6('0x28')](handleEntityNotFound(_0xfacf78,null))[_0x6ed6('0x28')](function(_0x4c92d4){if(_0x4c92d4){var _0x41a221=require(_0x6ed6('0x56'))();_0x41a221[_0x6ed6('0x57')](_0x4c92d4[_0x6ed6('0x55')]);_0x41a221[_0x6ed6('0x58')]();return _0x4c92d4;}})[_0x6ed6('0x28')](respondWithResult(_0xfacf78,null))[_0x6ed6('0x45')](handleError(_0xfacf78,null));}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.model.js b/server/api/squareOdbc/squareOdbc.model.js index 9a16dea..8759ef5 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 _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 +var _0xd011=['api','moment','request-promise','../../config/environment','./squareOdbc.attributes','exports','define','SquareOdbc','square_odbc','lodash','util','../../config/logger'];(function(_0x44df1d,_0x1f11a0){var _0x4fe0d0=function(_0x7a8496){while(--_0x7a8496){_0x44df1d['push'](_0x44df1d['shift']());}};_0x4fe0d0(++_0x1f11a0);}(_0xd011,0x129));var _0x1d01=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd011[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1d01('0x0'));var util=require(_0x1d01('0x1'));var logger=require(_0x1d01('0x2'))(_0x1d01('0x3'));var moment=require(_0x1d01('0x4'));var BPromise=require('bluebird');var rp=require(_0x1d01('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1d01('0x6'));var attributes=require(_0x1d01('0x7'));module[_0x1d01('0x8')]=function(_0x9834a7,_0x306749){return _0x9834a7[_0x1d01('0x9')](_0x1d01('0xa'),attributes,{'tableName':_0x1d01('0xb'),'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 13c269b..f710cb0 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 _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 +var _0x2875=['raw','include','attributes','map','model','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','then','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','SquareOdbc,\x20%s,\x20%s','result','catch','ShowSquareOdbc','SquareOdbc','find','options'];(function(_0x26015a,_0x765949){var _0x56a49e=function(_0x1d4881){while(--_0x1d4881){_0x26015a['push'](_0x26015a['shift']());}};_0x56a49e(++_0x765949);}(_0x2875,0x9b));var _0x5287=function(_0x135e40,_0x57b112){_0x135e40=_0x135e40-0x0;var _0x4fadcd=_0x2875[_0x135e40];return _0x4fadcd;};'use strict';var _=require('lodash');var util=require(_0x5287('0x0'));var moment=require('moment');var BPromise=require(_0x5287('0x1'));var rs=require(_0x5287('0x2'));var fs=require('fs');var Redis=require(_0x5287('0x3'));var db=require(_0x5287('0x4'))['db'];var utils=require(_0x5287('0x5'));var logger=require(_0x5287('0x6'))(_0x5287('0x7'));var config=require(_0x5287('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x371a12,_0x53a9ab,_0x3d82fa){return new BPromise(function(_0x4e400c,_0x47ef84){return client['request'](_0x371a12,_0x3d82fa)[_0x5287('0x9')](function(_0x2bbd74){logger['info']('SquareOdbc,\x20%s,\x20%s',_0x53a9ab,_0x5287('0xa'));logger[_0x5287('0xb')](_0x5287('0xc'),_0x53a9ab,'request\x20sent',JSON[_0x5287('0xd')](_0x2bbd74));if(_0x2bbd74[_0x5287('0xe')]){if(_0x2bbd74[_0x5287('0xe')][_0x5287('0xf')]===0x1f4){logger['error']('SquareOdbc,\x20%s,\x20%s',_0x53a9ab,_0x2bbd74[_0x5287('0xe')][_0x5287('0x10')]);return _0x47ef84(_0x2bbd74[_0x5287('0xe')][_0x5287('0x10')]);}logger[_0x5287('0xe')]('SquareOdbc,\x20%s,\x20%s',_0x53a9ab,_0x2bbd74[_0x5287('0xe')][_0x5287('0x10')]);return _0x4e400c(_0x2bbd74[_0x5287('0xe')][_0x5287('0x10')]);}else{logger[_0x5287('0x11')](_0x5287('0x12'),_0x53a9ab,_0x5287('0xa'));_0x4e400c(_0x2bbd74[_0x5287('0x13')][_0x5287('0x10')]);}})[_0x5287('0x14')](function(_0x3729d2){logger[_0x5287('0xe')](_0x5287('0x12'),_0x53a9ab,_0x3729d2);_0x47ef84(_0x3729d2);});});}exports[_0x5287('0x15')]=function(_0x53d0df){var _0x3764c1=this;return new Promise(function(_0x1fbb42,_0x5b5b15){return db[_0x5287('0x16')][_0x5287('0x17')]({'raw':_0x53d0df[_0x5287('0x18')]?_0x53d0df[_0x5287('0x18')][_0x5287('0x19')]===undefined?!![]:![]:!![],'where':_0x53d0df[_0x5287('0x18')]?_0x53d0df['options']['where']||null:null,'attributes':_0x53d0df[_0x5287('0x18')]?_0x53d0df[_0x5287('0x18')]['attributes']||null:null,'include':_0x53d0df[_0x5287('0x18')]?_0x53d0df[_0x5287('0x18')]['include']?_['map'](_0x53d0df[_0x5287('0x18')][_0x5287('0x1a')],function(_0x3a07dc){return{'model':db[_0x3a07dc['model']],'as':_0x3a07dc['as'],'attributes':_0x3a07dc[_0x5287('0x1b')],'include':_0x3a07dc[_0x5287('0x1a')]?_[_0x5287('0x1c')](_0x3a07dc['include'],function(_0x322a55){return{'model':db[_0x322a55[_0x5287('0x1d')]],'as':_0x322a55['as'],'attributes':_0x322a55[_0x5287('0x1b')],'include':_0x322a55[_0x5287('0x1a')]?_[_0x5287('0x1c')](_0x322a55[_0x5287('0x1a')],function(_0x53e005){return{'model':db[_0x53e005[_0x5287('0x1d')]],'as':_0x53e005['as'],'attributes':_0x53e005[_0x5287('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x5287('0x9')](function(_0xd4f9e4){logger[_0x5287('0x11')](_0x5287('0x15'),_0x53d0df);logger['debug'](_0x5287('0x15'),_0x53d0df,JSON[_0x5287('0xd')](_0xd4f9e4));_0x1fbb42(_0xd4f9e4);})[_0x5287('0x14')](function(_0x1dfb8b){logger[_0x5287('0xe')](_0x5287('0x15'),_0x1dfb8b['message'],_0x53d0df);_0x5b5b15(_0x3764c1[_0x5287('0xe')](0x1f4,_0x1dfb8b[_0x5287('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/index.js b/server/api/squareProject/index.js index 3763ca9..286cc9e 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 _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 +var _0xf1f9=['put','delete','destroy','removeUsers','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareProject.controller','get','/:id','isAuthenticated','show','/:id/users','getUsers','post','create','addUsers'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf1f9,0x1cd));var _0x9f1f=function(_0x55c2ee,_0x26f8ac){_0x55c2ee=_0x55c2ee-0x0;var _0x3a0186=_0xf1f9[_0x55c2ee];return _0x3a0186;};'use strict';var multer=require(_0x9f1f('0x0'));var util=require(_0x9f1f('0x1'));var path=require(_0x9f1f('0x2'));var timeout=require(_0x9f1f('0x3'));var express=require(_0x9f1f('0x4'));var router=express['Router']();var fs_extra=require(_0x9f1f('0x5'));var auth=require(_0x9f1f('0x6'));var interaction=require(_0x9f1f('0x7'));var config=require(_0x9f1f('0x8'));var controller=require(_0x9f1f('0x9'));router[_0x9f1f('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0x9f1f('0xa')](_0x9f1f('0xb'),auth[_0x9f1f('0xc')](),controller[_0x9f1f('0xd')]);router['get'](_0x9f1f('0xe'),auth[_0x9f1f('0xc')](),controller[_0x9f1f('0xf')]);router[_0x9f1f('0x10')]('/',auth[_0x9f1f('0xc')](),controller[_0x9f1f('0x11')]);router[_0x9f1f('0x10')](_0x9f1f('0xe'),auth['isAuthenticated'](),controller[_0x9f1f('0x12')]);router[_0x9f1f('0x13')](_0x9f1f('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x9f1f('0x14')]('/:id',auth[_0x9f1f('0xc')](),controller[_0x9f1f('0x15')]);router[_0x9f1f('0x14')](_0x9f1f('0xe'),auth[_0x9f1f('0xc')](),controller[_0x9f1f('0x16')]);module[_0x9f1f('0x17')]=router; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.attributes.js b/server/api/squareProject/squareProject.attributes.js index cf8f766..e4177c5 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 _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 +var _0x8553=['utf8','BLOB','production','DATE','sequelize','exports','STRING','name','long','getDataValue','preproduction','toString'];(function(_0x25f6f7,_0x1e7dd7){var _0x36ee72=function(_0x3a160d){while(--_0x3a160d){_0x25f6f7['push'](_0x25f6f7['shift']());}};_0x36ee72(++_0x1e7dd7);}(_0x8553,0x1d8));var _0x3855=function(_0x5ac80e,_0x48003e){_0x5ac80e=_0x5ac80e-0x0;var _0x463372=_0x8553[_0x5ac80e];return _0x463372;};'use strict';var Sequelize=require(_0x3855('0x0'));module[_0x3855('0x1')]={'name':{'type':Sequelize[_0x3855('0x2')],'unique':_0x3855('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x3855('0x2')]},'notes':{'type':Sequelize['TEXT']},'preproduction':{'type':Sequelize['BLOB'](_0x3855('0x4')),'get':function(){if(this[_0x3855('0x5')](_0x3855('0x6'))){return this['getDataValue']('preproduction')[_0x3855('0x7')](_0x3855('0x8'));}}},'production':{'type':Sequelize[_0x3855('0x9')](_0x3855('0x4')),'get':function(){if(this['getDataValue'](_0x3855('0xa'))){return this[_0x3855('0x5')](_0x3855('0xa'))[_0x3855('0x7')](_0x3855('0x8'));}}},'savedAt':{'type':Sequelize[_0x3855('0xb')]},'publishedAt':{'type':Sequelize[_0x3855('0xb')]}}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.controller.js b/server/api/squareProject/squareProject.controller.js index b5aa49b..ca4ee30 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 _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 +var _0xbf94=['redis','socket.io-emitter','./squareProject.socket','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','get','UserProfileResource','error','name','send','map','rawAttributes','type','key','model','query','filters','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','options','includeAll','include','SquareProject','findAll','rows','catch','show','params','keys','intersection','find','create','user','role','SquareProjects','UserProfileSection','userProfileId','autoAssociation','body','addUsers','ids','omit','removeUsers','isArray','emit','userSquareProject:remove','getUsers','findOne','User','hasOwnProperty','eml-format','fast-json-patch','moment','mustache','sox','crypto','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','defaults'];(function(_0x2453f4,_0x5400c6){var _0x3f0b9e=function(_0x43fa9d){while(--_0x43fa9d){_0x2453f4['push'](_0x2453f4['shift']());}};_0x3f0b9e(++_0x5400c6);}(_0xbf94,0xa3));var _0x4bf9=function(_0x4eae8b,_0x10cbc9){_0x4eae8b=_0x4eae8b-0x0;var _0x1d62ad=_0xbf94[_0x4eae8b];return _0x1d62ad;};'use strict';var emlformat=require(_0x4bf9('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x4bf9('0x1'));var rp=require('request-promise');var moment=require(_0x4bf9('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x4bf9('0x3'));var util=require('util');var path=require('path');var sox=require(_0x4bf9('0x4'));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(_0x4bf9('0x5'));var jsforce=require(_0x4bf9('0x6'));var deskjs=require('desk.js');var toCsv=require(_0x4bf9('0x7'));var querystring=require(_0x4bf9('0x8'));var Papa=require(_0x4bf9('0x9'));var Redis=require(_0x4bf9('0xa'));var authService=require(_0x4bf9('0xb'));var qs=require(_0x4bf9('0xc'));var as=require(_0x4bf9('0xd'));var hardwareService=require(_0x4bf9('0xe'));var logger=require(_0x4bf9('0xf'))(_0x4bf9('0x10'));var utils=require(_0x4bf9('0x11'));var config=require(_0x4bf9('0x12'));var licenseUtil=require(_0x4bf9('0x13'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x4bf9('0x14')](config[_0x4bf9('0x15')],{'host':'localhost','port':0x18eb});var socket=require(_0x4bf9('0x16'))(new Redis(config[_0x4bf9('0x15')]));require(_0x4bf9('0x17'))['register'](socket);function respondWithStatusCode(_0x163fcf,_0x445fa0){_0x445fa0=_0x445fa0||0xcc;return function(_0x322960){if(_0x322960){return _0x163fcf[_0x4bf9('0x18')](_0x445fa0);}return _0x163fcf['status'](_0x445fa0)[_0x4bf9('0x19')]();};}function respondWithResult(_0x43bcf6,_0x54d082){_0x54d082=_0x54d082||0xc8;return function(_0x34ce1e){if(_0x34ce1e){return _0x43bcf6[_0x4bf9('0x1a')](_0x54d082)[_0x4bf9('0x1b')](_0x34ce1e);}};}function respondWithFilteredResult(_0x24eedc,_0x1cc9ad){return function(_0x565a54){if(_0x565a54){var _0x5db814=typeof _0x1cc9ad[_0x4bf9('0x1c')]===_0x4bf9('0x1d')&&typeof _0x1cc9ad[_0x4bf9('0x1e')]===_0x4bf9('0x1d');var _0x144731=_0x565a54[_0x4bf9('0x1f')];var _0x669e96=_0x5db814?0x0:_0x1cc9ad[_0x4bf9('0x1c')];var _0x316ad0=_0x5db814?_0x565a54[_0x4bf9('0x1f')]:_0x1cc9ad[_0x4bf9('0x1c')]+_0x1cc9ad['limit'];var _0x1d9af7;if(_0x316ad0>=_0x144731){_0x316ad0=_0x144731;_0x1d9af7=0xc8;}else{_0x1d9af7=0xce;}_0x24eedc[_0x4bf9('0x1a')](_0x1d9af7);return _0x24eedc[_0x4bf9('0x20')](_0x4bf9('0x21'),_0x669e96+'-'+_0x316ad0+'/'+_0x144731)[_0x4bf9('0x1b')](_0x565a54);}return null;};}function patchUpdates(_0x3ef79){return function(_0x47428f){try{jsonpatch['apply'](_0x47428f,_0x3ef79,!![]);}catch(_0x48e6f0){return BPromise[_0x4bf9('0x22')](_0x48e6f0);}return _0x47428f[_0x4bf9('0x23')]();};}function saveUpdates(_0x5cb937,_0x48eed0){return function(_0x22d798){if(_0x22d798){return _0x22d798[_0x4bf9('0x24')](_0x5cb937)[_0x4bf9('0x25')](function(_0x2db35f){return _0x2db35f;});}return null;};}function removeEntity(_0x24817b,_0x5dc69d){return function(_0x55d482){if(_0x55d482){return _0x55d482[_0x4bf9('0x26')]()[_0x4bf9('0x25')](function(){var _0x4a1fcd=_0x55d482[_0x4bf9('0x27')]({'plain':!![]});var _0x16025c='SquareProjects';return db[_0x4bf9('0x28')][_0x4bf9('0x26')]({'where':{'type':_0x16025c,'resourceId':_0x4a1fcd['id']}})[_0x4bf9('0x25')](function(){return _0x55d482;});})[_0x4bf9('0x25')](function(){_0x24817b['status'](0xcc)[_0x4bf9('0x19')]();});}};}function handleEntityNotFound(_0xed356c,_0x34a74a){return function(_0x3e2af3){if(!_0x3e2af3){_0xed356c[_0x4bf9('0x18')](0x194);}return _0x3e2af3;};}function handleError(_0x14dc8c,_0x195cda){_0x195cda=_0x195cda||0x1f4;return function(_0x404df3){logger[_0x4bf9('0x29')](_0x404df3['stack']);if(_0x404df3[_0x4bf9('0x2a')]){delete _0x404df3[_0x4bf9('0x2a')];}_0x14dc8c[_0x4bf9('0x1a')](_0x195cda)[_0x4bf9('0x2b')](_0x404df3);};}exports['index']=function(_0x137e70,_0x2bc9e9){var _0x118652={},_0x4190f4={},_0x3d0248={'count':0x0,'rows':[]};var _0x26ecec=_[_0x4bf9('0x2c')](db['SquareProject'][_0x4bf9('0x2d')],function(_0x12f1b6){return{'name':_0x12f1b6['fieldName'],'type':_0x12f1b6[_0x4bf9('0x2e')][_0x4bf9('0x2f')]};});_0x4190f4[_0x4bf9('0x30')]=_[_0x4bf9('0x2c')](_0x26ecec,_0x4bf9('0x2a'));_0x4190f4[_0x4bf9('0x31')]=_['keys'](_0x137e70[_0x4bf9('0x31')]);_0x4190f4[_0x4bf9('0x32')]=_['intersection'](_0x4190f4[_0x4bf9('0x30')],_0x4190f4[_0x4bf9('0x31')]);_0x118652[_0x4bf9('0x33')]=_['intersection'](_0x4190f4[_0x4bf9('0x30')],qs[_0x4bf9('0x34')](_0x137e70[_0x4bf9('0x31')]['fields']));_0x118652[_0x4bf9('0x33')]=_0x118652[_0x4bf9('0x33')][_0x4bf9('0x35')]?_0x118652[_0x4bf9('0x33')]:_0x4190f4[_0x4bf9('0x30')];if(!_0x137e70['query']['hasOwnProperty'](_0x4bf9('0x36'))){_0x118652[_0x4bf9('0x1e')]=qs['limit'](_0x137e70[_0x4bf9('0x31')]['limit']);_0x118652[_0x4bf9('0x1c')]=qs['offset'](_0x137e70['query']['offset']);}_0x118652[_0x4bf9('0x37')]=qs[_0x4bf9('0x38')](_0x137e70[_0x4bf9('0x31')]['sort']);_0x118652['where']=qs[_0x4bf9('0x32')](_[_0x4bf9('0x39')](_0x137e70[_0x4bf9('0x31')],_0x4190f4[_0x4bf9('0x32')]),_0x26ecec);if(_0x137e70[_0x4bf9('0x31')][_0x4bf9('0x3a')]){_0x118652[_0x4bf9('0x3b')]=_[_0x4bf9('0x3c')](_0x118652[_0x4bf9('0x3b')],{'$or':_['map'](_0x26ecec,function(_0x4e9963){if(_0x4e9963[_0x4bf9('0x2e')]!=='VIRTUAL'){var _0x4de301={};_0x4de301[_0x4e9963['name']]={'$like':'%'+_0x137e70[_0x4bf9('0x31')][_0x4bf9('0x3a')]+'%'};return _0x4de301;}})});}_0x118652=_['merge']({},_0x118652,_0x137e70[_0x4bf9('0x3d')]);var _0x13a6fe={'where':_0x118652[_0x4bf9('0x3b')]};return db['SquareProject'][_0x4bf9('0x1f')](_0x13a6fe)[_0x4bf9('0x25')](function(_0x1dd153){_0x3d0248[_0x4bf9('0x1f')]=_0x1dd153;if(_0x137e70[_0x4bf9('0x31')][_0x4bf9('0x3e')]){_0x118652[_0x4bf9('0x3f')]=[{'all':!![]}];}return db[_0x4bf9('0x40')][_0x4bf9('0x41')](_0x118652);})[_0x4bf9('0x25')](function(_0x32a8f4){_0x3d0248[_0x4bf9('0x42')]=_0x32a8f4;return _0x3d0248;})['then'](respondWithFilteredResult(_0x2bc9e9,_0x118652))[_0x4bf9('0x43')](handleError(_0x2bc9e9,null));};exports[_0x4bf9('0x44')]=function(_0x4c0933,_0x1bd510){var _0x1754d5={'raw':![],'where':{'id':_0x4c0933[_0x4bf9('0x45')]['id']}},_0x2460c9={};_0x2460c9[_0x4bf9('0x30')]=_[_0x4bf9('0x46')](db['SquareProject']['rawAttributes']);_0x2460c9[_0x4bf9('0x31')]=_[_0x4bf9('0x46')](_0x4c0933[_0x4bf9('0x31')]);_0x2460c9[_0x4bf9('0x32')]=_[_0x4bf9('0x47')](_0x2460c9[_0x4bf9('0x30')],_0x2460c9['query']);_0x1754d5[_0x4bf9('0x33')]=_[_0x4bf9('0x47')](_0x2460c9['model'],qs[_0x4bf9('0x34')](_0x4c0933[_0x4bf9('0x31')][_0x4bf9('0x34')]));_0x1754d5[_0x4bf9('0x33')]=_0x1754d5[_0x4bf9('0x33')][_0x4bf9('0x35')]?_0x1754d5[_0x4bf9('0x33')]:_0x2460c9[_0x4bf9('0x30')];if(_0x4c0933[_0x4bf9('0x31')][_0x4bf9('0x3e')]){_0x1754d5[_0x4bf9('0x3f')]=[{'all':!![]}];}_0x1754d5=_[_0x4bf9('0x3c')]({},_0x1754d5,_0x4c0933[_0x4bf9('0x3d')]);return db[_0x4bf9('0x40')][_0x4bf9('0x48')](_0x1754d5)['then'](handleEntityNotFound(_0x1bd510,null))[_0x4bf9('0x25')](respondWithResult(_0x1bd510,null))[_0x4bf9('0x43')](handleError(_0x1bd510,null));};exports[_0x4bf9('0x49')]=function(_0x27d39d,_0x4c6177){return db[_0x4bf9('0x40')][_0x4bf9('0x49')](_0x27d39d['body'],{})['then'](function(_0x4bd6df){var _0x477a1d=_0x27d39d[_0x4bf9('0x4a')][_0x4bf9('0x27')]({'plain':!![]});if(!_0x477a1d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x477a1d[_0x4bf9('0x4b')]===_0x4bf9('0x4a')){var _0x487fe2=_0x4bd6df[_0x4bf9('0x27')]({'plain':!![]});var _0x5dab6e=_0x4bf9('0x4c');return db[_0x4bf9('0x4d')]['find']({'where':{'name':_0x5dab6e,'userProfileId':_0x477a1d[_0x4bf9('0x4e')]},'raw':!![]})[_0x4bf9('0x25')](function(_0x2818f1){if(_0x2818f1&&_0x2818f1[_0x4bf9('0x4f')]===0x0){return db[_0x4bf9('0x28')][_0x4bf9('0x49')]({'name':_0x487fe2[_0x4bf9('0x2a')],'resourceId':_0x487fe2['id'],'type':_0x2818f1[_0x4bf9('0x2a')],'sectionId':_0x2818f1['id']},{})[_0x4bf9('0x25')](function(){return _0x4bd6df;});}else{return _0x4bd6df;}})['catch'](function(_0x5abf0a){logger[_0x4bf9('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5abf0a);throw _0x5abf0a;});}return _0x4bd6df;})[_0x4bf9('0x25')](respondWithResult(_0x4c6177,0xc9))[_0x4bf9('0x43')](handleError(_0x4c6177,null));};exports[_0x4bf9('0x24')]=function(_0x4288b4,_0xaf1f86){if(_0x4288b4[_0x4bf9('0x50')]['id']){delete _0x4288b4[_0x4bf9('0x50')]['id'];}return db[_0x4bf9('0x40')][_0x4bf9('0x48')]({'where':{'id':_0x4288b4[_0x4bf9('0x45')]['id']}})['then'](handleEntityNotFound(_0xaf1f86,null))[_0x4bf9('0x25')](saveUpdates(_0x4288b4[_0x4bf9('0x50')],null))[_0x4bf9('0x25')](respondWithResult(_0xaf1f86,null))[_0x4bf9('0x43')](handleError(_0xaf1f86,null));};exports[_0x4bf9('0x26')]=function(_0x3b6e34,_0x2d04d7){return db['SquareProject'][_0x4bf9('0x48')]({'where':{'id':_0x3b6e34[_0x4bf9('0x45')]['id']}})[_0x4bf9('0x25')](handleEntityNotFound(_0x2d04d7,null))[_0x4bf9('0x25')](removeEntity(_0x2d04d7,null))[_0x4bf9('0x43')](handleError(_0x2d04d7,null));};exports[_0x4bf9('0x51')]=function(_0x597c6b,_0x93de4,_0x3621e1){return db[_0x4bf9('0x40')][_0x4bf9('0x48')]({'where':{'id':_0x597c6b[_0x4bf9('0x45')]['id']}})[_0x4bf9('0x25')](handleEntityNotFound(_0x93de4,null))[_0x4bf9('0x25')](function(_0xf51db8){if(_0xf51db8){return _0xf51db8[_0x4bf9('0x51')](_0x597c6b[_0x4bf9('0x50')][_0x4bf9('0x52')],_[_0x4bf9('0x53')](_0x597c6b[_0x4bf9('0x50')],[_0x4bf9('0x52'),'id'])||{});}})[_0x4bf9('0x25')](respondWithResult(_0x93de4,null))[_0x4bf9('0x43')](handleError(_0x93de4,null));};exports[_0x4bf9('0x54')]=function(_0x3beb14,_0x20079c,_0x257763){return db[_0x4bf9('0x40')]['find']({'where':{'id':_0x3beb14[_0x4bf9('0x45')]['id']}})['then'](handleEntityNotFound(_0x20079c,null))['then'](function(_0x552cd4){if(_0x552cd4){return _0x552cd4[_0x4bf9('0x54')](_0x3beb14['query'][_0x4bf9('0x52')])[_0x4bf9('0x25')](function(){if(_[_0x4bf9('0x55')](_0x3beb14['query'][_0x4bf9('0x52')])){for(var _0x2f11a4=0x0;_0x2f11a4<_0x3beb14[_0x4bf9('0x31')][_0x4bf9('0x52')][_0x4bf9('0x35')];_0x2f11a4+=0x1){socket[_0x4bf9('0x56')](_0x4bf9('0x57'),{'UserId':Number(_0x3beb14[_0x4bf9('0x31')][_0x4bf9('0x52')][_0x2f11a4]),'SquareProjectId':Number(_0x3beb14[_0x4bf9('0x45')]['id'])});}}else{socket['emit'](_0x4bf9('0x57'),{'UserId':Number(_0x3beb14['query'][_0x4bf9('0x52')]),'SquareProjectId':Number(_0x3beb14[_0x4bf9('0x45')]['id'])});}});}})['then'](respondWithStatusCode(_0x20079c,null))[_0x4bf9('0x43')](handleError(_0x20079c,null));};exports[_0x4bf9('0x58')]=function(_0x15aa24,_0x4d5893,_0x5726f1){var _0xf9b43a={};var _0x6b5c36={};var _0x2453da;var _0x36aa98;return db[_0x4bf9('0x40')][_0x4bf9('0x59')]({'where':{'id':_0x15aa24['params']['id']}})['then'](handleEntityNotFound(_0x4d5893,null))[_0x4bf9('0x25')](function(_0x3ceea6){if(_0x3ceea6){_0x2453da=_0x3ceea6;_0x6b5c36['model']=_[_0x4bf9('0x46')](db[_0x4bf9('0x5a')]['rawAttributes']);_0x6b5c36['query']=_[_0x4bf9('0x46')](_0x15aa24[_0x4bf9('0x31')]);_0x6b5c36[_0x4bf9('0x32')]=_[_0x4bf9('0x47')](_0x6b5c36[_0x4bf9('0x30')],_0x6b5c36[_0x4bf9('0x31')]);_0xf9b43a[_0x4bf9('0x33')]=_[_0x4bf9('0x47')](_0x6b5c36[_0x4bf9('0x30')],qs[_0x4bf9('0x34')](_0x15aa24[_0x4bf9('0x31')][_0x4bf9('0x34')]));_0xf9b43a[_0x4bf9('0x33')]=_0xf9b43a[_0x4bf9('0x33')][_0x4bf9('0x35')]?_0xf9b43a['attributes']:_0x6b5c36['model'];_0xf9b43a[_0x4bf9('0x37')]=qs[_0x4bf9('0x38')](_0x15aa24[_0x4bf9('0x31')]['sort']);_0xf9b43a[_0x4bf9('0x3b')]=qs[_0x4bf9('0x32')](_['pick'](_0x15aa24['query'],_0x6b5c36[_0x4bf9('0x32')]));if(_0x15aa24[_0x4bf9('0x31')][_0x4bf9('0x3a')]){_0xf9b43a[_0x4bf9('0x3b')]=_[_0x4bf9('0x3c')](_0xf9b43a[_0x4bf9('0x3b')],{'$or':_[_0x4bf9('0x2c')](_0xf9b43a[_0x4bf9('0x33')],function(_0x435938){var _0x2a5b92={};_0x2a5b92[_0x435938]={'$like':'%'+_0x15aa24[_0x4bf9('0x31')]['filter']+'%'};return _0x2a5b92;})});}_0xf9b43a=_['merge']({},_0xf9b43a,_0x15aa24[_0x4bf9('0x3d')]);return _0x2453da[_0x4bf9('0x58')](_0xf9b43a);}})[_0x4bf9('0x25')](function(_0x22f3c7){if(_0x22f3c7){_0x36aa98=_0x22f3c7[_0x4bf9('0x35')];if(!_0x15aa24[_0x4bf9('0x31')][_0x4bf9('0x5b')](_0x4bf9('0x36'))){_0xf9b43a[_0x4bf9('0x1e')]=qs['limit'](_0x15aa24[_0x4bf9('0x31')][_0x4bf9('0x1e')]);_0xf9b43a[_0x4bf9('0x1c')]=qs[_0x4bf9('0x1c')](_0x15aa24[_0x4bf9('0x31')][_0x4bf9('0x1c')]);}return _0x2453da['getUsers'](_0xf9b43a);}})[_0x4bf9('0x25')](function(_0x34df11){if(_0x34df11){return _0x34df11?{'count':_0x36aa98,'rows':_0x34df11}:null;}})[_0x4bf9('0x25')](respondWithResult(_0x4d5893,null))[_0x4bf9('0x43')](handleError(_0x4d5893,null));}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.events.js b/server/api/squareProject/squareProject.events.js index d5afb9c..3da65dc 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 _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 +var _0x78ac=['../../mysqldb','setMaxListeners','save','update','emit','hook','exports','events'];(function(_0x249ca5,_0x45c491){var _0x627edd=function(_0x35af7e){while(--_0x35af7e){_0x249ca5['push'](_0x249ca5['shift']());}};_0x627edd(++_0x45c491);}(_0x78ac,0x167));var _0xc78a=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0x78ac[_0x465a0c];return _0x1e202e;};'use strict';var EventEmitter=require(_0xc78a('0x0'));var SquareProject=require(_0xc78a('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xc78a('0x2')](0x0);var events={'afterCreate':_0xc78a('0x3'),'afterUpdate':_0xc78a('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4c3486){return function(_0x2055f4,_0x2b540c,_0x234be4){SquareProjectEvents['emit'](_0x4c3486+':'+_0x2055f4['id'],_0x2055f4);SquareProjectEvents[_0xc78a('0x5')](_0x4c3486,_0x2055f4);_0x234be4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0xc78a('0x6')](e,emitEvent(event));}}module[_0xc78a('0x7')]=SquareProjectEvents; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.model.js b/server/api/squareProject/squareProject.model.js index 823b5c7..e673e36 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 _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 +var _0xfae2=['request-promise','rimraf','../../config/environment','./squareProject.attributes','exports','SquareProject','square_projects','changed','preproduction','savedAt','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','format','lodash','util','../../config/logger','api'];(function(_0x2633dc,_0xe58752){var _0x3c0623=function(_0x14763b){while(--_0x14763b){_0x2633dc['push'](_0x2633dc['shift']());}};_0x3c0623(++_0xe58752);}(_0xfae2,0x152));var _0x2fae=function(_0x9ff1c0,_0x207afc){_0x9ff1c0=_0x9ff1c0-0x0;var _0x3e6c23=_0xfae2[_0x9ff1c0];return _0x3e6c23;};'use strict';var _=require(_0x2fae('0x0'));var util=require(_0x2fae('0x1'));var logger=require(_0x2fae('0x2'))(_0x2fae('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2fae('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2fae('0x5'));var config=require(_0x2fae('0x6'));var attributes=require(_0x2fae('0x7'));module[_0x2fae('0x8')]=function(_0x115bf4,_0x5f52b2){return _0x115bf4['define'](_0x2fae('0x9'),attributes,{'tableName':_0x2fae('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3d9ba5,_0x1de2c5,_0x2f3af5){if(_0x3d9ba5[_0x2fae('0xb')](_0x2fae('0xc'))){_0x3d9ba5[_0x2fae('0xd')]=moment()['format'](_0x2fae('0xe'));}if(_0x3d9ba5[_0x2fae('0xb')](_0x2fae('0xf'))){_0x3d9ba5[_0x2fae('0x10')]=moment()[_0x2fae('0x11')](_0x2fae('0xe'));}_0x2f3af5(null,_0x3d9ba5);}}});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.rpc.js b/server/api/squareProject/squareProject.rpc.js index 46c971d..c4d079f 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 _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 +var _0xd499=['info','request\x20sent','debug','SquareProject,\x20%s,\x20%s,\x20%s','error','code','SquareProject,\x20%s,\x20%s','message','result','catch','ShowSquareProject','SquareProject','find','options','raw','where','attributes','include','map','model','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost','socket.io-emitter','redis','./squareProject.socket','register','request','then'];(function(_0x4ca88f,_0xbd5b23){var _0x4bd853=function(_0xac771f){while(--_0xac771f){_0x4ca88f['push'](_0x4ca88f['shift']());}};_0x4bd853(++_0xbd5b23);}(_0xd499,0x13b));var _0x9d49=function(_0x2d61ac,_0x18ff36){_0x2d61ac=_0x2d61ac-0x0;var _0x3f7d3c=_0xd499[_0x2d61ac];return _0x3f7d3c;};'use strict';var _=require(_0x9d49('0x0'));var util=require(_0x9d49('0x1'));var moment=require(_0x9d49('0x2'));var BPromise=require(_0x9d49('0x3'));var rs=require(_0x9d49('0x4'));var fs=require('fs');var Redis=require(_0x9d49('0x5'));var db=require(_0x9d49('0x6'))['db'];var utils=require(_0x9d49('0x7'));var logger=require('../../config/logger')(_0x9d49('0x8'));var config=require(_0x9d49('0x9'));var jayson=require(_0x9d49('0xa'));var client=jayson[_0x9d49('0xb')][_0x9d49('0xc')]({'port':0x232a});config['redis']=_[_0x9d49('0xd')](config['redis'],{'host':_0x9d49('0xe'),'port':0x18eb});var socket=require(_0x9d49('0xf'))(new Redis(config[_0x9d49('0x10')]));require(_0x9d49('0x11'))[_0x9d49('0x12')](socket);function respondWithRpcPromise(_0x13a87e,_0x574073,_0x3c9dc7){return new BPromise(function(_0x3fafc7,_0x2b3fc1){return client[_0x9d49('0x13')](_0x13a87e,_0x3c9dc7)[_0x9d49('0x14')](function(_0x56bf81){logger[_0x9d49('0x15')]('SquareProject,\x20%s,\x20%s',_0x574073,_0x9d49('0x16'));logger[_0x9d49('0x17')](_0x9d49('0x18'),_0x574073,_0x9d49('0x16'),JSON['stringify'](_0x56bf81));if(_0x56bf81['error']){if(_0x56bf81[_0x9d49('0x19')][_0x9d49('0x1a')]===0x1f4){logger[_0x9d49('0x19')](_0x9d49('0x1b'),_0x574073,_0x56bf81[_0x9d49('0x19')][_0x9d49('0x1c')]);return _0x2b3fc1(_0x56bf81[_0x9d49('0x19')][_0x9d49('0x1c')]);}logger['error']('SquareProject,\x20%s,\x20%s',_0x574073,_0x56bf81[_0x9d49('0x19')][_0x9d49('0x1c')]);return _0x3fafc7(_0x56bf81[_0x9d49('0x19')][_0x9d49('0x1c')]);}else{logger[_0x9d49('0x15')](_0x9d49('0x1b'),_0x574073,_0x9d49('0x16'));_0x3fafc7(_0x56bf81[_0x9d49('0x1d')]['message']);}})[_0x9d49('0x1e')](function(_0x27854d){logger[_0x9d49('0x19')](_0x9d49('0x1b'),_0x574073,_0x27854d);_0x2b3fc1(_0x27854d);});});}exports[_0x9d49('0x1f')]=function(_0x17a489){var _0x1aadf1=this;return new Promise(function(_0x374ca6,_0x4f5929){return db[_0x9d49('0x20')][_0x9d49('0x21')]({'raw':_0x17a489['options']?_0x17a489[_0x9d49('0x22')][_0x9d49('0x23')]===undefined?!![]:![]:!![],'where':_0x17a489[_0x9d49('0x22')]?_0x17a489[_0x9d49('0x22')][_0x9d49('0x24')]||null:null,'attributes':_0x17a489[_0x9d49('0x22')]?_0x17a489[_0x9d49('0x22')][_0x9d49('0x25')]||null:null,'include':_0x17a489[_0x9d49('0x22')]?_0x17a489[_0x9d49('0x22')][_0x9d49('0x26')]?_[_0x9d49('0x27')](_0x17a489[_0x9d49('0x22')][_0x9d49('0x26')],function(_0x465e21){return{'model':db[_0x465e21[_0x9d49('0x28')]],'as':_0x465e21['as'],'attributes':_0x465e21['attributes'],'include':_0x465e21[_0x9d49('0x26')]?_['map'](_0x465e21[_0x9d49('0x26')],function(_0x4f75e9){return{'model':db[_0x4f75e9[_0x9d49('0x28')]],'as':_0x4f75e9['as'],'attributes':_0x4f75e9[_0x9d49('0x25')],'include':_0x4f75e9[_0x9d49('0x26')]?_[_0x9d49('0x27')](_0x4f75e9[_0x9d49('0x26')],function(_0x1ca3be){return{'model':db[_0x1ca3be[_0x9d49('0x28')]],'as':_0x1ca3be['as'],'attributes':_0x1ca3be[_0x9d49('0x25')]};}):[]};}):[]};}):[]:[]})[_0x9d49('0x14')](function(_0xd8aa00){logger[_0x9d49('0x15')](_0x9d49('0x1f'),_0x17a489);logger[_0x9d49('0x17')](_0x9d49('0x1f'),_0x17a489,JSON[_0x9d49('0x29')](_0xd8aa00));_0x374ca6(_0xd8aa00);})[_0x9d49('0x1e')](function(_0x2f3cc5){logger[_0x9d49('0x19')](_0x9d49('0x1f'),_0x2f3cc5[_0x9d49('0x1c')],_0x17a489);_0x4f5929(_0x1aadf1[_0x9d49('0x19')](0x1f4,_0x2f3cc5[_0x9d49('0x1c')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.socket.js b/server/api/squareProject/squareProject.socket.js index 6a1a71e..ccf9133 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 _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 +var _0xb349=['./squareProject.events','save','remove','update','emit','removeListener','register','length'];(function(_0xde89b7,_0x2c65ce){var _0x525b0e=function(_0x916f8b){while(--_0x916f8b){_0xde89b7['push'](_0xde89b7['shift']());}};_0x525b0e(++_0x2c65ce);}(_0xb349,0x170));var _0x9b34=function(_0x1a8902,_0x507d35){_0x1a8902=_0x1a8902-0x0;var _0xbe37d9=_0xb349[_0x1a8902];return _0xbe37d9;};'use strict';var SquareProjectEvents=require(_0x9b34('0x0'));var events=[_0x9b34('0x1'),_0x9b34('0x2'),_0x9b34('0x3')];function createListener(_0x1e3caa,_0x43625a){return function(_0x3771d6){_0x43625a[_0x9b34('0x4')](_0x1e3caa,_0x3771d6);};}function removeListener(_0x54778b,_0x50e5d1){return function(){SquareProjectEvents[_0x9b34('0x5')](_0x54778b,_0x50e5d1);};}exports[_0x9b34('0x6')]=function(_0x372330){for(var _0x4bde3d=0x0,_0x256de3=events[_0x9b34('0x7')];_0x4bde3d<_0x256de3;_0x4bde3d++){var _0x4b5650=events[_0x4bde3d];var _0x33d1c3=createListener('squareProject:'+_0x4b5650,_0x372330);SquareProjectEvents['on'](_0x4b5650,_0x33d1c3);}}; \ No newline at end of file diff --git a/server/api/squareRecording/index.js b/server/api/squareRecording/index.js index ccdd1b6..2d9cb01 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 _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 +var _0x7fbe=['/:id','show','/:id/download','create','put','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','index'];(function(_0x20fbaa,_0x55996d){var _0x31e62e=function(_0x265ef5){while(--_0x265ef5){_0x20fbaa['push'](_0x20fbaa['shift']());}};_0x31e62e(++_0x55996d);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x367a3d,_0x452717){_0x367a3d=_0x367a3d-0x0;var _0x460539=_0x7fbe[_0x367a3d];return _0x460539;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe7fb('0x0'));var timeout=require(_0xe7fb('0x1'));var express=require(_0xe7fb('0x2'));var router=express[_0xe7fb('0x3')]();var fs_extra=require(_0xe7fb('0x4'));var auth=require(_0xe7fb('0x5'));var interaction=require(_0xe7fb('0x6'));var config=require(_0xe7fb('0x7'));var controller=require(_0xe7fb('0x8'));router[_0xe7fb('0x9')]('/',auth[_0xe7fb('0xa')](),controller[_0xe7fb('0xb')]);router[_0xe7fb('0x9')](_0xe7fb('0xc'),auth['isAuthenticated'](),controller[_0xe7fb('0xd')]);router[_0xe7fb('0x9')](_0xe7fb('0xe'),auth[_0xe7fb('0xa')](),controller['download']);router['post']('/',auth[_0xe7fb('0xa')](),controller[_0xe7fb('0xf')]);router[_0xe7fb('0x10')](_0xe7fb('0xc'),auth[_0xe7fb('0xa')](),controller[_0xe7fb('0x11')]);router[_0xe7fb('0x12')](_0xe7fb('0xc'),auth[_0xe7fb('0xa')](),controller[_0xe7fb('0x13')]);module[_0xe7fb('0x14')]=router; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.attributes.js b/server/api/squareRecording/squareRecording.attributes.js index f499787..24213d2 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 _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 +var _0xb4c7=['sequelize','exports','STRING','VIRTUAL','getDataValue','substring','lastIndexOf'];(function(_0x1507b4,_0x49adeb){var _0x14ee23=function(_0x865cb){while(--_0x865cb){_0x1507b4['push'](_0x1507b4['shift']());}};_0x14ee23(++_0x49adeb);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x39cd62,_0x4d7e83){_0x39cd62=_0x39cd62-0x0;var _0x445226=_0xb4c7[_0x39cd62];return _0x445226;};'use strict';var Sequelize=require(_0x7b4c('0x0'));module[_0x7b4c('0x1')]={'uniqueid':{'type':Sequelize[_0x7b4c('0x2')]},'callerid':{'type':Sequelize[_0x7b4c('0x2')]},'calleridname':{'type':Sequelize[_0x7b4c('0x2')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x7b4c('0x2')]},'priority':{'type':Sequelize[_0x7b4c('0x2')]},'accountcode':{'type':Sequelize[_0x7b4c('0x2')]},'dnid':{'type':Sequelize[_0x7b4c('0x2')]},'projectName':{'type':Sequelize[_0x7b4c('0x2')]},'saveName':{'type':Sequelize['STRING']},'filename':{'type':Sequelize[_0x7b4c('0x2')]},'savePath':{'type':Sequelize[_0x7b4c('0x2')]},'format':{'type':Sequelize[_0x7b4c('0x3')],'get':function(){var _0x4bf85d='';var _0x2d7b7e=this[_0x7b4c('0x4')]('savePath');if(_0x2d7b7e){_0x4bf85d=_0x2d7b7e[_0x7b4c('0x5')](_0x2d7b7e[_0x7b4c('0x6')]('.'));}return _0x4bf85d;}}}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.controller.js b/server/api/squareRecording/squareRecording.controller.js index f086c45..05f7514 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 _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 +var _0x4b47=['eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','apply','save','then','error','name','index','map','SquareRecording','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','type','VIRTUAL','options','where','includeAll','findAll','rows','show','params','fields','find','catch','create','body','update','download','../../components/encryptor','uniqueid','savePath','%s.cypher','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','filename','unlink','message','send','Not\x20found','destroy','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4b47,0x17c));var _0x74b4=function(_0x55e52e,_0x8a59b7){_0x55e52e=_0x55e52e-0x0;var _0x3e279a=_0x4b47[_0x55e52e];return _0x3e279a;};'use strict';var emlformat=require(_0x74b4('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x74b4('0x1'));var jsonpatch=require(_0x74b4('0x2'));var rp=require(_0x74b4('0x3'));var moment=require('moment');var BPromise=require(_0x74b4('0x4'));var Mustache=require(_0x74b4('0x5'));var util=require(_0x74b4('0x6'));var path=require(_0x74b4('0x7'));var sox=require(_0x74b4('0x8'));var csv=require(_0x74b4('0x9'));var ejs=require(_0x74b4('0xa'));var fs=require('fs');var fs_extra=require(_0x74b4('0xb'));var _=require(_0x74b4('0xc'));var squel=require(_0x74b4('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x74b4('0xe'));var toCsv=require('to-csv');var querystring=require(_0x74b4('0xf'));var Papa=require(_0x74b4('0x10'));var Redis=require('ioredis');var authService=require(_0x74b4('0x11'));var qs=require(_0x74b4('0x12'));var as=require(_0x74b4('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x74b4('0x14'))('api');var utils=require(_0x74b4('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x74b4('0x16'));var db=require(_0x74b4('0x17'))['db'];function respondWithStatusCode(_0x418bbf,_0x5c7bc8){_0x5c7bc8=_0x5c7bc8||0xcc;return function(_0x382e1d){if(_0x382e1d){return _0x418bbf['sendStatus'](_0x5c7bc8);}return _0x418bbf[_0x74b4('0x18')](_0x5c7bc8)[_0x74b4('0x19')]();};}function respondWithResult(_0x8254d1,_0x28a5e2){_0x28a5e2=_0x28a5e2||0xc8;return function(_0x4c7fc8){if(_0x4c7fc8){return _0x8254d1[_0x74b4('0x18')](_0x28a5e2)[_0x74b4('0x1a')](_0x4c7fc8);}};}function respondWithFilteredResult(_0x4c8466,_0x41a257){return function(_0x36ef55){if(_0x36ef55){var _0x278b81=typeof _0x41a257[_0x74b4('0x1b')]===_0x74b4('0x1c')&&typeof _0x41a257[_0x74b4('0x1d')]===_0x74b4('0x1c');var _0x5d60eb=_0x36ef55[_0x74b4('0x1e')];var _0x20f075=_0x278b81?0x0:_0x41a257[_0x74b4('0x1b')];var _0x42c5d9=_0x278b81?_0x36ef55['count']:_0x41a257[_0x74b4('0x1b')]+_0x41a257['limit'];var _0x2225e3;if(_0x42c5d9>=_0x5d60eb){_0x42c5d9=_0x5d60eb;_0x2225e3=0xc8;}else{_0x2225e3=0xce;}_0x4c8466[_0x74b4('0x18')](_0x2225e3);return _0x4c8466['set']('Content-Range',_0x20f075+'-'+_0x42c5d9+'/'+_0x5d60eb)['json'](_0x36ef55);}return null;};}function patchUpdates(_0x44538d){return function(_0x3adc00){try{jsonpatch[_0x74b4('0x1f')](_0x3adc00,_0x44538d,!![]);}catch(_0x323f13){return BPromise['reject'](_0x323f13);}return _0x3adc00[_0x74b4('0x20')]();};}function saveUpdates(_0x1e8ee0,_0xa10fd0){return function(_0x25eaad){if(_0x25eaad){return _0x25eaad['update'](_0x1e8ee0)[_0x74b4('0x21')](function(_0x73406f){return _0x73406f;});}return null;};}function removeEntity(_0x58d383,_0x478026){return function(_0xd1dd96){if(_0xd1dd96){return _0xd1dd96['destroy']()[_0x74b4('0x21')](function(){_0x58d383[_0x74b4('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x346c03,_0x128ba4){return function(_0x494ff8){if(!_0x494ff8){_0x346c03['sendStatus'](0x194);}return _0x494ff8;};}function handleError(_0x214c1d,_0x5ac2f6){_0x5ac2f6=_0x5ac2f6||0x1f4;return function(_0x4db7d7){logger[_0x74b4('0x22')](_0x4db7d7['stack']);if(_0x4db7d7[_0x74b4('0x23')]){delete _0x4db7d7['name'];}_0x214c1d[_0x74b4('0x18')](_0x5ac2f6)['send'](_0x4db7d7);};}exports[_0x74b4('0x24')]=function(_0x1cd1e5,_0x3d906d){var _0x14f5a0={},_0x5f07c6={},_0x35d85b={'count':0x0,'rows':[]};var _0x3e9244=_[_0x74b4('0x25')](db[_0x74b4('0x26')][_0x74b4('0x27')],function(_0x3d4844){return{'name':_0x3d4844[_0x74b4('0x28')],'type':_0x3d4844['type']['key']};});_0x5f07c6[_0x74b4('0x29')]=_[_0x74b4('0x25')](_0x3e9244,_0x74b4('0x23'));_0x5f07c6[_0x74b4('0x2a')]=_[_0x74b4('0x2b')](_0x1cd1e5['query']);_0x5f07c6[_0x74b4('0x2c')]=_[_0x74b4('0x2d')](_0x5f07c6[_0x74b4('0x29')],_0x5f07c6[_0x74b4('0x2a')]);_0x14f5a0[_0x74b4('0x2e')]=_[_0x74b4('0x2d')](_0x5f07c6[_0x74b4('0x29')],qs['fields'](_0x1cd1e5[_0x74b4('0x2a')]['fields']));_0x14f5a0['attributes']=_0x14f5a0[_0x74b4('0x2e')][_0x74b4('0x2f')]?_0x14f5a0['attributes']:_0x5f07c6[_0x74b4('0x29')];if(!_0x1cd1e5[_0x74b4('0x2a')][_0x74b4('0x30')](_0x74b4('0x31'))){_0x14f5a0[_0x74b4('0x1d')]=qs[_0x74b4('0x1d')](_0x1cd1e5[_0x74b4('0x2a')][_0x74b4('0x1d')]);_0x14f5a0[_0x74b4('0x1b')]=qs['offset'](_0x1cd1e5[_0x74b4('0x2a')]['offset']);}_0x14f5a0[_0x74b4('0x32')]=qs[_0x74b4('0x33')](_0x1cd1e5[_0x74b4('0x2a')][_0x74b4('0x33')]);_0x14f5a0['where']=qs[_0x74b4('0x2c')](_[_0x74b4('0x34')](_0x1cd1e5[_0x74b4('0x2a')],_0x5f07c6[_0x74b4('0x2c')]),_0x3e9244);if(_0x1cd1e5['query'][_0x74b4('0x35')]){_0x14f5a0['where']=_[_0x74b4('0x36')](_0x14f5a0['where'],{'$or':_['map'](_0x3e9244,function(_0x5dcdc0){if(_0x5dcdc0[_0x74b4('0x37')]!==_0x74b4('0x38')){var _0x30d32f={};_0x30d32f[_0x5dcdc0['name']]={'$like':'%'+_0x1cd1e5['query'][_0x74b4('0x35')]+'%'};return _0x30d32f;}})});}_0x14f5a0=_[_0x74b4('0x36')]({},_0x14f5a0,_0x1cd1e5[_0x74b4('0x39')]);var _0x28f15c={'where':_0x14f5a0[_0x74b4('0x3a')]};return db[_0x74b4('0x26')]['count'](_0x28f15c)[_0x74b4('0x21')](function(_0x5a523e){_0x35d85b['count']=_0x5a523e;if(_0x1cd1e5[_0x74b4('0x2a')][_0x74b4('0x3b')]){_0x14f5a0['include']=[{'all':!![]}];}return db[_0x74b4('0x26')][_0x74b4('0x3c')](_0x14f5a0);})[_0x74b4('0x21')](function(_0x793636){_0x35d85b[_0x74b4('0x3d')]=_0x793636;return _0x35d85b;})['then'](respondWithFilteredResult(_0x3d906d,_0x14f5a0))['catch'](handleError(_0x3d906d,null));};exports[_0x74b4('0x3e')]=function(_0x592069,_0x49a7df){var _0x5374a4={'raw':!![],'where':{'id':_0x592069[_0x74b4('0x3f')]['id']}},_0x456a71={};_0x456a71[_0x74b4('0x29')]=_[_0x74b4('0x2b')](db[_0x74b4('0x26')][_0x74b4('0x27')]);_0x456a71[_0x74b4('0x2a')]=_[_0x74b4('0x2b')](_0x592069[_0x74b4('0x2a')]);_0x456a71[_0x74b4('0x2c')]=_[_0x74b4('0x2d')](_0x456a71['model'],_0x456a71['query']);_0x5374a4[_0x74b4('0x2e')]=_[_0x74b4('0x2d')](_0x456a71[_0x74b4('0x29')],qs[_0x74b4('0x40')](_0x592069[_0x74b4('0x2a')][_0x74b4('0x40')]));_0x5374a4[_0x74b4('0x2e')]=_0x5374a4[_0x74b4('0x2e')][_0x74b4('0x2f')]?_0x5374a4[_0x74b4('0x2e')]:_0x456a71[_0x74b4('0x29')];if(_0x592069[_0x74b4('0x2a')][_0x74b4('0x3b')]){_0x5374a4['include']=[{'all':!![]}];}_0x5374a4=_[_0x74b4('0x36')]({},_0x5374a4,_0x592069[_0x74b4('0x39')]);return db[_0x74b4('0x26')][_0x74b4('0x41')](_0x5374a4)['then'](handleEntityNotFound(_0x49a7df,null))['then'](respondWithResult(_0x49a7df,null))[_0x74b4('0x42')](handleError(_0x49a7df,null));};exports[_0x74b4('0x43')]=function(_0x5f1a76,_0x3409f8){return db[_0x74b4('0x26')]['create'](_0x5f1a76[_0x74b4('0x44')],{})[_0x74b4('0x21')](respondWithResult(_0x3409f8,0xc9))[_0x74b4('0x42')](handleError(_0x3409f8,null));};exports[_0x74b4('0x45')]=function(_0x28faf7,_0x5a009d){if(_0x28faf7['body']['id']){delete _0x28faf7[_0x74b4('0x44')]['id'];}return db[_0x74b4('0x26')][_0x74b4('0x41')]({'where':{'id':_0x28faf7['params']['id']}})[_0x74b4('0x21')](handleEntityNotFound(_0x5a009d,null))[_0x74b4('0x21')](saveUpdates(_0x28faf7[_0x74b4('0x44')],null))[_0x74b4('0x21')](respondWithResult(_0x5a009d,null))[_0x74b4('0x42')](handleError(_0x5a009d,null));};exports[_0x74b4('0x46')]=function(_0x25584e,_0x26ec69,_0x4365cf){var _0x151864=require(_0x74b4('0x47'));var _0x5511cf=![];var _0x624266={};if(_0x25584e['query']['type']&&_0x25584e[_0x74b4('0x2a')][_0x74b4('0x37')]===_0x74b4('0x48')){_0x624266[_0x74b4('0x48')]=_0x25584e[_0x74b4('0x3f')]['id'];}else{_0x624266['id']=_0x25584e[_0x74b4('0x3f')]['id'];}return db[_0x74b4('0x26')][_0x74b4('0x41')]({'where':_0x624266,'attributes':['id','savePath','filename'],'raw':!![]})[_0x74b4('0x21')](handleEntityNotFound(_0x26ec69,null))[_0x74b4('0x21')](function(_0x4e0a4c){if(_0x4e0a4c){var _0x4b85d1=_0x4e0a4c[_0x74b4('0x49')];var _0x2b02a3=util['format'](_0x74b4('0x4a'),_0x4b85d1);if(fs[_0x74b4('0x4b')](_0x2b02a3)){_0x5511cf=!![];return _0x151864[_0x74b4('0x4c')](_0x2b02a3,_0x4b85d1,config[_0x74b4('0x4d')][_0x74b4('0x4e')])['then'](function(){return _0x4e0a4c;});}return _0x4e0a4c;}})['then'](function(_0x4a7c39){if(_0x4a7c39){var _0x1a8d98=_0x4a7c39[_0x74b4('0x49')];if(!fs[_0x74b4('0x4b')](_0x1a8d98)){throw new db[(_0x74b4('0x4f'))][(_0x74b4('0x50'))](_0x74b4('0x51'));}if(_0x4a7c39['filename']){return _0x26ec69['download'](_0x1a8d98,_0x4a7c39[_0x74b4('0x52')]+path['extname'](_0x1a8d98),function(){if(_0x5511cf){fs[_0x74b4('0x53')](_0x1a8d98);}});}else{return _0x26ec69['download'](_0x1a8d98,function(_0x2aaac1){if(_0x5511cf){fs[_0x74b4('0x53')](_0x1a8d98);}});}}})[_0x74b4('0x42')](function(_0x2f3640){if(_0x2f3640[_0x74b4('0x54')]==='SquareRecording\x20not\x20found'){_0x26ec69[_0x74b4('0x18')](0x194)[_0x74b4('0x55')](_0x74b4('0x56'));}else{return handleError(_0x26ec69,null);}});};exports[_0x74b4('0x57')]=function(_0x4aee5b,_0x1063f4){return db[_0x74b4('0x26')][_0x74b4('0x41')]({'where':{'id':_0x4aee5b[_0x74b4('0x3f')]['id']}})['then'](function(_0x34b94f){if(_[_0x74b4('0x58')](_0x34b94f)){throw new ReferenceError(_0x74b4('0x59'));}return _0x34b94f;})['then'](function(_0x477cca){var _0x3f3112=_0x477cca[_0x74b4('0x49')];logger[_0x74b4('0x5a')](_0x74b4('0x5b'),_0x3f3112);if(!_[_0x74b4('0x58')](_0x477cca[_0x74b4('0x49')])&&fs[_0x74b4('0x4b')](_0x3f3112)){logger[_0x74b4('0x5a')](_0x74b4('0x5c')+_0x3f3112+_0x74b4('0x5d'));fs[_0x74b4('0x5e')](_0x3f3112);}_0x3f3112=_0x3f3112+'.cypher';if(!_[_0x74b4('0x58')](_0x477cca['savePath'])&&fs[_0x74b4('0x4b')](_0x3f3112)){logger[_0x74b4('0x5a')](_0x74b4('0x5c')+_0x3f3112+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs['unlinkSync'](_0x3f3112);}return _0x477cca;})[_0x74b4('0x21')](function(_0x1fe2a2){if(!_0x1fe2a2)throw new InternalError();return _0x1fe2a2[_0x74b4('0x57')]();})[_0x74b4('0x21')](function(){_0x1063f4[_0x74b4('0x18')](0xcc)[_0x74b4('0x19')]();})[_0x74b4('0x42')](handleError(_0x1063f4,null));}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.model.js b/server/api/squareRecording/squareRecording.model.js index 54ca844..ac70655 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 _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 +var _0x33ac=['exports','SquareRecording','square_recordings','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareRecording.attributes'];(function(_0x5942df,_0x5a7644){var _0x20347b=function(_0x38bdd8){while(--_0x38bdd8){_0x5942df['push'](_0x5942df['shift']());}};_0x20347b(++_0x5a7644);}(_0x33ac,0x1f2));var _0xc33a=function(_0x58b648,_0x59ef79){_0x58b648=_0x58b648-0x0;var _0x568fce=_0x33ac[_0x58b648];return _0x568fce;};'use strict';var _=require('lodash');var util=require(_0xc33a('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xc33a('0x1'));var BPromise=require(_0xc33a('0x2'));var rp=require(_0xc33a('0x3'));var fs=require('fs');var path=require(_0xc33a('0x4'));var rimraf=require(_0xc33a('0x5'));var config=require(_0xc33a('0x6'));var attributes=require(_0xc33a('0x7'));module[_0xc33a('0x8')]=function(_0x322368,_0x554de7){return _0x322368['define'](_0xc33a('0x9'),attributes,{'tableName':_0xc33a('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 05cd834..3f2b734 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 _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 +var _0x0bae=['body','options','raw','info','CreateSquareRecording','debug','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','request','then','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','SquareRecording','create'];(function(_0x307b1d,_0xe65c90){var _0x3a15d2=function(_0x96eea4){while(--_0x96eea4){_0x307b1d['push'](_0x307b1d['shift']());}};_0x3a15d2(++_0xe65c90);}(_0x0bae,0x12f));var _0xe0ba=function(_0x41359e,_0x5590e1){_0x41359e=_0x41359e-0x0;var _0x2c9741=_0x0bae[_0x41359e];return _0x2c9741;};'use strict';var _=require('lodash');var util=require(_0xe0ba('0x0'));var moment=require('moment');var BPromise=require(_0xe0ba('0x1'));var rs=require(_0xe0ba('0x2'));var fs=require('fs');var Redis=require(_0xe0ba('0x3'));var db=require(_0xe0ba('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xe0ba('0x5'))(_0xe0ba('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xe0ba('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x47f73c,_0x379d1d,_0x47fa4a){return new BPromise(function(_0x36ca9a,_0x28d8c0){return client[_0xe0ba('0x8')](_0x47f73c,_0x47fa4a)[_0xe0ba('0x9')](function(_0x277b4f){logger['info'](_0xe0ba('0xa'),_0x379d1d,_0xe0ba('0xb'));logger['debug'](_0xe0ba('0xc'),_0x379d1d,_0xe0ba('0xb'),JSON[_0xe0ba('0xd')](_0x277b4f));if(_0x277b4f['error']){if(_0x277b4f[_0xe0ba('0xe')][_0xe0ba('0xf')]===0x1f4){logger[_0xe0ba('0xe')](_0xe0ba('0xa'),_0x379d1d,_0x277b4f[_0xe0ba('0xe')][_0xe0ba('0x10')]);return _0x28d8c0(_0x277b4f[_0xe0ba('0xe')][_0xe0ba('0x10')]);}logger[_0xe0ba('0xe')](_0xe0ba('0xa'),_0x379d1d,_0x277b4f[_0xe0ba('0xe')][_0xe0ba('0x10')]);return _0x36ca9a(_0x277b4f[_0xe0ba('0xe')][_0xe0ba('0x10')]);}else{logger['info']('SquareRecording,\x20%s,\x20%s',_0x379d1d,_0xe0ba('0xb'));_0x36ca9a(_0x277b4f[_0xe0ba('0x11')][_0xe0ba('0x10')]);}})[_0xe0ba('0x12')](function(_0x5eac43){logger[_0xe0ba('0xe')](_0xe0ba('0xa'),_0x379d1d,_0x5eac43);_0x28d8c0(_0x5eac43);});});}exports['CreateSquareRecording']=function(_0x38755c){var _0x5bab01=this;return new Promise(function(_0x52aa97,_0x5925af){return db[_0xe0ba('0x13')][_0xe0ba('0x14')](_0x38755c[_0xe0ba('0x15')],{'raw':_0x38755c[_0xe0ba('0x16')]?_0x38755c['options'][_0xe0ba('0x17')]===undefined?!![]:![]:!![]})[_0xe0ba('0x9')](function(_0x599841){logger[_0xe0ba('0x18')](_0xe0ba('0x19'),_0x38755c);logger[_0xe0ba('0x1a')]('CreateSquareRecording',_0x38755c,JSON['stringify'](_0x599841));_0x52aa97(_0x599841);})[_0xe0ba('0x12')](function(_0x3053e3){logger['error'](_0xe0ba('0x19'),_0x3053e3[_0xe0ba('0x10')],_0x38755c);_0x5925af(_0x5bab01[_0xe0ba('0xe')](0x1f4,_0x3053e3[_0xe0ba('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/squareReport/index.js b/server/api/squareReport/index.js index 759fe43..adcf9f8 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 _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 +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(_0x40b972,_0x2a47e1){var _0x12b630=function(_0x2d8983){while(--_0x2d8983){_0x40b972['push'](_0x40b972['shift']());}};_0x12b630(++_0x2a47e1);}(_0xbaf0,0x12a));var _0x0baf=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xbaf0[_0x4cf98e];return _0x1623ac;};'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 a0651a2..96bda25 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 _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 +var _0xe015=['STRING','BOOLEAN','sequelize'];(function(_0x4fdf2f,_0x33cc47){var _0xac01dd=function(_0x524fc3){while(--_0x524fc3){_0x4fdf2f['push'](_0x4fdf2f['shift']());}};_0xac01dd(++_0x33cc47);}(_0xe015,0xf5));var _0x5e01=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0xe015[_0x126558];return _0x1f6d14;};'use strict';var Sequelize=require(_0x5e01('0x0'));module['exports']={'network':{'type':Sequelize['STRING']},'network_script':{'type':Sequelize[_0x5e01('0x1')]},'request':{'type':Sequelize[_0x5e01('0x1')]},'channel':{'type':Sequelize[_0x5e01('0x1')]},'language':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x5e01('0x1')]},'uniqueid':{'type':Sequelize[_0x5e01('0x1')]},'version':{'type':Sequelize[_0x5e01('0x1')]},'callerid':{'type':Sequelize[_0x5e01('0x1')]},'calleridname':{'type':Sequelize[_0x5e01('0x1')]},'callingpres':{'type':Sequelize['STRING']},'callingani2':{'type':Sequelize['STRING']},'callington':{'type':Sequelize[_0x5e01('0x1')]},'callingtns':{'type':Sequelize['STRING']},'dnid':{'type':Sequelize[_0x5e01('0x1')]},'rdnis':{'type':Sequelize[_0x5e01('0x1')]},'context':{'type':Sequelize[_0x5e01('0x1')]},'extension':{'type':Sequelize[_0x5e01('0x1')]},'priority':{'type':Sequelize[_0x5e01('0x1')]},'enhanced':{'type':Sequelize[_0x5e01('0x1')]},'accountcode':{'type':Sequelize[_0x5e01('0x1')]},'threadid':{'type':Sequelize[_0x5e01('0x1')]},'project_name':{'type':Sequelize[_0x5e01('0x1')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize[_0x5e01('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.controller.js b/server/api/squareReport/squareReport.controller.js index 3986c88..b93aa6c 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 _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 +var _0xb47c=['set','Content-Range','json','apply','reject','save','update','then','error','name','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','SquareReport','includeAll','include','findAll','rows','catch','keys','find','create','body','params','destroy','describe','eml-format','fast-json-patch','request-promise','bluebird','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','end','offset','limit','undefined','count'];(function(_0x289ec5,_0x114656){var _0xf7060d=function(_0x4b3700){while(--_0x4b3700){_0x289ec5['push'](_0x289ec5['shift']());}};_0xf7060d(++_0x114656);}(_0xb47c,0x16a));var _0xcb47=function(_0x2f39cf,_0x3c59ec){_0x2f39cf=_0x2f39cf-0x0;var _0xd0ece8=_0xb47c[_0x2f39cf];return _0xd0ece8;};'use strict';var emlformat=require(_0xcb47('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xcb47('0x1'));var rp=require(_0xcb47('0x2'));var moment=require('moment');var BPromise=require(_0xcb47('0x3'));var Mustache=require('mustache');var util=require(_0xcb47('0x4'));var path=require(_0xcb47('0x5'));var sox=require(_0xcb47('0x6'));var csv=require(_0xcb47('0x7'));var ejs=require(_0xcb47('0x8'));var fs=require('fs');var fs_extra=require(_0xcb47('0x9'));var _=require(_0xcb47('0xa'));var squel=require('squel');var crypto=require(_0xcb47('0xb'));var jsforce=require(_0xcb47('0xc'));var deskjs=require(_0xcb47('0xd'));var toCsv=require(_0xcb47('0x7'));var querystring=require(_0xcb47('0xe'));var Papa=require(_0xcb47('0xf'));var Redis=require(_0xcb47('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xcb47('0x11'));var as=require(_0xcb47('0x12'));var hardwareService=require(_0xcb47('0x13'));var logger=require(_0xcb47('0x14'))(_0xcb47('0x15'));var utils=require(_0xcb47('0x16'));var config=require(_0xcb47('0x17'));var licenseUtil=require(_0xcb47('0x18'));var db=require(_0xcb47('0x19'))['db'];function respondWithStatusCode(_0x32a018,_0x12373a){_0x12373a=_0x12373a||0xcc;return function(_0x3880e1){if(_0x3880e1){return _0x32a018[_0xcb47('0x1a')](_0x12373a);}return _0x32a018[_0xcb47('0x1b')](_0x12373a)[_0xcb47('0x1c')]();};}function respondWithResult(_0x4c5213,_0x208d58){_0x208d58=_0x208d58||0xc8;return function(_0x565975){if(_0x565975){return _0x4c5213['status'](_0x208d58)['json'](_0x565975);}};}function respondWithFilteredResult(_0x4daa95,_0x4c2826){return function(_0x1d70c3){if(_0x1d70c3){var _0x3ac515=typeof _0x4c2826[_0xcb47('0x1d')]==='undefined'&&typeof _0x4c2826[_0xcb47('0x1e')]===_0xcb47('0x1f');var _0x45cf65=_0x1d70c3[_0xcb47('0x20')];var _0x2359c7=_0x3ac515?0x0:_0x4c2826[_0xcb47('0x1d')];var _0x2775a0=_0x3ac515?_0x1d70c3[_0xcb47('0x20')]:_0x4c2826['offset']+_0x4c2826[_0xcb47('0x1e')];var _0x290616;if(_0x2775a0>=_0x45cf65){_0x2775a0=_0x45cf65;_0x290616=0xc8;}else{_0x290616=0xce;}_0x4daa95['status'](_0x290616);return _0x4daa95[_0xcb47('0x21')](_0xcb47('0x22'),_0x2359c7+'-'+_0x2775a0+'/'+_0x45cf65)[_0xcb47('0x23')](_0x1d70c3);}return null;};}function patchUpdates(_0x330968){return function(_0x143947){try{jsonpatch[_0xcb47('0x24')](_0x143947,_0x330968,!![]);}catch(_0x7f7ef){return BPromise[_0xcb47('0x25')](_0x7f7ef);}return _0x143947[_0xcb47('0x26')]();};}function saveUpdates(_0x1b31aa,_0x1dfc66){return function(_0x311836){if(_0x311836){return _0x311836[_0xcb47('0x27')](_0x1b31aa)[_0xcb47('0x28')](function(_0x3a3394){return _0x3a3394;});}return null;};}function removeEntity(_0x4c5fd6,_0x32e0ed){return function(_0x5edc57){if(_0x5edc57){return _0x5edc57['destroy']()[_0xcb47('0x28')](function(){_0x4c5fd6[_0xcb47('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2e1b27,_0x2b9e59){return function(_0x47bcfb){if(!_0x47bcfb){_0x2e1b27[_0xcb47('0x1a')](0x194);}return _0x47bcfb;};}function handleError(_0x3dc9d5,_0x2a43b0){_0x2a43b0=_0x2a43b0||0x1f4;return function(_0x22d1f9){logger[_0xcb47('0x29')](_0x22d1f9['stack']);if(_0x22d1f9['name']){delete _0x22d1f9[_0xcb47('0x2a')];}_0x3dc9d5[_0xcb47('0x1b')](_0x2a43b0)['send'](_0x22d1f9);};}exports[_0xcb47('0x2b')]=function(_0x105f07,_0xc55eb){var _0x2e0be5={},_0x4acf6e={},_0x193113={'count':0x0,'rows':[]};var _0x5b0dca=_[_0xcb47('0x2c')](db['SquareReport'][_0xcb47('0x2d')],function(_0x27a3ef){return{'name':_0x27a3ef[_0xcb47('0x2e')],'type':_0x27a3ef[_0xcb47('0x2f')][_0xcb47('0x30')]};});_0x4acf6e[_0xcb47('0x31')]=_['map'](_0x5b0dca,_0xcb47('0x2a'));_0x4acf6e[_0xcb47('0x32')]=_['keys'](_0x105f07[_0xcb47('0x32')]);_0x4acf6e[_0xcb47('0x33')]=_[_0xcb47('0x34')](_0x4acf6e['model'],_0x4acf6e['query']);_0x2e0be5[_0xcb47('0x35')]=_['intersection'](_0x4acf6e[_0xcb47('0x31')],qs[_0xcb47('0x36')](_0x105f07['query'][_0xcb47('0x36')]));_0x2e0be5[_0xcb47('0x35')]=_0x2e0be5[_0xcb47('0x35')][_0xcb47('0x37')]?_0x2e0be5[_0xcb47('0x35')]:_0x4acf6e[_0xcb47('0x31')];if(!_0x105f07[_0xcb47('0x32')][_0xcb47('0x38')](_0xcb47('0x39'))){_0x2e0be5[_0xcb47('0x1e')]=qs[_0xcb47('0x1e')](_0x105f07[_0xcb47('0x32')][_0xcb47('0x1e')]);_0x2e0be5[_0xcb47('0x1d')]=qs[_0xcb47('0x1d')](_0x105f07[_0xcb47('0x32')][_0xcb47('0x1d')]);}_0x2e0be5[_0xcb47('0x3a')]=qs[_0xcb47('0x3b')](_0x105f07[_0xcb47('0x32')][_0xcb47('0x3b')]);_0x2e0be5[_0xcb47('0x3c')]=qs[_0xcb47('0x33')](_[_0xcb47('0x3d')](_0x105f07['query'],_0x4acf6e[_0xcb47('0x33')]),_0x5b0dca);if(_0x105f07[_0xcb47('0x32')][_0xcb47('0x3e')]){_0x2e0be5[_0xcb47('0x3c')]=_['merge'](_0x2e0be5[_0xcb47('0x3c')],{'$or':_[_0xcb47('0x2c')](_0x5b0dca,function(_0x520863){if(_0x520863[_0xcb47('0x2f')]!==_0xcb47('0x3f')){var _0x2db869={};_0x2db869[_0x520863[_0xcb47('0x2a')]]={'$like':'%'+_0x105f07[_0xcb47('0x32')][_0xcb47('0x3e')]+'%'};return _0x2db869;}})});}_0x2e0be5=_[_0xcb47('0x40')]({},_0x2e0be5,_0x105f07[_0xcb47('0x41')]);var _0x2e6616={'where':_0x2e0be5[_0xcb47('0x3c')]};return db[_0xcb47('0x42')][_0xcb47('0x20')](_0x2e6616)[_0xcb47('0x28')](function(_0x19a4b0){_0x193113[_0xcb47('0x20')]=_0x19a4b0;if(_0x105f07[_0xcb47('0x32')][_0xcb47('0x43')]){_0x2e0be5[_0xcb47('0x44')]=[{'all':!![]}];}return db[_0xcb47('0x42')][_0xcb47('0x45')](_0x2e0be5);})[_0xcb47('0x28')](function(_0xd20940){_0x193113[_0xcb47('0x46')]=_0xd20940;return _0x193113;})[_0xcb47('0x28')](respondWithFilteredResult(_0xc55eb,_0x2e0be5))[_0xcb47('0x47')](handleError(_0xc55eb,null));};exports['show']=function(_0x21aa6c,_0x12619e){var _0x52f96f={'raw':!![],'where':{'id':_0x21aa6c['params']['id']}},_0x27e82f={};_0x27e82f[_0xcb47('0x31')]=_[_0xcb47('0x48')](db[_0xcb47('0x42')][_0xcb47('0x2d')]);_0x27e82f[_0xcb47('0x32')]=_[_0xcb47('0x48')](_0x21aa6c[_0xcb47('0x32')]);_0x27e82f[_0xcb47('0x33')]=_[_0xcb47('0x34')](_0x27e82f[_0xcb47('0x31')],_0x27e82f[_0xcb47('0x32')]);_0x52f96f['attributes']=_['intersection'](_0x27e82f[_0xcb47('0x31')],qs[_0xcb47('0x36')](_0x21aa6c[_0xcb47('0x32')][_0xcb47('0x36')]));_0x52f96f['attributes']=_0x52f96f['attributes'][_0xcb47('0x37')]?_0x52f96f['attributes']:_0x27e82f['model'];if(_0x21aa6c[_0xcb47('0x32')][_0xcb47('0x43')]){_0x52f96f[_0xcb47('0x44')]=[{'all':!![]}];}_0x52f96f=_[_0xcb47('0x40')]({},_0x52f96f,_0x21aa6c[_0xcb47('0x41')]);return db['SquareReport'][_0xcb47('0x49')](_0x52f96f)['then'](handleEntityNotFound(_0x12619e,null))['then'](respondWithResult(_0x12619e,null))[_0xcb47('0x47')](handleError(_0x12619e,null));};exports[_0xcb47('0x4a')]=function(_0x24dd47,_0x4015ef){return db['SquareReport']['create'](_0x24dd47[_0xcb47('0x4b')],{})[_0xcb47('0x28')](respondWithResult(_0x4015ef,0xc9))[_0xcb47('0x47')](handleError(_0x4015ef,null));};exports['update']=function(_0x40985c,_0x3c8c0f){if(_0x40985c[_0xcb47('0x4b')]['id']){delete _0x40985c[_0xcb47('0x4b')]['id'];}return db[_0xcb47('0x42')][_0xcb47('0x49')]({'where':{'id':_0x40985c[_0xcb47('0x4c')]['id']}})['then'](handleEntityNotFound(_0x3c8c0f,null))[_0xcb47('0x28')](saveUpdates(_0x40985c[_0xcb47('0x4b')],null))[_0xcb47('0x28')](respondWithResult(_0x3c8c0f,null))[_0xcb47('0x47')](handleError(_0x3c8c0f,null));};exports[_0xcb47('0x4d')]=function(_0x3351c4,_0x4bdf0c){return db[_0xcb47('0x42')]['find']({'where':{'id':_0x3351c4[_0xcb47('0x4c')]['id']}})[_0xcb47('0x28')](handleEntityNotFound(_0x4bdf0c,null))[_0xcb47('0x28')](removeEntity(_0x4bdf0c,null))['catch'](handleError(_0x4bdf0c,null));};exports[_0xcb47('0x4e')]=function(_0x36105c,_0x56a825){return db[_0xcb47('0x42')]['describe']()['then'](respondWithResult(_0x56a825,null))[_0xcb47('0x47')](handleError(_0x56a825,null));}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.model.js b/server/api/squareReport/squareReport.model.js index d0d1ee0..2718a96 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 _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 +var _0xeb4f=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareReport.attributes','exports','define','SquareReport','report_square','uid_pname','project_name','leaveAt','lodash'];(function(_0x35463b,_0x69245e){var _0x33716f=function(_0x498f25){while(--_0x498f25){_0x35463b['push'](_0x35463b['shift']());}};_0x33716f(++_0x69245e);}(_0xeb4f,0x1a8));var _0xfeb4=function(_0x4b2431,_0x5c973f){_0x4b2431=_0x4b2431-0x0;var _0x5c7eef=_0xeb4f[_0x4b2431];return _0x5c7eef;};'use strict';var _=require(_0xfeb4('0x0'));var util=require(_0xfeb4('0x1'));var logger=require('../../config/logger')(_0xfeb4('0x2'));var moment=require(_0xfeb4('0x3'));var BPromise=require(_0xfeb4('0x4'));var rp=require(_0xfeb4('0x5'));var fs=require('fs');var path=require(_0xfeb4('0x6'));var rimraf=require(_0xfeb4('0x7'));var config=require(_0xfeb4('0x8'));var attributes=require(_0xfeb4('0x9'));module[_0xfeb4('0xa')]=function(_0x357f7a,_0x46a384){return _0x357f7a[_0xfeb4('0xb')](_0xfeb4('0xc'),attributes,{'tableName':_0xfeb4('0xd'),'paranoid':![],'indexes':[{'name':_0xfeb4('0xe'),'fields':['uniqueid',_0xfeb4('0xf')]},{'name':_0xfeb4('0x10'),'fields':['leaveAt']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.rpc.js b/server/api/squareReport/squareReport.rpc.js index 9f046ec..99d0842 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 _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 +var _0x777b=['message','catch','CreateSquareReport','SquareReport','create','body','options','raw','debug','stringify','UpdateSquareReport','update','where','limit','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','SquareReport,\x20%s,\x20%s','request\x20sent','SquareReport,\x20%s,\x20%s,\x20%s','error'];(function(_0x5388ea,_0x1f9b05){var _0x16f769=function(_0xb793d0){while(--_0xb793d0){_0x5388ea['push'](_0x5388ea['shift']());}};_0x16f769(++_0x1f9b05);}(_0x777b,0xfe));var _0xb777=function(_0x310baf,_0x2e56bd){_0x310baf=_0x310baf-0x0;var _0x462dd7=_0x777b[_0x310baf];return _0x462dd7;};'use strict';var _=require(_0xb777('0x0'));var util=require(_0xb777('0x1'));var moment=require(_0xb777('0x2'));var BPromise=require(_0xb777('0x3'));var rs=require(_0xb777('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xb777('0x5'));var logger=require(_0xb777('0x6'))(_0xb777('0x7'));var config=require(_0xb777('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x541fd4,_0x88a43e,_0x4089f7){return new BPromise(function(_0x8f1911,_0x34d753){return client[_0xb777('0x9')](_0x541fd4,_0x4089f7)[_0xb777('0xa')](function(_0x47ce8a){logger[_0xb777('0xb')](_0xb777('0xc'),_0x88a43e,_0xb777('0xd'));logger['debug'](_0xb777('0xe'),_0x88a43e,_0xb777('0xd'),JSON['stringify'](_0x47ce8a));if(_0x47ce8a[_0xb777('0xf')]){if(_0x47ce8a[_0xb777('0xf')]['code']===0x1f4){logger[_0xb777('0xf')](_0xb777('0xc'),_0x88a43e,_0x47ce8a[_0xb777('0xf')]['message']);return _0x34d753(_0x47ce8a[_0xb777('0xf')][_0xb777('0x10')]);}logger[_0xb777('0xf')](_0xb777('0xc'),_0x88a43e,_0x47ce8a[_0xb777('0xf')][_0xb777('0x10')]);return _0x8f1911(_0x47ce8a['error'][_0xb777('0x10')]);}else{logger[_0xb777('0xb')](_0xb777('0xc'),_0x88a43e,_0xb777('0xd'));_0x8f1911(_0x47ce8a['result'][_0xb777('0x10')]);}})[_0xb777('0x11')](function(_0x7607d6){logger['error'](_0xb777('0xc'),_0x88a43e,_0x7607d6);_0x34d753(_0x7607d6);});});}exports[_0xb777('0x12')]=function(_0x36e29a){var _0x46be3d=this;return new Promise(function(_0x3d7f56,_0x14274f){return db[_0xb777('0x13')][_0xb777('0x14')](_0x36e29a[_0xb777('0x15')],{'raw':_0x36e29a[_0xb777('0x16')]?_0x36e29a['options'][_0xb777('0x17')]===undefined?!![]:![]:!![]})[_0xb777('0xa')](function(_0x4dfbd5){logger[_0xb777('0xb')](_0xb777('0x12'),_0x36e29a);logger[_0xb777('0x18')](_0xb777('0x12'),_0x36e29a,JSON[_0xb777('0x19')](_0x4dfbd5));_0x3d7f56(_0x4dfbd5);})['catch'](function(_0x3f747b){logger['error'](_0xb777('0x12'),_0x3f747b[_0xb777('0x10')],_0x36e29a);_0x14274f(_0x46be3d['error'](0x1f4,_0x3f747b[_0xb777('0x10')]));});});};exports[_0xb777('0x1a')]=function(_0xac1cd8){var _0x3c6ca1=this;return new Promise(function(_0x343caa,_0x3d927d){return db[_0xb777('0x13')][_0xb777('0x1b')](_0xac1cd8['body'],{'raw':_0xac1cd8[_0xb777('0x16')]?_0xac1cd8['options'][_0xb777('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xac1cd8['options']?_0xac1cd8[_0xb777('0x16')][_0xb777('0x1c')]||null:null,'attributes':_0xac1cd8[_0xb777('0x16')]?_0xac1cd8[_0xb777('0x16')]['attributes']||null:null,'limit':_0xac1cd8[_0xb777('0x16')]?_0xac1cd8[_0xb777('0x16')][_0xb777('0x1d')]||null:null})['then'](function(_0x403023){logger[_0xb777('0xb')]('UpdateSquareReport',_0xac1cd8);logger[_0xb777('0x18')](_0xb777('0x1a'),_0xac1cd8,JSON[_0xb777('0x19')](_0x403023));_0x343caa(_0x403023);})[_0xb777('0x11')](function(_0x4db24b){logger['error'](_0xb777('0x1a'),_0x4db24b[_0xb777('0x10')],_0xac1cd8);_0x3d927d(_0x3c6ca1[_0xb777('0xf')](0x1f4,_0x4db24b['message']));});});}; \ No newline at end of file diff --git a/server/api/squareReportDetail/index.js b/server/api/squareReportDetail/index.js index 019d0dc..6ab2e36 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 _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 +var _0x3e8c=['/describe','/:id','show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','isAuthenticated','index','get'];(function(_0x566bdf,_0x1f4861){var _0x331215=function(_0x524d0d){while(--_0x524d0d){_0x566bdf['push'](_0x566bdf['shift']());}};_0x331215(++_0x1f4861);}(_0x3e8c,0x11d));var _0xc3e8=function(_0x486e46,_0x459a36){_0x486e46=_0x486e46-0x0;var _0x5dd675=_0x3e8c[_0x486e46];return _0x5dd675;};'use strict';var multer=require(_0xc3e8('0x0'));var util=require(_0xc3e8('0x1'));var path=require(_0xc3e8('0x2'));var timeout=require(_0xc3e8('0x3'));var express=require(_0xc3e8('0x4'));var router=express[_0xc3e8('0x5')]();var fs_extra=require(_0xc3e8('0x6'));var auth=require(_0xc3e8('0x7'));var interaction=require(_0xc3e8('0x8'));var config=require(_0xc3e8('0x9'));var controller=require(_0xc3e8('0xa'));router['get']('/',auth[_0xc3e8('0xb')](),controller[_0xc3e8('0xc')]);router[_0xc3e8('0xd')](_0xc3e8('0xe'),auth[_0xc3e8('0xb')](),controller['describe']);router[_0xc3e8('0xd')](_0xc3e8('0xf'),auth[_0xc3e8('0xb')](),controller[_0xc3e8('0x10')]);router[_0xc3e8('0x11')]('/',auth['isAuthenticated'](),controller[_0xc3e8('0x12')]);router['put'](_0xc3e8('0xf'),auth[_0xc3e8('0xb')](),controller[_0xc3e8('0x13')]);router[_0xc3e8('0x14')](_0xc3e8('0xf'),auth[_0xc3e8('0xb')](),controller[_0xc3e8('0x15')]);module[_0xc3e8('0x16')]=router; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.attributes.js b/server/api/squareReportDetail/squareReportDetail.attributes.js index 912a295..8fa34fa 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 _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 +var _0xfc44=['STRING','TEXT','exports'];(function(_0x4ce5ba,_0x17b0db){var _0x11a81d=function(_0x4b3f0e){while(--_0x4b3f0e){_0x4ce5ba['push'](_0x4ce5ba['shift']());}};_0x11a81d(++_0x17b0db);}(_0xfc44,0xb9));var _0x4fc4=function(_0x430dea,_0x56c2b7){_0x430dea=_0x430dea-0x0;var _0x440b06=_0xfc44[_0x430dea];return _0x440b06;};'use strict';var Sequelize=require('sequelize');module[_0x4fc4('0x0')]={'uniqueid':{'type':Sequelize[_0x4fc4('0x1')]},'node':{'type':Sequelize[_0x4fc4('0x1')]},'application':{'type':Sequelize[_0x4fc4('0x1')]},'data':{'type':Sequelize[_0x4fc4('0x2')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.controller.js b/server/api/squareReportDetail/squareReportDetail.controller.js index 98aa7cc..44562d2 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 _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 +var _0xf79b=['findAll','rows','catch','show','options','find','create','body','update','params','destroy','describe','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','set','Content-Range','apply','save','then','stack','name','index','map','SquareDetailsReport','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','filter','merge','VIRTUAL','count','includeAll','include'];(function(_0x5afc6b,_0x205f2a){var _0x5e4c34=function(_0x40cb60){while(--_0x40cb60){_0x5afc6b['push'](_0x5afc6b['shift']());}};_0x5e4c34(++_0x205f2a);}(_0xf79b,0xa0));var _0xbf79=function(_0xa36dcf,_0x3cc145){_0xa36dcf=_0xa36dcf-0x0;var _0x460a48=_0xf79b[_0xa36dcf];return _0x460a48;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbf79('0x0'));var zipdir=require(_0xbf79('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbf79('0x2'));var moment=require(_0xbf79('0x3'));var BPromise=require(_0xbf79('0x4'));var Mustache=require('mustache');var util=require(_0xbf79('0x5'));var path=require(_0xbf79('0x6'));var sox=require(_0xbf79('0x7'));var csv=require(_0xbf79('0x8'));var ejs=require(_0xbf79('0x9'));var fs=require('fs');var fs_extra=require(_0xbf79('0xa'));var _=require(_0xbf79('0xb'));var squel=require(_0xbf79('0xc'));var crypto=require('crypto');var jsforce=require(_0xbf79('0xd'));var deskjs=require(_0xbf79('0xe'));var toCsv=require('to-csv');var querystring=require(_0xbf79('0xf'));var Papa=require('papaparse');var Redis=require(_0xbf79('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbf79('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xbf79('0x12'))(_0xbf79('0x13'));var utils=require(_0xbf79('0x14'));var config=require(_0xbf79('0x15'));var licenseUtil=require(_0xbf79('0x16'));var db=require(_0xbf79('0x17'))['db'];function respondWithStatusCode(_0x27ac2e,_0x1d2bd3){_0x1d2bd3=_0x1d2bd3||0xcc;return function(_0x3f01b5){if(_0x3f01b5){return _0x27ac2e[_0xbf79('0x18')](_0x1d2bd3);}return _0x27ac2e[_0xbf79('0x19')](_0x1d2bd3)[_0xbf79('0x1a')]();};}function respondWithResult(_0x23fe13,_0x26ea5f){_0x26ea5f=_0x26ea5f||0xc8;return function(_0x47cc95){if(_0x47cc95){return _0x23fe13[_0xbf79('0x19')](_0x26ea5f)[_0xbf79('0x1b')](_0x47cc95);}};}function respondWithFilteredResult(_0x2f4e55,_0x3b88dc){return function(_0x5f4b96){if(_0x5f4b96){var _0x5474f1=typeof _0x3b88dc[_0xbf79('0x1c')]==='undefined'&&typeof _0x3b88dc[_0xbf79('0x1d')]===_0xbf79('0x1e');var _0x37e28b=_0x5f4b96['count'];var _0x1a350a=_0x5474f1?0x0:_0x3b88dc[_0xbf79('0x1c')];var _0x2bcd3a=_0x5474f1?_0x5f4b96['count']:_0x3b88dc[_0xbf79('0x1c')]+_0x3b88dc[_0xbf79('0x1d')];var _0x169a2d;if(_0x2bcd3a>=_0x37e28b){_0x2bcd3a=_0x37e28b;_0x169a2d=0xc8;}else{_0x169a2d=0xce;}_0x2f4e55[_0xbf79('0x19')](_0x169a2d);return _0x2f4e55[_0xbf79('0x1f')](_0xbf79('0x20'),_0x1a350a+'-'+_0x2bcd3a+'/'+_0x37e28b)[_0xbf79('0x1b')](_0x5f4b96);}return null;};}function patchUpdates(_0xf36665){return function(_0x19a504){try{jsonpatch[_0xbf79('0x21')](_0x19a504,_0xf36665,!![]);}catch(_0x286564){return BPromise['reject'](_0x286564);}return _0x19a504[_0xbf79('0x22')]();};}function saveUpdates(_0x379aed,_0x10e8e9){return function(_0x588e3a){if(_0x588e3a){return _0x588e3a['update'](_0x379aed)[_0xbf79('0x23')](function(_0x19a8af){return _0x19a8af;});}return null;};}function removeEntity(_0x5badd1,_0x4ed375){return function(_0x187a86){if(_0x187a86){return _0x187a86['destroy']()[_0xbf79('0x23')](function(){_0x5badd1[_0xbf79('0x19')](0xcc)[_0xbf79('0x1a')]();});}};}function handleEntityNotFound(_0x143e96,_0x41146b){return function(_0x5f30bd){if(!_0x5f30bd){_0x143e96[_0xbf79('0x18')](0x194);}return _0x5f30bd;};}function handleError(_0x5ba540,_0x49f57d){_0x49f57d=_0x49f57d||0x1f4;return function(_0x36f889){logger['error'](_0x36f889[_0xbf79('0x24')]);if(_0x36f889[_0xbf79('0x25')]){delete _0x36f889['name'];}_0x5ba540[_0xbf79('0x19')](_0x49f57d)['send'](_0x36f889);};}exports[_0xbf79('0x26')]=function(_0x320f6e,_0x30b132){var _0x35e80e={},_0xad364e={},_0x5dba78={'count':0x0,'rows':[]};var _0x5e11ad=_[_0xbf79('0x27')](db[_0xbf79('0x28')][_0xbf79('0x29')],function(_0x5d26eb){return{'name':_0x5d26eb['fieldName'],'type':_0x5d26eb[_0xbf79('0x2a')][_0xbf79('0x2b')]};});_0xad364e[_0xbf79('0x2c')]=_[_0xbf79('0x27')](_0x5e11ad,_0xbf79('0x25'));_0xad364e[_0xbf79('0x2d')]=_[_0xbf79('0x2e')](_0x320f6e[_0xbf79('0x2d')]);_0xad364e[_0xbf79('0x2f')]=_[_0xbf79('0x30')](_0xad364e[_0xbf79('0x2c')],_0xad364e[_0xbf79('0x2d')]);_0x35e80e[_0xbf79('0x31')]=_[_0xbf79('0x30')](_0xad364e[_0xbf79('0x2c')],qs[_0xbf79('0x32')](_0x320f6e[_0xbf79('0x2d')][_0xbf79('0x32')]));_0x35e80e[_0xbf79('0x31')]=_0x35e80e[_0xbf79('0x31')][_0xbf79('0x33')]?_0x35e80e[_0xbf79('0x31')]:_0xad364e[_0xbf79('0x2c')];if(!_0x320f6e['query'][_0xbf79('0x34')](_0xbf79('0x35'))){_0x35e80e[_0xbf79('0x1d')]=qs[_0xbf79('0x1d')](_0x320f6e[_0xbf79('0x2d')][_0xbf79('0x1d')]);_0x35e80e[_0xbf79('0x1c')]=qs[_0xbf79('0x1c')](_0x320f6e['query'][_0xbf79('0x1c')]);}_0x35e80e[_0xbf79('0x36')]=qs['sort'](_0x320f6e['query']['sort']);_0x35e80e[_0xbf79('0x37')]=qs[_0xbf79('0x2f')](_['pick'](_0x320f6e['query'],_0xad364e[_0xbf79('0x2f')]),_0x5e11ad);if(_0x320f6e[_0xbf79('0x2d')][_0xbf79('0x38')]){_0x35e80e[_0xbf79('0x37')]=_[_0xbf79('0x39')](_0x35e80e['where'],{'$or':_[_0xbf79('0x27')](_0x5e11ad,function(_0x321716){if(_0x321716['type']!==_0xbf79('0x3a')){var _0x1abbba={};_0x1abbba[_0x321716['name']]={'$like':'%'+_0x320f6e[_0xbf79('0x2d')][_0xbf79('0x38')]+'%'};return _0x1abbba;}})});}_0x35e80e=_['merge']({},_0x35e80e,_0x320f6e['options']);var _0x74885d={'where':_0x35e80e['where']};return db['SquareDetailsReport'][_0xbf79('0x3b')](_0x74885d)[_0xbf79('0x23')](function(_0x5d102c){_0x5dba78[_0xbf79('0x3b')]=_0x5d102c;if(_0x320f6e[_0xbf79('0x2d')][_0xbf79('0x3c')]){_0x35e80e[_0xbf79('0x3d')]=[{'all':!![]}];}return db[_0xbf79('0x28')][_0xbf79('0x3e')](_0x35e80e);})[_0xbf79('0x23')](function(_0x390de0){_0x5dba78[_0xbf79('0x3f')]=_0x390de0;return _0x5dba78;})[_0xbf79('0x23')](respondWithFilteredResult(_0x30b132,_0x35e80e))[_0xbf79('0x40')](handleError(_0x30b132,null));};exports[_0xbf79('0x41')]=function(_0x3b3ace,_0x3e241e){var _0xe8a4f7={'raw':!![],'where':{'id':_0x3b3ace['params']['id']}},_0xf49e1b={};_0xf49e1b[_0xbf79('0x2c')]=_[_0xbf79('0x2e')](db[_0xbf79('0x28')][_0xbf79('0x29')]);_0xf49e1b[_0xbf79('0x2d')]=_[_0xbf79('0x2e')](_0x3b3ace[_0xbf79('0x2d')]);_0xf49e1b['filters']=_[_0xbf79('0x30')](_0xf49e1b['model'],_0xf49e1b['query']);_0xe8a4f7[_0xbf79('0x31')]=_[_0xbf79('0x30')](_0xf49e1b[_0xbf79('0x2c')],qs[_0xbf79('0x32')](_0x3b3ace['query'][_0xbf79('0x32')]));_0xe8a4f7[_0xbf79('0x31')]=_0xe8a4f7['attributes'][_0xbf79('0x33')]?_0xe8a4f7[_0xbf79('0x31')]:_0xf49e1b[_0xbf79('0x2c')];if(_0x3b3ace[_0xbf79('0x2d')][_0xbf79('0x3c')]){_0xe8a4f7['include']=[{'all':!![]}];}_0xe8a4f7=_[_0xbf79('0x39')]({},_0xe8a4f7,_0x3b3ace[_0xbf79('0x42')]);return db['SquareDetailsReport'][_0xbf79('0x43')](_0xe8a4f7)[_0xbf79('0x23')](handleEntityNotFound(_0x3e241e,null))[_0xbf79('0x23')](respondWithResult(_0x3e241e,null))[_0xbf79('0x40')](handleError(_0x3e241e,null));};exports[_0xbf79('0x44')]=function(_0x51ae9e,_0x5c999d){return db[_0xbf79('0x28')][_0xbf79('0x44')](_0x51ae9e[_0xbf79('0x45')],{})['then'](respondWithResult(_0x5c999d,0xc9))[_0xbf79('0x40')](handleError(_0x5c999d,null));};exports[_0xbf79('0x46')]=function(_0x22c181,_0x39bae9){if(_0x22c181[_0xbf79('0x45')]['id']){delete _0x22c181[_0xbf79('0x45')]['id'];}return db['SquareDetailsReport']['find']({'where':{'id':_0x22c181[_0xbf79('0x47')]['id']}})[_0xbf79('0x23')](handleEntityNotFound(_0x39bae9,null))[_0xbf79('0x23')](saveUpdates(_0x22c181['body'],null))[_0xbf79('0x23')](respondWithResult(_0x39bae9,null))[_0xbf79('0x40')](handleError(_0x39bae9,null));};exports[_0xbf79('0x48')]=function(_0x55a78d,_0x1fa4af){return db[_0xbf79('0x28')][_0xbf79('0x43')]({'where':{'id':_0x55a78d['params']['id']}})[_0xbf79('0x23')](handleEntityNotFound(_0x1fa4af,null))['then'](removeEntity(_0x1fa4af,null))[_0xbf79('0x40')](handleError(_0x1fa4af,null));};exports['describe']=function(_0x4bf9b3,_0x1f1cfa){return db['SquareDetailsReport'][_0xbf79('0x49')]()[_0xbf79('0x23')](respondWithResult(_0x1f1cfa,null))[_0xbf79('0x40')](handleError(_0x1f1cfa,null));}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.model.js b/server/api/squareReportDetail/squareReportDetail.model.js index 350f228..159ba55 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 _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 +var _0xe9e5=['../../config/environment','./squareReportDetail.attributes','exports','define','SquareDetailsReport','lodash','util','../../config/logger','api','moment','rimraf'];(function(_0x137857,_0x28f593){var _0x226024=function(_0x50c6e1){while(--_0x50c6e1){_0x137857['push'](_0x137857['shift']());}};_0x226024(++_0x28f593);}(_0xe9e5,0x1bd));var _0x5e9e=function(_0x131fe7,_0x21fcdb){_0x131fe7=_0x131fe7-0x0;var _0x2eddf3=_0xe9e5[_0x131fe7];return _0x2eddf3;};'use strict';var _=require(_0x5e9e('0x0'));var util=require(_0x5e9e('0x1'));var logger=require(_0x5e9e('0x2'))(_0x5e9e('0x3'));var moment=require(_0x5e9e('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x5e9e('0x5'));var config=require(_0x5e9e('0x6'));var attributes=require(_0x5e9e('0x7'));module[_0x5e9e('0x8')]=function(_0x338011,_0x35b7e9){return _0x338011[_0x5e9e('0x9')](_0x5e9e('0xa'),attributes,{'tableName':'report_square_details','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 25faef5..754d61b 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 _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 +var _0x4849=['then','info','SquareDetailsReport,\x20%s,\x20%s','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSquareDetailsReport','SquareDetailsReport','create','options','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x29a377,_0x811d72){var _0x65568d=function(_0x525823){while(--_0x525823){_0x29a377['push'](_0x29a377['shift']());}};_0x65568d(++_0x811d72);}(_0x4849,0xf8));var _0x9484=function(_0xa35f87,_0x46c874){_0xa35f87=_0xa35f87-0x0;var _0x21da31=_0x4849[_0xa35f87];return _0x21da31;};'use strict';var _=require(_0x9484('0x0'));var util=require(_0x9484('0x1'));var moment=require(_0x9484('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9484('0x3'));var db=require(_0x9484('0x4'))['db'];var utils=require(_0x9484('0x5'));var logger=require(_0x9484('0x6'))(_0x9484('0x7'));var config=require(_0x9484('0x8'));var jayson=require(_0x9484('0x9'));var client=jayson[_0x9484('0xa')][_0x9484('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x536b43,_0x4a8a70,_0x11f2a1){return new BPromise(function(_0x583079,_0x3929b9){return client[_0x9484('0xc')](_0x536b43,_0x11f2a1)[_0x9484('0xd')](function(_0xe8b216){logger[_0x9484('0xe')](_0x9484('0xf'),_0x4a8a70,_0x9484('0x10'));logger[_0x9484('0x11')](_0x9484('0x12'),_0x4a8a70,_0x9484('0x10'),JSON[_0x9484('0x13')](_0xe8b216));if(_0xe8b216[_0x9484('0x14')]){if(_0xe8b216[_0x9484('0x14')][_0x9484('0x15')]===0x1f4){logger[_0x9484('0x14')]('SquareDetailsReport,\x20%s,\x20%s',_0x4a8a70,_0xe8b216[_0x9484('0x14')]['message']);return _0x3929b9(_0xe8b216[_0x9484('0x14')][_0x9484('0x16')]);}logger[_0x9484('0x14')](_0x9484('0xf'),_0x4a8a70,_0xe8b216[_0x9484('0x14')][_0x9484('0x16')]);return _0x583079(_0xe8b216['error'][_0x9484('0x16')]);}else{logger[_0x9484('0xe')]('SquareDetailsReport,\x20%s,\x20%s',_0x4a8a70,'request\x20sent');_0x583079(_0xe8b216[_0x9484('0x17')]['message']);}})[_0x9484('0x18')](function(_0x4e974f){logger[_0x9484('0x14')](_0x9484('0xf'),_0x4a8a70,_0x4e974f);_0x3929b9(_0x4e974f);});});}exports[_0x9484('0x19')]=function(_0xa279e2){var _0x26ec8b=this;return new Promise(function(_0x232694,_0x4b900f){return db[_0x9484('0x1a')][_0x9484('0x1b')](_0xa279e2['body'],{'raw':_0xa279e2[_0x9484('0x1c')]?_0xa279e2[_0x9484('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0x9484('0xd')](function(_0x5325e6){logger[_0x9484('0xe')]('CreateSquareDetailsReport',_0xa279e2);logger[_0x9484('0x11')](_0x9484('0x19'),_0xa279e2,JSON[_0x9484('0x13')](_0x5325e6));_0x232694(_0x5325e6);})[_0x9484('0x18')](function(_0x5edcf5){logger['error'](_0x9484('0x19'),_0x5edcf5['message'],_0xa279e2);_0x4b900f(_0x26ec8b[_0x9484('0x14')](0x1f4,_0x5edcf5['message']));});});}; \ No newline at end of file diff --git a/server/api/system/index.js b/server/api/system/index.js index 3946b28..b4111c5 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 _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 +var _0xe194=['/process/:pid/kill','killProcess','exports','Router','./system.controller','get','isAuthenticated','index'];(function(_0x258ba3,_0x379fd4){var _0x207fd6=function(_0x23689d){while(--_0x23689d){_0x258ba3['push'](_0x258ba3['shift']());}};_0x207fd6(++_0x379fd4);}(_0xe194,0x1b3));var _0x4e19=function(_0x754ab4,_0x56daa7){_0x754ab4=_0x754ab4-0x0;var _0x34079a=_0xe194[_0x754ab4];return _0x34079a;};'use strict';var express=require('express');var router=express[_0x4e19('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x4e19('0x1'));router[_0x4e19('0x2')]('/',auth[_0x4e19('0x3')](),controller[_0x4e19('0x4')]);router['get'](_0x4e19('0x5'),auth['isAuthenticated'](),controller[_0x4e19('0x6')]);module[_0x4e19('0x7')]=router; \ No newline at end of file diff --git a/server/api/system/system.controller.js b/server/api/system/system.controller.js index 812cf25..03eb37f 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 _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 +var _0xaa23=['params','pid','split','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','systeminformation','child_process','exec','api','util','bluebird','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','name','status','getAllData','then','json','catch','killProcess','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args'];(function(_0x26b30a,_0xfb3217){var _0x269187=function(_0x468148){while(--_0x468148){_0x26b30a['push'](_0x26b30a['shift']());}};_0x269187(++_0xfb3217);}(_0xaa23,0x17f));var _0x3aa2=function(_0x4d8789,_0x3fdff1){_0x4d8789=_0x4d8789-0x0;var _0x404e41=_0xaa23[_0x4d8789];return _0x404e41;};'use strict';var info=require(_0x3aa2('0x0'));var exec=require(_0x3aa2('0x1'))[_0x3aa2('0x2')];var logger=require('../../config/logger')(_0x3aa2('0x3'));var util=require(_0x3aa2('0x4'));var BPromise=require(_0x3aa2('0x5'));var _=require('lodash');function handleError(_0x27da0d,_0x515c63,_0x51b7c9){_0x515c63=_0x515c63||0x1f4;return function(_0x4935be){logger[_0x3aa2('0x6')](_0x3aa2('0x7'),_0x51b7c9,_0x515c63,util['inspect'](_0x4935be,{'showHidden':![],'depth':null}));delete _0x4935be[_0x3aa2('0x8')];_0x27da0d[_0x3aa2('0x9')](_0x515c63)['send'](_0x4935be);};}exports['index']=function(_0x1435c2,_0x4215d3){return info[_0x3aa2('0xa')]()[_0x3aa2('0xb')](function(_0x6458c2){return _0x4215d3['status'](0xc8)[_0x3aa2('0xc')](_0x6458c2);})[_0x3aa2('0xd')](function(_0x937cd4){return _0x4215d3['status'](0x1f4)[_0x3aa2('0xc')](_0x937cd4);});};exports[_0x3aa2('0xe')]=function(_0x2fb9a7,_0x1b2383){var _0x3fab98=['components/import/cm'];return new BPromise(function(_0x485b1f,_0x23e88c){return exec(util[_0x3aa2('0xf')](_0x3aa2('0x10'),_0x2fb9a7[_0x3aa2('0x11')][_0x3aa2('0x12')]),function(_0x481f49,_0xfd4aca,_0x3f280d){if(_0x481f49){return _0x23e88c(_0x481f49);}return _0x485b1f(_0xfd4aca);});})[_0x3aa2('0xb')](function(_0x38392c){var _0x2da03b=![];var _0xc7377c=_0x38392c[_0x3aa2('0x13')](/\n/);for(var _0x34f57d=0x0,_0x2ad4d7=_0x3fab98['length'];_0x34f57d<_0x2ad4d7,_0x2da03b===![];_0x34f57d+=0x1){if(_0x38392c[_0x3aa2('0x14')](_0x3fab98[_0x34f57d])>=0x0){_0x2da03b=!![];}}if(!_0x2da03b){throw new Error(util[_0x3aa2('0xf')](_0x3aa2('0x15'),_0x2fb9a7[_0x3aa2('0x11')][_0x3aa2('0x12')]));}process[_0x3aa2('0x16')](_0x2fb9a7[_0x3aa2('0x11')][_0x3aa2('0x12')],_0x3aa2('0x17'));return _0x1b2383['status'](0xc8)['json']({'message':util[_0x3aa2('0xf')](_0x3aa2('0x18'),_0x2fb9a7['params'][_0x3aa2('0x12')])});})['catch'](handleError(_0x1b2383,null,_0x3aa2('0xe')));}; \ No newline at end of file diff --git a/server/api/tag/index.js b/server/api/tag/index.js index 62cdf32..08c23be 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 _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 +var _0xd54b=['delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./tag.controller','index','get','/:id','isAuthenticated','show','create','update'];(function(_0x526631,_0x36130d){var _0x3c0945=function(_0x4095a3){while(--_0x4095a3){_0x526631['push'](_0x526631['shift']());}};_0x3c0945(++_0x36130d);}(_0xd54b,0x1e3));var _0xbd54=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xd54b[_0x40a045];return _0x1a687c;};'use strict';var multer=require(_0xbd54('0x0'));var util=require(_0xbd54('0x1'));var path=require(_0xbd54('0x2'));var timeout=require('connect-timeout');var express=require(_0xbd54('0x3'));var router=express[_0xbd54('0x4')]();var fs_extra=require(_0xbd54('0x5'));var auth=require(_0xbd54('0x6'));var interaction=require(_0xbd54('0x7'));var config=require(_0xbd54('0x8'));var controller=require(_0xbd54('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0xbd54('0xa')]);router[_0xbd54('0xb')](_0xbd54('0xc'),auth[_0xbd54('0xd')](),controller[_0xbd54('0xe')]);router['post']('/',auth[_0xbd54('0xd')](),controller[_0xbd54('0xf')]);router['put'](_0xbd54('0xc'),auth[_0xbd54('0xd')](),controller[_0xbd54('0x10')]);router[_0xbd54('0x11')](_0xbd54('0xc'),auth[_0xbd54('0xd')](),controller[_0xbd54('0x12')]);module[_0xbd54('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 fa35b83..5dc47a5 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 _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 +var _0x4b6c=['sequelize','exports','name','STRING','#0091EA'];(function(_0x1851c4,_0xec2de4){var _0x1127d6=function(_0x240a72){while(--_0x240a72){_0x1851c4['push'](_0x1851c4['shift']());}};_0x1127d6(++_0xec2de4);}(_0x4b6c,0x14a));var _0xc4b6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4b6c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xc4b6('0x0'));module[_0xc4b6('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xc4b6('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0xc4b6('0x3')],'defaultValue':_0xc4b6('0x4')},'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 d4eb1db..92d9282 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 _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 +var _0xaaa2=['keys','includeAll','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','count','offset','limit','set','apply','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','send','index','map','Tag','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','rows','catch','params'];(function(_0xb24f0c,_0x36c851){var _0x9e80a2=function(_0x674716){while(--_0x674716){_0xb24f0c['push'](_0xb24f0c['shift']());}};_0x9e80a2(++_0x36c851);}(_0xaaa2,0xac));var _0x2aaa=function(_0x2c6303,_0x5364a0){_0x2c6303=_0x2c6303-0x0;var _0x171c4e=_0xaaa2[_0x2c6303];return _0x171c4e;};'use strict';var emlformat=require(_0x2aaa('0x0'));var rimraf=require(_0x2aaa('0x1'));var zipdir=require(_0x2aaa('0x2'));var jsonpatch=require(_0x2aaa('0x3'));var rp=require(_0x2aaa('0x4'));var moment=require(_0x2aaa('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x2aaa('0x6'));var util=require('util');var path=require(_0x2aaa('0x7'));var sox=require(_0x2aaa('0x8'));var csv=require(_0x2aaa('0x9'));var ejs=require(_0x2aaa('0xa'));var fs=require('fs');var fs_extra=require(_0x2aaa('0xb'));var _=require(_0x2aaa('0xc'));var squel=require('squel');var crypto=require(_0x2aaa('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x2aaa('0x9'));var querystring=require('querystring');var Papa=require(_0x2aaa('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x2aaa('0xf'));var as=require(_0x2aaa('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2aaa('0x11'))(_0x2aaa('0x12'));var utils=require(_0x2aaa('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x2aaa('0x14'));var db=require(_0x2aaa('0x15'))['db'];function respondWithStatusCode(_0x8a5be3,_0x2b51f0){_0x2b51f0=_0x2b51f0||0xcc;return function(_0xd38d6d){if(_0xd38d6d){return _0x8a5be3[_0x2aaa('0x16')](_0x2b51f0);}return _0x8a5be3[_0x2aaa('0x17')](_0x2b51f0)[_0x2aaa('0x18')]();};}function respondWithResult(_0x32dfbf,_0xe22151){_0xe22151=_0xe22151||0xc8;return function(_0x314366){if(_0x314366){return _0x32dfbf[_0x2aaa('0x17')](_0xe22151)['json'](_0x314366);}};}function respondWithFilteredResult(_0x166321,_0x4df56b){return function(_0x35fbc1){if(_0x35fbc1){var _0x1a5573=typeof _0x4df56b['offset']==='undefined'&&typeof _0x4df56b['limit']===_0x2aaa('0x19');var _0x1dc0ba=_0x35fbc1[_0x2aaa('0x1a')];var _0x3b94bf=_0x1a5573?0x0:_0x4df56b[_0x2aaa('0x1b')];var _0xdaa445=_0x1a5573?_0x35fbc1[_0x2aaa('0x1a')]:_0x4df56b['offset']+_0x4df56b[_0x2aaa('0x1c')];var _0x30951c;if(_0xdaa445>=_0x1dc0ba){_0xdaa445=_0x1dc0ba;_0x30951c=0xc8;}else{_0x30951c=0xce;}_0x166321['status'](_0x30951c);return _0x166321[_0x2aaa('0x1d')]('Content-Range',_0x3b94bf+'-'+_0xdaa445+'/'+_0x1dc0ba)['json'](_0x35fbc1);}return null;};}function patchUpdates(_0x1ec32e){return function(_0x5052eb){try{jsonpatch[_0x2aaa('0x1e')](_0x5052eb,_0x1ec32e,!![]);}catch(_0x3e7649){return BPromise[_0x2aaa('0x1f')](_0x3e7649);}return _0x5052eb[_0x2aaa('0x20')]();};}function saveUpdates(_0x2c255f,_0x24da1e){return function(_0x4f581f){if(_0x4f581f){return _0x4f581f[_0x2aaa('0x21')](_0x2c255f)[_0x2aaa('0x22')](function(_0x4836b2){return _0x4836b2;});}return null;};}function removeEntity(_0x4d35aa,_0x19153e){return function(_0x4d7151){if(_0x4d7151){return _0x4d7151[_0x2aaa('0x23')]()[_0x2aaa('0x22')](function(){var _0x4e41ee=_0x4d7151[_0x2aaa('0x24')]({'plain':!![]});var _0x3b99d8='Tags';return db[_0x2aaa('0x25')][_0x2aaa('0x23')]({'where':{'type':_0x3b99d8,'resourceId':_0x4e41ee['id']}})[_0x2aaa('0x22')](function(){return _0x4d7151;});})['then'](function(){_0x4d35aa[_0x2aaa('0x17')](0xcc)[_0x2aaa('0x18')]();});}};}function handleEntityNotFound(_0x47a9fa,_0x565860){return function(_0x3af929){if(!_0x3af929){_0x47a9fa[_0x2aaa('0x16')](0x194);}return _0x3af929;};}function handleError(_0x2f9772,_0xd9891d){_0xd9891d=_0xd9891d||0x1f4;return function(_0x3a6a63){logger[_0x2aaa('0x26')](_0x3a6a63[_0x2aaa('0x27')]);if(_0x3a6a63[_0x2aaa('0x28')]){delete _0x3a6a63[_0x2aaa('0x28')];}_0x2f9772[_0x2aaa('0x17')](_0xd9891d)[_0x2aaa('0x29')](_0x3a6a63);};}exports[_0x2aaa('0x2a')]=function(_0x4f837f,_0x101b6e){var _0x5e29de={},_0xd6482a={},_0xb22a8d={'count':0x0,'rows':[]};var _0x3dd818=_[_0x2aaa('0x2b')](db[_0x2aaa('0x2c')][_0x2aaa('0x2d')],function(_0x436179){return{'name':_0x436179[_0x2aaa('0x2e')],'type':_0x436179[_0x2aaa('0x2f')][_0x2aaa('0x30')]};});_0xd6482a['model']=_['map'](_0x3dd818,'name');_0xd6482a['query']=_['keys'](_0x4f837f[_0x2aaa('0x31')]);_0xd6482a[_0x2aaa('0x32')]=_[_0x2aaa('0x33')](_0xd6482a[_0x2aaa('0x34')],_0xd6482a[_0x2aaa('0x31')]);_0x5e29de[_0x2aaa('0x35')]=_[_0x2aaa('0x33')](_0xd6482a[_0x2aaa('0x34')],qs['fields'](_0x4f837f[_0x2aaa('0x31')][_0x2aaa('0x36')]));_0x5e29de['attributes']=_0x5e29de[_0x2aaa('0x35')][_0x2aaa('0x37')]?_0x5e29de['attributes']:_0xd6482a[_0x2aaa('0x34')];if(!_0x4f837f[_0x2aaa('0x31')][_0x2aaa('0x38')](_0x2aaa('0x39'))){_0x5e29de[_0x2aaa('0x1c')]=qs[_0x2aaa('0x1c')](_0x4f837f[_0x2aaa('0x31')]['limit']);_0x5e29de['offset']=qs[_0x2aaa('0x1b')](_0x4f837f['query'][_0x2aaa('0x1b')]);}_0x5e29de[_0x2aaa('0x3a')]=qs['sort'](_0x4f837f[_0x2aaa('0x31')][_0x2aaa('0x3b')]);_0x5e29de[_0x2aaa('0x3c')]=qs['filters'](_[_0x2aaa('0x3d')](_0x4f837f[_0x2aaa('0x31')],_0xd6482a[_0x2aaa('0x32')]),_0x3dd818);if(_0x4f837f[_0x2aaa('0x31')]['filter']){_0x5e29de[_0x2aaa('0x3c')]=_[_0x2aaa('0x3e')](_0x5e29de[_0x2aaa('0x3c')],{'$or':_[_0x2aaa('0x2b')](_0x3dd818,function(_0x372cae){if(_0x372cae[_0x2aaa('0x2f')]!==_0x2aaa('0x3f')){var _0x1a7fbd={};_0x1a7fbd[_0x372cae[_0x2aaa('0x28')]]={'$like':'%'+_0x4f837f[_0x2aaa('0x31')][_0x2aaa('0x40')]+'%'};return _0x1a7fbd;}})});}_0x5e29de=_[_0x2aaa('0x3e')]({},_0x5e29de,_0x4f837f[_0x2aaa('0x41')]);var _0x54a9c8={'where':_0x5e29de[_0x2aaa('0x3c')]};return db[_0x2aaa('0x2c')][_0x2aaa('0x1a')](_0x54a9c8)['then'](function(_0x17042f){_0xb22a8d[_0x2aaa('0x1a')]=_0x17042f;if(_0x4f837f[_0x2aaa('0x31')]['includeAll']){_0x5e29de[_0x2aaa('0x42')]=[{'all':!![]}];}return db[_0x2aaa('0x2c')][_0x2aaa('0x43')](_0x5e29de);})['then'](function(_0x57554e){_0xb22a8d[_0x2aaa('0x44')]=_0x57554e;return _0xb22a8d;})[_0x2aaa('0x22')](respondWithFilteredResult(_0x101b6e,_0x5e29de))[_0x2aaa('0x45')](handleError(_0x101b6e,null));};exports['show']=function(_0x333786,_0x127a5a){var _0x2ec436={'raw':!![],'where':{'id':_0x333786[_0x2aaa('0x46')]['id']}},_0x2d639a={};_0x2d639a[_0x2aaa('0x34')]=_[_0x2aaa('0x47')](db[_0x2aaa('0x2c')]['rawAttributes']);_0x2d639a['query']=_[_0x2aaa('0x47')](_0x333786['query']);_0x2d639a[_0x2aaa('0x32')]=_['intersection'](_0x2d639a['model'],_0x2d639a['query']);_0x2ec436[_0x2aaa('0x35')]=_[_0x2aaa('0x33')](_0x2d639a['model'],qs[_0x2aaa('0x36')](_0x333786[_0x2aaa('0x31')]['fields']));_0x2ec436[_0x2aaa('0x35')]=_0x2ec436['attributes'][_0x2aaa('0x37')]?_0x2ec436[_0x2aaa('0x35')]:_0x2d639a['model'];if(_0x333786[_0x2aaa('0x31')][_0x2aaa('0x48')]){_0x2ec436[_0x2aaa('0x42')]=[{'all':!![]}];}_0x2ec436=_[_0x2aaa('0x3e')]({},_0x2ec436,_0x333786[_0x2aaa('0x41')]);return db['Tag']['find'](_0x2ec436)['then'](handleEntityNotFound(_0x127a5a,null))[_0x2aaa('0x22')](respondWithResult(_0x127a5a,null))[_0x2aaa('0x45')](handleError(_0x127a5a,null));};exports[_0x2aaa('0x49')]=function(_0x393073,_0x23290d){return db[_0x2aaa('0x2c')][_0x2aaa('0x49')](_0x393073[_0x2aaa('0x4a')],{})[_0x2aaa('0x22')](function(_0x54d9bb){var _0x22ccf0=_0x393073[_0x2aaa('0x4b')][_0x2aaa('0x24')]({'plain':!![]});if(!_0x22ccf0)throw new Error(_0x2aaa('0x4c'));if(_0x22ccf0['role']===_0x2aaa('0x4b')){var _0xe935c3=_0x54d9bb[_0x2aaa('0x24')]({'plain':!![]});var _0x5aeb05='Tags';return db[_0x2aaa('0x4d')][_0x2aaa('0x4e')]({'where':{'name':_0x5aeb05,'userProfileId':_0x22ccf0[_0x2aaa('0x4f')]},'raw':!![]})[_0x2aaa('0x22')](function(_0x4ca930){if(_0x4ca930&&_0x4ca930['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0xe935c3[_0x2aaa('0x28')],'resourceId':_0xe935c3['id'],'type':_0x4ca930[_0x2aaa('0x28')],'sectionId':_0x4ca930['id']},{})[_0x2aaa('0x22')](function(){return _0x54d9bb;});}else{return _0x54d9bb;}})['catch'](function(_0x1e690d){logger[_0x2aaa('0x26')](_0x2aaa('0x50'),_0x1e690d);throw _0x1e690d;});}return _0x54d9bb;})[_0x2aaa('0x22')](respondWithResult(_0x23290d,0xc9))[_0x2aaa('0x45')](handleError(_0x23290d,null));};exports[_0x2aaa('0x21')]=function(_0x1c74de,_0x5f3ebb){if(_0x1c74de[_0x2aaa('0x4a')]['id']){delete _0x1c74de['body']['id'];}return db['Tag'][_0x2aaa('0x4e')]({'where':{'id':_0x1c74de[_0x2aaa('0x46')]['id']}})[_0x2aaa('0x22')](handleEntityNotFound(_0x5f3ebb,null))[_0x2aaa('0x22')](saveUpdates(_0x1c74de[_0x2aaa('0x4a')],null))['then'](respondWithResult(_0x5f3ebb,null))[_0x2aaa('0x45')](handleError(_0x5f3ebb,null));};exports[_0x2aaa('0x23')]=function(_0x1a5d71,_0x2639f4){return db[_0x2aaa('0x2c')][_0x2aaa('0x4e')]({'where':{'id':_0x1a5d71[_0x2aaa('0x46')]['id']}})[_0x2aaa('0x22')](handleEntityNotFound(_0x2639f4,null))[_0x2aaa('0x22')](removeEntity(_0x2639f4,null))[_0x2aaa('0x45')](handleError(_0x2639f4,null));}; \ No newline at end of file diff --git a/server/api/tag/tag.model.js b/server/api/tag/tag.model.js index 96e1036..b689342 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 _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 +var _0x4746=['request-promise','path','../../config/environment','./tag.attributes','exports','Tag','util','../../config/logger','api','moment','bluebird'];(function(_0x54fdbc,_0x1b881e){var _0x723ddc=function(_0x587385){while(--_0x587385){_0x54fdbc['push'](_0x54fdbc['shift']());}};_0x723ddc(++_0x1b881e);}(_0x4746,0x10e));var _0x6474=function(_0xdaf36c,_0x49e21a){_0xdaf36c=_0xdaf36c-0x0;var _0x4f3572=_0x4746[_0xdaf36c];return _0x4f3572;};'use strict';var _=require('lodash');var util=require(_0x6474('0x0'));var logger=require(_0x6474('0x1'))(_0x6474('0x2'));var moment=require(_0x6474('0x3'));var BPromise=require(_0x6474('0x4'));var rp=require(_0x6474('0x5'));var fs=require('fs');var path=require(_0x6474('0x6'));var rimraf=require('rimraf');var config=require(_0x6474('0x7'));var attributes=require(_0x6474('0x8'));module[_0x6474('0x9')]=function(_0x43ebb0,_0xbd53e5){return _0x43ebb0['define'](_0x6474('0xa'),attributes,{'tableName':'tools_tags','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 693dde9..17a3caf 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 _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 +var _0xaf93=['jayson/promise','client','http','then','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1b8f5a,_0x57c154){var _0x594189=function(_0x15b277){while(--_0x15b277){_0x1b8f5a['push'](_0x1b8f5a['shift']());}};_0x594189(++_0x57c154);}(_0xaf93,0x151));var _0x3af9=function(_0x353b9f,_0x1c6835){_0x353b9f=_0x353b9f-0x0;var _0x204799=_0xaf93[_0x353b9f];return _0x204799;};'use strict';var _=require(_0x3af9('0x0'));var util=require(_0x3af9('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x3af9('0x2'));var fs=require('fs');var Redis=require(_0x3af9('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x3af9('0x4'));var logger=require(_0x3af9('0x5'))(_0x3af9('0x6'));var config=require(_0x3af9('0x7'));var jayson=require(_0x3af9('0x8'));var client=jayson[_0x3af9('0x9')][_0x3af9('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x535583,_0x2ac1a2,_0x56e4c2){return new BPromise(function(_0x133672,_0x53b5ba){return client['request'](_0x535583,_0x56e4c2)[_0x3af9('0xb')](function(_0x5d655f){logger['info'](_0x3af9('0xc'),_0x2ac1a2,_0x3af9('0xd'));logger[_0x3af9('0xe')](_0x3af9('0xf'),_0x2ac1a2,'request\x20sent',JSON[_0x3af9('0x10')](_0x5d655f));if(_0x5d655f[_0x3af9('0x11')]){if(_0x5d655f[_0x3af9('0x11')][_0x3af9('0x12')]===0x1f4){logger[_0x3af9('0x11')](_0x3af9('0xc'),_0x2ac1a2,_0x5d655f[_0x3af9('0x11')][_0x3af9('0x13')]);return _0x53b5ba(_0x5d655f['error'][_0x3af9('0x13')]);}logger['error'](_0x3af9('0xc'),_0x2ac1a2,_0x5d655f[_0x3af9('0x11')][_0x3af9('0x13')]);return _0x133672(_0x5d655f['error'][_0x3af9('0x13')]);}else{logger[_0x3af9('0x14')](_0x3af9('0xc'),_0x2ac1a2,'request\x20sent');_0x133672(_0x5d655f[_0x3af9('0x15')][_0x3af9('0x13')]);}})[_0x3af9('0x16')](function(_0x29dc4b){logger['error'](_0x3af9('0xc'),_0x2ac1a2,_0x29dc4b);_0x53b5ba(_0x29dc4b);});});} \ No newline at end of file diff --git a/server/api/team/index.js b/server/api/team/index.js index f277593..9ffe220 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(_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 +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(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0xa9e0[_0x1ac595];return _0x455fff;};'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 059559d..99a8af8 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 _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 +var _0xbaf0=['name','exports','STRING'];(function(_0x45aa72,_0x8af642){var _0x75adaa=function(_0x1f6809){while(--_0x1f6809){_0x45aa72['push'](_0x45aa72['shift']());}};_0x75adaa(++_0x8af642);}(_0xbaf0,0x12a));var _0x0baf=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xbaf0[_0x1facfa];return _0x9ec701;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'name':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2')},'description':{'type':Sequelize[_0x0baf('0x1')]}}; \ No newline at end of file diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index df278f0..7ce1161 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 _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 +var _0x4813=['Teams','UserProfileResource','name','send','index','map','fieldName','type','key','query','filters','intersection','model','attributes','fields','nolimit','order','sort','where','filter','merge','VIRTUAL','Team','include','rows','catch','rawAttributes','keys','length','includeAll','options','find','create','body','user','role','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','findOne','channel','isValidChannel','Sequelize','Unknown\x20channel','capitalize','toLowerCase','Queue','Queues','addQueues','ValidationError','add','ids','removeQueues','remove','addAgents','Voice','Chat','Mail','Fax','Openchannel','Whatsapp','sequelize','transaction','through','QueueId','TeamVoiceQueue','User','findOrCreate','emit','Queue:save','findAll','online','voicePause','UserVoiceQueueRt','isNil','interface','SIP/%s','penalty','all','removeAgents','Sms','parse','Queue:remove','getAgents','pick','hasOwnProperty','eml-format','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','reject','save','then','destroy','get'];(function(_0x3a2c7a,_0x239b0c){var _0x217ccd=function(_0x5c8282){while(--_0x5c8282){_0x3a2c7a['push'](_0x3a2c7a['shift']());}};_0x217ccd(++_0x239b0c);}(_0x4813,0xdc));var _0x3481=function(_0x20c4d0,_0x510618){_0x20c4d0=_0x20c4d0-0x0;var _0x148f9e=_0x4813[_0x20c4d0];return _0x148f9e;};'use strict';var emlformat=require(_0x3481('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3481('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3481('0x2'));var BPromise=require(_0x3481('0x3'));var Mustache=require('mustache');var util=require(_0x3481('0x4'));var path=require(_0x3481('0x5'));var sox=require(_0x3481('0x6'));var csv=require(_0x3481('0x7'));var ejs=require(_0x3481('0x8'));var fs=require('fs');var fs_extra=require(_0x3481('0x9'));var _=require(_0x3481('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x3481('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x3481('0x7'));var querystring=require(_0x3481('0xc'));var Papa=require(_0x3481('0xd'));var Redis=require(_0x3481('0xe'));var authService=require(_0x3481('0xf'));var qs=require(_0x3481('0x10'));var as=require(_0x3481('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x3481('0x12'));var utils=require(_0x3481('0x13'));var config=require(_0x3481('0x14'));var licenseUtil=require(_0x3481('0x15'));var db=require(_0x3481('0x16'))['db'];config['redis']=_[_0x3481('0x17')](config[_0x3481('0x18')],{'host':_0x3481('0x19'),'port':0x18eb});var socket=require(_0x3481('0x1a'))(new Redis(config[_0x3481('0x18')]));require('./team.socket')['register'](socket);function respondWithStatusCode(_0x23bb15,_0x1ecfe3){_0x1ecfe3=_0x1ecfe3||0xcc;return function(_0x47c338){if(_0x47c338){return _0x23bb15[_0x3481('0x1b')](_0x1ecfe3);}return _0x23bb15[_0x3481('0x1c')](_0x1ecfe3)[_0x3481('0x1d')]();};}function respondWithResult(_0x22b37e,_0x12bb03){_0x12bb03=_0x12bb03||0xc8;return function(_0xd36e95){if(_0xd36e95){return _0x22b37e[_0x3481('0x1c')](_0x12bb03)['json'](_0xd36e95);}};}function respondWithFilteredResult(_0x27c353,_0x2de1dc){return function(_0x4d2ceb){if(_0x4d2ceb){var _0x46dc92=typeof _0x2de1dc[_0x3481('0x1e')]===_0x3481('0x1f')&&typeof _0x2de1dc[_0x3481('0x20')]===_0x3481('0x1f');var _0x4fc770=_0x4d2ceb[_0x3481('0x21')];var _0x525ed1=_0x46dc92?0x0:_0x2de1dc[_0x3481('0x1e')];var _0x5891ed=_0x46dc92?_0x4d2ceb[_0x3481('0x21')]:_0x2de1dc[_0x3481('0x1e')]+_0x2de1dc[_0x3481('0x20')];var _0x3ead0c;if(_0x5891ed>=_0x4fc770){_0x5891ed=_0x4fc770;_0x3ead0c=0xc8;}else{_0x3ead0c=0xce;}_0x27c353[_0x3481('0x1c')](_0x3ead0c);return _0x27c353['set'](_0x3481('0x22'),_0x525ed1+'-'+_0x5891ed+'/'+_0x4fc770)[_0x3481('0x23')](_0x4d2ceb);}return null;};}function patchUpdates(_0x16960d){return function(_0x221f53){try{jsonpatch[_0x3481('0x24')](_0x221f53,_0x16960d,!![]);}catch(_0x504a12){return BPromise[_0x3481('0x25')](_0x504a12);}return _0x221f53[_0x3481('0x26')]();};}function saveUpdates(_0x4fecb0,_0x2931b1){return function(_0x303094){if(_0x303094){return _0x303094['update'](_0x4fecb0)[_0x3481('0x27')](function(_0x2bd432){return _0x2bd432;});}return null;};}function removeEntity(_0x1e3250,_0x223f10){return function(_0x464bc5){if(_0x464bc5){return _0x464bc5[_0x3481('0x28')]()[_0x3481('0x27')](function(){var _0x4e7eca=_0x464bc5[_0x3481('0x29')]({'plain':!![]});var _0x189f96=_0x3481('0x2a');return db[_0x3481('0x2b')][_0x3481('0x28')]({'where':{'type':_0x189f96,'resourceId':_0x4e7eca['id']}})['then'](function(){return _0x464bc5;});})[_0x3481('0x27')](function(){_0x1e3250[_0x3481('0x1c')](0xcc)[_0x3481('0x1d')]();});}};}function handleEntityNotFound(_0x1c3b5b,_0x12e5d6){return function(_0x3b7b5e){if(!_0x3b7b5e){_0x1c3b5b['sendStatus'](0x194);}return _0x3b7b5e;};}function handleError(_0x365f4b,_0x249760){_0x249760=_0x249760||0x1f4;return function(_0x391457){logger['error'](_0x391457['stack']);if(_0x391457[_0x3481('0x2c')]){delete _0x391457[_0x3481('0x2c')];}_0x365f4b[_0x3481('0x1c')](_0x249760)[_0x3481('0x2d')](_0x391457);};}exports[_0x3481('0x2e')]=function(_0x4b3f1a,_0xca752f){var _0x161191={},_0x52ddca={},_0x305a24={'count':0x0,'rows':[]};var _0x374428=_[_0x3481('0x2f')](db['Team']['rawAttributes'],function(_0x4c6e1d){return{'name':_0x4c6e1d[_0x3481('0x30')],'type':_0x4c6e1d[_0x3481('0x31')][_0x3481('0x32')]};});_0x52ddca['model']=_['map'](_0x374428,'name');_0x52ddca[_0x3481('0x33')]=_['keys'](_0x4b3f1a['query']);_0x52ddca[_0x3481('0x34')]=_[_0x3481('0x35')](_0x52ddca[_0x3481('0x36')],_0x52ddca[_0x3481('0x33')]);_0x161191[_0x3481('0x37')]=_['intersection'](_0x52ddca['model'],qs[_0x3481('0x38')](_0x4b3f1a[_0x3481('0x33')][_0x3481('0x38')]));_0x161191['attributes']=_0x161191['attributes']['length']?_0x161191[_0x3481('0x37')]:_0x52ddca[_0x3481('0x36')];if(!_0x4b3f1a[_0x3481('0x33')]['hasOwnProperty'](_0x3481('0x39'))){_0x161191['limit']=qs[_0x3481('0x20')](_0x4b3f1a[_0x3481('0x33')][_0x3481('0x20')]);_0x161191['offset']=qs[_0x3481('0x1e')](_0x4b3f1a['query'][_0x3481('0x1e')]);}_0x161191[_0x3481('0x3a')]=qs[_0x3481('0x3b')](_0x4b3f1a[_0x3481('0x33')]['sort']);_0x161191[_0x3481('0x3c')]=qs[_0x3481('0x34')](_['pick'](_0x4b3f1a['query'],_0x52ddca[_0x3481('0x34')]),_0x374428);if(_0x4b3f1a[_0x3481('0x33')][_0x3481('0x3d')]){_0x161191[_0x3481('0x3c')]=_[_0x3481('0x3e')](_0x161191[_0x3481('0x3c')],{'$or':_[_0x3481('0x2f')](_0x374428,function(_0x1b52f9){if(_0x1b52f9[_0x3481('0x31')]!==_0x3481('0x3f')){var _0x21739c={};_0x21739c[_0x1b52f9['name']]={'$like':'%'+_0x4b3f1a[_0x3481('0x33')]['filter']+'%'};return _0x21739c;}})});}_0x161191=_[_0x3481('0x3e')]({},_0x161191,_0x4b3f1a['options']);var _0x2f4585={'where':_0x161191[_0x3481('0x3c')]};return db[_0x3481('0x40')]['count'](_0x2f4585)[_0x3481('0x27')](function(_0x23b237){_0x305a24[_0x3481('0x21')]=_0x23b237;if(_0x4b3f1a[_0x3481('0x33')]['includeAll']){_0x161191[_0x3481('0x41')]=[{'all':!![]}];}return db[_0x3481('0x40')]['findAll'](_0x161191);})['then'](function(_0x1e32be){_0x305a24[_0x3481('0x42')]=_0x1e32be;return _0x305a24;})[_0x3481('0x27')](respondWithFilteredResult(_0xca752f,_0x161191))[_0x3481('0x43')](handleError(_0xca752f,null));};exports['show']=function(_0x18b741,_0x4af610){var _0x2950a0={'raw':![],'where':{'id':_0x18b741['params']['id']}},_0x51dba7={};_0x51dba7[_0x3481('0x36')]=_['keys'](db[_0x3481('0x40')][_0x3481('0x44')]);_0x51dba7[_0x3481('0x33')]=_[_0x3481('0x45')](_0x18b741[_0x3481('0x33')]);_0x51dba7['filters']=_[_0x3481('0x35')](_0x51dba7[_0x3481('0x36')],_0x51dba7[_0x3481('0x33')]);_0x2950a0[_0x3481('0x37')]=_[_0x3481('0x35')](_0x51dba7['model'],qs[_0x3481('0x38')](_0x18b741['query'][_0x3481('0x38')]));_0x2950a0[_0x3481('0x37')]=_0x2950a0['attributes'][_0x3481('0x46')]?_0x2950a0[_0x3481('0x37')]:_0x51dba7[_0x3481('0x36')];if(_0x18b741[_0x3481('0x33')][_0x3481('0x47')]){_0x2950a0['include']=[{'all':!![]}];}_0x2950a0=_[_0x3481('0x3e')]({},_0x2950a0,_0x18b741[_0x3481('0x48')]);return db[_0x3481('0x40')][_0x3481('0x49')](_0x2950a0)[_0x3481('0x27')](handleEntityNotFound(_0x4af610,null))[_0x3481('0x27')](respondWithResult(_0x4af610,null))['catch'](handleError(_0x4af610,null));};exports[_0x3481('0x4a')]=function(_0x52935a,_0x507139){return db['Team']['create'](_0x52935a[_0x3481('0x4b')],{})[_0x3481('0x27')](function(_0x53c851){var _0x1bba45=_0x52935a[_0x3481('0x4c')]['get']({'plain':!![]});if(!_0x1bba45)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1bba45[_0x3481('0x4d')]==='user'){var _0x3a5dd1=_0x53c851['get']({'plain':!![]});var _0x450775='Teams';return db[_0x3481('0x4e')][_0x3481('0x49')]({'where':{'name':_0x450775,'userProfileId':_0x1bba45[_0x3481('0x4f')]},'raw':!![]})[_0x3481('0x27')](function(_0x172d4a){if(_0x172d4a&&_0x172d4a['autoAssociation']===0x0){return db[_0x3481('0x2b')][_0x3481('0x4a')]({'name':_0x3a5dd1[_0x3481('0x2c')],'resourceId':_0x3a5dd1['id'],'type':_0x172d4a[_0x3481('0x2c')],'sectionId':_0x172d4a['id']},{})['then'](function(){return _0x53c851;});}else{return _0x53c851;}})['catch'](function(_0x114024){logger[_0x3481('0x50')](_0x3481('0x51'),_0x114024);throw _0x114024;});}return _0x53c851;})[_0x3481('0x27')](respondWithResult(_0x507139,0xc9))[_0x3481('0x43')](handleError(_0x507139,null));};exports[_0x3481('0x52')]=function(_0x20d9f7,_0x572474){if(_0x20d9f7[_0x3481('0x4b')]['id']){delete _0x20d9f7[_0x3481('0x4b')]['id'];}return db[_0x3481('0x40')][_0x3481('0x49')]({'where':{'id':_0x20d9f7[_0x3481('0x53')]['id']}})[_0x3481('0x27')](handleEntityNotFound(_0x572474,null))['then'](saveUpdates(_0x20d9f7[_0x3481('0x4b')],null))['then'](respondWithResult(_0x572474,null))[_0x3481('0x43')](handleError(_0x572474,null));};exports['destroy']=function(_0xcf968b,_0x5798e2){return db[_0x3481('0x40')][_0x3481('0x49')]({'where':{'id':_0xcf968b[_0x3481('0x53')]['id']}})[_0x3481('0x27')](handleEntityNotFound(_0x5798e2,null))[_0x3481('0x27')](removeEntity(_0x5798e2,null))[_0x3481('0x43')](handleError(_0x5798e2,null));};exports['getQueues']=function(_0x392101,_0x5106ef,_0x121ac){return db[_0x3481('0x40')][_0x3481('0x54')]({'where':{'id':_0x392101[_0x3481('0x53')]['id']}})[_0x3481('0x27')](handleEntityNotFound(_0x5106ef,null))['then'](function(_0x31bd8f){if(!_0x392101[_0x3481('0x33')][_0x3481('0x55')]||!utils[_0x3481('0x56')](_0x392101[_0x3481('0x33')][_0x3481('0x55')])){throw new db[(_0x3481('0x57'))]['ValidationError'](_0x3481('0x58'));}var _0x2db4de={};var _0xe80f84={};_0xe80f84['model']=_[_0x3481('0x45')](db[_[_0x3481('0x59')](_0x392101[_0x3481('0x33')][_0x3481('0x55')][_0x3481('0x5a')]())+_0x3481('0x5b')]['rawAttributes']);_0xe80f84[_0x3481('0x33')]=_[_0x3481('0x45')](_0x392101[_0x3481('0x33')]);_0xe80f84[_0x3481('0x34')]=_[_0x3481('0x35')](_0xe80f84[_0x3481('0x36')],_0xe80f84[_0x3481('0x33')]);_0x2db4de[_0x3481('0x37')]=_[_0x3481('0x35')](_0xe80f84[_0x3481('0x36')],qs[_0x3481('0x38')](_0x392101[_0x3481('0x33')][_0x3481('0x38')]));_0x2db4de[_0x3481('0x37')]=_0x2db4de[_0x3481('0x37')][_0x3481('0x46')]?_0x2db4de['attributes']:_0xe80f84[_0x3481('0x36')];_0x2db4de[_0x3481('0x20')]=qs[_0x3481('0x20')](_0x392101[_0x3481('0x33')][_0x3481('0x20')]);_0x2db4de[_0x3481('0x1e')]=qs[_0x3481('0x1e')](_0x392101['query'][_0x3481('0x1e')]);_0x2db4de[_0x3481('0x3a')]=qs[_0x3481('0x3b')](_0x392101[_0x3481('0x33')][_0x3481('0x3b')]);_0x2db4de[_0x3481('0x3c')]=qs[_0x3481('0x34')](_['pick'](_0x392101[_0x3481('0x33')],_0xe80f84[_0x3481('0x34')]));_0x2db4de=_['merge']({},_0x2db4de,_0x392101[_0x3481('0x48')]);return _0x31bd8f[_0x3481('0x29')+_[_0x3481('0x59')](_0x392101[_0x3481('0x33')]['channel']['toLowerCase']())+_0x3481('0x5c')](_0x2db4de);})['then'](respondWithResult(_0x5106ef,null))['catch'](handleError(_0x5106ef,null));};exports[_0x3481('0x5d')]=function(_0x5a7e84,_0x1c7d8d,_0x5ed34b){return db['Team'][_0x3481('0x54')]({'where':{'id':_0x5a7e84[_0x3481('0x53')]['id']}})[_0x3481('0x27')](function(_0x24d446){if(_0x24d446){if(!_0x5a7e84[_0x3481('0x4b')][_0x3481('0x55')]||!utils['isValidChannel'](_0x5a7e84[_0x3481('0x4b')][_0x3481('0x55')])){throw new db['Sequelize'][(_0x3481('0x5e'))]('Unknown\x20channel');}return _0x24d446[_0x3481('0x5f')+_[_0x3481('0x59')](_0x5a7e84[_0x3481('0x4b')][_0x3481('0x55')][_0x3481('0x5a')]())+'Queues'](_0x5a7e84[_0x3481('0x4b')][_0x3481('0x60')]);}return null;})['then'](handleEntityNotFound(_0x1c7d8d,null))[_0x3481('0x27')](respondWithStatusCode(_0x1c7d8d,null))[_0x3481('0x43')](handleError(_0x1c7d8d,null));};exports[_0x3481('0x61')]=function(_0x5ea47c,_0x1d3eed,_0x250e78){return db[_0x3481('0x40')][_0x3481('0x54')]({'where':{'id':_0x5ea47c[_0x3481('0x53')]['id']}})[_0x3481('0x27')](function(_0xe1f0cc){if(_0xe1f0cc){if(!_0x5ea47c[_0x3481('0x33')][_0x3481('0x55')]||!utils[_0x3481('0x56')](_0x5ea47c['query']['channel'])){throw new db[(_0x3481('0x57'))]['ValidationError'](_0x3481('0x58'));}return _0xe1f0cc[_0x3481('0x62')+_['capitalize'](_0x5ea47c[_0x3481('0x33')][_0x3481('0x55')][_0x3481('0x5a')]())+_0x3481('0x5c')](_0x5ea47c[_0x3481('0x33')][_0x3481('0x60')]);}return null;})['then'](handleEntityNotFound(_0x1d3eed,null))[_0x3481('0x27')](respondWithStatusCode(_0x1d3eed,null))[_0x3481('0x43')](handleError(_0x1d3eed,null));};exports[_0x3481('0x63')]=function(_0x5c6ab2,_0x3a590a){return db[_0x3481('0x40')]['find']({'where':{'id':_0x5c6ab2[_0x3481('0x53')]['id']}})['then'](handleEntityNotFound(_0x3a590a,null))[_0x3481('0x27')](function(_0x2f8aa2){if(_0x2f8aa2){var _0xf1567e=[_0x3481('0x64'),_0x3481('0x65'),_0x3481('0x66'),'Sms',_0x3481('0x67'),_0x3481('0x68'),_0x3481('0x69')];return db[_0x3481('0x6a')][_0x3481('0x6b')](function(_0x47a60c){var _0x2141b0=_[_0x3481('0x2f')](_0xf1567e,function(_0x33ef32){var _0x25fa1c={'attributes':['id',_0x3481('0x2c')]};if(_0x33ef32===_0x3481('0x64')){_0x25fa1c[_0x3481('0x6c')]={'attributes':['penalty']};}return _0x2f8aa2[_0x3481('0x29')+_0x33ef32+'Queues'](_0x25fa1c)[_0x3481('0x27')](function(_0xf22da8){var _0x46adb2=_[_0x3481('0x2f')](_0xf22da8,function(_0x28ee3c){var _0x1bce8a=_[_0x3481('0x2f')](_0x5c6ab2[_0x3481('0x4b')]['ids'],function(_0x492dc1){var _0x47660f={'where':{'UserId':_0x492dc1,[_0x33ef32+_0x3481('0x6d')]:_0x28ee3c['id']},'transaction':_0x47a60c};if(_0x33ef32===_0x3481('0x64')){_0x47660f[_0x3481('0x17')]={'penalty':_0x28ee3c[_0x3481('0x6e')]['penalty']};}return db[_0x3481('0x6f')+_0x33ef32+'Queue'][_0x3481('0x70')](_0x47660f)[_0x3481('0x27')](function(){socket[_0x3481('0x71')]('user'+_0x33ef32+_0x3481('0x72'),{'UserId':_0x492dc1,[_0x33ef32+'QueueId']:_0x28ee3c['id']});if(_0x33ef32!=='Voice')return;return db['User'][_0x3481('0x73')]({'where':{'id':_0x5c6ab2['body']['ids'],'online':0x1},'attributes':['id',_0x3481('0x2c'),_0x3481('0x74'),_0x3481('0x75'),'interface'],'raw':!![]})[_0x3481('0x27')](function(_0x50ac58){var _0x44ee96=_[_0x3481('0x2f')](_0x50ac58,function(_0x3be503){return db[_0x3481('0x76')]['upsert']({'membername':_0x3be503['name'],'UserId':_0x3be503['id'],'queue_name':_0x28ee3c[_0x3481('0x2c')],'VoiceQueueId':_0x28ee3c['id'],'interface':_[_0x3481('0x77')](_0x3be503[_0x3481('0x78')])?util['format'](_0x3481('0x79'),_0x3be503['name']):_0x3be503[_0x3481('0x78')],'paused':_0x3be503[_0x3481('0x75')]||![],'penalty':_0x28ee3c[_0x3481('0x6e')][_0x3481('0x7a')]},{'transaction':_0x47a60c});});return Promise[_0x3481('0x7b')](_0x44ee96);});});});return Promise[_0x3481('0x7b')](_0x1bce8a);});return Promise['all'](_0x46adb2);});});return Promise[_0x3481('0x7b')](_0x2141b0)[_0x3481('0x27')](function(){return _0x2f8aa2[_0x3481('0x63')](_0x5c6ab2[_0x3481('0x4b')]['ids'],{'transaction':_0x47a60c})['spread'](function(_0x36a9a9){return _0x36a9a9;});});});}})[_0x3481('0x27')](respondWithResult(_0x3a590a,null))['catch'](handleError(_0x3a590a,null));};exports[_0x3481('0x7c')]=function(_0x2d42c4,_0x480243){return db['Team']['find']({'where':{'id':_0x2d42c4[_0x3481('0x53')]['id']}})[_0x3481('0x27')](handleEntityNotFound(_0x480243,null))[_0x3481('0x27')](function(_0x3e5761){if(_0x3e5761){var _0x3dadf6=['Voice',_0x3481('0x65'),_0x3481('0x66'),_0x3481('0x7d'),_0x3481('0x67'),_0x3481('0x68'),'Whatsapp'];return db[_0x3481('0x6a')][_0x3481('0x6b')](function(_0x3f0d9b){var _0x1bc508=_[_0x3481('0x2f')](_0x3dadf6,function(_0xe8c71c){var _0x4df12b={'attributes':['id',_0x3481('0x2c')]};return _0x3e5761[_0x3481('0x29')+_0xe8c71c+'Queues'](_0x4df12b)['then'](function(_0x97fd1){var _0x2a9c3a=_[_0x3481('0x2f')](_0x97fd1,function(_0x578c9d){return _0x578c9d[_0x3481('0x7c')](_0x2d42c4[_0x3481('0x33')][_0x3481('0x60')],{'transaction':_0x3f0d9b})[_0x3481('0x27')](function(){var _0x56f835=JSON[_0x3481('0x7e')]('['+_0x2d42c4[_0x3481('0x33')][_0x3481('0x60')]+']');var _0x4f8b83=_[_0x3481('0x2f')](_0x56f835,function(_0x30f5dc){socket['emit']('user'+_0xe8c71c+_0x3481('0x7f'),{'UserId':Number(_0x30f5dc),[_0xe8c71c+'QueueId']:_0x578c9d['id']});if(_0xe8c71c!==_0x3481('0x64'))return;return db['UserVoiceQueueRt'][_0x3481('0x28')]({'where':{'VoiceQueueId':_0x578c9d['id'],'UserId':_0x30f5dc},'transaction':_0x3f0d9b});});return Promise['all'](_0x4f8b83);});});return Promise[_0x3481('0x7b')](_0x2a9c3a);});});return Promise['all'](_0x1bc508)[_0x3481('0x27')](function(){return _0x3e5761[_0x3481('0x7c')](_0x2d42c4['query'][_0x3481('0x60')],{'transaction':_0x3f0d9b});});});}})['then'](respondWithStatusCode(_0x480243,null))[_0x3481('0x43')](handleError(_0x480243,null));};exports[_0x3481('0x80')]=function(_0x1af5ae,_0x214fc5,_0x3a3982){var _0x3d1308={};var _0x28508d={};var _0x373e22;var _0x483fca;return db[_0x3481('0x40')][_0x3481('0x54')]({'where':{'id':_0x1af5ae['params']['id']}})[_0x3481('0x27')](handleEntityNotFound(_0x214fc5,null))[_0x3481('0x27')](function(_0x37cbfb){if(_0x37cbfb){_0x373e22=_0x37cbfb;_0x28508d['model']=_[_0x3481('0x45')](db[_0x3481('0x6f')][_0x3481('0x44')]);_0x28508d[_0x3481('0x33')]=_[_0x3481('0x45')](_0x1af5ae[_0x3481('0x33')]);_0x28508d[_0x3481('0x34')]=_[_0x3481('0x35')](_0x28508d[_0x3481('0x36')],_0x28508d[_0x3481('0x33')]);_0x3d1308[_0x3481('0x37')]=_[_0x3481('0x35')](_0x28508d[_0x3481('0x36')],qs[_0x3481('0x38')](_0x1af5ae['query'][_0x3481('0x38')]));_0x3d1308[_0x3481('0x37')]=_0x3d1308['attributes'][_0x3481('0x46')]?_0x3d1308['attributes']:_0x28508d['model'];_0x3d1308[_0x3481('0x3a')]=qs[_0x3481('0x3b')](_0x1af5ae[_0x3481('0x33')][_0x3481('0x3b')]);_0x3d1308[_0x3481('0x3c')]=qs[_0x3481('0x34')](_[_0x3481('0x81')](_0x1af5ae[_0x3481('0x33')],_0x28508d[_0x3481('0x34')]));if(_0x1af5ae[_0x3481('0x33')]['filter']){_0x3d1308[_0x3481('0x3c')]=_[_0x3481('0x3e')](_0x3d1308['where'],{'$or':_['map'](_0x3d1308[_0x3481('0x37')],function(_0x38532a){var _0x51c63d={};_0x51c63d[_0x38532a]={'$like':'%'+_0x1af5ae['query'][_0x3481('0x3d')]+'%'};return _0x51c63d;})});}_0x3d1308=_['merge']({},_0x3d1308,_0x1af5ae[_0x3481('0x48')]);return _0x373e22[_0x3481('0x80')](_0x3d1308);}})['then'](function(_0x3ff616){if(_0x3ff616){_0x483fca=_0x3ff616['length'];if(!_0x1af5ae[_0x3481('0x33')][_0x3481('0x82')](_0x3481('0x39'))){_0x3d1308[_0x3481('0x20')]=qs['limit'](_0x1af5ae['query']['limit']);_0x3d1308[_0x3481('0x1e')]=qs[_0x3481('0x1e')](_0x1af5ae[_0x3481('0x33')]['offset']);}return _0x373e22[_0x3481('0x80')](_0x3d1308);}})['then'](function(_0x238f1e){if(_0x238f1e){return _0x238f1e?{'count':_0x483fca,'rows':_0x238f1e}:null;}})['then'](respondWithResult(_0x214fc5,null))[_0x3481('0x43')](handleError(_0x214fc5,null));}; \ No newline at end of file diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js index 0a32f24..39204ce 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 _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 +var _0x0275=['emit','Team','setMaxListeners','save','update','remove'];(function(_0x371159,_0x33cfb8){var _0x12ffc6=function(_0xfdd25c){while(--_0xfdd25c){_0x371159['push'](_0x371159['shift']());}};_0x12ffc6(++_0x33cfb8);}(_0x0275,0x91));var _0x5027=function(_0x1513ad,_0x4684d4){_0x1513ad=_0x1513ad-0x0;var _0x15966a=_0x0275[_0x1513ad];return _0x15966a;};'use strict';var EventEmitter=require('events');var Team=require('../../mysqldb')['db'][_0x5027('0x0')];var TeamEvents=new EventEmitter();TeamEvents[_0x5027('0x1')](0x0);var events={'afterCreate':_0x5027('0x2'),'afterUpdate':_0x5027('0x3'),'afterDestroy':_0x5027('0x4')};function emitEvent(_0x401dfa){return function(_0x5eb68,_0x6502d2,_0x12930f){TeamEvents['emit'](_0x401dfa+':'+_0x5eb68['id'],_0x5eb68);TeamEvents[_0x5027('0x5')](_0x401dfa,_0x5eb68);_0x12930f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module['exports']=TeamEvents; \ No newline at end of file diff --git a/server/api/team/team.model.js b/server/api/team/team.model.js index 27e3b85..f6abcb1 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 _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 +var _0xd007=['Team','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./team.attributes','exports','define'];(function(_0x20fec0,_0x5c789f){var _0x978124=function(_0x100ef5){while(--_0x100ef5){_0x20fec0['push'](_0x20fec0['shift']());}};_0x978124(++_0x5c789f);}(_0xd007,0x139));var _0x7d00=function(_0x3b5eb9,_0x5e37c8){_0x3b5eb9=_0x3b5eb9-0x0;var _0x3c2ea4=_0xd007[_0x3b5eb9];return _0x3c2ea4;};'use strict';var _=require(_0x7d00('0x0'));var util=require('util');var logger=require(_0x7d00('0x1'))(_0x7d00('0x2'));var moment=require(_0x7d00('0x3'));var BPromise=require(_0x7d00('0x4'));var rp=require(_0x7d00('0x5'));var fs=require('fs');var path=require(_0x7d00('0x6'));var rimraf=require(_0x7d00('0x7'));var config=require(_0x7d00('0x8'));var attributes=require(_0x7d00('0x9'));module[_0x7d00('0xa')]=function(_0x466707,_0x30b9c8){return _0x466707[_0x7d00('0xb')](_0x7d00('0xc'),attributes,{'tableName':'teams','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 077367e..90f9b76 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 _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 +var _0xd5a3=['client','http','defaults','localhost','socket.io-emitter','redis','./team.socket','register','request','info','Team,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x18ae5d,_0x15cf57){var _0xdcccb9=function(_0xd176b4){while(--_0xd176b4){_0x18ae5d['push'](_0x18ae5d['shift']());}};_0xdcccb9(++_0x15cf57);}(_0xd5a3,0x146));var _0x3d5a=function(_0x466a1a,_0x37933b){_0x466a1a=_0x466a1a-0x0;var _0x577165=_0xd5a3[_0x466a1a];return _0x577165;};'use strict';var _=require(_0x3d5a('0x0'));var util=require(_0x3d5a('0x1'));var moment=require(_0x3d5a('0x2'));var BPromise=require(_0x3d5a('0x3'));var rs=require(_0x3d5a('0x4'));var fs=require('fs');var Redis=require(_0x3d5a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3d5a('0x6'));var logger=require(_0x3d5a('0x7'))('rpc');var config=require(_0x3d5a('0x8'));var jayson=require(_0x3d5a('0x9'));var client=jayson[_0x3d5a('0xa')][_0x3d5a('0xb')]({'port':0x232a});config['redis']=_[_0x3d5a('0xc')](config['redis'],{'host':_0x3d5a('0xd'),'port':0x18eb});var socket=require(_0x3d5a('0xe'))(new Redis(config[_0x3d5a('0xf')]));require(_0x3d5a('0x10'))[_0x3d5a('0x11')](socket);function respondWithRpcPromise(_0x129928,_0x541ba0,_0x4a3454){return new BPromise(function(_0x50a19c,_0x335869){return client[_0x3d5a('0x12')](_0x129928,_0x4a3454)['then'](function(_0x218eb7){logger[_0x3d5a('0x13')](_0x3d5a('0x14'),_0x541ba0,_0x3d5a('0x15'));logger[_0x3d5a('0x16')]('Team,\x20%s,\x20%s,\x20%s',_0x541ba0,_0x3d5a('0x15'),JSON[_0x3d5a('0x17')](_0x218eb7));if(_0x218eb7[_0x3d5a('0x18')]){if(_0x218eb7['error']['code']===0x1f4){logger[_0x3d5a('0x18')](_0x3d5a('0x14'),_0x541ba0,_0x218eb7[_0x3d5a('0x18')][_0x3d5a('0x19')]);return _0x335869(_0x218eb7[_0x3d5a('0x18')][_0x3d5a('0x19')]);}logger[_0x3d5a('0x18')](_0x3d5a('0x14'),_0x541ba0,_0x218eb7[_0x3d5a('0x18')][_0x3d5a('0x19')]);return _0x50a19c(_0x218eb7[_0x3d5a('0x18')][_0x3d5a('0x19')]);}else{logger[_0x3d5a('0x13')](_0x3d5a('0x14'),_0x541ba0,_0x3d5a('0x15'));_0x50a19c(_0x218eb7[_0x3d5a('0x1a')][_0x3d5a('0x19')]);}})[_0x3d5a('0x1b')](function(_0x3b4055){logger[_0x3d5a('0x18')](_0x3d5a('0x14'),_0x541ba0,_0x3b4055);_0x335869(_0x3b4055);});});} \ No newline at end of file diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 24ed3de..69b8c8e 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 _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 +var _0x2128=['length','team:','update','emit','register'];(function(_0x4b2089,_0x46f7d0){var _0x3e3485=function(_0x182bad){while(--_0x182bad){_0x4b2089['push'](_0x4b2089['shift']());}};_0x3e3485(++_0x46f7d0);}(_0x2128,0x1c9));var _0x8212=function(_0x41b2db,_0x4471a3){_0x41b2db=_0x41b2db-0x0;var _0x3e8830=_0x2128[_0x41b2db];return _0x3e8830;};'use strict';var TeamEvents=require('./team.events');var events=['save','remove',_0x8212('0x0')];function createListener(_0x9501da,_0x56c15f){return function(_0x350adf){_0x56c15f[_0x8212('0x1')](_0x9501da,_0x350adf);};}function removeListener(_0x434211,_0x2c3412){return function(){TeamEvents['removeListener'](_0x434211,_0x2c3412);};}exports[_0x8212('0x2')]=function(_0x1a52d4){for(var _0x4fa944=0x0,_0x19f876=events[_0x8212('0x3')];_0x4fa944<_0x19f876;_0x4fa944++){var _0x2ad391=events[_0x4fa944];var _0x121510=createListener(_0x8212('0x4')+_0x2ad391,_0x1a52d4);TeamEvents['on'](_0x2ad391,_0x121510);}}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/index.js b/server/api/teamVoiceQueue/index.js index 8e2c3b1..14819a8 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(_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 +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x4d55df,_0x3c658d){var _0xfd18b9=function(_0x48db52){while(--_0x48db52){_0x4d55df['push'](_0x4d55df['shift']());}};_0xfd18b9(++_0x3c658d);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x58dc25,_0x49b9d5){_0x58dc25=_0x58dc25-0x0;var _0x21b0a7=_0xcb91[_0x58dc25];return _0x21b0a7;};'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 diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js b/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js index e38a62d..6ab7946 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 _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 +var _0x2888=['sequelize','exports','INTEGER'];(function(_0x189c84,_0x2ab024){var _0x196a7e=function(_0x320e50){while(--_0x320e50){_0x189c84['push'](_0x189c84['shift']());}};_0x196a7e(++_0x2ab024);}(_0x2888,0x102));var _0x8288=function(_0x705b81,_0x190ee6){_0x705b81=_0x705b81-0x0;var _0x130e60=_0x2888[_0x705b81];return _0x130e60;};'use strict';var Sequelize=require(_0x8288('0x0'));module[_0x8288('0x1')]={'penalty':{'type':Sequelize[_0x8288('0x2')],'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 56e9c81..da0866c 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 _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 +var _0x8fed=['./teamVoiceQueue.attributes','exports','define','TeamVoiceQueue','team_has_voice_queues','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x2c94b2,_0x95826e){var _0x1f64c7=function(_0x1e298d){while(--_0x1e298d){_0x2c94b2['push'](_0x2c94b2['shift']());}};_0x1f64c7(++_0x95826e);}(_0x8fed,0xf5));var _0xd8fe=function(_0x3fceaa,_0x4153b2){_0x3fceaa=_0x3fceaa-0x0;var _0x2b2ca1=_0x8fed[_0x3fceaa];return _0x2b2ca1;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xd8fe('0x0'))(_0xd8fe('0x1'));var moment=require(_0xd8fe('0x2'));var BPromise=require(_0xd8fe('0x3'));var rp=require(_0xd8fe('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd8fe('0x5'));var config=require(_0xd8fe('0x6'));var attributes=require(_0xd8fe('0x7'));module[_0xd8fe('0x8')]=function(_0x2b4285,_0x54b0c9){return _0x2b4285[_0xd8fe('0x9')](_0xd8fe('0xa'),attributes,{'tableName':_0xd8fe('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 cefdc53..f19fe4e 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 _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 +var _0x9eb5=['ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','TeamVoiceQueue,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring'];(function(_0x36c14a,_0x3bc3ac){var _0xf3d9f5=function(_0x54bcca){while(--_0x54bcca){_0x36c14a['push'](_0x36c14a['shift']());}};_0xf3d9f5(++_0x3bc3ac);}(_0x9eb5,0x15d));var _0x59eb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9eb5[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x59eb('0x0'));var util=require(_0x59eb('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x59eb('0x2'));var fs=require('fs');var Redis=require(_0x59eb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x59eb('0x4'));var logger=require(_0x59eb('0x5'))(_0x59eb('0x6'));var config=require('../../config/environment');var jayson=require(_0x59eb('0x7'));var client=jayson[_0x59eb('0x8')][_0x59eb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1ea153,_0x37d45c,_0x3853e8){return new BPromise(function(_0x1ed195,_0x4c29c0){return client[_0x59eb('0xa')](_0x1ea153,_0x3853e8)[_0x59eb('0xb')](function(_0x4e68d8){logger[_0x59eb('0xc')]('TeamVoiceQueue,\x20%s,\x20%s',_0x37d45c,_0x59eb('0xd'));logger[_0x59eb('0xe')]('TeamVoiceQueue,\x20%s,\x20%s,\x20%s',_0x37d45c,'request\x20sent',JSON[_0x59eb('0xf')](_0x4e68d8));if(_0x4e68d8[_0x59eb('0x10')]){if(_0x4e68d8[_0x59eb('0x10')][_0x59eb('0x11')]===0x1f4){logger['error'](_0x59eb('0x12'),_0x37d45c,_0x4e68d8[_0x59eb('0x10')][_0x59eb('0x13')]);return _0x4c29c0(_0x4e68d8[_0x59eb('0x10')][_0x59eb('0x13')]);}logger[_0x59eb('0x10')](_0x59eb('0x12'),_0x37d45c,_0x4e68d8[_0x59eb('0x10')][_0x59eb('0x13')]);return _0x1ed195(_0x4e68d8['error'][_0x59eb('0x13')]);}else{logger['info']('TeamVoiceQueue,\x20%s,\x20%s',_0x37d45c,'request\x20sent');_0x1ed195(_0x4e68d8[_0x59eb('0x14')]['message']);}})[_0x59eb('0x15')](function(_0x3752d9){logger[_0x59eb('0x10')](_0x59eb('0x12'),_0x37d45c,_0x3752d9);_0x4c29c0(_0x3752d9);});});} \ No newline at end of file diff --git a/server/api/template/index.js b/server/api/template/index.js index 60c57f2..019a72b 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 _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 +var _0x1893=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./template.controller','get','isAuthenticated','index','/:id','show','put','update','delete','destroy','exports'];(function(_0x24061a,_0x1c9f4d){var _0x82054e=function(_0x2ec346){while(--_0x2ec346){_0x24061a['push'](_0x24061a['shift']());}};_0x82054e(++_0x1c9f4d);}(_0x1893,0xa2));var _0x3189=function(_0x5dff5b,_0x600c5d){_0x5dff5b=_0x5dff5b-0x0;var _0x34dd83=_0x1893[_0x5dff5b];return _0x34dd83;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3189('0x0'));var timeout=require(_0x3189('0x1'));var express=require(_0x3189('0x2'));var router=express[_0x3189('0x3')]();var fs_extra=require(_0x3189('0x4'));var auth=require(_0x3189('0x5'));var interaction=require(_0x3189('0x6'));var config=require('../../config/environment');var controller=require(_0x3189('0x7'));router[_0x3189('0x8')]('/',auth[_0x3189('0x9')](),controller[_0x3189('0xa')]);router[_0x3189('0x8')](_0x3189('0xb'),auth[_0x3189('0x9')](),controller[_0x3189('0xc')]);router['post']('/',auth[_0x3189('0x9')](),controller['create']);router[_0x3189('0xd')]('/:id',auth[_0x3189('0x9')](),controller[_0x3189('0xe')]);router[_0x3189('0xf')](_0x3189('0xb'),auth['isAuthenticated'](),controller[_0x3189('0x10')]);module[_0x3189('0x11')]=router; \ No newline at end of file diff --git a/server/api/template/template.attributes.js b/server/api/template/template.attributes.js index b161417..4c3352c 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 _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 +var _0xc7a5=['exports','STRING'];(function(_0x3eff40,_0x1cdf9e){var _0x4ee4fb=function(_0x4b7170){while(--_0x4b7170){_0x3eff40['push'](_0x3eff40['shift']());}};_0x4ee4fb(++_0x1cdf9e);}(_0xc7a5,0xf6));var _0x5c7a=function(_0x4ef2a4,_0xeaefc1){_0x4ef2a4=_0x4ef2a4-0x0;var _0x4d7c00=_0xc7a5[_0x4ef2a4];return _0x4d7c00;};'use strict';var Sequelize=require('sequelize');module[_0x5c7a('0x0')]={'name':{'type':Sequelize[_0x5c7a('0x1')]},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js index 52e7a96..9f5980a 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 _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 +var _0x849a=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','undefined','count','offset','limit','set','Content-Range','reject','update','then','get','Templates','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','Template','include','catch','show','includeAll','options','create','body','role','user','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','destroy','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','../../components/auth/service'];(function(_0x25efdf,_0x521462){var _0x22c495=function(_0x184469){while(--_0x184469){_0x25efdf['push'](_0x25efdf['shift']());}};_0x22c495(++_0x521462);}(_0x849a,0x1d6));var _0xa849=function(_0x1f3a1b,_0x4a74b5){_0x1f3a1b=_0x1f3a1b-0x0;var _0xdead0d=_0x849a[_0x1f3a1b];return _0xdead0d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa849('0x0'));var zipdir=require(_0xa849('0x1'));var jsonpatch=require(_0xa849('0x2'));var rp=require(_0xa849('0x3'));var moment=require(_0xa849('0x4'));var BPromise=require(_0xa849('0x5'));var Mustache=require(_0xa849('0x6'));var util=require(_0xa849('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xa849('0x8'));var ejs=require(_0xa849('0x9'));var fs=require('fs');var fs_extra=require(_0xa849('0xa'));var _=require(_0xa849('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xa849('0xc'));var deskjs=require(_0xa849('0xd'));var toCsv=require(_0xa849('0x8'));var querystring=require('querystring');var Papa=require(_0xa849('0xe'));var Redis=require('ioredis');var authService=require(_0xa849('0xf'));var qs=require(_0xa849('0x10'));var as=require(_0xa849('0x11'));var hardwareService=require(_0xa849('0x12'));var logger=require(_0xa849('0x13'))('api');var utils=require(_0xa849('0x14'));var config=require(_0xa849('0x15'));var licenseUtil=require(_0xa849('0x16'));var db=require(_0xa849('0x17'))['db'];function respondWithStatusCode(_0x64599,_0x484419){_0x484419=_0x484419||0xcc;return function(_0x54ffd8){if(_0x54ffd8){return _0x64599['sendStatus'](_0x484419);}return _0x64599[_0xa849('0x18')](_0x484419)[_0xa849('0x19')]();};}function respondWithResult(_0x502e2f,_0x4b623b){_0x4b623b=_0x4b623b||0xc8;return function(_0x260940){if(_0x260940){return _0x502e2f[_0xa849('0x18')](_0x4b623b)['json'](_0x260940);}};}function respondWithFilteredResult(_0xf7ea39,_0x46e752){return function(_0x37eb25){if(_0x37eb25){var _0x5cbc75=typeof _0x46e752['offset']===_0xa849('0x1a')&&typeof _0x46e752['limit']===_0xa849('0x1a');var _0x1d3ac7=_0x37eb25[_0xa849('0x1b')];var _0x4d5e5e=_0x5cbc75?0x0:_0x46e752['offset'];var _0x14ef5b=_0x5cbc75?_0x37eb25['count']:_0x46e752[_0xa849('0x1c')]+_0x46e752[_0xa849('0x1d')];var _0x1990a4;if(_0x14ef5b>=_0x1d3ac7){_0x14ef5b=_0x1d3ac7;_0x1990a4=0xc8;}else{_0x1990a4=0xce;}_0xf7ea39[_0xa849('0x18')](_0x1990a4);return _0xf7ea39[_0xa849('0x1e')](_0xa849('0x1f'),_0x4d5e5e+'-'+_0x14ef5b+'/'+_0x1d3ac7)['json'](_0x37eb25);}return null;};}function patchUpdates(_0xd89d3d){return function(_0x2df358){try{jsonpatch['apply'](_0x2df358,_0xd89d3d,!![]);}catch(_0xc2cc48){return BPromise[_0xa849('0x20')](_0xc2cc48);}return _0x2df358['save']();};}function saveUpdates(_0x90a310,_0x3f7f0a){return function(_0x1ca4af){if(_0x1ca4af){return _0x1ca4af[_0xa849('0x21')](_0x90a310)[_0xa849('0x22')](function(_0x119c9a){return _0x119c9a;});}return null;};}function removeEntity(_0x5ec28e,_0x523088){return function(_0x50e901){if(_0x50e901){return _0x50e901['destroy']()[_0xa849('0x22')](function(){var _0xd8bb6a=_0x50e901[_0xa849('0x23')]({'plain':!![]});var _0x2f64ad=_0xa849('0x24');return db['UserProfileResource']['destroy']({'where':{'type':_0x2f64ad,'resourceId':_0xd8bb6a['id']}})['then'](function(){return _0x50e901;});})['then'](function(){_0x5ec28e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x512273,_0x1e2d4d){return function(_0x298073){if(!_0x298073){_0x512273['sendStatus'](0x194);}return _0x298073;};}function handleError(_0x4eaaad,_0xdf8db0){_0xdf8db0=_0xdf8db0||0x1f4;return function(_0x38682c){logger['error'](_0x38682c[_0xa849('0x25')]);if(_0x38682c[_0xa849('0x26')]){delete _0x38682c[_0xa849('0x26')];}_0x4eaaad[_0xa849('0x18')](_0xdf8db0)[_0xa849('0x27')](_0x38682c);};}exports[_0xa849('0x28')]=function(_0x45d441,_0x957e6){var _0x31aab4={},_0xf3e5f4={},_0x2f3808={'count':0x0,'rows':[]};var _0x50c833=_[_0xa849('0x29')](db['Template'][_0xa849('0x2a')],function(_0x10a172){return{'name':_0x10a172[_0xa849('0x2b')],'type':_0x10a172[_0xa849('0x2c')][_0xa849('0x2d')]};});_0xf3e5f4[_0xa849('0x2e')]=_['map'](_0x50c833,_0xa849('0x26'));_0xf3e5f4[_0xa849('0x2f')]=_[_0xa849('0x30')](_0x45d441[_0xa849('0x2f')]);_0xf3e5f4[_0xa849('0x31')]=_[_0xa849('0x32')](_0xf3e5f4[_0xa849('0x2e')],_0xf3e5f4[_0xa849('0x2f')]);_0x31aab4['attributes']=_[_0xa849('0x32')](_0xf3e5f4[_0xa849('0x2e')],qs[_0xa849('0x33')](_0x45d441[_0xa849('0x2f')]['fields']));_0x31aab4['attributes']=_0x31aab4[_0xa849('0x34')][_0xa849('0x35')]?_0x31aab4[_0xa849('0x34')]:_0xf3e5f4[_0xa849('0x2e')];if(!_0x45d441[_0xa849('0x2f')][_0xa849('0x36')](_0xa849('0x37'))){_0x31aab4['limit']=qs[_0xa849('0x1d')](_0x45d441[_0xa849('0x2f')][_0xa849('0x1d')]);_0x31aab4[_0xa849('0x1c')]=qs[_0xa849('0x1c')](_0x45d441[_0xa849('0x2f')][_0xa849('0x1c')]);}_0x31aab4[_0xa849('0x38')]=qs[_0xa849('0x39')](_0x45d441[_0xa849('0x2f')]['sort']);_0x31aab4[_0xa849('0x3a')]=qs['filters'](_[_0xa849('0x3b')](_0x45d441[_0xa849('0x2f')],_0xf3e5f4['filters']),_0x50c833);if(_0x45d441['query']['filter']){_0x31aab4['where']=_[_0xa849('0x3c')](_0x31aab4[_0xa849('0x3a')],{'$or':_[_0xa849('0x29')](_0x50c833,function(_0x1fb47c){if(_0x1fb47c['type']!==_0xa849('0x3d')){var _0x4148c8={};_0x4148c8[_0x1fb47c[_0xa849('0x26')]]={'$like':'%'+_0x45d441[_0xa849('0x2f')]['filter']+'%'};return _0x4148c8;}})});}_0x31aab4=_['merge']({},_0x31aab4,_0x45d441['options']);var _0x259a85={'where':_0x31aab4[_0xa849('0x3a')]};return db[_0xa849('0x3e')][_0xa849('0x1b')](_0x259a85)['then'](function(_0x1d3d01){_0x2f3808[_0xa849('0x1b')]=_0x1d3d01;if(_0x45d441[_0xa849('0x2f')]['includeAll']){_0x31aab4[_0xa849('0x3f')]=[{'all':!![]}];}return db[_0xa849('0x3e')]['findAll'](_0x31aab4);})[_0xa849('0x22')](function(_0x5ebdf4){_0x2f3808['rows']=_0x5ebdf4;return _0x2f3808;})['then'](respondWithFilteredResult(_0x957e6,_0x31aab4))[_0xa849('0x40')](handleError(_0x957e6,null));};exports[_0xa849('0x41')]=function(_0x2d2e97,_0x56d88e){var _0x1515cc={'raw':!![],'where':{'id':_0x2d2e97['params']['id']}},_0xf4eeee={};_0xf4eeee[_0xa849('0x2e')]=_[_0xa849('0x30')](db['Template'][_0xa849('0x2a')]);_0xf4eeee[_0xa849('0x2f')]=_[_0xa849('0x30')](_0x2d2e97[_0xa849('0x2f')]);_0xf4eeee[_0xa849('0x31')]=_[_0xa849('0x32')](_0xf4eeee[_0xa849('0x2e')],_0xf4eeee[_0xa849('0x2f')]);_0x1515cc['attributes']=_[_0xa849('0x32')](_0xf4eeee[_0xa849('0x2e')],qs[_0xa849('0x33')](_0x2d2e97[_0xa849('0x2f')]['fields']));_0x1515cc[_0xa849('0x34')]=_0x1515cc['attributes']['length']?_0x1515cc[_0xa849('0x34')]:_0xf4eeee[_0xa849('0x2e')];if(_0x2d2e97[_0xa849('0x2f')][_0xa849('0x42')]){_0x1515cc[_0xa849('0x3f')]=[{'all':!![]}];}_0x1515cc=_[_0xa849('0x3c')]({},_0x1515cc,_0x2d2e97[_0xa849('0x43')]);return db[_0xa849('0x3e')]['find'](_0x1515cc)['then'](handleEntityNotFound(_0x56d88e,null))[_0xa849('0x22')](respondWithResult(_0x56d88e,null))[_0xa849('0x40')](handleError(_0x56d88e,null));};exports[_0xa849('0x44')]=function(_0x45bb24,_0x297074){return db[_0xa849('0x3e')]['create'](_0x45bb24[_0xa849('0x45')],{})[_0xa849('0x22')](function(_0x334522){var _0x4f30b0=_0x45bb24['user'][_0xa849('0x23')]({'plain':!![]});if(!_0x4f30b0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4f30b0[_0xa849('0x46')]===_0xa849('0x47')){var _0x5e13a4=_0x334522[_0xa849('0x23')]({'plain':!![]});var _0x339aaa=_0xa849('0x24');return db[_0xa849('0x48')][_0xa849('0x49')]({'where':{'name':_0x339aaa,'userProfileId':_0x4f30b0[_0xa849('0x4a')]},'raw':!![]})[_0xa849('0x22')](function(_0x48eeac){if(_0x48eeac&&_0x48eeac[_0xa849('0x4b')]===0x0){return db[_0xa849('0x4c')]['create']({'name':_0x5e13a4[_0xa849('0x26')],'resourceId':_0x5e13a4['id'],'type':_0x48eeac['name'],'sectionId':_0x48eeac['id']},{})['then'](function(){return _0x334522;});}else{return _0x334522;}})['catch'](function(_0x55377e){logger[_0xa849('0x4d')](_0xa849('0x4e'),_0x55377e);throw _0x55377e;});}return _0x334522;})[_0xa849('0x22')](respondWithResult(_0x297074,0xc9))['catch'](handleError(_0x297074,null));};exports['update']=function(_0x15d343,_0x5be029){if(_0x15d343[_0xa849('0x45')]['id']){delete _0x15d343[_0xa849('0x45')]['id'];}return db[_0xa849('0x3e')][_0xa849('0x49')]({'where':{'id':_0x15d343[_0xa849('0x4f')]['id']}})[_0xa849('0x22')](handleEntityNotFound(_0x5be029,null))[_0xa849('0x22')](saveUpdates(_0x15d343[_0xa849('0x45')],null))[_0xa849('0x22')](respondWithResult(_0x5be029,null))[_0xa849('0x40')](handleError(_0x5be029,null));};exports[_0xa849('0x50')]=function(_0x463ead,_0x2e10d1){return db[_0xa849('0x3e')][_0xa849('0x49')]({'where':{'id':_0x463ead[_0xa849('0x4f')]['id']}})[_0xa849('0x22')](handleEntityNotFound(_0x2e10d1,null))['then'](removeEntity(_0x2e10d1,null))[_0xa849('0x40')](handleError(_0x2e10d1,null));}; \ No newline at end of file diff --git a/server/api/template/template.model.js b/server/api/template/template.model.js index e32ed07..9d72883 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 _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 +var _0x09db=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','tools_templates','lodash','util'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x09db,0x1ec));var _0xb09d=function(_0xefd519,_0xc62635){_0xefd519=_0xefd519-0x0;var _0x4bb882=_0x09db[_0xefd519];return _0x4bb882;};'use strict';var _=require(_0xb09d('0x0'));var util=require(_0xb09d('0x1'));var logger=require(_0xb09d('0x2'))(_0xb09d('0x3'));var moment=require(_0xb09d('0x4'));var BPromise=require(_0xb09d('0x5'));var rp=require(_0xb09d('0x6'));var fs=require('fs');var path=require(_0xb09d('0x7'));var rimraf=require(_0xb09d('0x8'));var config=require(_0xb09d('0x9'));var attributes=require('./template.attributes');module[_0xb09d('0xa')]=function(_0x2ae0a6,_0x34c1e1){return _0x2ae0a6[_0xb09d('0xb')]('Template',attributes,{'tableName':_0xb09d('0xc'),'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 4bedf44..d9a1bb6 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 _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 +var _0x8e04=['../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','Template,\x20%s,\x20%s,\x20%s','error','code','Template,\x20%s,\x20%s','message','result','catch','GetTemplate','Template','findAll','options','where','attributes','limit','include','map','model','info','stringify','lodash','moment','bluebird','ioredis'];(function(_0x3544c6,_0x3aab67){var _0x27051f=function(_0x3bc271){while(--_0x3bc271){_0x3544c6['push'](_0x3544c6['shift']());}};_0x27051f(++_0x3aab67);}(_0x8e04,0x1ca));var _0x48e0=function(_0x2fc284,_0x5d271c){_0x2fc284=_0x2fc284-0x0;var _0x221234=_0x8e04[_0x2fc284];return _0x221234;};'use strict';var _=require(_0x48e0('0x0'));var util=require('util');var moment=require(_0x48e0('0x1'));var BPromise=require(_0x48e0('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x48e0('0x3'));var db=require(_0x48e0('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x48e0('0x5'))('rpc');var config=require(_0x48e0('0x6'));var jayson=require(_0x48e0('0x7'));var client=jayson[_0x48e0('0x8')][_0x48e0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1e4278,_0x4da792,_0x1763aa){return new BPromise(function(_0x209413,_0x342806){return client[_0x48e0('0xa')](_0x1e4278,_0x1763aa)[_0x48e0('0xb')](function(_0x59a224){logger['info']('Template,\x20%s,\x20%s',_0x4da792,_0x48e0('0xc'));logger[_0x48e0('0xd')](_0x48e0('0xe'),_0x4da792,_0x48e0('0xc'),JSON['stringify'](_0x59a224));if(_0x59a224[_0x48e0('0xf')]){if(_0x59a224['error'][_0x48e0('0x10')]===0x1f4){logger['error'](_0x48e0('0x11'),_0x4da792,_0x59a224[_0x48e0('0xf')][_0x48e0('0x12')]);return _0x342806(_0x59a224[_0x48e0('0xf')][_0x48e0('0x12')]);}logger[_0x48e0('0xf')](_0x48e0('0x11'),_0x4da792,_0x59a224['error']['message']);return _0x209413(_0x59a224[_0x48e0('0xf')]['message']);}else{logger['info'](_0x48e0('0x11'),_0x4da792,'request\x20sent');_0x209413(_0x59a224[_0x48e0('0x13')]['message']);}})[_0x48e0('0x14')](function(_0x5e0add){logger['error']('Template,\x20%s,\x20%s',_0x4da792,_0x5e0add);_0x342806(_0x5e0add);});});}exports[_0x48e0('0x15')]=function(_0x43d058){var _0x2dd31d=this;return new Promise(function(_0x358ced,_0x1c5e68){return db[_0x48e0('0x16')][_0x48e0('0x17')]({'raw':_0x43d058[_0x48e0('0x18')]?_0x43d058[_0x48e0('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x43d058[_0x48e0('0x18')]?_0x43d058[_0x48e0('0x18')][_0x48e0('0x19')]||null:null,'attributes':_0x43d058['options']?_0x43d058[_0x48e0('0x18')][_0x48e0('0x1a')]||null:null,'limit':_0x43d058[_0x48e0('0x18')]?_0x43d058[_0x48e0('0x18')][_0x48e0('0x1b')]||null:null,'include':_0x43d058[_0x48e0('0x18')]?_0x43d058['options'][_0x48e0('0x1c')]?_[_0x48e0('0x1d')](_0x43d058[_0x48e0('0x18')][_0x48e0('0x1c')],function(_0x419965){return{'model':db[_0x419965[_0x48e0('0x1e')]],'as':_0x419965['as'],'attributes':_0x419965[_0x48e0('0x1a')],'include':_0x419965[_0x48e0('0x1c')]?_[_0x48e0('0x1d')](_0x419965['include'],function(_0x30c00b){return{'model':db[_0x30c00b['model']],'as':_0x30c00b['as'],'attributes':_0x30c00b[_0x48e0('0x1a')],'include':_0x30c00b[_0x48e0('0x1c')]?_[_0x48e0('0x1d')](_0x30c00b[_0x48e0('0x1c')],function(_0x4a5adb){return{'model':db[_0x4a5adb[_0x48e0('0x1e')]],'as':_0x4a5adb['as'],'attributes':_0x4a5adb[_0x48e0('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x48e0('0xb')](function(_0x30b5dd){logger[_0x48e0('0x1f')](_0x48e0('0x15'),_0x43d058);logger[_0x48e0('0xd')](_0x48e0('0x15'),_0x43d058,JSON[_0x48e0('0x20')](_0x30b5dd));_0x358ced(_0x30b5dd);})[_0x48e0('0x14')](function(_0x15e3b0){logger['error'](_0x48e0('0x15'),_0x15e3b0[_0x48e0('0x12')],_0x43d058);_0x1c5e68(_0x2dd31d[_0x48e0('0xf')](0x1f4,_0x15e3b0[_0x48e0('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index 8ddb946..0fe6fcf 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 _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 +var _0xadfc=['multer','util','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./trigger.controller','isAuthenticated','index','get','/:id','/:id/all_conditions','/:id/any_conditions','getAnyConditions','/:id/actions','getActions','post','addAnyCondition','addAction','put','update','delete','destroy','exports'];(function(_0x4a3975,_0x2a58e){var _0x42b621=function(_0x4a4a99){while(--_0x4a4a99){_0x4a3975['push'](_0x4a3975['shift']());}};_0x42b621(++_0x2a58e);}(_0xadfc,0xc8));var _0xcadf=function(_0x4fc9e6,_0xc51915){_0x4fc9e6=_0x4fc9e6-0x0;var _0x551d28=_0xadfc[_0x4fc9e6];return _0x551d28;};'use strict';var multer=require(_0xcadf('0x0'));var util=require(_0xcadf('0x1'));var path=require('path');var timeout=require(_0xcadf('0x2'));var express=require(_0xcadf('0x3'));var router=express['Router']();var fs_extra=require(_0xcadf('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xcadf('0x5'));var config=require(_0xcadf('0x6'));var controller=require(_0xcadf('0x7'));router['get']('/',auth[_0xcadf('0x8')](),controller[_0xcadf('0x9')]);router[_0xcadf('0xa')](_0xcadf('0xb'),auth[_0xcadf('0x8')](),controller['show']);router[_0xcadf('0xa')](_0xcadf('0xc'),auth[_0xcadf('0x8')](),controller['getAllConditions']);router[_0xcadf('0xa')](_0xcadf('0xd'),auth[_0xcadf('0x8')](),controller[_0xcadf('0xe')]);router['get'](_0xcadf('0xf'),auth[_0xcadf('0x8')](),controller[_0xcadf('0x10')]);router[_0xcadf('0x11')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0xcadf('0xc'),auth[_0xcadf('0x8')](),controller['addAllCondition']);router[_0xcadf('0x11')](_0xcadf('0xd'),auth['isAuthenticated'](),controller[_0xcadf('0x12')]);router[_0xcadf('0x11')](_0xcadf('0xf'),auth['isAuthenticated'](),controller[_0xcadf('0x13')]);router[_0xcadf('0x14')](_0xcadf('0xb'),auth[_0xcadf('0x8')](),controller[_0xcadf('0x15')]);router[_0xcadf('0x16')](_0xcadf('0xb'),auth[_0xcadf('0x8')](),controller[_0xcadf('0x17')]);module[_0xcadf('0x18')]=router; \ No newline at end of file diff --git a/server/api/trigger/trigger.attributes.js b/server/api/trigger/trigger.attributes.js index 1e0f7c2..5b09d44 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 _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 +var _0xceb9=['sequelize','exports','STRING','BOOLEAN'];(function(_0x2a8e59,_0x3f9b8b){var _0x279df4=function(_0x2ac5cc){while(--_0x2ac5cc){_0x2a8e59['push'](_0x2a8e59['shift']());}};_0x279df4(++_0x3f9b8b);}(_0xceb9,0x144));var _0x9ceb=function(_0x30046e,_0x3ef0c7){_0x30046e=_0x30046e-0x0;var _0x558836=_0xceb9[_0x30046e];return _0x558836;};'use strict';var Sequelize=require(_0x9ceb('0x0'));module[_0x9ceb('0x1')]={'name':{'type':Sequelize[_0x9ceb('0x2')]},'channel':{'type':Sequelize[_0x9ceb('0x2')]},'description':{'type':Sequelize[_0x9ceb('0x2')]},'status':{'type':Sequelize[_0x9ceb('0x3')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index f48145b..024c219 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 _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 +var _0x67bc=['send','index','map','Trigger','rawAttributes','fieldName','type','key','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','includeAll','include','catch','params','keys','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','addAllCondition','TriggerAllId','addAnyCondition','Condition','getAllConditions','findOne','pick','getAnyConditions','Action','getActions','eml-format','rimraf','zip-dir','request-promise','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','get','Triggers','UserProfileResource','error','stack','name'];(function(_0x1e6db3,_0x5643ac){var _0x1de886=function(_0x351318){while(--_0x351318){_0x1e6db3['push'](_0x1e6db3['shift']());}};_0x1de886(++_0x5643ac);}(_0x67bc,0x13f));var _0xc67b=function(_0x5499ab,_0x4c1128){_0x5499ab=_0x5499ab-0x0;var _0x344478=_0x67bc[_0x5499ab];return _0x344478;};'use strict';var emlformat=require(_0xc67b('0x0'));var rimraf=require(_0xc67b('0x1'));var zipdir=require(_0xc67b('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc67b('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xc67b('0x4'));var util=require('util');var path=require('path');var sox=require(_0xc67b('0x5'));var csv=require(_0xc67b('0x6'));var ejs=require(_0xc67b('0x7'));var fs=require('fs');var fs_extra=require(_0xc67b('0x8'));var _=require(_0xc67b('0x9'));var squel=require(_0xc67b('0xa'));var crypto=require('crypto');var jsforce=require(_0xc67b('0xb'));var deskjs=require(_0xc67b('0xc'));var toCsv=require(_0xc67b('0x6'));var querystring=require(_0xc67b('0xd'));var Papa=require(_0xc67b('0xe'));var Redis=require(_0xc67b('0xf'));var authService=require(_0xc67b('0x10'));var qs=require(_0xc67b('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xc67b('0x12'))(_0xc67b('0x13'));var utils=require(_0xc67b('0x14'));var config=require(_0xc67b('0x15'));var licenseUtil=require(_0xc67b('0x16'));var db=require(_0xc67b('0x17'))['db'];function respondWithStatusCode(_0x2b2b1e,_0x5ec1b4){_0x5ec1b4=_0x5ec1b4||0xcc;return function(_0x5eadc5){if(_0x5eadc5){return _0x2b2b1e[_0xc67b('0x18')](_0x5ec1b4);}return _0x2b2b1e[_0xc67b('0x19')](_0x5ec1b4)['end']();};}function respondWithResult(_0x2aeee9,_0x255d40){_0x255d40=_0x255d40||0xc8;return function(_0x135e04){if(_0x135e04){return _0x2aeee9['status'](_0x255d40)[_0xc67b('0x1a')](_0x135e04);}};}function respondWithFilteredResult(_0x1e8726,_0x1879bf){return function(_0x322f84){if(_0x322f84){var _0x5d7246=typeof _0x1879bf[_0xc67b('0x1b')]===_0xc67b('0x1c')&&typeof _0x1879bf[_0xc67b('0x1d')]==='undefined';var _0x1b85c8=_0x322f84[_0xc67b('0x1e')];var _0x481d6e=_0x5d7246?0x0:_0x1879bf[_0xc67b('0x1b')];var _0x50eb58=_0x5d7246?_0x322f84[_0xc67b('0x1e')]:_0x1879bf['offset']+_0x1879bf['limit'];var _0x2fd58b;if(_0x50eb58>=_0x1b85c8){_0x50eb58=_0x1b85c8;_0x2fd58b=0xc8;}else{_0x2fd58b=0xce;}_0x1e8726['status'](_0x2fd58b);return _0x1e8726[_0xc67b('0x1f')](_0xc67b('0x20'),_0x481d6e+'-'+_0x50eb58+'/'+_0x1b85c8)[_0xc67b('0x1a')](_0x322f84);}return null;};}function patchUpdates(_0x40bd17){return function(_0x2c785c){try{jsonpatch[_0xc67b('0x21')](_0x2c785c,_0x40bd17,!![]);}catch(_0x2fa84b){return BPromise[_0xc67b('0x22')](_0x2fa84b);}return _0x2c785c[_0xc67b('0x23')]();};}function saveUpdates(_0x76dc12,_0x343c1d){return function(_0x5b7224){if(_0x5b7224){return _0x5b7224[_0xc67b('0x24')](_0x76dc12)['then'](function(_0x28a5a3){return _0x28a5a3;});}return null;};}function removeEntity(_0x3692e8,_0x45e597){return function(_0x45779c){if(_0x45779c){return _0x45779c[_0xc67b('0x25')]()[_0xc67b('0x26')](function(){var _0x26f992=_0x45779c[_0xc67b('0x27')]({'plain':!![]});var _0x22d7c9=_0xc67b('0x28');return db[_0xc67b('0x29')][_0xc67b('0x25')]({'where':{'type':_0x22d7c9,'resourceId':_0x26f992['id']}})['then'](function(){return _0x45779c;});})[_0xc67b('0x26')](function(){_0x3692e8[_0xc67b('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5441eb,_0x5bd87e){return function(_0x5b031b){if(!_0x5b031b){_0x5441eb[_0xc67b('0x18')](0x194);}return _0x5b031b;};}function handleError(_0x545eb8,_0x2742be){_0x2742be=_0x2742be||0x1f4;return function(_0xd78d3){logger[_0xc67b('0x2a')](_0xd78d3[_0xc67b('0x2b')]);if(_0xd78d3[_0xc67b('0x2c')]){delete _0xd78d3['name'];}_0x545eb8[_0xc67b('0x19')](_0x2742be)[_0xc67b('0x2d')](_0xd78d3);};}exports[_0xc67b('0x2e')]=function(_0x2a8b88,_0x30c914){var _0x2b511d={},_0x867fbd={},_0x385c79={'count':0x0,'rows':[]};var _0x3e6a8a=_[_0xc67b('0x2f')](db[_0xc67b('0x30')][_0xc67b('0x31')],function(_0x158fc3){return{'name':_0x158fc3[_0xc67b('0x32')],'type':_0x158fc3[_0xc67b('0x33')][_0xc67b('0x34')]};});_0x867fbd['model']=_[_0xc67b('0x2f')](_0x3e6a8a,'name');_0x867fbd[_0xc67b('0x35')]=_['keys'](_0x2a8b88[_0xc67b('0x35')]);_0x867fbd[_0xc67b('0x36')]=_[_0xc67b('0x37')](_0x867fbd['model'],_0x867fbd['query']);_0x2b511d['attributes']=_[_0xc67b('0x37')](_0x867fbd[_0xc67b('0x38')],qs[_0xc67b('0x39')](_0x2a8b88[_0xc67b('0x35')]['fields']));_0x2b511d['attributes']=_0x2b511d[_0xc67b('0x3a')][_0xc67b('0x3b')]?_0x2b511d['attributes']:_0x867fbd[_0xc67b('0x38')];if(!_0x2a8b88[_0xc67b('0x35')][_0xc67b('0x3c')](_0xc67b('0x3d'))){_0x2b511d[_0xc67b('0x1d')]=qs[_0xc67b('0x1d')](_0x2a8b88[_0xc67b('0x35')][_0xc67b('0x1d')]);_0x2b511d['offset']=qs[_0xc67b('0x1b')](_0x2a8b88[_0xc67b('0x35')][_0xc67b('0x1b')]);}_0x2b511d[_0xc67b('0x3e')]=qs[_0xc67b('0x3f')](_0x2a8b88['query'][_0xc67b('0x3f')]);_0x2b511d[_0xc67b('0x40')]=qs[_0xc67b('0x36')](_['pick'](_0x2a8b88[_0xc67b('0x35')],_0x867fbd[_0xc67b('0x36')]),_0x3e6a8a);if(_0x2a8b88['query'][_0xc67b('0x41')]){_0x2b511d[_0xc67b('0x40')]=_[_0xc67b('0x42')](_0x2b511d[_0xc67b('0x40')],{'$or':_[_0xc67b('0x2f')](_0x3e6a8a,function(_0x1761a7){if(_0x1761a7[_0xc67b('0x33')]!==_0xc67b('0x43')){var _0x418463={};_0x418463[_0x1761a7[_0xc67b('0x2c')]]={'$like':'%'+_0x2a8b88[_0xc67b('0x35')][_0xc67b('0x41')]+'%'};return _0x418463;}})});}_0x2b511d=_[_0xc67b('0x42')]({},_0x2b511d,_0x2a8b88['options']);var _0x312aa4={'where':_0x2b511d['where']};return db[_0xc67b('0x30')][_0xc67b('0x1e')](_0x312aa4)[_0xc67b('0x26')](function(_0x35dd45){_0x385c79[_0xc67b('0x1e')]=_0x35dd45;if(_0x2a8b88[_0xc67b('0x35')][_0xc67b('0x44')]){_0x2b511d[_0xc67b('0x45')]=[{'all':!![]}];}return db['Trigger']['findAll'](_0x2b511d);})[_0xc67b('0x26')](function(_0x7eef0a){_0x385c79['rows']=_0x7eef0a;return _0x385c79;})[_0xc67b('0x26')](respondWithFilteredResult(_0x30c914,_0x2b511d))[_0xc67b('0x46')](handleError(_0x30c914,null));};exports['show']=function(_0x1b0867,_0x4360a4){var _0xbcfb5a={'raw':![],'where':{'id':_0x1b0867[_0xc67b('0x47')]['id']}},_0x4efc2f={};_0x4efc2f[_0xc67b('0x38')]=_[_0xc67b('0x48')](db[_0xc67b('0x30')]['rawAttributes']);_0x4efc2f['query']=_[_0xc67b('0x48')](_0x1b0867[_0xc67b('0x35')]);_0x4efc2f['filters']=_[_0xc67b('0x37')](_0x4efc2f[_0xc67b('0x38')],_0x4efc2f[_0xc67b('0x35')]);_0xbcfb5a[_0xc67b('0x3a')]=_[_0xc67b('0x37')](_0x4efc2f[_0xc67b('0x38')],qs[_0xc67b('0x39')](_0x1b0867[_0xc67b('0x35')][_0xc67b('0x39')]));_0xbcfb5a[_0xc67b('0x3a')]=_0xbcfb5a[_0xc67b('0x3a')][_0xc67b('0x3b')]?_0xbcfb5a[_0xc67b('0x3a')]:_0x4efc2f[_0xc67b('0x38')];if(_0x1b0867[_0xc67b('0x35')]['includeAll']){_0xbcfb5a[_0xc67b('0x45')]=[{'all':!![]}];}_0xbcfb5a=_[_0xc67b('0x42')]({},_0xbcfb5a,_0x1b0867[_0xc67b('0x49')]);return db[_0xc67b('0x30')][_0xc67b('0x4a')](_0xbcfb5a)[_0xc67b('0x26')](handleEntityNotFound(_0x4360a4,null))[_0xc67b('0x26')](respondWithResult(_0x4360a4,null))[_0xc67b('0x46')](handleError(_0x4360a4,null));};exports[_0xc67b('0x4b')]=function(_0x591ae6,_0x358bf6){return db[_0xc67b('0x30')]['create'](_0x591ae6[_0xc67b('0x4c')],{})[_0xc67b('0x26')](function(_0x1f215d){var _0x434ab9=_0x591ae6['user'][_0xc67b('0x27')]({'plain':!![]});if(!_0x434ab9)throw new Error(_0xc67b('0x4d'));if(_0x434ab9[_0xc67b('0x4e')]===_0xc67b('0x4f')){var _0x33b7cb=_0x1f215d['get']({'plain':!![]});var _0x26feb4='Triggers';return db[_0xc67b('0x50')][_0xc67b('0x4a')]({'where':{'name':_0x26feb4,'userProfileId':_0x434ab9['userProfileId']},'raw':!![]})['then'](function(_0x136f98){if(_0x136f98&&_0x136f98['autoAssociation']===0x0){return db[_0xc67b('0x29')][_0xc67b('0x4b')]({'name':_0x33b7cb[_0xc67b('0x2c')],'resourceId':_0x33b7cb['id'],'type':_0x136f98['name'],'sectionId':_0x136f98['id']},{})[_0xc67b('0x26')](function(){return _0x1f215d;});}else{return _0x1f215d;}})[_0xc67b('0x46')](function(_0x2af3d0){logger[_0xc67b('0x2a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2af3d0);throw _0x2af3d0;});}return _0x1f215d;})[_0xc67b('0x26')](respondWithResult(_0x358bf6,0xc9))['catch'](handleError(_0x358bf6,null));};exports[_0xc67b('0x24')]=function(_0x1b4538,_0x11d8cb){if(_0x1b4538['body']['id']){delete _0x1b4538[_0xc67b('0x4c')]['id'];}return db[_0xc67b('0x30')][_0xc67b('0x4a')]({'where':{'id':_0x1b4538[_0xc67b('0x47')]['id']}})[_0xc67b('0x26')](handleEntityNotFound(_0x11d8cb,null))['then'](saveUpdates(_0x1b4538[_0xc67b('0x4c')],null))[_0xc67b('0x26')](respondWithResult(_0x11d8cb,null))['catch'](handleError(_0x11d8cb,null));};exports[_0xc67b('0x25')]=function(_0x87717c,_0x474fcd){return db['Trigger'][_0xc67b('0x4a')]({'where':{'id':_0x87717c[_0xc67b('0x47')]['id']}})[_0xc67b('0x26')](handleEntityNotFound(_0x474fcd,null))[_0xc67b('0x26')](removeEntity(_0x474fcd,null))[_0xc67b('0x46')](handleError(_0x474fcd,null));};exports[_0xc67b('0x51')]=function(_0x2760e3,_0x3b6612,_0x2479b8){if(_0x2760e3[_0xc67b('0x4c')]['id']){delete _0x2760e3['body']['id'];}return db[_0xc67b('0x30')][_0xc67b('0x4a')]({'where':{'id':_0x2760e3[_0xc67b('0x47')]['id']}})[_0xc67b('0x26')](handleEntityNotFound(_0x3b6612,null))['then'](function(_0x5cc5f6){if(_0x5cc5f6){_0x2760e3[_0xc67b('0x4c')][_0xc67b('0x52')]=_0x5cc5f6['id'];return db['Condition'][_0xc67b('0x4b')](_0x2760e3['body']);}})[_0xc67b('0x26')](respondWithResult(_0x3b6612,null))[_0xc67b('0x46')](handleError(_0x3b6612,null));};exports[_0xc67b('0x53')]=function(_0x4ab716,_0x30b2a0,_0x2073f9){if(_0x4ab716[_0xc67b('0x4c')]['id']){delete _0x4ab716[_0xc67b('0x4c')]['id'];}return db[_0xc67b('0x30')][_0xc67b('0x4a')]({'where':{'id':_0x4ab716['params']['id']}})[_0xc67b('0x26')](handleEntityNotFound(_0x30b2a0,null))[_0xc67b('0x26')](function(_0x2d24be){if(_0x2d24be){_0x4ab716[_0xc67b('0x4c')]['TriggerAnyId']=_0x2d24be['id'];return db[_0xc67b('0x54')][_0xc67b('0x4b')](_0x4ab716['body']);}})[_0xc67b('0x26')](respondWithResult(_0x30b2a0,null))[_0xc67b('0x46')](handleError(_0x30b2a0,null));};exports[_0xc67b('0x55')]=function(_0xac3548,_0xa7b8d6,_0x581e44){var _0x2531df={};var _0x1c0409={};var _0xb8ceae;var _0x1de557;return db[_0xc67b('0x30')][_0xc67b('0x56')]({'where':{'id':_0xac3548['params']['id']}})['then'](handleEntityNotFound(_0xa7b8d6,null))[_0xc67b('0x26')](function(_0x39c19e){if(_0x39c19e){_0xb8ceae=_0x39c19e;_0x1c0409[_0xc67b('0x38')]=_[_0xc67b('0x48')](db[_0xc67b('0x54')]['rawAttributes']);_0x1c0409[_0xc67b('0x35')]=_['keys'](_0xac3548[_0xc67b('0x35')]);_0x1c0409[_0xc67b('0x36')]=_['intersection'](_0x1c0409[_0xc67b('0x38')],_0x1c0409[_0xc67b('0x35')]);_0x2531df['attributes']=_[_0xc67b('0x37')](_0x1c0409[_0xc67b('0x38')],qs['fields'](_0xac3548[_0xc67b('0x35')][_0xc67b('0x39')]));_0x2531df['attributes']=_0x2531df[_0xc67b('0x3a')]['length']?_0x2531df[_0xc67b('0x3a')]:_0x1c0409[_0xc67b('0x38')];_0x2531df[_0xc67b('0x3e')]=qs[_0xc67b('0x3f')](_0xac3548[_0xc67b('0x35')][_0xc67b('0x3f')]);_0x2531df['where']=qs['filters'](_[_0xc67b('0x57')](_0xac3548['query'],_0x1c0409[_0xc67b('0x36')]));if(_0xac3548[_0xc67b('0x35')][_0xc67b('0x41')]){_0x2531df[_0xc67b('0x40')]=_[_0xc67b('0x42')](_0x2531df[_0xc67b('0x40')],{'$or':_[_0xc67b('0x2f')](_0x2531df[_0xc67b('0x3a')],function(_0x23ac98){var _0x231aff={};_0x231aff[_0x23ac98]={'$like':'%'+_0xac3548[_0xc67b('0x35')][_0xc67b('0x41')]+'%'};return _0x231aff;})});}_0x2531df=_['merge']({},_0x2531df,_0xac3548[_0xc67b('0x49')]);return _0xb8ceae[_0xc67b('0x55')](_0x2531df);}})['then'](function(_0x37751e){if(_0x37751e){_0x1de557=_0x37751e['length'];if(!_0xac3548[_0xc67b('0x35')][_0xc67b('0x3c')]('nolimit')){_0x2531df['limit']=qs[_0xc67b('0x1d')](_0xac3548[_0xc67b('0x35')][_0xc67b('0x1d')]);_0x2531df[_0xc67b('0x1b')]=qs[_0xc67b('0x1b')](_0xac3548[_0xc67b('0x35')][_0xc67b('0x1b')]);}return _0xb8ceae[_0xc67b('0x55')](_0x2531df);}})['then'](function(_0x485f3f){if(_0x485f3f){return _0x485f3f?{'count':_0x1de557,'rows':_0x485f3f}:null;}})[_0xc67b('0x26')](respondWithResult(_0xa7b8d6,null))[_0xc67b('0x46')](handleError(_0xa7b8d6,null));};exports[_0xc67b('0x58')]=function(_0x1450a5,_0x4d1c31,_0x1a6974){var _0x217f00={};var _0x43c7a4={};var _0x581cc1;var _0x404aa9;return db['Trigger'][_0xc67b('0x56')]({'where':{'id':_0x1450a5['params']['id']}})['then'](handleEntityNotFound(_0x4d1c31,null))[_0xc67b('0x26')](function(_0x5b7c1a){if(_0x5b7c1a){_0x581cc1=_0x5b7c1a;_0x43c7a4[_0xc67b('0x38')]=_[_0xc67b('0x48')](db[_0xc67b('0x54')][_0xc67b('0x31')]);_0x43c7a4[_0xc67b('0x35')]=_[_0xc67b('0x48')](_0x1450a5[_0xc67b('0x35')]);_0x43c7a4[_0xc67b('0x36')]=_[_0xc67b('0x37')](_0x43c7a4[_0xc67b('0x38')],_0x43c7a4['query']);_0x217f00[_0xc67b('0x3a')]=_['intersection'](_0x43c7a4[_0xc67b('0x38')],qs['fields'](_0x1450a5[_0xc67b('0x35')][_0xc67b('0x39')]));_0x217f00[_0xc67b('0x3a')]=_0x217f00[_0xc67b('0x3a')][_0xc67b('0x3b')]?_0x217f00[_0xc67b('0x3a')]:_0x43c7a4[_0xc67b('0x38')];_0x217f00[_0xc67b('0x3e')]=qs['sort'](_0x1450a5['query'][_0xc67b('0x3f')]);_0x217f00[_0xc67b('0x40')]=qs[_0xc67b('0x36')](_['pick'](_0x1450a5['query'],_0x43c7a4[_0xc67b('0x36')]));if(_0x1450a5['query'][_0xc67b('0x41')]){_0x217f00[_0xc67b('0x40')]=_['merge'](_0x217f00[_0xc67b('0x40')],{'$or':_['map'](_0x217f00['attributes'],function(_0x1864e5){var _0x50e796={};_0x50e796[_0x1864e5]={'$like':'%'+_0x1450a5[_0xc67b('0x35')][_0xc67b('0x41')]+'%'};return _0x50e796;})});}_0x217f00=_[_0xc67b('0x42')]({},_0x217f00,_0x1450a5[_0xc67b('0x49')]);return _0x581cc1[_0xc67b('0x58')](_0x217f00);}})[_0xc67b('0x26')](function(_0x2ad3f6){if(_0x2ad3f6){_0x404aa9=_0x2ad3f6[_0xc67b('0x3b')];if(!_0x1450a5['query'][_0xc67b('0x3c')](_0xc67b('0x3d'))){_0x217f00[_0xc67b('0x1d')]=qs[_0xc67b('0x1d')](_0x1450a5[_0xc67b('0x35')][_0xc67b('0x1d')]);_0x217f00[_0xc67b('0x1b')]=qs[_0xc67b('0x1b')](_0x1450a5[_0xc67b('0x35')][_0xc67b('0x1b')]);}return _0x581cc1['getAnyConditions'](_0x217f00);}})['then'](function(_0x31fa4c){if(_0x31fa4c){return _0x31fa4c?{'count':_0x404aa9,'rows':_0x31fa4c}:null;}})[_0xc67b('0x26')](respondWithResult(_0x4d1c31,null))[_0xc67b('0x46')](handleError(_0x4d1c31,null));};exports['addAction']=function(_0x3a383d,_0x249ba7,_0x1a5252){if(_0x3a383d[_0xc67b('0x4c')]['id']){delete _0x3a383d[_0xc67b('0x4c')]['id'];}return db['Trigger'][_0xc67b('0x4a')]({'where':{'id':_0x3a383d[_0xc67b('0x47')]['id']}})['then'](handleEntityNotFound(_0x249ba7,null))[_0xc67b('0x26')](function(_0x2f5965){if(_0x2f5965){_0x3a383d[_0xc67b('0x4c')]['TriggerId']=_0x2f5965['id'];return db[_0xc67b('0x59')][_0xc67b('0x4b')](_0x3a383d[_0xc67b('0x4c')]);}})[_0xc67b('0x26')](respondWithResult(_0x249ba7,null))[_0xc67b('0x46')](handleError(_0x249ba7,null));};exports[_0xc67b('0x5a')]=function(_0x4c7bdc,_0x25fd35,_0x5ae522){var _0x10c6e0={};var _0x3abf96={};var _0x159b9b;var _0x5c0879;return db[_0xc67b('0x30')][_0xc67b('0x56')]({'where':{'id':_0x4c7bdc[_0xc67b('0x47')]['id']}})[_0xc67b('0x26')](handleEntityNotFound(_0x25fd35,null))[_0xc67b('0x26')](function(_0x5e3c22){if(_0x5e3c22){_0x159b9b=_0x5e3c22;_0x3abf96[_0xc67b('0x38')]=_[_0xc67b('0x48')](db[_0xc67b('0x59')][_0xc67b('0x31')]);_0x3abf96[_0xc67b('0x35')]=_[_0xc67b('0x48')](_0x4c7bdc['query']);_0x3abf96[_0xc67b('0x36')]=_[_0xc67b('0x37')](_0x3abf96['model'],_0x3abf96['query']);_0x10c6e0[_0xc67b('0x3a')]=_[_0xc67b('0x37')](_0x3abf96['model'],qs['fields'](_0x4c7bdc[_0xc67b('0x35')][_0xc67b('0x39')]));_0x10c6e0[_0xc67b('0x3a')]=_0x10c6e0['attributes'][_0xc67b('0x3b')]?_0x10c6e0[_0xc67b('0x3a')]:_0x3abf96['model'];_0x10c6e0[_0xc67b('0x3e')]=qs[_0xc67b('0x3f')](_0x4c7bdc['query'][_0xc67b('0x3f')]);_0x10c6e0[_0xc67b('0x40')]=qs[_0xc67b('0x36')](_[_0xc67b('0x57')](_0x4c7bdc[_0xc67b('0x35')],_0x3abf96['filters']));if(_0x4c7bdc[_0xc67b('0x35')][_0xc67b('0x41')]){_0x10c6e0['where']=_['merge'](_0x10c6e0[_0xc67b('0x40')],{'$or':_[_0xc67b('0x2f')](_0x10c6e0['attributes'],function(_0x197f03){var _0x2e40c5={};_0x2e40c5[_0x197f03]={'$like':'%'+_0x4c7bdc['query'][_0xc67b('0x41')]+'%'};return _0x2e40c5;})});}_0x10c6e0=_[_0xc67b('0x42')]({},_0x10c6e0,_0x4c7bdc[_0xc67b('0x49')]);return _0x159b9b[_0xc67b('0x5a')](_0x10c6e0);}})['then'](function(_0x36f562){if(_0x36f562){_0x5c0879=_0x36f562[_0xc67b('0x3b')];if(!_0x4c7bdc['query'][_0xc67b('0x3c')](_0xc67b('0x3d'))){_0x10c6e0['limit']=qs['limit'](_0x4c7bdc[_0xc67b('0x35')][_0xc67b('0x1d')]);_0x10c6e0[_0xc67b('0x1b')]=qs['offset'](_0x4c7bdc[_0xc67b('0x35')][_0xc67b('0x1b')]);}return _0x159b9b['getActions'](_0x10c6e0);}})['then'](function(_0x453d32){if(_0x453d32){return _0x453d32?{'count':_0x5c0879,'rows':_0x453d32}:null;}})[_0xc67b('0x26')](respondWithResult(_0x25fd35,null))['catch'](handleError(_0x25fd35,null));}; \ No newline at end of file diff --git a/server/api/trigger/trigger.model.js b/server/api/trigger/trigger.model.js index 5b5cd5e..72fd99f 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 _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 +var _0x1da6=['exports','define','Trigger','tools_triggers','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./trigger.attributes'];(function(_0x3fc97b,_0x20ca29){var _0x3a0c82=function(_0x1c15ec){while(--_0x1c15ec){_0x3fc97b['push'](_0x3fc97b['shift']());}};_0x3a0c82(++_0x20ca29);}(_0x1da6,0x7c));var _0x61da=function(_0x1d2e5e,_0x145ae6){_0x1d2e5e=_0x1d2e5e-0x0;var _0x4a1d68=_0x1da6[_0x1d2e5e];return _0x4a1d68;};'use strict';var _=require(_0x61da('0x0'));var util=require(_0x61da('0x1'));var logger=require(_0x61da('0x2'))(_0x61da('0x3'));var moment=require(_0x61da('0x4'));var BPromise=require(_0x61da('0x5'));var rp=require(_0x61da('0x6'));var fs=require('fs');var path=require(_0x61da('0x7'));var rimraf=require(_0x61da('0x8'));var config=require(_0x61da('0x9'));var attributes=require(_0x61da('0xa'));module[_0x61da('0xb')]=function(_0x16cd66,_0x2c40c6){return _0x16cd66[_0x61da('0xc')](_0x61da('0xd'),attributes,{'tableName':_0x61da('0xe'),'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 e30ffea..32ba2ef 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 _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 +var _0x7af8=['Trigger,\x20%s,\x20%s','request\x20sent','Trigger,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetTrigger','Trigger','options','raw','where','attributes','limit','include','map','model','then','ShowTrigger','find','debug','lodash','util','moment','bluebird','randomstring','../../config/logger','rpc','client','http','request','info'];(function(_0x156696,_0x3a9a2e){var _0x5ab7c4=function(_0x26179a){while(--_0x26179a){_0x156696['push'](_0x156696['shift']());}};_0x5ab7c4(++_0x3a9a2e);}(_0x7af8,0x95));var _0x87af=function(_0x255232,_0x140aa3){_0x255232=_0x255232-0x0;var _0x19a7f3=_0x7af8[_0x255232];return _0x19a7f3;};'use strict';var _=require(_0x87af('0x0'));var util=require(_0x87af('0x1'));var moment=require(_0x87af('0x2'));var BPromise=require(_0x87af('0x3'));var rs=require(_0x87af('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x87af('0x5'))(_0x87af('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x87af('0x7')][_0x87af('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1d601f,_0x1f9368,_0x5666ed){return new BPromise(function(_0x29cd17,_0x286891){return client[_0x87af('0x9')](_0x1d601f,_0x5666ed)['then'](function(_0x2f9363){logger[_0x87af('0xa')](_0x87af('0xb'),_0x1f9368,_0x87af('0xc'));logger['debug'](_0x87af('0xd'),_0x1f9368,_0x87af('0xc'),JSON[_0x87af('0xe')](_0x2f9363));if(_0x2f9363[_0x87af('0xf')]){if(_0x2f9363['error']['code']===0x1f4){logger[_0x87af('0xf')](_0x87af('0xb'),_0x1f9368,_0x2f9363[_0x87af('0xf')][_0x87af('0x10')]);return _0x286891(_0x2f9363[_0x87af('0xf')][_0x87af('0x10')]);}logger[_0x87af('0xf')](_0x87af('0xb'),_0x1f9368,_0x2f9363[_0x87af('0xf')][_0x87af('0x10')]);return _0x29cd17(_0x2f9363[_0x87af('0xf')][_0x87af('0x10')]);}else{logger['info']('Trigger,\x20%s,\x20%s',_0x1f9368,_0x87af('0xc'));_0x29cd17(_0x2f9363['result'][_0x87af('0x10')]);}})[_0x87af('0x11')](function(_0x285238){logger[_0x87af('0xf')](_0x87af('0xb'),_0x1f9368,_0x285238);_0x286891(_0x285238);});});}exports[_0x87af('0x12')]=function(_0x2cd20d){var _0x1d0989=this;return new Promise(function(_0x506412,_0x27c143){return db[_0x87af('0x13')]['findAll']({'raw':_0x2cd20d[_0x87af('0x14')]?_0x2cd20d[_0x87af('0x14')][_0x87af('0x15')]===undefined?!![]:![]:!![],'where':_0x2cd20d[_0x87af('0x14')]?_0x2cd20d['options'][_0x87af('0x16')]||null:null,'attributes':_0x2cd20d['options']?_0x2cd20d[_0x87af('0x14')][_0x87af('0x17')]||null:null,'limit':_0x2cd20d[_0x87af('0x14')]?_0x2cd20d[_0x87af('0x14')][_0x87af('0x18')]||null:null,'include':_0x2cd20d[_0x87af('0x14')]?_0x2cd20d[_0x87af('0x14')][_0x87af('0x19')]?_[_0x87af('0x1a')](_0x2cd20d[_0x87af('0x14')]['include'],function(_0x135078){return{'model':db[_0x135078[_0x87af('0x1b')]],'as':_0x135078['as'],'attributes':_0x135078['attributes'],'include':_0x135078[_0x87af('0x19')]?_[_0x87af('0x1a')](_0x135078[_0x87af('0x19')],function(_0x1fac66){return{'model':db[_0x1fac66[_0x87af('0x1b')]],'as':_0x1fac66['as'],'attributes':_0x1fac66[_0x87af('0x17')],'include':_0x1fac66['include']?_[_0x87af('0x1a')](_0x1fac66['include'],function(_0x30f07b){return{'model':db[_0x30f07b['model']],'as':_0x30f07b['as'],'attributes':_0x30f07b[_0x87af('0x17')]};}):[]};}):[]};}):[]:[]})[_0x87af('0x1c')](function(_0xb62cb9){logger[_0x87af('0xa')]('GetTrigger',_0x2cd20d);logger['debug']('GetTrigger',_0x2cd20d,JSON[_0x87af('0xe')](_0xb62cb9));_0x506412(_0xb62cb9);})['catch'](function(_0x12e508){logger[_0x87af('0xf')](_0x87af('0x12'),_0x12e508[_0x87af('0x10')],_0x2cd20d);_0x27c143(_0x1d0989[_0x87af('0xf')](0x1f4,_0x12e508[_0x87af('0x10')]));});});};exports[_0x87af('0x1d')]=function(_0x546de3){var _0x23038f=this;return new Promise(function(_0x50a126,_0x539bf8){return db[_0x87af('0x13')][_0x87af('0x1e')]({'raw':_0x546de3['options']?_0x546de3[_0x87af('0x14')][_0x87af('0x15')]===undefined?!![]:![]:!![],'where':_0x546de3[_0x87af('0x14')]?_0x546de3[_0x87af('0x14')][_0x87af('0x16')]||null:null,'attributes':_0x546de3[_0x87af('0x14')]?_0x546de3['options'][_0x87af('0x17')]||null:null,'include':_0x546de3['options']?_0x546de3[_0x87af('0x14')][_0x87af('0x19')]?_[_0x87af('0x1a')](_0x546de3[_0x87af('0x14')][_0x87af('0x19')],function(_0x2b240d){return{'model':db[_0x2b240d[_0x87af('0x1b')]],'as':_0x2b240d['as'],'attributes':_0x2b240d[_0x87af('0x17')],'include':_0x2b240d['include']?_[_0x87af('0x1a')](_0x2b240d['include'],function(_0x104619){return{'model':db[_0x104619[_0x87af('0x1b')]],'as':_0x104619['as'],'attributes':_0x104619[_0x87af('0x17')],'include':_0x104619[_0x87af('0x19')]?_['map'](_0x104619['include'],function(_0x8ff94c){return{'model':db[_0x8ff94c['model']],'as':_0x8ff94c['as'],'attributes':_0x8ff94c['attributes']};}):[]};}):[]};}):[]:[]})[_0x87af('0x1c')](function(_0x35e35e){logger[_0x87af('0xa')](_0x87af('0x1d'),_0x546de3);logger[_0x87af('0x1f')]('ShowTrigger',_0x546de3,JSON['stringify'](_0x35e35e));_0x50a126(_0x35e35e);})[_0x87af('0x11')](function(_0x466318){logger[_0x87af('0xf')]('ShowTrigger',_0x466318['message'],_0x546de3);_0x539bf8(_0x23038f[_0x87af('0xf')](0x1f4,_0x466318[_0x87af('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index ebc8505..8796603 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 _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 +var _0x5734=['index','post','/:id/clone','clone','put','/:id','update','delete','multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./trunk.controller','get','isAuthenticated'];(function(_0x4a1946,_0x1ee3d7){var _0x20ba06=function(_0x4bd1e5){while(--_0x4bd1e5){_0x4a1946['push'](_0x4a1946['shift']());}};_0x20ba06(++_0x1ee3d7);}(_0x5734,0x138));var _0x4573=function(_0x210f9b,_0x287d0c){_0x210f9b=_0x210f9b-0x0;var _0x36d63b=_0x5734[_0x210f9b];return _0x36d63b;};'use strict';var multer=require(_0x4573('0x0'));var util=require(_0x4573('0x1'));var path=require(_0x4573('0x2'));var timeout=require(_0x4573('0x3'));var express=require('express');var router=express[_0x4573('0x4')]();var fs_extra=require(_0x4573('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x4573('0x6'));var config=require(_0x4573('0x7'));var controller=require(_0x4573('0x8'));router[_0x4573('0x9')]('/',auth[_0x4573('0xa')](),controller[_0x4573('0xb')]);router['get']('/:id',auth[_0x4573('0xa')](),controller['show']);router[_0x4573('0xc')](_0x4573('0xd'),auth[_0x4573('0xa')](),controller[_0x4573('0xe')]);router['post']('/',auth[_0x4573('0xa')](),controller['create']);router[_0x4573('0xf')](_0x4573('0x10'),auth['isAuthenticated'](),controller[_0x4573('0x11')]);router[_0x4573('0x12')](_0x4573('0x10'),auth['isAuthenticated'](),controller['destroy']);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 0587b06..a18d253 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 _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 +var _0x22f4=['peer','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','transport','join','getDataValue','split','rfc2833','info','inband','auto','nonat','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','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','\x22\x22\x20<>','INTEGER','always','originate','uac','uas','pai','fingerprint','certificate','active','passive','dynamic','update','BOOLEAN','sequelize','STRING','name','ENUM','friend','user'];(function(_0x3e5400,_0x378d30){var _0x5737d3=function(_0x1f7bda){while(--_0x1f7bda){_0x3e5400['push'](_0x3e5400['shift']());}};_0x5737d3(++_0x378d30);}(_0x22f4,0x90));var _0x422f=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x22f4[_0x18ab2a];return _0x16dcee;};'use strict';var Sequelize=require(_0x422f('0x0'));module['exports']={'name':{'type':Sequelize[_0x422f('0x1')],'allowNull':![],'unique':_0x422f('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x4'),_0x422f('0x5'),_0x422f('0x6')),'allowNull':![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x422f('0x1')],'allowNull':![],'defaultValue':'from-voip-provider'},'callingpres':{'type':Sequelize[_0x422f('0x3')]('ALLOWED_NOT_SCREENED',_0x422f('0x7'),_0x422f('0x8'),'ALLOWED',_0x422f('0x9'),_0x422f('0xa'),_0x422f('0xb'),_0x422f('0xc'))},'deny':{'type':Sequelize[_0x422f('0x1')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize[_0x422f('0x1')]},'md5secret':{'type':Sequelize[_0x422f('0x1')]},'remotesecret':{'type':Sequelize['STRING']},'transport':{'type':Sequelize[_0x422f('0x1')],'defaultValue':_0x422f('0xd'),'set':function(_0x2901fb){this[_0x422f('0xe')](_0x422f('0xf'),_0x2901fb?_0x2901fb[_0x422f('0x10')](','):null);},'get':function(){return this[_0x422f('0x11')](_0x422f('0xf'))?this[_0x422f('0x11')](_0x422f('0xf'))[_0x422f('0x12')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x13'),_0x422f('0x14'),'shortinfo',_0x422f('0x15'),_0x422f('0x16')),'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize['ENUM']('yes','no',_0x422f('0x17'),'update',_0x422f('0x18')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x422f('0x1')]},'directmediadeny':{'type':Sequelize[_0x422f('0x1')]},'nat':{'type':Sequelize['STRING'],'defaultValue':_0x422f('0x1a'),'set':function(_0x3bbe8b){this[_0x422f('0xe')](_0x422f('0x1b'),_0x3bbe8b?_0x3bbe8b['join'](','):null);},'get':function(){return this[_0x422f('0x11')]('nat')?this[_0x422f('0x11')](_0x422f('0x1b'))[_0x422f('0x12')](','):null;},'comment':_0x422f('0x1c')},'callgroup':{'type':Sequelize['STRING']},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0x422f('0x1')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x422f('0x1')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x422f('0x1')],'defaultValue':_0x422f('0x1d')},'allow':{'type':Sequelize[_0x422f('0x1')],'allowNull':![],'defaultValue':_0x422f('0x1e'),'set':function(_0x4c5c13){this['setDataValue'](_0x422f('0x1f'),_0x4c5c13?_0x4c5c13[_0x422f('0x10')](';'):_0x422f('0x1e'));},'get':function(){return this[_0x422f('0x11')]('allow')?this[_0x422f('0x11')](_0x422f('0x1f'))[_0x422f('0x12')](';'):null;},'comment':_0x422f('0x20')},'autoframing':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no')},'insecure':{'type':Sequelize[_0x422f('0x1')],'defaultValue':'port,invite','set':function(_0x4da75f){this[_0x422f('0xe')](_0x422f('0x21'),_0x4da75f?_0x4da75f['join'](','):null);},'get':function(){return this[_0x422f('0x11')](_0x422f('0x21'))?this[_0x422f('0x11')](_0x422f('0x21'))['split'](','):null;},'comment':_0x422f('0x22')},'trustrpid':{'type':Sequelize[_0x422f('0x3')]('yes','no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no',_0x422f('0x23'))},'promiscredir':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'useclientcode':{'type':Sequelize[_0x422f('0x3')]('yes','no')},'accountcode':{'type':Sequelize['INTEGER'](0xb)},'setvar':{'type':Sequelize[_0x422f('0x1')]},'callerid':{'type':Sequelize[_0x422f('0x1')],'defaultValue':_0x422f('0x24')},'amaflags':{'type':Sequelize[_0x422f('0x1')]},'callcounter':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no'),'defaultValue':_0x422f('0x19')},'busylevel':{'type':Sequelize[_0x422f('0x25')](0xb)},'allowoverlap':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no')},'allowsubscribe':{'type':Sequelize['ENUM']('yes','no')},'allowtransfer':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'ignoresdpversion':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'subscribecontext':{'type':Sequelize[_0x422f('0x1')]},'template':{'type':Sequelize['STRING']},'videosupport':{'type':Sequelize[_0x422f('0x3')]('yes','no',_0x422f('0x26')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x422f('0x25')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'mailbox':{'type':Sequelize[_0x422f('0x1')]},'session_timers':{'type':Sequelize[_0x422f('0x3')]('accept','refuse',_0x422f('0x27'))},'session_expires':{'type':Sequelize[_0x422f('0x25')](0xb)},'session_minse':{'type':Sequelize[_0x422f('0x25')](0xb)},'session_refresher':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x28'),_0x422f('0x29')),'defaultValue':'uas'},'t38pt_usertpsource':{'type':Sequelize[_0x422f('0x1')]},'regexten':{'type':Sequelize[_0x422f('0x1')]},'fromdomain':{'type':Sequelize[_0x422f('0x1')]},'fromuser':{'type':Sequelize[_0x422f('0x1')]},'port':{'type':Sequelize[_0x422f('0x25')](0x5)},'qualify':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no'),'defaultValue':'yes'},'keepalive':{'type':Sequelize['INTEGER'](0xb)},'defaultip':{'type':Sequelize[_0x422f('0x1')]},'defaultuser':{'type':Sequelize[_0x422f('0x1')]},'rtptimeout':{'type':Sequelize[_0x422f('0x25')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x422f('0x25')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x422f('0x25')](0xb)},'sendrpid':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no',_0x422f('0x2a')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x422f('0x1')]},'callbackextension':{'type':Sequelize['STRING']},'timert1':{'type':Sequelize[_0x422f('0x25')](0xb)},'timerb':{'type':Sequelize[_0x422f('0x25')](0xb)},'qualifyfreq':{'type':Sequelize[_0x422f('0x25')](0xb)},'contactpermit':{'type':Sequelize[_0x422f('0x1')]},'contactdeny':{'type':Sequelize[_0x422f('0x1')]},'contactacl':{'type':Sequelize[_0x422f('0x1')]},'unsolicited_mailbox':{'type':Sequelize['STRING']},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0x422f('0x25')](0xb)},'encryption':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no')},'force_avp':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'icesupport':{'type':Sequelize[_0x422f('0x3')]('yes','no')},'dtlsenable':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no')},'dtlsverify':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no',_0x422f('0x2b'),_0x422f('0x2c'))},'dtlsrekey':{'type':Sequelize[_0x422f('0x25')](0xb)},'dtlscertfile':{'type':Sequelize[_0x422f('0x1')]},'dtlsprivatekey':{'type':Sequelize[_0x422f('0x1')]},'dtlscipher':{'type':Sequelize[_0x422f('0x1')]},'dtlscafile':{'type':Sequelize['STRING']},'dtlscapath':{'type':Sequelize['STRING']},'dtlssetup':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x2d'),_0x422f('0x2e'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x422f('0x1')]},'usereqphone':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING']},'recordofffeature':{'type':Sequelize[_0x422f('0x1')]},'call_limit':{'type':Sequelize[_0x422f('0x25')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM'](_0x422f('0x19'),'no')},'subscribemwi':{'type':Sequelize[_0x422f('0x3')]('yes','no')},'vmexten':{'type':Sequelize[_0x422f('0x1')]},'mohinterpret':{'type':Sequelize[_0x422f('0x1')]},'mohsuggest':{'type':Sequelize[_0x422f('0x1')]},'parkinglot':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x422f('0x1')]},'host':{'type':Sequelize['STRING'],'defaultValue':_0x422f('0x2f')},'canreinvite':{'type':Sequelize[_0x422f('0x3')](_0x422f('0x19'),'no',_0x422f('0x17'),_0x422f('0x30'),'update,nonat'),'defaultValue':'no'},'registry':{'type':Sequelize[_0x422f('0x1')]},'otherFields':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x422f('0x31')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x422f('0x1')],'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 3d51caa..9cea0b4 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 _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 +var _0x98a8=['../../mysqldb','jayson/promise','client','request','Trunk,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','destroy','get','Trunks','UserProfileResource','stack','name','map','fieldName','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','Trunk','include','show','params','keys','rawAttributes','includeAll','clone','find','createdAt','updatedAt','body','omit','create','user','role','UserProfileSection','userProfileId','autoAssociation','findAll','readFileSync','root','server/files/templates/trunk.ejs','join','server/files/templates/registry.ejs','utf8','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','Unable\x20to\x20retrieve\x20the\x20current\x20user','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment'];(function(_0x549c51,_0x567d8b){var _0x1441df=function(_0x43ad91){while(--_0x43ad91){_0x549c51['push'](_0x549c51['shift']());}};_0x1441df(++_0x567d8b);}(_0x98a8,0x12c));var _0x898a=function(_0x3c5eed,_0x5339bc){_0x3c5eed=_0x3c5eed-0x0;var _0x80f158=_0x98a8[_0x3c5eed];return _0x80f158;};'use strict';var emlformat=require(_0x898a('0x0'));var rimraf=require(_0x898a('0x1'));var zipdir=require(_0x898a('0x2'));var jsonpatch=require(_0x898a('0x3'));var rp=require(_0x898a('0x4'));var moment=require(_0x898a('0x5'));var BPromise=require(_0x898a('0x6'));var Mustache=require('mustache');var util=require(_0x898a('0x7'));var path=require(_0x898a('0x8'));var sox=require(_0x898a('0x9'));var csv=require(_0x898a('0xa'));var ejs=require(_0x898a('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x898a('0xc'));var squel=require('squel');var crypto=require(_0x898a('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x898a('0xe'));var toCsv=require(_0x898a('0xa'));var querystring=require(_0x898a('0xf'));var Papa=require(_0x898a('0x10'));var Redis=require(_0x898a('0x11'));var authService=require(_0x898a('0x12'));var qs=require(_0x898a('0x13'));var as=require(_0x898a('0x14'));var hardwareService=require(_0x898a('0x15'));var logger=require('../../config/logger')(_0x898a('0x16'));var utils=require('../../config/utils');var config=require(_0x898a('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x898a('0x18'))['db'];var jayson=require(_0x898a('0x19'));var client=jayson[_0x898a('0x1a')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5bfded,_0x5b5c9c,_0x373d53,_0x1f5be4){return new BPromise(function(_0xb24335,_0x116fbe){var _0x1873e9=_0x1f5be4||client;return _0x1873e9[_0x898a('0x1b')](_0x5bfded,_0x373d53)['then'](function(_0x47033c){logger['info'](_0x898a('0x1c'),_0x5b5c9c,'request\x20sent');logger[_0x898a('0x1d')]('Trunk,\x20%s,\x20%s,\x20%s',_0x5b5c9c,_0x898a('0x1e'),JSON['stringify'](_0x47033c));if(_0x47033c[_0x898a('0x1f')]){if(_0x47033c[_0x898a('0x1f')][_0x898a('0x20')]===0x1f4){logger['error'](_0x898a('0x1c'),_0x5b5c9c,_0x47033c['error']['message']);return _0x116fbe(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}logger['error']('Trunk,\x20%s,\x20%s',_0x5b5c9c,_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);return _0xb24335(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}else{logger[_0x898a('0x22')](_0x898a('0x1c'),_0x5b5c9c,_0x898a('0x1e'));_0xb24335(_0x47033c['result'][_0x898a('0x21')]);}})[_0x898a('0x23')](function(_0x11cae2){logger[_0x898a('0x1f')](_0x898a('0x1c'),_0x5b5c9c,_0x11cae2);_0x116fbe(_0x11cae2);});});}function respondWithStatusCode(_0x310bfa,_0x4e254d){_0x4e254d=_0x4e254d||0xcc;return function(_0x274cdf){if(_0x274cdf){return _0x310bfa[_0x898a('0x24')](_0x4e254d);}return _0x310bfa[_0x898a('0x25')](_0x4e254d)[_0x898a('0x26')]();};}function respondWithResult(_0x3901ab,_0x1426e3){_0x1426e3=_0x1426e3||0xc8;return function(_0x5b7719){if(_0x5b7719){return _0x3901ab[_0x898a('0x25')](_0x1426e3)['json'](_0x5b7719);}};}function respondWithFilteredResult(_0x513c6b,_0x53ddb2){return function(_0x3678be){if(_0x3678be){var _0x1f4d86=typeof _0x53ddb2[_0x898a('0x27')]===_0x898a('0x28')&&typeof _0x53ddb2[_0x898a('0x29')]===_0x898a('0x28');var _0x398e98=_0x3678be[_0x898a('0x2a')];var _0xd31922=_0x1f4d86?0x0:_0x53ddb2['offset'];var _0x4b3e68=_0x1f4d86?_0x3678be['count']:_0x53ddb2[_0x898a('0x27')]+_0x53ddb2[_0x898a('0x29')];var _0x3b7704;if(_0x4b3e68>=_0x398e98){_0x4b3e68=_0x398e98;_0x3b7704=0xc8;}else{_0x3b7704=0xce;}_0x513c6b[_0x898a('0x25')](_0x3b7704);return _0x513c6b[_0x898a('0x2b')](_0x898a('0x2c'),_0xd31922+'-'+_0x4b3e68+'/'+_0x398e98)[_0x898a('0x2d')](_0x3678be);}return null;};}function patchUpdates(_0xf74645){return function(_0x18773a){try{jsonpatch[_0x898a('0x2e')](_0x18773a,_0xf74645,!![]);}catch(_0x44c5d2){return BPromise[_0x898a('0x2f')](_0x44c5d2);}return _0x18773a['save']();};}function saveUpdates(_0x7a1eb5,_0x17a5f3){return function(_0x26eead){if(_0x26eead){return _0x26eead[_0x898a('0x30')](_0x7a1eb5)[_0x898a('0x31')](function(_0x47af5b){return _0x47af5b;});}return null;};}function removeEntity(_0x48cefb,_0x20a3fe){return function(_0x1e2fd4){if(_0x1e2fd4){return _0x1e2fd4[_0x898a('0x32')]()['then'](function(){var _0x105477=_0x1e2fd4[_0x898a('0x33')]({'plain':!![]});var _0x5eafc7=_0x898a('0x34');return db[_0x898a('0x35')][_0x898a('0x32')]({'where':{'type':_0x5eafc7,'resourceId':_0x105477['id']}})[_0x898a('0x31')](function(){return _0x1e2fd4;});})[_0x898a('0x31')](function(){_0x48cefb['status'](0xcc)[_0x898a('0x26')]();});}};}function handleEntityNotFound(_0x5baf5b,_0x573eb3){return function(_0x14e2dc){if(!_0x14e2dc){_0x5baf5b['sendStatus'](0x194);}return _0x14e2dc;};}function handleError(_0x3c9588,_0x4b3aac){_0x4b3aac=_0x4b3aac||0x1f4;return function(_0x37cb11){logger['error'](_0x37cb11[_0x898a('0x36')]);if(_0x37cb11[_0x898a('0x37')]){delete _0x37cb11[_0x898a('0x37')];}_0x3c9588['status'](_0x4b3aac)['send'](_0x37cb11);};}exports['index']=function(_0x1575d2,_0x429c32){var _0x5a228f={},_0xdd019d={},_0x3d3463={'count':0x0,'rows':[]};var _0xe84f7e=_[_0x898a('0x38')](db['Trunk']['rawAttributes'],function(_0x3aed01){return{'name':_0x3aed01[_0x898a('0x39')],'type':_0x3aed01['type']['key']};});_0xdd019d[_0x898a('0x3a')]=_[_0x898a('0x38')](_0xe84f7e,_0x898a('0x37'));_0xdd019d[_0x898a('0x3b')]=_['keys'](_0x1575d2[_0x898a('0x3b')]);_0xdd019d[_0x898a('0x3c')]=_['intersection'](_0xdd019d['model'],_0xdd019d['query']);_0x5a228f[_0x898a('0x3d')]=_[_0x898a('0x3e')](_0xdd019d[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x3f')]));_0x5a228f[_0x898a('0x3d')]=_0x5a228f[_0x898a('0x3d')][_0x898a('0x40')]?_0x5a228f[_0x898a('0x3d')]:_0xdd019d[_0x898a('0x3a')];if(!_0x1575d2[_0x898a('0x3b')][_0x898a('0x41')](_0x898a('0x42'))){_0x5a228f[_0x898a('0x29')]=qs['limit'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x29')]);_0x5a228f[_0x898a('0x27')]=qs['offset'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x27')]);}_0x5a228f[_0x898a('0x43')]=qs[_0x898a('0x44')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x44')]);_0x5a228f[_0x898a('0x45')]=qs[_0x898a('0x3c')](_['pick'](_0x1575d2[_0x898a('0x3b')],_0xdd019d[_0x898a('0x3c')]),_0xe84f7e);if(_0x1575d2[_0x898a('0x3b')][_0x898a('0x46')]){_0x5a228f['where']=_[_0x898a('0x47')](_0x5a228f[_0x898a('0x45')],{'$or':_['map'](_0xe84f7e,function(_0x241677){if(_0x241677['type']!==_0x898a('0x48')){var _0x5137c4={};_0x5137c4[_0x241677['name']]={'$like':'%'+_0x1575d2[_0x898a('0x3b')]['filter']+'%'};return _0x5137c4;}})});}_0x5a228f=_[_0x898a('0x47')]({},_0x5a228f,_0x1575d2[_0x898a('0x49')]);var _0x4d6ac0={'where':_0x5a228f[_0x898a('0x45')]};return db[_0x898a('0x4a')]['count'](_0x4d6ac0)[_0x898a('0x31')](function(_0x199437){_0x3d3463[_0x898a('0x2a')]=_0x199437;if(_0x1575d2[_0x898a('0x3b')]['includeAll']){_0x5a228f[_0x898a('0x4b')]=[{'all':!![]}];}return db[_0x898a('0x4a')]['findAll'](_0x5a228f);})[_0x898a('0x31')](function(_0x1d8c16){_0x3d3463['rows']=_0x1d8c16;return _0x3d3463;})[_0x898a('0x31')](respondWithFilteredResult(_0x429c32,_0x5a228f))['catch'](handleError(_0x429c32,null));};exports[_0x898a('0x4c')]=function(_0x41f291,_0x32ccb9){var _0x50f9e3={'raw':![],'where':{'id':_0x41f291[_0x898a('0x4d')]['id']}},_0x2f6cb3={};_0x2f6cb3[_0x898a('0x3a')]=_[_0x898a('0x4e')](db['Trunk'][_0x898a('0x4f')]);_0x2f6cb3['query']=_[_0x898a('0x4e')](_0x41f291[_0x898a('0x3b')]);_0x2f6cb3[_0x898a('0x3c')]=_['intersection'](_0x2f6cb3[_0x898a('0x3a')],_0x2f6cb3[_0x898a('0x3b')]);_0x50f9e3[_0x898a('0x3d')]=_['intersection'](_0x2f6cb3['model'],qs[_0x898a('0x3f')](_0x41f291[_0x898a('0x3b')][_0x898a('0x3f')]));_0x50f9e3[_0x898a('0x3d')]=_0x50f9e3[_0x898a('0x3d')][_0x898a('0x40')]?_0x50f9e3[_0x898a('0x3d')]:_0x2f6cb3[_0x898a('0x3a')];if(_0x41f291[_0x898a('0x3b')][_0x898a('0x50')]){_0x50f9e3[_0x898a('0x4b')]=[{'all':!![]}];}_0x50f9e3=_['merge']({},_0x50f9e3,_0x41f291[_0x898a('0x49')]);return db[_0x898a('0x4a')]['find'](_0x50f9e3)[_0x898a('0x31')](handleEntityNotFound(_0x32ccb9,null))['then'](respondWithResult(_0x32ccb9,null))['catch'](handleError(_0x32ccb9,null));};exports[_0x898a('0x51')]=function(_0x124f9b,_0x209529){var _0x5bfd61={'where':{'id':_0x124f9b[_0x898a('0x4d')]['id']}},_0x556fd8={};_0x556fd8[_0x898a('0x3a')]=_['keys'](db[_0x898a('0x4a')][_0x898a('0x4f')]);_0x5bfd61['attributes']=_[_0x898a('0x3e')](_0x556fd8[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x124f9b['query'][_0x898a('0x3f')]));_0x5bfd61[_0x898a('0x3d')]=_0x5bfd61[_0x898a('0x3d')][_0x898a('0x40')]?_0x5bfd61[_0x898a('0x3d')]:_0x556fd8[_0x898a('0x3a')];if(_0x124f9b['query'][_0x898a('0x50')]){_0x5bfd61['include']=[{'all':!![]}];}_0x5bfd61=_[_0x898a('0x47')]({},_0x5bfd61,_0x124f9b[_0x898a('0x49')]);return db[_0x898a('0x4a')][_0x898a('0x52')](_0x5bfd61)[_0x898a('0x31')](handleEntityNotFound(_0x209529,null))[_0x898a('0x31')](function(_0x2486a5){if(_0x2486a5){var _0x75ff57=_0x2486a5[_0x898a('0x33')]({'plain':!![]});_0x75ff57=qs['omit'](_0x75ff57,['id',_0x898a('0x53'),_0x898a('0x54')]);_0x124f9b[_0x898a('0x55')]=_[_0x898a('0x56')](_0x124f9b[_0x898a('0x55')],['id',_0x898a('0x53'),_0x898a('0x54')]);return db[_0x898a('0x4a')][_0x898a('0x57')](_[_0x898a('0x47')](_0x75ff57,_0x124f9b[_0x898a('0x55')]),{'include':_0x124f9b[_0x898a('0x3b')][_0x898a('0x50')]?[{'all':!![]}]:undefined})[_0x898a('0x31')](function(_0x22f9ba){var _0x5f42ae=_0x124f9b[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x5f42ae)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5f42ae[_0x898a('0x59')]===_0x898a('0x58')){var _0x5f0944=_0x22f9ba[_0x898a('0x33')]({'plain':!![]});var _0x1daecd=_0x898a('0x34');return db[_0x898a('0x5a')]['find']({'where':{'name':_0x1daecd,'userProfileId':_0x5f42ae[_0x898a('0x5b')]},'raw':!![]})[_0x898a('0x31')](function(_0x137935){if(_0x137935&&_0x137935[_0x898a('0x5c')]===0x0){return db['UserProfileResource'][_0x898a('0x57')]({'name':_0x5f0944[_0x898a('0x37')],'resourceId':_0x5f0944['id'],'type':_0x137935['name'],'sectionId':_0x137935['id']},{})[_0x898a('0x31')](function(){return _0x22f9ba;});}else{return _0x22f9ba;}})[_0x898a('0x23')](function(_0x5b7019){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5b7019);throw _0x5b7019;});}return _0x22f9ba;});}})[_0x898a('0x31')](respondWithResult(_0x209529,0xc9))['catch'](handleError(_0x209529,null));};exports['create']=function(_0x5ed35e,_0xfdd6d8,_0x473f5c){var _0x3909c5;return db[_0x898a('0x4a')]['create'](_0x5ed35e['body'],{'raw':!![]})[_0x898a('0x31')](function(_0x232be0){_0x3909c5=_0x232be0;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x41cf94){var _0x30051d=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x42fda8=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),_0x898a('0x63'));var _0x3bcc3d=ejs[_0x898a('0x64')](_0x30051d,{'trunks':_0x41cf94||[]});fs[_0x898a('0x65')](_0x898a('0x66'),_0x3bcc3d);if(_0x3909c5[_0x898a('0x67')]){var _0x307849=ejs[_0x898a('0x64')](_0x42fda8,{'trunks':_0x41cf94||[]});fs['writeFileSync'](_0x898a('0x68'),_0x307849);}})['then'](function(){return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x57'),{'module':_0x898a('0x6a')});})['then'](function(){var _0x31102d=_0x5ed35e[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x31102d)throw new Error(_0x898a('0x6b'));if(_0x31102d[_0x898a('0x59')]==='user'){var _0x4b9487=_0x3909c5[_0x898a('0x33')]({'plain':!![]});return db[_0x898a('0x5a')][_0x898a('0x52')]({'where':{'name':_0x898a('0x34'),'userProfileId':_0x31102d['userProfileId']},'raw':!![]})[_0x898a('0x31')](function(_0x3d3451){if(_0x3d3451&&_0x3d3451[_0x898a('0x5c')]===0x0){return db[_0x898a('0x35')][_0x898a('0x57')]({'name':_0x4b9487[_0x898a('0x37')],'resourceId':_0x4b9487['id'],'type':_0x3d3451[_0x898a('0x37')],'sectionId':_0x3d3451['id']},{})[_0x898a('0x31')](function(){return _0x3909c5;});}else{return _0x3909c5;}})['catch'](function(_0x32a207){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x32a207);throw _0x32a207;});}return _0x3909c5;})[_0x898a('0x31')](respondWithResult(_0xfdd6d8,0xc9))['catch'](handleError(_0xfdd6d8,null));};exports[_0x898a('0x30')]=function(_0x4b2575,_0x2471d8,_0x387f2c){var _0x3b07dc;return db[_0x898a('0x4a')][_0x898a('0x52')]({'where':{'id':_0x4b2575[_0x898a('0x4d')]['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x2471d8,null))[_0x898a('0x31')](saveUpdates(_0x4b2575[_0x898a('0x55')],null))['then'](function(_0x3fe54b){if(_0x3fe54b){_0x3b07dc=_0x3fe54b;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});}})[_0x898a('0x31')](function(_0x290972){if(_0x290972){var _0x1d594b=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x4fad03=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config['root'],'server/files/templates/registry.ejs'),_0x898a('0x63'));var _0x4a79a4=ejs[_0x898a('0x64')](_0x1d594b,{'trunks':_0x290972||[]});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x4a79a4);var _0x3f6815=ejs[_0x898a('0x64')](_0x4fad03,{'trunks':_0x290972||[]});fs[_0x898a('0x65')](_0x898a('0x68'),_0x3f6815);return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x30'),{'module':_0x898a('0x6a')});}return null;})['then'](function(_0x3237e8){if(_0x3237e8){return _0x3b07dc;}})[_0x898a('0x31')](respondWithResult(_0x2471d8,null))[_0x898a('0x23')](handleError(_0x2471d8,null));};exports['destroy']=function(_0x27560f,_0x61247c,_0x5c6247){var _0x39e917;return db['Trunk']['find']({'where':{'id':_0x27560f['params']['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x61247c,null))[_0x898a('0x31')](removeEntity(_0x61247c,null))[_0x898a('0x31')](function(){return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x12e54b){var _0x50dd52=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x24670c=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),'utf8');var _0x5847cb=ejs['render'](_0x50dd52,{'trunks':_0x12e54b});var _0x3b8fb5=ejs[_0x898a('0x64')](_0x24670c,{'trunks':_0x12e54b});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x5847cb);fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_registers.conf',_0x3b8fb5);return respondWithRpcPromise('Reload',_0x898a('0x32'),{'module':_0x898a('0x6a')});})[_0x898a('0x23')](handleError(_0x61247c,null));}; \ No newline at end of file diff --git a/server/api/trunk/trunk.model.js b/server/api/trunk/trunk.model.js index 1e7b69a..630ebb7 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 _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 +var _0xa3e8=['path','rimraf','../../config/environment','./trunk.attributes','exports','define','Trunk','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5843f0,_0x1d4e95){var _0x5b177d=function(_0x39af50){while(--_0x39af50){_0x5843f0['push'](_0x5843f0['shift']());}};_0x5b177d(++_0x1d4e95);}(_0xa3e8,0x149));var _0x8a3e=function(_0x55d3a7,_0x2214bc){_0x55d3a7=_0x55d3a7-0x0;var _0x57844d=_0xa3e8[_0x55d3a7];return _0x57844d;};'use strict';var _=require(_0x8a3e('0x0'));var util=require(_0x8a3e('0x1'));var logger=require(_0x8a3e('0x2'))(_0x8a3e('0x3'));var moment=require(_0x8a3e('0x4'));var BPromise=require(_0x8a3e('0x5'));var rp=require(_0x8a3e('0x6'));var fs=require('fs');var path=require(_0x8a3e('0x7'));var rimraf=require(_0x8a3e('0x8'));var config=require(_0x8a3e('0x9'));var attributes=require(_0x8a3e('0xa'));module[_0x8a3e('0xb')]=function(_0x1895de,_0x440994){return _0x1895de[_0x8a3e('0xc')](_0x8a3e('0xd'),attributes,{'tableName':'tools_trunks','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 33f486c..5b67c3d 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 _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 +var _0xe883=['../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','code','Trunk,\x20%s,\x20%s','result','message','GetTrunk','Trunk','findAll','options','raw','where','limit','include','map','model','attributes','ShowTrunk','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xe883,0x18f));var _0x3e88=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0xe883[_0x36ed48];return _0x51c63a;};'use strict';var _=require('lodash');var util=require(_0x3e88('0x0'));var moment=require(_0x3e88('0x1'));var BPromise=require(_0x3e88('0x2'));var rs=require(_0x3e88('0x3'));var fs=require('fs');var Redis=require(_0x3e88('0x4'));var db=require(_0x3e88('0x5'))['db'];var utils=require(_0x3e88('0x6'));var logger=require('../../config/logger')(_0x3e88('0x7'));var config=require(_0x3e88('0x8'));var jayson=require(_0x3e88('0x9'));var client=jayson[_0x3e88('0xa')][_0x3e88('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x547060,_0x349ce4,_0x59e6bb){return new BPromise(function(_0x1b23f8,_0x492316){return client[_0x3e88('0xc')](_0x547060,_0x59e6bb)[_0x3e88('0xd')](function(_0x55f913){logger[_0x3e88('0xe')]('Trunk,\x20%s,\x20%s',_0x349ce4,_0x3e88('0xf'));logger[_0x3e88('0x10')](_0x3e88('0x11'),_0x349ce4,'request\x20sent',JSON[_0x3e88('0x12')](_0x55f913));if(_0x55f913[_0x3e88('0x13')]){if(_0x55f913[_0x3e88('0x13')][_0x3e88('0x14')]===0x1f4){logger[_0x3e88('0x13')](_0x3e88('0x15'),_0x349ce4,_0x55f913[_0x3e88('0x13')]['message']);return _0x492316(_0x55f913[_0x3e88('0x13')]['message']);}logger['error'](_0x3e88('0x15'),_0x349ce4,_0x55f913[_0x3e88('0x13')]['message']);return _0x1b23f8(_0x55f913[_0x3e88('0x13')]['message']);}else{logger['info'](_0x3e88('0x15'),_0x349ce4,'request\x20sent');_0x1b23f8(_0x55f913[_0x3e88('0x16')][_0x3e88('0x17')]);}})['catch'](function(_0x4f992e){logger[_0x3e88('0x13')](_0x3e88('0x15'),_0x349ce4,_0x4f992e);_0x492316(_0x4f992e);});});}exports[_0x3e88('0x18')]=function(_0x5df3b0){var _0x40fde2=this;return new Promise(function(_0x5d0c5c,_0x50f294){return db[_0x3e88('0x19')][_0x3e88('0x1a')]({'raw':_0x5df3b0[_0x3e88('0x1b')]?_0x5df3b0[_0x3e88('0x1b')][_0x3e88('0x1c')]===undefined?!![]:![]:!![],'where':_0x5df3b0[_0x3e88('0x1b')]?_0x5df3b0[_0x3e88('0x1b')][_0x3e88('0x1d')]||null:null,'attributes':_0x5df3b0[_0x3e88('0x1b')]?_0x5df3b0[_0x3e88('0x1b')]['attributes']||null:null,'limit':_0x5df3b0[_0x3e88('0x1b')]?_0x5df3b0[_0x3e88('0x1b')][_0x3e88('0x1e')]||null:null,'include':_0x5df3b0[_0x3e88('0x1b')]?_0x5df3b0[_0x3e88('0x1b')][_0x3e88('0x1f')]?_[_0x3e88('0x20')](_0x5df3b0[_0x3e88('0x1b')][_0x3e88('0x1f')],function(_0x4b19a3){return{'model':db[_0x4b19a3['model']],'as':_0x4b19a3['as'],'attributes':_0x4b19a3['attributes'],'include':_0x4b19a3[_0x3e88('0x1f')]?_[_0x3e88('0x20')](_0x4b19a3['include'],function(_0x4fb53a){return{'model':db[_0x4fb53a[_0x3e88('0x21')]],'as':_0x4fb53a['as'],'attributes':_0x4fb53a['attributes'],'include':_0x4fb53a['include']?_['map'](_0x4fb53a['include'],function(_0x47ee82){return{'model':db[_0x47ee82[_0x3e88('0x21')]],'as':_0x47ee82['as'],'attributes':_0x47ee82[_0x3e88('0x22')]};}):[]};}):[]};}):[]:[]})[_0x3e88('0xd')](function(_0x32460b){logger['info'](_0x3e88('0x18'),_0x5df3b0);logger['debug'](_0x3e88('0x18'),_0x5df3b0,JSON[_0x3e88('0x12')](_0x32460b));_0x5d0c5c(_0x32460b);})['catch'](function(_0x866492){logger[_0x3e88('0x13')]('GetTrunk',_0x866492[_0x3e88('0x17')],_0x5df3b0);_0x50f294(_0x40fde2[_0x3e88('0x13')](0x1f4,_0x866492[_0x3e88('0x17')]));});});};exports[_0x3e88('0x23')]=function(_0x28481c){var _0x2a86b2=this;return new Promise(function(_0x49ca9b,_0x497e78){return db[_0x3e88('0x19')]['find']({'raw':_0x28481c[_0x3e88('0x1b')]?_0x28481c[_0x3e88('0x1b')][_0x3e88('0x1c')]===undefined?!![]:![]:!![],'where':_0x28481c[_0x3e88('0x1b')]?_0x28481c[_0x3e88('0x1b')][_0x3e88('0x1d')]||null:null,'attributes':_0x28481c['options']?_0x28481c[_0x3e88('0x1b')]['attributes']||null:null,'include':_0x28481c[_0x3e88('0x1b')]?_0x28481c[_0x3e88('0x1b')][_0x3e88('0x1f')]?_[_0x3e88('0x20')](_0x28481c['options'][_0x3e88('0x1f')],function(_0x46a6e5){return{'model':db[_0x46a6e5['model']],'as':_0x46a6e5['as'],'attributes':_0x46a6e5[_0x3e88('0x22')],'include':_0x46a6e5[_0x3e88('0x1f')]?_['map'](_0x46a6e5[_0x3e88('0x1f')],function(_0x679511){return{'model':db[_0x679511[_0x3e88('0x21')]],'as':_0x679511['as'],'attributes':_0x679511[_0x3e88('0x22')],'include':_0x679511[_0x3e88('0x1f')]?_[_0x3e88('0x20')](_0x679511[_0x3e88('0x1f')],function(_0x4ce08b){return{'model':db[_0x4ce08b[_0x3e88('0x21')]],'as':_0x4ce08b['as'],'attributes':_0x4ce08b['attributes']};}):[]};}):[]};}):[]:[]})[_0x3e88('0xd')](function(_0x203849){logger[_0x3e88('0xe')](_0x3e88('0x23'),_0x28481c);logger['debug']('ShowTrunk',_0x28481c,JSON['stringify'](_0x203849));_0x49ca9b(_0x203849);})[_0x3e88('0x24')](function(_0x550ba3){logger[_0x3e88('0x13')](_0x3e88('0x23'),_0x550ba3[_0x3e88('0x17')],_0x28481c);_0x497e78(_0x2a86b2[_0x3e88('0x13')](0x1f4,_0x550ba3['message']));});});}; \ No newline at end of file diff --git a/server/api/user/index.js b/server/api/user/index.js index 9f94185..9db6c5d 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 _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 +var _0x7c88=['express','fs-extra','../../components/auth/service','../../config/environment','./user.controller','get','isAuthenticated','index','/describe','describe','whoami','/presence','getPresence','/:id','show','getOpenTabs','/:id/contacts','getContacts','getQueues','/:id/queues_rt','getVoiceQueuesRt','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','/:id/chat/interactions','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','/:id/fax/interactions','getFaxInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','getLists','getAgents','/:id/prefixes','getFaxAccounts','/:id/mail_accounts','getMailAccounts','getOpenchannelAccounts','/:id/sms_accounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/whatsapp_accounts','getWhatsappAccounts','getScheduledCalls','/:id/api_key','addContacts','/create_many','bulkCreate','addQueues','join','server/files/images/','%s-%s','now','post','/:id/avatar','single','addAvatar','login','/:id/logout','logout','/:id/pause','unpause','addTeams','/:id/chat_interactions','addChatInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','/:id/openchannel_interactions','addOpenchannelInteractions','/:id/whatsapp_interactions','addWhatsappInteractions','/:id/fax_accounts','addFaxAccounts','addMailAccounts','/:id/openchannel_accounts','addOpenchannelAccounts','/:id/square_projects','addSquareProjects','createApiKey','put','/:id/password','changePassword','delete','/:id/queues','removeQueues','removeTeams','removeChatInteractions','/:id/mail_interactions','removeMailInteractions','removeSmsInteractions','removeOpenchannelInteractions','removeWhatsappInteractions','removeMailAccounts','removeOpenchannelAccounts','removeChatWebsites','removeWhatsappAccounts','removeApiKey','multer','util','connect-timeout'];(function(_0x558eda,_0x25dd5d){var _0x159107=function(_0x4db381){while(--_0x4db381){_0x558eda['push'](_0x558eda['shift']());}};_0x159107(++_0x25dd5d);}(_0x7c88,0x69));var _0x87c8=function(_0x489147,_0x3714cd){_0x489147=_0x489147-0x0;var _0x297dd4=_0x7c88[_0x489147];return _0x297dd4;};'use strict';var multer=require(_0x87c8('0x0'));var util=require(_0x87c8('0x1'));var path=require('path');var timeout=require(_0x87c8('0x2'));var express=require(_0x87c8('0x3'));var router=express['Router']();var fs_extra=require(_0x87c8('0x4'));var auth=require(_0x87c8('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x87c8('0x6'));var controller=require(_0x87c8('0x7'));router[_0x87c8('0x8')]('/',auth[_0x87c8('0x9')](),controller[_0x87c8('0xa')]);router[_0x87c8('0x8')](_0x87c8('0xb'),auth['isAuthenticated'](),controller[_0x87c8('0xc')]);router[_0x87c8('0x8')]('/whoami',auth[_0x87c8('0x9')](),controller[_0x87c8('0xd')]);router[_0x87c8('0x8')](_0x87c8('0xe'),auth[_0x87c8('0x9')](),controller[_0x87c8('0xf')]);router['get'](_0x87c8('0x10'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x11')]);router[_0x87c8('0x8')]('/:id/avatar',controller['getAvatar']);router[_0x87c8('0x8')]('/:id/open_tabs',auth[_0x87c8('0x9')](),controller[_0x87c8('0x12')]);router[_0x87c8('0x8')](_0x87c8('0x13'),auth['isAuthenticated'](),controller[_0x87c8('0x14')]);router[_0x87c8('0x8')]('/:id/queues',auth[_0x87c8('0x9')](),controller[_0x87c8('0x15')]);router[_0x87c8('0x8')](_0x87c8('0x16'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x17')]);router[_0x87c8('0x8')]('/:id/groups',auth[_0x87c8('0x9')](),controller[_0x87c8('0x18')]);router['get'](_0x87c8('0x19'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x1a')]);router[_0x87c8('0x8')](_0x87c8('0x1b'),auth['isAuthenticated'](),controller['getScreenRecordings']);router[_0x87c8('0x8')](_0x87c8('0x1c'),auth['isAuthenticated'](),controller[_0x87c8('0x1d')]);router[_0x87c8('0x8')](_0x87c8('0x1e'),auth['isAuthenticated'](),controller[_0x87c8('0x1f')]);router[_0x87c8('0x8')](_0x87c8('0x20'),auth['isAuthenticated'](),controller[_0x87c8('0x21')]);router[_0x87c8('0x8')](_0x87c8('0x22'),auth[_0x87c8('0x9')](),controller['getSmsInteractions']);router[_0x87c8('0x8')](_0x87c8('0x23'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x24')]);router['get'](_0x87c8('0x25'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x26')]);router[_0x87c8('0x8')](_0x87c8('0x27'),auth['isAuthenticated'](),controller['getTeams']);router[_0x87c8('0x8')]('/:id/lists',auth[_0x87c8('0x9')](),controller[_0x87c8('0x28')]);router[_0x87c8('0x8')]('/:id/agents',auth[_0x87c8('0x9')](),controller[_0x87c8('0x29')]);router['get'](_0x87c8('0x2a'),auth['isAuthenticated'](),controller['getVoicePrefixes']);router['get']('/:id/fax_accounts',auth[_0x87c8('0x9')](),controller[_0x87c8('0x2b')]);router[_0x87c8('0x8')](_0x87c8('0x2c'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x2d')]);router['get']('/:id/openchannel_accounts',auth[_0x87c8('0x9')](),controller[_0x87c8('0x2e')]);router[_0x87c8('0x8')](_0x87c8('0x2f'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x30')]);router[_0x87c8('0x8')](_0x87c8('0x31'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x32')]);router['get'](_0x87c8('0x33'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x34')]);router['get']('/:id/square_projects',auth[_0x87c8('0x9')](),controller['getSquareProjects']);router[_0x87c8('0x8')]('/:id/scheduled_calls',auth[_0x87c8('0x9')](),controller[_0x87c8('0x35')]);router['get'](_0x87c8('0x36'),auth[_0x87c8('0x9')](),controller['getApiKey']);router['post'](_0x87c8('0x13'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x37')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x87c8('0x38'),auth['isAuthenticated'](),controller[_0x87c8('0x39')]);router['post']('/:id/queues',auth['isAuthenticated'](),controller[_0x87c8('0x3a')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3a2301,_0x4f6965,_0x354734){_0x354734(null,path[_0x87c8('0x3b')](config['root'],_0x87c8('0x3c')));},'filename':function(_0x57965b,_0x2aeff1,_0x29a017){_0x29a017(null,util['format'](_0x87c8('0x3d'),Date[_0x87c8('0x3e')](),_0x2aeff1['originalname']));}})});router[_0x87c8('0x3f')](_0x87c8('0x40'),upload[_0x87c8('0x41')]('file'),controller[_0x87c8('0x42')]);router[_0x87c8('0x3f')]('/:id/login',auth[_0x87c8('0x9')](),controller[_0x87c8('0x43')]);router[_0x87c8('0x3f')](_0x87c8('0x44'),auth['isAuthenticated'](),controller[_0x87c8('0x45')]);router[_0x87c8('0x3f')](_0x87c8('0x46'),auth[_0x87c8('0x9')](),controller['pause']);router['post']('/:id/unpause',auth[_0x87c8('0x9')](),controller[_0x87c8('0x47')]);router[_0x87c8('0x3f')]('/:id/teams',auth[_0x87c8('0x9')](),controller[_0x87c8('0x48')]);router[_0x87c8('0x3f')](_0x87c8('0x49'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x4a')]);router[_0x87c8('0x3f')]('/:id/mail_interactions',auth[_0x87c8('0x9')](),controller['addMailInteractions']);router[_0x87c8('0x3f')](_0x87c8('0x4b'),auth['isAuthenticated'](),controller[_0x87c8('0x4c')]);router[_0x87c8('0x3f')](_0x87c8('0x4d'),auth[_0x87c8('0x9')](),controller['addSmsInteractions']);router[_0x87c8('0x3f')](_0x87c8('0x4e'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x4f')]);router[_0x87c8('0x3f')](_0x87c8('0x50'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x51')]);router[_0x87c8('0x3f')](_0x87c8('0x52'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x53')]);router[_0x87c8('0x3f')](_0x87c8('0x2c'),auth['isAuthenticated'](),controller[_0x87c8('0x54')]);router['post'](_0x87c8('0x55'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x56')]);router[_0x87c8('0x3f')](_0x87c8('0x2f'),auth[_0x87c8('0x9')](),controller['addSmsAccounts']);router[_0x87c8('0x3f')]('/:id/chat_websites',auth['isAuthenticated'](),controller['addChatWebsites']);router['post'](_0x87c8('0x33'),auth['isAuthenticated'](),controller['addWhatsappAccounts']);router['post'](_0x87c8('0x57'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x58')]);router['post'](_0x87c8('0x36'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x59')]);router[_0x87c8('0x5a')](_0x87c8('0x10'),auth[_0x87c8('0x9')](),controller['update']);router[_0x87c8('0x5a')](_0x87c8('0x5b'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x5c')]);router[_0x87c8('0x5d')](_0x87c8('0x5e'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x5f')]);router[_0x87c8('0x5d')](_0x87c8('0x27'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x60')]);router[_0x87c8('0x5d')]('/:id',auth[_0x87c8('0x9')](),controller['destroy']);router[_0x87c8('0x5d')](_0x87c8('0x49'),auth['isAuthenticated'](),controller[_0x87c8('0x61')]);router[_0x87c8('0x5d')](_0x87c8('0x62'),auth['isAuthenticated'](),controller[_0x87c8('0x63')]);router[_0x87c8('0x5d')](_0x87c8('0x4b'),auth[_0x87c8('0x9')](),controller['removeFaxInteractions']);router['delete'](_0x87c8('0x4d'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x64')]);router[_0x87c8('0x5d')]('/:id/openchannel_interactions',auth[_0x87c8('0x9')](),controller[_0x87c8('0x65')]);router['delete'](_0x87c8('0x50'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x66')]);router[_0x87c8('0x5d')]('/:id/fax_accounts',auth[_0x87c8('0x9')](),controller['removeFaxAccounts']);router[_0x87c8('0x5d')](_0x87c8('0x2c'),auth['isAuthenticated'](),controller[_0x87c8('0x67')]);router[_0x87c8('0x5d')]('/:id/openchannel_accounts',auth[_0x87c8('0x9')](),controller[_0x87c8('0x68')]);router[_0x87c8('0x5d')](_0x87c8('0x2f'),auth[_0x87c8('0x9')](),controller['removeSmsAccounts']);router[_0x87c8('0x5d')](_0x87c8('0x31'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x69')]);router[_0x87c8('0x5d')](_0x87c8('0x33'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x6a')]);router[_0x87c8('0x5d')](_0x87c8('0x57'),auth[_0x87c8('0x9')](),controller['removeSquareProjects']);router[_0x87c8('0x5d')](_0x87c8('0x36'),auth[_0x87c8('0x9')](),controller[_0x87c8('0x6b')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/user/user.attributes.js b/server/api/user/user.attributes.js index bb66892..c1d8e12 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 _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 +var _0xb934=['friend','from-sip','ALLOWED_NOT_SCREENED','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','join','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','auto','yes','nonat','outgoing','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','originate','uac','uas','certificate','actpass','update,nonat','TEXT','showWebBar','get','isArray','wss','encryption','force_avp','icesupport','dtlsverify','dtlssetup','dtlscertfile','rtcp_mux','avpf','dtlsenable','/etc/pki/tls/certs/motion.crt','dtlsprivatekey','/etc/pki/tls/private/motion.key','permissions','map','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blocked','blockedAt','loginAttempts','sequelize','moment','util','exports','STRING','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','fullname','callerid','format','\x22%s\x22\x20<%s>','getDataValue','internal','email','toLowerCase','ENUM','admin','user','agent','telephone','local','INTEGER','accountcode','BOOLEAN','DATE','dynamic'];(function(_0x1e9604,_0x5de613){var _0x522053=function(_0x573a73){while(--_0x573a73){_0x1e9604['push'](_0x1e9604['shift']());}};_0x522053(++_0x5de613);}(_0xb934,0x92));var _0x4b93=function(_0x44eb31,_0x4edf7f){_0x44eb31=_0x44eb31-0x0;var _0x911762=_0xb934[_0x44eb31];return _0x911762;};'use strict';var Sequelize=require(_0x4b93('0x0'));var moment=require(_0x4b93('0x1'));var util=require(_0x4b93('0x2'));var _=require('lodash');module[_0x4b93('0x3')]={'name':{'type':Sequelize[_0x4b93('0x4')],'allowNull':![],'unique':_0x4b93('0x5'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x2b2930){this[_0x4b93('0x6')]('name',_0x2b2930);this['setDataValue'](_0x4b93('0x7'),_0x2b2930);},'comment':_0x4b93('0x8')},'fullname':{'type':Sequelize[_0x4b93('0x4')],'allowNull':![],'set':function(_0x403554){this['setDataValue'](_0x4b93('0x9'),_0x403554);this[_0x4b93('0x6')](_0x4b93('0xa'),util[_0x4b93('0xb')](_0x4b93('0xc'),_0x403554,this[_0x4b93('0xd')](_0x4b93('0xe'))));}},'alias':{'type':Sequelize[_0x4b93('0x4')]},'email':{'type':Sequelize[_0x4b93('0x4')],'allowNull':![],'unique':'email','validate':{'isEmail':!![]},'set':function(_0x2c33cc){if(_0x2c33cc){this[_0x4b93('0x6')](_0x4b93('0xf'),_0x2c33cc[_0x4b93('0x10')]());}}},'role':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x12'),_0x4b93('0x13'),_0x4b93('0x14'),_0x4b93('0x15')),'allowNull':![]},'password':{'type':Sequelize[_0x4b93('0x4')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0x4b93('0x4')],'defaultValue':_0x4b93('0x16')},'internal':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':![],'unique':_0x4b93('0xe'),'set':function(_0x11dd47){this['setDataValue'](_0x4b93('0xe'),_0x11dd47);this[_0x4b93('0x6')](_0x4b93('0x18'),_0x11dd47);this['setDataValue'](_0x4b93('0xa'),util[_0x4b93('0xb')](_0x4b93('0xc'),this[_0x4b93('0xd')](_0x4b93('0x9')),_0x11dd47));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x4b93('0x4')]},'mobile':{'type':Sequelize[_0x4b93('0x4')]},'address':{'type':Sequelize['STRING']},'zipcode':{'type':Sequelize['STRING']},'userpic':{'type':Sequelize[_0x4b93('0x4')]},'city':{'type':Sequelize[_0x4b93('0x4')]},'country':{'type':Sequelize[_0x4b93('0x4')]},'online':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x4b93('0x1a')]},'voicePause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'openchannelPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'pauseType':{'type':Sequelize['STRING'],'defaultValue':'DEFAULT\x20PAUSE'},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'mailCapacity':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0x4b93('0x17')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x4b93('0x17')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'chanspy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'host':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x4b93('0x1b')},'ipaddr':{'type':Sequelize['STRING'],'allowNull':!![]},'port':{'type':Sequelize['INTEGER'](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'regserver':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'useragent':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'lastms':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x1c'),_0x4b93('0x13'),'peer'),'allowNull':!![],'defaultValue':_0x4b93('0x1c')},'context':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![],'defaultValue':_0x4b93('0x1d')},'callingpres':{'type':Sequelize['ENUM'](_0x4b93('0x1e'),'ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN',_0x4b93('0x1f'),_0x4b93('0x20'),_0x4b93('0x21'),_0x4b93('0x22'),_0x4b93('0x23')),'allowNull':!![]},'deny':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'permit':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'secret':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'transport':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x4b93('0x24'),'set':function(_0x5d49f5){this['setDataValue'](_0x4b93('0x25'),_0x5d49f5?_0x5d49f5[_0x4b93('0x26')](','):null);},'get':function(){return this[_0x4b93('0xd')](_0x4b93('0x25'))?this[_0x4b93('0xd')](_0x4b93('0x25'))[_0x4b93('0x27')](','):null;},'comment':_0x4b93('0x28')},'dtmfmode':{'type':Sequelize['ENUM'](_0x4b93('0x29'),_0x4b93('0x2a'),'shortinfo','inband',_0x4b93('0x2b')),'allowNull':!![],'defaultValue':_0x4b93('0x29')},'directmedia':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no',_0x4b93('0x2d'),'update',_0x4b93('0x2e')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'nat':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![],'defaultValue':'force_rport,comedia','set':function(_0x598ab8){this['setDataValue']('nat',_0x598ab8?_0x598ab8[_0x4b93('0x26')](','):null);},'get':function(){return this[_0x4b93('0xd')]('nat')?this[_0x4b93('0xd')](_0x4b93('0x2f'))[_0x4b93('0x27')](','):null;},'comment':_0x4b93('0x30')},'callgroup':{'type':Sequelize['STRING']},'namedcallgroup':{'type':Sequelize[_0x4b93('0x4')]},'pickupgroup':{'type':Sequelize[_0x4b93('0x4')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x4b93('0x4')],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING']},'disallow':{'type':Sequelize[_0x4b93('0x4')],'allowNull':![],'defaultValue':'all'},'allow':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x4b93('0x31'),'set':function(_0x36d50a){this['setDataValue']('allow',_0x36d50a?_0x36d50a[_0x4b93('0x26')](';'):_0x4b93('0x31'));},'get':function(){return this[_0x4b93('0xd')](_0x4b93('0x32'))?this[_0x4b93('0xd')](_0x4b93('0x32'))[_0x4b93('0x27')](';'):null;},'comment':_0x4b93('0x33')},'autoframing':{'type':Sequelize['ENUM'](_0x4b93('0x2c'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize['STRING'],'allowNull':!![],'set':function(_0x10ffff){this['setDataValue'](_0x4b93('0x34'),_0x10ffff?_0x10ffff[_0x4b93('0x26')](','):null);},'get':function(){return this[_0x4b93('0xd')]('insecure')?this[_0x4b93('0xd')](_0x4b93('0x34'))['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]'},'trustrpid':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no','never'),'allowNull':!![]},'promiscredir':{'type':Sequelize['ENUM'](_0x4b93('0x2c'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x4b93('0x11')]('yes','no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'callerid':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':_0x4b93('0x2c')},'busylevel':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x4b93('0x11')]('yes','no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'template':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x4b93('0x11')]('yes','no','always'),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x4b93('0x11')]('accept','refuse',_0x4b93('0x35')),'allowNull':!![]},'session_expires':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x36'),_0x4b93('0x37')),'allowNull':!![],'defaultValue':_0x4b93('0x37')},'t38pt_usertpsource':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'fromuser':{'type':Sequelize['STRING'],'allowNull':!![]},'qualify':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':_0x4b93('0x2c')},'keepalive':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'callbackextension':{'type':Sequelize['STRING'],'allowNull':!![]},'timert1':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize['ENUM'](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize['ENUM'](_0x4b93('0x2c'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0x4b93('0x11')]('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no','fingerprint',_0x4b93('0x38')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x4b93('0x11')]('active','passive',_0x4b93('0x39')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x4b93('0x17')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize['ENUM'](_0x4b93('0x2c'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'mohinterpret':{'type':Sequelize['STRING'],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no',_0x4b93('0x2d'),'update',_0x4b93('0x3a')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x4b93('0x4')]},'resetPasswordExpires':{'type':Sequelize['DATE']},'passwordResetAt':{'type':Sequelize[_0x4b93('0x1a')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0x4b93('0x3b')]},'showWebBar':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0,'set':function(_0x410591){this[_0x4b93('0x6')](_0x4b93('0x3c'),_0x410591);var _0x100909=this[_0x4b93('0x3d')]({'plain':!![]});switch(_0x410591){case 0x0:case 0x1:var _0x5ae347=_0x100909['transport']?_[_0x4b93('0x3e')](_0x100909[_0x4b93('0x25')])?_0x100909[_0x4b93('0x25')][_0x4b93('0x26')]():_0x100909[_0x4b93('0x25')]:_0x4b93('0x24');if(_0x5ae347===_0x4b93('0x3f')){_0x5ae347=_0x4b93('0x24');}this[_0x4b93('0x6')](_0x4b93('0x25'),_0x5ae347);this[_0x4b93('0x6')](_0x4b93('0x40'),'no');this[_0x4b93('0x6')]('avpf',null);this['setDataValue'](_0x4b93('0x41'),null);this[_0x4b93('0x6')](_0x4b93('0x42'),null);this[_0x4b93('0x6')]('dtlsenable',null);this[_0x4b93('0x6')](_0x4b93('0x43'),null);this[_0x4b93('0x6')](_0x4b93('0x44'),null);this[_0x4b93('0x6')](_0x4b93('0x45'),null);this['setDataValue']('dtlsprivatekey',null);this[_0x4b93('0x6')](_0x4b93('0x46'),'no');break;case 0x2:this[_0x4b93('0x6')](_0x4b93('0x25'),_0x4b93('0x3f'));this[_0x4b93('0x6')](_0x4b93('0x40'),_0x4b93('0x2c'));this['setDataValue'](_0x4b93('0x47'),_0x4b93('0x2c'));this['setDataValue'](_0x4b93('0x41'),'yes');this['setDataValue'](_0x4b93('0x42'),_0x4b93('0x2c'));this['setDataValue'](_0x4b93('0x48'),_0x4b93('0x2c'));this['setDataValue']('dtlsverify','no');this[_0x4b93('0x6')]('dtlssetup',_0x4b93('0x39'));this[_0x4b93('0x6')](_0x4b93('0x45'),_0x100909[_0x4b93('0x45')]||_0x4b93('0x49'));this[_0x4b93('0x6')](_0x4b93('0x4a'),_0x100909[_0x4b93('0x4a')]||_0x4b93('0x4b'));this[_0x4b93('0x6')](_0x4b93('0x46'),_0x4b93('0x2c'));break;default:}}},'permissions':{'type':Sequelize[_0x4b93('0x3b')],'set':function(_0x384ae4){this[_0x4b93('0x6')](_0x4b93('0x4c'),_0x384ae4?_0x384ae4[_0x4b93('0x26')](','):[]);},'get':function(){return this[_0x4b93('0xd')](_0x4b93('0x4c'))?_[_0x4b93('0x4d')](this['getDataValue']('permissions')[_0x4b93('0x27')](','),function(_0x2ff91e){return parseInt(_0x2ff91e,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize['STRING']},'phoneBarNoReplyNumber':{'type':Sequelize[_0x4b93('0x4')]},'phoneBarBusyNumber':{'type':Sequelize['STRING']},'phoneBarUnconditional':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x4b93('0x4')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x4b93('0x11')](_0x4b93('0x2c'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x4b93('0x4')]},'phoneBarEnableJaws':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0x4b93('0x4e')],'get':function(){return this[_0x4b93('0xd')](_0x4b93('0x4f'))?this[_0x4b93('0xd')](_0x4b93('0x4f')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'hotdesk':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'interface':{'type':Sequelize[_0x4b93('0x4')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x4b93('0x4')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize['STRING'],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![],'set':function(_0x2c1b86){if(typeof _0x2c1b86===_0x4b93('0x50')){var _0x4d689a=_0x2c1b86==='1'?!![]:_0x2c1b86==='0'?![]:_0x2c1b86===_0x4b93('0x51')?!![]:_0x2c1b86===_0x4b93('0x52')?![]:![];this[_0x4b93('0x6')]('screenrecording',_0x4d689a);}else{this[_0x4b93('0x6')](_0x4b93('0x53'),_0x2c1b86);}}},'blocked':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':![],'set':function(_0x49664d){this[_0x4b93('0x6')](_0x4b93('0x54'),_0x49664d);if(_0x49664d===!![]){this[_0x4b93('0x6')](_0x4b93('0x55'),moment());this[_0x4b93('0x6')](_0x4b93('0x56'),0x0);}else{this[_0x4b93('0x6')]('blockedAt',null);}}},'blockedAt':{'type':Sequelize[_0x4b93('0x1a')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x4b93('0x17')],'defaultValue':0x0},'disabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'settingsEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x4b93('0x17')](0x5)['UNSIGNED'],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x4b93('0x19')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index bad8745..7708825 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 _0xe13a=['set','Content-Range','apply','reject','save','update','destroy','Users','user','Agents','Telephones','telephone','filter','ignore','value','includes','find','role','name','stack','send','index','map','rawAttributes','fieldName','key','model','differenceBy','password','salt','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','merge','type','VIRTUAL','sequelize','lower','col','options','User','includeAll','include','push','findAll','true','chat','rows','dataValues','sms','fax','mail','openchannel','whatsapp','all','catch','show','params','length','openTabs','body','describe','addContacts','omit','findById','validatePasswordPattern','max','internal','isNil','min_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','SELECT','from','mailbox','fullname','agent','permissions','102','113','110','104','105','106','107','108','109','100','111','115','create','Unauthorized','admin','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator','checkUserLimits','settingsEnabled','VoiceMail','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','bulkCreate','some','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator','each','compact','changePassword','oldPassword','Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword','authenticate','Sequelize','ValidationError','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','newPassword','Invalid\x20body\x20format.\x20Use\x20newPassword','Setting','findOne','enforcePasswordHistory','passwordHistoryLimit','securePassword','previousPasswords','validatePasswordHistory','updatePasswordsHistory','addQueues','channel','loginInPause','voicePause','interface','isValidChannel','Unknown\x20channel','add','capitalize','toLowerCase','Queues','ids','penalty','spread','QueueId','emit','Queue:save','voice','VoiceQueue','get','format','SIP/%s','upsert','removeQueues','remove','Queue:remove','UserVoiceQueueRt','addAvatar','file','filename','root','server/files/images/logos/default_profile.png','userpic','download','existsSync','server/files/images/','join','getOpenTabs','ChatOpenTabs','CHAT','createdAt','FaxOpenTabs','FAX','OpenchannelOpenTabs','MailOpenTabs','MAIL','SmsOpenTabs','SMS','WhatsappOpenTabs','WHATSAPP','getContacts','CmContact','pick','CmList','List','Tag','Tags','color','tag','Queue','Unknown\x20role','getVoiceQueuesRt','ChatGroup','getGroups','getRecordings','UserId','VoiceRecording','getScreenRecordings','ScreenRecording','ChatInteraction','getChatInteractions','getOpenchannelInteractions','OpenchannelInteraction','MailInteraction','getSmsInteractions','FaxInteraction','getFaxInteractions','getWhatsappInteractions','WhatsappInteraction','login','mobile','LOCAL/%s@from-sip/n','intrf','user:%s','user:forcelogout','connection','remoteAddress','socket','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','MemberReport','forEach','YYYY-MM-DD\x20HH:mm:ss','LOGIN','PAUSE','LOGININPAUSE','concat','isMiddleware','resolve','logout','pause','QueuePause','updateAttributes','getChannels','DEFAULT\x20PAUSE','mailPause','openchannelPause','smsPause','whatsapppause','pauseType','lastPauseAt','unpause','manual','%s%s','Pause','Team','getTeams','addTeams','getVoiceQueues','setDataValue','Voice','getChatQueues','Chat','getMailQueues','Mail','getSmsQueues','Sms','getWhatsappQueues','Whatsapp','Fax','getOpenchannelQueues','Openchannel','flatten','transaction','addAgent','online','getDataValue','removeTeams','getFaxQueues','removeAgent','getLists','getAgents','You\x20can\x27t\x20delete\x20yourself','addChatInteractions','user_has_chat_interactions:save','removeChatInteractions','isArray','addMailInteractions','removeMailInteractions','user_has_mail_interactions:remove','addFaxInteractions','removeFaxInteractions','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','user_has_openchannel_interactions:save','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','user_has_whatsapp_interactions:save','getVoicePrefixes','VoicePrefix','getFaxAccounts','addFaxAccounts','removeFaxAccounts','getMailAccounts','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','SmsAccount','addSmsAccounts','removeSmsAccounts','getChatWebsites','ChatWebsite','addChatWebsites','removeChatWebsites','WhatsappAccount','getWhatsappAccounts','addWhatsappAccounts','removeWhatsappAccounts','getSquareProjects','SquareProject','addSquareProjects','removeSquareProjects','CmHopper','$and','$or','$gt','$gte','$lt','$lte','$ne','$eq','$not','$notBetween','$in','$notIn','$like','$notLike','$iLike','$notILike','$any','lastName','phone','Contact','dialActive','retrieveApiKey','token','No\x20API\x20access\x20key\x20found!','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','createApiKey','nonce','removeApiKey','apiKeyNonce','API\x20key\x20not\x20available','whoami','Unable\x20to\x20retrieve\x20the\x20current\x20user','teams','queues','isEmpty','toString','asc','desc','substring','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','idle','unavailable','voiceStatus','busy','slice','charAt','toUpperCase','select','field','InteractionId','ui.createdAt','user_has_','_interactions','ui.UserId\x20=\x20?','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','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','defaults','redis','jayson/promise','client','http','request','then','info','User,\x20%s,\x20%s','request\x20sent','debug','User,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','end','json','offset','undefined','limit','count','status'];(function(_0x3866,_0x48964b){var _0x34669b=function(_0x3e7f10){while(--_0x3e7f10){_0x3866['push'](_0x3866['shift']());}};_0x34669b(++_0x48964b);}(_0xe13a,0x178));var _0xae13=function(_0xb85f63,_0x44d066){_0xb85f63=_0xb85f63-0x0;var _0x2f8986=_0xe13a[_0xb85f63];return _0x2f8986;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xae13('0x0'));var zipdir=require(_0xae13('0x1'));var jsonpatch=require(_0xae13('0x2'));var rp=require(_0xae13('0x3'));var moment=require('moment');var BPromise=require(_0xae13('0x4'));var Mustache=require(_0xae13('0x5'));var util=require(_0xae13('0x6'));var path=require(_0xae13('0x7'));var sox=require(_0xae13('0x8'));var csv=require(_0xae13('0x9'));var ejs=require(_0xae13('0xa'));var fs=require('fs');var fs_extra=require(_0xae13('0xb'));var _=require(_0xae13('0xc'));var squel=require('squel');var crypto=require(_0xae13('0xd'));var jsforce=require(_0xae13('0xe'));var deskjs=require(_0xae13('0xf'));var toCsv=require(_0xae13('0x9'));var querystring=require(_0xae13('0x10'));var Papa=require(_0xae13('0x11'));var Redis=require(_0xae13('0x12'));var values;var authService=require(_0xae13('0x13'));var qs=require(_0xae13('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xae13('0x15'));var logger=require(_0xae13('0x16'))(_0xae13('0x17'));var utils=require(_0xae13('0x18'));var config=require(_0xae13('0x19'));var licenseUtil=require(_0xae13('0x1a'));var db=require(_0xae13('0x1b'))['db'];config['redis']=_[_0xae13('0x1c')](config[_0xae13('0x1d')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./user.socket')['register'](socket);var jayson=require(_0xae13('0x1e'));var client=jayson[_0xae13('0x1f')][_0xae13('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x90cdc1,_0x537889,_0x2912a2,_0x5c25a4){return new BPromise(function(_0x3c488f,_0x5e46bc){var _0xe10aab=_0x5c25a4||client;return _0xe10aab[_0xae13('0x21')](_0x90cdc1,_0x2912a2)[_0xae13('0x22')](function(_0x118e52){logger[_0xae13('0x23')](_0xae13('0x24'),_0x537889,_0xae13('0x25'));logger[_0xae13('0x26')](_0xae13('0x27'),_0x537889,'request\x20sent',JSON[_0xae13('0x28')](_0x118e52));if(_0x118e52['error']){if(_0x118e52[_0xae13('0x29')][_0xae13('0x2a')]===0x1f4){logger['error'](_0xae13('0x24'),_0x537889,_0x118e52[_0xae13('0x29')][_0xae13('0x2b')]);return _0x5e46bc(_0x118e52[_0xae13('0x29')][_0xae13('0x2b')]);}logger[_0xae13('0x29')]('User,\x20%s,\x20%s',_0x537889,_0x118e52['error'][_0xae13('0x2b')]);return _0x3c488f(_0x118e52[_0xae13('0x29')]['message']);}else{logger[_0xae13('0x23')]('User,\x20%s,\x20%s',_0x537889,_0xae13('0x25'));_0x3c488f(_0x118e52[_0xae13('0x2c')][_0xae13('0x2b')]);}})['catch'](function(_0x57124a){logger['error'](_0xae13('0x24'),_0x537889,_0x57124a);_0x5e46bc(_0x57124a);});});}function respondWithStatusCode(_0xc5e6a7,_0x17ce58){_0x17ce58=_0x17ce58||0xcc;return function(_0x55a39b){if(_0x55a39b){return _0xc5e6a7[_0xae13('0x2d')](_0x17ce58);}return _0xc5e6a7['status'](_0x17ce58)[_0xae13('0x2e')]();};}function respondWithResult(_0x5de054,_0xbeda8d){_0xbeda8d=_0xbeda8d||0xc8;return function(_0x3117c2){if(_0x3117c2){return _0x5de054['status'](_0xbeda8d)[_0xae13('0x2f')](_0x3117c2);}};}function respondWithFilteredResult(_0x370ee0,_0x64b40b){return function(_0x306dfb){if(_0x306dfb){var _0x578e99=typeof _0x64b40b[_0xae13('0x30')]===_0xae13('0x31')&&typeof _0x64b40b[_0xae13('0x32')]===_0xae13('0x31');var _0x742759=_0x306dfb[_0xae13('0x33')];var _0x277b69=_0x578e99?0x0:_0x64b40b['offset'];var _0x133481=_0x578e99?_0x306dfb['count']:_0x64b40b[_0xae13('0x30')]+_0x64b40b[_0xae13('0x32')];var _0x2dc2af;if(_0x133481>=_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=_0x2dbb7a){_0x2cda4d=_0x2dbb7a;_0x42c276=0xc8;}else{_0x42c276=0xce;}_0x4b87bc[_0xdac9('0x2e')](_0x42c276);return _0x4b87bc[_0xdac9('0x33')](_0xdac9('0x34'),_0x2247f8+'-'+_0x2cda4d+'/'+_0x2dbb7a)[_0xdac9('0x35')](_0x170afd);}return null;};}function patchUpdates(_0x372f02){return function(_0x44eff2){try{jsonpatch[_0xdac9('0x36')](_0x44eff2,_0x372f02,!![]);}catch(_0x20397e){return BPromise[_0xdac9('0x37')](_0x20397e);}return _0x44eff2['save']();};}function saveUpdates(_0x5e7ebe,_0x1e6832){return function(_0x416501){if(_0x416501){return _0x416501[_0xdac9('0x38')](_0x5e7ebe)[_0xdac9('0x22')](function(_0x15dc5f){return _0x15dc5f;});}return null;};}function removeEntity(_0x49d59f,_0x1d125a){return function(_0x5934d8){if(_0x5934d8){return _0x5934d8[_0xdac9('0x39')]()[_0xdac9('0x22')](function(){var _0x5cfebf=_0x5934d8[_0xdac9('0x3a')]({'plain':!![]});if(_0x5cfebf['role']==='admin')return;var _0x47444d=[{'name':_0xdac9('0x3b'),'value':_0xdac9('0x3c'),'ignore':!![]},{'name':_0xdac9('0x3d'),'value':_0xdac9('0x3e'),'ignore':![]},{'name':_0xdac9('0x3f'),'value':'telephone','ignore':![]}];var _0x265975=_(_0x47444d)[_0xdac9('0x40')]('ignore')[_0xdac9('0x41')](_0xdac9('0x42'))[_0xdac9('0x42')]();if(_[_0xdac9('0x43')](_0x265975,_0x5cfebf[_0xdac9('0x44')])){return;}var _0x4620e3=_[_0xdac9('0x45')](_0x47444d,['value',_0x5cfebf[_0xdac9('0x44')]])[_0xdac9('0x46')];return db[_0xdac9('0x47')]['destroy']({'where':{'type':_0x4620e3,'resourceId':_0x5cfebf['id']}})[_0xdac9('0x22')](function(){return _0x5934d8;});})[_0xdac9('0x22')](function(){_0x49d59f[_0xdac9('0x2e')](0xcc)[_0xdac9('0x48')]();});}};}function handleEntityNotFound(_0x5acbd0,_0x58fd14){return function(_0x1d0243){if(!_0x1d0243){_0x5acbd0[_0xdac9('0x49')](0x194);}return _0x1d0243;};}function handleError(_0x2889f7,_0x260f0e){_0x260f0e=_0x260f0e||0x1f4;return function(_0x3f12ec){logger['error'](_0x3f12ec[_0xdac9('0x4a')]);if(_0x3f12ec['name']){delete _0x3f12ec[_0xdac9('0x46')];}_0x2889f7[_0xdac9('0x2e')](_0x260f0e)[_0xdac9('0x4b')](_0x3f12ec);};}exports[_0xdac9('0x4c')]=function(_0x2a50f0,_0x386b74){var _0x413fb1={},_0xb176e0={},_0x11362d={'count':0x0,'rows':[]};var _0x8a0538=_[_0xdac9('0x41')](db[_0xdac9('0x4d')][_0xdac9('0x4e')],function(_0x441676){return{'name':_0x441676['fieldName'],'type':_0x441676[_0xdac9('0x4f')][_0xdac9('0x50')]};});_0xb176e0['model']=_[_0xdac9('0x51')](_[_0xdac9('0x41')](_0x8a0538,_0xdac9('0x46')),[_0xdac9('0x52'),_0xdac9('0x53')]);_0xb176e0[_0xdac9('0x54')]=_['keys'](_0x2a50f0[_0xdac9('0x54')]);_0xb176e0['filters']=_[_0xdac9('0x55')](_0xb176e0[_0xdac9('0x56')],_0xb176e0[_0xdac9('0x54')]);_0x413fb1[_0xdac9('0x57')]=_['intersection'](_0xb176e0['model'],qs['fields'](_0x2a50f0[_0xdac9('0x54')]['fields']));_0x413fb1['attributes']=_0x413fb1[_0xdac9('0x57')][_0xdac9('0x58')]?_0x413fb1['attributes']:_0xb176e0['model'];if(!_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x59')](_0xdac9('0x5a'))){_0x413fb1[_0xdac9('0x30')]=qs[_0xdac9('0x30')](_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x30')]);_0x413fb1[_0xdac9('0x32')]=qs['offset'](_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x32')]);}_0x413fb1[_0xdac9('0x5b')]=qs[_0xdac9('0x5c')](_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x5c')]);_0x413fb1[_0xdac9('0x5d')]=qs[_0xdac9('0x5e')](_[_0xdac9('0x5f')](_0x2a50f0[_0xdac9('0x54')],_0xb176e0[_0xdac9('0x5e')]),_0x8a0538);if(_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x40')]){_0x413fb1[_0xdac9('0x5d')]=_['merge'](_0x413fb1['where'],{'$or':_['map'](_0x8a0538,function(_0x401958){if(_0x401958[_0xdac9('0x4f')]!=='VIRTUAL'){return db[_0xdac9('0x60')][_0xdac9('0x5d')](db[_0xdac9('0x60')]['fn']('lower',db[_0xdac9('0x60')][_0xdac9('0x61')](_0x401958['name'])),{'$like':db['sequelize']['fn'](_0xdac9('0x62'),'%'+_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x40')]+'%')});}})});}_0x413fb1=_[_0xdac9('0x63')]({},_0x413fb1,_0x2a50f0[_0xdac9('0x64')]);var _0x426774={'where':_0x413fb1[_0xdac9('0x5d')]};return db[_0xdac9('0x4d')][_0xdac9('0x31')](_0x426774)[_0xdac9('0x22')](function(_0x10a2cc){_0x11362d[_0xdac9('0x31')]=_0x10a2cc;if(_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x65')]){_0x413fb1[_0xdac9('0x66')]=[{'all':!![]}];}if(!_['includes'](_0x413fb1[_0xdac9('0x57')],'id')){_0x413fb1[_0xdac9('0x57')][_0xdac9('0x67')]('id');}return db[_0xdac9('0x4d')][_0xdac9('0x68')](_0x413fb1);})[_0xdac9('0x22')](function(_0x4b118e){_0x11362d[_0xdac9('0x69')]=_0x4b118e;if(_0x2a50f0[_0xdac9('0x54')][_0xdac9('0x6a')]===_0xdac9('0x6b')){var _0x3ead12=[];for(var _0x2a5bf9=0x0;_0x2a5bf9<_0x11362d[_0xdac9('0x69')][_0xdac9('0x58')];_0x2a5bf9++){_0x3ead12[_0xdac9('0x67')](get_open_tabs('chat',_0x11362d[_0xdac9('0x69')][_0x2a5bf9][_0xdac9('0x6c')]));_0x3ead12[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6d'),_0x11362d[_0xdac9('0x69')][_0x2a5bf9][_0xdac9('0x6c')]));_0x3ead12['push'](get_open_tabs('fax',_0x11362d[_0xdac9('0x69')][_0x2a5bf9][_0xdac9('0x6c')]));_0x3ead12[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6e'),_0x11362d[_0xdac9('0x69')][_0x2a5bf9][_0xdac9('0x6c')]));_0x3ead12['push'](get_open_tabs('openchannel',_0x11362d['rows'][_0x2a5bf9][_0xdac9('0x6c')]));_0x3ead12[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6f'),_0x11362d[_0xdac9('0x69')][_0x2a5bf9]['dataValues']));}return BPromise[_0xdac9('0x70')](_0x3ead12)[_0xdac9('0x22')](function(_0x2f20f9){return _0x11362d;});}else{return _0x11362d;}})[_0xdac9('0x22')](respondWithFilteredResult(_0x386b74,_0x413fb1))[_0xdac9('0x2d')](handleError(_0x386b74,null));};exports['show']=function(_0x19a46e,_0x5cb56f){var _0x60b64e={'raw':![],'where':{'id':_0x19a46e[_0xdac9('0x71')]['id']}},_0x571a8d={};_0x571a8d[_0xdac9('0x56')]=_[_0xdac9('0x51')](_[_0xdac9('0x72')](db[_0xdac9('0x4d')][_0xdac9('0x4e')]),[_0xdac9('0x52'),'salt']);_0x571a8d['query']=_['keys'](_0x19a46e[_0xdac9('0x54')]);_0x571a8d[_0xdac9('0x5e')]=_[_0xdac9('0x55')](_0x571a8d[_0xdac9('0x56')],_0x571a8d[_0xdac9('0x54')]);_0x60b64e[_0xdac9('0x57')]=_[_0xdac9('0x55')](_0x571a8d['model'],qs[_0xdac9('0x73')](_0x19a46e['query']['fields']));_0x60b64e[_0xdac9('0x57')]=_0x60b64e['attributes']['length']?_0x60b64e[_0xdac9('0x57')]:_0x571a8d[_0xdac9('0x56')];if(_0x19a46e[_0xdac9('0x54')]['includeAll']){_0x60b64e['include']=[{'all':!![]}];}_0x60b64e=_[_0xdac9('0x63')]({},_0x60b64e,_0x19a46e[_0xdac9('0x64')]);if(!_['includes'](_0x60b64e[_0xdac9('0x57')],'id')){_0x60b64e[_0xdac9('0x57')][_0xdac9('0x67')]('id');}return db[_0xdac9('0x4d')][_0xdac9('0x45')](_0x60b64e)[_0xdac9('0x22')](handleEntityNotFound(_0x5cb56f,null))[_0xdac9('0x22')](function(_0xef4531){var _0xa8d621=[];values=_0xef4531;if(_0x19a46e[_0xdac9('0x54')][_0xdac9('0x6a')]===_0xdac9('0x6b')){_0xa8d621['push'](get_open_tabs(_0xdac9('0x74'),_0xef4531['dataValues']));_0xa8d621[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6d'),_0xef4531['dataValues']));_0xa8d621[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x75'),_0xef4531[_0xdac9('0x6c')]));_0xa8d621[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6f'),_0xef4531[_0xdac9('0x6c')]));_0xa8d621[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x76'),_0xef4531[_0xdac9('0x6c')]));_0xa8d621[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6e'),_0xef4531[_0xdac9('0x6c')]));return BPromise[_0xdac9('0x70')](_0xa8d621);}else{return values;}})[_0xdac9('0x22')](function(_0x40d903){return values;})[_0xdac9('0x22')](respondWithResult(_0x5cb56f,null))['catch'](handleError(_0x5cb56f,null));};exports[_0xdac9('0x38')]=function(_0x35c3b1,_0x30bef0){if(_0x35c3b1[_0xdac9('0x77')]['id']){delete _0x35c3b1['body']['id'];}delete _0x35c3b1[_0xdac9('0x77')][_0xdac9('0x44')];return db[_0xdac9('0x4d')]['find']({'where':{'id':_0x35c3b1[_0xdac9('0x71')]['id']}})[_0xdac9('0x22')](handleEntityNotFound(_0x30bef0,null))['then'](saveUpdates(_0x35c3b1[_0xdac9('0x77')],null))[_0xdac9('0x22')](respondWithResult(_0x30bef0,null))[_0xdac9('0x2d')](handleError(_0x30bef0,null));};exports['describe']=function(_0x43f94b,_0x1f5a48){return db[_0xdac9('0x4d')]['describe']()['then'](respondWithResult(_0x1f5a48,null))[_0xdac9('0x2d')](handleError(_0x1f5a48,null));};exports[_0xdac9('0x78')]=function(_0x185ee1,_0x2ebd56,_0x4110da){return db[_0xdac9('0x4d')][_0xdac9('0x45')]({'where':{'id':_0x185ee1[_0xdac9('0x71')]['id']}})[_0xdac9('0x22')](handleEntityNotFound(_0x2ebd56,null))[_0xdac9('0x22')](function(_0x1c0d5c){if(_0x1c0d5c){return _0x1c0d5c[_0xdac9('0x78')](_0x185ee1[_0xdac9('0x77')]['ids'],_['omit'](_0x185ee1[_0xdac9('0x77')],['ids','id'])||{});}})['then'](respondWithResult(_0x2ebd56,null))[_0xdac9('0x2d')](handleError(_0x2ebd56,null));};function validateUser(_0x199518){return new BPromise(function(_0x4417cf,_0x2c889d){if(_0x199518['internal'])return _0x4417cf(_0x199518);return db[_0xdac9('0x79')][_0xdac9('0x7a')](0x1)[_0xdac9('0x22')](function(_0x48a8fe){if(_0x48a8fe[_0xdac9('0x7b')])authService[_0xdac9('0x7c')](_0x199518['password']);db[_0xdac9('0x4d')]['max'](_0xdac9('0x7d'))['then'](function(_0x4241ee){if(_[_0xdac9('0x7e')](_0x4241ee)){_0x199518[_0xdac9('0x7d')]=_0x48a8fe[_0xdac9('0x7f')]||0x1;return;}if(_[_0xdac9('0x7e')](_0x48a8fe['min_internal'])||_0x48a8fe[_0xdac9('0x7f')]===_0x4241ee){_0x199518[_0xdac9('0x7d')]=_0x4241ee+0x1;return;}if(_0x48a8fe[_0xdac9('0x7f')]>_0x4241ee){_0x199518[_0xdac9('0x7d')]=_0x48a8fe[_0xdac9('0x7f')];return;}return db[_0xdac9('0x60')][_0xdac9('0x54')](_0xdac9('0x80'),{'type':db[_0xdac9('0x60')]['QueryTypes'][_0xdac9('0x81')]})[_0xdac9('0x22')](function(_0x12c15b){if(_0x12c15b&&_0x12c15b['length']){for(var _0x571130=0x0,_0x5650d1=_0x12c15b['length'];_0x571130<_0x5650d1&&_['isNil'](_0x199518[_0xdac9('0x7d')]);_0x571130++){if(_0x48a8fe[_0xdac9('0x7f')]<=_0x12c15b[_0x571130][_0xdac9('0x82')]){_0x199518[_0xdac9('0x7d')]=_0x12c15b[_0x571130]['from'];}else if(_0x48a8fe[_0xdac9('0x7f')]>_0x12c15b[_0x571130]['from']&&_0x48a8fe[_0xdac9('0x7f')]<=_0x12c15b[_0x571130]['to']){_0x199518[_0xdac9('0x7d')]=_0x48a8fe[_0xdac9('0x7f')];}}}if(_[_0xdac9('0x7e')](_0x199518['internal'])){_0x199518[_0xdac9('0x7d')]=_0x4241ee+0x1;}return _0x4417cf(_0x199518);});});})[_0xdac9('0x2d')](function(_0x3de93a){_0x2c889d(_0x3de93a);});});}function updateUser(_0x293c7e){return new BPromise(function(_0x5183b9,_0x4950f0){try{if(_0x293c7e[_0xdac9('0x83')]){_0x293c7e[_0xdac9('0x84')]=_0x293c7e[_0xdac9('0x7d')];_0x293c7e['VoiceMail']={'mailbox':_0x293c7e['internal'],'password':_0x293c7e[_0xdac9('0x52')],'fullname':_0x293c7e[_0xdac9('0x85')],'email':_0x293c7e[_0xdac9('0x86')]};}if(_0x293c7e[_0xdac9('0x44')]===_0xdac9('0x3e')){if(!_0x293c7e[_0xdac9('0x87')])_0x293c7e[_0xdac9('0x87')]=[_0xdac9('0x88'),_0xdac9('0x89'),_0xdac9('0x8a'),_0xdac9('0x8b'),_0xdac9('0x8c'),_0xdac9('0x8d'),'105',_0xdac9('0x8e'),_0xdac9('0x8f'),'108',_0xdac9('0x90'),'100',_0xdac9('0x91'),_0xdac9('0x92'),_0xdac9('0x93')];}_0x5183b9(_0x293c7e);}catch(_0x44af8c){_0x4950f0(_0x44af8c);}});}exports[_0xdac9('0x94')]=function(_0xc4207f,_0x232876){if(_0xc4207f[_0xdac9('0x3c')][_0xdac9('0x44')]===_0xdac9('0x3e'))throw new Error(_0xdac9('0x95'));if(_0xc4207f['body'][_0xdac9('0x44')]===_0xdac9('0x3c')&&_0xc4207f[_0xdac9('0x3c')][_0xdac9('0x44')]!==_0xdac9('0x96')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_0xc4207f['body'][_0xdac9('0x44')]==='admin'&&_0xc4207f['user'][_0xdac9('0x44')]!==_0xdac9('0x96')){throw new Error(_0xdac9('0x97'));}return licenseUtil[_0xdac9('0x98')]([_0xc4207f['body']])[_0xdac9('0x22')](function(){return validateUser(_0xc4207f[_0xdac9('0x77')]);})[_0xdac9('0x22')](function(_0x59bf3d){return updateUser(_0x59bf3d)['then'](function(_0x353229){if(_0x353229[_0xdac9('0x44')]==='admin'){_0x353229['settingsEnabled']=_0xc4207f['user'][_0xdac9('0x99')];delete _0x353229[_0xdac9('0x9a')];}return _0x353229;});})[_0xdac9('0x22')](function(_0x48efec){return db[_0xdac9('0x4d')][_0xdac9('0x94')](_0x48efec,{'include':[{'model':db[_0xdac9('0x9b')],'as':_0xdac9('0x9b')}]});})[_0xdac9('0x22')](function(_0x4e860d){if(_0xc4207f[_0xdac9('0x77')][_0xdac9('0x44')]==='user')return _0x4e860d;if(_0xc4207f[_0xdac9('0x3c')][_0xdac9('0x44')]!==_0xdac9('0x3c'))return _0x4e860d;return db[_0xdac9('0x9c')]['find']({'where':{'name':_0x4e860d['role']===_0xdac9('0x3e')?_0xdac9('0x3d'):'Telephones','userProfileId':_0xc4207f['user'][_0xdac9('0x9a')]},'raw':!![]})['then'](function(_0x208c4c){if(!_0x208c4c||_0x208c4c['autoAssociation']!=0x0)return _0x4e860d;return db['UserProfileResource'][_0xdac9('0x94')]({'name':_0x4e860d[_0xdac9('0x46')],'resourceId':_0x4e860d['id'],'type':_0x208c4c[_0xdac9('0x46')],'sectionId':_0x208c4c['id']},{})[_0xdac9('0x22')](function(){return _0x4e860d;});})[_0xdac9('0x2d')](function(_0x131a09){logger[_0xdac9('0x2a')](_0xdac9('0x9d'),_0x131a09);throw _0x131a09;});})[_0xdac9('0x22')](respondWithResult(_0x232876,0xc9))[_0xdac9('0x2d')](handleError(_0x232876,null));};exports[_0xdac9('0x9e')]=function(_0xe8086e,_0x35402f){var _0x4aa25e=_0xe8086e[_0xdac9('0x77')];var _0x475a19=[];if(_0xe8086e[_0xdac9('0x3c')][_0xdac9('0x44')]===_0xdac9('0x3e'))throw new Error(_0xdac9('0x95'));if(_[_0xdac9('0x9f')](_0x4aa25e,[_0xdac9('0x44'),_0xdac9('0x3c')])&&_0xe8086e[_0xdac9('0x3c')][_0xdac9('0x44')]!=='admin'){throw new Error(_0xdac9('0xa0'));}if(_[_0xdac9('0x9f')](_0x4aa25e,[_0xdac9('0x44'),_0xdac9('0x96')])&&_0xe8086e[_0xdac9('0x3c')][_0xdac9('0x44')]!==_0xdac9('0x96')){throw new Error(_0xdac9('0xa1'));}return licenseUtil[_0xdac9('0x98')](_0x4aa25e)[_0xdac9('0x22')](function(){return validateUser(_0x4aa25e[0x0]);})['then'](function(){for(var _0xcdfc7a=0x1;_0xcdfc7a<_0x4aa25e[_0xdac9('0x58')];_0xcdfc7a++){var _0x139c6c=_0x4aa25e[_0xcdfc7a-0x1][_0xdac9('0x7d')];if(!_0x4aa25e[_0xcdfc7a][_0xdac9('0x7d')])_0x4aa25e[_0xcdfc7a][_0xdac9('0x7d')]=_0x139c6c+0x1;_0x475a19[_0xdac9('0x67')](validateUser(_0x4aa25e[_0xcdfc7a]));}return BPromise[_0xdac9('0x70')](_0x475a19);})[_0xdac9('0x22')](function(){_0x475a19=[];for(var _0x5f2e90=0x0;_0x5f2e90<_0x4aa25e['length'];_0x5f2e90++){_0x475a19[_0xdac9('0x67')](updateUser(_0x4aa25e[_0x5f2e90]));}return BPromise[_0xdac9('0x70')](_0x475a19);})[_0xdac9('0x22')](function(){return BPromise[_0xdac9('0xa2')](_0x4aa25e,function(_0x15b7bf){return db[_0xdac9('0x4d')][_0xdac9('0x94')](_0x15b7bf,{'include':[{'model':db[_0xdac9('0x9b')],'as':_0xdac9('0x9b')}]})[_0xdac9('0x22')](function(_0x5e70a9){_0x15b7bf['id']=_0x5e70a9['id'];return _0x15b7bf;});});})[_0xdac9('0x22')](function(_0x7de757){if(_0xe8086e[_0xdac9('0x77')][_0xdac9('0x44')]===_0xdac9('0x3c'))return _0x7de757;if(_0xe8086e[_0xdac9('0x3c')][_0xdac9('0x44')]!==_0xdac9('0x3c'))return _0x7de757;var _0x401899=_[_0xdac9('0x9f')](_0x7de757,function(_0x29b01f){return _0x29b01f[_0xdac9('0x44')]==='agent'||_0x29b01f[_0xdac9('0x44')]===_0xdac9('0xa3');});if(!_0x401899)return _0x7de757;return db['UserProfileSection'][_0xdac9('0x68')]({'where':{'name':{'$or':[_0xdac9('0x3d'),_0xdac9('0x3f')]},'userProfileId':_0xe8086e[_0xdac9('0x3c')][_0xdac9('0x9a')]},'raw':!![]})['then'](function(_0x51b973){if(_[_0xdac9('0xa4')](_0x51b973)||!_[_0xdac9('0x9f')](_0x51b973,['autoAssociation',0x0]))return _0x7de757;_0x475a19=[];var _0x271664=_(_0x51b973)[_0xdac9('0x41')](function(_0x464202){if(_0x464202[_0xdac9('0xa5')]===0x1)return;return _0x464202['name']==='Agents'?_0xdac9('0x3e'):'telephone';})[_0xdac9('0xa6')]()[_0xdac9('0x42')]();for(var _0x115828=0x0;_0x115828<_0x7de757['length'];_0x115828++){if(!_[_0xdac9('0x43')](_0x271664,_0x7de757[_0x115828][_0xdac9('0x44')]))return;var _0x23739f=_0x7de757[_0x115828][_0xdac9('0x44')]===_0xdac9('0x3e')?_0xdac9('0x3d'):_0xdac9('0x3f');_0x475a19[_0xdac9('0x67')](db[_0xdac9('0x47')][_0xdac9('0x94')]({'name':_0x7de757[_0x115828][_0xdac9('0x46')],'resourceId':_0x7de757[_0x115828]['id'],'type':_0x23739f,'sectionId':_[_0xdac9('0x45')](_0x51b973,[_0xdac9('0x46'),_0x23739f])['id']},{}));}return BPromise[_0xdac9('0x70')](_0x475a19);});})[_0xdac9('0x22')](respondWithResult(_0x35402f,0xc9))[_0xdac9('0x2d')](handleError(_0x35402f,null));};exports[_0xdac9('0xa7')]=function(_0x375ee8,_0x123dec,_0x1efe77){if(_0x375ee8[_0xdac9('0x77')]['id']){delete _0x375ee8[_0xdac9('0x77')]['id'];}return db['User']['find']({'where':{'id':_0x375ee8[_0xdac9('0x71')]['id']}})[_0xdac9('0x22')](function(_0x381d67){if(!_0x381d67)return null;if(_0x381d67['id']===_0x375ee8[_0xdac9('0x3c')]['id']){if(!_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa8')]||!_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')]){throw new db['Sequelize'][(_0xdac9('0xaa'))](_0xdac9('0xab'));}if(!_0x381d67[_0xdac9('0xac')](_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa8')])){throw new db[(_0xdac9('0xad'))][(_0xdac9('0xaa'))](_0xdac9('0xae'));}if(_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa8')]===_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')]){throw new db['Sequelize'][(_0xdac9('0xaa'))](_0xdac9('0xaf'));}}else if(_0x375ee8['user']['role']===_0xdac9('0x96')){if(!_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')]){throw new db[(_0xdac9('0xad'))][(_0xdac9('0xaa'))](_0xdac9('0xb0'));}}else if(_0x375ee8[_0xdac9('0x3c')][_0xdac9('0x44')]==='user'){if(!_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')]){throw new db['Sequelize'][(_0xdac9('0xaa'))](_0xdac9('0xb0'));}if(_0x381d67[_0xdac9('0x44')]!==_0xdac9('0x3e')){throw new db['Sequelize'][(_0xdac9('0xaa'))](_0xdac9('0x95'));}}else{throw new db[(_0xdac9('0xad'))]['ValidationError'](_0xdac9('0x95'));}return _0x381d67;})[_0xdac9('0x22')](handleEntityNotFound(_0x123dec,null))['then'](function(_0x158dc7){return db[_0xdac9('0x79')][_0xdac9('0xb1')]({'attributes':['id',_0xdac9('0x7b'),_0xdac9('0xb2'),_0xdac9('0xb3')]})[_0xdac9('0x22')](function(_0x5511ef){if(_0x5511ef[_0xdac9('0x7b')])authService['validatePasswordPattern'](_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')]);if(!_0x5511ef['enforcePasswordHistory']||!_0x158dc7[_0xdac9('0xb4')])return _0x158dc7;authService[_0xdac9('0xb5')](_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')],_0x158dc7[_0xdac9('0xb4')],_0x5511ef['passwordHistoryLimit']);return _0x158dc7;})[_0xdac9('0x22')](saveUpdates({'password':_0x375ee8['body'][_0xdac9('0xa9')],'passwordResetAt':_0x375ee8[_0xdac9('0x3c')]['id']==_0x375ee8[_0xdac9('0x71')]['id']?moment():null,'previousPasswords':authService['updatePasswordsHistory'](_0x375ee8[_0xdac9('0x77')][_0xdac9('0xa9')],_0x158dc7[_0xdac9('0xb4')])},null));})['then'](respondWithResult(_0x123dec,null))[_0xdac9('0x2d')](handleError(_0x123dec,null));};exports[_0xdac9('0xb6')]=function(_0x1bfc68,_0x5ab412,_0x107bbf){var _0x5d8682=_0x1bfc68[_0xdac9('0x77')][_0xdac9('0xb7')];return db[_0xdac9('0x4d')][_0xdac9('0x45')]({'where':{'id':_0x1bfc68[_0xdac9('0x71')]['id']},'attributes':['id',_0xdac9('0x46'),_0xdac9('0x44'),'online',_0xdac9('0xb8'),_0xdac9('0xb9'),'interface']})['then'](handleEntityNotFound(_0x5ab412,null))[_0xdac9('0x22')](function(_0x7cf719){if(_0x7cf719){if(!utils[_0xdac9('0xba')](_0x5d8682)){throw new db[(_0xdac9('0xad'))][(_0xdac9('0xaa'))](_0xdac9('0xbb'));}return _0x7cf719[_0xdac9('0xbc')+_[_0xdac9('0xbd')](_0x5d8682[_0xdac9('0xbe')]())+_0xdac9('0xbf')](_0x1bfc68['body'][_0xdac9('0xc0')],{'penalty':_0x1bfc68[_0xdac9('0x77')]['penalty']||0x0})[_0xdac9('0xc1')](function(_0x51295a){for(var _0x4671e9=0x0;_0x4671e9<_0x1bfc68[_0xdac9('0x77')][_0xdac9('0xc0')]['length'];_0x4671e9+=0x1){var _0x227416={'UserId':_0x1bfc68[_0xdac9('0x71')]['id']};_0x227416[_[_0xdac9('0xbd')](_0x5d8682[_0xdac9('0xbe')]())+_0xdac9('0xc2')]=_0x1bfc68[_0xdac9('0x77')][_0xdac9('0xc0')][_0x4671e9];socket[_0xdac9('0xc3')](_0xdac9('0x3c')+_[_0xdac9('0xbd')](_0x5d8682['toLowerCase']())+_0xdac9('0xc4'),_0x227416);}return _0x51295a;})['then'](function(){if(_0x5d8682==='voice'){return db[_0xdac9('0xc5')][_0xdac9('0x68')]({'where':{'id':_0x1bfc68[_0xdac9('0x77')]['ids']||[]},'raw':!![],'attributes':['id',_0xdac9('0x46')]});}})[_0xdac9('0x22')](function(_0x2686d0){var _0x560e36=_0x7cf719[_0xdac9('0x3a')]({'plain':!![]});var _0x1195ba=[];if(_0x5d8682==='voice'&&_0x560e36[_0xdac9('0x44')]===_0xdac9('0x3e')&&_0x560e36[_0xdac9('0xc6')]){for(var _0x348bf4=0x0;_0x348bf4<_0x2686d0[_0xdac9('0x58')];_0x348bf4+=0x1){_0x1195ba[_0xdac9('0x67')]({'membername':_0x560e36[_0xdac9('0x46')],'UserId':_0x560e36['id'],'queue_name':_0x2686d0[_0x348bf4]['name'],'VoiceQueueId':_0x2686d0[_0x348bf4]['id'],'interface':_['isNil'](_0x560e36[_0xdac9('0xc7')])?util[_0xdac9('0xc8')]('SIP/%s',_0x560e36[_0xdac9('0x46')]):_0x560e36[_0xdac9('0xc7')],'paused':_0x560e36[_0xdac9('0xb9')]||![],'penalty':_0x1bfc68['body'][_0xdac9('0xc9')]||0x0});}return BPromise['each'](_0x1195ba,function(_0x74d0fd){return db[_0xdac9('0xca')][_0xdac9('0xcb')](_0x74d0fd);});}return _0x7cf719;});}})[_0xdac9('0x22')](respondWithStatusCode(_0x5ab412,null))[_0xdac9('0x2d')](handleError(_0x5ab412,null));};exports[_0xdac9('0xcc')]=function(_0x55473a,_0x38bce1,_0x2529cc){var _0x2bbfb7;return db[_0xdac9('0x4d')][_0xdac9('0x45')]({'where':{'id':_0x55473a[_0xdac9('0x71')]['id']},'attributes':['id',_0xdac9('0x46'),_0xdac9('0x44')]})['then'](handleEntityNotFound(_0x38bce1,null))['then'](function(_0x27504e){if(_0x27504e){_0x2bbfb7=_0x27504e;if(!_0x55473a['query'][_0xdac9('0xb7')]||!utils['isValidChannel'](_0x55473a[_0xdac9('0x54')][_0xdac9('0xb7')])){throw new db[(_0xdac9('0xad'))][(_0xdac9('0xaa'))](_0xdac9('0xbb'));}return _0x27504e[_0xdac9('0xcd')+_[_0xdac9('0xbd')](_0x55473a[_0xdac9('0x54')]['channel']['toLowerCase']())+_0xdac9('0xbf')](_0x55473a[_0xdac9('0x54')][_0xdac9('0xc0')]);}})[_0xdac9('0x22')](function(_0x1271c2){for(var _0x15be9d=0x0;_0x15be9d<_0x55473a['query'][_0xdac9('0xc0')][_0xdac9('0x58')];_0x15be9d+=0x1){var _0xd75cfd={'UserId':_0x55473a[_0xdac9('0x71')]['id']};_0xd75cfd[_[_0xdac9('0xbd')](_0x55473a['query'][_0xdac9('0xb7')][_0xdac9('0xbe')]())+_0xdac9('0xc2')]=_0x55473a[_0xdac9('0x54')][_0xdac9('0xc0')][_0x15be9d];socket['emit'](_0xdac9('0x3c')+_[_0xdac9('0xbd')](_0x55473a['query'][_0xdac9('0xb7')][_0xdac9('0xbe')]())+'Queue:remove',_0xd75cfd);}return _0x1271c2;})[_0xdac9('0x22')](function(){if(_0x55473a[_0xdac9('0x54')]['channel']===_0xdac9('0xce')){return db['UserVoiceQueueRt']['destroy']({'where':{'UserId':_0x55473a['params']['id'],'VoiceQueueId':_0x55473a['query']['ids']},'individualHooks':!![]})[_0xdac9('0x22')](function(){return _0x2bbfb7;});}return _0x2bbfb7;})[_0xdac9('0x22')](respondWithStatusCode(_0x38bce1,null))[_0xdac9('0x2d')](handleError(_0x38bce1,null));};exports[_0xdac9('0xcf')]=function(_0x7f1ef8,_0x1cf274,_0x2026f6){_0x7f1ef8[_0xdac9('0x77')]['userpic']=_0x7f1ef8[_0xdac9('0xd0')]['filename'];return db[_0xdac9('0x4d')]['find']({'where':{'id':_0x7f1ef8[_0xdac9('0x71')]['id']}})['then'](handleEntityNotFound(_0x1cf274,null))[_0xdac9('0x22')](saveUpdates(_0x7f1ef8[_0xdac9('0x77')],null))[_0xdac9('0x22')](respondWithResult(_0x1cf274,null))['catch'](handleError(_0x1cf274,null));};exports['getAvatar']=function(_0x26d613,_0x2cb05d,_0x269b07){var _0x5d7482=path[_0xdac9('0xd1')](config[_0xdac9('0xd2')],_0xdac9('0xd3'));return db[_0xdac9('0x4d')]['find']({'where':{'id':_0x26d613[_0xdac9('0x71')]['id']},'attributes':['id',_0xdac9('0xd4')],'raw':!![]})['then'](handleEntityNotFound(_0x2cb05d,null))[_0xdac9('0x22')](function(_0x5bde18){if(_0x5bde18){if(_[_0xdac9('0x7e')](_0x5bde18[_0xdac9('0xd4')])){return _0x2cb05d[_0xdac9('0xd5')](_0x5d7482);}else{if(!fs['existsSync'](path['join'](config[_0xdac9('0xd2')],_0xdac9('0xd6'),_0x5bde18[_0xdac9('0xd4')]))){return _0x2cb05d['download'](_0x5d7482);}return _0x2cb05d[_0xdac9('0xd5')](path['join'](config['root'],_0xdac9('0xd6'),_0x5bde18[_0xdac9('0xd4')]));}}})[_0xdac9('0x2d')](handleError(_0x2cb05d,null));};exports[_0xdac9('0xd7')]=function(_0x5f252f,_0x2381b0,_0x1a6d37){return db[_0xdac9('0x4d')][_0xdac9('0x45')]({'where':{'id':_0x5f252f[_0xdac9('0x71')]['id']},'attributes':['id']})[_0xdac9('0x22')](handleEntityNotFound(_0x2381b0,null))[_0xdac9('0x22')](function(_0x1c62c8){var _0x50db5a=[];values=_0x1c62c8[_0xdac9('0x6c')];_0x50db5a[_0xdac9('0x67')](get_open_tabs('chat',_0x1c62c8['dataValues']));_0x50db5a[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6d'),_0x1c62c8[_0xdac9('0x6c')]));_0x50db5a[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x75'),_0x1c62c8[_0xdac9('0x6c')]));_0x50db5a['push'](get_open_tabs(_0xdac9('0x6f'),_0x1c62c8[_0xdac9('0x6c')]));_0x50db5a['push'](get_open_tabs(_0xdac9('0x76'),_0x1c62c8[_0xdac9('0x6c')]));_0x50db5a[_0xdac9('0x67')](get_open_tabs(_0xdac9('0x6e'),_0x1c62c8[_0xdac9('0x6c')]));return BPromise[_0xdac9('0x70')](_0x50db5a);})[_0xdac9('0x22')](function(_0x4bd03a){var _0x4c0447=[];if(_0x4bd03a){for(var _0x3e0c5f=0x0;_0x3e0c5f=_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 +var _0x6eb8=['isValidChannel','Unknown\x20channel','UserVoiceQueueRt','system','chat','fax','sms','openchannel','%s%s','Pause','all','LogoutUser','LoginUser','phone','loginInPause','count','agent','../../config/license/util','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','destroy','getVoiceQueues','upsert','UserVoiceQueue.penalty','callysquare','merge','LOGININPAUSE','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./user.socket','register','request','then','User,\x20%s,\x20%s','debug','User,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','GetUser','User','findAll','options','raw','where','attributes','limit','include','map','model','stringify','catch','ShowUser','PauseUser','find','internal','interface','update','MemberReport','name','PAUSE','length','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','forEach','push','SIP/%s','format','body','type','DEFAULT\x20PAUSE','role','bulkCreate','findOne','channel'];(function(_0x284a15,_0x100920){var _0x7607da=function(_0x5503a7){while(--_0x5503a7){_0x284a15['push'](_0x284a15['shift']());}};_0x7607da(++_0x100920);}(_0x6eb8,0x77));var _0x86eb=function(_0x3cd335,_0x128c0c){_0x3cd335=_0x3cd335-0x0;var _0x4130ce=_0x6eb8[_0x3cd335];return _0x4130ce;};'use strict';var _=require('lodash');var util=require(_0x86eb('0x0'));var moment=require(_0x86eb('0x1'));var BPromise=require(_0x86eb('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x86eb('0x3'));var db=require(_0x86eb('0x4'))['db'];var utils=require(_0x86eb('0x5'));var logger=require(_0x86eb('0x6'))('rpc');var config=require(_0x86eb('0x7'));var jayson=require(_0x86eb('0x8'));var client=jayson[_0x86eb('0x9')]['http']({'port':0x232a});config[_0x86eb('0xa')]=_[_0x86eb('0xb')](config['redis'],{'host':_0x86eb('0xc'),'port':0x18eb});var socket=require(_0x86eb('0xd'))(new Redis(config[_0x86eb('0xa')]));require(_0x86eb('0xe'))[_0x86eb('0xf')](socket);function respondWithRpcPromise(_0x73bda6,_0x243b99,_0x57a328){return new BPromise(function(_0x2dfd57,_0x2b2e77){return client[_0x86eb('0x10')](_0x73bda6,_0x57a328)[_0x86eb('0x11')](function(_0xa03f9c){logger['info'](_0x86eb('0x12'),_0x243b99,'request\x20sent');logger[_0x86eb('0x13')](_0x86eb('0x14'),_0x243b99,_0x86eb('0x15'),JSON['stringify'](_0xa03f9c));if(_0xa03f9c[_0x86eb('0x16')]){if(_0xa03f9c['error'][_0x86eb('0x17')]===0x1f4){logger['error'](_0x86eb('0x12'),_0x243b99,_0xa03f9c[_0x86eb('0x16')][_0x86eb('0x18')]);return _0x2b2e77(_0xa03f9c['error']['message']);}logger[_0x86eb('0x16')](_0x86eb('0x12'),_0x243b99,_0xa03f9c['error']['message']);return _0x2dfd57(_0xa03f9c[_0x86eb('0x16')][_0x86eb('0x18')]);}else{logger[_0x86eb('0x19')](_0x86eb('0x12'),_0x243b99,_0x86eb('0x15'));_0x2dfd57(_0xa03f9c[_0x86eb('0x1a')][_0x86eb('0x18')]);}})['catch'](function(_0x821065){logger[_0x86eb('0x16')](_0x86eb('0x12'),_0x243b99,_0x821065);_0x2b2e77(_0x821065);});});}exports[_0x86eb('0x1b')]=function(_0x50050a){var _0x3cdb14=this;return new Promise(function(_0x15d382,_0x4cc176){return db[_0x86eb('0x1c')][_0x86eb('0x1d')]({'raw':_0x50050a['options']?_0x50050a[_0x86eb('0x1e')][_0x86eb('0x1f')]===undefined?!![]:![]:!![],'where':_0x50050a['options']?_0x50050a[_0x86eb('0x1e')][_0x86eb('0x20')]||null:null,'attributes':_0x50050a['options']?_0x50050a[_0x86eb('0x1e')][_0x86eb('0x21')]||null:null,'limit':_0x50050a[_0x86eb('0x1e')]?_0x50050a[_0x86eb('0x1e')][_0x86eb('0x22')]||null:null,'include':_0x50050a[_0x86eb('0x1e')]?_0x50050a[_0x86eb('0x1e')][_0x86eb('0x23')]?_[_0x86eb('0x24')](_0x50050a[_0x86eb('0x1e')][_0x86eb('0x23')],function(_0x5536fe){return{'model':db[_0x5536fe[_0x86eb('0x25')]],'as':_0x5536fe['as'],'attributes':_0x5536fe['attributes'],'include':_0x5536fe[_0x86eb('0x23')]?_['map'](_0x5536fe[_0x86eb('0x23')],function(_0x4fc5d2){return{'model':db[_0x4fc5d2['model']],'as':_0x4fc5d2['as'],'attributes':_0x4fc5d2[_0x86eb('0x21')],'include':_0x4fc5d2['include']?_['map'](_0x4fc5d2[_0x86eb('0x23')],function(_0x444ef0){return{'model':db[_0x444ef0['model']],'as':_0x444ef0['as'],'attributes':_0x444ef0[_0x86eb('0x21')]};}):[]};}):[]};}):[]:[]})[_0x86eb('0x11')](function(_0x1d13d6){logger['info']('GetUser',_0x50050a);logger['debug']('GetUser',_0x50050a,JSON[_0x86eb('0x26')](_0x1d13d6));_0x15d382(_0x1d13d6);})[_0x86eb('0x27')](function(_0x4b6d9f){logger['error'](_0x86eb('0x1b'),_0x4b6d9f[_0x86eb('0x18')],_0x50050a);_0x4cc176(_0x3cdb14[_0x86eb('0x16')](0x1f4,_0x4b6d9f[_0x86eb('0x18')]));});});};exports[_0x86eb('0x28')]=function(_0x1faad4){var _0x1e13db=this;return new Promise(function(_0x39b137,_0x2eccc3){return db[_0x86eb('0x1c')]['find']({'raw':_0x1faad4[_0x86eb('0x1e')]?_0x1faad4[_0x86eb('0x1e')][_0x86eb('0x1f')]===undefined?!![]:![]:!![],'where':_0x1faad4['options']?_0x1faad4[_0x86eb('0x1e')]['where']||null:null,'attributes':_0x1faad4[_0x86eb('0x1e')]?_0x1faad4['options'][_0x86eb('0x21')]||null:null,'include':_0x1faad4['options']?_0x1faad4[_0x86eb('0x1e')]['include']?_[_0x86eb('0x24')](_0x1faad4[_0x86eb('0x1e')][_0x86eb('0x23')],function(_0x42b761){return{'model':db[_0x42b761[_0x86eb('0x25')]],'as':_0x42b761['as'],'attributes':_0x42b761[_0x86eb('0x21')],'include':_0x42b761['include']?_[_0x86eb('0x24')](_0x42b761[_0x86eb('0x23')],function(_0x709b7c){return{'model':db[_0x709b7c[_0x86eb('0x25')]],'as':_0x709b7c['as'],'attributes':_0x709b7c[_0x86eb('0x21')],'include':_0x709b7c[_0x86eb('0x23')]?_[_0x86eb('0x24')](_0x709b7c[_0x86eb('0x23')],function(_0x573d20){return{'model':db[_0x573d20[_0x86eb('0x25')]],'as':_0x573d20['as'],'attributes':_0x573d20['attributes']};}):[]};}):[]};}):[]:[]})[_0x86eb('0x11')](function(_0x24a853){logger['info'](_0x86eb('0x28'),_0x1faad4);logger[_0x86eb('0x13')]('ShowUser',_0x1faad4,JSON[_0x86eb('0x26')](_0x24a853));_0x39b137(_0x24a853);})[_0x86eb('0x27')](function(_0x29c5f1){logger['error'](_0x86eb('0x28'),_0x29c5f1[_0x86eb('0x18')],_0x1faad4);_0x2eccc3(_0x1e13db['error'](0x1f4,_0x29c5f1[_0x86eb('0x18')]));});});};exports[_0x86eb('0x29')]=function(_0x1a3907){var _0x385660=this;return new Promise(function(_0x1e0dfb,_0x29f586){var _0x36f955;return db['User'][_0x86eb('0x2a')]({'where':_0x1a3907['options'][_0x86eb('0x20')]||{},'attributes':['id','name','role',_0x86eb('0x2b'),_0x86eb('0x2c')]})[_0x86eb('0x11')](function(_0x11dbb5){if(_0x11dbb5){_0x36f955=_0x11dbb5;return db['UserVoiceQueueRt'][_0x86eb('0x2d')]({'paused':0x1},{'where':{'UserId':_0x36f955['id']},'individualHooks':!![]});}})[_0x86eb('0x11')](function(){if(_0x36f955){return db[_0x86eb('0x2e')][_0x86eb('0x1d')]({'where':{'membername':_0x36f955[_0x86eb('0x2f')],'type':_0x86eb('0x30'),'exitAt':null}});}})[_0x86eb('0x11')](function(_0x1dec90){if(_0x36f955){if(_0x1dec90&&_0x1dec90[_0x86eb('0x31')]){var _0x178b2b=moment()['format'](_0x86eb('0x32'));for(var _0x33dc96=0x0,_0x14280f=_0x1dec90[_0x86eb('0x31')];_0x33dc96<_0x14280f;_0x33dc96++){_0x1dec90[_0x33dc96][_0x86eb('0x33')]({'exitAt':_0x178b2b});}}}})[_0x86eb('0x11')](function(){if(_0x36f955){var _0x4122bd=[];var _0x21434f=utils['getChannels']();_0x21434f[_0x86eb('0x34')](function(_0x282397){_0x4122bd[_0x86eb('0x35')]({'channel':_0x282397,'membername':_0x36f955['name'],'interface':_['isNil'](_0x36f955['interface'])?util['format'](_0x86eb('0x36'),_0x36f955[_0x86eb('0x2f')]):_0x36f955[_0x86eb('0x2c')],'type':'PAUSE','enterAt':moment()[_0x86eb('0x37')]('YYYY-MM-DD\x20HH:mm:ss'),'data1':_0x1a3907[_0x86eb('0x38')][_0x86eb('0x39')]||_0x86eb('0x3a'),'role':_0x36f955[_0x86eb('0x3b')],'internal':_0x36f955[_0x86eb('0x2b')],'uniqueid':_0x1a3907[_0x86eb('0x38')]['uniqueid']||null});});return db[_0x86eb('0x2e')][_0x86eb('0x3c')](_0x4122bd,{'individualHooks':!![]});}})[_0x86eb('0x11')](function(){if(_0x36f955){return _0x36f955[_0x86eb('0x2d')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x1a3907[_0x86eb('0x38')][_0x86eb('0x39')]||_0x86eb('0x3a'),'lastPauseAt':moment()[_0x86eb('0x37')]('YYYY-MM-DD\x20HH:mm:ss')});}})[_0x86eb('0x11')](function(_0x86ad38){_0x1e0dfb(_0x86ad38);})[_0x86eb('0x27')](function(_0x48629f){_0x29f586(_0x385660[_0x86eb('0x16')](0x1f4,_0x48629f[_0x86eb('0x18')]));});});};exports['UnpauseUser']=function(_0x31a8c2){var _0x4ab681=this;return new Promise(function(_0x37c112,_0x17d775){var _0x553381;return db[_0x86eb('0x1c')][_0x86eb('0x3d')]({'where':_0x31a8c2[_0x86eb('0x1e')]['where']||{},'attributes':['id','name']})[_0x86eb('0x11')](function(_0x20f844){if(_0x20f844){_0x553381=_0x20f844;if(_0x31a8c2[_0x86eb('0x38')][_0x86eb('0x3e')]&&!utils[_0x86eb('0x3f')](_0x31a8c2[_0x86eb('0x38')][_0x86eb('0x3e')])){throw new Error(_0x86eb('0x40'));}switch(_0x31a8c2[_0x86eb('0x38')][_0x86eb('0x3e')]){case'voice':return db[_0x86eb('0x41')][_0x86eb('0x2d')]({'paused':0x0},{'where':{'UserId':_0x553381['id']}})[_0x86eb('0x11')](function(){return db['MemberReport'][_0x86eb('0x2a')]({'where':{'channel':_0x31a8c2[_0x86eb('0x38')][_0x86eb('0x3e')],'membername':_0x553381['name'],'type':'PAUSE','exitAt':null}});})[_0x86eb('0x11')](function(_0x5645cd){if(_0x5645cd){return _0x5645cd['update']({'exitAt':moment()[_0x86eb('0x37')](_0x86eb('0x32')),'data2':_0x86eb('0x42')},{'individualHooks':!![]});}return null;})[_0x86eb('0x11')](function(){return _0x553381['update']({'voicePause':![]});});case'mail':case _0x86eb('0x43'):case _0x86eb('0x44'):case _0x86eb('0x45'):case _0x86eb('0x46'):case'whatsapp':return db[_0x86eb('0x2e')][_0x86eb('0x2a')]({'where':{'channel':_0x31a8c2['body'][_0x86eb('0x3e')],'membername':_0x553381[_0x86eb('0x2f')],'type':_0x86eb('0x30'),'exitAt':null}})[_0x86eb('0x11')](function(_0xf823f7){return _0xf823f7[_0x86eb('0x2d')]({'exitAt':moment()[_0x86eb('0x37')](_0x86eb('0x32')),'data2':_0x86eb('0x42')},{'individualHooks':!![]});})[_0x86eb('0x11')](function(){var _0x12dd17={};_['set'](_0x12dd17,util[_0x86eb('0x37')](_0x86eb('0x47'),_0x31a8c2[_0x86eb('0x38')]['channel'],_0x86eb('0x48')),![]);return _0x553381[_0x86eb('0x2d')](_0x12dd17);});default:return db['UserVoiceQueueRt'][_0x86eb('0x2d')]({'paused':0x0},{'where':{'UserId':_0x553381['id']}})['then'](function(){return db[_0x86eb('0x2e')]['findAll']({'where':{'membername':_0x553381['name'],'type':_0x86eb('0x30'),'exitAt':null}});})[_0x86eb('0x11')](function(_0x8ce71b){var _0x3c9564=[];_0x8ce71b[_0x86eb('0x34')](function(_0x30fd79){_0x3c9564[_0x86eb('0x35')](_0x30fd79[_0x86eb('0x2d')]({'exitAt':moment()[_0x86eb('0x37')](_0x86eb('0x32')),'data2':_0x86eb('0x42')}));});return BPromise[_0x86eb('0x49')](_0x3c9564);})['then'](function(){return _0x553381[_0x86eb('0x2d')]({'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![]});});}}})[_0x86eb('0x11')](function(_0x2a20eb){_0x37c112(_0x2a20eb);})[_0x86eb('0x27')](function(_0x43fcc9){_0x17d775(_0x4ab681[_0x86eb('0x16')](0x1f4,_0x43fcc9[_0x86eb('0x18')]));});});};exports[_0x86eb('0x4a')]=function(_0x18eecf){var _0x2fe13e=this;return new Promise(function(_0x554f06,_0x4ac737){var _0x36fee2;return db[_0x86eb('0x1c')][_0x86eb('0x3d')]({'where':_0x18eecf[_0x86eb('0x1e')][_0x86eb('0x20')]||{},'attributes':['id',_0x86eb('0x2f')]})['then'](function(_0x10481b){if(_0x10481b){_0x36fee2=_0x10481b;return db[_0x86eb('0x41')]['destroy']({'where':{'membername':_0x36fee2['name']},'individualHooks':!![]});}})[_0x86eb('0x11')](function(){if(_0x36fee2){return db[_0x86eb('0x2e')][_0x86eb('0x1d')]({'where':{'membername':_0x36fee2[_0x86eb('0x2f')],'exitAt':null}});}})[_0x86eb('0x11')](function(_0x91029e){if(_0x36fee2){if(_0x91029e&&_0x91029e[_0x86eb('0x31')]){var _0x4564f1=[];_0x91029e[_0x86eb('0x34')](function(_0x4ae82d){_0x4564f1[_0x86eb('0x35')](_0x4ae82d[_0x86eb('0x2d')]({'exitAt':moment()[_0x86eb('0x37')](_0x86eb('0x32'))}));});return BPromise['all'](_0x4564f1);}}})[_0x86eb('0x11')](function(){if(_0x36fee2){return _0x36fee2[_0x86eb('0x2d')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0x86eb('0x11')](function(_0x651a19){_0x554f06(_0x651a19);})[_0x86eb('0x27')](function(_0x1be514){_0x4ac737(_0x2fe13e['error'](0x1f4,_0x1be514[_0x86eb('0x18')]));});});};exports[_0x86eb('0x4b')]=function(_0x684129){var _0x4c8537=this;return new Promise(function(_0x167e2e,_0x400f74){var _0x318e0a;var _0xd67d6a;var _0xa03f00;var _0x140654;return db[_0x86eb('0x1c')]['findOne']({'where':_0x684129['options'][_0x86eb('0x20')]||{},'attributes':['id','name',_0x86eb('0x3b'),'mobile',_0x86eb('0x4c'),_0x86eb('0x2b'),_0x86eb('0x4d'),_0x86eb('0x2c')]})['then'](function(_0x261256){if(_0x261256){_0x318e0a=_0x261256;_0x140654=_0x684129['body'][_0x86eb('0x2c')]?_0x684129[_0x86eb('0x38')][_0x86eb('0x2c')]:util[_0x86eb('0x37')](_0x86eb('0x36'),_0x318e0a[_0x86eb('0x2f')]);return db[_0x86eb('0x1c')][_0x86eb('0x4e')]({'where':{'role':_0x86eb('0x4f'),'online':!![],'id':{'$ne':_0x318e0a['id']}}});}})[_0x86eb('0x11')](function(_0x2a8797){if(_0x2a8797){_0xa03f00=_0x2a8797;return require(_0x86eb('0x50'))[_0x86eb('0x51')]();}})[_0x86eb('0x11')](function(_0x4a8a85){if(_0x4a8a85&&_0x4a8a85['agents']&&_0xa03f00>=_0x4a8a85[_0x86eb('0x52')]){throw new Error(_0x86eb('0x53'));}})[_0x86eb('0x11')](function(){if(_0x318e0a){return db[_0x86eb('0x41')][_0x86eb('0x54')]({'where':{'membername':_0x318e0a[_0x86eb('0x2f')]},'individualHooks':!![]});}})[_0x86eb('0x11')](function(){if(_0x318e0a){return _0x318e0a[_0x86eb('0x55')]({'raw':!![]});}})['then'](function(_0x4b467d){if(_0x318e0a){if(_0x4b467d){var _0x65dc6c=[];_0xd67d6a=_0x4b467d;if(_0xd67d6a[_0x86eb('0x31')]){for(var _0x9b1e73=0x0;_0x9b1e73<_0xd67d6a['length'];_0x9b1e73++){_0x65dc6c[_0x86eb('0x35')](db[_0x86eb('0x41')][_0x86eb('0x56')]({'membername':_0x318e0a[_0x86eb('0x2f')],'UserId':_0x318e0a['id'],'queue_name':_0xd67d6a[_0x9b1e73]['name'],'VoiceQueueId':_0xd67d6a[_0x9b1e73]['id'],'interface':_0x140654,'paused':_0x318e0a['loginInPause']||![],'penalty':_0xd67d6a[_0x9b1e73][_0x86eb('0x57')]||0x0}));}return BPromise['all'](_0x65dc6c);}}}})[_0x86eb('0x11')](function(){if(_0x318e0a){return db[_0x86eb('0x2e')][_0x86eb('0x1d')]({'where':{'membername':_0x318e0a[_0x86eb('0x2f')],'exitAt':null}});}})[_0x86eb('0x11')](function(_0x1f7566){if(_0x318e0a){if(_0x1f7566&&_0x1f7566[_0x86eb('0x31')]){var _0x57599d=[];_0x1f7566[_0x86eb('0x34')](function(_0x704254){_0x57599d[_0x86eb('0x35')](_0x704254[_0x86eb('0x2d')]({'exitAt':moment()[_0x86eb('0x37')](_0x86eb('0x32'))}));});return BPromise[_0x86eb('0x49')](_0x57599d);}}})[_0x86eb('0x11')](function(_0x2cc6aa){if(_0x318e0a){var _0x22b646=[];var _0x56bf12=[];var _0x826077=utils['getChannels']();var _0x5c6511={'membername':_0x318e0a[_0x86eb('0x2f')],'interface':_0x140654,'enterAt':moment()['format'](_0x86eb('0x32')),'role':_0x318e0a[_0x86eb('0x3b')],'internal':_0x318e0a[_0x86eb('0x2b')]};_0x826077['forEach'](function(_0x5ab1ca){_0x22b646[_0x86eb('0x35')](_['merge']({'channel':_0x5ab1ca,'type':'LOGIN','data1':_0x86eb('0x58'),'data2':_0x140654},_0x5c6511));if(_0x318e0a[_0x86eb('0x4d')]){_0x56bf12['push'](_[_0x86eb('0x59')]({'channel':_0x5ab1ca,'type':_0x86eb('0x30'),'data1':_0x86eb('0x5a')},_0x5c6511));}});return db[_0x86eb('0x2e')]['bulkCreate'](_0x22b646['concat'](_0x56bf12),{'individualHooks':!![]});}})[_0x86eb('0x11')](function(){if(_0x318e0a){return _0x318e0a['update']({'online':!![],'lastLoginAt':moment()['format'](_0x86eb('0x32')),'voicePause':_0x318e0a[_0x86eb('0x4d')]||![],'mailPause':_0x318e0a[_0x86eb('0x4d')]||![],'chatPause':_0x318e0a['loginInPause']||![],'faxPause':_0x318e0a[_0x86eb('0x4d')]||![],'smsPause':_0x318e0a[_0x86eb('0x4d')]||![],'openchannelPause':_0x318e0a['loginInPause']||![],'pauseType':_0x318e0a[_0x86eb('0x4d')]?_0x86eb('0x5a'):null,'lastPauseAt':moment()[_0x86eb('0x37')](_0x86eb('0x32')),'interface':_0x140654});}})['then'](function(_0x5bd6f5){_0x167e2e(_0x5bd6f5);})[_0x86eb('0x27')](function(_0xadf240){_0x400f74(_0x4c8537[_0x86eb('0x16')](0x1f4,_0xadf240['message']));});});}; \ No newline at end of file diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index 1f83b6e..0b1ae00 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 _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 +var _0x1575=['removeListener','length','./user.events','save','remove','update'];(function(_0x524c49,_0x1dd919){var _0x512f84=function(_0x3a24d2){while(--_0x3a24d2){_0x524c49['push'](_0x524c49['shift']());}};_0x512f84(++_0x1dd919);}(_0x1575,0x68));var _0x5157=function(_0x1d7b23,_0x75416d){_0x1d7b23=_0x1d7b23-0x0;var _0x50fd26=_0x1575[_0x1d7b23];return _0x50fd26;};'use strict';var UserEvents=require(_0x5157('0x0'));var events=[_0x5157('0x1'),_0x5157('0x2'),_0x5157('0x3')];function createListener(_0x2634bb,_0x107a8a){return function(_0x35c7e5){_0x107a8a['emit'](_0x2634bb,_0x35c7e5);};}function removeListener(_0x38ff2f,_0x311d9c){return function(){UserEvents[_0x5157('0x4')](_0x38ff2f,_0x311d9c);};}exports['register']=function(_0x34b888){for(var _0x1d1aad=0x0,_0x5a907d=events[_0x5157('0x5')];_0x1d1aad<_0x5a907d;_0x1d1aad++){var _0x40a34b=events[_0x1d1aad];var _0x152054=createListener('user:'+_0x40a34b,_0x34b888);UserEvents['on'](_0x40a34b,_0x152054);}}; \ No newline at end of file diff --git a/server/api/userChatQueue/index.js b/server/api/userChatQueue/index.js index 8870b6d..ddc413f 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 _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 +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x521a13,_0x2cc0f8){var _0x15fe0a=function(_0x31bb4e){while(--_0x31bb4e){_0x521a13['push'](_0x521a13['shift']());}};_0x15fe0a(++_0x2cc0f8);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x576d8a,_0x2d7bde){_0x576d8a=_0x576d8a-0x0;var _0x3dc3ef=_0xcb91[_0x576d8a];return _0x3dc3ef;};'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 diff --git a/server/api/userChatQueue/userChatQueue.attributes.js b/server/api/userChatQueue/userChatQueue.attributes.js index 9006424..b1cdc7b 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. * // * * // ************************************************************************* -'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file +var _0xb59f=['exports','INTEGER'];(function(_0x16048b,_0x21f1c6){var _0x58ccc6=function(_0x4f7ac1){while(--_0x4f7ac1){_0x16048b['push'](_0x16048b['shift']());}};_0x58ccc6(++_0x21f1c6);}(_0xb59f,0x126));var _0xfb59=function(_0xed1eac,_0x8cbae6){_0xed1eac=_0xed1eac-0x0;var _0x4a2860=_0xb59f[_0xed1eac];return _0x4a2860;};'use strict';var Sequelize=require('sequelize');module[_0xfb59('0x0')]={'penalty':{'type':Sequelize[_0xfb59('0x1')],'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 6629dbf..623dba1 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 _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 +var _0x00a1=['define','UserChatQueue','user_has_chat_queues','lodash','api','bluebird','request-promise','path','../../config/environment','./userChatQueue.attributes','exports'];(function(_0x3bff39,_0x20e4ce){var _0x364f98=function(_0x263da0){while(--_0x263da0){_0x3bff39['push'](_0x3bff39['shift']());}};_0x364f98(++_0x20e4ce);}(_0x00a1,0x184));var _0x100a=function(_0x3dfc3a,_0x3cc1c5){_0x3dfc3a=_0x3dfc3a-0x0;var _0xb0d0fe=_0x00a1[_0x3dfc3a];return _0xb0d0fe;};'use strict';var _=require(_0x100a('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x100a('0x1'));var moment=require('moment');var BPromise=require(_0x100a('0x2'));var rp=require(_0x100a('0x3'));var fs=require('fs');var path=require(_0x100a('0x4'));var rimraf=require('rimraf');var config=require(_0x100a('0x5'));var attributes=require(_0x100a('0x6'));module[_0x100a('0x7')]=function(_0x26e0d1,_0x1d9016){return _0x26e0d1[_0x100a('0x8')](_0x100a('0x9'),attributes,{'tableName':_0x100a('0xa'),'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 bee259c..0f6ee4f 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 _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 +var _0xadfa=['request\x20sent','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','info','UserChatQueue,\x20%s,\x20%s'];(function(_0x1ec36a,_0x10d24e){var _0x16d2f5=function(_0x38d3ac){while(--_0x38d3ac){_0x1ec36a['push'](_0x1ec36a['shift']());}};_0x16d2f5(++_0x10d24e);}(_0xadfa,0xdb));var _0xaadf=function(_0x121ef2,_0x55f40d){_0x121ef2=_0x121ef2-0x0;var _0x1bb1d6=_0xadfa[_0x121ef2];return _0x1bb1d6;};'use strict';var _=require('lodash');var util=require(_0xaadf('0x0'));var moment=require('moment');var BPromise=require(_0xaadf('0x1'));var rs=require(_0xaadf('0x2'));var fs=require('fs');var Redis=require(_0xaadf('0x3'));var db=require(_0xaadf('0x4'))['db'];var utils=require(_0xaadf('0x5'));var logger=require('../../config/logger')(_0xaadf('0x6'));var config=require(_0xaadf('0x7'));var jayson=require(_0xaadf('0x8'));var client=jayson['client'][_0xaadf('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x370a88,_0x2a9657,_0x506bcf){return new BPromise(function(_0x44511f,_0x7064f6){return client['request'](_0x370a88,_0x506bcf)['then'](function(_0x5e2280){logger[_0xaadf('0xa')](_0xaadf('0xb'),_0x2a9657,_0xaadf('0xc'));logger[_0xaadf('0xd')](_0xaadf('0xe'),_0x2a9657,_0xaadf('0xc'),JSON[_0xaadf('0xf')](_0x5e2280));if(_0x5e2280[_0xaadf('0x10')]){if(_0x5e2280[_0xaadf('0x10')][_0xaadf('0x11')]===0x1f4){logger[_0xaadf('0x10')](_0xaadf('0xb'),_0x2a9657,_0x5e2280[_0xaadf('0x10')]['message']);return _0x7064f6(_0x5e2280[_0xaadf('0x10')][_0xaadf('0x12')]);}logger['error']('UserChatQueue,\x20%s,\x20%s',_0x2a9657,_0x5e2280[_0xaadf('0x10')][_0xaadf('0x12')]);return _0x44511f(_0x5e2280[_0xaadf('0x10')][_0xaadf('0x12')]);}else{logger['info'](_0xaadf('0xb'),_0x2a9657,_0xaadf('0xc'));_0x44511f(_0x5e2280[_0xaadf('0x13')]['message']);}})[_0xaadf('0x14')](function(_0x3799cd){logger[_0xaadf('0x10')](_0xaadf('0xb'),_0x2a9657,_0x3799cd);_0x7064f6(_0x3799cd);});});} \ No newline at end of file diff --git a/server/api/userFaxQueue/index.js b/server/api/userFaxQueue/index.js index 4de74a5..2772f9c 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 _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 +var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x3a1077,_0x3bcd8c){var _0x44372d=function(_0x5c7fdc){while(--_0x5c7fdc){_0x3a1077['push'](_0x3a1077['shift']());}};_0x44372d(++_0x3bcd8c);}(_0x9c44,0x178));var _0x49c4=function(_0x45d55e,_0x2fede3){_0x45d55e=_0x45d55e-0x0;var _0x29812a=_0x9c44[_0x45d55e];return _0x29812a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.attributes.js b/server/api/userFaxQueue/userFaxQueue.attributes.js index d45deb2..242df2a 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 _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 +var _0xf792=['INTEGER','exports'];(function(_0x477f1a,_0x4999d3){var _0x1cf352=function(_0x1253ce){while(--_0x1253ce){_0x477f1a['push'](_0x477f1a['shift']());}};_0x1cf352(++_0x4999d3);}(_0xf792,0x16b));var _0x2f79=function(_0x12526e,_0x2ac402){_0x12526e=_0x12526e-0x0;var _0x227fa7=_0xf792[_0x12526e];return _0x227fa7;};'use strict';var Sequelize=require('sequelize');module[_0x2f79('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x2f79('0x1')],'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 e18ebf9..696895c 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 _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 +var _0x724e=['./userFaxQueue.attributes','UserFaxQueue','util','../../config/logger','api','moment','request-promise','rimraf'];(function(_0x1afc4d,_0x5c37cd){var _0x1722f0=function(_0x1071d4){while(--_0x1071d4){_0x1afc4d['push'](_0x1afc4d['shift']());}};_0x1722f0(++_0x5c37cd);}(_0x724e,0xa2));var _0xe724=function(_0x43bf49,_0x4abdc4){_0x43bf49=_0x43bf49-0x0;var _0x320fa8=_0x724e[_0x43bf49];return _0x320fa8;};'use strict';var _=require('lodash');var util=require(_0xe724('0x0'));var logger=require(_0xe724('0x1'))(_0xe724('0x2'));var moment=require(_0xe724('0x3'));var BPromise=require('bluebird');var rp=require(_0xe724('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe724('0x5'));var config=require('../../config/environment');var attributes=require(_0xe724('0x6'));module['exports']=function(_0x1ef6a5,_0x18286b){return _0x1ef6a5['define'](_0xe724('0x7'),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 2d5c76c..3b897a3 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 _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 +var _0xe4c0=['request\x20sent','error','UserFaxQueue,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','then','info','UserFaxQueue,\x20%s,\x20%s,\x20%s'];(function(_0x2387d9,_0x2913e9){var _0x3d036c=function(_0x4a8197){while(--_0x4a8197){_0x2387d9['push'](_0x2387d9['shift']());}};_0x3d036c(++_0x2913e9);}(_0xe4c0,0x1aa));var _0x0e4c=function(_0x3f6b1b,_0x58d3d6){_0x3f6b1b=_0x3f6b1b-0x0;var _0x4a3d2b=_0xe4c0[_0x3f6b1b];return _0x4a3d2b;};'use strict';var _=require(_0x0e4c('0x0'));var util=require(_0x0e4c('0x1'));var moment=require(_0x0e4c('0x2'));var BPromise=require(_0x0e4c('0x3'));var rs=require(_0x0e4c('0x4'));var fs=require('fs');var Redis=require(_0x0e4c('0x5'));var db=require(_0x0e4c('0x6'))['db'];var utils=require(_0x0e4c('0x7'));var logger=require(_0x0e4c('0x8'))(_0x0e4c('0x9'));var config=require(_0x0e4c('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x0e4c('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0xc1b091,_0x5936ab,_0x33e866){return new BPromise(function(_0x436c34,_0x38e8fd){return client['request'](_0xc1b091,_0x33e866)[_0x0e4c('0xc')](function(_0xcaf932){logger[_0x0e4c('0xd')]('UserFaxQueue,\x20%s,\x20%s',_0x5936ab,'request\x20sent');logger['debug'](_0x0e4c('0xe'),_0x5936ab,_0x0e4c('0xf'),JSON['stringify'](_0xcaf932));if(_0xcaf932[_0x0e4c('0x10')]){if(_0xcaf932['error']['code']===0x1f4){logger[_0x0e4c('0x10')](_0x0e4c('0x11'),_0x5936ab,_0xcaf932[_0x0e4c('0x10')][_0x0e4c('0x12')]);return _0x38e8fd(_0xcaf932[_0x0e4c('0x10')][_0x0e4c('0x12')]);}logger[_0x0e4c('0x10')](_0x0e4c('0x11'),_0x5936ab,_0xcaf932[_0x0e4c('0x10')][_0x0e4c('0x12')]);return _0x436c34(_0xcaf932[_0x0e4c('0x10')]['message']);}else{logger['info'](_0x0e4c('0x11'),_0x5936ab,_0x0e4c('0xf'));_0x436c34(_0xcaf932[_0x0e4c('0x13')][_0x0e4c('0x12')]);}})[_0x0e4c('0x14')](function(_0x699f5d){logger[_0x0e4c('0x10')](_0x0e4c('0x11'),_0x5936ab,_0x699f5d);_0x38e8fd(_0x699f5d);});});} \ No newline at end of file diff --git a/server/api/userMailQueue/index.js b/server/api/userMailQueue/index.js index f0f761c..d307657 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 _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 +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x7ba1fb,_0x4ab581){var _0x33b0a3=function(_0x359c6a){while(--_0x359c6a){_0x7ba1fb['push'](_0x7ba1fb['shift']());}};_0x33b0a3(++_0x4ab581);}(_0x70e0,0x17b));var _0x070e=function(_0x2f24bd,_0x4267c9){_0x2f24bd=_0x2f24bd-0x0;var _0x509fbb=_0x70e0[_0x2f24bd];return _0x509fbb;};'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/userMailQueue/userMailQueue.attributes.js b/server/api/userMailQueue/userMailQueue.attributes.js index c76b52d..710795b 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 _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 +var _0x08a2=['INTEGER'];(function(_0xcb5314,_0xf81608){var _0x3b7936=function(_0x11f3b2){while(--_0x11f3b2){_0xcb5314['push'](_0xcb5314['shift']());}};_0x3b7936(++_0xf81608);}(_0x08a2,0xd2));var _0x208a=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x08a2[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x208a('0x0')],'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 978c89b..4351e21 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 _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 +var _0xc8c2=['bluebird','path','./userMailQueue.attributes','exports','lodash','util','../../config/logger','api','moment'];(function(_0x285c85,_0x132c21){var _0x2f81cd=function(_0x9b9962){while(--_0x9b9962){_0x285c85['push'](_0x285c85['shift']());}};_0x2f81cd(++_0x132c21);}(_0xc8c2,0x148));var _0x2c8c=function(_0x302d0b,_0x2c7dbb){_0x302d0b=_0x302d0b-0x0;var _0x3b9e1d=_0xc8c2[_0x302d0b];return _0x3b9e1d;};'use strict';var _=require(_0x2c8c('0x0'));var util=require(_0x2c8c('0x1'));var logger=require(_0x2c8c('0x2'))(_0x2c8c('0x3'));var moment=require(_0x2c8c('0x4'));var BPromise=require(_0x2c8c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2c8c('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2c8c('0x7'));module[_0x2c8c('0x8')]=function(_0x2d8a56,_0x137cf1){return _0x2d8a56['define']('UserMailQueue',attributes,{'tableName':'user_has_mail_queues','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 e7c9781..13cbec8 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 _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 +var _0xf3cd=['catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','UserMailQueue,\x20%s,\x20%s','message','result'];(function(_0x36f20f,_0x3558ab){var _0x39334c=function(_0x7c80c){while(--_0x7c80c){_0x36f20f['push'](_0x36f20f['shift']());}};_0x39334c(++_0x3558ab);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x45cd35,_0x41147c){_0x45cd35=_0x45cd35-0x0;var _0x16db84=_0xf3cd[_0x45cd35];return _0x16db84;};'use strict';var _=require(_0xdf3c('0x0'));var util=require(_0xdf3c('0x1'));var moment=require(_0xdf3c('0x2'));var BPromise=require(_0xdf3c('0x3'));var rs=require(_0xdf3c('0x4'));var fs=require('fs');var Redis=require(_0xdf3c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xdf3c('0x6'));var logger=require(_0xdf3c('0x7'))(_0xdf3c('0x8'));var config=require('../../config/environment');var jayson=require(_0xdf3c('0x9'));var client=jayson[_0xdf3c('0xa')][_0xdf3c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1f0601,_0x106021,_0x28edae){return new BPromise(function(_0x52c073,_0x15705d){return client['request'](_0x1f0601,_0x28edae)['then'](function(_0x22d8ae){logger[_0xdf3c('0xc')]('UserMailQueue,\x20%s,\x20%s',_0x106021,_0xdf3c('0xd'));logger[_0xdf3c('0xe')](_0xdf3c('0xf'),_0x106021,_0xdf3c('0xd'),JSON[_0xdf3c('0x10')](_0x22d8ae));if(_0x22d8ae[_0xdf3c('0x11')]){if(_0x22d8ae[_0xdf3c('0x11')][_0xdf3c('0x12')]===0x1f4){logger['error'](_0xdf3c('0x13'),_0x106021,_0x22d8ae[_0xdf3c('0x11')][_0xdf3c('0x14')]);return _0x15705d(_0x22d8ae[_0xdf3c('0x11')]['message']);}logger[_0xdf3c('0x11')](_0xdf3c('0x13'),_0x106021,_0x22d8ae[_0xdf3c('0x11')]['message']);return _0x52c073(_0x22d8ae[_0xdf3c('0x11')][_0xdf3c('0x14')]);}else{logger[_0xdf3c('0xc')](_0xdf3c('0x13'),_0x106021,_0xdf3c('0xd'));_0x52c073(_0x22d8ae[_0xdf3c('0x15')][_0xdf3c('0x14')]);}})[_0xdf3c('0x16')](function(_0x2986d0){logger[_0xdf3c('0x11')]('UserMailQueue,\x20%s,\x20%s',_0x106021,_0x2986d0);_0x15705d(_0x2986d0);});});} \ No newline at end of file diff --git a/server/api/userNotification/index.js b/server/api/userNotification/index.js index a0c3cb4..d7f0bf0 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 _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 +var _0x61db=['post','isAuthenticated','exports','multer','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./userNotification.controller'];(function(_0x51a822,_0x1eb986){var _0xc83065=function(_0x3c83f3){while(--_0x3c83f3){_0x51a822['push'](_0x51a822['shift']());}};_0xc83065(++_0x1eb986);}(_0x61db,0x19a));var _0xb61d=function(_0x29488e,_0x6b3801){_0x29488e=_0x29488e-0x0;var _0x354a2f=_0x61db[_0x29488e];return _0x354a2f;};'use strict';var multer=require(_0xb61d('0x0'));var util=require('util');var path=require(_0xb61d('0x1'));var timeout=require(_0xb61d('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xb61d('0x3'));var auth=require(_0xb61d('0x4'));var interaction=require(_0xb61d('0x5'));var config=require(_0xb61d('0x6'));var controller=require(_0xb61d('0x7'));router[_0xb61d('0x8')]('/',auth[_0xb61d('0x9')](),controller['sendUserNotification']);module[_0xb61d('0xa')]=router; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.attributes.js b/server/api/userNotification/userNotification.attributes.js index bc11b8b..e885dd1 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 _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 +var _0xb326=['TEXT','STRING','BOOLEAN','sequelize','exports'];(function(_0x20abea,_0x48795e){var _0x1382f7=function(_0x355e90){while(--_0x355e90){_0x20abea['push'](_0x20abea['shift']());}};_0x1382f7(++_0x48795e);}(_0xb326,0xb7));var _0x6b32=function(_0x5dcd67,_0x2f10a1){_0x5dcd67=_0x5dcd67-0x0;var _0x57e66d=_0xb326[_0x5dcd67];return _0x57e66d;};'use strict';var Sequelize=require(_0x6b32('0x0'));module[_0x6b32('0x1')]={'body':{'type':Sequelize[_0x6b32('0x2')]},'senderName':{'type':Sequelize[_0x6b32('0x3')]},'recipientsId':{'type':Sequelize[_0x6b32('0x2')]},'recipientsDescription':{'type':Sequelize['STRING']},'beep':{'type':Sequelize[_0x6b32('0x4')]}}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.controller.js b/server/api/userNotification/userNotification.controller.js index 008e23b..c71bb96 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 _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 +var _0x8d3e=['chatqueue','faxqueue','smsqueue','voicequeue','whatsappqueue','team','user','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','recipientsDescription','isEmpty','beep','recipientsId','sortBy','sequelize','UserNotification','create','recipient','userNotification:send','Template','findOne','html','catch','forEach','startCase','union','ids','replace','queue','Queue','all','flatten','getAgents','map','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','./userNotification.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','sendUserNotification','body','hasOwnProperty','text','TemplateId','Sequelize','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','view','Missing\x20\x27view\x27\x20parameter','Missing\x20\x27recipients\x27\x20parameter','parse','recipients','Invalid\x20\x27recipients\x27\x20object'];(function(_0x450df2,_0x2e58f0){var _0x2acb20=function(_0x6934dd){while(--_0x6934dd){_0x450df2['push'](_0x450df2['shift']());}};_0x2acb20(++_0x2e58f0);}(_0x8d3e,0x153));var _0xe8d3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8d3e[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xe8d3('0x0'));var rimraf=require(_0xe8d3('0x1'));var zipdir=require(_0xe8d3('0x2'));var jsonpatch=require(_0xe8d3('0x3'));var rp=require(_0xe8d3('0x4'));var moment=require(_0xe8d3('0x5'));var BPromise=require(_0xe8d3('0x6'));var Mustache=require(_0xe8d3('0x7'));var util=require('util');var path=require(_0xe8d3('0x8'));var sox=require(_0xe8d3('0x9'));var csv=require(_0xe8d3('0xa'));var ejs=require(_0xe8d3('0xb'));var fs=require('fs');var fs_extra=require(_0xe8d3('0xc'));var _=require(_0xe8d3('0xd'));var squel=require('squel');var crypto=require(_0xe8d3('0xe'));var jsforce=require(_0xe8d3('0xf'));var deskjs=require(_0xe8d3('0x10'));var toCsv=require(_0xe8d3('0xa'));var querystring=require(_0xe8d3('0x11'));var Papa=require(_0xe8d3('0x12'));var Redis=require(_0xe8d3('0x13'));var authService=require(_0xe8d3('0x14'));var qs=require(_0xe8d3('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe8d3('0x16'));var logger=require(_0xe8d3('0x17'))(_0xe8d3('0x18'));var utils=require(_0xe8d3('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0xe8d3('0x1a'));var db=require(_0xe8d3('0x1b'))['db'];config[_0xe8d3('0x1c')]=_[_0xe8d3('0x1d')](config[_0xe8d3('0x1c')],{'host':_0xe8d3('0x1e'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe8d3('0x1c')]));require(_0xe8d3('0x1f'))[_0xe8d3('0x20')](socket);function respondWithStatusCode(_0x40edab,_0x59b02f){_0x59b02f=_0x59b02f||0xcc;return function(_0x4343d8){if(_0x4343d8){return _0x40edab[_0xe8d3('0x21')](_0x59b02f);}return _0x40edab[_0xe8d3('0x22')](_0x59b02f)[_0xe8d3('0x23')]();};}function respondWithResult(_0x192762,_0x432463){_0x432463=_0x432463||0xc8;return function(_0x183ea8){if(_0x183ea8){return _0x192762[_0xe8d3('0x22')](_0x432463)[_0xe8d3('0x24')](_0x183ea8);}};}function respondWithFilteredResult(_0x3510ee,_0x52fb2e){return function(_0x39e836){if(_0x39e836){var _0x5cccfc=typeof _0x52fb2e[_0xe8d3('0x25')]===_0xe8d3('0x26')&&typeof _0x52fb2e[_0xe8d3('0x27')]===_0xe8d3('0x26');var _0x29ff39=_0x39e836['count'];var _0xcf2370=_0x5cccfc?0x0:_0x52fb2e[_0xe8d3('0x25')];var _0x3d29dd=_0x5cccfc?_0x39e836[_0xe8d3('0x28')]:_0x52fb2e[_0xe8d3('0x25')]+_0x52fb2e[_0xe8d3('0x27')];var _0x4230f1;if(_0x3d29dd>=_0x29ff39){_0x3d29dd=_0x29ff39;_0x4230f1=0xc8;}else{_0x4230f1=0xce;}_0x3510ee[_0xe8d3('0x22')](_0x4230f1);return _0x3510ee[_0xe8d3('0x29')](_0xe8d3('0x2a'),_0xcf2370+'-'+_0x3d29dd+'/'+_0x29ff39)[_0xe8d3('0x24')](_0x39e836);}return null;};}function patchUpdates(_0x5d9ff3){return function(_0x3056ac){try{jsonpatch[_0xe8d3('0x2b')](_0x3056ac,_0x5d9ff3,!![]);}catch(_0xbf5d97){return BPromise['reject'](_0xbf5d97);}return _0x3056ac[_0xe8d3('0x2c')]();};}function saveUpdates(_0x1b91f2,_0x48ed28){return function(_0x1d397e){if(_0x1d397e){return _0x1d397e[_0xe8d3('0x2d')](_0x1b91f2)[_0xe8d3('0x2e')](function(_0x1f1835){return _0x1f1835;});}return null;};}function removeEntity(_0x644aa7,_0x321d19){return function(_0x4b9628){if(_0x4b9628){return _0x4b9628[_0xe8d3('0x2f')]()[_0xe8d3('0x2e')](function(){_0x644aa7[_0xe8d3('0x22')](0xcc)[_0xe8d3('0x23')]();});}};}function handleEntityNotFound(_0x5c7036,_0x3f9f46){return function(_0x5e2eae){if(!_0x5e2eae){_0x5c7036[_0xe8d3('0x21')](0x194);}return _0x5e2eae;};}function handleError(_0x4bd4e5,_0x5dc3b9){_0x5dc3b9=_0x5dc3b9||0x1f4;return function(_0x4b1cdc){logger[_0xe8d3('0x30')](_0x4b1cdc[_0xe8d3('0x31')]);if(_0x4b1cdc[_0xe8d3('0x32')]){delete _0x4b1cdc[_0xe8d3('0x32')];}_0x4bd4e5[_0xe8d3('0x22')](_0x5dc3b9)['send'](_0x4b1cdc);};}exports[_0xe8d3('0x33')]=function(_0x2cb778,_0x508718,_0xb45c08){if(!_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x35')](_0xe8d3('0x36'))&&!_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x35')](_0xe8d3('0x37'))){throw new db[(_0xe8d3('0x38'))][(_0xe8d3('0x39'))](_0xe8d3('0x3a'));}else{if(_0x2cb778[_0xe8d3('0x34')]['hasOwnProperty'](_0xe8d3('0x37'))&&!_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x35')](_0xe8d3('0x3b'))){throw new db['Sequelize'][(_0xe8d3('0x39'))](_0xe8d3('0x3c'));}if(!_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x35')]('recipients')){throw new db[(_0xe8d3('0x38'))][(_0xe8d3('0x39'))](_0xe8d3('0x3d'));}else{try{var _0x1ec66d=JSON[_0xe8d3('0x3e')](_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x3f')]);}catch(_0x465596){logger['error'](_0x465596);throw new db[(_0xe8d3('0x38'))][(_0xe8d3('0x39'))](_0xe8d3('0x40'));}var _0x544fd1=[_0xe8d3('0x41'),_0xe8d3('0x42'),'mailqueue','openchannelqueue',_0xe8d3('0x43'),_0xe8d3('0x44'),_0xe8d3('0x45'),_0xe8d3('0x46'),_0xe8d3('0x47')];if(_['some'](_0x1ec66d,function(_0x537357){return!_['includes'](_0x544fd1,_0x537357[_0xe8d3('0x48')][_0xe8d3('0x49')]());})){throw new db[(_0xe8d3('0x38'))][(_0xe8d3('0x39'))](_0xe8d3('0x4a'));}}}var _0x5aa920={};_0x5aa920[_0xe8d3('0x4b')]=_0x2cb778[_0xe8d3('0x34')]['hasOwnProperty'](_0xe8d3('0x4b'))?_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x4b')]:_0x2cb778['user']['fullname'];_0x5aa920[_0xe8d3('0x4c')]=_[_0xe8d3('0x4d')](_0x2cb778[_0xe8d3('0x34')]['recipientsDescription'])?null:_0x2cb778[_0xe8d3('0x34')][_0xe8d3('0x4c')];_0x5aa920[_0xe8d3('0x4e')]=_0x2cb778['body'][_0xe8d3('0x4e')]||![];_0x5aa920['SenderId']=_0x2cb778[_0xe8d3('0x47')]['id'];return getContent(_0x2cb778[_0xe8d3('0x34')])[_0xe8d3('0x2e')](function(_0x152811){_0x5aa920[_0xe8d3('0x34')]=_0x152811;return getRecipients(_0x1ec66d);})[_0xe8d3('0x2e')](function(_0x1fa285){_0x5aa920[_0xe8d3('0x4f')]=_[_0xe8d3('0x50')](_0x1fa285)['join'](',');return db[_0xe8d3('0x51')]['transaction'](function(_0x32823b){return db[_0xe8d3('0x52')][_0xe8d3('0x53')](_0x5aa920,{'raw':!![],'transaction':_0x32823b})['then'](function(_0x46b8ee){var _0x5421ce={'sender':_0x5aa920['senderName'],'description':_0x5aa920['recipientsDescription'],'content':_0x5aa920[_0xe8d3('0x34')],'beep':_0x5aa920[_0xe8d3('0x4e')]};_0x1fa285['forEach'](function(_0x138157){_0x5421ce[_0xe8d3('0x54')]=_0x138157;socket['emit'](_0xe8d3('0x55'),_0x5421ce);});return _0x46b8ee;});});})[_0xe8d3('0x2e')](respondWithResult(_0x508718,0xc9))['catch'](handleError(_0x508718,null));};function getContent(_0x4af970){return new BPromise(function(_0x286e63,_0x47f92e){if(_0x4af970[_0xe8d3('0x36')]){_0x286e63(_0x4af970[_0xe8d3('0x36')]);return;}return db[_0xe8d3('0x56')][_0xe8d3('0x57')]({'attributes':[_0xe8d3('0x58')],'where':{'id':_0x4af970[_0xe8d3('0x37')]},'raw':!![]})[_0xe8d3('0x2e')](function(_0x348e44){if(!_0x348e44)throw new db[(_0xe8d3('0x38'))][(_0xe8d3('0x39'))]('Invalid\x20\x27TemplateId\x27\x20parameter');var _0x3ec180=Mustache['render'](_0x348e44[_0xe8d3('0x58')],_0x4af970['view']);_0x286e63(_0x3ec180);})[_0xe8d3('0x59')](function(_0x15e8cb){_0x47f92e(_0x15e8cb);});});}function getRecipients(_0x4f9a9f){return new BPromise(function(_0x36783f,_0x6eea9f){var _0x1a6a1d=[];var _0x1afd5c=[];_0x4f9a9f[_0xe8d3('0x5a')](function(_0x197a3e){var _0x245d01=_[_0xe8d3('0x5b')](_0x197a3e[_0xe8d3('0x48')][_0xe8d3('0x49')]());if(_0x245d01==='User'){_0x1a6a1d=_[_0xe8d3('0x5c')](_0x1a6a1d,_0x197a3e[_0xe8d3('0x5d')]);}else{if(_['includes'](_0x245d01,'queue'))_0x245d01=_0x245d01[_0xe8d3('0x5e')](_0xe8d3('0x5f'),_0xe8d3('0x60'));_0x197a3e[_0xe8d3('0x5d')]['forEach'](function(_0x2eb975){_0x1afd5c['push'](getAgents(_0x245d01,_0x2eb975));});}});return BPromise[_0xe8d3('0x61')](_0x1afd5c)[_0xe8d3('0x2e')](function(_0xee0be3){_0x1a6a1d=_[_0xe8d3('0x5c')](_0x1a6a1d,_[_0xe8d3('0x62')](_0xee0be3));_0x36783f(_0x1a6a1d);})[_0xe8d3('0x59')](function(_0x302b56){_0x6eea9f(_0x302b56);});});}function getAgents(_0x294dc0,_0x70b837){return new BPromise(function(_0x4f5a19,_0x398e49){return db[_0x294dc0][_0xe8d3('0x57')]({'where':{'id':_0x70b837}})['then'](function(_0x4b1dd0){return _0x4b1dd0[_0xe8d3('0x63')]({'attributes':['id'],'raw':!![]})[_0xe8d3('0x2e')](function(_0x4e6f91){var _0x34cb46=_[_0xe8d3('0x64')](_0x4e6f91,'id');_0x4f5a19(_0x34cb46);});})['catch'](function(_0x12ea1c){_0x398e49(_0x12ea1c);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.events.js b/server/api/userNotification/userNotification.events.js index 8d84af2..67f5e7c 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 _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 +var _0x945a=['UserNotification','update','remove','emit','exports','events','../../mysqldb'];(function(_0x2153a1,_0x94cbb5){var _0x27d86d=function(_0x1c5278){while(--_0x1c5278){_0x2153a1['push'](_0x2153a1['shift']());}};_0x27d86d(++_0x94cbb5);}(_0x945a,0x16a));var _0xa945=function(_0x4a8c83,_0x2f9714){_0x4a8c83=_0x4a8c83-0x0;var _0x19a732=_0x945a[_0x4a8c83];return _0x19a732;};'use strict';var EventEmitter=require(_0xa945('0x0'));var UserNotification=require(_0xa945('0x1'))['db'][_0xa945('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xa945('0x3'),'afterDestroy':_0xa945('0x4')};function emitEvent(_0x5807f0){return function(_0x4515fb,_0x2ca49f,_0x5d9d35){UserNotificationEvents[_0xa945('0x5')](_0x5807f0+':'+_0x4515fb['id'],_0x4515fb);UserNotificationEvents[_0xa945('0x5')](_0x5807f0,_0x4515fb);_0x5d9d35(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserNotification['hook'](e,emitEvent(event));}}module[_0xa945('0x6')]=UserNotificationEvents; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.model.js b/server/api/userNotification/userNotification.model.js index 5ea47fc..f73c56d 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 _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 +var _0x749d=['exports','userNotifications','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./userNotification.attributes'];(function(_0x43cfcf,_0x209eee){var _0x47b72c=function(_0x3f283d){while(--_0x3f283d){_0x43cfcf['push'](_0x43cfcf['shift']());}};_0x47b72c(++_0x209eee);}(_0x749d,0x87));var _0xd749=function(_0x43700a,_0x33b280){_0x43700a=_0x43700a-0x0;var _0x3c388c=_0x749d[_0x43700a];return _0x3c388c;};'use strict';var _=require('lodash');var util=require(_0xd749('0x0'));var logger=require(_0xd749('0x1'))(_0xd749('0x2'));var moment=require(_0xd749('0x3'));var BPromise=require(_0xd749('0x4'));var rp=require(_0xd749('0x5'));var fs=require('fs');var path=require(_0xd749('0x6'));var rimraf=require(_0xd749('0x7'));var config=require('../../config/environment');var attributes=require(_0xd749('0x8'));module[_0xd749('0x9')]=function(_0x8d209d,_0x5400e5){return _0x8d209d['define']('UserNotification',attributes,{'tableName':_0xd749('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xd749('0xb')});}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.rpc.js b/server/api/userNotification/userNotification.rpc.js index 55c1d79..03b1a20 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 _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 +var _0x46b2=['lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','socket.io-emitter','./userNotification.socket','register','request','then','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','UserNotification,\x20%s,\x20%s','message','info','result','catch'];(function(_0x211907,_0x5486fe){var _0x2cc002=function(_0x51c5ca){while(--_0x51c5ca){_0x211907['push'](_0x211907['shift']());}};_0x2cc002(++_0x5486fe);}(_0x46b2,0x1b0));var _0x246b=function(_0x57831e,_0x2d8684){_0x57831e=_0x57831e-0x0;var _0x3e72fc=_0x46b2[_0x57831e];return _0x3e72fc;};'use strict';var _=require(_0x246b('0x0'));var util=require(_0x246b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x246b('0x2'));var fs=require('fs');var Redis=require(_0x246b('0x3'));var db=require(_0x246b('0x4'))['db'];var utils=require(_0x246b('0x5'));var logger=require(_0x246b('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x246b('0x7'));var client=jayson[_0x246b('0x8')][_0x246b('0x9')]({'port':0x232a});config[_0x246b('0xa')]=_[_0x246b('0xb')](config[_0x246b('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x246b('0xc'))(new Redis(config['redis']));require(_0x246b('0xd'))[_0x246b('0xe')](socket);function respondWithRpcPromise(_0x175a3,_0x6630d9,_0x50b2a6){return new BPromise(function(_0xb66f99,_0x3e5e69){return client[_0x246b('0xf')](_0x175a3,_0x50b2a6)[_0x246b('0x10')](function(_0x2cf578){logger['info']('UserNotification,\x20%s,\x20%s',_0x6630d9,_0x246b('0x11'));logger[_0x246b('0x12')](_0x246b('0x13'),_0x6630d9,_0x246b('0x11'),JSON[_0x246b('0x14')](_0x2cf578));if(_0x2cf578[_0x246b('0x15')]){if(_0x2cf578[_0x246b('0x15')]['code']===0x1f4){logger[_0x246b('0x15')](_0x246b('0x16'),_0x6630d9,_0x2cf578[_0x246b('0x15')][_0x246b('0x17')]);return _0x3e5e69(_0x2cf578[_0x246b('0x15')][_0x246b('0x17')]);}logger['error']('UserNotification,\x20%s,\x20%s',_0x6630d9,_0x2cf578['error'][_0x246b('0x17')]);return _0xb66f99(_0x2cf578[_0x246b('0x15')][_0x246b('0x17')]);}else{logger[_0x246b('0x18')](_0x246b('0x16'),_0x6630d9,_0x246b('0x11'));_0xb66f99(_0x2cf578[_0x246b('0x19')][_0x246b('0x17')]);}})[_0x246b('0x1a')](function(_0x3f2171){logger[_0x246b('0x15')](_0x246b('0x16'),_0x6630d9,_0x3f2171);_0x3e5e69(_0x3f2171);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.socket.js b/server/api/userNotification/userNotification.socket.js index 4c8c230..5a27809 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 _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 +var _0xa191=['register','length','userNotification:','./userNotification.events','save','remove','update','emit'];(function(_0x402b1f,_0x3df329){var _0x5d22f2=function(_0x5f17c3){while(--_0x5f17c3){_0x402b1f['push'](_0x402b1f['shift']());}};_0x5d22f2(++_0x3df329);}(_0xa191,0x1bb));var _0x1a19=function(_0x5331dc,_0x234e1a){_0x5331dc=_0x5331dc-0x0;var _0x4167b1=_0xa191[_0x5331dc];return _0x4167b1;};'use strict';var UserNotificationEvents=require(_0x1a19('0x0'));var events=[_0x1a19('0x1'),_0x1a19('0x2'),_0x1a19('0x3')];function createListener(_0x17d9fc,_0x167c8e){return function(_0x14c9be){_0x167c8e[_0x1a19('0x4')](_0x17d9fc,_0x14c9be);};}function removeListener(_0x5937a2,_0x2e0133){return function(){UserNotificationEvents['removeListener'](_0x5937a2,_0x2e0133);};}exports[_0x1a19('0x5')]=function(_0x14567e){for(var _0x477901=0x0,_0x437431=events[_0x1a19('0x6')];_0x477901<_0x437431;_0x477901++){var _0x41f8cc=events[_0x477901];var _0x3a32d5=createListener(_0x1a19('0x7')+_0x41f8cc,_0x14567e);UserNotificationEvents['on'](_0x41f8cc,_0x3a32d5);}}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/index.js b/server/api/userOpenchannelQueue/index.js index 9847b44..32e1624 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 _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 +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x2f9cee,_0xc93d82){var _0x3af703=function(_0x35c7f8){while(--_0x35c7f8){_0x2f9cee['push'](_0x2f9cee['shift']());}};_0x3af703(++_0xc93d82);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x4ae829,_0x2c842c){_0x4ae829=_0x4ae829-0x0;var _0x256b31=_0xcb91[_0x4ae829];return _0x256b31;};'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 diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js index 26fd440..a1231a0 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 _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 +var _0xc87b=['INTEGER','sequelize','exports'];(function(_0x234b6e,_0x90b27){var _0x50342d=function(_0x2c45c9){while(--_0x2c45c9){_0x234b6e['push'](_0x234b6e['shift']());}};_0x50342d(++_0x90b27);}(_0xc87b,0x88));var _0xbc87=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xc87b[_0x6131cd];return _0x47e916;};'use strict';var Sequelize=require(_0xbc87('0x0'));module[_0xbc87('0x1')]={'penalty':{'type':Sequelize[_0xbc87('0x2')],'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 c9e3eff..e07b741 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 _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 +var _0xed44=['../../config/environment','./userOpenchannelQueue.attributes','exports','UserOpenchannelQueue','user_has_openchannel_queues','lodash','util','../../config/logger','api','moment','rimraf'];(function(_0x5ec3e2,_0x5294df){var _0x152654=function(_0x4c1669){while(--_0x4c1669){_0x5ec3e2['push'](_0x5ec3e2['shift']());}};_0x152654(++_0x5294df);}(_0xed44,0xcb));var _0x4ed4=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xed44[_0xfae23b];return _0x200640;};'use strict';var _=require(_0x4ed4('0x0'));var util=require(_0x4ed4('0x1'));var logger=require(_0x4ed4('0x2'))(_0x4ed4('0x3'));var moment=require(_0x4ed4('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4ed4('0x5'));var config=require(_0x4ed4('0x6'));var attributes=require(_0x4ed4('0x7'));module[_0x4ed4('0x8')]=function(_0x2b4f64,_0x30a33a){return _0x2b4f64['define'](_0x4ed4('0x9'),attributes,{'tableName':_0x4ed4('0xa'),'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 b573740..7794acd 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 _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 +var _0x349e=['request','info','UserOpenchannelQueue,\x20%s,\x20%s','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x5be52f,_0x24a872){var _0x529c08=function(_0x3d2370){while(--_0x3d2370){_0x5be52f['push'](_0x5be52f['shift']());}};_0x529c08(++_0x24a872);}(_0x349e,0x84));var _0xe349=function(_0x2762fa,_0x11a30a){_0x2762fa=_0x2762fa-0x0;var _0x34541d=_0x349e[_0x2762fa];return _0x34541d;};'use strict';var _=require(_0xe349('0x0'));var util=require(_0xe349('0x1'));var moment=require('moment');var BPromise=require(_0xe349('0x2'));var rs=require(_0xe349('0x3'));var fs=require('fs');var Redis=require(_0xe349('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe349('0x5'));var logger=require(_0xe349('0x6'))(_0xe349('0x7'));var config=require(_0xe349('0x8'));var jayson=require(_0xe349('0x9'));var client=jayson[_0xe349('0xa')][_0xe349('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xfbdaa9,_0x202085,_0x153b05){return new BPromise(function(_0x3353b8,_0x133365){return client[_0xe349('0xc')](_0xfbdaa9,_0x153b05)['then'](function(_0x1b71da){logger[_0xe349('0xd')](_0xe349('0xe'),_0x202085,'request\x20sent');logger[_0xe349('0xf')](_0xe349('0x10'),_0x202085,_0xe349('0x11'),JSON[_0xe349('0x12')](_0x1b71da));if(_0x1b71da['error']){if(_0x1b71da[_0xe349('0x13')][_0xe349('0x14')]===0x1f4){logger[_0xe349('0x13')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x202085,_0x1b71da['error']['message']);return _0x133365(_0x1b71da[_0xe349('0x13')]['message']);}logger[_0xe349('0x13')](_0xe349('0xe'),_0x202085,_0x1b71da['error']['message']);return _0x3353b8(_0x1b71da[_0xe349('0x13')][_0xe349('0x15')]);}else{logger[_0xe349('0xd')](_0xe349('0xe'),_0x202085,_0xe349('0x11'));_0x3353b8(_0x1b71da[_0xe349('0x16')][_0xe349('0x15')]);}})[_0xe349('0x17')](function(_0x534957){logger['error'](_0xe349('0xe'),_0x202085,_0x534957);_0x133365(_0x534957);});});} \ No newline at end of file diff --git a/server/api/userProfile/index.js b/server/api/userProfile/index.js index 362c7fe..67151e1 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 _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 +var _0xd820=['../../components/interaction/service','./userProfile.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/sections','getSections','/:id/resources','getResources','post','create','clone','addResources','update','delete','destroy','removeResources','multer','util','path','connect-timeout','express','fs-extra'];(function(_0x39a3f4,_0x111c40){var _0x345121=function(_0x5933a3){while(--_0x5933a3){_0x39a3f4['push'](_0x39a3f4['shift']());}};_0x345121(++_0x111c40);}(_0xd820,0x1aa));var _0x0d82=function(_0x4a7b2b,_0x3366e1){_0x4a7b2b=_0x4a7b2b-0x0;var _0x35e381=_0xd820[_0x4a7b2b];return _0x35e381;};'use strict';var multer=require(_0x0d82('0x0'));var util=require(_0x0d82('0x1'));var path=require(_0x0d82('0x2'));var timeout=require(_0x0d82('0x3'));var express=require(_0x0d82('0x4'));var router=express['Router']();var fs_extra=require(_0x0d82('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0d82('0x6'));var config=require('../../config/environment');var controller=require(_0x0d82('0x7'));router['get']('/',auth[_0x0d82('0x8')](),controller[_0x0d82('0x9')]);router[_0x0d82('0xa')](_0x0d82('0xb'),auth[_0x0d82('0x8')](),controller[_0x0d82('0xc')]);router['get'](_0x0d82('0xd'),auth['isAuthenticated'](),controller[_0x0d82('0xe')]);router[_0x0d82('0xa')](_0x0d82('0xf'),auth[_0x0d82('0x8')](),controller[_0x0d82('0x10')]);router['get'](_0x0d82('0x11'),auth[_0x0d82('0x8')](),controller[_0x0d82('0x12')]);router[_0x0d82('0x13')]('/',auth[_0x0d82('0x8')](),controller[_0x0d82('0x14')]);router[_0x0d82('0x13')]('/:id/clone',auth[_0x0d82('0x8')](),controller[_0x0d82('0x15')]);router[_0x0d82('0x13')](_0x0d82('0xf'),auth[_0x0d82('0x8')](),controller['addSections']);router[_0x0d82('0x13')](_0x0d82('0x11'),auth[_0x0d82('0x8')](),controller[_0x0d82('0x16')]);router['put'](_0x0d82('0xd'),auth['isAuthenticated'](),controller[_0x0d82('0x17')]);router[_0x0d82('0x18')](_0x0d82('0xd'),auth[_0x0d82('0x8')](),controller[_0x0d82('0x19')]);router[_0x0d82('0x18')](_0x0d82('0xf'),auth['isAuthenticated'](),controller['removeSections']);router[_0x0d82('0x18')](_0x0d82('0x11'),auth['isAuthenticated'](),controller[_0x0d82('0x1a')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.attributes.js b/server/api/userProfile/userProfile.attributes.js index 9f1051a..3b58180 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 _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 +var _0xbaa7=['BOOLEAN','exports','STRING','setDataValue','crudPermissions','getDataValue'];(function(_0x1940a6,_0x123e0b){var _0x2dc823=function(_0xb81f42){while(--_0xb81f42){_0x1940a6['push'](_0x1940a6['shift']());}};_0x2dc823(++_0x123e0b);}(_0xbaa7,0x12d));var _0x7baa=function(_0x565c49,_0x54acd0){_0x565c49=_0x565c49-0x0;var _0x20ca34=_0xbaa7[_0x565c49];return _0x20ca34;};'use strict';var Sequelize=require('sequelize');module[_0x7baa('0x0')]={'name':{'type':Sequelize[_0x7baa('0x1')],'allowNull':![],'unique':'name'},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x2ec11d){this[_0x7baa('0x2')](_0x7baa('0x3'),_0x2ec11d?_0x2ec11d['join'](''):[]);},'get':function(){return this[_0x7baa('0x4')]('crudPermissions')?this['getDataValue'](_0x7baa('0x3'))['split'](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x7baa('0x5')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x7baa('0x5')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x7baa('0x5')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x7baa('0x5')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.controller.js b/server/api/userProfile/userProfile.controller.js index 535d4cb..86759a8 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 _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 +var _0x3ded=['SquareProject','odbc','SquareRecording','SquareProjects','projectName','projects','JscriptyProject','contacts','Lists','ListId','lists','CmList','companies','CmCompany','globalcustomfields','CmCustomField','chatqueues','ChatQueue','faxqueues','FaxQueue','faxaccounts','FaxAccount','internalroutes','VoiceExtension','contexts','VoiceContext','voicemails','VoiceMail','membername','User','role','agent','Telephones','VoiceQueues','VoiceQueue','queue','musiconholds','VoiceMusicOnHold','chanspies','VoiceChanSpy','voiceprefixes','ivrcampaigns','Campaign','mailqueues','MailQueue','mailaccounts','MailAccount','mailsubstatuses','MailSubstatus','openchannelqueues','OpenchannelQueue','openchannelaccounts','smsqueues','smsaccounts','SmsAccount','WhatsappQueue','Team','voicequeues','queuecampaigns','QueueCampaigns','users','agents','telephones','admin','user','zendeskaccounts','ZendeskAccount','salesforceaccounts','SalesforceAccount','FreshdeskAccount','SugarcrmAccount','deskaccounts','DeskAccount','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','intervals','Interval','pauses','scheduler','Schedule','sounds','tags','templates','trunks','Trunk','extractedreports','Reports','AnalyticMetric','WhatsappAccount','screenrecordings','ScreenRecording','UserId','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./userProfile.socket','register','sendStatus','status','end','json','offset','undefined','count','set','apply','reject','save','update','then','error','name','send','index','map','UserProfile','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','length','create','body','clone','params','get','omit','crudPermissions','createdAt','sequelize','transaction','UserProfileSection','each','autoAssociation','UserProfileResource','updatedAt','sectionId','Resources','find','destroy','describe','addSections','userProfileId','push','removeSections','ids','getSections','enabled','includes','isEmpty','subsections','Dashboard','forEach','resourceId','Plugin','addResources','removeResources','section','Sequelize','ValidationError','Unknown\x20section','mergeResources','childModel','Invalid\x20section\x20\x27','parentSections','all','ignore','union','hasOwnProperty','nolimit','field','AnalyticExtractedReport','foreignKey','associatedResources','reportType','DefaultReports','custom','reportId','CustomReports','CmContact','Tag','Tags','color','ThroughTags','tag','Agents','openTabs','chat','dataValues','sms','fax','mail','charAt','toUpperCase','slice','QueryTypes','select','ui.','ui.createdAt','from','user_has_','_interactions','ui.UserId\x20=\x20?','toString','OpenTabs','value','toLowerCase','squareprojects'];(function(_0x509959,_0x159e89){var _0x9b5653=function(_0x317d4d){while(--_0x317d4d){_0x509959['push'](_0x509959['shift']());}};_0x9b5653(++_0x159e89);}(_0x3ded,0x15f));var _0xd3de=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0x3ded[_0x3ab9ee];return _0x82ee88;};'use strict';var emlformat=require(_0xd3de('0x0'));var rimraf=require(_0xd3de('0x1'));var zipdir=require(_0xd3de('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd3de('0x3'));var moment=require(_0xd3de('0x4'));var BPromise=require(_0xd3de('0x5'));var Mustache=require(_0xd3de('0x6'));var util=require(_0xd3de('0x7'));var path=require(_0xd3de('0x8'));var sox=require(_0xd3de('0x9'));var csv=require('to-csv');var ejs=require(_0xd3de('0xa'));var fs=require('fs');var fs_extra=require(_0xd3de('0xb'));var _=require('lodash');var squel=require(_0xd3de('0xc'));var crypto=require(_0xd3de('0xd'));var jsforce=require(_0xd3de('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xd3de('0xf'));var querystring=require('querystring');var Papa=require(_0xd3de('0x10'));var Redis=require(_0xd3de('0x11'));var authService=require(_0xd3de('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xd3de('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xd3de('0x14'));var utils=require('../../config/utils');var config=require(_0xd3de('0x15'));var licenseUtil=require(_0xd3de('0x16'));var db=require('../../mysqldb')['db'];config[_0xd3de('0x17')]=_[_0xd3de('0x18')](config['redis'],{'host':_0xd3de('0x19'),'port':0x18eb});var socket=require(_0xd3de('0x1a'))(new Redis(config[_0xd3de('0x17')]));require(_0xd3de('0x1b'))[_0xd3de('0x1c')](socket);function respondWithStatusCode(_0x234817,_0x1ef012){_0x1ef012=_0x1ef012||0xcc;return function(_0x20c289){if(_0x20c289){return _0x234817[_0xd3de('0x1d')](_0x1ef012);}return _0x234817[_0xd3de('0x1e')](_0x1ef012)[_0xd3de('0x1f')]();};}function respondWithResult(_0xffa68c,_0x1c6e95){_0x1c6e95=_0x1c6e95||0xc8;return function(_0x457a76){if(_0x457a76){return _0xffa68c[_0xd3de('0x1e')](_0x1c6e95)[_0xd3de('0x20')](_0x457a76);}};}function respondWithFilteredResult(_0x3220c3,_0x3f39d1){return function(_0x42c7f7){if(_0x42c7f7){var _0x3d5b40=typeof _0x3f39d1[_0xd3de('0x21')]===_0xd3de('0x22')&&typeof _0x3f39d1['limit']==='undefined';var _0x36f648=_0x42c7f7[_0xd3de('0x23')];var _0x5273e6=_0x3d5b40?0x0:_0x3f39d1[_0xd3de('0x21')];var _0x113ab2=_0x3d5b40?_0x42c7f7[_0xd3de('0x23')]:_0x3f39d1[_0xd3de('0x21')]+_0x3f39d1['limit'];var _0x2ec59b;if(_0x113ab2>=_0x36f648){_0x113ab2=_0x36f648;_0x2ec59b=0xc8;}else{_0x2ec59b=0xce;}_0x3220c3[_0xd3de('0x1e')](_0x2ec59b);return _0x3220c3[_0xd3de('0x24')]('Content-Range',_0x5273e6+'-'+_0x113ab2+'/'+_0x36f648)[_0xd3de('0x20')](_0x42c7f7);}return null;};}function patchUpdates(_0x2250e1){return function(_0x565cac){try{jsonpatch[_0xd3de('0x25')](_0x565cac,_0x2250e1,!![]);}catch(_0x790568){return BPromise[_0xd3de('0x26')](_0x790568);}return _0x565cac[_0xd3de('0x27')]();};}function saveUpdates(_0x5422dd,_0x4984e1){return function(_0x246697){if(_0x246697){return _0x246697[_0xd3de('0x28')](_0x5422dd)[_0xd3de('0x29')](function(_0x152c7b){return _0x152c7b;});}return null;};}function removeEntity(_0x52b302,_0x579c10){return function(_0x589b0f){if(_0x589b0f){return _0x589b0f['destroy']()[_0xd3de('0x29')](function(){_0x52b302[_0xd3de('0x1e')](0xcc)[_0xd3de('0x1f')]();});}};}function handleEntityNotFound(_0x3a43af,_0xd0877a){return function(_0x1b36c2){if(!_0x1b36c2){_0x3a43af[_0xd3de('0x1d')](0x194);}return _0x1b36c2;};}function handleError(_0xdac937,_0x463c73){_0x463c73=_0x463c73||0x1f4;return function(_0x23d2bf){logger[_0xd3de('0x2a')](_0x23d2bf['stack']);if(_0x23d2bf[_0xd3de('0x2b')]){delete _0x23d2bf[_0xd3de('0x2b')];}_0xdac937[_0xd3de('0x1e')](_0x463c73)[_0xd3de('0x2c')](_0x23d2bf);};}exports[_0xd3de('0x2d')]=function(_0x4740ff,_0x45393c){var _0x38dbc2={},_0x102f08={},_0x22654c={'count':0x0,'rows':[]};var _0x182df9=_[_0xd3de('0x2e')](db[_0xd3de('0x2f')][_0xd3de('0x30')],function(_0x18d074){return{'name':_0x18d074[_0xd3de('0x31')],'type':_0x18d074[_0xd3de('0x32')][_0xd3de('0x33')]};});_0x102f08[_0xd3de('0x34')]=_[_0xd3de('0x2e')](_0x182df9,'name');_0x102f08['query']=_[_0xd3de('0x35')](_0x4740ff[_0xd3de('0x36')]);_0x102f08[_0xd3de('0x37')]=_[_0xd3de('0x38')](_0x102f08[_0xd3de('0x34')],_0x102f08[_0xd3de('0x36')]);_0x38dbc2[_0xd3de('0x39')]=_[_0xd3de('0x38')](_0x102f08[_0xd3de('0x34')],qs[_0xd3de('0x3a')](_0x4740ff[_0xd3de('0x36')]['fields']));_0x38dbc2[_0xd3de('0x39')]=_0x38dbc2['attributes']['length']?_0x38dbc2[_0xd3de('0x39')]:_0x102f08['model'];if(!_0x4740ff[_0xd3de('0x36')]['hasOwnProperty']('nolimit')){_0x38dbc2[_0xd3de('0x3b')]=qs[_0xd3de('0x3b')](_0x4740ff['query'][_0xd3de('0x3b')]);_0x38dbc2[_0xd3de('0x21')]=qs[_0xd3de('0x21')](_0x4740ff[_0xd3de('0x36')][_0xd3de('0x21')]);}_0x38dbc2[_0xd3de('0x3c')]=qs['sort'](_0x4740ff[_0xd3de('0x36')][_0xd3de('0x3d')]);_0x38dbc2[_0xd3de('0x3e')]=qs[_0xd3de('0x37')](_[_0xd3de('0x3f')](_0x4740ff[_0xd3de('0x36')],_0x102f08[_0xd3de('0x37')]),_0x182df9);if(_0x4740ff[_0xd3de('0x36')][_0xd3de('0x40')]){_0x38dbc2[_0xd3de('0x3e')]=_[_0xd3de('0x41')](_0x38dbc2[_0xd3de('0x3e')],{'$or':_['map'](_0x182df9,function(_0x419603){if(_0x419603['type']!==_0xd3de('0x42')){var _0x4ffb9e={};_0x4ffb9e[_0x419603['name']]={'$like':'%'+_0x4740ff[_0xd3de('0x36')][_0xd3de('0x40')]+'%'};return _0x4ffb9e;}})});}_0x38dbc2=_[_0xd3de('0x41')]({},_0x38dbc2,_0x4740ff[_0xd3de('0x43')]);var _0x2a0909={'where':_0x38dbc2[_0xd3de('0x3e')]};return db[_0xd3de('0x2f')][_0xd3de('0x23')](_0x2a0909)[_0xd3de('0x29')](function(_0xd1c92){_0x22654c[_0xd3de('0x23')]=_0xd1c92;if(_0x4740ff[_0xd3de('0x36')][_0xd3de('0x44')]){_0x38dbc2[_0xd3de('0x45')]=[{'all':!![]}];}return db[_0xd3de('0x2f')][_0xd3de('0x46')](_0x38dbc2);})['then'](function(_0x3d14df){_0x22654c[_0xd3de('0x47')]=_0x3d14df;return _0x22654c;})[_0xd3de('0x29')](respondWithFilteredResult(_0x45393c,_0x38dbc2))[_0xd3de('0x48')](handleError(_0x45393c,null));};exports['show']=function(_0x4b0c2c,_0x2518b5){var _0x8ad1f3={'raw':![],'where':{'id':_0x4b0c2c['params']['id']}},_0x3d3e1d={};_0x3d3e1d[_0xd3de('0x34')]=_[_0xd3de('0x35')](db[_0xd3de('0x2f')][_0xd3de('0x30')]);_0x3d3e1d[_0xd3de('0x36')]=_[_0xd3de('0x35')](_0x4b0c2c[_0xd3de('0x36')]);_0x3d3e1d['filters']=_['intersection'](_0x3d3e1d['model'],_0x3d3e1d[_0xd3de('0x36')]);_0x8ad1f3[_0xd3de('0x39')]=_[_0xd3de('0x38')](_0x3d3e1d[_0xd3de('0x34')],qs['fields'](_0x4b0c2c[_0xd3de('0x36')][_0xd3de('0x3a')]));_0x8ad1f3[_0xd3de('0x39')]=_0x8ad1f3[_0xd3de('0x39')][_0xd3de('0x49')]?_0x8ad1f3[_0xd3de('0x39')]:_0x3d3e1d['model'];if(_0x4b0c2c['query'][_0xd3de('0x44')]){_0x8ad1f3['include']=[{'all':!![]}];}_0x8ad1f3=_[_0xd3de('0x41')]({},_0x8ad1f3,_0x4b0c2c[_0xd3de('0x43')]);return db[_0xd3de('0x2f')]['find'](_0x8ad1f3)[_0xd3de('0x29')](handleEntityNotFound(_0x2518b5,null))[_0xd3de('0x29')](respondWithResult(_0x2518b5,null))[_0xd3de('0x48')](handleError(_0x2518b5,null));};exports[_0xd3de('0x4a')]=function(_0xce6a58,_0x19be20){return db[_0xd3de('0x2f')][_0xd3de('0x4a')](_0xce6a58[_0xd3de('0x4b')],{})[_0xd3de('0x29')](respondWithResult(_0x19be20,0xc9))[_0xd3de('0x48')](handleError(_0x19be20,null));};exports[_0xd3de('0x4c')]=function(_0xcf217c,_0x49550b){var _0xfea4d0={'where':{'id':_0xcf217c[_0xd3de('0x4d')]['id']}},_0xcef625={};_0xcef625[_0xd3de('0x34')]=_[_0xd3de('0x35')](db[_0xd3de('0x2f')][_0xd3de('0x30')]);_0xfea4d0[_0xd3de('0x39')]=_[_0xd3de('0x38')](_0xcef625['model'],qs[_0xd3de('0x3a')](_0xcf217c[_0xd3de('0x36')]['fields']));_0xfea4d0[_0xd3de('0x39')]=_0xfea4d0['attributes'][_0xd3de('0x49')]?_0xfea4d0[_0xd3de('0x39')]:_0xcef625['model'];if(_0xcf217c[_0xd3de('0x36')]['includeAll']){_0xfea4d0[_0xd3de('0x45')]=[{'all':!![]}];}_0xfea4d0=_[_0xd3de('0x41')]({},_0xfea4d0,_0xcf217c[_0xd3de('0x43')]);return db[_0xd3de('0x2f')]['find'](_0xfea4d0)['then'](handleEntityNotFound(_0x49550b,null))['then'](function(_0x10edf3){if(_0x10edf3){var _0x3ee9e7=_0x10edf3[_0xd3de('0x4e')]({'plain':!![]});_0x3ee9e7=qs[_0xd3de('0x4f')](_0x3ee9e7,['id','createdAt','updatedAt',_0xd3de('0x50')]);_0xcf217c[_0xd3de('0x4b')]=_[_0xd3de('0x4f')](_0xcf217c[_0xd3de('0x4b')],['id',_0xd3de('0x51'),'updatedAt']);return db[_0xd3de('0x52')][_0xd3de('0x53')](function(_0x1c432d){return db[_0xd3de('0x2f')]['create'](_[_0xd3de('0x41')](_0x3ee9e7,_0xcf217c['body']),{'include':_0xcf217c[_0xd3de('0x36')][_0xd3de('0x44')]?[{'all':!![]}]:undefined,'transaction':_0x1c432d})['then'](function(_0x162a36){var _0x12cc9d=_0x162a36[_0xd3de('0x4e')]({'plain':!![]});return db[_0xd3de('0x54')][_0xd3de('0x46')]({'where':{'userProfileId':_0xcf217c[_0xd3de('0x4d')]['id']},'raw':!![]})[_0xd3de('0x29')](function(_0x4596d8){if(_0x4596d8){return BPromise[_0xd3de('0x55')](_0x4596d8,function(_0x4da406){return new BPromise(function(_0x39a8f3,_0x1bbb95){if(_0x4da406[_0xd3de('0x56')]===null||_0x4da406['autoAssociation']===0x1)_0x39a8f3(null);return db[_0xd3de('0x57')]['findAll']({'where':{'sectionId':_0x4da406['id']},'raw':!![]})[_0xd3de('0x29')](function(_0x34326b){var _0xdd21b2=_[_0xd3de('0x2e')](_0x34326b,function(_0xe25582){return qs['omit'](_0xe25582,['id',_0xd3de('0x51'),_0xd3de('0x58'),_0xd3de('0x59')]);});_0x39a8f3(_0xdd21b2);})[_0xd3de('0x48')](function(_0x35934c){_0x1bbb95(_0x35934c);});})['then'](function(_0x1e8a33){var _0x372f81=qs[_0xd3de('0x4f')](_0x4da406,['id',_0xd3de('0x51'),_0xd3de('0x58')]);_0x372f81['userProfileId']=_0x12cc9d['id'];if(_0x1e8a33)_0x372f81[_0xd3de('0x5a')]=_0x1e8a33;return _0x372f81;})[_0xd3de('0x29')](function(_0x21dcec){return db[_0xd3de('0x54')][_0xd3de('0x4a')](_0x21dcec,{'include':[{'model':db[_0xd3de('0x57')],'as':_0xd3de('0x5a')}],'raw':!![],'transaction':_0x1c432d});});})['then'](function(){return _0x12cc9d;});}});});});}})[_0xd3de('0x29')](respondWithResult(_0x49550b,0xc9))[_0xd3de('0x48')](handleError(_0x49550b,null));};exports[_0xd3de('0x28')]=function(_0x144ae6,_0x30ceeb){if(_0x144ae6[_0xd3de('0x4b')]['id']){delete _0x144ae6[_0xd3de('0x4b')]['id'];}return db['UserProfile'][_0xd3de('0x5b')]({'where':{'id':_0x144ae6['params']['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x30ceeb,null))['then'](saveUpdates(_0x144ae6[_0xd3de('0x4b')],null))['then'](respondWithResult(_0x30ceeb,null))[_0xd3de('0x48')](handleError(_0x30ceeb,null));};exports[_0xd3de('0x5c')]=function(_0x4d5541,_0x2a36aa){return db[_0xd3de('0x2f')][_0xd3de('0x5b')]({'where':{'id':_0x4d5541[_0xd3de('0x4d')]['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x2a36aa,null))[_0xd3de('0x29')](removeEntity(_0x2a36aa,null))[_0xd3de('0x48')](handleError(_0x2a36aa,null));};exports[_0xd3de('0x5d')]=function(_0x480fcc,_0x783e84){return db[_0xd3de('0x2f')][_0xd3de('0x5d')]()[_0xd3de('0x29')](respondWithResult(_0x783e84,null))[_0xd3de('0x48')](handleError(_0x783e84,null));};exports[_0xd3de('0x5e')]=function(_0x20b9b4,_0x5cc5df){var _0x275e68=_0x20b9b4[_0xd3de('0x4b')];return db[_0xd3de('0x2f')][_0xd3de('0x5b')]({'where':{'id':_0x20b9b4['params']['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x5cc5df,null))[_0xd3de('0x29')](function(_0x48ea35){if(_0x48ea35){return db[_0xd3de('0x52')][_0xd3de('0x53')](function(_0x586597){return db[_0xd3de('0x54')][_0xd3de('0x5c')]({'where':{'userProfileId':_0x20b9b4[_0xd3de('0x4d')]['id'],'sectionId':_[_0xd3de('0x2e')](_0x275e68,function(_0x3c84f2){return _0x3c84f2[_0xd3de('0x59')];})},'transaction':_0x586597})[_0xd3de('0x29')](function(){var _0x3e27c2=_[_0xd3de('0x2e')](_0x275e68,function(_0x1a4997){_0x1a4997[_0xd3de('0x5f')]=_0x20b9b4[_0xd3de('0x4d')]['id'];return _0x1a4997;});var _0xd5e4e5=[];return BPromise[_0xd3de('0x55')](_0x3e27c2,function(_0x8d4705){return db[_0xd3de('0x54')]['create'](_0x8d4705,{'include':[{'model':db[_0xd3de('0x57')],'as':_0xd3de('0x5a')}],'raw':!![],'transaction':_0x586597})[_0xd3de('0x29')](function(_0x3ae400){_0xd5e4e5[_0xd3de('0x60')](_0x3ae400['get']({'plain':!![]}));});})[_0xd3de('0x29')](function(){return _0xd5e4e5;});});});}})['then'](function(_0x474551){return _0x474551;})[_0xd3de('0x29')](respondWithResult(_0x5cc5df,null))[_0xd3de('0x48')](handleError(_0x5cc5df,null));};exports[_0xd3de('0x61')]=function(_0x1b10be,_0x3847b8){var _0xc48e08;return db[_0xd3de('0x2f')]['find']({'where':{'id':_0x1b10be[_0xd3de('0x4d')]['id']},'attributes':['id',_0xd3de('0x2b')]})['then'](handleEntityNotFound(_0x3847b8,null))[_0xd3de('0x29')](function(_0x57481c){if(_0x57481c){_0xc48e08=_0x57481c;return db[_0xd3de('0x54')][_0xd3de('0x5c')]({'where':{'userProfileId':_0x1b10be[_0xd3de('0x4d')]['id'],'sectionId':_0x1b10be[_0xd3de('0x36')][_0xd3de('0x62')]}});}})[_0xd3de('0x29')](function(){return _0xc48e08;})['then'](respondWithStatusCode(_0x3847b8,null))[_0xd3de('0x48')](handleError(_0x3847b8,null));};exports[_0xd3de('0x63')]=function(_0x283711,_0x1b693c){var _0x3ef107=[];var _0x3616de=[];return db['UserProfileSection'][_0xd3de('0x46')]({'where':{'userProfileId':_0x283711[_0xd3de('0x4d')]['id']},'raw':!![]})['then'](function(_0x16eea7){_0x3ef107=_[_0xd3de('0x40')](_0x16eea7,function(_0x3b98e9){return _0x3b98e9[_0xd3de('0x64')]===0x1||_[_0xd3de('0x65')]([0x3eb,0x709],_0x3b98e9[_0xd3de('0x59')]);});if(!_[_0xd3de('0x66')](_0x3ef107)){return _[_0xd3de('0x2e')](_0x3ef107,function(_0x374e91){return _0x374e91[_0xd3de('0x59')];});}else{return;}})['then'](function(_0x451426){if(_0x451426)_0x3616de=_0x451426;if(_['includes'](_0x3616de,0x64)){var _0x119f7=_[_0xd3de('0x5b')](_0x3ef107,{'sectionId':0x64});return hasDefaultDashboard(_0x119f7)[_0xd3de('0x29')](function(_0x54dc3c){return _[_0xd3de('0x2e')](_0x3ef107,function(_0x5225b9){if(_0x5225b9[_0xd3de('0x59')]===0x64){_0x5225b9[_0xd3de('0x67')]=_0x54dc3c;}return _0x5225b9;});});}else{return;}})[_0xd3de('0x29')](function(_0x25abdb){if(_0x25abdb)_0x3ef107=_0x25abdb;if(_[_0xd3de('0x65')](_0x3616de,0x3eb)){var _0x4e4f6c=_[_0xd3de('0x5b')](_0x3ef107,{'sectionId':0x3eb});return getCustomDashboards(_0x4e4f6c)[_0xd3de('0x29')](function(_0x3a24cf){return _[_0xd3de('0x2e')](_0x3ef107,function(_0x8a69ce){if(_0x4e4f6c[_0xd3de('0x64')]){if(_0x8a69ce[_0xd3de('0x59')]===0x3eb){_0x8a69ce[_0xd3de('0x67')]=_0x3a24cf;}}else{if(_0x8a69ce['sectionId']===0x64){_0x8a69ce[_0xd3de('0x67')]=_0x3a24cf;}}return _0x8a69ce;});});}else{return;}})[_0xd3de('0x29')](function(_0x3a2504){if(_0x3a2504)_0x3ef107=_0x3a2504;if(_[_0xd3de('0x65')](_0x3616de,0x709)){var _0x2b8cdf=_[_0xd3de('0x5b')](_0x3ef107,{'sectionId':0x709});return getPlugins(_0x2b8cdf)[_0xd3de('0x29')](function(_0x5cc49a){if(_0x2b8cdf[_0xd3de('0x64')]){return _['map'](_0x3ef107,function(_0x2d7280){if(_0x2d7280[_0xd3de('0x59')]===0x709){_0x2d7280['subsections']=_0x5cc49a;}return _0x2d7280;});}else{var _0x5e93d9={'sectionId':0x76c,'enabled':0x1,'subsections':_0x5cc49a};var _0x1ec8d3=_[_0xd3de('0x2e')](_0x3ef107);_0x1ec8d3[_0xd3de('0x60')](_0x5e93d9);return _0x1ec8d3;}});}else{return;}})[_0xd3de('0x29')](function(_0x4f0b4d){if(_0x4f0b4d)_0x3ef107=_0x4f0b4d;return _['filter'](_0x3ef107,[_0xd3de('0x64'),0x1]);})['then'](respondWithResult(_0x1b693c,null))[_0xd3de('0x48')](handleError(_0x1b693c,null));};function hasDefaultDashboard(_0x2ccb55){var _0x2a2f74=[0x65];return new BPromise(function(_0x117a55,_0x2287f3){try{if(_0x2ccb55[_0xd3de('0x56')]){_0x117a55(_0x2a2f74);}else{return db[_0xd3de('0x57')]['findOne']({'where':{'sectionId':_0x2ccb55['id']},'raw':!![]})[_0xd3de('0x29')](function(_0x505177){_0x505177?_0x117a55(_0x2a2f74):_0x117a55();});}}catch(_0x1634d6){_0x2287f3(_0x1634d6);}});}function getCustomDashboards(_0x1b08b4){var _0x697cb6=[];return new BPromise(function(_0x34b662,_0x465eaf){try{if(_0x1b08b4['autoAssociation']){return db[_0xd3de('0x68')][_0xd3de('0x46')]({'raw':!![]})['then'](function(_0xc110be){_0xc110be[_0xd3de('0x69')](function(_0xf5c881){_0x697cb6[_0xd3de('0x60')](_0xf5c881['id']+0x1869f);});_0x34b662(_0x697cb6);});}else{return db[_0xd3de('0x57')][_0xd3de('0x46')]({'where':{'sectionId':_0x1b08b4['id']},'raw':!![]})[_0xd3de('0x29')](function(_0x508db0){_0x508db0[_0xd3de('0x69')](function(_0x25316b){_0x697cb6[_0xd3de('0x60')](_0x25316b[_0xd3de('0x6a')]+0x1869f);});_0x34b662(_0x697cb6);});}}catch(_0x1259a9){_0x465eaf(_0x1259a9);}});}function getPlugins(_0x310ad3){var _0x4bdde0=[];return new BPromise(function(_0x2a8dca,_0x57c1f0){try{if(_0x310ad3[_0xd3de('0x56')]){return db[_0xd3de('0x6b')][_0xd3de('0x46')]({'raw':!![]})['then'](function(_0x4e1753){_0x4e1753[_0xd3de('0x69')](function(_0x56cb95){_0x4bdde0[_0xd3de('0x60')](_0x56cb95['id']+0x15b38);});_0x2a8dca(_0x4bdde0);});}else{return db[_0xd3de('0x57')][_0xd3de('0x46')]({'where':{'sectionId':_0x310ad3['id']},'raw':!![]})[_0xd3de('0x29')](function(_0x4f717d){_0x4f717d[_0xd3de('0x69')](function(_0x310bf4){_0x4bdde0[_0xd3de('0x60')](_0x310bf4[_0xd3de('0x6a')]+0x15b38);});_0x2a8dca(_0x4bdde0);});}}catch(_0x8fb397){_0x57c1f0(_0x8fb397);}});}exports[_0xd3de('0x6c')]=function(_0xa59a0a,_0x6c58ee){return db[_0xd3de('0x2f')][_0xd3de('0x5b')]({'where':{'id':_0xa59a0a[_0xd3de('0x4d')]['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x6c58ee,null))[_0xd3de('0x29')](function(_0x8b3c80){if(_0x8b3c80){return db[_0xd3de('0x52')][_0xd3de('0x53')](function(_0x4152fe){return db[_0xd3de('0x54')]['findAll']({'where':{'userProfileId':_0xa59a0a[_0xd3de('0x4d')]['id']},'attributes':['id'],'raw':!![]})[_0xd3de('0x29')](function(_0x4cf63b){if(_0x4cf63b){return db[_0xd3de('0x54')][_0xd3de('0x5c')]({'where':{'userProfileId':_0xa59a0a[_0xd3de('0x4d')]['id'],'id':_[_0xd3de('0x2e')](_0x4cf63b,function(_0x2c3a16){return _0x2c3a16['id'];})},'transaction':_0x4152fe});}})['then'](function(_0x2c9537){var _0x43e7dd=_['map'](_0xa59a0a[_0xd3de('0x4b')],function(_0x139681){_0x139681[_0xd3de('0x5f')]=_0xa59a0a['params']['id'];return _0x139681;});return db[_0xd3de('0x54')]['bulkCreate'](_0x43e7dd,{'raw':!![],'transaction':_0x4152fe});})['then'](function(_0x6b33c4){var _0x9d5328=_['filter'](_[_0xd3de('0x2e')](_0x6b33c4,function(_0x285c64){return _0x285c64[_0xd3de('0x4e')]({'plain':!![]});}),{'includeAll':![]});if(_0x9d5328){return db[_0xd3de('0x54')][_0xd3de('0x46')]({'where':{'userProfileId':_0xa59a0a[_0xd3de('0x4d')]['id'],'sectionId':_[_0xd3de('0x2e')](_0x9d5328,function(_0x13eea6){return _0x13eea6['sectionId'];})},'attributes':['id',_0xd3de('0x59')],'raw':!![]})[_0xd3de('0x29')](function(_0x940f0a){var _0x112419=_[_0xd3de('0x2e')](_0xa59a0a[_0xd3de('0x4b')],function(_0x2e4b5c){_0x2e4b5c[_0xd3de('0x5f')]=_0xa59a0a[_0xd3de('0x4d')]['id'];return _0x2e4b5c;});return db[_0xd3de('0x57')]['bulkCreate'](_0x112419,{'raw':!![],'transaction':_0x4152fe});});}})['catch'](handleError(_0x6c58ee,null));});}})[_0xd3de('0x29')](function(_0x49ce97){var _0x522f88=_['map'](_0x49ce97,function(_0x286ac5){return _0x286ac5[_0xd3de('0x4e')]({'plain':!![]});});})[_0xd3de('0x29')](respondWithResult(_0x6c58ee,null))[_0xd3de('0x48')](handleError(_0x6c58ee,null));};exports['removeResources']=function(_0x14d943,_0x7611a,_0x251851){return db[_0xd3de('0x2f')]['find']({'where':{'id':_0x14d943[_0xd3de('0x4d')]['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x7611a,null))[_0xd3de('0x29')](function(_0x3aaa1c){if(_0x3aaa1c){return _0x3aaa1c[_0xd3de('0x6d')](_0x14d943['query'][_0xd3de('0x62')]);}})[_0xd3de('0x29')](respondWithStatusCode(_0x7611a,null))['catch'](handleError(_0x7611a,null));};exports['getResources']=function(_0x1c1481,_0x388c09){var _0x1997bd={'raw':![],'where':{}};var _0x4b7404={};var _0x445682={'count':0x0,'rows':[]};var _0x2db4d2=_0x1c1481[_0xd3de('0x36')][_0xd3de('0x6e')];if(typeof _0x2db4d2===_0xd3de('0x22')){throw new db[(_0xd3de('0x6f'))][(_0xd3de('0x70'))](_0xd3de('0x71'));}var _0x2f8a1a=_0x1c1481[_0xd3de('0x36')][_0xd3de('0x72')]||![];var _0x430dfe=getQueryModels(_0x2db4d2,_0x2f8a1a);if(typeof _0x430dfe[_0xd3de('0x73')]===_0xd3de('0x22')){throw new db[(_0xd3de('0x6f'))][(_0xd3de('0x70'))](_0xd3de('0x74')+_0x2db4d2+'\x27');}var _0x1dfe23=[];if(!_[_0xd3de('0x66')](_0x430dfe[_0xd3de('0x75')])){_0x1dfe23=_0x430dfe[_0xd3de('0x75')];}else{_0x1dfe23=[{'name':_0x2db4d2}];}return db[_0xd3de('0x2f')]['findOne']({'where':{'id':_0x1c1481[_0xd3de('0x4d')]['id']}})[_0xd3de('0x29')](handleEntityNotFound(_0x388c09,null))['then'](function(_0x234857){if(_0x234857){var _0x5de759=[];for(var _0x2ad234=0x0;_0x2ad234<_0x1dfe23[_0xd3de('0x49')];_0x2ad234++){_0x5de759[_0xd3de('0x60')](db[_0xd3de('0x54')]['findOne']({'where':{'userProfileId':_0x234857['id'],'name':_0x1dfe23[_0x2ad234][_0xd3de('0x2b')]},'raw':!![]}));}return BPromise[_0xd3de('0x76')](_0x5de759);}})[_0xd3de('0x29')](function(_0x3e0be8){var _0x53c469=_[_0xd3de('0x40')](_0x3e0be8,function(_0x345a9e){return _0x345a9e?_0x345a9e:undefined;});var _0x6a5d7d=_[_0xd3de('0x40')](_0x1dfe23,[_0xd3de('0x77'),!![]]);var _0x3381fb=_['isEmpty'](_0x53c469)&&_[_0xd3de('0x66')](_0x6a5d7d)?null:_[_0xd3de('0x78')](_0x6a5d7d,_0x53c469);if(_0x3381fb){var _0x4d50d2=[];for(var _0x59801d=0x0;_0x59801d<_0x3381fb['length'];_0x59801d++){var _0x1eab48=_[_0xd3de('0x5b')](_0x1dfe23,function(_0x5de070){return _0x3381fb[_0x59801d]?_0x5de070[_0xd3de('0x2b')]===_0x3381fb[_0x59801d][_0xd3de('0x2b')]:null;});if(_0x1eab48){if(_0x3381fb[_0x59801d]['ignore']){_0x4d50d2[_0xd3de('0x60')](getAllResources(_0x430dfe['childModel'],_0x3381fb[_0x59801d]));}else{if(!_0x3381fb[_0x59801d][_0xd3de('0x56')]){_0x4d50d2[_0xd3de('0x60')](getAllowedResources(_0x1eab48,_0x3381fb[_0x59801d],_0x430dfe[_0xd3de('0x73')]));}else{if(_0x1eab48['model']){_0x4d50d2[_0xd3de('0x60')](getAllFilteredResources(_0x1eab48,_0x3381fb[_0x59801d]));}}}}}return BPromise[_0xd3de('0x76')](_0x4d50d2);}else{return null;}})[_0xd3de('0x29')](function(_0x41f0e4){var _0xc712ea=_0x41f0e4;var _0xf3b4e1=null;if(_0xc712ea){_0xf3b4e1=_0xc712ea['length']===0x1?_0xc712ea[0x0]:null;}if(_0xf3b4e1||_0xc712ea){var _0x4f8bfa=db[_0x430dfe[_0xd3de('0x73')]][_0xd3de('0x30')];_0x4b7404[_0xd3de('0x34')]=_[_0xd3de('0x35')](_0x4f8bfa);_0x4b7404[_0xd3de('0x36')]=_[_0xd3de('0x35')](_0x1c1481['query']);_0x4b7404[_0xd3de('0x37')]=_[_0xd3de('0x38')](_0x4b7404['model'],_0x4b7404[_0xd3de('0x36')]);_0x1997bd[_0xd3de('0x39')]=_['intersection'](_0x4b7404[_0xd3de('0x34')],qs[_0xd3de('0x3a')](_0x1c1481[_0xd3de('0x36')]['fields']));_0x1997bd['attributes']=_0x1997bd['attributes']['length']?_0x1997bd[_0xd3de('0x39')]:_0x4b7404[_0xd3de('0x34')];if(!_0x1c1481['query'][_0xd3de('0x79')](_0xd3de('0x7a'))){_0x1997bd[_0xd3de('0x3b')]=qs[_0xd3de('0x3b')](_0x1c1481[_0xd3de('0x36')][_0xd3de('0x3b')]);_0x1997bd[_0xd3de('0x21')]=qs['offset'](_0x1c1481[_0xd3de('0x36')]['offset']);}_0x1997bd[_0xd3de('0x3c')]=qs['sort'](_0x1c1481[_0xd3de('0x36')]['sort']);_0x1997bd[_0xd3de('0x3e')]=qs[_0xd3de('0x37')](_[_0xd3de('0x3f')](_0x1c1481['query'],_0x4b7404[_0xd3de('0x37')]));if(_0x1c1481[_0xd3de('0x36')][_0xd3de('0x40')]){_0x1997bd['where']=_['merge'](_0x1997bd[_0xd3de('0x3e')],{'$or':_[_0xd3de('0x2e')](_0x4f8bfa,function(_0x22dc70){if(_0x22dc70[_0xd3de('0x32')][_0xd3de('0x33')]!==_0xd3de('0x42')){var _0x2b4a1d={};_0x2b4a1d[_0x22dc70[_0xd3de('0x7b')]]={'$like':'%'+_0x1c1481[_0xd3de('0x36')][_0xd3de('0x40')]+'%'};return _0x2b4a1d;}})});}var _0x579e4d=[];if(_0xf3b4e1){var _0x694c6=_[_0xd3de('0x5b')](_0x1dfe23,[_0xd3de('0x2b'),_0xf3b4e1[_0xd3de('0x2b')]]);if(_0x694c6[_0xd3de('0x7b')]){var _0x332e08={};if(_0x430dfe['childModel']===_0xd3de('0x7c')){_0x332e08[_0x694c6[_0xd3de('0x7d')]]=_['map'](_0xf3b4e1[_0xd3de('0x7e')],'id');}else{_0x332e08[_0x694c6[_0xd3de('0x7d')]]=_0xf3b4e1['associatedResources'];}_0x579e4d[_0xd3de('0x60')](_0x332e08);}else{_0x1997bd[_0xd3de('0x3e')]['id']=_0xf3b4e1[_0xd3de('0x7e')];}}else{for(var _0x1d8451=0x0;_0x1d8451<_0xc712ea[_0xd3de('0x49')];_0x1d8451++){var _0x694c6=_[_0xd3de('0x5b')](_0x1dfe23,[_0xd3de('0x2b'),_0xc712ea[_0x1d8451][_0xd3de('0x2b')]]);if(_0x694c6['field']){var _0x332e08={};_0x332e08[_0x694c6[_0xd3de('0x7d')]]=_0xc712ea[_0x1d8451][_0xd3de('0x7e')];_0x579e4d[_0xd3de('0x60')](_0x332e08);}else{if(!_0x1997bd['where']['id'])_0x1997bd[_0xd3de('0x3e')]['id']=[];_0xc712ea[_0x1d8451]['associatedResources'][_0xd3de('0x69')](function(_0x3a1d82){_0x1997bd['where']['id'][_0xd3de('0x60')](_0x3a1d82);});}}}if(!_['isEmpty'](_0x579e4d)){_0x1997bd[_0xd3de('0x3e')]=_[_0xd3de('0x41')](_0x1997bd[_0xd3de('0x3e')],{'$and':{'$or':_0x579e4d}});}_0x1997bd=_[_0xd3de('0x41')]({},_0x1997bd,_0x1c1481[_0xd3de('0x43')]);if(_0xf3b4e1&&!_0xf3b4e1[_0xd3de('0x56')]&&_0x430dfe['childModel']===_0xd3de('0x7c')){if(_0x1c1481[_0xd3de('0x36')][_0xd3de('0x44')]){_0x1997bd[_0xd3de('0x45')]=[{'all':!![]}];}return db[_0x430dfe[_0xd3de('0x73')]][_0xd3de('0x46')](_0x1997bd)['then'](function(_0x162d8d){var _0x1e05a4=[];_0x162d8d['forEach'](function(_0x32c09d){var _0x4cb7cb;switch(_0x32c09d[_0xd3de('0x7f')]){case'default':_0x4cb7cb=_[_0xd3de('0x5b')](_0xf3b4e1['associatedResources'],function(_0x474aab){return _0x474aab['id']===_0x32c09d['reportId']&&_0x474aab[_0xd3de('0x32')]===_0xd3de('0x80');});break;case _0xd3de('0x81'):_0x4cb7cb=_['find'](_0xf3b4e1[_0xd3de('0x7e')],function(_0x97e85c){return _0x97e85c['id']===_0x32c09d[_0xd3de('0x82')]&&_0x97e85c[_0xd3de('0x32')]===_0xd3de('0x83');});break;}if(_0x4cb7cb)_0x1e05a4['push'](_0x32c09d);});_0x445682[_0xd3de('0x23')]=_0x1e05a4[_0xd3de('0x49')];_0x445682['rows']=_0x1e05a4;return _0x445682;});}else{return db[_0x430dfe['childModel']]['count']({'where':_0x1997bd[_0xd3de('0x3e')]})[_0xd3de('0x29')](function(_0x188032){_0x445682['count']=_0x188032;if(_0x1c1481['query'][_0xd3de('0x44')]){if(_0x430dfe[_0xd3de('0x73')]===_0xd3de('0x84')){_0x1997bd[_0xd3de('0x45')]=[{'model':db[_0xd3de('0x85')],'as':_0xd3de('0x86'),'attributes':['id',_0xd3de('0x2b'),_0xd3de('0x87')],'required':_0x1c1481[_0xd3de('0x36')]['tag']?!![]:![]},{'model':db['Tag'],'as':_0xd3de('0x88'),'attributes':['id',_0xd3de('0x2b'),_0xd3de('0x87')],'through':_0x1c1481[_0xd3de('0x36')][_0xd3de('0x89')]?{'attributes':[],'where':{'TagId':_0x1c1481[_0xd3de('0x36')][_0xd3de('0x89')]||undefined}}:{},'required':_0x1c1481[_0xd3de('0x36')][_0xd3de('0x89')]?!![]:![]}];}else{_0x1997bd[_0xd3de('0x45')]=[{'all':!![]}];}}return db[_0x430dfe['childModel']][_0xd3de('0x46')](_0x1997bd);})['then'](function(_0x2cfeff){_0x445682['rows']=_0x2cfeff;if(_0x2db4d2===_0xd3de('0x8a')&&_0x1c1481[_0xd3de('0x36')][_0xd3de('0x8b')]==='true'){var _0x24b6ce=[];for(var _0x79b0a4=0x0;_0x79b0a4<_0x445682[_0xd3de('0x47')]['length'];_0x79b0a4++){_0x24b6ce['push'](getOpenTabs(_0xd3de('0x8c'),_0x445682['rows'][_0x79b0a4][_0xd3de('0x8d')]));_0x24b6ce[_0xd3de('0x60')](getOpenTabs(_0xd3de('0x8e'),_0x445682['rows'][_0x79b0a4][_0xd3de('0x8d')]));_0x24b6ce[_0xd3de('0x60')](getOpenTabs(_0xd3de('0x8f'),_0x445682[_0xd3de('0x47')][_0x79b0a4]['dataValues']));_0x24b6ce[_0xd3de('0x60')](getOpenTabs(_0xd3de('0x90'),_0x445682[_0xd3de('0x47')][_0x79b0a4][_0xd3de('0x8d')]));_0x24b6ce[_0xd3de('0x60')](getOpenTabs('openchannel',_0x445682[_0xd3de('0x47')][_0x79b0a4][_0xd3de('0x8d')]));_0x24b6ce[_0xd3de('0x60')](getOpenTabs('whatsapp',_0x445682[_0xd3de('0x47')][_0x79b0a4]['dataValues']));}return Promise[_0xd3de('0x76')](_0x24b6ce)['then'](function(){return _0x445682;});}return _0x445682;});}}else{return _0x445682;}})['then'](respondWithFilteredResult(_0x388c09,_0x1997bd))['catch'](handleError(_0x388c09,null));};function getOpenTabs(_0x49d8f4,_0x220a32){var _0x75c108=_0x49d8f4[_0xd3de('0x91')](0x0)[_0xd3de('0x92')]()+_0x49d8f4[_0xd3de('0x93')](0x1);var _0x120d60={'type':db['Sequelize'][_0xd3de('0x94')]['SELECT'],'raw':!![]};return new BPromise(function(_0x39c054,_0x50ef80){var _0x24b4d4=squel[_0xd3de('0x95')]()[_0xd3de('0x7b')](_0xd3de('0x96')+_0x75c108+'InteractionId','id')[_0xd3de('0x7b')](_0xd3de('0x97'))[_0xd3de('0x98')](_0xd3de('0x99')+_0x49d8f4+_0xd3de('0x9a'),'ui')[_0xd3de('0x3e')](_0xd3de('0x9b'),_0x220a32['id']);return db[_0xd3de('0x52')][_0xd3de('0x36')](_0x24b4d4[_0xd3de('0x9c')](),_0x120d60)[_0xd3de('0x29')](function(_0x3a8cbb){_0x220a32[_0x75c108+_0xd3de('0x9d')]=_0x3a8cbb;_0x39c054(_0x3a8cbb);})[_0xd3de('0x48')](function(_0x325ff9){_0x50ef80(_0x325ff9);});});}function getAllResources(_0x473e2f,_0x488ab5){return new BPromise(function(_0x3a5c93,_0x3b9c5a){if(_0x488ab5){var _0x18aa60=_0x488ab5[_0xd3de('0x40')]?{[_0x488ab5['filter'][_0xd3de('0x7b')]]:_0x488ab5[_0xd3de('0x40')][_0xd3de('0x9e')]}:undefined;return db[_0x473e2f][_0xd3de('0x46')]({'where':_0x18aa60,'raw':!![]})[_0xd3de('0x29')](function(_0x165f7c){_0x488ab5[_0xd3de('0x7e')]=_['map'](_0x165f7c,'id');_0x3a5c93(_0x488ab5);})[_0xd3de('0x48')](function(_0x271881){_0x3b9c5a(_0x271881);});}else{_0x3a5c93(null);}});}function getAllFilteredResources(_0x51c922,_0x49e0af){return new BPromise(function(_0x463bae,_0x5bc9f1){var _0x420aaf=_0x51c922['filter']?{[_0x51c922['filter'][_0xd3de('0x7b')]]:_0x51c922['filter'][_0xd3de('0x9e')]}:undefined;return db[_0x51c922[_0xd3de('0x34')]][_0xd3de('0x46')]({'where':_0x420aaf,'raw':!![]})['then'](function(_0x42e196){_0x49e0af['associatedResources']=_['map'](_0x42e196,function(_0x413251){return _0x51c922[_0xd3de('0x7b')]?_0x413251[_0x51c922['field']]:_0x413251[_0xd3de('0x2b')];});_0x463bae(_0x49e0af);})[_0xd3de('0x48')](function(_0x5e814d){_0x5bc9f1(_0x5e814d);});});}function getAllowedResources(_0x307580,_0x39cd3c,_0x589184){return new BPromise(function(_0x507ea5,_0x23082e){if(_0x39cd3c){return db[_0xd3de('0x57')][_0xd3de('0x46')]({'where':{'sectionId':_0x39cd3c['id']},'raw':!![]})['then'](function(_0x2c92f2){if(_0x307580[_0xd3de('0x7b')]&&_0x307580[_0xd3de('0x7b')]!=='id'){_0x39cd3c['associatedResources']=_[_0xd3de('0x2e')](_0x2c92f2,function(_0x506eb0){return _0x506eb0[_0x307580[_0xd3de('0x7b')]];});}else{if(_0x589184===_0xd3de('0x7c')){_0x39cd3c[_0xd3de('0x7e')]=_['map'](_0x2c92f2,function(_0x3a1073){return{'id':_0x3a1073['resourceId'],'type':_0x3a1073['type']};});}else{_0x39cd3c[_0xd3de('0x7e')]=_[_0xd3de('0x2e')](_0x2c92f2,function(_0x13b43d){return _0x13b43d['resourceId'];});}}_0x507ea5(_0x39cd3c);})[_0xd3de('0x48')](function(_0x43f9ee){_0x23082e(_0x43f9ee);});}else{_0x507ea5(null);}});}function getQueryModels(_0x140bd6,_0x1b9d49){var _0x1b6c58=_0x140bd6[_0xd3de('0x9f')]();var _0x348b40={'childModel':undefined,'parentSections':[]};switch(_0x1b6c58){case _0xd3de('0xa0'):_0x348b40['childModel']=_0xd3de('0xa1');break;case _0xd3de('0xa2'):_0x348b40['childModel']='SquareOdbc';break;case'squarerecordings':_0x348b40['childModel']=_0xd3de('0xa3');_0x348b40[_0xd3de('0x75')]=[{'name':_0xd3de('0xa4'),'field':_0xd3de('0x2b'),'foreignKey':_0xd3de('0xa5')}];break;case _0xd3de('0xa6'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xa7');break;case _0xd3de('0xa8'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0x84');_0x348b40[_0xd3de('0x75')]=[{'name':_0xd3de('0xa9'),'field':'id','foreignKey':_0xd3de('0xaa')}];break;case _0xd3de('0xab'):_0x348b40['childModel']=_0xd3de('0xac');break;case _0xd3de('0xad'):_0x348b40['childModel']=_0xd3de('0xae');break;case _0xd3de('0xaf'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xb0');break;case _0xd3de('0xb1'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xb2');break;case'chatwebsites':_0x348b40[_0xd3de('0x73')]='ChatWebsite';break;case _0xd3de('0xb3'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xb4');break;case _0xd3de('0xb5'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xb6');break;case'inboundroutes':case _0xd3de('0xb7'):case'outboundroutes':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xb8');break;case _0xd3de('0xb9'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xba');break;case _0xd3de('0xbb'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xbc');break;case'voicerecordings':_0x348b40[_0xd3de('0x73')]='VoiceRecording';_0x348b40[_0xd3de('0x75')]=[{'name':_0xd3de('0x8a'),'field':'name','foreignKey':_0xd3de('0xbd'),'model':_0xd3de('0xbe'),'filter':{'field':_0xd3de('0xbf'),'value':[_0xd3de('0xc0')]}},{'name':_0xd3de('0xc1'),'field':_0xd3de('0x2b'),'foreignKey':_0xd3de('0xbd'),'model':_0xd3de('0xbe'),'filter':{'field':_0xd3de('0xbf'),'value':['telephone']}},{'name':_0xd3de('0xc2'),'field':'name','foreignKey':'queue','model':_0xd3de('0xc3'),'filter':{'field':_0xd3de('0x32'),'value':['inbound']}},{'name':'QueueCampaigns','field':_0xd3de('0x2b'),'foreignKey':_0xd3de('0xc4'),'model':_0xd3de('0xc3'),'filter':{'field':_0xd3de('0x32'),'value':['outbound']}}];break;case _0xd3de('0xc5'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xc6');break;case _0xd3de('0xc7'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xc8');break;case _0xd3de('0xc9'):_0x348b40[_0xd3de('0x73')]='VoicePrefix';break;case _0xd3de('0xca'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xcb');break;case _0xd3de('0xcc'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xcd');break;case _0xd3de('0xce'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xcf');break;case _0xd3de('0xd0'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xd1');break;case _0xd3de('0xd2'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xd3');break;case _0xd3de('0xd4'):_0x348b40['childModel']='OpenchannelAccount';break;case _0xd3de('0xd5'):_0x348b40[_0xd3de('0x73')]='SmsQueue';break;case _0xd3de('0xd6'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xd7');break;case'whatsappqueues':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xd8');break;case'teams':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xd9');break;case _0xd3de('0xda'):case _0xd3de('0xdb'):_0x348b40[_0xd3de('0x73')]='VoiceQueue';if(_0x1b9d49){_0x348b40[_0xd3de('0x75')]=[{'name':_0xd3de('0xc2')},{'name':_0xd3de('0xdc')}];}break;case _0xd3de('0xdd'):case _0xd3de('0xde'):case _0xd3de('0xdf'):_0x348b40['childModel']='User';if(_0x1b9d49){_0x348b40[_0xd3de('0x75')]=[{'name':'Users','filter':{'field':_0xd3de('0xbf'),'value':[_0xd3de('0xe0'),_0xd3de('0xe1')]},'ignore':!![]},{'name':_0xd3de('0x8a')},{'name':_0xd3de('0xc1')}];}break;case _0xd3de('0xe2'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xe3');break;case _0xd3de('0xe4'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xe5');break;case'freshdeskaccounts':_0x348b40['childModel']=_0xd3de('0xe6');break;case'sugarcrmaccounts':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xe7');break;case _0xd3de('0xe8'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xe9');break;case'zohoaccounts':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xea');break;case _0xd3de('0xeb'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xbe');break;case _0xd3de('0xec'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xed');break;case _0xd3de('0xee'):_0x348b40[_0xd3de('0x73')]='Disposition';break;case'customdashboards':_0x348b40[_0xd3de('0x73')]=_0xd3de('0x68');break;case _0xd3de('0xef'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xf0');break;case _0xd3de('0xf1'):_0x348b40['childModel']='Pause';break;case _0xd3de('0xf2'):_0x348b40['childModel']=_0xd3de('0xf3');break;case _0xd3de('0xf4'):_0x348b40[_0xd3de('0x73')]='Sound';break;case _0xd3de('0xf5'):_0x348b40['childModel']=_0xd3de('0x85');break;case _0xd3de('0xf6'):_0x348b40[_0xd3de('0x73')]='Template';break;case'triggers':_0x348b40[_0xd3de('0x73')]='Trigger';break;case _0xd3de('0xf7'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0xf8');break;case'variables':_0x348b40[_0xd3de('0x73')]='Variable';break;case'plugins':_0x348b40[_0xd3de('0x73')]=_0xd3de('0x6b');break;case _0xd3de('0xf9'):_0x348b40[_0xd3de('0x73')]=_0xd3de('0x7c');_0x348b40['parentSections']=[{'name':_0xd3de('0xfa'),'field':'id','foreignKey':'reportId'}];break;case'metrics':_0x348b40['childModel']=_0xd3de('0xfb');break;case'whatsappaccounts':_0x348b40[_0xd3de('0x73')]=_0xd3de('0xfc');break;case _0xd3de('0xfd'):_0x348b40['childModel']=_0xd3de('0xfe');_0x348b40[_0xd3de('0x75')]=[{'name':_0xd3de('0x8a'),'field':'id','foreignKey':_0xd3de('0xff'),'model':_0xd3de('0xbe'),'filter':{'field':_0xd3de('0xbf'),'value':[_0xd3de('0xc0')]}},{'name':_0xd3de('0xc1'),'field':'id','foreignKey':_0xd3de('0xff'),'model':_0xd3de('0xbe'),'filter':{'field':'role','value':['telephone']}}];break;default:return _0x348b40;}return _0x348b40;} \ No newline at end of file diff --git a/server/api/userProfile/userProfile.events.js b/server/api/userProfile/userProfile.events.js index 3276cf9..4a6670d 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 _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 +var _0xcd2f=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x5eefcd,_0x988de0){var _0xae538d=function(_0x26a1b8){while(--_0x26a1b8){_0x5eefcd['push'](_0x5eefcd['shift']());}};_0xae538d(++_0x988de0);}(_0xcd2f,0xf8));var _0xfcd2=function(_0x16d10f,_0x2ba2d5){_0x16d10f=_0x16d10f-0x0;var _0x50c823=_0xcd2f[_0x16d10f];return _0x50c823;};'use strict';var EventEmitter=require('events');var UserProfile=require('../../mysqldb')['db']['UserProfile'];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xfcd2('0x0')](0x0);var events={'afterCreate':_0xfcd2('0x1'),'afterUpdate':_0xfcd2('0x2'),'afterDestroy':_0xfcd2('0x3')};function emitEvent(_0x131baf){return function(_0x248361,_0x8a26c,_0x11562c){UserProfileEvents['emit'](_0x131baf+':'+_0x248361['id'],_0x248361);UserProfileEvents[_0xfcd2('0x4')](_0x131baf,_0x248361);_0x11562c(null);};}for(var e in events){if(events[_0xfcd2('0x5')](e)){var event=events[e];UserProfile[_0xfcd2('0x6')](e,emitEvent(event));}}module[_0xfcd2('0x7')]=UserProfileEvents; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.model.js b/server/api/userProfile/userProfile.model.js index b71d7ef..d485638 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 _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 +var _0x9957=['privacyEnabled','then','catch','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./userProfile.attributes','exports','define','UserProfile','models','User','update'];(function(_0x1eda20,_0x1149f4){var _0x31b953=function(_0x25f0d8){while(--_0x25f0d8){_0x1eda20['push'](_0x1eda20['shift']());}};_0x31b953(++_0x1149f4);}(_0x9957,0x93));var _0x7995=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x9957[_0x4cf98e];return _0x1623ac;};'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':'user_profiles','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x465276,_0x1cad37,_0x4a64f7){var _0xa2e5f0=_0x137b6b[_0x7995('0xc')];_0xa2e5f0[_0x7995('0xd')][_0x7995('0xe')]({'privacyEnabled':_0x465276[_0x7995('0xf')]},{'where':{'UserProfileId':_0x465276['id']}})[_0x7995('0x10')](function(){_0x4a64f7();})[_0x7995('0x11')](function(_0x524f7b){_0x4a64f7(_0x524f7b);});}}});}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.rpc.js b/server/api/userProfile/userProfile.rpc.js index d5abad7..08a7b16 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 _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 +var _0xafb9=['../../config/logger','jayson/promise','http','redis','localhost','socket.io-emitter','./userProfile.socket','register','request','then','info','UserProfile,\x20%s,\x20%s','request\x20sent','debug','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x301c60,_0xcb7733){var _0x2b5357=function(_0x58bb19){while(--_0x58bb19){_0x301c60['push'](_0x301c60['shift']());}};_0x2b5357(++_0xcb7733);}(_0xafb9,0x68));var _0x9afb=function(_0x355f73,_0x1f53dd){_0x355f73=_0x355f73-0x0;var _0x3ecce2=_0xafb9[_0x355f73];return _0x3ecce2;};'use strict';var _=require(_0x9afb('0x0'));var util=require(_0x9afb('0x1'));var moment=require(_0x9afb('0x2'));var BPromise=require(_0x9afb('0x3'));var rs=require(_0x9afb('0x4'));var fs=require('fs');var Redis=require(_0x9afb('0x5'));var db=require(_0x9afb('0x6'))['db'];var utils=require(_0x9afb('0x7'));var logger=require(_0x9afb('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x9afb('0x9'));var client=jayson['client'][_0x9afb('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0x9afb('0xb')],{'host':_0x9afb('0xc'),'port':0x18eb});var socket=require(_0x9afb('0xd'))(new Redis(config['redis']));require(_0x9afb('0xe'))[_0x9afb('0xf')](socket);function respondWithRpcPromise(_0x2aaefe,_0x27fa71,_0x1e5325){return new BPromise(function(_0x56f477,_0x5bb974){return client[_0x9afb('0x10')](_0x2aaefe,_0x1e5325)[_0x9afb('0x11')](function(_0x3e6a29){logger[_0x9afb('0x12')](_0x9afb('0x13'),_0x27fa71,_0x9afb('0x14'));logger[_0x9afb('0x15')](_0x9afb('0x16'),_0x27fa71,_0x9afb('0x14'),JSON[_0x9afb('0x17')](_0x3e6a29));if(_0x3e6a29['error']){if(_0x3e6a29[_0x9afb('0x18')]['code']===0x1f4){logger['error'](_0x9afb('0x13'),_0x27fa71,_0x3e6a29[_0x9afb('0x18')][_0x9afb('0x19')]);return _0x5bb974(_0x3e6a29[_0x9afb('0x18')][_0x9afb('0x19')]);}logger[_0x9afb('0x18')](_0x9afb('0x13'),_0x27fa71,_0x3e6a29['error'][_0x9afb('0x19')]);return _0x56f477(_0x3e6a29[_0x9afb('0x18')][_0x9afb('0x19')]);}else{logger[_0x9afb('0x12')](_0x9afb('0x13'),_0x27fa71,'request\x20sent');_0x56f477(_0x3e6a29[_0x9afb('0x1a')]['message']);}})[_0x9afb('0x1b')](function(_0x12aa19){logger['error']('UserProfile,\x20%s,\x20%s',_0x27fa71,_0x12aa19);_0x5bb974(_0x12aa19);});});} \ No newline at end of file diff --git a/server/api/userProfile/userProfile.socket.js b/server/api/userProfile/userProfile.socket.js index 7bd9e43..a07b0d1 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 _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 +var _0xf90d=['./userProfile.events','save','update','emit','register','userProfile:'];(function(_0x5bda3b,_0x41160f){var _0x431bb9=function(_0x160122){while(--_0x160122){_0x5bda3b['push'](_0x5bda3b['shift']());}};_0x431bb9(++_0x41160f);}(_0xf90d,0x1a4));var _0xdf90=function(_0x422e7c,_0x1e9952){_0x422e7c=_0x422e7c-0x0;var _0x57244d=_0xf90d[_0x422e7c];return _0x57244d;};'use strict';var UserProfileEvents=require(_0xdf90('0x0'));var events=[_0xdf90('0x1'),'remove',_0xdf90('0x2')];function createListener(_0x49aada,_0x2a26c2){return function(_0x401438){_0x2a26c2[_0xdf90('0x3')](_0x49aada,_0x401438);};}function removeListener(_0x3087a9,_0x32fd6d){return function(){UserProfileEvents['removeListener'](_0x3087a9,_0x32fd6d);};}exports[_0xdf90('0x4')]=function(_0x32e22e){for(var _0x4de428=0x0,_0x34b74=events['length'];_0x4de428<_0x34b74;_0x4de428++){var _0x3bcbc2=events[_0x4de428];var _0x1c4821=createListener(_0xdf90('0x5')+_0x3bcbc2,_0x32e22e);UserProfileEvents['on'](_0x3bcbc2,_0x1c4821);}}; \ No newline at end of file diff --git a/server/api/userProfileResource/index.js b/server/api/userProfileResource/index.js index aa3bede..f6e0383 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 _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 +var _0xeb6f=['get','isAuthenticated','index','/describe','/:id','show','post','create','put','update','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','./userProfileResource.controller'];(function(_0x25cf6f,_0x51e679){var _0x5badce=function(_0x4185f9){while(--_0x4185f9){_0x25cf6f['push'](_0x25cf6f['shift']());}};_0x5badce(++_0x51e679);}(_0xeb6f,0x9c));var _0xfeb6=function(_0x4b2cc6,_0x29ef43){_0x4b2cc6=_0x4b2cc6-0x0;var _0x3e0b08=_0xeb6f[_0x4b2cc6];return _0x3e0b08;};'use strict';var multer=require(_0xfeb6('0x0'));var util=require('util');var path=require(_0xfeb6('0x1'));var timeout=require(_0xfeb6('0x2'));var express=require(_0xfeb6('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xfeb6('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xfeb6('0x5'));router[_0xfeb6('0x6')]('/',auth[_0xfeb6('0x7')](),controller[_0xfeb6('0x8')]);router[_0xfeb6('0x6')](_0xfeb6('0x9'),auth[_0xfeb6('0x7')](),controller['describe']);router[_0xfeb6('0x6')](_0xfeb6('0xa'),auth[_0xfeb6('0x7')](),controller[_0xfeb6('0xb')]);router[_0xfeb6('0xc')]('/',auth[_0xfeb6('0x7')](),controller[_0xfeb6('0xd')]);router[_0xfeb6('0xe')](_0xfeb6('0xa'),auth[_0xfeb6('0x7')](),controller[_0xfeb6('0xf')]);router['delete'](_0xfeb6('0xa'),auth[_0xfeb6('0x7')](),controller[_0xfeb6('0x10')]);module[_0xfeb6('0x11')]=router; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.attributes.js b/server/api/userProfileResource/userProfileResource.attributes.js index c62570c..eb6fa29 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 _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 +var _0x7eb2=['STRING','INTEGER','sequelize','exports'];(function(_0x562faa,_0x23adc7){var _0xc70f59=function(_0x2d7dec){while(--_0x2d7dec){_0x562faa['push'](_0x562faa['shift']());}};_0xc70f59(++_0x23adc7);}(_0x7eb2,0x82));var _0x27eb=function(_0xe53510,_0x1e1254){_0xe53510=_0xe53510-0x0;var _0x131583=_0x7eb2[_0xe53510];return _0x131583;};'use strict';var Sequelize=require(_0x27eb('0x0'));module[_0x27eb('0x1')]={'name':{'type':Sequelize[_0x27eb('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x27eb('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x27eb('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 3b75c14..cf16b1d 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 _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 +var _0x8952=['filter','VIRTUAL','merge','options','findAll','rows','show','params','keys','includeAll','include','catch','create','body','destroy','find','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','end','stack','name','map','UserProfileResource','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x8952,0x17e));var _0x2895=function(_0x206d94,_0x597565){_0x206d94=_0x206d94-0x0;var _0xc94c8f=_0x8952[_0x206d94];return _0xc94c8f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2895('0x0'));var zipdir=require(_0x2895('0x1'));var jsonpatch=require(_0x2895('0x2'));var rp=require(_0x2895('0x3'));var moment=require(_0x2895('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2895('0x5'));var util=require(_0x2895('0x6'));var path=require(_0x2895('0x7'));var sox=require('sox');var csv=require(_0x2895('0x8'));var ejs=require(_0x2895('0x9'));var fs=require('fs');var fs_extra=require(_0x2895('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x2895('0xb'));var jsforce=require(_0x2895('0xc'));var deskjs=require(_0x2895('0xd'));var toCsv=require(_0x2895('0x8'));var querystring=require(_0x2895('0xe'));var Papa=require('papaparse');var Redis=require(_0x2895('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x2895('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x2895('0x11'));var utils=require(_0x2895('0x12'));var config=require(_0x2895('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x2895('0x14'))['db'];function respondWithStatusCode(_0x3924be,_0x4b1342){_0x4b1342=_0x4b1342||0xcc;return function(_0x32574c){if(_0x32574c){return _0x3924be[_0x2895('0x15')](_0x4b1342);}return _0x3924be['status'](_0x4b1342)['end']();};}function respondWithResult(_0x1d1493,_0x2ca2ac){_0x2ca2ac=_0x2ca2ac||0xc8;return function(_0x5777a0){if(_0x5777a0){return _0x1d1493[_0x2895('0x16')](_0x2ca2ac)[_0x2895('0x17')](_0x5777a0);}};}function respondWithFilteredResult(_0x27b50e,_0x1ae013){return function(_0x1d3659){if(_0x1d3659){var _0x2627e6=typeof _0x1ae013[_0x2895('0x18')]===_0x2895('0x19')&&typeof _0x1ae013[_0x2895('0x1a')]===_0x2895('0x19');var _0x10a1bf=_0x1d3659[_0x2895('0x1b')];var _0xbf8b63=_0x2627e6?0x0:_0x1ae013[_0x2895('0x18')];var _0x155124=_0x2627e6?_0x1d3659[_0x2895('0x1b')]:_0x1ae013[_0x2895('0x18')]+_0x1ae013[_0x2895('0x1a')];var _0x5a8eab;if(_0x155124>=_0x10a1bf){_0x155124=_0x10a1bf;_0x5a8eab=0xc8;}else{_0x5a8eab=0xce;}_0x27b50e['status'](_0x5a8eab);return _0x27b50e['set'](_0x2895('0x1c'),_0xbf8b63+'-'+_0x155124+'/'+_0x10a1bf)[_0x2895('0x17')](_0x1d3659);}return null;};}function patchUpdates(_0x3ec4da){return function(_0x593e47){try{jsonpatch[_0x2895('0x1d')](_0x593e47,_0x3ec4da,!![]);}catch(_0x190b79){return BPromise[_0x2895('0x1e')](_0x190b79);}return _0x593e47[_0x2895('0x1f')]();};}function saveUpdates(_0x8b75e0,_0x5dbbfe){return function(_0x30c6c3){if(_0x30c6c3){return _0x30c6c3[_0x2895('0x20')](_0x8b75e0)['then'](function(_0x142e58){return _0x142e58;});}return null;};}function removeEntity(_0x384357,_0x6f8ad4){return function(_0x511286){if(_0x511286){return _0x511286['destroy']()[_0x2895('0x21')](function(){_0x384357[_0x2895('0x16')](0xcc)[_0x2895('0x22')]();});}};}function handleEntityNotFound(_0x4a21cf,_0x3d3320){return function(_0x3690ce){if(!_0x3690ce){_0x4a21cf['sendStatus'](0x194);}return _0x3690ce;};}function handleError(_0x293ad3,_0x127540){_0x127540=_0x127540||0x1f4;return function(_0x2cd4df){logger['error'](_0x2cd4df[_0x2895('0x23')]);if(_0x2cd4df[_0x2895('0x24')]){delete _0x2cd4df['name'];}_0x293ad3[_0x2895('0x16')](_0x127540)['send'](_0x2cd4df);};}exports['index']=function(_0x18a935,_0x4ee2cc){var _0xfa4f85={},_0x381538={},_0x4fdd94={'count':0x0,'rows':[]};var _0x5574bf=_[_0x2895('0x25')](db[_0x2895('0x26')][_0x2895('0x27')],function(_0x14e343){return{'name':_0x14e343[_0x2895('0x28')],'type':_0x14e343[_0x2895('0x29')][_0x2895('0x2a')]};});_0x381538['model']=_[_0x2895('0x25')](_0x5574bf,_0x2895('0x24'));_0x381538[_0x2895('0x2b')]=_['keys'](_0x18a935[_0x2895('0x2b')]);_0x381538[_0x2895('0x2c')]=_[_0x2895('0x2d')](_0x381538[_0x2895('0x2e')],_0x381538['query']);_0xfa4f85[_0x2895('0x2f')]=_[_0x2895('0x2d')](_0x381538[_0x2895('0x2e')],qs[_0x2895('0x30')](_0x18a935[_0x2895('0x2b')]['fields']));_0xfa4f85['attributes']=_0xfa4f85[_0x2895('0x2f')][_0x2895('0x31')]?_0xfa4f85['attributes']:_0x381538[_0x2895('0x2e')];if(!_0x18a935['query'][_0x2895('0x32')](_0x2895('0x33'))){_0xfa4f85['limit']=qs[_0x2895('0x1a')](_0x18a935['query'][_0x2895('0x1a')]);_0xfa4f85['offset']=qs['offset'](_0x18a935[_0x2895('0x2b')][_0x2895('0x18')]);}_0xfa4f85[_0x2895('0x34')]=qs['sort'](_0x18a935[_0x2895('0x2b')][_0x2895('0x35')]);_0xfa4f85[_0x2895('0x36')]=qs[_0x2895('0x2c')](_[_0x2895('0x37')](_0x18a935[_0x2895('0x2b')],_0x381538[_0x2895('0x2c')]),_0x5574bf);if(_0x18a935[_0x2895('0x2b')][_0x2895('0x38')]){_0xfa4f85[_0x2895('0x36')]=_['merge'](_0xfa4f85[_0x2895('0x36')],{'$or':_[_0x2895('0x25')](_0x5574bf,function(_0x47413d){if(_0x47413d[_0x2895('0x29')]!==_0x2895('0x39')){var _0x12d7d8={};_0x12d7d8[_0x47413d[_0x2895('0x24')]]={'$like':'%'+_0x18a935['query']['filter']+'%'};return _0x12d7d8;}})});}_0xfa4f85=_[_0x2895('0x3a')]({},_0xfa4f85,_0x18a935[_0x2895('0x3b')]);var _0x24b9e0={'where':_0xfa4f85[_0x2895('0x36')]};return db[_0x2895('0x26')][_0x2895('0x1b')](_0x24b9e0)['then'](function(_0x5d18ef){_0x4fdd94[_0x2895('0x1b')]=_0x5d18ef;if(_0x18a935[_0x2895('0x2b')]['includeAll']){_0xfa4f85['include']=[{'all':!![]}];}return db[_0x2895('0x26')][_0x2895('0x3c')](_0xfa4f85);})[_0x2895('0x21')](function(_0x28967f){_0x4fdd94[_0x2895('0x3d')]=_0x28967f;return _0x4fdd94;})[_0x2895('0x21')](respondWithFilteredResult(_0x4ee2cc,_0xfa4f85))['catch'](handleError(_0x4ee2cc,null));};exports[_0x2895('0x3e')]=function(_0x2cfb24,_0x18ca24){var _0x1537fd={'raw':![],'where':{'id':_0x2cfb24[_0x2895('0x3f')]['id']}},_0x4af6d6={};_0x4af6d6[_0x2895('0x2e')]=_[_0x2895('0x40')](db[_0x2895('0x26')]['rawAttributes']);_0x4af6d6['query']=_[_0x2895('0x40')](_0x2cfb24[_0x2895('0x2b')]);_0x4af6d6[_0x2895('0x2c')]=_[_0x2895('0x2d')](_0x4af6d6[_0x2895('0x2e')],_0x4af6d6['query']);_0x1537fd['attributes']=_[_0x2895('0x2d')](_0x4af6d6[_0x2895('0x2e')],qs[_0x2895('0x30')](_0x2cfb24[_0x2895('0x2b')][_0x2895('0x30')]));_0x1537fd[_0x2895('0x2f')]=_0x1537fd[_0x2895('0x2f')]['length']?_0x1537fd[_0x2895('0x2f')]:_0x4af6d6[_0x2895('0x2e')];if(_0x2cfb24[_0x2895('0x2b')][_0x2895('0x41')]){_0x1537fd[_0x2895('0x42')]=[{'all':!![]}];}_0x1537fd=_[_0x2895('0x3a')]({},_0x1537fd,_0x2cfb24[_0x2895('0x3b')]);return db[_0x2895('0x26')]['find'](_0x1537fd)[_0x2895('0x21')](handleEntityNotFound(_0x18ca24,null))[_0x2895('0x21')](respondWithResult(_0x18ca24,null))[_0x2895('0x43')](handleError(_0x18ca24,null));};exports['create']=function(_0xc85aa1,_0x5307a9){return db['UserProfileResource'][_0x2895('0x44')](_0xc85aa1[_0x2895('0x45')],{})[_0x2895('0x21')](respondWithResult(_0x5307a9,0xc9))[_0x2895('0x43')](handleError(_0x5307a9,null));};exports[_0x2895('0x20')]=function(_0x3cc331,_0x11e53a){if(_0x3cc331['body']['id']){delete _0x3cc331[_0x2895('0x45')]['id'];}return db[_0x2895('0x26')]['find']({'where':{'id':_0x3cc331['params']['id']}})['then'](handleEntityNotFound(_0x11e53a,null))[_0x2895('0x21')](saveUpdates(_0x3cc331[_0x2895('0x45')],null))[_0x2895('0x21')](respondWithResult(_0x11e53a,null))[_0x2895('0x43')](handleError(_0x11e53a,null));};exports[_0x2895('0x46')]=function(_0x3c5261,_0xaca46c){return db[_0x2895('0x26')][_0x2895('0x47')]({'where':{'id':_0x3c5261[_0x2895('0x3f')]['id']}})[_0x2895('0x21')](handleEntityNotFound(_0xaca46c,null))[_0x2895('0x21')](removeEntity(_0xaca46c,null))[_0x2895('0x43')](handleError(_0xaca46c,null));};exports[_0x2895('0x48')]=function(_0x356d35,_0x3c1135){return db[_0x2895('0x26')][_0x2895('0x48')]()[_0x2895('0x21')](respondWithResult(_0x3c1135,null))[_0x2895('0x43')](handleError(_0x3c1135,null));}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.model.js b/server/api/userProfileResource/userProfileResource.model.js index 58411f7..071f5f2 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 _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 +var _0x3b01=['UserProfileResource','compositeIndex','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./userProfileResource.attributes','exports','define'];(function(_0x134be0,_0x5f493f){var _0x55aa6c=function(_0x3101db){while(--_0x3101db){_0x134be0['push'](_0x134be0['shift']());}};_0x55aa6c(++_0x5f493f);}(_0x3b01,0x1be));var _0x13b0=function(_0x5f13e7,_0x339f93){_0x5f13e7=_0x5f13e7-0x0;var _0x21d4e0=_0x3b01[_0x5f13e7];return _0x21d4e0;};'use strict';var _=require('lodash');var util=require(_0x13b0('0x0'));var logger=require(_0x13b0('0x1'))(_0x13b0('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x13b0('0x3'));var fs=require('fs');var path=require(_0x13b0('0x4'));var rimraf=require(_0x13b0('0x5'));var config=require(_0x13b0('0x6'));var attributes=require(_0x13b0('0x7'));module[_0x13b0('0x8')]=function(_0x2e0535,_0x17709c){return _0x2e0535[_0x13b0('0x9')](_0x13b0('0xa'),attributes,{'tableName':'user_profile_has_resources','paranoid':![],'indexes':[{'name':_0x13b0('0xb'),'fields':['resourceId','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 7e77d83..0c9ffe2 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 _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 +var _0x1b08=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','bluebird','randomstring'];(function(_0x2e2ba3,_0x199d16){var _0x3c7a99=function(_0x30fe23){while(--_0x30fe23){_0x2e2ba3['push'](_0x2e2ba3['shift']());}};_0x3c7a99(++_0x199d16);}(_0x1b08,0x1c5));var _0x81b0=function(_0x491faa,_0x4f2907){_0x491faa=_0x491faa-0x0;var _0x414440=_0x1b08[_0x491faa];return _0x414440;};'use strict';var _=require('lodash');var util=require(_0x81b0('0x0'));var moment=require('moment');var BPromise=require(_0x81b0('0x1'));var rs=require(_0x81b0('0x2'));var fs=require('fs');var Redis=require(_0x81b0('0x3'));var db=require(_0x81b0('0x4'))['db'];var utils=require(_0x81b0('0x5'));var logger=require(_0x81b0('0x6'))('rpc');var config=require(_0x81b0('0x7'));var jayson=require(_0x81b0('0x8'));var client=jayson[_0x81b0('0x9')][_0x81b0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xae4043,_0x51cf1f,_0x2e4c31){return new BPromise(function(_0xf7d161,_0x3cb412){return client[_0x81b0('0xb')](_0xae4043,_0x2e4c31)[_0x81b0('0xc')](function(_0x37ba1e){logger[_0x81b0('0xd')](_0x81b0('0xe'),_0x51cf1f,_0x81b0('0xf'));logger[_0x81b0('0x10')](_0x81b0('0x11'),_0x51cf1f,'request\x20sent',JSON[_0x81b0('0x12')](_0x37ba1e));if(_0x37ba1e[_0x81b0('0x13')]){if(_0x37ba1e[_0x81b0('0x13')][_0x81b0('0x14')]===0x1f4){logger[_0x81b0('0x13')](_0x81b0('0xe'),_0x51cf1f,_0x37ba1e[_0x81b0('0x13')][_0x81b0('0x15')]);return _0x3cb412(_0x37ba1e[_0x81b0('0x13')][_0x81b0('0x15')]);}logger['error'](_0x81b0('0xe'),_0x51cf1f,_0x37ba1e[_0x81b0('0x13')][_0x81b0('0x15')]);return _0xf7d161(_0x37ba1e[_0x81b0('0x13')][_0x81b0('0x15')]);}else{logger[_0x81b0('0xd')]('UserProfileResource,\x20%s,\x20%s',_0x51cf1f,'request\x20sent');_0xf7d161(_0x37ba1e[_0x81b0('0x16')]['message']);}})[_0x81b0('0x17')](function(_0x3dc8f8){logger['error'](_0x81b0('0xe'),_0x51cf1f,_0x3dc8f8);_0x3cb412(_0x3dc8f8);});});} \ No newline at end of file diff --git a/server/api/userProfileSection/index.js b/server/api/userProfileSection/index.js index 16ae3de..f81a4c3 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 _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 +var _0xb8c1=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./userProfileSection.controller','get','isAuthenticated','/describe','describe','post','create','put','/:id','destroy','exports','multer','path','express'];(function(_0x28d5fc,_0x59be3d){var _0x5f4d54=function(_0x517704){while(--_0x517704){_0x28d5fc['push'](_0x28d5fc['shift']());}};_0x5f4d54(++_0x59be3d);}(_0xb8c1,0x9f));var _0x1b8c=function(_0x1e1fb1,_0x5d2c86){_0x1e1fb1=_0x1e1fb1-0x0;var _0x370544=_0xb8c1[_0x1e1fb1];return _0x370544;};'use strict';var multer=require(_0x1b8c('0x0'));var util=require('util');var path=require(_0x1b8c('0x1'));var timeout=require('connect-timeout');var express=require(_0x1b8c('0x2'));var router=express[_0x1b8c('0x3')]();var fs_extra=require(_0x1b8c('0x4'));var auth=require(_0x1b8c('0x5'));var interaction=require(_0x1b8c('0x6'));var config=require('../../config/environment');var controller=require(_0x1b8c('0x7'));router[_0x1b8c('0x8')]('/',auth[_0x1b8c('0x9')](),controller['index']);router[_0x1b8c('0x8')](_0x1b8c('0xa'),auth[_0x1b8c('0x9')](),controller[_0x1b8c('0xb')]);router[_0x1b8c('0x8')]('/:id',auth[_0x1b8c('0x9')](),controller['show']);router[_0x1b8c('0xc')]('/',auth[_0x1b8c('0x9')](),controller[_0x1b8c('0xd')]);router[_0x1b8c('0xe')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0x1b8c('0xf'),auth[_0x1b8c('0x9')](),controller[_0x1b8c('0x10')]);module[_0x1b8c('0x11')]=router; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.attributes.js b/server/api/userProfileSection/userProfileSection.attributes.js index fa00c63..4f6290c 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 _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 +var _0x57f8=['join','getDataValue','split','exports','STRING','INTEGER','BOOLEAN','setDataValue','crudPermissions'];(function(_0x242a4f,_0x369c57){var _0x122117=function(_0x55a797){while(--_0x55a797){_0x242a4f['push'](_0x242a4f['shift']());}};_0x122117(++_0x369c57);}(_0x57f8,0x198));var _0x857f=function(_0x1196bd,_0xba4aea){_0x1196bd=_0x1196bd-0x0;var _0x26014f=_0x57f8[_0x1196bd];return _0x26014f;};'use strict';var Sequelize=require('sequelize');module[_0x857f('0x0')]={'name':{'type':Sequelize[_0x857f('0x1')],'allowNull':![]},'category':{'type':Sequelize[_0x857f('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize[_0x857f('0x2')],'allowNull':![]},'enabled':{'type':Sequelize[_0x857f('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x857f('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x857f('0x1')],'set':function(_0x6f054b){this[_0x857f('0x4')](_0x857f('0x5'),_0x6f054b?_0x6f054b[_0x857f('0x6')](''):[]);},'get':function(){return this[_0x857f('0x7')]('crudPermissions')?this[_0x857f('0x7')](_0x857f('0x5'))[_0x857f('0x8')](''):[];}}}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.controller.js b/server/api/userProfileSection/userProfileSection.controller.js index 6afc461..59f86c1 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 _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 +var _0x343b=['params','keys','rawAttributes','find','create','body','destroy','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','undefined','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','stack','name','send','map','UserProfileSection','model','query','filters','fields','attributes','hasOwnProperty','order','sort','pick','filter','where','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch'];(function(_0x42a8b8,_0x5eac6d){var _0x372952=function(_0x40e999){while(--_0x40e999){_0x42a8b8['push'](_0x42a8b8['shift']());}};_0x372952(++_0x5eac6d);}(_0x343b,0x1be));var _0xb343=function(_0xe5cb9a,_0x5c4772){_0xe5cb9a=_0xe5cb9a-0x0;var _0x4c67c6=_0x343b[_0xe5cb9a];return _0x4c67c6;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb343('0x0'));var zipdir=require(_0xb343('0x1'));var jsonpatch=require(_0xb343('0x2'));var rp=require(_0xb343('0x3'));var moment=require(_0xb343('0x4'));var BPromise=require(_0xb343('0x5'));var Mustache=require(_0xb343('0x6'));var util=require(_0xb343('0x7'));var path=require(_0xb343('0x8'));var sox=require(_0xb343('0x9'));var csv=require(_0xb343('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb343('0xb'));var squel=require(_0xb343('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb343('0xd'));var toCsv=require(_0xb343('0xa'));var querystring=require(_0xb343('0xe'));var Papa=require(_0xb343('0xf'));var Redis=require(_0xb343('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xb343('0x11'));var as=require(_0xb343('0x12'));var hardwareService=require(_0xb343('0x13'));var logger=require(_0xb343('0x14'))(_0xb343('0x15'));var utils=require(_0xb343('0x16'));var config=require(_0xb343('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xb343('0x18'))['db'];function respondWithStatusCode(_0x1a348c,_0x80a6aa){_0x80a6aa=_0x80a6aa||0xcc;return function(_0x6d2285){if(_0x6d2285){return _0x1a348c[_0xb343('0x19')](_0x80a6aa);}return _0x1a348c[_0xb343('0x1a')](_0x80a6aa)[_0xb343('0x1b')]();};}function respondWithResult(_0x24a737,_0x7920b9){_0x7920b9=_0x7920b9||0xc8;return function(_0x3d6275){if(_0x3d6275){return _0x24a737[_0xb343('0x1a')](_0x7920b9)['json'](_0x3d6275);}};}function respondWithFilteredResult(_0x5a8f0e,_0x1f60be){return function(_0x1f5f6d){if(_0x1f5f6d){var _0x40f210=typeof _0x1f60be['offset']===_0xb343('0x1c')&&typeof _0x1f60be['limit']===_0xb343('0x1c');var _0x4c7842=_0x1f5f6d[_0xb343('0x1d')];var _0x125f89=_0x40f210?0x0:_0x1f60be[_0xb343('0x1e')];var _0xf5bf96=_0x40f210?_0x1f5f6d[_0xb343('0x1d')]:_0x1f60be['offset']+_0x1f60be[_0xb343('0x1f')];var _0x5fd3bf;if(_0xf5bf96>=_0x4c7842){_0xf5bf96=_0x4c7842;_0x5fd3bf=0xc8;}else{_0x5fd3bf=0xce;}_0x5a8f0e[_0xb343('0x1a')](_0x5fd3bf);return _0x5a8f0e[_0xb343('0x20')](_0xb343('0x21'),_0x125f89+'-'+_0xf5bf96+'/'+_0x4c7842)[_0xb343('0x22')](_0x1f5f6d);}return null;};}function patchUpdates(_0x23ebf7){return function(_0x2348e7){try{jsonpatch[_0xb343('0x23')](_0x2348e7,_0x23ebf7,!![]);}catch(_0x16253e){return BPromise[_0xb343('0x24')](_0x16253e);}return _0x2348e7[_0xb343('0x25')]();};}function saveUpdates(_0x2e71e9,_0x267add){return function(_0x30043f){if(_0x30043f){return _0x30043f[_0xb343('0x26')](_0x2e71e9)[_0xb343('0x27')](function(_0x32340d){return _0x32340d;});}return null;};}function removeEntity(_0x45aebd,_0x2b5884){return function(_0x4a3cd4){if(_0x4a3cd4){return _0x4a3cd4['destroy']()[_0xb343('0x27')](function(){_0x45aebd[_0xb343('0x1a')](0xcc)[_0xb343('0x1b')]();});}};}function handleEntityNotFound(_0x5e0d0b,_0x6e732a){return function(_0x173d98){if(!_0x173d98){_0x5e0d0b[_0xb343('0x19')](0x194);}return _0x173d98;};}function handleError(_0x534809,_0x1c7630){_0x1c7630=_0x1c7630||0x1f4;return function(_0xd2d51b){logger['error'](_0xd2d51b[_0xb343('0x28')]);if(_0xd2d51b['name']){delete _0xd2d51b[_0xb343('0x29')];}_0x534809['status'](_0x1c7630)[_0xb343('0x2a')](_0xd2d51b);};}exports['index']=function(_0x1275c5,_0x30dbfd){var _0x4d33a2={},_0x2dfee1={},_0x24e978={'count':0x0,'rows':[]};var _0x482c49=_[_0xb343('0x2b')](db[_0xb343('0x2c')]['rawAttributes'],function(_0x25b1c1){return{'name':_0x25b1c1['fieldName'],'type':_0x25b1c1['type']['key']};});_0x2dfee1[_0xb343('0x2d')]=_[_0xb343('0x2b')](_0x482c49,_0xb343('0x29'));_0x2dfee1['query']=_['keys'](_0x1275c5[_0xb343('0x2e')]);_0x2dfee1[_0xb343('0x2f')]=_['intersection'](_0x2dfee1['model'],_0x2dfee1['query']);_0x4d33a2['attributes']=_['intersection'](_0x2dfee1['model'],qs[_0xb343('0x30')](_0x1275c5[_0xb343('0x2e')][_0xb343('0x30')]));_0x4d33a2[_0xb343('0x31')]=_0x4d33a2[_0xb343('0x31')]['length']?_0x4d33a2[_0xb343('0x31')]:_0x2dfee1[_0xb343('0x2d')];if(!_0x1275c5['query'][_0xb343('0x32')]('nolimit')){_0x4d33a2[_0xb343('0x1f')]=qs[_0xb343('0x1f')](_0x1275c5[_0xb343('0x2e')][_0xb343('0x1f')]);_0x4d33a2[_0xb343('0x1e')]=qs[_0xb343('0x1e')](_0x1275c5[_0xb343('0x2e')][_0xb343('0x1e')]);}_0x4d33a2[_0xb343('0x33')]=qs[_0xb343('0x34')](_0x1275c5[_0xb343('0x2e')][_0xb343('0x34')]);_0x4d33a2['where']=qs[_0xb343('0x2f')](_[_0xb343('0x35')](_0x1275c5[_0xb343('0x2e')],_0x2dfee1[_0xb343('0x2f')]),_0x482c49);if(_0x1275c5[_0xb343('0x2e')][_0xb343('0x36')]){_0x4d33a2[_0xb343('0x37')]=_[_0xb343('0x38')](_0x4d33a2[_0xb343('0x37')],{'$or':_[_0xb343('0x2b')](_0x482c49,function(_0x322318){if(_0x322318[_0xb343('0x39')]!==_0xb343('0x3a')){var _0x4ba7ab={};_0x4ba7ab[_0x322318[_0xb343('0x29')]]={'$like':'%'+_0x1275c5[_0xb343('0x2e')][_0xb343('0x36')]+'%'};return _0x4ba7ab;}})});}_0x4d33a2=_['merge']({},_0x4d33a2,_0x1275c5[_0xb343('0x3b')]);var _0x47cb49={'where':_0x4d33a2[_0xb343('0x37')]};return db['UserProfileSection'][_0xb343('0x1d')](_0x47cb49)[_0xb343('0x27')](function(_0x4a743d){_0x24e978[_0xb343('0x1d')]=_0x4a743d;if(_0x1275c5[_0xb343('0x2e')][_0xb343('0x3c')]){_0x4d33a2[_0xb343('0x3d')]=[{'all':!![]}];}return db[_0xb343('0x2c')][_0xb343('0x3e')](_0x4d33a2);})[_0xb343('0x27')](function(_0x523f99){_0x24e978[_0xb343('0x3f')]=_0x523f99;return _0x24e978;})[_0xb343('0x27')](respondWithFilteredResult(_0x30dbfd,_0x4d33a2))[_0xb343('0x40')](handleError(_0x30dbfd,null));};exports['show']=function(_0x7be5e8,_0xab5880){var _0x229081={'raw':![],'where':{'id':_0x7be5e8[_0xb343('0x41')]['id']}},_0xb2813c={};_0xb2813c[_0xb343('0x2d')]=_[_0xb343('0x42')](db[_0xb343('0x2c')][_0xb343('0x43')]);_0xb2813c[_0xb343('0x2e')]=_['keys'](_0x7be5e8[_0xb343('0x2e')]);_0xb2813c[_0xb343('0x2f')]=_['intersection'](_0xb2813c[_0xb343('0x2d')],_0xb2813c[_0xb343('0x2e')]);_0x229081[_0xb343('0x31')]=_['intersection'](_0xb2813c['model'],qs[_0xb343('0x30')](_0x7be5e8['query'][_0xb343('0x30')]));_0x229081[_0xb343('0x31')]=_0x229081[_0xb343('0x31')]['length']?_0x229081[_0xb343('0x31')]:_0xb2813c[_0xb343('0x2d')];if(_0x7be5e8[_0xb343('0x2e')][_0xb343('0x3c')]){_0x229081['include']=[{'all':!![]}];}_0x229081=_['merge']({},_0x229081,_0x7be5e8[_0xb343('0x3b')]);return db['UserProfileSection'][_0xb343('0x44')](_0x229081)[_0xb343('0x27')](handleEntityNotFound(_0xab5880,null))[_0xb343('0x27')](respondWithResult(_0xab5880,null))[_0xb343('0x40')](handleError(_0xab5880,null));};exports['create']=function(_0xe12973,_0x4ee1f7){return db['UserProfileSection'][_0xb343('0x45')](_0xe12973['body'],{})[_0xb343('0x27')](respondWithResult(_0x4ee1f7,0xc9))[_0xb343('0x40')](handleError(_0x4ee1f7,null));};exports[_0xb343('0x26')]=function(_0x32c507,_0x556267){if(_0x32c507['body']['id']){delete _0x32c507[_0xb343('0x46')]['id'];}return db['UserProfileSection'][_0xb343('0x44')]({'where':{'id':_0x32c507[_0xb343('0x41')]['id']}})[_0xb343('0x27')](handleEntityNotFound(_0x556267,null))[_0xb343('0x27')](saveUpdates(_0x32c507[_0xb343('0x46')],null))['then'](respondWithResult(_0x556267,null))[_0xb343('0x40')](handleError(_0x556267,null));};exports[_0xb343('0x47')]=function(_0x158306,_0x40526f){return db[_0xb343('0x2c')]['find']({'where':{'id':_0x158306[_0xb343('0x41')]['id']}})['then'](handleEntityNotFound(_0x40526f,null))[_0xb343('0x27')](removeEntity(_0x40526f,null))[_0xb343('0x40')](handleError(_0x40526f,null));};exports['describe']=function(_0x44613d,_0x21cc9c){return db[_0xb343('0x2c')][_0xb343('0x48')]()['then'](respondWithResult(_0x21cc9c,null))['catch'](handleError(_0x21cc9c,null));}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.model.js b/server/api/userProfileSection/userProfileSection.model.js index c168854..3e16402 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 _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 +var _0xd166=['./userProfileSection.attributes','exports','UserProfileSection','user_profile_has_sections','compositeIndex','sectionId','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x55c06b,_0x1ab2da){var _0x12eb36=function(_0x4acd90){while(--_0x4acd90){_0x55c06b['push'](_0x55c06b['shift']());}};_0x12eb36(++_0x1ab2da);}(_0xd166,0xf6));var _0x6d16=function(_0x47663f,_0x326b91){_0x47663f=_0x47663f-0x0;var _0x21fc2a=_0xd166[_0x47663f];return _0x21fc2a;};'use strict';var _=require(_0x6d16('0x0'));var util=require(_0x6d16('0x1'));var logger=require(_0x6d16('0x2'))(_0x6d16('0x3'));var moment=require(_0x6d16('0x4'));var BPromise=require(_0x6d16('0x5'));var rp=require(_0x6d16('0x6'));var fs=require('fs');var path=require(_0x6d16('0x7'));var rimraf=require(_0x6d16('0x8'));var config=require(_0x6d16('0x9'));var attributes=require(_0x6d16('0xa'));module[_0x6d16('0xb')]=function(_0x4280e1,_0x2b3e31){return _0x4280e1['define'](_0x6d16('0xc'),attributes,{'tableName':_0x6d16('0xd'),'paranoid':![],'indexes':[{'name':_0x6d16('0xe'),'fields':[_0x6d16('0xf'),'userProfileId']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.rpc.js b/server/api/userProfileSection/userProfileSection.rpc.js index 1af1165..1190281 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 _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 +var _0xdf77=['message','info','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','UserProfileSection,\x20%s,\x20%s','request\x20sent','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','code','error'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0xdf77,0x138));var _0x7df7=function(_0x1c33a1,_0x253d08){_0x1c33a1=_0x1c33a1-0x0;var _0x17fa59=_0xdf77[_0x1c33a1];return _0x17fa59;};'use strict';var _=require(_0x7df7('0x0'));var util=require(_0x7df7('0x1'));var moment=require('moment');var BPromise=require(_0x7df7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7df7('0x3'));var db=require(_0x7df7('0x4'))['db'];var utils=require(_0x7df7('0x5'));var logger=require(_0x7df7('0x6'))(_0x7df7('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7df7('0x8')][_0x7df7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x310812,_0xefd18d,_0x3ab668){return new BPromise(function(_0x5a376b,_0xc95091){return client[_0x7df7('0xa')](_0x310812,_0x3ab668)[_0x7df7('0xb')](function(_0x1bfde6){logger['info'](_0x7df7('0xc'),_0xefd18d,_0x7df7('0xd'));logger['debug'](_0x7df7('0xe'),_0xefd18d,_0x7df7('0xd'),JSON[_0x7df7('0xf')](_0x1bfde6));if(_0x1bfde6['error']){if(_0x1bfde6['error'][_0x7df7('0x10')]===0x1f4){logger[_0x7df7('0x11')](_0x7df7('0xc'),_0xefd18d,_0x1bfde6[_0x7df7('0x11')][_0x7df7('0x12')]);return _0xc95091(_0x1bfde6[_0x7df7('0x11')]['message']);}logger[_0x7df7('0x11')](_0x7df7('0xc'),_0xefd18d,_0x1bfde6['error']['message']);return _0x5a376b(_0x1bfde6[_0x7df7('0x11')][_0x7df7('0x12')]);}else{logger[_0x7df7('0x13')](_0x7df7('0xc'),_0xefd18d,_0x7df7('0xd'));_0x5a376b(_0x1bfde6[_0x7df7('0x14')][_0x7df7('0x12')]);}})[_0x7df7('0x15')](function(_0xdc6dff){logger[_0x7df7('0x11')](_0x7df7('0xc'),_0xefd18d,_0xdc6dff);_0xc95091(_0xdc6dff);});});} \ No newline at end of file diff --git a/server/api/userSmsQueue/index.js b/server/api/userSmsQueue/index.js index ceee63f..45d1834 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(_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 +var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0xbce452,_0x2be485){var _0x20f71f=function(_0x1ad54c){while(--_0x1ad54c){_0xbce452['push'](_0xbce452['shift']());}};_0x20f71f(++_0x2be485);}(_0xe706,0xa3));var _0x6e70=function(_0x41f59e,_0x5e916a){_0x41f59e=_0x41f59e-0x0;var _0x1d5e3=_0xe706[_0x41f59e];return _0x1d5e3;};'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/userSmsQueue/userSmsQueue.attributes.js b/server/api/userSmsQueue/userSmsQueue.attributes.js index 6120a7d..b784d89 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 _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 +var _0x89b8=['INTEGER','sequelize','exports'];(function(_0x3460c9,_0x565510){var _0x1d8283=function(_0x8a51bd){while(--_0x8a51bd){_0x3460c9['push'](_0x3460c9['shift']());}};_0x1d8283(++_0x565510);}(_0x89b8,0x19f));var _0x889b=function(_0x280ca1,_0x31997f){_0x280ca1=_0x280ca1-0x0;var _0x4d52c7=_0x89b8[_0x280ca1];return _0x4d52c7;};'use strict';var Sequelize=require(_0x889b('0x0'));module[_0x889b('0x1')]={'penalty':{'type':Sequelize[_0x889b('0x2')],'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 a7b9934..79f0c6a 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 _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 +var _0x5232=['user_has_sms_queues','lodash','util','../../config/logger','api','moment','path','rimraf','./userSmsQueue.attributes','exports','define','UserSmsQueue'];(function(_0x91c11c,_0x464186){var _0x28ec3a=function(_0x55c8b8){while(--_0x55c8b8){_0x91c11c['push'](_0x91c11c['shift']());}};_0x28ec3a(++_0x464186);}(_0x5232,0x1c9));var _0x2523=function(_0x2892da,_0x191a40){_0x2892da=_0x2892da-0x0;var _0x28cff2=_0x5232[_0x2892da];return _0x28cff2;};'use strict';var _=require(_0x2523('0x0'));var util=require(_0x2523('0x1'));var logger=require(_0x2523('0x2'))(_0x2523('0x3'));var moment=require(_0x2523('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x2523('0x5'));var rimraf=require(_0x2523('0x6'));var config=require('../../config/environment');var attributes=require(_0x2523('0x7'));module[_0x2523('0x8')]=function(_0x1c3b74,_0x45ae69){return _0x1c3b74[_0x2523('0x9')](_0x2523('0xa'),attributes,{'tableName':_0x2523('0xb'),'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 77ab6fd..4214979 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 _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 +var _0xfb80=['ioredis','../../config/logger','rpc','../../config/environment','client','http','request','then','info','UserSmsQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x22459d,_0x48ab56){var _0xa41e76=function(_0x18278e){while(--_0x18278e){_0x22459d['push'](_0x22459d['shift']());}};_0xa41e76(++_0x48ab56);}(_0xfb80,0x1b3));var _0x0fb8=function(_0x36ad56,_0x4ccc5d){_0x36ad56=_0x36ad56-0x0;var _0x13e965=_0xfb80[_0x36ad56];return _0x13e965;};'use strict';var _=require(_0x0fb8('0x0'));var util=require(_0x0fb8('0x1'));var moment=require(_0x0fb8('0x2'));var BPromise=require(_0x0fb8('0x3'));var rs=require(_0x0fb8('0x4'));var fs=require('fs');var Redis=require(_0x0fb8('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0fb8('0x6'))(_0x0fb8('0x7'));var config=require(_0x0fb8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0fb8('0x9')][_0x0fb8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4500cd,_0x3b11cb,_0x4ea6ec){return new BPromise(function(_0x2103fd,_0x277a6a){return client[_0x0fb8('0xb')](_0x4500cd,_0x4ea6ec)[_0x0fb8('0xc')](function(_0x411148){logger[_0x0fb8('0xd')](_0x0fb8('0xe'),_0x3b11cb,_0x0fb8('0xf'));logger[_0x0fb8('0x10')]('UserSmsQueue,\x20%s,\x20%s,\x20%s',_0x3b11cb,_0x0fb8('0xf'),JSON[_0x0fb8('0x11')](_0x411148));if(_0x411148[_0x0fb8('0x12')]){if(_0x411148[_0x0fb8('0x12')][_0x0fb8('0x13')]===0x1f4){logger['error'](_0x0fb8('0xe'),_0x3b11cb,_0x411148[_0x0fb8('0x12')][_0x0fb8('0x14')]);return _0x277a6a(_0x411148[_0x0fb8('0x12')][_0x0fb8('0x14')]);}logger[_0x0fb8('0x12')]('UserSmsQueue,\x20%s,\x20%s',_0x3b11cb,_0x411148[_0x0fb8('0x12')]['message']);return _0x2103fd(_0x411148[_0x0fb8('0x12')]['message']);}else{logger[_0x0fb8('0xd')](_0x0fb8('0xe'),_0x3b11cb,_0x0fb8('0xf'));_0x2103fd(_0x411148['result'][_0x0fb8('0x14')]);}})[_0x0fb8('0x15')](function(_0x42de83){logger[_0x0fb8('0x12')](_0x0fb8('0xe'),_0x3b11cb,_0x42de83);_0x277a6a(_0x42de83);});});} \ No newline at end of file diff --git a/server/api/userVoiceQueue/index.js b/server/api/userVoiceQueue/index.js index 48427e0..609d46f 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 _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 +var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x36d703,_0x55b354){var _0x12c909=function(_0x5e846a){while(--_0x5e846a){_0x36d703['push'](_0x36d703['shift']());}};_0x12c909(++_0x55b354);}(_0x9c44,0x178));var _0x49c4=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x9c44[_0x1caf6a];return _0x1bf493;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.attributes.js b/server/api/userVoiceQueue/userVoiceQueue.attributes.js index f02c014..0069752 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 _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 +var _0xdaf1=['sequelize','INTEGER'];(function(_0x15f6a3,_0x541594){var _0x8a42cb=function(_0x202140){while(--_0x202140){_0x15f6a3['push'](_0x15f6a3['shift']());}};_0x8a42cb(++_0x541594);}(_0xdaf1,0xb4));var _0x1daf=function(_0x4c77ae,_0x22ee2d){_0x4c77ae=_0x4c77ae-0x0;var _0x478bf3=_0xdaf1[_0x4c77ae];return _0x478bf3;};'use strict';var Sequelize=require(_0x1daf('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x1daf('0x1')],'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 6168316..b23951f 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 _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 +var _0x48d1=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','UserVoiceQueue','user_has_voice_queues','lodash','../../config/logger'];(function(_0x3363ac,_0xf1f4b7){var _0x23cad9=function(_0x48960e){while(--_0x48960e){_0x3363ac['push'](_0x3363ac['shift']());}};_0x23cad9(++_0xf1f4b7);}(_0x48d1,0xce));var _0x148d=function(_0x564088,_0x51f848){_0x564088=_0x564088-0x0;var _0x444eb1=_0x48d1[_0x564088];return _0x444eb1;};'use strict';var _=require(_0x148d('0x0'));var util=require('util');var logger=require(_0x148d('0x1'))(_0x148d('0x2'));var moment=require(_0x148d('0x3'));var BPromise=require(_0x148d('0x4'));var rp=require(_0x148d('0x5'));var fs=require('fs');var path=require(_0x148d('0x6'));var rimraf=require(_0x148d('0x7'));var config=require(_0x148d('0x8'));var attributes=require('./userVoiceQueue.attributes');module[_0x148d('0x9')]=function(_0x47df6d,_0x24f222){return _0x47df6d[_0x148d('0xa')](_0x148d('0xb'),attributes,{'tableName':_0x148d('0xc'),'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 037ad1c..6fee259 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 _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 +var _0x1674=['jayson/promise','client','http','info','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x3d320d,_0x3938f9){var _0x4214af=function(_0x4f6d71){while(--_0x4f6d71){_0x3d320d['push'](_0x3d320d['shift']());}};_0x4214af(++_0x3938f9);}(_0x1674,0x12b));var _0x4167=function(_0x1f4d57,_0x378d8e){_0x1f4d57=_0x1f4d57-0x0;var _0x3613a8=_0x1674[_0x1f4d57];return _0x3613a8;};'use strict';var _=require(_0x4167('0x0'));var util=require('util');var moment=require(_0x4167('0x1'));var BPromise=require(_0x4167('0x2'));var rs=require(_0x4167('0x3'));var fs=require('fs');var Redis=require(_0x4167('0x4'));var db=require(_0x4167('0x5'))['db'];var utils=require(_0x4167('0x6'));var logger=require(_0x4167('0x7'))(_0x4167('0x8'));var config=require('../../config/environment');var jayson=require(_0x4167('0x9'));var client=jayson[_0x4167('0xa')][_0x4167('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x47875f,_0x28cdee,_0x3be5cb){return new BPromise(function(_0x1f5585,_0x221583){return client['request'](_0x47875f,_0x3be5cb)['then'](function(_0x4344da){logger[_0x4167('0xc')](_0x4167('0xd'),_0x28cdee,_0x4167('0xe'));logger[_0x4167('0xf')](_0x4167('0x10'),_0x28cdee,_0x4167('0xe'),JSON[_0x4167('0x11')](_0x4344da));if(_0x4344da[_0x4167('0x12')]){if(_0x4344da[_0x4167('0x12')]['code']===0x1f4){logger[_0x4167('0x12')]('UserVoiceQueue,\x20%s,\x20%s',_0x28cdee,_0x4344da[_0x4167('0x12')][_0x4167('0x13')]);return _0x221583(_0x4344da[_0x4167('0x12')]['message']);}logger[_0x4167('0x12')](_0x4167('0xd'),_0x28cdee,_0x4344da['error'][_0x4167('0x13')]);return _0x1f5585(_0x4344da[_0x4167('0x12')][_0x4167('0x13')]);}else{logger[_0x4167('0xc')](_0x4167('0xd'),_0x28cdee,_0x4167('0xe'));_0x1f5585(_0x4344da[_0x4167('0x14')]['message']);}})[_0x4167('0x15')](function(_0x1d5711){logger[_0x4167('0x12')]('UserVoiceQueue,\x20%s,\x20%s',_0x28cdee,_0x1d5711);_0x221583(_0x1d5711);});});} \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/index.js b/server/api/userVoiceQueueRt/index.js index 38179e0..ab9e0d8 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 _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 +var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0xc376e1,_0x1a2b83){var _0x63e01c=function(_0x3cd0f8){while(--_0x3cd0f8){_0xc376e1['push'](_0xc376e1['shift']());}};_0x63e01c(++_0x1a2b83);}(_0x9c44,0x178));var _0x49c4=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0x9c44[_0x209941];return _0x1e8729;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js index a81ebe2..360ec5c 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 _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 +var _0xc037=['queue_interface','exports','INTEGER','Required\x20by\x20Asterisk','STRING'];(function(_0x30a1b6,_0x158e1e){var _0x304819=function(_0x7f186c){while(--_0x7f186c){_0x30a1b6['push'](_0x30a1b6['shift']());}};_0x304819(++_0x158e1e);}(_0xc037,0x88));var _0x7c03=function(_0x5298de,_0x5706aa){_0x5298de=_0x5298de-0x0;var _0x143a68=_0xc037[_0x5298de];return _0x143a68;};'use strict';var Sequelize=require('sequelize');module[_0x7c03('0x0')]={'uniqueid':{'type':Sequelize[_0x7c03('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':_0x7c03('0x2')},'membername':{'type':Sequelize[_0x7c03('0x3')],'allowNull':![],'comment':_0x7c03('0x2')},'UserId':{'type':Sequelize[_0x7c03('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x7c03('0x3')],'allowNull':![],'unique':_0x7c03('0x4'),'comment':_0x7c03('0x2')},'VoiceQueueId':{'type':Sequelize[_0x7c03('0x1')],'allowNull':![]},'interface':{'type':Sequelize[_0x7c03('0x3')],'allowNull':![],'unique':'queue_interface','comment':_0x7c03('0x2')},'penalty':{'type':Sequelize[_0x7c03('0x1')](0xb),'defaultValue':0x0,'comment':_0x7c03('0x2')},'paused':{'type':Sequelize[_0x7c03('0x1')](0xb),'defaultValue':0x0,'comment':_0x7c03('0x2')}}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js index e434c68..51887f1 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 _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 +var _0xfeb9=['update','remove','emit','hook','exports','events','setMaxListeners'];(function(_0x54d4fe,_0x55e869){var _0x1ab5bb=function(_0x5b1af2){while(--_0x5b1af2){_0x54d4fe['push'](_0x54d4fe['shift']());}};_0x1ab5bb(++_0x55e869);}(_0xfeb9,0xbb));var _0x9feb=function(_0x170d45,_0x313778){_0x170d45=_0x170d45-0x0;var _0x1a0ba2=_0xfeb9[_0x170d45];return _0x1a0ba2;};'use strict';var EventEmitter=require(_0x9feb('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x9feb('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9feb('0x2'),'afterDestroy':_0x9feb('0x3')};function emitEvent(_0x1cd2a6){return function(_0x5fb1ac,_0x34ddca,_0x1bc27a){UserVoiceQueueRtEvents['emit'](_0x1cd2a6+':'+_0x5fb1ac['id'],_0x5fb1ac);UserVoiceQueueRtEvents[_0x9feb('0x4')](_0x1cd2a6,_0x5fb1ac);_0x1bc27a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x9feb('0x5')](e,emitEvent(event));}}module[_0x9feb('0x6')]=UserVoiceQueueRtEvents; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js index 68e74b7..df57e52 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 _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 +var _0xdd8b=['path','rimraf','../../config/environment','exports','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','moment','bluebird','request-promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdd8b,0x196));var _0xbdd8=function(_0x307d86,_0x9264f2){_0x307d86=_0x307d86-0x0;var _0x361745=_0xdd8b[_0x307d86];return _0x361745;};'use strict';var _=require(_0xbdd8('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xbdd8('0x1'));var BPromise=require(_0xbdd8('0x2'));var rp=require(_0xbdd8('0x3'));var fs=require('fs');var path=require(_0xbdd8('0x4'));var rimraf=require(_0xbdd8('0x5'));var config=require(_0xbdd8('0x6'));var attributes=require('./userVoiceQueueRt.attributes');module[_0xbdd8('0x7')]=function(_0xebaebd,_0xa96d92){return _0xebaebd['define'](_0xbdd8('0x8'),attributes,{'tableName':_0xbdd8('0x9'),'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 bba71b7..ca5cff2 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 _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 +var _0xdab9=['localhost','socket.io-emitter','./userVoiceQueueRt.socket','register','request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','UserVoiceQueueRt','findAll','options','where','sequelize','literal','`paused`\x20=\x201,\x201,\x20null','moment','randomstring','../../config/utils','../../config/logger','../../config/environment','client','http','redis'];(function(_0x1d0b18,_0x3b802e){var _0x117963=function(_0x5b35dc){while(--_0x5b35dc){_0x1d0b18['push'](_0x1d0b18['shift']());}};_0x117963(++_0x3b802e);}(_0xdab9,0x74));var _0x9dab=function(_0x14d71f,_0x556865){_0x14d71f=_0x14d71f-0x0;var _0x83c532=_0xdab9[_0x14d71f];return _0x83c532;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9dab('0x0'));var BPromise=require('bluebird');var rs=require(_0x9dab('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9dab('0x2'));var logger=require(_0x9dab('0x3'))('rpc');var config=require(_0x9dab('0x4'));var jayson=require('jayson/promise');var client=jayson[_0x9dab('0x5')][_0x9dab('0x6')]({'port':0x232a});config[_0x9dab('0x7')]=_['defaults'](config[_0x9dab('0x7')],{'host':_0x9dab('0x8'),'port':0x18eb});var socket=require(_0x9dab('0x9'))(new Redis(config[_0x9dab('0x7')]));require(_0x9dab('0xa'))[_0x9dab('0xb')](socket);function respondWithRpcPromise(_0x3411b2,_0x402378,_0x1dc97a){return new BPromise(function(_0x183dae,_0x5a863e){return client[_0x9dab('0xc')](_0x3411b2,_0x1dc97a)[_0x9dab('0xd')](function(_0x2b3421){logger[_0x9dab('0xe')](_0x9dab('0xf'),_0x402378,_0x9dab('0x10'));logger[_0x9dab('0x11')]('UserVoiceQueueRt,\x20%s,\x20%s,\x20%s',_0x402378,'request\x20sent',JSON[_0x9dab('0x12')](_0x2b3421));if(_0x2b3421[_0x9dab('0x13')]){if(_0x2b3421[_0x9dab('0x13')][_0x9dab('0x14')]===0x1f4){logger[_0x9dab('0x13')](_0x9dab('0xf'),_0x402378,_0x2b3421[_0x9dab('0x13')][_0x9dab('0x15')]);return _0x5a863e(_0x2b3421['error'][_0x9dab('0x15')]);}logger[_0x9dab('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x402378,_0x2b3421[_0x9dab('0x13')][_0x9dab('0x15')]);return _0x183dae(_0x2b3421[_0x9dab('0x13')][_0x9dab('0x15')]);}else{logger[_0x9dab('0xe')](_0x9dab('0xf'),_0x402378,_0x9dab('0x10'));_0x183dae(_0x2b3421[_0x9dab('0x16')][_0x9dab('0x15')]);}})[_0x9dab('0x17')](function(_0x4accee){logger[_0x9dab('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x402378,_0x4accee);_0x5a863e(_0x4accee);});});}exports['GetVoiceQueueRtPauses']=function(_0x16e6e9){var _0x71f4a4=this;return new Promise(function(_0x17fb9,_0x59431d){return db[_0x9dab('0x18')][_0x9dab('0x19')]({'raw':_0x16e6e9[_0x9dab('0x1a')]?_0x16e6e9[_0x9dab('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x16e6e9[_0x9dab('0x1a')]?_0x16e6e9[_0x9dab('0x1a')][_0x9dab('0x1b')]||null:null,'attributes':[[db['sequelize']['fn']('COUNT',db[_0x9dab('0x1c')]['fn']('IF',db[_0x9dab('0x1c')][_0x9dab('0x1d')](_0x9dab('0x1e')))),'outboundQueuePauses']]})['then'](function(_0x1c411a){logger['info']('GetVoiceQueueRtPauses',_0x16e6e9);logger['debug']('GetVoiceQueueRtPauses',_0x16e6e9,JSON[_0x9dab('0x12')](_0x1c411a));_0x17fb9(_0x1c411a);})[_0x9dab('0x17')](function(_0x48af78){logger[_0x9dab('0x13')]('GetVoiceQueueRtPauses',_0x48af78[_0x9dab('0x15')],_0x16e6e9);_0x59431d(_0x71f4a4[_0x9dab('0x13')](0x1f4,_0x48af78['message']));});});}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js index 78d7c4f..6fc6b24 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 _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 +var _0x2427=['./userVoiceQueueRt.events','save','update','emit','register','length','userVoiceQueueRt:'];(function(_0x9edfd5,_0x286486){var _0x330738=function(_0x4aceb3){while(--_0x4aceb3){_0x9edfd5['push'](_0x9edfd5['shift']());}};_0x330738(++_0x286486);}(_0x2427,0x165));var _0x7242=function(_0xe56d74,_0x181106){_0xe56d74=_0xe56d74-0x0;var _0x44f361=_0x2427[_0xe56d74];return _0x44f361;};'use strict';var UserVoiceQueueRtEvents=require(_0x7242('0x0'));var events=[_0x7242('0x1'),'remove',_0x7242('0x2')];function createListener(_0x520d61,_0x297a67){return function(_0x4b0c46){_0x297a67[_0x7242('0x3')](_0x520d61,_0x4b0c46);};}function removeListener(_0x12766a,_0x226e44){return function(){UserVoiceQueueRtEvents['removeListener'](_0x12766a,_0x226e44);};}exports[_0x7242('0x4')]=function(_0x4b0575){for(var _0x3c629c=0x0,_0x26f0a9=events[_0x7242('0x5')];_0x3c629c<_0x26f0a9;_0x3c629c++){var _0x10a830=events[_0x3c629c];var _0x5c640f=createListener(_0x7242('0x6')+_0x10a830,_0x4b0575);UserVoiceQueueRtEvents['on'](_0x10a830,_0x5c640f);}}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/index.js b/server/api/userWhatsappQueue/index.js index 831e65a..d060f17 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(_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 +var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x3400ca,_0x27c04d){var _0x26e8d1=function(_0x2284e9){while(--_0x2284e9){_0x3400ca['push'](_0x3400ca['shift']());}};_0x26e8d1(++_0x27c04d);}(_0x9c44,0x178));var _0x49c4=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x9c44[_0x2641f9];return _0x585741;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js index 8859b60..970cbe6 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 _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 +var _0x7730=['sequelize'];(function(_0x540d9b,_0x1aa69e){var _0x5c1031=function(_0x3e450d){while(--_0x3e450d){_0x540d9b['push'](_0x540d9b['shift']());}};_0x5c1031(++_0x1aa69e);}(_0x7730,0x17e));var _0x0773=function(_0x3cd451,_0x26e81a){_0x3cd451=_0x3cd451-0x0;var _0x571ce6=_0x7730[_0x3cd451];return _0x571ce6;};'use strict';var Sequelize=require(_0x0773('0x0'));module['exports']={'penalty':{'type':Sequelize['INTEGER'],'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 1ee1bf8..d212cb1 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 _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 +var _0xa656=['request-promise','path','rimraf','./userWhatsappQueue.attributes','UserWhatsappQueue','user_has_whatsapp_queues','lodash','util','../../config/logger','api','bluebird'];(function(_0x244494,_0x47aa17){var _0x1fe6af=function(_0x4225cf){while(--_0x4225cf){_0x244494['push'](_0x244494['shift']());}};_0x1fe6af(++_0x47aa17);}(_0xa656,0x10e));var _0x6a65=function(_0x35fb49,_0x33ca08){_0x35fb49=_0x35fb49-0x0;var _0x130732=_0xa656[_0x35fb49];return _0x130732;};'use strict';var _=require(_0x6a65('0x0'));var util=require(_0x6a65('0x1'));var logger=require(_0x6a65('0x2'))(_0x6a65('0x3'));var moment=require('moment');var BPromise=require(_0x6a65('0x4'));var rp=require(_0x6a65('0x5'));var fs=require('fs');var path=require(_0x6a65('0x6'));var rimraf=require(_0x6a65('0x7'));var config=require('../../config/environment');var attributes=require(_0x6a65('0x8'));module['exports']=function(_0xf2b3f7,_0x116a62){return _0xf2b3f7['define'](_0x6a65('0x9'),attributes,{'tableName':_0x6a65('0xa'),'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 091cfef..34f8ac7 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 _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 +var _0x2a63=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','then','info','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','moment','randomstring'];(function(_0x192b02,_0x5e8732){var _0x458671=function(_0x234911){while(--_0x234911){_0x192b02['push'](_0x192b02['shift']());}};_0x458671(++_0x5e8732);}(_0x2a63,0x12e));var _0x32a6=function(_0x3b06f1,_0x2c2f9a){_0x3b06f1=_0x3b06f1-0x0;var _0x1ab7fd=_0x2a63[_0x3b06f1];return _0x1ab7fd;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x32a6('0x0'));var BPromise=require('bluebird');var rs=require(_0x32a6('0x1'));var fs=require('fs');var Redis=require(_0x32a6('0x2'));var db=require(_0x32a6('0x3'))['db'];var utils=require(_0x32a6('0x4'));var logger=require(_0x32a6('0x5'))('rpc');var config=require(_0x32a6('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x32a6('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x15655c,_0x481d01,_0x7f253f){return new BPromise(function(_0xff32c0,_0x4ffe9e){return client['request'](_0x15655c,_0x7f253f)[_0x32a6('0x8')](function(_0x3b6a7b){logger[_0x32a6('0x9')](_0x32a6('0xa'),_0x481d01,_0x32a6('0xb'));logger[_0x32a6('0xc')](_0x32a6('0xd'),_0x481d01,'request\x20sent',JSON[_0x32a6('0xe')](_0x3b6a7b));if(_0x3b6a7b[_0x32a6('0xf')]){if(_0x3b6a7b[_0x32a6('0xf')]['code']===0x1f4){logger[_0x32a6('0xf')]('UserWhatsappQueue,\x20%s,\x20%s',_0x481d01,_0x3b6a7b[_0x32a6('0xf')][_0x32a6('0x10')]);return _0x4ffe9e(_0x3b6a7b[_0x32a6('0xf')]['message']);}logger[_0x32a6('0xf')](_0x32a6('0xa'),_0x481d01,_0x3b6a7b['error'][_0x32a6('0x10')]);return _0xff32c0(_0x3b6a7b[_0x32a6('0xf')][_0x32a6('0x10')]);}else{logger[_0x32a6('0x9')]('UserWhatsappQueue,\x20%s,\x20%s',_0x481d01,'request\x20sent');_0xff32c0(_0x3b6a7b[_0x32a6('0x11')][_0x32a6('0x10')]);}})[_0x32a6('0x12')](function(_0x323a6f){logger['error'](_0x32a6('0xa'),_0x481d01,_0x323a6f);_0x4ffe9e(_0x323a6f);});});} \ No newline at end of file diff --git a/server/api/variable/index.js b/server/api/variable/index.js index 518c548..8fdfd8a 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 _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 +var _0x8fed=['/:id','show','put','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./variable.controller','get','isAuthenticated'];(function(_0x5756b9,_0x188539){var _0x59e9f3=function(_0x1e1405){while(--_0x1e1405){_0x5756b9['push'](_0x5756b9['shift']());}};_0x59e9f3(++_0x188539);}(_0x8fed,0xf5));var _0xd8fe=function(_0x5ed8f8,_0x245c75){_0x5ed8f8=_0x5ed8f8-0x0;var _0x1eddd2=_0x8fed[_0x5ed8f8];return _0x1eddd2;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xd8fe('0x0'));var timeout=require(_0xd8fe('0x1'));var express=require(_0xd8fe('0x2'));var router=express[_0xd8fe('0x3')]();var fs_extra=require(_0xd8fe('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xd8fe('0x5'));var config=require(_0xd8fe('0x6'));var controller=require(_0xd8fe('0x7'));router[_0xd8fe('0x8')]('/',auth[_0xd8fe('0x9')](),controller['index']);router[_0xd8fe('0x8')](_0xd8fe('0xa'),auth[_0xd8fe('0x9')](),controller[_0xd8fe('0xb')]);router['post']('/',auth[_0xd8fe('0x9')](),controller['create']);router[_0xd8fe('0xc')](_0xd8fe('0xa'),auth[_0xd8fe('0x9')](),controller[_0xd8fe('0xd')]);router[_0xd8fe('0xe')]('/:id',auth[_0xd8fe('0x9')](),controller[_0xd8fe('0xf')]);module[_0xd8fe('0x10')]=router; \ No newline at end of file diff --git a/server/api/variable/variable.attributes.js b/server/api/variable/variable.attributes.js index c8cd7b5..11d0b54 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 _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 +var _0xf6ef=['STRING','sequelize','exports'];(function(_0xeca1a6,_0x158ffa){var _0xaac387=function(_0x395647){while(--_0x395647){_0xeca1a6['push'](_0xeca1a6['shift']());}};_0xaac387(++_0x158ffa);}(_0xf6ef,0x115));var _0xff6e=function(_0x458656,_0x4292d8){_0x458656=_0x458656-0x0;var _0x24e475=_0xf6ef[_0x458656];return _0x24e475;};'use strict';var Sequelize=require(_0xff6e('0x0'));module[_0xff6e('0x1')]={'name':{'type':Sequelize[_0xff6e('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xff6e('0x2')]}}; \ No newline at end of file diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index cad8571..d64440f 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 _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 +var _0x5119=['catch','show','params','rawAttributes','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','limit','undefined','count','set','apply','save','update','then','destroy','get','Variables','UserProfileResource','error','stack','name','send','index','map','Variable','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','findAll','rows'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x5119,0x10b));var _0x9511=function(_0x567703,_0x4b1cfa){_0x567703=_0x567703-0x0;var _0x1cd94a=_0x5119[_0x567703];return _0x1cd94a;};'use strict';var emlformat=require(_0x9511('0x0'));var rimraf=require(_0x9511('0x1'));var zipdir=require(_0x9511('0x2'));var jsonpatch=require(_0x9511('0x3'));var rp=require(_0x9511('0x4'));var moment=require('moment');var BPromise=require(_0x9511('0x5'));var Mustache=require(_0x9511('0x6'));var util=require(_0x9511('0x7'));var path=require(_0x9511('0x8'));var sox=require('sox');var csv=require(_0x9511('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9511('0xa'));var _=require(_0x9511('0xb'));var squel=require(_0x9511('0xc'));var crypto=require(_0x9511('0xd'));var jsforce=require(_0x9511('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x9511('0x9'));var querystring=require(_0x9511('0xf'));var Papa=require(_0x9511('0x10'));var Redis=require(_0x9511('0x11'));var authService=require(_0x9511('0x12'));var qs=require(_0x9511('0x13'));var as=require(_0x9511('0x14'));var hardwareService=require(_0x9511('0x15'));var logger=require(_0x9511('0x16'))(_0x9511('0x17'));var utils=require(_0x9511('0x18'));var config=require(_0x9511('0x19'));var licenseUtil=require(_0x9511('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3497cd,_0x28bae4){_0x28bae4=_0x28bae4||0xcc;return function(_0x258683){if(_0x258683){return _0x3497cd['sendStatus'](_0x28bae4);}return _0x3497cd[_0x9511('0x1b')](_0x28bae4)[_0x9511('0x1c')]();};}function respondWithResult(_0x1740a8,_0x288936){_0x288936=_0x288936||0xc8;return function(_0x50f757){if(_0x50f757){return _0x1740a8[_0x9511('0x1b')](_0x288936)[_0x9511('0x1d')](_0x50f757);}};}function respondWithFilteredResult(_0x53955,_0x54f72a){return function(_0x95942e){if(_0x95942e){var _0x5a0db7=typeof _0x54f72a[_0x9511('0x1e')]==='undefined'&&typeof _0x54f72a[_0x9511('0x1f')]===_0x9511('0x20');var _0x907321=_0x95942e['count'];var _0x2a6e64=_0x5a0db7?0x0:_0x54f72a['offset'];var _0x4e8cfa=_0x5a0db7?_0x95942e[_0x9511('0x21')]:_0x54f72a[_0x9511('0x1e')]+_0x54f72a[_0x9511('0x1f')];var _0x3f97f8;if(_0x4e8cfa>=_0x907321){_0x4e8cfa=_0x907321;_0x3f97f8=0xc8;}else{_0x3f97f8=0xce;}_0x53955[_0x9511('0x1b')](_0x3f97f8);return _0x53955[_0x9511('0x22')]('Content-Range',_0x2a6e64+'-'+_0x4e8cfa+'/'+_0x907321)[_0x9511('0x1d')](_0x95942e);}return null;};}function patchUpdates(_0x2e81ec){return function(_0x548c27){try{jsonpatch[_0x9511('0x23')](_0x548c27,_0x2e81ec,!![]);}catch(_0x4bd4d3){return BPromise['reject'](_0x4bd4d3);}return _0x548c27[_0x9511('0x24')]();};}function saveUpdates(_0x257116,_0x2f18d7){return function(_0x51d1ca){if(_0x51d1ca){return _0x51d1ca[_0x9511('0x25')](_0x257116)[_0x9511('0x26')](function(_0x1bed36){return _0x1bed36;});}return null;};}function removeEntity(_0xea2d5c,_0x2c9df){return function(_0x4ce68c){if(_0x4ce68c){return _0x4ce68c[_0x9511('0x27')]()[_0x9511('0x26')](function(){var _0x2fef63=_0x4ce68c[_0x9511('0x28')]({'plain':!![]});var _0x2be43c=_0x9511('0x29');return db[_0x9511('0x2a')][_0x9511('0x27')]({'where':{'type':_0x2be43c,'resourceId':_0x2fef63['id']}})[_0x9511('0x26')](function(){return _0x4ce68c;});})[_0x9511('0x26')](function(){_0xea2d5c['status'](0xcc)[_0x9511('0x1c')]();});}};}function handleEntityNotFound(_0x6064a6,_0x759edc){return function(_0x1dfcab){if(!_0x1dfcab){_0x6064a6['sendStatus'](0x194);}return _0x1dfcab;};}function handleError(_0x5f06a6,_0x2e7733){_0x2e7733=_0x2e7733||0x1f4;return function(_0x451be1){logger[_0x9511('0x2b')](_0x451be1[_0x9511('0x2c')]);if(_0x451be1[_0x9511('0x2d')]){delete _0x451be1[_0x9511('0x2d')];}_0x5f06a6[_0x9511('0x1b')](_0x2e7733)[_0x9511('0x2e')](_0x451be1);};}exports[_0x9511('0x2f')]=function(_0x29afb3,_0x44d761){var _0x3ed69e={},_0x4d7519={},_0x4c9212={'count':0x0,'rows':[]};var _0x19e8c5=_[_0x9511('0x30')](db[_0x9511('0x31')]['rawAttributes'],function(_0xa22b5e){return{'name':_0xa22b5e['fieldName'],'type':_0xa22b5e[_0x9511('0x32')][_0x9511('0x33')]};});_0x4d7519[_0x9511('0x34')]=_[_0x9511('0x30')](_0x19e8c5,'name');_0x4d7519[_0x9511('0x35')]=_[_0x9511('0x36')](_0x29afb3['query']);_0x4d7519[_0x9511('0x37')]=_[_0x9511('0x38')](_0x4d7519[_0x9511('0x34')],_0x4d7519[_0x9511('0x35')]);_0x3ed69e['attributes']=_[_0x9511('0x38')](_0x4d7519['model'],qs[_0x9511('0x39')](_0x29afb3[_0x9511('0x35')][_0x9511('0x39')]));_0x3ed69e[_0x9511('0x3a')]=_0x3ed69e[_0x9511('0x3a')][_0x9511('0x3b')]?_0x3ed69e[_0x9511('0x3a')]:_0x4d7519['model'];if(!_0x29afb3['query'][_0x9511('0x3c')](_0x9511('0x3d'))){_0x3ed69e['limit']=qs['limit'](_0x29afb3[_0x9511('0x35')][_0x9511('0x1f')]);_0x3ed69e[_0x9511('0x1e')]=qs[_0x9511('0x1e')](_0x29afb3[_0x9511('0x35')][_0x9511('0x1e')]);}_0x3ed69e[_0x9511('0x3e')]=qs[_0x9511('0x3f')](_0x29afb3[_0x9511('0x35')][_0x9511('0x3f')]);_0x3ed69e[_0x9511('0x40')]=qs[_0x9511('0x37')](_[_0x9511('0x41')](_0x29afb3['query'],_0x4d7519[_0x9511('0x37')]),_0x19e8c5);if(_0x29afb3[_0x9511('0x35')][_0x9511('0x42')]){_0x3ed69e['where']=_['merge'](_0x3ed69e[_0x9511('0x40')],{'$or':_[_0x9511('0x30')](_0x19e8c5,function(_0x2af43b){if(_0x2af43b['type']!==_0x9511('0x43')){var _0x315008={};_0x315008[_0x2af43b['name']]={'$like':'%'+_0x29afb3[_0x9511('0x35')][_0x9511('0x42')]+'%'};return _0x315008;}})});}_0x3ed69e=_[_0x9511('0x44')]({},_0x3ed69e,_0x29afb3[_0x9511('0x45')]);var _0x3082ea={'where':_0x3ed69e[_0x9511('0x40')]};return db[_0x9511('0x31')]['count'](_0x3082ea)[_0x9511('0x26')](function(_0x225522){_0x4c9212[_0x9511('0x21')]=_0x225522;if(_0x29afb3['query'][_0x9511('0x46')]){_0x3ed69e['include']=[{'all':!![]}];}return db[_0x9511('0x31')][_0x9511('0x47')](_0x3ed69e);})[_0x9511('0x26')](function(_0x165c03){_0x4c9212[_0x9511('0x48')]=_0x165c03;return _0x4c9212;})['then'](respondWithFilteredResult(_0x44d761,_0x3ed69e))[_0x9511('0x49')](handleError(_0x44d761,null));};exports[_0x9511('0x4a')]=function(_0x2f388d,_0x5245ae){var _0x50a974={'raw':!![],'where':{'id':_0x2f388d[_0x9511('0x4b')]['id']}},_0x1c8f34={};_0x1c8f34[_0x9511('0x34')]=_[_0x9511('0x36')](db[_0x9511('0x31')][_0x9511('0x4c')]);_0x1c8f34[_0x9511('0x35')]=_[_0x9511('0x36')](_0x2f388d[_0x9511('0x35')]);_0x1c8f34['filters']=_['intersection'](_0x1c8f34[_0x9511('0x34')],_0x1c8f34[_0x9511('0x35')]);_0x50a974['attributes']=_[_0x9511('0x38')](_0x1c8f34[_0x9511('0x34')],qs[_0x9511('0x39')](_0x2f388d[_0x9511('0x35')][_0x9511('0x39')]));_0x50a974[_0x9511('0x3a')]=_0x50a974[_0x9511('0x3a')][_0x9511('0x3b')]?_0x50a974['attributes']:_0x1c8f34[_0x9511('0x34')];if(_0x2f388d[_0x9511('0x35')][_0x9511('0x46')]){_0x50a974['include']=[{'all':!![]}];}_0x50a974=_[_0x9511('0x44')]({},_0x50a974,_0x2f388d['options']);return db['Variable'][_0x9511('0x4d')](_0x50a974)[_0x9511('0x26')](handleEntityNotFound(_0x5245ae,null))['then'](respondWithResult(_0x5245ae,null))['catch'](handleError(_0x5245ae,null));};exports['create']=function(_0x4b471d,_0x2079b5){return db[_0x9511('0x31')][_0x9511('0x4e')](_0x4b471d['body'],{})[_0x9511('0x26')](function(_0x50c1ea){var _0x1d3a40=_0x4b471d['user'][_0x9511('0x28')]({'plain':!![]});if(!_0x1d3a40)throw new Error(_0x9511('0x4f'));if(_0x1d3a40[_0x9511('0x50')]==='user'){var _0x4cbbf6=_0x50c1ea['get']({'plain':!![]});var _0x4f17ab=_0x9511('0x29');return db[_0x9511('0x51')][_0x9511('0x4d')]({'where':{'name':_0x4f17ab,'userProfileId':_0x1d3a40[_0x9511('0x52')]},'raw':!![]})[_0x9511('0x26')](function(_0x13c67f){if(_0x13c67f&&_0x13c67f['autoAssociation']===0x0){return db[_0x9511('0x2a')][_0x9511('0x4e')]({'name':_0x4cbbf6[_0x9511('0x2d')],'resourceId':_0x4cbbf6['id'],'type':_0x13c67f['name'],'sectionId':_0x13c67f['id']},{})[_0x9511('0x26')](function(){return _0x50c1ea;});}else{return _0x50c1ea;}})[_0x9511('0x49')](function(_0x519119){logger[_0x9511('0x2b')](_0x9511('0x53'),_0x519119);throw _0x519119;});}return _0x50c1ea;})[_0x9511('0x26')](respondWithResult(_0x2079b5,0xc9))[_0x9511('0x49')](handleError(_0x2079b5,null));};exports[_0x9511('0x25')]=function(_0x1be2e5,_0x2b9947){if(_0x1be2e5[_0x9511('0x54')]['id']){delete _0x1be2e5[_0x9511('0x54')]['id'];}return db[_0x9511('0x31')][_0x9511('0x4d')]({'where':{'id':_0x1be2e5[_0x9511('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2b9947,null))['then'](saveUpdates(_0x1be2e5[_0x9511('0x54')],null))['then'](respondWithResult(_0x2b9947,null))[_0x9511('0x49')](handleError(_0x2b9947,null));};exports[_0x9511('0x27')]=function(_0x578a52,_0x5eaf17){return db[_0x9511('0x31')][_0x9511('0x4d')]({'where':{'id':_0x578a52[_0x9511('0x4b')]['id']}})['then'](handleEntityNotFound(_0x5eaf17,null))['then'](removeEntity(_0x5eaf17,null))[_0x9511('0x49')](handleError(_0x5eaf17,null));}; \ No newline at end of file diff --git a/server/api/variable/variable.model.js b/server/api/variable/variable.model.js index 306c167..5438724 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 _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 +var _0x1acf=['request-promise','path','rimraf','../../config/environment','exports','define','Variable','tools_variables','lodash','util','moment','bluebird'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x1acf,0x1f4));var _0xf1ac=function(_0x4cecb1,_0x57f981){_0x4cecb1=_0x4cecb1-0x0;var _0x55ade8=_0x1acf[_0x4cecb1];return _0x55ade8;};'use strict';var _=require(_0xf1ac('0x0'));var util=require(_0xf1ac('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xf1ac('0x2'));var BPromise=require(_0xf1ac('0x3'));var rp=require(_0xf1ac('0x4'));var fs=require('fs');var path=require(_0xf1ac('0x5'));var rimraf=require(_0xf1ac('0x6'));var config=require(_0xf1ac('0x7'));var attributes=require('./variable.attributes');module[_0xf1ac('0x8')]=function(_0x122057,_0x127f8a){return _0x122057[_0xf1ac('0x9')](_0xf1ac('0xa'),attributes,{'tableName':_0xf1ac('0xb'),'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 06bcee6..bb6d7a6 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 _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 +var _0x4b84=['catch','lodash','util','randomstring','../../config/utils','../../config/logger','rpc','http','then','info','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','Variable,\x20%s,\x20%s','message','ShowVariable','Variable','find','options','raw','where','attributes','include','map','model'];(function(_0x2b594c,_0x544370){var _0x3f4ed5=function(_0x2edf89){while(--_0x2edf89){_0x2b594c['push'](_0x2b594c['shift']());}};_0x3f4ed5(++_0x544370);}(_0x4b84,0x1cc));var _0x44b8=function(_0x3cfb0d,_0x4df584){_0x3cfb0d=_0x3cfb0d-0x0;var _0x3486b4=_0x4b84[_0x3cfb0d];return _0x3486b4;};'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')]('Variable,\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')]('Variable,\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);});});}exports[_0x44b8('0x10')]=function(_0x55e258){var _0x36743e=this;return new Promise(function(_0xe3de8f,_0x5103f5){return db[_0x44b8('0x11')][_0x44b8('0x12')]({'raw':_0x55e258['options']?_0x55e258[_0x44b8('0x13')][_0x44b8('0x14')]===undefined?!![]:![]:!![],'where':_0x55e258[_0x44b8('0x13')]?_0x55e258[_0x44b8('0x13')][_0x44b8('0x15')]||null:null,'attributes':_0x55e258[_0x44b8('0x13')]?_0x55e258[_0x44b8('0x13')][_0x44b8('0x16')]||null:null,'include':_0x55e258[_0x44b8('0x13')]?_0x55e258[_0x44b8('0x13')][_0x44b8('0x17')]?_[_0x44b8('0x18')](_0x55e258['options'][_0x44b8('0x17')],function(_0x3a8aa4){return{'model':db[_0x3a8aa4[_0x44b8('0x19')]],'as':_0x3a8aa4['as'],'attributes':_0x3a8aa4[_0x44b8('0x16')],'include':_0x3a8aa4[_0x44b8('0x17')]?_['map'](_0x3a8aa4[_0x44b8('0x17')],function(_0x54677c){return{'model':db[_0x54677c[_0x44b8('0x19')]],'as':_0x54677c['as'],'attributes':_0x54677c[_0x44b8('0x16')],'include':_0x54677c[_0x44b8('0x17')]?_[_0x44b8('0x18')](_0x54677c[_0x44b8('0x17')],function(_0x59acbc){return{'model':db[_0x59acbc[_0x44b8('0x19')]],'as':_0x59acbc['as'],'attributes':_0x59acbc['attributes']};}):[]};}):[]};}):[]:[]})[_0x44b8('0x7')](function(_0x350482){logger['info'](_0x44b8('0x10'),_0x55e258);logger[_0x44b8('0xa')](_0x44b8('0x10'),_0x55e258,JSON['stringify'](_0x350482));_0xe3de8f(_0x350482);})[_0x44b8('0x1a')](function(_0x242342){logger['error'](_0x44b8('0x10'),_0x242342['message'],_0x55e258);_0x5103f5(_0x36743e[_0x44b8('0xd')](0x1f4,_0x242342['message']));});});}; \ No newline at end of file diff --git a/server/api/version/index.js b/server/api/version/index.js index 7f00fef..fab4392 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 _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 +var _0xe92f=['isAuthenticated','canUpdate','/reset','reset','/pull','pull','/restart','restart','exports','../../components/auth/service','get','index','/fetch'];(function(_0x1fd291,_0x5cf73e){var _0x3e153e=function(_0x2f2139){while(--_0x2f2139){_0x1fd291['push'](_0x1fd291['shift']());}};_0x3e153e(++_0x5cf73e);}(_0xe92f,0x168));var _0xfe92=function(_0x587827,_0xcd77e){_0x587827=_0x587827-0x0;var _0x154933=_0xe92f[_0x587827];return _0x154933;};'use strict';var express=require('express');var router=express['Router']();var auth=require(_0xfe92('0x0'));var controller=require('./version.controller');router[_0xfe92('0x1')]('/',controller[_0xfe92('0x2')]);router[_0xfe92('0x1')](_0xfe92('0x3'),auth[_0xfe92('0x4')](),auth[_0xfe92('0x5')](),controller['fetch']);router['get'](_0xfe92('0x6'),auth[_0xfe92('0x4')](),auth[_0xfe92('0x5')](),controller[_0xfe92('0x7')]);router[_0xfe92('0x1')](_0xfe92('0x8'),auth[_0xfe92('0x4')](),auth[_0xfe92('0x5')](),controller[_0xfe92('0x9')]);router[_0xfe92('0x1')](_0xfe92('0xa'),auth[_0xfe92('0x4')](),controller[_0xfe92('0xb')]);router[_0xfe92('0x1')]('/migrations',controller['migrations']);module[_0xfe92('0xc')]=router; \ No newline at end of file diff --git a/server/api/version/version.controller.js b/server/api/version/version.controller.js index 411350a..d82b45c 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 _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 +var _0x6395=['then','pm2\x20restart\x20motion\x20%s','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','join','root','server','migrations','length','replace','.js','push','sort','sequelize','Migration','getQueryInterface','Database\x20migrated\x20successfully\x20from\x20version\x20','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','pkginfo','version','child_process','simple-git','index','exports','query','latest','fetch','tags','2.0.0','json','status','origin','master','error','reset','--hard','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','info','restart'];(function(_0x89bddd,_0x5c50e8){var _0x3a10e6=function(_0x2c887f){while(--_0x2c887f){_0x89bddd['push'](_0x89bddd['shift']());}};_0x3a10e6(++_0x5c50e8);}(_0x6395,0xa0));var _0x5639=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x6395[_0xa464c9];return _0x3d73c4;};'use strict';var Umzug=require(_0x5639('0x0'));var path=require(_0x5639('0x1'));var fs=require('fs');var _=require(_0x5639('0x2'));var pkginfo=require(_0x5639('0x3'))(module,_0x5639('0x4'));var compareVersions=require('compare-versions');var exec=require(_0x5639('0x5'))['exec'];var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var pm2=require('../../config/pm2');var logger=require('../../config/logger')('update');var git=require(_0x5639('0x6'))(config['root']);exports[_0x5639('0x7')]=function(_0x2bbddd,_0xa80996){var _0x423862={'current':module[_0x5639('0x8')][_0x5639('0x4')],'phonebar':0x2};if(_0x2bbddd[_0x5639('0x9')]&&_0x2bbddd['query'][_0x5639('0xa')]){return git[_0x5639('0xb')]()[_0x5639('0xc')](function(_0x5c08fd,_0x5e3ef3){_0x423862[_0x5639('0xa')]=(_0x5c08fd?module[_0x5639('0x8')]['version']:_0x5e3ef3['latest'])||_0x5639('0xd');return _0xa80996['status'](0xc8)[_0x5639('0xe')](_0x423862);});}else{return _0xa80996[_0x5639('0xf')](0xc8)[_0x5639('0xe')](_0x423862);}};exports[_0x5639('0xb')]=function(_0x1c0d1e,_0x5535ef){return git[_0x5639('0xb')]([_0x5639('0x10'),_0x5639('0x11')],function(_0x345b83){if(_0x345b83){logger[_0x5639('0x12')](_0x345b83);return _0x5535ef[_0x5639('0xf')](0x1f4)[_0x5639('0xe')](_0x345b83);}logger['info']('git\x20fetch');return _0x5535ef['status'](0xc8)['json']({'output':'git\x20fetch\x20origin\x20master'});});};exports[_0x5639('0x13')]=function(_0x447f4b,_0x2fa3b7){return git[_0x5639('0x13')]([_0x5639('0x14'),_0x5639('0x15')],function(_0x2af57d){if(_0x2af57d){logger[_0x5639('0x12')](_0x2af57d);return _0x2fa3b7[_0x5639('0xf')](0x1f4)[_0x5639('0xe')](_0x2af57d);}logger['info'](_0x5639('0x16'));return _0x2fa3b7[_0x5639('0xf')](0xc8)[_0x5639('0xe')]({'output':_0x5639('0x17')});});};exports[_0x5639('0x18')]=function(_0xd06920,_0x2cbbe2){exec(_0x5639('0x19'),function(_0xeb64c2,_0x5ca4dc,_0x1bb40f){logger[_0x5639('0x1a')](_0x5ca4dc);logger[_0x5639('0x1a')](_0x1bb40f);if(_0xeb64c2){logger[_0x5639('0x12')](_0xeb64c2);return _0x2cbbe2[_0x5639('0xf')](0x1f4)[_0x5639('0xe')](_0xeb64c2);}return _0x2cbbe2[_0x5639('0xf')](0xc8)[_0x5639('0xe')]({'output':_0x5ca4dc});});};exports[_0x5639('0x1b')]=function(_0x569dae,_0x166fcb){return pm2[_0x5639('0x1b')]('motion2')[_0x5639('0x1c')](function(_0x1d7e2a){logger[_0x5639('0x1a')](_0x5639('0x1d'),_0x1d7e2a);return _0x166fcb[_0x5639('0xf')](0xc8)[_0x5639('0xe')]({'output':_0x5639('0x1e')});})[_0x5639('0x1f')](function(_0x5f1887){logger[_0x5639('0x12')](_0x5f1887);return _0x166fcb[_0x5639('0xf')](0x1f4)[_0x5639('0xe')](_0x5f1887);});};exports['migrations']=function(_0xcf0ad1,_0x2500f2){var _0x3f8fc6=fs['readdirSync'](path[_0x5639('0x20')](config[_0x5639('0x21')],_0x5639('0x22'),_0x5639('0x23')));var _0x17a466=[];for(var _0x23679b=0x0;_0x23679b<_0x3f8fc6[_0x5639('0x24')];_0x23679b++){var _0x1497d0=_0x3f8fc6[_0x23679b][_0x5639('0x25')](_0x5639('0x26'),'');if(compareVersions(module['exports']['version'],_0x1497d0)===-0x1){_0x17a466[_0x5639('0x27')](_0x1497d0);}}if(_0x17a466[_0x5639('0x24')]){var _0x4ebe0a=_0x17a466[_0x5639('0x28')](compareVersions);var _0x44ddfc=new Umzug({'storage':_0x5639('0x29'),'storageOptions':{'model':db[_0x5639('0x2a')],'modelName':'Migration','columnName':_0x5639('0x4')},'migrations':{'params':[db[_0x5639('0x29')][_0x5639('0x2b')](),db['sequelize']['constructor'],function(){throw new Error('Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.');}],'path':path[_0x5639('0x20')](config[_0x5639('0x21')],_0x5639('0x22'),'migrations'),'pattern':/\.js$/}});_0x44ddfc['up']({'migrations':_['map'](_0x4ebe0a,function(_0x1a0a34){return _0x1a0a34+'.js';})})[_0x5639('0x1c')](function(){return _0x2500f2[_0x5639('0xf')](0xc8)['json']({'output':_0x5639('0x2c')+module[_0x5639('0x8')]['version']+'\x20to\x20'+_['last'](_0x4ebe0a),'migrations':_['join'](_0x4ebe0a)});})['catch'](function(_0x4cc021){if(_0x4cc021 instanceof db[_0x5639('0x29')][_0x5639('0x2d')]){return _0x2500f2[_0x5639('0xf')](0xc8)['json']({'output':'Database\x20already\x20up-to-date'});}else{return _0x2500f2['status'](0x1f4)['json'](_0x4cc021);}});}else{return _0x2500f2[_0x5639('0xf')](0xc8)[_0x5639('0xe')]({'output':_0x5639('0x2e')});}}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/index.js b/server/api/voiceAgentReport/index.js index 2a11ca4..8d8c31d 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 _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 +var _0x427f=['fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/describe','describe','/:id','show','create','put','update','destroy','exports','multer','util','connect-timeout','express','Router'];(function(_0x119eeb,_0x12b3d8){var _0x1d9605=function(_0x222d75){while(--_0x222d75){_0x119eeb['push'](_0x119eeb['shift']());}};_0x1d9605(++_0x12b3d8);}(_0x427f,0xdf));var _0xf427=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x427f[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0xf427('0x0'));var util=require(_0xf427('0x1'));var path=require('path');var timeout=require(_0xf427('0x2'));var express=require(_0xf427('0x3'));var router=express[_0xf427('0x4')]();var fs_extra=require(_0xf427('0x5'));var auth=require(_0xf427('0x6'));var interaction=require(_0xf427('0x7'));var config=require('../../config/environment');var controller=require('./voiceAgentReport.controller');router[_0xf427('0x8')]('/',auth[_0xf427('0x9')](),controller['index']);router[_0xf427('0x8')](_0xf427('0xa'),auth[_0xf427('0x9')](),controller[_0xf427('0xb')]);router[_0xf427('0x8')](_0xf427('0xc'),auth[_0xf427('0x9')](),controller[_0xf427('0xd')]);router['post']('/',auth[_0xf427('0x9')](),controller[_0xf427('0xe')]);router[_0xf427('0xf')]('/:id',auth[_0xf427('0x9')](),controller[_0xf427('0x10')]);router['delete'](_0xf427('0xc'),auth[_0xf427('0x9')](),controller[_0xf427('0x11')]);module[_0xf427('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.attributes.js b/server/api/voiceAgentReport/voiceAgentReport.attributes.js index 1689f8d..2ef0f57 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 _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 +var _0x49f8=['INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','STRING','DATE'];(function(_0xfe7ce3,_0x394ba8){var _0x108672=function(_0x4000b5){while(--_0x4000b5){_0xfe7ce3['push'](_0xfe7ce3['shift']());}};_0x108672(++_0x394ba8);}(_0x49f8,0xff));var _0x849f=function(_0x3d6989,_0xae1e80){_0x3d6989=_0x3d6989-0x0;var _0x55ff42=_0x49f8[_0x3d6989];return _0x55ff42;};'use strict';var Sequelize=require(_0x849f('0x0'));module['exports']={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x849f('0x1')]},'calleridnum':{'type':Sequelize[_0x849f('0x1')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x849f('0x1')]},'interface':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0x849f('0x1')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0x849f('0x2')]},'agentcompleteAt':{'type':Sequelize['DATE']},'agentringnoanswerAt':{'type':Sequelize[_0x849f('0x2')]},'agentdumpAt':{'type':Sequelize[_0x849f('0x2')]},'holdtime':{'type':Sequelize[_0x849f('0x3')]},'agentcomplete':{'type':Sequelize[_0x849f('0x4')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0x849f('0x4')],'defaultValue':![]},'agentdump':{'type':Sequelize[_0x849f('0x4')],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize['INTEGER']},'reason':{'type':Sequelize[_0x849f('0x1')]},'lastevent':{'type':Sequelize[_0x849f('0x1')]},'channel':{'type':Sequelize[_0x849f('0x1')]},'channelstate':{'type':Sequelize[_0x849f('0x3')]},'channelstatedesc':{'type':Sequelize[_0x849f('0x1')]},'connectedlinenum':{'type':Sequelize[_0x849f('0x1')]},'connectedlinename':{'type':Sequelize[_0x849f('0x1')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x849f('0x1')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x849f('0x1')]},'priority':{'type':Sequelize[_0x849f('0x1')]},'destchannel':{'type':Sequelize[_0x849f('0x1')]},'destchannelstate':{'type':Sequelize[_0x849f('0x3')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0x849f('0x1')]},'destcalleridname':{'type':Sequelize[_0x849f('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x849f('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x849f('0x1')]},'destlanguage':{'type':Sequelize[_0x849f('0x1')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x849f('0x1')]},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize[_0x849f('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0x849f('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0x849f('0x1')]},'transfer':{'type':Sequelize[_0x849f('0x4')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x849f('0x1')],'comment':_0x849f('0x5')},'transferexten':{'type':Sequelize[_0x849f('0x1')]},'transferuniqueid':{'type':Sequelize['STRING']},'agententerreason':{'type':Sequelize[_0x849f('0x3')],'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 2992776..c932e19 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(_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 +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(_0x2e4e19,_0x493b50){var _0x9ba20b=function(_0x2f6456){while(--_0x2f6456){_0x2e4e19['push'](_0x2e4e19['shift']());}};_0x9ba20b(++_0x493b50);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0xa9e0[_0x5c351c];return _0x26f3b3;};'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 e40fd35..f3ab3b2 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 _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 +var _0x394e=['destuniqueid','lodash','util','api','moment','bluebird','request-promise','rimraf','../../config/environment','./voiceAgentReport.attributes','exports','define','VoiceAgentReport','report_agent','uniqueid'];(function(_0x4c4d9c,_0x5bd0eb){var _0x5063fb=function(_0x46cb30){while(--_0x46cb30){_0x4c4d9c['push'](_0x4c4d9c['shift']());}};_0x5063fb(++_0x5bd0eb);}(_0x394e,0x88));var _0xe394=function(_0x3a712c,_0x4571ec){_0x3a712c=_0x3a712c-0x0;var _0x3ae099=_0x394e[_0x3a712c];return _0x3ae099;};'use strict';var _=require(_0xe394('0x0'));var util=require(_0xe394('0x1'));var logger=require('../../config/logger')(_0xe394('0x2'));var moment=require(_0xe394('0x3'));var BPromise=require(_0xe394('0x4'));var rp=require(_0xe394('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe394('0x6'));var config=require(_0xe394('0x7'));var attributes=require(_0xe394('0x8'));module[_0xe394('0x9')]=function(_0x2a4db6,_0x272c30){return _0x2a4db6[_0xe394('0xa')](_0xe394('0xb'),attributes,{'tableName':_0xe394('0xc'),'paranoid':![],'indexes':[{'fields':[_0xe394('0xd'),_0xe394('0xe')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.rpc.js b/server/api/voiceAgentReport/voiceAgentReport.rpc.js index d620a4a..14e075c 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 _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 +var _0x96fd=['limit','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','create','body','options','raw','UpdateVoiceAgentReport','VoiceAgentReport','update','attributes'];(function(_0x37800d,_0x4c0984){var _0x21a833=function(_0x13e231){while(--_0x13e231){_0x37800d['push'](_0x37800d['shift']());}};_0x21a833(++_0x4c0984);}(_0x96fd,0x187));var _0xd96f=function(_0x10cf89,_0x2fd56c){_0x10cf89=_0x10cf89-0x0;var _0x324a21=_0x96fd[_0x10cf89];return _0x324a21;};'use strict';var _=require(_0xd96f('0x0'));var util=require(_0xd96f('0x1'));var moment=require('moment');var BPromise=require(_0xd96f('0x2'));var rs=require(_0xd96f('0x3'));var fs=require('fs');var Redis=require(_0xd96f('0x4'));var db=require(_0xd96f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xd96f('0x6'))(_0xd96f('0x7'));var config=require(_0xd96f('0x8'));var jayson=require(_0xd96f('0x9'));var client=jayson['client'][_0xd96f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x380f33,_0x2de391,_0x2bdc2f){return new BPromise(function(_0x16a37b,_0x1d8da8){return client['request'](_0x380f33,_0x2bdc2f)[_0xd96f('0xb')](function(_0x27f73d){logger[_0xd96f('0xc')](_0xd96f('0xd'),_0x2de391,_0xd96f('0xe'));logger[_0xd96f('0xf')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x2de391,'request\x20sent',JSON[_0xd96f('0x10')](_0x27f73d));if(_0x27f73d[_0xd96f('0x11')]){if(_0x27f73d['error'][_0xd96f('0x12')]===0x1f4){logger[_0xd96f('0x11')](_0xd96f('0xd'),_0x2de391,_0x27f73d['error'][_0xd96f('0x13')]);return _0x1d8da8(_0x27f73d[_0xd96f('0x11')][_0xd96f('0x13')]);}logger[_0xd96f('0x11')](_0xd96f('0xd'),_0x2de391,_0x27f73d[_0xd96f('0x11')]['message']);return _0x16a37b(_0x27f73d[_0xd96f('0x11')][_0xd96f('0x13')]);}else{logger[_0xd96f('0xc')](_0xd96f('0xd'),_0x2de391,_0xd96f('0xe'));_0x16a37b(_0x27f73d['result']['message']);}})[_0xd96f('0x14')](function(_0x590fea){logger[_0xd96f('0x11')](_0xd96f('0xd'),_0x2de391,_0x590fea);_0x1d8da8(_0x590fea);});});}exports['CreateVoiceAgentReport']=function(_0x5a9237){var _0x48a4ae=this;return new Promise(function(_0x2d4675,_0x527e80){return db['VoiceAgentReport'][_0xd96f('0x15')](_0x5a9237[_0xd96f('0x16')],{'raw':_0x5a9237['options']?_0x5a9237[_0xd96f('0x17')][_0xd96f('0x18')]===undefined?!![]:![]:!![]})[_0xd96f('0xb')](function(_0x394d01){logger[_0xd96f('0xc')]('CreateVoiceAgentReport',_0x5a9237);logger[_0xd96f('0xf')]('CreateVoiceAgentReport',_0x5a9237,JSON[_0xd96f('0x10')](_0x394d01));_0x2d4675(_0x394d01);})['catch'](function(_0x3b9d82){logger['error']('CreateVoiceAgentReport',_0x3b9d82[_0xd96f('0x13')],_0x5a9237);_0x527e80(_0x48a4ae[_0xd96f('0x11')](0x1f4,_0x3b9d82[_0xd96f('0x13')]));});});};exports[_0xd96f('0x19')]=function(_0x58a0ba){var _0x289311=this;return new Promise(function(_0x20d790,_0x42778c){return db[_0xd96f('0x1a')][_0xd96f('0x1b')](_0x58a0ba['body'],{'raw':_0x58a0ba[_0xd96f('0x17')]?_0x58a0ba[_0xd96f('0x17')][_0xd96f('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x58a0ba[_0xd96f('0x17')]?_0x58a0ba[_0xd96f('0x17')]['where']||null:null,'attributes':_0x58a0ba['options']?_0x58a0ba[_0xd96f('0x17')][_0xd96f('0x1c')]||null:null,'limit':_0x58a0ba['options']?_0x58a0ba[_0xd96f('0x17')][_0xd96f('0x1d')]||null:null})[_0xd96f('0xb')](function(_0x13de29){logger[_0xd96f('0xc')]('UpdateVoiceAgentReport',_0x58a0ba);logger[_0xd96f('0xf')](_0xd96f('0x19'),_0x58a0ba,JSON['stringify'](_0x13de29));_0x20d790(_0x13de29);})[_0xd96f('0x14')](function(_0xe4bf3a){logger['error'](_0xd96f('0x19'),_0xe4bf3a[_0xd96f('0x13')],_0x58a0ba);_0x42778c(_0x289311['error'](0x1f4,_0xe4bf3a[_0xd96f('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/index.js b/server/api/voiceCallReport/index.js index 3091aaa..49e2e8b 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 _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 +var _0x2123=['../../components/interaction/service','../../config/environment','./voiceCallReport.controller','get','index','/describe','describe','/:id','isAuthenticated','show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x32bdd4,_0x143a69){var _0x4b54d3=function(_0x5c38d6){while(--_0x5c38d6){_0x32bdd4['push'](_0x32bdd4['shift']());}};_0x4b54d3(++_0x143a69);}(_0x2123,0x190));var _0x3212=function(_0x134333,_0x152a5f){_0x134333=_0x134333-0x0;var _0x544b6a=_0x2123[_0x134333];return _0x544b6a;};'use strict';var multer=require(_0x3212('0x0'));var util=require(_0x3212('0x1'));var path=require(_0x3212('0x2'));var timeout=require(_0x3212('0x3'));var express=require(_0x3212('0x4'));var router=express[_0x3212('0x5')]();var fs_extra=require(_0x3212('0x6'));var auth=require(_0x3212('0x7'));var interaction=require(_0x3212('0x8'));var config=require(_0x3212('0x9'));var controller=require(_0x3212('0xa'));router[_0x3212('0xb')]('/',auth['isAuthenticated'](),controller[_0x3212('0xc')]);router[_0x3212('0xb')](_0x3212('0xd'),auth['isAuthenticated'](),controller[_0x3212('0xe')]);router['get'](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x11')]);router[_0x3212('0x12')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3212('0x13')](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x14')]);router[_0x3212('0x15')](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x16')]);module[_0x3212('0x17')]=router; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.attributes.js b/server/api/voiceCallReport/voiceCallReport.attributes.js index 32076fe..b1bcdfc 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 _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 +var _0x48bc=['inbound-fax','outbound-fax','dialer','TEXT','DATE','INTEGER','sequelize','exports','STRING','inbound','internal','outbound'];(function(_0x1239c9,_0x31a03b){var _0x5544ac=function(_0x536e01){while(--_0x536e01){_0x1239c9['push'](_0x1239c9['shift']());}};_0x5544ac(++_0x31a03b);}(_0x48bc,0x1b6));var _0xc48b=function(_0x16e6d3,_0x373c41){_0x16e6d3=_0x16e6d3-0x0;var _0x4075b0=_0x48bc[_0x16e6d3];return _0x4075b0;};'use strict';var Sequelize=require(_0xc48b('0x0'));module[_0xc48b('0x1')]={'uniqueid':{'type':Sequelize[_0xc48b('0x2')]},'type':{'type':Sequelize['ENUM'](_0xc48b('0x3'),_0xc48b('0x4'),_0xc48b('0x5'),_0xc48b('0x6'),_0xc48b('0x7'),_0xc48b('0x8'))},'tag':{'type':Sequelize[_0xc48b('0x2')]},'accountcode':{'type':Sequelize['STRING']},'source':{'type':Sequelize[_0xc48b('0x2')]},'destination':{'type':Sequelize['STRING']},'destinationcontext':{'type':Sequelize[_0xc48b('0x2')]},'callerid':{'type':Sequelize[_0xc48b('0x2')]},'channel':{'type':Sequelize['STRING']},'destinationchannel':{'type':Sequelize[_0xc48b('0x2')]},'lastapplication':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0xc48b('0x9')]},'starttime':{'type':Sequelize[_0xc48b('0xa')]},'systemanswertime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize[_0xc48b('0xa')]},'endtime':{'type':Sequelize[_0xc48b('0xa')]},'duration':{'type':Sequelize[_0xc48b('0xb')]},'billableseconds':{'type':Sequelize[_0xc48b('0xb')]},'mohtime':{'type':Sequelize[_0xc48b('0xb')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xc48b('0x2')]},'amaflags':{'type':Sequelize[_0xc48b('0x2')]},'userfield':{'type':Sequelize[_0xc48b('0x2')]},'userDisposition':{'type':Sequelize[_0xc48b('0x2')]},'userSecondDisposition':{'type':Sequelize[_0xc48b('0x2')]},'userThirdDisposition':{'type':Sequelize[_0xc48b('0x2')]},'note':{'type':Sequelize[_0xc48b('0x2')]},'prefix':{'type':Sequelize['STRING']},'routeid':{'type':Sequelize[_0xc48b('0xb')]},'sipcallid':{'type':Sequelize[_0xc48b('0x2')]}}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.controller.js b/server/api/voiceCallReport/voiceCallReport.controller.js index 7ae2fc4..8b0a27c 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 _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 +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(_0x595bd1,_0xb1e7a){var _0xd0344f=function(_0x5eb2fd){while(--_0x5eb2fd){_0x595bd1['push'](_0x595bd1['shift']());}};_0xd0344f(++_0xb1e7a);}(_0xadb5,0xad));var _0x5adb=function(_0x1370e6,_0x127771){_0x1370e6=_0x1370e6-0x0;var _0x4b17c6=_0xadb5[_0x1370e6];return _0x4b17c6;};'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 diff --git a/server/api/voiceCallReport/voiceCallReport.model.js b/server/api/voiceCallReport/voiceCallReport.model.js index 669ace8..4fb0e29 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 _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 +var _0xd4ca=['../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./voiceCallReport.attributes','exports','VoiceCallReport','report_call','lodash','util'];(function(_0x22db20,_0x915a49){var _0x248803=function(_0x4d0e9e){while(--_0x4d0e9e){_0x22db20['push'](_0x22db20['shift']());}};_0x248803(++_0x915a49);}(_0xd4ca,0x73));var _0xad4c=function(_0x213e89,_0x58c1f4){_0x213e89=_0x213e89-0x0;var _0x47115d=_0xd4ca[_0x213e89];return _0x47115d;};'use strict';var _=require(_0xad4c('0x0'));var util=require(_0xad4c('0x1'));var logger=require(_0xad4c('0x2'))(_0xad4c('0x3'));var moment=require(_0xad4c('0x4'));var BPromise=require(_0xad4c('0x5'));var rp=require(_0xad4c('0x6'));var fs=require('fs');var path=require(_0xad4c('0x7'));var rimraf=require('rimraf');var config=require(_0xad4c('0x8'));var attributes=require(_0xad4c('0x9'));module[_0xad4c('0xa')]=function(_0x55f3b7,_0x2588c8){return _0x55f3b7['define'](_0xad4c('0xb'),attributes,{'tableName':_0xad4c('0xc'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.rpc.js b/server/api/voiceCallReport/voiceCallReport.rpc.js index 5700d92..b5f8e90 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 _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 +var _0xd618=['where','attributes','include','model','map','stringify','CreateVoiceCallReport','create','raw','UpdateVoiceCallReport','update','body','limit','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','then','info','VoiceCallReport,\x20%s,\x20%s','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','request\x20sent','code','error','message','catch','GetVoiceCallReport','VoiceCallReport','options'];(function(_0x4b2436,_0x452299){var _0x4f5ab2=function(_0x5c6679){while(--_0x5c6679){_0x4b2436['push'](_0x4b2436['shift']());}};_0x4f5ab2(++_0x452299);}(_0xd618,0xc1));var _0x8d61=function(_0x122633,_0x22057b){_0x122633=_0x122633-0x0;var _0x2d02e5=_0xd618[_0x122633];return _0x2d02e5;};'use strict';var _=require(_0x8d61('0x0'));var util=require(_0x8d61('0x1'));var moment=require('moment');var BPromise=require(_0x8d61('0x2'));var rs=require(_0x8d61('0x3'));var fs=require('fs');var Redis=require(_0x8d61('0x4'));var db=require(_0x8d61('0x5'))['db'];var utils=require(_0x8d61('0x6'));var logger=require(_0x8d61('0x7'))(_0x8d61('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x8d61('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2912c4,_0x155d82,_0x252f49){return new BPromise(function(_0x56d897,_0x97f990){return client['request'](_0x2912c4,_0x252f49)[_0x8d61('0xa')](function(_0x341521){logger[_0x8d61('0xb')](_0x8d61('0xc'),_0x155d82,'request\x20sent');logger[_0x8d61('0xd')](_0x8d61('0xe'),_0x155d82,_0x8d61('0xf'),JSON['stringify'](_0x341521));if(_0x341521['error']){if(_0x341521['error'][_0x8d61('0x10')]===0x1f4){logger[_0x8d61('0x11')](_0x8d61('0xc'),_0x155d82,_0x341521['error'][_0x8d61('0x12')]);return _0x97f990(_0x341521[_0x8d61('0x11')][_0x8d61('0x12')]);}logger[_0x8d61('0x11')](_0x8d61('0xc'),_0x155d82,_0x341521[_0x8d61('0x11')]['message']);return _0x56d897(_0x341521['error'][_0x8d61('0x12')]);}else{logger['info']('VoiceCallReport,\x20%s,\x20%s',_0x155d82,_0x8d61('0xf'));_0x56d897(_0x341521['result'][_0x8d61('0x12')]);}})[_0x8d61('0x13')](function(_0x3ed432){logger[_0x8d61('0x11')](_0x8d61('0xc'),_0x155d82,_0x3ed432);_0x97f990(_0x3ed432);});});}exports[_0x8d61('0x14')]=function(_0x3d556a){var _0x30ba10=this;return new Promise(function(_0x2a9dc4,_0x1221e0){return db[_0x8d61('0x15')]['findAll']({'raw':_0x3d556a[_0x8d61('0x16')]?_0x3d556a['options']['raw']===undefined?!![]:![]:!![],'where':_0x3d556a['options']?_0x3d556a['options'][_0x8d61('0x17')]||null:null,'attributes':_0x3d556a[_0x8d61('0x16')]?_0x3d556a[_0x8d61('0x16')][_0x8d61('0x18')]||null:null,'limit':_0x3d556a[_0x8d61('0x16')]?_0x3d556a[_0x8d61('0x16')]['limit']||null:null,'include':_0x3d556a[_0x8d61('0x16')]?_0x3d556a[_0x8d61('0x16')][_0x8d61('0x19')]?_['map'](_0x3d556a['options']['include'],function(_0x37dfde){return{'model':db[_0x37dfde[_0x8d61('0x1a')]],'as':_0x37dfde['as'],'attributes':_0x37dfde[_0x8d61('0x18')],'include':_0x37dfde[_0x8d61('0x19')]?_[_0x8d61('0x1b')](_0x37dfde[_0x8d61('0x19')],function(_0x5be7e4){return{'model':db[_0x5be7e4[_0x8d61('0x1a')]],'as':_0x5be7e4['as'],'attributes':_0x5be7e4['attributes'],'include':_0x5be7e4[_0x8d61('0x19')]?_['map'](_0x5be7e4[_0x8d61('0x19')],function(_0x384a50){return{'model':db[_0x384a50['model']],'as':_0x384a50['as'],'attributes':_0x384a50[_0x8d61('0x18')]};}):[]};}):[]};}):[]:[]})[_0x8d61('0xa')](function(_0x5c7400){logger['info'](_0x8d61('0x14'),_0x3d556a);logger[_0x8d61('0xd')]('GetVoiceCallReport',_0x3d556a,JSON[_0x8d61('0x1c')](_0x5c7400));_0x2a9dc4(_0x5c7400);})[_0x8d61('0x13')](function(_0x2be628){logger[_0x8d61('0x11')]('GetVoiceCallReport',_0x2be628['message'],_0x3d556a);_0x1221e0(_0x30ba10[_0x8d61('0x11')](0x1f4,_0x2be628[_0x8d61('0x12')]));});});};exports[_0x8d61('0x1d')]=function(_0x143e80){var _0x487a7e=this;return new Promise(function(_0x56d39c,_0x1586bc){return db['VoiceCallReport'][_0x8d61('0x1e')](_0x143e80['body'],{'raw':_0x143e80[_0x8d61('0x16')]?_0x143e80[_0x8d61('0x16')][_0x8d61('0x1f')]===undefined?!![]:![]:!![]})[_0x8d61('0xa')](function(_0x11e9b0){logger['info'](_0x8d61('0x1d'),_0x143e80);logger['debug'](_0x8d61('0x1d'),_0x143e80,JSON['stringify'](_0x11e9b0));_0x56d39c(_0x11e9b0);})['catch'](function(_0x5a2ab9){logger['error'](_0x8d61('0x1d'),_0x5a2ab9[_0x8d61('0x12')],_0x143e80);_0x1586bc(_0x487a7e[_0x8d61('0x11')](0x1f4,_0x5a2ab9[_0x8d61('0x12')]));});});};exports[_0x8d61('0x20')]=function(_0x36ccdc){var _0xab301a=this;return new Promise(function(_0x1115e6,_0x481e17){return db[_0x8d61('0x15')][_0x8d61('0x21')](_0x36ccdc[_0x8d61('0x22')],{'raw':_0x36ccdc[_0x8d61('0x16')]?_0x36ccdc[_0x8d61('0x16')][_0x8d61('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x36ccdc['options']?_0x36ccdc['options'][_0x8d61('0x17')]||null:null,'attributes':_0x36ccdc[_0x8d61('0x16')]?_0x36ccdc[_0x8d61('0x16')][_0x8d61('0x18')]||null:null,'limit':_0x36ccdc['options']?_0x36ccdc['options'][_0x8d61('0x23')]||null:null})[_0x8d61('0xa')](function(_0x377655){logger[_0x8d61('0xb')](_0x8d61('0x20'),_0x36ccdc);logger['debug'](_0x8d61('0x20'),_0x36ccdc,JSON[_0x8d61('0x1c')](_0x377655));_0x1115e6(_0x377655);})[_0x8d61('0x13')](function(_0xb7dea3){logger['error'](_0x8d61('0x20'),_0xb7dea3[_0x8d61('0x12')],_0x36ccdc);_0x481e17(_0xab301a['error'](0x1f4,_0xb7dea3['message']));});});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/index.js b/server/api/voiceChanSpy/index.js index 57000a7..37d8cfd 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 _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 +var _0xa44d=['exports','multer','connect-timeout','Router','fs-extra','../../components/interaction/service','get','index','/:id','isAuthenticated','post','put','destroy'];(function(_0x405f30,_0x314945){var _0x3a6736=function(_0x12c9ff){while(--_0x12c9ff){_0x405f30['push'](_0x405f30['shift']());}};_0x3a6736(++_0x314945);}(_0xa44d,0x105));var _0xda44=function(_0x5b6cf1,_0x32fdcd){_0x5b6cf1=_0x5b6cf1-0x0;var _0x46278c=_0xa44d[_0x5b6cf1];return _0x46278c;};'use strict';var multer=require(_0xda44('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xda44('0x1'));var express=require('express');var router=express[_0xda44('0x2')]();var fs_extra=require(_0xda44('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xda44('0x4'));var config=require('../../config/environment');var controller=require('./voiceChanSpy.controller');router[_0xda44('0x5')]('/',auth['isAuthenticated'](),controller[_0xda44('0x6')]);router[_0xda44('0x5')](_0xda44('0x7'),auth[_0xda44('0x8')](),controller['show']);router[_0xda44('0x9')]('/',auth[_0xda44('0x8')](),controller['create']);router[_0xda44('0xa')](_0xda44('0x7'),auth[_0xda44('0x8')](),controller['update']);router['delete'](_0xda44('0x7'),auth['isAuthenticated'](),controller[_0xda44('0xb')]);module[_0xda44('0xc')]=router; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.attributes.js b/server/api/voiceChanSpy/voiceChanSpy.attributes.js index 4aa2172..f907993 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 _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 +var _0x16a8=['STRING','name','options','join','split','BOOLEAN','sequelize'];(function(_0x26f0a0,_0x582879){var _0x59f5fb=function(_0x518702){while(--_0x518702){_0x26f0a0['push'](_0x26f0a0['shift']());}};_0x59f5fb(++_0x582879);}(_0x16a8,0x195));var _0x816a=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x16a8[_0x397e5f];return _0x5302b8;};'use strict';var Sequelize=require(_0x816a('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'prefix':{'type':Sequelize[_0x816a('0x1')],'unique':_0x816a('0x2'),'allowNull':![]},'options':{'type':Sequelize[_0x816a('0x1')],'set':function(_0x5a849f){this['setDataValue'](_0x816a('0x3'),_0x5a849f?_0x5a849f[_0x816a('0x4')](''):[]);},'get':function(){return this['getDataValue'](_0x816a('0x3'))?this['getDataValue'](_0x816a('0x3'))[_0x816a('0x5')](''):[];}},'auth':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'password':{'type':Sequelize[_0x816a('0x1')]},'record':{'type':Sequelize[_0x816a('0x6')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x816a('0x1')]},'description':{'type':Sequelize[_0x816a('0x1')]}}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.controller.js b/server/api/voiceChanSpy/voiceChanSpy.controller.js index 66e5c86..bea6ad2 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 _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 +var _0x5712=['../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','undefined','count','limit','set','Content-Range','apply','save','then','destroy','ChanSpies','UserProfileResource','error','stack','name','send','index','map','VoiceChanSpy','rawAttributes','type','key','query','keys','filters','intersection','model','fields','attributes','length','nolimit','offset','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','options','find','create','user','get','role','userProfileId','autoAssociation','update','body','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs'];(function(_0x339702,_0x465d98){var _0x55cc03=function(_0x570dad){while(--_0x570dad){_0x339702['push'](_0x339702['shift']());}};_0x55cc03(++_0x465d98);}(_0x5712,0x140));var _0x2571=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x5712[_0x1facfa];return _0x9ec701;};'use strict';var emlformat=require(_0x2571('0x0'));var rimraf=require(_0x2571('0x1'));var zipdir=require(_0x2571('0x2'));var jsonpatch=require(_0x2571('0x3'));var rp=require(_0x2571('0x4'));var moment=require(_0x2571('0x5'));var BPromise=require(_0x2571('0x6'));var Mustache=require(_0x2571('0x7'));var util=require(_0x2571('0x8'));var path=require(_0x2571('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x2571('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2571('0xb'));var squel=require(_0x2571('0xc'));var crypto=require(_0x2571('0xd'));var jsforce=require(_0x2571('0xe'));var deskjs=require(_0x2571('0xf'));var toCsv=require(_0x2571('0x10'));var querystring=require('querystring');var Papa=require(_0x2571('0x11'));var Redis=require('ioredis');var authService=require(_0x2571('0x12'));var qs=require(_0x2571('0x13'));var as=require(_0x2571('0x14'));var hardwareService=require(_0x2571('0x15'));var logger=require(_0x2571('0x16'))(_0x2571('0x17'));var utils=require(_0x2571('0x18'));var config=require(_0x2571('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x33d3ed,_0x1ab846){_0x1ab846=_0x1ab846||0xcc;return function(_0x10823d){if(_0x10823d){return _0x33d3ed[_0x2571('0x1a')](_0x1ab846);}return _0x33d3ed[_0x2571('0x1b')](_0x1ab846)[_0x2571('0x1c')]();};}function respondWithResult(_0x241129,_0x130ab1){_0x130ab1=_0x130ab1||0xc8;return function(_0xdf8c3a){if(_0xdf8c3a){return _0x241129[_0x2571('0x1b')](_0x130ab1)[_0x2571('0x1d')](_0xdf8c3a);}};}function respondWithFilteredResult(_0x3c1a08,_0x5b0392){return function(_0x30b0f2){if(_0x30b0f2){var _0x47b5e9=typeof _0x5b0392['offset']==='undefined'&&typeof _0x5b0392['limit']===_0x2571('0x1e');var _0x371ae2=_0x30b0f2[_0x2571('0x1f')];var _0x75af2a=_0x47b5e9?0x0:_0x5b0392['offset'];var _0x7707=_0x47b5e9?_0x30b0f2[_0x2571('0x1f')]:_0x5b0392['offset']+_0x5b0392[_0x2571('0x20')];var _0x7303ad;if(_0x7707>=_0x371ae2){_0x7707=_0x371ae2;_0x7303ad=0xc8;}else{_0x7303ad=0xce;}_0x3c1a08[_0x2571('0x1b')](_0x7303ad);return _0x3c1a08[_0x2571('0x21')](_0x2571('0x22'),_0x75af2a+'-'+_0x7707+'/'+_0x371ae2)['json'](_0x30b0f2);}return null;};}function patchUpdates(_0x52da27){return function(_0x5fe030){try{jsonpatch[_0x2571('0x23')](_0x5fe030,_0x52da27,!![]);}catch(_0x58f6aa){return BPromise['reject'](_0x58f6aa);}return _0x5fe030[_0x2571('0x24')]();};}function saveUpdates(_0x2e7d89,_0x2218fb){return function(_0xb6dfa6){if(_0xb6dfa6){return _0xb6dfa6['update'](_0x2e7d89)[_0x2571('0x25')](function(_0x55ec06){return _0x55ec06;});}return null;};}function removeEntity(_0x1ec23c,_0x4316b1){return function(_0x5d6778){if(_0x5d6778){return _0x5d6778[_0x2571('0x26')]()[_0x2571('0x25')](function(){var _0x22cdb8=_0x5d6778['get']({'plain':!![]});var _0x5d455d=_0x2571('0x27');return db[_0x2571('0x28')][_0x2571('0x26')]({'where':{'type':_0x5d455d,'resourceId':_0x22cdb8['id']}})[_0x2571('0x25')](function(){return _0x5d6778;});})[_0x2571('0x25')](function(){_0x1ec23c[_0x2571('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4f6ccc,_0x1ceb21){return function(_0x426615){if(!_0x426615){_0x4f6ccc[_0x2571('0x1a')](0x194);}return _0x426615;};}function handleError(_0x2ce206,_0x26757a){_0x26757a=_0x26757a||0x1f4;return function(_0x165aa8){logger[_0x2571('0x29')](_0x165aa8[_0x2571('0x2a')]);if(_0x165aa8[_0x2571('0x2b')]){delete _0x165aa8[_0x2571('0x2b')];}_0x2ce206['status'](_0x26757a)[_0x2571('0x2c')](_0x165aa8);};}exports[_0x2571('0x2d')]=function(_0x26af3c,_0x441e7d){var _0x1bf5d1={},_0x2902cb={},_0x5bc2e7={'count':0x0,'rows':[]};var _0x4c4911=_[_0x2571('0x2e')](db[_0x2571('0x2f')][_0x2571('0x30')],function(_0x2b6416){return{'name':_0x2b6416['fieldName'],'type':_0x2b6416[_0x2571('0x31')][_0x2571('0x32')]};});_0x2902cb['model']=_['map'](_0x4c4911,_0x2571('0x2b'));_0x2902cb[_0x2571('0x33')]=_[_0x2571('0x34')](_0x26af3c['query']);_0x2902cb[_0x2571('0x35')]=_[_0x2571('0x36')](_0x2902cb['model'],_0x2902cb[_0x2571('0x33')]);_0x1bf5d1['attributes']=_[_0x2571('0x36')](_0x2902cb[_0x2571('0x37')],qs[_0x2571('0x38')](_0x26af3c['query']['fields']));_0x1bf5d1[_0x2571('0x39')]=_0x1bf5d1['attributes'][_0x2571('0x3a')]?_0x1bf5d1[_0x2571('0x39')]:_0x2902cb[_0x2571('0x37')];if(!_0x26af3c[_0x2571('0x33')]['hasOwnProperty'](_0x2571('0x3b'))){_0x1bf5d1[_0x2571('0x20')]=qs['limit'](_0x26af3c[_0x2571('0x33')][_0x2571('0x20')]);_0x1bf5d1['offset']=qs[_0x2571('0x3c')](_0x26af3c[_0x2571('0x33')][_0x2571('0x3c')]);}_0x1bf5d1[_0x2571('0x3d')]=qs[_0x2571('0x3e')](_0x26af3c[_0x2571('0x33')][_0x2571('0x3e')]);_0x1bf5d1[_0x2571('0x3f')]=qs[_0x2571('0x35')](_[_0x2571('0x40')](_0x26af3c[_0x2571('0x33')],_0x2902cb[_0x2571('0x35')]),_0x4c4911);if(_0x26af3c[_0x2571('0x33')][_0x2571('0x41')]){_0x1bf5d1['where']=_[_0x2571('0x42')](_0x1bf5d1[_0x2571('0x3f')],{'$or':_[_0x2571('0x2e')](_0x4c4911,function(_0x440752){if(_0x440752[_0x2571('0x31')]!==_0x2571('0x43')){var _0x35deff={};_0x35deff[_0x440752['name']]={'$like':'%'+_0x26af3c[_0x2571('0x33')][_0x2571('0x41')]+'%'};return _0x35deff;}})});}_0x1bf5d1=_[_0x2571('0x42')]({},_0x1bf5d1,_0x26af3c['options']);var _0x5fe079={'where':_0x1bf5d1[_0x2571('0x3f')]};return db[_0x2571('0x2f')]['count'](_0x5fe079)[_0x2571('0x25')](function(_0x1c6ccd){_0x5bc2e7[_0x2571('0x1f')]=_0x1c6ccd;if(_0x26af3c[_0x2571('0x33')][_0x2571('0x44')]){_0x1bf5d1[_0x2571('0x45')]=[{'all':!![]}];}return db[_0x2571('0x2f')][_0x2571('0x46')](_0x1bf5d1);})[_0x2571('0x25')](function(_0x5d2734){_0x5bc2e7[_0x2571('0x47')]=_0x5d2734;return _0x5bc2e7;})[_0x2571('0x25')](respondWithFilteredResult(_0x441e7d,_0x1bf5d1))[_0x2571('0x48')](handleError(_0x441e7d,null));};exports[_0x2571('0x49')]=function(_0x2411d9,_0x1e6f2c){var _0x391c01={'raw':![],'where':{'id':_0x2411d9['params']['id']}},_0x2d024c={};_0x2d024c['model']=_['keys'](db['VoiceChanSpy']['rawAttributes']);_0x2d024c['query']=_[_0x2571('0x34')](_0x2411d9[_0x2571('0x33')]);_0x2d024c['filters']=_[_0x2571('0x36')](_0x2d024c[_0x2571('0x37')],_0x2d024c[_0x2571('0x33')]);_0x391c01[_0x2571('0x39')]=_[_0x2571('0x36')](_0x2d024c['model'],qs['fields'](_0x2411d9['query'][_0x2571('0x38')]));_0x391c01[_0x2571('0x39')]=_0x391c01[_0x2571('0x39')][_0x2571('0x3a')]?_0x391c01[_0x2571('0x39')]:_0x2d024c[_0x2571('0x37')];if(_0x2411d9[_0x2571('0x33')]['includeAll']){_0x391c01[_0x2571('0x45')]=[{'all':!![]}];}_0x391c01=_[_0x2571('0x42')]({},_0x391c01,_0x2411d9[_0x2571('0x4a')]);return db['VoiceChanSpy'][_0x2571('0x4b')](_0x391c01)[_0x2571('0x25')](handleEntityNotFound(_0x1e6f2c,null))[_0x2571('0x25')](respondWithResult(_0x1e6f2c,null))[_0x2571('0x48')](handleError(_0x1e6f2c,null));};exports['create']=function(_0x18291c,_0x245edb){return db[_0x2571('0x2f')][_0x2571('0x4c')](_0x18291c['body'],{})[_0x2571('0x25')](function(_0xef8f21){var _0x10d956=_0x18291c[_0x2571('0x4d')][_0x2571('0x4e')]({'plain':!![]});if(!_0x10d956)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x10d956[_0x2571('0x4f')]===_0x2571('0x4d')){var _0x20302b=_0xef8f21[_0x2571('0x4e')]({'plain':!![]});var _0x6a55ff=_0x2571('0x27');return db['UserProfileSection']['find']({'where':{'name':_0x6a55ff,'userProfileId':_0x10d956[_0x2571('0x50')]},'raw':!![]})['then'](function(_0x47ff18){if(_0x47ff18&&_0x47ff18[_0x2571('0x51')]===0x0){return db[_0x2571('0x28')][_0x2571('0x4c')]({'name':_0x20302b[_0x2571('0x2b')],'resourceId':_0x20302b['id'],'type':_0x47ff18[_0x2571('0x2b')],'sectionId':_0x47ff18['id']},{})[_0x2571('0x25')](function(){return _0xef8f21;});}else{return _0xef8f21;}})[_0x2571('0x48')](function(_0x3c890a){logger[_0x2571('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3c890a);throw _0x3c890a;});}return _0xef8f21;})[_0x2571('0x25')](respondWithResult(_0x245edb,0xc9))[_0x2571('0x48')](handleError(_0x245edb,null));};exports[_0x2571('0x52')]=function(_0x495c45,_0x3823c9){if(_0x495c45['body']['id']){delete _0x495c45[_0x2571('0x53')]['id'];}return db[_0x2571('0x2f')][_0x2571('0x4b')]({'where':{'id':_0x495c45['params']['id']}})['then'](handleEntityNotFound(_0x3823c9,null))['then'](saveUpdates(_0x495c45['body'],null))[_0x2571('0x25')](respondWithResult(_0x3823c9,null))[_0x2571('0x48')](handleError(_0x3823c9,null));};exports[_0x2571('0x26')]=function(_0x3ce2b9,_0x333b91){return db[_0x2571('0x2f')][_0x2571('0x4b')]({'where':{'id':_0x3ce2b9[_0x2571('0x54')]['id']}})[_0x2571('0x25')](handleEntityNotFound(_0x333b91,null))[_0x2571('0x25')](removeEntity(_0x333b91,null))[_0x2571('0x48')](handleError(_0x333b91,null));}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.model.js b/server/api/voiceChanSpy/voiceChanSpy.model.js index 4c1d33d..b3d5477 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 _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 +var _0xef66=['catch','exports','models','define','voice_chanspy','length','VoiceExtension','destroy','bulkCreate','util','bluebird','./voiceChanSpy.attributes','from-sip','format','prefix','system','push','merge','Set','CDR(type)=%s','chanspy','record','MixMonitor','${UNIQUEID}.%s,a','recordingFormat','auth','Authenticate','password','ChanSpy','SIP/%s,%s','name','options','concat','internal','findAll','agent','then'];(function(_0x2571ae,_0x2040ad){var _0x25ba8b=function(_0x193782){while(--_0x193782){_0x2571ae['push'](_0x2571ae['shift']());}};_0x25ba8b(++_0x2040ad);}(_0xef66,0x78));var _0x6ef6=function(_0x45f2b2,_0x4cb738){_0x45f2b2=_0x45f2b2-0x0;var _0x1ddafb=_0xef66[_0x45f2b2];return _0x1ddafb;};'use strict';var _=require('lodash');var util=require(_0x6ef6('0x0'));var BPromise=require(_0x6ef6('0x1'));var attributes=require(_0x6ef6('0x2'));var getUserApplications=function(_0x24fa07,_0x49c1d7,_0x1e4047){var _0x66a4b7=0x1;var _0x3745bd=[];var _0x4ff8a9={'context':_0x49c1d7['context']||_0x6ef6('0x3'),'exten':util[_0x6ef6('0x4')]('%s%s',_0x24fa07[_0x6ef6('0x5')],_0x1e4047),'type':_0x6ef6('0x6'),'isApp':![],'ChanSpyId':_0x24fa07['id'],'UserId':_0x49c1d7['id']};_0x3745bd[_0x6ef6('0x7')](_[_0x6ef6('0x8')]({'app':_0x6ef6('0x9'),'appdata':util[_0x6ef6('0x4')](_0x6ef6('0xa'),_0x6ef6('0xb')),'priority':_0x66a4b7++},_0x4ff8a9));if(_0x24fa07[_0x6ef6('0xc')]){_0x3745bd[_0x6ef6('0x7')](_['merge']({'app':_0x6ef6('0xd'),'appdata':util[_0x6ef6('0x4')](_0x6ef6('0xe'),_0x24fa07[_0x6ef6('0xf')]),'priority':_0x66a4b7++},_0x4ff8a9));}if(_0x24fa07[_0x6ef6('0x10')]){_0x3745bd['push'](_['merge']({'app':_0x6ef6('0x11'),'appdata':_0x24fa07[_0x6ef6('0x12')],'priority':_0x66a4b7++},_0x4ff8a9));}_0x3745bd['push'](_['merge']({'app':_0x6ef6('0x13'),'appdata':util[_0x6ef6('0x4')](_0x6ef6('0x14'),_0x49c1d7[_0x6ef6('0x15')],_0x24fa07[_0x6ef6('0x16')]?_0x24fa07['options']['join'](''):''),'priority':_0x66a4b7++},_0x4ff8a9));if(_0x24fa07[_0x6ef6('0xc')]){_0x3745bd[_0x6ef6('0x7')](_[_0x6ef6('0x8')]({'app':'StopMixMonitor','priority':_0x66a4b7++},_0x4ff8a9));}return _0x3745bd;};var getChanSpyApplications=function(_0x2f6410,_0x3d730d){var _0x406381=[];for(var _0x4de0b1=0x0,_0x7c9fc3=0x1;_0x4de0b1<_0x3d730d['length'];_0x4de0b1++,_0x7c9fc3=0x1){_0x406381=_0x406381[_0x6ef6('0x17')](getUserApplications(_0x2f6410,_0x3d730d[_0x4de0b1],_0x3d730d[_0x4de0b1]['internal']));if(_0x3d730d[_0x4de0b1][_0x6ef6('0x18')]!=_0x3d730d[_0x4de0b1][_0x6ef6('0x15')]){_0x406381=_0x406381['concat'](getUserApplications(_0x2f6410,_0x3d730d[_0x4de0b1],_0x3d730d[_0x4de0b1][_0x6ef6('0x15')]));}}return _0x406381;};var getChanSpyPromise=function(_0x283190,_0x1d76c9){return new BPromise(function(_0x5ea895,_0x2cfed0){return _0x283190['User'][_0x6ef6('0x19')]({'attributes':['id',_0x6ef6('0x15'),_0x6ef6('0x18')],'where':{'role':_0x6ef6('0x1a'),'chanspy':!![]},'raw':!![]})[_0x6ef6('0x1b')](function(_0x26c8a4){if(_0x26c8a4){return _0x5ea895(getChanSpyApplications(_0x1d76c9,_0x26c8a4));}return _0x5ea895([]);})[_0x6ef6('0x1c')](function(_0x31b1be){_0x2cfed0(_0x31b1be);});});};module[_0x6ef6('0x1d')]=function(_0xf2628f,_0xbd3ee8){var _0x53bd0b=_0xf2628f[_0x6ef6('0x1e')];return _0xf2628f[_0x6ef6('0x1f')]('VoiceChanSpy',attributes,{'tableName':_0x6ef6('0x20'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1358e2,_0x4167af,_0xeec965){return getChanSpyPromise(_0x53bd0b,_0x1358e2)[_0x6ef6('0x1b')](function(_0x58b438){if(_0x58b438&&_0x58b438[_0x6ef6('0x21')]){return _0x53bd0b[_0x6ef6('0x22')]['bulkCreate'](_0x58b438);}})[_0x6ef6('0x1b')](function(){_0xeec965();})[_0x6ef6('0x1c')](function(_0x1f8c69){_0xeec965(_0x1f8c69);});},'afterUpdate':function(_0x4cdc43,_0x5914c0,_0x2179ed){return _0x53bd0b[_0x6ef6('0x22')][_0x6ef6('0x23')]({'where':{'ChanSpyId':_0x4cdc43['id']}})[_0x6ef6('0x1b')](function(){return getChanSpyPromise(_0x53bd0b,_0x4cdc43);})[_0x6ef6('0x1b')](function(_0xb76410){if(_0xb76410&&_0xb76410['length']){return _0x53bd0b[_0x6ef6('0x22')][_0x6ef6('0x24')](_0xb76410);}})[_0x6ef6('0x1b')](function(){_0x2179ed();})[_0x6ef6('0x1c')](function(_0x47267f){_0x2179ed(_0x47267f);});},'afterDestroy':function(_0x3c7505,_0x83e598,_0x231dab){return _0x53bd0b[_0x6ef6('0x22')][_0x6ef6('0x23')]({'where':{'ChanSpyId':_0x3c7505['id']}})['then'](function(){_0x231dab();})[_0x6ef6('0x1c')](function(_0x2a8555){_0x231dab(_0x2a8555);});}}});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.rpc.js b/server/api/voiceChanSpy/voiceChanSpy.rpc.js index 9faab74..d9dc225 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 _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 +var _0x5ec6=['VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','../../config/environment','client','http','request','then','VoiceChanSpy,\x20%s,\x20%s','debug'];(function(_0x11433e,_0x2c4208){var _0x150c93=function(_0x498a52){while(--_0x498a52){_0x11433e['push'](_0x11433e['shift']());}};_0x150c93(++_0x2c4208);}(_0x5ec6,0x7f));var _0x65ec=function(_0x34cbcd,_0xc54bfd){_0x34cbcd=_0x34cbcd-0x0;var _0x152436=_0x5ec6[_0x34cbcd];return _0x152436;};'use strict';var _=require(_0x65ec('0x0'));var util=require(_0x65ec('0x1'));var moment=require(_0x65ec('0x2'));var BPromise=require('bluebird');var rs=require(_0x65ec('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x65ec('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x65ec('0x5'))('rpc');var config=require(_0x65ec('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x65ec('0x7')][_0x65ec('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5d6254,_0xb3600b,_0x266254){return new BPromise(function(_0x4f8653,_0x28aa8f){return client[_0x65ec('0x9')](_0x5d6254,_0x266254)[_0x65ec('0xa')](function(_0x50e5c4){logger['info'](_0x65ec('0xb'),_0xb3600b,'request\x20sent');logger[_0x65ec('0xc')](_0x65ec('0xd'),_0xb3600b,'request\x20sent',JSON[_0x65ec('0xe')](_0x50e5c4));if(_0x50e5c4[_0x65ec('0xf')]){if(_0x50e5c4['error'][_0x65ec('0x10')]===0x1f4){logger[_0x65ec('0xf')]('VoiceChanSpy,\x20%s,\x20%s',_0xb3600b,_0x50e5c4[_0x65ec('0xf')][_0x65ec('0x11')]);return _0x28aa8f(_0x50e5c4[_0x65ec('0xf')][_0x65ec('0x11')]);}logger[_0x65ec('0xf')](_0x65ec('0xb'),_0xb3600b,_0x50e5c4[_0x65ec('0xf')][_0x65ec('0x11')]);return _0x4f8653(_0x50e5c4['error'][_0x65ec('0x11')]);}else{logger[_0x65ec('0x12')](_0x65ec('0xb'),_0xb3600b,'request\x20sent');_0x4f8653(_0x50e5c4['result'][_0x65ec('0x11')]);}})[_0x65ec('0x13')](function(_0xa597d4){logger['error'](_0x65ec('0xb'),_0xb3600b,_0xa597d4);_0x28aa8f(_0xa597d4);});});} \ No newline at end of file diff --git a/server/api/voiceContext/index.js b/server/api/voiceContext/index.js index 3aedbcc..a1abaa4 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 _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 +var _0xa230=['path','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','index','isAuthenticated','show','post','put','/:id','update','delete','destroy','exports','multer','util'];(function(_0x45e98e,_0x169b60){var _0x374dba=function(_0x597612){while(--_0x597612){_0x45e98e['push'](_0x45e98e['shift']());}};_0x374dba(++_0x169b60);}(_0xa230,0xe2));var _0x0a23=function(_0xd728be,_0x25d8e8){_0xd728be=_0xd728be-0x0;var _0x597cd1=_0xa230[_0xd728be];return _0x597cd1;};'use strict';var multer=require(_0x0a23('0x0'));var util=require(_0x0a23('0x1'));var path=require(_0x0a23('0x2'));var timeout=require('connect-timeout');var express=require(_0x0a23('0x3'));var router=express[_0x0a23('0x4')]();var fs_extra=require(_0x0a23('0x5'));var auth=require(_0x0a23('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0a23('0x7'));var controller=require('./voiceContext.controller');router[_0x0a23('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a23('0x9')]);router['get']('/:id',auth[_0x0a23('0xa')](),controller[_0x0a23('0xb')]);router[_0x0a23('0xc')]('/',auth[_0x0a23('0xa')](),controller['create']);router[_0x0a23('0xd')](_0x0a23('0xe'),auth[_0x0a23('0xa')](),controller[_0x0a23('0xf')]);router[_0x0a23('0x10')]('/:id',auth[_0x0a23('0xa')](),controller[_0x0a23('0x11')]);module[_0x0a23('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.attributes.js b/server/api/voiceContext/voiceContext.attributes.js index 5a2ff50..95e57ca 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 _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 +var _0x4ef9=['BOOLEAN','sequelize','exports','name','STRING'];(function(_0x37a3a1,_0x1e9cb5){var _0x3cc96f=function(_0x56462d){while(--_0x56462d){_0x37a3a1['push'](_0x37a3a1['shift']());}};_0x3cc96f(++_0x1e9cb5);}(_0x4ef9,0x1af));var _0x94ef=function(_0x2b7868,_0x3c7807){_0x2b7868=_0x2b7868-0x0;var _0x1d66f3=_0x4ef9[_0x2b7868];return _0x1d66f3;};'use strict';var Sequelize=require(_0x94ef('0x0'));module[_0x94ef('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x94ef('0x2')},'description':{'type':Sequelize[_0x94ef('0x3')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0x94ef('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 eb1d3c9..45d333c 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 _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 +var _0x19e7=['get','UserProfileResource','name','send','map','VoiceContext','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','include','findAll','rows','show','length','includeAll','create','readFileSync','join','server/files/templates/context.ejs','utf8','render','writeFileSync','Reload','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','body','root','/etc/asterisk/extensions_xcally_contexts.conf','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','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','jayson/promise','client','request','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','update','then','destroy'];(function(_0x469825,_0x17a77d){var _0x1615e8=function(_0xa339e8){while(--_0xa339e8){_0x469825['push'](_0x469825['shift']());}};_0x1615e8(++_0x17a77d);}(_0x19e7,0x167));var _0x719e=function(_0x4f70f8,_0x88d889){_0x4f70f8=_0x4f70f8-0x0;var _0x28164f=_0x19e7[_0x4f70f8];return _0x28164f;};'use strict';var emlformat=require(_0x719e('0x0'));var rimraf=require(_0x719e('0x1'));var zipdir=require(_0x719e('0x2'));var jsonpatch=require(_0x719e('0x3'));var rp=require(_0x719e('0x4'));var moment=require(_0x719e('0x5'));var BPromise=require(_0x719e('0x6'));var Mustache=require('mustache');var util=require(_0x719e('0x7'));var path=require(_0x719e('0x8'));var sox=require('sox');var csv=require(_0x719e('0x9'));var ejs=require(_0x719e('0xa'));var fs=require('fs');var fs_extra=require(_0x719e('0xb'));var _=require(_0x719e('0xc'));var squel=require(_0x719e('0xd'));var crypto=require(_0x719e('0xe'));var jsforce=require(_0x719e('0xf'));var deskjs=require(_0x719e('0x10'));var toCsv=require(_0x719e('0x9'));var querystring=require(_0x719e('0x11'));var Papa=require(_0x719e('0x12'));var Redis=require(_0x719e('0x13'));var authService=require(_0x719e('0x14'));var qs=require(_0x719e('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x719e('0x16'));var logger=require(_0x719e('0x17'))(_0x719e('0x18'));var utils=require(_0x719e('0x19'));var config=require(_0x719e('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x719e('0x1b'))['db'];var jayson=require(_0x719e('0x1c'));var client=jayson[_0x719e('0x1d')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4257ac,_0x1c1189,_0x1217e5,_0x519e9f){return new BPromise(function(_0x2dc13b,_0x411a93){var _0x2f1a5f=_0x519e9f||client;return _0x2f1a5f[_0x719e('0x1e')](_0x4257ac,_0x1217e5)['then'](function(_0x2b17f8){logger[_0x719e('0x1f')](_0x719e('0x20'),_0x1c1189,_0x719e('0x21'));logger[_0x719e('0x22')](_0x719e('0x23'),_0x1c1189,_0x719e('0x21'),JSON['stringify'](_0x2b17f8));if(_0x2b17f8['error']){if(_0x2b17f8[_0x719e('0x24')][_0x719e('0x25')]===0x1f4){logger[_0x719e('0x24')](_0x719e('0x20'),_0x1c1189,_0x2b17f8[_0x719e('0x24')]['message']);return _0x411a93(_0x2b17f8[_0x719e('0x24')][_0x719e('0x26')]);}logger['error']('VoiceContext,\x20%s,\x20%s',_0x1c1189,_0x2b17f8[_0x719e('0x24')][_0x719e('0x26')]);return _0x2dc13b(_0x2b17f8[_0x719e('0x24')][_0x719e('0x26')]);}else{logger[_0x719e('0x1f')](_0x719e('0x20'),_0x1c1189,_0x719e('0x21'));_0x2dc13b(_0x2b17f8[_0x719e('0x27')][_0x719e('0x26')]);}})[_0x719e('0x28')](function(_0x54f67b){logger['error']('VoiceContext,\x20%s,\x20%s',_0x1c1189,_0x54f67b);_0x411a93(_0x54f67b);});});}function respondWithStatusCode(_0x171667,_0x4312f9){_0x4312f9=_0x4312f9||0xcc;return function(_0x2e2fad){if(_0x2e2fad){return _0x171667[_0x719e('0x29')](_0x4312f9);}return _0x171667[_0x719e('0x2a')](_0x4312f9)[_0x719e('0x2b')]();};}function respondWithResult(_0x3ff95e,_0x31edd2){_0x31edd2=_0x31edd2||0xc8;return function(_0x38df7b){if(_0x38df7b){return _0x3ff95e[_0x719e('0x2a')](_0x31edd2)[_0x719e('0x2c')](_0x38df7b);}};}function respondWithFilteredResult(_0x123e60,_0x3c7b5e){return function(_0x5083b8){if(_0x5083b8){var _0x84af34=typeof _0x3c7b5e[_0x719e('0x2d')]==='undefined'&&typeof _0x3c7b5e['limit']===_0x719e('0x2e');var _0x69add5=_0x5083b8['count'];var _0x24fccf=_0x84af34?0x0:_0x3c7b5e['offset'];var _0x56781f=_0x84af34?_0x5083b8[_0x719e('0x2f')]:_0x3c7b5e[_0x719e('0x2d')]+_0x3c7b5e[_0x719e('0x30')];var _0x476f6a;if(_0x56781f>=_0x69add5){_0x56781f=_0x69add5;_0x476f6a=0xc8;}else{_0x476f6a=0xce;}_0x123e60[_0x719e('0x2a')](_0x476f6a);return _0x123e60['set'](_0x719e('0x31'),_0x24fccf+'-'+_0x56781f+'/'+_0x69add5)[_0x719e('0x2c')](_0x5083b8);}return null;};}function patchUpdates(_0x454432){return function(_0x13c974){try{jsonpatch['apply'](_0x13c974,_0x454432,!![]);}catch(_0x47e23a){return BPromise['reject'](_0x47e23a);}return _0x13c974['save']();};}function saveUpdates(_0x13f5c0,_0x32be35){return function(_0x439915){if(_0x439915){return _0x439915[_0x719e('0x32')](_0x13f5c0)[_0x719e('0x33')](function(_0x4bbcb){return _0x4bbcb;});}return null;};}function removeEntity(_0x4b3a56,_0x21b0c4){return function(_0x19569c){if(_0x19569c){return _0x19569c[_0x719e('0x34')]()[_0x719e('0x33')](function(){var _0x3922cf=_0x19569c[_0x719e('0x35')]({'plain':!![]});var _0x3f3846='Contexts';return db[_0x719e('0x36')][_0x719e('0x34')]({'where':{'type':_0x3f3846,'resourceId':_0x3922cf['id']}})[_0x719e('0x33')](function(){return _0x19569c;});})[_0x719e('0x33')](function(){_0x4b3a56[_0x719e('0x2a')](0xcc)[_0x719e('0x2b')]();});}};}function handleEntityNotFound(_0x265c9f,_0x25bfeb){return function(_0x3fdbba){if(!_0x3fdbba){_0x265c9f[_0x719e('0x29')](0x194);}return _0x3fdbba;};}function handleError(_0x4cc32a,_0x4b8d11){_0x4b8d11=_0x4b8d11||0x1f4;return function(_0x4ddbf3){logger[_0x719e('0x24')](_0x4ddbf3['stack']);if(_0x4ddbf3[_0x719e('0x37')]){delete _0x4ddbf3['name'];}_0x4cc32a[_0x719e('0x2a')](_0x4b8d11)[_0x719e('0x38')](_0x4ddbf3);};}exports['index']=function(_0x2f3ea3,_0x4b72e0){var _0x3287a5={},_0x446981={},_0x572081={'count':0x0,'rows':[]};var _0x4ebffc=_[_0x719e('0x39')](db[_0x719e('0x3a')][_0x719e('0x3b')],function(_0x46ff22){return{'name':_0x46ff22['fieldName'],'type':_0x46ff22['type'][_0x719e('0x3c')]};});_0x446981[_0x719e('0x3d')]=_['map'](_0x4ebffc,'name');_0x446981[_0x719e('0x3e')]=_[_0x719e('0x3f')](_0x2f3ea3['query']);_0x446981[_0x719e('0x40')]=_[_0x719e('0x41')](_0x446981[_0x719e('0x3d')],_0x446981[_0x719e('0x3e')]);_0x3287a5[_0x719e('0x42')]=_[_0x719e('0x41')](_0x446981['model'],qs[_0x719e('0x43')](_0x2f3ea3['query'][_0x719e('0x43')]));_0x3287a5[_0x719e('0x42')]=_0x3287a5[_0x719e('0x42')]['length']?_0x3287a5[_0x719e('0x42')]:_0x446981[_0x719e('0x3d')];if(!_0x2f3ea3[_0x719e('0x3e')][_0x719e('0x44')](_0x719e('0x45'))){_0x3287a5['limit']=qs[_0x719e('0x30')](_0x2f3ea3['query']['limit']);_0x3287a5[_0x719e('0x2d')]=qs[_0x719e('0x2d')](_0x2f3ea3[_0x719e('0x3e')][_0x719e('0x2d')]);}_0x3287a5[_0x719e('0x46')]=qs[_0x719e('0x47')](_0x2f3ea3[_0x719e('0x3e')][_0x719e('0x47')]);_0x3287a5[_0x719e('0x48')]=qs[_0x719e('0x40')](_['pick'](_0x2f3ea3[_0x719e('0x3e')],_0x446981[_0x719e('0x40')]),_0x4ebffc);if(_0x2f3ea3['query'][_0x719e('0x49')]){_0x3287a5['where']=_[_0x719e('0x4a')](_0x3287a5['where'],{'$or':_[_0x719e('0x39')](_0x4ebffc,function(_0x450afc){if(_0x450afc['type']!==_0x719e('0x4b')){var _0x154b97={};_0x154b97[_0x450afc[_0x719e('0x37')]]={'$like':'%'+_0x2f3ea3[_0x719e('0x3e')][_0x719e('0x49')]+'%'};return _0x154b97;}})});}_0x3287a5=_[_0x719e('0x4a')]({},_0x3287a5,_0x2f3ea3[_0x719e('0x4c')]);var _0x3f2798={'where':_0x3287a5[_0x719e('0x48')]};return db[_0x719e('0x3a')]['count'](_0x3f2798)[_0x719e('0x33')](function(_0x5735b1){_0x572081[_0x719e('0x2f')]=_0x5735b1;if(_0x2f3ea3[_0x719e('0x3e')]['includeAll']){_0x3287a5[_0x719e('0x4d')]=[{'all':!![]}];}return db[_0x719e('0x3a')][_0x719e('0x4e')](_0x3287a5);})[_0x719e('0x33')](function(_0xff790a){_0x572081[_0x719e('0x4f')]=_0xff790a;return _0x572081;})[_0x719e('0x33')](respondWithFilteredResult(_0x4b72e0,_0x3287a5))[_0x719e('0x28')](handleError(_0x4b72e0,null));};exports[_0x719e('0x50')]=function(_0x2e650b,_0x59ba5d){var _0x40411a={'raw':![],'where':{'id':_0x2e650b['params']['id']}},_0x1b7025={};_0x1b7025[_0x719e('0x3d')]=_[_0x719e('0x3f')](db[_0x719e('0x3a')]['rawAttributes']);_0x1b7025['query']=_[_0x719e('0x3f')](_0x2e650b['query']);_0x1b7025[_0x719e('0x40')]=_[_0x719e('0x41')](_0x1b7025['model'],_0x1b7025[_0x719e('0x3e')]);_0x40411a[_0x719e('0x42')]=_[_0x719e('0x41')](_0x1b7025[_0x719e('0x3d')],qs[_0x719e('0x43')](_0x2e650b[_0x719e('0x3e')][_0x719e('0x43')]));_0x40411a[_0x719e('0x42')]=_0x40411a[_0x719e('0x42')][_0x719e('0x51')]?_0x40411a[_0x719e('0x42')]:_0x1b7025['model'];if(_0x2e650b['query'][_0x719e('0x52')]){_0x40411a[_0x719e('0x4d')]=[{'all':!![]}];}_0x40411a=_[_0x719e('0x4a')]({},_0x40411a,_0x2e650b[_0x719e('0x4c')]);return db['VoiceContext']['find'](_0x40411a)[_0x719e('0x33')](handleEntityNotFound(_0x59ba5d,null))[_0x719e('0x33')](respondWithResult(_0x59ba5d,null))['catch'](handleError(_0x59ba5d,null));};exports[_0x719e('0x53')]=function(_0xb4ec1,_0x5a7c69,_0xd83632){var _0x4c553f;return db['VoiceContext']['create'](_0xb4ec1['body'],{'raw':!![]})[_0x719e('0x33')](function(_0xa6d3ea){_0x4c553f=_0xa6d3ea;return db[_0x719e('0x3a')][_0x719e('0x4e')]({'raw':!![]});})['then'](function(_0x14b612){var _0x8a96e4=fs[_0x719e('0x54')](path[_0x719e('0x55')](config['root'],_0x719e('0x56')),_0x719e('0x57'));var _0x639ddf=ejs[_0x719e('0x58')](_0x8a96e4,{'contexts':_0x14b612||[]});fs[_0x719e('0x59')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x639ddf);})[_0x719e('0x33')](function(){return respondWithRpcPromise(_0x719e('0x5a'),_0x719e('0x53'),{'module':_0x719e('0x5b')});})[_0x719e('0x33')](function(){var _0x4c9bdb=_0xb4ec1[_0x719e('0x5c')][_0x719e('0x35')]({'plain':!![]});if(!_0x4c9bdb)throw new Error(_0x719e('0x5d'));if(_0x4c9bdb[_0x719e('0x5e')]===_0x719e('0x5c')){var _0x5f1a1d=_0x4c553f[_0x719e('0x35')]({'plain':!![]});return db[_0x719e('0x5f')][_0x719e('0x60')]({'where':{'name':'Contexts','userProfileId':_0x4c9bdb['userProfileId']},'raw':!![]})['then'](function(_0x3c2257){if(_0x3c2257&&_0x3c2257[_0x719e('0x61')]===0x0){return db[_0x719e('0x36')]['create']({'name':_0x5f1a1d[_0x719e('0x37')],'resourceId':_0x5f1a1d['id'],'type':_0x3c2257[_0x719e('0x37')],'sectionId':_0x3c2257['id']},{})[_0x719e('0x33')](function(){return _0x4c553f;});}else{return _0x4c553f;}})['catch'](function(_0x3d3996){logger['error'](_0x719e('0x62'),_0x3d3996);throw _0x3d3996;});}return _0x4c553f;})['then'](respondWithResult(_0x5a7c69,0xc9))[_0x719e('0x28')](handleError(_0x5a7c69,null));};exports[_0x719e('0x32')]=function(_0x538325,_0x3411b9,_0x51e556){var _0x5413c4;return db[_0x719e('0x3a')]['find']({'where':{'id':_0x538325[_0x719e('0x63')]['id']}})[_0x719e('0x33')](handleEntityNotFound(_0x3411b9,null))[_0x719e('0x33')](saveUpdates(_0x538325[_0x719e('0x64')],null))['then'](function(_0x353859){if(_0x353859){_0x5413c4=_0x353859;return db[_0x719e('0x3a')]['findAll']({'raw':!![]});}})[_0x719e('0x33')](function(_0x2735e1){var _0x3c1de4=fs[_0x719e('0x54')](path[_0x719e('0x55')](config[_0x719e('0x65')],_0x719e('0x56')),'utf8');var _0x122b10=ejs[_0x719e('0x58')](_0x3c1de4,{'contexts':_0x2735e1||[]});fs[_0x719e('0x59')](_0x719e('0x66'),_0x122b10);})[_0x719e('0x33')](function(){return respondWithRpcPromise(_0x719e('0x5a'),_0x719e('0x32'),{'module':_0x719e('0x5b')});})[_0x719e('0x33')](function(){return _0x5413c4;})[_0x719e('0x33')](respondWithResult(_0x3411b9,null))['catch'](handleError(_0x3411b9,null));};exports[_0x719e('0x34')]=function(_0x15c1bf,_0x4f3dd3,_0x29d5a0){var _0x27a9ff;return db['VoiceContext'][_0x719e('0x60')]({'where':{'id':_0x15c1bf[_0x719e('0x63')]['id']}})[_0x719e('0x33')](handleEntityNotFound(_0x4f3dd3,null))[_0x719e('0x33')](removeEntity(_0x4f3dd3,null))[_0x719e('0x33')](function(){return db[_0x719e('0x3a')][_0x719e('0x4e')]({'raw':!![]});})[_0x719e('0x33')](function(_0x18126e){var _0x390f95=fs[_0x719e('0x54')](path[_0x719e('0x55')](config[_0x719e('0x65')],'server/files/templates/context.ejs'),_0x719e('0x57'));var _0x15b1ac=ejs['render'](_0x390f95,{'contexts':_0x18126e});fs['writeFileSync'](_0x719e('0x66'),_0x15b1ac);return respondWithRpcPromise('Reload',_0x719e('0x34'),{'module':'chan_sip.so'});})[_0x719e('0x28')](handleError(_0x4f3dd3,null));}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.model.js b/server/api/voiceContext/voiceContext.model.js index 56d259e..5d5b967 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 _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 +var _0x352e=['define','VoiceContext','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./voiceContext.attributes'];(function(_0x3fa85e,_0x43ab1f){var _0x310f42=function(_0x4b736a){while(--_0x4b736a){_0x3fa85e['push'](_0x3fa85e['shift']());}};_0x310f42(++_0x43ab1f);}(_0x352e,0x1a6));var _0xe352=function(_0x44ff26,_0x11da16){_0x44ff26=_0x44ff26-0x0;var _0x5b0a66=_0x352e[_0x44ff26];return _0x5b0a66;};'use strict';var _=require(_0xe352('0x0'));var util=require(_0xe352('0x1'));var logger=require(_0xe352('0x2'))(_0xe352('0x3'));var moment=require(_0xe352('0x4'));var BPromise=require(_0xe352('0x5'));var rp=require(_0xe352('0x6'));var fs=require('fs');var path=require(_0xe352('0x7'));var rimraf=require('rimraf');var config=require(_0xe352('0x8'));var attributes=require(_0xe352('0x9'));module['exports']=function(_0x2fed6a,_0x31aac8){return _0x2fed6a[_0xe352('0xa')](_0xe352('0xb'),attributes,{'tableName':'voice_contexts','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 ff7c4f3..879874e 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 _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 +var _0x62ba=['jayson/promise','client','request','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','error','code','message','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment'];(function(_0x3f4760,_0x823720){var _0x30839d=function(_0x279b18){while(--_0x279b18){_0x3f4760['push'](_0x3f4760['shift']());}};_0x30839d(++_0x823720);}(_0x62ba,0x1cd));var _0xa62b=function(_0x59c855,_0x3f9403){_0x59c855=_0x59c855-0x0;var _0x7c612d=_0x62ba[_0x59c855];return _0x7c612d;};'use strict';var _=require(_0xa62b('0x0'));var util=require('util');var moment=require(_0xa62b('0x1'));var BPromise=require(_0xa62b('0x2'));var rs=require(_0xa62b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa62b('0x4'));var logger=require(_0xa62b('0x5'))('rpc');var config=require(_0xa62b('0x6'));var jayson=require(_0xa62b('0x7'));var client=jayson[_0xa62b('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x152244,_0xfaffb6,_0x8aadd3){return new BPromise(function(_0x1c400b,_0x43fe74){return client[_0xa62b('0x9')](_0x152244,_0x8aadd3)[_0xa62b('0xa')](function(_0x52999a){logger[_0xa62b('0xb')](_0xa62b('0xc'),_0xfaffb6,_0xa62b('0xd'));logger[_0xa62b('0xe')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0xfaffb6,_0xa62b('0xd'),JSON['stringify'](_0x52999a));if(_0x52999a[_0xa62b('0xf')]){if(_0x52999a[_0xa62b('0xf')][_0xa62b('0x10')]===0x1f4){logger['error'](_0xa62b('0xc'),_0xfaffb6,_0x52999a['error'][_0xa62b('0x11')]);return _0x43fe74(_0x52999a['error'][_0xa62b('0x11')]);}logger['error']('VoiceContext,\x20%s,\x20%s',_0xfaffb6,_0x52999a[_0xa62b('0xf')]['message']);return _0x1c400b(_0x52999a[_0xa62b('0xf')][_0xa62b('0x11')]);}else{logger['info'](_0xa62b('0xc'),_0xfaffb6,'request\x20sent');_0x1c400b(_0x52999a['result'][_0xa62b('0x11')]);}})['catch'](function(_0x4b1e2d){logger[_0xa62b('0xf')](_0xa62b('0xc'),_0xfaffb6,_0x4b1e2d);_0x43fe74(_0x4b1e2d);});});} \ No newline at end of file diff --git a/server/api/voiceDialReport/index.js b/server/api/voiceDialReport/index.js index d106512..a927fa3 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 _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 +var _0x6b61=['delete','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','post','create','put','/:id','update'];(function(_0x5ebe35,_0xfd22f2){var _0x464c12=function(_0x18a7d9){while(--_0x18a7d9){_0x5ebe35['push'](_0x5ebe35['shift']());}};_0x464c12(++_0xfd22f2);}(_0x6b61,0x16a));var _0x16b6=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x6b61[_0x19e35c];return _0x3e1fe8;};'use strict';var multer=require(_0x16b6('0x0'));var util=require('util');var path=require(_0x16b6('0x1'));var timeout=require(_0x16b6('0x2'));var express=require(_0x16b6('0x3'));var router=express[_0x16b6('0x4')]();var fs_extra=require(_0x16b6('0x5'));var auth=require(_0x16b6('0x6'));var interaction=require(_0x16b6('0x7'));var config=require(_0x16b6('0x8'));var controller=require('./voiceDialReport.controller');router[_0x16b6('0x9')]('/',auth[_0x16b6('0xa')](),controller['index']);router[_0x16b6('0x9')](_0x16b6('0xb'),auth['isAuthenticated'](),controller[_0x16b6('0xc')]);router[_0x16b6('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x16b6('0xd')]('/',auth['isAuthenticated'](),controller[_0x16b6('0xe')]);router[_0x16b6('0xf')](_0x16b6('0x10'),auth[_0x16b6('0xa')](),controller[_0x16b6('0x11')]);router[_0x16b6('0x12')](_0x16b6('0x10'),auth['isAuthenticated'](),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 8fe1bb9..7777706 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 _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 +var _0xd6d6=['STRING','INTEGER','DATE','called,connect,complete','sequelize','exports'];(function(_0x311909,_0x414bf7){var _0x8d3163=function(_0x226f55){while(--_0x226f55){_0x311909['push'](_0x311909['shift']());}};_0x8d3163(++_0x414bf7);}(_0xd6d6,0xbe));var _0x6d6d=function(_0x3458ab,_0x423a13){_0x3458ab=_0x3458ab-0x0;var _0x782731=_0xd6d6[_0x3458ab];return _0x782731;};'use strict';var Sequelize=require(_0x6d6d('0x0'));module[_0x6d6d('0x1')]={'privilege':{'type':Sequelize[_0x6d6d('0x2')]},'channel':{'type':Sequelize[_0x6d6d('0x2')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0x6d6d('0x2')]},'calleridnum':{'type':Sequelize[_0x6d6d('0x2')]},'calleridname':{'type':Sequelize[_0x6d6d('0x2')]},'connectedlinenum':{'type':Sequelize[_0x6d6d('0x2')]},'connectedlinename':{'type':Sequelize[_0x6d6d('0x2')]},'language':{'type':Sequelize[_0x6d6d('0x2')]},'accountcode':{'type':Sequelize[_0x6d6d('0x2')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x6d6d('0x2')]},'priority':{'type':Sequelize[_0x6d6d('0x3')]},'uniqueid':{'type':Sequelize[_0x6d6d('0x2')]},'linkedid':{'type':Sequelize[_0x6d6d('0x2')]},'destchannel':{'type':Sequelize[_0x6d6d('0x2')]},'destchannelstate':{'type':Sequelize[_0x6d6d('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0x6d6d('0x2')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x6d6d('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x6d6d('0x2')]},'destlanguage':{'type':Sequelize[_0x6d6d('0x2')]},'destaccountcode':{'type':Sequelize[_0x6d6d('0x2')]},'destcontext':{'type':Sequelize[_0x6d6d('0x2')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0x6d6d('0x3')]},'destuniqueid':{'type':Sequelize[_0x6d6d('0x2')]},'destlinkedid':{'type':Sequelize['STRING']},'dialstring':{'type':Sequelize['STRING']},'dialstatus':{'type':Sequelize[_0x6d6d('0x2')]},'starttime':{'type':Sequelize[_0x6d6d('0x4')]},'answertime':{'type':Sequelize[_0x6d6d('0x4')]},'endtime':{'type':Sequelize[_0x6d6d('0x4')]},'lastevent':{'type':Sequelize[_0x6d6d('0x2')],'comment':_0x6d6d('0x5')},'routeId':{'type':Sequelize[_0x6d6d('0x3')]},'duration':{'type':Sequelize[_0x6d6d('0x3')]},'holdtime':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0x6d6d('0x3')]}}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.controller.js b/server/api/voiceDialReport/voiceDialReport.controller.js index 10e4752..7de9d17 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 _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 +var _0x8fad=['count','limit','Content-Range','apply','reject','save','destroy','then','error','stack','name','send','index','map','VoiceDialReport','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','findAll','rows','catch','include','find','create','body','update','params','describe','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','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','end','json','offset','undefined'];(function(_0x3afe18,_0x26922c){var _0x19ed1f=function(_0x1c0660){while(--_0x1c0660){_0x3afe18['push'](_0x3afe18['shift']());}};_0x19ed1f(++_0x26922c);}(_0x8fad,0x80));var _0xd8fa=function(_0x355527,_0x3b01c7){_0x355527=_0x355527-0x0;var _0x365236=_0x8fad[_0x355527];return _0x365236;};'use strict';var emlformat=require(_0xd8fa('0x0'));var rimraf=require(_0xd8fa('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd8fa('0x2'));var moment=require(_0xd8fa('0x3'));var BPromise=require(_0xd8fa('0x4'));var Mustache=require(_0xd8fa('0x5'));var util=require(_0xd8fa('0x6'));var path=require(_0xd8fa('0x7'));var sox=require(_0xd8fa('0x8'));var csv=require(_0xd8fa('0x9'));var ejs=require(_0xd8fa('0xa'));var fs=require('fs');var fs_extra=require(_0xd8fa('0xb'));var _=require(_0xd8fa('0xc'));var squel=require(_0xd8fa('0xd'));var crypto=require(_0xd8fa('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xd8fa('0xf'));var toCsv=require(_0xd8fa('0x9'));var querystring=require(_0xd8fa('0x10'));var Papa=require(_0xd8fa('0x11'));var Redis=require(_0xd8fa('0x12'));var authService=require(_0xd8fa('0x13'));var qs=require(_0xd8fa('0x14'));var as=require(_0xd8fa('0x15'));var hardwareService=require(_0xd8fa('0x16'));var logger=require('../../config/logger')(_0xd8fa('0x17'));var utils=require(_0xd8fa('0x18'));var config=require(_0xd8fa('0x19'));var licenseUtil=require(_0xd8fa('0x1a'));var db=require(_0xd8fa('0x1b'))['db'];function respondWithStatusCode(_0x403c21,_0x2f6dab){_0x2f6dab=_0x2f6dab||0xcc;return function(_0x411bc3){if(_0x411bc3){return _0x403c21[_0xd8fa('0x1c')](_0x2f6dab);}return _0x403c21[_0xd8fa('0x1d')](_0x2f6dab)[_0xd8fa('0x1e')]();};}function respondWithResult(_0x58523f,_0x40f406){_0x40f406=_0x40f406||0xc8;return function(_0x3b0797){if(_0x3b0797){return _0x58523f[_0xd8fa('0x1d')](_0x40f406)[_0xd8fa('0x1f')](_0x3b0797);}};}function respondWithFilteredResult(_0x2b47da,_0x3172a7){return function(_0x5f43c6){if(_0x5f43c6){var _0x45922b=typeof _0x3172a7[_0xd8fa('0x20')]===_0xd8fa('0x21')&&typeof _0x3172a7['limit']===_0xd8fa('0x21');var _0x28328c=_0x5f43c6[_0xd8fa('0x22')];var _0x4bf1cd=_0x45922b?0x0:_0x3172a7['offset'];var _0x13a145=_0x45922b?_0x5f43c6['count']:_0x3172a7[_0xd8fa('0x20')]+_0x3172a7[_0xd8fa('0x23')];var _0x314f0a;if(_0x13a145>=_0x28328c){_0x13a145=_0x28328c;_0x314f0a=0xc8;}else{_0x314f0a=0xce;}_0x2b47da[_0xd8fa('0x1d')](_0x314f0a);return _0x2b47da['set'](_0xd8fa('0x24'),_0x4bf1cd+'-'+_0x13a145+'/'+_0x28328c)[_0xd8fa('0x1f')](_0x5f43c6);}return null;};}function patchUpdates(_0x1453b6){return function(_0x4509af){try{jsonpatch[_0xd8fa('0x25')](_0x4509af,_0x1453b6,!![]);}catch(_0x4ebd0d){return BPromise[_0xd8fa('0x26')](_0x4ebd0d);}return _0x4509af[_0xd8fa('0x27')]();};}function saveUpdates(_0x191586,_0x58a71b){return function(_0xa2c1aa){if(_0xa2c1aa){return _0xa2c1aa['update'](_0x191586)['then'](function(_0x267da4){return _0x267da4;});}return null;};}function removeEntity(_0x5c9c78,_0x3b25b4){return function(_0x56961e){if(_0x56961e){return _0x56961e[_0xd8fa('0x28')]()[_0xd8fa('0x29')](function(){_0x5c9c78[_0xd8fa('0x1d')](0xcc)[_0xd8fa('0x1e')]();});}};}function handleEntityNotFound(_0x19b948,_0x37e536){return function(_0x98f631){if(!_0x98f631){_0x19b948[_0xd8fa('0x1c')](0x194);}return _0x98f631;};}function handleError(_0x1208e9,_0x4dcf88){_0x4dcf88=_0x4dcf88||0x1f4;return function(_0x34954c){logger[_0xd8fa('0x2a')](_0x34954c[_0xd8fa('0x2b')]);if(_0x34954c[_0xd8fa('0x2c')]){delete _0x34954c[_0xd8fa('0x2c')];}_0x1208e9['status'](_0x4dcf88)[_0xd8fa('0x2d')](_0x34954c);};}exports[_0xd8fa('0x2e')]=function(_0x2e791d,_0xf25dc7){var _0x45dc2d={},_0x3b49de={},_0x286dda={'count':0x0,'rows':[]};var _0x22b939=_[_0xd8fa('0x2f')](db[_0xd8fa('0x30')][_0xd8fa('0x31')],function(_0x786af9){return{'name':_0x786af9[_0xd8fa('0x32')],'type':_0x786af9[_0xd8fa('0x33')][_0xd8fa('0x34')]};});_0x3b49de['model']=_['map'](_0x22b939,_0xd8fa('0x2c'));_0x3b49de[_0xd8fa('0x35')]=_[_0xd8fa('0x36')](_0x2e791d['query']);_0x3b49de[_0xd8fa('0x37')]=_[_0xd8fa('0x38')](_0x3b49de['model'],_0x3b49de[_0xd8fa('0x35')]);_0x45dc2d[_0xd8fa('0x39')]=_['intersection'](_0x3b49de[_0xd8fa('0x3a')],qs[_0xd8fa('0x3b')](_0x2e791d[_0xd8fa('0x35')][_0xd8fa('0x3b')]));_0x45dc2d[_0xd8fa('0x39')]=_0x45dc2d['attributes'][_0xd8fa('0x3c')]?_0x45dc2d[_0xd8fa('0x39')]:_0x3b49de[_0xd8fa('0x3a')];if(!_0x2e791d[_0xd8fa('0x35')][_0xd8fa('0x3d')](_0xd8fa('0x3e'))){_0x45dc2d[_0xd8fa('0x23')]=qs['limit'](_0x2e791d['query'][_0xd8fa('0x23')]);_0x45dc2d[_0xd8fa('0x20')]=qs[_0xd8fa('0x20')](_0x2e791d['query'][_0xd8fa('0x20')]);}_0x45dc2d[_0xd8fa('0x3f')]=qs[_0xd8fa('0x40')](_0x2e791d['query'][_0xd8fa('0x40')]);_0x45dc2d['where']=qs[_0xd8fa('0x37')](_['pick'](_0x2e791d['query'],_0x3b49de[_0xd8fa('0x37')]),_0x22b939);if(_0x2e791d[_0xd8fa('0x35')]['filter']){_0x45dc2d[_0xd8fa('0x41')]=_[_0xd8fa('0x42')](_0x45dc2d[_0xd8fa('0x41')],{'$or':_['map'](_0x22b939,function(_0xb6057a){if(_0xb6057a['type']!==_0xd8fa('0x43')){var _0x5bd2af={};_0x5bd2af[_0xb6057a[_0xd8fa('0x2c')]]={'$like':'%'+_0x2e791d[_0xd8fa('0x35')][_0xd8fa('0x44')]+'%'};return _0x5bd2af;}})});}_0x45dc2d=_[_0xd8fa('0x42')]({},_0x45dc2d,_0x2e791d[_0xd8fa('0x45')]);var _0x2722c9={'where':_0x45dc2d[_0xd8fa('0x41')]};return db['VoiceDialReport'][_0xd8fa('0x22')](_0x2722c9)[_0xd8fa('0x29')](function(_0x46a412){_0x286dda[_0xd8fa('0x22')]=_0x46a412;if(_0x2e791d['query'][_0xd8fa('0x46')]){_0x45dc2d['include']=[{'all':!![]}];}return db[_0xd8fa('0x30')][_0xd8fa('0x47')](_0x45dc2d);})['then'](function(_0x5d6c45){_0x286dda[_0xd8fa('0x48')]=_0x5d6c45;return _0x286dda;})['then'](respondWithFilteredResult(_0xf25dc7,_0x45dc2d))[_0xd8fa('0x49')](handleError(_0xf25dc7,null));};exports['show']=function(_0x177cbf,_0x12d08c){var _0x21c478={'raw':!![],'where':{'id':_0x177cbf['params']['id']}},_0x2572d0={};_0x2572d0[_0xd8fa('0x3a')]=_['keys'](db['VoiceDialReport'][_0xd8fa('0x31')]);_0x2572d0['query']=_['keys'](_0x177cbf[_0xd8fa('0x35')]);_0x2572d0[_0xd8fa('0x37')]=_[_0xd8fa('0x38')](_0x2572d0[_0xd8fa('0x3a')],_0x2572d0[_0xd8fa('0x35')]);_0x21c478[_0xd8fa('0x39')]=_[_0xd8fa('0x38')](_0x2572d0['model'],qs[_0xd8fa('0x3b')](_0x177cbf[_0xd8fa('0x35')][_0xd8fa('0x3b')]));_0x21c478[_0xd8fa('0x39')]=_0x21c478[_0xd8fa('0x39')][_0xd8fa('0x3c')]?_0x21c478['attributes']:_0x2572d0[_0xd8fa('0x3a')];if(_0x177cbf[_0xd8fa('0x35')][_0xd8fa('0x46')]){_0x21c478[_0xd8fa('0x4a')]=[{'all':!![]}];}_0x21c478=_[_0xd8fa('0x42')]({},_0x21c478,_0x177cbf[_0xd8fa('0x45')]);return db[_0xd8fa('0x30')][_0xd8fa('0x4b')](_0x21c478)[_0xd8fa('0x29')](handleEntityNotFound(_0x12d08c,null))[_0xd8fa('0x29')](respondWithResult(_0x12d08c,null))[_0xd8fa('0x49')](handleError(_0x12d08c,null));};exports[_0xd8fa('0x4c')]=function(_0xa7da0,_0x391b9f){return db[_0xd8fa('0x30')][_0xd8fa('0x4c')](_0xa7da0[_0xd8fa('0x4d')],{})[_0xd8fa('0x29')](respondWithResult(_0x391b9f,0xc9))[_0xd8fa('0x49')](handleError(_0x391b9f,null));};exports[_0xd8fa('0x4e')]=function(_0x8d28ab,_0x2a4aca){if(_0x8d28ab[_0xd8fa('0x4d')]['id']){delete _0x8d28ab[_0xd8fa('0x4d')]['id'];}return db[_0xd8fa('0x30')][_0xd8fa('0x4b')]({'where':{'id':_0x8d28ab[_0xd8fa('0x4f')]['id']}})[_0xd8fa('0x29')](handleEntityNotFound(_0x2a4aca,null))[_0xd8fa('0x29')](saveUpdates(_0x8d28ab['body'],null))['then'](respondWithResult(_0x2a4aca,null))[_0xd8fa('0x49')](handleError(_0x2a4aca,null));};exports[_0xd8fa('0x28')]=function(_0x37dd0f,_0x4b45d8){return db[_0xd8fa('0x30')][_0xd8fa('0x4b')]({'where':{'id':_0x37dd0f[_0xd8fa('0x4f')]['id']}})[_0xd8fa('0x29')](handleEntityNotFound(_0x4b45d8,null))[_0xd8fa('0x29')](removeEntity(_0x4b45d8,null))[_0xd8fa('0x49')](handleError(_0x4b45d8,null));};exports[_0xd8fa('0x50')]=function(_0x4d1388,_0x5325b6){return db[_0xd8fa('0x30')][_0xd8fa('0x50')]()[_0xd8fa('0x29')](respondWithResult(_0x5325b6,null))['catch'](handleError(_0x5325b6,null));}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.model.js b/server/api/voiceDialReport/voiceDialReport.model.js index e73c16e..7a5c4e6 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 _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 +var _0x8463=['report_dial','uniqueid','lodash','api','moment','bluebird','request-promise','../../config/environment','./voiceDialReport.attributes','exports','define','VoiceDialReport'];(function(_0x44a75b,_0x3b156a){var _0x424fc0=function(_0x6571bb){while(--_0x6571bb){_0x44a75b['push'](_0x44a75b['shift']());}};_0x424fc0(++_0x3b156a);}(_0x8463,0x1b2));var _0x3846=function(_0x20cc82,_0x4d4c1b){_0x20cc82=_0x20cc82-0x0;var _0x4dde39=_0x8463[_0x20cc82];return _0x4dde39;};'use strict';var _=require(_0x3846('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x3846('0x1'));var moment=require(_0x3846('0x2'));var BPromise=require(_0x3846('0x3'));var rp=require(_0x3846('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x3846('0x5'));var attributes=require(_0x3846('0x6'));module[_0x3846('0x7')]=function(_0x1015a4,_0x3d1b3e){return _0x1015a4[_0x3846('0x8')](_0x3846('0x9'),attributes,{'tableName':_0x3846('0xa'),'paranoid':![],'indexes':[{'fields':[_0x3846('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.rpc.js b/server/api/voiceDialReport/voiceDialReport.rpc.js index ffc9619..f26c10b 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 _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 +var _0xbbe8=['UpdateVoiceDialReport','update','raw','limit','debug','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request\x20sent','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceDialReport,\x20%s,\x20%s','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','then','info'];(function(_0x26034e,_0x1b0826){var _0x82fcee=function(_0x154c49){while(--_0x154c49){_0x26034e['push'](_0x26034e['shift']());}};_0x82fcee(++_0x1b0826);}(_0xbbe8,0x15a));var _0x8bbe=function(_0x22eb22,_0x3ca3cf){_0x22eb22=_0x22eb22-0x0;var _0x2a837c=_0xbbe8[_0x22eb22];return _0x2a837c;};'use strict';var _=require('lodash');var util=require(_0x8bbe('0x0'));var moment=require(_0x8bbe('0x1'));var BPromise=require(_0x8bbe('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8bbe('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8bbe('0x4'));var logger=require(_0x8bbe('0x5'))(_0x8bbe('0x6'));var config=require(_0x8bbe('0x7'));var jayson=require(_0x8bbe('0x8'));var client=jayson[_0x8bbe('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x352d5d,_0x2c42de,_0x7f9b2a){return new BPromise(function(_0x4fdfd2,_0x11d2e7){return client['request'](_0x352d5d,_0x7f9b2a)['then'](function(_0x4492d2){logger['info']('VoiceDialReport,\x20%s,\x20%s',_0x2c42de,_0x8bbe('0xa'));logger['debug'](_0x8bbe('0xb'),_0x2c42de,_0x8bbe('0xa'),JSON[_0x8bbe('0xc')](_0x4492d2));if(_0x4492d2[_0x8bbe('0xd')]){if(_0x4492d2['error'][_0x8bbe('0xe')]===0x1f4){logger[_0x8bbe('0xd')](_0x8bbe('0xf'),_0x2c42de,_0x4492d2[_0x8bbe('0xd')][_0x8bbe('0x10')]);return _0x11d2e7(_0x4492d2[_0x8bbe('0xd')]['message']);}logger['error'](_0x8bbe('0xf'),_0x2c42de,_0x4492d2[_0x8bbe('0xd')][_0x8bbe('0x10')]);return _0x4fdfd2(_0x4492d2[_0x8bbe('0xd')][_0x8bbe('0x10')]);}else{logger['info'](_0x8bbe('0xf'),_0x2c42de,_0x8bbe('0xa'));_0x4fdfd2(_0x4492d2[_0x8bbe('0x11')][_0x8bbe('0x10')]);}})[_0x8bbe('0x12')](function(_0x9e765a){logger[_0x8bbe('0xd')](_0x8bbe('0xf'),_0x2c42de,_0x9e765a);_0x11d2e7(_0x9e765a);});});}exports[_0x8bbe('0x13')]=function(_0x409e28){var _0x1f0ccd=this;return new Promise(function(_0x8c49f7,_0x2e122b){return db[_0x8bbe('0x14')][_0x8bbe('0x15')](_0x409e28[_0x8bbe('0x16')],{'raw':_0x409e28['options']?_0x409e28[_0x8bbe('0x17')]['raw']===undefined?!![]:![]:!![]})[_0x8bbe('0x18')](function(_0x34e9bb){logger[_0x8bbe('0x19')](_0x8bbe('0x13'),_0x409e28);logger['debug']('CreateVoiceDialReport',_0x409e28,JSON[_0x8bbe('0xc')](_0x34e9bb));_0x8c49f7(_0x34e9bb);})[_0x8bbe('0x12')](function(_0x159242){logger['error']('CreateVoiceDialReport',_0x159242[_0x8bbe('0x10')],_0x409e28);_0x2e122b(_0x1f0ccd[_0x8bbe('0xd')](0x1f4,_0x159242[_0x8bbe('0x10')]));});});};exports[_0x8bbe('0x1a')]=function(_0x2f239e){var _0xb50fb4=this;return new Promise(function(_0x3f9dc5,_0x516d8a){return db['VoiceDialReport'][_0x8bbe('0x1b')](_0x2f239e[_0x8bbe('0x16')],{'raw':_0x2f239e[_0x8bbe('0x17')]?_0x2f239e['options'][_0x8bbe('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2f239e[_0x8bbe('0x17')]?_0x2f239e['options']['where']||null:null,'attributes':_0x2f239e['options']?_0x2f239e[_0x8bbe('0x17')]['attributes']||null:null,'limit':_0x2f239e['options']?_0x2f239e[_0x8bbe('0x17')][_0x8bbe('0x1d')]||null:null})['then'](function(_0x2e6c44){logger[_0x8bbe('0x19')](_0x8bbe('0x1a'),_0x2f239e);logger[_0x8bbe('0x1e')](_0x8bbe('0x1a'),_0x2f239e,JSON[_0x8bbe('0xc')](_0x2e6c44));_0x3f9dc5(_0x2e6c44);})['catch'](function(_0x45a358){logger['error'](_0x8bbe('0x1a'),_0x45a358[_0x8bbe('0x10')],_0x2f239e);_0x516d8a(_0xb50fb4[_0x8bbe('0xd')](0x1f4,_0x45a358['message']));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/index.js b/server/api/voiceExtension/index.js index 7e266e1..e6b235b 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 _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 +var _0x0e16=['destroy','exports','multer','path','express','Router','fs-extra','../../components/interaction/service','./voiceExtension.controller','get','isAuthenticated','index','create','post','put','/:id','update','delete'];(function(_0x4383e0,_0x1bbc71){var _0x12890f=function(_0x5361c6){while(--_0x5361c6){_0x4383e0['push'](_0x4383e0['shift']());}};_0x12890f(++_0x1bbc71);}(_0x0e16,0x1a0));var _0x60e1=function(_0x2cfb58,_0x3d9412){_0x2cfb58=_0x2cfb58-0x0;var _0xd99951=_0x0e16[_0x2cfb58];return _0xd99951;};'use strict';var multer=require(_0x60e1('0x0'));var util=require('util');var path=require(_0x60e1('0x1'));var timeout=require('connect-timeout');var express=require(_0x60e1('0x2'));var router=express[_0x60e1('0x3')]();var fs_extra=require(_0x60e1('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x60e1('0x5'));var config=require('../../config/environment');var controller=require(_0x60e1('0x6'));router[_0x60e1('0x7')]('/',auth[_0x60e1('0x8')](),controller[_0x60e1('0x9')]);router['get']('/:id',auth[_0x60e1('0x8')](),controller['show']);router['post']('/',auth[_0x60e1('0x8')](),controller[_0x60e1('0xa')]);router[_0x60e1('0xb')]('/:id/applications',auth[_0x60e1('0x8')](),controller['addApplications']);router[_0x60e1('0xc')](_0x60e1('0xd'),auth['isAuthenticated'](),controller[_0x60e1('0xe')]);router[_0x60e1('0xf')]('/:id',auth[_0x60e1('0x8')](),controller[_0x60e1('0x10')]);module[_0x60e1('0x11')]=router; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.attributes.js b/server/api/voiceExtension/voiceExtension.attributes.js index dcc8cd0..c806eb3 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 _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 +var _0xcb91=['outbound','inbound-fax','outbound-fax','any','*,*,*,*','INTEGER','BOOLEAN','wav','VIRTUAL','STRING','compositeIndex','NoOp','inbound'];(function(_0x111bf7,_0x5d92e8){var _0x444b4e=function(_0xb90c0f){while(--_0xb90c0f){_0x111bf7['push'](_0x111bf7['shift']());}};_0x444b4e(++_0x5d92e8);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x47e93d,_0x26bbdd){_0x47e93d=_0x47e93d-0x0;var _0xe86c46=_0xcb91[_0x47e93d];return _0xe86c46;};'use strict';var Sequelize=require('sequelize');module['exports']={'context':{'type':Sequelize[_0x1cb9('0x0')],'allowNull':![],'unique':_0x1cb9('0x1'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0x1cb9('0x0')],'allowNull':![],'unique':_0x1cb9('0x1')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':_0x1cb9('0x1')},'tag':{'type':Sequelize[_0x1cb9('0x0')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x1cb9('0x2')},'appdata':{'type':Sequelize[_0x1cb9('0x0')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize['ENUM'](_0x1cb9('0x3'),_0x1cb9('0x4'),'internal',_0x1cb9('0x5'),_0x1cb9('0x6'),'system',_0x1cb9('0x7')),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x1cb9('0x8')},'IntervalId':{'type':Sequelize[_0x1cb9('0x9')]},'isApp':{'type':Sequelize[_0x1cb9('0xa')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x1cb9('0x0')],'defaultValue':null},'callerID':{'type':Sequelize[_0x1cb9('0x0')],'allowNull':!![]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0x1cb9('0x9')]},'recordingFormat':{'type':Sequelize[_0x1cb9('0x0')],'defaultValue':_0x1cb9('0xb')},'answer':{'type':Sequelize[_0x1cb9('0xa')],'defaultValue':!![]},'name':{'type':Sequelize[_0x1cb9('0xc')],'get':function(_0x5445e1){return this['getDataValue']('exten');}}}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.controller.js b/server/api/voiceExtension/voiceExtension.controller.js index 62d70fd..88e9bf1 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 _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 +var _0x9879=['fields','attributes','nolimit','sort','where','pick','filter','merge','VIRTUAL','VoiceExtension','includeAll','include','findAll','catch','show','length','options','params','create','body','startsWith','exten','concat','Unable\x20to\x20retrieve\x20the\x20current\x20user','internal','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','context','description','recordingFormat','cutdigits','mandatoryDisposition','addApplications','findOne','sequelize','transaction','VoiceExtensionId','bulkCreate','findAndCountAll','cast(priority\x20as\x20unsigned)','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./voiceExtension.socket','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','destroy','get','InboundRoutes','inbound','outbound','ignore','map','value','find','type','name','UserProfileResource','then','error','stack','index','fieldName','key','model','query','keys','filters','intersection'];(function(_0xd82247,_0x207138){var _0x3ebcfc=function(_0x1cf635){while(--_0x1cf635){_0xd82247['push'](_0xd82247['shift']());}};_0x3ebcfc(++_0x207138);}(_0x9879,0x98));var _0x9987=function(_0x1df550,_0x36f96e){_0x1df550=_0x1df550-0x0;var _0x250299=_0x9879[_0x1df550];return _0x250299;};'use strict';var emlformat=require(_0x9987('0x0'));var rimraf=require(_0x9987('0x1'));var zipdir=require(_0x9987('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9987('0x3'));var moment=require('moment');var BPromise=require(_0x9987('0x4'));var Mustache=require(_0x9987('0x5'));var util=require(_0x9987('0x6'));var path=require(_0x9987('0x7'));var sox=require(_0x9987('0x8'));var csv=require(_0x9987('0x9'));var ejs=require(_0x9987('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9987('0xb'));var squel=require('squel');var crypto=require(_0x9987('0xc'));var jsforce=require(_0x9987('0xd'));var deskjs=require(_0x9987('0xe'));var toCsv=require(_0x9987('0x9'));var querystring=require(_0x9987('0xf'));var Papa=require(_0x9987('0x10'));var Redis=require(_0x9987('0x11'));var authService=require(_0x9987('0x12'));var qs=require(_0x9987('0x13'));var as=require(_0x9987('0x14'));var hardwareService=require(_0x9987('0x15'));var logger=require(_0x9987('0x16'))(_0x9987('0x17'));var utils=require(_0x9987('0x18'));var config=require(_0x9987('0x19'));var licenseUtil=require(_0x9987('0x1a'));var db=require(_0x9987('0x1b'))['db'];config[_0x9987('0x1c')]=_['defaults'](config[_0x9987('0x1c')],{'host':_0x9987('0x1d'),'port':0x18eb});var socket=require(_0x9987('0x1e'))(new Redis(config[_0x9987('0x1c')]));require(_0x9987('0x1f'))['register'](socket);function respondWithStatusCode(_0xb976c3,_0x4a4b61){_0x4a4b61=_0x4a4b61||0xcc;return function(_0x29a899){if(_0x29a899){return _0xb976c3[_0x9987('0x20')](_0x4a4b61);}return _0xb976c3[_0x9987('0x21')](_0x4a4b61)[_0x9987('0x22')]();};}function respondWithResult(_0x259633,_0x414375){_0x414375=_0x414375||0xc8;return function(_0x11a64f){if(_0x11a64f){return _0x259633[_0x9987('0x21')](_0x414375)[_0x9987('0x23')](_0x11a64f);}};}function respondWithFilteredResult(_0x1992ca,_0x390ff8){return function(_0x3dfb48){if(_0x3dfb48){var _0x46a28f=typeof _0x390ff8['offset']==='undefined'&&typeof _0x390ff8[_0x9987('0x24')]===_0x9987('0x25');var _0x1e011f=_0x3dfb48[_0x9987('0x26')];var _0x5c9e62=_0x46a28f?0x0:_0x390ff8[_0x9987('0x27')];var _0x142924=_0x46a28f?_0x3dfb48[_0x9987('0x26')]:_0x390ff8[_0x9987('0x27')]+_0x390ff8['limit'];var _0x5eb671;if(_0x142924>=_0x1e011f){_0x142924=_0x1e011f;_0x5eb671=0xc8;}else{_0x5eb671=0xce;}_0x1992ca['status'](_0x5eb671);return _0x1992ca[_0x9987('0x28')](_0x9987('0x29'),_0x5c9e62+'-'+_0x142924+'/'+_0x1e011f)['json'](_0x3dfb48);}return null;};}function patchUpdates(_0x1dccea){return function(_0x539f27){try{jsonpatch[_0x9987('0x2a')](_0x539f27,_0x1dccea,!![]);}catch(_0x3130f8){return BPromise[_0x9987('0x2b')](_0x3130f8);}return _0x539f27[_0x9987('0x2c')]();};}function saveUpdates(_0x29c39e,_0x2c867c){return function(_0x384262){if(_0x384262){return _0x384262['update'](_0x29c39e)['then'](function(_0x368d41){return _0x368d41;});}return null;};}function removeEntity(_0x4094f2,_0x1a79ab){return function(_0x468ae1){if(_0x468ae1){return _0x468ae1[_0x9987('0x2d')]()['then'](function(){var _0x11863a=_0x468ae1[_0x9987('0x2e')]({'plain':!![]});var _0x1bca07=[{'name':_0x9987('0x2f'),'value':_0x9987('0x30'),'ignore':![]},{'name':'OutboundRoutes','value':_0x9987('0x31'),'ignore':![]},{'name':'InternalRoutes','value':'internal','ignore':![]}];var _0x2c6b11=_(_0x1bca07)['filter'](_0x9987('0x32'))[_0x9987('0x33')](_0x9987('0x34'))['value']();if(_['includes'](_0x2c6b11,_0x11863a['type'])){return;}var _0x506ab2=_[_0x9987('0x35')](_0x1bca07,[_0x9987('0x34'),_0x11863a[_0x9987('0x36')]])[_0x9987('0x37')];return db[_0x9987('0x38')][_0x9987('0x2d')]({'where':{'type':_0x506ab2,'resourceId':_0x11863a['id']}})['then'](function(){return _0x468ae1;});})[_0x9987('0x39')](function(){_0x4094f2[_0x9987('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0xfe9795,_0xac6fd7){return function(_0x1a0c05){if(!_0x1a0c05){_0xfe9795[_0x9987('0x20')](0x194);}return _0x1a0c05;};}function handleError(_0x292728,_0x3d1750){_0x3d1750=_0x3d1750||0x1f4;return function(_0x314510){logger[_0x9987('0x3a')](_0x314510[_0x9987('0x3b')]);if(_0x314510[_0x9987('0x37')]){delete _0x314510[_0x9987('0x37')];}_0x292728[_0x9987('0x21')](_0x3d1750)['send'](_0x314510);};}exports[_0x9987('0x3c')]=function(_0x4e6416,_0x4948fc){var _0x4c37fc={},_0x4f04e0={},_0x7d0116={'count':0x0,'rows':[]};var _0x3074af=_['map'](db['VoiceExtension']['rawAttributes'],function(_0x49c461){return{'name':_0x49c461[_0x9987('0x3d')],'type':_0x49c461[_0x9987('0x36')][_0x9987('0x3e')]};});_0x4f04e0[_0x9987('0x3f')]=_[_0x9987('0x33')](_0x3074af,_0x9987('0x37'));_0x4f04e0[_0x9987('0x40')]=_[_0x9987('0x41')](_0x4e6416[_0x9987('0x40')]);_0x4f04e0[_0x9987('0x42')]=_[_0x9987('0x43')](_0x4f04e0[_0x9987('0x3f')],_0x4f04e0[_0x9987('0x40')]);_0x4c37fc['attributes']=_['intersection'](_0x4f04e0['model'],qs[_0x9987('0x44')](_0x4e6416[_0x9987('0x40')]['fields']));_0x4c37fc[_0x9987('0x45')]=_0x4c37fc[_0x9987('0x45')]['length']?_0x4c37fc[_0x9987('0x45')]:_0x4f04e0[_0x9987('0x3f')];if(!_0x4e6416[_0x9987('0x40')]['hasOwnProperty'](_0x9987('0x46'))){_0x4c37fc['limit']=qs[_0x9987('0x24')](_0x4e6416[_0x9987('0x40')][_0x9987('0x24')]);_0x4c37fc['offset']=qs[_0x9987('0x27')](_0x4e6416['query'][_0x9987('0x27')]);}_0x4c37fc['order']=qs[_0x9987('0x47')](_0x4e6416[_0x9987('0x40')][_0x9987('0x47')]);_0x4c37fc[_0x9987('0x48')]=qs[_0x9987('0x42')](_[_0x9987('0x49')](_0x4e6416[_0x9987('0x40')],_0x4f04e0[_0x9987('0x42')]),_0x3074af);if(_0x4e6416['query'][_0x9987('0x4a')]){_0x4c37fc[_0x9987('0x48')]=_[_0x9987('0x4b')](_0x4c37fc[_0x9987('0x48')],{'$or':_['map'](_0x3074af,function(_0x6d4705){if(_0x6d4705[_0x9987('0x36')]!==_0x9987('0x4c')){var _0x44ccfa={};_0x44ccfa[_0x6d4705[_0x9987('0x37')]]={'$like':'%'+_0x4e6416[_0x9987('0x40')][_0x9987('0x4a')]+'%'};return _0x44ccfa;}})});}_0x4c37fc=_[_0x9987('0x4b')]({},_0x4c37fc,_0x4e6416['options']);var _0x2fe2c8={'where':_0x4c37fc[_0x9987('0x48')]};return db[_0x9987('0x4d')][_0x9987('0x26')](_0x2fe2c8)[_0x9987('0x39')](function(_0x2fe7df){_0x7d0116[_0x9987('0x26')]=_0x2fe7df;if(_0x4e6416['query'][_0x9987('0x4e')]){_0x4c37fc[_0x9987('0x4f')]=[{'all':!![]}];}return db[_0x9987('0x4d')][_0x9987('0x50')](_0x4c37fc);})[_0x9987('0x39')](function(_0x4993ca){_0x7d0116['rows']=_0x4993ca;return _0x7d0116;})['then'](respondWithFilteredResult(_0x4948fc,_0x4c37fc))[_0x9987('0x51')](handleError(_0x4948fc,null));};exports[_0x9987('0x52')]=function(_0x3f7d64,_0x5ee5d7){var _0x52a3f0={'raw':![],'where':{'id':_0x3f7d64['params']['id']}},_0x4175cd={};_0x4175cd[_0x9987('0x3f')]=_['keys'](db[_0x9987('0x4d')]['rawAttributes']);_0x4175cd[_0x9987('0x40')]=_[_0x9987('0x41')](_0x3f7d64[_0x9987('0x40')]);_0x4175cd['filters']=_['intersection'](_0x4175cd[_0x9987('0x3f')],_0x4175cd['query']);_0x52a3f0[_0x9987('0x45')]=_[_0x9987('0x43')](_0x4175cd[_0x9987('0x3f')],qs['fields'](_0x3f7d64[_0x9987('0x40')][_0x9987('0x44')]));_0x52a3f0['attributes']=_0x52a3f0[_0x9987('0x45')][_0x9987('0x53')]?_0x52a3f0[_0x9987('0x45')]:_0x4175cd[_0x9987('0x3f')];if(_0x3f7d64[_0x9987('0x40')][_0x9987('0x4e')]){_0x52a3f0[_0x9987('0x4f')]=[{'all':!![]}];}_0x52a3f0=_['merge']({},_0x52a3f0,_0x3f7d64[_0x9987('0x54')]);return db[_0x9987('0x4d')][_0x9987('0x35')](_0x52a3f0)[_0x9987('0x39')](handleEntityNotFound(_0x5ee5d7,null))[_0x9987('0x39')](respondWithResult(_0x5ee5d7,null))['catch'](handleError(_0x5ee5d7,null));};exports['destroy']=function(_0x29175,_0x32013b){return db[_0x9987('0x4d')][_0x9987('0x35')]({'where':{'id':_0x29175[_0x9987('0x55')]['id']}})[_0x9987('0x39')](handleEntityNotFound(_0x32013b,null))[_0x9987('0x39')](removeEntity(_0x32013b,null))['catch'](handleError(_0x32013b,null));};exports[_0x9987('0x56')]=function(_0x5e4be1,_0x1e071c){if(_0x5e4be1[_0x9987('0x57')][_0x9987('0x36')]==='outbound'&&!_[_0x9987('0x58')](_0x5e4be1[_0x9987('0x57')][_0x9987('0x59')],'_')){_0x5e4be1[_0x9987('0x57')][_0x9987('0x59')]='_'[_0x9987('0x5a')](_0x5e4be1['body'][_0x9987('0x59')]);}return db[_0x9987('0x4d')][_0x9987('0x56')](_0x5e4be1['body'],{'raw':![]})[_0x9987('0x39')](function(_0x4c2cc7){var _0x15d5d5=_0x5e4be1['user'][_0x9987('0x2e')]({'plain':!![]});if(!_0x15d5d5)throw new Error(_0x9987('0x5b'));if(_0x15d5d5['role']==='user'){var _0x30b9bf=_0x4c2cc7['get']({'plain':!![]});var _0x3bc1ec=[{'name':_0x9987('0x2f'),'value':'inbound'},{'name':'OutboundRoutes','value':_0x9987('0x31')},{'name':'InternalRoutes','value':_0x9987('0x5c')}];var _0x1e2257=_['find'](_0x3bc1ec,[_0x9987('0x34'),_0x30b9bf[_0x9987('0x36')]])['name'];return db[_0x9987('0x5d')]['find']({'where':{'name':_0x1e2257,'userProfileId':_0x15d5d5['userProfileId']},'raw':!![]})['then'](function(_0x1922d0){if(_0x1922d0&&_0x1922d0[_0x9987('0x5e')]===0x0){return db[_0x9987('0x38')][_0x9987('0x56')]({'name':_0x30b9bf[_0x9987('0x37')],'resourceId':_0x30b9bf['id'],'type':_0x1922d0['name'],'sectionId':_0x1922d0['id']},{})[_0x9987('0x39')](function(){return _0x4c2cc7;});}else{return _0x4c2cc7;}})[_0x9987('0x51')](function(_0x38acea){logger[_0x9987('0x3a')](_0x9987('0x5f'),_0x38acea);throw _0x38acea;});}return _0x4c2cc7;})[_0x9987('0x39')](respondWithResult(_0x1e071c,0xc9))[_0x9987('0x51')](handleError(_0x1e071c,null));};exports[_0x9987('0x60')]=function(_0x1809f5,_0x17521a){if(_0x1809f5[_0x9987('0x57')]['id']){delete _0x1809f5[_0x9987('0x57')]['id'];}return db['VoiceExtension'][_0x9987('0x35')]({'where':{'id':_0x1809f5['params']['id']}})['then'](handleEntityNotFound(_0x17521a,null))['then'](function(_0x2b0ab7){if(_0x2b0ab7){return db[_0x9987('0x4d')]['update'](_[_0x9987('0x49')](_0x1809f5[_0x9987('0x57')],[_0x9987('0x59'),_0x9987('0x61'),_0x9987('0x62'),_0x9987('0x63'),_0x9987('0x64'),_0x9987('0x65')]),{'where':{'context':_0x2b0ab7['context'],'exten':_0x2b0ab7[_0x9987('0x59')]},'individualHooks':!![]})['then'](function(_0x1149ce){return _0x1149ce;});}return null;})[_0x9987('0x39')](respondWithStatusCode(_0x17521a,null))[_0x9987('0x51')](handleError(_0x17521a,null));};exports[_0x9987('0x66')]=function(_0x263dd8,_0x232b47,_0x2c9b64){return db[_0x9987('0x4d')][_0x9987('0x67')]({'where':{'id':_0x263dd8[_0x9987('0x55')]['id']}})[_0x9987('0x39')](handleEntityNotFound(_0x232b47,null))[_0x9987('0x39')](function(_0x1be801){if(_0x1be801){return db[_0x9987('0x68')][_0x9987('0x69')](function(_0x424197){return db[_0x9987('0x4d')][_0x9987('0x2d')]({'where':{'VoiceExtensionId':_0x263dd8[_0x9987('0x55')]['id']},'transaction':_0x424197})[_0x9987('0x39')](function(_0xaed35){var _0x52b5dd=_[_0x9987('0x33')](_0x263dd8['body'],function(_0x3e7672){_0x3e7672[_0x9987('0x6a')]=_0x263dd8[_0x9987('0x55')]['id'];return _0x3e7672;});return db['VoiceExtension'][_0x9987('0x6b')](_0x52b5dd,{'transaction':_0x424197});});})['then'](function(){return db['VoiceExtension'][_0x9987('0x6c')]({'where':{'isApp':!![],'VoiceExtensionId':_0x263dd8[_0x9987('0x55')]['id']},'order':_0x9987('0x6d')});});}})[_0x9987('0x39')](respondWithResult(_0x232b47,null))['catch'](handleError(_0x232b47,null));}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.events.js b/server/api/voiceExtension/voiceExtension.events.js index af12249..58eb756 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 _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 +var _0x0e46=['hasOwnProperty','hook','exports','events','setMaxListeners','save','update','remove','emit'];(function(_0x4aaf00,_0x13ef71){var _0x3da159=function(_0x4bfa6b){while(--_0x4bfa6b){_0x4aaf00['push'](_0x4aaf00['shift']());}};_0x3da159(++_0x13ef71);}(_0x0e46,0xd2));var _0x60e4=function(_0x4936fb,_0x10fda9){_0x4936fb=_0x4936fb-0x0;var _0x4430ab=_0x0e46[_0x4936fb];return _0x4430ab;};'use strict';var EventEmitter=require(_0x60e4('0x0'));var VoiceExtension=require('../../mysqldb')['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x60e4('0x1')](0x0);var events={'afterCreate':_0x60e4('0x2'),'afterUpdate':_0x60e4('0x3'),'afterDestroy':_0x60e4('0x4')};function emitEvent(_0x4f2d9d){return function(_0x32d44f,_0x14953b,_0x2283ba){VoiceExtensionEvents[_0x60e4('0x5')](_0x4f2d9d+':'+_0x32d44f['id'],_0x32d44f);VoiceExtensionEvents[_0x60e4('0x5')](_0x4f2d9d,_0x32d44f);_0x2283ba(null);};}for(var e in events){if(events[_0x60e4('0x6')](e)){var event=events[e];VoiceExtension[_0x60e4('0x7')](e,emitEvent(event));}}module[_0x60e4('0x8')]=VoiceExtensionEvents; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.model.js b/server/api/voiceExtension/voiceExtension.model.js index 7aaa581..477c4ed 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 _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 +var _0x2a9b=['../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','VoiceExtension','voice_extensions','util'];(function(_0x1d1d7d,_0x29da69){var _0x17e156=function(_0x2d3af4){while(--_0x2d3af4){_0x1d1d7d['push'](_0x1d1d7d['shift']());}};_0x17e156(++_0x29da69);}(_0x2a9b,0x6b));var _0xb2a9=function(_0x3c755d,_0x43328a){_0x3c755d=_0x3c755d-0x0;var _0x3526f1=_0x2a9b[_0x3c755d];return _0x3526f1;};'use strict';var _=require('lodash');var util=require(_0xb2a9('0x0'));var logger=require(_0xb2a9('0x1'))(_0xb2a9('0x2'));var moment=require(_0xb2a9('0x3'));var BPromise=require('bluebird');var rp=require(_0xb2a9('0x4'));var fs=require('fs');var path=require(_0xb2a9('0x5'));var rimraf=require(_0xb2a9('0x6'));var config=require(_0xb2a9('0x7'));var attributes=require('./voiceExtension.attributes');module[_0xb2a9('0x8')]=function(_0x5792f2,_0xd0ea9e){return _0x5792f2[_0xb2a9('0x9')](_0xb2a9('0xa'),attributes,{'tableName':_0xb2a9('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 4cbff9c..0f50820 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 _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 +var _0x7d55=['lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','./voiceExtension.socket','register','request','then','VoiceExtension,\x20%s,\x20%s','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','VoiceExtension','findAll','options','where','attributes','include','model','map','GetVoiceExtension'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x7d55,0x1bc));var _0x57d5=function(_0xa1b00d,_0x55eb10){_0xa1b00d=_0xa1b00d-0x0;var _0x519cb2=_0x7d55[_0xa1b00d];return _0x519cb2;};'use strict';var _=require(_0x57d5('0x0'));var util=require(_0x57d5('0x1'));var moment=require(_0x57d5('0x2'));var BPromise=require(_0x57d5('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x57d5('0x4'))['db'];var utils=require(_0x57d5('0x5'));var logger=require(_0x57d5('0x6'))('rpc');var config=require(_0x57d5('0x7'));var jayson=require(_0x57d5('0x8'));var client=jayson[_0x57d5('0x9')][_0x57d5('0xa')]({'port':0x232a});config[_0x57d5('0xb')]=_[_0x57d5('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x57d5('0xd'))[_0x57d5('0xe')](socket);function respondWithRpcPromise(_0x4e6e83,_0x4af36b,_0x450a5f){return new BPromise(function(_0x5b422c,_0xcd760b){return client[_0x57d5('0xf')](_0x4e6e83,_0x450a5f)[_0x57d5('0x10')](function(_0x54dc3e){logger['info'](_0x57d5('0x11'),_0x4af36b,'request\x20sent');logger[_0x57d5('0x12')](_0x57d5('0x13'),_0x4af36b,_0x57d5('0x14'),JSON[_0x57d5('0x15')](_0x54dc3e));if(_0x54dc3e[_0x57d5('0x16')]){if(_0x54dc3e[_0x57d5('0x16')][_0x57d5('0x17')]===0x1f4){logger[_0x57d5('0x16')]('VoiceExtension,\x20%s,\x20%s',_0x4af36b,_0x54dc3e['error'][_0x57d5('0x18')]);return _0xcd760b(_0x54dc3e['error'][_0x57d5('0x18')]);}logger[_0x57d5('0x16')]('VoiceExtension,\x20%s,\x20%s',_0x4af36b,_0x54dc3e[_0x57d5('0x16')]['message']);return _0x5b422c(_0x54dc3e['error'][_0x57d5('0x18')]);}else{logger[_0x57d5('0x19')]('VoiceExtension,\x20%s,\x20%s',_0x4af36b,'request\x20sent');_0x5b422c(_0x54dc3e[_0x57d5('0x1a')][_0x57d5('0x18')]);}})[_0x57d5('0x1b')](function(_0x103489){logger[_0x57d5('0x16')](_0x57d5('0x11'),_0x4af36b,_0x103489);_0xcd760b(_0x103489);});});}exports['GetVoiceExtension']=function(_0x2c45f1){var _0x3e9abd=this;return new Promise(function(_0x2943af,_0x3ac374){return db[_0x57d5('0x1c')][_0x57d5('0x1d')]({'raw':_0x2c45f1[_0x57d5('0x1e')]?_0x2c45f1['options']['raw']===undefined?!![]:![]:!![],'where':_0x2c45f1[_0x57d5('0x1e')]?_0x2c45f1['options'][_0x57d5('0x1f')]||null:null,'attributes':_0x2c45f1[_0x57d5('0x1e')]?_0x2c45f1['options'][_0x57d5('0x20')]||null:null,'limit':_0x2c45f1['options']?_0x2c45f1[_0x57d5('0x1e')]['limit']||null:null,'include':_0x2c45f1[_0x57d5('0x1e')]?_0x2c45f1[_0x57d5('0x1e')][_0x57d5('0x21')]?_['map'](_0x2c45f1['options']['include'],function(_0x4498b7){return{'model':db[_0x4498b7[_0x57d5('0x22')]],'as':_0x4498b7['as'],'attributes':_0x4498b7[_0x57d5('0x20')],'include':_0x4498b7[_0x57d5('0x21')]?_[_0x57d5('0x23')](_0x4498b7[_0x57d5('0x21')],function(_0x55a778){return{'model':db[_0x55a778[_0x57d5('0x22')]],'as':_0x55a778['as'],'attributes':_0x55a778[_0x57d5('0x20')],'include':_0x55a778[_0x57d5('0x21')]?_[_0x57d5('0x23')](_0x55a778[_0x57d5('0x21')],function(_0x2aa68b){return{'model':db[_0x2aa68b[_0x57d5('0x22')]],'as':_0x2aa68b['as'],'attributes':_0x2aa68b[_0x57d5('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x44abad){logger[_0x57d5('0x19')](_0x57d5('0x24'),_0x2c45f1);logger[_0x57d5('0x12')](_0x57d5('0x24'),_0x2c45f1,JSON['stringify'](_0x44abad));_0x2943af(_0x44abad);})[_0x57d5('0x1b')](function(_0x1c71e6){logger['error'](_0x57d5('0x24'),_0x1c71e6[_0x57d5('0x18')],_0x2c45f1);_0x3ac374(_0x3e9abd['error'](0x1f4,_0x1c71e6[_0x57d5('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.socket.js b/server/api/voiceExtension/voiceExtension.socket.js index 5da03d0..a199346 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 _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 +var _0x1261=['save','remove','update','emit','removeListener','voiceExtension:'];(function(_0xffc7c9,_0x199cc8){var _0x368832=function(_0x5e94f2){while(--_0x5e94f2){_0xffc7c9['push'](_0xffc7c9['shift']());}};_0x368832(++_0x199cc8);}(_0x1261,0x144));var _0x1126=function(_0x39e15b,_0x555185){_0x39e15b=_0x39e15b-0x0;var _0x4e5766=_0x1261[_0x39e15b];return _0x4e5766;};'use strict';var VoiceExtensionEvents=require('./voiceExtension.events');var events=[_0x1126('0x0'),_0x1126('0x1'),_0x1126('0x2')];function createListener(_0x331a2c,_0x39b786){return function(_0x350f3a){_0x39b786[_0x1126('0x3')](_0x331a2c,_0x350f3a);};}function removeListener(_0x4245ca,_0x21a480){return function(){VoiceExtensionEvents[_0x1126('0x4')](_0x4245ca,_0x21a480);};}exports['register']=function(_0x5c68c8){for(var _0x40ba58=0x0,_0x907180=events['length'];_0x40ba58<_0x907180;_0x40ba58++){var _0x17e5f0=events[_0x40ba58];var _0x28772d=createListener(_0x1126('0x5')+_0x17e5f0,_0x5c68c8);VoiceExtensionEvents['on'](_0x17e5f0,_0x28772d);}}; \ No newline at end of file diff --git a/server/api/voiceMail/index.js b/server/api/voiceMail/index.js index 9c00ae1..0516bde 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 _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 +var _0xadb5=['delete','exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/messages','getMessages','post','create','update'];(function(_0x4bc4c8,_0x3139d3){var _0x3bb121=function(_0x95ad12){while(--_0x95ad12){_0x4bc4c8['push'](_0x4bc4c8['shift']());}};_0x3bb121(++_0x3139d3);}(_0xadb5,0xad));var _0x5adb=function(_0x3e1036,_0x1619b4){_0x3e1036=_0x3e1036-0x0;var _0x25058f=_0xadb5[_0x3e1036];return _0x25058f;};'use strict';var multer=require('multer');var util=require(_0x5adb('0x0'));var path=require('path');var timeout=require(_0x5adb('0x1'));var express=require(_0x5adb('0x2'));var router=express[_0x5adb('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x5adb('0x4'));var interaction=require(_0x5adb('0x5'));var config=require(_0x5adb('0x6'));var controller=require('./voiceMail.controller');router[_0x5adb('0x7')]('/',auth[_0x5adb('0x8')](),controller[_0x5adb('0x9')]);router[_0x5adb('0x7')](_0x5adb('0xa'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xb')]);router[_0x5adb('0x7')](_0x5adb('0xc'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xd')]);router[_0x5adb('0xe')]('/',auth[_0x5adb('0x8')](),controller[_0x5adb('0xf')]);router['put']('/:id',auth[_0x5adb('0x8')](),controller[_0x5adb('0x10')]);router[_0x5adb('0x11')]('/:id',auth[_0x5adb('0x8')](),controller['destroy']);module[_0x5adb('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.attributes.js b/server/api/voiceMail/voiceMail.attributes.js index 836a53f..4231d6a 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 _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 +var _0xab5b=['setDataValue','email','trim','yes','ENUM','TINYINT(4)','INTEGER','VIRTUAL','getDataValue','mailbox','sequelize','STRING','from-voicemail','contest_mailbox'];(function(_0x1cd9e5,_0x834481){var _0xd7b6d1=function(_0x540519){while(--_0x540519){_0x1cd9e5['push'](_0x1cd9e5['shift']());}};_0xd7b6d1(++_0x834481);}(_0xab5b,0x96));var _0xbab5=function(_0x2b1fad,_0x140290){_0x2b1fad=_0x2b1fad-0x0;var _0x295d54=_0xab5b[_0x2b1fad];return _0x295d54;};'use strict';var Sequelize=require(_0xbab5('0x0'));module['exports']={'customer_id':{'type':Sequelize[_0xbab5('0x1')]},'context':{'type':Sequelize['STRING'],'defaultValue':_0xbab5('0x2'),'unique':_0xbab5('0x3')},'mailbox':{'type':Sequelize[_0xbab5('0x1')],'defaultValue':'','allowNull':![],'unique':_0xbab5('0x3')},'password':{'type':Sequelize[_0xbab5('0x1')]},'fullname':{'type':Sequelize[_0xbab5('0x1')]},'email':{'type':Sequelize[_0xbab5('0x1')],'validate':{'isEmail':!![]},'set':function(_0xa9c82){this[_0xbab5('0x4')](_0xbab5('0x5'),typeof _0xa9c82==='string'&&_0xa9c82[_0xbab5('0x6')]()?_0xa9c82['trim']():null);}},'pager':{'type':Sequelize[_0xbab5('0x1')]},'tz':{'type':Sequelize[_0xbab5('0x1')],'defaultValue':'central'},'attach':{'type':Sequelize['ENUM'](_0xbab5('0x7'),'no'),'defaultValue':_0xbab5('0x7'),'allowNull':![]},'saycid':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0xbab5('0x1')]},'callback':{'type':Sequelize[_0xbab5('0x1')]},'review':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0xbab5('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xbab5('0x9'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize['ENUM'](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xbab5('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0xbab5('0x8')]('yes','no'),'defaultValue':_0xbab5('0x7'),'allowNull':![]},'forcename':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0xbab5('0x8')](_0xbab5('0x7'),'no'),'defaultValue':_0xbab5('0x7'),'allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0xbab5('0x1')]},'emailbody':{'type':Sequelize[_0xbab5('0x1')]},'maxsecs':{'type':Sequelize[_0xbab5('0xa')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xbab5('0xa')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xbab5('0xb')],'get':function(){return this[_0xbab5('0xc')]('fullname')+'\x20-\x20'+this[_0xbab5('0xc')](_0xbab5('0xd'));}}}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.controller.js b/server/api/voiceMail/voiceMail.controller.js index 72684ae..72a6457 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 _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 +var _0xab40=['intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','type','VIRTUAL','VoiceMail','count','include','findAll','rows','catch','show','params','length','includeAll','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Voicemails','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getMessages','findOne','mailbox','VoiceMailMessage','findAndCountAll','eml-format','rimraf','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','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','apply','reject','save','then','get','UserProfileResource','destroy','error','stack','name','rawAttributes','fieldName','model','query','keys','filters'];(function(_0x47ce3e,_0x4fe934){var _0x552506=function(_0xd6e63f){while(--_0xd6e63f){_0x47ce3e['push'](_0x47ce3e['shift']());}};_0x552506(++_0x4fe934);}(_0xab40,0xcd));var _0x0ab4=function(_0x320de2,_0x162740){_0x320de2=_0x320de2-0x0;var _0x124407=_0xab40[_0x320de2];return _0x124407;};'use strict';var emlformat=require(_0x0ab4('0x0'));var rimraf=require(_0x0ab4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0ab4('0x2'));var BPromise=require(_0x0ab4('0x3'));var Mustache=require(_0x0ab4('0x4'));var util=require(_0x0ab4('0x5'));var path=require(_0x0ab4('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x0ab4('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0ab4('0x8'));var squel=require(_0x0ab4('0x9'));var crypto=require(_0x0ab4('0xa'));var jsforce=require(_0x0ab4('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0ab4('0xc'));var Redis=require(_0x0ab4('0xd'));var authService=require(_0x0ab4('0xe'));var qs=require(_0x0ab4('0xf'));var as=require(_0x0ab4('0x10'));var hardwareService=require(_0x0ab4('0x11'));var logger=require(_0x0ab4('0x12'))(_0x0ab4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0ab4('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x249dc3,_0x45e6fd){_0x45e6fd=_0x45e6fd||0xcc;return function(_0x1e7555){if(_0x1e7555){return _0x249dc3[_0x0ab4('0x15')](_0x45e6fd);}return _0x249dc3[_0x0ab4('0x16')](_0x45e6fd)[_0x0ab4('0x17')]();};}function respondWithResult(_0x112162,_0x2cc644){_0x2cc644=_0x2cc644||0xc8;return function(_0x3cb1df){if(_0x3cb1df){return _0x112162[_0x0ab4('0x16')](_0x2cc644)[_0x0ab4('0x18')](_0x3cb1df);}};}function respondWithFilteredResult(_0x36d246,_0x293e20){return function(_0x45fad1){if(_0x45fad1){var _0x2a83a8=typeof _0x293e20[_0x0ab4('0x19')]===_0x0ab4('0x1a')&&typeof _0x293e20[_0x0ab4('0x1b')]==='undefined';var _0x5000d4=_0x45fad1['count'];var _0x17422f=_0x2a83a8?0x0:_0x293e20[_0x0ab4('0x19')];var _0x2f50d2=_0x2a83a8?_0x45fad1['count']:_0x293e20[_0x0ab4('0x19')]+_0x293e20[_0x0ab4('0x1b')];var _0x212ebd;if(_0x2f50d2>=_0x5000d4){_0x2f50d2=_0x5000d4;_0x212ebd=0xc8;}else{_0x212ebd=0xce;}_0x36d246[_0x0ab4('0x16')](_0x212ebd);return _0x36d246['set']('Content-Range',_0x17422f+'-'+_0x2f50d2+'/'+_0x5000d4)[_0x0ab4('0x18')](_0x45fad1);}return null;};}function patchUpdates(_0x5b1ed5){return function(_0x2b0e29){try{jsonpatch[_0x0ab4('0x1c')](_0x2b0e29,_0x5b1ed5,!![]);}catch(_0x5bb1d0){return BPromise[_0x0ab4('0x1d')](_0x5bb1d0);}return _0x2b0e29[_0x0ab4('0x1e')]();};}function saveUpdates(_0x2c55b3,_0x1d5c14){return function(_0x12d06d){if(_0x12d06d){return _0x12d06d['update'](_0x2c55b3)['then'](function(_0x24b929){return _0x24b929;});}return null;};}function removeEntity(_0x14087f,_0x392afe){return function(_0x13c882){if(_0x13c882){return _0x13c882['destroy']()[_0x0ab4('0x1f')](function(){var _0x3caa9d=_0x13c882[_0x0ab4('0x20')]({'plain':!![]});var _0x4ea9aa='Voicemails';return db[_0x0ab4('0x21')][_0x0ab4('0x22')]({'where':{'type':_0x4ea9aa,'resourceId':_0x3caa9d['id']}})[_0x0ab4('0x1f')](function(){return _0x13c882;});})['then'](function(){_0x14087f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x19ecc6,_0x5ba3a2){return function(_0x3bf844){if(!_0x3bf844){_0x19ecc6[_0x0ab4('0x15')](0x194);}return _0x3bf844;};}function handleError(_0x4f1aeb,_0x4bd747){_0x4bd747=_0x4bd747||0x1f4;return function(_0x4d0cc1){logger[_0x0ab4('0x23')](_0x4d0cc1[_0x0ab4('0x24')]);if(_0x4d0cc1[_0x0ab4('0x25')]){delete _0x4d0cc1[_0x0ab4('0x25')];}_0x4f1aeb[_0x0ab4('0x16')](_0x4bd747)['send'](_0x4d0cc1);};}exports['index']=function(_0x580d56,_0x2e7a97){var _0x2b66d5={},_0x155d96={},_0x182bbe={'count':0x0,'rows':[]};var _0x46eda7=_['map'](db['VoiceMail'][_0x0ab4('0x26')],function(_0xe6682){return{'name':_0xe6682[_0x0ab4('0x27')],'type':_0xe6682['type']['key']};});_0x155d96[_0x0ab4('0x28')]=_['map'](_0x46eda7,_0x0ab4('0x25'));_0x155d96[_0x0ab4('0x29')]=_[_0x0ab4('0x2a')](_0x580d56[_0x0ab4('0x29')]);_0x155d96[_0x0ab4('0x2b')]=_[_0x0ab4('0x2c')](_0x155d96['model'],_0x155d96[_0x0ab4('0x29')]);_0x2b66d5[_0x0ab4('0x2d')]=_[_0x0ab4('0x2c')](_0x155d96[_0x0ab4('0x28')],qs['fields'](_0x580d56['query'][_0x0ab4('0x2e')]));_0x2b66d5[_0x0ab4('0x2d')]=_0x2b66d5[_0x0ab4('0x2d')]['length']?_0x2b66d5['attributes']:_0x155d96['model'];if(!_0x580d56[_0x0ab4('0x29')][_0x0ab4('0x2f')](_0x0ab4('0x30'))){_0x2b66d5['limit']=qs['limit'](_0x580d56['query'][_0x0ab4('0x1b')]);_0x2b66d5[_0x0ab4('0x19')]=qs[_0x0ab4('0x19')](_0x580d56[_0x0ab4('0x29')][_0x0ab4('0x19')]);}_0x2b66d5[_0x0ab4('0x31')]=qs[_0x0ab4('0x32')](_0x580d56[_0x0ab4('0x29')][_0x0ab4('0x32')]);_0x2b66d5[_0x0ab4('0x33')]=qs['filters'](_[_0x0ab4('0x34')](_0x580d56[_0x0ab4('0x29')],_0x155d96[_0x0ab4('0x2b')]),_0x46eda7);if(_0x580d56[_0x0ab4('0x29')][_0x0ab4('0x35')]){_0x2b66d5[_0x0ab4('0x33')]=_[_0x0ab4('0x36')](_0x2b66d5[_0x0ab4('0x33')],{'$or':_[_0x0ab4('0x37')](_0x46eda7,function(_0x3774ca){if(_0x3774ca[_0x0ab4('0x38')]!==_0x0ab4('0x39')){var _0x4a05c4={};_0x4a05c4[_0x3774ca[_0x0ab4('0x25')]]={'$like':'%'+_0x580d56[_0x0ab4('0x29')][_0x0ab4('0x35')]+'%'};return _0x4a05c4;}})});}_0x2b66d5=_[_0x0ab4('0x36')]({},_0x2b66d5,_0x580d56['options']);var _0x42bece={'where':_0x2b66d5['where']};return db[_0x0ab4('0x3a')][_0x0ab4('0x3b')](_0x42bece)[_0x0ab4('0x1f')](function(_0x245021){_0x182bbe[_0x0ab4('0x3b')]=_0x245021;if(_0x580d56[_0x0ab4('0x29')]['includeAll']){_0x2b66d5[_0x0ab4('0x3c')]=[{'all':!![]}];}return db[_0x0ab4('0x3a')][_0x0ab4('0x3d')](_0x2b66d5);})['then'](function(_0x395e0b){_0x182bbe[_0x0ab4('0x3e')]=_0x395e0b;return _0x182bbe;})[_0x0ab4('0x1f')](respondWithFilteredResult(_0x2e7a97,_0x2b66d5))[_0x0ab4('0x3f')](handleError(_0x2e7a97,null));};exports[_0x0ab4('0x40')]=function(_0x5aa047,_0x5d70eb){var _0x498845={'raw':!![],'where':{'id':_0x5aa047[_0x0ab4('0x41')]['id']}},_0x2f54dd={};_0x2f54dd['model']=_[_0x0ab4('0x2a')](db['VoiceMail'][_0x0ab4('0x26')]);_0x2f54dd['query']=_[_0x0ab4('0x2a')](_0x5aa047[_0x0ab4('0x29')]);_0x2f54dd[_0x0ab4('0x2b')]=_[_0x0ab4('0x2c')](_0x2f54dd[_0x0ab4('0x28')],_0x2f54dd[_0x0ab4('0x29')]);_0x498845['attributes']=_[_0x0ab4('0x2c')](_0x2f54dd[_0x0ab4('0x28')],qs[_0x0ab4('0x2e')](_0x5aa047[_0x0ab4('0x29')][_0x0ab4('0x2e')]));_0x498845[_0x0ab4('0x2d')]=_0x498845['attributes'][_0x0ab4('0x42')]?_0x498845['attributes']:_0x2f54dd[_0x0ab4('0x28')];if(_0x5aa047[_0x0ab4('0x29')][_0x0ab4('0x43')]){_0x498845['include']=[{'all':!![]}];}_0x498845=_[_0x0ab4('0x36')]({},_0x498845,_0x5aa047[_0x0ab4('0x44')]);return db[_0x0ab4('0x3a')][_0x0ab4('0x45')](_0x498845)[_0x0ab4('0x1f')](handleEntityNotFound(_0x5d70eb,null))[_0x0ab4('0x1f')](respondWithResult(_0x5d70eb,null))['catch'](handleError(_0x5d70eb,null));};exports[_0x0ab4('0x46')]=function(_0xdcc118,_0x302894){return db[_0x0ab4('0x3a')][_0x0ab4('0x46')](_0xdcc118[_0x0ab4('0x47')],{})[_0x0ab4('0x1f')](function(_0x356bc9){var _0x22402e=_0xdcc118[_0x0ab4('0x48')][_0x0ab4('0x20')]({'plain':!![]});if(!_0x22402e)throw new Error(_0x0ab4('0x49'));if(_0x22402e[_0x0ab4('0x4a')]==='user'){var _0x2c3a0a=_0x356bc9[_0x0ab4('0x20')]({'plain':!![]});var _0x5800cc=_0x0ab4('0x4b');return db['UserProfileSection']['find']({'where':{'name':_0x5800cc,'userProfileId':_0x22402e[_0x0ab4('0x4c')]},'raw':!![]})[_0x0ab4('0x1f')](function(_0x156e22){if(_0x156e22&&_0x156e22['autoAssociation']===0x0){return db[_0x0ab4('0x21')][_0x0ab4('0x46')]({'name':_0x2c3a0a[_0x0ab4('0x25')],'resourceId':_0x2c3a0a['id'],'type':_0x156e22[_0x0ab4('0x25')],'sectionId':_0x156e22['id']},{})[_0x0ab4('0x1f')](function(){return _0x356bc9;});}else{return _0x356bc9;}})[_0x0ab4('0x3f')](function(_0x1eea3b){logger['error'](_0x0ab4('0x4d'),_0x1eea3b);throw _0x1eea3b;});}return _0x356bc9;})['then'](respondWithResult(_0x302894,0xc9))[_0x0ab4('0x3f')](handleError(_0x302894,null));};exports['update']=function(_0x2597f2,_0x5550ff){if(_0x2597f2['body']['id']){delete _0x2597f2[_0x0ab4('0x47')]['id'];}return db[_0x0ab4('0x3a')][_0x0ab4('0x45')]({'where':{'id':_0x2597f2[_0x0ab4('0x41')]['id']}})['then'](handleEntityNotFound(_0x5550ff,null))[_0x0ab4('0x1f')](saveUpdates(_0x2597f2[_0x0ab4('0x47')],null))[_0x0ab4('0x1f')](respondWithResult(_0x5550ff,null))[_0x0ab4('0x3f')](handleError(_0x5550ff,null));};exports[_0x0ab4('0x22')]=function(_0x2354fa,_0x134437){return db[_0x0ab4('0x3a')][_0x0ab4('0x45')]({'where':{'id':_0x2354fa[_0x0ab4('0x41')]['id']}})[_0x0ab4('0x1f')](handleEntityNotFound(_0x134437,null))[_0x0ab4('0x1f')](removeEntity(_0x134437,null))[_0x0ab4('0x3f')](handleError(_0x134437,null));};exports[_0x0ab4('0x4e')]=function(_0x438f38,_0x1e5635,_0x340558){return db[_0x0ab4('0x3a')][_0x0ab4('0x4f')]({'where':{'id':_0x438f38['params']['id']}})[_0x0ab4('0x1f')](handleEntityNotFound(_0x1e5635,null))[_0x0ab4('0x1f')](function(_0x3eba1e){var _0x308f7a;var _0x32e38c={},_0x3bcb90={};_0x3bcb90[_0x0ab4('0x28')]=_[_0x0ab4('0x2a')](db['VoiceMailMessage'][_0x0ab4('0x26')]);_0x3bcb90[_0x0ab4('0x29')]=_['keys'](_0x438f38['query']);_0x3bcb90[_0x0ab4('0x2b')]=_[_0x0ab4('0x2c')](_0x3bcb90['model'],_0x3bcb90['query']);_0x32e38c[_0x0ab4('0x2d')]=_['intersection'](_0x3bcb90['model'],qs[_0x0ab4('0x2e')](_0x438f38[_0x0ab4('0x29')][_0x0ab4('0x2e')]));_0x32e38c[_0x0ab4('0x2d')]=_0x32e38c[_0x0ab4('0x2d')][_0x0ab4('0x42')]?_0x32e38c[_0x0ab4('0x2d')]:_0x3bcb90['model'];if(!_0x438f38[_0x0ab4('0x29')][_0x0ab4('0x2f')](_0x0ab4('0x30'))){_0x32e38c[_0x0ab4('0x1b')]=qs[_0x0ab4('0x1b')](_0x438f38[_0x0ab4('0x29')]['limit']);_0x32e38c[_0x0ab4('0x19')]=qs[_0x0ab4('0x19')](_0x438f38['query'][_0x0ab4('0x19')]);}_0x32e38c['order']=qs[_0x0ab4('0x32')](_0x438f38['query'][_0x0ab4('0x32')]);_0x32e38c[_0x0ab4('0x33')]=qs[_0x0ab4('0x2b')](_[_0x0ab4('0x34')](_0x438f38['query'],_0x3bcb90['filters']));if(_0x438f38[_0x0ab4('0x29')][_0x0ab4('0x35')]){_0x32e38c['where']=_[_0x0ab4('0x36')](_0x32e38c[_0x0ab4('0x33')],{'$or':_[_0x0ab4('0x37')](_0x32e38c['attributes'],function(_0x295490){var _0xd3fb04={};_0xd3fb04[_0x295490]={'$like':'%'+_0x438f38[_0x0ab4('0x29')][_0x0ab4('0x35')]+'%'};return _0xd3fb04;})});}_0x32e38c[_0x0ab4('0x33')]=_[_0x0ab4('0x36')](_0x32e38c[_0x0ab4('0x33')],{'mailboxuser':_0x3eba1e[_0x0ab4('0x50')]});_0x32e38c=_['merge']({},_0x32e38c,_0x438f38['options']);return db[_0x0ab4('0x51')][_0x0ab4('0x52')](_0x32e38c)[_0x0ab4('0x1f')](respondWithFilteredResult(_0x1e5635,_0x32e38c));})[_0x0ab4('0x3f')](handleError(_0x1e5635,null));}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.model.js b/server/api/voiceMail/voiceMail.model.js index 2201b72..0d30409 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 _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 +var _0x9d6b=['path','rimraf','../../config/environment','./voiceMail.attributes','define','VoiceMail','mailbox_context','mailbox','context','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x4cbfbb,_0x12dccf){var _0x1d0435=function(_0x61d82f){while(--_0x61d82f){_0x4cbfbb['push'](_0x4cbfbb['shift']());}};_0x1d0435(++_0x12dccf);}(_0x9d6b,0xc9));var _0xb9d6=function(_0x533941,_0x545b8c){_0x533941=_0x533941-0x0;var _0x48737d=_0x9d6b[_0x533941];return _0x48737d;};'use strict';var _=require(_0xb9d6('0x0'));var util=require(_0xb9d6('0x1'));var logger=require(_0xb9d6('0x2'))(_0xb9d6('0x3'));var moment=require(_0xb9d6('0x4'));var BPromise=require(_0xb9d6('0x5'));var rp=require(_0xb9d6('0x6'));var fs=require('fs');var path=require(_0xb9d6('0x7'));var rimraf=require(_0xb9d6('0x8'));var config=require(_0xb9d6('0x9'));var attributes=require(_0xb9d6('0xa'));module['exports']=function(_0x227e0c,_0x3b28b4){return _0x227e0c[_0xb9d6('0xb')](_0xb9d6('0xc'),attributes,{'tableName':'voice_voicemail','paranoid':![],'indexes':[{'name':_0xb9d6('0xd'),'fields':[_0xb9d6('0xe'),_0xb9d6('0xf')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.rpc.js b/server/api/voiceMail/voiceMail.rpc.js index 0b9f14a..97888ae 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 _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 +var _0xbc27=['../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','then','info','VoiceMail,\x20%s,\x20%s','request\x20sent','debug','VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x4f4312,_0x2f2efc){var _0x3673d3=function(_0x41354b){while(--_0x41354b){_0x4f4312['push'](_0x4f4312['shift']());}};_0x3673d3(++_0x2f2efc);}(_0xbc27,0x10e));var _0x7bc2=function(_0x2abc68,_0x3515a){_0x2abc68=_0x2abc68-0x0;var _0x4a9438=_0xbc27[_0x2abc68];return _0x4a9438;};'use strict';var _=require(_0x7bc2('0x0'));var util=require(_0x7bc2('0x1'));var moment=require(_0x7bc2('0x2'));var BPromise=require(_0x7bc2('0x3'));var rs=require(_0x7bc2('0x4'));var fs=require('fs');var Redis=require(_0x7bc2('0x5'));var db=require(_0x7bc2('0x6'))['db'];var utils=require(_0x7bc2('0x7'));var logger=require(_0x7bc2('0x8'))(_0x7bc2('0x9'));var config=require('../../config/environment');var jayson=require(_0x7bc2('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x7df18e,_0x5b2a26,_0x38b2a2){return new BPromise(function(_0x541ad7,_0x247845){return client[_0x7bc2('0xb')](_0x7df18e,_0x38b2a2)[_0x7bc2('0xc')](function(_0x33f3aa){logger[_0x7bc2('0xd')](_0x7bc2('0xe'),_0x5b2a26,_0x7bc2('0xf'));logger[_0x7bc2('0x10')](_0x7bc2('0x11'),_0x5b2a26,_0x7bc2('0xf'),JSON[_0x7bc2('0x12')](_0x33f3aa));if(_0x33f3aa[_0x7bc2('0x13')]){if(_0x33f3aa[_0x7bc2('0x13')]['code']===0x1f4){logger['error'](_0x7bc2('0xe'),_0x5b2a26,_0x33f3aa[_0x7bc2('0x13')]['message']);return _0x247845(_0x33f3aa[_0x7bc2('0x13')]['message']);}logger['error'](_0x7bc2('0xe'),_0x5b2a26,_0x33f3aa[_0x7bc2('0x13')][_0x7bc2('0x14')]);return _0x541ad7(_0x33f3aa['error'][_0x7bc2('0x14')]);}else{logger['info'](_0x7bc2('0xe'),_0x5b2a26,_0x7bc2('0xf'));_0x541ad7(_0x33f3aa[_0x7bc2('0x15')]['message']);}})[_0x7bc2('0x16')](function(_0x217ddb){logger[_0x7bc2('0x13')](_0x7bc2('0xe'),_0x5b2a26,_0x217ddb);_0x247845(_0x217ddb);});});} \ No newline at end of file diff --git a/server/api/voiceMailMessage/index.js b/server/api/voiceMailMessage/index.js index 04f751d..43bf0d5 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 _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 +var _0x651a=['show','put','delete','destroy','exports','multer','util','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMailMessage.controller','get','isAuthenticated','index','/:id'];(function(_0x4b4b0e,_0x6c674){var _0x4c2d91=function(_0x4d440d){while(--_0x4d440d){_0x4b4b0e['push'](_0x4b4b0e['shift']());}};_0x4c2d91(++_0x6c674);}(_0x651a,0x105));var _0xa651=function(_0x1a4a06,_0x36a5c2){_0x1a4a06=_0x1a4a06-0x0;var _0x49ec08=_0x651a[_0x1a4a06];return _0x49ec08;};'use strict';var multer=require(_0xa651('0x0'));var util=require(_0xa651('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xa651('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xa651('0x3'));var interaction=require(_0xa651('0x4'));var config=require(_0xa651('0x5'));var controller=require(_0xa651('0x6'));router[_0xa651('0x7')]('/',auth[_0xa651('0x8')](),controller[_0xa651('0x9')]);router[_0xa651('0x7')](_0xa651('0xa'),auth[_0xa651('0x8')](),controller[_0xa651('0xb')]);router[_0xa651('0x7')]('/:id/download',auth[_0xa651('0x8')](),controller['download']);router['post']('/',auth[_0xa651('0x8')](),controller['create']);router[_0xa651('0xc')]('/:id',auth[_0xa651('0x8')](),controller['update']);router[_0xa651('0xd')](_0xa651('0xa'),auth[_0xa651('0x8')](),controller[_0xa651('0xe')]);module[_0xa651('0xf')]=router; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.attributes.js b/server/api/voiceMailMessage/voiceMailMessage.attributes.js index 942085c..e78a66b 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 _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 +var _0x0e76=['exports','VIRTUAL','getDataValue','STRING','BLOB','long','literal','sequelize'];(function(_0x16a315,_0x6920eb){var _0xf99dab=function(_0x116dde){while(--_0x116dde){_0x16a315['push'](_0x16a315['shift']());}};_0xf99dab(++_0x6920eb);}(_0x0e76,0x197));var _0x60e7=function(_0x38cb7c,_0xf33f42){_0x38cb7c=_0x38cb7c-0x0;var _0x2a5f5e=_0x0e76[_0x38cb7c];return _0x2a5f5e;};'use strict';var Sequelize=require(_0x60e7('0x0'));module[_0x60e7('0x1')]={'name':{'type':Sequelize[_0x60e7('0x2')],'get':function(_0x429372){return this[_0x60e7('0x3')]('id');}},'msgnum':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'callerid':{'type':Sequelize['STRING'],'defaultValue':''},'origtime':{'type':Sequelize['STRING'],'defaultValue':''},'duration':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'mailboxcontext':{'type':Sequelize['STRING'],'defaultValue':''},'recording':{'type':Sequelize[_0x60e7('0x5')](_0x60e7('0x6')),'defaultValue':null},'flag':{'type':Sequelize['STRING'],'defaultValue':''},'msg_id':{'type':Sequelize[_0x60e7('0x4')],'defaultValue':''},'stamp':{'type':'TIMESTAMP','defaultValue':Sequelize[_0x60e7('0x7')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.controller.js b/server/api/voiceMailMessage/voiceMailMessage.controller.js index 179c9d2..0826375 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 _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 +var _0xb3af=['intersection','query','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','options','include','findAll','rows','catch','show','params','merge','find','create','body','download','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','jsforce','desk.js','papaparse','../../components/auth/service','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','name','send','index','map','VoiceMailMessage','rawAttributes','type','key','model','differenceBy','keys','filters'];(function(_0x1d5f39,_0x2bf079){var _0x6d18c1=function(_0x3cddaf){while(--_0x3cddaf){_0x1d5f39['push'](_0x1d5f39['shift']());}};_0x6d18c1(++_0x2bf079);}(_0xb3af,0x151));var _0xfb3a=function(_0xa148b7,_0x2f3eb2){_0xa148b7=_0xa148b7-0x0;var _0x51efd3=_0xb3af[_0xa148b7];return _0x51efd3;};'use strict';var emlformat=require(_0xfb3a('0x0'));var rimraf=require(_0xfb3a('0x1'));var zipdir=require(_0xfb3a('0x2'));var jsonpatch=require(_0xfb3a('0x3'));var rp=require(_0xfb3a('0x4'));var moment=require(_0xfb3a('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xfb3a('0x6'));var util=require(_0xfb3a('0x7'));var path=require('path');var sox=require(_0xfb3a('0x8'));var csv=require(_0xfb3a('0x9'));var ejs=require(_0xfb3a('0xa'));var fs=require('fs');var fs_extra=require(_0xfb3a('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xfb3a('0xc'));var deskjs=require(_0xfb3a('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xfb3a('0xe'));var Redis=require('ioredis');var authService=require(_0xfb3a('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfb3a('0x10'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xfb3a('0x11'));var licenseUtil=require(_0xfb3a('0x12'));var db=require(_0xfb3a('0x13'))['db'];function respondWithStatusCode(_0x5a968b,_0x228ce2){_0x228ce2=_0x228ce2||0xcc;return function(_0x4b135e){if(_0x4b135e){return _0x5a968b[_0xfb3a('0x14')](_0x228ce2);}return _0x5a968b[_0xfb3a('0x15')](_0x228ce2)['end']();};}function respondWithResult(_0x279433,_0x173006){_0x173006=_0x173006||0xc8;return function(_0x11a722){if(_0x11a722){return _0x279433['status'](_0x173006)[_0xfb3a('0x16')](_0x11a722);}};}function respondWithFilteredResult(_0x3736f6,_0x4a4362){return function(_0x3133d0){if(_0x3133d0){var _0x3af138=typeof _0x4a4362[_0xfb3a('0x17')]===_0xfb3a('0x18')&&typeof _0x4a4362[_0xfb3a('0x19')]===_0xfb3a('0x18');var _0x477a89=_0x3133d0[_0xfb3a('0x1a')];var _0x4a835e=_0x3af138?0x0:_0x4a4362[_0xfb3a('0x17')];var _0x55ac22=_0x3af138?_0x3133d0[_0xfb3a('0x1a')]:_0x4a4362[_0xfb3a('0x17')]+_0x4a4362[_0xfb3a('0x19')];var _0x5d38cf;if(_0x55ac22>=_0x477a89){_0x55ac22=_0x477a89;_0x5d38cf=0xc8;}else{_0x5d38cf=0xce;}_0x3736f6['status'](_0x5d38cf);return _0x3736f6[_0xfb3a('0x1b')](_0xfb3a('0x1c'),_0x4a835e+'-'+_0x55ac22+'/'+_0x477a89)[_0xfb3a('0x16')](_0x3133d0);}return null;};}function patchUpdates(_0x83b668){return function(_0x7690){try{jsonpatch[_0xfb3a('0x1d')](_0x7690,_0x83b668,!![]);}catch(_0x509ab0){return BPromise[_0xfb3a('0x1e')](_0x509ab0);}return _0x7690[_0xfb3a('0x1f')]();};}function saveUpdates(_0x4c0ac0,_0x44064d){return function(_0x1420d6){if(_0x1420d6){return _0x1420d6[_0xfb3a('0x20')](_0x4c0ac0)[_0xfb3a('0x21')](function(_0x584f3b){return _0x584f3b;});}return null;};}function removeEntity(_0x4e38f6,_0x4eea00){return function(_0x554d3a){if(_0x554d3a){return _0x554d3a[_0xfb3a('0x22')]()[_0xfb3a('0x21')](function(){_0x4e38f6[_0xfb3a('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x47516b,_0x8a5ae8){return function(_0x2e8f9e){if(!_0x2e8f9e){_0x47516b[_0xfb3a('0x14')](0x194);}return _0x2e8f9e;};}function handleError(_0xab3496,_0x564a6c){_0x564a6c=_0x564a6c||0x1f4;return function(_0x2e7530){logger[_0xfb3a('0x23')](_0x2e7530['stack']);if(_0x2e7530['name']){delete _0x2e7530[_0xfb3a('0x24')];}_0xab3496[_0xfb3a('0x15')](_0x564a6c)[_0xfb3a('0x25')](_0x2e7530);};}exports[_0xfb3a('0x26')]=function(_0x3a6753,_0x29839e){var _0x4f08ce={},_0x8c34f4={},_0x151c39={'count':0x0,'rows':[]};var _0x1e8777=_[_0xfb3a('0x27')](db[_0xfb3a('0x28')][_0xfb3a('0x29')],function(_0x39aab8){return{'name':_0x39aab8['fieldName'],'type':_0x39aab8[_0xfb3a('0x2a')][_0xfb3a('0x2b')]};});_0x8c34f4[_0xfb3a('0x2c')]=_[_0xfb3a('0x2d')](_['map'](_0x1e8777,_0xfb3a('0x24')),[_0xfb3a('0x24')]);_0x8c34f4['query']=_[_0xfb3a('0x2e')](_0x3a6753['query']);_0x8c34f4[_0xfb3a('0x2f')]=_[_0xfb3a('0x30')](_0x8c34f4[_0xfb3a('0x2c')],_0x8c34f4[_0xfb3a('0x31')]);_0x4f08ce[_0xfb3a('0x32')]=_[_0xfb3a('0x30')](_0x8c34f4[_0xfb3a('0x2c')],qs[_0xfb3a('0x33')](_0x3a6753[_0xfb3a('0x31')]['fields']));_0x4f08ce['attributes']=_0x4f08ce[_0xfb3a('0x32')][_0xfb3a('0x34')]?_0x4f08ce[_0xfb3a('0x32')]:_0x8c34f4[_0xfb3a('0x2c')];if(!_0x3a6753['query'][_0xfb3a('0x35')]('nolimit')){_0x4f08ce[_0xfb3a('0x19')]=qs[_0xfb3a('0x19')](_0x3a6753[_0xfb3a('0x31')][_0xfb3a('0x19')]);_0x4f08ce[_0xfb3a('0x17')]=qs[_0xfb3a('0x17')](_0x3a6753[_0xfb3a('0x31')]['offset']);}_0x4f08ce['order']=qs['sort'](_0x3a6753[_0xfb3a('0x31')][_0xfb3a('0x36')]);_0x4f08ce[_0xfb3a('0x37')]=qs[_0xfb3a('0x2f')](_[_0xfb3a('0x38')](_0x3a6753[_0xfb3a('0x31')],_0x8c34f4['filters']),_0x1e8777);if(_0x3a6753['query'][_0xfb3a('0x39')]){_0x4f08ce[_0xfb3a('0x37')]=_['merge'](_0x4f08ce[_0xfb3a('0x37')],{'$or':_['map'](_0x1e8777,function(_0x427e10){if(_0x427e10[_0xfb3a('0x2a')]!=='VIRTUAL'){var _0x4b0cdb={};_0x4b0cdb[_0x427e10['name']]={'$like':'%'+_0x3a6753[_0xfb3a('0x31')][_0xfb3a('0x39')]+'%'};return _0x4b0cdb;}})});}_0x4f08ce=_['merge']({},_0x4f08ce,_0x3a6753[_0xfb3a('0x3a')]);var _0x14a2c3={'where':_0x4f08ce[_0xfb3a('0x37')]};return db[_0xfb3a('0x28')]['count'](_0x14a2c3)[_0xfb3a('0x21')](function(_0x416ebf){_0x151c39[_0xfb3a('0x1a')]=_0x416ebf;if(_0x3a6753['query']['includeAll']){_0x4f08ce[_0xfb3a('0x3b')]=[{'all':!![]}];}return db[_0xfb3a('0x28')][_0xfb3a('0x3c')](_0x4f08ce);})[_0xfb3a('0x21')](function(_0x14d9cb){_0x151c39[_0xfb3a('0x3d')]=_0x14d9cb;return _0x151c39;})[_0xfb3a('0x21')](respondWithFilteredResult(_0x29839e,_0x4f08ce))[_0xfb3a('0x3e')](handleError(_0x29839e,null));};exports[_0xfb3a('0x3f')]=function(_0x79c40,_0x4f8212){var _0x32217f={'raw':!![],'where':{'id':_0x79c40[_0xfb3a('0x40')]['id']}},_0x77534b={};_0x77534b['model']=_[_0xfb3a('0x2e')](db['VoiceMailMessage'][_0xfb3a('0x29')]);_0x77534b['query']=_['keys'](_0x79c40[_0xfb3a('0x31')]);_0x77534b[_0xfb3a('0x2f')]=_[_0xfb3a('0x30')](_0x77534b[_0xfb3a('0x2c')],_0x77534b[_0xfb3a('0x31')]);_0x32217f[_0xfb3a('0x32')]=_[_0xfb3a('0x30')](_0x77534b['model'],qs['fields'](_0x79c40[_0xfb3a('0x31')]['fields']));_0x32217f[_0xfb3a('0x32')]=_0x32217f['attributes'][_0xfb3a('0x34')]?_0x32217f[_0xfb3a('0x32')]:_0x77534b[_0xfb3a('0x2c')];if(_0x79c40[_0xfb3a('0x31')]['includeAll']){_0x32217f[_0xfb3a('0x3b')]=[{'all':!![]}];}_0x32217f=_[_0xfb3a('0x41')]({},_0x32217f,_0x79c40[_0xfb3a('0x3a')]);return db[_0xfb3a('0x28')][_0xfb3a('0x42')](_0x32217f)[_0xfb3a('0x21')](handleEntityNotFound(_0x4f8212,null))['then'](respondWithResult(_0x4f8212,null))['catch'](handleError(_0x4f8212,null));};exports['create']=function(_0xa8bc57,_0x110960){return db[_0xfb3a('0x28')][_0xfb3a('0x43')](_0xa8bc57[_0xfb3a('0x44')],{})['then'](respondWithResult(_0x110960,0xc9))['catch'](handleError(_0x110960,null));};exports[_0xfb3a('0x20')]=function(_0x2fe188,_0x3d90d2){if(_0x2fe188[_0xfb3a('0x44')]['id']){delete _0x2fe188[_0xfb3a('0x44')]['id'];}return db[_0xfb3a('0x28')][_0xfb3a('0x42')]({'where':{'id':_0x2fe188[_0xfb3a('0x40')]['id']}})[_0xfb3a('0x21')](handleEntityNotFound(_0x3d90d2,null))[_0xfb3a('0x21')](saveUpdates(_0x2fe188['body'],null))['then'](respondWithResult(_0x3d90d2,null))[_0xfb3a('0x3e')](handleError(_0x3d90d2,null));};exports[_0xfb3a('0x22')]=function(_0x10b112,_0x39952a){return db[_0xfb3a('0x28')]['find']({'where':{'id':_0x10b112[_0xfb3a('0x40')]['id']}})[_0xfb3a('0x21')](handleEntityNotFound(_0x39952a,null))['then'](removeEntity(_0x39952a,null))[_0xfb3a('0x3e')](handleError(_0x39952a,null));};exports[_0xfb3a('0x45')]=function(_0x4f3713,_0x1c02b8,_0x369d4f){return db[_0xfb3a('0x28')]['find']({'where':{'id':_0x4f3713[_0xfb3a('0x40')]['id']},'attributes':['id',_0xfb3a('0x46'),_0xfb3a('0x47')]})[_0xfb3a('0x21')](handleEntityNotFound(_0x1c02b8,null))[_0xfb3a('0x21')](function(_0x4828c8){if(_0x4828c8){if(!_0x4828c8['recording']){throw new db[(_0xfb3a('0x48'))][(_0xfb3a('0x49'))](_0xfb3a('0x4a'));}var _0x35f647={'Content-Type':_0xfb3a('0x4b'),'Content-Disposition':_0xfb3a('0x4c')};if(_0x4828c8[_0xfb3a('0x47')]){_0x35f647['Content-Disposition']='attachment;\x20filename=\x22'+_0x4828c8[_0xfb3a('0x47')]+'.wav\x22';}_0x1c02b8['set'](_0x35f647);return _0x1c02b8['send'](new Buffer(_0x4828c8['recording']));}})[_0xfb3a('0x3e')](handleError(_0x1c02b8,null));}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.model.js b/server/api/voiceMailMessage/voiceMailMessage.model.js index 9a36a18..2803f47 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 _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 +var _0xa87b=['path','rimraf','../../config/environment','./voiceMailMessage.attributes','exports','define','VoiceMailMessage','dir','lodash','util','../../config/logger','api'];(function(_0x4e8bdb,_0x4f0518){var _0x24e0f2=function(_0x3b540d){while(--_0x3b540d){_0x4e8bdb['push'](_0x4e8bdb['shift']());}};_0x24e0f2(++_0x4f0518);}(_0xa87b,0x104));var _0xba87=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa87b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xba87('0x0'));var util=require(_0xba87('0x1'));var logger=require(_0xba87('0x2'))(_0xba87('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xba87('0x4'));var rimraf=require(_0xba87('0x5'));var config=require(_0xba87('0x6'));var attributes=require(_0xba87('0x7'));module[_0xba87('0x8')]=function(_0x3fb9c0,_0x2243cb){return _0x3fb9c0[_0xba87('0x9')](_0xba87('0xa'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0xba87('0xb'),'fields':[_0xba87('0xb')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.rpc.js b/server/api/voiceMailMessage/voiceMailMessage.rpc.js index d962bb3..9b878bf 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 _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 +var _0x69b2=['stringify','error','code','message','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','VoiceMailMessage,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x50b061,_0x12dd51){var _0x3b6616=function(_0x138acc){while(--_0x138acc){_0x50b061['push'](_0x50b061['shift']());}};_0x3b6616(++_0x12dd51);}(_0x69b2,0x1e9));var _0x269b=function(_0x2cf2e9,_0xd58ea1){_0x2cf2e9=_0x2cf2e9-0x0;var _0xd3670d=_0x69b2[_0x2cf2e9];return _0xd3670d;};'use strict';var _=require(_0x269b('0x0'));var util=require(_0x269b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x269b('0x2'));var fs=require('fs');var Redis=require(_0x269b('0x3'));var db=require(_0x269b('0x4'))['db'];var utils=require(_0x269b('0x5'));var logger=require(_0x269b('0x6'))(_0x269b('0x7'));var config=require('../../config/environment');var jayson=require(_0x269b('0x8'));var client=jayson[_0x269b('0x9')][_0x269b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x14a39e,_0x4025b1,_0x3caba4){return new BPromise(function(_0x4795f0,_0x19f220){return client[_0x269b('0xb')](_0x14a39e,_0x3caba4)[_0x269b('0xc')](function(_0x3d5618){logger[_0x269b('0xd')](_0x269b('0xe'),_0x4025b1,_0x269b('0xf'));logger[_0x269b('0x10')]('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x4025b1,'request\x20sent',JSON[_0x269b('0x11')](_0x3d5618));if(_0x3d5618[_0x269b('0x12')]){if(_0x3d5618[_0x269b('0x12')][_0x269b('0x13')]===0x1f4){logger[_0x269b('0x12')](_0x269b('0xe'),_0x4025b1,_0x3d5618[_0x269b('0x12')][_0x269b('0x14')]);return _0x19f220(_0x3d5618[_0x269b('0x12')]['message']);}logger[_0x269b('0x12')](_0x269b('0xe'),_0x4025b1,_0x3d5618[_0x269b('0x12')][_0x269b('0x14')]);return _0x4795f0(_0x3d5618[_0x269b('0x12')]['message']);}else{logger[_0x269b('0xd')](_0x269b('0xe'),_0x4025b1,_0x269b('0xf'));_0x4795f0(_0x3d5618['result'][_0x269b('0x14')]);}})[_0x269b('0x15')](function(_0xc11452){logger['error'](_0x269b('0xe'),_0x4025b1,_0xc11452);_0x19f220(_0xc11452);});});} \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/index.js b/server/api/voiceMusicOnHold/index.js index f93e554..e206b43 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 _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 +var _0xa468=['../../components/interaction/service','../../config/environment','./voiceMusicOnHold.controller','isAuthenticated','/:id','show','/:id/sounds','getSounds','post','create','addSound','put','delete','destroy','/:id/sounds/:id2','removeSound','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x4e5a67,_0x64bbe2){var _0xd53f83=function(_0x5929aa){while(--_0x5929aa){_0x4e5a67['push'](_0x4e5a67['shift']());}};_0xd53f83(++_0x64bbe2);}(_0xa468,0xe9));var _0x8a46=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa468[_0x5b644e];return _0x49c6bf;};'use strict';var multer=require(_0x8a46('0x0'));var util=require(_0x8a46('0x1'));var path=require('path');var timeout=require(_0x8a46('0x2'));var express=require(_0x8a46('0x3'));var router=express[_0x8a46('0x4')]();var fs_extra=require(_0x8a46('0x5'));var auth=require(_0x8a46('0x6'));var interaction=require(_0x8a46('0x7'));var config=require(_0x8a46('0x8'));var controller=require(_0x8a46('0x9'));router['get']('/',auth[_0x8a46('0xa')](),controller['index']);router['get'](_0x8a46('0xb'),auth[_0x8a46('0xa')](),controller[_0x8a46('0xc')]);router['get'](_0x8a46('0xd'),auth[_0x8a46('0xa')](),controller[_0x8a46('0xe')]);router[_0x8a46('0xf')]('/',auth[_0x8a46('0xa')](),controller[_0x8a46('0x10')]);router[_0x8a46('0xf')](_0x8a46('0xd'),auth['isAuthenticated'](),controller[_0x8a46('0x11')]);router[_0x8a46('0x12')](_0x8a46('0xb'),auth[_0x8a46('0xa')](),controller['update']);router[_0x8a46('0x13')]('/:id',auth[_0x8a46('0xa')](),controller[_0x8a46('0x14')]);router[_0x8a46('0x13')](_0x8a46('0x15'),auth[_0x8a46('0xa')](),controller[_0x8a46('0x16')]);module[_0x8a46('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 f99fae5..b79a88e 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 _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 +var _0x1895=['STRING','ENUM','custom','mp3nb','quietmp3nb','mp3','files','BOOLEAN','exports'];(function(_0x2cbde5,_0x30c5a4){var _0xcb74aa=function(_0x138855){while(--_0x138855){_0x2cbde5['push'](_0x2cbde5['shift']());}};_0xcb74aa(++_0x30c5a4);}(_0x1895,0xf2));var _0x5189=function(_0x2db252,_0x1edda1){_0x2db252=_0x2db252-0x0;var _0x619f1a=_0x1895[_0x2db252];return _0x619f1a;};'use strict';var Sequelize=require('sequelize');module[_0x5189('0x0')]={'name':{'type':Sequelize[_0x5189('0x1')],'allowNull':![],'unique':'name'},'mode':{'type':Sequelize[_0x5189('0x2')](_0x5189('0x3'),'files',_0x5189('0x4'),_0x5189('0x5'),'quietmp3',_0x5189('0x6')),'allowNull':!![],'defaultValue':_0x5189('0x7')},'directory':{'type':Sequelize[_0x5189('0x1')],'allowNull':!![]},'application':{'type':Sequelize[_0x5189('0x1')],'allowNull':!![]},'digit':{'type':Sequelize[_0x5189('0x1')],'allowNull':!![]},'sort':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'alpha'},'format':{'type':Sequelize[_0x5189('0x1')],'allowNull':!![]},'stamp':{'type':'TIMESTAMP'},'defaultEntry':{'type':Sequelize[_0x5189('0x8')],'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 ae6df66..cec6b28 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 _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 +var _0xddec=['model','query','keys','filters','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','catch','show','params','intersection','includeAll','update','body','find','create','mode','files','join','root','mkdirSync','directory','0777','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','sequelize','transaction','readdirSync','unlinkSync','Sequelize','ValidationError','addSound','Sound','findOne','server/files/sounds/converted','format','%s.%s','basename','save_name','converted_format','removeSound','id2','createdAt','message','getSounds','hasOwnProperty','nolimit','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','MusicOnHolds','UserProfileResource','error','name','send','map','VoiceMusicOnHold','rawAttributes','type','key'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xddec,0x182));var _0xcdde=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xddec[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcdde('0x0'));var zipdir=require(_0xcdde('0x1'));var jsonpatch=require(_0xcdde('0x2'));var rp=require('request-promise');var moment=require(_0xcdde('0x3'));var BPromise=require(_0xcdde('0x4'));var Mustache=require('mustache');var util=require(_0xcdde('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0xcdde('0x6'));var ejs=require(_0xcdde('0x7'));var fs=require('fs');var fs_extra=require(_0xcdde('0x8'));var _=require(_0xcdde('0x9'));var squel=require(_0xcdde('0xa'));var crypto=require(_0xcdde('0xb'));var jsforce=require(_0xcdde('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xcdde('0x6'));var querystring=require(_0xcdde('0xd'));var Papa=require(_0xcdde('0xe'));var Redis=require(_0xcdde('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xcdde('0x10'));var hardwareService=require(_0xcdde('0x11'));var logger=require(_0xcdde('0x12'))(_0xcdde('0x13'));var utils=require('../../config/utils');var config=require(_0xcdde('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xcdde('0x15'))['db'];function respondWithStatusCode(_0x538bc1,_0x227a20){_0x227a20=_0x227a20||0xcc;return function(_0x3d60ea){if(_0x3d60ea){return _0x538bc1[_0xcdde('0x16')](_0x227a20);}return _0x538bc1[_0xcdde('0x17')](_0x227a20)[_0xcdde('0x18')]();};}function respondWithResult(_0x1753eb,_0x4cd8c1){_0x4cd8c1=_0x4cd8c1||0xc8;return function(_0x10ee02){if(_0x10ee02){return _0x1753eb[_0xcdde('0x17')](_0x4cd8c1)[_0xcdde('0x19')](_0x10ee02);}};}function respondWithFilteredResult(_0x220d33,_0x271560){return function(_0x4ace20){if(_0x4ace20){var _0x49f63a=typeof _0x271560['offset']===_0xcdde('0x1a')&&typeof _0x271560[_0xcdde('0x1b')]===_0xcdde('0x1a');var _0x2c81a9=_0x4ace20[_0xcdde('0x1c')];var _0x4d5516=_0x49f63a?0x0:_0x271560[_0xcdde('0x1d')];var _0x57a2a6=_0x49f63a?_0x4ace20['count']:_0x271560[_0xcdde('0x1d')]+_0x271560[_0xcdde('0x1b')];var _0xe7298a;if(_0x57a2a6>=_0x2c81a9){_0x57a2a6=_0x2c81a9;_0xe7298a=0xc8;}else{_0xe7298a=0xce;}_0x220d33[_0xcdde('0x17')](_0xe7298a);return _0x220d33[_0xcdde('0x1e')](_0xcdde('0x1f'),_0x4d5516+'-'+_0x57a2a6+'/'+_0x2c81a9)['json'](_0x4ace20);}return null;};}function patchUpdates(_0x2d4a94){return function(_0x3ca23d){try{jsonpatch[_0xcdde('0x20')](_0x3ca23d,_0x2d4a94,!![]);}catch(_0x3b1c17){return BPromise[_0xcdde('0x21')](_0x3b1c17);}return _0x3ca23d[_0xcdde('0x22')]();};}function saveUpdates(_0x53bca0,_0x1b4aeb){return function(_0x2d1e78){if(_0x2d1e78){return _0x2d1e78['update'](_0x53bca0)[_0xcdde('0x23')](function(_0x1e9f8c){return _0x1e9f8c;});}return null;};}function removeEntity(_0x1313ec,_0x4fec3e){return function(_0x499ea1){if(_0x499ea1){return _0x499ea1['destroy']()[_0xcdde('0x23')](function(){var _0x177b75=_0x499ea1['get']({'plain':!![]});var _0x3618a5=_0xcdde('0x24');return db[_0xcdde('0x25')]['destroy']({'where':{'type':_0x3618a5,'resourceId':_0x177b75['id']}})[_0xcdde('0x23')](function(){return _0x499ea1;});})[_0xcdde('0x23')](function(){_0x1313ec[_0xcdde('0x17')](0xcc)[_0xcdde('0x18')]();});}};}function handleEntityNotFound(_0x4905c5,_0x57076d){return function(_0x3daf7c){if(!_0x3daf7c){_0x4905c5[_0xcdde('0x16')](0x194);}return _0x3daf7c;};}function handleError(_0x9fc6ea,_0x16d174){_0x16d174=_0x16d174||0x1f4;return function(_0x54b0e7){logger[_0xcdde('0x26')](_0x54b0e7['stack']);if(_0x54b0e7[_0xcdde('0x27')]){delete _0x54b0e7[_0xcdde('0x27')];}_0x9fc6ea[_0xcdde('0x17')](_0x16d174)[_0xcdde('0x28')](_0x54b0e7);};}exports['index']=function(_0x3c5c4f,_0x519494){var _0x7ba9ee={},_0x29bdbd={},_0x1500ea={'count':0x0,'rows':[]};var _0xaeb03d=_[_0xcdde('0x29')](db[_0xcdde('0x2a')][_0xcdde('0x2b')],function(_0x4f3ffa){return{'name':_0x4f3ffa['fieldName'],'type':_0x4f3ffa[_0xcdde('0x2c')][_0xcdde('0x2d')]};});_0x29bdbd[_0xcdde('0x2e')]=_[_0xcdde('0x29')](_0xaeb03d,_0xcdde('0x27'));_0x29bdbd[_0xcdde('0x2f')]=_[_0xcdde('0x30')](_0x3c5c4f[_0xcdde('0x2f')]);_0x29bdbd[_0xcdde('0x31')]=_['intersection'](_0x29bdbd['model'],_0x29bdbd[_0xcdde('0x2f')]);_0x7ba9ee[_0xcdde('0x32')]=_['intersection'](_0x29bdbd[_0xcdde('0x2e')],qs[_0xcdde('0x33')](_0x3c5c4f[_0xcdde('0x2f')]['fields']));_0x7ba9ee[_0xcdde('0x32')]=_0x7ba9ee[_0xcdde('0x32')][_0xcdde('0x34')]?_0x7ba9ee[_0xcdde('0x32')]:_0x29bdbd[_0xcdde('0x2e')];if(!_0x3c5c4f['query']['hasOwnProperty']('nolimit')){_0x7ba9ee[_0xcdde('0x1b')]=qs['limit'](_0x3c5c4f['query'][_0xcdde('0x1b')]);_0x7ba9ee['offset']=qs[_0xcdde('0x1d')](_0x3c5c4f['query'][_0xcdde('0x1d')]);}_0x7ba9ee[_0xcdde('0x35')]=qs['sort'](_0x3c5c4f[_0xcdde('0x2f')][_0xcdde('0x36')]);delete _0x3c5c4f['query'][_0xcdde('0x36')];_0x7ba9ee[_0xcdde('0x37')]=qs[_0xcdde('0x31')](_[_0xcdde('0x38')](_0x3c5c4f[_0xcdde('0x2f')],_0x29bdbd[_0xcdde('0x31')]),_0xaeb03d);if(_0x3c5c4f[_0xcdde('0x2f')][_0xcdde('0x39')]){_0x7ba9ee['where']=_[_0xcdde('0x3a')](_0x7ba9ee[_0xcdde('0x37')],{'$or':_[_0xcdde('0x29')](_0xaeb03d,function(_0xcffd1){if(_0xcffd1['type']!==_0xcdde('0x3b')){var _0x15b848={};_0x15b848[_0xcffd1[_0xcdde('0x27')]]={'$like':'%'+_0x3c5c4f[_0xcdde('0x2f')][_0xcdde('0x39')]+'%'};return _0x15b848;}})});}_0x7ba9ee=_[_0xcdde('0x3a')]({},_0x7ba9ee,_0x3c5c4f['options']);var _0x3e849b={'where':_0x7ba9ee[_0xcdde('0x37')]};return db[_0xcdde('0x2a')][_0xcdde('0x1c')](_0x3e849b)['then'](function(_0x3e0c63){_0x1500ea[_0xcdde('0x1c')]=_0x3e0c63;if(_0x3c5c4f[_0xcdde('0x2f')]['includeAll']){_0x7ba9ee[_0xcdde('0x3c')]=[{'all':!![]}];}return db[_0xcdde('0x2a')][_0xcdde('0x3d')](_0x7ba9ee);})[_0xcdde('0x23')](function(_0x3b8ded){_0x1500ea['rows']=_0x3b8ded;return _0x1500ea;})[_0xcdde('0x23')](respondWithFilteredResult(_0x519494,_0x7ba9ee))[_0xcdde('0x3e')](handleError(_0x519494,null));};exports[_0xcdde('0x3f')]=function(_0x5a9601,_0x18f878){var _0x30a757={'raw':![],'where':{'id':_0x5a9601[_0xcdde('0x40')]['id']}},_0x52f58e={};_0x52f58e[_0xcdde('0x2e')]=_[_0xcdde('0x30')](db[_0xcdde('0x2a')][_0xcdde('0x2b')]);_0x52f58e['query']=_[_0xcdde('0x30')](_0x5a9601['query']);_0x52f58e['filters']=_[_0xcdde('0x41')](_0x52f58e['model'],_0x52f58e[_0xcdde('0x2f')]);_0x30a757[_0xcdde('0x32')]=_['intersection'](_0x52f58e[_0xcdde('0x2e')],qs[_0xcdde('0x33')](_0x5a9601[_0xcdde('0x2f')]['fields']));_0x30a757[_0xcdde('0x32')]=_0x30a757[_0xcdde('0x32')][_0xcdde('0x34')]?_0x30a757['attributes']:_0x52f58e[_0xcdde('0x2e')];if(_0x5a9601[_0xcdde('0x2f')][_0xcdde('0x42')]){_0x30a757[_0xcdde('0x3c')]=[{'all':!![]}];}_0x30a757=_[_0xcdde('0x3a')]({},_0x30a757,_0x5a9601['options']);return db[_0xcdde('0x2a')]['find'](_0x30a757)[_0xcdde('0x23')](handleEntityNotFound(_0x18f878,null))[_0xcdde('0x23')](respondWithResult(_0x18f878,null))['catch'](handleError(_0x18f878,null));};exports[_0xcdde('0x43')]=function(_0x27d5e1,_0x2dca6f){if(_0x27d5e1['body']['id']){delete _0x27d5e1[_0xcdde('0x44')]['id'];}return db[_0xcdde('0x2a')][_0xcdde('0x45')]({'where':{'id':_0x27d5e1[_0xcdde('0x40')]['id']}})[_0xcdde('0x23')](handleEntityNotFound(_0x2dca6f,null))['then'](saveUpdates(_0x27d5e1['body'],null))[_0xcdde('0x23')](respondWithResult(_0x2dca6f,null))[_0xcdde('0x3e')](handleError(_0x2dca6f,null));};exports[_0xcdde('0x46')]=function(_0x349f50,_0x1d29a6,_0x3b1b49){return db['sequelize']['transaction'](function(_0x255dde){if(_0x349f50['body'][_0xcdde('0x47')]===_0xcdde('0x48')){_0x349f50[_0xcdde('0x44')]['directory']=path[_0xcdde('0x49')](config[_0xcdde('0x4a')],'server/files/moh',_0x349f50['body'][_0xcdde('0x27')]);}return db[_0xcdde('0x2a')]['create'](_0x349f50[_0xcdde('0x44')],{'transaction':_0x255dde})['then'](function(_0x416ee2){if(_0x349f50[_0xcdde('0x44')][_0xcdde('0x47')]===_0xcdde('0x48')){fs[_0xcdde('0x4b')](_0x416ee2[_0xcdde('0x4c')],parseInt(_0xcdde('0x4d'),0x8));}var _0x3ba9dc=_0x349f50[_0xcdde('0x4e')]['get']({'plain':!![]});if(!_0x3ba9dc)throw new Error(_0xcdde('0x4f'));if(_0x3ba9dc['role']===_0xcdde('0x4e')){var _0x1a36f4=_0x416ee2[_0xcdde('0x50')]({'plain':!![]});return db[_0xcdde('0x51')][_0xcdde('0x45')]({'where':{'name':_0xcdde('0x24'),'userProfileId':_0x3ba9dc[_0xcdde('0x52')]},'raw':!![]})[_0xcdde('0x23')](function(_0x1485d7){if(_0x1485d7&&_0x1485d7[_0xcdde('0x53')]===0x0){return db['UserProfileResource'][_0xcdde('0x46')]({'name':_0x1a36f4[_0xcdde('0x27')],'resourceId':_0x1a36f4['id'],'type':_0x1485d7[_0xcdde('0x27')],'sectionId':_0x1485d7['id']},{})[_0xcdde('0x23')](function(){return _0x416ee2;});}else{return _0x416ee2;}})[_0xcdde('0x3e')](function(_0x2d06e1){logger[_0xcdde('0x26')](_0xcdde('0x54'),_0x2d06e1);});}return _0x416ee2;});})[_0xcdde('0x23')](respondWithResult(_0x1d29a6,0xc9))['catch'](handleError(_0x1d29a6,null));};exports[_0xcdde('0x55')]=function(_0x333777,_0x125df1,_0x1987b4){var _0x2a823c;return db[_0xcdde('0x2a')]['find']({'where':{'id':_0x333777[_0xcdde('0x40')]['id']}})[_0xcdde('0x23')](function(_0x333759){if(_0x333759){return db[_0xcdde('0x56')][_0xcdde('0x57')](function(_0x503ca6){return _0x333759[_0xcdde('0x55')]({'transaction':_0x503ca6,'raw':!![]})['then'](function(_0x7fa4e4){if(_0x7fa4e4['directory']){fs[_0xcdde('0x58')](_0x7fa4e4[_0xcdde('0x4c')])['forEach'](function(_0x1490ed){fs[_0xcdde('0x59')](path[_0xcdde('0x49')](_0x7fa4e4['directory'],_0x1490ed));});fs['rmdirSync'](_0x7fa4e4[_0xcdde('0x4c')]);}return _0x7fa4e4;});})[_0xcdde('0x3e')](function(_0x5ebff4){throw new db[(_0xcdde('0x5a'))][(_0xcdde('0x5b'))](_0x5ebff4['message']);});}})[_0xcdde('0x23')](handleEntityNotFound(_0x125df1,null))[_0xcdde('0x23')](removeEntity(_0x125df1,null))[_0xcdde('0x3e')](handleError(_0x125df1,null));};exports[_0xcdde('0x5c')]=function(_0x3e5321,_0x206e64,_0x3acec6){return db[_0xcdde('0x56')][_0xcdde('0x57')](function(_0x22a2c5){var _0x49bd17;return db['VoiceMusicOnHold'][_0xcdde('0x45')]({'where':{'id':_0x3e5321[_0xcdde('0x40')]['id']}})[_0xcdde('0x23')](function(_0x45d2ee){if(_0x45d2ee){_0x49bd17=_0x45d2ee;return _0x45d2ee[_0xcdde('0x5c')](_0x3e5321[_0xcdde('0x44')]['id'],{'transaction':_0x22a2c5});}})[_0xcdde('0x23')](function(_0x202316){if(_0x202316){return db[_0xcdde('0x5d')][_0xcdde('0x5e')]({'where':{'id':_0x3e5321[_0xcdde('0x44')]['id']},'attributes':['id','name','save_name','converted_format','createdAt'],'raw':!![]});}})[_0xcdde('0x23')](function(_0x55e3b6){if(_0x55e3b6){var _0x32f249=path[_0xcdde('0x49')](config[_0xcdde('0x4a')],_0xcdde('0x5f'),util[_0xcdde('0x60')](_0xcdde('0x61'),path[_0xcdde('0x62')](_0x55e3b6[_0xcdde('0x63')],path['extname'](_0x55e3b6[_0xcdde('0x63')])),_0x55e3b6[_0xcdde('0x64')]));var _0x40891f=path[_0xcdde('0x49')](config[_0xcdde('0x4a')],'server/files/moh',_0x49bd17[_0xcdde('0x27')],util[_0xcdde('0x60')]('%s.%s',_0x55e3b6[_0xcdde('0x27')],_0x55e3b6['converted_format']));fs['symlinkSync'](_0x32f249,_0x40891f);return _0x55e3b6;}})[_0xcdde('0x3e')](function(_0x529587){throw new db[(_0xcdde('0x5a'))][(_0xcdde('0x5b'))](_0x529587['message']);});})[_0xcdde('0x23')](handleEntityNotFound(_0x206e64,null))[_0xcdde('0x23')](respondWithResult(_0x206e64,0xc9))[_0xcdde('0x3e')](handleError(_0x206e64,null));};exports[_0xcdde('0x65')]=function(_0x111f9f,_0x396429,_0x4b9553){return db[_0xcdde('0x56')]['transaction'](function(_0x243ea5){var _0x23888a;return db[_0xcdde('0x2a')][_0xcdde('0x5e')]({'where':{'id':_0x111f9f[_0xcdde('0x40')]['id']}})[_0xcdde('0x23')](handleEntityNotFound(_0x396429,null))[_0xcdde('0x23')](function(_0x1187dc){if(_0x1187dc){_0x23888a=_0x1187dc;return _0x1187dc[_0xcdde('0x65')](_0x111f9f['params'][_0xcdde('0x66')]);}})[_0xcdde('0x23')](function(_0x1b38a3){if(_0x1b38a3){return db[_0xcdde('0x5d')][_0xcdde('0x5e')]({'where':{'id':_0x111f9f[_0xcdde('0x40')]['id2']},'attributes':['id',_0xcdde('0x27'),_0xcdde('0x63'),_0xcdde('0x64'),_0xcdde('0x67')],'raw':!![]});}})['then'](function(_0x2ace23){if(_0x2ace23){fs[_0xcdde('0x59')](path[_0xcdde('0x49')](_0x23888a[_0xcdde('0x4c')],util['format'](_0xcdde('0x61'),_0x2ace23['name'],_0x2ace23[_0xcdde('0x64')])));return _0x2ace23;}})[_0xcdde('0x3e')](function(_0x32c84d){throw new db[(_0xcdde('0x5a'))]['ValidationError'](_0x32c84d[_0xcdde('0x68')]);});})[_0xcdde('0x23')](handleEntityNotFound(_0x396429,null))[_0xcdde('0x23')](respondWithStatusCode(_0x396429,0xcc))[_0xcdde('0x3e')](handleError(_0x396429,null));};exports[_0xcdde('0x69')]=function(_0x37d067,_0x171d07,_0x1a87ed){var _0x2efba5={};var _0x2f24be={};var _0x197308;var _0x5ed643;return db['VoiceMusicOnHold']['findOne']({'where':{'id':_0x37d067[_0xcdde('0x40')]['id']}})[_0xcdde('0x23')](handleEntityNotFound(_0x171d07,null))[_0xcdde('0x23')](function(_0x4fece6){if(_0x4fece6){_0x197308=_0x4fece6;_0x2f24be[_0xcdde('0x2e')]=_[_0xcdde('0x30')](db[_0xcdde('0x5d')][_0xcdde('0x2b')]);_0x2f24be[_0xcdde('0x2f')]=_[_0xcdde('0x30')](_0x37d067[_0xcdde('0x2f')]);_0x2f24be[_0xcdde('0x31')]=_['intersection'](_0x2f24be[_0xcdde('0x2e')],_0x2f24be[_0xcdde('0x2f')]);_0x2efba5[_0xcdde('0x32')]=_[_0xcdde('0x41')](_0x2f24be[_0xcdde('0x2e')],qs[_0xcdde('0x33')](_0x37d067[_0xcdde('0x2f')][_0xcdde('0x33')]));_0x2efba5['attributes']=_0x2efba5[_0xcdde('0x32')][_0xcdde('0x34')]?_0x2efba5['attributes']:_0x2f24be[_0xcdde('0x2e')];_0x2efba5[_0xcdde('0x35')]=qs[_0xcdde('0x36')](_0x37d067[_0xcdde('0x2f')][_0xcdde('0x36')]);_0x2efba5[_0xcdde('0x37')]=qs[_0xcdde('0x31')](_[_0xcdde('0x38')](_0x37d067['query'],_0x2f24be[_0xcdde('0x31')]));if(_0x37d067[_0xcdde('0x2f')][_0xcdde('0x39')]){_0x2efba5[_0xcdde('0x37')]=_[_0xcdde('0x3a')](_0x2efba5['where'],{'$or':_[_0xcdde('0x29')](_0x2efba5[_0xcdde('0x32')],function(_0x4ff72f){var _0x27d9ed={};_0x27d9ed[_0x4ff72f]={'$like':'%'+_0x37d067[_0xcdde('0x2f')][_0xcdde('0x39')]+'%'};return _0x27d9ed;})});}_0x2efba5=_[_0xcdde('0x3a')]({},_0x2efba5,_0x37d067['options']);return _0x197308[_0xcdde('0x69')](_0x2efba5);}})[_0xcdde('0x23')](function(_0x38a43f){if(_0x38a43f){_0x5ed643=_0x38a43f[_0xcdde('0x34')];if(!_0x37d067[_0xcdde('0x2f')][_0xcdde('0x6a')](_0xcdde('0x6b'))){_0x2efba5['limit']=qs[_0xcdde('0x1b')](_0x37d067[_0xcdde('0x2f')][_0xcdde('0x1b')]);_0x2efba5[_0xcdde('0x1d')]=qs[_0xcdde('0x1d')](_0x37d067['query']['offset']);}return _0x197308[_0xcdde('0x69')](_0x2efba5);}})[_0xcdde('0x23')](function(_0x12c9ae){if(_0x12c9ae){return _0x12c9ae?{'count':_0x5ed643,'rows':_0x12c9ae}:null;}})['then'](respondWithResult(_0x171d07,null))[_0xcdde('0x3e')](handleError(_0x171d07,null));}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js index 669de5e..659999d 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 _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 +var _0x2296=['request-promise','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes','exports','VoiceMusicOnHold','voice_musiconhold','util','../../config/logger','api','moment','bluebird'];(function(_0x1fdac6,_0x2c6eea){var _0x28c6a7=function(_0x4fb754){while(--_0x4fb754){_0x1fdac6['push'](_0x1fdac6['shift']());}};_0x28c6a7(++_0x2c6eea);}(_0x2296,0x181));var _0x6229=function(_0x27b93c,_0x1745a2){_0x27b93c=_0x27b93c-0x0;var _0x18c90c=_0x2296[_0x27b93c];return _0x18c90c;};'use strict';var _=require('lodash');var util=require(_0x6229('0x0'));var logger=require(_0x6229('0x1'))(_0x6229('0x2'));var moment=require(_0x6229('0x3'));var BPromise=require(_0x6229('0x4'));var rp=require(_0x6229('0x5'));var fs=require('fs');var path=require(_0x6229('0x6'));var rimraf=require(_0x6229('0x7'));var config=require(_0x6229('0x8'));var attributes=require(_0x6229('0x9'));module[_0x6229('0xa')]=function(_0x5463ed,_0x4ca4f7){return _0x5463ed['define'](_0x6229('0xb'),attributes,{'tableName':_0x6229('0xc'),'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 a11895c..a69357c 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 _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 +var _0x0713=['VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x2fbca2,_0xc72fea){var _0x3b4a75=function(_0x166f4a){while(--_0x166f4a){_0x2fbca2['push'](_0x2fbca2['shift']());}};_0x3b4a75(++_0xc72fea);}(_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 moment=require(_0x3071('0x0'));var BPromise=require(_0x3071('0x1'));var rs=require(_0x3071('0x2'));var fs=require('fs');var Redis=require(_0x3071('0x3'));var db=require(_0x3071('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3071('0x5'))(_0x3071('0x6'));var config=require(_0x3071('0x7'));var jayson=require(_0x3071('0x8'));var client=jayson[_0x3071('0x9')][_0x3071('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d3dd6,_0x2f1e87,_0xbd737f){return new BPromise(function(_0x22274c,_0x3e9a5e){return client[_0x3071('0xb')](_0x1d3dd6,_0xbd737f)[_0x3071('0xc')](function(_0x4a36ec){logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));logger[_0x3071('0x10')](_0x3071('0x11'),_0x2f1e87,'request\x20sent',JSON[_0x3071('0x12')](_0x4a36ec));if(_0x4a36ec[_0x3071('0x13')]){if(_0x4a36ec[_0x3071('0x13')][_0x3071('0x14')]===0x1f4){logger[_0x3071('0x13')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec['error'][_0x3071('0x15')]);return _0x3e9a5e(_0x4a36ec['error'][_0x3071('0x15')]);}logger[_0x3071('0x13')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec[_0x3071('0x13')]['message']);return _0x22274c(_0x4a36ec[_0x3071('0x13')][_0x3071('0x15')]);}else{logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));_0x22274c(_0x4a36ec[_0x3071('0x16')][_0x3071('0x15')]);}})[_0x3071('0x17')](function(_0x21aad3){logger[_0x3071('0x13')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2f1e87,_0x21aad3);_0x3e9a5e(_0x21aad3);});});} \ No newline at end of file diff --git a/server/api/voicePrefix/index.js b/server/api/voicePrefix/index.js index 7c3e655..d7f0a1a 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 _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 +var _0x1910=['put','update','delete','destroy','removeAgents','exports','multer','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./voicePrefix.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getAgents','create','post','addAgents'];(function(_0x15c4b8,_0x467bf7){var _0x1d9891=function(_0xe18c1){while(--_0xe18c1){_0x15c4b8['push'](_0x15c4b8['shift']());}};_0x1d9891(++_0x467bf7);}(_0x1910,0xe7));var _0x0191=function(_0x5a0097,_0xa0547b){_0x5a0097=_0x5a0097-0x0;var _0x134962=_0x1910[_0x5a0097];return _0x134962;};'use strict';var multer=require(_0x0191('0x0'));var util=require('util');var path=require(_0x0191('0x1'));var timeout=require('connect-timeout');var express=require(_0x0191('0x2'));var router=express[_0x0191('0x3')]();var fs_extra=require(_0x0191('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x0191('0x5'));var config=require(_0x0191('0x6'));var controller=require(_0x0191('0x7'));router[_0x0191('0x8')]('/',auth[_0x0191('0x9')](),controller[_0x0191('0xa')]);router['get'](_0x0191('0xb'),auth[_0x0191('0x9')](),controller[_0x0191('0xc')]);router['get'](_0x0191('0xd'),auth[_0x0191('0x9')](),controller[_0x0191('0xe')]);router['get']('/:id/users',auth[_0x0191('0x9')](),controller[_0x0191('0xf')]);router['post']('/',auth[_0x0191('0x9')](),controller[_0x0191('0x10')]);router[_0x0191('0x11')]('/:id/users',auth['isAuthenticated'](),controller[_0x0191('0x12')]);router[_0x0191('0x13')](_0x0191('0xd'),auth[_0x0191('0x9')](),controller[_0x0191('0x14')]);router[_0x0191('0x15')](_0x0191('0xd'),auth[_0x0191('0x9')](),controller[_0x0191('0x16')]);router[_0x0191('0x15')]('/:id/users',auth[_0x0191('0x9')](),controller[_0x0191('0x17')]);module[_0x0191('0x18')]=router; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.attributes.js b/server/api/voicePrefix/voicePrefix.attributes.js index 54fa4f9..435abea 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 _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 +var _0xd296=['name','INTEGER','exports','STRING','VIRTUAL','system-'];(function(_0x4d394d,_0x40e7b3){var _0x4f0003=function(_0x56d25d){while(--_0x56d25d){_0x4d394d['push'](_0x4d394d['shift']());}};_0x4f0003(++_0x40e7b3);}(_0xd296,0x116));var _0x6d29=function(_0x5d07e2,_0x28bb3d){_0x5d07e2=_0x5d07e2-0x0;var _0x18690e=_0xd296[_0x5d07e2];return _0x18690e;};'use strict';var Sequelize=require('sequelize');module[_0x6d29('0x0')]={'name':{'type':Sequelize[_0x6d29('0x1')],'allowNull':![],'unique':'name'},'prefix':{'type':Sequelize[_0x6d29('0x2')],'get':function(_0x5904c4){return _0x6d29('0x3')+this['getDataValue'](_0x6d29('0x4'))+'-';}},'description':{'type':Sequelize[_0x6d29('0x1')]},'callerIdAll':{'type':Sequelize[_0x6d29('0x1')]},'VoiceExtensionId':{'type':Sequelize[_0x6d29('0x5')]}}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.controller.js b/server/api/voicePrefix/voicePrefix.controller.js index 71e096a..ac020fa 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(_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 +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(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xa9e0,0x123));var _0x0a9e=function(_0xc6be3a,_0x540e05){_0xc6be3a=_0xc6be3a-0x0;var _0x56a310=_0xa9e0[_0xc6be3a];return _0x56a310;};'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 416d87d..0ffa55d 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 _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 +var _0xaa9f=['hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x4c6c9f,_0x25c8a9){var _0x31e332=function(_0x55ec4f){while(--_0x55ec4f){_0x4c6c9f['push'](_0x4c6c9f['shift']());}};_0x31e332(++_0x25c8a9);}(_0xaa9f,0x88));var _0xfaa9=function(_0x3074f3,_0x4f2c03){_0x3074f3=_0x3074f3-0x0;var _0x53f112=_0xaa9f[_0x3074f3];return _0x53f112;};'use strict';var EventEmitter=require(_0xfaa9('0x0'));var VoicePrefix=require(_0xfaa9('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xfaa9('0x2')](0x0);var events={'afterCreate':_0xfaa9('0x3'),'afterUpdate':_0xfaa9('0x4'),'afterDestroy':_0xfaa9('0x5')};function emitEvent(_0x50672a){return function(_0x110806,_0x22f157,_0x397c39){VoicePrefixEvents['emit'](_0x50672a+':'+_0x110806['id'],_0x110806);VoicePrefixEvents[_0xfaa9('0x6')](_0x50672a,_0x110806);_0x397c39(null);};}for(var e in events){if(events[_0xfaa9('0x7')](e)){var event=events[e];VoicePrefix[_0xfaa9('0x8')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.model.js b/server/api/voicePrefix/voicePrefix.model.js index 30b798b..f3961dd 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 _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 +var _0x1f29=['../../config/environment','./voicePrefix.attributes','exports','define','VoicePrefix','voice_prefixes','util','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x34f680,_0x436b74){var _0x4730cd=function(_0x52854b){while(--_0x52854b){_0x34f680['push'](_0x34f680['shift']());}};_0x4730cd(++_0x436b74);}(_0x1f29,0x126));var _0x91f2=function(_0x2fc2f0,_0x4d2f3b){_0x2fc2f0=_0x2fc2f0-0x0;var _0x52ffb5=_0x1f29[_0x2fc2f0];return _0x52ffb5;};'use strict';var _=require('lodash');var util=require(_0x91f2('0x0'));var logger=require(_0x91f2('0x1'))('api');var moment=require(_0x91f2('0x2'));var BPromise=require('bluebird');var rp=require(_0x91f2('0x3'));var fs=require('fs');var path=require(_0x91f2('0x4'));var rimraf=require(_0x91f2('0x5'));var config=require(_0x91f2('0x6'));var attributes=require(_0x91f2('0x7'));module[_0x91f2('0x8')]=function(_0x175d3b,_0x38fd58){return _0x175d3b[_0x91f2('0x9')](_0x91f2('0xa'),attributes,{'tableName':_0x91f2('0xb'),'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 6b19f67..565e208 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 _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 +var _0x33af=['result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','error','code','message'];(function(_0x2909e0,_0x1435a0){var _0x3fa757=function(_0x270a96){while(--_0x270a96){_0x2909e0['push'](_0x2909e0['shift']());}};_0x3fa757(++_0x1435a0);}(_0x33af,0xec));var _0xf33a=function(_0x190015,_0x1799f4){_0x190015=_0x190015-0x0;var _0x4231ef=_0x33af[_0x190015];return _0x4231ef;};'use strict';var _=require('lodash');var util=require(_0xf33a('0x0'));var moment=require('moment');var BPromise=require(_0xf33a('0x1'));var rs=require(_0xf33a('0x2'));var fs=require('fs');var Redis=require(_0xf33a('0x3'));var db=require(_0xf33a('0x4'))['db'];var utils=require(_0xf33a('0x5'));var logger=require(_0xf33a('0x6'))('rpc');var config=require(_0xf33a('0x7'));var jayson=require(_0xf33a('0x8'));var client=jayson['client'][_0xf33a('0x9')]({'port':0x232a});config[_0xf33a('0xa')]=_[_0xf33a('0xb')](config[_0xf33a('0xa')],{'host':_0xf33a('0xc'),'port':0x18eb});var socket=require(_0xf33a('0xd'))(new Redis(config['redis']));require(_0xf33a('0xe'))[_0xf33a('0xf')](socket);function respondWithRpcPromise(_0x115e08,_0x457b3b,_0x44ee7f){return new BPromise(function(_0x27f30a,_0x5074a2){return client['request'](_0x115e08,_0x44ee7f)[_0xf33a('0x10')](function(_0xb47cde){logger[_0xf33a('0x11')](_0xf33a('0x12'),_0x457b3b,_0xf33a('0x13'));logger['debug'](_0xf33a('0x14'),_0x457b3b,_0xf33a('0x13'),JSON['stringify'](_0xb47cde));if(_0xb47cde['error']){if(_0xb47cde[_0xf33a('0x15')][_0xf33a('0x16')]===0x1f4){logger[_0xf33a('0x15')](_0xf33a('0x12'),_0x457b3b,_0xb47cde[_0xf33a('0x15')][_0xf33a('0x17')]);return _0x5074a2(_0xb47cde[_0xf33a('0x15')][_0xf33a('0x17')]);}logger['error'](_0xf33a('0x12'),_0x457b3b,_0xb47cde['error'][_0xf33a('0x17')]);return _0x27f30a(_0xb47cde[_0xf33a('0x15')]['message']);}else{logger[_0xf33a('0x11')](_0xf33a('0x12'),_0x457b3b,'request\x20sent');_0x27f30a(_0xb47cde[_0xf33a('0x18')][_0xf33a('0x17')]);}})[_0xf33a('0x19')](function(_0x2a9f0e){logger['error'](_0xf33a('0x12'),_0x457b3b,_0x2a9f0e);_0x5074a2(_0x2a9f0e);});});} \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.socket.js b/server/api/voicePrefix/voicePrefix.socket.js index e0b3c2f..13e7133 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 _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 +var _0x74fd=['remove','update','emit','removeListener','voicePrefix:','./voicePrefix.events'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x74fd,0x8f));var _0xd74f=function(_0x236c89,_0xd76ba9){_0x236c89=_0x236c89-0x0;var _0x3b2a15=_0x74fd[_0x236c89];return _0x3b2a15;};'use strict';var VoicePrefixEvents=require(_0xd74f('0x0'));var events=['save',_0xd74f('0x1'),_0xd74f('0x2')];function createListener(_0x1562a0,_0x2377f2){return function(_0x3686d5){_0x2377f2[_0xd74f('0x3')](_0x1562a0,_0x3686d5);};}function removeListener(_0x12359c,_0x1037c0){return function(){VoicePrefixEvents[_0xd74f('0x4')](_0x12359c,_0x1037c0);};}exports['register']=function(_0x4bf975){for(var _0x19daee=0x0,_0xf8e312=events['length'];_0x19daee<_0xf8e312;_0x19daee++){var _0x43f684=events[_0x19daee];var _0x161599=createListener(_0xd74f('0x5')+_0x43f684,_0x4bf975);VoicePrefixEvents['on'](_0x43f684,_0x161599);}}; \ No newline at end of file diff --git a/server/api/voiceQueue/index.js b/server/api/voiceQueue/index.js index 46424e7..bf883ff 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 _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 +var _0xefe0=['/:id/hopper_finals','getHopperFinals','getHopperBlacks','getTeams','/:id/members','getMembers','getLists','/:id/blacklists','post','create','/:id/clone','clone','/:id/teams','addTeams','/:id/users','/:id/lists','addLists','addBlackLists','put','update','delete','destroy','removeTeams','removeLists','removeBlackLists','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','/:id','isAuthenticated','show','/:id/hoppers','getHoppers','getHopperHistories'];(function(_0xe45118,_0x5dffbc){var _0x15e15d=function(_0x17eaec){while(--_0x17eaec){_0xe45118['push'](_0xe45118['shift']());}};_0x15e15d(++_0x5dffbc);}(_0xefe0,0x1c8));var _0x0efe=function(_0x24f66d,_0x261e88){_0x24f66d=_0x24f66d-0x0;var _0x147cdb=_0xefe0[_0x24f66d];return _0x147cdb;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x0efe('0x0'));var timeout=require(_0x0efe('0x1'));var express=require(_0x0efe('0x2'));var router=express[_0x0efe('0x3')]();var fs_extra=require(_0x0efe('0x4'));var auth=require(_0x0efe('0x5'));var interaction=require(_0x0efe('0x6'));var config=require(_0x0efe('0x7'));var controller=require(_0x0efe('0x8'));router[_0x0efe('0x9')]('/',auth['isAuthenticated'](),controller[_0x0efe('0xa')]);router[_0x0efe('0x9')](_0x0efe('0xb'),auth[_0x0efe('0xc')](),controller[_0x0efe('0xd')]);router[_0x0efe('0x9')](_0x0efe('0xe'),auth[_0x0efe('0xc')](),controller[_0x0efe('0xf')]);router[_0x0efe('0x9')]('/:id/hopper_histories',auth[_0x0efe('0xc')](),controller[_0x0efe('0x10')]);router['get'](_0x0efe('0x11'),auth['isAuthenticated'](),controller[_0x0efe('0x12')]);router['get']('/:id/hopper_black',auth[_0x0efe('0xc')](),controller[_0x0efe('0x13')]);router['get']('/:id/teams',auth[_0x0efe('0xc')](),controller[_0x0efe('0x14')]);router[_0x0efe('0x9')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router[_0x0efe('0x9')](_0x0efe('0x15'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x16')]);router[_0x0efe('0x9')]('/:id/lists',auth[_0x0efe('0xc')](),controller[_0x0efe('0x17')]);router['get'](_0x0efe('0x18'),auth[_0x0efe('0xc')](),controller['getBlackLists']);router[_0x0efe('0x19')]('/',auth['isAuthenticated'](),controller[_0x0efe('0x1a')]);router[_0x0efe('0x19')](_0x0efe('0x1b'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x1c')]);router['post'](_0x0efe('0x1d'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x1e')]);router[_0x0efe('0x19')](_0x0efe('0x1f'),auth[_0x0efe('0xc')](),controller['addAgents']);router[_0x0efe('0x19')](_0x0efe('0x20'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x21')]);router[_0x0efe('0x19')](_0x0efe('0x18'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x22')]);router[_0x0efe('0x23')]('/:id',auth[_0x0efe('0xc')](),controller[_0x0efe('0x24')]);router[_0x0efe('0x25')](_0x0efe('0xb'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x26')]);router[_0x0efe('0x25')](_0x0efe('0x1d'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x27')]);router['delete'](_0x0efe('0x1f'),auth[_0x0efe('0xc')](),controller['removeAgents']);router[_0x0efe('0x25')](_0x0efe('0x20'),auth[_0x0efe('0xc')](),controller[_0x0efe('0x28')]);router[_0x0efe('0x25')](_0x0efe('0x18'),auth['isAuthenticated'](),controller[_0x0efe('0x29')]);module[_0x0efe('0x2a')]=router; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.attributes.js b/server/api/voiceQueue/voiceQueue.attributes.js index 1f3dc2e..61af4d8 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 _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 +var _0xe4d4=['INTEGER','yes','once','TEXT','setDataValue','periodic_announce','join','split','joinempty','leavewhenempty','acw','wrapuptime','BOOLEAN','preview','progressive','Dial\x20Method.','UNSIGNED','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','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','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#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','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','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)','Drop\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','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','STRING','name','inbound','outbound','default','ENUM','ringall','leastrecent','fewestcalls','random','rrmemory','wrandom','rrordered','strategy','getDataValue','dialMethod','booked','roundrobin','predictive','power'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xe4d4,0x184));var _0x4e4d=function(_0x3d69b1,_0x44e719){_0x3d69b1=_0x3d69b1-0x0;var _0x2700ed=_0xe4d4[_0x3d69b1];return _0x2700ed;};'use strict';var Sequelize=require(_0x4e4d('0x0'));module[_0x4e4d('0x1')]={'name':{'type':Sequelize[_0x4e4d('0x2')],'allowNull':![],'unique':_0x4e4d('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x4e4d('0x4'),_0x4e4d('0x5')),'allowNull':![],'defaultValue':_0x4e4d('0x4')},'musiconhold':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':_0x4e4d('0x6')},'announce':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x4e4d('0x7')]('rr',_0x4e4d('0x8'),_0x4e4d('0x9'),_0x4e4d('0xa'),_0x4e4d('0xb'),_0x4e4d('0xc'),'linear',_0x4e4d('0xd'),_0x4e4d('0xe')),'allowNull':![],'defaultValue':_0x4e4d('0x8'),'set':function(_0x754947){this['setDataValue'](_0x4e4d('0xf'),_0x754947?_0x754947:_0x4e4d('0xc'));},'get':function(){var _0x28eecf=this['getDataValue']('type');var _0x2609b4=this[_0x4e4d('0x10')](_0x4e4d('0x11'));var _0x259c79=this[_0x4e4d('0x10')]('strategy');if(_0x28eecf===_0x4e4d('0x4')){return _0x259c79;}if(_0x2609b4===_0x4e4d('0x12')&&_0x259c79===_0x4e4d('0xc')||_0x2609b4==='booked'&&_0x259c79===_0x4e4d('0x13')){return _0x259c79;}if(_0x2609b4==='progressive'||_0x2609b4===_0x4e4d('0x14')||_0x2609b4===_0x4e4d('0x15')){return _0x259c79;}return null;}},'servicelevel':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize['INTEGER'](0xb)},'timeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x4e4d('0x2')]},'weight':{'type':Sequelize[_0x4e4d('0x16')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x4e4d('0x7')]('yes','no'),'defaultValue':_0x4e4d('0x17')},'autopause':{'type':Sequelize['ENUM'](_0x4e4d('0x17'),'no','all'),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x4e4d('0x16')](0xb)},'autopausebusy':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize['ENUM'](_0x4e4d('0x17'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x4e4d('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x4e4d('0x2')],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize['ENUM'](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'yes'},'announce_holdtime':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no',_0x4e4d('0x18')),'defaultValue':'no'},'announce_position':{'type':Sequelize['STRING'],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no')},'announce_position_limit':{'type':Sequelize['INTEGER'](0xb)},'announce_round_seconds':{'type':Sequelize[_0x4e4d('0x7')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x4e4d('0x2')]},'queue_youarenext':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize['STRING'],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x4e4d('0x2')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x4e4d('0x2')]},'queue_quantity1':{'type':Sequelize['STRING']},'queue_quantity2':{'type':Sequelize['STRING']},'queue_periodic_announce':{'type':Sequelize['STRING']},'queue_less_than':{'type':Sequelize['STRING']},'periodic_announce':{'type':Sequelize[_0x4e4d('0x19')],'set':function(_0x24bfa7){this[_0x4e4d('0x1a')](_0x4e4d('0x1b'),_0x24bfa7?_0x24bfa7[_0x4e4d('0x1c')](','):[]);},'get':function(){return this[_0x4e4d('0x10')](_0x4e4d('0x1b'))?this[_0x4e4d('0x10')](_0x4e4d('0x1b'))[_0x4e4d('0x1d')](','):[];}},'joinempty':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':_0x4e4d('0x17'),'set':function(_0x3f37ec){this[_0x4e4d('0x1a')](_0x4e4d('0x1e'),_0x3f37ec?_0x3f37ec['join'](','):undefined);},'get':function(){return this[_0x4e4d('0x10')](_0x4e4d('0x1e'))?this[_0x4e4d('0x10')]('joinempty')[_0x4e4d('0x1d')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':'no','set':function(_0x5c313f){this[_0x4e4d('0x1a')](_0x4e4d('0x1f'),_0x5c313f?_0x5c313f['join'](','):undefined);},'get':function(){return this[_0x4e4d('0x10')]('leavewhenempty')?this[_0x4e4d('0x10')](_0x4e4d('0x1f'))[_0x4e4d('0x1d')](','):undefined;}},'reportholdtime':{'type':Sequelize['ENUM'](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x17'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x4e4d('0x7')]('yes','no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x4e4d('0x2')]},'description':{'type':Sequelize[_0x4e4d('0x2')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x34008a){this[_0x4e4d('0x1a')](_0x4e4d('0x20'),_0x34008a);if(_0x34008a){if(this[_0x4e4d('0x10')](_0x4e4d('0x21'))<0x2){this[_0x4e4d('0x1a')]('wrapuptime',0x2);}}}},'acwTimeout':{'type':Sequelize[_0x4e4d('0x16')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x4e4d('0x22')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'dialMethod':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x23'),_0x4e4d('0x24'),_0x4e4d('0x15'),'predictive','booked'),'defaultValue':_0x4e4d('0x24'),'comment':_0x4e4d('0x25')},'dialLimitChannel':{'type':Sequelize[_0x4e4d('0x16')](0x4)[_0x4e4d('0x26')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20channels,\x200\x20means\x20unlimited.'},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x4e4d('0x26')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x4e4d('0x27')},'dialPowerLevel':{'type':Sequelize['FLOAT'](0x2)[_0x4e4d('0x26')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x4e4d('0x28')},'dialPredictiveOptimization':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x29'),_0x4e4d('0x2a')),'defaultValue':'dropRate','comment':_0x4e4d('0x2b')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x4e4d('0x2c')](0x2)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':'Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)'},'dialPredictiveInterval':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x4e4d('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x2d')},'dialQueueOptions':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':_0x4e4d('0x2e'),'comment':_0x4e4d('0x2f')},'dialQueueTimeout':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x30')},'dialQueueProject':{'type':Sequelize[_0x4e4d('0x2')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialCongestionMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x31')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x32')},'dialBusyMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x33')},'dialBusyRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x34')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0x4e4d('0x35')},'dialNoAnswerRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x36')},'dialGlobalMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':_0x4e4d('0x37')},'dialPrefix':{'type':Sequelize[_0x4e4d('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x4e4d('0x7')](_0x4e4d('0x38'),_0x4e4d('0x39'),'onlyIfOpen'),'defaultValue':_0x4e4d('0x38')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x4e4d('0x3a')},'dialAMDGreeting':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x4e4d('0x3b')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x4e4d('0x16')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x4e4d('0x3c')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x4e4d('0x3d')},'dialAMDMinWordLength':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x4e4d('0x3e')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x4e4d('0x16')](0x9)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x4e4d('0x3f')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x4e4d('0x16')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x4e4d('0x40')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x4e4d('0x41')},'dialRecallMeTimeout':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':'#RecallMe\x20Timeout\x20(min:1)'},'dialRecallInQueue':{'type':Sequelize[_0x4e4d('0x22')],'defaultValue':0x0,'comment':_0x4e4d('0x42')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM'](_0x4e4d('0x43'),_0x4e4d('0x44')),'defaultValue':'DESC'},'dialQueueProject2':{'type':Sequelize[_0x4e4d('0x2')],'comment':_0x4e4d('0x45')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x4e4d('0x22')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x4e4d('0x22')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x4e4d('0x46')},'dialCutDigit':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x47')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x48')},'dialDropMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x49')},'dialDropRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x4a')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x4b')},'dialMachineRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x4c')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e4d('0x4d')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x4e4d('0x16')](0x5)[_0x4e4d('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e4d('0x4e')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4e4d('0x16')],'allowNull':!![],'comment':_0x4e4d('0x4f')},'mandatoryDisposition':{'type':Sequelize[_0x4e4d('0x22')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x4e4174){if(!_0x4e4174)this[_0x4e4d('0x1a')](_0x4e4d('0x50'),null);this[_0x4e4d('0x1a')](_0x4e4d('0x51'),_0x4e4174);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x4e4d('0x16')](0x3)['UNSIGNED'],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x4e4d('0x16')](0x3)[_0x4e4d('0x26')],'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 7ef55fd..6b6d037 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 _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 +var _0xe381=['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','redis','defaults','socket.io-emitter','./voiceQueue.socket','register','sendStatus','status','json','offset','limit','set','Content-Range','reject','update','then','destroy','get','VoiceQueues','inbound','QueueCampaigns','outbound','filter','ignore','map','value','includes','type','find','name','UserProfileResource','end','error','stack','send','index','VoiceQueue','rawAttributes','fieldName','model','query','filters','intersection','fields','attributes','length','nolimit','sort','where','merge','options','count','includeAll','findAll','rows','show','params','keys','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','catch','clone','updatedAt','body','omit','user','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getHoppers','findOne','CmHopper','order','pick','VoiceQueueId','include','getHopperHistories','CmHopperHistory','hasOwnProperty','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','addTeams','teams','Team','User','flatMap','Agents','forEach','penalty','upsert','UserVoiceQueue','findOrCreate','each','UserVoiceQueueRt','isNil','interface','format','voicePause','emit','userVoiceQueue:save','ids','team_has_voice_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','sequelize','toString','QueryTypes','SELECT','every','all','compact','transaction','removeTeams','isEmpty','removeAgents','userVoiceQueue:remove','addAgents','spread','online','push','isArray','getAgents','getMembers','getLists','addLists','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ListId','select','field','NOW()','CmListId','createdAt','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','onlyIfOpen','ContactId','phone\x20IS\x20NOT\x20NULL','removeLists','getBlackLists','CmList','addBlackLists','cm_hopper_black','removeBlackLists','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js'];(function(_0x8c1005,_0x1f3f16){var _0x175354=function(_0xd0e9c4){while(--_0xd0e9c4){_0x8c1005['push'](_0x8c1005['shift']());}};_0x175354(++_0x1f3f16);}(_0xe381,0x16d));var _0x1e38=function(_0x459b74,_0x5773bd){_0x459b74=_0x459b74-0x0;var _0x46cb16=_0xe381[_0x459b74];return _0x46cb16;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1e38('0x0'));var zipdir=require(_0x1e38('0x1'));var jsonpatch=require(_0x1e38('0x2'));var rp=require(_0x1e38('0x3'));var moment=require(_0x1e38('0x4'));var BPromise=require(_0x1e38('0x5'));var Mustache=require(_0x1e38('0x6'));var util=require(_0x1e38('0x7'));var path=require('path');var sox=require(_0x1e38('0x8'));var csv=require(_0x1e38('0x9'));var ejs=require(_0x1e38('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1e38('0xb'));var squel=require('squel');var crypto=require(_0x1e38('0xc'));var jsforce=require(_0x1e38('0xd'));var deskjs=require(_0x1e38('0xe'));var toCsv=require(_0x1e38('0x9'));var querystring=require(_0x1e38('0xf'));var Papa=require(_0x1e38('0x10'));var Redis=require(_0x1e38('0x11'));var authService=require(_0x1e38('0x12'));var qs=require(_0x1e38('0x13'));var as=require(_0x1e38('0x14'));var hardwareService=require(_0x1e38('0x15'));var logger=require(_0x1e38('0x16'))(_0x1e38('0x17'));var utils=require(_0x1e38('0x18'));var config=require(_0x1e38('0x19'));var licenseUtil=require(_0x1e38('0x1a'));var db=require(_0x1e38('0x1b'))['db'];config[_0x1e38('0x1c')]=_[_0x1e38('0x1d')](config[_0x1e38('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0x1e38('0x1e'))(new Redis(config[_0x1e38('0x1c')]));require(_0x1e38('0x1f'))[_0x1e38('0x20')](socket);function respondWithStatusCode(_0x49cdaf,_0x13d5cd){_0x13d5cd=_0x13d5cd||0xcc;return function(_0x2e82d8){if(_0x2e82d8){return _0x49cdaf[_0x1e38('0x21')](_0x13d5cd);}return _0x49cdaf[_0x1e38('0x22')](_0x13d5cd)['end']();};}function respondWithResult(_0x16f620,_0x4308d3){_0x4308d3=_0x4308d3||0xc8;return function(_0x3ca4ec){if(_0x3ca4ec){return _0x16f620['status'](_0x4308d3)[_0x1e38('0x23')](_0x3ca4ec);}};}function respondWithFilteredResult(_0x207a02,_0x39b302){return function(_0x1ff067){if(_0x1ff067){var _0x36cbfd=typeof _0x39b302[_0x1e38('0x24')]==='undefined'&&typeof _0x39b302[_0x1e38('0x25')]==='undefined';var _0x2161f5=_0x1ff067['count'];var _0x919416=_0x36cbfd?0x0:_0x39b302[_0x1e38('0x24')];var _0xb2a65=_0x36cbfd?_0x1ff067['count']:_0x39b302[_0x1e38('0x24')]+_0x39b302[_0x1e38('0x25')];var _0x581309;if(_0xb2a65>=_0x2161f5){_0xb2a65=_0x2161f5;_0x581309=0xc8;}else{_0x581309=0xce;}_0x207a02['status'](_0x581309);return _0x207a02[_0x1e38('0x26')](_0x1e38('0x27'),_0x919416+'-'+_0xb2a65+'/'+_0x2161f5)['json'](_0x1ff067);}return null;};}function patchUpdates(_0x33f474){return function(_0x491cfb){try{jsonpatch['apply'](_0x491cfb,_0x33f474,!![]);}catch(_0x4f99ae){return BPromise[_0x1e38('0x28')](_0x4f99ae);}return _0x491cfb['save']();};}function saveUpdates(_0x30d664,_0x4125c4){return function(_0x58f495){if(_0x58f495){return _0x58f495[_0x1e38('0x29')](_0x30d664)[_0x1e38('0x2a')](function(_0x4751c0){return _0x4751c0;});}return null;};}function removeEntity(_0x156b67,_0x14546a){return function(_0x24d7dd){if(_0x24d7dd){return _0x24d7dd[_0x1e38('0x2b')]()[_0x1e38('0x2a')](function(){var _0x1d02cd=_0x24d7dd[_0x1e38('0x2c')]({'plain':!![]});var _0x221709=[{'name':_0x1e38('0x2d'),'value':_0x1e38('0x2e'),'ignore':![]},{'name':_0x1e38('0x2f'),'value':_0x1e38('0x30'),'ignore':![]}];var _0x55c4ed=_(_0x221709)[_0x1e38('0x31')](_0x1e38('0x32'))[_0x1e38('0x33')](_0x1e38('0x34'))[_0x1e38('0x34')]();if(_[_0x1e38('0x35')](_0x55c4ed,_0x1d02cd[_0x1e38('0x36')])){return;}var _0x1fbb6d=_[_0x1e38('0x37')](_0x221709,[_0x1e38('0x34'),_0x1d02cd[_0x1e38('0x36')]])[_0x1e38('0x38')];return db[_0x1e38('0x39')][_0x1e38('0x2b')]({'where':{'type':_0x1fbb6d,'resourceId':_0x1d02cd['id']}})[_0x1e38('0x2a')](function(){return _0x24d7dd;});})[_0x1e38('0x2a')](function(){_0x156b67[_0x1e38('0x22')](0xcc)[_0x1e38('0x3a')]();});}};}function handleEntityNotFound(_0x39b415,_0x1193eb){return function(_0x3e7910){if(!_0x3e7910){_0x39b415[_0x1e38('0x21')](0x194);}return _0x3e7910;};}function handleError(_0x19b7b8,_0x102f9c){_0x102f9c=_0x102f9c||0x1f4;return function(_0x3ad793){logger[_0x1e38('0x3b')](_0x3ad793[_0x1e38('0x3c')]);if(_0x3ad793[_0x1e38('0x38')]){delete _0x3ad793[_0x1e38('0x38')];}_0x19b7b8[_0x1e38('0x22')](_0x102f9c)[_0x1e38('0x3d')](_0x3ad793);};}exports[_0x1e38('0x3e')]=function(_0xce4a4b,_0x2e13d7){var _0xff2558={},_0xd344b2={},_0x429c69={'count':0x0,'rows':[]};var _0x1473da=_[_0x1e38('0x33')](db[_0x1e38('0x3f')][_0x1e38('0x40')],function(_0x677992){return{'name':_0x677992[_0x1e38('0x41')],'type':_0x677992['type']['key']};});_0xd344b2[_0x1e38('0x42')]=_[_0x1e38('0x33')](_0x1473da,'name');_0xd344b2[_0x1e38('0x43')]=_['keys'](_0xce4a4b[_0x1e38('0x43')]);_0xd344b2[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0xd344b2[_0x1e38('0x42')],_0xd344b2[_0x1e38('0x43')]);_0xff2558['attributes']=_[_0x1e38('0x45')](_0xd344b2['model'],qs[_0x1e38('0x46')](_0xce4a4b[_0x1e38('0x43')][_0x1e38('0x46')]));_0xff2558['attributes']=_0xff2558[_0x1e38('0x47')][_0x1e38('0x48')]?_0xff2558['attributes']:_0xd344b2[_0x1e38('0x42')];if(!_0xce4a4b['query']['hasOwnProperty'](_0x1e38('0x49'))){_0xff2558['limit']=qs['limit'](_0xce4a4b[_0x1e38('0x43')][_0x1e38('0x25')]);_0xff2558[_0x1e38('0x24')]=qs['offset'](_0xce4a4b['query'][_0x1e38('0x24')]);}_0xff2558['order']=qs[_0x1e38('0x4a')](_0xce4a4b[_0x1e38('0x43')][_0x1e38('0x4a')]);_0xff2558[_0x1e38('0x4b')]=qs[_0x1e38('0x44')](_['pick'](_0xce4a4b[_0x1e38('0x43')],_0xd344b2[_0x1e38('0x44')]),_0x1473da);if(_0xce4a4b['query'][_0x1e38('0x31')]){_0xff2558[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0xff2558[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x1473da,function(_0x12a898){if(_0x12a898[_0x1e38('0x36')]!=='VIRTUAL'){var _0x777cad={};_0x777cad[_0x12a898[_0x1e38('0x38')]]={'$like':'%'+_0xce4a4b[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x777cad;}})});}_0xff2558=_[_0x1e38('0x4c')]({},_0xff2558,_0xce4a4b[_0x1e38('0x4d')]);var _0x1de05d={'where':_0xff2558[_0x1e38('0x4b')]};return db[_0x1e38('0x3f')][_0x1e38('0x4e')](_0x1de05d)[_0x1e38('0x2a')](function(_0x5d3571){_0x429c69[_0x1e38('0x4e')]=_0x5d3571;if(_0xce4a4b[_0x1e38('0x43')][_0x1e38('0x4f')]){_0xff2558['include']=[{'all':!![]}];}return db['VoiceQueue'][_0x1e38('0x50')](_0xff2558);})[_0x1e38('0x2a')](function(_0x300020){_0x429c69[_0x1e38('0x51')]=_0x300020;return _0x429c69;})[_0x1e38('0x2a')](respondWithFilteredResult(_0x2e13d7,_0xff2558))['catch'](handleError(_0x2e13d7,null));};exports[_0x1e38('0x52')]=function(_0x4ac633,_0x5c67e4){var _0x5b134a={'raw':![],'where':{'id':_0x4ac633[_0x1e38('0x53')]['id']}},_0x5ac61f={};_0x5ac61f[_0x1e38('0x42')]=_['keys'](db[_0x1e38('0x3f')]['rawAttributes']);_0x5ac61f[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x4ac633[_0x1e38('0x43')]);_0x5ac61f[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0x5ac61f[_0x1e38('0x42')],_0x5ac61f[_0x1e38('0x43')]);_0x5b134a[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x5ac61f['model'],qs[_0x1e38('0x46')](_0x4ac633[_0x1e38('0x43')][_0x1e38('0x46')]));_0x5b134a[_0x1e38('0x47')]=_0x5b134a[_0x1e38('0x47')][_0x1e38('0x48')]?_0x5b134a['attributes']:_0x5ac61f['model'];if(_0x4ac633[_0x1e38('0x43')][_0x1e38('0x4f')]){_0x5b134a['include']=[{'all':!![]}];}_0x5b134a=_[_0x1e38('0x4c')]({},_0x5b134a,_0x4ac633['options']);return db[_0x1e38('0x3f')][_0x1e38('0x37')](_0x5b134a)[_0x1e38('0x2a')](handleEntityNotFound(_0x5c67e4,null))[_0x1e38('0x2a')](respondWithResult(_0x5c67e4,null))['catch'](handleError(_0x5c67e4,null));};exports[_0x1e38('0x55')]=function(_0x425b93,_0x347e7e){return db[_0x1e38('0x3f')][_0x1e38('0x55')](_0x425b93['body'],{})[_0x1e38('0x2a')](function(_0x197799){var _0x53e2a9=_0x425b93['user'][_0x1e38('0x2c')]({'plain':!![]});if(!_0x53e2a9)throw new Error(_0x1e38('0x56'));if(_0x53e2a9[_0x1e38('0x57')]==='user'){var _0xb836b0=_0x197799[_0x1e38('0x2c')]({'plain':!![]});var _0x4a0866=[{'name':_0x1e38('0x2d'),'value':_0x1e38('0x2e')},{'name':_0x1e38('0x2f'),'value':'outbound'}];var _0x1c3dac=_[_0x1e38('0x37')](_0x4a0866,[_0x1e38('0x34'),_0xb836b0[_0x1e38('0x36')]])[_0x1e38('0x38')];return db['UserProfileSection'][_0x1e38('0x37')]({'where':{'name':_0x1c3dac,'userProfileId':_0x53e2a9[_0x1e38('0x58')]},'raw':!![]})[_0x1e38('0x2a')](function(_0x20738e){if(_0x20738e&&_0x20738e[_0x1e38('0x59')]===0x0){return db[_0x1e38('0x39')][_0x1e38('0x55')]({'name':_0xb836b0[_0x1e38('0x38')],'resourceId':_0xb836b0['id'],'type':_0x20738e[_0x1e38('0x38')],'sectionId':_0x20738e['id']},{})[_0x1e38('0x2a')](function(){return _0x197799;});}else{return _0x197799;}})[_0x1e38('0x5a')](function(_0x58795d){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x58795d);throw _0x58795d;});}return _0x197799;})[_0x1e38('0x2a')](respondWithResult(_0x347e7e,0xc9))[_0x1e38('0x5a')](handleError(_0x347e7e,null));};exports[_0x1e38('0x5b')]=function(_0x3534d2,_0x4b08f7){var _0x5e1d0f={'where':{'id':_0x3534d2[_0x1e38('0x53')]['id']}},_0x1b2b29={};_0x1b2b29['model']=_['keys'](db[_0x1e38('0x3f')]['rawAttributes']);_0x5e1d0f[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x1b2b29[_0x1e38('0x42')],qs[_0x1e38('0x46')](_0x3534d2[_0x1e38('0x43')]['fields']));_0x5e1d0f['attributes']=_0x5e1d0f['attributes']['length']?_0x5e1d0f[_0x1e38('0x47')]:_0x1b2b29[_0x1e38('0x42')];if(_0x3534d2[_0x1e38('0x43')][_0x1e38('0x4f')]){_0x5e1d0f['include']=[{'all':!![]}];}_0x5e1d0f=_[_0x1e38('0x4c')]({},_0x5e1d0f,_0x3534d2[_0x1e38('0x4d')]);return db['VoiceQueue'][_0x1e38('0x37')](_0x5e1d0f)[_0x1e38('0x2a')](handleEntityNotFound(_0x4b08f7,null))[_0x1e38('0x2a')](function(_0x40f09c){if(_0x40f09c){var _0x2beb50=_0x40f09c['get']({'plain':!![]});_0x2beb50=qs['omit'](_0x2beb50,['id','createdAt',_0x1e38('0x5c')]);_0x3534d2[_0x1e38('0x5d')]=_[_0x1e38('0x5e')](_0x3534d2[_0x1e38('0x5d')],['id','createdAt','updatedAt']);return db['VoiceQueue']['create'](_[_0x1e38('0x4c')](_0x2beb50,_0x3534d2[_0x1e38('0x5d')]),{'include':_0x3534d2[_0x1e38('0x43')][_0x1e38('0x4f')]?[{'all':!![]}]:undefined})[_0x1e38('0x2a')](function(_0x330b13){var _0x9346e3=_0x3534d2['user']['get']({'plain':!![]});if(!_0x9346e3)throw new Error(_0x1e38('0x56'));if(_0x9346e3[_0x1e38('0x57')]===_0x1e38('0x5f')){var _0xe1616c=_0x330b13['get']({'plain':!![]});var _0x300482=[{'name':_0x1e38('0x2d'),'value':_0x1e38('0x2e')},{'name':_0x1e38('0x2f'),'value':_0x1e38('0x30')}];var _0x2e6ce1=_[_0x1e38('0x37')](_0x300482,[_0x1e38('0x34'),_0xe1616c[_0x1e38('0x36')]])[_0x1e38('0x38')];return db['UserProfileSection']['find']({'where':{'name':_0x2e6ce1,'userProfileId':_0x9346e3[_0x1e38('0x58')]},'raw':!![]})[_0x1e38('0x2a')](function(_0x2a32ec){if(_0x2a32ec&&_0x2a32ec['autoAssociation']===0x0){return db[_0x1e38('0x39')][_0x1e38('0x55')]({'name':_0xe1616c['name'],'resourceId':_0xe1616c['id'],'type':_0x2a32ec[_0x1e38('0x38')],'sectionId':_0x2a32ec['id']},{})[_0x1e38('0x2a')](function(){return _0x330b13;});}else{return _0x330b13;}})[_0x1e38('0x5a')](function(_0x1a9020){logger[_0x1e38('0x3b')](_0x1e38('0x60'),_0x1a9020);throw _0x1a9020;});}return _0x330b13;});}})[_0x1e38('0x2a')](respondWithResult(_0x4b08f7,0xc9))[_0x1e38('0x5a')](handleError(_0x4b08f7,null));};exports[_0x1e38('0x29')]=function(_0x45715e,_0x19e1b0){if(_0x45715e['body']['id']){delete _0x45715e['body']['id'];}return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x45715e[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x19e1b0,null))['then'](saveUpdates(_0x45715e['body'],null))[_0x1e38('0x2a')](respondWithResult(_0x19e1b0,null))[_0x1e38('0x5a')](handleError(_0x19e1b0,null));};exports[_0x1e38('0x2b')]=function(_0x3ab62a,_0x3a944d){return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x3ab62a[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x3a944d,null))['then'](removeEntity(_0x3a944d,null))[_0x1e38('0x5a')](handleError(_0x3a944d,null));};exports[_0x1e38('0x61')]=function(_0x4670ce,_0x4cd336,_0x28cb76){var _0x208abf={'raw':![],'where':{}};var _0x123940={};var _0x29e0a0={'count':0x0,'rows':[]};return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x4670ce[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x4cd336,null))[_0x1e38('0x2a')](function(_0x5034fc){if(_0x5034fc){_0x123940[_0x1e38('0x42')]=_[_0x1e38('0x54')](db[_0x1e38('0x63')]['rawAttributes']);_0x123940[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x4670ce[_0x1e38('0x43')]);_0x123940[_0x1e38('0x44')]=_['intersection'](_0x123940[_0x1e38('0x42')],_0x123940[_0x1e38('0x43')]);_0x208abf[_0x1e38('0x47')]=_['intersection'](_0x123940[_0x1e38('0x42')],qs['fields'](_0x4670ce[_0x1e38('0x43')][_0x1e38('0x46')]));_0x208abf[_0x1e38('0x47')]=_0x208abf[_0x1e38('0x47')][_0x1e38('0x48')]?_0x208abf['attributes']:_0x123940[_0x1e38('0x42')];if(!_0x4670ce['query']['hasOwnProperty'](_0x1e38('0x49'))){_0x208abf['limit']=qs[_0x1e38('0x25')](_0x4670ce['query']['limit']);_0x208abf[_0x1e38('0x24')]=qs['offset'](_0x4670ce[_0x1e38('0x43')][_0x1e38('0x24')]);}_0x208abf[_0x1e38('0x64')]=qs['sort'](_0x4670ce[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x208abf[_0x1e38('0x4b')]=qs['filters'](_[_0x1e38('0x65')](_0x4670ce['query'],_0x123940[_0x1e38('0x44')]));_0x208abf[_0x1e38('0x4b')][_0x1e38('0x66')]=_0x5034fc['id'];if(_0x4670ce[_0x1e38('0x43')]['filter']){_0x208abf['where']=_[_0x1e38('0x4c')](_0x208abf[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x208abf[_0x1e38('0x47')],function(_0x5285fb){var _0x1e75c5={};_0x1e75c5[_0x5285fb]={'$like':'%'+_0x4670ce[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x1e75c5;})});}_0x208abf=_[_0x1e38('0x4c')]({},_0x208abf,_0x4670ce[_0x1e38('0x4d')]);return db[_0x1e38('0x63')]['count']({'where':_0x208abf[_0x1e38('0x4b')]})[_0x1e38('0x2a')](function(_0x4cd7e2){_0x29e0a0['count']=_0x4cd7e2;if(_0x4670ce[_0x1e38('0x43')][_0x1e38('0x4f')]){_0x208abf[_0x1e38('0x67')]=[{'all':!![]}];}return db[_0x1e38('0x63')][_0x1e38('0x50')](_0x208abf);})[_0x1e38('0x2a')](function(_0x2a1817){_0x29e0a0[_0x1e38('0x51')]=_0x2a1817;return _0x29e0a0;});}})['then'](respondWithFilteredResult(_0x4cd336,_0x208abf))[_0x1e38('0x5a')](handleError(_0x4cd336,null));};exports[_0x1e38('0x68')]=function(_0x4cad7f,_0xb91b93,_0x1dba28){var _0x2725d3={'raw':!![],'where':{}};var _0x11853c={};var _0x59e3e0={'count':0x0,'rows':[]};return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x4cad7f['params']['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0xb91b93,null))[_0x1e38('0x2a')](function(_0x3d3259){if(_0x3d3259){_0x11853c['model']=_[_0x1e38('0x54')](db[_0x1e38('0x69')]['rawAttributes']);_0x11853c[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x4cad7f[_0x1e38('0x43')]);_0x11853c['filters']=_[_0x1e38('0x45')](_0x11853c['model'],_0x11853c[_0x1e38('0x43')]);_0x2725d3[_0x1e38('0x47')]=_['intersection'](_0x11853c[_0x1e38('0x42')],qs[_0x1e38('0x46')](_0x4cad7f[_0x1e38('0x43')]['fields']));_0x2725d3['attributes']=_0x2725d3[_0x1e38('0x47')][_0x1e38('0x48')]?_0x2725d3['attributes']:_0x11853c[_0x1e38('0x42')];if(!_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x6a')](_0x1e38('0x49'))){_0x2725d3[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x25')]);_0x2725d3['offset']=qs[_0x1e38('0x24')](_0x4cad7f[_0x1e38('0x43')]['offset']);}_0x2725d3[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x2725d3['where']=qs[_0x1e38('0x44')](_[_0x1e38('0x65')](_0x4cad7f[_0x1e38('0x43')],_0x11853c[_0x1e38('0x44')]));_0x2725d3['where'][_0x1e38('0x66')]=_0x3d3259['id'];if(_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x31')]){_0x2725d3[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x2725d3[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x2725d3[_0x1e38('0x47')],function(_0x368eec){var _0x4b0f3a={};_0x4b0f3a[_0x368eec]={'$like':'%'+_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x4b0f3a;})});}_0x2725d3=_[_0x1e38('0x4c')]({},_0x2725d3,_0x4cad7f[_0x1e38('0x4d')]);return db[_0x1e38('0x69')][_0x1e38('0x4e')]({'where':_0x2725d3[_0x1e38('0x4b')]})[_0x1e38('0x2a')](function(_0x499793){_0x59e3e0[_0x1e38('0x4e')]=_0x499793;if(_0x4cad7f[_0x1e38('0x43')][_0x1e38('0x4f')]){_0x2725d3[_0x1e38('0x67')]=[{'all':!![]}];}return db[_0x1e38('0x69')][_0x1e38('0x50')](_0x2725d3);})['then'](function(_0x2cdd20){_0x59e3e0[_0x1e38('0x51')]=_0x2cdd20;return _0x59e3e0;});}})['then'](respondWithFilteredResult(_0xb91b93,_0x2725d3))['catch'](handleError(_0xb91b93,null));};exports[_0x1e38('0x6b')]=function(_0x56b33d,_0x54aa60,_0x317b33){var _0x590b0a={'raw':!![],'where':{}};var _0x510f82={};var _0x21f186={'count':0x0,'rows':[]};return db[_0x1e38('0x3f')]['findOne']({'where':{'id':_0x56b33d[_0x1e38('0x53')]['id']}})['then'](handleEntityNotFound(_0x54aa60,null))[_0x1e38('0x2a')](function(_0x2657b6){if(_0x2657b6){_0x510f82[_0x1e38('0x42')]=_[_0x1e38('0x54')](db[_0x1e38('0x6c')][_0x1e38('0x40')]);_0x510f82[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x56b33d[_0x1e38('0x43')]);_0x510f82['filters']=_[_0x1e38('0x45')](_0x510f82['model'],_0x510f82[_0x1e38('0x43')]);_0x590b0a[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x510f82[_0x1e38('0x42')],qs['fields'](_0x56b33d['query'][_0x1e38('0x46')]));_0x590b0a[_0x1e38('0x47')]=_0x590b0a[_0x1e38('0x47')][_0x1e38('0x48')]?_0x590b0a[_0x1e38('0x47')]:_0x510f82['model'];if(!_0x56b33d[_0x1e38('0x43')][_0x1e38('0x6a')]('nolimit')){_0x590b0a[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x56b33d[_0x1e38('0x43')][_0x1e38('0x25')]);_0x590b0a['offset']=qs[_0x1e38('0x24')](_0x56b33d[_0x1e38('0x43')]['offset']);}_0x590b0a[_0x1e38('0x64')]=qs['sort'](_0x56b33d['query']['sort']);_0x590b0a[_0x1e38('0x4b')]=qs['filters'](_['pick'](_0x56b33d['query'],_0x510f82[_0x1e38('0x44')]));_0x590b0a[_0x1e38('0x4b')][_0x1e38('0x66')]=_0x2657b6['id'];if(_0x56b33d['query'][_0x1e38('0x31')]){_0x590b0a[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x590b0a[_0x1e38('0x4b')],{'$or':_['map'](_0x590b0a[_0x1e38('0x47')],function(_0x392164){var _0x543c90={};_0x543c90[_0x392164]={'$like':'%'+_0x56b33d[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x543c90;})});}_0x590b0a=_[_0x1e38('0x4c')]({},_0x590b0a,_0x56b33d[_0x1e38('0x4d')]);return db[_0x1e38('0x6c')][_0x1e38('0x4e')]({'where':_0x590b0a[_0x1e38('0x4b')]})[_0x1e38('0x2a')](function(_0x4a32a9){_0x21f186['count']=_0x4a32a9;if(_0x56b33d[_0x1e38('0x43')][_0x1e38('0x4f')]){_0x590b0a[_0x1e38('0x67')]=[{'all':!![]}];}return db[_0x1e38('0x6c')][_0x1e38('0x50')](_0x590b0a);})[_0x1e38('0x2a')](function(_0x3d5c3d){_0x21f186[_0x1e38('0x51')]=_0x3d5c3d;return _0x21f186;});}})[_0x1e38('0x2a')](respondWithFilteredResult(_0x54aa60,_0x590b0a))[_0x1e38('0x5a')](handleError(_0x54aa60,null));};exports[_0x1e38('0x6d')]=function(_0x38ff18,_0xef31b5,_0x47d492){var _0x2b2573={'raw':!![],'where':{}};var _0xb4a1d8={};var _0x557376={'count':0x0,'rows':[]};return db[_0x1e38('0x3f')]['findOne']({'where':{'id':_0x38ff18[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0xef31b5,null))[_0x1e38('0x2a')](function(_0x3fc817){if(_0x3fc817){_0xb4a1d8[_0x1e38('0x42')]=_[_0x1e38('0x54')](db[_0x1e38('0x6e')][_0x1e38('0x40')]);_0xb4a1d8['query']=_['keys'](_0x38ff18[_0x1e38('0x43')]);_0xb4a1d8[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0xb4a1d8[_0x1e38('0x42')],_0xb4a1d8[_0x1e38('0x43')]);_0x2b2573[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0xb4a1d8['model'],qs[_0x1e38('0x46')](_0x38ff18[_0x1e38('0x43')][_0x1e38('0x46')]));_0x2b2573[_0x1e38('0x47')]=_0x2b2573[_0x1e38('0x47')][_0x1e38('0x48')]?_0x2b2573[_0x1e38('0x47')]:_0xb4a1d8[_0x1e38('0x42')];if(!_0x38ff18[_0x1e38('0x43')]['hasOwnProperty']('nolimit')){_0x2b2573[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x38ff18[_0x1e38('0x43')]['limit']);_0x2b2573[_0x1e38('0x24')]=qs['offset'](_0x38ff18[_0x1e38('0x43')][_0x1e38('0x24')]);}_0x2b2573[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x38ff18[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x2b2573[_0x1e38('0x4b')]=qs[_0x1e38('0x44')](_[_0x1e38('0x65')](_0x38ff18[_0x1e38('0x43')],_0xb4a1d8[_0x1e38('0x44')]));_0x2b2573[_0x1e38('0x4b')][_0x1e38('0x66')]=_0x3fc817['id'];if(_0x38ff18[_0x1e38('0x43')]['filter']){_0x2b2573[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x2b2573[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x2b2573[_0x1e38('0x47')],function(_0x45b099){var _0x549f2c={};_0x549f2c[_0x45b099]={'$like':'%'+_0x38ff18[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x549f2c;})});}_0x2b2573=_[_0x1e38('0x4c')]({},_0x2b2573,_0x38ff18[_0x1e38('0x4d')]);return db[_0x1e38('0x6e')]['count']({'where':_0x2b2573['where']})[_0x1e38('0x2a')](function(_0x33a72d){_0x557376[_0x1e38('0x4e')]=_0x33a72d;if(_0x38ff18[_0x1e38('0x43')]['includeAll']){_0x2b2573[_0x1e38('0x67')]=[{'all':!![]}];}return db[_0x1e38('0x6e')][_0x1e38('0x50')](_0x2b2573);})[_0x1e38('0x2a')](function(_0x36384d){_0x557376[_0x1e38('0x51')]=_0x36384d;return _0x557376;});}})[_0x1e38('0x2a')](respondWithFilteredResult(_0xef31b5,_0x2b2573))[_0x1e38('0x5a')](handleError(_0xef31b5,null));};exports[_0x1e38('0x6f')]=function(_0x26513b,_0x284338,_0x247d84){var _0x312536={};var _0x442205={};var _0x2fd61c;var _0x1bc138;return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x26513b[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x284338,null))['then'](function(_0x3d2547){if(_0x3d2547){_0x2fd61c=_0x3d2547;_0x442205[_0x1e38('0x42')]=_[_0x1e38('0x54')](db['Team'][_0x1e38('0x40')]);_0x442205[_0x1e38('0x43')]=_['keys'](_0x26513b['query']);_0x442205['filters']=_[_0x1e38('0x45')](_0x442205[_0x1e38('0x42')],_0x442205['query']);_0x312536[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x442205['model'],qs['fields'](_0x26513b[_0x1e38('0x43')][_0x1e38('0x46')]));_0x312536[_0x1e38('0x47')]=_0x312536['attributes'][_0x1e38('0x48')]?_0x312536[_0x1e38('0x47')]:_0x442205[_0x1e38('0x42')];_0x312536[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x26513b[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x312536[_0x1e38('0x4b')]=qs[_0x1e38('0x44')](_[_0x1e38('0x65')](_0x26513b[_0x1e38('0x43')],_0x442205[_0x1e38('0x44')]));if(_0x26513b['query'][_0x1e38('0x31')]){_0x312536[_0x1e38('0x4b')]=_['merge'](_0x312536[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x312536[_0x1e38('0x47')],function(_0x2f3b39){var _0x57c28c={};_0x57c28c[_0x2f3b39]={'$like':'%'+_0x26513b[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x57c28c;})});}_0x312536=_[_0x1e38('0x4c')]({},_0x312536,_0x26513b['options']);return _0x2fd61c[_0x1e38('0x6f')](_0x312536);}})[_0x1e38('0x2a')](function(_0x4b6554){if(_0x4b6554){_0x1bc138=_0x4b6554['length'];if(!_0x26513b[_0x1e38('0x43')]['hasOwnProperty']('nolimit')){_0x312536[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x26513b[_0x1e38('0x43')]['limit']);_0x312536['offset']=qs[_0x1e38('0x24')](_0x26513b[_0x1e38('0x43')]['offset']);}return _0x2fd61c[_0x1e38('0x6f')](_0x312536);}})[_0x1e38('0x2a')](function(_0x1066d3){if(_0x1066d3){return _0x1066d3?{'count':_0x1bc138,'rows':_0x1066d3}:null;}})['then'](respondWithResult(_0x284338,null))[_0x1e38('0x5a')](handleError(_0x284338,null));};exports[_0x1e38('0x70')]=function(_0x2017bc,_0x8b05fb,_0x51ccfd){var _0x627c19=_0x2017bc[_0x1e38('0x5d')][_0x1e38('0x71')];var _0x5a2338=_[_0x1e38('0x33')](_0x627c19,'id');return db[_0x1e38('0x72')][_0x1e38('0x50')]({'where':{'id':_0x5a2338},'attributes':['id'],'include':[{'model':db[_0x1e38('0x73')],'as':'Agents','attributes':['id',_0x1e38('0x38'),'online','voicePause','interface'],'raw':!![]}]})[_0x1e38('0x2a')](function(_0x4d1693){if(_0x4d1693){var _0x3885c9=_[_0x1e38('0x74')](_0x4d1693,function(_0xd3c1e7){var _0x368504=_0xd3c1e7['get']({'plain':!![]});_0x368504[_0x1e38('0x75')][_0x1e38('0x76')](function(_0x2b6349){_0x2b6349['penalty']=_[_0x1e38('0x37')](_0x627c19,{'id':_0x368504['id']})[_0x1e38('0x77')];});return _0x368504[_0x1e38('0x75')];});return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x2017bc[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](function(_0x2aa1da){return db['sequelize']['transaction'](function(_0x5c2717){return _0x2aa1da[_0x1e38('0x70')](_0x5a2338,{'transaction':_0x5c2717})[_0x1e38('0x2a')](function(){return BPromise['each'](_0x627c19,function(_0x1b59ae){return db['TeamVoiceQueue'][_0x1e38('0x78')]({'TeamId':_0x1b59ae['id'],'VoiceQueueId':_0x2017bc[_0x1e38('0x53')]['id'],'penalty':_0x1b59ae[_0x1e38('0x77')]},{'transaction':_0x5c2717});});})[_0x1e38('0x2a')](function(){return BPromise['each'](_0x3885c9,function(_0xa39051){return db[_0x1e38('0x79')][_0x1e38('0x7a')]({'where':{'UserId':_0xa39051['id'],'VoiceQueueId':_0x2017bc[_0x1e38('0x53')]['id']},'defaults':{'penalty':_0xa39051[_0x1e38('0x77')]},'transaction':_0x5c2717});});})[_0x1e38('0x2a')](function(){return BPromise[_0x1e38('0x7b')](_['filter'](_0x3885c9,{'online':!![]}),function(_0x46370e){return db[_0x1e38('0x7c')][_0x1e38('0x78')]({'membername':_0x46370e['name'],'UserId':_0x46370e['id'],'queue_name':_0x2aa1da[_0x1e38('0x38')],'VoiceQueueId':_0x2aa1da['id'],'interface':_[_0x1e38('0x7d')](_0x46370e[_0x1e38('0x7e')])?util[_0x1e38('0x7f')]('SIP/%s',_0x46370e[_0x1e38('0x38')]):_0x46370e['interface'],'paused':_0x46370e[_0x1e38('0x80')]||![],'penalty':_0x46370e[_0x1e38('0x77')]},{'transaction':_0x5c2717});});})['then'](function(){_0x3885c9[_0x1e38('0x76')](function(_0x420bdf){socket[_0x1e38('0x81')](_0x1e38('0x82'),{'UserId':_0x420bdf['id'],'VoiceQueueId':_0x2aa1da['id']});});});});});}})[_0x1e38('0x2a')](respondWithStatusCode(_0x8b05fb,null))[_0x1e38('0x5a')](handleError(_0x8b05fb,null));};exports['removeTeams']=function(_0x22b0cc,_0x2b29fe,_0x2f2e7){return db[_0x1e38('0x72')][_0x1e38('0x50')]({'where':{'id':_0x22b0cc[_0x1e38('0x43')][_0x1e38('0x83')]},'attributes':['id'],'include':[{'model':db[_0x1e38('0x73')],'as':_0x1e38('0x75'),'attributes':['id'],'raw':!![]}]})[_0x1e38('0x2a')](handleEntityNotFound(_0x2b29fe,null))['then'](function(_0x1ef7c9){var _0x1b432c=_[_0x1e38('0x33')](_0x1ef7c9,'id');var _0x38f7c0=[];var _0xac6298=[];var _0x34f5a3=squel['select']();_0x34f5a3['field']('tq.TeamId')['from'](_0x1e38('0x84'),'tq')[_0x1e38('0x85')](_0x1e38('0x86'),'ut',_0x1e38('0x87'))[_0x1e38('0x4b')](_0x1e38('0x88'),_0x22b0cc['params']['id']);for(var _0x1310c4=0x0;_0x1310c4<_0x1ef7c9['length'];_0x1310c4+=0x1){let _0x30b956=_0x1ef7c9[_0x1310c4];for(var _0x426ee2=0x0;_0x426ee2<_0x30b956[_0x1e38('0x75')][_0x1e38('0x48')];_0x426ee2+=0x1){let _0x3af79a=_0x30b956[_0x1e38('0x75')][_0x426ee2];var _0x21e1dd=_0x34f5a3[_0x1e38('0x5b')]();_0x21e1dd[_0x1e38('0x4b')](_0x1e38('0x89'),_0x3af79a['id']);_0xac6298['push'](db[_0x1e38('0x8a')]['query'](_0x21e1dd[_0x1e38('0x8b')](),{'type':db[_0x1e38('0x8a')][_0x1e38('0x8c')][_0x1e38('0x8d')]})['then'](function(_0x2930ab){if(_0x2930ab[_0x1e38('0x48')]===0x1){return _0x3af79a['id'];}else{var _0x36a455=_[_0x1e38('0x8e')](_[_0x1e38('0x33')](_0x2930ab,'TeamId'),function(_0x2aa844){return _[_0x1e38('0x35')](_0x1b432c,_0x2aa844);});if(_0x36a455){return _0x3af79a['id'];}}}));}}return BPromise[_0x1e38('0x8f')](_0xac6298)['then'](function(_0x15a54c){_0x38f7c0=_(_0x38f7c0)['union'](_0x15a54c)[_0x1e38('0x90')]()['value']();return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x22b0cc[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](function(_0x3aa72e){return db[_0x1e38('0x8a')][_0x1e38('0x91')](function(_0x24ec32){return _0x3aa72e[_0x1e38('0x92')](_0x22b0cc['query']['ids'],{'transaction':_0x24ec32})[_0x1e38('0x2a')](function(){if(!_[_0x1e38('0x93')](_0x38f7c0)){return _0x3aa72e[_0x1e38('0x94')](_0x38f7c0,{'transaction':_0x24ec32})['then'](function(){return db[_0x1e38('0x7c')][_0x1e38('0x2b')]({'where':{'VoiceQueueId':_0x22b0cc[_0x1e38('0x53')]['id'],'UserId':_0x38f7c0},'transaction':_0x24ec32});});}})[_0x1e38('0x2a')](function(){_0x38f7c0[_0x1e38('0x76')](function(_0x37b6ec){socket[_0x1e38('0x81')](_0x1e38('0x95'),{'UserId':_0x37b6ec,'VoiceQueueId':_0x3aa72e['id']});});});});});});})[_0x1e38('0x2a')](respondWithStatusCode(_0x2b29fe,null))['catch'](handleError(_0x2b29fe,null));};exports[_0x1e38('0x96')]=function(_0x40dd73,_0x172e7d,_0x144477){var _0x2aa1f8,_0x44ca6e;return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x40dd73[_0x1e38('0x53')]['id']}})['then'](handleEntityNotFound(_0x172e7d,null))[_0x1e38('0x2a')](function(_0x1ce6f4){if(_0x1ce6f4){_0x44ca6e=_0x1ce6f4;return _0x1ce6f4[_0x1e38('0x96')](_0x40dd73[_0x1e38('0x5d')][_0x1e38('0x83')],_[_0x1e38('0x5e')](_0x40dd73[_0x1e38('0x5d')],['ids','id'])||{})[_0x1e38('0x97')](function(_0x4f100b){for(var _0x1d3343=0x0;_0x1d3343<_0x40dd73[_0x1e38('0x5d')][_0x1e38('0x83')][_0x1e38('0x48')];_0x1d3343+=0x1){socket['emit']('userVoiceQueue:save',{'UserId':_0x40dd73[_0x1e38('0x5d')][_0x1e38('0x83')][_0x1d3343],'VoiceQueueId':_0x40dd73['params']['id']});}return _0x4f100b;});}})[_0x1e38('0x2a')](function(_0x364f3b){_0x2aa1f8=_0x364f3b||[];if(_0x44ca6e){return db[_0x1e38('0x73')][_0x1e38('0x50')]({'where':{'id':_0x40dd73[_0x1e38('0x5d')][_0x1e38('0x83')]},'attributes':['id',_0x1e38('0x38'),'online','voicePause',_0x1e38('0x7e')],'raw':!![]});}})[_0x1e38('0x2a')](function(_0x319727){if(!_['isEmpty'](_0x319727)){var _0x50cff8=[];for(var _0x4fcb31=0x0;_0x4fcb31<_0x319727['length'];_0x4fcb31++){if(_0x319727[_0x4fcb31][_0x1e38('0x98')]){_0x50cff8[_0x1e38('0x99')](db[_0x1e38('0x7c')][_0x1e38('0x78')]({'membername':_0x319727[_0x4fcb31][_0x1e38('0x38')],'UserId':_0x319727[_0x4fcb31]['id'],'queue_name':_0x44ca6e[_0x1e38('0x38')],'VoiceQueueId':_0x44ca6e['id'],'interface':_[_0x1e38('0x7d')](_0x319727[_0x4fcb31]['interface'])?util['format']('SIP/%s',_0x319727[_0x4fcb31][_0x1e38('0x38')]):_0x319727[_0x4fcb31][_0x1e38('0x7e')],'paused':_0x319727[_0x4fcb31][_0x1e38('0x80')]||![],'penalty':_0x40dd73[_0x1e38('0x5d')][_0x1e38('0x77')]||0x0}));}}return BPromise[_0x1e38('0x8f')](_0x50cff8);}})['then'](function(){return _0x2aa1f8;})['then'](respondWithResult(_0x172e7d,null))[_0x1e38('0x5a')](handleError(_0x172e7d,null));};exports[_0x1e38('0x94')]=function(_0x293fce,_0x377a21,_0x741582){return db['VoiceQueue'][_0x1e38('0x37')]({'where':{'id':_0x293fce[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x377a21,null))['then'](function(_0x2d8006){if(_0x2d8006){return _0x2d8006['removeAgents'](_0x293fce[_0x1e38('0x43')][_0x1e38('0x83')])['then'](function(){if(_[_0x1e38('0x9a')](_0x293fce[_0x1e38('0x43')][_0x1e38('0x83')])){for(var _0x2d14f5=0x0;_0x2d14f5<_0x293fce[_0x1e38('0x43')][_0x1e38('0x83')][_0x1e38('0x48')];_0x2d14f5+=0x1){socket[_0x1e38('0x81')](_0x1e38('0x95'),{'UserId':Number(_0x293fce[_0x1e38('0x43')][_0x1e38('0x83')][_0x2d14f5]),'VoiceQueueId':Number(_0x293fce[_0x1e38('0x53')]['id'])});}}else{socket[_0x1e38('0x81')](_0x1e38('0x95'),{'UserId':Number(_0x293fce['query'][_0x1e38('0x83')]),'VoiceQueueId':Number(_0x293fce[_0x1e38('0x53')]['id'])});}});}})['then'](function(_0x472d68){return db[_0x1e38('0x7c')]['destroy']({'where':{'VoiceQueueId':_0x293fce[_0x1e38('0x53')]['id'],'UserId':_0x293fce[_0x1e38('0x43')][_0x1e38('0x83')]}})[_0x1e38('0x2a')](function(){return _0x472d68;});})[_0x1e38('0x2a')](respondWithStatusCode(_0x377a21,null))[_0x1e38('0x5a')](handleError(_0x377a21,null));};exports['getAgents']=function(_0x3af281,_0x402ce8,_0x47c9b2){var _0x2fc885={};var _0x49d8d1={};var _0x241ce8;var _0x53c1a3;return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x3af281[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x402ce8,null))[_0x1e38('0x2a')](function(_0x54bee0){if(_0x54bee0){_0x241ce8=_0x54bee0;_0x49d8d1[_0x1e38('0x42')]=_[_0x1e38('0x54')](db['User']['rawAttributes']);_0x49d8d1[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x3af281[_0x1e38('0x43')]);_0x49d8d1[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0x49d8d1['model'],_0x49d8d1['query']);_0x2fc885[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x49d8d1[_0x1e38('0x42')],qs['fields'](_0x3af281[_0x1e38('0x43')][_0x1e38('0x46')]));_0x2fc885['attributes']=_0x2fc885[_0x1e38('0x47')][_0x1e38('0x48')]?_0x2fc885[_0x1e38('0x47')]:_0x49d8d1['model'];_0x2fc885[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x3af281[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x2fc885[_0x1e38('0x4b')]=qs[_0x1e38('0x44')](_[_0x1e38('0x65')](_0x3af281['query'],_0x49d8d1[_0x1e38('0x44')]));if(_0x3af281[_0x1e38('0x43')][_0x1e38('0x31')]){_0x2fc885[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x2fc885[_0x1e38('0x4b')],{'$or':_['map'](_0x2fc885[_0x1e38('0x47')],function(_0x10f763){var _0x36bfdc={};_0x36bfdc[_0x10f763]={'$like':'%'+_0x3af281[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x36bfdc;})});}_0x2fc885=_['merge']({},_0x2fc885,_0x3af281[_0x1e38('0x4d')]);return _0x241ce8['getAgents'](_0x2fc885);}})[_0x1e38('0x2a')](function(_0x6e8c0b){if(_0x6e8c0b){_0x53c1a3=_0x6e8c0b[_0x1e38('0x48')];if(!_0x3af281[_0x1e38('0x43')][_0x1e38('0x6a')](_0x1e38('0x49'))){_0x2fc885[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x3af281[_0x1e38('0x43')][_0x1e38('0x25')]);_0x2fc885[_0x1e38('0x24')]=qs['offset'](_0x3af281[_0x1e38('0x43')][_0x1e38('0x24')]);}return _0x241ce8[_0x1e38('0x9b')](_0x2fc885);}})['then'](function(_0xe8ef6c){if(_0xe8ef6c){return _0xe8ef6c?{'count':_0x53c1a3,'rows':_0xe8ef6c}:null;}})[_0x1e38('0x2a')](respondWithResult(_0x402ce8,null))[_0x1e38('0x5a')](handleError(_0x402ce8,null));};exports['getMembers']=function(_0x3917e1,_0x3af8bd,_0x1d3d78){var _0x51d109={};var _0x5ee9dd={};var _0x80a89f;var _0xd29084;return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x3917e1[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x3af8bd,null))[_0x1e38('0x2a')](function(_0x3666bd){if(_0x3666bd){_0x80a89f=_0x3666bd;_0x5ee9dd[_0x1e38('0x42')]=_[_0x1e38('0x54')](db[_0x1e38('0x7c')][_0x1e38('0x40')]);_0x5ee9dd[_0x1e38('0x43')]=_['keys'](_0x3917e1[_0x1e38('0x43')]);_0x5ee9dd[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0x5ee9dd[_0x1e38('0x42')],_0x5ee9dd[_0x1e38('0x43')]);_0x51d109[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x5ee9dd[_0x1e38('0x42')],qs[_0x1e38('0x46')](_0x3917e1[_0x1e38('0x43')][_0x1e38('0x46')]));_0x51d109[_0x1e38('0x47')]=_0x51d109[_0x1e38('0x47')][_0x1e38('0x48')]?_0x51d109[_0x1e38('0x47')]:_0x5ee9dd['model'];_0x51d109['order']=qs[_0x1e38('0x4a')](_0x3917e1['query'][_0x1e38('0x4a')]);_0x51d109[_0x1e38('0x4b')]=qs['filters'](_['pick'](_0x3917e1[_0x1e38('0x43')],_0x5ee9dd[_0x1e38('0x44')]));if(_0x3917e1[_0x1e38('0x43')][_0x1e38('0x31')]){_0x51d109[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x51d109[_0x1e38('0x4b')],{'$or':_['map'](_0x51d109[_0x1e38('0x47')],function(_0x188925){var _0x1b3368={};_0x1b3368[_0x188925]={'$like':'%'+_0x3917e1[_0x1e38('0x43')][_0x1e38('0x31')]+'%'};return _0x1b3368;})});}_0x51d109=_[_0x1e38('0x4c')]({},_0x51d109,_0x3917e1['options']);return _0x80a89f['getMembers'](_0x51d109);}})[_0x1e38('0x2a')](function(_0x1b7c14){if(_0x1b7c14){_0xd29084=_0x1b7c14['length'];if(!_0x3917e1[_0x1e38('0x43')][_0x1e38('0x6a')](_0x1e38('0x49'))){_0x51d109[_0x1e38('0x25')]=qs['limit'](_0x3917e1[_0x1e38('0x43')][_0x1e38('0x25')]);_0x51d109[_0x1e38('0x24')]=qs['offset'](_0x3917e1[_0x1e38('0x43')]['offset']);}return _0x80a89f[_0x1e38('0x9c')](_0x51d109);}})[_0x1e38('0x2a')](function(_0x411b73){return _0x411b73?{'count':_0xd29084,'rows':_0x411b73}:null;})[_0x1e38('0x2a')](respondWithResult(_0x3af8bd,null))[_0x1e38('0x5a')](handleError(_0x3af8bd,null));};exports[_0x1e38('0x9d')]=function(_0x29b68e,_0x318f57,_0x5d9148){var _0x16938e={};var _0x291b3b={};var _0x2544fe;var _0x308482;return db[_0x1e38('0x3f')][_0x1e38('0x62')]({'where':{'id':_0x29b68e[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x318f57,null))[_0x1e38('0x2a')](function(_0x91444f){if(_0x91444f){_0x2544fe=_0x91444f;_0x291b3b[_0x1e38('0x42')]=_[_0x1e38('0x54')](db['CmList'][_0x1e38('0x40')]);_0x291b3b[_0x1e38('0x43')]=_[_0x1e38('0x54')](_0x29b68e[_0x1e38('0x43')]);_0x291b3b[_0x1e38('0x44')]=_['intersection'](_0x291b3b[_0x1e38('0x42')],_0x291b3b[_0x1e38('0x43')]);_0x16938e[_0x1e38('0x47')]=_[_0x1e38('0x45')](_0x291b3b[_0x1e38('0x42')],qs['fields'](_0x29b68e['query'][_0x1e38('0x46')]));_0x16938e[_0x1e38('0x47')]=_0x16938e[_0x1e38('0x47')]['length']?_0x16938e[_0x1e38('0x47')]:_0x291b3b['model'];_0x16938e[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x29b68e[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x16938e['where']=qs[_0x1e38('0x44')](_[_0x1e38('0x65')](_0x29b68e[_0x1e38('0x43')],_0x291b3b[_0x1e38('0x44')]));if(_0x29b68e[_0x1e38('0x43')][_0x1e38('0x31')]){_0x16938e[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x16938e[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x16938e[_0x1e38('0x47')],function(_0x53a6fb){var _0xb5a02c={};_0xb5a02c[_0x53a6fb]={'$like':'%'+_0x29b68e['query'][_0x1e38('0x31')]+'%'};return _0xb5a02c;})});}_0x16938e=_[_0x1e38('0x4c')]({},_0x16938e,_0x29b68e[_0x1e38('0x4d')]);return _0x2544fe['getLists'](_0x16938e);}})['then'](function(_0x340f9e){if(_0x340f9e){_0x308482=_0x340f9e[_0x1e38('0x48')];if(!_0x29b68e[_0x1e38('0x43')]['hasOwnProperty'](_0x1e38('0x49'))){_0x16938e[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x29b68e[_0x1e38('0x43')][_0x1e38('0x25')]);_0x16938e[_0x1e38('0x24')]=qs[_0x1e38('0x24')](_0x29b68e[_0x1e38('0x43')]['offset']);}return _0x2544fe['getLists'](_0x16938e);}})[_0x1e38('0x2a')](function(_0xd8d174){if(_0xd8d174){return _0xd8d174?{'count':_0x308482,'rows':_0xd8d174}:null;}})[_0x1e38('0x2a')](respondWithResult(_0x318f57,null))['catch'](handleError(_0x318f57,null));};exports[_0x1e38('0x9e')]=function(_0x29243c,_0x9b17ee,_0x379025){var _0x435a2d,_0x57fbce;return db[_0x1e38('0x3f')][_0x1e38('0x37')]({'where':{'id':_0x29243c['params']['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x9b17ee,null))[_0x1e38('0x2a')](function(_0x1e79f2){if(_0x1e79f2){_0x57fbce=_0x1e79f2;return _0x1e79f2[_0x1e38('0x9e')](_0x29243c[_0x1e38('0x5d')][_0x1e38('0x83')],_[_0x1e38('0x5e')](_0x29243c[_0x1e38('0x5d')],[_0x1e38('0x83'),'id'])||{});}return null;})[_0x1e38('0x97')](function(_0x10f44d){var _0x459b13;_0x435a2d=_0x10f44d||[];var _0x1347fa=[];if(_0x10f44d){for(var _0x5713e7=0x0;_0x5713e7<_0x10f44d[_0x1e38('0x48')];_0x5713e7+=0x1){var _0x4111db=_0x10f44d[_0x5713e7][_0x1e38('0x2c')]({'plain':!![]});_0x57fbce['dialCheckDuplicateType']=_0x29243c[_0x1e38('0x5d')]['dialCheckDuplicateType']?_0x29243c[_0x1e38('0x5d')]['dialCheckDuplicateType']:_0x57fbce[_0x1e38('0x9f')];switch(_0x57fbce[_0x1e38('0x9f')]){case _0x1e38('0xa0'):_0x459b13=squel[_0x1e38('0xa1')]()[_0x1e38('0xa2')](_0x1e38('0xa3'))[_0x1e38('0xa4')]([_0x1e38('0xa5'),_0x1e38('0xa6'),'ContactId',_0x1e38('0xa7'),_0x1e38('0x66'),'createdAt',_0x1e38('0x5c')],squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xa5'),_0x1e38('0xa5'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0xa6'))[_0x1e38('0xa9')]('id','ContactId')[_0x1e38('0xa9')](_0x4111db[_0x1e38('0xab')][_0x1e38('0x8b')](),_0x1e38('0xa7'))[_0x1e38('0xa9')](_0x29243c['params']['id'][_0x1e38('0x8b')](),_0x1e38('0x66'))[_0x1e38('0xa9')]('NOW()',_0x1e38('0xac'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0x5c'))[_0x1e38('0xad')](_0x1e38('0xae'))[_0x1e38('0x4b')](_0x1e38('0xaf'))[_0x1e38('0x4b')](_0x1e38('0xb0'),_0x4111db[_0x1e38('0xab')][_0x1e38('0x8b')]())[_0x1e38('0x4b')]('phone\x20IS\x20NOT\x20NULL')[_0x1e38('0x4b')](_0x1e38('0xb1'),squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xb2'))['from'](_0x1e38('0xb3'))['where'](_0x1e38('0x88'),_0x29243c[_0x1e38('0x53')]['id']['toString']()))[_0x1e38('0x4b')](_0x1e38('0xb1'),squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xb4'))[_0x1e38('0xad')](_0x1e38('0xa3'))[_0x1e38('0x4b')]('VoiceQueueId\x20=\x20?',_0x29243c['params']['id'][_0x1e38('0x8b')]())))[_0x1e38('0x8b')]();break;case _0x1e38('0xb5'):_0x459b13=squel[_0x1e38('0xa1')]()[_0x1e38('0xa2')](_0x1e38('0xa3'))[_0x1e38('0xa4')]([_0x1e38('0xa5'),'scheduledAt',_0x1e38('0xb6'),_0x1e38('0xa7'),_0x1e38('0x66'),_0x1e38('0xac'),_0x1e38('0x5c')],squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xa5'),'phone')[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0xa6'))[_0x1e38('0xa9')]('id',_0x1e38('0xb6'))[_0x1e38('0xa9')](_0x4111db[_0x1e38('0xab')][_0x1e38('0x8b')](),_0x1e38('0xa7'))[_0x1e38('0xa9')](_0x29243c[_0x1e38('0x53')]['id'][_0x1e38('0x8b')](),_0x1e38('0x66'))[_0x1e38('0xa9')]('NOW()','createdAt')['field'](_0x1e38('0xaa'),_0x1e38('0x5c'))[_0x1e38('0xad')](_0x1e38('0xae'))[_0x1e38('0x4b')](_0x1e38('0xaf'))['where'](_0x1e38('0xb0'),_0x4111db['CmListId'][_0x1e38('0x8b')]())['where'](_0x1e38('0xb7'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x1e38('0xa8')]()['field'](_0x1e38('0xb4'))[_0x1e38('0xad')](_0x1e38('0xa3'))[_0x1e38('0x4b')](_0x1e38('0x88'),_0x29243c[_0x1e38('0x53')]['id'][_0x1e38('0x8b')]())))[_0x1e38('0x8b')]();break;default:_0x459b13=squel[_0x1e38('0xa1')]()['into']('cm_hopper')[_0x1e38('0xa4')](['phone',_0x1e38('0xa6'),_0x1e38('0xb6'),'ListId','VoiceQueueId',_0x1e38('0xac'),'updatedAt'],squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xa5'),_0x1e38('0xa5'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0xa6'))[_0x1e38('0xa9')]('id',_0x1e38('0xb6'))[_0x1e38('0xa9')](_0x4111db[_0x1e38('0xab')][_0x1e38('0x8b')](),_0x1e38('0xa7'))[_0x1e38('0xa9')](_0x29243c[_0x1e38('0x53')]['id'][_0x1e38('0x8b')](),_0x1e38('0x66'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0xac'))['field'](_0x1e38('0xaa'),_0x1e38('0x5c'))[_0x1e38('0xad')](_0x1e38('0xae'))[_0x1e38('0x4b')](_0x1e38('0xaf'))[_0x1e38('0x4b')](_0x1e38('0xb0'),_0x4111db['CmListId']['toString']())[_0x1e38('0x4b')]('phone\x20IS\x20NOT\x20NULL'))[_0x1e38('0x8b')]();}_0x1347fa['push'](db['sequelize'][_0x1e38('0x43')](_0x459b13));}return BPromise[_0x1e38('0x8f')](_0x1347fa);}})[_0x1e38('0x2a')](function(){return _0x435a2d;})[_0x1e38('0x2a')](respondWithResult(_0x9b17ee,null))[_0x1e38('0x5a')](handleError(_0x9b17ee,null));};exports['removeLists']=function(_0x403900,_0x2dc96c,_0x5da9d6){return db[_0x1e38('0x3f')]['find']({'where':{'id':_0x403900[_0x1e38('0x53')]['id']}})['then'](handleEntityNotFound(_0x2dc96c,null))['then'](function(_0x5dd6f2){if(_0x5dd6f2){return _0x5dd6f2[_0x1e38('0xb8')](_0x403900['query']['ids']);}})[_0x1e38('0x2a')](function(_0x577915){if(_0x577915){return db[_0x1e38('0x63')][_0x1e38('0x2b')]({'where':{'ListId':_0x403900[_0x1e38('0x43')][_0x1e38('0x83')],'VoiceQueueId':_0x403900['params']['id']}})[_0x1e38('0x2a')](function(){return _0x577915;});}})[_0x1e38('0x2a')](respondWithStatusCode(_0x2dc96c,null))[_0x1e38('0x5a')](handleError(_0x2dc96c,null));};exports[_0x1e38('0xb9')]=function(_0x441f64,_0x3a6df6,_0x1bdc43){var _0x39b75a={};var _0x3f5b2b={};var _0x50fcd0;var _0x2b7b67;return db[_0x1e38('0x3f')]['findOne']({'where':{'id':_0x441f64[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x3a6df6,null))['then'](function(_0x387744){if(_0x387744){_0x50fcd0=_0x387744;_0x3f5b2b[_0x1e38('0x42')]=_[_0x1e38('0x54')](db[_0x1e38('0xba')][_0x1e38('0x40')]);_0x3f5b2b[_0x1e38('0x43')]=_['keys'](_0x441f64[_0x1e38('0x43')]);_0x3f5b2b[_0x1e38('0x44')]=_[_0x1e38('0x45')](_0x3f5b2b['model'],_0x3f5b2b[_0x1e38('0x43')]);_0x39b75a[_0x1e38('0x47')]=_['intersection'](_0x3f5b2b[_0x1e38('0x42')],qs[_0x1e38('0x46')](_0x441f64[_0x1e38('0x43')][_0x1e38('0x46')]));_0x39b75a[_0x1e38('0x47')]=_0x39b75a[_0x1e38('0x47')][_0x1e38('0x48')]?_0x39b75a['attributes']:_0x3f5b2b['model'];_0x39b75a[_0x1e38('0x64')]=qs[_0x1e38('0x4a')](_0x441f64[_0x1e38('0x43')][_0x1e38('0x4a')]);_0x39b75a['where']=qs[_0x1e38('0x44')](_['pick'](_0x441f64[_0x1e38('0x43')],_0x3f5b2b[_0x1e38('0x44')]));if(_0x441f64[_0x1e38('0x43')][_0x1e38('0x31')]){_0x39b75a[_0x1e38('0x4b')]=_[_0x1e38('0x4c')](_0x39b75a[_0x1e38('0x4b')],{'$or':_[_0x1e38('0x33')](_0x39b75a['attributes'],function(_0x4adeca){var _0x20b6ba={};_0x20b6ba[_0x4adeca]={'$like':'%'+_0x441f64[_0x1e38('0x43')]['filter']+'%'};return _0x20b6ba;})});}_0x39b75a=_['merge']({},_0x39b75a,_0x441f64[_0x1e38('0x4d')]);return _0x50fcd0[_0x1e38('0xb9')](_0x39b75a);}})[_0x1e38('0x2a')](function(_0x313f96){if(_0x313f96){_0x2b7b67=_0x313f96[_0x1e38('0x48')];if(!_0x441f64[_0x1e38('0x43')][_0x1e38('0x6a')]('nolimit')){_0x39b75a[_0x1e38('0x25')]=qs[_0x1e38('0x25')](_0x441f64[_0x1e38('0x43')]['limit']);_0x39b75a[_0x1e38('0x24')]=qs[_0x1e38('0x24')](_0x441f64['query']['offset']);}return _0x50fcd0[_0x1e38('0xb9')](_0x39b75a);}})['then'](function(_0x4a863c){if(_0x4a863c){return _0x4a863c?{'count':_0x2b7b67,'rows':_0x4a863c}:null;}})[_0x1e38('0x2a')](respondWithResult(_0x3a6df6,null))['catch'](handleError(_0x3a6df6,null));};exports[_0x1e38('0xbb')]=function(_0x2ad947,_0x396d7a,_0x19c659){var _0x30f2a0,_0x44d4b2;return db['VoiceQueue'][_0x1e38('0x37')]({'where':{'id':_0x2ad947['params']['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x396d7a,null))[_0x1e38('0x2a')](function(_0x1791ce){if(_0x1791ce){_0x44d4b2=_0x1791ce;return _0x1791ce[_0x1e38('0xbb')](_0x2ad947['body'][_0x1e38('0x83')],_[_0x1e38('0x5e')](_0x2ad947[_0x1e38('0x5d')],['ids','id'])||{});}return null;})['spread'](function(_0x24231c){var _0x32e0cf;_0x30f2a0=_0x24231c||[];var _0xce7861=[];if(_0x24231c){for(var _0x1ffce7=0x0;_0x1ffce7<_0x24231c[_0x1e38('0x48')];_0x1ffce7+=0x1){var _0x401b5b=_0x24231c[_0x1ffce7][_0x1e38('0x2c')]({'plain':!![]});_0x32e0cf=squel[_0x1e38('0xa1')]()[_0x1e38('0xa2')](_0x1e38('0xbc'))['fromQuery']([_0x1e38('0xa5'),'ContactId','ListId','VoiceQueueId',_0x1e38('0xac'),_0x1e38('0x5c')],squel[_0x1e38('0xa8')]()[_0x1e38('0xa9')](_0x1e38('0xa5'),_0x1e38('0xa5'))['field']('id',_0x1e38('0xb6'))[_0x1e38('0xa9')](_0x401b5b[_0x1e38('0xab')][_0x1e38('0x8b')](),_0x1e38('0xa7'))['field'](_0x2ad947['params']['id']['toString'](),_0x1e38('0x66'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0xac'))[_0x1e38('0xa9')](_0x1e38('0xaa'),_0x1e38('0x5c'))[_0x1e38('0xad')](_0x1e38('0xae'))['where'](_0x1e38('0xaf'))[_0x1e38('0x4b')](_0x1e38('0xb0'),_0x401b5b['CmListId'][_0x1e38('0x8b')]())[_0x1e38('0x4b')]('phone\x20IS\x20NOT\x20NULL'))[_0x1e38('0x8b')]();_0xce7861[_0x1e38('0x99')](db['sequelize'][_0x1e38('0x43')](_0x32e0cf));}return BPromise['all'](_0xce7861);}})[_0x1e38('0x2a')](function(){return _0x30f2a0;})['then'](respondWithResult(_0x396d7a,null))[_0x1e38('0x5a')](handleError(_0x396d7a,null));};exports[_0x1e38('0xbd')]=function(_0x59b51b,_0x217100,_0x268b9a){return db['VoiceQueue'][_0x1e38('0x37')]({'where':{'id':_0x59b51b[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](handleEntityNotFound(_0x217100,null))['then'](function(_0x12678d){if(_0x12678d){return _0x12678d[_0x1e38('0xbd')](_0x59b51b[_0x1e38('0x43')][_0x1e38('0x83')]);}})[_0x1e38('0x2a')](function(_0x465090){if(_0x465090){return db[_0x1e38('0x6e')]['destroy']({'where':{'ListId':_0x59b51b[_0x1e38('0x43')][_0x1e38('0x83')],'VoiceQueueId':_0x59b51b[_0x1e38('0x53')]['id']}})[_0x1e38('0x2a')](function(){return _0x465090;});}})[_0x1e38('0x2a')](respondWithStatusCode(_0x217100,null))[_0x1e38('0x5a')](handleError(_0x217100,null));}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.events.js b/server/api/voiceQueue/voiceQueue.events.js index fb4c1c6..ee266d9 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 _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 +var _0x28c7=['save','update','remove','emit','hook','VoiceQueue'];(function(_0x301a76,_0x3c7fb5){var _0x503303=function(_0x508732){while(--_0x508732){_0x301a76['push'](_0x301a76['shift']());}};_0x503303(++_0x3c7fb5);}(_0x28c7,0x16d));var _0x728c=function(_0x51b734,_0x1c0b2f){_0x51b734=_0x51b734-0x0;var _0x90c0a3=_0x28c7[_0x51b734];return _0x90c0a3;};'use strict';var EventEmitter=require('events');var VoiceQueue=require('../../mysqldb')['db'][_0x728c('0x0')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x728c('0x1'),'afterUpdate':_0x728c('0x2'),'afterDestroy':_0x728c('0x3')};function emitEvent(_0x416aec){return function(_0x1b2636,_0x5e5e39,_0x5cd626){VoiceQueueEvents[_0x728c('0x4')](_0x416aec+':'+_0x1b2636['id'],_0x1b2636);VoiceQueueEvents[_0x728c('0x4')](_0x416aec,_0x1b2636);_0x5cd626(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x728c('0x5')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.model.js b/server/api/voiceQueue/voiceQueue.model.js index f96d75c..87af423 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 _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 +var _0x55ca=['./voiceQueue.attributes','exports','define','voice_queues','lodash','util','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x587fb5,_0x59cb3b){var _0x551105=function(_0x5bbef4){while(--_0x5bbef4){_0x587fb5['push'](_0x587fb5['shift']());}};_0x551105(++_0x59cb3b);}(_0x55ca,0x126));var _0xa55c=function(_0x48bb8f,_0x15ae9f){_0x48bb8f=_0x48bb8f-0x0;var _0x115417=_0x55ca[_0x48bb8f];return _0x115417;};'use strict';var _=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xa55c('0x2'));var rp=require(_0xa55c('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa55c('0x4'));var config=require(_0xa55c('0x5'));var attributes=require(_0xa55c('0x6'));module[_0xa55c('0x7')]=function(_0x3c97c8,_0x279caa){return _0x3c97c8[_0xa55c('0x8')]('VoiceQueue',attributes,{'tableName':_0xa55c('0x9'),'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 e4c06f5..c578d74 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 _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 +var _0xd43d=['where','attributes','limit','include','map','model','then','debug','catch','ShowVoiceQueue','VoiceQueue','find','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','redis','socket.io-emitter','./voiceQueue.socket','register','request','info','VoiceQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','VoiceQueue,\x20%s,\x20%s','result','GetVoiceQueue','options','raw'];(function(_0x239a38,_0x31ee4a){var _0x3bbb78=function(_0x319d71){while(--_0x319d71){_0x239a38['push'](_0x239a38['shift']());}};_0x3bbb78(++_0x31ee4a);}(_0xd43d,0x98));var _0xdd43=function(_0x213f03,_0x30b17d){_0x213f03=_0x213f03-0x0;var _0xcda306=_0xd43d[_0x213f03];return _0xcda306;};'use strict';var _=require('lodash');var util=require(_0xdd43('0x0'));var moment=require('moment');var BPromise=require(_0xdd43('0x1'));var rs=require(_0xdd43('0x2'));var fs=require('fs');var Redis=require(_0xdd43('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xdd43('0x4'));var logger=require('../../config/logger')(_0xdd43('0x5'));var config=require('../../config/environment');var jayson=require(_0xdd43('0x6'));var client=jayson['client']['http']({'port':0x232a});config[_0xdd43('0x7')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xdd43('0x8'))(new Redis(config['redis']));require(_0xdd43('0x9'))[_0xdd43('0xa')](socket);function respondWithRpcPromise(_0x24d36f,_0x4c06d3,_0x41d881){return new BPromise(function(_0x4d8bc1,_0x2e3e23){return client[_0xdd43('0xb')](_0x24d36f,_0x41d881)['then'](function(_0x2b9d36){logger[_0xdd43('0xc')]('VoiceQueue,\x20%s,\x20%s',_0x4c06d3,'request\x20sent');logger['debug'](_0xdd43('0xd'),_0x4c06d3,_0xdd43('0xe'),JSON[_0xdd43('0xf')](_0x2b9d36));if(_0x2b9d36[_0xdd43('0x10')]){if(_0x2b9d36['error']['code']===0x1f4){logger[_0xdd43('0x10')]('VoiceQueue,\x20%s,\x20%s',_0x4c06d3,_0x2b9d36[_0xdd43('0x10')]['message']);return _0x2e3e23(_0x2b9d36[_0xdd43('0x10')]['message']);}logger[_0xdd43('0x10')]('VoiceQueue,\x20%s,\x20%s',_0x4c06d3,_0x2b9d36[_0xdd43('0x10')]['message']);return _0x4d8bc1(_0x2b9d36[_0xdd43('0x10')][_0xdd43('0x11')]);}else{logger[_0xdd43('0xc')](_0xdd43('0x12'),_0x4c06d3,_0xdd43('0xe'));_0x4d8bc1(_0x2b9d36[_0xdd43('0x13')][_0xdd43('0x11')]);}})['catch'](function(_0xa749d1){logger[_0xdd43('0x10')](_0xdd43('0x12'),_0x4c06d3,_0xa749d1);_0x2e3e23(_0xa749d1);});});}exports[_0xdd43('0x14')]=function(_0x5e2076){var _0x228025=this;return new Promise(function(_0x17ef23,_0x42cf74){return db['VoiceQueue']['findAll']({'raw':_0x5e2076['options']?_0x5e2076[_0xdd43('0x15')][_0xdd43('0x16')]===undefined?!![]:![]:!![],'where':_0x5e2076[_0xdd43('0x15')]?_0x5e2076[_0xdd43('0x15')][_0xdd43('0x17')]||null:null,'attributes':_0x5e2076[_0xdd43('0x15')]?_0x5e2076[_0xdd43('0x15')][_0xdd43('0x18')]||null:null,'limit':_0x5e2076[_0xdd43('0x15')]?_0x5e2076[_0xdd43('0x15')][_0xdd43('0x19')]||null:null,'include':_0x5e2076[_0xdd43('0x15')]?_0x5e2076[_0xdd43('0x15')][_0xdd43('0x1a')]?_[_0xdd43('0x1b')](_0x5e2076[_0xdd43('0x15')]['include'],function(_0x373314){return{'model':db[_0x373314[_0xdd43('0x1c')]],'as':_0x373314['as'],'attributes':_0x373314['attributes'],'include':_0x373314[_0xdd43('0x1a')]?_[_0xdd43('0x1b')](_0x373314[_0xdd43('0x1a')],function(_0x2db854){return{'model':db[_0x2db854[_0xdd43('0x1c')]],'as':_0x2db854['as'],'attributes':_0x2db854[_0xdd43('0x18')],'include':_0x2db854[_0xdd43('0x1a')]?_['map'](_0x2db854[_0xdd43('0x1a')],function(_0x48258b){return{'model':db[_0x48258b[_0xdd43('0x1c')]],'as':_0x48258b['as'],'attributes':_0x48258b[_0xdd43('0x18')]};}):[]};}):[]};}):[]:[]})[_0xdd43('0x1d')](function(_0x4b3adc){logger[_0xdd43('0xc')]('GetVoiceQueue',_0x5e2076);logger[_0xdd43('0x1e')]('GetVoiceQueue',_0x5e2076,JSON[_0xdd43('0xf')](_0x4b3adc));_0x17ef23(_0x4b3adc);})[_0xdd43('0x1f')](function(_0x20ac87){logger[_0xdd43('0x10')](_0xdd43('0x14'),_0x20ac87[_0xdd43('0x11')],_0x5e2076);_0x42cf74(_0x228025[_0xdd43('0x10')](0x1f4,_0x20ac87[_0xdd43('0x11')]));});});};exports[_0xdd43('0x20')]=function(_0x49a18b){var _0x17d544=this;return new Promise(function(_0xb1064e,_0x231a40){return db[_0xdd43('0x21')][_0xdd43('0x22')]({'raw':_0x49a18b[_0xdd43('0x15')]?_0x49a18b[_0xdd43('0x15')][_0xdd43('0x16')]===undefined?!![]:![]:!![],'where':_0x49a18b['options']?_0x49a18b['options'][_0xdd43('0x17')]||null:null,'attributes':_0x49a18b[_0xdd43('0x15')]?_0x49a18b[_0xdd43('0x15')]['attributes']||null:null,'include':_0x49a18b[_0xdd43('0x15')]?_0x49a18b['options'][_0xdd43('0x1a')]?_[_0xdd43('0x1b')](_0x49a18b[_0xdd43('0x15')][_0xdd43('0x1a')],function(_0x410d92){return{'model':db[_0x410d92[_0xdd43('0x1c')]],'as':_0x410d92['as'],'attributes':_0x410d92[_0xdd43('0x18')],'include':_0x410d92[_0xdd43('0x1a')]?_['map'](_0x410d92[_0xdd43('0x1a')],function(_0x4da395){return{'model':db[_0x4da395[_0xdd43('0x1c')]],'as':_0x4da395['as'],'attributes':_0x4da395[_0xdd43('0x18')],'include':_0x4da395[_0xdd43('0x1a')]?_[_0xdd43('0x1b')](_0x4da395[_0xdd43('0x1a')],function(_0x1baeb7){return{'model':db[_0x1baeb7[_0xdd43('0x1c')]],'as':_0x1baeb7['as'],'attributes':_0x1baeb7[_0xdd43('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x255498){logger[_0xdd43('0xc')](_0xdd43('0x20'),_0x49a18b);logger['debug']('ShowVoiceQueue',_0x49a18b,JSON[_0xdd43('0xf')](_0x255498));_0xb1064e(_0x255498);})[_0xdd43('0x1f')](function(_0x143b9f){logger[_0xdd43('0x10')](_0xdd43('0x20'),_0x143b9f[_0xdd43('0x11')],_0x49a18b);_0x231a40(_0x17d544['error'](0x1f4,_0x143b9f[_0xdd43('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.socket.js b/server/api/voiceQueue/voiceQueue.socket.js index d8751e0..2703467 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 _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 +var _0x8326=['remove','update','removeListener','register','length','voiceQueue:','./voiceQueue.events','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8326,0x14e));var _0x6832=function(_0x822282,_0x56c940){_0x822282=_0x822282-0x0;var _0x5b982f=_0x8326[_0x822282];return _0x5b982f;};'use strict';var VoiceQueueEvents=require(_0x6832('0x0'));var events=[_0x6832('0x1'),_0x6832('0x2'),_0x6832('0x3')];function createListener(_0x256835,_0x2521ee){return function(_0x198861){_0x2521ee['emit'](_0x256835,_0x198861);};}function removeListener(_0x55046b,_0x3a04cb){return function(){VoiceQueueEvents[_0x6832('0x4')](_0x55046b,_0x3a04cb);};}exports[_0x6832('0x5')]=function(_0x32153b){for(var _0x431b6c=0x0,_0x576f46=events[_0x6832('0x6')];_0x431b6c<_0x576f46;_0x431b6c++){var _0x503878=events[_0x431b6c];var _0x3394fd=createListener(_0x6832('0x7')+_0x503878,_0x32153b);VoiceQueueEvents['on'](_0x503878,_0x3394fd);}}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/index.js b/server/api/voiceQueueReport/index.js index 5742311..1ffd329 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 _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 +var _0x5a67=['describe','/index','post','create','/:id','delete','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x9fc786,_0x45034c){var _0x5897ae=function(_0x3ff3db){while(--_0x3ff3db){_0x9fc786['push'](_0x9fc786['shift']());}};_0x5897ae(++_0x45034c);}(_0x5a67,0x6d));var _0x75a6=function(_0x532112,_0x37d94b){_0x532112=_0x532112-0x0;var _0x23e5fb=_0x5a67[_0x532112];return _0x23e5fb;};'use strict';var multer=require(_0x75a6('0x0'));var util=require(_0x75a6('0x1'));var path=require(_0x75a6('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x75a6('0x3')]();var fs_extra=require(_0x75a6('0x4'));var auth=require(_0x75a6('0x5'));var interaction=require(_0x75a6('0x6'));var config=require(_0x75a6('0x7'));var controller=require('./voiceQueueReport.controller');router[_0x75a6('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get']('/describe',auth[_0x75a6('0x9')](),controller[_0x75a6('0xa')]);router['get'](_0x75a6('0xb'),auth['isAuthenticated'](),controller['getVoiceQueuesReport']);router['get']('/:id',auth[_0x75a6('0x9')](),controller['show']);router[_0x75a6('0xc')]('/',auth[_0x75a6('0x9')](),controller[_0x75a6('0xd')]);router['put'](_0x75a6('0xe'),auth[_0x75a6('0x9')](),controller['update']);router[_0x75a6('0xf')](_0x75a6('0xe'),auth[_0x75a6('0x9')](),controller['destroy']);module[_0x75a6('0x10')]=router; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.attributes.js b/server/api/voiceQueueReport/voiceQueueReport.attributes.js index 6ab2aae..128fc59 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 _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 +var _0x8c04=['FORWARD,\x20BLIND,\x20ATTENDED','sequelize','moment','exports','STRING','DATE','getDataValue','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','diff','seconds','setDataValue','queuecallerleaveAt','holdtime','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','INTEGER'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x8c04,0x1ee));var _0x48c0=function(_0x31dcf7,_0x49b951){_0x31dcf7=_0x31dcf7-0x0;var _0x65837f=_0x8c04[_0x31dcf7];return _0x65837f;};'use strict';var Sequelize=require(_0x48c0('0x0'));var moment=require(_0x48c0('0x1'));module[_0x48c0('0x2')]={'type':{'type':Sequelize[_0x48c0('0x3')]},'uniqueid':{'type':Sequelize[_0x48c0('0x3')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x48c0('0x3')]},'queuecallerjoinAt':{'type':Sequelize['DATE']},'queuecallerleaveAt':{'type':Sequelize[_0x48c0('0x4')],'set':function(_0x54b3e4){var _0x2bea10=moment(_0x54b3e4);var _0x422fcb=moment(this[_0x48c0('0x5')](_0x48c0('0x6')))['format'](_0x48c0('0x7'));var _0x52b8c1=_0x2bea10[_0x48c0('0x8')](_0x422fcb,_0x48c0('0x9'));this[_0x48c0('0xa')](_0x48c0('0xb'),_0x54b3e4);this[_0x48c0('0xa')](_0x48c0('0xc'),_0x52b8c1||null);}},'position':{'type':Sequelize['INTEGER']},'count':{'type':Sequelize['INTEGER']},'queuecallerabandon':{'type':Sequelize[_0x48c0('0xd')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize['DATE']},'queuecallercomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x48c0('0x4')]},'queuecallerexit':{'type':Sequelize[_0x48c0('0xd')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x48c0('0x4')]},'queuecallerexitreason':{'type':Sequelize[_0x48c0('0x3')],'comment':_0x48c0('0xe')},'originalposition':{'type':Sequelize[_0x48c0('0xf')]},'channel':{'type':Sequelize[_0x48c0('0x3')]},'connectedlinenum':{'type':Sequelize[_0x48c0('0x3')]},'connectedlinename':{'type':Sequelize[_0x48c0('0x3')]},'accountcode':{'type':Sequelize[_0x48c0('0x3')]},'context':{'type':Sequelize[_0x48c0('0x3')]},'exten':{'type':Sequelize[_0x48c0('0x3')]},'priority':{'type':Sequelize['STRING']},'holdtime':{'type':Sequelize[_0x48c0('0xf')]},'mohtime':{'type':Sequelize[_0x48c0('0xf')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x48c0('0xd')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x48c0('0x3')]},'transfer':{'type':Sequelize[_0x48c0('0xd')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x48c0('0x3')],'comment':_0x48c0('0x10')},'transferexten':{'type':Sequelize[_0x48c0('0x3')]},'transferuniqueid':{'type':Sequelize[_0x48c0('0x3')]},'disposition':{'type':Sequelize[_0x48c0('0x3')]},'secondDisposition':{'type':Sequelize[_0x48c0('0x3')]},'thirdDisposition':{'type':Sequelize[_0x48c0('0x3')]},'queuecallerenterreason':{'type':Sequelize[_0x48c0('0xf')],'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 87a82c6..b5e23ae 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 _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 +var _0x9715=['length','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','ejs','fs-extra','lodash','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./voiceQueueReport.socket','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','VoiceQueueReport','key','model','map','name','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes','keys','create','body','params','find','describe','getVoiceQueuesReport'];(function(_0x37f0fb,_0x3f9c59){var _0x5c4dbe=function(_0x334eb7){while(--_0x334eb7){_0x37f0fb['push'](_0x37f0fb['shift']());}};_0x5c4dbe(++_0x3f9c59);}(_0x9715,0xa3));var _0x5971=function(_0x57005e,_0x56b457){_0x57005e=_0x57005e-0x0;var _0x7eb3fe=_0x9715[_0x57005e];return _0x7eb3fe;};'use strict';var emlformat=require(_0x5971('0x0'));var rimraf=require(_0x5971('0x1'));var zipdir=require(_0x5971('0x2'));var jsonpatch=require(_0x5971('0x3'));var rp=require(_0x5971('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x5971('0x5'));var util=require(_0x5971('0x6'));var path=require(_0x5971('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x5971('0x8'));var fs=require('fs');var fs_extra=require(_0x5971('0x9'));var _=require(_0x5971('0xa'));var squel=require('squel');var crypto=require(_0x5971('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x5971('0xc'));var toCsv=require(_0x5971('0xd'));var querystring=require(_0x5971('0xe'));var Papa=require('papaparse');var Redis=require(_0x5971('0xf'));var authService=require(_0x5971('0x10'));var qs=require(_0x5971('0x11'));var as=require(_0x5971('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x5971('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x5971('0x14'));var db=require(_0x5971('0x15'))['db'];config[_0x5971('0x16')]=_['defaults'](config[_0x5971('0x16')],{'host':_0x5971('0x17'),'port':0x18eb});var socket=require(_0x5971('0x18'))(new Redis(config[_0x5971('0x16')]));require(_0x5971('0x19'))['register'](socket);function respondWithStatusCode(_0x1687d1,_0x21a550){_0x21a550=_0x21a550||0xcc;return function(_0x45725b){if(_0x45725b){return _0x1687d1[_0x5971('0x1a')](_0x21a550);}return _0x1687d1[_0x5971('0x1b')](_0x21a550)[_0x5971('0x1c')]();};}function respondWithResult(_0xc17d98,_0x56d563){_0x56d563=_0x56d563||0xc8;return function(_0x24d812){if(_0x24d812){return _0xc17d98[_0x5971('0x1b')](_0x56d563)[_0x5971('0x1d')](_0x24d812);}};}function respondWithFilteredResult(_0x4fc16b,_0x1cc848){return function(_0x550fae){if(_0x550fae){var _0x47f862=typeof _0x1cc848[_0x5971('0x1e')]==='undefined'&&typeof _0x1cc848[_0x5971('0x1f')]===_0x5971('0x20');var _0x48df58=_0x550fae[_0x5971('0x21')];var _0xfb927f=_0x47f862?0x0:_0x1cc848[_0x5971('0x1e')];var _0xd19ba9=_0x47f862?_0x550fae[_0x5971('0x21')]:_0x1cc848[_0x5971('0x1e')]+_0x1cc848[_0x5971('0x1f')];var _0x5e4bc1;if(_0xd19ba9>=_0x48df58){_0xd19ba9=_0x48df58;_0x5e4bc1=0xc8;}else{_0x5e4bc1=0xce;}_0x4fc16b[_0x5971('0x1b')](_0x5e4bc1);return _0x4fc16b[_0x5971('0x22')](_0x5971('0x23'),_0xfb927f+'-'+_0xd19ba9+'/'+_0x48df58)[_0x5971('0x1d')](_0x550fae);}return null;};}function patchUpdates(_0x1a5b9f){return function(_0x15a4ed){try{jsonpatch[_0x5971('0x24')](_0x15a4ed,_0x1a5b9f,!![]);}catch(_0x1a417f){return BPromise[_0x5971('0x25')](_0x1a417f);}return _0x15a4ed[_0x5971('0x26')]();};}function saveUpdates(_0x9246d4,_0x21c8a2){return function(_0x16e8af){if(_0x16e8af){return _0x16e8af[_0x5971('0x27')](_0x9246d4)[_0x5971('0x28')](function(_0x497422){return _0x497422;});}return null;};}function removeEntity(_0x46470e,_0x42f6bd){return function(_0xb41dac){if(_0xb41dac){return _0xb41dac[_0x5971('0x29')]()['then'](function(){_0x46470e[_0x5971('0x1b')](0xcc)[_0x5971('0x1c')]();});}};}function handleEntityNotFound(_0x173bbc,_0x1facc8){return function(_0x57450b){if(!_0x57450b){_0x173bbc['sendStatus'](0x194);}return _0x57450b;};}function handleError(_0x7eb4e1,_0x1e01ec){_0x1e01ec=_0x1e01ec||0x1f4;return function(_0x1e5c17){logger[_0x5971('0x2a')](_0x1e5c17[_0x5971('0x2b')]);if(_0x1e5c17['name']){delete _0x1e5c17['name'];}_0x7eb4e1[_0x5971('0x1b')](_0x1e01ec)[_0x5971('0x2c')](_0x1e5c17);};}exports['index']=function(_0x9807de,_0x92521a){var _0x1d31dc={},_0x2cecd6={},_0x2aed6f={'count':0x0,'rows':[]};var _0x5826d3=_['map'](db[_0x5971('0x2d')]['rawAttributes'],function(_0x4d3451){return{'name':_0x4d3451['fieldName'],'type':_0x4d3451['type'][_0x5971('0x2e')]};});_0x2cecd6[_0x5971('0x2f')]=_[_0x5971('0x30')](_0x5826d3,_0x5971('0x31'));_0x2cecd6[_0x5971('0x32')]=_['keys'](_0x9807de['query']);_0x2cecd6[_0x5971('0x33')]=_['intersection'](_0x2cecd6['model'],_0x2cecd6[_0x5971('0x32')]);_0x1d31dc[_0x5971('0x34')]=_[_0x5971('0x35')](_0x2cecd6[_0x5971('0x2f')],qs[_0x5971('0x36')](_0x9807de[_0x5971('0x32')][_0x5971('0x36')]));_0x1d31dc['attributes']=_0x1d31dc[_0x5971('0x34')]['length']?_0x1d31dc[_0x5971('0x34')]:_0x2cecd6[_0x5971('0x2f')];if(!_0x9807de[_0x5971('0x32')][_0x5971('0x37')](_0x5971('0x38'))){_0x1d31dc[_0x5971('0x1f')]=qs[_0x5971('0x1f')](_0x9807de[_0x5971('0x32')][_0x5971('0x1f')]);_0x1d31dc[_0x5971('0x1e')]=qs[_0x5971('0x1e')](_0x9807de[_0x5971('0x32')][_0x5971('0x1e')]);}_0x1d31dc[_0x5971('0x39')]=qs[_0x5971('0x3a')](_0x9807de['query'][_0x5971('0x3a')]);_0x1d31dc[_0x5971('0x3b')]=qs['filters'](_[_0x5971('0x3c')](_0x9807de[_0x5971('0x32')],_0x2cecd6['filters']),_0x5826d3);if(_0x9807de[_0x5971('0x32')][_0x5971('0x3d')]){_0x1d31dc[_0x5971('0x3b')]=_['merge'](_0x1d31dc['where'],{'$or':_['map'](_0x5826d3,function(_0x518195){if(_0x518195[_0x5971('0x3e')]!==_0x5971('0x3f')){var _0x289f7a={};_0x289f7a[_0x518195[_0x5971('0x31')]]={'$like':'%'+_0x9807de[_0x5971('0x32')][_0x5971('0x3d')]+'%'};return _0x289f7a;}})});}_0x1d31dc=_[_0x5971('0x40')]({},_0x1d31dc,_0x9807de[_0x5971('0x41')]);var _0x38a66e={'where':_0x1d31dc[_0x5971('0x3b')]};return db[_0x5971('0x2d')]['count'](_0x38a66e)[_0x5971('0x28')](function(_0x3997fe){_0x2aed6f[_0x5971('0x21')]=_0x3997fe;if(_0x9807de['query'][_0x5971('0x42')]){_0x1d31dc[_0x5971('0x43')]=[{'all':!![]}];}return db[_0x5971('0x2d')][_0x5971('0x44')](_0x1d31dc);})[_0x5971('0x28')](function(_0x45d73f){_0x2aed6f[_0x5971('0x45')]=_0x45d73f;return _0x2aed6f;})['then'](respondWithFilteredResult(_0x92521a,_0x1d31dc))[_0x5971('0x46')](handleError(_0x92521a,null));};exports[_0x5971('0x47')]=function(_0x5b02c7,_0x51d194){var _0x3d5abc={'raw':![],'where':{'id':_0x5b02c7['params']['id']}},_0xad72d1={};_0xad72d1[_0x5971('0x2f')]=_['keys'](db[_0x5971('0x2d')][_0x5971('0x48')]);_0xad72d1[_0x5971('0x32')]=_[_0x5971('0x49')](_0x5b02c7[_0x5971('0x32')]);_0xad72d1[_0x5971('0x33')]=_['intersection'](_0xad72d1['model'],_0xad72d1[_0x5971('0x32')]);_0x3d5abc[_0x5971('0x34')]=_[_0x5971('0x35')](_0xad72d1['model'],qs['fields'](_0x5b02c7[_0x5971('0x32')][_0x5971('0x36')]));_0x3d5abc['attributes']=_0x3d5abc[_0x5971('0x34')]['length']?_0x3d5abc[_0x5971('0x34')]:_0xad72d1[_0x5971('0x2f')];if(_0x5b02c7[_0x5971('0x32')][_0x5971('0x42')]){_0x3d5abc[_0x5971('0x43')]=[{'all':!![]}];}_0x3d5abc=_['merge']({},_0x3d5abc,_0x5b02c7[_0x5971('0x41')]);return db[_0x5971('0x2d')]['find'](_0x3d5abc)[_0x5971('0x28')](handleEntityNotFound(_0x51d194,null))['then'](respondWithResult(_0x51d194,null))[_0x5971('0x46')](handleError(_0x51d194,null));};exports[_0x5971('0x4a')]=function(_0x29b6b1,_0x37ed12){return db[_0x5971('0x2d')]['create'](_0x29b6b1[_0x5971('0x4b')],{})[_0x5971('0x28')](respondWithResult(_0x37ed12,0xc9))[_0x5971('0x46')](handleError(_0x37ed12,null));};exports[_0x5971('0x27')]=function(_0x27bdd8,_0xf1b968){if(_0x27bdd8[_0x5971('0x4b')]['id']){delete _0x27bdd8['body']['id'];}return db[_0x5971('0x2d')]['find']({'where':{'id':_0x27bdd8[_0x5971('0x4c')]['id']}})[_0x5971('0x28')](handleEntityNotFound(_0xf1b968,null))[_0x5971('0x28')](saveUpdates(_0x27bdd8['body'],null))[_0x5971('0x28')](respondWithResult(_0xf1b968,null))[_0x5971('0x46')](handleError(_0xf1b968,null));};exports[_0x5971('0x29')]=function(_0x2b7677,_0xa7d6c0){return db[_0x5971('0x2d')][_0x5971('0x4d')]({'where':{'id':_0x2b7677[_0x5971('0x4c')]['id']}})[_0x5971('0x28')](handleEntityNotFound(_0xa7d6c0,null))[_0x5971('0x28')](removeEntity(_0xa7d6c0,null))[_0x5971('0x46')](handleError(_0xa7d6c0,null));};exports[_0x5971('0x4e')]=function(_0x465475,_0x4512d0){return db['VoiceQueueReport'][_0x5971('0x4e')]()[_0x5971('0x28')](respondWithResult(_0x4512d0,null))[_0x5971('0x46')](handleError(_0x4512d0,null));};exports[_0x5971('0x4f')]=function(_0x44250d,_0x38f1df){var _0x29d2ca={},_0x5dddf1={},_0x53c7e2={'count':0x0,'rows':[]};_0x5dddf1[_0x5971('0x2f')]=_[_0x5971('0x49')](db[_0x5971('0x2d')][_0x5971('0x48')]);_0x5dddf1[_0x5971('0x32')]=_['keys'](_0x44250d[_0x5971('0x32')]);_0x5dddf1['filters']=_[_0x5971('0x35')](_0x5dddf1[_0x5971('0x2f')],_0x5dddf1[_0x5971('0x32')]);_0x29d2ca[_0x5971('0x34')]=_[_0x5971('0x35')](_0x5dddf1[_0x5971('0x2f')],qs[_0x5971('0x36')](_0x44250d['query'][_0x5971('0x36')]));_0x29d2ca[_0x5971('0x34')]=_0x29d2ca[_0x5971('0x34')][_0x5971('0x50')]?_0x29d2ca[_0x5971('0x34')]:_0x5dddf1[_0x5971('0x2f')];if(!_0x44250d[_0x5971('0x32')][_0x5971('0x37')]('nolimit')){_0x29d2ca['limit']=qs['limit'](_0x44250d['query'][_0x5971('0x1f')]);_0x29d2ca[_0x5971('0x1e')]=qs[_0x5971('0x1e')](_0x44250d[_0x5971('0x32')]['offset']);}_0x29d2ca[_0x5971('0x39')]=qs[_0x5971('0x3a')](_0x44250d['query'][_0x5971('0x3a')]);_0x29d2ca[_0x5971('0x3b')]=qs[_0x5971('0x33')](_[_0x5971('0x3c')](_0x44250d['query'],_0x5dddf1[_0x5971('0x33')]));if(_0x44250d['query'][_0x5971('0x3d')]){_0x29d2ca[_0x5971('0x3b')]=_[_0x5971('0x40')](_0x29d2ca[_0x5971('0x3b')],{'$or':_['map'](_0x29d2ca[_0x5971('0x34')],function(_0x267ddb){var _0x5adaea={};_0x5adaea[_0x267ddb]={'$like':'%'+_0x44250d[_0x5971('0x32')][_0x5971('0x3d')]+'%'};return _0x5adaea;})});}_0x29d2ca=_['merge']({},_0x29d2ca,_0x44250d[_0x5971('0x41')]);var _0x2e1f39={'where':_0x29d2ca['where']};return db[_0x5971('0x2d')][_0x5971('0x21')](_0x2e1f39)[_0x5971('0x28')](function(_0x481d9e){_0x53c7e2[_0x5971('0x21')]=_0x481d9e;if(_0x44250d[_0x5971('0x32')]['includeAll']){_0x29d2ca['include']=[{'all':!![]}];}return db[_0x5971('0x2d')][_0x5971('0x44')](_0x29d2ca);})['then'](function(_0x2a65bb){_0x53c7e2[_0x5971('0x45')]=_0x2a65bb;return _0x53c7e2;})[_0x5971('0x28')](respondWithFilteredResult(_0x38f1df,_0x29d2ca,_0x5971('0x4f')))[_0x5971('0x46')](handleError(_0x38f1df,null,_0x5971('0x4f')));}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.events.js b/server/api/voiceQueueReport/voiceQueueReport.events.js index 146f88b..f017ea1 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 _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 +var _0x61f5=['save','remove','emit','hasOwnProperty','exports','events'];(function(_0x5ac1e5,_0x4b5012){var _0x1bccc6=function(_0x102562){while(--_0x102562){_0x5ac1e5['push'](_0x5ac1e5['shift']());}};_0x1bccc6(++_0x4b5012);}(_0x61f5,0xb3));var _0x561f=function(_0x576170,_0x1712ae){_0x576170=_0x576170-0x0;var _0x397c70=_0x61f5[_0x576170];return _0x397c70;};'use strict';var EventEmitter=require(_0x561f('0x0'));var VoiceQueueReport=require('../../mysqldb')['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x561f('0x1'),'afterUpdate':'update','afterDestroy':_0x561f('0x2')};function emitEvent(_0x2dc918){return function(_0x1f8afb,_0x9af145,_0x40ff39){VoiceQueueReportEvents[_0x561f('0x3')](_0x2dc918+':'+_0x1f8afb['id'],_0x1f8afb);VoiceQueueReportEvents['emit'](_0x2dc918,_0x1f8afb);_0x40ff39(null);};}for(var e in events){if(events[_0x561f('0x4')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x561f('0x5')]=VoiceQueueReportEvents; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.model.js b/server/api/voiceQueueReport/voiceQueueReport.model.js index baa5d05..b4b2aed 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 _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 +var _0x868d=['./voiceQueueReport.attributes','define','report_queue','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x868d,0xc3));var _0xd868=function(_0x12f481,_0x5095b8){_0x12f481=_0x12f481-0x0;var _0x4bbc95=_0x868d[_0x12f481];return _0x4bbc95;};'use strict';var _=require(_0xd868('0x0'));var util=require(_0xd868('0x1'));var logger=require(_0xd868('0x2'))(_0xd868('0x3'));var moment=require(_0xd868('0x4'));var BPromise=require(_0xd868('0x5'));var rp=require(_0xd868('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd868('0x7'));var config=require(_0xd868('0x8'));var attributes=require(_0xd868('0x9'));module['exports']=function(_0x1395e1,_0x7c0df2){return _0x1395e1[_0xd868('0xa')]('VoiceQueueReport',attributes,{'tableName':_0xd868('0xb'),'paranoid':![],'indexes':[{'fields':['uniqueid']},{'fields':['calleridnum']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.rpc.js b/server/api/voiceQueueReport/voiceQueueReport.rpc.js index f8390a3..3036787 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 _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 +var _0xc103=['localhost','socket.io-emitter','./voiceQueueReport.socket','register','request','then','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','VoiceQueueReport','findAll','options','raw','where','attributes','include','map','model','info','GetVoiceQueueReport','CreateVoiceQueueReport','create','body','UpdateVoiceQueueReport','util','moment','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis'];(function(_0x1f703f,_0x266ba9){var _0x3ad2ec=function(_0x306f81){while(--_0x306f81){_0x1f703f['push'](_0x1f703f['shift']());}};_0x3ad2ec(++_0x266ba9);}(_0xc103,0x9a));var _0x3c10=function(_0x29ec86,_0x199ca3){_0x29ec86=_0x29ec86-0x0;var _0x494003=_0xc103[_0x29ec86];return _0x494003;};'use strict';var _=require('lodash');var util=require(_0x3c10('0x0'));var moment=require(_0x3c10('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3c10('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x3c10('0x3'))(_0x3c10('0x4'));var config=require(_0x3c10('0x5'));var jayson=require(_0x3c10('0x6'));var client=jayson[_0x3c10('0x7')][_0x3c10('0x8')]({'port':0x232a});config[_0x3c10('0x9')]=_['defaults'](config[_0x3c10('0x9')],{'host':_0x3c10('0xa'),'port':0x18eb});var socket=require(_0x3c10('0xb'))(new Redis(config[_0x3c10('0x9')]));require(_0x3c10('0xc'))[_0x3c10('0xd')](socket);function respondWithRpcPromise(_0x254f8f,_0x358004,_0x18f3fb){return new BPromise(function(_0x37508f,_0x42027f){return client[_0x3c10('0xe')](_0x254f8f,_0x18f3fb)[_0x3c10('0xf')](function(_0x2f865e){logger['info'](_0x3c10('0x10'),_0x358004,_0x3c10('0x11'));logger[_0x3c10('0x12')](_0x3c10('0x13'),_0x358004,_0x3c10('0x11'),JSON[_0x3c10('0x14')](_0x2f865e));if(_0x2f865e[_0x3c10('0x15')]){if(_0x2f865e[_0x3c10('0x15')][_0x3c10('0x16')]===0x1f4){logger['error'](_0x3c10('0x10'),_0x358004,_0x2f865e[_0x3c10('0x15')][_0x3c10('0x17')]);return _0x42027f(_0x2f865e[_0x3c10('0x15')][_0x3c10('0x17')]);}logger[_0x3c10('0x15')]('VoiceQueueReport,\x20%s,\x20%s',_0x358004,_0x2f865e['error'][_0x3c10('0x17')]);return _0x37508f(_0x2f865e[_0x3c10('0x15')][_0x3c10('0x17')]);}else{logger['info'](_0x3c10('0x10'),_0x358004,'request\x20sent');_0x37508f(_0x2f865e[_0x3c10('0x18')][_0x3c10('0x17')]);}})[_0x3c10('0x19')](function(_0x1b3f07){logger[_0x3c10('0x15')](_0x3c10('0x10'),_0x358004,_0x1b3f07);_0x42027f(_0x1b3f07);});});}exports['GetVoiceQueueReport']=function(_0x37787d){var _0x315c46=this;return new Promise(function(_0x234a24,_0x53d4d3){return db[_0x3c10('0x1a')][_0x3c10('0x1b')]({'raw':_0x37787d[_0x3c10('0x1c')]?_0x37787d['options'][_0x3c10('0x1d')]===undefined?!![]:![]:!![],'where':_0x37787d[_0x3c10('0x1c')]?_0x37787d[_0x3c10('0x1c')][_0x3c10('0x1e')]||null:null,'attributes':_0x37787d[_0x3c10('0x1c')]?_0x37787d[_0x3c10('0x1c')][_0x3c10('0x1f')]||null:null,'limit':_0x37787d[_0x3c10('0x1c')]?_0x37787d[_0x3c10('0x1c')]['limit']||null:null,'include':_0x37787d[_0x3c10('0x1c')]?_0x37787d[_0x3c10('0x1c')][_0x3c10('0x20')]?_['map'](_0x37787d['options'][_0x3c10('0x20')],function(_0x5badbc){return{'model':db[_0x5badbc['model']],'as':_0x5badbc['as'],'attributes':_0x5badbc[_0x3c10('0x1f')],'include':_0x5badbc[_0x3c10('0x20')]?_[_0x3c10('0x21')](_0x5badbc[_0x3c10('0x20')],function(_0x497e76){return{'model':db[_0x497e76['model']],'as':_0x497e76['as'],'attributes':_0x497e76[_0x3c10('0x1f')],'include':_0x497e76[_0x3c10('0x20')]?_[_0x3c10('0x21')](_0x497e76['include'],function(_0x3892d1){return{'model':db[_0x3892d1[_0x3c10('0x22')]],'as':_0x3892d1['as'],'attributes':_0x3892d1[_0x3c10('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x3c10('0xf')](function(_0x5ae83c){logger[_0x3c10('0x23')](_0x3c10('0x24'),_0x37787d);logger[_0x3c10('0x12')](_0x3c10('0x24'),_0x37787d,JSON[_0x3c10('0x14')](_0x5ae83c));_0x234a24(_0x5ae83c);})[_0x3c10('0x19')](function(_0x45611b){logger[_0x3c10('0x15')](_0x3c10('0x24'),_0x45611b[_0x3c10('0x17')],_0x37787d);_0x53d4d3(_0x315c46[_0x3c10('0x15')](0x1f4,_0x45611b[_0x3c10('0x17')]));});});};exports[_0x3c10('0x25')]=function(_0x26de83){var _0x441890=this;return new Promise(function(_0x16619c,_0x12fccf){return db[_0x3c10('0x1a')][_0x3c10('0x26')](_0x26de83[_0x3c10('0x27')],{'raw':_0x26de83[_0x3c10('0x1c')]?_0x26de83[_0x3c10('0x1c')][_0x3c10('0x1d')]===undefined?!![]:![]:!![]})[_0x3c10('0xf')](function(_0x4fd8dc){logger[_0x3c10('0x23')]('CreateVoiceQueueReport',_0x26de83);logger[_0x3c10('0x12')](_0x3c10('0x25'),_0x26de83,JSON['stringify'](_0x4fd8dc));_0x16619c(_0x4fd8dc);})[_0x3c10('0x19')](function(_0x4cc910){logger[_0x3c10('0x15')](_0x3c10('0x25'),_0x4cc910[_0x3c10('0x17')],_0x26de83);_0x12fccf(_0x441890[_0x3c10('0x15')](0x1f4,_0x4cc910[_0x3c10('0x17')]));});});};exports[_0x3c10('0x28')]=function(_0x374a62){var _0x4ab3e3=this;return new Promise(function(_0xf4701e,_0x26d176){return db[_0x3c10('0x1a')]['update'](_0x374a62[_0x3c10('0x27')],{'raw':_0x374a62[_0x3c10('0x1c')]?_0x374a62[_0x3c10('0x1c')][_0x3c10('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x374a62['options']?_0x374a62[_0x3c10('0x1c')][_0x3c10('0x1e')]||null:null,'attributes':_0x374a62[_0x3c10('0x1c')]?_0x374a62[_0x3c10('0x1c')]['attributes']||null:null,'limit':_0x374a62[_0x3c10('0x1c')]?_0x374a62['options']['limit']||null:null})[_0x3c10('0xf')](function(_0x1a5c4e){logger[_0x3c10('0x23')](_0x3c10('0x28'),_0x374a62);logger[_0x3c10('0x12')]('UpdateVoiceQueueReport',_0x374a62,JSON[_0x3c10('0x14')](_0x1a5c4e));_0xf4701e(_0x1a5c4e);})[_0x3c10('0x19')](function(_0x36023b){logger[_0x3c10('0x15')](_0x3c10('0x28'),_0x36023b[_0x3c10('0x17')],_0x374a62);_0x26d176(_0x4ab3e3[_0x3c10('0x15')](0x1f4,_0x36023b[_0x3c10('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.socket.js b/server/api/voiceQueueReport/voiceQueueReport.socket.js index ee659f6..6d58ec5 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 _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 +var _0xb898=['voiceQueueReport:','./voiceQueueReport.events','remove','update','emit','register'];(function(_0x4bb6e9,_0x8d2c1b){var _0x20b085=function(_0x7ea88){while(--_0x7ea88){_0x4bb6e9['push'](_0x4bb6e9['shift']());}};_0x20b085(++_0x8d2c1b);}(_0xb898,0xa9));var _0x8b89=function(_0x4a8418,_0x39078a){_0x4a8418=_0x4a8418-0x0;var _0x390174=_0xb898[_0x4a8418];return _0x390174;};'use strict';var VoiceQueueReportEvents=require(_0x8b89('0x0'));var events=['save',_0x8b89('0x1'),_0x8b89('0x2')];function createListener(_0x2b6b1a,_0x4b4ac4){return function(_0x481c69){_0x4b4ac4[_0x8b89('0x3')](_0x2b6b1a,_0x481c69);};}function removeListener(_0x53b04c,_0x5aecd7){return function(){VoiceQueueReportEvents['removeListener'](_0x53b04c,_0x5aecd7);};}exports[_0x8b89('0x4')]=function(_0x4ebfaa){for(var _0x882fba=0x0,_0x20dc0b=events['length'];_0x882fba<_0x20dc0b;_0x882fba++){var _0x3dc440=events[_0x882fba];var _0x2e853d=createListener(_0x8b89('0x5')+_0x3dc440,_0x4ebfaa);VoiceQueueReportEvents['on'](_0x3dc440,_0x2e853d);}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/index.js b/server/api/voiceQueuesLog/index.js index 26e699f..a9109b0 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 _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 +var _0x44d7=['../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller','isAuthenticated','index','/:id','show','create','put','update','delete','destroy','exports','multer','util','path','fs-extra','../../components/auth/service'];(function(_0x579510,_0x5758c7){var _0x2c6794=function(_0x54cc38){while(--_0x54cc38){_0x579510['push'](_0x579510['shift']());}};_0x2c6794(++_0x5758c7);}(_0x44d7,0x151));var _0x744d=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x44d7[_0x3bf83f];return _0x22c4a9;};'use strict';var multer=require(_0x744d('0x0'));var util=require(_0x744d('0x1'));var path=require(_0x744d('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x744d('0x3'));var auth=require(_0x744d('0x4'));var interaction=require(_0x744d('0x5'));var config=require(_0x744d('0x6'));var controller=require(_0x744d('0x7'));router['get']('/',auth[_0x744d('0x8')](),controller[_0x744d('0x9')]);router['get'](_0x744d('0xa'),auth[_0x744d('0x8')](),controller[_0x744d('0xb')]);router['post']('/',auth[_0x744d('0x8')](),controller[_0x744d('0xc')]);router[_0x744d('0xd')]('/:id',auth[_0x744d('0x8')](),controller[_0x744d('0xe')]);router[_0x744d('0xf')]('/:id',auth[_0x744d('0x8')](),controller[_0x744d('0x10')]);module[_0x744d('0x11')]=router; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js index d16905f..6e5c807 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 _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 +var _0x6b4c=['sequelize','moment','exports','STRING','DATE','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x1e3b8f,_0x5b7d53){var _0x13d634=function(_0xeebea8){while(--_0xeebea8){_0x1e3b8f['push'](_0x1e3b8f['shift']());}};_0x13d634(++_0x5b7d53);}(_0x6b4c,0x8c));var _0xc6b4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6b4c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xc6b4('0x0'));var moment=require(_0xc6b4('0x1'));module[_0xc6b4('0x2')]={'time':{'type':Sequelize[_0xc6b4('0x3')]},'callid':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0xc6b4('0x3')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0xc6b4('0x4')],'allowNull':![],'defaultValue':moment()[_0xc6b4('0x5')](_0xc6b4('0x6'))}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js index 0cfbeca..e5584cb 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 _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 +var _0x9d5f=['type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','offset','undefined','limit','count','Content-Range','json','apply','update','then','destroy','sendStatus','error','stack','name','send','index','VoiceQueuesLog','fieldName'];(function(_0x14e182,_0x459759){var _0x50c292=function(_0x321889){while(--_0x321889){_0x14e182['push'](_0x14e182['shift']());}};_0x50c292(++_0x459759);}(_0x9d5f,0xbb));var _0xf9d5=function(_0x47792d,_0x3e52fd){_0x47792d=_0x47792d-0x0;var _0x3b33df=_0x9d5f[_0x47792d];return _0x3b33df;};'use strict';var emlformat=require(_0xf9d5('0x0'));var rimraf=require(_0xf9d5('0x1'));var zipdir=require(_0xf9d5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf9d5('0x3'));var moment=require(_0xf9d5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xf9d5('0x5'));var util=require(_0xf9d5('0x6'));var path=require(_0xf9d5('0x7'));var sox=require(_0xf9d5('0x8'));var csv=require(_0xf9d5('0x9'));var ejs=require(_0xf9d5('0xa'));var fs=require('fs');var fs_extra=require(_0xf9d5('0xb'));var _=require(_0xf9d5('0xc'));var squel=require(_0xf9d5('0xd'));var crypto=require(_0xf9d5('0xe'));var jsforce=require(_0xf9d5('0xf'));var deskjs=require(_0xf9d5('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf9d5('0x11'));var Papa=require(_0xf9d5('0x12'));var Redis=require(_0xf9d5('0x13'));var authService=require(_0xf9d5('0x14'));var qs=require(_0xf9d5('0x15'));var as=require(_0xf9d5('0x16'));var hardwareService=require(_0xf9d5('0x17'));var logger=require(_0xf9d5('0x18'))(_0xf9d5('0x19'));var utils=require(_0xf9d5('0x1a'));var config=require(_0xf9d5('0x1b'));var licenseUtil=require(_0xf9d5('0x1c'));var db=require(_0xf9d5('0x1d'))['db'];function respondWithStatusCode(_0x2d8e07,_0x1753b0){_0x1753b0=_0x1753b0||0xcc;return function(_0x215cce){if(_0x215cce){return _0x2d8e07['sendStatus'](_0x1753b0);}return _0x2d8e07['status'](_0x1753b0)[_0xf9d5('0x1e')]();};}function respondWithResult(_0x475417,_0x6dc91f){_0x6dc91f=_0x6dc91f||0xc8;return function(_0xfcd486){if(_0xfcd486){return _0x475417[_0xf9d5('0x1f')](_0x6dc91f)['json'](_0xfcd486);}};}function respondWithFilteredResult(_0x36007f,_0x154efa){return function(_0x357a73){if(_0x357a73){var _0x1f89c1=typeof _0x154efa[_0xf9d5('0x20')]===_0xf9d5('0x21')&&typeof _0x154efa[_0xf9d5('0x22')]===_0xf9d5('0x21');var _0xbe5401=_0x357a73[_0xf9d5('0x23')];var _0xca1834=_0x1f89c1?0x0:_0x154efa[_0xf9d5('0x20')];var _0x960e5b=_0x1f89c1?_0x357a73['count']:_0x154efa['offset']+_0x154efa[_0xf9d5('0x22')];var _0x4af6e6;if(_0x960e5b>=_0xbe5401){_0x960e5b=_0xbe5401;_0x4af6e6=0xc8;}else{_0x4af6e6=0xce;}_0x36007f[_0xf9d5('0x1f')](_0x4af6e6);return _0x36007f['set'](_0xf9d5('0x24'),_0xca1834+'-'+_0x960e5b+'/'+_0xbe5401)[_0xf9d5('0x25')](_0x357a73);}return null;};}function patchUpdates(_0x79973f){return function(_0x30f757){try{jsonpatch[_0xf9d5('0x26')](_0x30f757,_0x79973f,!![]);}catch(_0x166b63){return BPromise['reject'](_0x166b63);}return _0x30f757['save']();};}function saveUpdates(_0x6f3db0,_0x22ec5f){return function(_0xd87cad){if(_0xd87cad){return _0xd87cad[_0xf9d5('0x27')](_0x6f3db0)[_0xf9d5('0x28')](function(_0x27e82b){return _0x27e82b;});}return null;};}function removeEntity(_0x3e98ca,_0x17a0ac){return function(_0x2b3025){if(_0x2b3025){return _0x2b3025[_0xf9d5('0x29')]()[_0xf9d5('0x28')](function(){_0x3e98ca[_0xf9d5('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x56a8c4,_0x398798){return function(_0x5142f3){if(!_0x5142f3){_0x56a8c4[_0xf9d5('0x2a')](0x194);}return _0x5142f3;};}function handleError(_0x251143,_0x291567){_0x291567=_0x291567||0x1f4;return function(_0x40244a){logger[_0xf9d5('0x2b')](_0x40244a[_0xf9d5('0x2c')]);if(_0x40244a[_0xf9d5('0x2d')]){delete _0x40244a[_0xf9d5('0x2d')];}_0x251143[_0xf9d5('0x1f')](_0x291567)[_0xf9d5('0x2e')](_0x40244a);};}exports[_0xf9d5('0x2f')]=function(_0x4aa22b,_0x4d9580){var _0x3f4a9e={},_0x4a03e7={},_0x564cda={'count':0x0,'rows':[]};var _0x1bfc76=_['map'](db[_0xf9d5('0x30')]['rawAttributes'],function(_0x5f3737){return{'name':_0x5f3737[_0xf9d5('0x31')],'type':_0x5f3737[_0xf9d5('0x32')][_0xf9d5('0x33')]};});_0x4a03e7[_0xf9d5('0x34')]=_[_0xf9d5('0x35')](_0x1bfc76,_0xf9d5('0x2d'));_0x4a03e7[_0xf9d5('0x36')]=_[_0xf9d5('0x37')](_0x4aa22b[_0xf9d5('0x36')]);_0x4a03e7[_0xf9d5('0x38')]=_[_0xf9d5('0x39')](_0x4a03e7[_0xf9d5('0x34')],_0x4a03e7[_0xf9d5('0x36')]);_0x3f4a9e['attributes']=_[_0xf9d5('0x39')](_0x4a03e7[_0xf9d5('0x34')],qs['fields'](_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x3a')]));_0x3f4a9e[_0xf9d5('0x3b')]=_0x3f4a9e['attributes'][_0xf9d5('0x3c')]?_0x3f4a9e[_0xf9d5('0x3b')]:_0x4a03e7[_0xf9d5('0x34')];if(!_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x3d')](_0xf9d5('0x3e'))){_0x3f4a9e[_0xf9d5('0x22')]=qs[_0xf9d5('0x22')](_0x4aa22b[_0xf9d5('0x36')]['limit']);_0x3f4a9e[_0xf9d5('0x20')]=qs[_0xf9d5('0x20')](_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x20')]);}_0x3f4a9e[_0xf9d5('0x3f')]=qs[_0xf9d5('0x40')](_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x40')]);_0x3f4a9e[_0xf9d5('0x41')]=qs[_0xf9d5('0x38')](_['pick'](_0x4aa22b[_0xf9d5('0x36')],_0x4a03e7[_0xf9d5('0x38')]),_0x1bfc76);if(_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x42')]){_0x3f4a9e['where']=_[_0xf9d5('0x43')](_0x3f4a9e[_0xf9d5('0x41')],{'$or':_['map'](_0x1bfc76,function(_0x5b9203){if(_0x5b9203[_0xf9d5('0x32')]!==_0xf9d5('0x44')){var _0x3c1fb3={};_0x3c1fb3[_0x5b9203[_0xf9d5('0x2d')]]={'$like':'%'+_0x4aa22b[_0xf9d5('0x36')][_0xf9d5('0x42')]+'%'};return _0x3c1fb3;}})});}_0x3f4a9e=_[_0xf9d5('0x43')]({},_0x3f4a9e,_0x4aa22b[_0xf9d5('0x45')]);var _0x32d3a5={'where':_0x3f4a9e[_0xf9d5('0x41')]};return db[_0xf9d5('0x30')]['count'](_0x32d3a5)['then'](function(_0x4cbee8){_0x564cda[_0xf9d5('0x23')]=_0x4cbee8;if(_0x4aa22b['query'][_0xf9d5('0x46')]){_0x3f4a9e[_0xf9d5('0x47')]=[{'all':!![]}];}return db[_0xf9d5('0x30')][_0xf9d5('0x48')](_0x3f4a9e);})['then'](function(_0x355fa3){_0x564cda['rows']=_0x355fa3;return _0x564cda;})[_0xf9d5('0x28')](respondWithFilteredResult(_0x4d9580,_0x3f4a9e))[_0xf9d5('0x49')](handleError(_0x4d9580,null));};exports[_0xf9d5('0x4a')]=function(_0x58dfee,_0x564080){var _0x579c85={'raw':!![],'where':{'id':_0x58dfee[_0xf9d5('0x4b')]['id']}},_0x269446={};_0x269446[_0xf9d5('0x34')]=_['keys'](db[_0xf9d5('0x30')]['rawAttributes']);_0x269446[_0xf9d5('0x36')]=_['keys'](_0x58dfee[_0xf9d5('0x36')]);_0x269446[_0xf9d5('0x38')]=_[_0xf9d5('0x39')](_0x269446[_0xf9d5('0x34')],_0x269446['query']);_0x579c85[_0xf9d5('0x3b')]=_['intersection'](_0x269446[_0xf9d5('0x34')],qs[_0xf9d5('0x3a')](_0x58dfee['query'][_0xf9d5('0x3a')]));_0x579c85[_0xf9d5('0x3b')]=_0x579c85[_0xf9d5('0x3b')][_0xf9d5('0x3c')]?_0x579c85[_0xf9d5('0x3b')]:_0x269446[_0xf9d5('0x34')];if(_0x58dfee[_0xf9d5('0x36')][_0xf9d5('0x46')]){_0x579c85[_0xf9d5('0x47')]=[{'all':!![]}];}_0x579c85=_[_0xf9d5('0x43')]({},_0x579c85,_0x58dfee['options']);return db[_0xf9d5('0x30')][_0xf9d5('0x4c')](_0x579c85)[_0xf9d5('0x28')](handleEntityNotFound(_0x564080,null))[_0xf9d5('0x28')](respondWithResult(_0x564080,null))[_0xf9d5('0x49')](handleError(_0x564080,null));};exports[_0xf9d5('0x4d')]=function(_0x5320d6,_0x23ea1b){return db['VoiceQueuesLog'][_0xf9d5('0x4d')](_0x5320d6['body'],{})[_0xf9d5('0x28')](respondWithResult(_0x23ea1b,0xc9))[_0xf9d5('0x49')](handleError(_0x23ea1b,null));};exports['update']=function(_0x31862f,_0x1cf07c){if(_0x31862f[_0xf9d5('0x4e')]['id']){delete _0x31862f[_0xf9d5('0x4e')]['id'];}return db[_0xf9d5('0x30')]['find']({'where':{'id':_0x31862f['params']['id']}})['then'](handleEntityNotFound(_0x1cf07c,null))['then'](saveUpdates(_0x31862f['body'],null))[_0xf9d5('0x28')](respondWithResult(_0x1cf07c,null))[_0xf9d5('0x49')](handleError(_0x1cf07c,null));};exports['destroy']=function(_0x4c0a95,_0x1979c6){return db[_0xf9d5('0x30')][_0xf9d5('0x4c')]({'where':{'id':_0x4c0a95[_0xf9d5('0x4b')]['id']}})[_0xf9d5('0x28')](handleEntityNotFound(_0x1979c6,null))[_0xf9d5('0x28')](removeEntity(_0x1979c6,null))[_0xf9d5('0x49')](handleError(_0x1979c6,null));}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.model.js b/server/api/voiceQueuesLog/voiceQueuesLog.model.js index e4f3d29..7c1106c 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 _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 +var _0x8f94=['define','voice_queues_log','event_dtm','event','dtm','lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment','exports'];(function(_0x2965b5,_0x572e59){var _0xf4f589=function(_0x4162ae){while(--_0x4162ae){_0x2965b5['push'](_0x2965b5['shift']());}};_0xf4f589(++_0x572e59);}(_0x8f94,0xd7));var _0x48f9=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x8f94[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0x48f9('0x0'));var util=require(_0x48f9('0x1'));var logger=require(_0x48f9('0x2'))(_0x48f9('0x3'));var moment=require(_0x48f9('0x4'));var BPromise=require('bluebird');var rp=require(_0x48f9('0x5'));var fs=require('fs');var path=require(_0x48f9('0x6'));var rimraf=require('rimraf');var config=require(_0x48f9('0x7'));var attributes=require('./voiceQueuesLog.attributes');module[_0x48f9('0x8')]=function(_0x5d427f,_0x38c652){return _0x5d427f[_0x48f9('0x9')]('VoiceQueuesLog',attributes,{'tableName':_0x48f9('0xa'),'paranoid':![],'indexes':[{'name':_0x48f9('0xb'),'fields':[_0x48f9('0xc'),_0x48f9('0xd')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js index 54944d8..3c4eb66 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 _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 +var _0x152f=['result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','info','request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceQueuesLog,\x20%s,\x20%s','message'];(function(_0x1b2136,_0x4b6968){var _0x1cdde2=function(_0x5240de){while(--_0x5240de){_0x1b2136['push'](_0x1b2136['shift']());}};_0x1cdde2(++_0x4b6968);}(_0x152f,0x144));var _0xf152=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x152f[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0xf152('0x0'));var util=require(_0xf152('0x1'));var moment=require(_0xf152('0x2'));var BPromise=require(_0xf152('0x3'));var rs=require(_0xf152('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf152('0x5'))['db'];var utils=require(_0xf152('0x6'));var logger=require(_0xf152('0x7'))(_0xf152('0x8'));var config=require('../../config/environment');var jayson=require(_0xf152('0x9'));var client=jayson['client'][_0xf152('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x504fb6,_0x36498a,_0x5ec158){return new BPromise(function(_0x5206b3,_0x3190e3){return client[_0xf152('0xb')](_0x504fb6,_0x5ec158)['then'](function(_0x133f44){logger[_0xf152('0xc')]('VoiceQueuesLog,\x20%s,\x20%s',_0x36498a,_0xf152('0xd'));logger[_0xf152('0xe')](_0xf152('0xf'),_0x36498a,_0xf152('0xd'),JSON[_0xf152('0x10')](_0x133f44));if(_0x133f44[_0xf152('0x11')]){if(_0x133f44[_0xf152('0x11')][_0xf152('0x12')]===0x1f4){logger[_0xf152('0x11')](_0xf152('0x13'),_0x36498a,_0x133f44[_0xf152('0x11')][_0xf152('0x14')]);return _0x3190e3(_0x133f44[_0xf152('0x11')][_0xf152('0x14')]);}logger['error'](_0xf152('0x13'),_0x36498a,_0x133f44[_0xf152('0x11')]['message']);return _0x5206b3(_0x133f44[_0xf152('0x11')][_0xf152('0x14')]);}else{logger[_0xf152('0xc')]('VoiceQueuesLog,\x20%s,\x20%s',_0x36498a,_0xf152('0xd'));_0x5206b3(_0x133f44[_0xf152('0x15')]['message']);}})[_0xf152('0x16')](function(_0x29bad9){logger[_0xf152('0x11')](_0xf152('0x13'),_0x36498a,_0x29bad9);_0x3190e3(_0x29bad9);});});} \ No newline at end of file diff --git a/server/api/voiceRecording/index.js b/server/api/voiceRecording/index.js index 008070d..a63f9da 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 _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 +var _0x1c51=['/:id/downloads','downloads','downloadTranscribe','post','create','/:id/transcribe','runTranscribe','put','delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/download','download'];(function(_0x162172,_0x34e06c){var _0x2d98c4=function(_0x216589){while(--_0x216589){_0x162172['push'](_0x162172['shift']());}};_0x2d98c4(++_0x34e06c);}(_0x1c51,0x96));var _0x11c5=function(_0x4e7d25,_0x58285f){_0x4e7d25=_0x4e7d25-0x0;var _0x526fe6=_0x1c51[_0x4e7d25];return _0x526fe6;};'use strict';var multer=require('multer');var util=require(_0x11c5('0x0'));var path=require(_0x11c5('0x1'));var timeout=require(_0x11c5('0x2'));var express=require(_0x11c5('0x3'));var router=express[_0x11c5('0x4')]();var fs_extra=require(_0x11c5('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x11c5('0x6'));var config=require(_0x11c5('0x7'));var controller=require(_0x11c5('0x8'));router[_0x11c5('0x9')]('/',auth[_0x11c5('0xa')](),controller[_0x11c5('0xb')]);router[_0x11c5('0x9')](_0x11c5('0xc'),auth[_0x11c5('0xa')](),controller[_0x11c5('0xd')]);router['get'](_0x11c5('0xe'),auth[_0x11c5('0xa')](),controller[_0x11c5('0xf')]);router[_0x11c5('0x9')](_0x11c5('0x10'),auth['isAuthenticated'](),controller[_0x11c5('0x11')]);router['get'](_0x11c5('0x12'),controller[_0x11c5('0x13')]);router['get']('/:id/transcribe',auth[_0x11c5('0xa')](),controller[_0x11c5('0x14')]);router[_0x11c5('0x15')]('/',auth[_0x11c5('0xa')](),controller[_0x11c5('0x16')]);router[_0x11c5('0x15')](_0x11c5('0x17'),auth[_0x11c5('0xa')](),controller[_0x11c5('0x18')]);router[_0x11c5('0x19')](_0x11c5('0xe'),auth[_0x11c5('0xa')](),controller['update']);router[_0x11c5('0x1a')](_0x11c5('0xe'),auth[_0x11c5('0xa')](),controller[_0x11c5('0x1b')]);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 1a70143..0617468 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(_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 +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(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xa9e0[_0x2b4411];return _0x8e41ef;};'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 c078fb5..67b3d0e 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 _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 +var _0x32a8=['root','/server/files/transcribes/transcribe_','.txt','Transcript\x20not\x20available','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','uuid/v4','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','destroy','end','error','stack','name','send','map','VoiceRecording','rawAttributes','fieldName','type','model','differenceBy','format','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','catch','show','params','include','create','body','find','describe','../../components/encryptor','uniqueid','value','%s.cypher','existsSync','decryptFile','recording','Sequelize','ValidationError','filename','download','unlink','message','VoiceRecording\x20not\x20found','Not\x20found','downloads','sequelize','MD5','col','token','$and','push','secrets','extname','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','listBuckets','createBucket','TranscribeService','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','readFileSync','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','bucket','location','Location','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','TranscriptionJobName','transcribeName','transcribeStatus','runTranscribe','Voice\x20Recording\x20not\x20found','Setting','transcribe','transcribeRegion','language','sentiment','sentimentAccountId','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','findOne','transcribeAccountId','Cloud\x20Provider\x20not\x20available','data1','data2','Cloud\x20Provider\x20not\x20configured','Buckets','Name','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','IN_PROGRESS','tempSentiment','runSentiment','updateAttributes','writeFile','downloadTranscribe','fileText'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x32a8,0xa0));var _0x832a=function(_0x335136,_0x131d00){_0x335136=_0x335136-0x0;var _0x234b60=_0x32a8[_0x335136];return _0x234b60;};'use strict';var emlformat=require(_0x832a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x832a('0x1'));var jsonpatch=require(_0x832a('0x2'));var rp=require(_0x832a('0x3'));var moment=require('moment');var BPromise=require(_0x832a('0x4'));var Mustache=require('mustache');var util=require(_0x832a('0x5'));var path=require(_0x832a('0x6'));var sox=require(_0x832a('0x7'));var csv=require(_0x832a('0x8'));var ejs=require(_0x832a('0x9'));var fs=require('fs');var fs_extra=require(_0x832a('0xa'));var _=require(_0x832a('0xb'));var squel=require(_0x832a('0xc'));var crypto=require(_0x832a('0xd'));var jsforce=require(_0x832a('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x832a('0x8'));var querystring=require(_0x832a('0xf'));var Papa=require(_0x832a('0x10'));var AWS=require('aws-sdk');var uuidv4=require(_0x832a('0x11'));var Redis=require(_0x832a('0x12'));var authService=require(_0x832a('0x13'));var qs=require(_0x832a('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x832a('0x15'));var logger=require(_0x832a('0x16'))(_0x832a('0x17'));var utils=require(_0x832a('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x832a('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2b6698,_0xd1830e){_0xd1830e=_0xd1830e||0xcc;return function(_0x4ec153){if(_0x4ec153){return _0x2b6698[_0x832a('0x1a')](_0xd1830e);}return _0x2b6698[_0x832a('0x1b')](_0xd1830e)['end']();};}function respondWithResult(_0x2a2028,_0x4a51bf){_0x4a51bf=_0x4a51bf||0xc8;return function(_0x47a813){if(_0x47a813){return _0x2a2028[_0x832a('0x1b')](_0x4a51bf)['json'](_0x47a813);}};}function respondWithFilteredResult(_0x20d201,_0x3e9e79){return function(_0x97f17){if(_0x97f17){var _0x11a106=typeof _0x3e9e79[_0x832a('0x1c')]===_0x832a('0x1d')&&typeof _0x3e9e79[_0x832a('0x1e')]===_0x832a('0x1d');var _0x3abb7a=_0x97f17['count'];var _0x475239=_0x11a106?0x0:_0x3e9e79[_0x832a('0x1c')];var _0x3c5bb0=_0x11a106?_0x97f17[_0x832a('0x1f')]:_0x3e9e79['offset']+_0x3e9e79[_0x832a('0x1e')];var _0x53a642;if(_0x3c5bb0>=_0x3abb7a){_0x3c5bb0=_0x3abb7a;_0x53a642=0xc8;}else{_0x53a642=0xce;}_0x20d201['status'](_0x53a642);return _0x20d201[_0x832a('0x20')](_0x832a('0x21'),_0x475239+'-'+_0x3c5bb0+'/'+_0x3abb7a)[_0x832a('0x22')](_0x97f17);}return null;};}function patchUpdates(_0x264c22){return function(_0x5cbb7b){try{jsonpatch[_0x832a('0x23')](_0x5cbb7b,_0x264c22,!![]);}catch(_0x10cf7d){return BPromise[_0x832a('0x24')](_0x10cf7d);}return _0x5cbb7b['save']();};}function saveUpdates(_0x2efbeb,_0x44246b){return function(_0x13d724){if(_0x13d724){return _0x13d724[_0x832a('0x25')](_0x2efbeb)[_0x832a('0x26')](function(_0x3e1452){return _0x3e1452;});}return null;};}function removeEntity(_0xc78cd9,_0x14798d){return function(_0x5d5fd3){if(_0x5d5fd3){return _0x5d5fd3[_0x832a('0x27')]()[_0x832a('0x26')](function(){_0xc78cd9['status'](0xcc)[_0x832a('0x28')]();});}};}function handleEntityNotFound(_0x44ba9c,_0x319e2f){return function(_0x56381a){if(!_0x56381a){_0x44ba9c[_0x832a('0x1a')](0x194);}return _0x56381a;};}function handleError(_0x34133d,_0x3540eb){_0x3540eb=_0x3540eb||0x1f4;return function(_0x2f9e40){logger[_0x832a('0x29')](_0x2f9e40[_0x832a('0x2a')]);if(_0x2f9e40[_0x832a('0x2b')]){delete _0x2f9e40['name'];}_0x34133d['status'](_0x3540eb)[_0x832a('0x2c')](_0x2f9e40);};}exports['index']=function(_0x5ca32f,_0x2d692c){var _0xbc0b67={},_0x4d9df6={},_0x59bc2c={'count':0x0,'rows':[]};var _0x46d611=_[_0x832a('0x2d')](db[_0x832a('0x2e')][_0x832a('0x2f')],function(_0x174549){return{'name':_0x174549[_0x832a('0x30')],'type':_0x174549[_0x832a('0x31')]['key']};});_0x4d9df6[_0x832a('0x32')]=_[_0x832a('0x33')](_[_0x832a('0x2d')](_0x46d611,_0x832a('0x2b')),[_0x832a('0x34')]);_0x4d9df6[_0x832a('0x35')]=_[_0x832a('0x36')](_0x5ca32f[_0x832a('0x35')]);_0x4d9df6[_0x832a('0x37')]=_[_0x832a('0x38')](_0x4d9df6['model'],_0x4d9df6['query']);_0xbc0b67['attributes']=_['intersection'](_0x4d9df6[_0x832a('0x32')],qs[_0x832a('0x39')](_0x5ca32f[_0x832a('0x35')][_0x832a('0x39')]));_0xbc0b67['attributes']=_0xbc0b67[_0x832a('0x3a')][_0x832a('0x3b')]?_0xbc0b67[_0x832a('0x3a')]:_0x4d9df6[_0x832a('0x32')];if(!_0x5ca32f['query'][_0x832a('0x3c')]('nolimit')){_0xbc0b67['limit']=qs[_0x832a('0x1e')](_0x5ca32f['query'][_0x832a('0x1e')]);_0xbc0b67['offset']=qs[_0x832a('0x1c')](_0x5ca32f['query'][_0x832a('0x1c')]);}_0xbc0b67[_0x832a('0x3d')]=qs[_0x832a('0x3e')](_0x5ca32f['query']['sort']);_0xbc0b67['where']=qs[_0x832a('0x37')](_[_0x832a('0x3f')](_0x5ca32f['query'],_0x4d9df6['filters']),_0x46d611);if(_0x5ca32f['query'][_0x832a('0x40')]){_0xbc0b67[_0x832a('0x41')]=_[_0x832a('0x42')](_0xbc0b67['where'],{'$or':_['map'](_0x46d611,function(_0x548d5f){if(_0x548d5f['type']!==_0x832a('0x43')){var _0x58e704={};_0x58e704[_0x548d5f[_0x832a('0x2b')]]={'$like':'%'+_0x5ca32f[_0x832a('0x35')][_0x832a('0x40')]+'%'};return _0x58e704;}})});}_0xbc0b67=_[_0x832a('0x42')]({},_0xbc0b67,_0x5ca32f['options']);var _0x213146={'where':_0xbc0b67[_0x832a('0x41')]};return db['VoiceRecording'][_0x832a('0x1f')](_0x213146)[_0x832a('0x26')](function(_0x29970e){_0x59bc2c[_0x832a('0x1f')]=_0x29970e;if(_0x5ca32f[_0x832a('0x35')][_0x832a('0x44')]){_0xbc0b67['include']=[{'all':!![]}];}return db[_0x832a('0x2e')]['findAll'](_0xbc0b67);})[_0x832a('0x26')](function(_0xca603b){_0x59bc2c['rows']=_0xca603b;return _0x59bc2c;})[_0x832a('0x26')](respondWithFilteredResult(_0x2d692c,_0xbc0b67))[_0x832a('0x45')](handleError(_0x2d692c,null));};exports[_0x832a('0x46')]=function(_0x458985,_0x2ce631){var _0x46e2f5={'raw':![],'where':{'id':_0x458985[_0x832a('0x47')]['id']}},_0x1ed0e3={};_0x1ed0e3[_0x832a('0x32')]=_['keys'](db[_0x832a('0x2e')][_0x832a('0x2f')]);_0x1ed0e3[_0x832a('0x35')]=_[_0x832a('0x36')](_0x458985[_0x832a('0x35')]);_0x1ed0e3[_0x832a('0x37')]=_[_0x832a('0x38')](_0x1ed0e3[_0x832a('0x32')],_0x1ed0e3[_0x832a('0x35')]);_0x46e2f5['attributes']=_[_0x832a('0x38')](_0x1ed0e3[_0x832a('0x32')],qs[_0x832a('0x39')](_0x458985['query'][_0x832a('0x39')]));_0x46e2f5[_0x832a('0x3a')]=_0x46e2f5[_0x832a('0x3a')][_0x832a('0x3b')]?_0x46e2f5['attributes']:_0x1ed0e3[_0x832a('0x32')];if(_0x458985[_0x832a('0x35')]['includeAll']){_0x46e2f5[_0x832a('0x48')]=[{'all':!![]}];}_0x46e2f5=_[_0x832a('0x42')]({},_0x46e2f5,_0x458985['options']);return db[_0x832a('0x2e')]['find'](_0x46e2f5)['then'](handleEntityNotFound(_0x2ce631,null))['then'](respondWithResult(_0x2ce631,null))[_0x832a('0x45')](handleError(_0x2ce631,null));};exports[_0x832a('0x49')]=function(_0x51b30b,_0x961c20){return db[_0x832a('0x2e')]['create'](_0x51b30b[_0x832a('0x4a')],{})['then'](respondWithResult(_0x961c20,0xc9))[_0x832a('0x45')](handleError(_0x961c20,null));};exports['update']=function(_0x142cfe,_0x1b5137){if(_0x142cfe['body']['id']){delete _0x142cfe[_0x832a('0x4a')]['id'];}return db[_0x832a('0x2e')][_0x832a('0x4b')]({'where':{'id':_0x142cfe[_0x832a('0x47')]['id']}})[_0x832a('0x26')](handleEntityNotFound(_0x1b5137,null))['then'](saveUpdates(_0x142cfe['body'],null))[_0x832a('0x26')](respondWithResult(_0x1b5137,null))[_0x832a('0x45')](handleError(_0x1b5137,null));};exports[_0x832a('0x4c')]=function(_0x70ae55,_0x30972b){return db[_0x832a('0x2e')]['describe']()[_0x832a('0x26')](respondWithResult(_0x30972b,null))[_0x832a('0x45')](handleError(_0x30972b,null));};exports['download']=function(_0x44926d,_0x42f4d6,_0x5a2249){var _0x453c83=require(_0x832a('0x4d'));var _0x5aeca5=![];var _0x87698e={};if(_0x44926d[_0x832a('0x35')]['type']&&_0x44926d[_0x832a('0x35')][_0x832a('0x31')]===_0x832a('0x4e')){_0x87698e[_0x832a('0x4e')]=_0x44926d['params']['id'];}else{_0x87698e['id']=_0x44926d[_0x832a('0x47')]['id'];}return db[_0x832a('0x2e')][_0x832a('0x4b')]({'where':_0x87698e,'attributes':['id',_0x832a('0x4f')],'raw':!![]})[_0x832a('0x26')](handleEntityNotFound(_0x42f4d6,null))['then'](function(_0x37f5c1){if(_0x37f5c1){var _0x290c85=_0x37f5c1[_0x832a('0x4f')];var _0x58d321=util[_0x832a('0x34')](_0x832a('0x50'),_0x290c85);if(fs[_0x832a('0x51')](_0x58d321)){_0x5aeca5=!![];return _0x453c83[_0x832a('0x52')](_0x58d321,_0x290c85,config['secrets'][_0x832a('0x53')])[_0x832a('0x26')](function(){return _0x37f5c1;});}return _0x37f5c1;}})[_0x832a('0x26')](function(_0x28c851){if(_0x28c851){var _0x2b7fd8=_0x28c851[_0x832a('0x4f')];if(!fs[_0x832a('0x51')](_0x2b7fd8)){throw new db[(_0x832a('0x54'))][(_0x832a('0x55'))]('VoiceRecording\x20not\x20found');}if(_0x28c851[_0x832a('0x56')]){return _0x42f4d6[_0x832a('0x57')](_0x2b7fd8,_0x28c851['filename']+path['extname'](_0x2b7fd8),function(){if(_0x5aeca5){fs[_0x832a('0x58')](_0x2b7fd8);}});}else{return _0x42f4d6[_0x832a('0x57')](_0x2b7fd8,function(_0x146436){if(_0x5aeca5){fs[_0x832a('0x58')](_0x2b7fd8);}});}}})[_0x832a('0x45')](function(_0x3370b7){if(_0x3370b7[_0x832a('0x59')]===_0x832a('0x5a')){_0x42f4d6['status'](0x194)[_0x832a('0x2c')](_0x832a('0x5b'));}else{return handleError(_0x42f4d6,null);}});};exports[_0x832a('0x5c')]=function(_0x37ea3c,_0x4546ef,_0x125631){var _0x216faf=require(_0x832a('0x4d'));var _0x44b24c=![];var _0x1c1aca={'$and':[db['sequelize'][_0x832a('0x41')](db[_0x832a('0x5d')]['fn'](_0x832a('0x5e'),db['sequelize'][_0x832a('0x5f')](_0x832a('0x4e'))),_0x37ea3c[_0x832a('0x35')][_0x832a('0x60')])]};if(_0x37ea3c[_0x832a('0x35')][_0x832a('0x31')]&&_0x37ea3c[_0x832a('0x35')][_0x832a('0x31')]===_0x832a('0x4e')){_0x1c1aca[_0x832a('0x61')][_0x832a('0x62')]({'uniqueid':_0x37ea3c[_0x832a('0x47')]['id']});}else{_0x1c1aca[_0x832a('0x61')]['push']({'id':_0x37ea3c[_0x832a('0x47')]['id']});}return db[_0x832a('0x2e')][_0x832a('0x4b')]({'where':_0x1c1aca,'attributes':['id',_0x832a('0x4f')],'raw':!![]})[_0x832a('0x26')](handleEntityNotFound(_0x4546ef,null))['then'](function(_0x37cdc9){if(_0x37cdc9){var _0x196aa4=util[_0x832a('0x34')](_0x832a('0x50'),_0x37cdc9[_0x832a('0x4f')]);if(fs['existsSync'](_0x196aa4)){_0x44b24c=!![];return _0x216faf[_0x832a('0x52')](_0x196aa4,_0x37cdc9[_0x832a('0x4f')],config[_0x832a('0x63')][_0x832a('0x53')])[_0x832a('0x26')](function(){return _0x37cdc9;});}return _0x37cdc9;}})[_0x832a('0x26')](function(_0x24f861){if(_0x24f861){if(!fs['existsSync'](_0x24f861[_0x832a('0x4f')])){throw new db[(_0x832a('0x54'))]['ValidationError']('VoiceRecording\x20not\x20found');}if(_0x24f861[_0x832a('0x56')]){return _0x4546ef[_0x832a('0x57')](_0x24f861[_0x832a('0x4f')],_0x24f861[_0x832a('0x56')]+path[_0x832a('0x64')](_0x24f861['value']),function(){if(_0x44b24c){fs[_0x832a('0x58')](_0x24f861[_0x832a('0x4f')]);}});}else{return _0x4546ef[_0x832a('0x57')](_0x24f861['value'],function(_0x3d2b3d){if(_0x44b24c){fs['unlink'](_0x24f861['value']);}});}}})[_0x832a('0x45')](handleError(_0x4546ef,null));};exports['destroy']=function(_0x44ab45,_0x5dc914){return db[_0x832a('0x2e')]['find']({'where':{'id':_0x44ab45[_0x832a('0x47')]['id']}})[_0x832a('0x26')](function(_0x127fa2){if(_[_0x832a('0x65')](_0x127fa2)){throw new ReferenceError(_0x832a('0x66'));}return _0x127fa2;})[_0x832a('0x26')](function(_0x342348){var _0x4b2f4b=_0x342348[_0x832a('0x4f')];logger[_0x832a('0x67')](_0x832a('0x68'),_0x4b2f4b);if(!_[_0x832a('0x65')](_0x342348[_0x832a('0x4f')])&&fs[_0x832a('0x51')](_0x4b2f4b)){logger[_0x832a('0x67')](_0x832a('0x69')+_0x4b2f4b+_0x832a('0x6a'));fs['unlinkSync'](_0x4b2f4b);}_0x4b2f4b=_0x4b2f4b+'.cypher';if(!_[_0x832a('0x65')](_0x342348[_0x832a('0x4f')])&&fs[_0x832a('0x51')](_0x4b2f4b)){logger[_0x832a('0x67')](_0x832a('0x69')+_0x4b2f4b+_0x832a('0x6a'));fs[_0x832a('0x6b')](_0x4b2f4b);}return _0x342348;})[_0x832a('0x26')](function(_0x2569c9){if(!_0x2569c9)throw new InternalError();return _0x2569c9[_0x832a('0x27')]();})[_0x832a('0x26')](function(){_0x5dc914[_0x832a('0x1b')](0xcc)[_0x832a('0x28')]();})[_0x832a('0x45')](handleError(_0x5dc914,null));};function getBucketslist(_0x3f04a0,_0x1aad62,_0x244bc6){return new Promise(function(_0x57eb85,_0x247701){var _0x41bd4b=new AWS['S3']({'accessKeyId':_0x1aad62,'secretAccessKey':_0x3f04a0,'region':_0x244bc6});_0x41bd4b[_0x832a('0x6c')]({},function(_0x1215a0,_0x5cce67){if(_0x1215a0){return _0x247701(_0x1215a0);}else{return _0x57eb85(_0x5cce67);}});});}function createBucket(_0x41577f,_0x566002,_0x166ac9,_0x5ba41b){return new Promise(function(_0x13d5da,_0x1cc1dd){var _0xa4d013=new AWS['S3']({'accessKeyId':_0x566002,'secretAccessKey':_0x41577f,'region':_0x166ac9});_0xa4d013[_0x832a('0x6d')]({'Bucket':_0x5ba41b},function(_0x4ac6ec,_0x4b4726){if(_0x4ac6ec){return _0x1cc1dd(_0x4ac6ec);}else{return _0x13d5da(_0x4b4726);}});});}function uploadFile(_0xe1d12a,_0x530234,_0x49f36a,_0x27538a,_0x52befa,_0x2425f2){return new Promise(function(_0x35791a,_0x20243b){var _0x419864=new AWS['S3']({'accessKeyId':_0x530234,'secretAccessKey':_0xe1d12a,'region':_0x49f36a});_0x419864['upload']({'Bucket':_0x27538a,'Key':_0x52befa,'Body':_0x2425f2},function(_0x3085df,_0x5010be){if(_0x3085df){return _0x20243b(_0x3085df);}else{return _0x35791a(_0x5010be);}});});}function startTranscribe(_0x430376,_0x57c249,_0xd975dc,_0x5b50a2,_0x4239e2,_0x1d77ac){return new Promise(function(_0x501d89,_0x36e161){var _0x4369b5=new AWS[(_0x832a('0x6e'))]({'accessKeyId':_0x57c249,'secretAccessKey':_0x430376,'region':_0xd975dc});_0x4369b5['startTranscriptionJob']({'TranscriptionJobName':_0x5b50a2,'LanguageCode':_0x4239e2,'Media':{'MediaFileUri':_0x1d77ac}},function(_0x5b4600,_0x56eb6d){if(_0x5b4600){return _0x36e161(_0x5b4600);}else{return _0x501d89(_0x56eb6d);}});});}function transcribe(_0x135b4a,_0x36cf41,_0x5d0f95,_0x4147ba,_0xc805b7,_0x5b8632,_0x483ec6){return new Promise(function(_0x57869b,_0x1d0e49){var _0x8d9da2={};logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x6f'),_0x135b4a,_0xc805b7));return uploadFile(_0x36cf41,_0x5d0f95,_0x4147ba,_0xc805b7,path['basename'](_0x5b8632),fs[_0x832a('0x70')](_0x5b8632))[_0x832a('0x26')](function(_0x1fde50){logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x71'),_0x135b4a,_0xc805b7,_0x1fde50['Location']));_0x8d9da2[_0x832a('0x72')]=_0x1fde50['Bucket'];_0x8d9da2[_0x832a('0x73')]=_0x1fde50[_0x832a('0x74')];logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x75'),_0x135b4a));return startTranscribe(_0x36cf41,_0x5d0f95,_0x4147ba,uuidv4(),_0x483ec6,_0x1fde50[_0x832a('0x74')]);})['then'](function(_0x298de6){logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x76'),_0x135b4a,_0x298de6[_0x832a('0x77')][_0x832a('0x78')]));_0x8d9da2[_0x832a('0x79')]=_0x298de6['TranscriptionJob'][_0x832a('0x78')];_0x8d9da2[_0x832a('0x7a')]=_0x298de6[_0x832a('0x77')]['TranscriptionJobStatus'];return _0x57869b(_0x8d9da2);})[_0x832a('0x45')](function(_0x469ecd){return _0x1d0e49(_0x469ecd);});});}exports[_0x832a('0x7b')]=function(_0x4230d3,_0x496852,_0x3acd31){var _0x222a43;var _0x5c6bf7;var _0x559461;var _0x2e244a=require('../../components/encryptor');return db[_0x832a('0x2e')]['findOne']({'where':{'id':_0x4230d3[_0x832a('0x47')]['id']}})[_0x832a('0x26')](function(_0xd07545){if(_0xd07545){var _0x4a8ac7=util[_0x832a('0x34')](_0x832a('0x50'),_0xd07545[_0x832a('0x4f')]);if(fs[_0x832a('0x51')](_0x4a8ac7)){cypher=!![];return _0x2e244a[_0x832a('0x52')](_0x4a8ac7,_0xd07545[_0x832a('0x4f')],config[_0x832a('0x63')][_0x832a('0x53')])[_0x832a('0x26')](function(){return _0xd07545;});}return _0xd07545;}})[_0x832a('0x26')](function(_0x593ff6){if(!_0x593ff6){throw new db[(_0x832a('0x54'))][(_0x832a('0x55'))](_0x832a('0x7c'));}_0x5c6bf7=_0x593ff6;return db[_0x832a('0x7d')]['findOne']({'where':{'id':0x1}});})[_0x832a('0x26')](handleEntityNotFound(_0x496852,null))[_0x832a('0x26')](function(_0x447baf){if(_0x447baf){_0x222a43=_0x447baf;if(!_0x222a43[_0x832a('0x7e')]||!_0x222a43['transcribeAccountId']||!_0x222a43[_0x832a('0x7f')]||!_0x222a43[_0x832a('0x80')]||!_0x222a43[_0x832a('0x72')]){throw new db[(_0x832a('0x54'))][(_0x832a('0x55'))]('Transcribe\x20not\x20configured');}if(_0x4230d3[_0x832a('0x4a')]['runSentiment']&&(!_0x222a43[_0x832a('0x81')]||!_0x222a43[_0x832a('0x82')]||!_0x222a43[_0x832a('0x83')]||!_0x222a43[_0x832a('0x80')]||!_0x222a43[_0x832a('0x72')])){throw new db[(_0x832a('0x54'))]['ValidationError'](_0x832a('0x84'));}return db[_0x832a('0x85')][_0x832a('0x86')]({'where':{'id':_0x222a43[_0x832a('0x87')]}});}})[_0x832a('0x26')](function(_0x2e3f96){if(!_0x2e3f96){throw new db[(_0x832a('0x54'))][(_0x832a('0x55'))](_0x832a('0x88'));}if(!_0x2e3f96[_0x832a('0x89')]||!_0x2e3f96[_0x832a('0x8a')]){throw new db[(_0x832a('0x54'))][(_0x832a('0x55'))](_0x832a('0x8b'));}_0x559461=_0x2e3f96;return getBucketslist(_0x559461[_0x832a('0x89')],_0x559461[_0x832a('0x8a')],_0x222a43['transcribeRegion']);})[_0x832a('0x26')](function(_0x541385){if(_0x541385&&_0x541385[_0x832a('0x8c')]){var _0x49e976=_[_0x832a('0x4b')](_0x541385[_0x832a('0x8c')],function(_0x227c1b){return _0x227c1b[_0x832a('0x8d')]===_0x222a43[_0x832a('0x72')];});if(!_0x49e976){logger[_0x832a('0x67')](util['format'](_0x832a('0x8e'),_0x4230d3[_0x832a('0x47')]['id'],_0x222a43['bucket']));return createBucket(_0x559461[_0x832a('0x89')],_0x559461[_0x832a('0x8a')],_0x222a43['transcribeRegion'],_0x222a43['bucket']);}logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x8f'),_0x4230d3['params']['id'],_0x222a43[_0x832a('0x72')]));return;}})[_0x832a('0x26')](function(_0x193f8c){if(_0x5c6bf7[_0x832a('0x7a')]==='NEW'){return transcribe(_0x4230d3['params']['id'],_0x559461['data1'],_0x559461[_0x832a('0x8a')],_0x222a43[_0x832a('0x7f')],_0x222a43[_0x832a('0x72')],_0x5c6bf7[_0x832a('0x4f')],_0x222a43[_0x832a('0x80')]);}else{logger[_0x832a('0x67')](util[_0x832a('0x34')](_0x832a('0x90'),_0x4230d3[_0x832a('0x47')]['id']));return{'transcribeStatus':_0x832a('0x91')};}})[_0x832a('0x26')](function(_0x3312a0){if(_0x3312a0){_0x3312a0[_0x832a('0x92')]=_0x4230d3['body'][_0x832a('0x93')];return _0x5c6bf7[_0x832a('0x94')](_0x3312a0);}})['then'](respondWithResult(_0x496852,null))['catch'](handleError(_0x496852,null));};function writeFile(_0x15e3bc,_0x4bb852){return new Promise(function(_0x5b6288,_0x16442d){fs[_0x832a('0x95')](_0x4bb852,_0x15e3bc,function(_0x18b7ac,_0x43d891){if(_0x18b7ac){return _0x16442d(_0x18b7ac);}else{return _0x5b6288(_0x43d891);}});});}exports[_0x832a('0x96')]=function(_0x2f0012,_0x26a6cd,_0x3d2f0f){return db['VoiceRecording'][_0x832a('0x86')]({'where':{'id':_0x2f0012[_0x832a('0x47')]['id']}})[_0x832a('0x26')](handleEntityNotFound(_0x26a6cd))[_0x832a('0x26')](function(_0x820c1){if(_0x820c1&&_0x820c1[_0x832a('0x97')]){var _0x2adf8b=_0x820c1[_0x832a('0x97')];var _0x53a3f3=config[_0x832a('0x98')]+_0x832a('0x99')+_0x820c1['id']+_0x832a('0x9a');if(fs[_0x832a('0x51')](_0x53a3f3)){return _0x53a3f3;}return writeFile(_0x2adf8b,_0x53a3f3)[_0x832a('0x26')](function(){return _0x53a3f3;});}else{throw new db['Sequelize'][(_0x832a('0x55'))](_0x832a('0x9b'));}})[_0x832a('0x26')](function(_0xad721f){return _0x26a6cd[_0x832a('0x57')](_0xad721f);})[_0x832a('0x45')](handleError(_0x26a6cd));}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.model.js b/server/api/voiceRecording/voiceRecording.model.js index aefb04d..3aa833b 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 _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 +var _0x778e=['voice_recordings','uniqueid','lodash','../../config/logger','api','moment','bluebird','path','../../config/environment','./voiceRecording.attributes','exports'];(function(_0xa402ff,_0x4fb0ab){var _0x45a4b6=function(_0x3a04a6){while(--_0x3a04a6){_0xa402ff['push'](_0xa402ff['shift']());}};_0x45a4b6(++_0x4fb0ab);}(_0x778e,0xf4));var _0xe778=function(_0x55c83d,_0x434f91){_0x55c83d=_0x55c83d-0x0;var _0x28a0ba=_0x778e[_0x55c83d];return _0x28a0ba;};'use strict';var _=require(_0xe778('0x0'));var util=require('util');var logger=require(_0xe778('0x1'))(_0xe778('0x2'));var moment=require(_0xe778('0x3'));var BPromise=require(_0xe778('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe778('0x5'));var rimraf=require('rimraf');var config=require(_0xe778('0x6'));var attributes=require(_0xe778('0x7'));module[_0xe778('0x8')]=function(_0x8124e,_0x3e1ab8){return _0x8124e['define']('VoiceRecording',attributes,{'tableName':_0xe778('0x9'),'paranoid':![],'indexes':[{'name':_0xe778('0xa'),'fields':[_0xe778('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.rpc.js b/server/api/voiceRecording/voiceRecording.rpc.js index 4844e7f..754dcc4 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 _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 +var _0x1a37=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','info','VoiceRecording,\x20%s,\x20%s','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','UpdateVoiceRecording','update','body','options','raw','where','attributes','then','CreateVoiceRecording','../../components/encryptor','Setting','findOne','callRecordingEncryption','VoiceRecording','create','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted'];(function(_0x2728ab,_0x4d0d28){var _0x33d104=function(_0x5633c5){while(--_0x5633c5){_0x2728ab['push'](_0x2728ab['shift']());}};_0x33d104(++_0x4d0d28);}(_0x1a37,0xb4));var _0x71a3=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0x1a37[_0xd0b415];return _0x2bdf2c;};'use strict';var _=require(_0x71a3('0x0'));var util=require(_0x71a3('0x1'));var moment=require(_0x71a3('0x2'));var BPromise=require(_0x71a3('0x3'));var rs=require(_0x71a3('0x4'));var fs=require('fs');var Redis=require(_0x71a3('0x5'));var db=require(_0x71a3('0x6'))['db'];var utils=require(_0x71a3('0x7'));var logger=require(_0x71a3('0x8'))(_0x71a3('0x9'));var config=require('../../config/environment');var jayson=require(_0x71a3('0xa'));var client=jayson['client'][_0x71a3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x45050a,_0x231ea7,_0x2bb6a2){return new BPromise(function(_0x4a9ab2,_0x53b893){return client['request'](_0x45050a,_0x2bb6a2)['then'](function(_0x89da86){logger[_0x71a3('0xc')](_0x71a3('0xd'),_0x231ea7,_0x71a3('0xe'));logger[_0x71a3('0xf')](_0x71a3('0x10'),_0x231ea7,_0x71a3('0xe'),JSON[_0x71a3('0x11')](_0x89da86));if(_0x89da86['error']){if(_0x89da86['error']['code']===0x1f4){logger[_0x71a3('0x12')](_0x71a3('0xd'),_0x231ea7,_0x89da86[_0x71a3('0x12')][_0x71a3('0x13')]);return _0x53b893(_0x89da86[_0x71a3('0x12')][_0x71a3('0x13')]);}logger[_0x71a3('0x12')](_0x71a3('0xd'),_0x231ea7,_0x89da86[_0x71a3('0x12')][_0x71a3('0x13')]);return _0x4a9ab2(_0x89da86[_0x71a3('0x12')]['message']);}else{logger[_0x71a3('0xc')](_0x71a3('0xd'),_0x231ea7,'request\x20sent');_0x4a9ab2(_0x89da86['result'][_0x71a3('0x13')]);}})[_0x71a3('0x14')](function(_0xee797f){logger[_0x71a3('0x12')](_0x71a3('0xd'),_0x231ea7,_0xee797f);_0x53b893(_0xee797f);});});}exports[_0x71a3('0x15')]=function(_0x5d4dee){var _0x656cd2=this;return new Promise(function(_0x27bfb4,_0x5b955a){return db['VoiceRecording'][_0x71a3('0x16')](_0x5d4dee[_0x71a3('0x17')],{'raw':_0x5d4dee[_0x71a3('0x18')]?_0x5d4dee[_0x71a3('0x18')][_0x71a3('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5d4dee['options']?_0x5d4dee[_0x71a3('0x18')][_0x71a3('0x1a')]||null:null,'attributes':_0x5d4dee[_0x71a3('0x18')]?_0x5d4dee[_0x71a3('0x18')][_0x71a3('0x1b')]||null:null,'limit':_0x5d4dee['options']?_0x5d4dee[_0x71a3('0x18')]['limit']||null:null})[_0x71a3('0x1c')](function(_0x35d1d4){logger[_0x71a3('0xc')](_0x71a3('0x15'),_0x5d4dee);logger[_0x71a3('0xf')](_0x71a3('0x15'),_0x5d4dee,JSON['stringify'](_0x35d1d4));_0x27bfb4(_0x35d1d4);})[_0x71a3('0x14')](function(_0x299d1d){logger[_0x71a3('0x12')](_0x71a3('0x15'),_0x299d1d[_0x71a3('0x13')],_0x5d4dee);_0x5b955a(_0x656cd2['error'](0x1f4,_0x299d1d[_0x71a3('0x13')]));});});};exports[_0x71a3('0x1d')]=function(_0x4c1a3d){var _0x412746=this;return new Promise(function(_0x515519,_0x46f1ff){var _0x2fd3b6=require(_0x71a3('0x1e'));var _0x35b5c7;return db[_0x71a3('0x1f')][_0x71a3('0x20')]({'attributes':['id',_0x71a3('0x21')],'where':{'id':0x1},'raw':!![]})[_0x71a3('0x1c')](function(_0x305eb1){_0x35b5c7=_0x305eb1;return db[_0x71a3('0x22')][_0x71a3('0x23')](_0x4c1a3d[_0x71a3('0x17')]);})['then'](function(_0x26fd9f){if(_0x35b5c7[_0x71a3('0x21')]&&fs[_0x71a3('0x24')](_0x26fd9f[_0x71a3('0x25')])){var _0x4a750c=util[_0x71a3('0x26')](_0x71a3('0x27'),_0x26fd9f[_0x71a3('0x25')]);return _0x2fd3b6[_0x71a3('0x28')](_0x26fd9f[_0x71a3('0x25')],_0x4a750c,config[_0x71a3('0x29')][_0x71a3('0x2a')])['then'](function(){fs[_0x71a3('0x2b')](_0x26fd9f[_0x71a3('0x25')]);logger[_0x71a3('0xc')](_0x71a3('0x2c'));return _0x26fd9f;});}return _0x26fd9f;})[_0x71a3('0x1c')](function(_0x73c8e7){logger[_0x71a3('0xc')](_0x71a3('0x1d'),_0x4c1a3d);logger[_0x71a3('0xf')](_0x71a3('0x1d'),_0x4c1a3d,JSON[_0x71a3('0x11')](_0x73c8e7));_0x515519(_0x73c8e7);})[_0x71a3('0x14')](function(_0x447b14){logger['error']('CreateVoiceRecording',_0x447b14[_0x71a3('0x13')],_0x4c1a3d);_0x46f1ff(_0x412746[_0x71a3('0x12')](0x1f4,_0x447b14['message']));});});}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/index.js b/server/api/voiceTransferReport/index.js index 5bd4470..fc47d15 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 _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 +var _0x02f1=['exports','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','./voiceTransferReport.controller','get','isAuthenticated','index','/describe','describe','show','post','put','/:id','delete','destroy'];(function(_0x13ce0c,_0x3f2a0d){var _0x4388fb=function(_0x27db4b){while(--_0x27db4b){_0x13ce0c['push'](_0x13ce0c['shift']());}};_0x4388fb(++_0x3f2a0d);}(_0x02f1,0x1dc));var _0x102f=function(_0x325d4d,_0x25afa1){_0x325d4d=_0x325d4d-0x0;var _0x373495=_0x02f1[_0x325d4d];return _0x373495;};'use strict';var multer=require('multer');var util=require(_0x102f('0x0'));var path=require(_0x102f('0x1'));var timeout=require(_0x102f('0x2'));var express=require(_0x102f('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x102f('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x102f('0x5'));var controller=require(_0x102f('0x6'));router[_0x102f('0x7')]('/',auth[_0x102f('0x8')](),controller[_0x102f('0x9')]);router[_0x102f('0x7')](_0x102f('0xa'),auth['isAuthenticated'](),controller[_0x102f('0xb')]);router[_0x102f('0x7')]('/:id',auth[_0x102f('0x8')](),controller[_0x102f('0xc')]);router[_0x102f('0xd')]('/',auth[_0x102f('0x8')](),controller['create']);router[_0x102f('0xe')](_0x102f('0xf'),auth['isAuthenticated'](),controller['update']);router[_0x102f('0x10')](_0x102f('0xf'),auth[_0x102f('0x8')](),controller[_0x102f('0x11')]);module[_0x102f('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.attributes.js b/server/api/voiceTransferReport/voiceTransferReport.attributes.js index 2102526..049317a 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 _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 +var _0x2d8a=['blind','attended','STRING','sequelize','moment','exports','ENUM'];(function(_0x2bf3ef,_0x1f97a8){var _0x2315ce=function(_0x54e2c0){while(--_0x54e2c0){_0x2bf3ef['push'](_0x2bf3ef['shift']());}};_0x2315ce(++_0x1f97a8);}(_0x2d8a,0xab));var _0xa2d8=function(_0x10b863,_0x5c820b){_0x10b863=_0x10b863-0x0;var _0x5d31fc=_0x2d8a[_0x10b863];return _0x5d31fc;};'use strict';var Sequelize=require(_0xa2d8('0x0'));var moment=require(_0xa2d8('0x1'));module[_0xa2d8('0x2')]={'type':{'type':Sequelize[_0xa2d8('0x3')](_0xa2d8('0x4'),_0xa2d8('0x5'))},'result':{'type':Sequelize[_0xa2d8('0x6')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize[_0xa2d8('0x6')]},'transferercalleridname':{'type':Sequelize[_0xa2d8('0x6')]},'transfererconnectedlinenum':{'type':Sequelize['STRING']},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize[_0xa2d8('0x6')]},'transferercontext':{'type':Sequelize['STRING']},'transfererexten':{'type':Sequelize[_0xa2d8('0x6')]},'transfererlinkedid':{'type':Sequelize['STRING']},'transfereechannel':{'type':Sequelize[_0xa2d8('0x6')]},'transfereecalleridnum':{'type':Sequelize[_0xa2d8('0x6')]},'transfereecalleridname':{'type':Sequelize[_0xa2d8('0x6')]},'transfereeconnectedlinenum':{'type':Sequelize[_0xa2d8('0x6')]},'transfereeconnectedlinename':{'type':Sequelize['STRING']},'transfereeaccountcode':{'type':Sequelize[_0xa2d8('0x6')]},'transfereecontext':{'type':Sequelize[_0xa2d8('0x6')]},'transfereeexten':{'type':Sequelize[_0xa2d8('0x6')]},'transfereelinkedid':{'type':Sequelize[_0xa2d8('0x6')]},'isexternal':{'type':Sequelize['ENUM']('Yes','No')},'context':{'type':Sequelize[_0xa2d8('0x6')]},'extension':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.controller.js b/server/api/voiceTransferReport/voiceTransferReport.controller.js index f2606de..87eb3b5 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 _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 +var _0xf85e=['rawAttributes','find','create','body','catch','destroy','params','describe','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','sendStatus','error','name','send','index','map','VoiceTransferReport','fieldName','type','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','options','includeAll','include','findAll','show'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf85e,0xe0));var _0xef85=function(_0x318b78,_0x44efaa){_0x318b78=_0x318b78-0x0;var _0x1e8660=_0xf85e[_0x318b78];return _0x1e8660;};'use strict';var emlformat=require(_0xef85('0x0'));var rimraf=require(_0xef85('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xef85('0x2'));var rp=require(_0xef85('0x3'));var moment=require('moment');var BPromise=require(_0xef85('0x4'));var Mustache=require('mustache');var util=require(_0xef85('0x5'));var path=require(_0xef85('0x6'));var sox=require(_0xef85('0x7'));var csv=require(_0xef85('0x8'));var ejs=require(_0xef85('0x9'));var fs=require('fs');var fs_extra=require(_0xef85('0xa'));var _=require('lodash');var squel=require(_0xef85('0xb'));var crypto=require(_0xef85('0xc'));var jsforce=require(_0xef85('0xd'));var deskjs=require(_0xef85('0xe'));var toCsv=require(_0xef85('0x8'));var querystring=require(_0xef85('0xf'));var Papa=require(_0xef85('0x10'));var Redis=require(_0xef85('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xef85('0x12'));var logger=require('../../config/logger')(_0xef85('0x13'));var utils=require(_0xef85('0x14'));var config=require(_0xef85('0x15'));var licenseUtil=require(_0xef85('0x16'));var db=require(_0xef85('0x17'))['db'];function respondWithStatusCode(_0x4a1fd8,_0x4649a9){_0x4649a9=_0x4649a9||0xcc;return function(_0x57c3b6){if(_0x57c3b6){return _0x4a1fd8['sendStatus'](_0x4649a9);}return _0x4a1fd8[_0xef85('0x18')](_0x4649a9)[_0xef85('0x19')]();};}function respondWithResult(_0x257eed,_0x1039ff){_0x1039ff=_0x1039ff||0xc8;return function(_0x2338aa){if(_0x2338aa){return _0x257eed[_0xef85('0x18')](_0x1039ff)['json'](_0x2338aa);}};}function respondWithFilteredResult(_0x26bf26,_0x474ce9){return function(_0x55b7a1){if(_0x55b7a1){var _0x5b6752=typeof _0x474ce9[_0xef85('0x1a')]==='undefined'&&typeof _0x474ce9[_0xef85('0x1b')]===_0xef85('0x1c');var _0x315aeb=_0x55b7a1['count'];var _0x419ecb=_0x5b6752?0x0:_0x474ce9[_0xef85('0x1a')];var _0x12243e=_0x5b6752?_0x55b7a1[_0xef85('0x1d')]:_0x474ce9['offset']+_0x474ce9[_0xef85('0x1b')];var _0xe358;if(_0x12243e>=_0x315aeb){_0x12243e=_0x315aeb;_0xe358=0xc8;}else{_0xe358=0xce;}_0x26bf26[_0xef85('0x18')](_0xe358);return _0x26bf26[_0xef85('0x1e')](_0xef85('0x1f'),_0x419ecb+'-'+_0x12243e+'/'+_0x315aeb)['json'](_0x55b7a1);}return null;};}function patchUpdates(_0x412ee0){return function(_0x510be2){try{jsonpatch[_0xef85('0x20')](_0x510be2,_0x412ee0,!![]);}catch(_0x51aa7f){return BPromise[_0xef85('0x21')](_0x51aa7f);}return _0x510be2[_0xef85('0x22')]();};}function saveUpdates(_0x1ef0e3,_0x326ac1){return function(_0x393e62){if(_0x393e62){return _0x393e62[_0xef85('0x23')](_0x1ef0e3)[_0xef85('0x24')](function(_0x3f81fa){return _0x3f81fa;});}return null;};}function removeEntity(_0x2ecfa9,_0x15eb07){return function(_0x3d0baf){if(_0x3d0baf){return _0x3d0baf['destroy']()['then'](function(){_0x2ecfa9[_0xef85('0x18')](0xcc)[_0xef85('0x19')]();});}};}function handleEntityNotFound(_0x5ac85f,_0x401541){return function(_0x4b0beb){if(!_0x4b0beb){_0x5ac85f[_0xef85('0x25')](0x194);}return _0x4b0beb;};}function handleError(_0x410f57,_0x188e9e){_0x188e9e=_0x188e9e||0x1f4;return function(_0x262d3b){logger[_0xef85('0x26')](_0x262d3b['stack']);if(_0x262d3b[_0xef85('0x27')]){delete _0x262d3b[_0xef85('0x27')];}_0x410f57[_0xef85('0x18')](_0x188e9e)[_0xef85('0x28')](_0x262d3b);};}exports[_0xef85('0x29')]=function(_0x4ebe20,_0x1afffb){var _0x4b4392={},_0x50d77b={},_0x5a2cc2={'count':0x0,'rows':[]};var _0x124eb4=_[_0xef85('0x2a')](db[_0xef85('0x2b')]['rawAttributes'],function(_0x342adc){return{'name':_0x342adc[_0xef85('0x2c')],'type':_0x342adc[_0xef85('0x2d')]['key']};});_0x50d77b['model']=_[_0xef85('0x2a')](_0x124eb4,_0xef85('0x27'));_0x50d77b[_0xef85('0x2e')]=_[_0xef85('0x2f')](_0x4ebe20[_0xef85('0x2e')]);_0x50d77b[_0xef85('0x30')]=_[_0xef85('0x31')](_0x50d77b[_0xef85('0x32')],_0x50d77b['query']);_0x4b4392[_0xef85('0x33')]=_[_0xef85('0x31')](_0x50d77b[_0xef85('0x32')],qs['fields'](_0x4ebe20[_0xef85('0x2e')][_0xef85('0x34')]));_0x4b4392[_0xef85('0x33')]=_0x4b4392[_0xef85('0x33')]['length']?_0x4b4392[_0xef85('0x33')]:_0x50d77b['model'];if(!_0x4ebe20[_0xef85('0x2e')][_0xef85('0x35')](_0xef85('0x36'))){_0x4b4392[_0xef85('0x1b')]=qs['limit'](_0x4ebe20[_0xef85('0x2e')][_0xef85('0x1b')]);_0x4b4392['offset']=qs[_0xef85('0x1a')](_0x4ebe20[_0xef85('0x2e')][_0xef85('0x1a')]);}_0x4b4392['order']=qs[_0xef85('0x37')](_0x4ebe20[_0xef85('0x2e')][_0xef85('0x37')]);_0x4b4392[_0xef85('0x38')]=qs[_0xef85('0x30')](_[_0xef85('0x39')](_0x4ebe20[_0xef85('0x2e')],_0x50d77b[_0xef85('0x30')]),_0x124eb4);if(_0x4ebe20['query']['filter']){_0x4b4392[_0xef85('0x38')]=_['merge'](_0x4b4392['where'],{'$or':_[_0xef85('0x2a')](_0x124eb4,function(_0x4cd87c){if(_0x4cd87c['type']!=='VIRTUAL'){var _0xbc2108={};_0xbc2108[_0x4cd87c[_0xef85('0x27')]]={'$like':'%'+_0x4ebe20[_0xef85('0x2e')][_0xef85('0x3a')]+'%'};return _0xbc2108;}})});}_0x4b4392=_['merge']({},_0x4b4392,_0x4ebe20[_0xef85('0x3b')]);var _0x2e0972={'where':_0x4b4392[_0xef85('0x38')]};return db['VoiceTransferReport'][_0xef85('0x1d')](_0x2e0972)[_0xef85('0x24')](function(_0x5635cf){_0x5a2cc2[_0xef85('0x1d')]=_0x5635cf;if(_0x4ebe20['query'][_0xef85('0x3c')]){_0x4b4392[_0xef85('0x3d')]=[{'all':!![]}];}return db[_0xef85('0x2b')][_0xef85('0x3e')](_0x4b4392);})[_0xef85('0x24')](function(_0x5ae466){_0x5a2cc2['rows']=_0x5ae466;return _0x5a2cc2;})[_0xef85('0x24')](respondWithFilteredResult(_0x1afffb,_0x4b4392))['catch'](handleError(_0x1afffb,null));};exports[_0xef85('0x3f')]=function(_0x4ccab3,_0x13a567){var _0x29ac84={'raw':!![],'where':{'id':_0x4ccab3['params']['id']}},_0xc40ffb={};_0xc40ffb['model']=_['keys'](db[_0xef85('0x2b')][_0xef85('0x40')]);_0xc40ffb['query']=_[_0xef85('0x2f')](_0x4ccab3['query']);_0xc40ffb['filters']=_[_0xef85('0x31')](_0xc40ffb[_0xef85('0x32')],_0xc40ffb[_0xef85('0x2e')]);_0x29ac84[_0xef85('0x33')]=_[_0xef85('0x31')](_0xc40ffb[_0xef85('0x32')],qs[_0xef85('0x34')](_0x4ccab3[_0xef85('0x2e')][_0xef85('0x34')]));_0x29ac84['attributes']=_0x29ac84['attributes']['length']?_0x29ac84[_0xef85('0x33')]:_0xc40ffb['model'];if(_0x4ccab3[_0xef85('0x2e')][_0xef85('0x3c')]){_0x29ac84[_0xef85('0x3d')]=[{'all':!![]}];}_0x29ac84=_['merge']({},_0x29ac84,_0x4ccab3['options']);return db[_0xef85('0x2b')][_0xef85('0x41')](_0x29ac84)[_0xef85('0x24')](handleEntityNotFound(_0x13a567,null))['then'](respondWithResult(_0x13a567,null))['catch'](handleError(_0x13a567,null));};exports[_0xef85('0x42')]=function(_0xb8c55f,_0x6ae5bf){return db[_0xef85('0x2b')][_0xef85('0x42')](_0xb8c55f[_0xef85('0x43')],{})['then'](respondWithResult(_0x6ae5bf,0xc9))[_0xef85('0x44')](handleError(_0x6ae5bf,null));};exports[_0xef85('0x23')]=function(_0x4e750b,_0x38461e){if(_0x4e750b['body']['id']){delete _0x4e750b['body']['id'];}return db[_0xef85('0x2b')]['find']({'where':{'id':_0x4e750b['params']['id']}})[_0xef85('0x24')](handleEntityNotFound(_0x38461e,null))[_0xef85('0x24')](saveUpdates(_0x4e750b[_0xef85('0x43')],null))[_0xef85('0x24')](respondWithResult(_0x38461e,null))['catch'](handleError(_0x38461e,null));};exports[_0xef85('0x45')]=function(_0x343404,_0x19769e){return db['VoiceTransferReport'][_0xef85('0x41')]({'where':{'id':_0x343404[_0xef85('0x46')]['id']}})[_0xef85('0x24')](handleEntityNotFound(_0x19769e,null))[_0xef85('0x24')](removeEntity(_0x19769e,null))[_0xef85('0x44')](handleError(_0x19769e,null));};exports['describe']=function(_0x8f4d8,_0x4e7796){return db[_0xef85('0x2b')][_0xef85('0x47')]()[_0xef85('0x24')](respondWithResult(_0x4e7796,null))[_0xef85('0x44')](handleError(_0x4e7796,null));}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.model.js b/server/api/voiceTransferReport/voiceTransferReport.model.js index 5933e0c..6a0dc68 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 _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 +var _0x531a=['request-promise','path','rimraf','../../config/environment','./voiceTransferReport.attributes','exports','VoiceTransferReport','report_call_transfer','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x4c3252,_0x2680d5){var _0x1a4ae8=function(_0x415d15){while(--_0x415d15){_0x4c3252['push'](_0x4c3252['shift']());}};_0x1a4ae8(++_0x2680d5);}(_0x531a,0x19e));var _0xa531=function(_0x19441b,_0x5a239b){_0x19441b=_0x19441b-0x0;var _0x16bbd7=_0x531a[_0x19441b];return _0x16bbd7;};'use strict';var _=require(_0xa531('0x0'));var util=require(_0xa531('0x1'));var logger=require(_0xa531('0x2'))(_0xa531('0x3'));var moment=require(_0xa531('0x4'));var BPromise=require(_0xa531('0x5'));var rp=require(_0xa531('0x6'));var fs=require('fs');var path=require(_0xa531('0x7'));var rimraf=require(_0xa531('0x8'));var config=require(_0xa531('0x9'));var attributes=require(_0xa531('0xa'));module[_0xa531('0xb')]=function(_0x12b5d2,_0x3030a1){return _0x12b5d2['define'](_0xa531('0xc'),attributes,{'tableName':_0xa531('0xd'),'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 dfb9707..e2136e0 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 _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 +var _0x0989=['client','request','then','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','VoiceTransferReport,\x20%s,\x20%s','message','info','result','catch','CreateVoiceTransferReport','VoiceTransferReport','create','raw','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise'];(function(_0xcf483b,_0x5acd93){var _0x297edf=function(_0x479e0e){while(--_0x479e0e){_0xcf483b['push'](_0xcf483b['shift']());}};_0x297edf(++_0x5acd93);}(_0x0989,0x188));var _0x9098=function(_0x5c2a2b,_0x22c94e){_0x5c2a2b=_0x5c2a2b-0x0;var _0x19921f=_0x0989[_0x5c2a2b];return _0x19921f;};'use strict';var _=require('lodash');var util=require(_0x9098('0x0'));var moment=require('moment');var BPromise=require(_0x9098('0x1'));var rs=require(_0x9098('0x2'));var fs=require('fs');var Redis=require(_0x9098('0x3'));var db=require(_0x9098('0x4'))['db'];var utils=require(_0x9098('0x5'));var logger=require('../../config/logger')(_0x9098('0x6'));var config=require('../../config/environment');var jayson=require(_0x9098('0x7'));var client=jayson[_0x9098('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x17fc71,_0x28437d,_0x4e9520){return new BPromise(function(_0x26d391,_0xb7ebbc){return client[_0x9098('0x9')](_0x17fc71,_0x4e9520)[_0x9098('0xa')](function(_0x2d9d2d){logger['info']('VoiceTransferReport,\x20%s,\x20%s',_0x28437d,_0x9098('0xb'));logger[_0x9098('0xc')](_0x9098('0xd'),_0x28437d,_0x9098('0xb'),JSON[_0x9098('0xe')](_0x2d9d2d));if(_0x2d9d2d[_0x9098('0xf')]){if(_0x2d9d2d[_0x9098('0xf')]['code']===0x1f4){logger[_0x9098('0xf')](_0x9098('0x10'),_0x28437d,_0x2d9d2d['error'][_0x9098('0x11')]);return _0xb7ebbc(_0x2d9d2d[_0x9098('0xf')][_0x9098('0x11')]);}logger[_0x9098('0xf')](_0x9098('0x10'),_0x28437d,_0x2d9d2d['error'][_0x9098('0x11')]);return _0x26d391(_0x2d9d2d[_0x9098('0xf')][_0x9098('0x11')]);}else{logger[_0x9098('0x12')](_0x9098('0x10'),_0x28437d,_0x9098('0xb'));_0x26d391(_0x2d9d2d[_0x9098('0x13')][_0x9098('0x11')]);}})[_0x9098('0x14')](function(_0x127dac){logger['error']('VoiceTransferReport,\x20%s,\x20%s',_0x28437d,_0x127dac);_0xb7ebbc(_0x127dac);});});}exports[_0x9098('0x15')]=function(_0x10aeac){var _0x4271f2=this;return new Promise(function(_0x302f1b,_0xfca1de){return db[_0x9098('0x16')][_0x9098('0x17')](_0x10aeac['body'],{'raw':_0x10aeac['options']?_0x10aeac['options'][_0x9098('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x57bae9){logger[_0x9098('0x12')](_0x9098('0x15'),_0x10aeac);logger[_0x9098('0xc')](_0x9098('0x15'),_0x10aeac,JSON[_0x9098('0xe')](_0x57bae9));_0x302f1b(_0x57bae9);})[_0x9098('0x14')](function(_0x14ef9a){logger['error'](_0x9098('0x15'),_0x14ef9a[_0x9098('0x11')],_0x10aeac);_0xfca1de(_0x4271f2[_0x9098('0xf')](0x1f4,_0x14ef9a[_0x9098('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/webbar/index.js b/server/api/webbar/index.js index 0e28848..b097377 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 _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 +var _0xb473=['../../components/auth/service','post','canUpdate','originate','/hangup','isAuthenticated','hangup','/answer','answer','/hold','hold','/unhold','unhold','/calls','calls','/transfer','transfer','exports','express','Router'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xb473,0xda));var _0x3b47=function(_0x351509,_0x54725c){_0x351509=_0x351509-0x0;var _0x4e9861=_0xb473[_0x351509];return _0x4e9861;};'use strict';var express=require(_0x3b47('0x0'));var router=express[_0x3b47('0x1')]();var auth=require(_0x3b47('0x2'));var controller=require('./webbar.controller');router[_0x3b47('0x3')]('/originate',auth['isAuthenticated'](),auth[_0x3b47('0x4')](),controller[_0x3b47('0x5')]);router[_0x3b47('0x3')](_0x3b47('0x6'),auth[_0x3b47('0x7')](),auth[_0x3b47('0x4')](),controller[_0x3b47('0x8')]);router[_0x3b47('0x3')](_0x3b47('0x9'),auth['isAuthenticated'](),auth['canUpdate'](),controller[_0x3b47('0xa')]);router[_0x3b47('0x3')](_0x3b47('0xb'),auth['isAuthenticated'](),auth[_0x3b47('0x4')](),controller[_0x3b47('0xc')]);router[_0x3b47('0x3')](_0x3b47('0xd'),auth[_0x3b47('0x7')](),auth[_0x3b47('0x4')](),controller[_0x3b47('0xe')]);router[_0x3b47('0x3')](_0x3b47('0xf'),auth[_0x3b47('0x7')](),auth['canUpdate'](),controller[_0x3b47('0x10')]);router['post'](_0x3b47('0x11'),auth[_0x3b47('0x7')](),auth[_0x3b47('0x4')](),controller[_0x3b47('0x12')]);module[_0x3b47('0x13')]=router; \ No newline at end of file diff --git a/server/api/webbar/webbar.controller.js b/server/api/webbar/webbar.controller.js index 1fdb597..2c06db4 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 _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 +var _0xaa88=['callNumber','format','user:%s','catch','hangup','entityFound:','webbar:hangup','hangup\x20executed!','answer','answer\x20fired:','sessionId','webbar:answer','answer\x20executed!','hold','hold\x20fired:','webbar:hold','hold\x20executed!','unhold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','conference','conference\x20fired:','webbar:conference','transfer','transfer\x20fired:','transferNumber','path','lodash','../../mysqldb','../../config/environment','bluebird','jayson/promise','client','http','../../config/logger','webbarapi','defaults','localhost','socket.io-emitter','redis','validate','userId\x20is\x20required','string','callNumber\x20is\x20required','number','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','stringify','error','name','status','send','NotFound','then','code','message','User','findOne','agent','all','filter','UserId','length','sessionId\x20','\x20not\x20found!','originate\x20fired:','body','json','userId'];(function(_0x1a7f03,_0x280dbe){var _0x46a170=function(_0xf1f28b){while(--_0xf1f28b){_0x1a7f03['push'](_0x1a7f03['shift']());}};_0x46a170(++_0x280dbe);}(_0xaa88,0x137));var _0x8aa8=function(_0xc67528,_0x24e2fb){_0xc67528=_0xc67528-0x0;var _0x38e26d=_0xaa88[_0xc67528];return _0x38e26d;};'use strict';var path=require(_0x8aa8('0x0'));var fs=require('fs');var _=require(_0x8aa8('0x1'));var db=require(_0x8aa8('0x2'))['db'];var config=require(_0x8aa8('0x3'));var util=require('util');var BPromise=require(_0x8aa8('0x4'));var jayson=require(_0x8aa8('0x5'));var amiClient=jayson[_0x8aa8('0x6')][_0x8aa8('0x7')]({'port':0x232a});var logger=require(_0x8aa8('0x8'))(_0x8aa8('0x9'));var Redis=require('ioredis');config['redis']=_[_0x8aa8('0xa')](config['redis'],{'host':_0x8aa8('0xb'),'port':0x18eb});var io=require(_0x8aa8('0xc'))(new Redis(config[_0x8aa8('0xd')]));var Schema=require(_0x8aa8('0xe'));var originateValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8aa8('0xf')]},'callNumber':{'type':_0x8aa8('0x10'),'required':[!![],_0x8aa8('0x11')]},'callerId':{'type':'string'},'callbackUrl':{'type':_0x8aa8('0x10')}});var hangupValidation=new Schema({'userId':{'type':_0x8aa8('0x12'),'required':[!![],_0x8aa8('0xf')]},'sessionId':{'type':_0x8aa8('0x10'),'required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8aa8('0xf')]},'sessionId':{'type':_0x8aa8('0x10'),'required':![]}});var transferValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8aa8('0xf')]},'sessionId':{'type':_0x8aa8('0x10'),'required':[!![],_0x8aa8('0x13')]},'transferNumber':{'type':'string','required':[!![],_0x8aa8('0x14')]}});var holdValidation=new Schema({'userId':{'type':_0x8aa8('0x12'),'required':[!![],_0x8aa8('0xf')]},'sessionId':{'type':'string','required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x8aa8('0x12'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':'string','required':![]}});var callsValidation=new Schema({'userId':{'type':_0x8aa8('0x12'),'required':[!![],_0x8aa8('0xf')]}});var conferenceValidation=new Schema({'userId':{'type':_0x8aa8('0x12'),'required':[!![],_0x8aa8('0xf')]}});function emit(_0x42a6a4,_0x3778f4,_0x1bdd39){logger[_0x8aa8('0x15')](_0x42a6a4,_0x3778f4,JSON[_0x8aa8('0x16')](_0x1bdd39));io['to'](_0x42a6a4)['emit'](_0x3778f4,_0x1bdd39);}function handleError(_0x4843f5){return function(_0x2c1b9a){console['log']('handleError:',_0x2c1b9a,_0x2c1b9a instanceof RangeError);logger[_0x8aa8('0x17')](_0x2c1b9a['stack']);if(_0x2c1b9a instanceof RangeError){if(_0x2c1b9a[_0x8aa8('0x18')]){delete _0x2c1b9a[_0x8aa8('0x18')];}_0x4843f5[_0x8aa8('0x19')](0x194)[_0x8aa8('0x1a')](_0x2c1b9a);}else{if(_0x2c1b9a['name']){delete _0x2c1b9a[_0x8aa8('0x18')];}_0x4843f5[_0x8aa8('0x19')](0x1f4)[_0x8aa8('0x1a')](_0x2c1b9a);}};}function checkError(){return function(_0x10f11c){if(!_0x10f11c){throw new RangeError(_0x8aa8('0x1b'));}return _0x10f11c;};}function respondWithRpcPromise(_0x34f1b7,_0x5d9b62){return new BPromise(function(_0x26cf63,_0x4cc455){var _0x1fdadd=amiClient;return _0x1fdadd['request'](_0x34f1b7,_0x5d9b62)[_0x8aa8('0x1c')](function(_0x557e4e){if(_0x557e4e[_0x8aa8('0x17')]){if(_0x557e4e[_0x8aa8('0x17')][_0x8aa8('0x1d')]===0x1f4){return _0x4cc455(_0x557e4e['error'][_0x8aa8('0x1e')]);}return _0x26cf63(_0x557e4e[_0x8aa8('0x17')][_0x8aa8('0x1e')]);}else{_0x26cf63(_0x557e4e['result']);}})['catch'](function(_0x2d1508){_0x4cc455(_0x2d1508);});});}function getAgent(_0x44e2d8){return db[_0x8aa8('0x1f')][_0x8aa8('0x20')]({'where':{'id':_0x44e2d8,'role':_0x8aa8('0x21')}})['then'](checkError());}function getAgentCheckSession(_0x2bc34a,_0x49d561){return new BPromise(function(_0x2a0ff2,_0xe7768){var _0x15ff33=respondWithRpcPromise('VoiceChannels');var _0x4c5c5c=getAgent(_0x2bc34a);Promise[_0x8aa8('0x22')]([_0x15ff33,_0x4c5c5c])['then'](function(_0x385208){var _0x14be8b=_0x385208[0x0];var _0x39e892=_0x385208[0x1];var _0x240203=_[_0x8aa8('0x23')](_0x14be8b['rows'],function(_0x267f4c){return _0x267f4c[_0x8aa8('0x24')]==_0x39e892['id']&&_0x267f4c['sessionId']==_0x49d561;});if(_0x240203[_0x8aa8('0x25')]==0x1){_0x2a0ff2(_0x39e892);}else{_0xe7768(new RangeError(_0x8aa8('0x26')+_0x49d561+_0x8aa8('0x27')));}});});}exports['originate']=function(_0x28182b,_0x3a0dce){logger[_0x8aa8('0x15')](_0x8aa8('0x28'),_0x28182b[_0x8aa8('0x29')]);var _0x356be7=originateValidation[_0x8aa8('0xe')](_0x28182b[_0x8aa8('0x29')]);if(_0x356be7[_0x8aa8('0x25')]>0x0){return _0x3a0dce[_0x8aa8('0x19')](0x190)[_0x8aa8('0x2a')](_0x356be7);}var _0x5bf1a7=_0x28182b['body'][_0x8aa8('0x2b')];var _0x1270ff=_0x28182b[_0x8aa8('0x29')][_0x8aa8('0x2c')];var _0xbe7639=_0x28182b[_0x8aa8('0x29')]['callerId'];var _0x4b8118=_0x28182b[_0x8aa8('0x29')]['callbackUrl'];return getAgent(_0x5bf1a7)[_0x8aa8('0x1c')](function(_0x2c5c84){logger[_0x8aa8('0x15')]('entityFound:',_0x2c5c84[_0x8aa8('0x18')]);emit(util[_0x8aa8('0x2d')](_0x8aa8('0x2e'),_0x2c5c84['name']),'webbar:originate',{'callNumber':_0x1270ff,'callerId':_0xbe7639,'callbackUrl':_0x4b8118});return _0x3a0dce[_0x8aa8('0x19')](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':'originate\x20executed!'});})[_0x8aa8('0x2f')](handleError(_0x3a0dce));};exports[_0x8aa8('0x30')]=function(_0x5c65fe,_0x3bbdd5){logger['info']('hangup\x20fired:',_0x5c65fe[_0x8aa8('0x29')]);var _0x5537ff=hangupValidation[_0x8aa8('0xe')](_0x5c65fe[_0x8aa8('0x29')]);if(_0x5537ff[_0x8aa8('0x25')]>0x0){return _0x3bbdd5[_0x8aa8('0x19')](0x190)['json'](_0x5537ff);}var _0x14264d=_0x5c65fe[_0x8aa8('0x29')]['userId'];var _0x40867c=_0x5c65fe[_0x8aa8('0x29')]['sessionId'];return getAgent(_0x14264d)[_0x8aa8('0x1c')](function(_0x3c6115){logger[_0x8aa8('0x15')](_0x8aa8('0x31'),_0x3c6115[_0x8aa8('0x18')]);emit(util[_0x8aa8('0x2d')](_0x8aa8('0x2e'),_0x3c6115[_0x8aa8('0x18')]),_0x8aa8('0x32'),{'sessionId':_0x40867c});return _0x3bbdd5[_0x8aa8('0x19')](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':_0x8aa8('0x33')});})[_0x8aa8('0x2f')](handleError(_0x3bbdd5));};exports[_0x8aa8('0x34')]=function(_0x335953,_0x21b0b6){logger['info'](_0x8aa8('0x35'),_0x335953['body']);var _0x4833c0=answerValidation['validate'](_0x335953[_0x8aa8('0x29')]);if(_0x4833c0['length']>0x0){return _0x21b0b6['status'](0x190)[_0x8aa8('0x2a')](_0x4833c0);}var _0x4da4d8=_0x335953[_0x8aa8('0x29')]['userId'];var _0x5a132a=_0x335953[_0x8aa8('0x29')][_0x8aa8('0x36')];return getAgent(_0x4da4d8)[_0x8aa8('0x1c')](function(_0x3762cd){logger[_0x8aa8('0x15')](_0x8aa8('0x31'),_0x3762cd[_0x8aa8('0x18')]);emit(util['format'](_0x8aa8('0x2e'),_0x3762cd['name']),_0x8aa8('0x37'),{'sessionId':_0x5a132a});return _0x21b0b6[_0x8aa8('0x19')](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':_0x8aa8('0x38')});})[_0x8aa8('0x2f')](handleError(_0x21b0b6));};exports[_0x8aa8('0x39')]=function(_0x5adcda,_0x56e13f){logger[_0x8aa8('0x15')](_0x8aa8('0x3a'),_0x5adcda['body']);var _0x35eeea=holdValidation[_0x8aa8('0xe')](_0x5adcda[_0x8aa8('0x29')]);if(_0x35eeea['length']>0x0){return _0x56e13f['status'](0x190)['json'](_0x35eeea);}var _0x4e05e7=_0x5adcda[_0x8aa8('0x29')][_0x8aa8('0x2b')];var _0x4ebe29=_0x5adcda[_0x8aa8('0x29')][_0x8aa8('0x36')];return getAgent(_0x4e05e7)[_0x8aa8('0x1c')](function(_0x1aa1b6){logger[_0x8aa8('0x15')](_0x8aa8('0x31'),_0x1aa1b6['name']);emit(util['format'](_0x8aa8('0x2e'),_0x1aa1b6['name']),_0x8aa8('0x3b'),{'sessionId':_0x4ebe29});return _0x56e13f['status'](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':_0x8aa8('0x3c')});})[_0x8aa8('0x2f')](handleError(_0x56e13f));};exports[_0x8aa8('0x3d')]=function(_0x36de37,_0x22b35d){logger[_0x8aa8('0x15')](_0x8aa8('0x3e'),_0x36de37[_0x8aa8('0x29')]);var _0x850854=unholdValidation[_0x8aa8('0xe')](_0x36de37[_0x8aa8('0x29')]);if(_0x850854['length']>0x0){return _0x22b35d[_0x8aa8('0x19')](0x190)['json'](_0x850854);}var _0x4d8865=_0x36de37['body'][_0x8aa8('0x2b')];var _0x490e6a=_0x36de37[_0x8aa8('0x29')][_0x8aa8('0x36')];return getAgent(_0x4d8865)[_0x8aa8('0x1c')](function(_0x4d4dc3){logger[_0x8aa8('0x15')](_0x8aa8('0x31'),_0x4d4dc3[_0x8aa8('0x18')]);emit(util[_0x8aa8('0x2d')]('user:%s',_0x4d4dc3['name']),_0x8aa8('0x3f'),{'sessionId':_0x490e6a});return _0x22b35d[_0x8aa8('0x19')](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':_0x8aa8('0x40')});})['catch'](handleError(_0x22b35d));};exports['calls']=function(_0x396ac5,_0x1bd389){logger[_0x8aa8('0x15')]('calls\x20fired:',_0x1bd389[_0x8aa8('0x29')]);var _0x3a814f=callsValidation['validate'](_0x396ac5['body']);if(_0x3a814f['length']>0x0){return _0x1bd389['status'](0x190)[_0x8aa8('0x2a')](_0x3a814f);}var _0x4ab098=_0x396ac5[_0x8aa8('0x29')][_0x8aa8('0x2b')];var _0x57d247=respondWithRpcPromise('VoiceChannels');var _0x2725c5=getAgent(_0x4ab098);return Promise[_0x8aa8('0x22')]([_0x57d247,_0x2725c5])['then'](function(_0x58830e){var _0x4da935=_0x58830e[0x0];var _0x3d2076=_0x58830e[0x1];var _0x1050e9=_['filter'](_0x4da935['rows'],function(_0x20feaf){return _0x20feaf[_0x8aa8('0x24')]==_0x3d2076['id'];});return _0x1bd389['status'](0xc8)[_0x8aa8('0x2a')]({'count':_0x1050e9[_0x8aa8('0x25')],'rows':_0x1050e9});})['catch'](handleError(_0x1bd389));};exports[_0x8aa8('0x41')]=function(_0x5dddbb,_0x29dfb3){logger['info'](_0x8aa8('0x42'),_0x5dddbb[_0x8aa8('0x29')]);var _0x3e105e=conferenceValidation[_0x8aa8('0xe')](_0x5dddbb[_0x8aa8('0x29')]);if(_0x3e105e['length']>0x0){return _0x29dfb3[_0x8aa8('0x19')](0x190)[_0x8aa8('0x2a')](_0x3e105e);}var _0x3fc8ce=_0x5dddbb[_0x8aa8('0x29')]['userId'];return getAgent(_0x3fc8ce)[_0x8aa8('0x1c')](function(_0xfe073d){logger['info'](_0x8aa8('0x31'),_0xfe073d[_0x8aa8('0x18')]);emit(util[_0x8aa8('0x2d')](_0x8aa8('0x2e'),_0xfe073d[_0x8aa8('0x18')]),_0x8aa8('0x43'));return _0x29dfb3[_0x8aa8('0x19')](0xc8)['json']({'error':![],'message':'conference\x20executed!'});})['catch'](handleError(_0x29dfb3));};exports[_0x8aa8('0x44')]=function(_0x3396fe,_0x3b7b2f){logger[_0x8aa8('0x15')](_0x8aa8('0x45'),_0x3396fe[_0x8aa8('0x29')]);var _0xffab23=transferValidation[_0x8aa8('0xe')](_0x3396fe[_0x8aa8('0x29')]);if(_0xffab23[_0x8aa8('0x25')]>0x0){return _0x3b7b2f[_0x8aa8('0x19')](0x190)[_0x8aa8('0x2a')](_0xffab23);}var _0x1c62bf=_0x3396fe[_0x8aa8('0x29')][_0x8aa8('0x2b')];var _0x36523a=_0x3396fe[_0x8aa8('0x29')][_0x8aa8('0x36')];var _0x28cf8a=_0x3396fe['body'][_0x8aa8('0x46')];return getAgent(_0x1c62bf)[_0x8aa8('0x1c')](function(_0x1bf485){logger[_0x8aa8('0x15')](_0x8aa8('0x31'),_0x1bf485[_0x8aa8('0x18')]);emit(util[_0x8aa8('0x2d')](_0x8aa8('0x2e'),_0x1bf485[_0x8aa8('0x18')]),'webbar:transfer',{'sessionId':_0x36523a,'transferNumber':_0x28cf8a});return _0x3b7b2f[_0x8aa8('0x19')](0xc8)[_0x8aa8('0x2a')]({'error':![],'message':'transfer\x20executed!'});})[_0x8aa8('0x2f')](handleError(_0x3b7b2f));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/index.js b/server/api/whatsappAccount/index.js index c015077..2bdf219 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(_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 +var _0xfcf0=['/:id/applications','getApplications','post','addAnswer','/:id/users','addAgents','addApplications','notify','put','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./whatsappAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','getAgents'];(function(_0x419978,_0x16fa44){var _0x17d7d7=function(_0x2a1762){while(--_0x2a1762){_0x419978['push'](_0x419978['shift']());}};_0x17d7d7(++_0x16fa44);}(_0xfcf0,0x138));var _0x0fcf=function(_0x124f88,_0x3ad501){_0x124f88=_0x124f88-0x0;var _0xed0e3b=_0xfcf0[_0x124f88];return _0xed0e3b;};'use strict';var multer=require(_0x0fcf('0x0'));var util=require(_0x0fcf('0x1'));var path=require('path');var timeout=require(_0x0fcf('0x2'));var express=require(_0x0fcf('0x3'));var router=express[_0x0fcf('0x4')]();var fs_extra=require(_0x0fcf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0fcf('0x6'));var config=require(_0x0fcf('0x7'));var controller=require(_0x0fcf('0x8'));router[_0x0fcf('0x9')]('/',auth[_0x0fcf('0xa')](),controller[_0x0fcf('0xb')]);router[_0x0fcf('0x9')](_0x0fcf('0xc'),auth['isAuthenticated'](),controller[_0x0fcf('0xd')]);router[_0x0fcf('0x9')](_0x0fcf('0xe'),auth['isAuthenticated'](),controller[_0x0fcf('0xf')]);router[_0x0fcf('0x9')](_0x0fcf('0x10'),auth['isAuthenticated'](),controller[_0x0fcf('0x11')]);router['get'](_0x0fcf('0x12'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x13')]);router['get']('/:id/users',auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x14')]);router['get'](_0x0fcf('0x15'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x16')]);router[_0x0fcf('0x17')]('/',auth[_0x0fcf('0xa')](),controller['create']);router[_0x0fcf('0x17')](_0x0fcf('0x10'),auth[_0x0fcf('0xa')](),controller['addDisposition']);router[_0x0fcf('0x17')](_0x0fcf('0x12'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x18')]);router['post'](_0x0fcf('0x19'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x1a')]);router[_0x0fcf('0x17')](_0x0fcf('0x15'),auth['isAuthenticated'](),controller[_0x0fcf('0x1b')]);router[_0x0fcf('0x17')]('/:id/notify',controller[_0x0fcf('0x1c')]);router[_0x0fcf('0x17')]('/:id/send',auth[_0x0fcf('0xa')](),controller['send']);router[_0x0fcf('0x1d')](_0x0fcf('0xe'),auth['isAuthenticated'](),controller[_0x0fcf('0x1e')]);router[_0x0fcf('0x1f')](_0x0fcf('0xe'),auth['isAuthenticated'](),controller[_0x0fcf('0x20')]);router[_0x0fcf('0x1f')](_0x0fcf('0x10'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x21')]);router[_0x0fcf('0x1f')]('/:id/canned_answers',auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x22')]);router[_0x0fcf('0x1f')](_0x0fcf('0x19'),auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x23')]);module[_0x0fcf('0x24')]=router; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.attributes.js b/server/api/whatsappAccount/whatsappAccount.attributes.js index 5302313..d611e36 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 _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 +var _0xe688=['twilio','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','setDataValue','sequelize','exports','STRING','name','ENUM'];(function(_0x4ed6c7,_0x2e6803){var _0x112d0c=function(_0x188c4f){while(--_0x188c4f){_0x4ed6c7['push'](_0x4ed6c7['shift']());}};_0x112d0c(++_0x2e6803);}(_0xe688,0x124));var _0x8e68=function(_0x1ed21d,_0x28f66c){_0x1ed21d=_0x1ed21d-0x0;var _0x31a31d=_0xe688[_0x1ed21d];return _0x31a31d;};'use strict';var Sequelize=require(_0x8e68('0x0'));var rs=require('randomstring');module[_0x8e68('0x1')]={'name':{'type':Sequelize[_0x8e68('0x2')],'unique':_0x8e68('0x3'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize['STRING'],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs['generate']();}},'phone':{'type':Sequelize[_0x8e68('0x2')]},'type':{'type':Sequelize[_0x8e68('0x4')](_0x8e68('0x5'))},'accountSid':{'type':Sequelize[_0x8e68('0x2')]},'authToken':{'type':Sequelize[_0x8e68('0x2')]},'notificationTemplate':{'type':Sequelize[_0x8e68('0x6')],'defaultValue':function(){return _0x8e68('0x7');}},'notificationSound':{'type':Sequelize[_0x8e68('0x8')],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x8e68('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x8e68('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x8e68('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x8e68('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x8e68('0x9')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x8e68('0x8')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x7b3d57){if(!_0x7b3d57){this[_0x8e68('0xa')]('mandatoryDispositionPauseId',null);}this[_0x8e68('0xa')]('mandatoryDisposition',_0x7b3d57);}},'description':{'type':Sequelize[_0x8e68('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.controller.js b/server/api/whatsappAccount/whatsappAccount.controller.js index 9a7649a..5cee51b 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 _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 +var _0x1c43=['register','client','info','WhatsappAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','catch','status','end','offset','undefined','limit','count','set','json','apply','reject','update','then','destroy','get','WhatsappAccounts','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','WhatsappAccount','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','show','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','params','describe','addDisposition','Disposition','findOne','WhatsappAccountId','removeDispositions','ids','CannedAnswer','removeAnswers','addAgents','omit','spread','emit','removeAgents','isArray','userWhatsappAccount:remove','getAgents','addApplications','sequelize','transaction','WhatsappApplication','bulkCreate','findAndCountAll','getApplications','notify','whatsapp','Applications','account','applications','orderBy','priority','CmContact','ValidationError','no\x20available\x20attributes','createdAt','updatedAt','CompanyId','ListId','mobile','from','From','replace','whatsapp:','Body','messageId','MessageSid','Sequelize','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','CmList','Contacts','DESC','contact','WhatsappInteraction','interaction','autoclose','push','unmanaged','*,*,*,*','created','WhatsappMessage','ContactId','AttachmentId','User','UserId','unshift','agent','waitForTheAssignedAgent','Start','receiveMessage','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','entity\x20found','twilio','Content-Type','text/xml','to\x20is\x20mandatory','List','out','Messages','dataValues','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','localhost','socket.io-emitter','./whatsappAccount.socket'];(function(_0x240984,_0x595a11){var _0x4e6330=function(_0x30f4e5){while(--_0x30f4e5){_0x240984['push'](_0x240984['shift']());}};_0x4e6330(++_0x595a11);}(_0x1c43,0x9c));var _0x31c4=function(_0x1acf22,_0x50923d){_0x1acf22=_0x1acf22-0x0;var _0x5b9494=_0x1c43[_0x1acf22];return _0x5b9494;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x31c4('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x31c4('0x1'));var rp=require('request-promise');var moment=require(_0x31c4('0x2'));var BPromise=require(_0x31c4('0x3'));var Mustache=require(_0x31c4('0x4'));var util=require(_0x31c4('0x5'));var path=require(_0x31c4('0x6'));var sox=require(_0x31c4('0x7'));var csv=require('to-csv');var ejs=require(_0x31c4('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x31c4('0x9'));var squel=require('squel');var crypto=require(_0x31c4('0xa'));var jsforce=require(_0x31c4('0xb'));var deskjs=require(_0x31c4('0xc'));var toCsv=require('to-csv');var querystring=require(_0x31c4('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x31c4('0xe'));var qs=require(_0x31c4('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x31c4('0x10'));var logger=require(_0x31c4('0x11'))(_0x31c4('0x12'));var utils=require(_0x31c4('0x13'));var config=require(_0x31c4('0x14'));var licenseUtil=require(_0x31c4('0x15'));var db=require(_0x31c4('0x16'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x31c4('0x17'),'port':0x18eb});var socket=require(_0x31c4('0x18'))(new Redis(config['redis']));require(_0x31c4('0x19'))[_0x31c4('0x1a')](socket);var jayson=require('jayson/promise');var client=jayson[_0x31c4('0x1b')]['http']({'port':0x232c});function respondWithRpcPromise(_0x29b084,_0x141507,_0x5a9d04,_0x41b2ad){return new BPromise(function(_0x159a2b,_0x1494c0){var _0x171e4f=_0x41b2ad||client;return _0x171e4f['request'](_0x29b084,_0x5a9d04)['then'](function(_0x4ce0db){logger[_0x31c4('0x1c')](_0x31c4('0x1d'),_0x141507,'request\x20sent');logger[_0x31c4('0x1e')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x141507,_0x31c4('0x1f'),JSON[_0x31c4('0x20')](_0x4ce0db));if(_0x4ce0db[_0x31c4('0x21')]){if(_0x4ce0db[_0x31c4('0x21')][_0x31c4('0x22')]===0x1f4){logger[_0x31c4('0x21')]('WhatsappAccount,\x20%s,\x20%s',_0x141507,_0x4ce0db[_0x31c4('0x21')]['message']);return _0x1494c0(_0x4ce0db['error'][_0x31c4('0x23')]);}logger[_0x31c4('0x21')](_0x31c4('0x1d'),_0x141507,_0x4ce0db[_0x31c4('0x21')]['message']);return _0x159a2b(_0x4ce0db[_0x31c4('0x21')]['message']);}else{logger[_0x31c4('0x1c')](_0x31c4('0x1d'),_0x141507,'request\x20sent');_0x159a2b(_0x4ce0db['result'][_0x31c4('0x23')]);}})[_0x31c4('0x24')](function(_0x8ca160){logger[_0x31c4('0x21')](_0x31c4('0x1d'),_0x141507,_0x8ca160);_0x1494c0(_0x8ca160);});});}function respondWithStatusCode(_0x419d41,_0x213023){_0x213023=_0x213023||0xcc;return function(_0x55966f){if(_0x55966f){return _0x419d41['sendStatus'](_0x213023);}return _0x419d41[_0x31c4('0x25')](_0x213023)[_0x31c4('0x26')]();};}function respondWithResult(_0x1aa9f6,_0x52f8c7){_0x52f8c7=_0x52f8c7||0xc8;return function(_0x11ab4d){if(_0x11ab4d){return _0x1aa9f6[_0x31c4('0x25')](_0x52f8c7)['json'](_0x11ab4d);}};}function respondWithFilteredResult(_0x253e4e,_0x5b1d7a){return function(_0x55ef05){if(_0x55ef05){var _0x115394=typeof _0x5b1d7a[_0x31c4('0x27')]===_0x31c4('0x28')&&typeof _0x5b1d7a[_0x31c4('0x29')]===_0x31c4('0x28');var _0x22b071=_0x55ef05[_0x31c4('0x2a')];var _0x2bcd3e=_0x115394?0x0:_0x5b1d7a[_0x31c4('0x27')];var _0x18bdbd=_0x115394?_0x55ef05[_0x31c4('0x2a')]:_0x5b1d7a[_0x31c4('0x27')]+_0x5b1d7a['limit'];var _0x5d870e;if(_0x18bdbd>=_0x22b071){_0x18bdbd=_0x22b071;_0x5d870e=0xc8;}else{_0x5d870e=0xce;}_0x253e4e[_0x31c4('0x25')](_0x5d870e);return _0x253e4e[_0x31c4('0x2b')]('Content-Range',_0x2bcd3e+'-'+_0x18bdbd+'/'+_0x22b071)[_0x31c4('0x2c')](_0x55ef05);}return null;};}function patchUpdates(_0x47d07d){return function(_0x33b574){try{jsonpatch[_0x31c4('0x2d')](_0x33b574,_0x47d07d,!![]);}catch(_0x4f5568){return BPromise[_0x31c4('0x2e')](_0x4f5568);}return _0x33b574['save']();};}function saveUpdates(_0xd235a9,_0x1b20df){return function(_0x34945f){if(_0x34945f){return _0x34945f[_0x31c4('0x2f')](_0xd235a9)[_0x31c4('0x30')](function(_0x23db97){return _0x23db97;});}return null;};}function removeEntity(_0x56b5e0,_0x9508b1){return function(_0x1ccb22){if(_0x1ccb22){return _0x1ccb22[_0x31c4('0x31')]()[_0x31c4('0x30')](function(){var _0x37313b=_0x1ccb22[_0x31c4('0x32')]({'plain':!![]});var _0x334df5=_0x31c4('0x33');return db[_0x31c4('0x34')][_0x31c4('0x31')]({'where':{'type':_0x334df5,'resourceId':_0x37313b['id']}})[_0x31c4('0x30')](function(){return _0x1ccb22;});})['then'](function(){_0x56b5e0['status'](0xcc)[_0x31c4('0x26')]();});}};}function handleEntityNotFound(_0x674f16,_0x544936){return function(_0x2fbbc3){if(!_0x2fbbc3){_0x674f16['sendStatus'](0x194);}return _0x2fbbc3;};}function handleError(_0x5972e7,_0xa1214c){_0xa1214c=_0xa1214c||0x1f4;return function(_0x56a6fe){logger[_0x31c4('0x21')](_0x56a6fe[_0x31c4('0x35')]);if(_0x56a6fe[_0x31c4('0x36')]){delete _0x56a6fe[_0x31c4('0x36')];}_0x5972e7['status'](_0xa1214c)[_0x31c4('0x37')](_0x56a6fe);};}exports[_0x31c4('0x38')]=function(_0x2ecc60,_0x2a534f){var _0x8fd073={'include':[{'model':db[_0x31c4('0x39')],'as':_0x31c4('0x3a')}]},_0x3da11e={},_0x167d54={'count':0x0,'rows':[]};var _0x2cf3d3=_['map'](db[_0x31c4('0x3b')][_0x31c4('0x3c')],function(_0x555f79){return{'name':_0x555f79[_0x31c4('0x3d')],'type':_0x555f79['type'][_0x31c4('0x3e')]};});_0x3da11e[_0x31c4('0x3f')]=_[_0x31c4('0x40')](_0x2cf3d3,'name');_0x3da11e[_0x31c4('0x41')]=_['keys'](_0x2ecc60[_0x31c4('0x41')]);_0x3da11e[_0x31c4('0x42')]=_[_0x31c4('0x43')](_0x3da11e[_0x31c4('0x3f')],_0x3da11e[_0x31c4('0x41')]);_0x8fd073[_0x31c4('0x44')]=_[_0x31c4('0x43')](_0x3da11e[_0x31c4('0x3f')],qs[_0x31c4('0x45')](_0x2ecc60[_0x31c4('0x41')][_0x31c4('0x45')]));_0x8fd073['attributes']=_0x8fd073[_0x31c4('0x44')][_0x31c4('0x46')]?_0x8fd073[_0x31c4('0x44')]:_0x3da11e[_0x31c4('0x3f')];if(!_0x2ecc60[_0x31c4('0x41')][_0x31c4('0x47')](_0x31c4('0x48'))){_0x8fd073[_0x31c4('0x29')]=qs['limit'](_0x2ecc60[_0x31c4('0x41')]['limit']);_0x8fd073[_0x31c4('0x27')]=qs['offset'](_0x2ecc60[_0x31c4('0x41')]['offset']);}_0x8fd073[_0x31c4('0x49')]=qs[_0x31c4('0x4a')](_0x2ecc60[_0x31c4('0x41')]['sort']);_0x8fd073[_0x31c4('0x4b')]=qs[_0x31c4('0x42')](_[_0x31c4('0x4c')](_0x2ecc60[_0x31c4('0x41')],_0x3da11e['filters']),_0x2cf3d3);if(_0x2ecc60['query'][_0x31c4('0x4d')]){_0x8fd073[_0x31c4('0x4b')]=_[_0x31c4('0x4e')](_0x8fd073['where'],{'$or':_['map'](_0x2cf3d3,function(_0x12a750){if(_0x12a750[_0x31c4('0x4f')]!==_0x31c4('0x50')){var _0x1895b7={};_0x1895b7[_0x12a750[_0x31c4('0x36')]]={'$like':'%'+_0x2ecc60[_0x31c4('0x41')]['filter']+'%'};return _0x1895b7;}})});}_0x8fd073=_['merge']({},_0x8fd073,_0x2ecc60[_0x31c4('0x51')]);var _0x503a1e={'where':_0x8fd073[_0x31c4('0x4b')]};return db[_0x31c4('0x3b')][_0x31c4('0x2a')](_0x503a1e)[_0x31c4('0x30')](function(_0x32b3f2){_0x167d54[_0x31c4('0x2a')]=_0x32b3f2;if(_0x2ecc60['query'][_0x31c4('0x52')]){_0x8fd073[_0x31c4('0x53')]=[{'all':!![]}];}return db[_0x31c4('0x3b')][_0x31c4('0x54')](_0x8fd073);})[_0x31c4('0x30')](function(_0x3939d7){_0x167d54[_0x31c4('0x55')]=_0x3939d7;return _0x167d54;})[_0x31c4('0x30')](respondWithFilteredResult(_0x2a534f,_0x8fd073))[_0x31c4('0x24')](handleError(_0x2a534f,null));};exports[_0x31c4('0x56')]=function(_0x2f97cb,_0x5a68e3){var _0x5eaec7={'raw':![],'where':{'id':_0x2f97cb['params']['id']},'include':[{'model':db[_0x31c4('0x39')],'as':_0x31c4('0x3a')}]},_0x152153={};_0x152153[_0x31c4('0x3f')]=_[_0x31c4('0x57')](db['WhatsappAccount']['rawAttributes']);_0x152153[_0x31c4('0x41')]=_['keys'](_0x2f97cb['query']);_0x152153[_0x31c4('0x42')]=_['intersection'](_0x152153['model'],_0x152153[_0x31c4('0x41')]);_0x5eaec7[_0x31c4('0x44')]=_[_0x31c4('0x43')](_0x152153[_0x31c4('0x3f')],qs[_0x31c4('0x45')](_0x2f97cb['query'][_0x31c4('0x45')]));_0x5eaec7[_0x31c4('0x44')]=_0x5eaec7['attributes'][_0x31c4('0x46')]?_0x5eaec7[_0x31c4('0x44')]:_0x152153[_0x31c4('0x3f')];if(_0x2f97cb[_0x31c4('0x41')][_0x31c4('0x52')]){_0x5eaec7[_0x31c4('0x53')]=[{'all':!![]}];}_0x5eaec7=_['merge']({},_0x5eaec7,_0x2f97cb[_0x31c4('0x51')]);return db[_0x31c4('0x3b')][_0x31c4('0x58')](_0x5eaec7)['then'](handleEntityNotFound(_0x5a68e3,null))[_0x31c4('0x30')](respondWithResult(_0x5a68e3,null))['catch'](handleError(_0x5a68e3,null));};exports['create']=function(_0x2d834b,_0x818027){return db['WhatsappAccount'][_0x31c4('0x59')](_0x2d834b[_0x31c4('0x5a')],{})[_0x31c4('0x30')](function(_0x25ad2c){var _0x526e66=_0x2d834b[_0x31c4('0x5b')][_0x31c4('0x32')]({'plain':!![]});if(!_0x526e66)throw new Error(_0x31c4('0x5c'));if(_0x526e66['role']===_0x31c4('0x5b')){var _0x460799=_0x25ad2c['get']({'plain':!![]});var _0x1ac4ec=_0x31c4('0x33');return db[_0x31c4('0x5d')][_0x31c4('0x58')]({'where':{'name':_0x1ac4ec,'userProfileId':_0x526e66[_0x31c4('0x5e')]},'raw':!![]})[_0x31c4('0x30')](function(_0x399967){if(_0x399967&&_0x399967[_0x31c4('0x5f')]===0x0){return db[_0x31c4('0x34')][_0x31c4('0x59')]({'name':_0x460799['name'],'resourceId':_0x460799['id'],'type':_0x399967[_0x31c4('0x36')],'sectionId':_0x399967['id']},{})[_0x31c4('0x30')](function(){return _0x25ad2c;});}else{return _0x25ad2c;}})['catch'](function(_0x4cf027){logger[_0x31c4('0x21')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4cf027);throw _0x4cf027;});}return _0x25ad2c;})[_0x31c4('0x30')](respondWithResult(_0x818027,0xc9))[_0x31c4('0x24')](handleError(_0x818027,null));};exports[_0x31c4('0x2f')]=function(_0x13cb9f,_0x16b367){if(_0x13cb9f['body']['id']){delete _0x13cb9f[_0x31c4('0x5a')]['id'];}return db['WhatsappAccount'][_0x31c4('0x58')]({'where':{'id':_0x13cb9f['params']['id']},'include':[{'model':db[_0x31c4('0x39')],'as':_0x31c4('0x3a')}]})[_0x31c4('0x30')](handleEntityNotFound(_0x16b367,null))[_0x31c4('0x30')](saveUpdates(_0x13cb9f[_0x31c4('0x5a')],null))[_0x31c4('0x30')](respondWithResult(_0x16b367,null))['catch'](handleError(_0x16b367,null));};exports[_0x31c4('0x31')]=function(_0x2df8b0,_0x1fb5a5){return db[_0x31c4('0x3b')]['find']({'where':{'id':_0x2df8b0[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x1fb5a5,null))[_0x31c4('0x30')](removeEntity(_0x1fb5a5,null))[_0x31c4('0x24')](handleError(_0x1fb5a5,null));};exports[_0x31c4('0x61')]=function(_0x98e2ce,_0x11d3db){return db['WhatsappAccount'][_0x31c4('0x61')]()['then'](respondWithResult(_0x11d3db,null))[_0x31c4('0x24')](handleError(_0x11d3db,null));};exports[_0x31c4('0x62')]=function(_0x2e758b,_0x406072,_0x139711){if(_0x2e758b[_0x31c4('0x5a')]['id']){delete _0x2e758b[_0x31c4('0x5a')]['id'];}return db[_0x31c4('0x3b')][_0x31c4('0x58')]({'where':{'id':_0x2e758b[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x406072,null))[_0x31c4('0x30')](function(_0x2c586e){if(_0x2c586e){_0x2e758b[_0x31c4('0x5a')]['WhatsappAccountId']=_0x2c586e['id'];return db[_0x31c4('0x63')][_0x31c4('0x59')](_0x2e758b[_0x31c4('0x5a')]);}})[_0x31c4('0x30')](respondWithResult(_0x406072,null))[_0x31c4('0x24')](handleError(_0x406072,null));};exports['getDispositions']=function(_0x3e2da7,_0x857abd,_0x5299f2){var _0x3f2329={'raw':![],'where':{}};var _0x5f3cf2={};var _0x47ceb0={'count':0x0,'rows':[]};return db[_0x31c4('0x3b')][_0x31c4('0x64')]({'where':{'id':_0x3e2da7[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x857abd,null))[_0x31c4('0x30')](function(_0x16f93f){if(_0x16f93f){_0x5f3cf2[_0x31c4('0x3f')]=_['keys'](db[_0x31c4('0x63')][_0x31c4('0x3c')]);_0x5f3cf2[_0x31c4('0x41')]=_[_0x31c4('0x57')](_0x3e2da7[_0x31c4('0x41')]);_0x5f3cf2[_0x31c4('0x42')]=_['intersection'](_0x5f3cf2['model'],_0x5f3cf2['query']);_0x3f2329['attributes']=_['intersection'](_0x5f3cf2['model'],qs[_0x31c4('0x45')](_0x3e2da7[_0x31c4('0x41')][_0x31c4('0x45')]));_0x3f2329[_0x31c4('0x44')]=_0x3f2329['attributes']['length']?_0x3f2329[_0x31c4('0x44')]:_0x5f3cf2[_0x31c4('0x3f')];if(!_0x3e2da7[_0x31c4('0x41')]['hasOwnProperty'](_0x31c4('0x48'))){_0x3f2329[_0x31c4('0x29')]=qs[_0x31c4('0x29')](_0x3e2da7[_0x31c4('0x41')][_0x31c4('0x29')]);_0x3f2329[_0x31c4('0x27')]=qs['offset'](_0x3e2da7[_0x31c4('0x41')][_0x31c4('0x27')]);}_0x3f2329[_0x31c4('0x49')]=qs[_0x31c4('0x4a')](_0x3e2da7[_0x31c4('0x41')][_0x31c4('0x4a')]);_0x3f2329[_0x31c4('0x4b')]=qs[_0x31c4('0x42')](_[_0x31c4('0x4c')](_0x3e2da7['query'],_0x5f3cf2[_0x31c4('0x42')]));_0x3f2329[_0x31c4('0x4b')][_0x31c4('0x65')]=_0x16f93f['id'];if(_0x3e2da7['query'][_0x31c4('0x4d')]){_0x3f2329['where']=_[_0x31c4('0x4e')](_0x3f2329[_0x31c4('0x4b')],{'$or':_[_0x31c4('0x40')](_0x3f2329[_0x31c4('0x44')],function(_0x22d83e){var _0x992fc5={};_0x992fc5[_0x22d83e]={'$like':'%'+_0x3e2da7[_0x31c4('0x41')][_0x31c4('0x4d')]+'%'};return _0x992fc5;})});}_0x3f2329=_[_0x31c4('0x4e')]({},_0x3f2329,_0x3e2da7[_0x31c4('0x51')]);return db[_0x31c4('0x63')][_0x31c4('0x2a')]({'where':_0x3f2329[_0x31c4('0x4b')]})['then'](function(_0x12d1a2){_0x47ceb0[_0x31c4('0x2a')]=_0x12d1a2;if(_0x3e2da7[_0x31c4('0x41')]['includeAll']){_0x3f2329[_0x31c4('0x53')]=[{'all':!![]}];}return db[_0x31c4('0x63')][_0x31c4('0x54')](_0x3f2329);})[_0x31c4('0x30')](function(_0x5359b2){_0x47ceb0['rows']=_0x5359b2;return _0x47ceb0;});}})[_0x31c4('0x30')](respondWithFilteredResult(_0x857abd,_0x3f2329))[_0x31c4('0x24')](handleError(_0x857abd,null));};exports[_0x31c4('0x66')]=function(_0x327aba,_0x259d6b,_0x2f1a52){return db[_0x31c4('0x3b')][_0x31c4('0x58')]({'where':{'id':_0x327aba[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x259d6b,null))[_0x31c4('0x30')](function(_0x331823){if(_0x331823){return _0x331823['removeDispositions'](_0x327aba[_0x31c4('0x41')][_0x31c4('0x67')]);}})['then'](respondWithStatusCode(_0x259d6b,null))[_0x31c4('0x24')](handleError(_0x259d6b,null));};exports['addAnswer']=function(_0x5f3977,_0x3c06b4,_0x42000b){if(_0x5f3977[_0x31c4('0x5a')]['id']){delete _0x5f3977['body']['id'];}return db[_0x31c4('0x3b')][_0x31c4('0x58')]({'where':{'id':_0x5f3977[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x3c06b4,null))[_0x31c4('0x30')](function(_0x398b5f){if(_0x398b5f){_0x5f3977[_0x31c4('0x5a')]['WhatsappAccountId']=_0x398b5f['id'];return db['CannedAnswer'][_0x31c4('0x59')](_0x5f3977['body']);}})[_0x31c4('0x30')](respondWithResult(_0x3c06b4,null))[_0x31c4('0x24')](handleError(_0x3c06b4,null));};exports['getAnswers']=function(_0x3ebd7a,_0x50f3bd,_0x3e55ad){var _0x7cc1bd={'raw':![],'where':{}};var _0x37b795={};var _0x43a5a7={'count':0x0,'rows':[]};return db[_0x31c4('0x3b')][_0x31c4('0x64')]({'where':{'id':_0x3ebd7a['params']['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x50f3bd,null))[_0x31c4('0x30')](function(_0x2f6769){if(_0x2f6769){_0x37b795[_0x31c4('0x3f')]=_['keys'](db[_0x31c4('0x68')][_0x31c4('0x3c')]);_0x37b795[_0x31c4('0x41')]=_[_0x31c4('0x57')](_0x3ebd7a[_0x31c4('0x41')]);_0x37b795[_0x31c4('0x42')]=_[_0x31c4('0x43')](_0x37b795[_0x31c4('0x3f')],_0x37b795[_0x31c4('0x41')]);_0x7cc1bd['attributes']=_['intersection'](_0x37b795[_0x31c4('0x3f')],qs['fields'](_0x3ebd7a[_0x31c4('0x41')]['fields']));_0x7cc1bd[_0x31c4('0x44')]=_0x7cc1bd[_0x31c4('0x44')]['length']?_0x7cc1bd[_0x31c4('0x44')]:_0x37b795['model'];if(!_0x3ebd7a[_0x31c4('0x41')]['hasOwnProperty']('nolimit')){_0x7cc1bd[_0x31c4('0x29')]=qs[_0x31c4('0x29')](_0x3ebd7a['query'][_0x31c4('0x29')]);_0x7cc1bd[_0x31c4('0x27')]=qs[_0x31c4('0x27')](_0x3ebd7a['query'][_0x31c4('0x27')]);}_0x7cc1bd[_0x31c4('0x49')]=qs[_0x31c4('0x4a')](_0x3ebd7a[_0x31c4('0x41')][_0x31c4('0x4a')]);_0x7cc1bd['where']=qs[_0x31c4('0x42')](_[_0x31c4('0x4c')](_0x3ebd7a['query'],_0x37b795['filters']));_0x7cc1bd[_0x31c4('0x4b')]['WhatsappAccountId']=_0x2f6769['id'];if(_0x3ebd7a[_0x31c4('0x41')][_0x31c4('0x4d')]){_0x7cc1bd[_0x31c4('0x4b')]=_[_0x31c4('0x4e')](_0x7cc1bd['where'],{'$or':_['map'](_0x7cc1bd[_0x31c4('0x44')],function(_0x1f5c0e){var _0x14c7c5={};_0x14c7c5[_0x1f5c0e]={'$like':'%'+_0x3ebd7a[_0x31c4('0x41')][_0x31c4('0x4d')]+'%'};return _0x14c7c5;})});}_0x7cc1bd=_[_0x31c4('0x4e')]({},_0x7cc1bd,_0x3ebd7a[_0x31c4('0x51')]);return db[_0x31c4('0x68')]['count']({'where':_0x7cc1bd[_0x31c4('0x4b')]})[_0x31c4('0x30')](function(_0x3d919b){_0x43a5a7[_0x31c4('0x2a')]=_0x3d919b;if(_0x3ebd7a[_0x31c4('0x41')][_0x31c4('0x52')]){_0x7cc1bd['include']=[{'all':!![]}];}return db['CannedAnswer'][_0x31c4('0x54')](_0x7cc1bd);})['then'](function(_0x3ccdfa){_0x43a5a7[_0x31c4('0x55')]=_0x3ccdfa;return _0x43a5a7;});}})[_0x31c4('0x30')](respondWithFilteredResult(_0x50f3bd,_0x7cc1bd))[_0x31c4('0x24')](handleError(_0x50f3bd,null));};exports[_0x31c4('0x69')]=function(_0x4a8339,_0x348f7c,_0x1f1d3f){return db[_0x31c4('0x3b')]['find']({'where':{'id':_0x4a8339[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x348f7c,null))['then'](function(_0x51787e){if(_0x51787e){return _0x51787e[_0x31c4('0x69')](_0x4a8339[_0x31c4('0x41')][_0x31c4('0x67')]);}})[_0x31c4('0x30')](respondWithStatusCode(_0x348f7c,null))[_0x31c4('0x24')](handleError(_0x348f7c,null));};exports['addAgents']=function(_0x4a62a,_0x3258bc,_0x17519b){return db[_0x31c4('0x3b')]['find']({'where':{'id':_0x4a62a['params']['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x3258bc,null))['then'](function(_0xdc584d){if(_0xdc584d){return _0xdc584d[_0x31c4('0x6a')](_0x4a62a[_0x31c4('0x5a')][_0x31c4('0x67')],_[_0x31c4('0x6b')](_0x4a62a[_0x31c4('0x5a')],[_0x31c4('0x67'),'id'])||{})[_0x31c4('0x6c')](function(_0x211d5f){for(var _0x34b80c=0x0;_0x34b80c<_0x4a62a[_0x31c4('0x5a')][_0x31c4('0x67')][_0x31c4('0x46')];_0x34b80c+=0x1){socket[_0x31c4('0x6d')]('userWhatsappAccount:save',{'UserId':_0x4a62a[_0x31c4('0x5a')]['ids'][_0x34b80c],'WhatsappAccountId':_0x4a62a[_0x31c4('0x60')]['id']});}return _0x211d5f;});}})[_0x31c4('0x30')](respondWithResult(_0x3258bc,null))[_0x31c4('0x24')](handleError(_0x3258bc,null));};exports[_0x31c4('0x6e')]=function(_0x54b840,_0x5ad0e2,_0x44f994){return db[_0x31c4('0x3b')][_0x31c4('0x58')]({'where':{'id':_0x54b840[_0x31c4('0x60')]['id']}})['then'](handleEntityNotFound(_0x5ad0e2,null))['then'](function(_0x1fca6a){if(_0x1fca6a){return _0x1fca6a[_0x31c4('0x6e')](_0x54b840[_0x31c4('0x41')][_0x31c4('0x67')])[_0x31c4('0x30')](function(){if(_[_0x31c4('0x6f')](_0x54b840['query']['ids'])){for(var _0x5ecbef=0x0;_0x5ecbef<_0x54b840[_0x31c4('0x41')]['ids'][_0x31c4('0x46')];_0x5ecbef+=0x1){socket[_0x31c4('0x6d')](_0x31c4('0x70'),{'UserId':Number(_0x54b840[_0x31c4('0x41')]['ids'][_0x5ecbef]),'WhatsappAccountId':Number(_0x54b840['params']['id'])});}}else{socket['emit'](_0x31c4('0x70'),{'UserId':Number(_0x54b840[_0x31c4('0x41')]['ids']),'WhatsappAccountId':Number(_0x54b840[_0x31c4('0x60')]['id'])});}});}})[_0x31c4('0x30')](respondWithStatusCode(_0x5ad0e2,null))['catch'](handleError(_0x5ad0e2,null));};exports['getAgents']=function(_0x146515,_0x882636,_0x1214d0){var _0x499a97={};var _0xa12458={};var _0x281486;var _0x40bf6f;return db['WhatsappAccount'][_0x31c4('0x64')]({'where':{'id':_0x146515[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x882636,null))[_0x31c4('0x30')](function(_0x1d339d){if(_0x1d339d){_0x281486=_0x1d339d;_0xa12458[_0x31c4('0x3f')]=_[_0x31c4('0x57')](db['User'][_0x31c4('0x3c')]);_0xa12458[_0x31c4('0x41')]=_[_0x31c4('0x57')](_0x146515[_0x31c4('0x41')]);_0xa12458[_0x31c4('0x42')]=_[_0x31c4('0x43')](_0xa12458[_0x31c4('0x3f')],_0xa12458['query']);_0x499a97[_0x31c4('0x44')]=_[_0x31c4('0x43')](_0xa12458[_0x31c4('0x3f')],qs[_0x31c4('0x45')](_0x146515[_0x31c4('0x41')][_0x31c4('0x45')]));_0x499a97['attributes']=_0x499a97['attributes'][_0x31c4('0x46')]?_0x499a97[_0x31c4('0x44')]:_0xa12458[_0x31c4('0x3f')];_0x499a97['order']=qs[_0x31c4('0x4a')](_0x146515[_0x31c4('0x41')]['sort']);_0x499a97[_0x31c4('0x4b')]=qs[_0x31c4('0x42')](_[_0x31c4('0x4c')](_0x146515['query'],_0xa12458[_0x31c4('0x42')]));if(_0x146515[_0x31c4('0x41')][_0x31c4('0x4d')]){_0x499a97['where']=_['merge'](_0x499a97[_0x31c4('0x4b')],{'$or':_[_0x31c4('0x40')](_0x499a97[_0x31c4('0x44')],function(_0xa8428e){var _0x4e0b99={};_0x4e0b99[_0xa8428e]={'$like':'%'+_0x146515[_0x31c4('0x41')]['filter']+'%'};return _0x4e0b99;})});}_0x499a97=_[_0x31c4('0x4e')]({},_0x499a97,_0x146515[_0x31c4('0x51')]);return _0x281486[_0x31c4('0x71')](_0x499a97);}})[_0x31c4('0x30')](function(_0x3f19c6){if(_0x3f19c6){_0x40bf6f=_0x3f19c6[_0x31c4('0x46')];if(!_0x146515[_0x31c4('0x41')][_0x31c4('0x47')](_0x31c4('0x48'))){_0x499a97['limit']=qs[_0x31c4('0x29')](_0x146515[_0x31c4('0x41')][_0x31c4('0x29')]);_0x499a97[_0x31c4('0x27')]=qs[_0x31c4('0x27')](_0x146515[_0x31c4('0x41')][_0x31c4('0x27')]);}return _0x281486[_0x31c4('0x71')](_0x499a97);}})['then'](function(_0x14b08e){if(_0x14b08e){return _0x14b08e?{'count':_0x40bf6f,'rows':_0x14b08e}:null;}})[_0x31c4('0x30')](respondWithResult(_0x882636,null))[_0x31c4('0x24')](handleError(_0x882636,null));};exports[_0x31c4('0x72')]=function(_0x124ee3,_0x308e10,_0x5b0f40){return db[_0x31c4('0x3b')][_0x31c4('0x64')]({'where':{'id':_0x124ee3[_0x31c4('0x60')]['id']}})[_0x31c4('0x30')](handleEntityNotFound(_0x308e10,null))['then'](function(_0x26258d){if(_0x26258d){return db[_0x31c4('0x73')][_0x31c4('0x74')](function(_0x13270d){return db[_0x31c4('0x75')][_0x31c4('0x31')]({'where':{'WhatsappAccountId':_0x124ee3[_0x31c4('0x60')]['id']},'transaction':_0x13270d})[_0x31c4('0x30')](function(_0x577e46){var _0x15ecd8=_['map'](_0x124ee3[_0x31c4('0x5a')],function(_0x5ab40b){_0x5ab40b[_0x31c4('0x65')]=_0x124ee3['params']['id'];return _0x5ab40b;});return db[_0x31c4('0x75')][_0x31c4('0x76')](_0x15ecd8,{'transaction':_0x13270d});});})[_0x31c4('0x30')](function(){return db[_0x31c4('0x75')][_0x31c4('0x77')]({'where':{'WhatsappAccountId':_0x124ee3[_0x31c4('0x60')]['id']},'order':'priority'});});}})[_0x31c4('0x30')](respondWithResult(_0x308e10,null))[_0x31c4('0x24')](handleError(_0x308e10,null));};exports[_0x31c4('0x78')]=function(_0x585582,_0x3f4dce,_0x466f1f){var _0x101dc5={};var _0x544415={};var _0x3e8d7c;var _0x131172;return db[_0x31c4('0x3b')][_0x31c4('0x64')]({'where':{'id':_0x585582[_0x31c4('0x60')]['id']}})['then'](handleEntityNotFound(_0x3f4dce,null))[_0x31c4('0x30')](function(_0x2e046c){if(_0x2e046c){_0x3e8d7c=_0x2e046c;_0x544415['model']=_[_0x31c4('0x57')](db[_0x31c4('0x75')][_0x31c4('0x3c')]);_0x544415[_0x31c4('0x41')]=_[_0x31c4('0x57')](_0x585582['query']);_0x544415['filters']=_[_0x31c4('0x43')](_0x544415[_0x31c4('0x3f')],_0x544415['query']);_0x101dc5[_0x31c4('0x44')]=_[_0x31c4('0x43')](_0x544415[_0x31c4('0x3f')],qs['fields'](_0x585582[_0x31c4('0x41')][_0x31c4('0x45')]));_0x101dc5[_0x31c4('0x44')]=_0x101dc5[_0x31c4('0x44')][_0x31c4('0x46')]?_0x101dc5['attributes']:_0x544415[_0x31c4('0x3f')];_0x101dc5['order']=qs[_0x31c4('0x4a')](_0x585582[_0x31c4('0x41')][_0x31c4('0x4a')]);_0x101dc5[_0x31c4('0x4b')]=qs[_0x31c4('0x42')](_[_0x31c4('0x4c')](_0x585582[_0x31c4('0x41')],_0x544415[_0x31c4('0x42')]));if(_0x585582[_0x31c4('0x41')][_0x31c4('0x4d')]){_0x101dc5[_0x31c4('0x4b')]=_[_0x31c4('0x4e')](_0x101dc5['where'],{'$or':_['map'](_0x101dc5[_0x31c4('0x44')],function(_0x4a047f){var _0x49b7b7={};_0x49b7b7[_0x4a047f]={'$like':'%'+_0x585582['query']['filter']+'%'};return _0x49b7b7;})});}_0x101dc5=_[_0x31c4('0x4e')]({},_0x101dc5,_0x585582[_0x31c4('0x51')]);return _0x3e8d7c[_0x31c4('0x78')](_0x101dc5);}})[_0x31c4('0x30')](function(_0x45eb82){if(_0x45eb82){_0x131172=_0x45eb82[_0x31c4('0x46')];if(!_0x585582['query'][_0x31c4('0x47')](_0x31c4('0x48'))){_0x101dc5[_0x31c4('0x29')]=qs[_0x31c4('0x29')](_0x585582[_0x31c4('0x41')]['limit']);_0x101dc5[_0x31c4('0x27')]=qs['offset'](_0x585582[_0x31c4('0x41')][_0x31c4('0x27')]);}return _0x3e8d7c[_0x31c4('0x78')](_0x101dc5);}})['then'](function(_0x543eb2){if(_0x543eb2){return _0x543eb2?{'count':_0x131172,'rows':_0x543eb2}:null;}})['then'](respondWithResult(_0x3f4dce,null))[_0x31c4('0x24')](handleError(_0x3f4dce,null));};exports[_0x31c4('0x79')]=function(_0x5b7427,_0x13d7c2,_0x46d90f){var _0x197e47={'channel':_0x31c4('0x7a')};var _0x351448=[];var _0x4836c1=[];var _0x10baf2={};return db['WhatsappAccount'][_0x31c4('0x58')]({'where':{'id':_0x5b7427['params']['id']},'include':[{'model':db[_0x31c4('0x75')],'as':_0x31c4('0x7b')}]})[_0x31c4('0x30')](handleEntityNotFound(_0x13d7c2,null))[_0x31c4('0x30')](function(_0x5943bc){_0x197e47[_0x31c4('0x7c')]=_0x5943bc;_0x197e47[_0x31c4('0x7d')]=_[_0x31c4('0x7e')](_0x5943bc[_0x31c4('0x7b')],[_0x31c4('0x7f')],['asc']);if(_0x197e47[_0x31c4('0x7c')][_0x31c4('0x7b')]){delete _0x197e47[_0x31c4('0x7c')]['Applications'];}return db[_0x31c4('0x80')]['describe']();})['then'](function(_0x141211){if(!_0x141211){throw new db['Sequelize'][(_0x31c4('0x81'))](_0x31c4('0x82'));}_0x351448=_['difference'](_[_0x31c4('0x57')](_0x141211),[_0x31c4('0x83'),_0x31c4('0x84')]);_0x4836c1=_['difference'](_[_0x31c4('0x57')](_0x141211),['createdAt',_0x31c4('0x84'),_0x31c4('0x85'),_0x31c4('0x86')]);_0x197e47[_0x31c4('0x5a')]={'mapKey':_0x31c4('0x87')};if(_0x197e47[_0x31c4('0x7c')]['type']&&_0x197e47[_0x31c4('0x7c')][_0x31c4('0x4f')]==='twilio'){_0x197e47[_0x31c4('0x5a')][_0x31c4('0x88')]=_0x5b7427['body'][_0x31c4('0x89')][_0x31c4('0x8a')](_0x31c4('0x8b'),'');_0x197e47[_0x31c4('0x5a')][_0x31c4('0x5a')]=_0x5b7427[_0x31c4('0x5a')][_0x31c4('0x8c')];_0x197e47[_0x31c4('0x5a')][_0x31c4('0x8d')]=_0x5b7427[_0x31c4('0x5a')][_0x31c4('0x8e')];}if(_0x197e47[_0x31c4('0x5a')]['id']){delete _0x197e47[_0x31c4('0x5a')]['id'];}if(_['isNil'](_0x197e47[_0x31c4('0x5a')]['from'])){throw new db[(_0x31c4('0x8f'))][(_0x31c4('0x81'))](_0x31c4('0x90'));}if(_['isNil'](_0x197e47[_0x31c4('0x5a')][_0x31c4('0x5a')])||_0x197e47['body'][_0x31c4('0x5a')]===''){throw new db[(_0x31c4('0x8f'))][(_0x31c4('0x81'))](_0x31c4('0x91'));}if(_[_0x31c4('0x92')](_0x197e47['body'][_0x31c4('0x93')])){throw new db['Sequelize']['ValidationError'](_0x31c4('0x94')+_0x4836c1);}if(!_[_0x31c4('0x95')](_0x4836c1,_0x197e47['body'][_0x31c4('0x93')])){throw new db[(_0x31c4('0x8f'))][(_0x31c4('0x81'))](_0x31c4('0x96')+_0x4836c1);}_0x10baf2[_0x197e47['body']['mapKey']]=_0x197e47[_0x31c4('0x5a')][_0x31c4('0x88')];return db[_0x31c4('0x97')][_0x31c4('0x58')]({'where':{'id':_0x197e47[_0x31c4('0x7c')][_0x31c4('0x86')]},'include':[{'model':db['CmContact'],'as':_0x31c4('0x98'),'where':_0x10baf2,'limit':0x1,'order':[[_0x31c4('0x84'),_0x31c4('0x99')]]}]});})[_0x31c4('0x30')](handleEntityNotFound(_0x13d7c2,null))[_0x31c4('0x30')](function(_0x510e70){if(_0x510e70){_0x197e47['list']=_['omit'](_0x510e70,[_0x31c4('0x98')]);if(_0x510e70[_0x31c4('0x98')]['length']){return _0x510e70['Contacts'][0x0];}var _0x22ee96=_['defaults'](_0x197e47[_0x31c4('0x5a')],{'firstName':_0x197e47['body'][_0x31c4('0x88')],'ListId':_0x510e70['id']});_0x22ee96[_0x197e47[_0x31c4('0x5a')][_0x31c4('0x93')]]=_0x197e47['body'][_0x31c4('0x88')];return db[_0x31c4('0x80')][_0x31c4('0x59')](_0x22ee96,{'fields':_0x351448,'raw':!![]});}})[_0x31c4('0x30')](handleEntityNotFound(_0x13d7c2,null))[_0x31c4('0x30')](function(_0x322009){if(_0x322009){_0x197e47[_0x31c4('0x9a')]=_0x322009;var _0xc640={'ContactId':_0x322009['id'],'phone':_0x197e47[_0x31c4('0x5a')][_0x31c4('0x88')],'WhatsappAccountId':_0x5b7427[_0x31c4('0x60')]['id']};var _0x537018={'ContactId':_0x322009['id'],'WhatsappAccountId':_0x5b7427[_0x31c4('0x60')]['id'],'closed':![]};return db[_0x31c4('0x9b')][_0x31c4('0x58')]({'where':_0x537018})[_0x31c4('0x30')](function(_0x5d0d3e){if(_0x5d0d3e){return[_0x5d0d3e,![]];}return db['WhatsappInteraction'][_0x31c4('0x59')](_0xc640)['then'](function(_0x15f570){return[_0x15f570,!![]];});});}})[_0x31c4('0x6c')](function(_0x3a6c46,_0x5a2333){_0x197e47[_0x31c4('0x9c')]=_0x3a6c46[_0x31c4('0x32')]({'plain':!![]});_0x197e47['interaction']['created']=![];if(_0x5a2333){if(_0x197e47['account'][_0x31c4('0x9d')]){_0x197e47[_0x31c4('0x7d')][_0x31c4('0x9e')]({'id':0x0,'priority':_0x197e47[_0x31c4('0x7d')]['length']+0x1,'app':'close','appdata':_0x31c4('0x9f'),'interval':_0x31c4('0xa0')});}_0x197e47[_0x31c4('0x9c')][_0x31c4('0xa1')]=!![];}return db[_0x31c4('0xa2')][_0x31c4('0x59')]({'phone':_0x197e47[_0x31c4('0x5a')][_0x31c4('0x88')],'messageId':_0x197e47[_0x31c4('0x5a')][_0x31c4('0x8d')],'body':_0x197e47['body'][_0x31c4('0x5a')],'WhatsappAccountId':_0x5b7427[_0x31c4('0x60')]['id'],'WhatsappInteractionId':_0x3a6c46['id'],'direction':'in','ContactId':_0x3a6c46[_0x31c4('0xa3')],'AttachmentId':_0x197e47['body'][_0x31c4('0xa4')]});})[_0x31c4('0x30')](function(_0x5c99be){_0x197e47[_0x31c4('0x23')]=_0x5c99be;if(_0x197e47[_0x31c4('0x9c')]['UserId']){return db[_0x31c4('0xa5')]['find']({'attributes':['id',_0x31c4('0x36')],'where':{'id':_0x197e47[_0x31c4('0x9c')][_0x31c4('0xa6')]}})['then'](function(_0x232453){if(_0x232453){_0x197e47[_0x31c4('0x7d')][_0x31c4('0xa7')]({'id':0x0,'priority':0x0,'app':_0x31c4('0xa8'),'appdata':_0x232453[_0x31c4('0x36')]+','+(_0x197e47[_0x31c4('0x7c')][_0x31c4('0xa9')]||0xa),'interval':_0x31c4('0xa0')});}return respondWithRpcPromise(_0x31c4('0xaa'),'startRouting',_0x197e47);});}return respondWithRpcPromise(_0x31c4('0xaa'),'startRouting',_0x197e47);})['then'](function(_0x30171c){if(_0x30171c){var _0x462c1c=0xc8;var _0x197904=_0x31c4('0xab');logger[_0x31c4('0x1c')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x197904,_0x462c1c,'entity\x20found');logger[_0x31c4('0x1e')](_0x31c4('0xac'),_0x197904,_0x462c1c,_0x31c4('0xad'),JSON['stringify'](_0x30171c));if(_0x197e47[_0x31c4('0x7c')]['type']===_0x31c4('0xae')){return _0x13d7c2['status'](_0x462c1c)[_0x31c4('0x2b')](_0x31c4('0xaf'),_0x31c4('0xb0'))[_0x31c4('0x37')]('\x0a');}else{return _0x13d7c2['status'](_0x462c1c)[_0x31c4('0x2c')](_0x30171c);}}})[_0x31c4('0x24')](handleError(_0x13d7c2,null));};exports[_0x31c4('0x37')]=function(_0x5995e4,_0x7538ce,_0x2a5885){var _0x2605d1,_0x5b2a99,_0x16cdca;if(_[_0x31c4('0x92')](_0x5995e4[_0x31c4('0x5a')]['body'])||_0x5995e4[_0x31c4('0x5a')][_0x31c4('0x5a')]===''){throw new db[(_0x31c4('0x8f'))]['ValidationError'](_0x31c4('0x91'));}if(_[_0x31c4('0x92')](_0x5995e4[_0x31c4('0x5a')]['to'])){throw new db['Sequelize'][(_0x31c4('0x81'))](_0x31c4('0xb1'));}_0x2605d1=_0x5995e4[_0x31c4('0x5a')]['to'];return db[_0x31c4('0x3b')][_0x31c4('0x58')]({'where':{'id':_0x5995e4[_0x31c4('0x60')]['id']},'include':[{'model':db[_0x31c4('0x97')],'as':_0x31c4('0xb2'),'include':[{'model':db[_0x31c4('0x80')],'as':_0x31c4('0x98'),'where':{'mobile':_0x2605d1},'limit':0x1,'order':[[_0x31c4('0x84'),'DESC']]}]}]})[_0x31c4('0x30')](handleEntityNotFound(_0x7538ce,null))[_0x31c4('0x30')](function(_0x332513){if(_0x332513&&_0x332513[_0x31c4('0xb2')]){_0x5b2a99=_0x332513[_0x31c4('0x32')]({'plain':!![]});if(_0x5b2a99['List']&&_0x5b2a99[_0x31c4('0xb2')][_0x31c4('0x98')][_0x31c4('0x46')]){return _0x5b2a99[_0x31c4('0xb2')][_0x31c4('0x98')][0x0];}return db[_0x31c4('0x80')][_0x31c4('0x59')](_['defaults'](_0x5995e4[_0x31c4('0x5a')],{'firstName':_0x2605d1,'mobile':_0x2605d1,'phone':_0x2605d1,'ListId':_0x5b2a99[_0x31c4('0x86')]}));}})['then'](handleEntityNotFound(_0x7538ce,null))[_0x31c4('0x30')](function(_0x386b91){if(_0x386b91){_0x16cdca=_0x386b91;return db['WhatsappInteraction'][_0x31c4('0x58')]({'where':{'ContactId':_0x16cdca['id'],'closed':![],'WhatsappAccountId':_0x5b2a99['id']}})['then'](function(_0x1ecf30){if(_0x1ecf30){return[_0x1ecf30,![]];}return db[_0x31c4('0x9b')]['create']({'UserId':_0x5995e4[_0x31c4('0x5b')]['id'],'ContactId':_0x16cdca['id'],'WhatsappAccountId':_0x5b2a99['id'],'phone':_0x2605d1,'firstMsgDirection':_0x31c4('0xb3'),'Messages':[_['merge'](_0x5995e4[_0x31c4('0x5a')],{'read':![],'body':_0x5995e4[_0x31c4('0x5a')]['body'],'phone':_0x2605d1,'WhatsappAccountId':_0x5b2a99['id'],'UserId':_0x5995e4[_0x31c4('0x5b')]['id'],'ContactId':_0x16cdca['id']})]},{'include':[{'model':db[_0x31c4('0xa2')],'as':_0x31c4('0xb4')}]})[_0x31c4('0x30')](function(_0x3e5231){return[_0x3e5231,!![]];});});}})[_0x31c4('0x6c')](function(_0x3eac0d,_0x1a7053){if(_0x1a7053){return _0x3eac0d;}return db['WhatsappMessage'][_0x31c4('0x59')](_[_0x31c4('0x4e')](_0x5995e4[_0x31c4('0x5a')],{'read':![],'body':_0x5995e4[_0x31c4('0x5a')][_0x31c4('0x5a')],'phone':_0x2605d1,'WhatsappAccountId':_0x5b2a99['id'],'WhatsappInteractionId':_0x3eac0d['id'],'UserId':_0x5995e4[_0x31c4('0x5b')]['id'],'ContactId':_0x16cdca['id']}))[_0x31c4('0x30')](function(_0x728d0c){_0x3eac0d[_0x31c4('0xb5')]['Messages']=[];_0x3eac0d['dataValues'][_0x31c4('0xb4')][_0x31c4('0x9e')](_0x728d0c[_0x31c4('0xb5')]);return _0x3eac0d;});})[_0x31c4('0x30')](respondWithResult(_0x7538ce,null))['catch'](handleError(_0x7538ce,null));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.events.js b/server/api/whatsappAccount/whatsappAccount.events.js index cd6cf57..5212215 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 _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 +var _0x13b5=['save','update','remove','emit','hook','events','WhatsappAccount'];(function(_0x46734d,_0x32f608){var _0x322b2e=function(_0x2deaec){while(--_0x2deaec){_0x46734d['push'](_0x46734d['shift']());}};_0x322b2e(++_0x32f608);}(_0x13b5,0x155));var _0x513b=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0x13b5[_0x36c5b0];return _0xf19333;};'use strict';var EventEmitter=require(_0x513b('0x0'));var WhatsappAccount=require('../../mysqldb')['db'][_0x513b('0x1')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x513b('0x2'),'afterUpdate':_0x513b('0x3'),'afterDestroy':_0x513b('0x4')};function emitEvent(_0x4d415c){return function(_0x4b54ae,_0x68c1ea,_0x1896e0){WhatsappAccountEvents[_0x513b('0x5')](_0x4d415c+':'+_0x4b54ae['id'],_0x4b54ae);WhatsappAccountEvents[_0x513b('0x5')](_0x4d415c,_0x4b54ae);_0x1896e0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappAccount[_0x513b('0x6')](e,emitEvent(event));}}module['exports']=WhatsappAccountEvents; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.model.js b/server/api/whatsappAccount/whatsappAccount.model.js index 4f7f0d4..91830a2 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 _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 +var _0xeca1=['bluebird','path','rimraf','../../config/environment','./whatsappAccount.attributes','exports','define','WhatsappAccount','whatsapp_accounts','lodash','util','../../config/logger','moment'];(function(_0x268d78,_0x3e2a05){var _0xe2414b=function(_0x4ecb5e){while(--_0x4ecb5e){_0x268d78['push'](_0x268d78['shift']());}};_0xe2414b(++_0x3e2a05);}(_0xeca1,0x1ea));var _0x1eca=function(_0x848f64,_0x3592d4){_0x848f64=_0x848f64-0x0;var _0x1d1236=_0xeca1[_0x848f64];return _0x1d1236;};'use strict';var _=require(_0x1eca('0x0'));var util=require(_0x1eca('0x1'));var logger=require(_0x1eca('0x2'))('api');var moment=require(_0x1eca('0x3'));var BPromise=require(_0x1eca('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1eca('0x5'));var rimraf=require(_0x1eca('0x6'));var config=require(_0x1eca('0x7'));var attributes=require(_0x1eca('0x8'));module[_0x1eca('0x9')]=function(_0x290d43,_0x27c882){return _0x290d43[_0x1eca('0xa')](_0x1eca('0xb'),attributes,{'tableName':_0x1eca('0xc'),'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 bdcb3e0..bef5086 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 _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 +var _0x9f9c=['attributes','include','map','model','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','http','defaults','redis','localhost','socket.io-emitter','./whatsappAccount.socket','request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','ShowWhatsappAccount','WhatsappAccount','find','options','raw','where'];(function(_0x21b71d,_0x27cca8){var _0x88e108=function(_0x436e75){while(--_0x436e75){_0x21b71d['push'](_0x21b71d['shift']());}};_0x88e108(++_0x27cca8);}(_0x9f9c,0x70));var _0xc9f9=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x9f9c[_0x2be8c2];return _0x97f531;};'use strict';var _=require('lodash');var util=require(_0xc9f9('0x0'));var moment=require(_0xc9f9('0x1'));var BPromise=require(_0xc9f9('0x2'));var rs=require(_0xc9f9('0x3'));var fs=require('fs');var Redis=require(_0xc9f9('0x4'));var db=require(_0xc9f9('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xc9f9('0x6'))(_0xc9f9('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc9f9('0x8')][_0xc9f9('0x9')]({'port':0x232a});config['redis']=_[_0xc9f9('0xa')](config[_0xc9f9('0xb')],{'host':_0xc9f9('0xc'),'port':0x18eb});var socket=require(_0xc9f9('0xd'))(new Redis(config['redis']));require(_0xc9f9('0xe'))['register'](socket);function respondWithRpcPromise(_0x2034dd,_0x1763e8,_0x6b8b41){return new BPromise(function(_0x187eeb,_0x771819){return client[_0xc9f9('0xf')](_0x2034dd,_0x6b8b41)[_0xc9f9('0x10')](function(_0x37d8f6){logger[_0xc9f9('0x11')](_0xc9f9('0x12'),_0x1763e8,_0xc9f9('0x13'));logger[_0xc9f9('0x14')](_0xc9f9('0x15'),_0x1763e8,'request\x20sent',JSON[_0xc9f9('0x16')](_0x37d8f6));if(_0x37d8f6[_0xc9f9('0x17')]){if(_0x37d8f6['error']['code']===0x1f4){logger['error']('WhatsappAccount,\x20%s,\x20%s',_0x1763e8,_0x37d8f6[_0xc9f9('0x17')]['message']);return _0x771819(_0x37d8f6[_0xc9f9('0x17')][_0xc9f9('0x18')]);}logger['error'](_0xc9f9('0x12'),_0x1763e8,_0x37d8f6['error'][_0xc9f9('0x18')]);return _0x187eeb(_0x37d8f6[_0xc9f9('0x17')][_0xc9f9('0x18')]);}else{logger['info'](_0xc9f9('0x12'),_0x1763e8,_0xc9f9('0x13'));_0x187eeb(_0x37d8f6['result']['message']);}})[_0xc9f9('0x19')](function(_0x13195f){logger[_0xc9f9('0x17')](_0xc9f9('0x12'),_0x1763e8,_0x13195f);_0x771819(_0x13195f);});});}exports[_0xc9f9('0x1a')]=function(_0x5ab651){var _0x544538=this;return new Promise(function(_0x47fbfa,_0x357559){return db[_0xc9f9('0x1b')][_0xc9f9('0x1c')]({'raw':_0x5ab651['options']?_0x5ab651[_0xc9f9('0x1d')][_0xc9f9('0x1e')]===undefined?!![]:![]:!![],'where':_0x5ab651[_0xc9f9('0x1d')]?_0x5ab651['options'][_0xc9f9('0x1f')]||null:null,'attributes':_0x5ab651[_0xc9f9('0x1d')]?_0x5ab651[_0xc9f9('0x1d')][_0xc9f9('0x20')]||null:null,'include':_0x5ab651['options']?_0x5ab651[_0xc9f9('0x1d')][_0xc9f9('0x21')]?_[_0xc9f9('0x22')](_0x5ab651['options'][_0xc9f9('0x21')],function(_0x3eb7db){return{'model':db[_0x3eb7db['model']],'as':_0x3eb7db['as'],'attributes':_0x3eb7db['attributes'],'include':_0x3eb7db['include']?_[_0xc9f9('0x22')](_0x3eb7db[_0xc9f9('0x21')],function(_0x30b02a){return{'model':db[_0x30b02a[_0xc9f9('0x23')]],'as':_0x30b02a['as'],'attributes':_0x30b02a[_0xc9f9('0x20')],'include':_0x30b02a[_0xc9f9('0x21')]?_[_0xc9f9('0x22')](_0x30b02a[_0xc9f9('0x21')],function(_0x493ce6){return{'model':db[_0x493ce6['model']],'as':_0x493ce6['as'],'attributes':_0x493ce6[_0xc9f9('0x20')]};}):[]};}):[]};}):[]:[]})[_0xc9f9('0x10')](function(_0x4dd754){logger[_0xc9f9('0x11')](_0xc9f9('0x1a'),_0x5ab651);logger[_0xc9f9('0x14')](_0xc9f9('0x1a'),_0x5ab651,JSON['stringify'](_0x4dd754));_0x47fbfa(_0x4dd754);})[_0xc9f9('0x19')](function(_0x575fa2){logger[_0xc9f9('0x17')](_0xc9f9('0x1a'),_0x575fa2['message'],_0x5ab651);_0x357559(_0x544538[_0xc9f9('0x17')](0x1f4,_0x575fa2[_0xc9f9('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.socket.js b/server/api/whatsappAccount/whatsappAccount.socket.js index b649360..04b2dd4 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 _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 +var _0xfef4=['remove','update','removeListener','register','length','whatsappAccount:','./whatsappAccount.events'];(function(_0x208d24,_0x797911){var _0x34962b=function(_0x1319c8){while(--_0x1319c8){_0x208d24['push'](_0x208d24['shift']());}};_0x34962b(++_0x797911);}(_0xfef4,0x13a));var _0x4fef=function(_0x47cfa0,_0x176b87){_0x47cfa0=_0x47cfa0-0x0;var _0x386b1d=_0xfef4[_0x47cfa0];return _0x386b1d;};'use strict';var WhatsappAccountEvents=require(_0x4fef('0x0'));var events=['save',_0x4fef('0x1'),_0x4fef('0x2')];function createListener(_0x3a3762,_0x402285){return function(_0x4ab3f7){_0x402285['emit'](_0x3a3762,_0x4ab3f7);};}function removeListener(_0x236b1a,_0x42f8f6){return function(){WhatsappAccountEvents[_0x4fef('0x3')](_0x236b1a,_0x42f8f6);};}exports[_0x4fef('0x4')]=function(_0x297b7c){for(var _0x427e97=0x0,_0xc07506=events[_0x4fef('0x5')];_0x427e97<_0xc07506;_0x427e97++){var _0x355530=events[_0x427e97];var _0x1c5d21=createListener(_0x4fef('0x6')+_0x355530,_0x297b7c);WhatsappAccountEvents['on'](_0x355530,_0x1c5d21);}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/index.js b/server/api/whatsappApplication/index.js index 1bf548a..52a9c9f 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 _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 +var _0xd184=['delete','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./whatsappApplication.controller','get','isAuthenticated','/:id','post','create','put','update'];(function(_0x116add,_0x152915){var _0x5b2f62=function(_0x2c2a33){while(--_0x2c2a33){_0x116add['push'](_0x116add['shift']());}};_0x5b2f62(++_0x152915);}(_0xd184,0x111));var _0x4d18=function(_0x85a243,_0x37d8b6){_0x85a243=_0x85a243-0x0;var _0x206af6=_0xd184[_0x85a243];return _0x206af6;};'use strict';var multer=require(_0x4d18('0x0'));var util=require('util');var path=require(_0x4d18('0x1'));var timeout=require('connect-timeout');var express=require(_0x4d18('0x2'));var router=express[_0x4d18('0x3')]();var fs_extra=require(_0x4d18('0x4'));var auth=require(_0x4d18('0x5'));var interaction=require(_0x4d18('0x6'));var config=require('../../config/environment');var controller=require(_0x4d18('0x7'));router[_0x4d18('0x8')]('/',auth[_0x4d18('0x9')](),controller['index']);router[_0x4d18('0x8')](_0x4d18('0xa'),auth[_0x4d18('0x9')](),controller['show']);router[_0x4d18('0xb')]('/',auth[_0x4d18('0x9')](),controller[_0x4d18('0xc')]);router[_0x4d18('0xd')]('/:id',auth['isAuthenticated'](),controller[_0x4d18('0xe')]);router[_0x4d18('0xf')](_0x4d18('0xa'),auth[_0x4d18('0x9')](),controller[_0x4d18('0x10')]);module[_0x4d18('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 219c938..0b2cf28 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 _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 +var _0x0a4b=['noop','TEXT','*,*,*,*','sequelize','STRING'];(function(_0xd2680,_0x1fe326){var _0x557928=function(_0x4aa283){while(--_0x4aa283){_0xd2680['push'](_0xd2680['shift']());}};_0x557928(++_0x1fe326);}(_0x0a4b,0x1cf));var _0xb0a4=function(_0x34b6a5,_0x4cd9c1){_0x34b6a5=_0x34b6a5-0x0;var _0x2e2d25=_0x0a4b[_0x34b6a5];return _0x2e2d25;};'use strict';var Sequelize=require(_0xb0a4('0x0'));module['exports']={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0xb0a4('0x1')],'allowNull':![],'defaultValue':_0xb0a4('0x2')},'appdata':{'type':Sequelize[_0xb0a4('0x3')]()},'description':{'type':Sequelize[_0xb0a4('0x1')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0xb0a4('0x4')}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.controller.js b/server/api/whatsappApplication/whatsappApplication.controller.js index ff9252d..02d07ca 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 _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 +var _0x9d56=['../../config/utils','../../config/license/util','../../mysqldb','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','save','update','then','destroy','sendStatus','error','name','map','WhatsappApplication','rawAttributes','fieldName','type','key','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','include','findAll','rows','catch','show','keys','includeAll','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','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/logger','api'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x9d56,0x122));var _0x69d5=function(_0x541244,_0x15dcf1){_0x541244=_0x541244-0x0;var _0x1a68dc=_0x9d56[_0x541244];return _0x1a68dc;};'use strict';var emlformat=require(_0x69d5('0x0'));var rimraf=require(_0x69d5('0x1'));var zipdir=require(_0x69d5('0x2'));var jsonpatch=require(_0x69d5('0x3'));var rp=require('request-promise');var moment=require(_0x69d5('0x4'));var BPromise=require(_0x69d5('0x5'));var Mustache=require(_0x69d5('0x6'));var util=require(_0x69d5('0x7'));var path=require(_0x69d5('0x8'));var sox=require('sox');var csv=require(_0x69d5('0x9'));var ejs=require(_0x69d5('0xa'));var fs=require('fs');var fs_extra=require(_0x69d5('0xb'));var _=require(_0x69d5('0xc'));var squel=require(_0x69d5('0xd'));var crypto=require(_0x69d5('0xe'));var jsforce=require(_0x69d5('0xf'));var deskjs=require(_0x69d5('0x10'));var toCsv=require(_0x69d5('0x9'));var querystring=require(_0x69d5('0x11'));var Papa=require(_0x69d5('0x12'));var Redis=require(_0x69d5('0x13'));var authService=require(_0x69d5('0x14'));var qs=require(_0x69d5('0x15'));var as=require(_0x69d5('0x16'));var hardwareService=require(_0x69d5('0x17'));var logger=require(_0x69d5('0x18'))(_0x69d5('0x19'));var utils=require(_0x69d5('0x1a'));var config=require('../../config/environment');var licenseUtil=require(_0x69d5('0x1b'));var db=require(_0x69d5('0x1c'))['db'];function respondWithStatusCode(_0x2cc733,_0x4641a7){_0x4641a7=_0x4641a7||0xcc;return function(_0x1c34d9){if(_0x1c34d9){return _0x2cc733['sendStatus'](_0x4641a7);}return _0x2cc733[_0x69d5('0x1d')](_0x4641a7)[_0x69d5('0x1e')]();};}function respondWithResult(_0x263954,_0x134e84){_0x134e84=_0x134e84||0xc8;return function(_0x56843c){if(_0x56843c){return _0x263954['status'](_0x134e84)['json'](_0x56843c);}};}function respondWithFilteredResult(_0x279ce5,_0x33cf2e){return function(_0x56bbbc){if(_0x56bbbc){var _0x28492b=typeof _0x33cf2e[_0x69d5('0x1f')]==='undefined'&&typeof _0x33cf2e[_0x69d5('0x20')]===_0x69d5('0x21');var _0x304417=_0x56bbbc[_0x69d5('0x22')];var _0x16e628=_0x28492b?0x0:_0x33cf2e[_0x69d5('0x1f')];var _0x6763ac=_0x28492b?_0x56bbbc[_0x69d5('0x22')]:_0x33cf2e['offset']+_0x33cf2e[_0x69d5('0x20')];var _0x16c02c;if(_0x6763ac>=_0x304417){_0x6763ac=_0x304417;_0x16c02c=0xc8;}else{_0x16c02c=0xce;}_0x279ce5[_0x69d5('0x1d')](_0x16c02c);return _0x279ce5[_0x69d5('0x23')](_0x69d5('0x24'),_0x16e628+'-'+_0x6763ac+'/'+_0x304417)[_0x69d5('0x25')](_0x56bbbc);}return null;};}function patchUpdates(_0x1f9ed7){return function(_0xc557e3){try{jsonpatch[_0x69d5('0x26')](_0xc557e3,_0x1f9ed7,!![]);}catch(_0x497c1a){return BPromise['reject'](_0x497c1a);}return _0xc557e3[_0x69d5('0x27')]();};}function saveUpdates(_0x3fc1a4,_0xa81fe0){return function(_0x1558b6){if(_0x1558b6){return _0x1558b6[_0x69d5('0x28')](_0x3fc1a4)[_0x69d5('0x29')](function(_0x1ec0d3){return _0x1ec0d3;});}return null;};}function removeEntity(_0x22e984,_0x23ee57){return function(_0x49b3f5){if(_0x49b3f5){return _0x49b3f5[_0x69d5('0x2a')]()[_0x69d5('0x29')](function(){_0x22e984[_0x69d5('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2e1d8d,_0x53ea6e){return function(_0x5e27e7){if(!_0x5e27e7){_0x2e1d8d[_0x69d5('0x2b')](0x194);}return _0x5e27e7;};}function handleError(_0x49b94f,_0x27ffd8){_0x27ffd8=_0x27ffd8||0x1f4;return function(_0x7636f2){logger[_0x69d5('0x2c')](_0x7636f2['stack']);if(_0x7636f2[_0x69d5('0x2d')]){delete _0x7636f2[_0x69d5('0x2d')];}_0x49b94f[_0x69d5('0x1d')](_0x27ffd8)['send'](_0x7636f2);};}exports['index']=function(_0x3f0ced,_0x41173f){var _0x2892a6={},_0x4d8fb={},_0xf4edd9={'count':0x0,'rows':[]};var _0x4d961f=_[_0x69d5('0x2e')](db[_0x69d5('0x2f')][_0x69d5('0x30')],function(_0x252f43){return{'name':_0x252f43[_0x69d5('0x31')],'type':_0x252f43[_0x69d5('0x32')][_0x69d5('0x33')]};});_0x4d8fb[_0x69d5('0x34')]=_['map'](_0x4d961f,_0x69d5('0x2d'));_0x4d8fb[_0x69d5('0x35')]=_['keys'](_0x3f0ced[_0x69d5('0x35')]);_0x4d8fb['filters']=_[_0x69d5('0x36')](_0x4d8fb[_0x69d5('0x34')],_0x4d8fb[_0x69d5('0x35')]);_0x2892a6['attributes']=_[_0x69d5('0x36')](_0x4d8fb[_0x69d5('0x34')],qs['fields'](_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x37')]));_0x2892a6[_0x69d5('0x38')]=_0x2892a6['attributes'][_0x69d5('0x39')]?_0x2892a6[_0x69d5('0x38')]:_0x4d8fb[_0x69d5('0x34')];if(!_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x3a')](_0x69d5('0x3b'))){_0x2892a6[_0x69d5('0x20')]=qs[_0x69d5('0x20')](_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x20')]);_0x2892a6[_0x69d5('0x1f')]=qs[_0x69d5('0x1f')](_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x1f')]);}_0x2892a6[_0x69d5('0x3c')]=qs[_0x69d5('0x3d')](_0x3f0ced[_0x69d5('0x35')]['sort']);_0x2892a6[_0x69d5('0x3e')]=qs[_0x69d5('0x3f')](_[_0x69d5('0x40')](_0x3f0ced['query'],_0x4d8fb[_0x69d5('0x3f')]),_0x4d961f);if(_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x41')]){_0x2892a6['where']=_[_0x69d5('0x42')](_0x2892a6['where'],{'$or':_[_0x69d5('0x2e')](_0x4d961f,function(_0x1ae187){if(_0x1ae187[_0x69d5('0x32')]!=='VIRTUAL'){var _0x45ca18={};_0x45ca18[_0x1ae187[_0x69d5('0x2d')]]={'$like':'%'+_0x3f0ced[_0x69d5('0x35')][_0x69d5('0x41')]+'%'};return _0x45ca18;}})});}_0x2892a6=_['merge']({},_0x2892a6,_0x3f0ced[_0x69d5('0x43')]);var _0x661bca={'where':_0x2892a6[_0x69d5('0x3e')]};return db[_0x69d5('0x2f')][_0x69d5('0x22')](_0x661bca)[_0x69d5('0x29')](function(_0x51a8f1){_0xf4edd9[_0x69d5('0x22')]=_0x51a8f1;if(_0x3f0ced['query']['includeAll']){_0x2892a6[_0x69d5('0x44')]=[{'all':!![]}];}return db[_0x69d5('0x2f')][_0x69d5('0x45')](_0x2892a6);})[_0x69d5('0x29')](function(_0xa93202){_0xf4edd9[_0x69d5('0x46')]=_0xa93202;return _0xf4edd9;})[_0x69d5('0x29')](respondWithFilteredResult(_0x41173f,_0x2892a6))[_0x69d5('0x47')](handleError(_0x41173f,null));};exports[_0x69d5('0x48')]=function(_0x23527b,_0x13075d){var _0x5d2ba2={'raw':!![],'where':{'id':_0x23527b['params']['id']}},_0x4cf243={};_0x4cf243['model']=_[_0x69d5('0x49')](db[_0x69d5('0x2f')][_0x69d5('0x30')]);_0x4cf243[_0x69d5('0x35')]=_[_0x69d5('0x49')](_0x23527b[_0x69d5('0x35')]);_0x4cf243['filters']=_['intersection'](_0x4cf243[_0x69d5('0x34')],_0x4cf243[_0x69d5('0x35')]);_0x5d2ba2[_0x69d5('0x38')]=_[_0x69d5('0x36')](_0x4cf243[_0x69d5('0x34')],qs[_0x69d5('0x37')](_0x23527b[_0x69d5('0x35')][_0x69d5('0x37')]));_0x5d2ba2['attributes']=_0x5d2ba2['attributes'][_0x69d5('0x39')]?_0x5d2ba2[_0x69d5('0x38')]:_0x4cf243[_0x69d5('0x34')];if(_0x23527b[_0x69d5('0x35')][_0x69d5('0x4a')]){_0x5d2ba2[_0x69d5('0x44')]=[{'all':!![]}];}_0x5d2ba2=_['merge']({},_0x5d2ba2,_0x23527b['options']);return db[_0x69d5('0x2f')][_0x69d5('0x4b')](_0x5d2ba2)[_0x69d5('0x29')](handleEntityNotFound(_0x13075d,null))[_0x69d5('0x29')](respondWithResult(_0x13075d,null))[_0x69d5('0x47')](handleError(_0x13075d,null));};exports[_0x69d5('0x4c')]=function(_0x37a47e,_0x173e85){return db[_0x69d5('0x2f')][_0x69d5('0x4c')](_0x37a47e['body'],{})[_0x69d5('0x29')](respondWithResult(_0x173e85,0xc9))[_0x69d5('0x47')](handleError(_0x173e85,null));};exports[_0x69d5('0x28')]=function(_0x4497b4,_0x1a4ed4){if(_0x4497b4['body']['id']){delete _0x4497b4[_0x69d5('0x4d')]['id'];}return db['WhatsappApplication'][_0x69d5('0x4b')]({'where':{'id':_0x4497b4[_0x69d5('0x4e')]['id']}})[_0x69d5('0x29')](handleEntityNotFound(_0x1a4ed4,null))['then'](saveUpdates(_0x4497b4[_0x69d5('0x4d')],null))[_0x69d5('0x29')](respondWithResult(_0x1a4ed4,null))[_0x69d5('0x47')](handleError(_0x1a4ed4,null));};exports[_0x69d5('0x2a')]=function(_0x153ca4,_0x5266ce){return db[_0x69d5('0x2f')][_0x69d5('0x4b')]({'where':{'id':_0x153ca4[_0x69d5('0x4e')]['id']}})[_0x69d5('0x29')](handleEntityNotFound(_0x5266ce,null))[_0x69d5('0x29')](removeEntity(_0x5266ce,null))[_0x69d5('0x47')](handleError(_0x5266ce,null));}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.model.js b/server/api/whatsappApplication/whatsappApplication.model.js index 02b9c8c..9133f92 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 _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 +var _0xf987=['define','WhatsappApplication','whatsapp_applications','utf8mb4_unicode_ci','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappApplication.attributes','exports'];(function(_0x48e13c,_0x1441c4){var _0x107d78=function(_0x1b9c11){while(--_0x1b9c11){_0x48e13c['push'](_0x48e13c['shift']());}};_0x107d78(++_0x1441c4);}(_0xf987,0x18a));var _0x7f98=function(_0x1b248f,_0x2551b4){_0x1b248f=_0x1b248f-0x0;var _0x46845c=_0xf987[_0x1b248f];return _0x46845c;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x7f98('0x0'))(_0x7f98('0x1'));var moment=require('moment');var BPromise=require(_0x7f98('0x2'));var rp=require(_0x7f98('0x3'));var fs=require('fs');var path=require(_0x7f98('0x4'));var rimraf=require(_0x7f98('0x5'));var config=require(_0x7f98('0x6'));var attributes=require(_0x7f98('0x7'));module[_0x7f98('0x8')]=function(_0x3b5abb,_0x3fb8e2){return _0x3b5abb[_0x7f98('0x9')](_0x7f98('0xa'),attributes,{'tableName':_0x7f98('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x7f98('0xc')});}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.rpc.js b/server/api/whatsappApplication/whatsappApplication.rpc.js index c1616e8..f8f3213 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 _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 +var _0x70e0=['code','WhatsappApplication,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','then','info','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x46a2f5,_0x3dc400){var _0x1cb251=function(_0x34d818){while(--_0x34d818){_0x46a2f5['push'](_0x46a2f5['shift']());}};_0x1cb251(++_0x3dc400);}(_0x70e0,0x17b));var _0x070e=function(_0x40c082,_0x18e419){_0x40c082=_0x40c082-0x0;var _0x9c03f7=_0x70e0[_0x40c082];return _0x9c03f7;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var moment=require(_0x070e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x070e('0x3'));var db=require(_0x070e('0x4'))['db'];var utils=require(_0x070e('0x5'));var logger=require(_0x070e('0x6'))('rpc');var config=require(_0x070e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x070e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x56e420,_0x5032e5,_0x35ab0c){return new BPromise(function(_0x1e11f0,_0x604664){return client[_0x070e('0x9')](_0x56e420,_0x35ab0c)[_0x070e('0xa')](function(_0x68a09e){logger[_0x070e('0xb')]('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,'request\x20sent');logger[_0x070e('0xc')](_0x070e('0xd'),_0x5032e5,_0x070e('0xe'),JSON[_0x070e('0xf')](_0x68a09e));if(_0x68a09e[_0x070e('0x10')]){if(_0x68a09e[_0x070e('0x10')][_0x070e('0x11')]===0x1f4){logger[_0x070e('0x10')](_0x070e('0x12'),_0x5032e5,_0x68a09e[_0x070e('0x10')][_0x070e('0x13')]);return _0x604664(_0x68a09e['error']['message']);}logger[_0x070e('0x10')]('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,_0x68a09e['error']['message']);return _0x1e11f0(_0x68a09e[_0x070e('0x10')][_0x070e('0x13')]);}else{logger['info']('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,_0x070e('0xe'));_0x1e11f0(_0x68a09e[_0x070e('0x14')][_0x070e('0x13')]);}})[_0x070e('0x15')](function(_0x5bc71e){logger['error'](_0x070e('0x12'),_0x5032e5,_0x5bc71e);_0x604664(_0x5bc71e);});});} \ No newline at end of file diff --git a/server/api/whatsappInteraction/index.js b/server/api/whatsappInteraction/index.js index 5b04b03..219d00c 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 _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 +var _0x5d58=['create','/:id/tags','tracked','whatsapp','whatsappinteraction:addtags','addTags','whatsappinteraction:update','update','delete','whatsappinteraction:destroy','destroy','removeTags','exports','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show','/:id/messages','/:id/download','download','post'];(function(_0x2fcdbe,_0x27f901){var _0x28ced4=function(_0x5d809f){while(--_0x5d809f){_0x2fcdbe['push'](_0x2fcdbe['shift']());}};_0x28ced4(++_0x27f901);}(_0x5d58,0x187));var _0x85d5=function(_0x5b2e85,_0x406ac1){_0x5b2e85=_0x5b2e85-0x0;var _0x4c86b8=_0x5d58[_0x5b2e85];return _0x4c86b8;};'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[_0x85d5('0x0')]();var fs_extra=require(_0x85d5('0x1'));var auth=require('../../components/auth/service');var interaction=require(_0x85d5('0x2'));var config=require(_0x85d5('0x3'));var controller=require('./whatsappInteraction.controller');router[_0x85d5('0x4')]('/',auth[_0x85d5('0x5')](),controller[_0x85d5('0x6')]);router[_0x85d5('0x4')]('/describe',auth[_0x85d5('0x5')](),controller[_0x85d5('0x7')]);router['get'](_0x85d5('0x8'),auth['isAuthenticated'](),controller[_0x85d5('0x9')]);router[_0x85d5('0x4')](_0x85d5('0xa'),auth['isAuthenticated'](),controller['getMessages']);router['get'](_0x85d5('0xb'),auth[_0x85d5('0x5')](),controller[_0x85d5('0xc')]);router[_0x85d5('0xd')]('/',auth[_0x85d5('0x5')](),controller[_0x85d5('0xe')]);router[_0x85d5('0xd')]('/:id/messages',auth['isAuthenticated'](),controller['addMessage']);router[_0x85d5('0xd')](_0x85d5('0xf'),auth[_0x85d5('0x5')](),interaction[_0x85d5('0x10')](_0x85d5('0x11'),_0x85d5('0x12')),controller[_0x85d5('0x13')]);router['put'](_0x85d5('0x8'),auth[_0x85d5('0x5')](),interaction[_0x85d5('0x10')](_0x85d5('0x11'),_0x85d5('0x14')),controller[_0x85d5('0x15')]);router[_0x85d5('0x16')](_0x85d5('0x8'),auth[_0x85d5('0x5')](),interaction[_0x85d5('0x10')](_0x85d5('0x11'),_0x85d5('0x17')),controller[_0x85d5('0x18')]);router[_0x85d5('0x16')](_0x85d5('0xf'),auth[_0x85d5('0x5')](),controller[_0x85d5('0x19')]);module[_0x85d5('0x1a')]=router; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.attributes.js b/server/api/whatsappInteraction/whatsappInteraction.attributes.js index 8ba21a8..b48b841 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 _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 +var _0x1bce=['STRING','ENUM','out','sequelize','moment','BOOLEAN','DATE'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0x1bce,0x73));var _0xe1bc=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x1bce[_0x2641f9];return _0x585741;};'use strict';var Sequelize=require(_0xe1bc('0x0'));var moment=require(_0xe1bc('0x1'));module['exports']={'closed':{'type':Sequelize[_0xe1bc('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xe1bc('0x3')]},'disposition':{'type':Sequelize[_0xe1bc('0x4')]},'secondDisposition':{'type':Sequelize[_0xe1bc('0x4')]},'thirdDisposition':{'type':Sequelize[_0xe1bc('0x4')]},'note':{'type':Sequelize[_0xe1bc('0x4')]},'phone':{'type':Sequelize[_0xe1bc('0x4')]},'read1stAt':{'type':Sequelize[_0xe1bc('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xe1bc('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xe1bc('0x5')]('in',_0xe1bc('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xe1bc('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.controller.js b/server/api/whatsappInteraction/whatsappInteraction.controller.js index 71471ba..52186bb 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 _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 +var _0x6fad=['unreadMessages','value','having','`\x20=\x200','Contact','$substring','ContactId','text','start','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','User','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','find','UserId','body','buildExpression','compact','i.WhatsappAccountId\x20IN\x20?','concat','parse','$gte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','\x20=\x20?','read','`unreadMessages`\x20=\x200','`unreadMessages`\x20>\x200','tag','isArray','filter','replace','isNumeric','i.id\x20LIKE\x20?','i.phone\x20LIKE\x20?','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','CONCAT(c.firstName,\x20\x27\x20\x27,\x20c.lastName)\x20LIKE\x20?','i.id','Sequelize','QueryTypes','SELECT','clone','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','contactName','isEmpty','t.id\x20IN\x20?','resolve','i.WhatsappAccountId\x20IS\x20NOT\x20NULL','role','agent','user','getWhatsappAccounts','i.WhatsappAccountId\x20IS\x20NULL','WhatsappAccountId','sequelize','toString','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.email','c.phone','c.mobile','Contact.mobile','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','ui.WhatsappInteractionId\x20IN\x20?','groupBy','WhatsappInteractionId','all','rows','catch','params','rawAttributes','include','options','create','destroy','WhatsappMessage','addMessage','ids','omit','getMessages','findOne','hasOwnProperty','YYYY-MM-DD\x20HH:mm:ss','includeAll','setTags','spread','Tag','findAll','emit','removeTags','download','join','root','server','files','tmp','attachments','format','transcript-%d-%s.zip','CmContact','firstName','Attachment','Messages','direction','secret','Account','Owner','mkdirSync','Whatsapp','N.A.','closed','closedAt','disposition','createReadStream','pipe','basename','createdAt','System','lastName','renderFile','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','log','unlinkSync','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/export/pdf','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','localhost','socket.io-emitter','./whatsappInteraction.socket','register','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','update','then','sendStatus','error','name','send','Users','map','fullname','Tags','TagIds','split','forEach','push','WhatsappInteraction','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','field','color','from','tools_tags','u.id','ui.WhatsappInteractionId','users','u.id\x20=\x20ui.UserId','whatsapp_interactions','left_join','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','whatsapp_accounts','a.id\x20=\x20i.WhatsappAccountId','whatsapp_messages','me.WhatsappInteractionId\x20=\x20i.id','whatsapp_interaction_has_tags','it.WhatsappInteractionId\x20=\x20i.id','expr','search','parseSearch','sqlOperator'];(function(_0x9d3f5e,_0x11c63e){var _0x2adb90=function(_0x3e5b3d){while(--_0x3e5b3d){_0x9d3f5e['push'](_0x9d3f5e['shift']());}};_0x2adb90(++_0x11c63e);}(_0x6fad,0x174));var _0xd6fa=function(_0x35eda9,_0x557d12){_0x35eda9=_0x35eda9-0x0;var _0x4c145b=_0x6fad[_0x35eda9];return _0x4c145b;};'use strict';var emlformat=require(_0xd6fa('0x0'));var rimraf=require(_0xd6fa('0x1'));var zipdir=require(_0xd6fa('0x2'));var jsonpatch=require(_0xd6fa('0x3'));var rp=require('request-promise');var moment=require(_0xd6fa('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd6fa('0x5'));var util=require(_0xd6fa('0x6'));var path=require(_0xd6fa('0x7'));var sox=require(_0xd6fa('0x8'));var csv=require('to-csv');var ejs=require(_0xd6fa('0x9'));var fs=require('fs');var fs_extra=require(_0xd6fa('0xa'));var _=require(_0xd6fa('0xb'));var squel=require(_0xd6fa('0xc'));var crypto=require('crypto');var jsforce=require(_0xd6fa('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd6fa('0xe'));var querystring=require(_0xd6fa('0xf'));var Papa=require(_0xd6fa('0x10'));var Redis=require(_0xd6fa('0x11'));var authService=require(_0xd6fa('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var pdf=require(_0xd6fa('0x13'));var hardwareService=require(_0xd6fa('0x14'));var logger=require(_0xd6fa('0x15'))(_0xd6fa('0x16'));var utils=require(_0xd6fa('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xd6fa('0x18'))['db'];config['redis']=_['defaults'](config[_0xd6fa('0x19')],{'host':_0xd6fa('0x1a'),'port':0x18eb});var socket=require(_0xd6fa('0x1b'))(new Redis(config[_0xd6fa('0x19')]));require(_0xd6fa('0x1c'))[_0xd6fa('0x1d')](socket);function respondWithStatusCode(_0x15616f,_0x3c810e){_0x3c810e=_0x3c810e||0xcc;return function(_0x45f777){if(_0x45f777){return _0x15616f['sendStatus'](_0x3c810e);}return _0x15616f[_0xd6fa('0x1e')](_0x3c810e)[_0xd6fa('0x1f')]();};}function respondWithResult(_0x3651ed,_0x313808){_0x313808=_0x313808||0xc8;return function(_0x47e70a){if(_0x47e70a){return _0x3651ed['status'](_0x313808)['json'](_0x47e70a);}};}function respondWithFilteredResult(_0x5c2a73,_0x4c44da){return function(_0xe458aa){if(_0xe458aa){var _0x51fbd0=typeof _0x4c44da[_0xd6fa('0x20')]==='undefined'&&typeof _0x4c44da[_0xd6fa('0x21')]===_0xd6fa('0x22');var _0x2ee97a=_0xe458aa[_0xd6fa('0x23')];var _0xf1b05a=_0x51fbd0?0x0:_0x4c44da[_0xd6fa('0x20')];var _0x45b20e=_0x51fbd0?_0xe458aa[_0xd6fa('0x23')]:_0x4c44da[_0xd6fa('0x20')]+_0x4c44da[_0xd6fa('0x21')];var _0x20159f;if(_0x45b20e>=_0x2ee97a){_0x45b20e=_0x2ee97a;_0x20159f=0xc8;}else{_0x20159f=0xce;}_0x5c2a73[_0xd6fa('0x1e')](_0x20159f);return _0x5c2a73[_0xd6fa('0x24')](_0xd6fa('0x25'),_0xf1b05a+'-'+_0x45b20e+'/'+_0x2ee97a)[_0xd6fa('0x26')](_0xe458aa);}return null;};}function patchUpdates(_0xd1637f){return function(_0x458529){try{jsonpatch[_0xd6fa('0x27')](_0x458529,_0xd1637f,!![]);}catch(_0x3fbab3){return BPromise['reject'](_0x3fbab3);}return _0x458529['save']();};}function saveUpdates(_0x3d3d7b,_0x30fc87){return function(_0x1b0bc8){if(_0x1b0bc8){return _0x1b0bc8[_0xd6fa('0x28')](_0x3d3d7b)[_0xd6fa('0x29')](function(_0xa3264f){return _0xa3264f;});}return null;};}function removeEntity(_0x5f25ca,_0x28173e){return function(_0x1af27c){if(_0x1af27c){return _0x1af27c['destroy']()[_0xd6fa('0x29')](function(){_0x5f25ca[_0xd6fa('0x1e')](0xcc)[_0xd6fa('0x1f')]();});}};}function handleEntityNotFound(_0x47b073,_0x242294){return function(_0x1be5fd){if(!_0x1be5fd){_0x47b073[_0xd6fa('0x2a')](0x194);}return _0x1be5fd;};}function handleError(_0x968568,_0x3c7a9e){_0x3c7a9e=_0x3c7a9e||0x1f4;return function(_0x198ad6){logger[_0xd6fa('0x2b')](_0x198ad6['stack']);if(_0x198ad6[_0xd6fa('0x2c')]){delete _0x198ad6['name'];}_0x968568[_0xd6fa('0x1e')](_0x3c7a9e)[_0xd6fa('0x2d')](_0x198ad6);};}function getInteractionUsers(_0x4be120,_0x3fc7f5){return new BPromise(function(_0x2caae7,_0x2cb3ca){try{if(_0x3fc7f5[_0x4be120['id']]){_0x4be120[_0xd6fa('0x2e')]=_[_0xd6fa('0x2f')](_0x3fc7f5[_0x4be120['id']],function(_0x3b0bab){return{'id':_0x3b0bab['id'],'fullname':_0x3b0bab[_0xd6fa('0x30')]};});}}catch(_0x1e3de4){_0x2cb3ca(_0x1e3de4);}_0x2caae7(_0x4be120);});}function getInteractionTags(_0x3d7886,_0x578ee2){return new BPromise(function(_0x168269,_0x1072ec){try{if(_0x3d7886['TagIds']){_0x3d7886[_0xd6fa('0x31')]=[];_0x3d7886[_0xd6fa('0x32')][_0xd6fa('0x33')](',')[_0xd6fa('0x34')](function(_0x11bc59){_0x3d7886[_0xd6fa('0x31')][_0xd6fa('0x35')](_0x578ee2[_0x11bc59]);});}delete _0x3d7886[_0xd6fa('0x32')];}catch(_0x2d6058){_0x1072ec(_0x2d6058);}_0x168269(_0x3d7886);});}function updateWhatsappInteraction(_0x2899c2,_0xd6c949,_0x507ae5){return new BPromise(function(_0x2d934d,_0x4979f6){return getInteractionUsers(_0x2899c2,_0x507ae5)[_0xd6fa('0x29')](function(_0x526960){return getInteractionTags(_0x526960,_0xd6c949);})[_0xd6fa('0x29')](function(_0x437fbf){_0x2d934d(_0x437fbf);})['catch'](function(_0x84e6d4){_0x4979f6(_0x84e6d4);});});}exports['index']=function(_0xdaee97,_0x1e7f70){var _0x338424={},_0x55ee38={},_0x55962b={'count':0x0,'rows':[]};var _0x43ecc6=_[_0xd6fa('0x2f')](db[_0xd6fa('0x36')]['rawAttributes'],function(_0x477612){return{'name':_0x477612[_0xd6fa('0x37')],'type':_0x477612[_0xd6fa('0x38')][_0xd6fa('0x39')]};});_0x55ee38[_0xd6fa('0x3a')]=_[_0xd6fa('0x2f')](_0x43ecc6,_0xd6fa('0x2c'));_0x55ee38['query']=_[_0xd6fa('0x3b')](_0xdaee97[_0xd6fa('0x3c')]);_0x55ee38[_0xd6fa('0x3d')]=_[_0xd6fa('0x3e')](_0x55ee38[_0xd6fa('0x3a')],_0x55ee38[_0xd6fa('0x3c')]);_0x338424[_0xd6fa('0x3f')]=_[_0xd6fa('0x3e')](_0x55ee38['model'],qs[_0xd6fa('0x40')](_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x40')]));_0x338424[_0xd6fa('0x3f')]=_0x338424[_0xd6fa('0x3f')][_0xd6fa('0x41')]?_0x338424[_0xd6fa('0x3f')]:_0x55ee38[_0xd6fa('0x3a')];if(!_0xdaee97[_0xd6fa('0x3c')]['hasOwnProperty'](_0xd6fa('0x42'))){_0x338424[_0xd6fa('0x21')]=qs[_0xd6fa('0x21')](_0xdaee97[_0xd6fa('0x3c')]['limit']);_0x338424[_0xd6fa('0x20')]=qs[_0xd6fa('0x20')](_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x20')]);}_0x338424[_0xd6fa('0x43')]=qs[_0xd6fa('0x44')](_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x44')]);_0x338424[_0xd6fa('0x45')]=qs[_0xd6fa('0x3d')](_[_0xd6fa('0x46')](_0xdaee97[_0xd6fa('0x3c')],_0x55ee38[_0xd6fa('0x3d')]),_0x43ecc6);var _0x6fa393=[];var _0x1db017=squel['select']()[_0xd6fa('0x47')]('id')[_0xd6fa('0x47')]('name')[_0xd6fa('0x47')](_0xd6fa('0x48'))[_0xd6fa('0x49')](_0xd6fa('0x4a'));var _0xb92ea2=squel['select']()[_0xd6fa('0x47')](_0xd6fa('0x4b'))[_0xd6fa('0x47')]('u.fullname')[_0xd6fa('0x47')](_0xd6fa('0x4c'))[_0xd6fa('0x49')]('user_has_whatsapp_interactions','ui')['left_join'](_0xd6fa('0x4d'),'u',_0xd6fa('0x4e'));var _0xfbf861=squel['select']()['from'](_0xd6fa('0x4f'),'i')[_0xd6fa('0x50')](_0xd6fa('0x51'),'c',_0xd6fa('0x52'))[_0xd6fa('0x50')](_0xd6fa('0x4d'),'o',_0xd6fa('0x53'))[_0xd6fa('0x50')](_0xd6fa('0x54'),'a',_0xd6fa('0x55'))[_0xd6fa('0x50')](_0xd6fa('0x56'),'me',_0xd6fa('0x57'))[_0xd6fa('0x50')](_0xd6fa('0x58'),'it',_0xd6fa('0x59'))['left_join'](_0xd6fa('0x4a'),'t','t.id\x20=\x20it.TagId');var _0x127c0a=squel[_0xd6fa('0x5a')]();var _0x4b4668=[];var _0x4fa3ce=squel[_0xd6fa('0x5a')]();var _0x29aa26;if(_0xdaee97['query'][_0xd6fa('0x5b')]){_0x29aa26=as[_0xd6fa('0x5c')](_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x5b')]);var _0x3472e3=_0x29aa26[_0xd6fa('0x5d')];for(var _0xd6cb66=0x0;_0xd6cb66<_0x29aa26['conditions'][_0xd6fa('0x41')];_0xd6cb66++){var _0x2f55ff=_0x29aa26['conditions'][_0xd6cb66];var _0x304438='i';var _0x475c3b=_['find'](_0x43ecc6,[_0xd6fa('0x2c'),_0x2f55ff['field']]);if(!_0x475c3b){switch(_0x2f55ff['field']){case _0xd6fa('0x5e'):if(_0x2f55ff[_0xd6fa('0x5f')]==0x1){_0xfbf861[_0xd6fa('0x60')]('`'+_0x2f55ff['field']+_0xd6fa('0x61'));}else{_0xfbf861[_0xd6fa('0x60')]('`'+_0x2f55ff['field']+'`\x20>\x200');}break;case _0xd6fa('0x62'):if(_0x2f55ff['operator']===_0xd6fa('0x63')){if(_0x2f55ff[_0xd6fa('0x5f')][_0xd6fa('0x33')]('\x20')['length']>0x1){_0x127c0a[_0x3472e3]('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x2f55ff[_0xd6fa('0x5f')]),null);}else{var _0x381ae6='%'+_0x2f55ff[_0xd6fa('0x5f')]+'%';_0x127c0a[_0x3472e3]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x381ae6,_0x381ae6,_0x381ae6);}}else{_0x475c3b=_['find'](_0x43ecc6,[_0xd6fa('0x2c'),_0xd6fa('0x64')]);_0x2f55ff[_0xd6fa('0x47')]='ContactId';_0x41b6a0=as['buildExpression'](_0x304438,_0x475c3b[_0xd6fa('0x38')],_0x2f55ff);_0x127c0a[_0x3472e3](_0x41b6a0[_0xd6fa('0x65')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x66')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x1f')]);}break;case'Tag':var _0x4dea16=_0x2f55ff[_0xd6fa('0x5f')][_0xd6fa('0x33')](',')[_0xd6fa('0x2f')](function(_0x50d54b){return Number(_0x50d54b);});_0x4dea16[_0xd6fa('0x34')](function(_0x5390d5){_0x4fa3ce['or'](_0xd6fa('0x67'),'%,'+_0x5390d5+',%');});_0x4b4668=_['union'](_0x4b4668,_0x4dea16);break;case _0xd6fa('0x68'):if(_0x2f55ff['operator']==='$substring'){_0x127c0a[_0x3472e3](_0xd6fa('0x69'),'%'+_0x2f55ff[_0xd6fa('0x5f')]+'%',null);}else{_0x475c3b=_[_0xd6fa('0x6a')](_0x43ecc6,[_0xd6fa('0x2c'),'UserId']);_0x2f55ff['field']=_0xd6fa('0x6b');_0x41b6a0=as['buildExpression'](_0x304438,_0x475c3b[_0xd6fa('0x38')],_0x2f55ff);_0x127c0a[_0x3472e3](_0x41b6a0[_0xd6fa('0x65')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x66')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x1f')]);}break;case _0xd6fa('0x6c'):_0x41b6a0=as[_0xd6fa('0x6d')]('me',null,_0x2f55ff);_0x127c0a[_0x3472e3](_0x41b6a0[_0xd6fa('0x65')],_0x41b6a0['value'][_0xd6fa('0x66')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x1f')]);break;}}else{var _0x41b6a0=as[_0xd6fa('0x6d')](_0x304438,_0x475c3b[_0xd6fa('0x38')],_0x2f55ff);_0x127c0a[_0x3472e3](_0x41b6a0[_0xd6fa('0x65')],_0x41b6a0['value'][_0xd6fa('0x66')],_0x41b6a0[_0xd6fa('0x5f')][_0xd6fa('0x1f')]);}}}else{var _0x5bea05=_(_0xdaee97['query'])[_0xd6fa('0x3b')]()[_0xd6fa('0x2f')](function(_0x5d910e){return _['some'](_0x43ecc6,[_0xd6fa('0x2c'),_0x5d910e])?_0x5d910e:undefined;})[_0xd6fa('0x6e')]()[_0xd6fa('0x5f')]();if(!_['isEmpty'](_0x5bea05)){_0x5bea05['forEach'](function(_0xb0be17){if(_0xb0be17==='WhatsappAccountId'){_0xfbf861[_0xd6fa('0x45')](_0xd6fa('0x6f'),[][_0xd6fa('0x70')](_0xdaee97[_0xd6fa('0x3c')][_0xb0be17]));}else if(_0xb0be17==='createdAt'){var _0x2be821=JSON[_0xd6fa('0x71')](_0xdaee97[_0xd6fa('0x3c')][_0xb0be17])[_0xd6fa('0x72')];var _0x1672aa=JSON[_0xd6fa('0x71')](_0xdaee97[_0xd6fa('0x3c')][_0xb0be17])['$lte'];_0xfbf861[_0xd6fa('0x45')](_0xd6fa('0x73'),_0x2be821,_0x1672aa);}else{if(_0xdaee97[_0xd6fa('0x3c')][_0xb0be17]===_0xd6fa('0x74')){_0xfbf861[_0xd6fa('0x45')]('i.'+_0xb0be17+_0xd6fa('0x75'));}else{_0xfbf861['where']('i.'+_0xb0be17+_0xd6fa('0x76'),_0xdaee97[_0xd6fa('0x3c')][_0xb0be17]);}}});}if(_0xdaee97[_0xd6fa('0x3c')]['read']){if(_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x77')]==0x1){_0xfbf861[_0xd6fa('0x60')](_0xd6fa('0x78'));}else{_0xfbf861[_0xd6fa('0x60')](_0xd6fa('0x79'));}}if(_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x7a')]){_0x4b4668=_[_0xd6fa('0x7b')](_0xdaee97['query']['tag'])?_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x7a')]:new Array(_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x7a')]);_0x4b4668[_0xd6fa('0x34')](function(_0x372cfb){_0x4fa3ce['or'](_0xd6fa('0x67'),'%,'+_0x372cfb+',%');});}if(_0xdaee97[_0xd6fa('0x3c')]['filter']){var _0xddbe9d=_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x7c')][_0xd6fa('0x7d')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs[_0xd6fa('0x7e')](_0xddbe9d)){_0x127c0a['or'](_0xd6fa('0x7f'),_0xddbe9d+'%')['or'](_0xd6fa('0x80'),_0xddbe9d+'%');}else{_0x127c0a['or'](_0xd6fa('0x81'),qs[_0xd6fa('0x82')](_0xddbe9d))['or'](_0xd6fa('0x83'),_0xddbe9d+'%');}}}_0xfbf861[_0xd6fa('0x45')](_0x127c0a);_0xfbf861['group'](_0xd6fa('0x84'));var _0x3cf3e4={'type':db[_0xd6fa('0x85')][_0xd6fa('0x86')][_0xd6fa('0x87')],'raw':!![]};var _0x2d129d=_0xfbf861[_0xd6fa('0x88')]();_0x2d129d['field'](_0xd6fa('0x84'));_0x2d129d[_0xd6fa('0x47')](_0xd6fa('0x89'),_0xd6fa('0x5e'));if(_0x338424[_0xd6fa('0x43')]){_0x338424[_0xd6fa('0x43')][_0xd6fa('0x34')](function(_0x113745){var _0x233321=_0x113745[0x0]===_0xd6fa('0x8a')?_0x113745[0x0]:'i.'+_0x113745[0x0];_0xfbf861[_0xd6fa('0x43')](_0x233321,_0x113745[0x1]==='DESC'?![]:!![]);});}if(!_[_0xd6fa('0x8b')](_0x4b4668)){_0xfbf861[_0xd6fa('0x60')](_0x4fa3ce);_0x2d129d[_0xd6fa('0x45')](_0xd6fa('0x8c'),_0x4b4668);}BPromise[_0xd6fa('0x8d')]()[_0xd6fa('0x29')](function(){if(!_0x29aa26){if(_0xdaee97['query']['WhatsappAccountId'])return;_0x2d129d[_0xd6fa('0x45')]('i.WhatsappAccountId\x20IS\x20NOT\x20NULL');_0xfbf861['where'](_0xd6fa('0x8e'));return;}if(_0xdaee97['user'][_0xd6fa('0x8f')]!==_0xd6fa('0x90'))return;return _0xdaee97[_0xd6fa('0x91')][_0xd6fa('0x92')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4f4972){if(_['isEmpty'](_0x4f4972)){_0x2d129d[_0xd6fa('0x45')](_0xd6fa('0x93'));_0xfbf861[_0xd6fa('0x45')](_0xd6fa('0x93'));}else{_0x2d129d[_0xd6fa('0x45')](_0xd6fa('0x6f'),_[_0xd6fa('0x2f')](_0x4f4972,'id'));_0xfbf861['where'](_0xd6fa('0x6f'),_[_0xd6fa('0x2f')](_0x4f4972,'id'));}});})[_0xd6fa('0x29')](function(){if(_0xdaee97[_0xd6fa('0x91')]['role']===_0xd6fa('0x90')&&!_0x29aa26&&!_0xdaee97[_0xd6fa('0x3c')][_0xd6fa('0x94')])return[];return db[_0xd6fa('0x95')][_0xd6fa('0x3c')](_0x2d129d[_0xd6fa('0x96')](),_0x3cf3e4);})[_0xd6fa('0x29')](function(_0x975845){_0x55962b[_0xd6fa('0x23')]=_0x975845[_0xd6fa('0x41')];if(_0x55962b['count']===0x0)return[];return db[_0xd6fa('0x95')][_0xd6fa('0x3c')](_0x1db017[_0xd6fa('0x96')](),_0x3cf3e4)[_0xd6fa('0x29')](function(_0x15c9dd){_0x6fa393=_['keyBy'](_0x15c9dd,'id');_0x3cf3e4=_[_0xd6fa('0x97')](_0x3cf3e4,{'model':db[_0xd6fa('0x36')],'mapToModel':!![],'raw':!![],'nest':!![]});if(_0xdaee97[_0xd6fa('0x3c')]['fields']){_0x338424[_0xd6fa('0x3f')][_0xd6fa('0x34')](function(_0x11203b){_0xfbf861[_0xd6fa('0x47')]('i.'+_0x11203b);});}else{_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0x89'),_0xd6fa('0x5e'));_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0x98'),_0xd6fa('0x99'));_0xfbf861['field'](_0xd6fa('0x9a'),_0xd6fa('0x9b'));_0xfbf861['field'](_0xd6fa('0x9c'),_0xd6fa('0x8a'));_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0x9d'));_0xfbf861['field'](_0xd6fa('0x9e'),_0xd6fa('0x9f'));_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0xa0'),'Contact.lastName');_0xfbf861['field']('c.email',_0xd6fa('0xa1'));_0xfbf861['field'](_0xd6fa('0xa2'),'Contact.phone');_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0xa3'),_0xd6fa('0xa4'));_0xfbf861[_0xd6fa('0x47')]('c.fax','Contact.fax');_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0xa5'),_0xd6fa('0xa6'));_0xfbf861[_0xd6fa('0x47')](_0xd6fa('0xa7'),_0xd6fa('0xa8'));_0xfbf861['field'](_0xd6fa('0xa9'),_0xd6fa('0x32'));}if(_0x338424[_0xd6fa('0x21')])_0xfbf861[_0xd6fa('0x21')](_0x338424['limit']);if(_0x338424['offset'])_0xfbf861[_0xd6fa('0x20')](_0x338424['offset']);return db[_0xd6fa('0x95')]['query'](_0xfbf861[_0xd6fa('0x96')](),_0x3cf3e4);})[_0xd6fa('0x29')](function(_0x8c559d){if(_0x8c559d['length']>0x0)_0xb92ea2[_0xd6fa('0x45')](_0xd6fa('0xaa'),_['map'](_0x8c559d,'id'));return db[_0xd6fa('0x95')][_0xd6fa('0x3c')](_0xb92ea2[_0xd6fa('0x96')](),_0x3cf3e4)[_0xd6fa('0x29')](function(_0x214bd6){var _0x2e6b50=_[_0xd6fa('0xab')](_0x214bd6,_0xd6fa('0xac'));var _0x5ed17d=[];_0x8c559d[_0xd6fa('0x34')](function(_0x3f9a59){_0x5ed17d[_0xd6fa('0x35')](updateWhatsappInteraction(_0x3f9a59,_0x6fa393,_0x2e6b50));});return BPromise[_0xd6fa('0xad')](_0x5ed17d);});});})[_0xd6fa('0x29')](function(_0x2e891a){_0x55962b[_0xd6fa('0xae')]=_0x2e891a;return _0x55962b;})['then'](respondWithFilteredResult(_0x1e7f70,_0x338424))[_0xd6fa('0xaf')](handleError(_0x1e7f70,null));};exports['show']=function(_0x26c038,_0xf2e56b){var _0x320c7d={'raw':![],'where':{'id':_0x26c038[_0xd6fa('0xb0')]['id']}},_0xa17e94={};_0xa17e94[_0xd6fa('0x3a')]=_[_0xd6fa('0x3b')](db[_0xd6fa('0x36')][_0xd6fa('0xb1')]);_0xa17e94[_0xd6fa('0x3c')]=_[_0xd6fa('0x3b')](_0x26c038[_0xd6fa('0x3c')]);_0xa17e94[_0xd6fa('0x3d')]=_[_0xd6fa('0x3e')](_0xa17e94[_0xd6fa('0x3a')],_0xa17e94['query']);_0x320c7d[_0xd6fa('0x3f')]=_[_0xd6fa('0x3e')](_0xa17e94['model'],qs[_0xd6fa('0x40')](_0x26c038[_0xd6fa('0x3c')][_0xd6fa('0x40')]));_0x320c7d[_0xd6fa('0x3f')]=_0x320c7d[_0xd6fa('0x3f')][_0xd6fa('0x41')]?_0x320c7d[_0xd6fa('0x3f')]:_0xa17e94['model'];if(_0x26c038[_0xd6fa('0x3c')]['includeAll']){_0x320c7d[_0xd6fa('0xb2')]=[{'all':!![]}];}_0x320c7d=_[_0xd6fa('0x97')]({},_0x320c7d,_0x26c038[_0xd6fa('0xb3')]);return db[_0xd6fa('0x36')][_0xd6fa('0x6a')](_0x320c7d)['then'](handleEntityNotFound(_0xf2e56b,null))[_0xd6fa('0x29')](respondWithResult(_0xf2e56b,null))[_0xd6fa('0xaf')](handleError(_0xf2e56b,null));};exports['create']=function(_0x3bec3e,_0x5a8a4d){return db['WhatsappInteraction'][_0xd6fa('0xb4')](_0x3bec3e[_0xd6fa('0x6c')],{})[_0xd6fa('0x29')](respondWithResult(_0x5a8a4d,0xc9))[_0xd6fa('0xaf')](handleError(_0x5a8a4d,null));};exports[_0xd6fa('0x28')]=function(_0x116b44,_0x584eb5){if(_0x116b44['body']['id']){delete _0x116b44[_0xd6fa('0x6c')]['id'];}return db[_0xd6fa('0x36')][_0xd6fa('0x6a')]({'where':{'id':_0x116b44[_0xd6fa('0xb0')]['id']}})[_0xd6fa('0x29')](handleEntityNotFound(_0x584eb5,null))[_0xd6fa('0x29')](saveUpdates(_0x116b44[_0xd6fa('0x6c')],null))[_0xd6fa('0x29')](respondWithResult(_0x584eb5,null))[_0xd6fa('0xaf')](handleError(_0x584eb5,null));};exports[_0xd6fa('0xb5')]=function(_0x29451f,_0x3722db){return db['WhatsappInteraction']['find']({'where':{'id':_0x29451f[_0xd6fa('0xb0')]['id']}})[_0xd6fa('0x29')](handleEntityNotFound(_0x3722db,null))[_0xd6fa('0x29')](removeEntity(_0x3722db,null))[_0xd6fa('0xaf')](handleError(_0x3722db,null));};exports['describe']=function(_0x22c6a7,_0x579221){return db['WhatsappInteraction']['describe']()[_0xd6fa('0x29')](respondWithResult(_0x579221,null))[_0xd6fa('0xaf')](handleError(_0x579221,null));};exports['addMessage']=function(_0x401a16,_0x1a0ce6,_0x17f299){return db[_0xd6fa('0xb6')]['find']({'where':{'id':_0x401a16['params']['id']}})[_0xd6fa('0x29')](handleEntityNotFound(_0x1a0ce6,null))[_0xd6fa('0x29')](function(_0x2489df){if(_0x2489df){return _0x2489df[_0xd6fa('0xb7')](_0x401a16[_0xd6fa('0x6c')][_0xd6fa('0xb8')],_[_0xd6fa('0xb9')](_0x401a16[_0xd6fa('0x6c')],[_0xd6fa('0xb8'),'id'])||{});}})[_0xd6fa('0x29')](respondWithResult(_0x1a0ce6,null))['catch'](handleError(_0x1a0ce6,null));};exports[_0xd6fa('0xba')]=function(_0x4a7030,_0xc2b0b5,_0x3b2bae){var _0x340fab={'raw':![],'where':{}};var _0xbdde93={};var _0x20ea56={'count':0x0,'rows':[]};return db[_0xd6fa('0x36')][_0xd6fa('0xbb')]({'where':{'id':_0x4a7030[_0xd6fa('0xb0')]['id']}})['then'](handleEntityNotFound(_0xc2b0b5,null))['then'](function(_0x41bb90){if(_0x41bb90){_0xbdde93['model']=_[_0xd6fa('0x3b')](db[_0xd6fa('0xb6')][_0xd6fa('0xb1')]);_0xbdde93[_0xd6fa('0x3c')]=_[_0xd6fa('0x3b')](_0x4a7030[_0xd6fa('0x3c')]);_0xbdde93[_0xd6fa('0x3d')]=_['intersection'](_0xbdde93['model'],_0xbdde93[_0xd6fa('0x3c')]);_0x340fab[_0xd6fa('0x3f')]=_['intersection'](_0xbdde93[_0xd6fa('0x3a')],qs[_0xd6fa('0x40')](_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0x40')]));_0x340fab['attributes']=_0x340fab['attributes']['length']?_0x340fab['attributes']:_0xbdde93[_0xd6fa('0x3a')];if(!_0x4a7030['query'][_0xd6fa('0xbc')]('nolimit')){_0x340fab[_0xd6fa('0x21')]=qs[_0xd6fa('0x21')](_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0x21')]);_0x340fab['offset']=qs[_0xd6fa('0x20')](_0x4a7030[_0xd6fa('0x3c')]['offset']);}_0x340fab['order']=qs['sort'](_0x4a7030['query']['sort']);_0x340fab['where']=qs[_0xd6fa('0x3d')](_['pick'](_0x4a7030['query'],_0xbdde93[_0xd6fa('0x3d')]));_0x340fab[_0xd6fa('0x45')][_0xd6fa('0xac')]=_0x41bb90['id'];if(_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0x7c')]){_0x340fab[_0xd6fa('0x45')]=_['merge'](_0x340fab[_0xd6fa('0x45')],{'$or':_['map'](_0x340fab[_0xd6fa('0x3f')],function(_0x3cf585){var _0x26cd01={};_0x26cd01[_0x3cf585]={'$like':'%'+_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0x7c')]+'%'};return _0x26cd01;})});}if(_0x4a7030['query'][_0xd6fa('0x72')]){var _0x2cfdf3=_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0x72')][_0xd6fa('0x33')](',');var _0x15947a={};_0x15947a[_0x2cfdf3[0x0]]={'$gte':moment(_0x2cfdf3[0x1])['format'](_0xd6fa('0xbd'))};_0x340fab[_0xd6fa('0x45')]=_[_0xd6fa('0x97')](_0x340fab['where'],_0x15947a);}_0x340fab=_['merge']({},_0x340fab,_0x4a7030[_0xd6fa('0xb3')]);return db[_0xd6fa('0xb6')][_0xd6fa('0x23')]({'where':_0x340fab['where']})[_0xd6fa('0x29')](function(_0x1a80f7){_0x20ea56[_0xd6fa('0x23')]=_0x1a80f7;if(_0x4a7030[_0xd6fa('0x3c')][_0xd6fa('0xbe')]){_0x340fab[_0xd6fa('0xb2')]=[{'all':!![]}];}return db[_0xd6fa('0xb6')]['findAll'](_0x340fab);})['then'](function(_0x4b5da3){_0x20ea56[_0xd6fa('0xae')]=_0x4b5da3;return _0x20ea56;});}})['then'](respondWithFilteredResult(_0xc2b0b5,_0x340fab))[_0xd6fa('0xaf')](handleError(_0xc2b0b5,null));};exports['addTags']=function(_0x5534d7,_0xaa6061,_0x1290ae){return db['WhatsappInteraction'][_0xd6fa('0x6a')]({'where':{'id':_0x5534d7['params']['id']}})[_0xd6fa('0x29')](handleEntityNotFound(_0xaa6061,null))['then'](function(_0x499456){if(_0x499456){return _0x499456[_0xd6fa('0xbf')](_0x5534d7[_0xd6fa('0x6c')][_0xd6fa('0xb8')],_[_0xd6fa('0xb9')](_0x5534d7['body'],['ids','id'])||{})[_0xd6fa('0xc0')](function(){return db[_0xd6fa('0xc1')][_0xd6fa('0xc2')]({'attributes':['id','name',_0xd6fa('0x48')],'where':{'id':_0x5534d7[_0xd6fa('0x6c')][_0xd6fa('0xb8')]}});})[_0xd6fa('0x29')](function(_0x5c7b43){socket[_0xd6fa('0xc3')]('whatsappInteractionTags:save',{'id':Number(_0x5534d7[_0xd6fa('0xb0')]['id']),'tags':_0x5c7b43||[]});return{'id':Number(_0x5534d7[_0xd6fa('0xb0')]['id']),'tags':_0x5c7b43||[]};});}})[_0xd6fa('0x29')](respondWithResult(_0xaa6061,null))[_0xd6fa('0xaf')](handleError(_0xaa6061,null));};exports['removeTags']=function(_0x45ed22,_0x31b69e,_0x1ae10c){return db[_0xd6fa('0x36')][_0xd6fa('0x6a')]({'where':{'id':_0x45ed22[_0xd6fa('0xb0')]['id']}})['then'](handleEntityNotFound(_0x31b69e,null))['then'](function(_0x356357){if(_0x356357){return _0x356357[_0xd6fa('0xc4')](_0x45ed22[_0xd6fa('0x3c')][_0xd6fa('0xb8')]);}})[_0xd6fa('0x29')](respondWithStatusCode(_0x31b69e,null))['catch'](handleError(_0x31b69e,null));};exports[_0xd6fa('0xc5')]=function(_0x2fb291,_0x531dd7){var _0x5b884b=moment()['unix']()[_0xd6fa('0x96')]();var _0x5d1440=path[_0xd6fa('0xc6')](config[_0xd6fa('0xc7')],_0xd6fa('0xc8'),_0xd6fa('0xc9'),_0xd6fa('0xca'));var _0x4c62af=path['join'](config[_0xd6fa('0xc7')],_0xd6fa('0xc8'),_0xd6fa('0xc9'),_0xd6fa('0xcb'));var _0x46c077=path[_0xd6fa('0xc6')](_0x5d1440,_0x5b884b);var _0x2d3e32=util[_0xd6fa('0xcc')](_0xd6fa('0xcd'),_0x2fb291[_0xd6fa('0xb0')]['id'],_0x5b884b);var _0x544809=path[_0xd6fa('0xc6')](_0x5d1440,_0x2d3e32);var _0x51e75a=[];_0x51e75a[_0xd6fa('0x35')]({'model':db[_0xd6fa('0x68')],'as':_0xd6fa('0x68'),'attributes':['id',_0xd6fa('0x30')],'raw':!![]});_0x51e75a[_0xd6fa('0x35')]({'model':db[_0xd6fa('0xce')],'as':_0xd6fa('0x62'),'attributes':['id',_0xd6fa('0xcf'),'lastName'],'raw':!![]});if(_0x2fb291['query']['attachments']){_0x51e75a['push']({'model':db[_0xd6fa('0xd0')],'as':_0xd6fa('0xd0'),'raw':!![]});}var _0xbc6acd=[{'model':db[_0xd6fa('0xb6')],'as':_0xd6fa('0xd1'),'attributes':['id','body','createdAt',_0xd6fa('0xd2'),_0xd6fa('0xd3'),_0xd6fa('0x77')],'include':_0x51e75a}];_0xbc6acd['push']({'model':db['WhatsappAccount'],'as':_0xd6fa('0xd4'),'attributes':['id','name']});_0xbc6acd[_0xd6fa('0x35')]({'model':db['User'],'as':_0xd6fa('0xd5'),'attributes':['id',_0xd6fa('0x30')]});return db[_0xd6fa('0x36')]['find']({'where':{'id':_0x2fb291['params']['id']},'include':_0xbc6acd})[_0xd6fa('0x29')](handleEntityNotFound(_0x531dd7,null))[_0xd6fa('0x29')](function(_0x4b0e32){if(_0x4b0e32){var _0x56abd5=_0x4b0e32['get']({'plain':!![]});fs[_0xd6fa('0xd6')](_0x46c077);var _0x2a4f0e={'channel':_0xd6fa('0xd7'),'account':_0x56abd5[_0xd6fa('0xd4')][_0xd6fa('0x2c')],'agent':_0x56abd5[_0xd6fa('0xd5')]?_0x56abd5[_0xd6fa('0xd5')][_0xd6fa('0x30')]:_0xd6fa('0xd8'),'createdAt':moment(_0x56abd5['createdAt'])[_0xd6fa('0xcc')](_0xd6fa('0xbd'))[_0xd6fa('0x96')](),'closedAt':_0x56abd5[_0xd6fa('0xd9')]?moment(_0x56abd5[_0xd6fa('0xda')])['format'](_0xd6fa('0xbd'))[_0xd6fa('0x96')]():'','disposition':_0x56abd5[_0xd6fa('0xdb')],'messages':_(_0x56abd5['Messages'])[_0xd6fa('0x7c')]({'secret':![]})[_0xd6fa('0x2f')](function(_0x4e5135){if(_0x4e5135[_0xd6fa('0xd0')]){var _0x142c2a=path[_0xd6fa('0xc6')](_0x4c62af,_0x4e5135[_0xd6fa('0xd0')]['basename']);if(fs['existsSync'](_0x142c2a)){fs[_0xd6fa('0xdc')](_0x142c2a)[_0xd6fa('0xdd')](fs['createWriteStream'](path[_0xd6fa('0xc6')](_0x46c077,_0x4e5135[_0xd6fa('0xd0')][_0xd6fa('0xde')])));}}return{'date':moment(_0x4e5135[_0xd6fa('0xdf')])[_0xd6fa('0xcc')](_0xd6fa('0xbd'))[_0xd6fa('0x96')](),'sender':_0x4e5135[_0xd6fa('0xd2')]==='out'?_0x4e5135[_0xd6fa('0x68')]?_0x4e5135[_0xd6fa('0x68')][_0xd6fa('0x30')]:_0xd6fa('0xe0'):_0x4e5135[_0xd6fa('0x62')][_0xd6fa('0xcf')]+(_0x4e5135['Contact'][_0xd6fa('0xe1')]?'\x20'+_0x4e5135['Contact'][_0xd6fa('0xe1')]:''),'body':_0x4e5135[_0xd6fa('0xd0')]?_0x4e5135['Attachment'][_0xd6fa('0xde')]:_0x4e5135['body'],'direction':_0x4e5135[_0xd6fa('0xd2')]==='out'?'A':'C','secret':_0x4e5135['secret'],'read':_0x4e5135[_0xd6fa('0x77')],'attachment':_0x4e5135[_0xd6fa('0xd0')]};})['value']()};return ejs[_0xd6fa('0xe2')](path[_0xd6fa('0xc6')](config[_0xd6fa('0xc7')],_0xd6fa('0xc8'),'views',_0xd6fa('0xe3')),{'interaction':_0x2a4f0e})[_0xd6fa('0x29')](function(_0x4294af){var _0x181554=path[_0xd6fa('0xc6')](_0x46c077,_0xd6fa('0xe4')+_0x56abd5['id']+'-'+_0x5b884b+_0xd6fa('0xe5'));var _0x382b0c={'path':_0x181554,'channel':'Whatsapp','interactionId':_0x56abd5['id']};return pdf[_0xd6fa('0xe6')](_0x4294af,_0x382b0c);})['then'](function(){return new BPromise(function(_0x430108,_0x1f8071){zipdir(_0x46c077,{'saveTo':_0x544809},function(_0x5629e5,_0x5b9313){if(_0x5629e5)return _0x1f8071(_0x5629e5);return _0x430108(_0x5b9313);});})[_0xd6fa('0x29')](function(){return new BPromise(function(_0x2205f7,_0x2e2032){rimraf(_0x46c077,function(_0x1651a1){if(_0x1651a1)_0x2e2032(_0x1651a1);return _0x2205f7();});});})[_0xd6fa('0x29')](function(){return _0x531dd7[_0xd6fa('0xc5')](_0x544809,_0x2d3e32,function(_0x3fc201){if(_0x3fc201){console[_0xd6fa('0xe7')]('err',_0x3fc201);}else{fs[_0xd6fa('0xe8')](_0x544809);}});});});}else{return _0x531dd7[_0xd6fa('0x2a')](0xc8);}})[_0xd6fa('0xaf')](handleError(_0x531dd7,null));}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.events.js b/server/api/whatsappInteraction/whatsappInteraction.events.js index 9751995..0ed4832 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 _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 +var _0x01d3=['WhatsappMessage','save','update','remove','getUsers','then','setDataValue','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','exports','WhatsappInteraction','../../mysqldb'];(function(_0x5b705e,_0x472ee3){var _0x383f25=function(_0x57a210){while(--_0x57a210){_0x5b705e['push'](_0x5b705e['shift']());}};_0x383f25(++_0x472ee3);}(_0x01d3,0xdb));var _0x301d=function(_0x5e437f,_0x13dd96){_0x5e437f=_0x5e437f-0x0;var _0x2ad331=_0x01d3[_0x5e437f];return _0x2ad331;};'use strict';var EventEmitter=require('events');var WhatsappInteraction=require('../../mysqldb')['db'][_0x301d('0x0')];var WhatsappMessage=require(_0x301d('0x1'))['db'][_0x301d('0x2')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x301d('0x3'),'afterUpdate':_0x301d('0x4'),'afterDestroy':_0x301d('0x5')};function emitEvent(_0x11ba0e){return function(_0x13cd36,_0x4f3b25,_0x44f428){_0x13cd36[_0x301d('0x6')]({'attributes':['id'],'raw':!![]})[_0x301d('0x7')](function(_0x30e89e){_0x13cd36[_0x301d('0x8')]('Users',_0x30e89e[_0x301d('0x9')](function(_0x1d8e83){return{'id':_0x1d8e83['id']};}));return WhatsappMessage[_0x301d('0xa')]({'where':{'WhatsappInteractionId':_0x13cd36['id'],'direction':'in','read':![]},'raw':!![]});})[_0x301d('0x7')](function(_0xc54235){_0x13cd36[_0x301d('0x8')](_0x301d('0xb'),_0xc54235[_0x301d('0xc')]);WhatsappInteractionEvents[_0x301d('0xd')](_0x11ba0e+':'+_0x13cd36['id'],_0x13cd36);WhatsappInteractionEvents['emit'](_0x11ba0e,_0x13cd36);_0x44f428(null);})[_0x301d('0xe')](_0x44f428(null));};}for(var e in events){if(events[_0x301d('0xf')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0x301d('0x10')]=WhatsappInteractionEvents; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.model.js b/server/api/whatsappInteraction/whatsappInteraction.model.js index 473dbbe..98d7c57 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 _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 +var _0x5e10=['../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','whatsapp_interactions','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x38994e,_0x44c97a){var _0x125271=function(_0x24dbac){while(--_0x24dbac){_0x38994e['push'](_0x38994e['shift']());}};_0x125271(++_0x44c97a);}(_0x5e10,0x179));var _0x05e1=function(_0x547af,_0x17abff){_0x547af=_0x547af-0x0;var _0x22f7f4=_0x5e10[_0x547af];return _0x22f7f4;};'use strict';var _=require('lodash');var util=require(_0x05e1('0x0'));var logger=require('../../config/logger')(_0x05e1('0x1'));var moment=require(_0x05e1('0x2'));var BPromise=require(_0x05e1('0x3'));var rp=require(_0x05e1('0x4'));var fs=require('fs');var path=require(_0x05e1('0x5'));var rimraf=require(_0x05e1('0x6'));var config=require(_0x05e1('0x7'));var attributes=require(_0x05e1('0x8'));module[_0x05e1('0x9')]=function(_0x1b6040,_0x531eb1){return _0x1b6040[_0x05e1('0xa')](_0x05e1('0xb'),attributes,{'tableName':_0x05e1('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x59ce7e,_0x439479,_0x15416){if(_0x59ce7e['changed'](_0x05e1('0xd'))){_0x59ce7e[_0x05e1('0xe')]=moment()['format'](_0x05e1('0xf'));}_0x15416(null,_0x59ce7e);}}});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.rpc.js b/server/api/whatsappInteraction/whatsappInteraction.rpc.js index 07a891c..992a7b9 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 _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 +var _0x1d05=['stringify','error','code','WhatsappInteraction,\x20%s,\x20%s','message','UpdateWhatsappInteraction','body','options','where','attributes','limit','debug','catch','AddTagsToWhatsappInteraction','WhatsappInteraction','find','omit','spread','AddTags','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http','redis','socket.io-emitter','./whatsappInteraction.socket','register','then','info','request\x20sent','WhatsappInteraction,\x20%s,\x20%s,\x20%s'];(function(_0x1e97e1,_0x438df5){var _0x25cfe1=function(_0x41da2e){while(--_0x41da2e){_0x1e97e1['push'](_0x1e97e1['shift']());}};_0x25cfe1(++_0x438df5);}(_0x1d05,0x116));var _0x51d0=function(_0x14f3f4,_0x33e4cc){_0x14f3f4=_0x14f3f4-0x0;var _0x14931c=_0x1d05[_0x14f3f4];return _0x14931c;};'use strict';var _=require(_0x51d0('0x0'));var util=require(_0x51d0('0x1'));var moment=require('moment');var BPromise=require(_0x51d0('0x2'));var rs=require(_0x51d0('0x3'));var fs=require('fs');var Redis=require(_0x51d0('0x4'));var db=require(_0x51d0('0x5'))['db'];var utils=require(_0x51d0('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x51d0('0x7'));var jayson=require(_0x51d0('0x8'));var client=jayson['client'][_0x51d0('0x9')]({'port':0x232a});config[_0x51d0('0xa')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x51d0('0xb'))(new Redis(config[_0x51d0('0xa')]));require(_0x51d0('0xc'))[_0x51d0('0xd')](socket);function respondWithRpcPromise(_0x583e88,_0x1cd4ab,_0x3907e6){return new BPromise(function(_0x367ba0,_0x3a213a){return client['request'](_0x583e88,_0x3907e6)[_0x51d0('0xe')](function(_0x2101d5){logger[_0x51d0('0xf')]('WhatsappInteraction,\x20%s,\x20%s',_0x1cd4ab,_0x51d0('0x10'));logger['debug'](_0x51d0('0x11'),_0x1cd4ab,_0x51d0('0x10'),JSON[_0x51d0('0x12')](_0x2101d5));if(_0x2101d5[_0x51d0('0x13')]){if(_0x2101d5[_0x51d0('0x13')][_0x51d0('0x14')]===0x1f4){logger[_0x51d0('0x13')](_0x51d0('0x15'),_0x1cd4ab,_0x2101d5[_0x51d0('0x13')][_0x51d0('0x16')]);return _0x3a213a(_0x2101d5[_0x51d0('0x13')][_0x51d0('0x16')]);}logger[_0x51d0('0x13')](_0x51d0('0x15'),_0x1cd4ab,_0x2101d5[_0x51d0('0x13')][_0x51d0('0x16')]);return _0x367ba0(_0x2101d5['error'][_0x51d0('0x16')]);}else{logger['info']('WhatsappInteraction,\x20%s,\x20%s',_0x1cd4ab,_0x51d0('0x10'));_0x367ba0(_0x2101d5['result']['message']);}})['catch'](function(_0xe83e31){logger['error'](_0x51d0('0x15'),_0x1cd4ab,_0xe83e31);_0x3a213a(_0xe83e31);});});}exports[_0x51d0('0x17')]=function(_0x43d171){var _0x2d2966=this;return new Promise(function(_0x299dde,_0x3b1b56){return db['WhatsappInteraction']['update'](_0x43d171[_0x51d0('0x18')],{'raw':_0x43d171[_0x51d0('0x19')]?_0x43d171[_0x51d0('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43d171['options']?_0x43d171[_0x51d0('0x19')][_0x51d0('0x1a')]||null:null,'attributes':_0x43d171[_0x51d0('0x19')]?_0x43d171[_0x51d0('0x19')][_0x51d0('0x1b')]||null:null,'limit':_0x43d171['options']?_0x43d171['options'][_0x51d0('0x1c')]||null:null})[_0x51d0('0xe')](function(_0x1def7b){logger['info']('UpdateWhatsappInteraction',_0x43d171);logger[_0x51d0('0x1d')](_0x51d0('0x17'),_0x43d171,JSON[_0x51d0('0x12')](_0x1def7b));_0x299dde(_0x1def7b);})[_0x51d0('0x1e')](function(_0x3970ea){logger[_0x51d0('0x13')](_0x51d0('0x17'),_0x3970ea[_0x51d0('0x16')],_0x43d171);_0x3b1b56(_0x2d2966['error'](0x1f4,_0x3970ea[_0x51d0('0x16')]));});});};exports[_0x51d0('0x1f')]=function(_0x3a1d73){return new Promise(function(_0x301a52,_0x2f5443){return db[_0x51d0('0x20')][_0x51d0('0x21')]({'where':_0x3a1d73[_0x51d0('0x19')]?_0x3a1d73['options']['where']||null:null})[_0x51d0('0xe')](function(_0x5329d0){if(_0x5329d0){return _0x5329d0['addTags'](_0x3a1d73[_0x51d0('0x18')]['ids'],_[_0x51d0('0x22')](_0x3a1d73[_0x51d0('0x18')],['ids','id'])||{});}})[_0x51d0('0x23')](function(_0x49fa57){logger['info']('AddTags',_0x3a1d73);logger[_0x51d0('0x1d')]('AddTags',_0x3a1d73,JSON[_0x51d0('0x12')](_0x49fa57));_0x301a52(_0x49fa57);})[_0x51d0('0x1e')](function(_0x13314e){logger['error'](_0x51d0('0x24'),_0x13314e['message'],_0x3a1d73);_0x2f5443(_this[_0x51d0('0x13')](0x1f4,_0x13314e[_0x51d0('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.socket.js b/server/api/whatsappInteraction/whatsappInteraction.socket.js index 9695055..a1cb568 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 _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 +var _0x7aab=['emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events','save','remove','update'];(function(_0x326668,_0x175cff){var _0x5aa8b5=function(_0x4037fd){while(--_0x4037fd){_0x326668['push'](_0x326668['shift']());}};_0x5aa8b5(++_0x175cff);}(_0x7aab,0xef));var _0xb7aa=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x7aab[_0x502c7d];return _0x30b7ed;};'use strict';var WhatsappInteractionEvents=require(_0xb7aa('0x0'));var events=[_0xb7aa('0x1'),_0xb7aa('0x2'),_0xb7aa('0x3')];function createListener(_0xedafcd,_0x302ff3){return function(_0x399fb1){_0x302ff3[_0xb7aa('0x4')](_0xedafcd,_0x399fb1);};}function removeListener(_0x287f84,_0x577046){return function(){WhatsappInteractionEvents[_0xb7aa('0x5')](_0x287f84,_0x577046);};}exports[_0xb7aa('0x6')]=function(_0x3a3a9b){for(var _0x1a7a1a=0x0,_0x3082de=events[_0xb7aa('0x7')];_0x1a7a1a<_0x3082de;_0x1a7a1a++){var _0x5da6c6=events[_0x1a7a1a];var _0x49aaa0=createListener(_0xb7aa('0x8')+_0x5da6c6,_0x3a3a9b);WhatsappInteractionEvents['on'](_0x5da6c6,_0x49aaa0);}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/index.js b/server/api/whatsappMessage/index.js index ef9285e..5ee675e 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 _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 +var _0xd1a5=['/:id/reject','reject','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','isAuthenticated','index','describe','/:id','show','tracked','whatsapp','whatsappmessage:create','post','status','put','update','/:id/accept','accept'];(function(_0x2d8246,_0x259437){var _0x54a497=function(_0x3826b1){while(--_0x3826b1){_0x2d8246['push'](_0x2d8246['shift']());}};_0x54a497(++_0x259437);}(_0xd1a5,0x112));var _0x5d1a=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0xd1a5[_0x36c5b0];return _0xf19333;};'use strict';var multer=require(_0x5d1a('0x0'));var util=require(_0x5d1a('0x1'));var path=require(_0x5d1a('0x2'));var timeout=require(_0x5d1a('0x3'));var express=require(_0x5d1a('0x4'));var router=express[_0x5d1a('0x5')]();var fs_extra=require(_0x5d1a('0x6'));var auth=require(_0x5d1a('0x7'));var interaction=require(_0x5d1a('0x8'));var config=require(_0x5d1a('0x9'));var controller=require(_0x5d1a('0xa'));router[_0x5d1a('0xb')]('/',auth[_0x5d1a('0xc')](),controller[_0x5d1a('0xd')]);router['get']('/describe',auth[_0x5d1a('0xc')](),controller[_0x5d1a('0xe')]);router['get'](_0x5d1a('0xf'),auth[_0x5d1a('0xc')](),controller[_0x5d1a('0x10')]);router['post']('/',auth[_0x5d1a('0xc')](),interaction[_0x5d1a('0x11')](_0x5d1a('0x12'),_0x5d1a('0x13')),controller['create']);router[_0x5d1a('0x14')]('/:id/status',controller[_0x5d1a('0x15')]);router[_0x5d1a('0x16')](_0x5d1a('0xf'),auth['isAuthenticated'](),controller[_0x5d1a('0x17')]);router['put'](_0x5d1a('0x18'),auth['isAuthenticated'](),controller[_0x5d1a('0x19')]);router['put'](_0x5d1a('0x1a'),auth[_0x5d1a('0xc')](),controller[_0x5d1a('0x1b')]);router[_0x5d1a('0x1c')](_0x5d1a('0xf'),auth[_0x5d1a('0xc')](),controller[_0x5d1a('0x1d')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.attributes.js b/server/api/whatsappMessage/whatsappMessage.attributes.js index b8f80a6..910e298 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 _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 +var _0x349f=['TEXT','medium','BOOLEAN','out','DATE','STRING','sequelize','exports'];(function(_0x4d07cc,_0x587613){var _0x42de3b=function(_0x201f78){while(--_0x201f78){_0x4d07cc['push'](_0x4d07cc['shift']());}};_0x42de3b(++_0x587613);}(_0x349f,0xae));var _0xf349=function(_0x29df82,_0x559c38){_0x29df82=_0x29df82-0x0;var _0x2c3c78=_0x349f[_0x29df82];return _0x2c3c78;};'use strict';var Sequelize=require(_0xf349('0x0'));module[_0xf349('0x1')]={'body':{'type':Sequelize[_0xf349('0x2')](_0xf349('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xf349('0x4')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0xf349('0x5')),'defaultValue':_0xf349('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0xf349('0x6')]},'secret':{'type':Sequelize[_0xf349('0x4')],'defaultValue':![]},'providerName':{'type':Sequelize[_0xf349('0x7')]},'providerResponse':{'type':Sequelize[_0xf349('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.controller.js b/server/api/whatsappMessage/whatsappMessage.controller.js index 0c41b55..4fe7695 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 _0xc5bb=['to-csv','ejs','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','register','http','client','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','Content-Range','reject','save','destroy','end','stack','name','index','map','WhatsappMessage','rawAttributes','fieldName','key','query','keys','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','where','filters','pick','filter','merge','type','VIRTUAL','count','include','findAll','rows','show','options','find','create','body','params','describe','../../config/logger','whatsapp-interactions','accept','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','CmContact','get','WhatsappInteraction','isNil','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','stringify','null','AcceptMessage','acceptMessage','startsWith','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','contact','manual','interface','SIP/%s','channel','event','EventManager','whatsapp','WhatsappInteractionId','interaction','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','inspect','twilio','MessageSid','MessageStatus','update','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox'];(function(_0xaebe4d,_0x49d5e2){var _0x3ae46a=function(_0xf71f46){while(--_0xf71f46){_0xaebe4d['push'](_0xaebe4d['shift']());}};_0x3ae46a(++_0x49d5e2);}(_0xc5bb,0x7f));var _0xbc5b=function(_0x1fd820,_0x5823b1){_0x1fd820=_0x1fd820-0x0;var _0x37a004=_0xc5bb[_0x1fd820];return _0x37a004;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbc5b('0x0'));var zipdir=require(_0xbc5b('0x1'));var jsonpatch=require(_0xbc5b('0x2'));var rp=require(_0xbc5b('0x3'));var moment=require(_0xbc5b('0x4'));var BPromise=require(_0xbc5b('0x5'));var Mustache=require('mustache');var util=require(_0xbc5b('0x6'));var path=require(_0xbc5b('0x7'));var sox=require(_0xbc5b('0x8'));var csv=require(_0xbc5b('0x9'));var ejs=require(_0xbc5b('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xbc5b('0xb'));var squel=require('squel');var crypto=require(_0xbc5b('0xc'));var jsforce=require(_0xbc5b('0xd'));var deskjs=require(_0xbc5b('0xe'));var toCsv=require(_0xbc5b('0x9'));var querystring=require('querystring');var Papa=require(_0xbc5b('0xf'));var Redis=require(_0xbc5b('0x10'));var authService=require(_0xbc5b('0x11'));var qs=require(_0xbc5b('0x12'));var as=require(_0xbc5b('0x13'));var hardwareService=require(_0xbc5b('0x14'));var logger=require('../../config/logger')(_0xbc5b('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xbc5b('0x16'));var db=require(_0xbc5b('0x17'))['db'];config[_0xbc5b('0x18')]=_[_0xbc5b('0x19')](config[_0xbc5b('0x18')],{'host':_0xbc5b('0x1a'),'port':0x18eb});var socket=require(_0xbc5b('0x1b'))(new Redis(config[_0xbc5b('0x18')]));require(_0xbc5b('0x1c'))[_0xbc5b('0x1d')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0xbc5b('0x1e')]({'port':0x232c});var client9002=jayson[_0xbc5b('0x1f')][_0xbc5b('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x1d6f95,_0x703310,_0x151138,_0x3de2f8){return new BPromise(function(_0x576c3b,_0x446cd1){var _0x1ccb01=_0x3de2f8||client;return _0x1ccb01[_0xbc5b('0x20')](_0x1d6f95,_0x151138)[_0xbc5b('0x21')](function(_0x9ff1e3){logger[_0xbc5b('0x22')](_0xbc5b('0x23'),_0x703310,_0xbc5b('0x24'));logger[_0xbc5b('0x25')]('WhatsappMessage,\x20%s,\x20%s,\x20%s',_0x703310,_0xbc5b('0x24'),JSON['stringify'](_0x9ff1e3));if(_0x9ff1e3[_0xbc5b('0x26')]){if(_0x9ff1e3[_0xbc5b('0x26')][_0xbc5b('0x27')]===0x1f4){logger[_0xbc5b('0x26')](_0xbc5b('0x23'),_0x703310,_0x9ff1e3[_0xbc5b('0x26')][_0xbc5b('0x28')]);return _0x446cd1(_0x9ff1e3[_0xbc5b('0x26')][_0xbc5b('0x28')]);}logger[_0xbc5b('0x26')](_0xbc5b('0x23'),_0x703310,_0x9ff1e3[_0xbc5b('0x26')][_0xbc5b('0x28')]);return _0x576c3b(_0x9ff1e3[_0xbc5b('0x26')]['message']);}else{logger['info'](_0xbc5b('0x23'),_0x703310,_0xbc5b('0x24'));_0x576c3b(_0x9ff1e3[_0xbc5b('0x29')]['message']);}})[_0xbc5b('0x2a')](function(_0x2027a3){logger[_0xbc5b('0x26')]('WhatsappMessage,\x20%s,\x20%s',_0x703310,_0x2027a3);_0x446cd1(_0x2027a3);});});}function respondWithStatusCode(_0xa88268,_0x5c04db){_0x5c04db=_0x5c04db||0xcc;return function(_0x742d5d){if(_0x742d5d){return _0xa88268[_0xbc5b('0x2b')](_0x5c04db);}return _0xa88268['status'](_0x5c04db)['end']();};}function respondWithResult(_0x3abb39,_0x160c39){_0x160c39=_0x160c39||0xc8;return function(_0x2ce245){if(_0x2ce245){return _0x3abb39[_0xbc5b('0x2c')](_0x160c39)[_0xbc5b('0x2d')](_0x2ce245);}};}function respondWithFilteredResult(_0x7966db,_0x451fd0){return function(_0x34fe19){if(_0x34fe19){var _0x5a1b61=typeof _0x451fd0[_0xbc5b('0x2e')]===_0xbc5b('0x2f')&&typeof _0x451fd0['limit']===_0xbc5b('0x2f');var _0x3da4c7=_0x34fe19['count'];var _0x5aa790=_0x5a1b61?0x0:_0x451fd0[_0xbc5b('0x2e')];var _0xe1df34=_0x5a1b61?_0x34fe19['count']:_0x451fd0[_0xbc5b('0x2e')]+_0x451fd0[_0xbc5b('0x30')];var _0x65d8c8;if(_0xe1df34>=_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=_0x578689){_0x23166a=_0x578689;_0x2b8f2e=0xc8;}else{_0x2b8f2e=0xce;}_0x17eb56['status'](_0x2b8f2e);return _0x17eb56[_0xefb9('0x30')]('Content-Range',_0x39e448+'-'+_0x23166a+'/'+_0x578689)[_0xefb9('0x2b')](_0x5d92ca);}return null;};}function patchUpdates(_0x384f49){return function(_0x3b6836){try{jsonpatch['apply'](_0x3b6836,_0x384f49,!![]);}catch(_0x45a4d0){return BPromise[_0xefb9('0x31')](_0x45a4d0);}return _0x3b6836['save']();};}function saveUpdates(_0x294c76,_0x5d31b3){return function(_0xcfac19){if(_0xcfac19){return _0xcfac19[_0xefb9('0x32')](_0x294c76)[_0xefb9('0x1d')](function(_0x168c69){return _0x168c69;});}return null;};}function removeEntity(_0x169ac6,_0x4cbeb3){return function(_0x4681c7){if(_0x4681c7){return _0x4681c7[_0xefb9('0x33')]()[_0xefb9('0x1d')](function(){_0x169ac6[_0xefb9('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x49f19a,_0x34f7ab){return function(_0x29cb93){if(!_0x29cb93){_0x49f19a[_0xefb9('0x34')](0x194);}return _0x29cb93;};}function handleError(_0x3ef50b,_0x2fc4a5){_0x2fc4a5=_0x2fc4a5||0x1f4;return function(_0x4b6ef8){logger[_0xefb9('0x24')](_0x4b6ef8['stack']);if(_0x4b6ef8[_0xefb9('0x35')]){delete _0x4b6ef8['name'];}_0x3ef50b[_0xefb9('0x2a')](_0x2fc4a5)[_0xefb9('0x36')](_0x4b6ef8);};}exports[_0xefb9('0x37')]=function(_0x59546a,_0x29d1db){var _0x410f62={},_0x59a9e5={},_0x8b504c={'count':0x0,'rows':[]};var _0x67d8a8=_[_0xefb9('0x38')](db[_0xefb9('0x39')]['rawAttributes'],function(_0x588ba2){return{'name':_0x588ba2[_0xefb9('0x3a')],'type':_0x588ba2['type']['key']};});_0x59a9e5[_0xefb9('0x3b')]=_[_0xefb9('0x38')](_0x67d8a8,'name');_0x59a9e5[_0xefb9('0x3c')]=_[_0xefb9('0x3d')](_0x59546a['query']);_0x59a9e5['filters']=_['intersection'](_0x59a9e5[_0xefb9('0x3b')],_0x59a9e5[_0xefb9('0x3c')]);_0x410f62[_0xefb9('0x3e')]=_['intersection'](_0x59a9e5[_0xefb9('0x3b')],qs[_0xefb9('0x3f')](_0x59546a['query'][_0xefb9('0x3f')]));_0x410f62[_0xefb9('0x3e')]=_0x410f62[_0xefb9('0x3e')][_0xefb9('0x40')]?_0x410f62[_0xefb9('0x3e')]:_0x59a9e5[_0xefb9('0x3b')];if(!_0x59546a[_0xefb9('0x3c')][_0xefb9('0x41')](_0xefb9('0x42'))){_0x410f62[_0xefb9('0x2e')]=qs['limit'](_0x59546a[_0xefb9('0x3c')][_0xefb9('0x2e')]);_0x410f62[_0xefb9('0x2c')]=qs['offset'](_0x59546a[_0xefb9('0x3c')]['offset']);}_0x410f62[_0xefb9('0x43')]=qs[_0xefb9('0x44')](_0x59546a[_0xefb9('0x3c')][_0xefb9('0x44')]);_0x410f62[_0xefb9('0x45')]=qs[_0xefb9('0x46')](_[_0xefb9('0x47')](_0x59546a['query'],_0x59a9e5['filters']),_0x67d8a8);if(_0x59546a[_0xefb9('0x3c')][_0xefb9('0x48')]){_0x410f62[_0xefb9('0x45')]=_[_0xefb9('0x49')](_0x410f62['where'],{'$or':_[_0xefb9('0x38')](_0x67d8a8,function(_0x5ed7df){if(_0x5ed7df[_0xefb9('0x4a')]!==_0xefb9('0x4b')){var _0x24939e={};_0x24939e[_0x5ed7df[_0xefb9('0x35')]]={'$like':'%'+_0x59546a[_0xefb9('0x3c')][_0xefb9('0x48')]+'%'};return _0x24939e;}})});}_0x410f62=_[_0xefb9('0x49')]({},_0x410f62,_0x59546a[_0xefb9('0x4c')]);var _0x4947a1={'where':_0x410f62[_0xefb9('0x45')]};return db[_0xefb9('0x39')]['count'](_0x4947a1)[_0xefb9('0x1d')](function(_0x4641f8){_0x8b504c[_0xefb9('0x2f')]=_0x4641f8;if(_0x59546a[_0xefb9('0x3c')][_0xefb9('0x4d')]){_0x410f62[_0xefb9('0x4e')]=[{'all':!![]}];}return db[_0xefb9('0x39')][_0xefb9('0x4f')](_0x410f62);})['then'](function(_0x331885){_0x8b504c[_0xefb9('0x50')]=_0x331885;return _0x8b504c;})[_0xefb9('0x1d')](respondWithFilteredResult(_0x29d1db,_0x410f62))[_0xefb9('0x28')](handleError(_0x29d1db,null));};exports['show']=function(_0x306d3c,_0x4195f9){var _0x17503b={'raw':!![],'where':{'id':_0x306d3c['params']['id']}},_0x4ce9d5={};_0x4ce9d5[_0xefb9('0x3b')]=_[_0xefb9('0x3d')](db[_0xefb9('0x39')]['rawAttributes']);_0x4ce9d5['query']=_[_0xefb9('0x3d')](_0x306d3c[_0xefb9('0x3c')]);_0x4ce9d5['filters']=_[_0xefb9('0x51')](_0x4ce9d5['model'],_0x4ce9d5[_0xefb9('0x3c')]);_0x17503b['attributes']=_[_0xefb9('0x51')](_0x4ce9d5[_0xefb9('0x3b')],qs[_0xefb9('0x3f')](_0x306d3c['query']['fields']));_0x17503b['attributes']=_0x17503b[_0xefb9('0x3e')][_0xefb9('0x40')]?_0x17503b[_0xefb9('0x3e')]:_0x4ce9d5[_0xefb9('0x3b')];if(_0x306d3c[_0xefb9('0x3c')]['includeAll']){_0x17503b[_0xefb9('0x4e')]=[{'all':!![]}];}_0x17503b=_[_0xefb9('0x49')]({},_0x17503b,_0x306d3c[_0xefb9('0x4c')]);return db['WhatsappMessage'][_0xefb9('0x52')](_0x17503b)[_0xefb9('0x1d')](handleEntityNotFound(_0x4195f9,null))[_0xefb9('0x1d')](respondWithResult(_0x4195f9,null))[_0xefb9('0x28')](handleError(_0x4195f9,null));};exports['create']=function(_0x359841,_0x529737){return db[_0xefb9('0x39')]['create'](_0x359841['body'],{})[_0xefb9('0x1d')](respondWithResult(_0x529737,0xc9))[_0xefb9('0x28')](handleError(_0x529737,null));};exports[_0xefb9('0x32')]=function(_0x1876d9,_0x3e7313){if(_0x1876d9[_0xefb9('0x53')]['id']){delete _0x1876d9[_0xefb9('0x53')]['id'];}return db[_0xefb9('0x39')]['find']({'where':{'id':_0x1876d9[_0xefb9('0x54')]['id']}})[_0xefb9('0x1d')](handleEntityNotFound(_0x3e7313,null))[_0xefb9('0x1d')](saveUpdates(_0x1876d9[_0xefb9('0x53')],null))[_0xefb9('0x1d')](respondWithResult(_0x3e7313,null))[_0xefb9('0x28')](handleError(_0x3e7313,null));};exports['destroy']=function(_0x330f62,_0x25a639){return db[_0xefb9('0x39')][_0xefb9('0x52')]({'where':{'id':_0x330f62[_0xefb9('0x54')]['id']}})[_0xefb9('0x1d')](handleEntityNotFound(_0x25a639,null))[_0xefb9('0x1d')](removeEntity(_0x25a639,null))[_0xefb9('0x28')](handleError(_0x25a639,null));};exports['describe']=function(_0xa1f36b,_0x6d7606){return db[_0xefb9('0x39')][_0xefb9('0x55')]()[_0xefb9('0x1d')](respondWithResult(_0x6d7606,null))[_0xefb9('0x28')](handleError(_0x6d7606,null));};var interaction_log=require(_0xefb9('0x56'))(_0xefb9('0x57'));exports[_0xefb9('0x58')]=function(_0x5328cf,_0x4ae19c,_0x468932){var _0x30c5b7={'agent':{},'channel':_0xefb9('0x59')};if(_0x5328cf[_0xefb9('0x53')]['id']){delete _0x5328cf[_0xefb9('0x53')]['id'];}_0x5328cf[_0xefb9('0x53')][_0xefb9('0x5a')]=!![];_0x5328cf[_0xefb9('0x53')][_0xefb9('0x5b')]=moment()[_0xefb9('0x5c')](_0xefb9('0x5d'));_0x5328cf['body'][_0xefb9('0x5e')]=_0x5328cf[_0xefb9('0x53')]['UserId']||_0x5328cf[_0xefb9('0x5f')]['id'];_0x30c5b7[_0xefb9('0x60')]['id']=_0x5328cf[_0xefb9('0x53')][_0xefb9('0x5e')];return db['WhatsappMessage'][_0xefb9('0x52')]({'where':{'id':_0x5328cf[_0xefb9('0x54')]['id'],'UserId':null},'include':[{'model':db[_0xefb9('0x61')],'as':'Contact'}]})[_0xefb9('0x1d')](handleEntityNotFound(_0x4ae19c,null))[_0xefb9('0x1d')](saveUpdates(_0x5328cf[_0xefb9('0x53')],null))['then'](function(_0x2d7190){if(_0x2d7190){_0x30c5b7[_0xefb9('0x26')]=_0x2d7190[_0xefb9('0x62')]({'plain':!![]});return db['WhatsappInteraction']['find']({'where':{'id':_0x2d7190[_0xefb9('0x63')]}});}return null;})[_0xefb9('0x1d')](handleEntityNotFound(_0x4ae19c,null))[_0xefb9('0x1d')](function(_0x12e9cc){if(_0x12e9cc){return _0x12e9cc[_0xefb9('0x32')]({'UserId':_0x5328cf[_0xefb9('0x53')][_0xefb9('0x5e')],'read1stAt':_[_0xefb9('0x64')](_0x12e9cc[_0xefb9('0x65')])?moment()['format'](_0xefb9('0x5d')):undefined});}return null;})[_0xefb9('0x1d')](function(_0x4586a4){if(_0x4586a4){_0x30c5b7[_0xefb9('0x66')]=_0x4586a4[_0xefb9('0x62')]({'plain':!![]});interaction_log[_0xefb9('0x1e')]('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x5328cf[_0xefb9('0x5f')]['id'],_0x5328cf[_0xefb9('0x5f')][_0xefb9('0x35')],_0x5328cf[_0xefb9('0x5f')][_0xefb9('0x67')],_0x30c5b7[_0xefb9('0x66')]['id'],_0x5328cf['body']?JSON[_0xefb9('0x23')](_0x5328cf[_0xefb9('0x53')]):_0xefb9('0x68'));return respondWithRpcPromise(_0xefb9('0x69'),_0xefb9('0x6a'),_0x30c5b7);}return null;})[_0xefb9('0x1d')](function(_0x613e6c){return db['CmContact'][_0xefb9('0x55')]()['then'](function(_0x2a22d7){var _0x74e0ff=[];for(var _0x24e0e0=0x0;_0x24e0e0=_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 +var _0xa41a=['count','set','Content-Range','reject','save','get','WhatsappQueues','UserProfileResource','destroy','then','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','limit','order','sort','pick','where','merge','type','VIRTUAL','filter','options','includeAll','include','WhatsappQueue','findAll','rows','show','catch','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','error','update','params','describe','getMembers','findOne','UserWhatsappQueue','hasOwnProperty','nolimit','User','UserId','agent','whatsappPause','updatedAt','createdAt','format','%s/%s','SIP','Team','addTeams','ids','Agents','online','voicePause','interface','flatMap','transaction','each','forEach','userWhatsappQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_whatsapp_queues','WhatsappQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','sequelize','toString','QueryTypes','SELECT','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','emit','userWhatsappQueue:remove','addAgents','spread','isArray','getAgents','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','redis','localhost','socket.io-emitter','./whatsappQueue.socket','sendStatus','status','end','json','offset','undefined'];(function(_0x39376c,_0x9d134b){var _0x46572a=function(_0x54488a){while(--_0x54488a){_0x39376c['push'](_0x39376c['shift']());}};_0x46572a(++_0x9d134b);}(_0xa41a,0x6b));var _0xaa41=function(_0x212da7,_0x3421f3){_0x212da7=_0x212da7-0x0;var _0x3460f3=_0xa41a[_0x212da7];return _0x3460f3;};'use strict';var emlformat=require(_0xaa41('0x0'));var rimraf=require(_0xaa41('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xaa41('0x2'));var rp=require(_0xaa41('0x3'));var moment=require(_0xaa41('0x4'));var BPromise=require(_0xaa41('0x5'));var Mustache=require(_0xaa41('0x6'));var util=require(_0xaa41('0x7'));var path=require(_0xaa41('0x8'));var sox=require(_0xaa41('0x9'));var csv=require('to-csv');var ejs=require(_0xaa41('0xa'));var fs=require('fs');var fs_extra=require(_0xaa41('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xaa41('0xc'));var jsforce=require(_0xaa41('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xaa41('0xe'));var querystring=require(_0xaa41('0xf'));var Papa=require(_0xaa41('0x10'));var Redis=require(_0xaa41('0x11'));var authService=require(_0xaa41('0x12'));var qs=require(_0xaa41('0x13'));var as=require(_0xaa41('0x14'));var hardwareService=require(_0xaa41('0x15'));var logger=require(_0xaa41('0x16'))('api');var utils=require(_0xaa41('0x17'));var config=require(_0xaa41('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0xaa41('0x19')]=_['defaults'](config[_0xaa41('0x19')],{'host':_0xaa41('0x1a'),'port':0x18eb});var socket=require(_0xaa41('0x1b'))(new Redis(config[_0xaa41('0x19')]));require(_0xaa41('0x1c'))['register'](socket);function respondWithStatusCode(_0x1e9d7f,_0x178170){_0x178170=_0x178170||0xcc;return function(_0x1934e9){if(_0x1934e9){return _0x1e9d7f[_0xaa41('0x1d')](_0x178170);}return _0x1e9d7f[_0xaa41('0x1e')](_0x178170)[_0xaa41('0x1f')]();};}function respondWithResult(_0x1e1e02,_0x550ad5){_0x550ad5=_0x550ad5||0xc8;return function(_0x2d868a){if(_0x2d868a){return _0x1e1e02[_0xaa41('0x1e')](_0x550ad5)[_0xaa41('0x20')](_0x2d868a);}};}function respondWithFilteredResult(_0x391b01,_0x230a6a){return function(_0xd20ddf){if(_0xd20ddf){var _0x29efe5=typeof _0x230a6a[_0xaa41('0x21')]===_0xaa41('0x22')&&typeof _0x230a6a['limit']==='undefined';var _0x1f502a=_0xd20ddf[_0xaa41('0x23')];var _0x35c753=_0x29efe5?0x0:_0x230a6a['offset'];var _0x2bf794=_0x29efe5?_0xd20ddf[_0xaa41('0x23')]:_0x230a6a['offset']+_0x230a6a['limit'];var _0x1b1910;if(_0x2bf794>=_0x1f502a){_0x2bf794=_0x1f502a;_0x1b1910=0xc8;}else{_0x1b1910=0xce;}_0x391b01['status'](_0x1b1910);return _0x391b01[_0xaa41('0x24')](_0xaa41('0x25'),_0x35c753+'-'+_0x2bf794+'/'+_0x1f502a)[_0xaa41('0x20')](_0xd20ddf);}return null;};}function patchUpdates(_0x1f27f3){return function(_0x1d623c){try{jsonpatch['apply'](_0x1d623c,_0x1f27f3,!![]);}catch(_0x43c430){return BPromise[_0xaa41('0x26')](_0x43c430);}return _0x1d623c[_0xaa41('0x27')]();};}function saveUpdates(_0x21f596,_0x274630){return function(_0xa1f024){if(_0xa1f024){return _0xa1f024['update'](_0x21f596)['then'](function(_0x16aec5){return _0x16aec5;});}return null;};}function removeEntity(_0x527cac,_0x493a10){return function(_0x12e362){if(_0x12e362){return _0x12e362['destroy']()['then'](function(){var _0x2d0ac0=_0x12e362[_0xaa41('0x28')]({'plain':!![]});var _0x392214=_0xaa41('0x29');return db[_0xaa41('0x2a')][_0xaa41('0x2b')]({'where':{'type':_0x392214,'resourceId':_0x2d0ac0['id']}})['then'](function(){return _0x12e362;});})[_0xaa41('0x2c')](function(){_0x527cac[_0xaa41('0x1e')](0xcc)[_0xaa41('0x1f')]();});}};}function handleEntityNotFound(_0x9a16e3,_0x1d8c2b){return function(_0x4466a3){if(!_0x4466a3){_0x9a16e3[_0xaa41('0x1d')](0x194);}return _0x4466a3;};}function handleError(_0x104a95,_0x4b1800){_0x4b1800=_0x4b1800||0x1f4;return function(_0x377add){logger['error'](_0x377add['stack']);if(_0x377add[_0xaa41('0x2d')]){delete _0x377add[_0xaa41('0x2d')];}_0x104a95['status'](_0x4b1800)[_0xaa41('0x2e')](_0x377add);};}exports[_0xaa41('0x2f')]=function(_0x4e3b44,_0x5022fb){var _0x5c25fb={},_0x1cf3da={},_0x2f5cc0={'count':0x0,'rows':[]};var _0x2a186e=_[_0xaa41('0x30')](db['WhatsappQueue'][_0xaa41('0x31')],function(_0x45c8fe){return{'name':_0x45c8fe[_0xaa41('0x32')],'type':_0x45c8fe['type'][_0xaa41('0x33')]};});_0x1cf3da[_0xaa41('0x34')]=_[_0xaa41('0x30')](_0x2a186e,'name');_0x1cf3da[_0xaa41('0x35')]=_[_0xaa41('0x36')](_0x4e3b44['query']);_0x1cf3da[_0xaa41('0x37')]=_[_0xaa41('0x38')](_0x1cf3da[_0xaa41('0x34')],_0x1cf3da['query']);_0x5c25fb[_0xaa41('0x39')]=_['intersection'](_0x1cf3da[_0xaa41('0x34')],qs[_0xaa41('0x3a')](_0x4e3b44[_0xaa41('0x35')]['fields']));_0x5c25fb['attributes']=_0x5c25fb['attributes'][_0xaa41('0x3b')]?_0x5c25fb[_0xaa41('0x39')]:_0x1cf3da[_0xaa41('0x34')];if(!_0x4e3b44[_0xaa41('0x35')]['hasOwnProperty']('nolimit')){_0x5c25fb[_0xaa41('0x3c')]=qs[_0xaa41('0x3c')](_0x4e3b44[_0xaa41('0x35')][_0xaa41('0x3c')]);_0x5c25fb[_0xaa41('0x21')]=qs[_0xaa41('0x21')](_0x4e3b44[_0xaa41('0x35')]['offset']);}_0x5c25fb[_0xaa41('0x3d')]=qs[_0xaa41('0x3e')](_0x4e3b44[_0xaa41('0x35')][_0xaa41('0x3e')]);_0x5c25fb['where']=qs['filters'](_[_0xaa41('0x3f')](_0x4e3b44[_0xaa41('0x35')],_0x1cf3da['filters']),_0x2a186e);if(_0x4e3b44[_0xaa41('0x35')]['filter']){_0x5c25fb[_0xaa41('0x40')]=_[_0xaa41('0x41')](_0x5c25fb[_0xaa41('0x40')],{'$or':_[_0xaa41('0x30')](_0x2a186e,function(_0x3e6cac){if(_0x3e6cac[_0xaa41('0x42')]!==_0xaa41('0x43')){var _0x21f204={};_0x21f204[_0x3e6cac['name']]={'$like':'%'+_0x4e3b44[_0xaa41('0x35')][_0xaa41('0x44')]+'%'};return _0x21f204;}})});}_0x5c25fb=_[_0xaa41('0x41')]({},_0x5c25fb,_0x4e3b44[_0xaa41('0x45')]);var _0xc84fb8={'where':_0x5c25fb[_0xaa41('0x40')]};return db['WhatsappQueue']['count'](_0xc84fb8)[_0xaa41('0x2c')](function(_0x4f9086){_0x2f5cc0[_0xaa41('0x23')]=_0x4f9086;if(_0x4e3b44[_0xaa41('0x35')][_0xaa41('0x46')]){_0x5c25fb[_0xaa41('0x47')]=[{'all':!![]}];}return db[_0xaa41('0x48')][_0xaa41('0x49')](_0x5c25fb);})[_0xaa41('0x2c')](function(_0x5ee74c){_0x2f5cc0[_0xaa41('0x4a')]=_0x5ee74c;return _0x2f5cc0;})['then'](respondWithFilteredResult(_0x5022fb,_0x5c25fb))['catch'](handleError(_0x5022fb,null));};exports[_0xaa41('0x4b')]=function(_0x5ee127,_0x57240d){var _0x5274c9={'raw':!![],'where':{'id':_0x5ee127['params']['id']}},_0x3bad48={};_0x3bad48[_0xaa41('0x34')]=_[_0xaa41('0x36')](db['WhatsappQueue']['rawAttributes']);_0x3bad48[_0xaa41('0x35')]=_[_0xaa41('0x36')](_0x5ee127[_0xaa41('0x35')]);_0x3bad48[_0xaa41('0x37')]=_[_0xaa41('0x38')](_0x3bad48[_0xaa41('0x34')],_0x3bad48[_0xaa41('0x35')]);_0x5274c9[_0xaa41('0x39')]=_[_0xaa41('0x38')](_0x3bad48['model'],qs[_0xaa41('0x3a')](_0x5ee127[_0xaa41('0x35')][_0xaa41('0x3a')]));_0x5274c9[_0xaa41('0x39')]=_0x5274c9[_0xaa41('0x39')][_0xaa41('0x3b')]?_0x5274c9['attributes']:_0x3bad48[_0xaa41('0x34')];if(_0x5ee127[_0xaa41('0x35')][_0xaa41('0x46')]){_0x5274c9[_0xaa41('0x47')]=[{'all':!![]}];}_0x5274c9=_['merge']({},_0x5274c9,_0x5ee127[_0xaa41('0x45')]);return db['WhatsappQueue']['find'](_0x5274c9)[_0xaa41('0x2c')](handleEntityNotFound(_0x57240d,null))[_0xaa41('0x2c')](respondWithResult(_0x57240d,null))[_0xaa41('0x4c')](handleError(_0x57240d,null));};exports['create']=function(_0xb4773b,_0x3e1a73){return db[_0xaa41('0x48')]['create'](_0xb4773b[_0xaa41('0x4d')],{})[_0xaa41('0x2c')](function(_0x2c68b3){var _0x1378f9=_0xb4773b[_0xaa41('0x4e')][_0xaa41('0x28')]({'plain':!![]});if(!_0x1378f9)throw new Error(_0xaa41('0x4f'));if(_0x1378f9[_0xaa41('0x50')]==='user'){var _0x9f0a81=_0x2c68b3['get']({'plain':!![]});var _0x5ae65e=_0xaa41('0x29');return db[_0xaa41('0x51')][_0xaa41('0x52')]({'where':{'name':_0x5ae65e,'userProfileId':_0x1378f9[_0xaa41('0x53')]},'raw':!![]})[_0xaa41('0x2c')](function(_0x288db3){if(_0x288db3&&_0x288db3[_0xaa41('0x54')]===0x0){return db[_0xaa41('0x2a')]['create']({'name':_0x9f0a81[_0xaa41('0x2d')],'resourceId':_0x9f0a81['id'],'type':_0x288db3[_0xaa41('0x2d')],'sectionId':_0x288db3['id']},{})[_0xaa41('0x2c')](function(){return _0x2c68b3;});}else{return _0x2c68b3;}})['catch'](function(_0x2e0f53){logger[_0xaa41('0x55')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2e0f53);throw _0x2e0f53;});}return _0x2c68b3;})[_0xaa41('0x2c')](respondWithResult(_0x3e1a73,0xc9))[_0xaa41('0x4c')](handleError(_0x3e1a73,null));};exports[_0xaa41('0x56')]=function(_0x4e5a2e,_0x2cf32c){if(_0x4e5a2e[_0xaa41('0x4d')]['id']){delete _0x4e5a2e['body']['id'];}return db['WhatsappQueue'][_0xaa41('0x52')]({'where':{'id':_0x4e5a2e[_0xaa41('0x57')]['id']}})[_0xaa41('0x2c')](handleEntityNotFound(_0x2cf32c,null))['then'](saveUpdates(_0x4e5a2e[_0xaa41('0x4d')],null))[_0xaa41('0x2c')](respondWithResult(_0x2cf32c,null))[_0xaa41('0x4c')](handleError(_0x2cf32c,null));};exports[_0xaa41('0x2b')]=function(_0x2abb78,_0x5ccdc5){return db[_0xaa41('0x48')]['find']({'where':{'id':_0x2abb78['params']['id']}})[_0xaa41('0x2c')](handleEntityNotFound(_0x5ccdc5,null))['then'](removeEntity(_0x5ccdc5,null))[_0xaa41('0x4c')](handleError(_0x5ccdc5,null));};exports[_0xaa41('0x58')]=function(_0x169ddf,_0x5e83e1){return db[_0xaa41('0x48')][_0xaa41('0x58')]()[_0xaa41('0x2c')](respondWithResult(_0x5e83e1,null))[_0xaa41('0x4c')](handleError(_0x5e83e1,null));};exports[_0xaa41('0x59')]=function(_0x332a3c,_0xc56018,_0x337059){var _0x3f91f3={'raw':!![],'where':{}},_0x4e54b0={},_0x35a09e;return db[_0xaa41('0x48')][_0xaa41('0x5a')]({'where':{'id':_0x332a3c['params']['id']}})[_0xaa41('0x2c')](handleEntityNotFound(_0xc56018,null))[_0xaa41('0x2c')](function(_0x157898){if(_0x157898){_0x35a09e=_0x157898[_0xaa41('0x28')]({'plain':!![]});_0x4e54b0[_0xaa41('0x34')]=_[_0xaa41('0x36')](db[_0xaa41('0x5b')]['rawAttributes']);_0x4e54b0['query']=_['keys'](_0x332a3c['query']);_0x4e54b0['filters']=_['intersection'](_0x4e54b0[_0xaa41('0x34')],_0x4e54b0['query']);_0x3f91f3['attributes']=_[_0xaa41('0x38')](_0x4e54b0[_0xaa41('0x34')],qs[_0xaa41('0x3a')](_0x332a3c[_0xaa41('0x35')]['fields']));_0x3f91f3[_0xaa41('0x39')]=_0x3f91f3[_0xaa41('0x39')][_0xaa41('0x3b')]?_0x3f91f3[_0xaa41('0x39')]:_0x4e54b0[_0xaa41('0x34')];if(!_0x332a3c[_0xaa41('0x35')][_0xaa41('0x5c')](_0xaa41('0x5d'))){_0x3f91f3[_0xaa41('0x3c')]=qs['limit'](_0x332a3c[_0xaa41('0x35')][_0xaa41('0x3c')]);_0x3f91f3['offset']=qs['offset'](_0x332a3c['query'][_0xaa41('0x21')]);}_0x3f91f3['order']=qs[_0xaa41('0x3e')](_0x332a3c['query'][_0xaa41('0x3e')]);_0x3f91f3[_0xaa41('0x40')]=qs['filters'](_[_0xaa41('0x3f')](_0x332a3c[_0xaa41('0x35')],_0x4e54b0[_0xaa41('0x37')]));_0x3f91f3[_0xaa41('0x40')]['WhatsappQueueId']=_0x157898['id'];if(_0x332a3c['query'][_0xaa41('0x44')]){_0x3f91f3[_0xaa41('0x40')]=_['merge'](_0x3f91f3['where'],{'$or':_[_0xaa41('0x30')](_0x3f91f3[_0xaa41('0x39')],function(_0x304694){var _0xbeafb5={};_0xbeafb5[_0x304694]={'$like':'%'+_0x332a3c[_0xaa41('0x35')]['filter']+'%'};return _0xbeafb5;})});}_0x3f91f3=_[_0xaa41('0x41')]({},_0x3f91f3,_0x332a3c['options']);return db['UserWhatsappQueue']['findAll'](_0x3f91f3);}})[_0xaa41('0x2c')](function(_0x19ec63){if(_0x19ec63){return db[_0xaa41('0x5e')]['findAndCountAll']({'where':{'id':_[_0xaa41('0x30')](_0x19ec63,_0xaa41('0x5f')),'role':_0xaa41('0x60')},'attributes':['id',_0xaa41('0x2d'),_0xaa41('0x61'),_0xaa41('0x62'),_0xaa41('0x63')]});}})['then'](function(_0x1d2978){if(_0x1d2978){return{'count':_0x1d2978[_0xaa41('0x23')],'rows':_[_0xaa41('0x30')](_0x1d2978[_0xaa41('0x4a')],function(_0x51ff61){return{'membername':_0x51ff61[_0xaa41('0x2d')],'UserId':_0x51ff61['id'],'queue_name':_0x35a09e['name'],'WhatsappQueueId':_0x35a09e['id'],'interface':util[_0xaa41('0x64')](_0xaa41('0x65'),_0xaa41('0x66'),_0x51ff61[_0xaa41('0x2d')]),'penalty':0x0,'paused':_0x51ff61['whatsappPause'],'createdAt':_0x51ff61[_0xaa41('0x63')],'updatedAt':_0x51ff61[_0xaa41('0x62')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xaa41('0x2c')](respondWithFilteredResult(_0xc56018,_0x3f91f3))[_0xaa41('0x4c')](handleError(_0xc56018,null));};exports['getTeams']=function(_0x140d78,_0x50197b,_0x55d380){var _0x24a9a3={};var _0x574316={};var _0x1ac05e;var _0x133368;return db[_0xaa41('0x48')][_0xaa41('0x5a')]({'where':{'id':_0x140d78[_0xaa41('0x57')]['id']}})[_0xaa41('0x2c')](handleEntityNotFound(_0x50197b,null))[_0xaa41('0x2c')](function(_0x297ec6){if(_0x297ec6){_0x1ac05e=_0x297ec6;_0x574316[_0xaa41('0x34')]=_[_0xaa41('0x36')](db[_0xaa41('0x67')]['rawAttributes']);_0x574316[_0xaa41('0x35')]=_[_0xaa41('0x36')](_0x140d78[_0xaa41('0x35')]);_0x574316['filters']=_['intersection'](_0x574316[_0xaa41('0x34')],_0x574316[_0xaa41('0x35')]);_0x24a9a3['attributes']=_[_0xaa41('0x38')](_0x574316[_0xaa41('0x34')],qs['fields'](_0x140d78[_0xaa41('0x35')][_0xaa41('0x3a')]));_0x24a9a3[_0xaa41('0x39')]=_0x24a9a3[_0xaa41('0x39')][_0xaa41('0x3b')]?_0x24a9a3[_0xaa41('0x39')]:_0x574316[_0xaa41('0x34')];_0x24a9a3[_0xaa41('0x3d')]=qs['sort'](_0x140d78['query'][_0xaa41('0x3e')]);_0x24a9a3['where']=qs[_0xaa41('0x37')](_[_0xaa41('0x3f')](_0x140d78[_0xaa41('0x35')],_0x574316['filters']));if(_0x140d78[_0xaa41('0x35')][_0xaa41('0x44')]){_0x24a9a3[_0xaa41('0x40')]=_['merge'](_0x24a9a3[_0xaa41('0x40')],{'$or':_[_0xaa41('0x30')](_0x24a9a3['attributes'],function(_0x3a93bc){var _0x4de25c={};_0x4de25c[_0x3a93bc]={'$like':'%'+_0x140d78['query'][_0xaa41('0x44')]+'%'};return _0x4de25c;})});}_0x24a9a3=_[_0xaa41('0x41')]({},_0x24a9a3,_0x140d78['options']);return _0x1ac05e['getTeams'](_0x24a9a3);}})[_0xaa41('0x2c')](function(_0x1726ec){if(_0x1726ec){_0x133368=_0x1726ec[_0xaa41('0x3b')];if(!_0x140d78[_0xaa41('0x35')]['hasOwnProperty'](_0xaa41('0x5d'))){_0x24a9a3[_0xaa41('0x3c')]=qs[_0xaa41('0x3c')](_0x140d78['query'][_0xaa41('0x3c')]);_0x24a9a3[_0xaa41('0x21')]=qs[_0xaa41('0x21')](_0x140d78['query'][_0xaa41('0x21')]);}return _0x1ac05e['getTeams'](_0x24a9a3);}})['then'](function(_0x364d24){if(_0x364d24){return _0x364d24?{'count':_0x133368,'rows':_0x364d24}:null;}})[_0xaa41('0x2c')](respondWithResult(_0x50197b,null))['catch'](handleError(_0x50197b,null));};exports[_0xaa41('0x68')]=function(_0x9e8ebb,_0x2bbca0,_0x531fd4){var _0x292384=_0x9e8ebb[_0xaa41('0x4d')][_0xaa41('0x69')];return db[_0xaa41('0x67')][_0xaa41('0x49')]({'where':{'id':_0x292384},'attributes':['id'],'include':[{'model':db['User'],'as':_0xaa41('0x6a'),'attributes':['id','name',_0xaa41('0x6b'),_0xaa41('0x6c'),_0xaa41('0x6d')],'raw':!![]}]})[_0xaa41('0x2c')](function(_0x33ec81){if(_0x33ec81){var _0x1302cb=_[_0xaa41('0x6e')](_0x33ec81,function(_0x3361d7){var _0x232f53=_0x3361d7[_0xaa41('0x28')]({'plain':!![]});return _0x232f53[_0xaa41('0x6a')];});return db['WhatsappQueue'][_0xaa41('0x52')]({'where':{'id':_0x9e8ebb[_0xaa41('0x57')]['id']}})['then'](function(_0x2961bc){return db['sequelize'][_0xaa41('0x6f')](function(_0xb44b1f){return _0x2961bc[_0xaa41('0x68')](_0x292384,{'transaction':_0xb44b1f})[_0xaa41('0x2c')](function(){return BPromise[_0xaa41('0x70')](_0x1302cb,function(_0x387dae){return db[_0xaa41('0x5b')]['findOrCreate']({'where':{'UserId':_0x387dae['id'],'WhatsappQueueId':_0x9e8ebb[_0xaa41('0x57')]['id']},'transaction':_0xb44b1f});});})[_0xaa41('0x2c')](function(){_0x1302cb[_0xaa41('0x71')](function(_0x3743fa){socket['emit'](_0xaa41('0x72'),{'UserId':_0x3743fa['id'],'WhatsappQueueId':_0x2961bc['id']});});});});});}})['then'](respondWithStatusCode(_0x2bbca0,null))[_0xaa41('0x4c')](handleError(_0x2bbca0,null));};exports[_0xaa41('0x73')]=function(_0xdaa2bf,_0x127f54,_0x29f5c9){return db['Team'][_0xaa41('0x49')]({'where':{'id':_0xdaa2bf[_0xaa41('0x35')]['ids']},'attributes':['id'],'include':[{'model':db[_0xaa41('0x5e')],'as':_0xaa41('0x6a'),'attributes':['id'],'raw':!![]}]})[_0xaa41('0x2c')](handleEntityNotFound(_0x127f54,null))[_0xaa41('0x2c')](function(_0x298533){var _0x133e29=_[_0xaa41('0x30')](_0x298533,'id');var _0xf7ec0b=[];var _0x53d7b6=[];var _0xb35a1d=squel[_0xaa41('0x74')]();_0xb35a1d[_0xaa41('0x75')](_0xaa41('0x76'))[_0xaa41('0x77')](_0xaa41('0x78'),'tq')['join']('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0xaa41('0x40')](_0xaa41('0x79'),_0xdaa2bf['params']['id']);for(var _0x2aaa0d=0x0;_0x2aaa0d<_0x298533[_0xaa41('0x3b')];_0x2aaa0d+=0x1){let _0x53e565=_0x298533[_0x2aaa0d];for(var _0x19b2a6=0x0;_0x19b2a6<_0x53e565[_0xaa41('0x6a')][_0xaa41('0x3b')];_0x19b2a6+=0x1){let _0x57f67=_0x53e565['Agents'][_0x19b2a6];var _0x346010=_0xb35a1d['clone']();_0x346010[_0xaa41('0x40')](_0xaa41('0x7a'),_0x57f67['id']);_0x53d7b6[_0xaa41('0x7b')](db[_0xaa41('0x7c')][_0xaa41('0x35')](_0x346010[_0xaa41('0x7d')](),{'type':db[_0xaa41('0x7c')][_0xaa41('0x7e')][_0xaa41('0x7f')]})['then'](function(_0x276013){if(_0x276013[_0xaa41('0x3b')]===0x1){return _0x57f67['id'];}else{var _0x1a3dbb=_['every'](_[_0xaa41('0x30')](_0x276013,_0xaa41('0x80')),function(_0x10763e){return _[_0xaa41('0x81')](_0x133e29,_0x10763e);});if(_0x1a3dbb){return _0x57f67['id'];}}}));}}return BPromise[_0xaa41('0x82')](_0x53d7b6)[_0xaa41('0x2c')](function(_0x42deda){_0xf7ec0b=_(_0xf7ec0b)[_0xaa41('0x83')](_0x42deda)[_0xaa41('0x84')]()[_0xaa41('0x85')]();return db[_0xaa41('0x48')]['find']({'where':{'id':_0xdaa2bf[_0xaa41('0x57')]['id']}})[_0xaa41('0x2c')](function(_0x12126a){return db[_0xaa41('0x7c')][_0xaa41('0x6f')](function(_0x5d9c0a){return _0x12126a['removeTeams'](_0xdaa2bf[_0xaa41('0x35')][_0xaa41('0x69')],{'transaction':_0x5d9c0a})['then'](function(){if(!_[_0xaa41('0x86')](_0xf7ec0b)){return _0x12126a[_0xaa41('0x87')](_0xf7ec0b,{'transaction':_0x5d9c0a});}})['then'](function(){_0xf7ec0b['forEach'](function(_0x5be42b){socket[_0xaa41('0x88')](_0xaa41('0x89'),{'UserId':_0x5be42b,'WhatsappQueueId':_0x12126a['id']});});});});});});})[_0xaa41('0x2c')](respondWithStatusCode(_0x127f54,null))[_0xaa41('0x4c')](handleError(_0x127f54,null));};exports[_0xaa41('0x8a')]=function(_0xedd5d1,_0x3d4322,_0x21616a){return db[_0xaa41('0x48')][_0xaa41('0x52')]({'where':{'id':_0xedd5d1[_0xaa41('0x57')]['id']}})['then'](handleEntityNotFound(_0x3d4322,null))['then'](function(_0x2d4776){if(_0x2d4776){return _0x2d4776[_0xaa41('0x8a')](_0xedd5d1['body'][_0xaa41('0x69')],_['omit'](_0xedd5d1[_0xaa41('0x4d')],[_0xaa41('0x69'),'id'])||{})[_0xaa41('0x8b')](function(_0x133d95){for(var _0x389ab7=0x0;_0x389ab7<_0xedd5d1[_0xaa41('0x4d')][_0xaa41('0x69')][_0xaa41('0x3b')];_0x389ab7+=0x1){socket[_0xaa41('0x88')]('userWhatsappQueue:save',{'UserId':_0xedd5d1['body']['ids'][_0x389ab7],'WhatsappQueueId':_0xedd5d1[_0xaa41('0x57')]['id']});}return _0x133d95;});}})[_0xaa41('0x2c')](respondWithResult(_0x3d4322,null))['catch'](handleError(_0x3d4322,null));};exports['removeAgents']=function(_0x445ee8,_0x6ca7d6,_0x557a65){return db['WhatsappQueue'][_0xaa41('0x52')]({'where':{'id':_0x445ee8['params']['id']}})[_0xaa41('0x2c')](handleEntityNotFound(_0x6ca7d6,null))[_0xaa41('0x2c')](function(_0x310973){if(_0x310973){return _0x310973[_0xaa41('0x87')](_0x445ee8[_0xaa41('0x35')][_0xaa41('0x69')])[_0xaa41('0x2c')](function(){if(_[_0xaa41('0x8c')](_0x445ee8[_0xaa41('0x35')]['ids'])){for(var _0x4ed9e7=0x0;_0x4ed9e7<_0x445ee8[_0xaa41('0x35')][_0xaa41('0x69')][_0xaa41('0x3b')];_0x4ed9e7+=0x1){socket[_0xaa41('0x88')](_0xaa41('0x89'),{'UserId':Number(_0x445ee8[_0xaa41('0x35')][_0xaa41('0x69')][_0x4ed9e7]),'WhatsappQueueId':Number(_0x445ee8[_0xaa41('0x57')]['id'])});}}else{socket[_0xaa41('0x88')](_0xaa41('0x89'),{'UserId':Number(_0x445ee8[_0xaa41('0x35')][_0xaa41('0x69')]),'WhatsappQueueId':Number(_0x445ee8[_0xaa41('0x57')]['id'])});}});}})[_0xaa41('0x2c')](respondWithStatusCode(_0x6ca7d6,null))[_0xaa41('0x4c')](handleError(_0x6ca7d6,null));};exports['getAgents']=function(_0x1b7895,_0x5af3bf,_0x353145){var _0x2c524d={};var _0x3cce8f={};var _0x14a0b2;var _0x405c90;return db[_0xaa41('0x48')][_0xaa41('0x5a')]({'where':{'id':_0x1b7895[_0xaa41('0x57')]['id']}})['then'](handleEntityNotFound(_0x5af3bf,null))[_0xaa41('0x2c')](function(_0x1a71e2){if(_0x1a71e2){_0x14a0b2=_0x1a71e2;_0x3cce8f[_0xaa41('0x34')]=_[_0xaa41('0x36')](db[_0xaa41('0x5e')][_0xaa41('0x31')]);_0x3cce8f[_0xaa41('0x35')]=_[_0xaa41('0x36')](_0x1b7895[_0xaa41('0x35')]);_0x3cce8f[_0xaa41('0x37')]=_['intersection'](_0x3cce8f['model'],_0x3cce8f[_0xaa41('0x35')]);_0x2c524d[_0xaa41('0x39')]=_[_0xaa41('0x38')](_0x3cce8f[_0xaa41('0x34')],qs[_0xaa41('0x3a')](_0x1b7895[_0xaa41('0x35')][_0xaa41('0x3a')]));_0x2c524d[_0xaa41('0x39')]=_0x2c524d[_0xaa41('0x39')][_0xaa41('0x3b')]?_0x2c524d['attributes']:_0x3cce8f['model'];_0x2c524d[_0xaa41('0x3d')]=qs[_0xaa41('0x3e')](_0x1b7895['query'][_0xaa41('0x3e')]);_0x2c524d['where']=qs[_0xaa41('0x37')](_[_0xaa41('0x3f')](_0x1b7895['query'],_0x3cce8f['filters']));if(_0x1b7895[_0xaa41('0x35')][_0xaa41('0x44')]){_0x2c524d[_0xaa41('0x40')]=_['merge'](_0x2c524d['where'],{'$or':_[_0xaa41('0x30')](_0x2c524d['attributes'],function(_0x94423a){var _0x59d6cf={};_0x59d6cf[_0x94423a]={'$like':'%'+_0x1b7895[_0xaa41('0x35')][_0xaa41('0x44')]+'%'};return _0x59d6cf;})});}_0x2c524d=_[_0xaa41('0x41')]({},_0x2c524d,_0x1b7895[_0xaa41('0x45')]);return _0x14a0b2[_0xaa41('0x8d')](_0x2c524d);}})[_0xaa41('0x2c')](function(_0xf615eb){if(_0xf615eb){_0x405c90=_0xf615eb['length'];if(!_0x1b7895[_0xaa41('0x35')][_0xaa41('0x5c')]('nolimit')){_0x2c524d[_0xaa41('0x3c')]=qs[_0xaa41('0x3c')](_0x1b7895[_0xaa41('0x35')][_0xaa41('0x3c')]);_0x2c524d['offset']=qs[_0xaa41('0x21')](_0x1b7895[_0xaa41('0x35')][_0xaa41('0x21')]);}return _0x14a0b2[_0xaa41('0x8d')](_0x2c524d);}})[_0xaa41('0x2c')](function(_0x186a52){if(_0x186a52){return _0x186a52?{'count':_0x405c90,'rows':_0x186a52}:null;}})[_0xaa41('0x2c')](respondWithResult(_0x5af3bf,null))[_0xaa41('0x4c')](handleError(_0x5af3bf,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.events.js b/server/api/whatsappQueue/whatsappQueue.events.js index c37ab7e..2e05dcf 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 _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 +var _0xb410=['emit','hook','exports','events','../../mysqldb','WhatsappQueue','update','remove'];(function(_0x4b26b5,_0x4f71fd){var _0x4dec71=function(_0x184329){while(--_0x184329){_0x4b26b5['push'](_0x4b26b5['shift']());}};_0x4dec71(++_0x4f71fd);}(_0xb410,0x173));var _0x0b41=function(_0x2f1762,_0xab43df){_0x2f1762=_0x2f1762-0x0;var _0x8ab21=_0xb410[_0x2f1762];return _0x8ab21;};'use strict';var EventEmitter=require(_0x0b41('0x0'));var WhatsappQueue=require(_0x0b41('0x1'))['db'][_0x0b41('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x0b41('0x3'),'afterDestroy':_0x0b41('0x4')};function emitEvent(_0x1c28e0){return function(_0x37fcf5,_0x5e8437,_0x2e9ae6){WhatsappQueueEvents[_0x0b41('0x5')](_0x1c28e0+':'+_0x37fcf5['id'],_0x37fcf5);WhatsappQueueEvents['emit'](_0x1c28e0,_0x37fcf5);_0x2e9ae6(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappQueue[_0x0b41('0x6')](e,emitEvent(event));}}module[_0x0b41('0x7')]=WhatsappQueueEvents; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.model.js b/server/api/whatsappQueue/whatsappQueue.model.js index 5f3d2d4..fc8ea28 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 _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 +var _0xc0f8=['../../config/environment','exports','define','lodash','api','bluebird','path','rimraf'];(function(_0x47ca44,_0xd69405){var _0x2873b5=function(_0x5dcf1d){while(--_0x5dcf1d){_0x47ca44['push'](_0x47ca44['shift']());}};_0x2873b5(++_0xd69405);}(_0xc0f8,0x173));var _0x8c0f=function(_0x89f76d,_0x9359f7){_0x89f76d=_0x89f76d-0x0;var _0x3963be=_0xc0f8[_0x89f76d];return _0x3963be;};'use strict';var _=require(_0x8c0f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x8c0f('0x1'));var moment=require('moment');var BPromise=require(_0x8c0f('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8c0f('0x3'));var rimraf=require(_0x8c0f('0x4'));var config=require(_0x8c0f('0x5'));var attributes=require('./whatsappQueue.attributes');module[_0x8c0f('0x6')]=function(_0x3abe75,_0x58118c){return _0x3abe75[_0x8c0f('0x7')]('WhatsappQueue',attributes,{'tableName':'whatsapp_queues','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 3a3d3c7..42745cc 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 _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 +var _0xadc0=['socket.io-emitter','./whatsappQueue.socket','register','request','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','GetWhatsappQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowWhatsappQueue','WhatsappQueue','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost'];(function(_0x4de586,_0x183427){var _0x46baf5=function(_0x1157f0){while(--_0x1157f0){_0x4de586['push'](_0x4de586['shift']());}};_0x46baf5(++_0x183427);}(_0xadc0,0x18c));var _0x0adc=function(_0x2d1951,_0x237d81){_0x2d1951=_0x2d1951-0x0;var _0x4e004c=_0xadc0[_0x2d1951];return _0x4e004c;};'use strict';var _=require('lodash');var util=require(_0x0adc('0x0'));var moment=require(_0x0adc('0x1'));var BPromise=require(_0x0adc('0x2'));var rs=require(_0x0adc('0x3'));var fs=require('fs');var Redis=require(_0x0adc('0x4'));var db=require(_0x0adc('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0adc('0x6'))(_0x0adc('0x7'));var config=require(_0x0adc('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0adc('0x9')][_0x0adc('0xa')]({'port':0x232a});config[_0x0adc('0xb')]=_[_0x0adc('0xc')](config[_0x0adc('0xb')],{'host':_0x0adc('0xd'),'port':0x18eb});var socket=require(_0x0adc('0xe'))(new Redis(config[_0x0adc('0xb')]));require(_0x0adc('0xf'))[_0x0adc('0x10')](socket);function respondWithRpcPromise(_0x219db5,_0x36b827,_0x3c2081){return new BPromise(function(_0x52ce7f,_0x3ed051){return client[_0x0adc('0x11')](_0x219db5,_0x3c2081)[_0x0adc('0x12')](function(_0x581c6d){logger[_0x0adc('0x13')](_0x0adc('0x14'),_0x36b827,_0x0adc('0x15'));logger[_0x0adc('0x16')]('WhatsappQueue,\x20%s,\x20%s,\x20%s',_0x36b827,_0x0adc('0x15'),JSON[_0x0adc('0x17')](_0x581c6d));if(_0x581c6d[_0x0adc('0x18')]){if(_0x581c6d[_0x0adc('0x18')]['code']===0x1f4){logger[_0x0adc('0x18')](_0x0adc('0x14'),_0x36b827,_0x581c6d['error']['message']);return _0x3ed051(_0x581c6d[_0x0adc('0x18')][_0x0adc('0x19')]);}logger[_0x0adc('0x18')](_0x0adc('0x14'),_0x36b827,_0x581c6d[_0x0adc('0x18')][_0x0adc('0x19')]);return _0x52ce7f(_0x581c6d['error'][_0x0adc('0x19')]);}else{logger[_0x0adc('0x13')](_0x0adc('0x14'),_0x36b827,_0x0adc('0x15'));_0x52ce7f(_0x581c6d[_0x0adc('0x1a')][_0x0adc('0x19')]);}})[_0x0adc('0x1b')](function(_0x3e0c35){logger['error']('WhatsappQueue,\x20%s,\x20%s',_0x36b827,_0x3e0c35);_0x3ed051(_0x3e0c35);});});}exports[_0x0adc('0x1c')]=function(_0x2c3dc7){var _0x1be039=this;return new Promise(function(_0x4efdb8,_0x2e8d07){return db['WhatsappQueue'][_0x0adc('0x1d')]({'raw':_0x2c3dc7[_0x0adc('0x1e')]?_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x1f')]===undefined?!![]:![]:!![],'where':_0x2c3dc7[_0x0adc('0x1e')]?_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x20')]||null:null,'attributes':_0x2c3dc7['options']?_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x21')]||null:null,'limit':_0x2c3dc7[_0x0adc('0x1e')]?_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x22')]||null:null,'include':_0x2c3dc7[_0x0adc('0x1e')]?_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x23')]?_[_0x0adc('0x24')](_0x2c3dc7[_0x0adc('0x1e')][_0x0adc('0x23')],function(_0x1c7680){return{'model':db[_0x1c7680[_0x0adc('0x25')]],'as':_0x1c7680['as'],'attributes':_0x1c7680[_0x0adc('0x21')],'include':_0x1c7680['include']?_[_0x0adc('0x24')](_0x1c7680[_0x0adc('0x23')],function(_0x3fd71a){return{'model':db[_0x3fd71a['model']],'as':_0x3fd71a['as'],'attributes':_0x3fd71a[_0x0adc('0x21')],'include':_0x3fd71a['include']?_[_0x0adc('0x24')](_0x3fd71a[_0x0adc('0x23')],function(_0x23f2db){return{'model':db[_0x23f2db[_0x0adc('0x25')]],'as':_0x23f2db['as'],'attributes':_0x23f2db[_0x0adc('0x21')]};}):[]};}):[]};}):[]:[]})[_0x0adc('0x12')](function(_0x1c591e){logger['info'](_0x0adc('0x1c'),_0x2c3dc7);logger[_0x0adc('0x16')](_0x0adc('0x1c'),_0x2c3dc7,JSON['stringify'](_0x1c591e));_0x4efdb8(_0x1c591e);})[_0x0adc('0x1b')](function(_0xa0a552){logger[_0x0adc('0x18')](_0x0adc('0x1c'),_0xa0a552[_0x0adc('0x19')],_0x2c3dc7);_0x2e8d07(_0x1be039[_0x0adc('0x18')](0x1f4,_0xa0a552['message']));});});};exports[_0x0adc('0x26')]=function(_0x25cb34){var _0x2d9eb2=this;return new Promise(function(_0x214f3f,_0x4c1541){return db[_0x0adc('0x27')][_0x0adc('0x28')]({'raw':_0x25cb34[_0x0adc('0x1e')]?_0x25cb34[_0x0adc('0x1e')][_0x0adc('0x1f')]===undefined?!![]:![]:!![],'where':_0x25cb34[_0x0adc('0x1e')]?_0x25cb34[_0x0adc('0x1e')][_0x0adc('0x20')]||null:null,'attributes':_0x25cb34[_0x0adc('0x1e')]?_0x25cb34['options'][_0x0adc('0x21')]||null:null,'include':_0x25cb34[_0x0adc('0x1e')]?_0x25cb34[_0x0adc('0x1e')]['include']?_[_0x0adc('0x24')](_0x25cb34['options']['include'],function(_0x5dcc13){return{'model':db[_0x5dcc13['model']],'as':_0x5dcc13['as'],'attributes':_0x5dcc13[_0x0adc('0x21')],'include':_0x5dcc13[_0x0adc('0x23')]?_[_0x0adc('0x24')](_0x5dcc13[_0x0adc('0x23')],function(_0x236092){return{'model':db[_0x236092[_0x0adc('0x25')]],'as':_0x236092['as'],'attributes':_0x236092['attributes'],'include':_0x236092[_0x0adc('0x23')]?_[_0x0adc('0x24')](_0x236092['include'],function(_0x2d5378){return{'model':db[_0x2d5378['model']],'as':_0x2d5378['as'],'attributes':_0x2d5378[_0x0adc('0x21')]};}):[]};}):[]};}):[]:[]})[_0x0adc('0x12')](function(_0xad7908){logger['info'](_0x0adc('0x26'),_0x25cb34);logger['debug'](_0x0adc('0x26'),_0x25cb34,JSON[_0x0adc('0x17')](_0xad7908));_0x214f3f(_0xad7908);})[_0x0adc('0x1b')](function(_0x12b2b9){logger[_0x0adc('0x18')]('ShowWhatsappQueue',_0x12b2b9['message'],_0x25cb34);_0x4c1541(_0x2d9eb2['error'](0x1f4,_0x12b2b9[_0x0adc('0x19')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.socket.js b/server/api/whatsappQueue/whatsappQueue.socket.js index 18a9bb5..712bb13 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 _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 +var _0xbcba=['removeListener','register','length','./whatsappQueue.events','remove'];(function(_0x57062a,_0x123026){var _0xa178da=function(_0x1702d6){while(--_0x1702d6){_0x57062a['push'](_0x57062a['shift']());}};_0xa178da(++_0x123026);}(_0xbcba,0xb2));var _0xabcb=function(_0x5885ed,_0x380b9e){_0x5885ed=_0x5885ed-0x0;var _0x257d9b=_0xbcba[_0x5885ed];return _0x257d9b;};'use strict';var WhatsappQueueEvents=require(_0xabcb('0x0'));var events=['save',_0xabcb('0x1'),'update'];function createListener(_0x156e86,_0x5a4fb5){return function(_0x17343e){_0x5a4fb5['emit'](_0x156e86,_0x17343e);};}function removeListener(_0x4f563a,_0x179827){return function(){WhatsappQueueEvents[_0xabcb('0x2')](_0x4f563a,_0x179827);};}exports[_0xabcb('0x3')]=function(_0x4d5e3d){for(var _0x3a35b0=0x0,_0x241ab8=events[_0xabcb('0x4')];_0x3a35b0<_0x241ab8;_0x3a35b0++){var _0x4e1c10=events[_0x3a35b0];var _0x41c05b=createListener('whatsappQueue:'+_0x4e1c10,_0x4d5e3d);WhatsappQueueEvents['on'](_0x4e1c10,_0x41c05b);}}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/index.js b/server/api/whatsappQueueReport/index.js index cf00117..e444f98 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 _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 +var _0x93ab=['show','delete','/:id','destroy','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./whatsappQueueReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x410140,_0x1ea3da){var _0x346f45=function(_0x2c49ea){while(--_0x2c49ea){_0x410140['push'](_0x410140['shift']());}};_0x346f45(++_0x1ea3da);}(_0x93ab,0x114));var _0xb93a=function(_0x1d8119,_0xc98f17){_0x1d8119=_0x1d8119-0x0;var _0x3e30f6=_0x93ab[_0x1d8119];return _0x3e30f6;};'use strict';var multer=require('multer');var util=require(_0xb93a('0x0'));var path=require(_0xb93a('0x1'));var timeout=require(_0xb93a('0x2'));var express=require(_0xb93a('0x3'));var router=express['Router']();var fs_extra=require(_0xb93a('0x4'));var auth=require(_0xb93a('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xb93a('0x6'));var controller=require(_0xb93a('0x7'));router[_0xb93a('0x8')]('/',auth[_0xb93a('0x9')](),controller[_0xb93a('0xa')]);router[_0xb93a('0x8')](_0xb93a('0xb'),auth[_0xb93a('0x9')](),controller[_0xb93a('0xc')]);router[_0xb93a('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xb93a('0xd')]);router['post']('/',auth[_0xb93a('0x9')](),controller['create']);router['put']('/:id',auth[_0xb93a('0x9')](),controller['update']);router[_0xb93a('0xe')](_0xb93a('0xf'),auth[_0xb93a('0x9')](),controller[_0xb93a('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js index 6dcccf7..24e7ad2 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 _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 +var _0x7a54=['STRING','DATE','sequelize','exports'];(function(_0x39771a,_0x4ae795){var _0x383c6b=function(_0xf7958){while(--_0xf7958){_0x39771a['push'](_0x39771a['shift']());}};_0x383c6b(++_0x4ae795);}(_0x7a54,0x106));var _0x47a5=function(_0x1ced8b,_0xced95d){_0x1ced8b=_0x1ced8b-0x0;var _0x92dfe9=_0x7a54[_0x1ced8b];return _0x92dfe9;};'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 4e00cc4..20c7a38 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 _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 +var _0xbc9d=['index','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','where','filter','map','type','merge','options','WhatsappQueueReport','includeAll','include','findAll','rows','show','params','find','catch','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','save','update','destroy','then','stack','name','send'];(function(_0x43b127,_0x5abe94){var _0x28df91=function(_0x4e32a3){while(--_0x4e32a3){_0x43b127['push'](_0x43b127['shift']());}};_0x28df91(++_0x5abe94);}(_0xbc9d,0xb4));var _0xdbc9=function(_0x109b8d,_0x13784f){_0x109b8d=_0x109b8d-0x0;var _0x19b81e=_0xbc9d[_0x109b8d];return _0x19b81e;};'use strict';var emlformat=require(_0xdbc9('0x0'));var rimraf=require(_0xdbc9('0x1'));var zipdir=require(_0xdbc9('0x2'));var jsonpatch=require(_0xdbc9('0x3'));var rp=require(_0xdbc9('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xdbc9('0x5'));var path=require(_0xdbc9('0x6'));var sox=require(_0xdbc9('0x7'));var csv=require(_0xdbc9('0x8'));var ejs=require(_0xdbc9('0x9'));var fs=require('fs');var fs_extra=require(_0xdbc9('0xa'));var _=require(_0xdbc9('0xb'));var squel=require('squel');var crypto=require(_0xdbc9('0xc'));var jsforce=require(_0xdbc9('0xd'));var deskjs=require(_0xdbc9('0xe'));var toCsv=require('to-csv');var querystring=require(_0xdbc9('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xdbc9('0x10'));var qs=require(_0xdbc9('0x11'));var as=require(_0xdbc9('0x12'));var hardwareService=require(_0xdbc9('0x13'));var logger=require('../../config/logger')(_0xdbc9('0x14'));var utils=require(_0xdbc9('0x15'));var config=require(_0xdbc9('0x16'));var licenseUtil=require(_0xdbc9('0x17'));var db=require(_0xdbc9('0x18'))['db'];function respondWithStatusCode(_0x103d54,_0x48bc83){_0x48bc83=_0x48bc83||0xcc;return function(_0x567e71){if(_0x567e71){return _0x103d54[_0xdbc9('0x19')](_0x48bc83);}return _0x103d54[_0xdbc9('0x1a')](_0x48bc83)[_0xdbc9('0x1b')]();};}function respondWithResult(_0x436e50,_0x53495d){_0x53495d=_0x53495d||0xc8;return function(_0x4a9dcb){if(_0x4a9dcb){return _0x436e50[_0xdbc9('0x1a')](_0x53495d)[_0xdbc9('0x1c')](_0x4a9dcb);}};}function respondWithFilteredResult(_0x3a8a7b,_0x4c7b4f){return function(_0x1b4616){if(_0x1b4616){var _0x1abee8=typeof _0x4c7b4f['offset']===_0xdbc9('0x1d')&&typeof _0x4c7b4f[_0xdbc9('0x1e')]===_0xdbc9('0x1d');var _0x14e655=_0x1b4616[_0xdbc9('0x1f')];var _0x33f1bd=_0x1abee8?0x0:_0x4c7b4f[_0xdbc9('0x20')];var _0xc2ddd2=_0x1abee8?_0x1b4616[_0xdbc9('0x1f')]:_0x4c7b4f[_0xdbc9('0x20')]+_0x4c7b4f['limit'];var _0x1ca5fd;if(_0xc2ddd2>=_0x14e655){_0xc2ddd2=_0x14e655;_0x1ca5fd=0xc8;}else{_0x1ca5fd=0xce;}_0x3a8a7b['status'](_0x1ca5fd);return _0x3a8a7b[_0xdbc9('0x21')](_0xdbc9('0x22'),_0x33f1bd+'-'+_0xc2ddd2+'/'+_0x14e655)['json'](_0x1b4616);}return null;};}function patchUpdates(_0x4408e9){return function(_0x5367dc){try{jsonpatch['apply'](_0x5367dc,_0x4408e9,!![]);}catch(_0x4ab00d){return BPromise['reject'](_0x4ab00d);}return _0x5367dc[_0xdbc9('0x23')]();};}function saveUpdates(_0x2011a2,_0x570ad9){return function(_0x16dcf7){if(_0x16dcf7){return _0x16dcf7[_0xdbc9('0x24')](_0x2011a2)['then'](function(_0x1bc073){return _0x1bc073;});}return null;};}function removeEntity(_0x6b788,_0x1b1c0d){return function(_0x119230){if(_0x119230){return _0x119230[_0xdbc9('0x25')]()[_0xdbc9('0x26')](function(){_0x6b788[_0xdbc9('0x1a')](0xcc)[_0xdbc9('0x1b')]();});}};}function handleEntityNotFound(_0x3c8c1d,_0x4a868b){return function(_0x550bef){if(!_0x550bef){_0x3c8c1d[_0xdbc9('0x19')](0x194);}return _0x550bef;};}function handleError(_0x446ab9,_0x1053ca){_0x1053ca=_0x1053ca||0x1f4;return function(_0x24fdec){logger['error'](_0x24fdec[_0xdbc9('0x27')]);if(_0x24fdec[_0xdbc9('0x28')]){delete _0x24fdec['name'];}_0x446ab9['status'](_0x1053ca)[_0xdbc9('0x29')](_0x24fdec);};}exports[_0xdbc9('0x2a')]=function(_0x473430,_0x59bfd2){var _0x13a432={},_0x539e57={},_0x561f8e={'count':0x0,'rows':[]};var _0x210a40=_['map'](db['WhatsappQueueReport'][_0xdbc9('0x2b')],function(_0x20eb4f){return{'name':_0x20eb4f[_0xdbc9('0x2c')],'type':_0x20eb4f['type'][_0xdbc9('0x2d')]};});_0x539e57[_0xdbc9('0x2e')]=_['map'](_0x210a40,'name');_0x539e57[_0xdbc9('0x2f')]=_[_0xdbc9('0x30')](_0x473430[_0xdbc9('0x2f')]);_0x539e57[_0xdbc9('0x31')]=_[_0xdbc9('0x32')](_0x539e57[_0xdbc9('0x2e')],_0x539e57[_0xdbc9('0x2f')]);_0x13a432['attributes']=_[_0xdbc9('0x32')](_0x539e57[_0xdbc9('0x2e')],qs[_0xdbc9('0x33')](_0x473430[_0xdbc9('0x2f')][_0xdbc9('0x33')]));_0x13a432[_0xdbc9('0x34')]=_0x13a432['attributes'][_0xdbc9('0x35')]?_0x13a432['attributes']:_0x539e57['model'];if(!_0x473430['query']['hasOwnProperty']('nolimit')){_0x13a432[_0xdbc9('0x1e')]=qs[_0xdbc9('0x1e')](_0x473430[_0xdbc9('0x2f')]['limit']);_0x13a432[_0xdbc9('0x20')]=qs[_0xdbc9('0x20')](_0x473430[_0xdbc9('0x2f')][_0xdbc9('0x20')]);}_0x13a432[_0xdbc9('0x36')]=qs[_0xdbc9('0x37')](_0x473430['query'][_0xdbc9('0x37')]);_0x13a432[_0xdbc9('0x38')]=qs[_0xdbc9('0x31')](_['pick'](_0x473430[_0xdbc9('0x2f')],_0x539e57[_0xdbc9('0x31')]),_0x210a40);if(_0x473430[_0xdbc9('0x2f')][_0xdbc9('0x39')]){_0x13a432['where']=_['merge'](_0x13a432[_0xdbc9('0x38')],{'$or':_[_0xdbc9('0x3a')](_0x210a40,function(_0x136392){if(_0x136392[_0xdbc9('0x3b')]!=='VIRTUAL'){var _0x1b651f={};_0x1b651f[_0x136392[_0xdbc9('0x28')]]={'$like':'%'+_0x473430[_0xdbc9('0x2f')]['filter']+'%'};return _0x1b651f;}})});}_0x13a432=_[_0xdbc9('0x3c')]({},_0x13a432,_0x473430[_0xdbc9('0x3d')]);var _0x444219={'where':_0x13a432['where']};return db[_0xdbc9('0x3e')][_0xdbc9('0x1f')](_0x444219)['then'](function(_0x5173c2){_0x561f8e[_0xdbc9('0x1f')]=_0x5173c2;if(_0x473430[_0xdbc9('0x2f')][_0xdbc9('0x3f')]){_0x13a432[_0xdbc9('0x40')]=[{'all':!![]}];}return db['WhatsappQueueReport'][_0xdbc9('0x41')](_0x13a432);})[_0xdbc9('0x26')](function(_0x577725){_0x561f8e[_0xdbc9('0x42')]=_0x577725;return _0x561f8e;})[_0xdbc9('0x26')](respondWithFilteredResult(_0x59bfd2,_0x13a432))['catch'](handleError(_0x59bfd2,null));};exports[_0xdbc9('0x43')]=function(_0x72dee3,_0x2adb23){var _0x3415c3={'raw':!![],'where':{'id':_0x72dee3[_0xdbc9('0x44')]['id']}},_0x3ed4de={};_0x3ed4de[_0xdbc9('0x2e')]=_['keys'](db['WhatsappQueueReport'][_0xdbc9('0x2b')]);_0x3ed4de[_0xdbc9('0x2f')]=_[_0xdbc9('0x30')](_0x72dee3[_0xdbc9('0x2f')]);_0x3ed4de[_0xdbc9('0x31')]=_[_0xdbc9('0x32')](_0x3ed4de[_0xdbc9('0x2e')],_0x3ed4de[_0xdbc9('0x2f')]);_0x3415c3[_0xdbc9('0x34')]=_[_0xdbc9('0x32')](_0x3ed4de[_0xdbc9('0x2e')],qs['fields'](_0x72dee3['query'][_0xdbc9('0x33')]));_0x3415c3[_0xdbc9('0x34')]=_0x3415c3[_0xdbc9('0x34')][_0xdbc9('0x35')]?_0x3415c3[_0xdbc9('0x34')]:_0x3ed4de[_0xdbc9('0x2e')];if(_0x72dee3[_0xdbc9('0x2f')][_0xdbc9('0x3f')]){_0x3415c3['include']=[{'all':!![]}];}_0x3415c3=_['merge']({},_0x3415c3,_0x72dee3[_0xdbc9('0x3d')]);return db[_0xdbc9('0x3e')][_0xdbc9('0x45')](_0x3415c3)[_0xdbc9('0x26')](handleEntityNotFound(_0x2adb23,null))[_0xdbc9('0x26')](respondWithResult(_0x2adb23,null))[_0xdbc9('0x46')](handleError(_0x2adb23,null));};exports[_0xdbc9('0x47')]=function(_0x2ea096,_0x43e3ec){return db['WhatsappQueueReport'][_0xdbc9('0x47')](_0x2ea096[_0xdbc9('0x48')],{})['then'](respondWithResult(_0x43e3ec,0xc9))['catch'](handleError(_0x43e3ec,null));};exports[_0xdbc9('0x24')]=function(_0xc3db3c,_0x133a13){if(_0xc3db3c['body']['id']){delete _0xc3db3c[_0xdbc9('0x48')]['id'];}return db[_0xdbc9('0x3e')][_0xdbc9('0x45')]({'where':{'id':_0xc3db3c[_0xdbc9('0x44')]['id']}})['then'](handleEntityNotFound(_0x133a13,null))[_0xdbc9('0x26')](saveUpdates(_0xc3db3c[_0xdbc9('0x48')],null))[_0xdbc9('0x26')](respondWithResult(_0x133a13,null))[_0xdbc9('0x46')](handleError(_0x133a13,null));};exports['destroy']=function(_0x3e89f5,_0x36c70e){return db[_0xdbc9('0x3e')][_0xdbc9('0x45')]({'where':{'id':_0x3e89f5[_0xdbc9('0x44')]['id']}})[_0xdbc9('0x26')](handleEntityNotFound(_0x36c70e,null))[_0xdbc9('0x26')](removeEntity(_0x36c70e,null))[_0xdbc9('0x46')](handleError(_0x36c70e,null));};exports['describe']=function(_0x1c6e6e,_0x4d09e1){return db[_0xdbc9('0x3e')][_0xdbc9('0x49')]()['then'](respondWithResult(_0x4d09e1,null))['catch'](handleError(_0x4d09e1,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.model.js b/server/api/whatsappQueueReport/whatsappQueueReport.model.js index 349be90..b5be451 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 _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 +var _0xb82b=['lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','./whatsappQueueReport.attributes','exports','WhatsappQueueReport','uniqueid'];(function(_0x59d89e,_0x55edf5){var _0x554e93=function(_0x3d40bc){while(--_0x3d40bc){_0x59d89e['push'](_0x59d89e['shift']());}};_0x554e93(++_0x55edf5);}(_0xb82b,0x84));var _0xbb82=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xb82b[_0x19e35c];return _0x3e1fe8;};'use strict';var _=require(_0xbb82('0x0'));var util=require(_0xbb82('0x1'));var logger=require(_0xbb82('0x2'))(_0xbb82('0x3'));var moment=require(_0xbb82('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbb82('0x5'));var rimraf=require(_0xbb82('0x6'));var config=require(_0xbb82('0x7'));var attributes=require(_0xbb82('0x8'));module[_0xbb82('0x9')]=function(_0x44eb6b,_0x30509b){return _0x44eb6b['define'](_0xbb82('0xa'),attributes,{'tableName':'report_whatsapp_queue','paranoid':![],'indexes':[{'name':_0xbb82('0xb'),'fields':[_0xbb82('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js index df4b0cc..82c8b48 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 _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 +var _0x68bc=['result','body','raw','CreateWhatsappQueueReport','UpdateWhatsappQueueReport','WhatsappQueueReport','update','options','attributes','stringify','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','jayson/promise','client','request','then','info','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','code','WhatsappQueueReport,\x20%s,\x20%s','message','request\x20sent'];(function(_0x39e84d,_0x11931d){var _0x1991bc=function(_0xc81e32){while(--_0xc81e32){_0x39e84d['push'](_0x39e84d['shift']());}};_0x1991bc(++_0x11931d);}(_0x68bc,0x14a));var _0xc68b=function(_0x3b3cb7,_0x49c02d){_0x3b3cb7=_0x3b3cb7-0x0;var _0x3cbdaf=_0x68bc[_0x3b3cb7];return _0x3cbdaf;};'use strict';var _=require(_0xc68b('0x0'));var util=require(_0xc68b('0x1'));var moment=require('moment');var BPromise=require(_0xc68b('0x2'));var rs=require(_0xc68b('0x3'));var fs=require('fs');var Redis=require(_0xc68b('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc68b('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xc68b('0x6'));var client=jayson[_0xc68b('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1e066c,_0x2d497b,_0x396a91){return new BPromise(function(_0x2541fe,_0x220e4d){return client[_0xc68b('0x8')](_0x1e066c,_0x396a91)[_0xc68b('0x9')](function(_0x542686){logger[_0xc68b('0xa')]('WhatsappQueueReport,\x20%s,\x20%s',_0x2d497b,'request\x20sent');logger[_0xc68b('0xb')](_0xc68b('0xc'),_0x2d497b,'request\x20sent',JSON['stringify'](_0x542686));if(_0x542686[_0xc68b('0xd')]){if(_0x542686[_0xc68b('0xd')][_0xc68b('0xe')]===0x1f4){logger[_0xc68b('0xd')](_0xc68b('0xf'),_0x2d497b,_0x542686['error']['message']);return _0x220e4d(_0x542686[_0xc68b('0xd')][_0xc68b('0x10')]);}logger[_0xc68b('0xd')](_0xc68b('0xf'),_0x2d497b,_0x542686['error'][_0xc68b('0x10')]);return _0x2541fe(_0x542686[_0xc68b('0xd')][_0xc68b('0x10')]);}else{logger[_0xc68b('0xa')]('WhatsappQueueReport,\x20%s,\x20%s',_0x2d497b,_0xc68b('0x11'));_0x2541fe(_0x542686[_0xc68b('0x12')]['message']);}})['catch'](function(_0x39722b){logger[_0xc68b('0xd')](_0xc68b('0xf'),_0x2d497b,_0x39722b);_0x220e4d(_0x39722b);});});}exports['CreateWhatsappQueueReport']=function(_0x1a0145){var _0x42545c=this;return new Promise(function(_0xbbdd5c,_0x1b1abf){return db['WhatsappQueueReport']['create'](_0x1a0145[_0xc68b('0x13')],{'raw':_0x1a0145['options']?_0x1a0145['options'][_0xc68b('0x14')]===undefined?!![]:![]:!![]})[_0xc68b('0x9')](function(_0x304084){logger['info'](_0xc68b('0x15'),_0x1a0145);logger['debug'](_0xc68b('0x15'),_0x1a0145,JSON['stringify'](_0x304084));_0xbbdd5c(_0x304084);})['catch'](function(_0x2c5927){logger['error'](_0xc68b('0x15'),_0x2c5927[_0xc68b('0x10')],_0x1a0145);_0x1b1abf(_0x42545c[_0xc68b('0xd')](0x1f4,_0x2c5927[_0xc68b('0x10')]));});});};exports[_0xc68b('0x16')]=function(_0x29fb47){var _0x1b66d2=this;return new Promise(function(_0x345fe8,_0x1ee7a9){return db[_0xc68b('0x17')][_0xc68b('0x18')](_0x29fb47['body'],{'raw':_0x29fb47[_0xc68b('0x19')]?_0x29fb47[_0xc68b('0x19')][_0xc68b('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x29fb47[_0xc68b('0x19')]?_0x29fb47[_0xc68b('0x19')]['where']||null:null,'attributes':_0x29fb47[_0xc68b('0x19')]?_0x29fb47[_0xc68b('0x19')][_0xc68b('0x1a')]||null:null,'limit':_0x29fb47[_0xc68b('0x19')]?_0x29fb47[_0xc68b('0x19')]['limit']||null:null})['then'](function(_0x821da4){logger[_0xc68b('0xa')](_0xc68b('0x16'),_0x29fb47);logger[_0xc68b('0xb')]('UpdateWhatsappQueueReport',_0x29fb47,JSON[_0xc68b('0x1b')](_0x821da4));_0x345fe8(_0x821da4);})[_0xc68b('0x1c')](function(_0xb73a03){logger[_0xc68b('0xd')](_0xc68b('0x16'),_0xb73a03[_0xc68b('0x10')],_0x29fb47);_0x1ee7a9(_0x1b66d2[_0xc68b('0xd')](0x1f4,_0xb73a03[_0xc68b('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/index.js b/server/api/whatsappTransferReport/index.js index 88508c0..f2575b4 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 _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 +var _0x8d60=['show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./whatsappTransferReport.controller','get','isAuthenticated','/describe','describe','/:id'];(function(_0x34d346,_0x4c6502){var _0x122d76=function(_0x22a5fd){while(--_0x22a5fd){_0x34d346['push'](_0x34d346['shift']());}};_0x122d76(++_0x4c6502);}(_0x8d60,0x157));var _0x08d6=function(_0x343e47,_0x16fc0b){_0x343e47=_0x343e47-0x0;var _0x44b434=_0x8d60[_0x343e47];return _0x44b434;};'use strict';var multer=require(_0x08d6('0x0'));var util=require(_0x08d6('0x1'));var path=require(_0x08d6('0x2'));var timeout=require(_0x08d6('0x3'));var express=require(_0x08d6('0x4'));var router=express[_0x08d6('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x08d6('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x08d6('0x7'));var controller=require(_0x08d6('0x8'));router[_0x08d6('0x9')]('/',auth[_0x08d6('0xa')](),controller['index']);router['get'](_0x08d6('0xb'),auth[_0x08d6('0xa')](),controller[_0x08d6('0xc')]);router[_0x08d6('0x9')](_0x08d6('0xd'),auth['isAuthenticated'](),controller[_0x08d6('0xe')]);router[_0x08d6('0xf')]('/',auth[_0x08d6('0xa')](),controller['create']);router[_0x08d6('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x08d6('0x11')]);router[_0x08d6('0x12')](_0x08d6('0xd'),auth[_0x08d6('0xa')](),controller[_0x08d6('0x13')]);module[_0x08d6('0x14')]=router; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js index d3e5acb..ce0ff43 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 _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 +var _0xb350=['ENUM','agent','DATE','sequelize','exports','STRING'];(function(_0x14cb9e,_0x186d3a){var _0x4ac102=function(_0x5d497e){while(--_0x5d497e){_0x14cb9e['push'](_0x14cb9e['shift']());}};_0x4ac102(++_0x186d3a);}(_0xb350,0x6f));var _0x0b35=function(_0x57413f,_0x4f0325){_0x57413f=_0x57413f-0x0;var _0x359a2f=_0xb350[_0x57413f];return _0x359a2f;};'use strict';var Sequelize=require(_0x0b35('0x0'));module[_0x0b35('0x1')]={'uniqueid':{'type':Sequelize[_0x0b35('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x0b35('0x3')]('account',_0x0b35('0x4'),'queue'),'allowNull':![]},'transferredAt':{'type':Sequelize[_0x0b35('0x5')]}}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js index 8ab6e86..30e6d39 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 _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 +var _0xcb2c=['util','path','sox','to-csv','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','sendStatus','status','end','json','offset','undefined','count','limit','set','apply','save','update','then','destroy','error','send','index','rawAttributes','fieldName','type','map','name','query','keys','filters','intersection','model','attributes','fields','length','nolimit','order','sort','filter','where','merge','VIRTUAL','WhatsappTransferReport','includeAll','findAll','rows','catch','show','params','include','options','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache'];(function(_0x2f7b29,_0x584fa3){var _0x1d7a6c=function(_0x450ea3){while(--_0x450ea3){_0x2f7b29['push'](_0x2f7b29['shift']());}};_0x1d7a6c(++_0x584fa3);}(_0xcb2c,0x17a));var _0xccb2=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xcb2c[_0x3054be];return _0x3df150;};'use strict';var emlformat=require(_0xccb2('0x0'));var rimraf=require(_0xccb2('0x1'));var zipdir=require(_0xccb2('0x2'));var jsonpatch=require(_0xccb2('0x3'));var rp=require(_0xccb2('0x4'));var moment=require('moment');var BPromise=require(_0xccb2('0x5'));var Mustache=require(_0xccb2('0x6'));var util=require(_0xccb2('0x7'));var path=require(_0xccb2('0x8'));var sox=require(_0xccb2('0x9'));var csv=require(_0xccb2('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xccb2('0xb'));var squel=require(_0xccb2('0xc'));var crypto=require(_0xccb2('0xd'));var jsforce=require(_0xccb2('0xe'));var deskjs=require(_0xccb2('0xf'));var toCsv=require(_0xccb2('0xa'));var querystring=require(_0xccb2('0x10'));var Papa=require(_0xccb2('0x11'));var Redis=require(_0xccb2('0x12'));var authService=require(_0xccb2('0x13'));var qs=require(_0xccb2('0x14'));var as=require(_0xccb2('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xccb2('0x16'))(_0xccb2('0x17'));var utils=require(_0xccb2('0x18'));var config=require(_0xccb2('0x19'));var licenseUtil=require(_0xccb2('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1f51be,_0x19f151){_0x19f151=_0x19f151||0xcc;return function(_0x4f8aae){if(_0x4f8aae){return _0x1f51be[_0xccb2('0x1b')](_0x19f151);}return _0x1f51be[_0xccb2('0x1c')](_0x19f151)[_0xccb2('0x1d')]();};}function respondWithResult(_0x3a99c2,_0x26b29b){_0x26b29b=_0x26b29b||0xc8;return function(_0x3ee0f1){if(_0x3ee0f1){return _0x3a99c2[_0xccb2('0x1c')](_0x26b29b)[_0xccb2('0x1e')](_0x3ee0f1);}};}function respondWithFilteredResult(_0x332da0,_0x279a44){return function(_0x5853f5){if(_0x5853f5){var _0x16999e=typeof _0x279a44[_0xccb2('0x1f')]===_0xccb2('0x20')&&typeof _0x279a44['limit']===_0xccb2('0x20');var _0x3568a2=_0x5853f5[_0xccb2('0x21')];var _0x8a0290=_0x16999e?0x0:_0x279a44[_0xccb2('0x1f')];var _0x179da7=_0x16999e?_0x5853f5[_0xccb2('0x21')]:_0x279a44[_0xccb2('0x1f')]+_0x279a44[_0xccb2('0x22')];var _0x3b43b4;if(_0x179da7>=_0x3568a2){_0x179da7=_0x3568a2;_0x3b43b4=0xc8;}else{_0x3b43b4=0xce;}_0x332da0[_0xccb2('0x1c')](_0x3b43b4);return _0x332da0[_0xccb2('0x23')]('Content-Range',_0x8a0290+'-'+_0x179da7+'/'+_0x3568a2)[_0xccb2('0x1e')](_0x5853f5);}return null;};}function patchUpdates(_0x256919){return function(_0x91dd27){try{jsonpatch[_0xccb2('0x24')](_0x91dd27,_0x256919,!![]);}catch(_0x4033b0){return BPromise['reject'](_0x4033b0);}return _0x91dd27[_0xccb2('0x25')]();};}function saveUpdates(_0x3ea7c4,_0x41d42e){return function(_0x4dc422){if(_0x4dc422){return _0x4dc422[_0xccb2('0x26')](_0x3ea7c4)[_0xccb2('0x27')](function(_0x4f94fa){return _0x4f94fa;});}return null;};}function removeEntity(_0x1d05f4,_0x7cb512){return function(_0x5d2e60){if(_0x5d2e60){return _0x5d2e60[_0xccb2('0x28')]()[_0xccb2('0x27')](function(){_0x1d05f4[_0xccb2('0x1c')](0xcc)[_0xccb2('0x1d')]();});}};}function handleEntityNotFound(_0x4136a1,_0x461711){return function(_0x3008c4){if(!_0x3008c4){_0x4136a1[_0xccb2('0x1b')](0x194);}return _0x3008c4;};}function handleError(_0x2f22c3,_0x539f9f){_0x539f9f=_0x539f9f||0x1f4;return function(_0x245739){logger[_0xccb2('0x29')](_0x245739['stack']);if(_0x245739['name']){delete _0x245739['name'];}_0x2f22c3[_0xccb2('0x1c')](_0x539f9f)[_0xccb2('0x2a')](_0x245739);};}exports[_0xccb2('0x2b')]=function(_0x529e53,_0x3c876a){var _0x2383b0={},_0x5737a6={},_0x38db28={'count':0x0,'rows':[]};var _0x398511=_['map'](db['WhatsappTransferReport'][_0xccb2('0x2c')],function(_0x133a91){return{'name':_0x133a91[_0xccb2('0x2d')],'type':_0x133a91[_0xccb2('0x2e')]['key']};});_0x5737a6['model']=_[_0xccb2('0x2f')](_0x398511,_0xccb2('0x30'));_0x5737a6[_0xccb2('0x31')]=_[_0xccb2('0x32')](_0x529e53[_0xccb2('0x31')]);_0x5737a6[_0xccb2('0x33')]=_[_0xccb2('0x34')](_0x5737a6[_0xccb2('0x35')],_0x5737a6[_0xccb2('0x31')]);_0x2383b0[_0xccb2('0x36')]=_[_0xccb2('0x34')](_0x5737a6[_0xccb2('0x35')],qs['fields'](_0x529e53[_0xccb2('0x31')][_0xccb2('0x37')]));_0x2383b0[_0xccb2('0x36')]=_0x2383b0[_0xccb2('0x36')][_0xccb2('0x38')]?_0x2383b0[_0xccb2('0x36')]:_0x5737a6[_0xccb2('0x35')];if(!_0x529e53[_0xccb2('0x31')]['hasOwnProperty'](_0xccb2('0x39'))){_0x2383b0['limit']=qs[_0xccb2('0x22')](_0x529e53[_0xccb2('0x31')][_0xccb2('0x22')]);_0x2383b0['offset']=qs['offset'](_0x529e53[_0xccb2('0x31')][_0xccb2('0x1f')]);}_0x2383b0[_0xccb2('0x3a')]=qs[_0xccb2('0x3b')](_0x529e53[_0xccb2('0x31')][_0xccb2('0x3b')]);_0x2383b0['where']=qs[_0xccb2('0x33')](_['pick'](_0x529e53[_0xccb2('0x31')],_0x5737a6['filters']),_0x398511);if(_0x529e53[_0xccb2('0x31')][_0xccb2('0x3c')]){_0x2383b0[_0xccb2('0x3d')]=_[_0xccb2('0x3e')](_0x2383b0[_0xccb2('0x3d')],{'$or':_[_0xccb2('0x2f')](_0x398511,function(_0x2feb7a){if(_0x2feb7a[_0xccb2('0x2e')]!==_0xccb2('0x3f')){var _0x1fe6ed={};_0x1fe6ed[_0x2feb7a[_0xccb2('0x30')]]={'$like':'%'+_0x529e53['query'][_0xccb2('0x3c')]+'%'};return _0x1fe6ed;}})});}_0x2383b0=_[_0xccb2('0x3e')]({},_0x2383b0,_0x529e53['options']);var _0x3497bb={'where':_0x2383b0['where']};return db[_0xccb2('0x40')][_0xccb2('0x21')](_0x3497bb)[_0xccb2('0x27')](function(_0x1d4838){_0x38db28[_0xccb2('0x21')]=_0x1d4838;if(_0x529e53[_0xccb2('0x31')][_0xccb2('0x41')]){_0x2383b0['include']=[{'all':!![]}];}return db[_0xccb2('0x40')][_0xccb2('0x42')](_0x2383b0);})[_0xccb2('0x27')](function(_0x478407){_0x38db28[_0xccb2('0x43')]=_0x478407;return _0x38db28;})[_0xccb2('0x27')](respondWithFilteredResult(_0x3c876a,_0x2383b0))[_0xccb2('0x44')](handleError(_0x3c876a,null));};exports[_0xccb2('0x45')]=function(_0x204594,_0x1a6a93){var _0x4244f4={'raw':!![],'where':{'id':_0x204594[_0xccb2('0x46')]['id']}},_0x41f294={};_0x41f294[_0xccb2('0x35')]=_['keys'](db[_0xccb2('0x40')][_0xccb2('0x2c')]);_0x41f294[_0xccb2('0x31')]=_[_0xccb2('0x32')](_0x204594[_0xccb2('0x31')]);_0x41f294[_0xccb2('0x33')]=_[_0xccb2('0x34')](_0x41f294['model'],_0x41f294[_0xccb2('0x31')]);_0x4244f4[_0xccb2('0x36')]=_[_0xccb2('0x34')](_0x41f294['model'],qs[_0xccb2('0x37')](_0x204594[_0xccb2('0x31')][_0xccb2('0x37')]));_0x4244f4[_0xccb2('0x36')]=_0x4244f4[_0xccb2('0x36')][_0xccb2('0x38')]?_0x4244f4['attributes']:_0x41f294[_0xccb2('0x35')];if(_0x204594[_0xccb2('0x31')][_0xccb2('0x41')]){_0x4244f4[_0xccb2('0x47')]=[{'all':!![]}];}_0x4244f4=_[_0xccb2('0x3e')]({},_0x4244f4,_0x204594[_0xccb2('0x48')]);return db[_0xccb2('0x40')][_0xccb2('0x49')](_0x4244f4)[_0xccb2('0x27')](handleEntityNotFound(_0x1a6a93,null))[_0xccb2('0x27')](respondWithResult(_0x1a6a93,null))[_0xccb2('0x44')](handleError(_0x1a6a93,null));};exports[_0xccb2('0x4a')]=function(_0x3fa7a3,_0x54b1ef){return db[_0xccb2('0x40')][_0xccb2('0x4a')](_0x3fa7a3['body'],{})[_0xccb2('0x27')](respondWithResult(_0x54b1ef,0xc9))[_0xccb2('0x44')](handleError(_0x54b1ef,null));};exports[_0xccb2('0x26')]=function(_0x2b3a00,_0x32bf3f){if(_0x2b3a00[_0xccb2('0x4b')]['id']){delete _0x2b3a00['body']['id'];}return db[_0xccb2('0x40')][_0xccb2('0x49')]({'where':{'id':_0x2b3a00[_0xccb2('0x46')]['id']}})[_0xccb2('0x27')](handleEntityNotFound(_0x32bf3f,null))['then'](saveUpdates(_0x2b3a00['body'],null))[_0xccb2('0x27')](respondWithResult(_0x32bf3f,null))[_0xccb2('0x44')](handleError(_0x32bf3f,null));};exports[_0xccb2('0x28')]=function(_0x580760,_0x4758b9){return db[_0xccb2('0x40')]['find']({'where':{'id':_0x580760[_0xccb2('0x46')]['id']}})[_0xccb2('0x27')](handleEntityNotFound(_0x4758b9,null))[_0xccb2('0x27')](removeEntity(_0x4758b9,null))[_0xccb2('0x44')](handleError(_0x4758b9,null));};exports[_0xccb2('0x4c')]=function(_0x246ca0,_0x4e5985){return db[_0xccb2('0x40')]['describe']()[_0xccb2('0x27')](respondWithResult(_0x4e5985,null))['catch'](handleError(_0x4e5985,null));}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.model.js b/server/api/whatsappTransferReport/whatsappTransferReport.model.js index d228ccb..5e457a5 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 _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 +var _0x53f8=['bluebird','path','rimraf','../../config/environment','./whatsappTransferReport.attributes','define','WhatsappTransferReport','uniqueid','lodash','util','api','moment'];(function(_0x18f645,_0x2513d4){var _0x494d39=function(_0x49b37f){while(--_0x49b37f){_0x18f645['push'](_0x18f645['shift']());}};_0x494d39(++_0x2513d4);}(_0x53f8,0xe0));var _0x853f=function(_0x3de8a4,_0x289a5c){_0x3de8a4=_0x3de8a4-0x0;var _0x4635cf=_0x53f8[_0x3de8a4];return _0x4635cf;};'use strict';var _=require(_0x853f('0x0'));var util=require(_0x853f('0x1'));var logger=require('../../config/logger')(_0x853f('0x2'));var moment=require(_0x853f('0x3'));var BPromise=require(_0x853f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x853f('0x5'));var rimraf=require(_0x853f('0x6'));var config=require(_0x853f('0x7'));var attributes=require(_0x853f('0x8'));module['exports']=function(_0x148308,_0x2d3299){return _0x148308[_0x853f('0x9')](_0x853f('0xa'),attributes,{'tableName':'report_whatsapp_transfer','paranoid':![],'indexes':[{'name':_0x853f('0xb'),'fields':[_0x853f('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js index 2065a8a..7b054ff 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 _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 +var _0xbb23=['randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','info','WhatsappTransferReport,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','lodash','moment','bluebird'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0xbb23,0x18c));var _0x3bb2=function(_0x33e60b,_0x324442){_0x33e60b=_0x33e60b-0x0;var _0x38186e=_0xbb23[_0x33e60b];return _0x38186e;};'use strict';var _=require(_0x3bb2('0x0'));var util=require('util');var moment=require(_0x3bb2('0x1'));var BPromise=require(_0x3bb2('0x2'));var rs=require(_0x3bb2('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3bb2('0x4'))['db'];var utils=require(_0x3bb2('0x5'));var logger=require(_0x3bb2('0x6'))('rpc');var config=require(_0x3bb2('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x3bb2('0x8')][_0x3bb2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x23dea8,_0x25d004,_0x119ed8){return new BPromise(function(_0x202a92,_0x2ea3b6){return client[_0x3bb2('0xa')](_0x23dea8,_0x119ed8)['then'](function(_0xa0ed5){logger[_0x3bb2('0xb')](_0x3bb2('0xc'),_0x25d004,_0x3bb2('0xd'));logger[_0x3bb2('0xe')]('WhatsappTransferReport,\x20%s,\x20%s,\x20%s',_0x25d004,'request\x20sent',JSON['stringify'](_0xa0ed5));if(_0xa0ed5[_0x3bb2('0xf')]){if(_0xa0ed5[_0x3bb2('0xf')]['code']===0x1f4){logger['error'](_0x3bb2('0xc'),_0x25d004,_0xa0ed5['error'][_0x3bb2('0x10')]);return _0x2ea3b6(_0xa0ed5[_0x3bb2('0xf')][_0x3bb2('0x10')]);}logger[_0x3bb2('0xf')](_0x3bb2('0xc'),_0x25d004,_0xa0ed5['error'][_0x3bb2('0x10')]);return _0x202a92(_0xa0ed5[_0x3bb2('0xf')][_0x3bb2('0x10')]);}else{logger[_0x3bb2('0xb')]('WhatsappTransferReport,\x20%s,\x20%s',_0x25d004,_0x3bb2('0xd'));_0x202a92(_0xa0ed5[_0x3bb2('0x11')][_0x3bb2('0x10')]);}})[_0x3bb2('0x12')](function(_0x3fc471){logger[_0x3bb2('0xf')](_0x3bb2('0xc'),_0x25d004,_0x3fc471);_0x2ea3b6(_0x3fc471);});});} \ No newline at end of file diff --git a/server/app.js b/server/app.js index 740984e..2f6de0a 100644 --- a/server/app.js +++ b/server/app.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x8028=['status','join','seedDB','./config/seedDB','./config/license','default','error','exit','lodash','./rpc','./config/logger','app','./config/pm2','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/whatsapp','sequelize','sync','then','info','start','Online\x20apps:','map','filter','online','name','Offline\x20apps:'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x8028,0x190));var _0x8802=function(_0x5744f4,_0x25c8a7){_0x5744f4=_0x5744f4-0x0;var _0x257c1b=_0x8028[_0x5744f4];return _0x257c1b;};'use strict';var _=require(_0x8802('0x0'));var mysqldb=require('./mysqldb');var rpc=require(_0x8802('0x1'));var config=require('./config/environment');var logger=require(_0x8802('0x2'))(_0x8802('0x3'));var pm2=require(_0x8802('0x4'));var pm2Config=require(_0x8802('0x5'));var schedule=require(_0x8802('0x6'));var chat=require(_0x8802('0x7'));var whatsapp=require(_0x8802('0x8'));var transcribe=require('./config/schedule/transcribe');function main(){return mysqldb['db'][_0x8802('0x9')][_0x8802('0xa')]()[_0x8802('0xb')](function(){return rpc['listen']();})['then'](function(_0x343919){logger[_0x8802('0xc')](_0x343919);return chat[_0x8802('0xd')]();})[_0x8802('0xb')](function(){return whatsapp[_0x8802('0xd')]();})[_0x8802('0xb')](function(){return schedule[_0x8802('0xd')]();})[_0x8802('0xb')](function(){return transcribe['start']();})['then'](function(_0x554aaf){logger[_0x8802('0xc')](_0x554aaf);return pm2['start'](pm2Config);})['then'](function(_0x41b109){logger[_0x8802('0xc')](_0x8802('0xe'),_[_0x8802('0xf')](_[_0x8802('0x10')](_0x41b109,{'status':_0x8802('0x11')}),_0x8802('0x12'))['join']());logger[_0x8802('0xc')](_0x8802('0x13'),_[_0x8802('0xf')](_[_0x8802('0x10')](_0x41b109,function(_0x12faf9){return _0x12faf9[_0x8802('0x14')]!==_0x8802('0x11');}),_0x8802('0x12'))[_0x8802('0x15')]()||'None');config[_0x8802('0x16')]&&require(_0x8802('0x17'))['default']();require(_0x8802('0x18'))[_0x8802('0x19')]();})['catch'](function(_0x1b8256){logger[_0x8802('0x1a')]('Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s',_0x1b8256);process[_0x8802('0x1b')](0x1);});}main(); \ No newline at end of file diff --git a/server/components/auth/service.js b/server/components/auth/service.js index e494ef9..fc49cbe 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 _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 +var _0x1c40=['voicePause','mailPause','faxPause','smsPause','pauseType','showWebBar','lastLoginAt','crudPermissions','allowmessenger','passwordResetAt','alias','phoneBarAutoAnswer','phoneBarAutoAnswerDelay','phoneBarDnd','phoneBarEnableRecording','phoneBarEnableDtmfTone','phoneBarEnableSettings','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','privacyEnabled','settingsEnabled','downloadVoiceRecordings','downloadOmnichannelInteractions','downloadAttachments','use','user','ChatInteraction','findOne','params','closed','disposition','then','unmanaged','json','Forbidden.','catch','isAuthenticated','headers','authorization','startsWith','User','find','name','pass','status','Unknown\x20authorization\x20format','query','apikey','getUuid','Setting','allowedLoginAttempts','blockDuration','isEqual','apiKeyNonce','nonce','Invalid\x20API\x20access\x20key','blocked','blockedAt','minutes','User\x20not\x20found.','User\x20object\x20not\x20found.','getLicense','Forbidden','isMiddleware','signToken','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','redirect','send','retrieveApiKey','isNil','apiKeyIat','generateApiKey','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','validatePasswordPattern','test','Sequelize','ValidationError','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','split','toLowerCase','format','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','length','encryptString','join','sign','secret','payload','options','promisify','randomBytes','toString','hex','floor','../../mysqldb','../../config/environment','../encryptor','express-jwt','composable-middleware','basic-auth','crypto','bluebird','util','moment','secrets','session','fullname','internal','email','userpic','permissions','md5secret'];(function(_0x1e48d3,_0x5d8c43){var _0x2852b1=function(_0x11d7b3){while(--_0x11d7b3){_0x1e48d3['push'](_0x1e48d3['shift']());}};_0x2852b1(++_0x5d8c43);}(_0x1c40,0x1d2));var _0x01c4=function(_0x156a0d,_0x3946ce){_0x156a0d=_0x156a0d-0x0;var _0x98a9ba=_0x1c40[_0x156a0d];return _0x98a9ba;};'use strict';var db=require(_0x01c4('0x0'))['db'];var config=require(_0x01c4('0x1'));var hardwareConf=require('../../config/license/hardware');var licenseUtil=require('../../config/license/util');var encryptor=require(_0x01c4('0x2'));var _=require('lodash');var jwt=require('jsonwebtoken');var expressJwt=require(_0x01c4('0x3'));var compose=require(_0x01c4('0x4'));var basicAuth=require(_0x01c4('0x5'));var crypto=require(_0x01c4('0x6'));var BPromise=require(_0x01c4('0x7'));var util=require(_0x01c4('0x8'));var moment=require(_0x01c4('0x9'));var validateJwt=expressJwt({'secret':config[_0x01c4('0xa')][_0x01c4('0xb')]});var userAttributes=['id','role',_0x01c4('0xc'),'name',_0x01c4('0xd'),_0x01c4('0xe'),_0x01c4('0xf'),_0x01c4('0x10'),_0x01c4('0x11'),_0x01c4('0x12'),'chatPause',_0x01c4('0x13'),_0x01c4('0x14'),_0x01c4('0x15'),'openchannelPause',_0x01c4('0x16'),_0x01c4('0x17'),_0x01c4('0x18'),'lastPauseAt',_0x01c4('0x19'),_0x01c4('0x1a'),_0x01c4('0x1b'),_0x01c4('0x1c'),_0x01c4('0x1d'),_0x01c4('0x1e'),_0x01c4('0x1f'),_0x01c4('0x20'),_0x01c4('0x21'),_0x01c4('0x22'),_0x01c4('0x23'),_0x01c4('0x24'),_0x01c4('0x25'),_0x01c4('0x26'),_0x01c4('0x27'),_0x01c4('0x28'),'userProfileId',_0x01c4('0x29'),_0x01c4('0x2a'),'wssPort',_0x01c4('0x2b'),_0x01c4('0x2c'),_0x01c4('0x2d')];exports['isChatInteractionAuthorized']=function(){return this['isAuthenticated'](!![])[_0x01c4('0x2e')](function(_0x5d5371,_0x586a47,_0x37f732){if(_0x5d5371[_0x01c4('0x2f')]){_0x37f732();}else{return db[_0x01c4('0x30')][_0x01c4('0x31')]({'where':{'id':_0x5d5371[_0x01c4('0x32')]['id']},'attributes':['id',_0x01c4('0x33'),_0x01c4('0x34')],'raw':!![]})[_0x01c4('0x35')](function(_0x184e1d){if(_0x184e1d&&_0x184e1d[_0x01c4('0x33')]){return _0x586a47['status'](_0x184e1d['disposition']===_0x01c4('0x36')?0x195:0x193)[_0x01c4('0x37')]({'message':_0x184e1d[_0x01c4('0x34')]===_0x01c4('0x36')?'Unmanaged.':_0x01c4('0x38')});}else{_0x37f732();}})[_0x01c4('0x39')](function(_0x519a58){_0x37f732(_0x519a58);});}});};exports[_0x01c4('0x3a')]=function isAuthenticated(_0x5286a7){return compose()[_0x01c4('0x2e')](function(_0x124454,_0x3b0ad4,_0x4f5fdc){var _0x30df57;if(_0x124454[_0x01c4('0x3b')][_0x01c4('0x3c')]){if(_[_0x01c4('0x3d')](_0x124454[_0x01c4('0x3b')][_0x01c4('0x3c')],'Basic')){var _0x56affd=basicAuth(_0x124454);db[_0x01c4('0x3e')][_0x01c4('0x3f')]({'where':{'name':_0x56affd[_0x01c4('0x40')]}})[_0x01c4('0x35')](function(_0x407a84){if(!_0x407a84||!_0x407a84['authenticate'](_0x56affd[_0x01c4('0x41')])){return _0x3b0ad4[_0x01c4('0x42')](0x191)[_0x01c4('0x37')]({'message':'Wrong\x20credentials.'});}_0x124454['user']={'id':_0x407a84['id']};_0x4f5fdc();})[_0x01c4('0x39')](function(_0x4a8a10){_0x4f5fdc(_0x4a8a10);});}else if(_[_0x01c4('0x3d')](_0x124454[_0x01c4('0x3b')][_0x01c4('0x3c')],'Bearer')){validateJwt(_0x124454,_0x3b0ad4,_0x4f5fdc);}else{if(_0x5286a7){_0x4f5fdc();}else{return _0x3b0ad4['status'](0x193)[_0x01c4('0x37')]({'message':_0x01c4('0x43')});}}}else if(_0x124454[_0x01c4('0x44')][_0x01c4('0x45')]){try{var _0x4f39ff={'audience':hardwareConf[_0x01c4('0x46')](),'issuer':hardwareConf[_0x01c4('0x46')]()};verifyJwt(_0x124454[_0x01c4('0x44')][_0x01c4('0x45')],_0x4f39ff)[_0x01c4('0x35')](function(_0x365eeb){return db['User']['find']({'where':{'id':_0x365eeb['sub']}})[_0x01c4('0x35')](function(_0x61169b){_0x30df57=_0x61169b;return db[_0x01c4('0x47')]['findOne']({'where':{'id':0x1},'attributes':[_0x01c4('0x48'),_0x01c4('0x49')],'raw':!![]});})[_0x01c4('0x35')](function(_0x11e878){if(!_0x30df57||!_[_0x01c4('0x4a')](_0x30df57[_0x01c4('0x4b')],_0x365eeb[_0x01c4('0x4c')])){return _0x3b0ad4['status'](0x191)['json']({'message':'API\x20access\x20key\x20is\x20not\x20valid\x20anymore'});}if(_0x30df57['disabled']){return _0x3b0ad4['status'](0x191)[_0x01c4('0x37')]({'message':_0x01c4('0x4d')});}if(_0x30df57[_0x01c4('0x4e')]){if(_0x11e878[_0x01c4('0x49')]>0x0){if(moment(_0x30df57[_0x01c4('0x4f')])['add'](_0x11e878[_0x01c4('0x49')],_0x01c4('0x50'))>moment()){return _0x3b0ad4['status'](0x191)[_0x01c4('0x37')]({'message':_0x01c4('0x4d')});}}else{return _0x3b0ad4['status'](0x191)[_0x01c4('0x37')]({'message':_0x01c4('0x4d')});}}_0x124454[_0x01c4('0x2f')]={'id':_0x30df57['id']};_0x4f5fdc();});})['catch'](function(){return _0x3b0ad4[_0x01c4('0x42')](0x191)['json']({'message':_0x01c4('0x4d')});});}catch(_0x10e1ba){_0x4f5fdc(_0x10e1ba);}}else if(_0x5286a7){_0x4f5fdc();}else{return _0x3b0ad4[_0x01c4('0x42')](0x193)[_0x01c4('0x37')]({'message':_0x01c4('0x43')});}})['use'](function(_0x495bc7,_0x5aa8eb,_0x3fb4eb){if(_0x495bc7['user']){db[_0x01c4('0x3e')][_0x01c4('0x3f')]({'where':{'id':_0x495bc7[_0x01c4('0x2f')]['id']},'attributes':userAttributes})[_0x01c4('0x35')](function(_0x2b29de){if(!_0x2b29de){return _0x5aa8eb[_0x01c4('0x42')](0x194)[_0x01c4('0x37')]({'message':_0x01c4('0x51')});}_0x495bc7[_0x01c4('0x2f')]=_0x2b29de;_0x3fb4eb();})['catch'](function(_0x2d31a2){_0x3fb4eb(_0x2d31a2);});}else if(_0x5286a7){_0x3fb4eb();}else{return _0x5aa8eb[_0x01c4('0x42')](0x194)[_0x01c4('0x37')]({'message':_0x01c4('0x52')});}});};exports['canUpdate']=function canUpdate(){return compose()[_0x01c4('0x2e')](function(_0x2b99e4,_0x36702f,_0x455c48){return licenseUtil[_0x01c4('0x53')]()[_0x01c4('0x35')](function(_0x3b50fa){if(_0x3b50fa['update']){_0x455c48();}else{return _0x36702f[_0x01c4('0x42')](0x193)['json']({'message':_0x01c4('0x54')});}})['catch'](function(_0x5d07ca){_0x455c48(_0x5d07ca);});});};exports['isMiddleware']=function(_0x3495cb,_0x18cdfb,_0x36abcd){_0x3495cb[_0x01c4('0x55')]=!![];return _0x36abcd();};exports[_0x01c4('0x56')]=function signToken(_0x3ba9cf){return signJwt(_0x3ba9cf);};exports[_0x01c4('0x57')]=function(_0xd78e47,_0x1f7820){if(!_0xd78e47[_0x01c4('0x2f')]){return _0x1f7820[_0x01c4('0x42')](0x194)['json']({'message':_0x01c4('0x58')});}var _0x44402f={'payload':{'id':_0xd78e47[_0x01c4('0x2f')]['id'],'role':_0xd78e47['user']['role']},'options':{'expiresIn':0x15180}};return signJwt(_0x44402f)[_0x01c4('0x35')](function(_0x32349c){_0x1f7820[_0x01c4('0x59')]('motion.token',_0x32349c);_0x1f7820[_0x01c4('0x5a')]('/dashboards/general');})['catch'](function(_0x5ba945){return _0x1f7820['status'](0x1f4)[_0x01c4('0x5b')](_0x5ba945);});};exports[_0x01c4('0x5c')]=function(_0x1496ea){if(_[_0x01c4('0x5d')](_0x1496ea['apiKeyNonce'])||_[_0x01c4('0x5d')](_0x1496ea[_0x01c4('0x5e')])){return null;}else{return createJwt(_0x1496ea);}};exports[_0x01c4('0x5f')]=function(_0x106dad){_0x106dad[_0x01c4('0x4b')]=generateNonce();_0x106dad[_0x01c4('0x5e')]=generateIssuedAt();return createJwt(_0x106dad);};exports[_0x01c4('0x60')]=function(_0x33327c,_0x23c4ef){var _0x321804=_0x33327c[_0x01c4('0x44')][_0x01c4('0x45')];if(_0x321804){var _0xb8bb5={'nonce':_0x23c4ef[_0x01c4('0x4b')],'iat':_0x23c4ef[_0x01c4('0x5e')],'audience':hardwareConf[_0x01c4('0x46')](),'issuer':hardwareConf[_0x01c4('0x46')]()};return verifyJwt(_0x321804,_0xb8bb5)[_0x01c4('0x35')](function(){return generateApiKey(_0x23c4ef);});}else{throw{'message':_0x01c4('0x61')};}};exports[_0x01c4('0x62')]=function(_0x53f363){var _0x444b78=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x444b78[_0x01c4('0x63')](_0x53f363))throw new db[(_0x01c4('0x64'))][(_0x01c4('0x65'))](_0x01c4('0x66'));return;};exports[_0x01c4('0x67')]=function(_0x24d360,_0xba67ab,_0x10c9d5){var _0x8dbecc=encryptor[_0x01c4('0x68')](_0xba67ab)[_0x01c4('0x69')](',');for(var _0x435c07=0x0;_0x435c07<_0x10c9d5;_0x435c07++){if(!_0x8dbecc[_0x435c07])break;if(_0x24d360[_0x01c4('0x6a')]()===_0x8dbecc[_0x435c07]['toLowerCase']()){var _0x4aecd4=util[_0x01c4('0x6b')]('The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.',_0x10c9d5);if(_0x10c9d5===0x1){_0x4aecd4=_0x01c4('0x6c');}throw new db[(_0x01c4('0x64'))]['ValidationError'](_0x4aecd4);}}return;};exports['updatePasswordsHistory']=function(_0x5e9c96,_0x544ff5){var _0x110ab5=_0x544ff5?encryptor[_0x01c4('0x68')](_0x544ff5)[_0x01c4('0x69')](','):[];if(_0x110ab5[_0x01c4('0x6d')]===0x5){_0x110ab5['splice'](-0x1,0x1);}_0x110ab5['unshift'](_0x5e9c96);return encryptor[_0x01c4('0x6e')](_0x110ab5[_0x01c4('0x6f')](','));};function signJwt(_0x580e33){var _0x20769b=BPromise['promisify'](jwt[_0x01c4('0x70')],{'context':jwt});var _0x2e9ec9=_0x580e33[_0x01c4('0x71')]||config[_0x01c4('0xa')][_0x01c4('0xb')];return new BPromise(function(_0x5e0583,_0x391954){_0x20769b(_0x580e33[_0x01c4('0x72')],_0x2e9ec9,_0x580e33[_0x01c4('0x73')])[_0x01c4('0x35')](function(_0x41719f){_0x5e0583(_0x41719f);})[_0x01c4('0x39')](function(_0x5a7cc2){_0x391954(_0x5a7cc2);});});}function verifyJwt(_0x30b2c7,_0x56d12e,_0x41bd06){var _0x186738=BPromise[_0x01c4('0x74')](jwt['verify'],{'context':jwt});var _0x385b4f=_0x41bd06||config[_0x01c4('0xa')][_0x01c4('0xb')];return new BPromise(function(_0x178b2d,_0xd44059){_0x186738(_0x30b2c7,_0x385b4f,_0x56d12e)[_0x01c4('0x35')](function(_0x5d27d6){_0x178b2d(_0x5d27d6);})[_0x01c4('0x39')](function(_0x40b24c){_0xd44059(_0x40b24c);});});}function generateNonce(){return crypto[_0x01c4('0x75')](0x10)[_0x01c4('0x76')](_0x01c4('0x77'));}function generateIssuedAt(){return Math[_0x01c4('0x78')](Date['now']()/0x3e8)['toString']();}function createJwt(_0x5f4605){var _0x14dc9d={'payload':{'iat':_0x5f4605[_0x01c4('0x5e')],'nonce':_0x5f4605[_0x01c4('0x4b')]},'options':{'algorithm':'HS512','subject':_0x5f4605['id'][_0x01c4('0x76')](),'issuer':hardwareConf[_0x01c4('0x46')](),'audience':hardwareConf[_0x01c4('0x46')]()}};return signJwt(_0x14dc9d)[_0x01c4('0x35')](function(_0x22b5c8){return{'iat':_0x5f4605[_0x01c4('0x5e')],'nonce':_0x5f4605[_0x01c4('0x4b')],'token':_0x22b5c8};});} \ No newline at end of file diff --git a/server/components/encryptor/index.js b/server/components/encryptor/index.js index b30e9fc..7ba08fa 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 _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 +var _0x1bdc=['aes-256-ctr','encrypt','algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','indexOf','hasOwnProperty','encryptFile','createReadStream','createCipher','update','binary','end','final','write','unlink','createWriteStream','createDecipher','data','secret','utf8','base64','decryptString','crypto','bluebird','lodash','../../config/environment','../../config/logger','app','secrets','session'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1bdc,0x12a));var _0xc1bd=function(_0xc8a692,_0x579320){_0xc8a692=_0xc8a692-0x0;var _0x5055d8=_0x1bdc[_0xc8a692];return _0x5055d8;};'use strict';var crypto=require(_0xc1bd('0x0'));var fs=require('fs');var BPromise=require(_0xc1bd('0x1'));var _=require(_0xc1bd('0x2'));var config=require(_0xc1bd('0x3'));var logger=require(_0xc1bd('0x4'))(_0xc1bd('0x5'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0xc1bd('0x6')][_0xc1bd('0x7')],'algorithm':_0xc1bd('0x8')};const fileOptions={'algorithm':'aes192'};if(config[_0xc1bd('0x9')]&&config[_0xc1bd('0x9')][_0xc1bd('0xa')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0xc1bd('0xa')]);if(isSupported){fileOptions[_0xc1bd('0xa')]=config[_0xc1bd('0x9')][_0xc1bd('0xa')];}else{var supportedAlgorithms=getSupportedCiphers()[_0xc1bd('0xb')](',\x20');logger[_0xc1bd('0xc')](config[_0xc1bd('0x9')][_0xc1bd('0xa')],_0xc1bd('0xd'),supportedAlgorithms);}}function isASupportedCipher(_0x5a90d8){return AES_SUPPORTED_RX[_0xc1bd('0xe')](_0x5a90d8);}function getSupportedCiphers(){return crypto[_0xc1bd('0xf')]()['filter'](isASupportedCipher);}function isAlgorithmSupported(_0x1d55ff){return getSupportedCiphers()[_0xc1bd('0x10')](_0x1d55ff)>-0x1;}function combineOptions(_0x586af7){var _0xc298bb={};for(var _0x51e322 in fileOptions){if(fileOptions[_0xc1bd('0x11')](_0x51e322)){_0xc298bb[_0x51e322]=fileOptions[_0x51e322];}}if(_0x586af7){for(var _0x1673d6 in _0x586af7){if(_0x586af7['hasOwnProperty'](_0x1673d6)){_0xc298bb[_0x1673d6]=_0x586af7[_0x1673d6];}}}return _0xc298bb;}exports[_0xc1bd('0x12')]=function(_0x30f99b,_0x2ad711,_0x6a806d,_0xcb83ef){return new BPromise(function(_0x4c7b08,_0x4f7cd6){_0xcb83ef=combineOptions(_0xcb83ef);var _0x1ec906=new Buffer(_0x6a806d);var _0x3df78e=fs[_0xc1bd('0x13')](_0x30f99b);var _0x2b5d34=fs['createWriteStream'](_0x2ad711);var _0xc27d=crypto[_0xc1bd('0x14')](_0xcb83ef[_0xc1bd('0xa')],_0x1ec906);_0x3df78e['on']('data',function(_0x471261){var _0x2b13c2=new Buffer(_0xc27d[_0xc1bd('0x15')](_0x471261),_0xc1bd('0x16'));_0x2b5d34['write'](_0x2b13c2);});_0x3df78e['on'](_0xc1bd('0x17'),function(){try{var _0x4961db=new Buffer(_0xc27d[_0xc1bd('0x18')]('binary'),'binary');_0x2b5d34[_0xc1bd('0x19')](_0x4961db);_0x2b5d34['end']();_0x2b5d34['on']('close',function(){return _0x4c7b08(_0x2ad711);});}catch(_0x2ce7d0){fs[_0xc1bd('0x1a')](_0x2ad711);return _0x4f7cd6(_0x2ce7d0);}});});};exports['decryptFile']=function(_0x2c89a1,_0x500161,_0x5558bf,_0x592085){return new BPromise(function(_0x3cb71a,_0x439a72){_0x592085=combineOptions(_0x592085);var _0x59727d=new Buffer(_0x5558bf);var _0x36fc0f=fs[_0xc1bd('0x13')](_0x2c89a1);var _0xf80094=fs[_0xc1bd('0x1b')](_0x500161);var _0x39b61b=crypto[_0xc1bd('0x1c')](_0x592085['algorithm'],_0x59727d);_0x36fc0f['on'](_0xc1bd('0x1d'),function(_0x7ff0d7){var _0x55e7bc=new Buffer(_0x39b61b['update'](_0x7ff0d7),_0xc1bd('0x16'));_0xf80094[_0xc1bd('0x19')](_0x55e7bc);});_0x36fc0f['on'](_0xc1bd('0x17'),function(){try{var _0x9ef0cd=new Buffer(_0x39b61b['final'](_0xc1bd('0x16')),_0xc1bd('0x16'));_0xf80094[_0xc1bd('0x19')](_0x9ef0cd);_0xf80094['end']();_0xf80094['on']('close',function(){return _0x3cb71a(_0x500161);});}catch(_0x6b6db9){fs[_0xc1bd('0x1a')](_0x500161);return _0x439a72(_0x6b6db9);}});});};exports['encryptString']=function(_0x1d81d5,_0x243186,_0x849294){var _0x19e49a=_0x849294||stringOptions[_0xc1bd('0xa')];var _0xe7b8d=_0x243186||stringOptions[_0xc1bd('0x1e')];var _0x2a1580=crypto['createCipher'](_0x19e49a,_0xe7b8d);var _0x540338=_0x2a1580[_0xc1bd('0x15')](_0x1d81d5,_0xc1bd('0x1f'),_0xc1bd('0x20'));_0x540338+=_0x2a1580['final']('base64');return _0x540338;};exports[_0xc1bd('0x21')]=function(_0x41f78e,_0x4f6f9f,_0x42b81c){var _0x7b089d=_0x42b81c||stringOptions[_0xc1bd('0xa')];var _0x3da4c9=_0x4f6f9f||stringOptions[_0xc1bd('0x1e')];var _0x57d3d9=crypto[_0xc1bd('0x1c')](_0x7b089d,_0x3da4c9);var _0x4e5909=_0x57d3d9[_0xc1bd('0x15')](_0x41f78e,_0xc1bd('0x20'),_0xc1bd('0x1f'));_0x4e5909+=_0x57d3d9[_0xc1bd('0x18')]('utf8');return _0x4e5909;}; \ No newline at end of file diff --git a/server/components/export/csv.js b/server/components/export/csv.js index 0a6a51f..6ca8faa 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 _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 +var _0xdace=['mkdirSync','each','csv','%s.%s','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','CSV','zip','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit','util','lodash','to-csv','bluebird','rimraf','../../mysqldb','dbH','analytics','argv','savename','AnalyticExtractedReport','update','info','format','Setting','find','splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','SELECT','num','Empty','length','split','push','QueryTypes','dirname','basename','.csv','existsSync','join'];(function(_0x1a2996,_0x587098){var _0x4b1432=function(_0x5b6907){while(--_0x5b6907){_0x1a2996['push'](_0x1a2996['shift']());}};_0x4b1432(++_0x587098);}(_0xdace,0xc5));var _0xedac=function(_0x34232c,_0x18e61d){_0x34232c=_0x34232c-0x0;var _0x4d4f4e=_0xdace[_0x34232c];return _0x4d4f4e;};'use strict';var util=require(_0xedac('0x0'));var path=require('path');var _=require(_0xedac('0x1'));var csv=require(_0xedac('0x2'));var fs=require('fs');var BPromise=require(_0xedac('0x3'));var zipdir=require('zip-dir');var rimraf=require(_0xedac('0x4'));var db=require(_0xedac('0x5'))['db'];var dbH=require(_0xedac('0x5'))[_0xedac('0x6')];var logger=require('../../config/logger')(_0xedac('0x7'));var EXTRACTED_REPORT_ID=Number(process[_0xedac('0x8')][0x2]);var QUERY=process[_0xedac('0x8')][0x3];var PATH=process['argv'][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x4081c6,_0x21440e){var _0x162eea={'status':_0x4081c6};var _0x53fa43={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x21440e){_0x162eea[_0xedac('0x9')]=_0x21440e;}return db[_0xedac('0xa')][_0xedac('0xb')](_0x162eea,_0x53fa43);}function main(){var _0x4af030=0x1388;var _0x5e188c;logger[_0xedac('0xc')](util[_0xedac('0xd')]('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,'CSV'));return db[_0xedac('0xe')][_0xedac('0xf')]({'where':{'id':0x1},'raw':!![],'attributes':['id','split',_0xedac('0x10')]})['then'](function(_0x21c6ae){if(_0x21c6ae){_0x5e188c=_0x21c6ae;_0x4af030=_0x5e188c[_0xedac('0x10')]||0x1388;}})[_0xedac('0x11')](function(){return dbH[_0xedac('0x12')][_0xedac('0x13')](util[_0xedac('0xd')](_0xedac('0x14'),QUERY),{'type':dbH[_0xedac('0x12')]['QueryTypes'][_0xedac('0x15')]});})[_0xedac('0x11')](function(_0x2f0c7c){if(!_0x2f0c7c[0x0][_0xedac('0x16')]){return analyticExtractedReport(_0xedac('0x17'));}var _0x590e9b=[];var _0xed25bb=0x0;var _0x594b11=!![];if(_0x2f0c7c&&_0x2f0c7c[_0xedac('0x18')]){var _0x2eeac9=_0x2f0c7c[0x0][_0xedac('0x16')]%(_0xed25bb+_0x4af030);if(_0x5e188c[_0xedac('0x19')]){for(;_0x594b11;_0xed25bb+=_0x4af030,_0x2eeac9=_0x2f0c7c[0x0]['num']%(_0xed25bb+_0x4af030)){if(_0x2eeac9==0x0||_0x2eeac9==_0x2f0c7c[0x0]['num']){_0x594b11=![];}_0x590e9b[_0xedac('0x1a')](dbH[_0xedac('0x12')][_0xedac('0x13')](util[_0xedac('0xd')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x4af030,_0xed25bb),{'type':dbH['sequelize'][_0xedac('0x1b')][_0xedac('0x15')]}));}}else{_0x590e9b[_0xedac('0x1a')](dbH[_0xedac('0x12')][_0xedac('0x13')](QUERY,{'type':dbH[_0xedac('0x12')][_0xedac('0x1b')][_0xedac('0x15')]}));}}var _0x5353e3=path[_0xedac('0x1c')](PATH);var _0x510005=path[_0xedac('0x1d')](PATH,_0xedac('0x1e'));var _0x5111e6=_0x5e188c[_0xedac('0x19')]&&_0x590e9b[_0xedac('0x18')]>0x1;var _0x1c87bf=[];if(!fs[_0xedac('0x1f')](path[_0xedac('0x20')](_0x5353e3,_0x510005))&&_0x5111e6){fs[_0xedac('0x21')](path['join'](_0x5353e3,_0x510005));}return BPromise[_0xedac('0x22')](_0x590e9b,function(_0x87d343){_0x1c87bf[_0xedac('0x1a')](_0x87d343);})[_0xedac('0x11')](function(){for(var _0x1ff33e=0x0;_0x1ff33e<_0x1c87bf[_0xedac('0x18')];_0x1ff33e+=0x1){var _0x40ba53;var _0x26c6f7=_0x1c87bf[_0x1ff33e];if(_0x5111e6){_0x40ba53=path[_0xedac('0x20')](_0x5353e3,_0x510005,util[_0xedac('0xd')]('%s%d.%s',_0x510005,_0x1ff33e,_0xedac('0x23')));}else{_0x40ba53=path[_0xedac('0x20')](_0x5353e3,util[_0xedac('0xd')]('%s.%s',_0x510005,_0xedac('0x23')));}fs['writeFileSync'](_0x40ba53,csv(_0x26c6f7));}})['then'](function(){if(_0x5111e6){zipdir(path[_0xedac('0x20')](_0x5353e3,_0x510005),{'saveTo':path[_0xedac('0x20')](_0x5353e3,util[_0xedac('0xd')](_0xedac('0x24'),_0x510005,'zip'))},function(_0x4e25da,_0xe813e6){});rimraf(path[_0xedac('0x20')](_0x5353e3,_0x510005),function(){});}})[_0xedac('0x11')](function(){logger[_0xedac('0xc')](util[_0xedac('0xd')](_0xedac('0x25'),EXTRACTED_REPORT_ID,_0xedac('0x26')));return analyticExtractedReport('Completed',_0x5111e6?util[_0xedac('0xd')](_0xedac('0x24'),_0x510005,_0x5111e6?_0xedac('0x27'):'csv'):null);});})[_0xedac('0x28')](function(_0x1213dc){logger['info'](util[_0xedac('0xd')](_0xedac('0x29'),EXTRACTED_REPORT_ID,'CSV'),util[_0xedac('0x2a')](_0x1213dc,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xedac('0x2b'));})[_0xedac('0x2c')](function(){process[_0xedac('0x2d')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/export/pdf.js b/server/components/export/pdf.js index b0f4b1c..ba2446f 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 _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 +var _0x0886=['../../config/logger','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','map','tableHeader','fill','length','auto','body','keys','push','format','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','startDate','endDate','header','before','margin','landscape','toString','\x20/\x20','Arial','black','right','Empty','basename','.pdf','%s.%s','pdf','find','split','then','splitSizePdf','num','sequelize','query','QueryTypes','SELECT','existsSync','join','mkdirSync','all','createPdfKitDocument','%s%d.%s','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','CSV','Completed','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','inspect','exit','/fonts/arial-regular.ttf','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','%s\x20#%d','channel','interactionId','YYYY-MM-DD','center','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','footer','pipe','createWriteStream','finish','error','createPdfFromHTML','catch','lodash','util','path','moment','zip-dir','rimraf','JSDOM','window','../../mysqldb','dbH'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0886,0x1ee));var _0x6088=function(_0x5513b3,_0x5a72f3){_0x5513b3=_0x5513b3-0x0;var _0xdd48aa=_0x0886[_0x5513b3];return _0xdd48aa;};'use strict';var _=require(_0x6088('0x0'));var fs=require('fs');var util=require(_0x6088('0x1'));var path=require(_0x6088('0x2'));var moment=require(_0x6088('0x3'));var htmlToPdfmake=require('html-to-pdfmake');var PdfPrinter=require('pdfmake/src/printer');var zipdir=require(_0x6088('0x4'));var rimraf=require(_0x6088('0x5'));var JSDOM=require('jsdom')[_0x6088('0x6')];var window=new JSDOM('')[_0x6088('0x7')];var db=require('../../mysqldb')['db'];var dbH=require(_0x6088('0x8'))[_0x6088('0x9')];var logger=require(_0x6088('0xa'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0x6088('0xb')][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0x6088('0xb')][0x4];var NAME=process['argv'][0x5];var FORMAT=_0x6088('0xc');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x23ccd5,_0x43db8e){var _0x71b27f={'status':_0x23ccd5};var _0x2a7f58={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x43db8e){_0x71b27f[_0x6088('0xd')]=_0x43db8e;}return db[_0x6088('0xe')][_0x6088('0xf')](_0x71b27f,_0x2a7f58);}function getHeaders(_0x2e79fd){return _[_0x6088('0x10')](_0x2e79fd,function(_0x117879){return{'text':_0x117879,'style':_0x6088('0x11')};});}function getRows(_0x347119,_0x4ff348){return _[_0x6088('0x10')](_0x4ff348,function(_0x271c54){return _(_0x271c54)['pick'](_0x347119)[_0x6088('0x10')](function(_0x5f5c15){return _0x5f5c15?_['toString'](_0x5f5c15):'';})['value']();});}function createTable(_0x20a87e,_0x35dfdd){var _0x13ee62={'widths':_[_0x6088('0x12')](Array(_0x20a87e[_0x6088('0x13')]),0x91),'heights':function(_0x42a682){return _0x42a682===0x0?_0x6088('0x14'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x7d5cc4=getHeaders(_0x20a87e);_0x13ee62['body']['push'](_0x7d5cc4);var _0x2513df=getRows(_0x20a87e,_0x35dfdd);_0x13ee62['body']=_0x13ee62[_0x6088('0x15')]['concat'](_0x2513df);return _0x13ee62;}function createTables(_0x169ae1){var _0x5b035c=[];var _0x5a4ba6=_['chunk'](Object[_0x6088('0x16')](_0x169ae1[0x0]),0x5);_0x5a4ba6['forEach'](function(_0x592ae1){_0x5b035c[_0x6088('0x17')](createTable(_0x592ae1,_0x169ae1));});return _0x5b035c;}function getPDFDocDefinition(_0x16ccff){var _0x662624=util[_0x6088('0x18')](_0x6088('0x19'),NAME,EXTRACTED_REPORT['name'],moment(EXTRACTED_REPORT[_0x6088('0x1a')])[_0x6088('0x18')](FORMAT),moment(EXTRACTED_REPORT[_0x6088('0x1b')])[_0x6088('0x18')](FORMAT));var _0x2dd47a=[];for(var _0x1fa597=0x0;_0x1fa597<_0x16ccff[_0x6088('0x13')];_0x1fa597++){var _0x4e5d79=[];if(_0x1fa597===0x0){_0x4e5d79[_0x6088('0x17')]({'text':_0x662624,'style':_0x6088('0x1c')});}var _0xf728a0={'table':_0x16ccff[_0x1fa597]};if(_0x1fa597>0x0){_0xf728a0['pageBreak']=_0x6088('0x1d');_0xf728a0[_0x6088('0x1e')]=[0x0,0x46,0x0,0x0];}_0x4e5d79['push'](_0xf728a0);_0x2dd47a['push'](_0x4e5d79);}return{'pageSize':'A4','pageOrientation':_0x6088('0x1f'),'content':_0x2dd47a,'footer':function(_0x31700a,_0x4a5390){return{'text':_0x31700a[_0x6088('0x20')]()+_0x6088('0x21')+_0x4a5390,'style':'footer'};},'defaultStyle':{'font':_0x6088('0x22')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0x6088('0x23')},'footer':{'alignment':_0x6088('0x24'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x52eb86){var _0x10d056=0x1388;var _0x334c61;if(!_0x52eb86[0x0]['num']){return analyticExtractedReport(_0x6088('0x25'));}var _0x3a28e3=[];var _0x1cc993=0x0;var _0xce4a52=!![];var _0x26321b=path['dirname'](PATH);var _0xa2c104=path[_0x6088('0x26')](PATH,_0x6088('0x27'));var _0x48d837=path['join'](_0x26321b,util[_0x6088('0x18')](_0x6088('0x28'),_0xa2c104,_0x6088('0x29')));var _0x1aa890=![];return db['Setting'][_0x6088('0x2a')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x6088('0x2b'),'splitSizePdf']})[_0x6088('0x2c')](function(_0x357008){if(_0x357008){_0x334c61=_0x357008;_0x10d056=_0x334c61[_0x6088('0x2d')]||0x3e8;}})['then'](function(){if(_0x52eb86&&_0x52eb86[_0x6088('0x13')]){var _0x504024=_0x52eb86[0x0][_0x6088('0x2e')]%(_0x1cc993+_0x10d056);if(_0x334c61['split']){for(;_0xce4a52;_0x1cc993+=_0x10d056,_0x504024=_0x52eb86[0x0][_0x6088('0x2e')]%(_0x1cc993+_0x10d056)){if(_0x504024==0x0||_0x504024==_0x52eb86[0x0][_0x6088('0x2e')]){_0xce4a52=![];}_0x3a28e3[_0x6088('0x17')](dbH[_0x6088('0x2f')][_0x6088('0x30')](util[_0x6088('0x18')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x10d056,_0x1cc993),{'type':dbH[_0x6088('0x2f')][_0x6088('0x31')][_0x6088('0x32')]}));}}else{_0x3a28e3[_0x6088('0x17')](dbH[_0x6088('0x2f')][_0x6088('0x30')](QUERY,{'type':dbH['sequelize'][_0x6088('0x31')][_0x6088('0x32')]}));}}_0x1aa890=_0x334c61[_0x6088('0x2b')]&&_0x3a28e3['length']>0x1;if(!fs[_0x6088('0x33')](path[_0x6088('0x34')](_0x26321b,_0xa2c104))&&_0x1aa890){fs[_0x6088('0x35')](path[_0x6088('0x34')](_0x26321b,_0xa2c104));}return Promise[_0x6088('0x36')](_0x3a28e3);})[_0x6088('0x2c')](function(_0xf1420d){return createTables(_['flatten'](_0xf1420d));})[_0x6088('0x2c')](function(_0x3b81c){var _0x2ffbdd=getPDFDocDefinition(_0x3b81c);var _0x491b7c=getPDFPrinter();var _0x539ec5=_0x491b7c[_0x6088('0x37')](_0x2ffbdd);if(_0x1aa890)_0x48d837=path[_0x6088('0x34')](_0x26321b,_0xa2c104,util[_0x6088('0x18')](_0x6088('0x38'),_0xa2c104,index,_0x6088('0x29')));return writePDFDocument(_0x539ec5,_0x48d837);})[_0x6088('0x2c')](function(){if(!_0x1aa890)return;zipdir(path[_0x6088('0x34')](_0x26321b,_0xa2c104),{'saveTo':path['join'](_0x26321b,util[_0x6088('0x18')]('%s.%s',_0xa2c104,_0x6088('0x39')))},function(_0x229f69){if(_0x229f69)throw _0x229f69;return;});})[_0x6088('0x2c')](function(){if(!_0x1aa890)return;rimraf(path['join'](_0x26321b,_0xa2c104),function(){});})[_0x6088('0x2c')](function(){logger['info'](util[_0x6088('0x18')](_0x6088('0x3a'),EXTRACTED_REPORT_ID,_0x6088('0x3b')));return analyticExtractedReport(_0x6088('0x3c'),_0x1aa890?util[_0x6088('0x18')](_0x6088('0x28'),_0xa2c104,_0x1aa890?_0x6088('0x39'):_0x6088('0x29')):null);});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x6088('0x3d')](util[_0x6088('0x18')](_0x6088('0x3e'),EXTRACTED_REPORT_ID,'PDF'));return db[_0x6088('0xe')]['findOne']({'where':{'id':EXTRACTED_REPORT_ID}})[_0x6088('0x2c')](function(_0x58f75b){EXTRACTED_REPORT=_0x58f75b;return dbH[_0x6088('0x2f')][_0x6088('0x30')](util[_0x6088('0x18')](_0x6088('0x3f'),QUERY),{'type':dbH['sequelize'][_0x6088('0x31')]['SELECT']});})['then'](extractReport)['catch'](function(_0x4d17c2){logger[_0x6088('0x3d')](util[_0x6088('0x18')](_0x6088('0x40'),EXTRACTED_REPORT_ID,_0x6088('0x41')),util[_0x6088('0x42')](_0x4d17c2,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})['finally'](function(){process[_0x6088('0x43')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x3a8c20=new PdfPrinter({'Arial':{'normal':__dirname+_0x6088('0x44'),'bold':__dirname+_0x6088('0x45'),'italics':__dirname+_0x6088('0x46'),'bolditalics':__dirname+'/fonts/arial-bold-italic.ttf'}});return _0x3a8c20;}function getPDFDocDefinitionFromHTML(_0x231f22,_0x2055c3){var _0xdf9cf7=util[_0x6088('0x18')](_0x6088('0x47'),_0x2055c3[_0x6088('0x48')],_0x2055c3[_0x6088('0x49')]);var _0x11b8fe=moment()['format'](_0x6088('0x4a'))['toString']();var _0x56409c=htmlToPdfmake(_0x231f22,{'window':window,'tableAutoSize':!![]});return{'content':[_0x56409c],'defaultStyle':{'font':_0x6088('0x22')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0x6088('0x4b'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':_0x6088('0x4b'),'margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0x6088('0x4b')}},'header':function(){return[{'text':'Interaction\x20Transcript','style':_0x6088('0x1c')}];},'footer':function(_0x5bdbae,_0x370c5d){return[{'text':util[_0x6088('0x18')](_0x6088('0x4c'),_0xdf9cf7,_0x5bdbae,_0x370c5d,_0x11b8fe),'style':_0x6088('0x4d')}];}};}function writePDFDocument(_0x32aa8d,_0x50421f){return new Promise(function(_0x412519,_0x3e52bb){var _0xc01c21=_0x32aa8d[_0x6088('0x4e')](fs[_0x6088('0x4f')](_0x50421f));_0xc01c21['on'](_0x6088('0x50'),function(){_0x412519('finish');});_0xc01c21['on'](_0x6088('0x51'),function(_0x94e6a3){_0x3e52bb(_0x94e6a3);});_0x32aa8d['end']();});}exports[_0x6088('0x52')]=function(_0x69461c,_0x55804b){var _0xb658bb=getPDFPrinter();var _0x508b79=getPDFDocDefinitionFromHTML(_0x69461c,_0x55804b);var _0x29c108=_0xb658bb['createPdfKitDocument'](_0x508b79);return writePDFDocument(_0x29c108,_0x55804b[_0x6088('0x2')])[_0x6088('0x53')](function(_0x26ffad){throw _0x26ffad;});}; \ No newline at end of file diff --git a/server/components/export/xlsx.js b/server/components/export/xlsx.js index 252e9a2..f6c648e 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 _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 +var _0x28ab=['basename','.xlsx','length','existsSync','join','mkdirSync','%s%d.%s','xlsx','%s.%s','binary','zip','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','catch','inspect','Failed','exit','path','json2xls','bluebird','zip-dir','../../mysqldb','dbH','../../config/logger','analytics','argv','AnalyticExtractedReport','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','find','split','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','push','format'];(function(_0x37ffea,_0x25b006){var _0x2e2615=function(_0x5e6c74){while(--_0x5e6c74){_0x37ffea['push'](_0x37ffea['shift']());}};_0x2e2615(++_0x25b006);}(_0x28ab,0x193));var _0xb28a=function(_0x5e1248,_0xf0b95f){_0x5e1248=_0x5e1248-0x0;var _0x80c39c=_0x28ab[_0x5e1248];return _0x80c39c;};'use strict';var util=require('util');var path=require(_0xb28a('0x0'));var _=require('lodash');var fs=require('fs');var json2xls=require(_0xb28a('0x1'));var BPromise=require(_0xb28a('0x2'));var zipdir=require(_0xb28a('0x3'));var rimraf=require('rimraf');var db=require('../../mysqldb')['db'];var dbH=require(_0xb28a('0x4'))[_0xb28a('0x5')];var logger=require(_0xb28a('0x6'))(_0xb28a('0x7'));var EXTRACTED_REPORT_ID=Number(process[_0xb28a('0x8')][0x2]);var QUERY=process[_0xb28a('0x8')][0x3];var PATH=process[_0xb28a('0x8')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x286fce,_0x35c216){var _0x2b4aaf={'status':_0x286fce};var _0x5142b9={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x35c216){_0x2b4aaf['savename']=_0x35c216;}return db[_0xb28a('0x9')]['update'](_0x2b4aaf,_0x5142b9);}function main(){var _0x38ff54=0x1388;var _0x3f0200;logger[_0xb28a('0xa')](util['format'](_0xb28a('0xb'),EXTRACTED_REPORT_ID,_0xb28a('0xc')));return db[_0xb28a('0xd')][_0xb28a('0xe')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xb28a('0xf'),_0xb28a('0x10')]})['then'](function(_0x4109b9){if(_0x4109b9){_0x3f0200=_0x4109b9;_0x38ff54=_0x3f0200['splitSizeXlsx']||0x1388;}})[_0xb28a('0x11')](function(){return dbH[_0xb28a('0x12')][_0xb28a('0x13')](util['format'](_0xb28a('0x14'),QUERY),{'type':dbH['sequelize'][_0xb28a('0x15')][_0xb28a('0x16')]});})[_0xb28a('0x11')](function(_0x41ffb4){if(!_0x41ffb4[0x0][_0xb28a('0x17')]){return analyticExtractedReport(_0xb28a('0x18'));}var _0x13b49c=[];var _0x41d127=0x0;var _0x2fffe7=!![];if(_0x3f0200[_0xb28a('0xf')]){if(_0x41ffb4&&_0x41ffb4['length']){var _0x4c68a6=_0x41ffb4[0x0][_0xb28a('0x17')]%(_0x41d127+_0x38ff54);for(;_0x2fffe7;_0x41d127+=_0x38ff54,_0x4c68a6=_0x41ffb4[0x0]['num']%(_0x41d127+_0x38ff54)){if(_0x4c68a6==0x0||_0x4c68a6==_0x41ffb4[0x0][_0xb28a('0x17')]){_0x2fffe7=![];}_0x13b49c[_0xb28a('0x19')](dbH[_0xb28a('0x12')][_0xb28a('0x13')](util[_0xb28a('0x1a')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x38ff54,_0x41d127),{'type':dbH['sequelize'][_0xb28a('0x15')]['SELECT']}));}}}else{_0x13b49c['push'](dbH[_0xb28a('0x12')][_0xb28a('0x13')](QUERY,{'type':dbH[_0xb28a('0x12')][_0xb28a('0x15')][_0xb28a('0x16')]}));}var _0x3a2282=path['dirname'](PATH);var _0x39a4ef=path[_0xb28a('0x1b')](PATH,_0xb28a('0x1c'));var _0x18ce04=_0x3f0200[_0xb28a('0xf')]&&_0x13b49c[_0xb28a('0x1d')]>0x1;var _0x30ae64=[];if(!fs[_0xb28a('0x1e')](path[_0xb28a('0x1f')](_0x3a2282,_0x39a4ef))&&_0x18ce04){fs[_0xb28a('0x20')](path['join'](_0x3a2282,_0x39a4ef));}return BPromise['each'](_0x13b49c,function(_0x3bfe03){_0x30ae64[_0xb28a('0x19')](_0x3bfe03);})[_0xb28a('0x11')](function(){for(var _0x40c911=0x0;_0x40c911<_0x30ae64[_0xb28a('0x1d')];_0x40c911+=0x1){var _0x33ee3c;var _0x440251=_0x30ae64[_0x40c911];if(_0x18ce04){_0x33ee3c=path['join'](_0x3a2282,_0x39a4ef,util[_0xb28a('0x1a')](_0xb28a('0x21'),_0x39a4ef,_0x40c911,_0xb28a('0x22')));}else{_0x33ee3c=path['join'](_0x3a2282,util[_0xb28a('0x1a')](_0xb28a('0x23'),_0x39a4ef,_0xb28a('0x22')));}fs['writeFileSync'](_0x33ee3c,json2xls(_0x440251),_0xb28a('0x24'));}})['then'](function(){if(_0x18ce04){zipdir(path[_0xb28a('0x1f')](_0x3a2282,_0x39a4ef),{'saveTo':path[_0xb28a('0x1f')](_0x3a2282,util['format'](_0xb28a('0x23'),_0x39a4ef,_0xb28a('0x25')))},function(_0x8bc6fc,_0x47c001){});rimraf(path[_0xb28a('0x1f')](_0x3a2282,_0x39a4ef),function(){});}})[_0xb28a('0x11')](function(){logger[_0xb28a('0xa')](util[_0xb28a('0x1a')](_0xb28a('0x26'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport('Completed',_0x18ce04?util[_0xb28a('0x1a')](_0xb28a('0x23'),_0x39a4ef,_0x18ce04?_0xb28a('0x25'):_0xb28a('0x22')):null);});})[_0xb28a('0x27')](function(_0x4246bf){logger[_0xb28a('0xa')](util[_0xb28a('0x1a')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xb28a('0xc')),util[_0xb28a('0x28')](_0x4246bf,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xb28a('0x29'));})['finally'](function(){process[_0xb28a('0x2a')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/extensions/rewrite.js b/server/components/extensions/rewrite.js index 692a371..51569ce 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 _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 +var _0x6f3e=['format','context','VoiceExtensionId','outbound','cutdigits','${EXTEN:','${EXTEN}','CDR(routeid)=','priority','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=noprefix','recordingFormat','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=','XCALLY-MOTION-ANSWER=0','MONITOR_OPTIONS=ab','toLowerCase','updatedAt','interval','*,*,*,*','tag','length','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','app','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','splice','GotoIfTime',',${EXTEN},','last','concat','Hangup','transaction','destroy','bulkCreate','sortBy','catch','lodash','util','models','Interval','findAll','then','intervals','VoiceExtension','IntervalId','uniq','map','exten','CAST(priority\x20AS\x20UNSIGNED)','filter','queue','playback','hasOwnProperty','extensions','extension','push','type','Set'];(function(_0x8483b0,_0x2dd82e){var _0x507e25=function(_0x536141){while(--_0x536141){_0x8483b0['push'](_0x8483b0['shift']());}};_0x507e25(++_0x2dd82e);}(_0x6f3e,0x1aa));var _0xe6f3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6f3e[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xe6f3('0x0'));var util=require(_0xe6f3('0x1'));function rewrite(_0x55170d,_0x2fc907){var _0x38bac2=this;return _0x55170d[_0xe6f3('0x2')][_0xe6f3('0x3')][_0xe6f3('0x4')]({'raw':!![]})[_0xe6f3('0x5')](function(_0x4e4280){_0x38bac2[_0xe6f3('0x6')]=_0x4e4280;return _0x55170d[_0xe6f3('0x2')][_0xe6f3('0x7')][_0xe6f3('0x4')]({'where':{'IntervalId':_0x2fc907[_0xe6f3('0x8')]},'raw':!![]});})[_0xe6f3('0x5')](function(_0x5564b9){return _0x55170d[_0xe6f3('0x2')][_0xe6f3('0x7')][_0xe6f3('0x4')]({'where':{'exten':{'$in':_[_0xe6f3('0x9')](_[_0xe6f3('0xa')](_0x5564b9,_0xe6f3('0xb')))}},'order':[{'raw':_0xe6f3('0xc')}],'raw':!![]});})[_0xe6f3('0x5')](function(_0x46df0a){var _0x51d60c=_['filter'](_0x46df0a,{'priority':'1'});var _0x3021da=_[_0xe6f3('0xd')](_0x46df0a,{'isApp':0x1});var _0x1d90f5=_['groupBy'](_0x3021da,_0xe6f3('0xb'));var _0x524915=[_0xe6f3('0xe'),_0xe6f3('0xf')];var _0x4d1e55=[];var _0x4bcef6=[];for(var _0x44865b in _0x1d90f5){if(_0x1d90f5[_0xe6f3('0x10')](_0x44865b)){_0x38bac2['priority']=0x2;_0x38bac2[_0xe6f3('0x11')]=[];_0x38bac2[_0xe6f3('0x12')]=_['find'](_0x51d60c,{'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')]});_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':util[_0xe6f3('0x16')]('CDR(type)=%s',_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')]),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2['priority']++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});if(_0x1d90f5[_0x44865b][0x0]['type']===_0xe6f3('0x19')){if(_0x38bac2[_0xe6f3('0x12')]){_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':'CDR(destination)='+(_0x38bac2[_0xe6f3('0x12')][_0xe6f3('0x1a')]?_0xe6f3('0x1b')+_0x38bac2[_0xe6f3('0x12')][_0xe6f3('0x1a')]+'}':_0xe6f3('0x1c')),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2['priority']++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});}_0x38bac2['extensions'][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':_0xe6f3('0x1d')+_0x1d90f5[_0x44865b][0x0]['VoiceExtensionId'],'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2['priority']++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});var _0x43a83d=_0x38bac2[_0xe6f3('0x1e')]++;_0x38bac2[_0xe6f3('0x11')]['push']({'type':_0x1d90f5[_0x44865b][0x0]['type'],'app':_0xe6f3('0x1f'),'appdata':_0xe6f3('0x20')+(_0x43a83d+0x2)+_0xe6f3('0x21')+(_0x43a83d+0x1)+')','context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x43a83d,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});if(_0x38bac2[_0xe6f3('0x12')]){_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':_0x38bac2[_0xe6f3('0x12')][_0xe6f3('0x1a')]?'CDR(prefix)=${EXTEN:0:'+_0x38bac2['extension'][_0xe6f3('0x1a')]+'}':_0xe6f3('0x22'),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0]['exten'],'priority':_0x38bac2[_0xe6f3('0x1e')]++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});}_0x38bac2['extensions'][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0]['type'],'app':_0xe6f3('0x15'),'appdata':'outboundrouteid='+_0x1d90f5[_0x44865b][0x0]['VoiceExtensionId'],'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0]['exten'],'priority':_0x38bac2['priority']++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});if(_0x38bac2[_0xe6f3('0x12')]&&_0x38bac2[_0xe6f3('0x12')][_0xe6f3('0x10')]('recordingFormat')&&_0x38bac2['extension'][_0xe6f3('0x23')]!=='none'){_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':_0xe6f3('0x24'),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2[_0xe6f3('0x1e')]++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':_0xe6f3('0x25')+_0x38bac2[_0xe6f3('0x12')]['recordingFormat']||'wav','context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2[_0xe6f3('0x1e')]++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});}}_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':'Set','appdata':_0xe6f3('0x26'),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0]['exten'],'priority':_0x38bac2[_0xe6f3('0x1e')]++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});_0x38bac2['extensions'][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':'XCALLY-MOTION-PROGRESS=0','context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2[_0xe6f3('0x1e')]++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});_0x38bac2[_0xe6f3('0x11')]['push']({'type':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':_0xe6f3('0x27'),'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'priority':_0x38bac2['priority']++,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0]['VoiceExtensionId']});for(var _0x15672d=0x0,_0x17c3d6=0x0;_0x15672d<_0x1d90f5[_0x44865b]['length'];_0x15672d+=0x1,_0x17c3d6=0x0){var _0x53e554=_0x1d90f5[_0x44865b][_0x15672d];if(_0x53e554['type']){_0x53e554[_0xe6f3('0x14')]=_0x53e554[_0xe6f3('0x14')][_0xe6f3('0x28')]();}var _0x1e9eb1=[];var _0x41aebb=[];delete _0x53e554['id'];delete _0x53e554['createdAt'];delete _0x53e554[_0xe6f3('0x29')];var _0x12440a=_0x53e554[_0xe6f3('0x2a')]!==_0xe6f3('0x2b')?[_0x53e554['interval']]:_0x53e554[_0xe6f3('0x8')]?_['map'](_['filter'](_0x38bac2[_0xe6f3('0x6')],{'IntervalId':_0x53e554[_0xe6f3('0x8')]}),'interval'):[];if(_0x53e554[_0xe6f3('0x10')](_0xe6f3('0x2c'))){if(_0x53e554['tag']&&_0x53e554[_0xe6f3('0x2c')]!=='--'){_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554[_0xe6f3('0x14')],'app':'Set','appdata':'CDR(tag)='+_0x53e554['tag'],'context':_0x53e554[_0xe6f3('0x17')],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a[_0xe6f3('0x2d')]+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554['VoiceExtensionId']});}}if(_0x53e554[_0xe6f3('0x14')]===_0xe6f3('0x19')&&_0x53e554[_0xe6f3('0x10')](_0xe6f3('0x2e'))){if(_0x53e554[_0xe6f3('0x2e')]){_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554[_0xe6f3('0x14')],'app':_0xe6f3('0x1f'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)='+_0x53e554[_0xe6f3('0x2e')]+')','context':_0x53e554[_0xe6f3('0x17')],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a['length']+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});}else{_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554[_0xe6f3('0x14')],'app':_0xe6f3('0x1f'),'appdata':_0xe6f3('0x2f'),'context':_0x53e554['context'],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a[_0xe6f3('0x2d')]+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});}}if(_0x53e554[_0xe6f3('0x10')](_0xe6f3('0x30'))){if(_0x524915[_0xe6f3('0x31')](_0x53e554[_0xe6f3('0x32')][_0xe6f3('0x28')]())>=0x0&&_0x53e554['appType']!=='custom'){if(_0x53e554[_0xe6f3('0x30')]){_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554['type'],'app':_0xe6f3('0x1f'),'appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x53e554['context'],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a['length']+_0x38bac2['priority']+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});_0x1e9eb1['push']({'type':_0x53e554['type'],'app':_0xe6f3('0x15'),'appdata':_0xe6f3('0x33'),'context':_0x53e554[_0xe6f3('0x17')],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a[_0xe6f3('0x2d')]+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});}else{_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554[_0xe6f3('0x14')],'app':_0xe6f3('0x1f'),'appdata':_0xe6f3('0x34'),'context':_0x53e554[_0xe6f3('0x17')],'exten':_0x53e554['exten'],'priority':_0x12440a[_0xe6f3('0x2d')]+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});_0x1e9eb1[_0xe6f3('0x13')]({'type':_0x53e554[_0xe6f3('0x14')],'app':_0xe6f3('0x15'),'appdata':'XCALLY-MOTION-PROGRESS=1','context':_0x53e554[_0xe6f3('0x17')],'exten':_0x53e554[_0xe6f3('0xb')],'priority':_0x12440a[_0xe6f3('0x2d')]+_0x38bac2[_0xe6f3('0x1e')]+_0x17c3d6++,'VoiceExtensionId':_0x53e554[_0xe6f3('0x18')]});}}}for(var _0xc81003=0x0;_0xc81003<_0x12440a['length'];_0xc81003+=0x1){var _0x596383=_0x38bac2['priority']+_0x12440a[_0xe6f3('0x2d')];var _0x224494=_0xc81003===_0x12440a['length']-0x1?_0x38bac2['priority']+_0x1e9eb1['length']+_0x41aebb[_0xe6f3('0x2d')]+0x2:_0x38bac2[_0xe6f3('0x1e')]+_0xc81003+0x1;_0x1e9eb1[_0xe6f3('0x35')](_0xc81003,0x0,{'type':_0x53e554['type'],'app':_0xe6f3('0x36'),'appdata':_0x12440a[_0xc81003]+'?'+_0x53e554[_0xe6f3('0x17')]+',${EXTEN},'+_0x596383+':'+_0x53e554[_0xe6f3('0x17')]+_0xe6f3('0x37')+_0x224494,'exten':_0x53e554['exten'],'context':_0x53e554[_0xe6f3('0x17')],'priority':_0x38bac2[_0xe6f3('0x1e')]+_0xc81003,'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});}_0x53e554[_0xe6f3('0x1e')]=_0x1e9eb1[_0xe6f3('0x2d')]?_['last'](_0x1e9eb1)[_0xe6f3('0x1e')]+0x1:_0x38bac2[_0xe6f3('0x1e')];_0x38bac2[_0xe6f3('0x1e')]=(_0x41aebb[_0xe6f3('0x2d')]?_[_0xe6f3('0x38')](_0x41aebb)[_0xe6f3('0x1e')]:_0x53e554[_0xe6f3('0x1e')])+0x1;_0x38bac2[_0xe6f3('0x11')]=_[_0xe6f3('0x39')](_0x38bac2[_0xe6f3('0x11')],_0x1e9eb1,[_0x53e554],_0x41aebb);}_0x38bac2[_0xe6f3('0x11')][_0xe6f3('0x13')]({'type':_0x1d90f5[_0x44865b][0x0]['type'],'app':_0xe6f3('0x3a'),'exten':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0xb')],'context':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x17')],'priority':_0x38bac2[_0xe6f3('0x1e')],'VoiceExtensionId':_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]});_0x4d1e55[_0xe6f3('0x13')](_0x1d90f5[_0x44865b][0x0][_0xe6f3('0x18')]);_0x4bcef6=_[_0xe6f3('0x39')](_0x4bcef6,_0x38bac2['extensions']);}}return _0x55170d[_0xe6f3('0x3b')](function(_0x2f4e3f){return _0x55170d[_0xe6f3('0x2')]['VoiceExtension'][_0xe6f3('0x3c')]({'where':{'VoiceExtensionId':{'$in':_0x4d1e55}},'transaction':_0x2f4e3f})[_0xe6f3('0x5')](function(_0x292619){return _0x55170d[_0xe6f3('0x2')][_0xe6f3('0x7')][_0xe6f3('0x3d')](_[_0xe6f3('0x3e')](_0x4bcef6,_0xe6f3('0x1e')),{'transaction':_0x2f4e3f});});});})[_0xe6f3('0x3f')](function(_0xc4f120){console['error'](_0xc4f120);});}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 de8a08b..a24d307 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 _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 +var _0xf14a=['pick','catch','stringify','cmContact','checkHopper','inspect','insert','into','cm_hopper','scheduledAt','ContactId','createdAt','updatedAt','select','field','toString','NOW()','from','cm_contacts','where','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','\x20=\x20?','fromQuery','ListId\x20=\x20?','str','cm_hopper_final','id\x20IN\x20?','cm_hopper_black','VoiceQueue','findAll','outbound','dialCheckDuplicateType','CmList','Lists','get','always','sequelize','VoiceQueueId','all','BlackLists','query','CampaignId','onlyIfOpen','Campaign','generalCheckHopper','Error\x20processing\x20rows\x20block:','emit','contact:csv_','resolve','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','SIGINT','CSV\x20import\x20process\x20stopped!','createReadStream','parse','pause','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','bluebird','util','squel','papaparse','../../../mysqldb','../../../config/environment','../../../config/logger','api','redis','localhost','socket.io-emitter','register','argv','undefined','null','Missing\x20filepath\x20parameter!','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','error','contact','index','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','map','message','join','hasOwnProperty','data','firstName','firstName\x20not\x20specified!','phone','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','email\x20format\x20is\x20not\x20valid!','ListId','length','duplicate','Duplicate\x20Contact','CmContact','create','keys','then','push'];(function(_0x273c83,_0x59a0ac){var _0x21a435=function(_0x46975a){while(--_0x46975a){_0x273c83['push'](_0x273c83['shift']());}};_0x21a435(++_0x59a0ac);}(_0xf14a,0x1f0));var _0xaf14=function(_0x1f9f21,_0x264260){_0x1f9f21=_0x1f9f21-0x0;var _0x21b63c=_0xf14a[_0x1f9f21];return _0x21b63c;};'use strict';var BPromise=require(_0xaf14('0x0'));var util=require(_0xaf14('0x1'));var _=require('lodash');var fs=require('fs');var squel=require(_0xaf14('0x2'));var Papa=require(_0xaf14('0x3'));var Redis=require('ioredis');var db=require(_0xaf14('0x4'))['db'];var config=require(_0xaf14('0x5'));var logger=require(_0xaf14('0x6'))(_0xaf14('0x7'));config['redis']=_['defaults'](config[_0xaf14('0x8')],{'host':_0xaf14('0x9'),'port':0x18eb});var socket=require(_0xaf14('0xa'))(new Redis(config['redis']));require('../../../api/cmContact/cmContact.socket')[_0xaf14('0xb')](socket);try{if(!process[_0xaf14('0xc')][0x2]||process[_0xaf14('0xc')][0x2]===_0xaf14('0xd')||process['argv'][0x2]===_0xaf14('0xe')){throw new Error(_0xaf14('0xf'));}var FILEPATH=process[_0xaf14('0xc')][0x2];if(!process[_0xaf14('0xc')][0x3]||process[_0xaf14('0xc')][0x3]===_0xaf14('0xd')||process[_0xaf14('0xc')][0x3]==='null'||!process[_0xaf14('0xc')][0x4]||process[_0xaf14('0xc')][0x4]==='undefined'||process[_0xaf14('0xc')][0x4]==='null'){throw new Error(_0xaf14('0x10'));}var FIELDS=_[_0xaf14('0x11')](process['argv'][0x3][_0xaf14('0x12')](','),process['argv'][0x4][_0xaf14('0x12')](','));if(!process[_0xaf14('0xc')][0x5]||process['argv'][0x5]===_0xaf14('0xd')||process[_0xaf14('0xc')][0x5]===_0xaf14('0xe')){throw new Error(_0xaf14('0x13'));}var LISTID=process[_0xaf14('0xc')][0x5];var COMPANYID=process[_0xaf14('0xc')][0x6]&&process[_0xaf14('0xc')][0x6]!==_0xaf14('0xd')&&process[_0xaf14('0xc')][0x6]!=='null'?process['argv'][0x6]:null;var DUPLICATES=process['argv'][0x7]&&process[_0xaf14('0xc')][0x7]!==_0xaf14('0xd')&&process['argv'][0x7]!==_0xaf14('0xe')?process[_0xaf14('0xc')][0x7]:null;if(!process[_0xaf14('0xc')][0x8]||process['argv'][0x8]===_0xaf14('0xd')||process[_0xaf14('0xc')][0x8]===_0xaf14('0xe')){throw new Error('Missing\x20socket_timestamp\x20parameter!');}var SOCKET_TIMESTAMP=process[_0xaf14('0xc')][0x8];}catch(_0x58cb6d){logger[_0xaf14('0x14')](_0x58cb6d);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(_0x54d30f,_0xeda8eb,_0x329621,_0x29fa8a){var _0x1b449f={'message':_0xeda8eb};_0x1b449f[_0x54d30f]=!![];if(_0x329621){_0x1b449f[_0xaf14('0x15')]=_0x329621;}if(_0x29fa8a){_0x1b449f[_0xaf14('0x16')]=_0x29fa8a;}return _0x1b449f;}function isEmail(_0x484ce4){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'](_0x484ce4);}function checkRow(_0x2f12cc,_0x39182d,_0x517a07){return new BPromise(function(_0x51e666,_0x48eb08){if(_['isNil'](_0x2f12cc)){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),_0xaf14('0x17'),null,_0x517a07));}if(_0x2f12cc[_0xaf14('0x18')]&&_0x2f12cc[_0xaf14('0x18')]['length']){var _0x4af8ae=_[_0xaf14('0x19')](_0x2f12cc['errors'],_0xaf14('0x1a'))[_0xaf14('0x1b')](';');return _0x48eb08(handleCheckRowError('error',_0x4af8ae,null,_0x517a07));}var _0x1cd68c={};for(var _0x4db0ae in FIELDS){if(FIELDS[_0xaf14('0x1c')](_0x4db0ae)&&FIELDS[_0x4db0ae]){_0x1cd68c[_0x4db0ae]=_0x2f12cc[_0xaf14('0x1d')][0x0][FIELDS[_0x4db0ae]]||_0x2f12cc[_0xaf14('0x1d')][0x0]['\ufeff'+FIELDS[_0x4db0ae]];}}if(!_0x1cd68c[_0xaf14('0x1e')]){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),_0xaf14('0x1f'),null,_0x517a07));}if(!_0x1cd68c[_0xaf14('0x20')]){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),_0xaf14('0x21'),null,_0x517a07));}if(_0x1cd68c[_0xaf14('0x22')]){var _0x57e92d=moment(_0x1cd68c[_0xaf14('0x22')],_0xaf14('0x23'));if(!_0x57e92d[_0xaf14('0x24')]()){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),_0xaf14('0x25'),null,_0x517a07));}}if(_0x1cd68c[_0xaf14('0x26')]){if(!isEmail(_0x1cd68c[_0xaf14('0x26')])){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),_0xaf14('0x27'),null,_0x517a07));}}_0x1cd68c[_0xaf14('0x28')]=LISTID;_0x1cd68c['CompanyId']=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0xaf14('0x29')]&&_0x39182d){var _0x4f9755={};for(var _0xfc5c9b=0x0,_0x34eb79=DUPLICATES['length'];_0xfc5c9b<_0x34eb79;_0xfc5c9b+=0x1){_0x4f9755[DUPLICATES[_0xfc5c9b]]=_0x1cd68c[DUPLICATES[_0xfc5c9b]];}var _0x3b5b89=_['find'](_0x39182d,_0x4f9755);if(_0x3b5b89){return _0x48eb08(handleCheckRowError(_0xaf14('0x2a'),_0xaf14('0x2b'),_0x3b5b89,_0x517a07));}}return db[_0xaf14('0x2c')][_0xaf14('0x2d')](_0x1cd68c,{'raw':!![],'hooks':![],'fields':_[_0xaf14('0x2e')](_0x1cd68c)})[_0xaf14('0x2f')](function(_0x42a13c){if(DUPLICATES&&DUPLICATES[_0xaf14('0x29')]&&_0x39182d){_0x39182d[_0xaf14('0x30')](_[_0xaf14('0x31')](_0x1cd68c,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x42a13c['id'];return _0x51e666();})[_0xaf14('0x32')](function(_0x15cbda){return _0x48eb08(handleCheckRowError(_0xaf14('0x14'),'Error\x20while\x20creating\x20contact:\x20'+(_0x15cbda[_0xaf14('0x1a')]||JSON[_0xaf14('0x33')](_0x15cbda)),null,_0x517a07));});});}function checkHopper(){function _0x58b41d(){return function(_0x22721b){logger['error'](_0xaf14('0x34'),_0xaf14('0x35'),util[_0xaf14('0x36')](_0x22721b,{'showHidden':![],'depth':null}));};}var _0x5b1a7f=function(_0x269108,_0x5e4d9d){var _0x1ba95f=squel[_0xaf14('0x37')]()[_0xaf14('0x38')](_0xaf14('0x39'))['fromQuery']([_0xaf14('0x20'),_0xaf14('0x3a'),_0xaf14('0x3b'),'ListId',_0x5e4d9d,_0xaf14('0x3c'),_0xaf14('0x3d')],squel[_0xaf14('0x3e')]()[_0xaf14('0x3f')](_0xaf14('0x20'),_0xaf14('0x20'))[_0xaf14('0x3f')]('NOW()','scheduledAt')[_0xaf14('0x3f')]('id',_0xaf14('0x3b'))[_0xaf14('0x3f')](LISTID[_0xaf14('0x40')](),'ListId')['field'](_0x269108['id'][_0xaf14('0x40')](),_0x5e4d9d)[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3c'))[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3d'))[_0xaf14('0x42')](_0xaf14('0x43'))[_0xaf14('0x44')](_0xaf14('0x45'))[_0xaf14('0x44')]('ListId\x20=\x20?',LISTID[_0xaf14('0x40')]())['where'](_0xaf14('0x46'))[_0xaf14('0x44')](_0xaf14('0x47'),squel[_0xaf14('0x3e')]()[_0xaf14('0x3f')](_0xaf14('0x20'))[_0xaf14('0x42')](_0xaf14('0x39'))[_0xaf14('0x44')](_0x5e4d9d+_0xaf14('0x48'),_0x269108['id'][_0xaf14('0x40')]())))[_0xaf14('0x40')]();return _0x1ba95f;};var _0x4d7ccf=function(_0x1b9942,_0x4c345b){var _0x4a21e4=squel[_0xaf14('0x37')]()[_0xaf14('0x38')]('cm_hopper')[_0xaf14('0x49')](['phone',_0xaf14('0x3a'),_0xaf14('0x3b'),'ListId',_0x4c345b,_0xaf14('0x3c'),_0xaf14('0x3d')],squel[_0xaf14('0x3e')]()['field'](_0xaf14('0x20'),_0xaf14('0x20'))['field'](_0xaf14('0x41'),_0xaf14('0x3a'))['field']('id',_0xaf14('0x3b'))['field'](LISTID['toString'](),_0xaf14('0x28'))['field'](_0x1b9942['id'][_0xaf14('0x40')](),_0x4c345b)[_0xaf14('0x3f')]('NOW()',_0xaf14('0x3c'))[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3d'))[_0xaf14('0x42')]('cm_contacts')['where']('deletedAt\x20IS\x20NULL')['where'](_0xaf14('0x4a'),LISTID['toString']())['where']('id\x20IN\x20?',squel[_0xaf14('0x4b')](hopperContacts))[_0xaf14('0x44')](_0xaf14('0x46'))[_0xaf14('0x44')](_0xaf14('0x47'),squel['select']()[_0xaf14('0x3f')]('calleridnum')[_0xaf14('0x42')](_0xaf14('0x4c'))[_0xaf14('0x44')](_0x4c345b+_0xaf14('0x48'),_0x1b9942['id'][_0xaf14('0x40')]()))[_0xaf14('0x44')](_0xaf14('0x47'),squel[_0xaf14('0x3e')]()[_0xaf14('0x3f')](_0xaf14('0x20'))[_0xaf14('0x42')](_0xaf14('0x39'))['where'](_0x4c345b+_0xaf14('0x48'),_0x1b9942['id']['toString']())))['toString']();return _0x4a21e4;};function _0x313d0a(_0x391417,_0x103240){var _0x49d5b1=squel[_0xaf14('0x37')]()['into'](_0xaf14('0x39'))[_0xaf14('0x49')]([_0xaf14('0x20'),_0xaf14('0x3a'),_0xaf14('0x3b'),_0xaf14('0x28'),_0x103240,_0xaf14('0x3c'),_0xaf14('0x3d')],squel[_0xaf14('0x3e')]()['field'](_0xaf14('0x20'),_0xaf14('0x20'))[_0xaf14('0x3f')](_0xaf14('0x41'),'scheduledAt')['field']('id',_0xaf14('0x3b'))[_0xaf14('0x3f')](LISTID[_0xaf14('0x40')](),_0xaf14('0x28'))[_0xaf14('0x3f')](_0x391417['id'][_0xaf14('0x40')](),_0x103240)[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3c'))[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3d'))['from']('cm_contacts')['where'](_0xaf14('0x45'))[_0xaf14('0x44')](_0xaf14('0x4a'),LISTID[_0xaf14('0x40')]())[_0xaf14('0x44')](_0xaf14('0x4d'),squel[_0xaf14('0x4b')](hopperContacts))[_0xaf14('0x44')](_0xaf14('0x46')))[_0xaf14('0x40')]();return _0x49d5b1;}function _0x5a8cef(_0x3a4613,_0x3e92a0){var _0x427889=squel[_0xaf14('0x37')]()[_0xaf14('0x38')](_0xaf14('0x4e'))[_0xaf14('0x49')]([_0xaf14('0x20'),_0xaf14('0x3b'),'ListId',_0x3e92a0,_0xaf14('0x3c'),_0xaf14('0x3d')],squel['select']()[_0xaf14('0x3f')](_0xaf14('0x20'),_0xaf14('0x20'))[_0xaf14('0x3f')]('id',_0xaf14('0x3b'))[_0xaf14('0x3f')](LISTID['toString'](),'ListId')['field'](_0x3a4613['id'][_0xaf14('0x40')](),_0x3e92a0)[_0xaf14('0x3f')]('NOW()',_0xaf14('0x3c'))[_0xaf14('0x3f')](_0xaf14('0x41'),_0xaf14('0x3d'))[_0xaf14('0x42')](_0xaf14('0x43'))['where']('deletedAt\x20IS\x20NULL')['where'](_0xaf14('0x4a'),LISTID['toString']())['where'](_0xaf14('0x4d'),squel[_0xaf14('0x4b')](hopperContacts))[_0xaf14('0x44')]('phone\x20IS\x20NOT\x20NULL'))[_0xaf14('0x40')]();return _0x427889;}return db[_0xaf14('0x4f')][_0xaf14('0x50')]({'where':{'type':_0xaf14('0x51')},'attributes':['id',_0xaf14('0x52')],'include':[{'model':db[_0xaf14('0x53')],'as':_0xaf14('0x54'),'where':{'id':LISTID}}]})[_0xaf14('0x2f')](function(_0x56f046){var _0x854097=[];if(_0x56f046){var _0x27265d;for(var _0x5e9a85=0x0,_0x19a94b;_0x5e9a85<_0x56f046['length'];_0x5e9a85+=0x1){_0x19a94b=_0x56f046[_0x5e9a85][_0xaf14('0x55')]({'plain':!![]});switch(_0x19a94b[_0xaf14('0x52')]){case _0xaf14('0x56'):_0x854097['push'](db[_0xaf14('0x57')]['query'](_0x4d7ccf(_0x19a94b,_0xaf14('0x58')))[_0xaf14('0x2f')](function(){})[_0xaf14('0x32')](_0x58b41d()));break;case'onlyIfOpen':_0x854097[_0xaf14('0x30')](db[_0xaf14('0x57')]['query'](_0x5b1a7f(_0x19a94b,_0xaf14('0x58')))['then'](function(){})[_0xaf14('0x32')](_0x58b41d()));break;default:_0x854097[_0xaf14('0x30')](db['sequelize']['query'](_0x313d0a(_0x19a94b,_0xaf14('0x58')))[_0xaf14('0x2f')](function(){})['catch'](_0x58b41d()));}}}return _0x854097;})[_0xaf14('0x59')]()[_0xaf14('0x2f')](function(){return db[_0xaf14('0x4f')][_0xaf14('0x50')]({'where':{'type':_0xaf14('0x51')},'attributes':['id'],'include':[{'model':db[_0xaf14('0x53')],'as':_0xaf14('0x5a'),'where':{'id':LISTID}}]})['then'](function(_0x39bfdb){var _0x5ad3b2=[];if(_0x39bfdb){var _0xfc5ec4;for(var _0x348f47=0x0,_0x3ca53d;_0x348f47<_0x39bfdb[_0xaf14('0x29')];_0x348f47+=0x1){_0x3ca53d=_0x39bfdb[_0x348f47][_0xaf14('0x55')]({'plain':!![]});_0x5ad3b2[_0xaf14('0x30')](db[_0xaf14('0x57')]['query'](_0x5a8cef(_0x3ca53d,_0xaf14('0x58')))['then'](function(){})['catch'](_0x58b41d()));}}return _0x5ad3b2;})['all']();})['then'](function(){return db['Campaign']['findAll']({'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0xaf14('0x53')],'as':'Lists','where':{'id':LISTID}}]})[_0xaf14('0x2f')](function(_0x587150){var _0x895357=[];if(_0x587150){for(var _0x413eec=0x0,_0x4a191b;_0x413eec<_0x587150[_0xaf14('0x29')];_0x413eec+=0x1){_0x4a191b=_0x587150[_0x413eec][_0xaf14('0x55')]({'plain':!![]});switch(_0x4a191b[_0xaf14('0x52')]){case _0xaf14('0x56'):_0x895357[_0xaf14('0x30')](db[_0xaf14('0x57')][_0xaf14('0x5b')](_0x4d7ccf(_0x4a191b,_0xaf14('0x5c')))[_0xaf14('0x2f')](function(){})[_0xaf14('0x32')](_0x58b41d()));break;case _0xaf14('0x5d'):_0x895357['push'](db[_0xaf14('0x57')][_0xaf14('0x5b')](_0x5b1a7f(_0x4a191b,'CampaignId'))[_0xaf14('0x2f')](function(){})[_0xaf14('0x32')](_0x58b41d()));break;default:_0x895357[_0xaf14('0x30')](db[_0xaf14('0x57')][_0xaf14('0x5b')](_0x313d0a(_0x4a191b,_0xaf14('0x5c')))['then'](function(){})[_0xaf14('0x32')](_0x58b41d()));}}}return _0x895357;})[_0xaf14('0x59')]();})['then'](function(){return db[_0xaf14('0x5e')][_0xaf14('0x50')]({'attributes':['id'],'include':[{'model':db['CmList'],'as':_0xaf14('0x5a'),'where':{'id':LISTID}}]})[_0xaf14('0x2f')](function(_0x5e5d44){var _0xcbdfa0=[];if(_0x5e5d44){for(var _0x51d856=0x0,_0x243a6d;_0x51d856<_0x5e5d44[_0xaf14('0x29')];_0x51d856+=0x1){_0x243a6d=_0x5e5d44[_0x51d856][_0xaf14('0x55')]({'plain':!![]});_0xcbdfa0[_0xaf14('0x30')](db[_0xaf14('0x57')]['query'](_0x5a8cef(_0x243a6d,'CampaignId'))[_0xaf14('0x2f')](function(){})[_0xaf14('0x32')](_0x58b41d()));}}return _0xcbdfa0;})[_0xaf14('0x59')]();})['catch'](function(_0x1250d2){logger[_0xaf14('0x14')]('cmContact,\x20%s,\x20%s',_0xaf14('0x5f'),_0x1250d2[_0xaf14('0x1a')]);});}var processPromises=function(_0x556b38){return BPromise[_0xaf14('0x59')](promises)[_0xaf14('0x2f')](function(_0x29e1d6){})['catch'](function(_0x4abade){logger['error'](_0xaf14('0x60'),JSON['stringify'](_0x4abade));})['finally'](function(){socket[_0xaf14('0x61')](_0xaf14('0x62')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x556b38){return _0x556b38['resume']();}});};var endCsv=function(){return BPromise[_0xaf14('0x63')]()[_0xaf14('0x2f')](function(){if(hopperContacts){return checkHopper();}})[_0xaf14('0x2f')](function(){socket[_0xaf14('0x61')](_0xaf14('0x62')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0xaf14('0x64')](FILEPATH);}catch(_0x387722){logger[_0xaf14('0x14')](_0xaf14('0x65'),JSON[_0xaf14('0x33')](_0x387722));}finally{process['exit'](0x0);}});};process['on'](_0xaf14('0x66'),function(){logger['info'](_0xaf14('0x67'));endCsv();});function main(){return BPromise['resolve']()[_0xaf14('0x2f')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0xaf14('0x12')](',');return db['CmContact'][_0xaf14('0x50')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0xaf14('0x2f')](function(_0x29a703){var _0x416e5a=fs[_0xaf14('0x68')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0xaf14('0x69')](_0x416e5a,{'header':!![],'skipEmptyLines':!![],'step':function(_0x3ef907,_0x14fda0){total+=0x1;var _0x57fba4=total;promises[_0xaf14('0x30')](checkRow(_0x3ef907,_0x29a703,_0x57fba4)[_0xaf14('0x2f')](function(){success+=0x1;})[_0xaf14('0x32')](function(_0x4017f1){if(_0x4017f1[_0xaf14('0x14')]){errors+=0x1;delete _0x4017f1[_0xaf14('0x14')];}else if(_0x4017f1[_0xaf14('0x2a')]){duplicates+=0x1;delete _0x4017f1[_0xaf14('0x2a')];}rows[_0xaf14('0x30')](_0x4017f1);}));if(total%0xc8===0x0){_0x14fda0[_0xaf14('0x6a')]();return processPromises(_0x14fda0);}},'complete':function(){return processPromises()[_0xaf14('0x2f')](function(){logger['info'](_0xaf14('0x6b'));endCsv();});},'error':function(_0x23a3fd,_0x175cf7){logger['info'](_0xaf14('0x6c'),JSON['stringify'](_0x23a3fd));endCsv();}});})[_0xaf14('0x32')](function(_0x2a107a){logger['error']('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0xaf14('0x33')](_0x2a107a));});}main(); \ No newline at end of file diff --git a/server/components/import/cm/csv2.js b/server/components/import/cm/csv2.js index 7d57840..ce5a265 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 _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 +var _0x6595=['agent\x20not\x20exists','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','appendFileSync','contact:import:','SystemError','duplicates','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','CompanyId','DROP\x20TABLE\x20','voice_queues_has_cm_lists','voice_queues','VoiceQueueId','campaigns','CampaignId','campaigns_has_cm_blacklists','each','then','finish','affectedRows','emit','unlink','argv','arguments\x20\x20\x20','server/files/tmp','existsSync','file\x20doesn\x27t\x20exists','binding','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','ListId\x20is\x20mandatory','No\x20agent\x20available','SIGINT','path','lodash','util','moment','squel','ioredis','../../../config/environment','../../../config/logger','defaults','redis','localhost','format','YYYY-MM-DD\x20HH:mm:ss','test','field','phone','from','.id\x20=\x20','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','join','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.priority','insert','into','fromQuery','scheduledat','ListId','createdAt','updatedAt','priority','UserId','select','fields','cm_contacts','.CmListId','cm_contacts.createdAt\x20=\x20?','cm_hopper','\x22always\x22','\x22onlyIfOpen\x22','cm_contacts.phone\x20NOT\x20IN\x20(?)','toString','cm_contacts.updatedAt','ContactId','.CmListId\x20=\x20?','cm_hopper_black','ListId\x20=\x20?','\x20=\x20?','concat','keys',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','min_id','group','info','Received\x20SIGINT','error','exit','errors','push','message','sequelize','query','catch','main','stringify','send','start','socket_timestamp','root','.csv','header','writeFileSync','parse','length','rows','data','trim','replace','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNumber','includes'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6595,0x198));var _0x5659=function(_0x1f2d88,_0x3e82c0){_0x1f2d88=_0x1f2d88-0x0;var _0x567540=_0x6595[_0x1f2d88];return _0x567540;};'use strict';var fs=require('fs');var path=require(_0x5659('0x0'));var _=require(_0x5659('0x1'));var Papa=require('papaparse');var util=require(_0x5659('0x2'));var BPromise=require('bluebird');var moment=require(_0x5659('0x3'));var squel=require(_0x5659('0x4'));var Redis=require(_0x5659('0x5'));var db=require('../../../mysqldb')['db'];var config=require(_0x5659('0x6'));var logger=require(_0x5659('0x7'))('import');config['redis']=_[_0x5659('0x8')](config[_0x5659('0x9')],{'host':_0x5659('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5659('0x9')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var stopped=![];var NOW=moment()[_0x5659('0xb')](_0x5659('0xc'));function isEmail(_0x57e429){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))*$/[_0x5659('0xd')](_0x57e429);}function selectNotIn(_0x5d36dd,_0x419b05,_0x16136f,_0x4e9a53,_0x4cca14){return squel['select']()[_0x5659('0xe')](_0x5659('0xf'))[_0x5659('0x10')](_0x4e9a53)['join'](_0x419b05,null,_0x419b05+_0x5659('0x11')+_0x4e9a53+'.'+_0x16136f)[_0x5659('0x12')](_0x4e9a53+'.'+_0x16136f+_0x5659('0x13')+_0x5d36dd+'.'+_0x16136f)[_0x5659('0x12')](_0x419b05+_0x5659('0x14')+_0x4cca14[_0x5659('0x15')]()+')');}function insertCmHopper(_0x5e8779,_0x1e0853,_0x367f38,_0x4fd25c,_0x304d2f){var _0x33ec71=[_0x5659('0x16'),_0x5659('0x17'),'cm_contacts.id',_0x5659('0x18'),_0x1e0853+'.'+_0x4fd25c,_0x5659('0x19'),'cm_contacts.updatedAt',_0x5659('0x1a'),'cm_contacts.UserId','\x22'+_0x304d2f+'\x22'];return squel[_0x5659('0x1b')]()[_0x5659('0x1c')]('cm_hopper')[_0x5659('0x1d')](['phone',_0x5659('0x1e'),'ContactId',_0x5659('0x1f'),_0x4fd25c,_0x5659('0x20'),_0x5659('0x21'),_0x5659('0x22'),_0x5659('0x23'),'recallme'],squel[_0x5659('0x24')]()[_0x5659('0x25')](_0x33ec71)[_0x5659('0x10')](_0x1e0853)[_0x5659('0x15')](_0x5659('0x26'),null,'cm_contacts.ListId\x20=\x20'+_0x1e0853+_0x5659('0x27'))[_0x5659('0x15')](_0x367f38,null,_0x367f38+_0x5659('0x11')+_0x1e0853+'.'+_0x4fd25c)[_0x5659('0x12')](_0x1e0853+'.CmListId\x20=\x20?',_0x5e8779)['where'](_0x5659('0x28'),NOW)[_0x5659('0x12')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x1e0853,_0x367f38,_0x4fd25c,_0x5659('0x29'),[_0x5659('0x2a'),_0x5659('0x2b')]))['where'](_0x5659('0x2c'),selectNotIn(_0x1e0853,_0x367f38,_0x4fd25c,_0x5659('0x29'),[_0x5659('0x2a')])))[_0x5659('0x2d')]();}function insertCmHopperBlack(_0x16e8a3,_0x2cbfc1,_0x33720b,_0x379e3b){var _0x4aede1=[_0x5659('0x16'),'cm_contacts.id',_0x5659('0x18'),_0x2cbfc1+'.'+_0x379e3b,_0x5659('0x19'),_0x5659('0x2e')];return squel[_0x5659('0x1b')]()['into']('cm_hopper_black')[_0x5659('0x1d')](['phone',_0x5659('0x2f'),_0x5659('0x1f'),_0x379e3b,'createdAt',_0x5659('0x21')],squel[_0x5659('0x24')]()['fields'](_0x4aede1)['from'](_0x2cbfc1)[_0x5659('0x15')](_0x5659('0x26'),null,'cm_contacts.ListId\x20=\x20'+_0x2cbfc1+_0x5659('0x27'))['join'](_0x33720b,null,_0x33720b+_0x5659('0x11')+_0x2cbfc1+'.'+_0x379e3b)[_0x5659('0x12')](_0x2cbfc1+_0x5659('0x30'),_0x16e8a3)[_0x5659('0x12')](_0x5659('0x28'),NOW)['where'](_0x5659('0x2c'),squel[_0x5659('0x24')]()[_0x5659('0xe')](_0x5659('0xf'))[_0x5659('0x10')](_0x5659('0x31'))['where'](_0x5659('0x32'),_0x16e8a3)[_0x5659('0x12')](_0x379e3b+_0x5659('0x33'),_0x2cbfc1+'.'+_0x379e3b)))['toString']();}function insertCmContact(_0x4c39f5,_0x38148e,_0x315a3d,_0x5caff7){var _0x31408f=_[_0x5659('0x34')](_[_0x5659('0x35')](_0x5caff7),[_0x5659('0x1f'),'CompanyId','createdAt','updatedAt']);return squel[_0x5659('0x1b')]()[_0x5659('0x1c')](_0x5659('0x26'))[_0x5659('0x1d')](_0x31408f,squel['select']()[_0x5659('0x25')](_0x31408f)['from'](_0x38148e)['where']('('+_0x315a3d['join'](',')+_0x5659('0x36'),squel[_0x5659('0x24')]()[_0x5659('0x25')](_0x315a3d)[_0x5659('0x10')]('cm_contacts')[_0x5659('0x12')](_0x5659('0x32'),_0x4c39f5)[_0x5659('0x12')](_0x5659('0x37')))[_0x5659('0x12')](_0x5659('0x38'),squel['select']()[_0x5659('0xe')]('MIN(id)',_0x5659('0x39'))[_0x5659('0x10')](_0x38148e)[_0x5659('0x3a')](_0x315a3d['join'](','))))[_0x5659('0x2d')]();}function handleStop(){logger[_0x5659('0x3b')](_0x5659('0x3c'));stopped=!![];}function handleUncaughtException(_0x3fe5f6){logger[_0x5659('0x3d')](_0x3fe5f6['message']);process[_0x5659('0x3e')](0x1);}function handleError(_0x2428f0,_0x4cea8c){stats[_0x5659('0x3f')][_0x5659('0x40')]({'name':_0x4cea8c['code'],'message':_0x4cea8c[_0x5659('0x41')],'row':_0x2428f0});}function handleQuery(_0x35c8b0){logger[_0x5659('0x3b')](_0x35c8b0);return db[_0x5659('0x42')][_0x5659('0x43')](_0x35c8b0)['spread'](function(_0x23d677){results[_0x5659('0x40')](_0x23d677);})[_0x5659('0x44')](function(_0xab7992){logger[_0x5659('0x3d')](_0xab7992[_0x5659('0x41')]);});}function main(_0x112be1,_0x5ae328,_0x4716c7,_0x4d75ca){logger[_0x5659('0x3b')](_0x5659('0x45'),_0x112be1,JSON[_0x5659('0x46')](_0x5ae328));process[_0x5659('0x47')](_0x5659('0x48'));var _0x2db087=_0x5ae328['binding'];var _0xced8a4=_0x5ae328[_0x5659('0x49')];var _0x294b6b=path[_0x5659('0x15')](config[_0x5659('0x4a')],'server/files/tmp',_0xced8a4+_0x5659('0x4b'));var _0x2f554d=_['keys'](_0x2db087)[_0x5659('0x15')]();logger[_0x5659('0x3b')](_0x5659('0x4c'),_0x2f554d);fs[_0x5659('0x4d')](_0x294b6b,_0x2f554d+'\x0a');Papa[_0x5659('0x4e')](fs['createReadStream'](_0x112be1),{'header':!![],'skipEmptyLines':!![],'step':function(_0x17fbb2,_0x158c65){try{for(var _0x4913c4=0x0,_0x463e46=[];_0x4913c4<_0x17fbb2['data'][_0x5659('0x4f')];_0x4913c4++){stats[_0x5659('0x50')]+=0x1;if(_0x17fbb2[_0x5659('0x3f')][_0x4913c4]){handleError(_0x17fbb2[_0x5659('0x51')][_0x4913c4],_0x17fbb2[_0x5659('0x3f')][_0x4913c4]);}else{var _0x5bfd06=[];for(var _0x1088c6 in _0x2db087){if(_0x2db087['hasOwnProperty'](_0x1088c6)){if(_0x17fbb2[_0x5659('0x51')][_0x4913c4][_0x2db087[_0x1088c6]]){var _0x1705f8=_[_0x5659('0x52')](_0x17fbb2[_0x5659('0x51')][_0x4913c4][_0x2db087[_0x1088c6]][_0x5659('0x53')](/"/g,'\x27'));switch(_0x1088c6){case'scheduledat':var _0x16c220=moment(_0x1705f8,'YYYY-MM-DD\x20HH:mm:ss',!![]);if(_0x16c220[_0x5659('0x54')]()){_0x463e46['push']('\x22'+_0x1705f8+'\x22');}else{_0x5bfd06[_0x5659('0x40')](_0x5659('0x55'));}break;case _0x5659('0x22'):var _0x151c49=parseInt(_0x1705f8);_0x1705f8=_['isNaN'](_0x151c49)||_0x151c49<0x0||_0x151c49>0x4?_0x4d75ca?0x3:0x2:_0x151c49;_0x463e46['push']('\x22'+_0x1705f8+'\x22');break;case _0x5659('0x23'):var _0x5c162e=parseInt(_0x1705f8);if(_[_0x5659('0x56')](_0x5c162e)&&_[_0x5659('0x57')](_0x4716c7,_0x5c162e)){_0x463e46[_0x5659('0x40')]('\x22'+_0x5c162e+'\x22');}else{_0x5bfd06['push'](_0x5659('0x58'));}break;case'email':if(isEmail(_0x1705f8)){_0x463e46['push']('\x22'+_0x1705f8+'\x22');}else{_0x5bfd06['push']('email\x20wrong\x20format');}break;case'dateOfBirth':var _0x4418c6=moment(_0x1705f8,'YYYY-MM-DD',!![]);if(_0x4418c6['isValid']()){_0x463e46['push']('\x22'+_0x1705f8+'\x22');}else{_0x5bfd06['push'](_0x5659('0x59'));}break;default:_0x463e46[_0x5659('0x40')]('\x22'+_0x1705f8+'\x22');}}else{switch(_0x1088c6){case _0x5659('0x5a'):case'phone':_0x5bfd06[_0x5659('0x40')](_0x1088c6+_0x5659('0x5b'));break;default:_0x463e46['push']('\x22\x22');}}}}if(_0x5bfd06[_0x5659('0x4f')]){handleError(_0x17fbb2['data'][_0x4913c4],{'code':'SystemRow','message':_0x5bfd06[_0x5659('0x15')]()});}else{fs[_0x5659('0x5c')](_0x294b6b,_0x463e46[_0x5659('0x15')]()+'\x0a');}_0x463e46=[];}if(!(stats[_0x5659('0x50')]%0xc8)){socket['emit'](_0x5659('0x5d')+_0xced8a4,stats);stats[_0x5659('0x3f')]=[];}}if(stopped){logger[_0x5659('0x3b')]('Abort\x20parser');_0x158c65['abort']();}}catch(_0xfd33c2){handleError(_0x17fbb2[_0x5659('0x51')][_0x4913c4],{'code':_0x5659('0x5e'),'message':_0xfd33c2[_0x5659('0x41')]});logger[_0x5659('0x3d')]('step',_0xfd33c2[_0x5659('0x41')]);}},'complete':function(){try{var _0x121214=[];var _0x134ac4='cm_contacts';if(_0x5ae328[_0x5659('0x5f')]&&_0x5ae328[_0x5659('0x5f')]['length']){_0x134ac4=_0x5659('0x60')+_0xced8a4;_0x121214[_0x5659('0x40')](_0x5659('0x61')+_0x134ac4+_0x5659('0x62'));}var _0x468736=util[_0x5659('0xb')]('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',_0x294b6b,_0x134ac4,_0x2f554d,_0x5ae328[_0x5659('0x1f')],_0x5ae328[_0x5659('0x63')]||null,NOW,NOW);if(_['isNil'](_0x2db087[_0x5659('0x1e')])){_0x468736+=',\x20scheduledAt\x20=\x20NOW()';}_0x121214['push'](_0x468736);if(_0x5ae328['duplicates']&&_0x5ae328['duplicates']['length']){_0x121214[_0x5659('0x40')](insertCmContact(_0x5ae328[_0x5659('0x1f')],_0x134ac4,_0x5ae328[_0x5659('0x5f')],_0x2db087));_0x121214[_0x5659('0x40')](_0x5659('0x64')+_0x134ac4+';');}_0x121214[_0x5659('0x40')](insertCmHopper(_0x5ae328[_0x5659('0x1f')],_0x5659('0x65'),_0x5659('0x66'),'VoiceQueueId',_0x4d75ca));_0x121214['push'](insertCmHopperBlack(_0x5ae328['ListId'],'voice_queues_has_cm_blacklists',_0x5659('0x66'),_0x5659('0x67')));_0x121214['push'](insertCmHopper(_0x5ae328[_0x5659('0x1f')],'campaigns_has_cm_lists',_0x5659('0x68'),_0x5659('0x69'),_0x4d75ca));_0x121214[_0x5659('0x40')](insertCmHopperBlack(_0x5ae328[_0x5659('0x1f')],_0x5659('0x6a'),_0x5659('0x68'),_0x5659('0x69')));BPromise[_0x5659('0x6b')](_0x121214,handleQuery)[_0x5659('0x6c')](function(_0x5df40b){stats[_0x5659('0x6d')]=!![];stats[_0x5659('0x6e')]=_0x5ae328[_0x5659('0x5f')]&&_0x5ae328[_0x5659('0x5f')][_0x5659('0x4f')]?results[0x2][_0x5659('0x6e')]:results[0x0][_0x5659('0x6e')];socket[_0x5659('0x6f')]('contact:import:'+_0xced8a4,stats);fs[_0x5659('0x70')](_0x112be1);fs[_0x5659('0x70')](_0x294b6b);process[_0x5659('0x3e')](0x0);})[_0x5659('0x44')](function(_0x4296bb){logger[_0x5659('0x3d')](_0x4296bb['message']);process['exit'](0x1);});}catch(_0x398f69){logger[_0x5659('0x3d')]('complete',_0x398f69[_0x5659('0x41')]);process[_0x5659('0x3e')](0x1);}},'error':function(_0x36ec87,_0x5d7cec,_0x36d638,_0x2070e5){throw new Error(_0x2070e5);}});}function validate(){if(process['argv']&&process[_0x5659('0x71')][_0x5659('0x4f')]<0x4){throw new Error(_0x5659('0x72'));}var _0x17ec0b=path[_0x5659('0x15')](config[_0x5659('0x4a')],_0x5659('0x73'),process[_0x5659('0x71')][0x2]);if(!fs[_0x5659('0x74')](_0x17ec0b)){throw new Error(_0x5659('0x75'));}var _0x4d1ae2={};try{_0x4d1ae2=JSON['parse'](process[_0x5659('0x71')][0x3]);if(!_0x4d1ae2[_0x5659('0x76')]){throw new Error(_0x5659('0x77'));}if(!_0x4d1ae2[_0x5659('0x76')]['phone']){throw new Error(_0x5659('0x78'));}if(!_0x4d1ae2[_0x5659('0x76')][_0x5659('0x5a')]){throw new Error('firstName\x20is\x20mandatory');}var _0x1f365c=0x0;if(_0x4d1ae2['binding'][_0x5659('0x23')]){_0x1f365c=0x1;}if(!_0x4d1ae2[_0x5659('0x1f')]){throw new Error(_0x5659('0x79'));}}catch(_0x540be1){throw new Error('body\x20id\x20mandatory');}var _0x213b14=[];try{_0x213b14=_['map'](JSON[_0x5659('0x4e')](process['argv'][0x4]),'id');}catch(_0x51589a){logger[_0x5659('0x3b')](_0x5659('0x7a'));}main(_0x17ec0b,_0x4d1ae2,_0x213b14,_0x1f365c);}validate();process['on'](_0x5659('0x7b'),handleStop);process['on']('uncaughtException',handleUncaughtException); \ No newline at end of file diff --git a/server/components/integrations/configuration.js b/server/components/integrations/configuration.js index b8c0fb3..b68d22e 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 _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 +var _0x4143=['***\x20Call\x20Info\x20***','Caller\x20Number','Caller\x20Name','calleridname','keyValue','Queue','uniqueid','Date','agentcalledAt','Agent\x20Name','destcalleridname','Agent\x20Number','***\x20Time\x20Info\x20***','Agent\x20Ring','Agent\x20Complete','agentcompleteAt','Hold\x20Time','holdtime','Talk\x20Time','talktime','Called\x20Number','Member\x20Name','UniqueId','Answer\x20Time','answertime','Complete\x20Time','endtime','Duration','duration','Billable\x20Time','billableseconds','getSubjects','string','[xCALLY\x20Ticket]','toLowerCase','inbound','push','variable','queue','calleridnum','outbound','Outbound\x20Call','destcalleridnum','getDescriptions','voice'];(function(_0x176329,_0x568c84){var _0x31997c=function(_0x3d64df){while(--_0x3d64df){_0x176329['push'](_0x176329['shift']());}};_0x31997c(++_0x568c84);}(_0x4143,0xd3));var _0x3414=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0x4143[_0x2f3848];return _0x102668;};'use strict';exports[_0x3414('0x0')]=function(_0x5ca2d8,_0x57d0cf){var _0x20bb5a=[{'type':_0x3414('0x1'),'content':_0x3414('0x2'),'variableName':null}];switch(_0x5ca2d8[_0x3414('0x3')]()){case'voice':switch(_0x57d0cf[_0x3414('0x3')]()){case _0x3414('0x4'):_0x20bb5a[_0x3414('0x5')]({'type':_0x3414('0x6'),'content':'','variableName':_0x3414('0x7')});_0x20bb5a[_0x3414('0x5')]({'type':'variable','content':'','variableName':_0x3414('0x8')});break;case _0x3414('0x9'):_0x20bb5a[_0x3414('0x5')]({'type':_0x3414('0x1'),'content':_0x3414('0xa'),'variableName':null});_0x20bb5a[_0x3414('0x5')]({'type':'variable','content':'','variableName':_0x3414('0xb')});break;}}return _0x20bb5a;};exports[_0x3414('0xc')]=function(_0xa29557,_0x4f3e27){var _0x3ca798=[];switch(_0xa29557['toLowerCase']()){case _0x3414('0xd'):switch(_0x4f3e27[_0x3414('0x3')]()){case _0x3414('0x4'):_0x3ca798=[{'type':'string','content':_0x3414('0xe'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x3414('0xf'),'keyType':'variable','variableName':_0x3414('0x8')},{'type':'keyValue','content':'','key':_0x3414('0x10'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x11')},{'type':_0x3414('0x12'),'content':'','key':'Call\x20To','keyType':_0x3414('0x6'),'variableName':'destexten'},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x13'),'keyType':_0x3414('0x6'),'variableName':'queue'},{'type':_0x3414('0x12'),'content':'','key':'UniqueId','keyType':_0x3414('0x6'),'variableName':_0x3414('0x14')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x15'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x16')},{'type':'string','content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x17'),'keyType':'variable','variableName':_0x3414('0x18')},{'type':'keyValue','content':'','key':_0x3414('0x19'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0xb')},{'type':_0x3414('0x1'),'content':_0x3414('0x1a'),'key':null,'keyType':null,'variableName':null},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x1b'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x16')},{'type':_0x3414('0x12'),'content':'','key':'Agent\x20Connect','keyType':_0x3414('0x6'),'variableName':'agentconnectAt'},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x1c'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x1d')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x1e'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x1f')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x20'),'keyType':_0x3414('0x6'),'variableName':_0x3414('0x21')}];break;case _0x3414('0x9'):_0x3ca798=[{'type':_0x3414('0x1'),'content':_0x3414('0xe'),'variableName':null},{'type':'keyValue','content':'','key':_0x3414('0x22'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':'destcalleridnum'},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x23'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':'membername'},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x24'),'keyType':'variable','keyContent':'','variableName':'uniqueid'},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x15'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':'starttime'},{'type':'string','content':_0x3414('0x1a')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x25'),'keyType':'variable','keyContent':'','variableName':_0x3414('0x26')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x27'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':_0x3414('0x28')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x29'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':_0x3414('0x2a')},{'type':_0x3414('0x12'),'content':'','key':_0x3414('0x2b'),'keyType':_0x3414('0x6'),'keyContent':'','variableName':_0x3414('0x2c')}];break;}}return _0x3ca798;}; \ No newline at end of file diff --git a/server/components/interaction/service.js b/server/components/interaction/service.js index db18be4..867b1eb 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 _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 +var _0xc6a0=['toUpperCase','role','stringify','null','upperFirst','findOne','then','update','info','user','clone','body','html','phone','fax','mobile','../../config/logger','openchannel-interactions','mail-interactions','fax-interactions','sms-interactions','chat-interactions','InteractionId','unknown','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s'];(function(_0x56ccd5,_0x2f0f74){var _0x584f6b=function(_0x506158){while(--_0x506158){_0x56ccd5['push'](_0x56ccd5['shift']());}};_0x584f6b(++_0x2f0f74);}(_0xc6a0,0x12e));var _0x0c6a=function(_0x57d4aa,_0x59137b){_0x57d4aa=_0x57d4aa-0x0;var _0x447350=_0xc6a0[_0x57d4aa];return _0x447350;};'use strict';var _=require('lodash');var db=require('../../mysqldb')['db'];var loggers={'openchannel':require(_0x0c6a('0x0'))(_0x0c6a('0x1')),'mail':require(_0x0c6a('0x0'))(_0x0c6a('0x2')),'fax':require('../../config/logger')(_0x0c6a('0x3')),'sms':require(_0x0c6a('0x0'))(_0x0c6a('0x4')),'chat':require(_0x0c6a('0x0'))(_0x0c6a('0x5')),'whatsapp':require(_0x0c6a('0x0'))('whatsapp-interactions')};function getInteractionId(_0x16dba3,_0x3cb4f8,_0x152582){if(_0x16dba3&&_0x16dba3[_['upperFirst'](_0x152582)+_0x0c6a('0x6')]){return _0x16dba3[_['upperFirst'](_0x152582)+_0x0c6a('0x6')];}else if(_0x16dba3&&_0x16dba3['id']){return _0x16dba3['id'];}else if(_0x3cb4f8&&_0x3cb4f8['id']){return _0x3cb4f8['id'];}else{return _0x0c6a('0x7');}}function log(_0x3b63d5,_0x4c90d0,_0x3e32d9,_0x5e0b5d,_0x10f66e,_0x77e759){loggers[_0x10f66e[_0x0c6a('0x8')]()][_0x3b63d5](_0x0c6a('0x9'),_0x77e759[_0x0c6a('0xa')](),_0x4c90d0?_0x4c90d0['id']:null,_0x4c90d0?_0x4c90d0['name']:null,_0x4c90d0?_0x4c90d0[_0x0c6a('0xb')]:null,getInteractionId(_0x3e32d9,_0x5e0b5d,_0x10f66e),_0x3e32d9?JSON[_0x0c6a('0xc')](_0x3e32d9):_0x0c6a('0xd'));}function updateUser(_0x596a0f,_0x4842a0,_0xac546c,_0x30ecf7,_0x3b0a37){db[_[_0x0c6a('0xe')](_0x30ecf7)+'Interaction'][_0x0c6a('0xf')]({'where':{'id':getInteractionId(_0x4842a0,_0xac546c,_0x30ecf7)}})[_0x0c6a('0x10')](function(_0x6fbd3b){if(_0x6fbd3b){return _0x6fbd3b[_0x0c6a('0x11')]({'UserId':_0x596a0f?_0x596a0f['id']:null});}})[_0x0c6a('0x10')](function(_0x13478a){if(_0x13478a){log(_0x0c6a('0x12'),_0x596a0f,_0x4842a0,_0xac546c,_0x30ecf7,_0x3b0a37);}})['catch'](function(){log('error',_0x596a0f,_0x4842a0,_0xac546c,_0x30ecf7,_0x3b0a37);});}exports['tracked']=function(_0x3df212,_0x3aa13b){return function(_0xd71896,_0x3d6617,_0x3369c6){var _0x300fea=_0xd71896[_0x0c6a('0x13')];var _0x7d06a2={};var _0x2b57af=_0xd71896['query'];if(_0x7d06a2){_0x7d06a2=_[_0x0c6a('0x14')](_0xd71896[_0x0c6a('0x15')]);_0x7d06a2=_['omit'](_0x7d06a2,[_0x0c6a('0x15'),_0x0c6a('0x16'),_0x0c6a('0x17'),_0x0c6a('0x18'),_0x0c6a('0x19')]);}updateUser(_0x300fea,_0x7d06a2,_0x2b57af,_0x3df212,_0x3aa13b);_0x3369c6(null);};}; \ No newline at end of file diff --git a/server/components/license/service.js b/server/components/license/service.js index c38dc04..7cc6a34 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 _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 +var _0x54fb=['User','admin','user','util','composable-middleware','../../mysqldb','data1','split','createDecipher','aes-256-ctr','update','base64','utf8','parse','hasOwnProperty','use','License','findOne','then','count','status','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch'];(function(_0x10974c,_0x22ad4b){var _0x17e139=function(_0x3d7468){while(--_0x3d7468){_0x10974c['push'](_0x10974c['shift']());}};_0x17e139(++_0x22ad4b);}(_0x54fb,0x93));var _0xb54f=function(_0x36117c,_0x5d1335){_0x36117c=_0x36117c-0x0;var _0x2993be=_0x54fb[_0x36117c];return _0x2993be;};'use strict';var crypto=require('crypto');var util=require(_0xb54f('0x0'));var compose=require(_0xb54f('0x1'));var db=require(_0xb54f('0x2'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0x211b38,_0x29fd42){if(_0x211b38&&_0x29fd42){if(_0x29fd42[_0xb54f('0x3')]&&_0x29fd42['license']){var _0x107456=_0x29fd42[_0xb54f('0x3')];var _0x387e91=_0x29fd42['license'];var _0x466ea3=_0x107456[_0xb54f('0x4')]('-')[0x4];var _0x5e9854=_0x107456[_0xb54f('0x4')]('-')[0x0];var _0x3c30d9=crypto[_0xb54f('0x5')](_0xb54f('0x6'),util['format']('%s:%s:%s',_0x466ea3,_0x107456,_0x5e9854));var _0x1a47eb=_0x3c30d9[_0xb54f('0x7')](_0x387e91,_0xb54f('0x8'),_0xb54f('0x9'));_0x1a47eb+=_0x3c30d9['final'](_0xb54f('0x9'));var _0x1b5432=JSON[_0xb54f('0xa')](_0x1a47eb);return _0x1b5432[_0xb54f('0xb')](_0x211b38)?_0x1b5432[_0x211b38]:null;}}return null;}function isLimit(_0x34dd64,_0x50941d,_0x50c28f,_0x257d91){var _0xa91bea=_0x50941d;return compose()[_0xb54f('0xc')](function(_0x560eaa,_0x353d41,_0x235260){return db[_0xb54f('0xd')][_0xb54f('0xe')]({'where':{'id':0x1},'raw':!![]})[_0xb54f('0xf')](function(_0x30b6ea){var _0x4c05f7=getValueFromLicense(_0x34dd64,_0x30b6ea);return _0x4c05f7?_0x4c05f7:_0xa91bea;})[_0xb54f('0xf')](function(_0x368739){_0xa91bea=_0x368739;return _0x50c28f[_0xb54f('0x10')](_0x257d91);})[_0xb54f('0xf')](function(_0x11988c){if(_0x11988c>=_0xa91bea){return _0x353d41[_0xb54f('0x11')](0x193)[_0xb54f('0x12')]({'message':util['format'](_0xb54f('0x13'),_0x34dd64)});}_0x235260();})[_0xb54f('0x14')](function(_0x35534a){_0x235260(_0x35534a);});});}function isUserLimit(){return isLimit('users',0x1,db[_0xb54f('0x15')],{'where':{'$or':[{'role':_0xb54f('0x16')},{'role':_0xb54f('0x17')}]}});}exports['isUserLimit']=isUserLimit; \ No newline at end of file diff --git a/server/components/parsers/advancedSearch.js b/server/components/parsers/advancedSearch.js index dfe8362..d67d229 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 _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 +var _0x66e4=['$lt','<\x20?','>\x20?','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','pop','utcOffset','add','hours','minutes','seconds','start','lodash','parseSearch','sqlOperator','startsWith','[$or]','replace','[$and]','split','length','forEach','shift','match','map','conditions','push','DATE','operator','$between','value','$gt','$lte','days','format','YYYY-MM-DD','text','field','\x20AS\x20','castTo','includes','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','=\x20?','<>\x20?','$substring','$startsWith','$endsWith'];(function(_0xe4b0f9,_0x104d3f){var _0x588a71=function(_0x51005d){while(--_0x51005d){_0xe4b0f9['push'](_0xe4b0f9['shift']());}};_0x588a71(++_0x104d3f);}(_0x66e4,0x79));var _0x466e=function(_0x4ec7d1,_0x1cb648){_0x4ec7d1=_0x4ec7d1-0x0;var _0x147f03=_0x66e4[_0x4ec7d1];return _0x147f03;};'use strict';var _=require(_0x466e('0x0'));var moment=require('moment');exports[_0x466e('0x1')]=function(_0x372ebf){var _0xe46d63={'conditions':[]};_0xe46d63[_0x466e('0x2')]=_[_0x466e('0x3')](_0x372ebf,_0x466e('0x4'))?'or':'and';var _0x5a7d75=_0x372ebf[_0x466e('0x5')](_0x466e('0x6'),'')[_0x466e('0x5')](_0x466e('0x4'),'')[_0x466e('0x7')]('||');for(var _0x23025b=0x0;_0x23025b<_0x5a7d75[_0x466e('0x8')];_0x23025b++){var _0x46a3cd=_0x5a7d75[_0x23025b][_0x466e('0x7')](':=');var _0x3c01a8=_0x46a3cd[0x0];var _0x25d164=_0x46a3cd['slice'](0x1);_0x25d164[_0x466e('0x9')](function(_0x203b3a){var _0x87bf4c=_0x203b3a[_0x466e('0x7')]('[')[_0x466e('0xa')]();var _0x2b9169=_0x203b3a[_0x466e('0xb')](/\[(.*?)\]/g);_0x2b9169[_0x466e('0x9')](function(_0x372808){var _0x23b0c6=_0x372808[_0x466e('0x7')]('[')['filter'](function(_0x1c76a7){return _0x1c76a7['indexOf'](']')>-0x1;})[_0x466e('0xc')](function(_0x1151f4){return _0x1151f4[_0x466e('0x7')](']')[0x0];})[0x0];_0xe46d63[_0x466e('0xd')][_0x466e('0xe')]({'field':_0x3c01a8,'operator':_0x87bf4c,'value':_0x23b0c6});});});}return _0xe46d63;};exports['buildExpression']=function(_0x597659,_0x5cc2fc,_0x2621b8){var _0x548636={};if(_0x5cc2fc===_0x466e('0xf')){if(_0x2621b8[_0x466e('0x10')]==='$eq'){_0x2621b8[_0x466e('0x10')]=_0x466e('0x11');_0x2621b8['value']+=','+_0x2621b8[_0x466e('0x12')];}else if(_['includes']([_0x466e('0x13'),_0x466e('0x14')],_0x2621b8[_0x466e('0x10')])){_0x2621b8['value']=moment(_0x2621b8[_0x466e('0x12')])['add'](0x1,_0x466e('0x15'))[_0x466e('0x16')](_0x466e('0x17'));}}if(_0x2621b8['castTo']){_0x5cc2fc=_0x2621b8['castTo'];_0x548636[_0x466e('0x18')]='CAST('+_0x597659+'.'+_0x2621b8[_0x466e('0x19')]+_0x466e('0x1a')+_0x2621b8[_0x466e('0x1b')]+')\x20'+parseOperator(_0x2621b8[_0x466e('0x10')]);}else{_0x548636[_0x466e('0x18')]=_0x597659+'.'+_0x2621b8[_0x466e('0x19')]+'\x20'+parseOperator(_0x2621b8[_0x466e('0x10')]);}if(_[_0x466e('0x1c')]([_0x466e('0x1d'),_0x466e('0x1e')],_0x2621b8[_0x466e('0x10')]))_0x548636[_0x466e('0x18')]='('+_0x548636[_0x466e('0x18')]+_0x466e('0x1f')+_0x597659+'.'+_0x2621b8[_0x466e('0x19')]+_0x466e('0x20');_0x548636[_0x466e('0x12')]=parseValue(_0x5cc2fc,_0x2621b8['operator'],_0x2621b8[_0x466e('0x12')]);return _0x548636;};function parseOperator(_0x23c962){var _0x3697cb;switch(_0x23c962){case _0x466e('0x21'):_0x3697cb=_0x466e('0x22');break;case'$notIn':_0x3697cb=_0x466e('0x23');break;case'$eq':_0x3697cb=_0x466e('0x24');break;case _0x466e('0x1d'):_0x3697cb=_0x466e('0x25');break;case _0x466e('0x26'):case _0x466e('0x27'):case _0x466e('0x28'):_0x3697cb='LIKE\x20?';break;case _0x466e('0x29'):_0x3697cb=_0x466e('0x2a');break;case'$gt':_0x3697cb=_0x466e('0x2b');break;case _0x466e('0x14'):_0x3697cb='<=\x20?';break;case _0x466e('0x2c'):_0x3697cb=_0x466e('0x2d');break;case'$between':_0x3697cb=_0x466e('0x2e');break;}return _0x3697cb;}function parseValue(_0x1a0929,_0x434a30,_0xdc2f5f){var _0x130ade={'start':undefined,'end':undefined};switch(_0x434a30){case _0x466e('0x21'):case'$notIn':_0x130ade['start']=_0xdc2f5f[_0x466e('0x7')](',');break;case _0x466e('0x26'):_0x130ade['start']='%'+_0xdc2f5f+'%';break;case'$startsWith':_0x130ade['start']=_0xdc2f5f+'%';break;case _0x466e('0x28'):_0x130ade['start']='%'+_0xdc2f5f;break;case _0x466e('0x11'):var _0x3d8ff4=_0xdc2f5f['split'](',');var _0xdc2f5f=_0x3d8ff4['shift']();var _0x36edd7=_0x3d8ff4[_0x466e('0x2f')]();if(_0x1a0929===_0x466e('0xf')){_0xdc2f5f=moment(_0xdc2f5f)[_0x466e('0x30')](0x0,!![])[_0x466e('0x16')]();_0x36edd7=moment(_0x36edd7)['utcOffset'](0x0,!![])[_0x466e('0x31')](0x17,_0x466e('0x32'))['add'](0x3b,_0x466e('0x33'))[_0x466e('0x31')](0x3b,_0x466e('0x34'))[_0x466e('0x16')]();}_0x130ade={'start':_0xdc2f5f,'end':_0x36edd7};break;default:_0x130ade[_0x466e('0x35')]=_0xdc2f5f;break;}return _0x130ade;} \ No newline at end of file diff --git a/server/components/parsers/qs.js b/server/components/parsers/qs.js index 791a69d..8ca9e89 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 _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 +var _0xdc1a=['offset','sort','map','indexOf','cast','col','priority','unsigned','substr','ASC','omit','isString','unset','^[+]?[0-9]*$','isEmail','match','getFullTextValue','replace','push','lodash','sequelize','moment','fields','split','filters','isEmpty','forOwn','find','type','DATE','isPlainObject','parse','$gte','format','YYYY-MM-DD','utc','subtract','name','isArray'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdc1a,0x172));var _0xadc1=function(_0x29ea01,_0x29fcfd){_0x29ea01=_0x29ea01-0x0;var _0x262857=_0xdc1a[_0x29ea01];return _0x262857;};'use strict';var _=require(_0xadc1('0x0'));var sequelize=require(_0xadc1('0x1'));var moment=require(_0xadc1('0x2'));var LIMIT_VALUE=0xfa;exports[_0xadc1('0x3')]=function(_0x1d8791){var _0x41a9fe=null;if(_0x1d8791){_0x41a9fe=_0x1d8791[_0xadc1('0x4')](',');}return _0x41a9fe;};exports[_0xadc1('0x5')]=function(_0x1c9088,_0x5b6c34){var _0x383cd1={};if(!_[_0xadc1('0x6')](_0x1c9088)){_[_0xadc1('0x7')](_0x1c9088,function(_0x21875a,_0xfbcbaa){try{if(_0x5b6c34){var _0x4b93a0=_[_0xadc1('0x8')](_0x5b6c34,{'name':_0xfbcbaa})||{};if(_0x4b93a0[_0xadc1('0x9')]===_0xadc1('0xa')&&_[_0xadc1('0xb')](_0x21875a)){var _0x13363e=JSON[_0xadc1('0xc')](_0x21875a);var _0x14e370={'$gte':moment(moment(_0x13363e[_0xadc1('0xd')])[_0xadc1('0xe')](_0xadc1('0xf')))[_0xadc1('0x10')]()[_0xadc1('0xe')](),'$lte':moment(moment(_0x13363e['$lte'])[_0xadc1('0xe')](_0xadc1('0xf')))[_0xadc1('0x10')]()[_0xadc1('0x11')](0x1,'s')[_0xadc1('0xe')]()};_0x383cd1[_0xfbcbaa]=_0x14e370;}else if(_0x4b93a0[_0xadc1('0x12')]==='uniqueid'){_0x383cd1[_0xfbcbaa]=_0x21875a;}else{_0x383cd1[_0xfbcbaa]=_[_0xadc1('0x13')](_0x21875a)?_0x21875a:JSON[_0xadc1('0xc')](_0x21875a);}}else{_0x383cd1[_0xfbcbaa]=_[_0xadc1('0x13')](_0x21875a)?_0x21875a:JSON[_0xadc1('0xc')](_0x21875a);}}catch(_0x2d5c0d){_0x383cd1[_0xfbcbaa]=_0x21875a['split'](',');}});}return _0x383cd1;};exports['limit']=function(_0x28ec40){_0x28ec40=parseInt(_0x28ec40,0xa);if(!_0x28ec40||_0x28ec40<0x0){_0x28ec40=LIMIT_VALUE;}return _0x28ec40;};exports[_0xadc1('0x14')]=function(_0x2429cc){_0x2429cc=parseInt(_0x2429cc,0xa);if(!_0x2429cc||_0x2429cc<0x0){_0x2429cc=0x0;}return _0x2429cc;};exports[_0xadc1('0x15')]=function(_0xce0448){var _0x3acadd,_0x391cde=null;if(_0xce0448){_0x3acadd=_0xce0448[_0xadc1('0x4')](',');_0x391cde=_[_0xadc1('0x16')](_0x3acadd,function(_0x683924){if(_0x683924[_0xadc1('0x17')]('-')===0x0){return[_0x683924==='priority'?sequelize[_0xadc1('0x18')](sequelize[_0xadc1('0x19')](_0xadc1('0x1a')),_0xadc1('0x1b')):_0x683924[_0xadc1('0x1c')](0x1),'DESC'];}else{return[_0x683924===_0xadc1('0x1a')?sequelize[_0xadc1('0x18')](sequelize['col'](_0xadc1('0x1a')),_0xadc1('0x1b')):_0x683924,_0xadc1('0x1d')];}});}return _0x391cde;};exports[_0xadc1('0x1e')]=function(_0x425b6e,_0x321e0c){if(_[_0xadc1('0x6')](_0x425b6e)){return _0x425b6e;}if(_[_0xadc1('0x13')](_0x425b6e)){for(var _0x578686=0x0;_0x578686<_0x425b6e['length'];_0x578686+=0x1){_0x425b6e[_0x578686]=this[_0xadc1('0x1e')](_0x425b6e[_0x578686],_0x321e0c);}return _0x425b6e;}if(!_['isObject'](_0x425b6e)){return _0x425b6e;}if(_[_0xadc1('0x1f')](_0x321e0c)){_0x321e0c=[_0x321e0c];}if(!_['isArray'](_0x321e0c)){return _0x425b6e;}for(var _0xb23169=0x0;_0xb23169<_0x321e0c['length'];_0xb23169+=0x1){_[_0xadc1('0x20')](_0x425b6e,_0x321e0c[_0xb23169]);}for(var _0x42902c in _0x425b6e){if(_0x425b6e['hasOwnProperty'](_0x42902c)){_0x425b6e[_0x42902c]=this[_0xadc1('0x1e')](_0x425b6e[_0x42902c],_0x321e0c);}}return _0x425b6e;};exports['isNumeric']=function(_0x55666b){return _0x55666b['match'](RegExp(_0xadc1('0x21')))?!![]:![];};exports[_0xadc1('0x22')]=function(_0x35310e){return _0x35310e[_0xadc1('0x23')](/^\S+@\S+$/)?!![]:![];};exports[_0xadc1('0x24')]=function(_0x490cd7){var _0x27a729=[];_0x490cd7[_0xadc1('0x4')](/[ ,]+/)['forEach'](function(_0x15f373){_0x15f373=_0x15f373[_0xadc1('0x25')](/([^:]")"+/g,'$1');_0x15f373='+'+_0x15f373+'*';if(_0x15f373['includes']('@'))_0x15f373='\x22'+_0x15f373+'\x22';_0x27a729[_0xadc1('0x26')](_0x15f373);});return _0x27a729['join']('\x20');}; \ No newline at end of file diff --git a/server/config/express.js b/server/config/express.js index 3d6a18d..3a164c5 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0xd595=['/server/views','html','ejs','renderFile','view\x20engine','50mb','json','express','body-parser','method-override','cookie-parser','./environment','../mysqldb','default','set','appPath','root','development','test','client','use','json\x20replacer','toISOString','split','static','get','views'];(function(_0x487f22,_0x2cc035){var _0x5b8880=function(_0x3cdd0f){while(--_0x3cdd0f){_0x487f22['push'](_0x487f22['shift']());}};_0x5b8880(++_0x2cc035);}(_0xd595,0x130));var _0x5d59=function(_0x263ae1,_0xb7ccc6){_0x263ae1=_0x263ae1-0x0;var _0x24145e=_0xd595[_0x263ae1];return _0x24145e;};'use strict';var express=require(_0x5d59('0x0'));var favicon=require('serve-favicon');var bodyParser=require(_0x5d59('0x1'));var methodOverride=require(_0x5d59('0x2'));var cookieParser=require(_0x5d59('0x3'));var errorHandler=require('errorhandler');var path=require('path');var passport=require('passport');var cors=require('cors');var moment=require('moment');var config=require(_0x5d59('0x4'));var db=require(_0x5d59('0x5'))['db'];exports[_0x5d59('0x6')]=function(_0x30a6b2){var _0x5d8663=_0x30a6b2['get']('env');if(_0x5d8663==='production'){_0x30a6b2[_0x5d59('0x7')](_0x5d59('0x8'),path['join'](config[_0x5d59('0x9')],'public'));}if(_0x5d8663===_0x5d59('0xa')||_0x5d8663===_0x5d59('0xb')){_0x30a6b2['set'](_0x5d59('0x8'),path['join'](config[_0x5d59('0x9')],_0x5d59('0xc')));_0x30a6b2[_0x5d59('0xd')](errorHandler());}_0x30a6b2[_0x5d59('0x7')](_0x5d59('0xe'),function(_0x47eb7d,_0x13f47b){if(this[_0x47eb7d]instanceof Date){_0x13f47b=this[_0x47eb7d][_0x5d59('0xf')]()[_0x5d59('0x10')]('.')[0x0]+'Z';}return _0x13f47b;});_0x30a6b2['use'](express[_0x5d59('0x11')](_0x30a6b2[_0x5d59('0x12')](_0x5d59('0x8'))));_0x30a6b2[_0x5d59('0x7')](_0x5d59('0x13'),config[_0x5d59('0x9')]+_0x5d59('0x14'));_0x30a6b2['engine'](_0x5d59('0x15'),require(_0x5d59('0x16'))[_0x5d59('0x17')]);_0x30a6b2[_0x5d59('0x7')](_0x5d59('0x18'),_0x5d59('0x15'));_0x30a6b2['use'](bodyParser['urlencoded']({'limit':_0x5d59('0x19'),'extended':!![]}));_0x30a6b2[_0x5d59('0xd')](bodyParser[_0x5d59('0x1a')]({'limit':_0x5d59('0x19')}));_0x30a6b2[_0x5d59('0xd')](cors());_0x30a6b2['use'](methodOverride());_0x30a6b2[_0x5d59('0xd')](cookieParser());_0x30a6b2[_0x5d59('0xd')](passport['initialize']());}; \ No newline at end of file diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js index 514a425..fecb254 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 _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 +var _0xaf89=['child_process','execSync','../environment','orderBy','keys','length','filter','family','IPv4','internal','concat','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','map','model','md5','getUuid','platform','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','createHash','update','hex','substring','lodash','bimedia-machine-uuid'];(function(_0x271940,_0x5ca0a5){var _0x448bae=function(_0x423b50){while(--_0x423b50){_0x271940['push'](_0x271940['shift']());}};_0x448bae(++_0x5ca0a5);}(_0xaf89,0x1ae));var _0x9af8=function(_0x404cde,_0x27b51c){_0x404cde=_0x404cde-0x0;var _0x139882=_0xaf89[_0x404cde];return _0x139882;};'use strict';var _=require(_0x9af8('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0x9af8('0x1'));var exec=require(_0x9af8('0x2'))[_0x9af8('0x3')];var config=require(_0x9af8('0x4'));function getInterfaces(){var _0x5c738d=[];var _0x14063c=os['networkInterfaces']();var _0x13c870=_[_0x9af8('0x5')](_[_0x9af8('0x6')](_0x14063c));for(var _0x4184a5=0x0;_0x4184a5<_0x13c870[_0x9af8('0x7')];_0x4184a5++){var _0x46658c=_0x14063c[_0x13c870[_0x4184a5]][_0x9af8('0x8')](function(_0x5e130e){return _0x5e130e[_0x9af8('0x9')]===_0x9af8('0xa')&&_0x5e130e[_0x9af8('0xb')]===![];});_0x5c738d=_0x5c738d[_0x9af8('0xc')](_0x46658c);}return _0x5c738d;}function getFirstInterface(){var _0x25dd3e=_['head'](getInterfaces());return{'macAddress':_0x25dd3e&&_0x25dd3e[_0x9af8('0xd')]?_0x25dd3e[_0x9af8('0xd')]:_0x9af8('0xe'),'ipAddress':_0x25dd3e&&_0x25dd3e[_0x9af8('0xf')]?_0x25dd3e[_0x9af8('0xf')]:_0x9af8('0x10')};}exports[_0x9af8('0x11')]=getFirstInterface;function getCPUhash(){var _0x2cb2c1=_[_0x9af8('0x5')](os[_0x9af8('0x12')]()[_0x9af8('0x13')](function(_0x17d12f){return _0x17d12f[_0x9af8('0x14')];}))['join'](':');return crypto['createHash'](_0x9af8('0x15'))['update'](_0x2cb2c1)['digest']('hex');}exports[_0x9af8('0x16')]=function(){var _0xc53687=os[_0x9af8('0x17')]();var _0x5d620e=/[0-9a-f-]{36}/;if(config[_0x9af8('0x18')]&&_0x5d620e['test'](config[_0x9af8('0x18')])){return config[_0x9af8('0x18')];}else if(_0xc53687===_0x9af8('0x19')){return exec(_0x9af8('0x1a'),{'encoding':_0x9af8('0x1b')})[_0x9af8('0x1c')]('\x0d\x0a','');}else{var _0x30f888=getFirstInterface();var _0x840807=getCPUhash();var _0x2f22f1=_0x840807+'|'+os[_0x9af8('0x1d')]()+'|'+_0x30f888[_0x9af8('0x1e')]+'|'+_0x30f888[_0x9af8('0x1f')];var _0x594a98=crypto[_0x9af8('0x20')](_0x9af8('0x15'))[_0x9af8('0x21')](_0x2f22f1)['digest'](_0x9af8('0x22'));return _0x594a98[_0x9af8('0x23')](0x0,0x8)+'-'+_0x594a98[_0x9af8('0x23')](0x8,0xc)+'-'+_0x594a98[_0x9af8('0x23')](0xc,0x10)+'-'+_0x594a98[_0x9af8('0x23')](0x10,0x14)+'-'+_0x594a98[_0x9af8('0x23')](0x14);}}; \ No newline at end of file diff --git a/server/config/license/index.js b/server/config/license/index.js index 8debdf1..a9336f9 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 _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 +var _0x158d=['getUuid','License','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','default','util','moment','bluebird','pkginfo','version','../../mysqldb','../../components/encryptor','./hardware','../logger','license','https://www.xcallymotion.com','format','exports','GET','then','catch','data1','data2','active','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','update','Disabled','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','toUpperCase','encryptString','YYYY-MM-DD\x20HH:mm','diff','decryptString','DEMO\x20START\x20AT\x20%s','error','message','finally'];(function(_0x2d604d,_0x51a1f5){var _0x159761=function(_0x26d263){while(--_0x26d263){_0x2d604d['push'](_0x2d604d['shift']());}};_0x159761(++_0x51a1f5);}(_0x158d,0xfc));var _0xd158=function(_0xfbdff6,_0x2af690){_0xfbdff6=_0xfbdff6-0x0;var _0x4cb9be=_0x158d[_0xfbdff6];return _0x4cb9be;};'use strict';var util=require(_0xd158('0x0'));var moment=require(_0xd158('0x1'));var rp=require('request-promise');var BPromise=require(_0xd158('0x2'));var pkginfo=require(_0xd158('0x3'))(module,_0xd158('0x4'));var db=require(_0xd158('0x5'))['db'];var encryptor=require(_0xd158('0x6'));var hardware=require(_0xd158('0x7'));var logger=require(_0xd158('0x8'))(_0xd158('0x9'));var HOST=_0xd158('0xa');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x31cb84){return new BPromise(function(_0x1d8dfa,_0x318aec){var _0x39c559=util[_0xd158('0xb')]('%s/api/servers/%s/check?version=%s',HOST,_0x31cb84,module[_0xd158('0xc')][_0xd158('0x4')]);if(oldToken){_0x39c559=util['format']('%s/api/servers/%s/check?version=%s&oldtoken=%s',HOST,_0x31cb84,module['exports'][_0xd158('0x4')],oldToken);}var _0x27495e={'uri':_0x39c559,'method':_0xd158('0xd'),'timeout':0xea60,'json':!![]};return rp(_0x27495e)[_0xd158('0xe')](function(_0x2b1f44){_0x1d8dfa(_0x2b1f44);})[_0xd158('0xf')](function(_0x742a51){_0x318aec(_0x742a51);});});}function manageLicense(_0x3808eb,_0x297e57){var _0x14b4d6=_0x297e57['get']({'plain':!![]});if(!isOldTokenSent&&_0x14b4d6[_0xd158('0x10')]!==_0x3808eb&&!_0x14b4d6[_0xd158('0x11')]){oldToken=_0x14b4d6[_0xd158('0x10')];}httpRequest(_0x3808eb)['then'](function(_0x2eba57){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x2eba57[_0xd158('0x12')]){isOldTokenSent=![];if(!_0x14b4d6[_0xd158('0x9')]&&_0x14b4d6[_0xd158('0x9')]!=_0x2eba57[_0xd158('0x9')]||_0x14b4d6[_0xd158('0x9')]&&_0x14b4d6['data2']){logger[_0xd158('0x13')](_0xd158('0x14'));}if(_0x14b4d6['license']&&!_0x14b4d6[_0xd158('0x11')]&&_0x14b4d6[_0xd158('0x9')]!=_0x2eba57[_0xd158('0x9')]){logger[_0xd158('0x13')](_0xd158('0x15'));}if(_0x14b4d6[_0xd158('0x9')]&&!_0x14b4d6[_0xd158('0x11')]&&_0x14b4d6[_0xd158('0x9')]==_0x2eba57[_0xd158('0x9')]){return _0x297e57;}return _0x297e57[_0xd158('0x16')]({'data1':_0x3808eb,'data2':null,'license':_0x2eba57['license']});}else{if(_0x2eba57[_0xd158('0x9')]||_0x14b4d6[_0xd158('0x9')]){if(!_0x14b4d6[_0xd158('0x11')]){if(_0x14b4d6[_0xd158('0x10')]==_0x3808eb){GRAY_PERIOD_REASON=_0xd158('0x17');logger['info'](_0xd158('0x18'));}else{GRAY_PERIOD_REASON='Changed';logger[_0xd158('0x13')](_0xd158('0x19'),_0x14b4d6['data1'],_0x3808eb);}logger[_0xd158('0x13')]('%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s',GRAY_PERIOD_REASON[_0xd158('0x1a')](),moment()[_0xd158('0xb')]('YYYY-MM-DD\x20HH:mm'));return _0x297e57[_0xd158('0x16')]({'data2':encryptor[_0xd158('0x1b')](moment()[_0xd158('0xb')](_0xd158('0x1c')))});}else{if(moment()[_0xd158('0x1d')](encryptor[_0xd158('0x1e')](_0x14b4d6['data2']),'days')>DAYS){logger[_0xd158('0x13')](_0xd158('0x1f'),moment()[_0xd158('0xb')](_0xd158('0x1c')));isOldTokenSent=![];return _0x297e57[_0xd158('0x16')]({'data1':_0x3808eb,'data2':null,'license':null});}}}else{if(_0x14b4d6[_0xd158('0x10')]!=_0x3808eb){logger[_0xd158('0x13')](_0xd158('0x19'),_0x14b4d6['data1'],_0x3808eb);return _0x297e57[_0xd158('0x16')]({'data1':_0x3808eb,'data2':null,'license':null});}}}return _0x297e57;})[_0xd158('0xe')](function(_0x4b63e5){_0x297e57=_0x4b63e5;})[_0xd158('0xf')](function(_0x2fe499){logger[_0xd158('0x20')](_0x2fe499[_0xd158('0x21')]);})[_0xd158('0x22')](function(){setTimeout(function(){manageLicense(hardware[_0xd158('0x23')](),_0x297e57);},TIME);});}function defaultLicense(){var _0x28a192=hardware['getUuid']();if(_0x28a192){return db[_0xd158('0x24')][_0xd158('0x25')]({'where':{'id':0x1},'defaults':{'data1':_0x28a192}})[_0xd158('0x26')](function(_0x569cd8,_0x5c1ae7){logger[_0xd158('0x13')](_0xd158('0x27'),_0x28a192);manageLicense(_0x28a192,_0x569cd8);})['catch'](function(_0x1775f6){logger[_0xd158('0x20')](_0x1775f6[_0xd158('0x21')]);});}}exports[_0xd158('0x28')]=defaultLicense; \ No newline at end of file diff --git a/server/config/license/util.js b/server/config/license/util.js index 2f9dd78..dcaa084 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 _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 +var _0xcceb=['grayReason','changed','disabled','message','User','role','sequelize','COUNT','col','admin','user','telephone','users','telephones','forEach','count','pick','countBy','exports','util','lodash','moment','./hardware','../../components/encryptor','2027-01-01T00:00:00.000Z','Demo\x20license','getUuid','Breaking\x20license','find','then','catch','uuid','data1','license','License\x20key\x20value\x20not\x20found','split','decryptString','format','parse','demo','machineUuid','add','days'];(function(_0x5b7755,_0x44681c){var _0x1a9c39=function(_0x56ceec){while(--_0x56ceec){_0x5b7755['push'](_0x5b7755['shift']());}};_0x1a9c39(++_0x44681c);}(_0xcceb,0x16b));var _0xbcce=function(_0x5610b7,_0x5095be){_0x5610b7=_0x5610b7-0x0;var _0x1c0eef=_0xcceb[_0x5610b7];return _0x1c0eef;};'use strict';var util=require(_0xbcce('0x0'));var _=require(_0xbcce('0x1'));var moment=require(_0xbcce('0x2'));var BPromise=require('bluebird');var hardware=require(_0xbcce('0x3'));var encryptor=require(_0xbcce('0x4'));var db=require('../../mysqldb')['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xbcce('0x5'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xbcce('0x6'),'machineUuid':hardware[_0xbcce('0x7')](),'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':_0xbcce('0x8'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x85917d){return new BPromise(function(_0x536227,_0x25410f){return db['License'][_0xbcce('0x9')](_['defaults'](_0x85917d,{'raw':!![],'where':{'id':0x1}}))[_0xbcce('0xa')](function(_0x46210e){return checkLicense(_0x46210e,null);})[_0xbcce('0xa')](function(_0x90a733){_0x536227(_0x90a733);return;})[_0xbcce('0xb')](function(_0x5c18b2){_0x25410f(_0x5c18b2);});});}function checkLicense(_0x269ad6,_0x5620b8){if(!_0x269ad6){demoLicense[_0xbcce('0xc')]=_0x269ad6[_0xbcce('0xd')];return demoLicense;}try{var _0x50b4b2=_0x5620b8||_0x269ad6[_0xbcce('0xe')];if(_['isEmpty'](_0x50b4b2)){throw new Error(_0xbcce('0xf'));}var _0x3b6d57=_0x269ad6['data1'];var _0x432709=_0x269ad6['data2'];var _0x3a95b0=_0x3b6d57[_0xbcce('0x10')]('-')[0x4];var _0x11b789=_0x3b6d57[_0xbcce('0x10')]('-')[0x0];var _0x4e5ae2=encryptor[_0xbcce('0x11')](_0x50b4b2,util[_0xbcce('0x12')]('%s:%s:%s',_0x3a95b0,_0x3b6d57,_0x11b789));var _0x1f74ef=JSON[_0xbcce('0x13')](_0x4e5ae2);_0x1f74ef[_0xbcce('0x14')]=![];_0x1f74ef['uuid']=_0x3b6d57;_0x1f74ef[_0xbcce('0x15')]=hardware[_0xbcce('0x7')]();if(_0x432709){var _0x38d0c2=encryptor[_0xbcce('0x11')](_0x432709);_0x1f74ef['gray']=_0x38d0c2;_0x1f74ef['deadline']=moment(_0x38d0c2)[_0xbcce('0x16')](0x7,_0xbcce('0x17'))['format']();_0x1f74ef[_0xbcce('0x18')]=_0x1f74ef[_0xbcce('0xc')]!=_0x1f74ef[_0xbcce('0x15')]?_0xbcce('0x19'):_0xbcce('0x1a');}return _0x1f74ef;}catch(_0x3c7f4e){breakingLicense[_0xbcce('0xc')]=_0x269ad6[_0xbcce('0xd')];breakingLicense[_0xbcce('0x1b')]=_0x3c7f4e[_0xbcce('0x1b')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x437005,_0x5cccb8){getLicense()[_0xbcce('0xa')](function(_0x43bd65){return db[_0xbcce('0x1c')]['findAll']({'attributes':[_0xbcce('0x1d'),[db[_0xbcce('0x1e')]['fn'](_0xbcce('0x1f'),db[_0xbcce('0x1e')][_0xbcce('0x20')]('role')),'count']],'group':_0xbcce('0x1d'),'where':{'role':{'$or':[_0xbcce('0x21'),_0xbcce('0x22'),_0xbcce('0x23')]}},'raw':!![]})[_0xbcce('0xa')](function(_0x2d94b){var _0x57ffd8={'user':_0x43bd65[_0xbcce('0x24')]||0x0,'telephone':_0x43bd65[_0xbcce('0x25')]||0x0};_0x2d94b[_0xbcce('0x26')](function(_0xdaf435){var _0x673807=_0xdaf435[_0xbcce('0x1d')]==='admin'?_0xbcce('0x22'):_0xdaf435[_0xbcce('0x1d')];_0x57ffd8[_0x673807]-=_0xdaf435[_0xbcce('0x27')];if(_0x57ffd8[_0x673807]<0x0)_0x57ffd8[_0x673807]=0x0;});_0x437005(_0x57ffd8);return;});})[_0xbcce('0xb')](function(_0x2148d7){_0x5cccb8(_0x2148d7);});});}function checkUserLimits(_0x34cfb9){return new BPromise(function(_0x49b16a,_0x1ed7a2){getLimits()[_0xbcce('0xa')](function(_0x363e04){var _0x210ea9=_[_0xbcce('0x28')](_[_0xbcce('0x29')](_0x34cfb9,_0xbcce('0x1d')),['admin',_0xbcce('0x22'),_0xbcce('0x23')]);var _0x33bd9b=(_0x210ea9[_0xbcce('0x21')]||0x0)+(_0x210ea9[_0xbcce('0x22')]||0x0);var _0x3df21b=_0x210ea9[_0xbcce('0x23')]||0x0;if(_0x33bd9b>_0x363e04['user'])return _0x1ed7a2('License\x20limit\x20reached\x20for\x20users');if(_0x3df21b>_0x363e04[_0xbcce('0x23')])return _0x1ed7a2('License\x20limit\x20reached\x20for\x20telephones');return _0x49b16a();})[_0xbcce('0xb')](function(_0x6b9505){_0x1ed7a2(_0x6b9505);});});}module[_0xbcce('0x2a')]={'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 762b51d..2266e1c 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 _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 +var _0xefda=['exports','app-id','secret'];(function(_0x4b91c4,_0x23f35f){var _0x25cb80=function(_0x48e283){while(--_0x48e283){_0x4b91c4['push'](_0x4b91c4['shift']());}};_0x25cb80(++_0x23f35f);}(_0xefda,0x96));var _0xaefd=function(_0x4d24ee,_0x51f503){_0x4d24ee=_0x4d24ee-0x0;var _0x38462a=_0xefda[_0x4d24ee];return _0x38462a;};'use strict';module[_0xaefd('0x0')]={'DOMAIN':'http://localhost:9000','SESSION_SECRET':'myappanuglar-secret','GOOGLE_ID':_0xaefd('0x1'),'GOOGLE_SECRET':_0xaefd('0x2'),'DEBUG':''}; \ No newline at end of file diff --git a/server/config/logger.js b/server/config/logger.js index 8142b45..9225c8c 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x4126=['error','info','env','debugLevel','moment','winston','util','path','INFO','join','/var','xcally','%s-%s.log','message','replace','{{{','}}}','[%s]\x20[%s]\x20%s\x20-\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','Logger','transports','File','%s-%s'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0x4126,0x1a4));var _0x6412=function(_0x540dcb,_0x4eacb6){_0x540dcb=_0x540dcb-0x0;var _0x49353c=_0x4126[_0x540dcb];return _0x49353c;};'use strict';var moment=require(_0x6412('0x0'));var winston=require(_0x6412('0x1'));var util=require(_0x6412('0x2'));var path=require(_0x6412('0x3'));var debugLevel=_0x6412('0x4');function filename(_0x3a88ca,_0x212f7e){return path[_0x6412('0x5')](_0x6412('0x6'),'log',_0x6412('0x7'),util['format'](_0x6412('0x8'),_0x3a88ca,_0x212f7e));}function formatter(_0x2352d1,_0x5443ab){_0x5443ab['message']=_0x5443ab[_0x6412('0x9')][_0x6412('0xa')](/@@{/g,_0x6412('0xb'))[_0x6412('0xa')](/}@@/g,_0x6412('0xc'))[_0x6412('0xa')](/@{/g,'{{')[_0x6412('0xa')](/}@/g,'}}');return util['format'](_0x6412('0xd'),moment()[_0x6412('0xe')](_0x6412('0xf')),_0x5443ab[_0x6412('0x10')][_0x6412('0x11')](),_0x2352d1,_0x5443ab['message']);}module['exports']=function(_0x435e3a){return new winston[(_0x6412('0x12'))]({'transports':[new winston[(_0x6412('0x13'))][(_0x6412('0x14'))]({'name':util[_0x6412('0xe')](_0x6412('0x15'),_0x435e3a,_0x6412('0x16')),'filename':filename(_0x435e3a,_0x6412('0x16')),'level':_0x6412('0x16'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x5b3d7c){return formatter(_0x435e3a,_0x5b3d7c);}}),new winston[(_0x6412('0x13'))][(_0x6412('0x14'))]({'name':util[_0x6412('0xe')](_0x6412('0x15'),_0x435e3a,_0x6412('0x17')),'filename':filename(_0x435e3a,_0x6412('0x17')),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xd364fa){return formatter(_0x435e3a,_0xd364fa);}}),new winston[(_0x6412('0x13'))]['Console']({'level':process[_0x6412('0x18')][_0x6412('0x19')]||debugLevel,'json':![],'formatter':function(_0x3d8e28){return formatter(_0x435e3a,_0x3d8e28);}})]});}; \ No newline at end of file diff --git a/server/config/pm2/config.js b/server/config/pm2/config.js index ea62d75..eca6c5f 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 _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 +var _0x2990=['email','routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','path','join','../../services/express/index.js','ami','../../services/ami/index.js'];(function(_0x2cebff,_0x519c28){var _0x15560f=function(_0x64c28a){while(--_0x64c28a){_0x2cebff['push'](_0x2cebff['shift']());}};_0x15560f(++_0x519c28);}(_0x2990,0x1c7));var _0x0299=function(_0x2667db,_0x5214ad){_0x2667db=_0x2667db-0x0;var _0x38b7e3=_0x2990[_0x2667db];return _0x38b7e3;};'use strict';var path=require(_0x0299('0x0'));var os=require('os');var config={'apps':[{'name':'express','script':path[_0x0299('0x1')](__dirname,_0x0299('0x2'))},{'name':_0x0299('0x3'),'script':path['join'](__dirname,_0x0299('0x4'))},{'name':'agi','script':path[_0x0299('0x1')](__dirname,'../../services/agi/index.js')},{'name':_0x0299('0x5'),'script':path[_0x0299('0x1')](__dirname,'../../services/email/index.js')},{'name':_0x0299('0x6'),'script':path[_0x0299('0x1')](__dirname,_0x0299('0x7'))},{'name':_0x0299('0x8'),'script':path['join'](__dirname,_0x0299('0x9'))}]};module['exports']=config; \ No newline at end of file diff --git a/server/config/pm2/index.js b/server/config/pm2/index.js index 3733ecc..d862e13 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 _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 +var _0x9745=['dump','./config','connected','start','then','disconnect','stop','restart','list','describe','delete'];(function(_0x5587cb,_0x4c6c7a){var _0x580052=function(_0xd15985){while(--_0xd15985){_0x5587cb['push'](_0x5587cb['shift']());}};_0x580052(++_0x4c6c7a);}(_0x9745,0xc7));var _0x5974=function(_0x1d24eb,_0x12295b){_0x1d24eb=_0x1d24eb-0x0;var _0x1dc576=_0x9745[_0x1d24eb];return _0x1dc576;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0x5974('0x0'));function connect(){return new BPromise(function(_0x2a7bdd,_0x5bc0ed){return pm2['connect'](function(_0x28d5d8){if(_0x28d5d8){return _0x5bc0ed(_0x28d5d8);}return _0x2a7bdd(_0x5974('0x1'));});});};exports[_0x5974('0x2')]=function(_0x1c95fe){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x52d0f2,_0x341edb){return pm2[_0x5974('0x2')](_0x1c95fe,function(_0x2a3a45,_0x364a18){if(_0x2a3a45){return _0x341edb(_0x2a3a45);}pm2[_0x5974('0x4')]();return _0x52d0f2(_0x364a18);});});});};exports['stop']=function(_0x19d0c7){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x343c0f,_0x164769){return pm2[_0x5974('0x5')](_0x19d0c7,function(_0x1ecd2a,_0x2e50f1){if(_0x1ecd2a){return _0x164769(_0x1ecd2a);}pm2['disconnect']();return _0x343c0f(_0x2e50f1);});});});};exports[_0x5974('0x6')]=function(_0x187fa9){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x2e301a,_0x167a5c){return pm2['restart'](_0x187fa9,function(_0xbac25b,_0x4f3174){if(_0xbac25b){return _0x167a5c(_0xbac25b);}pm2[_0x5974('0x4')]();return _0x2e301a(_0x4f3174);});});});};exports['list']=function(){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x450e2b,_0xb1551a){return pm2[_0x5974('0x7')](function(_0x43caec,_0x53fa5f){if(_0x43caec){return _0xb1551a(_0x43caec);}pm2[_0x5974('0x4')]();return _0x450e2b(_0x53fa5f);});});});};exports['describe']=function(_0x13cb0f){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x1de41a,_0x3b6a9d){return pm2[_0x5974('0x8')](_0x13cb0f,function(_0x455dd6,_0x3bc7c0){if(_0x455dd6){return _0x3b6a9d(_0x455dd6);}pm2['disconnect']();return _0x1de41a(_0x3bc7c0);});});});};exports['delete']=function(_0x3d628b){return connect()[_0x5974('0x3')](function(){return new BPromise(function(_0x3a740d,_0x5d58e6){return pm2[_0x5974('0x9')](_0x3d628b,function(_0x588f2d,_0x33544c){if(_0x588f2d){return _0x5d58e6(_0x588f2d);}pm2['disconnect']();return _0x3a740d(_0x33544c);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x5d983f,_0x475482){return pm2[_0x5974('0xa')](function(_0x5ec516){if(_0x5ec516){return _0x475482(_0x5ec516);}return _0x5d983f('saved');});});});}; \ No newline at end of file diff --git a/server/config/schedule/chat.js b/server/config/schedule/chat.js index 8a3871b..d0deeeb 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 _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 +var _0xb716=['util','../../config/environment','../../mysqldb','schedule','redis','defaults','localhost','socket.io-emitter','Setting','then','chatTimeout','ChatInteraction','findAll','lastMsgAt','subtract','length','map','info','join','update','system','timeout','YYYY-MM-DD\x20HH:mm:ss','emit','chatInteraction:update','catch','[CHAT]\x20Error\x20closing\x20interactions','lodash','moment','ioredis'];(function(_0x3f9606,_0x5b0a04){var _0x4487d6=function(_0xc2dbd5){while(--_0xc2dbd5){_0x3f9606['push'](_0x3f9606['shift']());}};_0x4487d6(++_0x5b0a04);}(_0xb716,0x1a1));var _0x6b71=function(_0x4b29bc,_0x4716a2){_0x4b29bc=_0x4b29bc-0x0;var _0x134e23=_0xb716[_0x4b29bc];return _0x134e23;};'use strict';var _=require(_0x6b71('0x0'));var moment=require(_0x6b71('0x1'));var Redis=require(_0x6b71('0x2'));var util=require(_0x6b71('0x3'));var config=require(_0x6b71('0x4'));var db=require(_0x6b71('0x5'))['db'];var logger=require('../logger')(_0x6b71('0x6'));config[_0x6b71('0x7')]=_[_0x6b71('0x8')](config['redis'],{'host':_0x6b71('0x9'),'port':0x18eb});var io=require(_0x6b71('0xa'))(new Redis(config['redis']));function closeInteractions(){var _0x311ac7=0x0;var _0x1f70f7=[];return db[_0x6b71('0xb')]['find']({'raw':!![],'attributes':['id','chatTimeout'],'where':{'id':0x1}})[_0x6b71('0xc')](function(_0x1f3ba5){_0x311ac7=_0x1f3ba5[_0x6b71('0xd')];if(_0x311ac7){return db[_0x6b71('0xe')][_0x6b71('0xf')]({'raw':!![],'attributes':['id',_0x6b71('0x10')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x6b71('0x11')](_0x1f3ba5[_0x6b71('0xd')],'minutes')}}});}else{return[];}})['then'](function(_0x142c38){if(_0x142c38&&_0x142c38[_0x6b71('0x12')]){_0x1f70f7=_[_0x6b71('0x13')](_0x142c38||[],'id');logger[_0x6b71('0x14')]('[CHAT]\x20Interactions\x20to\x20close:',_0x1f70f7[_0x6b71('0x15')]());return db[_0x6b71('0xe')][_0x6b71('0x16')]({'closeReason':_0x6b71('0x17'),'disposition':_0x6b71('0x18'),'closed':!![],'closedAt':moment()['format'](_0x6b71('0x19'))},{'where':{'id':_0x1f70f7}});}})[_0x6b71('0xc')](function(){if(_0x1f70f7&&_0x1f70f7['length']){logger[_0x6b71('0x14')]('[CHAT]\x20Sending\x20updates\x20for\x20interactions:',_0x1f70f7[_0x6b71('0x15')]());for(var _0x1e1497=0x0;_0x1e1497<_0x1f70f7[_0x6b71('0x12')];_0x1e1497++){io[_0x6b71('0x1a')](_0x6b71('0x1b'),{'id':_0x1f70f7[_0x1e1497],'closed':!![]});}}})[_0x6b71('0x1c')](function(_0x2ec22f){logger['error'](_0x6b71('0x1d'),_0x2ec22f?util['inspect'](_0x2ec22f,{'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 0d5c30d..5f1b433 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 _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 +var _0xb27d=['active','isBetween','startAt','endAt','add','start','add\x20cron','update','update\x20cron','stop\x20cron','util','path','lodash','moment','cron-job-manager','jayson/promise','bluebird','../logger','../../mysqldb','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','http','Try\x20to\x20send\x20a\x20mail\x20to','email','MailAccount','Smtp','service','port','secure','authentication','auth','pass','format','\x22%s\x22\x20<%s>','user','bcc','name','subtractNumber','join','../../files/reports','basename','savename','extname','zip','existsSync','Sent','attachments','message','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','status','text','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','sendIfEmpty','info','empty\x20file,\x20email\x20not\x20sent','request','SendMail','then','error','error\x20mail','stringify','email\x20sent','catch','isNil','subtractUnit','subtractUnit\x20null\x20or\x20undefined','YYYY-MM-DD\x20HH:mm:ss','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','no\x20report\x20id','Schedule','MailServerOut','keys','map','toString','keyBy','difference','intersection','length','exists','stop','deleteJob','delete\x20cron','toRun','index','my\x20id','cron'];(function(_0x385279,_0x4ba904){var _0x5c46e1=function(_0x538dc0){while(--_0x538dc0){_0x385279['push'](_0x385279['shift']());}};_0x5c46e1(++_0x4ba904);}(_0xb27d,0x11b));var _0xdb27=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0xb27d[_0x1a36a5];return _0x746243;};'use strict';var fs=require('fs');var util=require(_0xdb27('0x0'));var path=require(_0xdb27('0x1'));var _=require(_0xdb27('0x2'));var moment=require(_0xdb27('0x3'));var CronJobManager=require(_0xdb27('0x4'));var jayson=require(_0xdb27('0x5'));var BPromise=require(_0xdb27('0x6'));var logger=require(_0xdb27('0x7'))('schedule');var db=require(_0xdb27('0x8'))['db'];var analyticCustomReportController=require('../../api/analyticCustomReport/analyticCustomReport.controller');var analyticDefaultReportController=require(_0xdb27('0x9'));var client=jayson[_0xdb27('0xa')][_0xdb27('0xb')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x1abffc,_0x4443c0){return function(){logger['info'](_0xdb27('0xc'),_0x1abffc[_0xdb27('0xd')]);var _0x277eb8=!![];var _0x322b85={'tls':{'rejectUnauthorized':![]}};if(_0x1abffc[_0xdb27('0xe')][_0xdb27('0xf')][_0xdb27('0x10')]){_0x322b85['service']=_0x1abffc[_0xdb27('0xe')][_0xdb27('0xf')][_0xdb27('0x10')];}else{_0x322b85['host']=_0x1abffc[_0xdb27('0xe')]['Smtp']['host'];_0x322b85[_0xdb27('0x11')]=_0x1abffc[_0xdb27('0xe')][_0xdb27('0xf')][_0xdb27('0x11')];_0x322b85[_0xdb27('0x12')]=_0x1abffc[_0xdb27('0xe')][_0xdb27('0xf')][_0xdb27('0x12')];}if(_0x1abffc[_0xdb27('0xe')][_0xdb27('0xf')][_0xdb27('0x13')]){_0x322b85[_0xdb27('0x14')]={'user':_0x1abffc[_0xdb27('0xe')]['Smtp']['user'],'pass':_0x1abffc['MailAccount'][_0xdb27('0xf')][_0xdb27('0x15')]};}var _0x1b2a06={'account':_0x322b85,'message':{'from':util[_0xdb27('0x16')](_0xdb27('0x17'),_0x1abffc[_0xdb27('0xe')]['name'],_0x1abffc[_0xdb27('0xe')][_0xdb27('0xd')]||_0x1abffc[_0xdb27('0xe')]['Smtp'][_0xdb27('0x18')]),'to':_0x1abffc[_0xdb27('0xd')],'cc':_0x1abffc['cc'],'bcc':_0x1abffc[_0xdb27('0x19')],'subject':util[_0xdb27('0x16')]('Report\x20%s\x20last\x20%s\x20%s',_0x4443c0[_0xdb27('0x1a')],_0x1abffc[_0xdb27('0x1b')],_0x1abffc['subtractUnit'])}};var _0xc343d9=path[_0xdb27('0x1c')](__dirname,_0xdb27('0x1d'));var _0x39a163=_0x4443c0['savename'];var _0xe228f0=util[_0xdb27('0x16')]('%s.%s',path[_0xdb27('0x1e')](_0x4443c0[_0xdb27('0x1f')],path[_0xdb27('0x20')](_0x4443c0[_0xdb27('0x1f')])),_0xdb27('0x21'));var _0x1e9792=path[_0xdb27('0x1c')](_0xc343d9,_0x39a163);var _0x35071e=path['join'](_0xc343d9,_0xe228f0);if(fs[_0xdb27('0x22')](_0x1e9792)){_0x4443c0['status']=_0xdb27('0x23');_0x1b2a06['message'][_0xdb27('0x24')]=[{'filename':_0x39a163,'path':_0x1e9792}];_0x1b2a06[_0xdb27('0x25')]['text']=util[_0xdb27('0x16')](_0xdb27('0x26'),JSON['stringify'](_0x4443c0,null,0x2));}else if(fs[_0xdb27('0x22')](_0x35071e)){_0x4443c0[_0xdb27('0x27')]='Sent';_0x1b2a06[_0xdb27('0x25')][_0xdb27('0x24')]=[{'filename':_0xe228f0,'path':_0x35071e}];}else{_0x1b2a06[_0xdb27('0x25')][_0xdb27('0x28')]=_0xdb27('0x29');if(!_0x1abffc[_0xdb27('0x2a')]){_0x277eb8=![];logger[_0xdb27('0x2b')](_0xdb27('0x2c'));}}if(_0x277eb8){return client[_0xdb27('0x2d')](_0xdb27('0x2e'),_0x1b2a06)[_0xdb27('0x2f')](function(_0xfc1664){if(_0xfc1664[_0xdb27('0x30')]){return logger[_0xdb27('0x30')](_0xdb27('0x31'),JSON[_0xdb27('0x32')](_0xfc1664));}return logger[_0xdb27('0x2b')](_0xdb27('0x33'));})[_0xdb27('0x34')](function(_0x376fd8){return logger[_0xdb27('0x30')](_0xdb27('0x31'),JSON['stringify'](_0x376fd8));});}};}function handleError(){return function(_0x3c5d7e){return logger[_0xdb27('0x30')](JSON[_0xdb27('0x32')](_0x3c5d7e));};}function handleResult(_0x2f1d7c){return function(_0x36bafa){logger[_0xdb27('0x2b')]('data',JSON[_0xdb27('0x32')](_0x36bafa));if(_0x2f1d7c[_0xdb27('0xe')]&&_0x2f1d7c['MailAccount'][_0xdb27('0xf')]&&!_[_0xdb27('0x35')](_0x2f1d7c[_0xdb27('0xd')])){setTimeout(handleSendEmail(_0x2f1d7c,_0x36bafa),0x3c*0x3e8);}};}function handleJob(_0x3b7f52){return function(){try{if(_[_0xdb27('0x35')](_0x3b7f52[_0xdb27('0x1b')])){return logger[_0xdb27('0x2b')]('subtractNumber\x20null\x20or\x20undefined');}if(_[_0xdb27('0x35')](_0x3b7f52[_0xdb27('0x36')])){return logger[_0xdb27('0x2b')](_0xdb27('0x37'));}var _0x21c99d={'startDate':moment()['subtract'](_0x3b7f52['subtractNumber'],_0x3b7f52['subtractUnit'])['format'](_0xdb27('0x38')),'endDate':moment()['format'](_0xdb27('0x38')),'type':_0xdb27('0x39'),'output':_0x3b7f52[_0xdb27('0x3a')],'name':_0x3b7f52['name']};if(!_[_0xdb27('0x35')](_0x3b7f52[_0xdb27('0x3b')])){logger[_0xdb27('0x2b')](_0xdb27('0x3c'),_0x3b7f52[_0xdb27('0x3b')]);return analyticDefaultReportController[_0xdb27('0x3d')]({'id':_0x3b7f52[_0xdb27('0x3b')]},_0x21c99d)['then'](handleResult(_0x3b7f52))[_0xdb27('0x34')](handleError());}if(!_['isNil'](_0x3b7f52[_0xdb27('0x3e')])){logger['info']('exec\x20custom\x20report\x20id:%s',_0x3b7f52['CustomReportId']);return analyticCustomReportController[_0xdb27('0x3d')]({'id':_0x3b7f52[_0xdb27('0x3e')]},_0x21c99d)[_0xdb27('0x2f')](handleResult(_0x3b7f52))[_0xdb27('0x34')](handleError());}}catch(_0x4b442e){logger['error'](JSON[_0xdb27('0x32')](_0x4b442e));}return logger['info'](_0xdb27('0x3f'));};}function getJobs(_0x55e1bc){var _0xefd9e6={};if(_0x55e1bc){_0xefd9e6['id']=_0x55e1bc;}return db[_0xdb27('0x40')]['findAll']({'where':_0xefd9e6,'include':[{'model':db['MailAccount'],'attributes':['id',_0xdb27('0x1a'),_0xdb27('0xd')],'include':[{'model':db[_0xdb27('0x41')],'as':_0xdb27('0xf')}]}]})[_0xdb27('0x2f')](function(_0xc846b4){var _0x5a4d3b=_[_0xdb27('0x42')](manager['jobs']);var _0x22b593=_[_0xdb27('0x43')](_0xc846b4,function(_0x53ff3f){return _0x53ff3f['id'][_0xdb27('0x44')]();});var _0x1e04fb=_[_0xdb27('0x45')](_0xc846b4,function(_0x31c9e5){return _0x31c9e5['id']['toString']();});var _0x3c0132=_0x55e1bc?_0x22b593:_[_0xdb27('0x46')](_0x22b593,_0x5a4d3b);var _0x5b46d1=_[_0xdb27('0x47')](_0x22b593,_0x5a4d3b);var _0x514f02=_[_0xdb27('0x46')](_0x5a4d3b,_0x22b593);var _0x5240e7;var _0x22b33b;for(_0x5240e7=0x0;_0x5240e7<_0x514f02[_0xdb27('0x48')]&&!_0x55e1bc;_0x5240e7+=0x1){_0x22b33b=_0x514f02[_0x5240e7]['toString']();if(manager[_0xdb27('0x49')](_0x22b33b)){manager[_0xdb27('0x4a')](_0x22b33b);manager[_0xdb27('0x4b')](_0x22b33b);logger['info'](_0xdb27('0x4c'),_0x22b33b);}}logger['info'](_0xdb27('0x4d'),JSON['stringify'](_0x3c0132));for(_0x5240e7=0x0;_0x5240e7<_0x3c0132[_0xdb27('0x48')];_0x5240e7+=0x1){_0x22b33b=_0x3c0132[_0x5240e7]['toString']();logger[_0xdb27('0x2b')](_0xdb27('0x4e'),_0x22b33b);if(_0x55e1bc){logger[_0xdb27('0x2b')](_0xdb27('0x4f'),_0x55e1bc);logger[_0xdb27('0x2b')](JSON[_0xdb27('0x32')](_0x1e04fb[_0x22b33b]));BPromise['resolve']()[_0xdb27('0x2f')](handleJob(_0x1e04fb[_0x22b33b]));logger[_0xdb27('0x2b')]('run\x20job',_0x1e04fb[_0x22b33b][_0xdb27('0x1a')],_0x1e04fb[_0x22b33b][_0xdb27('0x50')]);}else if(_0x1e04fb[_0x22b33b]['cron']&&_0x1e04fb[_0x22b33b][_0xdb27('0x51')]&&moment()[_0xdb27('0x52')](_0x1e04fb[_0x22b33b][_0xdb27('0x53')],_0x1e04fb[_0x22b33b][_0xdb27('0x54')])){manager[_0xdb27('0x55')](_0x22b33b,_0x1e04fb[_0x22b33b][_0xdb27('0x50')],handleJob(_0x1e04fb[_0x22b33b]));manager[_0xdb27('0x56')](_0x22b33b);logger[_0xdb27('0x2b')](_0xdb27('0x57'),_0x1e04fb[_0x22b33b][_0xdb27('0x1a')],_0x1e04fb[_0x22b33b]['cron']);}else if(manager[_0xdb27('0x49')](_0x22b33b)){manager[_0xdb27('0x4a')](_0x22b33b);manager[_0xdb27('0x4b')](_0x22b33b);logger[_0xdb27('0x2b')]('stop\x20cron',_0x1e04fb[_0x22b33b][_0xdb27('0x1a')],_0x1e04fb[_0x22b33b][_0xdb27('0x50')]);}}for(_0x5240e7=0x0,_0x22b33b;_0x5240e7<_0x5b46d1[_0xdb27('0x48')]&&!_0x55e1bc;_0x5240e7+=0x1){_0x22b33b=_0x5b46d1[_0x5240e7][_0xdb27('0x44')]();if(manager[_0xdb27('0x49')](_0x22b33b)){if(_0x1e04fb[_0x22b33b][_0xdb27('0x50')]&&_0x1e04fb[_0x22b33b][_0xdb27('0x51')]&&moment()[_0xdb27('0x52')](_0x1e04fb[_0x22b33b][_0xdb27('0x53')],_0x1e04fb[_0x22b33b][_0xdb27('0x54')])){manager[_0xdb27('0x58')](_0x22b33b,_0x1e04fb[_0x22b33b][_0xdb27('0x50')],handleJob(_0x1e04fb[_0x22b33b]));logger[_0xdb27('0x2b')](_0xdb27('0x59'),_0x1e04fb[_0x22b33b][_0xdb27('0x1a')],_0x1e04fb[_0x22b33b][_0xdb27('0x50')]);}else{manager[_0xdb27('0x4a')](_0x22b33b);manager['deleteJob'](_0x22b33b);logger[_0xdb27('0x2b')](_0xdb27('0x5a'),_0x1e04fb[_0x22b33b]['name'],_0x1e04fb[_0x22b33b][_0xdb27('0x50')]);}}}})['catch'](function(_0xeab33){logger[_0xdb27('0x30')](JSON['stringify'](_0xeab33));});}exports['run']=function(_0x5665b7){return getJobs(_0x5665b7);};exports[_0xdb27('0x56')]=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 707cf08..414deed 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 _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 +var _0x7035=['data1','data2','then','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','Transcript','[RECORDING:%d]\x20Get\x20transcript','TranscriptFileUri','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','fileText','transcript','update','tempSentiment','Sequelize','ValidationError','sentiment','sentimentAccountId','language','bucket','Transcript\x20not\x20available','CloudProvider','findOne','Cloud\x20Provider\x20not\x20available','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','sentimentRegion','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','Positive','SentimentScore','Mixed','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','FAILED','FailureReason','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','resolve','Sentiment\x20Analysis\x20not\x20configured','Cloud\x20Provider\x20not\x20configured','Negative','Neutral','COMPLETED','catch','name','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','No\x20transcribe\x20job\x20to\x20check','Settings\x20not\x20available','transcribeAccountId','Transcribe\x20not\x20configured','forEach','SequelizeValidationError','start','lodash','request-promise','util','../../mysqldb','../../config/logger','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','format','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeName'];(function(_0x55b06f,_0xedbba2){var _0x5b2bcb=function(_0x219fa4){while(--_0x219fa4){_0x55b06f['push'](_0x55b06f['shift']());}};_0x5b2bcb(++_0xedbba2);}(_0x7035,0x15e));var _0x5703=function(_0x2c1439,_0x5a9bb4){_0x2c1439=_0x2c1439-0x0;var _0x4c9e68=_0x7035[_0x2c1439];return _0x4c9e68;};var _=require(_0x5703('0x0'));var AWS=require('aws-sdk');var rp=require(_0x5703('0x1'));var util=require(_0x5703('0x2'));var BPromise=require('bluebird');var db=require(_0x5703('0x3'))['db'];var logger=require(_0x5703('0x4'))(_0x5703('0x5'));function getTranscriptionJob(_0x4d08f2,_0x7e0ebb,_0x5939bc,_0x37b0c8){return new Promise(function(_0x3fd6a6,_0x56df6c){var _0x2e2e90=new AWS[(_0x5703('0x6'))]({'accessKeyId':_0x7e0ebb,'secretAccessKey':_0x4d08f2,'region':_0x5939bc});_0x2e2e90[_0x5703('0x7')]({'TranscriptionJobName':_0x37b0c8},function(_0x291988,_0x1afe73){if(_0x291988){return _0x56df6c(_0x291988);}else{return _0x3fd6a6(_0x1afe73);}});});}function sentiment(_0x4690de,_0x58ca67,_0x58a04c,_0x169e83,_0x5775d8){return new Promise(function(_0x4f1db7,_0x5c36a5){var _0x522449=new AWS[(_0x5703('0x8'))]({'accessKeyId':_0x58ca67,'secretAccessKey':_0x4690de,'region':_0x58a04c});_0x522449[_0x5703('0x9')]({'Text':_0x169e83,'LanguageCode':_0x5775d8[_0x5703('0xa')](0x0,0x2)},function(_0x4c7efc,_0x33fba2){if(_0x4c7efc){return _0x5c36a5(_0x4c7efc);}else{return _0x4f1db7(_0x33fba2);}});});}function checkTranscribeJob(_0x4b39aa,_0x36b5b4,_0x360cc8){var _0x4868ad;return new BPromise(function(_0x29cf41,_0x30da0d){logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0xd'),_0x4b39aa['id'],_0x4b39aa[_0x5703('0xe')]));return getTranscriptionJob(_0x360cc8[_0x5703('0xf')],_0x360cc8[_0x5703('0x10')],_0x36b5b4['transcribeRegion'],_0x4b39aa[_0x5703('0xe')])[_0x5703('0x11')](function(_0x46dbca){logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0x12'),_0x4b39aa['id'],_0x4b39aa[_0x5703('0xe')],_0x46dbca[_0x5703('0x13')][_0x5703('0x14')]));if(!_0x4b39aa['fileText']){switch(_0x46dbca[_0x5703('0x13')][_0x5703('0x14')]){case'COMPLETED':var _0x579097={'transcribeStatus':_0x46dbca[_0x5703('0x13')][_0x5703('0x14')],'fileUri':_0x46dbca['TranscriptionJob'][_0x5703('0x15')]['TranscriptFileUri']};logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0x16'),_0x4b39aa['id']));return rp({'uri':_0x46dbca[_0x5703('0x13')][_0x5703('0x15')][_0x5703('0x17')],'json':!![]})[_0x5703('0x11')](function(_0x4f5ebe){logger['info'](util[_0x5703('0xc')](_0x5703('0x18'),_0x4b39aa['id']));if(_0x4f5ebe&&_0x4f5ebe['results']&&_0x4f5ebe[_0x5703('0x19')][_0x5703('0x1a')]&&_0x4f5ebe['results'][_0x5703('0x1a')][_0x5703('0x1b')]){_0x579097[_0x5703('0x1c')]='';for(var _0x5e98e4=0x0;_0x5e98e4<_0x4f5ebe['results']['transcripts'][_0x5703('0x1b')];_0x5e98e4++){_0x579097['fileText']+=_0x4f5ebe[_0x5703('0x19')][_0x5703('0x1a')][_0x5e98e4][_0x5703('0x1d')]+'';}}return _0x4b39aa[_0x5703('0x1e')](_0x579097);})[_0x5703('0x11')](function(){logger['info'](util[_0x5703('0xc')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x4b39aa['id']));if(!_0x4b39aa[_0x5703('0x1f')]){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))]('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x36b5b4[_0x5703('0x22')]||!_0x36b5b4[_0x5703('0x23')]||!_0x36b5b4['sentimentRegion']||!_0x36b5b4[_0x5703('0x24')]||!_0x36b5b4[_0x5703('0x25')]){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))]('Sentiment\x20Analysis\x20not\x20configured');}if(!_0x579097['fileText']){throw new Error(_0x5703('0x26'));}if(_0x36b5b4[_0x5703('0x23')]===_0x360cc8['id']){return _0x360cc8;}else{return db[_0x5703('0x27')][_0x5703('0x28')]({'where':{'id':_settings[_0x5703('0x23')]}});}})[_0x5703('0x11')](function(_0x269f15){if(!_0x269f15){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x29'));}if(!_0x269f15[_0x5703('0xf')]||!_0x269f15[_0x5703('0x10')]){throw new db[(_0x5703('0x20'))]['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0x4868ad=_0x269f15;logger['info'](util[_0x5703('0xc')](_0x5703('0x2a'),_0x4b39aa['id']));return sentiment(_0x4868ad[_0x5703('0xf')],_0x4868ad[_0x5703('0x10')],_0x36b5b4[_0x5703('0x2b')],_0x579097['fileText'],_0x36b5b4[_0x5703('0x24')]);})[_0x5703('0x11')](function(_0x13319d){logger['info'](util[_0x5703('0xc')](_0x5703('0x2c'),_0x4b39aa['id']));return _0x4b39aa[_0x5703('0x1e')]({'sentiment':_0x13319d[_0x5703('0x2d')],'sPositive':_0x13319d['SentimentScore'][_0x5703('0x2e')],'sNegative':_0x13319d[_0x5703('0x2f')]['Negative'],'sMixed':_0x13319d[_0x5703('0x2f')][_0x5703('0x30')],'sNeutral':_0x13319d[_0x5703('0x2f')]['Neutral']});})[_0x5703('0x11')](function(){logger['info'](util[_0x5703('0xc')](_0x5703('0x31'),_0x4b39aa['id']));_0x29cf41();});case _0x5703('0x32'):return _0x4b39aa[_0x5703('0x1e')]({'transcribeStatus':'FAILED','failureReason':_0x46dbca['TranscriptionJob'][_0x5703('0x33')]})[_0x5703('0x11')](function(){logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0x31'),_0x4b39aa['id']));_0x29cf41();});default:logger['info'](util['format'](_0x5703('0x34'),_0x4b39aa['id']));break;}}else{return BPromise[_0x5703('0x35')]()[_0x5703('0x11')](function(){if(!_0x4b39aa[_0x5703('0x1f')]){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))]('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x36b5b4[_0x5703('0x22')]||!_0x36b5b4[_0x5703('0x23')]||!_0x36b5b4[_0x5703('0x2b')]||!_0x36b5b4[_0x5703('0x24')]||!_0x36b5b4[_0x5703('0x25')]){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x36'));}if(!_0x4b39aa[_0x5703('0x1c')]){throw new Error('Transcript\x20not\x20available');}if(_0x36b5b4[_0x5703('0x23')]===_0x360cc8['id']){return _0x360cc8;}else{return db[_0x5703('0x27')]['findOne']({'where':{'id':_settings['sentimentAccountId']}});}})['then'](function(_0x25e948){if(!_0x25e948){throw new db[(_0x5703('0x20'))]['ValidationError'](_0x5703('0x29'));}if(!_0x25e948[_0x5703('0xf')]||!_0x25e948['data2']){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x37'));}_0x4868ad=_0x25e948;logger[_0x5703('0xb')](util['format'](_0x5703('0x2a'),_0x4b39aa['id']));return sentiment(_0x4868ad[_0x5703('0xf')],_0x4868ad[_0x5703('0x10')],_0x36b5b4[_0x5703('0x2b')],_0x4b39aa[_0x5703('0x1c')],_0x36b5b4[_0x5703('0x24')]);})[_0x5703('0x11')](function(_0x49f198){logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0x2c'),_0x4b39aa['id']));return _0x4b39aa[_0x5703('0x1e')]({'sentiment':_0x49f198[_0x5703('0x2d')],'sPositive':_0x49f198[_0x5703('0x2f')][_0x5703('0x2e')],'sNegative':_0x49f198[_0x5703('0x2f')][_0x5703('0x38')],'sMixed':_0x49f198[_0x5703('0x2f')]['Mixed'],'sNeutral':_0x49f198[_0x5703('0x2f')][_0x5703('0x39')],'transcribeStatus':_0x5703('0x3a')});})[_0x5703('0x11')](function(){logger[_0x5703('0xb')](util[_0x5703('0xc')](_0x5703('0x31'),_0x4b39aa['id']));_0x29cf41();});}})[_0x5703('0x3b')](function(_0xe384c){if(_0xe384c){if(!_0xe384c[_0x5703('0x3c')]||_0xe384c[_0x5703('0x3c')]!=='SequelizeValidationError'){logger[_0x5703('0x3d')](util['format'](_0x5703('0x3e'),_0x4b39aa['id']),util[_0x5703('0x3f')](_0xe384c,{'showHidden':![],'depth':null}));}}_0x29cf41();});});}function checkTranscribe(){var _0x10ba5d;var _0x17255f;var _0x162653;return db[_0x5703('0x40')][_0x5703('0x41')]({'where':{'transcribeStatus':'IN_PROGRESS'}})[_0x5703('0x11')](function(_0x5b1b99){if(!_0x5b1b99||!_0x5b1b99['length']){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x42'));}_0x10ba5d=_0x5b1b99;return db['Setting']['findOne']({'where':{'id':0x1}});})[_0x5703('0x11')](function(_0x186c16){if(!_0x186c16){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x43'));}_0x17255f=_0x186c16;if(!_0x17255f[_0x5703('0x5')]||!_0x17255f[_0x5703('0x44')]||!_0x17255f['transcribeRegion']||!_0x17255f['language']||!_0x17255f[_0x5703('0x25')]){throw new db[(_0x5703('0x20'))][(_0x5703('0x21'))](_0x5703('0x45'));}return db['CloudProvider'][_0x5703('0x28')]({'where':{'id':_0x17255f[_0x5703('0x44')]}});})[_0x5703('0x11')](function(_0x3a7d37){if(!_0x3a7d37){throw new db['Sequelize'][(_0x5703('0x21'))](_0x5703('0x29'));}if(!_0x3a7d37[_0x5703('0xf')]||!_0x3a7d37[_0x5703('0x10')]){throw new db[(_0x5703('0x20'))]['ValidationError'](_0x5703('0x37'));}_0x162653=_0x3a7d37;var _0x1323fb=[];_0x10ba5d[_0x5703('0x46')](function(_0x2b0b8b){_0x1323fb['push'](checkTranscribeJob(_0x2b0b8b,_0x17255f,_0x162653));});return BPromise['all'](_0x1323fb);})[_0x5703('0x3b')](function(_0x4dee78){if(_0x4dee78){if(!_0x4dee78['name']||_0x4dee78['name']!==_0x5703('0x47')){logger[_0x5703('0x3d')](util[_0x5703('0x3f')](_0x4dee78,{'showHidden':![],'depth':null}));}}});}exports[_0x5703('0x48')]=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 8a3b24d..0a6d8cd 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 _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 +var _0xd4c8=['subtract','hours','then','map','info','[WHATSAPP]\x20Interactions\x20to\x20close:','join','system','timeout','format','YYYY-MM-DD\x20HH:mm:ss','length','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','emit','whatsappInteraction:update','catch','error','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','lodash','moment','ioredis','../../config/environment','../../mysqldb','../logger','schedule','redis','defaults','socket.io-emitter','WhatsappInteraction','findAll'];(function(_0x239b5e,_0x208a3f){var _0x577f3d=function(_0x2880de){while(--_0x2880de){_0x239b5e['push'](_0x239b5e['shift']());}};_0x577f3d(++_0x208a3f);}(_0xd4c8,0x74));var _0x8d4c=function(_0x85c63c,_0x28ad2a){_0x85c63c=_0x85c63c-0x0;var _0x49ea4d=_0xd4c8[_0x85c63c];return _0x49ea4d;};'use strict';var _=require(_0x8d4c('0x0'));var moment=require(_0x8d4c('0x1'));var Redis=require(_0x8d4c('0x2'));var util=require('util');var config=require(_0x8d4c('0x3'));var db=require(_0x8d4c('0x4'))['db'];var logger=require(_0x8d4c('0x5'))(_0x8d4c('0x6'));config[_0x8d4c('0x7')]=_[_0x8d4c('0x8')](config[_0x8d4c('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x8d4c('0x9'))(new Redis(config[_0x8d4c('0x7')]));function closeInteractions(){var _0x433dbd=[];return db[_0x8d4c('0xa')][_0x8d4c('0xb')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x8d4c('0xc')](0x18,_0x8d4c('0xd'))}}})[_0x8d4c('0xe')](function(_0x2157e7){if(_0x2157e7&&_0x2157e7['length']){_0x433dbd=_[_0x8d4c('0xf')](_0x2157e7||[],'id');logger[_0x8d4c('0x10')](_0x8d4c('0x11'),_0x433dbd[_0x8d4c('0x12')]());return db[_0x8d4c('0xa')]['update']({'closeReason':_0x8d4c('0x13'),'disposition':_0x8d4c('0x14'),'closed':!![],'closedAt':moment()[_0x8d4c('0x15')](_0x8d4c('0x16'))},{'where':{'id':_0x433dbd}});}})[_0x8d4c('0xe')](function(){if(_0x433dbd&&_0x433dbd[_0x8d4c('0x17')]){logger[_0x8d4c('0x10')](_0x8d4c('0x18'),_0x433dbd[_0x8d4c('0x12')]());for(var _0x4eb566=0x0;_0x4eb566<_0x433dbd['length'];_0x4eb566++){io[_0x8d4c('0x19')](_0x8d4c('0x1a'),{'id':_0x433dbd[_0x4eb566],'closed':!![]});}}})[_0x8d4c('0x1b')](function(_0x2d3f18){logger[_0x8d4c('0x1c')](_0x8d4c('0x1d'),_0x2d3f18?util[_0x8d4c('0x1e')](_0x2d3f18,{'showHidden':![],'depth':null}):'');});}exports[_0x8d4c('0x1f')]=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 62fa05c..9173ed1 100644 --- a/server/config/seedContact.js +++ b/server/config/seedContact.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x9a55=['bulkCreate','log','finished\x20populating','contacts1','CmHopper','hopper1','contacts2','hopper2','../mysqldb','push','Innocenzo','Biondo','@xcally.com','now','innocenzo.biondo','destroy','then','CmContact'];(function(_0xb31811,_0x73643){var _0x6c2c22=function(_0x58faab){while(--_0x58faab){_0xb31811['push'](_0xb31811['shift']());}};_0x6c2c22(++_0x73643);}(_0x9a55,0x13a));var _0x59a5=function(_0x4e91d8,_0x2bc311){_0x4e91d8=_0x4e91d8-0x0;var _0x2aad86=_0x9a55[_0x4e91d8];return _0x2aad86;};'use strict';var util=require('util');var db=require(_0x59a5('0x0'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x59a5('0x1')]({'id':i,'firstName':_0x59a5('0x2')+i,'lastName':_0x59a5('0x3')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+_0x59a5('0x4')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x59a5('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x59a5('0x5')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x59a5('0x5')](),'updatedAt':Date[_0x59a5('0x5')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2['push']({'id':i,'firstName':_0x59a5('0x2')+i,'lastName':_0x59a5('0x3')+i,'phone':0xf879fb460+i,'email':_0x59a5('0x6')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x59a5('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x59a5('0x5')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date[_0x59a5('0x5')]()});}db['CmContact'][_0x59a5('0x7')]({'where':{}})[_0x59a5('0x8')](function(){return db[_0x59a5('0x9')][_0x59a5('0xa')](contacts);})[_0x59a5('0x8')](function(){console[_0x59a5('0xb')](_0x59a5('0xc'),_0x59a5('0xd'));return db[_0x59a5('0xe')][_0x59a5('0x7')]({'where':{}});})['then'](function(){return db[_0x59a5('0xe')]['bulkCreate'](hopper);})['then'](function(){console['log']('finished\x20populating',_0x59a5('0xf'));return db[_0x59a5('0x9')][_0x59a5('0xa')](contacts2);})[_0x59a5('0x8')](function(){console[_0x59a5('0xb')](_0x59a5('0xc'),_0x59a5('0x10'));return db[_0x59a5('0xe')][_0x59a5('0xa')](hopper2);})[_0x59a5('0x8')](function(){console[_0x59a5('0xb')](_0x59a5('0xc'),_0x59a5('0x11'));})['catch'](function(_0x40bbe0){console[_0x59a5('0xb')](_0x40bbe0);}); \ No newline at end of file diff --git a/server/config/seedUsers.js b/server/config/seedUsers.js index 8c108a1..522a93e 100644 --- a/server/config/seedUsers.js +++ b/server/config/seedUsers.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x46f4=['then','catch','log','util','../mysqldb','push','format','%s%s','agent','%s%s@xcally.com','password','friend','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','actpass','bulkCreate'];(function(_0x3478a5,_0x5bcaa8){var _0x27bb3f=function(_0x410cdd){while(--_0x410cdd){_0x3478a5['push'](_0x3478a5['shift']());}};_0x27bb3f(++_0x5bcaa8);}(_0x46f4,0xff));var _0x446f=function(_0x4b6531,_0x53831e){_0x4b6531=_0x4b6531-0x0;var _0x15cec=_0x46f4[_0x4b6531];return _0x15cec;};'use strict';var util=require(_0x446f('0x0'));var db=require(_0x446f('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x446f('0x2')]({'name':util[_0x446f('0x3')](_0x446f('0x4'),_0x446f('0x5'),i),'fullname':util[_0x446f('0x3')](_0x446f('0x4'),_0x446f('0x5'),i),'email':util[_0x446f('0x3')](_0x446f('0x6'),'agent',i),'role':_0x446f('0x5'),'password':_0x446f('0x7'),'internal':0xfa0+i,'type':_0x446f('0x8'),'transport':['udp','ws','wss'],'disallow':[_0x446f('0x9')],'allow':[_0x446f('0xa')],'defaultuser':util[_0x446f('0x3')](_0x446f('0x4'),'agent',i),'encryption':_0x446f('0xb'),'avpf':_0x446f('0xb'),'force_avp':_0x446f('0xb'),'icesupport':_0x446f('0xb'),'dtlsenable':'yes','dtlsverify':'no','dtlscertfile':_0x446f('0xc'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':_0x446f('0xd'),'callerid':util[_0x446f('0x3')]('\x22%s\x22\x20<%s>',util[_0x446f('0x3')](_0x446f('0x4'),_0x446f('0x5'),i),0xfa0+i)});}db['User'][_0x446f('0xe')](users)[_0x446f('0xf')](function(){console['log']('add\x20user');})[_0x446f('0x10')](function(_0x301efb){console[_0x446f('0x11')](_0x301efb);}); \ No newline at end of file diff --git a/server/config/socketio.js b/server/config/socketio.js index 3452c91..44c743c 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x6ab9=['leave','removeMailInteractions','user_has_mail_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','WhatsappInteractions','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','log','join','default','connection','address','request','remoteAddress','remotePort','connectedAt','SocketIO\x20','disconnect','CONNECTED','lodash','util','../mysqldb','./environment','name','Agents','User','agent','telephone','type','ivr','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','FaxQueues','MailQueues','WhatsappQueues','findAll','Telephones','Trunks','IvrCampaigns','UserProfileResource','resourceId','map','where','role','Campaign','format','%s:queue:%s','length','user:%s','handshake','query','find','userProfileId','ChatInteractions','MailInteractions','FaxInteraction','FaxInteractions','SmsInteraction','SmsInteractions','OpenchannelInteraction','OpenchannelInteractions','WhatsappInteraction','admin','voice:inbound','hasOwnProperty','include','push','FaxQueue','SmsQueue','user','VoiceQueue','SmsQueues','MailQueue','OpenchannelQueues','OpenchannelQueue','Trunk','voice:outbound','getVoiceQueues','getSmsQueues','getMailQueues','getOpenchannelQueues','voice','fax','sms','openchannel','trunk:%s','campaign:%s:%s','removeChatInteractions','emit','user_has_chat_interactions:remove'];(function(_0x27ed48,_0x5bde80){var _0x2b6323=function(_0x389fc9){while(--_0x389fc9){_0x27ed48['push'](_0x27ed48['shift']());}};_0x2b6323(++_0x5bde80);}(_0x6ab9,0x19a));var _0x96ab=function(_0x5a776b,_0x46f785){_0x5a776b=_0x5a776b-0x0;var _0xbbef59=_0x6ab9[_0x5a776b];return _0xbbef59;};'use strict';var _=require(_0x96ab('0x0'));var util=require(_0x96ab('0x1'));var BPromise=require('bluebird');var db=require(_0x96ab('0x2'))['db'];var config=require(_0x96ab('0x3'));var queryQueues={'attributes':['id',_0x96ab('0x4')],'include':[{'as':_0x96ab('0x5'),'model':db[_0x96ab('0x6')],'attributes':['id','name','role'],'raw':!![],'where':{'role':_0x96ab('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x96ab('0x4')],'where':{'role':_0x96ab('0x8')}};var queryTrunks={'raw':!![],'attributes':['id','name']};var queryAgents={'raw':!![],'attributes':['id',_0x96ab('0x4')],'where':{'role':_0x96ab('0x7')}};var queryCampaigns={'raw':!![],'attributes':['id','name',_0x96ab('0x9')],'where':{'type':_0x96ab('0xa')}};function getAssociatedResources(_0x3de677,_0x3034ee,_0x39b50e){return db[_0x96ab('0xb')][_0x96ab('0xc')]({'where':{'name':_0x3de677,'userProfileId':_0x3034ee},'raw':!![]})[_0x96ab('0xd')](function(_0x3ef79e){if(_0x3ef79e){if(_0x3ef79e[_0x96ab('0xe')]){switch(_0x3de677){case _0x96ab('0xf'):case _0x96ab('0x10'):case _0x96ab('0x11'):case'SmsQueues':case _0x96ab('0x12'):case'OpenchannelQueues':case _0x96ab('0x13'):return db[_0x39b50e][_0x96ab('0x14')](queryQueues);case _0x96ab('0x15'):return db[_0x39b50e][_0x96ab('0x14')](queryTelephones);case _0x96ab('0x16'):return db[_0x39b50e][_0x96ab('0x14')](queryTrunks);case _0x96ab('0x17'):return db[_0x39b50e][_0x96ab('0x14')](queryCampaigns);}}else{return db[_0x96ab('0x18')][_0x96ab('0x14')]({'attributes':[_0x96ab('0x19')],'where':{'sectionId':_0x3ef79e['id']},'raw':!![]})['then'](function(_0x4ec844){if(_0x4ec844){var _0x3b54cc={'where':{'id':_[_0x96ab('0x1a')](_0x4ec844,_0x96ab('0x19'))},'raw':!![]};switch(_0x39b50e){case'User':_0x3b54cc[_0x96ab('0x1b')][_0x96ab('0x1c')]='telephone';break;case _0x96ab('0x1d'):_0x3b54cc['where'][_0x96ab('0x9')]=_0x96ab('0xa');break;}return db[_0x39b50e][_0x96ab('0x14')](_0x3b54cc);}else{return[];}});}}else{return[];}})[_0x96ab('0xd')](function(_0xcf5900){return _0xcf5900;});}function joinOrLeaveQueues(_0x1577bb,_0x154fec,_0x16ebd7,_0xb746c7){_0x1577bb[_0x154fec](util[_0x96ab('0x1e')](_0x96ab('0x1f'),_0x16ebd7,_0xb746c7['name']));if(_0xb746c7['Agents']){for(var _0x347b91=0x0;_0x347b91<_0xb746c7[_0x96ab('0x5')][_0x96ab('0x20')];_0x347b91+=0x1){_0x1577bb[_0x154fec](util['format'](_0x96ab('0x21'),_0xb746c7['Agents'][_0x347b91][_0x96ab('0x4')]));}}}function joinOrLeave(_0x567bf1,_0x33c140,_0x90fa22){var _0x5a02d0;if(_0x567bf1[_0x96ab('0x22')][_0x96ab('0x23')]['id']){db[_0x96ab('0x6')][_0x96ab('0x24')]({'attributes':['id',_0x96ab('0x4'),_0x96ab('0x1c'),_0x96ab('0x25')],'where':{'id':_0x567bf1[_0x96ab('0x22')][_0x96ab('0x23')]['id']},'include':[{'model':db['ChatInteraction'],'as':_0x96ab('0x26'),'attributes':['id'],'raw':!![]},{'model':db['MailInteraction'],'as':_0x96ab('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0x96ab('0x28')],'as':_0x96ab('0x29'),'attributes':['id'],'raw':!![]},{'model':db[_0x96ab('0x2a')],'as':_0x96ab('0x2b'),'attributes':['id'],'raw':!![]},{'model':db[_0x96ab('0x2c')],'as':_0x96ab('0x2d'),'attributes':['id'],'raw':!![]},{'model':db[_0x96ab('0x2e')],'as':'WhatsappInteractions','attributes':['id'],'raw':!![]}]})[_0x96ab('0xd')](function(_0x269c51){if(_0x269c51){_0x5a02d0=_0x269c51;_0x567bf1[_0x33c140](util[_0x96ab('0x1e')]('user:%s',_0x269c51[_0x96ab('0x4')]));var _0x27275d=[];switch(_0x269c51[_0x96ab('0x1c')]){case _0x96ab('0x2f'):_0x567bf1[_0x33c140](_0x96ab('0x30'));_0x567bf1[_0x33c140]('voice:outbound');if(queryQueues[_0x96ab('0x31')](_0x96ab('0x32'))){delete queryQueues['include'];}_0x27275d[_0x96ab('0x33')](db['VoiceQueue']['findAll'](queryQueues));_0x27275d['push'](db['ChatQueue'][_0x96ab('0x14')](queryQueues));_0x27275d['push'](db[_0x96ab('0x34')][_0x96ab('0x14')](queryQueues));_0x27275d[_0x96ab('0x33')](db[_0x96ab('0x35')][_0x96ab('0x14')](queryQueues));_0x27275d['push'](db['MailQueue'][_0x96ab('0x14')](queryQueues));_0x27275d[_0x96ab('0x33')](db['OpenchannelQueue'][_0x96ab('0x14')](queryQueues));_0x27275d[_0x96ab('0x33')](db['WhatsappQueue']['findAll'](queryQueues));_0x27275d[_0x96ab('0x33')](db[_0x96ab('0x6')][_0x96ab('0x14')](queryTelephones));_0x27275d[_0x96ab('0x33')](db['Trunk'][_0x96ab('0x14')](queryTrunks));_0x27275d['push'](db['Campaign'][_0x96ab('0x14')](queryCampaigns));_0x27275d['push'](db[_0x96ab('0x6')][_0x96ab('0x14')](queryAgents));break;case _0x96ab('0x36'):_0x567bf1[_0x33c140](_0x96ab('0x30'));_0x567bf1[_0x33c140]('voice:outbound');_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0xf'),_0x269c51[_0x96ab('0x25')],_0x96ab('0x37')));_0x27275d[_0x96ab('0x33')](getAssociatedResources('ChatQueues',_0x269c51[_0x96ab('0x25')],'ChatQueue'));_0x27275d[_0x96ab('0x33')](getAssociatedResources('FaxQueues',_0x269c51[_0x96ab('0x25')],_0x96ab('0x34')));_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0x38'),_0x269c51['userProfileId'],_0x96ab('0x35')));_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0x12'),_0x269c51[_0x96ab('0x25')],_0x96ab('0x39')));_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0x3a'),_0x269c51[_0x96ab('0x25')],_0x96ab('0x3b')));_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0x13'),_0x269c51[_0x96ab('0x25')],'WhatsappQueue'));_0x27275d['push'](getAssociatedResources(_0x96ab('0x15'),_0x269c51[_0x96ab('0x25')],_0x96ab('0x6')));_0x27275d[_0x96ab('0x33')](getAssociatedResources(_0x96ab('0x16'),_0x269c51[_0x96ab('0x25')],_0x96ab('0x3c')));_0x27275d['push'](getAssociatedResources(_0x96ab('0x17'),_0x269c51['userProfileId'],'Campaign'));_0x27275d[_0x96ab('0x33')](db[_0x96ab('0x6')]['findAll'](queryAgents));break;case _0x96ab('0x7'):_0x567bf1[_0x33c140](_0x96ab('0x30'));_0x567bf1[_0x33c140](_0x96ab('0x3d'));_0x27275d[_0x96ab('0x33')](_0x269c51[_0x96ab('0x3e')]({'attributes':['id','name']}));_0x27275d[_0x96ab('0x33')](_0x269c51['getChatQueues']({'attributes':['id','name']}));_0x27275d[_0x96ab('0x33')](_0x269c51['getFaxQueues']({'attributes':['id',_0x96ab('0x4')]}));_0x27275d[_0x96ab('0x33')](_0x269c51[_0x96ab('0x3f')]({'attributes':['id','name']}));_0x27275d[_0x96ab('0x33')](_0x269c51[_0x96ab('0x40')]({'attributes':['id',_0x96ab('0x4')]}));_0x27275d[_0x96ab('0x33')](_0x269c51[_0x96ab('0x41')]({'attributes':['id','name']}));_0x27275d[_0x96ab('0x33')](_0x269c51['getWhatsappQueues']({'attributes':['id',_0x96ab('0x4')]}));break;}return BPromise['all'](_0x27275d);}})[_0x96ab('0xd')](function(_0x58d785){if(_0x58d785&&_0x58d785[_0x96ab('0x20')]){for(var _0x1f1faf=0x0;_0x1f1faf<_0x58d785[_0x96ab('0x20')];_0x1f1faf+=0x1){for(var _0x13b389=0x0;_0x13b389<_0x58d785[_0x1f1faf][_0x96ab('0x20')];_0x13b389+=0x1){switch(_0x1f1faf){case 0x0:joinOrLeaveQueues(_0x567bf1,_0x33c140,_0x96ab('0x42'),_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x1:joinOrLeaveQueues(_0x567bf1,_0x33c140,'chat',_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x2:joinOrLeaveQueues(_0x567bf1,_0x33c140,_0x96ab('0x43'),_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x3:joinOrLeaveQueues(_0x567bf1,_0x33c140,_0x96ab('0x44'),_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x4:joinOrLeaveQueues(_0x567bf1,_0x33c140,'mail',_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x5:joinOrLeaveQueues(_0x567bf1,_0x33c140,_0x96ab('0x45'),_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x6:joinOrLeaveQueues(_0x567bf1,_0x33c140,'whatsapp',_0x58d785[_0x1f1faf][_0x13b389]);break;case 0x7:if(_0x5a02d0[_0x96ab('0x1c')]!==_0x96ab('0x7'))_0x567bf1[_0x33c140](util[_0x96ab('0x1e')]('telephone:%s',_0x58d785[_0x1f1faf][_0x13b389][_0x96ab('0x4')]));break;case 0x8:if(_0x5a02d0[_0x96ab('0x1c')]!=='agent')_0x567bf1[_0x33c140](util[_0x96ab('0x1e')](_0x96ab('0x46'),_0x58d785[_0x1f1faf][_0x13b389][_0x96ab('0x4')]));break;case 0x9:if(_0x5a02d0[_0x96ab('0x1c')]!==_0x96ab('0x7'))_0x567bf1[_0x33c140](util[_0x96ab('0x1e')](_0x96ab('0x47'),_0x58d785[_0x1f1faf][_0x13b389]['type'],_0x58d785[_0x1f1faf][_0x13b389][_0x96ab('0x4')]));break;case 0xa:_0x567bf1[_0x33c140](util[_0x96ab('0x1e')]('user:%s',_0x58d785[_0x1f1faf][_0x13b389][_0x96ab('0x4')]));break;}}}}})[_0x96ab('0xd')](function(){if(_0x33c140==='leave'){var _0x3d35b2=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x26')],'id');return _0x5a02d0[_0x96ab('0x48')](_0x3d35b2)[_0x96ab('0xd')](function(){for(var _0x349b7e=0x0;_0x349b7e<_0x3d35b2[_0x96ab('0x20')];_0x349b7e+=0x1){_0x90fa22[_0x96ab('0x49')](_0x96ab('0x4a'),{'ChatInteractionId':Number(_0x3d35b2[_0x349b7e]),'UserId':Number(_0x5a02d0['id'])});}});}})['then'](function(){if(_0x33c140===_0x96ab('0x4b')){var _0x4033ec=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x27')],'id');return _0x5a02d0[_0x96ab('0x4c')](_0x4033ec)[_0x96ab('0xd')](function(){for(var _0x1f1a28=0x0;_0x1f1a28<_0x4033ec[_0x96ab('0x20')];_0x1f1a28+=0x1){_0x90fa22[_0x96ab('0x49')](_0x96ab('0x4d'),{'MailInteractionId':Number(_0x4033ec[_0x1f1a28]),'UserId':Number(_0x5a02d0['id'])});}});}})['then'](function(){if(_0x33c140==='leave'){var _0x3368f9=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x29')],'id');return _0x5a02d0['removeFaxInteractions'](_0x3368f9)[_0x96ab('0xd')](function(){for(var _0x3367cb=0x0;_0x3367cb<_0x3368f9[_0x96ab('0x20')];_0x3367cb+=0x1){_0x90fa22['emit']('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0x3368f9[_0x3367cb]),'UserId':Number(_0x5a02d0['id'])});}});}})['then'](function(){if(_0x33c140==='leave'){var _0x205b0c=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x2b')],'id');return _0x5a02d0[_0x96ab('0x4e')](_0x205b0c)[_0x96ab('0xd')](function(){for(var _0x4c28b5=0x0;_0x4c28b5<_0x205b0c[_0x96ab('0x20')];_0x4c28b5+=0x1){_0x90fa22[_0x96ab('0x49')](_0x96ab('0x4f'),{'SmsInteractionId':Number(_0x205b0c[_0x4c28b5]),'UserId':Number(_0x5a02d0['id'])});}});}})[_0x96ab('0xd')](function(){if(_0x33c140===_0x96ab('0x4b')){var _0x3eac5b=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x2d')],'id');return _0x5a02d0[_0x96ab('0x50')](_0x3eac5b)['then'](function(){for(var _0x4a0512=0x0;_0x4a0512<_0x3eac5b[_0x96ab('0x20')];_0x4a0512+=0x1){_0x90fa22[_0x96ab('0x49')]('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x3eac5b[_0x4a0512]),'UserId':Number(_0x5a02d0['id'])});}});}})[_0x96ab('0xd')](function(){if(_0x33c140===_0x96ab('0x4b')){var _0x2428bb=_[_0x96ab('0x1a')](_0x5a02d0[_0x96ab('0x51')],'id');return _0x5a02d0[_0x96ab('0x52')](_0x2428bb)[_0x96ab('0xd')](function(){for(var _0x7e3386=0x0;_0x7e3386<_0x2428bb[_0x96ab('0x20')];_0x7e3386+=0x1){_0x90fa22['emit'](_0x96ab('0x53'),{'WhatsappInteractionId':Number(_0x2428bb[_0x7e3386]),'UserId':Number(_0x5a02d0['id'])});}});}})[_0x96ab('0x54')](function(_0x14d856){_0x567bf1[_0x96ab('0x55')](_0x14d856);});}}function onDisconnect(_0x25201d,_0x351b1f){joinOrLeave(_0x25201d,'leave',_0x351b1f);}function onConnect(_0x31bd56){joinOrLeave(_0x31bd56,_0x96ab('0x56'));}exports[_0x96ab('0x57')]=function(_0x15a21c){_0x15a21c['on'](_0x96ab('0x58'),function(_0x137537){_0x137537['setMaxListeners'](0x0);_0x137537[_0x96ab('0x59')]=_0x137537[_0x96ab('0x5a')][_0x96ab('0x58')][_0x96ab('0x5b')]+':'+_0x137537[_0x96ab('0x5a')][_0x96ab('0x58')][_0x96ab('0x5c')];_0x137537[_0x96ab('0x5d')]=new Date();_0x137537['log']=function(_0x191e38){console['log'](_0x96ab('0x5e')+_0x137537['nsp'][_0x96ab('0x4')]+'['+_0x137537[_0x96ab('0x59')]+']',_0x191e38);};_0x137537['on'](_0x96ab('0x5f'),function(){onDisconnect(_0x137537,_0x15a21c);_0x137537['log']('DISCONNECTED');});onConnect(_0x137537);_0x137537['log'](_0x96ab('0x60'));});}; \ No newline at end of file diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index 704f12f..ce1de33 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 _0x3a47=['Openchannel','OpenchannelInteraction','OpenchannelMessage','request','then','info','Trigger,\x20%s','EventManager','code','error','catch','get','channel','direction','CmContact','describe','keys','length','startsWith','cf_','push','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','query','Sequelize','SELECT','contact','find','UserId','name','interface','format','SIP/%s','incomingmessage','outgoingmessage','sequelize','closed','event','QueryTypes','User','hasOwnProperty','model','hook','callback','toLowerCase','condition','util','../../mysqldb','jayson/promise','../logger','triggers','lodash','afterCreate','newinteraction','Chat','ChatInteraction','afterUpdate','closedinteraction','newmessage','SmsInteraction','Sms','SmsMessage','WhatsappInteraction','Whatsapp','WhatsappMessage','FaxInteraction','Fax','MailInteraction','Mail','MailMessage'];(function(_0x14baae,_0x17e75f){var _0x7b44df=function(_0x53fe64){while(--_0x53fe64){_0x14baae['push'](_0x14baae['shift']());}};_0x7b44df(++_0x17e75f);}(_0x3a47,0x1d2));var _0x73a4=function(_0x19d5f8,_0x1aef50){_0x19d5f8=_0x19d5f8-0x0;var _0x58ea39=_0x3a47[_0x19d5f8];return _0x58ea39;};'use strict';var util=require(_0x73a4('0x0'));var db=require(_0x73a4('0x1'))['db'];var jayson=require(_0x73a4('0x2'));var logger=require(_0x73a4('0x3'))(_0x73a4('0x4'));var _=require(_0x73a4('0x5'));var client=jayson['client']['http']({'port':0x232a});var triggers=[{'channel':'Chat','model':'ChatInteraction','event':_0x73a4('0x6'),'condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':_0x73a4('0x8'),'model':_0x73a4('0x9'),'event':_0x73a4('0xa'),'condition':_0x73a4('0xb'),'callback':afterUpdate},{'channel':_0x73a4('0x8'),'model':'ChatMessage','event':_0x73a4('0x6'),'condition':_0x73a4('0xc'),'callback':afterCreateMessage},{'channel':'Sms','model':_0x73a4('0xd'),'event':_0x73a4('0x6'),'condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':_0x73a4('0xe'),'model':_0x73a4('0xd'),'event':'afterUpdate','condition':_0x73a4('0xb'),'callback':afterUpdate},{'channel':_0x73a4('0xe'),'model':_0x73a4('0xf'),'event':_0x73a4('0x6'),'condition':_0x73a4('0xc'),'callback':afterCreateMessage},{'channel':'Whatsapp','model':_0x73a4('0x10'),'event':'afterCreate','condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':_0x73a4('0x11'),'model':_0x73a4('0x10'),'event':_0x73a4('0xa'),'condition':_0x73a4('0xb'),'callback':afterUpdate},{'channel':'Whatsapp','model':_0x73a4('0x12'),'event':'afterCreate','condition':_0x73a4('0xc'),'callback':afterCreateMessage},{'channel':'Fax','model':'FaxInteraction','event':_0x73a4('0x6'),'condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':'Fax','model':_0x73a4('0x13'),'event':_0x73a4('0xa'),'condition':_0x73a4('0xb'),'callback':afterUpdate},{'channel':_0x73a4('0x14'),'model':'FaxMessage','event':'afterCreate','condition':_0x73a4('0xc'),'callback':afterCreateMessage},{'channel':'Mail','model':_0x73a4('0x15'),'event':_0x73a4('0x6'),'condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':'Mail','model':_0x73a4('0x15'),'event':_0x73a4('0xa'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0x73a4('0x16'),'model':_0x73a4('0x17'),'event':_0x73a4('0x6'),'condition':_0x73a4('0xc'),'callback':afterCreateMessage},{'channel':_0x73a4('0x18'),'model':_0x73a4('0x19'),'event':'afterCreate','condition':_0x73a4('0x7'),'callback':afterCreate},{'channel':'Openchannel','model':_0x73a4('0x19'),'event':_0x73a4('0xa'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0x73a4('0x18'),'model':_0x73a4('0x1a'),'event':_0x73a4('0x6'),'condition':_0x73a4('0xc'),'callback':afterCreateMessage}];function request(_0x404fef){return client[_0x73a4('0x1b')]('EventManager',_0x404fef)[_0x73a4('0x1c')](function(_0x3bc6c6){logger[_0x73a4('0x1d')](_0x73a4('0x1e'),_0x73a4('0x1f'),_0x3bc6c6);if(_0x3bc6c6['error']){if(_0x3bc6c6['error'][_0x73a4('0x20')]===0x1f4){logger[_0x73a4('0x21')](_0x73a4('0x1e'),_0x73a4('0x1f'),_0x3bc6c6['error']);}}})[_0x73a4('0x22')](function(_0x9c04f4){logger[_0x73a4('0x21')](_0x73a4('0x1e'),'EventManager',_0x9c04f4);});}function afterCreateMessage(_0x2734df,_0x1aec9b){return function(_0x240d66,_0x173fe4){_0x240d66=_0x240d66[_0x73a4('0x23')]({'plain':!![]});_0x240d66[_0x73a4('0x24')]=_0x2734df;_0x240d66['event']=_0x240d66[_0x73a4('0x25')];return db[_0x73a4('0x26')][_0x73a4('0x27')]()[_0x73a4('0x1c')](function(_0x526ed0){var _0x41d508=[];for(var _0x1b4563=0x0;_0x1b4563=_0x38926d[_0x6c67('0x17')]){throw Error(_0x6c67('0x18'));}_0x5c72a7(_0xef58e8);})[_0x6c67('0x19')](function(_0x2c77e2){_0x4192c3(_0x2c77e2);});});}; \ No newline at end of file +var _0xf7ca=['mail','chat','fax','sms','whatsapp','getChannels','isValidChannel','toLowerCase','clearBlockUser','isUndefined','blockedAt','updateAttributes','getLicense','agent','User','count','then','agents','Maximum\x20login\x20has\x20been\x20reached','catch','lodash','bluebird','../mysqldb','./license/util'];(function(_0x5d28e2,_0x1e2167){var _0x5d748e=function(_0x18ed5d){while(--_0x18ed5d){_0x5d28e2['push'](_0x5d28e2['shift']());}};_0x5d748e(++_0x1e2167);}(_0xf7ca,0x1f4));var _0xaf7c=function(_0x2b56e5,_0x278d62){_0x2b56e5=_0x2b56e5-0x0;var _0x4ba401=_0xf7ca[_0x2b56e5];return _0x4ba401;};'use strict';var _=require(_0xaf7c('0x0'));var BPromise=require(_0xaf7c('0x1'));var db=require(_0xaf7c('0x2'))['db'];var util=require(_0xaf7c('0x3'));var channels=['voice',_0xaf7c('0x4'),_0xaf7c('0x5'),_0xaf7c('0x6'),_0xaf7c('0x7'),_0xaf7c('0x8'),'openchannel'];exports[_0xaf7c('0x9')]=function(){return channels;};exports[_0xaf7c('0xa')]=function(_0x3d1648){_0x3d1648=_0x3d1648[_0xaf7c('0xb')]();return _['includes'](channels,_0x3d1648);};exports[_0xaf7c('0xc')]=function(_0x18fffa,_0x5253a2,_0x2d0764,_0x441662){var _0x24fadc={'loginAttempts':_0x5253a2,'blocked':_0x2d0764};if(!_[_0xaf7c('0xd')](_0x441662)){_0x24fadc[_0xaf7c('0xe')]=_0x441662;}return _0x18fffa[_0xaf7c('0xf')](_0x24fadc);};exports[_0xaf7c('0x10')]=function(_0x3bf919){return new BPromise(function(_0x2f8c46,_0x175b8e){var _0x9d1f5f=0x0;if(_0x3bf919['role']!==_0xaf7c('0x11')){_0x2f8c46(_0x3bf919);}db[_0xaf7c('0x12')][_0xaf7c('0x13')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x3bf919['id']}}})[_0xaf7c('0x14')](function(_0x45611f){_0x9d1f5f=_0x45611f;return util[_0xaf7c('0x10')]();})['then'](function(_0x2e0f48){if(_0x2e0f48&&_0x2e0f48[_0xaf7c('0x15')]&&_0x9d1f5f>=_0x2e0f48[_0xaf7c('0x15')]){throw Error(_0xaf7c('0x16'));}_0x2f8c46(_0x3bf919);})[_0xaf7c('0x17')](function(_0x1a0842){_0x175b8e(_0x1a0842);});});}; \ No newline at end of file diff --git a/server/errors/index.js b/server/errors/index.js index 2360277..82a7ac4 100644 --- a/server/errors/index.js +++ b/server/errors/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0xa282=['status','render','json','send','exports'];(function(_0x373e20,_0x289e5c){var _0x351f2b=function(_0x44e9e8){while(--_0x44e9e8){_0x373e20['push'](_0x373e20['shift']());}};_0x351f2b(++_0x289e5c);}(_0xa282,0x77));var _0x2a28=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xa282[_0x321bb2];return _0x9c12ed;};'use strict';module[_0x2a28('0x0')][0x194]=function pageNotFound(_0x492ec8,_0xc46895){var _0x7f0e0f='404';var _0x18dd9e=0x194;var _0x2614ef={'status':_0x18dd9e};_0xc46895[_0x2a28('0x1')](_0x2614ef[_0x2a28('0x1')]);_0xc46895[_0x2a28('0x2')](_0x7f0e0f,{},function(_0x47af95,_0x3af6c3){if(_0x47af95){return _0xc46895['status'](_0x2614ef[_0x2a28('0x1')])[_0x2a28('0x3')](_0x2614ef);}_0xc46895[_0x2a28('0x4')](_0x3af6c3);});}; \ No newline at end of file diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js index b3724a9..91cec5a 100644 --- a/server/mysqldb/index.js +++ b/server/mysqldb/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0x5015=['../api/userProfile/userProfile.model','../api/userProfileSection/userProfileSection.model','../api/userNotification/userNotification.model','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','WhatsappInteraction','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','../api/whatsappQueueReport/whatsappQueueReport.model','WhatsappTransferReport','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','hasOne','VoiceMail','cascade','UserId','hasMany','VoiceQueuesRt','ReportAgentPreview','OpenchannelInteractions','ChatInteraction','ChatInteractions','SmsInteractions','FaxInteraction','FaxInteractions','MailInteraction','MailInteractions','WhatsappInteractions','UserNotification','SenderId','belongsTo','Groups','chat_group_has_users','Contacts','cm_user_has_contacts','belongsToMany','Lists','user_has_teams','user_has_chat_interactions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','MailQueues','ChatQueue','ChatQueues','UserChatQueue','FaxQueue','FaxQueues','SmsQueues','WhatsappQueues','UserWhatsappQueue','cm_user_has_lists','VoicePrefixes','user_has_voice_prefixes','ChatWebsite','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','MailAccount','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','WhatsappAccount','WhatsappAccounts','user_has_whatsapp_accounts','SquareProjects','user_has_square_projects','SpiedAgents','ChanSpyId','Sounds','moh_has_sounds','Members','VoiceQueueId','HopperFinals','HopperHistories','CmHopperBlack','HopperBlacks','JscriptySessions','Trunk','TrunkId','TrunkBackup','TrunkBackupId','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Agents','UserVoiceQueue','Teams','voice_queues_has_cm_blacklists','ScreenRecording','Messages','mailboxuser','mailbox','QueueCalls','uniqueid','AgentReports','Contact','MailServerIn','MailAccountId','Imap','Dispositions','CannedAnswer','Answers','Interactions','Applications','List','TemplateId','mandatoryDispositionPause','team_has_mail_queues','Account','ContactId','Owner','mail_interaction_has_tags','ThroughTags','Attachments','MailInteractionId','ChatWebsiteId','ChatOfflineMessageId','restrict','TagId','MailQueueReport','ListId','DashboardItem','Items','FaxAccountId','fax_interaction_has_tags','Users','FaxInteractionId','Interaction','AttachmentId','SmsAccountId','Interval','SmsInteractionId','sms_interaction_has_tags','Tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelQueueId','IntervalId','OpenchannelInteractionId','openchannel_interaction_has_tags','team_has_openchannel_queues','ProactiveActions','ChatApplication','Agent','Queue','Website','chat_interaction_has_tags','ChatInteractionId','team_has_chat_queues','ChatGroupId','CmCompany','CompanyId','Hoppers','Company','cm_contact_has_tags','OwnerId','Campaign','CampaignId','All','OneAll','AutomationAllId','Condition','Any','OneAny','AutomationAnyId','Actions','AutomationId','Intervals','Extensions','ChatApplications','FaxApplications','SmsApplications','AnalyticCustomReport','CustomReportId','whatsapp_interaction_has_tags','AllConditions','AllCondition','TriggerAllId','Trigger','TriggerAnyId','TriggerId','AnalyticFieldReport','Fields','DefaultReportId','MetricId','SalesforceAccount','Configurations','AccountId','SalesforceField','Subjects','Descriptions','DescriptionId','FieldId','Subject','SubjectId','Description','Field','Variable','int_desk_configuration_has_tags','VariableId','ZendeskConfiguration','int_zendesk_configuration_has_tags','FreshdeskAccount','int_freshdesk_configuration_has_tags','Dynamics365Configuration','Dynamics365Field','FreshsalesConfiguration','FromId','ToId','SessionId','JscriptyAnswerReport','ProjectId','VoiceQueues','OpenchannelQueues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','BlackLists','campaigns_has_cm_blacklists','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToUserId','ToAgent','ToMailQueueId','ToMailAccountId','ToAccount','FromChatWebsiteId','ToChatQueueId','ToQueue','ToChatWebsiteId','OpenchannelTransferReport','ToOpenchannelAccountId','FromSmsAccountId','ToSmsQueueId','CustomFields','Queues','userProfileId','UserProfileSections','UserProfileResource','Resources','sectionId','WhatsappAccountId','WhatsappInteractionId','WhatsappQueueReport','FromWhatsappAccountId','ToWhatsappAccountId','ToQueueId','WhatsappQueueId','exports','path','../config/environment','sequelize','lodash','jstz','motion2','xcall','xC@LL1234','127.0.0.1','mysql','utf8mb4','name','sequelizeHistory','utf8','database','password','options','username','User','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','../api/screenRecording/screenRecording.model','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','../api/trunk/trunk.model','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserMailQueue','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerOut','../api/mailServerOut/mailServerOut.model','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','../api/mailApplication/mailApplication.model','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboard/dashboard.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','../api/faxInteraction/faxInteraction.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','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','../api/chatApplication/chatApplication.model','../api/chatInteraction/chatInteraction.model','ChatMessage','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','../api/chatQueue/chatQueue.model','ChatGroup','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','../api/cmCompany/cmCompany.model','CmContact','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','Action','../api/action/action.model','Automation','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model','../api/condition/condition.model','../api/interval/interval.model','Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','Template','../api/template/template.model','../api/trigger/trigger.model','../api/variable/variable.model','../api/integration/integration.model','IntegrationReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','../api/analyticMetric/analyticMetric.model','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','DeskAccount','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','VtigerAccount','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesAccount/intFreshsalesAccount.model','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/squareReport/squareReport.model','SquareDetailsReport','JscriptyProject','Setting','../api/setting/setting.model','SquareProject','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','License','Migration','Attachment','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','ChatTransferReport','FaxTransferReport','SmsTransferReport','CmList','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfile'];(function(_0xc3aae7,_0x3bfa91){var _0x1f365a=function(_0x465838){while(--_0x465838){_0xc3aae7['push'](_0xc3aae7['shift']());}};_0x1f365a(++_0x3bfa91);}(_0x5015,0x103));var _0x5501=function(_0x4aeb9e,_0x2a4774){_0x4aeb9e=_0x4aeb9e-0x0;var _0x1cc033=_0x5015[_0x4aeb9e];return _0x1cc033;};'use strict';var path=require(_0x5501('0x0'));var config=require(_0x5501('0x1'));var Sequelize=require(_0x5501('0x2'));var _=require(_0x5501('0x3'));var jstz=require(_0x5501('0x4'));var timezone=jstz['determine']();config[_0x5501('0x2')]=_['defaultsDeep'](config[_0x5501('0x2')],{'database':_0x5501('0x5'),'username':_0x5501('0x6'),'password':_0x5501('0x7'),'options':{'host':_0x5501('0x8'),'port':0xcea,'dialect':_0x5501('0x9'),'dialectOptions':{'charset':_0x5501('0xa')},'logging':![],'timezone':timezone[_0x5501('0xb')](),'define':{'charset':'utf8','collate':'utf8_general_ci'}}});config['sequelizeHistory']=_['defaultsDeep'](config[_0x5501('0xc')],{'database':_0x5501('0x5'),'username':'xcall','password':'xC@LL1234','options':{'host':'127.0.0.1','port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x5501('0xa')},'logging':![],'timezone':timezone['name'](),'define':{'charset':_0x5501('0xd'),'collate':'utf8_general_ci'}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x5501('0x2')][_0x5501('0xe')],config[_0x5501('0x2')]['username'],config[_0x5501('0x2')][_0x5501('0xf')],config[_0x5501('0x2')][_0x5501('0x10')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x5501('0xc')][_0x5501('0xe')],config[_0x5501('0xc')][_0x5501('0x11')],config[_0x5501('0xc')][_0x5501('0xf')],config[_0x5501('0xc')][_0x5501('0x10')])};db[_0x5501('0x12')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x14'));db[_0x5501('0x15')]=db['sequelize']['import'](_0x5501('0x16'));db[_0x5501('0x17')]=db['sequelize']['import'](_0x5501('0x18'));db[_0x5501('0x19')]=db['sequelize']['import'](_0x5501('0x1a'));db[_0x5501('0x1b')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x1c'));db[_0x5501('0x1d')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x1e'));db[_0x5501('0x1f')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x20'));db['ScreenRecording']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x21'));db['VoiceMail']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x22'));db[_0x5501('0x23')]=db[_0x5501('0x2')]['import'](_0x5501('0x24'));db[_0x5501('0x25')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x26'));db['VoiceDialReport']=db['sequelize'][_0x5501('0x13')](_0x5501('0x27'));db[_0x5501('0x28')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x29'));db[_0x5501('0x2a')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x2b'));db[_0x5501('0x2c')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x2d'));db['Trunk']=db[_0x5501('0x2')]['import'](_0x5501('0x2e'));db[_0x5501('0x2f')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x30'));db[_0x5501('0x31')]=db[_0x5501('0x2')]['import'](_0x5501('0x32'));db['UserVoiceQueue']=db[_0x5501('0x2')][_0x5501('0x13')]('../api/userVoiceQueue/userVoiceQueue.model');db['UserChatQueue']=db['sequelize']['import']('../api/userChatQueue/userChatQueue.model');db[_0x5501('0x33')]=db[_0x5501('0x2')]['import']('../api/userMailQueue/userMailQueue.model');db[_0x5501('0x34')]=db[_0x5501('0x2')]['import'](_0x5501('0x35'));db[_0x5501('0x36')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x37'));db[_0x5501('0x38')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x39'));db['UserWhatsappQueue']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x3a'));db['MailServerIn']=db['sequelize'][_0x5501('0x13')]('../api/mailServerIn/mailServerIn.model');db[_0x5501('0x3b')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x3c'));db['MailAccount']=db['sequelize'][_0x5501('0x13')](_0x5501('0x3d'));db[_0x5501('0x3e')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x3f'));db[_0x5501('0x40')]=db['sequelize']['import'](_0x5501('0x41'));db['MailInteraction']=db['sequelize'][_0x5501('0x13')]('../api/mailInteraction/mailInteraction.model');db[_0x5501('0x42')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x43'));db[_0x5501('0x44')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x45'));db['MailQueueReport']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x46'));db[_0x5501('0x47')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x48'));db['DashboardItem']=db[_0x5501('0x2')][_0x5501('0x13')]('../api/dashboardItem/dashboardItem.model');db[_0x5501('0x49')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x4a'));db[_0x5501('0x4b')]=db[_0x5501('0x2')]['import'](_0x5501('0x4c'));db['FaxInteraction']=db['sequelize'][_0x5501('0x13')](_0x5501('0x4d'));db[_0x5501('0x4e')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x4f'));db['FaxQueue']=db['sequelize'][_0x5501('0x13')](_0x5501('0x50'));db[_0x5501('0x51')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x52'));db[_0x5501('0x53')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x54'));db[_0x5501('0x55')]=db[_0x5501('0x2')]['import'](_0x5501('0x56'));db[_0x5501('0x57')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x58'));db[_0x5501('0x59')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x5a'));db[_0x5501('0x5b')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x5c'));db[_0x5501('0x5d')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x5e'));db[_0x5501('0x5f')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x60'));db[_0x5501('0x61')]=db['sequelize']['import'](_0x5501('0x62'));db[_0x5501('0x63')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x64'));db[_0x5501('0x65')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x66'));db['ChatWebsite']=db[_0x5501('0x2')]['import'](_0x5501('0x67'));db[_0x5501('0x68')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x69'));db['ChatApplication']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x6a'));db['ChatInteraction']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x6b'));db[_0x5501('0x6c')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/chatMessage/chatMessage.model');db[_0x5501('0x6d')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x6e'));db['ChatQueue']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x6f'));db[_0x5501('0x70')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/chatGroup/chatGroup.model');db[_0x5501('0x71')]=db[_0x5501('0x2')]['import'](_0x5501('0x72'));db['CmCompany']=db[_0x5501('0x2')]['import'](_0x5501('0x73'));db[_0x5501('0x74')]=db[_0x5501('0x2')]['import'](_0x5501('0x75'));db[_0x5501('0x76')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x77'));db['CmHopperBlack']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x78'));db[_0x5501('0x79')]=db[_0x5501('0x2')]['import'](_0x5501('0x7a'));db[_0x5501('0x7b')]=db[_0x5501('0x2')]['import'](_0x5501('0x7c'));db['ReportAgentPreview']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x7d'));db[_0x5501('0x7e')]=db['sequelize'][_0x5501('0x13')]('../api/cmCustomField/cmCustomField.model');db[_0x5501('0x7f')]=db[_0x5501('0x2')]['import'](_0x5501('0x80'));db[_0x5501('0x81')]=db['sequelize'][_0x5501('0x13')]('../api/automation/automation.model');db['CannedAnswer']=db['sequelize'][_0x5501('0x13')](_0x5501('0x82'));db[_0x5501('0x83')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x84'));db['Condition']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x85'));db['Interval']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x86'));db[_0x5501('0x87')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x88'));db[_0x5501('0x89')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x8a'));db['VoiceQueuesLog']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x8b'));db[_0x5501('0x8c')]=db['sequelize'][_0x5501('0x13')](_0x5501('0x8d'));db[_0x5501('0x8e')]=db[_0x5501('0x2')]['import'](_0x5501('0x8f'));db[_0x5501('0x90')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x91'));db[_0x5501('0x92')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x93'));db['Trigger']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x94'));db['Variable']=db['sequelize'][_0x5501('0x13')](_0x5501('0x95'));db['Integration']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x96'));db[_0x5501('0x97')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/integrationReport/integrationReport.model');db['AnalyticCustomReport']=db['sequelize'][_0x5501('0x13')](_0x5501('0x98'));db[_0x5501('0x99')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x9a'));db[_0x5501('0x9b')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x9c'));db[_0x5501('0x9d')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x9e'));db['AnalyticFieldReport']=db['sequelize'][_0x5501('0x13')](_0x5501('0x9f'));db[_0x5501('0xa0')]=db['sequelize'][_0x5501('0x13')](_0x5501('0xa1'));db['SalesforceAccount']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xa2'));db[_0x5501('0xa3')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xa4'));db['SalesforceField']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xa5'));db[_0x5501('0xa6')]=db[_0x5501('0x2')]['import'](_0x5501('0xa7'));db[_0x5501('0xa8')]=db['sequelize']['import'](_0x5501('0xa9'));db[_0x5501('0xaa')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intSugarcrmField/intSugarcrmField.model');db[_0x5501('0xab')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intDeskAccount/intDeskAccount.model');db[_0x5501('0xac')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xad'));db[_0x5501('0xae')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intDeskField/intDeskField.model');db[_0x5501('0xaf')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xb0'));db[_0x5501('0xb1')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xb2'));db[_0x5501('0xb3')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intZohoField/intZohoField.model');db[_0x5501('0xb4')]=db[_0x5501('0x2')]['import'](_0x5501('0xb5'));db['ZendeskConfiguration']=db['sequelize'][_0x5501('0x13')](_0x5501('0xb6'));db[_0x5501('0xb7')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xb8'));db['FreshdeskAccount']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xb9'));db[_0x5501('0xba')]=db['sequelize'][_0x5501('0x13')](_0x5501('0xbb'));db[_0x5501('0xbc')]=db[_0x5501('0x2')]['import']('../api/intFreshdeskField/intFreshdeskField.model');db[_0x5501('0xbd')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intVtigerAccount/intVtigerAccount.model');db[_0x5501('0xbe')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xbf'));db[_0x5501('0xc0')]=db['sequelize'][_0x5501('0x13')](_0x5501('0xc1'));db[_0x5501('0xc2')]=db['sequelize'][_0x5501('0x13')]('../api/intServicenowAccount/intServicenowAccount.model');db[_0x5501('0xc3')]=db[_0x5501('0x2')]['import'](_0x5501('0xc4'));db[_0x5501('0xc5')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xc6'));db[_0x5501('0xc7')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xc8'));db['Dynamics365Configuration']=db[_0x5501('0x2')][_0x5501('0x13')]('../api/intDynamics365Configuration/intDynamics365Configuration.model');db['Dynamics365Field']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xc9'));db[_0x5501('0xca')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xcb'));db['FreshsalesConfiguration']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xcc'));db[_0x5501('0xcd')]=db[_0x5501('0x2')]['import'](_0x5501('0xce'));db['Integration']=db[_0x5501('0x2')]['import'](_0x5501('0x96'));db[_0x5501('0xcf')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/network/network.model');db[_0x5501('0xd0')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xd1'));db[_0x5501('0xd2')]=db['sequelize'][_0x5501('0x13')](_0x5501('0xd3'));db['JscriptyAnswerReport']=db[_0x5501('0x2')][_0x5501('0x13')]('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0x5501('0xd4')]=db[_0x5501('0x2')]['import'](_0x5501('0xd5'));db[_0x5501('0xd6')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xd7'));db[_0x5501('0xd8')]=db['sequelize'][_0x5501('0x13')]('../api/smsQueueReport/smsQueueReport.model');db['SquareReport']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xd9'));db[_0x5501('0xda')]=db[_0x5501('0x2')]['import']('../api/squareReportDetail/squareReportDetail.model');db[_0x5501('0xdb')]=db[_0x5501('0x2')]['import']('../api/jscriptyProject/jscriptyProject.model');db[_0x5501('0xdc')]=db['sequelize']['import'](_0x5501('0xdd'));db['SquareOdbc']=db['sequelize']['import']('../api/squareOdbc/squareOdbc.model');db[_0x5501('0xde')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xdf'));db[_0x5501('0xe0')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xe1'));db['SquareMessage']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xe2'));db[_0x5501('0xe3')]=db[_0x5501('0x2')]['import'](_0x5501('0xe4'));db[_0x5501('0xe5')]=db[_0x5501('0x2')]['import']('../api/license/license.model');db['Campaign']=db[_0x5501('0x2')]['import']('../api/campaign/campaign.model');db[_0x5501('0xe6')]=db[_0x5501('0x2')]['import']('../api/migration/migration.model');db[_0x5501('0xe7')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xe8'));db[_0x5501('0xe9')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xea'));db[_0x5501('0xeb')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xec'));db[_0x5501('0xed')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/chatTransferReport/chatTransferReport.model');db[_0x5501('0xee')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/faxTransferReport/faxTransferReport.model');db['OpenchannelTransferReport']=db['sequelize'][_0x5501('0x13')]('../api/openchannelTransferReport/openchannelTransferReport.model');db[_0x5501('0xef')]=db[_0x5501('0x2')]['import']('../api/smsTransferReport/smsTransferReport.model');db[_0x5501('0xf0')]=db['sequelize'][_0x5501('0x13')]('../api/cmList/cmList.model');db[_0x5501('0xf1')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xf2'));db[_0x5501('0xf3')]=db[_0x5501('0x2')]['import'](_0x5501('0xf4'));db['UserProfileSection']=db['sequelize'][_0x5501('0x13')](_0x5501('0xf5'));db['UserProfileResource']=db['sequelize'][_0x5501('0x13')]('../api/userProfileResource/userProfileResource.model');db['UserNotification']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xf6'));db['WhatsappAccount']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xf7'));db[_0x5501('0xf8')]=db[_0x5501('0x2')][_0x5501('0x13')]('../api/whatsappApplication/whatsappApplication.model');db[_0x5501('0xf9')]=db[_0x5501('0x2')]['import']('../api/whatsappInteraction/whatsappInteraction.model');db[_0x5501('0xfa')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xfb'));db['WhatsappQueueReport']=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xfc'));db[_0x5501('0xfd')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0xfe'));db[_0x5501('0xff')]=db['sequelize'][_0x5501('0x13')]('../api/whatsappQueue/whatsappQueue.model');db[_0x5501('0x100')]=db['sequelize']['import'](_0x5501('0x101'));db[_0x5501('0x102')]=db[_0x5501('0x2')][_0x5501('0x13')](_0x5501('0x103'));db[_0x5501('0x12')][_0x5501('0x104')](db[_0x5501('0x105')],{'as':_0x5501('0x105'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x1f')],{'as':'Recordings','foreignKey':'UserId'});db['User'][_0x5501('0x108')](db[_0x5501('0x31')],{'as':_0x5501('0x109'),'foreignKey':'UserId'});db[_0x5501('0x12')]['hasMany'](db[_0x5501('0x19')],{'as':'Extensions','onDelete':'cascade','hooks':!![]});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x79')],{'as':'HopperFinals','foreignKey':_0x5501('0x107')});db[_0x5501('0x12')]['hasMany'](db[_0x5501('0x7b')],{'as':'HopperHistory','foreignKey':_0x5501('0x107')});db[_0x5501('0x12')]['hasMany'](db[_0x5501('0x10a')],{'as':'ReportAgentPreview','foreignKey':'UserId'});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x61')],{'as':_0x5501('0x10b'),'foreignKey':_0x5501('0x107')});db['User'][_0x5501('0x108')](db[_0x5501('0x10c')],{'as':_0x5501('0x10d'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x57')],{'as':_0x5501('0x10e'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x12')]['hasMany'](db[_0x5501('0x10f')],{'as':_0x5501('0x110'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x111')],{'as':_0x5501('0x112'),'foreignKey':_0x5501('0x107')});db['User']['hasMany'](db[_0x5501('0xf9')],{'as':_0x5501('0x113'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x12')][_0x5501('0x108')](db[_0x5501('0x114')],{'as':'UserNotifications','foreignKey':_0x5501('0x115')});db[_0x5501('0x12')][_0x5501('0x116')](db[_0x5501('0xf3')],{'as':_0x5501('0xf3'),'foreignKey':'userProfileId'});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x70')],{'as':_0x5501('0x117'),'through':_0x5501('0x118')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x74')],{'as':_0x5501('0x119'),'through':_0x5501('0x11a')});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0xf0')],{'as':_0x5501('0x11c'),'through':'cm_user_has_lists'});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0xe3')],{'through':_0x5501('0x11d')});db['User']['belongsToMany'](db['MailInteraction'],{'as':_0x5501('0x112'),'through':'user_has_mail_interactions'});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x10c')],{'as':'ChatInteractions','through':_0x5501('0x11e')});db['User'][_0x5501('0x11b')](db[_0x5501('0x10f')],{'as':_0x5501('0x110'),'through':_0x5501('0x11f')});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x57')],{'as':_0x5501('0x10e'),'through':_0x5501('0x120')});db['User'][_0x5501('0x11b')](db['OpenchannelInteraction'],{'as':'OpenchannelInteractions','through':_0x5501('0x121')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0xf9')],{'as':'WhatsappInteractions','through':_0x5501('0x122')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x1d')],{'as':'VoiceQueues','through':'UserVoiceQueue','required':![]});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x3e')],{'as':_0x5501('0x123'),'through':'UserMailQueue','required':![]});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x124')],{'as':_0x5501('0x125'),'through':_0x5501('0x126'),'required':![],'hooks':!![]});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x127')],{'as':_0x5501('0x128'),'through':'UserFaxQueue','required':![]});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x5b')],{'as':_0x5501('0x129'),'through':_0x5501('0x36'),'required':![]});db['User'][_0x5501('0x11b')](db[_0x5501('0x65')],{'as':'OpenchannelQueues','through':_0x5501('0x38'),'required':![]});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0xff')],{'as':_0x5501('0x12a'),'through':_0x5501('0x12b'),'required':![]});db[_0x5501('0x12')]['belongsToMany'](db['CmList'],{'through':_0x5501('0x12c')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0xf1')],{'as':_0x5501('0x12d'),'through':_0x5501('0x12e'),'required':![]});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x12f')],{'as':'ChatWebsites','through':_0x5501('0x130')});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x49')],{'as':_0x5501('0x131'),'through':_0x5501('0x132')});db['User'][_0x5501('0x11b')](db[_0x5501('0x133')],{'as':'MailAccounts','through':_0x5501('0x134')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0x5d')],{'as':_0x5501('0x135'),'through':_0x5501('0x136')});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x53')],{'as':_0x5501('0x137'),'through':_0x5501('0x138')});db[_0x5501('0x12')][_0x5501('0x11b')](db[_0x5501('0x139')],{'as':_0x5501('0x13a'),'through':_0x5501('0x13b')});db[_0x5501('0x12')]['belongsToMany'](db[_0x5501('0xde')],{'as':_0x5501('0x13c'),'through':_0x5501('0x13d')});db['VoiceChanSpy']['hasMany'](db[_0x5501('0x19')],{'as':_0x5501('0x13e'),'onDelete':'cascade','foreignKey':_0x5501('0x13f')});db[_0x5501('0x17')][_0x5501('0x108')](db[_0x5501('0x19')],{'onDelete':_0x5501('0x106')});db['VoiceExtension'][_0x5501('0x108')](db['VoiceExtension'],{'as':'Applications','onDelete':_0x5501('0x106')});db[_0x5501('0x1b')][_0x5501('0x11b')](db[_0x5501('0x8e')],{'as':_0x5501('0x140'),'through':_0x5501('0x141')});db[_0x5501('0x1d')]['hasMany'](db[_0x5501('0x31')],{'as':_0x5501('0x142'),'foreignKey':_0x5501('0x143')});db[_0x5501('0x1d')][_0x5501('0x108')](db[_0x5501('0x76')],{'as':'Hoppers','foreignKey':_0x5501('0x143')});db[_0x5501('0x1d')][_0x5501('0x108')](db[_0x5501('0x79')],{'as':_0x5501('0x144'),'foreignKey':_0x5501('0x143')});db[_0x5501('0x1d')][_0x5501('0x108')](db[_0x5501('0x7b')],{'as':_0x5501('0x145'),'foreignKey':_0x5501('0x143')});db[_0x5501('0x1d')][_0x5501('0x108')](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':_0x5501('0x143')});db[_0x5501('0x1d')]['hasMany'](db[_0x5501('0x146')],{'as':_0x5501('0x147'),'foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x5501('0x108')](db[_0x5501('0xd6')],{'as':_0x5501('0x148'),'foreignKey':_0x5501('0x143')});db['VoiceQueue'][_0x5501('0x116')](db[_0x5501('0x149')],{'as':_0x5501('0x149'),'foreignKey':_0x5501('0x14a')});db[_0x5501('0x1d')][_0x5501('0x116')](db['Trunk'],{'as':_0x5501('0x14b'),'foreignKey':_0x5501('0x14c')});db[_0x5501('0x1d')][_0x5501('0x116')](db['Interval'],{'as':'Interval','foreignKey':'IntervalId'});db[_0x5501('0x1d')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':'mandatoryDispositionPause','foreignKey':_0x5501('0x14d')});db[_0x5501('0x1d')][_0x5501('0x11b')](db[_0x5501('0xf0')],{'as':_0x5501('0x11c'),'through':_0x5501('0x14e')});db['VoiceQueue'][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x150')});db[_0x5501('0x1d')]['belongsToMany'](db[_0x5501('0xe3')],{'as':_0x5501('0x151'),'through':_0x5501('0x102')});db['VoiceQueue'][_0x5501('0x11b')](db['CmList'],{'as':'BlackLists','through':_0x5501('0x152')});db[_0x5501('0x1f')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x12'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x153')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x12'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x105')][_0x5501('0x108')](db[_0x5501('0x23')],{'as':_0x5501('0x154'),'onDelete':_0x5501('0x106'),'foreignKey':'mailboxuser','sourceKey':'mailbox'});db[_0x5501('0x23')][_0x5501('0x116')](db[_0x5501('0x105')],{'foreignKey':_0x5501('0x155'),'targetKey':_0x5501('0x156')});db[_0x5501('0x25')]['hasMany'](db['VoiceQueueReport'],{'as':_0x5501('0x157'),'foreignKey':_0x5501('0x158'),'constraints':![]});db[_0x5501('0x25')][_0x5501('0x108')](db['VoiceAgentReport'],{'as':_0x5501('0x159'),'foreignKey':_0x5501('0x158'),'constraints':![]});db[_0x5501('0x25')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':'User','foreignKey':_0x5501('0x107')});db['VoiceCallReport']['belongsTo'](db['CmContact'],{'as':_0x5501('0x15a'),'foreignKey':'ContactId'});db[_0x5501('0x15b')][_0x5501('0x116')](db[_0x5501('0x133')],{'as':_0x5501('0x133'),'foreignKey':_0x5501('0x15c')});db[_0x5501('0x3b')][_0x5501('0x116')](db[_0x5501('0x133')],{'as':_0x5501('0x133'),'foreignKey':_0x5501('0x15c')});db['MailAccount']['hasOne'](db['MailServerIn'],{'as':_0x5501('0x15d'),'onDelete':_0x5501('0x106')});db[_0x5501('0x133')][_0x5501('0x104')](db[_0x5501('0x3b')],{'as':'Smtp','onDelete':_0x5501('0x106')});db[_0x5501('0x133')][_0x5501('0x108')](db[_0x5501('0x83')],{'as':_0x5501('0x15e'),'foreignKey':'MailAccountId'});db[_0x5501('0x133')][_0x5501('0x108')](db[_0x5501('0x15f')],{'as':_0x5501('0x160'),'foreignKey':_0x5501('0x15c')});db[_0x5501('0x133')]['hasMany'](db[_0x5501('0x42')],{'as':_0x5501('0x154'),'foreignKey':_0x5501('0x15c')});db[_0x5501('0x133')][_0x5501('0x108')](db[_0x5501('0x111')],{'as':_0x5501('0x161')});db[_0x5501('0x133')][_0x5501('0x108')](db[_0x5501('0x44')],{'as':_0x5501('0x162')});db[_0x5501('0x133')]['belongsTo'](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':'ListId'});db[_0x5501('0x133')]['belongsTo'](db[_0x5501('0x92')],{'as':_0x5501('0x92'),'foreignKey':_0x5501('0x164')});db[_0x5501('0x133')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x5501('0x133')]['belongsToMany'](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x134')});db[_0x5501('0x3e')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':'UserMailQueue'});db[_0x5501('0x3e')][_0x5501('0x11b')](db['Team'],{'through':_0x5501('0x166'),'as':_0x5501('0x151')});db[_0x5501('0x111')]['hasMany'](db['MailMessage'],{'as':_0x5501('0x154'),'onDelete':_0x5501('0x106'),'foreignKey':'MailInteractionId'});db[_0x5501('0x111')][_0x5501('0x116')](db[_0x5501('0x133')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x15c')});db[_0x5501('0x111')][_0x5501('0x116')](db['CmContact'],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0x111')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x169'),'foreignKey':'UserId'});db[_0x5501('0x111')]['belongsToMany'](db['Tag'],{'through':_0x5501('0x16a'),'as':'Tags'});db[_0x5501('0x111')]['belongsToMany'](db[_0x5501('0x90')],{'through':_0x5501('0x16a'),'as':_0x5501('0x16b')});db[_0x5501('0x111')][_0x5501('0x11b')](db['User'],{'as':'Users','through':'user_has_mail_interactions','foreignKey':'MailInteractionId'});db[_0x5501('0x42')][_0x5501('0x108')](db[_0x5501('0xe7')],{'as':_0x5501('0x16c'),'onDelete':_0x5501('0x106')});db[_0x5501('0x42')]['belongsTo'](db[_0x5501('0x12')],{'as':'User'});db['MailMessage'][_0x5501('0x116')](db[_0x5501('0x74')],{'onDelete':'cascade','as':'Contact'});db[_0x5501('0x42')][_0x5501('0x116')](db['MailInteraction'],{'as':'Interaction','foreignKey':_0x5501('0x16d')});db['MailMessage']['belongsTo'](db[_0x5501('0x133')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x15c')});db[_0x5501('0x42')][_0x5501('0x116')](db['ChatWebsite'],{'as':_0x5501('0x12f'),'foreignKey':_0x5501('0x16e')});db['MailMessage'][_0x5501('0x116')](db['ChatOfflineMessage'],{'as':'ChatOfflineMessage','foreignKey':_0x5501('0x16f')});db[_0x5501('0x44')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':_0x5501('0x170')});db[_0x5501('0x44')][_0x5501('0x116')](db[_0x5501('0x3e')],{'onDelete':_0x5501('0x170')});db[_0x5501('0x44')]['belongsTo'](db[_0x5501('0x133')],{'onDelete':'restrict'});db[_0x5501('0x44')][_0x5501('0x116')](db['Interval'],{'onDelete':_0x5501('0x170'),'foreignKey':'IntervalId'});db[_0x5501('0x44')][_0x5501('0x116')](db[_0x5501('0x90')],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x171')});db[_0x5501('0x172')]['belongsTo'](db[_0x5501('0x133')],{});db[_0x5501('0x172')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x172')]['belongsTo'](db[_0x5501('0x74')],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db['MailQueueReport']['belongsTo'](db['MailInteraction'],{});db['MailQueueReport'][_0x5501('0x116')](db['MailMessage'],{});db[_0x5501('0x172')][_0x5501('0x116')](db[_0x5501('0x12')],{});db[_0x5501('0x172')][_0x5501('0x116')](db['MailQueue'],{});db[_0x5501('0x47')]['hasMany'](db[_0x5501('0x174')],{'as':_0x5501('0x175'),'onDelete':_0x5501('0x106')});db[_0x5501('0x49')][_0x5501('0x108')](db[_0x5501('0x83')],{'as':_0x5501('0x15e'),'foreignKey':_0x5501('0x176')});db['FaxAccount'][_0x5501('0x108')](db[_0x5501('0x15f')],{'as':_0x5501('0x160'),'foreignKey':_0x5501('0x176')});db[_0x5501('0x49')][_0x5501('0x108')](db[_0x5501('0x10f')],{'as':_0x5501('0x161')});db[_0x5501('0x49')][_0x5501('0x108')](db[_0x5501('0x4b')],{'as':_0x5501('0x162')});db[_0x5501('0x49')][_0x5501('0x108')](db[_0x5501('0x19')],{'as':'Exntensions','onDelete':_0x5501('0x106')});db['FaxAccount'][_0x5501('0x108')](db[_0x5501('0x4e')],{'as':'Messages'});db[_0x5501('0x49')][_0x5501('0x116')](db[_0x5501('0x149')],{'as':_0x5501('0x149')});db[_0x5501('0x49')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x49')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':_0x5501('0x14d')});db[_0x5501('0x49')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x132')});db['FaxApplication']['belongsTo'](db[_0x5501('0x12')],{'onDelete':'restrict'});db[_0x5501('0x4b')][_0x5501('0x116')](db[_0x5501('0x127')],{'onDelete':_0x5501('0x170')});db[_0x5501('0x4b')][_0x5501('0x116')](db[_0x5501('0x49')],{'onDelete':_0x5501('0x170')});db['FaxApplication'][_0x5501('0x116')](db[_0x5501('0x90')],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x171')});db[_0x5501('0x10f')][_0x5501('0x108')](db[_0x5501('0x4e')],{'as':_0x5501('0x154'),'onDelete':'cascade','foreignKey':'FaxInteractionId'});db['FaxInteraction'][_0x5501('0x116')](db['FaxAccount'],{'as':'Account','foreignKey':_0x5501('0x176')});db[_0x5501('0x10f')][_0x5501('0x116')](db[_0x5501('0x74')],{'as':_0x5501('0x15a'),'foreignKey':'ContactId'});db[_0x5501('0x10f')]['belongsTo'](db[_0x5501('0x12')],{'as':_0x5501('0x169'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x10f')][_0x5501('0x11b')](db['Tag'],{'through':_0x5501('0x177'),'as':'Tags'});db[_0x5501('0x10f')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':'fax_interaction_has_tags','as':_0x5501('0x16b')});db[_0x5501('0x10f')]['belongsToMany'](db['User'],{'as':_0x5501('0x178'),'through':'user_has_fax_interactions','foreignKey':_0x5501('0x179')});db[_0x5501('0x4e')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':'cascade','as':_0x5501('0x12')});db[_0x5501('0x4e')][_0x5501('0x116')](db[_0x5501('0x10f')],{'as':_0x5501('0x17a'),'foreignKey':_0x5501('0x179')});db[_0x5501('0x4e')]['belongsTo'](db[_0x5501('0x74')],{'onDelete':'cascade','as':_0x5501('0x15a')});db['FaxMessage'][_0x5501('0x116')](db[_0x5501('0xe7')],{'as':_0x5501('0xe7'),'foreignKey':_0x5501('0x17b')});db[_0x5501('0x4e')][_0x5501('0x116')](db[_0x5501('0x49')],{'as':_0x5501('0x167'),'foreignKey':'FaxAccountId'});db[_0x5501('0x127')][_0x5501('0x11b')](db['User'],{'as':_0x5501('0x14f'),'through':'UserFaxQueue'});db['FaxQueue']['belongsToMany'](db[_0x5501('0xe3')],{'through':'team_has_fax_queues','as':_0x5501('0x151')});db['FaxQueueReport'][_0x5501('0x116')](db[_0x5501('0x49')],{});db[_0x5501('0x51')][_0x5501('0x116')](db['CmList'],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x51')][_0x5501('0x116')](db[_0x5501('0x74')],{'as':'Contact','foreignKey':_0x5501('0x168')});db[_0x5501('0x51')][_0x5501('0x116')](db[_0x5501('0x10f')],{});db[_0x5501('0x51')][_0x5501('0x116')](db[_0x5501('0x4e')],{});db['FaxQueueReport'][_0x5501('0x116')](db['User'],{});db[_0x5501('0x51')]['belongsTo'](db['FaxQueue'],{});db[_0x5501('0x53')][_0x5501('0x108')](db[_0x5501('0x83')],{'as':_0x5501('0x15e'),'foreignKey':_0x5501('0x17c')});db[_0x5501('0x53')][_0x5501('0x108')](db['CannedAnswer'],{'as':_0x5501('0x160'),'foreignKey':_0x5501('0x17c')});db[_0x5501('0x53')][_0x5501('0x108')](db[_0x5501('0x59')],{'as':_0x5501('0x154'),'foreignKey':_0x5501('0x17c')});db[_0x5501('0x53')][_0x5501('0x108')](db['SmsInteraction'],{'as':_0x5501('0x161')});db[_0x5501('0x53')]['hasMany'](db[_0x5501('0x55')],{'as':_0x5501('0x162')});db[_0x5501('0x53')][_0x5501('0x116')](db['CmList'],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x53')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':_0x5501('0x14d')});db[_0x5501('0x53')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x138')});db['SmsApplication'][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':'restrict'});db[_0x5501('0x55')][_0x5501('0x116')](db[_0x5501('0x5b')],{'onDelete':_0x5501('0x170')});db[_0x5501('0x55')]['belongsTo'](db[_0x5501('0x53')],{'onDelete':_0x5501('0x170')});db['SmsApplication']['belongsTo'](db[_0x5501('0x17d')],{'onDelete':_0x5501('0x170'),'foreignKey':'IntervalId'});db[_0x5501('0x55')][_0x5501('0x116')](db[_0x5501('0x90')],{'onDelete':'restrict','foreignKey':_0x5501('0x171')});db[_0x5501('0x57')]['hasMany'](db[_0x5501('0x59')],{'as':_0x5501('0x154'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x17e')});db[_0x5501('0x57')][_0x5501('0x116')](db['SmsAccount'],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x17c')});db[_0x5501('0x57')]['belongsTo'](db[_0x5501('0x74')],{'as':'Contact','foreignKey':_0x5501('0x168')});db[_0x5501('0x57')][_0x5501('0x116')](db['User'],{'as':_0x5501('0x169'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x57')][_0x5501('0x11b')](db['Tag'],{'through':_0x5501('0x17f'),'as':_0x5501('0x180')});db[_0x5501('0x57')]['belongsToMany'](db['Tag'],{'through':_0x5501('0x17f'),'as':_0x5501('0x16b')});db['SmsInteraction'][_0x5501('0x11b')](db['User'],{'as':_0x5501('0x178'),'through':_0x5501('0x120'),'foreignKey':_0x5501('0x17e')});db[_0x5501('0x59')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':'User'});db[_0x5501('0x59')][_0x5501('0x116')](db['CmContact'],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x15a')});db[_0x5501('0x59')]['belongsTo'](db[_0x5501('0x57')],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x17a'),'foreignKey':_0x5501('0x17e')});db[_0x5501('0x59')][_0x5501('0x116')](db[_0x5501('0x53')],{'as':_0x5501('0x167'),'foreignKey':'SmsAccountId'});db['SmsQueue']['belongsToMany'](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x36'),'foreignKey':_0x5501('0x181')});db[_0x5501('0x5b')]['belongsToMany'](db[_0x5501('0xe3')],{'through':_0x5501('0x182'),'as':_0x5501('0x151')});db[_0x5501('0x5d')][_0x5501('0x108')](db['Disposition'],{'as':_0x5501('0x15e'),'foreignKey':_0x5501('0x183')});db[_0x5501('0x5d')]['hasMany'](db['CannedAnswer'],{'as':_0x5501('0x160'),'foreignKey':_0x5501('0x183')});db[_0x5501('0x5d')][_0x5501('0x108')](db[_0x5501('0x61')],{'as':_0x5501('0x161'),'foreignKey':_0x5501('0x183')});db[_0x5501('0x5d')][_0x5501('0x108')](db[_0x5501('0x63')],{'as':_0x5501('0x154'),'foreignKey':_0x5501('0x183')});db[_0x5501('0x5d')][_0x5501('0x108')](db[_0x5501('0x5f')],{'as':_0x5501('0x162'),'foreignKey':_0x5501('0x183')});db['OpenchannelAccount'][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x5d')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':_0x5501('0x14d')});db[_0x5501('0x5d')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':'Agents','through':'user_has_openchannel_accounts'});db[_0x5501('0x5f')]['belongsTo'](db[_0x5501('0x12')],{'onDelete':_0x5501('0x170')});db[_0x5501('0x5f')]['belongsTo'](db['OpenchannelQueue'],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x184')});db[_0x5501('0x5f')][_0x5501('0x116')](db[_0x5501('0x5d')],{'onDelete':'restrict','foreignKey':'OpenchannelAccountId'});db['OpenchannelApplication'][_0x5501('0x116')](db['Interval'],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x185')});db[_0x5501('0x5f')]['belongsTo'](db[_0x5501('0x90')],{'onDelete':'restrict','foreignKey':_0x5501('0x171')});db['OpenchannelInteraction'][_0x5501('0x108')](db[_0x5501('0x63')],{'as':_0x5501('0x154'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x186')});db['OpenchannelInteraction']['belongsTo'](db[_0x5501('0x5d')],{'as':'Account','foreignKey':_0x5501('0x183')});db[_0x5501('0x61')]['belongsTo'](db[_0x5501('0x74')],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0x61')][_0x5501('0x116')](db['User'],{'as':_0x5501('0x169'),'foreignKey':'UserId'});db[_0x5501('0x61')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x187'),'as':_0x5501('0x180')});db[_0x5501('0x61')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':'openchannel_interaction_has_tags','as':'ThroughTags'});db[_0x5501('0x61')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x178'),'through':_0x5501('0x121'),'foreignKey':_0x5501('0x186')});db[_0x5501('0x63')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x12')});db[_0x5501('0x63')][_0x5501('0x116')](db[_0x5501('0x74')],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x15a')});db['OpenchannelMessage']['belongsTo'](db['OpenchannelInteraction'],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x17a'),'foreignKey':'OpenchannelInteractionId'});db[_0x5501('0x63')][_0x5501('0x116')](db[_0x5501('0xe7')],{'as':_0x5501('0xe7'),'foreignKey':_0x5501('0x17b')});db[_0x5501('0x63')][_0x5501('0x116')](db[_0x5501('0x5d')],{'as':'Account','foreignKey':'OpenchannelAccountId'});db[_0x5501('0x65')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x38'),'foreignKey':_0x5501('0x184')});db[_0x5501('0x65')][_0x5501('0x11b')](db[_0x5501('0xe3')],{'through':_0x5501('0x188'),'as':'Teams'});db[_0x5501('0x12f')][_0x5501('0x108')](db[_0x5501('0x83')],{'as':'Dispositions','foreignKey':_0x5501('0x16e')});db['ChatWebsite']['hasMany'](db['CannedAnswer'],{'as':_0x5501('0x160'),'foreignKey':'ChatWebsiteId'});db[_0x5501('0x12f')][_0x5501('0x108')](db[_0x5501('0x71')],{'as':_0x5501('0x189')});db[_0x5501('0x12f')][_0x5501('0x108')](db[_0x5501('0x10c')],{'as':_0x5501('0x161')});db[_0x5501('0x12f')][_0x5501('0x108')](db[_0x5501('0x18a')],{'as':_0x5501('0x162')});db['ChatWebsite'][_0x5501('0x108')](db[_0x5501('0x6c')],{'as':_0x5501('0x154')});db[_0x5501('0x12f')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':'List','foreignKey':'ListId'});db[_0x5501('0x12f')][_0x5501('0x116')](db[_0x5501('0x17d')],{'as':'Interval','foreignKey':_0x5501('0x185')});db[_0x5501('0x12f')][_0x5501('0x116')](db[_0x5501('0x133')],{'as':_0x5501('0x133'),'foreignKey':'MailAccountId'});db[_0x5501('0x12f')][_0x5501('0x116')](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x5501('0x12f')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':'Agents','through':_0x5501('0x130')});db['OpenchannelQueueReport'][_0x5501('0x116')](db[_0x5501('0x5d')],{});db['OpenchannelQueueReport']['belongsTo'](db[_0x5501('0xf0')],{'as':'List','foreignKey':_0x5501('0x173')});db['OpenchannelQueueReport'][_0x5501('0x116')](db['CmContact'],{'as':'Contact','foreignKey':_0x5501('0x168')});db[_0x5501('0x68')][_0x5501('0x116')](db[_0x5501('0x61')],{});db['OpenchannelQueueReport'][_0x5501('0x116')](db[_0x5501('0x63')],{});db[_0x5501('0x68')]['belongsTo'](db['User'],{});db[_0x5501('0x68')]['belongsTo'](db[_0x5501('0x65')],{});db[_0x5501('0x18a')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x18b'),'foreignKey':_0x5501('0x107'),'onDelete':_0x5501('0x170')});db[_0x5501('0x18a')][_0x5501('0x116')](db['ChatQueue'],{'as':_0x5501('0x18c'),'foreignKey':'ChatQueueId','onDelete':'restrict'});db[_0x5501('0x18a')][_0x5501('0x116')](db[_0x5501('0x12f')],{'as':_0x5501('0x18d'),'foreignKey':_0x5501('0x16e'),'onDelete':_0x5501('0x170')});db['ChatApplication'][_0x5501('0x116')](db[_0x5501('0x90')],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x171')});db['ChatInteraction'][_0x5501('0x108')](db[_0x5501('0x6c')],{'as':'Messages','onDelete':_0x5501('0x106'),'foreignKey':'ChatInteractionId'});db['ChatInteraction']['belongsTo'](db[_0x5501('0x12f')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x16e')});db[_0x5501('0x10c')][_0x5501('0x116')](db[_0x5501('0x74')],{'as':'Contact','foreignKey':_0x5501('0x168')});db[_0x5501('0x10c')][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x169'),'foreignKey':_0x5501('0x107')});db[_0x5501('0x10c')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x18e'),'as':'Tags'});db[_0x5501('0x10c')]['belongsToMany'](db[_0x5501('0x90')],{'through':'chat_interaction_has_tags','as':_0x5501('0x16b')});db[_0x5501('0x10c')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x178'),'through':_0x5501('0x11e'),'foreignKey':_0x5501('0x18f')});db[_0x5501('0x6c')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x12')});db[_0x5501('0x6c')]['belongsTo'](db[_0x5501('0x74')],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db['ChatMessage'][_0x5501('0x116')](db[_0x5501('0x10c')],{'onDelete':'cascade','as':'Interaction','foreignKey':_0x5501('0x18f')});db[_0x5501('0x6c')][_0x5501('0x116')](db['Attachment'],{'as':_0x5501('0xe7'),'foreignKey':'AttachmentId'});db[_0x5501('0x6c')][_0x5501('0x116')](db[_0x5501('0x12f')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x16e')});db['ChatOfflineMessage'][_0x5501('0x108')](db[_0x5501('0xe7')],{'as':_0x5501('0x16c'),'foreignKey':_0x5501('0x16f'),'onDelete':_0x5501('0x106'),'hooks':!![]});db['ChatOfflineMessage']['belongsTo'](db[_0x5501('0x74')],{'onDelete':'cascade','as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0x6d')]['belongsTo'](db[_0x5501('0x12f')],{'as':'Account','foreignKey':_0x5501('0x16e')});db[_0x5501('0x124')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x126'),'hooks':!![]});db[_0x5501('0x124')][_0x5501('0x11b')](db[_0x5501('0xe3')],{'through':_0x5501('0x190'),'as':_0x5501('0x151')});db['ChatGroup']['hasMany'](db[_0x5501('0xd2')],{'as':_0x5501('0x154'),'foreignKey':_0x5501('0x191'),'onDelete':_0x5501('0x106')});db[_0x5501('0x70')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x142'),'through':_0x5501('0x118')});db[_0x5501('0x71')][_0x5501('0x116')](db[_0x5501('0x12f')],{'as':_0x5501('0x18d'),'foreignKey':_0x5501('0x16e')});db[_0x5501('0x192')][_0x5501('0x108')](db[_0x5501('0x74')],{'as':_0x5501('0x119'),'foreignKey':_0x5501('0x193')});db[_0x5501('0x74')]['hasMany'](db[_0x5501('0x76')],{'as':_0x5501('0x194'),'foreignKey':_0x5501('0x168')});db[_0x5501('0x74')]['hasMany'](db[_0x5501('0x79')],{'as':_0x5501('0x144'),'foreignKey':_0x5501('0x168')});db['CmContact'][_0x5501('0x108')](db[_0x5501('0x7b')],{'as':_0x5501('0x145'),'foreignKey':'ContactId'});db[_0x5501('0x74')][_0x5501('0x108')](db['ReportAgentPreview'],{'as':_0x5501('0x10a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0x74')][_0x5501('0x108')](db[_0x5501('0xd6')],{'as':_0x5501('0x148'),'foreignKey':'ContactId'});db[_0x5501('0x74')][_0x5501('0x108')](db[_0x5501('0x61')],{'as':'OpenchannelInteractions','foreignKey':_0x5501('0x168'),'onDelete':'restrict'});db['CmContact']['hasMany'](db[_0x5501('0x10c')],{'as':_0x5501('0x10d'),'foreignKey':_0x5501('0x168'),'onDelete':_0x5501('0x170')});db[_0x5501('0x74')][_0x5501('0x108')](db['SmsInteraction'],{'as':'SmsInteractions','foreignKey':_0x5501('0x168'),'onDelete':_0x5501('0x170')});db[_0x5501('0x74')][_0x5501('0x108')](db[_0x5501('0x10f')],{'as':_0x5501('0x110'),'foreignKey':'ContactId','onDelete':_0x5501('0x170')});db[_0x5501('0x74')][_0x5501('0x108')](db['MailInteraction'],{'as':_0x5501('0x112'),'foreignKey':_0x5501('0x168'),'onDelete':_0x5501('0x170')});db['CmContact'][_0x5501('0x116')](db['CmCompany'],{'as':_0x5501('0x195'),'foreignKey':_0x5501('0x193')});db[_0x5501('0x74')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173'),'onDelete':'cascade'});db[_0x5501('0x74')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':'Users','through':'cm_user_has_contacts'});db[_0x5501('0x74')][_0x5501('0x11b')](db['Tag'],{'as':_0x5501('0x180'),'through':_0x5501('0x196')});db[_0x5501('0x74')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x196'),'as':_0x5501('0x16b')});db[_0x5501('0x76')][_0x5501('0x116')](db['CmContact'],{'as':_0x5501('0x15a'),'foreignKey':'ContactId','onDelete':'cascade'});db[_0x5501('0x76')]['belongsTo'](db[_0x5501('0xf0')],{'as':'List','foreignKey':_0x5501('0x173'),'onDelete':_0x5501('0x106')});db[_0x5501('0x76')][_0x5501('0x116')](db['User'],{'as':'Agent','foreignKey':'UserId'});db[_0x5501('0x76')][_0x5501('0x116')](db[_0x5501('0x1d')],{'as':_0x5501('0x18c'),'foreignKey':_0x5501('0x143'),'onDelete':'cascade'});db[_0x5501('0x76')][_0x5501('0x116')](db['Campaign'],{'as':'Campaign','foreignKey':'CampaignId','onDelete':_0x5501('0x106')});db[_0x5501('0x76')]['belongsTo'](db['User'],{'as':'Owner','foreignKey':_0x5501('0x197')});db[_0x5501('0x146')][_0x5501('0x116')](db['CmContact'],{'as':'Contact','foreignKey':_0x5501('0x168'),'onDelete':_0x5501('0x106')});db[_0x5501('0x146')]['belongsTo'](db[_0x5501('0xf0')],{'as':'List','foreignKey':_0x5501('0x173'),'onDelete':_0x5501('0x106')});db['CmHopperBlack'][_0x5501('0x116')](db[_0x5501('0x1d')],{'as':'Queue','foreignKey':_0x5501('0x143'),'onDelete':_0x5501('0x106')});db[_0x5501('0x146')][_0x5501('0x116')](db[_0x5501('0x198')],{'as':'Campaign','foreignKey':_0x5501('0x199'),'onDelete':_0x5501('0x106')});db['Automation'][_0x5501('0x108')](db['Condition'],{'as':{'plural':_0x5501('0x19a'),'singular':_0x5501('0x19b')},'foreignKey':_0x5501('0x19c'),'onDelete':_0x5501('0x106'),'hooks':!![]});db['Automation'][_0x5501('0x108')](db[_0x5501('0x19d')],{'as':{'plural':_0x5501('0x19e'),'singular':_0x5501('0x19f')},'foreignKey':_0x5501('0x1a0'),'onDelete':_0x5501('0x106'),'hooks':!![]});db[_0x5501('0x81')]['hasMany'](db[_0x5501('0x7f')],{'as':_0x5501('0x1a1'),'foreignKey':_0x5501('0x1a2'),'onDelete':_0x5501('0x106'),'hooks':!![]});db['Disposition'][_0x5501('0x108')](db['Disposition'],{'as':_0x5501('0x15e'),'foreignKey':'ParentId','onDelete':_0x5501('0x106')});db[_0x5501('0x17d')]['hasMany'](db[_0x5501('0x17d')],{'as':_0x5501('0x1a3'),'foreignKey':_0x5501('0x185'),'onDelete':_0x5501('0x106'),'hooks':!![],'required':![]});db['Interval'][_0x5501('0x108')](db[_0x5501('0x19')],{'as':_0x5501('0x1a4'),'foreignKey':'IntervalId','onDelete':_0x5501('0x170')});db[_0x5501('0x17d')][_0x5501('0x108')](db[_0x5501('0x44')],{'as':'MailApplications','foreignKey':_0x5501('0x185')});db[_0x5501('0x17d')][_0x5501('0x108')](db[_0x5501('0x18a')],{'as':_0x5501('0x1a5'),'foreignKey':_0x5501('0x185')});db[_0x5501('0x17d')]['hasMany'](db[_0x5501('0x4b')],{'as':_0x5501('0x1a6'),'foreignKey':_0x5501('0x185')});db[_0x5501('0x17d')]['hasMany'](db[_0x5501('0x55')],{'as':_0x5501('0x1a7'),'foreignKey':_0x5501('0x185')});db['Schedule'][_0x5501('0x116')](db[_0x5501('0x133')],{});db[_0x5501('0x8c')][_0x5501('0x116')](db[_0x5501('0x99')],{'foreignKey':'DefaultReportId'});db[_0x5501('0x8c')][_0x5501('0x116')](db[_0x5501('0x1a8')],{'foreignKey':_0x5501('0x1a9')});db[_0x5501('0x8e')][_0x5501('0x11b')](db[_0x5501('0x1b')],{'as':'Mohs','through':_0x5501('0x141'),'onDelete':_0x5501('0x170')});db['Tag'][_0x5501('0x11b')](db[_0x5501('0x74')],{'through':'cm_contact_has_tags'});db['Tag'][_0x5501('0x11b')](db[_0x5501('0x10c')],{'through':_0x5501('0x18e')});db[_0x5501('0x90')]['belongsToMany'](db[_0x5501('0x111')],{'through':_0x5501('0x16a')});db['Tag'][_0x5501('0x11b')](db['SmsInteraction'],{'through':_0x5501('0x17f')});db[_0x5501('0x90')][_0x5501('0x11b')](db['FaxInteraction'],{'through':'fax_interaction_has_tags'});db['Tag']['belongsToMany'](db['OpenchannelInteraction'],{'through':'openchannel_interaction_has_tags'});db[_0x5501('0x90')][_0x5501('0x11b')](db['WhatsappInteraction'],{'through':_0x5501('0x1aa')});db['Trigger'][_0x5501('0x108')](db[_0x5501('0x19d')],{'as':{'plural':_0x5501('0x1ab'),'singular':_0x5501('0x1ac')},'foreignKey':_0x5501('0x1ad'),'onDelete':_0x5501('0x106'),'hooks':!![]});db[_0x5501('0x1ae')][_0x5501('0x108')](db[_0x5501('0x19d')],{'as':{'plural':'AnyConditions','singular':'AnyCondition'},'foreignKey':_0x5501('0x1af'),'onDelete':_0x5501('0x106'),'hooks':!![]});db[_0x5501('0x1ae')]['hasMany'](db[_0x5501('0x7f')],{'as':'Actions','foreignKey':_0x5501('0x1b0'),'onDelete':'cascade','hooks':!![]});db['AnalyticCustomReport'][_0x5501('0x108')](db[_0x5501('0x1b1')],{'as':_0x5501('0x1b2'),'onDelete':'cascade','foreignKey':_0x5501('0x1a9'),'hooks':!![]});db[_0x5501('0x99')]['hasMany'](db['AnalyticFieldReport'],{'as':_0x5501('0x1b2'),'onDelete':'cascade','foreignKey':_0x5501('0x1b3')});db[_0x5501('0x9d')][_0x5501('0x108')](db['AnalyticFieldReport'],{'as':_0x5501('0x1b2'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b4')});db[_0x5501('0x1b1')]['belongsTo'](db[_0x5501('0x9d')],{'foreignKey':_0x5501('0x1b4')});db[_0x5501('0x1b5')][_0x5501('0x108')](db[_0x5501('0xa3')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db['SalesforceConfiguration'][_0x5501('0x108')](db[_0x5501('0x1b8')],{'as':_0x5501('0x1b9'),'onDelete':_0x5501('0x106'),'foreignKey':'SubjectId'});db[_0x5501('0xa3')][_0x5501('0x108')](db[_0x5501('0x1b8')],{'as':_0x5501('0x1ba'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bb')});db['SalesforceConfiguration']['hasMany'](db[_0x5501('0x1b8')],{'as':'Fields','onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xa3')]['belongsTo'](db[_0x5501('0x1b5')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db['SalesforceField'][_0x5501('0x108')](db[_0x5501('0x1b8')],{'as':_0x5501('0x1bd'),'foreignKey':_0x5501('0x1be')});db['SalesforceField']['hasMany'](db[_0x5501('0x1b8')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0x1b8')][_0x5501('0x108')](db[_0x5501('0x1b8')],{'as':_0x5501('0x1c0'),'foreignKey':'FieldId'});db['SalesforceField'][_0x5501('0x116')](db['Variable'],{'as':_0x5501('0x1c1'),'foreignKey':'VariableId'});db['SugarcrmAccount'][_0x5501('0x108')](db[_0x5501('0xa8')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0xa8')][_0x5501('0x108')](db[_0x5501('0xaa')],{'as':_0x5501('0x1b9'),'onDelete':'cascade','foreignKey':_0x5501('0x1be')});db[_0x5501('0xa8')][_0x5501('0x108')](db[_0x5501('0xaa')],{'as':_0x5501('0x1ba'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xa8')][_0x5501('0x108')](db['SugarcrmField'],{'as':_0x5501('0x1b2'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db['SugarcrmConfiguration'][_0x5501('0x116')](db['SugarcrmAccount'],{'as':'Account','foreignKey':_0x5501('0x1b7')});db[_0x5501('0xaa')][_0x5501('0x108')](db[_0x5501('0xaa')],{'as':'Subject','foreignKey':_0x5501('0x1be')});db[_0x5501('0xaa')][_0x5501('0x108')](db[_0x5501('0xaa')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xaa')][_0x5501('0x108')](db['SugarcrmField'],{'as':_0x5501('0x1c0'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xaa')]['belongsTo'](db['Variable'],{'as':_0x5501('0x1c1'),'foreignKey':'VariableId'});db[_0x5501('0xab')][_0x5501('0x108')](db[_0x5501('0xac')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db['DeskConfiguration'][_0x5501('0x108')](db[_0x5501('0xae')],{'as':_0x5501('0x1b9'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xac')][_0x5501('0x108')](db[_0x5501('0xae')],{'as':_0x5501('0x1ba'),'onDelete':_0x5501('0x106'),'foreignKey':'DescriptionId'});db[_0x5501('0xac')][_0x5501('0x108')](db[_0x5501('0xae')],{'as':_0x5501('0x1b2'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xac')][_0x5501('0x116')](db[_0x5501('0xab')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db['DeskConfiguration'][_0x5501('0x11b')](db['Tag'],{'through':_0x5501('0x1c2')});db[_0x5501('0xae')][_0x5501('0x108')](db[_0x5501('0xae')],{'as':_0x5501('0x1bd'),'foreignKey':'SubjectId'});db[_0x5501('0xae')]['hasMany'](db[_0x5501('0xae')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xae')][_0x5501('0x108')](db[_0x5501('0xae')],{'as':_0x5501('0x1c0'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xae')][_0x5501('0x116')](db[_0x5501('0x1c1')],{'as':_0x5501('0x1c1'),'foreignKey':_0x5501('0x1c3')});db['ZohoAccount']['hasMany'](db[_0x5501('0xb1')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0xb1')][_0x5501('0x108')](db[_0x5501('0xb3')],{'as':_0x5501('0x1b9'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xb1')][_0x5501('0x108')](db[_0x5501('0xb3')],{'as':'Descriptions','onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xb1')][_0x5501('0x108')](db[_0x5501('0xb3')],{'as':'Fields','onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db['ZohoConfiguration'][_0x5501('0x116')](db[_0x5501('0xaf')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0xb3')][_0x5501('0x108')](db['ZohoField'],{'as':_0x5501('0x1bd'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xb3')][_0x5501('0x108')](db[_0x5501('0xb3')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xb3')][_0x5501('0x108')](db[_0x5501('0xb3')],{'as':'Field','foreignKey':_0x5501('0x1bc')});db[_0x5501('0xb3')]['belongsTo'](db[_0x5501('0x1c1')],{'as':_0x5501('0x1c1'),'foreignKey':_0x5501('0x1c3')});db[_0x5501('0xb4')][_0x5501('0x108')](db[_0x5501('0x1c4')],{'as':_0x5501('0x1b6'),'onDelete':'cascade','foreignKey':_0x5501('0x1b7')});db[_0x5501('0x1c4')][_0x5501('0x108')](db['ZendeskField'],{'as':_0x5501('0x1b9'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0x1c4')][_0x5501('0x108')](db[_0x5501('0xb7')],{'as':'Descriptions','foreignKey':_0x5501('0x1bb')});db[_0x5501('0x1c4')]['hasMany'](db['ZendeskField'],{'as':'Fields','foreignKey':_0x5501('0x1bc')});db[_0x5501('0x1c4')][_0x5501('0x116')](db[_0x5501('0xb4')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0x1c4')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x1c5')});db['ZendeskField'][_0x5501('0x108')](db[_0x5501('0xb7')],{'as':_0x5501('0x1bd'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xb7')][_0x5501('0x108')](db[_0x5501('0xb7')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xb7')][_0x5501('0x108')](db['ZendeskField'],{'as':_0x5501('0x1c0'),'foreignKey':'FieldId'});db[_0x5501('0xb7')][_0x5501('0x116')](db[_0x5501('0x1c1')],{'as':'Variable','foreignKey':'VariableId'});db[_0x5501('0x1c6')][_0x5501('0x108')](db[_0x5501('0xba')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db['FreshdeskConfiguration'][_0x5501('0x108')](db[_0x5501('0xbc')],{'as':_0x5501('0x1b9'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1be')});db['FreshdeskConfiguration'][_0x5501('0x108')](db['FreshdeskField'],{'as':_0x5501('0x1ba'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xba')][_0x5501('0x108')](db['FreshdeskField'],{'as':'Fields','onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xba')][_0x5501('0x116')](db[_0x5501('0x1c6')],{'as':'Account','foreignKey':_0x5501('0x1b7')});db[_0x5501('0xba')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x1c7')});db[_0x5501('0xbc')][_0x5501('0x108')](db['FreshdeskField'],{'as':_0x5501('0x1bd'),'foreignKey':'SubjectId'});db[_0x5501('0xbc')][_0x5501('0x108')](db[_0x5501('0xbc')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xbc')][_0x5501('0x108')](db[_0x5501('0xbc')],{'as':'Field','foreignKey':'FieldId'});db['FreshdeskField']['belongsTo'](db[_0x5501('0x1c1')],{'as':'Variable','foreignKey':'VariableId'});db[_0x5501('0xbd')][_0x5501('0x108')](db[_0x5501('0xbe')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0xbe')][_0x5501('0x108')](db[_0x5501('0xc0')],{'as':_0x5501('0x1b9'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xbe')][_0x5501('0x108')](db[_0x5501('0xc0')],{'as':_0x5501('0x1ba'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xbe')][_0x5501('0x108')](db[_0x5501('0xc0')],{'as':_0x5501('0x1b2'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xbe')][_0x5501('0x116')](db[_0x5501('0xbd')],{'as':_0x5501('0x167'),'foreignKey':'AccountId'});db[_0x5501('0xc0')][_0x5501('0x108')](db['VtigerField'],{'as':_0x5501('0x1bd'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xc0')][_0x5501('0x108')](db[_0x5501('0xc0')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xc0')]['hasMany'](db[_0x5501('0xc0')],{'as':_0x5501('0x1c0'),'foreignKey':'FieldId'});db['VtigerField'][_0x5501('0x116')](db['Variable'],{'as':'Variable','foreignKey':'VariableId'});db[_0x5501('0xc2')][_0x5501('0x108')](db['ServicenowConfiguration'],{'as':'Configurations','onDelete':'cascade','foreignKey':'AccountId'});db[_0x5501('0xc3')]['hasMany'](db[_0x5501('0xc5')],{'as':_0x5501('0x1b9'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0xc3')][_0x5501('0x108')](db[_0x5501('0xc5')],{'as':_0x5501('0x1ba'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xc3')][_0x5501('0x108')](db[_0x5501('0xc5')],{'as':_0x5501('0x1b2'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0xc3')][_0x5501('0x116')](db[_0x5501('0xc2')],{'as':'Account','foreignKey':_0x5501('0x1b7')});db[_0x5501('0xc5')]['hasMany'](db['ServicenowField'],{'as':_0x5501('0x1bd'),'foreignKey':_0x5501('0x1be')});db['ServicenowField'][_0x5501('0x108')](db[_0x5501('0xc5')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0xc5')][_0x5501('0x108')](db[_0x5501('0xc5')],{'as':'Field','foreignKey':_0x5501('0x1bc')});db[_0x5501('0xc5')][_0x5501('0x116')](db[_0x5501('0x1c1')],{'as':_0x5501('0x1c1'),'foreignKey':_0x5501('0x1c3')});db[_0x5501('0xc7')][_0x5501('0x108')](db[_0x5501('0x1c8')],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0x1c8')][_0x5501('0x108')](db[_0x5501('0x1c9')],{'as':_0x5501('0x1b9'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0x1c8')][_0x5501('0x108')](db[_0x5501('0x1c9')],{'as':_0x5501('0x1ba'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bb')});db[_0x5501('0x1c8')][_0x5501('0x108')](db['Dynamics365Field'],{'as':_0x5501('0x1b2'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1bc')});db[_0x5501('0x1c8')][_0x5501('0x116')](db['Dynamics365Account'],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db['Dynamics365Field'][_0x5501('0x108')](db[_0x5501('0x1c9')],{'as':_0x5501('0x1bd'),'foreignKey':'SubjectId'});db[_0x5501('0x1c9')][_0x5501('0x108')](db[_0x5501('0x1c9')],{'as':_0x5501('0x1bf'),'foreignKey':_0x5501('0x1bb')});db['Dynamics365Field']['hasMany'](db[_0x5501('0x1c9')],{'as':_0x5501('0x1c0'),'foreignKey':_0x5501('0x1bc')});db['Dynamics365Field'][_0x5501('0x116')](db[_0x5501('0x1c1')],{'as':_0x5501('0x1c1'),'foreignKey':'VariableId'});db[_0x5501('0xca')][_0x5501('0x108')](db['FreshsalesConfiguration'],{'as':_0x5501('0x1b6'),'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1b7')});db['FreshsalesConfiguration'][_0x5501('0x108')](db[_0x5501('0xcd')],{'as':_0x5501('0x1b9'),'foreignKey':_0x5501('0x1be')});db[_0x5501('0x1ca')]['hasMany'](db['FreshsalesField'],{'as':'Descriptions','foreignKey':_0x5501('0x1bb')});db[_0x5501('0x1ca')][_0x5501('0x108')](db['FreshsalesField'],{'as':_0x5501('0x1b2'),'foreignKey':_0x5501('0x1bc')});db['FreshsalesConfiguration'][_0x5501('0x116')](db[_0x5501('0xca')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1b7')});db[_0x5501('0xcd')]['hasMany'](db[_0x5501('0xcd')],{'as':'Subject','foreignKey':_0x5501('0x1be')});db[_0x5501('0xcd')][_0x5501('0x108')](db[_0x5501('0xcd')],{'as':'Description','foreignKey':_0x5501('0x1bb')});db['FreshsalesField'][_0x5501('0x108')](db[_0x5501('0xcd')],{'as':_0x5501('0x1c0'),'foreignKey':_0x5501('0x1bc')});db['FreshsalesField'][_0x5501('0x116')](db[_0x5501('0x1c1')],{'as':_0x5501('0x1c1'),'foreignKey':_0x5501('0x1c3')});db[_0x5501('0xd0')][_0x5501('0x116')](db[_0x5501('0x12f')],{});db[_0x5501('0xd0')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0xd0')]['belongsTo'](db[_0x5501('0x74')],{'as':'Contact','foreignKey':_0x5501('0x168')});db[_0x5501('0xd0')]['belongsTo'](db['ChatInteraction'],{});db[_0x5501('0xd0')][_0x5501('0x116')](db['ChatMessage'],{});db['ChatQueueReport'][_0x5501('0x116')](db[_0x5501('0x12')],{});db['ChatQueueReport'][_0x5501('0x116')](db[_0x5501('0x124')],{});db[_0x5501('0xd2')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1cb')});db['ChatInternalMessage'][_0x5501('0x116')](db['User'],{'onDelete':_0x5501('0x106'),'foreignKey':_0x5501('0x1cc')});db['JscriptySessionReport']['hasMany'](db[_0x5501('0xd4')],{'foreignKey':_0x5501('0x1cd'),'onDelete':'cascade'});db[_0x5501('0xd6')][_0x5501('0x108')](db[_0x5501('0x1ce')],{'foreignKey':_0x5501('0x1cd'),'onDelete':_0x5501('0x106')});db[_0x5501('0xd8')][_0x5501('0x116')](db['SmsAccount'],{});db['SmsQueueReport'][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':'ListId'});db[_0x5501('0xd8')][_0x5501('0x116')](db[_0x5501('0x74')],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0xd8')][_0x5501('0x116')](db['SmsInteraction'],{});db[_0x5501('0xd8')]['belongsTo'](db[_0x5501('0x59')],{});db[_0x5501('0xd8')][_0x5501('0x116')](db[_0x5501('0x12')],{});db['SmsQueueReport'][_0x5501('0x116')](db[_0x5501('0x5b')],{});db['JscriptyProject'][_0x5501('0x108')](db[_0x5501('0xd6')],{'foreignKey':_0x5501('0x1cf')});db[_0x5501('0xdb')]['hasMany'](db[_0x5501('0xd4')],{'foreignKey':_0x5501('0x1cf')});db[_0x5501('0xdb')][_0x5501('0x108')](db['JscriptyAnswerReport'],{'foreignKey':_0x5501('0x1cf')});db[_0x5501('0xde')][_0x5501('0x11b')](db['User'],{'as':_0x5501('0x178'),'through':_0x5501('0x13d')});db[_0x5501('0xe3')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x11d')});db[_0x5501('0xe3')]['belongsToMany'](db[_0x5501('0x1d')],{'through':'TeamVoiceQueue','as':_0x5501('0x1d0')});db[_0x5501('0xe3')]['belongsToMany'](db[_0x5501('0x3e')],{'through':_0x5501('0x166'),'as':_0x5501('0x123')});db[_0x5501('0xe3')][_0x5501('0x11b')](db[_0x5501('0x124')],{'through':_0x5501('0x190'),'as':_0x5501('0x125')});db[_0x5501('0xe3')][_0x5501('0x11b')](db[_0x5501('0x127')],{'through':'team_has_fax_queues','as':_0x5501('0x128')});db[_0x5501('0xe3')]['belongsToMany'](db['SmsQueue'],{'through':'team_has_sms_queues','as':_0x5501('0x129')});db['Team'][_0x5501('0x11b')](db[_0x5501('0x65')],{'through':'team_has_openchannel_queues','as':_0x5501('0x1d1')});db[_0x5501('0xe3')][_0x5501('0x11b')](db[_0x5501('0xff')],{'through':_0x5501('0x1d2'),'as':'WhatsappQueues'});db['Campaign']['hasMany'](db[_0x5501('0x76')],{'as':_0x5501('0x194'),'foreignKey':_0x5501('0x199')});db[_0x5501('0x198')][_0x5501('0x108')](db[_0x5501('0x79')],{'as':'HopperFinals','foreignKey':_0x5501('0x199')});db[_0x5501('0x198')][_0x5501('0x108')](db[_0x5501('0x7b')],{'as':_0x5501('0x145'),'foreignKey':_0x5501('0x199')});db['Campaign'][_0x5501('0x108')](db['CmHopperBlack'],{'as':'HopperBlacks','foreignKey':'CampaignId'});db[_0x5501('0x198')][_0x5501('0x116')](db['Trunk'],{'as':_0x5501('0x149'),'foreignKey':_0x5501('0x14a')});db[_0x5501('0x198')][_0x5501('0x116')](db[_0x5501('0x149')],{'as':_0x5501('0x14b'),'foreignKey':_0x5501('0x14c')});db['Campaign']['belongsTo'](db[_0x5501('0x17d')],{'as':_0x5501('0x17d'),'foreignKey':'IntervalId'});db['Campaign'][_0x5501('0x116')](db[_0x5501('0xde')],{'as':_0x5501('0xde'),'foreignKey':_0x5501('0x1d3')});db[_0x5501('0x198')][_0x5501('0x11b')](db[_0x5501('0xf0')],{'as':_0x5501('0x11c'),'through':_0x5501('0x1d4')});db[_0x5501('0x198')][_0x5501('0x11b')](db[_0x5501('0xf0')],{'as':_0x5501('0x1d5'),'through':_0x5501('0x1d6')});db[_0x5501('0xe7')][_0x5501('0x116')](db[_0x5501('0x6d')],{'as':_0x5501('0x6d'),'foreignKey':_0x5501('0x16f')});db['MailTransferReport'][_0x5501('0x116')](db['MailMessage'],{});db[_0x5501('0xeb')][_0x5501('0x116')](db[_0x5501('0x111')],{});db[_0x5501('0xeb')][_0x5501('0x116')](db[_0x5501('0x133')],{'foreignKey':_0x5501('0x1d7'),'as':_0x5501('0x1d8')});db['MailTransferReport'][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':_0x5501('0x1d9'),'as':_0x5501('0x1da')});db[_0x5501('0xeb')][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':_0x5501('0x1db'),'as':_0x5501('0x1dc')});db[_0x5501('0xeb')][_0x5501('0x116')](db[_0x5501('0x3e')],{'foreignKey':_0x5501('0x1dd'),'as':'ToQueue'});db['MailTransferReport'][_0x5501('0x116')](db['MailAccount'],{'foreignKey':_0x5501('0x1de'),'as':_0x5501('0x1df')});db[_0x5501('0xed')][_0x5501('0x116')](db[_0x5501('0x6c')],{});db[_0x5501('0xed')][_0x5501('0x116')](db['ChatInteraction'],{});db['ChatTransferReport'][_0x5501('0x116')](db[_0x5501('0x12f')],{'foreignKey':_0x5501('0x1e0'),'as':_0x5501('0x1d8')});db[_0x5501('0xed')][_0x5501('0x116')](db['User'],{'foreignKey':_0x5501('0x1d9'),'as':_0x5501('0x1da')});db[_0x5501('0xed')][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':'ToUserId','as':_0x5501('0x1dc')});db[_0x5501('0xed')][_0x5501('0x116')](db['ChatQueue'],{'foreignKey':_0x5501('0x1e1'),'as':_0x5501('0x1e2')});db['ChatTransferReport'][_0x5501('0x116')](db[_0x5501('0x12f')],{'foreignKey':_0x5501('0x1e3'),'as':_0x5501('0x1df')});db[_0x5501('0xee')][_0x5501('0x116')](db[_0x5501('0x4e')],{});db[_0x5501('0xee')]['belongsTo'](db[_0x5501('0x10f')],{});db[_0x5501('0xee')][_0x5501('0x116')](db[_0x5501('0x49')],{'foreignKey':'FromFaxAccountId','as':'FromAccount'});db['FaxTransferReport'][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':'FromUserId','as':_0x5501('0x1da')});db[_0x5501('0xee')][_0x5501('0x116')](db['User'],{'foreignKey':'ToUserId','as':_0x5501('0x1dc')});db['FaxTransferReport']['belongsTo'](db[_0x5501('0x127')],{'foreignKey':'ToFaxQueueId','as':_0x5501('0x1e2')});db[_0x5501('0xee')][_0x5501('0x116')](db['FaxAccount'],{'foreignKey':'ToFaxAccountId','as':_0x5501('0x1df')});db[_0x5501('0x1e4')][_0x5501('0x116')](db[_0x5501('0x63')],{});db['OpenchannelTransferReport'][_0x5501('0x116')](db[_0x5501('0x61')],{});db[_0x5501('0x1e4')][_0x5501('0x116')](db[_0x5501('0x5d')],{'foreignKey':'FromOpenchannelAccountId','as':_0x5501('0x1d8')});db['OpenchannelTransferReport'][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':'FromUserId','as':_0x5501('0x1da')});db[_0x5501('0x1e4')][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':_0x5501('0x1db'),'as':_0x5501('0x1dc')});db['OpenchannelTransferReport'][_0x5501('0x116')](db['OpenchannelQueue'],{'foreignKey':'ToOpenchannelQueueId','as':_0x5501('0x1e2')});db['OpenchannelTransferReport'][_0x5501('0x116')](db[_0x5501('0x5d')],{'foreignKey':_0x5501('0x1e5'),'as':'ToAccount'});db[_0x5501('0xef')]['belongsTo'](db['SmsMessage'],{});db[_0x5501('0xef')]['belongsTo'](db[_0x5501('0x57')],{});db[_0x5501('0xef')][_0x5501('0x116')](db['SmsAccount'],{'foreignKey':_0x5501('0x1e6'),'as':_0x5501('0x1d8')});db[_0x5501('0xef')][_0x5501('0x116')](db['User'],{'foreignKey':_0x5501('0x1d9'),'as':_0x5501('0x1da')});db[_0x5501('0xef')]['belongsTo'](db['User'],{'foreignKey':_0x5501('0x1db'),'as':_0x5501('0x1dc')});db[_0x5501('0xef')]['belongsTo'](db[_0x5501('0x5b')],{'foreignKey':_0x5501('0x1e7'),'as':_0x5501('0x1e2')});db['SmsTransferReport']['belongsTo'](db[_0x5501('0x53')],{'foreignKey':'ToSmsAccountId','as':_0x5501('0x1df')});db[_0x5501('0xf0')][_0x5501('0x108')](db[_0x5501('0x83')],{'as':'Dispositions','foreignKey':_0x5501('0x173')});db[_0x5501('0xf0')][_0x5501('0x108')](db['CmCustomField'],{'as':_0x5501('0x1e8'),'foreignKey':'ListId'});db['CmList'][_0x5501('0x108')](db[_0x5501('0x74')],{'as':_0x5501('0x119'),'onDelete':'cascade','foreignKey':_0x5501('0x173')});db[_0x5501('0xf0')]['hasMany'](db[_0x5501('0x79')],{'as':'HopperFinals','foreignKey':_0x5501('0x173')});db[_0x5501('0xf0')][_0x5501('0x108')](db[_0x5501('0x7b')],{'as':'HopperHistory','foreignKey':_0x5501('0x173')});db[_0x5501('0xf0')][_0x5501('0x108')](db[_0x5501('0x10a')],{'as':_0x5501('0x10a'),'foreignKey':'ListId'});db[_0x5501('0xf0')]['belongsToMany'](db[_0x5501('0x1d')],{'as':_0x5501('0x1e9'),'through':_0x5501('0x14e')});db[_0x5501('0xf0')][_0x5501('0x11b')](db['User'],{'as':_0x5501('0x14f'),'through':_0x5501('0x12c')});db['VoicePrefix'][_0x5501('0x108')](db['VoiceExtension'],{'as':_0x5501('0x1a4'),'onDelete':_0x5501('0x106')});db['VoicePrefix'][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x12e')});db[_0x5501('0xf3')][_0x5501('0x108')](db['User'],{'as':_0x5501('0x178'),'foreignKey':_0x5501('0x1ea')});db[_0x5501('0xf3')][_0x5501('0x108')](db['UserProfileSection'],{'as':_0x5501('0x1eb'),'foreignKey':_0x5501('0x1ea'),'onDelete':_0x5501('0x106')});db['UserProfileSection'][_0x5501('0x108')](db[_0x5501('0x1ec')],{'as':_0x5501('0x1ed'),'foreignKey':_0x5501('0x1ee'),'onDelete':_0x5501('0x106')});db[_0x5501('0x139')]['hasMany'](db['Disposition'],{'as':_0x5501('0x15e'),'foreignKey':_0x5501('0x1ef')});db[_0x5501('0x139')][_0x5501('0x108')](db[_0x5501('0x15f')],{'as':'Answers','foreignKey':_0x5501('0x1ef')});db['WhatsappAccount'][_0x5501('0x108')](db['WhatsappMessage'],{'as':_0x5501('0x154'),'foreignKey':_0x5501('0x1ef')});db['WhatsappAccount']['hasMany'](db[_0x5501('0xf9')],{'as':_0x5501('0x161')});db[_0x5501('0x139')]['hasMany'](db['WhatsappApplication'],{'as':_0x5501('0x162')});db[_0x5501('0x139')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':'ListId'});db['WhatsappAccount']['belongsTo'](db[_0x5501('0x87')],{'as':_0x5501('0x165'),'foreignKey':_0x5501('0x14d')});db[_0x5501('0x139')][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':'user_has_whatsapp_accounts'});db[_0x5501('0xf8')][_0x5501('0x116')](db[_0x5501('0x12')],{'onDelete':_0x5501('0x170')});db[_0x5501('0xf8')][_0x5501('0x116')](db[_0x5501('0xff')],{'onDelete':_0x5501('0x170')});db[_0x5501('0xf8')][_0x5501('0x116')](db[_0x5501('0x139')],{'onDelete':'restrict'});db[_0x5501('0xf8')]['belongsTo'](db[_0x5501('0x17d')],{'onDelete':_0x5501('0x170'),'foreignKey':_0x5501('0x185')});db[_0x5501('0xf8')][_0x5501('0x116')](db[_0x5501('0x90')],{'onDelete':'restrict','foreignKey':'TagId'});db[_0x5501('0xf9')]['hasMany'](db[_0x5501('0xfa')],{'as':_0x5501('0x154'),'onDelete':_0x5501('0x106'),'foreignKey':'WhatsappInteractionId'});db['WhatsappInteraction'][_0x5501('0x116')](db[_0x5501('0x139')],{'as':_0x5501('0x167'),'foreignKey':'WhatsappAccountId'});db[_0x5501('0xf9')]['belongsTo'](db[_0x5501('0x74')],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db[_0x5501('0xf9')][_0x5501('0x116')](db['User'],{'as':_0x5501('0x169'),'foreignKey':_0x5501('0x107')});db['WhatsappInteraction'][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':_0x5501('0x1aa'),'as':_0x5501('0x180')});db[_0x5501('0xf9')][_0x5501('0x11b')](db[_0x5501('0x90')],{'through':'whatsapp_interaction_has_tags','as':_0x5501('0x16b')});db[_0x5501('0xf9')][_0x5501('0x11b')](db['User'],{'as':'Users','through':_0x5501('0x122'),'foreignKey':'WhatsappInteractionId'});db['WhatsappMessage'][_0x5501('0x116')](db[_0x5501('0x12')],{'as':_0x5501('0x12')});db[_0x5501('0xfa')][_0x5501('0x116')](db['CmContact'],{'onDelete':_0x5501('0x106'),'as':_0x5501('0x15a')});db['WhatsappMessage'][_0x5501('0x116')](db['WhatsappInteraction'],{'onDelete':_0x5501('0x106'),'as':'Interaction','foreignKey':_0x5501('0x1f0')});db[_0x5501('0xfa')][_0x5501('0x116')](db[_0x5501('0x139')],{'as':_0x5501('0x167'),'foreignKey':_0x5501('0x1ef')});db[_0x5501('0x1f1')][_0x5501('0x116')](db[_0x5501('0x139')],{});db[_0x5501('0x1f1')][_0x5501('0x116')](db[_0x5501('0xf0')],{'as':_0x5501('0x163'),'foreignKey':_0x5501('0x173')});db[_0x5501('0x1f1')][_0x5501('0x116')](db['CmContact'],{'as':_0x5501('0x15a'),'foreignKey':_0x5501('0x168')});db['WhatsappQueueReport']['belongsTo'](db['WhatsappInteraction'],{});db[_0x5501('0x1f1')]['belongsTo'](db[_0x5501('0xff')],{});db[_0x5501('0x1f1')][_0x5501('0x116')](db[_0x5501('0xfa')],{});db[_0x5501('0x1f1')][_0x5501('0x116')](db[_0x5501('0x12')],{});db[_0x5501('0xfd')]['belongsTo'](db['WhatsappMessage'],{});db[_0x5501('0xfd')]['belongsTo'](db[_0x5501('0xf9')],{});db[_0x5501('0xfd')][_0x5501('0x116')](db[_0x5501('0x139')],{'foreignKey':_0x5501('0x1f2'),'as':_0x5501('0x1d8')});db['WhatsappTransferReport'][_0x5501('0x116')](db[_0x5501('0x139')],{'foreignKey':_0x5501('0x1f3'),'as':_0x5501('0x1df')});db[_0x5501('0xfd')][_0x5501('0x116')](db[_0x5501('0xff')],{'foreignKey':_0x5501('0x1f4'),'as':'ToQueue'});db[_0x5501('0xfd')][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':'FromUserId','as':'FromAgent'});db[_0x5501('0xfd')][_0x5501('0x116')](db[_0x5501('0x12')],{'foreignKey':_0x5501('0x1db'),'as':'ToAgent'});db['WhatsappQueue'][_0x5501('0x11b')](db[_0x5501('0x12')],{'as':_0x5501('0x14f'),'through':_0x5501('0x12b'),'foreignKey':_0x5501('0x1f5')});db[_0x5501('0xff')]['belongsToMany'](db['Team'],{'through':_0x5501('0x1d2'),'as':'Teams'});module[_0x5501('0x1f6')]={'db':db,'dbH':dbH}; \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index 586dd43..12a3163 100644 --- a/server/routes.js +++ b/server/routes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0xb522=['./api/webbar','static','root','/apidoc','/www','join','/demo','snippet','3.0.0','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','sendFile','resolve','/index.html','username','password','apiKey','firstName','street','phone','mobile','email','clientId','clientSecret','securityToken','accessKey','tenantId','token','channelSecret','accessToken','accessTokenSecret','authToken','consumerKey','consumerSecret','membername','vidaooApiKey','clientEmail','privateKey','accesskeyid','key','pass','accountSid','localstationid','dsn','secret','registry','oldPassword','isPlainObject','isArray','length','isString','replace','@@{','includes','lodash','path','express','express-winston','./errors','./config/logger','default','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','\x20body=%s','method','headers','x-forwarded-for','statusCode','user','name','role','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','agent_id','format','connection','remoteAddress','url','responseTime','agent_name','test','/api/users','./api/user','/api/voice/chanspy','./api/voiceChanSpy','./api/voiceContext','/api/voice/extensions','/api/voice/mohs','./api/voiceMusicOnHold','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','/api/voice/mails','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','/api/trunks','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','/api/mail/substatuses','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','./api/dashboard','/api/dashboards/items','./api/faxAccount','/api/fax/applications','/api/fax/interactions','./api/faxInteraction','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/applications','./api/smsApplication','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','./api/openchannelAccount','/api/openchannel/applications','/api/openchannel/interactions','/api/openchannel/messages','/api/openchannel/queues','/api/chat/websites','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','./api/chatMessage','/api/chat/offline_messages','/api/chat/queues','./api/chatQueue','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','./api/cmCompany','/api/cm/contacts','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','./api/cmHopperHistory','./api/cmCustomField','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','./api/condition','/api/intervals','/api/pauses','./api/pause','/api/cdr','./api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','./api/sound','/api/tags','./api/tag','/api/templates','./api/template','./api/trigger','/api/variables','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','/api/analytics/extracted_reports','./api/analyticMetric','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/configurations','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intZohoAccount','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskConfiguration','/api/integrations/zendesk/fields','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','./api/intFreshsalesField','/api/networks','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','/api/square/details/reports','/api/jscripty/projects','./api/jscriptyProject','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','/api/teams','./api/team','/api/license','/api/campaigns','./api/campaign','./api/migration','./api/attachment','/api/plugins','/api/mail/reports/transfer','./api/mailTransferReport','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','/api/openchannel/reports/transfer','./api/openchannelTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/cm/lists','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','/api/userNotifications','/api/whatsapp/accounts','/api/whatsapp/applications','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','./api/whatsappTransferReport','/api/whatsapp/queues','./api/cloudProvider','/api/auth/local','./api/authLocal','./api/authGoogle','/api/jira','/api/rpc','./api/rpc','/api/version','./api/version','/api/system','./api/system','./api/pm2'];(function(_0x233482,_0x318b16){var _0x27c2cc=function(_0x341a4c){while(--_0x341a4c){_0x233482['push'](_0x233482['shift']());}};_0x27c2cc(++_0x318b16);}(_0xb522,0x188));var _0x2b52=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xb522[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x2b52('0x0'));var path=require(_0x2b52('0x1'));var express=require(_0x2b52('0x2'));var ewinston=require(_0x2b52('0x3'));var util=require('util');var errors=require(_0x2b52('0x4'));var config=require('./config/environment');var logger=require(_0x2b52('0x5'))('api');var authLogger=require(_0x2b52('0x5'))('auth');exports[_0x2b52('0x6')]=function(_0x29f858){_0x29f858[_0x2b52('0x7')](ewinston[_0x2b52('0x8')]({'winstonInstance':logger,'meta':![],'statusLevels':!![],'msg':function(_0x1f3a94,_0x5bf044){var _0x38b06d=_0x2b52('0x9');if(!_[_0x2b52('0xa')](_0x1f3a94[_0x2b52('0xb')])){_0x38b06d+=_0x2b52('0xc');var _0x716ce8=_0x1f3a94[_0x2b52('0xb')];maskSensitiveData(_0x716ce8);}return util['format'](_0x38b06d,_0x1f3a94[_0x2b52('0xd')],_0x1f3a94['headers']['x-forwarded-for']?_0x1f3a94[_0x2b52('0xe')][_0x2b52('0xf')]:_0x1f3a94['connection']['remoteAddress']||_0x1f3a94['ip'],_0x1f3a94['url'],_0x5bf044[_0x2b52('0x10')],_0x5bf044['responseTime'],_0x1f3a94['user']?_0x1f3a94[_0x2b52('0x11')]['id']:null,_0x1f3a94[_0x2b52('0x11')]?_0x1f3a94['user'][_0x2b52('0x12')]:null,_0x1f3a94[_0x2b52('0x11')]?_0x1f3a94[_0x2b52('0x11')][_0x2b52('0x13')]:null,_0x716ce8?util['inspect'](_0x716ce8,![],null):'');}}));_0x29f858[_0x2b52('0x7')](ewinston[_0x2b52('0x8')]({'winstonInstance':authLogger,'meta':![],'statusLevels':!![],'msg':function(_0x47a656,_0x5c3f57){var _0x1085d4=_0x2b52('0x14');if(_0x47a656[_0x2b52('0xb')]&&_0x47a656['body'][_0x2b52('0x15')]&&_0x47a656[_0x2b52('0xb')][_0x2b52('0x16')]){_0x1085d4='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)';}return util[_0x2b52('0x17')](_0x1085d4,_0x47a656[_0x2b52('0xd')],_0x47a656[_0x2b52('0xe')][_0x2b52('0xf')]?_0x47a656[_0x2b52('0xe')][_0x2b52('0xf')]:_0x47a656[_0x2b52('0x18')][_0x2b52('0x19')]||_0x47a656['ip'],_0x47a656[_0x2b52('0x1a')],_0x5c3f57[_0x2b52('0x10')],_0x5c3f57[_0x2b52('0x1b')],_0x47a656['user']?_0x47a656[_0x2b52('0x11')]['id']:null,_0x47a656[_0x2b52('0x11')]?_0x47a656[_0x2b52('0x11')]['name']:null,_0x47a656[_0x2b52('0x11')]?_0x47a656[_0x2b52('0x11')]['role']:null,_0x47a656[_0x2b52('0xb')]&&_0x47a656[_0x2b52('0xb')][_0x2b52('0x15')]?_0x47a656[_0x2b52('0xb')][_0x2b52('0x15')]:'other',_0x47a656[_0x2b52('0xb')]&&_0x47a656[_0x2b52('0xb')][_0x2b52('0x16')]?_0x47a656['body'][_0x2b52('0x16')]:'',_0x47a656[_0x2b52('0xb')]&&_0x47a656[_0x2b52('0xb')][_0x2b52('0x1c')]?_0x47a656[_0x2b52('0xb')]['agent_name']:'');},'ignoreRoute':function(_0x10b50b){var _0x4a7b83=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x4a7b83[_0x2b52('0x1d')](_0x10b50b[_0x2b52('0x1a')]);}}));_0x29f858[_0x2b52('0x7')](_0x2b52('0x1e'),require(_0x2b52('0x1f')));_0x29f858['use'](_0x2b52('0x20'),require(_0x2b52('0x21')));_0x29f858['use']('/api/voice/contexts',require(_0x2b52('0x22')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x23'),require('./api/voiceExtension'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x24'),require(_0x2b52('0x25')));_0x29f858[_0x2b52('0x7')]('/api/voice/queues',require(_0x2b52('0x26')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x27'),require(_0x2b52('0x28')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x29'),require('./api/screenRecording'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x2a'),require('./api/voiceMail'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x2b'),require(_0x2b52('0x2c')));_0x29f858['use'](_0x2b52('0x2d'),require('./api/voiceCallReport'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x2e'),require(_0x2b52('0x2f')));_0x29f858[_0x2b52('0x7')]('/api/voice/agents/reports',require('./api/voiceAgentReport'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x30'),require(_0x2b52('0x31')));_0x29f858['use'](_0x2b52('0x32'),require('./api/memberReport'));_0x29f858['use'](_0x2b52('0x33'),require(_0x2b52('0x34')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x35'),require(_0x2b52('0x36')));_0x29f858[_0x2b52('0x7')]('/api/mail/out_servers',require(_0x2b52('0x37')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x38'),require(_0x2b52('0x39')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x3a'),require(_0x2b52('0x3b')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x3c'),require(_0x2b52('0x3d')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x3e'),require(_0x2b52('0x3f')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x40'),require(_0x2b52('0x41')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x42'),require(_0x2b52('0x43')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x44'),require(_0x2b52('0x45')));_0x29f858['use'](_0x2b52('0x46'),require(_0x2b52('0x47')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x48'),require('./api/dashboardItem'));_0x29f858[_0x2b52('0x7')]('/api/fax/accounts',require(_0x2b52('0x49')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x4a'),require('./api/faxApplication'));_0x29f858['use'](_0x2b52('0x4b'),require(_0x2b52('0x4c')));_0x29f858['use'](_0x2b52('0x4d'),require(_0x2b52('0x4e')));_0x29f858['use'](_0x2b52('0x4f'),require(_0x2b52('0x50')));_0x29f858['use'](_0x2b52('0x51'),require(_0x2b52('0x52')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x53'),require(_0x2b52('0x54')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x55'),require(_0x2b52('0x56')));_0x29f858[_0x2b52('0x7')]('/api/sms/interactions',require(_0x2b52('0x57')));_0x29f858['use'](_0x2b52('0x58'),require(_0x2b52('0x59')));_0x29f858['use'](_0x2b52('0x5a'),require(_0x2b52('0x5b')));_0x29f858[_0x2b52('0x7')]('/api/openchannel/accounts',require(_0x2b52('0x5c')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x5d'),require('./api/openchannelApplication'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x5e'),require('./api/openchannelInteraction'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x5f'),require('./api/openchannelMessage'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x60'),require('./api/openchannelQueue'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x61'),require('./api/chatWebsite'));_0x29f858[_0x2b52('0x7')]('/api/openchannel/reports/queue',require(_0x2b52('0x62')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x63'),require(_0x2b52('0x64')));_0x29f858['use'](_0x2b52('0x65'),require(_0x2b52('0x66')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x67'),require(_0x2b52('0x68')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x69'),require('./api/chatOfflineMessage'));_0x29f858['use'](_0x2b52('0x6a'),require(_0x2b52('0x6b')));_0x29f858[_0x2b52('0x7')]('/api/chat/groups',require(_0x2b52('0x6c')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x6d'),require(_0x2b52('0x6e')));_0x29f858[_0x2b52('0x7')]('/api/cm/companies',require(_0x2b52('0x6f')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x70'),require(_0x2b52('0x71')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x72'),require(_0x2b52('0x73')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x74'),require(_0x2b52('0x75')));_0x29f858[_0x2b52('0x7')]('/api/cm/hopper_final',require('./api/cmHopperFinal'));_0x29f858['use']('/api/cm/hopper_history',require(_0x2b52('0x76')));_0x29f858[_0x2b52('0x7')]('/api/cm/custom_fields',require(_0x2b52('0x77')));_0x29f858[_0x2b52('0x7')]('/api/actions',require(_0x2b52('0x78')));_0x29f858['use'](_0x2b52('0x79'),require(_0x2b52('0x7a')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x7b'),require(_0x2b52('0x7c')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x7d'),require(_0x2b52('0x7e')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x7f'),require(_0x2b52('0x80')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x81'),require('./api/interval'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x82'),require(_0x2b52('0x83')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x84'),require(_0x2b52('0x85')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x86'),require(_0x2b52('0x87')));_0x29f858['use'](_0x2b52('0x88'),require(_0x2b52('0x89')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x8a'),require(_0x2b52('0x8b')));_0x29f858['use'](_0x2b52('0x8c'),require(_0x2b52('0x8d')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x8e'),require(_0x2b52('0x8f')));_0x29f858[_0x2b52('0x7')]('/api/triggers',require(_0x2b52('0x90')));_0x29f858['use'](_0x2b52('0x91'),require('./api/variable'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x92'),require(_0x2b52('0x93')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x94'),require(_0x2b52('0x95')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x96'),require(_0x2b52('0x97')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x98'),require('./api/analyticDefaultReport'));_0x29f858['use'](_0x2b52('0x99'),require('./api/analyticExtractedReport'));_0x29f858['use']('/api/analytics/metrics',require(_0x2b52('0x9a')));_0x29f858['use']('/api/analytics/field_reports',require(_0x2b52('0x9b')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x9c'),require(_0x2b52('0x9d')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x9e'),require(_0x2b52('0x9f')));_0x29f858[_0x2b52('0x7')]('/api/integrations/salesforce/configurations',require(_0x2b52('0xa0')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xa1'),require(_0x2b52('0xa2')));_0x29f858['use'](_0x2b52('0xa3'),require(_0x2b52('0xa4')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xa5'),require(_0x2b52('0xa6')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xa7'),require('./api/intSugarcrmField'));_0x29f858['use'](_0x2b52('0xa8'),require(_0x2b52('0xa9')));_0x29f858['use'](_0x2b52('0xaa'),require('./api/intDeskConfiguration'));_0x29f858[_0x2b52('0x7')]('/api/integrations/desk/fields',require('./api/intDeskField'));_0x29f858['use']('/api/integrations/zoho/accounts',require(_0x2b52('0xab')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xac'),require(_0x2b52('0xad')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xae'),require(_0x2b52('0xaf')));_0x29f858[_0x2b52('0x7')]('/api/integrations/zendesk/accounts',require(_0x2b52('0xb0')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xb1'),require(_0x2b52('0xb2')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xb3'),require(_0x2b52('0xb4')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xb5'),require(_0x2b52('0xb6')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xb7'),require(_0x2b52('0xb8')));_0x29f858['use'](_0x2b52('0xb9'),require(_0x2b52('0xba')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xbb'),require('./api/intVtigerAccount'));_0x29f858[_0x2b52('0x7')](_0x2b52('0xbc'),require(_0x2b52('0xbd')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xbe'),require(_0x2b52('0xbf')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xc0'),require(_0x2b52('0xc1')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xc2'),require(_0x2b52('0xc3')));_0x29f858[_0x2b52('0x7')]('/api/integrations/servicenow/fields',require('./api/intServicenowField'));_0x29f858[_0x2b52('0x7')]('/api/integrations/dynamics365/accounts',require(_0x2b52('0xc4')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xc5'),require(_0x2b52('0xc6')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xc7'),require(_0x2b52('0xc8')));_0x29f858[_0x2b52('0x7')]('/api/integrations/freshsales/accounts',require(_0x2b52('0xc9')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xca'),require(_0x2b52('0xcb')));_0x29f858[_0x2b52('0x7')]('/api/integrations/freshsales/fields',require(_0x2b52('0xcc')));_0x29f858['use'](_0x2b52('0xcd'),require('./api/network'));_0x29f858['use'](_0x2b52('0xce'),require(_0x2b52('0xcf')));_0x29f858['use'](_0x2b52('0xd0'),require(_0x2b52('0xd1')));_0x29f858[_0x2b52('0x7')]('/api/jscripty/answers/reports',require(_0x2b52('0xd2')));_0x29f858[_0x2b52('0x7')]('/api/jscripty/questions/reports',require(_0x2b52('0xd3')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xd4'),require(_0x2b52('0xd5')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xd6'),require(_0x2b52('0xd7')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xd8'),require(_0x2b52('0xd9')));_0x29f858['use'](_0x2b52('0xda'),require('./api/squareReportDetail'));_0x29f858[_0x2b52('0x7')](_0x2b52('0xdb'),require(_0x2b52('0xdc')));_0x29f858[_0x2b52('0x7')]('/api/settings',require(_0x2b52('0xdd')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xde'),require(_0x2b52('0xdf')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xe0'),require(_0x2b52('0xe1')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xe2'),require(_0x2b52('0xe3')));_0x29f858['use'](_0x2b52('0xe4'),require(_0x2b52('0xe5')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xe6'),require(_0x2b52('0xe7')));_0x29f858['use'](_0x2b52('0xe8'),require('./api/license'));_0x29f858[_0x2b52('0x7')](_0x2b52('0xe9'),require(_0x2b52('0xea')));_0x29f858['use']('/api/migrations',require(_0x2b52('0xeb')));_0x29f858[_0x2b52('0x7')]('/api/attachments',require(_0x2b52('0xec')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xed'),require('./api/plugin'));_0x29f858['use'](_0x2b52('0xee'),require(_0x2b52('0xef')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xf0'),require(_0x2b52('0xf1')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xf2'),require('./api/faxTransferReport'));_0x29f858['use'](_0x2b52('0xf3'),require(_0x2b52('0xf4')));_0x29f858['use'](_0x2b52('0xf5'),require(_0x2b52('0xf6')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xf7'),require('./api/cmList'));_0x29f858['use'](_0x2b52('0xf8'),require(_0x2b52('0xf9')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xfa'),require(_0x2b52('0xfb')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xfc'),require(_0x2b52('0xfd')));_0x29f858[_0x2b52('0x7')](_0x2b52('0xfe'),require('./api/userProfileResource'));_0x29f858[_0x2b52('0x7')](_0x2b52('0xff'),require('./api/userNotification'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x100'),require('./api/whatsappAccount'));_0x29f858[_0x2b52('0x7')](_0x2b52('0x101'),require(_0x2b52('0x102')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x103'),require('./api/whatsappInteraction'));_0x29f858['use']('/api/whatsapp/messages',require(_0x2b52('0x104')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x105'),require(_0x2b52('0x106')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x107'),require(_0x2b52('0x108')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x109'),require('./api/whatsappQueue'));_0x29f858['use']('/api/cloudProviders',require(_0x2b52('0x10a')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x10b'),require(_0x2b52('0x10c')));_0x29f858[_0x2b52('0x7')]('/api/auth/google',require(_0x2b52('0x10d')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x10e'),require('./api/jira'));_0x29f858['use'](_0x2b52('0x10f'),require(_0x2b52('0x110')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x111'),require(_0x2b52('0x112')));_0x29f858[_0x2b52('0x7')](_0x2b52('0x113'),require(_0x2b52('0x114')));_0x29f858[_0x2b52('0x7')]('/api/pm2',require(_0x2b52('0x115')));_0x29f858[_0x2b52('0x7')]('/api/webbar',require(_0x2b52('0x116')));_0x29f858['use']('/apidoc',express[_0x2b52('0x117')](path['join'](config[_0x2b52('0x118')],_0x2b52('0x119'))));_0x29f858[_0x2b52('0x7')](_0x2b52('0x11a'),express[_0x2b52('0x117')](path[_0x2b52('0x11b')](config[_0x2b52('0x118')],_0x2b52('0x11a'))));_0x29f858[_0x2b52('0x7')](_0x2b52('0x11c'),express['static'](path['join'](config['root'],_0x2b52('0x11c'))));_0x29f858[_0x2b52('0x7')]('/snippet',express['static'](path[_0x2b52('0x11b')](config['root'],_0x2b52('0x11d'),_0x2b52('0x11e'))));_0x29f858[_0x2b52('0x7')](_0x2b52('0x11f'),express['static'](path['join'](config[_0x2b52('0x118')],_0x2b52('0x120'))));_0x29f858[_0x2b52('0x121')](_0x2b52('0x122'))[_0x2b52('0x123')](errors[0x194]);_0x29f858[_0x2b52('0x121')]('/*')[_0x2b52('0x123')](function(_0x4fc84e,_0x184519){_0x184519[_0x2b52('0x124')](path[_0x2b52('0x125')](_0x29f858['get']('appPath')+_0x2b52('0x126')));});};var sensitiveFields=[_0x2b52('0x127'),_0x2b52('0x128'),'newPassword',_0x2b52('0x129'),_0x2b52('0x12a'),'lastName',_0x2b52('0x12b'),_0x2b52('0x12c'),_0x2b52('0x12d'),'fax',_0x2b52('0x12e'),_0x2b52('0x12f'),_0x2b52('0x130'),_0x2b52('0x131'),'code',_0x2b52('0x132'),_0x2b52('0x133'),_0x2b52('0x134'),_0x2b52('0x135'),_0x2b52('0x136'),_0x2b52('0x137'),_0x2b52('0x138'),_0x2b52('0x139'),_0x2b52('0x13a'),_0x2b52('0x13b'),'calleridname','calleridnum','exten',_0x2b52('0x13c'),_0x2b52('0x13d'),_0x2b52('0x13e'),_0x2b52('0x13f'),'secretaccesskey',_0x2b52('0x140'),_0x2b52('0x11'),_0x2b52('0x141'),_0x2b52('0x142'),_0x2b52('0x143'),_0x2b52('0x144'),_0x2b52('0x145'),_0x2b52('0x146'),_0x2b52('0x147')];function maskSensitiveData(_0x2f39cd){var _0x3117c2=/(?!^)[\s\S](?!$)/g;if(!_[_0x2b52('0x148')](_0x2f39cd))return;for(var _0x5ba2ff in _0x2f39cd){if(_[_0x2b52('0x149')](_0x2f39cd[_0x5ba2ff])){for(var _0x1bda26=0x0;_0x1bda26<_0x2f39cd[_0x5ba2ff][_0x2b52('0x14a')];_0x1bda26++){maskSensitiveData(_0x2f39cd[_0x5ba2ff][_0x1bda26]);}}else if(_[_0x2b52('0x148')](_0x2f39cd[_0x5ba2ff])){maskSensitiveData(_0x2f39cd[_0x5ba2ff]);}else if(_[_0x2b52('0x14b')](_0x2f39cd[_0x5ba2ff])){_0x2f39cd[_0x5ba2ff]=_0x2f39cd[_0x5ba2ff][_0x2b52('0x14c')](/{{{/g,_0x2b52('0x14d'))['replace'](/}}}/g,'}@@')['replace'](/{{/g,'@{')[_0x2b52('0x14c')](/}}/g,'}@');if(_[_0x2b52('0x14e')](sensitiveFields,_0x5ba2ff)){_0x2f39cd[_0x5ba2ff]=_0x2f39cd[_0x5ba2ff][_0x2b52('0x14c')](_0x3117c2,'*');}}}} \ No newline at end of file diff --git a/server/rpc/index.js b/server/rpc/index.js index 78b5a3f..d2dd305 100644 --- a/server/rpc/index.js +++ b/server/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0xd4dc=['jayson/promise','bluebird','lodash','listen','merge','../api/user/user.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/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.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/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/trigger/trigger.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/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/setting/setting.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','rpc','port','localhost','log','../config/triggers','default','RPC\x20listening\x20on\x20'];(function(_0x1cac3b,_0x344896){var _0x36c22b=function(_0x24ef81){while(--_0x24ef81){_0x1cac3b['push'](_0x1cac3b['shift']());}};_0x36c22b(++_0x344896);}(_0xd4dc,0x16d));var _0xcd4d=function(_0x2f45ea,_0x15c656){_0x2f45ea=_0x2f45ea-0x0;var _0x485a84=_0xd4dc[_0x2f45ea];return _0x485a84;};'use strict';var jayson=require(_0xcd4d('0x0'));var BPromise=require(_0xcd4d('0x1'));var _=require(_0xcd4d('0x2'));var config=require('../config/environment');exports[_0xcd4d('0x3')]=function(){return new BPromise(function(_0x4c7e61,_0xe14e17){var _0x13a329={};_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x5')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/voiceExtension/voiceExtension.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x6')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/voiceRecording/voiceRecording.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x7')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x8')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x9')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0xa')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0xb')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0xc')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0xd')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0xe')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0xf')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x10')));_0x13a329=_['merge'](_0x13a329,require('../api/mailQueue/mailQueue.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x11')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x12')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x13')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x14')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/faxAccount/faxAccount.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x15')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x16')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x17')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x18')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x19')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x1a')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x1b')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x1c')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x1d')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x1e')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x1f')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x20')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x21')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x22')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x23')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x24')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x25')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/cmContact/cmContact.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/cmHopper/cmHopper.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x26')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x27')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x28')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x29')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/pause/pause.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x2a')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x2b')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x2c')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/variable/variable.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x2d')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x2e')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x2f')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x30')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x31')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x32')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x33')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x34')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x35')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x36')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/smsQueueReport/smsQueueReport.rpc'));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x37')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x38')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x39')));_0x13a329=_['merge'](_0x13a329,require('../api/squareOdbc/squareOdbc.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/squareProject/squareProject.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x3a')));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x3b')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x3c')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x3d')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/plugin/plugin.rpc'));_0x13a329=_['merge'](_0x13a329,require(_0xcd4d('0x3e')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x3f')));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require('../api/whatsappQueueReport/whatsappQueueReport.rpc'));_0x13a329=_[_0xcd4d('0x4')](_0x13a329,require(_0xcd4d('0x40')));var _0x435c64=jayson[_0xcd4d('0x41')](_0x13a329)['http']();var _0x1e846e=config[_0xcd4d('0x42')]['port']||config[_0xcd4d('0x43')]+0x1;var _0x68f168=config['rpc']['ip']||_0xcd4d('0x44');_0x435c64['on']('error',function(_0xd7e4de){return _0xe14e17(_0xd7e4de);});_0x435c64[_0xcd4d('0x3')](_0x1e846e,_0x68f168,function(){console[_0xcd4d('0x45')]('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x68f168,_0x1e846e);require(_0xcd4d('0x46'))[_0xcd4d('0x47')]();return _0x4c7e61(_0xcd4d('0x48')+_0x68f168+':'+_0x1e846e);});});}; \ No newline at end of file diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js index 67902ab..b5e6e11 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 _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 +var _0x16a8=['write','close','inherits','prototype','sendRequest','sync','answer','ANSWER','getData','beep','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','setExtension','SET\x20EXTENSION\x20%s','HANGUP','sayNumber','SAY\x20NUMBER\x20%s\x20%s','sayDigits','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','wav','streamFile','agi','AGI','label','exports','util','events','EventEmitter','call','setEncoding','utf8','setTimeout','headers','emit','ready','line','toLowerCase','hangup','substring','520-Invalid','search','520\x20End\x20of\x20proper','no\x20code','replace','result=','indexOf','startsWith','split','length','error','E_AGI_SOCKET_ERROR','code','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command'];(function(_0x107b86,_0xe36aaa){var _0x4b1111=function(_0x234815){while(--_0x234815){_0x107b86['push'](_0x107b86['shift']());}};_0x4b1111(++_0xe36aaa);}(_0x16a8,0xb4));var _0x816a=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0x16a8[_0x1035c1];return _0x308d67;};'use strict';var util=require(_0x816a('0x0'));var _=require('lodash');var EventEmitter=require(_0x816a('0x1'))[_0x816a('0x2')];var AGIReply=require('./reply');var AGIError=require('./error');function AGIChannel(_0xb9d920){var _0x32357f=this,_0x25f799=new AGIReply(),_0x31bddc=![],_0x291884={};EventEmitter[_0x816a('0x3')](_0x32357f);_0xb9d920[_0x816a('0x4')](_0x816a('0x5'));_0xb9d920[_0x816a('0x6')](0x8*0x3c*0x3c*0x3e8);_0x25f799['setEncoding'](_0x816a('0x5'));_0x25f799['on'](_0x816a('0x7'),function(_0x38db8d){for(var _0x3cbe2f in _0x38db8d){_0x32357f[_0x3cbe2f]=_0x38db8d[_0x3cbe2f];}_0x32357f[_0x816a('0x8')](_0x816a('0x9'));});_0x25f799['on'](_0x816a('0xa'),function(_0x88620b){if(_0x88620b[_0x816a('0xb')]()==_0x816a('0xc')){_0x32357f[_0x816a('0x8')]('hangup');return;}if(_0x88620b[_0x816a('0xd')](0x0,0xb)==_0x816a('0xe')){_0x31bddc=!![];}if(_0x31bddc){_0x291884['rx']+=_0x88620b+'\x0a';if(_0x88620b[_0x816a('0xf')](_0x816a('0x10'))!=-0x1){_0x31bddc=![];}}else{_0x291884['rx']=_0x88620b;}if(_0x31bddc){return;}if(typeof _0x291884['cb']=='function'){var _0x4d4427=_0x291884['rx'][_0x816a('0xd')](0x0,0x3),_0x454929=null,_0x3057f8=null;_0x4d4427=parseInt(_0x4d4427);if(isNaN(_0x4d4427)){_0x291884['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x816a('0x11')});return;}if(_0x4d4427!=0xc8){_0x291884['cb'](null,{'code':_0x4d4427,'result':-0x1,'extra':'KO'});return;}_0x454929=_0x291884['rx'][_0x816a('0xd')](0x4)[_0x816a('0x12')](_0x816a('0x13'),'');if(_0x454929[_0x816a('0x14')]('\x20')!=-0x1){_0x454929=_0x454929['substr'](0x0,_0x454929[_0x816a('0x14')]('\x20'));}if(_[_0x816a('0x15')](_0x454929,'-1')){_0x454929=parseInt(_0x454929);}_0x3057f8=_0x291884['rx'][_0x816a('0x16')]('\x20');if(_0x3057f8[_0x816a('0x17')]==0x3){_0x3057f8=_0x3057f8[0x2][_0x816a('0xd')](0x1,_0x3057f8[0x2]['length']-0x1);}else if(_0x3057f8[_0x816a('0x17')]>0x3){var _0x37f71f=/\((.+)\)/;var _0x20e1e8=_0x291884['rx']['match'](_0x37f71f);if(_0x20e1e8){_0x3057f8=_0x20e1e8[0x1];}else{_0x3057f8=null;}}else{_0x3057f8=null;}_0x291884['cb'](null,{'code':_0x4d4427,'result':_0x454929,'extra':_0x3057f8});}});_0xb9d920['on'](_0x816a('0x18'),function(_0x543ee8){_0x32357f[_0x816a('0x8')]('error',new AGIError(_0x816a('0x19'),_0x543ee8[_0x816a('0x1a')]));});_0xb9d920['on']('close',function(){_0x32357f[_0x816a('0x8')]('close',new AGIError(_0x816a('0x1b')));});_0xb9d920['on'](_0x816a('0x1c'),function(){_0x32357f[_0x816a('0x8')](_0x816a('0x1c'),new AGIError(_0x816a('0x1d')));_0xb9d920[_0x816a('0x1e')]();});_0xb9d920[_0x816a('0x1f')](_0x25f799);this[_0x816a('0x20')]=function(_0x4af9d8,_0xd5051f){var _0x4af9d8=_0x4af9d8||'',_0xd5051f=typeof _0xd5051f=='function'?_0xd5051f:new Function();_0x291884={'tx':_0x4af9d8,'rx':'','cb':_0xd5051f};_0xb9d920[_0x816a('0x21')](_0x4af9d8+'\x0a');},this[_0x816a('0x22')]=function(){_0xb9d920['destroy']();};}util[_0x816a('0x23')](AGIChannel,EventEmitter);AGIChannel[_0x816a('0x24')][_0x816a('0x25')]=function(_0x53b718){return this['command'][_0x816a('0x26')](this,_0x53b718);};AGIChannel['prototype'][_0x816a('0x27')]=function(){return this[_0x816a('0x25')](_0x816a('0x28'));};AGIChannel['prototype'][_0x816a('0x29')]=function(_0x1bf75d,_0x482d17,_0x242756){_0x1bf75d=_0x1bf75d===undefined?_0x816a('0x2a'):_0x1bf75d;_0x482d17=_0x482d17===undefined?'5':_0x482d17;_0x242756=_0x242756===undefined?'1':_0x242756;return this['sendRequest'](util[_0x816a('0x2b')](_0x816a('0x2c'),_0x1bf75d,_0x482d17*0x3e8,_0x242756));};AGIChannel[_0x816a('0x24')][_0x816a('0x2d')]=function(_0x2323fd){_0x2323fd=_0x2323fd||_0x816a('0x2e');return this['sendRequest'](util[_0x816a('0x2b')](_0x816a('0x2f'),_0x2323fd));};AGIChannel['prototype'][_0x816a('0x30')]=function(_0x417ae9,_0x561ade){if(_[_0x816a('0x31')](_0x561ade)){return this[_0x816a('0x25')](util[_0x816a('0x2b')](_0x816a('0x32'),_0x417ae9,_0x561ade[_0x816a('0x33')](',')));}return this[_0x816a('0x25')](util[_0x816a('0x2b')](_0x816a('0x32'),_0x417ae9,_0x561ade));};AGIChannel[_0x816a('0x24')][_0x816a('0x34')]=function(_0x15b5a2){return this[_0x816a('0x25')](util[_0x816a('0x2b')](_0x816a('0x35'),_0x15b5a2));};AGIChannel[_0x816a('0x24')][_0x816a('0x36')]=function(_0x21815f){return this['sendRequest'](util[_0x816a('0x2b')](_0x816a('0x37'),_0x21815f));};AGIChannel[_0x816a('0x24')]['setPriority']=function(_0x406488){return this[_0x816a('0x25')](util[_0x816a('0x2b')]('SET\x20PRIORITY\x20%s',_0x406488));};AGIChannel[_0x816a('0x24')]['hangup']=function(){return this[_0x816a('0x25')](_0x816a('0x38'));};AGIChannel[_0x816a('0x24')]['setVariable']=function(_0x4c1fbb,_0x4cbda1){var _0x4286e2=_['isBoolean'](_0x4cbda1)||_['isNumber'](_0x4cbda1)?_0x4cbda1['toString']():_0x4cbda1;return this['sendRequest'](util[_0x816a('0x2b')]('SET\x20VARIABLE\x20%s\x20\x22%s\x22',_0x4c1fbb,_0x4286e2?_0x4286e2['toString']()[_0x816a('0x12')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x816a('0x24')][_0x816a('0x39')]=function(_0x365eba,_0x202b66){return this[_0x816a('0x25')](util['format'](_0x816a('0x3a'),_0x365eba,_0x202b66));};AGIChannel['prototype'][_0x816a('0x3b')]=function(_0x5dc1d8,_0x4f4dcd){return this[_0x816a('0x25')](util['format']('SAY\x20DIGITS\x20%s\x20%s',_0x5dc1d8,_0x4f4dcd));};AGIChannel[_0x816a('0x24')][_0x816a('0x3c')]=function(_0x5c60a9,_0x1bfd79){return this[_0x816a('0x25')](util[_0x816a('0x2b')](_0x816a('0x3d'),_0x5c60a9,_0x1bfd79));};AGIChannel[_0x816a('0x24')]['continueAt']=function(_0x4aafbb,_0x31d496,_0x538095){_0x31d496=_0x31d496||this['extension'];_0x538095=_0x538095||0x1;this[_0x816a('0x34')](_0x4aafbb);this[_0x816a('0x36')](_0x31d496);this['setPriority'](_0x538095);return this[_0x816a('0x2d')](util[_0x816a('0x2b')](_0x816a('0x3e'),_0x4aafbb,_0x31d496,_0x538095));};AGIChannel[_0x816a('0x24')][_0x816a('0x3f')]=function(_0x27877a){return this[_0x816a('0x25')](util[_0x816a('0x2b')](_0x816a('0x40'),_0x27877a));};AGIChannel[_0x816a('0x24')]['recordFile']=function(_0x57dc9e,_0x2caf1a,_0x30f18c,_0x5a05d0,_0x205312,_0x290c6e){_0x2caf1a=_0x2caf1a||_0x816a('0x41');_0x30f18c=_0x30f18c||'';_0x5a05d0=_0x5a05d0===undefined?-0x1:_0x5a05d0==='-1'?-0x1:_0x5a05d0*0x3e8;_0x205312=_0x205312===undefined?'':'s='+_0x205312;_0x290c6e=_0x290c6e?'BEEP':'';return this[_0x816a('0x25')](util[_0x816a('0x2b')]('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x57dc9e,_0x2caf1a,_0x30f18c,_0x5a05d0,_0x290c6e,_0x205312));};AGIChannel[_0x816a('0x24')][_0x816a('0x42')]=function(_0x444d12,_0xd54988){_0xd54988=_0xd54988||'';return this[_0x816a('0x25')](util[_0x816a('0x2b')]('STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22',_0x444d12,_0xd54988));};AGIChannel['prototype'][_0x816a('0x43')]=function(_0x227165){return this['exec'](_0x816a('0x44'),_0x227165);};AGIChannel[_0x816a('0x24')]['wait']=function(_0x100659){return this[_0x816a('0x30')]('WAIT',_0x100659);};AGIChannel['prototype'][_0x816a('0x18')]=function(_0x20880e,_0x5b8768){this[_0x816a('0x2d')](util[_0x816a('0x2b')]('ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s',_0x20880e['id'],_0x20880e[_0x816a('0x45')],_0x5b8768));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x816a('0x46')]=AGIChannel; \ No newline at end of file diff --git a/server/services/agi/error.js b/server/services/agi/error.js index a99745e..4d936b5 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 _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 +var _0xf156=['Server\x20error.\x20Code:\x20%s.','Server\x20closed.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','format','message','exports','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.'];(function(_0x1c6551,_0x3fbc2e){var _0x3f7434=function(_0x4af978){while(--_0x4af978){_0x1c6551['push'](_0x1c6551['shift']());}};_0x3f7434(++_0x3fbc2e);}(_0xf156,0x16a));var _0x6f15=function(_0x38bae9,_0x2bf395){_0x38bae9=_0x38bae9-0x0;var _0x489468=_0xf156[_0x38bae9];return _0x489468;};'use strict';var util=require('util');var error={'E_AGI_UNDEFINED':_0x6f15('0x0'),'E_AGI_ARGUMENT_PORT':_0x6f15('0x1'),'E_AGI_SERVER_ERROR':_0x6f15('0x2'),'E_AGI_SERVER_CLOSE':_0x6f15('0x3'),'E_AGI_SERVER_MAXCONNECTION':'[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','E_AGI_SERVER_VOICE_DISABLED':'[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','E_AGI_SOCKET_ERROR':_0x6f15('0x4'),'E_AGI_SOCKET_CLOSE':_0x6f15('0x5'),'E_AGI_SOCKET_TIMEOUT':_0x6f15('0x6'),'E_AGI_COMMAND_EMPTY':_0x6f15('0x7'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':_0x6f15('0x8')};function AGIError(_0x5b8021){var _0x5b8021=_0x5b8021||null,_0x46d283=_0x46d283||[],_0x324554=0x1,_0x59fe97='';if(!error[_0x5b8021]){_0x5b8021=_0x6f15('0x9');}_0x46d283[_0x6f15('0xa')](error[_0x5b8021]);while(arguments[_0x324554]){_0x46d283[_0x6f15('0xa')](arguments[_0x324554]);_0x324554++;}_0x59fe97=util[_0x6f15('0xb')]['apply'](util,_0x46d283);this[_0x6f15('0xc')]=_0x59fe97;this['name']=_0x5b8021;}module[_0x6f15('0xd')]=AGIError; \ No newline at end of file diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js index ff1cfe7..9d882d7 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 _0x8100=['max\x20retry\x20reach','condition\x20not\x20found','exports','../../../config/logger','agi','menu','getdigits','vertices','addVertex','edges','push','numberOfEdges','size','relations','prototype','getVertex','traverseBFS','info','no\x20vertex\x20found','stop\x20traverse','length','condition','split','agicommand','vswitch','target','default','default\x20on\x20switch\x20not\x20found','includes'];(function(_0x14405c,_0x12b9b9){var _0x5d54ba=function(_0x5eaba7){while(--_0x5eaba7){_0x14405c['push'](_0x14405c['shift']());}};_0x5d54ba(++_0x12b9b9);}(_0x8100,0x199));var _0x0810=function(_0x5cd43d,_0x16e830){_0x5cd43d=_0x5cd43d-0x0;var _0x2d1daf=_0x8100[_0x5cd43d];return _0x2d1daf;};'use strict';var _=require('lodash');var logger=require(_0x0810('0x0'))(_0x0810('0x1'));var verticesWithRetry=[_0x0810('0x2'),_0x0810('0x3'),'getsecretdigits'];var Graph=function(){this[_0x0810('0x4')]={};this['edges']={};this['numberOfEdges']=0x0;};Graph['prototype'][_0x0810('0x5')]=function(_0x43a68){this[_0x0810('0x4')][_0x43a68['id']]=_0x43a68;this[_0x0810('0x6')][_0x43a68['id']]=[];};Graph['prototype']['addEdge']=function(_0x11f7b9,_0x3f2a93,_0xadb85b){this['edges'][_0x11f7b9][_0x0810('0x7')]({'target':_0x3f2a93,'condition':_0xadb85b});this[_0x0810('0x8')]+=0x1;};Graph['prototype'][_0x0810('0x9')]=function(){return _['size'](this[_0x0810('0x4')]);};Graph['prototype'][_0x0810('0xa')]=function(){return this['numberOfEdges'];};Graph[_0x0810('0xb')][_0x0810('0xc')]=function(_0x36bfd5){return this['vertices'][_0x36bfd5];};Graph[_0x0810('0xb')][_0x0810('0xd')]=function(_0x4877c0,_0x4b296c){if(!this[_0x0810('0x4')][_0x4877c0]){return logger[_0x0810('0xe')](_0x0810('0xf'));}var _0x454789=_0x4b296c(this['vertices'][_0x4877c0]);if(!_0x454789){return logger[_0x0810('0xe')](_0x0810('0x10'));}if(this[_0x0810('0x6')][_0x4877c0][_0x0810('0x11')]===0x0){return logger[_0x0810('0xe')]('no\x20edge/s\x20available');}for(var _0x4ac4f4=0x0,_0x271e3b=[],_0x30cec0=![];_0x4ac4f4\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 +var _0x5d24=['[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','Project\x20%s\x20not\x20found','getLicense','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','./server','listening','lodash','syncho','util','moment','../../config/environment','agi','../../config/license/util','./mailRpc','./graph','./vertices','defaults','127.0.0.1','nextTick','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','info','port','name','message','error','format','[ERROR]\x20%s','stack','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','calleridname','dnid','uniqueid','callerid','evtHangup','toJson','mxGraphModel','root','agicommand','hasOwnProperty','maxRetry','retry','omit','isArray','length','target','addEdge','source','getSquareProject','then','createSquareReport','catch','indexOf','agi_','substring','inspect','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','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\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code','result','isUndefined','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','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s'];(function(_0x24fc6c,_0x186aef){var _0x2e4d2d=function(_0x4a702e){while(--_0x4a702e){_0x24fc6c['push'](_0x24fc6c['shift']());}};_0x2e4d2d(++_0x186aef);}(_0x5d24,0x11c));var _0x45d2=function(_0x3d43dd,_0x24c883){_0x3d43dd=_0x3d43dd-0x0;var _0x2c9dd7=_0x5d24[_0x3d43dd];return _0x2c9dd7;};'use strict';var parser=require('xml2json');var _=require(_0x45d2('0x0'));var syncho=require(_0x45d2('0x1'));var util=require(_0x45d2('0x2'));var moment=require(_0x45d2('0x3'));var config=require(_0x45d2('0x4'));var logger=require('../../config/logger')(_0x45d2('0x5'));var utilLicense=require(_0x45d2('0x6'));var rpc=require('./rpc');var mailRpc=require(_0x45d2('0x7'));var Graph=require(_0x45d2('0x8'));var Vertices=require(_0x45d2('0x9'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;config[_0x45d2('0x5')]=_[_0x45d2('0xa')](config['agi'],{'ip':_0x45d2('0xb'),'port':0x11dd});function connectionHandler(_0x22ad9e){process[_0x45d2('0xc')](function(){syncho(function(){try{setChannelVariables(_0x22ad9e);agiHandler(_0x22ad9e);}catch(_0x39a296){logger['error'](_0x39a296['stack']);}});});}function listeningHandler(){console[_0x45d2('0xd')](_0x45d2('0xe'),config[_0x45d2('0x5')]['port']);logger[_0x45d2('0xf')](util['format']('[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d',config[_0x45d2('0x5')]['ip'],config[_0x45d2('0x5')][_0x45d2('0x10')]));}function errorHandler(_0x2ab831){if(_0x2ab831&&_0x2ab831[_0x45d2('0x11')]&&_0x2ab831[_0x45d2('0x12')]){logger[_0x45d2('0x13')](util[_0x45d2('0x14')]('[%s]\x20%s',_0x2ab831[_0x45d2('0x11')],_0x2ab831[_0x45d2('0x12')]));}else{logger[_0x45d2('0x13')](util[_0x45d2('0x14')](_0x45d2('0x15'),_0x2ab831[_0x45d2('0x16')]));}}function closeHandler(){logger[_0x45d2('0xf')](util[_0x45d2('0x14')](_0x45d2('0x17'),this[_0x45d2('0x18')],this[_0x45d2('0x19')],this['callerid'],this[_0x45d2('0x1a')],this[_0x45d2('0x1b')]));try{createSquareReport(this);}catch(_0x49a161){logger[_0x45d2('0x13')](_0x49a161[_0x45d2('0x16')]);}}function timeoutHandler(){logger[_0x45d2('0xf')](util['format']('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x45d2('0x18')],this[_0x45d2('0x19')],this[_0x45d2('0x1c')],this[_0x45d2('0x1a')],this['uniqueid']));}function hangupHandler(){logger['info'](util[_0x45d2('0x14')]('[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x45d2('0x18')],this['calleridname'],this[_0x45d2('0x1c')],this[_0x45d2('0x1a')],this[_0x45d2('0x1b')]));this[_0x45d2('0x1d')]=!![];}function getRoot(_0x245bc7){return parser[_0x45d2('0x1e')](_0x245bc7,{'object':!![]})[_0x45d2('0x1f')][_0x45d2('0x20')];}function addVertex(_0x1ca2bb,_0x57600b,_0x461ee6){_0x57600b[_0x45d2('0x21')]=_0x461ee6;if(_0x57600b[_0x45d2('0x22')]('retry')){_0x57600b[_0x45d2('0x23')]=parseInt(_0x57600b[_0x45d2('0x24')],0xa);}_0x1ca2bb['addVertex'](_[_0x45d2('0x25')](_0x57600b,'mxCell'));}function initGraph(_0x447512,_0x1f80d0){var _0x260a74=new Graph();for(var _0x5acc51 in _0x447512){if(_0x447512['hasOwnProperty'](_0x5acc51)){if(_[_0x45d2('0x26')](_0x447512[_0x5acc51])){for(var _0x215afa=0x0;_0x215afa<_0x447512[_0x5acc51][_0x45d2('0x27')];_0x215afa+=0x1){addVertex(_0x260a74,_0x447512[_0x5acc51][_0x215afa],_0x5acc51);}}else{addVertex(_0x260a74,_0x447512[_0x5acc51],_0x5acc51);}}}for(var _0x380470=0x0;_0x380470<_0x1f80d0[_0x45d2('0x27')];_0x380470+=0x1){if(_0x1f80d0[_0x380470]['source']&&_0x1f80d0[_0x380470][_0x45d2('0x28')]){_0x260a74[_0x45d2('0x29')](_0x1f80d0[_0x380470][_0x45d2('0x2a')],_0x1f80d0[_0x380470][_0x45d2('0x28')],_0x1f80d0[_0x380470]['value']);}}return _0x260a74;}function getSquareProject(_0x381d43,_0x2cd6cf){rpc[_0x45d2('0x2b')](_0x381d43)[_0x45d2('0x2c')](function(_0x3f2a90){_0x2cd6cf(null,_0x3f2a90);})['catch'](function(_0x4df1c3){_0x2cd6cf(null,_0x4df1c3);});}function createSquareReport(_0x369af1,_0x221fe4){rpc[_0x45d2('0x2d')](_0x369af1)[_0x45d2('0x2c')](function(_0x3ed8ad){if(_0x221fe4){_0x221fe4(null,_0x3ed8ad);}})[_0x45d2('0x2e')](function(_0x473f31){if(_0x221fe4){_0x221fe4(null,_0x473f31);}});}function setChannelVariables(_0x43a555){for(var _0x113593 in _0x43a555){if(_0x43a555[_0x45d2('0x22')](_0x113593)){if(_0x113593[_0x45d2('0x2f')](_0x45d2('0x30'))===0x0){_0x43a555[_0x113593[_0x45d2('0x31')](0x4)]=_0x43a555[_0x113593];delete _0x43a555[_0x113593];}}}}function getLogFromObject(_0x243c82){return util[_0x45d2('0x32')](_0x243c82,{'showHidden':![],'depth':null});}function agiHandler(_0x2c1899){var _0x1fccc0,_0x5273c6,_0x3d20b4,_0x42ef3d,_0x5bb53c;logger[_0x45d2('0x33')](_0x45d2('0x34'),JSON[_0x45d2('0x35')](_0x2c1899,null,0x2));logger[_0x45d2('0xf')](util['format'](_0x45d2('0x36'),_0x2c1899[_0x45d2('0x18')],_0x2c1899[_0x45d2('0x19')],_0x2c1899[_0x45d2('0x1c')],_0x2c1899[_0x45d2('0x1a')],_0x2c1899[_0x45d2('0x1b')]));_0x2c1899['on'](_0x45d2('0x13'),errorHandler);_0x2c1899['on'](_0x45d2('0x37'),closeHandler);_0x2c1899['on']('timeout',timeoutHandler);_0x2c1899['evtHangup']=![];_0x2c1899['on'](_0x45d2('0x38'),hangupHandler);var _0x5d5ff9=getSquareProject[_0x45d2('0x39')](null,_0x2c1899[_0x45d2('0x18')]);if(_0x5d5ff9){if(_0x5d5ff9[_0x45d2('0x3a')]){_0x1fccc0=getRoot(_0x5d5ff9[_0x45d2('0x3a')]);if(_0x1fccc0&&_0x1fccc0[_0x45d2('0x3b')]){logger[_0x45d2('0x33')](_0x45d2('0x20'),JSON['stringify'](_0x1fccc0,null,0x2));_0x2c1899[_0x45d2('0x3c')]=moment()[_0x45d2('0x14')](_0x45d2('0x3d'));_0x5273c6=initGraph(_['omit'](_0x1fccc0,_0x45d2('0x3e')),_0x1fccc0[_0x45d2('0x3e')]);_0x3d20b4=new Vertices(_0x2c1899,rpc,mailRpc);logger[_0x45d2('0xf')](util[_0x45d2('0x14')](_0x45d2('0x3f'),_0x2c1899[_0x45d2('0x18')],_0x2c1899['calleridname'],_0x2c1899[_0x45d2('0x1c')],_0x2c1899['dnid'],_0x2c1899[_0x45d2('0x1b')]));_0x5273c6[_0x45d2('0x40')](_0x1fccc0[_0x45d2('0x3b')]['id'],function(_0x323b6c){try{_0x323b6c=_0x3d20b4[_0x45d2('0x41')](_0x323b6c);logger[_0x45d2('0x33')]('vertex',JSON[_0x45d2('0x35')](_0x323b6c,null,0x2));if(_0x323b6c[_0x45d2('0x21')]==='gotoc'){logger[_0x45d2('0xf')](_0x45d2('0x42'));_0x2c1899[_0x45d2('0x43')]=_0x323b6c['context']||_0x2c1899[_0x45d2('0x43')];_0x2c1899[_0x45d2('0x44')]=_0x323b6c[_0x45d2('0x44')];_0x2c1899[_0x45d2('0x45')]=_0x323b6c['priority']?_0x323b6c['priority']-0x1:0x1;return null;}else if(_0x323b6c&&_0x3d20b4[_0x323b6c['agicommand']]){_0x5bb53c=_0x3d20b4[_0x323b6c[_0x45d2('0x21')]](_0x323b6c);logger[_0x45d2('0xf')](_0x45d2('0x46'),JSON[_0x45d2('0x35')](_0x5bb53c,null,0x2));if(_0x5bb53c&&_0x5bb53c[_0x45d2('0x47')]===AGI_CODE_SUCCESS&&_0x5bb53c[_0x45d2('0x48')]!==AGI_RESULT_ERROR&&!_0x2c1899[_0x45d2('0x1d')]){logger[_0x45d2('0x33')](_0x45d2('0x46'),getLogFromObject(_0x5bb53c));return _[_0x45d2('0x49')](_0x5bb53c[_0x45d2('0x48')])?null:_0x5bb53c['result'][_0x45d2('0x4a')]();}else{logger[_0x45d2('0x13')]('response',getLogFromObject(_0x5bb53c));return null;}}else{logger[_0x45d2('0x13')]('agicommand\x20not\x20found');return null;}}catch(_0x43c01a){logger[_0x45d2('0x13')](_0x43c01a[_0x45d2('0x16')]);return null;}});if(_0x1fccc0[_0x45d2('0x4b')]){logger[_0x45d2('0xf')](util[_0x45d2('0x14')](_0x45d2('0x4c'),_0x2c1899[_0x45d2('0x18')],_0x2c1899[_0x45d2('0x19')],_0x2c1899[_0x45d2('0x1c')],_0x2c1899[_0x45d2('0x1a')],_0x2c1899[_0x45d2('0x1b')]));_0x5273c6[_0x45d2('0x40')](_0x1fccc0['finally']['id'],function(_0x516105){try{_0x516105=_0x3d20b4[_0x45d2('0x41')](_0x516105);logger['debug'](_0x45d2('0x4d'),JSON[_0x45d2('0x35')](_0x516105,null,0x2));if(_0x516105&&_0x3d20b4[_0x516105['agicommand']]){_0x5bb53c=_0x3d20b4[_0x516105[_0x45d2('0x21')]](_0x516105);if(_0x5bb53c){logger['debug'](_0x45d2('0x46'),getLogFromObject(_0x5bb53c));return _['isUndefined'](_0x5bb53c['result'])?null:_0x5bb53c[_0x45d2('0x48')][_0x45d2('0x4a')]();}else{logger[_0x45d2('0x13')](_0x45d2('0x46'),getLogFromObject(_0x5bb53c));return null;}}else{logger[_0x45d2('0x13')](_0x45d2('0x4e'));return null;}}catch(_0x1d7dd7){logger[_0x45d2('0x13')](_0x1d7dd7[_0x45d2('0x16')]);return null;}});}logger[_0x45d2('0xf')](util['format'](_0x45d2('0x4f'),_0x2c1899[_0x45d2('0x18')],_0x2c1899[_0x45d2('0x19')],_0x2c1899[_0x45d2('0x1c')],_0x2c1899[_0x45d2('0x1a')],_0x2c1899[_0x45d2('0x1b')]));logger[_0x45d2('0xf')](util[_0x45d2('0x14')](_0x45d2('0x50'),_0x2c1899[_0x45d2('0x43')],_0x2c1899[_0x45d2('0x44')],parseInt(_0x2c1899['priority'],0xa)+0x1));_0x2c1899[_0x45d2('0x51')](_0x2c1899[_0x45d2('0x43')],_0x2c1899[_0x45d2('0x44')],parseInt(_0x2c1899['priority'],0xa)+0x1);_0x2c1899[_0x45d2('0x37')]();}}else{logger[_0x45d2('0x13')](util['format']('Project\x20%s\x20not\x20published',_0x2c1899[_0x45d2('0x18')]));_0x2c1899[_0x45d2('0x51')](_0x2c1899[_0x45d2('0x43')],_0x2c1899['extension'],parseInt(_0x2c1899[_0x45d2('0x45')],0xa)+0x1);_0x2c1899[_0x45d2('0x37')]();}}else{logger['error'](util['format'](_0x45d2('0x52'),_0x2c1899[_0x45d2('0x18')]));_0x2c1899['continueAt'](_0x2c1899['context'],_0x2c1899[_0x45d2('0x44')],parseInt(_0x2c1899[_0x45d2('0x45')],0xa)+0x1);_0x2c1899[_0x45d2('0x37')]();}}function main(){var _0x485a02;return utilLicense[_0x45d2('0x53')]()['then'](function(_0x3f1159){if(_0x3f1159){if(_0x3f1159['voice']){if(_0x3f1159[_0x45d2('0x54')]&&_0x3f1159[_0x45d2('0x54')]>0x0){logger[_0x45d2('0xf')](util[_0x45d2('0x14')](_0x45d2('0x55'),_0x3f1159[_0x45d2('0x54')]));_0x485a02=_0x3f1159[_0x45d2('0x54')];}else{logger[_0x45d2('0xf')](_0x45d2('0x56'));}}else{logger['info'](_0x45d2('0x57'));_0x485a02=-0x1;}}})[_0x45d2('0x2e')](function(_0x54f3ce){logger[_0x45d2('0x13')](_0x45d2('0x58'),_0x54f3ce[_0x45d2('0x16')]);})[_0x45d2('0x4b')](function(){var _0xa4c04d=require(_0x45d2('0x59'))(config['agi'][_0x45d2('0x10')],config[_0x45d2('0x5')]['ip'],_0x485a02);_0xa4c04d['on'](_0x45d2('0x13'),errorHandler);_0xa4c04d['on'](_0x45d2('0x5a'),listeningHandler);_0xa4c04d['on']('connection',connectionHandler);_0xa4c04d['on']('close',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 b0932d5..c70075e 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 _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 +var _0x8ca4=['catch','sendMailMessage','SendMail','jayson/promise','client','http','then','error','message','result'];(function(_0x24b8de,_0x2c8730){var _0x463e6e=function(_0x46cbf4){while(--_0x46cbf4){_0x24b8de['push'](_0x24b8de['shift']());}};_0x463e6e(++_0x2c8730);}(_0x8ca4,0x193));var _0x48ca=function(_0x596684,_0x3e7a0a){_0x596684=_0x596684-0x0;var _0x21d272=_0x8ca4[_0x596684];return _0x21d272;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x48ca('0x0'));var client=jayson[_0x48ca('0x1')][_0x48ca('0x2')]({'port':0x232b});function request(_0x43264a,_0x522e66){return new BPromise(function(_0x417249,_0x1c2ae){return client['request'](_0x43264a,_0x522e66)[_0x48ca('0x3')](function(_0x33c411){if(_0x33c411['error']){return _0x1c2ae(_0x33c411[_0x48ca('0x4')][_0x48ca('0x5')]);}else{return _0x417249(_0x33c411[_0x48ca('0x6')]);}})[_0x48ca('0x7')](function(_0x3f4f74){return _0x1c2ae(_0x3f4f74);});});}exports[_0x48ca('0x8')]=function(_0x378241,_0x29b2ef){return request(_0x48ca('0x9'),{'account':_0x378241,'message':_0x29b2ef});}; \ No newline at end of file diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js index 419597f..4477b43 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 _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 +var _0xac0b=['inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','_inBody','indexOf','substring','length','split','slice','trim','emit','headers','line','exports','util','stream','Transform','_localBuffer'];(function(_0x6a0266,_0x1552d6){var _0x309e00=function(_0x17c1d1){while(--_0x17c1d1){_0x6a0266['push'](_0x6a0266['shift']());}};_0x309e00(++_0x1552d6);}(_0xac0b,0x164));var _0xbac0=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xac0b[_0x59ee6f];return _0x4c0979;};'use strict';var util=require(_0xbac0('0x0'));var Transform=require(_0xbac0('0x1'))[_0xbac0('0x2')];function AGIReply(_0x4f66d2){Transform['call'](this,_0x4f66d2);this[_0xbac0('0x3')]='';this['_inBody']=![];}util[_0xbac0('0x4')](AGIReply,Transform);AGIReply[_0xbac0('0x5')][_0xbac0('0x6')]=function(_0x514b99,_0x514d38,_0x4ada50){var _0x3f73f9='\x0a',_0x3dbf70=['\x0a\x0a',_0xbac0('0x7')],_0x2f1d61=-0x1,_0x3592de=-0x1,_0x25167c='',_0x268346=0x0,_0x145c62='',_0x44c204='';this[_0xbac0('0x3')]+=_0x514b99[_0xbac0('0x8')]();_0x145c62=this['_localBuffer'];if(!this[_0xbac0('0x9')]){_0x268346=0x0;while(_0x3dbf70[_0x268346]){while((_0x3592de=_0x145c62[_0xbac0('0xa')](_0x3dbf70[_0x268346]))!=-0x1){_0x25167c=_0x3dbf70[_0x268346];_0x44c204=_0x145c62[_0xbac0('0xb')](0x0,_0x3592de);_0x145c62=_0x145c62[_0xbac0('0xb')](_0x3592de+_0x25167c[_0xbac0('0xc')]);var _0x19de30=_0x44c204[_0xbac0('0xd')](_0x3f73f9),_0x3a1466=0x0,_0xd0133={},_0x36bfc6='',_0x261c57='',_0x47958e=-0x1;while(_0x19de30[_0x3a1466]){_0x47958e=_0x19de30[_0x3a1466][_0xbac0('0xa')](':');if(_0x47958e!=-0x1){_0x36bfc6=_0x19de30[_0x3a1466][_0xbac0('0xe')](0x0,_0x47958e)[_0xbac0('0xf')]();_0x261c57=_0x19de30[_0x3a1466]['slice'](_0x47958e+0x1)[_0xbac0('0xf')]();if(_0x36bfc6[_0xbac0('0xc')]>0x0){_0xd0133[_0x36bfc6]=_0x261c57;}}else{}_0x3a1466++;}this[_0xbac0('0x10')](_0xbac0('0x11'),_0xd0133);this['_inBody']=!![];}_0x268346++;}this[_0xbac0('0x3')]=_0x145c62;}else{while((_0x2f1d61=_0x145c62[_0xbac0('0xa')](_0x3f73f9))!=-0x1){_0x44c204=_0x145c62[_0xbac0('0xb')](0x0,_0x2f1d61);this[_0xbac0('0x10')](_0xbac0('0x12'),_0x44c204);_0x145c62=_0x145c62[_0xbac0('0xb')](_0x2f1d61+_0x3f73f9[_0xbac0('0xc')]);}this[_0xbac0('0x3')]=_0x145c62;}_0x4ada50();};module[_0xbac0('0x13')]=AGIReply; \ No newline at end of file diff --git a/server/services/agi/rpc/index.js b/server/services/agi/rpc/index.js index 2cca91e..6720c71 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 _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 +var _0x7c21=['jayson/promise','client','http','request','then','error','message','result','getSquareProject','ShowSquareProject','production','getMailAccountById','Smtp','name','email','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','getTrunkById','ShowTrunk','getSoundById','save_name','ShowInterval','Interval','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','CreateSquareDetailsReport','CreateSquareReport','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage','CreateSquareMessage','ShowCmHopper','phone','ListId','getPauseById','agentLogin','LoginUser','PauseUser','UnpauseUser','LogoutUser','bluebird','moment','util'];(function(_0x240d59,_0x367f3a){var _0x42a01d=function(_0x33a130){while(--_0x33a130){_0x240d59['push'](_0x240d59['shift']());}};_0x42a01d(++_0x367f3a);}(_0x7c21,0xd5));var _0x17c2=function(_0x2a81b3,_0x537eaf){_0x2a81b3=_0x2a81b3-0x0;var _0x2939ce=_0x7c21[_0x2a81b3];return _0x2939ce;};'use strict';var BPromise=require(_0x17c2('0x0'));var moment=require(_0x17c2('0x1'));var _=require('lodash');var util=require(_0x17c2('0x2'));var jayson=require(_0x17c2('0x3'));var client=jayson[_0x17c2('0x4')][_0x17c2('0x5')]({'port':0x2329});function request(_0x12f348,_0x4185a0){return new BPromise(function(_0x4e748c,_0x1aa6ac){return client[_0x17c2('0x6')](_0x12f348,_0x4185a0)[_0x17c2('0x7')](function(_0x38f666){if(_0x38f666[_0x17c2('0x8')]){return _0x1aa6ac(_0x38f666[_0x17c2('0x8')][_0x17c2('0x9')]);}else{return _0x4e748c(_0x38f666[_0x17c2('0xa')]);}})['catch'](function(_0x5b785d){return _0x1aa6ac(_0x5b785d);});});}exports[_0x17c2('0xb')]=function(_0x598416){return request(_0x17c2('0xc'),{'options':{'raw':![],'where':{'name':_0x598416},'attributes':[_0x17c2('0xd')]}});};exports[_0x17c2('0xe')]=function(_0x3fd8eb){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x3fd8eb},'include':[{'model':'MailServerOut','as':_0x17c2('0xf')}],'attributes':['id',_0x17c2('0x10'),_0x17c2('0x11')]}});};exports['getSquareProjectById']=function(_0x7e4645){return request(_0x17c2('0xc'),{'options':{'where':{'id':_0x7e4645},'attributes':['name']}});};exports[_0x17c2('0x12')]=function(_0x56b60c){return request(_0x17c2('0x13'),{'options':{'where':{'id':_0x56b60c},'attributes':[_0x17c2('0x10')]}});};exports[_0x17c2('0x14')]=function(_0x400684){return request(_0x17c2('0x15'),{'options':{'where':{'id':_0x400684},'attributes':[_0x17c2('0x10')]}});};exports[_0x17c2('0x16')]=function(_0x4a22e8){return request(_0x17c2('0x17'),{'options':{'where':{'id':_0x4a22e8},'attributes':[_0x17c2('0x18')]}});};exports[_0x17c2('0x19')]=function(_0x588222){return request('ShowUser',{'options':{'where':{'id':_0x588222},'attributes':['name']}});};exports[_0x17c2('0x1a')]=function(_0x47b2a6){return request(_0x17c2('0x1b'),{'options':{'where':{'id':_0x47b2a6},'attributes':[_0x17c2('0x10')]}});};exports[_0x17c2('0x1c')]=function(_0x3361d2){return request('ShowSound',{'options':{'where':{'id':_0x3361d2},'attributes':[_0x17c2('0x1d')]}});};exports['getIntervalById']=function(_0x4888c2){return request(_0x17c2('0x1e'),{'options':{'raw':![],'where':{'id':_0x4888c2},'include':[{'model':_0x17c2('0x1f'),'as':'Intervals'}]}});};exports[_0x17c2('0x20')]=function(_0x462086){return request(_0x17c2('0x21'),{'options':{'where':{'id':_0x462086},'attributes':['id',_0x17c2('0x10')]}});};exports[_0x17c2('0x22')]=function(_0x3f6738){return request(_0x17c2('0x23'),{'body':_0x3f6738});};exports['createSquareDetailsReport']=function(_0x55b8e2){return request(_0x17c2('0x24'),{'body':_0x55b8e2});};exports['createSquareReport']=function(_0x13a92b){return request(_0x17c2('0x25'),{'body':_['merge'](_0x13a92b,{'project_name':_0x13a92b[_0x17c2('0x26')],'prev_project_name':_0x13a92b[_0x17c2('0x27')]||'','is_subproject':_0x13a92b[_0x17c2('0x27')]?!![]:![],'leaveAt':moment()[_0x17c2('0x28')](_0x17c2('0x29'))})});};exports[_0x17c2('0x2a')]=function(_0x29d509){return request('CreateSquareRecording',{'body':_0x29d509});};exports[_0x17c2('0x2b')]=function(_0x15d5d2){return request(_0x17c2('0x2c'),{'body':_0x15d5d2});};exports['createCmContact']=function(_0x3b5d58){return request(_0x17c2('0x2d'),{'options':{'raw':![],'where':{'phone':_0x3b5d58[_0x17c2('0x2e')],'ListId':_0x3b5d58[_0x17c2('0x2f')]}}})[_0x17c2('0x7')](function(_0xf223ca){if(_0xf223ca){return _0xf223ca;}return request('CreateCmContact',{'body':_0x3b5d58});});};exports[_0x17c2('0x30')]=function(_0x279822){return request('ShowPause',{'options':{'where':{'id':_0x279822},'attributes':[_0x17c2('0x10')]}});};exports[_0x17c2('0x31')]=function(_0x9b4afb,_0x12b2fd){return request(_0x17c2('0x32'),{'body':{'interface':_0x12b2fd},'options':{'where':_0x9b4afb}});};exports['agentPause']=function(_0x3002ba,_0x4c8470,_0x1c6399){return request(_0x17c2('0x33'),{'body':{'type':_0x4c8470,'uniqueid':_0x1c6399},'options':{'where':_0x3002ba}});};exports['agentUnpause']=function(_0x4ea99f){return request(_0x17c2('0x34'),{'body':{},'options':{'where':_0x4ea99f}});};exports['agentLogout']=function(_0xc8bf67){return request(_0x17c2('0x35'),{'body':{},'options':{'where':_0xc8bf67}});}; \ 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 6c49ad5..77f4bbb 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 _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 +var _0xc5c8=['exports','./polly','./lex'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xc5c8,0x118));var _0x8c5c=function(_0x39fc74,_0x32d3e6){_0x39fc74=_0x39fc74-0x0;var _0x16baa8=_0xc5c8[_0x39fc74];return _0x16baa8;};var polly=require(_0x8c5c('0x0'));var lex=require(_0x8c5c('0x1'));module[_0x8c5c('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 c7682a8..abf03f1 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(_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 +var _0xb7e7=['./lib/api'];(function(_0x457d42,_0x122187){var _0x51b2ab=function(_0x89a26b){while(--_0x89a26b){_0x457d42['push'](_0x457d42['shift']());}};_0x51b2ab(++_0x122187);}(_0xb7e7,0x121));var _0x7b7e=function(_0x16d10f,_0x2ba2d5){_0x16d10f=_0x16d10f-0x0;var _0x50c823=_0xb7e7[_0x16d10f];return _0x50c823;};'use strict';var lex=require(_0x7b7e('0x0'));module['exports']=function(_0x40e269,_0x518dc6,_0x1b7cc7,_0x54a37f,_0x3f5804,_0x556d68){return lex(_0x40e269,_0x518dc6,_0x1b7cc7,_0x54a37f,_0x3f5804,_0x556d68);}; \ 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 2b2f451..7f7acc5 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(_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 +var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x5be426,_0x1c2ae6){var _0x7c9223=function(_0x378084){while(--_0x378084){_0x5be426['push'](_0x5be426['shift']());}};_0x7c9223(++_0x1c2ae6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bc30,_0x177cb0){_0x34bc30=_0x34bc30-0x0;var _0x5706de=_0xa9e0[_0x34bc30];return _0x5706de;};'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 e5e45a3..da4b41e 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 _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 +var _0xf23c=['./lib/api'];(function(_0x279fbb,_0x428b07){var _0x5c0261=function(_0x2d0347){while(--_0x2d0347){_0x279fbb['push'](_0x279fbb['shift']());}};_0x5c0261(++_0x428b07);}(_0xf23c,0x8f));var _0xcf23=function(_0x46d0c9,_0x526bfa){_0x46d0c9=_0x46d0c9-0x0;var _0x174506=_0xf23c[_0x46d0c9];return _0x174506;};'use strict';var polly=require(_0xcf23('0x0'));module['exports']=function(_0x250825,_0x3a9be1,_0x572050,_0x15a13f,_0x2c3846,_0x389cda,_0x395305){return polly(_0x250825,_0x3a9be1,_0x572050,_0x15a13f,_0x2c3846,_0x389cda,_0x395305);}; \ 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 7a3f355..ad32675 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 _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 +var _0xadd2=['mp3','path','bluebird','randomstring','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','Polly','text'];(function(_0x25704a,_0x5c88f6){var _0x3de67e=function(_0x19fb76){while(--_0x19fb76){_0x25704a['push'](_0x25704a['shift']());}};_0x3de67e(++_0x5c88f6);}(_0xadd2,0x10b));var _0x2add=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xadd2[_0x59ee6f];return _0x4c0979;};'use strict';var fs=require('fs');var path=require(_0x2add('0x0'));var BPromise=require(_0x2add('0x1'));var rs=require(_0x2add('0x2'));var AWS=require('aws-sdk');function pollyResult(_0x5d180a,_0x5756a5,_0x31cfd2){return new BPromise(function(_0x5aff1b,_0x7cd198){_0x5d180a['synthesizeSpeech'](_0x5756a5,function(_0x2d84b4,_0x2c2be1){if(_0x2d84b4){_0x7cd198(_0x2d84b4);}else if(_0x2c2be1){if(_0x2c2be1['AudioStream']instanceof Buffer){fs['writeFile'](_0x31cfd2,_0x2c2be1['AudioStream'],function(_0x23ccb5){if(_0x23ccb5){_0x7cd198(_0x23ccb5);}else{_0x5aff1b();}});}else{_0x7cd198(new Error(_0x2add('0x3')));}}else{_0x7cd198(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module['exports']=function(_0x3965af,_0x3cdef4,_0x26d207,_0x268342,_0x575ab9,_0x40558d,_0x419ac2){var _0x4b4ea6=new AWS[(_0x2add('0x4'))]({'accessKeyId':_0x3965af,'secretAccessKey':_0x3cdef4,'region':_0x26d207});var _0x4a01fb={'Text':_0x575ab9,'TextType':_0x40558d||_0x2add('0x5'),'OutputFormat':_0x2add('0x6'),'VoiceId':_0x268342};return pollyResult(_0x4b4ea6,_0x4a01fb,_0x419ac2);}; \ 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 87cf9cc..272360f 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 _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 +var _0x3b9a=['exports','./lib/api'];(function(_0x26791c,_0xca4d29){var _0x28399d=function(_0x2cd27a){while(--_0x2cd27a){_0x26791c['push'](_0x26791c['shift']());}};_0x28399d(++_0xca4d29);}(_0x3b9a,0x1c9));var _0xa3b9=function(_0x3458fd,_0x5b61c0){_0x3458fd=_0x3458fd-0x0;var _0x293f47=_0x3b9a[_0x3458fd];return _0x293f47;};'use strict';var asr=require(_0xa3b9('0x0'));module[_0xa3b9('0x1')]=function(_0x11ea80,_0x12dca3,_0x507065,_0x18d81c){return asr(_0x11ea80,_0x12dca3,_0x507065);}; \ 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 3d41f8c..c8e8aaf 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 _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 +var _0x4fdb=['toString','base64','POST','/v1/speech:recognize?key=','LINEAR16','8000','url','bluebird','https://speech.googleapis.com','exports','string','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','readFileSync'];(function(_0x1185af,_0xbb95e9){var _0x51067d=function(_0x26aa55){while(--_0x26aa55){_0x1185af['push'](_0x1185af['shift']());}};_0x51067d(++_0xbb95e9);}(_0x4fdb,0x9c));var _0xb4fd=function(_0x4ceec9,_0x16057d){_0x4ceec9=_0x4ceec9-0x0;var _0x4e2033=_0x4fdb[_0x4ceec9];return _0x4e2033;};'use strict';var url=require(_0xb4fd('0x0'));var BPromise=require(_0xb4fd('0x1'));var fs=require('fs');var host=_0xb4fd('0x2');module[_0xb4fd('0x3')]=function(_0x3b399e,_0xafe34b,_0x260a35){return new BPromise(function(_0xd55d8e,_0x1c0b08){var _0x5b73bb;if(typeof _0x3b399e!==_0xb4fd('0x4')||_0x3b399e['length']===0x0){return _0x1c0b08(_0xb4fd('0x5'));}if(typeof _0xafe34b!=='string'||_0xafe34b['length']===0x0){return _0x1c0b08(_0xb4fd('0x6'));}if(typeof _0x260a35!==_0xb4fd('0x7')&&(typeof _0x260a35!==_0xb4fd('0x4')||_0x260a35['length']===0x0)){return _0x1c0b08('lang\x20should\x20be\x20a\x20string');}try{_0x5b73bb=fs[_0xb4fd('0x8')](_0x3b399e)[_0xb4fd('0x9')](_0xb4fd('0xa'));}catch(_0x4eb1ae){return _0x1c0b08(_0x4eb1ae);}return _0xd55d8e({'method':_0xb4fd('0xb'),'uri':host+_0xb4fd('0xc')+_0xafe34b,'body':{'config':{'encoding':_0xb4fd('0xd'),'sampleRateHertz':_0xb4fd('0xe'),'languageCode':_0x260a35},'audio':{'content':_0x5b73bb}},'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 9073398..28572f8 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 _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 +var _0xd816=['exports','./asr'];(function(_0xd2d58e,_0x338298){var _0xb37ed4=function(_0x3ada62){while(--_0x3ada62){_0xd2d58e['push'](_0xd2d58e['shift']());}};_0xb37ed4(++_0x338298);}(_0xd816,0x85));var _0x6d81=function(_0x4040ce,_0x97f835){_0x4040ce=_0x4040ce-0x0;var _0x47a416=_0xd816[_0x4040ce];return _0x47a416;};var asr=require(_0x6d81('0x0'));module[_0x6d81('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 db6eee9..10c6132 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 _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 +var _0x29e9=['catch','[%s]\x20%s:%s','name','message','googleDialogflow','result','source','resolvedQuery','action','actionIncomplete','fulfillment','speech','score','status','code','endConversation','isFallbackIntent','googleDialogflowV2','replace','SessionsClient','sessionPath','queryResult','diagnosticInfo','fields','end_conversation','boolValue','fulfillmentText','intent','displayName','isFallback','languageCode','queryText','tildeASR','Tilde\x20ASR\x20confidence','awsPolly','polly','awsLex','lex','ispeechTTS','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','format','model=%s','freeform=3','sestekNDA','nda','text','channelData','CustomAction','CustomActionData','audiofile','dirName','apiai-promise','bluebird','http','https','md5','path','querystring','request-promise','randomstring','google-tts-api','parse','util','./aws','./google','./sestek','./tilde','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','WHAT_EVER','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','createWriteStream','finish','info','finish\x20download\x20file','unlink','download\x20error','pipe','end','https:','host','statusMessage','data','transcode','wav','error\x20convert','start','resolve','tmp','generate','writeFileSync','base64','then','777','split','readFileSync','https://texttospeech.googleapis.com/v1/','ssml','voice','audioConfig','MP3','text:synthesize','POST','from','writeFile','chmodSync','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','f.req=','stringify','jQ1olc','slice','parse\x20response\x20failed:\x0a','length','text\x20length\x20limit\x20reached','lang\x20\x22','.mp3','.wav','googleASR','asr','results','alternatives','transcript','join','confidence','googleASR\x20transcription'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x29e9,0x142));var _0x929e=function(_0x53b023,_0x3ce254){_0x53b023=_0x53b023-0x0;var _0x2d92d1=_0x29e9[_0x53b023];return _0x2d92d1;};'use strict';var apiai=require(_0x929e('0x0'));var BPromise=require(_0x929e('0x1'));var dialogflow=require('dialogflow');var fs=require('fs');var http=require(_0x929e('0x2'));var https=require(_0x929e('0x3'));var md5=require(_0x929e('0x4'));var path=require(_0x929e('0x5'));var querystring=require(_0x929e('0x6'));var rp=require(_0x929e('0x7'));var rs=require(_0x929e('0x8'));var sox=require('sox');var tts=require(_0x929e('0x9'));var urlParse=require('url')[_0x929e('0xa')];var util=require(_0x929e('0xb'));var aws=require(_0x929e('0xc'));var google=require(_0x929e('0xd'));var sestek=require(_0x929e('0xe'));var tilde=require(_0x929e('0xf'));var logger=require(_0x929e('0x10'))(_0x929e('0x11'));var ISPEECH_API=_0x929e('0x12');function downloadFile(_0x3df240,_0x1a7141){return new BPromise(function(_0x199efc,_0x468230){var _0x188dd6=urlParse(_0x3df240);var _0x3fe6c2=_0x188dd6[_0x929e('0x13')]==='https:'?https:http;var _0x2bed2b={'host':_0x188dd6['host'],'path':_0x188dd6[_0x929e('0x5')],'headers':{'user-agent':_0x929e('0x14')}};_0x3fe6c2[_0x929e('0x15')](_0x2bed2b,function(_0xc70d60){if(_0xc70d60[_0x929e('0x16')]!==0xc8){logger[_0x929e('0x17')](_0x929e('0x18')+_0x3df240+'\x20failed,\x20status\x20code\x20=\x20'+_0xc70d60[_0x929e('0x16')]+'\x20('+_0xc70d60['statusMessage']+')');_0x468230(new Error(_0x929e('0x18')+_0x3df240+_0x929e('0x19')+_0xc70d60[_0x929e('0x16')]+'\x20('+_0xc70d60['statusMessage']+')'));return;}var _0x436535=fs[_0x929e('0x1a')](_0x1a7141);_0x436535['on'](_0x929e('0x1b'),function(){logger[_0x929e('0x1c')](_0x929e('0x1d'));_0x436535['close'](_0x199efc);});_0x436535['on'](_0x929e('0x17'),function(_0x50815d){fs[_0x929e('0x1e')](_0x1a7141);logger[_0x929e('0x17')](_0x929e('0x1f'),_0x50815d);_0x468230(_0x50815d);});_0xc70d60[_0x929e('0x20')](_0x436535);})['on'](_0x929e('0x17'),function(_0x619149){logger[_0x929e('0x17')](_0x619149);_0x468230(_0x619149);})[_0x929e('0x21')]();});}function uploadFile(_0x13dc6c){return new BPromise(function(_0x2c77a0,_0x536962){var _0x4cd1b2=urlParse(_0x13dc6c);var _0x2e0eb5=_0x4cd1b2['protocol']===_0x929e('0x22')?https:http;var _0x5ba49e={'host':_0x4cd1b2[_0x929e('0x23')],'path':_0x4cd1b2[_0x929e('0x5')],'headers':{'user-agent':_0x929e('0x14')}};_0x2e0eb5[_0x929e('0x15')](_0x5ba49e,function(_0x59b649){if(_0x59b649[_0x929e('0x16')]!==0xc8){_0x536962(new Error(_0x929e('0x18')+_0x13dc6c+'\x20failed,\x20status\x20code\x20=\x20'+_0x59b649['statusCode']+'\x20('+_0x59b649[_0x929e('0x24')]+')'));return;}var _0x238f25='';_0x59b649['on'](_0x929e('0x25'),function(_0x1365e3){_0x238f25+=_0x1365e3;});_0x59b649['on']('end',function(){_0x2c77a0(_0x238f25);});})['on'](_0x929e('0x17'),function(_0x52e7e8){_0x536962(_0x52e7e8);})[_0x929e('0x21')]();});}function convertFile(_0x275bd7,_0x482795){return new BPromise(function(_0x4f3b44,_0x11f3e7){var _0x390f25=sox[_0x929e('0x26')](_0x275bd7,_0x482795,{'sampleRate':0x1f40,'format':_0x929e('0x27'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x390f25['on']('error',function(_0x5ba09e){logger['error'](_0x929e('0x28'),_0x5ba09e);_0x11f3e7(_0x5ba09e);});_0x390f25['on']('end',function(){logger[_0x929e('0x1c')]('finish\x20to\x20convert');_0x4f3b44();});_0x390f25[_0x929e('0x29')]();});}function base64Decode(_0x253869,_0x478ddc){var _0x1f322a=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+'.wav');fs[_0x929e('0x2d')](_0x1f322a,_0x253869,_0x929e('0x2e'));return convertFile(_0x1f322a,_0x478ddc)[_0x929e('0x2f')](function(){try{fs[_0x929e('0x1e')](_0x1f322a);fs['chmodSync'](_0x478ddc,_0x929e('0x30'));}catch(_0xb475cf){logger[_0x929e('0x17')](_0xb475cf);}return _0x478ddc[_0x929e('0x31')]('.')[0x0];});}function base64Encode(_0x4bbb93){var _0x8cdff7=fs[_0x929e('0x32')](_0x4bbb93);return new Buffer(_0x8cdff7)['toString'](_0x929e('0x2e'));}exports['googleCloudTTS']=function(_0x503ddc,_0x16ab4f,_0x1d9bff,_0x32542c,_0x486c18,_0x15b68a){var _0x3ebb16,_0x1ce234;var _0x538854=_0x929e('0x33');var _0x47b0ec='?key='+_0x503ddc;var _0x290c59={};if(_0x16ab4f===_0x929e('0x34')){_0x290c59['input']={'ssml':_0x1d9bff};}else{_0x290c59['input']={'text':_0x1d9bff};};_0x290c59[_0x929e('0x35')]={'languageCode':_0x32542c,'ssmlGender':_0x486c18};_0x290c59[_0x929e('0x36')]={'audioEncoding':_0x929e('0x37'),'sampleRateHertz':0x1f40};var _0x27da54={'url':_0x538854+_0x929e('0x38')+_0x47b0ec,'method':_0x929e('0x39'),'json':!![],'body':_0x290c59};return rp(_0x27da54)[_0x929e('0x2f')](function(_0x2b7947){return new BPromise(function(_0x1ea2eb,_0x248bf7){_0x3ebb16=path['resolve'](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+'.mp3');var _0x101ffa=Buffer[_0x929e('0x3a')](_0x2b7947['audioContent'],_0x929e('0x2e'));return fs[_0x929e('0x3b')](_0x3ebb16,_0x101ffa,function(_0x4908df){_0x248bf7(_0x4908df);},function(_0x5dfc29){fs[_0x929e('0x3c')](_0x3ebb16,'777');_0x1ea2eb(_0x5dfc29);});});})[_0x929e('0x2f')](function(_0x3a8c1a){_0x1ce234=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs['generate'](0x4)+'.wav');return convertFile(_0x3ebb16,_0x1ce234);})['then'](function(){try{fs[_0x929e('0x1e')](_0x3ebb16);fs[_0x929e('0x3c')](_0x1ce234,_0x929e('0x30'));}catch(_0x409e8e){logger['error'](_0x409e8e);}logger[_0x929e('0x1c')](_0x929e('0x3d'),_0x1ce234[_0x929e('0x31')]('.')[0x0]);return _0x1ce234['split']('.')[0x0];});};exports[_0x929e('0x3e')]=function(_0x51464a,_0x65812){var _0x35f27c=_0x929e('0x3f');var _0x3a6c23,_0x37219b;var _0x543e8a;var _0x228118={'encoding':_0x929e('0x40'),'method':_0x929e('0x39'),'timeout':0x2710,'url':_0x35f27c,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0x929e('0x41')+encodeURIComponent(JSON[_0x929e('0x42')]([[[_0x929e('0x43'),JSON[_0x929e('0x42')]([_0x51464a,_0x65812||'en',![],'null']),null,'generic']]]))};return rp(_0x228118)[_0x929e('0x2f')](function(_0x1c003c){try{_0x543e8a=eval(_0x1c003c[_0x929e('0x44')](0x5))[0x0][0x2];}catch(_0x48de97){throw new Error(_0x929e('0x45')+_0x1c003c[_0x929e('0x25')]);}if(!_0x543e8a){if(_0x51464a[_0x929e('0x46')]>0xc8){throw new Error(_0x929e('0x47'));}else{throw new Error(_0x929e('0x48')+_0x65812+'\x22\x20might\x20not\x20exist');}}try{_0x543e8a=eval(_0x543e8a)[0x0];}catch(_0x3359b2){throw new Error('parse\x20response\x20failed:\x0a'+res[_0x929e('0x25')]);}const _0x25be39=_0x543e8a;_0x3a6c23=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+_0x929e('0x49'));fs[_0x929e('0x2d')](_0x3a6c23,_0x543e8a,{'encoding':_0x929e('0x2e')});_0x37219b=path['resolve'](__dirname,_0x929e('0x2b'),rs['generate'](0x4)+_0x929e('0x4a'));return convertFile(_0x3a6c23,_0x37219b);})[_0x929e('0x2f')](function(){try{fs['unlink'](_0x3a6c23);fs[_0x929e('0x3c')](_0x37219b,_0x929e('0x30'));}catch(_0x17f473){logger[_0x929e('0x17')](_0x17f473);}logger[_0x929e('0x1c')]('goggleTTS\x20path',_0x37219b[_0x929e('0x31')]('.')[0x0]);return _0x37219b['split']('.')[0x0];});};exports[_0x929e('0x4b')]=function(_0x69d80d,_0x166857,_0x2ac596){return google[_0x929e('0x4c')](_0x69d80d,_0x166857,_0x2ac596)[_0x929e('0x2f')](function(_0x29653a){logger['info'](_0x29653a['uri']);return rp(_0x29653a);})[_0x929e('0x2f')](function(_0x19a337){var _0x32d833='';var _0x5770ff=0x0;try{fs[_0x929e('0x1e')](_0x69d80d);}catch(_0xdaaf18){logger[_0x929e('0x17')](_0xdaaf18);}if(_0x19a337&&_0x19a337[_0x929e('0x4d')]){_0x32d833=_0x19a337[_0x929e('0x4d')]['map'](function(_0x2a4274){return _0x2a4274&&_0x2a4274[_0x929e('0x4e')][0x0]&&_0x2a4274[_0x929e('0x4e')][0x0][_0x929e('0x4f')]?_0x2a4274[_0x929e('0x4e')][0x0][_0x929e('0x4f')]:'';})[_0x929e('0x50')]('\x0a');_0x5770ff=_0x19a337[_0x929e('0x4d')]['map'](function(_0x2f6b1d){return _0x2f6b1d&&_0x2f6b1d[_0x929e('0x4e')][0x0]&&_0x2f6b1d[_0x929e('0x4e')][0x0][_0x929e('0x51')]?_0x2f6b1d[_0x929e('0x4e')][0x0]['confidence']:0x0;})['join']('\x0a');}logger[_0x929e('0x1c')](_0x929e('0x52'),_0x32d833);logger[_0x929e('0x1c')]('googleASR\x20confidence',_0x5770ff);return{'transcript':_0x32d833,'confidence':_0x5770ff};})[_0x929e('0x53')](function(_0x11d27b){logger[_0x929e('0x17')](_0x929e('0x54'),_0x11d27b[_0x929e('0x16')],_0x11d27b[_0x929e('0x55')],_0x11d27b[_0x929e('0x56')]);});};exports[_0x929e('0x57')]=function(_0x3eb501,_0x278628,_0x5cebdd,_0x54101f){var _0x4754eb=apiai(_0x278628,{'language':_0x54101f||'en'});return _0x4754eb['textRequest'](_0x5cebdd,{'sessionId':md5(_0x3eb501)})[_0x929e('0x2f')](function(_0x4223aa){logger[_0x929e('0x1c')](JSON[_0x929e('0x42')](_0x4223aa));return{'source':_0x4223aa[_0x929e('0x58')][_0x929e('0x59')],'resolvedQuery':_0x4223aa['result'][_0x929e('0x5a')],'action':_0x4223aa[_0x929e('0x58')][_0x929e('0x5b')],'actionIncomplete':_0x4223aa[_0x929e('0x58')][_0x929e('0x5c')],'speech':_0x4223aa['result'][_0x929e('0x5d')][_0x929e('0x5e')],'score':_0x4223aa['result'][_0x929e('0x5f')],'statusCode':_0x4223aa[_0x929e('0x60')][_0x929e('0x61')],'endConversation':_0x4223aa[_0x929e('0x58')]['metadata'][_0x929e('0x62')]||![],'isFallbackIntent':_0x4223aa[_0x929e('0x58')]['metadata'][_0x929e('0x63')]};});};exports[_0x929e('0x64')]=function(_0x444285,_0x2f13fa,_0x42219b,_0x3d3b97,_0x3e5961,_0x3fdc81){var _0x1554a4=_0x3d3b97[_0x929e('0x65')](/\\n/g,'\x0a');var _0x561160={'credentials':{'private_key':_0x1554a4,'client_email':_0x42219b}};var _0x1968cc=new dialogflow[(_0x929e('0x66'))](_0x561160);var _0x12a1ab=_0x1968cc[_0x929e('0x67')](_0x2f13fa,md5(_0x444285));var _0x48fa37={'session':_0x12a1ab,'queryInput':{'text':{'text':_0x3e5961,'languageCode':_0x3fdc81}}};return _0x1968cc['detectIntent'](_0x48fa37)[_0x929e('0x2f')](function(_0xfa615){if(_0xfa615&&_0xfa615[_0x929e('0x46')]){logger[_0x929e('0x1c')]('Dialogflow\x20V2\x20response:',JSON[_0x929e('0x42')](_0xfa615));var _0x5acf18=_0xfa615[0x0];if(_0x5acf18){var _0x11dcdd={'action':_0x5acf18[_0x929e('0x68')][_0x929e('0x5b')],'allRequiredParamsPresent':_0x5acf18[_0x929e('0x68')]['allRequiredParamsPresent'],'endConversation':_0x5acf18['queryResult'][_0x929e('0x69')]&&_0x5acf18[_0x929e('0x68')][_0x929e('0x69')][_0x929e('0x6a')]?_0x5acf18[_0x929e('0x68')][_0x929e('0x69')]['fields'][_0x929e('0x6b')][_0x929e('0x6c')]:![],'fulfillmentText':_0x5acf18[_0x929e('0x68')][_0x929e('0x6d')],'intentName':_0x5acf18[_0x929e('0x68')][_0x929e('0x6e')][_0x929e('0x55')],'intentDisplayName':_0x5acf18[_0x929e('0x68')]['intent'][_0x929e('0x6f')],'isFallbackIntent':_0x5acf18[_0x929e('0x68')][_0x929e('0x6e')][_0x929e('0x70')],'languageCode':_0x5acf18['queryResult'][_0x929e('0x71')],'queryText':_0x5acf18[_0x929e('0x68')][_0x929e('0x72')],'responseId':_0x5acf18['responseId'],'score':_0x5acf18['queryResult']['intentDetectionConfidence'],'speech':_0x5acf18[_0x929e('0x68')][_0x929e('0x6d')],'providerResponse':JSON[_0x929e('0x42')](_0xfa615)};return _0x11dcdd;}}});};exports[_0x929e('0x73')]=function(_0x238502,_0x1a3041,_0x22d3b8,_0x14a3a8){return tilde[_0x929e('0x4c')](_0x238502,_0x1a3041,_0x22d3b8,_0x14a3a8)[_0x929e('0x2f')](function(_0x484bae){try{fs['unlink'](_0x238502);}catch(_0x407cee){logger[_0x929e('0x17')](_0x407cee);}logger[_0x929e('0x1c')]('Tilde\x20ASR\x20transcription',_0x484bae['transcript']);logger[_0x929e('0x1c')](_0x929e('0x74'),_0x484bae[_0x929e('0x51')]);return _0x484bae;});};exports[_0x929e('0x75')]=function(_0x1191a1,_0x2ce5c9,_0x5276d3,_0x2c0d71,_0x5ddefe,_0x48e48e){var _0xb3ffeb=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+'.mp3');var _0x1af7b4;return aws[_0x929e('0x76')](_0x1191a1,_0x2ce5c9,_0x5276d3,_0x2c0d71,_0x5ddefe,_0x48e48e,_0xb3ffeb)['then'](function(){_0x1af7b4=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+_0x929e('0x4a'));return convertFile(_0xb3ffeb,_0x1af7b4);})['then'](function(){try{fs[_0x929e('0x1e')](_0xb3ffeb);fs[_0x929e('0x3c')](_0x1af7b4,_0x929e('0x30'));}catch(_0x43cdbd){logger[_0x929e('0x17')](_0x43cdbd);}return _0x1af7b4[_0x929e('0x31')]('.')[0x0];});};exports[_0x929e('0x77')]=function(_0xe31ad3,_0x39e461,_0x513ec6,_0x580714,_0x57158c,_0x3c167e){return aws[_0x929e('0x78')](_0xe31ad3,_0x39e461,_0x513ec6,_0x580714,_0x57158c,_0x3c167e)[_0x929e('0x2f')](function(_0x1cda56){logger[_0x929e('0x1c')](JSON[_0x929e('0x42')](_0x1cda56));return _0x1cda56;});};exports[_0x929e('0x79')]=function(_0x372b29,_0x392178,_0x9eb7e9,_0x23c30f){var _0x339a19=util['format'](_0x929e('0x7a'),ISPEECH_API,_0x372b29,encodeURIComponent(_0x392178),_0x9eb7e9,_0x23c30f);var _0x18a7e0=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+_0x929e('0x49'));var _0x301c54;return downloadFile(_0x339a19,_0x18a7e0)[_0x929e('0x2f')](function(){_0x301c54=path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs[_0x929e('0x2c')](0x4)+_0x929e('0x4a'));return convertFile(_0x18a7e0,_0x301c54);})[_0x929e('0x2f')](function(){try{fs[_0x929e('0x1e')](_0x18a7e0);fs[_0x929e('0x3c')](_0x301c54,_0x929e('0x30'));}catch(_0x421a86){logger[_0x929e('0x17')](_0x421a86);}return _0x301c54[_0x929e('0x31')]('.')[0x0];});};exports[_0x929e('0x7b')]=function(_0x57d525,_0xb1c9f,_0x64406f,_0x459841){var _0x8dabdf=util[_0x929e('0x7c')]('%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s',ISPEECH_API,_0xb1c9f,_0x64406f,base64Encode(_0x57d525),_0x459841?util[_0x929e('0x7c')](_0x929e('0x7d'),encodeURIComponent(_0x459841)):_0x929e('0x7e'));return uploadFile(_0x8dabdf)[_0x929e('0x2f')](function(_0x3392f9){return querystring[_0x929e('0xa')](_0x3392f9);});};exports[_0x929e('0x7f')]=function(_0x59d958,_0x91ced2){return sestek[_0x929e('0x80')](_0x59d958,_0x91ced2)[_0x929e('0x2f')](function(_0xfce4da){logger['info'](JSON[_0x929e('0x42')](_0xfce4da));var _0x3a2b3c={'speech':_0xfce4da[_0x929e('0x81')],'action':_0xfce4da[_0x929e('0x82')]?_0xfce4da['channelData'][_0x929e('0x83')]:undefined,'actiondata':_0xfce4da[_0x929e('0x82')]?_0xfce4da['channelData'][_0x929e('0x84')]:undefined};if(_0xfce4da[_0x929e('0x82')]&&_0xfce4da[_0x929e('0x82')]['AudioFromTts']){return base64Decode(_0xfce4da[_0x929e('0x82')]['AudioFromTts']['Data'],path[_0x929e('0x2a')](__dirname,_0x929e('0x2b'),rs['generate'](0x4)+_0x929e('0x4a')))['then'](function(_0x2ad0fe){_0x3a2b3c[_0x929e('0x85')]=_0x2ad0fe;return _0x3a2b3c;});}return _0x3a2b3c;});};exports[_0x929e('0x86')]=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 4b6b57f..daeca0c 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 _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 +var _0x509d=['exports'];(function(_0x10c134,_0x285fd6){var _0x1c08cd=function(_0x4bbefb){while(--_0x4bbefb){_0x10c134['push'](_0x10c134['shift']());}};_0x1c08cd(++_0x285fd6);}(_0x509d,0x102));var _0xd509=function(_0x21b359,_0x4dc80e){_0x21b359=_0x21b359-0x0;var _0x57b8e7=_0x509d[_0x21b359];return _0x57b8e7;};var nda=require('./nda');module[_0xd509('0x0')]={'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 66e3e0c..d8e8201 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 _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 +var _0x8c99=['/token','username','password','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','callerid','calleridname','dnid','text','Bearer\x20','access_token','project','channelData','ProjectName','ndagenerate_audio','body','AudioOutputSettings','audio/wav','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','url','../../../../../config/logger','agi','exports','POST','resolve','ndauth_url'];(function(_0x254ada,_0x21ac89){var _0x17ad6e=function(_0x2ca1f9){while(--_0x2ca1f9){_0x254ada['push'](_0x254ada['shift']());}};_0x17ad6e(++_0x21ac89);}(_0x8c99,0x1a8));var _0x98c9=function(_0x4a7843,_0x24f6d1){_0x4a7843=_0x4a7843-0x0;var _0x2c57fe=_0x8c99[_0x4a7843];return _0x2c57fe;};'use strict';var rp=require(_0x98c9('0x0'));var url=require(_0x98c9('0x1'));var logger=require(_0x98c9('0x2'))(_0x98c9('0x3'));module[_0x98c9('0x4')]=function(_0x33c0b2,_0x3205a2){var _0x42a6d2={'method':_0x98c9('0x5'),'uri':url[_0x98c9('0x6')](_0x3205a2[_0x98c9('0x7')],_0x98c9('0x8')),'form':{'grant_type':'password','username':_0x3205a2[_0x98c9('0x9')],'password':_0x3205a2[_0x98c9('0xa')]},'json':!![]};return rp(_0x42a6d2)['then'](function(_0x4af8a6){var _0x5b983e={'method':_0x98c9('0x5'),'uri':url[_0x98c9('0x6')](_0x3205a2[_0x98c9('0xb')],_0x98c9('0xc')),'body':{'type':_0x3205a2[_0x98c9('0xd')]||_0x98c9('0xe'),'channelId':_0x98c9('0xf'),'conversation':{'id':_0x33c0b2[_0x98c9('0x10')]},'from':{'id':_0x33c0b2[_0x98c9('0x11')],'name':_0x33c0b2[_0x98c9('0x12')]},'recipient':{'id':_0x33c0b2[_0x98c9('0x13')],'name':_0x33c0b2['extension']},'text':_0x3205a2[_0x98c9('0x14')],'channelData':{}},'headers':{'Authorization':_0x98c9('0x15')+_0x4af8a6[_0x98c9('0x16')]},'json':!![]};if(_0x3205a2[_0x98c9('0x17')]){_0x5b983e['body'][_0x98c9('0x18')][_0x98c9('0x19')]=_0x3205a2[_0x98c9('0x17')];}if(_0x3205a2[_0x98c9('0x1a')]=='1'){_0x5b983e[_0x98c9('0x1b')]['channelData'][_0x98c9('0x1c')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x98c9('0x1d')};}if(_0x3205a2[_0x98c9('0x1e')]){_0x5b983e[_0x98c9('0x1b')][_0x98c9('0x18')][_0x98c9('0x1f')]=_0x3205a2[_0x98c9('0x1e')];if(_0x3205a2[_0x98c9('0x20')]){_0x5b983e[_0x98c9('0x1b')][_0x98c9('0x18')][_0x98c9('0x21')]=_0x3205a2[_0x98c9('0x20')];}}logger[_0x98c9('0x22')](JSON[_0x98c9('0x23')](_0x5b983e));return rp(_0x5b983e);});}; \ 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 ec09061..411a901 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 _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 +var _0xc82a=['./lib/api'];(function(_0x403c20,_0x4a7b99){var _0x2b271a=function(_0x106ecb){while(--_0x106ecb){_0x403c20['push'](_0x403c20['shift']());}};_0x2b271a(++_0x4a7b99);}(_0xc82a,0x86));var _0xac82=function(_0x193109,_0x50a9ca){_0x193109=_0x193109-0x0;var _0x4af109=_0xc82a[_0x193109];return _0x4af109;};'use strict';var asr=require(_0xac82('0x0'));module['exports']=function(_0xe426d4,_0x5767ce,_0x20680b,_0x5b4255){return asr(_0xe426d4,_0x5767ce,_0x20680b,_0x5b4255);}; \ 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 d3709fd..6de4034 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 _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 +var _0xcbbd=['Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','message','bluebird','lodash','moment','crypto','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','update','digest','hex','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','data','close','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','status','result','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket'];(function(_0x87007c,_0x565c0e){var _0x3a5533=function(_0x2e1b81){while(--_0x2e1b81){_0x87007c['push'](_0x87007c['shift']());}};_0x3a5533(++_0x565c0e);}(_0xcbbd,0x11d));var _0xdcbb=function(_0x22eb96,_0x3c2d8d){_0x22eb96=_0x22eb96-0x0;var _0x5e1adf=_0xcbbd[_0x22eb96];return _0x5e1adf;};'use strict';var BPromise=require(_0xdcbb('0x0'));var _=require(_0xdcbb('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0xdcbb('0x2'));var crypto=require(_0xdcbb('0x3'));var logger=require('../../../../../../config/logger')(_0xdcbb('0x4'));module[_0xdcbb('0x5')]=function(_0x36bbd7,_0x4ed3e9,_0x4239af,_0xa5c368){return new BPromise(function(_0x8f3fc8,_0x4040d3){logger[_0xdcbb('0x6')](_0xdcbb('0x7'),_0xa5c368||_0xdcbb('0x8'));var _0x4b503d=new WebSocket(_0xa5c368||_0xdcbb('0x8'),{'perMessageDeflate':![]});var _0x3aaac5='';var _0x4aaa59='0';var _0x4c9193='1';var _0x17ab95=_0xdcbb('0x9');function _0x44db73(_0x12f1f4){var _0x420a32=crypto['createHash']('sha1');_0x420a32[_0xdcbb('0xa')](_0x12f1f4);return _0x420a32[_0xdcbb('0xb')](_0xdcbb('0xc'));}function _0x3209ea(){try{logger[_0xdcbb('0x6')](_0xdcbb('0xd'));var _0xc2d4c1=moment()[_0xdcbb('0xe')]();var _0x526c82=_0x44db73(_0xc2d4c1+_0x4ed3e9+_0x4239af);_0x4b503d[_0xdcbb('0xf')](JSON[_0xdcbb('0x10')]({'appID':_0x4ed3e9,'timestamp':_0xc2d4c1,'appKey':_0x526c82}));var _0x141635=fs['createReadStream'](_0x36bbd7);_0x141635['on'](_0xdcbb('0x11'),function(_0x35093a){_0x4b503d[_0xdcbb('0xf')](_0x35093a);});_0x141635['on'](_0xdcbb('0x12'),function(){_0x4b503d[_0xdcbb('0xf')](_0xdcbb('0x13'));});}catch(_0x3b644f){logger[_0xdcbb('0x14')](_0xdcbb('0x15'),JSON[_0xdcbb('0x10')](_0x3b644f));_0x4b503d[_0xdcbb('0x16')]();}}function _0x89a227(_0x340d60){try{if(_0x340d60){var _0x232437=JSON['parse'](_0x340d60);switch(_0x232437[_0xdcbb('0x17')]){case 0x0:if(_0x232437[_0xdcbb('0x18')]){if(_0x232437[_0xdcbb('0x18')]['final']){logger['info'](_0xdcbb('0x19'),JSON[_0xdcbb('0x10')](_0x232437[_0xdcbb('0x18')]['hypotheses']));_0x3aaac5=_0x232437[_0xdcbb('0x18')][_0xdcbb('0x1a')][0x0][_0xdcbb('0x1b')];_0x4aaa59=_0x232437[_0xdcbb('0x18')]['hypotheses'][0x0][_0xdcbb('0x1c')];_0x4c9193='0';_0x17ab95=_0xdcbb('0x1d');_0x4b503d[_0xdcbb('0x16')]();}}break;case 0x1:logger[_0xdcbb('0x6')](_0xdcbb('0x9'));_0x4c9193='1';_0x17ab95=_0xdcbb('0x9');break;case 0x2:logger[_0xdcbb('0x6')]('Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.');_0x4c9193='2';_0x17ab95=_0xdcbb('0x1e');break;case 0x9:logger[_0xdcbb('0x6')](_0xdcbb('0x1f'));_0x4c9193='9';_0x17ab95='Not\x20available.\x20Max\x20load\x20limit\x20reached.';break;case 0xa:logger[_0xdcbb('0x6')](_0xdcbb('0x20'));_0x4c9193='10';_0x17ab95=_0xdcbb('0x20');break;case 0xb:logger[_0xdcbb('0x6')]('All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.');_0x4c9193='11';_0x17ab95='All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.';}}}catch(_0x456867){logger[_0xdcbb('0x14')](_0xdcbb('0x21'),JSON[_0xdcbb('0x10')](_0x456867));_0x4b503d['terminate']();}}function _0x2717c2(){logger['info'](_0xdcbb('0x22'));_0x8f3fc8({'transcript':_0x3aaac5,'confidence':_0x4aaa59,'status':_0x4c9193,'status_message':_0x17ab95});}function _0x4cc9c2(_0x48141c){logger[_0xdcbb('0x14')](_0xdcbb('0x23'));if(!_[_0xdcbb('0x24')](_0x48141c)){logger[_0xdcbb('0x14')](_[_0xdcbb('0x25')](_0x48141c)?JSON[_0xdcbb('0x10')](_0x48141c):_0x48141c);}}_0x4b503d['on'](_0xdcbb('0x26'),_0x3209ea);_0x4b503d['on'](_0xdcbb('0x27'),_0x89a227);_0x4b503d['on'](_0xdcbb('0x12'),_0x2717c2);_0x4b503d['on']('error',_0x4cc9c2);});}; \ 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 541738f..9a1b720 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 _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 +var _0xd4a7=['./asr','exports'];(function(_0x336df4,_0x52c1dc){var _0x580d8c=function(_0x2febf1){while(--_0x2febf1){_0x336df4['push'](_0x336df4['shift']());}};_0x580d8c(++_0x52c1dc);}(_0xd4a7,0xfc));var _0x7d4a=function(_0x2bcf0a,_0x19a745){_0x2bcf0a=_0x2bcf0a-0x0;var _0xf582c5=_0xd4a7[_0x2bcf0a];return _0xf582c5;};var asr=require(_0x7d4a('0x0'));module[_0x7d4a('0x1')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/server.js b/server/services/agi/server.js index f3bc7f5..146e704 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 _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 +var _0x9a14=['./channel','127.0.0.1','emit','E_AGI_ARGUMENT_PORT','createServer','listening','getConnections','error','E_AGI_SERVER_ERROR','E_AGI_SERVER_VOICE_DISABLED','destroy','E_AGI_SERVER_MAXCONNECTION','connection','close','E_AGI_SERVER_CLOSE','inherits','exports','net','events','EventEmitter'];(function(_0x143a96,_0x53b176){var _0x554f98=function(_0x4efa6f){while(--_0x4efa6f){_0x143a96['push'](_0x143a96['shift']());}};_0x554f98(++_0x53b176);}(_0x9a14,0x13d));var _0x49a1=function(_0x5afd11,_0x1cc25){_0x5afd11=_0x5afd11-0x0;var _0x360647=_0x9a14[_0x5afd11];return _0x360647;};'use strict';var util=require('util');var net=require(_0x49a1('0x0'));var EventEmitter=require(_0x49a1('0x1'))[_0x49a1('0x2')];var AGIError=require('./error');var AGIChannel=require(_0x49a1('0x3'));var AGIServer=function(_0x4b3887,_0x4b3508,_0x14396c){var _0x3a3312=this,_0x4b3887=_0x4b3887||0x11dd,_0x4b3508=_0x4b3508||_0x49a1('0x4'),_0x11430c=null,_0xe6a96f=0x0;EventEmitter['call'](_0x3a3312);function _0x1610b7(){if(!_0x4b3887){_0x3a3312[_0x49a1('0x5')]('error',new AGIError(_0x49a1('0x6')));return![];}_0x11430c=net[_0x49a1('0x7')]();_0x11430c['listen'](_0x4b3887,_0x4b3508);_0x11430c['on'](_0x49a1('0x8'),function(){_0x3a3312[_0x49a1('0x5')](_0x49a1('0x8'));});_0x11430c['on']('connection',function(_0x56402d){_0x11430c[_0x49a1('0x9')](function(_0x1397bd,_0x56753e){if(_0x1397bd){_0x3a3312[_0x49a1('0x5')](_0x49a1('0xa'),new AGIError(_0x49a1('0xb'),_0x1397bd));}else if(_0x14396c&&_0x14396c<0x0){_0x3a3312['emit']('error',new AGIError(_0x49a1('0xc')));_0x56402d[_0x49a1('0xd')]();}else if(_0x14396c&&_0x14396c>0x0&&_0x14396c<_0x56753e){_0xe6a96f+=0x1;_0x3a3312[_0x49a1('0x5')](_0x49a1('0xa'),new AGIError(_0x49a1('0xe'),_0xe6a96f));_0x56402d[_0x49a1('0xd')]();}else{var _0x26740e=new AGIChannel(_0x56402d);_0x26740e['on']('ready',function(){_0x3a3312[_0x49a1('0x5')](_0x49a1('0xf'),_0x26740e);});}});});_0x11430c['on'](_0x49a1('0xa'),function(_0x119ea0){_0x3a3312['emit'](_0x49a1('0xa'),new AGIError(_0x49a1('0xb'),_0x119ea0['code']));});_0x11430c['on'](_0x49a1('0x10'),function(){_0x3a3312['emit'](_0x49a1('0x10'),new AGIError(_0x49a1('0x11')));});}process['nextTick'](function(){_0x1610b7();});};util[_0x49a1('0x12')](AGIServer,EventEmitter);module[_0x49a1('0x13')]=function(_0x493a66,_0x35ec9c,_0xab7882){return new AGIServer(_0x493a66,_0x35ec9c,_0xab7882);}; \ No newline at end of file diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js index 8dfa1f1..486518c 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 _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 +var _0xbd22=['dial','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','getUser','no\x20user\x20found','DIAL','SIP/%s','Executed\x20command\x20%s','dialogflow','no\x20key\x20configured','bot','createSquareMessage','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','speech','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','no\x20private_key\x20configured','Trying\x20DialogflowV2:\x20%s','providerResponse','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','sesteknda','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','SIP/%s/%s','Enter\x20in\x20FINALLY\x20(%s)\x20block','finally','getdigits','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','response','mindigit','maxdigit','hiddendigitsnum','first','substr','goal','goalname','GOAL\x20%s','awspolly','[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','aws_bot_name','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','message','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','%s/recordings/%s','generate','intKey','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appsecret\x20configured','wav','beep','NOBEEP','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','recordFile','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','failure','operation','no\x20operation\x20configured','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','no\x20find\x20by\x20configured','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','opts','PLAYBACK','queue','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','XMCS-QUEUE','macro','gosub','position','QUEUE','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','digits','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','no\x20mail\x20account\x20configured','getMailAccount','account_id','Smtp','\x22%s\x22\x20<%s>','email','user','bcc','subject','service','host','port','secure','authentication','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','no\x20sms\x20account\x20configured','getSmsAccount','sms_account_id','debug','sendSMS\x20message','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Answer','subproject','project_id','no\x20subproject\x20selected','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','command','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','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','replaceAll','join','exports','path','util','lodash','shelljs','odbc','randomstring','moment','mustache','request-promise','../../config/logger','../../config/environment','./scripts','/var/opt/motion2/server/files','rawBody','getsecretdigits','channel','rpc','mailRpc','prototype','getVariable','getVariableById','then','getVoiceQueue','getVoiceQueueById','name','getSquareProject','getSquareProjectById','catch','getSquareOdbcById','getUserById','getTrunkById','getSound','getSoundById','save_name','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','map','Intervals','getSoundPath','format','%s/sounds/converted/%s','getQueryOdbc','open','error','ODBC\x20connection\x20successfully','query','info','Error\x20executing\x20query\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccountById','createSmsMessage','uniqueid','label','agicommand','createSquareRecording','callerid','calleridname','context','extension','priority','accountcode','dnid','arg_1','file','createCmContact','isEmpty','callback_','lastName','phone','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','toString','getPause','getPauseById','agentPause','agent','isNil','agentUnpause','agentLogout','agentLogin','%s/%s@from-sip/n','LOCAL','shellCommand','exec','trim','replace','apiKey','text','ssmlGender','MALE','MP3','googleTTS','google_tts_language','restAPI','url','method','number','timeout','includes','PUT','toUpperCase','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','rawHeaders','computedVariables','render','headers','body','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','client_email','dialogflowV2_language','sestekNDA','ispeechTTS','ispeech_tts_language','en-US','speed','ispeechASR','key','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','Amy','aws_text_type','awsLex','aws_lex_region','googleASR','tildeASR','appid','appsecret','uri','clear','clone','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','saveRestApiResult','isPlainObject','%s.%s','isArray','length','setVariable','split','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','createSquareDetailsReport','sync','retry','mrcpsynth','noop','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','MRCP_RECOG_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','agi','Enter\x20in\x20AGI\x20(%s)\x20block','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','delay','minutes','callback_priority','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','no\x20text\x20configured','lumenvoxasr','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_TRANSCRIPT','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','getSquareOdbc','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','%s_ROWS_COUNT','variable\x20%s\x20set'];(function(_0x7b8a87,_0x2f2523){var _0x2131a1=function(_0x856847){while(--_0x856847){_0x7b8a87['push'](_0x7b8a87['shift']());}};_0x2131a1(++_0x2f2523);}(_0xbd22,0xf7));var _0x2bd2=function(_0x5b7fb4,_0x438535){_0x5b7fb4=_0x5b7fb4-0x0;var _0x196108=_0xbd22[_0x5b7fb4];return _0x196108;};'use strict';var fs=require('fs');var path=require(_0x2bd2('0x0'));var util=require(_0x2bd2('0x1'));var _=require(_0x2bd2('0x2'));var sh=require(_0x2bd2('0x3'));var odbc=require(_0x2bd2('0x4'))();var rs=require(_0x2bd2('0x5'));var moment=require(_0x2bd2('0x6'));var Mustache=require(_0x2bd2('0x7'));var rp=require(_0x2bd2('0x8'));var logger=require(_0x2bd2('0x9'))('agi');var config=require(_0x2bd2('0xa'));var scripts=require(_0x2bd2('0xb'));var FILES_PATH=_0x2bd2('0xc');var recursiveMapAttributes=['rawHeaders',_0x2bd2('0xd')];var verticesWithRetry=['menu','getdigits',_0x2bd2('0xe')];var AGIVertices=function(_0x1fb5aa,_0x4a162c,_0x3ecec3){this[_0x2bd2('0xf')]=_0x1fb5aa;this[_0x2bd2('0x10')]=_0x4a162c;this[_0x2bd2('0x11')]=_0x3ecec3;};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x13')]=function(_0x4dc33b,_0x13ad08){this['rpc'][_0x2bd2('0x14')](_0x4dc33b)[_0x2bd2('0x15')](function(_0x53c9b8){_0x13ad08(null,_0x53c9b8?_0x53c9b8['name']:![]);})['catch'](function(_0x2e22b5){_0x13ad08(_0x2e22b5);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x16')]=function(_0x357651,_0x312f1a){this[_0x2bd2('0x10')][_0x2bd2('0x17')](_0x357651)[_0x2bd2('0x15')](function(_0x460805){_0x312f1a(null,_0x460805?_0x460805[_0x2bd2('0x18')]:![]);})['catch'](function(_0x21e7c4){_0x312f1a(_0x21e7c4);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x19')]=function(_0x33b5cf,_0x5003a8){this[_0x2bd2('0x10')][_0x2bd2('0x1a')](_0x33b5cf)['then'](function(_0x53cf90){_0x5003a8(null,_0x53cf90?_0x53cf90[_0x2bd2('0x18')]:![]);})[_0x2bd2('0x1b')](function(_0xac4c3a){_0x5003a8(_0xac4c3a);});};AGIVertices[_0x2bd2('0x12')]['getSquareOdbc']=function(_0x362691,_0x1885be){this[_0x2bd2('0x10')][_0x2bd2('0x1c')](_0x362691)[_0x2bd2('0x15')](function(_0x5dfbe5){_0x1885be(null,_0x5dfbe5?_0x5dfbe5['dsn']:![]);})[_0x2bd2('0x1b')](function(_0x59c7dd){_0x1885be(_0x59c7dd);});};AGIVertices['prototype']['getUser']=function(_0x305bb2,_0x19ecea){this[_0x2bd2('0x10')][_0x2bd2('0x1d')](_0x305bb2)[_0x2bd2('0x15')](function(_0x3f9b8e){_0x19ecea(null,_0x3f9b8e?_0x3f9b8e[_0x2bd2('0x18')]:![]);})[_0x2bd2('0x1b')](function(_0x4cb80f){_0x19ecea(_0x4cb80f);});};AGIVertices[_0x2bd2('0x12')]['getTrunk']=function(_0x1c3d70,_0x2f3e5d){this[_0x2bd2('0x10')][_0x2bd2('0x1e')](_0x1c3d70)[_0x2bd2('0x15')](function(_0x48338f){_0x2f3e5d(null,_0x48338f?_0x48338f[_0x2bd2('0x18')]:![]);})[_0x2bd2('0x1b')](function(_0x314b96){_0x2f3e5d(_0x314b96);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1f')]=function(_0x1b5cfc,_0xb7f501){var _0x17934d=this;this['rpc'][_0x2bd2('0x20')](_0x1b5cfc)['then'](function(_0x4b534b){_0xb7f501(null,_0x4b534b?_0x17934d['getSoundPath'](_0x4b534b[_0x2bd2('0x21')]):![]);})[_0x2bd2('0x1b')](function(_0x297ba8){_0xb7f501(_0x297ba8);});};AGIVertices[_0x2bd2('0x12')]['getMailAccount']=function(_0x137f93,_0xd2ed4a){this[_0x2bd2('0x10')][_0x2bd2('0x22')](_0x137f93)['then'](function(_0x492ef1){_0xd2ed4a(null,_0x492ef1?_0x492ef1:![]);})[_0x2bd2('0x1b')](function(_0x417eeb){_0xd2ed4a(_0x417eeb);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x23')]=function(_0x404c42,_0x1e0a6f,_0x3bb8f3){this['mailRpc'][_0x2bd2('0x23')](_0x404c42,_0x1e0a6f)[_0x2bd2('0x15')](function(){_0x3bb8f3(null);})['catch'](function(_0x25654b){_0x3bb8f3(_0x25654b);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x24')]=function(_0x15ce91,_0x10b672){this['rpc'][_0x2bd2('0x25')](_0x15ce91)[_0x2bd2('0x15')](function(_0x24edbb){if(_0x24edbb){if(_0x24edbb[_0x2bd2('0x26')]){_0x10b672(null,[_0x24edbb[_0x2bd2('0x27')]]);}else{_0x10b672(null,_[_0x2bd2('0x28')](_0x24edbb[_0x2bd2('0x29')],_0x2bd2('0x27')));}}else{_0x10b672(null,![]);}})[_0x2bd2('0x1b')](function(_0x5ecb8d){_0x10b672(_0x5ecb8d);});};AGIVertices['prototype'][_0x2bd2('0x2a')]=function(_0x3f7f18){return util[_0x2bd2('0x2b')](_0x2bd2('0x2c'),FILES_PATH,_0x3f7f18);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x2d')]=function(_0x6cebca,_0x160243,_0x3f4633){odbc[_0x2bd2('0x2e')](_0x6cebca,function(_0x124a90){if(_0x124a90){logger[_0x2bd2('0x2f')]('Error\x20getting\x20ODBC\x20connection\x20%s',_0x124a90);_0x3f4633(_0x124a90);}else{logger['info'](_0x2bd2('0x30'));odbc[_0x2bd2('0x31')](_0x160243,function(_0x4f29b2,_0x415e23){if(_0x4f29b2){logger[_0x2bd2('0x32')](_0x2bd2('0x33'),_0x160243);_0x3f4633(_0x4f29b2);}else{logger[_0x2bd2('0x32')]('Query\x20executed\x20correctly\x20%s',_0x160243);odbc[_0x2bd2('0x34')](function(_0x57920e){if(_0x57920e){logger[_0x2bd2('0x2f')](_0x2bd2('0x35'),_0x57920e);}_0x3f4633(null,_0x415e23);});}});}});};AGIVertices['prototype']['getSmsAccount']=function(_0x35c6a1,_0x2f7109){this['rpc'][_0x2bd2('0x36')](_0x35c6a1)['then'](function(_0x364458){_0x2f7109(null,_0x364458?_0x364458:![]);})[_0x2bd2('0x1b')](function(_0x1dd672){_0x2f7109(_0x1dd672);});};AGIVertices[_0x2bd2('0x12')]['createSmsMessage']=function(_0x9429db,_0x48928e){this[_0x2bd2('0x10')][_0x2bd2('0x37')](_0x9429db)[_0x2bd2('0x15')](function(_0x47edb8){_0x48928e(null,_0x47edb8);})['catch'](function(_0x5e7922){_0x48928e(_0x5e7922);});};AGIVertices[_0x2bd2('0x12')]['createSquareDetailsReport']=function(_0x3de07c,_0x3fbcd5,_0x7fc088){this[_0x2bd2('0x10')]['createSquareDetailsReport']({'uniqueid':this['channel'][_0x2bd2('0x38')],'node':_0x3de07c[_0x2bd2('0x39')],'application':_0x3de07c[_0x2bd2('0x3a')],'data':_0x3fbcd5||null,'project_name':this['channel']['arg_1'],'callerid':this['channel']['callerid']})['then'](function(_0x12040c){if(_0x7fc088){_0x7fc088(null,_0x12040c);}})[_0x2bd2('0x1b')](function(_0xebdb73){if(_0x7fc088){_0x7fc088(_0xebdb73);}});};AGIVertices[_0x2bd2('0x12')]['createSquareRecording']=function(_0xd4bc26,_0x109e2c,_0x2c8347,_0x4ea16d){this['rpc'][_0x2bd2('0x3b')]({'uniqueid':this[_0x2bd2('0xf')][_0x2bd2('0x38')],'callerid':this[_0x2bd2('0xf')][_0x2bd2('0x3c')],'calleridname':this[_0x2bd2('0xf')][_0x2bd2('0x3d')],'context':this['channel'][_0x2bd2('0x3e')],'extension':this[_0x2bd2('0xf')][_0x2bd2('0x3f')],'priority':this[_0x2bd2('0xf')][_0x2bd2('0x40')],'accountcode':this['channel'][_0x2bd2('0x41')],'dnid':this[_0x2bd2('0xf')][_0x2bd2('0x42')],'projectName':this['channel'][_0x2bd2('0x43')],'saveName':_0x109e2c,'filename':_0xd4bc26[_0x2bd2('0x44')]||_0x109e2c,'savePath':_0x2c8347})[_0x2bd2('0x15')](function(_0xa97127){_0x4ea16d(null,_0xa97127);})[_0x2bd2('0x1b')](function(_0x1784ac){_0x4ea16d(_0x1784ac);});};AGIVertices[_0x2bd2('0x12')]['createSquareMessage']=function(_0x19e198,_0x49a511,_0x12a928,_0x20b80e,_0x41a842){this['rpc']['createSquareMessage']({'uniqueid':this['channel'][_0x2bd2('0x38')],'body':_0x19e198,'direction':_0x49a511,'providerName':_0x12a928,'providerResponse':_0x20b80e})[_0x2bd2('0x15')](function(_0x2d02bb){if(_0x41a842){_0x41a842(null,_0x2d02bb);}})['catch'](function(_0x5bd83a){if(_0x41a842){_0x41a842(_0x5bd83a);}});};AGIVertices[_0x2bd2('0x12')]['createCmContact']=function(_0x437c2b,_0x15d590){this['rpc'][_0x2bd2('0x45')]({'firstName':_[_0x2bd2('0x46')](_0x437c2b[_0x2bd2('0x18')])||_['isNil'](_0x437c2b[_0x2bd2('0x18')])?_0x2bd2('0x47')+Math['random']():_0x437c2b['name'],'lastName':_[_0x2bd2('0x46')](_0x437c2b['lastName'])||_['isNil'](_0x437c2b[_0x2bd2('0x48')])?null:_0x437c2b['lastName'],'phone':_0x437c2b[_0x2bd2('0x49')],'ListId':_0x437c2b[_0x2bd2('0x4a')],'scheduledat':_0x437c2b[_0x2bd2('0x4b')],'callbackUniqueid':this['channel']['uniqueid'],'tags':_0x2bd2('0x4c'),'description':_0x2bd2('0x4d')+_0x437c2b['scheduledAt'][_0x2bd2('0x4e')](),'priority':_0x437c2b['callback_priority']})['then'](function(_0x5a258f){_0x15d590(null,_0x5a258f);})['catch'](function(_0x47d7cf){_0x15d590(_0x47d7cf);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x4f')]=function(_0x1533b0,_0x3c5be9){this[_0x2bd2('0x10')][_0x2bd2('0x50')](_0x1533b0)[_0x2bd2('0x15')](function(_0x4fe318){_0x3c5be9(null,_0x4fe318?_0x4fe318['name']:![]);})['catch'](function(_0x99228f){_0x3c5be9(_0x99228f);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x51')]=function(_0xed79c6,_0x253bed,_0x199f39){var _0x12e9cf={'role':_0x2bd2('0x52')};_0x12e9cf[_0xed79c6]=this[_0x2bd2('0xf')][_0x2bd2('0x3c')];this['rpc'][_0x2bd2('0x51')](_0x12e9cf,_0x253bed,this[_0x2bd2('0xf')][_0x2bd2('0x38')])[_0x2bd2('0x15')](function(_0x3a589d){_0x199f39(null,_[_0x2bd2('0x53')](_0x3a589d)?![]:!![]);})[_0x2bd2('0x1b')](function(_0x214e32){logger['error'](_0x214e32);_0x199f39(null,![]);});};AGIVertices['prototype'][_0x2bd2('0x54')]=function(_0x2f6200,_0x436129){var _0x1fc2eb={'role':_0x2bd2('0x52')};_0x1fc2eb[_0x2f6200]=this[_0x2bd2('0xf')][_0x2bd2('0x3c')];this[_0x2bd2('0x10')]['agentUnpause'](_0x1fc2eb)[_0x2bd2('0x15')](function(_0x4145ee){_0x436129(null,_[_0x2bd2('0x53')](_0x4145ee)?![]:!![]);})[_0x2bd2('0x1b')](function(_0x210012){logger[_0x2bd2('0x2f')](_0x210012);_0x436129(null,![]);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x55')]=function(_0x4b30a1,_0x498eb9){var _0x1efe91={'role':_0x2bd2('0x52')};_0x1efe91[_0x4b30a1]=this['channel']['callerid'];this['rpc']['agentLogout'](_0x1efe91)['then'](function(_0x50091b){_0x498eb9(null,_['isNil'](_0x50091b)?![]:!![]);})['catch'](function(_0x2a6a50){logger[_0x2bd2('0x2f')](_0x2a6a50);_0x498eb9(null,![]);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x56')]=function(_0x539b07,_0x3f5f1b){var _0x73a383={'role':_0x2bd2('0x52')};_0x73a383[_0x539b07]=this['channel'][_0x2bd2('0x3c')];var _0x2359c5=_0x539b07!='internal'?util[_0x2bd2('0x2b')](_0x2bd2('0x57'),_0x2bd2('0x58'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')]):undefined;this[_0x2bd2('0x10')][_0x2bd2('0x56')](_0x73a383,_0x2359c5)['then'](function(_0x4b11f6){_0x3f5f1b(null,_[_0x2bd2('0x53')](_0x4b11f6)?![]:!![]);})[_0x2bd2('0x1b')](function(_0x2361ad){logger['error'](_0x2361ad);_0x3f5f1b(null,![]);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x59')]=function(_0xa948ea,_0x2a8c95){sh[_0x2bd2('0x5a')](_[_0x2bd2('0x5b')](_0xa948ea),function(_0x29c078,_0x519f6a){var _0x27ba6a=_0x519f6a[_0x2bd2('0x5c')](/(\r\n|\n|\r)/gm,'');_0x2a8c95(null,_0x27ba6a);});};AGIVertices['prototype']['googleCloudTTS']=function(_0x4f838e,_0x1f34b2){scripts['googleCloudTTS'](_0x4f838e[_0x2bd2('0x5d')],_0x4f838e['google_cloud_tts_text_type']||_0x2bd2('0x5e'),_0x4f838e[_0x2bd2('0x5e')],_0x4f838e['languageCode']||'en-US',_0x4f838e[_0x2bd2('0x5f')]||_0x2bd2('0x60'),_0x4f838e['audioEncoding']||_0x2bd2('0x61'))['then'](function(_0x2dbc8e){_0x1f34b2(null,_0x2dbc8e);})[_0x2bd2('0x1b')](function(_0x36fb1b){_0x1f34b2(_0x36fb1b);});};AGIVertices[_0x2bd2('0x12')]['googleTTS']=function(_0x22e1ed,_0x5f4f03){scripts[_0x2bd2('0x62')](_0x22e1ed[_0x2bd2('0x5e')],_0x22e1ed[_0x2bd2('0x63')]||'en',0x1)[_0x2bd2('0x15')](function(_0x979ffb){_0x5f4f03(null,_0x979ffb);})[_0x2bd2('0x1b')](function(_0xeb0c77){_0x5f4f03(_0xeb0c77);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x64')]=function(_0x334206,_0x4d0633){var _0x3ce831={'uri':_0x334206[_0x2bd2('0x65')],'method':_0x334206[_0x2bd2('0x66')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x334206['timeout'])===_0x2bd2('0x67')&&parseInt(_0x334206[_0x2bd2('0x68')])>=0x1?parseInt(_0x334206[_0x2bd2('0x68')])*0x3e8:0x5*0x3e8};if(_[_0x2bd2('0x69')](['POST',_0x2bd2('0x6a')],_0x3ce831[_0x2bd2('0x66')][_0x2bd2('0x6b')]())){try{_0x3ce831['body']=_0x334206[_0x2bd2('0xd')]?JSON[_0x2bd2('0x6c')](_0x334206['rawBody']):{};}catch(_0x1cb645){logger[_0x2bd2('0x2f')](_0x2bd2('0x6d'),_0x1cb645);}}try{_0x3ce831['headers']=_0x334206[_0x2bd2('0x6e')]?JSON[_0x2bd2('0x6c')](_0x334206[_0x2bd2('0x6e')]):{};}catch(_0x196096){logger[_0x2bd2('0x2f')]('An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function',_0x196096);}if(_0x334206[_0x2bd2('0x6f')]){try{var _0xc44ddf=require(_0x334206[_0x2bd2('0x6f')])['sync'](this,_0x3ce831);_0x3ce831['uri']=Mustache[_0x2bd2('0x70')](_0x334206['url'],_0xc44ddf,{},['$$','$$']);if(_0x3ce831['headers']){_0x3ce831['headers']=JSON[_0x2bd2('0x6c')](Mustache['render'](JSON['stringify'](_0x3ce831[_0x2bd2('0x71')]),_0xc44ddf,{},['$$','$$']));}if(_0x3ce831[_0x2bd2('0x72')]){_0x3ce831[_0x2bd2('0x72')]=JSON['parse'](Mustache['render'](JSON[_0x2bd2('0x73')](_0x3ce831[_0x2bd2('0x72')]),_0xc44ddf,{},['$$','$$']));}}catch(_0x207cea){logger[_0x2bd2('0x2f')](_0x2bd2('0x74'),_0x207cea);}}rp(_0x3ce831)[_0x2bd2('0x15')](function(_0x435bf3){var _0x48cea1={'statusCode':_0x435bf3[_0x2bd2('0x75')]||0xc8,'statusMessage':_0x435bf3['statusMessage']||'OK','headers':_0x435bf3[_0x2bd2('0x71')]||{},'body':_0x435bf3[_0x2bd2('0x72')]||{}};_0x4d0633(null,_0x48cea1);})['catch'](function(_0x5963df){var _0x1a1850={'statusCode':_0x5963df[_0x2bd2('0x75')]||0x1f4,'statusMessage':_0x5963df['message']||_0x2bd2('0x76'),'headers':_0x5963df[_0x2bd2('0x77')][_0x2bd2('0x71')]||{},'body':_0x5963df['options'][_0x2bd2('0x72')]||{}};_0x4d0633(null,_0x1a1850);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x78')]=function(_0x4601cc,_0x552fd7){scripts['googleDialogflow'](this[_0x2bd2('0xf')][_0x2bd2('0x38')],_0x4601cc['key'],_0x4601cc[_0x2bd2('0x5e')],_0x4601cc[_0x2bd2('0x79')]||'en')[_0x2bd2('0x15')](function(_0x51d1a0){_0x552fd7(null,_0x51d1a0);})[_0x2bd2('0x1b')](function(_0x37fca6){_0x552fd7(_0x37fca6);});};AGIVertices['prototype'][_0x2bd2('0x7a')]=function(_0x283050,_0x4f0f80){scripts[_0x2bd2('0x7a')](this['channel'][_0x2bd2('0x38')],_0x283050[_0x2bd2('0x7b')],_0x283050[_0x2bd2('0x7c')],_0x283050['private_key'],_0x283050['text'],_0x283050[_0x2bd2('0x7d')]||'en')[_0x2bd2('0x15')](function(_0x492962){_0x4f0f80(null,_0x492962);})['catch'](function(_0xf1eb9d){_0x4f0f80(_0xf1eb9d);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x7e')]=function(_0x82d0b3,_0x496462){scripts[_0x2bd2('0x7e')](this[_0x2bd2('0xf')],_0x82d0b3)[_0x2bd2('0x15')](function(_0x2c468c){_0x496462(null,_0x2c468c);})['catch'](function(_0x52519f){_0x496462(_0x52519f);});};AGIVertices['prototype']['ispeechTTS']=function(_0x527356,_0x867a85){scripts[_0x2bd2('0x7f')](_0x527356['key'],_0x527356[_0x2bd2('0x5e')],_0x527356[_0x2bd2('0x80')]||_0x2bd2('0x81'),_0x527356[_0x2bd2('0x82')])['then'](function(_0x19bd77){_0x867a85(null,_0x19bd77);})[_0x2bd2('0x1b')](function(_0x352d81){_0x867a85(_0x352d81);});};AGIVertices['prototype'][_0x2bd2('0x83')]=function(_0x36d63c,_0x174e33,_0x2c3ac6){scripts[_0x2bd2('0x83')](_0x174e33,_0x36d63c[_0x2bd2('0x84')],_0x36d63c[_0x2bd2('0x85')]||_0x2bd2('0x81'),this[_0x2bd2('0x86')](_0x36d63c[_0x2bd2('0x87')])?_0x36d63c[_0x2bd2('0x87')]:undefined)[_0x2bd2('0x15')](function(_0x520ce3){_0x2c3ac6(null,_0x520ce3);})['catch'](function(_0x582220){_0x2c3ac6(_0x582220);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x88')]=function(_0x4b90cc,_0x21dd25){scripts['awsPolly'](_0x4b90cc[_0x2bd2('0x89')],_0x4b90cc[_0x2bd2('0x8a')],_0x4b90cc[_0x2bd2('0x8b')],_0x4b90cc['aws_polly_voice']||_0x2bd2('0x8c'),_0x4b90cc['text'],_0x4b90cc[_0x2bd2('0x8d')]||_0x2bd2('0x5e'))[_0x2bd2('0x15')](function(_0x3aa0fc){_0x21dd25(null,_0x3aa0fc);})['catch'](function(_0x13fd26){_0x21dd25(_0x13fd26);});};AGIVertices[_0x2bd2('0x12')]['awsLex']=function(_0x3500e0,_0x18fb94){scripts[_0x2bd2('0x8e')](this[_0x2bd2('0xf')][_0x2bd2('0x38')],_0x3500e0[_0x2bd2('0x89')],_0x3500e0['aws_secret_access_key'],_0x3500e0[_0x2bd2('0x8f')],_0x3500e0[_0x2bd2('0x5e')],_0x3500e0['aws_bot_name'])[_0x2bd2('0x15')](function(_0x2c38bc){_0x18fb94(null,_0x2c38bc);})[_0x2bd2('0x1b')](function(_0xbc9d8e){_0x18fb94(_0xbc9d8e);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x90')]=function(_0x27e19f,_0x32490f,_0x31342b){scripts[_0x2bd2('0x90')](_0x32490f,_0x27e19f[_0x2bd2('0x84')],_0x27e19f['google_asr_language']||_0x2bd2('0x81'))[_0x2bd2('0x15')](function(_0x51496c){_0x31342b(null,_0x51496c);})[_0x2bd2('0x1b')](function(_0x34b3e5){_0x31342b(_0x34b3e5);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x91')]=function(_0x5b0086,_0x49a564,_0x56cfaf){scripts['tildeASR'](_0x49a564,_0x5b0086[_0x2bd2('0x92')],_0x5b0086[_0x2bd2('0x93')],_0x5b0086[_0x2bd2('0x94')])[_0x2bd2('0x15')](function(_0x14f753){_0x56cfaf(null,_0x14f753);})[_0x2bd2('0x1b')](function(_0x1a35f6){_0x56cfaf(_0x1a35f6);});};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x95')]=function(_0x3de757){var _0x282293=_[_0x2bd2('0x69')](verticesWithRetry,_0x3de757['agicommand'])?_0x3de757:_[_0x2bd2('0x96')](_0x3de757);for(var _0x111f21 in _0x282293){if(_0x282293[_0x2bd2('0x97')](_0x111f21)){if(_0x282293[_0x111f21]&&_[_0x2bd2('0x98')](_0x282293[_0x111f21])){if(_[_0x2bd2('0x69')](recursiveMapAttributes,_0x111f21)){_0x282293[_0x111f21]=this[_0x2bd2('0x99')](_0x282293[_0x111f21]);}else{_0x282293[_0x111f21]=this[_0x2bd2('0x9a')](_0x282293[_0x111f21]);}}}}return _0x282293;};AGIVertices['prototype'][_0x2bd2('0x9b')]=function(_0x20d390){for(var _0x2a795d in _0x20d390){if(_0x20d390[_0x2bd2('0x97')](_0x2a795d)){if(_['isPlainObject'](_0x20d390[_0x2a795d])){this[_0x2bd2('0x9b')](_0x20d390[_0x2a795d]);}else if(_['isArray'](_0x20d390[_0x2a795d])){for(var _0x1180de=0x0;_0x1180de<_0x20d390[_0x2a795d]['length'];_0x1180de++){this[_0x2bd2('0x9b')](_0x20d390[_0x2a795d][_0x1180de]);}}else if(_[_0x2bd2('0x98')](_0x20d390[_0x2a795d])){_0x20d390[_0x2a795d]=this[_0x2bd2('0x9a')](_0x20d390[_0x2a795d]);}}}};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x9c')]=function(_0x5b232e,_0x31dcbe){for(var _0x4cbe06 in _0x5b232e){if(_0x5b232e[_0x2bd2('0x97')](_0x4cbe06)){if(_[_0x2bd2('0x9d')](_0x5b232e[_0x4cbe06])){if(!_[_0x2bd2('0x46')](_0x5b232e[_0x4cbe06])){this[_0x2bd2('0x9c')](_0x5b232e[_0x4cbe06],util[_0x2bd2('0x2b')](_0x2bd2('0x9e'),_0x31dcbe,_0x4cbe06));}}else if(_[_0x2bd2('0x9f')](_0x5b232e[_0x4cbe06])){for(var _0x11b1e0=0x0;_0x11b1e0<_0x5b232e[_0x4cbe06][_0x2bd2('0xa0')];_0x11b1e0++){this['saveRestApiResult'](_0x5b232e[_0x4cbe06][_0x11b1e0],util[_0x2bd2('0x2b')](_0x2bd2('0x9e'),_0x31dcbe,_0x4cbe06+'['+_0x11b1e0+']'));}}else{if(!_[_0x2bd2('0x53')](_0x5b232e[_0x4cbe06])){this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util['format']('%s.%s',_0x31dcbe,_0x4cbe06),_0x5b232e[_0x4cbe06]);}}}}};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x99')]=function(_0x371c33){try{var _0x163d6d=JSON['parse'](_0x371c33);this[_0x2bd2('0x9b')](_0x163d6d);return JSON[_0x2bd2('0x73')](_0x163d6d);}catch(_0x5de9ab){return this[_0x2bd2('0x9a')](_0x371c33);}};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x9a')]=function(_0x22ce65){var _0x41c0e0=_0x22ce65[_0x2bd2('0xa2')]('{');for(var _0x275801=0x1;_0x275801<_0x41c0e0[_0x2bd2('0xa0')];_0x275801+=0x1){var _0x2a3047=_0x41c0e0[_0x275801][_0x2bd2('0xa2')]('}');if(_0x2a3047[_0x2bd2('0xa0')]>0x1){_0x22ce65=_0x22ce65['replaceAll']('{'+_0x2a3047[0x0]+'}',this[_0x2bd2('0xf')][_0x2bd2('0x13')](_0x2a3047[0x0])[_0x2bd2('0xa3')]||_0x2a3047[0x0]);}}if(_0x41c0e0[_0x2bd2('0xa0')]===0x1){return _0x22ce65['toString']();}return this[_0x2bd2('0x9a')](_0x22ce65);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xa4')]=function(_0x7b2107,_0x4503ab){var _0x58ee7c=this[_0x2bd2('0xf')][_0x2bd2('0x13')](_0x7b2107);if(_0x58ee7c[_0x2bd2('0xa5')]===-0x1){return _0x58ee7c;}logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xa6'),_0x4503ab,_0x58ee7c['extra']));return this[_0x2bd2('0xf')][_0x2bd2('0xa1')](_0x4503ab,_0x58ee7c['extra']);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x86')]=function(_0x74f70f){return _0x74f70f&&_0x74f70f!=='0'&&_0x74f70f!=='-1'&&_0x74f70f!=='';};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xa7')]=function(_0x155da6){this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x155da6,'-');_0x155da6[_0x2bd2('0xaa')]=_0x155da6['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xab')]=function(_0x50cfc8){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20MRCPSynth\x20(%s)\x20block',_0x50cfc8[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x50cfc8['text'])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')]('no\x20text\x20configured');}var _0x11acbf='\x22'+_0x50cfc8['text']+'\x22';if(this[_0x2bd2('0x86')](_0x50cfc8['options'])){_0x11acbf+=','+_0x50cfc8[_0x2bd2('0x77')];}var _0x3ece19=this[_0x2bd2('0xf')][_0x2bd2('0x5a')](_0x2bd2('0xad'),_0x11acbf);if(_0x3ece19[_0x2bd2('0xa5')]===-0x1){return _0x3ece19;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xae'),_0x11acbf));};AGIVertices['prototype'][_0x2bd2('0xaf')]=function(_0xa38d0c){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xb0'),_0xa38d0c[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0xa38d0c[_0x2bd2('0xb1')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xb2'));}var _0x167f93=_0xa38d0c[_0x2bd2('0xb1')];if(this[_0x2bd2('0x86')](_0xa38d0c[_0x2bd2('0x77')])){_0x167f93+=','+_0xa38d0c[_0x2bd2('0x77')];}var _0x36e2ab=this[_0x2bd2('0xf')][_0x2bd2('0x5a')](_0x2bd2('0xb3'),_0x167f93);if(_0x36e2ab[_0x2bd2('0xa5')]===-0x1){return _0x36e2ab;}var _0x930893=this[_0x2bd2('0xa4')](_0x2bd2('0xb4'),_0x2bd2('0xb5'));if(_0x930893[_0x2bd2('0xa5')]===-0x1){return _0x930893;}var _0x1136f4=this[_0x2bd2('0xa4')](_0x2bd2('0xb6'),_0x2bd2('0xb7'));if(_0x1136f4['result']===-0x1){return _0x1136f4;}var _0x1d4061=this['getAndSetVariable'](_0x2bd2('0xb8'),_0x2bd2('0xb9'));if(_0x1d4061[_0x2bd2('0xa5')]===-0x1){return _0x1d4061;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xba'),_0x167f93));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xbb')]=function(_0x56ed7d){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xbc'),_0x56ed7d['label']));return this['channel'][_0x2bd2('0xbb')]([_0x56ed7d['command'],_0x56ed7d[_0x2bd2('0xbd')]]);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xbe')]=function(_0x334a8f){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xbf'),_0x334a8f[_0x2bd2('0x39')]));if(this['isConfigured'](_0x334a8f[_0x2bd2('0x68')])){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xc0'),_0x334a8f['timeout']));var _0x203807=this[_0x2bd2('0xf')][_0x2bd2('0xc1')](_0x334a8f[_0x2bd2('0x68')]);if(_0x203807['result']===-0x1){return _0x203807;}}return this[_0x2bd2('0xf')][_0x2bd2('0xbe')]();};AGIVertices['prototype'][_0x2bd2('0x4c')]=function(_0x481d48){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0xc2'),_0x481d48[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x481d48[_0x2bd2('0x4a')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x481d48,_0x2bd2('0xc3'));}_0x481d48[_0x2bd2('0x4b')]=moment();if(this[_0x2bd2('0x86')](_0x481d48[_0x2bd2('0xc4')])){_0x481d48[_0x2bd2('0x4b')]=moment()['add'](_0x481d48[_0x2bd2('0xc4')],_0x2bd2('0xc5'));}if(!this[_0x2bd2('0x86')](_0x481d48[_0x2bd2('0xc6')])){_0x481d48[_0x2bd2('0xc6')]=0x2;}this['createCmContact'][_0x2bd2('0xa9')](this,_0x481d48);return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xc7'),_0x481d48[_0x2bd2('0x49')],_0x481d48['list_id'],_0x481d48[_0x2bd2('0x4b')]));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xc8')]=function(_0xf143c7){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0xf143c7[_0x2bd2('0x39')]));var _0x128791=this['channel'][_0x2bd2('0x5a')](_0xf143c7[_0x2bd2('0xc9')],_0xf143c7[_0x2bd2('0x77')]);if(_0x128791['result']===-0x1){return _0x128791;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xca'),_0xf143c7[_0x2bd2('0xc9')],_0xf143c7[_0x2bd2('0x77')]));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xcb')]=function(_0x592432){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xcc'),_0x592432[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x592432['text'])){return this['channel'][_0x2bd2('0xac')]('no\x20text\x20configured');}var _0x2f93b7='\x22'+_0x592432['text']+'\x22';if(this['isConfigured'](_0x592432[_0x2bd2('0x77')])){_0x2f93b7+=','+_0x592432[_0x2bd2('0x77')];}var _0xbedaec=this[_0x2bd2('0xf')]['exec'](_0x2bd2('0xad'),_0x2f93b7);if(_0xbedaec['result']===-0x1){return _0xbedaec;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0xae'),_0x2f93b7));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xcd')]=function(_0x49a84c){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xce'),_0x49a84c[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x49a84c['text'])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xcf'));}var _0x3f86d5='\x22'+_0x49a84c[_0x2bd2('0x5e')]+'\x22';if(this['isConfigured'](_0x49a84c[_0x2bd2('0x77')])){_0x3f86d5+=','+_0x49a84c['options'];}var _0x2898c4=this[_0x2bd2('0xf')][_0x2bd2('0x5a')](_0x2bd2('0xad'),_0x3f86d5);if(_0x2898c4[_0x2bd2('0xa5')]===-0x1){return _0x2898c4;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xae'),_0x3f86d5));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xd0')]=function(_0x5e8852){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x5e8852[_0x2bd2('0x39')]));if(!this['isConfigured'](_0x5e8852['grammar'])){return this['channel']['noop'](_0x2bd2('0xb2'));}var _0x5f2e2e=_0x5e8852['grammar'];if(this[_0x2bd2('0x86')](_0x5e8852[_0x2bd2('0x77')])){_0x5f2e2e+=','+_0x5e8852[_0x2bd2('0x77')];}var _0x4c557c=this[_0x2bd2('0xf')]['exec'](_0x2bd2('0xb3'),_0x5f2e2e);if(_0x4c557c[_0x2bd2('0xa5')]===-0x1){return _0x4c557c;}var _0x326540=this[_0x2bd2('0xa4')]('RECOG_CONFIDENCE()',_0x2bd2('0xd1'));if(_0x326540[_0x2bd2('0xa5')]===-0x1){return _0x326540;}var _0x59812b=this[_0x2bd2('0xa4')](_0x2bd2('0xb6'),_0x2bd2('0xd2'));if(_0x59812b['result']===-0x1){return _0x59812b;}var _0x249d08=this['getAndSetVariable'](_0x2bd2('0xb8'),_0x2bd2('0xd3'));if(_0x249d08[_0x2bd2('0xa5')]===-0x1){return _0x249d08;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xba'),_0x5f2e2e));};AGIVertices[_0x2bd2('0x12')]['sestekasr']=function(_0x319f94){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0xd4'),_0x319f94[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x319f94[_0x2bd2('0xb1')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xb2'));}var _0xd01315=_0x319f94['grammar'];if(this[_0x2bd2('0x86')](_0x319f94[_0x2bd2('0x77')])){_0xd01315+=','+_0x319f94[_0x2bd2('0x77')];}var _0x50a147=this['channel']['exec'](_0x2bd2('0xb3'),_0xd01315);if(_0x50a147[_0x2bd2('0xa5')]===-0x1){return _0x50a147;}var _0x5630b9=this['getAndSetVariable']('RECOG_CONFIDENCE()','SESTEK_ASR_CONFIDENCE');if(_0x5630b9[_0x2bd2('0xa5')]===-0x1){return _0x5630b9;}var _0x3ac022=this[_0x2bd2('0xa4')](_0x2bd2('0xb6'),_0x2bd2('0xd5'));if(_0x3ac022[_0x2bd2('0xa5')]===-0x1){return _0x3ac022;}var _0x44a255=this[_0x2bd2('0xa4')](_0x2bd2('0xb8'),'SESTEK_ASR_INSTANCE');if(_0x44a255['result']===-0x1){return _0x44a255;}return this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xba'),_0xd01315));};AGIVertices['prototype'][_0x2bd2('0xd6')]=function(_0x5a791d){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xd7'),_0x5a791d['label']));if(!this[_0x2bd2('0x86')](_0x5a791d[_0x2bd2('0xd8')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x5a791d,'no\x20database\x20selected');}var _0x49ee23=this[_0x2bd2('0xd9')][_0x2bd2('0xa9')](this,_0x5a791d[_0x2bd2('0xd8')]);if(!_0x49ee23){return this['channel'][_0x2bd2('0x2f')](_0x5a791d,_0x2bd2('0xda'));}if(!this[_0x2bd2('0x86')](_0x5a791d[_0x2bd2('0x31')])){return this[_0x2bd2('0xf')]['error'](_0x5a791d,_0x2bd2('0xdb'));}var _0x4babdf=_0x5a791d['query'][_0x2bd2('0x5c')](/(\r\n|\n|\r)/gm,'\x20');this['channel']['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0xdc'),_0x4babdf));var _0x195630=this[_0x2bd2('0x2d')][_0x2bd2('0xa9')](this,_0x49ee23,_0x4babdf);this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x5a791d,_0x4babdf);if(!this[_0x2bd2('0x86')](_0x5a791d[_0x2bd2('0xdd')])){return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0xde'));}var _0x5d8489=this['getVariable'][_0x2bd2('0xa9')](this,_0x5a791d['variable_id']);if(!_0x5d8489){return this['channel'][_0x2bd2('0x2f')](_0x5a791d,_0x2bd2('0xdf'));}var _0x70987c=this;_0x195630['forEach'](function(_0x393364,_0x2c1361){Object['keys'](_0x393364)[_0x2bd2('0xe0')](function(_0x5c5465){_0x70987c[_0x2bd2('0xf')]['setVariable'](util['format']('%s[%s][%s]',_0x5d8489,_0x2c1361,_0x5c5465),_0x393364[_0x5c5465]);});});this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0xe1'),_0x5d8489),_0x195630[_0x2bd2('0xa0')]);return this['channel']['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0xe2'),_0x5d8489));};AGIVertices['prototype'][_0x2bd2('0xe3')]=function(_0x1f2d88){logger['debug'](util[_0x2bd2('0x2b')](_0x2bd2('0xe4'),_0x1f2d88[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x1f2d88[_0x2bd2('0xe5')])){return this[_0x2bd2('0xf')]['error'](_0x1f2d88,'no\x20user\x20selected');}var _0x1cc57b=this[_0x2bd2('0xe6')][_0x2bd2('0xa9')](this,_0x1f2d88[_0x2bd2('0xe5')]);if(!_0x1cc57b){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1f2d88,_0x2bd2('0xe7'));}var _0x5f5a9e=this[_0x2bd2('0xf')]['exec'](_0x2bd2('0xe8'),[util[_0x2bd2('0x2b')](_0x2bd2('0xe9'),_0x1cc57b),_0x1f2d88[_0x2bd2('0x68')],_0x1f2d88['opts'],_0x1f2d88['url']]);if(_0x5f5a9e['result']===-0x1){return _0x5f5a9e;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xea'),'DIAL'));};AGIVertices['prototype'][_0x2bd2('0xeb')]=function(_0x31c593){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x31c593[_0x2bd2('0x39')]));if(!this['isConfigured'](_0x31c593[_0x2bd2('0x84')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xec'));}if(!this[_0x2bd2('0x86')](_0x31c593[_0x2bd2('0x5e')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xed')]=!![];this[_0x2bd2('0xa8')](_0x31c593);this[_0x2bd2('0xee')](_0x31c593[_0x2bd2('0x5e')],'in','','');this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xef'),_0x31c593[_0x2bd2('0x5e')]));var _0x2b665c=this[_0x2bd2('0x78')][_0x2bd2('0xa9')](this,_0x31c593);if(_0x2b665c){for(var _0x5caa0d in _0x2b665c){if(_0x2b665c[_0x2bd2('0x97')](_0x5caa0d)){this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0xf0'),_0x5caa0d['toUpperCase']()),_0x2b665c[_0x5caa0d]);}}this['createSquareMessage'](_0x2b665c[_0x2bd2('0xf1')],_0x2bd2('0xf2'),_0x2bd2('0xeb'),'');return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xf3'),_0x2b665c['speech']));}return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x31c593,_0x2bd2('0xf4'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xf5')]=function(_0xa610a7){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xf6'),_0xa610a7[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0xa610a7[_0x2bd2('0x7b')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xf7'));}if(!this[_0x2bd2('0x86')](_0xa610a7[_0x2bd2('0x7c')])){return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0xf8'));}if(!this['isConfigured'](_0xa610a7[_0x2bd2('0xf9')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xfa'));}if(!this['isConfigured'](_0xa610a7[_0x2bd2('0x7d')])){return this[_0x2bd2('0xf')]['noop']('no\x20anguage\x20configured');}if(!this['isConfigured'](_0xa610a7[_0x2bd2('0x5e')])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xed')]=!![];this[_0x2bd2('0xa8')](_0xa610a7);this[_0x2bd2('0xee')](_0xa610a7[_0x2bd2('0x5e')],'in','','');this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xfb'),_0xa610a7[_0x2bd2('0x5e')]));var _0x493ab3=this['googleDialogflowV2'][_0x2bd2('0xa9')](this,_0xa610a7);if(_0x493ab3){for(var _0x23d39c in _0x493ab3){if(_0x493ab3[_0x2bd2('0x97')](_0x23d39c)){if(_0x23d39c!=='providerResponse'){this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0xf0'),_0x23d39c[_0x2bd2('0x6b')]()),_0x493ab3[_0x23d39c]);}}}this[_0x2bd2('0xee')](_0x493ab3[_0x2bd2('0xf1')],_0x2bd2('0xf2'),'dialogflowV2',_0x493ab3[_0x2bd2('0xfc')]);return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format']('DialogflowV2\x20Result\x20%s',_0x493ab3[_0x2bd2('0xf1')]));}return this[_0x2bd2('0xf')]['error'](_0xa610a7,_0x2bd2('0xfd'));};AGIVertices['prototype']['sesteknda']=function(_0x28830b){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0xfe'),_0x28830b[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x28830b[_0x2bd2('0xff')])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0x100'));}if(!this[_0x2bd2('0x86')](_0x28830b[_0x2bd2('0x101')])){return this['channel'][_0x2bd2('0xac')]('no\x20username\x20configured');}if(!this[_0x2bd2('0x86')](_0x28830b['password'])){return this['channel'][_0x2bd2('0xac')]('no\x20password\x20configured');}if(!this[_0x2bd2('0x86')](_0x28830b[_0x2bd2('0x102')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xed')]=!![];this['createSquareDetailsReport'](_0x28830b);this[_0x2bd2('0xee')](_0x28830b[_0x2bd2('0x5e')],'in','','');this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x103'),_0x28830b[_0x2bd2('0x5e')]));var _0x5738af=this[_0x2bd2('0x7e')]['sync'](this,_0x28830b);if(_0x5738af){for(var _0x1ecab2 in _0x5738af){if(_0x5738af['hasOwnProperty'](_0x1ecab2)){this['channel'][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0x104'),_0x1ecab2[_0x2bd2('0x6b')]()),_0x5738af[_0x1ecab2]);}}this[_0x2bd2('0xee')](_0x5738af[_0x2bd2('0xf1')],_0x2bd2('0xf2'),_0x2bd2('0x105'),'');if(_0x5738af[_0x2bd2('0x106')]){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x107'),_0x5738af[_0x2bd2('0x106')]));var _0x56ae00=this[_0x2bd2('0xf')][_0x2bd2('0x108')](_0x5738af[_0x2bd2('0x106')]);try{fs[_0x2bd2('0x109')](_0x5738af[_0x2bd2('0x106')]+_0x2bd2('0x10a'));}catch(_0x27e57b){logger[_0x2bd2('0x2f')](_0x27e57b);}return _0x56ae00;}else{return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x10b'),_0x5738af['speech']));}}return this['channel'][_0x2bd2('0x2f')](_0x28830b,_0x2bd2('0x10c'));};AGIVertices['prototype']['end']=function(_0x5a8ce2){logger[_0x2bd2('0x32')](util['format']('Enter\x20in\x20END\x20(%s)\x20block',_0x5a8ce2[_0x2bd2('0x39')]));return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x10d'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x10e')]=function(_0x1426c7){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x10f'),_0x1426c7[_0x2bd2('0x39')]));var _0x2b42eb='';if(_0x1426c7[_0x2bd2('0x110')]){if(!this[_0x2bd2('0x86')](_0x1426c7[_0x2bd2('0x110')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1426c7,_0x2bd2('0x111'));}else{var _0x15ed39=parseInt(_0x1426c7[_0x2bd2('0x110')],0xa);if(isNaN(_0x15ed39)){_0x2b42eb=_0x1426c7[_0x2bd2('0x110')];}else{_0x2b42eb=this['getTrunk'][_0x2bd2('0xa9')](this,_0x1426c7[_0x2bd2('0x110')]);if(!_0x2b42eb){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1426c7,_0x2bd2('0x112'));}}}}else if(_0x1426c7[_0x2bd2('0x113')]){_0x2b42eb=_0x1426c7[_0x2bd2('0x113')];}else{return this['channel'][_0x2bd2('0x2f')](_0x1426c7,_0x2bd2('0x111'));}var _0x30244c=this[_0x2bd2('0xf')][_0x2bd2('0x5a')](_0x2bd2('0xe8'),[util['format'](_0x2bd2('0x114'),_0x2b42eb,_0x1426c7['phone']),_0x1426c7['timeout'],_0x1426c7['opts'],_0x1426c7[_0x2bd2('0x65')]]);if(_0x30244c[_0x2bd2('0xa5')]===-0x1){return _0x30244c;}return this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xea'),_0x2bd2('0xe8')));};AGIVertices[_0x2bd2('0x12')]['finally']=function(_0x387eb4){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x115'),_0x387eb4['label']));return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x116'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x117')]=function(_0x4ef904){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x118'),_0x4ef904[_0x2bd2('0x39')]));if(_0x4ef904[_0x2bd2('0xaa')]===0x0){return this[_0x2bd2('0xa7')](_0x4ef904);}_0x4ef904[_0x2bd2('0xaa')]-=0x1;if(!this[_0x2bd2('0x86')](_0x4ef904[_0x2bd2('0x119')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x4ef904,_0x2bd2('0x11a'));}var _0xd85665=this[_0x2bd2('0x1f')][_0x2bd2('0xa9')](this,_0x4ef904[_0x2bd2('0x119')]);if(!_0xd85665){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x4ef904,_0x2bd2('0x11b'));}if(!this[_0x2bd2('0x86')](_0x4ef904[_0x2bd2('0xdd')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x2bd2('0xde'));}var _0x242cd6=this['channel'][_0x2bd2('0x11c')](_0xd85665,_0x4ef904[_0x2bd2('0x11d')],_0x4ef904['maxdigit']);var _0x46288a=_0x242cd6['result']?_0x242cd6[_0x2bd2('0xa5')][_0x2bd2('0x4e')]():'';logger[_0x2bd2('0x32')]('test',JSON['stringify'](_0x242cd6));if(_0x242cd6['result']===-0x1){this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x4ef904,_0x46288a);return _0x242cd6;}else if(_0x242cd6[_0x2bd2('0xa3')]==='timeout'){_0x242cd6[_0x2bd2('0xa5')]=_0x46288a[_0x2bd2('0xa0')]>=parseInt(_0x4ef904[_0x2bd2('0x11e')])?'x':'i';}else{_0x242cd6['result']=_0x46288a[_0x2bd2('0xa0')]>=parseInt(_0x4ef904[_0x2bd2('0x11e')])&&_0x46288a[_0x2bd2('0xa0')]<=parseInt(_0x4ef904[_0x2bd2('0x11f')])?'x':'i';}var _0xaaf067=this[_0x2bd2('0x13')]['sync'](this,_0x4ef904[_0x2bd2('0xdd')]);if(!_0xaaf067){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x4ef904,_0x2bd2('0xdf'));}this[_0x2bd2('0xf')]['setVariable'](_0xaaf067,_0x46288a);if(this[_0x2bd2('0x86')](_0x4ef904[_0x2bd2('0x120')])){var _0x441962=parseInt(_0x4ef904[_0x2bd2('0x120')],0xa);var _0x3b57c7=rs['generate']({'charset':'*','length':_0x441962});var _0x4648d9=_0x46288a['length'];if(_0x4648d9>0x0){if(_0x4648d9>_0x441962){this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x4ef904,_0x4ef904['hiddendigitspos']===_0x2bd2('0x121')?_0x3b57c7+_0x46288a[_0x2bd2('0x122')](_0x441962):_0x46288a[_0x2bd2('0x122')](0x0,_0x4648d9-_0x441962)+_0x3b57c7);}else{this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x4ef904,rs['generate']({'charset':'*','length':_0x4648d9}));}}else{this['createSquareDetailsReport'][_0x2bd2('0xa9')](this,_0x4ef904,'');}}else{this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x4ef904,_0x46288a);}return _0x242cd6;};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xe')]=function(_0x299269){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x299269[_0x2bd2('0x39')]));return this[_0x2bd2('0x117')](_0x299269);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x123')]=function(_0x13772d){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x13772d[_0x2bd2('0x39')]));this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x13772d,_0x13772d[_0x2bd2('0x124')]);return this['channel'][_0x2bd2('0xac')](util['format'](_0x2bd2('0x125'),_0x13772d[_0x2bd2('0x124')]));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x126')]=function(_0x18ccae){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0x127'),_0x18ccae['label']));if(!this[_0x2bd2('0x86')](_0x18ccae['aws_access_key_id'])||!this[_0x2bd2('0x86')](_0x18ccae[_0x2bd2('0x8a')])){return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x128'));}if(!this['isConfigured'](_0x18ccae[_0x2bd2('0x5e')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0x129'),_0x18ccae[_0x2bd2('0x5e')]));var _0x341d5e=this['awsPolly'][_0x2bd2('0xa9')](this,_0x18ccae);if(_0x341d5e){this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0x12a'),_0x341d5e));var _0x44fea0=this[_0x2bd2('0xf')][_0x2bd2('0x108')](_0x341d5e);try{fs['unlink'](_0x341d5e+_0x2bd2('0x10a'));}catch(_0x3e5fe9){logger['error'](_0x3e5fe9);}return _0x44fea0;}return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x18ccae,_0x2bd2('0x12b'));};AGIVertices[_0x2bd2('0x12')]['awslex']=function(_0x2726c3){logger['info'](util[_0x2bd2('0x2b')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x2726c3[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x2726c3[_0x2bd2('0x89')])||!this[_0x2bd2('0x86')](_0x2726c3['aws_secret_access_key'])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0x128'));}if(!this[_0x2bd2('0x86')](_0x2726c3[_0x2bd2('0x12c')])){return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x12d'));}if(!this[_0x2bd2('0x86')](_0x2726c3[_0x2bd2('0x5e')])){return this['channel']['noop'](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xed')]=!![];this[_0x2bd2('0xa8')](_0x2726c3);this[_0x2bd2('0xee')](_0x2726c3[_0x2bd2('0x5e')],'in','','');this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x12e'),_0x2726c3[_0x2bd2('0x5e')]));var _0x27523e=this['awsLex'][_0x2bd2('0xa9')](this,_0x2726c3);if(_0x27523e){for(var _0x35d1f6 in _0x27523e){if(_0x27523e[_0x2bd2('0x97')](_0x35d1f6)&&_[_0x2bd2('0x98')](_0x27523e[_0x35d1f6])){this['channel'][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0x12f'),_0x35d1f6[_0x2bd2('0x6b')]()),_0x27523e[_0x35d1f6]);}}if(_[_0x2bd2('0x53')](_0x27523e[_0x2bd2('0x130')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x131'));}else{this[_0x2bd2('0xee')](_0x27523e[_0x2bd2('0x130')],_0x2bd2('0xf2'),_0x2bd2('0x132'),'');return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0x133'),_0x27523e[_0x2bd2('0x130')]));}}return this['channel'][_0x2bd2('0x2f')](_0x2726c3,_0x2bd2('0x134'));};AGIVertices[_0x2bd2('0x12')]['googleasr']=function(_0x21be99){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x135'),_0x21be99['label'],_0x21be99[_0x2bd2('0x68')]));if(!this[_0x2bd2('0x86')](_0x21be99[_0x2bd2('0x84')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xec'));}var _0x3e124f='wav';var _0x4b0480=util['format'](_0x2bd2('0x136'),FILES_PATH,rs[_0x2bd2('0x137')](0x4));var _0x5b0eec=util[_0x2bd2('0x2b')](_0x2bd2('0x9e'),_0x4b0480,_0x3e124f);var _0x5f9d96=!![];if(_0x21be99['beep']==='NOBEEP'){_0x5f9d96=![];}var _0x4d3b1d=this[_0x2bd2('0xf')]['recordFile'](_0x4b0480,_0x3e124f,_0x21be99[_0x2bd2('0x138')],_0x21be99[_0x2bd2('0x68')],undefined,_0x5f9d96);if(_0x4d3b1d[_0x2bd2('0xa5')]!==-0x1){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x139'),_0x5b0eec));var _0x481e5f=this[_0x2bd2('0x90')]['sync'](this,_0x21be99,_0x5b0eec);if(_0x481e5f){for(var _0x5298a4 in _0x481e5f){if(_0x481e5f['hasOwnProperty'](_0x5298a4)){this['channel'][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0x13a'),_0x5298a4[_0x2bd2('0x6b')]()),_0x481e5f[_0x5298a4]);}}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x13b'),JSON[_0x2bd2('0x73')](_0x481e5f)));}}return _0x4d3b1d;};AGIVertices[_0x2bd2('0x12')]['tildeasr']=function(_0x566f7d){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0x13c'),_0x566f7d['label']));if(!this[_0x2bd2('0x86')](_0x566f7d['appid'])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')]('no\x20appid\x20configured');}if(!this[_0x2bd2('0x86')](_0x566f7d[_0x2bd2('0x93')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x13d'));}var _0x202ebe=_0x2bd2('0x13e');var _0x23a4e1=util[_0x2bd2('0x2b')](_0x2bd2('0x136'),FILES_PATH,rs[_0x2bd2('0x137')](0x4));var _0x4fe5d3=util[_0x2bd2('0x2b')](_0x2bd2('0x9e'),_0x23a4e1,_0x202ebe);var _0x4e64d3=!![];if(_0x566f7d[_0x2bd2('0x13f')]===_0x2bd2('0x140')){_0x4e64d3=![];}var _0x355c06=this['channel']['recordFile'](_0x23a4e1,_0x202ebe,_0x566f7d[_0x2bd2('0x138')],_0x566f7d['timeout'],undefined,_0x4e64d3);if(_0x355c06[_0x2bd2('0xa5')]!==-0x1){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')]('tilde\x20%s\x20file\x20created',_0x4fe5d3));var _0x3f78cc=this['tildeASR'][_0x2bd2('0xa9')](this,_0x566f7d,_0x4fe5d3);if(_0x3f78cc){for(var _0x363f1e in _0x3f78cc){if(_0x3f78cc['hasOwnProperty'](_0x363f1e)){this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0x141'),_0x363f1e['toUpperCase']()),_0x3f78cc[_0x363f1e]);}}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x142'),JSON[_0x2bd2('0x73')](_0x3f78cc)));}}return _0x355c06;};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x143')]=function(_0xe35c){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x144'),_0xe35c[_0x2bd2('0x39')]));return this[_0x2bd2('0xf')]['continueAt'](_0xe35c['context'],_0xe35c['extension'],_0xe35c[_0x2bd2('0x40')]);};AGIVertices['prototype']['gotoif']=function(_0xd61c02){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20GOTOIF\x20(%s)\x20block',_0xd61c02[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0xd61c02[_0x2bd2('0x145')])){return this['channel'][_0x2bd2('0x2f')](_0xd61c02,_0x2bd2('0x146'));}try{var _0x4ec94a=eval(_0xd61c02[_0x2bd2('0x145')])?_0x2bd2('0x147'):_0x2bd2('0x148');this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x149'),_0xd61c02['condition'],_0x4ec94a));return{'code':0xc8,'result':_0x4ec94a};}catch(_0x47308f){return{'code':0xc8,'result':_0x2bd2('0x148')};}};AGIVertices[_0x2bd2('0x12')]['gotoiftime']=function(_0x5b17e4){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x14a'),_0x5b17e4[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x5b17e4[_0x2bd2('0x14b')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x5b17e4,_0x2bd2('0x14c'));}var _0x3a704a=this[_0x2bd2('0x24')][_0x2bd2('0xa9')](this,_0x5b17e4[_0x2bd2('0x14b')]);if(!_0x3a704a){return this['channel']['error'](_0x5b17e4,_0x2bd2('0x14d'));}for(var _0x1e8a30=0x0;_0x1e8a30<_0x3a704a[_0x2bd2('0xa0')];_0x1e8a30+=0x1){var _0x1d4b52=this[_0x2bd2('0xf')][_0x2bd2('0x13')](util[_0x2bd2('0x2b')](_0x2bd2('0x14e'),_0x3a704a[_0x1e8a30]));if(_0x1d4b52[_0x2bd2('0xa5')]===-0x1){return _0x1d4b52;}logger['info'](util['format'](_0x2bd2('0x14f'),_0x3a704a[_0x1e8a30],_0x1d4b52['extra']));if(_0x1d4b52[_0x2bd2('0xa3')]===_0x2bd2('0x147')){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x14f'),_0x3a704a[_0x1e8a30],_0x2bd2('0x147')));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format']('IFTIME\x20%s\x20%s',_0x3a704a[_0x1e8a30],_0x2bd2('0x147')));return{'code':0xc8,'result':'true'};}else{logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('IFTIME\x20%s\x20%s',_0x3a704a[_0x1e8a30],_0x2bd2('0x148')));this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')]('IFTIME\x20%s\x20%s',_0x3a704a[_0x1e8a30],_0x2bd2('0x148')));}}return{'code':0xc8,'result':_0x2bd2('0x148')};};AGIVertices['prototype'][_0x2bd2('0x150')]=function(_0x672917){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x151'),_0x672917[_0x2bd2('0x39')]));return this[_0x2bd2('0xf')]['hangup']();};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x152')]=function(_0x3cdcad){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x153'),_0x3cdcad[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x3cdcad[_0x2bd2('0x84')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')]('no\x20key\x20configured');}var _0x2d9d04='wav';var _0x3a3239=util['format'](_0x2bd2('0x136'),FILES_PATH,rs[_0x2bd2('0x137')](0x4));var _0x2c4e16=util['format'](_0x2bd2('0x9e'),_0x3a3239,_0x2d9d04);var _0xaf0bb1=!![];if(_0x3cdcad[_0x2bd2('0x13f')]===_0x2bd2('0x140')){_0xaf0bb1=![];}var _0x882097=this['channel'][_0x2bd2('0x154')](_0x3a3239,_0x2d9d04,_0x3cdcad[_0x2bd2('0x138')],_0x3cdcad[_0x2bd2('0x68')],undefined,_0xaf0bb1);if(_0x882097[_0x2bd2('0xa5')]!==-0x1){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x155'),_0x2c4e16));var _0x592a2d=this[_0x2bd2('0x83')][_0x2bd2('0xa9')](this,_0x3cdcad,_0x2c4e16);if(_0x592a2d){for(var _0x4ec402 in _0x592a2d){if(_0x592a2d[_0x2bd2('0x97')](_0x4ec402)){this[_0x2bd2('0xf')]['setVariable'](util[_0x2bd2('0x2b')](_0x2bd2('0x156'),_0x4ec402[_0x2bd2('0x6b')]()),_0x592a2d[_0x4ec402]);}}return this['channel'][_0x2bd2('0xac')](util['format'](_0x2bd2('0x157'),JSON[_0x2bd2('0x73')](_0x592a2d)));}}return _0x882097;};AGIVertices[_0x2bd2('0x12')]['ispeechtts']=function(_0x5d10ff){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x158'),_0x5d10ff['label']));if(!this[_0x2bd2('0x86')](_0x5d10ff[_0x2bd2('0x84')])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0xec'));}if(!this[_0x2bd2('0x86')](_0x5d10ff[_0x2bd2('0x5e')])){return this['channel']['noop'](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x159'),_0x5d10ff[_0x2bd2('0x5e')]));var _0x367a73=this[_0x2bd2('0x7f')]['sync'](this,_0x5d10ff);if(_0x367a73){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')]('ispeech\x20%s\x20file\x20created',_0x367a73));var _0xf9f459=this[_0x2bd2('0xf')][_0x2bd2('0x108')](_0x367a73,_0x5d10ff[_0x2bd2('0x138')]);try{fs[_0x2bd2('0x109')](_0x367a73+_0x2bd2('0x10a'));}catch(_0x613267){logger[_0x2bd2('0x2f')](_0x613267);}return _0xf9f459;}return this['channel']['error'](_0x5d10ff,_0x2bd2('0x15a'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x15b')]=function(_0x29c51e){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x15c'),_0x29c51e['label']));if(!this[_0x2bd2('0x86')](_0x29c51e[_0x2bd2('0x15d')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x29c51e,'no\x20find\x20by\x20configured');}logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x15e'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x29c51e[_0x2bd2('0x15d')]));var _0x521480=this[_0x2bd2('0x56')][_0x2bd2('0xa9')](this,_0x29c51e[_0x2bd2('0x15d')]);if(_0x521480){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x15f'),this[_0x2bd2('0xf')]['callerid'],_0x29c51e[_0x2bd2('0x15d')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0x15f'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x29c51e[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x160')};}else{logger[_0x2bd2('0x32')](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel']['callerid'],_0x29c51e[_0x2bd2('0x15d')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0x161'),this[_0x2bd2('0xf')]['callerid'],_0x29c51e['findBy']));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x162')]=function(_0x2ac555){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x163'),_0x2ac555[_0x2bd2('0x39')]));if(!this['isConfigured'](_0x2ac555[_0x2bd2('0x15d')])){return this[_0x2bd2('0xf')]['error'](_0x2ac555,'no\x20find\x20by\x20configured');}logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x15e'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2ac555[_0x2bd2('0x15d')]));var _0x4e5575=this[_0x2bd2('0x55')][_0x2bd2('0xa9')](this,_0x2ac555['findBy']);if(_0x4e5575){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x15f'),this[_0x2bd2('0xf')]['callerid'],_0x2ac555['findBy']));this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2ac555[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x160')};}else{logger['info'](util['format']('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2ac555[_0x2bd2('0x15d')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x161'),this['channel'][_0x2bd2('0x3c')],_0x2ac555[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x164')};}};AGIVertices['prototype']['math']=function(_0x23c385){logger['info'](util['format']('Enter\x20in\x20MATH\x20(%s)\x20block',_0x23c385[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x23c385[_0x2bd2('0x165')])){return this['channel'][_0x2bd2('0x2f')](_0x23c385,_0x2bd2('0x166'));}this['channel']['noop'](util[_0x2bd2('0x2b')]('math\x20%s',_0x23c385['operation']));var _0x18249c=eval(_0x23c385['operation']);if(!this[_0x2bd2('0x86')](_0x23c385[_0x2bd2('0xdd')])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0xde'));}var _0x56b3ef=this[_0x2bd2('0x13')]['sync'](this,_0x23c385['variable_id']);if(!_0x56b3ef){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x23c385,_0x2bd2('0xdf'));}if(_[_0x2bd2('0x9f')](_0x18249c)){var _0x19b152=this;_0x18249c[_0x2bd2('0xe0')](function(_0x1e6571,_0x2cc690){_0x19b152['channel'][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')]('%s[%s]',_0x56b3ef,_0x2cc690),_0x1e6571);});return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x167'),_0x56b3ef));}else{return this['channel'][_0x2bd2('0xa1')](_0x56b3ef,_0x18249c);}};AGIVertices[_0x2bd2('0x12')]['menu']=function(_0x3d32a7){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x168'),_0x3d32a7[_0x2bd2('0x39')]));if(_0x3d32a7[_0x2bd2('0xaa')]===0x0){return this['maxRetry'](_0x3d32a7);}_0x3d32a7[_0x2bd2('0xaa')]-=0x1;if(!this[_0x2bd2('0x86')](_0x3d32a7[_0x2bd2('0x119')])){return this['channel'][_0x2bd2('0x2f')](_0x3d32a7,_0x2bd2('0x11a'));}var _0x3ad9f6=this[_0x2bd2('0x1f')][_0x2bd2('0xa9')](this,_0x3d32a7[_0x2bd2('0x119')]);if(!_0x3ad9f6){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x3d32a7,'no\x20file\x20audio\x20found');}var _0x22562c=this['channel'][_0x2bd2('0x11c')](_0x3ad9f6,_0x3d32a7[_0x2bd2('0x11d')],_0x3d32a7[_0x2bd2('0x169')]);var _0x1d7146=_0x22562c[_0x2bd2('0xa5')];if(_0x22562c['result']===-0x1){this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x3d32a7,'-1');return _0x22562c;}else if(_0x22562c[_0x2bd2('0xa3')]===_0x2bd2('0x68')){_0x22562c[_0x2bd2('0xa5')]=_0x22562c[_0x2bd2('0xa5')][_0x2bd2('0xa0')]>0x0?_0x22562c[_0x2bd2('0xa5')]:'t';}else if(_[_0x2bd2('0x46')](_0x22562c[_0x2bd2('0xa5')])){_0x22562c[_0x2bd2('0xa5')]='#';_0x1d7146='#';}if(!this[_0x2bd2('0x86')](_0x3d32a7[_0x2bd2('0xdd')])){this[_0x2bd2('0xf')]['noop'](_0x2bd2('0xde'));}else{var _0x103eef=this[_0x2bd2('0x13')]['sync'](this,_0x3d32a7[_0x2bd2('0xdd')]);if(!_0x103eef){return this['channel'][_0x2bd2('0x2f')](_0x3d32a7,_0x2bd2('0xdf'));}this[_0x2bd2('0xf')]['setVariable'](_0x103eef,_0x1d7146);}this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x3d32a7,_0x1d7146);return _0x22562c;};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0xac')]=function(_0x1035dc){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0x16a'),_0x1035dc['label']));return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x1035dc[_0x2bd2('0x16b')]||_0x1035dc[_0x2bd2('0x39')]);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x16c')]=function(_0x1f641e){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x16d'),_0x1f641e[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x1f641e[_0x2bd2('0x15d')])){return this['channel'][_0x2bd2('0x2f')](_0x1f641e,_0x2bd2('0x16e'));}logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x15e'),this['channel'][_0x2bd2('0x3c')],_0x1f641e[_0x2bd2('0x15d')]));var _0x4ff9e6=this[_0x2bd2('0x4f')][_0x2bd2('0xa9')](this,_0x1f641e[_0x2bd2('0x16f')]);var _0x477c80=this['agentPause']['sync'](this,_0x1f641e[_0x2bd2('0x15d')],_0x4ff9e6);if(_0x477c80){logger[_0x2bd2('0x32')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x1f641e[_0x2bd2('0x15d')]));this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this['channel']['callerid'],_0x1f641e[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x160')};}else{logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x161'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x1f641e['findBy']));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x1f641e[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x164')};}};AGIVertices['prototype'][_0x2bd2('0x170')]=function(_0x1bbdd0){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x171'),_0x1bbdd0[_0x2bd2('0x39')]));if(!this['isConfigured'](_0x1bbdd0['file_id'])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1bbdd0,_0x2bd2('0x11a'));}var _0x57f039=this[_0x2bd2('0x1f')][_0x2bd2('0xa9')](this,_0x1bbdd0[_0x2bd2('0x119')]);if(!_0x57f039){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1bbdd0,_0x2bd2('0x11b'));}var _0x228a6e=this[_0x2bd2('0xf')][_0x2bd2('0x5a')]('PLAYBACK',[_0x57f039,_0x1bbdd0[_0x2bd2('0x172')]]);if(_0x228a6e[_0x2bd2('0xa5')]===-0x1){return _0x228a6e;}return this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xca'),_0x2bd2('0x173'),_0x57f039));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x174')]=function(_0x18d918){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20QUEUE\x20(%s)\x20block',_0x18d918['label']));if(!this[_0x2bd2('0x86')](_0x18d918[_0x2bd2('0x175')])){return this['channel']['error'](_0x18d918,_0x2bd2('0x176'));}var _0x109b42='';var _0x5f3613=parseInt(_0x18d918['queue_id'],0xa);if(isNaN(_0x5f3613)){_0x109b42=_0x18d918[_0x2bd2('0x175')];}else{_0x109b42=this[_0x2bd2('0x16')][_0x2bd2('0xa9')](this,_0x18d918[_0x2bd2('0x175')]);if(!_0x109b42){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x18d918,_0x2bd2('0x177'));}}var _0x75f0e4='';if(this[_0x2bd2('0x86')](_0x18d918[_0x2bd2('0x119')])){var _0x2f209d=this[_0x2bd2('0x1f')][_0x2bd2('0xa9')](this,_0x18d918['file_id']);if(_0x2f209d){_0x75f0e4=_0x2f209d;}}this['createSquareDetailsReport'][_0x2bd2('0xa9')](this,_0x18d918,_0x109b42);if(_0x18d918[_0x2bd2('0x172')][_0x2bd2('0x178')]('x')<0x0){_0x18d918[_0x2bd2('0x172')]+='x';}if(_0x18d918['opts'][_0x2bd2('0x178')]('X')<0x0){_0x18d918[_0x2bd2('0x172')]+='X';}this[_0x2bd2('0xf')][_0x2bd2('0xa1')](_0x2bd2('0x179'),_0x109b42?_0x109b42['toLowerCase']():'');var _0x4a064f=this[_0x2bd2('0xf')][_0x2bd2('0x5a')]('QUEUE',[_0x109b42,_0x18d918[_0x2bd2('0x172')],_0x18d918['url'],_0x75f0e4,_0x18d918['timeout'],_0x18d918[_0x2bd2('0xbb')],_0x18d918[_0x2bd2('0x17a')],_0x18d918[_0x2bd2('0x17b')],'',_0x18d918[_0x2bd2('0x17c')]]);if(_0x4a064f[_0x2bd2('0xa5')]===-0x1){return _0x4a064f;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xca'),_0x2bd2('0x17d'),_0x109b42));};AGIVertices[_0x2bd2('0x12')]['record']=function(_0xc225f9){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x17e'),_0xc225f9['label']));var _0xe19ee1=_0xc225f9[_0x2bd2('0x17f')]||_0x2bd2('0x13e');var _0x485d8a=util[_0x2bd2('0x2b')](_0x2bd2('0x180'),this[_0x2bd2('0xf')][_0x2bd2('0x38')],rs[_0x2bd2('0x137')](0x5));var _0x432879=util[_0x2bd2('0x2b')](_0x2bd2('0x181'),FILES_PATH,_0x485d8a,_0xe19ee1);var _0xb5a229=util['format'](_0x2bd2('0x136'),FILES_PATH,_0x485d8a);this[_0x2bd2('0x3b')]['sync'](this,_0xc225f9,_0x485d8a,_0x432879);this['channel'][_0x2bd2('0xa1')](_0x2bd2('0x182'),_0x485d8a);logger[_0x2bd2('0x32')](_0x2bd2('0x183'),_0xb5a229,_0xe19ee1,_0xc225f9['escape_digits'],_0xc225f9['timeout']);return this['channel'][_0x2bd2('0x154')](_0xb5a229,_0xe19ee1,_0xc225f9[_0x2bd2('0x184')],_0xc225f9[_0x2bd2('0x68')],undefined,!![]);};AGIVertices[_0x2bd2('0x12')]['restapi']=function(_0x36dd46){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x185'),_0x36dd46[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x36dd46['url'])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0x186'));}var _0x987c6c=this[_0x2bd2('0x64')]['sync'](this,_0x36dd46);logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Response:',util[_0x2bd2('0x187')](_0x987c6c,{'showHidden':![],'depth':null})));if(!this[_0x2bd2('0x86')](_0x36dd46['variable_id'])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0x188'));}var _0x12cfb8=this[_0x2bd2('0x13')][_0x2bd2('0xa9')](this,_0x36dd46[_0x2bd2('0xdd')]);if(!_0x12cfb8){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x36dd46,'no\x20variable\x20found');}this['channel']['setVariable'](util[_0x2bd2('0x2b')](_0x2bd2('0x189'),_0x12cfb8),_0x987c6c[_0x2bd2('0x75')]?_0x987c6c['statusCode']:_0x2bd2('0x18a'));this[_0x2bd2('0xf')][_0x2bd2('0xa1')](util[_0x2bd2('0x2b')](_0x2bd2('0x18b'),_0x12cfb8),_0x987c6c[_0x2bd2('0x18c')]?_0x987c6c[_0x2bd2('0x18c')]:'OK');if(_0x987c6c[_0x2bd2('0x72')]){try{this[_0x2bd2('0x9c')](_0x987c6c[_0x2bd2('0x72')],_0x12cfb8);}catch(_0x13d2ab){logger['error'](util[_0x2bd2('0x2b')](_0x2bd2('0x18d'),_0x12cfb8));}}return this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0xe2'),_0x12cfb8));};AGIVertices['prototype'][_0x2bd2('0x18e')]=function(_0x3324ae){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x18f'),_0x3324ae['label']));return this[_0x2bd2('0xf')]['sayDigits'](_0x3324ae[_0x2bd2('0x190')][_0x2bd2('0x5c')](/\s+/g,''),_0x3324ae[_0x2bd2('0x184')]);};AGIVertices[_0x2bd2('0x12')]['saynumber']=function(_0x4f57b4){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0x191'),_0x4f57b4[_0x2bd2('0x39')]));return this[_0x2bd2('0xf')][_0x2bd2('0x192')](_0x4f57b4[_0x2bd2('0x67')]['replace'](/\s+/g,''),_0x4f57b4['escape_digits']);};AGIVertices['prototype'][_0x2bd2('0x193')]=function(_0x400b35){logger['info'](util[_0x2bd2('0x2b')](_0x2bd2('0x194'),_0x400b35[_0x2bd2('0x39')]));return this[_0x2bd2('0xf')][_0x2bd2('0x195')](_0x400b35[_0x2bd2('0x5e')],_0x400b35['escape_digits']);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x196')]=function(_0xadd944){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x197'),_0xadd944[_0x2bd2('0x39')]));if(!this['isConfigured'](_0xadd944['account_id'])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x198'));}var _0x1d1d97=this[_0x2bd2('0x199')][_0x2bd2('0xa9')](this,_0xadd944[_0x2bd2('0x19a')]);if(!_0x1d1d97||!_0x1d1d97[_0x2bd2('0x19b')]){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0xadd944,'no\x20mail\x20account\x20found');}var _0x31bf8f={'from':util['format'](_0x2bd2('0x19c'),_0x1d1d97[_0x2bd2('0x18')],_0x1d1d97[_0x2bd2('0x19d')]||_0x1d1d97[_0x2bd2('0x19b')][_0x2bd2('0x19e')]),'to':_0xadd944['to']||'','cc':_0xadd944['cc']||'','bcc':_0xadd944[_0x2bd2('0x19f')]||'','subject':_0xadd944[_0x2bd2('0x1a0')],'html':_0xadd944['text'],'text':_0xadd944[_0x2bd2('0x5e')]};var _0xc32e39={'tls':{'rejectUnauthorized':![]}};if(_0x1d1d97[_0x2bd2('0x19b')][_0x2bd2('0x1a1')]){_0xc32e39[_0x2bd2('0x1a1')]=_0x1d1d97[_0x2bd2('0x19b')]['service'];}else{_0xc32e39[_0x2bd2('0x1a2')]=_0x1d1d97[_0x2bd2('0x19b')][_0x2bd2('0x1a2')];_0xc32e39[_0x2bd2('0x1a3')]=_0x1d1d97[_0x2bd2('0x19b')][_0x2bd2('0x1a3')];_0xc32e39[_0x2bd2('0x1a4')]=_0x1d1d97[_0x2bd2('0x19b')][_0x2bd2('0x1a4')];}if(_0x1d1d97['Smtp'][_0x2bd2('0x1a5')]){_0xc32e39['auth']={'user':_0x1d1d97[_0x2bd2('0x19b')]['user'],'pass':_0x1d1d97[_0x2bd2('0x19b')]['pass']};}if(this[_0x2bd2('0x86')](_0xadd944['template_id'])){}logger['debug'](_0x2bd2('0x1a6'),JSON[_0x2bd2('0x73')](_0x31bf8f));this[_0x2bd2('0xa8')]['sync'](this,_0xadd944,_0xadd944[_0x2bd2('0x19a')]);this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x1a7'),_0x1d1d97[_0x2bd2('0x18')]));this[_0x2bd2('0x23')][_0x2bd2('0xa9')](this,_0xc32e39,_0x31bf8f);return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x1a8'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1a9')]=function(_0x5f553e){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1aa'),_0x5f553e['label']));return this[_0x2bd2('0xf')][_0x2bd2('0xac')]('SENDFAX\x20block\x20not\x20implemented');};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1ab')]=function(_0x19661c){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x1ac'),_0x19661c[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x19661c['sms_account_id'])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x1ad'));}var _0x28cc07=this[_0x2bd2('0x1ae')]['sync'](this,_0x19661c[_0x2bd2('0x1af')]);if(!_0x28cc07){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x19661c,'no\x20sms\x20account\x20found');}var _0x1a7c4d={'body':_0x19661c['sms_text'],'phone':_0x19661c['to']||'','SmsAccountId':_0x28cc07['id']};logger[_0x2bd2('0x1b0')](_0x2bd2('0x1b1'),JSON[_0x2bd2('0x73')](_0x1a7c4d));this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x19661c,_0x19661c['sms_account_id']);this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')]('Trying\x20SendSMS\x20with\x20account\x20%s',_0x28cc07[_0x2bd2('0x18')]));this[_0x2bd2('0x37')][_0x2bd2('0xa9')](this,_0x1a7c4d);return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x1b2'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1b3')]=function(_0x1cd9e1){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1b4'),_0x1cd9e1[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x1cd9e1[_0x2bd2('0xdd')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1cd9e1,_0x2bd2('0x1b5'));}var _0x10ea15=this[_0x2bd2('0x13')][_0x2bd2('0xa9')](this,_0x1cd9e1[_0x2bd2('0xdd')]);if(!_0x10ea15){return this['channel'][_0x2bd2('0x2f')](_0x1cd9e1,'no\x20variable\x20found');}return this[_0x2bd2('0xf')][_0x2bd2('0xa1')](_0x10ea15,_0x1cd9e1[_0x2bd2('0x1b6')]);};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1b7')]=function(_0x2f05a3){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1b8'),_0x2f05a3[_0x2bd2('0x39')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')]('START\x20CALLY\x20SQUARE');if(_0x2f05a3['answer']===_0x2bd2('0x1b9')){this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0x1ba'));return this['channel'][_0x2bd2('0xbe')]();}return this[_0x2bd2('0xf')]['noop']('Skipped\x20Answer');};AGIVertices['prototype'][_0x2bd2('0x1bb')]=function(_0x1c267e){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('Enter\x20in\x20SUBPROJECT\x20(%s)\x20block',_0x1c267e[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x1c267e[_0x2bd2('0x1bc')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1c267e,_0x2bd2('0x1bd'));}var _0x25bdcf=this[_0x2bd2('0x19')][_0x2bd2('0xa9')](this,_0x1c267e[_0x2bd2('0x1bc')]);if(!this[_0x2bd2('0x86')](_0x25bdcf)){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x1c267e,util[_0x2bd2('0x2b')]('no\x20subproject\x20found\x20with\x20id\x20%d',_0x1c267e['project_id']));}if(_0x25bdcf===this[_0x2bd2('0xf')][_0x2bd2('0x43')]){return this['channel']['error'](_0x1c267e,_0x2bd2('0x1be'));}this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x1c267e,_0x25bdcf);var _0x5e9c50=this['channel'][_0x2bd2('0x5a')](_0x2bd2('0x1bf'),util[_0x2bd2('0x2b')](_0x2bd2('0x1c0'),config[_0x2bd2('0xbb')][_0x2bd2('0x1a2')]||'127.0.0.1',_0x25bdcf,this[_0x2bd2('0xf')]['arg_1']));if(_0x5e9c50['result']===-0x1){return _0x5e9c50;}return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0xca'),_0x2bd2('0x1bf'),_0x25bdcf));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1c1')]=function(_0x52f06f){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1c2'),_0x52f06f[_0x2bd2('0x39')]));var _0x31ea9d=this[_0x2bd2('0x59')][_0x2bd2('0xa9')](this,_0x52f06f['command']);this[_0x2bd2('0xa8')][_0x2bd2('0xa9')](this,_0x52f06f,_0x52f06f[_0x2bd2('0x1c3')]);if(this[_0x2bd2('0x86')](_0x52f06f[_0x2bd2('0xdd')])){var _0x282588=this[_0x2bd2('0x13')][_0x2bd2('0xa9')](this,_0x52f06f['variable_id']);if(_0x282588){this['channel'][_0x2bd2('0xa1')](_0x282588,_0x31ea9d);return this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x1c4'),_0x52f06f[_0x2bd2('0x1c3')],_0x282588));}}return this['channel']['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0x1c5'),_0x52f06f[_0x2bd2('0x1c3')]));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1c6')]=function(_0x2ec6b0){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x1c7'),_0x2ec6b0['label']));_0x2ec6b0['text']=_0x2ec6b0['text'][_0x2bd2('0x5c')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x2bd2('0x86')](_0x2ec6b0[_0x2bd2('0x5d')])){return this[_0x2bd2('0xf')]['noop'](_0x2bd2('0x1c8'));}if(!this[_0x2bd2('0x86')](_0x2ec6b0[_0x2bd2('0x5e')])){return this['channel'][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xac')](util['format'](_0x2bd2('0x1c9'),_0x2ec6b0[_0x2bd2('0x5e')]));var _0x2f3acb=this['googleCloudTTS']['sync'](this,_0x2ec6b0);if(_0x2f3acb){this[_0x2bd2('0xf')]['noop'](util[_0x2bd2('0x2b')](_0x2bd2('0x1ca'),_0x2f3acb));var _0x1a0d3e=this[_0x2bd2('0xf')][_0x2bd2('0x108')](_0x2f3acb);try{fs[_0x2bd2('0x109')](_0x2f3acb+_0x2bd2('0x10a'));}catch(_0x1a3282){logger[_0x2bd2('0x2f')](_0x1a3282);}return _0x1a0d3e;}return this[_0x2bd2('0xf')]['error'](_0x2ec6b0,'Google\x20Cloud\x20TTS\x20is\x20unreachable');};AGIVertices['prototype'][_0x2bd2('0x1cb')]=function(_0x22042c){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1cc'),_0x22042c['label']));_0x22042c['text']=_0x22042c[_0x2bd2('0x5e')][_0x2bd2('0x5c')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x22042c[_0x2bd2('0x5e')])){return this[_0x2bd2('0xf')][_0x2bd2('0xac')](_0x2bd2('0xcf'));}this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x1cd'),_0x22042c['text']));var _0x28deb4=this[_0x2bd2('0x62')]['sync'](this,_0x22042c);if(_0x28deb4){this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x1ce'),_0x28deb4));var _0x47cc6c=this['channel'][_0x2bd2('0x108')](_0x28deb4);try{fs[_0x2bd2('0x109')](_0x28deb4+_0x2bd2('0x10a'));}catch(_0x4eb86e){logger[_0x2bd2('0x2f')](_0x4eb86e);}return _0x47cc6c;}return this['channel'][_0x2bd2('0x2f')](_0x22042c,_0x2bd2('0x1cf'));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1d0')]=function(_0x2474bd){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1d1'),_0x2474bd[_0x2bd2('0x39')]));if(!this[_0x2bd2('0x86')](_0x2474bd[_0x2bd2('0x15d')])){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0x2474bd,'no\x20find\x20by\x20configured');}logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x15e'),this['channel'][_0x2bd2('0x3c')],_0x2474bd[_0x2bd2('0x15d')]));var _0x3c04bb=this[_0x2bd2('0x54')][_0x2bd2('0xa9')](this,_0x2474bd['findBy']);if(_0x3c04bb){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x15f'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2474bd[_0x2bd2('0x15d')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x15f'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2474bd[_0x2bd2('0x15d')]));return{'code':0xc8,'result':'success'};}else{logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x2bd2('0xf')]['callerid'],_0x2474bd[_0x2bd2('0x15d')]));this[_0x2bd2('0xf')][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0x161'),this[_0x2bd2('0xf')][_0x2bd2('0x3c')],_0x2474bd[_0x2bd2('0x15d')]));return{'code':0xc8,'result':_0x2bd2('0x164')};}};AGIVertices[_0x2bd2('0x12')]['voicemail']=function(_0xae8cd4){logger[_0x2bd2('0x32')](util['format'](_0x2bd2('0x1d2'),_0xae8cd4[_0x2bd2('0x39')]));var _0x51c46f=this['channel'][_0x2bd2('0x5a')](_0x2bd2('0x1d3'),[_0xae8cd4[_0x2bd2('0x1d4')],_0xae8cd4[_0x2bd2('0x77')]]);if(_0x51c46f[_0x2bd2('0xa5')]===-0x1){return _0x51c46f;}return this['channel'][_0x2bd2('0xac')](util[_0x2bd2('0x2b')](_0x2bd2('0xca'),_0x2bd2('0x1d3'),_0xae8cd4[_0x2bd2('0x1d4')]));};AGIVertices[_0x2bd2('0x12')][_0x2bd2('0x1d5')]=function(_0xd7950a){logger[_0x2bd2('0x32')](util[_0x2bd2('0x2b')](_0x2bd2('0x1d6'),_0xd7950a['label']));if(!this[_0x2bd2('0x86')](_0xd7950a[_0x2bd2('0xdd')])){return this['channel'][_0x2bd2('0x2f')](_0xd7950a,_0x2bd2('0x1b5'));}var _0x5726c6=this[_0x2bd2('0x13')]['sync'](this,_0xd7950a[_0x2bd2('0xdd')]);if(!_0x5726c6){return this[_0x2bd2('0xf')][_0x2bd2('0x2f')](_0xd7950a,'no\x20variable\x20found');}var _0x27aae1=this[_0x2bd2('0xf')]['getVariable'](_0x5726c6);return{'code':0xc8,'result':_0x27aae1[_0x2bd2('0xa3')]?_0x27aae1[_0x2bd2('0xa3')]:'-'};};String[_0x2bd2('0x12')][_0x2bd2('0x1d7')]=function(_0x244ef7,_0x5183bb){return this['split'](_0x244ef7)[_0x2bd2('0x1d8')](_0x5183bb);};module[_0x2bd2('0x1d9')]=AGIVertices; \ No newline at end of file diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js index 6854117..64bdf27 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 _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 +var _0x6847=['syncAttendedTransfer','blindtransfer','syncBlindTransfer','milliseconds','diff','seconds','prototype','startAcw','queue','mandatoryDisposition','mandatoryDispositionPause','name','Action','QueuePause','getAgent','voicePause','info','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','then','timers','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','timer','lastPauseAt','format','YYYY-MM-DD\x20HH:mm:ss','updateAcw','update','[%s][UPDATE][ACWTIME:%s]','catch','error','[%s][UPDATE][ERRORS:%s]','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','finally','stopAcw','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','[ACW][STOP]\x20%s','syncAgentConnect','interface','uniqueid','[ACW][syncAgentConnect]\x20%s','message','[%s][HANGUP:UNIQUEID]','isUndefined','[%s][HANGUP:LINKEDID]','linkedid','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','stringify','[%s][BLINDTRANSFER:LINKEDID]','transfererlinkedid','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','util','moment','../../../config/logger','acw','../rpc/voiceAgentReport','voiceQueues','agents','channels','bind','hanguprequest','syncHangupRequest','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','attendedtransfer'];(function(_0x2f8530,_0x5cbd67){var _0x5e814e=function(_0x490b29){while(--_0x490b29){_0x2f8530['push'](_0x2f8530['shift']());}};_0x5e814e(++_0x5cbd67);}(_0x6847,0x96));var _0x7684=function(_0x90a39a,_0x32020d){_0x90a39a=_0x90a39a-0x0;var _0x2b62f7=_0x6847[_0x90a39a];return _0x2b62f7;};'use strict';var util=require(_0x7684('0x0'));var _=require('lodash');var moment=require(_0x7684('0x1'));var ami=require('../ami');var logger=require(_0x7684('0x2'))(_0x7684('0x3'));var RpcUser=require('../rpc/user');var RpcVoiceAgentReport=require(_0x7684('0x4'));function Acw(_0x3a93f5){this[_0x7684('0x5')]=_0x3a93f5[_0x7684('0x5')];this[_0x7684('0x6')]=_0x3a93f5['agents'];this['timers']=_0x3a93f5['timers'];this[_0x7684('0x7')]={};ami['on']('agentconnect',this['syncAgentConnect'][_0x7684('0x8')](this));ami['on'](_0x7684('0x9'),this[_0x7684('0xa')][_0x7684('0x8')](this));ami['on'](_0x7684('0xb'),this[_0x7684('0xc')][_0x7684('0x8')](this));ami['on'](_0x7684('0xd'),this[_0x7684('0xe')]['bind'](this));ami['on'](_0x7684('0xf'),this[_0x7684('0x10')][_0x7684('0x8')](this));ami['on'](_0x7684('0x11'),this[_0x7684('0x12')]['bind'](this));ami['on']('custom:agentConnectPreview',this['syncAgentConnectPreview'][_0x7684('0x8')](this));}function getDiff(_0x90f3a){var _0x4833c7=moment()['milliseconds'](0x0);var _0x22ca8f=moment(_0x90f3a)[_0x7684('0x13')](0x0);return _0x4833c7[_0x7684('0x14')](_0x22ca8f,_0x7684('0x15'));}Acw[_0x7684('0x16')][_0x7684('0x17')]=function(_0xffbe34){try{var _0x56b63c=this;var _0x1cbd5c=this[_0x7684('0x7')][_0xffbe34]['interface'];var _0x28a93a=this[_0x7684('0x7')][_0xffbe34][_0x7684('0x18')];var _0x5c8f53=this[_0x7684('0x5')][_0x28a93a];var _0x649abd=![];var _0x58b02a='ACW';if(_0x5c8f53[_0x7684('0x19')]){if(_0x5c8f53[_0x7684('0x1a')][_0x7684('0x1b')]){_0x649abd=!![];_0x58b02a=_0x5c8f53[_0x7684('0x1a')]['name'];}}ami[_0x7684('0x1c')]({'action':_0x7684('0x1d'),'interface':_0x1cbd5c,'paused':!![],'reason':_0x58b02a})['then'](function(_0x4b2a68){if(_0x56b63c[_0x7684('0x6')][_0x1cbd5c]){return RpcUser[_0x7684('0x1e')](_0x56b63c[_0x7684('0x6')][_0x1cbd5c]['id'])['then'](function(_0x55ed6e){if(_0x55ed6e&&!_0x55ed6e[_0x7684('0x1f')]){logger[_0x7684('0x20')](_0x7684('0x21'),_0xffbe34,_0x1cbd5c,_0x28a93a);var _0x5554b1=_0x56b63c[_0x7684('0x7')][_0xffbe34][_0x7684('0x22')]&&_0x56b63c[_0x7684('0x7')][_0xffbe34][_0x7684('0x23')]?_0x56b63c[_0x7684('0x7')][_0xffbe34]['destlinkedid']:_0xffbe34;return RpcUser[_0x7684('0x24')](_0x56b63c[_0x7684('0x6')][_0x1cbd5c],_0x58b02a,_0x5554b1)[_0x7684('0x25')](function(_0x57b5b3){if(!_0x649abd){_0x56b63c[_0x7684('0x26')][_0x1cbd5c]={};logger[_0x7684('0x20')](_0x7684('0x27'),_0xffbe34,_0x56b63c[_0x7684('0x5')][_0x28a93a][_0x7684('0x28')],_0x1cbd5c,_0x28a93a);_0x56b63c[_0x7684('0x26')][_0x1cbd5c][_0x7684('0x29')]=setTimeout(_0x56b63c['stopAcw'][_0x7684('0x8')](_0x56b63c,_0x1cbd5c),_0x56b63c['voiceQueues'][_0x28a93a][_0x7684('0x28')]*0x3e8);_0x56b63c['timers'][_0x1cbd5c][_0x7684('0x2a')]=moment()[_0x7684('0x2b')](_0x7684('0x2c'));_0x56b63c[_0x7684('0x26')][_0x1cbd5c]['uniqueid']=_0xffbe34;_0x56b63c[_0x7684('0x26')][_0x1cbd5c]['queue']=_0x28a93a;_0x56b63c[_0x7684('0x26')][_0x1cbd5c][_0x7684('0x2d')]=function(){var _0x436b3f=getDiff(_0x56b63c[_0x7684('0x26')][_0x1cbd5c]['lastPauseAt']);clearTimeout(_0x56b63c[_0x7684('0x26')][_0x1cbd5c]['timer']);_0x56b63c[_0x7684('0x26')][_0x1cbd5c][_0x7684('0x29')]=![];RpcVoiceAgentReport[_0x7684('0x2e')]({'acwtime':_0x436b3f},_0x56b63c['timers'][_0x1cbd5c]['uniqueid'],_0x1cbd5c)[_0x7684('0x25')](function(_0x541fec){logger['info'](_0x7684('0x2f'),_0xffbe34,_0x436b3f,_0x541fec);})[_0x7684('0x30')](function(_0xfe198b){logger[_0x7684('0x31')](_0x7684('0x32'),_0xffbe34,_0xfe198b);});delete _0x56b63c[_0x7684('0x26')][_0x1cbd5c];};}});}else{logger['info'](_0x7684('0x33'),_0xffbe34,_0x1cbd5c,_0x28a93a);}});}})[_0x7684('0x30')](function(_0x5e99f7){logger[_0x7684('0x31')](_0x7684('0x27'),_0xffbe34,_0x56b63c[_0x7684('0x5')][_0x28a93a]['acwTimeout'],_0x1cbd5c,_0x28a93a);})[_0x7684('0x34')](function(){delete _0x56b63c['channels'][_0xffbe34];});}catch(_0x442a62){logger[_0x7684('0x31')]('[ACW][START]\x20%s',_0x442a62['message']);}};Acw[_0x7684('0x16')][_0x7684('0x35')]=function(_0x1b8293){try{var _0xd858f5=this;if(_0xd858f5[_0x7684('0x26')][_0x1b8293]){_0xd858f5[_0x7684('0x26')][_0x1b8293][_0x7684('0x29')]=![];var _0x2e4326=_0xd858f5[_0x7684('0x26')][_0x1b8293]['uniqueid'];var _0x1c46f5=_0xd858f5['timers'][_0x1b8293][_0x7684('0x18')];var _0x40463f=_0xd858f5[_0x7684('0x5')][_0x1c46f5][_0x7684('0x28')];logger[_0x7684('0x20')]('[%s][TIMER][STOP][AGENT:%s]',_0x2e4326,_0x1b8293);RpcUser['saveUnpause'](this[_0x7684('0x6')][_0x1b8293]);RpcVoiceAgentReport[_0x7684('0x2e')]({'acwtime':_0x40463f,'agentacw':!![]},_0x2e4326,_0x1b8293)[_0x7684('0x25')](function(_0x808698){logger[_0x7684('0x20')](_0x7684('0x2f'),_0x2e4326,_0x40463f,_0x808698);})[_0x7684('0x30')](function(_0x4e4aab){logger['error'](_0x7684('0x32'),_0x2e4326,_0x4e4aab);});}else{logger['error'](_0x7684('0x36'),_0x1b8293);if(_0xd858f5['timers']){logger[_0x7684('0x20')](_0x7684('0x37'),JSON['stringify'](_0xd858f5[_0x7684('0x26')]));}}}catch(_0x3def0a){logger[_0x7684('0x31')](_0x7684('0x38'),_0x3def0a['message']);}};Acw['prototype'][_0x7684('0x39')]=function(_0x5eab28){try{if(this[_0x7684('0x5')][_0x5eab28['queue']]&&(this[_0x7684('0x5')][_0x5eab28[_0x7684('0x18')]][_0x7684('0x3')]||this[_0x7684('0x5')][_0x5eab28['queue']]['mandatoryDisposition'])){if(this['agents'][_0x5eab28[_0x7684('0x3a')]]){this[_0x7684('0x7')][_0x5eab28[_0x7684('0x3b')]]={'queue':_0x5eab28[_0x7684('0x18')],'interface':_0x5eab28[_0x7684('0x3a')],'destlinkedid':_0x5eab28[_0x7684('0x23')]};}}}catch(_0x582907){logger[_0x7684('0x31')](_0x7684('0x3c'),_0x582907[_0x7684('0x3d')]);}};Acw[_0x7684('0x16')]['syncAgentConnectPreview']=function(_0x44726a){try{if(this[_0x7684('0x5')][_0x44726a['queue']]&&(this[_0x7684('0x5')][_0x44726a[_0x7684('0x18')]][_0x7684('0x3')]||this['voiceQueues'][_0x44726a[_0x7684('0x18')]][_0x7684('0x19')])){if(this[_0x7684('0x6')][_0x44726a[_0x7684('0x3a')]]){this['channels'][_0x44726a[_0x7684('0x3b')]]={'queue':_0x44726a[_0x7684('0x18')],'interface':_0x44726a[_0x7684('0x3a')]};}}}catch(_0x17450c){logger[_0x7684('0x31')]('[ACW][syncAgentConnectPreview]\x20%s',_0x17450c[_0x7684('0x3d')]);}};Acw[_0x7684('0x16')][_0x7684('0xa')]=function(_0x4cab44){try{if(this[_0x7684('0x7')][_0x4cab44[_0x7684('0x3b')]]&&_['isUndefined'](this['channels'][_0x4cab44[_0x7684('0x3b')]][_0x7684('0x22')])){logger[_0x7684('0x20')](_0x7684('0x3e'),_0x4cab44[_0x7684('0x3b')]);this[_0x7684('0x17')](_0x4cab44[_0x7684('0x3b')]);}else if(this[_0x7684('0x7')][_0x4cab44['linkedid']]&&_[_0x7684('0x3f')](this[_0x7684('0x7')][_0x4cab44['linkedid']][_0x7684('0x22')])){logger['info'](_0x7684('0x40'),_0x4cab44[_0x7684('0x41')]);this[_0x7684('0x17')](_0x4cab44['linkedid']);}}catch(_0x3233bf){logger['error'](_0x7684('0x42'),_0x3233bf['message']);}};Acw[_0x7684('0x16')][_0x7684('0xc')]=function(_0x7d9918){try{if(this[_0x7684('0x7')][_0x7d9918[_0x7684('0x3b')]]&&this['channels'][_0x7d9918['uniqueid']][_0x7684('0x22')]){logger[_0x7684('0x20')]('[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]',_0x7d9918[_0x7684('0x3b')]);this[_0x7684('0x17')](_0x7d9918[_0x7684('0x3b')]);}else if(this['channels'][_0x7d9918[_0x7684('0x41')]]&&this[_0x7684('0x7')][_0x7d9918[_0x7684('0x41')]][_0x7684('0x22')]){logger[_0x7684('0x20')](_0x7684('0x43'),_0x7d9918[_0x7684('0x41')]);this[_0x7684('0x17')](_0x7d9918[_0x7684('0x41')]);}}catch(_0x165831){logger[_0x7684('0x31')]('[ACW][syncHangup]\x20%s',_0x165831[_0x7684('0x3d')]);}};Acw['prototype'][_0x7684('0x10')]=function(_0xa9400e){try{if(!_['isNil'](this['channels'][_0xa9400e[_0x7684('0x44')]])){this[_0x7684('0x17')](_0xa9400e[_0x7684('0x44')]);if(this['channels'][_0xa9400e[_0x7684('0x45')]]){this[_0x7684('0x7')][_0xa9400e['secondtransfereruniqueid']][_0x7684('0x22')]=!![];this[_0x7684('0x7')][_0xa9400e[_0x7684('0x46')]]=this[_0x7684('0x7')][_0xa9400e[_0x7684('0x45')]];delete this['channels'][_0xa9400e[_0x7684('0x45')]];}}else if(!_['isNil'](this['channels'][_0xa9400e['transfertargetuniqueid']])){this['startAcw'](_0xa9400e['transfertargetuniqueid']);if(this['channels'][_0xa9400e[_0x7684('0x47')]]){this[_0x7684('0x7')][_0xa9400e[_0x7684('0x47')]][_0x7684('0x22')]=!![];this[_0x7684('0x7')][_0xa9400e[_0x7684('0x44')]]=this[_0x7684('0x7')][_0xa9400e[_0x7684('0x47')]];delete this[_0x7684('0x7')][_0xa9400e['origtransfereruniqueid']];}}}catch(_0x195624){logger[_0x7684('0x31')](_0x7684('0x48'),_0x195624['message']);}};Acw[_0x7684('0x16')][_0x7684('0x12')]=function(_0x310160){try{if(this['channels'][_0x310160[_0x7684('0x49')]]){logger[_0x7684('0x20')]('[%s][BLINDTRANSFER:UNIQUEID]',JSON[_0x7684('0x4a')](_0x310160[_0x7684('0x49')]));this[_0x7684('0x17')](_0x310160[_0x7684('0x49')]);}else if(this[_0x7684('0x7')][_0x310160['transfererlinkedid']]){logger[_0x7684('0x20')](_0x7684('0x4b'),JSON[_0x7684('0x4a')](_0x310160['transfererlinkedid']));this[_0x7684('0x17')](_0x310160[_0x7684('0x4c')]);}}catch(_0xa4940f){logger['error']('[ACW][syncBlindTransfer]\x20%s',_0xa4940f[_0x7684('0x3d')]);}};Acw[_0x7684('0x16')]['syncAgentRingNoAnswer']=function(_0x17a7d6){try{if(this[_0x7684('0x5')][_0x17a7d6['queue']]&&this[_0x7684('0x5')][_0x17a7d6[_0x7684('0x18')]][_0x7684('0x4d')]===_0x7684('0x4e')){if(this[_0x7684('0x6')][_0x17a7d6[_0x7684('0x3a')]]){logger[_0x7684('0x20')](_0x7684('0x4f'),_0x17a7d6[_0x7684('0x3b')],_0x17a7d6['interface'],_0x17a7d6[_0x7684('0x18')]);return RpcUser[_0x7684('0x24')](this[_0x7684('0x6')][_0x17a7d6[_0x7684('0x3a')]],_0x7684('0x50'),_0x17a7d6['uniqueid']);}}}catch(_0x45c561){logger[_0x7684('0x31')](_0x7684('0x51'),_0x45c561[_0x7684('0x3d')]);}};module[_0x7684('0x52')]=Acw; \ No newline at end of file diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js index 52ee915..5aef6b2 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 _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 +var _0x2b31=['catch','log','exports','asterisk-manager','bluebird','util','lodash','../../config/logger','ami','asterisk','port','password','Action','action','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','error','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','username','sipshowregistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus','queuesummary','coreshowchannels','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','shutdown','info','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','actionSipShowRegistry','then','actionCoreShowChannels'];(function(_0x260eb3,_0x3f04b2){var _0x496725=function(_0x800b92){while(--_0x800b92){_0x260eb3['push'](_0x260eb3['shift']());}};_0x496725(++_0x3f04b2);}(_0x2b31,0xe7));var _0x12b3=function(_0xdd8e36,_0x49d8ce){_0xdd8e36=_0xdd8e36-0x0;var _0x8fbbbd=_0x2b31[_0xdd8e36];return _0x8fbbbd;};'use strict';var Manager=require(_0x12b3('0x0'));var BPromise=require(_0x12b3('0x1'));var moment=require('moment');var util=require(_0x12b3('0x2'));var _=require(_0x12b3('0x3'));var logger=require(_0x12b3('0x4'))(_0x12b3('0x5'));var config=require('../../config/environment');var ami=new Manager(config[_0x12b3('0x6')][_0x12b3('0x7')],config[_0x12b3('0x6')]['ip'],config[_0x12b3('0x6')]['username'],config[_0x12b3('0x6')][_0x12b3('0x8')],!![]);ami['keepConnected']();ami[_0x12b3('0x9')]=BPromise['promisify'](ami[_0x12b3('0xa')]);function error(_0x58333d){logger['error'](util[_0x12b3('0xb')](_0x12b3('0xc'),config[_0x12b3('0x6')]['username'],config[_0x12b3('0x6')]['ip'],config['asterisk'][_0x12b3('0x7')],util[_0x12b3('0xd')](_0x58333d,![],null)));}function close(){logger[_0x12b3('0xe')](util[_0x12b3('0xb')](_0x12b3('0xf'),config[_0x12b3('0x6')][_0x12b3('0x10')],config['asterisk']['ip'],config['asterisk'][_0x12b3('0x7')]));}ami['actionSipShowRegistry']=function(){return function(){return ami[_0x12b3('0x9')]({'action':_0x12b3('0x11')});};};ami[_0x12b3('0x12')]=function(){return function(){return ami[_0x12b3('0x9')]({'action':'devicestatelist'});};};ami[_0x12b3('0x13')]=function(){return function(){return ami[_0x12b3('0x9')]({'action':_0x12b3('0x14')});};};ami['actionQueueSummary']=function(){return function(){return ami[_0x12b3('0x9')]({'action':_0x12b3('0x15')});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0x12b3('0x9')]({'action':_0x12b3('0x16')});};};function connect(_0x59c7ec){logger['info'](util['format'](_0x12b3('0x17'),config['asterisk'][_0x12b3('0x10')],config[_0x12b3('0x6')]['ip'],config[_0x12b3('0x6')][_0x12b3('0x7')]));ami[_0x12b3('0x18')](_0x12b3('0xe'),error);ami[_0x12b3('0x18')](_0x12b3('0x19'),close);}ami['on']('connect',connect);ami['on'](_0x12b3('0x1a'),function(_0x570b37){logger[_0x12b3('0x1b')](util['format'](_0x12b3('0x1c'),config['asterisk'][_0x12b3('0x10')],config['asterisk']['ip'],config['asterisk'][_0x12b3('0x7')],util[_0x12b3('0xd')](_0x570b37,![],null)));});ami['on'](_0x12b3('0x1d'),function(_0x53d6a5){logger[_0x12b3('0x1b')](util[_0x12b3('0xb')](_0x12b3('0x1e'),config[_0x12b3('0x6')][_0x12b3('0x10')],config[_0x12b3('0x6')]['ip'],config[_0x12b3('0x6')][_0x12b3('0x7')]));return BPromise[_0x12b3('0x1f')]()['then'](ami[_0x12b3('0x20')]())['then'](ami[_0x12b3('0x12')]())[_0x12b3('0x21')](ami[_0x12b3('0x13')]())[_0x12b3('0x21')](ami['actionQueueSummary']())[_0x12b3('0x21')](ami[_0x12b3('0x22')]())[_0x12b3('0x23')](function(_0x29e282){console[_0x12b3('0x24')](_0x29e282);});});ami['once'](_0x12b3('0xe'),error);ami[_0x12b3('0x18')](_0x12b3('0x19'),close);module[_0x12b3('0x25')]=ami; \ No newline at end of file diff --git a/server/services/ami/client.js b/server/services/ami/client.js index 203cf13..ca68c07 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 _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 +var _0xe706=['result','catch','exports','jayson/promise','bluebird','../../config/logger','client','http','Request','request','then','debug','rpc','memberReport','error','message'];(function(_0x148c09,_0x4fd39f){var _0x18e613=function(_0xfaa810){while(--_0xfaa810){_0x148c09['push'](_0x148c09['shift']());}};_0x18e613(++_0x4fd39f);}(_0xe706,0xa3));var _0x6e70=function(_0x1e7944,_0x5a1ee7){_0x1e7944=_0x1e7944-0x0;var _0x4be825=_0xe706[_0x1e7944];return _0x4be825;};'use strict';var jayson=require(_0x6e70('0x0'));var BPromise=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('ami');var client=jayson[_0x6e70('0x3')][_0x6e70('0x4')]({'port':0x2329});client[_0x6e70('0x5')]=function(_0x7dfbc3,_0x142c27){return new BPromise(function(_0x2164a4,_0x376a8d){return client[_0x6e70('0x6')](_0x7dfbc3,_0x142c27)[_0x6e70('0x7')](function(_0x4381d1){logger[_0x6e70('0x8')](_0x6e70('0x9'),_0x6e70('0xa'),_0x7dfbc3,_0x142c27,_0x4381d1);if(_0x4381d1[_0x6e70('0xb')]){logger[_0x6e70('0xb')](_0x6e70('0x9'),_0x6e70('0xa'),_0x7dfbc3,_0x4381d1[_0x6e70('0xb')][_0x6e70('0xc')],_0x142c27);return _0x376a8d(_0x4381d1[_0x6e70('0xb')][_0x6e70('0xc')]);}else{return _0x2164a4(_0x4381d1[_0x6e70('0xd')]);}})[_0x6e70('0xe')](function(_0x4600f9){logger['error']('rpc',_0x6e70('0xa'),_0x7dfbc3,_0x4600f9,_0x142c27);return _0x376a8d(_0x4600f9);});});};module[_0x6e70('0xf')]=client; \ No newline at end of file diff --git a/server/services/ami/dialer/action.js b/server/services/ami/dialer/action.js index b9ba540..3274b90 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 _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 +var _0x767a=['recallme','originatecalleridname','prototype','getCaller','substring','getQueue','exports','util','lodash','moment','isNil','string','voiceQueue','uniqueid','name','Contact','phone','lastName','number','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','firstName','starttime','format','callbackuniqueid','callbackat'];(function(_0x342a1d,_0x4b712a){var _0x226c87=function(_0x2be269){while(--_0x2be269){_0x342a1d['push'](_0x342a1d['shift']());}};_0x226c87(++_0x4b712a);}(_0x767a,0x134));var _0xa767=function(_0x9cd4c3,_0x1c9b2c){_0x9cd4c3=_0x9cd4c3-0x0;var _0x4c9025=_0x767a[_0x9cd4c3];return _0x4c9025;};'use strict';var util=require(_0xa767('0x0'));var _=require(_0xa767('0x1'));var moment=require(_0xa767('0x2'));function checkNameSurname(_0x427ff4,_0x4075df,_0x18614e){var _0x377647='';if(!_['isNil'](_0x4075df)&&'string'===typeof _0x4075df){_0x377647+=_0x4075df;}if(!_[_0xa767('0x3')](_0x18614e)&&_0xa767('0x4')===typeof _0x18614e){_0x377647+='\x20'+_0x18614e;}if(_0x377647!==''){return _0x377647;}return _0x427ff4;}function Action(_0x527820,_0x5c9156,_0x4bff40){this[_0xa767('0x5')]=_0x527820;this[_0xa767('0x6')]=_0x4bff40||undefined;this[_0xa767('0x7')]=checkNameSurname(_0x5c9156[_0xa767('0x8')][_0xa767('0x9')],_0x5c9156['Contact']['firstName'],_0x5c9156['Contact'][_0xa767('0xa')]);this[_0xa767('0xb')]=_0x5c9156['Contact'][_0xa767('0x9')];this[_0xa767('0xc')]=_0x527820[_0xa767('0x7')];this['active']=_0x5c9156[_0xa767('0xd')]||![];this['type']=_0x527820[_0xa767('0xe')];this[_0xa767('0xf')]=_0x527820[_0xa767('0xf')]||0x3;this[_0xa767('0x10')]=_0x5c9156[_0xa767('0x10')];this[_0xa767('0x11')]=_0x5c9156['countbusyretry'];this['countcongestionretry']=_0x5c9156['countcongestionretry'];this[_0xa767('0x12')]=_0x5c9156[_0xa767('0x12')];this[_0xa767('0x13')]=_0x5c9156[_0xa767('0x13')];this[_0xa767('0x14')]=_0x5c9156[_0xa767('0x14')];this[_0xa767('0x15')]=_0x5c9156[_0xa767('0x15')];this[_0xa767('0x16')]=_0x5c9156[_0xa767('0x16')];this[_0xa767('0x17')]=_0x5c9156[_0xa767('0x17')];this[_0xa767('0x18')]=_0x5c9156[_0xa767('0x18')];this[_0xa767('0x19')]=_0x5c9156[_0xa767('0x19')];this['UserId']=_0x5c9156[_0xa767('0x1a')];this[_0xa767('0x1b')]=_0x5c9156[_0xa767('0x1b')];this[_0xa767('0x1c')]=_0x5c9156[_0xa767('0x1c')];this[_0xa767('0x1d')]=_0x5c9156['id'];this[_0xa767('0x1e')]=_0x5c9156[_0xa767('0x8')][_0xa767('0x1f')]||'';this[_0xa767('0x20')]=moment()[_0xa767('0x21')]('YYYY-MM-DD\x20HH:mm:ss');this['callback']=_0x5c9156['callback'];this['callbackuniqueid']=_0x5c9156[_0xa767('0x22')];this['callbackat']=_0x5c9156[_0xa767('0x23')];this[_0xa767('0x24')]=_0x5c9156['recallme'];this['originatecalleridnum']='';this[_0xa767('0x25')]='';}Action[_0xa767('0x26')][_0xa767('0x27')]=function(){return util[_0xa767('0x21')]('\x22%s\x22\x20<%s>',this['name'],this[_0xa767('0x5')]['dialCutDigit']>0x0?this[_0xa767('0xb')][_0xa767('0x28')](this['voiceQueue']['dialCutDigit']):this[_0xa767('0xb')]);};Action[_0xa767('0x26')][_0xa767('0x29')]=function(){return this[_0xa767('0xc')];};module[_0xa767('0x2a')]=Action; \ No newline at end of file diff --git a/server/services/ami/dialer/agentComplete.js b/server/services/ami/dialer/agentComplete.js index 51c9e8e..53b6d9a 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 _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 +var _0x3ef7=['holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','moment','milliseconds','diff','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime'];(function(_0x34d6bd,_0x55b744){var _0x248396=function(_0x23f061){while(--_0x23f061){_0x34d6bd['push'](_0x34d6bd['shift']());}};_0x248396(++_0x55b744);}(_0x3ef7,0xa2));var _0x73ef=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x3ef7[_0x2dafbe];return _0x58a45a;};'use strict';var util=require(_0x73ef('0x0'));var _=require('lodash');var moment=require(_0x73ef('0x1'));function getSeconds(_0x1fb7b0,_0x3a056d){var _0x261ec1=moment(_0x1fb7b0)[_0x73ef('0x2')](0x0);var _0x4c27e0=moment(_0x3a056d)[_0x73ef('0x2')](0x0);return _0x261ec1[_0x73ef('0x3')](_0x4c27e0,_0x73ef('0x4'));}function AgentComplete(_0x28c5dc,_0x4aaf96){this[_0x73ef('0x5')]=0x4;this[_0x73ef('0x6')]=_0x73ef('0x7');this[_0x73ef('0x8')]=_0x28c5dc[_0x73ef('0x8')];this['type']=_0x28c5dc[_0x73ef('0x9')];this[_0x73ef('0xa')]=_0x28c5dc['type']===_0x73ef('0xb')?_0x73ef('0xc'):_0x28c5dc[_0x73ef('0x9')];this[_0x73ef('0xd')]=_0x28c5dc[_0x73ef('0xd')];this['countcongestionretry']=_0x28c5dc[_0x73ef('0xe')];this[_0x73ef('0xf')]=_0x28c5dc[_0x73ef('0xf')];this[_0x73ef('0x10')]=_0x28c5dc[_0x73ef('0xd')]+_0x28c5dc[_0x73ef('0xe')]+_0x28c5dc[_0x73ef('0xf')]+_0x28c5dc[_0x73ef('0x11')]+_0x28c5dc[_0x73ef('0x12')]+_0x28c5dc[_0x73ef('0x13')]+_0x28c5dc[_0x73ef('0x14')]+_0x28c5dc[_0x73ef('0x15')];this[_0x73ef('0x11')]=_0x28c5dc['countnosuchnumberretry'];this[_0x73ef('0x12')]=_0x28c5dc['countdropretry'];this[_0x73ef('0x13')]=_0x28c5dc[_0x73ef('0x13')];this[_0x73ef('0x14')]=_0x28c5dc['countmachineretry'];this[_0x73ef('0x15')]=_0x28c5dc[_0x73ef('0x15')];this['uniqueid']=_0x4aaf96[_0x73ef('0x16')];this[_0x73ef('0x17')]=_0x28c5dc[_0x73ef('0x18')];this[_0x73ef('0x19')]=_0x28c5dc[_0x73ef('0x1a')];this['starttime']=_0x28c5dc[_0x73ef('0x1b')];this['responsetime']=_0x28c5dc[_0x73ef('0x1c')];this['answertime']=_0x28c5dc[_0x73ef('0x1d')];this[_0x73ef('0x1e')]=moment()[_0x73ef('0x1f')](_0x73ef('0x20'));this[_0x73ef('0x21')]=getSeconds(_0x28c5dc[_0x73ef('0x1c')],_0x28c5dc[_0x73ef('0x1b')]);this[_0x73ef('0x22')]=getSeconds(_0x28c5dc['answertime'],_0x28c5dc[_0x73ef('0x1c')]);this[_0x73ef('0x23')]=getSeconds(this[_0x73ef('0x1e')],_0x28c5dc[_0x73ef('0x1d')]);this['queue']=_0x4aaf96[_0x73ef('0xc')];this[_0x73ef('0x24')]=_0x4aaf96[_0x73ef('0x24')];this[_0x73ef('0x25')]=_0x4aaf96[_0x73ef('0x25')];this[_0x73ef('0x26')]=_0x28c5dc[_0x73ef('0x26')];this[_0x73ef('0x27')]=_0x28c5dc[_0x73ef('0x27')];this[_0x73ef('0x28')]=_0x28c5dc['callbackat'];this[_0x73ef('0x29')]=_0x28c5dc[_0x73ef('0x29')];this['ContactId']=_0x28c5dc['ContactId'];this[_0x73ef('0x2a')]=_0x28c5dc['ListId'];this['UserId']=_0x28c5dc[_0x73ef('0x2b')];this[_0x73ef('0x2c')]=_0x28c5dc[_0x73ef('0x2c')];this[_0x73ef('0x2d')]=_0x28c5dc['CampaignId'];this[_0x73ef('0x2e')]=_0x28c5dc['originatecalleridnum']||'';this[_0x73ef('0x2f')]=_0x28c5dc['originatecalleridname']||'';}module[_0x73ef('0x30')]=AgentComplete; \ No newline at end of file diff --git a/server/services/ami/dialer/final.js b/server/services/ami/dialer/final.js index 01eb92d..0d01b2c 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 _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 +var _0x24ca=['countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','countabandonedretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','milliseconds','diff','seconds','scheduledat','type','campaigntype','outbound'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x24ca,0x8c));var _0xa24c=function(_0x2d61b2,_0x142947){_0x2d61b2=_0x2d61b2-0x0;var _0x12df89=_0x24ca[_0x2d61b2];return _0x12df89;};'use strict';var util=require(_0xa24c('0x0'));var _=require('lodash');var moment=require('moment');function getSeconds(_0x1f4ee1,_0x4e90b0){var _0x155c49=moment(_0x1f4ee1)[_0xa24c('0x1')](0x0);var _0xe69cdd=moment(_0x4e90b0)['milliseconds'](0x0);return _0x155c49[_0xa24c('0x2')](_0xe69cdd,_0xa24c('0x3'));}function Final(_0x4707f9){this['uniqueid']=_0x4707f9['uniqueid'];this['scheduledat']=_0x4707f9[_0xa24c('0x4')];this[_0xa24c('0x5')]=_0x4707f9[_0xa24c('0x5')];this[_0xa24c('0x6')]=_0x4707f9[_0xa24c('0x5')]===_0xa24c('0x7')?'queue':_0x4707f9[_0xa24c('0x5')];this[_0xa24c('0x8')]=_0x4707f9[_0xa24c('0x8')];this['countcongestionretry']=_0x4707f9['countcongestionretry'];this[_0xa24c('0x9')]=_0x4707f9[_0xa24c('0x9')];this[_0xa24c('0xa')]=_0x4707f9[_0xa24c('0x8')]+_0x4707f9[_0xa24c('0xb')]+_0x4707f9[_0xa24c('0x9')]+_0x4707f9['countnosuchnumberretry']+_0x4707f9['countdropretry']+_0x4707f9['countabandonedretry']+_0x4707f9[_0xa24c('0xc')]+_0x4707f9[_0xa24c('0xd')];this[_0xa24c('0xe')]=_0x4707f9[_0xa24c('0xe')];this[_0xa24c('0xf')]=_0x4707f9['countdropretry'];this[_0xa24c('0x10')]=_0x4707f9['countabandonedretry'];this['countmachineretry']=_0x4707f9['countmachineretry'];this[_0xa24c('0xd')]=_0x4707f9[_0xa24c('0xd')];this[_0xa24c('0x11')]=_0x4707f9[_0xa24c('0x11')];this[_0xa24c('0x12')]=_0x4707f9[_0xa24c('0x12')];this[_0xa24c('0x13')]=_0x4707f9[_0xa24c('0x13')];this[_0xa24c('0x14')]=_0x4707f9[_0xa24c('0x14')];this[_0xa24c('0x15')]=_0x4707f9[_0xa24c('0x15')];this[_0xa24c('0x16')]=_0x4707f9[_0xa24c('0x15')];this['ringtime']=_0x4707f9[_0xa24c('0x17')]||0x0;this['holdtime']=_0x4707f9[_0xa24c('0x18')]||0x0;this[_0xa24c('0x19')]=_0x4707f9[_0xa24c('0x19')]||0x0;this[_0xa24c('0x1a')]=_0x4707f9[_0xa24c('0x1a')];this[_0xa24c('0x1b')]=_0x4707f9[_0xa24c('0x1b')];this[_0xa24c('0x1c')]=_0x4707f9[_0xa24c('0x1c')];this[_0xa24c('0x1d')]=_0x4707f9[_0xa24c('0x1d')];this['ContactId']=_0x4707f9['ContactId'];this[_0xa24c('0x1e')]=_0x4707f9[_0xa24c('0x1e')];this[_0xa24c('0x1f')]=_0x4707f9[_0xa24c('0x1f')];this[_0xa24c('0x20')]=_0x4707f9[_0xa24c('0x20')];this[_0xa24c('0x21')]=_0x4707f9[_0xa24c('0x21')];this[_0xa24c('0x22')]=_0x4707f9['originatecalleridnum']||'';this[_0xa24c('0x23')]=_0x4707f9['originatecalleridname']||'';}module[_0xa24c('0x24')]=Final; \ No newline at end of file diff --git a/server/services/ami/dialer/hangup.js b/server/services/ami/dialer/hangup.js index 230819b..608f7a1 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 _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 +var _0xccf1=['UserId','VoiceQueueId','CampaignId','util','lodash','milliseconds','seconds','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countagentrejectretry','countabandonedretry','uniqueid','name','calleridnum','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId'];(function(_0x47fb54,_0x28698c){var _0x1139a7=function(_0x17c781){while(--_0x17c781){_0x47fb54['push'](_0x47fb54['shift']());}};_0x1139a7(++_0x28698c);}(_0xccf1,0x174));var _0x1ccf=function(_0xaac08c,_0x261faa){_0xaac08c=_0xaac08c-0x0;var _0x2cf36d=_0xccf1[_0xaac08c];return _0x2cf36d;};'use strict';var util=require(_0x1ccf('0x0'));var _=require(_0x1ccf('0x1'));var moment=require('moment');function getSeconds(_0x62234a,_0x1f4994){var _0x1bb8b7=moment(_0x62234a)[_0x1ccf('0x2')](0x0);var _0x1049ed=moment(_0x1f4994)[_0x1ccf('0x2')](0x0);return _0x1bb8b7['diff'](_0x1049ed,_0x1ccf('0x3'));}function Hangup(_0x38b57a,_0x7374e4){this[_0x1ccf('0x4')]=0x4;this[_0x1ccf('0x5')]=_0x1ccf('0x6');this[_0x1ccf('0x7')]=_0x38b57a['scheduledat'];this[_0x1ccf('0x8')]=_0x38b57a[_0x1ccf('0x8')];this[_0x1ccf('0x9')]=_0x38b57a['type']===_0x1ccf('0xa')?_0x1ccf('0xb'):_0x38b57a['type'];this[_0x1ccf('0xc')]=_0x38b57a[_0x1ccf('0xc')];this[_0x1ccf('0xd')]=_0x38b57a[_0x1ccf('0xd')];this['countnoanswerretry']=_0x38b57a[_0x1ccf('0xe')];this[_0x1ccf('0xf')]=_0x38b57a['countbusyretry']+_0x38b57a[_0x1ccf('0xd')]+_0x38b57a['countnoanswerretry']+_0x38b57a[_0x1ccf('0x10')]+_0x38b57a[_0x1ccf('0x11')]+_0x38b57a['countabandonedretry']+_0x38b57a['countmachineretry']+_0x38b57a[_0x1ccf('0x12')];this['countnosuchnumberretry']=_0x38b57a['countnosuchnumberretry'];this[_0x1ccf('0x11')]=_0x38b57a[_0x1ccf('0x11')];this[_0x1ccf('0x13')]=_0x38b57a[_0x1ccf('0x13')];this['countmachineretry']=_0x38b57a['countmachineretry'];this[_0x1ccf('0x12')]=_0x38b57a[_0x1ccf('0x12')];this[_0x1ccf('0x14')]=_0x7374e4[_0x1ccf('0x14')];this['calleridname']=_0x38b57a[_0x1ccf('0x15')];this[_0x1ccf('0x16')]=_0x38b57a['number'];this[_0x1ccf('0x17')]=_0x38b57a[_0x1ccf('0x17')];this['responsetime']=_0x38b57a[_0x1ccf('0x18')];this[_0x1ccf('0x19')]=moment()[_0x1ccf('0x1a')](_0x1ccf('0x1b'));this['ringtime']=getSeconds(_0x38b57a['responsetime'],_0x38b57a[_0x1ccf('0x17')]);this['holdtime']=0x0;this['talktime']=getSeconds(this[_0x1ccf('0x19')],_0x38b57a[_0x1ccf('0x18')]);this['queue']=_0x38b57a[_0x1ccf('0xb')];this[_0x1ccf('0x1c')]=_0x1ccf('0x1d');this[_0x1ccf('0x1e')]=_0x7374e4[_0x1ccf('0x1f')];this[_0x1ccf('0x20')]=_0x38b57a[_0x1ccf('0x20')];this['callbackuniqueid']=_0x38b57a[_0x1ccf('0x21')];this[_0x1ccf('0x22')]=_0x38b57a[_0x1ccf('0x22')];this[_0x1ccf('0x23')]=_0x38b57a[_0x1ccf('0x23')];this[_0x1ccf('0x24')]=_0x38b57a[_0x1ccf('0x24')];this[_0x1ccf('0x25')]=_0x38b57a[_0x1ccf('0x25')];this[_0x1ccf('0x26')]=_0x38b57a[_0x1ccf('0x26')];this[_0x1ccf('0x27')]=_0x38b57a[_0x1ccf('0x27')];this[_0x1ccf('0x28')]=_0x38b57a[_0x1ccf('0x28')];}module['exports']=Hangup; \ No newline at end of file diff --git a/server/services/ami/dialer/history.js b/server/services/ami/dialer/history.js index 5d7ddf3..f6b111b 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 _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 +var _0x59dc=['countabandonedretry','calleridname','name','calleridnum','number','starttime','responsetime','endtime','ringtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','lodash','milliseconds','diff','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0x59dc,0x100));var _0xc59d=function(_0x40afe3,_0x42c064){_0x40afe3=_0x40afe3-0x0;var _0xd6dea9=_0x59dc[_0x40afe3];return _0xd6dea9;};'use strict';var util=require('util');var _=require(_0xc59d('0x0'));var moment=require('moment');function getSeconds(_0xe500f9,_0x3aaad9){var _0xce8478=moment(_0xe500f9)[_0xc59d('0x1')](0x0);var _0xf79397=moment(_0x3aaad9)[_0xc59d('0x1')](0x0);return _0xce8478[_0xc59d('0x2')](_0xf79397,'seconds');}function History(_0x1ded61){this[_0xc59d('0x3')]=_0x1ded61[_0xc59d('0x3')];this['scheduledat']=_0x1ded61[_0xc59d('0x4')]||undefined;this[_0xc59d('0x5')]=_0x1ded61['type'];this[_0xc59d('0x6')]=_0x1ded61[_0xc59d('0x5')]===_0xc59d('0x7')?_0xc59d('0x8'):_0x1ded61[_0xc59d('0x5')];this[_0xc59d('0x9')]=_0x1ded61[_0xc59d('0x9')];this[_0xc59d('0xa')]=_0x1ded61[_0xc59d('0xa')];this[_0xc59d('0xb')]=_0x1ded61[_0xc59d('0xb')];this[_0xc59d('0xc')]=_0x1ded61['countbusyretry']+_0x1ded61[_0xc59d('0xa')]+_0x1ded61[_0xc59d('0xb')]+_0x1ded61[_0xc59d('0xd')]+_0x1ded61['countdropretry']+_0x1ded61['countabandonedretry']+_0x1ded61[_0xc59d('0xe')]+_0x1ded61[_0xc59d('0xf')];this[_0xc59d('0xd')]=_0x1ded61[_0xc59d('0xd')];this[_0xc59d('0x10')]=_0x1ded61[_0xc59d('0x10')];this[_0xc59d('0x11')]=_0x1ded61[_0xc59d('0x11')];this[_0xc59d('0xe')]=_0x1ded61[_0xc59d('0xe')];this['countagentrejectretry']=_0x1ded61[_0xc59d('0xf')];this['queue']=_0x1ded61[_0xc59d('0x8')];this[_0xc59d('0x12')]=_0x1ded61[_0xc59d('0x13')];this[_0xc59d('0x14')]=_0x1ded61[_0xc59d('0x15')];this[_0xc59d('0x16')]=_0x1ded61[_0xc59d('0x16')];this[_0xc59d('0x17')]=_0x1ded61[_0xc59d('0x17')];this[_0xc59d('0x18')]=_0x1ded61[_0xc59d('0x17')];this[_0xc59d('0x19')]=getSeconds(_0x1ded61[_0xc59d('0x17')],_0x1ded61[_0xc59d('0x16')]);this['holdtime']=0x0;this[_0xc59d('0x1a')]=0x0;this[_0xc59d('0x1b')]=_0x1ded61['callback'];this[_0xc59d('0x1c')]=_0x1ded61[_0xc59d('0x1c')];this['callbackat']=_0x1ded61[_0xc59d('0x1d')];this[_0xc59d('0x1e')]=_0x1ded61[_0xc59d('0x1e')];this[_0xc59d('0x1f')]=_0x1ded61[_0xc59d('0x1f')];this[_0xc59d('0x20')]=_0x1ded61[_0xc59d('0x20')];this[_0xc59d('0x21')]=_0x1ded61[_0xc59d('0x21')];this[_0xc59d('0x22')]=_0x1ded61[_0xc59d('0x22')];this[_0xc59d('0x23')]=_0x1ded61[_0xc59d('0x23')];this[_0xc59d('0x24')]=_0x1ded61[_0xc59d('0x24')]||'';this[_0xc59d('0x25')]=_0x1ded61['originatecalleridname']||'';}module[_0xc59d('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 e9a291d..f860e72 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 _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 +var _0x3189=['\x22agi://%s/square,%s\x22','NONE','outbound','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAMDActive','ACTIVE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','updatedAt','XMD-','toUpper','callerid','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','originatecalleridname','XMD-ORIGINATECALLERIDNUM','originatecalleridnum','SIP/%s/%s%s','trim','dialCutDigit','substring','from-sip','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','getQueue','response','callProgressDetecting','[callProgressDetecting]\x20','dialGlobalMaxRetry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','[callProgressDetecting]','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','checkRetriveMax','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','dialAgentRejectMaxRetry','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','floor','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','predictiveIntervalErlangCallsDroppedCalls','dialPredictiveOptimization','dropRate','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','startMethodPredictive','Predictive\x20after\x20first\x20interval','averageHandleTime','Predictive\x20for\x20every\x20interval',')\x20are\x20less\x20than\x20threshold\x20(','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','getDataPredictive','abandonmentRate','[getDataPredictive]','check\x20failure','getDataPredictiveOld','outboundQueuePauses','predictiveIntervalHitRate','[CatchErlangB]','agentBusyFactor','busyFactor','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','[unlockOriginate][syncQueueStatusComplete]','actionOriginate','scheduledat','Agent','[rescheduleContact][dialRecallInQueue]','RECALLINQUEUE','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALLFAILEDTIMEOUT','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','handleIvr','[getContactCampaign2][Empty]','ivrTotalCallsDays','[actionOriginate]\x20','Contact.phone','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','dialOrderByScheduledAt','RUNNING','[getContactDialer2]','tryOriginatePredictive','not_inuse','[actionOriginatePredictive]\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','Error','m\x20=\x20','[abandonmentRate]','p\x20=\x20','Amax\x20=\x20','----\x20Agent\x20Busy\x20Factor\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]','Ts\x20=\x20','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','uuid','moment','md5','../preview/util/util','dialer','../../../config/logger','predictiveCalls','syncQueueSummary','redis','defaults','localhost','../rpc/cmHopper','../rpc/cmHopperBlack','../rpc/voiceQueueRt','./action','./final','./hangup','XCALLY_IP_AGI','127.0.0.1','roundrobin','prototype','enqueue','tail','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','contactsId','uniqueId','startPredictive','queueBooked','queueBookedRR','agentconnect','syncAgentConnect','bind','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','isUndefined','AGENTS_NOT_LOGGED','name','message','NOT_ACTIVE','\x20NOT\x20Active','Interval','\x20INTERVAL_IS_NULL','Intervals','INTERVAL_IS_NULL','[ifTime][Action]','milliseconds','diff','seconds','strategy','answered','available','loggedIn','sumBillable','sumDuration','sumHoldTime','talking','type','unmanaged','abandoned','waiting','dialMethod','dialOriginateCallerIdName','dialOriginateTimeout','dialPrefix','outboundAnswerAgiCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','Trunk','active','stringify','format','voice:queue:%s','voice_queue:save','ivr','campaign:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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\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\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\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','startProgressive','clearing\x20variable\x20start\x20progressive','clearing\x20variable\x20start\x20predictive','handlePredictive','clearing\x20variable\x20handle\x20predictive','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','error','inspect','stack','length','undefined','[decremetOriginate]\x20object\x20originated\x20is\x20negative','contactsRescheduled','[getContactDialer2][ReScheduled]','contacts','AVAILABLE_CONTACTS_FINISHED','pTalking','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Queue:\x20','is\x20not\x20active','IS_DISACTIVED','is\x20disactive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','state','statedesc','clearZombieChannels','[uniqueid]','[actions]','sequence','isNil','status','channel','catch','No\x20such\x20channel','[Dialer][checkChannel]','queue','updateOriginated','[Dialer][checkChannel][ivr]','countReScheduled','resolve','then','[countReScheduled]\x20','checkIsBlackList','[checkIsBlackList]\x20','checkIsBlackListIvr','[checkIsBlackListIvr]\x20','[averageHandleTime]\x20','rescheduleContact','unlockContact','[unlockContact]\x20','getContactDialer','temp','[getContactDialer]\x20','getContactDialerIvr','[getContactDialerIvr]\x20','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','moveContactManagedDialer','[moveContactManagedDialer]\x20','createHistory','[createHistory]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','saveInDb','pick','ContactId','UserId','CampaignId','[emptyContact][createHistory]','isSuccess','Success','isTrunkReachable','SIP/%s','reachable','unmonitored','variable','amdstatus','exten','xcally-motion-dialer','value','outboundAnswerCallsDay','HangupInAMD','membername','AMD','emit','custom:amd','[syncHangupInAMD][createHistory]','uniqueid','countmachineretry','amd','buildObj','[syncAgentComplete][createHistory][0]','countbusyretry','countnoanswerretry','countdropretry','countabandonedretry','countagentrejectretry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','add','dialMachineRetryFrequency','minutes','YYYY-MM-DD\x20HH:mm:ss','ListId','VoiceQueueId','[rescheduleContact][Machine]','HANGUP','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','MACHINE','countglobal','countcongestionretry','countnosuchnumberretry','ivrAnswerCallsDay','dialQueueProject','AGI','[syncHangupIvr][createHistory]','[syncHangupIvr]','cause-txt','Unknow','reason','agiafterat','dialAgiAfterHangupAgent','[syncAgentComplete][createHistory]','[syncAgentComplete]','queueCallerAbandonCreateState','[syncQueueCallerAbandon]\x20[Drop]','droptime','responsetime','dialQueueTimeout','Drop','dropreason','TIMEOUT','dialQueueProject2','dialDropMaxRetry','dialDropRetryFrequency','[rescheduleContact][Drop]','starttime','endtime','calleridname','calleridnum','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','actionid','locked','paused','stateinterface','rrmemory','push','idHopper','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','contactAgent-idHopper:\x20','finally','Agent:\x20','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','syncCampaigns','TrunkBackup','TRUNK_IS_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','\x20Intervals\x20is\x20empty\x20','timezones','TIMEZONE_UNKNOW','\x20Timezone\x20unknow\x20','isArray','command','iftime\x20%s,%s','interval','indexOf','Action','content','all','some','GLOBAL_INTERVAL_IS_OVERTIME','INTERVAL_IS_OVERTIME','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','checkDialMethod','progressive','handlePower','power','dialPowerLevel','predictive','booked','Queue','launchHandleIvr','dialActive','checkIsTrunkReachable','dialGlobalInterval','dialTimezone','[syncQueueSummary]','pow','replace','random','match','object','originate','voiceQueue\x20is\x20undefine','Contact','phone','getCaller'];(function(_0x1feecd,_0x4fc34f){var _0x1c025a=function(_0x976ebe){while(--_0x976ebe){_0x1feecd['push'](_0x1feecd['shift']());}};_0x1c025a(++_0x4fc34f);}(_0x3189,0xae));var _0x9318=function(_0x5cb134,_0x43018b){_0x5cb134=_0x5cb134-0x0;var _0xe6179a=_0x3189[_0x5cb134];return _0xe6179a;};'use strict';var util=require(_0x9318('0x0'));var _=require(_0x9318('0x1'));var BPromise=require('bluebird');var uuid=require(_0x9318('0x2'));var moment=require(_0x9318('0x3'));var rr=require('rr');var md5=require(_0x9318('0x4'));var Redis=require('ioredis');var ut=require(_0x9318('0x5'));var config=require('../../../config/environment/');var logger=require('../../../config/logger')(_0x9318('0x6'));var loggerBooked=require(_0x9318('0x7'))('booked');var loggerPredictive=require(_0x9318('0x7'))('predictive');var loggerPredictiveCalls=require('../../../config/logger')(_0x9318('0x8'));var loggerSyncQueueSummary=require(_0x9318('0x7'))(_0x9318('0x9'));var ami=require('../ami');config[_0x9318('0xa')]=_[_0x9318('0xb')](config[_0x9318('0xa')],{'host':_0x9318('0xc'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var cmHopper=require(_0x9318('0xd'));var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require(_0x9318('0xe'));var voiceQueueRt=require(_0x9318('0xf'));var Action=require(_0x9318('0x10'));var History=require('./history');var Final=require(_0x9318('0x11'));var AgentComplete=require('./agentComplete');var QueueCallerAbandon=require('./queueCallerAbandon');var Hangup=require(_0x9318('0x12'));var ipAgi=process['env'][_0x9318('0x13')]||_0x9318('0x14');var strategy={'rrmemory':'rrmemory','roundrobin':_0x9318('0x15')};var Sequence=function(){};Sequence[_0x9318('0x16')][_0x9318('0x17')]=function(_0x48469d){this['tail']=this[_0x9318('0x18')]?this[_0x9318('0x18')]['finally'](_0x48469d):_0x48469d();};function Dialer(_0x1a22c,_0x167ed9){this['sequence']=new Sequence();this[_0x9318('0x19')]=_0x167ed9;this[_0x9318('0x1a')]=_0x1a22c[_0x9318('0x1a')];this[_0x9318('0x1b')]=_0x1a22c[_0x9318('0x1b')];this[_0x9318('0x1c')]=_0x1a22c[_0x9318('0x1c')];this[_0x9318('0x1d')]=_0x1a22c['trunks'];this[_0x9318('0x1e')]=config[_0x9318('0x1e')]||0x2;this[_0x9318('0x1f')]={};this[_0x9318('0x20')]={};this[_0x9318('0x21')]={};this[_0x9318('0x22')]={};this['optionPredictive']={};this[_0x9318('0x23')]={};this['startProgressive']={};this['ivrOriginated']={};this[_0x9318('0x24')]={};this[_0x9318('0x25')]={};ami['on'](_0x9318('0x26'),this[_0x9318('0x27')][_0x9318('0x28')](this));ami['on']('queuecallerabandon',this[_0x9318('0x29')][_0x9318('0x28')](this));ami['on'](_0x9318('0x2a'),this[_0x9318('0x2b')][_0x9318('0x28')](this));ami['on'](_0x9318('0x2c'),this[_0x9318('0x2d')][_0x9318('0x28')](this));ami['on'](_0x9318('0x2e'),this[_0x9318('0x9')][_0x9318('0x28')](this));ami['on'](_0x9318('0x2f'),this[_0x9318('0x30')][_0x9318('0x28')](this));ami['on'](_0x9318('0x31'),this[_0x9318('0x32')]['bind'](this));ami['on'](_0x9318('0x33'),this[_0x9318('0x34')]['bind'](this));ami['on'](_0x9318('0x35'),this[_0x9318('0x36')][_0x9318('0x28')](this));ami['on'](_0x9318('0x37'),this[_0x9318('0x38')][_0x9318('0x28')](this));this[_0x9318('0x39')]();this['loopClearZombieChannels']();}function isNotNull(_0x2fb678){return _0x2fb678!==null&&!_[_0x9318('0x3a')](_0x2fb678);}function checkIsLoggedIn(_0x5a8af5,_0x3363ab){return function(){if(_0x3363ab<=0x0){_0x5a8af5['message']=_0x9318('0x3b');throw _0x5a8af5[_0x9318('0x3c')]+'\x20AGENTS\x20NOT\x20LOGGED';}};}function isActive(_0x2d7cc2){return _0x2d7cc2;}function checkIsActive(_0x4c3ac3,_0x7ab0a2){return function(){if(!isActive(_0x7ab0a2)){_0x4c3ac3[_0x9318('0x3d')]=_0x9318('0x3e');throw _0x4c3ac3['name']+_0x9318('0x3f');}};}function checkInterval(_0x1f0253){return function(){if(!isNotNull(_0x1f0253[_0x9318('0x40')])){_0x1f0253[_0x9318('0x3d')]='INTERVAL_IS_NULL';throw _0x1f0253['name']+_0x9318('0x41');}if(!isNotNull(_0x1f0253['Interval'][_0x9318('0x42')])){_0x1f0253[_0x9318('0x3d')]='INTERVAL_IS_NULL';throw _0x1f0253[_0x9318('0x3c')]+_0x9318('0x41');}if(!isNotNull(_['isEmpty'](_0x1f0253[_0x9318('0x40')][_0x9318('0x42')]))){_0x1f0253['message']=_0x9318('0x43');throw _0x1f0253[_0x9318('0x3c')]+_0x9318('0x41');}};}function msgResponse(_0x1f81b3,_0x503126,_0x377a15){return{'action':_0x1f81b3,'response':_0x503126,'message':_0x377a15,'stack':_0x377a15};}function myreject(_0x409f11){return function(_0x211d03){return _0x409f11(msgResponse(_0x9318('0x44'),'Error',JSON['stringify'](_0x211d03)));};}function getSeconds(_0x2caab5,_0x8bf2ee){var _0x147def=moment(_0x2caab5)[_0x9318('0x45')](0x0);var _0xe00af3=moment(_0x8bf2ee)[_0x9318('0x45')](0x0);return _0x147def[_0x9318('0x46')](_0xe00af3,_0x9318('0x47'));}function emit(_0x592361,_0x745ddb,_0x4d72ce){io['to'](_0x592361)['emit'](_0x745ddb,_0x4d72ce);}function emitVoiceQueueSummary(_0x20c1e5){if(_0x20c1e5['type']==='outbound'){var _0x120256={'id':_0x20c1e5['id'],'name':_0x20c1e5[_0x9318('0x3c')],'strategy':_0x20c1e5[_0x9318('0x48')],'answered':_0x20c1e5[_0x9318('0x49')],'available':_0x20c1e5[_0x9318('0x4a')],'loggedIn':_0x20c1e5[_0x9318('0x4b')],'pTalking':_0x20c1e5['pTalking'],'sumBillable':_0x20c1e5[_0x9318('0x4c')],'sumDuration':_0x20c1e5[_0x9318('0x4d')],'sumHoldTime':_0x20c1e5[_0x9318('0x4e')]||0x0,'talking':_0x20c1e5[_0x9318('0x4f')],'total':_0x20c1e5['total'],'type':_0x20c1e5[_0x9318('0x50')],'unmanaged':_0x20c1e5[_0x9318('0x51')],'abandoned':_0x20c1e5[_0x9318('0x52')],'waiting':_0x20c1e5[_0x9318('0x53')],'loggedInDb':_0x20c1e5['loggedInDb'],'dialActive':_0x20c1e5['dialActive'],'dialMethod':_0x20c1e5[_0x9318('0x54')],'dialOriginateCallerIdName':_0x20c1e5[_0x9318('0x55')],'dialOriginateCallerIdNumber':_0x20c1e5['dialOriginateCallerIdNumber'],'dialOriginateTimeout':_0x20c1e5[_0x9318('0x56')],'dialPrefix':_0x20c1e5[_0x9318('0x57')],'outboundAnswerAgiCallsDay':_0x20c1e5[_0x9318('0x58')],'outboundAnswerCallsDay':_0x20c1e5['outboundAnswerCallsDay'],'outboundBlacklistCallsDay':_0x20c1e5[_0x9318('0x59')],'outboundBusyCallsDay':_0x20c1e5[_0x9318('0x5a')],'outboundCongestionCallsDay':_0x20c1e5[_0x9318('0x5b')],'outboundDropCallsDayACS':_0x20c1e5[_0x9318('0x5c')],'outboundDropCallsDayCallersExit':_0x20c1e5['outboundDropCallsDayCallersExit'],'outboundDropCallsDayTimeout':_0x20c1e5[_0x9318('0x5d')],'outboundNoAnswerCallsDay':_0x20c1e5['outboundNoAnswerCallsDay'],'outboundNoSuchCallsDay':_0x20c1e5[_0x9318('0x5e')],'outboundOriginateFailureCallsDay':_0x20c1e5[_0x9318('0x5f')],'outboundReCallsDay':_0x20c1e5[_0x9318('0x60')],'outboundRejectCallsDay':_0x20c1e5[_0x9318('0x61')],'outboundUnknownCallsDay':_0x20c1e5[_0x9318('0x62')],'predictiveIntervalAnsweredCalls':_0x20c1e5[_0x9318('0x63')],'predictiveIntervalAvgHoldtime':_0x20c1e5['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x20c1e5[_0x9318('0x64')],'predictiveIntervalDroppedCallsCallersExit':_0x20c1e5['predictiveIntervalDroppedCallsCallersExit'],'predictiveIntervalDroppedCallsTimeout':_0x20c1e5[_0x9318('0x65')],'predictiveIntervalErlangCalls':_0x20c1e5[_0x9318('0x66')],'predictiveIntervalErlangCallsDroppedCalls':_0x20c1e5['predictiveIntervalErlangCallsDroppedCalls'],'predictiveIntervalHitRate':_0x20c1e5['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x20c1e5['predictiveIntervalMultiplicativeFactor'],'predictiveIntervalPauses':_0x20c1e5[_0x9318('0x67')],'predictiveIntervalAvailable':_0x20c1e5[_0x9318('0x68')],'predictiveIntervalTotalCalls':_0x20c1e5[_0x9318('0x69')],'message':_0x20c1e5[_0x9318('0x3d')],'originated':_0x20c1e5[_0x9318('0x6a')],'erlangCalls':_0x20c1e5[_0x9318('0x6b')],'erlangCallToSecond':_0x20c1e5[_0x9318('0x6c')],'erlangAbandonmentRate':_0x20c1e5[_0x9318('0x6d')],'erlangBusyFactor':_0x20c1e5[_0x9318('0x6e')],'startPredictive':_0x20c1e5[_0x9318('0x23')],'startProgressive':_0x20c1e5['startProgressive']};if(_0x20c1e5[_0x9318('0x6f')]){_0x120256[_0x9318('0x6f')]={'id':_0x20c1e5[_0x9318('0x6f')]['id'],'name':_0x20c1e5[_0x9318('0x6f')][_0x9318('0x3c')],'active':_0x20c1e5[_0x9318('0x6f')][_0x9318('0x70')],'callerid':_0x20c1e5[_0x9318('0x6f')]['callerid']};}if(_0x20c1e5[_0x9318('0x40')]){_0x120256[_0x9318('0x40')]={'id':_0x20c1e5[_0x9318('0x40')]['id'],'name':_0x20c1e5['Interval']['name']};}var _0x4ce675=md5(JSON[_0x9318('0x71')](_0x120256));if(_0x20c1e5[_0x9318('0x4')]!==_0x4ce675){_0x20c1e5[_0x9318('0x4')]=_0x4ce675;emit(util[_0x9318('0x72')](_0x9318('0x73'),_0x120256[_0x9318('0x3c')]),_0x9318('0x74'),_0x120256);}}}function emitCampaignSummary(_0x4a72cb){if(_0x4a72cb[_0x9318('0x50')]===_0x9318('0x75')){emit(util['format']('campaign:ivr:%s',_0x4a72cb[_0x9318('0x3c')]),_0x9318('0x76'),_0x4a72cb);}}function checkGetDataPredictive(_0xeae999){if(isNotNull(_0xeae999)&&!_[_0x9318('0x77')](_0xeae999)){loggerPredictive[_0x9318('0x78')](_0x9318('0x79'));loggerPredictive[_0x9318('0x78')](_0x9318('0x7a'),_0xeae999['predictiveIntervalTotalCalls']);loggerPredictive[_0x9318('0x78')](_0x9318('0x7b'),_0xeae999[_0x9318('0x63')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x7c'),_0xeae999[_0x9318('0x65')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x7d'),_0xeae999[_0x9318('0x7e')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x7f'),_0xeae999[_0x9318('0x80')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x81'),_0xeae999[_0x9318('0x64')]);loggerPredictive['info']('---------------------------');if(_0xeae999[_0x9318('0x69')]>0x0){if(!_[_0x9318('0x3a')](_0xeae999['predictiveIntervalAvgTalktime'])&&_0xeae999[_0x9318('0x64')]>0x0){return!![];}loggerPredictive[_0x9318('0x78')](_0x9318('0x82'));if(!_[_0x9318('0x3a')](_0xeae999[_0x9318('0x80')])&&_0xeae999[_0x9318('0x80')]>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x9318('0x78')](_0x9318('0x83'));}}else{loggerPredictive[_0x9318('0x78')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x4a317d){return function(_0xe02139){loggerPredictive['info'](_0x9318('0x84'));loggerPredictive[_0x9318('0x78')]('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xe02139[_0x9318('0x6b')]);loggerPredictive['info'](_0x9318('0x85'),_0xe02139['erlangCallToSecond']);loggerPredictive[_0x9318('0x78')](_0x9318('0x86'),_0xe02139[_0x9318('0x6d')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x87'),_0xe02139[_0x9318('0x6e')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x86'),_0xe02139[_0x9318('0x6d')]);loggerPredictive[_0x9318('0x78')](_0x9318('0x88'));_[_0x9318('0x89')](_0x4a317d,_0xe02139);};}function getDiff(_0x366474){var _0x4a8590=moment()[_0x9318('0x45')](0x0);var _0x3ee585=moment(_0x366474)[_0x9318('0x45')](0x0);return _0x4a8590[_0x9318('0x46')](_0x3ee585,'seconds');}function ifInterval(_0x2788b1,_0x332200){if(_[_0x9318('0x3a')](_0x332200)){return![];}return getDiff(_0x332200)<_0x2788b1*0x3c;}function freeVariablesPredictive(_0x332ef5){if(isNotNull(_0x332ef5)){if(!_[_0x9318('0x3a')](_0x332ef5[_0x9318('0x8a')])){_0x332ef5['startProgressive']=undefined;loggerPredictive[_0x9318('0x78')](_0x332ef5[_0x9318('0x3c')],_0x9318('0x8b'));}if(!_[_0x9318('0x3a')](_0x332ef5[_0x9318('0x23')])){_0x332ef5[_0x9318('0x23')]=undefined;loggerPredictive[_0x9318('0x78')](_0x332ef5[_0x9318('0x3c')],_0x9318('0x8c'));}if(!_['isUndefined'](_0x332ef5[_0x9318('0x8d')])){clearInterval(_0x332ef5[_0x9318('0x8d')]);_0x332ef5[_0x9318('0x8d')]=undefined;loggerPredictive[_0x9318('0x78')](_0x332ef5[_0x9318('0x3c')],_0x9318('0x8e'));}}}function erlangb(_0x4867f9,_0x4cb2de){if(_0x4cb2de===0x0){return 0x0;}var _0x38a047=0x1;for(var _0x24b266=0x1;_0x24b266<=_0x4cb2de;_0x24b266+=0x1){_0x38a047=0x1+_0x38a047*_0x24b266/_0x4867f9;}return 0x1/_0x38a047;}function isVoiceQueueOutbound(_0x3b9b1c){return _0x3b9b1c==='outbound';}function isNotPreview(_0x1a96c0){return _0x1a96c0!==_0x9318('0x19');}function isCampaignIvr(_0x18aa9d){return _0x18aa9d===_0x9318('0x75');}function getCallerId(_0x235c35,_0x46f8d2,_0x5d8db0){if(!_[_0x9318('0x3a')](_0x5d8db0)&&typeof _0x5d8db0===_0x9318('0x8f')&&!_[_0x9318('0x77')](_0x5d8db0)){if(!_[_0x9318('0x3a')](_0x46f8d2)&&typeof _0x46f8d2===_0x9318('0x8f')&&!_['isEmpty'](_0x46f8d2)){return util[_0x9318('0x72')](_0x9318('0x90'),_0x46f8d2,_0x5d8db0);}return util[_0x9318('0x72')](_0x9318('0x90'),_0x5d8db0,_0x5d8db0);}if(!_[_0x9318('0x3a')](_0x235c35)&&typeof _0x235c35===_0x9318('0x8f')&&!_[_0x9318('0x77')](_0x235c35)){return _0x235c35;}return _0x9318('0x91');}function loggerCatchQueueSummary(_0x3d466d,_0x1d1b9e){return function(_0x422650){freeVariablesPredictive(_0x1d1b9e);emitVoiceQueueSummary(_0x1d1b9e);emitCampaignSummary(_0x1d1b9e);loggerSyncQueueSummary[_0x9318('0x92')](_0x3d466d,util[_0x9318('0x93')](_0x422650,{'showHidden':![],'depth':null}));};}function loggerCatchPredictive(_0x497171,_0x43850e){return function(_0x3ec6cb){loggerPredictive[_0x9318('0x92')](_0x43850e[_0x9318('0x3c')],_0x497171);loggerPredictive['error'](_0x3ec6cb[_0x9318('0x94')]);freeVariablesPredictive(_0x43850e);};}function loggerCatch(_0x23a0e7){return function(_0xb8368a){logger[_0x9318('0x92')](_0x23a0e7,util['inspect'](_0xb8368a,{'showHidden':![],'depth':null}));};}function checkContactEmpty(_0xc3e06b){return _0xc3e06b&&!_[_0x9318('0x3a')](_0xc3e06b)&&_0xc3e06b[_0x9318('0x95')]>0x0;}function decremetOriginate(_0x4a498d){if(!_['isUndefined'](_0x4a498d)&&_0x4a498d!==null){if(typeof _0x4a498d[_0x9318('0x6a')]!==_0x9318('0x96')){if(_0x4a498d['originated']>0x0){_0x4a498d[_0x9318('0x6a')]-=0x1;}else{logger[_0x9318('0x92')](_0x9318('0x97'));}}}else{logger[_0x9318('0x92')]('[decremetOriginate]\x20is\x20null\x20or\x20undefined');}}function checkContactLowerLimitOriginate(_0x218d12,_0x15aeb4,_0x268164){if(_0x15aeb4>_0x268164){for(var _0x371f22=0x0;_0x371f22<_0x15aeb4-_0x268164;_0x371f22+=0x1){decremetOriginate(_0x218d12);}}}function loggerGetContactDialer(_0x58e274,_0x197f01,_0x3c50ae){return function(_0x5eded){checkContactLowerLimitOriginate(_0x197f01,_0x3c50ae,0x0);logger[_0x9318('0x92')](_0x58e274,util[_0x9318('0x93')](_0x5eded,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x2126ef){return function(_0x4fe467){if(isNotNull(_0x4fe467)&&isNotNull(_0x4fe467[0x0])){if(_0x4fe467[0x0][_0x9318('0x98')]>0x0){_0x2126ef[_0x9318('0x3d')]='RESCHEDULED_CONTACTS';logger[_0x9318('0x78')](_0x9318('0x99')+_0x2126ef['name'],_0x4fe467[0x0][_0x9318('0x98')],_0x9318('0x9a'));}else{_0x2126ef[_0x9318('0x3d')]=_0x9318('0x9b');logger[_0x9318('0x78')]('[getContactDialer2][Empty]'+_0x2126ef[_0x9318('0x3c')]);}}};}function notSendMessagesQueue(_0x405641){if(_0x405641['sendMessageOneNotActive']){freeVariablesPredictive(_0x405641);if(_0x405641[_0x9318('0x6a')]===0x0&&_0x405641[_0x9318('0x4f')]===0x0&&_0x405641['waiting']===0x0&&(_0x405641[_0x9318('0x9c')]||0x0)===0x0){_0x405641[_0x9318('0x9d')]=![];_0x405641[_0x9318('0x4a')]=0x0;_0x405641[_0x9318('0x3d')]=_0x9318('0x3e');loggerSyncQueueSummary[_0x9318('0x92')](_0x9318('0x9e'),_0x405641['name'],_0x9318('0x9f'));}else{_0x405641[_0x9318('0x3d')]=_0x9318('0xa0');loggerSyncQueueSummary[_0x9318('0x92')](_0x9318('0x9e'),_0x405641[_0x9318('0x3c')],_0x9318('0xa1'));}emitVoiceQueueSummary(_0x405641);}}function notSendMessagesCampaign(_0x495ee8){if(_0x495ee8[_0x9318('0x9d')]){if(_0x495ee8[_0x9318('0x6a')]===0x0){_0x495ee8['sendMessageOneNotActive']=![];_0x495ee8[_0x9318('0x3d')]='NOT_ACTIVE';loggerSyncQueueSummary[_0x9318('0x92')](_0x9318('0xa2'),_0x495ee8[_0x9318('0x3c')],_0x9318('0x9f'));}else{_0x495ee8['message']=_0x9318('0xa0');loggerSyncQueueSummary[_0x9318('0x92')](_0x9318('0xa2'),_0x495ee8[_0x9318('0x3c')],_0x9318('0xa1'));}emitCampaignSummary(_0x495ee8);}}function createObjHistory(_0x1e8d0c,_0x386780,_0x437520,_0xa4d3,_0x10f215){_0x1e8d0c[_0x9318('0x3d')]=_0x437520;var _0x1c955e=new Action(_0x1e8d0c,_0x386780);var _0x528a31=new History(_0x1c955e);_0x528a31[_0x9318('0xa3')]=_0xa4d3;_0x528a31[_0x9318('0xa4')]=_0x10f215;_0x528a31['endtime']=_0x1c955e['starttime'];return _0x528a31;}Dialer[_0x9318('0x16')]['loopClearZombieChannels']=function(){var _0x3d47b2=this;setInterval(function(){_0x3d47b2[_0x9318('0xa5')](_0x3d47b2['uniqueId'],_0x9318('0xa6'));_0x3d47b2[_0x9318('0xa5')](_0x3d47b2[_0x9318('0x20')],_0x9318('0xa7'));},0x32c8);};Dialer[_0x9318('0x16')]['clearZombieChannels']=function(_0x307005,_0x3f3a12){var _0x519b08=this;for(var _0x47d5e8 in _0x307005){if(typeof _0x307005[_0x47d5e8]!==_0x9318('0x96')){this[_0x9318('0xa8')][_0x9318('0x17')](function(){if(!_[_0x9318('0xa9')](_0x307005[_0x47d5e8])){return ami['Action']({'action':_0x9318('0xaa'),'channel':_0x307005[_0x47d5e8][_0x9318('0xab')]})[_0x9318('0xac')](function(_0x356d35){if(_0x356d35[_0x9318('0x3d')]===_0x9318('0xad')){setTimeout(function(){if(_0x307005[_0x47d5e8]&&_0x307005[_0x47d5e8][_0x9318('0x50')]!=='ivr'){_0x519b08['updateOriginated'](_0x519b08[_0x9318('0x1a')][_0x307005[_0x47d5e8]['queue']]);logger[_0x9318('0x92')](_0x9318('0xae'),_0x3f3a12,_0x47d5e8,_0x307005[_0x47d5e8][_0x9318('0xaf')]);delete _0x307005[_0x47d5e8];}if(_0x307005[_0x47d5e8]&&_0x307005[_0x47d5e8][_0x9318('0x50')]===_0x9318('0x75')){_0x519b08[_0x9318('0xb0')](_0x519b08[_0x9318('0x1b')][_0x307005[_0x47d5e8][_0x9318('0xaf')]]);logger[_0x9318('0x92')](_0x9318('0xb1'),_0x3f3a12,_0x47d5e8,_0x307005[_0x47d5e8][_0x9318('0xaf')]);delete _0x307005[_0x47d5e8];}},0x2328);}});}});}}};Dialer[_0x9318('0x16')][_0x9318('0xb2')]=function(_0x8f8e5f){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopper[_0x9318('0xb2')](_0x8f8e5f))[_0x9318('0xac')](loggerCatch(_0x9318('0xb5')));};Dialer['prototype'][_0x9318('0xb6')]=function(_0x579a23){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopperBlack['checkIsBlackList'](_0x579a23))[_0x9318('0xac')](loggerCatch(_0x9318('0xb7')));};Dialer[_0x9318('0x16')]['checkIsBlackListIvr']=function(_0x5d14c0){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopperBlack[_0x9318('0xb8')](_0x5d14c0))['catch'](loggerCatch(_0x9318('0xb9')));};Dialer[_0x9318('0x16')]['averageHandleTime']=function(_0x3a8dc0){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopperHistory['avgHandleTime'](_0x3a8dc0))[_0x9318('0xac')](loggerCatch(_0x9318('0xba')));};Dialer['prototype'][_0x9318('0xbb')]=function(_0x13c70f){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopper[_0x9318('0xbb')](_0x13c70f))[_0x9318('0xac')](loggerCatch('[rescheduleContact]\x20'));};Dialer[_0x9318('0x16')][_0x9318('0xbc')]=function(_0x1b606d,_0xc3c3f6,_0x35221d){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopper['unlockContact'](_0x1b606d,_0xc3c3f6,_0x35221d))['catch'](loggerCatch(_0x9318('0xbd')));};Dialer[_0x9318('0x16')][_0x9318('0xbe')]=function(_0x5e1606,_0x575302,_0x3787cf,_0x188b40,_0x2959b1){return BPromise['resolve']()[_0x9318('0xb4')](cmHopper[_0x9318('0xbe')](_0x5e1606,_0x575302,_0x3787cf,_0x188b40))['catch'](function(_0x4d4d60){_0x2959b1[_0x9318('0xbf')]-=_0x3787cf;_0x2959b1[_0x9318('0xbf')]=_0x2959b1[_0x9318('0xbf')]>0x0?_0x2959b1[_0x9318('0xbf')]:0x0;loggerCatch(_0x9318('0xc0'))(_0x4d4d60);});};Dialer['prototype'][_0x9318('0xc1')]=function(_0x376f94,_0x439573,_0x30daa9,_0x2da08c){return BPromise['resolve']()[_0x9318('0xb4')](cmHopper[_0x9318('0xc1')](_0x376f94,_0x439573,_0x30daa9))['catch'](function(_0x4cf243){_0x2da08c[_0x9318('0xbf')]-=_0x439573;_0x2da08c[_0x9318('0xbf')]=_0x2da08c[_0x9318('0xbf')]>0x0?_0x2da08c['temp']:0x0;loggerCatch(_0x9318('0xc2'))(_0x4cf243);});};Dialer[_0x9318('0x16')][_0x9318('0xc3')]=function(_0x37d3e5){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](voiceQueueRt[_0x9318('0xc3')](_0x37d3e5))[_0x9318('0xac')](loggerCatch(_0x9318('0xc4')));};Dialer['prototype'][_0x9318('0xc5')]=function(_0x45efbf){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopper[_0x9318('0xc5')](_0x45efbf))[_0x9318('0xac')](loggerCatch(_0x9318('0xc6')));};Dialer[_0x9318('0x16')][_0x9318('0xc7')]=function(_0x2cb969){return BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](cmHopperHistory[_0x9318('0xc7')](_0x2cb969))['catch'](loggerCatch(_0x9318('0xc8')));};Dialer['prototype']['updateOriginated']=function(_0x414f9a){if(!_['isUndefined'](_0x414f9a)&&_0x414f9a!==null){if(typeof _0x414f9a[_0x9318('0x6a')]!=='undefined'){if(_0x414f9a[_0x9318('0x6a')]>0x0){_0x414f9a[_0x9318('0x6a')]-=0x1;}else{logger['error'](_0x9318('0xc9'));}}}else{logger[_0x9318('0x92')](_0x9318('0xca'));}};Dialer[_0x9318('0x16')][_0x9318('0xcb')]=function(_0x9f935f,_0x41b952){var _0x2d2955=this;return function(_0x332724){_0x2d2955['updateOriginated'](_0x41b952);logger[_0x9318('0x92')](_0x9f935f,util[_0x9318('0x93')](_0x332724,{'showHidden':![],'depth':null}));};};Dialer[_0x9318('0x16')][_0x9318('0xcc')]=function(_0x1d3975,_0x1b0996,_0x3d17f9){var _0x33ae6b={'state':0x19,'statedesc':_0x9318('0xcd')};this[_0x9318('0xb0')](_0x1b0996);this[_0x9318('0xce')](_['merge'](_0x33ae6b,_[_0x9318('0xcf')](_0x3d17f9,[_0x9318('0xd0'),'ListId',_0x9318('0xd1'),'VoiceQueueId',_0x9318('0xd2')])),_0x9318('0xd3'),'[emptyContact]');logger['error'](_0x1d3975);};Dialer[_0x9318('0x16')][_0x9318('0xd4')]=function(_0x53bfdf){return _0x53bfdf===_0x9318('0xd5');};Dialer['prototype'][_0x9318('0xd6')]=function(_0x1b8361){return!_[_0x9318('0x3a')](_0x1b8361)&&_0x1b8361&&!_['isUndefined'](_0x1b8361[_0x9318('0x3c')])&&!_['isUndefined'](_0x1b8361[_0x9318('0x70')])&&_0x1b8361['active']&&(this[_0x9318('0x1d')][util[_0x9318('0x72')](_0x9318('0xd7'),_0x1b8361['name'])][_0x9318('0xaa')]===_0x9318('0xd8')||this[_0x9318('0x1d')][util[_0x9318('0x72')](_0x9318('0xd7'),_0x1b8361['name'])]['status']===_0x9318('0xd9'));};Dialer['prototype']['saveInDb']=function(_0x4e0638,_0x5ccd7f,_0x37fe14){this[_0x9318('0xc7')](_0x4e0638)[_0x9318('0xac')](loggerCatch(_0x5ccd7f));this[_0x9318('0xc5')](_0x4e0638)[_0x9318('0xac')](loggerCatch(_0x37fe14));};Dialer[_0x9318('0x16')][_0x9318('0x34')]=function(_0x5cd0c6){var _0x406644=this[_0x9318('0x22')][_0x5cd0c6['uniqueid']];var _0x554338;if(!_[_0x9318('0xa9')](_0x5cd0c6)&&!_[_0x9318('0xa9')](_0x5cd0c6[_0x9318('0xda')])&&!_[_0x9318('0xa9')](_0x5cd0c6[_0x9318('0xda')][_0x9318('0xdb')])&&_0x5cd0c6[_0x9318('0xdc')]===_0x9318('0xdd')&&_0x406644){if(_0x406644[_0x9318('0x50')]!==_0x9318('0x75')&&this[_0x9318('0x1a')][_0x406644['queue']]['dialAMDActive']&&_0x5cd0c6[_0x9318('0xde')]==='HANGUP'){delete this[_0x9318('0x22')][_0x5cd0c6['uniqueid']];this[_0x9318('0xb0')](this[_0x9318('0x1a')][_0x406644[_0x9318('0xaf')]]);this[_0x9318('0x1a')][_0x406644[_0x9318('0xaf')]][_0x9318('0xdf')]+=0x1;this['voiceQueues'][_0x406644[_0x9318('0xaf')]]['outboundAnswerAgiCallsDay']+=0x1;_0x554338=new Hangup(_0x406644,_0x5cd0c6);_0x554338['state']=0x12;_0x554338[_0x9318('0xa4')]=_0x9318('0xe0');_0x554338[_0x9318('0xe1')]=_0x9318('0xe2');ami[_0x9318('0xe3')](_0x9318('0xe4'),ut['buildObj'](_0x554338,'amd'));this[_0x9318('0xce')](_0x554338,_0x9318('0xe5'),'[syncHangupInAMD]');}if(_0x406644[_0x9318('0x50')]!=='ivr'&&this[_0x9318('0x1a')][_0x406644[_0x9318('0xaf')]]['dialAMDActive']&&_0x5cd0c6[_0x9318('0xde')]==='MACHINE'){var _0x60c0b3=this;return new BPromise(function(_0xe2718b,_0x3aed34){delete _0x60c0b3[_0x9318('0x22')][_0x5cd0c6[_0x9318('0xe6')]];_0x60c0b3['updateOriginated'](_0x60c0b3[_0x9318('0x1a')][_0x406644[_0x9318('0xaf')]]);_0x60c0b3[_0x9318('0x1a')][_0x406644['queue']][_0x9318('0xdf')]+=0x1;_0x60c0b3['voiceQueues'][_0x406644[_0x9318('0xaf')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x209105=_0x60c0b3['voiceQueues'][_0x406644[_0x9318('0xaf')]];var _0x104265=new Hangup(_0x406644,_0x5cd0c6);_0x104265['state']=0x13;_0x104265[_0x9318('0xa4')]='Machine';_0x104265['membername']='AMD';_0x104265[_0x9318('0xe7')]+=0x1;_0x104265['countglobal']+=0x1;_0x104265[_0x9318('0xe8')]=!![];ami[_0x9318('0xe3')](_0x9318('0xe4'),ut[_0x9318('0xe9')](_0x104265,_0x9318('0xe8')));_0x60c0b3[_0x9318('0xc7')](_0x104265)[_0x9318('0xac')](loggerCatch(_0x9318('0xea')));if(_0x104265[_0x9318('0xeb')]+_0x104265['countcongestionretry']+_0x104265[_0x9318('0xec')]+_0x104265['countnosuchnumberretry']+_0x104265[_0x9318('0xed')]+_0x104265[_0x9318('0xee')]+_0x104265[_0x9318('0xe7')]+_0x104265[_0x9318('0xef')]>=_0x209105['dialGlobalMaxRetry']){_0x60c0b3[_0x9318('0xf0')](_0x104265,_0xe2718b,_0x3aed34,_0x9318('0xf1'));}else{if(_0x104265[_0x9318('0xe7')]>=_0x209105[_0x9318('0xf2')]){_0x60c0b3[_0x9318('0xf3')](_0x104265,_0xe2718b,_0x3aed34,_0x9318('0xf4'));}else{_0x60c0b3[_0x9318('0xbb')]({'active':![],'countmachineretry':_0x104265['countmachineretry'],'scheduledat':moment()[_0x9318('0xf5')](_0x209105[_0x9318('0xf6')],_0x9318('0xf7'))['format'](_0x9318('0xf8')),'ContactId':_0x104265[_0x9318('0xd0')],'ListId':_0x104265[_0x9318('0xf9')],'VoiceQueueId':_0x104265[_0x9318('0xfa')]||undefined,'CampaignId':_0x104265['CampaignId']||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0xfb')));_0xe2718b({'reschedule':0x1});}}});}if(_0x406644['type']===_0x9318('0x75')&&this[_0x9318('0x1b')][_0x406644['queue']]['dialAMDActive']&&_0x5cd0c6[_0x9318('0xde')]===_0x9318('0xfc')){delete this['uniqueId'][_0x5cd0c6[_0x9318('0xe6')]];this[_0x9318('0xb0')](this[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]]);_0x554338=new Hangup(_0x406644,_0x5cd0c6);_0x554338[_0x9318('0xa3')]=0x12;_0x554338[_0x9318('0xa4')]=_0x9318('0xe0');_0x554338[_0x9318('0xe1')]=_0x9318('0xe2');ami[_0x9318('0xe3')](_0x9318('0xe4'),ut[_0x9318('0xe9')](_0x554338,_0x9318('0xe8')));this[_0x9318('0xce')](_0x554338,_0x9318('0xfd'),_0x9318('0xfe'));}if(_0x406644[_0x9318('0x50')]===_0x9318('0x75')&&this[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]]['dialAMDActive']&&_0x5cd0c6['value']===_0x9318('0xff')){var _0x60c0b3=this;return new BPromise(function(_0x775c98,_0x20b695){delete _0x60c0b3[_0x9318('0x22')][_0x5cd0c6[_0x9318('0xe6')]];_0x60c0b3['updateOriginated'](_0x60c0b3[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]]);_0x60c0b3[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]][_0x9318('0xdf')]+=0x1;_0x60c0b3[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x406193=_0x60c0b3[_0x9318('0x1b')][_0x406644[_0x9318('0xaf')]];var _0x411b80=new Hangup(_0x406644,_0x5cd0c6);_0x411b80['state']=0x13;_0x411b80['statedesc']='Machine';_0x411b80['membername']='AMD';_0x411b80[_0x9318('0xe7')]+=0x1;_0x411b80[_0x9318('0x100')]+=0x1;_0x411b80[_0x9318('0xe8')]=!![];ami['emit'](_0x9318('0xe4'),ut['buildObj'](_0x411b80,_0x9318('0xe8')));_0x60c0b3[_0x9318('0xc7')](_0x411b80)['catch'](loggerCatch(_0x9318('0xea')));if(_0x411b80[_0x9318('0xeb')]+_0x411b80[_0x9318('0x101')]+_0x411b80['countnoanswerretry']+_0x411b80[_0x9318('0x102')]+_0x411b80[_0x9318('0xed')]+_0x411b80[_0x9318('0xee')]+_0x411b80[_0x9318('0xe7')]+_0x411b80[_0x9318('0xef')]>=_0x406193['dialGlobalMaxRetry']){_0x60c0b3[_0x9318('0xf0')](_0x411b80,_0x775c98,_0x20b695,'reason19\x20machine....');}else{if(_0x411b80['countmachineretry']>=_0x406193['dialMachineMaxRetry']){_0x60c0b3[_0x9318('0xf3')](_0x411b80,_0x775c98,_0x20b695,_0x9318('0xf4'));}else{_0x60c0b3[_0x9318('0xbb')]({'active':![],'countmachineretry':_0x411b80['countmachineretry'],'scheduledat':moment()[_0x9318('0xf5')](_0x406193['dialMachineRetryFrequency'],'minutes')[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x411b80[_0x9318('0xd0')],'ListId':_0x411b80['ListId'],'VoiceQueueId':_0x411b80[_0x9318('0xfa')]||undefined,'CampaignId':_0x411b80[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0xfb')));_0x775c98({'reschedule':0x1});}}});}}};Dialer[_0x9318('0x16')][_0x9318('0x30')]=function(_0x4a90bd){var _0x4c7b42=this[_0x9318('0x22')][_0x4a90bd['uniqueid']];var _0x1bfcd8=this;var _0x10e872;if(_0x4c7b42&&_0x4c7b42[_0x9318('0x50')]==='ivr'){delete this[_0x9318('0x22')][_0x4a90bd[_0x9318('0xe6')]];this['updateOriginated'](this[_0x9318('0x1b')][_0x4c7b42[_0x9318('0xaf')]]);this[_0x9318('0x1b')][_0x4c7b42['queue']][_0x9318('0x103')]+=0x1;_0x10e872=new Hangup(_0x4c7b42,_0x4a90bd);this[_0x9318('0xc7')](_0x10e872)[_0x9318('0xac')](loggerCatch('[syncHangupIvr][createHistory]'));this['moveContactManagedDialer'](_0x10e872)[_0x9318('0xac')](loggerCatch('[syncHangupIvr]'));}if(_0x4c7b42&&_0x4c7b42['type']!=='ivr'&&isNotNull(this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]][_0x9318('0x104')])){delete this[_0x9318('0x22')][_0x4a90bd[_0x9318('0xe6')]];this[_0x9318('0xb0')](this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]]);this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]][_0x9318('0xdf')]+=0x1;this[_0x9318('0x1a')][_0x4c7b42['queue']][_0x9318('0x58')]+=0x1;_0x10e872=new Hangup(_0x4c7b42,_0x4a90bd);_0x10e872[_0x9318('0xa3')]=0x10;_0x10e872[_0x9318('0xa4')]='AnswerAGI';_0x10e872[_0x9318('0xe1')]=_0x9318('0x105');this[_0x9318('0xc7')](_0x10e872)['catch'](loggerCatch(_0x9318('0x106')));this[_0x9318('0xc5')](_0x10e872)[_0x9318('0xac')](loggerCatch(_0x9318('0x107')));}if(_0x4c7b42&&_0x4c7b42[_0x9318('0x50')]!=='ivr'&&!isNotNull(this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]][_0x9318('0x104')])){delete this[_0x9318('0x22')][_0x4a90bd[_0x9318('0xe6')]];this[_0x9318('0xb0')](this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]]);this[_0x9318('0x1a')][_0x4c7b42[_0x9318('0xaf')]]['outboundUnknownCallsDay']+=0x1;_0x10e872=new Hangup(_0x4c7b42,_0x4a90bd);_0x10e872[_0x9318('0xa3')]=0xc;_0x10e872['statedesc']=_0x4a90bd[_0x9318('0x108')];_0x10e872[_0x9318('0xe1')]=_0x9318('0x109');this[_0x9318('0xc7')](_0x10e872)[_0x9318('0xac')](loggerCatch(_0x9318('0x106')));this[_0x9318('0xc5')](_0x10e872)[_0x9318('0xac')](loggerCatch(_0x9318('0x107')));}};Dialer[_0x9318('0x16')][_0x9318('0x2d')]=function(_0x1768bc){var _0x19616f=this[_0x9318('0x22')][_0x1768bc['uniqueid']];var _0x26155e=this;if(this[_0x9318('0x1a')][_0x1768bc[_0x9318('0xaf')]]){if(_0x19616f&&_0x19616f[_0x9318('0x50')]!==_0x9318('0x75')){delete this[_0x9318('0x22')][_0x1768bc['uniqueid']];this[_0x9318('0x1a')][_0x1768bc['queue']][_0x9318('0xdf')]+=0x1;var _0x1a40c6=new AgentComplete(_0x19616f,_0x1768bc);if(_0x1768bc[_0x9318('0x10a')]==='agent'){_0x1a40c6[_0x9318('0x10b')]=this[_0x9318('0x1a')][_0x1768bc[_0x9318('0xaf')]]['dialQueueProject2']&&this['voiceQueues'][_0x1768bc[_0x9318('0xaf')]][_0x9318('0x10c')]?moment()[_0x9318('0x72')](_0x9318('0xf8')):undefined;}this[_0x9318('0xc7')](_0x1a40c6)[_0x9318('0xac')](loggerCatch(_0x9318('0x10d')));this[_0x9318('0xc5')](_0x1a40c6)[_0x9318('0xac')](loggerCatch(_0x9318('0x10e')));}}};Dialer[_0x9318('0x16')][_0x9318('0x27')]=function(_0x2cb11f){if(this[_0x9318('0x1a')][_0x2cb11f[_0x9318('0xaf')]]){if(this[_0x9318('0x22')][_0x2cb11f[_0x9318('0xe6')]]&&this[_0x9318('0x22')][_0x2cb11f[_0x9318('0xe6')]][_0x9318('0x50')]!==_0x9318('0x75')){this[_0x9318('0xb0')](this[_0x9318('0x1a')][_0x2cb11f[_0x9318('0xaf')]]);this[_0x9318('0x22')][_0x2cb11f[_0x9318('0xe6')]]['answertime']=moment()['format'](_0x9318('0xf8'));}}};Dialer[_0x9318('0x16')][_0x9318('0x10f')]=function(_0x699272){this[_0x9318('0xc7')](_0x699272)['catch'](loggerCatch(_0x9318('0x10d')));this[_0x9318('0xc5')](_0x699272)[_0x9318('0xac')](loggerCatch(_0x9318('0x110')));};Dialer['prototype']['syncQueueCallerAbandon']=function(_0x50d101){var _0x40914c=this[_0x9318('0x22')][_0x50d101[_0x9318('0xe6')]];var _0x23618d=this;if(this['voiceQueues'][_0x50d101[_0x9318('0xaf')]]){if(_0x40914c&&_0x40914c[_0x9318('0x50')]!==_0x9318('0x75')){delete this[_0x9318('0x22')][_0x50d101[_0x9318('0xe6')]];this[_0x9318('0xb0')](this['voiceQueues'][_0x50d101[_0x9318('0xaf')]]);_0x40914c[_0x9318('0x111')]=moment()[_0x9318('0x72')]('YYYY-MM-DD\x20HH:mm:ss');var _0x75c74c=new QueueCallerAbandon(_0x40914c,_0x50d101);if(getSeconds(_0x40914c[_0x9318('0x111')],_0x40914c[_0x9318('0x112')])>=_0x40914c[_0x9318('0x113')]){this[_0x9318('0x1a')][_0x50d101[_0x9318('0xaf')]][_0x9318('0x65')]+=0x1;this[_0x9318('0x1a')][_0x50d101[_0x9318('0xaf')]][_0x9318('0x5d')]+=0x1;this[_0x9318('0x1a')][_0x50d101['queue']]['predictiveIntervalErlangCallsDroppedCalls']+=0x1;_0x75c74c[_0x9318('0xa3')]=0xa;_0x75c74c[_0x9318('0xa4')]=_0x9318('0x114');_0x75c74c[_0x9318('0x115')]=_0x9318('0x116');_0x75c74c[_0x9318('0x10b')]=this['voiceQueues'][_0x50d101[_0x9318('0xaf')]][_0x9318('0x117')]?moment()[_0x9318('0x72')](_0x9318('0xf8')):undefined;_0x75c74c[_0x9318('0xed')]+=0x1;_0x75c74c[_0x9318('0x100')]+=0x1;if(_0x75c74c['countdropretry']>=this[_0x9318('0x1a')][_0x50d101[_0x9318('0xaf')]][_0x9318('0x118')]){this['queueCallerAbandonCreateState'](_0x75c74c);}else{this[_0x9318('0xbb')]({'active':![],'countdropretry':_0x75c74c[_0x9318('0xed')],'scheduledat':moment()[_0x9318('0xf5')](this[_0x9318('0x1a')][_0x50d101[_0x9318('0xaf')]][_0x9318('0x119')],'minutes')[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x40914c[_0x9318('0xd0')],'ListId':_0x40914c['ListId'],'VoiceQueueId':_0x40914c[_0x9318('0xfa')]||undefined,'CampaignId':_0x40914c[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x11a')));var _0x1dc444=new History(_0x75c74c);_0x1dc444[_0x9318('0xa3')]=0xa;_0x1dc444['statedesc']=_0x9318('0x114');_0x1dc444[_0x9318('0x11b')]=moment()[_0x9318('0x72')]('YYYY-MM-DD\x20HH:mm:ss');_0x1dc444[_0x9318('0x11c')]=_0x1dc444[_0x9318('0x11b')];_0x1dc444[_0x9318('0x11d')]=_0x75c74c['calleridname'];_0x1dc444[_0x9318('0x11e')]=_0x75c74c[_0x9318('0x11e')];this['createHistory'](_0x1dc444)[_0x9318('0xac')](loggerCatch('[syncAgentComplete][createHistory][10]'));}}else{this['voiceQueues'][_0x50d101[_0x9318('0xaf')]][_0x9318('0x7e')]+=0x1;this['voiceQueues'][_0x50d101[_0x9318('0xaf')]][_0x9318('0x11f')]+=0x1;_0x75c74c[_0x9318('0xa3')]=0xb;_0x75c74c[_0x9318('0xa4')]=_0x9318('0x120');_0x75c74c['dropreason']=_0x9318('0x121');_0x75c74c[_0x9318('0xee')]+=0x1;_0x75c74c[_0x9318('0x100')]+=0x1;if(_0x75c74c[_0x9318('0xee')]>=this['voiceQueues'][_0x50d101[_0x9318('0xaf')]][_0x9318('0x122')]){this[_0x9318('0x10f')](_0x75c74c);}else{this[_0x9318('0xbb')]({'active':![],'countabandonedretry':_0x75c74c[_0x9318('0xee')],'scheduledat':moment()[_0x9318('0xf5')](this[_0x9318('0x1a')][_0x50d101[_0x9318('0xaf')]][_0x9318('0x123')],'minutes')[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x40914c[_0x9318('0xd0')],'ListId':_0x40914c[_0x9318('0xf9')],'VoiceQueueId':_0x40914c['VoiceQueueId']||undefined,'CampaignId':_0x40914c['CampaignId']||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x124')));var _0x1dc444=new History(_0x75c74c);_0x1dc444['state']=0xb;_0x1dc444['statedesc']=_0x9318('0x120');_0x1dc444['starttime']=moment()[_0x9318('0x72')](_0x9318('0xf8'));_0x1dc444['endtime']=_0x1dc444[_0x9318('0x11b')];_0x1dc444[_0x9318('0x11d')]=_0x75c74c[_0x9318('0x11d')];_0x1dc444[_0x9318('0x11e')]=_0x75c74c[_0x9318('0x11e')];this['createHistory'](_0x1dc444)[_0x9318('0xac')](loggerCatch(_0x9318('0x125')));}}}}};Dialer[_0x9318('0x16')]['syncNewExten']=function(_0x9a37ac){if(this[_0x9318('0x20')][_0x9a37ac[_0x9318('0xe6')]]){this[_0x9318('0x20')][_0x9a37ac[_0x9318('0xe6')]][_0x9318('0xab')]=_0x9a37ac[_0x9318('0xab')];}if(this[_0x9318('0x22')][_0x9a37ac[_0x9318('0xe6')]]){this[_0x9318('0x22')][_0x9a37ac[_0x9318('0xe6')]][_0x9318('0xab')]=_0x9a37ac[_0x9318('0xab')];}};Dialer[_0x9318('0x16')][_0x9318('0x36')]=function(_0x281b2a){if(strategy[this[_0x9318('0x1a')][this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0xaf')]]['strategy']]===_0x9318('0x15')){if(this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]]&&_[_0x9318('0xa9')](this[_0x9318('0x20')][_0x281b2a['actionid']][_0x9318('0x127')])&&_0x281b2a['status']==='1'&&_0x281b2a[_0x9318('0x128')]==='0'){if(this['agents'][_0x281b2a['stateinterface']]){if(!this[_0x9318('0x1c')][_0x281b2a[_0x9318('0x129')]][_0x9318('0x127')]){this[_0x9318('0x1c')][_0x281b2a[_0x9318('0x129')]]['locked']=!![];this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0x127')]=!![];this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0x129')]=_0x281b2a[_0x9318('0x129')];}}}}else if((strategy[this[_0x9318('0x1a')][this[_0x9318('0x20')][_0x281b2a['actionid']][_0x9318('0xaf')]][_0x9318('0x48')]]||_0x9318('0x12a'))===_0x9318('0x12a')){if(this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]]){if(this[_0x9318('0x1c')][_0x281b2a[_0x9318('0x129')]]){this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0x129')]=_0x281b2a[_0x9318('0x129')];if(_[_0x9318('0xa9')](this[_0x9318('0x24')][this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0xaf')]])){this[_0x9318('0x24')][this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]][_0x9318('0xaf')]]=[];}this[_0x9318('0x24')][this[_0x9318('0x20')][_0x281b2a['actionid']][_0x9318('0xaf')]][_0x9318('0x12b')](_[_0x9318('0x89')](_[_0x9318('0xcf')](this[_0x9318('0x20')][_0x281b2a[_0x9318('0x126')]],[_0x9318('0x12c'),'stateinterface']),{'status':_0x281b2a[_0x9318('0xaa')],'paused':_0x281b2a[_0x9318('0x128')]}));}}}};function unlockQueueStatus(_0x3a9297,_0x48a168){setTimeout(function(){if(_[_0x9318('0x3a')](_0x3a9297[_0x9318('0x12d')])){loggerBooked['error'](_0x9318('0x12e'),_0x48a168);}_0x3a9297[_0x9318('0x12d')]=!![];loggerBooked[_0x9318('0x78')](_0x9318('0x12f'),_0x48a168,JSON[_0x9318('0x71')](_[_0x9318('0xcf')](_0x3a9297,['name',_0x9318('0x12d')])));},0x1f3);}Dialer[_0x9318('0x16')][_0x9318('0x38')]=function(_0x4bb178){var _0x21738e=this;var _0x200aa3=_0x21738e['voiceQueues'][_0x21738e[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]];if(strategy[this[_0x9318('0x1a')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]][_0x9318('0x48')]]===_0x9318('0x15')){if(this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]&&this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0x129')]){this['preview'][_0x9318('0x130')](this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['idHopper'],this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['stateinterface'])[_0x9318('0xac')](function(_0xea9eb5){logger[_0x9318('0x92')](_0x9318('0x131'),util['inspect'](_0xea9eb5,{'showHidden':![],'depth':null}));})['finally'](function(){_0x21738e[_0x9318('0xb0')](_0x21738e[_0x9318('0x1a')][_0x21738e[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]]);_0x21738e[_0x9318('0x1c')][_0x21738e['actions'][_0x4bb178[_0x9318('0x126')]][_0x9318('0x129')]][_0x9318('0x127')]=![];delete _0x21738e[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]];unlockQueueStatus(_0x200aa3);});}else{this['updateOriginated'](this[_0x9318('0x1a')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['queue']]);this[_0x9318('0xbb')]({'active':![],'ContactId':this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['ContactId'],'ListId':this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xf9')],'VoiceQueueId':this['actions'][_0x4bb178['actionid']][_0x9318('0xfa')]||undefined,'CampaignId':this['actions'][_0x4bb178[_0x9318('0x126')]][_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x132')));delete this[_0x9318('0x20')][_0x4bb178['actionid']];unlockQueueStatus(_0x200aa3);}}else if((strategy[this[_0x9318('0x1a')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['queue']][_0x9318('0x48')]]||_0x9318('0x12a'))===_0x9318('0x12a')){var _0x44f1e0;if(this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]&&!_[_0x9318('0x77')](this[_0x9318('0x24')][this['actions'][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]])){if(this[_0x9318('0x25')][_0x21738e[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['queue']]){this[_0x9318('0x25')][_0x21738e[_0x9318('0x20')][_0x4bb178['actionid']]['queue']]=this[_0x9318('0x25')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]]['queue']]?this[_0x9318('0x25')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]]:this[_0x9318('0x24')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]]?this[_0x9318('0x24')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]][_0x9318('0x133')]||0x0:0x0;}this[_0x9318('0x24')][this[_0x9318('0x20')][_0x4bb178[_0x9318('0x126')]][_0x9318('0xaf')]][_0x9318('0x133')]=this['queueBookedRR'][this[_0x9318('0x20')][_0x4bb178['actionid']][_0x9318('0xaf')]];for(var _0x1e0601=0x0;_0x1e0601=0x0;})[_0x9318('0xac')](myreject(_0x5a9614)));}}else{_0x105a20[_0x9318('0x12b')](ami[_0x9318('0x14f')]({'action':_0x9318('0x14b'),'command':util[_0x9318('0x72')]('iftime\x20%s,%s',_0x2f002d,!_[_0x9318('0x3a')](config[_0x9318('0x147')][_0x52eb92])?_0x52eb92:'')})[_0x9318('0xb4')](function(_0x105291){return _0x105291[_0x9318('0x150')][_0x9318('0x14e')]('true')>=0x0;})['catch'](myreject(_0x5a9614)));}BPromise[_0x9318('0x151')](_0x105a20)[_0x9318('0xb4')](function(_0x400342){var _0x360325=_[_0x9318('0x152')](_0x400342);if(_0x360325){return _0x519f24(_0x360325);}else{_0x499d15['message']=_0x3c6e6e?_0x9318('0x153'):_0x9318('0x154');return _0x5a9614(msgResponse(_0x9318('0x155'),_0x9318('0x144'),_0x9318('0x156')+_0x3c6e6e+'\x20'+_0x37fb50+_0x9318('0x157')+util[_0x9318('0x93')](_0x2f002d,{'showHidden':![],'depth':null})+_0x9318('0x158')+_0x52eb92));}})[_0x9318('0xac')](function(_0x1f6f54){return _0x5a9614(msgResponse(_0x9318('0x143'),_0x9318('0x144'),JSON[_0x9318('0x71')](_0x1f6f54)));});});};Dialer[_0x9318('0x16')][_0x9318('0x159')]=function(_0x296aed){var _0x2aab4e=this;return function(){switch(_0x296aed[_0x9318('0x54')]){case _0x9318('0x15a'):freeVariablesPredictive(_0x296aed);_0x2aab4e[_0x9318('0x15b')](_0x296aed,0x1);break;case _0x9318('0x15c'):freeVariablesPredictive(_0x296aed);_0x2aab4e[_0x9318('0x15b')](_0x296aed,_0x296aed[_0x9318('0x15d')]);break;case _0x9318('0x15e'):_0x2aab4e[_0x9318('0x15e')](_0x296aed);break;case _0x9318('0x15f'):freeVariablesPredictive(_0x296aed);_0x2aab4e['handlePower'](_0x296aed,0x1);break;default:freeVariablesPredictive(_0x296aed);logger[_0x9318('0x92')](_0x9318('0x160'),_0x296aed[_0x9318('0x3c')],'method\x20not\x20recognized');}};};Dialer[_0x9318('0x16')][_0x9318('0x161')]=function(_0x51ef7d){var _0x5e4aec=this;return function(){_0x5e4aec['handleIvr'](_0x51ef7d);};};Dialer[_0x9318('0x16')][_0x9318('0x9')]=function(_0x131127){var _0x101e5f=this;if(isNotPreview(_0x131127[_0x9318('0x54')])){if(isVoiceQueueOutbound(_0x131127[_0x9318('0x50')])&&isActive(_0x131127['dialActive'])){_0x131127[_0x9318('0x9d')]=!![];BPromise[_0x9318('0xb3')]()['then'](checkIsLoggedIn(_0x131127,_0x131127[_0x9318('0x4b')]))[_0x9318('0xb4')](checkIsActive(_0x131127,_0x131127[_0x9318('0x162')]))[_0x9318('0xb4')](checkInterval(_0x131127))[_0x9318('0xb4')](_0x101e5f[_0x9318('0x163')](_0x131127))[_0x9318('0xb4')](_0x101e5f['checkIfTime'](_0x131127[_0x9318('0x164')],_0x131127[_0x9318('0x165')],_0x131127['name'],_0x131127))[_0x9318('0xb4')](_0x101e5f[_0x9318('0x142')](_0x131127['Interval'],_0x131127[_0x9318('0x165')],_0x131127[_0x9318('0x3c')],_0x131127))[_0x9318('0xb4')](_0x101e5f[_0x9318('0x159')](_0x131127))[_0x9318('0xac')](loggerCatchQueueSummary(_0x9318('0x166'),_0x131127));}else{notSendMessagesQueue(_0x131127);}}else{freeVariablesPredictive(_0x131127);}};Dialer[_0x9318('0x16')][_0x9318('0x13d')]=function(){var _0x4896ac=this;var _0x1ead53;for(var _0x3a320e in this[_0x9318('0x1b')]){if(typeof this[_0x9318('0x1b')][_0x3a320e]!==_0x9318('0x96')){_0x1ead53=this[_0x9318('0x1b')][_0x3a320e];if(isCampaignIvr(_0x1ead53[_0x9318('0x50')])&&isActive(_0x1ead53['active'])){_0x1ead53[_0x9318('0x9d')]=!![];BPromise[_0x9318('0xb3')]()[_0x9318('0xb4')](checkIsActive(_0x1ead53,_0x1ead53[_0x9318('0x70')]))[_0x9318('0xb4')](checkInterval(_0x1ead53))[_0x9318('0xb4')](_0x4896ac['checkIsTrunkReachable'](_0x1ead53))[_0x9318('0xb4')](_0x4896ac[_0x9318('0x141')](_0x1ead53['dialGlobalInterval'],_0x1ead53[_0x9318('0x165')],_0x1ead53[_0x9318('0x3c')],_0x1ead53))[_0x9318('0xb4')](_0x4896ac[_0x9318('0x142')](_0x1ead53[_0x9318('0x40')],_0x1ead53['dialTimezone'],_0x1ead53[_0x9318('0x3c')],_0x1ead53))['then'](_0x4896ac['launchHandleIvr'](_0x1ead53))[_0x9318('0xac')](loggerCatchQueueSummary('[syncCampaigns]',_0x1ead53));}else{notSendMessagesCampaign(_0x1ead53);}}}};function getCallerIdRandom(_0x26a53d,_0x3952d0){var _0xfdaccd;var _0x4e896f;var _0x50bd4b;if(_0x3952d0<=0x0){_0x3952d0=0x1;}_0xfdaccd=new RegExp('\x5cw{0,'+_0x3952d0+'}$');_0x4e896f=Math[_0x9318('0x167')](0xa,_0x3952d0-0x1);_0x50bd4b=Math[_0x9318('0x167')](0xa,_0x3952d0)-0x1;return util['format']('%s',_[_0x9318('0x168')](_0x26a53d,_0xfdaccd,_[_0x9318('0x169')](_0x4e896f,_0x50bd4b)));}function extractCalleridName(_0x5b864e){var _0x62e842=_0x5b864e[_0x9318('0x16a')](/"(.*?)"/);return _0x62e842?_0x62e842[0x1]:_0x5b864e;}function extractCalleridNumber(_0x2badd8){var _0x30abeb=_0x2badd8[_0x9318('0x16a')](/<(.*?)>/);return _0x30abeb?_0x30abeb[0x1]:_0x2badd8;}Dialer[_0x9318('0x16')]['actionOriginate']=function(_0x2066a8,_0x214a63){var _0xbe70f5=this;var _0x114abf=uuid['v4']();this[_0x9318('0x20')][_0x114abf]=new Action(_0x2066a8,_0x214a63,_0x114abf);return new BPromise(function(_0x4c57ea,_0x56f507){if(_[_0x9318('0x3a')](_0x2066a8)&&typeof _0x2066a8!==_0x9318('0x16b')){return _0x56f507(msgResponse(_0x9318('0x16c'),_0x9318('0x144'),_0x9318('0x16d')));}if(_[_0x9318('0x3a')](_0x214a63[_0x9318('0x16e')][_0x9318('0x16f')])||_0x214a63['Contact'][_0x9318('0x16f')]===null){return _0x56f507(msgResponse(_0x9318('0x16c'),_0x9318('0x144'),'contact\x20is\x20undefine'));}var _0x367f6f={'XMD-CALLERID':_0xbe70f5[_0x9318('0x20')][_0x114abf][_0x9318('0x170')](),'XMD-AGI':_0x2066a8[_0x9318('0x104')]?util['format'](_0x9318('0x171'),ipAgi,_0x2066a8[_0x9318('0x104')]):_0x9318('0x172'),'XMD-AGIAFTER':_0x2066a8[_0x9318('0x117')]?util[_0x9318('0x72')](_0x9318('0x171'),ipAgi,_0x2066a8['dialQueueProject2']):_0x9318('0x172'),'XMD-QUEUE':_0x2066a8[_0x9318('0x50')]===_0x9318('0x173')?util['format'](_0x9318('0x174'),_0x2066a8[_0x9318('0x3c')],_0x2066a8[_0x9318('0x175')]||'',_0x2066a8[_0x9318('0x10c')]?'c':'',_0x2066a8[_0x9318('0x113')]||0x3):_0x9318('0x172'),'XMD-CONTACTID':_0x214a63[_0x9318('0xd0')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0xbe70f5[_0x9318('0x20')][_0x114abf]['getCaller'](),'XMD-AMD':_0x2066a8[_0x9318('0x176')]?_0x9318('0x177'):'NONE','XMD-DESTINATION':_0x9318('0xdd')};if(_0x2066a8['dialAMDActive']){_0x367f6f['XMD-AMDINITIALSILENCE']=_0x2066a8[_0x9318('0x178')]||0x9c4;_0x367f6f[_0x9318('0x179')]=_0x2066a8[_0x9318('0x17a')]||0x5dc;_0x367f6f['XMD-AMDAFTERGREETINGSILENCE']=_0x2066a8[_0x9318('0x17b')]||0x320;_0x367f6f[_0x9318('0x17c')]=_0x2066a8[_0x9318('0x17d')]||0x1388;_0x367f6f[_0x9318('0x17e')]=_0x2066a8[_0x9318('0x17f')]||0x64;_0x367f6f['XMD-AMDBETWEENWORDSSILENCE']=_0x2066a8['dialAMDBetweenWordsSilence']||0x32;_0x367f6f['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x2066a8['dialAMDMaximumNumberOfWords']||0x3;_0x367f6f[_0x9318('0x180')]=_0x2066a8[_0x9318('0x181')]||0x100;_0x367f6f[_0x9318('0x182')]=_0x2066a8[_0x9318('0x183')]||0x1388;}if(_0x2066a8['type']==='outbound'){_0x367f6f[_0x9318('0x184')]=_0x214a63[_0x9318('0xfa')];}else{_0x367f6f[_0x9318('0x185')]=_0x214a63[_0x9318('0xd2')];}for(var _0x607041 in _0x214a63[_0x9318('0x16e')]){if(typeof _0x214a63[_0x9318('0x16e')][_0x607041]!==_0x9318('0x96')){if(isNotNull(_0x214a63[_0x9318('0x16e')][_0x607041])&&_0x607041!=='id'&&_0x607041!=='tags'&&_0x607041!=='createdAt'&&_0x607041!==_0x9318('0x186')){_0x367f6f[util['format']('%s%s',_0x9318('0x187'),_[_0x9318('0x188')](_0x607041))]=_0x214a63[_0x9318('0x16e')][_0x607041];}}}var _0x41de0e=_0xbe70f5[_0x9318('0xd6')](_0x2066a8[_0x9318('0x6f')])?getCallerId(_0x2066a8[_0x9318('0x6f')][_0x9318('0x189')],_0x2066a8[_0x9318('0x55')],_0x2066a8[_0x9318('0x18a')]>0x0?getCallerIdRandom(_0x2066a8[_0x9318('0x18b')],_0x2066a8[_0x9318('0x18a')]):_0x2066a8[_0x9318('0x18b')]):getCallerId(_[_0x9318('0xa9')](_0x2066a8[_0x9318('0x13e')])?_0x2066a8[_0x9318('0x6f')][_0x9318('0x189')]:_0x2066a8['TrunkBackup'][_0x9318('0x189')],_0x2066a8['dialOriginateCallerIdName'],_0x2066a8[_0x9318('0x18a')]>0x0?getCallerIdRandom(_0x2066a8[_0x9318('0x18b')],_0x2066a8[_0x9318('0x18a')]):_0x2066a8[_0x9318('0x18b')]);if(_0x41de0e){_0x367f6f[_0x9318('0x18c')]=_0xbe70f5[_0x9318('0x20')][_0x114abf][_0x9318('0x18d')]=extractCalleridName(_0x41de0e);_0x367f6f[_0x9318('0x18e')]=_0xbe70f5[_0x9318('0x20')][_0x114abf][_0x9318('0x18f')]=extractCalleridNumber(_0x41de0e);}return ami[_0x9318('0x14f')]({'actionid':_0x114abf,'action':_0x9318('0x16c'),'channel':_0xbe70f5['isTrunkReachable'](_0x2066a8[_0x9318('0x6f')])?util[_0x9318('0x72')](_0x9318('0x190'),_0x2066a8[_0x9318('0x6f')][_0x9318('0x3c')],isNotNull(_0x2066a8[_0x9318('0x57')])?_0x2066a8['dialPrefix'][_0x9318('0x191')]()||'':'',_0x2066a8[_0x9318('0x192')]>0x0?_0x214a63['Contact'][_0x9318('0x16f')][_0x9318('0x193')](_0x2066a8[_0x9318('0x192')]):_0x214a63[_0x9318('0x16e')][_0x9318('0x16f')]):util['format'](_0x9318('0x190'),_[_0x9318('0xa9')](_0x2066a8[_0x9318('0x13e')])?_0x2066a8[_0x9318('0x6f')][_0x9318('0x3c')]:_0x2066a8['TrunkBackup'][_0x9318('0x3c')],isNotNull(_0x2066a8[_0x9318('0x57')])?_0x2066a8['dialPrefix'][_0x9318('0x191')]()||'':'',_0x2066a8[_0x9318('0x192')]>0x0?_0x214a63[_0x9318('0x16e')][_0x9318('0x16f')][_0x9318('0x193')](_0x2066a8[_0x9318('0x192')]):_0x214a63[_0x9318('0x16e')][_0x9318('0x16f')]),'callerid':_0x41de0e,'Exten':'xcally-motion-dialer','Context':_0x9318('0x194'),'Priority':'1','variable':_0x367f6f,'timeout':(_0x2066a8[_0x9318('0x56')]||0x1e)*0x3e8,'async':!![],'channelid':_0x114abf})[_0x9318('0xb4')](function(_0x46fd8e){return _0x4c57ea(_0x46fd8e);})[_0x9318('0xac')](function(_0x33cf81){_0x2066a8[_0x9318('0x5f')]+=0x1;var _0x13bd76=new History(_0xbe70f5[_0x9318('0x20')][_0x114abf]);logger[_0x9318('0x92')](util[_0x9318('0x72')](_0x9318('0x195'),JSON[_0x9318('0x71')](_0x33cf81)));_0x13bd76['state']=0xe;_0x13bd76[_0x9318('0xa4')]=_0x9318('0x196');_0x13bd76['starttime']=moment()['format'](_0x9318('0xf8'));_0x13bd76[_0x9318('0x11c')]=_0x13bd76[_0x9318('0x11b')];_0xbe70f5[_0x9318('0xc7')](_0x13bd76)[_0x9318('0xac')](loggerCatch(_0x9318('0x197')));_0xbe70f5['moveContactManagedDialer'](_0x13bd76)['catch'](loggerCatch(_0x9318('0x197')))[_0x9318('0x137')](function(){delete _0xbe70f5[_0x9318('0x20')][_0x114abf];return _0x56f507(msgResponse(_0x9318('0x16c'),'Error',_0x9318('0x198')));});});});};Dialer[_0x9318('0x16')][_0x9318('0x2b')]=function(_0x22d477){var _0x93f919=this[_0x9318('0x20')][_0x22d477['actionid']];if(_0x93f919){delete this[_0x9318('0x20')][_0x22d477[_0x9318('0x126')]];_0x93f919['responsetime']=moment()[_0x9318('0x72')](_0x9318('0xf8'));var _0xb61c4=_0x93f919[_0x9318('0x50')]==='ivr'?this[_0x9318('0x1b')][_0x93f919[_0x9318('0xaf')]]:this[_0x9318('0x1a')][_0x93f919[_0x9318('0x199')]()];if(!this[_0x9318('0xd4')](_0x22d477[_0x9318('0x19a')])){this['updateOriginated'](_0xb61c4);return this[_0x9318('0x19b')](_0x93f919,_0xb61c4,_0x22d477)[_0x9318('0xac')](loggerCatch(_0x9318('0x19c')));}this[_0x9318('0x22')][_0x22d477[_0x9318('0xe6')]]=_0x93f919;}};Dialer[_0x9318('0x16')]['checkRetriveMax']=function(_0x41c788,_0x4c843a,_0x38d69c){var _0x1cced7=new History(_0x4c843a);if(_0x1cced7[_0x9318('0xeb')]+_0x1cced7[_0x9318('0x101')]+_0x1cced7[_0x9318('0xec')]+_0x1cced7['countnosuchnumberretry']+_0x1cced7['countdropretry']+_0x1cced7['countabandonedretry']+_0x1cced7[_0x9318('0xe7')]+_0x1cced7[_0x9318('0xef')]>=_0x38d69c[_0x9318('0x19d')]-0x1){return!![];}switch(_0x41c788){case 0x3:if(_0x1cced7[_0x9318('0xec')]>=_0x38d69c[_0x9318('0x19e')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countnoanswerretry':_0x1cced7[_0x9318('0xec')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c[_0x9318('0x19f')],_0x9318('0xf7'))[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x1cced7['ContactId'],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7['CampaignId']||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x1a0')));break;case 0x5:if(_0x1cced7[_0x9318('0xeb')]>=_0x38d69c[_0x9318('0x1a1')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countbusyretry':_0x1cced7[_0x9318('0xeb')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c[_0x9318('0x1a2')],_0x9318('0xf7'))['format'](_0x9318('0xf8')),'ContactId':_0x1cced7[_0x9318('0xd0')],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x1a3')));break;case 0x8:if(_0x1cced7[_0x9318('0x101')]>=_0x38d69c[_0x9318('0x1a4')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countcongestionretry':_0x1cced7[_0x9318('0x101')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c['dialCongestionRetryFrequency'],_0x9318('0xf7'))[_0x9318('0x72')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1cced7[_0x9318('0xd0')],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch('[rescheduleContact]\x20[Congestion]'));break;case 0x0:if(_0x1cced7[_0x9318('0x102')]>=_0x38d69c[_0x9318('0x1a5')]-0x1){return!![];}else{this[_0x9318('0xbb')]({'active':![],'countnosuchnumberretry':_0x1cced7['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c[_0x9318('0x1a6')],_0x9318('0xf7'))['format'](_0x9318('0xf8')),'ContactId':_0x1cced7['ContactId'],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch('[rescheduleContact][NoSuchNumber]'));}break;case 0xa:if(_0x1cced7['countdropretry']>=_0x38d69c[_0x9318('0x118')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countdropretry':_0x1cced7[_0x9318('0xed')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c[_0x9318('0x119')],'minutes')[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x1cced7['ContactId'],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7['VoiceQueueId']||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x11a')));break;case 0xb:if(_0x1cced7[_0x9318('0xee')]>=_0x38d69c[_0x9318('0x122')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countabandonedretry':_0x1cced7[_0x9318('0xee')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c['dialAbandonedRetryFrequency'],_0x9318('0xf7'))['format'](_0x9318('0xf8')),'ContactId':_0x1cced7['ContactId'],'ListId':_0x1cced7[_0x9318('0xf9')],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x124')));break;case 0x13:if(_0x1cced7[_0x9318('0xe7')]>=_0x38d69c[_0x9318('0xf2')]-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countmachineretry':_0x1cced7[_0x9318('0xe7')]+=0x1,'scheduledat':moment()[_0x9318('0xf5')](_0x38d69c['dialMachineRetryFrequency'],_0x9318('0xf7'))[_0x9318('0x72')](_0x9318('0xf8')),'ContactId':_0x1cced7[_0x9318('0xd0')],'ListId':_0x1cced7['ListId'],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0xfb')));break;case 0x14:if(_0x1cced7[_0x9318('0xef')]>=_0x38d69c['dialAgentRejectMaxRetry']-0x1){return!![];}this[_0x9318('0xbb')]({'active':![],'countagentrejectretry':_0x1cced7['countagentrejectretry']+=0x1,'scheduledat':moment()['add'](_0x38d69c[_0x9318('0x1a7')],_0x9318('0xf7'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1cced7[_0x9318('0xd0')],'ListId':_0x1cced7['ListId'],'VoiceQueueId':_0x1cced7[_0x9318('0xfa')]||undefined,'CampaignId':_0x1cced7[_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x1a8')));break;default:return!![];}};Dialer['prototype'][_0x9318('0x19b')]=function(_0x254b79,_0x143729,_0x3cf745){var _0x3126bc=this;var _0x1bd608=new History(_0x254b79);return new BPromise(function(_0x567bd3,_0x3f87d8){if(_[_0x9318('0x3a')](_0x143729)&&typeof _0x143729!==_0x9318('0x16b')){return _0x3f87d8(msgResponse('[callProgressDetecting]',_0x9318('0x144'),'entity\x20is\x20undefine'));}if(_[_0x9318('0x3a')](_0x3cf745)&&typeof _0x3cf745!==_0x9318('0x16b')){return _0x3f87d8(msgResponse(_0x9318('0x1a9'),_0x9318('0x144'),_0x9318('0x1aa')));}switch(_0x3cf745['reason']){case'0':_0x143729['outboundNoSuchCallsDay']+=0x1;_0x1bd608[_0x9318('0xa3')]=0x0;_0x1bd608[_0x9318('0xa4')]=_0x9318('0x1ab');_0x1bd608[_0x9318('0x102')]+=0x1;_0x1bd608['countglobal']+=0x1;ami[_0x9318('0xe3')](_0x9318('0x1ac'),ut[_0x9318('0xe9')](_0x254b79,'nosuchnumber'));_0x3126bc[_0x9318('0xc7')](_0x1bd608)['catch'](loggerCatch(_0x9318('0xea')));if(_0x3126bc[_0x9318('0x1ad')](0x0,_0x254b79,_0x143729)){if(_0x1bd608[_0x9318('0x102')]>=_0x143729['dialNoSuchNumberMaxRetry']){_0x3126bc['createStateFinal'](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1ae'));}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1ae'));}}break;case'3':_0x143729[_0x9318('0x1af')]+=0x1;_0x1bd608[_0x9318('0xa3')]=0x3;_0x1bd608[_0x9318('0xa4')]=_0x9318('0x1b0');_0x1bd608[_0x9318('0xec')]+=0x1;_0x1bd608['countglobal']+=0x1;ami[_0x9318('0xe3')](_0x9318('0x1b1'),ut[_0x9318('0xe9')](_0x254b79,'noanswer'));_0x3126bc['createHistory'](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x1b2')));if(_0x3126bc[_0x9318('0x1ad')](0x3,_0x254b79,_0x143729)){if(_0x1bd608[_0x9318('0xec')]>=_0x143729[_0x9318('0x19e')]){_0x3126bc[_0x9318('0xf3')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1b3'));}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1b3'));}}break;case'5':_0x143729[_0x9318('0x5a')]+=0x1;_0x1bd608[_0x9318('0xa3')]=0x5;_0x1bd608['statedesc']=_0x9318('0x1b4');_0x1bd608['countbusyretry']+=0x1;_0x1bd608[_0x9318('0x100')]+=0x1;ami[_0x9318('0xe3')](_0x9318('0x1b5'),ut[_0x9318('0xe9')](_0x254b79,_0x9318('0x1b6')));_0x3126bc[_0x9318('0xc7')](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x1b7')));if(_0x3126bc['checkRetriveMax'](0x5,_0x254b79,_0x143729)){if(_0x1bd608[_0x9318('0xeb')]>=_0x143729['dialBusyMaxRetry']){_0x3126bc[_0x9318('0xf3')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1b8'));}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1b8'));}}break;case'8':_0x143729[_0x9318('0x5b')]+=0x1;_0x1bd608[_0x9318('0xa3')]=0x8;_0x1bd608[_0x9318('0xa4')]=_0x9318('0x1b9');_0x1bd608[_0x9318('0x101')]+=0x1;_0x1bd608[_0x9318('0x100')]+=0x1;ami[_0x9318('0xe3')]('custom:agentcongestion',ut[_0x9318('0xe9')](_0x254b79,_0x9318('0x1ba')));_0x3126bc[_0x9318('0xc7')](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x1bb')));if(_0x3126bc[_0x9318('0x1ad')](0x8,_0x254b79,_0x143729)){if(_0x1bd608[_0x9318('0x101')]>=_0x143729[_0x9318('0x1a4')]){_0x3126bc[_0x9318('0xf3')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1bc'));}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,'reason\x208\x20congestion');}}break;case'11':_0x143729[_0x9318('0x1bd')]+=0x1;_0x1bd608['state']=0xb;_0x1bd608[_0x9318('0xa4')]=_0x9318('0x120');_0x1bd608[_0x9318('0xee')]+=0x1;_0x1bd608['countglobal']+=0x1;_0x3126bc[_0x9318('0xc7')](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x125')));if(_0x3126bc['checkRetriveMax'](0xb,_0x254b79,_0x143729)){if(_0x1bd608['countabandonedretry']>=_0x143729[_0x9318('0x122')]){_0x3126bc['createStateFinal'](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1be'));}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1be'));}}break;case'20':_0x143729['outboundRejectCallsDay']+=0x1;_0x1bd608[_0x9318('0xa3')]=0x14;_0x1bd608[_0x9318('0xa4')]=_0x9318('0x1bf');_0x1bd608['countagentrejectretry']+=0x1;_0x1bd608[_0x9318('0x100')]+=0x1;ami['emit'](_0x9318('0x1c0'),ut[_0x9318('0xe9')](_0x254b79,_0x9318('0x1c1')));_0x3126bc[_0x9318('0xc7')](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x1c2')));if(_0x3126bc[_0x9318('0x1ad')](0x14,_0x254b79,_0x143729)){if(_0x1bd608['countagentrejectretry']>=_0x143729[_0x9318('0x1c3')]){_0x3126bc[_0x9318('0xf3')](_0x1bd608,_0x567bd3,_0x3f87d8,'reason\x2020\x20agentreject');}else{_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x9318('0x1c4'));}}break;default:_0x143729[_0x9318('0x62')]+=0x1;_0x1bd608[_0x9318('0xa3')]=0xc;_0x1bd608[_0x9318('0xa4')]=_0x3cf745[_0x9318('0x10a')];_0x3126bc[_0x9318('0xc7')](_0x1bd608)[_0x9318('0xac')](loggerCatch(_0x9318('0x1c5')));if(_0x3126bc[_0x9318('0x1ad')](_0x3cf745[_0x9318('0x10a')],_0x254b79,_0x143729)){if(_0x1bd608[_0x9318('0xeb')]+_0x1bd608['countcongestionretry']+_0x1bd608[_0x9318('0xec')]+_0x1bd608['countnosuchnumberretry']+_0x1bd608[_0x9318('0xed')]+_0x1bd608['countabandonedretry']+_0x1bd608[_0x9318('0xe7')]+_0x1bd608[_0x9318('0xef')]>=_0x143729['dialGlobalMaxRetry']){_0x3126bc[_0x9318('0xf0')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x3cf745[_0x9318('0x10a')]);}else{_0x3126bc[_0x9318('0xf3')](_0x1bd608,_0x567bd3,_0x3f87d8,_0x3cf745[_0x9318('0x10a')]);}}}});};Dialer[_0x9318('0x16')][_0x9318('0xf0')]=function(_0x4a4f05,_0x19bcfa,_0x42cdf3,_0x4c1dfa){var _0x355f69=new Final(_0x4a4f05);_0x355f69['state']=0xf;_0x355f69[_0x9318('0xa4')]=_0x9318('0x1c6');this[_0x9318('0xf3')](_0x355f69,_0x19bcfa,_0x42cdf3,_0x4c1dfa);};Dialer[_0x9318('0x16')][_0x9318('0xf3')]=function(_0x47de08,_0x25a0d1,_0x3282cd,_0x4b4e81){this[_0x9318('0xc5')](_0x47de08)[_0x9318('0xb4')](function(){return _0x25a0d1(msgResponse(_0x9318('0x1a9'),_0x9318('0xd5'),_0x4b4e81));})[_0x9318('0xac')](function(){return _0x3282cd(msgResponse(_0x9318('0x1c7'),'Failure','contact\x20not\x20moved'));});};Dialer[_0x9318('0x16')][_0x9318('0x15e')]=function(_0x3c66f0){var _0x550273=_0x3c66f0[_0x9318('0x1c8')]/0x64;var _0x45fd05=_0x3c66f0[_0x9318('0x5d')]/(_0x3c66f0[_0x9318('0x5d')]+_0x3c66f0['outboundAnswerCallsDay']);var _0x5ecfa4=Math[_0x9318('0x1c9')](_0x3c66f0[_0x9318('0x68')]*(_0x3c66f0[_0x9318('0x1ca')]/0x64));var _0x4714b8=Math[_0x9318('0x1c9')](_0x3c66f0[_0x9318('0x68')]*(_0x3c66f0[_0x9318('0x1cb')]/0x64));var _0x4b182b=_0x3c66f0[_0x9318('0x4a')]+_0x3c66f0['talking'];var _0x52a678=Math[_0x9318('0x1cc')](_0x3c66f0[_0x9318('0x6b')]*_0x3c66f0['erlangAbandonmentRate']*_0x3c66f0['predictiveIntervalHitRate']*_0x3c66f0[_0x9318('0x1cd')]);if(_[_0x9318('0x3a')](_0x3c66f0[_0x9318('0x8a')])){if(!_[_0x9318('0x3a')](_0x3c66f0[_0x9318('0x23')])){_0x3c66f0[_0x9318('0x23')]=undefined;loggerPredictive[_0x9318('0x92')](_0x9318('0x1ce'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_['isUndefined'](_0x3c66f0[_0x9318('0x8d')])){loggerPredictive[_0x9318('0x92')](_0x9318('0x1ce'),_0x9318('0x1cf'));clearInterval(_0x3c66f0[_0x9318('0x8d')]);_0x3c66f0[_0x9318('0x8d')]=undefined;}_0x3c66f0[_0x9318('0x8a')]=moment()['format'](_0x9318('0xf8'));loggerPredictive[_0x9318('0x78')](_0x3c66f0['name'],_0x9318('0x1d0'),_0x3c66f0[_0x9318('0x8a')]);this[_0x9318('0x15b')](_0x3c66f0,0x1);}else if(ifInterval(_0x3c66f0[_0x9318('0x1d1')],_0x3c66f0[_0x9318('0x8a')])){this[_0x9318('0x15b')](_0x3c66f0,0x1);loggerPredictiveCalls[_0x9318('0x78')]('[startMethodPredictive][StartProgressive][Loop]',_0x3c66f0[_0x9318('0x8a')],_0x3c66f0[_0x9318('0x3c')]);_0x3c66f0[_0x9318('0x6b')]=0x0;_0x3c66f0[_0x9318('0x1d2')]=0x0;}else if(_0x550273<_0x45fd05&&_0x3c66f0[_0x9318('0x1d3')]===_0x9318('0x1d4')){freeVariablesPredictive(_0x3c66f0);loggerPredictive[_0x9318('0x78')]('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]',_0x9318('0x1d5'),_0x45fd05,_0x9318('0x8a'),_0x3c66f0['name']);}else if(_0x52a678<_0x3c66f0[_0x9318('0x1d2')]&&_0x3c66f0[_0x9318('0x1d3')]===_0x9318('0x1d4')){freeVariablesPredictive(_0x3c66f0);loggerPredictive[_0x9318('0x78')](_0x9318('0x1d6'),_0x9318('0x1d7'),_0x52a678,'Drop\x20in\x20this\x20interval',_0x3c66f0['predictiveIntervalErlangCallsDroppedCalls'],_0x9318('0x8a'),_0x3c66f0[_0x9318('0x3c')]);}else if(!ifInterval(_0x3c66f0['dialPredictiveInterval'],_0x3c66f0[_0x9318('0x8a')])&&_[_0x9318('0x3a')](_0x3c66f0[_0x9318('0x23')])&&!_['isUndefined'](_0x3c66f0[_0x9318('0x8a')])){_0x3c66f0[_0x9318('0x23')]=moment()[_0x9318('0x72')](_0x9318('0xf8'));loggerPredictive[_0x9318('0x78')](_0x3c66f0[_0x9318('0x3c')],_0x9318('0x1d8'),_0x3c66f0[_0x9318('0x23')]);this['averageHandleTime'](_0x3c66f0['dialPredictiveInterval'])[_0x9318('0xb4')](this['getDataPredictive'](_0x3c66f0))['then'](mergeDataErlangB(_0x3c66f0))[_0x9318('0xb4')](this[_0x9318('0x1d9')](_0x3c66f0))[_0x9318('0xac')](loggerCatchPredictive(_0x9318('0x1da'),_0x3c66f0));}else if(!ifInterval(_0x3c66f0['dialPredictiveInterval'],_0x3c66f0[_0x9318('0x23')])){_0x3c66f0[_0x9318('0x1d2')]=0x0;_0x3c66f0['startPredictive']=moment()[_0x9318('0x72')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x9318('0x78')](_0x3c66f0['name'],'recalculate\x20predictive\x20at',_0x3c66f0[_0x9318('0x23')]);clearInterval(_0x3c66f0[_0x9318('0x8d')]);_0x3c66f0[_0x9318('0x8d')]=undefined;this[_0x9318('0x1db')](_0x3c66f0[_0x9318('0x1d1')])[_0x9318('0xb4')](this['getDataPredictive'](_0x3c66f0))[_0x9318('0xb4')](mergeDataErlangB(_0x3c66f0))[_0x9318('0xb4')](this[_0x9318('0x1d9')](_0x3c66f0))['catch'](loggerCatchPredictive(_0x9318('0x1dc'),_0x3c66f0));}else if(_0x3c66f0[_0x9318('0x68')]&&_0x4b182b<_0x3c66f0['predictiveIntervalAvailable']-_0x4714b8){freeVariablesPredictive(_0x3c66f0);loggerPredictive['info'](_0x3c66f0[_0x9318('0x3c')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x4b182b,_0x9318('0x1dd'),_0x3c66f0[_0x9318('0x68')],'-',_0x4714b8,'=',_0x3c66f0[_0x9318('0x68')]-_0x4714b8,')');}else if(_0x3c66f0[_0x9318('0x68')]&&_0x4b182b>_0x3c66f0[_0x9318('0x68')]+_0x5ecfa4){freeVariablesPredictive(_0x3c66f0);loggerPredictive[_0x9318('0x78')](_0x3c66f0[_0x9318('0x3c')],_0x9318('0x1de'),_0x4b182b,_0x9318('0x1df'),_0x3c66f0['predictiveIntervalAvailable'],'+',_0x5ecfa4,'=',_0x3c66f0[_0x9318('0x68')]+_0x5ecfa4,')');}};Dialer[_0x9318('0x16')][_0x9318('0x1e0')]=function(_0x35c319){var _0x397192=this;return function(_0x7ec0f0){return new BPromise(function(_0x11070e,_0x7dc548){_[_0x9318('0x89')](_0x35c319,_0x7ec0f0[0x0]);if(checkGetDataPredictive(_0x7ec0f0[0x0])){var _0x47da99=_0x35c319[_0x9318('0x68')]=_0x35c319['talking']+_0x35c319[_0x9318('0x4a')];var _0x49790b=_0x35c319[_0x9318('0x1d1')]*0x3c;var _0xc79a0a=_0x7ec0f0[0x0][_0x9318('0x64')]+_0x7ec0f0[0x0][_0x9318('0x80')];var _0x5c5be4=(_0x7ec0f0[0x0][_0x9318('0x63')]+_0x7ec0f0[0x0][_0x9318('0x65')]+_0x7ec0f0[0x0][_0x9318('0x7e')])/_0x7ec0f0[0x0][_0x9318('0x69')];_0x35c319['predictiveIntervalHitRate']=_0x5c5be4>0x0?_0x5c5be4:0x1;switch(_0x35c319[_0x9318('0x1d3')]){case'dropRate':var _0x4bcb28=_0x35c319[_0x9318('0x1c8')]/0x64;return _0x397192[_0x9318('0x1e1')](_0x47da99,_0x49790b,_0xc79a0a,_0x5c5be4,_0x4bcb28)[_0x9318('0xb4')](function(_0x3ed082){return _0x11070e(_0x3ed082);});case'agentBusyFactor':var _0x3f1b80=_0x35c319['dialPredictiveOptimizationPercentage']/0x64;return _0x397192['busyFactor'](_0x47da99,_0x49790b,_0xc79a0a,_0x5c5be4,_0x3f1b80)[_0x9318('0xb4')](function(_0x28ea34){return _0x11070e(_0x28ea34);});default:return _0x7dc548(msgResponse('[getDataPredictive]',_0x9318('0x144'),'Unknown\x20Predictive'));}}else{return _0x7dc548(msgResponse(_0x9318('0x1e2'),_0x9318('0x144'),_0x9318('0x1e3')));}});};};Dialer[_0x9318('0x16')][_0x9318('0x1e4')]=function(_0xefa77a){var _0x172d55=this;return function(_0xeb7828){return new BPromise(function(_0x280281,_0x386d2e){_[_0x9318('0x89')](_0xefa77a,_0xeb7828[0x0]);if(checkGetDataPredictive(_0xeb7828[0x0])){loggerPredictive[_0x9318('0x78')](JSON['stringify'](_0xeb7828[0x0]));if(_0xefa77a[_0x9318('0x1d3')]===_0x9318('0x1d4')){return _0x172d55[_0x9318('0xc3')](_0xefa77a['id'])[_0x9318('0xb4')](function(_0x44a20d){var _0x25f3a1=_0xefa77a[_0x9318('0x4b')]-_0x44a20d[0x0][_0x9318('0x1e5')];var _0x1f3d8b=_0xefa77a[_0x9318('0x1d1')]*0x3c;var _0x304f3e=_0xeb7828[0x0][_0x9318('0x64')]+_0xeb7828[0x0]['predictiveIntervalAvgHoldtime'];var _0x4911fa=(_0xeb7828[0x0][_0x9318('0x63')]+_0xeb7828[0x0][_0x9318('0x65')]+_0xeb7828[0x0][_0x9318('0x7e')])/_0xeb7828[0x0]['predictiveIntervalTotalCalls'];var _0x30ab3d=_0xefa77a[_0x9318('0x1c8')]/0x64;_0xefa77a['predictiveIntervalPauses']=_0x44a20d[0x0]['outboundQueuePauses']||0x0;_0xefa77a[_0x9318('0x1e6')]=_0x4911fa>0x0?_0x4911fa:0x1;return _0x172d55[_0x9318('0x1e1')](_0x25f3a1,_0x1f3d8b,_0x304f3e,_0x4911fa,_0x30ab3d);})[_0x9318('0xb4')](function(_0x482df0){return _0x280281(_0x482df0);})['catch'](function(_0x45cf7e){return _0x386d2e(msgResponse(_0x9318('0x1e7'),_0x9318('0x144'),JSON[_0x9318('0x71')](_0x45cf7e)));});}if(_0xefa77a['dialPredictiveOptimization']===_0x9318('0x1e8')){return _0x172d55[_0x9318('0xc3')](_0xefa77a['id'])[_0x9318('0xb4')](function(_0x2d987d){var _0xa53a31=_0xefa77a[_0x9318('0x4b')]-_0x2d987d[0x0][_0x9318('0x1e5')];var _0x48e3ac=_0xefa77a[_0x9318('0x1d1')]*0x3c;var _0x2e1a5b=_0xeb7828[0x0]['predictiveIntervalAvgTalktime']+_0xeb7828[0x0]['predictiveIntervalAvgHoldtime'];var _0x24c41c=(_0xeb7828[0x0]['predictiveIntervalAnsweredCalls']+_0xeb7828[0x0][_0x9318('0x65')]+_0xeb7828[0x0][_0x9318('0x7e')])/_0xeb7828[0x0][_0x9318('0x69')];var _0x530ecc=_0xefa77a[_0x9318('0x1c8')]/0x64;_0xefa77a[_0x9318('0x67')]=_0x2d987d[0x0][_0x9318('0x1e5')]||0x0;_0xefa77a[_0x9318('0x1e6')]=_0x24c41c>0x0?_0x24c41c:0x1;return _0x172d55[_0x9318('0x1e9')](_0xa53a31,_0x48e3ac,_0x2e1a5b,_0x24c41c,_0x530ecc);})['then'](function(_0x25456f){return _0x280281(_0x25456f);})['catch'](function(_0x263ed1){return _0x386d2e(msgResponse(_0x9318('0x1e7'),_0x9318('0x144'),JSON[_0x9318('0x71')](_0x263ed1)));});}}else{return _0x386d2e(msgResponse(_0x9318('0x1e2'),_0x9318('0x144'),_0x9318('0x1e3')));}});};};Dialer['prototype']['startMethodPredictive']=function(_0x38a47a){var _0x7a1e56=this;return function(){var _0x1a5d57=0x0;var _0x16b8a3=Math[_0x9318('0x1cc')](_0x38a47a['erlangCallToSecond']*0x3e8);if(_0x16b8a3>0x0){_0x16b8a3=_0x16b8a3<0x64?0x64:_0x16b8a3;loggerPredictive[_0x9318('0x78')](_0x38a47a[_0x9318('0x3c')],_0x9318('0x1ea'),_0x16b8a3,_0x9318('0x45'));_0x38a47a[_0x9318('0x8d')]=setInterval(function(){_0x7a1e56['handlePredictive'](_0x38a47a);loggerPredictiveCalls[_0x9318('0x78')](_0x9318('0x1eb'),_0x1a5d57+=0x1);},_0x16b8a3);}else{loggerPredictive[_0x9318('0x78')](_0x38a47a[_0x9318('0x3c')],_0x9318('0x1ec'));}};};Dialer[_0x9318('0x16')][_0x9318('0x1ed')]=function(_0x18f954,_0x822330){var _0x39c2cd=this;return function(_0x5c3f0e){if(_[_0x9318('0x77')](_0x5c3f0e)){if(_[_0x9318('0xa9')](_0x822330[_0x9318('0xd1')])||!_0x822330[_0x9318('0x1ee')]){if(_0x18f954[_0x9318('0x54')]===_0x9318('0x15f')){_0x18f954[_0x9318('0x12d')]=_[_0x9318('0x3a')](_0x18f954['queueStatusComplete'])?!![]:_0x18f954['queueStatusComplete'];var _0x228fac=uuid['v4']();_0x39c2cd[_0x9318('0x20')][_0x228fac]=new Action(_0x18f954,_0x822330,_0x228fac);loggerBooked['info'](_0x9318('0x1ef'),_0x228fac,_0x9318('0x1f0'),JSON[_0x9318('0x71')](_0x18f954[_0x9318('0x12d')]),'Queue:\x20',_0x18f954[_0x9318('0x3c')]);if(_0x18f954['queueStatusComplete']){_0x18f954[_0x9318('0x12d')]=![];_0x39c2cd[_0x9318('0x24')][_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xaf')]]=[];ami[_0x9318('0x14f')]({'actionid':_0x228fac,'action':'queuestatus','queue':_0x18f954[_0x9318('0x3c')]})[_0x9318('0xac')](function(){_0x39c2cd['updateOriginated'](_0x18f954);_0x39c2cd['rescheduleContact']({'active':![],'ContactId':_0x39c2cd[_0x9318('0x20')][_0x228fac]['ContactId'],'ListId':_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xf9')],'VoiceQueueId':_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xfa')]||undefined,'CampaignId':_0x39c2cd['actions'][_0x228fac][_0x9318('0xd2')]||undefined})[_0x9318('0xac')](loggerCatch(_0x9318('0x1f1')));delete _0x39c2cd[_0x9318('0x20')][_0x228fac];});}else{loggerBooked[_0x9318('0x78')]('[booked][checkContactBlack][else]',JSON[_0x9318('0x71')](_0x18f954['queueStatusComplete']),'Queue:\x20',_0x18f954[_0x9318('0x3c')]);_0x39c2cd[_0x9318('0xb0')](_0x18f954);_0x39c2cd[_0x9318('0xbb')]({'active':![],'ContactId':_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xd0')],'ListId':_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xf9')],'VoiceQueueId':_0x39c2cd['actions'][_0x228fac]['VoiceQueueId']||undefined,'CampaignId':_0x39c2cd[_0x9318('0x20')][_0x228fac][_0x9318('0xd2')]||undefined})['catch'](loggerCatch(_0x9318('0x1f1')));delete _0x39c2cd['actions'][_0x228fac];}}else{return _0x39c2cd[_0x9318('0x1f2')](_0x18f954,_0x822330);}}else{if(getDiff(_0x822330[_0x9318('0x1f3')])<_0x18f954['dialRecallMeTimeout']*0x3c){if(_0x822330[_0x9318('0x1f4')]&&!_0x822330['Agent']['voicePause']){_0x39c2cd[_0x9318('0x19')][_0x9318('0x130')](_0x822330['id'])[_0x9318('0x137')](function(){_0x39c2cd[_0x9318('0xb0')](_0x18f954);});}else{_0x39c2cd[_0x9318('0xbc')]({'active':![]},_0x822330['id'],0x1)['finally'](function(){_0x39c2cd[_0x9318('0xb0')](_0x18f954);});}}else{_0x18f954['outboundReCallsDay']+=0x1;_0x39c2cd[_0x9318('0xb0')](_0x18f954);if(_0x18f954['dialRecallInQueue']){_0x39c2cd['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x822330[_0x9318('0xd0')],'ListId':_0x822330[_0x9318('0xf9')],'VoiceQueueId':_0x822330['VoiceQueueId']||undefined,'CampaignId':_0x822330[_0x9318('0xd2')]||undefined})['catch'](loggerCatch(_0x9318('0x1f5')));_0x39c2cd['createHistory'](createObjHistory(_0x18f954,_0x822330,_0x9318('0x1f6'),0x17,_0x9318('0x1f7')))[_0x9318('0xac')](loggerCatch(_0x9318('0x1f8')));}else{_0x39c2cd[_0x9318('0xce')](createObjHistory(_0x18f954,_0x822330,_0x9318('0x1f9'),0x16,'RecallFailedTimeout'),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x18f954['outboundBlacklistCallsDay']+=0x1;_0x39c2cd['saveInDb'](createObjHistory(_0x18f954,_0x822330,_0x9318('0x1fa'),0xd,_0x9318('0x1fb')),_0x9318('0x1fc'),_0x9318('0x1fd'));throw _0x9318('0x1fe');}};};Dialer[_0x9318('0x16')][_0x9318('0x1ff')]=function(_0x185a36){var _0x2b0068=this;var _0x4d6a8d=_0x185a36['limitCalls']-_0x185a36[_0x9318('0x6a')]-_0x185a36[_0x9318('0xbf')];emitCampaignSummary(_0x185a36);if(_0x4d6a8d>0x0){if(_0x4d6a8d>this['maxNumberOriginate']){_0x4d6a8d=this[_0x9318('0x1e')];}_0x185a36[_0x9318('0xbf')]+=_0x4d6a8d;this[_0x9318('0xc1')](_0x185a36['id'],_0x4d6a8d,_0x185a36['dialOrderByScheduledAt'],_0x185a36)[_0x9318('0xb4')](function(_0x517ac1){_0x185a36['temp']-=_0x4d6a8d;_0x185a36[_0x9318('0xbf')]=_0x185a36[_0x9318('0xbf')]>0x0?_0x185a36[_0x9318('0xbf')]:0x0;if(!checkContactEmpty(_0x517ac1)){_0x185a36[_0x9318('0x3d')]=_0x9318('0x9b');logger[_0x9318('0x78')](_0x9318('0x200')+_0x185a36[_0x9318('0x3c')]);}else{_0x185a36['originated']+=_0x517ac1['length'];_0x185a36[_0x9318('0x3d')]='RUNNING';for(var _0x1e5f2f=0x0;_0x1e5f2f<_0x517ac1[_0x9318('0x95')];_0x1e5f2f+=0x1){_0x185a36[_0x9318('0x201')]+=0x1;if(_['isNil'](_0x517ac1[_0x1e5f2f])||_[_0x9318('0xa9')](_0x517ac1[_0x1e5f2f][_0x9318('0x16e')])||_[_0x9318('0xa9')](_0x517ac1[_0x1e5f2f]['Contact'][_0x9318('0x16f')])){_0x2b0068[_0x9318('0xcc')](_0x9318('0x202'),_0x185a36,_0x517ac1[_0x1e5f2f]);}else{_0x2b0068[_0x9318('0xb8')](_[_0x9318('0xcf')](_0x517ac1[_0x1e5f2f],['CampaignId',_0x9318('0x203')]))[_0x9318('0xb4')](_0x2b0068[_0x9318('0x1ed')](_0x185a36,_0x517ac1[_0x1e5f2f]))['catch'](_0x2b0068[_0x9318('0xcb')](_0x9318('0x204'),_0x185a36));}}}})[_0x9318('0xac')](loggerGetContactDialer(_0x9318('0x205'),_0x185a36,_0x4d6a8d));}};Dialer[_0x9318('0x16')][_0x9318('0x15b')]=function(_0x2f9350,_0x11d7f2){var _0x46c0f8=this;var _0x6f7c78=[];var _0x3161ab=_0x11d7f2>=0x1?_0x11d7f2:0x1;if(_0x2f9350[_0x9318('0x54')]===_0x9318('0x15f')){_0x3161ab=0x1;}var _0x1ef083=Math[_0x9318('0x1cc')](_0x2f9350[_0x9318('0x4a')]*_0x3161ab)-_0x2f9350['originated']-_0x2f9350['temp'];emitVoiceQueueSummary(_0x2f9350);if(_0x2f9350[_0x9318('0x206')]>0x0){var _0x5b841a=_0x2f9350['dialLimitQueue']-_0x2f9350[_0x9318('0x6a')]-_0x2f9350[_0x9318('0x4f')]-_0x2f9350[_0x9318('0xbf')]-_0x2f9350[_0x9318('0x9c')];if(_0x1ef083>_0x5b841a){_0x1ef083=_0x5b841a;}}if(_0x1ef083>0x0){if(_0x2f9350[_0x9318('0x54')]==='booked'){_0x1ef083=0x1;}if(_0x1ef083>this[_0x9318('0x1e')]){_0x1ef083=this[_0x9318('0x1e')];}_0x2f9350[_0x9318('0xbf')]+=_0x1ef083;for(var _0x1d2522 in this[_0x9318('0x1c')]){if(typeof this[_0x9318('0x1c')][_0x1d2522]!==_0x9318('0x96')){if(this['agents'][_0x1d2522][_0x9318('0xa3')]==='not_inuse'&&this[_0x9318('0x1c')][_0x1d2522][_0x9318('0xaa')]==='reachable'){_0x6f7c78[_0x9318('0x12b')](this[_0x9318('0x1c')][_0x1d2522]['id']);}}}this[_0x9318('0xbe')](_0x2f9350['id'],_0x6f7c78,_0x1ef083,_0x2f9350[_0x9318('0x207')],_0x2f9350)['then'](function(_0x3a727e){_0x2f9350[_0x9318('0xbf')]-=_0x1ef083;_0x2f9350[_0x9318('0xbf')]=_0x2f9350[_0x9318('0xbf')]>0x0?_0x2f9350['temp']:0x0;if(!checkContactEmpty(_0x3a727e)){_0x46c0f8[_0x9318('0xb2')](_0x2f9350)[_0x9318('0xb4')](sendMessageReschedule(_0x2f9350))[_0x9318('0xac')](loggerCatch(_0x9318('0xb5')));}else{_0x2f9350[_0x9318('0x6a')]+=_0x3a727e[_0x9318('0x95')];_0x2f9350['message']=_0x2f9350[_0x9318('0x54')]===_0x9318('0x15f')?_0x9318('0x177'):_0x9318('0x208');for(var _0x84a9ef=0x0;_0x84a9ef<_0x3a727e[_0x9318('0x95')];_0x84a9ef+=0x1){if(_['isNil'](_0x3a727e[_0x84a9ef])||_[_0x9318('0xa9')](_0x3a727e[_0x84a9ef][_0x9318('0x16e')])||_[_0x9318('0xa9')](_0x3a727e[_0x84a9ef][_0x9318('0x16e')][_0x9318('0x16f')])){_0x46c0f8[_0x9318('0xcc')](_0x9318('0x202'),_0x2f9350,_0x3a727e[_0x84a9ef]);}else{_0x46c0f8[_0x9318('0xb6')](_['pick'](_0x3a727e[_0x84a9ef],[_0x9318('0xfa'),'Contact.phone']))[_0x9318('0xb4')](_0x46c0f8[_0x9318('0x1ed')](_0x2f9350,_0x3a727e[_0x84a9ef]))['catch'](_0x46c0f8[_0x9318('0xcb')](_0x9318('0x202'),_0x2f9350));}}}})[_0x9318('0xac')](loggerGetContactDialer(_0x9318('0x209'),_0x2f9350,_0x1ef083));}};Dialer[_0x9318('0x16')]['handlePredictive']=function(_0x1ac1d1){if(_0x1ac1d1['dialLimitQueue']>0x0){var _0x2362fc=_0x1ac1d1[_0x9318('0x206')]-_0x1ac1d1[_0x9318('0x6a')]-_0x1ac1d1[_0x9318('0x4f')];if(_0x2362fc>0x0){this[_0x9318('0x20a')](_0x1ac1d1);}else{loggerPredictiveCalls['info']('[handlePredictive][limitChannel]');}}else{this[_0x9318('0x20a')](_0x1ac1d1);}};Dialer[_0x9318('0x16')][_0x9318('0x20a')]=function(_0x5d35d2){var _0x5e22ba=this;var _0x5ab2f3=[];_0x5d35d2[_0x9318('0x6a')]+=0x1;for(var _0x1cf7dc in this[_0x9318('0x1c')]){if(typeof this[_0x9318('0x1c')][_0x1cf7dc]!==_0x9318('0x96')){if(this[_0x9318('0x1c')][_0x1cf7dc][_0x9318('0xa3')]===_0x9318('0x20b')&&this[_0x9318('0x1c')][_0x1cf7dc][_0x9318('0xaa')]===_0x9318('0xd8')){_0x5ab2f3[_0x9318('0x12b')](this[_0x9318('0x1c')][_0x1cf7dc]['id']);}}}this[_0x9318('0xbe')](_0x5d35d2['id'],_0x5ab2f3,0x1,_0x5d35d2['dialOrderByScheduledAt'],_0x5d35d2)[_0x9318('0xb4')](function(_0x3f8307){if(!checkContactEmpty(_0x3f8307)){checkContactLowerLimitOriginate(_0x5d35d2,0x1,0x0);_0x5e22ba[_0x9318('0xb2')](_0x5d35d2)['then'](sendMessageReschedule(_0x5d35d2))[_0x9318('0xac')](loggerCatch(_0x9318('0xb5')));}else{_0x5d35d2['message']=_0x9318('0x208');if(_[_0x9318('0xa9')](_0x3f8307[0x0])||_[_0x9318('0xa9')](_0x3f8307[0x0][_0x9318('0x16e')])||_[_0x9318('0xa9')](_0x3f8307[0x0]['Contact'][_0x9318('0x16f')])){_0x5e22ba[_0x9318('0xcc')]('[actionOriginate]\x20',_0x5d35d2,_0x3f8307[0x0]);}else{_0x5e22ba[_0x9318('0xb6')](_['pick'](_0x3f8307[0x0],[_0x9318('0xfa'),_0x9318('0x203')]))[_0x9318('0xb4')](_0x5e22ba[_0x9318('0x1ed')](_0x5d35d2,_0x3f8307[0x0]))['catch'](_0x5e22ba[_0x9318('0xcb')](_0x9318('0x20c'),_0x5d35d2));}}})[_0x9318('0xac')](loggerGetContactDialer('[getContactDialerPredictive]',_0x5d35d2,0x1));emitVoiceQueueSummary(_0x5d35d2);};Dialer[_0x9318('0x16')][_0x9318('0x1e1')]=function(_0x5e495c,_0x4320df,_0x2c3df1,_0x65b71f,_0x3f9954,_0x20e302){loggerPredictive[_0x9318('0x78')](_0x9318('0x20d'));loggerPredictive[_0x9318('0x78')](_0x9318('0x20e'),_0x5e495c);loggerPredictive[_0x9318('0x78')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4320df);loggerPredictive[_0x9318('0x78')]('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',_0x2c3df1);loggerPredictive[_0x9318('0x78')](_0x9318('0x20f'),_0x65b71f);loggerPredictive['info'](_0x9318('0x210'),_0x3f9954);loggerPredictive['info']('---------------------------');return new BPromise(function(_0x20378d,_0x175105){if(_0x5e495c<=0x0||isNaN(_0x5e495c)){return _0x175105(msgResponse('[abandonmentRate]',_0x9318('0x211'),_0x9318('0x212')+_0x5e495c));}if(_0x2c3df1<=0x0||isNaN(_0x2c3df1)){return _0x175105(msgResponse(_0x9318('0x213'),'Error','Ts\x20=\x20'+_0x2c3df1));}if(_0x65b71f<=0x0||isNaN(_0x65b71f)){return _0x175105(msgResponse(_0x9318('0x213'),_0x9318('0x211'),_0x9318('0x214')+_0x65b71f));}if(_0x4320df<=0x0||isNaN(_0x4320df)){return _0x175105(msgResponse(_0x9318('0x213'),_0x9318('0x211'),'interval\x20=\x20'+_0x4320df));}if(_0x3f9954<=0x0||isNaN(_0x3f9954)){return _0x175105(msgResponse('[abandonmentRate]','Error',_0x9318('0x215')+_0x3f9954));}_0x20e302=_0x20e302||0x0;var _0x112ca1=0x1/_0x2c3df1;var _0x19c16b=0x0;var _0x5de6b4=0x0;var _0xdb688c=0x0;var _0x56ad70=0x0;for(var _0x189078=0x0;_0xdb688c<_0x3f9954;_0x189078+=0x1){_0x5de6b4=_0x189078/_0x4320df;_0x19c16b=(_0x65b71f*_0x5de6b4+_0x20e302)/_0x112ca1;_0xdb688c=erlangb(_0x19c16b,_0x5e495c);_0x56ad70=_0x19c16b/_0x5e495c*(0x1-erlangb(_0x19c16b,_0x5e495c));}return _0x20378d({'erlangCalls':_0x189078,'erlangCallToSecond':_0x4320df/_0x189078,'erlangAbandonmentRate':_0xdb688c,'erlangBusyFactor':_0x56ad70});});};Dialer[_0x9318('0x16')]['busyFactor']=function(_0x28b34e,_0x20a59f,_0x3ab61e,_0x41733a,_0x591450,_0x3d506d){loggerPredictive['info'](_0x9318('0x216'));loggerPredictive['info'](_0x9318('0x20e'),_0x28b34e);loggerPredictive['info'](_0x9318('0x217'),_0x20a59f);loggerPredictive[_0x9318('0x78')](_0x9318('0x218'),_0x3ab61e);loggerPredictive[_0x9318('0x78')](_0x9318('0x20f'),_0x41733a);loggerPredictive['info'](_0x9318('0x219'),_0x591450);loggerPredictive[_0x9318('0x78')](_0x9318('0x88'));return new BPromise(function(_0x4fb639,_0x33d23c){if(_0x28b34e<=0x0||isNaN(_0x28b34e)){return _0x33d23c(msgResponse(_0x9318('0x21a'),_0x9318('0x211'),_0x9318('0x212')+_0x28b34e));}if(_0x3ab61e<=0x0||isNaN(_0x3ab61e)){return _0x33d23c(msgResponse(_0x9318('0x21a'),'Error',_0x9318('0x21b')+_0x3ab61e));}if(_0x41733a<=0x0||isNaN(_0x41733a)){return _0x33d23c(msgResponse(_0x9318('0x21a'),_0x9318('0x211'),'p\x20=\x20'+_0x41733a));}if(_0x20a59f<=0x0||isNaN(_0x20a59f)){return _0x33d23c(msgResponse(_0x9318('0x21a'),_0x9318('0x211'),_0x9318('0x21c')+_0x20a59f));}if(_0x591450<=0x0||isNaN(_0x591450)){return _0x33d23c(msgResponse('[busyFactor]',_0x9318('0x211'),_0x9318('0x21d')+_0x591450));}_0x3d506d=_0x3d506d||0x0;var _0x12cbf1=0x1/_0x3ab61e;var _0x11471c=0x0;var _0x38fad6=0x0;var _0x3cd6a9=0x0;var _0x249935=0x0;for(var _0x4e7195=0x0;_0x249935<_0x591450;_0x4e7195+=0x1){_0x38fad6=_0x4e7195/_0x20a59f;_0x11471c=(_0x41733a*_0x38fad6+_0x3d506d)/_0x12cbf1;_0x3cd6a9=erlangb(_0x11471c,_0x28b34e);_0x249935=_0x11471c/_0x28b34e*(0x1-erlangb(_0x11471c,_0x28b34e));}return _0x4fb639({'erlangCalls':_0x4e7195,'erlangCallToSecond':_0x20a59f/_0x4e7195,'erlangAbandonmentRate':_0x3cd6a9,'erlangBusyFactor':_0x249935});});};module[_0x9318('0x21e')]=Dialer; \ No newline at end of file diff --git a/server/services/ami/dialer/queueCallerAbandon.js b/server/services/ami/dialer/queueCallerAbandon.js index e0d04bb..5795733 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 _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 +var _0xb432=['countglobal','countcongestionretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','name','calleridnum','number','starttime','responsetime','endtime','ringtime','holdtime','droptime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','util','lodash','moment','milliseconds','seconds','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countnoanswerretry'];(function(_0x4843f9,_0x4af459){var _0x193c6a=function(_0x51eca9){while(--_0x51eca9){_0x4843f9['push'](_0x4843f9['shift']());}};_0x193c6a(++_0x4af459);}(_0xb432,0x180));var _0x2b43=function(_0x2d90a8,_0x1fad1d){_0x2d90a8=_0x2d90a8-0x0;var _0x5dd911=_0xb432[_0x2d90a8];return _0x5dd911;};'use strict';var util=require(_0x2b43('0x0'));var _=require(_0x2b43('0x1'));var moment=require(_0x2b43('0x2'));function getSeconds(_0x1d2658,_0x32813d){var _0xbe78d6=moment(_0x1d2658)[_0x2b43('0x3')](0x0);var _0x41ce5c=moment(_0x32813d)[_0x2b43('0x3')](0x0);return _0xbe78d6['diff'](_0x41ce5c,_0x2b43('0x4'));}function QueueCallerAbandon(_0x182236,_0x35d82e){this['scheduledat']=_0x182236[_0x2b43('0x5')];this['type']=_0x182236[_0x2b43('0x6')];this[_0x2b43('0x7')]=_0x182236['type']===_0x2b43('0x8')?_0x2b43('0x9'):_0x182236['type'];this[_0x2b43('0xa')]=_0x182236[_0x2b43('0xa')];this['countcongestionretry']=_0x182236['countcongestionretry'];this['countnoanswerretry']=_0x182236[_0x2b43('0xb')];this[_0x2b43('0xc')]=_0x182236[_0x2b43('0xa')]+_0x182236[_0x2b43('0xd')]+_0x182236['countnoanswerretry']+_0x182236['countnosuchnumberretry']+_0x182236[_0x2b43('0xe')]+_0x182236[_0x2b43('0xf')]+_0x182236[_0x2b43('0x10')]+_0x182236['countagentrejectretry'];this['countnosuchnumberretry']=_0x182236['countnosuchnumberretry'];this['countdropretry']=_0x182236[_0x2b43('0xe')];this['countabandonedretry']=_0x182236[_0x2b43('0xf')];this[_0x2b43('0x10')]=_0x182236[_0x2b43('0x10')];this[_0x2b43('0x11')]=_0x182236[_0x2b43('0x11')];this['uniqueid']=_0x35d82e[_0x2b43('0x12')];this['calleridname']=_0x182236[_0x2b43('0x13')];this[_0x2b43('0x14')]=_0x182236[_0x2b43('0x15')];this[_0x2b43('0x16')]=_0x182236[_0x2b43('0x16')];this[_0x2b43('0x17')]=_0x182236[_0x2b43('0x17')];this['droptime']=_0x182236['droptime'];this[_0x2b43('0x18')]=this['droptime'];this[_0x2b43('0x19')]=getSeconds(_0x182236[_0x2b43('0x17')],_0x182236[_0x2b43('0x16')]);this[_0x2b43('0x1a')]=getSeconds(this[_0x2b43('0x1b')],_0x182236[_0x2b43('0x17')]);this[_0x2b43('0x1c')]=0x0;this[_0x2b43('0x9')]=_0x35d82e[_0x2b43('0x9')];this[_0x2b43('0x1d')]=_0x35d82e[_0x2b43('0x1e')];this[_0x2b43('0x1f')]=_0x35d82e[_0x2b43('0x1f')];this[_0x2b43('0x20')]=_0x182236[_0x2b43('0x20')];this['callbackuniqueid']=_0x182236[_0x2b43('0x21')];this[_0x2b43('0x22')]=_0x182236[_0x2b43('0x22')];this[_0x2b43('0x23')]=_0x182236[_0x2b43('0x23')];this[_0x2b43('0x24')]=_0x182236[_0x2b43('0x24')];this['ListId']=_0x182236[_0x2b43('0x25')];this[_0x2b43('0x26')]=_0x182236['UserId'];this['VoiceQueueId']=_0x182236[_0x2b43('0x27')];this[_0x2b43('0x28')]=_0x182236[_0x2b43('0x28')];this['originatecalleridnum']=_0x182236[_0x2b43('0x29')]||'';this['originatecalleridname']=_0x182236[_0x2b43('0x2a')]||'';}module[_0x2b43('0x2b')]=QueueCallerAbandon; \ No newline at end of file diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js index 6d2f6ac..d17e95d 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(_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 +var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x8cc890,_0x624f7){var _0x266498=function(_0x144f8f){while(--_0x144f8f){_0x8cc890['push'](_0x8cc890['shift']());}};_0x266498(++_0x624f7);}(_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 4f7e3e1..a9b06e1 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 _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 +var _0x7b9c=['lodash','bluebird','uuid','moment','path','./util/gs','../../../config/logger','../ami','./rpcDb','./util/util','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','actions','newchannel','syncNewchannel','varset','syncVarSet','bind','newstate','syncNewState','newexten','faxstatus','syncFaxStatus','syncReceiveFax','syncHangup','prototype','from-voip-provider','hasOwnProperty','exten','localstationid','channels','uniqueid','channel','name','info','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','syncNewExten','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','create','.pdf','application/pdf','then','catch','error','stringify','\x20receiveFax\x20','syncOriginateResponse','merge','pick','response','reason','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','send','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]','message','Fax\x20failed','checkTrunk','isValid','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','parse','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','[Fax][checkTrunk][Trunk\x20not\x20work]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working','fax','[Fax][checkTrunk][Empty\x20Fax]','Is\x20Valid','exports'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x7b9c,0x76));var _0xc7b9=function(_0x1cef07,_0x1eb5f2){_0x1cef07=_0x1cef07-0x0;var _0x2f0a89=_0x7b9c[_0x1cef07];return _0x2f0a89;};'use strict';var util=require('util');var _=require(_0xc7b9('0x0'));var BPromise=require(_0xc7b9('0x1'));var uuid=require(_0xc7b9('0x2'));var moment=require(_0xc7b9('0x3'));var path=require(_0xc7b9('0x4'));var tiff2pdf=require('tiff2pdf');var gs=require(_0xc7b9('0x5'));var logger=require(_0xc7b9('0x6'))('fax');var ami=require(_0xc7b9('0x7'));var rpcDb=require(_0xc7b9('0x8'));var Channel=require('./channel');var ut=require(_0xc7b9('0x9'));var Action=require('./action');var faxAccount=require(_0xc7b9('0xa'));var attachment=require(_0xc7b9('0xb'));var faxMessage=require(_0xc7b9('0xc'));function Fax(_0x3998e3){this['channels']={};this[_0xc7b9('0xd')]=_0x3998e3[_0xc7b9('0xd')];this[_0xc7b9('0xe')]=_0x3998e3[_0xc7b9('0xe')];this[_0xc7b9('0xf')]={};ami['on'](_0xc7b9('0x10'),this[_0xc7b9('0x11')]['bind'](this));ami['on'](_0xc7b9('0x12'),this[_0xc7b9('0x13')][_0xc7b9('0x14')](this));ami['on'](_0xc7b9('0x15'),this[_0xc7b9('0x16')][_0xc7b9('0x14')](this));ami['on'](_0xc7b9('0x17'),this['syncNewExten']['bind'](this));ami['on'](_0xc7b9('0x18'),this[_0xc7b9('0x19')]['bind'](this));ami['on']('receivefax',this[_0xc7b9('0x1a')][_0xc7b9('0x14')](this));ami['on']('hangup',this[_0xc7b9('0x1b')][_0xc7b9('0x14')](this));ami['on']('originateresponse',this['syncOriginateResponse'][_0xc7b9('0x14')](this));}Fax[_0xc7b9('0x1c')][_0xc7b9('0x11')]=function(_0x2e84a8){if(_0x2e84a8['context']===_0xc7b9('0x1d')){for(var _0x4b0e4d in this[_0xc7b9('0xd')]){if(this[_0xc7b9('0xd')][_0xc7b9('0x1e')](_0x4b0e4d)){if(_0x2e84a8[_0xc7b9('0x1f')]===this[_0xc7b9('0xd')][_0x4b0e4d][_0xc7b9('0x20')]){this[_0xc7b9('0x21')][_0x2e84a8['uniqueid']]={};this['channels'][_0x2e84a8[_0xc7b9('0x22')]][_0xc7b9('0x23')]=_0x2e84a8[_0xc7b9('0x23')];this[_0xc7b9('0x21')][_0x2e84a8['uniqueid']]['id']=this['faxAccounts'][_0x4b0e4d]['id'];this['channels'][_0x2e84a8[_0xc7b9('0x22')]]['name']=this[_0xc7b9('0xd')][_0x4b0e4d][_0xc7b9('0x24')];logger[_0xc7b9('0x25')](_0x2e84a8[_0xc7b9('0x22')],_0xc7b9('0x26'));}}}}if(this['actions'][_0x2e84a8['uniqueid']]){this[_0xc7b9('0x21')][_0x2e84a8[_0xc7b9('0x22')]]={};this[_0xc7b9('0x21')][_0x2e84a8[_0xc7b9('0x22')]]['channel']=_0x2e84a8[_0xc7b9('0x23')];logger[_0xc7b9('0x25')](_0x2e84a8[_0xc7b9('0x22')],_0xc7b9('0x26'));}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x13')]=function(_0x57c9dd){if(this['channels'][_0x57c9dd['uniqueid']]){for(var _0x2fb35a in _0x57c9dd[_0xc7b9('0x27')]){if(_0x57c9dd[_0xc7b9('0x27')][_0xc7b9('0x1e')](_0x2fb35a)){this[_0xc7b9('0x21')][_0x57c9dd[_0xc7b9('0x22')]][_0x2fb35a]=_0x57c9dd[_0xc7b9('0x28')];}}}};Fax['prototype']['syncNewState']=function(_0x231e21){if(this['channels'][_0x231e21[_0xc7b9('0x22')]]){this['channels'][_0x231e21[_0xc7b9('0x22')]][_0xc7b9('0x29')]=_0x231e21['channelstate'];this[_0xc7b9('0x21')][_0x231e21[_0xc7b9('0x22')]][_0xc7b9('0x2a')]=_0x231e21[_0xc7b9('0x2a')];}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x2b')]=function(_0x484bfe){if(this['channels'][_0x484bfe['uniqueid']]){for(var _0x4e54d4 in _0x484bfe[_0xc7b9('0x27')]){if(_0x484bfe['variable'][_0xc7b9('0x1e')](_0x4e54d4)){this[_0xc7b9('0x21')][_0x484bfe[_0xc7b9('0x22')]][_0x4e54d4]=_0x484bfe[_0xc7b9('0x28')];}}}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x19')]=function(_0x257618){if(this['channels'][_0x257618[_0xc7b9('0x22')]]){this['channels'][_0x257618['uniqueid']]['operation']=_0x257618[_0xc7b9('0x2c')];this[_0xc7b9('0x21')][_0x257618[_0xc7b9('0x22')]][_0xc7b9('0x2d')]=_0x257618[_0xc7b9('0x2d')];this[_0xc7b9('0x21')][_0x257618['uniqueid']]['localstationid']=_0x257618['localstationid'];this['channels'][_0x257618[_0xc7b9('0x22')]][_0xc7b9('0x2e')]=_0x257618['filename'];logger[_0xc7b9('0x25')](_0x257618['uniqueid'],_0xc7b9('0x2f'));}};Fax['prototype'][_0xc7b9('0x1a')]=function(_0x30f5b6){var _0xbc1fd7=this;if(this['channels'][_0x30f5b6[_0xc7b9('0x22')]]){var _0x2bc8af=this[_0xc7b9('0x21')][_0x30f5b6[_0xc7b9('0x22')]]['id'];this['channels'][_0x30f5b6[_0xc7b9('0x22')]][_0xc7b9('0x30')]=_0x30f5b6['remotestationid'];this[_0xc7b9('0x21')][_0x30f5b6['uniqueid']]['pagestransferred']=_0x30f5b6[_0xc7b9('0x31')];this['channels'][_0x30f5b6['uniqueid']]['localstationid']=_0x30f5b6[_0xc7b9('0x20')];this[_0xc7b9('0x21')][_0x30f5b6[_0xc7b9('0x22')]]['resolution']=_0x30f5b6[_0xc7b9('0x32')];this['channels'][_0x30f5b6[_0xc7b9('0x22')]][_0xc7b9('0x33')]=_0x30f5b6[_0xc7b9('0x33')];this['channels'][_0x30f5b6[_0xc7b9('0x22')]][_0xc7b9('0x2e')]=_0x30f5b6[_0xc7b9('0x2e')];this[_0xc7b9('0x21')][_0x30f5b6[_0xc7b9('0x22')]]['calleridnum']=_0x30f5b6[_0xc7b9('0x34')];if(this[_0xc7b9('0x21')][_0x30f5b6[_0xc7b9('0x22')]][_0xc7b9('0x31')]>0x0){tiff2pdf(_0x30f5b6[_0xc7b9('0x2e')],_0xc7b9('0x35'),function(_0x347c5a){logger[_0xc7b9('0x25')](_0x30f5b6[_0xc7b9('0x22')],_0xc7b9('0x36'),_0x347c5a['message']);attachment[_0xc7b9('0x37')]({'name':path['parse'](_0x30f5b6[_0xc7b9('0x2e')])[_0xc7b9('0x24')],'basename':path['parse'](_0x30f5b6[_0xc7b9('0x2e')])[_0xc7b9('0x24')]+_0xc7b9('0x38'),'type':_0xc7b9('0x39')})[_0xc7b9('0x3a')](function(_0x400e6d){faxAccount['notify'](_0x2bc8af,{'from':_0x30f5b6[_0xc7b9('0x34')],'mapKey':'fax','body':path['parse'](_0x30f5b6['filename'])[_0xc7b9('0x24')]+'.pdf','AttachmentId':_0x400e6d['id']})[_0xc7b9('0x3b')](function(_0x4b60ba){logger[_0xc7b9('0x3c')](_0x30f5b6['uniqueid'],'\x20notify\x20',JSON[_0xc7b9('0x3d')](_0x4b60ba));});})[_0xc7b9('0x3b')](function(_0x234ea5){logger['error'](_0x30f5b6[_0xc7b9('0x22')],_0xc7b9('0x3e'),JSON['stringify'](_0x234ea5));});});}logger['info'](_0x30f5b6[_0xc7b9('0x22')],_0xc7b9('0x3e'));}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x3f')]=function(_0x227ec0){if(this[_0xc7b9('0xf')][_0x227ec0[_0xc7b9('0x22')]]){_[_0xc7b9('0x40')](this[_0xc7b9('0x21')][_0x227ec0[_0xc7b9('0x22')]],_[_0xc7b9('0x41')](_0x227ec0,[_0xc7b9('0x42'),_0xc7b9('0x43')]));}};function updateStatus(_0x4fa079){if(_0x4fa079[_0xc7b9('0x44')]){faxMessage[_0xc7b9('0x45')](_0x4fa079[_0xc7b9('0x44')],{'failMessage':_0xc7b9('0x46')})['then'](function(_0x37ac3a){ut[_0xc7b9('0x47')](_0xc7b9('0x48'),_0x37ac3a);})['catch'](function(_0x4da66b){ut[_0xc7b9('0x47')](_0xc7b9('0x49'),_0x4da66b);});}else{ut[_0xc7b9('0x47')](_0xc7b9('0x4a'));}}Fax[_0xc7b9('0x1c')][_0xc7b9('0x4b')]=function(_0x4c0f20,_0x5aa597,_0x113c7e){var _0x4aeaec=this;var _0x447501={};if(_0x5aa597){_0x447501={'read':_0x5aa597};}else{_0x447501={'failMessage':_0x113c7e};}if(this['actions'][_0x4c0f20][_0xc7b9('0x44')]){faxMessage['update'](this[_0xc7b9('0xf')][_0x4c0f20][_0xc7b9('0x44')],_0x447501)['then'](function(_0xad884c){ut[_0xc7b9('0x47')]('[Fax][Message][Updated]',_0xad884c);})['catch'](function(_0x1fb8a0){ut[_0xc7b9('0x47')](_0xc7b9('0x4c'),_0x1fb8a0);})[_0xc7b9('0x4d')](function(){delete _0x4aeaec[_0xc7b9('0x21')][_0x4c0f20];delete _0x4aeaec[_0xc7b9('0xf')][_0x4c0f20];});}else{ut[_0xc7b9('0x47')](_0xc7b9('0x4e'));delete this[_0xc7b9('0x21')][_0x4c0f20];delete this[_0xc7b9('0xf')][_0x4c0f20];}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x1b')]=function(_0x46d37b){var _0x3a0c92=this;if(this['channels'][_0x46d37b[_0xc7b9('0x22')]]){if(this[_0xc7b9('0xf')][_0x46d37b[_0xc7b9('0x22')]]){this[_0xc7b9('0x21')][_0x46d37b['uniqueid']]['id']=this[_0xc7b9('0xf')][_0x46d37b[_0xc7b9('0x22')]]['id'];this[_0xc7b9('0x21')][_0x46d37b[_0xc7b9('0x22')]][_0xc7b9('0x24')]=this[_0xc7b9('0xf')][_0x46d37b[_0xc7b9('0x22')]][_0xc7b9('0x24')];}logger[_0xc7b9('0x25')](_0x46d37b[_0xc7b9('0x22')],this[_0xc7b9('0xf')][_0x46d37b['uniqueid']]?_0xc7b9('0x4f'):_0xc7b9('0x50'),JSON['stringify'](this['channels'][_0x46d37b['uniqueid']]));if(this[_0xc7b9('0xf')][_0x46d37b[_0xc7b9('0x22')]]){if(this[_0xc7b9('0x21')][_0x46d37b[_0xc7b9('0x22')]]['faxpages']>0x0&&this['channels'][_0x46d37b[_0xc7b9('0x22')]]['faxstatus']===_0xc7b9('0x51')){this[_0xc7b9('0x4b')](_0x46d37b[_0xc7b9('0x22')],!![]);}else{this[_0xc7b9('0x4b')](_0x46d37b['uniqueid'],![],this['channels'][_0x46d37b[_0xc7b9('0x22')]][_0xc7b9('0x52')]?_0xc7b9('0x53')+this[_0xc7b9('0x21')][_0x46d37b[_0xc7b9('0x22')]]['faxstatusstring']:'SENDING\x20FAILED');}}}};Fax[_0xc7b9('0x1c')][_0xc7b9('0x54')]=function(_0x3fe4cd){var _0x1e5811=this;return new BPromise(function(_0x10f589,_0x472d37){_0x1e5811['execOriginate'](_0x3fe4cd,_0x1e5811[_0xc7b9('0xd')][_0x3fe4cd[_0xc7b9('0x55')]])[_0xc7b9('0x3a')](function(_0x4db392){ut[_0xc7b9('0x47')](_0xc7b9('0x56'),_0x4db392);_0x10f589(ut['message'](_0xc7b9('0x57')));})[_0xc7b9('0x3b')](function(_0x4087b0){ut['logger'](_0xc7b9('0x58'),_0x4087b0);updateStatus(_0x3fe4cd);_0x472d37(ut[_0xc7b9('0x59')](_0xc7b9('0x5a')));});});};Fax[_0xc7b9('0x1c')]['checkAfterSend']=function(_0x38e8bc){var _0x1fddfe=this;return new BPromise(function(_0x5243f2,_0x251c47){var _0x1e62c3=_0x1fddfe[_0xc7b9('0x5b')](_0x1fddfe['faxAccounts'][_0x38e8bc[_0xc7b9('0x55')]]['Trunk'],_0x38e8bc);if(_0x1e62c3[_0xc7b9('0x5c')]){_0x5243f2(ut[_0xc7b9('0x59')](_0xc7b9('0x5d')));}else{_0x251c47(ut[_0xc7b9('0x59')](_0x1e62c3[_0xc7b9('0x59')]));}});};function originate(_0x19b117,_0x3fa521,_0x2aa6a4){return new BPromise(function(_0x5d1bd3,_0x3ef3f5){if(_0x2aa6a4){var _0x14e8ec=util['format'](_0xc7b9('0x5e'),path['parse'](_0x19b117[_0xc7b9('0x4')])[_0xc7b9('0x24')],_0x19b117[_0xc7b9('0x4')]);gs[_0xc7b9('0x5f')](_0x14e8ec)[_0xc7b9('0x3a')](function(){_0x19b117[_0xc7b9('0x4')]=util[_0xc7b9('0x60')](_0xc7b9('0x61'),path[_0xc7b9('0x62')](_0x19b117[_0xc7b9('0x4')])[_0xc7b9('0x63')],path[_0xc7b9('0x62')](_0x19b117[_0xc7b9('0x4')])[_0xc7b9('0x24')]);_0x3fa521[_0xc7b9('0x64')]=_0x19b117[_0xc7b9('0x4')];ut['logger'](_0xc7b9('0x65'),'');ami[_0xc7b9('0x66')](ut[_0xc7b9('0x67')](_0x19b117,_0x3fa521))[_0xc7b9('0x3a')](function(_0x55540c){_0x5d1bd3(_0x55540c);})[_0xc7b9('0x3b')](function(_0x2c8b08){_0x3ef3f5(_0x2c8b08);});})[_0xc7b9('0x3b')](function(_0x54dd4b){_0x3ef3f5(_0x54dd4b);});}else{ami[_0xc7b9('0x66')](ut[_0xc7b9('0x67')](_0x19b117,_0x3fa521))[_0xc7b9('0x3a')](function(_0x2d8166){_0x5d1bd3(_0x2d8166);})['catch'](function(_0x12eed2){_0x3ef3f5(_0x12eed2);});}});}Fax[_0xc7b9('0x1c')]['execOriginate']=function(_0x3f4cf2,_0x5488f8){var _0x256198=this;return new BPromise(function(_0x5bbe89,_0x440ecf){var _0x25b1bb=uuid['v4']();var _0x3e4c8c=ut[_0xc7b9('0x68')](_0x3f4cf2,_0x5488f8);_0x256198[_0xc7b9('0xf')][_0x25b1bb]=new Action(_0x25b1bb,_0x5488f8,_0x3f4cf2);var _0x356b76=_0x256198[_0xc7b9('0xf')][_0x25b1bb];if(path['parse'](_0x3f4cf2[_0xc7b9('0x4')])['ext']==='.pdf'){originate(_0x356b76,_0x3e4c8c,!![])[_0xc7b9('0x3a')](function(_0x3743de){_0x5bbe89(_0x3743de);})[_0xc7b9('0x3b')](function(_0x4884c4){_0x440ecf(_0x4884c4);});}else{originate(_0x356b76,_0x3e4c8c,![])[_0xc7b9('0x3a')](function(_0x3581c9){_0x5bbe89(_0x3581c9);})['catch'](function(_0x25534a){_0x440ecf(_0x25534a);});}});};Fax['prototype'][_0xc7b9('0x69')]=function(_0x1db642){return!_[_0xc7b9('0x6a')](_0x1db642)&&!_[_0xc7b9('0x6a')](_0x1db642['name'])&&!_['isNil'](_0x1db642[_0xc7b9('0x6b')])&&_0x1db642[_0xc7b9('0x6b')]&&!_['isNil'](this[_0xc7b9('0xe')][util[_0xc7b9('0x60')](_0xc7b9('0x6c'),_0x1db642[_0xc7b9('0x24')])])&&!_[_0xc7b9('0x6a')](this['trunks'][util['format'](_0xc7b9('0x6c'),_0x1db642[_0xc7b9('0x24')])][_0xc7b9('0x2d')])&&(this[_0xc7b9('0xe')][util[_0xc7b9('0x60')]('SIP/%s',_0x1db642['name'])]['status']===_0xc7b9('0x6d')||this[_0xc7b9('0xe')][util[_0xc7b9('0x60')](_0xc7b9('0x6c'),_0x1db642[_0xc7b9('0x24')])][_0xc7b9('0x2d')]===_0xc7b9('0x6e'));};Fax[_0xc7b9('0x1c')][_0xc7b9('0x5b')]=function(_0x2a5c4a,_0x428aba){if(!this[_0xc7b9('0x69')](_0x2a5c4a)){ut[_0xc7b9('0x47')](_0xc7b9('0x6f'),_[_0xc7b9('0x6a')](_0x2a5c4a)?'':_0x2a5c4a[_0xc7b9('0x24')]+_0xc7b9('0x70'));return{'isValid':![],'message':_0xc7b9('0x71')};}if(_['isNil'](_0x428aba[_0xc7b9('0x72')])){ut[_0xc7b9('0x47')](_0xc7b9('0x73'),JSON[_0xc7b9('0x3d')](_0x428aba));return{'isValid':![],'message':'Empty\x20Fax'};}if(_[_0xc7b9('0x6a')](_0x428aba[_0xc7b9('0x4')])){ut['logger']('[Fax][checkTrunk][Empty\x20path]',JSON[_0xc7b9('0x3d')](_0x428aba));return{'isValid':![],'message':'Empty\x20path'};}return{'isValid':!![],'message':_0xc7b9('0x74')};};module[_0xc7b9('0x75')]=Fax; \ No newline at end of file diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js index 66a6814..eea61c9 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 _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 +var _0x4a48=['then','[Notify]\x20','util','../../../config/logger','lodash','../rpc/faxAccount','error','inspect','notify','resolve'];(function(_0x4a4b5d,_0x79700b){var _0x383f8a=function(_0x286252){while(--_0x286252){_0x4a4b5d['push'](_0x4a4b5d['shift']());}};_0x383f8a(++_0x79700b);}(_0x4a48,0x8e));var _0x84a4=function(_0x4774a0,_0x3b6d3e){_0x4774a0=_0x4774a0-0x0;var _0x1d98ec=_0x4a48[_0x4774a0];return _0x1d98ec;};'use strict';var util=require(_0x84a4('0x0'));var BPromise=require('bluebird');var logger=require(_0x84a4('0x1'))('preview');var _=require(_0x84a4('0x2'));var faxAccount=require(_0x84a4('0x3'));function loggerCatch(_0x109d90){return function(_0x384f13){logger[_0x84a4('0x4')](_0x109d90,util[_0x84a4('0x5')](_0x384f13,{'showHidden':![],'depth':null}));};}exports[_0x84a4('0x6')]=function(_0x26b423,_0x433fef){return BPromise[_0x84a4('0x7')]()[_0x84a4('0x8')](faxAccount['notify'](_0x26b423,_0x433fef))['catch'](loggerCatch(_0x84a4('0x9')));}; \ 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 eadcbfe..7669363 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 _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 +var _0xf678=['Exec\x20gs','\x20Error\x20:','util','fax','child_process','execute','info'];(function(_0x3d808c,_0x28d03c){var _0x916107=function(_0x548608){while(--_0x548608){_0x3d808c['push'](_0x3d808c['shift']());}};_0x916107(++_0x28d03c);}(_0xf678,0x13d));var _0x8f67=function(_0x86b807,_0x3fd11b){_0x86b807=_0x86b807-0x0;var _0x35a29c=_0xf678[_0x86b807];return _0x35a29c;};'use strict';var util=require(_0x8f67('0x0'));var logger=require('../../../../config/logger')(_0x8f67('0x1'));var BPromise=require('bluebird');var exec=require(_0x8f67('0x2'))['exec'];exports[_0x8f67('0x3')]=function(_0x130ae1){return new BPromise(function(_0x32bfdb,_0x385465){exec(_0x130ae1,function(_0x6c36ec,_0x5c70fd,_0x191e74){logger[_0x8f67('0x4')](_0x8f67('0x5'),_0x5c70fd);if(_0x6c36ec){logger['info'](_0x8f67('0x5'),_0x8f67('0x6'),util['inspect'](_0x6c36ec,{'showHidden':![],'depth':null}),_0x5c70fd,_0x191e74);_0x385465(_0x6c36ec);}_0x32bfdb(_0x5c70fd);});});}; \ 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 b6bb992..6619ae2 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 _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 +var _0x49c9=['info','addVariables','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','channel','from-sip','\x22%s\x22\x20<%s>','localstationid','util','lodash','moment','../../../../config/logger','fax','message','logger'];(function(_0x28f198,_0x356803){var _0x2a7206=function(_0x2b766a){while(--_0x2b766a){_0x28f198['push'](_0x28f198['shift']());}};_0x2a7206(++_0x356803);}(_0x49c9,0xc8));var _0x949c=function(_0xe0063c,_0x2db4b4){_0xe0063c=_0xe0063c-0x0;var _0x4d3f94=_0x49c9[_0xe0063c];return _0x4d3f94;};'use strict';var util=require(_0x949c('0x0'));var _=require(_0x949c('0x1'));var moment=require(_0x949c('0x2'));var logger=require(_0x949c('0x3'))(_0x949c('0x4'));exports[_0x949c('0x5')]=function(_0x50fcbf){return{'message':_0x50fcbf};};exports[_0x949c('0x6')]=function(_0x6b338d,_0x351593){logger[_0x949c('0x7')](_0x6b338d,util['inspect'](_0x351593,{'showHidden':![],'depth':null}));};exports[_0x949c('0x8')]=function(_0x1f4861,_0x14412b){var _0x24af02={'XMF-ECM':_0x14412b[_0x949c('0x9')],'XMF-HEADERINFO':_0x14412b[_0x949c('0xa')],'XMF-MINRATE':_0x14412b[_0x949c('0xb')],'XMF-MAXRATE':_0x14412b[_0x949c('0xc')],'XMF-MODEM':util[_0x949c('0xd')](_0x949c('0xe'),_0x14412b[_0x949c('0xf')]),'XMF-GATEWAY':_0x14412b[_0x949c('0x10')],'XMF-FAXDETECT':_0x14412b[_0x949c('0x11')],'XMF-T38TIMEOUT':_0x14412b[_0x949c('0x12')],'XMF-LOCALSTATIONID':_0x14412b['localstationid'],'XMF-PATH':_0x1f4861['path']};return _0x24af02;};exports['variablesAction']=function(_0x5778c3,_0x228252){return{'actionid':_0x5778c3['uniqueid'],'action':'originate','channel':_0x5778c3[_0x949c('0x13')],'Exten':'xcally-motion-fax','Context':_0x949c('0x14'),'Priority':'1','callerid':util[_0x949c('0xd')](_0x949c('0x15'),_0x5778c3[_0x949c('0xa')]?_0x5778c3[_0x949c('0xa')]:'',_0x5778c3[_0x949c('0x16')]),'variable':_0x228252,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x5778c3['uniqueid']};}; \ No newline at end of file diff --git a/server/services/ami/index.js b/server/services/ami/index.js index 7f7cbdd..c1d4f59 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 _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 +var _0x84b6=['initDeskAccounts','getZohoAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','initCampaigns','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','initFaxAccounts','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','log','listen','sync','bluebird','moment','./realtime','./report','./acw','./trigger','./dialer','./rpc/user','./rpc/voiceQueue','./rpc/voiceCallReport','./rpc/trunk','./rpc/trigger','./rpc/cmHopperHistory','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','get','hour','resolve','then','getAgents','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','initVoiceQueues','getTriggers','initTriggers','getTemplates','initTemplates','getZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','getDeskAccounts'];(function(_0x2a3dca,_0x18cc6f){var _0x290b5b=function(_0x462504){while(--_0x462504){_0x2a3dca['push'](_0x2a3dca['shift']());}};_0x290b5b(++_0x18cc6f);}(_0x84b6,0xa4));var _0x684b=function(_0xd1d19a,_0x1933f0){_0xd1d19a=_0xd1d19a-0x0;var _0x52a79d=_0x84b6[_0xd1d19a];return _0x52a79d;};'use strict';var BPromise=require(_0x684b('0x0'));var util=require('util');var moment=require(_0x684b('0x1'));var server=require('./server');var Realtime=require(_0x684b('0x2'));var Report=require(_0x684b('0x3'));var Acw=require(_0x684b('0x4'));var Trigger=require(_0x684b('0x5'));var Dialer=require(_0x684b('0x6'));var Preview=require('./preview');var Fax=require('./fax');var user=require(_0x684b('0x7'));var voiceQueue=require(_0x684b('0x8'));var voiceQueueReport=require('./rpc/voiceQueueReport');var voiceCallReport=require(_0x684b('0x9'));var trunk=require(_0x684b('0xa'));var trigger=require(_0x684b('0xb'));var template=require('./rpc/template');var cmHopperHistory=require(_0x684b('0xc'));var campaign=require('./rpc/campaign');var voiceExtension=require(_0x684b('0xd'));var faxAccount=require(_0x684b('0xe'));var zendesk=require(_0x684b('0xf'));var salesforce=require(_0x684b('0x10'));var sugarcrm=require(_0x684b('0x11'));var freshdesk=require(_0x684b('0x12'));var desk=require('./rpc/integrations/desk');var zoho=require('./rpc/integrations/zoho');var vtiger=require(_0x684b('0x13'));var freshsales=require(_0x684b('0x14'));var servicenow=require(_0x684b('0x15'));var dynamics365=require(_0x684b('0x16'));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()[_0x684b('0x17')](_0x684b('0x18'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x684b('0x17')](_0x684b('0x18'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return BPromise[_0x684b('0x19')]()[_0x684b('0x1a')](user[_0x684b('0x1b')]())[_0x684b('0x1a')](realtime[_0x684b('0x1c')]())[_0x684b('0x1a')](user[_0x684b('0x1d')]())[_0x684b('0x1a')](realtime[_0x684b('0x1e')]())['then'](trunk[_0x684b('0x1f')]())[_0x684b('0x1a')](realtime[_0x684b('0x20')]())[_0x684b('0x1a')](voiceQueue[_0x684b('0x21')]())[_0x684b('0x1a')](realtime[_0x684b('0x22')]())[_0x684b('0x1a')](trigger[_0x684b('0x23')]())[_0x684b('0x1a')](realtime[_0x684b('0x24')]())[_0x684b('0x1a')](template[_0x684b('0x25')]())[_0x684b('0x1a')](realtime[_0x684b('0x26')]())[_0x684b('0x1a')](zendesk[_0x684b('0x27')]())[_0x684b('0x1a')](realtime['initZendeskAccounts']())[_0x684b('0x1a')](salesforce[_0x684b('0x28')]())[_0x684b('0x1a')](realtime[_0x684b('0x29')]())['then'](sugarcrm[_0x684b('0x2a')]())[_0x684b('0x1a')](realtime[_0x684b('0x2b')]())[_0x684b('0x1a')](freshdesk[_0x684b('0x2c')]())[_0x684b('0x1a')](realtime['initFreshdeskAccounts']())[_0x684b('0x1a')](desk[_0x684b('0x2d')]())[_0x684b('0x1a')](realtime[_0x684b('0x2e')]())[_0x684b('0x1a')](zoho[_0x684b('0x2f')]())[_0x684b('0x1a')](realtime['initZohoAccounts']())[_0x684b('0x1a')](vtiger['getVtigerAccounts']())[_0x684b('0x1a')](realtime[_0x684b('0x30')]())[_0x684b('0x1a')](freshsales[_0x684b('0x31')]())[_0x684b('0x1a')](realtime[_0x684b('0x32')]())[_0x684b('0x1a')](servicenow[_0x684b('0x33')]())[_0x684b('0x1a')](realtime[_0x684b('0x34')]())[_0x684b('0x1a')](dynamics365[_0x684b('0x35')]())[_0x684b('0x1a')](realtime[_0x684b('0x36')]())[_0x684b('0x1a')](campaign['getCampaigns']())[_0x684b('0x1a')](realtime[_0x684b('0x37')]())['then'](voiceExtension[_0x684b('0x38')]())[_0x684b('0x1a')](realtime[_0x684b('0x39')]())[_0x684b('0x1a')](faxAccount[_0x684b('0x3a')]())[_0x684b('0x1a')](realtime[_0x684b('0x3b')]())[_0x684b('0x1a')](function(){return realtime;});}function initParams(){return BPromise['resolve']()[_0x684b('0x1a')](voiceQueueReport['getVoiceQueueReports']())[_0x684b('0x1a')](realtime[_0x684b('0x3c')]())['then'](cmHopperHistory[_0x684b('0x3d')]())['then'](realtime[_0x684b('0x3e')]())[_0x684b('0x1a')](cmHopperHistory[_0x684b('0x3f')]())['then'](realtime['initCampaignHopperHistory']())[_0x684b('0x1a')](voiceCallReport[_0x684b('0x40')]())['then'](realtime[_0x684b('0x41')]())[_0x684b('0x1a')](function(_0x5dd8ab){})[_0x684b('0x42')](function(_0x28debd){console[_0x684b('0x43')](_0x28debd);});}function main(){return server[_0x684b('0x44')](realtime,preview,fax)['then'](function(_0x549312){return initRealtime();})[_0x684b('0x1a')](function(){return initParams();})['then'](function(){report[_0x684b('0x45')]();setInterval(initRealtime,0x1388);})[_0x684b('0x42')](function(_0x2018b1){console[_0x684b('0x43')](_0x2018b1);});}main(); \ No newline at end of file diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js index cd77b6a..8d793aa 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 _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 +var _0xcb91=['name','email','accountcode','fullname','unknown','stateTime','status','address','mobile','interface','online','voiceStatus','voiceStatusQueue','onhold','local','updateStatusRealtime','state','idle','inuse','talking','statePause','voiceStatusTime','toNumber','voiceStatusCallerIdNumber','stringify','format','emit','user:presence','exports','moment','md5','ioredis','../../../config/environment','defaults','redis','socket.io-emitter'];(function(_0xe79d9f,_0x15231d){var _0x5c77fa=function(_0x40a65a){while(--_0x40a65a){_0xe79d9f['push'](_0xe79d9f['shift']());}};_0x5c77fa(++_0x15231d);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x4232d8,_0x13fd09){_0x4232d8=_0x4232d8-0x0;var _0x324de2=_0xcb91[_0x4232d8];return _0x324de2;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1cb9('0x0'));var md5=require(_0x1cb9('0x1'));var Redis=require(_0x1cb9('0x2'));var config=require(_0x1cb9('0x3'));config['redis']=_[_0x1cb9('0x4')](config[_0x1cb9('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x1cb9('0x6'))(new Redis(config[_0x1cb9('0x5')]));function Agent(_0x53ffbd){this['id']=_0x53ffbd['id']||0x0;this[_0x1cb9('0x7')]=_0x53ffbd[_0x1cb9('0x7')]||'';this['email']=_0x53ffbd[_0x1cb9('0x8')]||'';this[_0x1cb9('0x9')]=_0x53ffbd['accountcode']||'';this[_0x1cb9('0xa')]=_0x53ffbd['fullname']||'';this['state']=_0x1cb9('0xb');this[_0x1cb9('0xc')]=0x0;this[_0x1cb9('0xd')]=_0x1cb9('0xb');this[_0x1cb9('0xe')]='';this['phone']='';this[_0x1cb9('0xf')]='';this[_0x1cb9('0x10')]='';this[_0x1cb9('0x11')]=_0x53ffbd[_0x1cb9('0x11')]||![];this[_0x1cb9('0x12')]='unknown';this['voiceStatusTime']=0x0;this['voiceStatusCallerIdNumber']='';this[_0x1cb9('0x13')]='';this[_0x1cb9('0x14')]=![];this[_0x1cb9('0x15')]=![];this[_0x1cb9('0x1')]='';}Agent['prototype'][_0x1cb9('0x16')]=function(_0x6ef389){var _0x1b3cd7;if(_0x6ef389&&_0x6ef389[_0x1cb9('0x17')]){_0x1b3cd7=_0x6ef389[_0x1cb9('0x17')]['toLowerCase']();switch(_0x1b3cd7){case'not_inuse':_0x1b3cd7=_0x1cb9('0x18');break;case _0x1cb9('0x19'):_0x1b3cd7=_0x1cb9('0x1a');break;}}if(_0x1b3cd7&&this[_0x1cb9('0x12')]!==_0x1b3cd7||_0x6ef389[_0x1cb9('0x1b')]){this[_0x1cb9('0x1c')]=_[_0x1cb9('0x1d')](moment()['format']('x'));}if(_0x1b3cd7){this['voiceStatus']=_0x1b3cd7;}var _0x1b2fa6={'id':this['id'],'name':this[_0x1cb9('0x7')],'email':this[_0x1cb9('0x8')],'accountcode':this[_0x1cb9('0x9')],'fullname':this[_0x1cb9('0xa')],'state':this[_0x1cb9('0x17')],'stateTime':this[_0x1cb9('0xc')],'status':this['status'],'address':this['address'],'online':this[_0x1cb9('0x11')],'voiceStatus':this['voiceStatus'],'voiceStatusTime':this[_0x1cb9('0x1c')],'voiceStatusCallerIdNumber':this[_0x1cb9('0x1e')],'voiceStatusQueue':this['voiceStatusQueue'],'interface':this['interface'],'onhold':this[_0x1cb9('0x14')]};var _0x325637=md5(JSON[_0x1cb9('0x1f')](_0x1b2fa6));if(this[_0x1cb9('0x1')]!==_0x325637){this[_0x1cb9('0x1')]=_0x325637;io['to'](util[_0x1cb9('0x20')]('user:%s',_0x1b2fa6['name']))[_0x1cb9('0x21')]('user:save',_0x1b2fa6);io[_0x1cb9('0x21')](_0x1cb9('0x22'),_0x1b2fa6);}};module[_0x1cb9('0x23')]=Agent; \ No newline at end of file diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js index 470e890..9a15cdc 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 _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 +var _0x3402=['dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated','temp','ivrTotalCallsDays','message','sendMessageOneNotActive','active','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDMaximumNumberOfWords'];(function(_0x4d8ed9,_0x2ae284){var _0x1e2140=function(_0x9cca89){while(--_0x9cca89){_0x4d8ed9['push'](_0x4d8ed9['shift']());}};_0x1e2140(++_0x2ae284);}(_0x3402,0xc7));var _0x2340=function(_0x3a19fe,_0x3307fa){_0x3a19fe=_0x3a19fe-0x0;var _0x3bbd54=_0x3402[_0x3a19fe];return _0x3bbd54;};'use strict';function Campaign(_0x42c7f0){this['id']=_0x42c7f0['id']||0x0;this[_0x2340('0x0')]=_0x42c7f0['name']||'';this[_0x2340('0x1')]=_0x42c7f0[_0x2340('0x1')]||_0x2340('0x2');this[_0x2340('0x3')]=0x0;this[_0x2340('0x4')]=0x0;this['ivrAnswerCallsDay']=0x0;this[_0x2340('0x5')]=0x0;this[_0x2340('0x6')]='';this[_0x2340('0x7')]=!![];this[_0x2340('0x8')]=_0x42c7f0[_0x2340('0x8')];this['limitCalls']=_0x42c7f0['limitCalls'];this[_0x2340('0x9')]=_0x42c7f0['dialTimezone']||null;this[_0x2340('0xa')]=_0x42c7f0['dialGlobalInterval']?_0x42c7f0[_0x2340('0xa')]:null;this[_0x2340('0xb')]=_0x42c7f0[_0x2340('0xb')];this[_0x2340('0xc')]=_0x42c7f0[_0x2340('0xc')];this['dialOriginateTimeout']=_0x42c7f0[_0x2340('0xd')]||0x1e;this[_0x2340('0xe')]=_0x42c7f0[_0x2340('0xe')];this[_0x2340('0xf')]=_0x42c7f0[_0x2340('0xf')];this[_0x2340('0x10')]=_0x42c7f0['dialBusyMaxRetry'];this[_0x2340('0x11')]=_0x42c7f0[_0x2340('0x11')];this[_0x2340('0x12')]=_0x42c7f0[_0x2340('0x12')];this['dialNoAnswerRetryFrequency']=_0x42c7f0[_0x2340('0x13')];this[_0x2340('0x14')]=_0x42c7f0[_0x2340('0x14')];this[_0x2340('0x15')]=_0x42c7f0['dialNoSuchNumberMaxRetry']||0x3;this[_0x2340('0x16')]=_0x42c7f0['dialNoSuchNumberRetryFrequency']||0x96;this['dialDropMaxRetry']=_0x42c7f0[_0x2340('0x17')]||0x3;this[_0x2340('0x18')]=_0x42c7f0[_0x2340('0x18')]||0x96;this[_0x2340('0x19')]=_0x42c7f0['dialAbandonedMaxRetry']||0x3;this[_0x2340('0x1a')]=_0x42c7f0[_0x2340('0x1a')]||0x96;this['dialMachineMaxRetry']=_0x42c7f0['dialMachineMaxRetry']||0x3;this[_0x2340('0x1b')]=_0x42c7f0[_0x2340('0x1b')]||0x96;this[_0x2340('0x1c')]=_0x42c7f0['dialAgentRejectMaxRetry']||0x3;this[_0x2340('0x1d')]=_0x42c7f0[_0x2340('0x1d')]||0x96;this[_0x2340('0x1e')]=_0x42c7f0['dialOrderByScheduledAt']||_0x2340('0x1f');this['dialPrefix']=_0x42c7f0[_0x2340('0x20')]||undefined;this[_0x2340('0x21')]=_0x42c7f0['dialRandomLastDigitCallerIdNumber']||undefined;this[_0x2340('0x22')]=_0x42c7f0['dialCutDigit']||undefined;this[_0x2340('0x23')]=_0x42c7f0[_0x2340('0x23')]?_0x42c7f0[_0x2340('0x23')]:undefined;this['Trunk']=_0x42c7f0[_0x2340('0x24')]?_0x42c7f0[_0x2340('0x24')]:undefined;this[_0x2340('0x25')]=_0x42c7f0[_0x2340('0x25')]?_0x42c7f0[_0x2340('0x25')]:undefined;this['SquareProject']=_0x42c7f0[_0x2340('0x26')]?_0x42c7f0['SquareProject']:undefined;this['dialQueueProject']=_0x42c7f0['SquareProject']?_0x42c7f0['SquareProject'][_0x2340('0x0')]:undefined;this['dialAMDActive']=_0x42c7f0[_0x2340('0x27')]||![];this[_0x2340('0x28')]=_0x42c7f0[_0x2340('0x28')];this[_0x2340('0x29')]=_0x42c7f0[_0x2340('0x29')];this[_0x2340('0x2a')]=_0x42c7f0['dialAMDAfterGreetingSilence'];this[_0x2340('0x2b')]=_0x42c7f0[_0x2340('0x2b')];this[_0x2340('0x2c')]=_0x42c7f0['dialAMDMinWordLength'];this['dialAMDBetweenWordsSilence']=_0x42c7f0['dialAMDBetweenWordsSilence'];this[_0x2340('0x2d')]=_0x42c7f0[_0x2340('0x2d')];this[_0x2340('0x2e')]=_0x42c7f0[_0x2340('0x2e')];this[_0x2340('0x2f')]=_0x42c7f0[_0x2340('0x2f')];}module[_0x2340('0x30')]=Campaign; \ No newline at end of file diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js index ec90dc1..38d0bdf 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 _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 +var _0x1aab=['disposition','monitor','monitorFilename','queue','monitors','transfercalleridnum','transferconnectedlinenum','transferType','mohtime','exports','starttime','channel','destinationchannel','calleridname','connectedlinename','accountcode','context','uniqueid','linkedid','answertime','endtime','unmanaged','abandoned','lastapplication','lastdata','duration','holdtime','type'];(function(_0x292f93,_0x2c6e8e){var _0x5a94b1=function(_0x25735e){while(--_0x25735e){_0x292f93['push'](_0x292f93['shift']());}};_0x5a94b1(++_0x2c6e8e);}(_0x1aab,0x122));var _0xb1aa=function(_0x4daafc,_0x352949){_0x4daafc=_0x4daafc-0x0;var _0x4e1c18=_0x1aab[_0x4daafc];return _0x4e1c18;};'use strict';function Channel(){this[_0xb1aa('0x0')]=null;this[_0xb1aa('0x1')]='';this[_0xb1aa('0x2')]='';this['calleridnum']=0x0;this[_0xb1aa('0x3')]='';this['connectedlinenum']=undefined;this[_0xb1aa('0x4')]=undefined;this[_0xb1aa('0x5')]=0x0;this[_0xb1aa('0x6')]='';this[_0xb1aa('0x7')]=0x0;this[_0xb1aa('0x8')]=0x0;this['exten']=0x0;this['answered']=![];this[_0xb1aa('0x9')]=null;this[_0xb1aa('0xa')]=null;this[_0xb1aa('0xb')]=![];this[_0xb1aa('0xc')]=![];this[_0xb1aa('0xd')]='';this[_0xb1aa('0xe')]='';this[_0xb1aa('0xf')]=0x0;this['billableseconds']=0x0;this[_0xb1aa('0x10')]=0x0;this[_0xb1aa('0x11')]=null;this['tag']=null;this[_0xb1aa('0x12')]=null;this[_0xb1aa('0x13')]=![];this[_0xb1aa('0x14')]=null;this[_0xb1aa('0x15')]=null;this[_0xb1aa('0x16')]=[];this[_0xb1aa('0x17')]=undefined;this[_0xb1aa('0x18')]=undefined;this[_0xb1aa('0x19')]=undefined;this[_0xb1aa('0x1a')]=0x0;}module[_0xb1aa('0x1b')]=Channel; \ No newline at end of file diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js index ef194d2..cf3634d 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 _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 +var _0x7178=['serverUrl','exports','name','username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x7178,0xda));var _0x8717=function(_0x199572,_0x33e667){_0x199572=_0x199572-0x0;var _0x13cfa3=_0x7178[_0x199572];return _0x13cfa3;};'use strict';function DeskAccount(_0x1ca071){this['id']=_0x1ca071['id']||0x0;this[_0x8717('0x0')]=_0x1ca071[_0x8717('0x0')]||'';this[_0x8717('0x1')]=_0x1ca071['username']||'';this[_0x8717('0x2')]=_0x1ca071[_0x8717('0x2')]||'';this[_0x8717('0x3')]=_0x1ca071['authType']||'';this['password']=_0x1ca071[_0x8717('0x4')]||'';this[_0x8717('0x5')]=_0x1ca071[_0x8717('0x5')]||'';this[_0x8717('0x6')]=_0x1ca071[_0x8717('0x6')]||'';this[_0x8717('0x7')]=_0x1ca071[_0x8717('0x7')]||'';this[_0x8717('0x8')]=_0x1ca071[_0x8717('0x8')]||'';this[_0x8717('0x9')]=_0x1ca071[_0x8717('0x9')]||'';this['serverUrl']=_0x1ca071[_0x8717('0xa')]||'';this['Configurations']=_0x1ca071['Configurations']||{};}module[_0x8717('0xb')]=DeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js index 3eee84b..1ddf16a 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 _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 +var _0x41bb=['username','password','remoteUri','tenantId','clientId','serverUrl','Configurations','exports','name'];(function(_0x3eb540,_0x4e517a){var _0x2e88d8=function(_0x5902aa){while(--_0x5902aa){_0x3eb540['push'](_0x3eb540['shift']());}};_0x2e88d8(++_0x4e517a);}(_0x41bb,0xc5));var _0xb41b=function(_0x1282ce,_0x221f3c){_0x1282ce=_0x1282ce-0x0;var _0x9ab5b8=_0x41bb[_0x1282ce];return _0x9ab5b8;};'use strict';function Dynamics365Account(_0x4337f5){this['id']=_0x4337f5['id']||0x0;this[_0xb41b('0x0')]=_0x4337f5['name']||'';this[_0xb41b('0x1')]=_0x4337f5['username']||'';this[_0xb41b('0x2')]=_0x4337f5[_0xb41b('0x2')]||'';this[_0xb41b('0x3')]=_0x4337f5[_0xb41b('0x3')]||'';this['tenantId']=_0x4337f5[_0xb41b('0x4')]||'';this[_0xb41b('0x5')]=_0x4337f5[_0xb41b('0x5')]||'';this['clientSecret']=_0x4337f5['clientSecret']||{};this['serverUrl']=_0x4337f5[_0xb41b('0x6')]||'';this[_0xb41b('0x7')]=_0x4337f5['Configurations']||{};}module[_0xb41b('0x8')]=Dynamics365Account; \ No newline at end of file diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js index 4000a46..a365d1c 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 _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 +var _0x4526=['v17,v27,v29','gateway','faxdetect','t38timeout','tech','SIP','Trunk','ListId','key','exports','name','description','headerinfo','localstationid','maxrate','modem'];(function(_0x4164f2,_0x38669f){var _0x2575c7=function(_0x24dca1){while(--_0x24dca1){_0x4164f2['push'](_0x4164f2['shift']());}};_0x2575c7(++_0x38669f);}(_0x4526,0x1ea));var _0x6452=function(_0x300914,_0x887d27){_0x300914=_0x300914-0x0;var _0xf600c2=_0x4526[_0x300914];return _0xf600c2;};'use strict';function FaxAccount(_0x539daf){this['id']=_0x539daf['id']||0x0;this[_0x6452('0x0')]=_0x539daf[_0x6452('0x0')]||'';this[_0x6452('0x1')]=_0x539daf[_0x6452('0x1')];this['ecm']=_0x539daf['ecm'];this[_0x6452('0x2')]=_0x539daf[_0x6452('0x2')];this[_0x6452('0x3')]=_0x539daf['localstationid'];this['minrate']=_0x539daf['minrate']||0x960;this[_0x6452('0x4')]=_0x539daf['maxrate']||0x3840;this[_0x6452('0x5')]=_0x539daf['modem']||_0x6452('0x6');this[_0x6452('0x7')]=_0x539daf[_0x6452('0x7')]||'no';this[_0x6452('0x8')]=_0x539daf[_0x6452('0x8')]||'no';this[_0x6452('0x9')]=_0x539daf[_0x6452('0x9')]||0x1388;this['tech']=_0x539daf[_0x6452('0xa')]||_0x6452('0xb');this[_0x6452('0xc')]=_0x539daf[_0x6452('0xc')]?_0x539daf[_0x6452('0xc')]:undefined;this[_0x6452('0xd')]=_0x539daf[_0x6452('0xd')];this['key']=_0x539daf[_0x6452('0xe')];}module[_0x6452('0xf')]=FaxAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js index 9d2553b..3d8e857 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 _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 +var _0xd328=['name','username','apiKey','remoteUri','serverUrl','Configurations'];(function(_0x2a8b21,_0x5cd96b){var _0x114314=function(_0xd17a7){while(--_0xd17a7){_0x2a8b21['push'](_0x2a8b21['shift']());}};_0x114314(++_0x5cd96b);}(_0xd328,0xa2));var _0x8d32=function(_0x6b86b9,_0x26ceac){_0x6b86b9=_0x6b86b9-0x0;var _0x26e982=_0xd328[_0x6b86b9];return _0x26e982;};'use strict';function FreshdeskAccount(_0x198bbb){this['id']=_0x198bbb['id']||0x0;this['name']=_0x198bbb[_0x8d32('0x0')]||'';this['username']=_0x198bbb[_0x8d32('0x1')]||'';this[_0x8d32('0x2')]=_0x198bbb['token']||'';this[_0x8d32('0x3')]=_0x198bbb[_0x8d32('0x3')]||'';this[_0x8d32('0x4')]=_0x198bbb[_0x8d32('0x4')]||'';this[_0x8d32('0x5')]=_0x198bbb[_0x8d32('0x5')]||{};}module['exports']=FreshdeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshsalesAccount.js b/server/services/ami/model/freshsalesAccount.js index 9c284a8..8646420 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 _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 +var _0x2f74=['token','remoteUri','serverUrl','exports','name','username','apiKey'];(function(_0x3d60d6,_0x1b313e){var _0x4bb424=function(_0x237d6e){while(--_0x237d6e){_0x3d60d6['push'](_0x3d60d6['shift']());}};_0x4bb424(++_0x1b313e);}(_0x2f74,0x7b));var _0x42f7=function(_0x1af322,_0x16d095){_0x1af322=_0x1af322-0x0;var _0x28ac48=_0x2f74[_0x1af322];return _0x28ac48;};'use strict';function FreshsalesAccount(_0x1f6653){this['id']=_0x1f6653['id']||0x0;this['name']=_0x1f6653[_0x42f7('0x0')]||'';this[_0x42f7('0x1')]=_0x1f6653[_0x42f7('0x1')]||'';this[_0x42f7('0x2')]=_0x1f6653[_0x42f7('0x3')]||'';this[_0x42f7('0x4')]=_0x1f6653[_0x42f7('0x4')]||'';this[_0x42f7('0x5')]=_0x1f6653['serverUrl']||'';this['Configurations']=_0x1f6653['Configurations']||{};}module[_0x42f7('0x6')]=FreshsalesAccount; \ No newline at end of file diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js index 545b0d0..ac5ccf7 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 _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 +var _0xb98d=['variables','exports','type','inbound','uniqueid','calleridnum','calleridname','queuecallerjoinAt','queuecallerleaveAt','count','queuecallerabandonAt','queuecallercompleteAt','queuecallerexit','originalposition','connectedlinename','accountcode','context','priority','holdtime','assigned','lastAssignedTo','mohtime'];(function(_0x4ec939,_0x360237){var _0x42ceb3=function(_0x5dc73b){while(--_0x5dc73b){_0x4ec939['push'](_0x4ec939['shift']());}};_0x42ceb3(++_0x360237);}(_0xb98d,0x9c));var _0xdb98=function(_0x5a5e37,_0x2ea2c4){_0x5a5e37=_0x5a5e37-0x0;var _0x2cc3ac=_0xb98d[_0x5a5e37];return _0x2cc3ac;};'use strict';function QueueReport(){this[_0xdb98('0x0')]=_0xdb98('0x1');this[_0xdb98('0x2')]='';this[_0xdb98('0x3')]='';this[_0xdb98('0x4')]='';this['queue']='';this[_0xdb98('0x5')]=null;this[_0xdb98('0x6')]=null;this['position']=0x1;this[_0xdb98('0x7')]=0x1;this['queuecallerabandon']=![];this[_0xdb98('0x8')]=null;this['queuecallercomplete']=![];this[_0xdb98('0x9')]=null;this[_0xdb98('0xa')]=![];this['queuecallerexitAt']=null;this[_0xdb98('0xb')]=0x1;this['channel']='';this['connectedlinenum']='';this[_0xdb98('0xc')]='';this[_0xdb98('0xd')]='';this[_0xdb98('0xe')]='';this['exten']='';this[_0xdb98('0xf')]='';this[_0xdb98('0x10')]=0x0;this[_0xdb98('0x11')]=![];this[_0xdb98('0x12')]='';this[_0xdb98('0x13')]=0x0;this[_0xdb98('0x14')]={};}module[_0xdb98('0x15')]=QueueReport; \ No newline at end of file diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js index 62877ad..a7e937c 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 _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 +var _0x553d=['name','username','remoteUri','password','clientId','clientSecret','securityToken','type','integrationTab','serverUrl','Configurations'];(function(_0x478fb,_0x4e0c0d){var _0x5b1339=function(_0x1679c3){while(--_0x1679c3){_0x478fb['push'](_0x478fb['shift']());}};_0x5b1339(++_0x4e0c0d);}(_0x553d,0x1a2));var _0xd553=function(_0x37261f,_0x5f52fd){_0x37261f=_0x37261f-0x0;var _0x13daeb=_0x553d[_0x37261f];return _0x13daeb;};'use strict';function SalesforceAccount(_0x32d1c4){this['id']=_0x32d1c4['id']||0x0;this[_0xd553('0x0')]=_0x32d1c4['name']||'';this[_0xd553('0x1')]=_0x32d1c4[_0xd553('0x1')]||'';this['remoteUri']=_0x32d1c4[_0xd553('0x2')]||'';this[_0xd553('0x3')]=_0x32d1c4[_0xd553('0x3')]||'';this[_0xd553('0x4')]=_0x32d1c4['clientId']||'';this[_0xd553('0x5')]=_0x32d1c4[_0xd553('0x5')]||'';this['securityToken']=_0x32d1c4[_0xd553('0x6')]||'';this[_0xd553('0x7')]=_0x32d1c4[_0xd553('0x7')]||_0xd553('0x8');this[_0xd553('0x9')]=_0x32d1c4['serverUrl']||'';this[_0xd553('0xa')]=_0x32d1c4[_0xd553('0xa')]||{};}module['exports']=SalesforceAccount; \ No newline at end of file diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js index 3522a5d..d80f9f7 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 _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 +var _0x6a0d=['serverUrl','exports','name','username','password','remoteUri'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6a0d,0xa4));var _0xd6a0=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x6a0d[_0x2b10c6];return _0x3789d2;};'use strict';function ServicenowAccount(_0x519b42){this['id']=_0x519b42['id']||0x0;this[_0xd6a0('0x0')]=_0x519b42[_0xd6a0('0x0')]||'';this[_0xd6a0('0x1')]=_0x519b42[_0xd6a0('0x1')]||'';this[_0xd6a0('0x2')]=_0x519b42[_0xd6a0('0x2')]||'';this[_0xd6a0('0x3')]=_0x519b42[_0xd6a0('0x3')]||'';this['serverUrl']=_0x519b42[_0xd6a0('0x4')]||'';this['Configurations']=_0x519b42['Configurations']||{};}module[_0xd6a0('0x5')]=ServicenowAccount; \ No newline at end of file diff --git a/server/services/ami/model/sugarcrmAccount.js b/server/services/ami/model/sugarcrmAccount.js index 623489f..81fb359 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 _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 +var _0x7e95=['name','username','remoteUri','serverUrl','Configurations'];(function(_0x3420a4,_0x45071e){var _0x4f2651=function(_0xe2ba1b){while(--_0xe2ba1b){_0x3420a4['push'](_0x3420a4['shift']());}};_0x4f2651(++_0x45071e);}(_0x7e95,0x1d6));var _0x57e9=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7e95[_0x3dd15e];return _0x231fd0;};'use strict';function SugarcrmAccount(_0x1a2e14){this['id']=_0x1a2e14['id']||0x0;this[_0x57e9('0x0')]=_0x1a2e14[_0x57e9('0x0')]||'';this[_0x57e9('0x1')]=_0x1a2e14[_0x57e9('0x1')]||'';this['password']=_0x1a2e14['password']||'';this[_0x57e9('0x2')]=_0x1a2e14['remoteUri']||'';this[_0x57e9('0x3')]=_0x1a2e14[_0x57e9('0x3')]||'';this[_0x57e9('0x4')]=_0x1a2e14[_0x57e9('0x4')]||{};}module['exports']=SugarcrmAccount; \ No newline at end of file diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js index 21c47d9..615366a 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 _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 +var _0xc273=['stateTime','status','exports','name','accountcode','state','unknown'];(function(_0xe7bbd9,_0x144193){var _0xbdaf9b=function(_0x4cb870){while(--_0x4cb870){_0xe7bbd9['push'](_0xe7bbd9['shift']());}};_0xbdaf9b(++_0x144193);}(_0xc273,0x137));var _0x3c27=function(_0x308374,_0x550e85){_0x308374=_0x308374-0x0;var _0x1f71e0=_0xc273[_0x308374];return _0x1f71e0;};'use strict';function Telephone(_0xe7620c){this['id']=_0xe7620c['id']||0x0;this[_0x3c27('0x0')]=_0xe7620c[_0x3c27('0x0')]||'';this[_0x3c27('0x1')]=_0xe7620c[_0x3c27('0x1')]||'';this[_0x3c27('0x2')]=_0x3c27('0x3');this[_0x3c27('0x4')]=0x0;this[_0x3c27('0x5')]=_0x3c27('0x3');this['address']='';}module[_0x3c27('0x6')]=Telephone; \ No newline at end of file diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js index 3bb4cd3..3c3b300 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 _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 +var _0xb10b=['name','html'];(function(_0x24f4fe,_0x50ba90){var _0x50a99d=function(_0x5357c6){while(--_0x5357c6){_0x24f4fe['push'](_0x24f4fe['shift']());}};_0x50a99d(++_0x50ba90);}(_0xb10b,0x12a));var _0xbb10=function(_0x539eb6,_0x3843f8){_0x539eb6=_0x539eb6-0x0;var _0x2e3478=_0xb10b[_0x539eb6];return _0x2e3478;};'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 62a9832..171dff5 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 _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 +var _0xb10b=['AllConditions','AnyConditions','Actions','exports','name','channel','status'];(function(_0x3a3149,_0xa0346d){var _0x4217dd=function(_0x429947){while(--_0x429947){_0x3a3149['push'](_0x3a3149['shift']());}};_0x4217dd(++_0xa0346d);}(_0xb10b,0x12a));var _0xbb10=function(_0x18a4f7,_0x3f915c){_0x18a4f7=_0x18a4f7-0x0;var _0x368cf3=_0xb10b[_0x18a4f7];return _0x368cf3;};'use strict';function Trigger(_0x13ce8d){this['id']=_0x13ce8d['id']||0x0;this['name']=_0x13ce8d[_0xbb10('0x0')]||'';this[_0xbb10('0x1')]=_0x13ce8d[_0xbb10('0x1')]||'voice';this[_0xbb10('0x2')]=_0x13ce8d[_0xbb10('0x2')]||![];this[_0xbb10('0x3')]=_0x13ce8d[_0xbb10('0x3')]||[];this[_0xbb10('0x4')]=_0x13ce8d[_0xbb10('0x4')]||[];this['Actions']=_0x13ce8d[_0xbb10('0x5')]||[];}module[_0xbb10('0x6')]=Trigger; \ No newline at end of file diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js index a15a6c9..89333a2 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 _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 +var _0xa46e=['exports','active','name','state','unknown','stateTime','status','registry','indexOf','host','port','domain','domainport','stateRegistry','registrationtime','address','defaultuser'];(function(_0xf65bf8,_0x494a66){var _0x2e4a66=function(_0x50d0de){while(--_0x50d0de){_0xf65bf8['push'](_0xf65bf8['shift']());}};_0x2e4a66(++_0x494a66);}(_0xa46e,0xbc));var _0xea46=function(_0x9edfd5,_0x286486){_0x9edfd5=_0x9edfd5-0x0;var _0x330738=_0xa46e[_0x9edfd5];return _0x330738;};'use strict';function Trunk(_0x4be732){this['id']=_0x4be732['id']||0x0;this[_0xea46('0x0')]=_0x4be732[_0xea46('0x0')]||![];this[_0xea46('0x1')]=_0x4be732[_0xea46('0x1')]||'';this[_0xea46('0x2')]=_0xea46('0x3');this[_0xea46('0x4')]=0x0;this[_0xea46('0x5')]=_0xea46('0x3');this[_0xea46('0x6')]=_0x4be732[_0xea46('0x6')]&&_0x4be732[_0xea46('0x6')][_0xea46('0x7')](':')?_0x4be732[_0xea46('0x6')]['split'](':')[0x0]:'';this[_0xea46('0x8')]='';this[_0xea46('0x9')]='';this[_0xea46('0xa')]='';this[_0xea46('0xb')]='';this['refresh']='';this[_0xea46('0xc')]=_0xea46('0x3');this[_0xea46('0xd')]='';this[_0xea46('0xe')]='';this[_0xea46('0xf')]=_0x4be732[_0xea46('0xf')]||'';}module[_0xea46('0x10')]=Trunk; \ No newline at end of file diff --git a/server/services/ami/model/voiceExtension.js b/server/services/ami/model/voiceExtension.js index 99ad136..ebc711a 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 _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 +var _0x01d5=['exten','recordingFormat','none','mandatoryDisposition','exports'];(function(_0x292ed0,_0x5a7cd5){var _0x65ead2=function(_0x53d810){while(--_0x53d810){_0x292ed0['push'](_0x292ed0['shift']());}};_0x65ead2(++_0x5a7cd5);}(_0x01d5,0x10e));var _0x501d=function(_0x367745,_0x5675b8){_0x367745=_0x367745-0x0;var _0x378ec4=_0x01d5[_0x367745];return _0x378ec4;};'use strict';function voiceExtension(_0x3ee3e3){this['id']=_0x3ee3e3['id']||0x0;this[_0x501d('0x0')]=_0x3ee3e3[_0x501d('0x0')]||'';this[_0x501d('0x1')]=_0x3ee3e3[_0x501d('0x1')]||_0x501d('0x2');this[_0x501d('0x3')]=_0x3ee3e3[_0x501d('0x3')]||![];}module[_0x501d('0x4')]=voiceExtension; \ No newline at end of file diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js index 46099b1..bad9d99 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 _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 +var _0x582b=['timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayACS','outboundReCallsDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','predictiveIntervalAvailable','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDispositionPause','exports','not_inuse','inuse','invalid','ringing','ringinuse','onhold','wav','wav49','gsm','rrmemory','roundrobin','name','monitor_format','waiting','talking','total','answered','sumDuration','sumHoldTime','sumBillable','unmanaged','abandoned','loggedIn','available','acw','acwTimeout','autopause','sendMessageOneNotActive','message','originated','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialGlobalMaxRetry','Trunk','TrunkBackup','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking'];(function(_0x1a36d6,_0x10fe78){var _0x47ee56=function(_0x175c88){while(--_0x175c88){_0x1a36d6['push'](_0x1a36d6['shift']());}};_0x47ee56(++_0x10fe78);}(_0x582b,0x185));var _0xb582=function(_0x3ba00e,_0xbd1c3d){_0x3ba00e=_0x3ba00e-0x0;var _0x33cb79=_0x582b[_0x3ba00e];return _0x33cb79;};'use strict';var statusDesc=['unknown',_0xb582('0x0'),_0xb582('0x1'),'busy',_0xb582('0x2'),'unavailable',_0xb582('0x3'),_0xb582('0x4'),_0xb582('0x5')];var monitorFormat={'wav':_0xb582('0x6'),'wav49':_0xb582('0x7'),'gsm':_0xb582('0x8')};var strategy={'rrmemory':_0xb582('0x9'),'roundrobin':_0xb582('0xa')};function VoiceQueue(_0x566d99){this['id']=_0x566d99['id']||0x0;this[_0xb582('0xb')]=_0x566d99[_0xb582('0xb')]||'';this['monitor_format']=_0x566d99[_0xb582('0xc')]||'';this['type']=_0x566d99['type']||'inbound';this[_0xb582('0xd')]=0x0;this[_0xb582('0xe')]=0x0;this[_0xb582('0xf')]=0x0;this[_0xb582('0x10')]=0x0;this[_0xb582('0x11')]=0x0;this[_0xb582('0x12')]=0x0;this[_0xb582('0x13')]=0x0;this[_0xb582('0x14')]=0x0;this[_0xb582('0x15')]=0x0;this[_0xb582('0x16')]=0x0;this[_0xb582('0x17')]=0x0;this[_0xb582('0x18')]=_0x566d99['acw']||![];this[_0xb582('0x19')]=_0x566d99['acwTimeout']||0xa;this[_0xb582('0x1a')]=_0x566d99[_0xb582('0x1a')]||'no';this[_0xb582('0x1b')]=!![];this[_0xb582('0x1c')]='';this[_0xb582('0x1d')]=0x0;this['temp']=0x0;this[_0xb582('0x1e')]=_0x566d99['dialTimezone']||null;this[_0xb582('0x1f')]=_0x566d99[_0xb582('0x1f')]?_0x566d99[_0xb582('0x1f')]:null;this[_0xb582('0x20')]=_0x566d99[_0xb582('0x20')];this[_0xb582('0x21')]=_0x566d99[_0xb582('0x21')]||_0xb582('0x22');this[_0xb582('0x23')]=_0x566d99[_0xb582('0x23')]||0x0;this[_0xb582('0x24')]=_0x566d99['dialLimitQueue']||0x0;this[_0xb582('0x25')]=_0x566d99[_0xb582('0x25')]||0x1;this[_0xb582('0x26')]=_0x566d99['dialPredictiveOptimization']||_0xb582('0x27');this[_0xb582('0x28')]=_0x566d99['dialPredictiveOptimizationPercentage']||0.03;this[_0xb582('0x29')]=_0x566d99[_0xb582('0x29')]||0x258;this[_0xb582('0x2a')]=_0x566d99[_0xb582('0x2a')]||_0xb582('0x2b');this[_0xb582('0x2c')]=_0x566d99['dialOriginateCallerIdNumber']||_0xb582('0x2b');this[_0xb582('0x2d')]=_0x566d99[_0xb582('0x2d')]||0x1e;this[_0xb582('0x2e')]=_0x566d99[_0xb582('0x2e')]||_0xb582('0x2f');this[_0xb582('0x30')]=_0x566d99[_0xb582('0x30')]||0x3;this[_0xb582('0x31')]=_0x566d99[_0xb582('0x31')]||undefined;this['dialCongestionMaxRetry']=_0x566d99[_0xb582('0x32')]||0x3;this[_0xb582('0x33')]=_0x566d99[_0xb582('0x33')]||0x96;this[_0xb582('0x34')]=_0x566d99[_0xb582('0x34')]||0x3;this[_0xb582('0x35')]=_0x566d99['dialBusyRetryFrequency']||0x96;this[_0xb582('0x36')]=_0x566d99[_0xb582('0x36')]||0x3;this[_0xb582('0x37')]=_0x566d99[_0xb582('0x37')]||0x96;this[_0xb582('0x38')]=_0x566d99['dialNoSuchNumberMaxRetry']||0x3;this[_0xb582('0x39')]=_0x566d99[_0xb582('0x39')]||0x96;this[_0xb582('0x3a')]=_0x566d99['dialDropMaxRetry']||0x3;this[_0xb582('0x3b')]=_0x566d99[_0xb582('0x3b')]||0x96;this[_0xb582('0x3c')]=_0x566d99['dialAbandonedMaxRetry']||0x3;this[_0xb582('0x3d')]=_0x566d99[_0xb582('0x3d')]||0x96;this['dialMachineMaxRetry']=_0x566d99[_0xb582('0x3e')]||0x3;this[_0xb582('0x3f')]=_0x566d99[_0xb582('0x3f')]||0x96;this[_0xb582('0x40')]=_0x566d99[_0xb582('0x40')]||0x3;this[_0xb582('0x41')]=_0x566d99[_0xb582('0x41')]||0x96;this[_0xb582('0x42')]=_0x566d99[_0xb582('0x42')]||0x4;this['Trunk']=_0x566d99[_0xb582('0x43')]?_0x566d99[_0xb582('0x43')]:undefined;this[_0xb582('0x44')]=_0x566d99[_0xb582('0x44')]?_0x566d99[_0xb582('0x44')]:undefined;this['dialPrefix']=_0x566d99['dialPrefix']||undefined;this[_0xb582('0x45')]=_0x566d99[_0xb582('0x45')]?_0x566d99[_0xb582('0x45')]:undefined;this[_0xb582('0x46')]=_0x566d99[_0xb582('0x46')]||_0xb582('0x47');this['dialRandomLastDigitCallerIdNumber']=_0x566d99[_0xb582('0x48')]||undefined;this[_0xb582('0x49')]=_0x566d99['dialCutDigit']||undefined;this['strategy']=strategy[_0x566d99['strategy']]||_0xb582('0x9');this[_0xb582('0x4a')]=!![];this[_0xb582('0x4b')]=_0x566d99[_0xb582('0x4b')]||![];this['dialAMDInitialSilence']=_0x566d99[_0xb582('0x4c')];this[_0xb582('0x4d')]=_0x566d99[_0xb582('0x4d')];this[_0xb582('0x4e')]=_0x566d99[_0xb582('0x4e')];this[_0xb582('0x4f')]=_0x566d99[_0xb582('0x4f')];this[_0xb582('0x50')]=_0x566d99[_0xb582('0x50')];this[_0xb582('0x51')]=_0x566d99[_0xb582('0x51')];this[_0xb582('0x52')]=_0x566d99['dialAMDMaximumNumberOfWords'];this[_0xb582('0x53')]=_0x566d99[_0xb582('0x53')];this[_0xb582('0x54')]=_0x566d99['dialAMDMaximumWordLength'];this[_0xb582('0x55')]=0x0;this[_0xb582('0x56')]=0x0;this[_0xb582('0x57')]=_0x566d99[_0xb582('0x57')];this[_0xb582('0x58')]=0x0;this[_0xb582('0x59')]=0x0;this['outboundNoAnswerCallsDay']=0x0;this['outboundBusyCallsDay']=0x0;this[_0xb582('0x5a')]=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0xb582('0x5b')]=0x0;this[_0xb582('0x5c')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this[_0xb582('0x5d')]=0x0;this['outboundDropCallsDayTimeout']=0x0;this[_0xb582('0x5e')]=0x0;this[_0xb582('0x5f')]=0x0;this['outboundAbandonedDay']=0x0;this[_0xb582('0x60')]=undefined;this[_0xb582('0x61')]=undefined;this[_0xb582('0x62')]=undefined;this[_0xb582('0x63')]=1.05;this[_0xb582('0x64')]=0x0;this[_0xb582('0x65')]=0x0;this[_0xb582('0x66')]=0x0;this[_0xb582('0x67')]=0x0;this[_0xb582('0x68')]=0x0;this['predictiveIntervalAvgTalktime']=0x0;this[_0xb582('0x69')]=0x0;this[_0xb582('0x6a')]=0x0;this['predictiveIntervalMaxThreshold']=_0x566d99[_0xb582('0x6b')]||0x14;this['predictiveIntervalMinThreshold']=_0x566d99[_0xb582('0x6b')]||0xa;this[_0xb582('0x6c')]=0x0;this[_0xb582('0x6d')]=0x0;this['predictiveIntervalHitRate']=0x1;this['erlangCalls']=0x0;this['erlangCallToSecond']=0x0;this[_0xb582('0x6e')]=0x0;this[_0xb582('0x6f')]=0x0;this[_0xb582('0x70')]=_0x566d99[_0xb582('0x70')]||0x1e;this['dialRecallInQueue']=_0x566d99[_0xb582('0x71')]||![];this[_0xb582('0x72')]=_0x566d99['dialQueueProject2']||undefined;this[_0xb582('0x73')]=_0x566d99[_0xb582('0x73')]||![];this[_0xb582('0x74')]=_0x566d99[_0xb582('0x74')]||![];this[_0xb582('0xc')]=monitorFormat[_0x566d99['monitor_format']]?monitorFormat[_0x566d99['monitor_format']]:undefined;this['mandatoryDisposition']=_0x566d99['mandatoryDisposition']||![];this['mandatoryDispositionPause']=_0x566d99[_0xb582('0x75')]?_0x566d99[_0xb582('0x75')]:undefined;}module[_0xb582('0x76')]=VoiceQueue; \ No newline at end of file diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js index 86db83c..afdfd55 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 _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 +var _0xa36b=['username','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x25e754,_0x200eba){var _0x1d991e=function(_0x1601ba){while(--_0x1601ba){_0x25e754['push'](_0x25e754['shift']());}};_0x1d991e(++_0x200eba);}(_0xa36b,0x149));var _0xba36=function(_0x53634b,_0x214b9d){_0x53634b=_0x53634b-0x0;var _0x2faeef=_0xa36b[_0x53634b];return _0x2faeef;};'use strict';function VtigerAccount(_0x4d39e9){this['id']=_0x4d39e9['id']||0x0;this[_0xba36('0x0')]=_0x4d39e9[_0xba36('0x0')]||'';this[_0xba36('0x1')]=_0x4d39e9['username']||'';this['accessKey']=_0x4d39e9['accessKey']||'';this['remoteUri']=_0x4d39e9[_0xba36('0x2')]||'';this[_0xba36('0x3')]=_0x4d39e9['serverUrl']||'';this[_0xba36('0x4')]=_0x4d39e9[_0xba36('0x4')]||{};}module[_0xba36('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 cea37ee..486eff4 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 _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 +var _0xc057=['name','username','password','token','remoteUri','authType','type','serverUrl','Configurations','exports'];(function(_0xe2d767,_0x5e7936){var _0x36e611=function(_0x4fddec){while(--_0x4fddec){_0xe2d767['push'](_0xe2d767['shift']());}};_0x36e611(++_0x5e7936);}(_0xc057,0x186));var _0x7c05=function(_0x2afc4c,_0x9e22c7){_0x2afc4c=_0x2afc4c-0x0;var _0x28ab34=_0xc057[_0x2afc4c];return _0x28ab34;};'use strict';function ZendeskAccount(_0x1411f8){this['id']=_0x1411f8['id']||0x0;this[_0x7c05('0x0')]=_0x1411f8['name']||'';this[_0x7c05('0x1')]=_0x1411f8[_0x7c05('0x1')]||'';this[_0x7c05('0x2')]=_0x1411f8['password']||'';this[_0x7c05('0x3')]=_0x1411f8[_0x7c05('0x3')]||'';this[_0x7c05('0x4')]=_0x1411f8['remoteUri']||'';this['authType']=_0x1411f8[_0x7c05('0x5')]||'';this[_0x7c05('0x6')]=_0x1411f8[_0x7c05('0x6')]||'integrationTab';this[_0x7c05('0x7')]=_0x1411f8[_0x7c05('0x7')]||'';this[_0x7c05('0x8')]=_0x1411f8[_0x7c05('0x8')]||{};}module[_0x7c05('0x9')]=ZendeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js index d53f009..aa6dcb5 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 _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 +var _0x6427=['serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone','clientId','clientSecret'];(function(_0x544136,_0x16a6da){var _0x4bd62f=function(_0x49819f){while(--_0x49819f){_0x544136['push'](_0x544136['shift']());}};_0x4bd62f(++_0x16a6da);}(_0x6427,0x9f));var _0x7642=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x6427[_0x5b644e];return _0x49c6bf;};'use strict';function ZohoAccount(_0x3632cd){this['id']=_0x3632cd['id']||0x0;this[_0x7642('0x0')]=_0x3632cd[_0x7642('0x0')]||'';this['description']=_0x3632cd[_0x7642('0x1')]||'';this[_0x7642('0x2')]=_0x3632cd['host']||'';this[_0x7642('0x3')]=_0x3632cd['zone']||'';this[_0x7642('0x4')]=_0x3632cd['clientId']||'';this['clientSecret']=_0x3632cd[_0x7642('0x5')]||'';this[_0x7642('0x6')]=_0x3632cd[_0x7642('0x6')]||'';this[_0x7642('0x7')]=_0x3632cd[_0x7642('0x7')]||'';this[_0x7642('0x8')]=_0x3632cd[_0x7642('0x8')]||'';this[_0x7642('0x9')]=_0x3632cd['Configurations']||{};}module[_0x7642('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 acd207e..f9602e7 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 _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 +var _0xc4b2=['callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','prototype','getCaller','\x22%s\x22\x20<%s>','exports','util','lodash','moment','isNil','string','uniqueid','idContact','type','campaigntype','queue','dialAnswer','membername','Agent','name','channelAgent','format','SIP/%s','calleridname','Contact','phone','firstName','lastName','active','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countmachineretry','countagentrejectretry','countdropretry','countabandonedretry','callback'];(function(_0x2ef44b,_0x553359){var _0x2405b9=function(_0x278290){while(--_0x278290){_0x2ef44b['push'](_0x2ef44b['shift']());}};_0x2405b9(++_0x553359);}(_0xc4b2,0x185));var _0x2c4b=function(_0x5b3b6a,_0x906f49){_0x5b3b6a=_0x5b3b6a-0x0;var _0x4a9af7=_0xc4b2[_0x5b3b6a];return _0x4a9af7;};'use strict';var util=require(_0x2c4b('0x0'));var _=require(_0x2c4b('0x1'));var moment=require(_0x2c4b('0x2'));function checkNameSurname(_0x222be4,_0x4d7ef0,_0x4e60d3){var _0x397716='';if(!_[_0x2c4b('0x3')](_0x4d7ef0)&&'string'===typeof _0x4d7ef0){_0x397716+=_0x4d7ef0;}if(!_[_0x2c4b('0x3')](_0x4e60d3)&&_0x2c4b('0x4')===typeof _0x4e60d3){_0x397716+='\x20'+_0x4e60d3;}if(_0x397716!==''){return _0x397716;}return _0x222be4;}function Action(_0x300b88,_0x3274b3,_0x13d1ed,_0x49dc93,_0x5b74c0){this[_0x2c4b('0x5')]=_0x13d1ed||undefined;this[_0x2c4b('0x6')]=_0x300b88['id'];this['queue']=_0x3274b3['name'];this[_0x2c4b('0x7')]=_0x3274b3[_0x2c4b('0x7')];this[_0x2c4b('0x8')]=_0x2c4b('0x9');this[_0x2c4b('0xa')]=![];this[_0x2c4b('0xb')]=_['isNil'](_0x300b88['Agent'])?undefined:_0x300b88[_0x2c4b('0xc')][_0x2c4b('0xd')];this[_0x2c4b('0xe')]=this[_0x2c4b('0xb')]?util[_0x2c4b('0xf')](_0x2c4b('0x10'),this[_0x2c4b('0xb')]):_0x49dc93||undefined;this[_0x2c4b('0x11')]=checkNameSurname(_0x300b88[_0x2c4b('0x12')][_0x2c4b('0x13')],_0x300b88[_0x2c4b('0x12')][_0x2c4b('0x14')],_0x300b88['Contact'][_0x2c4b('0x15')]);this['active']=_0x300b88[_0x2c4b('0x16')]||![];this['calleridnum']=_0x300b88[_0x2c4b('0x12')][_0x2c4b('0x13')];this[_0x2c4b('0x17')]=_0x300b88['scheduledat'];this[_0x2c4b('0x18')]=_0x300b88[_0x2c4b('0x18')]||0x0;this[_0x2c4b('0x19')]=_0x300b88['countcongestionretry']||0x0;this[_0x2c4b('0x1a')]=_0x300b88[_0x2c4b('0x1a')]||0x0;this[_0x2c4b('0x1b')]=(_0x300b88['countbusyretry']||0x0)+(_0x300b88['countcongestionretry']||0x0)+(_0x300b88[_0x2c4b('0x1a')]||0x0)+(_0x300b88[_0x2c4b('0x1c')]||0x0)+(_0x300b88['countdropretry']||0x0)+(_0x300b88['countabandonedretry']||0x0)+(_0x300b88[_0x2c4b('0x1d')]||0x0)+(_0x300b88[_0x2c4b('0x1e')]||0x0);this[_0x2c4b('0x1c')]=_0x300b88[_0x2c4b('0x1c')]||0x0;this['countdropretry']=_0x300b88[_0x2c4b('0x1f')]||0x0;this[_0x2c4b('0x20')]=_0x300b88[_0x2c4b('0x20')]||0x0;this[_0x2c4b('0x1d')]=_0x300b88[_0x2c4b('0x1d')]||0x0;this['countagentrejectretry']=_0x300b88['countagentrejectretry']||0x0;this[_0x2c4b('0x21')]=_0x300b88[_0x2c4b('0x21')];this['callbackuniqueid']=_0x300b88[_0x2c4b('0x22')];this['callbackat']=_0x300b88[_0x2c4b('0x23')];this[_0x2c4b('0x24')]=_0x300b88[_0x2c4b('0x24')];this[_0x2c4b('0x25')]=_0x300b88[_0x2c4b('0x25')];this['ListId']=_0x300b88[_0x2c4b('0x26')];this[_0x2c4b('0x27')]=_[_0x2c4b('0x3')](_0x300b88[_0x2c4b('0xc')])?_0x300b88[_0x2c4b('0x27')]:_0x300b88[_0x2c4b('0xc')]['id'];this[_0x2c4b('0x28')]=_0x300b88[_0x2c4b('0x28')];this[_0x2c4b('0x29')]='';this[_0x2c4b('0x2a')]='';}Action[_0x2c4b('0x2b')][_0x2c4b('0x2c')]=function(){return util[_0x2c4b('0xf')](_0x2c4b('0x2d'),this[_0x2c4b('0x11')],this['number']);};module[_0x2c4b('0x2e')]=Action; \ No newline at end of file diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js index 6d7c6ae..3dee1c8 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 _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 +var _0xc5a2=['callProgressDetectingCustomer','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','custom:agentnosuchnumber','buildObj','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','dialGlobalMaxRetry','cloneAction','Global','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','dialNoSuchNumberRetryFrequency','unlockAgent','activeContact','linkedid','ANSWER','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','pTalking:\x20','custom:agentconnect','connect','acw','custom:agentConnectPreview','buildAcw','complete','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','talktime','sumBillable','[syncHangup][talking][decrement]','BUSY','countbusyretry','Busy','custom:agentbusy','busy','[callProgressDetectingCustomer][logBusy]','dialBusyRetryFrequency','NOANSWER','countnoanswerretry','NoAnswer','custom:agentnoanswer','[callProgressDetectingCustomer][logNoAnswer]','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','CONGESTION','countcongestionretry','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','CANCEL','countagentrejectretry','AgentReject','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectRetryFrequency','ABANDONED','countabandonedretry','[callProgressDetectingCustomer][logAbandoned]','countabandonedetry','dialAbandonedMaxRety','countmachineretry','cause-txt','dialstatus','custom:amd','amd','[callProgressDetectingCustomer][hangupInAMD]','[callProgressDetectingCustomer][machine]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','originated:\x20','destlinkedid','object','isUndefined','reason','logAgent','[callProgressDetectingAgent][logNoSuch]','createAgentHistory','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','Congestion','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','Contact','phone','VoiceQueueId','Contact\x20is\x20undefined','lookAgent','isEmpty','execCall','[Preview][execCall][success]','\x20IdHopper:\x20','idContact','custom:agentcalled','Calling','[Preview][execCall][failure]','createHistory','Contact\x20in\x20black\x20List','SIP/%s','unmonitored','execRun','unlock','unlockContact','disableContact','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][getContactPreview]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Trunk\x20not\x20work]','\x20Trunk\x20Backup\x20is\x20not\x20active','Trunk\x20not\x20work','\x20Not\x20Active','campaign\x20Name:\x20','SIP/%s/%s%s','trim','substring','dialCutDigit','getCallerIdRandom','dialRandomLastDigitCallerIdNumber','getCallerId','callerid','originatecalleridname','originatecalleridnum','merge','toLowerVariables','variablesAction','[originated][increment]','OriginateError','channel','syncOriginateResponse','actionid','response','rejected','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','transfer','callProgressDetectingAgent','[syncHangup][talking][transfer]','destuniqueid','addVariable','variables','keys','variable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','bluebird','uuid','moment','md5','ioredis','../../../config/environment','../../../config/logger','preview','actionPreview','../ami','./rpcDb','./action','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','finally','sequence','campaignsPreview','voiceQueues','trunks','actions','agents','originateresponse','bind','hangup','syncHangup','hanguprequest','syncHangupRequest','dialend','syncDialEnd','syncNewExten','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','type','name','strategy','answered','available','loggedIn','pTalking','sumDuration','sumHoldTime','talking','total','unmanaged','abandoned','waiting','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialPrefix','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','outboundAbandonedCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','Trunk','active','Interval','stringify','voice:queue:%s','voice_queue:save','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','format','voice_queue_channel:remove','voice_queue_presence:remove','sendMessageOneNotActive','paused','message','NOT_ACTIVE','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','loopCampaigns','syncCampaigns','clockClearZombieChannels','hasOwnProperty','outbound','setMessage','clearZombieChannel','isNil','[clearZombieChannels][talking]','Queue','queue','originated','dialAnswer','pick','contactId','UserId','ListId','Action','status','No\x20such\x20channel','updateOriginated','decrementTalkink','[clearZombieChannel]','loggerError','[Dialer][checkChannel][Preview]','clearZombieChannels','[action]','size','recallMe','getContactRecallMe','then','length','scheduledat','dialRecallMeTimeout','Agent','voicePause','run','[RecallMe]','catch','logger2','starttime','YYYY-MM-DD\x20HH:mm:ss','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','[HistoryRecallClose]','createCustomerFinal','[getContactRecallMe]','IsNotLoggedIn','AGENTS_NOT_LOGGED','isActive','isTrunkReachable','TrunkBackup','ACTIVE'];(function(_0x172c5b,_0x3e94a1){var _0x1c6e61=function(_0x409c98){while(--_0x409c98){_0x172c5b['push'](_0x172c5b['shift']());}};_0x1c6e61(++_0x3e94a1);}(_0xc5a2,0xb2));var _0x2c5a=function(_0x20af3b,_0x8a33a5){_0x20af3b=_0x20af3b-0x0;var _0x4f815d=_0xc5a2[_0x20af3b];return _0x4f815d;};'use strict';var util=require(_0x2c5a('0x0'));var _=require(_0x2c5a('0x1'));var BPromise=require(_0x2c5a('0x2'));var uuid=require(_0x2c5a('0x3'));var moment=require(_0x2c5a('0x4'));var md5=require(_0x2c5a('0x5'));var Redis=require(_0x2c5a('0x6'));var config=require(_0x2c5a('0x7'));var logger=require(_0x2c5a('0x8'))(_0x2c5a('0x9'));var loggerAction=require(_0x2c5a('0x8'))(_0x2c5a('0xa'));var ami=require(_0x2c5a('0xb'));var rpcDb=require(_0x2c5a('0xc'));var Action=require(_0x2c5a('0xd'));var ut=require('./util/util');config[_0x2c5a('0xe')]=_[_0x2c5a('0xf')](config[_0x2c5a('0xe')],{'host':_0x2c5a('0x10'),'port':0x18eb});var io=require(_0x2c5a('0x11'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0x2c5a('0x12')][_0x2c5a('0x13')]=function(_0x38ebb8){this['tail']=this[_0x2c5a('0x14')]?this[_0x2c5a('0x14')][_0x2c5a('0x15')](_0x38ebb8):_0x38ebb8();};function Preview(_0x3a28e2){this[_0x2c5a('0x16')]=new Sequence();this[_0x2c5a('0x17')]=_0x3a28e2[_0x2c5a('0x18')];this['trunks']=_0x3a28e2[_0x2c5a('0x19')];this[_0x2c5a('0x1a')]={};this[_0x2c5a('0x1b')]=_0x3a28e2[_0x2c5a('0x1b')];this['clockClearZombieChannels']=0x0;ami['on'](_0x2c5a('0x1c'),this['syncOriginateResponse'][_0x2c5a('0x1d')](this));ami['on'](_0x2c5a('0x1e'),this[_0x2c5a('0x1f')][_0x2c5a('0x1d')](this));ami['on'](_0x2c5a('0x20'),this[_0x2c5a('0x21')][_0x2c5a('0x1d')](this));ami['on'](_0x2c5a('0x22'),this[_0x2c5a('0x23')][_0x2c5a('0x1d')](this));ami['on']('newexten',this[_0x2c5a('0x24')][_0x2c5a('0x1d')](this));ami['on']('varset',this[_0x2c5a('0x25')][_0x2c5a('0x1d')](this));ami['on'](_0x2c5a('0x26'),this[_0x2c5a('0x27')][_0x2c5a('0x1d')](this));ami['on'](_0x2c5a('0x28'),this[_0x2c5a('0x29')][_0x2c5a('0x1d')](this));this['loopCampaigns'](this[_0x2c5a('0x17')]);}function emit(_0x76c2bc,_0x5244fe,_0x5bb145){io['to'](_0x76c2bc)[_0x2c5a('0x2a')](_0x5244fe,_0x5bb145);}function emitCampaignPreview(_0x48305e){if(_0x48305e[_0x2c5a('0x2b')]==='outbound'){var _0x4a17be={'id':_0x48305e['id'],'name':_0x48305e[_0x2c5a('0x2c')],'strategy':_0x48305e[_0x2c5a('0x2d')],'answered':_0x48305e[_0x2c5a('0x2e')],'available':_0x48305e[_0x2c5a('0x2f')],'loggedIn':_0x48305e[_0x2c5a('0x30')],'pTalking':_0x48305e[_0x2c5a('0x31')],'sumBillable':_0x48305e['sumBillable'],'sumDuration':_0x48305e[_0x2c5a('0x32')],'sumHoldTime':_0x48305e[_0x2c5a('0x33')]||0x0,'talking':_0x48305e[_0x2c5a('0x34')],'total':_0x48305e[_0x2c5a('0x35')],'type':_0x48305e[_0x2c5a('0x2b')],'unmanaged':_0x48305e[_0x2c5a('0x36')],'abandoned':_0x48305e[_0x2c5a('0x37')],'waiting':_0x48305e[_0x2c5a('0x38')],'loggedInDb':_0x48305e['loggedInDb'],'dialActive':_0x48305e[_0x2c5a('0x39')],'dialMethod':_0x48305e[_0x2c5a('0x3a')],'dialOriginateCallerIdName':_0x48305e[_0x2c5a('0x3b')],'dialOriginateCallerIdNumber':_0x48305e[_0x2c5a('0x3c')],'dialOriginateTimeout':_0x48305e['dialOriginateTimeout'],'dialPrefix':_0x48305e[_0x2c5a('0x3d')],'outboundAnswerAgiCallsDay':_0x48305e['outboundAnswerAgiCallsDay'],'outboundAnswerCallsDay':_0x48305e[_0x2c5a('0x3e')],'outboundBlacklistCallsDay':_0x48305e[_0x2c5a('0x3f')],'outboundBusyCallsDay':_0x48305e[_0x2c5a('0x40')],'outboundCongestionCallsDay':_0x48305e[_0x2c5a('0x41')],'outboundDropCallsDayACS':_0x48305e[_0x2c5a('0x42')],'outboundDropCallsDayCallersExit':_0x48305e[_0x2c5a('0x43')],'outboundDropCallsDayTimeout':_0x48305e[_0x2c5a('0x44')],'outboundNoAnswerCallsDay':_0x48305e[_0x2c5a('0x45')],'outboundNoSuchCallsDay':_0x48305e[_0x2c5a('0x46')],'outboundOriginateFailureCallsDay':_0x48305e[_0x2c5a('0x47')],'outboundReCallsDay':_0x48305e[_0x2c5a('0x48')],'outboundRejectCallsDay':_0x48305e[_0x2c5a('0x49')],'outboundUnknownCallsDay':_0x48305e[_0x2c5a('0x4a')],'outboundAbandonedCallsDay':_0x48305e[_0x2c5a('0x4b')],'predictiveIntervalAnsweredCalls':_0x48305e[_0x2c5a('0x4c')],'predictiveIntervalAvgHoldtime':_0x48305e['predictiveIntervalAvgHoldtime'],'predictiveIntervalAvgTalktime':_0x48305e[_0x2c5a('0x4d')],'predictiveIntervalDroppedCallsCallersExit':_0x48305e[_0x2c5a('0x4e')],'predictiveIntervalDroppedCallsTimeout':_0x48305e[_0x2c5a('0x4f')],'predictiveIntervalErlangCalls':_0x48305e[_0x2c5a('0x50')],'predictiveIntervalErlangCallsDroppedCalls':_0x48305e[_0x2c5a('0x51')],'predictiveIntervalHitRate':_0x48305e['predictiveIntervalHitRate'],'predictiveIntervalMultiplicativeFactor':_0x48305e[_0x2c5a('0x52')],'predictiveIntervalPauses':_0x48305e[_0x2c5a('0x53')],'predictiveIntervalAvailable':_0x48305e[_0x2c5a('0x54')],'predictiveIntervalTotalCalls':_0x48305e['predictiveIntervalTotalCalls'],'message':_0x48305e['message'],'originated':_0x48305e['originated'],'erlangCalls':_0x48305e['erlangCalls'],'erlangCallToSecond':_0x48305e[_0x2c5a('0x55')],'erlangAbandonmentRate':_0x48305e[_0x2c5a('0x56')],'erlangBusyFactor':_0x48305e[_0x2c5a('0x57')],'startPredictive':_0x48305e[_0x2c5a('0x58')],'startProgressive':_0x48305e[_0x2c5a('0x59')]};if(_0x48305e[_0x2c5a('0x5a')]){_0x4a17be[_0x2c5a('0x5a')]={'id':_0x48305e[_0x2c5a('0x5a')]['id'],'name':_0x48305e['Trunk'][_0x2c5a('0x2c')],'active':_0x48305e[_0x2c5a('0x5a')][_0x2c5a('0x5b')],'callerid':_0x48305e[_0x2c5a('0x5a')]['callerid']};}if(_0x48305e[_0x2c5a('0x5c')]){_0x4a17be['Interval']={'id':_0x48305e[_0x2c5a('0x5c')]['id'],'name':_0x48305e['Interval'][_0x2c5a('0x2c')]};}var _0x1f9471=md5(JSON[_0x2c5a('0x5d')](_0x4a17be));if(_0x48305e['md5']!==_0x1f9471){_0x48305e[_0x2c5a('0x5')]=_0x1f9471;emit(util['format'](_0x2c5a('0x5e'),_0x4a17be[_0x2c5a('0x2c')]),_0x2c5a('0x5f'),_0x4a17be);}}}function emitVoiceQueueChannelRemove(_0x45c03d){logger[_0x2c5a('0x60')](_0x2c5a('0x61'),JSON[_0x2c5a('0x5d')](_0x45c03d));emit(util[_0x2c5a('0x62')](_0x2c5a('0x5e'),_0x45c03d[_0x2c5a('0x2c')]),_0x2c5a('0x63'),_0x45c03d);io[_0x2c5a('0x2a')](_0x2c5a('0x64'),_0x45c03d);}function notSendMessagesQueue(_0x496df6){if(_0x496df6[_0x2c5a('0x65')]){if(_0x496df6['originated']===0x0&&_0x496df6['pTalking']===0x0){_0x496df6['sendMessageOneNotActive']=![];_0x496df6[_0x2c5a('0x2f')]=0x0;_0x496df6[_0x2c5a('0x66')]=0x0;_0x496df6[_0x2c5a('0x67')]=_0x2c5a('0x68');ut[_0x2c5a('0x69')](_0x2c5a('0x6a'),_0x496df6[_0x2c5a('0x2c')]+_0x2c5a('0x6b'));}else{_0x496df6['message']='IS_DISACTIVED';ut[_0x2c5a('0x69')]('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x496df6[_0x2c5a('0x2c')]+'\x20is\x20disactive');}emitCampaignPreview(_0x496df6);}}Preview['prototype'][_0x2c5a('0x6c')]=function(){var _0x5c1e80=this;setInterval(function(){_0x5c1e80[_0x2c5a('0x6d')]();},0x7cf);};Preview[_0x2c5a('0x12')][_0x2c5a('0x6d')]=function(){var _0x244d90=this[_0x2c5a('0x17')];this[_0x2c5a('0x6e')]+=0x1;for(var _0x57578d in _0x244d90){if(_0x244d90[_0x2c5a('0x6f')](_0x57578d)&&(_0x244d90[_0x57578d][_0x2c5a('0x3a')]===_0x2c5a('0x9')||_0x244d90[_0x57578d][_0x2c5a('0x3a')]==='booked')&&_0x244d90[_0x57578d][_0x2c5a('0x2b')]===_0x2c5a('0x70')){if(this[_0x2c5a('0x6e')]>0x7){this[_0x2c5a('0x6e')]=0x0;this['clearZombieChannels']();}}if(_0x244d90[_0x2c5a('0x6f')](_0x57578d)&&_0x244d90[_0x57578d][_0x2c5a('0x3a')]===_0x2c5a('0x9')&&_0x244d90[_0x57578d][_0x2c5a('0x2b')]===_0x2c5a('0x70')){if(_0x244d90[_0x57578d][_0x2c5a('0x39')]){this[_0x2c5a('0x71')](_0x244d90[_0x57578d]);this['recallMe'](_0x244d90[_0x57578d]);}else{notSendMessagesQueue(_0x244d90[_0x57578d]);}}}};Preview['prototype'][_0x2c5a('0x72')]=function(_0x57445a){var _0x304092=this;this[_0x2c5a('0x16')]['enqueue'](function(){if(!_[_0x2c5a('0x73')](_0x304092[_0x2c5a('0x1a')][_0x57445a])){loggerAction[_0x2c5a('0x60')](_0x2c5a('0x74'),_0x57445a,_0x2c5a('0x75'),_0x304092[_0x2c5a('0x1a')][_0x57445a][_0x2c5a('0x76')],'originated:\x20',JSON[_0x2c5a('0x5d')](_0x304092[_0x2c5a('0x17')][_0x304092[_0x2c5a('0x1a')][_0x57445a]['queue']][_0x2c5a('0x77')]),'pTalking:\x20',JSON[_0x2c5a('0x5d')](_0x304092[_0x2c5a('0x17')][_0x304092['actions'][_0x57445a][_0x2c5a('0x76')]]['pTalking']),JSON[_0x2c5a('0x5d')](_0x304092[_0x2c5a('0x1a')][_0x57445a][_0x2c5a('0x78')]),JSON[_0x2c5a('0x5d')](_[_0x2c5a('0x79')](_0x304092[_0x2c5a('0x1a')][_0x57445a],[_0x2c5a('0x7a'),_0x2c5a('0x7b'),'VoiceQueueId',_0x2c5a('0x7c')])));return ami[_0x2c5a('0x7d')]({'action':_0x2c5a('0x7e'),'channel':_0x304092[_0x2c5a('0x1a')][_0x57445a]['channel']})['catch'](function(_0x3d484e){if(_0x3d484e[_0x2c5a('0x67')]===_0x2c5a('0x7f')){setTimeout(function(){if(_0x304092['actions'][_0x57445a]){ut[_0x2c5a('0x80')](_0x304092[_0x2c5a('0x17')][_0x304092[_0x2c5a('0x1a')][_0x57445a][_0x2c5a('0x76')]],'[clearZombieChannel]');if(_0x304092[_0x2c5a('0x1a')][_0x57445a][_0x2c5a('0x78')]===!![]){ut[_0x2c5a('0x81')](_0x304092[_0x2c5a('0x17')][_0x304092[_0x2c5a('0x1a')][_0x57445a]['queue']],_0x2c5a('0x82'));ut[_0x2c5a('0x83')]('[Dialer][checkChannel][pTalking][Preview]'+_0x57445a,_0x304092['actions'][_0x57445a][_0x2c5a('0x76')]);}ut[_0x2c5a('0x83')](_0x2c5a('0x84')+_0x57445a,_0x304092[_0x2c5a('0x1a')][_0x57445a][_0x2c5a('0x76')]);delete _0x304092['actions'][_0x57445a];}},0x2328);}});}});};Preview[_0x2c5a('0x12')][_0x2c5a('0x85')]=function(){var _0x2c278a=this;loggerAction['info'](_0x2c5a('0x86'),_[_0x2c5a('0x87')](this['actions']));for(var _0x3fdaf4 in this['actions']){if(_0x2c278a[_0x2c5a('0x1a')][_0x2c5a('0x6f')](_0x3fdaf4)){_0x2c278a[_0x2c5a('0x72')](_0x3fdaf4);}}};Preview[_0x2c5a('0x12')][_0x2c5a('0x88')]=function(_0x96c22e){var _0x37fe6a=this;rpcDb[_0x2c5a('0x89')](_0x96c22e['id'],ut['agentReadyId'](this['agents']))[_0x2c5a('0x8a')](function(_0x50ae50){if(!_['isNil'](_0x50ae50)){for(var _0x498de5=0x0;_0x498de5<_0x50ae50[_0x2c5a('0x8b')];_0x498de5+=0x1){if(ut['getDiff'](_0x50ae50[_0x498de5][_0x2c5a('0x8c')])<_0x96c22e[_0x2c5a('0x8d')]*0x3c){if(_0x50ae50[_0x498de5][_0x2c5a('0x8e')]&&!_0x50ae50[_0x498de5][_0x2c5a('0x8e')][_0x2c5a('0x8f')]){_0x37fe6a[_0x2c5a('0x90')](_0x50ae50[_0x498de5]['id'])[_0x2c5a('0x8a')](ut['logger2'](_0x2c5a('0x91')))[_0x2c5a('0x92')](ut[_0x2c5a('0x93')](_0x2c5a('0x91')));}else{rpcDb['disableContact'](_0x50ae50[_0x498de5]['id']);}}else{var _0x1eeaa5=new Action(_0x50ae50[_0x498de5],_0x96c22e);_0x1eeaa5[_0x2c5a('0x94')]=moment()['format'](_0x2c5a('0x95'));_0x96c22e[_0x2c5a('0x48')]+=0x1;ut[_0x2c5a('0x96')](_0x1eeaa5,0x17,_0x2c5a('0x97'));if(_0x96c22e[_0x2c5a('0x98')]){rpcDb[_0x2c5a('0x99')](ut[_0x2c5a('0x9a')](_0x50ae50[_0x498de5]));rpcDb[_0x2c5a('0x9b')](_0x1eeaa5,_0x2c5a('0x9c'));}else{ut['logCustomer'](_0x1eeaa5,0x16,'RecallFailedTimeout');rpcDb[_0x2c5a('0x9b')](_0x1eeaa5,_0x2c5a('0x9d'));rpcDb[_0x2c5a('0x9e')](_0x1eeaa5,_0x2c5a('0x9d'));}}}}})['catch'](ut[_0x2c5a('0x93')](_0x2c5a('0x9f')));};Preview[_0x2c5a('0x12')][_0x2c5a('0x71')]=function(_0x2e0109){_0x2e0109[_0x2c5a('0x65')]=!![];if(ut[_0x2c5a('0xa0')](_0x2e0109[_0x2c5a('0x30')])){_0x2e0109[_0x2c5a('0x67')]=_0x2c5a('0xa1');}else if(!ut[_0x2c5a('0xa2')](_0x2e0109[_0x2c5a('0x39')])){_0x2e0109['message']=_0x2c5a('0x68');}else if(!this[_0x2c5a('0xa3')](_0x2e0109[_0x2c5a('0x5a')])){if(!this[_0x2c5a('0xa3')](_0x2e0109[_0x2c5a('0xa4')])){_0x2e0109[_0x2c5a('0x67')]='TRUNK_IS_NOT_REACHABLE';}else{_0x2e0109[_0x2c5a('0x67')]=_0x2c5a('0xa5');}}else{_0x2e0109['message']=_0x2c5a('0xa5');}emitCampaignPreview(_0x2e0109);};Preview[_0x2c5a('0x12')][_0x2c5a('0xa6')]=function(_0x1581fd,_0x2be570,_0x1ea5f4){var _0x27d378=this;var _0x50ff2f=this[_0x2c5a('0x1a')][_0x2be570];var _0x580a87=this[_0x2c5a('0x17')][_0x50ff2f[_0x2c5a('0x76')]];var _0x1856cd;if(_0x580a87){switch(_0x1ea5f4){case'1':_0x580a87[_0x2c5a('0x46')]+=0x1;_0x50ff2f[_0x2c5a('0xa7')]+=0x1;_0x50ff2f[_0x2c5a('0xa8')]=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x0,_0x2c5a('0xaa'));ami['emit'](_0x2c5a('0xab'),ut[_0x2c5a('0xac')](_0x50ff2f,_0x2c5a('0xad')));rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xae'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut[_0x2c5a('0xb0')](_0x50ff2f,0xf,_0x2c5a('0xb1'));rpcDb[_0x2c5a('0x9e')](_0x1856cd,_0x2c5a('0xb2'));}else{if(_0x50ff2f[_0x2c5a('0xa7')]>=_0x580a87['dialNoSuchNumberMaxRetry']){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{rpcDb[_0x2c5a('0xb3')](ut[_0x2c5a('0xb4')](_0x50ff2f,_0x2c5a('0xa7'),_0x580a87[_0x2c5a('0xb5')]),_0x50ff2f[_0x2c5a('0xb6')],_0x50ff2f[_0x2c5a('0xb7')]);}}delete this['actions'][_0x1581fd[_0x2c5a('0xb8')]];break;case _0x2c5a('0xb9'):var _0x4179de=moment()[_0x2c5a('0x62')](_0x2c5a('0x95'));_0x50ff2f[_0x2c5a('0xba')]=_0x4179de;_0x50ff2f[_0x2c5a('0xbb')]=_0x4179de;_0x50ff2f['dialAnswer']=!![];_0x580a87[_0x2c5a('0x31')]+=0x1;logger[_0x2c5a('0x60')](_0x2c5a('0xbc'),_0x50ff2f[_0x2c5a('0xbd')],_0x2c5a('0xbe'),_0x580a87[_0x2c5a('0x2c')],_0x2c5a('0xbf'),_0x580a87['pTalking']);ami['emit'](_0x2c5a('0xc0'),ut[_0x2c5a('0xac')](_0x50ff2f,_0x2c5a('0xc1'),this[_0x2c5a('0x17')][_0x50ff2f[_0x2c5a('0x76')]]));if(_0x580a87[_0x2c5a('0xc2')]){ami[_0x2c5a('0x2a')](_0x2c5a('0xc3'),ut[_0x2c5a('0xc4')](_0x50ff2f));}break;case'16':ami[_0x2c5a('0x2a')]('custom:agentcomplete',ut[_0x2c5a('0xac')](_0x50ff2f,'complete',this[_0x2c5a('0x17')][_0x50ff2f[_0x2c5a('0x76')]]));emitVoiceQueueChannelRemove(ut['buildObj'](_0x50ff2f,_0x2c5a('0xc5')));_0x580a87[_0x2c5a('0x3e')]+=0x1;_0x580a87['total']+=0x1;_0x580a87['answered']+=0x1;ut[_0x2c5a('0x81')](_0x580a87,_0x2c5a('0xc6'));_0x50ff2f[_0x2c5a('0xa8')]=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x4,_0x2c5a('0xc7'));rpcDb['createCustomerHistory'](_0x50ff2f,_0x2c5a('0xc8'));rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xc9'));rpcDb[_0x2c5a('0xca')](_0x50ff2f);_0x580a87[_0x2c5a('0x32')]+=_0x50ff2f[_0x2c5a('0xcb')];_0x580a87[_0x2c5a('0xcc')]+=_0x50ff2f[_0x2c5a('0xcb')];logger[_0x2c5a('0x60')](_0x2c5a('0xcd'),_0x50ff2f[_0x2c5a('0xbd')],'\x20Queue',_0x580a87[_0x2c5a('0x2c')],'pTalking:\x20',_0x580a87['pTalking']);delete this['actions'][_0x1581fd[_0x2c5a('0xb8')]];break;case _0x2c5a('0xce'):_0x580a87[_0x2c5a('0x40')]+=0x1;_0x50ff2f[_0x2c5a('0xcf')]+=0x1;_0x50ff2f[_0x2c5a('0xa8')]=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x5,_0x2c5a('0xd0'));ami[_0x2c5a('0x2a')](_0x2c5a('0xd1'),ut['buildObj'](_0x50ff2f,_0x2c5a('0xd2')));rpcDb['createCustomerHistory'](_0x50ff2f,_0x2c5a('0xd3'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut['cloneAction'](_0x50ff2f,0xf,'Global');rpcDb['createCustomerFinal'](_0x1856cd,'[callProgressDetectingCustomer][logBusyGlobal]');}else{if(_0x50ff2f[_0x2c5a('0xcf')]>=_0x580a87['dialBusyMaxRetry']){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xd3'));}else{rpcDb[_0x2c5a('0xb3')](ut[_0x2c5a('0xb4')](_0x50ff2f,'countbusyretry',_0x580a87[_0x2c5a('0xd4')]),_0x50ff2f['unlockAgent'],_0x50ff2f[_0x2c5a('0xb7')]);}}break;case _0x2c5a('0xd5'):_0x580a87['outboundNoAnswerCallsDay']+=0x1;_0x50ff2f[_0x2c5a('0xd6')]+=0x1;_0x50ff2f['countglobal']=ut[_0x2c5a('0xa9')](_0x50ff2f);ut['logCustomer'](_0x50ff2f,0x3,_0x2c5a('0xd7'));ami[_0x2c5a('0x2a')](_0x2c5a('0xd8'),ut['buildObj'](_0x50ff2f,'noanswer'));rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xd9'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87['dialGlobalMaxRetry']){_0x1856cd=ut['cloneAction'](_0x50ff2f,0xf,_0x2c5a('0xb1'));rpcDb[_0x2c5a('0x9e')](_0x1856cd,'[callProgressDetectingCustomer][logNoAnswerGlobal]');}else{if(_0x50ff2f[_0x2c5a('0xd6')]>=_0x580a87[_0x2c5a('0xda')]){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xd9'));}else{rpcDb[_0x2c5a('0xb3')](ut[_0x2c5a('0xb4')](_0x50ff2f,_0x2c5a('0xd6'),_0x580a87[_0x2c5a('0xdb')]),_0x50ff2f[_0x2c5a('0xb6')],_0x50ff2f['activeContact']);}}break;case _0x2c5a('0xdc'):_0x580a87[_0x2c5a('0x41')]+=0x1;_0x50ff2f[_0x2c5a('0xdd')]+=0x1;_0x50ff2f['countglobal']=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x8,'Congestion');ami[_0x2c5a('0x2a')](_0x2c5a('0xde'),ut['buildObj'](_0x50ff2f,_0x2c5a('0xdf')));rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xe0'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut['cloneAction'](_0x50ff2f,0xf,'Global');rpcDb['createCustomerFinal'](_0x1856cd,_0x2c5a('0xe1'));}else{if(_0x50ff2f[_0x2c5a('0xdd')]>=_0x580a87[_0x2c5a('0xe2')]){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,'[callProgressDetectingCustomer][logCongestion]');}else{rpcDb[_0x2c5a('0xb3')](ut[_0x2c5a('0xb4')](_0x50ff2f,_0x2c5a('0xdd'),_0x580a87[_0x2c5a('0xd4')]),_0x50ff2f[_0x2c5a('0xb6')],_0x50ff2f[_0x2c5a('0xb7')]);}}break;case _0x2c5a('0xe3'):_0x580a87['outboundRejectCallsDay']+=0x1;_0x50ff2f[_0x2c5a('0xe4')]+=0x1;_0x50ff2f['countglobal']=ut['totalGlobal'](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x14,_0x2c5a('0xe5'));ami[_0x2c5a('0x2a')](_0x2c5a('0xe6'),ut[_0x2c5a('0xac')](_0x50ff2f,_0x2c5a('0xe7')));rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xe8'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut['cloneAction'](_0x50ff2f,0x14,_0x2c5a('0xe5'));rpcDb[_0x2c5a('0x9e')](_0x1856cd,'[callProgressDetectingCustomer][logAgentReject]');}else{if(_0x50ff2f[_0x2c5a('0xe4')]>=_0x580a87['dialAgentRejectMaxRetry']){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xe9'));}else{rpcDb[_0x2c5a('0xb3')](ut['scheduledAt'](_0x50ff2f,_0x2c5a('0xe4'),_0x580a87[_0x2c5a('0xea')]),_0x50ff2f[_0x2c5a('0xb6')],_0x50ff2f[_0x2c5a('0xb7')]);}}break;case _0x2c5a('0xeb'):_0x580a87[_0x2c5a('0x4b')]+=0x1;_0x50ff2f[_0x2c5a('0xec')]+=0x1;_0x50ff2f['countglobal']=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0xb,'Abandoned');rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xed'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut[_0x2c5a('0xb0')](_0x50ff2f,0xf,'Global');rpcDb['createCustomerFinal'](_0x1856cd,'[callProgressDetectingCustomer][logAbandoned]');}else{if(_0x50ff2f[_0x2c5a('0xee')]>=_0x580a87[_0x2c5a('0xef')]){rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xed'));}else{rpcDb[_0x2c5a('0xb3')](ut['scheduledAt'](_0x50ff2f,'countabandonedretry',_0x580a87['dialAbandonedRetryFrequency']),_0x50ff2f[_0x2c5a('0xb6')],_0x50ff2f[_0x2c5a('0xb7')]);}}break;case'18':_0x580a87[_0x2c5a('0x4a')]+=0x1;_0x50ff2f[_0x2c5a('0xf0')]+=0x1;_0x50ff2f[_0x2c5a('0xa8')]=ut['totalGlobal'](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x12,_0x1581fd[_0x2c5a('0xf1')]||_0x1581fd[_0x2c5a('0xf2')]);ami[_0x2c5a('0x2a')](_0x2c5a('0xf3'),ut['buildObj'](_0x50ff2f,_0x2c5a('0xf4')));rpcDb['createCustomerHistory'](_0x50ff2f,_0x2c5a('0xf5'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut[_0x2c5a('0xb0')](_0x50ff2f,0xf,_0x2c5a('0xb1'));rpcDb[_0x2c5a('0x9e')](_0x1856cd,_0x2c5a('0xf5'));}else{rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xf5'));}delete this[_0x2c5a('0x1a')][_0x1581fd[_0x2c5a('0xb8')]];break;case'19':_0x580a87[_0x2c5a('0x4a')]+=0x1;_0x50ff2f[_0x2c5a('0xa8')]=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0x13,_0x1581fd[_0x2c5a('0xf1')]||_0x1581fd['dialstatus']);ami[_0x2c5a('0x2a')](_0x2c5a('0xf3'),ut[_0x2c5a('0xac')](_0x50ff2f,'amd'));rpcDb[_0x2c5a('0x9b')](_0x50ff2f,_0x2c5a('0xf6'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut[_0x2c5a('0xb0')](_0x50ff2f,0xf,'Global');rpcDb[_0x2c5a('0x9e')](_0x1856cd,'[callProgressDetectingCustomer][machine]');}else{rpcDb[_0x2c5a('0x9e')](_0x50ff2f,_0x2c5a('0xf6'));}delete this['actions'][_0x1581fd['linkedid']];break;default:if(_0x50ff2f[_0x2c5a('0x78')]){ut[_0x2c5a('0x81')](_0x580a87,'[default]');ut[_0x2c5a('0x83')](_0x2c5a('0xf7')+_0x580a87[_0x2c5a('0x2c')],_0x1581fd);}_0x580a87['outboundUnknownCallsDay']+=0x1;_0x50ff2f[_0x2c5a('0xa8')]=ut[_0x2c5a('0xa9')](_0x50ff2f);ut[_0x2c5a('0x96')](_0x50ff2f,0xc,_0x1581fd[_0x2c5a('0xf1')]||_0x1581fd[_0x2c5a('0xf2')]);rpcDb['createCustomerHistory'](_0x50ff2f,_0x2c5a('0xf8'));if(ut[_0x2c5a('0xa9')](_0x50ff2f)>=_0x580a87[_0x2c5a('0xaf')]){_0x1856cd=ut[_0x2c5a('0xb0')](_0x50ff2f,0xf,_0x2c5a('0xb1'));rpcDb[_0x2c5a('0x9e')](_0x1856cd,_0x2c5a('0xf9'));}else{rpcDb[_0x2c5a('0x9e')](_0x50ff2f,'[callProgressDetectingCustomer][logUnknownGlobal]');}delete this[_0x2c5a('0x1a')][_0x1581fd[_0x2c5a('0xb8')]];}if(!(_0x50ff2f[_0x2c5a('0x78')]&&_0x1ea5f4==='16')){ut[_0x2c5a('0x80')](_0x580a87,_0x2c5a('0xfa'));logger[_0x2c5a('0x60')](_0x2c5a('0xfb'),_0x50ff2f[_0x2c5a('0xbd')],_0x2c5a('0xbe'),_0x580a87[_0x2c5a('0x2c')],_0x2c5a('0xfc'),_0x580a87[_0x2c5a('0x77')]);}if(_0x1ea5f4!=='ANSWER'){delete this[_0x2c5a('0x1a')][_0x1581fd[_0x2c5a('0xb8')]];delete this[_0x2c5a('0x1a')][_0x1581fd[_0x2c5a('0xfd')]];}}};Preview[_0x2c5a('0x12')]['callProgressDetectingAgent']=function(_0x53356d,_0x511fdf,_0x1736ed){if(_['isUndefined'](_0x511fdf)&&_0x2c5a('0xfe')!==typeof _0x511fdf){return;}if(_[_0x2c5a('0xff')](_0x1736ed)&&'object'!==typeof _0x1736ed){return;}switch(_0x1736ed[_0x2c5a('0x100')]){case'0':ut[_0x2c5a('0x101')](_0x53356d,0x0,'NoSuchNumber');rpcDb['createAgentHistory'](_0x53356d,_0x2c5a('0x102'));break;case'3':ut[_0x2c5a('0x101')](_0x53356d,0x3,_0x2c5a('0xd7'));rpcDb[_0x2c5a('0x103')](_0x53356d,_0x2c5a('0x104'));break;case'5':ut[_0x2c5a('0x101')](_0x53356d,0x5,'Busy');rpcDb[_0x2c5a('0x103')](_0x53356d,_0x2c5a('0x105'));break;case'8':ut['logAgent'](_0x53356d,0x8,_0x2c5a('0x106'));rpcDb[_0x2c5a('0x103')](_0x53356d,_0x2c5a('0x107'));break;case'22':ut[_0x2c5a('0x101')](_0x53356d,0x16,_0x2c5a('0x108'));rpcDb[_0x2c5a('0x103')](_0x53356d,_0x2c5a('0x109'));break;default:ut['logAgent'](_0x53356d,0xc,_0x1736ed[_0x2c5a('0x100')]);rpcDb[_0x2c5a('0x103')](_0x53356d,_0x2c5a('0x107'));}ut[_0x2c5a('0x80')](_0x511fdf,_0x2c5a('0x10a'));logger[_0x2c5a('0x60')](_0x2c5a('0x10b'),_0x53356d['uniqueid'],'\x20Queue',_0x511fdf[_0x2c5a('0x2c')],_0x2c5a('0xfc'),_0x511fdf[_0x2c5a('0x77')]);delete this[_0x2c5a('0x1a')][_0x53356d[_0x2c5a('0xbd')]];};Preview[_0x2c5a('0x12')]['checkInBlack']=function(_0x2819ff,_0x446f35,_0x3a40c1,_0x331e81,_0x2367d2){var _0x54b85b=this;return new BPromise(function(_0x3bb6e3,_0x606924){if(_[_0x2c5a('0x73')](_0x446f35)||_[_0x2c5a('0x73')](_0x446f35['Contact'])||_[_0x2c5a('0x73')](_0x446f35[_0x2c5a('0x10c')][_0x2c5a('0x10d')])||_[_0x2c5a('0x73')](_0x446f35[_0x2c5a('0x10e')])){_0x606924(ut[_0x2c5a('0x67')](_0x2c5a('0x10f'),_0x331e81,_0x2367d2));return;}var _0x16130a=uuid['v4']();var _0x457a23=_0x54b85b[_0x2c5a('0x17')][_0x446f35[_0x2c5a('0x75')][_0x2c5a('0x2c')]];var _0xbc37d9=_0x3a40c1?_0x54b85b['agents'][_0x3a40c1]['id']:undefined;_0x54b85b['actions'][_0x16130a]=new Action(_0x446f35,_0x457a23,_0x16130a,_0x3a40c1,_0xbc37d9);var _0x3671af=_0x54b85b[_0x2c5a('0x1a')][_0x16130a];_0x3671af['unlockAgent']=_0x331e81;_0x3671af[_0x2c5a('0xb7')]=_0x2367d2;_0x3671af[_0x2c5a('0x110')]=_0x3a40c1;if(_[_0x2c5a('0x111')](_0x2819ff)){_0x54b85b[_0x2c5a('0x112')](_0x3671af,_0x457a23,_0x446f35,_0x3a40c1)[_0x2c5a('0x8a')](function(_0x455d13){logger['info'](_0x2c5a('0x113'),'Queue:\x20'+_0x3671af[_0x2c5a('0x76')]+_0x2c5a('0x114')+_0x3671af[_0x2c5a('0x115')],JSON[_0x2c5a('0x5d')](_0x455d13));ami[_0x2c5a('0x2a')](_0x2c5a('0x116'),ut[_0x2c5a('0xac')](_0x3671af,'called',_0x54b85b[_0x2c5a('0x17')][_0x3671af[_0x2c5a('0x76')]]));_0x3bb6e3(ut[_0x2c5a('0x67')](_0x2c5a('0x117')));})[_0x2c5a('0x92')](function(_0xdf571c){ut[_0x2c5a('0x69')](_0x2c5a('0x118'),_0xdf571c);_0x606924(ut[_0x2c5a('0x67')]('Call\x20failed',_0x331e81,_0x2367d2));});}else{_0x457a23['outboundBlacklistCallsDay']+=0x1;ut['logBlacklist'](_0x3671af);rpcDb[_0x2c5a('0x119')](_0x3671af,'[Blacklist][error]');delete _0x54b85b['actions'][_0x16130a];_0x606924(ut['message'](_0x2c5a('0x11a'),_0x331e81,_0x2367d2));}});};Preview[_0x2c5a('0x12')][_0x2c5a('0xa3')]=function(_0xc01738){return!_[_0x2c5a('0x73')](_0xc01738)&&!_[_0x2c5a('0x73')](_0xc01738[_0x2c5a('0x2c')])&&!_['isNil'](_0xc01738[_0x2c5a('0x5b')])&&_0xc01738[_0x2c5a('0x5b')]&&!_[_0x2c5a('0x73')](this['trunks'][util[_0x2c5a('0x62')](_0x2c5a('0x11b'),_0xc01738['name'])])&&!_['isNil'](this['trunks'][util[_0x2c5a('0x62')](_0x2c5a('0x11b'),_0xc01738['name'])][_0x2c5a('0x7e')])&&(this[_0x2c5a('0x19')][util[_0x2c5a('0x62')](_0x2c5a('0x11b'),_0xc01738[_0x2c5a('0x2c')])]['status']==='reachable'||this[_0x2c5a('0x19')][util[_0x2c5a('0x62')]('SIP/%s',_0xc01738[_0x2c5a('0x2c')])][_0x2c5a('0x7e')]===_0x2c5a('0x11c'));};Preview[_0x2c5a('0x12')][_0x2c5a('0x90')]=function(_0x490b1b,_0x4c963f){var _0x271fb5=this;return new BPromise(function(_0x5cf796,_0x4e9c8c){_0x271fb5[_0x2c5a('0x11d')](_0x490b1b,_0x4c963f)[_0x2c5a('0x8a')](function(_0x117d2c){_0x5cf796(_[_0x2c5a('0x79')](_0x117d2c,[_0x2c5a('0x67')]));})[_0x2c5a('0x92')](function(_0x56ccca){if(_0x56ccca[_0x2c5a('0x11e')]){rpcDb[_0x2c5a('0x11f')](_0x490b1b);}if(_0x56ccca[_0x2c5a('0x5b')]){rpcDb[_0x2c5a('0x120')](_0x490b1b);}_0x4e9c8c(_[_0x2c5a('0x79')](_0x56ccca,[_0x2c5a('0x67')]));});});};Preview[_0x2c5a('0x12')][_0x2c5a('0x11d')]=function(_0x48e4a3,_0x1a3135){var _0x403ef7=this;return new BPromise(function(_0x31210b,_0xf9ca25){var _0x45a35a,_0x28ca1a;rpcDb[_0x2c5a('0x121')](_0x48e4a3)['then'](function(_0x380955){if(!_[_0x2c5a('0x73')](_0x380955[0x0])){_0x28ca1a=_0x380955[0x0][_0x2c5a('0x122')]?![]:!![];_0x45a35a=_0x380955[0x0]['recallme']?!![]:![];_0x45a35a=_0x1a3135?!![]:_0x45a35a;}var _0x8e46ba=_0x403ef7[_0x2c5a('0x123')](_0x380955);if(_0x8e46ba[_0x2c5a('0x124')]){rpcDb[_0x2c5a('0x125')](_[_0x2c5a('0x79')](_0x380955[0x0],[_0x2c5a('0x10e'),'Contact.phone']))[_0x2c5a('0x8a')](function(_0x58a770){_0x403ef7['checkInBlack'](_0x58a770,_0x380955[0x0],_0x1a3135,_0x28ca1a,_0x45a35a)['then'](function(_0x23f230){_0x31210b(_0x23f230);})[_0x2c5a('0x92')](function(_0x346a24){_0xf9ca25(_0x346a24);});})[_0x2c5a('0x92')](function(_0x3ccb8e){ut[_0x2c5a('0x69')]('[Preview][checkIsBlackList]',_0x3ccb8e);_0xf9ca25(ut[_0x2c5a('0x67')]('Call\x20unsuccessful',_0x28ca1a,_0x45a35a));});}else{_0xf9ca25(ut[_0x2c5a('0x67')](_0x8e46ba['message'],_0x28ca1a,_0x45a35a));}})['catch'](function(_0x5bd5f9){ut[_0x2c5a('0x69')](_0x2c5a('0x126'),_0x5bd5f9);_0xf9ca25(ut['message'](_0x2c5a('0x127'),![],!![]));});});};Preview['prototype'][_0x2c5a('0x123')]=function(_0x4fd926){if(_['isNil'](_0x4fd926)||_[_0x2c5a('0x111')](_0x4fd926)||!_[_0x2c5a('0x73')](_0x4fd926[0x0][_0x2c5a('0x8e')])&&_[_0x2c5a('0x73')](_0x4fd926[0x0][_0x2c5a('0x8e')][_0x2c5a('0x2c')])){ut[_0x2c5a('0x69')](_0x2c5a('0x128'),_0x4fd926);return{'isValid':![],'message':_0x2c5a('0x129')};}var _0x598a70=this[_0x2c5a('0x17')][_0x4fd926[0x0][_0x2c5a('0x75')][_0x2c5a('0x2c')]];_0x598a70[_0x2c5a('0x67')]='ACTIVE';if(_[_0x2c5a('0x73')](_0x598a70)){ut[_0x2c5a('0x69')]('[Preview][validateContact][Empty\x20Campaign]',_0x598a70);return{'isValid':![],'message':'Empty\x20Campaign'};}if(!this[_0x2c5a('0xa3')](_0x598a70['Trunk'])){ut['logger'](_0x2c5a('0x12a'),'campaign\x20Name:\x20'+_0x598a70['name']+'\x20Trunk\x20is\x20not\x20active');if(!this['isTrunkReachable'](_0x598a70['TrunkBackup'])){ut[_0x2c5a('0x69')](_0x2c5a('0x12a'),_0x598a70['name']+_0x2c5a('0x12b'));return{'isValid':![],'message':_0x2c5a('0x12c')};}}if(!ut[_0x2c5a('0xa2')](_0x598a70[_0x2c5a('0x39')])){ut['logger']('[Preview][validateContact][Campaign\x20Active]',_0x598a70[_0x2c5a('0x2c')]+_0x2c5a('0x12d'));return{'isValid':![],'message':_0x2c5a('0x12e')+_0x598a70[_0x2c5a('0x2c')]+_0x2c5a('0x12d')};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x2c5a('0x12')][_0x2c5a('0x112')]=function(_0x2a5705,_0x33b323,_0xebcff5,_0x130cf0){var _0x4d9780=this;return new BPromise(function(_0x33af42,_0x37fa20){var _0x433233=_0x2a5705['uniqueid'];var _0x38297a=_0x4d9780[_0x2c5a('0xa3')](_0x33b323['Trunk'])?util[_0x2c5a('0x62')](_0x2c5a('0x12f'),_0x33b323['Trunk'][_0x2c5a('0x2c')],_[_0x2c5a('0x73')](_0x33b323[_0x2c5a('0x3d')])?'':_0x33b323[_0x2c5a('0x3d')][_0x2c5a('0x130')]()||'',_0x33b323['dialCutDigit']>0x0?_0xebcff5[_0x2c5a('0x10c')][_0x2c5a('0x10d')][_0x2c5a('0x131')](_0x33b323[_0x2c5a('0x132')]):_0xebcff5[_0x2c5a('0x10c')][_0x2c5a('0x10d')]):util[_0x2c5a('0x62')](_0x2c5a('0x12f'),_['isNil'](_0x33b323[_0x2c5a('0xa4')])?_0x33b323[_0x2c5a('0x5a')]['name']:_0x33b323[_0x2c5a('0xa4')][_0x2c5a('0x2c')],_[_0x2c5a('0x73')](_0x33b323['dialPrefix'])?'':_0x33b323[_0x2c5a('0x3d')][_0x2c5a('0x130')]()||'',_0x33b323['dialCutDigit']>0x0?_0xebcff5[_0x2c5a('0x10c')][_0x2c5a('0x10d')][_0x2c5a('0x131')](_0x33b323[_0x2c5a('0x132')]):_0xebcff5[_0x2c5a('0x10c')][_0x2c5a('0x10d')]);var _0x52e3bb=_0x4d9780[_0x2c5a('0xa3')](_0x33b323[_0x2c5a('0x5a')])?ut['getCallerId'](_0x33b323[_0x2c5a('0x5a')]['callerid'],_0x33b323['dialOriginateCallerIdName'],_0x33b323['dialRandomLastDigitCallerIdNumber']>0x0?ut[_0x2c5a('0x133')](_0x33b323[_0x2c5a('0x3c')],_0x33b323[_0x2c5a('0x134')]):_0x33b323[_0x2c5a('0x3c')]):ut[_0x2c5a('0x135')](_[_0x2c5a('0x73')](_0x33b323['TrunkBackup'])?_0x33b323[_0x2c5a('0x5a')]['callerid']:_0x33b323[_0x2c5a('0xa4')][_0x2c5a('0x136')],_0x33b323[_0x2c5a('0x3b')],_0x33b323[_0x2c5a('0x134')]>0x0?ut[_0x2c5a('0x133')](_0x33b323[_0x2c5a('0x3c')],_0x33b323['dialRandomLastDigitCallerIdNumber']):_0x33b323[_0x2c5a('0x3c')]);if(_0x52e3bb){_0x2a5705[_0x2c5a('0x137')]=ut['extractCalleridName'](_0x52e3bb);_0x2a5705[_0x2c5a('0x138')]=ut['extractCalleridNumber'](_0x52e3bb);}var _0x4eb8c1=ut['addVariables'](_0x33b323,_0xebcff5,_0x38297a,_0x52e3bb,_0x433233,_0x2a5705);_[_0x2c5a('0x139')](_0x2a5705,ut[_0x2c5a('0x13a')](_0x4eb8c1));_0x2a5705[_0x2c5a('0x94')]=moment()[_0x2c5a('0x62')](_0x2c5a('0x95'));ami[_0x2c5a('0x7d')](ut[_0x2c5a('0x13b')](_0x2a5705,_0x33b323,_0x4eb8c1,_0x2a5705['activeContact'],_0x130cf0))[_0x2c5a('0x8a')](function(_0x2796d1){_0x33b323[_0x2c5a('0x77')]+=0x1;logger['info'](_0x2c5a('0x13c'),_0x433233,_0x2c5a('0xbe'),_0x33b323[_0x2c5a('0x2c')],_0x2c5a('0xfc'),_0x33b323[_0x2c5a('0x77')]);_0x33af42(_0x2796d1);})[_0x2c5a('0x92')](function(_0x43e444){ut[_0x2c5a('0x101')](_0x2a5705,0xe,_0x2c5a('0x13d'));rpcDb[_0x2c5a('0x103')](_0x2a5705,'[originateFailure][logOriginateFailure]');_0x37fa20(_0x43e444);});});};Preview[_0x2c5a('0x12')]['syncNewExten']=function(_0x1e9356){if(this[_0x2c5a('0x1a')][_0x1e9356['linkedid']]){this[_0x2c5a('0x1a')][_0x1e9356[_0x2c5a('0xb8')]][_0x2c5a('0x13e')]=_0x1e9356[_0x2c5a('0x13e')];}};Preview[_0x2c5a('0x12')][_0x2c5a('0x13f')]=function(_0x1fea7a){var _0x1ec5bb=this;var _0x5bafea=this[_0x2c5a('0x1a')][_0x1fea7a[_0x2c5a('0x140')]];if(_0x5bafea){if(_0x5bafea[_0x2c5a('0x110')]&&this[_0x2c5a('0x1b')][_0x5bafea[_0x2c5a('0x110')]]){ut['logLookAgent'](_0x5bafea,this['agents'][_0x5bafea[_0x2c5a('0x110')]]['name'],this[_0x2c5a('0x1b')][_0x5bafea['lookAgent']]['id']);}var _0xa62d3d=_['clone'](_0x5bafea);_0xa62d3d[_0x2c5a('0xba')]=moment()[_0x2c5a('0x62')](_0x2c5a('0x95'));var _0x56603f=_0x1ec5bb[_0x2c5a('0x17')][_0x5bafea[_0x2c5a('0x76')]];if(ut['isFailure'](_0x1fea7a[_0x2c5a('0x141')])){if(_0x5bafea['unlockAgent']){rpcDb[_0x2c5a('0x11f')](_0x5bafea[_0x2c5a('0x115')]);}if(_0x5bafea[_0x2c5a('0xb7')]){rpcDb[_0x2c5a('0x120')](_0x5bafea[_0x2c5a('0x115')]);}ami[_0x2c5a('0x2a')]('custom:agentringnoanswer',ut['buildObj'](_0x5bafea,_0x2c5a('0x142'),this[_0x2c5a('0x17')][_0x5bafea['queue']]));this['callProgressDetectingAgent'](_0xa62d3d,_0x56603f,_0x1fea7a);}else{_0x5bafea[_0x2c5a('0x94')]=moment()[_0x2c5a('0x62')]('YYYY-MM-DD\x20HH:mm:ss');ut[_0x2c5a('0x101')](_0xa62d3d,0x4,_0x2c5a('0xc7'));rpcDb[_0x2c5a('0x103')](_0xa62d3d,_0x2c5a('0x143'));}}};Preview['prototype'][_0x2c5a('0x1f')]=function(_0x4ee5e5){var _0x19edb6=this;var _0xccc685=this[_0x2c5a('0x1a')][_0x4ee5e5[_0x2c5a('0xb8')]];var _0xfc916;if(_0xccc685){_0xfc916=this[_0x2c5a('0x17')][_0xccc685[_0x2c5a('0x76')]];logger[_0x2c5a('0x60')](_0x2c5a('0x144'),_0x4ee5e5[_0x2c5a('0xb8')],_0x2c5a('0xbe'),_0xfc916[_0x2c5a('0x2c')],_0x2c5a('0xbf'),_0xfc916[_0x2c5a('0x31')]);}if(this[_0x2c5a('0x1a')][_0x4ee5e5[_0x2c5a('0xb8')]]&&_0x4ee5e5['linkedid']!==_0x4ee5e5[_0x2c5a('0xbd')]){if(_0x4ee5e5[_0x2c5a('0x145')]==='16'&&this[_0x2c5a('0x1a')][_0x4ee5e5['linkedid']][_0x2c5a('0x78')]){this[_0x2c5a('0xa6')](_0x4ee5e5,_0x4ee5e5['linkedid'],_0x4ee5e5[_0x2c5a('0x145')]);}else if(this[_0x2c5a('0x1a')][_0x4ee5e5[_0x2c5a('0xb8')]][_0x2c5a('0x78')]){logger[_0x2c5a('0x60')](_0x2c5a('0x146'),_0x4ee5e5[_0x2c5a('0xb8')],_0x4ee5e5[_0x2c5a('0x145')],'\x20Queue',_0xfc916[_0x2c5a('0x2c')],_0x2c5a('0xbf'),_0xfc916[_0x2c5a('0x31')]);this[_0x2c5a('0xa6')](_0x4ee5e5,_0x4ee5e5[_0x2c5a('0xb8')],_0x4ee5e5[_0x2c5a('0x145')]);}}else if(_0xccc685&&_[_0x2c5a('0x73')](_0xccc685['statedesc'])&&_0xfc916[_0x2c5a('0x147')]&&_0x4ee5e5['linkedid']===_0x4ee5e5[_0x2c5a('0xbd')]&&_[_0x2c5a('0x73')](_0x4ee5e5[_0x2c5a('0x100')])&&_0x4ee5e5[_0x2c5a('0x145')]==='16'&&_0x4ee5e5[_0x2c5a('0x148')]==='6'&&_[_0x2c5a('0xff')](_0xccc685[_0x2c5a('0x149')])){if(_0xccc685[_0x2c5a('0xb6')]){rpcDb['unlockContact'](_0xccc685[_0x2c5a('0x115')]);}if(_0xccc685[_0x2c5a('0xb7')]){rpcDb[_0x2c5a('0x120')](_0xccc685[_0x2c5a('0x115')]);}_0x4ee5e5[_0x2c5a('0x100')]='22';this[_0x2c5a('0x14a')](_0xccc685,_0xfc916,_0x4ee5e5);}else if(_0xccc685&&_0xccc685['transfer']){if(_0x4ee5e5[_0x2c5a('0x145')]==='16'&&this['actions'][_0x4ee5e5[_0x2c5a('0xb8')]][_0x2c5a('0x78')]){logger[_0x2c5a('0x60')](_0x2c5a('0x14b'),_0x4ee5e5[_0x2c5a('0xb8')],_0x4ee5e5[_0x2c5a('0x145')],_0x2c5a('0xbe'),_0xfc916[_0x2c5a('0x2c')],'pTalking:\x20',_0xfc916[_0x2c5a('0x31')]);this[_0x2c5a('0xa6')](_0x4ee5e5,_0x4ee5e5[_0x2c5a('0xb8')],_0x4ee5e5['cause']);}else if(this[_0x2c5a('0x1a')][_0x4ee5e5[_0x2c5a('0xb8')]][_0x2c5a('0x78')]){logger['info'](_0x2c5a('0x146'),_0x4ee5e5[_0x2c5a('0xb8')],_0x4ee5e5[_0x2c5a('0x145')],_0x2c5a('0xbe'),_0xfc916[_0x2c5a('0x2c')],_0x2c5a('0xbf'),_0xfc916[_0x2c5a('0x31')]);this['callProgressDetectingCustomer'](_0x4ee5e5,_0x4ee5e5['linkedid'],_0x4ee5e5['cause']);}}};Preview[_0x2c5a('0x12')][_0x2c5a('0x23')]=function(_0xabca51){if(this['actions'][_0xabca51['destlinkedid']]&&_0xabca51[_0x2c5a('0xfd')]!==_0xabca51[_0x2c5a('0x14c')]){this['callProgressDetectingCustomer'](_0xabca51,_0xabca51[_0x2c5a('0xfd')],_0xabca51[_0x2c5a('0xf2')]);}};Preview['prototype'][_0x2c5a('0x21')]=function(_0x24de38){if(this['actions'][_0x24de38['linkedid']]&&_0x24de38['linkedid']!==_0x24de38[_0x2c5a('0xbd')]&&!this[_0x2c5a('0x1a')][_0x24de38['linkedid']][_0x2c5a('0x78')]){if(_0x24de38[_0x2c5a('0x145')]==='1'){this[_0x2c5a('0xa6')](_0x24de38,_0x24de38['linkedid'],_0x24de38[_0x2c5a('0x145')]);}}};Preview[_0x2c5a('0x12')][_0x2c5a('0x14d')]=function(_0x352daa,_0x7f9535,_0x1d4996){if(this['actions'][_0x352daa]){if(_[_0x2c5a('0x73')](this[_0x2c5a('0x1a')][_0x352daa][_0x2c5a('0x14e')])){this[_0x2c5a('0x1a')][_0x352daa][_0x2c5a('0x14e')]={};}this[_0x2c5a('0x1a')][_0x352daa]['variables'][_0x7f9535]=_0x1d4996;}};Preview[_0x2c5a('0x12')][_0x2c5a('0x25')]=function(_0x311c66){try{if(!_['isNil'](_0x311c66)){if(ut['filterKey'](_[_0x2c5a('0x14f')](_0x311c66[_0x2c5a('0x150')])[0x0])){this[_0x2c5a('0x14d')](_0x311c66[_0x2c5a('0xbd')],_['keys'](_0x311c66[_0x2c5a('0x150')])[0x0],_0x311c66[_0x2c5a('0x151')]);}}}catch(_0x299b3f){logger[_0x2c5a('0x152')](_0x2c5a('0x153'),util[_0x2c5a('0x154')](_0x299b3f,{'showHidden':![],'depth':null}));}};Preview[_0x2c5a('0x12')][_0x2c5a('0x27')]=function(_0x1955b9){if(_0x1955b9){if(this[_0x2c5a('0x1a')][_0x1955b9[_0x2c5a('0x155')]]){this[_0x2c5a('0x1a')][_0x1955b9[_0x2c5a('0x155')]][_0x2c5a('0x149')]=!![];}}};Preview[_0x2c5a('0x12')][_0x2c5a('0x29')]=function(_0x5af529){if(_0x5af529){if(this[_0x2c5a('0x1a')][_0x5af529['transfererlinkedid']]){this[_0x2c5a('0x1a')][_0x5af529[_0x2c5a('0x156')]][_0x2c5a('0x149')]=!![];}}};module[_0x2c5a('0x157')]=Preview; \ No newline at end of file diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js index 272105b..1e94fcb 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 _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 +var _0x5a4e=['createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','membername','context','from-sip','exten','xcally-motion-preview','holdtime','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util','bluebird','../../../config/logger','preview','lodash','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueRt','../rpc/agentReportPreview','../rpc/voiceQueueReport','inspect','resolve','createHistory','catch','[createHistory]\x20','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20'];(function(_0x56857c,_0x4868cb){var _0x4027e7=function(_0x1b452f){while(--_0x1b452f){_0x56857c['push'](_0x56857c['shift']());}};_0x4027e7(++_0x4868cb);}(_0x5a4e,0xa3));var _0xe5a4=function(_0x2ee790,_0x5a8661){_0x2ee790=_0x2ee790-0x0;var _0x5a54a5=_0x5a4e[_0x2ee790];return _0x5a54a5;};'use strict';var util=require(_0xe5a4('0x0'));var BPromise=require(_0xe5a4('0x1'));var logger=require(_0xe5a4('0x2'))(_0xe5a4('0x3'));var _=require(_0xe5a4('0x4'));var cmHopper=require(_0xe5a4('0x5'));var cmHopperFinal=require('../rpc/cmHopperFinal');var cmHopperHistory=require(_0xe5a4('0x6'));var cmHopperBlack=require(_0xe5a4('0x7'));var voiceQueueRt=require(_0xe5a4('0x8'));var agentReportPreview=require(_0xe5a4('0x9'));var voiceQueueReport=require(_0xe5a4('0xa'));function loggerCatch(_0x1a04e4){return function(_0x4224bf){logger['error'](_0x1a04e4,util[_0xe5a4('0xb')](_0x4224bf,{'showHidden':![],'depth':null}));};}function create(_0x484d52){return BPromise[_0xe5a4('0xc')]()['then'](cmHopperHistory[_0xe5a4('0xd')](_0x484d52))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0xf')));}function createAgent(_0x3d0a64){return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](agentReportPreview[_0xe5a4('0xd')](_0x3d0a64))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0xf')));}function moveContact(_0x243c1d){return BPromise[_0xe5a4('0xc')]()['then'](cmHopper[_0xe5a4('0x11')](_0x243c1d,!![]))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0x12')));}exports[_0xe5a4('0x13')]=function(_0x473263){return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](cmHopperBlack['checkIsBlackList'](_0x473263))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0x14')));};exports['getContactPreview']=function(_0x545179){return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](cmHopper[_0xe5a4('0x15')](_0x545179))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0x16')));};exports[_0xe5a4('0xd')]=function(_0xb2a222,_0x53f43b){create(_0xb2a222)['catch'](loggerCatch(_0x53f43b));moveContact(_0xb2a222)['catch'](loggerCatch(_0x53f43b));};exports[_0xe5a4('0x17')]=function(_0x58ee78,_0x396da5){createAgent(_0x58ee78)[_0xe5a4('0xe')](loggerCatch(_0x396da5));};exports[_0xe5a4('0x18')]=function(_0x8a1c71,_0x493835){create(_0x8a1c71)[_0xe5a4('0xe')](loggerCatch(_0x493835));};exports[_0xe5a4('0x19')]=function(_0x44f465,_0x463a02){moveContact(_0x44f465)['catch'](loggerCatch(_0x463a02));};exports[_0xe5a4('0x1a')]=function(_0x32ae59,_0x566b3b,_0x1b1ddd){if(_0x566b3b){_0x32ae59[_0xe5a4('0x1b')]=null;}if(_0x1b1ddd){_0x32ae59[_0xe5a4('0x1c')]=![];}return BPromise[_0xe5a4('0xc')]()['then'](cmHopper[_0xe5a4('0x1a')](_0x32ae59))[_0xe5a4('0xe')](loggerCatch('[rescheduleContact]\x20'));};exports[_0xe5a4('0x1d')]=function(_0x4e5a7e){return BPromise['resolve']()['then'](cmHopper[_0xe5a4('0x1d')](_0x4e5a7e))['catch'](loggerCatch(_0xe5a4('0x1e')));};exports[_0xe5a4('0x1f')]=function(_0x48387b){return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](cmHopper[_0xe5a4('0x1f')]({'UserId':null},_0x48387b,0x1))['catch'](loggerCatch(_0xe5a4('0x20')));};exports[_0xe5a4('0x21')]=function(_0x1b80d8){return BPromise[_0xe5a4('0xc')]()['then'](cmHopper['unlockContact']({'active':![]},_0x1b80d8,0x1))['catch'](loggerCatch(_0xe5a4('0x22')));};exports[_0xe5a4('0x23')]=function(_0x42cc9b){var _0xad305c={};_0xad305c[_0xe5a4('0x24')]=_0x42cc9b[_0xe5a4('0x24')];_0xad305c[_0xe5a4('0x25')]=_0x42cc9b[_0xe5a4('0x25')];_0xad305c[_0xe5a4('0x26')]=_0x42cc9b['calleridnum'];_0xad305c[_0xe5a4('0x27')]=_0x42cc9b[_0xe5a4('0x27')];_0xad305c[_0xe5a4('0x28')]=_0x42cc9b[_0xe5a4('0x28')];_0xad305c['queuecallerjoinAt']=_0x42cc9b[_0xe5a4('0x29')];_0xad305c[_0xe5a4('0x2a')]=_0x42cc9b['answertime'];_0xad305c[_0xe5a4('0x2b')]=0x1;_0xad305c[_0xe5a4('0x2c')]=_0x42cc9b[_0xe5a4('0x2d')];_0xad305c[_0xe5a4('0x2e')]=_0x42cc9b[_0xe5a4('0x2f')];_0xad305c[_0xe5a4('0x30')]=_0xe5a4('0x31');_0xad305c[_0xe5a4('0x32')]=_0xe5a4('0x33');_0xad305c[_0xe5a4('0x34')]=0x0;_0xad305c[_0xe5a4('0x35')]=0x1;_0xad305c[_0xe5a4('0x36')]=_0x42cc9b['membername'];_0xad305c[_0xe5a4('0x37')]=_0xe5a4('0x38');return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](voiceQueueReport['create'](_0xad305c))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0x39')));};exports[_0xe5a4('0x3a')]=function(_0x1b5ded,_0x1059c6){return BPromise[_0xe5a4('0xc')]()[_0xe5a4('0x10')](cmHopper[_0xe5a4('0x3a')](_0x1b5ded,_0x1059c6))['catch'](loggerCatch(_0xe5a4('0x3b')));};exports[_0xe5a4('0x3c')]=function(_0x13fb09){return BPromise[_0xe5a4('0xc')]()['then'](cmHopper[_0xe5a4('0x1a')](_0x13fb09,!![],!![]))[_0xe5a4('0xe')](loggerCatch(_0xe5a4('0x3d')));}; \ 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 95a1451..f6ac3d7 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 _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 +var _0x246a=['rtpaudioqoslossbridged','rtpaudioqosrttbridged','rtpaudioqosrtt','bridgepeer','getCallerIdRandom','pow','replace','match','extractCalleridNumber','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','127.0.0.1','milliseconds','diff','loggerCatch','error','inspect','logger','info','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialOriginateTimeout','dialPreviewUrl','dialQueueProject','NONE','dialQueueProject2','\x22agi://%s/square,%s\x22','originatecalleridnum','originatecalleridname','xcally-motion-preview','monitor_format','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','Contact','hasOwnProperty','createdAt','%s%s','XMD-','toUpper','toLowerVariables','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','Blacklist','starttime','responsetime','logAgent','ringtime','logLookAgent','UserId','logCustomer','statedesc','endtime','talktime','isFailure','Failure','variablesAction','RECALL','BOOKED','uniqueid','originate','from-sip','timeout','countbusyretry','countcongestionretry','countnosuchnumberretry','cloneAction','clone','state','Global','scheduledAt','active','add','minutes','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','buildObj','lastevent','queue','interface','channelAgent','buildAcw','agentReadyId','status','push','getDiff','seconds','createBody','CampaignId','filterKey','idContact','type','dialAnswer','membername','scheduledat','countglobal','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-phone','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-cdrtype','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss'];(function(_0x11f551,_0x2b99dc){var _0x59aa14=function(_0x4a06e0){while(--_0x4a06e0){_0x11f551['push'](_0x11f551['shift']());}};_0x59aa14(++_0x2b99dc);}(_0x246a,0x11f));var _0xa246=function(_0x2eb3a2,_0x295114){_0x2eb3a2=_0x2eb3a2-0x0;var _0x50cbdd=_0x246a[_0x2eb3a2];return _0x50cbdd;};'use strict';var util=require('util');var _=require(_0xa246('0x0'));var moment=require(_0xa246('0x1'));var logger=require(_0xa246('0x2'))(_0xa246('0x3'));var ipAgi=process[_0xa246('0x4')][_0xa246('0x5')]||_0xa246('0x6');function getSeconds(_0x2d53e0,_0x832828){var _0x26cd64=moment(_0x2d53e0)[_0xa246('0x7')](0x0);var _0x2d35e5=moment(_0x832828)[_0xa246('0x7')](0x0);return _0x26cd64[_0xa246('0x8')](_0x2d35e5,'seconds');}exports[_0xa246('0x9')]=function(_0x999ba){return function(_0x163b3a){logger[_0xa246('0xa')](_0x999ba,util[_0xa246('0xb')](_0x163b3a,{'showHidden':![],'depth':null}));};};exports[_0xa246('0xc')]=function(_0x4d19cd,_0x2bbcd7){logger[_0xa246('0xd')](_0x4d19cd,util[_0xa246('0xb')](_0x2bbcd7,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0x5547cb,_0x145f6e){logger['error'](_0x5547cb,util[_0xa246('0xb')](_0x145f6e,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x5b496e){return function(_0x526a51){logger[_0xa246('0xd')](_0x5b496e,util[_0xa246('0xb')](_0x526a51,{'showHidden':![],'depth':null}));};};exports['message']=function(_0x3be5f4,_0x285c57,_0x52efc3){return{'message':_0x3be5f4,'unlock':_0x285c57,'active':_0x52efc3};};exports[_0xa246('0xe')]=function(_0x38c8e8,_0x4b56fe,_0x4415ce){if(!_[_0xa246('0xf')](_0x4415ce)&&_0xa246('0x10')===typeof _0x4415ce&&!_[_0xa246('0x11')](_0x4415ce)){if(!_[_0xa246('0xf')](_0x4b56fe)&&_0xa246('0x10')===typeof _0x4b56fe&&!_['isEmpty'](_0x4b56fe)){return util[_0xa246('0x12')](_0xa246('0x13'),_0x4b56fe,_0x4415ce);}return util[_0xa246('0x12')]('\x22%s\x22\x20<%s>',_0x4415ce,_0x4415ce);}if(!_['isUndefined'](_0x38c8e8)&&_0xa246('0x10')===typeof _0x38c8e8&&!_[_0xa246('0x11')](_0x38c8e8)){return _0x38c8e8;}return _0xa246('0x14');};exports[_0xa246('0x15')]=function(_0x5d67c5){if(_[_0xa246('0x16')](_0x5d67c5)){return![];}return _0x5d67c5;};exports[_0xa246('0x17')]=function(_0x1afdac,_0x5433ee,_0x366458,_0x3b5d57,_0x238d5e,_0x5d57b8){var _0x5a1948={'XMD-QUEUE':_0x5433ee[_0xa246('0x18')]?_0x5433ee[_0xa246('0x18')][_0xa246('0x19')]:'','XMD-CALLERID':_0x3b5d57,'XMD-CALLERID-PREVIEW':_0x5d57b8?util['format'](_0xa246('0x13'),_0x5d57b8[_0xa246('0x1a')],_0x5d57b8[_0xa246('0x1b')]):_0x3b5d57,'XMD-DIALID':_0x238d5e,'XMD-CONTACTID':_0x5433ee[_0xa246('0x1c')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x3b5d57,'XMD-VOICEQUEUEID':_0x5433ee['VoiceQueueId'],'XMD-DIALCHANNEL':_0x366458,'XMD-DIALTIMEOUT':_0x1afdac[_0xa246('0x1d')]||0x1e,'XMD-DIALOPTIONS':util[_0xa246('0x12')]('\x22rtTxX%s%s\x22',_0x1afdac['dialQueueProject2']?'g':'',_[_0xa246('0x11')](_0x1afdac['monitor_format'])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x1afdac[_0xa246('0x1e')]||'','XMD-AGI':_0x1afdac[_0xa246('0x1f')]?util[_0xa246('0x12')]('\x22agi://%s/square,%s\x22',ipAgi,_0x1afdac[_0xa246('0x1f')]):_0xa246('0x20'),'XMD-AGIAFTER':_0x1afdac[_0xa246('0x21')]?util[_0xa246('0x12')](_0xa246('0x22'),ipAgi,_0x1afdac[_0xa246('0x21')]):_0xa246('0x20'),'XMD-ORIGINATECALLERIDNUM':_0x5d57b8?_0x5d57b8[_0xa246('0x23')]:'','XMD-ORIGINATECALLERIDNAME':_0x5d57b8?_0x5d57b8[_0xa246('0x24')]:'','XMD-DESTINATION':_0xa246('0x25')};if(!_['isEmpty'](_0x1afdac[_0xa246('0x26')])){_0x5a1948[util[_0xa246('0x12')]('%s',_0xa246('0x27'))]=_0x1afdac['monitor_format'];_0x5a1948[util['format']('%s',_0xa246('0x28'))]=_0x238d5e;}if(_0x5433ee&&_0x5433ee[_0xa246('0x29')]){for(var _0x2cb239 in _0x5433ee['Contact']){if(_0x5433ee[_0xa246('0x29')][_0xa246('0x2a')](_0x2cb239)){if(!_[_0xa246('0x16')](_0x5433ee['Contact'][_0x2cb239])&&_0x2cb239!=='id'&&_0x2cb239!=='tags'&&_0x2cb239!==_0xa246('0x2b')&&_0x2cb239!=='updatedAt'){_0x5a1948[util[_0xa246('0x12')](_0xa246('0x2c'),_0xa246('0x2d'),_[_0xa246('0x2e')](_0x2cb239))]=_0x5433ee['Contact'][_0x2cb239];}}}}return _0x5a1948;};exports[_0xa246('0x2f')]=function(_0x185dfe){var _0x2fb1a8={};for(var _0x4dba20 in _0x185dfe){if(_0x185dfe[_0xa246('0x2a')](_0x4dba20)){_0x2fb1a8[util['format']('%s',_[_0xa246('0x30')](_0x4dba20))]=_0x185dfe[_0x4dba20];}}return{'variables':_0x2fb1a8};};exports[_0xa246('0x31')]=function(_0x580897,_0x6f48ea){if(!_[_0xa246('0x16')](_0x580897)){if(_0x580897['hasOwnProperty'](_0xa246('0x32'))){if(_0x580897['originated']>0x0){_0x580897['originated']-=0x1;}else{logger[_0xa246('0xa')](_0xa246('0x33'),_0x6f48ea);}}}else{logger[_0xa246('0xa')]('[updateOriginated]\x20is\x20null\x20or\x20undefined',_0x6f48ea);}};exports[_0xa246('0x34')]=function(_0x1445e1){var _0x1870ad=moment()[_0xa246('0x12')](_0xa246('0x35'));_0x1445e1['state']=0xd;_0x1445e1['statedesc']=_0xa246('0x36');_0x1445e1[_0xa246('0x37')]=_0x1870ad;_0x1445e1[_0xa246('0x38')]=_0x1870ad;_0x1445e1['endtime']=_0x1870ad;};exports[_0xa246('0x39')]=function(_0x267434,_0x300f4a,_0x28ad09){var _0x3fb2b6=moment()[_0xa246('0x12')](_0xa246('0x35'));_0x267434['state']=_0x300f4a;_0x267434['statedesc']=_0x28ad09;_0x267434[_0xa246('0x38')]=_0x3fb2b6;_0x267434[_0xa246('0x3a')]=getSeconds(_0x267434['responsetime'],_0x267434[_0xa246('0x37')]);};exports[_0xa246('0x3b')]=function(_0x1f2bc5,_0x116648,_0x398940){_0x1f2bc5['membername']=_0x116648;_0x1f2bc5[_0xa246('0x3c')]=_0x398940;};exports[_0xa246('0x3d')]=function(_0x53a573,_0x51fb2a,_0x5b6a11){var _0x46ac2b=moment()[_0xa246('0x12')](_0xa246('0x35'));_0x53a573['state']=_0x51fb2a;_0x53a573[_0xa246('0x3e')]=_0x5b6a11;_0x53a573[_0xa246('0x38')]=_0x53a573[_0xa246('0x38')]?_0x53a573[_0xa246('0x38')]:_0x46ac2b;_0x53a573[_0xa246('0x3f')]=_0x53a573['endtime']?_0x53a573[_0xa246('0x3f')]:_0x46ac2b;_0x53a573[_0xa246('0x3a')]=getSeconds(_0x53a573[_0xa246('0x38')]||0x0,_0x53a573[_0xa246('0x37')]||0x0);_0x53a573[_0xa246('0x40')]=_0x53a573['answertime']?getSeconds(_0x53a573['endtime'],_0x53a573['answertime']):0x0;};exports[_0xa246('0x41')]=function(_0x4b73ea){return _0x4b73ea===_0xa246('0x42');};exports[_0xa246('0x43')]=function(_0x6b7ef1,_0x53f377,_0x24a5e5,_0x30b7e5,_0x1f2c12){var _0x2dc191=_0x30b7e5?_0xa246('0x44'):_0x6b7ef1[_0xa246('0x1a')];_0x2dc191=_0x1f2c12?_0xa246('0x45'):_0x2dc191;return{'actionid':_0x6b7ef1[_0xa246('0x46')],'action':_0xa246('0x47'),'channel':_0x6b7ef1['channelAgent'],'callerid':util[_0xa246('0x12')]('\x22%s\x22\x20<%s>',_0x2dc191,_0x6b7ef1[_0xa246('0x1b')]),'Exten':_0xa246('0x25'),'Context':_0xa246('0x48'),'Priority':'1','variable':_0x24a5e5,'timeout':(_0x53f377[_0xa246('0x49')]||0x1e)*0x3e8,'async':!![],'channelid':_0x6b7ef1[_0xa246('0x46')]};};exports['totalGlobal']=function(_0x3ab421){return _0x3ab421[_0xa246('0x4a')]+_0x3ab421[_0xa246('0x4b')]+_0x3ab421['countnoanswerretry']+_0x3ab421['countagentrejectretry']+_0x3ab421[_0xa246('0x4c')];};exports[_0xa246('0x4d')]=function(_0x1a029d){var _0x4aacba=_[_0xa246('0x4e')](_0x1a029d);_0x4aacba[_0xa246('0x4f')]=0xf;_0x4aacba[_0xa246('0x3e')]=_0xa246('0x50');return _0x4aacba;};exports[_0xa246('0x51')]=function(_0x1ac571,_0x2f0340,_0x1cd9bb){var _0x2d6051={};_0x2d6051[_0x2f0340]=_0x1ac571[_0x2f0340];_0x2d6051[_0xa246('0x52')]=![];_0x2d6051['scheduledat']=moment()[_0xa246('0x53')](_0x1cd9bb,_0xa246('0x54'))[_0xa246('0x12')](_0xa246('0x35'));_0x2d6051['ContactId']=_0x1ac571['ContactId'];_0x2d6051[_0xa246('0x55')]=_0x1ac571[_0xa246('0x55')];_0x2d6051[_0xa246('0x56')]=_0x1ac571[_0xa246('0x56')]||undefined;return _0x2d6051;};exports[_0xa246('0x57')]=function(_0x1a6b59,_0x2171e0){if(!_[_0xa246('0x16')](_0x1a6b59)){if(_0x1a6b59[_0xa246('0x58')]>0x0){_0x1a6b59['pTalking']-=0x1;}else{logger[_0xa246('0xa')](_0x2171e0,_0xa246('0x59'));}}else{logger[_0xa246('0xa')](_0x2171e0,_0xa246('0x5a'));}};exports[_0xa246('0x5b')]=function(_0x5c94b0){if(_0x5c94b0<=0x0){return!![];}return![];};exports[_0xa246('0x5c')]=function(_0x2c1747,_0x5b4baf,_0x1aec41){_0x2c1747[_0xa246('0x5d')]=_0x5b4baf;_0x2c1747[_0xa246('0x19')]=_0x2c1747[_0xa246('0x5e')];_0x2c1747[_0xa246('0x5f')]=_0x2c1747[_0xa246('0x60')];if(_0x1aec41){_0x2c1747['mandatoryDisposition']=_0x1aec41['mandatoryDisposition'];}return _0x2c1747;};exports[_0xa246('0x61')]=function(_0x287226){var _0x217890={};_0x217890[_0xa246('0x5e')]=_0x287226['queue'];_0x217890['interface']=_0x287226[_0xa246('0x60')];_0x217890[_0xa246('0x46')]=_0x287226[_0xa246('0x46')];return _0x217890;};exports[_0xa246('0x62')]=function(_0x20cec6){var _0x5bb56d=[];for(var _0x2f1b3e in _0x20cec6){if(_0x20cec6[_0xa246('0x2a')](_0x2f1b3e)){if(!_['isNil'](_0x20cec6[_0x2f1b3e])&&_0x20cec6[_0x2f1b3e][_0xa246('0x4f')]==='not_inuse'&&_0x20cec6[_0x2f1b3e][_0xa246('0x63')]==='reachable'){_0x5bb56d[_0xa246('0x64')](_0x20cec6[_0x2f1b3e]['id']);}}}return _0x5bb56d;};exports[_0xa246('0x65')]=function(_0x45b244){var _0xcac44c=moment()[_0xa246('0x7')](0x0);var _0x32c91a=moment(_0x45b244)[_0xa246('0x7')](0x0);return _0xcac44c[_0xa246('0x8')](_0x32c91a,_0xa246('0x66'));};exports[_0xa246('0x67')]=function(_0x5e114f){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x5e114f[_0xa246('0x1c')],'ListId':_0x5e114f[_0xa246('0x55')],'VoiceQueueId':_0x5e114f[_0xa246('0x56')]||undefined,'CampaignId':_0x5e114f[_0xa246('0x68')]||undefined};};exports[_0xa246('0x69')]=function(_0x393296){if(_0x393296==='uniqueid'||_0x393296===_0xa246('0x6a')||_0x393296===_0xa246('0x5e')||_0x393296===_0xa246('0x6b')||_0x393296==='campaigntype'||_0x393296===_0xa246('0x6c')||_0x393296===_0xa246('0x6d')||_0x393296===_0xa246('0x60')||_0x393296==='calleridname'||_0x393296===_0xa246('0x52')||_0x393296===_0xa246('0x1b')||_0x393296===_0xa246('0x6e')||_0x393296===_0xa246('0x4a')||_0x393296===_0xa246('0x4b')||_0x393296==='countnoanswerretry'||_0x393296===_0xa246('0x6f')||_0x393296===_0xa246('0x70')||_0x393296===_0xa246('0x71')||_0x393296===_0xa246('0x72')||_0x393296===_0xa246('0x73')||_0x393296===_0xa246('0x1c')||_0x393296==='ListId'||_0x393296==='UserId'||_0x393296===_0xa246('0x56')||_0x393296===_0xa246('0x74')||_0x393296===_0xa246('0x75')||_0x393296==='xmd-queue'||_0x393296===_0xa246('0x76')||_0x393296==='xmd-listid'||_0x393296===_0xa246('0x77')||_0x393296===_0xa246('0x78')||_0x393296===_0xa246('0x79')||_0x393296==='xmd-dialid'||_0x393296==='xmd-dialchannel'||_0x393296==='xmd-contactid'||_0x393296===_0xa246('0x7a')||_0x393296==='xmd-callerid'||_0x393296===_0xa246('0x7b')||_0x393296===_0xa246('0x7c')||_0x393296===_0xa246('0x7d')||_0x393296===_0xa246('0x7e')||_0x393296===_0xa246('0x7f')||_0x393296===_0xa246('0x80')||_0x393296===_0xa246('0x81')||_0x393296===_0xa246('0x82')||_0x393296==='rtpaudioqosrtt'||_0x393296===_0xa246('0x83')||_0x393296===_0xa246('0x7d')||_0x393296===_0xa246('0x7e')||_0x393296===_0xa246('0x7f')||_0x393296==='rtpaudioqosjitterbridged'||_0x393296===_0xa246('0x81')||_0x393296===_0xa246('0x82')||_0x393296===_0xa246('0x84')||_0x393296===_0xa246('0x83')||_0x393296===_0xa246('0x85')||_0x393296==='bridgepvtcallid'||_0x393296===_0xa246('0x4f')||_0x393296===_0xa246('0x3e')){return![];}return!![];};exports[_0xa246('0x86')]=function(_0x27208f,_0x5d3dad){var _0x3f61b2,_0x26d65f,_0x5b0efe;if(_0x5d3dad<=0x0){_0x5d3dad=0x1;}_0x3f61b2=new RegExp('\x5cw{0,'+_0x5d3dad+'}$');_0x26d65f=Math['pow'](0xa,_0x5d3dad-0x1);_0x5b0efe=Math[_0xa246('0x87')](0xa,_0x5d3dad)-0x1;return util[_0xa246('0x12')]('%s',_[_0xa246('0x88')](_0x27208f,_0x3f61b2,_['random'](_0x26d65f,_0x5b0efe)));};exports['extractCalleridName']=function(_0x3bd2c0){var _0x509fdb=_0x3bd2c0[_0xa246('0x89')](/"(.*?)"/);return _0x509fdb?_0x509fdb[0x1]:_0x3bd2c0;};exports[_0xa246('0x8a')]=function(_0x4a4ae2){var _0x30e6b9=_0x4a4ae2[_0xa246('0x89')](/<(.*?)>/);return _0x30e6b9?_0x30e6b9[0x1]:_0x4a4ae2;}; \ No newline at end of file diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js index b75526d..cb1cbb4 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 _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 +var _0xe814=['string','number','boolean','queueremove','voicequeuechannel','voicequeuechannelredirect','queueadd'];(function(_0x469dd1,_0xdde953){var _0x55fbad=function(_0x534542){while(--_0x534542){_0x469dd1['push'](_0x469dd1['shift']());}};_0x55fbad(++_0xdde953);}(_0xe814,0x15d));var _0x4e81=function(_0x3ea23c,_0x2f9012){_0x3ea23c=_0x3ea23c-0x0;var _0x5cd573=_0xe814[_0x3ea23c];return _0x5cd573;};'use strict';exports[_0x4e81('0x0')]={'queue':{'type':'string','required':!![]},'interface':{'type':_0x4e81('0x1'),'required':!![]},'membername':{'type':'string','required':!![]},'penalty':{'type':_0x4e81('0x2'),'required':![]},'paused':{'type':_0x4e81('0x3'),'required':![]}};exports[_0x4e81('0x4')]={'queue':{'type':_0x4e81('0x1'),'required':!![]},'interface':{'type':_0x4e81('0x1'),'required':!![]}};exports['queuepause']={'interface':{'type':_0x4e81('0x1'),'required':!![]},'paused':{'type':_0x4e81('0x3')},'reason':{'type':_0x4e81('0x1'),'required':![]}};exports['reload']={'module':{'type':_0x4e81('0x1'),'required':![]}};exports[_0x4e81('0x5')]={'uniqueid':{'type':_0x4e81('0x1'),'required':!![]}};exports['voicechannel']={'uniqueid':{'type':'string','required':!![]},'filename':{'type':_0x4e81('0x1')},'format':{'type':_0x4e81('0x1')},'mixmonitorid':{'type':_0x4e81('0x1')}};exports['voicequeuechannelhangup']={'uniqueid':{'type':_0x4e81('0x1'),'required':!![]}};exports[_0x4e81('0x6')]={'uniqueid':{'type':_0x4e81('0x1'),'required':!![]},'exten':{'type':_0x4e81('0x1'),'required':!![]},'context':{'type':_0x4e81('0x1')}}; \ No newline at end of file diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js index 5ecb913..733c29e 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 _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 +var _0x63e5=['SIP/%s','name','isNil','interface','total','answered','sumHoldTime','sumDuration','sumBillable','isEmpty','ivrTotalCallsDays','ivrAnswerCallsDay','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','initAgents','length','initTelephones','isUndefined','mergeFromDatabase','initVoiceQueues','triggers','templates','initZendeskAccounts','zendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','deskAccounts','initVtigerAccounts','initServicenowAccounts','initDynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','groupBy','uniqueid','queue','queuecallerexit','unmanaged','queuecallerabandon','queuecallerleaveAt','diff','queuecallerjoinAt','queuecallercompleteAt','queuecallerabandonAt','queuecallerexitAt','seconds','queuecallercomplete','initVoiceCallReports','outbound','duration','disposition','ANSWERED','billableseconds','initCampaigns','dialQueueProject','initVoiceExtensions','initCampaignHopperHistory','initFaxAccounts','exports','bluebird','util','../model/agent','../model/telephone','../model/voiceQueue','../model/template','../model/campaign','../model/voiceExtension','../model/zendeskAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','agents','telephones','trunks','voiceQueues','campaigns','voiceExtensions','channels','queueChannels','outboundChannels','timers','settings','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','faxAccounts','hasOwnProperty','mapKeys','format'];(function(_0xc6be3a,_0x540e05){var _0x56a310=function(_0x50a144){while(--_0x50a144){_0xc6be3a['push'](_0xc6be3a['shift']());}};_0x56a310(++_0x540e05);}(_0x63e5,0x128));var _0x563e=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x63e5[_0x2aec52];return _0x3b8835;};'use strict';var BPromise=require(_0x563e('0x0'));var util=require(_0x563e('0x1'));var _=require('lodash');var moment=require('moment');var Agent=require(_0x563e('0x2'));var Telephone=require(_0x563e('0x3'));var Trunk=require('../model/trunk');var VoiceQueue=require(_0x563e('0x4'));var Trigger=require('../model/trigger');var Template=require(_0x563e('0x5'));var Campaign=require(_0x563e('0x6'));var VoiceExtension=require(_0x563e('0x7'));var ZendeskAccount=require(_0x563e('0x8'));var SalesforceAccount=require('../model/salesforceAccount');var FreshdeskAccount=require(_0x563e('0x9'));var SugarcrmAccount=require(_0x563e('0xa'));var ZohoAccount=require(_0x563e('0xb'));var DeskAccount=require(_0x563e('0xc'));var VtigerAccount=require(_0x563e('0xd'));var ServicenowAccount=require(_0x563e('0xe'));var Dynamics365Account=require(_0x563e('0xf'));var FreshsalesAccount=require(_0x563e('0x10'));var FaxAccount=require('../model/faxAccount');var Realtime=function(){this[_0x563e('0x11')]={};this[_0x563e('0x12')]={};this[_0x563e('0x13')]={};this[_0x563e('0x14')]={};this['triggers']={};this[_0x563e('0x15')]={};this['templates']={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0x563e('0x16')]={};this[_0x563e('0x17')]={};this[_0x563e('0x18')]={};this[_0x563e('0x19')]={};this[_0x563e('0x1a')]={};this[_0x563e('0x1b')]={};this['zendeskAccounts']={};this[_0x563e('0x1c')]={};this[_0x563e('0x1d')]={};this[_0x563e('0x1e')]={};this[_0x563e('0x1f')]={};this['deskAccounts']={};this[_0x563e('0x20')]={};this[_0x563e('0x21')]={};this[_0x563e('0x22')]={};this[_0x563e('0x23')]={};this[_0x563e('0x24')]={};};function freeIsNotKey(_0xcc517c,_0x93a0ab,_0x2d03c2){var _0x1b9f13=_['mapKeys'](_0xcc517c,function(_0x58dcea,_0x394aab){return _0x58dcea[_0x2d03c2];});for(var _0x343823 in _0x93a0ab){if(_0x93a0ab[_0x563e('0x25')](_0x343823)){if(!_0x1b9f13[_0x343823]){delete _0x93a0ab[_0x343823];}}}}function freeIsNotKeySip(_0x255d7e,_0x2e3695){var _0x4ad347=_[_0x563e('0x26')](_0x255d7e,function(_0x359925,_0x18ec7f){return util[_0x563e('0x27')](_0x563e('0x28'),_0x359925[_0x563e('0x29')]);});for(var _0x4f2b8b in _0x2e3695){if(_0x2e3695['hasOwnProperty'](_0x4f2b8b)){if(!_0x4ad347[_0x4f2b8b]){delete _0x2e3695[_0x4f2b8b];}}}}function freeIsNotKeyAgent(_0xe926c4,_0x7124){var _0x1976e4=_['mapKeys'](_0xe926c4,function(_0x346bb8,_0x43acc9){var _0x26ab78=_[_0x563e('0x2a')](_0x346bb8['interface'])?util['format'](_0x563e('0x28'),_0x346bb8[_0x563e('0x29')]):_0x346bb8[_0x563e('0x2b')];return _0x26ab78;});for(var _0x2cc282 in _0x7124){if(_0x7124[_0x563e('0x25')](_0x2cc282)){if(!_0x1976e4[_0x2cc282]){delete _0x7124[_0x2cc282];}}}}function clearVoiceCallReports(_0x52ba40){_0x52ba40[_0x563e('0x2c')]=0x0;_0x52ba40[_0x563e('0x2d')]=0x0;_0x52ba40[_0x563e('0x2e')]=0x0;_0x52ba40[_0x563e('0x2f')]=0x0;_0x52ba40[_0x563e('0x30')]=0x0;}function clearCampaigns(_0x23e7d4){if(!_[_0x563e('0x31')](_0x23e7d4)){for(var _0x30d735 in _0x23e7d4){if(_0x23e7d4[_0x563e('0x25')](_0x30d735)){_0x23e7d4[_0x30d735][_0x563e('0x32')]=0x0;_0x23e7d4[_0x30d735][_0x563e('0x33')]=0x0;}}}}function clearVoiceQueues(_0x4bec67){if(!_[_0x563e('0x31')](_0x4bec67)){for(var _0xc1f9f1 in _0x4bec67){if(_0x4bec67['hasOwnProperty'](_0xc1f9f1)){_0x4bec67[_0xc1f9f1][_0x563e('0x2c')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x2d')]=0x0;_0x4bec67[_0xc1f9f1]['unmanaged']=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x34')]=0x0;_0x4bec67[_0xc1f9f1]['sumHoldTime']=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x2f')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x30')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x35')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x36')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x37')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x38')]=0x0;_0x4bec67[_0xc1f9f1]['outboundNoSuchCallsDay']=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x39')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3a')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3b')]=0x0;_0x4bec67[_0xc1f9f1]['outboundBlacklistCallsDay']=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3c')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3d')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3e')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x35')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x3f')]=0x0;_0x4bec67[_0xc1f9f1][_0x563e('0x40')]=!![];}}}}Realtime[_0x563e('0x41')]['mergeFromDatabase']=function(_0x4304fb,_0x79ba80){for(var _0x46f7d6 in _0x79ba80){if(_0x4304fb['hasOwnProperty'](_0x46f7d6)){_0x4304fb[_0x46f7d6]=_0x79ba80[_0x46f7d6];}}};Realtime[_0x563e('0x41')][_0x563e('0x42')]=function(){var _0x1f70d8=this;return function(_0x2a141f){if(_0x2a141f){freeIsNotKeyAgent(_0x2a141f,_0x1f70d8[_0x563e('0x11')]);for(var _0x485392=0x0,_0x4bc619={},_0x34876e={};_0x485392<_0x2a141f[_0x563e('0x43')];_0x485392+=0x1){_0x4bc619=_0x2a141f[_0x485392];var _0x11eb21=_['isNil'](_0x4bc619[_0x563e('0x2b')])?util['format'](_0x563e('0x28'),_0x4bc619['name']):_0x4bc619[_0x563e('0x2b')];if(_['isUndefined'](_0x1f70d8[_0x563e('0x11')][_0x11eb21])){_0x1f70d8[_0x563e('0x11')][_0x11eb21]=new Agent(_0x4bc619);}else{_0x1f70d8['mergeFromDatabase'](_0x1f70d8[_0x563e('0x11')][_0x11eb21],_0x4bc619);}}}return _0x1f70d8['agents'];};};Realtime['prototype'][_0x563e('0x44')]=function(){var _0x11618f=this;return function(_0x280fe5){if(_0x280fe5){freeIsNotKeySip(_0x280fe5,_0x11618f['telephones']);for(var _0x8b475d=0x0,_0x59348f={},_0x521e59={};_0x8b475d<_0x280fe5[_0x563e('0x43')];_0x8b475d+=0x1){_0x59348f=_0x280fe5[_0x8b475d];if(_[_0x563e('0x45')](_0x11618f[_0x563e('0x12')][util['format'](_0x563e('0x28'),_0x59348f[_0x563e('0x29')])])){_0x11618f['telephones'][util[_0x563e('0x27')](_0x563e('0x28'),_0x59348f[_0x563e('0x29')])]=new Telephone(_0x59348f);}else{_0x11618f[_0x563e('0x46')](_0x11618f[_0x563e('0x12')][util['format'](_0x563e('0x28'),_0x59348f[_0x563e('0x29')])],_0x59348f);}}}return _0x11618f[_0x563e('0x12')];};};Realtime['prototype']['initTrunks']=function(){var _0x4254b2=this;return function(_0xeff993){if(_0xeff993){freeIsNotKeySip(_0xeff993,_0x4254b2[_0x563e('0x13')]);for(var _0x4eb79e=0x0,_0x2625e6={},_0x337cb3={};_0x4eb79e<_0xeff993[_0x563e('0x43')];_0x4eb79e+=0x1){_0x2625e6=_0xeff993[_0x4eb79e];if(_['isUndefined'](_0x4254b2['trunks'][util[_0x563e('0x27')](_0x563e('0x28'),_0x2625e6['name'])])){_0x4254b2[_0x563e('0x13')][util[_0x563e('0x27')]('SIP/%s',_0x2625e6[_0x563e('0x29')])]=new Trunk(_0x2625e6);}else{_0x4254b2['mergeFromDatabase'](_0x4254b2[_0x563e('0x13')][util[_0x563e('0x27')](_0x563e('0x28'),_0x2625e6[_0x563e('0x29')])],_0x2625e6);}}}return _0x4254b2[_0x563e('0x13')];};};Realtime[_0x563e('0x41')][_0x563e('0x47')]=function(){var _0x29b864=this;return function(_0x4edd03){if(_0x4edd03){freeIsNotKey(_0x4edd03,_0x29b864[_0x563e('0x14')],_0x563e('0x29'));for(var _0x1fb68e=0x0,_0x3d5cd6={},_0x1a4254={};_0x1fb68e<_0x4edd03['length'];_0x1fb68e+=0x1){_0x3d5cd6=_0x4edd03[_0x1fb68e];if(_[_0x563e('0x45')](_0x29b864[_0x563e('0x14')][_0x3d5cd6['name']])){_0x29b864[_0x563e('0x14')][_0x3d5cd6[_0x563e('0x29')]]=new VoiceQueue(_0x3d5cd6);}else{_0x29b864[_0x563e('0x46')](_0x29b864[_0x563e('0x14')][_0x3d5cd6[_0x563e('0x29')]],_0x3d5cd6);}}}return _0x29b864['voiceQueues'];};};Realtime[_0x563e('0x41')]['initTriggers']=function(){var _0x40964f=this;return function(_0x4cb1e0){if(_0x4cb1e0){freeIsNotKey(_0x4cb1e0,_0x40964f['triggers'],'id');for(var _0x42ce80=0x0,_0xf62ec3={},_0x1a7833={};_0x42ce80<_0x4cb1e0[_0x563e('0x43')];_0x42ce80+=0x1){_0xf62ec3=_0x4cb1e0[_0x42ce80];if(_[_0x563e('0x45')](_0x40964f[_0x563e('0x48')][_0xf62ec3['id']])){_0x40964f['triggers'][_0xf62ec3['id']]=new Trigger(_0xf62ec3);}else{_0x40964f[_0x563e('0x46')](_0x40964f[_0x563e('0x48')][_0xf62ec3['id']],_0xf62ec3);}}}return _0x40964f[_0x563e('0x48')];};};Realtime['prototype']['initTemplates']=function(){var _0x4f823a=this;return function(_0x4e2ee8){if(_0x4e2ee8){freeIsNotKey(_0x4e2ee8,_0x4f823a[_0x563e('0x49')],'id');for(var _0x585ff8=0x0,_0x34901f={},_0x4ffd3d={};_0x585ff8<_0x4e2ee8['length'];_0x585ff8+=0x1){_0x34901f=_0x4e2ee8[_0x585ff8];if(_['isUndefined'](_0x4f823a[_0x563e('0x49')][_0x34901f['id']])){_0x4f823a[_0x563e('0x49')][_0x34901f['id']]=new Template(_0x34901f);}else{_0x4f823a[_0x563e('0x46')](_0x4f823a[_0x563e('0x49')][_0x34901f['id']],_0x34901f);}}}return _0x4f823a['templates'];};};Realtime[_0x563e('0x41')][_0x563e('0x4a')]=function(){var _0x21aa2a=this;return function(_0x368016){if(_0x368016){freeIsNotKey(_0x368016,_0x21aa2a[_0x563e('0x4b')],'id');for(var _0x4946f4=0x0,_0x56920c={},_0x4fe6d0={};_0x4946f4<_0x368016[_0x563e('0x43')];_0x4946f4+=0x1){_0x56920c=_0x368016[_0x4946f4];if(_['isUndefined'](_0x21aa2a['zendeskAccounts'][_0x56920c['id']])){_0x21aa2a[_0x563e('0x4b')][_0x56920c['id']]=new ZendeskAccount(_0x56920c);}else{_0x21aa2a[_0x563e('0x46')](_0x21aa2a['zendeskAccounts'][_0x56920c['id']],_0x56920c);}}}return _0x21aa2a[_0x563e('0x4b')];};};Realtime[_0x563e('0x41')][_0x563e('0x4c')]=function(){var _0x5577a4=this;return function(_0x4b5a10){if(_0x4b5a10){freeIsNotKey(_0x4b5a10,_0x5577a4[_0x563e('0x1c')],'id');for(var _0x441374=0x0,_0x2af8d5={},_0xe9ee62={};_0x441374<_0x4b5a10['length'];_0x441374+=0x1){_0x2af8d5=_0x4b5a10[_0x441374];if(_[_0x563e('0x45')](_0x5577a4[_0x563e('0x1c')][_0x2af8d5['id']])){_0x5577a4[_0x563e('0x1c')][_0x2af8d5['id']]=new SalesforceAccount(_0x2af8d5);}else{_0x5577a4[_0x563e('0x46')](_0x5577a4[_0x563e('0x1c')][_0x2af8d5['id']],_0x2af8d5);}}}return _0x5577a4[_0x563e('0x1c')];};};Realtime[_0x563e('0x41')][_0x563e('0x4d')]=function(){var _0x5b6f95=this;return function(_0x1c6d23){if(_0x1c6d23){freeIsNotKey(_0x1c6d23,_0x5b6f95[_0x563e('0x1e')],'id');for(var _0x42ba1e=0x0,_0x36ce74={},_0x936d8f={};_0x42ba1e<_0x1c6d23[_0x563e('0x43')];_0x42ba1e+=0x1){_0x36ce74=_0x1c6d23[_0x42ba1e];if(_[_0x563e('0x45')](_0x5b6f95['freshdeskAccounts'][_0x36ce74['id']])){_0x5b6f95['freshdeskAccounts'][_0x36ce74['id']]=new FreshdeskAccount(_0x36ce74);}else{_0x5b6f95[_0x563e('0x46')](_0x5b6f95[_0x563e('0x1e')][_0x36ce74['id']],_0x36ce74);}}}return _0x5b6f95[_0x563e('0x1e')];};};Realtime[_0x563e('0x41')]['initZohoAccounts']=function(){var _0x4685af=this;return function(_0x344901){if(_0x344901){freeIsNotKey(_0x344901,_0x4685af[_0x563e('0x1f')],'id');for(var _0x336a47=0x0,_0xa0f964={},_0x3c00f1={};_0x336a47<_0x344901[_0x563e('0x43')];_0x336a47+=0x1){_0xa0f964=_0x344901[_0x336a47];if(_['isUndefined'](_0x4685af[_0x563e('0x1f')][_0xa0f964['id']])){_0x4685af[_0x563e('0x1f')][_0xa0f964['id']]=new ZohoAccount(_0xa0f964);}else{_0x4685af[_0x563e('0x46')](_0x4685af[_0x563e('0x1f')][_0xa0f964['id']],_0xa0f964);}}}return _0x4685af['zohoAccounts'];};};Realtime[_0x563e('0x41')]['initDeskAccounts']=function(){var _0x19de7d=this;return function(_0x49448e){if(_0x49448e){freeIsNotKey(_0x49448e,_0x19de7d[_0x563e('0x4e')],'id');for(var _0x4ad787=0x0,_0x5608ad={},_0x29f34e={};_0x4ad787<_0x49448e[_0x563e('0x43')];_0x4ad787+=0x1){_0x5608ad=_0x49448e[_0x4ad787];if(_[_0x563e('0x45')](_0x19de7d[_0x563e('0x4e')][_0x5608ad['id']])){_0x19de7d[_0x563e('0x4e')][_0x5608ad['id']]=new DeskAccount(_0x5608ad);}else{_0x19de7d['mergeFromDatabase'](_0x19de7d['deskAccounts'][_0x5608ad['id']],_0x5608ad);}}}return _0x19de7d['deskAccounts'];};};Realtime[_0x563e('0x41')]['initSugarcrmAccounts']=function(){var _0x1cd362=this;return function(_0x1834f0){if(_0x1834f0){freeIsNotKey(_0x1834f0,_0x1cd362['sugarcrmAccounts'],'id');for(var _0x963bd9=0x0,_0x40f655={},_0x15968a={};_0x963bd9<_0x1834f0[_0x563e('0x43')];_0x963bd9+=0x1){_0x40f655=_0x1834f0[_0x963bd9];if(_[_0x563e('0x45')](_0x1cd362[_0x563e('0x1d')][_0x40f655['id']])){_0x1cd362[_0x563e('0x1d')][_0x40f655['id']]=new SugarcrmAccount(_0x40f655);}else{_0x1cd362['mergeFromDatabase'](_0x1cd362['sugarcrmAccounts'][_0x40f655['id']],_0x40f655);}}}return _0x1cd362['sugarcrmAccounts'];};};Realtime[_0x563e('0x41')][_0x563e('0x4f')]=function(){var _0x45d4fd=this;return function(_0x2e50d8){if(_0x2e50d8){freeIsNotKey(_0x2e50d8,_0x45d4fd[_0x563e('0x20')],'id');for(var _0x1fa3fa=0x0,_0x498820={},_0x31ce8f={};_0x1fa3fa<_0x2e50d8[_0x563e('0x43')];_0x1fa3fa+=0x1){_0x498820=_0x2e50d8[_0x1fa3fa];if(_[_0x563e('0x45')](_0x45d4fd[_0x563e('0x20')][_0x498820['id']])){_0x45d4fd[_0x563e('0x20')][_0x498820['id']]=new VtigerAccount(_0x498820);}else{_0x45d4fd[_0x563e('0x46')](_0x45d4fd['vtigerAccounts'][_0x498820['id']],_0x498820);}}}return _0x45d4fd[_0x563e('0x20')];};};Realtime[_0x563e('0x41')][_0x563e('0x50')]=function(){var _0x372627=this;return function(_0x5ea044){if(_0x5ea044){freeIsNotKey(_0x5ea044,_0x372627['servicenowAccounts'],'id');for(var _0x5dc1db=0x0,_0x1ea50d={},_0x4c1a74={};_0x5dc1db<_0x5ea044[_0x563e('0x43')];_0x5dc1db+=0x1){_0x1ea50d=_0x5ea044[_0x5dc1db];if(_[_0x563e('0x45')](_0x372627['servicenowAccounts'][_0x1ea50d['id']])){_0x372627[_0x563e('0x21')][_0x1ea50d['id']]=new ServicenowAccount(_0x1ea50d);}else{_0x372627['mergeFromDatabase'](_0x372627[_0x563e('0x21')][_0x1ea50d['id']],_0x1ea50d);}}}return _0x372627[_0x563e('0x21')];};};Realtime['prototype'][_0x563e('0x51')]=function(){var _0x1a438e=this;return function(_0x450aca){if(_0x450aca){freeIsNotKey(_0x450aca,_0x1a438e['dynamics365Accounts'],'id');for(var _0x265542=0x0,_0x333523={},_0xfb818b={};_0x265542<_0x450aca[_0x563e('0x43')];_0x265542+=0x1){_0x333523=_0x450aca[_0x265542];if(_[_0x563e('0x45')](_0x1a438e[_0x563e('0x22')][_0x333523['id']])){_0x1a438e[_0x563e('0x22')][_0x333523['id']]=new Dynamics365Account(_0x333523);}else{_0x1a438e[_0x563e('0x46')](_0x1a438e[_0x563e('0x22')][_0x333523['id']],_0x333523);}}}return _0x1a438e['dynamics365Accounts'];};};Realtime['prototype'][_0x563e('0x52')]=function(){var _0x2f2597=this;return function(_0x4a06a3){if(_0x4a06a3){freeIsNotKey(_0x4a06a3,_0x2f2597[_0x563e('0x23')],'id');for(var _0x2d9dd6=0x0,_0x51121c={},_0x4e5603={};_0x2d9dd6<_0x4a06a3[_0x563e('0x43')];_0x2d9dd6+=0x1){_0x51121c=_0x4a06a3[_0x2d9dd6];if(_[_0x563e('0x45')](_0x2f2597['freshsalesAccounts'][_0x51121c['id']])){_0x2f2597['freshsalesAccounts'][_0x51121c['id']]=new FreshsalesAccount(_0x51121c);}else{_0x2f2597[_0x563e('0x46')](_0x2f2597['freshsalesAccounts'][_0x51121c['id']],_0x51121c);}}}return _0x2f2597[_0x563e('0x23')];};};Realtime[_0x563e('0x41')][_0x563e('0x53')]=function(){var _0x4744eb=this;return function(_0x50a15f){for(var _0x2204ed=0x0;_0x2204ed<_0x50a15f[_0x563e('0x43')];_0x2204ed+=0x1){_[_0x563e('0x54')](_0x4744eb[_0x563e('0x14')][_0x50a15f[_0x2204ed][_0x563e('0x29')]],_0x50a15f[_0x2204ed]);}return _0x4744eb[_0x563e('0x14')];};};Realtime[_0x563e('0x41')][_0x563e('0x55')]=function(){var _0x4f15a9=this;return function(_0x146664){clearVoiceQueues(_0x4f15a9[_0x563e('0x14')]);if(_0x146664){_0x146664=_[_0x563e('0x56')](_0x146664,_0x563e('0x57'));for(var _0x1fa1df in _0x146664){if(_0x146664[_0x563e('0x25')](_0x1fa1df)){var _0x2f1edf={};for(var _0x419e00=0x0;_0x419e00<_0x146664[_0x1fa1df][_0x563e('0x43')];_0x419e00+=0x1){var _0x33feba=_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x58')];if(_0x4f15a9[_0x563e('0x14')][_0x33feba]){if(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x59')]){_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x5a')]+=0x1;}if(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5b')]){_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x34')]+=0x1;}_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x2e')]+=moment(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5c')])[_0x563e('0x5d')](moment(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5e')]),'seconds')||0x0;if(_0x419e00===_0x146664[_0x1fa1df][_0x563e('0x43')]-0x1){_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x2f')]+=moment(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5f')]||_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x60')]||_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x61')])[_0x563e('0x5d')](moment(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5e')]),_0x563e('0x62'))||0x0;_0x4f15a9[_0x563e('0x14')][_0x33feba]['total']+=0x1;if(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x63')]){_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x2d')]+=0x1;_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x30')]+=moment(_0x146664[_0x1fa1df][_0x419e00]['queuecallercompleteAt'])[_0x563e('0x5d')](moment(_0x146664[_0x1fa1df][_0x419e00][_0x563e('0x5c')]),'seconds')||0x0;}}else{_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x2f')]+=_0x4f15a9[_0x563e('0x14')][_0x33feba][_0x563e('0x2e')]||0x0;}}}}}}return _0x4f15a9[_0x563e('0x14')];};};Realtime[_0x563e('0x41')][_0x563e('0x64')]=function(){var _0x28be6a=this;return function(_0x309d76){clearVoiceCallReports(_0x28be6a[_0x563e('0x65')]);if(_0x309d76){for(var _0x50954d=0x0;_0x50954d<_0x309d76[_0x563e('0x43')];_0x50954d+=0x1){_0x28be6a[_0x563e('0x65')][_0x563e('0x2c')]+=0x1;_0x28be6a[_0x563e('0x65')][_0x563e('0x2f')]+=_0x309d76[_0x50954d][_0x563e('0x66')];if(_0x309d76[_0x50954d][_0x563e('0x67')]===_0x563e('0x68')){_0x28be6a[_0x563e('0x65')][_0x563e('0x2d')]+=0x1;_0x28be6a['outbound'][_0x563e('0x2e')]+=_0x309d76[_0x50954d][_0x563e('0x66')]-_0x309d76[_0x50954d][_0x563e('0x69')]||0x0;_0x28be6a['outbound'][_0x563e('0x30')]+=_0x309d76[_0x50954d][_0x563e('0x69')];}}}return _0x28be6a[_0x563e('0x65')];};};Realtime[_0x563e('0x41')][_0x563e('0x6a')]=function(){var _0x29ef54=this;return function(_0x1f2006){if(_0x1f2006){freeIsNotKey(_0x1f2006,_0x29ef54[_0x563e('0x15')],_0x563e('0x29'));for(var _0x53ef1e=0x0,_0x44f8e3={};_0x53ef1e<_0x1f2006[_0x563e('0x43')];_0x53ef1e+=0x1){_0x44f8e3=_0x1f2006[_0x53ef1e];if(_[_0x563e('0x45')](_0x29ef54[_0x563e('0x15')][_0x44f8e3[_0x563e('0x29')]])){_0x29ef54[_0x563e('0x15')][_0x44f8e3[_0x563e('0x29')]]=new Campaign(_0x44f8e3);}else{_0x29ef54[_0x563e('0x46')](_0x29ef54['campaigns'][_0x44f8e3[_0x563e('0x29')]],_0x44f8e3);_0x29ef54[_0x563e('0x15')][_0x44f8e3[_0x563e('0x29')]][_0x563e('0x6b')]=_0x44f8e3['SquareProject']?_0x44f8e3['SquareProject'][_0x563e('0x29')]:undefined;}}}return _0x29ef54[_0x563e('0x15')];};};Realtime[_0x563e('0x41')][_0x563e('0x6c')]=function(){var _0xbc8256=this;return function(_0x422e53){if(_0x422e53){freeIsNotKey(_0x422e53,_0xbc8256[_0x563e('0x16')],'id');for(var _0xf7aa8e=0x0,_0x44e7b1={};_0xf7aa8e<_0x422e53['length'];_0xf7aa8e+=0x1){_0x44e7b1=_0x422e53[_0xf7aa8e];if(_['isUndefined'](_0xbc8256[_0x563e('0x16')][_0x44e7b1['id']])){_0xbc8256['voiceExtensions'][_0x44e7b1['id']]=new VoiceExtension(_0x44e7b1);}else{_0xbc8256['mergeFromDatabase'](_0xbc8256[_0x563e('0x16')][_0x44e7b1['id']],_0x44e7b1);}}}return _0xbc8256[_0x563e('0x16')];};};Realtime[_0x563e('0x41')][_0x563e('0x6d')]=function(){var _0x4739e6=this;return function(_0x2f570a){clearCampaigns(_0x4739e6[_0x563e('0x15')]);for(var _0x39a4a7=0x0;_0x39a4a7<_0x2f570a[_0x563e('0x43')];_0x39a4a7+=0x1){_[_0x563e('0x54')](_0x4739e6['campaigns'][_0x2f570a[_0x39a4a7][_0x563e('0x29')]],_0x2f570a[_0x39a4a7]);}return _0x4739e6[_0x563e('0x15')];};};Realtime[_0x563e('0x41')][_0x563e('0x6e')]=function(){var _0x55c9cd=this;return function(_0x462fa6){if(_0x462fa6){freeIsNotKey(_0x462fa6,_0x55c9cd[_0x563e('0x24')],'id');for(var _0x5e3536=0x0,_0x47ebba={},_0x350c47={};_0x5e3536<_0x462fa6[_0x563e('0x43')];_0x5e3536+=0x1){_0x47ebba=_0x462fa6[_0x5e3536];if(_[_0x563e('0x45')](_0x55c9cd[_0x563e('0x24')][_0x47ebba['id']])){_0x55c9cd['faxAccounts'][_0x47ebba['id']]=new FaxAccount(_0x47ebba);}else{_0x55c9cd[_0x563e('0x46')](_0x55c9cd[_0x563e('0x24')][_0x47ebba['id']],_0x47ebba);}}}return _0x55c9cd[_0x563e('0x24')];};};module[_0x563e('0x6f')]=Realtime; \ No newline at end of file diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js index 1d3aa42..0a465dd 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 _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 +var _0x9436=['callerid','originatecalleridnum','destinationchannel','channel','calleridpreview','calleridnum','ANSWERED','\x22%s\x22\x20<%s>','calleridname','linkedid','transfers','transfereelinkedid','uniqueid','monitor','monitors','length','monitorFilename','filename','createdAt','connectedlinename','xcally-motion-dialer','create','isArray','Local','substring','indexOf','phone','isNil','transfererlinkedid','exports','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/memberReport','../rpc/voiceQueueReport','../rpc/voiceTransferReport','./voiceDialReport','./userReport','agents','telephones','prototype','sync','realtime','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','name','accountcode','interface','format','SIP/%s','connectedlinenum','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','destination','exten','type','dialer','queue','lastdata','context','from-voip-provider'];(function(_0x38b7e6,_0x56cff7){var _0x492ae5=function(_0x4b4b14){while(--_0x4b4b14){_0x38b7e6['push'](_0x38b7e6['shift']());}};_0x492ae5(++_0x56cff7);}(_0x9436,0x1b3));var _0x6943=function(_0x17abfe,_0x112848){_0x17abfe=_0x17abfe-0x0;var _0x51aaee=_0x9436[_0x17abfe];return _0x51aaee;};'use strict';var _=require(_0x6943('0x0'));var moment=require(_0x6943('0x1'));var util=require(_0x6943('0x2'));var config=require(_0x6943('0x3'));var ami=require(_0x6943('0x4'));var RpcVoiceAgentReport=require(_0x6943('0x5'));var RpcVoiceCallReport=require(_0x6943('0x6'));var RpcVoiceDialReport=require('../rpc/voiceDialReport');var RpcMemberReport=require(_0x6943('0x7'));var RpcVoiceQueueReport=require(_0x6943('0x8'));var RpcVoiceRecording=require('../rpc/voiceRecording');var RpcVoiceTransferReport=require(_0x6943('0x9'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require(_0x6943('0xa'));var UserReport=require(_0x6943('0xb'));function Report(_0xc07264){this['realtime']=_0xc07264;this[_0x6943('0xc')]=_0xc07264[_0x6943('0xc')];this[_0x6943('0xd')]=_0xc07264[_0x6943('0xd')];}Report[_0x6943('0xe')][_0x6943('0xf')]=function(_0x4a115f){var _0x30ea3a=new VoiceQueueReport(this['realtime']);var _0x2f2c25=new VoiceAgentReport(this[_0x6943('0x10')]);var _0x1156fe=new VoiceDialReport(this[_0x6943('0x10')]);var _0x419404=new VoiceCallReport(this[_0x6943('0x10')]);var _0x33611e=new UserReport(this[_0x6943('0x10')]);if(config[_0x6943('0x11')]&&config[_0x6943('0x11')][_0x6943('0x12')]){ami['on'](_0x6943('0x13'),this[_0x6943('0x14')][_0x6943('0x15')](this));ami['on'](_0x6943('0x16'),this[_0x6943('0x17')]['bind'](this));ami['on'](_0x6943('0x18'),this[_0x6943('0x19')][_0x6943('0x15')](this));ami['on'](_0x6943('0x1a'),this[_0x6943('0x1b')][_0x6943('0x15')](this));ami['on']('blindtransfer',this[_0x6943('0x1c')]['bind'](this));ami['on'](_0x6943('0x1d'),this[_0x6943('0x1e')][_0x6943('0x15')](this));}};Report[_0x6943('0xe')][_0x6943('0x1f')]=function(_0x802b10){var _0xeb1e54;_0xeb1e54=_[_0x6943('0x20')](this[_0x6943('0xc')],function(_0x4f63d9){return _0x4f63d9['accountcode']==_0x802b10||_0x4f63d9[_0x6943('0x21')]==_0x802b10;});if(_['isNil'](_0xeb1e54)){var _0x123139=_[_0x6943('0x20')](this['telephones'],function(_0x24c755){return _0x24c755[_0x6943('0x22')]==_0x802b10||_0x24c755[_0x6943('0x21')]==_0x802b10;});if(_0x123139){_0xeb1e54=_[_0x6943('0x20')](this[_0x6943('0xc')],function(_0x2e1889){return _0x2e1889[_0x6943('0x23')]==util[_0x6943('0x24')](_0x6943('0x25'),_0x123139[_0x6943('0x21')]);});}}return _0xeb1e54;};Report[_0x6943('0xe')][_0x6943('0x14')]=function(_0x13d4b6){for(var _0x851d9a=0x0;_0x851d9a<_0x13d4b6['length'];_0x851d9a+=0x1){var _0x7cc5b=this[_0x6943('0x1f')](_0x13d4b6[_0x851d9a][_0x6943('0x26')]);if(_0x7cc5b){_0x13d4b6[_0x851d9a][_0x6943('0x22')]=_0x7cc5b['accountcode'];_0x13d4b6[_0x851d9a]['assigned']=!![];_0x13d4b6[_0x851d9a]['lastAssignedTo']=_0x7cc5b[_0x6943('0x21')];_0x13d4b6[_0x851d9a][_0x6943('0x23')]=_['isNil'](_0x7cc5b[_0x6943('0x23')])?util[_0x6943('0x24')](_0x6943('0x25'),_0x7cc5b['name']):_0x7cc5b[_0x6943('0x23')];if(_0x13d4b6[_0x851d9a]['queuecallercomplete']){_0x13d4b6[_0x851d9a][_0x6943('0x27')]=moment()[_0x6943('0x24')](_0x6943('0x28'));}if(_0x13d4b6[_0x851d9a][_0x6943('0x29')]){_0x13d4b6[_0x851d9a][_0x6943('0x2a')]=moment()[_0x6943('0x24')](_0x6943('0x28'));}RpcMemberReport['voiceQueueReport'](_0x13d4b6[_0x851d9a]);}RpcVoiceQueueReport['create'](_0x13d4b6[_0x851d9a]);}};function extractCalleridNumber(_0x38c469){var _0x3f134a=_0x38c469['match'](/<(.*?)>/);return _0x3f134a?_0x3f134a[0x1]:_0x38c469;}Report[_0x6943('0xe')][_0x6943('0x17')]=function(_0xb32fe){_0xb32fe[_0x6943('0x2b')]=_0xb32fe[_0x6943('0x2b')]||_0xb32fe[_0x6943('0x2c')];if(_0xb32fe[_0x6943('0x2d')]==_0x6943('0x2e')){_0xb32fe['lastapplication']=_0x6943('0x2f');_0xb32fe[_0x6943('0x30')]=_0xb32fe[_0x6943('0x2f')];if(_0xb32fe[_0x6943('0x31')]==_0x6943('0x32')){_0xb32fe[_0x6943('0x22')]='';_0xb32fe[_0x6943('0x2b')]=extractCalleridNumber(_0xb32fe[_0x6943('0x33')]);}else if(_0xb32fe[_0x6943('0x31')]=='from-sip'){if(_0xb32fe['destination']=='xcally-motion-preview'){_0xb32fe[_0x6943('0x2b')]=extractCalleridNumber(_0xb32fe['calleridpreview']);_0xb32fe['calleridnum']=_0xb32fe[_0x6943('0x34')];_0xb32fe[_0x6943('0x35')]=[_0xb32fe[_0x6943('0x36')],_0xb32fe[_0x6943('0x36')]=_0xb32fe[_0x6943('0x35')]][0x0];_0xb32fe[_0x6943('0x33')]=_0xb32fe[_0x6943('0x37')];}else{_0xb32fe[_0x6943('0x2b')]=_0xb32fe[_0x6943('0x38')];_0xb32fe[_0x6943('0x38')]=_0xb32fe[_0x6943('0x34')];if(_0xb32fe['disposition']==_0x6943('0x39')){_0xb32fe[_0x6943('0x22')]=_0xb32fe[_0x6943('0x26')];}else{_0xb32fe[_0x6943('0x22')]='';}}}}else{_0xb32fe[_0x6943('0x33')]=util[_0x6943('0x24')](_0x6943('0x3a'),_0xb32fe[_0x6943('0x3b')],_0xb32fe[_0x6943('0x38')]);}if(RpcVoiceTransferReport['transfers'][_0xb32fe[_0x6943('0x3c')]]){var _0x53415d=RpcVoiceTransferReport[_0x6943('0x3d')][_0xb32fe[_0x6943('0x3c')]];_0x53415d[_0x6943('0x3e')]=_0xb32fe[_0x6943('0x3f')];RpcVoiceTransferReport[_0x6943('0x1c')](_0x53415d);delete RpcVoiceTransferReport[_0x6943('0x3d')][_0xb32fe['linkedid']];}RpcVoiceCallReport['create'](_0xb32fe);if(_0xb32fe[_0x6943('0x40')]){for(var _0x9814e5=0x0;_0x9814e5<_0xb32fe[_0x6943('0x41')][_0x6943('0x42')];_0x9814e5+=0x1){_0xb32fe[_0x6943('0x43')]=_0xb32fe[_0x6943('0x41')][_0x9814e5][_0x6943('0x44')];_0xb32fe[_0x6943('0x45')]=_0xb32fe['monitors'][_0x9814e5]['createdAt'];if(_0xb32fe['exten']=='xcally-motion-preview'){_0xb32fe[_0x6943('0x38')]=_0xb32fe['connectedlinenum'];_0xb32fe['calleridname']=_0xb32fe[_0x6943('0x46')];_0xb32fe['connectedlinenum']=_0xb32fe['accountcode'];_0xb32fe[_0x6943('0x46')]=_0xb32fe['membername'];_0xb32fe['exten']=_0xb32fe[_0x6943('0x34')];}else if(_0xb32fe[_0x6943('0x2c')]==_0x6943('0x47')){_0xb32fe[_0x6943('0x38')]=_0xb32fe['destination'];_0xb32fe[_0x6943('0x2c')]=_0xb32fe['originatecalleridnum'];}RpcVoiceRecording[_0x6943('0x48')](_0xb32fe);}}};Report[_0x6943('0xe')]['voiceAgentReport']=function(_0x4423c9){if(_[_0x6943('0x49')](_0x4423c9)){_0x4423c9['forEach'](function(_0x1abc52){RpcVoiceAgentReport[_0x6943('0x48')](_0x1abc52);});}else{RpcVoiceAgentReport[_0x6943('0x48')](_0x4423c9);}};Report[_0x6943('0xe')][_0x6943('0x1b')]=function(_0x14974c){RpcVoiceDialReport['create'](_0x14974c);var _0x288f04;var _0x2bb6f2;var _0x1344a0=_0x14974c[_0x6943('0x36')];if(_['startsWith'](_0x1344a0,_0x6943('0x4a'))){_0x2bb6f2=_0x1344a0[_0x6943('0x4b')](_0x1344a0[_0x6943('0x4c')]('/')+0x1,_0x1344a0[_0x6943('0x4c')]('@'));_0x288f04=_['find'](this[_0x6943('0xc')],function(_0x3749ba){return _0x3749ba['mobile']==_0x2bb6f2||_0x3749ba[_0x6943('0x4d')]==_0x2bb6f2||_0x3749ba[_0x6943('0x22')]==_0x2bb6f2;});}else{_0x2bb6f2=_0x1344a0[_0x6943('0x4b')](_0x1344a0[_0x6943('0x4c')]('/')+0x1,_0x1344a0['lastIndexOf']('-'));_0x288f04=this[_0x6943('0x1f')](_0x2bb6f2);}if(_0x288f04){_0x14974c['interface']=_[_0x6943('0x4e')](_0x288f04[_0x6943('0x23')])?util[_0x6943('0x24')](_0x6943('0x25'),_0x288f04[_0x6943('0x21')]):_0x288f04[_0x6943('0x23')];_0x14974c['membername']=_0x288f04['name'];_0x14974c['accountcode']=_0x288f04[_0x6943('0x22')];RpcMemberReport[_0x6943('0x1b')](_0x14974c);}};Report[_0x6943('0xe')]['blindTransfer']=function(_0x4ef357){RpcVoiceTransferReport[_0x6943('0x3d')][_0x4ef357[_0x6943('0x4f')]]=_0x4ef357;};Report[_0x6943('0xe')][_0x6943('0x1e')]=function(_0x39e84c){RpcVoiceTransferReport['attendedTransfer'](_0x39e84c);};module[_0x6943('0x50')]=Report; \ No newline at end of file diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js index 338f2c4..0d55d3c 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 _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 +var _0x84be=['find','stateRegistry','state','merge','omit','event','actionid','trunk:%s','name','trunk:save','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','local','toLowerCase','stateTime','toNumber','format','updateStatusRealtime','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','telephone:save','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','startsWith','Local','substring','indexOf','mobile','phone','accountcode','[userReport][devicestatechange]','syncPeerStatus','peer','address','[userReport][peerstatus]','registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','lodash','moment','ioredis','bluebird','../../../config/environment','../../../config/logger','ami','../ami','defaults','redis','localhost','socket.io-emitter','trunks','agents','telephones','syncRegistry','registry','bind','syncDeviceState','peerstatus','syncRealtimeShow','resolve','catch','[userReport][sipshowregistry]','inspect','then','actionDeviceStateList','error','[userReport][devicestatelist]','actionSipPeerStatus','prototype','isNotNull','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username','debug','[userReport][registry]'];(function(_0x2f3972,_0x413613){var _0xce07c1=function(_0x5d2c32){while(--_0x5d2c32){_0x2f3972['push'](_0x2f3972['shift']());}};_0xce07c1(++_0x413613);}(_0x84be,0x1ee));var _0xe84b=function(_0x134c2e,_0x3573c4){_0x134c2e=_0x134c2e-0x0;var _0x2825db=_0x84be[_0x134c2e];return _0x2825db;};'use strict';var _=require(_0xe84b('0x0'));var moment=require(_0xe84b('0x1'));var util=require('util');var Redis=require(_0xe84b('0x2'));var BPromise=require(_0xe84b('0x3'));var config=require(_0xe84b('0x4'));var logger=require(_0xe84b('0x5'))(_0xe84b('0x6'));var ami=require(_0xe84b('0x7'));config['redis']=_[_0xe84b('0x8')](config[_0xe84b('0x9')],{'host':_0xe84b('0xa'),'port':0x18eb});var io=require(_0xe84b('0xb'))(new Redis(config[_0xe84b('0x9')]));function UserReport(_0x1b0f99){this['trunks']=_0x1b0f99[_0xe84b('0xc')];this['agents']=_0x1b0f99[_0xe84b('0xd')];this['telephones']=_0x1b0f99[_0xe84b('0xe')];ami['on']('registryentry',this[_0xe84b('0xf')]['bind'](this));ami['on'](_0xe84b('0x10'),this[_0xe84b('0xf')][_0xe84b('0x11')](this));ami['on']('devicestatechange',this[_0xe84b('0x12')][_0xe84b('0x11')](this));ami['on'](_0xe84b('0x13'),this['syncPeerStatus'][_0xe84b('0x11')](this));return this[_0xe84b('0x14')]();}function showSipRegistrations(){Promise[_0xe84b('0x15')]()['then'](ami['actionSipShowRegistry']())[_0xe84b('0x16')](function(_0x2fcc3d){logger['error'](_0xe84b('0x17'),util[_0xe84b('0x18')](_0x2fcc3d,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()[_0xe84b('0x19')](ami[_0xe84b('0x1a')]())['catch'](function(_0x1cc380){logger[_0xe84b('0x1b')](_0xe84b('0x1c'),util['inspect'](_0x1cc380,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()[_0xe84b('0x19')](ami[_0xe84b('0x1d')]())['catch'](function(_0x49e683){logger['error']('[userReport][sippeerstatus]',util[_0xe84b('0x18')](_0x49e683,{'showHidden':![],'depth':null}));});}UserReport[_0xe84b('0x1e')][_0xe84b('0x14')]=function(){setInterval(function(){BPromise[_0xe84b('0x15')]()[_0xe84b('0x19')](showSipRegistrations())[_0xe84b('0x19')](listDeviceStates())[_0xe84b('0x19')](showPeersStatus());},0x32c8);};UserReport[_0xe84b('0x1e')][_0xe84b('0x1f')]=function(_0xd643ff){return _0xd643ff!==null&&!_['isUndefined'](_0xd643ff);};UserReport['prototype'][_0xe84b('0x20')]=function(_0x50f6e0,_0x2cf750,_0x59ff03){io['to'](_0x50f6e0)[_0xe84b('0x20')](_0x2cf750,_0x59ff03);};UserReport[_0xe84b('0x1e')]['syncRegistry']=function(_0x3d006b){try{if(this[_0xe84b('0x1f')](_0x3d006b)){logger[_0xe84b('0x21')](_0xe84b('0x22'),_0x3d006b[_0xe84b('0x23')],_0x3d006b['state']);logger[_0xe84b('0x24')](_0xe84b('0x25'),util['inspect'](_0x3d006b,{'showHidden':![],'depth':null}));var _0x14e28f=_[_0xe84b('0x26')](this[_0xe84b('0xc')],{'defaultuser':_0x3d006b['username']});if(_0x14e28f){_0x3d006b[_0xe84b('0x27')]=_0x3d006b[_0xe84b('0x28')];_[_0xe84b('0x29')](_0x14e28f,_[_0xe84b('0x2a')](_0x3d006b,[_0xe84b('0x2b'),_0xe84b('0x2c'),_0xe84b('0x23'),_0xe84b('0x28')]));logger[_0xe84b('0x24')]('[userReport][registry]\x20sending\x20trunk:save\x20event:',util['inspect'](_0x14e28f,{'showHidden':![],'depth':null}));this[_0xe84b('0x20')](util['format'](_0xe84b('0x2d'),_0x14e28f[_0xe84b('0x2e')]),_0xe84b('0x2f'),_0x14e28f);}}}catch(_0x336669){logger[_0xe84b('0x1b')](_0xe84b('0x25'),util[_0xe84b('0x18')](_0x336669,{'showHidden':![],'depth':null}));}};UserReport[_0xe84b('0x1e')]['syncDeviceState']=function(_0x50e5b7){try{if(this[_0xe84b('0x1f')](_0x50e5b7)){logger['info'](_0xe84b('0x30'),_0x50e5b7[_0xe84b('0x31')],_0x50e5b7['state']);logger[_0xe84b('0x24')]('[userReport][devicestatechange]',util[_0xe84b('0x18')](_0x50e5b7,{'showHidden':![],'depth':null}));if(this['agents'][_0x50e5b7[_0xe84b('0x31')]]){if(!this['agents'][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x32')]||_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]()=='inuse'){this[_0xe84b('0xd')][_0x50e5b7[_0xe84b('0x31')]]['local']=![];if(this[_0xe84b('0xd')][_0x50e5b7[_0xe84b('0x31')]]['state']!==_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]()){this[_0xe84b('0xd')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x34')]=_[_0xe84b('0x35')](moment()[_0xe84b('0x36')]('x'));}this[_0xe84b('0xd')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x28')]=_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]();this[_0xe84b('0xd')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x37')](_0x50e5b7);}}else if(this['telephones'][_0x50e5b7['device']]){if(this[_0xe84b('0xe')][_0x50e5b7['device']][_0xe84b('0x28')]!==_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]()){this['telephones'][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x34')]=_['toNumber'](moment()['format']('x'));}this[_0xe84b('0xe')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x28')]=_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]();logger[_0xe84b('0x24')](_0xe84b('0x38'),util[_0xe84b('0x18')](this['telephones'][_0x50e5b7[_0xe84b('0x31')]],{'showHidden':![],'depth':null}));this[_0xe84b('0x20')](util['format'](_0xe84b('0x39'),this[_0xe84b('0xe')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x2e')]),_0xe84b('0x3a'),this['telephones'][_0x50e5b7['device']]);}else if(this[_0xe84b('0xc')][_0x50e5b7[_0xe84b('0x31')]]){if(this['trunks'][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x28')]!==_0x50e5b7['state'][_0xe84b('0x33')]()){this[_0xe84b('0xc')][_0x50e5b7[_0xe84b('0x31')]]['stateTime']=_[_0xe84b('0x35')](moment()[_0xe84b('0x36')]('x'));}this[_0xe84b('0xc')][_0x50e5b7['device']][_0xe84b('0x28')]=_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]();logger[_0xe84b('0x24')](_0xe84b('0x3b'),util[_0xe84b('0x18')](this[_0xe84b('0xc')][_0x50e5b7[_0xe84b('0x31')]],{'showHidden':![],'depth':null}));this[_0xe84b('0x20')](util[_0xe84b('0x36')](_0xe84b('0x2d'),this[_0xe84b('0xc')][_0x50e5b7[_0xe84b('0x31')]][_0xe84b('0x2e')]),_0xe84b('0x2f'),this[_0xe84b('0xc')][_0x50e5b7[_0xe84b('0x31')]]);}else if(_[_0xe84b('0x3c')](_0x50e5b7[_0xe84b('0x31')],_0xe84b('0x3d'))){var _0x167599=_0x50e5b7[_0xe84b('0x31')];var _0x3bd524=_0x167599[_0xe84b('0x3e')](_0x167599[_0xe84b('0x3f')]('/')+0x1,_0x167599[_0xe84b('0x3f')]('@'));var _0x47b363=_[_0xe84b('0x26')](this['agents'],function(_0x51c664){return _0x51c664[_0xe84b('0x40')]==_0x3bd524||_0x51c664[_0xe84b('0x41')]==_0x3bd524||_0x51c664[_0xe84b('0x42')]==_0x3bd524;});if(_0x47b363){if(_0x47b363[_0xe84b('0x28')]!==_0x50e5b7['state'][_0xe84b('0x33')]()){_0x47b363['stateTime']=_[_0xe84b('0x35')](moment()[_0xe84b('0x36')]('x'));}_0x47b363[_0xe84b('0x28')]=_0x50e5b7[_0xe84b('0x28')][_0xe84b('0x33')]();_0x47b363[_0xe84b('0x32')]=!![];_0x47b363['updateStatusRealtime'](_0x50e5b7);}}}}catch(_0x3d8017){logger[_0xe84b('0x1b')](_0xe84b('0x43'),util[_0xe84b('0x18')](_0x3d8017,{'showHidden':![],'depth':null}));}};UserReport[_0xe84b('0x1e')][_0xe84b('0x44')]=function(_0x3080a4){try{if(this[_0xe84b('0x1f')](_0x3080a4)&&this[_0xe84b('0x1f')](_0x3080a4['peerstatus'])){logger[_0xe84b('0x21')]('[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s',_0x3080a4[_0xe84b('0x45')],_0x3080a4[_0xe84b('0x46')],_0x3080a4['peerstatus']);logger[_0xe84b('0x24')](_0xe84b('0x47'),util[_0xe84b('0x18')](_0x3080a4,{'showHidden':![],'depth':null}));if(this[_0xe84b('0xd')][_0x3080a4[_0xe84b('0x45')]]){if(!this[_0xe84b('0xd')][_0x3080a4[_0xe84b('0x45')]]['local']||_0x3080a4[_0xe84b('0x13')][_0xe84b('0x33')]()==_0xe84b('0x48')){this['agents'][_0x3080a4['peer']]['local']=![];this[_0xe84b('0xd')][_0x3080a4[_0xe84b('0x45')]]['status']=_0x3080a4['peerstatus']['toLowerCase']();this[_0xe84b('0xd')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x46')]=_0x3080a4[_0xe84b('0x46')];this['agents'][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x37')](_0x3080a4);}}else if(this['telephones'][_0x3080a4[_0xe84b('0x45')]]){this[_0xe84b('0xe')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x49')]=_0x3080a4[_0xe84b('0x13')][_0xe84b('0x33')]();this[_0xe84b('0xe')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x46')]=_0x3080a4[_0xe84b('0x46')];logger[_0xe84b('0x24')](_0xe84b('0x4a'),util[_0xe84b('0x18')](this['telephones'][_0x3080a4[_0xe84b('0x45')]],{'showHidden':![],'depth':null}));this['emit'](util[_0xe84b('0x36')](_0xe84b('0x39'),this[_0xe84b('0xe')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x2e')]),'telephone:save',this[_0xe84b('0xe')][_0x3080a4[_0xe84b('0x45')]]);}else if(this['trunks'][_0x3080a4['peer']]){this[_0xe84b('0xc')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x49')]=_0x3080a4[_0xe84b('0x13')][_0xe84b('0x33')]();this[_0xe84b('0xc')][_0x3080a4[_0xe84b('0x45')]]['address']=_0x3080a4[_0xe84b('0x46')];logger[_0xe84b('0x24')](_0xe84b('0x4b'),util[_0xe84b('0x18')](this['trunks'][_0x3080a4[_0xe84b('0x45')]],{'showHidden':![],'depth':null}));this[_0xe84b('0x20')](util[_0xe84b('0x36')](_0xe84b('0x2d'),this[_0xe84b('0xc')][_0x3080a4[_0xe84b('0x45')]][_0xe84b('0x2e')]),_0xe84b('0x2f'),this['trunks'][_0x3080a4['peer']]);}}}catch(_0x1804f1){logger[_0xe84b('0x1b')](_0xe84b('0x47'),util[_0xe84b('0x18')](_0x1804f1,{'showHidden':![],'depth':null}));}};module['exports']=UserReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceAgentReport.js b/server/services/ami/report/voiceAgentReport.js index f7096b7..734822b 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 _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 +var _0xd542=['isNotNull','isUndefined','info','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','membername','inspect','channels','destuniqueid','format','called','queue','type','inbound','merge','omit','privilege','debug','emit','custom:agentcalled','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','user:%s','user:called','error','[%s][voiceAgentReport][agentcalled]','[%s][voiceAgentReport][agentconnect]\x20event:','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','interface','pick','destconnectedlinenum','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentconnect\x20event:','custom:agentconnect','agentcomplete','YYYY-MM-DD\x20HH:mm:ss','answeredelsewheremembername','answered_elsewhere','reason','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','agentringnoanswerAt','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','custom:agentringnoanswer','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20event:','hasOwnProperty','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','complete','transfer','agent','talktime','acw','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','[%s][voiceAgentReport][varset]\x20event:','value','keys','variable','[%s][voiceAgentReport][varset]','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','agentcompleteAt','custom:voiceAgentReport','values','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','syncMusicOnHoldStart','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','lastIndexOf','onhold','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','[%s][voiceAgentReport][musiconholdstop]','exports','lodash','moment','ioredis','../../../config/environment','../ami','redis','defaults','socket.io-emitter','voiceQueues','agents','variables','agentcalled','syncAgentCalled','agentconnect','syncAgentConnect','bind','agentringnoanswer','syncAgentRingNoAnswer','syncAgentComplete','syncVarSet','hangup','syncHangup','musiconholdstart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype'];(function(_0x287b49,_0x405d8d){var _0x5b6f06=function(_0x4bc4ed){while(--_0x4bc4ed){_0x287b49['push'](_0x287b49['shift']());}};_0x5b6f06(++_0x405d8d);}(_0xd542,0x1a4));var _0x2d54=function(_0x26e47a,_0x28c924){_0x26e47a=_0x26e47a-0x0;var _0xa5f37b=_0xd542[_0x26e47a];return _0xa5f37b;};'use strict';var _=require(_0x2d54('0x0'));var moment=require(_0x2d54('0x1'));var util=require('util');var Redis=require(_0x2d54('0x2'));var config=require(_0x2d54('0x3'));var logger=require('../../../config/logger')('ami');var ami=require(_0x2d54('0x4'));config[_0x2d54('0x5')]=_[_0x2d54('0x6')](config[_0x2d54('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x2d54('0x7'))(new Redis(config['redis']));function VoiceAgentReport(_0x5ee194){this['channels']={};this[_0x2d54('0x8')]=_0x5ee194[_0x2d54('0x8')];this['agents']=_0x5ee194[_0x2d54('0x9')];this[_0x2d54('0xa')]={};ami['on'](_0x2d54('0xb'),this[_0x2d54('0xc')]['bind'](this));ami['on'](_0x2d54('0xd'),this[_0x2d54('0xe')][_0x2d54('0xf')](this));ami['on'](_0x2d54('0x10'),this[_0x2d54('0x11')]['bind'](this));ami['on']('queuecallerabandon',this['syncQueueCallerAbandon'][_0x2d54('0xf')](this));ami['on']('agentcomplete',this[_0x2d54('0x12')]['bind'](this));ami['on']('varset',this[_0x2d54('0x13')][_0x2d54('0xf')](this));ami['on'](_0x2d54('0x14'),this[_0x2d54('0x15')][_0x2d54('0xf')](this));ami['on'](_0x2d54('0x16'),this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0x2d54('0x17'),this[_0x2d54('0x18')][_0x2d54('0xf')](this));ami['on'](_0x2d54('0x19'),this[_0x2d54('0x1a')]['bind'](this));ami['on'](_0x2d54('0x1b'),this[_0x2d54('0x1c')]['bind'](this));}VoiceAgentReport[_0x2d54('0x1d')]['emit']=function(_0x506be2,_0x32b927,_0x24677d){io['to'](_0x506be2)['emit'](_0x32b927,_0x24677d);};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x1e')]=function(_0x734b73){return _0x734b73!==null&&!_[_0x2d54('0x1f')](_0x734b73);};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0xc')]=function(_0x58f776){try{if(this[_0x2d54('0x1e')](_0x58f776)){logger[_0x2d54('0x20')](_0x2d54('0x21'),_0x58f776[_0x2d54('0x22')],_0x58f776[_0x2d54('0x23')],_0x58f776['destuniqueid']);logger['debug']('[%s][voiceAgentReport][agentcalled]\x20event:',_0x58f776['uniqueid'],util[_0x2d54('0x24')](_0x58f776,{'showHidden':![],'depth':null}));if(_[_0x2d54('0x1f')](this['channels'][_0x58f776['uniqueid']])){this[_0x2d54('0x25')][_0x58f776[_0x2d54('0x22')]]={};}if(_[_0x2d54('0x1f')](this['channels'][_0x58f776[_0x2d54('0x22')]][_0x58f776['destuniqueid']])){this[_0x2d54('0x25')][_0x58f776[_0x2d54('0x22')]][_0x58f776[_0x2d54('0x26')]]={'agentcalledAt':moment()[_0x2d54('0x27')]('YYYY-MM-DD\x20HH:mm:ss'),'lastevent':_0x2d54('0x28'),'mandatoryDisposition':this[_0x2d54('0x8')][_0x58f776[_0x2d54('0x29')]]?this[_0x2d54('0x8')][_0x58f776[_0x2d54('0x29')]]['mandatoryDisposition']||![]:![],'type':this[_0x2d54('0x8')][_0x58f776[_0x2d54('0x29')]]?this[_0x2d54('0x8')][_0x58f776['queue']][_0x2d54('0x2a')]||_0x2d54('0x2b'):_0x2d54('0x2b'),'variables':this['variables'][_0x58f776[_0x2d54('0x22')]]};}_[_0x2d54('0x2c')](this['channels'][_0x58f776[_0x2d54('0x22')]][_0x58f776['destuniqueid']],_[_0x2d54('0x2d')](_0x58f776,['event',_0x2d54('0x2e')]));logger[_0x2d54('0x2f')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:',_0x58f776['uniqueid'],util[_0x2d54('0x24')](this[_0x2d54('0x25')][_0x58f776[_0x2d54('0x22')]][_0x58f776[_0x2d54('0x26')]],{'showHidden':![],'depth':null}));ami[_0x2d54('0x30')](_0x2d54('0x31'),this[_0x2d54('0x25')][_0x58f776[_0x2d54('0x22')]][_0x58f776[_0x2d54('0x26')]]);logger[_0x2d54('0x2f')](_0x2d54('0x32'),_0x58f776[_0x2d54('0x22')],util[_0x2d54('0x24')](this['channels'][_0x58f776['uniqueid']][_0x58f776[_0x2d54('0x26')]],{'showHidden':![],'depth':null}));this[_0x2d54('0x30')](util[_0x2d54('0x27')](_0x2d54('0x33'),_0x58f776[_0x2d54('0x23')]),_0x2d54('0x34'),this[_0x2d54('0x25')][_0x58f776[_0x2d54('0x22')]][_0x58f776[_0x2d54('0x26')]]);}}catch(_0x322f){logger[_0x2d54('0x35')](_0x2d54('0x36'),_0x58f776[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x322f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0xe')]=function(_0x392777){try{if(this[_0x2d54('0x1e')](_0x392777)){if(this[_0x2d54('0x25')][_0x392777['uniqueid']]){logger[_0x2d54('0x2f')](_0x2d54('0x37'),_0x392777[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x392777,{'showHidden':![],'depth':null}));for(var _0x3f04ab in this['channels'][_0x392777[_0x2d54('0x22')]]){if(this[_0x2d54('0x25')][_0x392777['uniqueid']]['hasOwnProperty'](_0x3f04ab)){if(_0x392777[_0x2d54('0x26')]===_0x3f04ab){logger[_0x2d54('0x20')](_0x2d54('0x38'),_0x392777[_0x2d54('0x22')],_0x392777[_0x2d54('0x23')],_0x392777[_0x2d54('0x26')]);this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x39')]=moment()[_0x2d54('0x27')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x3f04ab][_0x2d54('0x3a')]=_0x392777[_0x2d54('0x3a')];this['channels'][_0x392777[_0x2d54('0x22')]][_0x3f04ab]['connectedlinenum']=_0x392777['connectedlinenum'];this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x3b')]=_0x392777['destchannelstate'];this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x3f04ab][_0x2d54('0x3c')]=_0x392777[_0x2d54('0x3c')];this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x3d')]=_0x392777['holdtime'];this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x3e')]=_0x2d54('0x3f');_[_0x2d54('0x2c')](this['agents'][_0x392777[_0x2d54('0x40')]],_[_0x2d54('0x41')](_0x392777,['queue',_0x2d54('0x42')]));logger['debug'](_0x2d54('0x43'),_0x392777[_0x2d54('0x22')],util[_0x2d54('0x24')](this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x392777[_0x2d54('0x26')]],{'showHidden':![],'depth':null}));ami['emit'](_0x2d54('0x44'),this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x392777[_0x2d54('0x26')]]);logger['debug']('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:agentconnect\x20event:',_0x392777['uniqueid'],util[_0x2d54('0x24')](this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x392777[_0x2d54('0x26')]],{'showHidden':![],'depth':null}));this[_0x2d54('0x30')](util[_0x2d54('0x27')](_0x2d54('0x33'),_0x392777[_0x2d54('0x23')]),'user:agentconnect',this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x392777[_0x2d54('0x26')]]);}else if(!this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x10')]&&!this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x3f04ab][_0x2d54('0x45')]){logger[_0x2d54('0x20')]('[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere',_0x392777[_0x2d54('0x22')],this['channels'][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x23')],_0x3f04ab);this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x3f04ab][_0x2d54('0x10')]=!![];this['channels'][_0x392777[_0x2d54('0x22')]][_0x3f04ab]['agentringnoanswerAt']=moment()[_0x2d54('0x27')](_0x2d54('0x46'));this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab]['answeredelsewheredestinationuniqueid']=_0x392777[_0x2d54('0x26')];this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x47')]=_0x392777['membername'];this[_0x2d54('0x25')][_0x392777['uniqueid']][_0x3f04ab]['lastevent']=_0x2d54('0x48');this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab][_0x2d54('0x49')]=_0x2d54('0x48');logger[_0x2d54('0x2f')]('[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:',_0x392777['uniqueid'],util['inspect'](this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab],{'showHidden':![],'depth':null}));ami[_0x2d54('0x30')](_0x2d54('0x4a'),this[_0x2d54('0x25')][_0x392777[_0x2d54('0x22')]][_0x3f04ab]);}}}}}}catch(_0x3d9497){logger[_0x2d54('0x35')]('[%s][voiceAgentReport][agentconnect]',_0x392777['uniqueid'],util[_0x2d54('0x24')](_0x3d9497,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')]['syncAgentRingNoAnswer']=function(_0x32c7b5){try{if(this[_0x2d54('0x1e')](_0x32c7b5)){logger[_0x2d54('0x2f')](_0x2d54('0x4b'),_0x32c7b5[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x32c7b5,{'showHidden':![],'depth':null}));if(this[_0x2d54('0x25')][_0x32c7b5[_0x2d54('0x22')]]&&this['channels'][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5['destuniqueid']]){logger[_0x2d54('0x20')](_0x2d54('0x4c'),_0x32c7b5[_0x2d54('0x22')],_0x32c7b5[_0x2d54('0x23')],_0x32c7b5[_0x2d54('0x26')]);this[_0x2d54('0x25')][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5[_0x2d54('0x26')]][_0x2d54('0x10')]=!![];this[_0x2d54('0x25')][_0x32c7b5['uniqueid']][_0x32c7b5['destuniqueid']][_0x2d54('0x4d')]=moment()[_0x2d54('0x27')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x2d54('0x25')][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5[_0x2d54('0x26')]][_0x2d54('0x3e')]=_0x2d54('0x4e');this[_0x2d54('0x25')][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5[_0x2d54('0x26')]][_0x2d54('0x49')]=_0x2d54('0x4e');logger[_0x2d54('0x2f')](_0x2d54('0x4f'),_0x32c7b5[_0x2d54('0x22')],util['inspect'](this['channels'][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5[_0x2d54('0x26')]],{'showHidden':![],'depth':null}));ami[_0x2d54('0x30')](_0x2d54('0x50'),this[_0x2d54('0x25')][_0x32c7b5[_0x2d54('0x22')]][_0x32c7b5[_0x2d54('0x26')]]);}}}catch(_0x479f0d){logger[_0x2d54('0x35')](_0x2d54('0x51'),_0x32c7b5[_0x2d54('0x22')],util['inspect'](_0x479f0d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')]['syncQueueCallerAbandon']=function(_0x1df2d0){try{if(this[_0x2d54('0x1e')](_0x1df2d0)){logger[_0x2d54('0x2f')](_0x2d54('0x52'),_0x1df2d0[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x1df2d0,{'showHidden':![],'depth':null}));if(this['channels'][_0x1df2d0[_0x2d54('0x22')]]){for(var _0x1342e0 in this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]]){if(this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x2d54('0x53')](_0x1342e0)&&!this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x10')]&&!this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x45')]){logger[_0x2d54('0x20')](_0x2d54('0x54'),_0x1df2d0[_0x2d54('0x22')],this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0]['membername'],_0x1342e0);this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x10')]=!![];this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x4d')]=moment()[_0x2d54('0x27')](_0x2d54('0x46'));this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x3e')]='abandoned';this[_0x2d54('0x25')][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0][_0x2d54('0x49')]='abandoned';logger[_0x2d54('0x2f')](_0x2d54('0x55'),_0x1df2d0['uniqueid'],util[_0x2d54('0x24')](this['channels'][_0x1df2d0[_0x2d54('0x22')]][_0x1342e0],{'showHidden':![],'depth':null}));ami[_0x2d54('0x30')](_0x2d54('0x56'),this[_0x2d54('0x25')][_0x1df2d0['uniqueid']][_0x1342e0]);}}}}}catch(_0x497b92){logger[_0x2d54('0x35')](_0x2d54('0x57'),_0x1df2d0[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x497b92,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x12')]=function(_0x3cc0b2){try{if(this['isNotNull'](_0x3cc0b2)){logger[_0x2d54('0x2f')](_0x2d54('0x58'),_0x3cc0b2[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x3cc0b2,{'showHidden':![],'depth':null}));if(this[_0x2d54('0x25')][_0x3cc0b2['uniqueid']]){for(var _0x37baac in this['channels'][_0x3cc0b2['uniqueid']]){if(this[_0x2d54('0x25')][_0x3cc0b2['uniqueid']][_0x2d54('0x53')](_0x37baac)){if(this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac][_0x2d54('0x39')]&&!this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac][_0x2d54('0x45')]){logger[_0x2d54('0x20')]('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x3cc0b2[_0x2d54('0x22')],this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac][_0x2d54('0x23')],_0x37baac);this[_0x2d54('0x25')][_0x3cc0b2['uniqueid']][_0x37baac][_0x2d54('0x45')]=!![];this['channels'][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac]['agentcompleteAt']=moment()[_0x2d54('0x27')](_0x2d54('0x46'));this[_0x2d54('0x25')][_0x3cc0b2['uniqueid']][_0x37baac][_0x2d54('0x3e')]=_0x2d54('0x59');this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac][_0x2d54('0x49')]=_0x3cc0b2[_0x2d54('0x49')]==_0x2d54('0x5a')?_0x2d54('0x5b'):_0x3cc0b2[_0x2d54('0x49')];this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac]['talktime']=_0x3cc0b2[_0x2d54('0x5c')];if(this[_0x2d54('0x8')][_0x3cc0b2[_0x2d54('0x29')]]&&this[_0x2d54('0x8')][_0x3cc0b2[_0x2d54('0x29')]][_0x2d54('0x5d')]){this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac]['acwtime']=this['voiceQueues'][_0x3cc0b2['queue']][_0x2d54('0x5e')];this[_0x2d54('0x25')][_0x3cc0b2['uniqueid']][_0x37baac][_0x2d54('0x5f')]=!![];}this[_0x2d54('0x9')][_0x3cc0b2[_0x2d54('0x40')]]=_[_0x2d54('0x2d')](this[_0x2d54('0x9')][_0x3cc0b2['interface']],[_0x2d54('0x29'),_0x2d54('0x42')]);logger[_0x2d54('0x2f')](_0x2d54('0x60'),_0x3cc0b2[_0x2d54('0x22')],util[_0x2d54('0x24')](this['channels'][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac],{'showHidden':![],'depth':null}));ami['emit'](_0x2d54('0x61'),this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac]);logger[_0x2d54('0x2f')](_0x2d54('0x62'),_0x3cc0b2['uniqueid'],util[_0x2d54('0x24')](this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac],{'showHidden':![],'depth':null}));this[_0x2d54('0x30')](util[_0x2d54('0x27')](_0x2d54('0x33'),_0x3cc0b2[_0x2d54('0x23')]),_0x2d54('0x63'),this[_0x2d54('0x25')][_0x3cc0b2[_0x2d54('0x22')]][_0x37baac]);}}}}}}catch(_0x1726d0){logger[_0x2d54('0x35')]('[%s][voiceAgentReport][agentcomplete]',_0x3cc0b2[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x1726d0,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x2d54('0x13')]=function(_0x2cb176){try{if(this[_0x2d54('0x1e')](_0x2cb176)){logger[_0x2d54('0x2f')](_0x2d54('0x64'),_0x2cb176[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x2cb176,{'showHidden':![],'depth':null}));this['addVariable'](_0x2cb176['uniqueid'],_['keys'](_0x2cb176['variable'])[0x0],_0x2cb176[_0x2d54('0x65')]);if(this[_0x2d54('0x25')][_0x2cb176['uniqueid']]){for(var _0x523550 in this[_0x2d54('0x25')][_0x2cb176['uniqueid']]){if(this[_0x2d54('0x25')][_0x2cb176['uniqueid']][_0x2d54('0x53')](_0x523550)){logger[_0x2d54('0x20')]('[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s',_0x2cb176[_0x2d54('0x22')],_0x523550,_[_0x2d54('0x66')](_0x2cb176[_0x2d54('0x67')])[0x0],_0x2cb176['value']);if(_[_0x2d54('0x1f')](this[_0x2d54('0x25')][_0x2cb176[_0x2d54('0x22')]][_0x523550][_0x2d54('0xa')])){this[_0x2d54('0x25')][_0x2cb176[_0x2d54('0x22')]][_0x523550][_0x2d54('0xa')]={};}this['channels'][_0x2cb176[_0x2d54('0x22')]][_0x523550][_0x2d54('0xa')]=this[_0x2d54('0xa')][_0x2cb176[_0x2d54('0x22')]];}}}}}catch(_0x2adbd3){logger[_0x2d54('0x35')](_0x2d54('0x68'),_0x2cb176[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x2adbd3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x69')]=function(_0x226b0d,_0x564f76,_0x2de895){var _0x1ebe92=[_0x2d54('0x6a'),_0x2d54('0x6b'),_0x2d54('0x6c'),_0x2d54('0x6d'),_0x2d54('0x6e'),_0x2d54('0x6f'),_0x2d54('0x70'),_0x2d54('0x71'),_0x2d54('0x72'),_0x2d54('0x73'),_0x2d54('0x74'),_0x2d54('0x75'),_0x2d54('0x76'),_0x2d54('0x77'),_0x2d54('0x78'),_0x2d54('0x79'),_0x2d54('0x23'),_0x2d54('0x7a'),_0x2d54('0x7b')];if(!_['isNil'](_0x564f76)&&!_[_0x2d54('0x7c')](_0x1ebe92,_0x564f76)){if(_[_0x2d54('0x1f')](this[_0x2d54('0xa')][_0x226b0d])){this[_0x2d54('0xa')][_0x226b0d]={};}this[_0x2d54('0xa')][_0x226b0d][_0x564f76]=_0x2de895;}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x15')]=function(_0x307e0e){try{if(this['isNotNull'](_0x307e0e)){logger[_0x2d54('0x2f')]('[%s][voiceAgentReport][hangup]\x20event:',_0x307e0e[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x307e0e,{'showHidden':![],'depth':null}));if(this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]]){for(var _0x471f78 in this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]]){if(this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]][_0x2d54('0x53')](_0x471f78)){if(this[_0x2d54('0x25')][_0x307e0e['uniqueid']][_0x471f78][_0x2d54('0x49')]==_0x2d54('0x5a')&&this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]][_0x471f78][_0x2d54('0x45')]){logger['info'](_0x2d54('0x7d'),_0x307e0e[_0x2d54('0x22')],_0x471f78);this['channels'][_0x307e0e[_0x2d54('0x22')]][_0x471f78][_0x2d54('0x7e')]=moment()[_0x2d54('0x27')](_0x2d54('0x46'));}}}logger[_0x2d54('0x2f')]('[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:',_0x307e0e['uniqueid'],util[_0x2d54('0x24')](_['values'](this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]]),{'showHidden':![],'depth':null}));ami['emit'](_0x2d54('0x7f'),_[_0x2d54('0x80')](this[_0x2d54('0x25')][_0x307e0e['uniqueid']]));delete this[_0x2d54('0x25')][_0x307e0e[_0x2d54('0x22')]];}if(this[_0x2d54('0xa')][_0x307e0e[_0x2d54('0x22')]]){delete this[_0x2d54('0xa')][_0x307e0e[_0x2d54('0x22')]];}}}catch(_0x5d0149){logger[_0x2d54('0x35')](_0x2d54('0x81'),_0x307e0e[_0x2d54('0x22')],util['inspect'](_0x5d0149,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x1a')]=function(_0x3a4131){try{if(this[_0x2d54('0x1e')](_0x3a4131)){logger['debug'](_0x2d54('0x82'),_0x3a4131[_0x2d54('0x22')],util['inspect'](_0x3a4131,{'showHidden':![],'depth':null}));if(this[_0x2d54('0x25')][_0x3a4131['transfereeuniqueid']]){for(var _0x4381f8 in this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x83')]]){if(this['channels'][_0x3a4131[_0x2d54('0x83')]]['hasOwnProperty'](_0x4381f8)){if(_0x3a4131['origtransfereruniqueid']===_0x4381f8){logger['info']('[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x3a4131[_0x2d54('0x22')],this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x23')],_0x4381f8);var _0x2b3b45=moment();this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x45')]=!![];this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x7e')]=moment()[_0x2d54('0x27')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x3e')]=_0x2d54('0x59');this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x49')]=_0x2d54('0x5a');this[_0x2d54('0x25')][_0x3a4131['transfereeuniqueid']][_0x4381f8][_0x2d54('0x5c')]=_0x2b3b45[_0x2d54('0x84')](this['channels'][_0x3a4131[_0x2d54('0x83')]][_0x4381f8][_0x2d54('0x39')],_0x2d54('0x85'));}}}}if(this[_0x2d54('0x25')][_0x3a4131['secondtransfereruniqueid']]){var _0x4f3e99=this[_0x2d54('0x25')][_0x3a4131['secondtransfereruniqueid']];this[_0x2d54('0x25')][_0x3a4131[_0x2d54('0x86')]]=this['channels'][_0x3a4131[_0x2d54('0x83')]];this['channels'][_0x3a4131[_0x2d54('0x83')]]=_0x4f3e99;}}}catch(_0x3938b5){logger[_0x2d54('0x35')](_0x2d54('0x87'),_0x3a4131[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x3938b5,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x1c')]=function(_0x429558){try{if(this[_0x2d54('0x1e')](_0x429558)){logger[_0x2d54('0x2f')](_0x2d54('0x88'),_0x429558[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x429558,{'showHidden':![],'depth':null}));if(this['channels'][_0x429558[_0x2d54('0x83')]]){for(var _0x3632c3 in this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]]){if(this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]][_0x2d54('0x53')](_0x3632c3)){if(_0x429558[_0x2d54('0x89')]===_0x3632c3){logger[_0x2d54('0x20')](_0x2d54('0x8a'),_0x429558[_0x2d54('0x22')],this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]][_0x3632c3][_0x2d54('0x23')],_0x3632c3);var _0x533b4c=moment();this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]][_0x3632c3][_0x2d54('0x45')]=!![];this['channels'][_0x429558['transfereeuniqueid']][_0x3632c3][_0x2d54('0x7e')]=_0x533b4c;this['channels'][_0x429558[_0x2d54('0x83')]][_0x3632c3][_0x2d54('0x3e')]=_0x2d54('0x59');this['channels'][_0x429558[_0x2d54('0x83')]][_0x3632c3]['reason']=_0x2d54('0x5a');this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]][_0x3632c3]['talktime']=_0x533b4c[_0x2d54('0x84')](this[_0x2d54('0x25')][_0x429558[_0x2d54('0x83')]][_0x3632c3][_0x2d54('0x39')],'seconds');}}}}}}catch(_0x110dbf){logger[_0x2d54('0x35')]('[%s][voiceAgentReport][blindtransfer]',_0x429558['uniqueid'],util['inspect'](_0x110dbf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x8b')]=function(_0x52c568){var _0x48a4d6='';try{if(this['isNotNull'](_0x52c568)){logger['debug'](_0x2d54('0x8c'),_0x52c568[_0x2d54('0x22')],util['inspect'](_0x52c568,{'showHidden':![],'depth':null}));if(_0x52c568[_0x2d54('0x8d')]){_0x48a4d6=_0x52c568[_0x2d54('0x8d')][_0x2d54('0x8e')](0x0,_0x52c568['channel'][_0x2d54('0x8f')]('-'));if(this['agents'][_0x48a4d6]){logger['info']('[%s][voiceAgentReport][musiconholdstart]\x20interface:%s',_0x52c568[_0x2d54('0x22')],_0x48a4d6);this[_0x2d54('0x9')][_0x48a4d6][_0x2d54('0x90')]=!![];}}}}catch(_0x4f2d04){logger[_0x2d54('0x35')](_0x2d54('0x91'),_0x52c568[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x4f2d04,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x2d54('0x1d')][_0x2d54('0x18')]=function(_0x239222){var _0x4f3812='';try{if(this['isNotNull'](_0x239222)){logger[_0x2d54('0x2f')](_0x2d54('0x92'),_0x239222[_0x2d54('0x22')],util['inspect'](_0x239222,{'showHidden':![],'depth':null}));if(_0x239222[_0x2d54('0x8d')]){_0x4f3812=_0x239222[_0x2d54('0x8d')][_0x2d54('0x8e')](0x0,_0x239222[_0x2d54('0x8d')][_0x2d54('0x8f')]('-'));if(this[_0x2d54('0x9')][_0x4f3812]){logger[_0x2d54('0x20')](_0x2d54('0x93'),_0x239222[_0x2d54('0x22')],_0x4f3812);this[_0x2d54('0x9')][_0x4f3812][_0x2d54('0x90')]=![];}}}}catch(_0x51715e){logger['error'](_0x2d54('0x94'),_0x239222[_0x2d54('0x22')],util[_0x2d54('0x24')](_0x51715e,{'showHidden':![],'depth':null}));}};module[_0x2d54('0x95')]=VoiceAgentReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js index 4cb7b68..39ae536 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 _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 +var _0x3e74=['musiconholdstart','musiconholdstop','syncMusicOnHoldStop','info','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','prototype','isUndefined','emit','syncNewCallerId','isNotNull','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','uniqueid','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','merge','pick','keys','OutgoingSpoolFailed','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','context','exten','starttime','format','YYYY-MM-DD\x20HH:mm:ss','disposition','toNumber','from-sip','agents','channel','split','destconnectedlinenum','accountcode','user:%s','name','user:agentconnect','[%s][voiceCallReport][newchannel]','[%s][voiceCallReport][newexten]\x20event:','linkedid','toLowerCase','applicationdata','appdata','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','subtract','duration','seconds','includes','lastapplication','application','lastdata','startsWith','cdr(','match','queue','[%s][voiceCallReport][newexten]','[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s','channelstate','answered','holdtime','diff','xcally-motion-preview','connectedlinenum','connectedlinename','destinationchannel','UserId','membername','[%s][voiceCallReport][newstate]','syncMixMonitorFilename','monitor','endsWith','.wav49','replace','.WAV','monitorFilename','find','monitors','isNil','push','rec','[%s][voiceCallReport][varset]\x20event:','variable','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','value','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','type','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','destination','xmd-callerid-preview','[%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','mixmonitor_filename','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','syncHangup','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','then','transferType','isEmpty','getSettings','stopRecordingOnTransfer','resolve','catch','Action','StopMixMonitor','finally','event','BlindTransfer','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','custom:voiceCallReport','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transfercalleridnum','origtransferercalleridnum','transferconnectedlinenum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','origtransfererlinkedid','some','routeid','ATTENDED','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','extension','[%s][voiceCallReport][blindtransfer]\x20event:','BLIND','transfererchannel','transfereruniqueid','[%s][voiceCallReport][blindtransfer]','syncMusicOnHoldStart','[%s][voiceCallReport][musiconholdstart]\x20event:','answertime','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstop]\x20event:','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','mohtime','[%s][voiceCallReport][musiconholdstop]','exports','bluebird','moment','util','path','../../../config/logger','../ami','../model/channel','../rpc/setting','unknown','not_inuse','busy','invalid','unavailable','ringing','ringinuse','set','dial','playback','NO\x20ANSWER','FAILED','ANSWERED','BUSY','redis','defaults','channels','blindTransfers','coreshowchannel','syncNewExten','bind','newchannel','syncNewChannel','newstate','syncNewState','varset','syncVarSet','hangup','newcallerid','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer'];(function(_0x2ec1b6,_0x46a5d1){var _0x30d54c=function(_0x165a40){while(--_0x165a40){_0x2ec1b6['push'](_0x2ec1b6['shift']());}};_0x30d54c(++_0x46a5d1);}(_0x3e74,0x175));var _0x43e7=function(_0x589a17,_0x40da2f){_0x589a17=_0x589a17-0x0;var _0x264ea4=_0x3e74[_0x589a17];return _0x264ea4;};'use strict';var BPromise=require(_0x43e7('0x0'));var _=require('lodash');var moment=require(_0x43e7('0x1'));var util=require(_0x43e7('0x2'));var path=require(_0x43e7('0x3'));var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0x43e7('0x4'))('ami');var ami=require(_0x43e7('0x5'));var Channel=require(_0x43e7('0x6'));var RpcSetting=require(_0x43e7('0x7'));var statusDesc=[_0x43e7('0x8'),_0x43e7('0x9'),'inuse',_0x43e7('0xa'),_0x43e7('0xb'),_0x43e7('0xc'),_0x43e7('0xd'),_0x43e7('0xe'),'onhold'];var applications=[_0x43e7('0xf'),'queue','agi',_0x43e7('0x10'),_0x43e7('0x11'),'voicemail'];var dispositions=[_0x43e7('0x12'),'FAILED',_0x43e7('0x13'),_0x43e7('0x12'),'NO\x20ANSWER',_0x43e7('0x12'),_0x43e7('0x14'),_0x43e7('0x15'),_0x43e7('0x13'),'FAILED','FAILED'];var actions={};config[_0x43e7('0x16')]=_[_0x43e7('0x17')](config[_0x43e7('0x16')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x43e7('0x16')]));function VoiceCallReport(_0x14c146){this[_0x43e7('0x18')]=_0x14c146[_0x43e7('0x18')];this['agents']=_0x14c146['agents'];this[_0x43e7('0x19')]={};ami['on'](_0x43e7('0x1a'),this[_0x43e7('0x1b')]['bind'](this));ami['on']('newexten',this[_0x43e7('0x1b')][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x1d'),this[_0x43e7('0x1e')][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x1f'),this[_0x43e7('0x20')][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x21'),this[_0x43e7('0x22')][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x23'),this['syncHangup'][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x24'),this['syncNewCallerId'][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x25'),this[_0x43e7('0x26')][_0x43e7('0x1c')](this));ami['on'](_0x43e7('0x27'),this[_0x43e7('0x28')]['bind'](this));ami['on'](_0x43e7('0x29'),this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0x43e7('0x2a'),this[_0x43e7('0x2b')]['bind'](this));try{logger[_0x43e7('0x2c')]('[voiceCallReport][coreshowchannels]\x20started');ami[_0x43e7('0x2d')]();}catch(_0x5c5e67){logger[_0x43e7('0x2e')](_0x43e7('0x2f'),util[_0x43e7('0x30')](_0x5c5e67,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x43e7('0x31')]['isNotNull']=function(_0x52b7b3){return _0x52b7b3!==null&&!_[_0x43e7('0x32')](_0x52b7b3);};VoiceCallReport['prototype'][_0x43e7('0x33')]=function(_0x40dc8f,_0x3565cf,_0xb1fc63){io['to'](_0x40dc8f)['emit'](_0x3565cf,_0xb1fc63);};VoiceCallReport[_0x43e7('0x31')][_0x43e7('0x34')]=function(_0x45b675){try{if(this[_0x43e7('0x35')](_0x45b675)){logger[_0x43e7('0x2c')](_0x43e7('0x36'),_0x45b675[_0x43e7('0x37')],_0x45b675[_0x43e7('0x38')],_0x45b675[_0x43e7('0x39')]);logger[_0x43e7('0x3a')](_0x43e7('0x3b'),_0x45b675[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x45b675,{'showHidden':![],'depth':null}));if(_0x45b675[_0x43e7('0x37')]===_0x45b675['linkedid']){if(!_[_0x43e7('0x32')](this[_0x43e7('0x18')][_0x45b675[_0x43e7('0x37')]])){_[_0x43e7('0x3c')](this[_0x43e7('0x18')][_0x45b675['uniqueid']],_[_0x43e7('0x3d')](_0x45b675,_[_0x43e7('0x3e')](this[_0x43e7('0x18')][_0x45b675[_0x43e7('0x37')]])));}}}}catch(_0x4c61b9){logger['error']('[%s][voiceCallReport][newcallerid]',_0x45b675[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x4c61b9,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')][_0x43e7('0x1e')]=function(_0x108313){try{if(this[_0x43e7('0x35')](_0x108313)){logger['debug']('[%s][voiceCallReport][newchannel]\x20event:',_0x108313['uniqueid'],util['inspect'](_0x108313,{'showHidden':![],'depth':null}));if(_0x108313['uniqueid']===_0x108313['linkedid']&&_0x108313['channel']!=_0x43e7('0x3f')){if(_['isUndefined'](this[_0x43e7('0x18')][_0x108313[_0x43e7('0x37')]])){logger[_0x43e7('0x2c')](_0x43e7('0x40'),_0x108313[_0x43e7('0x37')],_0x108313[_0x43e7('0x41')],_0x108313[_0x43e7('0x42')]);this['channels'][_0x108313['uniqueid']]=new Channel();this['channels'][_0x108313[_0x43e7('0x37')]][_0x43e7('0x43')]=moment()[_0x43e7('0x44')](_0x43e7('0x45'));this[_0x43e7('0x18')][_0x108313[_0x43e7('0x37')]][_0x43e7('0x46')]=dispositions[_[_0x43e7('0x47')](_0x108313['channelstate'])];_[_0x43e7('0x3c')](this[_0x43e7('0x18')][_0x108313['uniqueid']],_[_0x43e7('0x3d')](_0x108313,_['keys'](this[_0x43e7('0x18')][_0x108313[_0x43e7('0x37')]])));if(_0x108313[_0x43e7('0x41')]===_0x43e7('0x48')){if(this[_0x43e7('0x49')][_0x108313[_0x43e7('0x4a')]['split']('-')[0x0]]){this['agents'][_0x108313[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]][_0x43e7('0x4c')]=_0x108313[_0x43e7('0x42')];logger[_0x43e7('0x3a')]('[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:',_0x108313[_0x43e7('0x37')],util[_0x43e7('0x30')]({'destaccountcode':this['agents'][_0x108313[_0x43e7('0x4a')]['split']('-')[0x0]][_0x43e7('0x4d')],'destconnectedlinenum':_0x108313['exten']},{'showHidden':![],'depth':null}));this[_0x43e7('0x33')](util[_0x43e7('0x44')](_0x43e7('0x4e'),this[_0x43e7('0x49')][_0x108313['channel']['split']('-')[0x0]][_0x43e7('0x4f')]),_0x43e7('0x50'),{'destaccountcode':this[_0x43e7('0x49')][_0x108313[_0x43e7('0x4a')]['split']('-')[0x0]]['accountcode'],'destconnectedlinenum':_0x108313['exten']});}}}}}}catch(_0x35e4fb){logger['error'](_0x43e7('0x51'),_0x108313['uniqueid'],util['inspect'](_0x35e4fb,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')]['syncNewExten']=function(_0x2de14f){try{if(this[_0x43e7('0x35')](_0x2de14f)){logger[_0x43e7('0x3a')](_0x43e7('0x52'),_0x2de14f['uniqueid'],util[_0x43e7('0x30')](_0x2de14f,{'showHidden':![],'depth':null}));if(_0x2de14f[_0x43e7('0x37')]===_0x2de14f[_0x43e7('0x53')]&&_0x2de14f[_0x43e7('0x42')]!='h'&&_0x2de14f[_0x43e7('0x4a')]!=_0x43e7('0x3f')){_0x2de14f['application']=_0x2de14f['application'][_0x43e7('0x54')]();_0x2de14f[_0x43e7('0x55')]=(_0x2de14f[_0x43e7('0x56')]||_0x2de14f['applicationdata'])['toLowerCase']();logger['info'](_0x43e7('0x57'),_0x2de14f[_0x43e7('0x37')],_0x2de14f['application'],_0x2de14f[_0x43e7('0x55')]);if(_[_0x43e7('0x32')](this[_0x43e7('0x18')][_0x2de14f['uniqueid']])){this['channels'][_0x2de14f['uniqueid']]=new Channel();this['channels'][_0x2de14f[_0x43e7('0x37')]][_0x43e7('0x43')]=_0x2de14f['duration']?moment()[_0x43e7('0x58')](moment[_0x43e7('0x59')](_0x2de14f[_0x43e7('0x59')])[_0x43e7('0x5a')](),'seconds')[_0x43e7('0x44')]('YYYY-MM-DD\x20HH:mm:ss'):moment()['format'](_0x43e7('0x45'));this[_0x43e7('0x18')][_0x2de14f[_0x43e7('0x37')]][_0x43e7('0x46')]=_0x43e7('0x12');}_[_0x43e7('0x3c')](this[_0x43e7('0x18')][_0x2de14f[_0x43e7('0x37')]],_[_0x43e7('0x3d')](_0x2de14f,_[_0x43e7('0x3e')](this['channels'][_0x2de14f[_0x43e7('0x37')]])));if(_[_0x43e7('0x5b')](applications,_0x2de14f['application'])){this[_0x43e7('0x18')][_0x2de14f['uniqueid']][_0x43e7('0x5c')]=_0x2de14f[_0x43e7('0x5d')];this[_0x43e7('0x18')][_0x2de14f[_0x43e7('0x37')]][_0x43e7('0x5e')]=_0x2de14f['applicationdata'];if(_0x2de14f['application']===_0x43e7('0xf')&&_[_0x43e7('0x5f')](_0x2de14f[_0x43e7('0x55')],_0x43e7('0x60'))){var _0x23d835=_0x2de14f[_0x43e7('0x55')][_0x43e7('0x4b')]('=');var _0x44f8a0=_0x23d835[0x0][_0x43e7('0x61')](/cdr\((.*)\)/);if(_0x44f8a0){this[_0x43e7('0x18')][_0x2de14f[_0x43e7('0x37')]][_0x44f8a0[0x1]]=_0x23d835[0x1];}}else if(_0x2de14f['application']===_0x43e7('0x62')){this[_0x43e7('0x18')][_0x2de14f['uniqueid']][_0x43e7('0x62')]=_0x2de14f[_0x43e7('0x55')][_0x43e7('0x4b')](',')[0x0];}}}}}catch(_0x558d54){logger['error'](_0x43e7('0x63'),_0x2de14f[_0x43e7('0x37')],util['inspect'](_0x558d54,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')]['syncNewState']=function(_0x49a6ce){try{if(this[_0x43e7('0x35')](_0x49a6ce)){logger[_0x43e7('0x2c')](_0x43e7('0x64'),_0x49a6ce[_0x43e7('0x37')],_0x49a6ce[_0x43e7('0x53')],_0x49a6ce['calleridname'],_0x49a6ce[_0x43e7('0x39')]);logger[_0x43e7('0x3a')]('[%s][voiceCallReport][newstate]\x20event:',_0x49a6ce[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x49a6ce,{'showHidden':![],'depth':null}));if(_0x49a6ce[_0x43e7('0x37')]!==_0x49a6ce['linkedid']){if(this['channels'][_0x49a6ce['linkedid']]){if(_0x49a6ce[_0x43e7('0x65')]==='6'){if(!this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x66')]){var _0x52ea9c=moment();this['channels'][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x66')]=!![];this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]]['answertime']=_0x52ea9c[_0x43e7('0x44')](_0x43e7('0x45'));if(this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x43')]){this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x67')]=_0x52ea9c[_0x43e7('0x68')](this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]]['starttime'],'seconds');}}this[_0x43e7('0x18')][_0x49a6ce['linkedid']]['linkedid']=_0x49a6ce['uniqueid'];if(_0x49a6ce[_0x43e7('0x39')]!==_0x43e7('0x69')){this['channels'][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x6a')]=_0x49a6ce[_0x43e7('0x39')];}this['channels'][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x6b')]=_0x49a6ce[_0x43e7('0x38')];this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x6c')]=_0x49a6ce[_0x43e7('0x4a')];this['channels'][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x46')]=dispositions[_[_0x43e7('0x47')](_0x49a6ce['channelstate'])];if(this['agents'][_0x49a6ce[_0x43e7('0x4a')]['split']('-')[0x0]]){this['channels'][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x6d')]=this['agents'][_0x49a6ce[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]]['id'];this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x53')]][_0x43e7('0x6e')]=this[_0x43e7('0x49')][_0x49a6ce[_0x43e7('0x4a')]['split']('-')[0x0]][_0x43e7('0x4f')];}}}}else{if(this[_0x43e7('0x18')][_0x49a6ce['uniqueid']]){if(_0x49a6ce[_0x43e7('0x65')]==='6'){if(this['agents'][_0x49a6ce[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]]){this[_0x43e7('0x18')][_0x49a6ce[_0x43e7('0x37')]]['UserId']=this[_0x43e7('0x49')][_0x49a6ce[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]]['id'];this['channels'][_0x49a6ce[_0x43e7('0x37')]][_0x43e7('0x6e')]=this[_0x43e7('0x49')][_0x49a6ce[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]]['name'];}}}}}}catch(_0xb51897){logger[_0x43e7('0x2e')](_0x43e7('0x6f'),_0x49a6ce[_0x43e7('0x37')],util[_0x43e7('0x30')](_0xb51897,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')][_0x43e7('0x70')]=function(_0x5efcd6,_0x499ee9){try{if(this[_0x43e7('0x18')][_0x5efcd6]){logger['info']('[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s',_0x5efcd6,_0x499ee9);this['channels'][_0x5efcd6][_0x43e7('0x71')]=!![];if(_[_0x43e7('0x72')](_0x499ee9,_0x43e7('0x73'))){_0x499ee9=_0x499ee9[_0x43e7('0x74')](_0x43e7('0x73'),_0x43e7('0x75'));}this['channels'][_0x5efcd6][_0x43e7('0x76')]=_0x499ee9;var _0x1ead5b=_[_0x43e7('0x77')](this['channels'][_0x5efcd6][_0x43e7('0x78')],{'filename':_0x499ee9});if(_[_0x43e7('0x79')](_0x1ead5b)){this[_0x43e7('0x18')][_0x5efcd6][_0x43e7('0x78')][_0x43e7('0x7a')]({'filename':_0x499ee9,'createdAt':moment()[_0x43e7('0x44')](_0x43e7('0x45')),'mixmonitorid':'','status':_0x43e7('0x7b')});}}}catch(_0x57b4b4){logger['error']('[%s][voiceCallReport][mixMonitorFilename]',_0x5efcd6,util[_0x43e7('0x30')](_0x57b4b4,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')]['syncVarSet']=function(_0x3fe23f){try{if(this[_0x43e7('0x35')](_0x3fe23f)){logger[_0x43e7('0x3a')](_0x43e7('0x7c'),_0x3fe23f['uniqueid'],util['inspect'](_0x3fe23f,{'showHidden':![],'depth':null}));if(this['channels'][_0x3fe23f[_0x43e7('0x37')]]&&_0x3fe23f[_0x43e7('0x4a')]!='OutgoingSpoolFailed'){if(this['isNotNull'](_0x3fe23f[_0x43e7('0x7d')])){if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')]['mixmonitor_filename'])){logger[_0x43e7('0x2c')](_0x43e7('0x7e'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f[_0x43e7('0x7f')]);this['syncMixMonitorFilename'](_0x3fe23f[_0x43e7('0x37')],_0x3fe23f['value']);}else if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x80')])){logger[_0x43e7('0x2c')](_0x43e7('0x81'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f[_0x43e7('0x7f')]);this['channels'][_0x3fe23f[_0x43e7('0x37')]][_0x43e7('0x39')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this[_0x43e7('0x35')](_0x3fe23f['variable']['xmd-callerid'])){logger['info'](_0x43e7('0x82'),_0x3fe23f['uniqueid'],_0x3fe23f[_0x43e7('0x7f')]);this[_0x43e7('0x18')][_0x3fe23f[_0x43e7('0x37')]][_0x43e7('0x83')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x84')])){logger[_0x43e7('0x2c')](_0x43e7('0x85'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f['value']);this[_0x43e7('0x18')][_0x3fe23f[_0x43e7('0x37')]][_0x43e7('0x86')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this[_0x43e7('0x35')](_0x3fe23f['variable']['xmd-queue'])){logger[_0x43e7('0x2c')](_0x43e7('0x87'),_0x3fe23f['uniqueid'],_0x3fe23f[_0x43e7('0x7f')][_0x43e7('0x4b')](',')[0x0]);this['channels'][_0x3fe23f['uniqueid']][_0x43e7('0x62')]=_0x3fe23f[_0x43e7('0x7f')][_0x43e7('0x4b')](',')[0x0];}else if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')]['xmd-originatecalleridnum'])){logger['info'](_0x43e7('0x88'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f[_0x43e7('0x7f')]);this[_0x43e7('0x18')][_0x3fe23f['uniqueid']][_0x43e7('0x89')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')]['xmd-destination'])){logger[_0x43e7('0x2c')](_0x43e7('0x8a'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f[_0x43e7('0x7f')]);this[_0x43e7('0x18')][_0x3fe23f['uniqueid']][_0x43e7('0x8b')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this['isNotNull'](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x8c')])){logger[_0x43e7('0x2c')](_0x43e7('0x8d'),_0x3fe23f['uniqueid'],_0x3fe23f[_0x43e7('0x7f')]);this['channels'][_0x3fe23f[_0x43e7('0x37')]][_0x43e7('0x8e')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x8f')])){logger[_0x43e7('0x2c')](_0x43e7('0x90'),_0x3fe23f[_0x43e7('0x37')],_0x3fe23f['value']);this[_0x43e7('0x18')][_0x3fe23f[_0x43e7('0x37')]][_0x43e7('0x62')]=_0x3fe23f[_0x43e7('0x7f')];}else if(this['isNotNull'](_0x3fe23f['variable'][_0x43e7('0x91')])){logger[_0x43e7('0x2c')](_0x43e7('0x92'),_0x3fe23f['uniqueid'],_0x3fe23f[_0x43e7('0x7f')]);this['channels'][_0x3fe23f['uniqueid']]['sipcalluniqueid']=_0x3fe23f[_0x43e7('0x7f')];}}}else if(this['isNotNull'](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x93')])){if(_0x3fe23f[_0x43e7('0x7f')]){var _0x2fea54=path[_0x43e7('0x94')](_0x3fe23f['value'])['name'];logger[_0x43e7('0x2c')](_0x43e7('0x7e'),_0x2fea54,_0x3fe23f['value']);this[_0x43e7('0x70')](_0x2fea54,_0x3fe23f[_0x43e7('0x7f')]);}}else if(this[_0x43e7('0x18')][_0x3fe23f[_0x43e7('0x53')]]){if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')])){if(this[_0x43e7('0x35')](_0x3fe23f[_0x43e7('0x7d')][_0x43e7('0x91')])){logger[_0x43e7('0x2c')](_0x43e7('0x92'),_0x3fe23f[_0x43e7('0x53')],_0x3fe23f[_0x43e7('0x7f')]);this[_0x43e7('0x18')][_0x3fe23f[_0x43e7('0x53')]][_0x43e7('0x95')]=_0x3fe23f[_0x43e7('0x7f')];}}}}}catch(_0x3036ff){logger[_0x43e7('0x2e')](_0x43e7('0x96'),_0x3fe23f[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x3036ff,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x43e7('0x97')]=function(_0x3c8b27){try{if(this[_0x43e7('0x35')](_0x3c8b27)){logger[_0x43e7('0x3a')]('[%s][voiceCallReport][hangup]\x20event:',_0x3c8b27[_0x43e7('0x37')],util['inspect'](_0x3c8b27,{'showHidden':![],'depth':null}));if(this[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]]){logger[_0x43e7('0x2c')](_0x43e7('0x98'),_0x3c8b27[_0x43e7('0x37')],_0x3c8b27[_0x43e7('0x99')]);var _0x4cdfcf=moment();this[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x9a')]=_0x4cdfcf[_0x43e7('0x44')](_0x43e7('0x45'));this['channels'][_0x3c8b27['uniqueid']][_0x43e7('0x59')]=_0x4cdfcf['diff'](this[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x43')],_0x43e7('0x5a'));if(this['channels'][_0x3c8b27['uniqueid']]['answered']){this[_0x43e7('0x18')][_0x3c8b27['uniqueid']]['billableseconds']=_0x4cdfcf['diff'](this[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]]['answertime'],_0x43e7('0x5a'));this['channels'][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x67')]=this[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x59')]-this['channels'][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x9b')];}if(_0x3c8b27[_0x43e7('0x41')]==='from-sip'){if(this['agents'][_0x3c8b27[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]]){this[_0x43e7('0x49')][_0x3c8b27[_0x43e7('0x4a')]['split']('-')[0x0]]=_[_0x43e7('0x9c')](this[_0x43e7('0x49')][_0x3c8b27[_0x43e7('0x4a')]['split']('-')[0x0]],[_0x43e7('0x4c')]);logger[_0x43e7('0x3a')](_0x43e7('0x9d'),_0x3c8b27[_0x43e7('0x37')],util['inspect']({'destaccountcode':this[_0x43e7('0x49')][_0x3c8b27['channel'][_0x43e7('0x4b')]('-')[0x0]][_0x43e7('0x4d')]},{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x43e7('0x4e'),this[_0x43e7('0x49')][_0x3c8b27[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]][_0x43e7('0x4f')]),_0x43e7('0x9e'),{'destaccountcode':this[_0x43e7('0x49')][_0x3c8b27[_0x43e7('0x4a')][_0x43e7('0x4b')]('-')[0x0]][_0x43e7('0x4d')]});}}var _0x615c=this;Promise['resolve']()[_0x43e7('0x9f')](function(){var _0x57e151=_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]];if(typeof _0x57e151[_0x43e7('0xa0')]==='undefined')return;if(_[_0x43e7('0xa1')](_0x57e151[_0x43e7('0x78')]))return;return RpcSetting[_0x43e7('0xa2')]()[_0x43e7('0x9f')](function(_0x5c34b7){if(!_0x5c34b7[_0x43e7('0xa3')])return;return Promise[_0x43e7('0xa4')]()['then'](function(){return ami['Action']({'action':'StopMixMonitor','channel':_0x57e151[_0x43e7('0x4a')]})[_0x43e7('0xa5')](function(){});})[_0x43e7('0x9f')](function(){return ami[_0x43e7('0xa6')]({'action':_0x43e7('0xa7'),'channel':_0x57e151[_0x43e7('0x6c')]})[_0x43e7('0xa5')](function(){})[_0x43e7('0xa8')](function(){var _0x5c458a=_0x615c[_0x43e7('0x49')][_0x57e151[_0x43e7('0x6c')][_0x43e7('0x4b')]('-')[0x0]];if(!_0x5c458a)return;io[_0x43e7('0x33')]('webbar:stopmonitors',{'agentId':_0x5c458a['id'],'uniqueid':_0x57e151['uniqueid']});});});});})[_0x43e7('0x9f')](function(){if(_0x3c8b27[_0x43e7('0xa9')]===_0x43e7('0xaa')){_0x615c[_0x43e7('0x19')][_0x3c8b27['uniqueid']]=_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]];}else{if(_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x86')]===_0x43e7('0xab')&&_0x615c['blindTransfers'][_0x3c8b27[_0x43e7('0x37')]]){_0x615c['channels'][_0x3c8b27['uniqueid']][_0x43e7('0x37')]=[_0x615c[_0x43e7('0x18')][_0x3c8b27['uniqueid']]['linkedid'],_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]]['linkedid']=_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]][_0x43e7('0x37')]][0x0];delete _0x615c[_0x43e7('0x19')][_0x3c8b27['uniqueid']];}}logger['debug'](_0x43e7('0xac'),_0x3c8b27[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x615c['channels'][_0x3c8b27['uniqueid']],{'showHidden':![],'depth':null}));ami[_0x43e7('0x33')](_0x43e7('0xad'),_0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]]);delete _0x615c[_0x43e7('0x18')][_0x3c8b27[_0x43e7('0x37')]];});}}}catch(_0x20bfa0){logger[_0x43e7('0x2e')]('[%s][voiceCallReport][hangup]',_0x3c8b27['uniqueid'],util['inspect'](_0x20bfa0,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')]['syncAttendedTransfer']=function(_0xd01836){try{if(this[_0x43e7('0x35')](_0xd01836)){logger[_0x43e7('0x2c')](_0x43e7('0xae'),_0xd01836[_0x43e7('0x37')],_0xd01836['origtransferercalleridnum'],_0xd01836[_0x43e7('0xaf')]);logger[_0x43e7('0x3a')](_0x43e7('0xb0'),_0xd01836[_0x43e7('0x37')],util['inspect'](_0xd01836,{'showHidden':![],'depth':null}));if(this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb1')]]){this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb1')]][_0x43e7('0xb2')]=_0xd01836[_0x43e7('0xb3')];this[_0x43e7('0x18')][_0xd01836['transfereeuniqueid']][_0x43e7('0xb4')]=_0xd01836[_0x43e7('0xaf')];if(this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb5')]]){var _0x3c52d3=this['channels'][_0xd01836[_0x43e7('0xb5')]];this[_0x43e7('0x18')][_0xd01836['secondtransfereruniqueid']]=this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb1')]];this['channels'][_0xd01836[_0x43e7('0xb1')]]=_0x3c52d3;}}else if(this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb6')]]){this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb6')]]['transfercalleridnum']=_0xd01836[_0x43e7('0xb3')];this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb6')]]['transferconnectedlinenum']=_0xd01836[_0x43e7('0xaf')];if(this[_0x43e7('0x18')][_0xd01836['origtransfereruniqueid']]){var _0x3c52d3=this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb7')]];this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb7')]]=this[_0x43e7('0x18')][_0xd01836['transfertargetuniqueid']];this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb6')]]=_0x3c52d3;}}if((this[_0x43e7('0x18')][_0xd01836['origtransfereruniqueid']]||this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb8')]])&&this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb5')]]){var _0x1a89f0=_[_0x43e7('0xb9')]([this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb7')]],this[_0x43e7('0x18')][_0xd01836['origtransfererlinkedid']],this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb5')]]],function(_0x343317){return _0x343317&&_0x343317[_0x43e7('0x86')]===_0x43e7('0xab')&&_0x343317[_0x43e7('0xba')];});if(_0x1a89f0){if(this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb7')]])this['channels'][_0xd01836[_0x43e7('0xb7')]][_0x43e7('0xa0')]=_0x43e7('0xbb');if(this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb8')]])this['channels'][_0xd01836[_0x43e7('0xb8')]][_0x43e7('0xa0')]=_0x43e7('0xbb');this[_0x43e7('0x18')][_0xd01836[_0x43e7('0xb5')]]['transferType']=_0x43e7('0xbb');}}}}catch(_0x4ea6da){logger[_0x43e7('0x2e')](_0x43e7('0xbc'),_0xd01836[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x4ea6da,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x43e7('0x28')]=function(_0x139d17){try{if(this[_0x43e7('0x35')](_0x139d17)){logger[_0x43e7('0x2c')](_0x43e7('0xbd'),_0x139d17[_0x43e7('0x37')],_0x139d17[_0x43e7('0xbe')],_0x139d17[_0x43e7('0xbf')]);logger[_0x43e7('0x3a')](_0x43e7('0xc0'),_0x139d17[_0x43e7('0x37')],util['inspect'](_0x139d17,{'showHidden':![],'depth':null}));if(this['channels'][_0x139d17[_0x43e7('0xb1')]]){this['channels'][_0x139d17['transfereeuniqueid']][_0x43e7('0xb2')]=_0x139d17[_0x43e7('0xbe')];this['channels'][_0x139d17[_0x43e7('0xb1')]]['transferconnectedlinenum']=_0x139d17['extension'];this['channels'][_0x139d17[_0x43e7('0xb1')]][_0x43e7('0xa0')]=_0x43e7('0xc1');this[_0x43e7('0x97')]({'event':_0x43e7('0xaa'),'uniqueid':_0x139d17[_0x43e7('0xb1')],'context':_0x139d17[_0x43e7('0x41')],'channel':_0x139d17[_0x43e7('0xc2')]});}else{this[_0x43e7('0x18')][_0x139d17[_0x43e7('0xc3')]][_0x43e7('0xa0')]=_0x43e7('0xc1');}}}catch(_0x129d76){logger[_0x43e7('0x2e')](_0x43e7('0xc4'),_0x139d17[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x129d76,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x43e7('0x31')][_0x43e7('0xc5')]=function(_0x3dc065){try{if(this['isNotNull'](_0x3dc065)){logger[_0x43e7('0x3a')](_0x43e7('0xc6'),_0x3dc065['uniqueid'],util[_0x43e7('0x30')](_0x3dc065,{'showHidden':![],'depth':null}));if(this[_0x43e7('0x18')][_0x3dc065[_0x43e7('0x37')]]){if(!_[_0x43e7('0x79')](this['channels'][_0x3dc065[_0x43e7('0x37')]][_0x43e7('0xc7')])){this['channels'][_0x3dc065[_0x43e7('0x37')]][_0x43e7('0xc8')]=moment()[_0x43e7('0x44')]('YYYY-MM-DD\x20HH:mm:ss');logger[_0x43e7('0x2c')](_0x43e7('0xc9'),_0x3dc065[_0x43e7('0x37')],this[_0x43e7('0x18')][_0x3dc065[_0x43e7('0x37')]]['mohstarttime']);}}}}catch(_0x33b63b){logger[_0x43e7('0x2e')]('[%s][voiceCallReport][musiconholdstart]',_0x3dc065[_0x43e7('0x37')],util['inspect'](_0x33b63b,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncMusicOnHoldStop']=function(_0x5486a6){try{if(this[_0x43e7('0x35')](_0x5486a6)){logger[_0x43e7('0x3a')](_0x43e7('0xca'),_0x5486a6[_0x43e7('0x37')],util['inspect'](_0x5486a6,{'showHidden':![],'depth':null}));if(this['channels'][_0x5486a6[_0x43e7('0x37')]]){if(!_['isNil'](this[_0x43e7('0x18')][_0x5486a6['uniqueid']][_0x43e7('0xc8')])){this['channels'][_0x5486a6['uniqueid']]['mohtime']+=moment()['milliseconds'](0x0)[_0x43e7('0x68')](this[_0x43e7('0x18')][_0x5486a6[_0x43e7('0x37')]]['mohstarttime'],_0x43e7('0x5a'));logger[_0x43e7('0x2c')](_0x43e7('0xcb'),_0x5486a6['uniqueid'],this[_0x43e7('0x18')][_0x5486a6[_0x43e7('0x37')]][_0x43e7('0xcc')]);delete this[_0x43e7('0x18')][_0x5486a6['uniqueid']][_0x43e7('0xc8')];}}}}catch(_0x536b7d){logger[_0x43e7('0x2e')](_0x43e7('0xcd'),_0x5486a6[_0x43e7('0x37')],util[_0x43e7('0x30')](_0x536b7d,{'showHidden':![],'depth':null}));}};module[_0x43e7('0xce')]=VoiceCallReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceDialReport.js b/server/services/ami/report/voiceDialReport.js index 9b925b6..62d6188 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 _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 +var _0x4916=['[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','voice_outbound:save','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','linkedid','destuniqueid','[%s][voiceDialReport][hangup]','exports','lodash','moment','util','../../../config/environment','../../../config/logger','ami','../ami','redis','defaults','localhost','socket.io-emitter','channels','outbound','variables','syncDialBegin','bind','dialend','varset','syncVarSet','prototype','emit','isNotNull','inspect','uniqueid','merge','format','YYYY-MM-DD\x20HH:mm:ss','called','substring','channel','lastIndexOf','omit','privilege','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','membername','voice:outbound','debug','[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:','custom:dialbegin','[%s][voiceDialReport][dialbegin]','dialstatus','connectedlinenum','connectedlinename','answertime','lastevent','connect','[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','voice_outbound_channel:save','error','[%s][voiceDialReport][dialend]','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','value','variable','outboundrouteid','isUndefined','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrttbridged','sipcallid','sipuri','membercalls','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','duration','endtime','starttime','seconds','complete','total','answered','holdtime','diff','billableseconds','sumHoldTime','sumBillable','sumDuration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','custom:voiceDialReport'];(function(_0x48d6a3,_0x37c848){var _0x38bfa0=function(_0x3fba2e){while(--_0x3fba2e){_0x48d6a3['push'](_0x48d6a3['shift']());}};_0x38bfa0(++_0x37c848);}(_0x4916,0x130));var _0x6491=function(_0x1174b0,_0x161a36){_0x1174b0=_0x1174b0-0x0;var _0x2d112b=_0x4916[_0x1174b0];return _0x2d112b;};'use strict';var _=require(_0x6491('0x0'));var moment=require(_0x6491('0x1'));var util=require(_0x6491('0x2'));var Redis=require('ioredis');var config=require(_0x6491('0x3'));var logger=require(_0x6491('0x4'))(_0x6491('0x5'));var ami=require(_0x6491('0x6'));config[_0x6491('0x7')]=_[_0x6491('0x8')](config['redis'],{'host':_0x6491('0x9'),'port':0x18eb});var io=require(_0x6491('0xa'))(new Redis(config[_0x6491('0x7')]));function VoiceDialReport(_0x52e9f3){this[_0x6491('0xb')]=_0x52e9f3['outboundChannels'];this['outbound']=_0x52e9f3[_0x6491('0xc')];this[_0x6491('0xd')]={};ami['on']('dialbegin',this[_0x6491('0xe')][_0x6491('0xf')](this));ami['on'](_0x6491('0x10'),this['syncDialEnd'][_0x6491('0xf')](this));ami['on'](_0x6491('0x11'),this[_0x6491('0x12')][_0x6491('0xf')](this));ami['on']('hangup',this['syncHangup'][_0x6491('0xf')](this));}VoiceDialReport['prototype']['isNotNull']=function(_0x5f5c8f){return _0x5f5c8f!==null&&!_['isUndefined'](_0x5f5c8f);};VoiceDialReport[_0x6491('0x13')][_0x6491('0x14')]=function(_0x357d0e,_0x5df9f8,_0x529cb3){io['to'](_0x357d0e)['emit'](_0x5df9f8,_0x529cb3);};VoiceDialReport[_0x6491('0x13')]['syncDialBegin']=function(_0x100312){try{if(this[_0x6491('0x15')](_0x100312)){logger['debug']('[%s][voiceDialReport][dialbegin]\x20event:',_0x100312['uniqueid'],util[_0x6491('0x16')](_0x100312,{'showHidden':![],'depth':null}));if(this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]]){_[_0x6491('0x18')](this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]],{'starttime':moment()[_0x6491('0x19')](_0x6491('0x1a')),'lastevent':_0x6491('0x1b'),'interface':_0x100312['channel'][_0x6491('0x1c')](0x0,_0x100312[_0x6491('0x1d')][_0x6491('0x1e')]('-')),'membername':_0x100312['channel'][_0x6491('0x1c')](_0x100312['channel'][_0x6491('0x1e')]('/')+0x1,_0x100312[_0x6491('0x1d')][_0x6491('0x1e')]('-'))},_[_0x6491('0x1f')](_0x100312,['event',_0x6491('0x20')]));logger[_0x6491('0x21')](_0x6491('0x22'),_0x100312[_0x6491('0x17')],this[_0x6491('0xb')][_0x100312['uniqueid']][_0x6491('0x23')],this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]]['interface']);logger['debug']('[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:',_0x100312[_0x6491('0x17')],util[_0x6491('0x16')](this['channels'][_0x100312['uniqueid']],{'showHidden':![],'depth':null}));this[_0x6491('0x14')](_0x6491('0x24'),'voice_outbound_channel:save',this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]]);logger[_0x6491('0x25')](_0x6491('0x26'),_0x100312[_0x6491('0x17')],util['inspect'](this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]],{'showHidden':![],'depth':null}));ami['emit'](_0x6491('0x27'),this[_0x6491('0xb')][_0x100312[_0x6491('0x17')]]);}}}catch(_0x431fa5){logger['error'](_0x6491('0x28'),_0x100312[_0x6491('0x17')],util[_0x6491('0x16')](_0x431fa5,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x6491('0x13')]['syncDialEnd']=function(_0x29c034){try{if(this[_0x6491('0x15')](_0x29c034)){logger['debug']('[%s][voiceDialReport][dialend]\x20event:',_0x29c034[_0x6491('0x17')],util[_0x6491('0x16')](_0x29c034,{'showHidden':![],'depth':null}));if(this[_0x6491('0xb')][_0x29c034['uniqueid']]){this['channels'][_0x29c034['uniqueid']][_0x6491('0x29')]=_0x29c034[_0x6491('0x29')];if(_0x29c034[_0x6491('0x29')]==='ANSWER'){this[_0x6491('0xb')][_0x29c034[_0x6491('0x17')]]['connectedlinenum']=_0x29c034[_0x6491('0x2a')];this['channels'][_0x29c034[_0x6491('0x17')]]['connectedlinename']=_0x29c034[_0x6491('0x2b')];this[_0x6491('0xb')][_0x29c034[_0x6491('0x17')]][_0x6491('0x2c')]=moment()[_0x6491('0x19')](_0x6491('0x1a'));this[_0x6491('0xb')][_0x29c034['uniqueid']][_0x6491('0x2d')]=_0x6491('0x2e');logger[_0x6491('0x21')]('[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect',_0x29c034['uniqueid'],_0x29c034[_0x6491('0x1d')][_0x6491('0x1c')](_0x29c034[_0x6491('0x1d')]['lastIndexOf']('/')+0x1,_0x29c034[_0x6491('0x1d')][_0x6491('0x1e')]('-')));logger[_0x6491('0x25')](_0x6491('0x2f'),_0x29c034[_0x6491('0x17')],util[_0x6491('0x16')](this['channels'][_0x29c034[_0x6491('0x17')]],{'showHidden':![],'depth':null}));ami[_0x6491('0x14')]('custom:dialconnect',this[_0x6491('0xb')][_0x29c034[_0x6491('0x17')]]);}logger[_0x6491('0x25')](_0x6491('0x30'),_0x29c034[_0x6491('0x17')],util[_0x6491('0x16')](this[_0x6491('0xb')][_0x29c034[_0x6491('0x17')]],{'showHidden':![],'depth':null}));this[_0x6491('0x14')](_0x6491('0x24'),_0x6491('0x31'),this['channels'][_0x29c034[_0x6491('0x17')]]);}}}catch(_0x5ae478){logger[_0x6491('0x32')](_0x6491('0x33'),_0x29c034[_0x6491('0x17')],util[_0x6491('0x16')](_0x5ae478,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x6491('0x13')][_0x6491('0x12')]=function(_0x320915){try{if(this[_0x6491('0x15')](_0x320915)){logger[_0x6491('0x25')](_0x6491('0x34'),_0x320915['uniqueid'],util[_0x6491('0x16')](_0x320915,{'showHidden':![],'depth':null}));this[_0x6491('0x35')](_0x320915[_0x6491('0x17')],_[_0x6491('0x36')](_0x320915['variable'])[0x0],_0x320915[_0x6491('0x37')]);if(this['isNotNull'](_0x320915[_0x6491('0x38')])&&this[_0x6491('0x15')](_0x320915[_0x6491('0x38')][_0x6491('0x39')])){if(_[_0x6491('0x3a')](this[_0x6491('0xb')][_0x320915[_0x6491('0x17')]])){this[_0x6491('0xb')][_0x320915[_0x6491('0x17')]]={'routeId':_0x320915['value'],'variables':this[_0x6491('0xd')][_0x320915[_0x6491('0x17')]]};logger[_0x6491('0x21')](_0x6491('0x3b'),_0x320915[_0x6491('0x17')],_0x320915[_0x6491('0x38')][_0x6491('0x39')],_['keys'](_0x320915[_0x6491('0x38')])[0x0],_0x320915[_0x6491('0x37')]);logger[_0x6491('0x25')](_0x6491('0x3c'),_0x320915['uniqueid'],util['inspect'](this[_0x6491('0xb')][_0x320915['uniqueid']],{'showHidden':![],'depth':null}));this[_0x6491('0x14')](_0x6491('0x24'),_0x6491('0x31'),this[_0x6491('0xb')][_0x320915['uniqueid']]);}}}}catch(_0x51d76b){logger[_0x6491('0x32')]('[%s][voiceDialReport][varset]',_0x320915['uniqueid'],util['inspect'](_0x51d76b,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x6491('0x13')][_0x6491('0x35')]=function(_0x7678f,_0x1a9b91,_0x59268c){var _0x73b679=[_0x6491('0x3d'),_0x6491('0x3e'),_0x6491('0x3f'),_0x6491('0x40'),_0x6491('0x41'),'rtpaudioqoslossbridged','rtpaudioqosrtt',_0x6491('0x42'),_0x6491('0x43'),_0x6491('0x44'),'bridgepeer','bridgepvtcallid',_0x6491('0x45'),'memberdynamic',_0x6491('0x46'),_0x6491('0x47'),'membername',_0x6491('0x48'),_0x6491('0x49')];if(!_[_0x6491('0x4a')](_0x1a9b91)&&!_['includes'](_0x73b679,_0x1a9b91)){if(_['isUndefined'](this[_0x6491('0xd')][_0x7678f])){this[_0x6491('0xd')][_0x7678f]={};}this[_0x6491('0xd')][_0x7678f][_0x1a9b91]=_0x59268c;}};VoiceDialReport[_0x6491('0x13')]['syncHangup']=function(_0x33faf3){try{if(this['isNotNull'](_0x33faf3)){logger[_0x6491('0x25')](_0x6491('0x4b'),_0x33faf3[_0x6491('0x17')],util['inspect'](_0x33faf3,{'showHidden':![],'depth':null}));if(this['channels'][_0x33faf3[_0x6491('0x17')]]){logger[_0x6491('0x21')](_0x6491('0x4c'),_0x33faf3[_0x6491('0x17')],_0x33faf3['cause-txt']);this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]['endtime']=moment()[_0x6491('0x19')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x4d')]=moment(this['channels'][_0x33faf3['uniqueid']][_0x6491('0x4e')])['diff'](this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x4f')],_0x6491('0x50'));this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]['lastevent']=_0x6491('0x51');this[_0x6491('0xc')][_0x6491('0x52')]+=0x1;if(this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]['answertime']){this['outbound'][_0x6491('0x53')]+=0x1;this['channels'][_0x33faf3[_0x6491('0x17')]][_0x6491('0x54')]=moment(this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x2c')])[_0x6491('0x55')](this[_0x6491('0xb')][_0x33faf3['uniqueid']][_0x6491('0x4f')],_0x6491('0x50'));this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x56')]=moment(this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x4e')])['diff'](this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]][_0x6491('0x2c')],_0x6491('0x50'));this[_0x6491('0xc')][_0x6491('0x57')]+=this['channels'][_0x33faf3[_0x6491('0x17')]]['holdtime']||0x0;this[_0x6491('0xc')][_0x6491('0x58')]+=this['channels'][_0x33faf3[_0x6491('0x17')]][_0x6491('0x56')];}this['outbound'][_0x6491('0x59')]+=this[_0x6491('0xb')][_0x33faf3['uniqueid']][_0x6491('0x4d')];logger[_0x6491('0x25')](_0x6491('0x5a'),_0x33faf3[_0x6491('0x17')],util['inspect'](this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]],{'showHidden':![],'depth':null}));ami[_0x6491('0x14')](_0x6491('0x5b'),this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]);logger['debug']('[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:',_0x33faf3[_0x6491('0x17')],util[_0x6491('0x16')](this['channels'][_0x33faf3['uniqueid']],{'showHidden':![],'depth':null}));ami[_0x6491('0x14')]('custom:dialend',this[_0x6491('0xb')][_0x33faf3['uniqueid']]);logger[_0x6491('0x25')](_0x6491('0x5c'),_0x33faf3[_0x6491('0x17')],util[_0x6491('0x16')](this['channels'][_0x33faf3[_0x6491('0x17')]],{'showHidden':![],'depth':null}));this[_0x6491('0x14')](_0x6491('0x24'),_0x6491('0x5d'),this['outbound']);logger[_0x6491('0x21')]('[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event',JSON['stringify'](this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]));logger[_0x6491('0x25')](_0x6491('0x5e'),_0x33faf3[_0x6491('0x17')],util[_0x6491('0x16')](this['channels'][_0x33faf3[_0x6491('0x17')]],{'showHidden':![],'depth':null}));this['emit'](_0x6491('0x24'),'voice_outbound_channel:remove',this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]]);delete this[_0x6491('0xb')][_0x33faf3[_0x6491('0x17')]];}else if(this[_0x6491('0xb')][_0x33faf3[_0x6491('0x5f')]]){this[_0x6491('0xb')][_0x33faf3[_0x6491('0x5f')]][_0x6491('0x17')]=this[_0x6491('0xb')][_0x33faf3[_0x6491('0x5f')]][_0x6491('0x60')];}if(this[_0x6491('0xd')][_0x33faf3['uniqueid']]){delete this['variables'][_0x33faf3[_0x6491('0x17')]];}}}catch(_0x4709cf){logger['error'](_0x6491('0x61'),_0x33faf3['uniqueid'],util[_0x6491('0x16')](_0x4709cf,{'showHidden':![],'depth':null}));}};module[_0x6491('0x62')]=VoiceDialReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceQueueReport.js b/server/services/ami/report/voiceQueueReport.js index 4d5721e..41e6c1b 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 _0x2502=['[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','hangup','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','ATTENDED','transferexten','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','ATTENDEDTRANSFER','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','[%s][voiceQueueReport][blindtransfer]','extension','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','syncMusicOnHoldStop','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','exports','util','md5','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','redis','defaults','localhost','socket.io-emitter','prototype','enqueue','tail','sequence','queueReports','agents','channels','queueChannels','voiceQueues','flagQueueSummary','campaigns','queuesummary','bind','queuesummarycomplete','syncQueueSummaryComplete','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','varset','syncHangup','fullybooted','musiconholdstart','syncMusicOnHoldStart','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','pTalking','waiting','queueStatusComplete','unlockRR','clearZombieChannels','switch','isNil','Action','status','channel','catch','message','No\x20such\x20channel','error','inspect','[%s][voiceQueueReport][checkQueueReport]','variables','[%s][voiceQueueReport][checkVariables]','syncFullyBooted','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','clearqueuereport','emit','debug',']\x20sending\x20voice_queue_channel:save\x20event:','uniqueid','format','voice:queue:%s','name','voice_queue_channel:save','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:remove\x20event:','voice_queue_channel:remove','voice_queue_presence:remove','emitVoiceQueueSummary','type','inbound','strategy','answered','available','sumBillable','sumDuration','sumHoldTime','total','unmanaged','abandoned','Trunk','active','callerid','Interval','stringify','[voiceQueueReport][',']\x20sending\x20voice_queue:save\x20event:','voice_queue:save','isNotNull','isUndefined','queues','[voiceQueueReport][queues]','then','syncQueueSummary','[voiceQueueReport][queuesummary]\x20event:','info','[voiceQueueReport][queuesummary]\x20name:%s','queue','callers','toNumber','loggedin','loggedIn','[voiceQueueReport][queuesummary]','[voiceQueueReport][queuesummarycomplete]\x20event:','syncQueueCallerJoin','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','merge','emitVoiceQueueChannelSave','queuecallerjoin','last','queuecallercomplete','queuecallercompleteAt','holdtime','originalposition','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','queuecallerexitreason','COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','queuecallerabandonAt','assigned','queuecallerexit','queuecallerexitAt','reason','transfer','COMPLETED','startsWith','local/','linkedid','add','seconds','FORWARDTRANSFER','transfertype','FORWARD','destexten','transferuniqueid','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','syncVarSet','[%s][voiceQueueReport][varset]','addVariable','keys','variable','value','queuestatus','CONTINUE','TIMEOUT','timeout','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberinterface','memberlastcall','membername','memberpenalty','[%s][voiceQueueReport][hangup]','length','diff','milliseconds','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','lastevent'];(function(_0x3da76b,_0x329c30){var _0x5e6f01=function(_0x3a09c2){while(--_0x3a09c2){_0x3da76b['push'](_0x3da76b['shift']());}};_0x5e6f01(++_0x329c30);}(_0x2502,0x1f1));var _0x2250=function(_0x43c3cb,_0x322b75){_0x43c3cb=_0x43c3cb-0x0;var _0x87566d=_0x2502[_0x43c3cb];return _0x87566d;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0x2250('0x0'));var md5=require(_0x2250('0x1'));var Redis=require(_0x2250('0x2'));var config=require(_0x2250('0x3'));var logger=require(_0x2250('0x4'))(_0x2250('0x5'));var ami=require(_0x2250('0x6'));var QueueReport=require(_0x2250('0x7'));config[_0x2250('0x8')]=_[_0x2250('0x9')](config[_0x2250('0x8')],{'host':_0x2250('0xa'),'port':0x18eb});var io=require(_0x2250('0xb'))(new Redis(config[_0x2250('0x8')]));var Sequence=function(){};Sequence[_0x2250('0xc')][_0x2250('0xd')]=function(_0x4bbdc9){this['tail']=this['tail']?this[_0x2250('0xe')]['finally'](_0x4bbdc9):_0x4bbdc9();};function VoiceQueueReport(_0x568570){this[_0x2250('0xf')]=new Sequence();this[_0x2250('0x10')]={};this[_0x2250('0x11')]=_0x568570[_0x2250('0x11')];this[_0x2250('0x12')]=_0x568570[_0x2250('0x13')];this[_0x2250('0x14')]=_0x568570['voiceQueues'];this[_0x2250('0x15')]=!![];this['campaigns']=_0x568570[_0x2250('0x16')];this['variables']={};ami['on'](_0x2250('0x17'),this['syncQueueSummary'][_0x2250('0x18')](this));ami['on'](_0x2250('0x19'),this[_0x2250('0x1a')][_0x2250('0x18')](this));ami['on']('queuecallerjoin',this['syncQueueCallerJoin'][_0x2250('0x18')](this));ami['on'](_0x2250('0x1b'),this[_0x2250('0x1c')][_0x2250('0x18')](this));ami['on'](_0x2250('0x1d'),this[_0x2250('0x1e')][_0x2250('0x18')](this));ami['on'](_0x2250('0x1f'),this[_0x2250('0x20')][_0x2250('0x18')](this));ami['on'](_0x2250('0x21'),this[_0x2250('0x22')][_0x2250('0x18')](this));ami['on'](_0x2250('0x23'),this['syncVarSet'][_0x2250('0x18')](this));ami['on']('hangup',this[_0x2250('0x24')][_0x2250('0x18')](this));ami['on'](_0x2250('0x25'),this['syncFullyBooted'][_0x2250('0x18')](this));ami['on'](_0x2250('0x26'),this[_0x2250('0x27')]['bind'](this));ami['on']('musiconholdstop',this['syncMusicOnHoldStop'][_0x2250('0x18')](this));ami['on'](_0x2250('0x28'),this[_0x2250('0x29')][_0x2250('0x18')](this));ami['on'](_0x2250('0x2a'),this[_0x2250('0x2b')]['bind'](this));this[_0x2250('0x2c')]();this[_0x2250('0x2d')]();}function clearChannels(_0x41e54d){if(!_[_0x2250('0x2e')](_0x41e54d)){for(var _0xcda53b in _0x41e54d){if(_0x41e54d['hasOwnProperty'](_0xcda53b)){delete _0x41e54d[_0xcda53b];}}}}function clearCampaigns(_0x2c28ec){if(!_['isEmpty'](_0x2c28ec)){for(var _0x39f45e in _0x2c28ec){if(_0x2c28ec[_0x2250('0x2f')](_0x39f45e)){_0x2c28ec[_0x39f45e][_0x2250('0x30')]=0x0;}}}}function clearVoiceQueues(_0x4330d3){if(!_[_0x2250('0x2e')](_0x4330d3)){for(var _0x2dc5d7 in _0x4330d3){if(_0x4330d3[_0x2250('0x2f')](_0x2dc5d7)){_0x4330d3[_0x2dc5d7][_0x2250('0x30')]=0x0;_0x4330d3[_0x2dc5d7][_0x2250('0x31')]=0x0;_0x4330d3[_0x2dc5d7][_0x2250('0x32')]=0x0;_0x4330d3[_0x2dc5d7][_0x2250('0x33')]=0x0;_0x4330d3[_0x2dc5d7][_0x2250('0x34')]=!![];}}}}function clearAgentBooked(_0x170455){if(!_[_0x2250('0x2e')](_0x170455)){for(var _0x2cbaf2 in _0x170455){if(_0x170455['hasOwnProperty'](_0x2cbaf2)){_0x170455[_0x2cbaf2][_0x2250('0x35')]=!![];}}}}VoiceQueueReport['prototype'][_0x2250('0x36')]=function(){var _0xef63f7=this;for(var _0x5d0055 in this[_0x2250('0x12')]){if(this[_0x2250('0x12')][_0x2250('0x2f')](_0x5d0055)&&!this['channels'][_0x5d0055][_0x2250('0x37')]){this[_0x2250('0xf')][_0x2250('0xd')](function(){if(!_[_0x2250('0x38')](_0xef63f7[_0x2250('0x12')][_0x5d0055])){return ami[_0x2250('0x39')]({'action':_0x2250('0x3a'),'channel':_0xef63f7[_0x2250('0x12')][_0x5d0055][_0x2250('0x3b')]})[_0x2250('0x3c')](function(_0x422497){if(_0x422497[_0x2250('0x3d')]===_0x2250('0x3e')){setTimeout(function(){if(_0xef63f7[_0x2250('0x12')][_0x5d0055]){delete _0xef63f7[_0x2250('0x12')][_0x5d0055];logger[_0x2250('0x3f')]('[%s][voiceQueueReport][checkChannel]',_0x5d0055,util[_0x2250('0x40')](_0x422497,{'showHidden':![],'depth':null}));}if(_0xef63f7[_0x2250('0x10')][_0x5d0055]){delete _0xef63f7[_0x2250('0x10')][_0x5d0055];logger[_0x2250('0x3f')](_0x2250('0x41'),_0x5d0055,util[_0x2250('0x40')](_0x422497,{'showHidden':![],'depth':null}));}if(_0xef63f7[_0x2250('0x42')][_0x5d0055]){delete _0xef63f7['variables'][_0x5d0055];logger[_0x2250('0x3f')](_0x2250('0x43'),_0x5d0055,util[_0x2250('0x40')](_0x422497,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport['prototype'][_0x2250('0x44')]=function(){logger['error'](_0x2250('0x45'));clearChannels(this[_0x2250('0x12')]);this[_0x2250('0x46')](this[_0x2250('0x10')]);clearAgentBooked(this[_0x2250('0x11')]);clearVoiceQueues(this[_0x2250('0x14')]);clearCampaigns(this[_0x2250('0x16')]);};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x46')]=function(_0x3d7b45){var _0x4d0bee=this;if(!_[_0x2250('0x2e')](_0x3d7b45)){for(var _0x3e460b in _0x3d7b45){if(_0x3d7b45['hasOwnProperty'](_0x3e460b)){_0x4d0bee[_0x2250('0x47')](_0x3d7b45[_0x3e460b],_0x2250('0x48'));delete _0x3d7b45[_0x3e460b];}}}};VoiceQueueReport['prototype']['emit']=function(_0x13ef54,_0x5b9089,_0x5d0e80){io['to'](_0x13ef54)[_0x2250('0x49')](_0x5b9089,_0x5d0e80);};VoiceQueueReport['prototype']['emitVoiceQueueChannelSave']=function(_0x5d1bc3,_0x59ea97){logger[_0x2250('0x4a')]('[%s][voiceQueueReport]['+_0x59ea97+_0x2250('0x4b'),_0x5d1bc3[_0x2250('0x4c')],util[_0x2250('0x40')](_0x5d1bc3,{'showHidden':![],'depth':null}));this[_0x2250('0x49')](util[_0x2250('0x4d')](_0x2250('0x4e'),_0x5d1bc3[_0x2250('0x4f')]),_0x2250('0x50'),_0x5d1bc3);io['emit']('voice_queue_presence:save',_0x5d1bc3);};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x47')]=function(_0x3de45a,_0x983d92){logger['debug'](_0x2250('0x51')+_0x983d92+_0x2250('0x52'),_0x3de45a[_0x2250('0x4c')],util[_0x2250('0x40')](_0x3de45a,{'showHidden':![],'depth':null}));this[_0x2250('0x49')](util[_0x2250('0x4d')](_0x2250('0x4e'),_0x3de45a['name']),_0x2250('0x53'),_0x3de45a);io[_0x2250('0x49')](_0x2250('0x54'),_0x3de45a);};VoiceQueueReport['prototype'][_0x2250('0x55')]=function(_0x2ec929,_0x466b7c){if(_0x2ec929[_0x2250('0x56')]===_0x2250('0x57')){var _0x65432c={'id':_0x2ec929['id'],'name':_0x2ec929[_0x2250('0x4f')],'strategy':_0x2ec929[_0x2250('0x58')],'answered':_0x2ec929[_0x2250('0x59')],'available':_0x2ec929[_0x2250('0x5a')],'loggedIn':_0x2ec929['loggedIn'],'pTalking':_0x2ec929[_0x2250('0x32')],'sumBillable':_0x2ec929[_0x2250('0x5b')],'sumDuration':_0x2ec929[_0x2250('0x5c')],'sumHoldTime':_0x2ec929[_0x2250('0x5d')]||0x0,'talking':_0x2ec929[_0x2250('0x31')],'total':_0x2ec929[_0x2250('0x5e')],'type':_0x2ec929['type'],'unmanaged':_0x2ec929[_0x2250('0x5f')],'abandoned':_0x2ec929[_0x2250('0x60')],'waiting':_0x2ec929['waiting']};if(_0x2ec929[_0x2250('0x61')]){_0x65432c['Trunk']={'id':_0x2ec929['Trunk']['id'],'name':_0x2ec929[_0x2250('0x61')][_0x2250('0x4f')],'active':_0x2ec929[_0x2250('0x61')][_0x2250('0x62')],'callerid':_0x2ec929['Trunk'][_0x2250('0x63')]};}if(_0x2ec929[_0x2250('0x64')]){_0x65432c['Interval']={'id':_0x2ec929['Interval']['id'],'name':_0x2ec929[_0x2250('0x64')][_0x2250('0x4f')]};}var _0x1490fa=md5(JSON[_0x2250('0x65')](_0x65432c));if(_0x2ec929[_0x2250('0x1')]!==_0x1490fa){_0x2ec929['md5']=_0x1490fa;logger[_0x2250('0x4a')](_0x2250('0x66')+_0x466b7c+_0x2250('0x67'),util['inspect'](_0x65432c,{'showHidden':![],'depth':null}));this['emit'](util['format'](_0x2250('0x4e'),_0x65432c[_0x2250('0x4f')]),_0x2250('0x68'),_0x65432c);}}};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x69')]=function(_0x2da977){return _0x2da977!==null&&!_[_0x2250('0x6a')](_0x2da977);};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x2d')]=function(){var _0x4972bc=this;setInterval(function(){_0x4972bc[_0x2250('0x36')]();ami[_0x2250('0x39')]({'action':_0x2250('0x6b')})['catch'](function(_0x3fefbd){logger[_0x2250('0x3f')](_0x2250('0x6c'),util['inspect'](_0x3fefbd,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x2c')]=function(){var _0x50bec4=this;setInterval(function(){if(_0x50bec4[_0x2250('0x15')]){return ami[_0x2250('0x39')]({'action':'queuesummary'})[_0x2250('0x6d')](function(_0x450bbc){_0x50bec4['flagQueueSummary']=![];})['catch'](function(_0x2dd8ad){logger[_0x2250('0x3f')]('[voiceQueueReport][queuesummary]',util[_0x2250('0x40')](_0x2dd8ad,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x2250('0xc')][_0x2250('0x6e')]=function(_0x4d9468){try{if(this['isNotNull'](_0x4d9468)&&this[_0x2250('0x69')](_0x4d9468['queue'])){logger[_0x2250('0x4a')](_0x2250('0x6f'),util[_0x2250('0x40')](_0x4d9468,{'showHidden':![],'depth':null}));if(this[_0x2250('0x14')][_0x4d9468['queue']]){logger[_0x2250('0x70')](_0x2250('0x71'),_0x4d9468['queue']);var _0x259441=_['countBy'](this[_0x2250('0x12')],_0x2250('0x72'))[_0x4d9468[_0x2250('0x72')]]||0x0;var _0x42a4eb=_0x259441-_0x4d9468[_0x2250('0x73')];if(this[_0x2250('0x14')][_0x4d9468['queue']][_0x2250('0x33')]!==_[_0x2250('0x74')](_0x4d9468['callers'])||this[_0x2250('0x14')][_0x4d9468['queue']]['loggedIn']!==_[_0x2250('0x74')](_0x4d9468[_0x2250('0x75')])||this['voiceQueues'][_0x4d9468['queue']][_0x2250('0x5a')]!==_['toNumber'](_0x4d9468[_0x2250('0x5a')])||this[_0x2250('0x14')][_0x4d9468['queue']][_0x2250('0x31')]!==_0x42a4eb){this[_0x2250('0x14')][_0x4d9468[_0x2250('0x72')]]['waiting']=_['toNumber'](_0x4d9468[_0x2250('0x73')]);this['voiceQueues'][_0x4d9468[_0x2250('0x72')]][_0x2250('0x76')]=_[_0x2250('0x74')](_0x4d9468[_0x2250('0x75')]);this[_0x2250('0x14')][_0x4d9468[_0x2250('0x72')]][_0x2250('0x5a')]=_[_0x2250('0x74')](_0x4d9468['available']);this[_0x2250('0x14')][_0x4d9468[_0x2250('0x72')]]['talking']=_0x42a4eb>0x0?_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={};_0x1abcd30x0?_0x491d96:0x0;this[_0x55ed('0x16')][_0x4011c0['queue']]['talking']=this['voiceQueues'][_0x4011c0['queue']][_0x55ed('0x32')]>_[_0x55ed('0x68')](_0x4011c0['loggedin'])?_[_0x55ed('0x68')](_0x4011c0[_0x55ed('0x69')]):this[_0x55ed('0x16')][_0x4011c0['queue']][_0x55ed('0x32')];this[_0x55ed('0x4f')](this['voiceQueues'][_0x4011c0[_0x55ed('0x62')]],_0x55ed('0x19'));}logger[_0x55ed('0x44')](_0x55ed('0x6b'),util[_0x55ed('0x3e')](this[_0x55ed('0x16')][_0x4011c0['queue']],{'showHidden':![],'depth':null}));ami['emit'](_0x55ed('0x6c'),this[_0x55ed('0x16')][_0x4011c0[_0x55ed('0x62')]]);}}}catch(_0x5c926a){logger[_0x55ed('0x3c')](_0x55ed('0x6d'),util[_0x55ed('0x3e')](_0x5c926a,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')][_0x55ed('0x1c')]=function(_0x277eeb){logger[_0x55ed('0x44')]('[voiceQueueReport][queuesummarycomplete]\x20event:',util[_0x55ed('0x3e')](_0x277eeb,{'showHidden':![],'depth':null}));this['flagQueueSummary']=!![];};VoiceQueueReport[_0x55ed('0xd')][_0x55ed('0x1e')]=function(_0x20ba81){try{if(this['isNotNull'](_0x20ba81)){logger[_0x55ed('0x44')](_0x55ed('0x6e'),_0x20ba81[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x20ba81,{'showHidden':![],'depth':null}));if(_[_0x55ed('0x70')](this[_0x55ed('0x12')][_0x20ba81['uniqueid']])){this['queueReports'][_0x20ba81[_0x55ed('0x6f')]]=[];this[_0x55ed('0x14')][_0x20ba81[_0x55ed('0x6f')]]={};}var _0x1ac9d0=new QueueReport();_0x1ac9d0['name']=_0x20ba81[_0x55ed('0x62')];_0x1ac9d0[_0x55ed('0x56')]=this[_0x55ed('0x16')][_0x1ac9d0[_0x55ed('0x4c')]]&&this[_0x55ed('0x16')][_0x1ac9d0['name']][_0x55ed('0x56')]?this['voiceQueues'][_0x1ac9d0[_0x55ed('0x4c')]][_0x55ed('0x56')]||'inbound':_0x55ed('0x50');_0x1ac9d0[_0x55ed('0x62')]=_0x20ba81[_0x55ed('0x62')];_0x1ac9d0['queuecallerjoinAt']=moment()['format'](_0x55ed('0x71'));_0x1ac9d0[_0x55ed('0x72')]=_0x20ba81[_0x55ed('0x72')];_0x1ac9d0[_0x55ed('0x73')]=_0x20ba81[_0x55ed('0x73')];_0x1ac9d0[_0x55ed('0x6f')]=_0x20ba81['uniqueid'];logger[_0x55ed('0x64')](_0x55ed('0x74'),_0x1ac9d0[_0x55ed('0x4c')],_0x1ac9d0['type']);_[_0x55ed('0x75')](_0x1ac9d0,_[_0x55ed('0x76')](_0x20ba81,_[_0x55ed('0x77')](_0x1ac9d0)));this[_0x55ed('0x12')][_0x20ba81[_0x55ed('0x6f')]]['push'](_0x1ac9d0);this[_0x55ed('0x14')][_0x20ba81['uniqueid']]=_0x1ac9d0;this[_0x55ed('0x43')](_0x1ac9d0,_0x55ed('0x1d'));}}catch(_0x1105f2){logger[_0x55ed('0x3c')](_0x55ed('0x6e'),_0x20ba81['uniqueid'],util[_0x55ed('0x3e')](_0x1105f2,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')][_0x55ed('0x78')]=function(_0x4ddba7){try{if(this[_0x55ed('0x79')](_0x4ddba7)){logger['debug'](_0x55ed('0x7a'),_0x4ddba7[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x4ddba7,{'showHidden':![],'depth':null}));if(this[_0x55ed('0x12')][_0x4ddba7[_0x55ed('0x6f')]]){var _0x50c98d=_[_0x55ed('0x7b')](this[_0x55ed('0x12')][_0x4ddba7['uniqueid']]);_0x50c98d[_0x55ed('0x7c')]=![];_0x50c98d[_0x55ed('0x7d')]=null;_0x50c98d['holdtime']=_0x4ddba7[_0x55ed('0x7e')];_0x50c98d[_0x55ed('0x7f')]=_0x4ddba7[_0x55ed('0x7f')];_0x50c98d['queuecallerabandon']=!![];_0x50c98d[_0x55ed('0x80')]=moment()[_0x55ed('0x48')](_0x55ed('0x71'));_0x50c98d['queuecallerexitreason']=_0x55ed('0x81');_0x50c98d[_0x55ed('0x82')]=null;logger[_0x55ed('0x64')]('[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s',_0x50c98d[_0x55ed('0x4c')],_0x50c98d[_0x55ed('0x56')]);this[_0x55ed('0x14')][_0x4ddba7[_0x55ed('0x6f')]]=_0x50c98d;this['emitVoiceQueueChannelRemove'](_0x50c98d,_0x55ed('0x1f'));}}}catch(_0x41ffb0){logger[_0x55ed('0x3c')]('[%s][voiceQueueReport][queuecallerabandon]',_0x4ddba7[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x41ffb0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')]['syncQueueCallerLeave']=function(_0x36994b){try{if(this[_0x55ed('0x79')](_0x36994b)){logger[_0x55ed('0x44')](_0x55ed('0x83'),_0x36994b[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x36994b,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x36994b[_0x55ed('0x6f')]]){var _0x72706b=_[_0x55ed('0x7b')](this[_0x55ed('0x12')][_0x36994b[_0x55ed('0x6f')]]);_0x72706b['queuecallerleaveAt']=moment()[_0x55ed('0x48')](_0x55ed('0x71'));_0x72706b[_0x55ed('0x84')]=_0x36994b[_0x55ed('0x84')];_0x72706b['connectedlinename']=_0x36994b[_0x55ed('0x85')];logger['info']('[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x72706b[_0x55ed('0x4c')],_0x72706b[_0x55ed('0x56')],_0x36994b['connectedlinenum'],_0x36994b['connectedlinename']);this[_0x55ed('0x14')][_0x36994b[_0x55ed('0x6f')]]=_0x72706b;this[_0x55ed('0x43')](_0x72706b,'queuecallerleave');}}}catch(_0x7c1a11){logger[_0x55ed('0x3c')]('[%s][voiceQueueReport][queuecallerleave]',_0x36994b[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x7c1a11,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x55ed('0x24')]=function(_0x37ac17){try{if(this[_0x55ed('0x79')](_0x37ac17)){logger[_0x55ed('0x44')](_0x55ed('0x86'),_0x37ac17[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x37ac17,{'showHidden':![],'depth':null}));if(this[_0x55ed('0x12')][_0x37ac17[_0x55ed('0x6f')]]){var _0x49dabe=_['last'](this['queueReports'][_0x37ac17[_0x55ed('0x6f')]]);_0x49dabe[_0x55ed('0x7c')]=!![];_0x49dabe['queuecallerexitreason']=_0x55ed('0x87');logger['info']('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x49dabe[_0x55ed('0x4c')],_0x49dabe[_0x55ed('0x56')]);}}}catch(_0x27c166){logger[_0x55ed('0x3c')](_0x55ed('0x86'),_0x37ac17[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x27c166,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')]['syncAgentComplete']=function(_0x2a68f5){try{if(this[_0x55ed('0x79')](_0x2a68f5)){logger[_0x55ed('0x44')](_0x55ed('0x88'),_0x2a68f5['uniqueid'],util[_0x55ed('0x3e')](_0x2a68f5,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x2a68f5[_0x55ed('0x6f')]]){var _0x64831d=_[_0x55ed('0x7b')](this[_0x55ed('0x12')][_0x2a68f5[_0x55ed('0x6f')]]);_0x64831d[_0x55ed('0x1f')]=![];_0x64831d[_0x55ed('0x80')]=null;_0x64831d[_0x55ed('0x89')]=!![];_0x64831d[_0x55ed('0x82')]=_0x2a68f5[_0x55ed('0x8a')];_0x64831d[_0x55ed('0x7e')]=_0x2a68f5['holdtime'];_0x64831d[_0x55ed('0x7c')]=!![];_0x64831d[_0x55ed('0x8b')]=![];_0x64831d['queuecallerexitAt']=null;if(!_0x64831d['transfer']){if(_0x2a68f5[_0x55ed('0x8c')]==_0x55ed('0x8d')){_0x64831d[_0x55ed('0x8e')]=_0x55ed('0x8f');logger['info'](_0x55ed('0x90'),_0x64831d[_0x55ed('0x4c')],_0x64831d[_0x55ed('0x56')]);}else{if(_['startsWith'](_0x2a68f5[_0x55ed('0x91')][_0x55ed('0x92')](),_0x55ed('0x93'))){if(this[_0x55ed('0x12')][_0x2a68f5[_0x55ed('0x94')]]){var _0x31bb4a=_[_0x55ed('0x7b')](this[_0x55ed('0x12')][_0x2a68f5[_0x55ed('0x94')]]);_0x31bb4a[_0x55ed('0x7c')]=![];_0x31bb4a[_0x55ed('0x8b')]=!![];_0x31bb4a[_0x55ed('0x95')]=moment(_0x64831d[_0x55ed('0x96')])[_0x55ed('0x97')](_0x2a68f5[_0x55ed('0x7e')],_0x55ed('0x98'))['format']('YYYY-MM-DD\x20HH:mm:ss');_0x31bb4a[_0x55ed('0x8e')]='FORWARDTRANSFER';_0x31bb4a[_0x55ed('0x8d')]=!![];_0x31bb4a['transfertype']=_0x55ed('0x99');_0x31bb4a[_0x55ed('0x9a')]=_0x2a68f5[_0x55ed('0x9b')];_0x31bb4a[_0x55ed('0x9c')]=_0x2a68f5[_0x55ed('0x6f')];logger[_0x55ed('0x64')](_0x55ed('0x9d'),_0x31bb4a[_0x55ed('0x4c')],_0x31bb4a[_0x55ed('0x56')]);var _0x16aee7=this['queueReports'][_0x2a68f5[_0x55ed('0x94')]];this[_0x55ed('0x12')][_0x2a68f5['linkedid']]=this[_0x55ed('0x12')][_0x2a68f5[_0x55ed('0x6f')]];this['queueReports'][_0x2a68f5[_0x55ed('0x6f')]]=_0x16aee7;}}else{_0x64831d[_0x55ed('0x8e')]=_0x55ed('0x9e')+_0x2a68f5[_0x55ed('0x8c')]['toUpperCase']();logger[_0x55ed('0x64')](_0x55ed('0x9f'),_0x64831d[_0x55ed('0x4c')],_0x64831d['type'],_0x64831d[_0x55ed('0x8e')]);}}}this[_0x55ed('0x14')][_0x2a68f5[_0x55ed('0x6f')]]=_0x64831d;this['emitVoiceQueueChannelRemove'](_0x64831d,'agentcomplete');}}}catch(_0x5cefed){logger[_0x55ed('0x3c')](_0x55ed('0x88'),_0x2a68f5[_0x55ed('0x6f')],util['inspect'](_0x5cefed,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')]['syncVarSet']=function(_0xf15dce){try{if(this[_0x55ed('0x79')](_0xf15dce)){logger[_0x55ed('0x44')](_0x55ed('0xa0'),_0xf15dce[_0x55ed('0x6f')],util['inspect'](_0xf15dce,{'showHidden':![],'depth':null}));this[_0x55ed('0xa1')](_0xf15dce[_0x55ed('0x6f')],_[_0x55ed('0x77')](_0xf15dce[_0x55ed('0xa2')])[0x0],_0xf15dce[_0x55ed('0xa3')]);if(this[_0x55ed('0x12')][_0xf15dce[_0x55ed('0x6f')]]){var _0x37b5f7=_[_0x55ed('0x7b')](this['queueReports'][_0xf15dce[_0x55ed('0x6f')]]);if(_0x37b5f7){if(this[_0x55ed('0x79')](_0xf15dce['variable'])&&this[_0x55ed('0x79')](_0xf15dce[_0x55ed('0xa2')]['queuestatus'])){switch(_0xf15dce[_0x55ed('0xa3')]){case _0x55ed('0xa4'):_0x37b5f7[_0x55ed('0x8b')]=![];_0x37b5f7[_0x55ed('0x95')]=null;break;case _0x55ed('0xa5'):_0x37b5f7[_0x55ed('0xa6')]='timeout';_0x37b5f7[_0x55ed('0x8b')]=!![];_0x37b5f7['queuecallerexitAt']=moment()[_0x55ed('0x48')](_0x55ed('0x71'));_0x37b5f7[_0x55ed('0xa7')]=moment()[_0x55ed('0x48')](_0x55ed('0x71'));logger[_0x55ed('0x44')](_0x55ed('0xa8'),_0xf15dce['uniqueid'],util[_0x55ed('0x3e')](_0x37b5f7,{'showHidden':![],'depth':null}));ami[_0x55ed('0x47')](_0x55ed('0xa9'),_0x37b5f7);break;default:_0x37b5f7[_0x55ed('0x8b')]=!![];_0x37b5f7['queuecallerexitAt']=moment()[_0x55ed('0x48')]('YYYY-MM-DD\x20HH:mm:ss');_0x37b5f7[_0x55ed('0xa7')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x37b5f7[_0x55ed('0x1f')]=![];_0x37b5f7[_0x55ed('0x80')]=null;_0x37b5f7[_0x55ed('0x8e')]=_0xf15dce[_0x55ed('0xa3')];this[_0x55ed('0x14')][_0xf15dce[_0x55ed('0x6f')]]=_0x37b5f7;this[_0x55ed('0x42')](_0x37b5f7,'varset');}else if(this[_0x55ed('0x79')](_0xf15dce[_0x55ed('0xa2')])&&this[_0x55ed('0x79')](_0xf15dce['variable'][_0x55ed('0xaa')])){if(!_0x37b5f7[_0x55ed('0x1f')]){_0x37b5f7[_0x55ed('0x8b')]=!![];_0x37b5f7['queuecallerexitAt']=moment()['format'](_0x55ed('0x71'));_0x37b5f7[_0x55ed('0x8e')]='EXITWITHKEY';_0x37b5f7[_0x55ed('0xa7')]=moment()[_0x55ed('0x48')](_0x55ed('0x71'));this[_0x55ed('0x14')][_0xf15dce[_0x55ed('0x6f')]]=_0x37b5f7;}}logger[_0x55ed('0x64')](_0x55ed('0xab'),_0xf15dce[_0x55ed('0x6f')],_0x37b5f7['name'],_0x37b5f7[_0x55ed('0x56')],_[_0x55ed('0x77')](_0xf15dce['variable'])[0x0],_0xf15dce[_0x55ed('0xa3')]);_0x37b5f7[_0x55ed('0x3f')]=this[_0x55ed('0x3f')][_0xf15dce[_0x55ed('0x6f')]];}}}}catch(_0x3f00fc){logger[_0x55ed('0x3c')](_0x55ed('0xa0'),_0xf15dce[_0x55ed('0x6f')],util['inspect'](_0x3f00fc,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x55ed('0xd')][_0x55ed('0xa1')]=function(_0x32b441,_0x564c08,_0x541415){var _0x33a9d4=[_0x55ed('0xac'),'rtpaudioqosbridged','rtpaudioqosjitter',_0x55ed('0xad'),'rtpaudioqosloss',_0x55ed('0xae'),_0x55ed('0xaf'),_0x55ed('0xb0'),'sipcallid',_0x55ed('0xb1'),_0x55ed('0xb2'),_0x55ed('0xb3'),_0x55ed('0xb4'),_0x55ed('0xb5'),_0x55ed('0xb6'),_0x55ed('0xb7'),_0x55ed('0x8a'),'memberpenalty',_0x55ed('0xb8')];if(!_[_0x55ed('0x37')](_0x564c08)&&!_[_0x55ed('0xb9')](_0x33a9d4,_0x564c08)){if(_[_0x55ed('0x70')](this['variables'][_0x32b441])){this[_0x55ed('0x3f')][_0x32b441]={};}this[_0x55ed('0x3f')][_0x32b441][_0x564c08]=_0x541415;}};VoiceQueueReport[_0x55ed('0xd')]['syncHangup']=function(_0x56f0f0){try{if(this[_0x55ed('0x79')](_0x56f0f0)){logger[_0x55ed('0x44')]('[%s][voiceQueueReport][hangup]',_0x56f0f0[_0x55ed('0x6f')],util[_0x55ed('0x3e')](_0x56f0f0,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x56f0f0[_0x55ed('0x6f')]]){for(var _0x4a76d7=0x0,_0x3701b6={};_0x4a76d7=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 +var _0x317e=['voiceQueueReport','queuecallerexitAt','Request','CreateMemberReport','voice','lastAssignedTo','isNil','SIP/%s','interface','TALKING','queuecallerleaveAt','diff','seconds','calleridnum','queue','accountcode','toNumber','voiceDialReport','starttime','endtime','outbound','dialstring','agent','uniqueid','moment','lodash'];(function(_0x196a1c,_0x4d22ad){var _0x38164c=function(_0x3930c0){while(--_0x3930c0){_0x196a1c['push'](_0x196a1c['shift']());}};_0x38164c(++_0x4d22ad);}(_0x317e,0x16a));var _0xe317=function(_0x9df060,_0x253d33){_0x9df060=_0x9df060-0x0;var _0x338dfe=_0x317e[_0x9df060];return _0x338dfe;};'use strict';var moment=require(_0xe317('0x0'));var _=require(_0xe317('0x1'));var util=require('util');var client=require('../client');exports[_0xe317('0x2')]=function(_0x2661d){var _0xc22813=_0x2661d['queuecallercompleteAt']||_0x2661d[_0xe317('0x3')];return client[_0xe317('0x4')](_0xe317('0x5'),{'body':{'channel':_0xe317('0x6'),'membername':_0x2661d[_0xe317('0x7')],'interface':_[_0xe317('0x8')](_0x2661d['interface'])?util['format'](_0xe317('0x9'),_0x2661d['lastAssignedTo']):_0x2661d[_0xe317('0xa')],'type':_0xe317('0xb'),'enterAt':_0x2661d[_0xe317('0xc')],'exitAt':_0xc22813,'duration':moment(_0xc22813)[_0xe317('0xd')](_0x2661d['queuecallerleaveAt'],_0xe317('0xe')),'data1':'inbound','data2':_0x2661d[_0xe317('0xf')],'data3':_0x2661d['exten'],'data4':null,'data5':_0x2661d[_0xe317('0x10')],'role':'agent','internal':_0x2661d[_0xe317('0x11')]?_[_0xe317('0x12')](_0x2661d['accountcode']):undefined,'uniqueid':_0x2661d['uniqueid']},'log':_0xe317('0x5')});};exports[_0xe317('0x13')]=function(_0x556f63){return client[_0xe317('0x4')](_0xe317('0x5'),{'body':{'channel':'voice','membername':_0x556f63['membername'],'interface':_0x556f63[_0xe317('0xa')],'type':'TALKING','enterAt':_0x556f63[_0xe317('0x14')],'exitAt':_0x556f63[_0xe317('0x15')],'duration':moment(_0x556f63[_0xe317('0x15')])['diff'](_0x556f63[_0xe317('0x14')],_0xe317('0xe'))>=0x0?moment(_0x556f63[_0xe317('0x15')])[_0xe317('0xd')](_0x556f63[_0xe317('0x14')],_0xe317('0xe')):null,'data1':_0xe317('0x16'),'data2':_0x556f63[_0xe317('0x11')],'data3':_0x556f63['exten'],'data4':_0x556f63[_0xe317('0x17')]||null,'role':_0xe317('0x18'),'internal':_0x556f63[_0xe317('0x11')]?_[_0xe317('0x12')](_0x556f63[_0xe317('0x11')]):undefined,'uniqueid':_0x556f63[_0xe317('0x19')]},'log':_0xe317('0x5')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/setting.js b/server/services/ami/rpc/setting.js index 9e01a01..764f71d 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 _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 +var _0x8581=['Request','stopRecordingOnTransfer','GetSettings','getSettings'];(function(_0x4629f2,_0x52aa9e){var _0x240938=function(_0x43b494){while(--_0x43b494){_0x4629f2['push'](_0x4629f2['shift']());}};_0x240938(++_0x52aa9e);}(_0x8581,0x163));var _0x1858=function(_0x404acd,_0x2c3d96){_0x404acd=_0x404acd-0x0;var _0x31676c=_0x8581[_0x404acd];return _0x31676c;};'use strict';var client=require('../client');exports[_0x1858('0x0')]=function(){return client[_0x1858('0x1')]('ShowSetting',{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x1858('0x2')]},'log':_0x1858('0x3')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js index 25622a6..d446685 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 _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 +var _0x7a21=['../client','getTemplates','name','html'];(function(_0x56e604,_0x5ae581){var _0x2dd2a3=function(_0x235820){while(--_0x235820){_0x56e604['push'](_0x56e604['shift']());}};_0x2dd2a3(++_0x5ae581);}(_0x7a21,0x1c8));var _0x17a2=function(_0x1fe0cb,_0x452e1a){_0x1fe0cb=_0x1fe0cb-0x0;var _0xcb8a22=_0x7a21[_0x1fe0cb];return _0xcb8a22;};'use strict';var client=require(_0x17a2('0x0'));exports[_0x17a2('0x1')]=function(_0x9df436){return function(_0x15bb32){return client['Request']('GetTemplate',{'options':{'raw':!![],'attributes':['id',_0x17a2('0x2'),_0x17a2('0x3')]},'log':'GetTemplate'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js index 9e6941a..c057add 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 _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 +var _0x57d0=['data3','data4','data5','data6','data7','../client','getTriggers','GetTrigger','name','Condition','AllConditions','field','value','AnyConditions','operator','Action','Actions','data1','data2'];(function(_0x13a79b,_0x3b1352){var _0x1e173b=function(_0x1ea3ce){while(--_0x1ea3ce){_0x13a79b['push'](_0x13a79b['shift']());}};_0x1e173b(++_0x3b1352);}(_0x57d0,0x77));var _0x057d=function(_0x4ded65,_0xc8d7c1){_0x4ded65=_0x4ded65-0x0;var _0x5864fb=_0x57d0[_0x4ded65];return _0x5864fb;};'use strict';var client=require(_0x057d('0x0'));exports[_0x057d('0x1')]=function(_0x4cd58f){return function(_0x3bf9c5){return client['Request'](_0x057d('0x2'),{'options':{'raw':![],'attributes':['id',_0x057d('0x3'),'channel','status'],'include':[{'model':_0x057d('0x4'),'as':_0x057d('0x5'),'attributes':['id',_0x057d('0x6'),'operator',_0x057d('0x7')]},{'model':_0x057d('0x4'),'as':_0x057d('0x8'),'attributes':['id',_0x057d('0x6'),_0x057d('0x9'),_0x057d('0x7')]},{'model':_0x057d('0xa'),'as':_0x057d('0xb'),'attributes':['id','action',_0x057d('0xc'),_0x057d('0xd'),_0x057d('0xe'),_0x057d('0xf'),_0x057d('0x10'),_0x057d('0x11'),_0x057d('0x12')]}]},'log':_0x057d('0x2')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trunk.js b/server/services/ami/rpc/trunk.js index 71614df..981841a 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 _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 +var _0x5f1f=['defaultuser','../client','getTrunks','GetTrunk','name'];(function(_0x197b4b,_0x1e9027){var _0x3d9a40=function(_0x19a6cc){while(--_0x19a6cc){_0x197b4b['push'](_0x197b4b['shift']());}};_0x3d9a40(++_0x1e9027);}(_0x5f1f,0x1a0));var _0xf5f1=function(_0x5dafd0,_0x3bcbb6){_0x5dafd0=_0x5dafd0-0x0;var _0x364354=_0x5f1f[_0x5dafd0];return _0x364354;};'use strict';var client=require(_0xf5f1('0x0'));exports[_0xf5f1('0x1')]=function(_0x58bf9f){return function(_0x54c43a){return client['Request'](_0xf5f1('0x2'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0xf5f1('0x3'),'registry',_0xf5f1('0x4')]},'log':_0xf5f1('0x2')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js index e420caa..78f28fd 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 _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 +var _0xcb91=['UnpauseUser','getAgent','ShowUser','email','lastPauseAt','Request','GetUser','agent','name','accountcode','fullname','lastLoginAt','pauseType','voicePause','phone','interface','getAgents','internal','getTelephones','savePause','PauseUser'];(function(_0x1415cf,_0x81ab61){var _0x521243=function(_0x2e9901){while(--_0x2e9901){_0x1415cf['push'](_0x1415cf['shift']());}};_0x521243(++_0x81ab61);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x4d6ac0,_0x201628){_0x4d6ac0=_0x4d6ac0-0x0;var _0x5296c4=_0xcb91[_0x4d6ac0];return _0x5296c4;};'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 diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js index 99112ed..07dae6d 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 _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 +var _0xe1cc=['CreateVoiceAgentReport','update','../client','create','Request'];(function(_0x1d6a82,_0x37c315){var _0x5834ac=function(_0x2402ba){while(--_0x2402ba){_0x1d6a82['push'](_0x1d6a82['shift']());}};_0x5834ac(++_0x37c315);}(_0xe1cc,0x179));var _0xce1c=function(_0x4a0161,_0x5aec3f){_0x4a0161=_0x4a0161-0x0;var _0x171d6a=_0xe1cc[_0x4a0161];return _0x171d6a;};'use strict';var client=require(_0xce1c('0x0'));exports[_0xce1c('0x1')]=function(_0x1423a5){return client[_0xce1c('0x2')](_0xce1c('0x3'),{'body':_0x1423a5,'log':_0xce1c('0x3')});};exports[_0xce1c('0x4')]=function(_0x254bbc,_0x59f817,_0x321dde){return client['Request']('UpdateVoiceAgentReport',{'body':_0x254bbc,'options':{'where':{'uniqueid':_0x59f817,'interface':_0x321dde,'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 2f224ed..e70e2d7 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 _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 +var _0x45b9=['DOCUMENTATION','CreateVoiceCallReport','GetVoiceCallReport','outbound','startOf','day','format','endOf','duration','billableseconds','GetVoiceCallReports','moment','util','lodash','../client','create','Request','context'];(function(_0x476b5f,_0x1f9952){var _0x5a23d8=function(_0x50b464){while(--_0x50b464){_0x476b5f['push'](_0x476b5f['shift']());}};_0x5a23d8(++_0x1f9952);}(_0x45b9,0x12b));var _0x945b=function(_0x2ef3f4,_0x21406c){_0x2ef3f4=_0x2ef3f4-0x0;var _0x501ecd=_0x45b9[_0x2ef3f4];return _0x501ecd;};'use strict';var moment=require(_0x945b('0x0'));var util=require(_0x945b('0x1'));var _=require(_0x945b('0x2'));var client=require(_0x945b('0x3'));exports[_0x945b('0x4')]=function(_0xe25300){return client[_0x945b('0x5')]('CreateVoiceCallReport',{'body':_['merge'](_0xe25300,{'source':_0xe25300['calleridnum'],'destinationcontext':_0xe25300[_0x945b('0x6')],'callerid':_0xe25300['callerid'],'amaflags':_0x945b('0x7')}),'log':_0x945b('0x8')});};exports['getVoiceCallReports']=function(){return function(){return client[_0x945b('0x5')](_0x945b('0x9'),{'options':{'where':{'type':[_0x945b('0xa')],'createdAt':{'$between':[moment()[_0x945b('0xb')](_0x945b('0xc'))[_0x945b('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x945b('0xe')](_0x945b('0xc'))[_0x945b('0xd')]('YYYY-MM-DD\x20HH:mm:ss')]}},'attributes':['type','disposition',_0x945b('0xf'),_0x945b('0x10')]},'log':_0x945b('0x11')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js index b479c42..e0920e6 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 _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 +var _0xdcd8=['CreateVoiceDialReport','create','Request'];(function(_0x4601f3,_0x4d2401){var _0x2afb49=function(_0x297f98){while(--_0x297f98){_0x4601f3['push'](_0x4601f3['shift']());}};_0x2afb49(++_0x4d2401);}(_0xdcd8,0xfd));var _0x8dcd=function(_0x211118,_0x47e09e){_0x211118=_0x211118-0x0;var _0x463d8c=_0xdcd8[_0x211118];return _0x463d8c;};'use strict';var client=require('../client');exports[_0x8dcd('0x0')]=function(_0x357700){return client[_0x8dcd('0x1')](_0x8dcd('0x2'),{'body':_0x357700,'log':'CreateVoiceDialReport'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js index 1e1ab89..94aab93 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 _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 +var _0x22dd=['../client','getVoiceExtensions','Request','recordingFormat'];(function(_0xc621da,_0x489ecb){var _0x1bfe8a=function(_0x3bc8ca){while(--_0x3bc8ca){_0xc621da['push'](_0xc621da['shift']());}};_0x1bfe8a(++_0x489ecb);}(_0x22dd,0xe4));var _0xd22d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x22dd[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xd22d('0x0'));exports[_0xd22d('0x1')]=function(){return function(){return client[_0xd22d('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id','exten',_0xd22d('0x3')],'where':{'VoiceExtensionId':null}},'log':_0xd22d('0x1')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js index f41ee03..ea60d58 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 _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 +var _0x8010=['dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialQueueProject2','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','Trunk','name','callerid','Pause','TrunkBackup','active','Interval','Intervals','interval','../client','getVoiceQueues','Request','GetVoiceQueue','acw','acwTimeout','autopause','monitor_format','type','dialActive','dialLimitQueue','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyRetryFrequency','dialTimezone','dialGlobalInterval','dialPrefix','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDSilenceThreshold','timeout'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x8010,0xc8));var _0x0801=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8010[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x0801('0x0'));exports[_0x0801('0x1')]=function(){return function(){return client[_0x0801('0x2')](_0x0801('0x3'),{'options':{'raw':![],'attributes':['id','name',_0x0801('0x4'),_0x0801('0x5'),_0x0801('0x6'),_0x0801('0x7'),_0x0801('0x8'),_0x0801('0x9'),'dialMethod','dialLimitChannel',_0x0801('0xa'),'dialPowerLevel',_0x0801('0xb'),_0x0801('0xc'),'dialPredictiveInterval',_0x0801('0xd'),_0x0801('0xe'),_0x0801('0xf'),_0x0801('0x10'),_0x0801('0x11'),'dialQueueProject',_0x0801('0x12'),_0x0801('0x13'),'dialBusyMaxRetry',_0x0801('0x14'),'dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry',_0x0801('0x15'),_0x0801('0x16'),_0x0801('0x17'),'dialCheckDuplicateType',_0x0801('0x18'),_0x0801('0x19'),_0x0801('0x1a'),_0x0801('0x1b'),_0x0801('0x1c'),_0x0801('0x1d'),'dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords',_0x0801('0x1e'),'dialAMDMaximumWordLength',_0x0801('0x1f'),_0x0801('0x20'),_0x0801('0x21'),_0x0801('0x22'),_0x0801('0x23'),'dialAgiAfterHangupClient',_0x0801('0x24'),_0x0801('0x7'),'strategy',_0x0801('0x25'),_0x0801('0x26'),_0x0801('0x27'),'dialNoSuchNumberRetryFrequency','dialDropMaxRetry',_0x0801('0x28'),_0x0801('0x29'),_0x0801('0x2a'),_0x0801('0x2b'),_0x0801('0x2c'),_0x0801('0x2d'),_0x0801('0x2e'),'mandatoryDisposition',_0x0801('0x2f'),_0x0801('0x30')],'include':[{'model':_0x0801('0x31'),'as':'Trunk','attributes':['id',_0x0801('0x32'),_0x0801('0x33'),'active']},{'model':_0x0801('0x34'),'as':'mandatoryDispositionPause','attributes':['id',_0x0801('0x32')]},{'model':_0x0801('0x31'),'as':_0x0801('0x35'),'attributes':['id','name',_0x0801('0x33'),_0x0801('0x36')]},{'model':_0x0801('0x37'),'as':_0x0801('0x37'),'attributes':['id','name'],'include':[{'model':_0x0801('0x37'),'as':_0x0801('0x38'),'attributes':['id',_0x0801('0x32'),_0x0801('0x39')]}]}]},'log':'getVoiceQueues'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js index 8cf45d6..e0a4451 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(_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 +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(_0x1ec210,_0x43c21c){var _0x1cb18d=function(_0x11988b){while(--_0x11988b){_0x1ec210['push'](_0x1ec210['shift']());}};_0x1cb18d(++_0x43c21c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'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 fb006c3..09d7bff 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 _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 +var _0x5f90=['Request','GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses'];(function(_0x56b0c6,_0x45bb4a){var _0x4719e3=function(_0x4ad328){while(--_0x4ad328){_0x56b0c6['push'](_0x56b0c6['shift']());}};_0x4719e3(++_0x45bb4a);}(_0x5f90,0x16a));var _0x05f9=function(_0x1f1c8b,_0x50b1cf){_0x1f1c8b=_0x1f1c8b-0x0;var _0x5b53be=_0x5f90[_0x1f1c8b];return _0x5b53be;};'use strict';var client=require(_0x05f9('0x0'));exports[_0x05f9('0x1')]=function(_0x2da543){return function(){return client[_0x05f9('0x2')](_0x05f9('0x3'),{'options':{'where':{'VoiceQueueId':_0x2da543,'paused':!![]},'raw':!![]},'log':'getVoiceQueueRtPauses'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js index 8048ee0..e77240f 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 _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 +var _0x9957=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0x182e22,_0x894a7e){var _0x130b0e=function(_0x3a68be){while(--_0x3a68be){_0x182e22['push'](_0x182e22['shift']());}};_0x130b0e(++_0x894a7e);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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 diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js index 211182b..b97c8e6 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 _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 +var _0xf845=['origtransfereraccountcode','secondtransferercontext','secondtransfererexten','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetexten','transfertargetlinkedid','origtransferercontext','origtransfererexten','attended','../client','transfers','CreateVoiceTransferReport','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfereraccountcode','transferercontext','transfererexten','transfereechannel','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinenum','transfereeconnectedlinename','transfereeaccountcode','transfereeexten','isexternal','context','blind','attendedTransfer','Request','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinename'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xf845,0x194));var _0x5f84=function(_0x4a4fa4,_0x68838c){_0x4a4fa4=_0x4a4fa4-0x0;var _0x4b6e19=_0xf845[_0x4a4fa4];return _0x4b6e19;};'use strict';var client=require(_0x5f84('0x0'));exports[_0x5f84('0x1')]={};exports['blindTransfer']=function(_0x235428){return client['Request'](_0x5f84('0x2'),{'body':{'result':_0x235428['result'],'transfererchannel':_0x235428['transfererchannel'],'transferercalleridnum':_0x235428[_0x5f84('0x3')],'transferercalleridname':_0x235428[_0x5f84('0x4')],'transfererconnectedlinenum':_0x235428[_0x5f84('0x5')],'transfererconnectedlinename':_0x235428['transfererconnectedlinename'],'transfereraccountcode':_0x235428[_0x5f84('0x6')],'transferercontext':_0x235428[_0x5f84('0x7')],'transfererexten':_0x235428[_0x5f84('0x8')],'transfererlinkedid':_0x235428['transfererlinkedid'],'transfereechannel':_0x235428[_0x5f84('0x9')],'transfereecalleridnum':_0x235428[_0x5f84('0xa')],'transfereecalleridname':_0x235428[_0x5f84('0xb')],'transfereeconnectedlinenum':_0x235428[_0x5f84('0xc')],'transfereeconnectedlinename':_0x235428[_0x5f84('0xd')],'transfereeaccountcode':_0x235428[_0x5f84('0xe')],'transfereecontext':_0x235428['transfereecontext'],'transfereeexten':_0x235428[_0x5f84('0xf')],'transfereelinkedid':_0x235428['transfereelinkedid'],'isexternal':_0x235428[_0x5f84('0x10')],'context':_0x235428[_0x5f84('0x11')],'extension':_0x235428['extension'],'type':_0x5f84('0x12')},'log':_0x5f84('0x2')});};exports[_0x5f84('0x13')]=function(_0x4655c7){return client[_0x5f84('0x14')]('CreateVoiceTransferReport',{'body':{'result':_0x4655c7['result'],'transfererchannel':_0x4655c7[_0x5f84('0x15')],'transferercalleridnum':_0x4655c7[_0x5f84('0x16')],'transferercalleridname':_0x4655c7[_0x5f84('0x17')],'transfererconnectedlinenum':_0x4655c7['secondtransfererconnectedlinenum'],'transfererconnectedlinename':_0x4655c7[_0x5f84('0x18')],'transfereraccountcode':_0x4655c7[_0x5f84('0x19')],'transferercontext':_0x4655c7[_0x5f84('0x1a')],'transfererexten':_0x4655c7[_0x5f84('0x1b')],'transfererlinkedid':_0x4655c7['origtransfererlinkedid'],'transfereechannel':_0x4655c7[_0x5f84('0x1c')],'transfereecalleridnum':_0x4655c7[_0x5f84('0x1d')],'transfereecalleridname':_0x4655c7[_0x5f84('0x1e')],'transfereeconnectedlinenum':_0x4655c7[_0x5f84('0x1f')],'transfereeconnectedlinename':_0x4655c7[_0x5f84('0x20')],'transfereeaccountcode':_0x4655c7[_0x5f84('0x21')],'transfereecontext':_0x4655c7['transfertargetcontext'],'transfereeexten':_0x4655c7[_0x5f84('0x22')],'transfereelinkedid':_0x4655c7[_0x5f84('0x23')],'isexternal':_0x4655c7[_0x5f84('0x10')],'context':_0x4655c7[_0x5f84('0x24')],'extension':_0x4655c7[_0x5f84('0x25')],'type':_0x5f84('0x26')},'log':_0x5f84('0x2')});}; \ No newline at end of file diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js index 010f501..5724d59 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 _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 +var _0xf69c=['predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','Trunk','active','callerid','Interval','length','omit','undefined','voicechannel','map','find','channels','uniqueid','%s.%s','filename','wav','MixMonitor','channel','ai(mixmonitorid)','/var/spool/asterisk/monitor/','toLowerCase','isNil','YYYY-MM-DD\x20HH:mm:ss','rec','status','MixMonitor\x20Success','mixmonitorid','resolve','StopMixMonitor','destinationchannel','stop','monitors','StopMixMonitor\x20Success','values','queueChannels','Channel\x20doesn\x27t\x20exist','voicequeuechannelhangup','Hangup','voicequeuechannelredirect','Redirect','exten','context','trunks','outboundChannels','event','emit','custom:','faxAccounts','send','server','http','127.0.0.1','RPC\x20listening\x20on\x20port:','lodash','jayson/promise','validate','moment','../properties','listen','format','SIP','name','timers','timer','updateAcw','agents','updateStatusRealtime','pause','QueuePause','username','join','pick','keys','module','Reload','Action','message','catch','error','isConnected','asterisk','ami\x20disconnected','command','action','Command','then','content','hasOwnProperty','voiceQueues','strategy','answered','available','loggedIn','pTalking','sumHoldTime','talking','total','type','abandoned','waiting','loggedInDb','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable'];(function(_0x20bc78,_0x558346){var _0x460315=function(_0x5514f1){while(--_0x5514f1){_0x20bc78['push'](_0x20bc78['shift']());}};_0x460315(++_0x558346);}(_0xf69c,0x151));var _0xcf69=function(_0x31c796,_0x2e3c7f){_0x31c796=_0x31c796-0x0;var _0x128356=_0xf69c[_0x31c796];return _0x128356;};'use strict';var _=require(_0xcf69('0x0'));var util=require('util');var jayson=require(_0xcf69('0x1'));var schema=require(_0xcf69('0x2'));var BPromise=require('bluebird');var moment=require(_0xcf69('0x3'));var config=require('../../../config/environment');var properties=require(_0xcf69('0x4'));var ami=require('../ami');exports[_0xcf69('0x5')]=function(_0x4d8180,_0x1c813d,_0x168197){return new BPromise(function(_0x225c65,_0x35aa67){var _0x3b7608={'QueuePause':function(_0x5f1e98){return new Promise(function(_0x38478c,_0xbeb916){var _0x46b433=util[_0xcf69('0x6')]('%s/%s',_0xcf69('0x7'),_0x5f1e98[_0xcf69('0x8')]);if(_0x4d8180[_0xcf69('0x9')]&&_0x4d8180[_0xcf69('0x9')][_0x46b433]&&_0x4d8180[_0xcf69('0x9')][_0x46b433][_0xcf69('0xa')]){_0x4d8180['timers'][_0x46b433][_0xcf69('0xb')]();}if(_0x4d8180['agents'][_0x46b433]){_0x4d8180[_0xcf69('0xc')][_0x46b433][_0xcf69('0xd')]({'statePause':_0x5f1e98[_0xcf69('0xe')]?!![]:![]});}_0x38478c({'code':0xc8,'message':_0xcf69('0xf')});});},'Reload':function(_0x329250){var _0x2981ab=this;return new Promise(function(_0x182dde,_0x34e299){if(ami['isConnected']()==![]){return _0x34e299(_0x2981ab['error'](0x1f4,[config['asterisk']['ip'],config['asterisk'][_0xcf69('0x10')],'ami\x20disconnected'][_0xcf69('0x11')]('\x20')));}_0x329250=_[_0xcf69('0x12')](_0x329250,_[_0xcf69('0x13')](properties[_0xcf69('0x14')]));_0x329250['action']=_0xcf69('0x15');return ami[_0xcf69('0x16')](_0x329250)['then'](function(_0x486e06){_0x182dde({'code':0xc8,'message':_0x486e06[_0xcf69('0x17')]});})[_0xcf69('0x18')](function(_0x39306a){_0x34e299(_0x2981ab[_0xcf69('0x19')](0x1f5,_0x39306a[_0xcf69('0x17')]));});});},'Command':function(_0xfd30d2){var _0x120980=this;return new Promise(function(_0x210630,_0x53666e){if(ami[_0xcf69('0x1a')]()==![]){return _0x53666e(_0x120980['error'](0x1f4,[config[_0xcf69('0x1b')]['ip'],config[_0xcf69('0x1b')][_0xcf69('0x10')],_0xcf69('0x1c')][_0xcf69('0x11')]('\x20')));}_0xfd30d2=_[_0xcf69('0x12')](_0xfd30d2,_0xcf69('0x1d'));_0xfd30d2[_0xcf69('0x1e')]=_0xcf69('0x1f');return ami[_0xcf69('0x16')](_0xfd30d2)[_0xcf69('0x20')](function(_0x7d86bc){_0x210630({'code':0xc8,'message':_0x7d86bc[_0xcf69('0x21')]});})[_0xcf69('0x18')](function(_0x3ec2fb){_0x53666e(_0x120980['error'](0x1f5,_0x3ec2fb[_0xcf69('0x17')]));});});},'VoiceQueues':function(_0x1abce9){return new Promise(function(_0x183067,_0x278ce3){var _0x9a006b=[];for(var _0x1a0b33 in _0x4d8180['voiceQueues']){if(_0x4d8180['voiceQueues'][_0xcf69('0x22')](_0x1a0b33)){var _0x59de98=_0x4d8180[_0xcf69('0x23')][_0x1a0b33];var _0x81a49f={'id':_0x59de98['id'],'name':_0x59de98[_0xcf69('0x8')],'strategy':_0x59de98[_0xcf69('0x24')],'answered':_0x59de98[_0xcf69('0x25')],'available':_0x59de98[_0xcf69('0x26')],'loggedIn':_0x59de98[_0xcf69('0x27')],'pTalking':_0x59de98[_0xcf69('0x28')],'sumBillable':_0x59de98['sumBillable'],'sumDuration':_0x59de98['sumDuration'],'sumHoldTime':_0x59de98[_0xcf69('0x29')]||0x0,'talking':_0x59de98[_0xcf69('0x2a')],'total':_0x59de98[_0xcf69('0x2b')],'type':_0x59de98[_0xcf69('0x2c')],'unmanaged':_0x59de98['unmanaged'],'abandoned':_0x59de98[_0xcf69('0x2d')],'waiting':_0x59de98[_0xcf69('0x2e')],'loggedInDb':_0x59de98[_0xcf69('0x2f')]};if(_0x59de98[_0xcf69('0x2c')]===_0xcf69('0x30')){_0x81a49f[_0xcf69('0x31')]=_0x59de98[_0xcf69('0x31')];_0x81a49f[_0xcf69('0x32')]=_0x59de98[_0xcf69('0x32')];_0x81a49f[_0xcf69('0x33')]=_0x59de98['dialOriginateCallerIdName'];_0x81a49f[_0xcf69('0x34')]=_0x59de98['dialOriginateCallerIdNumber'];_0x81a49f[_0xcf69('0x35')]=_0x59de98[_0xcf69('0x35')];_0x81a49f[_0xcf69('0x36')]=_0x59de98[_0xcf69('0x36')];_0x81a49f[_0xcf69('0x37')]=_0x59de98[_0xcf69('0x37')];_0x81a49f[_0xcf69('0x38')]=_0x59de98[_0xcf69('0x38')];_0x81a49f[_0xcf69('0x39')]=_0x59de98[_0xcf69('0x39')];_0x81a49f['outboundBlacklistCallsDay']=_0x59de98[_0xcf69('0x3a')];_0x81a49f[_0xcf69('0x3b')]=_0x59de98['outboundBusyCallsDay'];_0x81a49f[_0xcf69('0x3c')]=_0x59de98['outboundCongestionCallsDay'];_0x81a49f[_0xcf69('0x3d')]=_0x59de98['outboundDropCallsDayACS'];_0x81a49f['outboundDropCallsDayCallersExit']=_0x59de98[_0xcf69('0x3e')];_0x81a49f[_0xcf69('0x3f')]=_0x59de98[_0xcf69('0x3f')];_0x81a49f[_0xcf69('0x40')]=_0x59de98[_0xcf69('0x40')];_0x81a49f[_0xcf69('0x41')]=_0x59de98['outboundNoSuchCallsDay'];_0x81a49f['outboundOriginateFailureCallsDay']=_0x59de98[_0xcf69('0x42')];_0x81a49f[_0xcf69('0x43')]=_0x59de98[_0xcf69('0x43')];_0x81a49f[_0xcf69('0x44')]=_0x59de98[_0xcf69('0x44')];_0x81a49f[_0xcf69('0x45')]=_0x59de98[_0xcf69('0x45')];_0x81a49f[_0xcf69('0x46')]=_0x59de98[_0xcf69('0x46')];_0x81a49f[_0xcf69('0x47')]=_0x59de98[_0xcf69('0x47')];_0x81a49f[_0xcf69('0x48')]=_0x59de98[_0xcf69('0x48')];_0x81a49f[_0xcf69('0x49')]=_0x59de98[_0xcf69('0x49')];_0x81a49f[_0xcf69('0x4a')]=_0x59de98[_0xcf69('0x4a')];_0x81a49f[_0xcf69('0x4b')]=_0x59de98[_0xcf69('0x4b')];_0x81a49f[_0xcf69('0x4c')]=_0x59de98[_0xcf69('0x4c')];_0x81a49f['predictiveIntervalHitRate']=_0x59de98['predictiveIntervalHitRate'];_0x81a49f[_0xcf69('0x4d')]=_0x59de98[_0xcf69('0x4d')];_0x81a49f[_0xcf69('0x4e')]=_0x59de98[_0xcf69('0x4e')];_0x81a49f['predictiveIntervalAvailable']=_0x59de98[_0xcf69('0x4f')];_0x81a49f[_0xcf69('0x50')]=_0x59de98[_0xcf69('0x50')];_0x81a49f[_0xcf69('0x17')]=_0x59de98[_0xcf69('0x17')];_0x81a49f['originated']=_0x59de98[_0xcf69('0x51')];_0x81a49f[_0xcf69('0x52')]=_0x59de98['erlangCalls'];_0x81a49f[_0xcf69('0x53')]=_0x59de98[_0xcf69('0x53')];_0x81a49f[_0xcf69('0x54')]=_0x59de98['erlangAbandonmentRate'];_0x81a49f[_0xcf69('0x55')]=_0x59de98['erlangBusyFactor'];_0x81a49f[_0xcf69('0x56')]=_0x59de98[_0xcf69('0x56')];_0x81a49f['startProgressive']=_0x59de98['startProgressive'];}if(_0x59de98[_0xcf69('0x57')]){_0x81a49f[_0xcf69('0x57')]={'id':_0x59de98[_0xcf69('0x57')]['id'],'name':_0x59de98['Trunk']['name'],'active':_0x59de98[_0xcf69('0x57')][_0xcf69('0x58')],'callerid':_0x59de98['Trunk'][_0xcf69('0x59')]};}if(_0x59de98[_0xcf69('0x5a')]){_0x81a49f[_0xcf69('0x5a')]={'id':_0x59de98[_0xcf69('0x5a')]['id'],'name':_0x59de98[_0xcf69('0x5a')][_0xcf69('0x8')]};}_0x9a006b['push'](_0x81a49f);}}_0x183067({'count':_0x9a006b[_0xcf69('0x5b')],'rows':_0x9a006b});});},'UpdateVoiceQueue':function(_0x39522d){return new Promise(function(_0x3e33e6,_0x58e261){var _0x1a1270=_['find'](_0x4d8180[_0xcf69('0x23')],{'id':parseInt(_0x39522d['id'])});var _0x81d8a7=_[_0xcf69('0x5c')](_0x39522d,['id']);if(_0x1a1270){for(var _0x45c458 in _0x81d8a7){if(typeof _0x81d8a7[_0x45c458]!==_0xcf69('0x5d')&&typeof _0x1a1270[_0x45c458]!=='undefined'){_0x1a1270[_0x45c458]=_0x81d8a7[_0x45c458];}}_0x3e33e6(_0x1a1270);}else{_0x58e261();}});},'VoiceChannels':function(_0x57748d){return new Promise(function(_0xca4bc0,_0x29dfbf){var _0x43ded1=_['values'](_0x4d8180['channels']);_0xca4bc0({'count':_0x43ded1['length'],'rows':_0x43ded1});});},'VoiceChannelMixMonitor':function(_0x2f2b20){var _0x814320=this;return new Promise(function(_0x91069e,_0x4c55e4){if(ami[_0xcf69('0x1a')]()==![]){return _0x4c55e4(_0x814320['error'](0x1f4,[config[_0xcf69('0x1b')]['ip'],config['asterisk'][_0xcf69('0x10')],_0xcf69('0x1c')][_0xcf69('0x11')]('\x20')));}var _0x2f8346=schema(properties[_0xcf69('0x5e')])[_0xcf69('0x2')](_0x2f2b20);if(_0x2f8346[_0xcf69('0x5b')]>0x0){return _0x4c55e4(_0x814320[_0xcf69('0x19')](0x1f4,_[_0xcf69('0x5f')](_0x2f8346,_0xcf69('0x17'))[_0xcf69('0x11')](',\x20')));}var _0x52473a=_[_0xcf69('0x60')](_0x4d8180[_0xcf69('0x61')],{'uniqueid':_0x2f2b20[_0xcf69('0x62')]});if(_0x52473a&&_0x52473a['channel']){var _0x294e08=util['format'](_0xcf69('0x63'),_0x2f2b20[_0xcf69('0x64')]||_0x2f2b20[_0xcf69('0x62')],_0x2f2b20[_0xcf69('0x6')]||_0xcf69('0x65'));return ami[_0xcf69('0x16')]({'action':_0xcf69('0x66'),'channel':_0x52473a[_0xcf69('0x67')],'file':_0x294e08,'options':_0xcf69('0x68')})[_0xcf69('0x20')](function(_0x2f83f6){var _0x2be62c=_[_0xcf69('0x60')](_0x52473a['monitors'],{'filename':_0xcf69('0x69')+_0x294e08[_0xcf69('0x6a')]()});if(_[_0xcf69('0x6b')](_0x2be62c)){_0x52473a['monitors']['push']({'filename':_0xcf69('0x69')+_0x294e08['toLowerCase'](),'createdAt':moment()[_0xcf69('0x6')](_0xcf69('0x6c')),'mixmonitorid':_0x2f83f6['mixmonitorid'],'status':_0xcf69('0x6d')});}else{_0x2be62c['mixmonitorid']=_0x2f83f6['mixmonitorid'];_0x2be62c[_0xcf69('0x6e')]=_0xcf69('0x6d');}_0x91069e({'code':0xc8,'message':[_0x2f2b20[_0xcf69('0x62')],_0xcf69('0x6f'),_0x2f83f6['mixmonitorid']][_0xcf69('0x11')]('\x20'),'mixmonitorid':_0x2f83f6[_0xcf69('0x70')]});})[_0xcf69('0x18')](function(_0x5996eb){_0x4c55e4(_0x814320['error'](0x1f5,[_0x2f2b20[_0xcf69('0x62')],_0x5996eb[_0xcf69('0x17')][_0xcf69('0x6a')]()]['join']('\x20')));});}else{return _0x4c55e4(_0x814320['error'](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceChannelStopMixMonitor':function(_0x4ab987){var _0x5d036b=this;return new Promise(function(_0x4bfd20,_0x1ace3c){if(ami[_0xcf69('0x1a')]()==![]){return _0x1ace3c(_0x5d036b['error'](0x1f4,[config[_0xcf69('0x1b')]['ip'],config[_0xcf69('0x1b')][_0xcf69('0x10')],_0xcf69('0x1c')][_0xcf69('0x11')]('\x20')));}var _0x19310e=schema(properties['voicechannel'])['validate'](_0x4ab987);if(_0x19310e[_0xcf69('0x5b')]>0x0){return _0x1ace3c(_0x5d036b[_0xcf69('0x19')](0x1f4,_[_0xcf69('0x5f')](_0x19310e,_0xcf69('0x17'))['join'](',\x20')));}var _0x593502=_['find'](_0x4d8180['channels'],{'uniqueid':_0x4ab987[_0xcf69('0x62')]});if(_0x593502){return BPromise[_0xcf69('0x71')]()[_0xcf69('0x20')](function(){if(_0x593502[_0xcf69('0x67')]){return ami[_0xcf69('0x16')]({'action':_0xcf69('0x72'),'channel':_0x593502['channel'],'mixmonitorid':_0x4ab987[_0xcf69('0x70')]})[_0xcf69('0x18')](function(_0x111089){});}})[_0xcf69('0x20')](function(){if(_0x593502[_0xcf69('0x73')]){return ami[_0xcf69('0x16')]({'action':_0xcf69('0x72'),'channel':_0x593502[_0xcf69('0x73')],'mixmonitorid':_0x4ab987[_0xcf69('0x70')]})[_0xcf69('0x18')](function(_0x16d25d){});}})['then'](function(_0x1d5dc1){var _0x3e5450=_[_0xcf69('0x60')](_0x593502['monitors'],{'mixmonitorid':_0x4ab987[_0xcf69('0x70')]});if(_0x3e5450){_0x3e5450['status']=_0xcf69('0x74');}})['then'](function(){var _0x4b3250=util[_0xcf69('0x6')](_0xcf69('0x63'),_0x4ab987[_0xcf69('0x64')]||_0x4ab987[_0xcf69('0x62')],_0x4ab987[_0xcf69('0x6')]||'wav');var _0x5d098a=_[_0xcf69('0x60')](_0x593502[_0xcf69('0x75')],{'filename':'/var/spool/asterisk/monitor/'+_0x4b3250['toLowerCase']()});if(_0x5d098a){_0x5d098a['status']=_0xcf69('0x74');}})[_0xcf69('0x20')](function(){_0x4bfd20({'code':0xc8,'message':[_0x4ab987['uniqueid'],_0xcf69('0x76')]['join']('\x20')});})[_0xcf69('0x18')](function(_0x3b76ce){_0x1ace3c(_0x5d036b[_0xcf69('0x19')](0x1f5,[_0x4ab987[_0xcf69('0x62')],_0x3b76ce[_0xcf69('0x17')]['toLowerCase']()]['join']('\x20')));});}else{return _0x1ace3c(_0x5d036b[_0xcf69('0x19')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannels':function(_0x188d15){return new Promise(function(_0x54cf09,_0x53ee6c){var _0x5a183e=_[_0xcf69('0x77')](_0x4d8180[_0xcf69('0x78')]);_0x54cf09({'count':_0x5a183e[_0xcf69('0x5b')],'rows':_0x5a183e});});},'VoiceQueuesChannel':function(_0xbb5438){var _0x566520=this;return new Promise(function(_0x287912,_0x5658f4){var _0x243fda=schema(properties['voicequeuechannel'])[_0xcf69('0x2')](_0xbb5438);if(_0x243fda[_0xcf69('0x5b')]>0x0){return _0x5658f4(_0x566520['error'](0x1f4,_[_0xcf69('0x5f')](_0x243fda,_0xcf69('0x17'))[_0xcf69('0x11')](',\x20')));}var _0x490cce=_['find'](_0x4d8180[_0xcf69('0x78')],{'uniqueid':_0xbb5438[_0xcf69('0x62')]});if(_0x490cce){_0x287912(_0x490cce);}else{return _0x5658f4(_0x566520['error'](0x1f5,_0xcf69('0x79')));}});},'VoiceQueuesChannelHangup':function(_0x38e0b2){var _0x746a64=this;return new Promise(function(_0x4bc426,_0x48774f){if(ami[_0xcf69('0x1a')]()==![]){return _0x48774f(_0x746a64['error'](0x1f4,[config[_0xcf69('0x1b')]['ip'],config[_0xcf69('0x1b')]['username'],_0xcf69('0x1c')][_0xcf69('0x11')]('\x20')));}var _0x5b68b8=schema(properties[_0xcf69('0x7a')])['validate'](_0x38e0b2);if(_0x5b68b8[_0xcf69('0x5b')]>0x0){return _0x48774f(_0x746a64[_0xcf69('0x19')](0x1f4,_[_0xcf69('0x5f')](_0x5b68b8,_0xcf69('0x17'))[_0xcf69('0x11')](',\x20')));}var _0x52eae3=_[_0xcf69('0x60')](_0x4d8180['queueChannels'],{'uniqueid':_0x38e0b2[_0xcf69('0x62')]});if(_0x52eae3&&_0x52eae3[_0xcf69('0x67')]){return ami[_0xcf69('0x16')]({'action':_0xcf69('0x7b'),'channel':_0x52eae3['channel']})['then'](function(_0x2f97f5){_0x4bc426({'code':0xc8,'message':[_0x38e0b2[_0xcf69('0x62')],_0x2f97f5[_0xcf69('0x17')][_0xcf69('0x6a')]()][_0xcf69('0x11')]('\x20')});})[_0xcf69('0x18')](function(_0x5d5dfe){_0x48774f(_0x746a64[_0xcf69('0x19')](0x1f5,[_0x38e0b2[_0xcf69('0x62')],_0x5d5dfe[_0xcf69('0x17')][_0xcf69('0x6a')]()][_0xcf69('0x11')]('\x20')));});}else{return _0x48774f(_0x746a64['error'](0x1f5,_0xcf69('0x79')));}});},'VoiceQueuesChannelRedirect':function(_0x595e2f){var _0x4dbf4e=this;return new Promise(function(_0x96cf1d,_0x270e79){if(ami['isConnected']()==![]){return _0x270e79(_0x4dbf4e['error'](0x1f4,[config['asterisk']['ip'],config[_0xcf69('0x1b')][_0xcf69('0x10')],_0xcf69('0x1c')][_0xcf69('0x11')]('\x20')));}var _0x3d1055=schema(properties[_0xcf69('0x7c')])['validate'](_0x595e2f);if(_0x3d1055[_0xcf69('0x5b')]>0x0){return _0x270e79(_0x4dbf4e[_0xcf69('0x19')](0x1f4,_['map'](_0x3d1055,_0xcf69('0x17'))[_0xcf69('0x11')](',\x20')));}var _0x3cfb21=_[_0xcf69('0x60')](_0x4d8180[_0xcf69('0x78')],{'uniqueid':_0x595e2f[_0xcf69('0x62')]});if(_0x3cfb21&&_0x3cfb21['channel']){return ami[_0xcf69('0x16')]({'action':_0xcf69('0x7d'),'channel':_0x3cfb21[_0xcf69('0x67')],'exten':_0x595e2f[_0xcf69('0x7e')],'context':_0x595e2f['context']||_0x3cfb21[_0xcf69('0x7f')],'priority':0x1})[_0xcf69('0x20')](function(_0x2cdcc3){_0x96cf1d({'code':0xc8,'message':[_0x595e2f[_0xcf69('0x62')],_0x2cdcc3['message'][_0xcf69('0x6a')]()]['join']('\x20')});})[_0xcf69('0x18')](function(_0x1af8a0){_0x270e79(_0x4dbf4e['error'](0x1f5,[_0x595e2f['uniqueid'],_0x1af8a0['message'][_0xcf69('0x6a')]()][_0xcf69('0x11')]('\x20')));});}else{return _0x270e79(_0x4dbf4e['error'](0x1f5,_0xcf69('0x79')));}});},'Agents':function(_0x2002e1){return new Promise(function(_0x145bde,_0x2cd107){var _0x1cb7fd=_[_0xcf69('0x77')](_0x4d8180[_0xcf69('0xc')]);_0x145bde({'count':_0x1cb7fd[_0xcf69('0x5b')],'rows':_0x1cb7fd});});},'Telephones':function(_0x3f67d7){return new Promise(function(_0x4a7f65,_0x455dd0){var _0x2ca0d3=_[_0xcf69('0x77')](_0x4d8180['telephones']);_0x4a7f65({'count':_0x2ca0d3['length'],'rows':_0x2ca0d3});});},'Trunks':function(_0x57f3cb){return new Promise(function(_0x24194c,_0x587c1b){var _0x5eabdb=_[_0xcf69('0x77')](_0x4d8180[_0xcf69('0x80')]);_0x24194c({'count':_0x5eabdb[_0xcf69('0x5b')],'rows':_0x5eabdb});});},'OutboundChannels':function(_0x352d40){return new Promise(function(_0x2b79f0,_0x1fc8db){var _0xeb1b54=_['values'](_0x4d8180[_0xcf69('0x81')]);_0x2b79f0({'count':_0xeb1b54[_0xcf69('0x5b')],'rows':_0xeb1b54});});},'Outbound':function(_0x29e5fc){return new Promise(function(_0x2fbec3,_0x53438c){_0x2fbec3(_0x4d8180[_0xcf69('0x30')]);});},'Campaigns':function(_0xf339fa){return new Promise(function(_0x29d887,_0x3c7db3){var _0xac1fa9=_['values'](_0x4d8180['campaigns']);_0x29d887({'count':_0xac1fa9[_0xcf69('0x5b')],'rows':_0xac1fa9});});},'VoiceQueuesPreview':function(_0x165f37){var _0x4ece02=this;return new Promise(function(_0x14e9d6,_0x45a3a7){_0x1c813d['run'](_0x165f37['id'])[_0xcf69('0x20')](function(_0x548195){_0x14e9d6({'code':0xc8,'message':_0x548195[_0xcf69('0x17')]});})[_0xcf69('0x18')](function(_0x3d1fb0){_0x45a3a7(_0x4ece02[_0xcf69('0x19')](0x1f4,_0x3d1fb0[_0xcf69('0x17')]));});});},'EventManager':function(_0x1fe4a9){var _0x29574f=this;return new Promise(function(_0x478426,_0x3748b5){if(!_0x1fe4a9[_0xcf69('0x82')]){return _0x3748b5(_0x29574f[_0xcf69('0x19')](0x1f4,'Event\x20name\x20mandatory'));}ami[_0xcf69('0x83')](_0xcf69('0x84')+_0x1fe4a9['event'],_0x1fe4a9['message']);_0x478426({'code':0xc8,'message':_0x1fe4a9});});},'FaxAccounts':function(_0x11cdad){return new Promise(function(_0x437d15,_0x3f7b13){var _0x4c8346=_['values'](_0x4d8180[_0xcf69('0x85')]);_0x437d15({'count':_0x4c8346[_0xcf69('0x5b')],'rows':_0x4c8346});});},'SendFax':function(_0x8a4d91){var _0x47d3cb=this;return new Promise(function(_0x172362,_0x2f2ca0){_0x168197[_0xcf69('0x86')](_0x8a4d91)['then'](function(_0x363533){_0x172362({'code':0xc8,'message':_0x363533[_0xcf69('0x17')]});})[_0xcf69('0x18')](function(_0x3e73b9){_0x2f2ca0(_0x47d3cb[_0xcf69('0x19')](0x1f4,_0x3e73b9[_0xcf69('0x17')]));});});},'CheckAfterSend':function(_0x2d1bbf){var _0x4bca3d=this;return new Promise(function(_0x3e29d3,_0x1279fc){_0x168197['checkAfterSend'](_0x2d1bbf)[_0xcf69('0x20')](function(_0x17ef57){_0x3e29d3({'code':0xc8,'message':_0x17ef57[_0xcf69('0x17')]});})[_0xcf69('0x18')](function(_0x18db19){_0x1279fc(_0x4bca3d[_0xcf69('0x19')](0x1f4,_0x18db19['message']));});});}};var _0x1d7528=jayson[_0xcf69('0x87')](_0x3b7608)[_0xcf69('0x88')]();_0x1d7528['on'](_0xcf69('0x19'),function(_0x220220){return _0x35aa67(_0x220220);});_0x1d7528['listen'](0x232a,_0xcf69('0x89'),function(){console['log']('AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232a);return _0x225c65(_0xcf69('0x8a')+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 155d5cf..ba53519 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 _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 +var _0x8f6a=['[CM][%s][%s]\x20Autocreate\x20enabled','isNil','calleridname','','Unknown','destcalleridname','resolve','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','calleridnum','push','format','name','trigger:%s','action','merge','lodash','ioredis','../../../../config/environment','trigger','redis','socket.io-emitter','info','[CM][%s][%s]','stringify','emit','exec','data2','xmd-contactid','ListId','data3','split','phone','routeId','destcalleridnum','firstName','lastName','mobile','fax','createdAt','updatedAt','then','length','[CM][%s][%s]\x20Contact\x20found:%s','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','uniqueid','join','[CM][%s][%s]\x20Contact\x20not\x20found','data4'];(function(_0xbe020c,_0x3c6c2e){var _0x569197=function(_0x4c207c){while(--_0x4c207c){_0xbe020c['push'](_0xbe020c['shift']());}};_0x569197(++_0x3c6c2e);}(_0x8f6a,0xd4));var _0xa8f6=function(_0x543e77,_0x490853){_0x543e77=_0x543e77-0x0;var _0x29fe25=_0x8f6a[_0x543e77];return _0x29fe25;};'use strict';var _=require(_0xa8f6('0x0'));var BPromise=require('bluebird');var Redis=require(_0xa8f6('0x1'));var util=require('util');var config=require(_0xa8f6('0x2'));var logger=require('../../../../config/logger')(_0xa8f6('0x3'));var cmContactRpc=require('../../rpc/cmContact');config[_0xa8f6('0x4')]=_['defaults'](config[_0xa8f6('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0xa8f6('0x5'))(new Redis(config[_0xa8f6('0x4')]));function emit(_0x3d5ee5,_0x1f91ae,_0xb8695a,_0x1cbc68,_0x79e0c5){logger[_0xa8f6('0x6')](_0xa8f6('0x7'),_0x3d5ee5,_0x1f91ae['id'],_0xb8695a,_0x1cbc68,JSON[_0xa8f6('0x8')](_0x79e0c5));io['to'](_0xb8695a)[_0xa8f6('0x9')](_0x1cbc68,_0x79e0c5);}exports[_0xa8f6('0xa')]=function(_0x2bb2af,_0x4cc0f9,_0x3fbd1a,_0x43e587){var _0x3a8453,_0x34adec;var _0x4b1ec8={};var _0x4e8098=Number(_0x3fbd1a['data1']);var _0x37fdbf=_0x3fbd1a[_0xa8f6('0xb')]?Boolean(Number(_0x3fbd1a[_0xa8f6('0xb')])):![];var _0x130b56;if(_0x43e587[_0xa8f6('0xc')]){_0x4b1ec8['id']=_0x43e587['xmd-contactid'];}if(!_0x4b1ec8['id']){_0x4b1ec8[_0xa8f6('0xd')]=_0x4e8098;_0x130b56=_0x3fbd1a[_0xa8f6('0xe')]&&_0x3fbd1a[_0xa8f6('0xe')]!=='0'?_0x3fbd1a[_0xa8f6('0xe')][_0xa8f6('0xf')](','):[_0xa8f6('0x10')];_0x4b1ec8['$or']=_['map'](_0x130b56,function(_0x119969){var _0x36b73f={};_0x36b73f[_0x119969]=_0x43e587[_0xa8f6('0x11')]?_0x43e587[_0xa8f6('0x12')]:_0x43e587['calleridnum'];return _0x36b73f;});}var _0x3c2b21=['id',_0xa8f6('0x13'),_0xa8f6('0x14'),_0xa8f6('0x10'),_0xa8f6('0x15'),_0xa8f6('0x16'),'ListId',_0xa8f6('0x17'),'scheduledAt',_0xa8f6('0x18')];var _0x2cc53b=_['union'](_0x3c2b21,_0x130b56);BPromise['resolve']()[_0xa8f6('0x19')](cmContactRpc['getContacts']({'attributes':_0x2cc53b,'where':_0x4b1ec8}))['then'](function(_0x3931c3){_0x34adec=_0x3931c3;if(!_['isEmpty'](_0x34adec)){if(_0x34adec[_0xa8f6('0x1a')]===0x1){_0x3a8453=_0x34adec[0x0];logger['info'](_0xa8f6('0x1b'),_0x43e587['uniqueid'],_0x4cc0f9['id'],_0x3a8453['id']);}else{logger[_0xa8f6('0x6')](_0xa8f6('0x1c'),_0x43e587[_0xa8f6('0x1d')],_0x4cc0f9['id'],_['map'](_0x34adec,'id')[_0xa8f6('0x1e')](','));}return;}else{logger[_0xa8f6('0x6')](_0xa8f6('0x1f'),_0x43e587[_0xa8f6('0x1d')],_0x4cc0f9['id']);var _0x237626={'ListId':_0x4e8098};var _0x5405de=_0x3fbd1a[_0xa8f6('0x20')]&&_0x3fbd1a[_0xa8f6('0x20')]!=='0'?_0x3fbd1a[_0xa8f6('0x20')]:_0xa8f6('0x10');if(_0x37fdbf){logger['info'](_0xa8f6('0x21'),_0x43e587[_0xa8f6('0x1d')],_0x4cc0f9['id']);_0x237626[_0x5405de]=_['isNil'](_0x43e587[_0xa8f6('0x11')])?_0x43e587['calleridnum']:_0x43e587['destcalleridnum'];if(_[_0xa8f6('0x22')](_0x43e587['routeId'])){_0x237626[_0xa8f6('0x13')]=_0x43e587[_0xa8f6('0x23')]&&_0x43e587[_0xa8f6('0x23')]!==_0xa8f6('0x24')?_0x43e587[_0xa8f6('0x23')]:_0xa8f6('0x25');}else{_0x237626[_0xa8f6('0x13')]=_0x43e587['destcalleridname']&&_0x43e587[_0xa8f6('0x26')]!==_0xa8f6('0x24')?_0x43e587['destcalleridname']:'Unknown';}return BPromise[_0xa8f6('0x27')]()[_0xa8f6('0x19')](cmContactRpc['createContact'](_0x237626))[_0xa8f6('0x19')](function(_0x40c3f6){_0x3a8453=_0x40c3f6;_0x34adec['push'](_0x40c3f6);if(_0x3a8453){logger[_0xa8f6('0x6')](_0xa8f6('0x28'),_0x43e587['uniqueid'],_0x4cc0f9['id'],_0x3a8453['id']);}return;});}else{logger[_0xa8f6('0x6')](_0xa8f6('0x29'),_0x43e587[_0xa8f6('0x1d')],_0x4cc0f9['id']);_0x237626[_0x5405de]=_[_0xa8f6('0x22')](_0x43e587[_0xa8f6('0x11')])?_0x43e587[_0xa8f6('0x2a')]:_0x43e587[_0xa8f6('0x12')];if(_['isNil'](_0x43e587[_0xa8f6('0x11')])){_0x237626['firstName']=_0x43e587[_0xa8f6('0x23')]&&_0x43e587[_0xa8f6('0x23')]!==_0xa8f6('0x24')?_0x43e587[_0xa8f6('0x23')]:_0xa8f6('0x25');}else{_0x237626[_0xa8f6('0x13')]=_0x43e587[_0xa8f6('0x26')]&&_0x43e587[_0xa8f6('0x26')]!==_0xa8f6('0x24')?_0x43e587[_0xa8f6('0x26')]:'Unknown';}_0x3a8453=_0x237626;_0x34adec[_0xa8f6('0x2b')](_0x237626);return;}}})[_0xa8f6('0x19')](function(){if(_0x2bb2af){emit(_0x43e587['uniqueid'],_0x4cc0f9,util[_0xa8f6('0x2c')]('user:%s',_0x2bb2af[_0xa8f6('0x2d')]),util[_0xa8f6('0x2c')](_0xa8f6('0x2e'),_0x3fbd1a[_0xa8f6('0x2f')]['toLowerCase']()),{'evt':_[_0xa8f6('0x30')](_0x43e587,{'autoCreate':_0x37fdbf}),'contact':_0x3a8453===undefined?{}:_0x3a8453,'contacts':_0x34adec[_0xa8f6('0x1a')]===0x0?undefined:_0x34adec});}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js index 91773ec..5d6016b 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 _0x59c3=['AnyConditions','some','field','account','chat','operator','value','upperFirst','AccountId','message','event','agent','membername','lastevent','exports','util','lodash','url','ioredis','./cmContact','../../../config/environment','../../../config/logger','trigger','../ami','defaults','redis','localhost','socket.io-emitter','winapp','triggers','agents','voiceQueues','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentconnect','custom:agentnoanswer','custom:agentbusy','custom:amd','custom:queuecallerabandon','custom:timeout','custom:dialbegin','syncAgentDial','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','prototype','emit','stringify','clone','checkTriggers','hasOwnProperty','status','checkTrigger','merge','variables','Actions','action','toLowerCase','motionbar','browser','data1','popup','html','templates','render','data2','buildUri','isNil','data3','data4','uriLocation','windowWidth','data5','800','data6','600','winApplication','winArguments','format','interface','name','trigger:%s:%s','jscripty','user:%s','trigger:%s','contactmanager','exec','queue','routeId','urlforward','script','parse','query','AllConditions','length','every','checkConditions','channel'];(function(_0x5143bd,_0x120784){var _0x41aa21=function(_0x3ec562){while(--_0x3ec562){_0x5143bd['push'](_0x5143bd['shift']());}};_0x41aa21(++_0x120784);}(_0x59c3,0xef));var _0x359c=function(_0x37c22c,_0x28a70d){_0x37c22c=_0x37c22c-0x0;var _0x119d79=_0x59c3[_0x37c22c];return _0x119d79;};'use strict';var util=require(_0x359c('0x0'));var _=require(_0x359c('0x1'));var url=require(_0x359c('0x2'));var Mustache=require('mustache');var Redis=require(_0x359c('0x3'));var urlforward=require('./urlforward');var integration=require('./integration');var cmContact=require(_0x359c('0x4'));var script=require('./script');var config=require(_0x359c('0x5'));var logger=require(_0x359c('0x6'))(_0x359c('0x7'));var ami=require(_0x359c('0x8'));config['redis']=_[_0x359c('0x9')](config[_0x359c('0xa')],{'host':_0x359c('0xb'),'port':0x18eb});var io=require(_0x359c('0xc'))(new Redis(config[_0x359c('0xa')]));var operators={'equals':function(_0x287320,_0x4c5572){return _0x287320==_0x4c5572;},'not_equals':function(_0x241167,_0x2472b9){return _0x241167!=_0x2472b9;}};var barAndWebActions=['popup',_0x359c('0x2'),_0x359c('0xd')];function Trigger(_0x36b455){this['triggers']=_0x36b455[_0x359c('0xe')];this[_0x359c('0xf')]=_0x36b455[_0x359c('0xf')];this['voiceQueues']=_0x36b455[_0x359c('0x10')];this['templates']=_0x36b455['templates'];this[_0x359c('0x11')]=_0x36b455['voiceExtensions'];this[_0x359c('0x12')]=_0x36b455[_0x359c('0x12')];this[_0x359c('0x13')]=_0x36b455[_0x359c('0x13')];this[_0x359c('0x14')]=_0x36b455[_0x359c('0x14')];this[_0x359c('0x15')]=_0x36b455[_0x359c('0x15')];this['zohoAccounts']=_0x36b455[_0x359c('0x16')];this[_0x359c('0x17')]=_0x36b455[_0x359c('0x17')];this[_0x359c('0x18')]=_0x36b455[_0x359c('0x18')];this[_0x359c('0x19')]=_0x36b455[_0x359c('0x19')];this[_0x359c('0x1a')]=_0x36b455['dynamics365Accounts'];this['freshsalesAccounts']=_0x36b455[_0x359c('0x1b')];this[_0x359c('0x1c')]={'zendesk':this[_0x359c('0x12')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x359c('0x13')],'sugarcrm':this[_0x359c('0x15')],'zoho':this[_0x359c('0x16')],'desk':this['deskAccounts'],'vtiger':this[_0x359c('0x18')],'dynamics365':this[_0x359c('0x1a')],'freshsales':this[_0x359c('0x1b')],'servicenow':this[_0x359c('0x19')]};ami['on'](_0x359c('0x1d'),this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on'](_0x359c('0x20'),this['syncCustomEvent'][_0x359c('0x1f')](this));ami['on']('custom:agentringnoanswer',this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on']('custom:agentcomplete',this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on']('custom:agentnosuchnumber',this['syncCustomEvent'][_0x359c('0x1f')](this));ami['on'](_0x359c('0x21'),this[_0x359c('0x1e')]['bind'](this));ami['on'](_0x359c('0x22'),this['syncCustomEvent'][_0x359c('0x1f')](this));ami['on']('custom:agentcongestion',this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on']('custom:agentreject',this['syncCustomEvent'][_0x359c('0x1f')](this));ami['on'](_0x359c('0x23'),this[_0x359c('0x1e')]['bind'](this));ami['on'](_0x359c('0x24'),this['syncCustomEvent']['bind'](this));ami['on'](_0x359c('0x25'),this['syncCustomEvent'][_0x359c('0x1f')](this));ami['on'](_0x359c('0x26'),this[_0x359c('0x27')]['bind'](this));ami['on']('custom:dialconnect',this[_0x359c('0x27')]['bind'](this));ami['on']('custom:dialend',this[_0x359c('0x27')][_0x359c('0x1f')](this));ami['on']('custom:newinteraction',this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on']('custom:closedinteraction',this[_0x359c('0x1e')]['bind'](this));ami['on'](_0x359c('0x28'),this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on'](_0x359c('0x29'),this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on'](_0x359c('0x2a'),this[_0x359c('0x1e')][_0x359c('0x1f')](this));ami['on'](_0x359c('0x2b'),this['syncCustomEvent'][_0x359c('0x1f')](this));}Trigger[_0x359c('0x2c')][_0x359c('0x2d')]=function(_0xa93f4b,_0x249094,_0x54b770){logger['info'](_0xa93f4b,_0x249094,JSON[_0x359c('0x2e')](_0x54b770));io['to'](_0xa93f4b)[_0x359c('0x2d')](_0x249094,_0x54b770);};Trigger[_0x359c('0x2c')][_0x359c('0x1e')]=function(_0x10200e){var _0x13b8d7=_[_0x359c('0x2f')](_0x10200e);this[_0x359c('0x30')](_0x13b8d7);};Trigger['prototype'][_0x359c('0x27')]=function(_0x246d54){if(this[_0x359c('0xf')][_0x246d54['interface']]){this[_0x359c('0x1e')](_0x246d54);}};Trigger[_0x359c('0x2c')][_0x359c('0x30')]=function(_0xfb0a25){var _0x21cdad;for(var _0x275ff5 in this['triggers']){if(this[_0x359c('0xe')][_0x359c('0x31')](_0x275ff5)){if(this[_0x359c('0xe')][_0x275ff5][_0x359c('0x32')]){_0x21cdad=this[_0x359c('0x33')](this['triggers'][_0x275ff5],_0xfb0a25);if(_0x21cdad){_[_0x359c('0x34')](_0xfb0a25,_0xfb0a25[_0x359c('0x35')]);for(var _0x5db423=0x0,_0x48e166,_0x27a463,_0x59543d;_0x5db4230x0){_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 +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(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe14b,0x93));var _0xbe14=function(_0xd6df5e,_0x4a4e46){_0xd6df5e=_0xd6df5e-0x0;var _0x155b12=_0xe14b[_0xd6df5e];return _0x155b12;};'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 1b35ea3..ebf3ce0 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 _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 +var _0xadcc=['monitor_format','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s','ticketId',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','name','error',']\x20Error\x20running\x20Dynamics365\x20integration','inspect','lodash','request-promise','util','./util','md5','ioredis','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','POST','clientId','remoteUri','password','clientSecret','access_token','catch','toUpperCase',']\x20Wrong\x20credentials!','message','then','GET','Bearer\x20','4.0','isNil','validateEmail','email','userEmail','length','isdisabled','info',']\x20Agent\x20found\x20','systemuserid',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','username','userId','destcalleridnum','calleridnum','contacts','/systemusers(','odata-entityid','substring','lastIndexOf','enduserId','contacts?$select=telephone1','toLowerCase','telephone1','contactid',']\x20Enduser\x20created!',']\x20Enduser\x20Created!','includes','string','picklist','type','nameField','customField','indexOf','content','ticketType','incidents','assign','getString','Subjects','Descriptions','/contacts(','Fields','phonecall','callDirection','queue','headers','format','user:%s','emit','trigger:browser:url','stripTrailingSlash','serverUrl','unmanaged','outbound','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid'];(function(_0x1d9c65,_0x332bd1){var _0x3b638b=function(_0x5f53ed){while(--_0x5f53ed){_0x1d9c65['push'](_0x1d9c65['shift']());}};_0x3b638b(++_0x332bd1);}(_0xadcc,0x76));var _0xcadc=function(_0x32ebbe,_0x532a5d){_0x32ebbe=_0x32ebbe-0x0;var _0x4f9a7c=_0xadcc[_0x32ebbe];return _0x4f9a7c;};'use strict';var _=require(_0xcadc('0x0'));var BPromise=require('bluebird');var rp=require(_0xcadc('0x1'));var util=require(_0xcadc('0x2'));var intUtil=require(_0xcadc('0x3'));var md5=require(_0xcadc('0x4'));var Redis=require(_0xcadc('0x5'));var logger=require('../../../../config/logger')('dynamics365');var config=require(_0xcadc('0x6'));config[_0xcadc('0x7')]=_[_0xcadc('0x8')](config[_0xcadc('0x7')],{'host':_0xcadc('0x9'),'port':0x18eb});var io=require(_0xcadc('0xa'))(new Redis(config[_0xcadc('0x7')]));function getAuthToken(_0x346f54,_0x1d3edf,_0x204f2b){var _0x14af1e={'method':_0xcadc('0xb'),'uri':_0x1d3edf,'form':{'client_id':_0x346f54[_0xcadc('0xc')],'resource':_0x346f54[_0xcadc('0xd')],'username':_0x346f54['username'],'password':_0x346f54['password'],'grant_type':_0xcadc('0xe'),'client_secret':_0x346f54[_0xcadc('0xf')]},'json':!![]};return rp(_0x14af1e)['then'](function(_0x2431de){return _0x2431de[_0xcadc('0x10')];})[_0xcadc('0x11')](function(_0x52c540){logger['error']('['+[_0x204f2b[_0xcadc('0x12')]()]+_0xcadc('0x13'));return _0x52c540[_0xcadc('0x14')];});}function getUser(_0x3fa2a1,_0x579bda,_0xf018bf,_0x4d5837,_0x2f380f,_0x115a05){return new BPromise(function(_0x36c6e1,_0x4f42dd){return getAuthToken(_0x579bda,_0x4d5837,_0x115a05)[_0xcadc('0x15')](function(_0x3504c5){var _0x56660a={'method':_0xcadc('0x16'),'uri':_0x2f380f+'systemusers?$select=internalemailaddress,isdisabled,systemuserid','headers':{'Authorization':_0xcadc('0x17')+_0x3504c5,'OData-Version':_0xcadc('0x18')},'json':!![]};return rp(_0x56660a);})[_0xcadc('0x15')](function(_0x2007f4){var _0x18a584=_0x2007f4['value'];var _0x4738af=![];var _0x43b33e=null;if(!_[_0xcadc('0x19')](_0xf018bf)){if(intUtil[_0xcadc('0x1a')](_0xf018bf[_0xcadc('0x1b')])){_0x3fa2a1[_0xcadc('0x1c')]=_0xf018bf[_0xcadc('0x1b')];for(_0x43b33e=0x0;_0x43b33e<_0x18a584[_0xcadc('0x1d')];_0x43b33e++){if(_0x18a584[_0x43b33e]['internalemailaddress']===_0xf018bf['email']&&!_0x18a584[_0x43b33e][_0xcadc('0x1e')]){_0x4738af=!![];logger[_0xcadc('0x1f')]('['+[_0x115a05['toUpperCase']()]+_0xcadc('0x20')+_0x18a584[_0x43b33e][_0xcadc('0x21')]+'!');_0x3fa2a1['userId']=_0x18a584[_0x43b33e]['systemuserid'];}}}}if(!_0x4738af){logger[_0xcadc('0x1f')]('['+[_0x115a05['toUpperCase']()]+_0xcadc('0x22'));_0x3fa2a1['userEmail']=_0x579bda[_0xcadc('0x23')];for(_0x43b33e=0x0;_0x43b33e<_0x18a584[_0xcadc('0x1d')];_0x43b33e++){if(_0x18a584[_0x43b33e]['internalemailaddress']===_0x579bda[_0xcadc('0x23')]){_0x3fa2a1[_0xcadc('0x24')]=_0x18a584[_0x43b33e]['systemuserid'];}}}_0x36c6e1(_0x3fa2a1);})['catch'](function(_0x55b083){_0x4f42dd(_0x55b083[_0xcadc('0x14')]);});});}function createEndUser(_0x16c6be,_0x59c6f8,_0x1c07c5,_0x4d8cdc,_0x277d1e,_0x34ceac){return new BPromise(function(_0xc9d8b0,_0x3aba9d){return getAuthToken(_0x59c6f8,_0x1c07c5,_0x34ceac)[_0xcadc('0x15')](function(_0x373470){var _0x4e4f22=_0x34ceac['toLowerCase']()==='outbound'?_0x277d1e[_0xcadc('0x25')]:_0x277d1e[_0xcadc('0x26')];var _0x3a19d1={'method':_0xcadc('0xb'),'uri':_0x4d8cdc+_0xcadc('0x27'),'body':{'telephone1':_0x4e4f22,'fullname':_0x4e4f22,'firstname':_0x4e4f22,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0xcadc('0x28')+_0x16c6be[_0xcadc('0x24')]+')'},'headers':{'Authorization':_0xcadc('0x17')+_0x373470,'OData-Version':_0xcadc('0x18')},'json':!![],'resolveWithFullResponse':!![]};return rp(_0x3a19d1);})[_0xcadc('0x15')](function(_0x15bce8){var _0x479fdf=_0x15bce8['headers'][_0xcadc('0x29')];var _0x192dfa=_0x479fdf[_0xcadc('0x2a')](_0x479fdf[_0xcadc('0x2b')]('(')+0x1,_0x479fdf[_0xcadc('0x2b')](')'));_0x16c6be[_0xcadc('0x2c')]=_0x192dfa;_0xc9d8b0(_0x16c6be);})[_0xcadc('0x11')](function(_0x35ab0e){_0x3aba9d(_0x35ab0e[_0xcadc('0x14')]);});});}function getEndUser(_0xdc7931,_0x3fa74f,_0x214a50,_0x2247cd,_0x5253f1,_0x49d069){return new BPromise(function(_0x58642c,_0x568d3b){return getAuthToken(_0x3fa74f,_0x214a50,_0x49d069)[_0xcadc('0x15')](function(_0x4f6ef9){var _0x5cd68c={'method':_0xcadc('0x16'),'uri':_0x2247cd+_0xcadc('0x2d'),'headers':{'Authorization':_0xcadc('0x17')+_0x4f6ef9,'If-None-Match':null,'OData-Version':_0xcadc('0x18')},'json':!![]};return rp(_0x5cd68c);})[_0xcadc('0x15')](function(_0x4fa6c7){var _0x2b4ab4=null;if(_0x4fa6c7){var _0x278f61=_0x4fa6c7['value'];var _0x3a396e=![];for(_0x2b4ab4=0x0;_0x2b4ab4<_0x278f61[_0xcadc('0x1d')];_0x2b4ab4++){var _0x45c749=_0x49d069[_0xcadc('0x2e')]()==='outbound'?_0x5253f1[_0xcadc('0x25')]:_0x5253f1[_0xcadc('0x26')];if(_0x278f61[_0x2b4ab4][_0xcadc('0x2f')]===_0x45c749){_0x3a396e=!![];_0xdc7931[_0xcadc('0x2c')]=_0x278f61[_0x2b4ab4][_0xcadc('0x30')];}}if(_0x3a396e){_0x58642c(_0xdc7931);}else{return createEndUser(_0xdc7931,_0x3fa74f,_0x214a50,_0x2247cd,_0x5253f1,_0x49d069)[_0xcadc('0x15')](function(_0x4d4109){logger[_0xcadc('0x1f')]('['+[_0x49d069['toUpperCase']()]+_0xcadc('0x31'),_0x4d4109[_0xcadc('0x2c')]);_0x58642c(_0x4d4109);});}}else{return createEndUser(_0xdc7931,_0x3fa74f,_0x214a50,_0x2247cd,_0x5253f1,_0x49d069)[_0xcadc('0x15')](function(_0x239129){logger[_0xcadc('0x1f')]('['+[_0x49d069[_0xcadc('0x12')]()]+_0xcadc('0x32'),_0x239129[_0xcadc('0x2c')]);_0x58642c(_0x239129);});}});});}function getCustomFields(_0x1bbc50,_0x417b56,_0x4c63bb){var _0x1ff8fe={};if(_0x1bbc50[_0xcadc('0x1d')]>0x0){_['forEach'](_0x1bbc50,function(_0x4d5caf){if(_[_0xcadc('0x33')]([_0xcadc('0x34'),_0xcadc('0x35')],_0x4d5caf[_0xcadc('0x36')])&&_0x4d5caf[_0xcadc('0x37')]&&!_0x4d5caf[_0xcadc('0x38')]){var _0x561026=_0x4d5caf['idField'][_0xcadc('0x2e')]();var _0x1ecb11=_0x561026[_0xcadc('0x2a')](0x0,_0x561026[_0xcadc('0x39')]('_'));var _0x5b42f7=_0x561026[_0xcadc('0x2a')](_0x561026[_0xcadc('0x39')]('_')+0x1);if(_0x1ecb11===_0x4c63bb){_0x1ff8fe[_0x5b42f7]=_0x4d5caf[_0xcadc('0x3a')];}}});}return _0x1ff8fe;}function getTicket(_0x25dd99,_0x31fd35,_0x443e53,_0x1d70dd,_0x444c52,_0x4cfcf5,_0x5c4164){return new BPromise(function(_0x3e0307,_0x3f324a){var _0x4b64c5;return getAuthToken(_0x31fd35,_0x443e53,_0x5c4164)[_0xcadc('0x15')](function(_0x469511){if(_0x4cfcf5[_0xcadc('0x3b')]==='incident'){_0x4b64c5={'method':_0xcadc('0xb'),'uri':_0x1d70dd+_0xcadc('0x3c'),'body':Object[_0xcadc('0x3d')]({},{'title':intUtil[_0xcadc('0x3e')](_0x4cfcf5[_0xcadc('0x3f')],_0x444c52,'\x20'),'description':intUtil['getString'](_0x4cfcf5[_0xcadc('0x40')],_0x444c52,'\x0a'),'customerid_contact@odata.bind':_0xcadc('0x41')+_0x25dd99[_0xcadc('0x2c')]+')','ownerid@odata.bind':_0xcadc('0x28')+_0x25dd99[_0xcadc('0x24')]+')','caseorigincode':'1'},getCustomFields(_0x4cfcf5[_0xcadc('0x42')],_0x444c52,_0x4cfcf5[_0xcadc('0x3b')])),'headers':{'Authorization':_0xcadc('0x17')+_0x469511,'OData-Version':_0xcadc('0x18')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x4cfcf5['ticketType']===_0xcadc('0x43')){_0x4b64c5={'method':_0xcadc('0xb'),'uri':_0x1d70dd+'phonecalls','body':Object[_0xcadc('0x3d')]({},{'subject':intUtil[_0xcadc('0x3e')](_0x4cfcf5['Subjects'],_0x444c52,'\x20'),'phonenumber':String(_0x444c52[_0xcadc('0x26')]),'description':intUtil[_0xcadc('0x3e')](_0x4cfcf5[_0xcadc('0x40')],_0x444c52,'\x0a'),'regardingobjectid_contact@odata.bind':_0xcadc('0x41')+_0x25dd99['enduserId']+')','ownerid@odata.bind':_0xcadc('0x28')+_0x25dd99[_0xcadc('0x24')]+')','directioncode':_0x25dd99[_0xcadc('0x44')]===_0xcadc('0x45')?![]:!![],'phonecall_activity_parties':[{'partyid_systemuser@odata.bind':_0xcadc('0x28')+_0x25dd99[_0xcadc('0x24')]+')','participationtypemask':_0x25dd99[_0xcadc('0x44')]===_0xcadc('0x45')?0x2:0x1},{'partyid_contact@odata.bind':_0xcadc('0x41')+_0x25dd99[_0xcadc('0x2c')]+')','participationtypemask':_0x25dd99[_0xcadc('0x44')]===_0xcadc('0x45')?0x1:0x2}]},getCustomFields(_0x4cfcf5['Fields'],_0x444c52,_0x4cfcf5[_0xcadc('0x3b')])),'headers':{'Authorization':_0xcadc('0x17')+_0x469511,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x4b64c5);})[_0xcadc('0x15')](function(_0x247cee){var _0x337c70=_0x247cee[_0xcadc('0x46')]['odata-entityid'];var _0xf054=_0x337c70[_0xcadc('0x2a')](_0x337c70['lastIndexOf']('(')+0x1,_0x337c70[_0xcadc('0x2b')](')'));_0x25dd99['ticketId']=_0xf054;_0x3e0307(_0x25dd99);})['catch'](function(_0x5d9ac4){_0x3f324a(_0x5d9ac4[_0xcadc('0x14')]);});});}function emit(_0x5596a1,_0x1cc85a,_0x5b6120,_0x471f55){var _0x39195f={'uri':util[_0xcadc('0x47')]('%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s',_0x5596a1,_0x5b6120,_0x471f55)};io['to'](util[_0xcadc('0x47')](_0xcadc('0x48'),_0x1cc85a))[_0xcadc('0x49')](_0xcadc('0x4a'),_0x39195f);}exports['cs']=function(_0x5c8e03,_0xd0919d,_0x5741ae,_0x2c9814,_0x2b2b9f,_0x5b6af8,_0xb8625e,_0x2ac61b){var _0x238f43={};_0x5b6af8['remoteUri']=intUtil['stripTrailingSlash'](_0x5b6af8[_0xcadc('0xd')]);_0x5b6af8['serverUrl']=intUtil[_0xcadc('0x4b')](_0x5b6af8[_0xcadc('0x4c')]);_0x238f43[_0xcadc('0x44')]=_0x2ac61b===_0xcadc('0x45')||_0x2ac61b===_0xcadc('0x4d')?_0xcadc('0x45'):_0xcadc('0x4e');var _0x3f3b02=util['format'](_0xcadc('0x4f'),_0x5b6af8[_0xcadc('0xd')]);var _0x388efc=util[_0xcadc('0x47')](_0xcadc('0x50'),_0x5b6af8[_0xcadc('0x51')]);var _0x3252b2=util['format'](_0xcadc('0x52'),_0x5b6af8[_0xcadc('0x4c')],_0xd0919d[_0xcadc('0x53')],md5(_0xd0919d[_0xcadc('0x53')]));if(_0x2b2b9f&&_0x2b2b9f[_0xcadc('0x54')]){logger['info']('[QUEUE]',_0xcadc('0x55'));_0xd0919d[_0xcadc('0x56')]=_0x3252b2;}else if(_0xb8625e&&_0xb8625e[_0xcadc('0x57')]&&_0xb8625e[_0xcadc('0x57')]!==_0xcadc('0x58')){logger[_0xcadc('0x1f')](_0xcadc('0x59'),_0xcadc('0x55'));_0xd0919d[_0xcadc('0x56')]=_0x3252b2;}else{_0xd0919d['recordingURL']='';}return getUser(_0x238f43,_0x5b6af8,_0x2c9814,_0x388efc,_0x3f3b02,_0x2ac61b)[_0xcadc('0x15')](function(_0x4fd4ad){logger['info']('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x5a'),_0x4fd4ad['userId']);logger[_0xcadc('0x1f')]('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x5b'),_0x4fd4ad[_0xcadc('0x1c')]);return getEndUser(_0x4fd4ad,_0x5b6af8,_0x388efc,_0x3f3b02,_0xd0919d,_0x2ac61b);})[_0xcadc('0x15')](function(_0x27fe25){logger[_0xcadc('0x1f')]('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x5c'),_0x27fe25['enduserId']);logger[_0xcadc('0x1f')]('['+_0x2ac61b['toUpperCase']()+']\x20The\x20Enduser\x20phone\x20is:',_0xd0919d[_0xcadc('0x26')]);return getTicket(_0x27fe25,_0x5b6af8,_0x388efc,_0x3f3b02,_0xd0919d,_0x5741ae,_0x2ac61b);})[_0xcadc('0x15')](function(_0x2cc00e){logger[_0xcadc('0x1f')](util[_0xcadc('0x47')]('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x5d'),_0x5741ae['ticketType'],_0x2cc00e[_0xcadc('0x5e')]));logger[_0xcadc('0x1f')](util[_0xcadc('0x47')]('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x5f'),_0x2ac61b));if(_0x2ac61b!=='unmanaged'){logger[_0xcadc('0x1f')]('['+_0x2ac61b[_0xcadc('0x12')]()+']',_0xcadc('0x60'));emit(_0x5b6af8[_0xcadc('0xd')],_0x2c9814[_0xcadc('0x61')],_0x5741ae[_0xcadc('0x3b')],_0x2cc00e[_0xcadc('0x5e')]);}})[_0xcadc('0x11')](function(_0x410de3){logger[_0xcadc('0x62')]('['+_0x2ac61b[_0xcadc('0x12')]()+_0xcadc('0x63'),util[_0xcadc('0x64')](_0x410de3,{'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 7bb4b8f..62d8e31 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 _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 +var _0x7091=['find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/api/v2/contacts','Basic\x20%s','apiKey','base64','debug','[HTTP]','map','forEach','string','picklist','nameField','customField','content','toString','includes','type','idField','push','variableName','Variable','name','toLowerCase','queue','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','uniqueid','Authorization','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','error','stringify','outbound','recordingFormat','none','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','[OUTBOUND]','unmanaged','lastevent','calleridnum','lodash','request-promise','md5','./util','../../../../config/environment','freshdesk','redis','defaults','localhost','socket.io-emitter','application/json','emit','info','Creating\x20new\x20ticket...','merge','Caller\x20-\x20%s','calleridname','Subjects','getString','Descriptions','
','Tags','Fields','custom_fields','mapValues','keyBy','value','format','remoteUri','then','Ticket\x20created!','validateEmail','%s/api/v2/agents','length','Agent\x20found!'];(function(_0x466c1e,_0x3c2694){var _0xa09ea5=function(_0x30b6a6){while(--_0x30b6a6){_0x466c1e['push'](_0x466c1e['shift']());}};_0xa09ea5(++_0x3c2694);}(_0x7091,0xf1));var _0x1709=function(_0x364d0c,_0xa34f19){_0x364d0c=_0x364d0c-0x0;var _0x56c176=_0x7091[_0x364d0c];return _0x56c176;};'use strict';var _=require(_0x1709('0x0'));var rp=require(_0x1709('0x1'));var md5=require(_0x1709('0x2'));var util=require('util');var Redis=require('ioredis');var intUtil=require(_0x1709('0x3'));var config=require(_0x1709('0x4'));var logger=require('../../../../config/logger')(_0x1709('0x5'));config[_0x1709('0x6')]=_[_0x1709('0x7')](config['redis'],{'host':_0x1709('0x8'),'port':0x18eb});var io=require(_0x1709('0x9'))(new Redis(config[_0x1709('0x6')]));var headers={'Content-Type':'application/json','Accept':_0x1709('0xa')};function emit(_0x252ea8,_0x53f6fe,_0x8aed99){io['to'](_0x252ea8)[_0x1709('0xb')](_0x53f6fe,_0x8aed99);}function getTicket(_0x47fc05,_0x213aea,_0x2602fe,_0x2513e1,_0x4bfb0a){logger[_0x1709('0xc')](_0x1709('0xd'));var _0xc46679=_[_0x1709('0xe')]({'responder_id':_0x213aea['id'],'requester_id':_0x2602fe['id'],'name':util['format'](_0x1709('0xf'),_0x4bfb0a[_0x1709('0x10')]),'phone':_0x4bfb0a['calleridnum'],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0x2513e1[_0x1709('0x11')],_0x4bfb0a,'\x20'),'description':intUtil[_0x1709('0x12')](_0x2513e1[_0x1709('0x13')],_0x4bfb0a,_0x1709('0x14')),'tags':getTags(_0x2513e1[_0x1709('0x15')],'name')},getCustomFields(_0x2513e1[_0x1709('0x16')],_0x4bfb0a));_0xc46679[_0x1709('0x17')]=_[_0x1709('0x18')](_[_0x1709('0x19')](_0xc46679[_0x1709('0x17')],'id'),_0x1709('0x1a'));return request({'uri':util[_0x1709('0x1b')]('%s/api/v2/tickets',_0x47fc05[_0x1709('0x1c')]),'method':'POST','body':_0xc46679})[_0x1709('0x1d')](function(_0x884bc9){logger['info'](_0x1709('0x1e'));return _0x884bc9;});}function getUser(_0x3b3f23,_0x4ebe79){if(intUtil[_0x1709('0x1f')](_0x4ebe79)){return request({'uri':util[_0x1709('0x1b')](_0x1709('0x20'),_0x3b3f23[_0x1709('0x1c')]),'qs':{'email':_0x4ebe79}})[_0x1709('0x1d')](function(_0x495bab){if(_0x495bab[_0x1709('0x21')]){logger['info'](_0x1709('0x22'));return _[_0x1709('0x23')](_0x495bab,function(_0x2cec07){return _0x2cec07[_0x1709('0x24')][_0x1709('0x25')]===_0x4ebe79;});}else{logger[_0x1709('0xc')](_0x1709('0x26'));return request({'uri':util[_0x1709('0x1b')]('%s/api/v2/agents/me',_0x3b3f23['remoteUri'])})[_0x1709('0x1d')](function(_0x533e5f){logger['info'](_0x1709('0x27'));return _0x533e5f;});}});}else{logger['info']('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0x1709('0x1b')]('%s/api/v2/agents/me',_0x3b3f23['remoteUri'])})[_0x1709('0x1d')](function(_0x502010){logger[_0x1709('0xc')]('Admin\x20account\x20selected.');return _0x502010;});}}function getEndUser(_0x125c6e,_0x7758f0,_0x12ea35){logger[_0x1709('0xc')](_0x1709('0x28'),_0x12ea35);return request({'uri':util['format']('%s/api/v2/contacts',_0x125c6e[_0x1709('0x1c')]),'qs':{'phone':_0x12ea35}})[_0x1709('0x1d')](function(_0x1a46e8){if(_0x1a46e8[_0x1709('0x21')]){logger[_0x1709('0xc')](_0x1709('0x29'));return _['find'](_0x1a46e8,{'phone':_0x12ea35});}else{logger['info'](_0x1709('0x2a'));return request({'uri':util[_0x1709('0x1b')](_0x1709('0x2b'),_0x125c6e[_0x1709('0x1c')]),'method':'POST','body':{'name':_0x7758f0,'phone':_0x12ea35}})[_0x1709('0x1d')](function(_0x142dba){logger[_0x1709('0xc')]('Enduser\x20created.');return _0x142dba;});}});}function getAuth(_0x3a6bfd){return util[_0x1709('0x1b')](_0x1709('0x2c'),new Buffer(_0x3a6bfd[_0x1709('0x2d')]+':X')['toString'](_0x1709('0x2e')));}function request(_0x539748){logger[_0x1709('0x2f')](_0x1709('0x30'),JSON['stringify'](_0x539748));return rp(_[_0x1709('0x7')](_0x539748,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x14b22d,_0x270fca){var _0x134e48=[];if(_0x14b22d&&_0x14b22d[_0x1709('0x21')]>0x0){_0x134e48=_[_0x1709('0x31')](_0x14b22d,_0x270fca);}return _0x134e48;}function getCustomFields(_0x87eca6,_0x24f715){var _0x2c3bd6=[];var _0x3ab7da={'custom_fields':[]};if(_0x87eca6[_0x1709('0x21')]>0x0){_[_0x1709('0x32')](_0x87eca6,function(_0x337888){if(_['includes']([_0x1709('0x33'),_0x1709('0x34')],_0x337888['type'])&&_0x337888[_0x1709('0x35')]&&!_0x337888[_0x1709('0x36')]){_0x3ab7da[_0x337888['nameField']['toLowerCase']()]=_0x337888[_0x1709('0x37')][_0x1709('0x38')]();}else if(_[_0x1709('0x39')](['string',_0x1709('0x34')],_0x337888[_0x1709('0x3a')])&&_0x337888[_0x1709('0x3b')]&&_0x337888[_0x1709('0x36')]){_0x3ab7da['custom_fields'][_0x1709('0x3c')]({'id':_0x337888['idField'],'value':_0x337888['content'][_0x1709('0x38')]()});}else if(_0x337888['type']==='variable'&&_0x337888['variableName']&&_0x337888[_0x1709('0x3b')]&&_0x337888['customField']){_0x24f715[_0x337888['variableName']]&&_0x3ab7da[_0x1709('0x17')][_0x1709('0x3c')]({'id':_0x337888[_0x1709('0x3b')],'value':_0x24f715[_0x337888[_0x1709('0x3d')]][_0x1709('0x38')]()});}else if(_0x337888[_0x1709('0x3a')]==='customVariable'&&_0x337888[_0x1709('0x3e')]&&_0x337888[_0x1709('0x3e')][_0x1709('0x3f')]&&_0x337888['idField']&&_0x337888[_0x1709('0x36')]){_0x24f715[_0x337888[_0x1709('0x3e')][_0x1709('0x3f')][_0x1709('0x40')]()]&&_0x3ab7da[_0x1709('0x17')][_0x1709('0x3c')]({'id':_0x337888['idField'],'value':_0x24f715[_0x337888['Variable'][_0x1709('0x3f')][_0x1709('0x40')]()][_0x1709('0x38')]()});}});}return _0x3ab7da;}exports[_0x1709('0x41')]=function(_0x1aeaae,_0x1ee89f,_0x45b2e9,_0x20d4c8,_0x29d0db,_0x53c9f8){var _0x41fd47,_0x2e1874;_0x53c9f8['remoteUri']=intUtil[_0x1709('0x42')](_0x53c9f8[_0x1709('0x1c')]);_0x53c9f8[_0x1709('0x43')]=intUtil[_0x1709('0x42')](_0x53c9f8[_0x1709('0x43')]);if(_0x29d0db&&_0x29d0db[_0x1709('0x44')]){logger[_0x1709('0xc')]('[QUEUE]',_0x1709('0x45'));_0x1ee89f[_0x1709('0x46')]=util[_0x1709('0x1b')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x53c9f8[_0x1709('0x43')],_0x1ee89f[_0x1709('0x47')],md5(_0x1ee89f['uniqueid']));}else{_0x1ee89f[_0x1709('0x46')]='';}headers[_0x1709('0x48')]=getAuth(_0x53c9f8);return getUser(_0x53c9f8,_0x20d4c8['email'])['then'](function(_0xe55a0d){_0x41fd47=_0xe55a0d;logger[_0x1709('0xc')](_0x1709('0x49'),_0x41fd47['id']);return getEndUser(_0x53c9f8,_0x1ee89f[_0x1709('0x10')],_0x1ee89f['calleridnum']);})['then'](function(_0xc183e7){_0x2e1874=_0xc183e7;logger[_0x1709('0xc')](_0x1709('0x4a'),_0x2e1874['id']);return getTicket(_0x53c9f8,_0x41fd47,_0x2e1874,_0x45b2e9,_0x1ee89f);})['then'](function(_0x3cb835){if(_0x3cb835&&_0x3cb835['id']){logger['info'](_0x1709('0x1e'));logger[_0x1709('0xc')](_0x1709('0x4b'),_0x3cb835['id']);logger[_0x1709('0xc')](_0x1709('0x4c'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x1709('0x1b')](_0x1709('0x4d'),_0x20d4c8[_0x1709('0x3f')]),_0x1709('0x4e'),{'uri':util[_0x1709('0x1b')](_0x1709('0x4f'),_0x53c9f8[_0x1709('0x1c')],_0x3cb835['id'])});}})[_0x1709('0x50')](function(_0x4845ea){logger[_0x1709('0x51')](_0x1709('0x4c'),JSON[_0x1709('0x52')](_0x4845ea));});};exports[_0x1709('0x53')]=function(_0x1c394c,_0x52c565,_0x3c40eb,_0x408ee7,_0x20fc65,_0x511a62,_0x57e77d){var _0x4e42db,_0x52e9b3;_0x511a62[_0x1709('0x1c')]=intUtil[_0x1709('0x42')](_0x511a62[_0x1709('0x1c')]);_0x511a62[_0x1709('0x43')]=intUtil[_0x1709('0x42')](_0x511a62[_0x1709('0x43')]);if(_0x57e77d&&_0x57e77d['recordingFormat']&&_0x57e77d[_0x1709('0x54')]!==_0x1709('0x55')){logger[_0x1709('0xc')]('[OUTBOUND]',_0x1709('0x45'));_0x52c565[_0x1709('0x46')]=util[_0x1709('0x1b')](_0x1709('0x56'),_0x511a62[_0x1709('0x43')],_0x52c565[_0x1709('0x47')],md5(_0x52c565[_0x1709('0x47')]));}headers[_0x1709('0x48')]=getAuth(_0x511a62);return getUser(_0x511a62,_0x408ee7[_0x1709('0x25')])[_0x1709('0x1d')](function(_0x59414d){_0x4e42db=_0x59414d;logger[_0x1709('0xc')](_0x1709('0x49'),_0x4e42db['id']);return getEndUser(_0x511a62,_0x52c565[_0x1709('0x57')],_0x52c565['destcalleridnum']);})[_0x1709('0x1d')](function(_0x41b07a){_0x52e9b3=_0x41b07a;logger[_0x1709('0xc')](_0x1709('0x4a'),_0x52e9b3['id']);return getTicket(_0x511a62,_0x4e42db,_0x52e9b3,_0x3c40eb,_0x52c565);})[_0x1709('0x1d')](function(_0x1c83b3){if(_0x1c83b3&&_0x1c83b3['id']){logger['info'](_0x1709('0x1e'));logger[_0x1709('0xc')](_0x1709('0x4b'),_0x1c83b3['id']);logger[_0x1709('0xc')](_0x1709('0x58'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x1709('0x1b')](_0x1709('0x4d'),_0x408ee7[_0x1709('0x3f')]),_0x1709('0x4e'),{'uri':util[_0x1709('0x1b')](_0x1709('0x4f'),_0x511a62[_0x1709('0x1c')],_0x1c83b3['id'])});}})[_0x1709('0x50')](function(_0x5ebb69){logger[_0x1709('0x51')](_0x1709('0x58'),JSON[_0x1709('0x52')](_0x5ebb69));});};exports[_0x1709('0x59')]=function(_0x120b5e,_0x38a9c3,_0x501652,_0x1fd9b5,_0x5e1b45,_0x193ce6){var _0x219ceb,_0x449608;_0x193ce6['remoteUri']=intUtil[_0x1709('0x42')](_0x193ce6[_0x1709('0x1c')]);_0x193ce6[_0x1709('0x43')]=intUtil['stripTrailingSlash'](_0x193ce6[_0x1709('0x43')]);if(_0x5e1b45&&_0x5e1b45[_0x1709('0x44')]){logger[_0x1709('0xc')]('['+_0x38a9c3[_0x1709('0x5a')]['toUpperCase']()+']',_0x1709('0x45'));_0x38a9c3['recordingURL']=util[_0x1709('0x1b')](_0x1709('0x56'),_0x193ce6['serverUrl'],_0x38a9c3[_0x1709('0x47')],md5(_0x38a9c3[_0x1709('0x47')]));}else{_0x38a9c3[_0x1709('0x46')]='';}headers[_0x1709('0x48')]=getAuth(_0x193ce6);return getUser(_0x193ce6,'')[_0x1709('0x1d')](function(_0x4912e0){_0x219ceb=_0x4912e0;logger[_0x1709('0xc')](_0x1709('0x49'),_0x219ceb['id']);return getEndUser(_0x193ce6,_0x38a9c3['calleridname'],_0x38a9c3[_0x1709('0x5b')]);})['then'](function(_0x498518){_0x449608=_0x498518;logger[_0x1709('0xc')](_0x1709('0x4a'),_0x449608['id']);return getTicket(_0x193ce6,_0x219ceb,_0x449608,_0x501652,_0x38a9c3);})[_0x1709('0x1d')](function(_0x33a014){if(_0x33a014){logger['info'](_0x1709('0x1e'));logger['info'](_0x1709('0x4b'),_0x33a014['id']);}})[_0x1709('0x50')](function(_0x5227b1){logger[_0x1709('0x51')]('['+_0x38a9c3['lastevent']['toUpperCase']()+']',JSON[_0x1709('0x52')](_0x5227b1));});}; \ 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 af52ecb..5ed4634 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 _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 +var _0x230a=['apiKey','remoteUri','serverUrl','stripTrailingSlash','username','toLowerCase','destcalleridnum','calleridnum','queue','unmanaged','outbound','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','Displaying\x20task\x20in\x20a\x20new\x20tab...','name','inspect','lodash','request-promise','md5','util','moment','bluebird','ioredis','./util','../../../../config/logger','freshsales','defaults','redis','localhost','socket.io-emitter','GET','/api/selector/owners','headers','info','Getting\x20admin\x20information','then','users','length','email','adminEmail','adminId','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','message','Getting\x20user\x20list','agentEmail','userEmail','userId','User\x20found:','&entities=contact','find','contacts','contactNumber','mobile_number','endUserId','work_number','Contact\x20found\x20work_number:','/api/contacts','format','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','Creating\x20new\x20task','POST','getString','Subjects','Descriptions','Contact','YYYY-MM-DDTHH:mm:ss','add','ticketId','Task\x20created:','/contacts/','user:%s','emit','Token\x20token='];(function(_0xf645ab,_0x1823b4){var _0x29b382=function(_0x51d381){while(--_0x51d381){_0xf645ab['push'](_0xf645ab['shift']());}};_0x29b382(++_0x1823b4);}(_0x230a,0x1c0));var _0xa230=function(_0x38e166,_0x7fa5af){_0x38e166=_0x38e166-0x0;var _0x51e05c=_0x230a[_0x38e166];return _0x51e05c;};'use strict';var _=require(_0xa230('0x0'));var rp=require(_0xa230('0x1'));var md5=require(_0xa230('0x2'));var util=require(_0xa230('0x3'));var moment=require(_0xa230('0x4'));var Promise=require(_0xa230('0x5'));var Redis=require(_0xa230('0x6'));var intUtil=require(_0xa230('0x7'));var config=require('../../../../config/environment');var logger=require(_0xa230('0x8'))(_0xa230('0x9'));config['redis']=_[_0xa230('0xa')](config[_0xa230('0xb')],{'host':_0xa230('0xc'),'port':0x18eb});var io=require(_0xa230('0xd'))(new Redis(config[_0xa230('0xb')]));function getAdminId(_0x1c8ef8,_0x576e15,_0x21d886,_0x17975b){return new Promise(function(_0x1b90de,_0xe46cec){var _0xf38b27=![];var _0xea4cb9={'method':_0xa230('0xe'),'uri':_0x17975b+_0xa230('0xf'),'json':!![]};_0xea4cb9[_0xa230('0x10')]=_0x21d886;logger[_0xa230('0x11')](_0xa230('0x12'));return rp(_0xea4cb9)[_0xa230('0x13')](function(_0x42af27){if(_0x42af27){var _0x5b69d7=_0x42af27[_0xa230('0x14')];var _0x1604c=null;for(_0x1604c=0x0;_0x1604c<_0x5b69d7[_0xa230('0x15')];_0x1604c++){if(_0x5b69d7[_0x1604c][_0xa230('0x16')]===_0x1c8ef8[_0xa230('0x17')]){_0x1c8ef8[_0xa230('0x18')]=_0x5b69d7[_0x1604c]['id'];_0xf38b27=!![];}}if(_0xf38b27){logger[_0xa230('0x11')](_0xa230('0x19'),_0x1c8ef8[_0xa230('0x18')]);_0x1b90de(_0x1c8ef8);}else{_0xe46cec({'statusCode':0x194,'message':_0xa230('0x1a')});}}else{_0xe46cec({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}})[_0xa230('0x1b')](function(_0x4cb455){logger[_0xa230('0x1c')]('['+[_0x576e15[_0xa230('0x1d')]()]+']',_0x4cb455[_0xa230('0x1e')]);_0xe46cec(_0x4cb455);});});}function getUser(_0x55c4d2,_0x40ce51,_0x4f96f6){return function(_0x887485){return new Promise(function(_0xc99abc,_0x408ca5){var _0x37b361={'method':'GET','uri':_0x4f96f6+_0xa230('0xf'),'json':!![]};_0x37b361[_0xa230('0x10')]=_0x40ce51;logger[_0xa230('0x11')](_0xa230('0x1f'));return rp(_0x37b361)[_0xa230('0x13')](function(_0x540785){if(_0x540785){var _0x1c745a=_0x540785['users'];var _0x4e9d81=![];var _0x546915=null;if(_0x887485['agentEmail']!==null){logger['info']('Getting\x20user\x20with\x20email',_0x887485[_0xa230('0x20')]);_0x887485[_0xa230('0x21')]=_0x887485['agentEmail'];for(_0x546915=0x0;_0x546915<_0x1c745a[_0xa230('0x15')];_0x546915++){if(_0x1c745a[_0x546915]['email']===_0x887485[_0xa230('0x20')]){_0x4e9d81=!![];_0x887485[_0xa230('0x22')]=_0x1c745a[_0x546915]['id'];logger[_0xa230('0x11')](_0xa230('0x23'),_0x887485[_0xa230('0x22')]);}}}if(!_0x4e9d81){logger[_0xa230('0x11')]('Admin\x20selected');_0x887485[_0xa230('0x21')]=_0x887485[_0xa230('0x17')];_0x887485[_0xa230('0x22')]=_0x887485['adminId'];_0x4e9d81=!![];}if(_0x4e9d81){_0xc99abc(_0x887485);}else{_0x408ca5({'statusCode':0x194,'message':_0xa230('0x1a')});}}else{_0x408ca5({'statusCode':0x194,'message':_0xa230('0x1a')});}})[_0xa230('0x1b')](function(_0x3d2cf4){logger[_0xa230('0x1c')]('['+[_0x55c4d2[_0xa230('0x1d')]()]+']',_0x3d2cf4[_0xa230('0x1e')]);_0x408ca5(_0x3d2cf4);});});};}function searchContact(_0x3a828e,_0x471ee4,_0x4b979d,_0x5307b6){return new Promise(function(_0x2abc74,_0x750d20){var _0x3a6787={'method':_0xa230('0xe'),'headers':_0x471ee4,'uri':_0x3a828e+'/api/lookup?q='+_0x5307b6+'&f='+_0x4b979d+_0xa230('0x24'),'json':!![]};rp(_0x3a6787)[_0xa230('0x13')](function(_0x55945b){var _0x4a6805=_[_0xa230('0x25')](_0x55945b['contacts'][_0xa230('0x26')],[_0x4b979d,_0x5307b6]);_0x2abc74(_0x4a6805);})['catch'](function(_0x5d08b2){_0x750d20(_0x5d08b2);});});}function getEndUser(_0x155cc7,_0x3bf3fa,_0x207a8d){return function(_0x5e2995){return new Promise(function(_0x3238c2,_0x5c0f2b){logger[_0xa230('0x11')](util['format']('Searching\x20contact\x20with\x20phone\x20%s',_0x5e2995[_0xa230('0x27')]));searchContact(_0x207a8d,_0x3bf3fa,_0xa230('0x28'),_0x5e2995['contactNumber'])[_0xa230('0x13')](function(_0x3881f4){if(_0x3881f4){_0x5e2995[_0xa230('0x29')]=_0x3881f4['id'];logger[_0xa230('0x11')]('Contact\x20found\x20mobile_number:',_0x5e2995[_0xa230('0x29')]);return _0x3238c2(_0x5e2995);}searchContact(_0x207a8d,_0x3bf3fa,_0xa230('0x2a'),_0x5e2995[_0xa230('0x27')])[_0xa230('0x13')](function(_0x5cd422){if(_0x5cd422){_0x5e2995[_0xa230('0x29')]=_0x5cd422['id'];logger[_0xa230('0x11')](_0xa230('0x2b'),_0x5e2995[_0xa230('0x29')]);return _0x3238c2(_0x5e2995);}createEndUser(_0x5e2995,_0x155cc7,_0x3bf3fa,_0x207a8d)[_0xa230('0x13')](function(_0x4b342f){logger['info']('Contact\x20created:',_0x4b342f[_0xa230('0x29')]);return _0x3238c2(_0x4b342f);});});})[_0xa230('0x1b')](function(_0x34de88){_0x5c0f2b(_0x34de88);});});};}function createEndUser(_0x3ed4bb,_0x2064e3,_0x5075ae,_0x58116d){return new Promise(function(_0x195890,_0x1bd076){var _0x1baa50=moment();var _0x1d5e80={'method':'POST','uri':_0x58116d+_0xa230('0x2c'),'body':{'contact':{'last_name':_0x3ed4bb[_0xa230('0x27')],'work_number':_0x3ed4bb[_0xa230('0x27')],'mobile_number':_0x3ed4bb[_0xa230('0x27')],'owner_id':_0x3ed4bb[_0xa230('0x22')],'created_at':_0x1baa50[_0xa230('0x2d')]('YYYY-MM-DDTHH:mm:ss')}},'json':!![]};_0x1d5e80[_0xa230('0x10')]=_0x5075ae;logger[_0xa230('0x11')](_0xa230('0x2e'));return rp(_0x1d5e80)['then'](function(_0x4f670b){_0x3ed4bb[_0xa230('0x29')]=_0x4f670b[_0xa230('0x2f')]['id'];_0x195890(_0x3ed4bb);})[_0xa230('0x1b')](function(_0x1ce9e2){logger['error']('['+[_0x2064e3[_0xa230('0x1d')]()]+']',_0x1ce9e2[_0xa230('0x1e')]);_0x1bd076(_0x1ce9e2[_0xa230('0x1e')]);});});}function getTicket(_0x1dea2b,_0x5cea8f,_0x4b610c,_0x2d7f34,_0x5872c1){return function(_0x171a42){logger[_0xa230('0x11')](_0xa230('0x30'));return new Promise(function(_0x317bf7,_0x354959){var _0x318b24=moment();var _0x3bbc69={'method':_0xa230('0x31'),'uri':_0x4b610c+'/api/tasks','body':{'title':intUtil[_0xa230('0x32')](_0x2d7f34[_0xa230('0x33')],_0x5872c1,'\x20'),'description':intUtil[_0xa230('0x32')](_0x2d7f34[_0xa230('0x34')],_0x5872c1,'\x0a'),'owner_id':_0x171a42[_0xa230('0x22')],'creater_id':_0x171a42[_0xa230('0x18')],'targetable_id':_0x171a42[_0xa230('0x29')],'targetable_type':_0xa230('0x35'),'created_at':_0x318b24[_0xa230('0x2d')](_0xa230('0x36')),'due_date':_0x318b24[_0xa230('0x37')](0x1e,'m')[_0xa230('0x2d')](_0xa230('0x36'))},'json':!![]};_0x3bbc69[_0xa230('0x10')]=_0x5cea8f;return rp(_0x3bbc69)['then'](function(_0xb5945f){_0x171a42[_0xa230('0x38')]=_0xb5945f['task']['id'];logger[_0xa230('0x11')](_0xa230('0x39'),_0x171a42[_0xa230('0x38')]);_0x317bf7(_0x171a42);})[_0xa230('0x1b')](function(_0x497ce4){logger[_0xa230('0x1c')]('['+[_0x1dea2b[_0xa230('0x1d')]()]+']',_0x497ce4['message']);_0x354959(_0x497ce4['message']);});});};}function emit(_0xc7ad47,_0x3b977e,_0x9ebc12){var _0x34395e={'uri':_0xc7ad47+_0xa230('0x3a')+_0x9ebc12};io['to'](util[_0xa230('0x2d')](_0xa230('0x3b'),_0x3b977e))[_0xa230('0x3c')]('trigger:browser:url',_0x34395e);}exports['cs']=function(_0x3017ea,_0x1c52e0,_0x5e8f19,_0x37e943,_0x228672,_0xda5fc4,_0x4275c4,_0x3aa4c9){var _0x513938={};var _0xdec595={'Authorization':_0xa230('0x3d')+_0xda5fc4[_0xa230('0x3e')]};_0xda5fc4[_0xa230('0x3f')]=intUtil['stripTrailingSlash'](_0xda5fc4[_0xa230('0x3f')]);_0xda5fc4[_0xa230('0x40')]=intUtil[_0xa230('0x41')](_0xda5fc4[_0xa230('0x40')]);var _0x19312a=_0xda5fc4['remoteUri'];_0x513938['adminEmail']=_0xda5fc4[_0xa230('0x42')];_0x513938[_0xa230('0x27')]=_0x3aa4c9[_0xa230('0x43')]()==='outbound'?_0x1c52e0[_0xa230('0x44')]:_0x1c52e0[_0xa230('0x45')];_0x513938['callDirection']=_0x3aa4c9===_0xa230('0x46')||_0x3aa4c9===_0xa230('0x47')?_0xa230('0x46'):_0xa230('0x48');if(_0x37e943){_0x513938['agentEmail']=_0x37e943[_0xa230('0x16')];}var _0x4b6f7f=util['format'](_0xa230('0x49'),_0xda5fc4['serverUrl'],_0x1c52e0[_0xa230('0x4a')],md5(_0x1c52e0['uniqueid']));if(_0x228672&&_0x228672[_0xa230('0x4b')]){logger[_0xa230('0x11')](_0xa230('0x4c'),'Recording\x20is\x20enabled!');_0x1c52e0[_0xa230('0x4d')]=_0x4b6f7f;}else if(_0x4275c4&&_0x4275c4[_0xa230('0x4e')]&&_0x4275c4[_0xa230('0x4e')]!==_0xa230('0x4f')){logger[_0xa230('0x11')](_0xa230('0x50'),_0xa230('0x51'));_0x1c52e0['recordingURL']=_0x4b6f7f;}else{_0x1c52e0[_0xa230('0x4d')]='';}return getAdminId(_0x513938,_0x3aa4c9,_0xdec595,_0x19312a)[_0xa230('0x13')](getUser(_0x3aa4c9,_0xdec595,_0x19312a))['then'](getEndUser(_0x3aa4c9,_0xdec595,_0x19312a))[_0xa230('0x13')](getTicket(_0x3aa4c9,_0xdec595,_0x19312a,_0x5e8f19,_0x1c52e0))[_0xa230('0x13')](function(_0x3373d2){logger['info'](util[_0xa230('0x2d')]('The\x20ticket\x20ID\x20is:\x20%s',_0x3373d2['ticketId']));if(_0x3aa4c9!==_0xa230('0x47')){logger[_0xa230('0x11')]('['+[_0x3aa4c9[_0xa230('0x1d')]()]+']',_0xa230('0x52'));emit(_0x19312a,_0x37e943[_0xa230('0x53')],_0x3373d2[_0xa230('0x29')]);}})['catch'](function(_0xb15a39){logger[_0xa230('0x1c')]('['+[_0x3aa4c9[_0xa230('0x1d')]()]+']\x20Error\x20running\x20Freshsales\x20integration',util[_0xa230('0x54')](_0xb15a39,{'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 0e70c3d..d758a3d 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 _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 +var _0xd076=['./servicenow','./dynamics365','./freshsales','zendesk','salesforce','freshdesk','zoho','desk','vtiger','dynamics365','servicenow','exec','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','EVENT\x20UNKNOWN','unmanaged','sugarcrm','unknown\x20integration','../../../../config/logger','error','[EXEC]','%s\x20configuration\x20#%s\x20not\x20found','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./desk','./vtiger'];(function(_0x1865f3,_0x5154be){var _0xb69290=function(_0x12e20b){while(--_0x12e20b){_0x1865f3['push'](_0x1865f3['shift']());}};_0xb69290(++_0x5154be);}(_0xd076,0x8c));var _0x6d07=function(_0x496dfd,_0x45c2f9){_0x496dfd=_0x496dfd-0x0;var _0x6f2458=_0xd076[_0x496dfd];return _0x6f2458;};'use strict';var _=require(_0x6d07('0x0'));var util=require(_0x6d07('0x1'));var zendesk=require(_0x6d07('0x2'));var salesforce=require(_0x6d07('0x3'));var sugarcrm=require(_0x6d07('0x4'));var freshdesk=require(_0x6d07('0x5'));var zoho=require('./zoho');var desk=require(_0x6d07('0x6'));var vtiger=require(_0x6d07('0x7'));var servicenow=require(_0x6d07('0x8'));var dynamics365=require(_0x6d07('0x9'));var freshsales=require(_0x6d07('0xa'));var integrations=[_0x6d07('0xb'),_0x6d07('0xc'),'sugarcrm',_0x6d07('0xd'),_0x6d07('0xe'),_0x6d07('0xf'),_0x6d07('0x10'),_0x6d07('0x11'),'freshsales',_0x6d07('0x12')];exports[_0x6d07('0x13')]=function(_0x316fbb,_0x5fff14,_0x1d3acb,_0x139f35,_0x20c02b,_0x427c0e){if(_0x1d3acb){if(_['includes'](integrations,_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')]())){try{var _0x15cbed=null;var _0x37d59a='';var _0x136277=_0x1d3acb[_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')]()];if(_0x136277){var _0x59e3c9=_0x136277[_0x316fbb[_0x6d07('0x16')]];if(_0x59e3c9){var _0xef8c0c=_[_0x6d07('0x17')](_0x59e3c9[_0x6d07('0x18')],{'id':parseInt(_0x316fbb[_0x6d07('0x19')],0xa)});if(_0xef8c0c){if(_0x139f35){if(_0x20c02b&&_0x5fff14[_0x6d07('0x1a')]){_0x37d59a=_0x6d07('0x1a');}else if(_0x5fff14[_0x6d07('0x1b')]){_0x37d59a='outbound';}else{console['log'](_0x6d07('0x1c'),_0x5fff14);}}else{_0x37d59a=_0x6d07('0x1d');}switch(_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')]()){case _0x6d07('0xb'):zendesk[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0xc'):salesforce[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0x1e'):sugarcrm[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0xd'):freshdesk[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0xe'):zoho[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0xf'):desk[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case _0x6d07('0x10'):vtiger[_0x37d59a](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e);break;case'freshsales':freshsales['cs'](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e,_0x37d59a);break;case'servicenow':servicenow['cs'](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e,_0x37d59a);break;case _0x6d07('0x11'):dynamics365['cs'](_0x316fbb,_0x5fff14,_0xef8c0c,_0x139f35,_0x20c02b,_0x59e3c9,_0x427c0e,_0x37d59a);break;default:console['log'](_0x6d07('0x1f'));}}else{_0x15cbed=require(_0x6d07('0x20'))(_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')]());_0x15cbed[_0x6d07('0x21')](_0x6d07('0x22'),util['format'](_0x6d07('0x23'),_0x316fbb['data1'][_0x6d07('0x15')](),_0x316fbb[_0x6d07('0x19')]));}}else{_0x15cbed=require(_0x6d07('0x20'))(_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')]());_0x15cbed[_0x6d07('0x21')]('[EXEC]',util['format'](_0x6d07('0x24'),_0x316fbb[_0x6d07('0x14')][_0x6d07('0x15')](),_0x316fbb[_0x6d07('0x16')]));}}else{}}catch(_0x4a86e8){console[_0x6d07('0x21')](_0x4a86e8);}}}}; \ 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 c680cb6..6d3323c 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 _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 +var _0xf050=['calleridname','calleridnum','Fields','queue','[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','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','error','outbound','stripTrailingSlash','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','Salesforce\x20account\x20type\x20not\x20recognized','catch','unmanaged','lastevent','toUpperCase',']\x20Integration\x20account\x20type\x20%s.','request-promise','md5','jsforce','util','ioredis','./util','../../../../config/environment','../../../../config/logger','salesforce','redis','defaults','socket.io-emitter','assign','getString','Subjects','Descriptions','ticketType','ActivityDate','utc','endUserType','lead','account','WhatId','Case','ContactId','AccountId','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','create','isNil','validateEmail','find','execute','Email','Agent\x20%s\x20found.','resolve','Name','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','display_name','identity','then','user_id','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','cloneDeep','merge','$or','sobject','Contact','length','additionalSearchLead','Lead','account_contact_lead','additionalSearchAccount','additionalSearchContact','attributes','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','moduleCreate','contact','LastName','','format','Caller\x20-\x20%s','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','Company','No\x20Company','upperFirst','forEach','includes','string','picklist','idField','content','toString','variable','variableName','customVariable','Variable','name','password','securityToken','Connection','remoteUri','clientSecret','Connection\x20established.','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','email'];(function(_0x5b8310,_0x77ea6f){var _0xd3ebc1=function(_0x9dfb29){while(--_0x9dfb29){_0x5b8310['push'](_0x5b8310['shift']());}};_0xd3ebc1(++_0x77ea6f);}(_0xf050,0x9a));var _0x0f05=function(_0x2f0811,_0x589ce){_0x2f0811=_0x2f0811-0x0;var _0x18ff83=_0xf050[_0x2f0811];return _0x18ff83;};'use strict';var _=require('lodash');var rp=require(_0x0f05('0x0'));var moment=require('moment');var BPromise=require('bluebird');var md5=require(_0x0f05('0x1'));var jsforce=require(_0x0f05('0x2'));var util=require(_0x0f05('0x3'));var Redis=require(_0x0f05('0x4'));var intUtil=require(_0x0f05('0x5'));var config=require(_0x0f05('0x6'));var logger=require(_0x0f05('0x7'))(_0x0f05('0x8'));config[_0x0f05('0x9')]=_[_0x0f05('0xa')](config[_0x0f05('0x9')],{'host':'localhost','port':0x18eb});var io=require(_0x0f05('0xb'))(new Redis(config[_0x0f05('0x9')]));function emit(_0x1da019,_0xb21e96,_0x570dc9){io['to'](_0x1da019)['emit'](_0xb21e96,_0x570dc9);}function getTicket(_0x2880ad,_0x405909,_0x4b0143,_0x4db2af,_0x13226c,_0x560c0f,_0xa40909,_0x167b0c){var _0x21d6c2=Object[_0x0f05('0xc')]({},{'OwnerId':_0x405909['id'],'Subject':intUtil[_0x0f05('0xd')](_0x4db2af[_0x0f05('0xe')],_0x13226c,'\x20'),'Description':intUtil[_0x0f05('0xd')](_0x4db2af[_0x0f05('0xf')],_0x13226c,'\x0a')},getCustomFields(_0x560c0f,_0x13226c));if(_0x4b0143){if(_0x4db2af[_0x0f05('0x10')]==='Task'){_0x21d6c2[_0x0f05('0x11')]=moment[_0x0f05('0x12')]();_0x21d6c2['IsReminderSet']=![];_0x21d6c2['IsRecurrence']=![];if(_0x4b0143[_0x0f05('0x13')]==='contact'||_0x4b0143[_0x0f05('0x13')]===_0x0f05('0x14')){_0x21d6c2['WhoId']=_0x4b0143['id'];}else if(_0x4b0143[_0x0f05('0x13')]===_0x0f05('0x15')){_0x21d6c2[_0x0f05('0x16')]=_0x4b0143['id'];}}else if(_0x4db2af[_0x0f05('0x10')]===_0x0f05('0x17')){if(_0x4b0143['endUserType']==='contact'){_0x21d6c2[_0x0f05('0x18')]=_0x4b0143['id'];}else if(_0x4b0143[_0x0f05('0x13')]===_0x0f05('0x15')){_0x21d6c2[_0x0f05('0x19')]=_0x4b0143['id'];}else if(_0x4b0143[_0x0f05('0x13')]===_0x0f05('0x14')&&_0x4db2af[_0x0f05('0x1a')]){_0x21d6c2[_0x4db2af[_0x0f05('0x1a')]]=_0x4b0143['id'];}else{logger[_0x0f05('0x1b')](_0x0f05('0x1c'));}}}return _0xa40909['sobject'](_0x4db2af[_0x0f05('0x10')])[_0x0f05('0x1d')](_0x21d6c2);}function getUser(_0x366518,_0x54364d,_0x558c9e){if(!_[_0x0f05('0x1e')](_0x54364d)&&intUtil[_0x0f05('0x1f')](_0x54364d)){var _0x3fc5f5={'Email':_0x54364d};var _0xee4ece={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x558c9e['sobject']('User')[_0x0f05('0x20')](_0x3fc5f5,_0xee4ece)[_0x0f05('0x21')]()['then'](function(_0x32fa52){if(_0x32fa52['length']){var _0x133cfb=_[_0x0f05('0x20')](_0x32fa52,function(_0x5c24f3){return _0x5c24f3[_0x0f05('0x22')]===_0x54364d;});if(_0x133cfb){logger['info'](_0x0f05('0x23'),_0x54364d);return BPromise[_0x0f05('0x24')]({'id':_0x133cfb['Id'],'name':_0x133cfb[_0x0f05('0x25')]});}}else{logger[_0x0f05('0x1b')](_0x0f05('0x26'),_0x54364d);return _0x558c9e['identity']()['then'](function(_0x1a815f){return BPromise[_0x0f05('0x24')]({'id':_0x1a815f['user_id'],'name':_0x1a815f[_0x0f05('0x27')]});});}});}else{logger[_0x0f05('0x1b')](_0x0f05('0x26'),_0x54364d);return _0x558c9e[_0x0f05('0x28')]()[_0x0f05('0x29')](function(_0x54a346){return BPromise[_0x0f05('0x24')]({'id':_0x54a346[_0x0f05('0x2a')],'name':_0x54a346[_0x0f05('0x27')]});});}}function getEndUser(_0x2569cb,_0x88e43,_0x21620d,_0x4f0d41,_0x490394){var _0x3fb909={'$or':{'Phone':_0x4f0d41}};var _0x5d0ac2={'Id':!![],'Name':!![],'Phone':!![]};return BPromise['resolve']()[_0x0f05('0x29')](function(){logger['info'](_0x0f05('0x2b'),_0x4f0d41,_0x88e43[_0x0f05('0x2c')]);switch(_0x88e43[_0x0f05('0x2c')]){case _0x0f05('0x2d'):var _0x58f689=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43['additionalSearchContact']){var _0x177bec={};_0x177bec[_0x88e43['additionalSearchContact']]=_0x4f0d41;_[_0x0f05('0x2f')](_0x58f689[_0x0f05('0x30')],_0x177bec);}return _0x490394[_0x0f05('0x31')](_0x0f05('0x32'))[_0x0f05('0x20')](_0x58f689,_0x5d0ac2)[_0x0f05('0x21')]()[_0x0f05('0x29')](function(_0x1c137e){if(_0x1c137e&&_0x1c137e[_0x0f05('0x33')]){return _0x1c137e;}else{var _0x1257d6=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43[_0x0f05('0x34')]){var _0x4d0529={};_0x4d0529[_0x88e43[_0x0f05('0x34')]]=_0x4f0d41;_['merge'](_0x1257d6[_0x0f05('0x30')],_0x4d0529);}return _0x490394[_0x0f05('0x31')](_0x0f05('0x35'))[_0x0f05('0x20')](_0x1257d6,_0x5d0ac2);}});case _0x0f05('0x36'):var _0x2cb0c8=_['cloneDeep'](_0x3fb909);if(_0x88e43['additionalSearchAccount']){var _0x177bec={};_0x177bec[_0x88e43[_0x0f05('0x37')]]=_0x4f0d41;_[_0x0f05('0x2f')](_0x2cb0c8[_0x0f05('0x30')],_0x177bec);}return _0x490394[_0x0f05('0x31')]('Account')[_0x0f05('0x20')](_0x2cb0c8,_0x5d0ac2)[_0x0f05('0x21')]()[_0x0f05('0x29')](function(_0x1cfeff){if(_0x1cfeff&&_0x1cfeff[_0x0f05('0x33')]){return _0x1cfeff;}else{var _0x31c015=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43[_0x0f05('0x38')]){var _0x1056a9={};_0x1056a9[_0x88e43['additionalSearchContact']]=_0x4f0d41;_[_0x0f05('0x2f')](_0x31c015[_0x0f05('0x30')],_0x1056a9);}return _0x490394[_0x0f05('0x31')](_0x0f05('0x32'))[_0x0f05('0x20')](_0x31c015,_0x5d0ac2)[_0x0f05('0x29')](function(_0x385b15){if(_0x385b15&&_0x385b15[_0x0f05('0x33')]){return _0x385b15;}else{var _0x66a19d=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43[_0x0f05('0x34')]){var _0xb62aaa={};_0xb62aaa[_0x88e43[_0x0f05('0x34')]]=_0x4f0d41;_[_0x0f05('0x2f')](_0x66a19d['$or'],_0xb62aaa);}return _0x490394[_0x0f05('0x31')](_0x0f05('0x35'))[_0x0f05('0x20')](_0x66a19d,_0x5d0ac2);}});}});case'contact':var _0x58f689=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43[_0x0f05('0x38')]){var _0x177bec={};_0x177bec[_0x88e43[_0x0f05('0x38')]]=_0x4f0d41;_[_0x0f05('0x2f')](_0x58f689['$or'],_0x177bec);}return _0x490394['sobject'](_0x0f05('0x32'))['find'](_0x58f689,_0x5d0ac2)[_0x0f05('0x21')]();case _0x0f05('0x14'):var _0x3bdced=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43['additionalSearchLead']){var _0x177bec={};_0x177bec[_0x88e43[_0x0f05('0x34')]]=_0x4f0d41;_[_0x0f05('0x2f')](_0x3bdced[_0x0f05('0x30')],_0x177bec);}return _0x490394['sobject'](_0x0f05('0x35'))[_0x0f05('0x20')](_0x3bdced,_0x5d0ac2);case _0x0f05('0x15'):var _0x2cb0c8=_[_0x0f05('0x2e')](_0x3fb909);if(_0x88e43['additionalSearchAccount']){var _0x177bec={};_0x177bec[_0x88e43[_0x0f05('0x37')]]=_0x4f0d41;_[_0x0f05('0x2f')](_0x2cb0c8[_0x0f05('0x30')],_0x177bec);}return _0x490394['sobject']('Account')[_0x0f05('0x20')](_0x2cb0c8,_0x5d0ac2);default:return null;}})[_0x0f05('0x29')](function(_0x82f485){if(_0x82f485&&_0x82f485['length']){var _0x53e3c1=_['first'](_0x82f485);if(_0x53e3c1){return BPromise[_0x0f05('0x24')]({'id':_0x53e3c1['Id'],'name':_0x53e3c1[_0x0f05('0x25')],'phone':_0x53e3c1['Phone'],'endUserType':_0x53e3c1[_0x0f05('0x39')][_0x0f05('0x3a')][_0x0f05('0x3b')]()});}}})['then'](function(_0x5c7487){if(_0x5c7487){logger[_0x0f05('0x1b')](_0x0f05('0x3c'),_0x5c7487['endUserType'],_0x4f0d41);return BPromise[_0x0f05('0x24')](_0x5c7487);}else{logger['info']('Enduser\x20with\x20phone\x20%s\x20not\x20found',_0x4f0d41);var _0x29312b={'Phone':_0x4f0d41};if(_0x88e43[_0x0f05('0x3d')]){if(_0x88e43[_0x0f05('0x3d')]===_0x0f05('0x3e')){logger['info']('Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.',_0x4f0d41,_0x88e43['moduleCreate']);_0x29312b[_0x0f05('0x3f')]=_0x21620d!==_0x0f05('0x40')?_0x21620d:util[_0x0f05('0x41')](_0x0f05('0x42'),_0x4f0d41);}else if(_0x88e43[_0x0f05('0x3d')]==='lead'){logger[_0x0f05('0x1b')](_0x0f05('0x43'),_0x4f0d41,_0x88e43[_0x0f05('0x3d')]);_0x29312b[_0x0f05('0x3f')]=_0x21620d!==''?_0x21620d:util[_0x0f05('0x41')](_0x0f05('0x42'),_0x4f0d41);_0x29312b[_0x0f05('0x44')]=_0x0f05('0x45');}else if(_0x88e43['moduleCreate']==='account'){logger[_0x0f05('0x1b')](_0x0f05('0x43'),_0x4f0d41,_0x88e43[_0x0f05('0x3d')]);_0x29312b[_0x0f05('0x25')]=_0x21620d!==_0x0f05('0x40')?_0x21620d:util[_0x0f05('0x41')](_0x0f05('0x42'),_0x4f0d41);}else{return null;}}return _0x490394[_0x0f05('0x31')](_[_0x0f05('0x46')](_0x88e43[_0x0f05('0x3d')]))[_0x0f05('0x1d')](_0x29312b)[_0x0f05('0x29')](function(_0x595287){return BPromise[_0x0f05('0x24')]({'id':_0x595287['id'],'endUserType':_0x88e43[_0x0f05('0x3d')]});});}});}function getCustomFields(_0x504c26,_0x229dfa){var _0x282d56={};if(_0x504c26[_0x0f05('0x33')]>0x0){_[_0x0f05('0x47')](_0x504c26,function(_0xeefad4){if(_[_0x0f05('0x48')]([_0x0f05('0x49'),_0x0f05('0x4a')],_0xeefad4[_0x0f05('0x3a')])&&_0xeefad4[_0x0f05('0x4b')]){_0x282d56[_0xeefad4[_0x0f05('0x4b')]]=_0xeefad4[_0x0f05('0x4c')][_0x0f05('0x4d')]();}else if(_0xeefad4['type']===_0x0f05('0x4e')&&_0xeefad4['variableName']&&_0xeefad4[_0x0f05('0x4b')]){_0x229dfa[_0xeefad4['variableName']]&&(_0x282d56[_0xeefad4[_0x0f05('0x4b')]]=_0x229dfa[_0xeefad4[_0x0f05('0x4f')]][_0x0f05('0x4d')]());}else if(_0xeefad4[_0x0f05('0x3a')]===_0x0f05('0x50')&&_0xeefad4[_0x0f05('0x51')]&&_0xeefad4['Variable'][_0x0f05('0x52')]&&_0xeefad4[_0x0f05('0x4b')]){_0x229dfa[_0xeefad4[_0x0f05('0x51')][_0x0f05('0x52')][_0x0f05('0x3b')]()]&&(_0x282d56[_0xeefad4[_0x0f05('0x4b')]]=_0x229dfa[_0xeefad4[_0x0f05('0x51')]['name']['toLowerCase']()]['toString']());}});}return _0x282d56;}function getConnection(_0x545075){var _0x25efe7=_0x545075[_0x0f05('0x53')]['concat'](_0x545075[_0x0f05('0x54')]);var _0x37de95=new jsforce[(_0x0f05('0x55'))]({'oauth2':{'loginUrl':_0x545075[_0x0f05('0x56')]||'https://login.salesforce.com','clientId':_0x545075['clientId'],'clientSecret':_0x545075[_0x0f05('0x57')]}});return _0x37de95['login'](_0x545075['username'],_0x25efe7)[_0x0f05('0x29')](function(){logger[_0x0f05('0x1b')](_0x0f05('0x58'));return _0x37de95;});}exports['queue']=function(_0x23f70e,_0x3b89a7,_0x2a94d3,_0x3ccb11,_0x1c6b48,_0xa04100){var _0x4c54ea,_0x15a3cc,_0x4801c2,_0x283f78;_0xa04100[_0x0f05('0x59')]=intUtil['stripTrailingSlash'](_0xa04100[_0x0f05('0x59')]);_0xa04100[_0x0f05('0x56')]=intUtil['stripTrailingSlash'](_0xa04100[_0x0f05('0x56')]);if(_0x1c6b48&&_0x1c6b48[_0x0f05('0x5a')]){logger[_0x0f05('0x1b')]('[QUEUE]',_0x0f05('0x5b'));_0x3b89a7[_0x0f05('0x5c')]=util[_0x0f05('0x41')](_0x0f05('0x5d'),_0xa04100[_0x0f05('0x59')],_0x3b89a7[_0x0f05('0x5e')],md5(_0x3b89a7['uniqueid']));}else{_0x3b89a7[_0x0f05('0x5c')]='';}return getConnection(_0xa04100)['then'](function(_0x4fa869){_0x283f78=_0x4fa869;return getUser(_0xa04100,_0x3ccb11[_0x0f05('0x5f')],_0x283f78);})['then'](function(_0x38f723){_0x4c54ea=_0x38f723;return getEndUser(_0xa04100,_0x2a94d3,_0x3b89a7[_0x0f05('0x60')],_0x3b89a7[_0x0f05('0x61')],_0x283f78);})[_0x0f05('0x29')](function(_0x90a30f){_0x15a3cc=_0x90a30f;return getTicket(_0xa04100,_0x4c54ea,_0x15a3cc,_0x2a94d3,_0x3b89a7,_0x2a94d3[_0x0f05('0x62')],_0x283f78,_0x0f05('0x63'));})['then'](function(_0x342990){_0x4801c2=_0x342990;logger['info'](_0x0f05('0x64'),_0x4801c2['id']);logger['info'](_0x0f05('0x65'),_0x4801c2['id'],_0x3ccb11[_0x0f05('0x52')],_0xa04100['type']);switch(_0xa04100['type']){case _0x0f05('0x66'):emit(util[_0x0f05('0x41')](_0x0f05('0x67'),_0x3ccb11[_0x0f05('0x52')]),_0x0f05('0x68'),{'recordId':_0x4801c2['id']});break;case _0x0f05('0x69'):emit(util[_0x0f05('0x41')](_0x0f05('0x67'),_0x3ccb11[_0x0f05('0x52')]),_0x0f05('0x6a'),{'uri':util[_0x0f05('0x41')](_0x0f05('0x6b'),_0x283f78[_0x0f05('0x6c')],_0x4801c2['id'])});break;default:logger['error'](_0x0f05('0x6d'));}})['catch'](function(_0x1e8c97){logger[_0x0f05('0x6e')]('[QUEUE]',_0x1e8c97);});};exports[_0x0f05('0x6f')]=function(_0x23ca98,_0x141baa,_0x42ecb9,_0x4242cf,_0x599afd,_0x5c60be,_0x221a08){var _0x2eee61,_0x5adf84,_0x361da9,_0x42dcda;_0x5c60be[_0x0f05('0x59')]=intUtil[_0x0f05('0x70')](_0x5c60be[_0x0f05('0x59')]);_0x5c60be[_0x0f05('0x56')]=intUtil['stripTrailingSlash'](_0x5c60be['remoteUri']);if(_0x221a08&&_0x221a08['recordingFormat']&&_0x221a08[_0x0f05('0x71')]!=='none'){logger['info'](_0x0f05('0x72'),_0x0f05('0x5b'));_0x141baa[_0x0f05('0x5c')]=util[_0x0f05('0x41')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x5c60be[_0x0f05('0x59')],_0x141baa['uniqueid'],md5(_0x141baa[_0x0f05('0x5e')]));}return getConnection(_0x5c60be)[_0x0f05('0x29')](function(_0x2464f9){_0x42dcda=_0x2464f9;return getUser(_0x5c60be,_0x4242cf[_0x0f05('0x5f')],_0x42dcda);})[_0x0f05('0x29')](function(_0x1aa02c){_0x2eee61=_0x1aa02c;return getEndUser(_0x5c60be,_0x42ecb9,_0x141baa[_0x0f05('0x73')],_0x141baa[_0x0f05('0x74')],_0x42dcda);})['then'](function(_0xa76ec6){_0x5adf84=_0xa76ec6;return getTicket(_0x5c60be,_0x2eee61,_0x5adf84,_0x42ecb9,_0x141baa,_0x42ecb9[_0x0f05('0x62')],_0x42dcda,'outbound');})[_0x0f05('0x29')](function(_0x24b249){_0x361da9=_0x24b249;logger[_0x0f05('0x1b')](_0x0f05('0x75'),_0x361da9['id']);logger['info'](_0x0f05('0x76'),_0x361da9['id'],_0x4242cf[_0x0f05('0x52')],_0x5c60be[_0x0f05('0x3a')]);switch(_0x5c60be[_0x0f05('0x3a')]){case _0x0f05('0x66'):emit(util[_0x0f05('0x41')](_0x0f05('0x67'),_0x4242cf[_0x0f05('0x52')]),_0x0f05('0x68'),{'recordId':_0x361da9['id']});break;case'newTab':emit(util['format'](_0x0f05('0x67'),_0x4242cf[_0x0f05('0x52')]),'trigger:browser:url',{'uri':util[_0x0f05('0x41')](_0x0f05('0x6b'),_0x42dcda[_0x0f05('0x6c')],_0x361da9['id'])});break;default:logger[_0x0f05('0x6e')](_0x0f05('0x72'),_0x0f05('0x77'));}})[_0x0f05('0x78')](function(_0x560340){logger[_0x0f05('0x6e')]('[OUTBOUND]',_0x560340);});};exports[_0x0f05('0x79')]=function(_0x3e638c,_0x10f364,_0x41a726,_0x4a9f32,_0x233155,_0x35272a){var _0x206393,_0x58fdce,_0x3c1915,_0xe5a156;_0x35272a['serverUrl']=intUtil[_0x0f05('0x70')](_0x35272a[_0x0f05('0x59')]);_0x35272a[_0x0f05('0x56')]=intUtil['stripTrailingSlash'](_0x35272a['remoteUri']);if(_0x233155&&_0x233155[_0x0f05('0x5a')]){logger[_0x0f05('0x1b')]('['+_0x10f364[_0x0f05('0x7a')]['toUpperCase']()+']',_0x0f05('0x5b'));_0x10f364['recordingURL']=util[_0x0f05('0x41')](_0x0f05('0x5d'),_0x35272a['serverUrl'],_0x10f364[_0x0f05('0x5e')],md5(_0x10f364[_0x0f05('0x5e')]));}else{_0x10f364[_0x0f05('0x5c')]='';}return getConnection(_0x35272a)['then'](function(_0x25e0f6){_0xe5a156=_0x25e0f6;if(!_[_0x0f05('0x1e')](_0x4a9f32)){return getUser(_0x35272a,_0x4a9f32[_0x0f05('0x52')],_0xe5a156);}else{return getUser(_0x35272a,null,_0xe5a156);}})[_0x0f05('0x29')](function(_0x50b79a){_0x206393=_0x50b79a;return getEndUser(_0x35272a,_0x41a726,_0x10f364[_0x0f05('0x60')],_0x10f364[_0x0f05('0x61')],_0xe5a156);})[_0x0f05('0x29')](function(_0x33bed1){_0x58fdce=_0x33bed1;return getTicket(_0x35272a,_0x206393,_0x58fdce,_0x41a726,_0x10f364,_0x41a726['Fields'],_0xe5a156);})['then'](function(_0x3ef2ab){_0x3c1915=_0x3ef2ab;logger['info']('['+_0x10f364[_0x0f05('0x7a')][_0x0f05('0x7b')]()+']\x20Ticket\x20%s\x20created.',_0x3c1915['id']);logger[_0x0f05('0x1b')]('['+_0x10f364[_0x0f05('0x7a')][_0x0f05('0x7b')]()+_0x0f05('0x7c'),_0x35272a['type']);})['catch'](function(_0xaad09a){logger['error']('['+_0x10f364[_0x0f05('0x7a')][_0x0f05('0x7b')]()+']',_0xaad09a);});}; \ 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 516f940..60579df 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 _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 +var _0xb962=['?sysparm_query=name%3D','ticketId','Incident\x20-\x20','forEach','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','password','sysparm_limit=1','sysparm_display_value=true','remoteUri','stripTrailingSlash','serverUrl','%s/api/now/table/','email','destcalleridnum','callDirection','queue','unmanaged','outbound','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','Recording\x20is\x20enabled!','recordingFormat','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','bluebird','request-promise','util','md5','ioredis','./util','servicenow','redis','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','result','adminId','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','catch','error','message','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','then','length','userId','adminEmail','],\x20getUser\x20crm',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','sys_user?','endUserNumber','user','true','System','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','],\x20createEndUser\x20crm','includes','string','picklist','type','nameField','customField','toLowerCase','content','toString','idField','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','POST','incident','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketNumber','number',']\x20getTicket\x20crm','label'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb962,0x15d));var _0x2b96=function(_0x36b6da,_0x5ea780){_0x36b6da=_0x36b6da-0x0;var _0x3b87af=_0xb962[_0x36b6da];return _0x3b87af;};'use strict';var _=require('lodash');var Promise=require(_0x2b96('0x0'));var rp=require(_0x2b96('0x1'));var util=require(_0x2b96('0x2'));var md5=require(_0x2b96('0x3'));var Redis=require(_0x2b96('0x4'));var intUtil=require(_0x2b96('0x5'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0x2b96('0x6'));config[_0x2b96('0x7')]=_[_0x2b96('0x8')](config['redis'],{'host':_0x2b96('0x9'),'port':0x18eb});var io=require(_0x2b96('0xa'))(new Redis(config[_0x2b96('0x7')]));function getAdminUser(_0x166481,_0x3e9d97,_0x6baf78,_0x4733e6,_0x47a253,_0x4f433c){return new Promise(function(_0x1f95a1,_0x2a26d8){var _0x35cad4={'method':_0x2b96('0xb'),'uri':_0x4733e6+_0x2b96('0xc')+'&'+_0x47a253+'&'+_0x4f433c,'auth':_0x3e9d97,'json':!![]};return rp(_0x35cad4)['then'](function(_0x188fa3){if(_0x188fa3[_0x2b96('0xd')]['length']>0x0){_0x6baf78[_0x2b96('0xe')]=_0x188fa3['result'][0x0][_0x2b96('0xf')];}logger[_0x2b96('0x10')]('['+[_0x166481[_0x2b96('0x11')]()]+_0x2b96('0x12'),_0x6baf78);_0x1f95a1(_0x6baf78);})[_0x2b96('0x13')](function(_0x379ceb){logger[_0x2b96('0x14')]('['+[_0x166481[_0x2b96('0x11')]()]+']',_0x379ceb[_0x2b96('0x15')]);_0x2a26d8(_0x379ceb[_0x2b96('0x15')]);});});}function getUser(_0x47d9ea,_0x196eaa,_0x584fc8,_0x87cf90,_0xf2f663){return function(_0x2b18ed){logger['info']('['+[_0x47d9ea[_0x2b96('0x11')]()]+'],\x20getUser\x20input\x20crm',_0x2b18ed);return new Promise(function(_0x246236,_0x210a3b){if(intUtil[_0x2b96('0x16')](_0x2b18ed[_0x2b96('0x17')])){var _0x3729e1={'method':_0x2b96('0xb'),'uri':_0x584fc8+_0x2b96('0x18')+_0x2b18ed[_0x2b96('0x17')]+'&'+_0x87cf90+'&'+_0xf2f663,'auth':_0x196eaa,'json':!![]};logger['info']('['+[_0x47d9ea[_0x2b96('0x11')]()]+_0x2b96('0x19'),_0x3729e1);return rp(_0x3729e1)[_0x2b96('0x1a')](function(_0x59e3b2){logger[_0x2b96('0x10')]('['+[_0x47d9ea[_0x2b96('0x11')]()]+'],\x20getUser\x20entity',_0x59e3b2);if(_0x59e3b2[_0x2b96('0xd')][_0x2b96('0x1b')]>0x0&&String(_0x59e3b2[_0x2b96('0xd')][0x0]['active'])==='true'){_0x2b18ed[_0x2b96('0x1c')]=_0x59e3b2[_0x2b96('0xd')][0x0][_0x2b96('0xf')];}else{_0x2b18ed[_0x2b96('0x1c')]=_0x2b18ed[_0x2b96('0xe')];_0x2b18ed[_0x2b96('0x17')]=_0x2b18ed[_0x2b96('0x1d')];}logger[_0x2b96('0x10')]('['+[_0x47d9ea[_0x2b96('0x11')]()]+_0x2b96('0x1e'),_0x2b18ed);_0x246236(_0x2b18ed);})[_0x2b96('0x13')](function(_0x572087){logger[_0x2b96('0x14')]('['+[_0x47d9ea[_0x2b96('0x11')]()]+']',_0x572087[_0x2b96('0x15')]);_0x210a3b(_0x572087[_0x2b96('0x15')]);});}else{logger[_0x2b96('0x10')]('['+[_0x47d9ea[_0x2b96('0x11')]()]+_0x2b96('0x1f'));_0x2b18ed[_0x2b96('0x1c')]=_0x2b18ed[_0x2b96('0xe')];_0x2b18ed[_0x2b96('0x17')]=_0x2b18ed[_0x2b96('0x1d')];_0x246236(_0x2b18ed);}});};}function createEndUser(_0xbe9e0b,_0x193778,_0x360dba,_0x24154c,_0x567d7d){logger[_0x2b96('0x10')]('['+[_0xbe9e0b[_0x2b96('0x11')]()]+_0x2b96('0x20'),_0x360dba);return new Promise(function(_0x41c0e3,_0x43b2f8){var _0x51929a={'method':'POST','uri':_0x24154c+_0x2b96('0x21')+_0x567d7d,'body':{'user_name':_0x360dba[_0x2b96('0x22')],'roles':_0x2b96('0x23'),'first_name':_0x360dba['endUserNumber'],'active':_0x2b96('0x24'),'date_format':_0x2b96('0x25'),'phone':_0x360dba['endUserNumber']},'auth':_0x193778,'json':!![]};return rp(_0x51929a)[_0x2b96('0x1a')](function(_0x5dc6cb){logger['info']('['+[_0xbe9e0b['toUpperCase']()]+_0x2b96('0x26'),_0x5dc6cb[_0x2b96('0xd')]);_0x360dba[_0x2b96('0x27')]=_0x5dc6cb[_0x2b96('0xd')][_0x2b96('0xf')];_0x41c0e3(_0x360dba);})[_0x2b96('0x13')](function(_0x39a210){logger[_0x2b96('0x14')]('['+[_0xbe9e0b[_0x2b96('0x11')]()]+']',_0x39a210[_0x2b96('0x15')]);_0x43b2f8(_0x39a210[_0x2b96('0x15')]);});});}function getEndUser(_0x4c5e50,_0x96739e,_0x3723ae,_0x2abd2a,_0x317d8e){return function(_0x58a2b3){logger['info']('['+[_0x4c5e50['toUpperCase']()]+_0x2b96('0x28'),_0x58a2b3);return new Promise(function(_0x355b97,_0x1a4e83){var _0x10de1f={'method':_0x2b96('0xb'),'uri':_0x3723ae+'sys_user?sysparm_query=phone%3D'+_0x58a2b3[_0x2b96('0x22')]+'&'+_0x2abd2a+'&'+_0x317d8e,'auth':_0x96739e,'json':!![]};return rp(_0x10de1f)['then'](function(_0x2c1ae1){if(_0x2c1ae1['result'][_0x2b96('0x1b')]>0x0){_0x58a2b3[_0x2b96('0x27')]=_0x2c1ae1[_0x2b96('0xd')][0x0][_0x2b96('0xf')];logger[_0x2b96('0x10')]('['+[_0x4c5e50[_0x2b96('0x11')]()]+'],\x20getEndUser\x20crm',_0x58a2b3);_0x355b97(_0x58a2b3);}else{return createEndUser(_0x4c5e50,_0x96739e,_0x58a2b3,_0x3723ae,_0x2abd2a)[_0x2b96('0x1a')](function(_0x59f6ff){logger[_0x2b96('0x10')]('['+[_0x4c5e50[_0x2b96('0x11')]()]+_0x2b96('0x29'),_0x59f6ff);_0x355b97(_0x59f6ff);});}})[_0x2b96('0x13')](function(_0x4b7c77){logger[_0x2b96('0x14')]('['+[_0x4c5e50[_0x2b96('0x11')]()]+']',_0x4b7c77[_0x2b96('0x15')]);_0x1a4e83(_0x4b7c77[_0x2b96('0x15')]);});});};}function getCustomFields(_0x49e97f,_0x32e47c){var _0x3c4177={};if(_0x49e97f[_0x2b96('0x1b')]>0x0){_['forEach'](_0x49e97f,function(_0x17a077){if(_[_0x2b96('0x2a')]([_0x2b96('0x2b'),_0x2b96('0x2c')],_0x17a077[_0x2b96('0x2d')])&&_0x17a077[_0x2b96('0x2e')]&&!_0x17a077[_0x2b96('0x2f')]){_0x3c4177[_0x17a077['nameField'][_0x2b96('0x30')]()]=_0x17a077[_0x2b96('0x31')][_0x2b96('0x32')]();}else if(_[_0x2b96('0x2a')]([_0x2b96('0x2b'),_0x2b96('0x2c')],_0x17a077[_0x2b96('0x2d')])&&_0x17a077[_0x2b96('0x33')]&&_0x17a077[_0x2b96('0x2f')]){_0x3c4177[_0x17a077[_0x2b96('0x33')][_0x2b96('0x30')]()]=_0x17a077['content'][_0x2b96('0x32')]();}else if(_0x17a077[_0x2b96('0x2d')]==='variable'&&_0x17a077[_0x2b96('0x34')]&&_0x17a077[_0x2b96('0x33')]&&_0x17a077[_0x2b96('0x2f')]){_0x3c4177[_0x17a077[_0x2b96('0x33')][_0x2b96('0x30')]()]=_0x32e47c[_0x17a077['variableName']]['toString']();}else if(_0x17a077[_0x2b96('0x2d')]===_0x2b96('0x35')&&_0x17a077[_0x2b96('0x36')]&&_0x17a077[_0x2b96('0x36')][_0x2b96('0x37')]&&_0x17a077[_0x2b96('0x33')]&&_0x17a077[_0x2b96('0x2f')]){_0x3c4177[_0x17a077['idField']['toLowerCase']()]=_0x32e47c[_0x17a077[_0x2b96('0x36')][_0x2b96('0x37')][_0x2b96('0x30')]()]['toString']();}});}return _0x3c4177;}function getTicket(_0x5cb9e0,_0xf06baf,_0x1b47a4,_0xf6511,_0x22fd05,_0x41d8d3){return function(_0x50e4de){logger[_0x2b96('0x10')]('['+[_0x5cb9e0[_0x2b96('0x11')]()]+_0x2b96('0x38'),_0x50e4de);return new Promise(function(_0x1e92c9,_0x3dda51){var _0x3aaa0f=_0x5cb9e0[_0x2b96('0x30')]()==='outbound'?_0x50e4de['userId']:_0x50e4de[_0x2b96('0x27')];var _0x492c11={'method':_0x2b96('0x39'),'uri':_0x1b47a4+_0x2b96('0x3a')+'?'+_0x41d8d3,'body':Object['assign']({},{'active':_0x2b96('0x24'),'caller_id':_0x3aaa0f,'assigned_to':_0x50e4de[_0x2b96('0x1c')],'short_description':intUtil[_0x2b96('0x3b')](_0xf6511['Subjects'],_0x22fd05,'\x20'),'description':intUtil['getString'](_0xf6511[_0x2b96('0x3c')],_0x22fd05,'\x0a')},getCustomFields(_0xf6511[_0x2b96('0x3d')],_0x22fd05)),'auth':_0xf06baf,'json':!![]};return rp(_0x492c11)['then'](function(_0x424e99){logger[_0x2b96('0x10')]('['+[_0x5cb9e0[_0x2b96('0x11')]()]+_0x2b96('0x3e'),_0x424e99['result']);_0x50e4de['ticketId']=_0x424e99[_0x2b96('0xd')]['sys_id'];_0x50e4de[_0x2b96('0x3f')]=_0x424e99['result'][_0x2b96('0x40')];logger[_0x2b96('0x10')]('['+[_0x5cb9e0[_0x2b96('0x11')]()]+_0x2b96('0x41'),_0x50e4de);_0x1e92c9(_0x50e4de);})['catch'](function(_0x5e73ca){logger['error']('['+[_0x5cb9e0[_0x2b96('0x11')]()]+']',_0x5e73ca[_0x2b96('0x15')]);_0x3dda51(_0x5e73ca[_0x2b96('0x15')]);});});};}function createRemoteTag(_0x198ee5,_0x2e555d,_0x518575,_0x18a61b){return new Promise(function(_0x3672bd,_0x1e8257){var _0x488757={'method':_0x2b96('0x39'),'uri':_0x518575+_0x2b96('0x42')+'?'+_0x18a61b,'body':{'short_description':_0x198ee5,'global':!![],'active':!![],'name':_0x198ee5},'auth':_0x2e555d,'json':!![]};return rp(_0x488757)['then'](function(_0x255fef){var _0x3ef86b=_0x255fef['result'][_0x2b96('0xf')];_0x3672bd(_0x3ef86b);});});}function getRemoteTag(_0x51975b,_0x8ad0bb,_0x12e0ff,_0x4a8e3d,_0x1acb63){return new Promise(function(_0x231f2c,_0x582749){var _0x19e4d0={'method':_0x2b96('0xb'),'uri':_0x12e0ff+'label'+_0x2b96('0x43')+_0x51975b+'&'+_0x4a8e3d,'auth':_0x8ad0bb,'json':!![]};return rp(_0x19e4d0)['then'](function(_0x184416){if(_0x184416[_0x2b96('0xd')]['length']>0x0){var _0x12a1f5=_0x184416[_0x2b96('0xd')][0x0]['sys_id'];_0x231f2c(_0x12a1f5);}else{return createRemoteTag(_0x51975b,_0x8ad0bb,_0x12e0ff,_0x4a8e3d)[_0x2b96('0x1a')](function(_0x596834){_0x231f2c(_0x596834);});}});});}function assignTagToIncident(_0x466a3d,_0x276440,_0x25bd63,_0x69a54c,_0x130e00){return new Promise(function(_0x1665dc,_0x15204b){var _0x268bfa={'method':_0x2b96('0x39'),'uri':_0x25bd63+'label_entry'+'?'+_0x130e00,'body':{'label':_0x466a3d,'table':'incident','id_type':'Incident','table_key':_0x69a54c[_0x2b96('0x44')],'title':_0x2b96('0x45')+_0x69a54c[_0x2b96('0x3f')],'id_display':_0x69a54c[_0x2b96('0x3f')]},'auth':_0x276440,'json':!![]};return rp(_0x268bfa)[_0x2b96('0x1a')](function(_0x4d0450){_0x1665dc();})[_0x2b96('0x13')](function(){_0x1665dc();});});}function manageTags(_0x105675,_0x3946c4,_0x442669,_0x56ceae,_0xc9ce88,_0x3bdf35,_0x5748df){return new Promise(function(_0x4a17fa,_0x247714){var _0x31e11c=[];_0x3946c4[_0x2b96('0x46')](function(_0x28551f){_0x31e11c[_0x2b96('0x47')](getRemoteTag(_0x28551f,_0x442669,_0x56ceae,_0x3bdf35,_0x5748df));});return Promise[_0x2b96('0x48')](_0x31e11c)[_0x2b96('0x1a')](function(_0x5763b1){if(_0x5763b1[_0x2b96('0x1b')]){logger[_0x2b96('0x10')]('['+[_0x105675[_0x2b96('0x11')]()]+_0x2b96('0x49'),_0x5763b1);var _0x5dae2a=[];_0x5763b1[_0x2b96('0x46')](function(_0x29722c){_0x5dae2a[_0x2b96('0x47')](assignTagToIncident(_0x29722c,_0x442669,_0x56ceae,_0xc9ce88,_0x3bdf35));});return Promise[_0x2b96('0x48')](_0x5dae2a)['then'](function(){_0x4a17fa();})['catch'](function(){_0x4a17fa();});}else{_0x4a17fa();}});});}function getTags(_0x3ef5dc,_0xd5cb29,_0x31c534,_0x5e4909,_0x2eac6b,_0x1504d8){return function(_0x377b25){return new Promise(function(_0x143837,_0x44fb72){var _0x2edc3c=[];var _0x3ab2d8=_0x5e4909[_0x2b96('0x4a')];if(_0x3ab2d8&&_0x3ab2d8[_0x2b96('0x1b')]>0x0){_0x2edc3c=_['map'](_0x3ab2d8,_0x2b96('0x37'));}if(_0x2edc3c[_0x2b96('0x1b')]>0x0){return manageTags(_0x3ef5dc,_0x2edc3c,_0xd5cb29,_0x31c534,_0x377b25,_0x2eac6b,_0x1504d8)[_0x2b96('0x1a')](function(){_0x143837(_0x377b25);});}else{_0x143837(_0x377b25);}});};}function emit(_0x2a6776,_0x497c48,_0x2fb866){var _0x42dce6=_0x2b96('0x4b')+_0x2b96('0x4c')+_0x2b96('0x4d')+_0x2b96('0x4e');var _0x61c1f5={'uri':_0x2a6776+_0x2b96('0x4f')+_0x2fb866+_0x42dce6};io['to'](util[_0x2b96('0x50')](_0x2b96('0x51'),_0x497c48))[_0x2b96('0x52')]('trigger:browser:url',_0x61c1f5);}exports['cs']=function(_0x2ebf0c,_0x1ce96f,_0x4fbab4,_0x4aaad0,_0x148c72,_0x2a0e28,_0x2e5409,_0x96189b){var _0x2c071f={};var _0x425b1a={'user':_0x2a0e28['username'],'pass':_0x2a0e28[_0x2b96('0x53')]};var _0x2468c0=_0x2b96('0x54');var _0x3573ab=_0x2b96('0x55');_0x2a0e28[_0x2b96('0x56')]=intUtil[_0x2b96('0x57')](_0x2a0e28[_0x2b96('0x56')]);_0x2a0e28['serverUrl']=intUtil[_0x2b96('0x57')](_0x2a0e28[_0x2b96('0x58')]);var _0x2c92cb=util['format'](_0x2b96('0x59'),_0x2a0e28[_0x2b96('0x56')]);_0x2c071f[_0x2b96('0x17')]=!_['isNil'](_0x4aaad0)?_0x4aaad0['email']:null;_0x2c071f[_0x2b96('0x1d')]=_0x2a0e28[_0x2b96('0x5a')];_0x2c071f['endUserNumber']=_0x96189b[_0x2b96('0x30')]()==='outbound'?_0x1ce96f[_0x2b96('0x5b')]:_0x1ce96f['calleridnum'];_0x2c071f[_0x2b96('0x5c')]=_0x96189b===_0x2b96('0x5d')||_0x96189b===_0x2b96('0x5e')?_0x2b96('0x5d'):_0x2b96('0x5f');var _0x356134=util['format'](_0x2b96('0x60'),_0x2a0e28[_0x2b96('0x58')],_0x1ce96f[_0x2b96('0x61')],md5(_0x1ce96f[_0x2b96('0x61')]));if(_0x148c72&&_0x148c72[_0x2b96('0x62')]){logger['info']('[QUEUE]',_0x2b96('0x63'));_0x1ce96f['recordingURL']=_0x356134;}else if(_0x2e5409&&_0x2e5409['recordingFormat']&&_0x2e5409[_0x2b96('0x64')]!=='none'){logger[_0x2b96('0x10')](_0x2b96('0x65'),'Recording\x20is\x20enabled!');_0x1ce96f['recordingURL']=_0x356134;}else{_0x1ce96f['recordingURL']='';}return getAdminUser(_0x96189b,_0x425b1a,_0x2c071f,_0x2c92cb,_0x3573ab,_0x2468c0)['then'](getUser(_0x96189b,_0x425b1a,_0x2c92cb,_0x3573ab,_0x2468c0))[_0x2b96('0x1a')](getEndUser(_0x96189b,_0x425b1a,_0x2c92cb,_0x3573ab,_0x2468c0))[_0x2b96('0x1a')](getTicket(_0x96189b,_0x425b1a,_0x2c92cb,_0x4fbab4,_0x1ce96f,_0x3573ab))[_0x2b96('0x1a')](function(_0x1b59d9){logger[_0x2b96('0x10')](util[_0x2b96('0x50')](_0x2b96('0x66'),_0x1b59d9[_0x2b96('0x44')]));logger[_0x2b96('0x10')](util[_0x2b96('0x50')]('call\x20direction:\x20%s',_0x96189b));if(_0x96189b!==_0x2b96('0x5e')){logger[_0x2b96('0x10')]('['+[_0x96189b[_0x2b96('0x11')]()]+']',_0x2b96('0x67'));emit(_0x2a0e28[_0x2b96('0x56')],_0x4aaad0[_0x2b96('0x37')],_0x1b59d9[_0x2b96('0x44')]);}})['catch'](function(_0x46f458){logger[_0x2b96('0x14')]('['+[_0x96189b['toUpperCase']()]+']\x20Error\x20running\x20ServiceNow\x20integration',util['inspect'](_0x46f458,{'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 b28bd3e..51d3f65 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 _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 +var _0xa0a3=['sessionID','set_relationship','queue','remoteUri','stripTrailingSlash','serverUrl','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','Inbound','The\x20Ticket\x20ID\x20is:','users','contacts','charAt','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','catch','error','outbound','uri','none','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Fields','Outbound','Ticket\x20created!','version','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','[OUTBOUND]','unmanaged','monitor_format','lastevent','toUpperCase','request-promise','bluebird','md5','util','ioredis','./util','../../../../config/environment','sugarcrm','redis','defaults','localhost','socket.io-emitter','POST','Creating\x20new\x20ticket...','getString','Subjects','assigned_user_id','description','Descriptions','date_start','slice','replace','duration_hours','parent_type','Contacts','parent_name','name','direction','length','forEach','variableName','push','idField','set_entry','JSON','Calls','apiKey','base64','get_server_info','stringify','isNil','info','Getting\x20agent\x20with\x20name','get_entry_list','Employees','format','user_name','then','entry_list','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','contacts.phone_home\x20=\x20\x22%s\x22','find','phone_home','Enduser\x20found!','first_name','','debug','[HTTP]','map','type','string','nameField','customField','toLowerCase','content','toString','variable','custom_fields','customVariable','Variable','login','username','password','PLAIN','xCALLY\x20Motion\x20integration'];(function(_0x3a60cd,_0x36ed55){var _0x2ee88d=function(_0x5ed5c3){while(--_0x5ed5c3){_0x3a60cd['push'](_0x3a60cd['shift']());}};_0x2ee88d(++_0x36ed55);}(_0xa0a3,0xa4));var _0x3a0a=function(_0x27e5c4,_0x2b5fa1){_0x27e5c4=_0x27e5c4-0x0;var _0xea255c=_0xa0a3[_0x27e5c4];return _0xea255c;};'use strict';var _=require('lodash');var rp=require(_0x3a0a('0x0'));var BPromise=require(_0x3a0a('0x1'));var md5=require(_0x3a0a('0x2'));var util=require(_0x3a0a('0x3'));var Redis=require(_0x3a0a('0x4'));var intUtil=require(_0x3a0a('0x5'));var config=require(_0x3a0a('0x6'));var logger=require('../../../../config/logger')(_0x3a0a('0x7'));config[_0x3a0a('0x8')]=_[_0x3a0a('0x9')](config['redis'],{'host':_0x3a0a('0xa'),'port':0x18eb});var io=require(_0x3a0a('0xb'))(new Redis(config[_0x3a0a('0x8')]));var def={'method':_0x3a0a('0xc'),'json':!![]};function emit(_0x102310,_0x5e3ed4,_0x43dd26){io['to'](_0x102310)['emit'](_0x5e3ed4,_0x43dd26);}function getTicket(_0x27c2e7,_0xd90b03,_0x15d5fe,_0x11fa91,_0x2ba61d,_0x3f40a2,_0x10cefd,_0x4664fa){logger['info'](_0x3a0a('0xd'));var _0x47f69b=new Date();var _0x2bc304=[{'name':'name','value':intUtil[_0x3a0a('0xe')](_0x11fa91[_0x3a0a('0xf')],_0x2ba61d,'\x20')},{'name':_0x3a0a('0x10'),'value':_0xd90b03['id']},{'name':'created_by','value':_0xd90b03['id']},{'name':_0x3a0a('0x11'),'value':intUtil[_0x3a0a('0xe')](_0x11fa91[_0x3a0a('0x12')],_0x2ba61d,'\x0a')},{'name':_0x3a0a('0x13'),'value':_0x47f69b['toISOString']()[_0x3a0a('0x14')](0x0,0x13)[_0x3a0a('0x15')]('T','\x20')},{'name':_0x3a0a('0x16'),'value':'0'},{'name':'duration_minutes','value':'15'},{'name':'parent_id','value':_0x15d5fe['id']},{'name':_0x3a0a('0x17'),'value':_0x3a0a('0x18')},{'name':_0x3a0a('0x19'),'value':_0x15d5fe[_0x3a0a('0x1a')]},{'name':_0x3a0a('0x1b'),'value':_0x4664fa}];if(_0x3f40a2[_0x3a0a('0x1c')]){_[_0x3a0a('0x1d')](_0x3f40a2,function(_0x3845c9){if(_0x2ba61d[_0x3845c9[_0x3a0a('0x1e')]]){_0x2bc304[_0x3a0a('0x1f')]({'name':_0x3845c9[_0x3a0a('0x20')],'value':_0x2ba61d[_0x3845c9[_0x3a0a('0x1e')]]});}});}return request({'form':{'method':_0x3a0a('0x21'),'input_type':_0x3a0a('0x22'),'response_type':_0x3a0a('0x22'),'rest_data':JSON['stringify']({'session':_0x10cefd['id'],'module_name':_0x3a0a('0x23'),'name_value_list':_0x2bc304})}});}function getAuth(_0x2c20a2){return util['format']('Basic\x20%s',new Buffer(_0x2c20a2[_0x3a0a('0x24')]+':X')['toString'](_0x3a0a('0x25')));}function getServerInfo(_0x3ebd70){return request({'form':{'method':_0x3a0a('0x26'),'input_type':_0x3a0a('0x22'),'response_type':_0x3a0a('0x22'),'rest_data':JSON[_0x3a0a('0x27')]({'session':_0x3ebd70['id']})}});}function getUser(_0x248fe4,_0x3332c9,_0x1c4d9f){if(!_[_0x3a0a('0x28')](_0x3332c9)){logger[_0x3a0a('0x29')](_0x3a0a('0x2a'),_0x3332c9);return request({'form':{'method':_0x3a0a('0x2b'),'input_type':_0x3a0a('0x22'),'response_type':_0x3a0a('0x22'),'rest_data':JSON['stringify']({'session':_0x1c4d9f['id'],'module_name':_0x3a0a('0x2c'),'query':util[_0x3a0a('0x2d')]('INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200',_0x3332c9),'order_by':'','offset':'0','select_fields':['id',_0x3a0a('0x1a'),_0x3a0a('0x2e')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x3a0a('0x2f')](function(_0x45e176){if(_0x45e176[_0x3a0a('0x30')][_0x3a0a('0x1c')]){var _0x2f3bf9=_['find'](_0x45e176[_0x3a0a('0x30')],function(_0x37b562){return _0x37b562[_0x3a0a('0x31')][_0x3a0a('0x2e')][_0x3a0a('0x32')]===_0x3332c9;});if(_0x2f3bf9){logger[_0x3a0a('0x29')](_0x3a0a('0x33'));return BPromise[_0x3a0a('0x34')]({'id':_0x2f3bf9[_0x3a0a('0x31')]['id']['value'],'name':_0x2f3bf9[_0x3a0a('0x31')][_0x3a0a('0x1a')][_0x3a0a('0x32')]});}}logger[_0x3a0a('0x29')](_0x3a0a('0x35'));return BPromise['resolve']({'id':_0x1c4d9f[_0x3a0a('0x31')][_0x3a0a('0x36')][_0x3a0a('0x32')],'name':_0x1c4d9f[_0x3a0a('0x31')]['user_name'][_0x3a0a('0x32')]});});}else{logger[_0x3a0a('0x29')](_0x3a0a('0x37'));return BPromise[_0x3a0a('0x34')]({'id':_0x1c4d9f[_0x3a0a('0x31')][_0x3a0a('0x36')][_0x3a0a('0x32')],'name':_0x1c4d9f['name_value_list']['user_name'][_0x3a0a('0x32')]});}}function getEndUser(_0x4e99e3,_0x50f13d,_0x5ec87a,_0x398329){logger[_0x3a0a('0x29')](_0x3a0a('0x38'),_0x5ec87a);return request({'form':{'method':_0x3a0a('0x2b'),'input_type':_0x3a0a('0x22'),'response_type':_0x3a0a('0x22'),'rest_data':JSON[_0x3a0a('0x27')]({'session':_0x398329['id'],'module_name':_0x3a0a('0x18'),'query':util[_0x3a0a('0x2d')](_0x3a0a('0x39'),_0x5ec87a),'order_by':'','offset':'0','select_fields':['id',_0x3a0a('0x1a'),'phone_home'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x3a0a('0x2f')](function(_0x4116fc){if(_0x4116fc[_0x3a0a('0x30')][_0x3a0a('0x1c')]){var _0xdfafef=_[_0x3a0a('0x3a')](_0x4116fc[_0x3a0a('0x30')],function(_0x15c350){return _0x15c350[_0x3a0a('0x31')][_0x3a0a('0x3b')][_0x3a0a('0x32')]===_0x5ec87a;});if(_0xdfafef){logger['info'](_0x3a0a('0x3c'));return BPromise[_0x3a0a('0x34')]({'id':_0xdfafef[_0x3a0a('0x31')]['id'][_0x3a0a('0x32')],'name':_0xdfafef[_0x3a0a('0x31')][_0x3a0a('0x1a')][_0x3a0a('0x32')],'phone':_0xdfafef[_0x3a0a('0x31')][_0x3a0a('0x3b')][_0x3a0a('0x32')]});}}else{logger[_0x3a0a('0x29')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':_0x3a0a('0x21'),'input_type':'JSON','response_type':_0x3a0a('0x22'),'rest_data':JSON['stringify']({'session':_0x398329['id'],'module_name':_0x3a0a('0x18'),'name_value_list':[{'name':_0x3a0a('0x3d'),'value':_0x50f13d!==_0x3a0a('0x3e')?_0x50f13d:util[_0x3a0a('0x2d')]('Caller\x20-\x20%s',_0x5ec87a)},{'name':_0x3a0a('0x3b'),'value':_0x5ec87a}]})}})[_0x3a0a('0x2f')](function(_0x53d300){logger[_0x3a0a('0x29')]('Enduser\x20created.');return BPromise['resolve']({'id':_0x53d300['id'],'name':_0x53d300[_0x3a0a('0x30')][_0x3a0a('0x3d')][_0x3a0a('0x32')],'phone':_0x53d300['entry_list']['phone_home'][_0x3a0a('0x32')]});});}});}function request(_0x472c5b){logger[_0x3a0a('0x3f')](_0x3a0a('0x40'),JSON[_0x3a0a('0x27')](_0x472c5b));return rp(_['merge'](def,_0x472c5b));}function getTags(_0x44f340,_0x353763){var _0x30a24e=[];if(_0x44f340&&_0x44f340[_0x3a0a('0x1c')]>0x0){_0x30a24e=_[_0x3a0a('0x41')](_0x44f340,_0x353763);}return _0x30a24e;}function getCustomFields(_0x2ceb7f,_0x191312){var _0x532d75=[];var _0x41233a={'custom_fields':[]};if(_0x2ceb7f['length']>0x0){_[_0x3a0a('0x1d')](_0x2ceb7f,function(_0x5c5819){if(_0x5c5819[_0x3a0a('0x42')]===_0x3a0a('0x43')&&_0x5c5819[_0x3a0a('0x44')]&&!_0x5c5819[_0x3a0a('0x45')]){_0x41233a[_0x5c5819[_0x3a0a('0x44')][_0x3a0a('0x46')]()]=_0x5c5819[_0x3a0a('0x47')][_0x3a0a('0x48')]();}else if(_0x5c5819[_0x3a0a('0x42')]===_0x3a0a('0x43')&&_0x5c5819[_0x3a0a('0x20')]&&_0x5c5819['customField']){_0x41233a['custom_fields']['push']({'id':_0x5c5819[_0x3a0a('0x20')],'value':_0x5c5819['content'][_0x3a0a('0x48')]()});}else if(_0x5c5819['type']===_0x3a0a('0x49')&&_0x5c5819['variableName']&&_0x5c5819[_0x3a0a('0x20')]&&_0x5c5819['customField']){_0x191312[_0x5c5819[_0x3a0a('0x1e')]]&&_0x41233a[_0x3a0a('0x4a')][_0x3a0a('0x1f')]({'id':_0x5c5819[_0x3a0a('0x20')],'value':_0x191312[_0x5c5819[_0x3a0a('0x1e')]]['toString']()});}else if(_0x5c5819[_0x3a0a('0x42')]===_0x3a0a('0x4b')&&_0x5c5819['Variable']&&_0x5c5819[_0x3a0a('0x4c')]['name']&&_0x5c5819[_0x3a0a('0x20')]&&_0x5c5819[_0x3a0a('0x45')]){_0x191312[_0x5c5819[_0x3a0a('0x4c')][_0x3a0a('0x1a')][_0x3a0a('0x46')]()]&&_0x41233a[_0x3a0a('0x4a')]['push']({'id':_0x5c5819[_0x3a0a('0x20')],'value':_0x191312[_0x5c5819[_0x3a0a('0x4c')][_0x3a0a('0x1a')]['toLowerCase']()]['toString']()});}});}return _0x41233a;}function getConnection(_0x3babbb){return request({'method':_0x3a0a('0xc'),'form':{'method':_0x3a0a('0x4d'),'input_type':_0x3a0a('0x22'),'response_type':_0x3a0a('0x22'),'rest_data':JSON[_0x3a0a('0x27')]({'user_auth':{'user_name':_0x3babbb[_0x3a0a('0x4e')],'password':_0x3babbb[_0x3a0a('0x4f')],'encryption':_0x3a0a('0x50')},'application':_0x3a0a('0x51')})}})['then'](function(_0x4dd972){var _0x2dceac=_0x4dd972;if(_0x2dceac['id']){def[_0x3a0a('0x52')]=_0x2dceac['id'];return BPromise[_0x3a0a('0x34')](_0x2dceac);}else{throw new Error(util[_0x3a0a('0x2d')]('Account\x20%d\x20is\x20not\x20valid',_0x3babbb['id']));}});}function setRelationship(_0x426b90,_0x44dceb,_0xe00d37,_0x8edec){return request({'form':{'method':_0x3a0a('0x53'),'input_type':'JSON','response_type':'JSON','rest_data':JSON['stringify']({'session':_0x426b90['id'],'module_name':'Calls','module_id':_0xe00d37['id'],'link_field_name':_0x8edec,'related_ids':[_0x44dceb['id']],'name_value_list':[],'delete':0x0})}});}exports[_0x3a0a('0x54')]=function(_0x2606ef,_0x2e8b55,_0x27cfe5,_0x5a771f,_0x36567f,_0x3f8ed8){var _0x3150bc,_0x1cfbbc,_0x45ccf9,_0x4ed1cd;_0x3f8ed8[_0x3a0a('0x55')]=intUtil[_0x3a0a('0x56')](_0x3f8ed8[_0x3a0a('0x55')]);_0x3f8ed8[_0x3a0a('0x57')]=intUtil[_0x3a0a('0x56')](_0x3f8ed8[_0x3a0a('0x57')]);def['uri']=util[_0x3a0a('0x2d')]('%s/service/v4_1/rest.php',_0x3f8ed8['remoteUri']);if(_0x36567f&&_0x36567f['monitor_format']){logger[_0x3a0a('0x29')]('[QUEUE]',_0x3a0a('0x58'));_0x2e8b55[_0x3a0a('0x59')]=util['format'](_0x3a0a('0x5a'),_0x3f8ed8[_0x3a0a('0x57')],_0x2e8b55[_0x3a0a('0x5b')],md5(_0x2e8b55[_0x3a0a('0x5b')]));}else{_0x2e8b55[_0x3a0a('0x59')]='';}return getConnection(_0x3f8ed8)['then'](function(_0x4fdaa0){_0x4ed1cd=_0x4fdaa0;return getUser(_0x3f8ed8,_0x5a771f[_0x3a0a('0x1a')],_0x4ed1cd);})[_0x3a0a('0x2f')](function(_0x3a2399){_0x3150bc=_0x3a2399;logger[_0x3a0a('0x29')](_0x3a0a('0x5c'),_0x3150bc['id']);return getEndUser(_0x3f8ed8,_0x2e8b55[_0x3a0a('0x5d')],_0x2e8b55[_0x3a0a('0x5e')],_0x4ed1cd);})[_0x3a0a('0x2f')](function(_0x56094c){_0x1cfbbc=_0x56094c;logger[_0x3a0a('0x29')]('The\x20Enduser\x20ID\x20is:',_0x1cfbbc['id']);return getTicket(_0x3f8ed8,_0x3150bc,_0x1cfbbc,_0x27cfe5,_0x2e8b55,_0x27cfe5['Fields'],_0x4ed1cd,_0x3a0a('0x5f'));})[_0x3a0a('0x2f')](function(_0x34d027){_0x45ccf9=_0x34d027;logger[_0x3a0a('0x29')]('Ticket\x20created!');logger[_0x3a0a('0x29')](_0x3a0a('0x60'),_0x45ccf9['id']);return setRelationship(_0x4ed1cd,_0x3150bc,_0x45ccf9,_0x3a0a('0x61'));})[_0x3a0a('0x2f')](function(){return setRelationship(_0x4ed1cd,_0x1cfbbc,_0x45ccf9,_0x3a0a('0x62'));})[_0x3a0a('0x2f')](function(){return getServerInfo(_0x4ed1cd);})[_0x3a0a('0x2f')](function(_0xa985a6){var _0x523d69=parseInt(_0xa985a6['version'][_0x3a0a('0x63')](0x0));var _0x5d4814=util[_0x3a0a('0x2d')]('%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s',_0x3f8ed8[_0x3a0a('0x55')],_0x45ccf9['id']);if(_0x523d69>0x6){_0x5d4814=util[_0x3a0a('0x2d')](_0x3a0a('0x64'),_0x3f8ed8[_0x3a0a('0x55')],_0x45ccf9['id']);}logger[_0x3a0a('0x29')](_0x3a0a('0x65'),_0x3a0a('0x66'));emit(util[_0x3a0a('0x2d')](_0x3a0a('0x67'),_0x5a771f[_0x3a0a('0x1a')]),_0x3a0a('0x68'),{'uri':_0x5d4814});})[_0x3a0a('0x69')](function(_0x11696c){logger[_0x3a0a('0x6a')](_0x3a0a('0x65'),JSON['stringify'](_0x11696c));});};exports[_0x3a0a('0x6b')]=function(_0x5ed470,_0x530d82,_0xd4fc44,_0x217960,_0x522fbc,_0x4f6bb9,_0x7922e3){var _0x5dcd3b,_0x3efc1b,_0x30c533,_0x5b460a;_0x4f6bb9[_0x3a0a('0x55')]=intUtil['stripTrailingSlash'](_0x4f6bb9[_0x3a0a('0x55')]);_0x4f6bb9['serverUrl']=intUtil[_0x3a0a('0x56')](_0x4f6bb9[_0x3a0a('0x57')]);def[_0x3a0a('0x6c')]=util[_0x3a0a('0x2d')]('%s/service/v4_1/rest.php',_0x4f6bb9[_0x3a0a('0x55')]);if(_0x7922e3&&_0x7922e3['recordingFormat']&&_0x7922e3['recordingFormat']!==_0x3a0a('0x6d')){logger[_0x3a0a('0x29')]('[OUTBOUND]','Recording\x20is\x20enabled!');_0x530d82['recordingURL']=util[_0x3a0a('0x2d')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4f6bb9[_0x3a0a('0x57')],_0x530d82['uniqueid'],md5(_0x530d82['uniqueid']));}return getConnection(_0x4f6bb9)[_0x3a0a('0x2f')](function(_0x40398a){_0x5b460a=_0x40398a;return getUser(_0x4f6bb9,_0x217960[_0x3a0a('0x1a')],_0x5b460a);})[_0x3a0a('0x2f')](function(_0x45948e){_0x5dcd3b=_0x45948e;logger[_0x3a0a('0x29')]('The\x20User\x20ID\x20is:',_0x5dcd3b['id']);return getEndUser(_0x4f6bb9,_0x530d82[_0x3a0a('0x6e')],_0x530d82[_0x3a0a('0x6f')],_0x5b460a);})[_0x3a0a('0x2f')](function(_0x27366e){_0x3efc1b=_0x27366e;logger[_0x3a0a('0x29')](_0x3a0a('0x70'),_0x3efc1b['id']);return getTicket(_0x4f6bb9,_0x5dcd3b,_0x3efc1b,_0xd4fc44,_0x530d82,_0xd4fc44[_0x3a0a('0x71')],_0x5b460a,_0x3a0a('0x72'));})[_0x3a0a('0x2f')](function(_0x261735){_0x30c533=_0x261735;logger[_0x3a0a('0x29')](_0x3a0a('0x73'));logger[_0x3a0a('0x29')](_0x3a0a('0x60'),_0x30c533['id']);return setRelationship(_0x5b460a,_0x5dcd3b,_0x30c533,_0x3a0a('0x61'));})['then'](function(){return setRelationship(_0x5b460a,_0x3efc1b,_0x30c533,_0x3a0a('0x62'));})[_0x3a0a('0x2f')](function(){return getServerInfo(_0x5b460a);})[_0x3a0a('0x2f')](function(_0xfef0e8){var _0x46b3aa=parseInt(_0xfef0e8[_0x3a0a('0x74')][_0x3a0a('0x63')](0x0));var _0xb03a64=util[_0x3a0a('0x2d')](_0x3a0a('0x75'),_0x4f6bb9['remoteUri'],_0x30c533['id']);if(_0x46b3aa>0x6){_0xb03a64=util[_0x3a0a('0x2d')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x4f6bb9[_0x3a0a('0x55')],_0x30c533['id']);}logger[_0x3a0a('0x29')]('[OUTBOUND]',_0x3a0a('0x66'));emit(util[_0x3a0a('0x2d')]('user:%s',_0x217960[_0x3a0a('0x1a')]),_0x3a0a('0x68'),{'uri':_0xb03a64});})[_0x3a0a('0x69')](function(_0x28a061){logger[_0x3a0a('0x6a')](_0x3a0a('0x76'),JSON['stringify'](_0x28a061));});};exports[_0x3a0a('0x77')]=function(_0x13a7ab,_0x6b5bc1,_0x1bd08f,_0xda4e57,_0x27fb97,_0x5868dd){var _0xd9e139,_0x258d4c,_0x27cb42,_0x118ca9;_0x5868dd[_0x3a0a('0x55')]=intUtil[_0x3a0a('0x56')](_0x5868dd[_0x3a0a('0x55')]);_0x5868dd[_0x3a0a('0x57')]=intUtil['stripTrailingSlash'](_0x5868dd['serverUrl']);def[_0x3a0a('0x6c')]=util[_0x3a0a('0x2d')]('%s/service/v4_1/rest.php',_0x5868dd[_0x3a0a('0x55')]);if(_0x27fb97&&_0x27fb97[_0x3a0a('0x78')]){logger[_0x3a0a('0x29')]('['+_0x6b5bc1[_0x3a0a('0x79')]['toUpperCase']()+']',_0x3a0a('0x58'));_0x6b5bc1[_0x3a0a('0x59')]=util['format'](_0x3a0a('0x5a'),_0x5868dd[_0x3a0a('0x57')],_0x6b5bc1[_0x3a0a('0x5b')],md5(_0x6b5bc1[_0x3a0a('0x5b')]));}else{_0x6b5bc1[_0x3a0a('0x59')]='';}return getConnection(_0x5868dd)[_0x3a0a('0x2f')](function(_0x56405c){_0x118ca9=_0x56405c;if(!_[_0x3a0a('0x28')](_0xda4e57)){return getUser(_0x5868dd,_0xda4e57[_0x3a0a('0x1a')],_0x118ca9);}else{return getUser(_0x5868dd,null,_0x118ca9);}})[_0x3a0a('0x2f')](function(_0x35017b){_0xd9e139=_0x35017b;logger[_0x3a0a('0x29')](_0x3a0a('0x5c'),_0xd9e139['id']);return getEndUser(_0x5868dd,_0x6b5bc1[_0x3a0a('0x5d')],_0x6b5bc1[_0x3a0a('0x5e')],_0x118ca9);})['then'](function(_0x38fefd){_0x258d4c=_0x38fefd;logger[_0x3a0a('0x29')](_0x3a0a('0x70'),_0x258d4c['id']);return getTicket(_0x5868dd,_0xd9e139,_0x258d4c,_0x1bd08f,_0x6b5bc1,_0x1bd08f[_0x3a0a('0x71')],_0x118ca9,'Inbound');})['then'](function(_0x179581){_0x27cb42=_0x179581;logger['info'](_0x3a0a('0x73'));logger[_0x3a0a('0x29')](_0x3a0a('0x60'),_0x27cb42['id']);return setRelationship(_0x118ca9,_0xd9e139,_0x27cb42,'users');})['then'](function(){return setRelationship(_0x118ca9,_0x258d4c,_0x27cb42,_0x3a0a('0x62'));})[_0x3a0a('0x2f')](function(){return getServerInfo(_0x118ca9);})[_0x3a0a('0x69')](function(_0x4994a5){logger[_0x3a0a('0x6a')]('['+_0x6b5bc1[_0x3a0a('0x79')][_0x3a0a('0x7a')]()+']',JSON['stringify'](_0x4994a5));});}; \ 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 38ec10d..cc00c7d 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 _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 +var _0x417c=['%s:\x20%s','join','stripTrailingSlash','slice','substring','validateEmail','test','lodash','util','getString','length','type','string','content','variableName','Variable','name','toLowerCase','push','toString','keyValue','keyType','key','format'];(function(_0x54be03,_0x409072){var _0xe7617c=function(_0x509215){while(--_0x509215){_0x54be03['push'](_0x54be03['shift']());}};_0xe7617c(++_0x409072);}(_0x417c,0x1e7));var _0xc417=function(_0x46a793,_0x1cb336){_0x46a793=_0x46a793-0x0;var _0x354b01=_0x417c[_0x46a793];return _0x354b01;};'use strict';var _=require(_0xc417('0x0'));var util=require(_0xc417('0x1'));exports[_0xc417('0x2')]=function(_0x130228,_0x1e3fb0,_0x21f2c7){var _0x26c367=[];if(_0x130228[_0xc417('0x3')]>0x0){var _0x14ee67=_['sortBy'](_0x130228,['id']);for(var _0x3bf2b9=0x0;_0x3bf2b9<_0x14ee67[_0xc417('0x3')];_0x3bf2b9++){var _0x4c8d1f=_0x14ee67[_0x3bf2b9];if(_0x4c8d1f[_0xc417('0x4')]===_0xc417('0x5')){_0x26c367['push'](_0x4c8d1f[_0xc417('0x6')]);}else if(_0x4c8d1f[_0xc417('0x4')]==='variable'&&_0x4c8d1f[_0xc417('0x7')]){_0x1e3fb0[_0x4c8d1f['variableName']]&&_0x26c367['push'](_0x1e3fb0[_0x4c8d1f[_0xc417('0x7')]]['toString']());}else if(_0x4c8d1f[_0xc417('0x4')]==='customVariable'&&_0x4c8d1f[_0xc417('0x8')]&&_0x4c8d1f['Variable'][_0xc417('0x9')]){_0x1e3fb0[_0x4c8d1f[_0xc417('0x8')][_0xc417('0x9')][_0xc417('0xa')]()]&&_0x26c367[_0xc417('0xb')](_0x1e3fb0[_0x4c8d1f[_0xc417('0x8')][_0xc417('0x9')][_0xc417('0xa')]()][_0xc417('0xc')]());}else if(_0x4c8d1f[_0xc417('0x4')]===_0xc417('0xd')){if(_0x4c8d1f[_0xc417('0xe')]===_0xc417('0x5')&&_0x4c8d1f[_0xc417('0xf')]){_0x26c367[_0xc417('0xb')](util[_0xc417('0x10')](_0xc417('0x11'),_0x4c8d1f['key'],_0x4c8d1f['keyContent']));}else if(_0x4c8d1f['keyType']==='variable'&&_0x4c8d1f[_0xc417('0x7')]&&_0x4c8d1f['key']){_0x1e3fb0[_0x4c8d1f['variableName']]&&_0x26c367['push'](util['format'](_0xc417('0x11'),_0x4c8d1f[_0xc417('0xf')],_0x1e3fb0[_0x4c8d1f[_0xc417('0x7')]]));}else if(_0x4c8d1f[_0xc417('0xe')]==='customVariable'&&_0x4c8d1f[_0xc417('0x8')]&&_0x4c8d1f[_0xc417('0x8')]['name']&&_0x4c8d1f['key']){_0x1e3fb0[_0x4c8d1f[_0xc417('0x8')]['name'][_0xc417('0xa')]()]&&_0x26c367[_0xc417('0xb')](util['format'](_0xc417('0x11'),_0x4c8d1f[_0xc417('0xf')],_0x1e3fb0[_0x4c8d1f[_0xc417('0x8')][_0xc417('0x9')][_0xc417('0xa')]()]));}}}}return _0x26c367[_0xc417('0x12')](_0x21f2c7);};exports[_0xc417('0x13')]=function(_0x58a596){var _0x16e382=_0x58a596[_0xc417('0x14')](-0x1);if(_0x16e382==='/'){_0x58a596=_0x58a596[_0xc417('0x15')](0x0,_0x58a596['lastIndexOf'](_0x16e382));}return _0x58a596;};exports[_0xc417('0x16')]=function(_0x579411){if(!_['isNil'](_0x579411)&&_0x579411!==''){var _0xa8a07c=/^(([^<>()\[\]\\.,;:\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 _0xa8a07c[_0xc417('0x17')](String(_0x579411)[_0xc417('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 09985a1..8835b52 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(_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 +var _0xd8b0=['info','Creating\x20new\x20ticket...','merge','Normal','Subjects','POST','format','%s/webservice.php','remoteUri','create','username','sessionName','HelpDesk','stringify','success','result','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','statusCode','[vTiger],\x20%s,\x20%s,\x20%s','validateEmail','Getting\x20agent\x20with\x20email','then','Agent\x20found!','resolve','email1','first_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','admin','catch','userId','getUser','Searching\x20end\x20user\x20with\x20phone','GET','query','Enduser\x20found!','firstname','Enduser\x20created.','lastname','phone','accessKey','getchallenge','login','token','getConnection','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','recordingURL','email','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','uniqueid','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','user:%s','lastevent','toUpperCase','lodash','request-promise','ioredis','./util','../../../../config/environment','../../../../config/logger','vTiger','redis','localhost','socket.io-emitter','emit','length','forEach','includes','picklist','idField','content','toString','type','variable','variableName','customVariable','Variable','name','toLowerCase'];(function(_0x1ad926,_0x3e1fed){var _0x1b81dc=function(_0x506f83){while(--_0x506f83){_0x1ad926['push'](_0x1ad926['shift']());}};_0x1b81dc(++_0x3e1fed);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x0d8b('0x0'));var rp=require(_0x0d8b('0x1'));var BPromise=require('bluebird');var md5=require('md5');var util=require('util');var Redis=require(_0x0d8b('0x2'));var intUtil=require(_0x0d8b('0x3'));var config=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));config['redis']=_['defaults'](config[_0x0d8b('0x7')],{'host':_0x0d8b('0x8'),'port':0x18eb});var io=require(_0x0d8b('0x9'))(new Redis(config['redis']));function emit(_0x413284,_0x284169,_0x58e4e2){io['to'](_0x413284)[_0x0d8b('0xa')](_0x284169,_0x58e4e2);}function getCustomFields(_0x348e65,_0x3b027f){var _0x1f4800={};if(_0x348e65[_0x0d8b('0xb')]>0x0){_[_0x0d8b('0xc')](_0x348e65,function(_0x2c5e9e){if(_[_0x0d8b('0xd')](['string',_0x0d8b('0xe')],_0x2c5e9e['type'])&&_0x2c5e9e[_0x0d8b('0xf')]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x2c5e9e[_0x0d8b('0x10')][_0x0d8b('0x11')]();}else if(_0x2c5e9e[_0x0d8b('0x12')]===_0x0d8b('0x13')&&_0x2c5e9e[_0x0d8b('0x14')]&&_0x2c5e9e[_0x0d8b('0xf')]&&_0x3b027f[_0x2c5e9e[_0x0d8b('0x14')]]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x3b027f[_0x2c5e9e[_0x0d8b('0x14')]][_0x0d8b('0x11')]();}else if(_0x2c5e9e[_0x0d8b('0x12')]===_0x0d8b('0x15')&&_0x2c5e9e['Variable']&&_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')]&&_0x2c5e9e[_0x0d8b('0xf')]&&_0x3b027f[_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')]['toLowerCase']()]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x3b027f[_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')][_0x0d8b('0x18')]()][_0x0d8b('0x11')]();}});}return _0x1f4800;}function createTicket(_0x18dd2d,_0x264b39,_0xa3612a,_0x4a15bf,_0x27512e,_0x23d58f,_0x196c0a){logger[_0x0d8b('0x19')](_0x0d8b('0x1a'));var _0x5b709c=_[_0x0d8b('0x1b')]({'parent_id':'','assigned_user_id':_0x264b39['id'],'ticketpriorities':_0x0d8b('0x1c'),'ticketstatus':'Open','ticket_title':intUtil['getString'](_0x4a15bf[_0x0d8b('0x1d')],_0x27512e,'\x20'),'description':intUtil['getString'](_0x4a15bf['Descriptions'],_0x27512e,'\x0a'),'contact_id':_0xa3612a['id']},getCustomFields(_0x23d58f,_0x27512e));var _0x5527d8={'method':_0x0d8b('0x1e'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x18dd2d[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x22'),'username':_0x18dd2d[_0x0d8b('0x23')],'sessionName':_0x196c0a[_0x0d8b('0x24')],'elementType':_0x0d8b('0x25'),'element':JSON[_0x0d8b('0x26')](_0x5b709c)},'json':!![]};return request(_0x5527d8)['then'](function(_0xe8bbee){if(_0xe8bbee[_0x0d8b('0x27')]){return BPromise['resolve']({'id':_0xe8bbee[_0x0d8b('0x28')]['id']});}else{throw new Error(util['format'](_0x0d8b('0x29'),JSON[_0x0d8b('0x26')](_0xe8bbee[_0x0d8b('0x2a')])));}})['catch'](function(_0x59a905){var _0x28f639=_0x59a905[_0x0d8b('0x2b')]||0x1f4;logger['error'](_0x0d8b('0x2c'),'createTicket',_0x28f639,JSON[_0x0d8b('0x26')](_0x59a905));});}function getUser(_0x4b59e5,_0x97050a,_0x48f24f){if(intUtil[_0x0d8b('0x2d')](_0x97050a)){logger['info'](_0x0d8b('0x2e'),_0x97050a);return request({'method':'GET','uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x4b59e5[_0x0d8b('0x21')]),'qs':{'operation':'query','username':_0x4b59e5['username'],'sessionName':_0x48f24f['sessionName'],'query':util[_0x0d8b('0x1f')]('SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;',_0x97050a)},'json':!![]})[_0x0d8b('0x2f')](function(_0x54f6f3){if(_0x54f6f3['success']&&_0x54f6f3[_0x0d8b('0x28')][_0x0d8b('0xb')]){logger[_0x0d8b('0x19')](_0x0d8b('0x30'));return BPromise[_0x0d8b('0x31')]({'id':_0x54f6f3[_0x0d8b('0x28')][0x0]['id'],'email':_0x54f6f3[_0x0d8b('0x28')][0x0][_0x0d8b('0x32')],'name':_0x54f6f3['result'][0x0][_0x0d8b('0x33')]+'\x20'+_0x54f6f3[_0x0d8b('0x28')]['last_name']});}else{logger[_0x0d8b('0x19')](_0x0d8b('0x34'));return BPromise[_0x0d8b('0x31')]({'id':_0x48f24f['userId'],'email':_0x4b59e5[_0x0d8b('0x23')],'name':_0x0d8b('0x35')});}})[_0x0d8b('0x36')](function(_0x31ceba){var _0x933e01=_0x31ceba['statusCode']||0x1f4;logger[_0x0d8b('0x2a')](_0x0d8b('0x2c'),'getUser',_0x933e01,JSON[_0x0d8b('0x26')](_0x31ceba));});}else{logger[_0x0d8b('0x19')](_0x0d8b('0x34'));return BPromise[_0x0d8b('0x31')]({'id':_0x48f24f[_0x0d8b('0x37')],'email':_0x4b59e5['username'],'name':'admin'})[_0x0d8b('0x36')](function(_0x5c2c04){var _0x531c55=_0x5c2c04[_0x0d8b('0x2b')]||0x1f4;logger[_0x0d8b('0x2a')](_0x0d8b('0x2c'),_0x0d8b('0x38'),_0x531c55,JSON[_0x0d8b('0x26')](_0x5c2c04));});}}function getEndUser(_0x24c789,_0x579324,_0x6e5bab,_0x6a02ad){logger[_0x0d8b('0x19')](_0x0d8b('0x39'),_0x6e5bab);return request({'method':_0x0d8b('0x3a'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x24c789['remoteUri']),'qs':{'operation':_0x0d8b('0x3b'),'username':_0x24c789[_0x0d8b('0x23')],'sessionName':_0x6a02ad[_0x0d8b('0x24')],'query':util[_0x0d8b('0x1f')]('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;',_0x6e5bab,_0x6e5bab,_0x6e5bab,_0x6e5bab,_0x6e5bab)},'json':!![]})[_0x0d8b('0x2f')](function(_0x4b4bde){if(_0x4b4bde[_0x0d8b('0x27')]&&_0x4b4bde[_0x0d8b('0x28')][_0x0d8b('0xb')]){logger[_0x0d8b('0x19')](_0x0d8b('0x3c'));return BPromise[_0x0d8b('0x31')]({'id':_0x4b4bde[_0x0d8b('0x28')][0x0]['id'],'name':_0x4b4bde[_0x0d8b('0x28')][0x0][_0x0d8b('0x3d')]+'\x20'+_0x4b4bde[_0x0d8b('0x28')][0x0]['lastname'],'phone':_0x6e5bab});}else{logger['info']('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'method':'POST','uri':util['format'](_0x0d8b('0x20'),_0x24c789[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x22'),'sessionName':_0x6a02ad['sessionName'],'elementType':'Contacts','element':JSON[_0x0d8b('0x26')]({'lastname':_0x579324,'phone':_0x6e5bab,'assigned_user_id':'\x20'})},'json':!![]})[_0x0d8b('0x2f')](function(_0x344278){logger['info'](_0x0d8b('0x3e'));return BPromise[_0x0d8b('0x31')]({'id':_0x344278['result']['id'],'name':_0x344278['result'][_0x0d8b('0x3f')],'phone':_0x344278['result'][_0x0d8b('0x40')]});})['catch'](function(_0x53f643){var _0x30ccee=_0x53f643[_0x0d8b('0x2b')]||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s','getEndUser',_0x30ccee,JSON['stringify'](_0x53f643));});}});}function getConnection(_0x374d40){var _0x1e0498=_0x374d40[_0x0d8b('0x23')];var _0x490eda=_0x374d40[_0x0d8b('0x41')];return request({'method':_0x0d8b('0x3a'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x374d40[_0x0d8b('0x21')]),'qs':{'operation':_0x0d8b('0x42'),'username':_0x1e0498},'json':!![]})[_0x0d8b('0x2f')](function(_0x1d5067){if(_0x1d5067[_0x0d8b('0x27')]){return request({'method':_0x0d8b('0x1e'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x374d40[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x43'),'username':_0x1e0498,'accessKey':md5(_0x1d5067[_0x0d8b('0x28')][_0x0d8b('0x44')]+_0x490eda)},'json':!![]});}})[_0x0d8b('0x2f')](function(_0x1e162c){if(_0x1e162c[_0x0d8b('0x27')]){return BPromise['resolve'](_0x1e162c[_0x0d8b('0x28')]);}else{throw new Error(util['format']('Account\x20%d\x20is\x20not\x20valid',_0x374d40['id']));}})[_0x0d8b('0x36')](function(_0x113fb7){var _0x3f943a=_0x113fb7[_0x0d8b('0x2b')]||0x1f4;logger['error'](_0x0d8b('0x2c'),_0x0d8b('0x45'),_0x3f943a,JSON[_0x0d8b('0x26')](_0x113fb7));});}function request(_0x241587){logger[_0x0d8b('0x19')]('[HTTP]',JSON['stringify'](_0x241587));return rp(_0x241587);}exports['queue']=function(_0x573f4f,_0x368ede,_0xf22c3c,_0x5e3bb4,_0x4950a8,_0x44c5c1){var _0x3d3cb6,_0x5c5bd7,_0x5ef6c3,_0x900906;_0x44c5c1[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x44c5c1[_0x0d8b('0x21')]);if(_0x4950a8&&_0x4950a8[_0x0d8b('0x47')]){logger['info'](_0x0d8b('0x48'),_0x0d8b('0x49'));_0x368ede['recordingURL']=util['format'](_0x0d8b('0x4a'),_0x44c5c1[_0x0d8b('0x4b')],_0x368ede['uniqueid'],md5(_0x368ede['uniqueid']));}else{_0x368ede[_0x0d8b('0x4c')]='';}return getConnection(_0x44c5c1)[_0x0d8b('0x2f')](function(_0x377027){_0x900906=_0x377027;return getUser(_0x44c5c1,_0x5e3bb4[_0x0d8b('0x4d')],_0x900906);})['then'](function(_0x356b3d){_0x3d3cb6=_0x356b3d;logger['info']('The\x20User\x20ID\x20is:',_0x3d3cb6['id']);return getEndUser(_0x44c5c1,_0x368ede[_0x0d8b('0x4e')],_0x368ede[_0x0d8b('0x4f')],_0x900906);})['then'](function(_0x4a8f33){_0x5c5bd7=_0x4a8f33;logger[_0x0d8b('0x19')](_0x0d8b('0x50'),_0x5c5bd7['id']);return createTicket(_0x44c5c1,_0x3d3cb6,_0x5c5bd7,_0xf22c3c,_0x368ede,_0xf22c3c[_0x0d8b('0x51')],_0x900906);})[_0x0d8b('0x2f')](function(_0x3afc3a){_0x5ef6c3=_0x3afc3a;logger[_0x0d8b('0x19')](_0x0d8b('0x52'));logger[_0x0d8b('0x19')]('The\x20Ticket\x20ID\x20is:',_0x5ef6c3['id']);var _0x24a859=util[_0x0d8b('0x1f')](_0x0d8b('0x53'),_0x44c5c1[_0x0d8b('0x21')],_[_0x0d8b('0x54')](_0x5ef6c3['id'],'x')[0x1]);logger[_0x0d8b('0x19')](_0x0d8b('0x48'),_0x0d8b('0x55'));emit(util[_0x0d8b('0x1f')]('user:%s',_0x5e3bb4[_0x0d8b('0x17')]),_0x0d8b('0x56'),{'uri':_0x24a859});})[_0x0d8b('0x36')](function(_0x23de9e){logger[_0x0d8b('0x2a')]('[QUEUE]',JSON[_0x0d8b('0x26')](_0x23de9e));});};exports[_0x0d8b('0x57')]=function(_0x181d49,_0x17a87f,_0x1d6cd4,_0x59ada2,_0x4d0e7c,_0x3b1166,_0x291b83){var _0x3e4a41,_0xbbb520,_0x5a70bd,_0x199122;_0x3b1166[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x3b1166['remoteUri']);_0x3b1166[_0x0d8b('0x4b')]=intUtil['stripTrailingSlash'](_0x3b1166[_0x0d8b('0x4b')]);if(_0x291b83&&_0x291b83[_0x0d8b('0x58')]&&_0x291b83[_0x0d8b('0x58')]!==_0x0d8b('0x59')){logger[_0x0d8b('0x19')](_0x0d8b('0x5a'),'Recording\x20is\x20enabled!');_0x17a87f[_0x0d8b('0x4c')]=util['format'](_0x0d8b('0x4a'),_0x3b1166[_0x0d8b('0x4b')],_0x17a87f[_0x0d8b('0x5b')],md5(_0x17a87f[_0x0d8b('0x5b')]));}return getConnection(_0x3b1166)['then'](function(_0x19e097){_0x199122=_0x19e097;return getUser(_0x3b1166,_0x59ada2[_0x0d8b('0x4d')],_0x199122);})[_0x0d8b('0x2f')](function(_0x2332fc){_0x3e4a41=_0x2332fc;logger[_0x0d8b('0x19')](_0x0d8b('0x5c'),_0x3e4a41['id']);return getEndUser(_0x3b1166,_0x17a87f[_0x0d8b('0x5d')],_0x17a87f[_0x0d8b('0x5e')],_0x199122);})[_0x0d8b('0x2f')](function(_0x34affb){_0xbbb520=_0x34affb;logger['info']('The\x20Enduser\x20ID\x20is:',_0xbbb520['id']);return createTicket(_0x3b1166,_0x3e4a41,_0xbbb520,_0x1d6cd4,_0x17a87f,_0x1d6cd4[_0x0d8b('0x51')],_0x199122);})[_0x0d8b('0x2f')](function(_0x53e399){_0x5a70bd=_0x53e399;logger[_0x0d8b('0x19')]('Ticket\x20created!');logger['info'](_0x0d8b('0x5f'),_0x5a70bd['id']);var _0x1c4e96=util['format']('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x3b1166[_0x0d8b('0x21')],_[_0x0d8b('0x54')](_0x5a70bd['id'],'x')[0x1]);logger[_0x0d8b('0x19')](_0x0d8b('0x5a'),_0x0d8b('0x55'));emit(util[_0x0d8b('0x1f')](_0x0d8b('0x60'),_0x59ada2['name']),_0x0d8b('0x56'),{'uri':_0x1c4e96});})['catch'](function(_0x1a203e){logger[_0x0d8b('0x2a')](_0x0d8b('0x5a'),JSON[_0x0d8b('0x26')](_0x1a203e));});};exports['unmanaged']=function(_0x3fe47d,_0x4a1c4a,_0x3a356b,_0x2c6c5f,_0x1c5fe2,_0x2ebea3){var _0xc5c35f,_0x2b44e5,_0x3e927c,_0x91aa89;_0x2ebea3[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x2ebea3['remoteUri']);_0x2ebea3[_0x0d8b('0x4b')]=intUtil['stripTrailingSlash'](_0x2ebea3[_0x0d8b('0x4b')]);if(_0x1c5fe2&&_0x1c5fe2[_0x0d8b('0x47')]){logger['info']('['+_0x4a1c4a[_0x0d8b('0x61')]['toUpperCase']()+']',_0x0d8b('0x49'));_0x4a1c4a[_0x0d8b('0x4c')]=util[_0x0d8b('0x1f')](_0x0d8b('0x4a'),_0x2ebea3[_0x0d8b('0x4b')],_0x4a1c4a[_0x0d8b('0x5b')],md5(_0x4a1c4a[_0x0d8b('0x5b')]));}else{_0x4a1c4a[_0x0d8b('0x4c')]='';}return getConnection(_0x2ebea3)['then'](function(_0x10eca6){_0x91aa89=_0x10eca6;return getUser(_0x2ebea3,'',_0x91aa89);})[_0x0d8b('0x2f')](function(_0x5b2916){_0xc5c35f=_0x5b2916;logger[_0x0d8b('0x19')](_0x0d8b('0x5c'),_0xc5c35f['id']);return getEndUser(_0x2ebea3,_0x4a1c4a[_0x0d8b('0x4e')],_0x4a1c4a[_0x0d8b('0x4f')],_0x91aa89);})[_0x0d8b('0x2f')](function(_0x9e44b4){_0x2b44e5=_0x9e44b4;logger[_0x0d8b('0x19')](_0x0d8b('0x50'),_0x2b44e5['id']);return createTicket(_0x2ebea3,_0xc5c35f,_0x2b44e5,_0x3a356b,_0x4a1c4a,_0x3a356b[_0x0d8b('0x51')],_0x91aa89);})[_0x0d8b('0x2f')](function(_0xe35028){_0x3e927c=_0xe35028;logger[_0x0d8b('0x19')]('Ticket\x20created!');logger[_0x0d8b('0x19')](_0x0d8b('0x5f'),_0x3e927c['id']);})[_0x0d8b('0x36')](function(_0x58525c){logger['error']('['+_0x4a1c4a[_0x0d8b('0x61')][_0x0d8b('0x62')]()+']',JSON[_0x0d8b('0x26')](_0x58525c));});}; \ 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 04181de..d8b932d 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 _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 +var _0xe24a=['none','[OUTBOUND]','destcalleridnum','The\x20Enduser\x20ID\x20is:','user:%s','catch','unmanaged','toUpperCase','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','POST','merge','Tags','name','getString','Descriptions','Fields','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','type:user\x20role:agent\x20email:%s','then','count','find','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','results','length','filter','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','Caller\x20-\x20%s','Enduser\x20created.','authType','password','%s:%s','%s/token:%s','username','token','toString','base64','debug','[HTTP]','stringify','GET','includes','string','picklist','customField','nameField','toLowerCase','content','type','idField','custom_fields','push','variable','variableName','Variable','queue','stripTrailingSlash','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Ticket\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/agent/tickets/%s','replace','/api/v2','error','Zendesk\x20account\x20type\x20not\x20recognized','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','serverUrl','recordingFormat'];(function(_0x3fb56c,_0x29c919){var _0x549737=function(_0x5cd9e2){while(--_0x5cd9e2){_0x3fb56c['push'](_0x3fb56c['shift']());}};_0x549737(++_0x29c919);}(_0xe24a,0xe2));var _0xae24=function(_0x2b4153,_0x549ebe){_0x2b4153=_0x2b4153-0x0;var _0x43d7e3=_0xe24a[_0x2b4153];return _0x43d7e3;};'use strict';var _=require(_0xae24('0x0'));var rp=require(_0xae24('0x1'));var md5=require(_0xae24('0x2'));var util=require(_0xae24('0x3'));var Redis=require(_0xae24('0x4'));var intUtil=require(_0xae24('0x5'));var config=require(_0xae24('0x6'));var logger=require(_0xae24('0x7'))('zendesk');config[_0xae24('0x8')]=_[_0xae24('0x9')](config[_0xae24('0x8')],{'host':_0xae24('0xa'),'port':0x18eb});var io=require(_0xae24('0xb'))(new Redis(config[_0xae24('0x8')]));function emit(_0x356880,_0x4334a9,_0x560b54){io['to'](_0x356880)[_0xae24('0xc')](_0x4334a9,_0x560b54);}var headers={'Content-Type':_0xae24('0xd'),'Accept':'application/json'};function getTicket(_0x431144,_0x1d48e5,_0x2ecc5b,_0x56b58d,_0x1a8b0e){logger[_0xae24('0xe')](_0xae24('0xf'));return request({'uri':util[_0xae24('0x10')](_0xae24('0x11'),_0x431144[_0xae24('0x12')]),'method':_0xae24('0x13'),'body':{'ticket':_[_0xae24('0x14')]({'requester_id':_0x2ecc5b['id'],'submitter_id':_0x1d48e5?_0x1d48e5['id']:undefined,'assignee_id':_0x1d48e5?_0x1d48e5['id']:undefined,'tags':getTags(_0x56b58d[_0xae24('0x15')],_0xae24('0x16')),'subject':intUtil[_0xae24('0x17')](_0x56b58d['Subjects'],_0x1a8b0e,'\x20'),'description':intUtil[_0xae24('0x17')](_0x56b58d[_0xae24('0x18')],_0x1a8b0e,'\x0a'),'comment':{'public':![],'body':intUtil[_0xae24('0x17')](_0x56b58d[_0xae24('0x18')],_0x1a8b0e,'\x0a')}},getCustomFields(_0x56b58d[_0xae24('0x19')],_0x1a8b0e))}})['then'](function(_0x409239){logger['info']('Ticket\x20created!');return _0x409239['ticket'];});}function getUser(_0x1320cc,_0x1a2ae3){if(intUtil[_0xae24('0x1a')](_0x1a2ae3)){logger['info'](_0xae24('0x1b'),_0x1a2ae3);return request({'uri':util[_0xae24('0x10')](_0xae24('0x1c'),_0x1320cc[_0xae24('0x12')]),'qs':{'query':util[_0xae24('0x10')](_0xae24('0x1d'),_0x1a2ae3)}})[_0xae24('0x1e')](function(_0x26c8df){if(_0x26c8df[_0xae24('0x1f')]){logger['info']('Agent\x20found!');return _[_0xae24('0x20')](_0x26c8df['results'],{'email':_0x1a2ae3,'role':_0xae24('0x21')});}else{logger['info'](_0xae24('0x22'));return request({'uri':util[_0xae24('0x10')]('%s/users/me.json',_0x1320cc[_0xae24('0x12')])})[_0xae24('0x1e')](function(_0x30ac24){logger[_0xae24('0xe')]('Admin\x20account\x20selected.');return _0x30ac24[_0xae24('0x23')];});}});}else{logger[_0xae24('0xe')](_0xae24('0x22'));return request({'uri':util[_0xae24('0x10')]('%s/users/me.json',_0x1320cc['remoteUri'])})[_0xae24('0x1e')](function(_0x112f7e){logger[_0xae24('0xe')](_0xae24('0x24'));return _0x112f7e[_0xae24('0x23')];});}}function getEndUser(_0x821cca,_0x5d02a0,_0x4479b2){logger[_0xae24('0xe')](_0xae24('0x25'),_0x4479b2);return request({'uri':util[_0xae24('0x10')](_0xae24('0x1c'),_0x821cca[_0xae24('0x12')]),'qs':{'query':util[_0xae24('0x10')]('type:user\x20role:end-user\x20phone:%s',_0x4479b2)}})[_0xae24('0x1e')](function(_0x5c8dad){var _0x5875b6;if(_0x5c8dad[_0xae24('0x26')][_0xae24('0x27')]){_0x5c8dad[_0xae24('0x26')]=_[_0xae24('0x28')](_0x5c8dad[_0xae24('0x26')],{'suspended':![],'role':'end-user'});if(_0x5c8dad[_0xae24('0x26')][_0xae24('0x27')]){_0x5875b6=_['first'](_0x5c8dad['results']);}}if(_0x5875b6){logger[_0xae24('0xe')](_0xae24('0x29'));return _0x5875b6;}else{logger[_0xae24('0xe')](_0xae24('0x2a'));return request({'uri':util['format'](_0xae24('0x2b'),_0x821cca[_0xae24('0x12')]),'method':_0xae24('0x13'),'body':{'user':{'role':'end-user','name':util[_0xae24('0x10')](_0xae24('0x2c'),_0x5d02a0||_0x4479b2),'phone':_0x4479b2}}})[_0xae24('0x1e')](function(_0x6252be){logger[_0xae24('0xe')](_0xae24('0x2d'));return _0x6252be[_0xae24('0x23')];});}});}function getAuth(_0x13c8a6){var _0x4cefe1;if(_0x13c8a6[_0xae24('0x2e')]===_0xae24('0x2f')){_0x4cefe1=util['format'](_0xae24('0x30'),_0x13c8a6['username'],_0x13c8a6[_0xae24('0x2f')]);}else if(_0x13c8a6[_0xae24('0x2e')]==='token'){_0x4cefe1=util[_0xae24('0x10')](_0xae24('0x31'),_0x13c8a6[_0xae24('0x32')],_0x13c8a6[_0xae24('0x33')]);}return util[_0xae24('0x10')]('Basic\x20%s',new Buffer(_0x4cefe1)[_0xae24('0x34')](_0xae24('0x35')));}function request(_0x340ef7){logger[_0xae24('0x36')](_0xae24('0x37'),JSON[_0xae24('0x38')](_0x340ef7));return rp(_[_0xae24('0x9')](_0x340ef7,{'method':_0xae24('0x39'),'headers':headers,'json':!![]}));}function getTags(_0x179d93,_0x4fedef){var _0x53722d=[];if(_0x179d93&&_0x179d93['length']>0x0){_0x53722d=_['map'](_0x179d93,_0x4fedef);}return _0x53722d;}function getCustomFields(_0x153dcd,_0x3dfa12){var _0x62e86c=[];var _0x116b28={'custom_fields':[]};if(_0x153dcd[_0xae24('0x27')]>0x0){_['forEach'](_0x153dcd,function(_0x54987b){if(_[_0xae24('0x3a')]([_0xae24('0x3b'),_0xae24('0x3c')],_0x54987b['type'])&&_0x54987b['nameField']&&!_0x54987b[_0xae24('0x3d')]){_0x116b28[_0x54987b[_0xae24('0x3e')][_0xae24('0x3f')]()]=_0x54987b[_0xae24('0x40')][_0xae24('0x34')]();}else if(_[_0xae24('0x3a')](['string','picklist'],_0x54987b[_0xae24('0x41')])&&_0x54987b[_0xae24('0x42')]&&_0x54987b[_0xae24('0x3d')]){_0x116b28[_0xae24('0x43')][_0xae24('0x44')]({'id':_0x54987b[_0xae24('0x42')],'value':_0x54987b[_0xae24('0x40')][_0xae24('0x34')]()});}else if(_0x54987b['type']===_0xae24('0x45')&&_0x54987b[_0xae24('0x46')]&&_0x54987b[_0xae24('0x42')]&&_0x54987b['customField']){_0x3dfa12[_0x54987b['variableName']]&&_0x116b28[_0xae24('0x43')][_0xae24('0x44')]({'id':_0x54987b[_0xae24('0x42')],'value':_0x3dfa12[_0x54987b[_0xae24('0x46')]][_0xae24('0x34')]()});}else if(_0x54987b[_0xae24('0x41')]==='customVariable'&&_0x54987b[_0xae24('0x47')]&&_0x54987b[_0xae24('0x47')][_0xae24('0x16')]&&_0x54987b[_0xae24('0x42')]&&_0x54987b[_0xae24('0x3d')]){_0x3dfa12[_0x54987b[_0xae24('0x47')]['name']['toLowerCase']()]&&_0x116b28['custom_fields'][_0xae24('0x44')]({'id':_0x54987b[_0xae24('0x42')],'value':_0x3dfa12[_0x54987b[_0xae24('0x47')]['name']['toLowerCase']()][_0xae24('0x34')]()});}});}return _0x116b28;}exports[_0xae24('0x48')]=function(_0x11fd87,_0x46399c,_0x2a4376,_0x5b214d,_0x5a8079,_0x2ec548){var _0x12adcb,_0x11c660;_0x2ec548['remoteUri']=intUtil[_0xae24('0x49')](_0x2ec548['remoteUri']);_0x2ec548['serverUrl']=intUtil[_0xae24('0x49')](_0x2ec548['serverUrl']);if(_0x5a8079&&_0x5a8079['monitor_format']){logger[_0xae24('0xe')](_0xae24('0x4a'),_0xae24('0x4b'));_0x46399c[_0xae24('0x4c')]=util[_0xae24('0x10')](_0xae24('0x4d'),_0x2ec548['serverUrl'],_0x46399c['uniqueid'],md5(_0x46399c[_0xae24('0x4e')]));}else{_0x46399c['recordingURL']='';}headers[_0xae24('0x4f')]=getAuth(_0x2ec548);return getUser(_0x2ec548,_0x5b214d[_0xae24('0x50')])[_0xae24('0x1e')](function(_0x5a9e95){_0x12adcb=_0x5a9e95;logger[_0xae24('0xe')](_0xae24('0x51'),_0x12adcb['id']);return getEndUser(_0x2ec548,_0x46399c[_0xae24('0x52')],_0x46399c[_0xae24('0x53')]);})[_0xae24('0x1e')](function(_0x271b4f){_0x11c660=_0x271b4f;logger[_0xae24('0xe')]('The\x20Enduser\x20ID\x20is:',_0x11c660['id']);return getTicket(_0x2ec548,_0x12adcb,_0x11c660,_0x2a4376,_0x46399c);})[_0xae24('0x1e')](function(_0x492fe5){if(_0x492fe5){logger[_0xae24('0xe')](_0xae24('0x54'),_0x492fe5['id']);switch(_0x2ec548['type']){case _0xae24('0x55'):logger[_0xae24('0xe')](_0xae24('0x4a'),_0xae24('0x56'));return request({'uri':util[_0xae24('0x10')](_0xae24('0x57'),_0x2ec548['remoteUri'],_0x12adcb['id'],_0x492fe5['id']),'method':_0xae24('0x13')});case _0xae24('0x58'):logger[_0xae24('0xe')](_0xae24('0x4a'),_0xae24('0x59'));emit(util[_0xae24('0x10')]('user:%s',_0x5b214d[_0xae24('0x16')]),_0xae24('0x5a'),{'uri':util[_0xae24('0x10')](_0xae24('0x5b'),_0x2ec548['remoteUri'][_0xae24('0x5c')](_0xae24('0x5d'),''),_0x492fe5['id'])});break;default:logger[_0xae24('0x5e')]('[QUEUE]',_0xae24('0x5f'));}}})['catch'](function(_0x435377){logger['error'](_0xae24('0x60'),util[_0xae24('0x61')](_0x435377,{'showHidden':!![],'depth':null}));});};exports[_0xae24('0x62')]=function(_0x4b7d53,_0x4a5eac,_0x14ea0a,_0x1e5c7d,_0x4903d1,_0x2ddb3a,_0xdada37){var _0x883ed7,_0x52875f;_0x2ddb3a['remoteUri']=intUtil[_0xae24('0x49')](_0x2ddb3a[_0xae24('0x12')]);_0x2ddb3a[_0xae24('0x63')]=intUtil[_0xae24('0x49')](_0x2ddb3a[_0xae24('0x63')]);if(_0xdada37&&_0xdada37['recordingFormat']&&_0xdada37[_0xae24('0x64')]!==_0xae24('0x65')){logger[_0xae24('0xe')](_0xae24('0x66'),_0xae24('0x4b'));_0x4a5eac[_0xae24('0x4c')]=util[_0xae24('0x10')](_0xae24('0x4d'),_0x2ddb3a[_0xae24('0x63')],_0x4a5eac['uniqueid'],md5(_0x4a5eac[_0xae24('0x4e')]));}headers[_0xae24('0x4f')]=getAuth(_0x2ddb3a);return getUser(_0x2ddb3a,_0x1e5c7d[_0xae24('0x50')])[_0xae24('0x1e')](function(_0x471943){_0x883ed7=_0x471943;logger[_0xae24('0xe')]('The\x20User\x20ID\x20is:',_0x883ed7['id']);return getEndUser(_0x2ddb3a,_0x4a5eac['destcalleridname'],_0x4a5eac[_0xae24('0x67')]);})[_0xae24('0x1e')](function(_0x32017c){_0x52875f=_0x32017c;logger[_0xae24('0xe')](_0xae24('0x68'),_0x52875f['id']);return getTicket(_0x2ddb3a,_0x883ed7,_0x52875f,_0x14ea0a,_0x4a5eac);})[_0xae24('0x1e')](function(_0x14861f){if(_0x14861f){logger[_0xae24('0xe')](_0xae24('0x54'),_0x14861f['id']);switch(_0x2ddb3a['type']){case _0xae24('0x55'):logger[_0xae24('0xe')](_0xae24('0x66'),_0xae24('0x56'));return request({'uri':util[_0xae24('0x10')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x2ddb3a[_0xae24('0x12')],_0x883ed7['id'],_0x14861f['id']),'method':_0xae24('0x13')});case _0xae24('0x58'):logger[_0xae24('0xe')]('[OUTBOUND]',_0xae24('0x59'));emit(util[_0xae24('0x10')](_0xae24('0x69'),_0x1e5c7d['name']),'trigger:browser:url',{'uri':util[_0xae24('0x10')](_0xae24('0x5b'),_0x2ddb3a[_0xae24('0x12')][_0xae24('0x5c')]('/api/v2',''),_0x14861f['id'])});break;default:logger[_0xae24('0x5e')](_0xae24('0x66'),_0xae24('0x5f'));}}})[_0xae24('0x6a')](function(_0x23ff2d){logger[_0xae24('0x5e')]('[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration',util[_0xae24('0x61')](_0x23ff2d,{'showHidden':!![],'depth':null}));});};exports[_0xae24('0x6b')]=function(_0xb952f4,_0x4341e8,_0x36917f,_0x2f3dc3,_0x89abbe,_0x55dd10){var _0x264d29,_0x53ffef;_0x55dd10['remoteUri']=intUtil[_0xae24('0x49')](_0x55dd10[_0xae24('0x12')]);_0x55dd10[_0xae24('0x63')]=intUtil[_0xae24('0x49')](_0x55dd10[_0xae24('0x63')]);if(_0x89abbe&&_0x89abbe['monitor_format']){logger['info']('['+_0x4341e8['lastevent'][_0xae24('0x6c')]()+']','Recording\x20is\x20enabled!');_0x4341e8[_0xae24('0x4c')]=util[_0xae24('0x10')](_0xae24('0x4d'),_0x55dd10[_0xae24('0x63')],_0x4341e8[_0xae24('0x4e')],md5(_0x4341e8[_0xae24('0x4e')]));}else{_0x4341e8['recordingURL']='';}headers[_0xae24('0x4f')]=getAuth(_0x55dd10);return getUser(_0x55dd10)[_0xae24('0x1e')](function(_0x2c8c56){_0x264d29=_0x2c8c56;logger['info'](_0xae24('0x51'),_0x264d29['id']);return getEndUser(_0x55dd10,_0x4341e8[_0xae24('0x52')],_0x4341e8[_0xae24('0x53')]);})[_0xae24('0x1e')](function(_0x49318d){_0x53ffef=_0x49318d;logger['info'](_0xae24('0x68'),_0x53ffef['id']);return getTicket(_0x55dd10,_0x264d29,_0x53ffef,_0x36917f,_0x4341e8);})['then'](function(_0x37bb40){if(_0x37bb40){logger[_0xae24('0xe')]('The\x20Ticket\x20ID\x20is:',_0x37bb40['id']);}})[_0xae24('0x6a')](function(_0x40fcf3){logger[_0xae24('0x5e')]('['+_0x4341e8['lastevent'][_0xae24('0x6c')]()+']'+'\x20Error\x20running\x20Zendesk\x20integration',util[_0xae24('0x61')](_0x40fcf3,{'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 33489cd..91878e2 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 _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 +var _0x5826=['Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','outbound','recordingFormat','[OUTBOUND]','com','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','Outbound','monitor_format','toUpperCase','Recording\x20is\x20enabled!','md5','moment','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','localhost','socket.io-emitter','emit','debug','[HTTP]','stringify','length','forEach','includes','string','picklist','idField','content','toString','type','variableName','customVariable','Variable','name','indexOf','split','isNil','access_token','isBefore','expires_in','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','then','add','catch','error','stack','info','Search\x20user','https://www.zohoapis.%s/crm/v2/users','Zoho-oauthtoken\x20','users','isArrayLikeObject','findIndex','email','Agent\x20found!','Using\x20the\x20admin\x20account!','profile','Administrator','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','data','enduserType','https://www.zohoapis.','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','code','SUCCESS','details','log','GET','moduleSearch','contact_lead','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','uri','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','nothing','lead','Creating\x20new\x20call...','Owner','administrator','Subject','getString','Subjects','Descriptions','Who_Id','Full_Name','First_Name','Last_Name','What_Id','talktime','Call_Duration','utc','format','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','lastevent','called','Call_Result','Called','complete','connect','Answered','rejected','Rejected','abandoned','Abandoned','timeout','Timeout','Call_Start_Time','starttime','agentcalledAt','Inbound','merge','/crm/v2/Calls','Call\x20created!','err','queue','host','stripTrailingSlash','serverUrl','recordingURL','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','zoho.eu','calleridname','calleridnum','The\x20Call\x20ID\x20is:','[QUEUE]'];(function(_0x2adbeb,_0x5581be){var _0x5e18a6=function(_0x84e42b){while(--_0x84e42b){_0x2adbeb['push'](_0x2adbeb['shift']());}};_0x5e18a6(++_0x5581be);}(_0x5826,0x1ea));var _0x6582=function(_0x43abfc,_0x54bcfc){_0x43abfc=_0x43abfc-0x0;var _0x5effe6=_0x5826[_0x43abfc];return _0x5effe6;};'use strict';var _=require('lodash');var rp=require('request-promise');var md5=require(_0x6582('0x0'));var util=require('util');var intUtil=require('./util');var moment=require(_0x6582('0x1'));var Redis=require(_0x6582('0x2'));var BPromise=require(_0x6582('0x3'));var config=require(_0x6582('0x4'));var logger=require(_0x6582('0x5'))(_0x6582('0x6'));config[_0x6582('0x7')]=_[_0x6582('0x8')](config[_0x6582('0x7')],{'host':_0x6582('0x9'),'port':0x18eb});var io=require(_0x6582('0xa'))(new Redis(config[_0x6582('0x7')]));function emit(_0x1aa45b,_0x520572,_0x418796){io['to'](_0x1aa45b)[_0x6582('0xb')](_0x520572,_0x418796);}function request(_0xde5032){logger[_0x6582('0xc')](_0x6582('0xd'),JSON[_0x6582('0xe')](_0xde5032));return rp(_0xde5032);}function getCustomFields(_0x2f3787,_0x39e14b){var _0x2f67af={};if(_0x2f3787[_0x6582('0xf')]>0x0){_[_0x6582('0x10')](_0x2f3787,function(_0x20eb19){if(_[_0x6582('0x11')]([_0x6582('0x12'),_0x6582('0x13')],_0x20eb19['type'])&&_0x20eb19['idField']){_0x2f67af[_0x20eb19[_0x6582('0x14')]]=_0x20eb19[_0x6582('0x15')][_0x6582('0x16')]();}else if(_0x20eb19[_0x6582('0x17')]==='variable'&&_0x20eb19[_0x6582('0x18')]&&_0x20eb19[_0x6582('0x14')]&&_0x39e14b[_0x20eb19['variableName']]){_0x2f67af[_0x20eb19[_0x6582('0x14')]]=_0x39e14b[_0x20eb19['variableName']]['toString']();}else if(_0x20eb19[_0x6582('0x17')]===_0x6582('0x19')&&_0x20eb19['Variable']&&_0x20eb19[_0x6582('0x1a')][_0x6582('0x1b')]&&_0x20eb19[_0x6582('0x14')]&&_0x39e14b[_0x20eb19[_0x6582('0x1a')][_0x6582('0x1b')]['toLowerCase']()]){_0x2f67af[_0x20eb19['idField']]=_0x39e14b[_0x20eb19[_0x6582('0x1a')][_0x6582('0x1b')]['toLowerCase']()][_0x6582('0x16')]();}});}return _0x2f67af;}function getName(_0x294be9){if(_0x294be9[_0x6582('0x1c')]('\x20')>0x0){var _0x485fe3=_0x294be9[_0x6582('0x1d')](/ (.+)/);if(_0x485fe3[0x1]){return _0x485fe3;}}return[_0x294be9,_0x294be9];}var accountsTokens={};function getAccessToken(_0xe93de1){return new Promise(function(_0x3c2cca,_0x47289d){if(!_['isNil'](accountsTokens[_0xe93de1['id']])&&!_[_0x6582('0x1e')](accountsTokens[_0xe93de1['id']][_0x6582('0x1f')])){if(moment()[_0x6582('0x20')](accountsTokens[_0xe93de1['id']][_0x6582('0x21')])){_0x3c2cca(accountsTokens[_0xe93de1['id']]['access_token']);}}var _0x3eae76;switch(_0xe93de1[_0x6582('0x22')]){case'US':_0x3eae76=_0x6582('0x23');break;case'AU':_0x3eae76=_0x6582('0x24');break;case'EU':_0x3eae76=_0x6582('0x25');break;case'IN':_0x3eae76=_0x6582('0x26');break;case'CN':_0x3eae76='https://accounts.zoho.com.cn';break;default:_0x3eae76=_0x6582('0x25');break;}var _0x4e40de={'method':_0x6582('0x27'),'uri':_0x3eae76+_0x6582('0x28'),'qs':{'refresh_token':_0xe93de1[_0x6582('0x29')],'client_id':_0xe93de1[_0x6582('0x2a')],'client_secret':_0xe93de1[_0x6582('0x2b')],'grant_type':_0x6582('0x2c')},'json':!![]};return rp(_0x4e40de)[_0x6582('0x2d')](function(_0x348b18){accountsTokens[_0xe93de1['id']]={'access_token':_0x348b18[_0x6582('0x1f')],'expires_in':moment()[_0x6582('0x2e')](_0x348b18['expires_in'],'seconds')};_0x3c2cca(_0x348b18[_0x6582('0x1f')]);})[_0x6582('0x2f')](function(_0x58db2f){logger[_0x6582('0x30')]('Failing\x20creating\x20the\x20access_token',_0x58db2f[_0x6582('0x31')]);_0x47289d(_0x58db2f);});});}function getUser(_0x37e996,_0x1cf0f4,_0x2543fd,_0x375081){logger[_0x6582('0x32')](_0x6582('0x33'));return request({'method':'GET','uri':util['format'](_0x6582('0x34'),_0x1cf0f4),'qs':{'type':'ActiveUsers'},'headers':{'Authorization':_0x6582('0x35')+_0x37e996},'json':!![]})['then'](function(_0x58ca9a){if(_0x58ca9a[_0x6582('0x36')]){var _0x562d46=-0x1;if(_[_0x6582('0x37')](_0x58ca9a[_0x6582('0x36')])){if(!_[_0x6582('0x1e')](_0x375081)){_0x562d46=_[_0x6582('0x38')](_0x58ca9a['users'],function(_0x1dde91){return _0x1dde91[_0x6582('0x39')]===_0x375081;});}if(_0x562d46>=0x0){logger['info'](_0x6582('0x3a'));}else{logger[_0x6582('0x32')](_0x6582('0x3b'));_0x562d46=_[_0x6582('0x38')](_0x58ca9a['users'],function(_0x5bfd69){return _0x5bfd69['profile'][_0x6582('0x1b')]==='Administrator';});}return _0x58ca9a[_0x6582('0x36')][_0x562d46];}else{if(_0x58ca9a['user'][_0x6582('0x3c')][_0x6582('0x1b')]===_0x6582('0x3d')){logger[_0x6582('0x32')](_0x6582('0x3b'));user=_0x58ca9a['user'];return user;}else{logger[_0x6582('0x30')](_0x6582('0x3e'),JSON[_0x6582('0xe')](_0x58ca9a));throw new Error(_0x6582('0x3f')+JSON['stringify'](_0x58ca9a));}}}else{logger[_0x6582('0x30')]('The\x20failing\x20result\x20is',JSON[_0x6582('0xe')](_0x58ca9a));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0x6582('0xe')](_0x58ca9a));}})['catch'](function(_0x3d5b00){console[_0x6582('0x30')](_0x3d5b00);});}function getZohoUser(_0x4ff0dd,_0x293ee4){return new BPromise(function(_0x5ca114,_0x2b4f3b){request(_0x4ff0dd)[_0x6582('0x2d')](function(_0x534dd6){var _0x53931b=null;if(_0x534dd6){_0x53931b=_0x534dd6[_0x6582('0x40')][0x0];_0x53931b[_0x6582('0x41')]=_0x293ee4;}_0x5ca114(_0x53931b);})[_0x6582('0x2f')](function(_0x1216ef){_0x2b4f3b(_0x1216ef);});});}function createEndUser(_0x4b8f68,_0x438eca,_0x1ab40f,_0x5d9ec5,_0x287f8a,_0x37eecc){var _0x1ab40f=getName(_0x1ab40f);return request({'method':_0x6582('0x27'),'uri':_0x6582('0x42')+_0x438eca+_0x6582('0x43')+_[_0x6582('0x44')](_0x37eecc[_0x6582('0x45')])+'s','body':{'data':[{'Last_Name':_0x1ab40f[0x1],'First_Name':_0x1ab40f[0x0],'Phone':_0x5d9ec5,'Owner':{'name':!_[_0x6582('0x1e')](_0x287f8a[_0x6582('0x46')][_0x6582('0x1b')])?_0x287f8a['role'][_0x6582('0x1b')]:!_[_0x6582('0x1e')](_0x287f8a['first_name'])?_0x287f8a[_0x6582('0x47')]+'\x20'+_0x287f8a[_0x6582('0x48')]:_0x287f8a[_0x6582('0x48')],'id':_0x287f8a['id']}}]},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x4b8f68},'json':!![]})[_0x6582('0x2d')](function(_0xa7a4a4){if(_0xa7a4a4&&_0xa7a4a4[_0x6582('0x40')][0x0][_0x6582('0x49')]===_0x6582('0x4a')){var _0x14a570=_0xa7a4a4[_0x6582('0x40')][0x0][_0x6582('0x4b')];_0x14a570['enduserType']=_[_0x6582('0x44')](_0x37eecc[_0x6582('0x45')])+'s';return _0x14a570;}logger[_0x6582('0x30')](_0x6582('0x3e'),JSON['stringify'](data));throw new Error('Error:\x20'+JSON['stringify'](data));})[_0x6582('0x2f')](function(_0x5583e1){console[_0x6582('0x4c')]('CREATE\x20ERROR',_0x5583e1);});}function getEndUser(_0x3e33a1,_0x2ace3d,_0x192ac5,_0x3db0cc,_0x90e639,_0x281835,_0x214e66){var _0x458b27={'method':_0x6582('0x4d'),'uri':'','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x3e33a1},'json':!![]};switch(_0x214e66[_0x6582('0x4e')]){case _0x6582('0x4f'):_0x458b27['uri']='https://www.zohoapis.'+_0x2ace3d+_0x6582('0x50')+_0x90e639+'))';return getZohoUser(_0x458b27,_0x6582('0x51'))[_0x6582('0x2d')](function(_0x34c238){if(_0x34c238)return _0x34c238;_0x458b27[_0x6582('0x52')]=_0x6582('0x42')+_0x2ace3d+_0x6582('0x53')+_0x90e639+'))';return getZohoUser(_0x458b27,_0x6582('0x54'))['then'](function(_0xd0586){if(_0xd0586)return _0xd0586;if(_0x214e66[_0x6582('0x45')]!=_0x6582('0x55')){return createEndUser(_0x3e33a1,_0x2ace3d,_0x3db0cc,_0x90e639,_0x281835,_0x214e66);}else{return{};}});});break;case'contact':_0x458b27['uri']=_0x6582('0x42')+_0x2ace3d+_0x6582('0x50')+_0x90e639+'))';return getZohoUser(_0x458b27,_0x6582('0x51'))[_0x6582('0x2d')](function(_0x4c970f){if(_0x4c970f)return _0x4c970f;if(_0x214e66[_0x6582('0x45')]!=_0x6582('0x55')){return createEndUser(_0x3e33a1,_0x2ace3d,_0x3db0cc,_0x90e639,_0x281835,_0x214e66);}else{return{};}});break;case _0x6582('0x56'):_0x458b27['uri']=_0x6582('0x42')+_0x2ace3d+_0x6582('0x53')+_0x90e639+'))';return getZohoUser(_0x458b27,'Leads')[_0x6582('0x2d')](function(_0x189639){if(_0x189639)return _0x189639;if(_0x214e66[_0x6582('0x45')]!=_0x6582('0x55')){return createEndUser(_0x3e33a1,_0x2ace3d,_0x3db0cc,_0x90e639,_0x281835,_0x214e66);}else{return{};}});break;}}function getCall(_0x4d3804,_0x3aa47e,_0x4a5498,_0x47e859,_0x3794a5,_0x35171e,_0x367f54,_0x1e8dea){logger['info'](_0x6582('0x57'));var _0xeda4a9={};_0xeda4a9[_0x6582('0x58')]={'name':!_[_0x6582('0x1e')](_0x47e859[_0x6582('0x46')][_0x6582('0x1b')])&&!_[_0x6582('0x1e')](_0x47e859['profile'][_0x6582('0x1b')])&&_0x47e859[_0x6582('0x3c')][_0x6582('0x1b')]===_0x6582('0x59')?_0x47e859[_0x6582('0x46')][_0x6582('0x1b')]:!_[_0x6582('0x1e')](_0x47e859[_0x6582('0x47')])?_0x47e859['first_name']+'\x20'+_0x47e859[_0x6582('0x48')]:_0x47e859[_0x6582('0x48')],'id':_0x47e859['id']};_0xeda4a9[_0x6582('0x5a')]=intUtil[_0x6582('0x5b')](_0x35171e[_0x6582('0x5c')],_0x367f54,'\x20');_0xeda4a9['Description']=intUtil[_0x6582('0x5b')](_0x35171e[_0x6582('0x5d')],_0x367f54,'\x0a');if(_0x3794a5[_0x6582('0x41')]===_0x6582('0x51')){_0xeda4a9[_0x6582('0x5e')]={'name':!_[_0x6582('0x1e')](_0x3794a5[_0x6582('0x5f')])?_0x3794a5[_0x6582('0x5f')]:!_['isNil'](_0x3794a5[_0x6582('0x60')])?_0x3794a5[_0x6582('0x60')]+'\x20'+_0x3794a5[_0x6582('0x61')]:_0x3794a5[_0x6582('0x61')],'id':_0x3794a5['id']};}if(_0x3794a5[_0x6582('0x41')]===_0x6582('0x54')){_0xeda4a9[_0x6582('0x62')]={'name':!_[_0x6582('0x1e')](_0x3794a5[_0x6582('0x5f')])?_0x3794a5[_0x6582('0x5f')]:!_[_0x6582('0x1e')](_0x3794a5[_0x6582('0x60')])?_0x3794a5[_0x6582('0x60')]+'\x20'+_0x3794a5['Last_Name']:_0x3794a5[_0x6582('0x61')],'id':_0x3794a5['id']};_0xeda4a9['$se_module']=_[_0x6582('0x44')](_0x3794a5['enduserType']);}if(_0x367f54[_0x6582('0x63')]){_0xeda4a9[_0x6582('0x64')]=moment[_0x6582('0x65')](parseInt(_0x367f54[_0x6582('0x63')])*0x3e8)[_0x6582('0x66')](_0x6582('0x67'));}else if(_0x367f54[_0x6582('0x68')]&&_0x367f54[_0x6582('0x69')]){_0xeda4a9['Call_Duration']=moment[_0x6582('0x65')](moment(_0x367f54[_0x6582('0x69')],_0x6582('0x6a'))[_0x6582('0x6b')](moment(_0x367f54['starttime'],'YYYY-MM-DDTHH:mm:ss')))['format'](_0x6582('0x67'));}switch(_0x367f54[_0x6582('0x6c')]){case _0x6582('0x6d'):_0xeda4a9[_0x6582('0x6e')]=_0x6582('0x6f');break;case _0x6582('0x70'):case _0x6582('0x71'):_0xeda4a9[_0x6582('0x6e')]=_0x6582('0x72');break;case _0x6582('0x73'):_0xeda4a9[_0x6582('0x6e')]=_0x6582('0x74');break;case _0x6582('0x75'):_0xeda4a9[_0x6582('0x6e')]=_0x6582('0x76');break;case _0x6582('0x77'):_0xeda4a9[_0x6582('0x6e')]=_0x6582('0x78');default:}_0xeda4a9[_0x6582('0x79')]=(_0x1e8dea==='outbound'?moment(_0x367f54[_0x6582('0x7a')])[_0x6582('0x66')](_0x6582('0x6a')):moment(_0x367f54[_0x6582('0x7b')])['format'](_0x6582('0x6a')))||moment()[_0x6582('0x66')]('YYYY-MM-DDTHH:mm:ss');_0xeda4a9['Call_Type']=_0x1e8dea||_0x6582('0x7c');_0xeda4a9=_[_0x6582('0x7d')](_0xeda4a9,getCustomFields(_0x35171e['Fields'],_0x367f54));return request({'method':_0x6582('0x27'),'uri':'https://www.zohoapis.'+_0x3aa47e+_0x6582('0x7e'),'headers':{'Authorization':_0x6582('0x35')+_0x4d3804},'body':{'data':[_0xeda4a9]},'json':!![]})['then'](function(_0x1c24cf){if(_0x1c24cf&&_0x1c24cf[_0x6582('0x40')][0x0][_0x6582('0x49')]==='SUCCESS'){logger[_0x6582('0x32')](_0x6582('0x7f'));return{'id':_0x1c24cf[_0x6582('0x40')][0x0][_0x6582('0x4b')]['id']};}})[_0x6582('0x2f')](function(_0x2fdbe3){logger[_0x6582('0x32')](_0x6582('0x80'),_0x2fdbe3[_0x6582('0x31')]);console['log'](_0x6582('0x80'),_0x2fdbe3);});}exports[_0x6582('0x81')]=function(_0x27d8a3,_0x68fe28,_0x13b51e,_0x49146d,_0x2414d4,_0x296fdc){var _0x2f71d1,_0x19fe36,_0x313cb4;_0x296fdc[_0x6582('0x82')]=intUtil[_0x6582('0x83')](_0x296fdc['host']);_0x296fdc['serverUrl']=intUtil['stripTrailingSlash'](_0x296fdc[_0x6582('0x84')]);if(_0x2414d4&&_0x2414d4['monitor_format']){logger[_0x6582('0x32')]('[QUEUE]','Recording\x20is\x20enabled!');_0x68fe28[_0x6582('0x85')]=_0x296fdc[_0x6582('0x84')]+_0x6582('0x86')+_0x68fe28[_0x6582('0x87')]+_0x6582('0x88')+md5(_0x68fe28[_0x6582('0x87')]);}else{_0x68fe28[_0x6582('0x85')]='';}var _0x213509=_0x296fdc[_0x6582('0x82')]===_0x6582('0x89')?'eu':'com';return getAccessToken(_0x296fdc)['then'](function(_0x416e40){_0x313cb4=_0x416e40;return getUser(_0x313cb4,_0x213509,_0x296fdc,_0x49146d[_0x6582('0x39')]);})['then'](function(_0x540502){_0x2f71d1=_0x540502;logger['info']('The\x20User\x20ID\x20is:',_0x2f71d1['id']);return getEndUser(_0x313cb4,_0x213509,_0x296fdc,_0x68fe28[_0x6582('0x8a')],_0x68fe28[_0x6582('0x8b')],_0x2f71d1,_0x13b51e);})['then'](function(_0x24d792){_0x19fe36=_0x24d792;return getCall(_0x313cb4,_0x213509,_0x296fdc,_0x2f71d1,_0x19fe36,_0x13b51e,_0x68fe28,_0x6582('0x7c'));})[_0x6582('0x2d')](function(_0x5e2f82){if(_0x5e2f82){logger['info'](_0x6582('0x8c'),_0x5e2f82['id']);logger[_0x6582('0x32')](_0x6582('0x8d'),_0x6582('0x8e'));emit(util[_0x6582('0x66')](_0x6582('0x8f'),_0x49146d[_0x6582('0x1b')]),_0x6582('0x90'),{'uri':_0x6582('0x91')+_0x296fdc[_0x6582('0x82')]+_0x6582('0x92')+_0x5e2f82['id']});}})[_0x6582('0x2f')](function(_0x4a1c52){logger[_0x6582('0x30')](_0x6582('0x8d'),JSON['stringify'](_0x4a1c52));});};exports[_0x6582('0x93')]=function(_0x3dd86,_0x5172f8,_0xb921bd,_0x56c941,_0x33c1fa,_0xed20b2,_0x1b132c){var _0x617a03,_0x1f8712,_0x16ce22;_0xed20b2[_0x6582('0x82')]=intUtil[_0x6582('0x83')](_0xed20b2[_0x6582('0x82')]);_0xed20b2[_0x6582('0x84')]=intUtil[_0x6582('0x83')](_0xed20b2[_0x6582('0x84')]);if(_0x1b132c&&_0x1b132c['recordingFormat']&&_0x1b132c[_0x6582('0x94')]!=='none'){logger['info'](_0x6582('0x95'),'Recording\x20is\x20enabled!');_0x5172f8[_0x6582('0x85')]=_0xed20b2['serverUrl']+_0x6582('0x86')+_0x5172f8['uniqueid']+'/downloads?type=uniqueid&token='+md5(_0x5172f8[_0x6582('0x87')]);}var _0x2e7656=_0xed20b2[_0x6582('0x82')]===_0x6582('0x89')?'eu':_0x6582('0x96');return getAccessToken(_0xed20b2)[_0x6582('0x2d')](function(_0x18797e){_0x16ce22=_0x18797e;return getUser(_0x16ce22,_0x2e7656,_0xed20b2,_0x56c941[_0x6582('0x39')]);})[_0x6582('0x2d')](function(_0x390b3b){_0x617a03=_0x390b3b;logger[_0x6582('0x32')](_0x6582('0x97'),_0x617a03['id']);return getEndUser(_0x16ce22,_0x2e7656,_0xed20b2,_0x5172f8[_0x6582('0x98')],_0x5172f8[_0x6582('0x99')],_0x617a03,_0xb921bd);})[_0x6582('0x2d')](function(_0x2b8cc1){_0x1f8712=_0x2b8cc1;return getCall(_0x16ce22,_0x2e7656,_0xed20b2,_0x617a03,_0x1f8712,_0xb921bd,_0x5172f8,_0x6582('0x9a'));})['then'](function(_0x1c8f37){if(_0x1c8f37){logger[_0x6582('0x32')](_0x6582('0x8c'),_0x1c8f37['id']);logger[_0x6582('0x32')]('[OUTBOUND]',_0x6582('0x8e'));emit(util[_0x6582('0x66')](_0x6582('0x8f'),_0x56c941[_0x6582('0x1b')]),_0x6582('0x90'),{'uri':_0x6582('0x91')+_0xed20b2[_0x6582('0x82')]+'/crm/EntityInfo.do?module=Calls&id='+_0x1c8f37['id']});}})[_0x6582('0x2f')](function(_0x5d5e5b){logger[_0x6582('0x30')](_0x6582('0x95'),JSON[_0x6582('0xe')](_0x5d5e5b));});};exports['unmanaged']=function(_0x5ba7ea,_0x58d917,_0x81ba1f,_0x46d84a,_0x31d71a,_0x1b21b6){var _0x2f4fba,_0x5b70cd,_0x40fccc;_0x1b21b6['host']=intUtil[_0x6582('0x83')](_0x1b21b6[_0x6582('0x82')]);_0x1b21b6[_0x6582('0x84')]=intUtil['stripTrailingSlash'](_0x1b21b6['serverUrl']);if(_0x31d71a&&_0x31d71a[_0x6582('0x9b')]){logger[_0x6582('0x32')]('['+_0x58d917[_0x6582('0x6c')][_0x6582('0x9c')]()+']',_0x6582('0x9d'));_0x58d917[_0x6582('0x85')]=_0x1b21b6[_0x6582('0x84')]+_0x6582('0x86')+_0x58d917['uniqueid']+_0x6582('0x88')+md5(_0x58d917[_0x6582('0x87')]);}else{_0x58d917[_0x6582('0x85')]='';}var _0x258c93=_0x1b21b6['host']===_0x6582('0x89')?'eu':_0x6582('0x96');return getAccessToken(_0x1b21b6)[_0x6582('0x2d')](function(_0x169728){_0x40fccc=_0x169728;return getUser(_0x40fccc,_0x258c93,_0x1b21b6);})[_0x6582('0x2d')](function(_0x23b093){_0x2f4fba=_0x23b093;logger[_0x6582('0x32')]('The\x20User\x20ID\x20is:',_0x2f4fba['id']);return getEndUser(_0x40fccc,_0x258c93,_0x1b21b6,_0x58d917[_0x6582('0x8a')],_0x58d917[_0x6582('0x8b')],_0x2f4fba,_0x81ba1f);})['then'](function(_0x31ed0a){_0x5b70cd=_0x31ed0a;return getCall(_0x40fccc,_0x258c93,_0x1b21b6,_0x2f4fba,_0x5b70cd,_0x81ba1f,_0x58d917,_0x6582('0x7c'));})[_0x6582('0x2d')](function(_0x19b0a7){if(_0x19b0a7){logger['info'](_0x6582('0x8c'),_0x19b0a7['id']);}})[_0x6582('0x2f')](function(_0x4b1787){logger[_0x6582('0x30')]('['+_0x58d917['lastevent'][_0x6582('0x9c')]()+']',JSON[_0x6582('0xe')](_0x4b1787));});}; \ 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 b4a9e70..4d80f83 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 _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 +var _0xee5c=['info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','mustache','../../../../config/logger','exec','data2','Script','data3','render','error','format'];(function(_0x29d915,_0x54a040){var _0x160f86=function(_0x237dfa){while(--_0x237dfa){_0x29d915['push'](_0x29d915['shift']());}};_0x160f86(++_0x54a040);}(_0xee5c,0xd3));var _0xcee5=function(_0x397cfb,_0xb8f317){_0x397cfb=_0x397cfb-0x0;var _0x15fed9=_0xee5c[_0x397cfb];return _0x15fed9;};'use strict';var util=require('util');var sh=require('shelljs');var Mustache=require(_0xcee5('0x0'));var logger=require(_0xcee5('0x1'))('trigger');exports[_0xcee5('0x2')]=function(_0x5aee4e,_0x4c4953){var _0x71239d=_0x5aee4e[_0xcee5('0x3')]?_0x5aee4e['data2']:_0xcee5('0x4');var _0x21e0b4=_0x5aee4e[_0xcee5('0x5')]?Mustache[_0xcee5('0x6')](_0x5aee4e[_0xcee5('0x5')],_0x4c4953):_0x4c4953;sh[_0xcee5('0x2')](_0x21e0b4,function(_0x377164,_0x54803a,_0x4e46b7){if(_0x377164!==0x0){logger[_0xcee5('0x7')](util[_0xcee5('0x8')]('%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s',_0x71239d,_0x21e0b4,_0x377164,_0x4e46b7));}else{logger[_0xcee5('0x9')](util['format'](_0xcee5('0xa'),_0x71239d,_0x21e0b4,_0x54803a));}});}; \ 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 effa585..8fe600d 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 _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 +var _0xf1a6=['name','message','request-promise','util','lodash','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render','data2','data5','number','headers','data6','parse','error','GET','DELETE','PUT','data7','body','stack','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify','then','isNil','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch'];(function(_0x26e5c8,_0x2309fa){var _0x32a86d=function(_0x9062fe){while(--_0x9062fe){_0x26e5c8['push'](_0x26e5c8['shift']());}};_0x32a86d(++_0x2309fa);}(_0xf1a6,0x92));var _0x6f1a=function(_0x16dea3,_0x4a4740){_0x16dea3=_0x16dea3-0x0;var _0x5b599d=_0xf1a6[_0x16dea3];return _0x5b599d;};'use strict';var rp=require(_0x6f1a('0x0'));var util=require(_0x6f1a('0x1'));var _=require(_0x6f1a('0x2'));var Mustache=require(_0x6f1a('0x3'));var logger=require(_0x6f1a('0x4'))(_0x6f1a('0x5'));exports[_0x6f1a('0x6')]=function(_0x5bcecf,_0x4921e0){var _0x238296,_0x4fdc8d;var _0x44c076={'method':_0x5bcecf[_0x6f1a('0x7')][_0x6f1a('0x8')](),'uri':Mustache[_0x6f1a('0x9')](_0x5bcecf[_0x6f1a('0xa')],_0x4921e0),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x5bcecf[_0x6f1a('0xb')])===_0x6f1a('0xc')&&parseInt(_0x5bcecf[_0x6f1a('0xb')])>=0x1&&parseInt(_0x5bcecf[_0x6f1a('0xb')])<=0xa?parseInt(_0x5bcecf[_0x6f1a('0xb')])*0x3e8:0x5*0x3e8};try{_0x44c076[_0x6f1a('0xd')]=_0x5bcecf[_0x6f1a('0xe')]?JSON[_0x6f1a('0xf')](Mustache['render'](_0x5bcecf[_0x6f1a('0xe')],_0x4921e0)):{};}catch(_0x58b0ab){logger[_0x6f1a('0x10')](_0x58b0ab['stack']);}switch(_0x5bcecf[_0x6f1a('0x7')][_0x6f1a('0x8')]()){case _0x6f1a('0x11'):case _0x6f1a('0x12'):_0x238296=null;_0x44c076['qs']=_0x4921e0;break;case'POST':case _0x6f1a('0x13'):if(_0x5bcecf[_0x6f1a('0x14')]){try{_0x238296=JSON['parse'](Mustache['render'](_0x5bcecf['data7'],_0x4921e0));_0x44c076[_0x6f1a('0x15')]=_0x238296;}catch(_0xad21be){logger[_0x6f1a('0x10')](_0xad21be[_0x6f1a('0x16')]);logger['error'](_0x6f1a('0x17'));}}else{_0x238296=_0x4921e0;_0x44c076['body']=_0x238296;}break;}logger[_0x6f1a('0x18')](util[_0x6f1a('0x19')](_0x6f1a('0x1a'),_0x5bcecf['data1'],_0x5bcecf['data2'],JSON[_0x6f1a('0x1b')](_0x44c076)));rp(_0x44c076)[_0x6f1a('0x1c')](function(_0x53f3b2){_0x238296=!_[_0x6f1a('0x1d')](_0x238296)?',\x20request\x20body:\x20'+_0x238296:'';_0x4fdc8d=typeof _0x53f3b2[_0x6f1a('0x15')]===_0x6f1a('0x1e')?JSON[_0x6f1a('0x1b')](_0x53f3b2[_0x6f1a('0x15')]):_0x53f3b2[_0x6f1a('0x15')];logger[_0x6f1a('0x18')](util[_0x6f1a('0x19')](_0x6f1a('0x1f'),_0x5bcecf['data1'],_0x5bcecf[_0x6f1a('0xa')],_0x53f3b2[_0x6f1a('0x20')],_0x4fdc8d));})[_0x6f1a('0x21')](function(_0x11e59e){logger[_0x6f1a('0x10')](util[_0x6f1a('0x19')]('%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s',_0x5bcecf['data1'],_0x5bcecf[_0x6f1a('0xa')],_0x11e59e['statusCode'],_0x11e59e[_0x6f1a('0x22')],_0x11e59e[_0x6f1a('0x23')]));});}; \ No newline at end of file diff --git a/server/services/email/client.js b/server/services/email/client.js index 83f11b8..46650e6 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 _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 +var _0x1980=['error','rpc','message','result','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','Request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1980,0x1e5));var _0x0198=function(_0x52b7ab,_0x4171b1){_0x52b7ab=_0x52b7ab-0x0;var _0x249eaf=_0x1980[_0x52b7ab];return _0x249eaf;};'use strict';var jayson=require(_0x0198('0x0'));var BPromise=require(_0x0198('0x1'));var logger=require(_0x0198('0x2'))(_0x0198('0x3'));var client=jayson[_0x0198('0x4')][_0x0198('0x5')]({'port':0x2329});client[_0x0198('0x6')]=function(_0x470706,_0x5eb220){return new BPromise(function(_0x43aa78,_0x257baf){return client['request'](_0x470706,_0x5eb220)['then'](function(_0x229384){logger['debug']('rpc',_0x0198('0x3'),_0x470706,_0x5eb220,_0x229384);if(_0x229384[_0x0198('0x7')]){logger[_0x0198('0x7')](_0x0198('0x8'),_0x0198('0x3'),_0x470706,_0x229384[_0x0198('0x7')]['message'],_0x5eb220);return _0x257baf(_0x229384[_0x0198('0x7')][_0x0198('0x9')]);}else{return _0x43aa78(_0x229384[_0x0198('0xa')]);}})['catch'](function(_0x1b53d7){logger[_0x0198('0x7')]('rpc',_0x0198('0x3'),_0x470706,_0x1b53d7,_0x5eb220);return _0x257baf(_0x1b53d7);});});};module[_0x0198('0xb')]=client; \ No newline at end of file diff --git a/server/services/email/index.js b/server/services/email/index.js index 5a315ad..968e86d 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 _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 +var _0x1cfe=['./rpc/mailAccount','./rpc/setting','then','initMailAccounts','refresh','mailAccounts','listen','loginMailFrequency','log','bluebird','./lib/email'];(function(_0x2d80af,_0x5d16ff){var _0x441e11=function(_0xf6b2e){while(--_0xf6b2e){_0x2d80af['push'](_0x2d80af['shift']());}};_0x441e11(++_0x5d16ff);}(_0x1cfe,0xcf));var _0xe1cf=function(_0x355ce8,_0x5f1d0a){_0x355ce8=_0x355ce8-0x0;var _0x1db8b8=_0x1cfe[_0x355ce8];return _0x1db8b8;};'use strict';var BPromise=require(_0xe1cf('0x0'));var server=require('./server');var Realtime=require('./realtime');var EmailChannel=require(_0xe1cf('0x1'));var mailAccount=require(_0xe1cf('0x2'));var setting=require(_0xe1cf('0x3'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return BPromise['resolve']()[_0xe1cf('0x4')](mailAccount['getMailAccounts']())[_0xe1cf('0x4')](realtime[_0xe1cf('0x5')]())[_0xe1cf('0x4')](function(){email[_0xe1cf('0x6')](realtime[_0xe1cf('0x7')]);return realtime;});}function main(){return server[_0xe1cf('0x8')](realtime,email)[_0xe1cf('0x4')](function(){return initRealtime();})['then'](function(){return setting['getSettings']();})['then'](function(_0x34c91f){return setInterval(initRealtime,_0x34c91f[_0xe1cf('0x9')]*0x3e8);})['catch'](function(_0x3a83b3){console[_0xe1cf('0xa')](_0x3a83b3);});}main(); \ No newline at end of file diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js index 5cefb77..88b4647 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 _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 +var _0x4abc=['verifySmtp','isNil','Smtp','verify','verified','exports','lodash','moment','bluebird','md5','../../../config/environment','email','redis','defaults','localhost','socket.io-emitter','./imap','./smtp','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','smtp','name','key','Imap','status','messageStatus','stringify','mailAccount:update','prototype','refresh','hasOwnProperty','active','imapAccounts','handleImapBox','handleImapEmail','bind','handleImapEnd','error','handleImapError','emit','messages','total','lastName','from','notify','catch','lastSync'];(function(_0x2cb651,_0x35d075){var _0x3ebed6=function(_0x20a2a0){while(--_0x20a2a0){_0x2cb651['push'](_0x2cb651['shift']());}};_0x3ebed6(++_0x35d075);}(_0x4abc,0x1bf));var _0xc4ab=function(_0xfa634c,_0x414e0e){_0xfa634c=_0xfa634c-0x0;var _0x73e478=_0x4abc[_0xfa634c];return _0x73e478;};'use strict';var _=require(_0xc4ab('0x0'));var moment=require(_0xc4ab('0x1'));var BPromise=require(_0xc4ab('0x2'));var md5=require(_0xc4ab('0x3'));var Redis=require('ioredis');var config=require(_0xc4ab('0x4'));var logger=require('../../../config/logger')(_0xc4ab('0x5'));config[_0xc4ab('0x6')]=_[_0xc4ab('0x7')](config[_0xc4ab('0x6')],{'host':_0xc4ab('0x8'),'port':0x18eb});var io=require(_0xc4ab('0x9'))(new Redis(config[_0xc4ab('0x6')]));var EmailImap=require(_0xc4ab('0xa'));var EmailSmtp=require(_0xc4ab('0xb'));var mailAccount=require(_0xc4ab('0xc'));var md5Accounts={};function EmailChannel(_0x353c35){logger[_0xc4ab('0xd')](_0xc4ab('0xe'));this[_0xc4ab('0xf')]=_0x353c35[_0xc4ab('0xf')];this['imapAccounts']={};this[_0xc4ab('0x10')]=new EmailSmtp();}EmailChannel['prototype']['emit']=function(_0x3852d3){var _0x1936f7=this['mailAccounts'][_0x3852d3];var _0x5c90e0={'id':_0x1936f7['id'],'name':_0x1936f7[_0xc4ab('0x11')],'key':_0x1936f7[_0xc4ab('0x12')],'active':_0x1936f7['active'],'Imap':{'status':_0x1936f7[_0xc4ab('0x13')][_0xc4ab('0x14')],'messageStatus':_0x1936f7[_0xc4ab('0x13')][_0xc4ab('0x15')],'total':_0x1936f7[_0xc4ab('0x13')]['total']}};if(_['isNil'](md5Accounts[_0x3852d3])){md5Accounts[_0x3852d3]={};}var _0x554865=md5(JSON[_0xc4ab('0x16')](_0x5c90e0));if(md5Accounts[_0x3852d3]['md5']!==_0x554865){md5Accounts[_0x3852d3][_0xc4ab('0x3')]=_0x554865;io['emit'](_0xc4ab('0x17'),_0x5c90e0);}};EmailChannel[_0xc4ab('0x18')][_0xc4ab('0x19')]=function(_0x13934c){for(var _0x385b04 in _0x13934c){if(_0x13934c[_0xc4ab('0x1a')](_0x385b04)){if(_0x13934c[_0x385b04][_0xc4ab('0x13')]&&_0x13934c[_0x385b04][_0xc4ab('0x1b')]){var _0x44dfb2=_0x13934c[_0x385b04]['Imap'];if(!this[_0xc4ab('0x1c')][_0xc4ab('0x1a')](_0x44dfb2['id'])){this[_0xc4ab('0x1c')][_0x44dfb2['id']]=new EmailImap(_0x44dfb2,_0x13934c[_0x385b04][_0xc4ab('0x5')]);this[_0xc4ab('0x1c')][_0x44dfb2['id']]['on']('box',this[_0xc4ab('0x1d')]['bind'](this,_0x385b04));this[_0xc4ab('0x1c')][_0x44dfb2['id']]['on'](_0xc4ab('0x5'),this[_0xc4ab('0x1e')][_0xc4ab('0x1f')](this,_0x385b04));this['imapAccounts'][_0x44dfb2['id']]['on']('end',this[_0xc4ab('0x20')][_0xc4ab('0x1f')](this,_0x385b04));this[_0xc4ab('0x1c')][_0x44dfb2['id']]['on'](_0xc4ab('0x21'),this[_0xc4ab('0x22')][_0xc4ab('0x1f')](this,_0x385b04));}}else{if(_['isNil'](this[_0xc4ab('0xf')][_0x385b04][_0xc4ab('0x13')])){this['mailAccounts'][_0x385b04]['Imap']={};}this['mailAccounts'][_0x385b04][_0xc4ab('0x13')][_0xc4ab('0x14')]='disabled';this[_0xc4ab('0xf')][_0x385b04]['Imap']['messageStatus']='';this[_0xc4ab('0x23')](_0x385b04);}}}};EmailChannel[_0xc4ab('0x18')]['handleImapBox']=function(_0x4618c5,_0x3129bf){if(this['mailAccounts'][_0x4618c5]){this['mailAccounts'][_0x4618c5][_0xc4ab('0x13')][_0xc4ab('0x14')]='connected';this[_0xc4ab('0xf')][_0x4618c5][_0xc4ab('0x13')][_0xc4ab('0x15')]=_0x3129bf['name'];if(_0x3129bf['messages']){this[_0xc4ab('0xf')][_0x4618c5][_0xc4ab('0x13')]['total']=_0x3129bf[_0xc4ab('0x24')][_0xc4ab('0x25')];}return this['emit'](_0x4618c5);}};EmailChannel[_0xc4ab('0x18')]['handleImapEmail']=function(_0x65daca,_0x44059d){logger[_0xc4ab('0xd')]('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x44059d['firstName'],_0x44059d[_0xc4ab('0x26')],_0x44059d[_0xc4ab('0x27')],_0x65daca);if(this[_0xc4ab('0xf')][_0x65daca]){return mailAccount[_0xc4ab('0x28')](_0x65daca,_0x44059d)['then'](function(_0x209b0f){if(_0x209b0f){logger[_0xc4ab('0xd')]('Mail\x20accepted\x20from\x20routing');}})[_0xc4ab('0x29')](function(_0x294160){logger[_0xc4ab('0x21')]('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON['stringify'](_0x294160));});}};EmailChannel[_0xc4ab('0x18')][_0xc4ab('0x20')]=function(_0x5b8d19){if(this['mailAccounts'][_0x5b8d19]&&this['mailAccounts'][_0x5b8d19]['Imap']){if(this[_0xc4ab('0x1c')][this['mailAccounts'][_0x5b8d19]['Imap']['id']]){delete this[_0xc4ab('0x1c')][this[_0xc4ab('0xf')][_0x5b8d19][_0xc4ab('0x13')]['id']];}this['mailAccounts'][_0x5b8d19]['Imap'][_0xc4ab('0x2a')]=moment();this[_0xc4ab('0x23')](_0x5b8d19);}};EmailChannel[_0xc4ab('0x18')][_0xc4ab('0x22')]=function(_0x3aa225,_0x49669a){if(this[_0xc4ab('0xf')][_0x3aa225]){this['mailAccounts'][_0x3aa225][_0xc4ab('0x13')][_0xc4ab('0x14')]=_0xc4ab('0x21');this[_0xc4ab('0xf')][_0x3aa225][_0xc4ab('0x13')]['messageStatus']=_0x49669a;return this[_0xc4ab('0x23')](_0x3aa225);}};EmailChannel[_0xc4ab('0x18')]['sendMail']=function(_0x14d94d,_0x29cd07){return this['smtp']['send'](_0x14d94d,_0x29cd07);};EmailChannel[_0xc4ab('0x18')][_0xc4ab('0x2b')]=function(_0xf8258){var _0x31e394=this;if(this[_0xc4ab('0xf')][_0xf8258['id']]){if(_[_0xc4ab('0x2c')](this['mailAccounts'][_0xf8258['id']][_0xc4ab('0x2d')])){this[_0xc4ab('0xf')][_0xf8258['id']]['Smtp']={};}this[_0xc4ab('0xf')][_0xf8258['id']][_0xc4ab('0x2d')][_0xc4ab('0x2a')]=moment();return new BPromise(function(_0x2a2e1f,_0x105187){return _0x31e394[_0xc4ab('0x10')][_0xc4ab('0x2e')](_0xf8258)['then'](function(_0x1b2610){_0x31e394[_0xc4ab('0xf')][_0xf8258['id']][_0xc4ab('0x2d')][_0xc4ab('0x14')]=_0xc4ab('0x2f');_0x31e394[_0xc4ab('0xf')][_0xf8258['id']][_0xc4ab('0x2d')]['messageStatus']='';_0x31e394[_0xc4ab('0x23')](_0xf8258['id']);_0x2a2e1f(_0x1b2610);})[_0xc4ab('0x29')](function(_0x54a7e1){_0x31e394[_0xc4ab('0xf')][_0xf8258['id']][_0xc4ab('0x2d')]['status']=_0xc4ab('0x21');_0x31e394[_0xc4ab('0xf')][_0xf8258['id']]['Smtp'][_0xc4ab('0x15')]=_0x54a7e1;_0x31e394[_0xc4ab('0x23')](_0xf8258['id']);_0x105187(_0x54a7e1);});});}return this[_0xc4ab('0x10')][_0xc4ab('0x2e')](_0xf8258);};module[_0xc4ab('0x30')]=EmailChannel; \ No newline at end of file diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js index 2eef5ae..729db2b 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 _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 +var _0x0bde=['getAccount','imap','once','ready','bind','handleError','connect','inherits','prototype','authTimeout','isNil','service','authentication','user','password','host','port','tls','autotls','required','getHost','anonymous@xcally.com','openBox','mailbox','handleOpenBox','emit','box','handleCloseBox','search','UNSEEN','handleReadUnseen','length','message','handleFetchMessage','error','handleFetchError','end','handleFetchEnd','closeBox','body','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','stringify','textCode','upperFirst','exports','util','lodash','randomstring','mailparser','simpleParser','iconv','events','EventEmitter','./utils','../../../config/logger','email','INBOX','account'];(function(_0x4cb2ea,_0x2351a3){var _0x5dc239=function(_0x160ff4){while(--_0x160ff4){_0x4cb2ea['push'](_0x4cb2ea['shift']());}};_0x5dc239(++_0x2351a3);}(_0x0bde,0xe7));var _0xe0bd=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x0bde[_0x122ef9];return _0x42fba0;};'use strict';var fs=require('fs');var path=require('path');var util=require(_0xe0bd('0x0'));var Imap=require('imap');var _=require(_0xe0bd('0x1'));var rs=require(_0xe0bd('0x2'));var simpleParser=require(_0xe0bd('0x3'))[_0xe0bd('0x4')];var Iconv=require(_0xe0bd('0x5'))['Iconv'];var EventEmitter=require(_0xe0bd('0x6'))[_0xe0bd('0x7')];var utils=require(_0xe0bd('0x8'));var logger=require(_0xe0bd('0x9'))(_0xe0bd('0xa'));function EmailImap(_0x26393f,_0x217145){this['mailbox']=_0xe0bd('0xb');this[_0xe0bd('0xc')]=this[_0xe0bd('0xd')](_0x26393f,_0x217145);this[_0xe0bd('0xe')]=new Imap(this[_0xe0bd('0xc')]);this[_0xe0bd('0xe')][_0xe0bd('0xf')](_0xe0bd('0x10'),this['handleReady']['bind'](this));this['imap'][_0xe0bd('0xf')]('end',this['handleEnd'][_0xe0bd('0x11')](this));this[_0xe0bd('0xe')]['on']('error',this[_0xe0bd('0x12')]['bind'](this));this[_0xe0bd('0xe')][_0xe0bd('0x13')]();}util[_0xe0bd('0x14')](EmailImap,EventEmitter);EmailImap[_0xe0bd('0x15')][_0xe0bd('0xd')]=function(_0x335f17,_0x342a68){var _0x210f20={'connTimeout':_0x335f17['connTimeout']?_0x335f17['connTimeout']*0x3e8:0x2710,'authTimeout':_0x335f17['authTimeout']?_0x335f17[_0xe0bd('0x16')]*0x3e8:0x1388};if(_[_0xe0bd('0x17')](_0x335f17[_0xe0bd('0x18')])){if(_0x335f17[_0xe0bd('0x19')]){_0x210f20[_0xe0bd('0x1a')]=_0x335f17['user'];_0x210f20['password']=_0x335f17[_0xe0bd('0x1b')];}_0x210f20['host']=_0x335f17[_0xe0bd('0x1c')];_0x210f20[_0xe0bd('0x1d')]=_0x335f17[_0xe0bd('0x1d')]||0x3e1;if(_0x335f17[_0xe0bd('0x1e')]){_0x210f20['tls']=!![];}else{_0x210f20[_0xe0bd('0x1e')]=![];_0x210f20[_0xe0bd('0x1f')]=_0xe0bd('0x20');}}else{_0x210f20['user']=_0x335f17[_0xe0bd('0x1a')];_0x210f20[_0xe0bd('0x1b')]=_0x335f17[_0xe0bd('0x1b')];_0x210f20['host']=utils[_0xe0bd('0x21')](_0x335f17[_0xe0bd('0x18')]);_0x210f20[_0xe0bd('0x1d')]=0x3e1;_0x210f20['tls']=!![];}_0x210f20[_0xe0bd('0xa')]=_0x342a68||_0x335f17['user']||_0xe0bd('0x22');return _0x210f20;};EmailImap[_0xe0bd('0x15')]['handleReady']=function(){this[_0xe0bd('0xe')][_0xe0bd('0x23')](this[_0xe0bd('0x24')],![],this[_0xe0bd('0x25')][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x25')]=function(_0x162356,_0x537708){if(_0x162356){this['handleError'](_0x162356,!![]);}else{this[_0xe0bd('0x26')](_0xe0bd('0x27'),_0x537708);this['readUnseen']();}};EmailImap['prototype'][_0xe0bd('0x28')]=function(_0x303f9d){if(_0x303f9d){this[_0xe0bd('0x12')](_0x303f9d,!![]);}else{this[_0xe0bd('0xe')]['end']();}};EmailImap[_0xe0bd('0x15')]['readUnseen']=function(){this[_0xe0bd('0xe')][_0xe0bd('0x29')]([_0xe0bd('0x2a')],this[_0xe0bd('0x2b')][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x2b')]=function(_0x2d31e9,_0x25d515){if(_0x2d31e9){this[_0xe0bd('0x12')](_0x2d31e9,!![]);}else{if(_0x25d515[_0xe0bd('0x2c')]){try{var _0x12d506=this[_0xe0bd('0xe')]['fetch'](_0x25d515,{'bodies':'','markSeen':!![]});_0x12d506['on'](_0xe0bd('0x2d'),this[_0xe0bd('0x2e')][_0xe0bd('0x11')](this));_0x12d506[_0xe0bd('0xf')](_0xe0bd('0x2f'),this[_0xe0bd('0x30')]['bind'](this));_0x12d506['once'](_0xe0bd('0x31'),this[_0xe0bd('0x32')][_0xe0bd('0x11')](this));}catch(_0x20030f){logger[_0xe0bd('0x2f')](_0x20030f);}}else{this[_0xe0bd('0xe')][_0xe0bd('0x33')](!![],this['handleCloseBox'][_0xe0bd('0x11')](this));}}};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x2e')]=function(_0x4391de,_0x320352){_0x4391de['on'](_0xe0bd('0x34'),this['handleMessageBody'][_0xe0bd('0x11')](this));_0x4391de[_0xe0bd('0xf')](_0xe0bd('0x35'),this[_0xe0bd('0x36')][_0xe0bd('0x11')](this));_0x4391de['once']('end',this[_0xe0bd('0x37')][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')]['handleMessageBody']=function(_0x8a331,_0x4eefae){simpleParser(_0x8a331,{'Iconv':Iconv},this['handleSimpleParser'][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')]['handleMessageAttributes']=function(_0x5d377b){};EmailImap['prototype'][_0xe0bd('0x37')]=function(){};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x38')]=function(_0x5d2aff,_0x20827d){if(_0x5d2aff){logger[_0xe0bd('0x2f')](_0x5d2aff);}else{var _0x1e6823=this;utils['parser'](this['account'],_0x20827d,function(_0x307cfa){_0x1e6823['emit'](_0xe0bd('0xa'),_0x307cfa);});}};EmailImap[_0xe0bd('0x15')]['handleFetchEnd']=function(){this[_0xe0bd('0xe')][_0xe0bd('0x33')](!![],this[_0xe0bd('0x28')][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x30')]=function(_0x39501e){this['handleError'](_0x39501e);this[_0xe0bd('0xe')][_0xe0bd('0x33')](!![],this[_0xe0bd('0x28')][_0xe0bd('0x11')](this));};EmailImap[_0xe0bd('0x15')]['handleEnd']=function(){this['emit']('end');};EmailImap[_0xe0bd('0x15')][_0xe0bd('0x12')]=function(_0x15de49,_0x32ed4f){logger['error']('handleError',this[_0xe0bd('0xc')][_0xe0bd('0xa')],JSON[_0xe0bd('0x39')](_0x15de49));var _0x300c4d='';if(_0x15de49){if(_0x15de49[_0xe0bd('0x3a')]){_0x300c4d=_0x15de49[_0xe0bd('0x3a')];}else{for(var _0x3d218d in _0x15de49){if(_0x15de49['hasOwnProperty'](_0x3d218d)){_0x300c4d+=_[_0xe0bd('0x3b')](_0x3d218d)+':\x20'+_0x15de49[_0x3d218d]+'\x0a';}}}}if(_0x32ed4f){this['imap'][_0xe0bd('0x31')]();}else{this[_0xe0bd('0x26')]('error',_0x300c4d);this['emit'](_0xe0bd('0x31'));}};module[_0xe0bd('0x3c')]=EmailImap; \ No newline at end of file diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js index c015f15..c0712b2 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 _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 +var _0xc787=['prototype','send','createTransport','use','compile','sendMail','toString','verify','Not\x20verifired','exports','bluebird','nodemailer-plugin-inline-base64'];(function(_0x46a5de,_0x21302b){var _0x4f3646=function(_0x233c7a){while(--_0x233c7a){_0x46a5de['push'](_0x46a5de['shift']());}};_0x4f3646(++_0x21302b);}(_0xc787,0x17e));var _0x7c78=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0xc787[_0x1a36a5];return _0x746243;};'use strict';var nodemailer=require('nodemailer');var BPromise=require(_0x7c78('0x0'));var inlineBase64=require(_0x7c78('0x1'));function EmailSmtp(){}EmailSmtp[_0x7c78('0x2')][_0x7c78('0x3')]=function(_0x5dc55a,_0x101058){return new BPromise(function(_0x43a9bd,_0x353cc5){var _0x162ed4=nodemailer[_0x7c78('0x4')](_0x5dc55a);_0x162ed4[_0x7c78('0x5')](_0x7c78('0x6'),inlineBase64());_0x162ed4[_0x7c78('0x7')](_0x101058,function(_0x2b86b8,_0x11fcee){if(_0x2b86b8){_0x353cc5(_0x2b86b8[_0x7c78('0x8')]());}else{_0x43a9bd(_0x11fcee);}});});};EmailSmtp[_0x7c78('0x2')][_0x7c78('0x9')]=function(_0x5ec308){return new BPromise(function(_0x53af8f,_0x2f6335){var _0x2ab43b=nodemailer[_0x7c78('0x4')](_0x5ec308);_0x2ab43b[_0x7c78('0x9')](function(_0x45cf81,_0x3e284e){if(_0x45cf81){_0x2f6335(_0x45cf81[_0x7c78('0x8')]());}else{if(_0x3e284e){_0x53af8f(_0x3e284e);}else{_0x2f6335(_0x7c78('0xa'));}}});});};module[_0x7c78('0xb')]=EmailSmtp; \ No newline at end of file diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index 0b42312..35811d7 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 _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')](/\x20[Attachment:\x20','body','textAsHtml','Empty\x20message

','Attachments','Data','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','imap-mail.outlook.com','outlook.office365.com','127.0.0.1','moment','randomstring','path','util'];(function(_0xe0e1f7,_0x4560d3){var _0x3fd721=function(_0x22fb99){while(--_0x22fb99){_0xe0e1f7['push'](_0xe0e1f7['shift']());}};_0x3fd721(++_0x4560d3);}(_0x7d25,0x8a));var _0x57d2=function(_0x8a969d,_0x339d9f){_0x8a969d=_0x8a969d-0x0;var _0x1d8dc7=_0x7d25[_0x8a969d];return _0x1d8dc7;};'use strict';var _=require('lodash');var moment=require(_0x57d2('0x0'));var random=require(_0x57d2('0x1'));var fs=require('fs');var path=require(_0x57d2('0x2'));var util=require(_0x57d2('0x3'));var tnef=require(_0x57d2('0x4'));var logger=require(_0x57d2('0x5'))(_0x57d2('0x6'));var config=require('../../../config/environment');function getAddress(_0x5337ca){var _0x52a4f4=_['head'](_0x5337ca[_0x57d2('0x7')]);return _0x52a4f4&&_0x52a4f4['address']?_0x52a4f4[_0x57d2('0x8')]:_0x57d2('0x9')+random[_0x57d2('0xa')](0x6)+'@xcally.com';}function getFirstName(_0x49e3e5){var _0xeb8b91=_['head'](_0x49e3e5[_0x57d2('0x7')]);if(_0xeb8b91&&_0xeb8b91[_0x57d2('0xb')]){var _0xa04872=_0xeb8b91['name'][_0x57d2('0xc')](/\s+/);return _0xa04872[_0x57d2('0xd')]?_0xa04872[_0x57d2('0xe')](0x0,-0x1)[_0x57d2('0xf')]('\x20'):_0xeb8b91[_0x57d2('0xb')];}return _0x57d2('0x10');}function getLastName(_0xe8357c){var _0x197426=_[_0x57d2('0x11')](_0xe8357c[_0x57d2('0x7')]);if(_0x197426&&_0x197426[_0x57d2('0xb')]){var _0x3181ad=_0x197426[_0x57d2('0xb')][_0x57d2('0xc')](/\s+/);return _0x3181ad[_0x57d2('0xd')]>0x1?_0x3181ad[_0x57d2('0x12')]():'';}return'';}function getMails(_0x5382d9,_0x5b940e){var _0x6fad35='';for(var _0x148ef3=0x0;_0x148ef3<_0x5b940e['value'][_0x57d2('0xd')];_0x148ef3+=0x1){if(_0x5b940e[_0x57d2('0x7')][_0x148ef3]['address']!==_0x5382d9){if(!_[_0x57d2('0x13')](_0x6fad35)){_0x6fad35+=',';}_0x6fad35+=_0x5b940e['value'][_0x148ef3][_0x57d2('0xb')]||_0x5b940e['value'][_0x148ef3][_0x57d2('0x8')]||'';_0x6fad35+='\x20<';_0x6fad35+=_0x5b940e[_0x57d2('0x7')][_0x148ef3][_0x57d2('0x8')]?_0x5b940e['value'][_0x148ef3]['address']:_0x57d2('0x9')+random[_0x57d2('0xa')](0x6)+_0x57d2('0x14');_0x6fad35+='>';}}return _0x6fad35;}function parseEmail(_0x2ca71d,_0x5b1b9d,_0x1cbe4a){if(_0x5b1b9d[_0x57d2('0x15')]){var _0x55191e=/)<[^<]*)*<\/script>/gi;while(_0x55191e['test'](_0x5b1b9d[_0x57d2('0x15')])){_0x5b1b9d[_0x57d2('0x15')]=_0x5b1b9d[_0x57d2('0x15')][_0x57d2('0x16')](_0x55191e,'');}if(_0x5b1b9d[_0x57d2('0x15')][_0x57d2('0x17')](_0x57d2('0x18'))){var _0x31d2cf=[];_0x5b1b9d[_0x57d2('0x19')][_0x57d2('0x1a')](_0x46a4d1=>{_0x31d2cf[_0x57d2('0x1b')](_0x46a4d1[_0x57d2('0x1c')]);});var _0x473df2=/]+>/g;var _0x5327ea=/src=\"data:image\/([a-zA-Z]*);base64,([^\"]*)\"/g;var _0x424ddc=_0x5b1b9d[_0x57d2('0x15')][_0x57d2('0x16')](_0x5327ea,_0x57d2('0x1d'));var _0x4363b3=_0x424ddc['replace'](_0x473df2,_0x57d2('0x1e'));for(let _0x608b10=0x0;_0x608b10<_0x31d2cf[_0x57d2('0xd')];_0x608b10++){var _0x16ee2f=_0x4363b3[_0x57d2('0x16')](_0x57d2('0x1e'),_0x57d2('0x1f')+_0x31d2cf[_0x608b10]+'\x20]');_0x4363b3=_0x16ee2f;}_0x5b1b9d[_0x57d2('0x15')]=_0x4363b3;}_0x1cbe4a[_0x57d2('0x20')]=_0x5b1b9d[_0x57d2('0x15')];}else{_0x1cbe4a[_0x57d2('0x20')]=_0x5b1b9d[_0x57d2('0x21')];}if(_0x1cbe4a[_0x57d2('0x20')]){_0x1cbe4a[_0x57d2('0x20')]=_0x1cbe4a[_0x57d2('0x20')][_0x57d2('0x16')](/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 +var _0xf74e=['exports','lodash','moment','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','unknown','chatStatusTime','chatCapacity','chatCurrentCapacity','mailStatus','mailStatusTime','mailCapacity','mailCurrentCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsStatusTime','smsCapacity','smsCurrentCapacity','whatsappStatus','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','updateRealtime','prototype','CurrentCapacity','Capacity','maxcapacity','idle','mail','chat','openchannel','fax','whatsapp','length','StatusTime','toNumber','format','busy','stringify','md5','user:save'];(function(_0x285f28,_0x41cc10){var _0x4259f5=function(_0x3fa6d1){while(--_0x3fa6d1){_0x285f28['push'](_0x285f28['shift']());}};_0x4259f5(++_0x41cc10);}(_0xf74e,0x19e));var _0xef74=function(_0x21ec55,_0x538170){_0x21ec55=_0x21ec55-0x0;var _0xa3aace=_0xf74e[_0x21ec55];return _0xa3aace;};'use strict';var _=require(_0xef74('0x0'));var moment=require(_0xef74('0x1'));var md5=require('md5');var Redis=require('ioredis');var config=require(_0xef74('0x2'));config[_0xef74('0x3')]=_[_0xef74('0x4')](config[_0xef74('0x3')],{'host':_0xef74('0x5'),'port':0x18eb});var io=require(_0xef74('0x6'))(new Redis(config[_0xef74('0x3')]));function Agent(_0x4d719a){this['id']=_0x4d719a['id']||0x0;this[_0xef74('0x7')]=_0x4d719a[_0xef74('0x7')]||'';this[_0xef74('0x8')]=_0x4d719a[_0xef74('0x8')]||!![];this['voicePause']=_0x4d719a[_0xef74('0x9')]||![];this['chatPause']=_0x4d719a[_0xef74('0xa')]||![];this[_0xef74('0xb')]=_0x4d719a[_0xef74('0xb')]||![];this[_0xef74('0xc')]=_0x4d719a[_0xef74('0xc')]||![];this[_0xef74('0xd')]=_0x4d719a[_0xef74('0xd')]||![];this[_0xef74('0xe')]=_0x4d719a['openchannelPause']||![];this[_0xef74('0xf')]=_0xef74('0x10');this[_0xef74('0x11')]=0x0;this[_0xef74('0x12')]=_0x4d719a[_0xef74('0x12')]||0x0;this[_0xef74('0x13')]=0x0;this[_0xef74('0x14')]='unknown';this[_0xef74('0x15')]=0x0;this[_0xef74('0x16')]=_0x4d719a[_0xef74('0x16')]||0x0;this[_0xef74('0x17')]=0x0;this[_0xef74('0x18')]='unknown';this[_0xef74('0x19')]=0x0;this[_0xef74('0x1a')]=_0x4d719a[_0xef74('0x1a')]||0x0;this[_0xef74('0x1b')]=0x0;this[_0xef74('0x1c')]=_0xef74('0x10');this[_0xef74('0x1d')]=0x0;this[_0xef74('0x1e')]=_0x4d719a[_0xef74('0x1e')]||0x0;this[_0xef74('0x1f')]=0x0;this[_0xef74('0x20')]='unknown';this[_0xef74('0x21')]=0x0;this[_0xef74('0x22')]=_0x4d719a[_0xef74('0x22')]||0x0;this[_0xef74('0x23')]=0x0;this[_0xef74('0x24')]=_0xef74('0x10');this[_0xef74('0x25')]=0x0;this[_0xef74('0x26')]=_0x4d719a[_0xef74('0x26')]||0x0;this['openchannelCurrentCapacity']=0x0;this['busy']=![];this['busyQueue']=undefined;this['md5']='';this[_0xef74('0x27')]();}Agent[_0xef74('0x28')]['getChannelStatus']=function(_0x267b4b){if(this[_0x267b4b+_0xef74('0x29')]>0x0){if(this[_0x267b4b+_0xef74('0x2a')]>0x0&&this[_0x267b4b+_0xef74('0x29')]>=this[_0x267b4b+_0xef74('0x2a')]){return _0xef74('0x2b');}else{return'working';}}else{return _0xef74('0x2c');}};Agent[_0xef74('0x28')][_0xef74('0x27')]=function(){var _0x2da314=[_0xef74('0x2d'),_0xef74('0x2e'),_0xef74('0x2f'),_0xef74('0x30'),'sms',_0xef74('0x31')];for(var _0x5cc412=0x0;_0x5cc412<_0x2da314[_0xef74('0x32')];_0x5cc412+=0x1){var _0x5e2662=this['getChannelStatus'](_0x2da314[_0x5cc412]);if(this[_0x2da314[_0x5cc412]+'Status']!==_0x5e2662){this[_0x2da314[_0x5cc412]+_0xef74('0x33')]=_[_0xef74('0x34')](moment()[_0xef74('0x35')]('x'));}this[_0x2da314[_0x5cc412]+'Status']=_0x5e2662;}var _0x4bb603={'id':this['id'],'name':this[_0xef74('0x7')],'online':this[_0xef74('0x8')],'voicePause':this[_0xef74('0x9')],'chatPause':this[_0xef74('0xa')],'mailPause':this[_0xef74('0xb')],'smsPause':this[_0xef74('0xd')],'faxPause':this[_0xef74('0xc')],'openchannelPause':this['openchannelPause'],'chatStatus':this[_0xef74('0xf')],'chatStatusTime':this['chatStatusTime'],'chatCapacity':this[_0xef74('0x12')],'chatCurrentCapacity':this[_0xef74('0x13')],'mailStatus':this[_0xef74('0x14')],'mailStatusTime':this[_0xef74('0x15')],'mailCapacity':this[_0xef74('0x16')],'mailCurrentCapacity':this[_0xef74('0x17')],'faxStatus':this[_0xef74('0x18')],'faxStatusTime':this[_0xef74('0x19')],'faxCapacity':this[_0xef74('0x1a')],'faxCurrentCapacity':this[_0xef74('0x1b')],'smsStatus':this[_0xef74('0x1c')],'smsStatusTime':this['smsStatusTime'],'smsCapacity':this[_0xef74('0x1e')],'smsCurrentCapacity':this[_0xef74('0x1f')],'whatsappStatus':this[_0xef74('0x20')],'whatsappStatusTime':this[_0xef74('0x21')],'whatsappCapacity':this[_0xef74('0x22')],'whatsappCurrentCapacity':this[_0xef74('0x23')],'openchannelStatus':this[_0xef74('0x24')],'openchannelStatusTime':this['openchannelStatusTime'],'openchannelCapacity':this['openchannelCapacity'],'openchannelCurrentCapacity':this['openchannelCurrentCapacity'],'busy':this[_0xef74('0x36')],'busyQueue':this['busyQueue']};var _0x31da03=md5(JSON[_0xef74('0x37')](_0x4bb603));if(this[_0xef74('0x38')]!==_0x31da03){this[_0xef74('0x38')]=_0x31da03;io['emit'](_0xef74('0x39'),_0x4bb603);}};module[_0xef74('0x3a')]=Agent; \ No newline at end of file diff --git a/server/services/routing/model/chatQueue.js b/server/services/routing/model/chatQueue.js index 06c7983..d720d27 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 _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 +var _0x51d6=['ioredis','redis','defaults','localhost','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','_rr','map','prototype','loggedIn','paused','length','online','chatPause','available','stringify','format','chat:queue:%s','emit','chat_queue:save','lodash','md5','util'];(function(_0x4154a6,_0x2c0b8e){var _0x3b2786=function(_0x2f5936){while(--_0x2f5936){_0x4154a6['push'](_0x4154a6['shift']());}};_0x3b2786(++_0x2c0b8e);}(_0x51d6,0xe5));var _0x651d=function(_0x3248b0,_0x459dff){_0x3248b0=_0x3248b0-0x0;var _0x154143=_0x51d6[_0x3248b0];return _0x154143;};'use strict';var _=require(_0x651d('0x0'));var md5=require(_0x651d('0x1'));var util=require(_0x651d('0x2'));var Redis=require(_0x651d('0x3'));var config=require('../../../config/environment');config[_0x651d('0x4')]=_[_0x651d('0x5')](config['redis'],{'host':_0x651d('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function ChatQueue(_0x92057b){this['id']=_0x92057b['id']||0x0;this[_0x651d('0x7')]=_0x92057b[_0x651d('0x7')]||'';this[_0x651d('0x8')]=_0x92057b[_0x651d('0x8')]||0xa;this[_0x651d('0x9')]=_0x92057b[_0x651d('0x9')]||'beepall';this[_0x651d('0xa')]=_0x92057b[_0x651d('0xa')];this[_0x651d('0xb')]={};this[_0x651d('0xc')]=0x0;this[_0x651d('0x1')]='';this[_0x651d('0xd')]();this[_0x651d('0xe')]();}ChatQueue['prototype'][_0x651d('0xd')]=function(){var _0x2b4861=this[_0x651d('0xb')][_0x651d('0xf')];this[_0x651d('0xb')]=_[_0x651d('0x10')](this[_0x651d('0xa')],'id');this[_0x651d('0xb')][_0x651d('0xf')]=_0x2b4861;};ChatQueue[_0x651d('0x11')][_0x651d('0xe')]=function(){this[_0x651d('0x12')]=0x0;this[_0x651d('0x13')]=0x0;for(var _0xa823c6=0x0;_0xa823c6=0x0?this['available']:0x0;var _0x56d464={'id':this['id'],'available':this[_0x651d('0x17')],'loggedIn':this[_0x651d('0x12')],'name':this[_0x651d('0x7')],'paused':this[_0x651d('0x13')],'waiting':this['waiting']};var _0x14223f=md5(JSON[_0x651d('0x18')](_0x56d464));if(this[_0x651d('0x1')]!==_0x14223f){this[_0x651d('0x1')]=_0x14223f;io['to'](util[_0x651d('0x19')](_0x651d('0x1a'),_0x56d464[_0x651d('0x7')]))[_0x651d('0x1b')](_0x651d('0x1c'),_0x56d464);}};module['exports']=ChatQueue; \ No newline at end of file diff --git a/server/services/routing/model/faxQueue.js b/server/services/routing/model/faxQueue.js index 6a31eb1..6d94eab 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 _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 +var _0xaf68=['exports','md5','util','ioredis','redis','defaults','localhost','socket.io-emitter','name','timeout','beepall','Agents','updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map','loggedIn','online','faxPause','available','paused','waiting','stringify','fax:queue:%s','emit','fax_queue:save'];(function(_0x5c181b,_0x4151b8){var _0xf459d3=function(_0x2097c4){while(--_0x2097c4){_0x5c181b['push'](_0x5c181b['shift']());}};_0xf459d3(++_0x4151b8);}(_0xaf68,0x71));var _0x8af6=function(_0x2d7356,_0x404459){_0x2d7356=_0x2d7356-0x0;var _0x1ae396=_0xaf68[_0x2d7356];return _0x1ae396;};'use strict';var _=require('lodash');var md5=require(_0x8af6('0x0'));var util=require(_0x8af6('0x1'));var Redis=require(_0x8af6('0x2'));var config=require('../../../config/environment');config[_0x8af6('0x3')]=_[_0x8af6('0x4')](config[_0x8af6('0x3')],{'host':_0x8af6('0x5'),'port':0x18eb});var io=require(_0x8af6('0x6'))(new Redis(config['redis']));function FaxQueue(_0x4401ca){this['id']=_0x4401ca['id']||0x0;this[_0x8af6('0x7')]=_0x4401ca['name']||'';this['timeout']=_0x4401ca[_0x8af6('0x8')]||0xa;this['strategy']=_0x4401ca['strategy']||_0x8af6('0x9');this['Agents']=_0x4401ca[_0x8af6('0xa')];this['mapAgentsId']={};this['waiting']=0x0;this[_0x8af6('0x0')]='';this[_0x8af6('0xb')]();this[_0x8af6('0xc')]();}FaxQueue[_0x8af6('0xd')]['updateRouting']=function(){var _0x43f907=this[_0x8af6('0xe')][_0x8af6('0xf')];this[_0x8af6('0xe')]=_[_0x8af6('0x10')](this['Agents'],'id');this[_0x8af6('0xe')][_0x8af6('0xf')]=_0x43f907;};FaxQueue[_0x8af6('0xd')]['updateRealtime']=function(){this[_0x8af6('0x11')]=0x0;this['paused']=0x0;for(var _0x882607=0x0;_0x882607=0x0?this['available']:0x0;var _0x3a1601={'id':this['id'],'available':this[_0x8af6('0x14')],'loggedIn':this[_0x8af6('0x11')],'name':this[_0x8af6('0x7')],'paused':this[_0x8af6('0x15')],'waiting':this[_0x8af6('0x16')]};var _0x108900=md5(JSON[_0x8af6('0x17')](_0x3a1601));if(this[_0x8af6('0x0')]!==_0x108900){this[_0x8af6('0x0')]=_0x108900;io['to'](util['format'](_0x8af6('0x18'),_0x3a1601['name']))[_0x8af6('0x19')](_0x8af6('0x1a'),_0x3a1601);}};module[_0x8af6('0x1b')]=FaxQueue; \ No newline at end of file diff --git a/server/services/routing/model/interval.js b/server/services/routing/model/interval.js index cc2885e..a08386e 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 _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 +var _0xa747=['name','Intervals'];(function(_0x66bacf,_0x16051f){var _0x379c05=function(_0xf409ca){while(--_0xf409ca){_0x66bacf['push'](_0x66bacf['shift']());}};_0x379c05(++_0x16051f);}(_0xa747,0x16c));var _0x7a74=function(_0x255cba,_0x119697){_0x255cba=_0x255cba-0x0;var _0x515212=_0xa747[_0x255cba];return _0x515212;};'use strict';function Interval(_0x5e1b0b){this['id']=_0x5e1b0b['id']||0x0;this[_0x7a74('0x0')]=_0x5e1b0b[_0x7a74('0x0')]||'';this[_0x7a74('0x1')]=_0x5e1b0b['Intervals']||{};}module['exports']=Interval; \ No newline at end of file diff --git a/server/services/routing/model/mailQueue.js b/server/services/routing/model/mailQueue.js index 39a8816..136bef5 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 _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 +var _0x9d60=['mapAgentsId','updateRouting','updateRealtime','prototype','_rr','map','paused','length','online','loggedIn','mailPause','available','waiting','stringify','format','emit','mail_queue:save','lodash','md5','util','ioredis','../../../config/environment','redis','defaults','name','timeout','strategy','beepall','Agents'];(function(_0x2dea24,_0x2fc021){var _0x309d58=function(_0x2eb89f){while(--_0x2eb89f){_0x2dea24['push'](_0x2dea24['shift']());}};_0x309d58(++_0x2fc021);}(_0x9d60,0x1c4));var _0x09d6=function(_0x4ce028,_0x526d4b){_0x4ce028=_0x4ce028-0x0;var _0x583d0c=_0x9d60[_0x4ce028];return _0x583d0c;};'use strict';var _=require(_0x09d6('0x0'));var md5=require(_0x09d6('0x1'));var util=require(_0x09d6('0x2'));var Redis=require(_0x09d6('0x3'));var config=require(_0x09d6('0x4'));config[_0x09d6('0x5')]=_[_0x09d6('0x6')](config[_0x09d6('0x5')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x09d6('0x5')]));function MailQueue(_0x4cb6db){this['id']=_0x4cb6db['id']||0x0;this['name']=_0x4cb6db[_0x09d6('0x7')]||'';this[_0x09d6('0x8')]=_0x4cb6db[_0x09d6('0x8')]||0xa;this['strategy']=_0x4cb6db[_0x09d6('0x9')]||_0x09d6('0xa');this[_0x09d6('0xb')]=_0x4cb6db['Agents'];this[_0x09d6('0xc')]={};this['waiting']=0x0;this[_0x09d6('0x1')]='';this[_0x09d6('0xd')]();this[_0x09d6('0xe')]();}MailQueue[_0x09d6('0xf')][_0x09d6('0xd')]=function(){var _0x35c744=this[_0x09d6('0xc')][_0x09d6('0x10')];this[_0x09d6('0xc')]=_[_0x09d6('0x11')](this[_0x09d6('0xb')],'id');this['mapAgentsId']['_rr']=_0x35c744;};MailQueue[_0x09d6('0xf')][_0x09d6('0xe')]=function(){this['loggedIn']=0x0;this[_0x09d6('0x12')]=0x0;for(var _0x58951c=0x0;_0x58951c=0x0?this['available']:0x0;var _0x3b2a73={'id':this['id'],'available':this[_0x09d6('0x17')],'loggedIn':this['loggedIn'],'name':this[_0x09d6('0x7')],'paused':this[_0x09d6('0x12')],'waiting':this[_0x09d6('0x18')]};var _0x39777d=md5(JSON[_0x09d6('0x19')](_0x3b2a73));if(this[_0x09d6('0x1')]!==_0x39777d){this['md5']=_0x39777d;io['to'](util[_0x09d6('0x1a')]('mail:queue:%s',_0x3b2a73['name']))[_0x09d6('0x1b')](_0x09d6('0x1c'),_0x3b2a73);}};module['exports']=MailQueue; \ No newline at end of file diff --git a/server/services/routing/model/openchannelQueue.js b/server/services/routing/model/openchannelQueue.js index 165089c..d4804b5 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 _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 +var _0x1261=['available','stringify','openchannel:queue:%s','openchannel_queue:save','exports','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','waiting','updateRouting','prototype','mapAgentsId','map','_rr','updateRealtime','loggedIn','paused','length','online'];(function(_0x2c2980,_0x34282a){var _0x2a20a9=function(_0x537b18){while(--_0x537b18){_0x2c2980['push'](_0x2c2980['shift']());}};_0x2a20a9(++_0x34282a);}(_0x1261,0x144));var _0x1126=function(_0x50aa2e,_0xfbd6f0){_0x50aa2e=_0x50aa2e-0x0;var _0x5e07f0=_0x1261[_0x50aa2e];return _0x5e07f0;};'use strict';var _=require('lodash');var md5=require(_0x1126('0x0'));var util=require(_0x1126('0x1'));var Redis=require(_0x1126('0x2'));var config=require(_0x1126('0x3'));config[_0x1126('0x4')]=_[_0x1126('0x5')](config[_0x1126('0x4')],{'host':_0x1126('0x6'),'port':0x18eb});var io=require(_0x1126('0x7'))(new Redis(config[_0x1126('0x4')]));function OpenchannelQueue(_0x5a2189){this['id']=_0x5a2189['id']||0x0;this['name']=_0x5a2189[_0x1126('0x8')]||'';this[_0x1126('0x9')]=_0x5a2189['timeout']||0xa;this[_0x1126('0xa')]=_0x5a2189[_0x1126('0xa')]||_0x1126('0xb');this[_0x1126('0xc')]=_0x5a2189[_0x1126('0xc')];this['mapAgentsId']={};this[_0x1126('0xd')]=0x0;this[_0x1126('0x0')]='';this[_0x1126('0xe')]();this['updateRealtime']();}OpenchannelQueue[_0x1126('0xf')]['updateRouting']=function(){var _0x52ef15=this[_0x1126('0x10')]['_rr'];this[_0x1126('0x10')]=_[_0x1126('0x11')](this[_0x1126('0xc')],'id');this[_0x1126('0x10')][_0x1126('0x12')]=_0x52ef15;};OpenchannelQueue[_0x1126('0xf')][_0x1126('0x13')]=function(){this[_0x1126('0x14')]=0x0;this[_0x1126('0x15')]=0x0;for(var _0x53a8f0=0x0;_0x53a8f0=0x0?this['available']:0x0;var _0x4d2b38={'id':this['id'],'available':this[_0x1126('0x18')],'loggedIn':this[_0x1126('0x14')],'name':this['name'],'paused':this['paused'],'waiting':this[_0x1126('0xd')]};var _0x58b109=md5(JSON[_0x1126('0x19')](_0x4d2b38));if(this[_0x1126('0x0')]!==_0x58b109){this[_0x1126('0x0')]=_0x58b109;io['to'](util['format'](_0x1126('0x1a'),_0x4d2b38['name']))['emit'](_0x1126('0x1b'),_0x4d2b38);}};module[_0x1126('0x1c')]=OpenchannelQueue; \ No newline at end of file diff --git a/server/services/routing/model/smsQueue.js b/server/services/routing/model/smsQueue.js index 3a99993..806b0a8 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 _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 +var _0xf021=['loggedIn','smsPause','available','paused','waiting','format','emit','sms_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','updateRouting','updateRealtime','prototype','_rr','mapAgentsId','map','length','online'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf021,0x18f));var _0x1f02=function(_0x479a35,_0x2526b2){_0x479a35=_0x479a35-0x0;var _0x24fea9=_0xf021[_0x479a35];return _0x24fea9;};'use strict';var _=require(_0x1f02('0x0'));var md5=require(_0x1f02('0x1'));var util=require(_0x1f02('0x2'));var Redis=require(_0x1f02('0x3'));var config=require(_0x1f02('0x4'));config['redis']=_[_0x1f02('0x5')](config['redis'],{'host':_0x1f02('0x6'),'port':0x18eb});var io=require(_0x1f02('0x7'))(new Redis(config['redis']));function SmsQueue(_0x532e6d){this['id']=_0x532e6d['id']||0x0;this[_0x1f02('0x8')]=_0x532e6d['name']||'';this[_0x1f02('0x9')]=_0x532e6d[_0x1f02('0x9')]||0xa;this[_0x1f02('0xa')]=_0x532e6d[_0x1f02('0xa')]||_0x1f02('0xb');this['Agents']=_0x532e6d[_0x1f02('0xc')];this['mapAgentsId']={};this['waiting']=0x0;this['md5']='';this[_0x1f02('0xd')]();this[_0x1f02('0xe')]();}SmsQueue[_0x1f02('0xf')][_0x1f02('0xd')]=function(){var _0x3c2b15=this['mapAgentsId'][_0x1f02('0x10')];this[_0x1f02('0x11')]=_[_0x1f02('0x12')](this['Agents'],'id');this[_0x1f02('0x11')][_0x1f02('0x10')]=_0x3c2b15;};SmsQueue[_0x1f02('0xf')]['updateRealtime']=function(){this['loggedIn']=0x0;this['paused']=0x0;for(var _0x11ba7e=0x0;_0x11ba7e=0x0?this[_0x1f02('0x17')]:0x0;var _0x2cd7db={'id':this['id'],'available':this[_0x1f02('0x17')],'loggedIn':this['loggedIn'],'name':this[_0x1f02('0x8')],'paused':this[_0x1f02('0x18')],'waiting':this[_0x1f02('0x19')]};var _0x23dfe4=md5(JSON['stringify'](_0x2cd7db));if(this['md5']!==_0x23dfe4){this[_0x1f02('0x1')]=_0x23dfe4;io['to'](util[_0x1f02('0x1a')]('sms:queue:%s',_0x2cd7db['name']))[_0x1f02('0x1b')](_0x1f02('0x1c'),_0x2cd7db);}};module[_0x1f02('0x1d')]=SmsQueue; \ No newline at end of file diff --git a/server/services/routing/model/whatsappQueue.js b/server/services/routing/model/whatsappQueue.js index c7fcd4e..0c2f084 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 _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 +var _0x5dde=['lodash','md5','util','ioredis','../../../config/environment','redis','localhost','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','_rr','prototype','loggedIn','paused','length','whatsappPause','available','whatsapp:queue:%s','whatsapp_queue:save'];(function(_0x4a3898,_0x4c9853){var _0x25ceb0=function(_0x528b6d){while(--_0x528b6d){_0x4a3898['push'](_0x4a3898['shift']());}};_0x25ceb0(++_0x4c9853);}(_0x5dde,0x1e0));var _0xe5dd=function(_0x2e752b,_0x5cb17d){_0x2e752b=_0x2e752b-0x0;var _0x40a0b4=_0x5dde[_0x2e752b];return _0x40a0b4;};'use strict';var _=require(_0xe5dd('0x0'));var md5=require(_0xe5dd('0x1'));var util=require(_0xe5dd('0x2'));var Redis=require(_0xe5dd('0x3'));var config=require(_0xe5dd('0x4'));config[_0xe5dd('0x5')]=_['defaults'](config[_0xe5dd('0x5')],{'host':_0xe5dd('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xe5dd('0x5')]));function WhatsappQueue(_0x40e64b){this['id']=_0x40e64b['id']||0x0;this[_0xe5dd('0x7')]=_0x40e64b[_0xe5dd('0x7')]||'';this[_0xe5dd('0x8')]=_0x40e64b[_0xe5dd('0x8')]||0xa;this[_0xe5dd('0x9')]=_0x40e64b[_0xe5dd('0x9')]||'beepall';this[_0xe5dd('0xa')]=_0x40e64b[_0xe5dd('0xa')];this[_0xe5dd('0xb')]={};this[_0xe5dd('0xc')]=0x0;this[_0xe5dd('0x1')]='';this[_0xe5dd('0xd')]();this[_0xe5dd('0xe')]();}WhatsappQueue['prototype'][_0xe5dd('0xd')]=function(){var _0x103e91=this[_0xe5dd('0xb')][_0xe5dd('0xf')];this['mapAgentsId']=_['map'](this[_0xe5dd('0xa')],'id');this['mapAgentsId'][_0xe5dd('0xf')]=_0x103e91;};WhatsappQueue[_0xe5dd('0x10')][_0xe5dd('0xe')]=function(){this[_0xe5dd('0x11')]=0x0;this[_0xe5dd('0x12')]=0x0;for(var _0x1d0649=0x0;_0x1d0649=0x0?this[_0xe5dd('0x15')]:0x0;var _0x4101ef={'id':this['id'],'available':this['available'],'loggedIn':this[_0xe5dd('0x11')],'name':this['name'],'paused':this[_0xe5dd('0x12')],'waiting':this['waiting']};var _0x259839=md5(JSON['stringify'](_0x4101ef));if(this[_0xe5dd('0x1')]!==_0x259839){this[_0xe5dd('0x1')]=_0x259839;io['to'](util['format'](_0xe5dd('0x16'),_0x4101ef[_0xe5dd('0x7')]))['emit'](_0xe5dd('0x17'),_0x4101ef);}};module['exports']=WhatsappQueue; \ No newline at end of file diff --git a/server/services/routing/realtime/index.js b/server/services/routing/realtime/index.js index fb75f5b..e4c1cc6 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 _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 +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(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9df060,_0x253d33){_0x9df060=_0x9df060-0x0;var _0x338dfe=_0xa9e0[_0x9df060];return _0x338dfe;};'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 diff --git a/server/services/routing/rpc/chatInteraction.js b/server/services/routing/rpc/chatInteraction.js index 7d48e28..5bc2ada 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 _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 +var _0x80c4=['addTags','AddTagsToChatInteraction','Request','updateChatInteraction'];(function(_0x5abee1,_0x4bba73){var _0x7ec94f=function(_0x1639d3){while(--_0x1639d3){_0x5abee1['push'](_0x5abee1['shift']());}};_0x7ec94f(++_0x4bba73);}(_0x80c4,0x10a));var _0x480c=function(_0x4b5c83,_0x347c6b){_0x4b5c83=_0x4b5c83-0x0;var _0xb45a7c=_0x80c4[_0x4b5c83];return _0xb45a7c;};'use strict';var client=require('../client');exports['update']=function(_0x21f1f2,_0x1f9d3d){return client[_0x480c('0x0')]('UpdateChatInteraction',{'body':_0x1f9d3d,'options':{'where':{'id':_0x21f1f2}},'log':_0x480c('0x1')});};exports[_0x480c('0x2')]=function(_0x20ecd2,_0x5b4025){return client[_0x480c('0x0')](_0x480c('0x3'),{'body':_0x5b4025,'options':{'where':{'id':_0x20ecd2}},'log':'addTagsToChatInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatMessage.js b/server/services/routing/rpc/chatMessage.js index dde9ad5..a773d09 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 _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 +var _0x70c3=['../client','Request','CreateChatMessage'];(function(_0x17c1a4,_0x195273){var _0x2ecdee=function(_0x3d6b93){while(--_0x3d6b93){_0x17c1a4['push'](_0x17c1a4['shift']());}};_0x2ecdee(++_0x195273);}(_0x70c3,0xd5));var _0x370c=function(_0x297b24,_0x50cf57){_0x297b24=_0x297b24-0x0;var _0x524f48=_0x70c3[_0x297b24];return _0x524f48;};'use strict';var client=require(_0x370c('0x0'));exports['create']=function(_0xdf93c0){return client[_0x370c('0x1')](_0x370c('0x2'),{'body':_0xdf93c0,'log':'createChatMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueue.js b/server/services/routing/rpc/chatQueue.js index 8d48bb3..87ad9a3 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 _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 +var _0xe7de=['timeout','strategy','User','Agents','name','online','chatPause','../client','getChatQueues','Request'];(function(_0x35ef6b,_0x202c42){var _0x3ad145=function(_0x3092de){while(--_0x3092de){_0x35ef6b['push'](_0x35ef6b['shift']());}};_0x3ad145(++_0x202c42);}(_0xe7de,0x165));var _0xee7d=function(_0x1de375,_0x59b891){_0x1de375=_0x1de375-0x0;var _0x21b03b=_0xe7de[_0x1de375];return _0x21b03b;};'use strict';var client=require(_0xee7d('0x0'));exports[_0xee7d('0x1')]=function(){return function(){return client[_0xee7d('0x2')]('GetChatQueue',{'options':{'raw':![],'attributes':['id','name',_0xee7d('0x3'),_0xee7d('0x4')],'include':[{'model':_0xee7d('0x5'),'as':_0xee7d('0x6'),'attributes':['id',_0xee7d('0x7'),_0xee7d('0x8'),_0xee7d('0x9')]}]},'log':_0xee7d('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueueReport.js b/server/services/routing/rpc/chatQueueReport.js index ee238ad..504d10d 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 _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 +var _0xb2b5=['Request','UpdateChatQueueReport','DESC','CreateChatQueueReport'];(function(_0x1a940a,_0x3f0564){var _0x1dc148=function(_0x52e0c0){while(--_0x52e0c0){_0x1a940a['push'](_0x1a940a['shift']());}};_0x1dc148(++_0x3f0564);}(_0xb2b5,0xa3));var _0x5b2b=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0xb2b5[_0x8c43de];return _0xa6591b;};'use strict';var client=require('../client');exports['create']=function(_0x4ccae7){return client['Request'](_0x5b2b('0x0'),{'body':_0x4ccae7,'log':_0x5b2b('0x0')});};exports['update']=function(_0x4eee87,_0x31784d){return client[_0x5b2b('0x1')](_0x5b2b('0x2'),{'body':_0x31784d,'options':{'where':{'uniqueid':_0x4eee87},'order':[['id',_0x5b2b('0x3')]],'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 20c167b..4044cd0 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 _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 +var _0x9957=['Request','AddTagsToFaxInteraction','addTagsToFaxInteraction','../client','update','UpdateFaxInteraction','updateFaxInteraction','addTags'];(function(_0x25e2cf,_0x469e1c){var _0x34c69d=function(_0x8983){while(--_0x8983){_0x25e2cf['push'](_0x25e2cf['shift']());}};_0x34c69d(++_0x469e1c);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'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 diff --git a/server/services/routing/rpc/faxMessage.js b/server/services/routing/rpc/faxMessage.js index b208a87..c49016b 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 _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 +var _0x97c8=['Request','CreateFaxMessage','../client','create'];(function(_0x13a20f,_0x241209){var _0x3323a3=function(_0x220b73){while(--_0x220b73){_0x13a20f['push'](_0x13a20f['shift']());}};_0x3323a3(++_0x241209);}(_0x97c8,0x1e6));var _0x897c=function(_0xbc1a4b,_0x4dfbe4){_0xbc1a4b=_0xbc1a4b-0x0;var _0x108b87=_0x97c8[_0xbc1a4b];return _0x108b87;};'use strict';var client=require(_0x897c('0x0'));exports[_0x897c('0x1')]=function(_0x3d2748){return client[_0x897c('0x2')](_0x897c('0x3'),{'body':_0x3d2748,'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 3d682b6..8bc8826 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 _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 +var _0xdaa6=['Agents','online','faxPause','../client','getFaxQueues','GetFaxQueue','name','timeout'];(function(_0x1f9f37,_0x18776e){var _0x21c080=function(_0x4acb93){while(--_0x4acb93){_0x1f9f37['push'](_0x1f9f37['shift']());}};_0x21c080(++_0x18776e);}(_0xdaa6,0x163));var _0x6daa=function(_0x1100f1,_0x392500){_0x1100f1=_0x1100f1-0x0;var _0xa2f031=_0xdaa6[_0x1100f1];return _0xa2f031;};'use strict';var client=require(_0x6daa('0x0'));exports[_0x6daa('0x1')]=function(){return function(){return client['Request'](_0x6daa('0x2'),{'options':{'raw':![],'attributes':['id',_0x6daa('0x3'),_0x6daa('0x4'),'strategy'],'include':[{'model':'User','as':_0x6daa('0x5'),'attributes':['id','name',_0x6daa('0x6'),_0x6daa('0x7')]}]},'log':_0x6daa('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueueReport.js b/server/services/routing/rpc/faxQueueReport.js index 03c7d4f..247e8c8 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 _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 +var _0xcfb2=['Request','CreateFaxQueueReport','update','../client','create'];(function(_0xc65ae2,_0x53119a){var _0x2432ea=function(_0x3f70f3){while(--_0x3f70f3){_0xc65ae2['push'](_0xc65ae2['shift']());}};_0x2432ea(++_0x53119a);}(_0xcfb2,0xcb));var _0x2cfb=function(_0x15d777,_0xd8d209){_0x15d777=_0x15d777-0x0;var _0x49b290=_0xcfb2[_0x15d777];return _0x49b290;};'use strict';var client=require(_0x2cfb('0x0'));exports[_0x2cfb('0x1')]=function(_0x31fd05){return client[_0x2cfb('0x2')](_0x2cfb('0x3'),{'body':_0x31fd05,'log':_0x2cfb('0x3')});};exports[_0x2cfb('0x4')]=function(_0x247438,_0x8980c8){return client[_0x2cfb('0x2')]('UpdateFaxQueueReport',{'body':_0x8980c8,'options':{'where':{'uniqueid':_0x247438},'order':[['id','DESC']],'limit':0x1},'log':'UpdateFaxQueueReport'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/interval.js b/server/services/routing/rpc/interval.js index 348b7a9..c2a8761 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 _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 +var _0x8a7a=['Interval','Intervals','../client','getIntervals','Request','GetInterval','name'];(function(_0x1c9b04,_0x2f3641){var _0x132775=function(_0x506536){while(--_0x506536){_0x1c9b04['push'](_0x1c9b04['shift']());}};_0x132775(++_0x2f3641);}(_0x8a7a,0x183));var _0xa8a7=function(_0x2b08af,_0x49a39e){_0x2b08af=_0x2b08af-0x0;var _0x22f33d=_0x8a7a[_0x2b08af];return _0x22f33d;};'use strict';var client=require(_0xa8a7('0x0'));exports[_0xa8a7('0x1')]=function(){return function(){return client[_0xa8a7('0x2')](_0xa8a7('0x3'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0xa8a7('0x4')],'include':[{'model':_0xa8a7('0x5'),'as':_0xa8a7('0x6'),'attributes':['id',_0xa8a7('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 47b0f8e..68acf98 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 _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 +var _0xd7d1=['addTags','AddTagsToMailInteraction','addTagsToChatInteraction','../client','update','Request','UpdateMailInteraction','updateMailInteraction'];(function(_0x5cc51f,_0x22c480){var _0x315a2f=function(_0x4f93bd){while(--_0x4f93bd){_0x5cc51f['push'](_0x5cc51f['shift']());}};_0x315a2f(++_0x22c480);}(_0xd7d1,0x1b3));var _0x1d7d=function(_0x39ab51,_0x4ae6a7){_0x39ab51=_0x39ab51-0x0;var _0x1513f6=_0xd7d1[_0x39ab51];return _0x1513f6;};'use strict';var client=require(_0x1d7d('0x0'));exports[_0x1d7d('0x1')]=function(_0xce4540,_0x447083){return client[_0x1d7d('0x2')](_0x1d7d('0x3'),{'body':_0x447083,'options':{'where':{'id':_0xce4540}},'log':_0x1d7d('0x4')});};exports[_0x1d7d('0x5')]=function(_0x1ac097,_0x1adb6b){return client[_0x1d7d('0x2')](_0x1d7d('0x6'),{'body':_0x1adb6b,'options':{'where':{'id':_0x1ac097}},'log':_0x1d7d('0x7')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailMessage.js b/server/services/routing/rpc/mailMessage.js index 6379b2d..ca5b50d 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 _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 +var _0x28e3=['createMailMessage','../client','create','Request','CreateMailMessage'];(function(_0x488304,_0x5b5b0e){var _0x51f958=function(_0xdc55ce){while(--_0xdc55ce){_0x488304['push'](_0x488304['shift']());}};_0x51f958(++_0x5b5b0e);}(_0x28e3,0x9c));var _0x328e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x28e3[_0x2dafbe];return _0x58a45a;};'use strict';var client=require(_0x328e('0x0'));exports[_0x328e('0x1')]=function(_0x5b1b8a){return client[_0x328e('0x2')](_0x328e('0x3'),{'body':_0x5b1b8a,'log':_0x328e('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueue.js b/server/services/routing/rpc/mailQueue.js index 1d1fdac..c5fe66d 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 _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 +var _0xda8a=['timeout','strategy','User','Agents','mailPause','getMailQueues','Request','GetMailQueue','name'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xda8a,0x113));var _0xada8=function(_0x49545b,_0xdbf246){_0x49545b=_0x49545b-0x0;var _0x3bdd0e=_0xda8a[_0x49545b];return _0x3bdd0e;};'use strict';var client=require('../client');exports[_0xada8('0x0')]=function(){return function(){return client[_0xada8('0x1')](_0xada8('0x2'),{'options':{'raw':![],'attributes':['id',_0xada8('0x3'),_0xada8('0x4'),_0xada8('0x5')],'include':[{'model':_0xada8('0x6'),'as':_0xada8('0x7'),'attributes':['id',_0xada8('0x3'),'online',_0xada8('0x8')]}]},'log':_0xada8('0x0')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueueReport.js b/server/services/routing/rpc/mailQueueReport.js index d52ffaf..518c1b7 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 _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 +var _0x485b=['../client','create','CreateMailQueueReport','Request','UpdateMailQueueReport','DESC'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0x485b,0x186));var _0xb485=function(_0x3cea78,_0x4a6751){_0x3cea78=_0x3cea78-0x0;var _0x33b66b=_0x485b[_0x3cea78];return _0x33b66b;};'use strict';var client=require(_0xb485('0x0'));exports[_0xb485('0x1')]=function(_0x505a78){return client['Request'](_0xb485('0x2'),{'body':_0x505a78,'log':_0xb485('0x2')});};exports['update']=function(_0x5bc5fb,_0x64f699){return client[_0xb485('0x3')](_0xb485('0x4'),{'body':_0x64f699,'options':{'where':{'uniqueid':_0x5bc5fb},'order':[['id',_0xb485('0x5')]],'limit':0x1},'log':_0xb485('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelInteraction.js b/server/services/routing/rpc/openchannelInteraction.js index ae11531..81d024e 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 _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 +var _0xf0dd=['addTags','AddTagsToOpenchannelInteraction','addTagsToChatInteraction','../client','update','Request','updateOpenchannelInteraction'];(function(_0x2f7665,_0x568919){var _0x232b31=function(_0x5240e4){while(--_0x5240e4){_0x2f7665['push'](_0x2f7665['shift']());}};_0x232b31(++_0x568919);}(_0xf0dd,0xff));var _0xdf0d=function(_0x4c9296,_0x5d07f5){_0x4c9296=_0x4c9296-0x0;var _0x3d8557=_0xf0dd[_0x4c9296];return _0x3d8557;};'use strict';var client=require(_0xdf0d('0x0'));exports[_0xdf0d('0x1')]=function(_0x1aab0c,_0x2b84a2){return client[_0xdf0d('0x2')]('UpdateOpenchannelInteraction',{'body':_0x2b84a2,'options':{'where':{'id':_0x1aab0c}},'log':_0xdf0d('0x3')});};exports[_0xdf0d('0x4')]=function(_0x339905,_0x12672f){return client[_0xdf0d('0x2')](_0xdf0d('0x5'),{'body':_0x12672f,'options':{'where':{'id':_0x339905}},'log':_0xdf0d('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelMessage.js b/server/services/routing/rpc/openchannelMessage.js index 64b08b6..8153fe9 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 _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 +var _0x48b7=['CreateOpenchannelMessage','createOpenchannelMessage','../client','create','Request'];(function(_0x383b12,_0x4eca33){var _0x431d25=function(_0x296b62){while(--_0x296b62){_0x383b12['push'](_0x383b12['shift']());}};_0x431d25(++_0x4eca33);}(_0x48b7,0xde));var _0x748b=function(_0x1816fb,_0x2f64fb){_0x1816fb=_0x1816fb-0x0;var _0x32f0ac=_0x48b7[_0x1816fb];return _0x32f0ac;};'use strict';var client=require(_0x748b('0x0'));exports[_0x748b('0x1')]=function(_0x2e5897){return client[_0x748b('0x2')](_0x748b('0x3'),{'body':_0x2e5897,'log':_0x748b('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueue.js b/server/services/routing/rpc/openchannelQueue.js index 2fbcda1..177d298 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 _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 +var _0xd9e2=['online','openchannelPause','../client','getOpenchannelQueues','Request','GetOpenchannelQueue','name','timeout','User'];(function(_0x22f85a,_0x195ed5){var _0xaa717=function(_0xe9828e){while(--_0xe9828e){_0x22f85a['push'](_0x22f85a['shift']());}};_0xaa717(++_0x195ed5);}(_0xd9e2,0x6e));var _0x2d9e=function(_0x2147f7,_0x1ffce7){_0x2147f7=_0x2147f7-0x0;var _0x3c752a=_0xd9e2[_0x2147f7];return _0x3c752a;};'use strict';var client=require(_0x2d9e('0x0'));exports[_0x2d9e('0x1')]=function(){return function(){return client[_0x2d9e('0x2')](_0x2d9e('0x3'),{'options':{'raw':![],'attributes':['id',_0x2d9e('0x4'),_0x2d9e('0x5'),'strategy'],'include':[{'model':_0x2d9e('0x6'),'as':'Agents','attributes':['id','name',_0x2d9e('0x7'),_0x2d9e('0x8')]}]},'log':_0x2d9e('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueueReport.js b/server/services/routing/rpc/openchannelQueueReport.js index ffb4e50..950f568 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 _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 +var _0x6e7d=['update','UpdateOpenchannelQueueReport','DESC','../client','create','Request','CreateOpenchannelQueueReport'];(function(_0x956671,_0x10d4b5){var _0x460fcd=function(_0x1ca84e){while(--_0x1ca84e){_0x956671['push'](_0x956671['shift']());}};_0x460fcd(++_0x10d4b5);}(_0x6e7d,0x1a0));var _0xd6e7=function(_0x5b080a,_0x50fbaf){_0x5b080a=_0x5b080a-0x0;var _0x427e8a=_0x6e7d[_0x5b080a];return _0x427e8a;};'use strict';var client=require(_0xd6e7('0x0'));exports[_0xd6e7('0x1')]=function(_0x31bce4){return client[_0xd6e7('0x2')](_0xd6e7('0x3'),{'body':_0x31bce4,'log':_0xd6e7('0x3')});};exports[_0xd6e7('0x4')]=function(_0x4454f2,_0x33ddee){return client[_0xd6e7('0x2')](_0xd6e7('0x5'),{'body':_0x33ddee,'options':{'where':{'uniqueid':_0x4454f2},'order':[['id',_0xd6e7('0x6')]],'limit':0x1},'log':_0xd6e7('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsInteraction.js b/server/services/routing/rpc/smsInteraction.js index 6d03909..dbc936b 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 _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 +var _0x0851=['AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update','UpdateSmsInteraction','updateSmsInteraction','addTags','Request'];(function(_0x4fde08,_0x463a36){var _0x12e725=function(_0x2670c5){while(--_0x2670c5){_0x4fde08['push'](_0x4fde08['shift']());}};_0x12e725(++_0x463a36);}(_0x0851,0x8a));var _0x1085=function(_0x5b266e,_0x22487a){_0x5b266e=_0x5b266e-0x0;var _0x1c1f1d=_0x0851[_0x5b266e];return _0x1c1f1d;};'use strict';var client=require(_0x1085('0x0'));exports[_0x1085('0x1')]=function(_0x219feb,_0xc4bf9d){return client['Request'](_0x1085('0x2'),{'body':_0xc4bf9d,'options':{'where':{'id':_0x219feb}},'log':_0x1085('0x3')});};exports[_0x1085('0x4')]=function(_0x3cbd88,_0x3b40fb){return client[_0x1085('0x5')](_0x1085('0x6'),{'body':_0x3b40fb,'options':{'where':{'id':_0x3cbd88}},'log':_0x1085('0x7')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsMessage.js b/server/services/routing/rpc/smsMessage.js index 38d266f..96dd8b9 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 _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 +var _0x5cd1=['createSmsMessage','../client','create','Request','CreateSmsMessage'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0x5cd1,0x1f0));var _0x15cd=function(_0x524add,_0x2091bb){_0x524add=_0x524add-0x0;var _0x51a610=_0x5cd1[_0x524add];return _0x51a610;};'use strict';var client=require(_0x15cd('0x0'));exports[_0x15cd('0x1')]=function(_0xdf7fbb){return client[_0x15cd('0x2')](_0x15cd('0x3'),{'body':_0xdf7fbb,'log':_0x15cd('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueue.js b/server/services/routing/rpc/smsQueue.js index 3d9988d..ac37fbd 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(_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 +var _0xa9e0=['name','online','smsPause','../client','getSmsQueues','Request','timeout','User','Agents'];(function(_0x12b164,_0x1565d6){var _0x54b66a=function(_0x3348df){while(--_0x3348df){_0x12b164['push'](_0x12b164['shift']());}};_0x54b66a(++_0x1565d6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xa9e0[_0x32d457];return _0x338386;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0x0a9e('0x3'),'strategy'],'include':[{'model':_0x0a9e('0x4'),'as':_0x0a9e('0x5'),'attributes':['id',_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8')]}]},'log':'getSmsQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueueReport.js b/server/services/routing/rpc/smsQueueReport.js index 0bc4674..33dedfb 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 _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 +var _0x9c44=['Request','CreateSmsQueueReport','update','UpdateSmsQueueReport'];(function(_0x81dcbe,_0xa8a9b){var _0x5a7c0a=function(_0x2f4d15){while(--_0x2f4d15){_0x81dcbe['push'](_0x81dcbe['shift']());}};_0x5a7c0a(++_0xa8a9b);}(_0x9c44,0x178));var _0x49c4=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x9c44[_0x4b369d];return _0x571a98;};'use strict';var client=require('../client');exports['create']=function(_0x1ffbbf){return client[_0x49c4('0x0')](_0x49c4('0x1'),{'body':_0x1ffbbf,'log':_0x49c4('0x1')});};exports[_0x49c4('0x2')]=function(_0x2ad237,_0x4e0313){return client['Request'](_0x49c4('0x3'),{'body':_0x4e0313,'options':{'where':{'uniqueid':_0x2ad237},'order':[['id','DESC']],'limit':0x1},'log':_0x49c4('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/user.js b/server/services/routing/rpc/user.js index 7c21212..333bdb0 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(_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 +var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0x5c9de3,_0x488000){var _0x490296=function(_0x4f17ac){while(--_0x4f17ac){_0x5c9de3['push'](_0x5c9de3['shift']());}};_0x490296(++_0x488000);}(_0xa9e0,0x123));var _0x0a9e=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xa9e0[_0x32d457];return _0x338386;};'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 96063cc..ef400eb 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 _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 +var _0x81d4=['updateWhatsappInteraction','AddTagsToWhatsappInteraction','update','Request','UpdateWhatsappInteraction'];(function(_0xcf4569,_0x1ce755){var _0x7fef=function(_0x374ab8){while(--_0x374ab8){_0xcf4569['push'](_0xcf4569['shift']());}};_0x7fef(++_0x1ce755);}(_0x81d4,0x197));var _0x481d=function(_0x6f6c61,_0x1454f3){_0x6f6c61=_0x6f6c61-0x0;var _0x5158aa=_0x81d4[_0x6f6c61];return _0x5158aa;};'use strict';var client=require('../client');exports[_0x481d('0x0')]=function(_0x1017c5,_0x51dfad){return client[_0x481d('0x1')](_0x481d('0x2'),{'body':_0x51dfad,'options':{'where':{'id':_0x1017c5}},'log':_0x481d('0x3')});};exports['addTags']=function(_0x5af777,_0x37813e){return client[_0x481d('0x1')](_0x481d('0x4'),{'body':_0x37813e,'options':{'where':{'id':_0x5af777}},'log':'addTagsToWhatsappInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappMessage.js b/server/services/routing/rpc/whatsappMessage.js index 5a56e7c..68a8136 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 _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 +var _0xb66a=['create','Request','CreateWhatsappMessage','createWhatsappMessage'];(function(_0x4241c5,_0x4e0bcc){var _0x4f88a6=function(_0x9e0c7b){while(--_0x9e0c7b){_0x4241c5['push'](_0x4241c5['shift']());}};_0x4f88a6(++_0x4e0bcc);}(_0xb66a,0xcc));var _0xab66=function(_0x4a04d9,_0x5ba15e){_0x4a04d9=_0x4a04d9-0x0;var _0x3fd345=_0xb66a[_0x4a04d9];return _0x3fd345;};'use strict';var client=require('../client');exports[_0xab66('0x0')]=function(_0x44654d){return client[_0xab66('0x1')](_0xab66('0x2'),{'body':_0x44654d,'log':_0xab66('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueue.js b/server/services/routing/rpc/whatsappQueue.js index c4b54b0..8877b61 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 _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 +var _0x982a=['../client','getWhatsappQueues','Request','GetWhatsappQueue','name','online'];(function(_0x505454,_0x2105a8){var _0x14d464=function(_0x384829){while(--_0x384829){_0x505454['push'](_0x505454['shift']());}};_0x14d464(++_0x2105a8);}(_0x982a,0x14a));var _0xa982=function(_0xe5a77b,_0x45033a){_0xe5a77b=_0xe5a77b-0x0;var _0x29663a=_0x982a[_0xe5a77b];return _0x29663a;};'use strict';var client=require(_0xa982('0x0'));exports[_0xa982('0x1')]=function(){return function(){return client[_0xa982('0x2')](_0xa982('0x3'),{'options':{'raw':![],'attributes':['id',_0xa982('0x4'),'timeout','strategy'],'include':[{'model':'User','as':'Agents','attributes':['id','name',_0xa982('0x5'),'whatsappPause']}]},'log':_0xa982('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueueReport.js b/server/services/routing/rpc/whatsappQueueReport.js index 8184ba0..0fff576 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 _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 +var _0xd2bd=['DESC','../client','create','Request','CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport'];(function(_0x265984,_0x331bbf){var _0x1878fc=function(_0x3ffae4){while(--_0x3ffae4){_0x265984['push'](_0x265984['shift']());}};_0x1878fc(++_0x331bbf);}(_0xd2bd,0x182));var _0xdd2b=function(_0x596f6e,_0x3f8857){_0x596f6e=_0x596f6e-0x0;var _0x1e0803=_0xd2bd[_0x596f6e];return _0x1e0803;};'use strict';var client=require(_0xdd2b('0x0'));exports[_0xdd2b('0x1')]=function(_0x4b00a4){return client[_0xdd2b('0x2')](_0xdd2b('0x3'),{'body':_0x4b00a4,'log':'CreateWhatsappQueueReport'});};exports[_0xdd2b('0x4')]=function(_0x1ab518,_0x123450){return client[_0xdd2b('0x2')](_0xdd2b('0x5'),{'body':_0x123450,'options':{'where':{'uniqueid':_0x1ab518},'order':[['id',_0xdd2b('0x6')]],'limit':0x1},'log':_0xdd2b('0x5')});}; \ 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 2bc2e9c..a895bfa 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 _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 +var _0xf068=['[%s][QUEUE]\x20%s','validate','lodash','util','seq-queue','../../../../config/logger','routing','./strategy','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','timeout\x20is\x20a\x20number','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence','[%s][AGENT]\x20%s','message','join','stop','find','timeout','createQueue','channel','START:%s','end','close','complete','rules','next','error','[%s][AGENT]\x20agent\x20not\x20found\x20%s'];(function(_0x3ff685,_0x304b9e){var _0x2046c9=function(_0x7a10e9){while(--_0x7a10e9){_0x3ff685['push'](_0x3ff685['shift']());}};_0x2046c9(++_0x304b9e);}(_0xf068,0x101));var _0x8f06=function(_0x17c88a,_0xbc40c0){_0x17c88a=_0x17c88a-0x0;var _0x4f7cd4=_0xf068[_0x17c88a];return _0x4f7cd4;};'use strict';var schema=require(_0x8f06('0x0'));var _=require(_0x8f06('0x1'));var util=require(_0x8f06('0x2'));var seqqueue=require(_0x8f06('0x3'));var logger=require(_0x8f06('0x4'))(_0x8f06('0x5'));var strategy=require(_0x8f06('0x6'));var queue=schema({'name':{'type':'string','required':!![],'message':_0x8f06('0x7')},'timeout':{'type':'number','message':_0x8f06('0x8')}});function writeLog(_0x629b6e,_0x470c26,_0x2afd96){return logger[_0x8f06('0x9')](util[_0x8f06('0xa')](_0x8f06('0xb'),_0x629b6e,_0x470c26[_0x8f06('0xc')],_0x2afd96));}function handleFindAgent(_0x30586f){return function(_0x2c736f){return _0x2c736f[_0x8f06('0xc')]['toLowerCase']()===_0x30586f[_0x8f06('0xd')]();};}exports[_0x8f06('0xe')]=function(_0x2e1421,_0x3248cb,_0x46d89a,_0x13bc0f){return function(_0x545488){try{var _0x292ad1={'name':_0x3248cb[0x0],'timeout':_0x3248cb[0x1]};var _0x463449=queue[_0x8f06('0x0')](_0x292ad1,{'typecast':!![]});if(_0x463449['length']){logger['error'](_0x8f06('0xf'),_0x2e1421,_['map'](_0x463449,_0x8f06('0x10'))[_0x8f06('0x11')](',\x20'));_0x545488[_0x8f06('0x12')]();}else{var _0x38096a=_[_0x8f06('0x13')](_0x46d89a['agents'],handleFindAgent(_0x292ad1[_0x8f06('0xc')]));if(_0x38096a){var _0x2a6052=(_0x292ad1[_0x8f06('0x14')]||0xa)*0x3e8;var _0x576b12,_0x11c2a6;var _0x5de13e=seqqueue[_0x8f06('0x15')](_0x2a6052);_0x5de13e['id']=_0x2e1421;_0x5de13e['atimeout']=_0x2a6052;_0x5de13e[_0x8f06('0x16')]=_0x13bc0f['channel'];writeLog(_0x2e1421,_0x38096a,util[_0x8f06('0xa')](_0x8f06('0x17'),_0x2a6052));_0x46d89a['rules'][_0x2e1421]['on'](_0x8f06('0x18'),function(){logger['info']('[%s][AGENT]\x20ROUTING\x20STOPPED',_0x2e1421);clearTimeout(_0x11c2a6);_0x11c2a6=undefined;_0x5de13e[_0x8f06('0x19')]();if(_0x46d89a['rules'][_0x2e1421]){delete _0x46d89a['rules'][_0x2e1421];}_0x545488[_0x8f06('0x12')]();});_0x46d89a['rules'][_0x2e1421]['on'](_0x8f06('0x1a'),function(){if(_0x46d89a[_0x8f06('0x1b')][_0x2e1421]){delete _0x46d89a[_0x8f06('0x1b')][_0x2e1421];}});_0x11c2a6=setTimeout(function(){logger[_0x8f06('0x9')]('[%s][AGENT]\x20ROUTING\x20END',_0x2e1421);clearTimeout(_0x11c2a6);_0x5de13e[_0x8f06('0x19')]();_0x545488[_0x8f06('0x1c')]();},_0x2a6052);strategy['agent'](_0x5de13e,_0x38096a,_0x46d89a,_0x13bc0f);}else{logger[_0x8f06('0x1d')](_0x8f06('0x1e'),_0x2e1421,_0x292ad1[_0x8f06('0xc')]);_0x545488[_0x8f06('0x12')]();}}}catch(_0x271aaf){console['log'](_0x271aaf);logger[_0x8f06('0x1d')](_0x8f06('0x1f'),_0x2e1421,_0x271aaf['stack']);_0x545488[_0x8f06('0x12')]();}};}; \ 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 a1fd445..36cc6d4 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 _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 +var _0x5f39=['routing','../../rpc/chatMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','UserId','info','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','format','out','channel','sms','whatsapp','phone','chat','upperFirst','account','created','isEmpty','getMustacheRender','Message','create','then','[%s][AMAZONLEX]\x20%s','body','error','stringify','finally','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','LexRuntime','message','postText','providerName','amazonlex','dialogState','catch','moment','aws-sdk','./utils','../../../../config/logger'];(function(_0x15eb1c,_0x37c889){var _0x39ff81=function(_0x48df73){while(--_0x48df73){_0x15eb1c['push'](_0x15eb1c['shift']());}};_0x39ff81(++_0x37c889);}(_0x5f39,0x164));var _0x95f3=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x5f39[_0x178e48];return _0x440d7e;};'use strict';var _=require('lodash');var moment=require(_0x95f3('0x0'));var AWS=require(_0x95f3('0x1'));var utils=require(_0x95f3('0x2'));var logger=require(_0x95f3('0x3'))(_0x95f3('0x4'));var rpc={'chatMessage':require(_0x95f3('0x5')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x95f3('0x6')),'whatsappMessage':require(_0x95f3('0x7'))};exports[_0x95f3('0x8')]=function(_0x107ae3,_0x2f0892){return function(_0x2f6e53){try{if(!_[_0x95f3('0x9')](this[_0x95f3('0xa')][_0x95f3('0xb')])){logger[_0x95f3('0xc')]('[%s][AMAZONLEX]\x20%s',_0x107ae3,_0x95f3('0xd'));return _0x2f6e53[_0x95f3('0xe')]();}var _0xe497ad={'ContactId':this['contact']['id'],'sentAt':moment()[_0x95f3('0xf')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x95f3('0x10')};if(this[_0x95f3('0x11')]===_0x95f3('0x12')||this[_0x95f3('0x11')]===_0x95f3('0x13')){_0xe497ad[_0x95f3('0x14')]=this[_0x95f3('0xa')]['phone'];}var _0x3e8829=this['channel'];if(_0x3e8829===_0x95f3('0x15')){_0xe497ad['ChatWebsiteId']=this['account']['id'];}else{_0xe497ad[_[_0x95f3('0x16')](_0x3e8829)+'AccountId']=this[_0x95f3('0x17')]['id'];}_0xe497ad[_['upperFirst'](_0x3e8829)+'InteractionId']=this['interaction']['id'];if(this[_0x95f3('0xa')][_0x95f3('0x18')]){var _0x79bbf2=_0x2f0892[0x4];if(!_[_0x95f3('0x19')](_0x79bbf2)){_0xe497ad['body']=utils[_0x95f3('0x1a')](_0x79bbf2,this);return rpc[_0x3e8829+_0x95f3('0x1b')][_0x95f3('0x1c')](_0xe497ad)[_0x95f3('0x1d')](function(_0x31598c){logger[_0x95f3('0xc')](_0x95f3('0x1e'),_0x107ae3,_0xe497ad[_0x95f3('0x1f')]);})['catch'](function(_0x5eba63){logger[_0x95f3('0x20')](_0x95f3('0x1e'),_0x107ae3,JSON[_0x95f3('0x21')](_0x5eba63));})[_0x95f3('0x22')](function(){logger[_0x95f3('0xc')](_0x95f3('0x23'),_0x107ae3);_0x2f6e53[_0x95f3('0x24')]();});}else{logger[_0x95f3('0xc')](_0x95f3('0x25'),_0x107ae3);_0x2f6e53[_0x95f3('0x24')]();}}else{var _0x385a1b=this;var _0xa241fa=new AWS[(_0x95f3('0x26'))]({'accessKeyId':_0x2f0892[0x0],'secretAccessKey':_0x2f0892[0x1],'region':_0x2f0892[0x2]});var _0x43fea8={'botAlias':'$LATEST','botName':_0x2f0892[0x3],'inputText':this[_0x95f3('0x27')][_0x95f3('0x1f')],'userId':this[_0x95f3('0x11')]+':'+this[_0x95f3('0xa')]['id']['toString']()};_0xa241fa[_0x95f3('0x28')](_0x43fea8,function(_0x3f0ea1,_0x256129){if(_0x3f0ea1){logger[_0x95f3('0x20')](_0x95f3('0x1e'),_0x107ae3,_0x3f0ea1[_0x95f3('0x27')]);_0x2f6e53['next']();}else if(_0x256129&&_0x256129['message']){_0x385a1b[_0x95f3('0x1f')]['amazonlex']=_0x256129;_0xe497ad[_0x95f3('0x1f')]=_0x256129['message'];_0xe497ad[_0x95f3('0x29')]=_0x95f3('0x2a');_0xe497ad['providerResponse']=JSON['stringify'](_0x256129);return rpc[_0x3e8829+_0x95f3('0x1b')]['create'](_0xe497ad)[_0x95f3('0x1d')](function(_0x5f49ba){logger[_0x95f3('0xc')](_0x95f3('0x1e'),_0x107ae3,_0xe497ad[_0x95f3('0x1f')]);if(_0x256129[_0x95f3('0x2b')]=='Failed'){_0x2f6e53[_0x95f3('0xe')]();}else{_0x2f6e53[_0x95f3('0x24')]();}})[_0x95f3('0x2c')](function(_0x5cec68){logger[_0x95f3('0x20')](_0x95f3('0x1e'),_0x107ae3,JSON['stringify'](_0x5cec68));_0x2f6e53[_0x95f3('0xe')]();});}else{_0x2f6e53['next']();}});}}catch(_0x53e8aa){logger['error'](_0x95f3('0x1e'),_0x107ae3,JSON[_0x95f3('0x21')](_0x53e8aa));_0x2f6e53[_0x95f3('0x24')]();}};}; \ 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 a493725..89aeb4c 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 _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'],'','replace','';_0x505e3b[_0x6649('0x37')]={'Auto-Submitted':_0x6649('0x38'),'X-Auto-Response-Suppress':'All','Precedence':_0x6649('0x39')};return mailRpc['sendMailMessage'](_0x43b3b7,_0x505e3b)[_0x6649('0x3a')](function(_0x57cf91){logger[_0x6649('0x11')](_0x6649('0x3b'),_0x117465);_0x505e3b[_0x6649('0x32')]=_0x57cf91[_0x6649('0x1d')]['messageId'];return rpc[_0x54e563+'Message'][_0x6649('0x3c')](_0x505e3b);})[_0x6649('0x3a')](function(_0x52c578){logger['info'](_0x6649('0x12'),_0x117465,JSON[_0x6649('0x3d')](_0x52c578));})[_0x6649('0x3e')](function(_0x4dc8cf){logger[_0x6649('0x3f')](_0x6649('0x40'),_0x117465,JSON['stringify'](_0x4dc8cf));})[_0x6649('0x41')](function(){Promise[_0x6649('0x42')]()[_0x6649('0x3a')](function(){if(_0x36c689[0x0]!=='2'||_0x2ffccd[_0x6649('0x13')])return;return rpc[_0x54e563+_0x6649('0x43')]['update'](_0x2ffccd['id'],{'autoreplyExecuted':!![]})[_0x6649('0x3a')](function(_0x2781f0){logger[_0x6649('0x11')](_0x6649('0x44'),_0x117465,JSON['stringify'](_0x2781f0));})[_0x6649('0x3e')](function(_0x579607){logger[_0x6649('0x3f')](_0x6649('0x45'),_0x117465,JSON[_0x6649('0x3d')](_0x579607));});})[_0x6649('0x3a')](function(){_0x349dbd[_0x6649('0x14')]();});});}else{return rpc[this[_0x6649('0x15')]+_0x6649('0x28')][_0x6649('0x3c')](_0x505e3b)[_0x6649('0x3a')](function(_0x620cab){logger[_0x6649('0x11')]('[%s][AUTOREPLY]\x20%s',_0x117465,_0x505e3b[_0x6649('0x1b')]);})['catch'](function(_0x36f513){logger[_0x6649('0x3f')](_0x6649('0x12'),_0x117465,JSON[_0x6649('0x3d')](_0x36f513));})[_0x6649('0x41')](function(){Promise[_0x6649('0x42')]()['then'](function(){if(_0x36c689[0x0]!=='2'||_0x2ffccd[_0x6649('0x13')])return;return rpc[_0x54e563+_0x6649('0x43')][_0x6649('0x46')](_0x2ffccd['id'],{'autoreplyExecuted':!![]})['then'](function(_0x3f3890){logger[_0x6649('0x11')](_0x6649('0x44'),_0x117465,JSON[_0x6649('0x3d')](_0x3f3890));})[_0x6649('0x3e')](function(_0x1061c7){logger[_0x6649('0x3f')](_0x6649('0x45'),_0x117465,JSON[_0x6649('0x3d')](_0x1061c7));});})['then'](function(){_0x349dbd['next']();});});}}}catch(_0x126973){logger[_0x6649('0x3f')](_0x6649('0x12'),_0x117465,JSON['stringify'](_0x126973));_0x349dbd['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/close.js b/server/services/routing/server/applications/close.js index 09e4dab..12dfe08 100644 --- a/server/services/routing/server/applications/close.js +++ b/server/services/routing/server/applications/close.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9036=['interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','[%s][CLOSE]\x20%s','stringify','finally','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','info','[%s][CLOSE]\x20reason\x20%s','format','system','channel','Interaction','update'];(function(_0x329239,_0x3a5d3c){var _0x16ae55=function(_0x233a0b){while(--_0x233a0b){_0x329239['push'](_0x329239['shift']());}};_0x16ae55(++_0x3a5d3c);}(_0x9036,0x14a));var _0x6903=function(_0x5bec47,_0x309463){_0x5bec47=_0x5bec47-0x0;var _0x241eae=_0x9036[_0x5bec47];return _0x241eae;};'use strict';var moment=require(_0x6903('0x0'));var logger=require(_0x6903('0x1'))(_0x6903('0x2'));var rpc={'chatInteraction':require(_0x6903('0x3')),'openchannelInteraction':require(_0x6903('0x4')),'smsInteraction':require(_0x6903('0x5')),'mailInteraction':require(_0x6903('0x6')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x6903('0x7'))};exports['consequence']=function(_0x78ce10,_0x1dd53f,_0x271a48,_0x290efb){return function(_0x5092d9){try{logger[_0x6903('0x8')](_0x6903('0x9'),_0x78ce10,_0x1dd53f[0x0]);var _0x401085={'closed':0x1,'closedAt':moment()[_0x6903('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0x6903('0xb'),'disposition':_0x1dd53f[0x0]};if(rpc[_0x290efb[_0x6903('0xc')]+'Interaction']){rpc[_0x290efb[_0x6903('0xc')]+_0x6903('0xd')][_0x6903('0xe')](_0x290efb[_0x6903('0xf')]['id'],_0x401085)[_0x6903('0x10')](function(_0x3f6e91){logger[_0x6903('0x8')](_0x6903('0x11'),_0x78ce10,_0x290efb['interaction']['id']);})[_0x6903('0x12')](function(_0x287acc){logger['error'](_0x6903('0x13'),_0x78ce10,JSON[_0x6903('0x14')](_0x287acc));})[_0x6903('0x15')](function(){_0x5092d9[_0x6903('0x16')]();});}}catch(_0x28d133){logger['error'](_0x6903('0x13'),_0x78ce10,JSON[_0x6903('0x14')](_0x28d133));_0x5092d9[_0x6903('0x16')]();}};}; \ No newline at end of file +var _0xfea6=['update','interaction','then','catch','error','[%s][CLOSE]\x20%s','stringify','finally','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','info','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction'];(function(_0x349fef,_0xb8d9d0){var _0x31c5d5=function(_0xc04a95){while(--_0xc04a95){_0x349fef['push'](_0x349fef['shift']());}};_0x31c5d5(++_0xb8d9d0);}(_0xfea6,0xb1));var _0x6fea=function(_0xf88486,_0x55d7a3){_0xf88486=_0xf88486-0x0;var _0x40d052=_0xfea6[_0xf88486];return _0x40d052;};'use strict';var moment=require(_0x6fea('0x0'));var logger=require(_0x6fea('0x1'))(_0x6fea('0x2'));var rpc={'chatInteraction':require(_0x6fea('0x3')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x6fea('0x4')),'mailInteraction':require(_0x6fea('0x5')),'faxInteraction':require(_0x6fea('0x6')),'whatsappInteraction':require(_0x6fea('0x7'))};exports[_0x6fea('0x8')]=function(_0x420440,_0x289022,_0xf588b8,_0x9435af){return function(_0x45a011){try{logger[_0x6fea('0x9')]('[%s][CLOSE]\x20reason\x20%s',_0x420440,_0x289022[0x0]);var _0x24a04c={'closed':0x1,'closedAt':moment()[_0x6fea('0xa')](_0x6fea('0xb')),'closeReason':_0x6fea('0xc'),'disposition':_0x289022[0x0]};if(rpc[_0x9435af[_0x6fea('0xd')]+_0x6fea('0xe')]){rpc[_0x9435af['channel']+_0x6fea('0xe')][_0x6fea('0xf')](_0x9435af[_0x6fea('0x10')]['id'],_0x24a04c)[_0x6fea('0x11')](function(_0x5d1c9b){logger[_0x6fea('0x9')]('[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!',_0x420440,_0x9435af[_0x6fea('0x10')]['id']);})[_0x6fea('0x12')](function(_0x3ab568){logger[_0x6fea('0x13')](_0x6fea('0x14'),_0x420440,JSON[_0x6fea('0x15')](_0x3ab568));})[_0x6fea('0x16')](function(){_0x45a011['stop']();});}}catch(_0x2c7afe){logger[_0x6fea('0x13')](_0x6fea('0x14'),_0x420440,JSON['stringify'](_0x2c7afe));_0x45a011[_0x6fea('0x17')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflow.js b/server/services/routing/server/applications/dialogflow.js index ad9bab7..437a54c 100644 --- a/server/services/routing/server/applications/dialogflow.js +++ b/server/services/routing/server/applications/dialogflow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3fa4=['lodash','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','info','[%s][DIALOGFLOW]\x20%s','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','sms','channel','whatsapp','phone','chat','AccountId','upperFirst','InteractionId','created','isEmpty','body','getMustacheRender','then','catch','error','finally','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','textRequest','message','result','fulfillment','speech','providerName','dialogflow','Message','create','metadata','next','stringify'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x3fa4,0xf0));var _0x43fa=function(_0x5ee903,_0x53454f){_0x5ee903=_0x5ee903-0x0;var _0x1c34f5=_0x3fa4[_0x5ee903];return _0x1c34f5;};'use strict';var _=require(_0x43fa('0x0'));var moment=require('moment');var apiai=require('apiai-promise');var md5=require('md5');var utils=require(_0x43fa('0x1'));var logger=require(_0x43fa('0x2'))(_0x43fa('0x3'));var rpc={'chatMessage':require(_0x43fa('0x4')),'openchannelMessage':require(_0x43fa('0x5')),'mailMessage':require(_0x43fa('0x6')),'smsMessage':require(_0x43fa('0x7')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0x43fa('0x8'))};exports[_0x43fa('0x9')]=function(_0x6df71c,_0x584209){return function(_0x3dc891){try{if(!_[_0x43fa('0xa')](this[_0x43fa('0xb')]['UserId'])){logger[_0x43fa('0xc')](_0x43fa('0xd'),_0x6df71c,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x3dc891['next']();}var _0xe0c8cd={'ContactId':this[_0x43fa('0xe')]['id'],'sentAt':moment()[_0x43fa('0xf')](_0x43fa('0x10')),'direction':_0x43fa('0x11')};if(this['channel']===_0x43fa('0x12')||this[_0x43fa('0x13')]===_0x43fa('0x14')){_0xe0c8cd['phone']=this[_0x43fa('0xb')][_0x43fa('0x15')];}var _0x4665c1=this['channel'];if(_0x4665c1===_0x43fa('0x16')){_0xe0c8cd['ChatWebsiteId']=this['account']['id'];}else{_0xe0c8cd[_['upperFirst'](_0x4665c1)+_0x43fa('0x17')]=this['account']['id'];}_0xe0c8cd[_[_0x43fa('0x18')](_0x4665c1)+_0x43fa('0x19')]=this['interaction']['id'];if(this[_0x43fa('0xb')][_0x43fa('0x1a')]){var _0x32ac9c=_0x584209[0x2];if(!_[_0x43fa('0x1b')](_0x32ac9c)){_0xe0c8cd[_0x43fa('0x1c')]=utils[_0x43fa('0x1d')](_0x32ac9c,this);return rpc[_0x4665c1+'Message']['create'](_0xe0c8cd)[_0x43fa('0x1e')](function(_0x29b8aa){logger[_0x43fa('0xc')](_0x43fa('0xd'),_0x6df71c,_0xe0c8cd[_0x43fa('0x1c')]);})[_0x43fa('0x1f')](function(_0xdf68a6){logger[_0x43fa('0x20')](_0x43fa('0xd'),_0x6df71c,JSON['stringify'](_0xdf68a6));})[_0x43fa('0x21')](function(){logger[_0x43fa('0xc')](_0x43fa('0x22'),_0x6df71c);_0x3dc891[_0x43fa('0x23')]();});}else{logger[_0x43fa('0xc')]('[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x6df71c);_0x3dc891[_0x43fa('0x23')]();}}else{var _0x3c78fb=this;var _0x2db3dd=apiai(_0x584209[0x0],{'language':_0x584209[0x1]||'en'});return _0x2db3dd[_0x43fa('0x24')](this[_0x43fa('0x25')][_0x43fa('0x1c')],{'sessionId':md5(this[_0x43fa('0xb')]['id'])})[_0x43fa('0x1e')](function(_0x427426){_0x3c78fb['body']['dialogflow']=_0x427426;_0xe0c8cd[_0x43fa('0x1c')]=_0x427426[_0x43fa('0x26')][_0x43fa('0x27')][_0x43fa('0x28')];_0xe0c8cd[_0x43fa('0x29')]=_0x43fa('0x2a');_0xe0c8cd['providerResponse']=JSON['stringify'](_0x427426);return rpc[_0x4665c1+_0x43fa('0x2b')][_0x43fa('0x2c')](_0xe0c8cd)[_0x43fa('0x1e')](function(_0x4d88b1){logger['info'](_0x43fa('0xd'),_0x6df71c,_0xe0c8cd[_0x43fa('0x1c')]);if(_0x427426[_0x43fa('0x26')][_0x43fa('0x2d')]['endConversation']){_0x3dc891[_0x43fa('0x2e')]();}else{_0x3dc891[_0x43fa('0x23')]();}})[_0x43fa('0x1f')](function(_0x28b833){logger[_0x43fa('0x20')](_0x43fa('0xd'),_0x6df71c,JSON[_0x43fa('0x2f')](_0x28b833));_0x3dc891[_0x43fa('0x2e')]();});})[_0x43fa('0x1f')](function(_0x2662f1){logger[_0x43fa('0x20')](_0x43fa('0xd'),_0x6df71c,_0x2662f1['message']);_0x3dc891['next']();});}}catch(_0x2791a0){logger[_0x43fa('0x20')](_0x43fa('0xd'),_0x6df71c,JSON[_0x43fa('0x2f')](_0x2791a0));_0x3dc891['stop']();}};}; \ No newline at end of file +var _0x1228=['[%s][DIALOGFLOW]\x20%s','format','out','channel','sms','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','body','getMustacheRender','Message','create','catch','stringify','finally','stop','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','textRequest','message','dialogflow','result','fulfillment','speech','providerName','then','metadata','next','error','lodash','apiai-promise','./utils','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','isNil','interaction','info'];(function(_0x3542e9,_0x40dbd2){var _0x5cde7b=function(_0x317f9e){while(--_0x317f9e){_0x3542e9['push'](_0x3542e9['shift']());}};_0x5cde7b(++_0x40dbd2);}(_0x1228,0x12f));var _0x8122=function(_0x50e30b,_0x216368){_0x50e30b=_0x50e30b-0x0;var _0x4b7300=_0x1228[_0x50e30b];return _0x4b7300;};'use strict';var _=require(_0x8122('0x0'));var moment=require('moment');var apiai=require(_0x8122('0x1'));var md5=require('md5');var utils=require(_0x8122('0x2'));var logger=require(_0x8122('0x3'))(_0x8122('0x4'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x8122('0x5')),'mailMessage':require(_0x8122('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x8122('0x7')),'whatsappMessage':require(_0x8122('0x8'))};exports['consequence']=function(_0x21987a,_0x139c44){return function(_0x517138){try{if(!_[_0x8122('0x9')](this[_0x8122('0xa')]['UserId'])){logger[_0x8122('0xb')](_0x8122('0xc'),_0x21987a,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x517138['next']();}var _0x4fa7b3={'ContactId':this['contact']['id'],'sentAt':moment()[_0x8122('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x8122('0xe')};if(this[_0x8122('0xf')]===_0x8122('0x10')||this['channel']===_0x8122('0x11')){_0x4fa7b3['phone']=this[_0x8122('0xa')][_0x8122('0x12')];}var _0x1e60bf=this[_0x8122('0xf')];if(_0x1e60bf===_0x8122('0x13')){_0x4fa7b3[_0x8122('0x14')]=this[_0x8122('0x15')]['id'];}else{_0x4fa7b3[_[_0x8122('0x16')](_0x1e60bf)+_0x8122('0x17')]=this[_0x8122('0x15')]['id'];}_0x4fa7b3[_[_0x8122('0x16')](_0x1e60bf)+_0x8122('0x18')]=this['interaction']['id'];if(this[_0x8122('0xa')]['created']){var _0x23594=_0x139c44[0x2];if(!_['isEmpty'](_0x23594)){_0x4fa7b3[_0x8122('0x19')]=utils[_0x8122('0x1a')](_0x23594,this);return rpc[_0x1e60bf+_0x8122('0x1b')][_0x8122('0x1c')](_0x4fa7b3)['then'](function(_0x4f7277){logger['info']('[%s][DIALOGFLOW]\x20%s',_0x21987a,_0x4fa7b3[_0x8122('0x19')]);})[_0x8122('0x1d')](function(_0x1df96d){logger['error']('[%s][DIALOGFLOW]\x20%s',_0x21987a,JSON[_0x8122('0x1e')](_0x1df96d));})[_0x8122('0x1f')](function(){logger[_0x8122('0xb')]('[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x21987a);_0x517138[_0x8122('0x20')]();});}else{logger[_0x8122('0xb')](_0x8122('0x21'),_0x21987a);_0x517138[_0x8122('0x20')]();}}else{var _0x3c6226=this;var _0x130e1b=apiai(_0x139c44[0x0],{'language':_0x139c44[0x1]||'en'});return _0x130e1b[_0x8122('0x22')](this[_0x8122('0x23')]['body'],{'sessionId':md5(this[_0x8122('0xa')]['id'])})['then'](function(_0x732946){_0x3c6226[_0x8122('0x19')][_0x8122('0x24')]=_0x732946;_0x4fa7b3[_0x8122('0x19')]=_0x732946[_0x8122('0x25')][_0x8122('0x26')][_0x8122('0x27')];_0x4fa7b3[_0x8122('0x28')]=_0x8122('0x24');_0x4fa7b3['providerResponse']=JSON[_0x8122('0x1e')](_0x732946);return rpc[_0x1e60bf+_0x8122('0x1b')][_0x8122('0x1c')](_0x4fa7b3)[_0x8122('0x29')](function(_0x2f8d73){logger[_0x8122('0xb')](_0x8122('0xc'),_0x21987a,_0x4fa7b3[_0x8122('0x19')]);if(_0x732946[_0x8122('0x25')][_0x8122('0x2a')]['endConversation']){_0x517138['next']();}else{_0x517138[_0x8122('0x20')]();}})[_0x8122('0x1d')](function(_0x5263ca){logger['error'](_0x8122('0xc'),_0x21987a,JSON[_0x8122('0x1e')](_0x5263ca));_0x517138[_0x8122('0x2b')]();});})['catch'](function(_0x4c8339){logger[_0x8122('0x2c')](_0x8122('0xc'),_0x21987a,_0x4c8339[_0x8122('0x23')]);_0x517138[_0x8122('0x2b')]();});}}catch(_0x2e605a){logger[_0x8122('0x2c')](_0x8122('0xc'),_0x21987a,JSON[_0x8122('0x1e')](_0x2e605a));_0x517138[_0x8122('0x20')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflowV2.js b/server/services/routing/server/applications/dialogflowV2.js index 7c07d69..cfaa060 100644 --- a/server/services/routing/server/applications/dialogflowV2.js +++ b/server/services/routing/server/applications/dialogflowV2.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4228=['routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','body','Message','create','then','[%s][DIALOGFLOWV2]\x20%s','stringify','consequence','isNil','interaction','info','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','whatsapp','phone','chat','account','upperFirst','AccountId','InteractionId','created','isEmpty','getMustacheRender','catch','error','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','replace','SessionsClient','sessionPath','message','length','dialogflowV2','queryResult','diagnosticInfo','fields','end_conversation','boolValue','DIALOGFLOWV2_ACTION','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_INTENTNAME','intent','DIALOGFLOWV2_INTENTDISPLAYNAME','displayName','DIALOGFLOWV2_ISFALLBACKINTENT','isFallback','DIALOGFLOWV2_QUERYTEXT','queryText','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','providerResponse','fulfillmentText','push','all','stop','lodash','dialogflow','md5','moment','bluebird','../../../../config/logger'];(function(_0x3e329f,_0x122302){var _0x3e1a0d=function(_0x2b1443){while(--_0x2b1443){_0x3e329f['push'](_0x3e329f['shift']());}};_0x3e1a0d(++_0x122302);}(_0x4228,0xd8));var _0x8422=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4228[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x8422('0x0'));var dialogflow=require(_0x8422('0x1'));var md5=require(_0x8422('0x2'));var moment=require(_0x8422('0x3'));var Promise=require(_0x8422('0x4'));var logger=require(_0x8422('0x5'))(_0x8422('0x6'));var utils=require('./utils');var rpc={'chatMessage':require(_0x8422('0x7')),'openchannelMessage':require(_0x8422('0x8')),'mailMessage':require(_0x8422('0x9')),'smsMessage':require(_0x8422('0xa')),'faxMessage':require(_0x8422('0xb')),'whatsappMessage':require(_0x8422('0xc'))};function createMessage(_0x3b6647,_0x3978de,_0xbd7097,_0x257fd9){return new Promise(function(_0x49fa10,_0x16e421){var _0x5f0e85=_[_0x8422('0xd')](_0xbd7097);_0x5f0e85[_0x8422('0xe')]=_0x257fd9;return rpc[_0x3978de+_0x8422('0xf')][_0x8422('0x10')](_0x5f0e85)[_0x8422('0x11')](function(){logger['info'](_0x8422('0x12'),_0x3b6647,_0x5f0e85[_0x8422('0xe')]);_0x49fa10();})['catch'](function(_0xa014f1){logger['error'](_0x8422('0x12'),_0x3b6647,JSON[_0x8422('0x13')](_0xa014f1));_0x16e421(_0xa014f1);});});}exports[_0x8422('0x14')]=function(_0xe5cd2c,_0x2347b8){return function(_0x29f93f){try{if(!_[_0x8422('0x15')](this[_0x8422('0x16')]['UserId'])){logger[_0x8422('0x17')](_0x8422('0x12'),_0xe5cd2c,_0x8422('0x18'));return _0x29f93f[_0x8422('0x19')]();}var _0x5cb6c7={'ContactId':this['contact']['id'],'sentAt':moment()[_0x8422('0x1a')](_0x8422('0x1b')),'direction':_0x8422('0x1c')};if(this[_0x8422('0x1d')]==='sms'||this[_0x8422('0x1d')]===_0x8422('0x1e')){_0x5cb6c7[_0x8422('0x1f')]=this[_0x8422('0x16')]['phone'];}var _0xba9e07=this[_0x8422('0x1d')];if(_0xba9e07===_0x8422('0x20')){_0x5cb6c7['ChatWebsiteId']=this[_0x8422('0x21')]['id'];}else{_0x5cb6c7[_[_0x8422('0x22')](_0xba9e07)+_0x8422('0x23')]=this[_0x8422('0x21')]['id'];}_0x5cb6c7[_[_0x8422('0x22')](_0xba9e07)+_0x8422('0x24')]=this['interaction']['id'];if(this[_0x8422('0x16')][_0x8422('0x25')]){var _0x51a46b=_0x2347b8[0x4];if(!_[_0x8422('0x26')](_0x51a46b)){_0x5cb6c7['body']=utils[_0x8422('0x27')](_0x51a46b,this);return rpc[_0xba9e07+_0x8422('0xf')][_0x8422('0x10')](_0x5cb6c7)[_0x8422('0x11')](function(_0x423033){logger[_0x8422('0x17')]('[%s][DIALOGFLOWV2]\x20%s',_0xe5cd2c,_0x5cb6c7[_0x8422('0xe')]);})[_0x8422('0x28')](function(_0x306f08){logger[_0x8422('0x29')](_0x8422('0x12'),_0xe5cd2c,JSON['stringify'](_0x306f08));})['finally'](function(){logger['info'](_0x8422('0x2a'),_0xe5cd2c);_0x29f93f['stop']();});}else{logger[_0x8422('0x17')](_0x8422('0x2b'),_0xe5cd2c);_0x29f93f['stop']();}}else{var _0x40ad0e=this;var _0x1155cd=_0x2347b8[0x2][_0x8422('0x2c')](/\\n/g,'\x0a');var _0x910cb2={'credentials':{'private_key':_0x1155cd,'client_email':_0x2347b8[0x1]}};var _0x321ada=new dialogflow[(_0x8422('0x2d'))](_0x910cb2);var _0x412b6f=_0x321ada[_0x8422('0x2e')](_0x2347b8[0x0],md5(_0x40ad0e[_0x8422('0x16')]['id']));var _0x35742f={'session':_0x412b6f,'queryInput':{'text':{'text':_0x40ad0e[_0x8422('0x2f')][_0x8422('0xe')],'languageCode':_0x2347b8[0x3]||'en'}}};return _0x321ada['detectIntent'](_0x35742f)[_0x8422('0x11')](function(_0x55a19b){if(_0x55a19b&&_0x55a19b[_0x8422('0x30')]){_0x40ad0e[_0x8422('0xe')][_0x8422('0x31')]=_0x55a19b;var _0x5504f5=_0x55a19b[0x0];var _0xbb4046=_0x5504f5[_0x8422('0x32')][_0x8422('0x33')]&&_0x5504f5[_0x8422('0x32')][_0x8422('0x33')]['fields']?_0x5504f5[_0x8422('0x32')][_0x8422('0x33')][_0x8422('0x34')][_0x8422('0x35')][_0x8422('0x36')]:![];_0x40ad0e[_0x8422('0xe')][_0x8422('0x37')]=_0x5504f5['queryResult']['action'];_0x40ad0e[_0x8422('0xe')][_0x8422('0x38')]=_0x5504f5[_0x8422('0x32')][_0x8422('0x39')];_0x40ad0e[_0x8422('0xe')]['DIALOGFLOWV2_ENDCONVERSATION']=_0x5504f5['queryResult'][_0x8422('0x33')]&&_0x5504f5[_0x8422('0x32')]['diagnosticInfo'][_0x8422('0x34')]?_0x5504f5['queryResult'][_0x8422('0x33')][_0x8422('0x34')]['end_conversation'][_0x8422('0x36')]:![];_0x40ad0e['body'][_0x8422('0x3a')]=_0x5504f5[_0x8422('0x32')][_0x8422('0x3b')]['name'];_0x40ad0e[_0x8422('0xe')][_0x8422('0x3c')]=_0x5504f5[_0x8422('0x32')][_0x8422('0x3b')][_0x8422('0x3d')];_0x40ad0e[_0x8422('0xe')][_0x8422('0x3e')]=_0x5504f5['queryResult'][_0x8422('0x3b')][_0x8422('0x3f')];_0x40ad0e[_0x8422('0xe')]['DIALOGFLOWV2_LANGUAGECODE']=_0x5504f5[_0x8422('0x32')]['languageCode'];_0x40ad0e['body'][_0x8422('0x40')]=_0x5504f5['queryResult'][_0x8422('0x41')];_0x40ad0e[_0x8422('0xe')][_0x8422('0x42')]=_0x5504f5[_0x8422('0x32')][_0x8422('0x43')];_0x5cb6c7[_0x8422('0x44')]=_0x8422('0x31');_0x5cb6c7[_0x8422('0x45')]=JSON[_0x8422('0x13')](_0x55a19b);var _0x488cb4=[];for(var _0xfabe08=0x0;_0xfabe08<_0x55a19b[_0x8422('0x30')];_0xfabe08++){var _0x3ccee3=_0x55a19b[_0xfabe08];if(_0x3ccee3&&_0x3ccee3[_0x8422('0x32')]&&_0x3ccee3[_0x8422('0x32')][_0x8422('0x46')]){_0x488cb4[_0x8422('0x47')](createMessage(_0xe5cd2c,_0xba9e07,_0x5cb6c7,_0x3ccee3['queryResult'][_0x8422('0x46')]));}}return Promise[_0x8422('0x48')](_0x488cb4)[_0x8422('0x11')](function(){if(_0xbb4046){_0x29f93f['next']();}else{_0x29f93f['stop']();}})[_0x8422('0x28')](function(_0x1cfb56){logger[_0x8422('0x29')](_0x8422('0x12'),_0xe5cd2c,JSON[_0x8422('0x13')](_0x1cfb56));_0x29f93f[_0x8422('0x19')]();});}})[_0x8422('0x28')](function(_0x32eae6){logger[_0x8422('0x29')](_0x8422('0x12'),_0xe5cd2c,_0x32eae6['message']);_0x29f93f[_0x8422('0x19')]();});}}catch(_0x56e4a4){logger[_0x8422('0x29')](_0x8422('0x12'),_0xe5cd2c,JSON[_0x8422('0x13')](_0x56e4a4));_0x29f93f[_0x8422('0x49')]();}};}; \ No newline at end of file +var _0x3fea=['displayName','DIALOGFLOWV2_ISFALLBACKINTENT','DIALOGFLOWV2_LANGUAGECODE','languageCode','DIALOGFLOWV2_QUERYTEXT','queryText','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','fulfillmentText','push','all','lodash','dialogflow','bluebird','../../../../config/logger','routing','./utils','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','body','Message','create','info','[%s][DIALOGFLOWV2]\x20%s','catch','error','stringify','interaction','UserId','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','out','channel','sms','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','getMustacheRender','then','finally','stop','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','SessionsClient','sessionPath','message','detectIntent','length','dialogflowV2','diagnosticInfo','queryResult','fields','end_conversation','boolValue','DIALOGFLOWV2_ACTION','action','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_ENDCONVERSATION','intent','DIALOGFLOWV2_INTENTDISPLAYNAME'];(function(_0x4f4ae5,_0xa38a31){var _0x3b0da9=function(_0x5a55aa){while(--_0x5a55aa){_0x4f4ae5['push'](_0x4f4ae5['shift']());}};_0x3b0da9(++_0xa38a31);}(_0x3fea,0x1bc));var _0xa3fe=function(_0x2aa56f,_0x3547a2){_0x2aa56f=_0x2aa56f-0x0;var _0x3ee05b=_0x3fea[_0x2aa56f];return _0x3ee05b;};'use strict';var _=require(_0xa3fe('0x0'));var dialogflow=require(_0xa3fe('0x1'));var md5=require('md5');var moment=require('moment');var Promise=require(_0xa3fe('0x2'));var logger=require(_0xa3fe('0x3'))(_0xa3fe('0x4'));var utils=require(_0xa3fe('0x5'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0xa3fe('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0xa3fe('0x7')),'whatsappMessage':require(_0xa3fe('0x8'))};function createMessage(_0x2971ba,_0x224ae8,_0x16ea77,_0x22a5a3){return new Promise(function(_0x3a9f7c,_0x557940){var _0x22ab44=_[_0xa3fe('0x9')](_0x16ea77);_0x22ab44[_0xa3fe('0xa')]=_0x22a5a3;return rpc[_0x224ae8+_0xa3fe('0xb')][_0xa3fe('0xc')](_0x22ab44)['then'](function(){logger[_0xa3fe('0xd')](_0xa3fe('0xe'),_0x2971ba,_0x22ab44['body']);_0x3a9f7c();})[_0xa3fe('0xf')](function(_0x3d49d9){logger[_0xa3fe('0x10')]('[%s][DIALOGFLOWV2]\x20%s',_0x2971ba,JSON[_0xa3fe('0x11')](_0x3d49d9));_0x557940(_0x3d49d9);});});}exports['consequence']=function(_0x43e5ad,_0x5718dc){return function(_0x16d9b0){try{if(!_['isNil'](this[_0xa3fe('0x12')][_0xa3fe('0x13')])){logger[_0xa3fe('0xd')]('[%s][DIALOGFLOWV2]\x20%s',_0x43e5ad,_0xa3fe('0x14'));return _0x16d9b0[_0xa3fe('0x15')]();}var _0x5668ae={'ContactId':this[_0xa3fe('0x16')]['id'],'sentAt':moment()[_0xa3fe('0x17')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0xa3fe('0x18')};if(this[_0xa3fe('0x19')]===_0xa3fe('0x1a')||this[_0xa3fe('0x19')]===_0xa3fe('0x1b')){_0x5668ae[_0xa3fe('0x1c')]=this[_0xa3fe('0x12')][_0xa3fe('0x1c')];}var _0x1242fc=this[_0xa3fe('0x19')];if(_0x1242fc===_0xa3fe('0x1d')){_0x5668ae[_0xa3fe('0x1e')]=this[_0xa3fe('0x1f')]['id'];}else{_0x5668ae[_[_0xa3fe('0x20')](_0x1242fc)+_0xa3fe('0x21')]=this[_0xa3fe('0x1f')]['id'];}_0x5668ae[_['upperFirst'](_0x1242fc)+_0xa3fe('0x22')]=this[_0xa3fe('0x12')]['id'];if(this[_0xa3fe('0x12')][_0xa3fe('0x23')]){var _0x3b0c94=_0x5718dc[0x4];if(!_[_0xa3fe('0x24')](_0x3b0c94)){_0x5668ae[_0xa3fe('0xa')]=utils[_0xa3fe('0x25')](_0x3b0c94,this);return rpc[_0x1242fc+_0xa3fe('0xb')][_0xa3fe('0xc')](_0x5668ae)[_0xa3fe('0x26')](function(_0x1a70d7){logger[_0xa3fe('0xd')](_0xa3fe('0xe'),_0x43e5ad,_0x5668ae[_0xa3fe('0xa')]);})['catch'](function(_0x51ce20){logger[_0xa3fe('0x10')](_0xa3fe('0xe'),_0x43e5ad,JSON[_0xa3fe('0x11')](_0x51ce20));})[_0xa3fe('0x27')](function(){logger['info']('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x43e5ad);_0x16d9b0[_0xa3fe('0x28')]();});}else{logger[_0xa3fe('0xd')](_0xa3fe('0x29'),_0x43e5ad);_0x16d9b0[_0xa3fe('0x28')]();}}else{var _0x2806df=this;var _0x5ba6ca=_0x5718dc[0x2]['replace'](/\\n/g,'\x0a');var _0x4a1bfa={'credentials':{'private_key':_0x5ba6ca,'client_email':_0x5718dc[0x1]}};var _0x2f0242=new dialogflow[(_0xa3fe('0x2a'))](_0x4a1bfa);var _0x19747f=_0x2f0242[_0xa3fe('0x2b')](_0x5718dc[0x0],md5(_0x2806df['interaction']['id']));var _0x2a1be3={'session':_0x19747f,'queryInput':{'text':{'text':_0x2806df[_0xa3fe('0x2c')][_0xa3fe('0xa')],'languageCode':_0x5718dc[0x3]||'en'}}};return _0x2f0242[_0xa3fe('0x2d')](_0x2a1be3)[_0xa3fe('0x26')](function(_0x2c7e64){if(_0x2c7e64&&_0x2c7e64[_0xa3fe('0x2e')]){_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x2f')]=_0x2c7e64;var _0x5179cb=_0x2c7e64[0x0];var _0xcc6984=_0x5179cb['queryResult'][_0xa3fe('0x30')]&&_0x5179cb['queryResult'][_0xa3fe('0x30')]['fields']?_0x5179cb[_0xa3fe('0x31')]['diagnosticInfo'][_0xa3fe('0x32')][_0xa3fe('0x33')][_0xa3fe('0x34')]:![];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x35')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x36')];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x37')]=_0x5179cb['queryResult'][_0xa3fe('0x38')];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x39')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x30')]&&_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x30')][_0xa3fe('0x32')]?_0x5179cb['queryResult'][_0xa3fe('0x30')][_0xa3fe('0x32')][_0xa3fe('0x33')][_0xa3fe('0x34')]:![];_0x2806df[_0xa3fe('0xa')]['DIALOGFLOWV2_INTENTNAME']=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x3a')]['name'];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x3b')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x3a')][_0xa3fe('0x3c')];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x3d')]=_0x5179cb['queryResult']['intent']['isFallback'];_0x2806df['body'][_0xa3fe('0x3e')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x3f')];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x40')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x41')];_0x2806df[_0xa3fe('0xa')][_0xa3fe('0x42')]=_0x5179cb[_0xa3fe('0x31')][_0xa3fe('0x43')];_0x5668ae[_0xa3fe('0x44')]=_0xa3fe('0x2f');_0x5668ae['providerResponse']=JSON[_0xa3fe('0x11')](_0x2c7e64);var _0x55f69f=[];for(var _0x1c5d2d=0x0;_0x1c5d2d<_0x2c7e64[_0xa3fe('0x2e')];_0x1c5d2d++){var _0x4ea318=_0x2c7e64[_0x1c5d2d];if(_0x4ea318&&_0x4ea318[_0xa3fe('0x31')]&&_0x4ea318[_0xa3fe('0x31')][_0xa3fe('0x45')]){_0x55f69f[_0xa3fe('0x46')](createMessage(_0x43e5ad,_0x1242fc,_0x5668ae,_0x4ea318[_0xa3fe('0x31')]['fulfillmentText']));}}return Promise[_0xa3fe('0x47')](_0x55f69f)[_0xa3fe('0x26')](function(){if(_0xcc6984){_0x16d9b0[_0xa3fe('0x15')]();}else{_0x16d9b0[_0xa3fe('0x28')]();}})[_0xa3fe('0xf')](function(_0x49fa16){logger[_0xa3fe('0x10')](_0xa3fe('0xe'),_0x43e5ad,JSON[_0xa3fe('0x11')](_0x49fa16));_0x16d9b0[_0xa3fe('0x15')]();});}})[_0xa3fe('0xf')](function(_0x4fb8ef){logger[_0xa3fe('0x10')](_0xa3fe('0xe'),_0x43e5ad,_0x4fb8ef[_0xa3fe('0x2c')]);_0x16d9b0[_0xa3fe('0x15')]();});}}catch(_0x5dd5fe){logger[_0xa3fe('0x10')]('[%s][DIALOGFLOWV2]\x20%s',_0x43e5ad,JSON['stringify'](_0x5dd5fe));_0x16d9b0[_0xa3fe('0x28')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotoif.js b/server/services/routing/server/applications/gotoif.js index 3a7ac38..2842614 100644 --- a/server/services/routing/server/applications/gotoif.js +++ b/server/services/routing/server/applications/gotoif.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -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 +var _0xde68=['stringify','validate','lodash','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','getMustacheRender','replace','length','error','[%s][GOTOIF]\x20%s','map','message','join','stop','condition','priorityTrue','priorityFalse','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','findIndex','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s'];(function(_0x5179a5,_0x419746){var _0x15c8ce=function(_0x1b13c4){while(--_0x1b13c4){_0x5179a5['push'](_0x5179a5['shift']());}};_0x15c8ce(++_0x419746);}(_0xde68,0x71));var _0x8de6=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0xde68[_0x2d2c16];return _0x53f2fb;};'use strict';var schema=require(_0x8de6('0x0'));var _=require(_0x8de6('0x1'));var htmlToText=require('html-to-text');var utils=require('./utils');var logger=require('../../../../config/logger')(_0x8de6('0x2'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0x8de6('0x3')},'priorityTrue':{'type':_0x8de6('0x4'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x8de6('0x4'),'message':_0x8de6('0x5')}});exports[_0x8de6('0x6')]=function(_0x31b4a3,_0x44d635){return function(_0x33c2c0){try{var _0x4691d9={'condition':htmlToText['fromString'](utils[_0x8de6('0x7')](_0x44d635[0x0],this),{'wordwrap':![]})[_0x8de6('0x8')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x44d635[0x1],'priorityFalse':_0x44d635[0x2]};var _0x3854a9=gotoif[_0x8de6('0x0')](_0x4691d9,{'typecast':!![]});if(_0x3854a9[_0x8de6('0x9')]){logger[_0x8de6('0xa')](_0x8de6('0xb'),_0x31b4a3,_[_0x8de6('0xc')](_0x3854a9,_0x8de6('0xd'))[_0x8de6('0xe')](',\x20'));_0x33c2c0[_0x8de6('0xf')]();}else{try{var _0x47a542=eval('('+_0x4691d9[_0x8de6('0x10')]+')');var _0x2c52ac=_0x47a542?_0x4691d9[_0x8de6('0x11')]:_0x4691d9[_0x8de6('0x12')];logger['info'](_0x8de6('0x13'),_0x31b4a3,_0x4691d9[_0x8de6('0x10')],_0x47a542,_0x2c52ac||'next');if(_0x2c52ac){var _0x9e4eda=_[_0x8de6('0x14')](_0x33c2c0[_0x8de6('0x15')](),{'p':_0x2c52ac});if(_0x9e4eda>=0x0){logger[_0x8de6('0x16')](_0x8de6('0x17'),_0x31b4a3,_0x2c52ac||_0x8de6('0x18'),_0x9e4eda);_0x33c2c0[_0x8de6('0x18')](_0x9e4eda);}else{logger[_0x8de6('0x16')](_0x8de6('0x19'),_0x31b4a3,_0x2c52ac||'next');_0x33c2c0['stop']();}}else{_0x33c2c0['next']();}}catch(_0x570f63){logger[_0x8de6('0xa')](_0x8de6('0x1a'),_0x31b4a3,_0x570f63['message']);_0x33c2c0[_0x8de6('0xf')]();}}}catch(_0x5a6602){logger[_0x8de6('0xa')](_0x8de6('0xb'),_0x31b4a3,JSON[_0x8de6('0x1b')](_0x5a6602));_0x33c2c0[_0x8de6('0xf')]();}};}; \ 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 2b2376a..4d7e20b 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 _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 +var _0x2616=['error','map','message','stop','priority','findIndex','rules','info','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','[%s][GOTOP]\x20%s','lodash','../../../../config/logger','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','validate','length'];(function(_0x4c1ad8,_0x55e28d){var _0x2c617b=function(_0x5f80df){while(--_0x5f80df){_0x4c1ad8['push'](_0x4c1ad8['shift']());}};_0x2c617b(++_0x55e28d);}(_0x2616,0xbf));var _0x6261=function(_0x29632e,_0x5ecba4){_0x29632e=_0x29632e-0x0;var _0x426e04=_0x2616[_0x29632e];return _0x426e04;};'use strict';var schema=require('validate');var _=require(_0x6261('0x0'));var logger=require(_0x6261('0x1'))('routing');var gotop=schema({'priority':{'type':_0x6261('0x2'),'required':!![],'message':_0x6261('0x3')}});exports[_0x6261('0x4')]=function(_0xc8c2a,_0x2dd9ff){return function(_0x57c7c9){try{var _0x272835={'priority':_0x2dd9ff[0x0]};var _0x5bf0d0=gotop[_0x6261('0x5')](_0x272835,{'typecast':!![]});if(_0x5bf0d0[_0x6261('0x6')]){logger[_0x6261('0x7')]('[%s][GOTOP]\x20%s',_0xc8c2a,_[_0x6261('0x8')](_0x5bf0d0,_0x6261('0x9'))['join'](',\x20'));_0x57c7c9[_0x6261('0xa')]();}else{logger['info']('[%s][GOTOP]\x20priority\x20%s',_0xc8c2a,_0x272835['priority']);if(_0x272835[_0x6261('0xb')]){var _0x428f6e=_[_0x6261('0xc')](_0x57c7c9[_0x6261('0xd')](),{'p':_0x272835[_0x6261('0xb')]});if(_0x428f6e>=0x0){logger[_0x6261('0xe')]('[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0xc8c2a,_0x272835[_0x6261('0xb')]||_0x6261('0xf'),_0x428f6e);_0x57c7c9[_0x6261('0xf')](_0x428f6e);}else{logger[_0x6261('0xe')](_0x6261('0x10'),_0xc8c2a,_0x272835[_0x6261('0xb')]||_0x6261('0xf'));_0x57c7c9[_0x6261('0xa')]();}}else{_0x57c7c9[_0x6261('0xf')]();}}}catch(_0x235b93){logger['error'](_0x6261('0x11'),_0xc8c2a,JSON['stringify'](_0x235b93));_0x57c7c9['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 f4524b6..528e94f 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 _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 +var _0x486e=['../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','upperFirst','InteractionId','interaction','Message','create','info','[%s][MESSAGE]\x20%s','body','stringify','stop','lodash','./utils','routing','../../rpc/chatMessage'];(function(_0x546cfb,_0x330e9d){var _0x46025b=function(_0x2efb35){while(--_0x2efb35){_0x546cfb['push'](_0x546cfb['shift']());}};_0x46025b(++_0x330e9d);}(_0x486e,0xb2));var _0xe486=function(_0xb1b07d,_0x2c6bc3){_0xb1b07d=_0xb1b07d-0x0;var _0x2fba26=_0x486e[_0xb1b07d];return _0x2fba26;};'use strict';var _=require(_0xe486('0x0'));var utils=require(_0xe486('0x1'));var logger=require('../../../../config/logger')(_0xe486('0x2'));var rpc={'chatMessage':require(_0xe486('0x3')),'openchannelMessage':require(_0xe486('0x4')),'mailMessage':require(_0xe486('0x5')),'smsMessage':require(_0xe486('0x6')),'faxMessage':require(_0xe486('0x7')),'whatsappMessage':require(_0xe486('0x8'))};exports[_0xe486('0x9')]=function(_0x37910f,_0x25034d){return function(_0x1bf55d){try{var _0x4fac5d={'body':utils[_0xe486('0xa')](_0x25034d[0x0],this),'ContactId':this[_0xe486('0xb')]['id']};if(this[_0xe486('0xc')]===_0xe486('0xd')){_0x4fac5d[_0xe486('0xe')]=this[_0xe486('0xf')]['id'];}else{_0x4fac5d[_[_0xe486('0x10')](this[_0xe486('0xc')])+'AccountId']=this['account']['id'];}_0x4fac5d[_[_0xe486('0x10')](this[_0xe486('0xc')])+_0xe486('0x11')]=this[_0xe486('0x12')]['id'];if(rpc[this[_0xe486('0xc')]+_0xe486('0x13')]){return rpc[this[_0xe486('0xc')]+_0xe486('0x13')][_0xe486('0x14')](_0x4fac5d)['then'](function(_0x5a1aad){logger[_0xe486('0x15')](_0xe486('0x16'),_0x37910f,_0x4fac5d[_0xe486('0x17')]);_0x1bf55d['next']();})['catch'](function(_0x339746){logger['error'](_0xe486('0x16'),_0x37910f,JSON[_0xe486('0x18')](_0x339746));_0x1bf55d[_0xe486('0x19')]();});}}catch(_0x355002){logger['error']('[%s][MESSAGE]\x20%s',_0x37910f,JSON[_0xe486('0x18')](_0x355002));_0x1bf55d[_0xe486('0x19')]();}};}; \ 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 389b053..3496408 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 _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 +var _0xf699=['error','stringify','./utils','routing','[%s][NOOP]\x20%s'];(function(_0x55e702,_0x32fc89){var _0x427178=function(_0x23f128){while(--_0x23f128){_0x55e702['push'](_0x55e702['shift']());}};_0x427178(++_0x32fc89);}(_0xf699,0xd9));var _0x9f69=function(_0x37d9a9,_0x598bf6){_0x37d9a9=_0x37d9a9-0x0;var _0x5a2ee4=_0xf699[_0x37d9a9];return _0x5a2ee4;};'use strict';var utils=require(_0x9f69('0x0'));var logger=require('../../../../config/logger')(_0x9f69('0x1'));exports['consequence']=function(_0x46e031,_0x2285b1){return function(_0x3945f0){try{logger['info'](_0x9f69('0x2'),_0x46e031,utils['getMustacheRender'](_0x2285b1[0x0],this));_0x3945f0['next']();}catch(_0x46a4f0){logger[_0x9f69('0x3')](_0x9f69('0x2'),_0x46e031,JSON[_0x9f69('0x4')](_0x46a4f0));_0x3945f0['stop']();}};}; \ 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 5d2f45f..cd4fc88 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 _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 +var _0xc985=['../../rpc/mailQueueReport','../../rpc/chatQueueReport','../../rpc/faxQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','body','from','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','MessageId','message','chat','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','accepted','[%s][STOP:QUEUE][NAME:%s]','update','update\x20queue\x20report','timeout','[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','length','[%s][QUEUE]\x20%s','map','join','find','Queues','createQueue','rules','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close','stop','complete','[%s][QUEUE]\x20APPLICATION\x20END','next','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','stack','validate','lodash','util','ioredis','../../../../config/logger','routing','./strategy','redis','defaults','localhost','socket.io-emitter','queue_id','account','queue','joinAt','emit','clone','format','%sQueuesWaitingInteractions','pick','%s_queue_waiting_interaction:%s','save','../../rpc/openchannelQueueReport'];(function(_0x402efc,_0x11d779){var _0xd1e5f=function(_0x4d8ffa){while(--_0x4d8ffa){_0x402efc['push'](_0x402efc['shift']());}};_0xd1e5f(++_0x11d779);}(_0xc985,0x85));var _0x5c98=function(_0x1d545e,_0x34f842){_0x1d545e=_0x1d545e-0x0;var _0x5650b1=_0xc985[_0x1d545e];return _0x5650b1;};'use strict';var schema=require(_0x5c98('0x0'));var _=require(_0x5c98('0x1'));var util=require(_0x5c98('0x2'));var seqqueue=require('seq-queue');var moment=require('moment');var Redis=require(_0x5c98('0x3'));var config=require('../../../../config/environment');var logger=require(_0x5c98('0x4'))(_0x5c98('0x5'));var strategy=require(_0x5c98('0x6'));config[_0x5c98('0x7')]=_[_0x5c98('0x8')](config[_0x5c98('0x7')],{'host':_0x5c98('0x9'),'port':0x18eb});var io=require(_0x5c98('0xa'))(new Redis(config['redis']));var attributes=['id',_0x5c98('0xb'),_0x5c98('0xc'),_0x5c98('0xd'),'from',_0x5c98('0xe')];function emit(_0x215cc5,_0x4613d9,_0x4e3f94){io['to'](_0x215cc5)[_0x5c98('0xf')](_0x4613d9,_0x4e3f94);}function emitChannelQueueInteraction(_0x1f8330,_0xa48665,_0x435727,_0x19affb,_0x3d1b1a,_0x35f108,_0x50788c,_0x593adc){var _0x3208c4=_[_0x5c98('0x10')](_0x435727);_0x3208c4[_0x5c98('0xb')]=_0x593adc;_0x3208c4[_0x5c98('0xd')]=_0xa48665;_0x3208c4[_0x5c98('0xc')]=_0x19affb;_0x3208c4['id']=_0x3d1b1a;if(_0x35f108){_0x50788c[util[_0x5c98('0x11')](_0x5c98('0x12'),_0x1f8330)][_0x3d1b1a]=_[_0x5c98('0x13')](_0x3208c4,attributes);}else{delete _0x50788c[util['format']('%sQueuesWaitingInteractions',_0x1f8330)][_0x3d1b1a];}emit(util[_0x5c98('0x11')]('%s:queue:%s',_0x1f8330,_0xa48665),util[_0x5c98('0x11')](_0x5c98('0x14'),_0x1f8330,_0x35f108?_0x5c98('0x15'):'remove'),_['pick'](_0x3208c4,attributes));}var rpc={'openchannelQueueReport':require(_0x5c98('0x16')),'mailQueueReport':require(_0x5c98('0x17')),'chatQueueReport':require(_0x5c98('0x18')),'smsQueueReport':require('../../rpc/smsQueueReport'),'faxQueueReport':require(_0x5c98('0x19')),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x5c98('0x1a'),'required':!![],'message':_0x5c98('0x1b')},'timeout':{'type':_0x5c98('0x1c'),'message':_0x5c98('0x1d')}});function startRouting(_0x3c5816,_0xc36fa,_0x4b69aa,_0x8b1a38){if(_0x3c5816&&_0xc36fa&&_0x4b69aa){_0xc36fa['waiting']+=0x1;var _0x3f5641={'uniqueid':_0x3c5816,'from':_0x4b69aa[_0x5c98('0x1e')]?_0x4b69aa[_0x5c98('0x1e')][_0x5c98('0x1f')]:'','joinAt':moment()[_0x5c98('0x11')](_0x5c98('0x20')),'ContactId':_0x4b69aa[_0x5c98('0x21')]?_0x4b69aa[_0x5c98('0x21')]['id']:null,'ListId':_0x4b69aa[_0x5c98('0x22')]?_0x4b69aa[_0x5c98('0x22')]['id']:null};_0x3f5641[_[_0x5c98('0x23')](_0x4b69aa[_0x5c98('0x24')])+_0x5c98('0x25')]=_0xc36fa['id']||null;_0x3f5641[_[_0x5c98('0x23')](_0x4b69aa[_0x5c98('0x24')])+_0x5c98('0x26')]=_0x4b69aa[_0x5c98('0x27')]?_0x4b69aa['interaction']['id']:null;_0x3f5641[_['upperFirst'](_0x4b69aa[_0x5c98('0x24')])+_0x5c98('0x28')]=_0x4b69aa[_0x5c98('0x29')]?_0x4b69aa[_0x5c98('0x29')]['id']:null;_0x3f5641[_[_0x5c98('0x23')](_0x4b69aa[_0x5c98('0x24')])+(_0x4b69aa[_0x5c98('0x24')]!==_0x5c98('0x2a')?'AccountId':_0x5c98('0x2b'))]=_0x4b69aa[_0x5c98('0xc')]?_0x4b69aa[_0x5c98('0xc')]['id']:null;logger[_0x5c98('0x2c')](util[_0x5c98('0x11')](_0x5c98('0x2d'),_0x3c5816,_0xc36fa[_0x5c98('0x2e')]));emitChannelQueueInteraction(_0x4b69aa[_0x5c98('0x24')],_0xc36fa[_0x5c98('0x2e')],_0x3f5641,_0x4b69aa['account'][_0x5c98('0x2e')],_0x4b69aa['message']['id'],!![],_0x8b1a38,_0xc36fa['id']);if(rpc[_0x4b69aa['channel']+_0x5c98('0x2f')]){return rpc[_0x4b69aa['channel']+'QueueReport'][_0x5c98('0x30')](_0x3f5641)[_0x5c98('0x31')](function(_0x1f2b98){logger[_0x5c98('0x32')]('create\x20queue\x20report');});}}}function stopRouting(_0x98b7,_0x5258bb,_0x425d25,_0x414315){if(_0x98b7&&_0x5258bb){_0x5258bb['waiting']-=0x1;var _0x6ae2cd={'leaveAt':moment()['format'](_0x5c98('0x20')),'acceptAt':moment()[_0x5c98('0x11')](_0x5c98('0x20')),'reason':_0x5c98('0x33')};logger['info'](util[_0x5c98('0x11')](_0x5c98('0x34'),_0x98b7,_0x5258bb[_0x5c98('0x2e')]));emitChannelQueueInteraction(_0x425d25['channel'],_0x5258bb[_0x5c98('0x2e')],_0x425d25['body'],_0x425d25[_0x5c98('0xc')]['name'],_0x425d25[_0x5c98('0x29')]['id'],![],_0x414315,_0x5258bb['id']);if(rpc[_0x425d25[_0x5c98('0x24')]+_0x5c98('0x2f')]){return rpc[_0x425d25[_0x5c98('0x24')]+'QueueReport'][_0x5c98('0x35')](_0x98b7,_0x6ae2cd)['catch'](function(_0x11158b){logger[_0x5c98('0x32')](_0x5c98('0x36'));});}}}function endRouting(_0x577046,_0x2c795a,_0x2d782b,_0x22c93e){if(_0x577046&&_0x2c795a){_0x2c795a['waiting']-=0x1;var _0x572f4c={'leaveAt':moment()[_0x5c98('0x11')](_0x5c98('0x20')),'exitAt':moment()[_0x5c98('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'reason':_0x5c98('0x37')};logger[_0x5c98('0x2c')](util[_0x5c98('0x11')](_0x5c98('0x38'),_0x577046,_0x2c795a['name']));emitChannelQueueInteraction(_0x2d782b[_0x5c98('0x24')],_0x2c795a[_0x5c98('0x2e')],_0x2d782b['body'],_0x2d782b['account'][_0x5c98('0x2e')],_0x2d782b[_0x5c98('0x29')]['id'],![],_0x22c93e);if(rpc[_0x2d782b['channel']+'QueueReport']){return rpc[_0x2d782b[_0x5c98('0x24')]+'QueueReport'][_0x5c98('0x35')](_0x577046,_0x572f4c)['catch'](function(_0x2735e3){logger[_0x5c98('0x32')](_0x5c98('0x36'));});}}}function handleFindQueue(_0x257c77){return function(_0x325be1){return _0x325be1['name'][_0x5c98('0x39')]()===_0x257c77[_0x5c98('0x39')]();};}exports[_0x5c98('0x3a')]=function(_0x26e068,_0x194951,_0x1508c2,_0x27c54c){return function(_0x43a1da){try{var _0x3970ec={'name':_0x194951[0x0],'timeout':_0x194951[0x1]};var _0x90ef47=queue[_0x5c98('0x0')](_0x3970ec,{'typecast':!![]});if(_0x90ef47[_0x5c98('0x3b')]){logger[_0x5c98('0x32')](_0x5c98('0x3c'),_0x26e068,_[_0x5c98('0x3d')](_0x90ef47,_0x5c98('0x29'))[_0x5c98('0x3e')](',\x20'));_0x43a1da['stop']();}else{var _0x46a935=_[_0x5c98('0x3f')](_0x1508c2[_0x27c54c[_0x5c98('0x24')]+_0x5c98('0x40')],handleFindQueue(_0x3970ec[_0x5c98('0x2e')]));if(_0x46a935){startRouting(_0x26e068,_0x46a935,_0x27c54c,_0x1508c2);var _0x14616a=(_0x46a935['timeout']||0xa)*0x3e8;var _0x4ad8c9=(_0x3970ec[_0x5c98('0x37')]||0x14)*0x3e8;var _0x3aa981,_0x1f9e99;if(_0x14616a>_0x4ad8c9){_0x4ad8c9=_0x14616a;}var _0xcc8998=seqqueue[_0x5c98('0x41')](_0x14616a);_0xcc8998['id']=_0x26e068;_0xcc8998['atimeout']=_0x14616a;_0xcc8998['qtimeout']=_0x4ad8c9;_0xcc8998[_0x5c98('0x24')]=_0x27c54c[_0x5c98('0x24')];_0x1508c2[_0x5c98('0x42')][_0x26e068]['on'](_0x5c98('0x43'),function(){logger[_0x5c98('0x2c')](_0x5c98('0x44'),_0x26e068);stopRouting(_0x26e068,_0x46a935,_0x27c54c,_0x1508c2);clearTimeout(_0x3aa981);_0x3aa981=undefined;_0xcc8998[_0x5c98('0x45')](!![]);if(_0x1508c2['rules'][_0x26e068]){delete _0x1508c2['rules'][_0x26e068];}_0x43a1da[_0x5c98('0x46')]();});_0x1508c2['rules'][_0x26e068]['on'](_0x5c98('0x47'),function(){if(_0x1508c2[_0x5c98('0x42')][_0x26e068]){delete _0x1508c2[_0x5c98('0x42')][_0x26e068];}});_0x3aa981=setTimeout(function(){logger['info'](_0x5c98('0x48'),_0x26e068);endRouting(_0x26e068,_0x46a935,_0x27c54c,_0x1508c2);clearTimeout(_0x3aa981);_0xcc8998[_0x5c98('0x45')](!![]);_0x43a1da[_0x5c98('0x49')]();},_0x4ad8c9);switch(_0x46a935['strategy']){case _0x5c98('0x4a'):strategy[_0x5c98('0x4a')](_0xcc8998,_0x46a935,_0x1508c2,_0x27c54c);break;default:strategy[_0x5c98('0x4b')](_0xcc8998,_0x46a935,_0x1508c2,_0x27c54c);}}else{logger[_0x5c98('0x32')](_0x5c98('0x4c'),_0x26e068,_0x3970ec[_0x5c98('0x2e')]);_0x43a1da[_0x5c98('0x46')]();}}}catch(_0x4ad7fc){console['log'](_0x4ad7fc);logger['error'](_0x5c98('0x3c'),_0x26e068,_0x4ad7fc[_0x5c98('0x4d')]);_0x43a1da['stop']();}};}; \ 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 4266cdc..e41a91c 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 _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 +var _0xa09c=['push','handleRun','bind','handleTimeout','drained','handleDrained','prototype','[%s][AGENT]\x20try\x20with\x20%s','isNil','agents','info','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','forcedOwnership','channel','busy','busyQueue','showNotification','writeLog',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','TIMEOUT','exports','lodash','./util','../../../../../config/logger','routing','notificationId','squeue','agent','realtime'];(function(_0x31f25d,_0x26ff71){var _0x551e71=function(_0x4817c5){while(--_0x4817c5){_0x31f25d['push'](_0x31f25d['shift']());}};_0x551e71(++_0x26ff71);}(_0xa09c,0xb8));var _0xca09=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xa09c[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0xca09('0x0'));var uuid=require('uuid');var util=require(_0xca09('0x1'));var logger=require(_0xca09('0x2'))(_0xca09('0x3'));var Agent=function(_0x22f724,_0x11e882,_0x33a6aa,_0x55d401){this[_0xca09('0x4')]=uuid['v4']();this[_0xca09('0x5')]=_0x22f724;this[_0xca09('0x6')]=_0x11e882;this[_0xca09('0x7')]=_0x33a6aa;this[_0xca09('0x3')]=_0x55d401;this[_0xca09('0x5')][_0xca09('0x8')](this[_0xca09('0x9')][_0xca09('0xa')](this),this[_0xca09('0xb')][_0xca09('0xa')](this));this['squeue']['on']('timeout',this[_0xca09('0xb')][_0xca09('0xa')](this));this[_0xca09('0x5')]['on'](_0xca09('0xc'),this[_0xca09('0xd')][_0xca09('0xa')](this));};Agent[_0xca09('0xe')][_0xca09('0x8')]=function(){this[_0xca09('0x5')][_0xca09('0x8')](this[_0xca09('0x9')]['bind'](this),this[_0xca09('0xb')][_0xca09('0xa')](this));};Agent[_0xca09('0xe')][_0xca09('0xd')]=function(){this[_0xca09('0xb')](!![]);};Agent['prototype'][_0xca09('0x9')]=function(_0xf8f582){logger['info'](_0xca09('0xf'),this[_0xca09('0x5')]['id'],this[_0xca09('0x6')]['id']);if(_[_0xca09('0x10')](this['realtime'][_0xca09('0x11')][this[_0xca09('0x6')]['id']])){logger[_0xca09('0x12')](_0xca09('0x13'),this[_0xca09('0x5')]['id'],this[_0xca09('0x6')]['id']);setTimeout(this[_0xca09('0x8')][_0xca09('0xa')](this),0x3e8);}else{if(this['routing'][_0xca09('0x14')]||util['isAgentAvailable'](this[_0xca09('0x5')]['id'],this[_0xca09('0x7')][_0xca09('0x11')][this[_0xca09('0x6')]['id']],this[_0xca09('0x5')][_0xca09('0x15')],![])){this[_0xca09('0x7')][_0xca09('0x11')][this[_0xca09('0x6')]['id']][_0xca09('0x16')]=!![];this[_0xca09('0x7')][_0xca09('0x11')][this[_0xca09('0x6')]['id']][_0xca09('0x17')]=undefined;util[_0xca09('0x18')](this[_0xca09('0x4')],this[_0xca09('0x5')]['id'],this[_0xca09('0x7')][_0xca09('0x11')][this['agent']['id']],null,this[_0xca09('0x3')]);util[_0xca09('0x19')](this[_0xca09('0x5')]['id'],this[_0xca09('0x7')][_0xca09('0x11')][this['agent']['id']],'RINGING'+(this[_0xca09('0x3')][_0xca09('0x14')]?_0xca09('0x1a'):''));}else{logger[_0xca09('0x12')](_0xca09('0x1b'),this[_0xca09('0x5')]['id'],this[_0xca09('0x6')]['id']);setTimeout(this[_0xca09('0x8')][_0xca09('0xa')](this),0x3e8);}}};Agent[_0xca09('0xe')][_0xca09('0xb')]=function(_0x2ced05){if(_['isNil'](this['realtime']['agents'][this[_0xca09('0x6')]['id']])){return logger[_0xca09('0x12')](_0xca09('0x13'),this[_0xca09('0x5')]['id'],this[_0xca09('0x6')]['id']);}else{logger[_0xca09('0x12')](_0xca09('0x1c'),this[_0xca09('0x5')]['id'],this[_0xca09('0x6')]['id']);util[_0xca09('0x1d')](this[_0xca09('0x4')],this[_0xca09('0x5')]['id'],this[_0xca09('0x7')][_0xca09('0x11')][this['agent']['id']],null,this[_0xca09('0x3')]);this[_0xca09('0x7')][_0xca09('0x11')][this[_0xca09('0x6')]['id']][_0xca09('0x16')]=![];this[_0xca09('0x7')][_0xca09('0x11')][this[_0xca09('0x6')]['id']][_0xca09('0x17')]=undefined;util[_0xca09('0x19')](this['squeue']['id'],this['realtime'][_0xca09('0x11')][this[_0xca09('0x6')]['id']],_0x2ced05?'STOP':_0xca09('0x1e'));}if(!_0x2ced05){setTimeout(this[_0xca09('0x8')]['bind'](this),0x3e8);}};function agent(_0x3cfb8d,_0x1a3ebd,_0x5f21fc,_0x3eb3fc){return new Agent(_0x3cfb8d,_0x1a3ebd,_0x5f21fc,_0x3eb3fc);}module[_0xca09('0x1f')]=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 a9691c7..54c09b5 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 _0xf611=['writeLog','STOP','exports','uuid','./util','../../../../../config/logger','notificationId','squeue','routing','push','handleRun','handleTimeout','bind','handleDrained','prototype','isNil','queue','Agents','length','agents','info','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable','realtime','channel','busy','busyQueue','name','showNotification','[%s][QUEUE]\x20EMPTY'];(function(_0x237010,_0x588208){var _0x20f0cf=function(_0x115d5e){while(--_0x115d5e){_0x237010['push'](_0x237010['shift']());}};_0x20f0cf(++_0x588208);}(_0xf611,0x7b));var _0x1f61=function(_0x1fe9d8,_0x1b8bca){_0x1fe9d8=_0x1fe9d8-0x0;var _0xc894d7=_0xf611[_0x1fe9d8];return _0xc894d7;};'use strict';var _=require('lodash');var uuid=require(_0x1f61('0x0'));var util=require(_0x1f61('0x1'));var logger=require(_0x1f61('0x2'))('routing');var Beepall=function(_0x5e6707,_0x5ede64,_0x384593,_0x4e0df1){this[_0x1f61('0x3')]=uuid['v4']();this[_0x1f61('0x4')]=_0x5e6707;this['queue']=_0x5ede64;this['realtime']=_0x384593;this[_0x1f61('0x5')]=_0x4e0df1;this[_0x1f61('0x4')][_0x1f61('0x6')](this[_0x1f61('0x7')]['bind'](this),this[_0x1f61('0x8')][_0x1f61('0x9')](this));this[_0x1f61('0x4')]['on']('timeout',this[_0x1f61('0x8')][_0x1f61('0x9')](this));this['squeue']['on']('drained',this[_0x1f61('0xa')][_0x1f61('0x9')](this));};Beepall[_0x1f61('0xb')][_0x1f61('0x6')]=function(){this[_0x1f61('0x4')][_0x1f61('0x6')](this[_0x1f61('0x7')][_0x1f61('0x9')](this),this['handleTimeout'][_0x1f61('0x9')](this));};Beepall[_0x1f61('0xb')][_0x1f61('0xa')]=function(_0x185a00){this[_0x1f61('0x8')](!![]);};Beepall[_0x1f61('0xb')][_0x1f61('0x7')]=function(_0xfa978a){var _0x1a2b8d=!![];if(!_[_0x1f61('0xc')](this[_0x1f61('0xd')])&&!_[_0x1f61('0xc')](this[_0x1f61('0xd')][_0x1f61('0xe')])&&this[_0x1f61('0xd')][_0x1f61('0xe')][_0x1f61('0xf')]>0x0){for(var _0xd655a0=0x0,_0xf5e83a;_0xd655a00x0){for(var _0x49202a=0x0,_0x323040;_0x49202a0x0&&_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 +var _0xfb11=['PAUSE','hasOwnProperty','Capacity','CurrentCapacity','toUpperCase','\x20MAXCAPACITY','showNotification','hideNotification','writeLog','lodash','../utils','mustache','../../../../../config/environment','routing','defaults','redis','socket.io-emitter','emit','format','name','user:save','split','\x20interaction','account','notificationShake','body','queue','getMustacheRender','notificationTemplate','msg','I\x20can\x27t\x20render\x20your\x20template','error','[%s][QUEUE]\x20%s','message','user:%s','remove','info','isAgentAvailable','BUSY','online','OFFLINE','Pause'];(function(_0x204e39,_0x84e665){var _0x431b68=function(_0x15ebbb){while(--_0x15ebbb){_0x204e39['push'](_0x204e39['shift']());}};_0x431b68(++_0x84e665);}(_0xfb11,0x1ad));var _0x1fb1=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0xfb11[_0x2160a9];return _0xa88cf7;};'use strict';var _=require(_0x1fb1('0x0'));var util=require('util');var utils=require(_0x1fb1('0x1'));var Mustache=require(_0x1fb1('0x2'));var Redis=require('ioredis');var config=require(_0x1fb1('0x3'));var logger=require('../../../../../config/logger')(_0x1fb1('0x4'));config['redis']=_[_0x1fb1('0x5')](config[_0x1fb1('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x1fb1('0x7'))(new Redis(config[_0x1fb1('0x6')]));function emit(_0x4c098d,_0x1859da,_0x2596c2){io['to'](_0x4c098d)[_0x1fb1('0x8')](_0x1859da,_0x2596c2);}function sendNotification(_0x236b20,_0x161e1b,_0x2d6be9,_0x438d15,_0x416625,_0x377aae){io['to'](util[_0x1fb1('0x9')]('user:%s',_0x438d15[_0x1fb1('0xa')]))['emit'](_0x1fb1('0xb'),_0x438d15);var _0x58b66e=_0x377aae||{};var _0xa977b1=_0x2d6be9[_0x1fb1('0xc')]('.');var _0xd39b52={'uniqueid':_0x161e1b,'channel':_0xa977b1[0x0],'id':_0xa977b1[0x1],'title':_0xa977b1[0x0]+_0x1fb1('0xd'),'interactionId':_0xa977b1[0x2],'queue':_0x416625?_0x416625[_0x1fb1('0xa')]:null,'sound':_0x58b66e[_0x1fb1('0xe')]['notificationSound'],'shake':_0x58b66e[_0x1fb1('0xe')][_0x1fb1('0xf')]};try{if(!_0x58b66e[_0x1fb1('0x10')]){_0x58b66e[_0x1fb1('0x10')]={};}if(_0x416625){_0x58b66e[_0x1fb1('0x10')][_0x1fb1('0x11')]=_0x416625;}else if(_0x58b66e[_0x1fb1('0x10')][_0x1fb1('0x11')]){delete _0x58b66e[_0x1fb1('0x10')]['queue'];}_0xd39b52['msg']=utils[_0x1fb1('0x12')](_0x58b66e[_0x1fb1('0xe')][_0x1fb1('0x13')],_0x58b66e);}catch(_0x5e0f16){_0xd39b52[_0x1fb1('0x14')]=_0x1fb1('0x15');logger[_0x1fb1('0x16')](util[_0x1fb1('0x9')](_0x1fb1('0x17'),_0x161e1b,_0x5e0f16[_0x1fb1('0x18')]));}io['to'](util[_0x1fb1('0x9')](_0x1fb1('0x19'),_0x438d15[_0x1fb1('0xa')]))['emit'](util[_0x1fb1('0x9')]('notification:%s',_0x236b20?'save':_0x1fb1('0x1a')),_0xd39b52);}function writeLog(_0x313d9a,_0x1eaf9e,_0x54ad97){return logger[_0x1fb1('0x1b')](util['format']('[%s][QUEUE][AGENT:%s][STATUS:%s]',_0x313d9a,_0x1eaf9e['name'],_0x54ad97));}exports[_0x1fb1('0x1c')]=function(_0x1f8e5a,_0x12c1d0,_0x10924f,_0x303a06){if(_0x12c1d0['busy']){writeLog(_0x1f8e5a,_0x12c1d0,_0x1fb1('0x1d'));return![];}if(!_0x12c1d0[_0x1fb1('0x1e')]){writeLog(_0x1f8e5a,_0x12c1d0,_0x1fb1('0x1f'));return![];}if(_0x12c1d0[_0x10924f+_0x1fb1('0x20')]){writeLog(_0x1f8e5a,_0x12c1d0,_0x1fb1('0x21'));return![];}if(_0x303a06&&_0x12c1d0[_0x1fb1('0x22')](_0x10924f+_0x1fb1('0x23'))&&_0x12c1d0[_0x1fb1('0x22')](_0x10924f+'CurrentCapacity')){if(_0x12c1d0[_0x10924f+_0x1fb1('0x23')]>0x0&&_0x12c1d0[_0x10924f+_0x1fb1('0x24')]>=_0x12c1d0[_0x10924f+_0x1fb1('0x23')]){writeLog(_0x1f8e5a,_0x12c1d0,_0x10924f[_0x1fb1('0x25')]()+_0x1fb1('0x26'));return![];}}return!![];};exports[_0x1fb1('0x27')]=function(_0x1a74c4,_0x15992c,_0xa7bba,_0x33a3b7,_0x5e99e7){return sendNotification(!![],_0x1a74c4,_0x15992c,_0xa7bba,_0x33a3b7,_0x5e99e7);};exports[_0x1fb1('0x28')]=function(_0x39fc43,_0xe8ec0a,_0x2f6c88,_0x520ee2,_0x106134){return sendNotification(![],_0x39fc43,_0xe8ec0a,_0x2f6c88,_0x520ee2,_0x106134);};exports[_0x1fb1('0x29')]=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 8c5ccea..356620a 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 _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 +var _0xcee7=['[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','info','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isEmpty','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','isObject','stringify','validate','shelljs','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','[%s][SYSTEM]\x20%s','map','message','join'];(function(_0x737d30,_0x5a561c){var _0x1b6419=function(_0x1a7835){while(--_0x1a7835){_0x737d30['push'](_0x737d30['shift']());}};_0x1b6419(++_0x5a561c);}(_0xcee7,0x160));var _0x7cee=function(_0x442f08,_0x237849){_0x442f08=_0x442f08-0x0;var _0x4abb08=_0xcee7[_0x442f08];return _0x4abb08;};'use strict';var schema=require(_0x7cee('0x0'));var sh=require(_0x7cee('0x1'));var _=require('lodash');var utils=require('./utils');var logger=require('../../../../config/logger')(_0x7cee('0x2'));var system=schema({'command':{'type':_0x7cee('0x3'),'required':!![],'message':_0x7cee('0x4')}});exports[_0x7cee('0x5')]=function(_0x36c99e,_0x2f73be){return function(_0x26290a){try{var _0x73daa5={'command':_0x2f73be[0x0]};var _0x533e1d=system['validate'](_0x73daa5,{'typecast':!![]});if(_0x533e1d[_0x7cee('0x6')]){logger[_0x7cee('0x7')](_0x7cee('0x8'),_0x36c99e,_[_0x7cee('0x9')](_0x533e1d,_0x7cee('0xa'))[_0x7cee('0xb')](',\x20'));logger['info'](_0x7cee('0xc'),_0x36c99e);_0x26290a[_0x7cee('0xd')]();}else{var _0x5bf3bd=this;var _0x3103ae=utils['getMustacheRender'](_0x2f73be[0x0],this);logger[_0x7cee('0xe')](_0x7cee('0xf'),_0x36c99e,_0x3103ae);sh[_0x7cee('0x10')](_[_0x7cee('0x11')](_0x3103ae),function(_0x19ddea,_0x1048e4){logger['info'](_0x7cee('0x12'),_0x36c99e,_0x19ddea);if(_0x19ddea==0x0){var _0x522ac2=_0x1048e4[_0x7cee('0x13')](/(\r\n|\n|\r)/gm,'');if(_['isNil'](_0x2f73be[0x1])||_[_0x7cee('0x14')](_0x2f73be[0x1])){logger[_0x7cee('0xe')](_0x7cee('0x15'),_0x36c99e);_0x5bf3bd[_0x7cee('0x16')][_0x2f73be[0x1]]=_0x522ac2;}else{logger[_0x7cee('0xe')](_0x7cee('0x17'),_0x36c99e,_0x2f73be[0x1],_0x522ac2);_0x5bf3bd['body'][_0x2f73be[0x1]]=_0x522ac2;}}_0x26290a[_0x7cee('0xd')]();});}}catch(_0x4d483d){logger[_0x7cee('0x7')](_0x7cee('0x8'),_0x36c99e,_[_0x7cee('0x18')](_0x4d483d)?JSON[_0x7cee('0x19')](_0x4d483d):_0x4d483d);logger[_0x7cee('0xe')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x36c99e);_0x26290a[_0x7cee('0xd')]();}};}; \ 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 98ced5e..423e4c1 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 _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 +var _0x0e21=['join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','Interaction','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','stringify','finally','validate','lodash','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','[%s][TAG]\x20%s','map','message'];(function(_0x29c3a0,_0x32be87){var _0x430f8a=function(_0x4143d9){while(--_0x4143d9){_0x29c3a0['push'](_0x29c3a0['shift']());}};_0x430f8a(++_0x32be87);}(_0x0e21,0x1bf));var _0x10e2=function(_0x425716,_0x2e61f6){_0x425716=_0x425716-0x0;var _0x422a98=_0x0e21[_0x425716];return _0x422a98;};'use strict';var schema=require(_0x10e2('0x0'));var _=require(_0x10e2('0x1'));var rpc={'chatInteraction':require(_0x10e2('0x2')),'openchannelInteraction':require(_0x10e2('0x3')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0x10e2('0x4')),'faxInteraction':require(_0x10e2('0x5')),'whatsappInteraction':require(_0x10e2('0x6'))};var logger=require(_0x10e2('0x7'))(_0x10e2('0x8'));var tag=schema({'tag':{'type':_0x10e2('0x9'),'required':!![],'message':_0x10e2('0xa')}});exports[_0x10e2('0xb')]=function(_0x401a54,_0x1f9c10,_0xeace0d,_0x7437ad){return function(_0x762a12){try{var _0x6b0078={'tag':_0x1f9c10[0x0]};var _0x37ce02=tag[_0x10e2('0x0')](_0x6b0078,{'typecast':!![]});if(_0x37ce02[_0x10e2('0xc')]){logger[_0x10e2('0xd')](_0x10e2('0xe'),_0x401a54,_[_0x10e2('0xf')](_0x37ce02,_0x10e2('0x10'))[_0x10e2('0x11')](',\x20'));logger[_0x10e2('0x12')](_0x10e2('0x13'),_0x401a54);_0x762a12[_0x10e2('0x14')]();}else{var _0x2ee859={'ids':[_0x1f9c10[0x0]]};if(rpc[_0x7437ad[_0x10e2('0x15')]+_0x10e2('0x16')]){rpc[_0x7437ad[_0x10e2('0x15')]+_0x10e2('0x16')]['addTags'](_0x7437ad[_0x10e2('0x17')]['id'],_0x2ee859)[_0x10e2('0x18')](function(_0x318caf){logger[_0x10e2('0x12')](_0x10e2('0x19'),_0x401a54,_0x1f9c10[0x1],_0x7437ad['channel'],_0x7437ad[_0x10e2('0x17')]['id']);})[_0x10e2('0x1a')](function(_0x15e08f){logger[_0x10e2('0xd')](_0x10e2('0xe'),_0x401a54,JSON[_0x10e2('0x1b')](_0x15e08f));logger[_0x10e2('0x12')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x401a54);})[_0x10e2('0x1c')](function(){_0x762a12['next']();});}}}catch(_0x59281f){logger['error']('[%s][TAG]\x20%s',_0x401a54,_['isObject'](_0x59281f)?JSON[_0x10e2('0x1b')](_0x59281f):_0x59281f);logger[_0x10e2('0x12')](_0x10e2('0x13'),_0x401a54);_0x762a12[_0x10e2('0x14')]();}};}; \ 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 af37882..e0b8fe3 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 _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 +var _0xe706=['exports','render','merge','body','contact','message','account','interaction','list','mustache','lodash'];(function(_0x409cd9,_0x5a844c){var _0x4a5cb6=function(_0x21e686){while(--_0x21e686){_0x409cd9['push'](_0x409cd9['shift']());}};_0x4a5cb6(++_0x5a844c);}(_0xe706,0xa3));var _0x6e70=function(_0x5ea82f,_0x41ef96){_0x5ea82f=_0x5ea82f-0x0;var _0x2f38b6=_0xe706[_0x5ea82f];return _0x2f38b6;};'use strict';var Mustache=require(_0x6e70('0x0'));var _=require(_0x6e70('0x1'));module[_0x6e70('0x2')]={'getMustacheRender':function(_0x5e8446,_0x2cae77){return Mustache[_0x6e70('0x3')](_0x5e8446,_[_0x6e70('0x4')](_0x2cae77[_0x6e70('0x5')],{'contact':_0x2cae77[_0x6e70('0x6')],'message':_0x2cae77[_0x6e70('0x7')],'account':_0x2cae77[_0x6e70('0x8')],'interaction':_0x2cae77[_0x6e70('0x9')],'list':_0x2cae77[_0x6e70('0xa')]}))||'';}}; \ No newline at end of file diff --git a/server/services/routing/server/index.js b/server/services/routing/server/index.js index a5281cc..230fa57 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 _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 +var _0x9193=['http','127.0.0.1','RPC\x20listening\x20on\x20port:','util','path','uuid','../../../config/environment','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','isArray','applications','length','join','.js','app','mail','push','slice','dialogflow','appdata','split','dialogflowv2','amazonlex','tag','%s:%s:%s','./interval','condition','intervals','./applications/','priority','info','Push\x20new\x20rule','on\x20interval','error','Please\x20create\x20a\x20new\x20file\x20under','execute','stringify','matchPath','emit','complete','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','end','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','values','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','server'];(function(_0x1a36a5,_0x746928){var _0x746243=function(_0x481966){while(--_0x481966){_0x1a36a5['push'](_0x1a36a5['shift']());}};_0x746243(++_0x746928);}(_0x9193,0x173));var _0x3919=function(_0x45d55e,_0x2fede3){_0x45d55e=_0x45d55e-0x0;var _0x29812a=_0x9193[_0x45d55e];return _0x29812a;};'use strict';var _=require('lodash');var util=require(_0x3919('0x0'));var path=require(_0x3919('0x1'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require('bluebird');var uuid=require(_0x3919('0x2'));var config=require(_0x3919('0x3'));var logger=require(_0x3919('0x4'))(_0x3919('0x5'));var rpc={'openchannelQueueReport':require(_0x3919('0x6')),'mailQueueReport':require(_0x3919('0x7')),'chatQueueReport':require(_0x3919('0x8')),'smsQueueReport':require(_0x3919('0x9')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require(_0x3919('0xa'))};var RuleEngine=require(_0x3919('0xb'));function getId(_0x41cea1,_0x1cffab,_0x1de825){return util[_0x3919('0xc')]('%s.%s.%s',_0x41cea1,_0x1cffab||0x0,_0x1de825||0x0);}function getIntervals(_0xabe2a6,_0x37cd77){var _0x4dfeed=[];if(!_[_0x3919('0xd')](_0x37cd77[_0x3919('0xe')])&&!_['isNil'](_0xabe2a6[_0x37cd77[_0x3919('0xe')]])&&!_[_0x3919('0xd')](_0xabe2a6[_0x37cd77[_0x3919('0xe')]][_0x3919('0xf')])){_0x4dfeed=_[_0x3919('0x10')](_0xabe2a6[_0x37cd77[_0x3919('0xe')]][_0x3919('0xf')],'interval');}else if(!_['isNil'](_0x37cd77[_0x3919('0x11')])){_0x4dfeed=[_0x37cd77[_0x3919('0x11')]];}return _0x4dfeed;}exports[_0x3919('0x12')]=function(_0x20b635){_0x20b635[_0x3919('0x13')]={};return new BPromise(function(_0x3a0d92,_0x20d0db){var _0x58a6b8={'Start':function(_0x8d86a1){var _0x59be83=this;return new Promise(function(_0x4a090b,_0x308ab4){if(_0x8d86a1){try{var _0x533686=[];var _0x232324=getId(_0x8d86a1[_0x3919('0x14')],_0x8d86a1[_0x3919('0x15')]?_0x8d86a1[_0x3919('0x15')]['id']:0x0,_0x8d86a1[_0x3919('0x16')]?_0x8d86a1[_0x3919('0x16')]['id']:0x0);if(_0x8d86a1['applications']&&_[_0x3919('0x17')](_0x8d86a1['applications'])&&_0x8d86a1[_0x3919('0x18')][_0x3919('0x19')]){for(var _0x508db9=0x0;_0x508db9<_0x8d86a1[_0x3919('0x18')][_0x3919('0x19')];_0x508db9+=0x1){var _0x1e9def=_0x8d86a1[_0x3919('0x18')][_0x508db9];if(fs['existsSync'](path[_0x3919('0x1a')](__dirname,_0x3919('0x18'),_0x1e9def['app']+_0x3919('0x1b')))){var _0x49d438=[];switch(_0x1e9def[_0x3919('0x1c')]['toLowerCase']()){case'autoreply':var _0x4be575=_0x1e9def['appdata']['split'](',');if(_0x8d86a1['channel']===_0x3919('0x1d')){_0x49d438['push'](_0x4be575[0x0]);_0x49d438['push'](_0x4be575[0x1]);_0x49d438[_0x3919('0x1e')](_0x4be575['slice'](0x2,_0x4be575[_0x3919('0x19')])[_0x3919('0x1a')](','));}else{_0x49d438[_0x3919('0x1e')](_0x4be575[0x0]);_0x49d438[_0x3919('0x1e')](_0x4be575[_0x3919('0x1f')](0x1,_0x4be575[_0x3919('0x19')])[_0x3919('0x1a')](','));}break;case _0x3919('0x20'):var _0x4eddc7=_0x1e9def[_0x3919('0x21')][_0x3919('0x22')](',');_0x49d438['push'](_0x4eddc7[0x0]);_0x49d438[_0x3919('0x1e')](_0x4eddc7[0x1]);_0x49d438[_0x3919('0x1e')](_0x4eddc7[_0x3919('0x1f')](0x2,_0x4eddc7[_0x3919('0x19')])[_0x3919('0x1a')](','));break;case _0x3919('0x23'):var _0x38068e=_0x1e9def['appdata'][_0x3919('0x22')](',');_0x49d438[_0x3919('0x1e')](_0x38068e[0x0]);_0x49d438[_0x3919('0x1e')](_0x38068e[0x1]);_0x49d438[_0x3919('0x1e')](_0x38068e[0x2]);_0x49d438['push'](_0x38068e[0x3]);_0x49d438['push'](_0x38068e['slice'](0x4,_0x38068e[_0x3919('0x19')])[_0x3919('0x1a')](','));break;case _0x3919('0x24'):var _0x10e2c9=_0x1e9def['appdata']['split'](',');_0x49d438[_0x3919('0x1e')](_0x10e2c9[0x0]);_0x49d438[_0x3919('0x1e')](_0x10e2c9[0x1]);_0x49d438['push'](_0x10e2c9[0x2]);_0x49d438[_0x3919('0x1e')](_0x10e2c9[0x3]);_0x49d438['push'](_0x10e2c9[_0x3919('0x1f')](0x4,_0x10e2c9[_0x3919('0x19')])['join'](','));break;case'message':_0x49d438['push'](_0x1e9def[_0x3919('0x21')]);break;case _0x3919('0x25'):_0x49d438[_0x3919('0x1e')](_0x1e9def['TagId']);_0x49d438[_0x3919('0x1e')](_0x1e9def[_0x3919('0x21')]);break;default:_0x49d438=_[_0x3919('0xd')](_0x1e9def[_0x3919('0x21')])?[]:_0x1e9def['appdata'][_0x3919('0x22')](',');}var _0x177601={'id':util[_0x3919('0xc')](_0x3919('0x26'),_0x232324,_0x1e9def['id'],_0x1e9def[_0x3919('0x1c')]),'condition':require(_0x3919('0x27'))[_0x3919('0x28')](_0x232324,getIntervals(_0x20b635[_0x3919('0x29')],_0x1e9def),_0x20b635),'consequence':require(_0x3919('0x2a')+_0x1e9def[_0x3919('0x1c')])['consequence'](_0x232324,_0x49d438,_0x20b635,_0x8d86a1),'p':_0x1e9def[_0x3919('0x2b')]||0x0};logger[_0x3919('0x2c')](_0x3919('0x2d'),_0x177601['id'],_0x3919('0x2e'),getIntervals(_0x20b635[_0x3919('0x29')],_0x1e9def)['join']('\x20|\x20'));_0x533686['push'](_0x177601);}else{logger[_0x3919('0x2f')](_0x3919('0x30'),path[_0x3919('0x1a')](__dirname,_0x3919('0x18'),_0x1e9def[_0x3919('0x1c')]+_0x3919('0x1b')));}}_0x20b635[_0x3919('0x13')][_0x232324]=new RuleEngine(_0x533686);_0x20b635['rules'][_0x232324][_0x3919('0x31')](_0x8d86a1,function(_0x57a359){logger[_0x3919('0x2c')]('Applications\x20executed',JSON[_0x3919('0x32')](_0x57a359[_0x3919('0x33')]));if(_0x20b635[_0x3919('0x13')][_0x232324]){_0x20b635['rules'][_0x232324][_0x3919('0x34')](_0x3919('0x35'));}});return _0x4a090b({'code':0xc8,'message':_0x8d86a1});}else{logger[_0x3919('0x2c')]('No\x20applications\x20to\x20execute');return _0x4a090b({'code':0xc8,'message':_0x8d86a1});}}catch(_0x170d6c){logger[_0x3919('0x2f')](_0x170d6c[_0x3919('0x36')]);return _0x308ab4(_0x59be83[_0x3919('0x2f')](0x1f4,_0x170d6c));}}return _0x308ab4(_0x3919('0x37'));});},'AcceptMessage':function(_0x1fcd13){var _0x41cb58=this;return new Promise(function(_0x52ab20,_0x4fb989){if(_0x1fcd13[_0x3919('0x38')]&&_0x1fcd13[_0x3919('0x38')]['id']){if(_0x20b635[_0x3919('0x39')][_0x1fcd13[_0x3919('0x38')]['id']]){_0x20b635[_0x3919('0x39')][_0x1fcd13[_0x3919('0x38')]['id']][_0x3919('0x3a')]=![];_0x20b635['agents'][_0x1fcd13[_0x3919('0x38')]['id']][_0x3919('0x3b')]=undefined;}}if(_0x1fcd13['message']&&_0x1fcd13[_0x3919('0x15')]['id']){try{var _0x147e8f=getId(_0x1fcd13[_0x3919('0x14')],_0x1fcd13[_0x3919('0x15')]?_0x1fcd13[_0x3919('0x15')]['id']:0x0,_0x1fcd13[_0x3919('0x16')]?_0x1fcd13[_0x3919('0x16')]['id']:0x0);if(_0x20b635[_0x3919('0x13')][_0x147e8f]){_0x20b635['rules'][_0x147e8f][_0x3919('0x34')]('end');if(rpc[_0x1fcd13[_0x3919('0x14')]+'QueueReport']){rpc[_0x1fcd13['channel']+_0x3919('0x3c')][_0x3919('0x3d')](_0x147e8f,{'UserId':_0x1fcd13[_0x3919('0x15')][_0x3919('0x3e')]})[_0x3919('0x3f')](function(_0x1e3d50){logger[_0x3919('0x2f')](_0x3919('0x40'));});}}return _0x52ab20({'code':0xc8,'message':_0x1fcd13});}catch(_0x4dd7e9){logger[_0x3919('0x2f')](_0x4dd7e9[_0x3919('0x36')]);return _0x4fb989(_0x41cb58['error'](0x1f4,_0x4dd7e9));}}logger[_0x3919('0x2f')]('message\x20is\x20empty');return _0x4fb989(_0x41cb58[_0x3919('0x2f')](0x1f4,_0x3919('0x41')));});},'RejectMessage':function(_0x111845){var _0x30f170=this;return new Promise(function(_0x2945ea,_0x24af28){if(_0x111845['agent']&&_0x111845[_0x3919('0x38')]['id']){try{if(_0x20b635['agents'][_0x111845[_0x3919('0x38')]['id']]){_0x20b635[_0x3919('0x39')][_0x111845['agent']['id']]['busy']=![];_0x20b635[_0x3919('0x39')][_0x111845[_0x3919('0x38')]['id']][_0x3919('0x3b')]=undefined;}return _0x2945ea({'code':0xc8,'message':_0x111845});}catch(_0x18dc11){logger['error'](_0x18dc11[_0x3919('0x36')]);return _0x24af28(_0x30f170[_0x3919('0x2f')](0x1f4,_0x18dc11));}}logger['error'](_0x3919('0x41'));return _0x24af28(_0x30f170[_0x3919('0x2f')](0x1f4,_0x3919('0x41')));});},'AbandonInteraction':function(_0x47ac31){var _0x9986e0=this;return new Promise(function(_0x412c3f,_0x52580c){if(_0x47ac31[_0x3919('0x14')]&&_0x47ac31[_0x3919('0x16')]&&_0x47ac31[_0x3919('0x16')]['id']){try{var _0x1ec95a=getId(_0x47ac31[_0x3919('0x14')],_0x47ac31[_0x3919('0x15')]?_0x47ac31['message']['id']:0x0,_0x47ac31[_0x3919('0x16')]?_0x47ac31['interaction']['id']:0x0);if(_0x20b635[_0x3919('0x13')][_0x1ec95a]){_0x20b635[_0x3919('0x13')][_0x1ec95a][_0x3919('0x34')](_0x3919('0x42'));}return _0x412c3f({'code':0xc8,'message':_0x47ac31});}catch(_0x2d2699){logger[_0x3919('0x2f')](_0x2d2699['stack']);return _0x52580c(_0x9986e0[_0x3919('0x2f')](0x1f4,_0x2d2699));}}logger[_0x3919('0x2f')](_0x3919('0x41'));return _0x52580c(_0x9986e0[_0x3919('0x2f')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x299e58){var _0x65781a=this;return new Promise(function(_0x39982d,_0x25998e){if(_0x20b635[_0x3919('0x39')][_0x3919('0x43')](_0x299e58['id'])){for(var _0x4c643b in _0x299e58[_0x3919('0x44')]){if(_0x299e58[_0x3919('0x44')][_0x3919('0x43')](_0x4c643b)){if(_0x20b635[_0x3919('0x39')][_0x299e58['id']][_0x3919('0x43')](_0x4c643b+_0x3919('0x45'))){_0x20b635['agents'][_0x299e58['id']][_0x4c643b+_0x3919('0x45')]=parseInt(_0x299e58[_0x3919('0x44')][_0x4c643b],0xa);}}}_0x20b635[_0x3919('0x39')][_0x299e58['id']][_0x3919('0x46')]();return _0x39982d({'code':0xc8,'message':_0x20b635[_0x3919('0x39')][_0x299e58['id']]});}else{return _0x25998e(_0x65781a[_0x3919('0x2f')](0x1f4,_0x3919('0x47')));}});},'Agents':function(_0x37def2){return new Promise(function(_0x276d22,_0x3d2d1a){var _0x8e25d3=_['values'](_0x20b635['agents']);_0x276d22({'count':_0x8e25d3['length'],'rows':_0x8e25d3});});},'ChatQueues':function(_0x302404){return new Promise(function(_0x16233e,_0x3f7a55){var _0x4cb359=[];for(var _0x1296da in _0x20b635[_0x3919('0x48')]){if(_0x20b635[_0x3919('0x48')][_0x3919('0x43')](_0x1296da)){var _0x3be66a=_0x20b635[_0x3919('0x48')][_0x1296da];var _0x15311f={'id':_0x3be66a['id'],'available':_0x3be66a[_0x3919('0x49')],'loggedIn':_0x3be66a[_0x3919('0x4a')],'name':_0x3be66a[_0x3919('0x4b')],'paused':_0x3be66a[_0x3919('0x4c')],'waiting':_0x3be66a[_0x3919('0x4d')]};_0x4cb359['push'](_0x15311f);}}_0x16233e({'count':_0x4cb359[_0x3919('0x19')],'rows':_0x4cb359});});},'MailQueues':function(_0x10cf6a){return new Promise(function(_0x3c61ee,_0x328202){var _0x34b7fe=[];for(var _0x2cfe6e in _0x20b635['mailQueues']){if(_0x20b635[_0x3919('0x4e')][_0x3919('0x43')](_0x2cfe6e)){var _0x81d21e=_0x20b635['mailQueues'][_0x2cfe6e];var _0x5cd86={'id':_0x81d21e['id'],'available':_0x81d21e[_0x3919('0x49')],'loggedIn':_0x81d21e['loggedIn'],'name':_0x81d21e[_0x3919('0x4b')],'paused':_0x81d21e[_0x3919('0x4c')],'waiting':_0x81d21e['waiting']};_0x34b7fe[_0x3919('0x1e')](_0x5cd86);}}_0x3c61ee({'count':_0x34b7fe[_0x3919('0x19')],'rows':_0x34b7fe});});},'OpenchannelQueues':function(_0x49b4b2){return new Promise(function(_0x23c8ba,_0x49d2dc){var _0x3de07e=[];for(var _0x101497 in _0x20b635['openchannelQueues']){if(_0x20b635[_0x3919('0x4f')]['hasOwnProperty'](_0x101497)){var _0x14db5d=_0x20b635['openchannelQueues'][_0x101497];var _0x3ffcb6={'id':_0x14db5d['id'],'available':_0x14db5d[_0x3919('0x49')],'loggedIn':_0x14db5d[_0x3919('0x4a')],'name':_0x14db5d['name'],'paused':_0x14db5d[_0x3919('0x4c')],'waiting':_0x14db5d[_0x3919('0x4d')]};_0x3de07e[_0x3919('0x1e')](_0x3ffcb6);}}_0x23c8ba({'count':_0x3de07e[_0x3919('0x19')],'rows':_0x3de07e});});},'SmsQueues':function(_0x4a84c5){return new Promise(function(_0xbfe503,_0x25c236){var _0x30edbf=[];for(var _0x5be83f in _0x20b635[_0x3919('0x50')]){if(_0x20b635[_0x3919('0x50')]['hasOwnProperty'](_0x5be83f)){var _0x58be7e=_0x20b635[_0x3919('0x50')][_0x5be83f];var _0x441e62={'id':_0x58be7e['id'],'available':_0x58be7e['available'],'loggedIn':_0x58be7e[_0x3919('0x4a')],'name':_0x58be7e[_0x3919('0x4b')],'paused':_0x58be7e['paused'],'waiting':_0x58be7e['waiting']};_0x30edbf[_0x3919('0x1e')](_0x441e62);}}_0xbfe503({'count':_0x30edbf[_0x3919('0x19')],'rows':_0x30edbf});});},'FaxQueues':function(_0x46c72a){return new Promise(function(_0x11aaac,_0x4b39c8){var _0x19b6f2=[];for(var _0x1772f1 in _0x20b635[_0x3919('0x51')]){if(_0x20b635[_0x3919('0x51')][_0x3919('0x43')](_0x1772f1)){var _0x248fb6=_0x20b635['faxQueues'][_0x1772f1];var _0x864dec={'id':_0x248fb6['id'],'available':_0x248fb6['available'],'loggedIn':_0x248fb6[_0x3919('0x4a')],'name':_0x248fb6[_0x3919('0x4b')],'paused':_0x248fb6[_0x3919('0x4c')],'waiting':_0x248fb6[_0x3919('0x4d')]};_0x19b6f2[_0x3919('0x1e')](_0x864dec);}}_0x11aaac({'count':_0x19b6f2[_0x3919('0x19')],'rows':_0x19b6f2});});},'WhatsappQueues':function(_0x16ffb7){return new Promise(function(_0x366590,_0x54639b){var _0x1ac656=[];for(var _0x3590c6 in _0x20b635[_0x3919('0x52')]){if(_0x20b635[_0x3919('0x52')][_0x3919('0x43')](_0x3590c6)){var _0x32fc01=_0x20b635[_0x3919('0x52')][_0x3590c6];var _0x3496a8={'id':_0x32fc01['id'],'available':_0x32fc01[_0x3919('0x49')],'loggedIn':_0x32fc01[_0x3919('0x4a')],'name':_0x32fc01[_0x3919('0x4b')],'paused':_0x32fc01[_0x3919('0x4c')],'waiting':_0x32fc01[_0x3919('0x4d')]};_0x1ac656['push'](_0x3496a8);}}_0x366590({'count':_0x1ac656['length'],'rows':_0x1ac656});});},'ChatQueuesWaitingInteractions':function(_0x426f59){return new Promise(function(_0x379f7f,_0x1c3158){var _0x89a55d=_[_0x3919('0x53')](_0x20b635[_0x3919('0x54')]);_0x379f7f({'count':_0x89a55d['length'],'rows':_0x89a55d});});},'MailQueuesWaitingInteractions':function(_0x241633){return new Promise(function(_0x55f58b,_0x4bd0c3){var _0x4ebaa8=_[_0x3919('0x53')](_0x20b635[_0x3919('0x55')]);_0x55f58b({'count':_0x4ebaa8[_0x3919('0x19')],'rows':_0x4ebaa8});});},'OpenchannelQueuesWaitingInteractions':function(_0x264fd9){return new Promise(function(_0x2b51cc,_0x525dd4){var _0x49d051=_['values'](_0x20b635['openchannelQueuesWaitingInteractions']);_0x2b51cc({'count':_0x49d051[_0x3919('0x19')],'rows':_0x49d051});});},'SmsQueuesWaitingInteractions':function(_0x158b5e){return new Promise(function(_0x1281cf,_0x4afb19){var _0x1d10fb=_['values'](_0x20b635[_0x3919('0x56')]);_0x1281cf({'count':_0x1d10fb[_0x3919('0x19')],'rows':_0x1d10fb});});},'FaxQueuesWaitingInteractions':function(_0x19d121){return new Promise(function(_0x47ba07,_0x20d006){var _0x5280b2=_[_0x3919('0x53')](_0x20b635[_0x3919('0x57')]);_0x47ba07({'count':_0x5280b2[_0x3919('0x19')],'rows':_0x5280b2});});},'WhatsappQueuesWaitingInteractions':function(_0x3e74bb){return new Promise(function(_0x20f745,_0xf77144){var _0x181952=_[_0x3919('0x53')](_0x20b635['whatsappQueuesWaitingInteractions']);_0x20f745({'count':_0x181952[_0x3919('0x19')],'rows':_0x181952});});}};var _0xfa213d=jayson[_0x3919('0x58')](_0x58a6b8)[_0x3919('0x59')]();_0xfa213d['on']('error',function(_0xc21652){logger[_0x3919('0x2f')](JSON[_0x3919('0x32')](_0xc21652));return _0x20d0db(_0xc21652);});_0xfa213d[_0x3919('0x12')](0x232c,_0x3919('0x5a'),function(){console['log']('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x3a0d92(_0x3919('0x5b')+0x232c);});});}; \ No newline at end of file diff --git a/server/services/routing/server/interval.js b/server/services/routing/server/interval.js index e01aa7b..7e89682 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 _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 +var _0xd858=['bluebird','../../../config/logger','routing','request','then','error','message','result','catch','rules','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED','length','push','Command','format','iftime\x20%s','indexOf','true','some','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','when','log','util'];(function(_0x47b95b,_0x4971f7){var _0x3ca0a6=function(_0x1fe37c){while(--_0x1fe37c){_0x47b95b['push'](_0x47b95b['shift']());}};_0x3ca0a6(++_0x4971f7);}(_0xd858,0x16b));var _0x8d85=function(_0x1239ad,_0x51879b){_0x1239ad=_0x1239ad-0x0;var _0x4c67ed=_0xd858[_0x1239ad];return _0x4c67ed;};'use strict';var util=require(_0x8d85('0x0'));var BPromise=require(_0x8d85('0x1'));var jayson=require('jayson/promise');var _=require('lodash');var logger=require(_0x8d85('0x2'))(_0x8d85('0x3'));var client=jayson['client']['http']({'port':0x232a});function request(_0x4f789f,_0x1e3275){return new BPromise(function(_0x2d9567,_0x2065c0){return client[_0x8d85('0x4')](_0x4f789f,_0x1e3275)[_0x8d85('0x5')](function(_0x442243){if(_0x442243['error']){return _0x2065c0(_0x442243[_0x8d85('0x6')][_0x8d85('0x7')]);}else{return _0x2d9567(_0x442243[_0x8d85('0x8')]);}})[_0x8d85('0x9')](function(_0x42bd34){return _0x2065c0(_0x42bd34);});});}exports['condition']=function(_0x12c1c2,_0x5237bd,_0x2759e4){return function(_0x5ab895){if(_0x2759e4[_0x8d85('0xa')]&&!_0x2759e4[_0x8d85('0xa')][_0x12c1c2]){logger[_0x8d85('0xb')](_0x8d85('0xc'),_0x12c1c2);return _0x5ab895['stop']();}var _0x2ca31f=[];for(var _0x19d1b1=0x0;_0x19d1b1<_0x5237bd[_0x8d85('0xd')];_0x19d1b1+=0x1){_0x2ca31f[_0x8d85('0xe')](request(_0x8d85('0xf'),{'command':util[_0x8d85('0x10')](_0x8d85('0x11'),_0x5237bd[_0x19d1b1])})[_0x8d85('0x5')](function(_0xca783d){return _0xca783d&&_0xca783d[_0x8d85('0x7')]&&_0xca783d[_0x8d85('0x7')][_0x8d85('0x12')](_0x8d85('0x13'))>=0x0?!![]:![];})[_0x8d85('0x9')](function(_0x468471){logger[_0x8d85('0x6')]('[%s][INTERVAL]\x20%s',_0x12c1c2,_0x5237bd[_0x19d1b1]);}));}BPromise['all'](_0x2ca31f)[_0x8d85('0x5')](function(_0x27065b){var _0x54f999=_[_0x8d85('0x14')](_0x27065b);logger[_0x8d85('0xb')](_0x8d85('0x15'),_0x12c1c2,_0x5237bd[_0x8d85('0x16')](_0x8d85('0x17')),_0x54f999);_0x5ab895[_0x8d85('0x18')](_0x54f999);})[_0x8d85('0x9')](function(_0x4c6037){console[_0x8d85('0x19')](_0x4c6037);logger[_0x8d85('0x6')](_0x8d85('0x15'),_0x12c1c2,_0x5237bd[_0x8d85('0x16')](_0x8d85('0x17')),_0x4c6037['stack']);_0x5ab895['stop']();});};}; \ No newline at end of file diff --git a/server/services/xdr/agents.controller.js b/server/services/xdr/agents.controller.js index b11a50e..1c35d95 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 _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 +var _0xbee3=['answeredelsewheremembername','[%s][agents][agentconnect]','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diffTime','complete','blindtransfer','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfereruniqueid','transfer','extension','transferuniqueid','[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','ATTENDED','transferexten','transfereeuniqueid','agententerreason','clone','calleridnum','secondtransfererlinkedid','[%s][agents][attendedtransfer]\x20agent:%s','secondtransfererexten','transfertargetuniqueid','calleridname','agentconnectAt','hangup','[%s][agents][hangup]','timeout','cause','rejected','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','indexOf','splice','agentcompleteAt','agent','util','info','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','membername','interface','connectedlinenum','lastevent','queue','getVoiceQueueByName','then','type','agentacw','agentcomplete','acw','acwtime','request','CreateVoiceAgentReport','destuniqueid','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','format','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','isNil','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswer','agentringnoanswerAt','now','reason','holdtime','ringtime','talktime','push','queuecallerabandon','forIn','includes','abandoned','[%s][agents][queuecallerabandon]','agentconnect','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','connectedlinename','answered_elsewhere','answeredelsewheredestinationuniqueid'];(function(_0x4e6211,_0x1e1a1b){var _0x2d1484=function(_0x41ae42){while(--_0x41ae42){_0x4e6211['push'](_0x4e6211['shift']());}};_0x2d1484(++_0x1e1a1b);}(_0xbee3,0xd5));var _0x3bee=function(_0x2a3cd4,_0x1872dd){_0x2a3cd4=_0x2a3cd4-0x0;var _0x5800f9=_0xbee3[_0x2a3cd4];return _0x5800f9;};'use strict';var _=require('lodash');var util=require(_0x3bee('0x0'));var utils=require('./utils');var agents={};var transfers={};var unanswered=[];function writeDB(_0x56a879,_0x45a1bf){utils[_0x3bee('0x1')](util['format'](_0x3bee('0x2'),_0x56a879[_0x3bee('0x3')],_0x56a879[_0x3bee('0x4')],_0x56a879['queue'],_0x56a879[_0x3bee('0x5')],_0x56a879[_0x3bee('0x6')],_0x56a879['calleridnum'],_0x56a879[_0x3bee('0x7')],_0x56a879[_0x3bee('0x8')]));if(_0x56a879[_0x3bee('0x9')]){utils[_0x3bee('0xa')](_0x56a879[_0x3bee('0x9')])[_0x3bee('0xb')](function(_0x3485b8){if(_0x3485b8){_0x56a879['type']=_0x3485b8[_0x3bee('0xc')];_0x56a879[_0x3bee('0xd')]=_0x56a879[_0x3bee('0xe')]?_0x3485b8[_0x3bee('0xf')]:![];_0x56a879[_0x3bee('0x10')]=_0x56a879[_0x3bee('0xd')]?_0x3485b8['acwTimeout']:0x0;}utils[_0x3bee('0x11')]('CreateVoiceAgentReport',_0x56a879);});}else{utils[_0x3bee('0x11')](_0x3bee('0x12'),_0x56a879);}if(_0x45a1bf){delete transfers[_0x56a879[_0x3bee('0x3')]];}else{delete agents[_0x56a879[_0x3bee('0x13')]];}}exports[_0x3bee('0x14')]=function(_0x459129){try{utils[_0x3bee('0x15')](util['format'](_0x3bee('0x16'),_0x459129[_0x3bee('0x3')]),_0x459129);agents[_0x459129[_0x3bee('0x13')]]=_0x459129;agents[_0x459129[_0x3bee('0x13')]][_0x3bee('0x17')]=utils['now']();agents[_0x459129['destuniqueid']][_0x3bee('0x8')]='called';agents[_0x459129[_0x3bee('0x13')]][_0x3bee('0x7')]=null;agents[_0x459129['destuniqueid']]['connectedlinename']=null;utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x19'),_0x459129[_0x3bee('0x3')],agents[_0x459129['destuniqueid']][_0x3bee('0x5')],_0x459129[_0x3bee('0x13')]));}catch(_0x440644){utils[_0x3bee('0x1a')](util[_0x3bee('0x18')](_0x3bee('0x16'),_0x459129[_0x3bee('0x3')]),_0x440644);}};exports['agentringnoanswer']=function(_0x4f36af){try{if(!_[_0x3bee('0x1b')](agents[_0x4f36af[_0x3bee('0x13')]])){utils['debug'](util[_0x3bee('0x18')](_0x3bee('0x1c'),_0x4f36af[_0x3bee('0x3')]),_0x4f36af);utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x1d'),_0x4f36af[_0x3bee('0x3')],agents[_0x4f36af['destuniqueid']][_0x3bee('0x5')],_0x4f36af[_0x3bee('0x13')]));agents[_0x4f36af[_0x3bee('0x13')]][_0x3bee('0x1e')]=!![];agents[_0x4f36af['destuniqueid']][_0x3bee('0x1f')]=utils[_0x3bee('0x20')]();agents[_0x4f36af[_0x3bee('0x13')]]['lastevent']='timeout';agents[_0x4f36af[_0x3bee('0x13')]][_0x3bee('0x21')]='timeout';agents[_0x4f36af[_0x3bee('0x13')]][_0x3bee('0x22')]=_0x4f36af[_0x3bee('0x23')]?parseInt(_0x4f36af['ringtime'])/0x3e8:0x0;agents[_0x4f36af[_0x3bee('0x13')]][_0x3bee('0x24')]=0x0;unanswered[_0x3bee('0x25')](_0x4f36af['destuniqueid']);}}catch(_0x239fa4){utils[_0x3bee('0x1a')](util[_0x3bee('0x18')]('[%s][agents][agentringnoanswer]',_0x4f36af[_0x3bee('0x3')]),_0x239fa4);}};exports[_0x3bee('0x26')]=function(_0x27ed99){try{_[_0x3bee('0x27')](agents,function(_0x3433aa,_0x559c2b){if(_0x3433aa['uniqueid']==_0x27ed99[_0x3bee('0x3')]&&!_[_0x3bee('0x28')](unanswered,_0x3433aa[_0x3bee('0x13')])){utils[_0x3bee('0x15')](util['format']('[%s][agents][queuecallerabandon]',_0x27ed99[_0x3bee('0x3')]),_0x27ed99);utils[_0x3bee('0x1')](util['format']('[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x27ed99[_0x3bee('0x3')],_0x3433aa[_0x3bee('0x5')],_0x3433aa[_0x3bee('0x13')]));_0x3433aa[_0x3bee('0x1e')]=!![];_0x3433aa[_0x3bee('0x1f')]=utils[_0x3bee('0x20')]();_0x3433aa[_0x3bee('0x8')]=_0x3bee('0x29');_0x3433aa[_0x3bee('0x21')]=_0x3bee('0x29');_0x3433aa['holdtime']=_0x27ed99['holdtime'];_0x3433aa[_0x3bee('0x24')]=0x0;writeDB(_0x3433aa);}});}catch(_0x4a4706){utils['error'](util[_0x3bee('0x18')](_0x3bee('0x2a'),_0x27ed99[_0x3bee('0x3')]),_0x4a4706);}};exports[_0x3bee('0x2b')]=function(_0xd926f8){try{if(agents[_0xd926f8[_0x3bee('0x13')]]){utils[_0x3bee('0x15')](util[_0x3bee('0x18')]('[%s][agents][agentconnect]',_0xd926f8[_0x3bee('0x3')]),_0xd926f8);utils[_0x3bee('0x1')](util['format'](_0x3bee('0x2c'),_0xd926f8[_0x3bee('0x3')],agents[_0xd926f8[_0x3bee('0x13')]][_0x3bee('0x5')],_0xd926f8[_0x3bee('0x13')]));agents[_0xd926f8['destuniqueid']]['agentconnectAt']=utils[_0x3bee('0x20')]();agents[_0xd926f8[_0x3bee('0x13')]][_0x3bee('0x7')]=_0xd926f8[_0x3bee('0x7')];agents[_0xd926f8[_0x3bee('0x13')]][_0x3bee('0x2d')]=_0xd926f8[_0x3bee('0x2d')];agents[_0xd926f8[_0x3bee('0x13')]][_0x3bee('0x22')]=_0xd926f8[_0x3bee('0x23')];agents[_0xd926f8[_0x3bee('0x13')]][_0x3bee('0x8')]='connect';_[_0x3bee('0x27')](agents,function(_0x1b5eca,_0x25158b){if(_0x1b5eca[_0x3bee('0x13')]!=_0xd926f8[_0x3bee('0x13')]&&_0x1b5eca[_0x3bee('0x3')]==_0xd926f8[_0x3bee('0x3')]){_0x1b5eca[_0x3bee('0x24')]=0x0;_0x1b5eca[_0x3bee('0x22')]=_0xd926f8[_0x3bee('0x23')];_0x1b5eca[_0x3bee('0x1e')]=!![];_0x1b5eca[_0x3bee('0x1f')]=utils[_0x3bee('0x20')]();_0x1b5eca['lastevent']=_0x3bee('0x2e');_0x1b5eca[_0x3bee('0x21')]=_0x3bee('0x2e');_0x1b5eca[_0x3bee('0x2f')]=_0xd926f8[_0x3bee('0x13')];_0x1b5eca[_0x3bee('0x30')]=_0xd926f8[_0x3bee('0x5')];writeDB(_0x1b5eca);}});}}catch(_0xd1140d){utils['error'](util[_0x3bee('0x18')](_0x3bee('0x31'),_0xd926f8[_0x3bee('0x3')]),_0xd1140d);}};exports['agentcomplete']=function(_0x4567f2){try{if(!_['isNil'](agents[_0x4567f2[_0x3bee('0x13')]])){utils['debug'](util['format'](_0x3bee('0x32'),_0x4567f2[_0x3bee('0x3')]),_0x4567f2);utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x33'),_0x4567f2['uniqueid'],agents[_0x4567f2['destuniqueid']][_0x3bee('0x5')],_0x4567f2['destuniqueid']));agents[_0x4567f2[_0x3bee('0x13')]]['agentcomplete']=!![];agents[_0x4567f2[_0x3bee('0x13')]]['agentcompleteAt']=utils[_0x3bee('0x20')]();agents[_0x4567f2[_0x3bee('0x13')]][_0x3bee('0x24')]=utils[_0x3bee('0x34')](agents[_0x4567f2['destuniqueid']]['agentcompleteAt'],agents[_0x4567f2[_0x3bee('0x13')]]['agentconnectAt']);agents[_0x4567f2['destuniqueid']]['reason']=_0x4567f2[_0x3bee('0x21')];agents[_0x4567f2['destuniqueid']][_0x3bee('0x8')]=_0x3bee('0x35');writeDB(agents[_0x4567f2[_0x3bee('0x13')]]);}}catch(_0x593427){utils[_0x3bee('0x1a')](util['format'](_0x3bee('0x32'),_0x4567f2['uniqueid']),_0x593427);}};exports[_0x3bee('0x36')]=function(_0x16b096){try{if(!_[_0x3bee('0x1b')](agents[_0x16b096['transfereruniqueid']])){utils[_0x3bee('0x15')](util[_0x3bee('0x18')](_0x3bee('0x37'),_0x16b096['uniqueid']),_0x16b096);utils['info'](util[_0x3bee('0x18')](_0x3bee('0x38'),_0x16b096[_0x3bee('0x3')],agents[_0x16b096[_0x3bee('0x39')]][_0x3bee('0x5')],agents[_0x16b096[_0x3bee('0x39')]][_0x3bee('0x3')]));agents[_0x16b096['transfereruniqueid']][_0x3bee('0x3a')]=!![];agents[_0x16b096[_0x3bee('0x39')]]['transfertype']='blind';agents[_0x16b096[_0x3bee('0x39')]]['transferexten']=_0x16b096[_0x3bee('0x3b')];agents[_0x16b096[_0x3bee('0x39')]][_0x3bee('0x3c')]=agents[_0x16b096['transfereruniqueid']][_0x3bee('0x3')];}}catch(_0x3beac9){utils[_0x3bee('0x1a')](util['format'](_0x3bee('0x37'),_0x16b096[_0x3bee('0x3')]),_0x3beac9);}};exports['attendedtransfer']=function(_0x7e37ed){try{utils[_0x3bee('0x15')](util['format'](_0x3bee('0x3d'),_0x7e37ed[_0x3bee('0x3e')]),_0x7e37ed);if(_0x7e37ed[_0x3bee('0x3e')]==_0x7e37ed[_0x3bee('0x3f')]){if(!_[_0x3bee('0x1b')](agents[_0x7e37ed[_0x3bee('0x40')]])){utils[_0x3bee('0x1')](util[_0x3bee('0x18')]('[%s][agents][attendedtransfer]\x20agent:%s',_0x7e37ed['origtransfereruniqueid'],agents[_0x7e37ed[_0x3bee('0x40')]]['membername']));agents[_0x7e37ed[_0x3bee('0x40')]][_0x3bee('0x3a')]=!![];agents[_0x7e37ed[_0x3bee('0x40')]]['transfertype']=_0x3bee('0x41');agents[_0x7e37ed[_0x3bee('0x40')]][_0x3bee('0x42')]=_0x7e37ed['origtransfererexten'];agents[_0x7e37ed[_0x3bee('0x40')]]['transferuniqueid']=_0x7e37ed[_0x3bee('0x3e')];}if(_0x7e37ed[_0x3bee('0x43')]&&agents[_0x7e37ed[_0x3bee('0x43')]]){agents[_0x7e37ed['transfereeuniqueid']][_0x3bee('0x44')]=0x1;transfers[_0x7e37ed[_0x3bee('0x43')]]=_[_0x3bee('0x45')](agents[_0x7e37ed['transfereeuniqueid']]);transfers[_0x7e37ed['transfereeuniqueid']][_0x3bee('0x46')]=agents[_0x7e37ed[_0x3bee('0x40')]][_0x3bee('0x46')];transfers[_0x7e37ed['transfereeuniqueid']]['calleridname']=agents[_0x7e37ed[_0x3bee('0x40')]]['calleridname'];transfers[_0x7e37ed['transfereeuniqueid']][_0x3bee('0x17')]=utils[_0x3bee('0x20')]();transfers[_0x7e37ed[_0x3bee('0x43')]]['agentconnectAt']=utils['now']();transfers[_0x7e37ed[_0x3bee('0x43')]][_0x3bee('0x22')]=0x0;transfers[_0x7e37ed['transfereeuniqueid']][_0x3bee('0x44')]=0x2;}}else if(_0x7e37ed['secondtransfereruniqueid']==_0x7e37ed[_0x3bee('0x47')]){if(!_[_0x3bee('0x1b')](agents[_0x7e37ed[_0x3bee('0x3e')]])){utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x48'),_0x7e37ed[_0x3bee('0x3e')],agents[_0x7e37ed[_0x3bee('0x3e')]][_0x3bee('0x5')]));agents[_0x7e37ed[_0x3bee('0x3e')]][_0x3bee('0x3a')]=!![];agents[_0x7e37ed['origtransfereruniqueid']]['transfertype']='ATTENDED';agents[_0x7e37ed[_0x3bee('0x3e')]][_0x3bee('0x42')]=_0x7e37ed[_0x3bee('0x49')];agents[_0x7e37ed[_0x3bee('0x3e')]]['transferuniqueid']=_0x7e37ed[_0x3bee('0x40')];}if(_0x7e37ed[_0x3bee('0x4a')]&&agents[_0x7e37ed['transfertargetuniqueid']]){agents[_0x7e37ed['transfertargetuniqueid']][_0x3bee('0x44')]=0x1;transfers[_0x7e37ed[_0x3bee('0x4a')]]=_[_0x3bee('0x45')](agents[_0x7e37ed['transfertargetuniqueid']]);transfers[_0x7e37ed[_0x3bee('0x4a')]][_0x3bee('0x46')]=agents[_0x7e37ed[_0x3bee('0x3e')]]['calleridnum'];transfers[_0x7e37ed[_0x3bee('0x4a')]][_0x3bee('0x4b')]=agents[_0x7e37ed[_0x3bee('0x3e')]][_0x3bee('0x4b')];transfers[_0x7e37ed['transfertargetuniqueid']]['agentcalledAt']=utils[_0x3bee('0x20')]();transfers[_0x7e37ed[_0x3bee('0x4a')]][_0x3bee('0x4c')]=utils[_0x3bee('0x20')]();transfers[_0x7e37ed[_0x3bee('0x4a')]]['holdtime']=0x0;transfers[_0x7e37ed[_0x3bee('0x4a')]]['agententerreason']=0x2;}}}catch(_0xddc56b){utils[_0x3bee('0x1a')](util[_0x3bee('0x18')](_0x3bee('0x3d'),_0x7e37ed[_0x3bee('0x3e')]),_0xddc56b);}};exports[_0x3bee('0x4d')]=function(_0x3f7dad){try{utils['debug'](util[_0x3bee('0x18')](_0x3bee('0x4e'),_0x3f7dad[_0x3bee('0x3')]),_0x3f7dad);if(agents[_0x3f7dad[_0x3bee('0x3')]]&&agents[_0x3f7dad['uniqueid']][_0x3bee('0x21')]===_0x3bee('0x4f')){if(_0x3f7dad[_0x3bee('0x50')]==='21'){agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x21')]=_0x3bee('0x51');agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x8')]='rejected';}utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x52'),_0x3f7dad['uniqueid'],agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x5')],agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x21')],agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x8')]));writeDB(agents[_0x3f7dad[_0x3bee('0x3')]]);var _0x204843=unanswered[_0x3bee('0x53')](_0x3f7dad[_0x3bee('0x3')]);if(_0x204843>-0x1){unanswered[_0x3bee('0x54')](_0x204843,0x1);}}if(transfers[_0x3f7dad[_0x3bee('0x3')]]){transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0xe')]=!![];transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x55')]=utils[_0x3bee('0x20')]();transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x24')]=utils[_0x3bee('0x34')](transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x55')],transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x4c')]);transfers[_0x3f7dad[_0x3bee('0x3')]]['reason']=_0x3bee('0x56');transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x8')]=_0x3bee('0x35');utils[_0x3bee('0x1')](util[_0x3bee('0x18')](_0x3bee('0x52'),_0x3f7dad[_0x3bee('0x3')],transfers[_0x3f7dad[_0x3bee('0x3')]]['membername'],transfers[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x21')],transfers[_0x3f7dad['uniqueid']][_0x3bee('0x8')]));writeDB(transfers[_0x3f7dad['uniqueid']],!![]);}if(agents[_0x3f7dad[_0x3bee('0x3')]]&&agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x4c')]){agents[_0x3f7dad['uniqueid']]['agentcomplete']=!![];agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x55')]=utils[_0x3bee('0x20')]();agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x24')]=utils[_0x3bee('0x34')](agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x55')],agents[_0x3f7dad['uniqueid']][_0x3bee('0x4c')]);agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x21')]=agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x3a')]?_0x3bee('0x3a'):_0x3bee('0x56');agents[_0x3f7dad['uniqueid']][_0x3bee('0x8')]=_0x3bee('0x35');utils['info'](util[_0x3bee('0x18')](_0x3bee('0x52'),_0x3f7dad['uniqueid'],agents[_0x3f7dad[_0x3bee('0x3')]]['membername'],agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x21')],agents[_0x3f7dad[_0x3bee('0x3')]][_0x3bee('0x8')]));writeDB(agents[_0x3f7dad['uniqueid']]);}}catch(_0x62900b){utils[_0x3bee('0x1a')](util[_0x3bee('0x18')]('[%s][agents][hangup]',_0x3f7dad[_0x3bee('0x3')]),_0x62900b);}}; \ No newline at end of file diff --git a/server/services/xdr/calls.controller.js b/server/services/xdr/calls.controller.js index 1477acf..1fceeac 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 _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 +var _0xed00=['answertime','toNumber','[%s][calls][newstate]','hangup','callerid','calleridname','cause-txt','diffTime','endtime','starttime','[%s][calls][hangup]','attendedtransfer','localtwolinkedid','[%s][calls][attendedtransfer]','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','origtransfereruniqueid','secondtransfererchannel','_attended','transfertargetchannel','origtransfererchannel','userfield','musiconholdstart','musiconholdstartAt','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','[%s][calls][musiconholdstart]','musiconholdstop','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','variable','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','source','value','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','xmd-callerid','xmd-callerid-preview','xmd-queue','xmcs-queue','[%s][calls][varset]\x20variable:%s\x20value:%s','lastapplication','Queue','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','routeid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','sipcallid','[%s][calls][varset]','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','cdr','split','lastIndexOf','includes','noop','execif','gotoif','lastdata','lodash','util','./utils','./transfers.controller','NO\x20ANSWER','FAILED','ANSWERED','BUSY','blinds','transfereeuniqueid','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','queue','interface','connectedlinenum','lastevent','accountcode','getUserByInternal','then','request','CreateVoiceCallReport','newchannel','debug','[%s][calls][newchannel]\x20context:%s\x20exten:%s','calleridnum','exten','context','now','DOCUMENTATION','error','[%s][calls][newchannel]','newstate','isNil','channelstate','systemanswertime','linkedid','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel'];(function(_0x3486da,_0x978e1d){var _0x5ed579=function(_0xa0cc9a){while(--_0xa0cc9a){_0x3486da['push'](_0x3486da['shift']());}};_0x5ed579(++_0x978e1d);}(_0xed00,0x117));var _0x0ed0=function(_0x11b4fb,_0x10c784){_0x11b4fb=_0x11b4fb-0x0;var _0x56cbb5=_0xed00[_0x11b4fb];return _0x56cbb5;};'use strict';var _=require(_0x0ed0('0x0'));var util=require(_0x0ed0('0x1'));var utils=require(_0x0ed0('0x2'));var transfers=require(_0x0ed0('0x3'));var dispositions=[_0x0ed0('0x4'),'FAILED',_0x0ed0('0x5'),_0x0ed0('0x4'),_0x0ed0('0x4'),_0x0ed0('0x4'),_0x0ed0('0x6'),_0x0ed0('0x7'),_0x0ed0('0x5'),_0x0ed0('0x5'),_0x0ed0('0x5')];var channels={};function writeDB(_0x15e093){var _0x5912d6;if(transfers[_0x0ed0('0x8')][_0x15e093['uniqueid']]){_0x5912d6=_0x15e093['uniqueid'];_0x15e093['uniqueid']=transfers[_0x0ed0('0x8')][_0x15e093['uniqueid']][_0x0ed0('0x9')];}utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0xc'),_0x15e093[_0x0ed0('0xd')],_0x15e093[_0x0ed0('0xe')],_0x15e093[_0x0ed0('0xf')],_0x15e093['membername'],_0x15e093[_0x0ed0('0x10')],_0x15e093['calleridnum'],_0x15e093[_0x0ed0('0x11')],_0x15e093[_0x0ed0('0x12')]));if(_0x15e093[_0x0ed0('0x13')]){utils[_0x0ed0('0x14')](_0x15e093[_0x0ed0('0x13')])[_0x0ed0('0x15')](function(_0x214655){if(_0x214655){_0x15e093['UserId']=_0x214655['id'];}utils[_0x0ed0('0x16')](_0x0ed0('0x17'),_0x15e093);});}else{utils['request']('CreateVoiceCallReport',_0x15e093);}if(channels[_0x15e093[_0x0ed0('0xd')]]){delete channels[_0x15e093['uniqueid']];}else if(_0x5912d6&&channels[_0x5912d6]){delete transfers[_0x0ed0('0x8')][_0x5912d6];delete channels[_0x5912d6];}}exports[_0x0ed0('0x18')]=function(_0x5f2b56){try{utils[_0x0ed0('0x19')](util['format']('[%s][calls][newchannel]',_0x5f2b56[_0x0ed0('0xd')]),_0x5f2b56);if(_0x5f2b56[_0x0ed0('0xd')]==_0x5f2b56['linkedid']&&_0x5f2b56[_0x0ed0('0xe')]!='OutgoingSpoolFailed'){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x1a'),_0x5f2b56['uniqueid'],_0x5f2b56['context'],_0x5f2b56['exten']));channels[_0x5f2b56[_0x0ed0('0xd')]]={'uniqueid':_0x5f2b56[_0x0ed0('0xd')],'accountcode':_0x5f2b56[_0x0ed0('0x13')],'source':_0x5f2b56[_0x0ed0('0x1b')],'destination':_0x5f2b56[_0x0ed0('0x1c')],'destinationcontext':_0x5f2b56[_0x0ed0('0x1d')],'channel':_0x5f2b56[_0x0ed0('0xe')],'starttime':utils[_0x0ed0('0x1e')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0x0ed0('0x4'),'amaflags':_0x0ed0('0x1f')};}}catch(_0x54b20b){utils[_0x0ed0('0x20')](util['format'](_0x0ed0('0x21'),_0x5f2b56[_0x0ed0('0xd')]),_0x54b20b);}};exports[_0x0ed0('0x22')]=function(_0x4c34ee){try{utils[_0x0ed0('0x19')](util[_0x0ed0('0xb')]('[%s][calls][newstate]',_0x4c34ee['uniqueid']),_0x4c34ee);if(!_[_0x0ed0('0x23')](channels[_0x4c34ee[_0x0ed0('0xd')]])&&_0x4c34ee[_0x0ed0('0x24')]==0x6){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')]('[%s][calls][newstate]\x20context:%s\x20channel:%s',_0x4c34ee[_0x0ed0('0xd')],_0x4c34ee[_0x0ed0('0x1d')],_0x4c34ee['channel']));if(_[_0x0ed0('0x23')](channels[_0x4c34ee[_0x0ed0('0xd')]][_0x0ed0('0x25')])){channels[_0x4c34ee[_0x0ed0('0xd')]]['systemanswertime']=utils[_0x0ed0('0x1e')]();}}else if(!_['isNil'](channels[_0x4c34ee[_0x0ed0('0x26')]])&&_0x4c34ee[_0x0ed0('0x24')]==0x6&&_0x4c34ee[_0x0ed0('0x1d')]!=_0x0ed0('0x27')){utils['info'](util[_0x0ed0('0xb')](_0x0ed0('0x28'),_0x4c34ee['uniqueid'],_0x4c34ee[_0x0ed0('0x26')],_0x4c34ee[_0x0ed0('0x1d')],_0x4c34ee[_0x0ed0('0xe')]));channels[_0x4c34ee[_0x0ed0('0x26')]]['accountcode']=_0x4c34ee['accountcode'];channels[_0x4c34ee['linkedid']][_0x0ed0('0x29')]=_0x4c34ee['channel'];if(_['isNil'](channels[_0x4c34ee['linkedid']][_0x0ed0('0x2a')])){channels[_0x4c34ee[_0x0ed0('0x26')]]['answertime']=utils[_0x0ed0('0x1e')]();}channels[_0x4c34ee['linkedid']]['disposition']=dispositions[_[_0x0ed0('0x2b')](_0x4c34ee['channelstate'])]||_0x0ed0('0x6');}}catch(_0x10fffa){utils['error'](util[_0x0ed0('0xb')](_0x0ed0('0x2c'),_0x4c34ee['uniqueid']),_0x10fffa);}};exports[_0x0ed0('0x2d')]=function(_0x299197){try{if(!_[_0x0ed0('0x23')](channels[_0x299197[_0x0ed0('0xd')]])){utils['debug'](util[_0x0ed0('0xb')]('[%s][calls][hangup]',_0x299197[_0x0ed0('0xd')]),_0x299197);if(_[_0x0ed0('0x23')](channels[_0x299197[_0x0ed0('0xd')]][_0x0ed0('0x2e')])){channels[_0x299197[_0x0ed0('0xd')]]['callerid']=_0x299197[_0x0ed0('0x2f')]+'\x20<'+_0x299197[_0x0ed0('0x1b')]+'>';}utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')]('[%s][calls][hangup]\x20callerid:%s\x20reason:%s',_0x299197[_0x0ed0('0xd')],channels[_0x299197[_0x0ed0('0xd')]][_0x0ed0('0x2e')],_0x299197[_0x0ed0('0x30')]));channels[_0x299197[_0x0ed0('0xd')]]['endtime']=utils['now']();channels[_0x299197['uniqueid']]['duration']=utils[_0x0ed0('0x31')](channels[_0x299197['uniqueid']][_0x0ed0('0x32')],channels[_0x299197[_0x0ed0('0xd')]][_0x0ed0('0x33')]);channels[_0x299197['uniqueid']]['billableseconds']=channels[_0x299197[_0x0ed0('0xd')]][_0x0ed0('0x2a')]?utils[_0x0ed0('0x31')](channels[_0x299197[_0x0ed0('0xd')]][_0x0ed0('0x32')],channels[_0x299197['uniqueid']][_0x0ed0('0x2a')]):0x0;writeDB(channels[_0x299197[_0x0ed0('0xd')]]);}}catch(_0x4e79bf){utils['error'](util[_0x0ed0('0xb')](_0x0ed0('0x34'),_0x299197['uniqueid']),_0x4e79bf);}};exports[_0x0ed0('0x35')]=function(_0x3f4cfd){try{if(!_[_0x0ed0('0x23')](channels[_0x3f4cfd[_0x0ed0('0x36')]])){utils[_0x0ed0('0x19')](util[_0x0ed0('0xb')](_0x0ed0('0x37'),_0x3f4cfd['origtransfereruniqueid']),_0x3f4cfd);if(channels[_0x3f4cfd[_0x0ed0('0x36')]][_0x0ed0('0xe')]==_0x3f4cfd['transfereechannel']){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x38'),_0x3f4cfd[_0x0ed0('0x39')],_0x3f4cfd[_0x0ed0('0x36')],_0x3f4cfd[_0x0ed0('0x3a')]));channels[_0x3f4cfd['localtwolinkedid']][_0x0ed0('0x29')]=_0x3f4cfd[_0x0ed0('0x3a')];channels[_0x3f4cfd[_0x0ed0('0x36')]]['userfield']=_0x0ed0('0x3b');}else if(channels[_0x3f4cfd['localtwolinkedid']]['channel']=_0x3f4cfd[_0x0ed0('0x3c')]){utils[_0x0ed0('0xa')](util['format']('[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s',_0x3f4cfd[_0x0ed0('0x39')],_0x3f4cfd[_0x0ed0('0x36')],_0x3f4cfd[_0x0ed0('0x3d')]));channels[_0x3f4cfd[_0x0ed0('0x36')]][_0x0ed0('0x29')]=_0x3f4cfd['origtransfererchannel'];channels[_0x3f4cfd[_0x0ed0('0x36')]][_0x0ed0('0x3e')]='_attended';}}}catch(_0x1e7431){utils['error'](util[_0x0ed0('0xb')](_0x0ed0('0x37'),_0x3f4cfd[_0x0ed0('0x39')]),_0x1e7431);}};exports[_0x0ed0('0x3f')]=function(_0x51ce8f){try{if(!_[_0x0ed0('0x23')](channels[_0x51ce8f[_0x0ed0('0xd')]])){utils['debug'](util[_0x0ed0('0xb')]('[%s][calls][musiconholdstart]',_0x51ce8f[_0x0ed0('0xd')]),_0x51ce8f);channels[_0x51ce8f[_0x0ed0('0xd')]][_0x0ed0('0x40')]=utils['now']();utils['info'](util[_0x0ed0('0xb')](_0x0ed0('0x41'),_0x51ce8f[_0x0ed0('0xd')],channels[_0x51ce8f[_0x0ed0('0xd')]][_0x0ed0('0x40')]));}}catch(_0x2e1dcb){utils[_0x0ed0('0x20')](util[_0x0ed0('0xb')](_0x0ed0('0x42'),_0x51ce8f[_0x0ed0('0xd')]),_0x2e1dcb);}};exports[_0x0ed0('0x43')]=function(_0x304e13){try{if(!_[_0x0ed0('0x23')](channels[_0x304e13[_0x0ed0('0xd')]])){utils[_0x0ed0('0x19')](util[_0x0ed0('0xb')]('[%s][calls][musiconholdstop]',_0x304e13[_0x0ed0('0xd')]),_0x304e13);if(!_['isNil'](channels[_0x304e13[_0x0ed0('0xd')]]['musiconholdstartAt'])){channels[_0x304e13['uniqueid']]['mohtime']+=utils[_0x0ed0('0x31')](utils['now'](),channels[_0x304e13[_0x0ed0('0xd')]][_0x0ed0('0x40')]);utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x44'),_0x304e13[_0x0ed0('0xd')],channels[_0x304e13['uniqueid']]['mohtime']));delete channels[_0x304e13['uniqueid']][_0x0ed0('0x40')];}}}catch(_0x4398a8){utils['error'](util[_0x0ed0('0xb')]('[%s][calls][musiconholdstop]',_0x304e13[_0x0ed0('0xd')]),_0x4398a8);}};exports[_0x0ed0('0x45')]=function(_0x3ad6c5){try{if(!_[_0x0ed0('0x23')](channels[_0x3ad6c5[_0x0ed0('0xd')]])){utils[_0x0ed0('0x19')](util[_0x0ed0('0xb')]('[%s][calls][varset]',_0x3ad6c5[_0x0ed0('0xd')]),_0x3ad6c5);if(!_['isNil'](_0x3ad6c5[_0x0ed0('0x46')]['xmd-originatecalleridnum'])){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x47'),_0x3ad6c5[_0x0ed0('0xd')],_0x3ad6c5['value']));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x48')]=_0x3ad6c5[_0x0ed0('0x49')];}if(!_[_0x0ed0('0x23')](_0x3ad6c5[_0x0ed0('0x46')][_0x0ed0('0x4a')])){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x4b'),_0x3ad6c5[_0x0ed0('0xd')],_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x4c')]=_0x3ad6c5[_0x0ed0('0x49')];channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x2e')]='\x22'+_0x3ad6c5[_0x0ed0('0x49')]+_0x0ed0('0x4d')+_0x3ad6c5[_0x0ed0('0x49')]+'>';}if(!_[_0x0ed0('0x23')](_0x3ad6c5['variable']['xmd-callerid-preview'])||!_[_0x0ed0('0x23')](_0x3ad6c5[_0x0ed0('0x46')][_0x0ed0('0x4e')])){utils['info'](util['format']('[%s][calls][varset]\x20variable:%s\x20value:%s',_0x3ad6c5['uniqueid'],!_[_0x0ed0('0x23')](_0x3ad6c5['variable']['xmd-callerid-preview'])?_0x0ed0('0x4f'):_0x0ed0('0x4e'),_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x2e')]=_0x3ad6c5[_0x0ed0('0x49')];}if(!_['isNil'](_0x3ad6c5['variable'][_0x0ed0('0x50')])||!_[_0x0ed0('0x23')](_0x3ad6c5[_0x0ed0('0x46')][_0x0ed0('0x51')])){utils['info'](util['format'](_0x0ed0('0x52'),_0x3ad6c5[_0x0ed0('0xd')],!_[_0x0ed0('0x23')](_0x3ad6c5[_0x0ed0('0x46')][_0x0ed0('0x50')])?_0x0ed0('0x50'):_0x0ed0('0x51'),_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x53')]=_0x0ed0('0x54');channels[_0x3ad6c5[_0x0ed0('0xd')]]['lastdata']=_0x3ad6c5['value'];channels[_0x3ad6c5[_0x0ed0('0xd')]]['queue']=!![];}if(!_[_0x0ed0('0x23')](_0x3ad6c5[_0x0ed0('0x46')]['xmd-contactid'])){utils[_0x0ed0('0xa')](util['format']('[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s',_0x3ad6c5[_0x0ed0('0xd')],_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]]['ContactId']=_0x3ad6c5[_0x0ed0('0x49')];}if(!_['isNil'](_0x3ad6c5['variable'][_0x0ed0('0x55')])){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x56'),_0x3ad6c5[_0x0ed0('0xd')],_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x57')]=_0x3ad6c5[_0x0ed0('0x49')];}if(!_['isNil'](_0x3ad6c5['variable']['outboundrouteid'])){utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')]('[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s',_0x3ad6c5['uniqueid'],_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x58')]=_0x3ad6c5[_0x0ed0('0x49')];}if(!_['isNil'](_0x3ad6c5[_0x0ed0('0x46')]['sipcallid'])){utils['info'](util[_0x0ed0('0xb')](_0x0ed0('0x59'),_0x3ad6c5[_0x0ed0('0xd')],_0x3ad6c5[_0x0ed0('0x49')]));channels[_0x3ad6c5[_0x0ed0('0xd')]][_0x0ed0('0x5a')]=_0x3ad6c5['value'];}}}catch(_0x679cf4){utils[_0x0ed0('0x20')](util[_0x0ed0('0xb')](_0x0ed0('0x5b'),_0x3ad6c5[_0x0ed0('0xd')]),_0x679cf4);}};exports['newexten']=function(_0x221bc4){try{if(!_['isNil'](channels[_0x221bc4[_0x0ed0('0xd')]])){utils[_0x0ed0('0x19')](util['format'](_0x0ed0('0x5c'),_0x221bc4[_0x0ed0('0xd')]),_0x221bc4);utils[_0x0ed0('0xa')](util[_0x0ed0('0xb')](_0x0ed0('0x5d'),_0x221bc4['uniqueid'],_0x221bc4[_0x0ed0('0x5e')],_0x221bc4[_0x0ed0('0x5f')]));if(_0x221bc4[_0x0ed0('0x5e')][_0x0ed0('0x60')]()==_0x0ed0('0x61')&&_[_0x0ed0('0x62')](_0x221bc4[_0x0ed0('0x5f')][_0x0ed0('0x60')](),_0x0ed0('0x63'))){var _0x5e2703=_0x221bc4['appdata'][_0x0ed0('0x64')]('=');var _0x46e1cb=_0x5e2703[0x0]['substring'](_0x5e2703[0x0][_0x0ed0('0x65')]('(')+0x1,_0x5e2703[0x0][_0x0ed0('0x65')](')'));var _0x136400=_0x5e2703[0x1];channels[_0x221bc4[_0x0ed0('0xd')]][_0x46e1cb]=_0x136400;}if(!_[_0x0ed0('0x66')]([_0x0ed0('0x2d'),_0x0ed0('0x67'),_0x0ed0('0x68'),_0x0ed0('0x61'),_0x0ed0('0x69')],_0x221bc4[_0x0ed0('0x5e')][_0x0ed0('0x60')]())){channels[_0x221bc4[_0x0ed0('0xd')]][_0x0ed0('0x53')]=_0x221bc4['application'];channels[_0x221bc4['uniqueid']][_0x0ed0('0x6a')]=_0x221bc4[_0x0ed0('0x5f')];}}}catch(_0x3bdd48){utils[_0x0ed0('0x20')](util[_0x0ed0('0xb')](_0x0ed0('0x5c'),_0x221bc4[_0x0ed0('0xd')]),_0x3bdd48);}}; \ No newline at end of file diff --git a/server/services/xdr/core.controller.js b/server/services/xdr/core.controller.js index 5a34f1f..efa475e 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 _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 +var _0x304d=['[core]\x20error','close','[core]\x20close','managerevent','./utils','connect','info','[core]\x20connected','shutdown','[core]\x20shutdown','fullybooted','[core]\x20fullybooted','error'];(function(_0x548bc4,_0x502932){var _0x4276a1=function(_0x51a1b6){while(--_0x51a1b6){_0x548bc4['push'](_0x548bc4['shift']());}};_0x4276a1(++_0x502932);}(_0x304d,0xee));var _0xd304=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x304d[_0x20a584];return _0x4b41a8;};'use strict';var utils=require(_0xd304('0x0'));exports[_0xd304('0x1')]=function(){utils[_0xd304('0x2')](_0xd304('0x3'));};exports[_0xd304('0x4')]=function(){utils[_0xd304('0x2')](_0xd304('0x5'));};exports[_0xd304('0x6')]=function(){utils[_0xd304('0x2')](_0xd304('0x7'));};exports[_0xd304('0x8')]=function(_0x40894e){utils[_0xd304('0x8')](_0xd304('0x9'),_0x40894e);};exports[_0xd304('0xa')]=function(){utils[_0xd304('0x2')](_0xd304('0xb'));};exports[_0xd304('0xc')]=function(_0x54c861){}; \ No newline at end of file diff --git a/server/services/xdr/dials.controller.js b/server/services/xdr/dials.controller.js index feebdb1..84fe546 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 _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 +var _0x669b=['duration','endtime','holdtime','diffTime','billableseconds','lodash','util','./utils','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','uniqueid','dialstring','calleridnum','connectedlinenum','dialstatus','CreateVoiceDialReport','newexten','debug','[%s][dials][newexten]','info','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','startsWith','cdr(routeid)','split','error','[%s][dials][varset]','outboundrouteid','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','dialbegin','isNil','[%s][dials][dialbegin]','starttime','now','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','[%s][dials][dialend]','ANSWER','answertime','lastevent','[%s][dials][dialend]\x20dialstatus:%s','hangup','[%s][dials][hangup]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','calleridname','assign','complete'];(function(_0x1ca82a,_0x4be69b){var _0x7521e7=function(_0x179fa6){while(--_0x179fa6){_0x1ca82a['push'](_0x1ca82a['shift']());}};_0x7521e7(++_0x4be69b);}(_0x669b,0x1d0));var _0xb669=function(_0x3337e3,_0x780ba5){_0x3337e3=_0x3337e3-0x0;var _0x1f3e60=_0x669b[_0x3337e3];return _0x1f3e60;};'use strict';var _=require(_0xb669('0x0'));var util=require(_0xb669('0x1'));var utils=require(_0xb669('0x2'));var dials={};function writeDB(_0x279813){utils['info'](util[_0xb669('0x3')](_0xb669('0x4'),_0x279813[_0xb669('0x5')],_0x279813['channel'],_0x279813[_0xb669('0x6')],_0x279813[_0xb669('0x7')],_0x279813[_0xb669('0x8')],_0x279813[_0xb669('0x9')]));utils['request'](_0xb669('0xa'),_0x279813);delete dials[_0x279813[_0xb669('0x5')]];}exports[_0xb669('0xb')]=function(_0x517d51){try{utils[_0xb669('0xc')](util[_0xb669('0x3')](_0xb669('0xd'),_0x517d51['uniqueid']),_0x517d51);utils[_0xb669('0xe')](util[_0xb669('0x3')](_0xb669('0xf'),_0x517d51[_0xb669('0x5')],_0x517d51[_0xb669('0x10')],_0x517d51[_0xb669('0x11')]));if(_0x517d51[_0xb669('0x10')][_0xb669('0x12')]()=='set'&&_[_0xb669('0x13')](_0x517d51[_0xb669('0x11')][_0xb669('0x12')](),_0xb669('0x14'))){var _0x406a46=_0x517d51['appdata'][_0xb669('0x15')]('=');dials[_0x517d51[_0xb669('0x5')]]={'routeId':_0x406a46[0x1]};}}catch(_0x427af3){utils[_0xb669('0x16')](util[_0xb669('0x3')](_0xb669('0xd'),_0x517d51['uniqueid']),_0x427af3);}};exports['varset']=function(_0x485795){try{utils[_0xb669('0xc')](util[_0xb669('0x3')](_0xb669('0x17'),_0x485795[_0xb669('0x5')]),_0x485795);if(!_['isNil'](_0x485795['variable'][_0xb669('0x18')])){utils[_0xb669('0xe')](util[_0xb669('0x3')](_0xb669('0x19'),_0x485795[_0xb669('0x5')],_0x485795[_0xb669('0x1a')]));dials[_0x485795[_0xb669('0x5')]]={'routeId':_0x485795[_0xb669('0x1a')]};}}catch(_0x4b943b){utils[_0xb669('0x16')](util['format'](_0xb669('0x17'),_0x485795[_0xb669('0x5')]),_0x4b943b);}};exports[_0xb669('0x1b')]=function(_0x46c41a){try{if(!_[_0xb669('0x1c')](dials[_0x46c41a['uniqueid']])){utils[_0xb669('0xc')](util[_0xb669('0x3')](_0xb669('0x1d'),_0x46c41a[_0xb669('0x5')]),_0x46c41a);dials[_0x46c41a[_0xb669('0x5')]]=_['assign'](dials[_0x46c41a[_0xb669('0x5')]],_0x46c41a);dials[_0x46c41a[_0xb669('0x5')]][_0xb669('0x1e')]=utils[_0xb669('0x1f')]();dials[_0x46c41a[_0xb669('0x5')]]['lastevent']=_0xb669('0x20');utils['info'](util[_0xb669('0x3')](_0xb669('0x21'),_0x46c41a['uniqueid'],dials[_0x46c41a[_0xb669('0x5')]][_0xb669('0x1e')]));}}catch(_0x218e1d){utils[_0xb669('0x16')](util['format'](_0xb669('0x1d'),_0x46c41a[_0xb669('0x5')]),_0x218e1d);}};exports[_0xb669('0x22')]=function(_0x17e8f4){try{if(!_[_0xb669('0x1c')](dials[_0x17e8f4[_0xb669('0x5')]])){utils[_0xb669('0xc')](util[_0xb669('0x3')](_0xb669('0x23'),_0x17e8f4[_0xb669('0x5')]),_0x17e8f4);dials[_0x17e8f4[_0xb669('0x5')]]['dialstatus']=_0x17e8f4['dialstatus'];if(_0x17e8f4[_0xb669('0x9')]==_0xb669('0x24')){dials[_0x17e8f4[_0xb669('0x5')]]=_['assign'](dials[_0x17e8f4[_0xb669('0x5')]],_0x17e8f4);dials[_0x17e8f4[_0xb669('0x5')]][_0xb669('0x25')]=utils[_0xb669('0x1f')]();dials[_0x17e8f4['uniqueid']][_0xb669('0x26')]='connect';utils[_0xb669('0xe')](util[_0xb669('0x3')]('[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect',_0x17e8f4[_0xb669('0x5')],_0x17e8f4[_0xb669('0x9')],dials[_0x17e8f4[_0xb669('0x5')]][_0xb669('0x25')]));}else{utils[_0xb669('0xe')](util['format'](_0xb669('0x27'),_0x17e8f4[_0xb669('0x5')],_0x17e8f4[_0xb669('0x9')]));}}}catch(_0x55aa52){utils['error'](util[_0xb669('0x3')](_0xb669('0x23'),_0x17e8f4['uniqueid']),_0x55aa52);}};exports[_0xb669('0x28')]=function(_0x30d32f){try{if(!_[_0xb669('0x1c')](dials[_0x30d32f[_0xb669('0x5')]])){utils[_0xb669('0xc')](util['format'](_0xb669('0x29'),_0x30d32f[_0xb669('0x5')]),_0x30d32f);utils[_0xb669('0xe')](util[_0xb669('0x3')](_0xb669('0x2a'),_0x30d32f[_0xb669('0x5')],_0x30d32f[_0xb669('0x7')],_0x30d32f[_0xb669('0x2b')],_0x30d32f['cause-txt']));dials[_0x30d32f[_0xb669('0x5')]]=_[_0xb669('0x2c')](dials[_0x30d32f[_0xb669('0x5')]],{'endtime':utils['now'](),'lastevent':_0xb669('0x2d')});dials[_0x30d32f['uniqueid']][_0xb669('0x2e')]=utils['diffTime'](dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x2f')],dials[_0x30d32f['uniqueid']]['starttime']);dials[_0x30d32f['uniqueid']][_0xb669('0x30')]=utils[_0xb669('0x31')](dials[_0x30d32f['uniqueid']]['answertime']||dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x2f')],dials[_0x30d32f['uniqueid']][_0xb669('0x1e')]);dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x32')]=dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x25')]?utils[_0xb669('0x31')](dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x2f')],dials[_0x30d32f[_0xb669('0x5')]][_0xb669('0x25')]):0x0;writeDB(dials[_0x30d32f[_0xb669('0x5')]]);}}catch(_0x2b4b20){utils[_0xb669('0x16')](util[_0xb669('0x3')](_0xb669('0x29'),_0x30d32f[_0xb669('0x5')]),_0x2b4b20);}}; \ No newline at end of file diff --git a/server/services/xdr/index.js b/server/services/xdr/index.js index 6802968..ead0c89 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 _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 +var _0x21e8=['devicestatechange','debug','format','[%s][index][devicestatechange]','device','agentcalled','uniqueid','[%s][index][agentcalled]','agentringnoanswer','[%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]','[%s][index][musiconholdstop]','musiconholdstop','newstate','[%s][index][newstate]','hangup','[%s][index][hangup]','cdr','[%s][index][cdr]','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','newexten','[%s][index][newexten]','newchannel','[%s][index][newchannel]','dialbegin','[%s][index][dialbegin]','[%s]dialbegin','[%s][index][dialend]','dialend','asterisk-manager','../../config/environment','./utils','util','asterisk','port','xdr','info','XDR\x20DISABLED','./calls.controller','./queues.controller','./members.controller','./dials.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent'];(function(_0x58234b,_0x431b4c){var _0x374c84=function(_0x3c840e){while(--_0x3c840e){_0x58234b['push'](_0x58234b['shift']());}};_0x374c84(++_0x431b4c);}(_0x21e8,0xb2));var _0x821e=function(_0x455c56,_0x25aa46){_0x455c56=_0x455c56-0x0;var _0x1421e1=_0x21e8[_0x455c56];return _0x1421e1;};var AsteriskManager=require(_0x821e('0x0'));var config=require(_0x821e('0x1'));var utils=require(_0x821e('0x2'));var util=require(_0x821e('0x3'));var ami=new AsteriskManager(config[_0x821e('0x4')][_0x821e('0x5')],config[_0x821e('0x4')]['ip'],config[_0x821e('0x4')]['username'],config[_0x821e('0x4')]['password'],!![]);ami['keepConnected']();if(config['xdr']&&config[_0x821e('0x6')]['disabled']){utils[_0x821e('0x7')](_0x821e('0x8'));}else{var agents=require('./agents.controller');var calls=require(_0x821e('0x9'));var queues=require(_0x821e('0xa'));var recordings=require('./recordings.controller');var members=require(_0x821e('0xb'));var dials=require(_0x821e('0xc'));var transfers=require('./transfers.controller');var core=require(_0x821e('0xd'));ami['on'](_0x821e('0xe'),core[_0x821e('0xe')]);ami['on']('shutdown',core[_0x821e('0xf')]);ami['on'](_0x821e('0x10'),core[_0x821e('0x10')]);ami['on']('error',core[_0x821e('0x11')]);ami['on'](_0x821e('0x12'),core[_0x821e('0x12')]);ami['on'](_0x821e('0x13'),core[_0x821e('0x13')]);ami['on'](_0x821e('0x14'),function(_0x5a94b3){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x17'),_0x5a94b3[_0x821e('0x18')]),_0x5a94b3);members['devicestatechange'](_0x5a94b3);}catch(_0x59dbb4){utils[_0x821e('0x11')](util['format']('[%s][index][devicestatechange]',_0x5a94b3[_0x821e('0x18')]),_0x59dbb4);}});ami['on'](_0x821e('0x19'),function(_0x5b5588){try{utils[_0x821e('0x15')](util[_0x821e('0x16')]('[%s][index][agentcalled]',_0x5b5588[_0x821e('0x1a')]),_0x5b5588);agents[_0x821e('0x19')](_0x5b5588);}catch(_0xdeac89){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x1b'),_0x5b5588[_0x821e('0x1a')]),_0xdeac89);}});ami['on'](_0x821e('0x1c'),function(_0x1047a0){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x1d'),_0x1047a0['uniqueid']),_0x1047a0);agents['agentringnoanswer'](_0x1047a0);}catch(_0x396947){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x1d'),_0x1047a0[_0x821e('0x1a')]),_0x396947);}});ami['on'](_0x821e('0x1e'),function(_0x3ecb88){try{utils[_0x821e('0x15')](util['format'](_0x821e('0x1f'),_0x3ecb88['uniqueid']),_0x3ecb88);agents[_0x821e('0x1e')](_0x3ecb88);queues[_0x821e('0x1e')](_0x3ecb88);}catch(_0x115503){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x1f'),_0x3ecb88['uniqueid']),_0x115503);}});ami['on'](_0x821e('0x20'),function(_0x4f1b7e){try{utils['debug'](util[_0x821e('0x16')]('[%s][index][agentcomplete]',_0x4f1b7e[_0x821e('0x1a')]),_0x4f1b7e);agents['agentcomplete'](_0x4f1b7e);queues['agentcomplete'](_0x4f1b7e);members[_0x821e('0x20')](_0x4f1b7e);}catch(_0x22b661){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x21'),_0x4f1b7e[_0x821e('0x1a')]),_0x22b661);}});ami['on']('queuecallerabandon',function(_0x57806b){try{utils['debug'](util[_0x821e('0x16')]('[%s][index][queuecallerabandon]',_0x57806b['uniqueid']),_0x57806b);agents[_0x821e('0x22')](_0x57806b);queues['queuecallerabandon'](_0x57806b);}catch(_0x3c96ab){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x23'),_0x57806b[_0x821e('0x1a')]),_0x3c96ab);}});ami['on'](_0x821e('0x24'),function(_0x1f6fc1){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x25'),_0x1f6fc1[_0x821e('0x1a')]),_0x1f6fc1);queues['queuecallerjoin'](_0x1f6fc1);recordings[_0x821e('0x24')](_0x1f6fc1);}catch(_0x39e603){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x25'),_0x1f6fc1[_0x821e('0x1a')]),_0x39e603);}});ami['on'](_0x821e('0x26'),function(_0x549fa5){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x27'),_0x549fa5[_0x821e('0x1a')]),_0x549fa5);queues[_0x821e('0x26')](_0x549fa5);}catch(_0x2d4e61){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x27'),_0x549fa5[_0x821e('0x1a')]),_0x2d4e61);}});ami['on'](_0x821e('0x28'),function(_0x37a2c4){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x29'),_0x37a2c4[_0x821e('0x1a')]),_0x37a2c4);queues['musiconholdstart'](_0x37a2c4);calls[_0x821e('0x28')](_0x37a2c4);}catch(_0x2c0c56){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x29'),_0x37a2c4[_0x821e('0x1a')]),_0x2c0c56);}});ami['on']('musiconholdstop',function(_0x1dcdf4){try{utils['debug'](util[_0x821e('0x16')](_0x821e('0x2a'),_0x1dcdf4[_0x821e('0x1a')]),_0x1dcdf4);queues['musiconholdstop'](_0x1dcdf4);calls[_0x821e('0x2b')](_0x1dcdf4);}catch(_0x962b65){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x2a'),_0x1dcdf4['uniqueid']),_0x962b65);}});ami['on'](_0x821e('0x2c'),function(_0x4969f9){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x2d'),_0x4969f9['uniqueid']),_0x4969f9);calls[_0x821e('0x2c')](_0x4969f9);recordings['newstate'](_0x4969f9);}catch(_0x5d1b65){utils['error'](util[_0x821e('0x16')](_0x821e('0x2d'),_0x4969f9[_0x821e('0x1a')]),_0x5d1b65);}});ami['on'](_0x821e('0x2e'),function(_0x3dc5a5){try{utils['debug'](util['format']('[%s][index][hangup]',_0x3dc5a5[_0x821e('0x1a')]),_0x3dc5a5);calls[_0x821e('0x2e')](_0x3dc5a5);recordings[_0x821e('0x2e')](_0x3dc5a5);dials[_0x821e('0x2e')](_0x3dc5a5);agents[_0x821e('0x2e')](_0x3dc5a5);queues[_0x821e('0x2e')](_0x3dc5a5);}catch(_0x56f64f){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x2f'),_0x3dc5a5[_0x821e('0x1a')]),_0x56f64f);}});ami['on'](_0x821e('0x30'),function(_0x24c906){try{utils[_0x821e('0x15')](util['format'](_0x821e('0x31'),_0x24c906[_0x821e('0x1a')]),_0x24c906);members[_0x821e('0x30')](_0x24c906);}catch(_0x22709e){utils['error'](util['format'](_0x821e('0x31'),_0x24c906[_0x821e('0x1a')]),_0x22709e);}});ami['on'](_0x821e('0x32'),function(_0x3dcad0){try{utils[_0x821e('0x15')](util['format'](_0x821e('0x33'),_0x3dcad0[_0x821e('0x1a')]),_0x3dcad0);queues[_0x821e('0x32')](_0x3dcad0);agents['blindtransfer'](_0x3dcad0);transfers[_0x821e('0x32')](_0x3dcad0);}catch(_0x3e9221){utils['error'](util['format'](_0x821e('0x33'),_0x3dcad0[_0x821e('0x1a')]),_0x3e9221);}});ami['on'](_0x821e('0x34'),function(_0x32c349){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x35'),_0x32c349[_0x821e('0x36')]),_0x32c349);queues[_0x821e('0x34')](_0x32c349);transfers[_0x821e('0x34')](_0x32c349);agents[_0x821e('0x34')](_0x32c349);calls[_0x821e('0x34')](_0x32c349);}catch(_0x1c46cc){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x35'),_0x32c349['origtransfereruniqueid']),_0x1c46cc);}});ami['on'](_0x821e('0x37'),function(_0xb8315c){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x38'),_0xb8315c[_0x821e('0x1a')]),_0xb8315c);queues[_0x821e('0x37')](_0xb8315c);recordings['varset'](_0xb8315c);calls[_0x821e('0x37')](_0xb8315c);dials[_0x821e('0x37')](_0xb8315c);}catch(_0x36bc4c){utils[_0x821e('0x11')](util['format'](_0x821e('0x38'),_0xb8315c['uniqueid']),_0x36bc4c);}});ami['on'](_0x821e('0x39'),function(_0x4bc918){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x3a'),_0x4bc918[_0x821e('0x1a')]),_0x4bc918);calls[_0x821e('0x39')](_0x4bc918);recordings[_0x821e('0x39')](_0x4bc918);dials[_0x821e('0x39')](_0x4bc918);}catch(_0x48aa1d){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x3a'),_0x4bc918[_0x821e('0x1a')]),_0x48aa1d);}});ami['on'](_0x821e('0x3b'),function(_0x44d328){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x3c'),_0x44d328[_0x821e('0x1a')]),_0x44d328);calls[_0x821e('0x3b')](_0x44d328);recordings[_0x821e('0x3b')](_0x44d328);}catch(_0x55d101){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x3c'),_0x44d328[_0x821e('0x1a')]),_0x55d101);}});ami['on'](_0x821e('0x3d'),function(_0x254e61){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x3e'),_0x254e61[_0x821e('0x1a')]),_0x254e61);dials[_0x821e('0x3d')](_0x254e61);}catch(_0x271952){utils[_0x821e('0x11')](util['format'](_0x821e('0x3f'),_0x254e61['uniqueid']),_0x271952);}});ami['on']('dialend',function(_0x56188e){try{utils[_0x821e('0x15')](util[_0x821e('0x16')](_0x821e('0x40'),_0x56188e[_0x821e('0x1a')]),_0x56188e);dials[_0x821e('0x41')](_0x56188e);}catch(_0x31ae60){utils[_0x821e('0x11')](util[_0x821e('0x16')](_0x821e('0x40'),_0x56188e['uniqueid']),_0x31ae60);}});} \ No newline at end of file diff --git a/server/services/xdr/members.controller.js b/server/services/xdr/members.controller.js index f5ad507..32c93a3 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 _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 +var _0x06d8=['destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','destinationchannel','exitAt','lodash','Local/_attended@transfer','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','channel','data2','type','then','membername','name','internal','CreateMemberReport','getUserByName','request','catch','error','[%s][members][writeDB]','some','startsWith','devicestatechange','debug','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','BUSY','voice','TALKING','now','agent','NOT_INUSE','isNil','duration','enterAt','agentcomplete','[%s][members][agentcomplete]','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','queue','assign','cdr','[%s][members][cdr]','split','data1','source','data3'];(function(_0x192099,_0x38a593){var _0x3d6ccc=function(_0x541fff){while(--_0x541fff){_0x192099['push'](_0x192099['shift']());}};_0x3d6ccc(++_0x38a593);}(_0x06d8,0xd4));var _0x806d=function(_0x4cb322,_0x505daf){_0x4cb322=_0x4cb322-0x0;var _0x25be4b=_0x06d8[_0x4cb322];return _0x25be4b;};'use strict';var _=require(_0x806d('0x0'));var util=require('util');var utils=require('./utils');var members={};var exclude=[_0x806d('0x1'),'Queue:'];function writeDB(_0x211c14){utils[_0x806d('0x2')](util[_0x806d('0x3')](_0x806d('0x4'),_0x211c14[_0x806d('0x5')],_0x211c14[_0x806d('0x6')],_0x211c14[_0x806d('0x7')],_0x211c14[_0x806d('0x8')],_0x211c14['membername'],_0x211c14[_0x806d('0x9')]));if(_0x211c14['interface']){utils['getUserByInterface'](_0x211c14[_0x806d('0x6')])[_0x806d('0xa')](function(_0x2691b0){if(_0x2691b0){_0x211c14[_0x806d('0xb')]=_0x2691b0[_0x806d('0xc')];_0x211c14[_0x806d('0xd')]=_0x2691b0[_0x806d('0xd')];utils['request'](_0x806d('0xe'),_0x211c14);}else{utils[_0x806d('0xf')](_0x211c14[_0x806d('0x6')]['split']('/')[0x1])[_0x806d('0xa')](function(_0x8de84e){if(_0x8de84e){_0x211c14['membername']=_0x8de84e['name'];_0x211c14[_0x806d('0xd')]=_0x8de84e[_0x806d('0xd')];utils[_0x806d('0x10')]('CreateMemberReport',_0x211c14);}});}})[_0x806d('0x11')](function(_0x44f243){utils[_0x806d('0x12')](util[_0x806d('0x3')](_0x806d('0x13'),_0x211c14[_0x806d('0x5')]),_0x44f243);});}delete members[_0x211c14[_0x806d('0x6')]];}function startsWith(_0x567351,_0x2af259){return _[_0x806d('0x14')](_0x567351,function(_0x2c003d){return _[_0x806d('0x15')](_0x2af259,_0x2c003d);});}exports[_0x806d('0x16')]=function(_0x4d9297){try{utils[_0x806d('0x17')](util['format']('[%s][members][devicestatechange]',members[_0x4d9297[_0x806d('0x18')]]?members[_0x4d9297[_0x806d('0x18')]]['uniqueid']:_0x4d9297[_0x806d('0x18')]),_0x4d9297);utils[_0x806d('0x2')](util[_0x806d('0x3')](_0x806d('0x19'),members[_0x4d9297['device']]?members[_0x4d9297[_0x806d('0x18')]]['uniqueid']:_0x4d9297[_0x806d('0x18')],_0x4d9297[_0x806d('0x1a')],_0x4d9297[_0x806d('0x18')]));switch(_0x4d9297[_0x806d('0x1a')]){case _0x806d('0x1b'):case _0x806d('0x1c'):if(!startsWith(exclude,_0x4d9297[_0x806d('0x18')])){members[_0x4d9297[_0x806d('0x18')]]={'channel':_0x806d('0x1d'),'interface':_0x4d9297['device'],'type':_0x806d('0x1e'),'enterAt':utils[_0x806d('0x1f')](),'role':_0x806d('0x20')};}break;case _0x806d('0x21'):if(!_[_0x806d('0x22')](members[_0x4d9297[_0x806d('0x18')]])){members[_0x4d9297[_0x806d('0x18')]]['exitAt']=utils[_0x806d('0x1f')]();members[_0x4d9297[_0x806d('0x18')]][_0x806d('0x23')]=utils['diffTime'](members[_0x4d9297[_0x806d('0x18')]]['exitAt'],members[_0x4d9297['device']][_0x806d('0x24')]);if(members[_0x4d9297[_0x806d('0x18')]]['uniqueid']){writeDB(members[_0x4d9297[_0x806d('0x18')]]);}}break;default:break;}}catch(_0x3ff43d){utils[_0x806d('0x12')](util['format']('[%s][members][devicestatechange]',members[_0x4d9297['device']]?members[_0x4d9297[_0x806d('0x18')]]['uniqueid']:_0x4d9297[_0x806d('0x18')]),_0x3ff43d);}};exports[_0x806d('0x25')]=function(_0x37f1a8){try{if(!_[_0x806d('0x22')](members[_0x37f1a8['interface']])){utils[_0x806d('0x17')](util[_0x806d('0x3')](_0x806d('0x26'),_0x37f1a8[_0x806d('0x5')]),_0x37f1a8);utils[_0x806d('0x2')](util[_0x806d('0x3')](_0x806d('0x27'),_0x37f1a8[_0x806d('0x5')],_0x37f1a8[_0x806d('0x6')],_0x37f1a8[_0x806d('0x28')]));members[_0x37f1a8['interface']]=_[_0x806d('0x29')](members[_0x37f1a8[_0x806d('0x6')]],{'data4':_0x37f1a8[_0x806d('0x28')],'uniqueid':_0x37f1a8[_0x806d('0x5')]});}}catch(_0x304e16){utils[_0x806d('0x12')](util[_0x806d('0x3')]('[%s][members][agentcomplete]',_0x37f1a8[_0x806d('0x5')]),_0x304e16);}};exports[_0x806d('0x2a')]=function(_0x4deacf){try{utils[_0x806d('0x17')](util[_0x806d('0x3')](_0x806d('0x2b'),_0x4deacf['uniqueid']),_0x4deacf);if(_0x4deacf[_0x806d('0x7')]){var _0x4f225b=_0x4deacf['channel'][_0x806d('0x2c')]('-')[0x0];if(!_[_0x806d('0x22')](members[_0x4f225b])){members[_0x4f225b]=_[_0x806d('0x29')](members[_0x4f225b],{'data1':members[_0x4f225b][_0x806d('0x2d')]||_0x4deacf['type'],'data2':members[_0x4f225b][_0x806d('0x8')]||_0x4deacf[_0x806d('0x2e')],'data3':members[_0x4f225b][_0x806d('0x2f')]||_0x4deacf[_0x806d('0x30')],'uniqueid':members[_0x4f225b][_0x806d('0x5')]||_0x4deacf[_0x806d('0x5')]});utils[_0x806d('0x2')](util[_0x806d('0x3')](_0x806d('0x31'),_0x4deacf[_0x806d('0x5')],members[_0x4f225b][_0x806d('0x2d')],members[_0x4f225b][_0x806d('0x8')],members[_0x4f225b]['data3']));if(members[_0x4f225b]['exitAt']){writeDB(members[_0x4f225b]);}}}if(_0x4deacf[_0x806d('0x32')]){var _0xb50e79=_0x4deacf['destinationchannel'][_0x806d('0x2c')]('-')[0x0];if(!_[_0x806d('0x22')](members[_0xb50e79])){members[_0xb50e79]=_['assign'](members[_0xb50e79],{'data1':members[_0xb50e79][_0x806d('0x2d')]||_0x4deacf['type'],'data2':members[_0xb50e79][_0x806d('0x8')]||_0x4deacf[_0x806d('0x2e')],'data3':members[_0xb50e79][_0x806d('0x2f')]||_0x4deacf[_0x806d('0x30')],'uniqueid':members[_0xb50e79][_0x806d('0x5')]||_0x4deacf[_0x806d('0x5')]});utils['info'](util['format'](_0x806d('0x31'),_0x4deacf[_0x806d('0x5')],members[_0xb50e79][_0x806d('0x2d')],members[_0xb50e79]['data2'],members[_0xb50e79][_0x806d('0x2f')]));if(members[_0xb50e79][_0x806d('0x33')]){writeDB(members[_0xb50e79]);}}}}catch(_0x3df8d9){utils[_0x806d('0x12')](util[_0x806d('0x3')](_0x806d('0x2b'),_0x4deacf[_0x806d('0x5')]),_0x3df8d9);}}; \ No newline at end of file diff --git a/server/services/xdr/queues.controller.js b/server/services/xdr/queues.controller.js index 93de853..e9b2b7b 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 _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 +var _0x1d18=['assigned','queuecallercompleteAt','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','transfertype','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','[%s][queues][blindtransfer]','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','ATTENDED','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','[%s][queues][musiconholdstart]','musiconholdstop','[%s][queues][musiconholdstop]','lodash','util','./utils','info','format','uniqueid','channel','queue','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','assign','position','now','hangup','isNil','[%s][queues][hangup]','queuecallerabandon','queuecallerexit','queuecallercomplete','COMPLETEDBYAGENT','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][varset]','variable','queuestatus','toUpperCase','CONTINUE','queuecallerabandonAt','value','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queuecallerexitAt','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','error','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','connectedlinenum','connectedlinename','queuecallerleaveAt','holdtime','diffTime','queuecallerjoinAt','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','lastAssignedTo','agentcomplete','[%s][queues][agentcomplete]'];(function(_0x43a37c,_0x25a567){var _0x5d1d40=function(_0x3ec673){while(--_0x3ec673){_0x43a37c['push'](_0x43a37c['shift']());}};_0x5d1d40(++_0x25a567);}(_0x1d18,0x1ce));var _0x81d1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1d18[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x81d1('0x0'));var util=require(_0x81d1('0x1'));var utils=require(_0x81d1('0x2'));var queues={};function writeDB(_0x49637d){utils[_0x81d1('0x3')](util[_0x81d1('0x4')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x49637d[_0x81d1('0x5')],_0x49637d[_0x81d1('0x6')],_0x49637d[_0x81d1('0x7')],_0x49637d['lastAssignedTo'],_0x49637d[_0x81d1('0x8')],_0x49637d[_0x81d1('0x9')],_0x49637d[_0x81d1('0xa')]));if(_0x49637d[_0x81d1('0x7')]){utils[_0x81d1('0xb')](_0x49637d[_0x81d1('0x7')])[_0x81d1('0xc')](function(_0x1f0191){if(_0x1f0191){_0x49637d['type']=_0x1f0191[_0x81d1('0xd')];}utils[_0x81d1('0xe')](_0x81d1('0xf'),_0x49637d);});}else{utils[_0x81d1('0xe')](_0x81d1('0xf'),_0x49637d);}if(_0x49637d[_0x81d1('0x10')]){delete queues[_0x49637d['transfereduniqueid']];}else{delete queues[_0x49637d[_0x81d1('0x5')]];}}exports[_0x81d1('0x11')]=function(_0x326a2f){try{utils[_0x81d1('0x12')](util[_0x81d1('0x4')](_0x81d1('0x13'),_0x326a2f[_0x81d1('0x5')]),_0x326a2f);utils[_0x81d1('0x3')](util['format'](_0x81d1('0x14'),_0x326a2f[_0x81d1('0x5')],_0x326a2f[_0x81d1('0x7')],_0x326a2f['position']));queues[_0x326a2f[_0x81d1('0x5')]]=_[_0x81d1('0x15')](_0x326a2f,{'originalposition':_0x326a2f[_0x81d1('0x16')],'queuecallerjoinAt':utils[_0x81d1('0x17')](),'mohtime':0x0});}catch(_0x541773){utils['error'](util[_0x81d1('0x4')](_0x81d1('0x13'),_0x326a2f[_0x81d1('0x5')]),_0x541773);}};exports[_0x81d1('0x18')]=function(_0x28069c){try{if(!_[_0x81d1('0x19')](queues[_0x28069c['uniqueid']])){utils['debug'](util[_0x81d1('0x4')](_0x81d1('0x1a'),_0x28069c[_0x81d1('0x5')]),_0x28069c);if(queues[_0x28069c[_0x81d1('0x5')]]['queuecallerleaveAt']){if(!queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0x1b')]&&!queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0x1c')]){queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0x1d')]=!![];queues[_0x28069c[_0x81d1('0x5')]]['queuecallercompleteAt']=utils[_0x81d1('0x17')]();queues[_0x28069c[_0x81d1('0x5')]]['queuecallerexitreason']=_0x81d1('0x1e');}utils[_0x81d1('0x3')](util[_0x81d1('0x4')]('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x28069c[_0x81d1('0x5')],queues[_0x28069c['uniqueid']][_0x81d1('0x1f')],queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0xa')]));writeDB(queues[_0x28069c[_0x81d1('0x5')]]);}else if(queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0x10')]){utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x20'),_0x28069c[_0x81d1('0x5')],queues[_0x28069c[_0x81d1('0x5')]][_0x81d1('0x1f')],queues[_0x28069c[_0x81d1('0x5')]]['transfereduniqueid']));queues[queues[_0x28069c['uniqueid']][_0x81d1('0x10')]]=queues[_0x28069c[_0x81d1('0x5')]];queues[queues[_0x28069c['uniqueid']][_0x81d1('0x10')]][_0x81d1('0x21')]=0x2;delete queues[_0x28069c[_0x81d1('0x5')]];}}}catch(_0x2b9112){utils['error'](util['format'](_0x81d1('0x1a'),_0x28069c[_0x81d1('0x5')]),_0x2b9112);}};exports['varset']=function(_0x33af10){try{utils['debug'](util[_0x81d1('0x4')](_0x81d1('0x22'),_0x33af10[_0x81d1('0x5')]),_0x33af10);if(!_['isNil'](_0x33af10[_0x81d1('0x23')][_0x81d1('0x24')])&&_0x33af10['value'][_0x81d1('0x25')]()!==_0x81d1('0x26')){if(!_[_0x81d1('0x19')](queues[_0x33af10[_0x81d1('0x5')]])){queues[_0x33af10['uniqueid']][_0x81d1('0x1b')]=![];queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x27')]=null;queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x1c')]=!![];queues[_0x33af10[_0x81d1('0x5')]]['queuecallerexitAt']=utils['now']();queues[_0x33af10['uniqueid']][_0x81d1('0xa')]=_0x33af10[_0x81d1('0x28')][_0x81d1('0x25')]();utils['info'](util['format'](_0x81d1('0x29'),_0x33af10[_0x81d1('0x5')],queues[_0x33af10['uniqueid']][_0x81d1('0x1f')],_0x33af10[_0x81d1('0x28')],queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0xa')]));writeDB(queues[_0x33af10[_0x81d1('0x5')]]);}}else if(!_[_0x81d1('0x19')](_0x33af10['variable']['queueposition'])){if(!_[_0x81d1('0x19')](queues[_0x33af10['uniqueid']])&&!queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x1b')]){queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x1b')]=![];queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x27')]=null;queues[_0x33af10[_0x81d1('0x5')]]['queuecallerexit']=!![];queues[_0x33af10['uniqueid']][_0x81d1('0x2a')]=utils[_0x81d1('0x17')]();queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0xa')]=_0x81d1('0x2b');utils[_0x81d1('0x3')](util['format'](_0x81d1('0x2c'),_0x33af10['uniqueid'],queues[_0x33af10[_0x81d1('0x5')]][_0x81d1('0x1f')],_0x33af10['value'],queues[_0x33af10[_0x81d1('0x5')]]['queuecallerexitreason']));}}}catch(_0x570e56){utils[_0x81d1('0x2d')](util[_0x81d1('0x4')](_0x81d1('0x22'),_0x33af10[_0x81d1('0x5')]),_0x570e56);}};exports[_0x81d1('0x1b')]=function(_0x136c9f){try{if(!_[_0x81d1('0x19')](queues[_0x136c9f['uniqueid']])){utils['debug'](util['format']('[%s][queues][queuecallerabandon]',_0x136c9f['uniqueid']),_0x136c9f);queues[_0x136c9f[_0x81d1('0x5')]][_0x81d1('0x1c')]=![];queues[_0x136c9f[_0x81d1('0x5')]]['queuecallerexitAt']=null;queues[_0x136c9f[_0x81d1('0x5')]]['queuecallerabandon']=!![];queues[_0x136c9f['uniqueid']][_0x81d1('0x27')]=utils[_0x81d1('0x17')]();queues[_0x136c9f[_0x81d1('0x5')]]['queuecallerexitreason']=_0x81d1('0x2e');utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x2f'),_0x136c9f[_0x81d1('0x5')],queues[_0x136c9f[_0x81d1('0x5')]][_0x81d1('0x1f')],queues[_0x136c9f[_0x81d1('0x5')]][_0x81d1('0xa')]));}}catch(_0x5ed661){utils[_0x81d1('0x2d')](util[_0x81d1('0x4')]('[%s][queues][queuecallerabandon]',_0x136c9f[_0x81d1('0x5')]),_0x5ed661);}};exports[_0x81d1('0x30')]=function(_0x1b48ad){try{if(!_[_0x81d1('0x19')](queues[_0x1b48ad[_0x81d1('0x5')]])){utils[_0x81d1('0x12')](util[_0x81d1('0x4')](_0x81d1('0x31'),_0x1b48ad[_0x81d1('0x5')]),_0x1b48ad);utils[_0x81d1('0x3')](util[_0x81d1('0x4')]('[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x1b48ad[_0x81d1('0x5')],queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x1f')],_0x1b48ad[_0x81d1('0x32')],_0x1b48ad[_0x81d1('0x33')]));queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x30')]=!![];queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x34')]=utils[_0x81d1('0x17')]();queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x35')]=utils[_0x81d1('0x36')](queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x34')],queues[_0x1b48ad[_0x81d1('0x5')]][_0x81d1('0x37')]);queues[_0x1b48ad['uniqueid']][_0x81d1('0x16')]=_0x1b48ad[_0x81d1('0x16')];queues[_0x1b48ad['uniqueid']]['count']=_0x1b48ad['count'];queues[_0x1b48ad[_0x81d1('0x5')]]['connectedlinenum']=_0x1b48ad[_0x81d1('0x32')];queues[_0x1b48ad['uniqueid']][_0x81d1('0x33')]=_0x1b48ad[_0x81d1('0x33')];}}catch(_0x43261d){utils[_0x81d1('0x2d')](util[_0x81d1('0x4')](_0x81d1('0x31'),_0x1b48ad['uniqueid']),_0x43261d);}};exports[_0x81d1('0x38')]=function(_0x1ffd7e){try{if(!_[_0x81d1('0x19')](queues[_0x1ffd7e[_0x81d1('0x5')]])){utils[_0x81d1('0x12')](util['format'](_0x81d1('0x39'),_0x1ffd7e[_0x81d1('0x5')]),_0x1ffd7e);utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x3a'),_0x1ffd7e[_0x81d1('0x5')],queues[_0x1ffd7e[_0x81d1('0x5')]]['name'],_0x1ffd7e[_0x81d1('0x3b')],_0x1ffd7e['destaccountcode']));queues[_0x1ffd7e['uniqueid']][_0x81d1('0x1b')]=![];queues[_0x1ffd7e['uniqueid']][_0x81d1('0x1b')]=![];queues[_0x1ffd7e['uniqueid']][_0x81d1('0x27')]=null;queues[_0x1ffd7e['uniqueid']][_0x81d1('0x1c')]=![];queues[_0x1ffd7e[_0x81d1('0x5')]][_0x81d1('0xa')]=null;queues[_0x1ffd7e[_0x81d1('0x5')]][_0x81d1('0x2a')]=null;queues[_0x1ffd7e[_0x81d1('0x5')]]['assigned']=!![];queues[_0x1ffd7e['uniqueid']][_0x81d1('0x9')]=_0x1ffd7e['destaccountcode'];queues[_0x1ffd7e[_0x81d1('0x5')]][_0x81d1('0x3c')]=_0x1ffd7e['membername'];}}catch(_0x2c685a){utils[_0x81d1('0x2d')](util['format'](_0x81d1('0x39'),_0x1ffd7e[_0x81d1('0x5')]),_0x2c685a);}};exports[_0x81d1('0x3d')]=function(_0x1b0972){try{if(!_['isNil'](queues[_0x1b0972[_0x81d1('0x5')]])){if(queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x34')]){utils['debug'](util[_0x81d1('0x4')](_0x81d1('0x3e'),_0x1b0972[_0x81d1('0x5')]),_0x1b0972);queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x1b')]=![];queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x1b')]=![];queues[_0x1b0972[_0x81d1('0x5')]]['queuecallerabandonAt']=null;queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x1c')]=![];queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x2a')]=null;queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x3f')]=!![];queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x3c')]=_0x1b0972[_0x81d1('0x3b')];queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x1d')]=!![];queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x40')]=utils[_0x81d1('0x17')]();if(_0x1b0972[_0x81d1('0x41')]==_0x81d1('0x42')){if(!queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0x42')]){queues[_0x1b0972[_0x81d1('0x5')]][_0x81d1('0xa')]=_0x81d1('0x43');}}else{queues[_0x1b0972['uniqueid']][_0x81d1('0xa')]=_0x81d1('0x44')+_0x1b0972[_0x81d1('0x41')][_0x81d1('0x25')]();}utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x45'),_0x1b0972[_0x81d1('0x5')],queues[_0x1b0972['uniqueid']]['name'],_0x1b0972['membername'],queues[_0x1b0972[_0x81d1('0x5')]]['queuecallerexitreason']));writeDB(queues[_0x1b0972['uniqueid']]);}}}catch(_0x147ab6){utils['error'](util[_0x81d1('0x4')](_0x81d1('0x3e'),_0x1b0972['uniqueid']),_0x147ab6);}};exports[_0x81d1('0x46')]=function(_0x566ea4){try{if(!_[_0x81d1('0x19')](queues[_0x566ea4['transfereeuniqueid']])){utils[_0x81d1('0x12')](util[_0x81d1('0x4')]('[%s][queues][blindtransfer]',_0x566ea4['uniqueid']),_0x566ea4);queues[_0x566ea4[_0x81d1('0x47')]][_0x81d1('0x42')]=!![];queues[_0x566ea4[_0x81d1('0x47')]][_0x81d1('0x48')]=_0x81d1('0x49');queues[_0x566ea4['transfereeuniqueid']][_0x81d1('0x4a')]=_0x566ea4[_0x81d1('0x4b')];queues[_0x566ea4['transfereeuniqueid']][_0x81d1('0x4c')]=_0x566ea4[_0x81d1('0x47')];queues[_0x566ea4[_0x81d1('0x47')]][_0x81d1('0xa')]=_0x81d1('0x4d');utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x4e'),_0x566ea4[_0x81d1('0x5')],queues[_0x566ea4[_0x81d1('0x47')]]['name'],_0x566ea4['transfereeuniqueid'],_0x566ea4[_0x81d1('0x4b')]));}}catch(_0x5b97c8){utils[_0x81d1('0x2d')](util[_0x81d1('0x4')](_0x81d1('0x4f'),_0x566ea4[_0x81d1('0x5')]),_0x5b97c8);}};exports[_0x81d1('0x50')]=function(_0x71e06c){try{utils['debug'](util[_0x81d1('0x4')](_0x81d1('0x51'),_0x71e06c[_0x81d1('0x52')]),_0x71e06c);if(_0x71e06c[_0x81d1('0x52')]==_0x71e06c[_0x81d1('0x53')]){if(!_[_0x81d1('0x19')](queues[_0x71e06c['secondtransfererlinkedid']])){utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x54'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c[_0x81d1('0x55')]][_0x81d1('0x1f')],_0x71e06c['origtransfererexten']));queues[_0x71e06c[_0x81d1('0x55')]][_0x81d1('0x42')]=!![];queues[_0x71e06c[_0x81d1('0x55')]]['transfertype']='ATTENDED';queues[_0x71e06c['secondtransfererlinkedid']][_0x81d1('0x4a')]=_0x71e06c[_0x81d1('0x56')];queues[_0x71e06c[_0x81d1('0x55')]]['transferuniqueid']=_0x71e06c[_0x81d1('0x52')];queues[_0x71e06c[_0x81d1('0x55')]]['queuecallerexitreason']=_0x81d1('0x57');}if(!_[_0x81d1('0x19')](queues[_0x71e06c[_0x81d1('0x53')]])){if(_0x71e06c[_0x81d1('0x58')]&&queues[_0x71e06c['transfereelinkedid']]){queues[_0x71e06c['transfereelinkedid']][_0x81d1('0x21')]=0x1;queues[_0x71e06c['transfereeuniqueid']]=_[_0x81d1('0x59')](queues[_0x71e06c['transfereelinkedid']]);queues[_0x71e06c['transfereeuniqueid']][_0x81d1('0x10')]=_0x71e06c[_0x81d1('0x5a')];queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x21')]=0x2;queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x8')]=queues[_0x71e06c[_0x81d1('0x55')]]['calleridnum'];queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x5b')]=queues[_0x71e06c[_0x81d1('0x55')]][_0x81d1('0x5b')];queues[_0x71e06c[_0x81d1('0x47')]]['queuecallerjoinAt']=utils[_0x81d1('0x17')]();queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x34')]=utils['now']();queues[_0x71e06c['transfereeuniqueid']]['holdtime']=0x0;queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x5c')]=0x0;utils['info'](util[_0x81d1('0x4')](_0x81d1('0x5d'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x1f')],queues[_0x71e06c[_0x81d1('0x47')]][_0x81d1('0x8')],queues[_0x71e06c['transfereeuniqueid']][_0x81d1('0x5b')]));}else{utils['info'](util[_0x81d1('0x4')](_0x81d1('0x5e'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x1f')],_0x71e06c[_0x81d1('0x55')]));queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x10')]=_0x71e06c[_0x81d1('0x55')];}}}else if(_0x71e06c['secondtransfereruniqueid']==_0x71e06c[_0x81d1('0x55')]){if(!_[_0x81d1('0x19')](queues[_0x71e06c['origtransfererlinkedid']])){utils[_0x81d1('0x3')](util['format'](_0x81d1('0x5f'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x1f')],_0x71e06c['secondtransfereruniqueid'],_0x71e06c[_0x81d1('0x60')]));queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x42')]=!![];queues[_0x71e06c[_0x81d1('0x53')]]['transfertype']=_0x81d1('0x61');queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x4a')]=_0x71e06c[_0x81d1('0x60')];queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x4c')]=_0x71e06c['secondtransfereruniqueid'];queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0xa')]='ATTENDEDTRANSFER';}if(!_[_0x81d1('0x19')](queues[_0x71e06c[_0x81d1('0x55')]])){if(_0x71e06c[_0x81d1('0x62')]&&queues[_0x71e06c[_0x81d1('0x62')]]){queues[_0x71e06c[_0x81d1('0x62')]][_0x81d1('0x21')]=0x1;queues[_0x71e06c[_0x81d1('0x5a')]]=_[_0x81d1('0x59')](queues[_0x71e06c[_0x81d1('0x62')]]);queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x10')]=_0x71e06c['transfertargetuniqueid'];queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x21')]=0x2;queues[_0x71e06c['transfertargetuniqueid']]['calleridnum']=queues[_0x71e06c['origtransfererlinkedid']][_0x81d1('0x8')];queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x5b')]=queues[_0x71e06c[_0x81d1('0x53')]][_0x81d1('0x5b')];queues[_0x71e06c[_0x81d1('0x5a')]]['queuecallerjoinAt']=utils[_0x81d1('0x17')]();queues[_0x71e06c[_0x81d1('0x5a')]]['queuecallerleaveAt']=utils[_0x81d1('0x17')]();queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x35')]=0x0;queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x5c')]=0x0;utils['info'](util['format'](_0x81d1('0x63'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c['transfertargetuniqueid']][_0x81d1('0x1f')],queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x10')],queues[_0x71e06c[_0x81d1('0x5a')]][_0x81d1('0x8')],queues[_0x71e06c['transfertargetuniqueid']]['calleridname']));}else{utils[_0x81d1('0x3')](util[_0x81d1('0x4')](_0x81d1('0x5e'),_0x71e06c[_0x81d1('0x52')],queues[_0x71e06c['secondtransfererlinkedid']][_0x81d1('0x1f')],_0x71e06c['origtransfererlinkedid']));queues[_0x71e06c[_0x81d1('0x55')]][_0x81d1('0x10')]=_0x71e06c['origtransfererlinkedid'];}}}}catch(_0x12ab65){utils[_0x81d1('0x2d')](util[_0x81d1('0x4')]('[%s][queues][attendedtransfer]',_0x71e06c[_0x81d1('0x52')]),_0x12ab65);}};exports['musiconholdstart']=function(_0x376670){try{if(!_[_0x81d1('0x19')](queues[_0x376670[_0x81d1('0x5')]])){utils[_0x81d1('0x12')](util[_0x81d1('0x4')]('[%s][queues][musiconholdstart]',_0x376670[_0x81d1('0x5')]),_0x376670);queues[_0x376670[_0x81d1('0x5')]][_0x81d1('0x64')]=utils[_0x81d1('0x17')]();utils['info'](util['format'](_0x81d1('0x65'),_0x376670[_0x81d1('0x5')],queues[_0x376670[_0x81d1('0x5')]]['name'],queues[_0x376670['uniqueid']]['musiconholdstartAt']));}}catch(_0x2296e4){utils['error'](util['format'](_0x81d1('0x66'),_0x376670[_0x81d1('0x5')]),_0x2296e4);}};exports[_0x81d1('0x67')]=function(_0x46fd0e){try{if(!_[_0x81d1('0x19')](queues[_0x46fd0e[_0x81d1('0x5')]])){if(!_[_0x81d1('0x19')](queues[_0x46fd0e[_0x81d1('0x5')]]['musiconholdstartAt'])){utils[_0x81d1('0x12')](util[_0x81d1('0x4')](_0x81d1('0x68'),_0x46fd0e[_0x81d1('0x5')]),_0x46fd0e);queues[_0x46fd0e[_0x81d1('0x5')]]['mohtime']+=utils[_0x81d1('0x36')](utils[_0x81d1('0x17')](),queues[_0x46fd0e[_0x81d1('0x5')]]['musiconholdstartAt']);utils['info'](util['format']('[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s',_0x46fd0e['uniqueid'],queues[_0x46fd0e[_0x81d1('0x5')]]['name'],queues[_0x46fd0e[_0x81d1('0x5')]][_0x81d1('0x5c')]));delete queues[_0x46fd0e[_0x81d1('0x5')]][_0x81d1('0x64')];}}}catch(_0x5964b9){utils['error'](util[_0x81d1('0x4')](_0x81d1('0x68'),_0x46fd0e[_0x81d1('0x5')]),_0x5964b9);}}; \ No newline at end of file diff --git a/server/services/xdr/recordings.controller.js b/server/services/xdr/recordings.controller.js index 7875c95..038bfa9 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 _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 +var _0x5fff=['startsWith','split','substring','lastIndexOf','queuecallerjoin','[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','lodash','util','info','format','[%s][recordings][writeDB]','uniqueid','getUserByInternal','then','membername','name','request','CreateVoiceRecording','newchannel','debug','[%s][recordings][newchannel]','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','context','exten','accountcode','channel','error','newstate','[%s][recordings][newstate]','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','transfer','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','variable','mixmonitor_filename','[%s][recordings][varset]','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','endsWith','.wav49','replace','.WAV','find','monitors','push','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridname','cause-txt','calleridnum','connectedlinenum','connectedlinename','outbound','forEach','clone','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set'];(function(_0x2addf5,_0x5b94e4){var _0x462f75=function(_0x30be3a){while(--_0x30be3a){_0x2addf5['push'](_0x2addf5['shift']());}};_0x462f75(++_0x5b94e4);}(_0x5fff,0xd1));var _0xf5ff=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x5fff[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0xf5ff('0x0'));var util=require(_0xf5ff('0x1'));var utils=require('./utils');var recordings={};function writeDB(_0x514272){utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x4'),_0x514272[_0xf5ff('0x5')]));if(_0x514272['accountcode']){utils[_0xf5ff('0x6')](_0x514272['accountcode'])[_0xf5ff('0x7')](function(_0x2bd2bf){if(_0x2bd2bf){_0x514272[_0xf5ff('0x8')]=_0x2bd2bf[_0xf5ff('0x9')];_0x514272['UserId']=_0x2bd2bf['id'];}utils[_0xf5ff('0xa')](_0xf5ff('0xb'),_0x514272);});}else{utils['request']('CreateVoiceRecording',_0x514272);}}exports[_0xf5ff('0xc')]=function(_0x2f302d){try{utils[_0xf5ff('0xd')](util[_0xf5ff('0x3')](_0xf5ff('0xe'),_0x2f302d['uniqueid']),_0x2f302d);if(_0x2f302d[_0xf5ff('0x5')]==_0x2f302d[_0xf5ff('0xf')]){utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x10'),_0x2f302d['uniqueid'],_0x2f302d[_0xf5ff('0x11')],_0x2f302d[_0xf5ff('0x12')]));recordings[_0x2f302d[_0xf5ff('0x5')]]={'uniqueid':_0x2f302d[_0xf5ff('0x5')],'accountcode':_0x2f302d[_0xf5ff('0x13')],'exten':_0x2f302d['exten'],'context':_0x2f302d[_0xf5ff('0x11')],'channel':_0x2f302d[_0xf5ff('0x14')],'monitors':[]};}}catch(_0x3b09ce){utils[_0xf5ff('0x15')](util[_0xf5ff('0x3')](_0xf5ff('0xe'),_0x2f302d['uniqueid']),_0x3b09ce);}};exports[_0xf5ff('0x16')]=function(_0x4b4cbd){try{utils['debug'](util[_0xf5ff('0x3')](_0xf5ff('0x17'),_0x4b4cbd[_0xf5ff('0x5')]),_0x4b4cbd);if(!_[_0xf5ff('0x18')](recordings[_0x4b4cbd[_0xf5ff('0x5')]])&&_0x4b4cbd[_0xf5ff('0x19')]==0x6){utils[_0xf5ff('0x2')](util['format'](_0xf5ff('0x1a'),_0x4b4cbd[_0xf5ff('0x5')],_0x4b4cbd[_0xf5ff('0x11')],_0x4b4cbd[_0xf5ff('0x14')]));}else if(!_['isNil'](recordings[_0x4b4cbd[_0xf5ff('0xf')]])&&_0x4b4cbd[_0xf5ff('0x19')]==0x6&&_0x4b4cbd[_0xf5ff('0x11')]!=_0xf5ff('0x1b')){utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x1c'),_0x4b4cbd[_0xf5ff('0x5')],_0x4b4cbd[_0xf5ff('0xf')],_0x4b4cbd[_0xf5ff('0x11')],_0x4b4cbd[_0xf5ff('0x14')]));recordings[_0x4b4cbd[_0xf5ff('0xf')]][_0xf5ff('0x13')]=_0x4b4cbd[_0xf5ff('0x13')];}}catch(_0x320c5d){utils['error'](util[_0xf5ff('0x3')]('[%s][recordings][newstate]',_0x4b4cbd[_0xf5ff('0x5')]),_0x320c5d);}};exports['varset']=function(_0x3e0060){try{if(!_[_0xf5ff('0x18')](_0x3e0060[_0xf5ff('0x1d')])&&!_[_0xf5ff('0x18')](_0x3e0060['variable'][_0xf5ff('0x1e')])){utils[_0xf5ff('0xd')](util[_0xf5ff('0x3')](_0xf5ff('0x1f'),_0x3e0060[_0xf5ff('0x5')]),_0x3e0060);utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x20'),_0x3e0060[_0xf5ff('0x5')],_0x3e0060[_0xf5ff('0x1d')],_0x3e0060[_0xf5ff('0x21')]));if(_[_0xf5ff('0x22')](_0x3e0060['value'],_0xf5ff('0x23'))){_0x3e0060[_0xf5ff('0x21')]=_0x3e0060[_0xf5ff('0x21')][_0xf5ff('0x24')](_0xf5ff('0x23'),_0xf5ff('0x25'));}if(recordings[_0x3e0060[_0xf5ff('0xf')]]){var _0x20124d=_[_0xf5ff('0x26')](recordings[_0x3e0060['linkedid']][_0xf5ff('0x27')],{'value':_0x3e0060[_0xf5ff('0x21')]});if(_['isNil'](_0x20124d)){recordings[_0x3e0060[_0xf5ff('0xf')]][_0xf5ff('0x27')][_0xf5ff('0x28')]({'value':_0x3e0060[_0xf5ff('0x21')]});}}}}catch(_0x1060f1){utils[_0xf5ff('0x15')](util[_0xf5ff('0x3')](_0xf5ff('0x1f'),_0x3e0060[_0xf5ff('0x5')]),_0x1060f1);}};exports[_0xf5ff('0x29')]=function(_0x5581be){try{if(!_[_0xf5ff('0x18')](recordings[_0x5581be[_0xf5ff('0x5')]])){utils['debug'](util[_0xf5ff('0x3')](_0xf5ff('0x2a'),_0x5581be[_0xf5ff('0x5')]),_0x5581be);utils['info'](util['format'](_0xf5ff('0x2b'),_0x5581be[_0xf5ff('0x5')],_0x5581be['calleridnum'],_0x5581be[_0xf5ff('0x2c')],_0x5581be[_0xf5ff('0x2d')]));recordings[_0x5581be[_0xf5ff('0x5')]][_0xf5ff('0x2e')]=_0x5581be['calleridnum'];recordings[_0x5581be[_0xf5ff('0x5')]][_0xf5ff('0x2c')]=_0x5581be[_0xf5ff('0x2c')];recordings[_0x5581be[_0xf5ff('0x5')]]['connectedlinenum']=_0x5581be[_0xf5ff('0x2f')];recordings[_0x5581be[_0xf5ff('0x5')]][_0xf5ff('0x30')]=_0x5581be[_0xf5ff('0x30')];if(recordings[_0x5581be[_0xf5ff('0x5')]]['type']==_0xf5ff('0x31')&&recordings[_0x5581be['uniqueid']][_0xf5ff('0x13')]){recordings[_0x5581be[_0xf5ff('0x5')]]['connectedlinenum']=recordings[_0x5581be[_0xf5ff('0x5')]][_0xf5ff('0x13')];recordings[_0x5581be[_0xf5ff('0x5')]]['connectedlinename']='';}recordings[_0x5581be[_0xf5ff('0x5')]][_0xf5ff('0x27')][_0xf5ff('0x32')](function(_0x2a2b6d){var _0x1fb4f1=_[_0xf5ff('0x33')](recordings[_0x5581be[_0xf5ff('0x5')]]);_0x1fb4f1[_0xf5ff('0x21')]=_0x2a2b6d[_0xf5ff('0x21')];writeDB(_0x1fb4f1);});delete recordings[_0x5581be['uniqueid']];}}catch(_0x577c5a){utils[_0xf5ff('0x15')](util['format'](_0xf5ff('0x2a'),_0x5581be[_0xf5ff('0x5')]),_0x577c5a);}};exports[_0xf5ff('0x34')]=function(_0x443695){try{if(!_['isNil'](recordings[_0x443695[_0xf5ff('0x5')]])){utils['debug'](util[_0xf5ff('0x3')](_0xf5ff('0x35'),_0x443695[_0xf5ff('0x5')]),_0x443695);utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x36'),_0x443695[_0xf5ff('0x5')],_0x443695[_0xf5ff('0x37')],_0x443695[_0xf5ff('0x38')]));if(_0x443695['application'][_0xf5ff('0x39')]()==_0xf5ff('0x3a')&&_[_0xf5ff('0x3b')](_0x443695[_0xf5ff('0x38')][_0xf5ff('0x39')](),'cdr')){var _0x552f46=_0x443695[_0xf5ff('0x38')][_0xf5ff('0x3c')]('=');var _0x4fff22=_0x552f46[0x0][_0xf5ff('0x3d')](_0x552f46[0x0][_0xf5ff('0x3e')]('(')+0x1,_0x552f46[0x0][_0xf5ff('0x3e')](')'));var _0x3ffcc7=_0x552f46[0x1];recordings[_0x443695[_0xf5ff('0x5')]][_0x4fff22]=_0x3ffcc7;}}}catch(_0x41f2d4){utils['error'](util[_0xf5ff('0x3')](_0xf5ff('0x35'),_0x443695['uniqueid']),_0x41f2d4);}};exports[_0xf5ff('0x3f')]=function(_0x3ddb5e){try{if(!_[_0xf5ff('0x18')](recordings[_0x3ddb5e[_0xf5ff('0x5')]])){utils[_0xf5ff('0xd')](util[_0xf5ff('0x3')](_0xf5ff('0x40'),_0x3ddb5e[_0xf5ff('0x5')]),_0x3ddb5e);utils[_0xf5ff('0x2')](util[_0xf5ff('0x3')](_0xf5ff('0x41'),_0x3ddb5e[_0xf5ff('0x5')],_0x3ddb5e['queue']));recordings[_0x3ddb5e['uniqueid']][_0xf5ff('0x42')]=_0x3ddb5e[_0xf5ff('0x42')];}}catch(_0x387f05){utils[_0xf5ff('0x15')](util[_0xf5ff('0x3')]('[%s][recordings][queuecallerjoin]',_0x3ddb5e[_0xf5ff('0x5')]),_0x387f05);}}; \ No newline at end of file diff --git a/server/services/xdr/transfers.controller.js b/server/services/xdr/transfers.controller.js index 700b287..1a767b8 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 _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 +var _0x6410=['secondtransfererexten','origtransfererlinkedid','transfereechannel','transfertargetchannel','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid','lodash','util','./utils','info','format','[%s][transfers][writeDB]\x20type:%s','type','attended','uniqueid','request','CreateVoiceTransferReport','blindtransfer','debug','[%s][transfers][blindtransfer]','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blinds','transfereruniqueid','origtransfereruniqueid','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridnum','transfertargetcalleridname','assign','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext'];(function(_0x479722,_0x231cef){var _0x2310fe=function(_0xd96529){while(--_0xd96529){_0x479722['push'](_0x479722['shift']());}};_0x2310fe(++_0x231cef);}(_0x6410,0x159));var _0x0641=function(_0x185f9f,_0x1701a3){_0x185f9f=_0x185f9f-0x0;var _0x1840ab=_0x6410[_0x185f9f];return _0x1840ab;};'use strict';var _=require(_0x0641('0x0'));var util=require(_0x0641('0x1'));var utils=require(_0x0641('0x2'));function writeDB(_0x7f9c2){utils[_0x0641('0x3')](util[_0x0641('0x4')](_0x0641('0x5'),_0x7f9c2[_0x0641('0x6')]===_0x0641('0x7')?_0x7f9c2['origtransfereruniqueid']:_0x7f9c2[_0x0641('0x8')],_0x7f9c2[_0x0641('0x6')]));utils[_0x0641('0x9')](_0x0641('0xa'),_0x7f9c2);}exports['blinds']={};exports[_0x0641('0xb')]=function(_0x2878b4){try{utils[_0x0641('0xc')](util[_0x0641('0x4')](_0x0641('0xd'),_0x2878b4['uniqueid']),_0x2878b4);utils[_0x0641('0x3')](util[_0x0641('0x4')](_0x0641('0xe'),_0x2878b4[_0x0641('0x8')],_0x2878b4[_0x0641('0xf')],_0x2878b4[_0x0641('0x10')],_0x2878b4[_0x0641('0x11')],_0x2878b4[_0x0641('0x12')]));_0x2878b4[_0x0641('0x6')]='blind';exports[_0x0641('0x13')][_0x2878b4[_0x0641('0x14')]]=_0x2878b4;writeDB(_0x2878b4);}catch(_0x47083a){utils['error'](util[_0x0641('0x4')](_0x0641('0xd'),_0x2878b4['uniqueid']),_0x47083a);}};exports['attendedtransfer']=function(_0x332b00){try{utils['debug'](util['format']('[%s][transfers][attendedtransfer]',_0x332b00[_0x0641('0x15')]),_0x332b00);utils[_0x0641('0x3')](util[_0x0641('0x4')](_0x0641('0x16'),_0x332b00['origtransfereruniqueid'],_0x332b00[_0x0641('0x17')],_0x332b00[_0x0641('0x18')],_0x332b00[_0x0641('0x19')],_0x332b00[_0x0641('0x1a')]));_0x332b00=_[_0x0641('0x1b')](_0x332b00,{'transfererchannel':_0x332b00[_0x0641('0x1c')],'transferercalleridnum':_0x332b00['origtransferercalleridnum'],'transferercalleridname':_0x332b00[_0x0641('0x18')],'transfererconnectedlinenum':_0x332b00[_0x0641('0x1d')],'transfererconnectedlinename':_0x332b00[_0x0641('0x1e')],'transfereraccountcode':_0x332b00[_0x0641('0x1f')],'transferercontext':_0x332b00[_0x0641('0x20')],'transfererexten':_0x332b00[_0x0641('0x21')],'transfererlinkedid':_0x332b00[_0x0641('0x22')],'context':_0x332b00['origtransferercontext'],'extension':_0x332b00['origtransfererexten'],'type':'attended'});if(_['isNil'](_0x332b00[_0x0641('0x23')])){_0x332b00=_[_0x0641('0x1b')](_0x332b00,{'transfereechannel':_0x332b00[_0x0641('0x24')],'transfereecalleridnum':_0x332b00[_0x0641('0x19')],'transfereecalleridname':_0x332b00['transfertargetcalleridname'],'transfereeconnectedlinenum':_0x332b00[_0x0641('0x25')],'transfereeconnectedlinename':_0x332b00[_0x0641('0x26')],'transfereeaccountcode':_0x332b00[_0x0641('0x27')],'transfereecontext':_0x332b00[_0x0641('0x28')],'transfereeexten':_0x332b00['transfertargetexten'],'transfereelinkedid':_0x332b00[_0x0641('0x29')]});}writeDB(_0x332b00);}catch(_0x22bc17){utils['error'](util[_0x0641('0x4')]('[%s][transfers][attendedtransfer]',_0x332b00[_0x0641('0x15')]),_0x22bc17);}}; \ No newline at end of file diff --git a/server/services/xdr/utils.js b/server/services/xdr/utils.js index 295033d..a6f71d8 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 _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 +var _0x5934=['error','request','then','[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','[utils][getUser]\x20where:%s','stringify','length','result','getUserByInternal','found','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]','getVoiceQueueByName','GetVoiceQueue','type','acw','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','addTime','seconds','format','YYYY-MM-DD\x20HH:mm:ss','diffTime','diff','now','isAfter','isBefore','bluebird','jayson/promise','moment','client','http','../../config/logger','xdr','info','debug','inspect'];(function(_0x371241,_0x1006c8){var _0x1eb44d=function(_0x587384){while(--_0x587384){_0x371241['push'](_0x371241['shift']());}};_0x1eb44d(++_0x1006c8);}(_0x5934,0x146));var _0x4593=function(_0x4e7de3,_0x5563fc){_0x4e7de3=_0x4e7de3-0x0;var _0x3d9d88=_0x5934[_0x4e7de3];return _0x3d9d88;};'use strict';var BPromise=require(_0x4593('0x0'));var jayson=require(_0x4593('0x1'));var moment=require(_0x4593('0x2'));var util=require('util');var client=jayson[_0x4593('0x3')][_0x4593('0x4')]({'port':0x2329});var logger=require(_0x4593('0x5'))(_0x4593('0x6'));exports[_0x4593('0x7')]=function(_0x224940,_0x37881d){logger[_0x4593('0x7')](_0x224940,_0x37881d?util['inspect'](_0x37881d,{'showHidden':![],'depth':null}):'');};exports['debug']=function(_0x3c4289,_0x564140){logger[_0x4593('0x8')](_0x3c4289,_0x564140?util[_0x4593('0x9')](_0x564140,{'showHidden':![],'depth':null}):'');};exports[_0x4593('0xa')]=function(_0x25101a,_0x4f06a8){logger[_0x4593('0xa')](_0x25101a,_0x4f06a8?util[_0x4593('0x9')](_0x4f06a8,{'showHidden':![],'depth':null}):'');};exports[_0x4593('0xb')]=function(_0xd3107d,_0x337ebc){return client['request'](_0xd3107d,{'body':_0x337ebc})[_0x4593('0xc')](function(_0x26cb0e){logger[_0x4593('0x8')](_0x4593('0xd'),_0xd3107d,_0x26cb0e?util[_0x4593('0x9')](_0x26cb0e,{'showHidden':![],'depth':null}):'');})[_0x4593('0xe')](function(_0x45ca23){logger['error'](_0x4593('0xd'),_0xd3107d,_0x45ca23?util[_0x4593('0x9')](_0x45ca23,{'showHidden':![],'depth':null}):'');});};function getUser(_0x4ec9c4){return client[_0x4593('0xb')](_0x4593('0xf'),{'options':{'raw':!![],'attributes':['id',_0x4593('0x10'),_0x4593('0x11'),_0x4593('0x12')],'where':_0x4ec9c4,'limit':0x1}})[_0x4593('0xc')](function(_0x540a0f){logger[_0x4593('0x8')](_0x4593('0x13'),JSON[_0x4593('0x14')](_0x4ec9c4),_0x540a0f?util[_0x4593('0x9')](_0x540a0f,{'showHidden':![],'depth':null}):'');return _0x540a0f['result'][_0x4593('0x15')]?_0x540a0f[_0x4593('0x16')][0x0]:null;});}exports[_0x4593('0x17')]=function(_0x57a092){return new BPromise(function(_0x5cbdac,_0x3dd477){if(_0x57a092){return getUser({'internal':_0x57a092})[_0x4593('0xc')](function(_0x5f30ac){logger[_0x4593('0x7')]('[utils][getUserByInternal]\x20internal:%s\x20%s',_0x57a092,_0x5f30ac?_0x4593('0x18'):_0x4593('0x19'));return _0x5cbdac(_0x5f30ac);})['catch'](function(_0x5e07ae){logger[_0x4593('0xa')](_0x4593('0x1a'),_0x5e07ae?util[_0x4593('0x9')](_0x5e07ae,{'showHidden':![],'depth':null}):'');return _0x5cbdac(null);});}return _0x5cbdac(null);});};exports[_0x4593('0x1b')]=function(_0x615b57){return new BPromise(function(_0x36e397,_0x277869){if(_0x615b57){return getUser({'interface':_0x615b57})[_0x4593('0xc')](function(_0x975b92){logger['info'](_0x4593('0x1c'),_0x615b57,_0x975b92?_0x4593('0x18'):'notfound');return _0x36e397(_0x975b92);})[_0x4593('0xe')](function(_0x3d121c){logger[_0x4593('0xa')](_0x4593('0x1d'),_0x3d121c?util[_0x4593('0x9')](_0x3d121c,{'showHidden':![],'depth':null}):'');return _0x36e397(null);});}return _0x36e397(null);});};exports[_0x4593('0x1e')]=function(_0x25a6c8){return new BPromise(function(_0x168da8,_0xb46441){if(_0x25a6c8){return getUser({'name':_0x25a6c8})[_0x4593('0xc')](function(_0x3e831e){logger[_0x4593('0x7')]('[utils][getUserByName]\x20name:%s\x20%s',_0x25a6c8,_0x3e831e?_0x4593('0x18'):'notfound');return _0x168da8(_0x3e831e);})[_0x4593('0xe')](function(_0x51abfc){logger['error'](_0x4593('0x1f'),_0x51abfc?util[_0x4593('0x9')](_0x51abfc,{'showHidden':![],'depth':null}):'');return _0x168da8(null);});}return _0x168da8(null);});};exports[_0x4593('0x20')]=function(_0x3d8dbb){return new BPromise(function(_0x1a71a0,_0x548ad4){if(_0x3d8dbb){return client[_0x4593('0xb')](_0x4593('0x21'),{'options':{'raw':!![],'attributes':['id',_0x4593('0x11'),_0x4593('0x22'),_0x4593('0x23'),_0x4593('0x24')],'where':{'name':_0x3d8dbb},'limit':0x1}})['then'](function(_0x14820b){logger[_0x4593('0x8')](_0x4593('0x25'),_0x3d8dbb,_0x14820b?util['inspect'](_0x14820b,{'showHidden':![],'depth':null}):'');logger[_0x4593('0x7')](_0x4593('0x26'),_0x3d8dbb,_0x14820b?_0x4593('0x18'):_0x4593('0x19'));return _0x1a71a0(_0x14820b[_0x4593('0x16')][_0x4593('0x15')]?_0x14820b[_0x4593('0x16')][0x0]:null);})[_0x4593('0xe')](function(_0x48f962){logger[_0x4593('0xa')]('[utils][getVoiceQueueByName]',_0x48f962?util['inspect'](_0x48f962,{'showHidden':![],'depth':null}):'');return _0x1a71a0(null);});}return _0x1a71a0(null);});};exports[_0x4593('0x27')]=function(_0xae1d10,_0x4de12d){return moment(_0xae1d10)['add'](_0x4de12d,_0x4593('0x28'))[_0x4593('0x29')]('YYYY-MM-DD\x20HH:mm:ss');};exports['subtractTime']=function(_0x56a51a,_0x106d93){return moment(_0x56a51a)['subtract'](_0x106d93,_0x4593('0x28'))['format'](_0x4593('0x2a'));};exports[_0x4593('0x2b')]=function(_0x50a2c4,_0x2f822f){return moment(_0x50a2c4)[_0x4593('0x2c')](moment(_0x2f822f),'seconds');};exports['sumTime']=function(_0x1322b5,_0x34ac65){return parseInt(_0x1322b5,0xa)+parseInt(_0x34ac65,0xa);};exports[_0x4593('0x2d')]=function(){return moment()[_0x4593('0x29')](_0x4593('0x2a'));};exports[_0x4593('0x2e')]=function(_0x4dad0b,_0x3efc08){if(_0x3efc08){return moment(_0x4dad0b)[_0x4593('0x2e')](_0x3efc08);}return!![];};exports[_0x4593('0x2f')]=function(_0x4cdb37,_0x13ef78){if(_0x13ef78){return moment(_0x4cdb37)[_0x4593('0x2f')](_0x13ef78);}else if(_0x4cdb37){return!![];}return![];}; \ No newline at end of file -- 1.7.1