Built motion from commit 137ed438a.|1.0.25
[motion.git] / server / api / agent / agent.controller.js
index 0bf53d8..d514e77 100644 (file)
@@ -1 +1 @@
-var _0xb75c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\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","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\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","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\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","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0xb75c[0];var _=require(_0xb75c[1]);var sequelize=require(_0xb75c[3])[_0xb75c[2]];var BPromise=require(_0xb75c[4]);var util=require(_0xb75c[5]);var Util=require(_0xb75c[6]);var userTools=require(_0xb75c[7]);var OpenchannelQueue=require(_0xb75c[3])[_0xb75c[8]];var VoiceQueue=require(_0xb75c[3])[_0xb75c[9]];var ChatQueue=require(_0xb75c[3])[_0xb75c[10]];var MailQueue=require(_0xb75c[3])[_0xb75c[11]];var FaxQueue=require(_0xb75c[3])[_0xb75c[12]];var SmsQueue=require(_0xb75c[3])[_0xb75c[13]];var MailRoom=require(_0xb75c[3])[_0xb75c[14]];var Setting=require(_0xb75c[3])[_0xb75c[15]];var Agent=require(_0xb75c[3])[_0xb75c[16]];var User=require(_0xb75c[3])[_0xb75c[16]];var Team=require(_0xb75c[3])[_0xb75c[17]];var List=require(_0xb75c[3])[_0xb75c[18]];exports[_0xb75c[19]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[26]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[35]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){return Agent[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]],{attributes:[_0xb75c[27],_0xb75c[39]]})[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](401)};switch(_0x77f6x13[_0xb75c[58]][_0xb75c[57]]){case _0xb75c[42]:return _0x77f6x19[_0xb75c[41]](_0x77f6x13[_0xb75c[37]],{interface:util[_0xb75c[40]](_0xb75c[38],_0x77f6x19[_0xb75c[39]]),stateinterface:util[_0xb75c[40]](_0xb75c[38],_0x77f6x19[_0xb75c[39]]),membername:_0x77f6x19[_0xb75c[39]],UserId:_0x77f6x19[_0xb75c[27]]});case _0xb75c[48]:return ChatQueue[_0xb75c[47]]({where:{id:_0x77f6x13[_0xb75c[37]]},attributes:[_0xb75c[27],_0xb75c[39]],raw:true})[_0xb75c[24]](function(_0x77f6x18){if(_0x77f6x18){var _0x77f6x1a=[];_[_0xb75c[45]](_0x77f6x18,function(_0x77f6x1b){_0x77f6x1a[_0xb75c[44]](_0x77f6x19[_0xb75c[43]](_0x77f6x1b[_0xb75c[27]],{queue:_0x77f6x1b[_0xb75c[39]]}))});return BPromise[_0xb75c[46]](_0x77f6x1a)}});case _0xb75c[50]:return MailQueue[_0xb75c[47]]({where:{id:_0x77f6x13[_0xb75c[37]]},attributes:[_0xb75c[27],_0xb75c[39]],raw:true})[_0xb75c[24]](function(_0x77f6x18){if(_0x77f6x18){var _0x77f6x1a=[];_[_0xb75c[45]](_0x77f6x18,function(_0x77f6x1b){_0x77f6x1a[_0xb75c[44]](_0x77f6x19[_0xb75c[49]](_0x77f6x1b[_0xb75c[27]],{queue:_0x77f6x1b[_0xb75c[39]]}))});return BPromise[_0xb75c[46]](_0x77f6x1a)}});case _0xb75c[52]:return FaxQueue[_0xb75c[47]]({where:{id:_0x77f6x13[_0xb75c[37]]},attributes:[_0xb75c[27],_0xb75c[39]],raw:true})[_0xb75c[24]](function(_0x77f6x18){if(_0x77f6x18){var _0x77f6x1a=[];_[_0xb75c[45]](_0x77f6x18,function(_0x77f6x1b){_0x77f6x1a[_0xb75c[44]](_0x77f6x19[_0xb75c[51]](_0x77f6x1b[_0xb75c[27]],{queue:_0x77f6x1b[_0xb75c[39]]}))});return BPromise[_0xb75c[46]](_0x77f6x1a)}});case _0xb75c[54]:return SmsQueue[_0xb75c[47]]({where:{id:_0x77f6x13[_0xb75c[37]]},attributes:[_0xb75c[27],_0xb75c[39]],raw:true})[_0xb75c[24]](function(_0x77f6x18){if(_0x77f6x18){var _0x77f6x1a=[];_[_0xb75c[45]](_0x77f6x18,function(_0x77f6x1b){_0x77f6x1a[_0xb75c[44]](_0x77f6x19[_0xb75c[53]](_0x77f6x1b[_0xb75c[27]],{queue:_0x77f6x1b[_0xb75c[39]]}))});return BPromise[_0xb75c[46]](_0x77f6x1a)}});case _0xb75c[56]:return OpenchannelQueue[_0xb75c[47]]({where:{id:_0x77f6x13[_0xb75c[37]]},attributes:[_0xb75c[27],_0xb75c[39]],raw:true})[_0xb75c[24]](function(_0x77f6x18){if(_0x77f6x18){var _0x77f6x1a=[];_[_0xb75c[45]](_0x77f6x18,function(_0x77f6x1b){_0x77f6x1a[_0xb75c[44]](_0x77f6x19[_0xb75c[55]](_0x77f6x1b[_0xb75c[27]],{queue:_0x77f6x1b[_0xb75c[39]]}))});return BPromise[_0xb75c[46]](_0x77f6x1a)}});default:return null}})[_0xb75c[24]](function(_0x77f6x18){return _0x77f6x14[_0xb75c[36]](_0x77f6x18?200:401)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16)})};exports[_0xb75c[59]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){return Agent[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](401)};switch(_0x77f6x13[_0xb75c[58]][_0xb75c[57]]){case _0xb75c[42]:return _0x77f6x19[_0xb75c[61]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);case _0xb75c[48]:return _0x77f6x19[_0xb75c[62]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);case _0xb75c[50]:return _0x77f6x19[_0xb75c[63]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);case _0xb75c[54]:return _0x77f6x19[_0xb75c[64]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);case _0xb75c[52]:return _0x77f6x19[_0xb75c[65]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);case _0xb75c[56]:return _0x77f6x19[_0xb75c[66]](_0x77f6x13[_0xb75c[25]][_0xb75c[60]]);default:return null}})[_0xb75c[24]](function(_0x77f6x18){return _0x77f6x14[_0xb75c[36]](_0x77f6x18?200:401)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16)})};exports[_0xb75c[67]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[26]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[72]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[77]]({},{attributes:[_0xb75c[39]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x1d=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[39]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x77f6x1d}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[78]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[79]]({},{attributes:[_0xb75c[27]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x1e=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[27]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:ChatQueue,where:{id:{$in:_0x77f6x1e}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]},_0xb75c[80])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[81]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[82]]({},{attributes:[_0xb75c[27]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x1f=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[27]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:MailQueue,where:{id:{$in:_0x77f6x1f}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]},_0xb75c[80])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[83]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[84]]({},{attributes:[_0xb75c[27]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x20=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[27]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:FaxQueue,where:{id:{$in:_0x77f6x20}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]},_0xb75c[80])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[85]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[86]]({},{attributes:[_0xb75c[27]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x21=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[27]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:SmsQueue,where:{id:{$in:_0x77f6x21}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]},_0xb75c[80])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[87]]= function(_0x77f6x13,_0x77f6x14,_0x77f6x15){switch(_0x77f6x13[_0xb75c[28]][_0xb75c[34]]){case _0xb75c[28]:var _0x77f6x1c=[];return User[_0xb75c[29]](_0x77f6x13[_0xb75c[28]][_0xb75c[27]],{attributes:[_0xb75c[27]]})[_0xb75c[24]](Util[_0xb75c[88]]({},{attributes:[_0xb75c[27]],include:[{raw:true,model:User,attributes:[_0xb75c[27]]}]}))[_0xb75c[24]](function(_0x77f6x18){var _0x77f6x22=_[_0xb75c[74]](_0x77f6x18[_0xb75c[73]],_0xb75c[27]);_0x77f6x18[_0xb75c[73]][_0xb75c[45]](function(_0x77f6x1b){_0x77f6x1c= _[_0xb75c[75]](_0x77f6x1c,_[_0xb75c[74]](_0x77f6x1b.Users,_0xb75c[27]))});return User[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]})[_0xb75c[31]](_[_0xb75c[76]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]],{id:{$in:_0x77f6x1c}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x77f6x22}},required:false}]}))})[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)});default:return Agent[_0xb75c[33]](_0xb75c[32],{method:[_0xb75c[68],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[69],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[70],_0x77f6x13[_0xb75c[25]]]},{method:[_0xb75c[71],_0x77f6x13[_0xb75c[25]]]},_0xb75c[80])[_0xb75c[31]](Util[_0xb75c[30]](_0x77f6x13[_0xb75c[25]]))[_0xb75c[24]](function(_0x77f6x17){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x17)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})}};exports[_0xb75c[89]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x14[_0xb75c[22]](_0x77f6x19)})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[90]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[92]]({attributes:[_0xb75c[39]]})})[_0xb75c[24]](function(_0x77f6x1d){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x1d[_0xb75c[91]],rows:_0x77f6x1d})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[93]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[94]]({attributes:[_0xb75c[27]]})})[_0xb75c[24]](function(_0x77f6x1e){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x1e[_0xb75c[91]],rows:_0x77f6x1e})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[95]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[96]]({attributes:[_0xb75c[27]]})})[_0xb75c[24]](function(_0x77f6x1f){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x1f[_0xb75c[91]],rows:_0x77f6x1f})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[97]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[98]]({attributes:[_0xb75c[27]]})})[_0xb75c[24]](function(_0x77f6x20){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x20[_0xb75c[91]],rows:_0x77f6x20})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[99]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[100]]({attributes:[_0xb75c[27]]})})[_0xb75c[24]](function(_0x77f6x21){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x21[_0xb75c[91]],rows:_0x77f6x21})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[101]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[102]]({attributes:[_0xb75c[27]]})})[_0xb75c[24]](function(_0x77f6x23){return _0x77f6x14[_0xb75c[22]]({count:_0x77f6x23[_0xb75c[91]],rows:_0x77f6x23})})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[103]]= function(_0x77f6x13,_0x77f6x14){var _0x77f6x24;_0x77f6x13[_0xb75c[37]][_0xb75c[34]]= _0xb75c[32];return sequelize[_0xb75c[113]](function(_0x77f6x25){return Setting[_0xb75c[29]](1)[_0xb75c[24]](function(_0x77f6x28){var _0x77f6x29=String(_0x77f6x13[_0xb75c[37]][_0xb75c[109]]);var _0x77f6x2a=_0x77f6x28[_0xb75c[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9~!@#$%^&\-_=+\[\{\]\}.]{6,}$/;if(!_0x77f6x2a[_0xb75c[111]](_0x77f6x29)){throw  new Error(_0xb75c[112])};return Agent[_0xb75c[33]](_0xb75c[32])[_0xb75c[103]](_0x77f6x13[_0xb75c[37]],{transaction:_0x77f6x25})})[_0xb75c[24]](userTools[_0xb75c[108]]({transaction:_0x77f6x25}))[_0xb75c[24]](function(_0x77f6x19){_0x77f6x24= _0x77f6x19;return Team[_0xb75c[107]]({where:{defaultEntry:true}})})[_0xb75c[24]](function(_0x77f6x27){return _0x77f6x27[_0xb75c[106]](_0x77f6x24[_0xb75c[27]],{transaction:_0x77f6x25})})[_0xb75c[24]](function(){return List[_0xb75c[107]]({where:{defaultEntry:true}})})[_0xb75c[24]](function(_0x77f6x26){return _0x77f6x26[_0xb75c[106]](_0x77f6x24[_0xb75c[27]],{transaction:_0x77f6x25})})})[_0xb75c[24]](function(){return _0x77f6x14[_0xb75c[23]](201)[_0xb75c[22]](_0x77f6x24)})[_0xb75c[21]](sequelize.UniqueConstraintError,function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return Util[_0xb75c[105]][_0xb75c[104]](_0x77f6x14,_0x77f6x16)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[114]]= function(_0x77f6x13,_0x77f6x14){var _0x77f6x2b;var _0x77f6x2c;var _0x77f6x2d=[];var _0x77f6x29=String(_0x77f6x13[_0xb75c[37]][_0xb75c[109]]);return sequelize[_0xb75c[113]](function(_0x77f6x25){return Setting[_0xb75c[29]](1)[_0xb75c[24]](function(_0x77f6x28){_0x77f6x2c= _0x77f6x28;var _0x77f6x2a=_0x77f6x2c[_0xb75c[110]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x77f6x2a[_0xb75c[111]](_0x77f6x29)){throw  new Error(_0xb75c[116])};var _0x77f6x2e=0;if(_0x77f6x13[_0xb75c[37]][_0xb75c[118]](_0xb75c[117])&& _[_0xb75c[119]](_0x77f6x13[_0xb75c[37]][_0xb75c[117]])&& _0x77f6x13[_0xb75c[37]][_0xb75c[117]]>= 0){_0x77f6x2e= _0x77f6x13[_0xb75c[37]][_0xb75c[117]];delete _0x77f6x13[_0xb75c[37]][_0xb75c[117]]};var _0x77f6x2f=_0x77f6x13[_0xb75c[37]][_0xb75c[120]];delete _0x77f6x13[_0xb75c[37]][_0xb75c[120]];if(_0x77f6x13[_0xb75c[37]][_0xb75c[121]]){_0x77f6x13[_0xb75c[37]][_0xb75c[34]]= _0xb75c[32];for(var _0x77f6x30=_0x77f6x2e;_0x77f6x30< _0x77f6x13[_0xb75c[37]][_0xb75c[121]]+ _0x77f6x2e;_0x77f6x30++,_0x77f6x2f++){var _0x77f6x31=_[_0xb75c[122]](_0x77f6x13[_0xb75c[37]]);_0x77f6x31[_0xb75c[123]]= _0x77f6x2f;_0x77f6x31[_0xb75c[39]]= _0x77f6x31[_0xb75c[39]]+ _0x77f6x30;_0x77f6x31[_0xb75c[124]]= _0x77f6x31[_0xb75c[124]]+ _0x77f6x30;_0x77f6x31[_0xb75c[125]]= _0x77f6x31[_0xb75c[125]][_0xb75c[127]](_0xb75c[126])[0]+ _0x77f6x30+ _0xb75c[126]+ _0x77f6x31[_0xb75c[125]][_0xb75c[127]](_0xb75c[126])[1];_0x77f6x2d[_0xb75c[44]](_0x77f6x31)}}else {throw  new Error(_0xb75c[128])};return Agent[_0xb75c[114]](_0x77f6x2d,{transaction:_0x77f6x25,individualHooks:true})})[_0xb75c[24]](function(_0x77f6x1c){_0x77f6x2b= _0x77f6x1c;return Team[_0xb75c[107]]({where:{defaultEntry:true}})})[_0xb75c[24]](function(_0x77f6x27){return _0x77f6x27[_0xb75c[115]](_[_0xb75c[74]](_0x77f6x2b,_0xb75c[27]),{transaction:_0x77f6x25})})})[_0xb75c[24]](function(){return _0x77f6x14[_0xb75c[36]](201)})[_0xb75c[21]](sequelize.UniqueConstraintError,function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return Util[_0xb75c[105]][_0xb75c[104]](_0x77f6x14,_0x77f6x16)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[129]]= function(_0x77f6x13,_0x77f6x14){if(_0x77f6x13[_0xb75c[37]][_0xb75c[27]]){delete _0x77f6x13[_0xb75c[37]][_0xb75c[27]]};delete _0x77f6x13[_0xb75c[37]][_0xb75c[123]];delete _0x77f6x13[_0xb75c[37]][_0xb75c[34]];delete _0x77f6x13[_0xb75c[37]][_0xb75c[39]];delete _0x77f6x13[_0xb75c[37]][_0xb75c[109]];var _0x77f6x24;return sequelize[_0xb75c[113]](function(_0x77f6x25){return Agent[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};var _0x77f6x32=_[_0xb75c[76]](_0x77f6x19,_0x77f6x13[_0xb75c[37]]);return _0x77f6x32[_0xb75c[131]]({transaction:_0x77f6x25})})[_0xb75c[24]](function(_0x77f6x19){_0x77f6x24= _0x77f6x19;return _0x77f6x19})[_0xb75c[24]](userTools[_0xb75c[130]]({transaction:_0x77f6x25}))[_0xb75c[24]](function(){return _0x77f6x14[_0xb75c[23]](200)[_0xb75c[22]](_0x77f6x24)})})[_0xb75c[21]](sequelize.UniqueConstraintError,function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return Util[_0xb75c[105]][_0xb75c[104]](_0x77f6x14,_0x77f6x16)})[_0xb75c[21]](function(_0x77f6x16){console[_0xb75c[20]](_0x77f6x16);return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[132]]= function(_0x77f6x13,_0x77f6x14){var _0x77f6x24;return Agent[_0xb75c[29]](_0x77f6x13[_0xb75c[58]][_0xb75c[27]])[_0xb75c[24]](function(_0x77f6x19){_0x77f6x24= _0x77f6x19;if(!_0x77f6x19){return _0x77f6x14[_0xb75c[36]](404)};return _0x77f6x19[_0xb75c[132]]()})[_0xb75c[24]](function(){return _0x77f6x14[_0xb75c[36]](204)})[_0xb75c[21]](sequelize.ForeignKeyConstraintError,function(_0x77f6x16){return Util[_0xb75c[105]][_0xb75c[133]](_0x77f6x14,_0xb75c[32],_0x77f6x24[_0xb75c[39]],_0x77f6x16)})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};exports[_0xb75c[134]]= function(_0x77f6x13,_0x77f6x14){return Agent[_0xb75c[132]]({where:{id:_0x77f6x13[_0xb75c[25]][_0xb75c[60]]},individualHooks:true})[_0xb75c[24]](function(){return _0x77f6x14[_0xb75c[36]](204)})[_0xb75c[21]](function(_0x77f6x16){return handleError(_0x77f6x14,_0x77f6x16)})};function handleError(_0x77f6x14,_0x77f6x16){return _0x77f6x14[_0xb75c[23]](500)[_0xb75c[22]](_0x77f6x16)}
\ No newline at end of file
+var _0x4ad1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\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","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x76\x61\x6C\x75\x65\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\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","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\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","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x4ad1[0];var _=require(_0x4ad1[1]);var sequelize=require(_0x4ad1[3])[_0x4ad1[2]];var BPromise=require(_0x4ad1[4]);var util=require(_0x4ad1[5]);var Util=require(_0x4ad1[6]);var userTools=require(_0x4ad1[7]);var logger=require(_0x4ad1[9])(_0x4ad1[8]);var OpenchannelQueue=require(_0x4ad1[3])[_0x4ad1[10]];var VoiceQueue=require(_0x4ad1[3])[_0x4ad1[11]];var ChatQueue=require(_0x4ad1[3])[_0x4ad1[12]];var MailQueue=require(_0x4ad1[3])[_0x4ad1[13]];var FaxQueue=require(_0x4ad1[3])[_0x4ad1[14]];var SmsQueue=require(_0x4ad1[3])[_0x4ad1[15]];var MailRoom=require(_0x4ad1[3])[_0x4ad1[16]];var Setting=require(_0x4ad1[3])[_0x4ad1[17]];var Agent=require(_0x4ad1[3])[_0x4ad1[18]];var User=require(_0x4ad1[3])[_0x4ad1[18]];var Team=require(_0x4ad1[3])[_0x4ad1[19]];var List=require(_0x4ad1[3])[_0x4ad1[20]];exports[_0x4ad1[21]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[27]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[36]]= function(_0x5523x14,_0x5523x15,_0x5523x16){return Agent[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]],{attributes:[_0x4ad1[28],_0x4ad1[41]]})[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](401)};switch(_0x5523x14[_0x4ad1[61]][_0x4ad1[60]]){case _0x4ad1[45]:return _0x5523x1a[_0x4ad1[44]](_0x5523x14[_0x4ad1[39]][_0x4ad1[38]],{interface:util[_0x4ad1[42]](_0x4ad1[40],_0x5523x1a[_0x4ad1[41]]),stateinterface:util[_0x4ad1[42]](_0x4ad1[40],_0x5523x1a[_0x4ad1[41]]),membername:_0x5523x1a[_0x4ad1[41]],UserId:_0x5523x1a[_0x4ad1[28]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]});case _0x4ad1[51]:return ChatQueue[_0x4ad1[50]]({where:{id:_0x5523x14[_0x4ad1[39]][_0x4ad1[38]]},attributes:[_0x4ad1[28],_0x4ad1[41]],raw:true})[_0x4ad1[25]](function(_0x5523x19){if(_0x5523x19){var _0x5523x1b=[];_[_0x4ad1[48]](_0x5523x19,function(_0x5523x1c){_0x5523x1b[_0x4ad1[47]](_0x5523x1a[_0x4ad1[46]](_0x5523x1c[_0x4ad1[28]],{queue:_0x5523x1c[_0x4ad1[41]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]}))});return BPromise[_0x4ad1[49]](_0x5523x1b)}});case _0x4ad1[53]:return MailQueue[_0x4ad1[50]]({where:{id:_0x5523x14[_0x4ad1[39]][_0x4ad1[38]]},attributes:[_0x4ad1[28],_0x4ad1[41]],raw:true})[_0x4ad1[25]](function(_0x5523x19){if(_0x5523x19){var _0x5523x1b=[];_[_0x4ad1[48]](_0x5523x19,function(_0x5523x1c){_0x5523x1b[_0x4ad1[47]](_0x5523x1a[_0x4ad1[52]](_0x5523x1c[_0x4ad1[28]],{queue:_0x5523x1c[_0x4ad1[41]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]}))});return BPromise[_0x4ad1[49]](_0x5523x1b)}});case _0x4ad1[55]:return FaxQueue[_0x4ad1[50]]({where:{id:_0x5523x14[_0x4ad1[39]][_0x4ad1[38]]},attributes:[_0x4ad1[28],_0x4ad1[41]],raw:true})[_0x4ad1[25]](function(_0x5523x19){if(_0x5523x19){var _0x5523x1b=[];_[_0x4ad1[48]](_0x5523x19,function(_0x5523x1c){_0x5523x1b[_0x4ad1[47]](_0x5523x1a[_0x4ad1[54]](_0x5523x1c[_0x4ad1[28]],{queue:_0x5523x1c[_0x4ad1[41]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]}))});return BPromise[_0x4ad1[49]](_0x5523x1b)}});case _0x4ad1[57]:return SmsQueue[_0x4ad1[50]]({where:{id:_0x5523x14[_0x4ad1[39]][_0x4ad1[38]]},attributes:[_0x4ad1[28],_0x4ad1[41]],raw:true})[_0x4ad1[25]](function(_0x5523x19){if(_0x5523x19){var _0x5523x1b=[];_[_0x4ad1[48]](_0x5523x19,function(_0x5523x1c){_0x5523x1b[_0x4ad1[47]](_0x5523x1a[_0x4ad1[56]](_0x5523x1c[_0x4ad1[28]],{queue:_0x5523x1c[_0x4ad1[41]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]}))});return BPromise[_0x4ad1[49]](_0x5523x1b)}});case _0x4ad1[59]:return OpenchannelQueue[_0x4ad1[50]]({where:{id:_0x5523x14[_0x4ad1[39]][_0x4ad1[38]]},attributes:[_0x4ad1[28],_0x4ad1[41]],raw:true})[_0x4ad1[25]](function(_0x5523x19){if(_0x5523x19){var _0x5523x1b=[];_[_0x4ad1[48]](_0x5523x19,function(_0x5523x1c){_0x5523x1b[_0x4ad1[47]](_0x5523x1a[_0x4ad1[58]](_0x5523x1c[_0x4ad1[28]],{queue:_0x5523x1c[_0x4ad1[41]],penalty:_0x5523x14[_0x4ad1[39]][_0x4ad1[43]]}))});return BPromise[_0x4ad1[49]](_0x5523x1b)}});default:return null}})[_0x4ad1[25]](function(_0x5523x19){return _0x5523x15[_0x4ad1[37]](_0x5523x19?200:401)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[62]]= function(_0x5523x14,_0x5523x15,_0x5523x16){return Agent[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](401)};switch(_0x5523x14[_0x4ad1[61]][_0x4ad1[60]]){case _0x4ad1[45]:return _0x5523x1a[_0x4ad1[64]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);case _0x4ad1[51]:return _0x5523x1a[_0x4ad1[65]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);case _0x4ad1[53]:return _0x5523x1a[_0x4ad1[66]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);case _0x4ad1[57]:return _0x5523x1a[_0x4ad1[67]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);case _0x4ad1[55]:return _0x5523x1a[_0x4ad1[68]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);case _0x4ad1[59]:return _0x5523x1a[_0x4ad1[69]](_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]);default:return null}})[_0x4ad1[25]](function(_0x5523x19){return _0x5523x15[_0x4ad1[37]](_0x5523x19?200:401)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[70]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[27]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[75]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[80]]({},{attributes:[_0x4ad1[41]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x1e=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[41]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x5523x1e}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[81]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[82]]({},{attributes:[_0x4ad1[28]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x1f=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[28]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:ChatQueue,where:{id:{$in:_0x5523x1f}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]},_0x4ad1[83])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[84]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[85]]({},{attributes:[_0x4ad1[28]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x20=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[28]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:MailQueue,where:{id:{$in:_0x5523x20}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]},_0x4ad1[83])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[86]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[87]]({},{attributes:[_0x4ad1[28]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x21=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[28]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:FaxQueue,where:{id:{$in:_0x5523x21}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]},_0x4ad1[83])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[88]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[89]]({},{attributes:[_0x4ad1[28]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x22=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[28]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:SmsQueue,where:{id:{$in:_0x5523x22}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]},_0x4ad1[83])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[90]]= function(_0x5523x14,_0x5523x15,_0x5523x16){switch(_0x5523x14[_0x4ad1[29]][_0x4ad1[35]]){case _0x4ad1[29]:var _0x5523x1d=[];return User[_0x4ad1[30]](_0x5523x14[_0x4ad1[29]][_0x4ad1[28]],{attributes:[_0x4ad1[28]]})[_0x4ad1[25]](Util[_0x4ad1[91]]({},{attributes:[_0x4ad1[28]],include:[{raw:true,model:User,attributes:[_0x4ad1[28]]}]}))[_0x4ad1[25]](function(_0x5523x19){var _0x5523x23=_[_0x4ad1[77]](_0x5523x19[_0x4ad1[76]],_0x4ad1[28]);_0x5523x19[_0x4ad1[76]][_0x4ad1[48]](function(_0x5523x1c){_0x5523x1d= _[_0x4ad1[78]](_0x5523x1d,_[_0x4ad1[77]](_0x5523x1c.Users,_0x4ad1[28]))});return User[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]})[_0x4ad1[32]](_[_0x4ad1[79]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]],{id:{$in:_0x5523x1d}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0x5523x23}},required:false}]}))})[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)});default:return Agent[_0x4ad1[34]](_0x4ad1[33],{method:[_0x4ad1[71],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[72],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[73],_0x5523x14[_0x4ad1[26]]]},{method:[_0x4ad1[74],_0x5523x14[_0x4ad1[26]]]},_0x4ad1[83])[_0x4ad1[32]](Util[_0x4ad1[31]](_0x5523x14[_0x4ad1[26]]))[_0x4ad1[25]](function(_0x5523x18){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x18)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})}};exports[_0x4ad1[92]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x15[_0x4ad1[23]](_0x5523x1a)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[93]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[95]]({attributes:[_0x4ad1[41]]})})[_0x4ad1[25]](function(_0x5523x1e){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x1e[_0x4ad1[94]],rows:_0x5523x1e})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[96]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[97]]({attributes:[_0x4ad1[28]]})})[_0x4ad1[25]](function(_0x5523x1f){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x1f[_0x4ad1[94]],rows:_0x5523x1f})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[98]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[99]]({attributes:[_0x4ad1[28]]})})[_0x4ad1[25]](function(_0x5523x20){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x20[_0x4ad1[94]],rows:_0x5523x20})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[100]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[101]]({attributes:[_0x4ad1[28]]})})[_0x4ad1[25]](function(_0x5523x21){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x21[_0x4ad1[94]],rows:_0x5523x21})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[102]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[103]]({attributes:[_0x4ad1[28]]})})[_0x4ad1[25]](function(_0x5523x22){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x22[_0x4ad1[94]],rows:_0x5523x22})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[104]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[105]]({attributes:[_0x4ad1[28]]})})[_0x4ad1[25]](function(_0x5523x24){return _0x5523x15[_0x4ad1[23]]({count:_0x5523x24[_0x4ad1[94]],rows:_0x5523x24})})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[106]]= function(_0x5523x14,_0x5523x15){var _0x5523x25;_0x5523x14[_0x4ad1[39]][_0x4ad1[35]]= _0x4ad1[33];return sequelize[_0x4ad1[116]](function(_0x5523x26){return Setting[_0x4ad1[30]](1)[_0x4ad1[25]](function(_0x5523x28){var _0x5523x29=String(_0x5523x14[_0x4ad1[39]][_0x4ad1[112]]);var _0x5523x2a=_0x5523x28[_0x4ad1[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0x5523x2a[_0x4ad1[114]](_0x5523x29)){throw  new Error(_0x4ad1[115])};return Agent[_0x4ad1[34]](_0x4ad1[33])[_0x4ad1[106]](_0x5523x14[_0x4ad1[39]],{transaction:_0x5523x26})})[_0x4ad1[25]](userTools[_0x4ad1[111]]({transaction:_0x5523x26}))[_0x4ad1[25]](function(_0x5523x1a){_0x5523x25= _0x5523x1a;return Team[_0x4ad1[110]]({where:{defaultEntry:true}})})[_0x4ad1[25]](function(_0x5523x27){return _0x5523x27[_0x4ad1[109]](_0x5523x25[_0x4ad1[28]],{transaction:_0x5523x26})})})[_0x4ad1[25]](function(){return _0x5523x15[_0x4ad1[24]](201)[_0x4ad1[23]](_0x5523x25)})[_0x4ad1[22]](sequelize.UniqueConstraintError,function(_0x5523x17){return Util[_0x4ad1[108]][_0x4ad1[107]](_0x5523x15,_0x5523x17)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[117]]= function(_0x5523x14,_0x5523x15){var _0x5523x2b;var _0x5523x2c;var _0x5523x2d=[];var _0x5523x29=String(_0x5523x14[_0x4ad1[39]][_0x4ad1[112]]);return sequelize[_0x4ad1[116]](function(_0x5523x26){return Setting[_0x4ad1[30]](1)[_0x4ad1[25]](function(_0x5523x28){_0x5523x2c= _0x5523x28;var _0x5523x2a=_0x5523x2c[_0x4ad1[113]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0x5523x2a[_0x4ad1[114]](_0x5523x29)){throw  new Error(_0x4ad1[119])};var _0x5523x2e=0;if(_0x5523x14[_0x4ad1[39]][_0x4ad1[121]](_0x4ad1[120])&& _[_0x4ad1[122]](_0x5523x14[_0x4ad1[39]][_0x4ad1[120]])&& _0x5523x14[_0x4ad1[39]][_0x4ad1[120]]>= 0){_0x5523x2e= _0x5523x14[_0x4ad1[39]][_0x4ad1[120]];delete _0x5523x14[_0x4ad1[39]][_0x4ad1[120]]};var _0x5523x2f=_0x5523x14[_0x4ad1[39]][_0x4ad1[123]];delete _0x5523x14[_0x4ad1[39]][_0x4ad1[123]];if(_0x5523x14[_0x4ad1[39]][_0x4ad1[124]]){_0x5523x14[_0x4ad1[39]][_0x4ad1[35]]= _0x4ad1[33];for(var _0x5523x30=_0x5523x2e;_0x5523x30< _0x5523x14[_0x4ad1[39]][_0x4ad1[124]]+ _0x5523x2e;_0x5523x30++,_0x5523x2f++){var _0x5523x31=_[_0x4ad1[125]](_0x5523x14[_0x4ad1[39]]);_0x5523x31[_0x4ad1[126]]= _0x5523x2f;_0x5523x31[_0x4ad1[41]]= _0x5523x31[_0x4ad1[41]]+ _0x5523x30;_0x5523x31[_0x4ad1[127]]= _0x5523x31[_0x4ad1[127]]+ _0x5523x30;_0x5523x31[_0x4ad1[128]]= _0x5523x31[_0x4ad1[128]][_0x4ad1[130]](_0x4ad1[129])[0]+ _0x5523x30+ _0x4ad1[129]+ _0x5523x31[_0x4ad1[128]][_0x4ad1[130]](_0x4ad1[129])[1];_0x5523x2d[_0x4ad1[47]](_0x5523x31)}}else {throw  new Error(_0x4ad1[131])};return Agent[_0x4ad1[117]](_0x5523x2d,{transaction:_0x5523x26,individualHooks:true})})[_0x4ad1[25]](function(_0x5523x1d){_0x5523x2b= _0x5523x1d;return Team[_0x4ad1[110]]({where:{defaultEntry:true}})})[_0x4ad1[25]](function(_0x5523x27){return _0x5523x27[_0x4ad1[118]](_[_0x4ad1[77]](_0x5523x2b,_0x4ad1[28]),{transaction:_0x5523x26})})})[_0x4ad1[25]](function(){return _0x5523x15[_0x4ad1[37]](201)})[_0x4ad1[22]](sequelize.UniqueConstraintError,function(_0x5523x17){return Util[_0x4ad1[108]][_0x4ad1[107]](_0x5523x15,_0x5523x17)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[132]]= function(_0x5523x14,_0x5523x15){if(_0x5523x14[_0x4ad1[39]][_0x4ad1[28]]){delete _0x5523x14[_0x4ad1[39]][_0x4ad1[28]]};delete _0x5523x14[_0x4ad1[39]][_0x4ad1[126]];delete _0x5523x14[_0x4ad1[39]][_0x4ad1[35]];delete _0x5523x14[_0x4ad1[39]][_0x4ad1[41]];delete _0x5523x14[_0x4ad1[39]][_0x4ad1[112]];var _0x5523x25;return sequelize[_0x4ad1[116]](function(_0x5523x26){return Agent[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};var _0x5523x32=_[_0x4ad1[79]](_0x5523x1a,_0x5523x14[_0x4ad1[39]]);return _0x5523x32[_0x4ad1[134]]({transaction:_0x5523x26})})[_0x4ad1[25]](function(_0x5523x1a){_0x5523x25= _0x5523x1a;return _0x5523x1a})[_0x4ad1[25]](userTools[_0x4ad1[133]]({transaction:_0x5523x26}))[_0x4ad1[25]](function(){return _0x5523x15[_0x4ad1[24]](200)[_0x4ad1[23]](_0x5523x25)})})[_0x4ad1[22]](sequelize.UniqueConstraintError,function(_0x5523x17){return Util[_0x4ad1[108]][_0x4ad1[107]](_0x5523x15,_0x5523x17)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[135]]= function(_0x5523x14,_0x5523x15){var _0x5523x25;return Agent[_0x4ad1[30]](_0x5523x14[_0x4ad1[61]][_0x4ad1[28]])[_0x4ad1[25]](function(_0x5523x1a){_0x5523x25= _0x5523x1a;if(!_0x5523x1a){return _0x5523x15[_0x4ad1[37]](404)};return _0x5523x1a[_0x4ad1[135]]()})[_0x4ad1[25]](function(){return _0x5523x15[_0x4ad1[37]](204)})[_0x4ad1[22]](sequelize.ForeignKeyConstraintError,function(_0x5523x17){return Util[_0x4ad1[108]][_0x4ad1[136]](_0x5523x15,_0x4ad1[33],_0x5523x25[_0x4ad1[41]],_0x5523x17)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};exports[_0x4ad1[137]]= function(_0x5523x14,_0x5523x15){return Agent[_0x4ad1[135]]({where:{id:_0x5523x14[_0x4ad1[26]][_0x4ad1[63]]},individualHooks:true})[_0x4ad1[25]](function(){return _0x5523x15[_0x4ad1[37]](204)})[_0x4ad1[22]](function(_0x5523x17){return handleError(_0x5523x15,_0x5523x17)})};function handleError(_0x5523x15,_0x5523x17){logger[_0x4ad1[139]](_0x5523x17[_0x4ad1[138]]);return _0x5523x15[_0x4ad1[24]](500)[_0x4ad1[23]](_0x5523x17)}
\ No newline at end of file