1 var _0x740d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x46\x61\x78","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x61\x72\x65"];_0x740d[0];var _=require(_0x740d[1]);var moment=require(_0x740d[2]);var Automation=require(_0x740d[4])[_0x740d[3]];var FaxRoom=require(_0x740d[4])[_0x740d[5]];var activeFaxAutomations={};function executeAutomation(_0x8f6dx7){console[_0x740d[7]](_0x740d[6],_0x8f6dx7);var _0x8f6dx8;return Automation[_0x740d[33]](_0x740d[32])[_0x740d[31]](_0x8f6dx7)[_0x740d[21]](function(_0x8f6dxd){_0x8f6dx8= _0x8f6dxd;var _0x8f6dxe=[];var _0x8f6dxf=[];var _0x8f6dx10={where:{}};_0x8f6dxd[_0x740d[24]][_0x740d[19]](function(_0x8f6dx11){_0x8f6dxf[_0x740d[23]](getCondition(_0x8f6dx11[_0x740d[22]]))});_0x8f6dxd[_0x740d[25]][_0x740d[19]](function(_0x8f6dx11){_0x8f6dxe[_0x740d[23]](getCondition(_0x8f6dx11[_0x740d[22]]))});if(_0x8f6dxf[_0x740d[26]]){_0x8f6dx10[_0x740d[28]][_0x740d[27]]= _0x8f6dxf};if(_0x8f6dxe[_0x740d[26]]){_0x8f6dx10[_0x740d[28]][_0x740d[29]]= _0x8f6dxe};return FaxRoom[_0x740d[30]](_0x8f6dx10)})[_0x740d[21]](function(_0x8f6dxa){_0x8f6dxa[_0x740d[19]](function(_0x8f6dxb){_0x8f6dx8[_0x740d[20]][_0x740d[19]](function(_0x8f6dxc){switch(_0x8f6dxc[_0x740d[18]]){case _0x740d[17]:setStatus(_0x8f6dxb[_0x740d[15]],_0x8f6dxc[_0x740d[16]]);break;default:}})})})[_0x740d[14]](function(_0x8f6dx9){console[_0x740d[9]](_0x740d[8]);console[_0x740d[9]](_0x740d[10],_0x8f6dx9[_0x740d[11]]);console[_0x740d[9]](_0x740d[12],_0x8f6dx9[_0x740d[13]])})}function setStatus(_0x8f6dx13,_0x8f6dx14){return FaxRoom[_0x740d[35]]({status:_0x8f6dx14},{where:{id:_0x8f6dx13}})[_0x740d[14]](function(_0x8f6dx9){console[_0x740d[9]](_0x740d[34]);console[_0x740d[9]](_0x740d[10],_0x8f6dx9[_0x740d[11]]);console[_0x740d[9]](_0x740d[12],_0x8f6dx9[_0x740d[13]])})}function getCondition(_0x8f6dx11){var _0x8f6dx16={};switch(_0x8f6dx11[_0x740d[36]]){case _0x740d[17]:switch(_0x8f6dx11[_0x740d[40]]){case _0x740d[38]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= _0x8f6dx11[_0x740d[37]];break;case _0x740d[39]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= {$ne:_0x8f6dx11[_0x740d[37]]};break;default:};break;case _0x740d[49]:var _0x8f6dx17=moment()[_0x740d[44]](parseInt(_0x8f6dx11[_0x740d[37]],10),_0x740d[43])[_0x740d[42]](_0x740d[41]);switch(_0x8f6dx11[_0x740d[40]]){case _0x740d[45]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= {lt:_0x8f6dx17};break;case _0x740d[46]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= {$lte:_0x8f6dx17};break;case _0x740d[47]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= {$gt:_0x8f6dx17};break;case _0x740d[48]:_0x8f6dx16[_0x8f6dx11[_0x740d[36]]]= {$gte:_0x8f6dx17};break;default:};break;default:};return _0x8f6dx16}function createInterval(_0x8f6dxd){console[_0x740d[7]](_0x740d[50],_0x8f6dxd[_0x740d[15]],_0x740d[51],_0x8f6dxd[_0x740d[52]]* 60* 1000);activeFaxAutomations[_0x740d[53]+ _0x8f6dxd[_0x740d[15]]]= setInterval(function(){executeAutomation(_0x8f6dxd[_0x740d[15]])},_0x8f6dxd[_0x740d[52]]* 60* 1000)}module[_0x740d[54]]= function(){console[_0x740d[7]](_0x740d[55]);Automation[_0x740d[60]](function(_0x8f6dx19,_0x8f6dx1a){if(_0x8f6dx19[_0x740d[56]]=== _0x740d[57]){console[_0x740d[7]](_0x740d[58],_0x8f6dx19[_0x740d[15]],_0x740d[59],_0x8f6dx19[_0x740d[17]]);if(_0x8f6dx19[_0x740d[17]]){createInterval(_0x8f6dx19)}}});Automation[_0x740d[63]](function(_0x8f6dx19,_0x8f6dx1a){if(_0x8f6dx19[_0x740d[56]]=== _0x740d[57]){console[_0x740d[7]](_0x740d[58],_0x8f6dx19[_0x740d[15]],_0x740d[61],_0x8f6dx19[_0x740d[17]]);if(activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]){console[_0x740d[7]](_0x740d[62],_0x8f6dx19[_0x740d[15]]);clearInterval(activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]);delete activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]};if(_0x8f6dx19[_0x740d[17]]){createInterval(_0x8f6dx19)}}});Automation[_0x740d[65]](function(_0x8f6dx19,_0x8f6dx1a){if(_0x8f6dx19[_0x740d[56]]=== _0x740d[57]){console[_0x740d[7]](_0x740d[58],_0x8f6dx19[_0x740d[15]],_0x740d[64]);if(activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]){console[_0x740d[7]](_0x740d[62],_0x8f6dx19[_0x740d[15]]);clearInterval(activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]);delete activeFaxAutomations[_0x740d[53]+ _0x8f6dx19[_0x740d[15]]]}}});return Automation[_0x740d[33]](_0x740d[32])[_0x740d[30]]({where:{status:true,channel:_0x740d[57]},attributes:[_0x740d[15],_0x740d[52]]})[_0x740d[21]](function(_0x8f6dx1b){console[_0x740d[7]](_0x740d[67],_0x8f6dx1b[_0x740d[26]]);_0x8f6dx1b[_0x740d[19]](function(_0x8f6dxd){createInterval(_0x8f6dxd)})})[_0x740d[14]](function(_0x8f6dx9){console[_0x740d[9]](_0x740d[66]);console[_0x740d[9]](_0x740d[10],_0x8f6dx9[_0x740d[11]]);console[_0x740d[9]](_0x740d[12],_0x8f6dx9[_0x740d[13]])})}