Built motion from commit 3594e56.|0.0.120
[motion.git] / server / config / util / index.js
index 119a611..e68a115 100644 (file)
@@ -1 +1 @@
-var _0x1b3c=["\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"];_0x1b3c[0];var _=require(_0x1b3c[1]);var moment=require(_0x1b3c[2]);var User=require(_0x1b3c[4])[_0x1b3c[3]];var VoiceQueue=require(_0x1b3c[4])[_0x1b3c[5]];var ChatQueue=require(_0x1b3c[4])[_0x1b3c[6]];var MailQueue=require(_0x1b3c[4])[_0x1b3c[7]];var FaxQueue=require(_0x1b3c[4])[_0x1b3c[8]];var SmsQueue=require(_0x1b3c[4])[_0x1b3c[9]];var checkInterval=function(_0x8e8dxa){var _0x8e8dxb=[_0x1b3c[10],_0x1b3c[11],_0x1b3c[12],_0x1b3c[13],_0x1b3c[14],_0x1b3c[15],_0x1b3c[16]];var _0x8e8dxc=[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 _0x8e8dxd=[_0x1b3c[17],_0x1b3c[18],_0x1b3c[19],_0x1b3c[20],_0x1b3c[21],_0x1b3c[22],_0x1b3c[23],_0x1b3c[24],_0x1b3c[25],_0x1b3c[26],_0x1b3c[27],_0x1b3c[28]];var _0x8e8dxe,_0x8e8dxf;var _0x8e8dx10=_0x8e8dxa[_0x1b3c[30]](_0x1b3c[29])[0];var _0x8e8dx11=_0x8e8dxa[_0x1b3c[30]](_0x1b3c[29])[1];var _0x8e8dx12=_0x8e8dxa[_0x1b3c[30]](_0x1b3c[29])[2];var _0x8e8dx13=_0x8e8dxa[_0x1b3c[30]](_0x1b3c[29])[3];if(_0x8e8dx10!==_0x1b3c[31]){var _0x8e8dx14=moment()[_0x1b3c[33]](_0x1b3c[32]);var _0x8e8dx15=_0x8e8dx10[_0x1b3c[30]](_0x1b3c[34])[0];var _0x8e8dx16=_0x8e8dx10[_0x1b3c[30]](_0x1b3c[34])[1];if((_0x8e8dx14<_0x8e8dx15)||(_0x8e8dx14>_0x8e8dx16)){console[_0x1b3c[36]](_0x1b3c[35]);return false}};if(_0x8e8dx11!==_0x1b3c[31]){var _0x8e8dx17=_0x8e8dxb[moment()[_0x1b3c[37]]()];var _0x8e8dx18=_[_0x1b3c[38]](_0x8e8dxb,_0x8e8dx11[_0x1b3c[30]](_0x1b3c[34])[0]);var _0x8e8dx19=_[_0x1b3c[38]](_0x8e8dxb,_0x8e8dx11[_0x1b3c[30]](_0x1b3c[34])[1]);for(_0x8e8dxe=0;_0x8e8dxe<_0x8e8dx18;_0x8e8dxe++){_0x8e8dxf=_0x8e8dxb[_0x1b3c[39]]();_0x8e8dxb[_0x1b3c[40]](_0x8e8dxf)};_0x8e8dx18=_[_0x1b3c[38]](_0x8e8dxb,_0x8e8dx11[_0x1b3c[30]](_0x1b3c[34])[0]);_0x8e8dx19=_[_0x1b3c[38]](_0x8e8dxb,_0x8e8dx11[_0x1b3c[30]](_0x1b3c[34])[1])+1;_0x8e8dxb=_0x8e8dxb[_0x1b3c[41]](_0x8e8dx18,_0x8e8dx19);if(!_[_0x1b3c[42]](_0x8e8dxb,_0x8e8dx17)){console[_0x1b3c[36]](_0x1b3c[43]);return false}};if(_0x8e8dx12!==_0x1b3c[31]){var _0x8e8dx1a=moment()[_0x1b3c[44]]();var _0x8e8dx1b=_[_0x1b3c[38]](_0x8e8dxc,parseInt(_0x8e8dx12[_0x1b3c[30]](_0x1b3c[34])[0],10));var _0x8e8dx1c=_[_0x1b3c[38]](_0x8e8dxc,parseInt(_0x8e8dx12[_0x1b3c[30]](_0x1b3c[34])[1]));for(_0x8e8dxe=0;_0x8e8dxe<_0x8e8dx1b;_0x8e8dxe++){_0x8e8dxf=_0x8e8dxc[_0x1b3c[39]]();_0x8e8dxc[_0x1b3c[40]](_0x8e8dxf)};_0x8e8dx1b=_[_0x1b3c[38]](_0x8e8dxc,parseInt(_0x8e8dx12[_0x1b3c[30]](_0x1b3c[34])[0],10));_0x8e8dx1c=_[_0x1b3c[38]](_0x8e8dxc,parseInt(_0x8e8dx12[_0x1b3c[30]](_0x1b3c[34])[1]),10)+1;_0x8e8dxc=_0x8e8dxc[_0x1b3c[41]](_0x8e8dx1b,_0x8e8dx1c);if(!_[_0x1b3c[42]](_0x8e8dxc,_0x8e8dx1a)){console[_0x1b3c[36]](_0x1b3c[45]);return false}};if(_0x8e8dx13!==_0x1b3c[31]){var _0x8e8dx1d=_0x8e8dxd[moment()[_0x1b3c[46]]()];var _0x8e8dx1e=_[_0x1b3c[38]](_0x8e8dxd,_0x8e8dx13[_0x1b3c[30]](_0x1b3c[34])[0]);var _0x8e8dx1f=_[_0x1b3c[38]](_0x8e8dxd,_0x8e8dx13[_0x1b3c[30]](_0x1b3c[34])[1]);for(_0x8e8dxe=0;_0x8e8dxe<_0x8e8dx1e;_0x8e8dxe++){_0x8e8dxf=_0x8e8dxd[_0x1b3c[39]]();_0x8e8dxd[_0x1b3c[40]](_0x8e8dxf)};_0x8e8dx1e=_[_0x1b3c[38]](_0x8e8dxd,_0x8e8dx13[_0x1b3c[30]](_0x1b3c[34])[0]);_0x8e8dx1f=_[_0x1b3c[38]](_0x8e8dxd,_0x8e8dx13[_0x1b3c[30]](_0x1b3c[34])[1])+1;_0x8e8dxd=_0x8e8dxd[_0x1b3c[41]](_0x8e8dx1e,_0x8e8dx1f);if(!_[_0x1b3c[42]](_0x8e8dxd,_0x8e8dx1d)){console[_0x1b3c[36]](_0x1b3c[47]);return false}};console[_0x1b3c[36]](_0x1b3c[48]);return true};var isValidInterval=function(_0x8e8dxa){if(_[_0x1b3c[49]](_0x8e8dxa)){for(var _0x8e8dxe=0;_0x8e8dxe<_0x8e8dxa[_0x1b3c[51]][_0x1b3c[50]];_0x8e8dxe++){if(!checkInterval(_0x8e8dxa[_0x1b3c[51]][_0x8e8dxe][_0x1b3c[52]])){return false}};return true}else {return checkInterval(_0x8e8dxa)}};var getQuery=function(_0x8e8dx22,_0x8e8dx23){var _0x8e8dx24={where:{}};if(_0x8e8dx22){var _0x8e8dx25,_0x8e8dx26={};for(var _0x8e8dx27 in _0x8e8dx22){if(_[_0x1b3c[42]](_0x8e8dx27,_0x1b3c[53])){_0x8e8dx25=_0x8e8dx27[_0x1b3c[55]](_0x1b3c[53],_0x1b3c[54]);if(_0x8e8dx22[_0x8e8dx25+_0x1b3c[56]]){_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]]=_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]]||[];_0x8e8dx26={};_0x8e8dx26[_0x8e8dx25]={$gte:moment(_0x8e8dx22[_0x8e8dx27])[_0x1b3c[59]](_0x1b3c[37])};_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]][_0x1b3c[40]](_0x8e8dx26);_0x8e8dx26={};_0x8e8dx26[_0x8e8dx25]={$lte:moment(_0x8e8dx22[_0x8e8dx25+_0x1b3c[56]])[_0x1b3c[60]](_0x1b3c[37])};_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]][_0x1b3c[40]](_0x8e8dx26);delete _0x8e8dx22[_0x8e8dx25+_0x1b3c[56]]}else {_0x8e8dx24[_0x1b3c[58]][_0x8e8dx27[_0x1b3c[55]](_0x1b3c[53],_0x1b3c[54])]={$gte:moment(_0x8e8dx22[_0x8e8dx27])[_0x1b3c[59]](_0x1b3c[37])}};delete _0x8e8dx22[_0x8e8dx27]}else {if(_[_0x1b3c[42]](_0x8e8dx27,_0x1b3c[56])){_0x8e8dx25=_0x8e8dx27[_0x1b3c[55]](_0x1b3c[56],_0x1b3c[54]);if(_0x8e8dx22[_0x8e8dx25+_0x1b3c[53]]){_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]]=_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]]||[];_0x8e8dx26={};_0x8e8dx26[_0x8e8dx25]={$lte:moment(_0x8e8dx22[_0x8e8dx27])[_0x1b3c[60]](_0x1b3c[37])};_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]][_0x1b3c[40]](_0x8e8dx26);_0x8e8dx26[_0x8e8dx25]={$gte:moment(_0x8e8dx22[_0x8e8dx25+_0x1b3c[53]])[_0x1b3c[59]](_0x1b3c[37])};_0x8e8dx24[_0x1b3c[58]][_0x1b3c[57]][_0x1b3c[40]](_0x8e8dx26);delete _0x8e8dx22[_0x8e8dx25+_0x1b3c[53]]}else {_0x8e8dx24[_0x1b3c[58]][_0x8e8dx27[_0x1b3c[55]](_0x1b3c[56],_0x1b3c[54])]={$lte:moment(_0x8e8dx22[_0x8e8dx27])[_0x1b3c[60]](_0x1b3c[37])}};delete _0x8e8dx22[_0x8e8dx27]}}};_[_0x1b3c[67]](_0x8e8dx22,function(_0x8e8dx28,_0x8e8dx27){switch(_0x8e8dx27){case _0x1b3c[61]:;case _0x1b3c[62]:_0x8e8dx24[_0x8e8dx27]=Number(_0x8e8dx28);break;case _0x1b3c[63]:_0x8e8dx24[_0x8e8dx27]=_0x8e8dx28;break;case _0x1b3c[64]:;case _0x1b3c[65]:_0x8e8dx24[_0x1b3c[58]][_0x8e8dx27]=_0x8e8dx28;break;default:_0x8e8dx24[_0x1b3c[58]][_0x8e8dx27]={$like:_0x1b3c[66]+_0x8e8dx28+_0x1b3c[66]}}})};if(_0x8e8dx23){_[_0x1b3c[68]](_0x8e8dx24[_0x1b3c[58]],_0x8e8dx23)};return _0x8e8dx24};var getVoiceQueuesIdByUser=function(_0x8e8dx22,_0x8e8dx2a){return function(_0x8e8dx2b){var _0x8e8dx2c=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx2e=_0x8e8dx2a||{};return _0x8e8dx2d[_0x1b3c[73]]({attributes:[_0x1b3c[71]]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx2c=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[71])})[_0x1b3c[70]](function(){return VoiceQueue[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx22,{name:{$in:_0x8e8dx2c}}),_0x8e8dx2e))})}};var getChatQueuesIdByUser=function(_0x8e8dx22,_0x8e8dx2a){return function(_0x8e8dx2b){var _0x8e8dx2c=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx2e=_0x8e8dx2a||{};return _0x8e8dx2d[_0x1b3c[77]]({attributes:[_0x1b3c[76]]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx2c=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76])})[_0x1b3c[70]](function(){return ChatQueue[_0x1b3c[75]](_0x1b3c[74])[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx24,{id:{$in:_0x8e8dx2c}}),_0x8e8dx2e))})}};var getMailQueuesIdByUser=function(_0x8e8dx22,_0x8e8dx2a){return function(_0x8e8dx2b){var _0x8e8dx2c=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx2e=_0x8e8dx2a||{};return _0x8e8dx2d[_0x1b3c[78]]({attributes:[_0x1b3c[76]]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx2c=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76])})[_0x1b3c[70]](function(){return MailQueue[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx24,{id:{$in:_0x8e8dx2c}}),_0x8e8dx2e))})}};var getSmsQueuesIdByUser=function(_0x8e8dx22,_0x8e8dx2a){return function(_0x8e8dx2b){var _0x8e8dx2c=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx2e=_0x8e8dx2a||{};return _0x8e8dx2d[_0x1b3c[79]]({attributes:[_0x1b3c[76]]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx2c=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76])})[_0x1b3c[70]](function(){return SmsQueue[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx24,{id:{$in:_0x8e8dx2c}}),_0x8e8dx2e))})}};var getFaxQueuesIdByUser=function(_0x8e8dx22,_0x8e8dx2a){return function(_0x8e8dx2b){var _0x8e8dx2c=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx2e=_0x8e8dx2a||{};return _0x8e8dx2d[_0x1b3c[80]]({attributes:[_0x1b3c[76]]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx2c=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76])})[_0x1b3c[70]](function(){return FaxQueue[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx24,{id:{$in:_0x8e8dx2c}}),_0x8e8dx2e))})}};var getAgentsIdByUser=function(_0x8e8dx22){return function(_0x8e8dx2b){var _0x8e8dx35=[];var _0x8e8dx2d=_0x8e8dx2b;var _0x8e8dx24=_0x8e8dx22||{};var _0x8e8dx36=[],_0x8e8dx37=[],_0x8e8dx38=[],_0x8e8dx39=[],_0x8e8dx3a=[];return _0x8e8dx2d[_0x1b3c[73]]({attributes:[_0x1b3c[71]],include:[{raw:true,model:User,attributes:[_0x1b3c[76]]}]})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx36=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[71]);_0x8e8dx2f[_0x1b3c[67]](function(_0x8e8dx3b){_0x8e8dx35=_[_0x1b3c[86]](_0x8e8dx35,_[_0x1b3c[72]](_0x8e8dx3b.Users,_0x1b3c[76]))})})[_0x1b3c[70]](function(){return _0x8e8dx2d[_0x1b3c[77]]({attributes:[_0x1b3c[76]],include:[{raw:true,model:User,attributes:[_0x1b3c[76]]}]})})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx37=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76]);_0x8e8dx2f[_0x1b3c[67]](function(_0x8e8dx3b){_0x8e8dx35=_[_0x1b3c[86]](_0x8e8dx35,_[_0x1b3c[72]](_0x8e8dx3b.Users,_0x1b3c[76]))})})[_0x1b3c[70]](function(){return _0x8e8dx2d[_0x1b3c[78]]({attributes:[_0x1b3c[76]],include:[{raw:true,model:User,attributes:[_0x1b3c[76]]}]})})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx38=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76]);_0x8e8dx2f[_0x1b3c[67]](function(_0x8e8dx3b){_0x8e8dx35=_[_0x1b3c[86]](_0x8e8dx35,_[_0x1b3c[72]](_0x8e8dx3b.Users,_0x1b3c[76]))})})[_0x1b3c[70]](function(){return _0x8e8dx2d[_0x1b3c[80]]({attributes:[_0x1b3c[76]],include:[{raw:true,model:User,attributes:[_0x1b3c[76]]}]})})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx39=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76]);_0x8e8dx2f[_0x1b3c[67]](function(_0x8e8dx3b){_0x8e8dx35=_[_0x1b3c[86]](_0x8e8dx35,_[_0x1b3c[72]](_0x8e8dx3b.Users,_0x1b3c[76]))})})[_0x1b3c[70]](function(){return _0x8e8dx2d[_0x1b3c[79]]({attributes:[_0x1b3c[76]],include:[{raw:true,model:User,attributes:[_0x1b3c[76]]}]})})[_0x1b3c[70]](function(_0x8e8dx2f){_0x8e8dx3a=_[_0x1b3c[72]](_0x8e8dx2f,_0x1b3c[76]);_0x8e8dx2f[_0x1b3c[67]](function(_0x8e8dx3b){_0x8e8dx35=_[_0x1b3c[86]](_0x8e8dx35,_[_0x1b3c[72]](_0x8e8dx3b.Users,_0x1b3c[76]))})})[_0x1b3c[70]](function(){return User[_0x1b3c[75]](_0x1b3c[81],{method:[_0x1b3c[82],_0x8e8dx24]},{method:[_0x1b3c[83],_0x8e8dx24]},{method:[_0x1b3c[84],_0x8e8dx24]},{method:[_0x1b3c[85],_0x8e8dx24]})[_0x1b3c[69]](_[_0x1b3c[68]](getQuery(_0x8e8dx24,{id:{$in:_0x8e8dx35}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x8e8dx36}},required:false},{model:ChatQueue,where:{id:{$in:_0x8e8dx37}},required:false},{model:MailQueue,where:{id:{$in:_0x8e8dx38}},required:false},{model:FaxQueue,where:{id:{$in:_0x8e8dx39}},required:false},{model:SmsQueue,where:{id:{$in:_0x8e8dx3a}},required:false}]}))})}};var stripTrailingSlash=function(_0x8e8dx3d){if(_0x8e8dx3d[_0x1b3c[87]](-1)===_0x1b3c[88]){return _0x8e8dx3d[_0x1b3c[87]](0,_0x8e8dx3d[_0x1b3c[50]]-1)};return _0x8e8dx3d};module[_0x1b3c[89]]={getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0x1b3c[90])}
\ No newline at end of file
+var _0x889f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\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","\x41\x63\x74\x69\x6F\x6E","\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","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\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","\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","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\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","\x47\x45\x54","\x50\x4F\x53\x54","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x65\x74\x68\x6F\x64","\x41\x63\x74\x69\x6F\x6E\x20\x46\x61\x69\x6C\x65\x64","\x63\x61\x74\x63\x68","\x41\x63\x74\x69\x6F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x61\x63\x74\x69\x6F\x6E","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x889f[0];var _=require(_0x889f[1]);var moment=require(_0x889f[2]);var request=require(_0x889f[3]);var User=require(_0x889f[5])[_0x889f[4]];var VoiceQueue=require(_0x889f[5])[_0x889f[6]];var ChatQueue=require(_0x889f[5])[_0x889f[7]];var MailQueue=require(_0x889f[5])[_0x889f[8]];var FaxQueue=require(_0x889f[5])[_0x889f[9]];var SmsQueue=require(_0x889f[5])[_0x889f[10]];var Action=require(_0x889f[5])[_0x889f[11]];var checkInterval=function(_0x5a7dxc){var _0x5a7dxd=[_0x889f[12],_0x889f[13],_0x889f[14],_0x889f[15],_0x889f[16],_0x889f[17],_0x889f[18]];var _0x5a7dxe=[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 _0x5a7dxf=[_0x889f[19],_0x889f[20],_0x889f[21],_0x889f[22],_0x889f[23],_0x889f[24],_0x889f[25],_0x889f[26],_0x889f[27],_0x889f[28],_0x889f[29],_0x889f[30]];var _0x5a7dx10,_0x5a7dx11;var _0x5a7dx12=_0x5a7dxc[_0x889f[32]](_0x889f[31])[0];var _0x5a7dx13=_0x5a7dxc[_0x889f[32]](_0x889f[31])[1];var _0x5a7dx14=_0x5a7dxc[_0x889f[32]](_0x889f[31])[2];var _0x5a7dx15=_0x5a7dxc[_0x889f[32]](_0x889f[31])[3];if(_0x5a7dx12!== _0x889f[33]){var _0x5a7dx16=moment()[_0x889f[35]](_0x889f[34]);var _0x5a7dx17=_0x5a7dx12[_0x889f[32]](_0x889f[36])[0];var _0x5a7dx18=_0x5a7dx12[_0x889f[32]](_0x889f[36])[1];if((_0x5a7dx16< _0x5a7dx17)|| (_0x5a7dx16> _0x5a7dx18)){console[_0x889f[38]](_0x889f[37]);return false}};if(_0x5a7dx13!== _0x889f[33]){var _0x5a7dx19=_0x5a7dxd[moment()[_0x889f[39]]()];var _0x5a7dx1a=_[_0x889f[40]](_0x5a7dxd,_0x5a7dx13[_0x889f[32]](_0x889f[36])[0]);var _0x5a7dx1b=_[_0x889f[40]](_0x5a7dxd,_0x5a7dx13[_0x889f[32]](_0x889f[36])[1]);for(_0x5a7dx10= 0;_0x5a7dx10< _0x5a7dx1a;_0x5a7dx10++){_0x5a7dx11= _0x5a7dxd[_0x889f[41]]();_0x5a7dxd[_0x889f[42]](_0x5a7dx11)};_0x5a7dx1a= _[_0x889f[40]](_0x5a7dxd,_0x5a7dx13[_0x889f[32]](_0x889f[36])[0]);_0x5a7dx1b= _[_0x889f[40]](_0x5a7dxd,_0x5a7dx13[_0x889f[32]](_0x889f[36])[1])+ 1;_0x5a7dxd= _0x5a7dxd[_0x889f[43]](_0x5a7dx1a,_0x5a7dx1b);if(!_[_0x889f[44]](_0x5a7dxd,_0x5a7dx19)){console[_0x889f[38]](_0x889f[45]);return false}};if(_0x5a7dx14!== _0x889f[33]){var _0x5a7dx1c=moment()[_0x889f[46]]();var _0x5a7dx1d=_[_0x889f[40]](_0x5a7dxe,parseInt(_0x5a7dx14[_0x889f[32]](_0x889f[36])[0],10));var _0x5a7dx1e=_[_0x889f[40]](_0x5a7dxe,parseInt(_0x5a7dx14[_0x889f[32]](_0x889f[36])[1]));for(_0x5a7dx10= 0;_0x5a7dx10< _0x5a7dx1d;_0x5a7dx10++){_0x5a7dx11= _0x5a7dxe[_0x889f[41]]();_0x5a7dxe[_0x889f[42]](_0x5a7dx11)};_0x5a7dx1d= _[_0x889f[40]](_0x5a7dxe,parseInt(_0x5a7dx14[_0x889f[32]](_0x889f[36])[0],10));_0x5a7dx1e= _[_0x889f[40]](_0x5a7dxe,parseInt(_0x5a7dx14[_0x889f[32]](_0x889f[36])[1]),10)+ 1;_0x5a7dxe= _0x5a7dxe[_0x889f[43]](_0x5a7dx1d,_0x5a7dx1e);if(!_[_0x889f[44]](_0x5a7dxe,_0x5a7dx1c)){console[_0x889f[38]](_0x889f[47]);return false}};if(_0x5a7dx15!== _0x889f[33]){var _0x5a7dx1f=_0x5a7dxf[moment()[_0x889f[48]]()];var _0x5a7dx20=_[_0x889f[40]](_0x5a7dxf,_0x5a7dx15[_0x889f[32]](_0x889f[36])[0]);var _0x5a7dx21=_[_0x889f[40]](_0x5a7dxf,_0x5a7dx15[_0x889f[32]](_0x889f[36])[1]);for(_0x5a7dx10= 0;_0x5a7dx10< _0x5a7dx20;_0x5a7dx10++){_0x5a7dx11= _0x5a7dxf[_0x889f[41]]();_0x5a7dxf[_0x889f[42]](_0x5a7dx11)};_0x5a7dx20= _[_0x889f[40]](_0x5a7dxf,_0x5a7dx15[_0x889f[32]](_0x889f[36])[0]);_0x5a7dx21= _[_0x889f[40]](_0x5a7dxf,_0x5a7dx15[_0x889f[32]](_0x889f[36])[1])+ 1;_0x5a7dxf= _0x5a7dxf[_0x889f[43]](_0x5a7dx20,_0x5a7dx21);if(!_[_0x889f[44]](_0x5a7dxf,_0x5a7dx1f)){console[_0x889f[38]](_0x889f[49]);return false}};console[_0x889f[38]](_0x889f[50]);return true};var isValidInterval=function(_0x5a7dxc){if(_[_0x889f[51]](_0x5a7dxc)){for(var _0x5a7dx10=0;_0x5a7dx10< _0x5a7dxc[_0x889f[53]][_0x889f[52]];_0x5a7dx10++){if(!checkInterval(_0x5a7dxc[_0x889f[53]][_0x5a7dx10][_0x889f[54]])){return false}};return true}else {return checkInterval(_0x5a7dxc)}};var getDate=function(_0x5a7dx24,_0x5a7dx25){var _0x5a7dx26=_0x889f[55];if(moment(_0x5a7dx24,_0x5a7dx26,true)[_0x889f[56]]()){return moment(_0x5a7dx24)}else {switch(_0x5a7dx25){case _0x889f[58]:return moment(_0x5a7dx24)[_0x889f[57]](_0x889f[39]);case _0x889f[60]:return moment(_0x5a7dx24)[_0x889f[59]](_0x889f[39]);default:return moment(_0x5a7dx24)}}};var getQuery=function(_0x5a7dx28,_0x5a7dx29){var _0x5a7dx2a={where:{}};if(_0x5a7dx28){var _0x5a7dx2b,_0x5a7dx2c={};for(var _0x5a7dx2d in _0x5a7dx28){if(_[_0x889f[44]](_0x5a7dx2d,_0x889f[61])){_0x5a7dx2b= _0x5a7dx2d[_0x889f[63]](_0x889f[61],_0x889f[62]);if(_0x5a7dx28[_0x5a7dx2b+ _0x889f[64]]){_0x5a7dx2a[_0x889f[66]][_0x889f[65]]= _0x5a7dx2a[_0x889f[66]][_0x889f[65]]|| [];_0x5a7dx2c= {};_0x5a7dx2c[_0x5a7dx2b]= {$gte:getDate(_0x5a7dx28[_0x5a7dx2d],_0x889f[58])};_0x5a7dx2a[_0x889f[66]][_0x889f[65]][_0x889f[42]](_0x5a7dx2c);_0x5a7dx2c= {};_0x5a7dx2c[_0x5a7dx2b]= {$lte:getDate(_0x5a7dx28[_0x5a7dx2b+ _0x889f[64]],_0x889f[60])};_0x5a7dx2a[_0x889f[66]][_0x889f[65]][_0x889f[42]](_0x5a7dx2c);delete _0x5a7dx28[_0x5a7dx2b+ _0x889f[64]]}else {_0x5a7dx2a[_0x889f[66]][_0x5a7dx2d[_0x889f[63]](_0x889f[61],_0x889f[62])]= {$gte:getDate(_0x5a7dx28[_0x5a7dx2d],_0x889f[58])}};delete _0x5a7dx28[_0x5a7dx2d]}else {if(_[_0x889f[44]](_0x5a7dx2d,_0x889f[64])){_0x5a7dx2b= _0x5a7dx2d[_0x889f[63]](_0x889f[64],_0x889f[62]);if(_0x5a7dx28[_0x5a7dx2b+ _0x889f[61]]){_0x5a7dx2a[_0x889f[66]][_0x889f[65]]= _0x5a7dx2a[_0x889f[66]][_0x889f[65]]|| [];_0x5a7dx2c= {};_0x5a7dx2c[_0x5a7dx2b]= {$lte:getDate(_0x5a7dx28[_0x5a7dx2d],_0x889f[60])};_0x5a7dx2a[_0x889f[66]][_0x889f[65]][_0x889f[42]](_0x5a7dx2c);_0x5a7dx2c[_0x5a7dx2b]= {$gte:getDate(_0x5a7dx28[_0x5a7dx2b+ _0x889f[61]],_0x889f[58])};_0x5a7dx2a[_0x889f[66]][_0x889f[65]][_0x889f[42]](_0x5a7dx2c);delete _0x5a7dx28[_0x5a7dx2b+ _0x889f[61]]}else {_0x5a7dx2a[_0x889f[66]][_0x5a7dx2d[_0x889f[63]](_0x889f[64],_0x889f[62])]= {$lte:getDate(_0x5a7dx28[_0x5a7dx2d],_0x889f[60])}};delete _0x5a7dx28[_0x5a7dx2d]}}};_[_0x889f[73]](_0x5a7dx28,function(_0x5a7dx2e,_0x5a7dx2d){switch(_0x5a7dx2d){case _0x889f[67]:;case _0x889f[68]:_0x5a7dx2a[_0x5a7dx2d]= Number(_0x5a7dx2e);break;case _0x889f[69]:_0x5a7dx2a[_0x5a7dx2d]= _0x5a7dx2e;break;case _0x889f[70]:;case _0x889f[71]:_0x5a7dx2a[_0x889f[66]][_0x5a7dx2d]= _0x5a7dx2e;break;default:_0x5a7dx2a[_0x889f[66]][_0x5a7dx2d]= {$like:_0x889f[72]+ _0x5a7dx2e+ _0x889f[72]}}})};if(_0x5a7dx29){_[_0x889f[74]](_0x5a7dx2a[_0x889f[66]],_0x5a7dx29)};return _0x5a7dx2a};var getVoiceQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[79]]({attributes:[_0x889f[77]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[77])})[_0x889f[76]](function(){return VoiceQueue[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx28,{name:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getChatQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[83]]({attributes:[_0x889f[82]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[82])})[_0x889f[76]](function(){return ChatQueue[_0x889f[81]](_0x889f[80])[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getMailQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[84]]({attributes:[_0x889f[82]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[82])})[_0x889f[76]](function(){return MailQueue[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getSmsQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[85]]({attributes:[_0x889f[82]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[82])})[_0x889f[76]](function(){return SmsQueue[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getFaxQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[86]]({attributes:[_0x889f[82]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[82])})[_0x889f[76]](function(){return FaxQueue[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getOpenchannelQueuesIdByUser=function(_0x5a7dx28,_0x5a7dx30){return function(_0x5a7dx31){var _0x5a7dx32=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx34=_0x5a7dx30|| {};return _0x5a7dx33[_0x889f[87]]({attributes:[_0x889f[82]]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx32= _[_0x889f[78]](_0x5a7dx35,_0x889f[82])})[_0x889f[76]](function(){return OpenchannelQueue[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx32}}),_0x5a7dx34))})}};var getAgentsIdByUser=function(_0x5a7dx28){return function(_0x5a7dx31){var _0x5a7dx3c=[];var _0x5a7dx33=_0x5a7dx31;var _0x5a7dx2a=_0x5a7dx28|| {};var _0x5a7dx3d=[],_0x5a7dx3e=[],_0x5a7dx3f=[],_0x5a7dx40=[],_0x5a7dx41=[];return _0x5a7dx33[_0x889f[79]]({attributes:[_0x889f[77]],include:[{raw:true,model:User,attributes:[_0x889f[82]]}]})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx3d= _[_0x889f[78]](_0x5a7dx35,_0x889f[77]);_0x5a7dx35[_0x889f[73]](function(_0x5a7dx42){_0x5a7dx3c= _[_0x889f[93]](_0x5a7dx3c,_[_0x889f[78]](_0x5a7dx42.Users,_0x889f[82]))})})[_0x889f[76]](function(){return _0x5a7dx33[_0x889f[83]]({attributes:[_0x889f[82]],include:[{raw:true,model:User,attributes:[_0x889f[82]]}]})})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx3e= _[_0x889f[78]](_0x5a7dx35,_0x889f[82]);_0x5a7dx35[_0x889f[73]](function(_0x5a7dx42){_0x5a7dx3c= _[_0x889f[93]](_0x5a7dx3c,_[_0x889f[78]](_0x5a7dx42.Users,_0x889f[82]))})})[_0x889f[76]](function(){return _0x5a7dx33[_0x889f[84]]({attributes:[_0x889f[82]],include:[{raw:true,model:User,attributes:[_0x889f[82]]}]})})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx3f= _[_0x889f[78]](_0x5a7dx35,_0x889f[82]);_0x5a7dx35[_0x889f[73]](function(_0x5a7dx42){_0x5a7dx3c= _[_0x889f[93]](_0x5a7dx3c,_[_0x889f[78]](_0x5a7dx42.Users,_0x889f[82]))})})[_0x889f[76]](function(){return _0x5a7dx33[_0x889f[86]]({attributes:[_0x889f[82]],include:[{raw:true,model:User,attributes:[_0x889f[82]]}]})})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx40= _[_0x889f[78]](_0x5a7dx35,_0x889f[82]);_0x5a7dx35[_0x889f[73]](function(_0x5a7dx42){_0x5a7dx3c= _[_0x889f[93]](_0x5a7dx3c,_[_0x889f[78]](_0x5a7dx42.Users,_0x889f[82]))})})[_0x889f[76]](function(){return _0x5a7dx33[_0x889f[85]]({attributes:[_0x889f[82]],include:[{raw:true,model:User,attributes:[_0x889f[82]]}]})})[_0x889f[76]](function(_0x5a7dx35){_0x5a7dx41= _[_0x889f[78]](_0x5a7dx35,_0x889f[82]);_0x5a7dx35[_0x889f[73]](function(_0x5a7dx42){_0x5a7dx3c= _[_0x889f[93]](_0x5a7dx3c,_[_0x889f[78]](_0x5a7dx42.Users,_0x889f[82]))})})[_0x889f[76]](function(){return User[_0x889f[81]](_0x889f[88],{method:[_0x889f[89],_0x5a7dx2a]},{method:[_0x889f[90],_0x5a7dx2a]},{method:[_0x889f[91],_0x5a7dx2a]},{method:[_0x889f[92],_0x5a7dx2a]})[_0x889f[75]](_[_0x889f[74]](getQuery(_0x5a7dx2a,{id:{$in:_0x5a7dx3c}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x5a7dx3d}},required:false},{model:ChatQueue,where:{id:{$in:_0x5a7dx3e}},required:false},{model:MailQueue,where:{id:{$in:_0x5a7dx3f}},required:false},{model:FaxQueue,where:{id:{$in:_0x5a7dx40}},required:false},{model:SmsQueue,where:{id:{$in:_0x5a7dx41}},required:false}]}))})}};var stripTrailingSlash=function(_0x5a7dx44){if(_0x5a7dx44[_0x889f[94]](-1) === _0x889f[95]){return _0x5a7dx44[_0x889f[94]](0,_0x5a7dx44[_0x889f[52]]- 1)};return _0x5a7dx44};var sendRequest=function(_0x5a7dx46,_0x5a7dx47,_0x5a7dx48){if(_0x5a7dx47== _0x889f[96]|| _0x5a7dx47== _0x889f[97]){var _0x5a7dx49={method:_0x5a7dx47,uri:_0x5a7dx48,body:_0x5a7dx46,json:true};return request(_0x5a7dx49)}else {console[_0x889f[38]](_0x889f[98])}};var execAction=function(_0x5a7dx4b,_0x5a7dx46){switch(_0x5a7dx4b[_0x889f[102]]){case _0x889f[106]:Action[_0x889f[105]]({name:_0x5a7dx4b[_0x889f[102]],data4:_0x5a7dx4b[_0x889f[70]]|| _0x889f[103]},{body:{name:_0x5a7dx4b[_0x889f[102]],agent:_0x5a7dx46[_0x889f[104]],type:_0x5a7dx4b[_0x889f[70]]|| _0x889f[103]}})[_0x889f[76]](function(){console[_0x889f[38]](_0x889f[101])})[_0x889f[100]](function(_0x5a7dx4c){console[_0x889f[38]](_0x889f[99],_0x5a7dx4c)});break;default:console[_0x889f[38]](_0x889f[107])}};module[_0x889f[108]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0x889f[109])}
\ No newline at end of file