Built motion from commit d3d6ca497.|1.0.32
[motion.git] / server / api / default_report / default_report.controller.js
index 6072515..fb5022a 100644 (file)
@@ -1 +1 @@
-var _0xb95c=["\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","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\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","\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"];_0xb95c[0];var _=require(_0xb95c[1]);var util=require(_0xb95c[2]);var DefaultReport=require(_0xb95c[4])[_0xb95c[3]];var ReportField=require(_0xb95c[4])[_0xb95c[5]];var Metric=require(_0xb95c[4])[_0xb95c[6]];var sequelize=require(_0xb95c[4])[_0xb95c[7]];var CustomReport=require(_0xb95c[4])[_0xb95c[8]];var ExtractedReport=require(_0xb95c[4])[_0xb95c[9]];var extractUtils=require(_0xb95c[10]);var reportBuildUtils=require(_0xb95c[11]);var Util=require(_0xb95c[12]);var moment=require(_0xb95c[13]);var cp=require(_0xb95c[14]);var sr=require(_0xb95c[15]);var ReportTree=require(_0xb95c[4])[_0xb95c[16]];exports[_0xb95c[17]]= function(_0xeedex10,_0xeedex11,_0xeedex12){return DefaultReport[_0xb95c[24]](Util[_0xb95c[23]](_0xeedex10[_0xb95c[22]]))[_0xb95c[21]](function(_0xeedex14){_0xeedex11[_0xb95c[20]](200)[_0xb95c[19]](_0xeedex14)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[25]]= function(_0xeedex10,_0xeedex11){return DefaultReport[_0xb95c[36]]({method:[_0xb95c[35],{DefaultReportId:_0xeedex10[_0xb95c[28]][_0xb95c[27]]}]})[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]],{attributes:[_0xb95c[29],_0xb95c[30],_0xb95c[31],_0xb95c[32],_0xb95c[33]]})[_0xb95c[21]](function(_0xeedex15){if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};return _0xeedex11[_0xb95c[19]](_0xeedex15)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[37]]= function(_0xeedex10,_0xeedex11){return Promise[_0xb95c[42]]([])[_0xb95c[21]](getQuery(_0xeedex10,_0xeedex11))[_0xb95c[21]](function(_0xeedex16){if(_0xeedex16){switch(_0xeedex16){case _0xb95c[41]:_0xeedex16= _0xb95c[40];break;default:}};_0xeedex11[_0xb95c[20]](200)[_0xb95c[19]]({query:_0xeedex16})})[_0xb95c[18]](function(_0xeedex13){console[_0xb95c[39]](_0xb95c[38],_0xeedex13)})};function getQuery(_0xeedex10,_0xeedex11){var _0xeedex18;return function(){return DefaultReport[_0xb95c[36]](_0xb95c[58])[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]])[_0xb95c[21]](function(_0xeedex15){console[_0xb95c[39]](_0xb95c[47]);if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};if(_0xeedex10[_0xb95c[22]][_0xb95c[48]]&& _0xeedex10[_0xb95c[22]][_0xb95c[48]]=== _0xb95c[49]){_0xeedex10[_0xb95c[22]][_0xb95c[50]]= moment()[_0xb95c[52]](_0xb95c[51]);_0xeedex10[_0xb95c[22]][_0xb95c[53]]= moment()[_0xb95c[52]](_0xb95c[51]);_0xeedex15[_0xb95c[54]][_0xb95c[33]]= _0xeedex15[_0xb95c[54]][_0xb95c[33]][_0xb95c[57]](_0xb95c[55],_0xb95c[56])};delete _0xeedex10[_0xb95c[22]][_0xb95c[48]];_0xeedex18= _0xeedex15[_0xb95c[54]];return _0xeedex18[_0xb95c[33]]})[_0xb95c[21]](reportBuildUtils[_0xb95c[46]](_0xeedex10[_0xb95c[45]]))[_0xb95c[21]](function(_0xeedex19){return [_0xeedex19,_0xeedex18]})[_0xb95c[44]](reportBuildUtils[_0xb95c[43]](_0xeedex10[_0xb95c[22]]))}}exports[_0xb95c[59]]= function(_0xeedex10,_0xeedex11){var _0xeedex1a;return Promise[_0xb95c[42]]([])[_0xb95c[21]](getQuery(_0xeedex10,_0xeedex11))[_0xb95c[21]](reportBuildUtils[_0xb95c[71]]())[_0xb95c[21]](function(_0xeedex1b){if(_0xeedex1b&& _[_0xb95c[60]](_0xeedex1b)){_0xeedex1a= _0xeedex1b[_0xb95c[61]];if(_0xeedex10[_0xb95c[22]][_0xb95c[62]]){_0xeedex1b= _(_0xeedex1b)[_0xb95c[66]](_0xeedex10[_0xb95c[22]][_0xb95c[65]]|| 0)[_0xb95c[64]](_0xeedex10[_0xb95c[22]][_0xb95c[62]])[_0xb95c[63]]()};_[_0xb95c[69]](_0xeedex1b,function(_0xeedex1c){_[_0xb95c[68]](_0xeedex1c,function(_0xeedex1d,_0xeedex1e){if(_0xeedex1d instanceof  Date){_0xeedex1c[_0xeedex1e]= moment(_0xeedex1d)[_0xb95c[52]](_0xb95c[67]).toString()}})});_0xeedex11[_0xb95c[20]](200)[_0xb95c[19]]({rows:_0xeedex1b,count:_0xeedex1a})}else {return handleError(_0xeedex11,{message:_0xeedex1b|| _0xb95c[70]})}})[_0xb95c[18]](function(_0xeedex13){console[_0xb95c[39]](_0xeedex13);return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[72]]= function(_0xeedex10,_0xeedex11){docExtract(_0xeedex10,_0xeedex11,_0xb95c[73])};exports[_0xb95c[74]]= function(_0xeedex10,_0xeedex11){docExtract(_0xeedex10,_0xeedex11,_0xb95c[75])};function docExtract(_0xeedex10,_0xeedex11,_0xeedex20){var _0xeedex15;DefaultReport[_0xb95c[36]](_0xb95c[58])[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]])[_0xb95c[21]](function(_0xeedex18){if(!_0xeedex18){return _0xeedex11[_0xb95c[26]](404)};_0xeedex15= _0xeedex18;return ReportTree[_0xb95c[34]](1)})[_0xb95c[21]](function(_0xeedex24){_0xeedex24= JSON[_0xb95c[87]](_0xeedex24[_0xb95c[86]]);var _0xeedex25=_[_0xb95c[88]](_0xeedex24,{id:_0xeedex15[_0xb95c[32]]});var _0xeedex26=getReportPath(_0xeedex25,_0xeedex24,_0xeedex15[_0xb95c[31]]);if(_0xeedex10[_0xb95c[22]][_0xb95c[48]]&& _0xeedex10[_0xb95c[22]][_0xb95c[48]]=== _0xb95c[49]){_0xeedex10[_0xb95c[22]][_0xb95c[50]]= moment()[_0xb95c[52]](_0xb95c[51]);_0xeedex10[_0xb95c[22]][_0xb95c[53]]= moment()[_0xb95c[52]](_0xb95c[51]);_0xeedex15[_0xb95c[54]][_0xb95c[33]]= _0xeedex15[_0xb95c[54]][_0xb95c[33]][_0xb95c[57]](_0xb95c[55],_0xb95c[56])};delete _0xeedex10[_0xb95c[22]][_0xb95c[48]];return [_0xeedex15,ExtractedReport[_0xb95c[94]]({name:_0xeedex26,startDate:_0xeedex10[_0xb95c[22]][_0xb95c[50]]?_0xeedex10[_0xb95c[22]][_0xb95c[50]]+ (_0xeedex10[_0xb95c[22]][_0xb95c[89]]?_0xb95c[90]+ _0xeedex10[_0xb95c[22]][_0xb95c[89]]:_0xb95c[91]):null,endDate:_0xeedex10[_0xb95c[22]][_0xb95c[53]]?_0xeedex10[_0xb95c[22]][_0xb95c[53]]+ (_0xeedex10[_0xb95c[22]][_0xb95c[92]]?_0xb95c[90]+ _0xeedex10[_0xb95c[22]][_0xb95c[92]]:_0xb95c[93]):null,output:_0xeedex20,UserId:_0xeedex10[_0xb95c[45]][_0xb95c[27]]})]})[_0xb95c[44]](function(_0xeedex15,_0xeedex21){var _0xeedex22=cp[_0xb95c[77]](__dirname+ _0xb95c[76]);_0xeedex22[_0xb95c[80]](_0xb95c[83],function(_0xeedex23){console[_0xb95c[39]](_0xb95c[84],_0xeedex23);_0xeedex22[_0xb95c[85]]()})[_0xb95c[80]](_0xb95c[81],function(){console[_0xb95c[39]](_0xb95c[82])})[_0xb95c[80]](_0xb95c[78],function(_0xeedex13){console[_0xb95c[39]](_0xb95c[79],_0xeedex13)});_0xeedex22[_0xb95c[19]]({report:_0xeedex15,query:_0xeedex10[_0xb95c[22]],extractedId:_0xeedex21[_0xb95c[27]],user:_0xeedex10[_0xb95c[45]],type:_0xeedex20})})[_0xb95c[18]](function(_0xeedex13){console[_0xb95c[39]](_0xeedex13);return handleError(_0xeedex11,_0xeedex13)});return _0xeedex11[_0xb95c[26]](200)}function getReportPath(_0xeedex25,_0xeedex24,_0xeedex26){_0xeedex26= _0xeedex25[_0xb95c[95]]+ _0xb95c[96]+ _0xeedex26;if(_0xeedex25[_0xb95c[32]]=== _0xb95c[97]){return _0xeedex26}else {return getReportPath(_[_0xb95c[88]](_0xeedex24,{id:_0xeedex25[_0xb95c[32]]}),_0xeedex24,_0xeedex26)}}function getConditions(_0xeedex29){if(!_0xeedex29){return _0xb95c[56]};for(var _0xeedex2a=_0xb95c[98],_0xeedex2b=0;_0xeedex2b< _0xeedex29[_0xb95c[99]][_0xb95c[61]];_0xeedex2b++){_0xeedex2b> 0&& (_0xeedex2a+= _0xb95c[90]+ _0xeedex29[_0xb95c[100]]+ _0xb95c[90]);_0xeedex2a+= _0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[101]]?getConditions(_0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[101]]):_0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[102]]+ _0xb95c[90]+ _0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[103]]+ _0xb95c[104]+ (_0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[103]]=== _0xb95c[105]?_0xb95c[106]+ _0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[63]]+ _0xb95c[106]:_0xeedex29[_0xb95c[99]][_0xeedex2b][_0xb95c[63]])+ _0xb95c[107]};return _0xeedex2a+ _0xb95c[108]}exports[_0xb95c[109]]= function(_0xeedex10,_0xeedex11){return DefaultReport[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]],{include:[{all:true}]})[_0xb95c[21]](function(_0xeedex15){if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};return _0xeedex11[_0xb95c[19]](_0xeedex15)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[110]]= function(_0xeedex10,_0xeedex11){var _0xeedex2c;return sequelize[_0xb95c[115]](function(_0xeedex2d){return DefaultReport[_0xb95c[36]]({method:[_0xb95c[35],{DefaultReportId:_0xeedex10[_0xb95c[28]][_0xb95c[27]]}]})[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]])[_0xb95c[21]](function(_0xeedex15){if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};var _0xeedex2e=_0xeedex15[_0xb95c[54]];console[_0xb95c[39]](_0xeedex2e);delete _0xeedex2e[_0xb95c[27]];delete _0xeedex2e[_0xb95c[111]];delete _0xeedex2e[_0xb95c[112]];_0xeedex2e[_0xb95c[32]]= _0xeedex10[_0xb95c[113]][_0xb95c[32]];_0xeedex2c= _[_0xb95c[114]](_0xeedex2e.Fields,_0xb95c[54]);return CustomReport[_0xb95c[94]](_0xeedex2e,{transaction:_0xeedex2d})})[_0xb95c[21]](function(_0xeedex15){return [_0xeedex15,_0xeedex2c]})[_0xb95c[44]](createCopyFields(_0xeedex2d))})[_0xb95c[21]](function(){return _0xeedex11[_0xb95c[26]](201)})[_0xb95c[18]](function(_0xeedex13){console[_0xb95c[39]](_0xeedex13);return handleError(_0xeedex11,_0xeedex13)})};function createCopyFields(_0xeedex2d){return function(_0xeedex15,_0xeedex30){if(_0xeedex30&& Array[_0xb95c[60]](_0xeedex30)&& _0xeedex30[_0xb95c[61]]){var _0xeedex31=reportBuildUtils[_0xb95c[116]](_0xeedex15[_0xb95c[33]]);if(_0xeedex31){var _0xeedex32;return _0xeedex31[_0xb95c[131]]()[_0xb95c[21]](function(_0xeedex33){_0xeedex32= _[_0xb95c[117]](_0xeedex33);var _0xeedex34=[];var _0xeedex35=_[_0xb95c[119]](_0xeedex30,_0xb95c[118]);_[_0xb95c[68]](_0xeedex35,function(_0xeedex36,_0xeedex1e){if(_0xeedex1e!== _0xb95c[120]&& _0xeedex1e!== _0xb95c[121]){_0xeedex36[0][_0xb95c[124]][_0xb95c[123]][_0xb95c[69]](function(_0xeedex37){_0xeedex37[_0xb95c[122]]= _0xeedex15[_0xb95c[27]]});_0xeedex36[0][_0xb95c[124]][_0xb95c[31]]+= _0xb95c[125]+ sr({length:5});_0xeedex34[_0xb95c[126]](Metric[_0xb95c[94]](_0xeedex36[0][_0xb95c[124]][_0xb95c[54]],{include:[{model:ReportField,as:_0xb95c[123]}],transaction:_0xeedex2d}))}else {_0xeedex36[_0xb95c[69]](function(_0xeedex37){if(_[_0xb95c[127]](_0xeedex32,_0xeedex37[_0xb95c[102]])|| _0xeedex37[_0xb95c[128]]){_0xeedex37[_0xb95c[122]]= _0xeedex15[_0xb95c[27]];_0xeedex34[_0xb95c[126]](ReportField[_0xb95c[94]](_0xeedex37,{transaction:_0xeedex2d}))}else {throw  new sequelize.Error(_0xb95c[129]+ _0xeedex37[_0xb95c[102]]+ _0xb95c[130])}})}});return _0xeedex34})[_0xb95c[42]]()}else {throw  new sequelize.Error(_0xb95c[132])}}}}exports[_0xb95c[94]]= function(_0xeedex10,_0xeedex11){return DefaultReport[_0xb95c[94]](_0xeedex10[_0xb95c[113]])[_0xb95c[21]](function(_0xeedex15){return _0xeedex11[_0xb95c[20]](201)[_0xb95c[19]](_0xeedex15)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[133]]= function(_0xeedex10,_0xeedex11){if(_0xeedex10[_0xb95c[113]][_0xb95c[27]]){delete _0xeedex10[_0xb95c[113]][_0xb95c[27]]};return DefaultReport[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]])[_0xb95c[21]](function(_0xeedex15){if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};var _0xeedex38=_[_0xb95c[134]](_0xeedex15,_0xeedex10[_0xb95c[113]]);return _0xeedex38[_0xb95c[135]]()})[_0xb95c[21]](function(_0xeedex15){return _0xeedex11[_0xb95c[20]](200)[_0xb95c[19]](_0xeedex15)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};exports[_0xb95c[136]]= function(_0xeedex10,_0xeedex11){return DefaultReport[_0xb95c[34]](_0xeedex10[_0xb95c[28]][_0xb95c[27]])[_0xb95c[21]](function(_0xeedex15){if(!_0xeedex15){return _0xeedex11[_0xb95c[26]](404)};return _0xeedex15[_0xb95c[136]]()})[_0xb95c[21]](function(){return _0xeedex11[_0xb95c[26]](204)})[_0xb95c[18]](function(_0xeedex13){return handleError(_0xeedex11,_0xeedex13)})};function handleError(_0xeedex11,_0xeedex13){return _0xeedex11[_0xb95c[20]](500)[_0xb95c[19]](_0xeedex13)}
\ No newline at end of file
+var _0x5959=["\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"];_0x5959[0];var _=require(_0x5959[1]);var util=require(_0x5959[2]);var DefaultReport=require(_0x5959[4])[_0x5959[3]];var ReportField=require(_0x5959[4])[_0x5959[5]];var Metric=require(_0x5959[4])[_0x5959[6]];var sequelize=require(_0x5959[4])[_0x5959[7]];var CustomReport=require(_0x5959[4])[_0x5959[8]];var ExtractedReport=require(_0x5959[4])[_0x5959[9]];var extractUtils=require(_0x5959[10]);var reportBuildUtils=require(_0x5959[11]);var Util=require(_0x5959[12]);var moment=require(_0x5959[13]);var cp=require(_0x5959[14]);var sr=require(_0x5959[15]);var ReportTree=require(_0x5959[4])[_0x5959[16]];var logger=require(_0x5959[18])(_0x5959[17]);exports[_0x5959[19]]= function(_0x49bax11,_0x49bax12,_0x49bax13){return DefaultReport[_0x5959[26]](Util[_0x5959[25]](_0x49bax11[_0x5959[24]]))[_0x5959[23]](function(_0x49bax15){_0x49bax12[_0x5959[22]](200)[_0x5959[21]](_0x49bax15)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[27]]= function(_0x49bax11,_0x49bax12){return DefaultReport[_0x5959[38]]({method:[_0x5959[37],{DefaultReportId:_0x49bax11[_0x5959[30]][_0x5959[29]]}]})[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]],{attributes:[_0x5959[31],_0x5959[32],_0x5959[33],_0x5959[34],_0x5959[35]]})[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};return _0x49bax12[_0x5959[21]](_0x49bax16)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[39]]= function(_0x49bax11,_0x49bax12){return Promise[_0x5959[45]]([])[_0x5959[23]](getQuery(_0x49bax11,_0x49bax12))[_0x5959[23]](function(_0x49bax17){if(_0x49bax17){switch(_0x49bax17){case _0x5959[44]:_0x49bax17= _0x5959[43];break;default:}};_0x49bax12[_0x5959[22]](200)[_0x5959[21]]({query:_0x49bax17})})[_0x5959[20]](function(_0x49bax14){logger[_0x5959[42]](_0x5959[40],_0x49bax14[_0x5959[41]])})};function getQuery(_0x49bax11,_0x49bax12){var _0x49bax19;return function(){return DefaultReport[_0x5959[38]](_0x5959[60])[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]])[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};if(_0x49bax11[_0x5959[24]][_0x5959[50]]&& _0x49bax11[_0x5959[24]][_0x5959[50]]=== _0x5959[51]){_0x49bax11[_0x5959[24]][_0x5959[52]]= moment()[_0x5959[54]](_0x5959[53]);_0x49bax11[_0x5959[24]][_0x5959[55]]= moment()[_0x5959[54]](_0x5959[53]);_0x49bax16[_0x5959[56]][_0x5959[35]]= _0x49bax16[_0x5959[56]][_0x5959[35]][_0x5959[59]](_0x5959[57],_0x5959[58])};delete _0x49bax11[_0x5959[24]][_0x5959[50]];_0x49bax19= _0x49bax16[_0x5959[56]];return _0x49bax19[_0x5959[35]]})[_0x5959[23]](reportBuildUtils[_0x5959[49]](_0x49bax11[_0x5959[48]]))[_0x5959[23]](function(_0x49bax1a){return [_0x49bax1a,_0x49bax19]})[_0x5959[47]](reportBuildUtils[_0x5959[46]](_0x49bax11[_0x5959[24]]))}}exports[_0x5959[61]]= function(_0x49bax11,_0x49bax12){var _0x49bax1b;return Promise[_0x5959[45]]([])[_0x5959[23]](getQuery(_0x49bax11,_0x49bax12))[_0x5959[23]](reportBuildUtils[_0x5959[73]]())[_0x5959[23]](function(_0x49bax1c){if(_0x49bax1c&& _[_0x5959[62]](_0x49bax1c)){_0x49bax1b= _0x49bax1c[_0x5959[63]];if(_0x49bax11[_0x5959[24]][_0x5959[64]]){_0x49bax1c= _(_0x49bax1c)[_0x5959[68]](_0x49bax11[_0x5959[24]][_0x5959[67]]|| 0)[_0x5959[66]](_0x49bax11[_0x5959[24]][_0x5959[64]])[_0x5959[65]]()};_[_0x5959[71]](_0x49bax1c,function(_0x49bax1d){_[_0x5959[70]](_0x49bax1d,function(_0x49bax1e,_0x49bax1f){if(_0x49bax1e instanceof  Date){_0x49bax1d[_0x49bax1f]= moment(_0x49bax1e)[_0x5959[54]](_0x5959[69]).toString()}})});_0x49bax12[_0x5959[22]](200)[_0x5959[21]]({rows:_0x49bax1c,count:_0x49bax1b})}else {return handleError(_0x49bax12,{message:_0x49bax1c|| _0x5959[72]})}})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[74]]= function(_0x49bax11,_0x49bax12){logger[_0x5959[76]](_0x5959[75]);docExtract(_0x49bax11,_0x49bax12,_0x5959[77])};exports[_0x5959[78]]= function(_0x49bax11,_0x49bax12){logger[_0x5959[76]](_0x5959[79]);docExtract(_0x49bax11,_0x49bax12,_0x5959[80])};function docExtract(_0x49bax11,_0x49bax12,_0x49bax21){var _0x49bax16;logger[_0x5959[76]](_0x5959[81]);DefaultReport[_0x5959[38]](_0x5959[60])[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]])[_0x5959[23]](function(_0x49bax19){if(!_0x49bax19){return _0x49bax12[_0x5959[28]](404)};_0x49bax16= _0x49bax19;return ReportTree[_0x5959[36]](1)})[_0x5959[23]](function(_0x49bax25){_0x49bax25= JSON[_0x5959[93]](_0x49bax25[_0x5959[92]]);var _0x49bax26=_[_0x5959[94]](_0x49bax25,{id:_0x49bax16[_0x5959[34]]});var _0x49bax27=getReportPath(_0x49bax26,_0x49bax25,_0x49bax16[_0x5959[33]]);logger[_0x5959[76]](_0x5959[95]);if(_0x49bax11[_0x5959[24]][_0x5959[50]]&& _0x49bax11[_0x5959[24]][_0x5959[50]]=== _0x5959[51]){_0x49bax11[_0x5959[24]][_0x5959[52]]= moment()[_0x5959[54]](_0x5959[53]);_0x49bax11[_0x5959[24]][_0x5959[55]]= moment()[_0x5959[54]](_0x5959[53]);_0x49bax16[_0x5959[56]][_0x5959[35]]= _0x49bax16[_0x5959[56]][_0x5959[35]][_0x5959[59]](_0x5959[57],_0x5959[58])};delete _0x49bax11[_0x5959[24]][_0x5959[50]];return [_0x49bax16,ExtractedReport[_0x5959[101]]({name:_0x49bax27,startDate:_0x49bax11[_0x5959[24]][_0x5959[52]]?_0x49bax11[_0x5959[24]][_0x5959[52]]+ (_0x49bax11[_0x5959[24]][_0x5959[96]]?_0x5959[97]+ _0x49bax11[_0x5959[24]][_0x5959[96]]:_0x5959[98]):null,endDate:_0x49bax11[_0x5959[24]][_0x5959[55]]?_0x49bax11[_0x5959[24]][_0x5959[55]]+ (_0x49bax11[_0x5959[24]][_0x5959[99]]?_0x5959[97]+ _0x49bax11[_0x5959[24]][_0x5959[99]]:_0x5959[100]):null,output:_0x49bax21,UserId:_0x49bax11[_0x5959[48]][_0x5959[29]]})]})[_0x5959[47]](function(_0x49bax16,_0x49bax22){logger[_0x5959[76]](_0x5959[82]+ _0x49bax21);var _0x49bax23=cp[_0x5959[84]](__dirname+ _0x5959[83]);_0x49bax23[_0x5959[86]](_0x5959[89],function(_0x49bax24){logger[_0x5959[76]](_0x5959[90],_0x49bax24);_0x49bax23[_0x5959[91]]()})[_0x5959[86]](_0x5959[87],function(){logger[_0x5959[76]](_0x5959[88])})[_0x5959[86]](_0x5959[42],function(_0x49bax14){logger[_0x5959[76]](_0x5959[85],_0x49bax14)});_0x49bax23[_0x5959[21]]({report:_0x49bax16,query:_0x49bax11[_0x5959[24]],extractedId:_0x49bax22[_0x5959[29]],user:_0x49bax11[_0x5959[48]],type:_0x49bax21})})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)});return _0x49bax12[_0x5959[28]](200)}function getReportPath(_0x49bax26,_0x49bax25,_0x49bax27){_0x49bax27= _0x49bax26[_0x5959[102]]+ _0x5959[103]+ _0x49bax27;if(_0x49bax26[_0x5959[34]]=== _0x5959[104]){return _0x49bax27}else {return getReportPath(_[_0x5959[94]](_0x49bax25,{id:_0x49bax26[_0x5959[34]]}),_0x49bax25,_0x49bax27)}}exports[_0x5959[105]]= function(_0x49bax11,_0x49bax12){return DefaultReport[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]],{include:[{all:true}]})[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};return _0x49bax12[_0x5959[21]](_0x49bax16)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[106]]= function(_0x49bax11,_0x49bax12){var _0x49bax29;return sequelize[_0x5959[111]](function(_0x49bax2a){return DefaultReport[_0x5959[38]]({method:[_0x5959[37],{DefaultReportId:_0x49bax11[_0x5959[30]][_0x5959[29]]}]})[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]])[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};var _0x49bax2b=_0x49bax16[_0x5959[56]];delete _0x49bax2b[_0x5959[29]];delete _0x49bax2b[_0x5959[107]];delete _0x49bax2b[_0x5959[108]];_0x49bax2b[_0x5959[34]]= _0x49bax11[_0x5959[109]][_0x5959[34]];_0x49bax29= _[_0x5959[110]](_0x49bax2b.Fields,_0x5959[56]);return CustomReport[_0x5959[101]](_0x49bax2b,{transaction:_0x49bax2a})})[_0x5959[23]](function(_0x49bax16){return [_0x49bax16,_0x49bax29]})[_0x5959[47]](createCopyFields(_0x49bax2a))})[_0x5959[23]](function(){return _0x49bax12[_0x5959[28]](201)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};function createCopyFields(_0x49bax2a){return function(_0x49bax16,_0x49bax2d){if(_0x49bax2d&& Array[_0x5959[62]](_0x49bax2d)&& _0x49bax2d[_0x5959[63]]){var _0x49bax2e=reportBuildUtils[_0x5959[112]](_0x49bax16[_0x5959[35]]);if(_0x49bax2e){var _0x49bax2f;return _0x49bax2e[_0x5959[128]]()[_0x5959[23]](function(_0x49bax30){_0x49bax2f= _[_0x5959[113]](_0x49bax30);var _0x49bax31=[];var _0x49bax32=_[_0x5959[115]](_0x49bax2d,_0x5959[114]);_[_0x5959[70]](_0x49bax32,function(_0x49bax33,_0x49bax1f){if(_0x49bax1f!== _0x5959[116]&& _0x49bax1f!== _0x5959[117]){_0x49bax33[0][_0x5959[120]][_0x5959[119]][_0x5959[71]](function(_0x49bax34){_0x49bax34[_0x5959[118]]= _0x49bax16[_0x5959[29]]});_0x49bax33[0][_0x5959[120]][_0x5959[33]]+= _0x5959[121]+ sr({length:5});_0x49bax31[_0x5959[122]](Metric[_0x5959[101]](_0x49bax33[0][_0x5959[120]][_0x5959[56]],{include:[{model:ReportField,as:_0x5959[119]}],transaction:_0x49bax2a}))}else {_0x49bax33[_0x5959[71]](function(_0x49bax34){if(_[_0x5959[124]](_0x49bax2f,_0x49bax34[_0x5959[123]])|| _0x49bax34[_0x5959[125]]){_0x49bax34[_0x5959[118]]= _0x49bax16[_0x5959[29]];_0x49bax31[_0x5959[122]](ReportField[_0x5959[101]](_0x49bax34,{transaction:_0x49bax2a}))}else {throw  new sequelize.Error(_0x5959[126]+ _0x49bax34[_0x5959[123]]+ _0x5959[127])}})}});return _0x49bax31})[_0x5959[45]]()}else {throw  new sequelize.Error(_0x5959[129])}}}}exports[_0x5959[101]]= function(_0x49bax11,_0x49bax12){return DefaultReport[_0x5959[101]](_0x49bax11[_0x5959[109]])[_0x5959[23]](function(_0x49bax16){return _0x49bax12[_0x5959[22]](201)[_0x5959[21]](_0x49bax16)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[130]]= function(_0x49bax11,_0x49bax12){if(_0x49bax11[_0x5959[109]][_0x5959[29]]){delete _0x49bax11[_0x5959[109]][_0x5959[29]]};return DefaultReport[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]])[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};var _0x49bax35=_[_0x5959[131]](_0x49bax16,_0x49bax11[_0x5959[109]]);return _0x49bax35[_0x5959[132]]()})[_0x5959[23]](function(_0x49bax16){return _0x49bax12[_0x5959[22]](200)[_0x5959[21]](_0x49bax16)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};exports[_0x5959[133]]= function(_0x49bax11,_0x49bax12){return DefaultReport[_0x5959[36]](_0x49bax11[_0x5959[30]][_0x5959[29]])[_0x5959[23]](function(_0x49bax16){if(!_0x49bax16){return _0x49bax12[_0x5959[28]](404)};return _0x49bax16[_0x5959[133]]()})[_0x5959[23]](function(){return _0x49bax12[_0x5959[28]](204)})[_0x5959[20]](function(_0x49bax14){return handleError(_0x49bax12,_0x49bax14)})};function handleError(_0x49bax12,_0x49bax14){logger[_0x5959[42]](_0x49bax14[_0x5959[41]]);return _0x49bax12[_0x5959[22]](500)[_0x5959[21]](_0x49bax14)}
\ No newline at end of file