Built motion from commit 0dbf6b8.|0.0.131
[motion.git] / server / api / user / user.controller.js
index 4d92bc6..d37375d 100644 (file)
@@ -1 +1 @@
-var _0xf669=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\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","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\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","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\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","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x6C\x6F\x67","\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x77","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\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","\x73\x61\x76\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x70\x69\x63","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74"];_0xf669[0];var User=require(_0xf669[2])[_0xf669[1]];var Module=require(_0xf669[2])[_0xf669[3]];var VoiceQueue=require(_0xf669[2])[_0xf669[4]];var ChatQueue=require(_0xf669[2])[_0xf669[5]];var MailQueue=require(_0xf669[2])[_0xf669[6]];var FaxQueue=require(_0xf669[2])[_0xf669[7]];var SmsQueue=require(_0xf669[2])[_0xf669[8]];var sequelize=require(_0xf669[2])[_0xf669[9]];var config=require(_0xf669[10]);var Util=require(_0xf669[11]);var passport=require(_0xf669[12]);var moment=require(_0xf669[13]);var jwt=require(_0xf669[14]);var uploadFile=require(_0xf669[15]);var path=require(_0xf669[16]);var fs=require(_0xf669[17]);var _=require(_0xf669[18]);var util=require(_0xf669[19]);var sr=require(_0xf669[20]);exports[_0xf669[21]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){return User[_0xf669[30]](_0xf669[29])[_0xf669[28]](Util[_0xf669[27]](_0x4f54x14[_0xf669[26]]))[_0xf669[25]](function(_0x4f54x18){_0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x18)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[31]]= function(_0x4f54x14,_0x4f54x15){return User[_0xf669[31]]()[_0xf669[25]](function(_0x4f54x19){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x19)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};function handleError(_0x4f54x15,_0x4f54x17){return _0x4f54x15[_0xf669[24]](500)[_0xf669[23]](_0x4f54x17)}exports[_0xf669[32]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){return User[_0xf669[33]]()[_0xf669[25]](function(_0x4f54x1b){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]]({rows:_0x4f54x1b})})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[34]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](404)};return _0x4f54x1d[_0xf669[36]]()})[_0xf669[25]](function(_0x4f54x1c){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1c)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[40]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){_0x4f54x14[_0xf669[42]][_0xf669[41]]= _0x4f54x14[_0xf669[42]][_0xf669[41]]|| _0xf669[29];return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[40]](_0x4f54x14[_0xf669[42]],{transaction:_0x4f54x1e})[_0xf669[25]](function(_0x4f54x1d){return _0x4f54x15[_0xf669[24]](201)[_0xf669[23]](_0x4f54x1d)})})[_0xf669[22]](sequelize.UniqueConstraintError,function(_0x4f54x17){return Util[_0xf669[44]][_0xf669[43]](_0x4f54x15,_0x4f54x17)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[46]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](404)};return _0x4f54x1d[_0xf669[49]](_0x4f54x14[_0xf669[42]][_0xf669[48]])})[_0xf669[25]](function(){return _0x4f54x15[_0xf669[35]](201)})})[_0xf669[22]](function(_0x4f54x17){console[_0xf669[47]](_0x4f54x17);return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[50]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](404)};return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1d)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[51]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x1f=_0x4f54x14[_0xf669[38]][_0xf669[37]];var _0x4f54x20;return User[_0xf669[39]](_0x4f54x1f)[_0xf669[25]](function(_0x4f54x1d){_0x4f54x20= _0x4f54x1d;if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](404)};return _0x4f54x1d[_0xf669[51]]()})[_0xf669[25]](function(_0x4f54x1d){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1d)})[_0xf669[22]](sequelize.ForeignKeyConstraintError,function(_0x4f54x17){return Util[_0xf669[44]][_0xf669[53]](_0x4f54x15,_0xf669[29],_0x4f54x20[_0xf669[52]],_0x4f54x17)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[54]]= function(_0x4f54x14,_0x4f54x15){return User[_0xf669[51]]({where:{id:_0x4f54x14[_0xf669[26]][_0xf669[55]]},individualHooks:true})[_0xf669[25]](function(){return _0x4f54x15[_0xf669[35]](204)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[56]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x1f=_0x4f54x14[_0xf669[29]][_0xf669[37]];var _0x4f54x21=String(_0x4f54x14[_0xf669[42]][_0xf669[57]]);var _0x4f54x22=String(_0x4f54x14[_0xf669[42]][_0xf669[58]]);return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[39]](_0x4f54x1f)[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d[_0xf669[59]](_0x4f54x21)){return _0x4f54x15[_0xf669[35]](403)};_0x4f54x1d[_0xf669[60]]= _0x4f54x22;return _0x4f54x1d[_0xf669[61]]({transaction:_0x4f54x1e})})})[_0xf669[25]](function(){return _0x4f54x15[_0xf669[35]](200)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[62]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x1f=_0x4f54x14[_0xf669[38]][_0xf669[37]];var _0x4f54x22=String(_0x4f54x14[_0xf669[42]][_0xf669[58]]);return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[39]](_0x4f54x1f)[_0xf669[25]](function(_0x4f54x1d){_0x4f54x1d[_0xf669[60]]= _0x4f54x22;return _0x4f54x1d[_0xf669[61]]({transaction:_0x4f54x1e})})})[_0xf669[25]](function(){return _0x4f54x15[_0xf669[35]](200)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[63]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x23= new uploadFile({dest:path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x4f54x24,_0x4f54x25){return sr()+ path[_0xf669[70]](_0x4f54x25[_0xf669[69]])},messages:{maxNumberOfFiles:_0xf669[71],acceptFileTypes:_0xf669[72],invalidRequest:_0xf669[73]}});_0x4f54x23[_0xf669[77]](_0xf669[74],function(_0x4f54x19,_0x4f54x26){if(!_0x4f54x26[_0xf669[75]][_0xf669[69]]){return _0x4f54x15[_0xf669[24]](500)[_0xf669[23]](_0x4f54x23)};return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](404)};return _0x4f54x1d[_0xf669[76]]({userpic:_0x4f54x26[_0xf669[75]][_0xf669[69]]},{transaction:_0x4f54x1e})})[_0xf669[25]](function(_0x4f54x1d){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1d)})})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})});_0x4f54x23[_0xf669[77]](_0xf669[78],function(_0x4f54x17){console[_0xf669[47]](_0xf669[79],_0x4f54x17);return handleError(_0x4f54x15,_0x4f54x17)});_0x4f54x23[_0xf669[80]](_0x4f54x14)};exports[_0xf669[81]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x1f=_0x4f54x14[_0xf669[29]][_0xf669[37]];return User[_0xf669[98]]({where:{id:_0x4f54x1f},attributes:[_0xf669[37],_0xf669[82],_0xf669[52],_0xf669[83],_0xf669[41],_0xf669[84],_0xf669[85],_0xf669[86],_0xf669[87],_0xf669[88],_0xf669[89],_0xf669[90],_0xf669[91],_0xf669[92]],include:[Module,{model:VoiceQueue,as:_0xf669[93]},{model:ChatQueue,as:_0xf669[94]},{model:MailQueue,as:_0xf669[95]},{model:FaxQueue,as:_0xf669[96]},{model:SmsQueue,as:_0xf669[97]}]})[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](401)};return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1d)})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[76]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x1f=_0x4f54x14[_0xf669[29]][_0xf669[37]];delete _0x4f54x14[_0xf669[42]][_0xf669[60]];return sequelize[_0xf669[45]](function(_0x4f54x1e){return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(!_0x4f54x1d){return _0x4f54x15[_0xf669[35]](500)};return _0x4f54x1d[_0xf669[76]](_0x4f54x14[_0xf669[42]],{transaction:_0x4f54x1e})})[_0xf669[25]](function(_0x4f54x1d){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_0x4f54x1d)})})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[99]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x27=path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67],_0x4f54x14[_0xf669[38]][_0xf669[69]]);fs[_0xf669[102]](_0x4f54x27,function(_0x4f54x28){if(!_0x4f54x28){_0x4f54x27= path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67],_0xf669[100])};return _0x4f54x15[_0xf669[101]](_0x4f54x27)})};exports[_0xf669[103]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){if(_0x4f54x14[_0xf669[38]][_0xf669[37]]=== _0xf669[104]){var _0x4f54x27=path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67],_0xf669[105]);fs[_0xf669[102]](_0x4f54x27,function(_0x4f54x28){return _0x4f54x15[_0xf669[101]](_0x4f54x27)})}else {return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]])[_0xf669[25]](function(_0x4f54x1d){if(_0x4f54x1d){var _0x4f54x27=path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67],_0x4f54x1d[_0xf669[84]]?_0x4f54x1d[_0xf669[84]]:_0xf669[100]);fs[_0xf669[102]](_0x4f54x27,function(_0x4f54x28){if(!_0x4f54x28){_0x4f54x27= path[_0xf669[68]](config[_0xf669[64]],_0xf669[65],_0xf669[66],_0xf669[67],_0xf669[100])};return _0x4f54x15[_0xf669[101]](_0x4f54x27)})}else {return _0x4f54x15[_0xf669[35]](500)}})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})}};exports[_0xf669[106]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x20;return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]],{attributes:[_0xf669[37]]})[_0xf669[25]](function(_0x4f54x1d){_0x4f54x20= _0x4f54x1d;if(!_0x4f54x20){return _0x4f54x15[_0xf669[35]](401)};switch(_0x4f54x14[_0xf669[38]][_0xf669[120]]){case _0xf669[109]:return _0x4f54x20[_0xf669[108]]({attributes:[_0xf669[52]]});case _0xf669[111]:return _0x4f54x20[_0xf669[110]]({attributes:[_0xf669[37],_0xf669[52]]});case _0xf669[113]:return _0x4f54x20[_0xf669[112]]({attributes:[_0xf669[37],_0xf669[52]]});case _0xf669[115]:return _0x4f54x20[_0xf669[114]]({attributes:[_0xf669[37],_0xf669[52]]});case _0xf669[117]:return _0x4f54x20[_0xf669[116]]({attributes:[_0xf669[37],_0xf669[52]]});case _0xf669[119]:return _0x4f54x20[_0xf669[118]]({attributes:[_0xf669[37],_0xf669[52]]});default:return _0x4f54x15[_0xf669[35]](401)}})[_0xf669[25]](function(_0x4f54x29){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]](_[_0xf669[107]](_0x4f54x29,function(_0x4f54x2a){var _0x4f54x2b={name:_0x4f54x2a[_0xf669[52]]};if(_0x4f54x2a[_0xf669[37]]){_0x4f54x2b[_0xf669[37]]= _0x4f54x2a[_0xf669[37]]};return _0x4f54x2b}))})[_0xf669[22]](function(_0x4f54x17){console[_0xf669[78]](_0x4f54x17);return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[121]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x20;return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]],{attributes:[_0xf669[37]]})[_0xf669[25]](function(_0x4f54x1d){_0x4f54x20= _0x4f54x1d;if(!_0x4f54x20){return _0x4f54x15[_0xf669[35]](401)};switch(_0x4f54x14[_0xf669[38]][_0xf669[120]]){case _0xf669[109]:return _0x4f54x20[_0xf669[122]](_0x4f54x14[_0xf669[42]]);case _0xf669[111]:return _0x4f54x20[_0xf669[123]](_0x4f54x14[_0xf669[42]]);case _0xf669[113]:return _0x4f54x20[_0xf669[124]](_0x4f54x14[_0xf669[42]]);case _0xf669[115]:return _0x4f54x20[_0xf669[125]](_0x4f54x14[_0xf669[42]]);case _0xf669[117]:return _0x4f54x20[_0xf669[126]](_0x4f54x14[_0xf669[42]]);case _0xf669[119]:return _0x4f54x20[_0xf669[127]](_0x4f54x14[_0xf669[42]]);default:return _0x4f54x15[_0xf669[35]](401)}})[_0xf669[25]](function(_0x4f54x29){return _0x4f54x15[_0xf669[35]](200)})[_0xf669[22]](function(_0x4f54x17){console[_0xf669[78]](_0x4f54x17)})};exports[_0xf669[128]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){var _0x4f54x20;return User[_0xf669[39]](_0x4f54x14[_0xf669[38]][_0xf669[37]],{attributes:[_0xf669[37]]})[_0xf669[25]](function(_0x4f54x1d){_0x4f54x20= _0x4f54x1d;if(!_0x4f54x20){return _0x4f54x15[_0xf669[35]](401)};switch(_0x4f54x14[_0xf669[38]][_0xf669[120]]){case _0xf669[109]:return _0x4f54x20[_0xf669[129]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);case _0xf669[111]:return _0x4f54x20[_0xf669[130]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);case _0xf669[113]:return _0x4f54x20[_0xf669[131]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);case _0xf669[117]:return _0x4f54x20[_0xf669[132]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);case _0xf669[115]:return _0x4f54x20[_0xf669[133]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);case _0xf669[119]:return _0x4f54x20[_0xf669[134]](_0x4f54x14[_0xf669[26]][_0xf669[55]]);default:return _0x4f54x15[_0xf669[35]](401)}})[_0xf669[25]](function(_0x4f54x29){return _0x4f54x15[_0xf669[35]](200)})[_0xf669[22]](function(_0x4f54x17){console[_0xf669[78]](_0x4f54x17)})};exports[_0xf669[135]]= function(_0x4f54x14,_0x4f54x15){var _0x4f54x2c={};_0x4f54x2c[_0x4f54x14[_0xf669[38]][_0xf669[136]]]= _0x4f54x14[_0xf669[42]][_0xf669[137]];return User[_0xf669[28]]({where:_0x4f54x2c})[_0xf669[25]](function(_0x4f54x18){if(_0x4f54x18[_0xf669[138]]){return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]]({isValid:false,value:_0x4f54x14[_0xf669[42]][_0xf669[137]]})};return _0x4f54x15[_0xf669[24]](200)[_0xf669[23]]({isValid:true,value:_0x4f54x14[_0xf669[42]][_0xf669[137]]})})[_0xf669[22]](function(_0x4f54x17){return handleError(_0x4f54x15,_0x4f54x17)})};exports[_0xf669[139]]= function(_0x4f54x14,_0x4f54x15,_0x4f54x16){_0x4f54x15[_0xf669[141]](_0xf669[140])};function handleError(_0x4f54x15,_0x4f54x17){return _0x4f54x15[_0xf669[24]](500)[_0xf669[23]](_0x4f54x17)}
\ No newline at end of file
+var _0x9e74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\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","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\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","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\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","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x6C\x6F\x67","\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x77","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\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","\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","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x61\x76\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x70\x69\x63","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x72\x74","\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x54\x68\x65\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74"];_0x9e74[0];var User=require(_0x9e74[2])[_0x9e74[1]];var Module=require(_0x9e74[2])[_0x9e74[3]];var VoiceQueue=require(_0x9e74[2])[_0x9e74[4]];var ChatQueue=require(_0x9e74[2])[_0x9e74[5]];var MailQueue=require(_0x9e74[2])[_0x9e74[6]];var FaxQueue=require(_0x9e74[2])[_0x9e74[7]];var SmsQueue=require(_0x9e74[2])[_0x9e74[8]];var sequelize=require(_0x9e74[2])[_0x9e74[9]];var config=require(_0x9e74[10]);var Util=require(_0x9e74[11]);var passport=require(_0x9e74[12]);var moment=require(_0x9e74[13]);var jwt=require(_0x9e74[14]);var uploadFile=require(_0x9e74[15]);var path=require(_0x9e74[16]);var fs=require(_0x9e74[17]);var _=require(_0x9e74[18]);var util=require(_0x9e74[19]);var sr=require(_0x9e74[20]);exports[_0x9e74[21]]= function(_0x1895x14,_0x1895x15,_0x1895x16){return User[_0x9e74[30]](_0x9e74[29])[_0x9e74[28]](Util[_0x9e74[27]](_0x1895x14[_0x9e74[26]]))[_0x9e74[25]](function(_0x1895x18){_0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x18)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[31]]= function(_0x1895x14,_0x1895x15){return User[_0x9e74[31]]()[_0x9e74[25]](function(_0x1895x19){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x19)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};function handleError(_0x1895x15,_0x1895x17){return _0x1895x15[_0x9e74[24]](500)[_0x9e74[23]](_0x1895x17)}exports[_0x9e74[32]]= function(_0x1895x14,_0x1895x15,_0x1895x16){return User[_0x9e74[33]]()[_0x9e74[25]](function(_0x1895x1b){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]]({rows:_0x1895x1b})})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[34]]= function(_0x1895x14,_0x1895x15,_0x1895x16){return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](404)};return _0x1895x1d[_0x9e74[36]]()})[_0x9e74[25]](function(_0x1895x1c){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1c)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[40]]= function(_0x1895x14,_0x1895x15,_0x1895x16){_0x1895x14[_0x9e74[42]][_0x9e74[41]]= _0x1895x14[_0x9e74[42]][_0x9e74[41]]|| _0x9e74[29];return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[40]](_0x1895x14[_0x9e74[42]],{transaction:_0x1895x1e})[_0x9e74[25]](function(_0x1895x1d){return _0x1895x15[_0x9e74[24]](201)[_0x9e74[23]](_0x1895x1d)})})[_0x9e74[22]](sequelize.UniqueConstraintError,function(_0x1895x17){return Util[_0x9e74[44]][_0x9e74[43]](_0x1895x15,_0x1895x17)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[46]]= function(_0x1895x14,_0x1895x15,_0x1895x16){return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](404)};return _0x1895x1d[_0x9e74[49]](_0x1895x14[_0x9e74[42]][_0x9e74[48]])})[_0x9e74[25]](function(){return _0x1895x15[_0x9e74[35]](201)})})[_0x9e74[22]](function(_0x1895x17){console[_0x9e74[47]](_0x1895x17);return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[50]]= function(_0x1895x14,_0x1895x15,_0x1895x16){return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](404)};return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1d)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[51]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x1f=_0x1895x14[_0x9e74[38]][_0x9e74[37]];var _0x1895x20;return User[_0x9e74[39]](_0x1895x1f)[_0x9e74[25]](function(_0x1895x1d){_0x1895x20= _0x1895x1d;if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](404)};return _0x1895x1d[_0x9e74[51]]()})[_0x9e74[25]](function(_0x1895x1d){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1d)})[_0x9e74[22]](sequelize.ForeignKeyConstraintError,function(_0x1895x17){return Util[_0x9e74[44]][_0x9e74[53]](_0x1895x15,_0x9e74[29],_0x1895x20[_0x9e74[52]],_0x1895x17)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[54]]= function(_0x1895x14,_0x1895x15){return User[_0x9e74[51]]({where:{id:_0x1895x14[_0x9e74[26]][_0x9e74[55]]},individualHooks:true})[_0x9e74[25]](function(){return _0x1895x15[_0x9e74[35]](204)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[56]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x1f=_0x1895x14[_0x9e74[29]][_0x9e74[37]];var _0x1895x21=String(_0x1895x14[_0x9e74[42]][_0x9e74[57]]);var _0x1895x22=String(_0x1895x14[_0x9e74[42]][_0x9e74[58]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!#$%&?._\-"])[0-9a-zA-Z!#$%&?._\-]{8,}$/[_0x9e74[59]](_0x1895x22))){throw  new Error(_0x9e74[60])};return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[39]](_0x1895x1f)[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d[_0x9e74[61]](_0x1895x21)){return _0x1895x15[_0x9e74[35]](403)}else {_0x1895x1d[_0x9e74[62]]= _0x1895x22;return _0x1895x1d[_0x9e74[63]]({transaction:_0x1895x1e})[_0x9e74[25]](function(){return _0x1895x15[_0x9e74[35]](200)})}})})[_0x9e74[22]](function(_0x1895x17){console[_0x9e74[47]](_0x1895x17);return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[64]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x1f=_0x1895x14[_0x9e74[38]][_0x9e74[37]];var _0x1895x22=String(_0x1895x14[_0x9e74[42]][_0x9e74[58]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!#$%&?._\-"])[0-9a-zA-Z!#$%&?._\-]{8,}$/[_0x9e74[59]](_0x1895x22))){throw  new Error(_0x9e74[60])};return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[39]](_0x1895x1f)[_0x9e74[25]](function(_0x1895x1d){_0x1895x1d[_0x9e74[62]]= _0x1895x22;return _0x1895x1d[_0x9e74[63]]({transaction:_0x1895x1e})})})[_0x9e74[25]](function(){return _0x1895x15[_0x9e74[35]](200)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[65]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x23= new uploadFile({dest:path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x1895x24,_0x1895x25){return sr()+ path[_0x9e74[72]](_0x1895x25[_0x9e74[71]])},messages:{maxNumberOfFiles:_0x9e74[73],acceptFileTypes:_0x9e74[74],invalidRequest:_0x9e74[75]}});_0x1895x23[_0x9e74[79]](_0x9e74[76],function(_0x1895x19,_0x1895x26){if(!_0x1895x26[_0x9e74[77]][_0x9e74[71]]){return _0x1895x15[_0x9e74[24]](500)[_0x9e74[23]](_0x1895x23)};return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](404)};return _0x1895x1d[_0x9e74[78]]({userpic:_0x1895x26[_0x9e74[77]][_0x9e74[71]]},{transaction:_0x1895x1e})})[_0x9e74[25]](function(_0x1895x1d){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1d)})})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})});_0x1895x23[_0x9e74[79]](_0x9e74[80],function(_0x1895x17){console[_0x9e74[47]](_0x9e74[81],_0x1895x17);return handleError(_0x1895x15,_0x1895x17)});_0x1895x23[_0x9e74[82]](_0x1895x14)};exports[_0x9e74[83]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x1f=_0x1895x14[_0x9e74[29]][_0x9e74[37]];return User[_0x9e74[103]]({where:{id:_0x1895x1f},attributes:[_0x9e74[37],_0x9e74[84],_0x9e74[52],_0x9e74[85],_0x9e74[41],_0x9e74[86],_0x9e74[87],_0x9e74[88],_0x9e74[89],_0x9e74[90],_0x9e74[91],_0x9e74[92],_0x9e74[93],_0x9e74[94],_0x9e74[95],_0x9e74[96],_0x9e74[97]],include:[Module,{model:VoiceQueue,as:_0x9e74[98]},{model:ChatQueue,as:_0x9e74[99]},{model:MailQueue,as:_0x9e74[100]},{model:FaxQueue,as:_0x9e74[101]},{model:SmsQueue,as:_0x9e74[102]}]})[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](401)};return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1d)})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[78]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x1f=_0x1895x14[_0x9e74[29]][_0x9e74[37]];delete _0x1895x14[_0x9e74[42]][_0x9e74[62]];delete _0x1895x14[_0x9e74[42]][_0x9e74[52]];return sequelize[_0x9e74[45]](function(_0x1895x1e){return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(!_0x1895x1d){return _0x1895x15[_0x9e74[35]](500)};return _0x1895x1d[_0x9e74[78]](_0x1895x14[_0x9e74[42]],{transaction:_0x1895x1e})})[_0x9e74[25]](function(_0x1895x1d){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_0x1895x1d)})})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[104]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x27=path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69],_0x1895x14[_0x9e74[38]][_0x9e74[71]]);fs[_0x9e74[107]](_0x1895x27,function(_0x1895x28){if(!_0x1895x28){_0x1895x27= path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69],_0x9e74[105])};return _0x1895x15[_0x9e74[106]](_0x1895x27)})};exports[_0x9e74[108]]= function(_0x1895x14,_0x1895x15,_0x1895x16){if(_0x1895x14[_0x9e74[38]][_0x9e74[37]]=== _0x9e74[109]){var _0x1895x27=path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69],_0x9e74[110]);fs[_0x9e74[107]](_0x1895x27,function(_0x1895x28){return _0x1895x15[_0x9e74[106]](_0x1895x27)})}else {return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]])[_0x9e74[25]](function(_0x1895x1d){if(_0x1895x1d){var _0x1895x27=path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69],_0x1895x1d[_0x9e74[86]]?_0x1895x1d[_0x9e74[86]]:_0x9e74[105]);fs[_0x9e74[107]](_0x1895x27,function(_0x1895x28){if(!_0x1895x28){_0x1895x27= path[_0x9e74[70]](config[_0x9e74[66]],_0x9e74[67],_0x9e74[68],_0x9e74[69],_0x9e74[105])};return _0x1895x15[_0x9e74[106]](_0x1895x27)})}else {return _0x1895x15[_0x9e74[35]](500)}})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})}};exports[_0x9e74[111]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x20;return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]],{attributes:[_0x9e74[37]]})[_0x9e74[25]](function(_0x1895x1d){_0x1895x20= _0x1895x1d;if(!_0x1895x20){return _0x1895x15[_0x9e74[35]](401)};switch(_0x1895x14[_0x9e74[38]][_0x9e74[126]]){case _0x9e74[114]:return _0x1895x20[_0x9e74[113]]({attributes:[_0x9e74[52]]});case _0x9e74[116]:return _0x1895x20[_0x9e74[115]]({attributes:[_0x9e74[37],_0x9e74[52]]});case _0x9e74[118]:return _0x1895x20[_0x9e74[117]]({attributes:[_0x9e74[37],_0x9e74[52]]});case _0x9e74[120]:return _0x1895x20[_0x9e74[119]]({attributes:[_0x9e74[37],_0x9e74[52]]});case _0x9e74[122]:return _0x1895x20[_0x9e74[121]]({attributes:[_0x9e74[37],_0x9e74[52]]});case _0x9e74[124]:return _0x1895x20[_0x9e74[123]]({attributes:[_0x9e74[37],_0x9e74[52]]});default:throw  new Error(_0x9e74[125])}})[_0x9e74[25]](function(_0x1895x29){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]](_[_0x9e74[112]](_0x1895x29,function(_0x1895x2a){var _0x1895x2b={name:_0x1895x2a[_0x9e74[52]]};if(_0x1895x2a[_0x9e74[37]]){_0x1895x2b[_0x9e74[37]]= _0x1895x2a[_0x9e74[37]]};return _0x1895x2b}))})[_0x9e74[22]](function(_0x1895x17){console[_0x9e74[80]](_0x1895x17);return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[127]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x20;return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]],{attributes:[_0x9e74[37]]})[_0x9e74[25]](function(_0x1895x1d){_0x1895x20= _0x1895x1d;if(!_0x1895x20){return _0x1895x15[_0x9e74[35]](401)};switch(_0x1895x14[_0x9e74[38]][_0x9e74[126]]){case _0x9e74[114]:return _0x1895x20[_0x9e74[128]](_0x1895x14[_0x9e74[42]]);case _0x9e74[116]:return _0x1895x20[_0x9e74[129]](_0x1895x14[_0x9e74[42]]);case _0x9e74[118]:return _0x1895x20[_0x9e74[130]](_0x1895x14[_0x9e74[42]]);case _0x9e74[120]:return _0x1895x20[_0x9e74[131]](_0x1895x14[_0x9e74[42]]);case _0x9e74[122]:return _0x1895x20[_0x9e74[132]](_0x1895x14[_0x9e74[42]]);case _0x9e74[124]:return _0x1895x20[_0x9e74[133]](_0x1895x14[_0x9e74[42]]);default:return null}})[_0x9e74[25]](function(_0x1895x29){return _0x1895x15[_0x9e74[35]](_0x1895x29?200:401)})[_0x9e74[22]](function(_0x1895x17){console[_0x9e74[80]](_0x1895x17)})};exports[_0x9e74[134]]= function(_0x1895x14,_0x1895x15,_0x1895x16){var _0x1895x20;return User[_0x9e74[39]](_0x1895x14[_0x9e74[38]][_0x9e74[37]],{attributes:[_0x9e74[37]]})[_0x9e74[25]](function(_0x1895x1d){_0x1895x20= _0x1895x1d;if(!_0x1895x20){return _0x1895x15[_0x9e74[35]](401)};switch(_0x1895x14[_0x9e74[38]][_0x9e74[126]]){case _0x9e74[114]:return _0x1895x20[_0x9e74[135]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);case _0x9e74[116]:return _0x1895x20[_0x9e74[136]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);case _0x9e74[118]:return _0x1895x20[_0x9e74[137]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);case _0x9e74[122]:return _0x1895x20[_0x9e74[138]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);case _0x9e74[120]:return _0x1895x20[_0x9e74[139]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);case _0x9e74[124]:return _0x1895x20[_0x9e74[140]](_0x1895x14[_0x9e74[26]][_0x9e74[55]]);default:return null}})[_0x9e74[25]](function(_0x1895x29){return _0x1895x15[_0x9e74[35]](_0x1895x29?200:401)})[_0x9e74[22]](function(_0x1895x17){console[_0x9e74[80]](_0x1895x17)})};exports[_0x9e74[141]]= function(_0x1895x14,_0x1895x15){var _0x1895x2c={};_0x1895x2c[_0x1895x14[_0x9e74[38]][_0x9e74[142]]]= _0x1895x14[_0x9e74[42]][_0x9e74[143]];return User[_0x9e74[28]]({where:_0x1895x2c})[_0x9e74[25]](function(_0x1895x18){if(_0x1895x18[_0x9e74[144]]){return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]]({isValid:false,value:_0x1895x14[_0x9e74[42]][_0x9e74[143]]})};return _0x1895x15[_0x9e74[24]](200)[_0x9e74[23]]({isValid:true,value:_0x1895x14[_0x9e74[42]][_0x9e74[143]]})})[_0x9e74[22]](function(_0x1895x17){return handleError(_0x1895x15,_0x1895x17)})};exports[_0x9e74[145]]= function(_0x1895x14,_0x1895x15,_0x1895x16){_0x1895x15[_0x9e74[147]](_0x9e74[146])};function handleError(_0x1895x15,_0x1895x17){return _0x1895x15[_0x9e74[24]](500)[_0x9e74[23]](_0x1895x17)}
\ No newline at end of file