Built motion from commit 420f8c692.|1.0.30
[motion.git] / server / config / util / index.js
index f2720eb..9827d2d 100644 (file)
@@ -1 +1 @@
-var _0xdfee=["\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","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\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"];_0xdfee[0];var _=require(_0xdfee[1]);var moment=require(_0xdfee[2]);var request=require(_0xdfee[3]);var User=require(_0xdfee[5])[_0xdfee[4]];var VoiceQueue=require(_0xdfee[5])[_0xdfee[6]];var ChatQueue=require(_0xdfee[5])[_0xdfee[7]];var MailQueue=require(_0xdfee[5])[_0xdfee[8]];var FaxQueue=require(_0xdfee[5])[_0xdfee[9]];var SmsQueue=require(_0xdfee[5])[_0xdfee[10]];var OpenchannelQueue=require(_0xdfee[5])[_0xdfee[11]];var Action=require(_0xdfee[5])[_0xdfee[12]];var checkInterval=function(_0xb615xd){var _0xb615xe=[_0xdfee[13],_0xdfee[14],_0xdfee[15],_0xdfee[16],_0xdfee[17],_0xdfee[18],_0xdfee[19]];var _0xb615xf=[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 _0xb615x10=[_0xdfee[20],_0xdfee[21],_0xdfee[22],_0xdfee[23],_0xdfee[24],_0xdfee[25],_0xdfee[26],_0xdfee[27],_0xdfee[28],_0xdfee[29],_0xdfee[30],_0xdfee[31]];var _0xb615x11,_0xb615x12;var _0xb615x13=_0xb615xd[_0xdfee[33]](_0xdfee[32])[0];var _0xb615x14=_0xb615xd[_0xdfee[33]](_0xdfee[32])[1];var _0xb615x15=_0xb615xd[_0xdfee[33]](_0xdfee[32])[2];var _0xb615x16=_0xb615xd[_0xdfee[33]](_0xdfee[32])[3];if(_0xb615x13!== _0xdfee[34]){var _0xb615x17=moment()[_0xdfee[36]](_0xdfee[35]);var _0xb615x18=_0xb615x13[_0xdfee[33]](_0xdfee[37])[0];var _0xb615x19=_0xb615x13[_0xdfee[33]](_0xdfee[37])[1];if((_0xb615x17< _0xb615x18)|| (_0xb615x17> _0xb615x19)){console[_0xdfee[39]](_0xdfee[38]);return false}};if(_0xb615x14!== _0xdfee[34]){var _0xb615x1a=_0xb615xe[moment()[_0xdfee[40]]()];var _0xb615x1b=_[_0xdfee[41]](_0xb615xe,_0xb615x14[_0xdfee[33]](_0xdfee[37])[0]);var _0xb615x1c=_[_0xdfee[41]](_0xb615xe,_0xb615x14[_0xdfee[33]](_0xdfee[37])[1]);for(_0xb615x11= 0;_0xb615x11< _0xb615x1b;_0xb615x11++){_0xb615x12= _0xb615xe[_0xdfee[42]]();_0xb615xe[_0xdfee[43]](_0xb615x12)};_0xb615x1b= _[_0xdfee[41]](_0xb615xe,_0xb615x14[_0xdfee[33]](_0xdfee[37])[0]);_0xb615x1c= _[_0xdfee[41]](_0xb615xe,_0xb615x14[_0xdfee[33]](_0xdfee[37])[1])+ 1;_0xb615xe= _0xb615xe[_0xdfee[44]](_0xb615x1b,_0xb615x1c);if(!_[_0xdfee[45]](_0xb615xe,_0xb615x1a)){console[_0xdfee[39]](_0xdfee[46]);return false}};if(_0xb615x15!== _0xdfee[34]){var _0xb615x1d=moment()[_0xdfee[47]]();var _0xb615x1e=_[_0xdfee[41]](_0xb615xf,parseInt(_0xb615x15[_0xdfee[33]](_0xdfee[37])[0],10));var _0xb615x1f=_[_0xdfee[41]](_0xb615xf,parseInt(_0xb615x15[_0xdfee[33]](_0xdfee[37])[1]));for(_0xb615x11= 0;_0xb615x11< _0xb615x1e;_0xb615x11++){_0xb615x12= _0xb615xf[_0xdfee[42]]();_0xb615xf[_0xdfee[43]](_0xb615x12)};_0xb615x1e= _[_0xdfee[41]](_0xb615xf,parseInt(_0xb615x15[_0xdfee[33]](_0xdfee[37])[0],10));_0xb615x1f= _[_0xdfee[41]](_0xb615xf,parseInt(_0xb615x15[_0xdfee[33]](_0xdfee[37])[1]),10)+ 1;_0xb615xf= _0xb615xf[_0xdfee[44]](_0xb615x1e,_0xb615x1f);if(!_[_0xdfee[45]](_0xb615xf,_0xb615x1d)){console[_0xdfee[39]](_0xdfee[48]);return false}};if(_0xb615x16!== _0xdfee[34]){var _0xb615x20=_0xb615x10[moment()[_0xdfee[49]]()];var _0xb615x21=_[_0xdfee[41]](_0xb615x10,_0xb615x16[_0xdfee[33]](_0xdfee[37])[0]);var _0xb615x22=_[_0xdfee[41]](_0xb615x10,_0xb615x16[_0xdfee[33]](_0xdfee[37])[1]);for(_0xb615x11= 0;_0xb615x11< _0xb615x21;_0xb615x11++){_0xb615x12= _0xb615x10[_0xdfee[42]]();_0xb615x10[_0xdfee[43]](_0xb615x12)};_0xb615x21= _[_0xdfee[41]](_0xb615x10,_0xb615x16[_0xdfee[33]](_0xdfee[37])[0]);_0xb615x22= _[_0xdfee[41]](_0xb615x10,_0xb615x16[_0xdfee[33]](_0xdfee[37])[1])+ 1;_0xb615x10= _0xb615x10[_0xdfee[44]](_0xb615x21,_0xb615x22);if(!_[_0xdfee[45]](_0xb615x10,_0xb615x20)){console[_0xdfee[39]](_0xdfee[50]);return false}};console[_0xdfee[39]](_0xdfee[51]);return true};var isValidInterval=function(_0xb615xd){if(_[_0xdfee[52]](_0xb615xd)){for(var _0xb615x11=0;_0xb615x11< _0xb615xd[_0xdfee[54]][_0xdfee[53]];_0xb615x11++){if(!checkInterval(_0xb615xd[_0xdfee[54]][_0xb615x11][_0xdfee[55]])){return false}};return true}else {return checkInterval(_0xb615xd)}};var getDate=function(_0xb615x25,_0xb615x26){var _0xb615x27=_0xdfee[56];if(moment(_0xb615x25,_0xb615x27,true)[_0xdfee[57]]()){return moment(_0xb615x25)}else {switch(_0xb615x26){case _0xdfee[59]:return moment(_0xb615x25)[_0xdfee[58]](_0xdfee[40]);case _0xdfee[61]:return moment(_0xb615x25)[_0xdfee[60]](_0xdfee[40]);default:return moment(_0xb615x25)}}};var getQuery=function(_0xb615x29,_0xb615x2a){var _0xb615x2b={where:{}};if(_0xb615x29){var _0xb615x2c,_0xb615x2d={};for(var _0xb615x2e in _0xb615x29){if(_[_0xdfee[45]](_0xb615x2e,_0xdfee[62])){_0xb615x2c= _0xb615x2e[_0xdfee[64]](_0xdfee[62],_0xdfee[63]);if(_0xb615x29[_0xb615x2c+ _0xdfee[65]]){_0xb615x2b[_0xdfee[67]][_0xdfee[66]]= _0xb615x2b[_0xdfee[67]][_0xdfee[66]]|| [];_0xb615x2d= {};_0xb615x2d[_0xb615x2c]= {$gte:getDate(_0xb615x29[_0xb615x2e],_0xdfee[59])};_0xb615x2b[_0xdfee[67]][_0xdfee[66]][_0xdfee[43]](_0xb615x2d);_0xb615x2d= {};_0xb615x2d[_0xb615x2c]= {$lte:getDate(_0xb615x29[_0xb615x2c+ _0xdfee[65]],_0xdfee[61])};_0xb615x2b[_0xdfee[67]][_0xdfee[66]][_0xdfee[43]](_0xb615x2d);delete _0xb615x29[_0xb615x2c+ _0xdfee[65]]}else {_0xb615x2b[_0xdfee[67]][_0xb615x2e[_0xdfee[64]](_0xdfee[62],_0xdfee[63])]= {$gte:getDate(_0xb615x29[_0xb615x2e],_0xdfee[59])}};delete _0xb615x29[_0xb615x2e]}else {if(_[_0xdfee[45]](_0xb615x2e,_0xdfee[65])){_0xb615x2c= _0xb615x2e[_0xdfee[64]](_0xdfee[65],_0xdfee[63]);if(_0xb615x29[_0xb615x2c+ _0xdfee[62]]){_0xb615x2b[_0xdfee[67]][_0xdfee[66]]= _0xb615x2b[_0xdfee[67]][_0xdfee[66]]|| [];_0xb615x2d= {};_0xb615x2d[_0xb615x2c]= {$lte:getDate(_0xb615x29[_0xb615x2e],_0xdfee[61])};_0xb615x2b[_0xdfee[67]][_0xdfee[66]][_0xdfee[43]](_0xb615x2d);_0xb615x2d[_0xb615x2c]= {$gte:getDate(_0xb615x29[_0xb615x2c+ _0xdfee[62]],_0xdfee[59])};_0xb615x2b[_0xdfee[67]][_0xdfee[66]][_0xdfee[43]](_0xb615x2d);delete _0xb615x29[_0xb615x2c+ _0xdfee[62]]}else {_0xb615x2b[_0xdfee[67]][_0xb615x2e[_0xdfee[64]](_0xdfee[65],_0xdfee[63])]= {$lte:getDate(_0xb615x29[_0xb615x2e],_0xdfee[61])}};delete _0xb615x29[_0xb615x2e]}}};_[_0xdfee[74]](_0xb615x29,function(_0xb615x2f,_0xb615x2e){switch(_0xb615x2e){case _0xdfee[68]:;case _0xdfee[69]:_0xb615x2b[_0xb615x2e]= Number(_0xb615x2f);break;case _0xdfee[70]:_0xb615x2b[_0xb615x2e]= _0xb615x2f;break;case _0xdfee[71]:;case _0xdfee[72]:_0xb615x2b[_0xdfee[67]][_0xb615x2e]= _0xb615x2f;break;default:_0xb615x2b[_0xdfee[67]][_0xb615x2e]= {$like:_0xdfee[73]+ _0xb615x2f+ _0xdfee[73]}}})};if(_0xb615x2a){_[_0xdfee[75]](_0xb615x2b[_0xdfee[67]],_0xb615x2a)};return _0xb615x2b};var getVoiceQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_0xb615x31|| {};return _0xb615x34[_0xdfee[80]]({attributes:[_0xdfee[78]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[78])})[_0xdfee[77]](function(){return VoiceQueue[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x29,{name:{$in:_0xb615x33}}),_0xb615x35))})}};var getChatQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_[_0xdfee[75]](_0xb615x31|| {},{distinct:true});return _0xb615x34[_0xdfee[84]]({attributes:[_0xdfee[83]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[83])})[_0xdfee[77]](function(){return ChatQueue[_0xdfee[82]](_0xdfee[81])[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x33}}),_0xb615x35))})}};var getMailQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_[_0xdfee[75]](_0xb615x31|| {},{distinct:true});return _0xb615x34[_0xdfee[85]]({attributes:[_0xdfee[83]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[83])})[_0xdfee[77]](function(){return MailQueue[_0xdfee[82]](_0xdfee[81])[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x33}}),_0xb615x35))})}};var getSmsQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_[_0xdfee[75]](_0xb615x31|| {},{distinct:true});return _0xb615x34[_0xdfee[86]]({attributes:[_0xdfee[83]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[83])})[_0xdfee[77]](function(){return SmsQueue[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x33}}),_0xb615x35))})}};var getFaxQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_0xb615x31|| {};return _0xb615x34[_0xdfee[87]]({attributes:[_0xdfee[83]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[83])})[_0xdfee[77]](function(){return FaxQueue[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x33}}),_0xb615x35))})}};var getOpenchannelQueuesIdByUser=function(_0xb615x29,_0xb615x31){return function(_0xb615x32){var _0xb615x33=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x35=_[_0xdfee[75]](_0xb615x31|| {},{distinct:true});return _0xb615x34[_0xdfee[88]]({attributes:[_0xdfee[83]]})[_0xdfee[77]](function(_0xb615x36){_0xb615x33= _[_0xdfee[79]](_0xb615x36,_0xdfee[83])})[_0xdfee[77]](function(){return OpenchannelQueue[_0xdfee[82]](_0xdfee[81])[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x33}}),_0xb615x35))})}};var getAgentsIdByUser=function(_0xb615x29){return function(_0xb615x32){var _0xb615x3d=[];var _0xb615x34=_0xb615x32;var _0xb615x2b=_0xb615x29|| {};var _0xb615x3e=[],_0xb615x3f=[],_0xb615x40=[],_0xb615x41=[],_0xb615x42=[],_0xb615x43=[];return _0xb615x34[_0xdfee[80]]({attributes:[_0xdfee[78]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})[_0xdfee[77]](function(_0xb615x36){_0xb615x3e= _[_0xdfee[79]](_0xb615x36,_0xdfee[78]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return _0xb615x34[_0xdfee[84]]({attributes:[_0xdfee[83]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})})[_0xdfee[77]](function(_0xb615x36){_0xb615x3f= _[_0xdfee[79]](_0xb615x36,_0xdfee[83]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return _0xb615x34[_0xdfee[85]]({attributes:[_0xdfee[83]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})})[_0xdfee[77]](function(_0xb615x36){_0xb615x40= _[_0xdfee[79]](_0xb615x36,_0xdfee[83]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return _0xb615x34[_0xdfee[87]]({attributes:[_0xdfee[83]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})})[_0xdfee[77]](function(_0xb615x36){_0xb615x41= _[_0xdfee[79]](_0xb615x36,_0xdfee[83]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return _0xb615x34[_0xdfee[86]]({attributes:[_0xdfee[83]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})})[_0xdfee[77]](function(_0xb615x36){_0xb615x43= _[_0xdfee[79]](_0xb615x36,_0xdfee[83]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return _0xb615x34[_0xdfee[88]]({attributes:[_0xdfee[83]],include:[{raw:true,model:User,attributes:[_0xdfee[83]]}]})})[_0xdfee[77]](function(_0xb615x36){_0xb615x42= _[_0xdfee[79]](_0xb615x36,_0xdfee[83]);_0xb615x36[_0xdfee[74]](function(_0xb615x44){_0xb615x3d= _[_0xdfee[94]](_0xb615x3d,_[_0xdfee[79]](_0xb615x44.Users,_0xdfee[83]))})})[_0xdfee[77]](function(){return User[_0xdfee[82]](_0xdfee[89],{method:[_0xdfee[90],_0xb615x2b]},{method:[_0xdfee[91],_0xb615x2b]},{method:[_0xdfee[92],_0xb615x2b]},{method:[_0xdfee[93],_0xb615x2b]})[_0xdfee[76]](_[_0xdfee[75]](getQuery(_0xb615x2b,{id:{$in:_0xb615x3d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xb615x3e}},required:false},{model:ChatQueue,where:{id:{$in:_0xb615x3f}},required:false},{model:MailQueue,where:{id:{$in:_0xb615x40}},required:false},{model:FaxQueue,where:{id:{$in:_0xb615x41}},required:false},{model:SmsQueue,where:{id:{$in:_0xb615x43}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0xb615x42}},required:false}]}))})}};var stripTrailingSlash=function(_0xb615x46){if(_0xb615x46[_0xdfee[95]](-1) === _0xdfee[96]){return _0xb615x46[_0xdfee[95]](0,_0xb615x46[_0xdfee[53]]- 1)};return _0xb615x46};var sendRequest=function(_0xb615x48,_0xb615x49,_0xb615x4a){if(_0xb615x49== _0xdfee[97]|| _0xb615x49== _0xdfee[98]){var _0xb615x4b={method:_0xb615x49,uri:_0xb615x4a,body:_0xb615x48,json:true};return request(_0xb615x4b)}else {console[_0xdfee[39]](_0xdfee[99])}};var execAction=function(_0xb615x4d,_0xb615x48){switch(_0xb615x4d[_0xdfee[103]]){case _0xdfee[107]:Action[_0xdfee[106]]({name:_0xb615x4d[_0xdfee[103]],data4:_0xb615x4d[_0xdfee[71]]|| _0xdfee[104]},{body:{name:_0xb615x4d[_0xdfee[103]],agent:_0xb615x48[_0xdfee[105]],type:_0xb615x4d[_0xdfee[71]]|| _0xdfee[104]}})[_0xdfee[77]](function(){console[_0xdfee[39]](_0xdfee[102])})[_0xdfee[101]](function(_0xb615x4e){console[_0xdfee[39]](_0xdfee[100],_0xb615x4e)});break;default:console[_0xdfee[39]](_0xdfee[108])}};module[_0xdfee[109]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getOpenchannelQueuesIdByUser:getOpenchannelQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0xdfee[110])}
\ No newline at end of file
+var _0xac58=["\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"];_0xac58[0];var _=require(_0xac58[1]);var moment=require(_0xac58[2]);var request=require(_0xac58[3]);var fs=require(_0xac58[4]);var logger=require(_0xac58[6])(_0xac58[5]);var User=require(_0xac58[8])[_0xac58[7]];var VoiceQueue=require(_0xac58[8])[_0xac58[9]];var ChatQueue=require(_0xac58[8])[_0xac58[10]];var MailQueue=require(_0xac58[8])[_0xac58[11]];var FaxQueue=require(_0xac58[8])[_0xac58[12]];var SmsQueue=require(_0xac58[8])[_0xac58[13]];var OpenchannelQueue=require(_0xac58[8])[_0xac58[14]];var Action=require(_0xac58[8])[_0xac58[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(_0xd0fdx11){var _0xd0fdx12={};var _0xd0fdx13=_0xd0fdx11[_0xac58[17]](_0xac58[16]);var _0xd0fdx14;_0xd0fdx13[_0xac58[29]](function(_0xd0fdx15,_0xd0fdx16){switch(_0xd0fdx16){case 0:if(_0xd0fdx15!== _0xac58[18]){_0xd0fdx14= _0xd0fdx15[_0xac58[17]](_0xac58[19]);_0xd0fdx12[_0xac58[20]]= moment(_0xd0fdx14[0],_0xac58[21]);_0xd0fdx12[_0xac58[22]]= moment(_0xd0fdx14[1],_0xac58[21])}else {_0xd0fdx12[_0xac58[20]]= null;_0xd0fdx12[_0xac58[22]]= null};break;case 1:if(_0xd0fdx15!== _0xac58[18]){_0xd0fdx14= _0xd0fdx15[_0xac58[17]](_0xac58[19]);_0xd0fdx12[_0xac58[23]]= Number(weekDaysCollection[_0xd0fdx14[0]]);_0xd0fdx12[_0xac58[24]]= _0xd0fdx14[1]?Number(weekDaysCollection[_0xd0fdx14[1]]):null}else {_0xd0fdx12[_0xac58[23]]= null;_0xd0fdx12[_0xac58[24]]= null};break;case 2:if(_0xd0fdx15!== _0xac58[18]){_0xd0fdx14= _0xd0fdx15[_0xac58[17]](_0xac58[19]);_0xd0fdx12[_0xac58[25]]= Number(_0xd0fdx14[0]);_0xd0fdx12[_0xac58[26]]= _0xd0fdx14[1]?Number(_0xd0fdx14[1]):null}else {_0xd0fdx12[_0xac58[25]]= null;_0xd0fdx12[_0xac58[26]]= null};break;case 3:if(_0xd0fdx15!== _0xac58[18]){_0xd0fdx14= _0xd0fdx15[_0xac58[17]](_0xac58[19]);_0xd0fdx12[_0xac58[27]]= Number(monthsCollection[_0xd0fdx14[0]]);_0xd0fdx12[_0xac58[28]]= _0xd0fdx14[1]?Number(monthsCollection[_0xd0fdx14[1]]):null}else {_0xd0fdx12[_0xac58[27]]= null;_0xd0fdx12[_0xac58[28]]= null};break;default:}});return _0xd0fdx12}function isIntervalValid(_0xd0fdx11){var _0xd0fdx18=moment()[_0xac58[30]](_0xac58[21]);var _0xd0fdx19=moment()[_0xac58[30]](_0xac58[31]);var _0xd0fdx1a=moment()[_0xac58[30]](_0xac58[32]);var _0xd0fdx1b=moment()[_0xac58[30]](_0xac58[33]);var _0xd0fdx1c,_0xd0fdx1d,_0xd0fdx1e,_0xd0fdx1f;var _0xd0fdx20=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xd0fdx21=[1,2,3,4,5,6,7];var _0xd0fdx22=[];for(var _0xd0fdx23=1;_0xd0fdx23<= 31;_0xd0fdx23++){_0xd0fdx22[_0xac58[34]](_0xd0fdx23)};if(_0xd0fdx11[_0xac58[20]]&& _0xd0fdx11[_0xac58[22]]){if(_0xd0fdx11[_0xac58[22]][_0xac58[35]](_0xd0fdx11[_0xac58[20]])){_0xd0fdx1c= moment(_0xd0fdx18,_0xac58[21])[_0xac58[37]](_0xd0fdx11[_0xac58[20]],_0xd0fdx11[_0xac58[22]],null,_0xac58[36])}else {_0xd0fdx1c=  !moment(_0xd0fdx18,_0xac58[21])[_0xac58[37]](_0xd0fdx11[_0xac58[22]],_0xd0fdx11[_0xac58[20]],null,_0xac58[36])}}else {_0xd0fdx1c= true};if(_0xd0fdx11[_0xac58[23]]){if(_0xd0fdx11[_0xac58[24]]&& _0xd0fdx11[_0xac58[24]]!== _0xd0fdx11[_0xac58[23]]){var _0xd0fdx24=_[_0xac58[38]](_0xd0fdx21,function(_0xd0fdx25){if(_0xd0fdx11[_0xac58[23]]< _0xd0fdx11[_0xac58[24]]){return (_0xd0fdx25>= _0xd0fdx11[_0xac58[23]])&& (_0xd0fdx25<= _0xd0fdx11[_0xac58[24]])}else {return (1<= _0xd0fdx25&& _0xd0fdx25<= _0xd0fdx11[_0xac58[24]])|| (_0xd0fdx11[_0xac58[23]]<= _0xd0fdx25&& _0xd0fdx25<= 7)}});_0xd0fdx1d= (_0xd0fdx24[_0xac58[39]](parseInt(_0xd0fdx19))!==  -1)?true:false}else {_0xd0fdx1d= (parseInt(_0xd0fdx19)=== _0xd0fdx11[_0xac58[23]])?true:false}}else {_0xd0fdx1d= true};if(_0xd0fdx11[_0xac58[25]]){if(_0xd0fdx11[_0xac58[26]]&& _0xd0fdx11[_0xac58[26]]!== _0xd0fdx11[_0xac58[25]]){var _0xd0fdx26=_[_0xac58[38]](_0xd0fdx22,function(_0xd0fdx25){if(_0xd0fdx11[_0xac58[25]]< _0xd0fdx11[_0xac58[26]]){return (_0xd0fdx25>= _0xd0fdx11[_0xac58[25]])&& (_0xd0fdx25<= _0xd0fdx11[_0xac58[26]])}else {return (1<= _0xd0fdx25&& _0xd0fdx25<= _0xd0fdx11[_0xac58[26]])|| (_0xd0fdx11[_0xac58[25]]<= _0xd0fdx25&& _0xd0fdx25<= 7)}});_0xd0fdx1e= (_0xd0fdx26[_0xac58[39]](parseInt(_0xd0fdx1a))!==  -1)?true:false}else {_0xd0fdx1e= (parseInt(_0xd0fdx1a)=== _0xd0fdx11[_0xac58[25]])?true:false}}else {_0xd0fdx1e= true};if(_0xd0fdx11[_0xac58[27]]){if(_0xd0fdx11[_0xac58[28]]&& _0xd0fdx11[_0xac58[28]]!== _0xd0fdx11[_0xac58[27]]){var _0xd0fdx27=_[_0xac58[38]](_0xd0fdx20,function(_0xd0fdx25){if(_0xd0fdx11[_0xac58[27]]< _0xd0fdx11[_0xac58[28]]){return (_0xd0fdx25>= _0xd0fdx11[_0xac58[27]])&& (_0xd0fdx25<= _0xd0fdx11[_0xac58[28]])}else {return (1<= _0xd0fdx25&& _0xd0fdx25<= _0xd0fdx11[_0xac58[28]])|| (_0xd0fdx11[_0xac58[27]]<= _0xd0fdx25&& _0xd0fdx25<= 7)}});_0xd0fdx1f= (_0xd0fdx27[_0xac58[39]](parseInt(_0xd0fdx1b))!==  -1)?true:false}else {_0xd0fdx1f= (parseInt(_0xd0fdx1b)=== _0xd0fdx11[_0xac58[27]])?true:false}}else {_0xd0fdx1f= true};return _0xd0fdx1c&& _0xd0fdx1d&& _0xd0fdx1e&& _0xd0fdx1f}var getDate=function(_0xd0fdx29,_0xd0fdx2a){var _0xd0fdx2b=_0xac58[40];if(moment(_0xd0fdx29,_0xd0fdx2b,true)[_0xac58[41]]()){return moment(_0xd0fdx29)}else {switch(_0xd0fdx2a){case _0xac58[44]:return moment(_0xd0fdx29)[_0xac58[43]](_0xac58[42]);case _0xac58[46]:return moment(_0xd0fdx29)[_0xac58[45]](_0xac58[42]);default:return moment(_0xd0fdx29)}}};var getQuery=function(_0xd0fdx2d,_0xd0fdx2e,_0xd0fdx2f){var _0xd0fdx30={where:{}};if(_0xd0fdx2d){var _0xd0fdx31,_0xd0fdx32={};for(var _0xd0fdx33 in _0xd0fdx2d){if(_[_0xac58[48]](_0xd0fdx33,_0xac58[47])){_0xd0fdx31= _0xd0fdx33[_0xac58[50]](_0xac58[47],_0xac58[49]);if(_0xd0fdx2d[_0xd0fdx31+ _0xac58[51]]){_0xd0fdx30[_0xac58[53]][_0xac58[52]]= _0xd0fdx30[_0xac58[53]][_0xac58[52]]|| [];_0xd0fdx32= {};_0xd0fdx32[_0xd0fdx31]= {$gte:getDate(_0xd0fdx2d[_0xd0fdx33],_0xac58[44])};_0xd0fdx30[_0xac58[53]][_0xac58[52]][_0xac58[34]](_0xd0fdx32);_0xd0fdx32= {};_0xd0fdx32[_0xd0fdx31]= {$lte:getDate(_0xd0fdx2d[_0xd0fdx31+ _0xac58[51]],_0xac58[46])};_0xd0fdx30[_0xac58[53]][_0xac58[52]][_0xac58[34]](_0xd0fdx32);delete _0xd0fdx2d[_0xd0fdx31+ _0xac58[51]]}else {_0xd0fdx30[_0xac58[53]][_0xd0fdx33[_0xac58[50]](_0xac58[47],_0xac58[49])]= {$gte:getDate(_0xd0fdx2d[_0xd0fdx33],_0xac58[44])}};delete _0xd0fdx2d[_0xd0fdx33]}else {if(_[_0xac58[48]](_0xd0fdx33,_0xac58[51])){_0xd0fdx31= _0xd0fdx33[_0xac58[50]](_0xac58[51],_0xac58[49]);if(_0xd0fdx2d[_0xd0fdx31+ _0xac58[47]]){_0xd0fdx30[_0xac58[53]][_0xac58[52]]= _0xd0fdx30[_0xac58[53]][_0xac58[52]]|| [];_0xd0fdx32= {};_0xd0fdx32[_0xd0fdx31]= {$lte:getDate(_0xd0fdx2d[_0xd0fdx33],_0xac58[46])};_0xd0fdx30[_0xac58[53]][_0xac58[52]][_0xac58[34]](_0xd0fdx32);_0xd0fdx32[_0xd0fdx31]= {$gte:getDate(_0xd0fdx2d[_0xd0fdx31+ _0xac58[47]],_0xac58[44])};_0xd0fdx30[_0xac58[53]][_0xac58[52]][_0xac58[34]](_0xd0fdx32);delete _0xd0fdx2d[_0xd0fdx31+ _0xac58[47]]}else {_0xd0fdx30[_0xac58[53]][_0xd0fdx33[_0xac58[50]](_0xac58[51],_0xac58[49])]= {$lte:getDate(_0xd0fdx2d[_0xd0fdx33],_0xac58[46])}};delete _0xd0fdx2d[_0xd0fdx33]}}};_[_0xac58[29]](_0xd0fdx2d,function(_0xd0fdx34,_0xd0fdx33){switch(_0xd0fdx33){case _0xac58[54]:;case _0xac58[55]:_0xd0fdx30[_0xd0fdx33]= Number(_0xd0fdx34);break;case _0xac58[56]:_0xd0fdx30[_0xd0fdx33]= _0xd0fdx34;break;case _0xac58[57]:;case _0xac58[58]:_0xd0fdx30[_0xac58[53]][_0xd0fdx33]= _0xd0fdx34;break;default:_0xd0fdx30[_0xac58[53]][_0xd0fdx33]= {$like:_0xac58[59]+ _0xd0fdx34+ _0xac58[59]}}})};if(_0xd0fdx2e){_[_0xac58[60]](_0xd0fdx30[_0xac58[53]],_0xd0fdx2e)};if(_0xd0fdx2f){_[_0xac58[60]](_0xd0fdx30,_0xd0fdx2f)};return _0xd0fdx30};var getVoiceQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_0xd0fdx2f|| {};return _0xd0fdx38[_0xac58[65]]({attributes:[_0xac58[63]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[63])})[_0xac58[62]](function(){return VoiceQueue[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx2d,{name:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getChatQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_[_0xac58[60]](_0xd0fdx2f|| {},{distinct:true});return _0xd0fdx38[_0xac58[69]]({attributes:[_0xac58[68]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68])})[_0xac58[62]](function(){return ChatQueue[_0xac58[67]](_0xac58[66])[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getMailQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_[_0xac58[60]](_0xd0fdx2f|| {},{distinct:true});return _0xd0fdx38[_0xac58[70]]({attributes:[_0xac58[68]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68])})[_0xac58[62]](function(){return MailQueue[_0xac58[67]](_0xac58[66])[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getSmsQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_[_0xac58[60]](_0xd0fdx2f|| {},{distinct:true});return _0xd0fdx38[_0xac58[71]]({attributes:[_0xac58[68]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68])})[_0xac58[62]](function(){return SmsQueue[_0xac58[67]](_0xac58[66])[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getFaxQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_[_0xac58[60]](_0xd0fdx2f|| {},{distinct:true});return _0xd0fdx38[_0xac58[72]]({attributes:[_0xac58[68]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68])})[_0xac58[62]](function(){return FaxQueue[_0xac58[67]](_0xac58[66])[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getOpenchannelQueuesIdByUser=function(_0xd0fdx2d,_0xd0fdx2f){return function(_0xd0fdx36){var _0xd0fdx37=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx39=_[_0xac58[60]](_0xd0fdx2f|| {},{distinct:true});return _0xd0fdx38[_0xac58[73]]({attributes:[_0xac58[68]]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx37= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68])})[_0xac58[62]](function(){return OpenchannelQueue[_0xac58[67]](_0xac58[66])[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx37}}),_0xd0fdx39))})}};var getAgentsIdByUser=function(_0xd0fdx2d){return function(_0xd0fdx36){var _0xd0fdx41=[];var _0xd0fdx38=_0xd0fdx36;var _0xd0fdx30=_0xd0fdx2d|| {};var _0xd0fdx42=[],_0xd0fdx43=[],_0xd0fdx44=[],_0xd0fdx45=[],_0xd0fdx46=[],_0xd0fdx47=[];return _0xd0fdx38[_0xac58[65]]({attributes:[_0xac58[63]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx42= _[_0xac58[64]](_0xd0fdx3a,_0xac58[63]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return _0xd0fdx38[_0xac58[69]]({attributes:[_0xac58[68]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx43= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return _0xd0fdx38[_0xac58[70]]({attributes:[_0xac58[68]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx44= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return _0xd0fdx38[_0xac58[72]]({attributes:[_0xac58[68]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx45= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return _0xd0fdx38[_0xac58[71]]({attributes:[_0xac58[68]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx47= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return _0xd0fdx38[_0xac58[73]]({attributes:[_0xac58[68]],include:[{raw:true,model:User,attributes:[_0xac58[68]]}]})})[_0xac58[62]](function(_0xd0fdx3a){_0xd0fdx46= _[_0xac58[64]](_0xd0fdx3a,_0xac58[68]);_0xd0fdx3a[_0xac58[29]](function(_0xd0fdx48){_0xd0fdx41= _[_0xac58[79]](_0xd0fdx41,_[_0xac58[64]](_0xd0fdx48.Users,_0xac58[68]))})})[_0xac58[62]](function(){return User[_0xac58[67]](_0xac58[74],{method:[_0xac58[75],_0xd0fdx30]},{method:[_0xac58[76],_0xd0fdx30]},{method:[_0xac58[77],_0xd0fdx30]},{method:[_0xac58[78],_0xd0fdx30]})[_0xac58[61]](_[_0xac58[60]](getQuery(_0xd0fdx30,{id:{$in:_0xd0fdx41}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xd0fdx42}},required:false},{model:ChatQueue,where:{id:{$in:_0xd0fdx43}},required:false},{model:MailQueue,where:{id:{$in:_0xd0fdx44}},required:false},{model:FaxQueue,where:{id:{$in:_0xd0fdx45}},required:false},{model:SmsQueue,where:{id:{$in:_0xd0fdx47}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0xd0fdx46}},required:false}]}))})}};var stripTrailingSlash=function(_0xd0fdx4a){if(_0xd0fdx4a[_0xac58[80]](-1) === _0xac58[81]){return _0xd0fdx4a[_0xac58[80]](0,_0xd0fdx4a[_0xac58[82]]- 1)};return _0xd0fdx4a};var join_url=function(){var _0xd0fdx4c= new RegExp(_0xac58[83],_0xac58[84]);var _0xd0fdx4d=Array[_0xac58[87]][_0xac58[86]][_0xac58[85]](arguments);return _0xd0fdx4d[_0xac58[64]](function(_0xd0fdx15){return _0xd0fdx15[_0xac58[50]](_0xd0fdx4c,_0xac58[49])})[_0xac58[88]](_0xac58[81])};var sendRequest=function(_0xd0fdx4f,_0xd0fdx50,_0xd0fdx51){if(_0xd0fdx50== _0xac58[89]){return request({method:_0xd0fdx50,uri:_0xd0fdx51,qs:_0xd0fdx4f,json:true})}else {if(_0xd0fdx50== _0xac58[90]){return request({method:_0xd0fdx50,uri:_0xd0fdx51,body:_0xd0fdx4f,json:true})}else {logger[_0xac58[92]](_0xac58[91])}}};var execAction=function(_0xd0fdx53,_0xd0fdx4f){switch(_0xd0fdx53[_0xac58[98]]){case _0xac58[102]:Action[_0xac58[101]]({name:_0xd0fdx53[_0xac58[98]],data4:_0xd0fdx53[_0xac58[57]]|| _0xac58[99]},{body:{name:_0xd0fdx53[_0xac58[98]],agent:_0xd0fdx4f[_0xac58[100]],type:_0xd0fdx53[_0xac58[57]]|| _0xac58[99]}})[_0xac58[62]](function(){logger[_0xac58[97]](_0xac58[96])})[_0xac58[95]](function(_0xd0fdx54){logger[_0xac58[92]](_0xac58[93],_0xd0fdx54[_0xac58[94]])});break;default:logger[_0xac58[92]](_0xac58[103])}};var getFilesizeInBytes=function(_0xd0fdx56){try{var _0xd0fdx57=fs[_0xac58[104]](_0xd0fdx56);var _0xd0fdx58=_0xd0fdx57[_0xac58[105]];return _0xd0fdx58}catch(err){return 0}};module[_0xac58[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(_0xac58[107]),getFileSize:getFilesizeInBytes}
\ No newline at end of file