1 var _0xe3f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x73\x6F\x62\x6A\x65\x63\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","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\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\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\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","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\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","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\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","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x6D\x69\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\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"];_0xe3f0[0];var _=require(_0xe3f0[1]);var util=require(_0xe3f0[2]);var jsforce=require(_0xe3f0[3]);var moment=require(_0xe3f0[4]);var logger=require(_0xe3f0[6])(_0xe3f0[5]);var SalesforceConfiguration=require(_0xe3f0[8])[_0xe3f0[7]];var ReportIntegration=require(_0xe3f0[8])[_0xe3f0[9]];var VoiceQueue=require(_0xe3f0[8])[_0xe3f0[10]];var VoiceExtension=require(_0xe3f0[8])[_0xe3f0[11]];var Agent=require(_0xe3f0[8])[_0xe3f0[12]];function Salesforce(){logger[_0xe3f0[14]](_0xe3f0[13])}Salesforce[_0xe3f0[16]][_0xe3f0[15]]= function(_0x7405xc,_0x7405xd,_0x7405xe,_0x7405xf,_0x7405x10,_0x7405x11,_0x7405x12){var _0x7405x13={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x7405xc|| !_0x7405xd){logger[_0xe3f0[18]](_0xe3f0[17]);return};SalesforceConfiguration[_0xe3f0[21]]({where:{id:_0x7405xd,AccountId:_0x7405xc},include:[{all:true,include:[{all:true}]}]})[_0xe3f0[20]](handleEntityNotFound())[_0xe3f0[20]](handleConnection(_0x7405x13))[_0xe3f0[20]](searchMotionAgent(_0x7405xe,_0x7405x10))[_0xe3f0[20]](handleMotionAgent(_0x7405x13))[_0xe3f0[20]](searchQueue(_0x7405x10))[_0xe3f0[20]](handleQueueRecordings(_0x7405x13,_0x7405x10))[_0xe3f0[20]](searchRoute(_0x7405x10))[_0xe3f0[20]](handleOutboundRecordings(_0x7405x13,_0x7405x10))[_0xe3f0[20]](searchAgent(_0x7405x13,_0x7405xe,_0x7405x10))[_0xe3f0[20]](handleAgent(_0x7405x13,_0x7405xe,_0x7405x10))[_0xe3f0[20]](searchAdmin(_0x7405x13))[_0xe3f0[20]](handleAdmin(_0x7405x13))[_0xe3f0[20]](searchContact(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](handleContact(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](searchLead(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](handleLead(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](leadCreation(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](handleLeadCreation(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf))[_0xe3f0[20]](taskCreation(_0x7405x13,_0x7405x10,_0x7405x11))[_0xe3f0[20]](handleTaskDisplay(_0x7405x13))[_0xe3f0[20]](handleReportIntegration(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xc,_0x7405x12,_0x7405xf))[_0xe3f0[20]](handleEnd(_0x7405x13))[_0xe3f0[19]](handleError(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xc))};function handleEntityNotFound(){return function(_0x7405x15){if(!_0x7405x15){return null};return _0x7405x15}}function handleConnection(_0x7405x13){return function(_0x7405x17){_0x7405x13[_0xe3f0[22]]= new jsforce.Connection({oauth2:{loginUrl:_0x7405x17[_0xe3f0[24]][_0xe3f0[23]]?_0x7405x17[_0xe3f0[24]][_0xe3f0[23]]:_0xe3f0[25],clientId:_0x7405x17[_0xe3f0[24]][_0xe3f0[26]],clientSecret:_0x7405x17[_0xe3f0[24]][_0xe3f0[27]]}});var _0x7405x18=_0x7405x17[_0xe3f0[24]][_0xe3f0[30]][_0xe3f0[29]](_0x7405x17[_0xe3f0[24]][_0xe3f0[28]]);_0x7405x13[_0xe3f0[31]]= _0x7405x17;_0x7405x13[_0xe3f0[32]]= _0x7405x17[_0xe3f0[24]][_0xe3f0[33]];return _0x7405x13[_0xe3f0[22]][_0xe3f0[35]](_0x7405x17[_0xe3f0[24]][_0xe3f0[34]],_0x7405x18)}}function searchMotionAgent(_0x7405xe,_0x7405x10){return function(){var _0x7405x1a=getAgentSearchPropertyFromChannel(_0x7405xe);if(_0x7405x10[_0xe3f0[36]](_0x7405x1a)){return Agent[_0xe3f0[40]](_0xe3f0[39])[_0xe3f0[38]]({where:{name:getValueFromPropertyName(_0x7405x10,_0x7405x1a)},attributes:[_0xe3f0[37]]})};return}}function handleMotionAgent(_0x7405x13){return function(_0x7405x1c){if(_0x7405x1c&& _0x7405x1c[_0xe3f0[37]]){_0x7405x13[_0xe3f0[41]]= _0x7405x1c[_0xe3f0[37]]};return}}function searchQueue(_0x7405x10){return function(){if(_0x7405x10[_0xe3f0[42]]){return VoiceQueue[_0xe3f0[38]]({where:{name:_0x7405x10[_0xe3f0[42]]},attributes:[_0xe3f0[43],_0xe3f0[44]]})}else {return}}}function handleQueueRecordings(_0x7405x13,_0x7405x10){return function(_0x7405x1f){if(_0x7405x10[_0xe3f0[42]]){if(_0x7405x1f&& _0x7405x1f[_0xe3f0[44]]){logger[_0xe3f0[46]](_0xe3f0[45],_0x7405x1f[_0xe3f0[43]]);_0x7405x13[_0xe3f0[47]]= true}else {_0x7405x13[_0xe3f0[47]]= false;logger[_0xe3f0[46]](_0xe3f0[48])}};return}}function searchRoute(_0x7405x10){return function(){if(_0x7405x10[_0xe3f0[49]]){return VoiceExtension[_0xe3f0[38]]({where:{id:_0x7405x10[_0xe3f0[49]]},attributes:[_0xe3f0[50],_0xe3f0[51]]})}else {return}}}function handleOutboundRecordings(_0x7405x13,_0x7405x10){return function(_0x7405x22){if(_0x7405x10[_0xe3f0[49]]){if(_0x7405x22&& _0x7405x22[_0xe3f0[51]]){logger[_0xe3f0[46]](_0xe3f0[52],_0x7405x22[_0xe3f0[50]]);_0x7405x13[_0xe3f0[47]]= true}else {_0x7405x13[_0xe3f0[47]]= false;logger[_0xe3f0[46]](_0xe3f0[53])}};return}}function searchAgent(_0x7405x13,_0x7405xe,_0x7405x10){return function(){if(_0x7405x13[_0xe3f0[41]]){logger[_0xe3f0[46]](_0xe3f0[54],_0x7405x13[_0xe3f0[41]]);return _0x7405x13[_0xe3f0[22]][_0xe3f0[56]](_0xe3f0[12])[_0xe3f0[21]]({Name:_0x7405x13[_0xe3f0[41]]},{Id:1,Username:1,Name:1})[_0xe3f0[55]]()};return}}function getAgentSearchPropertyFromChannel(_0x7405xe){var _0x7405x25=_0xe3f0[57];if(_0x7405xe){switch(_0x7405xe){case _0xe3f0[59]:_0x7405x25= _0xe3f0[58];break;default:_0x7405x25= _0xe3f0[58];logger[_0xe3f0[18]](_0xe3f0[60],_0x7405xe)}};return _0x7405x25}function getValueFromPropertyName(_0x7405x10,_0x7405x25,_0x7405x13){if(_0x7405x25=== _0xe3f0[61]){if(_0x7405x13&& _0x7405x13[_0xe3f0[47]]&& _0x7405x13[_0xe3f0[32]]){return util[_0xe3f0[64]](_0xe3f0[62],stripTrailingSlash(_0x7405x13[_0xe3f0[32]]),_0x7405x10[_0xe3f0[63]])}else {return null}}else {return _[_0xe3f0[65]](_0x7405x10,_0x7405x25)}}function handleAgent(_0x7405x13,_0x7405xe,_0x7405x28){return function(_0x7405x10){if(_0x7405x10&& _0x7405x10[_0xe3f0[66]]> 0){logger[_0xe3f0[46]](_0xe3f0[67],_0x7405x13[_0xe3f0[41]]);_0x7405x13[_0xe3f0[39]]= getMatchObject(_0x7405x10,_0xe3f0[68],_0x7405x13[_0xe3f0[41]]);return _0x7405x13[_0xe3f0[39]]};return}}function getMatchObject(_0x7405x2a,_0x7405x25,_0x7405x2b){var _0x7405x2c=_[_0xe3f0[21]](_0x7405x2a,{property:_0x7405x2b});if(_0x7405x2c){return _0x7405x2c};return _[_0xe3f0[69]](_0x7405x2a)}function searchAdmin(_0x7405x13){return function(_0x7405x10){if(_0x7405x10){return};logger[_0xe3f0[46]](_0xe3f0[70]);return _0x7405x13[_0xe3f0[22]][_0xe3f0[71]]()}}function handleAdmin(_0x7405x13){return function(_0x7405x10){if(!_0x7405x10){return};if(_0x7405x10){logger[_0xe3f0[46]](_0xe3f0[72]);_0x7405x13[_0xe3f0[39]]= {Id:_0x7405x10[_0xe3f0[73]],Name:_0x7405x10[_0xe3f0[74]],Username:_0x7405x10[_0xe3f0[34]]}};return}}function searchContact(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xf){return function(){logger[_0xe3f0[46]](_0xe3f0[75],getValueFromPropertyName(_0x7405x10,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));var _0x7405x30={};_0x7405x30[getEndUserSearchQueryFromChannel(_0x7405xe)]= getValueFromPropertyName(_0x7405x10,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf));return _0x7405x13[_0xe3f0[22]][_0xe3f0[56]](_0xe3f0[76])[_0xe3f0[21]](_0x7405x30,{Id:1,Name:1})[_0xe3f0[55]]()}}function getEndUserSearchQueryFromChannel(_0x7405xe){var _0x7405x25=_0xe3f0[57];if(_0x7405xe){switch(_0x7405xe){case _0xe3f0[59]:_0x7405x25= _0xe3f0[77];break;default:_0x7405x25= _0xe3f0[77];logger[_0xe3f0[18]](_0xe3f0[60],_0x7405xe)}};return _0x7405x25}function getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf){var _0x7405x25=_0xe3f0[57];if(_0x7405xe){switch(_0x7405xe){case _0xe3f0[59]:if(_0x7405xf=== _0xe3f0[78]){_0x7405x25= _0xe3f0[79]}else {if(_0x7405xf=== _0xe3f0[42]){_0x7405x25= _0xe3f0[80]}};break;default:_0x7405x25= _0xe3f0[80];logger[_0xe3f0[18]](_0xe3f0[60],_0x7405xe)}};return _0x7405x25}function getEndUserNamePropertyFromChannel(_0x7405xe,_0x7405xf){var _0x7405x25=_0xe3f0[57];if(_0x7405xe){switch(_0x7405xe){case _0xe3f0[59]:if(_0x7405xf=== _0xe3f0[78]){_0x7405x25= _0xe3f0[81]}else {if(_0x7405xf=== _0xe3f0[42]){_0x7405x25= _0xe3f0[82]}};break;default:_0x7405x25= _0xe3f0[82];logger[_0xe3f0[18]](_0xe3f0[60],_0x7405xe)}};return _0x7405x25}function handleContact(_0x7405x13,_0x7405xe,_0x7405x28,_0x7405xf){return function(_0x7405x10){if(_0x7405x10[_0xe3f0[66]]> 0){logger[_0xe3f0[46]](_0xe3f0[83],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));_0x7405x13[_0xe3f0[84]]= _0x7405x10[0];return _0x7405x13[_0xe3f0[84]]};logger[_0xe3f0[46]](_0xe3f0[85],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));return}}function searchLead(_0x7405x13,_0x7405xe,_0x7405x28,_0x7405xf){return function(_0x7405x10){if(!_0x7405x10){logger[_0xe3f0[46]](_0xe3f0[86],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));var _0x7405x30={};_0x7405x30[getEndUserSearchQueryFromChannel(_0x7405xe)]= getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf));return _0x7405x13[_0xe3f0[22]][_0xe3f0[56]](_0xe3f0[87])[_0xe3f0[21]](_0x7405x30,{Id:1,Name:1})[_0xe3f0[55]]()};return}}function handleLead(_0x7405x13,_0x7405xe,_0x7405x28,_0x7405xf){return function(_0x7405x10){if(_0x7405x10&& _0x7405x10[_0xe3f0[66]]> 0){logger[_0xe3f0[46]](_0xe3f0[88],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));_0x7405x13[_0xe3f0[84]]= _0x7405x10[0];return _0x7405x13[_0xe3f0[84]]};return}}function leadCreation(_0x7405x13,_0x7405xe,_0x7405x28,_0x7405xf){return function(_0x7405x10){if(_0x7405x10|| _0x7405x13[_0xe3f0[84]]){return};logger[_0xe3f0[46]](_0xe3f0[89],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));return _0x7405x13[_0xe3f0[22]][_0xe3f0[56]](_0xe3f0[87])[_0xe3f0[90]](getJsonForEndUserCreation(_0x7405xe,_0x7405x28,_0x7405xf))}}function getJsonForEndUserCreation(_0x7405xe,_0x7405x10,_0x7405xf){var _0x7405x39={Company:_0xe3f0[91]};switch(_0x7405xe){case _0xe3f0[59]:if(_0x7405xf=== _0xe3f0[42]){if(isValidName(_0x7405x10[_0xe3f0[82]])){_0x7405x39[_0xe3f0[92]]= getValueFromPropertyName(_0x7405x10,getEndUserNamePropertyFromChannel(_0x7405xe,_0x7405xf))}else {_0x7405x39[_0xe3f0[92]]= util[_0xe3f0[64]](_0xe3f0[93],getValueFromPropertyName(_0x7405x10,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)))}}else {if(_0x7405xf=== _0xe3f0[78]){if(isValidName(_0x7405x10[_0xe3f0[81]])){_0x7405x39[_0xe3f0[92]]= getValueFromPropertyName(_0x7405x10,getEndUserNamePropertyFromChannel(_0x7405xe,_0x7405xf))}else {_0x7405x39[_0xe3f0[92]]= util[_0xe3f0[64]](_0xe3f0[93],getValueFromPropertyName(_0x7405x10,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)))}}};_0x7405x39[_0xe3f0[77]]= getValueFromPropertyName(_0x7405x10,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf));break;default:logger[_0xe3f0[18]](_0xe3f0[60],_0x7405xe)};return _0x7405x39}function isValidName(_0x7405x3b){return _0x7405x3b&& _0x7405x3b!== _0xe3f0[94]}function handleLeadCreation(_0x7405x13,_0x7405xe,_0x7405x28,_0x7405xf){return function(_0x7405x10){if(!_0x7405x10){return};if(_0x7405x10&& _0x7405x10[_0xe3f0[95]]){logger[_0xe3f0[46]](_0xe3f0[96],getValueFromPropertyName(_0x7405x28,getEndUserSearchPropertyFromChannel(_0x7405xe,_0x7405xf)));_0x7405x13[_0xe3f0[84]]= {Id:_0x7405x10[_0xe3f0[50]]}};return}}function taskCreation(_0x7405x13,_0x7405x28,_0x7405x11){return function(){var _0x7405x3e={WhoId:_0x7405x13[_0xe3f0[84]][_0xe3f0[97]],OwnerId:_0x7405x13[_0xe3f0[39]][_0xe3f0[97]],ActivityDate:moment[_0xe3f0[98]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11),Description:createDescriptionFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11)};var _0x7405x3f=createCustomFieldsFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11);if(_0x7405x3f[_0xe3f0[66]]> 0){_[_0xe3f0[100]](_0x7405x3f,function(_0x7405x40){_0x7405x3e[_0x7405x40[_0xe3f0[50]]]= _0x7405x40[_0xe3f0[99]]})};return _0x7405x13[_0xe3f0[22]][_0xe3f0[56]](_0xe3f0[101])[_0xe3f0[90]](_0x7405x3e)}}function createSubjectFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11){var _0x7405x42=_0xe3f0[57];var _0x7405x43=[];if(_0x7405x13[_0xe3f0[31]][_0xe3f0[102]][_0xe3f0[66]]> 0){var _0x7405x44=_[_0xe3f0[103]](_0x7405x13[_0xe3f0[31]].Subject,[_0xe3f0[50]]);_[_0xe3f0[100]](_0x7405x44,function(_0x7405x45){if(_0x7405x45[_0xe3f0[104]]=== _0xe3f0[105]){_0x7405x43[_0xe3f0[107]](_0x7405x45[_0xe3f0[106]])}else {if(_0x7405x45[_0xe3f0[104]]=== _0xe3f0[108]&& _0x7405x45[_0xe3f0[109]]){var _0x7405x46=getValueFromPropertyName(_0x7405x28,_0x7405x45[_0xe3f0[109]],_0x7405x13);if(_0x7405x46){_0x7405x43[_0xe3f0[107]](_0x7405x46.toString())}}else {if(_0x7405x45[_0xe3f0[104]]=== _0xe3f0[110]&& _0x7405x45[_0xe3f0[111]]&& _0x7405x45[_0xe3f0[111]][_0xe3f0[43]]){_0x7405x11[_0x7405x45[_0xe3f0[111]][_0xe3f0[43]]]&& _0x7405x43[_0xe3f0[107]](_0x7405x11[_0x7405x45[_0xe3f0[111]][_0xe3f0[43]]].toString())}}}});_0x7405x42= _0x7405x43[_0xe3f0[113]](_0xe3f0[112])};return _0x7405x42}function createDescriptionFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11){var _0x7405x48=_0xe3f0[57];var _0x7405x43=[];if(_0x7405x13[_0xe3f0[31]][_0xe3f0[114]][_0xe3f0[66]]> 0){var _0x7405x49=_[_0xe3f0[103]](_0x7405x13[_0xe3f0[31]].Description,[_0xe3f0[50]]);_[_0xe3f0[100]](_0x7405x49,function(_0x7405x45){if(_0x7405x45[_0xe3f0[104]]=== _0xe3f0[105]){_0x7405x43[_0xe3f0[107]](_0x7405x45[_0xe3f0[106]])}else {if(_0x7405x45[_0xe3f0[104]]=== _0xe3f0[115]){if(_0x7405x45[_0xe3f0[116]]=== _0xe3f0[105]&& _0x7405x45[_0xe3f0[117]]){_0x7405x43[_0xe3f0[107]](util[_0xe3f0[64]](_0xe3f0[118],_0x7405x45[_0xe3f0[117]],_0x7405x45[_0xe3f0[119]]))}else {if(_0x7405x45[_0xe3f0[116]]=== _0xe3f0[108]&& _0x7405x45[_0xe3f0[109]]&& _0x7405x45[_0xe3f0[117]]){var _0x7405x46=getValueFromPropertyName(_0x7405x28,_0x7405x45[_0xe3f0[109]],_0x7405x13);if(_0x7405x46){_0x7405x43[_0xe3f0[107]](util[_0xe3f0[64]](_0xe3f0[118],_0x7405x45[_0xe3f0[117]],_0x7405x46.toString()))}}else {if(_0x7405x45[_0xe3f0[116]]=== _0xe3f0[110]&& _0x7405x45[_0xe3f0[111]]&& _0x7405x45[_0xe3f0[111]][_0xe3f0[43]]&& _0x7405x45[_0xe3f0[117]]){_0x7405x11[_0x7405x45[_0xe3f0[111]][_0xe3f0[43]]]&& _0x7405x43[_0xe3f0[107]](util[_0xe3f0[64]](_0xe3f0[118],_0x7405x45[_0xe3f0[117]],_0x7405x11[_0x7405x45[_0xe3f0[111]][_0xe3f0[43]]]))}}}}}});_0x7405x48= _0x7405x43[_0xe3f0[113]](_0xe3f0[120])};return _0x7405x48}function createCustomFieldsFromConfiguration(_0x7405x13,_0x7405x28,_0x7405x11){var _0x7405x4b=[];var _0x7405x4c=[];if(_0x7405x13[_0xe3f0[31]][_0xe3f0[121]][_0xe3f0[66]]> 0){_0x7405x4b= _0x7405x13[_0xe3f0[31]][_0xe3f0[121]];_[_0xe3f0[100]](_0x7405x4b,function(_0x7405x40){if(_0x7405x40[_0xe3f0[104]]=== _0xe3f0[105]&& _0x7405x40[_0xe3f0[122]]){_0x7405x4c[_0xe3f0[107]]({id:_0x7405x40[_0xe3f0[122]],value:_0x7405x40[_0xe3f0[106]]})}else {if(_0x7405x40[_0xe3f0[104]]=== _0xe3f0[108]&& _0x7405x40[_0xe3f0[109]]&& _0x7405x40[_0xe3f0[122]]){var _0x7405x46=getValueFromPropertyName(_0x7405x28,_0x7405x40[_0xe3f0[109]],_0x7405x13);if(_0x7405x46){_0x7405x4c[_0xe3f0[107]]({id:_0x7405x40[_0xe3f0[122]],value:_0x7405x46.toString()})}}else {if(_0x7405x40[_0xe3f0[104]]=== _0xe3f0[110]&& _0x7405x40[_0xe3f0[122]]&& _0x7405x40[_0xe3f0[111]]&& _0x7405x40[_0xe3f0[111]][_0xe3f0[43]]){_0x7405x11[_0x7405x40[_0xe3f0[111]][_0xe3f0[43]]]&& _0x7405x4c[_0xe3f0[107]]({id:_0x7405x40[_0xe3f0[122]],value:_0x7405x11[_0x7405x40[_0xe3f0[111]][_0xe3f0[43]]].toString()})}}}})};return _0x7405x4c}function handleTaskDisplay(_0x7405x13){return function(_0x7405x10){if(_0x7405x10&& _0x7405x10[_0xe3f0[95]]){logger[_0xe3f0[46]](_0xe3f0[123],_0x7405x10[_0xe3f0[50]]);_0x7405x13[_0xe3f0[124]]= _0x7405x10[_0xe3f0[50]];return};return}}function handleReportIntegration(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xc,_0x7405x12,_0x7405xf){return function(){delete _0x7405x10[_0xe3f0[50]];delete _0x7405x10[_0xe3f0[125]];delete _0x7405x10[_0xe3f0[126]];_0x7405x10[_0xe3f0[127]]= _0xe3f0[128];_0x7405x10[_0xe3f0[129]]= _0x7405xe;_0x7405x10[_0xe3f0[130]]= _0xe3f0[95];_0x7405x10[_0xe3f0[131]]= _0x7405x13[_0xe3f0[124]];_0x7405x10[_0xe3f0[132]]= _0x7405xc;_0x7405x10[_0xe3f0[133]]= _0x7405xf;_0x7405x10[_0xe3f0[134]]= util[_0xe3f0[64]](_0xe3f0[135],_0x7405x13[_0xe3f0[22]][_0xe3f0[136]],_0x7405x13[_0xe3f0[124]]);_0x7405x12[_0xe3f0[138]](_0xe3f0[137],_0x7405x10);return ReportIntegration[_0xe3f0[90]](_0x7405x10)}}function handleEnd(_0x7405x13,_0x7405x10,_0x7405xe){return function(){logger[_0xe3f0[46]](util[_0xe3f0[64]](_0xe3f0[139],_0x7405x13[_0xe3f0[124]],_0x7405x13[_0xe3f0[39]].Id));_0x7405x13= undefined;return}}function handleError(_0x7405x13,_0x7405xe,_0x7405x10,_0x7405xc){return function(_0x7405x51){logger[_0xe3f0[18]](_0xe3f0[140]);logger[_0xe3f0[18]](_0xe3f0[141],_0x7405x51[_0xe3f0[142]]);logger[_0xe3f0[18]](_0xe3f0[143],_0x7405x51[_0xe3f0[144]]);_0x7405x13= undefined;delete _0x7405x10[_0xe3f0[50]];delete _0x7405x10[_0xe3f0[125]];delete _0x7405x10[_0xe3f0[126]];_0x7405x10[_0xe3f0[127]]= _0xe3f0[128];_0x7405x10[_0xe3f0[129]]= _0x7405xe;_0x7405x10[_0xe3f0[130]]= _0xe3f0[145];_0x7405x10[_0xe3f0[132]]= _0x7405xc;ReportIntegration[_0xe3f0[90]](_0x7405x10)[_0xe3f0[20]](function(){return})[_0xe3f0[19]](function(_0x7405x51){logger[_0xe3f0[18]](_0xe3f0[146]);return})}}function stripTrailingSlash(_0x7405x53){if(_0x7405x53[_0xe3f0[147]](-1) === _0xe3f0[148]){return _0x7405x53[_0xe3f0[147]](0,_0x7405x53[_0xe3f0[66]]- 1)};return _0x7405x53}module[_0xe3f0[149]]= Salesforce