dde8f0a9fb6dc45e8a4a7b5570bc78e07b236cee
[motion.git] / server / config / forked_routing / chat / queue.js
1 var _0x3784=["\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","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\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","\x74\x6F","\x63\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x72\x65\x71\x75\x65\x73\x74","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x6B\x65\x79\x42\x79","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\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","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\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","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x61\x6C\x6C","\x73\x68\x6F\x77","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0x3784[0];var _=require(_0x3784[1]);var util=require(_0x3784[2]);var moment=require(_0x3784[3]);var logger=require(_0x3784[5])(_0x3784[4]);var rpcClient=require(_0x3784[6]);module[_0x3784[7]]= function(_0xf7a9x6,_0xf7a9x7,_0xf7a9x8,_0xf7a9x9){var _0xf7a9xa=[];var _0xf7a9xb;var _0xf7a9xc;var _0xf7a9xd;var _0xf7a9xe=0;process[_0x3784[25]](_0x3784[8],function(_0xf7a9xf){switch(_0xf7a9xf[_0x3784[24]]){case _0x3784[23]:logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[17],_0xf7a9xf[_0x3784[18]],_0x3784[19]);_0xf7a9xa[_0x3784[22]]({id:_0xf7a9xf[_0x3784[21]]});break;default:}});function _0xf7a9x10(_0xf7a9x11){var _0xf7a9x12=_[_0x3784[26]](_0xf7a9xa,{id:_0xf7a9x11[_0x3784[21]]});return _0xf7a9x12?true:false}function _0xf7a9x13(){var _0xf7a9x14=((_0xf7a9x6[_0x3784[27]]- _0xf7a9xe)> _0xf7a9xd[_0x3784[27]])?_0xf7a9xd[_0x3784[27]]:(_0xf7a9x6[_0x3784[27]]- _0xf7a9xe);var _0xf7a9x15;if(_0xf7a9x14> 0){if(_0xf7a9xc[_0x3784[28]]){var _0xf7a9x16={where:{id:{$in:_[_0x3784[29]](_0xf7a9xc,_0x3784[21])},online:true,chatPause:false},include:[{model:_0x3784[30],attributes:[_0x3784[21]],raw:true}],attributes:[_0x3784[21],_0x3784[12],_0x3784[31],_0x3784[32],_0x3784[33],_0x3784[34]],order:[[{raw:util[_0x3784[37]](_0x3784[35],_[_0x3784[29]](_0xf7a9xc,_0x3784[21])[_0x3784[36]]())}]]};return rpcClient[_0x3784[58]](_0x3784[63],[_0x3784[64]])[_0x3784[41]](function(_0xf7a9x7){_0xf7a9x15= _[_0x3784[60]](_0xf7a9x7,_0x3784[21]);return rpcClient[_0x3784[58]](_0x3784[61],[_0x3784[62],_0xf7a9x16])})[_0x3784[41]](function(_0xf7a9x19){if(_0xf7a9x19[_0x3784[28]]){var _0xf7a9x1a;for(var _0xf7a9x1b=0;_0xf7a9x1b< _0xf7a9x19[_0x3784[28]];_0xf7a9x1b++){var _0xf7a9x11=_0xf7a9x19[_0xf7a9x1b];var _0xf7a9x1c=false;if(_0xf7a9x11[_0x3784[34]]> 0){if(_0xf7a9x15[_0xf7a9x11[_0x3784[21]]]&& _0xf7a9x15[_0xf7a9x11[_0x3784[21]]][_0x3784[48]](_0x3784[47])&& _0xf7a9x15[_0xf7a9x11[_0x3784[21]]][_0x3784[47]]>= _0xf7a9x11[_0x3784[34]]){_0xf7a9x1c= true}};if(!_0xf7a9x10(_0xf7a9x11)&&  !_0xf7a9x1c){_0xf7a9x1a= _0xf7a9x11;break}};if(_0xf7a9x1a){logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[49],_0xf7a9x1a[_0x3784[21]],_0xf7a9x1a[_0x3784[12]]);var _0xf7a9x1d=_[_0x3784[50]](_0xf7a9xc,{"\x69\x64":_0xf7a9x1a[_0x3784[21]]});if(_0xf7a9x1d>= 0){var _0xf7a9x1e=_0xf7a9xc[_0x3784[51]](_0xf7a9x1d,1);if(_0xf7a9x1e&& _0xf7a9x1e[_0x3784[28]]){_0xf7a9xc[_0x3784[22]](_[_0x3784[52]](_0xf7a9x1e))}};return rpcClient[_0x3784[58]](_0x3784[53],[_0x3784[54],_[_0x3784[57]](_0xf7a9x7,{timeslot:_0xf7a9x14,application:_0x3784[55],membername:_0xf7a9x1a[_0x3784[12]],memberid:_0xf7a9x1a[_0x3784[21]],queue:_0xf7a9xd[_0x3784[21]],queuename:_0xf7a9xd[_0x3784[12]],calledAt:moment()[_0x3784[37]](_0x3784[56])})])};logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59]);return}else {logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59]);return}})[_0x3784[41]](function(_0xf7a9x18){if(_0xf7a9x18){_0xf7a9x8[_0x3784[46]](util[_0x3784[37]](_0x3784[44],_0xf7a9x18[_0x3784[45]]))[_0x3784[43]](_0x3784[42],_0xf7a9x18)}})[_0x3784[41]](function(){_0xf7a9xb= setTimeout(function(){_0xf7a9xe+= _0xf7a9xd[_0x3784[27]];_0xf7a9x13()},_0xf7a9x14* 1000)})[_0x3784[40]](function(_0xf7a9x17){logger[_0x3784[39]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[38]);_0xf7a9x9(_0xf7a9x17)})}else {logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59]);_0xf7a9xb= setTimeout(function(){_0xf7a9xe+= _0xf7a9xd[_0x3784[27]];_0xf7a9x13()},_0xf7a9x14* 1000)}}else {return rpcClient[_0x3784[58]](_0x3784[69],[_0x3784[70],{leaveAt:moment()[_0x3784[37]](_0x3784[56]),timeout:true},{where:{uniqueid:_0xf7a9x7[_0x3784[16]],leaveAt:null},individualHooks:true}])[_0x3784[41]](function(_0xf7a9x1f){if(_0xf7a9x1f&& _0xf7a9x1f[_0x3784[28]]&& _0xf7a9x1f[1][_0x3784[28]]){for(var _0xf7a9x1b=0;_0xf7a9x1b< _0xf7a9x1f[1][_0x3784[28]];_0xf7a9x1b++){var _0xf7a9x20=_0xf7a9x1f[1][_0xf7a9x1b];_0xf7a9x8[_0x3784[46]](_0x3784[67])[_0x3784[43]](_0x3784[66],_0xf7a9x20);_0xf7a9x8[_0x3784[46]](_0x3784[68])[_0x3784[43]](_0x3784[66],_0xf7a9x20)}}})[_0x3784[41]](function(){logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[65]);clearTimeout(_0xf7a9xb);_0xf7a9x9()})[_0x3784[40]](function(_0xf7a9x17){logger[_0x3784[39]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[38]);_0xf7a9x9(_0xf7a9x17)})}}function _0xf7a9x21(){var _0xf7a9x14=((_0xf7a9x6[_0x3784[27]]- _0xf7a9xe)> _0xf7a9xd[_0x3784[27]])?_0xf7a9xd[_0x3784[27]]:(_0xf7a9x6[_0x3784[27]]- _0xf7a9xe);if(_0xf7a9x14> 0){var _0xf7a9x15;return rpcClient[_0x3784[58]](_0x3784[63],[_0x3784[64]])[_0x3784[41]](function(_0xf7a9x7){_0xf7a9x15= _[_0x3784[60]](_0xf7a9x7,_0x3784[21]);return rpcClient[_0x3784[58]](_0x3784[77],[_0x3784[78],{where:{id:_0xf7a9x6[_0x3784[79]]},attributes:[_0x3784[21],_0x3784[12],_0x3784[27],_0x3784[14],_0x3784[80]],include:[{model:_0x3784[62],where:{online:true,chatPause:false},attributes:[_0x3784[21],_0x3784[12],_0x3784[31],_0x3784[32],_0x3784[33],_0x3784[34]],raw:true}]}])})[_0x3784[41]](function(_0xf7a9x23){if(_0xf7a9x23){var _0xf7a9x24=_[_0x3784[73]](_[_0x3784[72]](_0xf7a9x23.Users,_0x3784[71]));if(_0xf7a9x24&& _0xf7a9x24[_0x3784[28]]){var _0xf7a9x25;for(var _0xf7a9x1b=0;_0xf7a9x1b< _0xf7a9x24[_0x3784[28]];_0xf7a9x1b++){_[_0x3784[74]](_0xf7a9x24[_0xf7a9x1b],function(_0xf7a9x11){var _0xf7a9x1c=false;if(_0xf7a9x11[_0x3784[34]]> 0){if(_0xf7a9x15[_0xf7a9x11[_0x3784[21]]]&& _0xf7a9x15[_0xf7a9x11[_0x3784[21]]][_0x3784[48]](_0x3784[47])&& _0xf7a9x15[_0xf7a9x11[_0x3784[21]]][_0x3784[47]]>= _0xf7a9x11[_0x3784[34]]){_0xf7a9x1c= true}};return _0xf7a9x10(_0xf7a9x11)|| _0xf7a9x1c});if(_0xf7a9x24[_0xf7a9x1b][_0x3784[28]]){_0xf7a9x25= _0xf7a9x24[_0xf7a9x1b];break}};if(_0xf7a9x25&& _0xf7a9x25[_0x3784[28]]){var _0xf7a9x26=_[_0x3784[29]](_0xf7a9x25,function(_0xf7a9x11){return _[_0x3784[75]](_[_0x3784[57]](_0xf7a9x7,{timeslot:_0xf7a9x14,application:_0x3784[55],membername:_0xf7a9x11[_0x3784[12]],memberid:_0xf7a9x11[_0x3784[21]],queue:_0xf7a9xd[_0x3784[21]],queuename:_0xf7a9xd[_0x3784[12]],calledAt:moment()[_0x3784[37]](_0x3784[56])}))});var _0xf7a9x27=[];for(var _0xf7a9x28=0;_0xf7a9x28< _0xf7a9x26[_0x3784[28]];_0xf7a9x28++){_0xf7a9x27[_0x3784[22]](rpcClient[_0x3784[58]](_0x3784[53],[_0x3784[54],_0xf7a9x26[_0xf7a9x28]]))};return Promise[_0x3784[76]](_0xf7a9x27)}else {logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59])}}else {logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59])}}else {logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[59])}})[_0x3784[41]](function(_0xf7a9x22){if(_0xf7a9x22&& _0xf7a9x22[_0x3784[28]]){for(var _0xf7a9x1b=0;_0xf7a9x1b< _0xf7a9x22[_0x3784[28]];_0xf7a9x1b++){var _0xf7a9x18=_0xf7a9x22[_0xf7a9x1b];_0xf7a9x8[_0x3784[46]](util[_0x3784[37]](_0x3784[44],_0xf7a9x18[_0x3784[45]]))[_0x3784[43]](_0x3784[42],_0xf7a9x18)}};_0xf7a9xb= setTimeout(function(){_0xf7a9xe+= _0xf7a9xd[_0x3784[27]];_0xf7a9x21()},_0xf7a9x14* 1000)})[_0x3784[40]](function(_0xf7a9x17){logger[_0x3784[39]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[38]);_0xf7a9x9(_0xf7a9x17)})}else {return rpcClient[_0x3784[58]](_0x3784[69],[_0x3784[70],{leaveAt:moment()[_0x3784[37]](_0x3784[56]),timeout:true},{where:{uniqueid:_0xf7a9x7[_0x3784[16]],leaveAt:null},individualHooks:true}])[_0x3784[41]](function(_0xf7a9x1f){if(_0xf7a9x1f&& _0xf7a9x1f[_0x3784[28]]&& _0xf7a9x1f[1][_0x3784[28]]){for(var _0xf7a9x1b=0;_0xf7a9x1b< _0xf7a9x1f[1][_0x3784[28]];_0xf7a9x1b++){var _0xf7a9x20=_0xf7a9x1f[1][_0xf7a9x1b];_0xf7a9x8[_0x3784[46]](_0x3784[67])[_0x3784[43]](_0x3784[66],_0xf7a9x20);_0xf7a9x8[_0x3784[46]](_0x3784[68])[_0x3784[43]](_0x3784[66],_0xf7a9x20)}};logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[65]);clearTimeout(_0xf7a9xb);_0xf7a9x9();return Promise[_0x3784[81]]()})[_0x3784[40]](function(_0xf7a9x17){logger[_0x3784[39]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[38]);_0xf7a9x9(_0xf7a9x17);return Promise[_0x3784[23]](_0xf7a9x17)})}}return rpcClient[_0x3784[58]](_0x3784[77],[_0x3784[78],{where:{id:_0xf7a9x6[_0x3784[79]]},attributes:[_0x3784[21],_0x3784[12],_0x3784[27],_0x3784[14],_0x3784[80]],include:[{model:_0x3784[62],attributes:[_0x3784[21]]}]}])[_0x3784[41]](function(_0xf7a9x23){_0xf7a9xd= _0xf7a9x23;logger[_0x3784[20]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[90],_0xf7a9x6[_0x3784[27]],_0x3784[91]);return rpcClient[_0x3784[58]](_0x3784[53],[_0x3784[70],_[_0x3784[57]](_0xf7a9x7,{timeslot:_0xf7a9x6[_0x3784[27]],application:_0x3784[55],queue:_0xf7a9x23[_0x3784[21]],queuename:_0xf7a9x23[_0x3784[12]],calledAt:moment()[_0x3784[37]](_0x3784[56]),joinAt:moment()[_0x3784[37]](_0x3784[56]),membername:null,memberid:null})])})[_0x3784[41]](function(_0xf7a9x20){_0xf7a9x8[_0x3784[46]](_0x3784[67])[_0x3784[43]](_0x3784[66],_0xf7a9x20);_0xf7a9x8[_0x3784[46]](_0x3784[68])[_0x3784[43]](_0x3784[66],_0xf7a9x20);return rpcClient[_0x3784[58]](_0x3784[69],[_0x3784[30],{waiting:true},{where:{id:_0xf7a9x7[_0x3784[89]]}}])})[_0x3784[41]](function(_0xf7a9x29){if(_0xf7a9x29){_0xf7a9x8[_0x3784[43]](_0x3784[88],_0xf7a9x29)}})[_0x3784[41]](function(_0xf7a9x29){switch(_0xf7a9xd[_0x3784[14]]){case _0x3784[82]:_0xf7a9x21();break;case _0x3784[86]:_0xf7a9xc= _[_0x3784[85]](_0xf7a9xd.Users,[function(_0xf7a9x2a){return _0xf7a9x2a[_0x3784[84]][_0x3784[83]]|| 0}]);_0xf7a9x13();break;case _0x3784[87]:_0xf7a9xc= _[_0x3784[85]](_0xf7a9xd.Users,[function(_0xf7a9x2a){return _0xf7a9x2a[_0x3784[84]][_0x3784[83]]|| 0}]);_0xf7a9x13();break;default:};return Promise[_0x3784[81]]()})[_0x3784[40]](function(_0xf7a9x17){logger[_0x3784[39]](_0xf7a9x7[_0x3784[10]][_0x3784[9]](),_0x3784[11],_0xf7a9xd[_0x3784[12]][_0x3784[9]](),_0x3784[13],_0xf7a9xd[_0x3784[14]],_0x3784[15],_0xf7a9x7[_0x3784[16]],_0x3784[38]);logger[_0x3784[39]](_0xf7a9x17);_0xf7a9x9(_0xf7a9x17)})}