1 var _0xed38=["\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","\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","\x64\x65\x62\x75\x67","\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"];_0xed38[0];var _=require(_0xed38[1]);var util=require(_0xed38[2]);var rp=require(_0xed38[3]);var logger=require(_0xed38[5])(_0xed38[4]);var ZendeskConfiguration=require(_0xed38[7])[_0xed38[6]];var ReportIntegration=require(_0xed38[7])[_0xed38[8]];var VoiceQueue=require(_0xed38[7])[_0xed38[9]];var VoiceExtension=require(_0xed38[7])[_0xed38[10]];var Agent=require(_0xed38[7])[_0xed38[11]];function Zendesk(){logger[_0xed38[13]](_0xed38[12])}Zendesk[_0xed38[15]][_0xed38[14]]= function(_0xcc9fxb,_0xcc9fxc,_0xcc9fxd,_0xcc9fxe,_0xcc9fxf,_0xcc9fx10){var _0xcc9fx11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0xcc9fxb|| !_0xcc9fxc){logger[_0xed38[17]](_0xed38[16]);return};ZendeskConfiguration[_0xed38[20]]({where:{id:_0xcc9fxc,AccountId:_0xcc9fxb},include:[{all:true,include:[{all:true}]}]})[_0xed38[19]](handleEntityNotFound())[_0xed38[19]](handleConnection(_0xcc9fx11))[_0xed38[19]](searchMotionAgent(_0xcc9fxd,_0xcc9fxf))[_0xed38[19]](handleMotionAgent(_0xcc9fx11))[_0xed38[19]](searchQueue(_0xcc9fxf))[_0xed38[19]](handleQueueRecordings(_0xcc9fx11,_0xcc9fxf))[_0xed38[19]](searchRoute(_0xcc9fxf))[_0xed38[19]](handleOutboundRecordings(_0xcc9fx11,_0xcc9fxf))[_0xed38[19]](searchAgent(_0xcc9fx11))[_0xed38[19]](handleAgent(_0xcc9fx11))[_0xed38[19]](searchAdmin(_0xcc9fx11))[_0xed38[19]](handleAdmin(_0xcc9fx11))[_0xed38[19]](searchEndUser(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxe))[_0xed38[19]](handleEndUser(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxe))[_0xed38[19]](endUserCreation(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxe))[_0xed38[19]](handleEndUserCreation(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxe))[_0xed38[19]](ticketCreation(_0xcc9fx11,_0xcc9fxf,_0xcc9fx10))[_0xed38[19]](handleTicketDisplay(_0xcc9fx11))[_0xed38[19]](handleReportIntegration(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxb,_0xcc9fxe))[_0xed38[19]](handleEnd(_0xcc9fx11))[_0xed38[18]](handleError(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxb))};function handleEntityNotFound(){return function(_0xcc9fx13){if(!_0xcc9fx13){return null};return _0xcc9fx13}}function handleConnection(_0xcc9fx11){return function(_0xcc9fx15){var _0xcc9fx16=getAccountConfiguration(_0xcc9fx15.ZendeskAccount);_0xcc9fx11[_0xed38[21]]= _0xcc9fx15;_0xcc9fx11[_0xed38[22]]= _0xcc9fx16[_0xed38[22]];_0xcc9fx11[_0xed38[23]]= _0xcc9fx16[_0xed38[23]];_0xcc9fx11[_0xed38[24]]= _0xcc9fx15[_0xed38[26]][_0xed38[25]]}}function searchMotionAgent(_0xcc9fxd,_0xcc9fxf){return function(){var _0xcc9fx18=getAgentSearchPropertyFromChannel(_0xcc9fxd);if(_0xcc9fxf[_0xed38[27]](_0xcc9fx18)){return Agent[_0xed38[31]](_0xed38[30])[_0xed38[29]]({where:{name:getValueFromPropertyName(_0xcc9fxf,_0xcc9fx18)},attributes:[_0xed38[28]]})};return}}function handleMotionAgent(_0xcc9fx11){return function(_0xcc9fx1a){if(_0xcc9fx1a&& _0xcc9fx1a[_0xed38[28]]){_0xcc9fx11[_0xed38[32]]= _0xcc9fx1a[_0xed38[28]]};return}}function searchQueue(_0xcc9fxf){return function(){if(_0xcc9fxf[_0xed38[33]]){return VoiceQueue[_0xed38[29]]({where:{name:_0xcc9fxf[_0xed38[33]]},attributes:[_0xed38[34],_0xed38[35]]})}else {return}}}function handleQueueRecordings(_0xcc9fx11,_0xcc9fxf){return function(_0xcc9fx1d){if(_0xcc9fxf[_0xed38[33]]){if(_0xcc9fx1d&& _0xcc9fx1d[_0xed38[35]]){logger[_0xed38[13]](_0xed38[36],_0xcc9fx1d[_0xed38[34]]);_0xcc9fx11[_0xed38[37]]= true}else {_0xcc9fx11[_0xed38[37]]= false;logger[_0xed38[13]](_0xed38[38])}};return}}function searchRoute(_0xcc9fxf){return function(){if(_0xcc9fxf[_0xed38[39]]){return VoiceExtension[_0xed38[29]]({where:{id:_0xcc9fxf[_0xed38[39]]},attributes:[_0xed38[40],_0xed38[41]]})}else {return}}}function handleOutboundRecordings(_0xcc9fx11,_0xcc9fxf){return function(_0xcc9fx20){if(_0xcc9fxf[_0xed38[39]]){if(_0xcc9fx20&& _0xcc9fx20[_0xed38[41]]){logger[_0xed38[13]](_0xed38[42],_0xcc9fx20[_0xed38[40]]);_0xcc9fx11[_0xed38[37]]= true}else {_0xcc9fx11[_0xed38[37]]= false;logger[_0xed38[13]](_0xed38[43])}};return}}function getAccountConfiguration(_0xcc9fx22){var _0xcc9fx23={uri:stripTrailingSlash(_0xcc9fx22[_0xed38[44]]),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":_0xed38[45],"\x41\x63\x63\x65\x70\x74":_0xed38[45]}};var _0xcc9fx24=_0xcc9fx22[_0xed38[46]];if(_0xcc9fx22[_0xed38[47]]=== _0xed38[48]){_0xcc9fx24= _0xcc9fx24+ _0xed38[49]+ _0xcc9fx22[_0xed38[48]]}else {if(_0xcc9fx22[_0xed38[47]]=== _0xed38[50]){_0xcc9fx24= _0xcc9fx24+ _0xed38[51]+ _0xcc9fx22[_0xed38[50]]}};_0xcc9fx23[_0xed38[23]][_0xed38[52]]= _0xed38[53]+ new Buffer(_0xcc9fx24).toString(_0xed38[54]);return _0xcc9fx23}function searchAgent(_0xcc9fx11){return function(){if(_0xcc9fx11[_0xed38[32]]){logger[_0xed38[13]](_0xed38[55],_0xcc9fx11[_0xed38[32]]);return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xed38[56],qs:{"\x71\x75\x65\x72\x79":util[_0xed38[58]](_0xed38[57],_0xcc9fx11[_0xed38[32]])},headers:_0xcc9fx11[_0xed38[23]],json:true})};return}}function getAgentSearchPropertyFromChannel(_0xcc9fxd){var _0xcc9fx27=_0xed38[59];if(_0xcc9fxd){switch(_0xcc9fxd){case _0xed38[61]:_0xcc9fx27= _0xed38[60];break;default:_0xcc9fx27= _0xed38[60];logger[_0xed38[17]](_0xed38[62],_0xcc9fxd)}};return _0xcc9fx27}function getValueFromPropertyName(_0xcc9fxf,_0xcc9fx27,_0xcc9fx11){if(_0xcc9fx27=== _0xed38[63]){if(_0xcc9fx11&& _0xcc9fx11[_0xed38[37]]&& _0xcc9fx11[_0xed38[24]]){return util[_0xed38[58]](_0xed38[64],stripTrailingSlash(_0xcc9fx11[_0xed38[24]]),_0xcc9fxf[_0xed38[65]])}else {return null}}else {return _[_0xed38[66]](_0xcc9fxf,_0xcc9fx27)}}function handleAgent(_0xcc9fx11){return function(_0xcc9fxf){if(_0xcc9fxf&& _0xcc9fxf[_0xed38[68]][_0xed38[67]]> 0&& _0xcc9fxf[_0xed38[69]]> 0){logger[_0xed38[13]](_0xed38[70],_0xcc9fx11[_0xed38[32]]);_0xcc9fx11[_0xed38[30]]= getMatchObject(_0xcc9fxf[_0xed38[68]],_0xed38[34],_0xcc9fx11[_0xed38[32]]);return _0xcc9fx11[_0xed38[30]]};return}}function getMatchObject(_0xcc9fx2b,_0xcc9fx27,_0xcc9fx2c){var _0xcc9fx2d=_[_0xed38[20]](_0xcc9fx2b,{property:_0xcc9fx2c});if(_0xcc9fx2d){return _0xcc9fx2d};return _[_0xed38[71]](_0xcc9fx2b)}function searchAdmin(_0xcc9fx11){return function(_0xcc9fxf){if(_0xcc9fxf){return};logger[_0xed38[13]](_0xed38[72]);return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xed38[73],headers:_0xcc9fx11[_0xed38[23]],json:true})}}function handleAdmin(_0xcc9fx11){return function(_0xcc9fxf){if(!_0xcc9fxf){return};if(_0xcc9fxf[_0xed38[74]]){logger[_0xed38[13]](_0xed38[75]);_0xcc9fx11[_0xed38[30]]= _0xcc9fxf[_0xed38[74]]};return}}function searchEndUser(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxe){return function(){logger[_0xed38[13]](_0xed38[76],getValueFromPropertyName(_0xcc9fxf,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)));return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xed38[56],qs:{"\x71\x75\x65\x72\x79":util[_0xed38[58]](_0xed38[77],getEndUserSearchQueryFromChannel(_0xcc9fxd),getValueFromPropertyName(_0xcc9fxf,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)))},headers:_0xcc9fx11[_0xed38[23]],json:true})}}function getEndUserSearchQueryFromChannel(_0xcc9fxd){var _0xcc9fx27=_0xed38[59];if(_0xcc9fxd){switch(_0xcc9fxd){case _0xed38[61]:_0xcc9fx27= _0xed38[78];break;default:_0xcc9fx27= _0xed38[78];logger[_0xed38[17]](_0xed38[62],_0xcc9fxd)}};return _0xcc9fx27}function getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe){var _0xcc9fx27=_0xed38[59];if(_0xcc9fxd){switch(_0xcc9fxd){case _0xed38[61]:if(_0xcc9fxe=== _0xed38[79]){_0xcc9fx27= _0xed38[80]}else {if(_0xcc9fxe=== _0xed38[33]){_0xcc9fx27= _0xed38[81]}};break;default:_0xcc9fx27= _0xed38[81];logger[_0xed38[17]](_0xed38[62],_0xcc9fxd)}};return _0xcc9fx27}function getEndUserNamePropertyFromChannel(_0xcc9fxd,_0xcc9fxe){var _0xcc9fx27=_0xed38[59];if(_0xcc9fxd){switch(_0xcc9fxd){case _0xed38[61]:if(_0xcc9fxe=== _0xed38[79]){_0xcc9fx27= _0xed38[82]}else {if(_0xcc9fxe=== _0xed38[33]){_0xcc9fx27= _0xed38[83]}};break;default:_0xcc9fx27= _0xed38[83];logger[_0xed38[17]](_0xed38[62],_0xcc9fxd)}};return _0xcc9fx27}function handleEndUser(_0xcc9fx11,_0xcc9fxd,_0xcc9fx35,_0xcc9fxe){return function(_0xcc9fxf){if(_0xcc9fxf[_0xed38[68]][_0xed38[67]]> 0&& _0xcc9fxf[_0xed38[69]]> 0){logger[_0xed38[13]](_0xed38[84],getValueFromPropertyName(_0xcc9fx35,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)));_0xcc9fx11[_0xed38[85]]= _0xcc9fxf[_0xed38[68]][0];return _0xcc9fx11[_0xed38[85]]};return}}function endUserCreation(_0xcc9fx11,_0xcc9fxd,_0xcc9fx35,_0xcc9fxe){return function(_0xcc9fxf){if(_0xcc9fxf){return};logger[_0xed38[13]](_0xed38[86],getValueFromPropertyName(_0xcc9fx35,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)));logger[_0xed38[87]](getJsonForEndUserCreation(_0xcc9fxd,_0xcc9fx35,_0xcc9fxe));return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xed38[88],method:_0xed38[89],body:{user:getJsonForEndUserCreation(_0xcc9fxd,_0xcc9fx35,_0xcc9fxe)},headers:_0xcc9fx11[_0xed38[23]],json:true})}}function getJsonForEndUserCreation(_0xcc9fxd,_0xcc9fxf,_0xcc9fxe){var _0xcc9fx38={role:_0xed38[90]};switch(_0xcc9fxd){case _0xed38[61]:if(_0xcc9fxe=== _0xed38[33]){if(isValidName(_0xcc9fxf[_0xed38[83]])){_0xcc9fx38[_0xed38[34]]= getValueFromPropertyName(_0xcc9fxf,getEndUserNamePropertyFromChannel(_0xcc9fxd,_0xcc9fxe))}else {_0xcc9fx38[_0xed38[34]]= util[_0xed38[58]](_0xed38[91],getValueFromPropertyName(_0xcc9fxf,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)))}}else {if(_0xcc9fxe=== _0xed38[79]){if(isValidName(_0xcc9fxf[_0xed38[82]])){_0xcc9fx38[_0xed38[34]]= getValueFromPropertyName(_0xcc9fxf,getEndUserNamePropertyFromChannel(_0xcc9fxd,_0xcc9fxe))}else {_0xcc9fx38[_0xed38[34]]= util[_0xed38[58]](_0xed38[91],getValueFromPropertyName(_0xcc9fxf,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)))}}};_0xcc9fx38[_0xed38[78]]= getValueFromPropertyName(_0xcc9fxf,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe));break;default:logger[_0xed38[17]](_0xed38[62],_0xcc9fxd)};return _0xcc9fx38}function isValidName(_0xcc9fx3a){return _0xcc9fx3a&& _0xcc9fx3a!== _0xed38[92]}function handleEndUserCreation(_0xcc9fx11,_0xcc9fxd,_0xcc9fx35,_0xcc9fxe){return function(_0xcc9fxf){if(!_0xcc9fxf){return};if(_0xcc9fxf[_0xed38[74]]){logger[_0xed38[13]](_0xed38[93],getValueFromPropertyName(_0xcc9fx35,getEndUserSearchPropertyFromChannel(_0xcc9fxd,_0xcc9fxe)));_0xcc9fx11[_0xed38[85]]= _0xcc9fxf[_0xed38[74]]};return}}function ticketCreation(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10){return function(){var _0xcc9fx3d={requester_id:_0xcc9fx11[_0xed38[85]][_0xed38[40]],submitter_id:_0xcc9fx11[_0xed38[30]][_0xed38[40]],assignee_id:_0xcc9fx11[_0xed38[30]][_0xed38[40]],tags:createTagsFromConfiguration(_0xcc9fx11),subject:createSubjectFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10),comment:{public:false,body:createDescriptionFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10)},custom_fields:createCustomFieldsFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10)};var _0xcc9fx3e=createFieldsFromConfiguration(_0xcc9fx11);if(_0xcc9fx3e[_0xed38[67]]> 0){_[_0xed38[95]](_0xcc9fx3e,function(_0xcc9fx3f){_0xcc9fx3d[_0xcc9fx3f[_0xed38[40]]]= _0xcc9fx3f[_0xed38[94]]})};logger[_0xed38[87]](_0xed38[96],_0xcc9fx3d);return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xed38[97],method:_0xed38[89],body:{ticket:_0xcc9fx3d},headers:_0xcc9fx11[_0xed38[23]],json:true})}}function createTagsFromConfiguration(_0xcc9fx11){var _0xcc9fx41=[];if(_0xcc9fx11[_0xed38[21]][_0xed38[98]][_0xed38[67]]> 0){_0xcc9fx41= _[_0xed38[99]](_0xcc9fx11[_0xed38[21]].Tags,_0xed38[34])};return _0xcc9fx41}function createSubjectFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10){var _0xcc9fx43=_0xed38[59];var _0xcc9fx44=[];if(_0xcc9fx11[_0xed38[21]][_0xed38[100]][_0xed38[67]]> 0){var _0xcc9fx45=_[_0xed38[101]](_0xcc9fx11[_0xed38[21]].Subject,[_0xed38[40]]);_[_0xed38[95]](_0xcc9fx45,function(_0xcc9fx46){if(_0xcc9fx46[_0xed38[102]]=== _0xed38[103]){_0xcc9fx44[_0xed38[105]](_0xcc9fx46[_0xed38[104]])}else {if(_0xcc9fx46[_0xed38[102]]=== _0xed38[106]&& _0xcc9fx46[_0xed38[107]]){var _0xcc9fx47=getValueFromPropertyName(_0xcc9fx35,_0xcc9fx46[_0xed38[107]],_0xcc9fx11);if(_0xcc9fx47){_0xcc9fx44[_0xed38[105]](_0xcc9fx47.toString())}}else {if(_0xcc9fx46[_0xed38[102]]=== _0xed38[108]&& _0xcc9fx46[_0xed38[109]]&& _0xcc9fx46[_0xed38[109]][_0xed38[34]]){_0xcc9fx10[_0xcc9fx46[_0xed38[109]][_0xed38[34]]]&& _0xcc9fx44[_0xed38[105]](_0xcc9fx10[_0xcc9fx46[_0xed38[109]][_0xed38[34]]].toString())}}}});_0xcc9fx43= _0xcc9fx44[_0xed38[111]](_0xed38[110])};return _0xcc9fx43}function createDescriptionFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10){var _0xcc9fx49=_0xed38[59];var _0xcc9fx44=[];if(_0xcc9fx11[_0xed38[21]][_0xed38[112]][_0xed38[67]]> 0){var _0xcc9fx4a=_[_0xed38[101]](_0xcc9fx11[_0xed38[21]].Description,[_0xed38[40]]);_[_0xed38[95]](_0xcc9fx4a,function(_0xcc9fx46){if(_0xcc9fx46[_0xed38[102]]=== _0xed38[103]){_0xcc9fx44[_0xed38[105]](_0xcc9fx46[_0xed38[104]])}else {if(_0xcc9fx46[_0xed38[102]]=== _0xed38[113]){if(_0xcc9fx46[_0xed38[114]]=== _0xed38[103]&& _0xcc9fx46[_0xed38[115]]){_0xcc9fx44[_0xed38[105]](util[_0xed38[58]](_0xed38[116],_0xcc9fx46[_0xed38[115]],_0xcc9fx46[_0xed38[117]]))}else {if(_0xcc9fx46[_0xed38[114]]=== _0xed38[106]&& _0xcc9fx46[_0xed38[107]]&& _0xcc9fx46[_0xed38[115]]){var _0xcc9fx47=getValueFromPropertyName(_0xcc9fx35,_0xcc9fx46[_0xed38[107]],_0xcc9fx11);if(_0xcc9fx47){_0xcc9fx44[_0xed38[105]](util[_0xed38[58]](_0xed38[116],_0xcc9fx46[_0xed38[115]],_0xcc9fx47.toString()))}}else {if(_0xcc9fx46[_0xed38[114]]=== _0xed38[108]&& _0xcc9fx46[_0xed38[109]]&& _0xcc9fx46[_0xed38[109]][_0xed38[34]]&& _0xcc9fx46[_0xed38[115]]){_0xcc9fx10[_0xcc9fx46[_0xed38[109]][_0xed38[34]]]&& _0xcc9fx44[_0xed38[105]](util[_0xed38[58]](_0xed38[116],_0xcc9fx46[_0xed38[115]],_0xcc9fx10[_0xcc9fx46[_0xed38[109]][_0xed38[34]]]))}}}}}});_0xcc9fx49= _0xcc9fx44[_0xed38[111]](_0xed38[118])};return _0xcc9fx49}function createCustomFieldsFromConfiguration(_0xcc9fx11,_0xcc9fx35,_0xcc9fx10){var _0xcc9fx4c=[];var _0xcc9fx4d=[];if(_0xcc9fx11[_0xed38[21]][_0xed38[119]][_0xed38[67]]> 0){_0xcc9fx4c= _[_0xed38[120]](_0xcc9fx11[_0xed38[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xed38[95]](_0xcc9fx4c,function(_0xcc9fx3f){if(_0xcc9fx3f[_0xed38[102]]=== _0xed38[103]&& _0xcc9fx3f[_0xed38[121]]){_0xcc9fx4d[_0xed38[105]]({id:_0xcc9fx3f[_0xed38[121]],value:_0xcc9fx3f[_0xed38[104]]})}else {if(_0xcc9fx3f[_0xed38[102]]=== _0xed38[106]&& _0xcc9fx3f[_0xed38[107]]&& _0xcc9fx3f[_0xed38[121]]){var _0xcc9fx47=getValueFromPropertyName(_0xcc9fx35,_0xcc9fx3f[_0xed38[107]],_0xcc9fx11);if(_0xcc9fx47){_0xcc9fx4d[_0xed38[105]]({id:_0xcc9fx3f[_0xed38[121]],value:_0xcc9fx47.toString()})}}else {if(_0xcc9fx3f[_0xed38[102]]=== _0xed38[108]&& _0xcc9fx3f[_0xed38[109]]&& _0xcc9fx3f[_0xed38[109]][_0xed38[34]]&& _0xcc9fx3f[_0xed38[121]]){_0xcc9fx10[_0xcc9fx3f[_0xed38[109]][_0xed38[34]]]&& _0xcc9fx4d[_0xed38[105]]({id:_0xcc9fx3f[_0xed38[121]],value:_0xcc9fx10[_0xcc9fx3f[_0xed38[109]][_0xed38[34]]].toString()})}}}})};return _0xcc9fx4d}function createFieldsFromConfiguration(_0xcc9fx11){var _0xcc9fx3e=[];var _0xcc9fx4d=[];if(_0xcc9fx11[_0xed38[21]][_0xed38[119]][_0xed38[67]]> 0){_0xcc9fx3e= _[_0xed38[120]](_0xcc9fx11[_0xed38[21]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xed38[95]](_0xcc9fx3e,function(_0xcc9fx3f){if(_0xcc9fx3f[_0xed38[102]]=== _0xed38[103]&& _0xcc9fx3f[_0xed38[122]]){_0xcc9fx4d[_0xed38[105]]({id:_0xcc9fx3f[_0xed38[122]],value:_0xcc9fx3f[_0xed38[104]]})}})};return _0xcc9fx4d}function handleTicketDisplay(_0xcc9fx11){return function(_0xcc9fxf){if(_0xcc9fxf[_0xed38[123]]){logger[_0xed38[13]](_0xed38[124]);_0xcc9fx11[_0xed38[123]]= _0xcc9fxf[_0xed38[123]];var _0xcc9fx50=util[_0xed38[58]](_0xed38[125],_0xcc9fx11[_0xed38[30]][_0xed38[40]],_0xcc9fx11[_0xed38[123]][_0xed38[40]]);return rp({uri:_0xcc9fx11[_0xed38[22]]+ _0xcc9fx50,method:_0xed38[89],headers:_0xcc9fx11[_0xed38[23]],json:true})};return}}function handleReportIntegration(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxb,_0xcc9fxe){return function(){delete _0xcc9fxf[_0xed38[40]];delete _0xcc9fxf[_0xed38[126]];delete _0xcc9fxf[_0xed38[127]];_0xcc9fxf[_0xed38[128]]= _0xed38[129];_0xcc9fxf[_0xed38[130]]= _0xcc9fxd;_0xcc9fxf[_0xed38[131]]= _0xed38[132];_0xcc9fxf[_0xed38[133]]= _0xcc9fx11[_0xed38[123]][_0xed38[40]];_0xcc9fxf[_0xed38[134]]= _0xcc9fx11[_0xed38[123]][_0xed38[134]];_0xcc9fxf[_0xed38[135]]= _0xcc9fxb;_0xcc9fxf[_0xed38[136]]= _0xcc9fxe;return ReportIntegration[_0xed38[137]](_0xcc9fxf)}}function handleEnd(_0xcc9fx11,_0xcc9fxf,_0xcc9fxd){return function(){logger[_0xed38[13]](util[_0xed38[58]](_0xed38[138],_0xcc9fx11[_0xed38[123]][_0xed38[40]],_0xcc9fx11[_0xed38[30]][_0xed38[40]]));_0xcc9fx11= undefined;return}}function handleError(_0xcc9fx11,_0xcc9fxd,_0xcc9fxf,_0xcc9fxb){return function(_0xcc9fx54){logger[_0xed38[17]](_0xed38[139]);logger[_0xed38[17]](_0xed38[140],_0xcc9fx54[_0xed38[141]]);logger[_0xed38[17]](_0xed38[142],_0xcc9fx54[_0xed38[143]]);_0xcc9fx11= undefined;delete _0xcc9fxf[_0xed38[40]];delete _0xcc9fxf[_0xed38[126]];delete _0xcc9fxf[_0xed38[127]];_0xcc9fxf[_0xed38[128]]= _0xed38[129];_0xcc9fxf[_0xed38[130]]= _0xcc9fxd;_0xcc9fxf[_0xed38[131]]= _0xed38[144];_0xcc9fxf[_0xed38[135]]= _0xcc9fxb;ReportIntegration[_0xed38[137]](_0xcc9fxf)[_0xed38[19]](function(){return})[_0xed38[18]](function(_0xcc9fx54){logger[_0xed38[17]](_0xed38[145]);return})}}function stripTrailingSlash(_0xcc9fx56){if(_0xcc9fx56[_0xed38[146]](-1) === _0xed38[147]){return _0xcc9fx56[_0xed38[146]](0,_0xcc9fx56[_0xed38[67]]- 1)};return _0xcc9fx56}module[_0xed38[148]]= Zendesk