097ea10d9c027efc9eb22e32679d3cdb47bb064e
[motion.git] / server / config / tools / dashboard.js
1 var _0x9e4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x55\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x65\x6D\x69\x74","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x4E\x45\x57","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67"];_0x9e4d[0];var sequelize=require(_0x9e4d[2])[_0x9e4d[1]];var models=require(_0x9e4d[2]);var Util=require(_0x9e4d[3]);var _=require(_0x9e4d[4]);var moment=require(_0x9e4d[5]);var Promise=require(_0x9e4d[6]);exports[_0x9e4d[7]]= function(_0xba75x7){models[_0x9e4d[9]][_0x9e4d[8]](function(_0xba75x8){_0xba75x9(_0xba75x8)});models[_0x9e4d[9]][_0x9e4d[10]](function(_0xba75x8){_0xba75x9(_0xba75x8)});models[_0x9e4d[11]][_0x9e4d[8]](function(_0xba75x8){_0xba75x9(_0xba75x8)});models[_0x9e4d[11]][_0x9e4d[10]](function(_0xba75x8){_0xba75x9(_0xba75x8)});function _0xba75x9(_0xba75x8){onNewMail(_0xba75x7,_0xba75x8);onOpenMail(_0xba75x7,_0xba75x8);onClosedMail(_0xba75x7,_0xba75x8);onTimeoutMail(_0xba75x7,_0xba75x8);onPendingMail(_0xba75x7,_0xba75x8);onWaitingMail(_0xba75x7,_0xba75x8)}models[_0x9e4d[12]][_0x9e4d[8]](function(_0xba75x8){_0xba75xa(_0xba75x8)});models[_0x9e4d[12]][_0x9e4d[10]](function(_0xba75x8){_0xba75xa(_0xba75x8)});models[_0x9e4d[13]][_0x9e4d[8]](function(_0xba75x8){_0xba75xa(_0xba75x8)});models[_0x9e4d[13]][_0x9e4d[10]](function(_0xba75x8){_0xba75xa(_0xba75x8)});function _0xba75xa(_0xba75x8){onNewChat(_0xba75x7,_0xba75x8);onOpenChat(_0xba75x7,_0xba75x8);onClosedChat(_0xba75x7,_0xba75x8);onTimeoutChat(_0xba75x7,_0xba75x8);onAbandonedChat(_0xba75x7,_0xba75x8);onUnmanagedChat(_0xba75x7,_0xba75x8)}models[_0x9e4d[14]][_0x9e4d[8]](function(_0xba75x8){_0xba75xb(_0xba75x8)});models[_0x9e4d[14]][_0x9e4d[10]](function(_0xba75x8){_0xba75xb(_0xba75x8)});models[_0x9e4d[15]][_0x9e4d[8]](function(_0xba75x8){_0xba75xb(_0xba75x8)});models[_0x9e4d[15]][_0x9e4d[10]](function(_0xba75x8){_0xba75xb(_0xba75x8)});function _0xba75xb(_0xba75x8){onNewFax(_0xba75x7,_0xba75x8);onOpenFax(_0xba75x7,_0xba75x8);onClosedFax(_0xba75x7,_0xba75x8);onTimeoutFax(_0xba75x7,_0xba75x8);onPendingFax(_0xba75x7,_0xba75x8);onWaitingFax(_0xba75x7,_0xba75x8)}models[_0x9e4d[16]][_0x9e4d[8]](function(_0xba75x8){_0xba75xc(_0xba75x8)});models[_0x9e4d[16]][_0x9e4d[10]](function(_0xba75x8){_0xba75xc(_0xba75x8)});models[_0x9e4d[17]][_0x9e4d[8]](function(_0xba75x8){_0xba75xc(_0xba75x8)});models[_0x9e4d[17]][_0x9e4d[10]](function(_0xba75x8){_0xba75xc(_0xba75x8)});function _0xba75xc(_0xba75x8){onNewSms(_0xba75x7,_0xba75x8);onOpenSms(_0xba75x7,_0xba75x8);onClosedSms(_0xba75x7,_0xba75x8);onTimeoutSms(_0xba75x7,_0xba75x8);onPendingSms(_0xba75x7,_0xba75x8);onWaitingSms(_0xba75x7,_0xba75x8)}models[_0x9e4d[18]][_0x9e4d[8]](function(_0xba75x8){_0xba75xd(_0xba75x8)});models[_0x9e4d[18]][_0x9e4d[10]](function(_0xba75x8){_0xba75xd(_0xba75x8)});models[_0x9e4d[19]][_0x9e4d[8]](function(_0xba75x8){_0xba75xd(_0xba75x8)});models[_0x9e4d[19]][_0x9e4d[10]](function(_0xba75x8){_0xba75xd(_0xba75x8)});function _0xba75xd(_0xba75x8){onNewOpenchannel(_0xba75x7,_0xba75x8);onOpenOpenchannel(_0xba75x7,_0xba75x8);onClosedOpenchannel(_0xba75x7,_0xba75x8);onTimeoutOpenchannel(_0xba75x7,_0xba75x8);onPendingOpenchannel(_0xba75x7,_0xba75x8);onWaitingOpenchannel(_0xba75x7,_0xba75x8)}};function getMailQueues(_0xba75xf,_0xba75x10){return function(){switch(_0xba75xf[_0x9e4d[36]]){case _0x9e4d[33]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](Util[_0x9e4d[30]]({},{attributes:[_0x9e4d[23]],include:[{raw:true,model:models[_0x9e4d[29]],attributes:[_0x9e4d[23]]}]}))[_0x9e4d[28]](function(_0xba75x11){if(_0xba75x10){return {include:{model:models[_0x9e4d[20]],include:{model:models[_0x9e4d[21]],include:{model:models[_0x9e4d[22]],where:{id:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23])}}}}}}else {var _0xba75x12=[];_0xba75x11[_0x9e4d[27]][_0x9e4d[26]](function(_0xba75x13){_0xba75x12= _[_0x9e4d[25]](_0xba75x12,_[_0x9e4d[24]](_0xba75x13.Users,_0x9e4d[23]))});return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11[_0x9e4d[27]],_0x9e4d[23]),memberid:_0xba75x12}}}}});case _0x9e4d[35]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](function(_0xba75x14){return _0xba75x14[_0x9e4d[34]]({attributes:[_0x9e4d[23]]})})[_0x9e4d[28]](function(_0xba75x11){return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23]),memberid:_0xba75xf[_0x9e4d[31]]}}}});default:return {}}}}function getChatQueues(_0xba75xf,_0xba75x10){return function(){switch(_0xba75xf[_0x9e4d[36]]){case _0x9e4d[33]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](Util[_0x9e4d[40]]({},{attributes:[_0x9e4d[23]],include:[{raw:true,model:models[_0x9e4d[29]],attributes:[_0x9e4d[23]]}]}))[_0x9e4d[28]](function(_0xba75x11){if(_0xba75x10){return {include:{model:models[_0x9e4d[37]],include:{model:models[_0x9e4d[38]],include:{model:models[_0x9e4d[39]],where:{id:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23])}}}}}}else {var _0xba75x12=[];_0xba75x11[_0x9e4d[27]][_0x9e4d[26]](function(_0xba75x13){_0xba75x12= _[_0x9e4d[25]](_0xba75x12,_[_0x9e4d[24]](_0xba75x13.Users,_0x9e4d[23]))});return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11[_0x9e4d[27]],_0x9e4d[23]),memberid:_0xba75x12}}}}});case _0x9e4d[35]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](function(_0xba75x14){return _0xba75x14[_0x9e4d[41]]({attributes:[_0x9e4d[23]]})})[_0x9e4d[28]](function(_0xba75x11){return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23]),memberid:_0xba75xf[_0x9e4d[31]]}}}});default:return {}}}}function getFaxQueues(_0xba75xf,_0xba75x10){return function(){switch(_0xba75xf[_0x9e4d[36]]){case _0x9e4d[33]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](Util[_0x9e4d[45]]({},{attributes:[_0x9e4d[23]],include:[{raw:true,model:models[_0x9e4d[29]],attributes:[_0x9e4d[23]]}]}))[_0x9e4d[28]](function(_0xba75x11){if(_0xba75x10){return {include:{model:models[_0x9e4d[42]],include:{model:models[_0x9e4d[43]],include:{model:models[_0x9e4d[44]],where:{id:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23])}}}}}}else {var _0xba75x12=[];_0xba75x11[_0x9e4d[27]][_0x9e4d[26]](function(_0xba75x13){_0xba75x12= _[_0x9e4d[25]](_0xba75x12,_[_0x9e4d[24]](_0xba75x13.Users,_0x9e4d[23]))});return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11[_0x9e4d[27]],_0x9e4d[23]),memberid:_0xba75x12}}}}});case _0x9e4d[35]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](function(_0xba75x14){return _0xba75x14[_0x9e4d[46]]({attributes:[_0x9e4d[23]]})})[_0x9e4d[28]](function(_0xba75x11){return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23]),memberid:_0xba75xf[_0x9e4d[31]]}}}});default:return {}}}}function getSmsQueues(_0xba75xf,_0xba75x10){return function(){switch(_0xba75xf[_0x9e4d[36]]){case _0x9e4d[33]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](Util[_0x9e4d[50]]({},{attributes:[_0x9e4d[23]],include:[{raw:true,model:models[_0x9e4d[29]],attributes:[_0x9e4d[23]]}]}))[_0x9e4d[28]](function(_0xba75x11){if(_0xba75x10){return {include:{model:models[_0x9e4d[47]],include:{model:models[_0x9e4d[48]],include:{model:models[_0x9e4d[49]],where:{id:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23])}}}}}}else {var _0xba75x12=[];_0xba75x11[_0x9e4d[27]][_0x9e4d[26]](function(_0xba75x13){_0xba75x12= _[_0x9e4d[25]](_0xba75x12,_[_0x9e4d[24]](_0xba75x13.Users,_0x9e4d[23]))});return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11[_0x9e4d[27]],_0x9e4d[23]),memberid:_0xba75x12}}}}});case _0x9e4d[35]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](function(_0xba75x14){return _0xba75x14[_0x9e4d[51]]({attributes:[_0x9e4d[23]]})})[_0x9e4d[28]](function(_0xba75x11){return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23]),memberid:_0xba75xf[_0x9e4d[31]]}}}});default:return {}}}}function getOpenchannelQueues(_0xba75xf,_0xba75x10){return function(){switch(_0xba75xf[_0x9e4d[36]]){case _0x9e4d[33]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](Util[_0x9e4d[55]]({},{attributes:[_0x9e4d[23]],include:[{raw:true,model:models[_0x9e4d[29]],attributes:[_0x9e4d[23]]}]}))[_0x9e4d[28]](function(_0xba75x11){if(_0xba75x10){return {include:{model:models[_0x9e4d[52]],include:{model:models[_0x9e4d[53]],include:{model:models[_0x9e4d[54]],where:{id:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23])}}}}}}else {var _0xba75x12=[];_0xba75x11[_0x9e4d[27]][_0x9e4d[26]](function(_0xba75x13){_0xba75x12= _[_0x9e4d[25]](_0xba75x12,_[_0x9e4d[24]](_0xba75x13.Users,_0x9e4d[23]))});return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11[_0x9e4d[27]],_0x9e4d[23]),memberid:_0xba75x12}}}}});case _0x9e4d[35]:return models[_0x9e4d[29]][_0x9e4d[32]](_0xba75xf[_0x9e4d[31]],{attributes:[_0x9e4d[23]]})[_0x9e4d[28]](function(_0xba75x14){return _0xba75x14[_0x9e4d[56]]({attributes:[_0x9e4d[23]]})})[_0x9e4d[28]](function(_0xba75x11){return {where:{$or:{queue:_[_0x9e4d[24]](_0xba75x11,_0x9e4d[23]),memberid:_0xba75xf[_0x9e4d[31]]}}}});default:return {}}}}function onOpenMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[11]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[61],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[59],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onClosedMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[11]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[68],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[67],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onNewMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[11]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[70],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[69],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onWaitingMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[9]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:null}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[71],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onTimeoutMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[9]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{timeout:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[72],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onPendingMail(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getMailQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[11]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[74],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[73],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onOpenChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[12]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[75],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onClosedChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[12]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{complete:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[76],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onNewChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[12]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:null}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[77],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onTimeoutChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[12]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{timeout:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[78],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onAbandonedChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[12]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{abandon:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[79],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onUnmanagedChat(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getChatQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[13]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[81],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[80],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onOpenFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[15]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[61],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[82],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onClosedFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[15]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[68],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[83],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onNewFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[15]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[70],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[84],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onTimeoutFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[14]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{timeout:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[85],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onPendingFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[15]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[74],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[86],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onWaitingFax(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getFaxQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[14]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[87],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onOpenSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[17]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[61],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[88],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onClosedSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[17]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[68],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[89],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onNewSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[17]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[70],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[90],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onTimeoutSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[16]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{timeout:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[91],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onPendingSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[17]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[74],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[92],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onWaitingSms(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getSmsQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[16]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:null}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[92],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onOpenOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[19]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[61],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[93],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onClosedOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[19]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[68],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[94],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onNewOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[19]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[70],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[95],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onTimeoutOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[18]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{timeout:true}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[96],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onPendingOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7,true))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[19]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{status:_0x9e4d[74],updatedAt:{$gte:moment()[_0x9e4d[63]](_0x9e4d[62])}}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[97],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}function onWaitingOpenchannel(_0xba75x7,_0xba75x8){return Promise[_0x9e4d[66]]([])[_0x9e4d[28]](getOpenchannelQueues(_0xba75x7))[_0x9e4d[28]](function(_0xba75x1c){return models[_0x9e4d[18]][_0x9e4d[65]](_[_0x9e4d[64]]({where:{leaveAt:null}},_0xba75x1c))})[_0x9e4d[28]](function(_0xba75x1b){_0xba75x7[_0x9e4d[60]](_0x9e4d[97],{value:_0xba75x1b})})[_0x9e4d[58]](function(_0xba75x1a){console[_0x9e4d[57]](_0xba75x1a)})}