Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / config / routing / fax / index.js
index 6c528a9..2da7375 100644 (file)
@@ -1 +1 @@
-var _0xe2d9=["\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","\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"];_0xe2d9[0];var _=require(_0xe2d9[1]);var moment=require(_0xe2d9[2]);var util=require(_0xe2d9[3]);var async=require(_0xe2d9[4]);var Util=require(_0xe2d9[5]);var ReportFax=require(_0xe2d9[7])[_0xe2d9[6]];var ReportFaxRoom=require(_0xe2d9[7])[_0xe2d9[8]];var ReportFaxSession=require(_0xe2d9[7])[_0xe2d9[9]];var FaxMessage=require(_0xe2d9[7])[_0xe2d9[10]];var FaxQueue=require(_0xe2d9[7])[_0xe2d9[11]];var FaxRoom=require(_0xe2d9[7])[_0xe2d9[12]];var Interval=require(_0xe2d9[7])[_0xe2d9[13]];var User=require(_0xe2d9[7])[_0xe2d9[14]];var Session=require(_0xe2d9[15]);module[_0xe2d9[16]]=function(){console[_0xe2d9[18]](_0xe2d9[17]);FaxMessage[_0xe2d9[21]](function(_0x95d9xf){if(_0x95d9xf[_0xe2d9[19]]===_0xe2d9[20]){handleMessage(_0x95d9xf)}})};function handleEntityNotFound(_0x95d9xf){return function(_0x95d9x11){if(!_0x95d9x11){throw {message:_0x95d9xf}};return _0x95d9x11}}function handleFaxRoom(_0x95d9x13,_0x95d9x14){return function(_0x95d9x15){_0x95d9x13[_0xe2d9[22]]=_0x95d9x15[_0xe2d9[23]];_0x95d9x13[_0xe2d9[24]]=util[_0xe2d9[27]](_0xe2d9[25],moment()[_0xe2d9[26]](),_0x95d9x15[_0xe2d9[23]]);_0x95d9x14[_0xe2d9[28]]=_[_0xe2d9[30]](_0x95d9x15.Users,function(_0x95d9x16){return {id:_0x95d9x16[_0xe2d9[23]],name:_0x95d9x16[_0xe2d9[29]],penalty:0}});return _0x95d9x15[_0xe2d9[31]]()}}function handleFaxAccount(_0x95d9x13,_0x95d9x14){return function(_0x95d9x18){_0x95d9x13[_0xe2d9[32]]=_0x95d9x18[_0xe2d9[23]];_0x95d9x13[_0xe2d9[33]]=_0x95d9x18[_0xe2d9[29]];_0x95d9x13[_0xe2d9[34]]=_0x95d9x18[_0xe2d9[35]];_0x95d9x14[_0xe2d9[36]]=_0x95d9x18[_0xe2d9[36]];if(_0x95d9x18[_0xe2d9[36]]){_0x95d9x14[_0xe2d9[37]]=_0x95d9x14[_0xe2d9[38]]=_0x95d9x18[_0xe2d9[39]];_0x95d9x14[_0xe2d9[36]]=_0x95d9x18[_0xe2d9[39]];_0x95d9x14[_0xe2d9[40]]=_0xe2d9[41]};return _0x95d9x18[_0xe2d9[45]]({order:_0xe2d9[42],include:[{model:FaxQueue,attributes:[_0xe2d9[23],_0xe2d9[29],_0xe2d9[39],_0xe2d9[40]],include:[{model:User,attributes:[_0xe2d9[23],_0xe2d9[29],_0xe2d9[43],_0xe2d9[44]]}]},{model:User,attributes:[_0xe2d9[23],_0xe2d9[29],_0xe2d9[43],_0xe2d9[44]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0x95d9x13,_0x95d9x14){return function(_0x95d9x1a){var _0x95d9x1b=[];if(_0x95d9x14[_0xe2d9[36]]){_0x95d9x13[_0xe2d9[38]]=_0x95d9x14[_0xe2d9[36]];_0x95d9x13[_0xe2d9[37]]=_0x95d9x14[_0xe2d9[36]];_0x95d9x13[_0xe2d9[28]]=_0x95d9x14[_0xe2d9[28]];_0x95d9x13[_0xe2d9[46]]=_0xe2d9[36];_0x95d9x13[_0xe2d9[40]]=_0xe2d9[41];var _0x95d9x1c=_[_0xe2d9[47]](_0x95d9x13);if(_0x95d9x1c[_0xe2d9[28]][_0xe2d9[48]]){_0x95d9x1b[_0xe2d9[60]](function(_0x95d9x1d){return ReportFaxRoom[_0xe2d9[58]]({uniqueid:_0x95d9x1c[_0xe2d9[24]],accountid:_0x95d9x1c[_0xe2d9[32]],accountname:_0x95d9x1c[_0xe2d9[33]],accountphone:_0x95d9x1c[_0xe2d9[34]],from:_0x95d9x1c[_0xe2d9[59]],roomid:_0x95d9x1c[_0xe2d9[22]],joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])})[_0xe2d9[51]](function(){return ReportFaxSession[_0xe2d9[58]]({uniqueid:_0x95d9x1c[_0xe2d9[24]],subject:_0x95d9x1c[_0xe2d9[52]],accountid:_0x95d9x1c[_0xe2d9[32]],accountname:_0x95d9x1c[_0xe2d9[33]],accountphone:_0x95d9x1c[_0xe2d9[34]],application:_0x95d9x1c[_0xe2d9[46]],memberid:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[23]]:null,membername:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[29]]:null,queue:_0x95d9x1c[_0xe2d9[54]],queuename:_0x95d9x1c[_0xe2d9[55]],roomid:_0x95d9x1c[_0xe2d9[22]],fidelity:_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[36]?_0x95d9x1c[_0xe2d9[56]]:null,joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])})})[_0xe2d9[51]](function(){ new Session(_0x95d9x1c,_0x95d9x1d)})[_0xe2d9[50]](function(_0x95d9x1e){console[_0xe2d9[49]](_0x95d9x1e)})})}};_0x95d9x1a[_0xe2d9[70]](function(_0x95d9x1f,_0x95d9x20){var _0x95d9x1c=_[_0xe2d9[47]](_0x95d9x13);_0x95d9x1c[_0xe2d9[37]]=_0x95d9x1f[_0xe2d9[39]];_0x95d9x1c[_0xe2d9[46]]=_0x95d9x1f[_0xe2d9[61]];_0x95d9x1c[_0xe2d9[62]]=moment()[_0xe2d9[27]](_0xe2d9[57]);switch(_0x95d9x1f[_0xe2d9[61]]){case _0xe2d9[68]:_0x95d9x1c[_0xe2d9[54]]=_0x95d9x1f[_0xe2d9[11]][_0xe2d9[23]];_0x95d9x1c[_0xe2d9[55]]=_0x95d9x1f[_0xe2d9[11]][_0xe2d9[29]];_0x95d9x1c[_0xe2d9[40]]=_0x95d9x1f[_0xe2d9[11]][_0xe2d9[40]];_0x95d9x1c[_0xe2d9[38]]=_0x95d9x1f[_0xe2d9[11]][_0xe2d9[39]];_0x95d9x1f[_0xe2d9[11]][_0xe2d9[63]]=_[_0xe2d9[65]](_0x95d9x1f[_0xe2d9[11]].Users,_0xe2d9[64]);_0x95d9x1c[_0xe2d9[28]]=_[_0xe2d9[30]](_0x95d9x1f[_0xe2d9[11]].Users,function(_0x95d9x21){return {id:_0x95d9x21[_0xe2d9[23]],name:_0x95d9x21[_0xe2d9[29]],penalty:_0x95d9x21[_0xe2d9[67]][_0xe2d9[66]]}});break;case _0xe2d9[53]:_0x95d9x1c[_0xe2d9[38]]=_0x95d9x1f[_0xe2d9[39]];_0x95d9x1c[_0xe2d9[40]]=_0xe2d9[41];_0x95d9x1c[_0xe2d9[28]]=[{id:_0x95d9x1f[_0xe2d9[14]][_0xe2d9[23]],name:_0x95d9x1f[_0xe2d9[14]][_0xe2d9[29]],penalty:0}];break;default:};if(_0x95d9x1b[_0xe2d9[48]]){_0x95d9x1b[_0xe2d9[60]](function(_0x95d9x22,_0x95d9x1d){if(_0x95d9x22){_0x95d9x1d(null,_0x95d9x22)}else {return ReportFaxSession[_0xe2d9[69]]({leaveAt:moment()[_0xe2d9[27]](_0xe2d9[57]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x95d9x1c[_0xe2d9[24]]},individualHooks:true})[_0xe2d9[51]](function(){return ReportFaxSession[_0xe2d9[58]]({uniqueid:_0x95d9x1c[_0xe2d9[24]],accountid:_0x95d9x1c[_0xe2d9[32]],accountname:_0x95d9x1c[_0xe2d9[33]],accountphone:_0x95d9x1c[_0xe2d9[34]],application:_0x95d9x1c[_0xe2d9[46]],memberid:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[23]]:null,membername:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[29]]:null,queue:_0x95d9x1c[_0xe2d9[54]],queuename:_0x95d9x1c[_0xe2d9[55]],roomid:_0x95d9x1c[_0xe2d9[22]],fidelity:_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[36]?_0x95d9x1c[_0xe2d9[56]]:null,joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])})})[_0xe2d9[51]](function(){ new Session(_0x95d9x1c,_0x95d9x1d)})[_0xe2d9[50]](function(_0x95d9x1e){console[_0xe2d9[49]](_0x95d9x1e)})}})}else {_0x95d9x1b[_0xe2d9[60]](function(_0x95d9x1d){return ReportFaxRoom[_0xe2d9[58]]({uniqueid:_0x95d9x1c[_0xe2d9[24]],accountid:_0x95d9x1c[_0xe2d9[32]],accountname:_0x95d9x1c[_0xe2d9[33]],accountphone:_0x95d9x1c[_0xe2d9[34]],from:_0x95d9x1c[_0xe2d9[59]],roomid:_0x95d9x1c[_0xe2d9[22]],joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])})[_0xe2d9[51]](function(){return ReportFaxSession[_0xe2d9[58]]({uniqueid:_0x95d9x1c[_0xe2d9[24]],subject:_0x95d9x1c[_0xe2d9[52]],accountid:_0x95d9x1c[_0xe2d9[32]],accountname:_0x95d9x1c[_0xe2d9[33]],accountphone:_0x95d9x1c[_0xe2d9[34]],application:_0x95d9x1c[_0xe2d9[46]],memberid:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[23]]:null,membername:(_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[53]&&_0x95d9x1c[_0xe2d9[28]][0])?_0x95d9x1c[_0xe2d9[28]][0][_0xe2d9[29]]:null,queue:_0x95d9x1c[_0xe2d9[54]],queuename:_0x95d9x1c[_0xe2d9[55]],roomid:_0x95d9x1c[_0xe2d9[22]],fidelity:_0x95d9x1c[_0xe2d9[46]]===_0xe2d9[36]?_0x95d9x1c[_0xe2d9[56]]:null,joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])})})[_0xe2d9[51]](function(){ new Session(_0x95d9x1c,_0x95d9x1d)})[_0xe2d9[50]](function(_0x95d9x1e){console[_0xe2d9[49]](_0x95d9x1e)})})}});async[_0xe2d9[74]](_0x95d9x1b,function(_0x95d9x1e,_0x95d9x23){console[_0xe2d9[18]](_0xe2d9[71]);if(_0x95d9x1e){console[_0xe2d9[49]](_0x95d9x1e)};if(!_0x95d9x23){return ReportFaxRoom[_0xe2d9[69]]({leaveAt:moment()[_0xe2d9[27]](_0xe2d9[57]),unmanaged:true,status:_0xe2d9[72]},{where:{leaveAt:null,uniqueid:_0x95d9x13[_0xe2d9[24]]},individualHooks:true})[_0xe2d9[51]](function(){return ReportFaxSession[_0xe2d9[69]]({leaveAt:moment()[_0xe2d9[27]](_0xe2d9[57]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0x95d9x13[_0xe2d9[24]]},individualHooks:true})})[_0xe2d9[51]](function(){return FaxRoom[_0xe2d9[73]](_0x95d9x13[_0xe2d9[22]])})[_0xe2d9[51]](function(_0x95d9x24){if(_0x95d9x24){return _0x95d9x24[_0xe2d9[69]]({status:_0xe2d9[72]})}})[_0xe2d9[50]](function(_0x95d9x1e){console[_0xe2d9[49]](_0x95d9x1e)})}})}}function handleMessage(_0x95d9xf){var _0x95d9x14={agents:[]};var _0x95d9x13={messageid:_0x95d9xf[_0xe2d9[23]],from:_0x95d9xf[_0xe2d9[59]]||null,joinAt:moment()[_0xe2d9[27]](_0xe2d9[57])};return _0x95d9xf[_0xe2d9[78]]({include:[{model:User,attributes:[_0xe2d9[23],_0xe2d9[29],_0xe2d9[43],_0xe2d9[44]]}]})[_0xe2d9[51]](handleEntityNotFound(_0xe2d9[77]))[_0xe2d9[51]](handleFaxRoom(_0x95d9x13,_0x95d9x14))[_0xe2d9[51]](handleEntityNotFound(_0xe2d9[76]))[_0xe2d9[51]](handleFaxAccount(_0x95d9x13,_0x95d9x14))[_0xe2d9[51]](handleApps(_0x95d9x13,_0x95d9x14))[_0xe2d9[50]](function(_0x95d9x1e){console[_0xe2d9[49]](_0xe2d9[75],_0x95d9x1e)})}
\ 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