1f99c385899e3606ae39ae4e2943bad72a2e08e8
[motion.git] / server / config / rpc / rpc.js
1 var _0xc40d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x72\x70\x63","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x6A\x61\x79\x73\x6F\x6E\x2F\x70\x72\x6F\x6D\x69\x73\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x64\x65\x6C","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64","\x75\x70\x64\x61\x74\x65","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x6F\x75\x6E\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x71\x75\x65\x72\x79","\x73\x65\x72\x76\x65\x72","\x52\x50\x43\x20\x53\x65\x72\x76\x65\x72\x20\x72\x75\x6E\x6E\x69\x6E\x67\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x72\x70\x63\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x2E\x2E\x2E","\x73\x65\x6E\x64","\x6C\x69\x73\x74\x65\x6E","\x68\x74\x74\x70"];_0xc40d[0];var db=require(_0xc40d[1]);var logger=require(_0xc40d[3])(_0xc40d[2]);var _=require(_0xc40d[4]);var jayson=require(_0xc40d[5]);function traverseObject(_0xfdd6x6){if(_0xfdd6x6&& _0xfdd6x6[_0xc40d[6]]){for(var _0xfdd6x7=0;_0xfdd6x7< _0xfdd6x6[_0xc40d[6]][_0xc40d[7]];_0xfdd6x7++){traverseObject(_0xfdd6x6[_0xc40d[6]][_0xfdd6x7]);if(_0xfdd6x6[_0xc40d[6]][_0xfdd6x7][_0xc40d[8]]){_0xfdd6x6[_0xc40d[6]][_0xfdd6x7][_0xc40d[8]]= db[_0xfdd6x6[_0xc40d[6]][_0xfdd6x7][_0xc40d[8]]]}}}}var server=jayson[_0xc40d[25]]({index:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[1]);db[_0xfdd6x9[0]][_0xc40d[13]](_0xfdd6x9[1])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},show:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[1]);db[_0xfdd6x9[0]][_0xc40d[14]](_0xfdd6x9[1])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},update:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[2]);db[_0xfdd6x9[0]][_0xc40d[14]](_0xfdd6x9[2])[_0xc40d[12]](function(_0xfdd6xc){if(_0xfdd6xc){return _0xfdd6xc[_0xc40d[15]](_0xfdd6x9[1])}})[_0xc40d[12]](function(_0xfdd6xc){if(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)}else {_0xfdd6xa(null,null)}})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},create:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[2]);db[_0xfdd6x9[0]][_0xc40d[16]](_0xfdd6x9[1],_0xfdd6x9[2])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},findOrCreate:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[1]);db[_0xfdd6x9[0]][_0xc40d[17]](_0xfdd6x9[1])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},bulkCreate:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[2]);db[_0xfdd6x9[0]][_0xc40d[18]](_0xfdd6x9[1],_0xfdd6x9[2])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},delete:function(_0xfdd6x9,_0xfdd6xa){try{traverseObject(_0xfdd6x9[1]);db[_0xfdd6x9[0]][_0xc40d[14]](_0xfdd6x9[1])[_0xc40d[12]](function(_0xfdd6xc){if(_0xfdd6xc){return _0xfdd6xc[_0xc40d[19]]()}})[_0xc40d[12]](function(_0xfdd6xc){if(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)}else {_0xfdd6xa(null,null)}})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},count:function(_0xfdd6x9,_0xfdd6xa){try{db[_0xfdd6x9[0]][_0xc40d[20]](_0xfdd6x9[1])[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}},query:function(_0xfdd6x9,_0xfdd6xa){try{db[_0xc40d[23]][_0xc40d[24]](_0xfdd6x9[0],{type:db[_0xc40d[23]][_0xc40d[22]][_0xc40d[21]]})[_0xc40d[12]](function(_0xfdd6xc){_0xfdd6xa(null,_0xfdd6xc)})[_0xc40d[11]](function(_0xfdd6xb){logger[_0xc40d[10]](_0xfdd6xb[_0xc40d[9]]);_0xfdd6xa(_0xfdd6xb)})}catch(err){logger[_0xc40d[10]](err[_0xc40d[9]]);_0xfdd6xa(err)}}});server[_0xc40d[31]]()[_0xc40d[30]](9001,function(){logger[_0xc40d[27]](_0xc40d[26]);process[_0xc40d[29]]({message:_0xc40d[28]})})