Built motion from commit 27af9f03b.|1.0.28
[motion.git] / server / config / triggers / util.js
1 var _0x70bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x74\x69\x6C\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x76\x61\x6C\x75\x65\x73","\x66\x72\x6F\x6D","\x69\x73\x41\x72\x72\x61\x79","\x3B","\x73\x70\x6C\x69\x74","\x63\x63","\x74\x6F","\x73\x74\x61\x74\x75\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x64\x75\x63\x65","\x63\x6F\x6E\x63\x61\x74","\x6A\x6F\x69\x6E","\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","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6E\x6F\x74\x5F\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x67\x72\x65\x61\x74\x65\x72","\x6C\x65\x73\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0x70bd[0];var _=require(_0x70bd[1]);var logger=require(_0x70bd[3])(_0x70bd[2]);function Util(){logger[_0x70bd[5]](_0x70bd[4])}Util[_0x70bd[7]][_0x70bd[6]]= function(_0xf0a2x4,_0xf0a2x5){var _0xf0a2x6=[];_0xf0a2x4= _0xf0a2x4[_0x70bd[8]]|| _0xf0a2x4;_0xf0a2x4[_0x70bd[9]]= _0xf0a2x4[_0x70bd[9]]?(_[_0x70bd[10]](_0xf0a2x4[_0x70bd[9]])?_0xf0a2x4[_0x70bd[9]]:_0xf0a2x4[_0x70bd[9]][_0x70bd[12]](_0x70bd[11])):[];_0xf0a2x4[_0x70bd[13]]= _0xf0a2x4[_0x70bd[13]]?(_[_0x70bd[10]](_0xf0a2x4[_0x70bd[13]])?_0xf0a2x4[_0x70bd[13]]:_0xf0a2x4[_0x70bd[13]][_0x70bd[12]](_0x70bd[11])):[];_0xf0a2x4[_0x70bd[14]]= _0xf0a2x4[_0x70bd[14]]?(_[_0x70bd[10]](_0xf0a2x4[_0x70bd[14]])?_0xf0a2x4[_0x70bd[14]]:_0xf0a2x4[_0x70bd[14]][_0x70bd[12]](_0x70bd[11])):[];_0xf0a2x5[_0x70bd[17]](function(_0xf0a2x7){if(_0xf0a2x7[_0x70bd[15]]){var _0xf0a2x8=[];var _0xf0a2x9=[];_0xf0a2x7[_0x70bd[18]][_0x70bd[17]](function(_0xf0a2xa){_0xf0a2x8[_0x70bd[16]](checkCondition(_0xf0a2xa,_0xf0a2x4))});_0xf0a2x7[_0x70bd[19]][_0x70bd[17]](function(_0xf0a2xa){_0xf0a2x9[_0x70bd[16]](checkCondition(_0xf0a2xa,_0xf0a2x4))});var _0xf0a2xb=[],_0xf0a2xc=[];_0xf0a2xb[_0x70bd[16]](_[_0x70bd[21]](_0xf0a2x8[_0x70bd[20]]?_0xf0a2x8:[true],function(_0xf0a2xd,_0xf0a2xe){return _0xf0a2xd&& _0xf0a2xe}));_0xf0a2xc[_0x70bd[16]](_[_0x70bd[21]](_0xf0a2x9[_0x70bd[20]]?_0xf0a2x9:[true],function(_0xf0a2xd,_0xf0a2xe){return _0xf0a2xd|| _0xf0a2xe}));var _0xf0a2xf=_0xf0a2xb[_0x70bd[22]](_0xf0a2xc);var _0xf0a2x10=_[_0x70bd[21]](_0xf0a2xf[_0x70bd[20]]?_0xf0a2xf:[true],function(_0xf0a2xd,_0xf0a2xe){return _0xf0a2xd&& _0xf0a2xe});if(_0xf0a2x10){_0xf0a2x6= _0xf0a2x6[_0x70bd[22]](_0xf0a2x7.Actions)}}});_0xf0a2x4[_0x70bd[9]]= _0xf0a2x4[_0x70bd[9]][_0x70bd[23]](_0x70bd[11]);_0xf0a2x4[_0x70bd[13]]= _0xf0a2x4[_0x70bd[13]][_0x70bd[23]](_0x70bd[11]);_0xf0a2x4[_0x70bd[14]]= _0xf0a2x4[_0x70bd[14]][_0x70bd[23]](_0x70bd[11]);return _0xf0a2x6};function checkCondition(_0xf0a2xa,_0xf0a2x4){var _0xf0a2x12=false;var _0xf0a2x13=0;if(_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]){switch(_0xf0a2xa[_0x70bd[35]]){case _0x70bd[26]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]== _0xf0a2xa[_0x70bd[25]]);break;case _0x70bd[27]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]!= _0xf0a2xa[_0x70bd[25]]);break;case _0x70bd[29]:_0xf0a2x12= false;if(_[_0x70bd[10]](_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]])){for(_0xf0a2x13= 0;_0xf0a2x13< _0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0x70bd[20]];_0xf0a2x13++){if(_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0xf0a2x13][_0x70bd[28]](_0xf0a2xa[_0x70bd[25]])){_0xf0a2x12= true;break}}}else {_0xf0a2x12= _0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0x70bd[28]](_0xf0a2xa[_0x70bd[25]])};break;case _0x70bd[30]:_0xf0a2x12= true;if(_[_0x70bd[10]](_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]])){for(_0xf0a2x13= 0;_0xf0a2x13< _0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0x70bd[20]];_0xf0a2x13++){if(_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0xf0a2x13][_0x70bd[28]](_0xf0a2xa[_0x70bd[25]])){_0xf0a2x12= false;break}}}else {_0xf0a2x12=  !(_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]][_0x70bd[28]](_0xf0a2xa[_0x70bd[25]]))};break;case _0x70bd[31]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]>= Number(_0xf0a2xa[_0x70bd[25]]));break;case _0x70bd[32]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]<= Number(_0xf0a2xa[_0x70bd[25]]));break;case _0x70bd[33]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]> Number(_0xf0a2xa[_0x70bd[25]]));break;case _0x70bd[34]:_0xf0a2x12= (_0xf0a2x4[_0xf0a2xa[_0x70bd[24]]]< Number(_0xf0a2xa[_0x70bd[25]]));break;default:}};return _0xf0a2x12}module[_0x70bd[36]]= Util