Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / config / routing / fax / index.js
index 598d6f5..2da7375 100644 (file)
@@ -1 +1 @@
-var _0xee8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x52\x6F\x6F\x6D","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65","\x66\x72\x6F\x6D","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x45\x6E\x64\x20\x66\x61\x78\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xee8f[0];var _=require(_0xee8f[1]);var moment=require(_0xee8f[2]);var util=require(_0xee8f[3]);var async=require(_0xee8f[4]);var Util=require(_0xee8f[5]);var ReportFax=require(_0xee8f[7])[_0xee8f[6]];var ReportFaxRoom=require(_0xee8f[7])[_0xee8f[8]];var ReportFaxSession=require(_0xee8f[7])[_0xee8f[9]];var FaxMessage=require(_0xee8f[7])[_0xee8f[10]];var FaxQueue=require(_0xee8f[7])[_0xee8f[11]];var FaxRoom=require(_0xee8f[7])[_0xee8f[12]];var Interval=require(_0xee8f[7])[_0xee8f[13]];var User=require(_0xee8f[7])[_0xee8f[14]];var Session=require(_0xee8f[15]);module[_0xee8f[16]]=function(){console[_0xee8f[18]](_0xee8f[17]);FaxMessage[_0xee8f[21]](function(_0xb00dxf){if(_0xb00dxf[_0xee8f[19]]===_0xee8f[20]){handleMessage(_0xb00dxf)}})};function handleEntityNotFound(_0xb00dxf){return function(_0xb00dx11){if(!_0xb00dx11){throw {message:_0xb00dxf}};return _0xb00dx11}}function handleFaxRoom(_0xb00dx13,_0xb00dx14){return function(_0xb00dx15){_0xb00dx13[_0xee8f[22]]=_0xb00dx15[_0xee8f[23]];_0xb00dx13[_0xee8f[24]]=util[_0xee8f[27]](_0xee8f[25],moment()[_0xee8f[26]](),_0xb00dx15[_0xee8f[23]]);_0xb00dx14[_0xee8f[28]]=_[_0xee8f[30]](_0xb00dx15.Users,function(_0xb00dx16){return {id:_0xb00dx16[_0xee8f[23]],name:_0xb00dx16[_0xee8f[29]]}});return _0xb00dx15[_0xee8f[31]]()}}function handleFaxAccount(_0xb00dx13,_0xb00dx14){return function(_0xb00dx18){_0xb00dx13[_0xee8f[32]]=_0xb00dx18[_0xee8f[23]];_0xb00dx13[_0xee8f[33]]=_0xb00dx18[_0xee8f[29]];_0xb00dx13[_0xee8f[34]]=_0xb00dx18[_0xee8f[35]];_0xb00dx14[_0xee8f[36]]=_0xb00dx18[_0xee8f[36]];if(_0xb00dx18[_0xee8f[36]]){_0xb00dx14[_0xee8f[37]]=_0xb00dx14[_0xee8f[38]]=_0xb00dx18[_0xee8f[39]];_0xb00dx14[_0xee8f[36]]=_0xb00dx18[_0xee8f[39]];_0xb00dx14[_0xee8f[40]]=_0xee8f[41]};return _0xb00dx18[_0xee8f[45]]({order:_0xee8f[42],include:[{model:FaxQueue,attributes:[_0xee8f[23],_0xee8f[29],_0xee8f[39],_0xee8f[40]],include:[{model:User,attributes:[_0xee8f[23],_0xee8f[29],_0xee8f[43],_0xee8f[44]]}]},{model:User,attributes:[_0xee8f[23],_0xee8f[29],_0xee8f[43],_0xee8f[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xb00dx13,_0xb00dx14){return function(_0xb00dx1a){var _0xb00dx1b=[];if(_0xb00dx14[_0xee8f[36]]){_0xb00dx13[_0xee8f[38]]=_0xb00dx14[_0xee8f[36]];_0xb00dx13[_0xee8f[37]]=_0xb00dx14[_0xee8f[36]];_0xb00dx13[_0xee8f[28]]=_0xb00dx14[_0xee8f[28]];_0xb00dx13[_0xee8f[46]]=_0xee8f[36];_0xb00dx13[_0xee8f[40]]=_0xee8f[41];var _0xb00dx1c=_[_0xee8f[47]](_0xb00dx13);if(_0xb00dx1c[_0xee8f[28]][_0xee8f[48]]){_0xb00dx1b[_0xee8f[60]](function(_0xb00dx1d){return ReportFaxRoom[_0xee8f[58]]({uniqueid:_0xb00dx1c[_0xee8f[24]],accountid:_0xb00dx1c[_0xee8f[32]],accountname:_0xb00dx1c[_0xee8f[33]],accountphone:_0xb00dx1c[_0xee8f[34]],from:_0xb00dx1c[_0xee8f[59]],roomid:_0xb00dx1c[_0xee8f[22]],joinAt:moment()[_0xee8f[27]](_0xee8f[57])})[_0xee8f[51]](function(){return ReportFaxSession[_0xee8f[58]]({uniqueid:_0xb00dx1c[_0xee8f[24]],subject:_0xb00dx1c[_0xee8f[52]],accountid:_0xb00dx1c[_0xee8f[32]],accountname:_0xb00dx1c[_0xee8f[33]],accountphone:_0xb00dx1c[_0xee8f[34]],application:_0xb00dx1c[_0xee8f[46]],memberid:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[23]]:null,membername:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[29]]:null,queue:_0xb00dx1c[_0xee8f[54]],queuename:_0xb00dx1c[_0xee8f[55]],roomid:_0xb00dx1c[_0xee8f[22]],fidelity:_0xb00dx1c[_0xee8f[46]]===_0xee8f[36]?_0xb00dx1c[_0xee8f[56]]:null,joinAt:moment()[_0xee8f[27]](_0xee8f[57])})})[_0xee8f[51]](function(){ new Session(_0xb00dx1c,_0xb00dx1d)})[_0xee8f[50]](function(_0xb00dx1e){console[_0xee8f[49]](_0xb00dx1e)})})}};_0xb00dx1a[_0xee8f[65]](function(_0xb00dx1f,_0xb00dx20){var _0xb00dx1c=_[_0xee8f[47]](_0xb00dx13);_0xb00dx1c[_0xee8f[37]]=_0xb00dx1f[_0xee8f[39]];_0xb00dx1c[_0xee8f[46]]=_0xb00dx1f[_0xee8f[61]];_0xb00dx1c[_0xee8f[62]]=moment()[_0xee8f[27]](_0xee8f[57]);switch(_0xb00dx1f[_0xee8f[61]]){case _0xee8f[63]:_0xb00dx1c[_0xee8f[54]]=_0xb00dx1f[_0xee8f[11]][_0xee8f[23]];_0xb00dx1c[_0xee8f[55]]=_0xb00dx1f[_0xee8f[11]][_0xee8f[29]];_0xb00dx1c[_0xee8f[40]]=_0xb00dx1f[_0xee8f[11]][_0xee8f[40]];_0xb00dx1c[_0xee8f[38]]=_0xb00dx1f[_0xee8f[11]][_0xee8f[39]];_0xb00dx1c[_0xee8f[28]]=_[_0xee8f[30]](_0xb00dx1f[_0xee8f[11]].Users,function(_0xb00dx21){return {id:_0xb00dx21[_0xee8f[23]],name:_0xb00dx21[_0xee8f[29]]}});break;case _0xee8f[53]:_0xb00dx1c[_0xee8f[38]]=_0xb00dx1f[_0xee8f[39]];_0xb00dx1c[_0xee8f[40]]=_0xee8f[41];_0xb00dx1c[_0xee8f[28]]=[{id:_0xb00dx1f[_0xee8f[14]][_0xee8f[23]],name:_0xb00dx1f[_0xee8f[14]][_0xee8f[29]]}];break;default:};if(_0xb00dx1b[_0xee8f[48]]){_0xb00dx1b[_0xee8f[60]](function(_0xb00dx22,_0xb00dx1d){if(_0xb00dx22){_0xb00dx1d(null,_0xb00dx22)}else {return ReportFaxSession[_0xee8f[64]]({leaveAt:moment()[_0xee8f[27]](_0xee8f[57]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb00dx1c[_0xee8f[24]]}})[_0xee8f[51]](function(){return ReportFaxSession[_0xee8f[58]]({uniqueid:_0xb00dx1c[_0xee8f[24]],accountid:_0xb00dx1c[_0xee8f[32]],accountname:_0xb00dx1c[_0xee8f[33]],accountphone:_0xb00dx1c[_0xee8f[34]],application:_0xb00dx1c[_0xee8f[46]],memberid:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[23]]:null,membername:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[29]]:null,queue:_0xb00dx1c[_0xee8f[54]],queuename:_0xb00dx1c[_0xee8f[55]],roomid:_0xb00dx1c[_0xee8f[22]],fidelity:_0xb00dx1c[_0xee8f[46]]===_0xee8f[36]?_0xb00dx1c[_0xee8f[56]]:null,joinAt:moment()[_0xee8f[27]](_0xee8f[57])})})[_0xee8f[51]](function(){ new Session(_0xb00dx1c,_0xb00dx1d)})[_0xee8f[50]](function(_0xb00dx1e){console[_0xee8f[49]](_0xb00dx1e)})}})}else {_0xb00dx1b[_0xee8f[60]](function(_0xb00dx1d){return ReportFaxRoom[_0xee8f[58]]({uniqueid:_0xb00dx1c[_0xee8f[24]],accountid:_0xb00dx1c[_0xee8f[32]],accountname:_0xb00dx1c[_0xee8f[33]],accountphone:_0xb00dx1c[_0xee8f[34]],from:_0xb00dx1c[_0xee8f[59]],roomid:_0xb00dx1c[_0xee8f[22]],joinAt:moment()[_0xee8f[27]](_0xee8f[57])})[_0xee8f[51]](function(){return ReportFaxSession[_0xee8f[58]]({uniqueid:_0xb00dx1c[_0xee8f[24]],subject:_0xb00dx1c[_0xee8f[52]],accountid:_0xb00dx1c[_0xee8f[32]],accountname:_0xb00dx1c[_0xee8f[33]],accountphone:_0xb00dx1c[_0xee8f[34]],application:_0xb00dx1c[_0xee8f[46]],memberid:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[23]]:null,membername:(_0xb00dx1c[_0xee8f[46]]===_0xee8f[53]&&_0xb00dx1c[_0xee8f[28]][0])?_0xb00dx1c[_0xee8f[28]][0][_0xee8f[29]]:null,queue:_0xb00dx1c[_0xee8f[54]],queuename:_0xb00dx1c[_0xee8f[55]],roomid:_0xb00dx1c[_0xee8f[22]],fidelity:_0xb00dx1c[_0xee8f[46]]===_0xee8f[36]?_0xb00dx1c[_0xee8f[56]]:null,joinAt:moment()[_0xee8f[27]](_0xee8f[57])})})[_0xee8f[51]](function(){ new Session(_0xb00dx1c,_0xb00dx1d)})[_0xee8f[50]](function(_0xb00dx1e){console[_0xee8f[49]](_0xb00dx1e)})})}});console[_0xee8f[18]](_0xee8f[66],_0xb00dx1b);async[_0xee8f[66]](_0xb00dx1b,function(_0xb00dx1e,_0xb00dx23){console[_0xee8f[18]](_0xee8f[67]);if(_0xb00dx1e){console[_0xee8f[49]](_0xb00dx1e)};if(!_0xb00dx23){return ReportFaxRoom[_0xee8f[64]]({leaveAt:moment()[_0xee8f[27]](_0xee8f[57]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb00dx13[_0xee8f[24]]},individualHooks:true})[_0xee8f[51]](function(){return ReportFaxSession[_0xee8f[64]]({leaveAt:moment()[_0xee8f[27]](_0xee8f[57]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb00dx13[_0xee8f[24]]},individualHooks:true})})[_0xee8f[51]](function(){return FaxRoom[_0xee8f[69]](_0xb00dx13[_0xee8f[22]])})[_0xee8f[51]](function(_0xb00dx24){if(_0xb00dx24){return _0xb00dx24[_0xee8f[64]]({status:_0xee8f[68]})}})[_0xee8f[50]](function(_0xb00dx1e){console[_0xee8f[49]](_0xb00dx1e)})}})}}function handleMessage(_0xb00dxf){var _0xb00dx14={agents:[]};var _0xb00dx13={messageid:_0xb00dxf[_0xee8f[23]],from:_0xb00dxf[_0xee8f[59]]||null,joinAt:moment()[_0xee8f[27]](_0xee8f[57])};return _0xb00dxf[_0xee8f[73]]({include:[{model:User,attributes:[_0xee8f[23],_0xee8f[29],_0xee8f[43],_0xee8f[44]]}]})[_0xee8f[51]](handleEntityNotFound(_0xee8f[72]))[_0xee8f[51]](handleFaxRoom(_0xb00dx13,_0xb00dx14))[_0xee8f[51]](handleEntityNotFound(_0xee8f[71]))[_0xee8f[51]](handleFaxAccount(_0xb00dx13,_0xb00dx14))[_0xee8f[51]](handleApps(_0xb00dx13,_0xb00dx14))[_0xee8f[50]](function(_0xb00dx1e){console[_0xee8f[49]](_0xee8f[70],_0xb00dx1e)})}
\ No newline at end of file
+var _0xf6eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x52\x6F\x6F\x6D","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72","\x2E\x2F\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x46\x61\x78\x20\x52\x6F\x75\x74\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x70\x68\x6F\x6E\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x73\x74\x72\x61\x74\x65\x67\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x6F\x6E\x6C\x69\x6E\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x6C\x65\x6E\x67\x74\x68","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65","\x66\x72\x6F\x6D","\x70\x75\x73\x68","\x61\x70\x70","\x6A\x6F\x69\x6E\x41\x74","\x55\x73\x65\x72\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x6F\x72\x64\x65\x72\x42\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x45\x6E\x64\x20\x66\x61\x78\x20\x72\x6F\x75\x74\x69\x6E\x67\x2E\x2E","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x66\x69\x6E\x64\x42\x79\x49\x64","\x77\x61\x74\x65\x72\x66\x61\x6C\x6C","\x65\x72\x72","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xf6eb[0];var _=require(_0xf6eb[1]);var moment=require(_0xf6eb[2]);var util=require(_0xf6eb[3]);var async=require(_0xf6eb[4]);var Util=require(_0xf6eb[5]);var ReportFax=require(_0xf6eb[7])[_0xf6eb[6]];var ReportFaxRoom=require(_0xf6eb[7])[_0xf6eb[8]];var ReportFaxSession=require(_0xf6eb[7])[_0xf6eb[9]];var FaxMessage=require(_0xf6eb[7])[_0xf6eb[10]];var FaxQueue=require(_0xf6eb[7])[_0xf6eb[11]];var FaxRoom=require(_0xf6eb[7])[_0xf6eb[12]];var Interval=require(_0xf6eb[7])[_0xf6eb[13]];var User=require(_0xf6eb[7])[_0xf6eb[14]];var Session=require(_0xf6eb[15]);module[_0xf6eb[16]]= function(){console[_0xf6eb[18]](_0xf6eb[17]);FaxMessage[_0xf6eb[21]](function(_0x82f6xf){if(_0x82f6xf[_0xf6eb[19]]=== _0xf6eb[20]){handleMessage(_0x82f6xf)}})};function handleEntityNotFound(_0x82f6xf){return function(_0x82f6x11){if(!_0x82f6x11){throw {message:_0x82f6xf}};return _0x82f6x11}}function handleFaxRoom(_0x82f6x13,_0x82f6x14){return function(_0x82f6x15){_0x82f6x13[_0xf6eb[22]]= _0x82f6x15[_0xf6eb[23]];_0x82f6x13[_0xf6eb[24]]= util[_0xf6eb[27]](_0xf6eb[25],moment()[_0xf6eb[26]](),_0x82f6x15[_0xf6eb[23]]);_0x82f6x14[_0xf6eb[28]]= _[_0xf6eb[30]](_0x82f6x15.Users,function(_0x82f6x16){return {id:_0x82f6x16[_0xf6eb[23]],name:_0x82f6x16[_0xf6eb[29]],penalty:0}});return _0x82f6x15[_0xf6eb[31]]()}}function handleFaxAccount(_0x82f6x13,_0x82f6x14){return function(_0x82f6x18){_0x82f6x13[_0xf6eb[32]]= _0x82f6x18[_0xf6eb[23]];_0x82f6x13[_0xf6eb[33]]= _0x82f6x18[_0xf6eb[29]];_0x82f6x13[_0xf6eb[34]]= _0x82f6x18[_0xf6eb[35]];_0x82f6x14[_0xf6eb[36]]= _0x82f6x18[_0xf6eb[36]];if(_0x82f6x18[_0xf6eb[36]]){_0x82f6x14[_0xf6eb[37]]= _0x82f6x14[_0xf6eb[38]]= _0x82f6x18[_0xf6eb[39]];_0x82f6x14[_0xf6eb[36]]= _0x82f6x18[_0xf6eb[39]];_0x82f6x14[_0xf6eb[40]]= _0xf6eb[41]};return _0x82f6x18[_0xf6eb[45]]({order:_0xf6eb[42],include:[{model:FaxQueue,attributes:[_0xf6eb[23],_0xf6eb[29],_0xf6eb[39],_0xf6eb[40]],include:[{model:User,attributes:[_0xf6eb[23],_0xf6eb[29],_0xf6eb[43],_0xf6eb[44]]}]},{model:User,attributes:[_0xf6eb[23],_0xf6eb[29],_0xf6eb[43],_0xf6eb[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0x82f6x13,_0x82f6x14){return function(_0x82f6x1a){var _0x82f6x1b=[];if(_0x82f6x14[_0xf6eb[36]]){_0x82f6x13[_0xf6eb[38]]= _0x82f6x14[_0xf6eb[36]];_0x82f6x13[_0xf6eb[37]]= _0x82f6x14[_0xf6eb[36]];_0x82f6x13[_0xf6eb[28]]= _0x82f6x14[_0xf6eb[28]];_0x82f6x13[_0xf6eb[46]]= _0xf6eb[36];_0x82f6x13[_0xf6eb[40]]= _0xf6eb[41];var _0x82f6x1c=_[_0xf6eb[47]](_0x82f6x13);if(_0x82f6x1c[_0xf6eb[28]][_0xf6eb[48]]){_0x82f6x1b[_0xf6eb[59]](function(_0x82f6x1d){return ReportFaxRoom[_0xf6eb[57]]({uniqueid:_0x82f6x1c[_0xf6eb[24]],accountid:_0x82f6x1c[_0xf6eb[32]],accountname:_0x82f6x1c[_0xf6eb[33]],accountphone:_0x82f6x1c[_0xf6eb[34]],from:_0x82f6x1c[_0xf6eb[58]],roomid:_0x82f6x1c[_0xf6eb[22]],joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])})[_0xf6eb[51]](function(){return ReportFaxSession[_0xf6eb[57]]({uniqueid:_0x82f6x1c[_0xf6eb[24]],accountid:_0x82f6x1c[_0xf6eb[32]],accountname:_0x82f6x1c[_0xf6eb[33]],accountphone:_0x82f6x1c[_0xf6eb[34]],application:_0x82f6x1c[_0xf6eb[46]],memberid:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[23]]:null,membername:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[29]]:null,queue:_0x82f6x1c[_0xf6eb[53]],queuename:_0x82f6x1c[_0xf6eb[54]],roomid:_0x82f6x1c[_0xf6eb[22]],fidelity:_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[36]?_0x82f6x1c[_0xf6eb[55]]:null,joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])})})[_0xf6eb[51]](function(){ new Session(_0x82f6x1c,_0x82f6x1d)})[_0xf6eb[50]](function(_0x82f6x1e){console[_0xf6eb[49]](_0x82f6x1e)})})}};_0x82f6x1a[_0xf6eb[69]](function(_0x82f6x1f,_0x82f6x20){var _0x82f6x1c=_[_0xf6eb[47]](_0x82f6x13);_0x82f6x1c[_0xf6eb[37]]= _0x82f6x1f[_0xf6eb[39]];_0x82f6x1c[_0xf6eb[46]]= _0x82f6x1f[_0xf6eb[60]];_0x82f6x1c[_0xf6eb[61]]= moment()[_0xf6eb[27]](_0xf6eb[56]);switch(_0x82f6x1f[_0xf6eb[60]]){case _0xf6eb[67]:_0x82f6x1c[_0xf6eb[53]]= _0x82f6x1f[_0xf6eb[11]][_0xf6eb[23]];_0x82f6x1c[_0xf6eb[54]]= _0x82f6x1f[_0xf6eb[11]][_0xf6eb[29]];_0x82f6x1c[_0xf6eb[40]]= _0x82f6x1f[_0xf6eb[11]][_0xf6eb[40]];_0x82f6x1c[_0xf6eb[38]]= _0x82f6x1f[_0xf6eb[11]][_0xf6eb[39]];_0x82f6x1f[_0xf6eb[11]][_0xf6eb[62]]= _[_0xf6eb[64]](_0x82f6x1f[_0xf6eb[11]].Users,_0xf6eb[63]);_0x82f6x1c[_0xf6eb[28]]= _[_0xf6eb[30]](_0x82f6x1f[_0xf6eb[11]].Users,function(_0x82f6x21){return {id:_0x82f6x21[_0xf6eb[23]],name:_0x82f6x21[_0xf6eb[29]],penalty:_0x82f6x21[_0xf6eb[66]][_0xf6eb[65]]}});break;case _0xf6eb[52]:_0x82f6x1c[_0xf6eb[38]]= _0x82f6x1f[_0xf6eb[39]];_0x82f6x1c[_0xf6eb[40]]= _0xf6eb[41];_0x82f6x1c[_0xf6eb[28]]= [{id:_0x82f6x1f[_0xf6eb[14]][_0xf6eb[23]],name:_0x82f6x1f[_0xf6eb[14]][_0xf6eb[29]],penalty:0}];break;default:};if(_0x82f6x1b[_0xf6eb[48]]){_0x82f6x1b[_0xf6eb[59]](function(_0x82f6x22,_0x82f6x1d){if(_0x82f6x22){_0x82f6x1d(null,_0x82f6x22)}else {return ReportFaxSession[_0xf6eb[68]]({leaveAt:moment()[_0xf6eb[27]](_0xf6eb[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x82f6x1c[_0xf6eb[24]]},individualHooks:true})[_0xf6eb[51]](function(){return ReportFaxSession[_0xf6eb[57]]({uniqueid:_0x82f6x1c[_0xf6eb[24]],accountid:_0x82f6x1c[_0xf6eb[32]],accountname:_0x82f6x1c[_0xf6eb[33]],accountphone:_0x82f6x1c[_0xf6eb[34]],application:_0x82f6x1c[_0xf6eb[46]],memberid:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[23]]:null,membername:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[29]]:null,queue:_0x82f6x1c[_0xf6eb[53]],queuename:_0x82f6x1c[_0xf6eb[54]],roomid:_0x82f6x1c[_0xf6eb[22]],fidelity:_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[36]?_0x82f6x1c[_0xf6eb[55]]:null,joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])})})[_0xf6eb[51]](function(){ new Session(_0x82f6x1c,_0x82f6x1d)})[_0xf6eb[50]](function(_0x82f6x1e){console[_0xf6eb[49]](_0x82f6x1e)})}})}else {_0x82f6x1b[_0xf6eb[59]](function(_0x82f6x1d){return ReportFaxRoom[_0xf6eb[57]]({uniqueid:_0x82f6x1c[_0xf6eb[24]],accountid:_0x82f6x1c[_0xf6eb[32]],accountname:_0x82f6x1c[_0xf6eb[33]],accountphone:_0x82f6x1c[_0xf6eb[34]],from:_0x82f6x1c[_0xf6eb[58]],roomid:_0x82f6x1c[_0xf6eb[22]],joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])})[_0xf6eb[51]](function(){return ReportFaxSession[_0xf6eb[57]]({uniqueid:_0x82f6x1c[_0xf6eb[24]],accountid:_0x82f6x1c[_0xf6eb[32]],accountname:_0x82f6x1c[_0xf6eb[33]],accountphone:_0x82f6x1c[_0xf6eb[34]],application:_0x82f6x1c[_0xf6eb[46]],memberid:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[23]]:null,membername:(_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[52]&& _0x82f6x1c[_0xf6eb[28]][0])?_0x82f6x1c[_0xf6eb[28]][0][_0xf6eb[29]]:null,queue:_0x82f6x1c[_0xf6eb[53]],queuename:_0x82f6x1c[_0xf6eb[54]],roomid:_0x82f6x1c[_0xf6eb[22]],fidelity:_0x82f6x1c[_0xf6eb[46]]=== _0xf6eb[36]?_0x82f6x1c[_0xf6eb[55]]:null,joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])})})[_0xf6eb[51]](function(){ new Session(_0x82f6x1c,_0x82f6x1d)})[_0xf6eb[50]](function(_0x82f6x1e){console[_0xf6eb[49]](_0x82f6x1e)})})}});async[_0xf6eb[73]](_0x82f6x1b,function(_0x82f6x1e,_0x82f6x23){console[_0xf6eb[18]](_0xf6eb[70]);if(_0x82f6x1e){console[_0xf6eb[49]](_0x82f6x1e)};if(!_0x82f6x23){return ReportFaxRoom[_0xf6eb[68]]({leaveAt:moment()[_0xf6eb[27]](_0xf6eb[56]),unmanaged:true,status:_0xf6eb[71]},{where:{leaveAt:null,uniqueid:_0x82f6x13[_0xf6eb[24]]},individualHooks:true})[_0xf6eb[51]](function(){return ReportFaxSession[_0xf6eb[68]]({leaveAt:moment()[_0xf6eb[27]](_0xf6eb[56]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x82f6x13[_0xf6eb[24]]},individualHooks:true})})[_0xf6eb[51]](function(){return FaxRoom[_0xf6eb[72]](_0x82f6x13[_0xf6eb[22]])})[_0xf6eb[51]](function(_0x82f6x24){if(_0x82f6x24){return _0x82f6x24[_0xf6eb[68]]({status:_0xf6eb[71]})}})[_0xf6eb[50]](function(_0x82f6x1e){console[_0xf6eb[49]](_0x82f6x1e)})}})}}function handleMessage(_0x82f6xf){var _0x82f6x14={agents:[]};var _0x82f6x13={messageid:_0x82f6xf[_0xf6eb[23]],from:_0x82f6xf[_0xf6eb[58]]|| null,joinAt:moment()[_0xf6eb[27]](_0xf6eb[56])};return _0x82f6xf[_0xf6eb[77]]({include:[{model:User,attributes:[_0xf6eb[23],_0xf6eb[29],_0xf6eb[43],_0xf6eb[44]]}]})[_0xf6eb[51]](handleEntityNotFound(_0xf6eb[76]))[_0xf6eb[51]](handleFaxRoom(_0x82f6x13,_0x82f6x14))[_0xf6eb[51]](handleEntityNotFound(_0xf6eb[75]))[_0xf6eb[51]](handleFaxAccount(_0x82f6x13,_0x82f6x14))[_0xf6eb[51]](handleApps(_0x82f6x13,_0x82f6x14))[_0xf6eb[50]](function(_0x82f6x1e){console[_0xf6eb[49]](_0xf6eb[74],_0x82f6x1e)})}
\ No newline at end of file