Built motion from commit ec3ecc5.|1.0.2
[motion.git] / server / api / custom_report / custom_report.controller.js
index 7ee7aa0..d1cdc47 100644 (file)
@@ -1 +1 @@
-var _0xe6af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x6D\x65\x6E\x74","\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","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x4D\x4D\x2D\x44\x44\x2D\x59\x59\x59\x59\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x61\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x6E\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x70\x75\x73\x68","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x5F","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xe6af[0];var _=require(_0xe6af[1]);var util=require(_0xe6af[2]);var sequelize=require(_0xe6af[4])[_0xe6af[3]];var CustomReport=require(_0xe6af[4])[_0xe6af[5]];var ReportField=require(_0xe6af[4])[_0xe6af[6]];var Metric=require(_0xe6af[4])[_0xe6af[7]];var ExtractedReport=require(_0xe6af[4])[_0xe6af[8]];var extractUtils=require(_0xe6af[9]);var reportBuildUtils=require(_0xe6af[10]);var Util=require(_0xe6af[11]);var sr=require(_0xe6af[12]);var moment=require(_0xe6af[13]);exports[_0xe6af[14]]=function(_0x180bxd,_0x180bxe,_0x180bxf){return CustomReport[_0xe6af[23]](Util[_0xe6af[22]](_[_0xe6af[21]](_0x180bxd[_0xe6af[19]],_0x180bxd[_0xe6af[20]])))[_0xe6af[18]](function(_0x180bx11){_0x180bxe[_0xe6af[17]](200)[_0xe6af[16]](_0x180bx11)})[_0xe6af[15]](function(_0x180bx10){return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[24]]=function(_0x180bxd,_0x180bxe){var _0x180bx12,_0x180bx13;return CustomReport[_0xe6af[57]](_0xe6af[56])[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){console[_0xe6af[25]](_0xe6af[42]);if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};if(_0x180bxd[_0xe6af[19]][_0xe6af[44]]&&_0x180bxd[_0xe6af[19]][_0xe6af[44]]===_0xe6af[45]){_0x180bxd[_0xe6af[19]][_0xe6af[46]]=moment()[_0xe6af[33]](_0xe6af[47]);_0x180bxd[_0xe6af[19]][_0xe6af[48]]=moment()[_0xe6af[33]](_0xe6af[47]);_0x180bx1a[_0xe6af[50]][_0xe6af[49]]=_0x180bx1a[_0xe6af[50]][_0xe6af[49]][_0xe6af[53]](_0xe6af[51],_0xe6af[52])};delete _0x180bxd[_0xe6af[19]][_0xe6af[44]];_0x180bx13=_0x180bx1a[_0xe6af[50]];return _0x180bx13[_0xe6af[49]]})[_0xe6af[18]](reportBuildUtils[_0xe6af[41]](_0x180bxd[_0xe6af[40]]))[_0xe6af[18]](function(_0x180bx19){return [_0x180bx19,_0x180bx13]})[_0xe6af[39]](reportBuildUtils[_0xe6af[38]](_0x180bxd[_0xe6af[19]]))[_0xe6af[18]](function(_0x180bx18){return _0x180bx18?sequelize[_0xe6af[19]](_0x180bx18,{type:sequelize[_0xe6af[37]][_0xe6af[36]]}):[]})[_0xe6af[18]](function(_0x180bx14){_0x180bx12=_0x180bx14[_0xe6af[26]];if(_0x180bxd[_0xe6af[19]][_0xe6af[27]]){_0x180bx14=_(_0x180bx14)[_0xe6af[31]](_0x180bxd[_0xe6af[19]][_0xe6af[30]]||0)[_0xe6af[29]](_0x180bxd[_0xe6af[19]][_0xe6af[27]])[_0xe6af[28]]()};_[_0xe6af[35]](_0x180bx14,function(_0x180bx15){_[_0xe6af[34]](_0x180bx15,function(_0x180bx16,_0x180bx17){if(_0x180bx16 instanceof Date){_0x180bx15[_0x180bx17]=moment(_0x180bx16)[_0xe6af[33]](_0xe6af[32]).toString()}})});_0x180bxe[_0xe6af[17]](200)[_0xe6af[16]]({rows:_0x180bx14,count:_0x180bx12})})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[58]]=function(_0x180bxd,_0x180bxe){docExtract(_0x180bxd,_0x180bxe,_0xe6af[59])};exports[_0xe6af[60]]=function(_0x180bxd,_0x180bxe){docExtract(_0x180bxd,_0x180bxe,_0xe6af[61])};function docExtract(_0x180bxd,_0x180bxe,_0x180bx1c){CustomReport[_0xe6af[57]](_0xe6af[56])[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};if(_0x180bxd[_0xe6af[19]][_0xe6af[44]]&&_0x180bxd[_0xe6af[19]][_0xe6af[44]]===_0xe6af[45]){_0x180bxd[_0xe6af[19]][_0xe6af[46]]=moment()[_0xe6af[33]](_0xe6af[47]);_0x180bxd[_0xe6af[19]][_0xe6af[48]]=moment()[_0xe6af[33]](_0xe6af[47]);_0x180bx1a[_0xe6af[50]][_0xe6af[49]]=_0x180bx1a[_0xe6af[50]][_0xe6af[49]][_0xe6af[53]](_0xe6af[51],_0xe6af[52])};delete _0x180bxd[_0xe6af[19]][_0xe6af[44]];return [_0x180bx1a,ExtractedReport[_0xe6af[64]]({name:_0x180bx1a[_0xe6af[63]],startDate:_0x180bxd[_0xe6af[19]][_0xe6af[46]]||null,endDate:_0x180bxd[_0xe6af[19]][_0xe6af[48]]||null,output:_0x180bx1c,UserId:_0x180bxd[_0xe6af[40]][_0xe6af[54]]})]})[_0xe6af[39]](function(_0x180bx1a,_0x180bx1d){extractUtils[_0xe6af[62]+_0x180bx1c](_0x180bx1a,_0x180bxd[_0xe6af[19]],_0x180bx1d[_0xe6af[54]],_0x180bxd[_0xe6af[40]])})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)});return _0x180bxe[_0xe6af[43]](200)}exports[_0xe6af[65]]=function(_0x180bxd,_0x180bxe){return CustomReport[_0xe6af[57]](_0xe6af[56])[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};return _0x180bxe[_0xe6af[16]](_0x180bx1a)})[_0xe6af[15]](function(_0x180bx10){return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[66]]=function(_0x180bxd,_0x180bxe){return CustomReport[_0xe6af[57]]({method:[_0xe6af[70],{CustomReportId:_0x180bxd[_0xe6af[20]][_0xe6af[54]]}]})[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]],{attributes:[_0xe6af[67],_0xe6af[68],_0xe6af[63],_0xe6af[69],_0xe6af[49]]})[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};return _0x180bxe[_0xe6af[16]](_0x180bx1a)})[_0xe6af[15]](function(_0x180bx10){return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[71]]=function(_0x180bxd,_0x180bxe){var _0x180bx1e;return sequelize[_0xe6af[76]](function(_0x180bx1f){return CustomReport[_0xe6af[57]](_0xe6af[56])[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};var _0x180bx20=_0x180bx1a[_0xe6af[50]];delete _0x180bx20[_0xe6af[54]];delete _0x180bx20[_0xe6af[72]];delete _0x180bx20[_0xe6af[73]];_0x180bx20[_0xe6af[69]]=_0x180bxd[_0xe6af[74]][_0xe6af[69]];_0x180bx1e=_[_0xe6af[75]](_0x180bx20.Fields,_0xe6af[50]);return CustomReport[_0xe6af[64]](_0x180bx20,{transaction:_0x180bx1f})})[_0xe6af[18]](function(_0x180bx1a){return [_0x180bx1a,_0x180bx1e]})[_0xe6af[39]](createFields(_0x180bx1f))})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[43]](201)})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[64]]=function(_0x180bxd,_0x180bxe){var _0x180bx13;return sequelize[_0xe6af[76]](function(_0x180bx1f){return CustomReport[_0xe6af[64]](_0x180bxd[_0xe6af[74]],{transaction:_0x180bx1f})[_0xe6af[18]](function(_0x180bx1a){_0x180bx13=_0x180bx1a;return [_0x180bx13,_0x180bxd[_0xe6af[74]][_0xe6af[77]]]})[_0xe6af[39]](createFields(_0x180bx1f))})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[17]](201)[_0xe6af[16]](_0x180bx13)})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[78]]=function(_0x180bxd,_0x180bxe){var _0x180bx13;return sequelize[_0xe6af[76]](function(_0x180bx1f){return CustomReport[_0xe6af[64]](_0x180bxd[_0xe6af[74]],{transaction:_0x180bx1f})[_0xe6af[18]](function(_0x180bx1a){_0x180bx13=_0x180bx1a;return [_0x180bx13,_0x180bxd[_0xe6af[74]][_0xe6af[77]]]})[_0xe6af[39]](createImportFields(_0x180bx1f))})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[17]](201)[_0xe6af[16]](_0x180bx13)})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[79]]=function(_0x180bxd,_0x180bxe,_0x180bxf){if(_0x180bxd[_0xe6af[74]][_0xe6af[54]]){delete _0x180bxd[_0xe6af[74]][_0xe6af[54]]};var _0x180bx13;return sequelize[_0xe6af[76]](function(_0x180bx1f){return CustomReport[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};var _0x180bx21=_[_0xe6af[21]](_0x180bx1a,_0x180bxd[_0xe6af[74]]);return _0x180bx1a[_0xe6af[81]]({transaction:_0x180bx1f})})[_0xe6af[18]](function(_0x180bx1a){_0x180bx13=_0x180bx1a;if(_0x180bxd[_0xe6af[74]][_0xe6af[77]]){return ReportField[_0xe6af[80]]({where:{CustomReportId:_0x180bxd[_0xe6af[20]][_0xe6af[54]]},transaction:_0x180bx1f})}})[_0xe6af[18]](function(){return [_0x180bx13,_0x180bxd[_0xe6af[74]][_0xe6af[77]]]})[_0xe6af[39]](createFields(_0x180bx1f))})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[43]](200)})[_0xe6af[15]](function(_0x180bx10){console[_0xe6af[25]](_0x180bx10);return handleError(_0x180bxe,_0x180bx10)})};function createFields(_0x180bx1f){return function(_0x180bx1a,_0x180bx23){if(_0x180bx23&&Array[_0xe6af[82]](_0x180bx23)&&_0x180bx23[_0xe6af[26]]){var _0x180bx24=getTable(_0x180bx1a[_0xe6af[49]]);if(_0x180bx24){var _0x180bx25;return _0x180bx24[_0xe6af[97]]()[_0xe6af[18]](function(_0x180bx2a){_0x180bx25=_[_0xe6af[95]](_0x180bx2a);return Metric[_0xe6af[96]]()})[_0xe6af[18]](function(_0x180bx26){var _0x180bx27=[];_0x180bx26=_[_0xe6af[75]](_0x180bx26,_0xe6af[50]);_0x180bx23[_0xe6af[35]](function(_0x180bx28){_0x180bx28[_0xe6af[84]]=_0x180bx1a[_0xe6af[54]];if(_0x180bx28[_0xe6af[85]]){var _0x180bx29=_[_0xe6af[86]](_0x180bx26,{id:_0x180bx28[_0xe6af[85]]});if(_0x180bx29){_0x180bx28[_0xe6af[87]]=_0x180bx29[_0xe6af[88]];_0x180bx27[_0xe6af[89]](ReportField[_0xe6af[64]](_0x180bx28,{transaction:_0x180bx1f}))}else {throw  new sequelize.Error(_0xe6af[90]+_0x180bx28[_0xe6af[85]]+_0xe6af[91])}}else {if(_[_0xe6af[92]](_0x180bx25,_0x180bx28[_0xe6af[87]])){_0x180bx27[_0xe6af[89]](ReportField[_0xe6af[64]](_0x180bx28,{transaction:_0x180bx1f}))}else {throw  new sequelize.Error(_0xe6af[93]+_0x180bx28[_0xe6af[87]]+_0xe6af[94])}}});return _0x180bx27})[_0xe6af[83]]()}else {throw  new sequelize.Error(_0xe6af[98])}}}}function createImportFields(_0x180bx1f){return function(_0x180bx1a,_0x180bx23){if(_0x180bx23&&Array[_0xe6af[82]](_0x180bx23)&&_0x180bx23[_0xe6af[26]]){var _0x180bx24=getTable(_0x180bx1a[_0xe6af[49]]);if(_0x180bx24){var _0x180bx25;return _0x180bx24[_0xe6af[97]]()[_0xe6af[18]](function(_0x180bx2a){_0x180bx25=_[_0xe6af[95]](_0x180bx2a);return Metric[_0xe6af[96]]()})[_0xe6af[18]](function(_0x180bx26){var _0x180bx27=[];var _0x180bx2c=_[_0xe6af[99]](_0x180bx23,_0xe6af[85]);_[_0xe6af[34]](_0x180bx2c,function(_0x180bx2d,_0x180bx17){if(_0x180bx17!==_0xe6af[100]&&_0x180bx17!==_0xe6af[101]){_0x180bx2d[0][_0xe6af[7]][_0xe6af[102]][_0xe6af[35]](function(_0x180bx28){_0x180bx28[_0xe6af[84]]=_0x180bx1a[_0xe6af[54]]});_0x180bx2d[0][_0xe6af[7]][_0xe6af[63]]+=_0xe6af[103]+sr({length:5});console[_0xe6af[25]](_0xe6af[88],_0x180bx2d[0].Metric);_0x180bx27[_0xe6af[89]](Metric[_0xe6af[64]](_0x180bx2d[0].Metric,{include:[{model:ReportField,as:_0xe6af[102]}],transaction:_0x180bx1f}))}else {_0x180bx2d[_0xe6af[35]](function(_0x180bx28){if(_[_0xe6af[92]](_0x180bx25,_0x180bx28[_0xe6af[87]])){_0x180bx28[_0xe6af[84]]=_0x180bx1a[_0xe6af[54]];_0x180bx27[_0xe6af[89]](ReportField[_0xe6af[64]](_0x180bx28,{transaction:_0x180bx1f}))}else {throw  new sequelize.Error(_0xe6af[93]+_0x180bx28[_0xe6af[87]]+_0xe6af[94])}})}});return _0x180bx27})[_0xe6af[83]]()}else {throw  new sequelize.Error(_0xe6af[98])}}}}function getTable(_0x180bx2f){var _0x180bx24;switch(_0x180bx2f){case _0xe6af[106]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[104]];break;case _0xe6af[108]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[107]];break;case _0xe6af[110]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[109]];break;case _0xe6af[112]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[111]];break;case _0xe6af[114]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[113]];break;case _0xe6af[116]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[115]];break;case _0xe6af[118]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[117]];break;case _0xe6af[120]:_0x180bx24=require(_0xe6af[4])[_0xe6af[105]][_0xe6af[119]];break;case _0xe6af[122]:_0x180bx24=require(_0xe6af[4])[_0xe6af[121]];break;case _0xe6af[124]:_0x180bx24=require(_0xe6af[4])[_0xe6af[123]];break;default:};return _0x180bx24}exports[_0xe6af[80]]=function(_0x180bxd,_0x180bxe){return CustomReport[_0xe6af[55]](_0x180bxd[_0xe6af[20]][_0xe6af[54]])[_0xe6af[18]](function(_0x180bx1a){if(!_0x180bx1a){return _0x180bxe[_0xe6af[43]](404)};return _0x180bx1a[_0xe6af[80]]()})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[43]](204)})[_0xe6af[15]](function(_0x180bx10){return handleError(_0x180bxe,_0x180bx10)})};exports[_0xe6af[125]]=function(_0x180bxd,_0x180bxe){return CustomReport[_0xe6af[80]]({where:{id:_0x180bxd[_0xe6af[19]][_0xe6af[126]]},individualHooks:true})[_0xe6af[18]](function(){return _0x180bxe[_0xe6af[43]](204)})[_0xe6af[15]](function(_0x180bx10){return handleError(_0x180bxe,_0x180bx10)})};function handleError(_0x180bxe,_0x180bx10){return _0x180bxe[_0xe6af[17]](500)[_0xe6af[16]](_0x180bx10)}
\ No newline at end of file
+var _0x3d11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\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","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x70\x72\x65\x76\x69\x65\x77","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x64\x65\x73\x74\x72\x6F\x79\x4E\x6F\x64\x65\x52\x65\x70\x6F\x72\x74\x73","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x4E\x6F\x64\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x70\x75\x73\x68","\x66\x69\x6C\x74\x65\x72","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x70\x61\x72\x65\x6E\x74","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x67\x65\x74\x54\x61\x62\x6C\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x68\x61\x73","\x65\x76\x65\x72\x79","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x55\x6E\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x49\x6D\x70\x6F\x72\x74\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x4D\x65\x74\x72\x69\x63\x20\x74\x79\x70\x65\x20\x69\x6E\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x69\x65\x6C\x64\x73\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67\x29","\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x5F","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x3d11[0];var _=require(_0x3d11[1]);var util=require(_0x3d11[2]);var sequelize=require(_0x3d11[4])[_0x3d11[3]];var CustomReport=require(_0x3d11[4])[_0x3d11[5]];var ReportField=require(_0x3d11[4])[_0x3d11[6]];var Metric=require(_0x3d11[4])[_0x3d11[7]];var ExtractedReport=require(_0x3d11[4])[_0x3d11[8]];var extractUtils=require(_0x3d11[9]);var reportBuildUtils=require(_0x3d11[10]);var Util=require(_0x3d11[11]);var sr=require(_0x3d11[12]);var moment=require(_0x3d11[13]);var cp=require(_0x3d11[14]);var ReportTree=require(_0x3d11[4])[_0x3d11[15]];exports[_0x3d11[16]]= function(_0x8aa2xf,_0x8aa2x10,_0x8aa2x11){return CustomReport[_0x3d11[23]](Util[_0x3d11[22]](_0x8aa2xf[_0x3d11[21]],{deletedAt:null}))[_0x3d11[20]](function(_0x8aa2x13){_0x8aa2x10[_0x3d11[19]](200)[_0x3d11[18]](_0x8aa2x13)})[_0x3d11[17]](function(_0x8aa2x12){return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[24]]= function(_0x8aa2xf,_0x8aa2x10){return Promise[_0x3d11[29]]([])[_0x3d11[20]](getQuery(_0x8aa2xf,_0x8aa2x10))[_0x3d11[20]](function(_0x8aa2x14){if(_0x8aa2x14){switch(_0x8aa2x14){case _0x3d11[28]:_0x8aa2x14= _0x3d11[27];break;default:}};_0x8aa2x10[_0x3d11[19]](200)[_0x3d11[18]]({query:_0x8aa2x14})})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x3d11[25],_0x8aa2x12)})};function getQuery(_0x8aa2xf,_0x8aa2x10){var _0x8aa2x16;return function(){return CustomReport[_0x3d11[51]](_0x3d11[50])[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x18){console[_0x3d11[26]](_0x3d11[34]);if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};if(_0x8aa2xf[_0x3d11[21]][_0x3d11[36]]&& _0x8aa2xf[_0x3d11[21]][_0x3d11[36]]=== _0x3d11[37]){_0x8aa2xf[_0x3d11[21]][_0x3d11[38]]= moment()[_0x3d11[40]](_0x3d11[39]);_0x8aa2xf[_0x3d11[21]][_0x3d11[41]]= moment()[_0x3d11[40]](_0x3d11[39]);_0x8aa2x18[_0x3d11[43]][_0x3d11[42]]= _0x8aa2x18[_0x3d11[43]][_0x3d11[42]][_0x3d11[46]](_0x3d11[44],_0x3d11[45])};delete _0x8aa2xf[_0x3d11[21]][_0x3d11[36]];_0x8aa2x16= _0x8aa2x18[_0x3d11[43]];return _0x8aa2x16[_0x3d11[42]]})[_0x3d11[20]](reportBuildUtils[_0x3d11[33]](_0x8aa2xf[_0x3d11[32]]))[_0x3d11[20]](function(_0x8aa2x17){return [_0x8aa2x17,_0x8aa2x16]})[_0x3d11[31]](reportBuildUtils[_0x3d11[30]](_0x8aa2xf[_0x3d11[21]]))}}exports[_0x3d11[52]]= function(_0x8aa2xf,_0x8aa2x10){var _0x8aa2x19;return Promise[_0x3d11[29]]([])[_0x3d11[20]](getQuery(_0x8aa2xf,_0x8aa2x10))[_0x3d11[20]](reportBuildUtils[_0x3d11[64]]())[_0x3d11[20]](function(_0x8aa2x1a){if(_0x8aa2x1a&& _[_0x3d11[53]](_0x8aa2x1a)){_0x8aa2x19= _0x8aa2x1a[_0x3d11[54]];if(_0x8aa2xf[_0x3d11[21]][_0x3d11[55]]){_0x8aa2x1a= _(_0x8aa2x1a)[_0x3d11[59]](_0x8aa2xf[_0x3d11[21]][_0x3d11[58]]|| 0)[_0x3d11[57]](_0x8aa2xf[_0x3d11[21]][_0x3d11[55]])[_0x3d11[56]]()};_[_0x3d11[62]](_0x8aa2x1a,function(_0x8aa2x1b){_[_0x3d11[61]](_0x8aa2x1b,function(_0x8aa2x1c,_0x8aa2x1d){if(_0x8aa2x1c instanceof  Date){_0x8aa2x1b[_0x8aa2x1d]= moment(_0x8aa2x1c)[_0x3d11[40]](_0x3d11[60]).toString()}})});_0x8aa2x10[_0x3d11[19]](200)[_0x3d11[18]]({rows:_0x8aa2x1a,count:_0x8aa2x19})}else {return handleError(_0x8aa2x10,{message:_0x8aa2x1a|| _0x3d11[63]})}})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[65]]= function(_0x8aa2xf,_0x8aa2x10){docExtract(_0x8aa2xf,_0x8aa2x10,_0x3d11[66])};exports[_0x3d11[67]]= function(_0x8aa2xf,_0x8aa2x10){docExtract(_0x8aa2xf,_0x8aa2x10,_0x3d11[68])};exports[_0x3d11[69]]= function(_0x8aa2xf,_0x8aa2x10){return ReportTree[_0x3d11[49]](2)[_0x3d11[20]](function(_0x8aa2x1e){_0x8aa2x1e= JSON[_0x3d11[71]](_0x8aa2x1e[_0x3d11[70]]);var _0x8aa2x1f=_[_0x3d11[72]](_0x8aa2x1e,{id:_0x8aa2xf[_0x3d11[48]][_0x3d11[47]]});if(!_0x8aa2x1f){throw  new Error(_0x3d11[73])};var _0x8aa2x20=[];findSubNodes(_0x8aa2x1f,_0x8aa2x1e,_0x8aa2x20);return CustomReport[_0x3d11[74]]({where:{parent:_0x8aa2x20},individualHooks:true})})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[35]](200)})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};function findSubNodes(_0x8aa2x1f,_0x8aa2x1e,_0x8aa2x22){_0x8aa2x22[_0x3d11[75]](_0x8aa2x1f[_0x3d11[47]]);var _0x8aa2x23=_[_0x3d11[76]](_0x8aa2x1e,{parent:_0x8aa2x1f[_0x3d11[47]]});if(!_0x8aa2x23|| !_0x8aa2x23[_0x3d11[54]]){return};_[_0x3d11[62]](_0x8aa2x23,function(_0x8aa2x24){findSubNodes(_0x8aa2x24,_0x8aa2x1e,_0x8aa2x22)})}function docExtract(_0x8aa2xf,_0x8aa2x10,_0x8aa2x26){var _0x8aa2x18;CustomReport[_0x3d11[51]](_0x3d11[50])[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x16){if(!_0x8aa2x16){return _0x8aa2x10[_0x3d11[35]](404)};_0x8aa2x18= _0x8aa2x16;return ReportTree[_0x3d11[49]](2)})[_0x3d11[20]](function(_0x8aa2x1e){_0x8aa2x1e= JSON[_0x3d11[71]](_0x8aa2x1e[_0x3d11[70]]);var _0x8aa2x2a=_[_0x3d11[72]](_0x8aa2x1e,{id:_0x8aa2x18[_0x3d11[87]]});var _0x8aa2x2b=getReportPath(_0x8aa2x2a,_0x8aa2x1e,_0x8aa2x18[_0x3d11[88]]);if(_0x8aa2xf[_0x3d11[21]][_0x3d11[36]]&& _0x8aa2xf[_0x3d11[21]][_0x3d11[36]]=== _0x3d11[37]){_0x8aa2xf[_0x3d11[21]][_0x3d11[38]]= moment()[_0x3d11[40]](_0x3d11[39]);_0x8aa2xf[_0x3d11[21]][_0x3d11[41]]= moment()[_0x3d11[40]](_0x3d11[39]);_0x8aa2x18[_0x3d11[43]][_0x3d11[42]]= _0x8aa2x18[_0x3d11[43]][_0x3d11[42]][_0x3d11[46]](_0x3d11[44],_0x3d11[45])};delete _0x8aa2xf[_0x3d11[21]][_0x3d11[36]];return [_0x8aa2x18,ExtractedReport[_0x3d11[94]]({name:_0x8aa2x2b,startDate:_0x8aa2xf[_0x3d11[21]][_0x3d11[38]]?_0x8aa2xf[_0x3d11[21]][_0x3d11[38]]+ (_0x8aa2xf[_0x3d11[21]][_0x3d11[89]]?_0x3d11[90]+ _0x8aa2xf[_0x3d11[21]][_0x3d11[89]]:_0x3d11[91]):null,endDate:_0x8aa2xf[_0x3d11[21]][_0x3d11[41]]?_0x8aa2xf[_0x3d11[21]][_0x3d11[41]]+ (_0x8aa2xf[_0x3d11[21]][_0x3d11[92]]?_0x3d11[90]+ _0x8aa2xf[_0x3d11[21]][_0x3d11[92]]:_0x3d11[93]):null,output:_0x8aa2x26,UserId:_0x8aa2xf[_0x3d11[32]][_0x3d11[47]]})]})[_0x3d11[31]](function(_0x8aa2x18,_0x8aa2x27){var _0x8aa2x28=cp[_0x3d11[78]](__dirname+ _0x3d11[77]);_0x8aa2x28[_0x3d11[81]](_0x3d11[84],function(_0x8aa2x29){console[_0x3d11[26]](_0x3d11[85],_0x8aa2x29);_0x8aa2x28[_0x3d11[86]]()})[_0x3d11[81]](_0x3d11[82],function(){console[_0x3d11[26]](_0x3d11[83])})[_0x3d11[81]](_0x3d11[79],function(_0x8aa2x12){console[_0x3d11[26]](_0x3d11[80],_0x8aa2x12)});_0x8aa2x28[_0x3d11[18]]({report:_0x8aa2x18,query:_0x8aa2xf[_0x3d11[21]],extractedId:_0x8aa2x27[_0x3d11[47]],user:_0x8aa2xf[_0x3d11[32]],type:_0x8aa2x26})})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)});return _0x8aa2x10[_0x3d11[35]](200)}function getReportPath(_0x8aa2x2a,_0x8aa2x1e,_0x8aa2x2b){_0x8aa2x2b= _0x8aa2x2a[_0x3d11[95]]+ _0x3d11[96]+ _0x8aa2x2b;if(_0x8aa2x2a[_0x3d11[87]]=== _0x3d11[97]){return _0x8aa2x2b}else {return getReportPath(_[_0x3d11[72]](_0x8aa2x1e,{id:_0x8aa2x2a[_0x3d11[87]]}),_0x8aa2x1e,_0x8aa2x2b)}}exports[_0x3d11[98]]= function(_0x8aa2xf,_0x8aa2x10){return CustomReport[_0x3d11[51]](_0x3d11[50])[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x18){if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};return _0x8aa2x10[_0x3d11[18]](_0x8aa2x18)})[_0x3d11[17]](function(_0x8aa2x12){return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[99]]= function(_0x8aa2xf,_0x8aa2x10){return CustomReport[_0x3d11[51]]({method:[_0x3d11[102],{CustomReportId:_0x8aa2xf[_0x3d11[48]][_0x3d11[47]]}]})[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]],{attributes:[_0x3d11[100],_0x3d11[101],_0x3d11[88],_0x3d11[87],_0x3d11[42]]})[_0x3d11[20]](function(_0x8aa2x18){if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};return _0x8aa2x10[_0x3d11[18]](_0x8aa2x18)})[_0x3d11[17]](function(_0x8aa2x12){return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[103]]= function(_0x8aa2xf,_0x8aa2x10){var _0x8aa2x2d;return sequelize[_0x3d11[108]](function(_0x8aa2x2e){return CustomReport[_0x3d11[51]](_0x3d11[50])[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x18){if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};var _0x8aa2x2f=_0x8aa2x18[_0x3d11[43]];delete _0x8aa2x2f[_0x3d11[47]];delete _0x8aa2x2f[_0x3d11[104]];delete _0x8aa2x2f[_0x3d11[105]];_0x8aa2x2f[_0x3d11[87]]= _0x8aa2xf[_0x3d11[106]][_0x3d11[87]];_0x8aa2x2d= _[_0x3d11[107]](_0x8aa2x2f.Fields,_0x3d11[43]);return CustomReport[_0x3d11[94]](_0x8aa2x2f,{transaction:_0x8aa2x2e})})[_0x3d11[20]](function(_0x8aa2x18){return [_0x8aa2x18,_0x8aa2x2d]})[_0x3d11[31]](createFields(_0x8aa2x2e))})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[35]](201)})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[94]]= function(_0x8aa2xf,_0x8aa2x10){var _0x8aa2x16;return sequelize[_0x3d11[108]](function(_0x8aa2x2e){return CustomReport[_0x3d11[94]](_0x8aa2xf[_0x3d11[106]],{transaction:_0x8aa2x2e})[_0x3d11[20]](function(_0x8aa2x18){_0x8aa2x16= _0x8aa2x18;return [_0x8aa2x16,_0x8aa2xf[_0x3d11[106]][_0x3d11[109]]]})[_0x3d11[31]](createFields(_0x8aa2x2e))})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[19]](201)[_0x3d11[18]](_0x8aa2x16)})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[110]]= function(_0x8aa2xf,_0x8aa2x10){var _0x8aa2x16;return sequelize[_0x3d11[108]](function(_0x8aa2x2e){return CustomReport[_0x3d11[94]](_0x8aa2xf[_0x3d11[106]],{transaction:_0x8aa2x2e})[_0x3d11[20]](function(_0x8aa2x18){_0x8aa2x16= _0x8aa2x18;return [_0x8aa2x16,_0x8aa2xf[_0x3d11[106]][_0x3d11[109]]]})[_0x3d11[31]](createImportFields(_0x8aa2x2e))})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[19]](201)[_0x3d11[18]](_0x8aa2x16)})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[111]]= function(_0x8aa2xf,_0x8aa2x10,_0x8aa2x11){if(_0x8aa2xf[_0x3d11[106]][_0x3d11[47]]){delete _0x8aa2xf[_0x3d11[106]][_0x3d11[47]]};var _0x8aa2x16;return sequelize[_0x3d11[108]](function(_0x8aa2x2e){return CustomReport[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x18){if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};var _0x8aa2x30=_[_0x3d11[112]](_0x8aa2x18,_0x8aa2xf[_0x3d11[106]]);return _0x8aa2x18[_0x3d11[113]]({transaction:_0x8aa2x2e})})[_0x3d11[20]](function(_0x8aa2x18){_0x8aa2x16= _0x8aa2x18;if(_0x8aa2xf[_0x3d11[106]][_0x3d11[109]]){return ReportField[_0x3d11[74]]({where:{CustomReportId:_0x8aa2xf[_0x3d11[48]][_0x3d11[47]]},transaction:_0x8aa2x2e})}})[_0x3d11[20]](function(){return [_0x8aa2x16,_0x8aa2xf[_0x3d11[106]][_0x3d11[109]]]})[_0x3d11[31]](createFields(_0x8aa2x2e))})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[35]](200)})[_0x3d11[17]](function(_0x8aa2x12){console[_0x3d11[26]](_0x8aa2x12);return handleError(_0x8aa2x10,_0x8aa2x12)})};function createFields(_0x8aa2x2e){return function(_0x8aa2x18,_0x8aa2x32){if(_0x8aa2x32&& Array[_0x3d11[53]](_0x8aa2x32)&& _0x8aa2x32[_0x3d11[54]]){var _0x8aa2x33=reportBuildUtils[_0x3d11[114]](_0x8aa2x18[_0x3d11[42]]);if(_0x8aa2x33){var _0x8aa2x34;return _0x8aa2x33[_0x3d11[127]]()[_0x3d11[20]](function(_0x8aa2x39){_0x8aa2x34= _[_0x3d11[125]](_0x8aa2x39);return Metric[_0x3d11[126]]()})[_0x3d11[20]](function(_0x8aa2x35){var _0x8aa2x36=[];_0x8aa2x35= _[_0x3d11[107]](_0x8aa2x35,_0x3d11[43]);_0x8aa2x32[_0x3d11[62]](function(_0x8aa2x37){_0x8aa2x37[_0x3d11[115]]= _0x8aa2x18[_0x3d11[47]];if(_0x8aa2x37[_0x3d11[116]]){var _0x8aa2x38=_[_0x3d11[72]](_0x8aa2x35,{id:_0x8aa2x37[_0x3d11[116]]});if(_0x8aa2x38){_0x8aa2x37[_0x3d11[117]]= _0x8aa2x38[_0x3d11[118]];_0x8aa2x36[_0x3d11[75]](ReportField[_0x3d11[94]](_0x8aa2x37,{transaction:_0x8aa2x2e}))}else {throw  new sequelize.Error(_0x3d11[119]+ _0x8aa2x37[_0x3d11[116]]+ _0x3d11[120])}}else {if(_[_0x3d11[121]](_0x8aa2x34,_0x8aa2x37[_0x3d11[117]])|| _0x8aa2x37[_0x3d11[122]]){_0x8aa2x36[_0x3d11[75]](ReportField[_0x3d11[94]](_0x8aa2x37,{transaction:_0x8aa2x2e}))}else {throw  new sequelize.Error(_0x3d11[123]+ _0x8aa2x37[_0x3d11[117]]+ _0x3d11[124])}}});return _0x8aa2x36})[_0x3d11[29]]()}else {throw  new sequelize.Error(_0x3d11[128])}}}}function createImportFields(_0x8aa2x2e){return function(_0x8aa2x18,_0x8aa2x32){if(_0x8aa2x32&& Array[_0x3d11[53]](_0x8aa2x32)&& _0x8aa2x32[_0x3d11[54]]){var _0x8aa2x33=reportBuildUtils[_0x3d11[114]](_0x8aa2x18[_0x3d11[42]]);if(_0x8aa2x33){var _0x8aa2x34;return _0x8aa2x33[_0x3d11[127]]()[_0x3d11[20]](function(_0x8aa2x39){_0x8aa2x34= _[_0x3d11[125]](_0x8aa2x39);var _0x8aa2x36=[];var _0x8aa2x3b;if(_[_0x3d11[131]](_0x8aa2x32,function(_0x8aa2x37){return _[_0x3d11[130]](_0x8aa2x37,_0x3d11[129])})){_0x8aa2x3b= _0x3d11[132]}else {if(_[_0x3d11[131]](_0x8aa2x32,function(_0x8aa2x37){return _[_0x3d11[130]](_0x8aa2x37,_0x3d11[116])})){_0x8aa2x3b= _0x3d11[7]}else {throw  new sequelize.Error(_0x3d11[133])}};var _0x8aa2x3c=_[_0x3d11[135]](_0x8aa2x32,_0x8aa2x3b+ _0x3d11[134]);_[_0x3d11[61]](_0x8aa2x3c,function(_0x8aa2x3d,_0x8aa2x1d){if(_0x8aa2x1d!== _0x3d11[136]&& _0x8aa2x1d!== _0x3d11[137]){_0x8aa2x3d[0][_0x8aa2x3b][_0x3d11[138]][_0x3d11[62]](function(_0x8aa2x37){_0x8aa2x37[_0x3d11[115]]= _0x8aa2x18[_0x3d11[47]]});_0x8aa2x3d[0][_0x8aa2x3b][_0x3d11[88]]+= _0x3d11[139]+ sr({length:5});_0x8aa2x36[_0x3d11[75]](Metric[_0x3d11[94]](_0x8aa2x3d[0][_0x8aa2x3b],{include:[{model:ReportField,as:_0x3d11[138]}],transaction:_0x8aa2x2e}))}else {_0x8aa2x3d[_0x3d11[62]](function(_0x8aa2x37){if(_[_0x3d11[121]](_0x8aa2x34,_0x8aa2x37[_0x3d11[117]])|| _0x8aa2x37[_0x3d11[122]]){_0x8aa2x37[_0x3d11[115]]= _0x8aa2x18[_0x3d11[47]];_0x8aa2x36[_0x3d11[75]](ReportField[_0x3d11[94]](_0x8aa2x37,{transaction:_0x8aa2x2e}))}else {throw  new sequelize.Error(_0x3d11[123]+ _0x8aa2x37[_0x3d11[117]]+ _0x3d11[124])}})}});return _0x8aa2x36})[_0x3d11[29]]()}else {throw  new sequelize.Error(_0x3d11[128])}}}}exports[_0x3d11[74]]= function(_0x8aa2xf,_0x8aa2x10){return CustomReport[_0x3d11[49]](_0x8aa2xf[_0x3d11[48]][_0x3d11[47]])[_0x3d11[20]](function(_0x8aa2x18){if(!_0x8aa2x18){return _0x8aa2x10[_0x3d11[35]](404)};return _0x8aa2x18[_0x3d11[74]]()})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[35]](204)})[_0x3d11[17]](function(_0x8aa2x12){return handleError(_0x8aa2x10,_0x8aa2x12)})};exports[_0x3d11[140]]= function(_0x8aa2xf,_0x8aa2x10){return CustomReport[_0x3d11[74]]({where:{id:_0x8aa2xf[_0x3d11[21]][_0x3d11[141]]},individualHooks:true})[_0x3d11[20]](function(){return _0x8aa2x10[_0x3d11[35]](204)})[_0x3d11[17]](function(_0x8aa2x12){return handleError(_0x8aa2x10,_0x8aa2x12)})};function handleError(_0x8aa2x10,_0x8aa2x12){return _0x8aa2x10[_0x3d11[19]](500)[_0x3d11[18]](_0x8aa2x12)}
\ No newline at end of file