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