Built motion from commit 0c27b27.|1.0.11
[motion.git] / server / config / routing / agent.js
index cd7498a..aa73002 100644 (file)
@@ -1 +1 @@
-var _0xad87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xad87[0];const _=require(_0xad87[1]);const config=require(_0xad87[2]);const structure=require(_0xad87[3]);const cp=require(_0xad87[4]);const util=require(_0xad87[5]);const moment=require(_0xad87[6]);const User=require(_0xad87[8])[_0xad87[7]];function Agent(_0x9c80x9,_0x9c80xa,_0x9c80xb){this[_0xad87[9]]= _0x9c80x9;this[_0xad87[10]]= _0x9c80xa;this[_0xad87[11]]= [];this[_0xad87[12]]= [];this[_0xad87[13]]= _0x9c80xb}Agent[_0xad87[15]][_0xad87[14]]= function init(){var _0x9c80xd=this;var _0x9c80xe={where:{id:_0x9c80xd[_0xad87[9]][_0xad87[16]],online:true},include:[]};_0x9c80xe[_0xad87[20]][structure[_0xad87[19]][_0xad87[18]][_0x9c80xd[_0xad87[10]][_0xad87[17]]]]= false;_0x9c80xe[_0xad87[25]][_0xad87[24]]({model:structure[_0xad87[22]][_0xad87[21]][_0x9c80xd[_0xad87[10]][_0xad87[17]]],attributes:[_0xad87[23]]});return User[_0xad87[49]](_0x9c80xe)[_0xad87[30]](function(_0x9c80x10){_0x9c80xd[_0xad87[33]]= _0x9c80x10;console[_0xad87[40]](_0x9c80xd[_0xad87[10]][_0xad87[17]][_0xad87[34]](),_0xad87[35],_0x9c80xd[_0xad87[10]][_0xad87[36]],_0xad87[37],_0x9c80xd[_0xad87[9]][_0xad87[38]],_0xad87[39]);if(_0x9c80xd[_0xad87[33]][_0xad87[41]]&& available(_0x9c80xd[_0xad87[33]][0][_0xad87[42]],_0x9c80xd[_0xad87[33]][0][structure[_0xad87[19]][_0xad87[18]][_0x9c80xd[_0xad87[10]][_0xad87[17]]]],_[_0xad87[44]](_0x9c80xd[_0xad87[33]][0][structure[_0xad87[19]][_0xad87[21]][_0x9c80xd[_0xad87[10]][_0xad87[17]]]],{status:_0xad87[43]}),_0x9c80xd[_0xad87[33]][0][structure[_0xad87[19]][_0xad87[45]][_0x9c80xd[_0xad87[10]][_0xad87[17]]]])){_0x9c80xd[_0xad87[46]]();_0x9c80xd[_0xad87[38]]= setTimeout(function(){_0x9c80xd[_0xad87[13]]()},_0x9c80xd[_0xad87[9]][_0xad87[38]]* 1000)}else {console[_0xad87[40]](_0x9c80xd[_0xad87[10]][_0xad87[17]][_0xad87[34]](),_0xad87[47],_0x9c80xd[_0xad87[10]][_0xad87[48]]);_0x9c80xd[_0xad87[13]]()}})[_0xad87[30]](function(){return structure[_0xad87[22]][_0xad87[21]][_0x9c80xd[_0xad87[10]][_0xad87[17]]][_0xad87[32]]({waiting:true},{where:{id:_0x9c80xd[_0xad87[10]][_0xad87[31]]},individualHooks:true})[_0xad87[30]](function(){console[_0xad87[29]](_0xad87[28])})[_0xad87[27]](function(_0x9c80xf){console[_0xad87[26]]()})})};Agent[_0xad87[15]][_0xad87[46]]= function writeReport(){var _0x9c80xd=this;var _0x9c80x12=_[_0xad87[55]](_0x9c80xd._agents,function(_0x9c80x13){return _[_0xad87[54]](_0x9c80xd[_0xad87[10]],{timeslot:_0x9c80xd[_0xad87[9]][_0xad87[38]],application:_0xad87[50],membername:_0x9c80x13[_0xad87[51]],memberid:_0x9c80x13[_0xad87[23]],calledAt:moment()[_0xad87[53]](_0xad87[52]),joinAt:moment()[_0xad87[53]](_0xad87[52])})});return structure[_0xad87[22]][_0xad87[58]][_0x9c80xd[_0xad87[10]][_0xad87[17]]][_0xad87[56]](_0x9c80x12,{individualHooks:true})[_0xad87[30]](function(){return structure[_0xad87[22]][_0xad87[57]][_0x9c80xd[_0xad87[10]][_0xad87[17]]][_0xad87[56]](_0x9c80x12,{individualHooks:true})})[_0xad87[27]](function(_0x9c80xf){console[_0xad87[26]](_0x9c80xf)})};function available(_0x9c80x15,_0x9c80x16,_0x9c80x17,_0x9c80x18){return _0x9c80x15&& !_0x9c80x16&& ((_0x9c80x17[_0xad87[41]]< _0x9c80x18)|| _0x9c80x18=== 0)}module[_0xad87[59]]= Agent
\ No newline at end of file
+var _0x760c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x760c[0];const _=require(_0x760c[1]);const config=require(_0x760c[2]);const structure=require(_0x760c[3]);const cp=require(_0x760c[4]);const util=require(_0x760c[5]);const moment=require(_0x760c[6]);const User=require(_0x760c[8])[_0x760c[7]];function Agent(_0x6f2bx9,_0x6f2bxa,_0x6f2bxb){this[_0x760c[9]]= _0x6f2bx9;this[_0x760c[10]]= _0x6f2bxa;this[_0x760c[11]]= [];this[_0x760c[12]]= [];this[_0x760c[13]]= _0x6f2bxb}Agent[_0x760c[15]][_0x760c[14]]= function init(){var _0x6f2bxd=this;var _0x6f2bxe={where:{id:_0x6f2bxd[_0x760c[9]][_0x760c[16]],online:true},include:[]};_0x6f2bxe[_0x760c[20]][structure[_0x760c[19]][_0x760c[18]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]]]= false;_0x6f2bxe[_0x760c[25]][_0x760c[24]]({model:structure[_0x760c[22]][_0x760c[21]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]],attributes:[_0x760c[23]]});return User[_0x760c[49]](_0x6f2bxe)[_0x760c[30]](function(_0x6f2bx10){_0x6f2bxd[_0x760c[33]]= _0x6f2bx10;console[_0x760c[40]](_0x6f2bxd[_0x760c[10]][_0x760c[17]][_0x760c[34]](),_0x760c[35],_0x6f2bxd[_0x760c[10]][_0x760c[36]],_0x760c[37],_0x6f2bxd[_0x760c[9]][_0x760c[38]],_0x760c[39]);if(_0x6f2bxd[_0x760c[33]][_0x760c[41]]&& available(_0x6f2bxd[_0x760c[33]][0][_0x760c[42]],_0x6f2bxd[_0x760c[33]][0][structure[_0x760c[19]][_0x760c[18]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]]],_[_0x760c[44]](_0x6f2bxd[_0x760c[33]][0][structure[_0x760c[19]][_0x760c[21]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]]],{status:_0x760c[43]}),_0x6f2bxd[_0x760c[33]][0][structure[_0x760c[19]][_0x760c[45]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]]])){_0x6f2bxd[_0x760c[46]]();_0x6f2bxd[_0x760c[38]]= setTimeout(function(){_0x6f2bxd[_0x760c[13]]()},_0x6f2bxd[_0x760c[9]][_0x760c[38]]* 1000)}else {console[_0x760c[40]](_0x6f2bxd[_0x760c[10]][_0x760c[17]][_0x760c[34]](),_0x760c[47],_0x6f2bxd[_0x760c[10]][_0x760c[48]]);_0x6f2bxd[_0x760c[13]]()}})[_0x760c[30]](function(){return structure[_0x760c[22]][_0x760c[21]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]][_0x760c[32]]({waiting:true},{where:{id:_0x6f2bxd[_0x760c[10]][_0x760c[31]]},individualHooks:true})[_0x760c[30]](function(){console[_0x760c[29]](_0x760c[28])})[_0x760c[27]](function(_0x6f2bxf){console[_0x760c[26]]()})})};Agent[_0x760c[15]][_0x760c[46]]= function writeReport(){var _0x6f2bxd=this;var _0x6f2bx12=_[_0x760c[55]](_0x6f2bxd._agents,function(_0x6f2bx13){return _[_0x760c[54]](_0x6f2bxd[_0x760c[10]],{timeslot:_0x6f2bxd[_0x760c[9]][_0x760c[38]],application:_0x760c[50],membername:_0x6f2bx13[_0x760c[51]],memberid:_0x6f2bx13[_0x760c[23]],calledAt:moment()[_0x760c[53]](_0x760c[52]),joinAt:moment()[_0x760c[53]](_0x760c[52])})});return structure[_0x760c[22]][_0x760c[58]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]][_0x760c[56]](_0x6f2bx12,{individualHooks:true})[_0x760c[30]](function(){return structure[_0x760c[22]][_0x760c[57]][_0x6f2bxd[_0x760c[10]][_0x760c[17]]][_0x760c[56]](_0x6f2bx12,{individualHooks:true})})[_0x760c[27]](function(_0x6f2bxf){console[_0x760c[26]](_0x6f2bxf)})};function available(_0x6f2bx15,_0x6f2bx16,_0x6f2bx17,_0x6f2bx18){return _0x6f2bx15&&  !_0x6f2bx16&& ((_0x6f2bx17[_0x760c[41]]< _0x6f2bx18)|| _0x6f2bx18=== 0)}module[_0x760c[59]]= Agent
\ No newline at end of file