Built motion from commit fd18f58.|0.0.129
[motion.git] / server / api / custom_report / custom_report.controller.js
index 386fc5a..467def6 100644 (file)
@@ -1 +1 @@
-var _0xad3c=["\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","\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","\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","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x70\x61\x72\x65\x6E\x74","\x66\x69\x6E\x64","\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","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\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","\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","\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"];_0xad3c[0];var _=require(_0xad3c[1]);var util=require(_0xad3c[2]);var sequelize=require(_0xad3c[4])[_0xad3c[3]];var CustomReport=require(_0xad3c[4])[_0xad3c[5]];var ReportField=require(_0xad3c[4])[_0xad3c[6]];var Metric=require(_0xad3c[4])[_0xad3c[7]];var ExtractedReport=require(_0xad3c[4])[_0xad3c[8]];var extractUtils=require(_0xad3c[9]);var reportBuildUtils=require(_0xad3c[10]);var Util=require(_0xad3c[11]);var sr=require(_0xad3c[12]);var moment=require(_0xad3c[13]);var cp=require(_0xad3c[14]);var ReportTree=require(_0xad3c[4])[_0xad3c[15]];exports[_0xad3c[16]]= function(_0x4351xf,_0x4351x10,_0x4351x11){return CustomReport[_0xad3c[23]](Util[_0xad3c[22]](_0x4351xf[_0xad3c[21]]))[_0xad3c[20]](function(_0x4351x13){_0x4351x10[_0xad3c[19]](200)[_0xad3c[18]](_0x4351x13)})[_0xad3c[17]](function(_0x4351x12){return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[24]]= function(_0x4351xf,_0x4351x10){return Promise[_0xad3c[27]]([])[_0xad3c[20]](getQuery(_0x4351xf,_0x4351x10))[_0xad3c[20]](function(_0x4351x14){_0x4351x10[_0xad3c[19]](200)[_0xad3c[18]]({query:_0x4351x14})})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0xad3c[25],_0x4351x12)})};function getQuery(_0x4351xf,_0x4351x10){var _0x4351x16;return function(){return CustomReport[_0xad3c[49]](_0xad3c[48])[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x18){console[_0xad3c[26]](_0xad3c[32]);if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};if(_0x4351xf[_0xad3c[21]][_0xad3c[34]]&& _0x4351xf[_0xad3c[21]][_0xad3c[34]]=== _0xad3c[35]){_0x4351xf[_0xad3c[21]][_0xad3c[36]]= moment()[_0xad3c[38]](_0xad3c[37]);_0x4351xf[_0xad3c[21]][_0xad3c[39]]= moment()[_0xad3c[38]](_0xad3c[37]);_0x4351x18[_0xad3c[41]][_0xad3c[40]]= _0x4351x18[_0xad3c[41]][_0xad3c[40]][_0xad3c[44]](_0xad3c[42],_0xad3c[43])};delete _0x4351xf[_0xad3c[21]][_0xad3c[34]];_0x4351x16= _0x4351x18[_0xad3c[41]];return _0x4351x16[_0xad3c[40]]})[_0xad3c[20]](reportBuildUtils[_0xad3c[31]](_0x4351xf[_0xad3c[30]]))[_0xad3c[20]](function(_0x4351x17){return [_0x4351x17,_0x4351x16]})[_0xad3c[29]](reportBuildUtils[_0xad3c[28]](_0x4351xf[_0xad3c[21]]))}}exports[_0xad3c[50]]= function(_0x4351xf,_0x4351x10){var _0x4351x19;return Promise[_0xad3c[27]]([])[_0xad3c[20]](getQuery(_0x4351xf,_0x4351x10))[_0xad3c[20]](function(_0x4351x14){return _0x4351x14?sequelize[_0xad3c[21]](_0x4351x14,{type:sequelize[_0xad3c[61]][_0xad3c[60]]}):[]})[_0xad3c[20]](function(_0x4351x1a){_0x4351x19= _0x4351x1a[_0xad3c[51]];if(_0x4351xf[_0xad3c[21]][_0xad3c[52]]){_0x4351x1a= _(_0x4351x1a)[_0xad3c[56]](_0x4351xf[_0xad3c[21]][_0xad3c[55]]|| 0)[_0xad3c[54]](_0x4351xf[_0xad3c[21]][_0xad3c[52]])[_0xad3c[53]]()};_[_0xad3c[59]](_0x4351x1a,function(_0x4351x1b){_[_0xad3c[58]](_0x4351x1b,function(_0x4351x1c,_0x4351x1d){if(_0x4351x1c instanceof  Date){_0x4351x1b[_0x4351x1d]= moment(_0x4351x1c)[_0xad3c[38]](_0xad3c[57]).toString()}})});_0x4351x10[_0xad3c[19]](200)[_0xad3c[18]]({rows:_0x4351x1a,count:_0x4351x19})})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[62]]= function(_0x4351xf,_0x4351x10){docExtract(_0x4351xf,_0x4351x10,_0xad3c[63])};exports[_0xad3c[64]]= function(_0x4351xf,_0x4351x10){docExtract(_0x4351xf,_0x4351x10,_0xad3c[65])};function docExtract(_0x4351xf,_0x4351x10,_0x4351x1f){var _0x4351x18;CustomReport[_0xad3c[49]](_0xad3c[48])[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x16){if(!_0x4351x16){return _0x4351x10[_0xad3c[33]](404)};_0x4351x18= _0x4351x16;return ReportTree[_0xad3c[47]](2)})[_0xad3c[20]](function(_0x4351x23){_0x4351x23= JSON[_0xad3c[77]](_0x4351x23[_0xad3c[76]]);var _0x4351x24=_[_0xad3c[79]](_0x4351x23,{id:_0x4351x18[_0xad3c[78]]});var _0x4351x25=getReportPath(_0x4351x24,_0x4351x23,_0x4351x18[_0xad3c[80]]);if(_0x4351xf[_0xad3c[21]][_0xad3c[34]]&& _0x4351xf[_0xad3c[21]][_0xad3c[34]]=== _0xad3c[35]){_0x4351xf[_0xad3c[21]][_0xad3c[36]]= moment()[_0xad3c[38]](_0xad3c[37]);_0x4351xf[_0xad3c[21]][_0xad3c[39]]= moment()[_0xad3c[38]](_0xad3c[37]);_0x4351x18[_0xad3c[41]][_0xad3c[40]]= _0x4351x18[_0xad3c[41]][_0xad3c[40]][_0xad3c[44]](_0xad3c[42],_0xad3c[43])};delete _0x4351xf[_0xad3c[21]][_0xad3c[34]];return [_0x4351x18,ExtractedReport[_0xad3c[86]]({name:_0x4351x25,startDate:_0x4351xf[_0xad3c[21]][_0xad3c[36]]?_0x4351xf[_0xad3c[21]][_0xad3c[36]]+ (_0x4351xf[_0xad3c[21]][_0xad3c[81]]?_0xad3c[82]+ _0x4351xf[_0xad3c[21]][_0xad3c[81]]:_0xad3c[83]):null,endDate:_0x4351xf[_0xad3c[21]][_0xad3c[39]]?_0x4351xf[_0xad3c[21]][_0xad3c[39]]+ (_0x4351xf[_0xad3c[21]][_0xad3c[84]]?_0xad3c[82]+ _0x4351xf[_0xad3c[21]][_0xad3c[84]]:_0xad3c[85]):null,output:_0x4351x1f,UserId:_0x4351xf[_0xad3c[30]][_0xad3c[45]]})]})[_0xad3c[29]](function(_0x4351x18,_0x4351x20){var _0x4351x21=cp[_0xad3c[67]](__dirname+ _0xad3c[66]);_0x4351x21[_0xad3c[70]](_0xad3c[73],function(_0x4351x22){console[_0xad3c[26]](_0xad3c[74],_0x4351x22);_0x4351x21[_0xad3c[75]]()})[_0xad3c[70]](_0xad3c[71],function(){console[_0xad3c[26]](_0xad3c[72])})[_0xad3c[70]](_0xad3c[68],function(_0x4351x12){console[_0xad3c[26]](_0xad3c[69],_0x4351x12)});_0x4351x21[_0xad3c[18]]({report:_0x4351x18,query:_0x4351xf[_0xad3c[21]],extractedId:_0x4351x20[_0xad3c[45]],user:_0x4351xf[_0xad3c[30]],type:_0x4351x1f})})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)});return _0x4351x10[_0xad3c[33]](200)}function getReportPath(_0x4351x24,_0x4351x23,_0x4351x25){_0x4351x25= _0x4351x24[_0xad3c[87]]+ _0xad3c[88]+ _0x4351x25;if(_0x4351x24[_0xad3c[78]]=== _0xad3c[89]){return _0x4351x25}else {return getReportPath(_[_0xad3c[79]](_0x4351x23,{id:_0x4351x24[_0xad3c[78]]}),_0x4351x23,_0x4351x25)}}exports[_0xad3c[90]]= function(_0x4351xf,_0x4351x10){return CustomReport[_0xad3c[49]](_0xad3c[48])[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x18){if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};return _0x4351x10[_0xad3c[18]](_0x4351x18)})[_0xad3c[17]](function(_0x4351x12){return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[91]]= function(_0x4351xf,_0x4351x10){return CustomReport[_0xad3c[49]]({method:[_0xad3c[94],{CustomReportId:_0x4351xf[_0xad3c[46]][_0xad3c[45]]}]})[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]],{attributes:[_0xad3c[92],_0xad3c[93],_0xad3c[80],_0xad3c[78],_0xad3c[40]]})[_0xad3c[20]](function(_0x4351x18){if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};return _0x4351x10[_0xad3c[18]](_0x4351x18)})[_0xad3c[17]](function(_0x4351x12){return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[95]]= function(_0x4351xf,_0x4351x10){var _0x4351x27;return sequelize[_0xad3c[100]](function(_0x4351x28){return CustomReport[_0xad3c[49]](_0xad3c[48])[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x18){if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};var _0x4351x29=_0x4351x18[_0xad3c[41]];delete _0x4351x29[_0xad3c[45]];delete _0x4351x29[_0xad3c[96]];delete _0x4351x29[_0xad3c[97]];_0x4351x29[_0xad3c[78]]= _0x4351xf[_0xad3c[98]][_0xad3c[78]];_0x4351x27= _[_0xad3c[99]](_0x4351x29.Fields,_0xad3c[41]);return CustomReport[_0xad3c[86]](_0x4351x29,{transaction:_0x4351x28})})[_0xad3c[20]](function(_0x4351x18){return [_0x4351x18,_0x4351x27]})[_0xad3c[29]](createFields(_0x4351x28))})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[33]](201)})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[86]]= function(_0x4351xf,_0x4351x10){var _0x4351x16;return sequelize[_0xad3c[100]](function(_0x4351x28){return CustomReport[_0xad3c[86]](_0x4351xf[_0xad3c[98]],{transaction:_0x4351x28})[_0xad3c[20]](function(_0x4351x18){_0x4351x16= _0x4351x18;return [_0x4351x16,_0x4351xf[_0xad3c[98]][_0xad3c[101]]]})[_0xad3c[29]](createFields(_0x4351x28))})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[19]](201)[_0xad3c[18]](_0x4351x16)})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[102]]= function(_0x4351xf,_0x4351x10){var _0x4351x16;return sequelize[_0xad3c[100]](function(_0x4351x28){return CustomReport[_0xad3c[86]](_0x4351xf[_0xad3c[98]],{transaction:_0x4351x28})[_0xad3c[20]](function(_0x4351x18){_0x4351x16= _0x4351x18;return [_0x4351x16,_0x4351xf[_0xad3c[98]][_0xad3c[101]]]})[_0xad3c[29]](createImportFields(_0x4351x28))})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[19]](201)[_0xad3c[18]](_0x4351x16)})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[103]]= function(_0x4351xf,_0x4351x10,_0x4351x11){if(_0x4351xf[_0xad3c[98]][_0xad3c[45]]){delete _0x4351xf[_0xad3c[98]][_0xad3c[45]]};var _0x4351x16;return sequelize[_0xad3c[100]](function(_0x4351x28){return CustomReport[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x18){if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};var _0x4351x2a=_[_0xad3c[105]](_0x4351x18,_0x4351xf[_0xad3c[98]]);return _0x4351x18[_0xad3c[106]]({transaction:_0x4351x28})})[_0xad3c[20]](function(_0x4351x18){_0x4351x16= _0x4351x18;if(_0x4351xf[_0xad3c[98]][_0xad3c[101]]){return ReportField[_0xad3c[104]]({where:{CustomReportId:_0x4351xf[_0xad3c[46]][_0xad3c[45]]},transaction:_0x4351x28})}})[_0xad3c[20]](function(){return [_0x4351x16,_0x4351xf[_0xad3c[98]][_0xad3c[101]]]})[_0xad3c[29]](createFields(_0x4351x28))})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[33]](200)})[_0xad3c[17]](function(_0x4351x12){console[_0xad3c[26]](_0x4351x12);return handleError(_0x4351x10,_0x4351x12)})};function createFields(_0x4351x28){return function(_0x4351x18,_0x4351x2c){if(_0x4351x2c&& Array[_0xad3c[107]](_0x4351x2c)&& _0x4351x2c[_0xad3c[51]]){var _0x4351x2d=reportBuildUtils[_0xad3c[108]](_0x4351x18[_0xad3c[40]]);if(_0x4351x2d){var _0x4351x2e;return _0x4351x2d[_0xad3c[122]]()[_0xad3c[20]](function(_0x4351x33){_0x4351x2e= _[_0xad3c[120]](_0x4351x33);return Metric[_0xad3c[121]]()})[_0xad3c[20]](function(_0x4351x2f){var _0x4351x30=[];_0x4351x2f= _[_0xad3c[99]](_0x4351x2f,_0xad3c[41]);_0x4351x2c[_0xad3c[59]](function(_0x4351x31){_0x4351x31[_0xad3c[109]]= _0x4351x18[_0xad3c[45]];if(_0x4351x31[_0xad3c[110]]){var _0x4351x32=_[_0xad3c[79]](_0x4351x2f,{id:_0x4351x31[_0xad3c[110]]});if(_0x4351x32){_0x4351x31[_0xad3c[111]]= _0x4351x32[_0xad3c[112]];_0x4351x30[_0xad3c[113]](ReportField[_0xad3c[86]](_0x4351x31,{transaction:_0x4351x28}))}else {throw  new sequelize.Error(_0xad3c[114]+ _0x4351x31[_0xad3c[110]]+ _0xad3c[115])}}else {if(_[_0xad3c[116]](_0x4351x2e,_0x4351x31[_0xad3c[111]])|| _0x4351x31[_0xad3c[117]]){_0x4351x30[_0xad3c[113]](ReportField[_0xad3c[86]](_0x4351x31,{transaction:_0x4351x28}))}else {throw  new sequelize.Error(_0xad3c[118]+ _0x4351x31[_0xad3c[111]]+ _0xad3c[119])}}});return _0x4351x30})[_0xad3c[27]]()}else {throw  new sequelize.Error(_0xad3c[123])}}}}function createImportFields(_0x4351x28){return function(_0x4351x18,_0x4351x2c){if(_0x4351x2c&& Array[_0xad3c[107]](_0x4351x2c)&& _0x4351x2c[_0xad3c[51]]){var _0x4351x2d=reportBuildUtils[_0xad3c[108]](_0x4351x18[_0xad3c[40]]);if(_0x4351x2d){var _0x4351x2e;return _0x4351x2d[_0xad3c[122]]()[_0xad3c[20]](function(_0x4351x33){_0x4351x2e= _[_0xad3c[120]](_0x4351x33);var _0x4351x30=[];var _0x4351x35;if(_[_0xad3c[126]](_0x4351x2c,function(_0x4351x31){return _[_0xad3c[125]](_0x4351x31,_0xad3c[124])})){_0x4351x35= _0xad3c[127]}else {if(_[_0xad3c[126]](_0x4351x2c,function(_0x4351x31){return _[_0xad3c[125]](_0x4351x31,_0xad3c[110])})){_0x4351x35= _0xad3c[7]}else {throw  new sequelize.Error(_0xad3c[128])}};var _0x4351x36=_[_0xad3c[130]](_0x4351x2c,_0x4351x35+ _0xad3c[129]);_[_0xad3c[58]](_0x4351x36,function(_0x4351x37,_0x4351x1d){if(_0x4351x1d!== _0xad3c[131]&& _0x4351x1d!== _0xad3c[132]){_0x4351x37[0][_0x4351x35][_0xad3c[133]][_0xad3c[59]](function(_0x4351x31){_0x4351x31[_0xad3c[109]]= _0x4351x18[_0xad3c[45]]});_0x4351x37[0][_0x4351x35][_0xad3c[80]]+= _0xad3c[134]+ sr({length:5});_0x4351x30[_0xad3c[113]](Metric[_0xad3c[86]](_0x4351x37[0][_0x4351x35],{include:[{model:ReportField,as:_0xad3c[133]}],transaction:_0x4351x28}))}else {_0x4351x37[_0xad3c[59]](function(_0x4351x31){if(_[_0xad3c[116]](_0x4351x2e,_0x4351x31[_0xad3c[111]])|| _0x4351x31[_0xad3c[117]]){_0x4351x31[_0xad3c[109]]= _0x4351x18[_0xad3c[45]];_0x4351x30[_0xad3c[113]](ReportField[_0xad3c[86]](_0x4351x31,{transaction:_0x4351x28}))}else {throw  new sequelize.Error(_0xad3c[118]+ _0x4351x31[_0xad3c[111]]+ _0xad3c[119])}})}});return _0x4351x30})[_0xad3c[27]]()}else {throw  new sequelize.Error(_0xad3c[123])}}}}exports[_0xad3c[104]]= function(_0x4351xf,_0x4351x10){return CustomReport[_0xad3c[47]](_0x4351xf[_0xad3c[46]][_0xad3c[45]])[_0xad3c[20]](function(_0x4351x18){if(!_0x4351x18){return _0x4351x10[_0xad3c[33]](404)};return _0x4351x18[_0xad3c[104]]()})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[33]](204)})[_0xad3c[17]](function(_0x4351x12){return handleError(_0x4351x10,_0x4351x12)})};exports[_0xad3c[135]]= function(_0x4351xf,_0x4351x10){return CustomReport[_0xad3c[104]]({where:{id:_0x4351xf[_0xad3c[21]][_0xad3c[136]]},individualHooks:true})[_0xad3c[20]](function(){return _0x4351x10[_0xad3c[33]](204)})[_0xad3c[17]](function(_0x4351x12){return handleError(_0x4351x10,_0x4351x12)})};function handleError(_0x4351x10,_0x4351x12){return _0x4351x10[_0xad3c[19]](500)[_0xad3c[18]](_0x4351x12)}
\ No newline at end of file
+var _0x3423=["\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","\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","\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","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x70\x61\x72\x65\x6E\x74","\x66\x69\x6E\x64","\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","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\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","\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","\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"];_0x3423[0];var _=require(_0x3423[1]);var util=require(_0x3423[2]);var sequelize=require(_0x3423[4])[_0x3423[3]];var CustomReport=require(_0x3423[4])[_0x3423[5]];var ReportField=require(_0x3423[4])[_0x3423[6]];var Metric=require(_0x3423[4])[_0x3423[7]];var ExtractedReport=require(_0x3423[4])[_0x3423[8]];var extractUtils=require(_0x3423[9]);var reportBuildUtils=require(_0x3423[10]);var Util=require(_0x3423[11]);var sr=require(_0x3423[12]);var moment=require(_0x3423[13]);var cp=require(_0x3423[14]);var ReportTree=require(_0x3423[4])[_0x3423[15]];exports[_0x3423[16]]= function(_0xa7fcxf,_0xa7fcx10,_0xa7fcx11){return CustomReport[_0x3423[23]](Util[_0x3423[22]](_0xa7fcxf[_0x3423[21]]))[_0x3423[20]](function(_0xa7fcx13){_0xa7fcx10[_0x3423[19]](200)[_0x3423[18]](_0xa7fcx13)})[_0x3423[17]](function(_0xa7fcx12){return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[24]]= function(_0xa7fcxf,_0xa7fcx10){return Promise[_0x3423[27]]([])[_0x3423[20]](getQuery(_0xa7fcxf,_0xa7fcx10))[_0x3423[20]](function(_0xa7fcx14){_0xa7fcx10[_0x3423[19]](200)[_0x3423[18]]({query:_0xa7fcx14})})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0x3423[25],_0xa7fcx12)})};function getQuery(_0xa7fcxf,_0xa7fcx10){var _0xa7fcx16;return function(){return CustomReport[_0x3423[49]](_0x3423[48])[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx18){console[_0x3423[26]](_0x3423[32]);if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};if(_0xa7fcxf[_0x3423[21]][_0x3423[34]]&& _0xa7fcxf[_0x3423[21]][_0x3423[34]]=== _0x3423[35]){_0xa7fcxf[_0x3423[21]][_0x3423[36]]= moment()[_0x3423[38]](_0x3423[37]);_0xa7fcxf[_0x3423[21]][_0x3423[39]]= moment()[_0x3423[38]](_0x3423[37]);_0xa7fcx18[_0x3423[41]][_0x3423[40]]= _0xa7fcx18[_0x3423[41]][_0x3423[40]][_0x3423[44]](_0x3423[42],_0x3423[43])};delete _0xa7fcxf[_0x3423[21]][_0x3423[34]];_0xa7fcx16= _0xa7fcx18[_0x3423[41]];return _0xa7fcx16[_0x3423[40]]})[_0x3423[20]](reportBuildUtils[_0x3423[31]](_0xa7fcxf[_0x3423[30]]))[_0x3423[20]](function(_0xa7fcx17){return [_0xa7fcx17,_0xa7fcx16]})[_0x3423[29]](reportBuildUtils[_0x3423[28]](_0xa7fcxf[_0x3423[21]]))}}exports[_0x3423[50]]= function(_0xa7fcxf,_0xa7fcx10){var _0xa7fcx19;return Promise[_0x3423[27]]([])[_0x3423[20]](getQuery(_0xa7fcxf,_0xa7fcx10))[_0x3423[20]](function(_0xa7fcx14){return _0xa7fcx14?sequelize[_0x3423[21]](_0xa7fcx14,{type:sequelize[_0x3423[61]][_0x3423[60]]}):[]})[_0x3423[20]](function(_0xa7fcx1a){_0xa7fcx19= _0xa7fcx1a[_0x3423[51]];if(_0xa7fcxf[_0x3423[21]][_0x3423[52]]){_0xa7fcx1a= _(_0xa7fcx1a)[_0x3423[56]](_0xa7fcxf[_0x3423[21]][_0x3423[55]]|| 0)[_0x3423[54]](_0xa7fcxf[_0x3423[21]][_0x3423[52]])[_0x3423[53]]()};_[_0x3423[59]](_0xa7fcx1a,function(_0xa7fcx1b){_[_0x3423[58]](_0xa7fcx1b,function(_0xa7fcx1c,_0xa7fcx1d){if(_0xa7fcx1c instanceof  Date){_0xa7fcx1b[_0xa7fcx1d]= moment(_0xa7fcx1c)[_0x3423[38]](_0x3423[57]).toString()}})});_0xa7fcx10[_0x3423[19]](200)[_0x3423[18]]({rows:_0xa7fcx1a,count:_0xa7fcx19})})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[62]]= function(_0xa7fcxf,_0xa7fcx10){docExtract(_0xa7fcxf,_0xa7fcx10,_0x3423[63])};exports[_0x3423[64]]= function(_0xa7fcxf,_0xa7fcx10){docExtract(_0xa7fcxf,_0xa7fcx10,_0x3423[65])};function docExtract(_0xa7fcxf,_0xa7fcx10,_0xa7fcx1f){var _0xa7fcx18;CustomReport[_0x3423[49]](_0x3423[48])[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx16){if(!_0xa7fcx16){return _0xa7fcx10[_0x3423[33]](404)};_0xa7fcx18= _0xa7fcx16;return ReportTree[_0x3423[47]](2)})[_0x3423[20]](function(_0xa7fcx23){_0xa7fcx23= JSON[_0x3423[77]](_0xa7fcx23[_0x3423[76]]);var _0xa7fcx24=_[_0x3423[79]](_0xa7fcx23,{id:_0xa7fcx18[_0x3423[78]]});var _0xa7fcx25=getReportPath(_0xa7fcx24,_0xa7fcx23,_0xa7fcx18[_0x3423[80]]);if(_0xa7fcxf[_0x3423[21]][_0x3423[34]]&& _0xa7fcxf[_0x3423[21]][_0x3423[34]]=== _0x3423[35]){_0xa7fcxf[_0x3423[21]][_0x3423[36]]= moment()[_0x3423[38]](_0x3423[37]);_0xa7fcxf[_0x3423[21]][_0x3423[39]]= moment()[_0x3423[38]](_0x3423[37]);_0xa7fcx18[_0x3423[41]][_0x3423[40]]= _0xa7fcx18[_0x3423[41]][_0x3423[40]][_0x3423[44]](_0x3423[42],_0x3423[43])};delete _0xa7fcxf[_0x3423[21]][_0x3423[34]];return [_0xa7fcx18,ExtractedReport[_0x3423[86]]({name:_0xa7fcx25,startDate:_0xa7fcxf[_0x3423[21]][_0x3423[36]]?_0xa7fcxf[_0x3423[21]][_0x3423[36]]+ (_0xa7fcxf[_0x3423[21]][_0x3423[81]]?_0x3423[82]+ _0xa7fcxf[_0x3423[21]][_0x3423[81]]:_0x3423[83]):null,endDate:_0xa7fcxf[_0x3423[21]][_0x3423[39]]?_0xa7fcxf[_0x3423[21]][_0x3423[39]]+ (_0xa7fcxf[_0x3423[21]][_0x3423[84]]?_0x3423[82]+ _0xa7fcxf[_0x3423[21]][_0x3423[84]]:_0x3423[85]):null,output:_0xa7fcx1f,UserId:_0xa7fcxf[_0x3423[30]][_0x3423[45]]})]})[_0x3423[29]](function(_0xa7fcx18,_0xa7fcx20){var _0xa7fcx21=cp[_0x3423[67]](__dirname+ _0x3423[66]);_0xa7fcx21[_0x3423[70]](_0x3423[73],function(_0xa7fcx22){console[_0x3423[26]](_0x3423[74],_0xa7fcx22);_0xa7fcx21[_0x3423[75]]()})[_0x3423[70]](_0x3423[71],function(){console[_0x3423[26]](_0x3423[72])})[_0x3423[70]](_0x3423[68],function(_0xa7fcx12){console[_0x3423[26]](_0x3423[69],_0xa7fcx12)});_0xa7fcx21[_0x3423[18]]({report:_0xa7fcx18,query:_0xa7fcxf[_0x3423[21]],extractedId:_0xa7fcx20[_0x3423[45]],user:_0xa7fcxf[_0x3423[30]],type:_0xa7fcx1f})})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)});return _0xa7fcx10[_0x3423[33]](200)}function getReportPath(_0xa7fcx24,_0xa7fcx23,_0xa7fcx25){_0xa7fcx25= _0xa7fcx24[_0x3423[87]]+ _0x3423[88]+ _0xa7fcx25;if(_0xa7fcx24[_0x3423[78]]=== _0x3423[89]){return _0xa7fcx25}else {return getReportPath(_[_0x3423[79]](_0xa7fcx23,{id:_0xa7fcx24[_0x3423[78]]}),_0xa7fcx23,_0xa7fcx25)}}exports[_0x3423[90]]= function(_0xa7fcxf,_0xa7fcx10){return CustomReport[_0x3423[49]](_0x3423[48])[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx18){if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};return _0xa7fcx10[_0x3423[18]](_0xa7fcx18)})[_0x3423[17]](function(_0xa7fcx12){return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[91]]= function(_0xa7fcxf,_0xa7fcx10){return CustomReport[_0x3423[49]]({method:[_0x3423[94],{CustomReportId:_0xa7fcxf[_0x3423[46]][_0x3423[45]]}]})[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]],{attributes:[_0x3423[92],_0x3423[93],_0x3423[80],_0x3423[78],_0x3423[40]]})[_0x3423[20]](function(_0xa7fcx18){if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};return _0xa7fcx10[_0x3423[18]](_0xa7fcx18)})[_0x3423[17]](function(_0xa7fcx12){return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[95]]= function(_0xa7fcxf,_0xa7fcx10){var _0xa7fcx27;return sequelize[_0x3423[100]](function(_0xa7fcx28){return CustomReport[_0x3423[49]](_0x3423[48])[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx18){if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};var _0xa7fcx29=_0xa7fcx18[_0x3423[41]];delete _0xa7fcx29[_0x3423[45]];delete _0xa7fcx29[_0x3423[96]];delete _0xa7fcx29[_0x3423[97]];_0xa7fcx29[_0x3423[78]]= _0xa7fcxf[_0x3423[98]][_0x3423[78]];_0xa7fcx27= _[_0x3423[99]](_0xa7fcx29.Fields,_0x3423[41]);return CustomReport[_0x3423[86]](_0xa7fcx29,{transaction:_0xa7fcx28})})[_0x3423[20]](function(_0xa7fcx18){return [_0xa7fcx18,_0xa7fcx27]})[_0x3423[29]](createFields(_0xa7fcx28))})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[33]](201)})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[86]]= function(_0xa7fcxf,_0xa7fcx10){var _0xa7fcx16;return sequelize[_0x3423[100]](function(_0xa7fcx28){return CustomReport[_0x3423[86]](_0xa7fcxf[_0x3423[98]],{transaction:_0xa7fcx28})[_0x3423[20]](function(_0xa7fcx18){_0xa7fcx16= _0xa7fcx18;return [_0xa7fcx16,_0xa7fcxf[_0x3423[98]][_0x3423[101]]]})[_0x3423[29]](createFields(_0xa7fcx28))})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[19]](201)[_0x3423[18]](_0xa7fcx16)})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[102]]= function(_0xa7fcxf,_0xa7fcx10){var _0xa7fcx16;return sequelize[_0x3423[100]](function(_0xa7fcx28){return CustomReport[_0x3423[86]](_0xa7fcxf[_0x3423[98]],{transaction:_0xa7fcx28})[_0x3423[20]](function(_0xa7fcx18){_0xa7fcx16= _0xa7fcx18;return [_0xa7fcx16,_0xa7fcxf[_0x3423[98]][_0x3423[101]]]})[_0x3423[29]](createImportFields(_0xa7fcx28))})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[19]](201)[_0x3423[18]](_0xa7fcx16)})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[103]]= function(_0xa7fcxf,_0xa7fcx10,_0xa7fcx11){if(_0xa7fcxf[_0x3423[98]][_0x3423[45]]){delete _0xa7fcxf[_0x3423[98]][_0x3423[45]]};var _0xa7fcx16;return sequelize[_0x3423[100]](function(_0xa7fcx28){return CustomReport[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx18){if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};var _0xa7fcx2a=_[_0x3423[105]](_0xa7fcx18,_0xa7fcxf[_0x3423[98]]);return _0xa7fcx18[_0x3423[106]]({transaction:_0xa7fcx28})})[_0x3423[20]](function(_0xa7fcx18){_0xa7fcx16= _0xa7fcx18;if(_0xa7fcxf[_0x3423[98]][_0x3423[101]]){return ReportField[_0x3423[104]]({where:{CustomReportId:_0xa7fcxf[_0x3423[46]][_0x3423[45]]},transaction:_0xa7fcx28})}})[_0x3423[20]](function(){return [_0xa7fcx16,_0xa7fcxf[_0x3423[98]][_0x3423[101]]]})[_0x3423[29]](createFields(_0xa7fcx28))})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[33]](200)})[_0x3423[17]](function(_0xa7fcx12){console[_0x3423[26]](_0xa7fcx12);return handleError(_0xa7fcx10,_0xa7fcx12)})};function createFields(_0xa7fcx28){return function(_0xa7fcx18,_0xa7fcx2c){if(_0xa7fcx2c&& Array[_0x3423[107]](_0xa7fcx2c)&& _0xa7fcx2c[_0x3423[51]]){var _0xa7fcx2d=reportBuildUtils[_0x3423[108]](_0xa7fcx18[_0x3423[40]]);if(_0xa7fcx2d){var _0xa7fcx2e;return _0xa7fcx2d[_0x3423[122]]()[_0x3423[20]](function(_0xa7fcx33){_0xa7fcx2e= _[_0x3423[120]](_0xa7fcx33);return Metric[_0x3423[121]]()})[_0x3423[20]](function(_0xa7fcx2f){var _0xa7fcx30=[];_0xa7fcx2f= _[_0x3423[99]](_0xa7fcx2f,_0x3423[41]);_0xa7fcx2c[_0x3423[59]](function(_0xa7fcx31){_0xa7fcx31[_0x3423[109]]= _0xa7fcx18[_0x3423[45]];if(_0xa7fcx31[_0x3423[110]]){var _0xa7fcx32=_[_0x3423[79]](_0xa7fcx2f,{id:_0xa7fcx31[_0x3423[110]]});if(_0xa7fcx32){_0xa7fcx31[_0x3423[111]]= _0xa7fcx32[_0x3423[112]];_0xa7fcx30[_0x3423[113]](ReportField[_0x3423[86]](_0xa7fcx31,{transaction:_0xa7fcx28}))}else {throw  new sequelize.Error(_0x3423[114]+ _0xa7fcx31[_0x3423[110]]+ _0x3423[115])}}else {if(_[_0x3423[116]](_0xa7fcx2e,_0xa7fcx31[_0x3423[111]])|| _0xa7fcx31[_0x3423[117]]){_0xa7fcx30[_0x3423[113]](ReportField[_0x3423[86]](_0xa7fcx31,{transaction:_0xa7fcx28}))}else {throw  new sequelize.Error(_0x3423[118]+ _0xa7fcx31[_0x3423[111]]+ _0x3423[119])}}});return _0xa7fcx30})[_0x3423[27]]()}else {throw  new sequelize.Error(_0x3423[123])}}}}function createImportFields(_0xa7fcx28){return function(_0xa7fcx18,_0xa7fcx2c){if(_0xa7fcx2c&& Array[_0x3423[107]](_0xa7fcx2c)&& _0xa7fcx2c[_0x3423[51]]){var _0xa7fcx2d=reportBuildUtils[_0x3423[108]](_0xa7fcx18[_0x3423[40]]);if(_0xa7fcx2d){var _0xa7fcx2e;return _0xa7fcx2d[_0x3423[122]]()[_0x3423[20]](function(_0xa7fcx33){_0xa7fcx2e= _[_0x3423[120]](_0xa7fcx33);var _0xa7fcx30=[];var _0xa7fcx35;if(_[_0x3423[126]](_0xa7fcx2c,function(_0xa7fcx31){return _[_0x3423[125]](_0xa7fcx31,_0x3423[124])})){_0xa7fcx35= _0x3423[127]}else {if(_[_0x3423[126]](_0xa7fcx2c,function(_0xa7fcx31){return _[_0x3423[125]](_0xa7fcx31,_0x3423[110])})){_0xa7fcx35= _0x3423[7]}else {throw  new sequelize.Error(_0x3423[128])}};var _0xa7fcx36=_[_0x3423[130]](_0xa7fcx2c,_0xa7fcx35+ _0x3423[129]);_[_0x3423[58]](_0xa7fcx36,function(_0xa7fcx37,_0xa7fcx1d){if(_0xa7fcx1d!== _0x3423[131]&& _0xa7fcx1d!== _0x3423[132]){_0xa7fcx37[0][_0xa7fcx35][_0x3423[133]][_0x3423[59]](function(_0xa7fcx31){_0xa7fcx31[_0x3423[109]]= _0xa7fcx18[_0x3423[45]]});_0xa7fcx37[0][_0xa7fcx35][_0x3423[80]]+= _0x3423[134]+ sr({length:5});_0xa7fcx30[_0x3423[113]](Metric[_0x3423[86]](_0xa7fcx37[0][_0xa7fcx35],{include:[{model:ReportField,as:_0x3423[133]}],transaction:_0xa7fcx28}))}else {_0xa7fcx37[_0x3423[59]](function(_0xa7fcx31){if(_[_0x3423[116]](_0xa7fcx2e,_0xa7fcx31[_0x3423[111]])|| _0xa7fcx31[_0x3423[117]]){_0xa7fcx31[_0x3423[109]]= _0xa7fcx18[_0x3423[45]];_0xa7fcx30[_0x3423[113]](ReportField[_0x3423[86]](_0xa7fcx31,{transaction:_0xa7fcx28}))}else {throw  new sequelize.Error(_0x3423[118]+ _0xa7fcx31[_0x3423[111]]+ _0x3423[119])}})}});return _0xa7fcx30})[_0x3423[27]]()}else {throw  new sequelize.Error(_0x3423[123])}}}}exports[_0x3423[104]]= function(_0xa7fcxf,_0xa7fcx10){return CustomReport[_0x3423[47]](_0xa7fcxf[_0x3423[46]][_0x3423[45]])[_0x3423[20]](function(_0xa7fcx18){if(!_0xa7fcx18){return _0xa7fcx10[_0x3423[33]](404)};return _0xa7fcx18[_0x3423[104]]()})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[33]](204)})[_0x3423[17]](function(_0xa7fcx12){return handleError(_0xa7fcx10,_0xa7fcx12)})};exports[_0x3423[135]]= function(_0xa7fcxf,_0xa7fcx10){return CustomReport[_0x3423[104]]({where:{id:_0xa7fcxf[_0x3423[21]][_0x3423[136]]},individualHooks:true})[_0x3423[20]](function(){return _0xa7fcx10[_0x3423[33]](204)})[_0x3423[17]](function(_0xa7fcx12){return handleError(_0xa7fcx10,_0xa7fcx12)})};function handleError(_0xa7fcx10,_0xa7fcx12){return _0xa7fcx10[_0x3423[19]](500)[_0x3423[18]](_0xa7fcx12)}
\ No newline at end of file