Built motion from commit 6e01242c4.|1.0.20
[motion.git] / server / config / util / index.js
index 119a611..db02c52 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 _0x6c07=["\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","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x41\x66\x74\x65\x72","\x5B\x5D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x64\x61\x79","\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","\x69\x6E\x63\x6C\x75\x64\x65\x73","","\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","\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","\x6C\x65\x6E\x67\x74\x68","\x5E\x5C\x2F\x7C\x5C\x2F\x24","\x67","\x63\x61\x6C\x6C","\x73\x6C\x69\x63\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6A\x6F\x69\x6E","\x47\x45\x54","\x50\x4F\x53\x54","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x65\x74\x68\x6F\x64","\x65\x72\x72\x6F\x72","\x41\x63\x74\x69\x6F\x6E\x20\x46\x61\x69\x6C\x65\x64","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x41\x63\x74\x69\x6F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x64\x65\x62\x75\x67","\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","\x73\x74\x61\x74\x53\x79\x6E\x63","\x73\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x6c07[0];var _=require(_0x6c07[1]);var moment=require(_0x6c07[2]);var request=require(_0x6c07[3]);var fs=require(_0x6c07[4]);var logger=require(_0x6c07[6])(_0x6c07[5]);var User=require(_0x6c07[8])[_0x6c07[7]];var VoiceQueue=require(_0x6c07[8])[_0x6c07[9]];var ChatQueue=require(_0x6c07[8])[_0x6c07[10]];var MailQueue=require(_0x6c07[8])[_0x6c07[11]];var FaxQueue=require(_0x6c07[8])[_0x6c07[12]];var SmsQueue=require(_0x6c07[8])[_0x6c07[13]];var OpenchannelQueue=require(_0x6c07[8])[_0x6c07[14]];var Action=require(_0x6c07[8])[_0x6c07[15]];var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};function splitInterval(_0x7e0bx11){var _0x7e0bx12={};var _0x7e0bx13=_0x7e0bx11[_0x6c07[17]](_0x6c07[16]);var _0x7e0bx14;_0x7e0bx13[_0x6c07[29]](function(_0x7e0bx15,_0x7e0bx16){switch(_0x7e0bx16){case 0:if(_0x7e0bx15!== _0x6c07[18]){_0x7e0bx14= _0x7e0bx15[_0x6c07[17]](_0x6c07[19]);_0x7e0bx12[_0x6c07[20]]= moment(_0x7e0bx14[0],_0x6c07[21]);_0x7e0bx12[_0x6c07[22]]= moment(_0x7e0bx14[1],_0x6c07[21])}else {_0x7e0bx12[_0x6c07[20]]= null;_0x7e0bx12[_0x6c07[22]]= null};break;case 1:if(_0x7e0bx15!== _0x6c07[18]){_0x7e0bx14= _0x7e0bx15[_0x6c07[17]](_0x6c07[19]);_0x7e0bx12[_0x6c07[23]]= Number(weekDaysCollection[_0x7e0bx14[0]]);_0x7e0bx12[_0x6c07[24]]= _0x7e0bx14[1]?Number(weekDaysCollection[_0x7e0bx14[1]]):null}else {_0x7e0bx12[_0x6c07[23]]= null;_0x7e0bx12[_0x6c07[24]]= null};break;case 2:if(_0x7e0bx15!== _0x6c07[18]){_0x7e0bx14= _0x7e0bx15[_0x6c07[17]](_0x6c07[19]);_0x7e0bx12[_0x6c07[25]]= Number(_0x7e0bx14[0]);_0x7e0bx12[_0x6c07[26]]= _0x7e0bx14[1]?Number(_0x7e0bx14[1]):null}else {_0x7e0bx12[_0x6c07[25]]= null;_0x7e0bx12[_0x6c07[26]]= null};break;case 3:if(_0x7e0bx15!== _0x6c07[18]){_0x7e0bx14= _0x7e0bx15[_0x6c07[17]](_0x6c07[19]);_0x7e0bx12[_0x6c07[27]]= Number(monthsCollection[_0x7e0bx14[0]]);_0x7e0bx12[_0x6c07[28]]= _0x7e0bx14[1]?Number(monthsCollection[_0x7e0bx14[1]]):null}else {_0x7e0bx12[_0x6c07[27]]= null;_0x7e0bx12[_0x6c07[28]]= null};break;default:}});return _0x7e0bx12}function isIntervalValid(_0x7e0bx11){var _0x7e0bx18=moment()[_0x6c07[30]](_0x6c07[21]);var _0x7e0bx19=moment()[_0x6c07[30]](_0x6c07[31]);var _0x7e0bx1a=moment()[_0x6c07[30]](_0x6c07[32]);var _0x7e0bx1b=moment()[_0x6c07[30]](_0x6c07[33]);var _0x7e0bx1c,_0x7e0bx1d,_0x7e0bx1e,_0x7e0bx1f;var _0x7e0bx20=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x7e0bx21=[1,2,3,4,5,6,7];var _0x7e0bx22=[];for(var _0x7e0bx23=1;_0x7e0bx23<= 31;_0x7e0bx23++){_0x7e0bx22[_0x6c07[34]](_0x7e0bx23)};if(_0x7e0bx11[_0x6c07[20]]&& _0x7e0bx11[_0x6c07[22]]){if(_0x7e0bx11[_0x6c07[22]][_0x6c07[35]](_0x7e0bx11[_0x6c07[20]])){_0x7e0bx1c= moment(_0x7e0bx18,_0x6c07[21])[_0x6c07[37]](_0x7e0bx11[_0x6c07[20]],_0x7e0bx11[_0x6c07[22]],null,_0x6c07[36])}else {_0x7e0bx1c=  !moment(_0x7e0bx18,_0x6c07[21])[_0x6c07[37]](_0x7e0bx11[_0x6c07[22]],_0x7e0bx11[_0x6c07[20]],null,_0x6c07[36])}}else {_0x7e0bx1c= true};if(_0x7e0bx11[_0x6c07[23]]){if(_0x7e0bx11[_0x6c07[24]]&& _0x7e0bx11[_0x6c07[24]]!== _0x7e0bx11[_0x6c07[23]]){var _0x7e0bx24=_[_0x6c07[38]](_0x7e0bx21,function(_0x7e0bx25){if(_0x7e0bx11[_0x6c07[23]]< _0x7e0bx11[_0x6c07[24]]){return (_0x7e0bx25>= _0x7e0bx11[_0x6c07[23]])&& (_0x7e0bx25<= _0x7e0bx11[_0x6c07[24]])}else {return (1<= _0x7e0bx25&& _0x7e0bx25<= _0x7e0bx11[_0x6c07[24]])|| (_0x7e0bx11[_0x6c07[23]]<= _0x7e0bx25&& _0x7e0bx25<= 7)}});_0x7e0bx1d= (_0x7e0bx24[_0x6c07[39]](parseInt(_0x7e0bx19))!==  -1)?true:false}else {_0x7e0bx1d= (parseInt(_0x7e0bx19)=== _0x7e0bx11[_0x6c07[23]])?true:false}}else {_0x7e0bx1d= true};if(_0x7e0bx11[_0x6c07[25]]){if(_0x7e0bx11[_0x6c07[26]]&& _0x7e0bx11[_0x6c07[26]]!== _0x7e0bx11[_0x6c07[25]]){var _0x7e0bx26=_[_0x6c07[38]](_0x7e0bx22,function(_0x7e0bx25){if(_0x7e0bx11[_0x6c07[25]]< _0x7e0bx11[_0x6c07[26]]){return (_0x7e0bx25>= _0x7e0bx11[_0x6c07[25]])&& (_0x7e0bx25<= _0x7e0bx11[_0x6c07[26]])}else {return (1<= _0x7e0bx25&& _0x7e0bx25<= _0x7e0bx11[_0x6c07[26]])|| (_0x7e0bx11[_0x6c07[25]]<= _0x7e0bx25&& _0x7e0bx25<= 7)}});_0x7e0bx1e= (_0x7e0bx26[_0x6c07[39]](parseInt(_0x7e0bx1a))!==  -1)?true:false}else {_0x7e0bx1e= (parseInt(_0x7e0bx1a)=== _0x7e0bx11[_0x6c07[25]])?true:false}}else {_0x7e0bx1e= true};if(_0x7e0bx11[_0x6c07[27]]){if(_0x7e0bx11[_0x6c07[28]]&& _0x7e0bx11[_0x6c07[28]]!== _0x7e0bx11[_0x6c07[27]]){var _0x7e0bx27=_[_0x6c07[38]](_0x7e0bx20,function(_0x7e0bx25){if(_0x7e0bx11[_0x6c07[27]]< _0x7e0bx11[_0x6c07[28]]){return (_0x7e0bx25>= _0x7e0bx11[_0x6c07[27]])&& (_0x7e0bx25<= _0x7e0bx11[_0x6c07[28]])}else {return (1<= _0x7e0bx25&& _0x7e0bx25<= _0x7e0bx11[_0x6c07[28]])|| (_0x7e0bx11[_0x6c07[27]]<= _0x7e0bx25&& _0x7e0bx25<= 7)}});_0x7e0bx1f= (_0x7e0bx27[_0x6c07[39]](parseInt(_0x7e0bx1b))!==  -1)?true:false}else {_0x7e0bx1f= (parseInt(_0x7e0bx1b)=== _0x7e0bx11[_0x6c07[27]])?true:false}}else {_0x7e0bx1f= true};return _0x7e0bx1c&& _0x7e0bx1d&& _0x7e0bx1e&& _0x7e0bx1f}var getDate=function(_0x7e0bx29,_0x7e0bx2a){var _0x7e0bx2b=_0x6c07[40];if(moment(_0x7e0bx29,_0x7e0bx2b,true)[_0x6c07[41]]()){return moment(_0x7e0bx29)}else {switch(_0x7e0bx2a){case _0x6c07[44]:return moment(_0x7e0bx29)[_0x6c07[43]](_0x6c07[42]);case _0x6c07[46]:return moment(_0x7e0bx29)[_0x6c07[45]](_0x6c07[42]);default:return moment(_0x7e0bx29)}}};var getQuery=function(_0x7e0bx2d,_0x7e0bx2e,_0x7e0bx2f){var _0x7e0bx30={where:{}};if(_0x7e0bx2d){var _0x7e0bx31,_0x7e0bx32={};for(var _0x7e0bx33 in _0x7e0bx2d){if(_[_0x6c07[48]](_0x7e0bx33,_0x6c07[47])){_0x7e0bx31= _0x7e0bx33[_0x6c07[50]](_0x6c07[47],_0x6c07[49]);if(_0x7e0bx2d[_0x7e0bx31+ _0x6c07[51]]){_0x7e0bx30[_0x6c07[53]][_0x6c07[52]]= _0x7e0bx30[_0x6c07[53]][_0x6c07[52]]|| [];_0x7e0bx32= {};_0x7e0bx32[_0x7e0bx31]= {$gte:getDate(_0x7e0bx2d[_0x7e0bx33],_0x6c07[44])};_0x7e0bx30[_0x6c07[53]][_0x6c07[52]][_0x6c07[34]](_0x7e0bx32);_0x7e0bx32= {};_0x7e0bx32[_0x7e0bx31]= {$lte:getDate(_0x7e0bx2d[_0x7e0bx31+ _0x6c07[51]],_0x6c07[46])};_0x7e0bx30[_0x6c07[53]][_0x6c07[52]][_0x6c07[34]](_0x7e0bx32);delete _0x7e0bx2d[_0x7e0bx31+ _0x6c07[51]]}else {_0x7e0bx30[_0x6c07[53]][_0x7e0bx33[_0x6c07[50]](_0x6c07[47],_0x6c07[49])]= {$gte:getDate(_0x7e0bx2d[_0x7e0bx33],_0x6c07[44])}};delete _0x7e0bx2d[_0x7e0bx33]}else {if(_[_0x6c07[48]](_0x7e0bx33,_0x6c07[51])){_0x7e0bx31= _0x7e0bx33[_0x6c07[50]](_0x6c07[51],_0x6c07[49]);if(_0x7e0bx2d[_0x7e0bx31+ _0x6c07[47]]){_0x7e0bx30[_0x6c07[53]][_0x6c07[52]]= _0x7e0bx30[_0x6c07[53]][_0x6c07[52]]|| [];_0x7e0bx32= {};_0x7e0bx32[_0x7e0bx31]= {$lte:getDate(_0x7e0bx2d[_0x7e0bx33],_0x6c07[46])};_0x7e0bx30[_0x6c07[53]][_0x6c07[52]][_0x6c07[34]](_0x7e0bx32);_0x7e0bx32[_0x7e0bx31]= {$gte:getDate(_0x7e0bx2d[_0x7e0bx31+ _0x6c07[47]],_0x6c07[44])};_0x7e0bx30[_0x6c07[53]][_0x6c07[52]][_0x6c07[34]](_0x7e0bx32);delete _0x7e0bx2d[_0x7e0bx31+ _0x6c07[47]]}else {_0x7e0bx30[_0x6c07[53]][_0x7e0bx33[_0x6c07[50]](_0x6c07[51],_0x6c07[49])]= {$lte:getDate(_0x7e0bx2d[_0x7e0bx33],_0x6c07[46])}};delete _0x7e0bx2d[_0x7e0bx33]}}};_[_0x6c07[29]](_0x7e0bx2d,function(_0x7e0bx34,_0x7e0bx33){switch(_0x7e0bx33){case _0x6c07[54]:;case _0x6c07[55]:_0x7e0bx30[_0x7e0bx33]= Number(_0x7e0bx34);break;case _0x6c07[56]:_0x7e0bx30[_0x7e0bx33]= _0x7e0bx34;break;case _0x6c07[57]:;case _0x6c07[58]:_0x7e0bx30[_0x6c07[53]][_0x7e0bx33]= _0x7e0bx34;break;default:_0x7e0bx30[_0x6c07[53]][_0x7e0bx33]= {$like:_0x6c07[59]+ _0x7e0bx34+ _0x6c07[59]}}})};if(_0x7e0bx2e){_[_0x6c07[60]](_0x7e0bx30[_0x6c07[53]],_0x7e0bx2e)};if(_0x7e0bx2f){_[_0x6c07[60]](_0x7e0bx30,_0x7e0bx2f)};return _0x7e0bx30};var getVoiceQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_0x7e0bx2f|| {};return _0x7e0bx38[_0x6c07[65]]({attributes:[_0x6c07[63]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[63])})[_0x6c07[62]](function(){return VoiceQueue[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx2d,{name:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getChatQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_[_0x6c07[60]](_0x7e0bx2f|| {},{distinct:true});return _0x7e0bx38[_0x6c07[69]]({attributes:[_0x6c07[68]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68])})[_0x6c07[62]](function(){return ChatQueue[_0x6c07[67]](_0x6c07[66])[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getMailQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_[_0x6c07[60]](_0x7e0bx2f|| {},{distinct:true});return _0x7e0bx38[_0x6c07[70]]({attributes:[_0x6c07[68]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68])})[_0x6c07[62]](function(){return MailQueue[_0x6c07[67]](_0x6c07[66])[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getSmsQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_[_0x6c07[60]](_0x7e0bx2f|| {},{distinct:true});return _0x7e0bx38[_0x6c07[71]]({attributes:[_0x6c07[68]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68])})[_0x6c07[62]](function(){return SmsQueue[_0x6c07[67]](_0x6c07[66])[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getFaxQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_[_0x6c07[60]](_0x7e0bx2f|| {},{distinct:true});return _0x7e0bx38[_0x6c07[72]]({attributes:[_0x6c07[68]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68])})[_0x6c07[62]](function(){return FaxQueue[_0x6c07[67]](_0x6c07[66])[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getOpenchannelQueuesIdByUser=function(_0x7e0bx2d,_0x7e0bx2f){return function(_0x7e0bx36){var _0x7e0bx37=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx39=_[_0x6c07[60]](_0x7e0bx2f|| {},{distinct:true});return _0x7e0bx38[_0x6c07[73]]({attributes:[_0x6c07[68]]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx37= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68])})[_0x6c07[62]](function(){return OpenchannelQueue[_0x6c07[67]](_0x6c07[66])[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx37}}),_0x7e0bx39))})}};var getAgentsIdByUser=function(_0x7e0bx2d){return function(_0x7e0bx36){var _0x7e0bx41=[];var _0x7e0bx38=_0x7e0bx36;var _0x7e0bx30=_0x7e0bx2d|| {};var _0x7e0bx42=[],_0x7e0bx43=[],_0x7e0bx44=[],_0x7e0bx45=[],_0x7e0bx46=[],_0x7e0bx47=[];return _0x7e0bx38[_0x6c07[65]]({attributes:[_0x6c07[63]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx42= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[63]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return _0x7e0bx38[_0x6c07[69]]({attributes:[_0x6c07[68]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx43= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return _0x7e0bx38[_0x6c07[70]]({attributes:[_0x6c07[68]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx44= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return _0x7e0bx38[_0x6c07[72]]({attributes:[_0x6c07[68]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx45= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return _0x7e0bx38[_0x6c07[71]]({attributes:[_0x6c07[68]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx47= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return _0x7e0bx38[_0x6c07[73]]({attributes:[_0x6c07[68]],include:[{raw:true,model:User,attributes:[_0x6c07[68]]}]})})[_0x6c07[62]](function(_0x7e0bx3a){_0x7e0bx46= _[_0x6c07[64]](_0x7e0bx3a,_0x6c07[68]);_0x7e0bx3a[_0x6c07[29]](function(_0x7e0bx48){_0x7e0bx41= _[_0x6c07[79]](_0x7e0bx41,_[_0x6c07[64]](_0x7e0bx48.Users,_0x6c07[68]))})})[_0x6c07[62]](function(){return User[_0x6c07[67]](_0x6c07[74],{method:[_0x6c07[75],_0x7e0bx30]},{method:[_0x6c07[76],_0x7e0bx30]},{method:[_0x6c07[77],_0x7e0bx30]},{method:[_0x6c07[78],_0x7e0bx30]})[_0x6c07[61]](_[_0x6c07[60]](getQuery(_0x7e0bx30,{id:{$in:_0x7e0bx41}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x7e0bx42}},required:false},{model:ChatQueue,where:{id:{$in:_0x7e0bx43}},required:false},{model:MailQueue,where:{id:{$in:_0x7e0bx44}},required:false},{model:FaxQueue,where:{id:{$in:_0x7e0bx45}},required:false},{model:SmsQueue,where:{id:{$in:_0x7e0bx47}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0x7e0bx46}},required:false}]}))})}};var stripTrailingSlash=function(_0x7e0bx4a){if(_0x7e0bx4a[_0x6c07[80]](-1) === _0x6c07[81]){return _0x7e0bx4a[_0x6c07[80]](0,_0x7e0bx4a[_0x6c07[82]]- 1)};return _0x7e0bx4a};var join_url=function(){var _0x7e0bx4c= new RegExp(_0x6c07[83],_0x6c07[84]);var _0x7e0bx4d=Array[_0x6c07[87]][_0x6c07[86]][_0x6c07[85]](arguments);return _0x7e0bx4d[_0x6c07[64]](function(_0x7e0bx15){return _0x7e0bx15[_0x6c07[50]](_0x7e0bx4c,_0x6c07[49])})[_0x6c07[88]](_0x6c07[81])};var sendRequest=function(_0x7e0bx4f,_0x7e0bx50,_0x7e0bx51){if(_0x7e0bx50== _0x6c07[89]){return request({method:_0x7e0bx50,uri:_0x7e0bx51,qs:_0x7e0bx4f,json:true})}else {if(_0x7e0bx50== _0x6c07[90]){return request({method:_0x7e0bx50,uri:_0x7e0bx51,body:_0x7e0bx4f,json:true})}else {logger[_0x6c07[92]](_0x6c07[91])}}};var execAction=function(_0x7e0bx53,_0x7e0bx4f){switch(_0x7e0bx53[_0x6c07[98]]){case _0x6c07[102]:Action[_0x6c07[101]]({name:_0x7e0bx53[_0x6c07[98]],data4:_0x7e0bx53[_0x6c07[57]]|| _0x6c07[99]},{body:{name:_0x7e0bx53[_0x6c07[98]],agent:_0x7e0bx4f[_0x6c07[100]],type:_0x7e0bx53[_0x6c07[57]]|| _0x6c07[99]}})[_0x6c07[62]](function(){logger[_0x6c07[97]](_0x6c07[96])})[_0x6c07[95]](function(_0x7e0bx54){logger[_0x6c07[92]](_0x6c07[93],_0x7e0bx54[_0x6c07[94]])});break;default:logger[_0x6c07[92]](_0x6c07[103])}};var getFilesizeInBytes=function(_0x7e0bx56){try{var _0x7e0bx57=fs[_0x6c07[104]](_0x7e0bx56);var _0x7e0bx58=_0x7e0bx57[_0x6c07[105]];return _0x7e0bx58}catch(err){return 0}};module[_0x6c07[106]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getSmsQueuesIdByUser:getSmsQueuesIdByUser,getOpenchannelQueuesIdByUser:getOpenchannelQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,join_url:join_url,splitInterval:splitInterval,isValidInterval:isIntervalValid,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0x6c07[107]),getFileSize:getFilesizeInBytes}
\ No newline at end of file