Built motion from commit 464be02.|0.0.84
[motion.git] / server / config / util / index.js
1 var _0x16f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x73\x75\x6E","\x6D\x6F\x6E","\x74\x75\x65","\x77\x65\x64","\x74\x68\x75","\x66\x72\x69","\x73\x61\x74","\x6A\x61\x6E","\x66\x65\x62","\x6D\x61\x72","\x61\x70\x72","\x6D\x61\x79","\x6A\x75\x6E","\x6A\x75\x6C","\x61\x75\x67","\x73\x65\x70","\x6F\x63\x74","\x6E\x6F\x76","\x64\x65\x63","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x2D","\x54\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6C\x6F\x67","\x64\x61\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x44\x57\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x64\x61\x74\x65","\x44\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6D\x6F\x6E\x74\x68","\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x49\x4E\x54\x45\x52\x56\x41\x4C\x20\x4F\x4B","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x77\x68\x65\x72\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x16f4[0];var _=require(_0x16f4[1]);var moment=require(_0x16f4[2]);var checkInterval=function(_0x9982x4){var _0x9982x5=[_0x16f4[3],_0x16f4[4],_0x16f4[5],_0x16f4[6],_0x16f4[7],_0x16f4[8],_0x16f4[9]];var _0x9982x6=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];var _0x9982x7=[_0x16f4[10],_0x16f4[11],_0x16f4[12],_0x16f4[13],_0x16f4[14],_0x16f4[15],_0x16f4[16],_0x16f4[17],_0x16f4[18],_0x16f4[19],_0x16f4[20],_0x16f4[21]];var _0x9982x8,_0x9982x9;var _0x9982xa=_0x9982x4[_0x16f4[23]](_0x16f4[22])[0];var _0x9982xb=_0x9982x4[_0x16f4[23]](_0x16f4[22])[1];var _0x9982xc=_0x9982x4[_0x16f4[23]](_0x16f4[22])[2];var _0x9982xd=_0x9982x4[_0x16f4[23]](_0x16f4[22])[3];if(_0x9982xa!==_0x16f4[24]){var _0x9982xe=moment()[_0x16f4[26]](_0x16f4[25]);var _0x9982xf=_0x9982xa[_0x16f4[23]](_0x16f4[27])[0];var _0x9982x10=_0x9982xa[_0x16f4[23]](_0x16f4[27])[1];if((_0x9982xe<_0x9982xf)||(_0x9982xe>_0x9982x10)){console[_0x16f4[29]](_0x16f4[28]);return false}};if(_0x9982xb!==_0x16f4[24]){var _0x9982x11=_0x9982x5[moment()[_0x16f4[30]]()];var _0x9982x12=_[_0x16f4[31]](_0x9982x5,_0x9982xb[_0x16f4[23]](_0x16f4[27])[0]);var _0x9982x13=_[_0x16f4[31]](_0x9982x5,_0x9982xb[_0x16f4[23]](_0x16f4[27])[1]);for(_0x9982x8=0;_0x9982x8<_0x9982x12;_0x9982x8++){_0x9982x9=_0x9982x5[_0x16f4[32]]();_0x9982x5[_0x16f4[33]](_0x9982x9)};_0x9982x12=_[_0x16f4[31]](_0x9982x5,_0x9982xb[_0x16f4[23]](_0x16f4[27])[0]);_0x9982x13=_[_0x16f4[31]](_0x9982x5,_0x9982xb[_0x16f4[23]](_0x16f4[27])[1])+1;_0x9982x5=_0x9982x5[_0x16f4[34]](_0x9982x12,_0x9982x13);if(!_[_0x16f4[35]](_0x9982x5,_0x9982x11)){console[_0x16f4[29]](_0x16f4[36]);return false}};if(_0x9982xc!==_0x16f4[24]){var _0x9982x14=moment()[_0x16f4[37]]();var _0x9982x15=_[_0x16f4[31]](_0x9982x6,parseInt(_0x9982xc[_0x16f4[23]](_0x16f4[27])[0],10));var _0x9982x16=_[_0x16f4[31]](_0x9982x6,parseInt(_0x9982xc[_0x16f4[23]](_0x16f4[27])[1]));for(_0x9982x8=0;_0x9982x8<_0x9982x15;_0x9982x8++){_0x9982x9=_0x9982x6[_0x16f4[32]]();_0x9982x6[_0x16f4[33]](_0x9982x9)};_0x9982x15=_[_0x16f4[31]](_0x9982x6,parseInt(_0x9982xc[_0x16f4[23]](_0x16f4[27])[0],10));_0x9982x16=_[_0x16f4[31]](_0x9982x6,parseInt(_0x9982xc[_0x16f4[23]](_0x16f4[27])[1]),10)+1;_0x9982x6=_0x9982x6[_0x16f4[34]](_0x9982x15,_0x9982x16);if(!_[_0x16f4[35]](_0x9982x6,_0x9982x14)){console[_0x16f4[29]](_0x16f4[38]);return false}};if(_0x9982xd!==_0x16f4[24]){var _0x9982x17=_0x9982x7[moment()[_0x16f4[39]]()];var _0x9982x18=_[_0x16f4[31]](_0x9982x7,_0x9982xd[_0x16f4[23]](_0x16f4[27])[0]);var _0x9982x19=_[_0x16f4[31]](_0x9982x7,_0x9982xd[_0x16f4[23]](_0x16f4[27])[1]);for(_0x9982x8=0;_0x9982x8<_0x9982x18;_0x9982x8++){_0x9982x9=_0x9982x7[_0x16f4[32]]();_0x9982x7[_0x16f4[33]](_0x9982x9)};_0x9982x18=_[_0x16f4[31]](_0x9982x7,_0x9982xd[_0x16f4[23]](_0x16f4[27])[0]);_0x9982x19=_[_0x16f4[31]](_0x9982x7,_0x9982xd[_0x16f4[23]](_0x16f4[27])[1])+1;_0x9982x7=_0x9982x7[_0x16f4[34]](_0x9982x18,_0x9982x19);if(!_[_0x16f4[35]](_0x9982x7,_0x9982x17)){console[_0x16f4[29]](_0x16f4[40]);return false}};console[_0x16f4[29]](_0x16f4[41]);return true};var isValidInterval=function(_0x9982x4){if(_[_0x16f4[42]](_0x9982x4)){for(var _0x9982x8=0;_0x9982x8<_0x9982x4[_0x16f4[44]][_0x16f4[43]];_0x9982x8++){if(!checkInterval(_0x9982x4[_0x16f4[44]][_0x9982x8][_0x16f4[45]])){return false}};return true}else {return checkInterval(_0x9982x4)}};var getQuery=function(_0x9982x1c){var _0x9982x1d={where:{}};if(_0x9982x1c){_[_0x16f4[53]](_0x9982x1c,function(_0x9982x1e,_0x9982x1f){switch(_0x9982x1f){case _0x16f4[46]:;case _0x16f4[47]:_0x9982x1d[_0x9982x1f]=Number(_0x9982x1e);break;case _0x16f4[48]:_0x9982x1d[_0x9982x1f]=_0x9982x1e;break;case _0x16f4[49]:;case _0x16f4[51]:_0x9982x1d[_0x16f4[50]][_0x9982x1f]=_0x9982x1e;break;default:_0x9982x1d[_0x16f4[50]][_0x9982x1f]={$like:_0x16f4[52]+_0x9982x1e+_0x16f4[52]}}})};return _0x9982x1d};var stripTrailingSlash=function(_0x9982x21){if(_0x9982x21[_0x16f4[54]](-1)===_0x16f4[55]){return _0x9982x21[_0x16f4[54]](0,_0x9982x21[_0x16f4[43]]-1)};return _0x9982x21};module[_0x16f4[56]]={getQuery:getQuery,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,errorManager:require(_0x16f4[57])}