Built motion from commit e3a5454.|0.0.47
[motion.git] / server / api / extracted_report / extracted_report.controller.js
1 var _0x1570=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6C\x6F\x67","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6E\x63\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x74\x72\x6F\x79","\x52\x5F\x4F\x4B","\x57\x5F\x4F\x4B","\x46\x69\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x6F\x72\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x70\x65\x72\x6D\x69\x74\x74\x65\x64","\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x20\x64\x65\x6C\x65\x74\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x3A","\x66\x69\x6C\x65\x20\x64\x65\x6C\x65\x74\x65\x64","\x75\x6E\x6C\x69\x6E\x6B","\x61\x63\x63\x65\x73\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68"];_0x1570[0];var _=require(_0x1570[1]);var ExtractedReport=require(_0x1570[3])[_0x1570[2]];var util=require(_0x1570[4]);var path=require(_0x1570[5]);var moment=require(_0x1570[6]);var config=require(_0x1570[7]);var base64=require(_0x1570[8]);var fs=require(_0x1570[9]);var Util=require(_0x1570[10]);exports[_0x1570[11]]=function(_0xfc40xa,_0xfc40xb,_0xfc40xc){return ExtractedReport[_0x1570[18]](Util[_0x1570[17]](_0xfc40xa[_0x1570[16]]))[_0x1570[15]](function(_0xfc40xe){_0xfc40xb[_0x1570[14]](200)[_0x1570[13]](_0xfc40xe)})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[19]]=function(_0xfc40xa,_0xfc40xb){ExtractedReport[_0x1570[23]](_0xfc40xa[_0x1570[22]][_0x1570[21]])[_0x1570[15]](function(_0xfc40xf){if(!_0xfc40xf){return _0xfc40xb[_0x1570[20]](404)};return _0xfc40xb[_0x1570[13]](_0xfc40xf)})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[24]]=function(_0xfc40xa,_0xfc40xb){ExtractedReport[_0x1570[23]](_0xfc40xa[_0x1570[22]][_0x1570[21]])[_0x1570[15]](function(_0xfc40x10){if(!_0xfc40x10){return _0xfc40xb[_0x1570[14]](404)[_0x1570[13]](_0xfc40x10)};var _0xfc40x11=path[_0x1570[31]](config[_0x1570[26]],_0x1570[27],_0x1570[28],_0x1570[29],_0xfc40x10[_0x1570[30]]);base64[_0x1570[32]](_0xfc40x11,function(_0xfc40xd,_0xfc40x12){if(_0xfc40xd){console[_0x1570[25]](_0xfc40xd);return handleError(_0xfc40xb,_0xfc40xd)}else {return _0xfc40xb[_0x1570[14]](200)[_0x1570[13]](_0xfc40x12)}})})[_0x1570[12]](function(_0xfc40xd){console[_0x1570[25]](_0xfc40xd);return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[33]]=function(_0xfc40xa,_0xfc40xb){ExtractedReport[_0x1570[33]](_0xfc40xa[_0x1570[34]])[_0x1570[15]](function(_0xfc40xf){return _0xfc40xb[_0x1570[14]](201)[_0x1570[13]](_0xfc40xf)})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[35]]=function(_0xfc40xa,_0xfc40xb){ExtractedReport[_0x1570[39]]({where:{name:_0xfc40xa[_0x1570[34]][_0x1570[38]],id:{$ne:_0xfc40xa[_0x1570[34]][_0x1570[21]]}}})[_0x1570[15]](function(_0xfc40x13){if(!_0xfc40x13){return _0xfc40xb[_0x1570[20]](404)};if(_0xfc40xa[_0x1570[34]][_0x1570[21]]){delete _0xfc40xa[_0x1570[34]][_0x1570[21]]};ExtractedReport[_0x1570[23]](_0xfc40xa[_0x1570[22]][_0x1570[21]])[_0x1570[15]](function(_0xfc40xf){if(!_0xfc40xf){return _0xfc40xb[_0x1570[20]](404)};var _0xfc40x14=_[_0x1570[36]](_0xfc40xf,_0xfc40xa[_0x1570[34]]);_0xfc40x14[_0x1570[37]]()[_0x1570[15]](function(){return _0xfc40xb[_0x1570[14]](200)[_0x1570[13]](_0xfc40xf)})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[40]]=function(_0xfc40xa,_0xfc40xb){var _0xfc40x15;ExtractedReport[_0x1570[23]](_0xfc40xa[_0x1570[22]][_0x1570[21]])[_0x1570[15]](function(_0xfc40xf){_0xfc40x15=_0xfc40xf;if(!_0xfc40xf){return _0xfc40xb[_0x1570[20]](404)};return _0xfc40xf[_0x1570[40]]()})[_0x1570[15]](function(){if(_0xfc40x15[_0x1570[30]]){var _0xfc40x11=path[_0x1570[31]](config[_0x1570[26]],_0x1570[27],_0x1570[28],_0x1570[29],_0xfc40x15[_0x1570[30]]);fs[_0x1570[48]](_0xfc40x11,fs[_0x1570[41]]|fs[_0x1570[42]],function(_0xfc40xd){if(_0xfc40xd){console[_0x1570[44]](_0x1570[43])}else {fs[_0x1570[47]](_0xfc40x11,function(_0xfc40xd){if(_0xfc40xd){console[_0x1570[44]](_0x1570[45],_0xfc40xd)}else {console[_0x1570[25]](_0x1570[46])}})}})};return _0xfc40xb[_0x1570[20]](204)})[_0x1570[12]](function(_0xfc40xd){console[_0x1570[25]](_0xfc40xd);return handleError(_0xfc40xb,_0xfc40xd)})};exports[_0x1570[49]]=function(_0xfc40xa,_0xfc40xb){ExtractedReport[_0x1570[39]]({where:{id:_0xfc40xa[_0x1570[16]][_0x1570[21]]}})[_0x1570[15]](function(_0xfc40x16){_0xfc40x16[_0x1570[50]](function(_0xfc40xf){_0xfc40xf[_0x1570[40]]()[_0x1570[15]](function(){if(_0xfc40xf[_0x1570[30]]){var _0xfc40x11=path[_0x1570[31]](config[_0x1570[26]],_0x1570[27],_0x1570[28],_0x1570[29],_0xfc40xf[_0x1570[30]]);fs[_0x1570[48]](_0xfc40x11,fs[_0x1570[41]]|fs[_0x1570[42]],function(_0xfc40xd){if(_0xfc40xd){console[_0x1570[44]](_0x1570[43])}else {fs[_0x1570[47]](_0xfc40x11,function(_0xfc40xd){if(_0xfc40xd){console[_0x1570[44]](_0x1570[45],_0xfc40xd)}else {console[_0x1570[25]](_0x1570[46])}})}})}})[_0x1570[12]](function(_0xfc40xd){console[_0x1570[25]](_0xfc40xd)})});return _0xfc40xb[_0x1570[20]](204)})[_0x1570[12]](function(_0xfc40xd){return handleError(_0xfc40xb,_0xfc40xd)})};function handleError(_0xfc40xb,_0xfc40xd){return _0xfc40xb[_0x1570[14]](500)[_0x1570[13]](_0xfc40xd)}