1 var _0xf1a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6C\x69\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x69\x64","\x66\x69\x6E\x64","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x41\x47\x45\x4E\x54\x20\x49\x44\x3A","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x29","\x69\x6E\x66\x6F","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x53\x4B\x49\x50\x50\x45\x44\x20\x28\x41\x47\x45\x4E\x54\x20\x4E\x4F\x54\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x29","\x6B\x65\x79\x42\x79","\x73\x68\x6F\x77","\x55\x73\x65\x72","\x55\x73\x65\x72\x49\x64","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x61\x73\x20\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x41\x53\x20\x63\x61\x70\x61\x63\x69\x74\x79\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x20\x57\x48\x45\x52\x45\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65"];_0xf1a5[0];var _=require(_0xf1a5[1]);var util=require(_0xf1a5[2]);var moment=require(_0xf1a5[3]);var logger=require(_0xf1a5[5])(_0xf1a5[4]);var rpcClient=require(_0xf1a5[6]);module[_0xf1a5[7]]= function(_0xc2ccx6,_0xc2ccx7,_0xc2ccx8,_0xc2ccx9){var _0xc2ccxa=[];var _0xc2ccxb;var _0xc2ccxc;var _0xc2ccxd;function _0xc2ccxe(_0xc2ccxf){var _0xc2ccx10=_[_0xf1a5[9]](_0xc2ccxa,{id:_0xc2ccxf[_0xf1a5[8]]});return _0xc2ccx10?true:false}return rpcClient[_0xf1a5[34]](_0xf1a5[54],[_0xf1a5[55]])[_0xf1a5[30]](function(_0xc2ccx7){_0xc2ccxd= _[_0xf1a5[47]](_0xc2ccx7,_0xf1a5[8]);return rpcClient[_0xf1a5[34]](_0xf1a5[48],[_0xf1a5[49],{where:{id:_0xc2ccx6[_0xf1a5[50]],online:true,chatPause:false},attributes:[_0xf1a5[8],_0xf1a5[42],_0xf1a5[51],_0xf1a5[52],_0xf1a5[53],_0xf1a5[38]]}])})[_0xf1a5[30]](function(_0xc2ccxf){_0xc2ccxc= _0xc2ccxf;logger[_0xf1a5[29]](_0xc2ccx7[_0xf1a5[11]][_0xf1a5[10]](),_0xf1a5[12],_0xc2ccx6.UserId,_0xf1a5[13],_0xc2ccx7[_0xf1a5[14]],_0xf1a5[36],_0xc2ccx6[_0xf1a5[35]],_0xf1a5[37]);if(_0xc2ccxf){var _0xc2ccx16=false;if(_0xc2ccxf[_0xf1a5[38]]> 0){if(_0xc2ccxd[_0xc2ccxf[_0xf1a5[8]]]&& _0xc2ccxd[_0xc2ccxf[_0xf1a5[8]]][_0xf1a5[40]](_0xf1a5[39])&& _0xc2ccxd[_0xc2ccxf[_0xf1a5[8]]][_0xf1a5[39]]>= _0xc2ccxf[_0xf1a5[38]]){_0xc2ccx16= true}};if(!_0xc2ccxe(_0xc2ccxc)&& !_0xc2ccx16){var _0xc2ccx12=_[_0xf1a5[43]](_0xc2ccx7,{timeslot:_0xc2ccx6[_0xf1a5[35]],application:_0xf1a5[41],membername:_0xc2ccxf[_0xf1a5[42]],memberid:_0xc2ccxf[_0xf1a5[8]],calledAt:moment()[_0xf1a5[22]](_0xf1a5[33]),joinAt:moment()[_0xf1a5[22]](_0xf1a5[33])});return rpcClient[_0xf1a5[34]](_0xf1a5[44],[_0xf1a5[32],_0xc2ccx12])[_0xf1a5[30]](function(_0xc2ccx15){_0xc2ccx8[_0xf1a5[23]](_0xf1a5[26])[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15);_0xc2ccx8[_0xf1a5[23]](_0xf1a5[27])[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15);_0xc2ccx8[_0xf1a5[23]](util[_0xf1a5[22]](_0xf1a5[20],_0xc2ccx15[_0xf1a5[21]]))[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15);return rpcClient[_0xf1a5[34]](_0xf1a5[44],[_0xf1a5[45],_0xc2ccx12])})}else {logger[_0xf1a5[29]](_0xc2ccx7[_0xf1a5[11]][_0xf1a5[10]](),_0xf1a5[12],_0xc2ccx6.UserId,_0xf1a5[13],_0xc2ccx7[_0xf1a5[14]],_0xf1a5[46]);_0xc2ccx9()}}else {logger[_0xf1a5[29]](_0xc2ccx7[_0xf1a5[11]][_0xf1a5[10]](),_0xf1a5[12],_0xc2ccx6.UserId,_0xf1a5[13],_0xc2ccx7[_0xf1a5[14]],_0xf1a5[46]);_0xc2ccx9()}})[_0xf1a5[30]](function(_0xc2ccx12){if(_0xc2ccx12){_0xc2ccx8[_0xf1a5[23]](util[_0xf1a5[22]](_0xf1a5[20],_0xc2ccx12[_0xf1a5[21]]))[_0xf1a5[19]](_0xf1a5[18],_0xc2ccx12);_0xc2ccxb= setTimeout(function(){return rpcClient[_0xf1a5[34]](_0xf1a5[31],[_0xf1a5[32],{leaveAt:moment()[_0xf1a5[22]](_0xf1a5[33]),timeout:true},{where:{uniqueid:_0xc2ccx7[_0xf1a5[14]],leaveAt:null},individualHooks:true}])[_0xf1a5[30]](function(_0xc2ccx13){if(_0xc2ccx13&& _0xc2ccx13[_0xf1a5[24]]&& _0xc2ccx13[1][_0xf1a5[24]]){for(var _0xc2ccx14=0;_0xc2ccx14< _0xc2ccx13[1][_0xf1a5[24]];_0xc2ccx14++){var _0xc2ccx15=_0xc2ccx13[1][_0xc2ccx14];_0xc2ccx8[_0xf1a5[23]](_0xf1a5[26])[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15);_0xc2ccx8[_0xf1a5[23]](_0xf1a5[27])[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15);_0xc2ccx8[_0xf1a5[23]](util[_0xf1a5[22]](_0xf1a5[20],_0xc2ccx15[_0xf1a5[21]]))[_0xf1a5[19]](_0xf1a5[25],_0xc2ccx15)}};logger[_0xf1a5[29]](_0xc2ccx7[_0xf1a5[11]][_0xf1a5[10]](),_0xf1a5[12],_0xc2ccx6.UserId,_0xf1a5[13],_0xc2ccx7[_0xf1a5[14]],_0xf1a5[28]);clearTimeout(_0xc2ccxb);_0xc2ccx9()})},_0xc2ccx6[_0xf1a5[35]]* 1000)}})[_0xf1a5[17]](function(_0xc2ccx11){logger[_0xf1a5[16]](_0xc2ccx7[_0xf1a5[11]][_0xf1a5[10]](),_0xf1a5[12],_0xc2ccx6.UserId,_0xf1a5[13],_0xc2ccx7[_0xf1a5[14]],_0xf1a5[15]);logger[_0xf1a5[16]](_0xc2ccx11);_0xc2ccx9(_0xc2ccx11)})}