Built motion from commit c2984ba.|0.0.114
[motion.git] / server / config / util / index.js
index cd0c3fd..0338565 100644 (file)
@@ -1 +1 @@
-var _0xeef3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x75\x6E","\x6D\x6F\x6E","\x74\x75\x65","\x77\x65\x64","\x74\x68\x75","\x66\x72\x69","\x73\x61\x74","\x6A\x61\x6E","\x66\x65\x62","\x6D\x61\x72","\x61\x70\x72","\x6D\x61\x79","\x6A\x75\x6E","\x6A\x75\x6C","\x61\x75\x67","\x73\x65\x70","\x6F\x63\x74","\x6E\x6F\x76","\x64\x65\x63","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x2D","\x54\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6C\x6F\x67","\x64\x61\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x44\x57\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x64\x61\x74\x65","\x44\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6D\x6F\x6E\x74\x68","\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x49\x4E\x54\x45\x52\x56\x41\x4C\x20\x4F\x4B","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5F\x75\x69\x46\x72\x6F\x6D","","\x72\x65\x70\x6C\x61\x63\x65","\x5F\x75\x69\x54\x6F","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x64","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x6F\x6E","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0xeef3[0];var _=require(_0xeef3[1]);var moment=require(_0xeef3[2]);var User=require(_0xeef3[4])[_0xeef3[3]];var VoiceQueue=require(_0xeef3[4])[_0xeef3[5]];var ChatQueue=require(_0xeef3[4])[_0xeef3[6]];var MailQueue=require(_0xeef3[4])[_0xeef3[7]];var FaxQueue=require(_0xeef3[4])[_0xeef3[8]];var SmsQueue=require(_0xeef3[4])[_0xeef3[9]];var checkInterval=function(_0xe66dxa){var _0xe66dxb=[_0xeef3[10],_0xeef3[11],_0xeef3[12],_0xeef3[13],_0xeef3[14],_0xeef3[15],_0xeef3[16]];var _0xe66dxc=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];var _0xe66dxd=[_0xeef3[17],_0xeef3[18],_0xeef3[19],_0xeef3[20],_0xeef3[21],_0xeef3[22],_0xeef3[23],_0xeef3[24],_0xeef3[25],_0xeef3[26],_0xeef3[27],_0xeef3[28]];var _0xe66dxe,_0xe66dxf;var _0xe66dx10=_0xe66dxa[_0xeef3[30]](_0xeef3[29])[0];var _0xe66dx11=_0xe66dxa[_0xeef3[30]](_0xeef3[29])[1];var _0xe66dx12=_0xe66dxa[_0xeef3[30]](_0xeef3[29])[2];var _0xe66dx13=_0xe66dxa[_0xeef3[30]](_0xeef3[29])[3];if(_0xe66dx10!== _0xeef3[31]){var _0xe66dx14=moment()[_0xeef3[33]](_0xeef3[32]);var _0xe66dx15=_0xe66dx10[_0xeef3[30]](_0xeef3[34])[0];var _0xe66dx16=_0xe66dx10[_0xeef3[30]](_0xeef3[34])[1];if((_0xe66dx14< _0xe66dx15)|| (_0xe66dx14> _0xe66dx16)){console[_0xeef3[36]](_0xeef3[35]);return false}};if(_0xe66dx11!== _0xeef3[31]){var _0xe66dx17=_0xe66dxb[moment()[_0xeef3[37]]()];var _0xe66dx18=_[_0xeef3[38]](_0xe66dxb,_0xe66dx11[_0xeef3[30]](_0xeef3[34])[0]);var _0xe66dx19=_[_0xeef3[38]](_0xe66dxb,_0xe66dx11[_0xeef3[30]](_0xeef3[34])[1]);for(_0xe66dxe= 0;_0xe66dxe< _0xe66dx18;_0xe66dxe++){_0xe66dxf= _0xe66dxb[_0xeef3[39]]();_0xe66dxb[_0xeef3[40]](_0xe66dxf)};_0xe66dx18= _[_0xeef3[38]](_0xe66dxb,_0xe66dx11[_0xeef3[30]](_0xeef3[34])[0]);_0xe66dx19= _[_0xeef3[38]](_0xe66dxb,_0xe66dx11[_0xeef3[30]](_0xeef3[34])[1])+ 1;_0xe66dxb= _0xe66dxb[_0xeef3[41]](_0xe66dx18,_0xe66dx19);if(!_[_0xeef3[42]](_0xe66dxb,_0xe66dx17)){console[_0xeef3[36]](_0xeef3[43]);return false}};if(_0xe66dx12!== _0xeef3[31]){var _0xe66dx1a=moment()[_0xeef3[44]]();var _0xe66dx1b=_[_0xeef3[38]](_0xe66dxc,parseInt(_0xe66dx12[_0xeef3[30]](_0xeef3[34])[0],10));var _0xe66dx1c=_[_0xeef3[38]](_0xe66dxc,parseInt(_0xe66dx12[_0xeef3[30]](_0xeef3[34])[1]));for(_0xe66dxe= 0;_0xe66dxe< _0xe66dx1b;_0xe66dxe++){_0xe66dxf= _0xe66dxc[_0xeef3[39]]();_0xe66dxc[_0xeef3[40]](_0xe66dxf)};_0xe66dx1b= _[_0xeef3[38]](_0xe66dxc,parseInt(_0xe66dx12[_0xeef3[30]](_0xeef3[34])[0],10));_0xe66dx1c= _[_0xeef3[38]](_0xe66dxc,parseInt(_0xe66dx12[_0xeef3[30]](_0xeef3[34])[1]),10)+ 1;_0xe66dxc= _0xe66dxc[_0xeef3[41]](_0xe66dx1b,_0xe66dx1c);if(!_[_0xeef3[42]](_0xe66dxc,_0xe66dx1a)){console[_0xeef3[36]](_0xeef3[45]);return false}};if(_0xe66dx13!== _0xeef3[31]){var _0xe66dx1d=_0xe66dxd[moment()[_0xeef3[46]]()];var _0xe66dx1e=_[_0xeef3[38]](_0xe66dxd,_0xe66dx13[_0xeef3[30]](_0xeef3[34])[0]);var _0xe66dx1f=_[_0xeef3[38]](_0xe66dxd,_0xe66dx13[_0xeef3[30]](_0xeef3[34])[1]);for(_0xe66dxe= 0;_0xe66dxe< _0xe66dx1e;_0xe66dxe++){_0xe66dxf= _0xe66dxd[_0xeef3[39]]();_0xe66dxd[_0xeef3[40]](_0xe66dxf)};_0xe66dx1e= _[_0xeef3[38]](_0xe66dxd,_0xe66dx13[_0xeef3[30]](_0xeef3[34])[0]);_0xe66dx1f= _[_0xeef3[38]](_0xe66dxd,_0xe66dx13[_0xeef3[30]](_0xeef3[34])[1])+ 1;_0xe66dxd= _0xe66dxd[_0xeef3[41]](_0xe66dx1e,_0xe66dx1f);if(!_[_0xeef3[42]](_0xe66dxd,_0xe66dx1d)){console[_0xeef3[36]](_0xeef3[47]);return false}};console[_0xeef3[36]](_0xeef3[48]);return true};var isValidInterval=function(_0xe66dxa){if(_[_0xeef3[49]](_0xe66dxa)){for(var _0xe66dxe=0;_0xe66dxe< _0xe66dxa[_0xeef3[51]][_0xeef3[50]];_0xe66dxe++){if(!checkInterval(_0xe66dxa[_0xeef3[51]][_0xe66dxe][_0xeef3[52]])){return false}};return true}else {return checkInterval(_0xe66dxa)}};var getQuery=function(_0xe66dx22,_0xe66dx23){var _0xe66dx24={where:{}};if(_0xe66dx22){var _0xe66dx25,_0xe66dx26={};for(var _0xe66dx27 in _0xe66dx22){if(_[_0xeef3[42]](_0xe66dx27,_0xeef3[53])){_0xe66dx25= _0xe66dx27[_0xeef3[55]](_0xeef3[53],_0xeef3[54]);if(_0xe66dx22[_0xe66dx25+ _0xeef3[56]]){_0xe66dx24[_0xeef3[58]][_0xeef3[57]]= _0xe66dx24[_0xeef3[58]][_0xeef3[57]]|| [];_0xe66dx26= {};_0xe66dx26[_0xe66dx25]= {$gte:moment(_0xe66dx22[_0xe66dx27])[_0xeef3[59]](_0xeef3[37])};_0xe66dx24[_0xeef3[58]][_0xeef3[57]][_0xeef3[40]](_0xe66dx26);_0xe66dx26= {};_0xe66dx26[_0xe66dx25]= {$lte:moment(_0xe66dx22[_0xe66dx25+ _0xeef3[56]])[_0xeef3[60]](_0xeef3[37])};_0xe66dx24[_0xeef3[58]][_0xeef3[57]][_0xeef3[40]](_0xe66dx26);delete _0xe66dx22[_0xe66dx25+ _0xeef3[56]]}else {_0xe66dx24[_0xeef3[58]][_0xe66dx27[_0xeef3[55]](_0xeef3[53],_0xeef3[54])]= {$gte:moment(_0xe66dx22[_0xe66dx27])[_0xeef3[59]](_0xeef3[37])}};delete _0xe66dx22[_0xe66dx27]}else {if(_[_0xeef3[42]](_0xe66dx27,_0xeef3[56])){_0xe66dx25= _0xe66dx27[_0xeef3[55]](_0xeef3[56],_0xeef3[54]);if(_0xe66dx22[_0xe66dx25+ _0xeef3[53]]){_0xe66dx24[_0xeef3[58]][_0xeef3[57]]= _0xe66dx24[_0xeef3[58]][_0xeef3[57]]|| [];_0xe66dx26= {};_0xe66dx26[_0xe66dx25]= {$lte:moment(_0xe66dx22[_0xe66dx27])[_0xeef3[60]](_0xeef3[37])};_0xe66dx24[_0xeef3[58]][_0xeef3[57]][_0xeef3[40]](_0xe66dx26);_0xe66dx26[_0xe66dx25]= {$gte:moment(_0xe66dx22[_0xe66dx25+ _0xeef3[53]])[_0xeef3[59]](_0xeef3[37])};_0xe66dx24[_0xeef3[58]][_0xeef3[57]][_0xeef3[40]](_0xe66dx26);delete _0xe66dx22[_0xe66dx25+ _0xeef3[53]]}else {_0xe66dx24[_0xeef3[58]][_0xe66dx27[_0xeef3[55]](_0xeef3[56],_0xeef3[54])]= {$lte:moment(_0xe66dx22[_0xe66dx27])[_0xeef3[60]](_0xeef3[37])}};delete _0xe66dx22[_0xe66dx27]}}};_[_0xeef3[67]](_0xe66dx22,function(_0xe66dx28,_0xe66dx27){switch(_0xe66dx27){case _0xeef3[61]:;case _0xeef3[62]:_0xe66dx24[_0xe66dx27]= Number(_0xe66dx28);break;case _0xeef3[63]:_0xe66dx24[_0xe66dx27]= _0xe66dx28;break;case _0xeef3[64]:;case _0xeef3[65]:_0xe66dx24[_0xeef3[58]][_0xe66dx27]= _0xe66dx28;break;default:_0xe66dx24[_0xeef3[58]][_0xe66dx27]= {$like:_0xeef3[66]+ _0xe66dx28+ _0xeef3[66]}}})};if(_0xe66dx23){_[_0xeef3[68]](_0xe66dx24[_0xeef3[58]],_0xe66dx23)};return _0xe66dx24};var getVoiceQueuesIdByUser=function(_0xe66dx22,_0xe66dx2a){return function(_0xe66dx2b){var _0xe66dx2c=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx2e=_0xe66dx2a|| {};return _0xe66dx2d[_0xeef3[73]]({attributes:[_0xeef3[71]]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx2c= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[71])})[_0xeef3[70]](function(){return VoiceQueue[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx22,{name:{$in:_0xe66dx2c}}),_0xe66dx2e))})}};var getChatQueuesIdByUser=function(_0xe66dx22,_0xe66dx2a){return function(_0xe66dx2b){var _0xe66dx2c=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx2e=_0xe66dx2a|| {};return _0xe66dx2d[_0xeef3[77]]({attributes:[_0xeef3[76]]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx2c= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76])})[_0xeef3[70]](function(){return ChatQueue[_0xeef3[75]](_0xeef3[74])[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx24,{id:{$in:_0xe66dx2c}}),_0xe66dx2e))})}};var getMailQueuesIdByUser=function(_0xe66dx22,_0xe66dx2a){return function(_0xe66dx2b){var _0xe66dx2c=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx2e=_0xe66dx2a|| {};return _0xe66dx2d[_0xeef3[78]]({attributes:[_0xeef3[76]]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx2c= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76])})[_0xeef3[70]](function(){return MailQueue[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx24,{id:{$in:_0xe66dx2c}}),_0xe66dx2e))})}};var getSmsQueuesIdByUser=function(_0xe66dx22,_0xe66dx2a){return function(_0xe66dx2b){var _0xe66dx2c=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx2e=_0xe66dx2a|| {};return _0xe66dx2d[_0xeef3[79]]({attributes:[_0xeef3[76]]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx2c= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76])})[_0xeef3[70]](function(){return SmsQueue[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx24,{id:{$in:_0xe66dx2c}}),_0xe66dx2e))})}};var getFaxQueuesIdByUser=function(_0xe66dx22,_0xe66dx2a){return function(_0xe66dx2b){var _0xe66dx2c=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx2e=_0xe66dx2a|| {};return _0xe66dx2d[_0xeef3[80]]({attributes:[_0xeef3[76]]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx2c= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76])})[_0xeef3[70]](function(){return FaxQueue[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx24,{id:{$in:_0xe66dx2c}}),_0xe66dx2e))})}};var getAgentsIdByUser=function(_0xe66dx22){return function(_0xe66dx2b){var _0xe66dx35=[];var _0xe66dx2d=_0xe66dx2b;var _0xe66dx24=_0xe66dx22|| {};var _0xe66dx36=[],_0xe66dx37=[],_0xe66dx38=[],_0xe66dx39=[],_0xe66dx3a=[];return _0xe66dx2d[_0xeef3[73]]({attributes:[_0xeef3[71]],include:[{raw:true,model:User,attributes:[_0xeef3[76]]}]})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx36= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[71]);_0xe66dx2f[_0xeef3[67]](function(_0xe66dx3b){_0xe66dx35= _[_0xeef3[86]](_0xe66dx35,_[_0xeef3[72]](_0xe66dx3b.Users,_0xeef3[76]))})})[_0xeef3[70]](function(){return _0xe66dx2d[_0xeef3[77]]({attributes:[_0xeef3[76]],include:[{raw:true,model:User,attributes:[_0xeef3[76]]}]})})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx37= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76]);_0xe66dx2f[_0xeef3[67]](function(_0xe66dx3b){_0xe66dx35= _[_0xeef3[86]](_0xe66dx35,_[_0xeef3[72]](_0xe66dx3b.Users,_0xeef3[76]))})})[_0xeef3[70]](function(){return _0xe66dx2d[_0xeef3[78]]({attributes:[_0xeef3[76]],include:[{raw:true,model:User,attributes:[_0xeef3[76]]}]})})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx38= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76]);_0xe66dx2f[_0xeef3[67]](function(_0xe66dx3b){_0xe66dx35= _[_0xeef3[86]](_0xe66dx35,_[_0xeef3[72]](_0xe66dx3b.Users,_0xeef3[76]))})})[_0xeef3[70]](function(){return _0xe66dx2d[_0xeef3[80]]({attributes:[_0xeef3[76]],include:[{raw:true,model:User,attributes:[_0xeef3[76]]}]})})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx39= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76]);_0xe66dx2f[_0xeef3[67]](function(_0xe66dx3b){_0xe66dx35= _[_0xeef3[86]](_0xe66dx35,_[_0xeef3[72]](_0xe66dx3b.Users,_0xeef3[76]))})})[_0xeef3[70]](function(){return _0xe66dx2d[_0xeef3[79]]({attributes:[_0xeef3[76]],include:[{raw:true,model:User,attributes:[_0xeef3[76]]}]})})[_0xeef3[70]](function(_0xe66dx2f){_0xe66dx3a= _[_0xeef3[72]](_0xe66dx2f,_0xeef3[76]);_0xe66dx2f[_0xeef3[67]](function(_0xe66dx3b){_0xe66dx35= _[_0xeef3[86]](_0xe66dx35,_[_0xeef3[72]](_0xe66dx3b.Users,_0xeef3[76]))})})[_0xeef3[70]](function(){return User[_0xeef3[75]](_0xeef3[81],{method:[_0xeef3[82],_0xe66dx24]},{method:[_0xeef3[83],_0xe66dx24]},{method:[_0xeef3[84],_0xe66dx24]},{method:[_0xeef3[85],_0xe66dx24]})[_0xeef3[69]](_[_0xeef3[68]](getQuery(_0xe66dx24,{id:{$in:_0xe66dx35}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xe66dx36}},required:false},{model:ChatQueue,where:{id:{$in:_0xe66dx37}},required:false},{model:MailQueue,where:{id:{$in:_0xe66dx38}},required:false},{model:FaxQueue,where:{id:{$in:_0xe66dx39}},required:false},{model:SmsQueue,where:{id:{$in:_0xe66dx3a}},required:false}]}))})}};var stripTrailingSlash=function(_0xe66dx3d){if(_0xe66dx3d[_0xeef3[87]](-1) === _0xeef3[88]){return _0xe66dx3d[_0xeef3[87]](0,_0xe66dx3d[_0xeef3[50]]- 1)};return _0xe66dx3d};module[_0xeef3[89]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0xeef3[90])}
\ No newline at end of file
+var _0xe9f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x75\x6E","\x6D\x6F\x6E","\x74\x75\x65","\x77\x65\x64","\x74\x68\x75","\x66\x72\x69","\x73\x61\x74","\x6A\x61\x6E","\x66\x65\x62","\x6D\x61\x72","\x61\x70\x72","\x6D\x61\x79","\x6A\x75\x6E","\x6A\x75\x6C","\x61\x75\x67","\x73\x65\x70","\x6F\x63\x74","\x6E\x6F\x76","\x64\x65\x63","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x2D","\x54\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6C\x6F\x67","\x64\x61\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x44\x57\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x64\x61\x74\x65","\x44\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6D\x6F\x6E\x74\x68","\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x49\x4E\x54\x45\x52\x56\x41\x4C\x20\x4F\x4B","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x5F\x75\x69\x46\x72\x6F\x6D","","\x72\x65\x70\x6C\x61\x63\x65","\x5F\x75\x69\x54\x6F","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x73\x74\x61\x72\x74\x4F\x66","\x65\x6E\x64\x4F\x66","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x64","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x6F\x6E","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0xe9f0[0];var _=require(_0xe9f0[1]);var moment=require(_0xe9f0[2]);var User=require(_0xe9f0[4])[_0xe9f0[3]];var VoiceQueue=require(_0xe9f0[4])[_0xe9f0[5]];var ChatQueue=require(_0xe9f0[4])[_0xe9f0[6]];var MailQueue=require(_0xe9f0[4])[_0xe9f0[7]];var FaxQueue=require(_0xe9f0[4])[_0xe9f0[8]];var SmsQueue=require(_0xe9f0[4])[_0xe9f0[9]];var checkInterval=function(_0x9684xa){var _0x9684xb=[_0xe9f0[10],_0xe9f0[11],_0xe9f0[12],_0xe9f0[13],_0xe9f0[14],_0xe9f0[15],_0xe9f0[16]];var _0x9684xc=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];var _0x9684xd=[_0xe9f0[17],_0xe9f0[18],_0xe9f0[19],_0xe9f0[20],_0xe9f0[21],_0xe9f0[22],_0xe9f0[23],_0xe9f0[24],_0xe9f0[25],_0xe9f0[26],_0xe9f0[27],_0xe9f0[28]];var _0x9684xe,_0x9684xf;var _0x9684x10=_0x9684xa[_0xe9f0[30]](_0xe9f0[29])[0];var _0x9684x11=_0x9684xa[_0xe9f0[30]](_0xe9f0[29])[1];var _0x9684x12=_0x9684xa[_0xe9f0[30]](_0xe9f0[29])[2];var _0x9684x13=_0x9684xa[_0xe9f0[30]](_0xe9f0[29])[3];if(_0x9684x10!== _0xe9f0[31]){var _0x9684x14=moment()[_0xe9f0[33]](_0xe9f0[32]);var _0x9684x15=_0x9684x10[_0xe9f0[30]](_0xe9f0[34])[0];var _0x9684x16=_0x9684x10[_0xe9f0[30]](_0xe9f0[34])[1];if((_0x9684x14< _0x9684x15)|| (_0x9684x14> _0x9684x16)){console[_0xe9f0[36]](_0xe9f0[35]);return false}};if(_0x9684x11!== _0xe9f0[31]){var _0x9684x17=_0x9684xb[moment()[_0xe9f0[37]]()];var _0x9684x18=_[_0xe9f0[38]](_0x9684xb,_0x9684x11[_0xe9f0[30]](_0xe9f0[34])[0]);var _0x9684x19=_[_0xe9f0[38]](_0x9684xb,_0x9684x11[_0xe9f0[30]](_0xe9f0[34])[1]);for(_0x9684xe= 0;_0x9684xe< _0x9684x18;_0x9684xe++){_0x9684xf= _0x9684xb[_0xe9f0[39]]();_0x9684xb[_0xe9f0[40]](_0x9684xf)};_0x9684x18= _[_0xe9f0[38]](_0x9684xb,_0x9684x11[_0xe9f0[30]](_0xe9f0[34])[0]);_0x9684x19= _[_0xe9f0[38]](_0x9684xb,_0x9684x11[_0xe9f0[30]](_0xe9f0[34])[1])+ 1;_0x9684xb= _0x9684xb[_0xe9f0[41]](_0x9684x18,_0x9684x19);if(!_[_0xe9f0[42]](_0x9684xb,_0x9684x17)){console[_0xe9f0[36]](_0xe9f0[43]);return false}};if(_0x9684x12!== _0xe9f0[31]){var _0x9684x1a=moment()[_0xe9f0[44]]();var _0x9684x1b=_[_0xe9f0[38]](_0x9684xc,parseInt(_0x9684x12[_0xe9f0[30]](_0xe9f0[34])[0],10));var _0x9684x1c=_[_0xe9f0[38]](_0x9684xc,parseInt(_0x9684x12[_0xe9f0[30]](_0xe9f0[34])[1]));for(_0x9684xe= 0;_0x9684xe< _0x9684x1b;_0x9684xe++){_0x9684xf= _0x9684xc[_0xe9f0[39]]();_0x9684xc[_0xe9f0[40]](_0x9684xf)};_0x9684x1b= _[_0xe9f0[38]](_0x9684xc,parseInt(_0x9684x12[_0xe9f0[30]](_0xe9f0[34])[0],10));_0x9684x1c= _[_0xe9f0[38]](_0x9684xc,parseInt(_0x9684x12[_0xe9f0[30]](_0xe9f0[34])[1]),10)+ 1;_0x9684xc= _0x9684xc[_0xe9f0[41]](_0x9684x1b,_0x9684x1c);if(!_[_0xe9f0[42]](_0x9684xc,_0x9684x1a)){console[_0xe9f0[36]](_0xe9f0[45]);return false}};if(_0x9684x13!== _0xe9f0[31]){var _0x9684x1d=_0x9684xd[moment()[_0xe9f0[46]]()];var _0x9684x1e=_[_0xe9f0[38]](_0x9684xd,_0x9684x13[_0xe9f0[30]](_0xe9f0[34])[0]);var _0x9684x1f=_[_0xe9f0[38]](_0x9684xd,_0x9684x13[_0xe9f0[30]](_0xe9f0[34])[1]);for(_0x9684xe= 0;_0x9684xe< _0x9684x1e;_0x9684xe++){_0x9684xf= _0x9684xd[_0xe9f0[39]]();_0x9684xd[_0xe9f0[40]](_0x9684xf)};_0x9684x1e= _[_0xe9f0[38]](_0x9684xd,_0x9684x13[_0xe9f0[30]](_0xe9f0[34])[0]);_0x9684x1f= _[_0xe9f0[38]](_0x9684xd,_0x9684x13[_0xe9f0[30]](_0xe9f0[34])[1])+ 1;_0x9684xd= _0x9684xd[_0xe9f0[41]](_0x9684x1e,_0x9684x1f);if(!_[_0xe9f0[42]](_0x9684xd,_0x9684x1d)){console[_0xe9f0[36]](_0xe9f0[47]);return false}};console[_0xe9f0[36]](_0xe9f0[48]);return true};var isValidInterval=function(_0x9684xa){if(_[_0xe9f0[49]](_0x9684xa)){for(var _0x9684xe=0;_0x9684xe< _0x9684xa[_0xe9f0[51]][_0xe9f0[50]];_0x9684xe++){if(!checkInterval(_0x9684xa[_0xe9f0[51]][_0x9684xe][_0xe9f0[52]])){return false}};return true}else {return checkInterval(_0x9684xa)}};var getQuery=function(_0x9684x22,_0x9684x23){var _0x9684x24={where:{}};if(_0x9684x22){var _0x9684x25,_0x9684x26={};for(var _0x9684x27 in _0x9684x22){if(_[_0xe9f0[42]](_0x9684x27,_0xe9f0[53])){_0x9684x25= _0x9684x27[_0xe9f0[55]](_0xe9f0[53],_0xe9f0[54]);if(_0x9684x22[_0x9684x25+ _0xe9f0[56]]){_0x9684x24[_0xe9f0[58]][_0xe9f0[57]]= _0x9684x24[_0xe9f0[58]][_0xe9f0[57]]|| [];_0x9684x26= {};_0x9684x26[_0x9684x25]= {$gte:moment(_0x9684x22[_0x9684x27])[_0xe9f0[59]](_0xe9f0[37])};_0x9684x24[_0xe9f0[58]][_0xe9f0[57]][_0xe9f0[40]](_0x9684x26);_0x9684x26= {};_0x9684x26[_0x9684x25]= {$lte:moment(_0x9684x22[_0x9684x25+ _0xe9f0[56]])[_0xe9f0[60]](_0xe9f0[37])};_0x9684x24[_0xe9f0[58]][_0xe9f0[57]][_0xe9f0[40]](_0x9684x26);delete _0x9684x22[_0x9684x25+ _0xe9f0[56]]}else {_0x9684x24[_0xe9f0[58]][_0x9684x27[_0xe9f0[55]](_0xe9f0[53],_0xe9f0[54])]= {$gte:moment(_0x9684x22[_0x9684x27])[_0xe9f0[59]](_0xe9f0[37])}};delete _0x9684x22[_0x9684x27]}else {if(_[_0xe9f0[42]](_0x9684x27,_0xe9f0[56])){_0x9684x25= _0x9684x27[_0xe9f0[55]](_0xe9f0[56],_0xe9f0[54]);if(_0x9684x22[_0x9684x25+ _0xe9f0[53]]){_0x9684x24[_0xe9f0[58]][_0xe9f0[57]]= _0x9684x24[_0xe9f0[58]][_0xe9f0[57]]|| [];_0x9684x26= {};_0x9684x26[_0x9684x25]= {$lte:moment(_0x9684x22[_0x9684x27])[_0xe9f0[60]](_0xe9f0[37])};_0x9684x24[_0xe9f0[58]][_0xe9f0[57]][_0xe9f0[40]](_0x9684x26);_0x9684x26[_0x9684x25]= {$gte:moment(_0x9684x22[_0x9684x25+ _0xe9f0[53]])[_0xe9f0[59]](_0xe9f0[37])};_0x9684x24[_0xe9f0[58]][_0xe9f0[57]][_0xe9f0[40]](_0x9684x26);delete _0x9684x22[_0x9684x25+ _0xe9f0[53]]}else {_0x9684x24[_0xe9f0[58]][_0x9684x27[_0xe9f0[55]](_0xe9f0[56],_0xe9f0[54])]= {$lte:moment(_0x9684x22[_0x9684x27])[_0xe9f0[60]](_0xe9f0[37])}};delete _0x9684x22[_0x9684x27]}}};_[_0xe9f0[67]](_0x9684x22,function(_0x9684x28,_0x9684x27){switch(_0x9684x27){case _0xe9f0[61]:;case _0xe9f0[62]:_0x9684x24[_0x9684x27]= Number(_0x9684x28);break;case _0xe9f0[63]:_0x9684x24[_0x9684x27]= _0x9684x28;break;case _0xe9f0[64]:;case _0xe9f0[65]:_0x9684x24[_0xe9f0[58]][_0x9684x27]= _0x9684x28;break;default:_0x9684x24[_0xe9f0[58]][_0x9684x27]= {$like:_0xe9f0[66]+ _0x9684x28+ _0xe9f0[66]}}})};if(_0x9684x23){_[_0xe9f0[68]](_0x9684x24[_0xe9f0[58]],_0x9684x23)};return _0x9684x24};var getVoiceQueuesIdByUser=function(_0x9684x22,_0x9684x2a){return function(_0x9684x2b){var _0x9684x2c=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x2e=_0x9684x2a|| {};return _0x9684x2d[_0xe9f0[73]]({attributes:[_0xe9f0[71]]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x2c= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[71])})[_0xe9f0[70]](function(){return VoiceQueue[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x22,{name:{$in:_0x9684x2c}}),_0x9684x2e))})}};var getChatQueuesIdByUser=function(_0x9684x22,_0x9684x2a){return function(_0x9684x2b){var _0x9684x2c=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x2e=_0x9684x2a|| {};return _0x9684x2d[_0xe9f0[77]]({attributes:[_0xe9f0[76]]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x2c= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76])})[_0xe9f0[70]](function(){return ChatQueue[_0xe9f0[75]](_0xe9f0[74])[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x24,{id:{$in:_0x9684x2c}}),_0x9684x2e))})}};var getMailQueuesIdByUser=function(_0x9684x22,_0x9684x2a){return function(_0x9684x2b){var _0x9684x2c=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x2e=_0x9684x2a|| {};return _0x9684x2d[_0xe9f0[78]]({attributes:[_0xe9f0[76]]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x2c= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76])})[_0xe9f0[70]](function(){return MailQueue[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x24,{id:{$in:_0x9684x2c}}),_0x9684x2e))})}};var getSmsQueuesIdByUser=function(_0x9684x22,_0x9684x2a){return function(_0x9684x2b){var _0x9684x2c=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x2e=_0x9684x2a|| {};return _0x9684x2d[_0xe9f0[79]]({attributes:[_0xe9f0[76]]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x2c= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76])})[_0xe9f0[70]](function(){return SmsQueue[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x24,{id:{$in:_0x9684x2c}}),_0x9684x2e))})}};var getFaxQueuesIdByUser=function(_0x9684x22,_0x9684x2a){return function(_0x9684x2b){var _0x9684x2c=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x2e=_0x9684x2a|| {};return _0x9684x2d[_0xe9f0[80]]({attributes:[_0xe9f0[76]]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x2c= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76])})[_0xe9f0[70]](function(){return FaxQueue[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x24,{id:{$in:_0x9684x2c}}),_0x9684x2e))})}};var getAgentsIdByUser=function(_0x9684x22){return function(_0x9684x2b){var _0x9684x35=[];var _0x9684x2d=_0x9684x2b;var _0x9684x24=_0x9684x22|| {};var _0x9684x36=[],_0x9684x37=[],_0x9684x38=[],_0x9684x39=[],_0x9684x3a=[];return _0x9684x2d[_0xe9f0[73]]({attributes:[_0xe9f0[71]],include:[{raw:true,model:User,attributes:[_0xe9f0[76]]}]})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x36= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[71]);_0x9684x2f[_0xe9f0[67]](function(_0x9684x3b){_0x9684x35= _[_0xe9f0[86]](_0x9684x35,_[_0xe9f0[72]](_0x9684x3b.Users,_0xe9f0[76]))})})[_0xe9f0[70]](function(){return _0x9684x2d[_0xe9f0[77]]({attributes:[_0xe9f0[76]],include:[{raw:true,model:User,attributes:[_0xe9f0[76]]}]})})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x37= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76]);_0x9684x2f[_0xe9f0[67]](function(_0x9684x3b){_0x9684x35= _[_0xe9f0[86]](_0x9684x35,_[_0xe9f0[72]](_0x9684x3b.Users,_0xe9f0[76]))})})[_0xe9f0[70]](function(){return _0x9684x2d[_0xe9f0[78]]({attributes:[_0xe9f0[76]],include:[{raw:true,model:User,attributes:[_0xe9f0[76]]}]})})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x38= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76]);_0x9684x2f[_0xe9f0[67]](function(_0x9684x3b){_0x9684x35= _[_0xe9f0[86]](_0x9684x35,_[_0xe9f0[72]](_0x9684x3b.Users,_0xe9f0[76]))})})[_0xe9f0[70]](function(){return _0x9684x2d[_0xe9f0[80]]({attributes:[_0xe9f0[76]],include:[{raw:true,model:User,attributes:[_0xe9f0[76]]}]})})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x39= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76]);_0x9684x2f[_0xe9f0[67]](function(_0x9684x3b){_0x9684x35= _[_0xe9f0[86]](_0x9684x35,_[_0xe9f0[72]](_0x9684x3b.Users,_0xe9f0[76]))})})[_0xe9f0[70]](function(){return _0x9684x2d[_0xe9f0[79]]({attributes:[_0xe9f0[76]],include:[{raw:true,model:User,attributes:[_0xe9f0[76]]}]})})[_0xe9f0[70]](function(_0x9684x2f){_0x9684x3a= _[_0xe9f0[72]](_0x9684x2f,_0xe9f0[76]);_0x9684x2f[_0xe9f0[67]](function(_0x9684x3b){_0x9684x35= _[_0xe9f0[86]](_0x9684x35,_[_0xe9f0[72]](_0x9684x3b.Users,_0xe9f0[76]))})})[_0xe9f0[70]](function(){return User[_0xe9f0[75]](_0xe9f0[81],{method:[_0xe9f0[82],_0x9684x24]},{method:[_0xe9f0[83],_0x9684x24]},{method:[_0xe9f0[84],_0x9684x24]},{method:[_0xe9f0[85],_0x9684x24]})[_0xe9f0[69]](_[_0xe9f0[68]](getQuery(_0x9684x24,{id:{$in:_0x9684x35}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x9684x36}},required:false},{model:ChatQueue,where:{id:{$in:_0x9684x37}},required:false},{model:MailQueue,where:{id:{$in:_0x9684x38}},required:false},{model:FaxQueue,where:{id:{$in:_0x9684x39}},required:false},{model:SmsQueue,where:{id:{$in:_0x9684x3a}},required:false}]}))})}};var stripTrailingSlash=function(_0x9684x3d){if(_0x9684x3d[_0xe9f0[87]](-1) === _0xe9f0[88]){return _0x9684x3d[_0xe9f0[87]](0,_0x9684x3d[_0xe9f0[50]]- 1)};return _0x9684x3d};module[_0xe9f0[89]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0xe9f0[90])}
\ No newline at end of file