Built motion from commit 6fa6f14.|1.0.18
[motion.git] / server / api / default_report / default_report.controller.js
index 2a8047c..4db6e08 100644 (file)
@@ -1 +1 @@
-var _0xf8fc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\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","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\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","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\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","\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","\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","\x66\x69\x65\x6C\x64\x73","\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","\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","\x66\x69\x6E\x64","\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","\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","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\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","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xf8fc[0];var _=require(_0xf8fc[1]);var util=require(_0xf8fc[2]);var DefaultReport=require(_0xf8fc[4])[_0xf8fc[3]];var ReportField=require(_0xf8fc[4])[_0xf8fc[5]];var Metric=require(_0xf8fc[4])[_0xf8fc[6]];var sequelize=require(_0xf8fc[4])[_0xf8fc[7]];var CustomReport=require(_0xf8fc[4])[_0xf8fc[8]];var ExtractedReport=require(_0xf8fc[4])[_0xf8fc[9]];var extractUtils=require(_0xf8fc[10]);var reportBuildUtils=require(_0xf8fc[11]);var Util=require(_0xf8fc[12]);var moment=require(_0xf8fc[13]);var cp=require(_0xf8fc[14]);var sr=require(_0xf8fc[15]);var ReportTree=require(_0xf8fc[4])[_0xf8fc[16]];exports[_0xf8fc[17]]= function(_0x65b5x10,_0x65b5x11,_0x65b5x12){return DefaultReport[_0xf8fc[24]](Util[_0xf8fc[23]](_0x65b5x10[_0xf8fc[22]]))[_0xf8fc[21]](function(_0x65b5x14){_0x65b5x11[_0xf8fc[20]](200)[_0xf8fc[19]](_0x65b5x14)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[25]]= function(_0x65b5x10,_0x65b5x11){return DefaultReport[_0xf8fc[36]]({method:[_0xf8fc[35],{DefaultReportId:_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]]}]})[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]],{attributes:[_0xf8fc[29],_0xf8fc[30],_0xf8fc[31],_0xf8fc[32],_0xf8fc[33]]})[_0xf8fc[21]](function(_0x65b5x15){if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};return _0x65b5x11[_0xf8fc[19]](_0x65b5x15)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[37]]= function(_0x65b5x10,_0x65b5x11){return Promise[_0xf8fc[42]]([])[_0xf8fc[21]](getQuery(_0x65b5x10,_0x65b5x11))[_0xf8fc[21]](function(_0x65b5x16){if(_0x65b5x16){switch(_0x65b5x16){case _0xf8fc[41]:_0x65b5x16= _0xf8fc[40];break;default:}};_0x65b5x11[_0xf8fc[20]](200)[_0xf8fc[19]]({query:_0x65b5x16})})[_0xf8fc[18]](function(_0x65b5x13){console[_0xf8fc[39]](_0xf8fc[38],_0x65b5x13)})};function getQuery(_0x65b5x10,_0x65b5x11){var _0x65b5x18;return function(){return DefaultReport[_0xf8fc[36]](_0xf8fc[58])[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]])[_0xf8fc[21]](function(_0x65b5x15){console[_0xf8fc[39]](_0xf8fc[47]);if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};if(_0x65b5x10[_0xf8fc[22]][_0xf8fc[48]]&& _0x65b5x10[_0xf8fc[22]][_0xf8fc[48]]=== _0xf8fc[49]){_0x65b5x10[_0xf8fc[22]][_0xf8fc[50]]= moment()[_0xf8fc[52]](_0xf8fc[51]);_0x65b5x10[_0xf8fc[22]][_0xf8fc[53]]= moment()[_0xf8fc[52]](_0xf8fc[51]);_0x65b5x15[_0xf8fc[54]][_0xf8fc[33]]= _0x65b5x15[_0xf8fc[54]][_0xf8fc[33]][_0xf8fc[57]](_0xf8fc[55],_0xf8fc[56])};delete _0x65b5x10[_0xf8fc[22]][_0xf8fc[48]];_0x65b5x18= _0x65b5x15[_0xf8fc[54]];return _0x65b5x18[_0xf8fc[33]]})[_0xf8fc[21]](reportBuildUtils[_0xf8fc[46]](_0x65b5x10[_0xf8fc[45]]))[_0xf8fc[21]](function(_0x65b5x19){return [_0x65b5x19,_0x65b5x18]})[_0xf8fc[44]](reportBuildUtils[_0xf8fc[43]](_0x65b5x10[_0xf8fc[22]]))}}exports[_0xf8fc[59]]= function(_0x65b5x10,_0x65b5x11){var _0x65b5x1a;return Promise[_0xf8fc[42]]([])[_0xf8fc[21]](getQuery(_0x65b5x10,_0x65b5x11))[_0xf8fc[21]](reportBuildUtils[_0xf8fc[71]]())[_0xf8fc[21]](function(_0x65b5x1b){if(_0x65b5x1b&& _[_0xf8fc[60]](_0x65b5x1b)){_0x65b5x1a= _0x65b5x1b[_0xf8fc[61]];if(_0x65b5x10[_0xf8fc[22]][_0xf8fc[62]]){_0x65b5x1b= _(_0x65b5x1b)[_0xf8fc[66]](_0x65b5x10[_0xf8fc[22]][_0xf8fc[65]]|| 0)[_0xf8fc[64]](_0x65b5x10[_0xf8fc[22]][_0xf8fc[62]])[_0xf8fc[63]]()};_[_0xf8fc[69]](_0x65b5x1b,function(_0x65b5x1c){_[_0xf8fc[68]](_0x65b5x1c,function(_0x65b5x1d,_0x65b5x1e){if(_0x65b5x1d instanceof  Date){_0x65b5x1c[_0x65b5x1e]= moment(_0x65b5x1d)[_0xf8fc[52]](_0xf8fc[67]).toString()}})});_0x65b5x11[_0xf8fc[20]](200)[_0xf8fc[19]]({rows:_0x65b5x1b,count:_0x65b5x1a})}else {return handleError(_0x65b5x11,{message:_0x65b5x1b|| _0xf8fc[70]})}})[_0xf8fc[18]](function(_0x65b5x13){console[_0xf8fc[39]](_0x65b5x13);return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[72]]= function(_0x65b5x10,_0x65b5x11){docExtract(_0x65b5x10,_0x65b5x11,_0xf8fc[73])};exports[_0xf8fc[74]]= function(_0x65b5x10,_0x65b5x11){docExtract(_0x65b5x10,_0x65b5x11,_0xf8fc[75])};function docExtract(_0x65b5x10,_0x65b5x11,_0x65b5x20){var _0x65b5x15;DefaultReport[_0xf8fc[36]](_0xf8fc[58])[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]])[_0xf8fc[21]](function(_0x65b5x18){if(!_0x65b5x18){return _0x65b5x11[_0xf8fc[26]](404)};_0x65b5x15= _0x65b5x18;return ReportTree[_0xf8fc[34]](1)})[_0xf8fc[21]](function(_0x65b5x24){_0x65b5x24= JSON[_0xf8fc[87]](_0x65b5x24[_0xf8fc[86]]);var _0x65b5x25=_[_0xf8fc[88]](_0x65b5x24,{id:_0x65b5x15[_0xf8fc[32]]});var _0x65b5x26=getReportPath(_0x65b5x25,_0x65b5x24,_0x65b5x15[_0xf8fc[31]]);if(_0x65b5x10[_0xf8fc[22]][_0xf8fc[48]]&& _0x65b5x10[_0xf8fc[22]][_0xf8fc[48]]=== _0xf8fc[49]){_0x65b5x10[_0xf8fc[22]][_0xf8fc[50]]= moment()[_0xf8fc[52]](_0xf8fc[51]);_0x65b5x10[_0xf8fc[22]][_0xf8fc[53]]= moment()[_0xf8fc[52]](_0xf8fc[51]);_0x65b5x15[_0xf8fc[54]][_0xf8fc[33]]= _0x65b5x15[_0xf8fc[54]][_0xf8fc[33]][_0xf8fc[57]](_0xf8fc[55],_0xf8fc[56])};delete _0x65b5x10[_0xf8fc[22]][_0xf8fc[48]];return [_0x65b5x15,ExtractedReport[_0xf8fc[94]]({name:_0x65b5x26,startDate:_0x65b5x10[_0xf8fc[22]][_0xf8fc[50]]?_0x65b5x10[_0xf8fc[22]][_0xf8fc[50]]+ (_0x65b5x10[_0xf8fc[22]][_0xf8fc[89]]?_0xf8fc[90]+ _0x65b5x10[_0xf8fc[22]][_0xf8fc[89]]:_0xf8fc[91]):null,endDate:_0x65b5x10[_0xf8fc[22]][_0xf8fc[53]]?_0x65b5x10[_0xf8fc[22]][_0xf8fc[53]]+ (_0x65b5x10[_0xf8fc[22]][_0xf8fc[92]]?_0xf8fc[90]+ _0x65b5x10[_0xf8fc[22]][_0xf8fc[92]]:_0xf8fc[93]):null,output:_0x65b5x20,UserId:_0x65b5x10[_0xf8fc[45]][_0xf8fc[27]]})]})[_0xf8fc[44]](function(_0x65b5x15,_0x65b5x21){var _0x65b5x22=cp[_0xf8fc[77]](__dirname+ _0xf8fc[76]);_0x65b5x22[_0xf8fc[80]](_0xf8fc[83],function(_0x65b5x23){console[_0xf8fc[39]](_0xf8fc[84],_0x65b5x23);_0x65b5x22[_0xf8fc[85]]()})[_0xf8fc[80]](_0xf8fc[81],function(){console[_0xf8fc[39]](_0xf8fc[82])})[_0xf8fc[80]](_0xf8fc[78],function(_0x65b5x13){console[_0xf8fc[39]](_0xf8fc[79],_0x65b5x13)});_0x65b5x22[_0xf8fc[19]]({report:_0x65b5x15,query:_0x65b5x10[_0xf8fc[22]],extractedId:_0x65b5x21[_0xf8fc[27]],user:_0x65b5x10[_0xf8fc[45]],type:_0x65b5x20})})[_0xf8fc[18]](function(_0x65b5x13){console[_0xf8fc[39]](_0x65b5x13);return handleError(_0x65b5x11,_0x65b5x13)});return _0x65b5x11[_0xf8fc[26]](200)}function getReportPath(_0x65b5x25,_0x65b5x24,_0x65b5x26){_0x65b5x26= _0x65b5x25[_0xf8fc[95]]+ _0xf8fc[96]+ _0x65b5x26;if(_0x65b5x25[_0xf8fc[32]]=== _0xf8fc[97]){return _0x65b5x26}else {return getReportPath(_[_0xf8fc[88]](_0x65b5x24,{id:_0x65b5x25[_0xf8fc[32]]}),_0x65b5x24,_0x65b5x26)}}exports[_0xf8fc[98]]= function(_0x65b5x10,_0x65b5x11){return DefaultReport[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]],{include:[{all:true}]})[_0xf8fc[21]](function(_0x65b5x15){if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};return _0x65b5x11[_0xf8fc[19]](_0x65b5x15)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[99]]= function(_0x65b5x10,_0x65b5x11){var _0x65b5x28;return sequelize[_0xf8fc[104]](function(_0x65b5x29){return DefaultReport[_0xf8fc[36]]({method:[_0xf8fc[35],{DefaultReportId:_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]]}]})[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]])[_0xf8fc[21]](function(_0x65b5x15){if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};var _0x65b5x2a=_0x65b5x15[_0xf8fc[54]];console[_0xf8fc[39]](_0x65b5x2a);delete _0x65b5x2a[_0xf8fc[27]];delete _0x65b5x2a[_0xf8fc[100]];delete _0x65b5x2a[_0xf8fc[101]];_0x65b5x2a[_0xf8fc[32]]= _0x65b5x10[_0xf8fc[102]][_0xf8fc[32]];_0x65b5x28= _[_0xf8fc[103]](_0x65b5x2a.Fields,_0xf8fc[54]);return CustomReport[_0xf8fc[94]](_0x65b5x2a,{transaction:_0x65b5x29})})[_0xf8fc[21]](function(_0x65b5x15){return [_0x65b5x15,_0x65b5x28]})[_0xf8fc[44]](createCopyFields(_0x65b5x29))})[_0xf8fc[21]](function(){return _0x65b5x11[_0xf8fc[26]](201)})[_0xf8fc[18]](function(_0x65b5x13){console[_0xf8fc[39]](_0x65b5x13);return handleError(_0x65b5x11,_0x65b5x13)})};function createCopyFields(_0x65b5x29){return function(_0x65b5x15,_0x65b5x2c){if(_0x65b5x2c&& Array[_0xf8fc[60]](_0x65b5x2c)&& _0x65b5x2c[_0xf8fc[61]]){var _0x65b5x2d=reportBuildUtils[_0xf8fc[105]](_0x65b5x15[_0xf8fc[33]]);if(_0x65b5x2d){var _0x65b5x2e;return _0x65b5x2d[_0xf8fc[121]]()[_0xf8fc[21]](function(_0x65b5x2f){_0x65b5x2e= _[_0xf8fc[106]](_0x65b5x2f);var _0x65b5x30=[];var _0x65b5x31=_[_0xf8fc[108]](_0x65b5x2c,_0xf8fc[107]);_[_0xf8fc[68]](_0x65b5x31,function(_0x65b5x32,_0x65b5x1e){if(_0x65b5x1e!== _0xf8fc[109]&& _0x65b5x1e!== _0xf8fc[110]){_0x65b5x32[0][_0xf8fc[113]][_0xf8fc[112]][_0xf8fc[69]](function(_0x65b5x33){_0x65b5x33[_0xf8fc[111]]= _0x65b5x15[_0xf8fc[27]]});_0x65b5x32[0][_0xf8fc[113]][_0xf8fc[31]]+= _0xf8fc[114]+ sr({length:5});_0x65b5x30[_0xf8fc[115]](Metric[_0xf8fc[94]](_0x65b5x32[0][_0xf8fc[113]][_0xf8fc[54]],{include:[{model:ReportField,as:_0xf8fc[112]}],transaction:_0x65b5x29}))}else {_0x65b5x32[_0xf8fc[69]](function(_0x65b5x33){if(_[_0xf8fc[117]](_0x65b5x2e,_0x65b5x33[_0xf8fc[116]])|| _0x65b5x33[_0xf8fc[118]]){_0x65b5x33[_0xf8fc[111]]= _0x65b5x15[_0xf8fc[27]];_0x65b5x30[_0xf8fc[115]](ReportField[_0xf8fc[94]](_0x65b5x33,{transaction:_0x65b5x29}))}else {throw  new sequelize.Error(_0xf8fc[119]+ _0x65b5x33[_0xf8fc[116]]+ _0xf8fc[120])}})}});return _0x65b5x30})[_0xf8fc[42]]()}else {throw  new sequelize.Error(_0xf8fc[122])}}}}exports[_0xf8fc[94]]= function(_0x65b5x10,_0x65b5x11){return DefaultReport[_0xf8fc[94]](_0x65b5x10[_0xf8fc[102]])[_0xf8fc[21]](function(_0x65b5x15){return _0x65b5x11[_0xf8fc[20]](201)[_0xf8fc[19]](_0x65b5x15)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[123]]= function(_0x65b5x10,_0x65b5x11){if(_0x65b5x10[_0xf8fc[102]][_0xf8fc[27]]){delete _0x65b5x10[_0xf8fc[102]][_0xf8fc[27]]};return DefaultReport[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]])[_0xf8fc[21]](function(_0x65b5x15){if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};var _0x65b5x34=_[_0xf8fc[124]](_0x65b5x15,_0x65b5x10[_0xf8fc[102]]);return _0x65b5x34[_0xf8fc[125]]()})[_0xf8fc[21]](function(_0x65b5x15){return _0x65b5x11[_0xf8fc[20]](200)[_0xf8fc[19]](_0x65b5x15)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};exports[_0xf8fc[126]]= function(_0x65b5x10,_0x65b5x11){return DefaultReport[_0xf8fc[34]](_0x65b5x10[_0xf8fc[28]][_0xf8fc[27]])[_0xf8fc[21]](function(_0x65b5x15){if(!_0x65b5x15){return _0x65b5x11[_0xf8fc[26]](404)};return _0x65b5x15[_0xf8fc[126]]()})[_0xf8fc[21]](function(){return _0x65b5x11[_0xf8fc[26]](204)})[_0xf8fc[18]](function(_0x65b5x13){return handleError(_0x65b5x11,_0x65b5x13)})};function handleError(_0x65b5x11,_0x65b5x13){return _0x65b5x11[_0xf8fc[20]](500)[_0xf8fc[19]](_0x65b5x13)}
\ No newline at end of file
+var _0x8ab2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\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","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\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","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\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","\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","\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","\x66\x69\x65\x6C\x64\x73","\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","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x64\x65\x62\x75\x67","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x53\x56","\x63\x6F\x6D\x6D\x6F\x6E\x20\x64\x6F\x63\x45\x78\x74\x72\x61\x63\x74\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x72\x65\x61\x74\x65\x64\x20\x6E\x65\x77\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x20\x64\x62\x20\x65\x6E\x74\x72\x79\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x20","\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","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x46\x6F\x75\x6E\x64\x20\x74\x68\x65\x20\x72\x65\x70\x6F\x72\x74\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x6E\x65\x77\x20\x44\x42\x20\x72\x6F\x77\x20\x66\x6F\x72\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x2E\x2E","\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","\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","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\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","\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","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x8ab2[0];var _=require(_0x8ab2[1]);var util=require(_0x8ab2[2]);var DefaultReport=require(_0x8ab2[4])[_0x8ab2[3]];var ReportField=require(_0x8ab2[4])[_0x8ab2[5]];var Metric=require(_0x8ab2[4])[_0x8ab2[6]];var sequelize=require(_0x8ab2[4])[_0x8ab2[7]];var CustomReport=require(_0x8ab2[4])[_0x8ab2[8]];var ExtractedReport=require(_0x8ab2[4])[_0x8ab2[9]];var extractUtils=require(_0x8ab2[10]);var reportBuildUtils=require(_0x8ab2[11]);var Util=require(_0x8ab2[12]);var moment=require(_0x8ab2[13]);var cp=require(_0x8ab2[14]);var sr=require(_0x8ab2[15]);var ReportTree=require(_0x8ab2[4])[_0x8ab2[16]];var logger=require(_0x8ab2[18])(_0x8ab2[17]);exports[_0x8ab2[19]]= function(_0x2d00x11,_0x2d00x12,_0x2d00x13){return DefaultReport[_0x8ab2[26]](Util[_0x8ab2[25]](_0x2d00x11[_0x8ab2[24]]))[_0x8ab2[23]](function(_0x2d00x15){_0x2d00x12[_0x8ab2[22]](200)[_0x8ab2[21]](_0x2d00x15)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[27]]= function(_0x2d00x11,_0x2d00x12){return DefaultReport[_0x8ab2[38]]({method:[_0x8ab2[37],{DefaultReportId:_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]]}]})[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]],{attributes:[_0x8ab2[31],_0x8ab2[32],_0x8ab2[33],_0x8ab2[34],_0x8ab2[35]]})[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};return _0x2d00x12[_0x8ab2[21]](_0x2d00x16)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[39]]= function(_0x2d00x11,_0x2d00x12){return Promise[_0x8ab2[45]]([])[_0x8ab2[23]](getQuery(_0x2d00x11,_0x2d00x12))[_0x8ab2[23]](function(_0x2d00x17){if(_0x2d00x17){switch(_0x2d00x17){case _0x8ab2[44]:_0x2d00x17= _0x8ab2[43];break;default:}};_0x2d00x12[_0x8ab2[22]](200)[_0x8ab2[21]]({query:_0x2d00x17})})[_0x8ab2[20]](function(_0x2d00x14){logger[_0x8ab2[42]](_0x8ab2[40],_0x2d00x14[_0x8ab2[41]])})};function getQuery(_0x2d00x11,_0x2d00x12){var _0x2d00x19;return function(){return DefaultReport[_0x8ab2[38]](_0x8ab2[60])[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]])[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};if(_0x2d00x11[_0x8ab2[24]][_0x8ab2[50]]&& _0x2d00x11[_0x8ab2[24]][_0x8ab2[50]]=== _0x8ab2[51]){_0x2d00x11[_0x8ab2[24]][_0x8ab2[52]]= moment()[_0x8ab2[54]](_0x8ab2[53]);_0x2d00x11[_0x8ab2[24]][_0x8ab2[55]]= moment()[_0x8ab2[54]](_0x8ab2[53]);_0x2d00x16[_0x8ab2[56]][_0x8ab2[35]]= _0x2d00x16[_0x8ab2[56]][_0x8ab2[35]][_0x8ab2[59]](_0x8ab2[57],_0x8ab2[58])};delete _0x2d00x11[_0x8ab2[24]][_0x8ab2[50]];_0x2d00x19= _0x2d00x16[_0x8ab2[56]];return _0x2d00x19[_0x8ab2[35]]})[_0x8ab2[23]](reportBuildUtils[_0x8ab2[49]](_0x2d00x11[_0x8ab2[48]]))[_0x8ab2[23]](function(_0x2d00x1a){return [_0x2d00x1a,_0x2d00x19]})[_0x8ab2[47]](reportBuildUtils[_0x8ab2[46]](_0x2d00x11[_0x8ab2[24]]))}}exports[_0x8ab2[61]]= function(_0x2d00x11,_0x2d00x12){var _0x2d00x1b;return Promise[_0x8ab2[45]]([])[_0x8ab2[23]](getQuery(_0x2d00x11,_0x2d00x12))[_0x8ab2[23]](reportBuildUtils[_0x8ab2[73]]())[_0x8ab2[23]](function(_0x2d00x1c){if(_0x2d00x1c&& _[_0x8ab2[62]](_0x2d00x1c)){_0x2d00x1b= _0x2d00x1c[_0x8ab2[63]];if(_0x2d00x11[_0x8ab2[24]][_0x8ab2[64]]){_0x2d00x1c= _(_0x2d00x1c)[_0x8ab2[68]](_0x2d00x11[_0x8ab2[24]][_0x8ab2[67]]|| 0)[_0x8ab2[66]](_0x2d00x11[_0x8ab2[24]][_0x8ab2[64]])[_0x8ab2[65]]()};_[_0x8ab2[71]](_0x2d00x1c,function(_0x2d00x1d){_[_0x8ab2[70]](_0x2d00x1d,function(_0x2d00x1e,_0x2d00x1f){if(_0x2d00x1e instanceof  Date){_0x2d00x1d[_0x2d00x1f]= moment(_0x2d00x1e)[_0x8ab2[54]](_0x8ab2[69]).toString()}})});_0x2d00x12[_0x8ab2[22]](200)[_0x8ab2[21]]({rows:_0x2d00x1c,count:_0x2d00x1b})}else {return handleError(_0x2d00x12,{message:_0x2d00x1c|| _0x8ab2[72]})}})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[74]]= function(_0x2d00x11,_0x2d00x12){logger[_0x8ab2[76]](_0x8ab2[75]);docExtract(_0x2d00x11,_0x2d00x12,_0x8ab2[77])};exports[_0x8ab2[78]]= function(_0x2d00x11,_0x2d00x12){logger[_0x8ab2[76]](_0x8ab2[79]);docExtract(_0x2d00x11,_0x2d00x12,_0x8ab2[80])};function docExtract(_0x2d00x11,_0x2d00x12,_0x2d00x21){var _0x2d00x16;logger[_0x8ab2[76]](_0x8ab2[81]);DefaultReport[_0x8ab2[38]](_0x8ab2[60])[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]])[_0x8ab2[23]](function(_0x2d00x19){if(!_0x2d00x19){return _0x2d00x12[_0x8ab2[28]](404)};_0x2d00x16= _0x2d00x19;return ReportTree[_0x8ab2[36]](1)})[_0x8ab2[23]](function(_0x2d00x25){_0x2d00x25= JSON[_0x8ab2[93]](_0x2d00x25[_0x8ab2[92]]);var _0x2d00x26=_[_0x8ab2[94]](_0x2d00x25,{id:_0x2d00x16[_0x8ab2[34]]});var _0x2d00x27=getReportPath(_0x2d00x26,_0x2d00x25,_0x2d00x16[_0x8ab2[33]]);logger[_0x8ab2[76]](_0x8ab2[95]);if(_0x2d00x11[_0x8ab2[24]][_0x8ab2[50]]&& _0x2d00x11[_0x8ab2[24]][_0x8ab2[50]]=== _0x8ab2[51]){_0x2d00x11[_0x8ab2[24]][_0x8ab2[52]]= moment()[_0x8ab2[54]](_0x8ab2[53]);_0x2d00x11[_0x8ab2[24]][_0x8ab2[55]]= moment()[_0x8ab2[54]](_0x8ab2[53]);_0x2d00x16[_0x8ab2[56]][_0x8ab2[35]]= _0x2d00x16[_0x8ab2[56]][_0x8ab2[35]][_0x8ab2[59]](_0x8ab2[57],_0x8ab2[58])};delete _0x2d00x11[_0x8ab2[24]][_0x8ab2[50]];return [_0x2d00x16,ExtractedReport[_0x8ab2[101]]({name:_0x2d00x27,startDate:_0x2d00x11[_0x8ab2[24]][_0x8ab2[52]]?_0x2d00x11[_0x8ab2[24]][_0x8ab2[52]]+ (_0x2d00x11[_0x8ab2[24]][_0x8ab2[96]]?_0x8ab2[97]+ _0x2d00x11[_0x8ab2[24]][_0x8ab2[96]]:_0x8ab2[98]):null,endDate:_0x2d00x11[_0x8ab2[24]][_0x8ab2[55]]?_0x2d00x11[_0x8ab2[24]][_0x8ab2[55]]+ (_0x2d00x11[_0x8ab2[24]][_0x8ab2[99]]?_0x8ab2[97]+ _0x2d00x11[_0x8ab2[24]][_0x8ab2[99]]:_0x8ab2[100]):null,output:_0x2d00x21,UserId:_0x2d00x11[_0x8ab2[48]][_0x8ab2[29]]})]})[_0x8ab2[47]](function(_0x2d00x16,_0x2d00x22){logger[_0x8ab2[76]](_0x8ab2[82]+ _0x2d00x21);var _0x2d00x23=cp[_0x8ab2[84]](__dirname+ _0x8ab2[83]);_0x2d00x23[_0x8ab2[86]](_0x8ab2[89],function(_0x2d00x24){logger[_0x8ab2[76]](_0x8ab2[90],_0x2d00x24);_0x2d00x23[_0x8ab2[91]]()})[_0x8ab2[86]](_0x8ab2[87],function(){logger[_0x8ab2[76]](_0x8ab2[88])})[_0x8ab2[86]](_0x8ab2[42],function(_0x2d00x14){logger[_0x8ab2[76]](_0x8ab2[85],_0x2d00x14)});_0x2d00x23[_0x8ab2[21]]({report:_0x2d00x16,query:_0x2d00x11[_0x8ab2[24]],extractedId:_0x2d00x22[_0x8ab2[29]],user:_0x2d00x11[_0x8ab2[48]],type:_0x2d00x21})})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)});return _0x2d00x12[_0x8ab2[28]](200)}function getReportPath(_0x2d00x26,_0x2d00x25,_0x2d00x27){_0x2d00x27= _0x2d00x26[_0x8ab2[102]]+ _0x8ab2[103]+ _0x2d00x27;if(_0x2d00x26[_0x8ab2[34]]=== _0x8ab2[104]){return _0x2d00x27}else {return getReportPath(_[_0x8ab2[94]](_0x2d00x25,{id:_0x2d00x26[_0x8ab2[34]]}),_0x2d00x25,_0x2d00x27)}}exports[_0x8ab2[105]]= function(_0x2d00x11,_0x2d00x12){return DefaultReport[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]],{include:[{all:true}]})[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};return _0x2d00x12[_0x8ab2[21]](_0x2d00x16)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[106]]= function(_0x2d00x11,_0x2d00x12){var _0x2d00x29;return sequelize[_0x8ab2[111]](function(_0x2d00x2a){return DefaultReport[_0x8ab2[38]]({method:[_0x8ab2[37],{DefaultReportId:_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]]}]})[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]])[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};var _0x2d00x2b=_0x2d00x16[_0x8ab2[56]];delete _0x2d00x2b[_0x8ab2[29]];delete _0x2d00x2b[_0x8ab2[107]];delete _0x2d00x2b[_0x8ab2[108]];_0x2d00x2b[_0x8ab2[34]]= _0x2d00x11[_0x8ab2[109]][_0x8ab2[34]];_0x2d00x29= _[_0x8ab2[110]](_0x2d00x2b.Fields,_0x8ab2[56]);return CustomReport[_0x8ab2[101]](_0x2d00x2b,{transaction:_0x2d00x2a})})[_0x8ab2[23]](function(_0x2d00x16){return [_0x2d00x16,_0x2d00x29]})[_0x8ab2[47]](createCopyFields(_0x2d00x2a))})[_0x8ab2[23]](function(){return _0x2d00x12[_0x8ab2[28]](201)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};function createCopyFields(_0x2d00x2a){return function(_0x2d00x16,_0x2d00x2d){if(_0x2d00x2d&& Array[_0x8ab2[62]](_0x2d00x2d)&& _0x2d00x2d[_0x8ab2[63]]){var _0x2d00x2e=reportBuildUtils[_0x8ab2[112]](_0x2d00x16[_0x8ab2[35]]);if(_0x2d00x2e){var _0x2d00x2f;return _0x2d00x2e[_0x8ab2[128]]()[_0x8ab2[23]](function(_0x2d00x30){_0x2d00x2f= _[_0x8ab2[113]](_0x2d00x30);var _0x2d00x31=[];var _0x2d00x32=_[_0x8ab2[115]](_0x2d00x2d,_0x8ab2[114]);_[_0x8ab2[70]](_0x2d00x32,function(_0x2d00x33,_0x2d00x1f){if(_0x2d00x1f!== _0x8ab2[116]&& _0x2d00x1f!== _0x8ab2[117]){_0x2d00x33[0][_0x8ab2[120]][_0x8ab2[119]][_0x8ab2[71]](function(_0x2d00x34){_0x2d00x34[_0x8ab2[118]]= _0x2d00x16[_0x8ab2[29]]});_0x2d00x33[0][_0x8ab2[120]][_0x8ab2[33]]+= _0x8ab2[121]+ sr({length:5});_0x2d00x31[_0x8ab2[122]](Metric[_0x8ab2[101]](_0x2d00x33[0][_0x8ab2[120]][_0x8ab2[56]],{include:[{model:ReportField,as:_0x8ab2[119]}],transaction:_0x2d00x2a}))}else {_0x2d00x33[_0x8ab2[71]](function(_0x2d00x34){if(_[_0x8ab2[124]](_0x2d00x2f,_0x2d00x34[_0x8ab2[123]])|| _0x2d00x34[_0x8ab2[125]]){_0x2d00x34[_0x8ab2[118]]= _0x2d00x16[_0x8ab2[29]];_0x2d00x31[_0x8ab2[122]](ReportField[_0x8ab2[101]](_0x2d00x34,{transaction:_0x2d00x2a}))}else {throw  new sequelize.Error(_0x8ab2[126]+ _0x2d00x34[_0x8ab2[123]]+ _0x8ab2[127])}})}});return _0x2d00x31})[_0x8ab2[45]]()}else {throw  new sequelize.Error(_0x8ab2[129])}}}}exports[_0x8ab2[101]]= function(_0x2d00x11,_0x2d00x12){return DefaultReport[_0x8ab2[101]](_0x2d00x11[_0x8ab2[109]])[_0x8ab2[23]](function(_0x2d00x16){return _0x2d00x12[_0x8ab2[22]](201)[_0x8ab2[21]](_0x2d00x16)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[130]]= function(_0x2d00x11,_0x2d00x12){if(_0x2d00x11[_0x8ab2[109]][_0x8ab2[29]]){delete _0x2d00x11[_0x8ab2[109]][_0x8ab2[29]]};return DefaultReport[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]])[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};var _0x2d00x35=_[_0x8ab2[131]](_0x2d00x16,_0x2d00x11[_0x8ab2[109]]);return _0x2d00x35[_0x8ab2[132]]()})[_0x8ab2[23]](function(_0x2d00x16){return _0x2d00x12[_0x8ab2[22]](200)[_0x8ab2[21]](_0x2d00x16)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};exports[_0x8ab2[133]]= function(_0x2d00x11,_0x2d00x12){return DefaultReport[_0x8ab2[36]](_0x2d00x11[_0x8ab2[30]][_0x8ab2[29]])[_0x8ab2[23]](function(_0x2d00x16){if(!_0x2d00x16){return _0x2d00x12[_0x8ab2[28]](404)};return _0x2d00x16[_0x8ab2[133]]()})[_0x8ab2[23]](function(){return _0x2d00x12[_0x8ab2[28]](204)})[_0x8ab2[20]](function(_0x2d00x14){return handleError(_0x2d00x12,_0x2d00x14)})};function handleError(_0x2d00x12,_0x2d00x14){logger[_0x8ab2[42]](_0x2d00x14[_0x8ab2[41]]);return _0x2d00x12[_0x8ab2[22]](500)[_0x8ab2[21]](_0x2d00x14)}
\ No newline at end of file