1 var _0x5e72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x69\x74","\x70\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D","\x6F\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x73\x67","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73","\x74\x79\x70\x65","\x72\x6F\x6F\x74","\x2F\x73\x65\x72\x76\x65\x72\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x66\x6F\x72\x6B\x65\x64\x5F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x66\x61\x78\x2F\x69\x6E\x64\x65\x78\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6B","\x73\x74\x61\x72\x74","\x66\x61\x78","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x69\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x72\x6F\x6D","\x73\x65\x6E\x64","\x70\x75\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x2F\x61\x6D\x69","\x65\x72\x72\x6F\x72","\x61\x6D\x69\x20\x65\x72\x72","\x63\x6C\x6F\x73\x65","\x61\x6D\x69\x20\x63\x6C\x6F\x73\x65","\x6C\x6F\x67","\x64\x6F\x63","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x75\x70\x64\x61\x74\x65\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74\x46\x61\x78\x52\x6F\x75\x74\x69\x6E\x67","\x5B\x41\x4D\x49\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x6E\x65\x74\x77\x6F\x72\x6B\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x4E\x65\x74\x77\x6F\x72\x6B","\x6E\x65\x74\x77\x6F\x72\x6B\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6E\x65\x74\x77\x6F\x72\x6B\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x76\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x76\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x67\x65\x74","\x63\x61\x74\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x66\x69\x6E\x64","\x73\x74\x6F\x70","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x70\x72\x6F\x63\x65\x73\x73","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x72\x65\x6A\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x46\x61\x78\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x65\x70\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x61\x63\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x63\x74\x69\x6F\x6E","\x6E\x65\x77\x54\x72\x69\x67\x67\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x54\x72\x69\x67\x67\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x77\x68\x65\x72\x65","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x74\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6D\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x63\x6D\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x6D\x41\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x41\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x63\x68\x61\x74\x52\x6F\x6F\x6D\x41\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6B\x69\x6C\x6C"];_0x5e72[0];var cp=require(_0x5e72[1]);var models=require(_0x5e72[2]);var path=require(_0x5e72[3]);var util=require(_0x5e72[4]);var moment=require(_0x5e72[5]);var _=require(_0x5e72[6]);var config=require(_0x5e72[7]);var processes=[];function createAndStartRouting(_0xf56dxa,_0xf56dxb){var _0xf56dxc=cp[_0x5e72[30]](path[_0x5e72[29]](config[_0x5e72[27]],_0x5e72[28]))[_0x5e72[17]](_0x5e72[18],function(_0xf56dxf){switch(_0xf56dxf[_0x5e72[26]]){case _0x5e72[23]:return models[_0x5e72[22]][_0x5e72[21]](_0xf56dxf[_0x5e72[19]],{include:[{model:models[_0x5e72[20]]}]});case _0x5e72[25]:return models[_0x5e72[24]][_0x5e72[21]](_0xf56dxf[_0x5e72[19]]);default:}})[_0x5e72[17]](_0x5e72[8],function(){var _0xf56dxd=_[_0x5e72[10]](processes,{pid:this[_0x5e72[9]]});if(_0xf56dxd&& _0xf56dxd[_0x5e72[11]]){return models[_0x5e72[16]][_0x5e72[15]](_0xf56dxd[0][_0x5e72[14]])[_0x5e72[13]](function(_0xf56dxe){if(_0xf56dxe){return _0xf56dxe[_0x5e72[12]]({waiting:false})}})}});_0xf56dxc[_0x5e72[42]]({type:_0x5e72[31],param1:{channel:_0x5e72[32],uniqueid:util[_0x5e72[35]](_0x5e72[33],moment()[_0x5e72[34]](),_0xf56dxa.FaxRoomId),subject:_0xf56dxa[_0x5e72[36]],messageid:_0xf56dxa[_0x5e72[37]],roomid:_0xf56dxa[_0x5e72[38]],accountid:_0xf56dxb[_0x5e72[37]],accountname:_0xf56dxb[_0x5e72[39]],accountphone:_0xf56dxb[_0x5e72[40]],from:_0xf56dxa[_0x5e72[41]]},param2:_0xf56dxa});processes[_0x5e72[43]]({id:_0xf56dxa[_0x5e72[37]],channel:_0x5e72[32],process:_0xf56dxc,roomid:_0xf56dxa[_0x5e72[38]],pid:_0xf56dxc[_0x5e72[9]]})}module[_0x5e72[44]]= function(){var _0xf56dx10=cp[_0x5e72[30]](__dirname+ _0x5e72[45]);_0xf56dx10[_0x5e72[17]](_0x5e72[18],function(_0xf56dxa){switch(_0xf56dxa[_0x5e72[18]]){case _0x5e72[52]:return models[_0x5e72[22]][_0x5e72[21]](_0xf56dxa[_0x5e72[51]],{include:[{model:models[_0x5e72[20]]}]});case _0x5e72[53]:return models[_0x5e72[24]][_0x5e72[21]](_0xf56dxa[_0x5e72[51]]);case _0x5e72[56]:return models[_0x5e72[55]][_0x5e72[12]](_0xf56dxa[_0x5e72[51]],{individualHooks:true,where:_0xf56dxa[_0x5e72[54]]});case _0x5e72[58]:createAndStartRouting(_0xf56dxa[_0x5e72[51]][_0x5e72[18]],_0xf56dxa[_0x5e72[51]][_0x5e72[57]]);break;default:console[_0x5e72[46]](_0x5e72[59],_0xf56dxa[_0x5e72[18]])}})[_0x5e72[17]](_0x5e72[48],function(_0xf56dx12){console[_0x5e72[50]](_0x5e72[49],_0xf56dx12)})[_0x5e72[17]](_0x5e72[46],function(_0xf56dx11){console[_0x5e72[46]](_0x5e72[47],_0xf56dx11)});models[_0x5e72[62]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[60],doc:_0xf56dx13})});models[_0x5e72[62]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[63],doc:_0xf56dx13})});models[_0x5e72[62]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[65],doc:_0xf56dx13})});models[_0x5e72[68]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[67],doc:_0xf56dx13})});models[_0x5e72[68]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[69],doc:_0xf56dx13})});models[_0x5e72[71]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[70],doc:_0xf56dx13})});models[_0x5e72[71]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[72],doc:_0xf56dx13})});models[_0x5e72[71]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[73],doc:_0xf56dx13})});models[_0x5e72[75]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[74],doc:_0xf56dx13})});models[_0x5e72[75]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[76],doc:_0xf56dx13})});models[_0x5e72[75]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[77],doc:_0xf56dx13})});models[_0x5e72[95]][_0x5e72[64]](function(_0xf56dx13){if(_0xf56dx13[_0x5e72[79]](_0x5e72[78])|| _0xf56dx13[_0x5e72[79]](_0x5e72[80])){var _0xf56dx14=_0xf56dx13[_0x5e72[81]]({plain:true});if(_0xf56dx13[_0x5e72[79]](_0x5e72[78])){return models[_0x5e72[91]][_0x5e72[12]]({memberid:_0xf56dx14[_0x5e72[88]],membername:_0xf56dx14[_0x5e72[86]],leaveAt:moment()[_0x5e72[35]](_0x5e72[89])},{where:{uniqueid:_0xf56dx14[_0x5e72[90]],leaveAt:null},individualHooks:true})[_0x5e72[13]](function(){var _0xf56dx15=_[_0x5e72[84]](processes,{id:_0xf56dx14[_0x5e72[83]]});if(_0xf56dx15){_0xf56dx15[_0x5e72[87]][_0x5e72[42]]({type:_0x5e72[85],membername:_0xf56dx14[_0x5e72[86]]})}})[_0x5e72[82]](function(_0xf56dx11){console[_0x5e72[46]](_0xf56dx11)})}else {if(_0xf56dx13[_0x5e72[79]](_0x5e72[80])){var _0xf56dx15=_[_0x5e72[84]](processes,{id:_0xf56dx14[_0x5e72[83]]});if(_0xf56dx15){_0xf56dx15[_0x5e72[87]][_0x5e72[42]]({type:_0x5e72[92],id:_0xf56dx14[_0x5e72[88]],membername:_0xf56dx14[_0x5e72[86]]})}}};_0xf56dx10[_0x5e72[42]]({message:_0x5e72[93],doc:_0xf56dx13,action:_0xf56dx13[_0x5e72[79]](_0x5e72[78])?_0x5e72[94]:_0x5e72[92]})}});models[_0x5e72[98]][_0x5e72[61]](function(_0xf56dx13,_0xf56dx16){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[96],doc:_0xf56dx13,options:{body:_0xf56dx16[_0x5e72[97]]}})});models[_0x5e72[101]][_0x5e72[61]](function(_0xf56dx13,_0xf56dx16){_0xf56dx16[_0x5e72[99]][_0x5e72[37]]= _0xf56dx13[_0x5e72[37]];_0xf56dx10[_0x5e72[42]]({message:_0x5e72[100],newTrigger:_0xf56dx16[_0x5e72[99]]})});models[_0x5e72[101]][_0x5e72[64]](function(_0xf56dx13,_0xf56dx16){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[102],doc:_0xf56dx13})});models[_0x5e72[101]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[103],id:_0xf56dx13[_0x5e72[37]]})});models[_0x5e72[107]][_0x5e72[106]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[104],id:parseInt(_0xf56dx13[_0x5e72[105]].TriggerId)})});models[_0x5e72[107]][_0x5e72[109]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[108],doc:_0xf56dx13})});models[_0x5e72[114]][_0x5e72[106]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[110],TriggerAllId:_0xf56dx13[_0x5e72[105]][_0x5e72[112]](_0x5e72[111])?parseInt(_0xf56dx13[_0x5e72[105]].TriggerAllId):false,TriggerAnyId:_0xf56dx13[_0x5e72[105]][_0x5e72[112]](_0x5e72[113])?parseInt(_0xf56dx13[_0x5e72[105]].TriggerAnyId):false})});models[_0x5e72[114]][_0x5e72[109]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[115],doc:_0xf56dx13})});models[_0x5e72[117]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[116],doc:_0xf56dx13})});models[_0x5e72[117]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[118],doc:_0xf56dx13})});models[_0x5e72[117]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[119],id:_0xf56dx13[_0x5e72[37]]})});models[_0x5e72[121]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[120],doc:_0xf56dx13})});models[_0x5e72[121]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[122],doc:_0xf56dx13})});models[_0x5e72[121]][_0x5e72[66]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[123],id:_0xf56dx13[_0x5e72[37]]})});models[_0x5e72[125]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[124],doc:_0xf56dx13})});models[_0x5e72[125]][_0x5e72[64]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[126],doc:_0xf56dx13})});models[_0x5e72[128]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[127],doc:_0xf56dx13})});models[_0x5e72[55]][_0x5e72[61]](function(_0xf56dx13){_0xf56dx10[_0x5e72[42]]({message:_0x5e72[129],doc:_0xf56dx13})});process[_0x5e72[17]](_0x5e72[8],function(_0xf56dx12){_0xf56dx10[_0x5e72[130]]()});return _0xf56dx10}