1 var _0xb485=["\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","\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","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x6E\x65\x77","\x4E\x45\x57","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\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","\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","\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","\x74\x61\x67\x73","\x2C","\x73\x70\x6C\x69\x74","\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"];_0xb485[0];var _=require(_0xb485[1]);var util=require(_0xb485[2]);var Util=require(_0xb485[3]);var moment=require(_0xb485[4]);var sequelize=require(_0xb485[6])[_0xb485[5]];var User=require(_0xb485[6])[_0xb485[7]];var Agent=require(_0xb485[6])[_0xb485[7]];var Contact=require(_0xb485[6])[_0xb485[8]];var FaxRoom=require(_0xb485[6])[_0xb485[9]];var FaxMessage=require(_0xb485[6])[_0xb485[10]];var FaxAccount=require(_0xb485[6])[_0xb485[11]];var FaxApplication=require(_0xb485[6])[_0xb485[12]];var FaxQueue=require(_0xb485[6])[_0xb485[13]];var FaxAttachment=require(_0xb485[6])[_0xb485[14]];exports[_0xb485[15]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[24]](_0xb485[23])[_0xb485[22]](Util[_0xb485[21]](_0xd334xf[_0xb485[20]]))[_0xb485[19]](function(_0xd334x13){return _0xd334x10[_0xb485[18]](200)[_0xb485[17]](_0xd334x13)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};function getFaxQueues(_0xd334x15){return function(){switch(_0xd334x15[_0xb485[30]]){case _0xb485[29]:return User[_0xb485[28]](_0xd334x15[_0xb485[25]],{attributes:[_0xb485[25]]})[_0xb485[19]](Util[_0xb485[27]]({},{attributes:[_0xb485[25]]}))[_0xb485[19]](function(_0xd334x16){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0xb485[26]](_0xd334x16,_0xb485[25])}}}}}});default:return {}}}}exports[_0xb485[31]]= function(_0xd334xf,_0xd334x10){return Promise[_0xb485[37]]([])[_0xb485[19]](getFaxQueues(_0xd334xf[_0xb485[29]]))[_0xb485[19]](function(_0xd334x18){return FaxRoom[_0xb485[36]](_[_0xb485[35]]({where:{status:_0xb485[32],createdAt:{$gte:moment()[_0xb485[34]](_0xb485[33])}}},_0xd334x18))})[_0xb485[19]](function(_0xd334x17){_0xd334x10[_0xb485[18]](200)[_0xb485[17]]({value:_0xd334x17})})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[38]]= function(_0xd334xf,_0xd334x10){return Promise[_0xb485[37]]([])[_0xb485[19]](getFaxQueues(_0xd334xf[_0xb485[29]]))[_0xb485[19]](function(_0xd334x18){return FaxRoom[_0xb485[36]](_[_0xb485[35]]({where:{status:_0xb485[39],createdAt:{$gte:moment()[_0xb485[34]](_0xb485[33])}}},_0xd334x18))})[_0xb485[19]](function(_0xd334x17){_0xd334x10[_0xb485[18]](200)[_0xb485[17]]({value:_0xd334x17})})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[40]]= function(_0xd334xf,_0xd334x10){return Promise[_0xb485[37]]([])[_0xb485[19]](getFaxQueues(_0xd334xf[_0xb485[29]]))[_0xb485[19]](function(_0xd334x18){return FaxRoom[_0xb485[36]](_[_0xb485[35]]({where:{status:_0xb485[41],createdAt:{$gte:moment()[_0xb485[34]](_0xb485[33])}}},_0xd334x18))})[_0xb485[19]](function(_0xd334x17){_0xd334x10[_0xb485[18]](200)[_0xb485[17]]({value:_0xd334x17})})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[42]]= function(_0xd334xf,_0xd334x10){return Promise[_0xb485[37]]([])[_0xb485[19]](getFaxQueues(_0xd334xf[_0xb485[29]]))[_0xb485[19]](function(_0xd334x18){return FaxRoom[_0xb485[36]](_[_0xb485[35]]({where:{status:_0xb485[43],createdAt:{$gte:moment()[_0xb485[34]](_0xb485[33])}}},_0xd334x18))})[_0xb485[19]](function(_0xd334x17){_0xd334x10[_0xb485[18]](200)[_0xb485[17]]({value:_0xd334x17})})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[44]]= function(_0xd334xf,_0xd334x10,_0xd334x11){switch(_0xd334xf[_0xb485[29]][_0xb485[30]]){case _0xb485[49]:return sequelize[_0xb485[20]](_0xb485[46],{replacements:{status:_0xb485[43],id:_0xd334xf[_0xb485[29]][_0xb485[25]]},type:sequelize[_0xb485[48]][_0xb485[47]]})[_0xb485[19]](function(_0xd334x13){return _0xd334x10[_0xb485[18]](200)[_0xb485[17]](_0xd334x13)})[_0xb485[16]](function(_0xd334x12){console[_0xb485[45]](_0xd334x12);return handleError(_0xd334x10,_0xd334x12)});default:return sequelize[_0xb485[20]](_0xb485[50],{replacements:{status:_0xb485[43],id:_0xd334xf[_0xb485[29]][_0xb485[25]]},type:sequelize[_0xb485[48]][_0xb485[47]]})[_0xb485[19]](function(_0xd334x13){return _0xd334x10[_0xb485[18]](200)[_0xb485[17]](_0xd334x13)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})}};exports[_0xb485[51]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[53]]({where:{UserId:_0xd334xf[_0xb485[52]][_0xb485[25]]},include:[{all:true}]})[_0xb485[19]](function(_0xd334x19){return _0xd334x10[_0xb485[18]](200)[_0xb485[17]](_0xd334x19)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[54]]= function(_0xd334xf,_0xd334x10,_0xd334x11){var _0xd334x1a;if(_0xd334xf[_0xb485[29]][_0xb485[30]]=== _0xb485[49]){return FaxRoom[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){_0xd334x1a= _0xd334x1b;if(!_0xd334x1a){return _0xd334x10[_0xb485[55]](404)};return _0xd334x1a[_0xb485[57]]({status:_0xb485[32]},{userId:_0xd334xf[_0xb485[29]][_0xb485[25]]})})[_0xb485[19]](function(){return _0xd334x1a[_0xb485[56]](_0xd334xf[_0xb485[29]][_0xb485[25]])})[_0xb485[19]](function(){return _0xd334x10[_0xb485[55]](200)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})}};exports[_0xb485[58]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[24]](_0xb485[23])[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){if(!_0xd334x1b){return _0xd334x10[_0xb485[55]](404)};return _0xd334x10[_0xb485[17]](_0xd334x1b)})[_0xb485[16]](function(_0xd334x12){console[_0xb485[45]](_0xd334x12);return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[59]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){if(!_0xd334x1b){return _0xd334x10[_0xb485[55]](404)};return _0xd334x1b[_0xb485[64]]({attributes:[_0xb485[25],_0xb485[60],_0xb485[61],_0xb485[62],_0xb485[30],_0xb485[63]]})})[_0xb485[19]](function(_0xd334x1c){return _0xd334x10[_0xb485[17]](_0xd334x1c)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[65]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[65]](_0xd334xf[_0xb485[66]])[_0xb485[19]](function(_0xd334x1b){return _0xd334x10[_0xb485[18]](201)[_0xb485[17]](_0xd334x1b)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[67]]= function(_0xd334xf,_0xd334x10,_0xd334x11){_0xd334xf[_0xb485[66]][_0xb485[68]]= _0xd334xf[_0xb485[29]][_0xb485[25]];_0xd334xf[_0xb485[66]][_0xb485[69]]= _0xd334xf[_0xb485[52]][_0xb485[25]];_0xd334xf[_0xb485[66]][_0xb485[70]]= _0xd334xf[_0xb485[66]][_0xb485[70]];return FaxMessage[_0xb485[65]](_0xd334xf[_0xb485[66]],{include:[{model:FaxAttachment}],user:_0xd334xf[_0xb485[29]]})[_0xb485[19]](function(_0xd334x1d){return _0xd334x10[_0xb485[18]](201)[_0xb485[17]](_0xd334x1d)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[57]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){if(!_0xd334x1b){return _0xd334x10[_0xb485[55]](404)};if(_0xd334x1b[_0xb485[71]]){throw new Error(_0xb485[72])};var _0xd334x1e=_[_0xb485[35]](_0xd334x1b,_0xd334xf[_0xb485[66]]);return _0xd334x1e[_0xb485[73]]()})[_0xb485[19]](function(_0xd334x1b){return _0xd334x10[_0xb485[18]](200)[_0xb485[17]](_0xd334x1b)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[74]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){if(!_0xd334x1b){return _0xd334x10[_0xb485[55]](404)};return _0xd334x1b[_0xb485[76]](_0xd334xf[_0xb485[66]][_0xb485[75]],{individualHooks:true})})[_0xb485[19]](function(){return _0xd334x10[_0xb485[55]](200)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[77]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxRoom[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1b){if(!_0xd334x1b){return _0xd334x10[_0xb485[55]](404)};return _0xd334x1b[_0xb485[77]]()})[_0xb485[19]](function(){return _0xd334x10[_0xb485[55]](204)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[78]]= function(_0xd334xf,_0xd334x10){return FaxRoom[_0xb485[77]]({where:{id:_0xd334xf[_0xb485[20]][_0xb485[79]]},individualHooks:true})[_0xb485[19]](function(){return _0xd334x10[_0xb485[55]](200)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};function handleError(_0xd334x10,_0xd334x12){return _0xd334x10[_0xb485[18]](500)[_0xb485[17]](_0xd334x12)}exports[_0xb485[80]]= function(_0xd334xf,_0xd334x10,_0xd334x11){var _0xd334x20={tags:_0xd334xf[_0xb485[66]][_0xb485[81]]};var _0xd334x21={where:{id:_0xd334xf[_0xb485[52]][_0xb485[25]][_0xb485[83]](_0xb485[82])}};return FaxRoom[_0xb485[57]](_0xd334x20,_0xd334x21)[_0xb485[19]](function(_0xd334x19){if(!_0xd334x19){return _0xd334x10[_0xb485[55]](404)};return _0xd334x19})[_0xb485[19]](function(_0xd334x19){return _0xd334x10[_0xb485[55]](200)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})};exports[_0xb485[84]]= function(_0xd334xf,_0xd334x10,_0xd334x11){return FaxMessage[_0xb485[28]](_0xd334xf[_0xb485[52]][_0xb485[25]])[_0xb485[19]](function(_0xd334x1d){return _0xd334x1d[_0xb485[85]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0xb485[25],_0xb485[60],_0xb485[61],_0xb485[62]]}]},{model:User,attributes:[_0xb485[25],_0xb485[60],_0xb485[61],_0xb485[62]]}]})})[_0xb485[19]](function(_0xd334x1b){return _0xd334x10[_0xb485[17]](_0xd334x1b)})[_0xb485[16]](function(_0xd334x12){return handleError(_0xd334x10,_0xd334x12)})}