1 var _0xa382=["\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\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\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","\x4D\x61\x69\x6C\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","\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","\x73\x75\x62\x6A\x65\x63\x74","\x61\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\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\x61\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\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","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x67\x65\x74\x4D\x61\x69\x6C\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\x4D\x61\x69\x6C\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\x4D\x61\x69\x6C\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\x6D\x61\x69\x6C\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\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x2E\x2E","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x2E\x2E","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D"];_0xa382[0];var _=require(_0xa382[1]);var moment=require(_0xa382[2]);var util=require(_0xa382[3]);var async=require(_0xa382[4]);var Util=require(_0xa382[5]);var ReportMail=require(_0xa382[7])[_0xa382[6]];var ReportMailRoom=require(_0xa382[7])[_0xa382[8]];var ReportMailSession=require(_0xa382[7])[_0xa382[9]];var MailMessage=require(_0xa382[7])[_0xa382[10]];var MailQueue=require(_0xa382[7])[_0xa382[11]];var MailRoom=require(_0xa382[7])[_0xa382[12]];var Interval=require(_0xa382[7])[_0xa382[13]];var User=require(_0xa382[7])[_0xa382[14]];var Session=require(_0xa382[15]);module[_0xa382[16]]=function(_0xb732xf){console[_0xa382[18]](_0xa382[17]);handleMessage(_0xb732xf)};function handleEntityNotFound(_0xb732xf){return function(_0xb732x11){if(!_0xb732x11){throw {message:_0xb732xf}};return _0xb732x11}}function handleMailRoom(_0xb732x13,_0xb732x14){return function(_0xb732x15){_0xb732x13[_0xa382[19]]=_0xb732x15[_0xa382[20]];_0xb732x13[_0xa382[21]]=util[_0xa382[24]](_0xa382[22],moment()[_0xa382[23]](),_0xb732x15[_0xa382[20]]);_0xb732x13[_0xa382[25]]=_0xb732x15[_0xa382[25]];_0xb732x14[_0xa382[26]]=_[_0xa382[28]](_0xb732x15.Users,function(_0xb732x16){return {id:_0xb732x16[_0xa382[20]],name:_0xb732x16[_0xa382[27]],penalty:0}});return _0xb732x15[_0xa382[29]]()}}function handleMailAccount(_0xb732x13,_0xb732x14){return function(_0xb732x18){_0xb732x13[_0xa382[30]]=_0xb732x18[_0xa382[20]];_0xb732x13[_0xa382[31]]=_0xb732x18[_0xa382[27]];_0xb732x13[_0xa382[32]]=_0xb732x18[_0xa382[33]];_0xb732x14[_0xa382[34]]=_0xb732x18[_0xa382[34]];if(_0xb732x18[_0xa382[34]]){_0xb732x14[_0xa382[35]]=_0xb732x14[_0xa382[36]]=_0xb732x18[_0xa382[37]];_0xb732x14[_0xa382[34]]=_0xb732x18[_0xa382[37]];_0xb732x14[_0xa382[38]]=_0xa382[39]};return _0xb732x18[_0xa382[43]]({order:_0xa382[40],include:[{model:MailQueue,attributes:[_0xa382[20],_0xa382[27],_0xa382[37],_0xa382[38]],include:[{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]}]},{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]},{model:Interval,include:[{all:true}]}]})}}function handleApps(_0xb732x13,_0xb732x14){return function(_0xb732x1a){var _0xb732x1b=[];if(_0xb732x14[_0xa382[34]]){_0xb732x13[_0xa382[36]]=_0xb732x14[_0xa382[34]];_0xb732x13[_0xa382[35]]=_0xb732x14[_0xa382[34]];_0xb732x13[_0xa382[26]]=_0xb732x14[_0xa382[26]];_0xb732x13[_0xa382[44]]=_0xa382[34];_0xb732x13[_0xa382[38]]=_0xa382[39];var _0xb732x1c=_[_0xa382[45]](_0xb732x13);if(_0xb732x1c[_0xa382[26]][_0xa382[46]]){_0xb732x1b[_0xa382[57]](function(_0xb732x1d){return ReportMailRoom[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],from:_0xb732x1c[_0xa382[56]],roomid:_0xb732x1c[_0xa382[19]],joinAt:moment()[_0xa382[24]](_0xa382[54])})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})})}};_0xb732x1a[_0xa382[67]](function(_0xb732x1f,_0xb732x20){var _0xb732x1c=_[_0xa382[45]](_0xb732x13);_0xb732x1c[_0xa382[35]]=_0xb732x1f[_0xa382[37]];_0xb732x1c[_0xa382[44]]=_0xb732x1f[_0xa382[58]];_0xb732x1c[_0xa382[59]]=moment()[_0xa382[24]](_0xa382[54]);switch(_0xb732x1f[_0xa382[58]]){case _0xa382[65]:_0xb732x1c[_0xa382[51]]=_0xb732x1f[_0xa382[11]][_0xa382[20]];_0xb732x1c[_0xa382[52]]=_0xb732x1f[_0xa382[11]][_0xa382[27]];_0xb732x1c[_0xa382[38]]=_0xb732x1f[_0xa382[11]][_0xa382[38]];_0xb732x1c[_0xa382[36]]=_0xb732x1f[_0xa382[11]][_0xa382[37]];_0xb732x1f[_0xa382[11]][_0xa382[60]]=_[_0xa382[62]](_0xb732x1f[_0xa382[11]].Users,_0xa382[61]);_0xb732x1c[_0xa382[26]]=_[_0xa382[28]](_0xb732x1f[_0xa382[11]].Users,function(_0xb732x21){return {id:_0xb732x21[_0xa382[20]],name:_0xb732x21[_0xa382[27]],penalty:_0xb732x21[_0xa382[64]][_0xa382[63]]}});break;case _0xa382[50]:_0xb732x1c[_0xa382[36]]=_0xb732x1f[_0xa382[37]];_0xb732x1c[_0xa382[38]]=_0xa382[39];_0xb732x1c[_0xa382[26]]=[{id:_0xb732x1f[_0xa382[14]][_0xa382[20]],name:_0xb732x1f[_0xa382[14]][_0xa382[27]],penalty:0}];break;default:};if(_0xb732x1b[_0xa382[46]]){_0xb732x1b[_0xa382[57]](function(_0xb732x22,_0xb732x1d){if(_0xb732x22){_0xb732x1d(null,_0xb732x22)}else {return ReportMailSession[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb732x1c[_0xa382[21]]},individualHooks:true})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})}})}else {_0xb732x1b[_0xa382[57]](function(_0xb732x1d){return ReportMailRoom[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],from:_0xb732x1c[_0xa382[56]],roomid:_0xb732x1c[_0xa382[19]],joinAt:moment()[_0xa382[24]](_0xa382[54])})[_0xa382[49]](function(){return ReportMailSession[_0xa382[55]]({uniqueid:_0xb732x1c[_0xa382[21]],subject:_0xb732x1c[_0xa382[25]],accountid:_0xb732x1c[_0xa382[30]],accountname:_0xb732x1c[_0xa382[31]],accountaddress:_0xb732x1c[_0xa382[32]],application:_0xb732x1c[_0xa382[44]],memberid:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[20]]:null,membername:(_0xb732x1c[_0xa382[44]]===_0xa382[50]&&_0xb732x1c[_0xa382[26]][0])?_0xb732x1c[_0xa382[26]][0][_0xa382[27]]:null,queue:_0xb732x1c[_0xa382[51]],queuename:_0xb732x1c[_0xa382[52]],roomid:_0xb732x1c[_0xa382[19]],fidelity:_0xb732x1c[_0xa382[44]]===_0xa382[34]?_0xb732x1c[_0xa382[53]]:null,joinAt:moment()[_0xa382[24]](_0xa382[54])})})[_0xa382[49]](function(){ new Session(_0xb732x1c,_0xb732x1d)})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})})}});async[_0xa382[71]](_0xb732x1b,function(_0xb732x1e,_0xb732x23){console[_0xa382[18]](_0xa382[68]);if(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)};if(!_0xb732x23){return ReportMailRoom[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true,status:_0xa382[69]},{where:{leaveAt:null,uniqueid:_0xb732x13[_0xa382[21]]},individualHooks:true})[_0xa382[49]](function(){return MailRoom[_0xa382[70]](_0xb732x13[_0xa382[19]])})[_0xa382[49]](function(_0xb732x24){if(_0xb732x24){return _0xb732x24[_0xa382[66]]({status:_0xa382[69]})}})[_0xa382[49]](function(){return ReportMailSession[_0xa382[66]]({leaveAt:moment()[_0xa382[24]](_0xa382[54]),unmanaged:true},{where:{leaveAt:null,uniqueid:_0xb732x13[_0xa382[21]]},individualHooks:true})})[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xb732x1e)})}})}}function handleMessage(_0xb732xf){var _0xb732x14={agents:[]};var _0xb732x13={messageid:_0xb732xf[_0xa382[20]],from:_0xb732xf[_0xa382[56]][0]||null,joinAt:moment()[_0xa382[24]](_0xa382[54])};return _0xb732xf[_0xa382[75]]({include:[{model:User,attributes:[_0xa382[20],_0xa382[27],_0xa382[41],_0xa382[42]]}]})[_0xa382[49]](handleEntityNotFound(_0xa382[74]))[_0xa382[49]](handleMailRoom(_0xb732x13,_0xb732x14))[_0xa382[49]](handleEntityNotFound(_0xa382[73]))[_0xa382[49]](handleMailAccount(_0xb732x13,_0xb732x14))[_0xa382[49]](handleApps(_0xb732x13,_0xb732x14))[_0xa382[48]](function(_0xb732x1e){console[_0xa382[47]](_0xa382[72],_0xb732x1e)})}