Built motion from commit f1f5024.|1.0.16
[motion.git] / server / api / fax_room / fax_room.controller.js
index 7c0289c..77d515b 100644 (file)
@@ -1 +1 @@
-var _0x4e71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\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\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x63\x68\x61\x6E\x67\x65\x64","\x66\x61\x78\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x6B\x65\x79\x42\x79","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x4C\x4F\x57\x45\x52\x28\x73\x74\x61\x74\x75\x73\x29\x20\x41\x53\x20\x73\x74\x61\x74\x75\x73\x2C\x20\x43\x4F\x55\x4E\x54\x28\x69\x64\x29\x20\x41\x53\x20\x63\x6F\x75\x6E\x74\x20\x46\x52\x4F\x4D\x20\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0x4e71[0];var _=require(_0x4e71[1]);var util=require(_0x4e71[2]);var Util=require(_0x4e71[3]);var moment=require(_0x4e71[4]);var sequelize=require(_0x4e71[6])[_0x4e71[5]];var User=require(_0x4e71[6])[_0x4e71[7]];var Agent=require(_0x4e71[6])[_0x4e71[7]];var Contact=require(_0x4e71[6])[_0x4e71[8]];var FaxRoom=require(_0x4e71[6])[_0x4e71[9]];var FaxMessage=require(_0x4e71[6])[_0x4e71[10]];var FaxAccount=require(_0x4e71[6])[_0x4e71[11]];var FaxApplication=require(_0x4e71[6])[_0x4e71[12]];var FaxQueue=require(_0x4e71[6])[_0x4e71[13]];var FaxAttachment=require(_0x4e71[6])[_0x4e71[14]];exports[_0x4e71[15]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[24]](_0x4e71[23])[_0x4e71[22]](Util[_0x4e71[21]](_0x43bfxf[_0x4e71[20]]))[_0x4e71[19]](function(_0x43bfx13){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx13)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[25]]= function(_0x43bfxf,_0x43bfx10){return FaxRoom[_0x4e71[25]]()[_0x4e71[19]](function(_0x43bfx14){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx14)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};function getFaxQueues(_0x43bfx16){return function(){switch(_0x43bfx16[_0x4e71[31]]){case _0x4e71[30]:return User[_0x4e71[29]](_0x43bfx16[_0x4e71[26]],{attributes:[_0x4e71[26]]})[_0x4e71[19]](Util[_0x4e71[28]]({},{attributes:[_0x4e71[26]]}))[_0x4e71[19]](function(_0x43bfx17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0x4e71[27]](_0x43bfx17,_0x4e71[26])}}}}}});default:return {}}}}exports[_0x4e71[32]]= function(_0x43bfxf,_0x43bfx10){return Promise[_0x4e71[39]]([])[_0x4e71[19]](getFaxQueues(_0x43bfxf[_0x4e71[30]]))[_0x4e71[19]](function(_0x43bfx19){return FaxRoom[_0x4e71[38]](_[_0x4e71[37]](Util[_0x4e71[21]](_0x43bfxf[_0x4e71[20]],{status:_0x4e71[34],updatedAt:{$gte:moment()[_0x4e71[36]](_0x4e71[35])}}),_0x43bfx19))})[_0x4e71[19]](function(_0x43bfx18){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]]({value:_0x43bfx18})})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[33]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[40]]= function(_0x43bfxf,_0x43bfx10){return Promise[_0x4e71[39]]([])[_0x4e71[19]](getFaxQueues(_0x43bfxf[_0x4e71[30]]))[_0x4e71[19]](function(_0x43bfx19){return FaxRoom[_0x4e71[38]](_[_0x4e71[37]](Util[_0x4e71[21]](_0x43bfxf[_0x4e71[20]],{status:_0x4e71[41],updatedAt:{$gte:moment()[_0x4e71[36]](_0x4e71[35])}}),_0x43bfx19))})[_0x4e71[19]](function(_0x43bfx18){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]]({value:_0x43bfx18})})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[33]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[42]]= function(_0x43bfxf,_0x43bfx10){return Promise[_0x4e71[39]]([])[_0x4e71[19]](getFaxQueues(_0x43bfxf[_0x4e71[30]]))[_0x4e71[19]](function(_0x43bfx19){return FaxRoom[_0x4e71[38]](_[_0x4e71[37]](Util[_0x4e71[21]](_0x43bfxf[_0x4e71[20]],{status:_0x4e71[43],updatedAt:{$gte:moment()[_0x4e71[36]](_0x4e71[35])}}),_0x43bfx19))})[_0x4e71[19]](function(_0x43bfx18){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]]({value:_0x43bfx18})})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[33]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[44]]= function(_0x43bfxf,_0x43bfx10){return Promise[_0x4e71[39]]([])[_0x4e71[19]](getFaxQueues(_0x43bfxf[_0x4e71[30]]))[_0x4e71[19]](function(_0x43bfx19){return FaxRoom[_0x4e71[38]](_[_0x4e71[37]](Util[_0x4e71[21]](_0x43bfxf[_0x4e71[20]],{status:_0x4e71[45],updatedAt:{$gte:moment()[_0x4e71[36]](_0x4e71[35])}}),_0x43bfx19))})[_0x4e71[19]](function(_0x43bfx18){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]]({value:_0x43bfx18})})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[33]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[46]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){switch(_0x43bfxf[_0x4e71[30]][_0x4e71[31]]){case _0x4e71[52]:return sequelize[_0x4e71[20]](_0x4e71[48],{replacements:{status:_0x4e71[49],id:_0x43bfxf[_0x4e71[30]][_0x4e71[26]]},type:sequelize[_0x4e71[51]][_0x4e71[50]]})[_0x4e71[19]](function(_0x43bfx13){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx13)})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[47]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)});default:return sequelize[_0x4e71[20]](_0x4e71[53],{replacements:{status:_0x4e71[49],id:_0x43bfxf[_0x4e71[30]][_0x4e71[26]]},type:sequelize[_0x4e71[51]][_0x4e71[50]]})[_0x4e71[19]](function(_0x43bfx13){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx13)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})}};exports[_0x4e71[54]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[56]]({where:{UserId:_0x43bfxf[_0x4e71[55]][_0x4e71[26]]},include:[{all:true}]})[_0x4e71[19]](function(_0x43bfx1a){return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx1a)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[57]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){var _0x43bfx1b;if(_0x43bfxf[_0x4e71[30]][_0x4e71[31]]=== _0x4e71[52]){return FaxRoom[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){_0x43bfx1b= _0x43bfx1c;if(!_0x43bfx1b){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx1b[_0x4e71[60]]({status:_0x4e71[43]},{userId:_0x43bfxf[_0x4e71[30]][_0x4e71[26]]})})[_0x4e71[19]](function(){return _0x43bfx1b[_0x4e71[59]](_0x43bfxf[_0x4e71[30]][_0x4e71[26]])})[_0x4e71[19]](function(){return _0x43bfx10[_0x4e71[58]](200)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})}};exports[_0x4e71[61]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[24]](_0x4e71[23])[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){if(!_0x43bfx1c){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx10[_0x4e71[17]](_0x43bfx1c)})[_0x4e71[16]](function(_0x43bfx12){console[_0x4e71[47]](_0x43bfx12);return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[62]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){if(!_0x43bfx1c){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx1c[_0x4e71[67]]({attributes:[_0x4e71[26],_0x4e71[63],_0x4e71[64],_0x4e71[65],_0x4e71[31],_0x4e71[66]]})})[_0x4e71[19]](function(_0x43bfx1d){return _0x43bfx10[_0x4e71[17]](_0x43bfx1d)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[68]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[68]](_0x43bfxf[_0x4e71[69]])[_0x4e71[19]](function(_0x43bfx1c){return _0x43bfx10[_0x4e71[18]](201)[_0x4e71[17]](_0x43bfx1c)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[70]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){_0x43bfxf[_0x4e71[69]][_0x4e71[71]]= _0x43bfxf[_0x4e71[30]][_0x4e71[26]];_0x43bfxf[_0x4e71[69]][_0x4e71[72]]= _0x43bfxf[_0x4e71[55]][_0x4e71[26]];_0x43bfxf[_0x4e71[69]][_0x4e71[73]]= _0x43bfxf[_0x4e71[69]][_0x4e71[73]];return FaxMessage[_0x4e71[68]](_0x43bfxf[_0x4e71[69]],{include:[{model:FaxAttachment}],user:_0x43bfxf[_0x4e71[30]]})[_0x4e71[19]](function(_0x43bfx1e){if(_0x43bfx1e){_0x43bfxf[_0x4e71[77]][_0x4e71[76]][_0x4e71[75]][_0x4e71[17]]({message:_0x4e71[74],doc:_0x43bfx1e,options:{user:_0x43bfxf[_0x4e71[30]]}})};return _0x43bfx10[_0x4e71[18]](201)[_0x4e71[17]](_0x43bfx1e)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[60]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){if(!_0x43bfx1c){return _0x43bfx10[_0x4e71[58]](404)};if(_0x43bfx1c[_0x4e71[80]]){throw  new Error(_0x4e71[81])};var _0x43bfx1f=_[_0x4e71[37]](_0x43bfx1c,_0x43bfxf[_0x4e71[69]]);return _0x43bfx1f[_0x4e71[82]]()})[_0x4e71[19]](function(_0x43bfx1c){if(_0x43bfx1c[_0x4e71[78]](_0x4e71[18])&& _0x43bfx1c[_0x4e71[18]]=== _0x4e71[45]){_0x43bfxf[_0x4e71[77]][_0x4e71[76]][_0x4e71[75]][_0x4e71[17]]({message:_0x4e71[79],doc:_0x43bfx1c})};return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx1c)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[83]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){if(!_0x43bfx1c){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx1c[_0x4e71[85]](_0x43bfxf[_0x4e71[69]][_0x4e71[84]],{individualHooks:true})})[_0x4e71[19]](function(){return _0x43bfx10[_0x4e71[58]](200)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[86]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxRoom[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1c){if(!_0x43bfx1c){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx1c[_0x4e71[86]]()})[_0x4e71[19]](function(){return _0x43bfx10[_0x4e71[58]](204)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[87]]= function(_0x43bfxf,_0x43bfx10){return FaxRoom[_0x4e71[86]]({where:{id:_0x43bfxf[_0x4e71[20]][_0x4e71[88]]},individualHooks:true})[_0x4e71[19]](function(){return _0x43bfx10[_0x4e71[58]](200)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};function handleError(_0x43bfx10,_0x43bfx12){return _0x43bfx10[_0x4e71[18]](500)[_0x4e71[17]](_0x43bfx12)}exports[_0x4e71[89]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){var _0x43bfx21={where:{id:_0x43bfxf[_0x4e71[55]][_0x4e71[26]][_0x4e71[91]](_0x4e71[90])},user:_0x43bfxf[_0x4e71[30]],individualHooks:true};return FaxRoom[_0x4e71[60]](_0x43bfxf[_0x4e71[69]],_0x43bfx21)[_0x4e71[19]](function(_0x43bfx22){if(!_0x43bfx22){return _0x43bfx10[_0x4e71[58]](404)};return _0x43bfx22})[_0x4e71[19]](function(_0x43bfx22){return _0x43bfx10[_0x4e71[58]](200)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[92]]= function(_0x43bfxf,_0x43bfx10){return sequelize[_0x4e71[20]](_0x4e71[95],{type:sequelize[_0x4e71[51]][_0x4e71[50]]})[_0x4e71[19]](function(_0x43bfx23){var _0x43bfx24=_[_0x4e71[37]]({new:0,open:0,pending:0,closed:0},_[_0x4e71[94]](_[_0x4e71[93]](_0x43bfx23,_0x4e71[18]),_0x4e71[38]));return _0x43bfx10[_0x4e71[18]](200)[_0x4e71[17]](_0x43bfx24)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})};exports[_0x4e71[96]]= function(_0x43bfxf,_0x43bfx10,_0x43bfx11){return FaxMessage[_0x4e71[29]](_0x43bfxf[_0x4e71[55]][_0x4e71[26]])[_0x4e71[19]](function(_0x43bfx1e){return _0x43bfx1e[_0x4e71[97]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0x4e71[26],_0x4e71[63],_0x4e71[64],_0x4e71[65]]}]},{model:User,attributes:[_0x4e71[26],_0x4e71[63],_0x4e71[64],_0x4e71[65]]}]})})[_0x4e71[19]](function(_0x43bfx1c){return _0x43bfx10[_0x4e71[17]](_0x43bfx1c)})[_0x4e71[16]](function(_0x43bfx12){return handleError(_0x43bfx10,_0x43bfx12)})}
\ No newline at end of file
+var _0xd543=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\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\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x66\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x63\x68\x61\x6E\x67\x65\x64","\x66\x61\x78\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x56\x61\x6C\x75\x65\x73","\x6B\x65\x79\x42\x79","\x6D\x61\x70\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x4C\x4F\x57\x45\x52\x28\x73\x74\x61\x74\x75\x73\x29\x20\x41\x53\x20\x73\x74\x61\x74\x75\x73\x2C\x20\x43\x4F\x55\x4E\x54\x28\x69\x64\x29\x20\x41\x53\x20\x63\x6F\x75\x6E\x74\x20\x46\x52\x4F\x4D\x20\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xd543[0];var _=require(_0xd543[1]);var util=require(_0xd543[2]);var Util=require(_0xd543[3]);var moment=require(_0xd543[4]);var sequelize=require(_0xd543[6])[_0xd543[5]];var User=require(_0xd543[6])[_0xd543[7]];var Agent=require(_0xd543[6])[_0xd543[7]];var Contact=require(_0xd543[6])[_0xd543[8]];var FaxRoom=require(_0xd543[6])[_0xd543[9]];var FaxMessage=require(_0xd543[6])[_0xd543[10]];var FaxAccount=require(_0xd543[6])[_0xd543[11]];var FaxApplication=require(_0xd543[6])[_0xd543[12]];var FaxQueue=require(_0xd543[6])[_0xd543[13]];var FaxAttachment=require(_0xd543[6])[_0xd543[14]];exports[_0xd543[15]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[24]](_0xd543[23])[_0xd543[22]](Util[_0xd543[21]](_0x7cbbxf[_0xd543[20]]))[_0xd543[19]](function(_0x7cbbx13){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx13)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[25]]= function(_0x7cbbxf,_0x7cbbx10){return FaxRoom[_0xd543[25]]()[_0xd543[19]](function(_0x7cbbx14){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx14)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};function getFaxQueues(_0x7cbbx16){return function(){switch(_0x7cbbx16[_0xd543[31]]){case _0xd543[30]:return User[_0xd543[29]](_0x7cbbx16[_0xd543[26]],{attributes:[_0xd543[26]]})[_0xd543[19]](Util[_0xd543[28]]({},{attributes:[_0xd543[26]]}))[_0xd543[19]](function(_0x7cbbx17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0xd543[27]](_0x7cbbx17,_0xd543[26])}}}}}});default:return {}}}}exports[_0xd543[32]]= function(_0x7cbbxf,_0x7cbbx10){return Promise[_0xd543[39]]([])[_0xd543[19]](getFaxQueues(_0x7cbbxf[_0xd543[30]]))[_0xd543[19]](function(_0x7cbbx19){return FaxRoom[_0xd543[38]](_[_0xd543[37]](Util[_0xd543[21]](_0x7cbbxf[_0xd543[20]],{status:_0xd543[34],updatedAt:{$gte:moment()[_0xd543[36]](_0xd543[35])}}),_0x7cbbx19))})[_0xd543[19]](function(_0x7cbbx18){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]]({value:_0x7cbbx18})})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[33]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[40]]= function(_0x7cbbxf,_0x7cbbx10){return Promise[_0xd543[39]]([])[_0xd543[19]](getFaxQueues(_0x7cbbxf[_0xd543[30]]))[_0xd543[19]](function(_0x7cbbx19){return FaxRoom[_0xd543[38]](_[_0xd543[37]](Util[_0xd543[21]](_0x7cbbxf[_0xd543[20]],{status:_0xd543[41],updatedAt:{$gte:moment()[_0xd543[36]](_0xd543[35])}}),_0x7cbbx19))})[_0xd543[19]](function(_0x7cbbx18){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]]({value:_0x7cbbx18})})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[33]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[42]]= function(_0x7cbbxf,_0x7cbbx10){return Promise[_0xd543[39]]([])[_0xd543[19]](getFaxQueues(_0x7cbbxf[_0xd543[30]]))[_0xd543[19]](function(_0x7cbbx19){return FaxRoom[_0xd543[38]](_[_0xd543[37]](Util[_0xd543[21]](_0x7cbbxf[_0xd543[20]],{status:_0xd543[43],updatedAt:{$gte:moment()[_0xd543[36]](_0xd543[35])}}),_0x7cbbx19))})[_0xd543[19]](function(_0x7cbbx18){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]]({value:_0x7cbbx18})})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[33]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[44]]= function(_0x7cbbxf,_0x7cbbx10){return Promise[_0xd543[39]]([])[_0xd543[19]](getFaxQueues(_0x7cbbxf[_0xd543[30]]))[_0xd543[19]](function(_0x7cbbx19){return FaxRoom[_0xd543[38]](_[_0xd543[37]](Util[_0xd543[21]](_0x7cbbxf[_0xd543[20]],{status:_0xd543[45],updatedAt:{$gte:moment()[_0xd543[36]](_0xd543[35])}}),_0x7cbbx19))})[_0xd543[19]](function(_0x7cbbx18){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]]({value:_0x7cbbx18})})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[33]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[46]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){switch(_0x7cbbxf[_0xd543[30]][_0xd543[31]]){case _0xd543[52]:return sequelize[_0xd543[20]](_0xd543[48],{replacements:{status:_0xd543[49],id:_0x7cbbxf[_0xd543[30]][_0xd543[26]]},type:sequelize[_0xd543[51]][_0xd543[50]]})[_0xd543[19]](function(_0x7cbbx13){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx13)})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[47]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)});default:return sequelize[_0xd543[20]](_0xd543[53],{replacements:{status:_0xd543[49],id:_0x7cbbxf[_0xd543[30]][_0xd543[26]]},type:sequelize[_0xd543[51]][_0xd543[50]]})[_0xd543[19]](function(_0x7cbbx13){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx13)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})}};exports[_0xd543[54]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[56]]({where:{UserId:_0x7cbbxf[_0xd543[55]][_0xd543[26]]},include:[{all:true}]})[_0xd543[19]](function(_0x7cbbx1a){return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx1a)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[57]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){var _0x7cbbx1b;if(_0x7cbbxf[_0xd543[30]][_0xd543[31]]=== _0xd543[52]){return FaxRoom[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){_0x7cbbx1b= _0x7cbbx1c;if(!_0x7cbbx1b){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx1b[_0xd543[60]]({status:_0xd543[43]},{userId:_0x7cbbxf[_0xd543[30]][_0xd543[26]]})})[_0xd543[19]](function(){return _0x7cbbx1b[_0xd543[59]](_0x7cbbxf[_0xd543[30]][_0xd543[26]])})[_0xd543[19]](function(){return _0x7cbbx10[_0xd543[58]](200)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})}};exports[_0xd543[61]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[24]](_0xd543[23])[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){if(!_0x7cbbx1c){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx10[_0xd543[17]](_0x7cbbx1c)})[_0xd543[16]](function(_0x7cbbx12){console[_0xd543[47]](_0x7cbbx12);return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[62]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){if(!_0x7cbbx1c){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx1c[_0xd543[67]]({attributes:[_0xd543[26],_0xd543[63],_0xd543[64],_0xd543[65],_0xd543[31],_0xd543[66]]})})[_0xd543[19]](function(_0x7cbbx1d){return _0x7cbbx10[_0xd543[17]](_0x7cbbx1d)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[68]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[68]](_0x7cbbxf[_0xd543[69]])[_0xd543[19]](function(_0x7cbbx1c){return _0x7cbbx10[_0xd543[18]](201)[_0xd543[17]](_0x7cbbx1c)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[70]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){_0x7cbbxf[_0xd543[69]][_0xd543[71]]= _0x7cbbxf[_0xd543[30]][_0xd543[26]];_0x7cbbxf[_0xd543[69]][_0xd543[72]]= _0x7cbbxf[_0xd543[55]][_0xd543[26]];_0x7cbbxf[_0xd543[69]][_0xd543[73]]= _0x7cbbxf[_0xd543[69]][_0xd543[73]];return FaxMessage[_0xd543[68]](_0x7cbbxf[_0xd543[69]],{include:[{model:FaxAttachment}],user:_0x7cbbxf[_0xd543[30]]})[_0xd543[19]](function(_0x7cbbx1e){if(_0x7cbbx1e){_0x7cbbxf[_0xd543[77]][_0xd543[76]][_0xd543[75]][_0xd543[17]]({message:_0xd543[74],doc:_0x7cbbx1e,options:{user:_0x7cbbxf[_0xd543[30]]}})};return _0x7cbbx10[_0xd543[18]](201)[_0xd543[17]](_0x7cbbx1e)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[60]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){if(!_0x7cbbx1c){return _0x7cbbx10[_0xd543[58]](404)};if(_0x7cbbx1c[_0xd543[80]]){throw  new Error(_0xd543[81])};var _0x7cbbx1f=_[_0xd543[37]](_0x7cbbx1c,_0x7cbbxf[_0xd543[69]]);return _0x7cbbx1f[_0xd543[82]]()})[_0xd543[19]](function(_0x7cbbx1c){if(_0x7cbbx1c[_0xd543[78]](_0xd543[18])&& _0x7cbbx1c[_0xd543[18]]=== _0xd543[45]){_0x7cbbxf[_0xd543[77]][_0xd543[76]][_0xd543[75]][_0xd543[17]]({message:_0xd543[79],doc:_0x7cbbx1c})};return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx1c)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[83]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){if(!_0x7cbbx1c){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx1c[_0xd543[85]](_0x7cbbxf[_0xd543[69]][_0xd543[84]],{individualHooks:true})})[_0xd543[19]](function(){return _0x7cbbx10[_0xd543[58]](200)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[86]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxRoom[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1c){if(!_0x7cbbx1c){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx1c[_0xd543[86]]()})[_0xd543[19]](function(){return _0x7cbbx10[_0xd543[58]](204)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[87]]= function(_0x7cbbxf,_0x7cbbx10){return FaxRoom[_0xd543[86]]({where:{id:_0x7cbbxf[_0xd543[20]][_0xd543[88]]},individualHooks:true})[_0xd543[19]](function(){return _0x7cbbx10[_0xd543[58]](200)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};function handleError(_0x7cbbx10,_0x7cbbx12){return _0x7cbbx10[_0xd543[18]](500)[_0xd543[17]](_0x7cbbx12)}exports[_0xd543[89]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){var _0x7cbbx21={where:{id:_0x7cbbxf[_0xd543[55]][_0xd543[26]][_0xd543[91]](_0xd543[90])},user:_0x7cbbxf[_0xd543[30]],individualHooks:true};return FaxRoom[_0xd543[60]](_0x7cbbxf[_0xd543[69]],_0x7cbbx21)[_0xd543[19]](function(_0x7cbbx22){if(!_0x7cbbx22){return _0x7cbbx10[_0xd543[58]](404)};return _0x7cbbx22})[_0xd543[19]](function(_0x7cbbx22){return _0x7cbbx10[_0xd543[58]](200)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[92]]= function(_0x7cbbxf,_0x7cbbx10){return sequelize[_0xd543[20]](_0xd543[95],{type:sequelize[_0xd543[51]][_0xd543[50]]})[_0xd543[19]](function(_0x7cbbx23){var _0x7cbbx24=_[_0xd543[37]]({new:0,open:0,pending:0,closed:0},_[_0xd543[94]](_[_0xd543[93]](_0x7cbbx23,_0xd543[18]),_0xd543[38]));return _0x7cbbx10[_0xd543[18]](200)[_0xd543[17]](_0x7cbbx24)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})};exports[_0xd543[96]]= function(_0x7cbbxf,_0x7cbbx10,_0x7cbbx11){return FaxMessage[_0xd543[29]](_0x7cbbxf[_0xd543[55]][_0xd543[26]])[_0xd543[19]](function(_0x7cbbx1e){return _0x7cbbx1e[_0xd543[97]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0xd543[26],_0xd543[63],_0xd543[64],_0xd543[65]]}]},{model:User,attributes:[_0xd543[26],_0xd543[63],_0xd543[64],_0xd543[65]]}]})})[_0xd543[19]](function(_0x7cbbx1c){return _0x7cbbx10[_0xd543[17]](_0x7cbbx1c)})[_0xd543[16]](function(_0x7cbbx12){return handleError(_0x7cbbx10,_0x7cbbx12)})}
\ No newline at end of file