Built motion from commit 1020cd7.|0.0.107
[motion.git] / server / api / agent / agent.controller.js
index 90c3e22..7c747d1 100644 (file)
@@ -1 +1 @@
-var _0xe5c6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\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\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","\x71\x75\x65\x75\x65\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xe5c6[0];var _=require(_0xe5c6[1]);var Util=require(_0xe5c6[2]);var Agent=require(_0xe5c6[4])[_0xe5c6[3]];var Team=require(_0xe5c6[4])[_0xe5c6[5]];var MailRoom=require(_0xe5c6[4])[_0xe5c6[6]];exports[_0xe5c6[7]]=function(_0x163ax6,_0x163ax7,_0x163ax8){return Agent[_0xe5c6[17]](_0xe5c6[15],_0xe5c6[16])[_0xe5c6[14]](Util[_0xe5c6[13]](_0x163ax6[_0xe5c6[12]]))[_0xe5c6[11]](function(_0x163axa){_0x163ax7[_0xe5c6[10]](200)[_0xe5c6[9]](_0x163axa)})[_0xe5c6[8]](function(_0x163ax9){return handleError(_0x163ax7,_0x163ax9)})};exports[_0xe5c6[18]]=function(_0x163ax6,_0x163ax7){return Agent[_0xe5c6[17]](_0xe5c6[15])[_0xe5c6[22]](_0x163ax6[_0xe5c6[21]][_0xe5c6[20]])[_0xe5c6[11]](function(_0x163axb){if(!_0x163axb){return _0x163ax7[_0xe5c6[19]](404)};return _0x163ax7[_0xe5c6[9]](_0x163axb)})[_0xe5c6[8]](function(_0x163ax9){return handleError(_0x163ax7,_0x163ax9)})};exports[_0xe5c6[23]]=function(_0x163ax6,_0x163ax7){var _0x163axc;return Agent[_0xe5c6[17]](_0xe5c6[15])[_0xe5c6[23]](_0x163ax6[_0xe5c6[27]])[_0xe5c6[11]](function(_0x163axb){_0x163axc=_0x163axb;return Team[_0xe5c6[26]]({where:{defaultEntry:true}})})[_0xe5c6[11]](function(_0x163axd){return _0x163axd[_0xe5c6[25]](_0x163axc[_0xe5c6[20]])})[_0xe5c6[11]](function(){return _0x163ax7[_0xe5c6[10]](201)[_0xe5c6[9]](_0x163axc)})[_0xe5c6[8]](function(_0x163ax9){console[_0xe5c6[24]](_0x163ax9);return handleError(_0x163ax7,_0x163ax9)})};exports[_0xe5c6[28]]=function(_0x163ax6,_0x163ax7){if(_0x163ax6[_0xe5c6[27]][_0xe5c6[20]]){delete _0x163ax6[_0xe5c6[27]][_0xe5c6[20]]};return Agent[_0xe5c6[22]](_0x163ax6[_0xe5c6[21]][_0xe5c6[20]])[_0xe5c6[11]](function(_0x163axb){if(!_0x163axb){return _0x163ax7[_0xe5c6[19]](404)};var _0x163axe=_[_0xe5c6[29]](_0x163axb,_0x163ax6[_0xe5c6[27]]);return _0x163axe[_0xe5c6[30]]()})[_0xe5c6[11]](function(_0x163axb){return _0x163ax7[_0xe5c6[10]](200)[_0xe5c6[9]](_0x163axb)})[_0xe5c6[8]](function(_0x163ax9){return handleError(_0x163ax7,_0x163ax9)})};exports[_0xe5c6[31]]=function(_0x163ax6,_0x163ax7){return Agent[_0xe5c6[22]](_0x163ax6[_0xe5c6[21]][_0xe5c6[20]])[_0xe5c6[11]](function(_0x163axb){if(!_0x163axb){return _0x163ax7[_0xe5c6[19]](404)};return _0x163axb[_0xe5c6[31]]()})[_0xe5c6[11]](function(){return _0x163ax7[_0xe5c6[19]](204)})[_0xe5c6[8]](function(_0x163ax9){return handleError(_0x163ax7,_0x163ax9)})};exports[_0xe5c6[32]]=function(_0x163ax6,_0x163ax7){return Agent[_0xe5c6[31]]({where:{id:_0x163ax6[_0xe5c6[12]][_0xe5c6[33]]},individualHooks:true})[_0xe5c6[11]](function(){return _0x163ax7[_0xe5c6[19]](204)})[_0xe5c6[8]](function(_0x163ax9){return handleError(_0x163ax7,_0x163ax9)})};function handleError(_0x163ax7,_0x163ax9){return _0x163ax7[_0xe5c6[10]](500)[_0xe5c6[9]](_0x163ax9)}
\ No newline at end of file
+var _0x26d9=["\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","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\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","\x54\x65\x61\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\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","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x6C\x6F\x67","\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","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\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","\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","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\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","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\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","\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","\x75\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","\x69\x64\x73","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0x26d9[0];var _=require(_0x26d9[1]);var sequelize=require(_0x26d9[3])[_0x26d9[2]];var Util=require(_0x26d9[4]);var Agent=require(_0x26d9[3])[_0x26d9[5]];var VoiceQueue=require(_0x26d9[3])[_0x26d9[6]];var ChatQueue=require(_0x26d9[3])[_0x26d9[7]];var MailQueue=require(_0x26d9[3])[_0x26d9[8]];var FaxQueue=require(_0x26d9[3])[_0x26d9[9]];var SmsQueue=require(_0x26d9[3])[_0x26d9[10]];var User=require(_0x26d9[3])[_0x26d9[5]];var Team=require(_0x26d9[3])[_0x26d9[11]];var MailRoom=require(_0x26d9[3])[_0x26d9[12]];var List=require(_0x26d9[3])[_0x26d9[13]];exports[_0x26d9[14]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[21]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[15]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[30]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[21]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[37]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:var _0xb011x13=[];return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[44]]({},{attributes:[_0x26d9[39]],include:[{raw:true,model:User,attributes:[_0x26d9[22]]}]}))[_0x26d9[19]](function(_0xb011x14){var _0xb011x15=_[_0x26d9[40]](_0xb011x14[_0x26d9[38]],_0x26d9[39]);_0xb011x14[_0x26d9[38]][_0x26d9[42]](function(_0xb011x16){_0xb011x13=_[_0x26d9[41]](_0xb011x13,_[_0x26d9[40]](_0xb011x16.Users,_0x26d9[22]))});return User[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]})[_0x26d9[26]](_[_0x26d9[43]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]],{id:{$in:_0xb011x13}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xb011x15}},required:false}]}))})[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[45]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:var _0xb011x13=[];return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[46]]({},{attributes:[_0x26d9[22]],include:[{raw:true,model:User,attributes:[_0x26d9[22]]}]}))[_0x26d9[19]](function(_0xb011x14){var _0xb011x17=_[_0x26d9[40]](_0xb011x14[_0x26d9[38]],_0x26d9[22]);_0xb011x14[_0x26d9[38]][_0x26d9[42]](function(_0xb011x16){_0xb011x13=_[_0x26d9[41]](_0xb011x13,_[_0x26d9[40]](_0xb011x16.Users,_0x26d9[22]))});return User[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]})[_0x26d9[26]](_[_0x26d9[43]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]],{id:{$in:_0xb011x13}}),{include:[{model:ChatQueue,where:{id:{$in:_0xb011x17}},required:false}]}))})[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[47]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:var _0xb011x13=[];return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[48]]({},{attributes:[_0x26d9[22]],include:[{raw:true,model:User,attributes:[_0x26d9[22]]}]}))[_0x26d9[19]](function(_0xb011x14){var _0xb011x18=_[_0x26d9[40]](_0xb011x14[_0x26d9[38]],_0x26d9[22]);_0xb011x14[_0x26d9[38]][_0x26d9[42]](function(_0xb011x16){_0xb011x13=_[_0x26d9[41]](_0xb011x13,_[_0x26d9[40]](_0xb011x16.Users,_0x26d9[22]))});return User[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]})[_0x26d9[26]](_[_0x26d9[43]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]],{id:{$in:_0xb011x13}}),{include:[{model:MailQueue,where:{id:{$in:_0xb011x18}},required:false}]}))})[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[49]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:var _0xb011x13=[];return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[50]]({},{attributes:[_0x26d9[22]],include:[{raw:true,model:User,attributes:[_0x26d9[22]]}]}))[_0x26d9[19]](function(_0xb011x14){var _0xb011x19=_[_0x26d9[40]](_0xb011x14[_0x26d9[38]],_0x26d9[22]);_0xb011x14[_0x26d9[38]][_0x26d9[42]](function(_0xb011x16){_0xb011x13=_[_0x26d9[41]](_0xb011x13,_[_0x26d9[40]](_0xb011x16.Users,_0x26d9[22]))});return User[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]})[_0x26d9[26]](_[_0x26d9[43]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]],{id:{$in:_0xb011x13}}),{include:[{model:FaxQueue,where:{id:{$in:_0xb011x19}},required:false}]}))})[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[51]]=function(_0xb011xe,_0xb011xf,_0xb011x10){switch(_0xb011xe[_0x26d9[23]][_0x26d9[29]]){case _0x26d9[23]:var _0xb011x13=[];return User[_0x26d9[24]](_0xb011xe[_0x26d9[23]][_0x26d9[22]],{attributes:[_0x26d9[22]]})[_0x26d9[19]](Util[_0x26d9[52]]({},{attributes:[_0x26d9[22]],include:[{raw:true,model:User,attributes:[_0x26d9[22]]}]}))[_0x26d9[19]](function(_0xb011x14){var _0xb011x1a=_[_0x26d9[40]](_0xb011x14[_0x26d9[38]],_0x26d9[22]);_0xb011x14[_0x26d9[38]][_0x26d9[42]](function(_0xb011x16){_0xb011x13=_[_0x26d9[41]](_0xb011x13,_[_0x26d9[40]](_0xb011x16.Users,_0x26d9[22]))});return User[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]})[_0x26d9[26]](_[_0x26d9[43]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]],{id:{$in:_0xb011x13}}),{include:[{model:SmsQueue,where:{id:{$in:_0xb011x1a}},required:false}]}))})[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)});default:return Agent[_0x26d9[28]](_0x26d9[27],{method:[_0x26d9[32],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[33],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[34],_0xb011xe[_0x26d9[20]]]},{method:[_0x26d9[35],_0xb011xe[_0x26d9[20]]]},_0x26d9[36])[_0x26d9[26]](Util[_0x26d9[25]](_0xb011xe[_0x26d9[20]]))[_0x26d9[19]](function(_0xb011x12){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x12)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})}};exports[_0x26d9[53]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011xf[_0x26d9[17]](_0xb011x1b)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[56]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[58]]({attributes:[_0x26d9[39]]})})[_0x26d9[19]](function(_0xb011x15){return _0xb011xf[_0x26d9[17]]({count:_0xb011x15[_0x26d9[57]],rows:_0xb011x15})})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[59]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[60]]({attributes:[_0x26d9[22]]})})[_0x26d9[19]](function(_0xb011x17){return _0xb011xf[_0x26d9[17]]({count:_0xb011x17[_0x26d9[57]],rows:_0xb011x17})})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[61]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[62]]({attributes:[_0x26d9[22]]})})[_0x26d9[19]](function(_0xb011x18){return _0xb011xf[_0x26d9[17]]({count:_0xb011x18[_0x26d9[57]],rows:_0xb011x18})})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[63]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[64]]({attributes:[_0x26d9[22]]})})[_0x26d9[19]](function(_0xb011x19){return _0xb011xf[_0x26d9[17]]({count:_0xb011x19[_0x26d9[57]],rows:_0xb011x19})})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[65]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[66]]({attributes:[_0x26d9[22]]})})[_0x26d9[19]](function(_0xb011x1a){return _0xb011xf[_0x26d9[17]]({count:_0xb011x1a[_0x26d9[57]],rows:_0xb011x1a})})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[67]]=function(_0xb011xe,_0xb011xf){var _0xb011x1c;_0xb011xe[_0x26d9[68]][_0x26d9[29]]=_0x26d9[27];return sequelize[_0x26d9[73]](function(_0xb011x1d){return Agent[_0x26d9[28]](_0x26d9[27])[_0x26d9[67]](_0xb011xe[_0x26d9[68]],{transaction:_0xb011x1d})[_0x26d9[19]](function(_0xb011x1b){_0xb011x1c=_0xb011x1b;return Team[_0x26d9[72]]({where:{defaultEntry:true}})})[_0x26d9[19]](function(_0xb011x1f){return _0xb011x1f[_0x26d9[71]](_0xb011x1c[_0x26d9[22]],{transaction:_0xb011x1d})})[_0x26d9[19]](function(){return List[_0x26d9[72]]({where:{defaultEntry:true}})})[_0x26d9[19]](function(_0xb011x1e){return _0xb011x1e[_0x26d9[71]](_0xb011x1c[_0x26d9[22]],{transaction:_0xb011x1d})})})[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[18]](201)[_0x26d9[17]](_0xb011x1c)})[_0x26d9[16]](sequelize.UniqueConstraintError,function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return Util[_0x26d9[70]][_0x26d9[69]](_0xb011xf,_0xb011x11)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[74]]=function(_0xb011xe,_0xb011xf){var _0xb011x20;if(_0xb011xe[_0x26d9[68]]&&_0xb011xe[_0x26d9[68]][_0x26d9[57]]){_0xb011xe[_0x26d9[68]][_0x26d9[42]](function(_0xb011x1b){_0xb011x1b[_0x26d9[29]]=_0x26d9[27]})};return sequelize[_0x26d9[73]](function(_0xb011x1d){return Agent[_0x26d9[74]](_0xb011xe[_0x26d9[68]],{transaction:_0xb011x1d,individualHooks:true})[_0x26d9[19]](function(_0xb011x21){_0xb011x20=_0xb011x21;return Team[_0x26d9[72]]({where:{defaultEntry:true}})})[_0x26d9[19]](function(_0xb011x1f){return _0xb011x1f[_0x26d9[75]](_[_0x26d9[40]](_0xb011x20,_0x26d9[22]),{transaction:_0xb011x1d})})})[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[54]](201)})[_0x26d9[16]](sequelize.UniqueConstraintError,function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return Util[_0x26d9[70]][_0x26d9[69]](_0xb011xf,_0xb011x11)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[76]]=function(_0xb011xe,_0xb011xf){if(_0xb011xe[_0x26d9[68]][_0x26d9[22]]){delete _0xb011xe[_0x26d9[68]][_0x26d9[22]];delete _0xb011xe[_0x26d9[68]][_0x26d9[29]]};return sequelize[_0x26d9[73]](function(_0xb011x1d){return Agent[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};var _0xb011x22=_[_0x26d9[43]](_0xb011x1b,_0xb011xe[_0x26d9[68]]);return _0xb011x22[_0x26d9[77]]({transaction:_0xb011x1d})})[_0x26d9[19]](function(_0xb011x1b){return _0xb011xf[_0x26d9[18]](200)[_0x26d9[17]](_0xb011x1b)})})[_0x26d9[16]](sequelize.UniqueConstraintError,function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return Util[_0x26d9[70]][_0x26d9[69]](_0xb011xf,_0xb011x11)})[_0x26d9[16]](function(_0xb011x11){console[_0x26d9[31]](_0xb011x11);return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[78]]=function(_0xb011xe,_0xb011xf){var _0xb011x1c;return Agent[_0x26d9[24]](_0xb011xe[_0x26d9[55]][_0x26d9[22]])[_0x26d9[19]](function(_0xb011x1b){_0xb011x1c=_0xb011x1b;if(!_0xb011x1b){return _0xb011xf[_0x26d9[54]](404)};return _0xb011x1b[_0x26d9[78]]()})[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[54]](204)})[_0x26d9[16]](sequelize.ForeignKeyConstraintError,function(_0xb011x11){return Util[_0x26d9[70]][_0x26d9[79]](_0xb011xf,_0x26d9[27],_0xb011x1c[_0x26d9[39]],_0xb011x11)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[80]]=function(_0xb011xe,_0xb011xf){return Agent[_0x26d9[78]]({where:{id:_0xb011xe[_0x26d9[20]][_0x26d9[81]]},individualHooks:true})[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[54]](204)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};exports[_0x26d9[82]]=function(_0xb011xe,_0xb011xf,_0xb011x10){var _0xb011x23=_0xb011xe[_0x26d9[23]][_0x26d9[22]];var _0xb011x24=String(_0xb011xe[_0x26d9[68]][_0x26d9[83]]);var _0xb011x25=String(_0xb011xe[_0x26d9[68]][_0x26d9[84]]);return Agent[_0x26d9[24]](_0xb011x23)[_0x26d9[19]](function(_0xb011x26){if(_0xb011x26[_0x26d9[85]](_0xb011x24)){_0xb011x26[_0x26d9[86]]=_0xb011x25;_0xb011x26[_0x26d9[77]]()[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[54]](200)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})}else {return _0xb011xf[_0x26d9[54]](403)}})};exports[_0x26d9[87]]=function(_0xb011xe,_0xb011xf,_0xb011x10){var _0xb011x23=_0xb011xe[_0x26d9[55]][_0x26d9[22]];var _0xb011x25=String(_0xb011xe[_0x26d9[68]][_0x26d9[84]]);return Agent[_0x26d9[24]](_0xb011x23)[_0x26d9[19]](function(_0xb011x26){_0xb011x26[_0x26d9[86]]=_0xb011x25;return _0xb011x26[_0x26d9[77]]()})[_0x26d9[19]](function(){return _0xb011xf[_0x26d9[54]](200)})[_0x26d9[16]](function(_0xb011x11){return handleError(_0xb011xf,_0xb011x11)})};function handleError(_0xb011xf,_0xb011x11){return _0xb011xf[_0x26d9[18]](500)[_0x26d9[17]](_0xb011x11)}
\ No newline at end of file