Built motion from commit 2238b68.|1.0.18
[motion.git] / server / config / integrations / zendesk.js
index 536f839..26396fa 100644 (file)
@@ -1 +1 @@
-var _0x7a3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x75\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x7a3f[0];var _=require(_0x7a3f[1]);var util=require(_0x7a3f[2]);var rp=require(_0x7a3f[3]);var ZendeskConfiguration=require(_0x7a3f[5])[_0x7a3f[4]];var ReportIntegration=require(_0x7a3f[5])[_0x7a3f[6]];var VoiceQueue=require(_0x7a3f[5])[_0x7a3f[7]];var VoiceExtension=require(_0x7a3f[5])[_0x7a3f[8]];var Agent=require(_0x7a3f[5])[_0x7a3f[9]];function Zendesk(){console[_0x7a3f[11]](_0x7a3f[10])}Zendesk[_0x7a3f[13]][_0x7a3f[12]]= function(_0xaf3cxa,_0xaf3cxb,_0xaf3cxc,_0xaf3cxd,_0xaf3cxe,_0xaf3cxf){var _0xaf3cx10={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0xaf3cxa||  !_0xaf3cxb){console[_0x7a3f[15]](_0x7a3f[14]);return};ZendeskConfiguration[_0x7a3f[18]]({where:{id:_0xaf3cxb,AccountId:_0xaf3cxa},include:[{all:true,include:[{all:true}]}]})[_0x7a3f[17]](handleEntityNotFound())[_0x7a3f[17]](handleConnection(_0xaf3cx10))[_0x7a3f[17]](searchMotionAgent(_0xaf3cxc,_0xaf3cxe))[_0x7a3f[17]](handleMotionAgent(_0xaf3cx10))[_0x7a3f[17]](searchQueue(_0xaf3cxe))[_0x7a3f[17]](handleQueueRecordings(_0xaf3cx10,_0xaf3cxe))[_0x7a3f[17]](searchRoute(_0xaf3cxe))[_0x7a3f[17]](handleOutboundRecordings(_0xaf3cx10,_0xaf3cxe))[_0x7a3f[17]](searchAgent(_0xaf3cx10))[_0x7a3f[17]](handleAgent(_0xaf3cx10))[_0x7a3f[17]](searchAdmin(_0xaf3cx10))[_0x7a3f[17]](handleAdmin(_0xaf3cx10))[_0x7a3f[17]](searchEndUser(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxd))[_0x7a3f[17]](handleEndUser(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxd))[_0x7a3f[17]](endUserCreation(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxd))[_0x7a3f[17]](handleEndUserCreation(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxd))[_0x7a3f[17]](ticketCreation(_0xaf3cx10,_0xaf3cxe,_0xaf3cxf))[_0x7a3f[17]](handleTicketDisplay(_0xaf3cx10))[_0x7a3f[17]](handleReportIntegration(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxa,_0xaf3cxd))[_0x7a3f[17]](handleEnd(_0xaf3cx10))[_0x7a3f[16]](handleError(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxa))};function handleEntityNotFound(){return function(_0xaf3cx12){if(!_0xaf3cx12){return null};return _0xaf3cx12}}function handleConnection(_0xaf3cx10){return function(_0xaf3cx14){var _0xaf3cx15=getAccountConfiguration(_0xaf3cx14.ZendeskAccount);_0xaf3cx10[_0x7a3f[19]]= _0xaf3cx14;_0xaf3cx10[_0x7a3f[20]]= _0xaf3cx15[_0x7a3f[20]];_0xaf3cx10[_0x7a3f[21]]= _0xaf3cx15[_0x7a3f[21]];_0xaf3cx10[_0x7a3f[22]]= _0xaf3cx14[_0x7a3f[24]][_0x7a3f[23]]}}function searchMotionAgent(_0xaf3cxc,_0xaf3cxe){return function(){var _0xaf3cx17=getAgentSearchPropertyFromChannel(_0xaf3cxc);if(_0xaf3cxe[_0x7a3f[25]](_0xaf3cx17)){return Agent[_0x7a3f[29]](_0x7a3f[28])[_0x7a3f[27]]({where:{name:getValueFromPropertyName(_0xaf3cxe,_0xaf3cx17)},attributes:[_0x7a3f[26]]})};return}}function handleMotionAgent(_0xaf3cx10){return function(_0xaf3cx19){if(_0xaf3cx19&& _0xaf3cx19[_0x7a3f[26]]){_0xaf3cx10[_0x7a3f[30]]= _0xaf3cx19[_0x7a3f[26]]};return}}function searchQueue(_0xaf3cxe){return function(){if(_0xaf3cxe[_0x7a3f[31]]){return VoiceQueue[_0x7a3f[27]]({where:{name:_0xaf3cxe[_0x7a3f[31]]},attributes:[_0x7a3f[32],_0x7a3f[33]]})}else {return}}}function handleQueueRecordings(_0xaf3cx10,_0xaf3cxe){return function(_0xaf3cx1c){if(_0xaf3cxe[_0x7a3f[31]]){if(_0xaf3cx1c&& _0xaf3cx1c[_0x7a3f[33]]){console[_0x7a3f[11]](_0x7a3f[34],_0xaf3cx1c[_0x7a3f[32]]);_0xaf3cx10[_0x7a3f[35]]= true}else {_0xaf3cx10[_0x7a3f[35]]= false;console[_0x7a3f[11]](_0x7a3f[36])}};return}}function searchRoute(_0xaf3cxe){return function(){if(_0xaf3cxe[_0x7a3f[37]]){return VoiceExtension[_0x7a3f[27]]({where:{id:_0xaf3cxe[_0x7a3f[37]]},attributes:[_0x7a3f[38],_0x7a3f[39]]})}else {return}}}function handleOutboundRecordings(_0xaf3cx10,_0xaf3cxe){return function(_0xaf3cx1f){if(_0xaf3cxe[_0x7a3f[37]]){if(_0xaf3cx1f&& _0xaf3cx1f[_0x7a3f[39]]){console[_0x7a3f[11]](_0x7a3f[40],_0xaf3cx1f[_0x7a3f[38]]);_0xaf3cx10[_0x7a3f[35]]= true}else {_0xaf3cx10[_0x7a3f[35]]= false;console[_0x7a3f[11]](_0x7a3f[41])}};return}}function getAccountConfiguration(_0xaf3cx21){var _0xaf3cx22={uri:stripTrailingSlash(_0xaf3cx21[_0x7a3f[42]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x7a3f[43],"\x41\x63\x63\x65\x70\x74":_0x7a3f[43]}};var _0xaf3cx23=_0xaf3cx21[_0x7a3f[44]];if(_0xaf3cx21[_0x7a3f[45]]=== _0x7a3f[46]){_0xaf3cx23= _0xaf3cx23+ _0x7a3f[47]+ _0xaf3cx21[_0x7a3f[46]]}else {if(_0xaf3cx21[_0x7a3f[45]]=== _0x7a3f[48]){_0xaf3cx23= _0xaf3cx23+ _0x7a3f[49]+ _0xaf3cx21[_0x7a3f[48]]}};_0xaf3cx22[_0x7a3f[21]][_0x7a3f[50]]= _0x7a3f[51]+  new Buffer(_0xaf3cx23).toString(_0x7a3f[52]);return _0xaf3cx22}function searchAgent(_0xaf3cx10){return function(){if(_0xaf3cx10[_0x7a3f[30]]){console[_0x7a3f[11]](_0x7a3f[53],_0xaf3cx10[_0x7a3f[30]]);return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0x7a3f[54],qs:{"\x71\x75\x65\x72\x79":util[_0x7a3f[56]](_0x7a3f[55],_0xaf3cx10[_0x7a3f[30]])},headers:_0xaf3cx10[_0x7a3f[21]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0xaf3cxc){var _0xaf3cx26=_0x7a3f[57];if(_0xaf3cxc){switch(_0xaf3cxc){case _0x7a3f[59]:_0xaf3cx26= _0x7a3f[58];break;default:_0xaf3cx26= _0x7a3f[58];console[_0x7a3f[15]](_0x7a3f[60],_0xaf3cxc)}};return _0xaf3cx26}function getValueFromPropertyName(_0xaf3cxe,_0xaf3cx26,_0xaf3cx10){if(_0xaf3cx26=== _0x7a3f[61]){if(_0xaf3cx10&& _0xaf3cx10[_0x7a3f[35]]&& _0xaf3cx10[_0x7a3f[22]]){return util[_0x7a3f[56]](_0x7a3f[62],stripTrailingSlash(_0xaf3cx10[_0x7a3f[22]]),_0xaf3cxe[_0x7a3f[63]])}else {return null}}else {return _[_0x7a3f[64]](_0xaf3cxe,_0xaf3cx26)}}function handleAgent(_0xaf3cx10){return function(_0xaf3cxe){if(_0xaf3cxe&& _0xaf3cxe[_0x7a3f[66]][_0x7a3f[65]]> 0&& _0xaf3cxe[_0x7a3f[67]]> 0){console[_0x7a3f[11]](_0x7a3f[68],_0xaf3cx10[_0x7a3f[30]]);_0xaf3cx10[_0x7a3f[28]]= getMatchObject(_0xaf3cxe[_0x7a3f[66]],_0x7a3f[32],_0xaf3cx10[_0x7a3f[30]]);return _0xaf3cx10[_0x7a3f[28]]};return}}function getMatchObject(_0xaf3cx2a,_0xaf3cx26,_0xaf3cx2b){var _0xaf3cx2c=_[_0x7a3f[18]](_0xaf3cx2a,{property:_0xaf3cx2b});if(_0xaf3cx2c){return _0xaf3cx2c};return _[_0x7a3f[69]](_0xaf3cx2a)}function searchAdmin(_0xaf3cx10){return function(_0xaf3cxe){if(_0xaf3cxe){return};console[_0x7a3f[11]](_0x7a3f[70]);return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0x7a3f[71],headers:_0xaf3cx10[_0x7a3f[21]],json:true})}}function handleAdmin(_0xaf3cx10){return function(_0xaf3cxe){if(!_0xaf3cxe){return};if(_0xaf3cxe[_0x7a3f[72]]){console[_0x7a3f[11]](_0x7a3f[73]);_0xaf3cx10[_0x7a3f[28]]= _0xaf3cxe[_0x7a3f[72]]};return}}function searchEndUser(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxd){return function(){console[_0x7a3f[11]](_0x7a3f[74],getValueFromPropertyName(_0xaf3cxe,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)));return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0x7a3f[54],qs:{"\x71\x75\x65\x72\x79":util[_0x7a3f[56]](_0x7a3f[75],getEndUserSearchQueryFromChannel(_0xaf3cxc),getValueFromPropertyName(_0xaf3cxe,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)))},headers:_0xaf3cx10[_0x7a3f[21]],json:true})}}function getEndUserSearchQueryFromChannel(_0xaf3cxc){var _0xaf3cx26=_0x7a3f[57];if(_0xaf3cxc){switch(_0xaf3cxc){case _0x7a3f[59]:_0xaf3cx26= _0x7a3f[76];break;default:_0xaf3cx26= _0x7a3f[76];console[_0x7a3f[15]](_0x7a3f[60],_0xaf3cxc)}};return _0xaf3cx26}function getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd){var _0xaf3cx26=_0x7a3f[57];if(_0xaf3cxc){switch(_0xaf3cxc){case _0x7a3f[59]:if(_0xaf3cxd=== _0x7a3f[77]){_0xaf3cx26= _0x7a3f[78]}else {if(_0xaf3cxd=== _0x7a3f[31]){_0xaf3cx26= _0x7a3f[79]}};break;default:_0xaf3cx26= _0x7a3f[79];console[_0x7a3f[15]](_0x7a3f[60],_0xaf3cxc)}};return _0xaf3cx26}function getEndUserNamePropertyFromChannel(_0xaf3cxc,_0xaf3cxd){var _0xaf3cx26=_0x7a3f[57];if(_0xaf3cxc){switch(_0xaf3cxc){case _0x7a3f[59]:if(_0xaf3cxd=== _0x7a3f[77]){_0xaf3cx26= _0x7a3f[80]}else {if(_0xaf3cxd=== _0x7a3f[31]){_0xaf3cx26= _0x7a3f[81]}};break;default:_0xaf3cx26= _0x7a3f[81];console[_0x7a3f[15]](_0x7a3f[60],_0xaf3cxc)}};return _0xaf3cx26}function handleEndUser(_0xaf3cx10,_0xaf3cxc,_0xaf3cx34,_0xaf3cxd){return function(_0xaf3cxe){if(_0xaf3cxe[_0x7a3f[66]][_0x7a3f[65]]> 0&& _0xaf3cxe[_0x7a3f[67]]> 0){console[_0x7a3f[11]](_0x7a3f[82],getValueFromPropertyName(_0xaf3cx34,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)));_0xaf3cx10[_0x7a3f[83]]= _0xaf3cxe[_0x7a3f[66]][0];return _0xaf3cx10[_0x7a3f[83]]};return}}function endUserCreation(_0xaf3cx10,_0xaf3cxc,_0xaf3cx34,_0xaf3cxd){return function(_0xaf3cxe){if(_0xaf3cxe){return};console[_0x7a3f[11]](_0x7a3f[84],getValueFromPropertyName(_0xaf3cx34,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)));console[_0x7a3f[11]](getJsonForEndUserCreation(_0xaf3cxc,_0xaf3cx34,_0xaf3cxd));return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0x7a3f[85],method:_0x7a3f[86],body:{user:getJsonForEndUserCreation(_0xaf3cxc,_0xaf3cx34,_0xaf3cxd)},headers:_0xaf3cx10[_0x7a3f[21]],json:true})}}function getJsonForEndUserCreation(_0xaf3cxc,_0xaf3cxe,_0xaf3cxd){var _0xaf3cx37={role:_0x7a3f[87]};switch(_0xaf3cxc){case _0x7a3f[59]:if(_0xaf3cxd=== _0x7a3f[31]){if(isValidName(_0xaf3cxe[_0x7a3f[81]])){_0xaf3cx37[_0x7a3f[32]]= getValueFromPropertyName(_0xaf3cxe,getEndUserNamePropertyFromChannel(_0xaf3cxc,_0xaf3cxd))}else {_0xaf3cx37[_0x7a3f[32]]= util[_0x7a3f[56]](_0x7a3f[88],getValueFromPropertyName(_0xaf3cxe,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)))}}else {if(_0xaf3cxd=== _0x7a3f[77]){if(isValidName(_0xaf3cxe[_0x7a3f[80]])){_0xaf3cx37[_0x7a3f[32]]= getValueFromPropertyName(_0xaf3cxe,getEndUserNamePropertyFromChannel(_0xaf3cxc,_0xaf3cxd))}else {_0xaf3cx37[_0x7a3f[32]]= util[_0x7a3f[56]](_0x7a3f[88],getValueFromPropertyName(_0xaf3cxe,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)))}}};_0xaf3cx37[_0x7a3f[76]]= getValueFromPropertyName(_0xaf3cxe,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd));break;default:console[_0x7a3f[15]](_0x7a3f[60],_0xaf3cxc)};return _0xaf3cx37}function isValidName(_0xaf3cx39){return _0xaf3cx39&& _0xaf3cx39!== _0x7a3f[89]}function handleEndUserCreation(_0xaf3cx10,_0xaf3cxc,_0xaf3cx34,_0xaf3cxd){return function(_0xaf3cxe){if(!_0xaf3cxe){return};if(_0xaf3cxe[_0x7a3f[72]]){console[_0x7a3f[11]](_0x7a3f[90],getValueFromPropertyName(_0xaf3cx34,getEndUserSearchPropertyFromChannel(_0xaf3cxc,_0xaf3cxd)));_0xaf3cx10[_0x7a3f[83]]= _0xaf3cxe[_0x7a3f[72]]};return}}function ticketCreation(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf){return function(){var _0xaf3cx3c={requester_id:_0xaf3cx10[_0x7a3f[83]][_0x7a3f[38]],submitter_id:_0xaf3cx10[_0x7a3f[28]][_0x7a3f[38]],assignee_id:_0xaf3cx10[_0x7a3f[28]][_0x7a3f[38]],tags:createTagsFromConfiguration(_0xaf3cx10),subject:createSubjectFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf),comment:{public:false,body:createDescriptionFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf)},custom_fields:createCustomFieldsFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf)};var _0xaf3cx3d=createFieldsFromConfiguration(_0xaf3cx10);if(_0xaf3cx3d[_0x7a3f[65]]> 0){_[_0x7a3f[92]](_0xaf3cx3d,function(_0xaf3cx3e){_0xaf3cx3c[_0xaf3cx3e[_0x7a3f[38]]]= _0xaf3cx3e[_0x7a3f[91]]})};console[_0x7a3f[11]](_0x7a3f[93],_0xaf3cx3c);return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0x7a3f[94],method:_0x7a3f[86],body:{ticket:_0xaf3cx3c},headers:_0xaf3cx10[_0x7a3f[21]],json:true})}}function createTagsFromConfiguration(_0xaf3cx10){var _0xaf3cx40=[];if(_0xaf3cx10[_0x7a3f[19]][_0x7a3f[95]][_0x7a3f[65]]> 0){_0xaf3cx40= _[_0x7a3f[96]](_0xaf3cx10[_0x7a3f[19]].Tags,_0x7a3f[32])};return _0xaf3cx40}function createSubjectFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf){var _0xaf3cx42=_0x7a3f[57];var _0xaf3cx43=[];if(_0xaf3cx10[_0x7a3f[19]][_0x7a3f[97]][_0x7a3f[65]]> 0){var _0xaf3cx44=_[_0x7a3f[98]](_0xaf3cx10[_0x7a3f[19]].Subject,[_0x7a3f[38]]);_[_0x7a3f[92]](_0xaf3cx44,function(_0xaf3cx45){if(_0xaf3cx45[_0x7a3f[99]]=== _0x7a3f[100]){_0xaf3cx43[_0x7a3f[102]](_0xaf3cx45[_0x7a3f[101]])}else {if(_0xaf3cx45[_0x7a3f[99]]=== _0x7a3f[103]&& _0xaf3cx45[_0x7a3f[104]]){var _0xaf3cx46=getValueFromPropertyName(_0xaf3cx34,_0xaf3cx45[_0x7a3f[104]],_0xaf3cx10);if(_0xaf3cx46){_0xaf3cx43[_0x7a3f[102]](_0xaf3cx46.toString())}}else {if(_0xaf3cx45[_0x7a3f[99]]=== _0x7a3f[105]&& _0xaf3cx45[_0x7a3f[106]]&& _0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]){_0xaf3cxf[_0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]]&& _0xaf3cx43[_0x7a3f[102]](_0xaf3cxf[_0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]].toString())}}}});_0xaf3cx42= _0xaf3cx43[_0x7a3f[108]](_0x7a3f[107])};return _0xaf3cx42}function createDescriptionFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf){var _0xaf3cx48=_0x7a3f[57];var _0xaf3cx43=[];if(_0xaf3cx10[_0x7a3f[19]][_0x7a3f[109]][_0x7a3f[65]]> 0){var _0xaf3cx49=_[_0x7a3f[98]](_0xaf3cx10[_0x7a3f[19]].Description,[_0x7a3f[38]]);_[_0x7a3f[92]](_0xaf3cx49,function(_0xaf3cx45){if(_0xaf3cx45[_0x7a3f[99]]=== _0x7a3f[100]){_0xaf3cx43[_0x7a3f[102]](_0xaf3cx45[_0x7a3f[101]])}else {if(_0xaf3cx45[_0x7a3f[99]]=== _0x7a3f[110]){if(_0xaf3cx45[_0x7a3f[111]]=== _0x7a3f[100]&& _0xaf3cx45[_0x7a3f[112]]){_0xaf3cx43[_0x7a3f[102]](util[_0x7a3f[56]](_0x7a3f[113],_0xaf3cx45[_0x7a3f[112]],_0xaf3cx45[_0x7a3f[114]]))}else {if(_0xaf3cx45[_0x7a3f[111]]=== _0x7a3f[103]&& _0xaf3cx45[_0x7a3f[104]]&& _0xaf3cx45[_0x7a3f[112]]){var _0xaf3cx46=getValueFromPropertyName(_0xaf3cx34,_0xaf3cx45[_0x7a3f[104]],_0xaf3cx10);if(_0xaf3cx46){_0xaf3cx43[_0x7a3f[102]](util[_0x7a3f[56]](_0x7a3f[113],_0xaf3cx45[_0x7a3f[112]],_0xaf3cx46.toString()))}}else {if(_0xaf3cx45[_0x7a3f[111]]=== _0x7a3f[105]&& _0xaf3cx45[_0x7a3f[106]]&& _0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]&& _0xaf3cx45[_0x7a3f[112]]){_0xaf3cxf[_0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]]&& _0xaf3cx43[_0x7a3f[102]](util[_0x7a3f[56]](_0x7a3f[113],_0xaf3cx45[_0x7a3f[112]],_0xaf3cxf[_0xaf3cx45[_0x7a3f[106]][_0x7a3f[32]]]))}}}}}});_0xaf3cx48= _0xaf3cx43[_0x7a3f[108]](_0x7a3f[115])};return _0xaf3cx48}function createCustomFieldsFromConfiguration(_0xaf3cx10,_0xaf3cx34,_0xaf3cxf){var _0xaf3cx4b=[];var _0xaf3cx4c=[];if(_0xaf3cx10[_0x7a3f[19]][_0x7a3f[116]][_0x7a3f[65]]> 0){_0xaf3cx4b= _[_0x7a3f[117]](_0xaf3cx10[_0x7a3f[19]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x7a3f[92]](_0xaf3cx4b,function(_0xaf3cx3e){if(_0xaf3cx3e[_0x7a3f[99]]=== _0x7a3f[100]&& _0xaf3cx3e[_0x7a3f[118]]){_0xaf3cx4c[_0x7a3f[102]]({id:_0xaf3cx3e[_0x7a3f[118]],value:_0xaf3cx3e[_0x7a3f[101]]})}else {if(_0xaf3cx3e[_0x7a3f[99]]=== _0x7a3f[103]&& _0xaf3cx3e[_0x7a3f[104]]&& _0xaf3cx3e[_0x7a3f[118]]){var _0xaf3cx46=getValueFromPropertyName(_0xaf3cx34,_0xaf3cx3e[_0x7a3f[104]],_0xaf3cx10);if(_0xaf3cx46){_0xaf3cx4c[_0x7a3f[102]]({id:_0xaf3cx3e[_0x7a3f[118]],value:_0xaf3cx46.toString()})}}else {if(_0xaf3cx3e[_0x7a3f[99]]=== _0x7a3f[105]&& _0xaf3cx3e[_0x7a3f[106]]&& _0xaf3cx3e[_0x7a3f[106]][_0x7a3f[32]]&& _0xaf3cx3e[_0x7a3f[118]]){_0xaf3cxf[_0xaf3cx3e[_0x7a3f[106]][_0x7a3f[32]]]&& _0xaf3cx4c[_0x7a3f[102]]({id:_0xaf3cx3e[_0x7a3f[118]],value:_0xaf3cxf[_0xaf3cx3e[_0x7a3f[106]][_0x7a3f[32]]].toString()})}}}})};return _0xaf3cx4c}function createFieldsFromConfiguration(_0xaf3cx10){var _0xaf3cx3d=[];var _0xaf3cx4c=[];if(_0xaf3cx10[_0x7a3f[19]][_0x7a3f[116]][_0x7a3f[65]]> 0){_0xaf3cx3d= _[_0x7a3f[117]](_0xaf3cx10[_0x7a3f[19]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x7a3f[92]](_0xaf3cx3d,function(_0xaf3cx3e){if(_0xaf3cx3e[_0x7a3f[99]]=== _0x7a3f[100]&& _0xaf3cx3e[_0x7a3f[119]]){_0xaf3cx4c[_0x7a3f[102]]({id:_0xaf3cx3e[_0x7a3f[119]],value:_0xaf3cx3e[_0x7a3f[101]]})}})};return _0xaf3cx4c}function handleTicketDisplay(_0xaf3cx10){return function(_0xaf3cxe){if(_0xaf3cxe[_0x7a3f[120]]){console[_0x7a3f[11]](_0x7a3f[121]);_0xaf3cx10[_0x7a3f[120]]= _0xaf3cxe[_0x7a3f[120]];var _0xaf3cx4f=util[_0x7a3f[56]](_0x7a3f[122],_0xaf3cx10[_0x7a3f[28]][_0x7a3f[38]],_0xaf3cx10[_0x7a3f[120]][_0x7a3f[38]]);return rp({uri:_0xaf3cx10[_0x7a3f[20]]+ _0xaf3cx4f,method:_0x7a3f[86],headers:_0xaf3cx10[_0x7a3f[21]],json:true})};return}}function handleReportIntegration(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxa,_0xaf3cxd){return function(){delete _0xaf3cxe[_0x7a3f[38]];delete _0xaf3cxe[_0x7a3f[123]];delete _0xaf3cxe[_0x7a3f[124]];_0xaf3cxe[_0x7a3f[125]]= _0x7a3f[126];_0xaf3cxe[_0x7a3f[127]]= _0xaf3cxc;_0xaf3cxe[_0x7a3f[128]]= _0x7a3f[129];_0xaf3cxe[_0x7a3f[130]]= _0xaf3cx10[_0x7a3f[120]][_0x7a3f[38]];_0xaf3cxe[_0x7a3f[131]]= _0xaf3cx10[_0x7a3f[120]][_0x7a3f[131]];_0xaf3cxe[_0x7a3f[132]]= _0xaf3cxa;_0xaf3cxe[_0x7a3f[133]]= _0xaf3cxd;return ReportIntegration[_0x7a3f[134]](_0xaf3cxe)}}function handleEnd(_0xaf3cx10,_0xaf3cxe,_0xaf3cxc){return function(){console[_0x7a3f[11]](util[_0x7a3f[56]](_0x7a3f[135],_0xaf3cx10[_0x7a3f[120]][_0x7a3f[38]],_0xaf3cx10[_0x7a3f[28]][_0x7a3f[38]]));_0xaf3cx10= undefined;return}}function handleError(_0xaf3cx10,_0xaf3cxc,_0xaf3cxe,_0xaf3cxa){return function(_0xaf3cx53){console[_0x7a3f[15]](_0x7a3f[136]);console[_0x7a3f[15]](_0x7a3f[137],_0xaf3cx53[_0x7a3f[138]]);console[_0x7a3f[15]](_0x7a3f[139],_0xaf3cx53[_0x7a3f[140]]);_0xaf3cx10= undefined;delete _0xaf3cxe[_0x7a3f[38]];delete _0xaf3cxe[_0x7a3f[123]];delete _0xaf3cxe[_0x7a3f[124]];_0xaf3cxe[_0x7a3f[125]]= _0x7a3f[126];_0xaf3cxe[_0x7a3f[127]]= _0xaf3cxc;_0xaf3cxe[_0x7a3f[128]]= _0x7a3f[141];_0xaf3cxe[_0x7a3f[132]]= _0xaf3cxa;ReportIntegration[_0x7a3f[134]](_0xaf3cxe)[_0x7a3f[17]](function(){return})[_0x7a3f[16]](function(_0xaf3cx53){console[_0x7a3f[15]](_0x7a3f[142]);return})}}function stripTrailingSlash(_0xaf3cx55){if(_0xaf3cx55[_0x7a3f[143]](-1) === _0x7a3f[144]){return _0xaf3cx55[_0x7a3f[143]](0,_0xaf3cx55[_0x7a3f[65]]- 1)};return _0xaf3cx55}module[_0x7a3f[145]]= Zendesk
\ No newline at end of file
+var _0x6d67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x64\x65\x62\x75\x67","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x75\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x6d67[0];var _=require(_0x6d67[1]);var util=require(_0x6d67[2]);var rp=require(_0x6d67[3]);var logger=require(_0x6d67[5])(_0x6d67[4]);var ZendeskConfiguration=require(_0x6d67[7])[_0x6d67[6]];var ReportIntegration=require(_0x6d67[7])[_0x6d67[8]];var VoiceQueue=require(_0x6d67[7])[_0x6d67[9]];var VoiceExtension=require(_0x6d67[7])[_0x6d67[10]];var Agent=require(_0x6d67[7])[_0x6d67[11]];function Zendesk(){logger[_0x6d67[13]](_0x6d67[12])}Zendesk[_0x6d67[15]][_0x6d67[14]]= function(_0x5626xb,_0x5626xc,_0x5626xd,_0x5626xe,_0x5626xf,_0x5626x10){var _0x5626x11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x5626xb||  !_0x5626xc){logger[_0x6d67[17]](_0x6d67[16]);return};ZendeskConfiguration[_0x6d67[20]]({where:{id:_0x5626xc,AccountId:_0x5626xb},include:[{all:true,include:[{all:true}]}]})[_0x6d67[19]](handleEntityNotFound())[_0x6d67[19]](handleConnection(_0x5626x11))[_0x6d67[19]](searchMotionAgent(_0x5626xd,_0x5626xf))[_0x6d67[19]](handleMotionAgent(_0x5626x11))[_0x6d67[19]](searchQueue(_0x5626xf))[_0x6d67[19]](handleQueueRecordings(_0x5626x11,_0x5626xf))[_0x6d67[19]](searchRoute(_0x5626xf))[_0x6d67[19]](handleOutboundRecordings(_0x5626x11,_0x5626xf))[_0x6d67[19]](searchAgent(_0x5626x11))[_0x6d67[19]](handleAgent(_0x5626x11))[_0x6d67[19]](searchAdmin(_0x5626x11))[_0x6d67[19]](handleAdmin(_0x5626x11))[_0x6d67[19]](searchEndUser(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xe))[_0x6d67[19]](handleEndUser(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xe))[_0x6d67[19]](endUserCreation(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xe))[_0x6d67[19]](handleEndUserCreation(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xe))[_0x6d67[19]](ticketCreation(_0x5626x11,_0x5626xf,_0x5626x10))[_0x6d67[19]](handleTicketDisplay(_0x5626x11))[_0x6d67[19]](handleReportIntegration(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xb,_0x5626xe))[_0x6d67[19]](handleEnd(_0x5626x11))[_0x6d67[18]](handleError(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xb))};function handleEntityNotFound(){return function(_0x5626x13){if(!_0x5626x13){return null};return _0x5626x13}}function handleConnection(_0x5626x11){return function(_0x5626x15){var _0x5626x16=getAccountConfiguration(_0x5626x15.ZendeskAccount);_0x5626x11[_0x6d67[21]]= _0x5626x15;_0x5626x11[_0x6d67[22]]= _0x5626x16[_0x6d67[22]];_0x5626x11[_0x6d67[23]]= _0x5626x16[_0x6d67[23]];_0x5626x11[_0x6d67[24]]= _0x5626x15[_0x6d67[26]][_0x6d67[25]]}}function searchMotionAgent(_0x5626xd,_0x5626xf){return function(){var _0x5626x18=getAgentSearchPropertyFromChannel(_0x5626xd);if(_0x5626xf[_0x6d67[27]](_0x5626x18)){return Agent[_0x6d67[31]](_0x6d67[30])[_0x6d67[29]]({where:{name:getValueFromPropertyName(_0x5626xf,_0x5626x18)},attributes:[_0x6d67[28]]})};return}}function handleMotionAgent(_0x5626x11){return function(_0x5626x1a){if(_0x5626x1a&& _0x5626x1a[_0x6d67[28]]){_0x5626x11[_0x6d67[32]]= _0x5626x1a[_0x6d67[28]]};return}}function searchQueue(_0x5626xf){return function(){if(_0x5626xf[_0x6d67[33]]){return VoiceQueue[_0x6d67[29]]({where:{name:_0x5626xf[_0x6d67[33]]},attributes:[_0x6d67[34],_0x6d67[35]]})}else {return}}}function handleQueueRecordings(_0x5626x11,_0x5626xf){return function(_0x5626x1d){if(_0x5626xf[_0x6d67[33]]){if(_0x5626x1d&& _0x5626x1d[_0x6d67[35]]){logger[_0x6d67[37]](_0x6d67[36],_0x5626x1d[_0x6d67[34]]);_0x5626x11[_0x6d67[38]]= true}else {_0x5626x11[_0x6d67[38]]= false;logger[_0x6d67[37]](_0x6d67[39])}};return}}function searchRoute(_0x5626xf){return function(){if(_0x5626xf[_0x6d67[40]]){return VoiceExtension[_0x6d67[29]]({where:{id:_0x5626xf[_0x6d67[40]]},attributes:[_0x6d67[41],_0x6d67[42]]})}else {return}}}function handleOutboundRecordings(_0x5626x11,_0x5626xf){return function(_0x5626x20){if(_0x5626xf[_0x6d67[40]]){if(_0x5626x20&& _0x5626x20[_0x6d67[42]]){logger[_0x6d67[37]](_0x6d67[43],_0x5626x20[_0x6d67[41]]);_0x5626x11[_0x6d67[38]]= true}else {_0x5626x11[_0x6d67[38]]= false;logger[_0x6d67[37]](_0x6d67[44])}};return}}function getAccountConfiguration(_0x5626x22){var _0x5626x23={uri:stripTrailingSlash(_0x5626x22[_0x6d67[45]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x6d67[46],"\x41\x63\x63\x65\x70\x74":_0x6d67[46]}};var _0x5626x24=_0x5626x22[_0x6d67[47]];if(_0x5626x22[_0x6d67[48]]=== _0x6d67[49]){_0x5626x24= _0x5626x24+ _0x6d67[50]+ _0x5626x22[_0x6d67[49]]}else {if(_0x5626x22[_0x6d67[48]]=== _0x6d67[51]){_0x5626x24= _0x5626x24+ _0x6d67[52]+ _0x5626x22[_0x6d67[51]]}};_0x5626x23[_0x6d67[23]][_0x6d67[53]]= _0x6d67[54]+  new Buffer(_0x5626x24).toString(_0x6d67[55]);return _0x5626x23}function searchAgent(_0x5626x11){return function(){if(_0x5626x11[_0x6d67[32]]){logger[_0x6d67[37]](_0x6d67[56],_0x5626x11[_0x6d67[32]]);return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x6d67[57],qs:{"\x71\x75\x65\x72\x79":util[_0x6d67[59]](_0x6d67[58],_0x5626x11[_0x6d67[32]])},headers:_0x5626x11[_0x6d67[23]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0x5626xd){var _0x5626x27=_0x6d67[60];if(_0x5626xd){switch(_0x5626xd){case _0x6d67[62]:_0x5626x27= _0x6d67[61];break;default:_0x5626x27= _0x6d67[61];logger[_0x6d67[17]](_0x6d67[63],_0x5626xd)}};return _0x5626x27}function getValueFromPropertyName(_0x5626xf,_0x5626x27,_0x5626x11){if(_0x5626x27=== _0x6d67[64]){if(_0x5626x11&& _0x5626x11[_0x6d67[38]]&& _0x5626x11[_0x6d67[24]]){return util[_0x6d67[59]](_0x6d67[65],stripTrailingSlash(_0x5626x11[_0x6d67[24]]),_0x5626xf[_0x6d67[66]])}else {return null}}else {return _[_0x6d67[67]](_0x5626xf,_0x5626x27)}}function handleAgent(_0x5626x11){return function(_0x5626xf){if(_0x5626xf&& _0x5626xf[_0x6d67[69]][_0x6d67[68]]> 0&& _0x5626xf[_0x6d67[70]]> 0){logger[_0x6d67[37]](_0x6d67[71],_0x5626x11[_0x6d67[32]]);_0x5626x11[_0x6d67[30]]= getMatchObject(_0x5626xf[_0x6d67[69]],_0x6d67[34],_0x5626x11[_0x6d67[32]]);return _0x5626x11[_0x6d67[30]]};return}}function getMatchObject(_0x5626x2b,_0x5626x27,_0x5626x2c){var _0x5626x2d=_[_0x6d67[20]](_0x5626x2b,{property:_0x5626x2c});if(_0x5626x2d){return _0x5626x2d};return _[_0x6d67[72]](_0x5626x2b)}function searchAdmin(_0x5626x11){return function(_0x5626xf){if(_0x5626xf){return};logger[_0x6d67[37]](_0x6d67[73]);return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x6d67[74],headers:_0x5626x11[_0x6d67[23]],json:true})}}function handleAdmin(_0x5626x11){return function(_0x5626xf){if(!_0x5626xf){return};if(_0x5626xf[_0x6d67[75]]){logger[_0x6d67[37]](_0x6d67[76]);_0x5626x11[_0x6d67[30]]= _0x5626xf[_0x6d67[75]]};return}}function searchEndUser(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xe){return function(){logger[_0x6d67[37]](_0x6d67[77],getValueFromPropertyName(_0x5626xf,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)));return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x6d67[57],qs:{"\x71\x75\x65\x72\x79":util[_0x6d67[59]](_0x6d67[78],getEndUserSearchQueryFromChannel(_0x5626xd),getValueFromPropertyName(_0x5626xf,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)))},headers:_0x5626x11[_0x6d67[23]],json:true})}}function getEndUserSearchQueryFromChannel(_0x5626xd){var _0x5626x27=_0x6d67[60];if(_0x5626xd){switch(_0x5626xd){case _0x6d67[62]:_0x5626x27= _0x6d67[79];break;default:_0x5626x27= _0x6d67[79];logger[_0x6d67[17]](_0x6d67[63],_0x5626xd)}};return _0x5626x27}function getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe){var _0x5626x27=_0x6d67[60];if(_0x5626xd){switch(_0x5626xd){case _0x6d67[62]:if(_0x5626xe=== _0x6d67[80]){_0x5626x27= _0x6d67[81]}else {if(_0x5626xe=== _0x6d67[33]){_0x5626x27= _0x6d67[82]}};break;default:_0x5626x27= _0x6d67[82];logger[_0x6d67[17]](_0x6d67[63],_0x5626xd)}};return _0x5626x27}function getEndUserNamePropertyFromChannel(_0x5626xd,_0x5626xe){var _0x5626x27=_0x6d67[60];if(_0x5626xd){switch(_0x5626xd){case _0x6d67[62]:if(_0x5626xe=== _0x6d67[80]){_0x5626x27= _0x6d67[83]}else {if(_0x5626xe=== _0x6d67[33]){_0x5626x27= _0x6d67[84]}};break;default:_0x5626x27= _0x6d67[84];logger[_0x6d67[17]](_0x6d67[63],_0x5626xd)}};return _0x5626x27}function handleEndUser(_0x5626x11,_0x5626xd,_0x5626x35,_0x5626xe){return function(_0x5626xf){if(_0x5626xf[_0x6d67[69]][_0x6d67[68]]> 0&& _0x5626xf[_0x6d67[70]]> 0){logger[_0x6d67[37]](_0x6d67[85],getValueFromPropertyName(_0x5626x35,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)));_0x5626x11[_0x6d67[86]]= _0x5626xf[_0x6d67[69]][0];return _0x5626x11[_0x6d67[86]]};return}}function endUserCreation(_0x5626x11,_0x5626xd,_0x5626x35,_0x5626xe){return function(_0x5626xf){if(_0x5626xf){return};logger[_0x6d67[37]](_0x6d67[87],getValueFromPropertyName(_0x5626x35,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)));logger[_0x6d67[37]](getJsonForEndUserCreation(_0x5626xd,_0x5626x35,_0x5626xe));return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x6d67[88],method:_0x6d67[89],body:{user:getJsonForEndUserCreation(_0x5626xd,_0x5626x35,_0x5626xe)},headers:_0x5626x11[_0x6d67[23]],json:true})}}function getJsonForEndUserCreation(_0x5626xd,_0x5626xf,_0x5626xe){var _0x5626x38={role:_0x6d67[90]};switch(_0x5626xd){case _0x6d67[62]:if(_0x5626xe=== _0x6d67[33]){if(isValidName(_0x5626xf[_0x6d67[84]])){_0x5626x38[_0x6d67[34]]= getValueFromPropertyName(_0x5626xf,getEndUserNamePropertyFromChannel(_0x5626xd,_0x5626xe))}else {_0x5626x38[_0x6d67[34]]= util[_0x6d67[59]](_0x6d67[91],getValueFromPropertyName(_0x5626xf,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)))}}else {if(_0x5626xe=== _0x6d67[80]){if(isValidName(_0x5626xf[_0x6d67[83]])){_0x5626x38[_0x6d67[34]]= getValueFromPropertyName(_0x5626xf,getEndUserNamePropertyFromChannel(_0x5626xd,_0x5626xe))}else {_0x5626x38[_0x6d67[34]]= util[_0x6d67[59]](_0x6d67[91],getValueFromPropertyName(_0x5626xf,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)))}}};_0x5626x38[_0x6d67[79]]= getValueFromPropertyName(_0x5626xf,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe));break;default:logger[_0x6d67[17]](_0x6d67[63],_0x5626xd)};return _0x5626x38}function isValidName(_0x5626x3a){return _0x5626x3a&& _0x5626x3a!== _0x6d67[92]}function handleEndUserCreation(_0x5626x11,_0x5626xd,_0x5626x35,_0x5626xe){return function(_0x5626xf){if(!_0x5626xf){return};if(_0x5626xf[_0x6d67[75]]){logger[_0x6d67[37]](_0x6d67[93],getValueFromPropertyName(_0x5626x35,getEndUserSearchPropertyFromChannel(_0x5626xd,_0x5626xe)));_0x5626x11[_0x6d67[86]]= _0x5626xf[_0x6d67[75]]};return}}function ticketCreation(_0x5626x11,_0x5626x35,_0x5626x10){return function(){var _0x5626x3d={requester_id:_0x5626x11[_0x6d67[86]][_0x6d67[41]],submitter_id:_0x5626x11[_0x6d67[30]][_0x6d67[41]],assignee_id:_0x5626x11[_0x6d67[30]][_0x6d67[41]],tags:createTagsFromConfiguration(_0x5626x11),subject:createSubjectFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10),comment:{public:false,body:createDescriptionFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10)},custom_fields:createCustomFieldsFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10)};var _0x5626x3e=createFieldsFromConfiguration(_0x5626x11);if(_0x5626x3e[_0x6d67[68]]> 0){_[_0x6d67[95]](_0x5626x3e,function(_0x5626x3f){_0x5626x3d[_0x5626x3f[_0x6d67[41]]]= _0x5626x3f[_0x6d67[94]]})};logger[_0x6d67[37]](_0x6d67[96],_0x5626x3d);return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x6d67[97],method:_0x6d67[89],body:{ticket:_0x5626x3d},headers:_0x5626x11[_0x6d67[23]],json:true})}}function createTagsFromConfiguration(_0x5626x11){var _0x5626x41=[];if(_0x5626x11[_0x6d67[21]][_0x6d67[98]][_0x6d67[68]]> 0){_0x5626x41= _[_0x6d67[99]](_0x5626x11[_0x6d67[21]].Tags,_0x6d67[34])};return _0x5626x41}function createSubjectFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10){var _0x5626x43=_0x6d67[60];var _0x5626x44=[];if(_0x5626x11[_0x6d67[21]][_0x6d67[100]][_0x6d67[68]]> 0){var _0x5626x45=_[_0x6d67[101]](_0x5626x11[_0x6d67[21]].Subject,[_0x6d67[41]]);_[_0x6d67[95]](_0x5626x45,function(_0x5626x46){if(_0x5626x46[_0x6d67[102]]=== _0x6d67[103]){_0x5626x44[_0x6d67[105]](_0x5626x46[_0x6d67[104]])}else {if(_0x5626x46[_0x6d67[102]]=== _0x6d67[106]&& _0x5626x46[_0x6d67[107]]){var _0x5626x47=getValueFromPropertyName(_0x5626x35,_0x5626x46[_0x6d67[107]],_0x5626x11);if(_0x5626x47){_0x5626x44[_0x6d67[105]](_0x5626x47.toString())}}else {if(_0x5626x46[_0x6d67[102]]=== _0x6d67[108]&& _0x5626x46[_0x6d67[109]]&& _0x5626x46[_0x6d67[109]][_0x6d67[34]]){_0x5626x10[_0x5626x46[_0x6d67[109]][_0x6d67[34]]]&& _0x5626x44[_0x6d67[105]](_0x5626x10[_0x5626x46[_0x6d67[109]][_0x6d67[34]]].toString())}}}});_0x5626x43= _0x5626x44[_0x6d67[111]](_0x6d67[110])};return _0x5626x43}function createDescriptionFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10){var _0x5626x49=_0x6d67[60];var _0x5626x44=[];if(_0x5626x11[_0x6d67[21]][_0x6d67[112]][_0x6d67[68]]> 0){var _0x5626x4a=_[_0x6d67[101]](_0x5626x11[_0x6d67[21]].Description,[_0x6d67[41]]);_[_0x6d67[95]](_0x5626x4a,function(_0x5626x46){if(_0x5626x46[_0x6d67[102]]=== _0x6d67[103]){_0x5626x44[_0x6d67[105]](_0x5626x46[_0x6d67[104]])}else {if(_0x5626x46[_0x6d67[102]]=== _0x6d67[113]){if(_0x5626x46[_0x6d67[114]]=== _0x6d67[103]&& _0x5626x46[_0x6d67[115]]){_0x5626x44[_0x6d67[105]](util[_0x6d67[59]](_0x6d67[116],_0x5626x46[_0x6d67[115]],_0x5626x46[_0x6d67[117]]))}else {if(_0x5626x46[_0x6d67[114]]=== _0x6d67[106]&& _0x5626x46[_0x6d67[107]]&& _0x5626x46[_0x6d67[115]]){var _0x5626x47=getValueFromPropertyName(_0x5626x35,_0x5626x46[_0x6d67[107]],_0x5626x11);if(_0x5626x47){_0x5626x44[_0x6d67[105]](util[_0x6d67[59]](_0x6d67[116],_0x5626x46[_0x6d67[115]],_0x5626x47.toString()))}}else {if(_0x5626x46[_0x6d67[114]]=== _0x6d67[108]&& _0x5626x46[_0x6d67[109]]&& _0x5626x46[_0x6d67[109]][_0x6d67[34]]&& _0x5626x46[_0x6d67[115]]){_0x5626x10[_0x5626x46[_0x6d67[109]][_0x6d67[34]]]&& _0x5626x44[_0x6d67[105]](util[_0x6d67[59]](_0x6d67[116],_0x5626x46[_0x6d67[115]],_0x5626x10[_0x5626x46[_0x6d67[109]][_0x6d67[34]]]))}}}}}});_0x5626x49= _0x5626x44[_0x6d67[111]](_0x6d67[118])};return _0x5626x49}function createCustomFieldsFromConfiguration(_0x5626x11,_0x5626x35,_0x5626x10){var _0x5626x4c=[];var _0x5626x4d=[];if(_0x5626x11[_0x6d67[21]][_0x6d67[119]][_0x6d67[68]]> 0){_0x5626x4c= _[_0x6d67[120]](_0x5626x11[_0x6d67[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x6d67[95]](_0x5626x4c,function(_0x5626x3f){if(_0x5626x3f[_0x6d67[102]]=== _0x6d67[103]&& _0x5626x3f[_0x6d67[121]]){_0x5626x4d[_0x6d67[105]]({id:_0x5626x3f[_0x6d67[121]],value:_0x5626x3f[_0x6d67[104]]})}else {if(_0x5626x3f[_0x6d67[102]]=== _0x6d67[106]&& _0x5626x3f[_0x6d67[107]]&& _0x5626x3f[_0x6d67[121]]){var _0x5626x47=getValueFromPropertyName(_0x5626x35,_0x5626x3f[_0x6d67[107]],_0x5626x11);if(_0x5626x47){_0x5626x4d[_0x6d67[105]]({id:_0x5626x3f[_0x6d67[121]],value:_0x5626x47.toString()})}}else {if(_0x5626x3f[_0x6d67[102]]=== _0x6d67[108]&& _0x5626x3f[_0x6d67[109]]&& _0x5626x3f[_0x6d67[109]][_0x6d67[34]]&& _0x5626x3f[_0x6d67[121]]){_0x5626x10[_0x5626x3f[_0x6d67[109]][_0x6d67[34]]]&& _0x5626x4d[_0x6d67[105]]({id:_0x5626x3f[_0x6d67[121]],value:_0x5626x10[_0x5626x3f[_0x6d67[109]][_0x6d67[34]]].toString()})}}}})};return _0x5626x4d}function createFieldsFromConfiguration(_0x5626x11){var _0x5626x3e=[];var _0x5626x4d=[];if(_0x5626x11[_0x6d67[21]][_0x6d67[119]][_0x6d67[68]]> 0){_0x5626x3e= _[_0x6d67[120]](_0x5626x11[_0x6d67[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x6d67[95]](_0x5626x3e,function(_0x5626x3f){if(_0x5626x3f[_0x6d67[102]]=== _0x6d67[103]&& _0x5626x3f[_0x6d67[122]]){_0x5626x4d[_0x6d67[105]]({id:_0x5626x3f[_0x6d67[122]],value:_0x5626x3f[_0x6d67[104]]})}})};return _0x5626x4d}function handleTicketDisplay(_0x5626x11){return function(_0x5626xf){if(_0x5626xf[_0x6d67[123]]){logger[_0x6d67[37]](_0x6d67[124]);_0x5626x11[_0x6d67[123]]= _0x5626xf[_0x6d67[123]];var _0x5626x50=util[_0x6d67[59]](_0x6d67[125],_0x5626x11[_0x6d67[30]][_0x6d67[41]],_0x5626x11[_0x6d67[123]][_0x6d67[41]]);return rp({uri:_0x5626x11[_0x6d67[22]]+ _0x5626x50,method:_0x6d67[89],headers:_0x5626x11[_0x6d67[23]],json:true})};return}}function handleReportIntegration(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xb,_0x5626xe){return function(){delete _0x5626xf[_0x6d67[41]];delete _0x5626xf[_0x6d67[126]];delete _0x5626xf[_0x6d67[127]];_0x5626xf[_0x6d67[128]]= _0x6d67[129];_0x5626xf[_0x6d67[130]]= _0x5626xd;_0x5626xf[_0x6d67[131]]= _0x6d67[132];_0x5626xf[_0x6d67[133]]= _0x5626x11[_0x6d67[123]][_0x6d67[41]];_0x5626xf[_0x6d67[134]]= _0x5626x11[_0x6d67[123]][_0x6d67[134]];_0x5626xf[_0x6d67[135]]= _0x5626xb;_0x5626xf[_0x6d67[136]]= _0x5626xe;return ReportIntegration[_0x6d67[137]](_0x5626xf)}}function handleEnd(_0x5626x11,_0x5626xf,_0x5626xd){return function(){logger[_0x6d67[37]](util[_0x6d67[59]](_0x6d67[138],_0x5626x11[_0x6d67[123]][_0x6d67[41]],_0x5626x11[_0x6d67[30]][_0x6d67[41]]));_0x5626x11= undefined;return}}function handleError(_0x5626x11,_0x5626xd,_0x5626xf,_0x5626xb){return function(_0x5626x54){logger[_0x6d67[17]](_0x6d67[139]);logger[_0x6d67[17]](_0x6d67[140],_0x5626x54[_0x6d67[141]]);logger[_0x6d67[17]](_0x6d67[142],_0x5626x54[_0x6d67[143]]);_0x5626x11= undefined;delete _0x5626xf[_0x6d67[41]];delete _0x5626xf[_0x6d67[126]];delete _0x5626xf[_0x6d67[127]];_0x5626xf[_0x6d67[128]]= _0x6d67[129];_0x5626xf[_0x6d67[130]]= _0x5626xd;_0x5626xf[_0x6d67[131]]= _0x6d67[144];_0x5626xf[_0x6d67[135]]= _0x5626xb;ReportIntegration[_0x6d67[137]](_0x5626xf)[_0x6d67[19]](function(){return})[_0x6d67[18]](function(_0x5626x54){logger[_0x6d67[17]](_0x6d67[145]);return})}}function stripTrailingSlash(_0x5626x56){if(_0x5626x56[_0x6d67[146]](-1) === _0x6d67[147]){return _0x5626x56[_0x6d67[146]](0,_0x5626x56[_0x6d67[68]]- 1)};return _0x5626x56}module[_0x6d67[148]]= Zendesk
\ No newline at end of file