function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }

function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }

function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }

function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }

function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }

function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }

function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }

function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }

function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }

function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["src-app-pages-home-home-nsm-page-average-report-request-detail-request-detail-module"], {
  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.html":
  /*!********************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.html ***!
    \********************************************************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _node_modules_rawLoader_dist_cjsJs_src_app_pages_home_homeNsm_pageAverageReport_requestDetail_requestDetailComponentHtml(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "<div class=\"request-detail-container\">\n    <div class=\"loading-indicator\" *ngIf=\"busy\">\n        <p-progressSpinner [style]=\"{width: '50px', height: '50px'}\" strokeWidth=\"4\">\n        </p-progressSpinner>\n    </div>\n\n    <div class=\" p-col-12\">\n        <p-panel>\n            <p-header>\n                <div class=\"p-grid p-justify-between  p-nogutter p-align-center\">\n                    <div class=\"p-col\">\n                        <label>Request Page Details</label>\n                        <span *ngIf=\"queryParams.requestType == 0\" class=\"pr-10\">(Aggregated)</span>\n                        <span *ngIf=\"queryParams.requestType == 1\" class=\"p-10\">Page Start Time:\n                            {{data?.runTime}}</span>\n                        <span *ngIf=\"data?.browserType\">Browser:\n                            {{data?.browserType +'('+data?.browserVersion+')'}}\n                        </span>\n                    </div>\n                    <div class=\"p-col p-grid p-justify-end p-align-center\">\n                        <button pButton type=\"button\" label=\"Content Statistics\"\n                            class=\"ui-button-rounded ui-button-secondary mr-5\"\n                            (click)=\"viewContentStatistics()\"></button>\n                        <button pButton type=\"button\" label=\"Waterfall\"\n                            class=\"ui-button-rounded ui-button-secondary mr-5\" (click)=\"viewWaterfall()\"></button>\n                        <button pButton type=\"button\" label=\"Page Score Report\"\n                            class=\"ui-button-rounded ui-button-secondary mr-5\" (click)=\"viewPageSpeedReport()\"></button>\n                    </div>\n                </div>\n            </p-header>\n            <div class=\"p-col-12\">\n                <cav-table #dt [value]=\"REQUEST_PAGE_DETAIL.data\" [headerRelativePath]=\"headerRelativePathReq\"  [responsive]=\"true\" [lazyLoadingProcessBar]=\"loading\" [scrollable]=\"true\" ></cav-table>\n            </div>\n\n\n            <div class=\"p-grid\">\n                <p-card class=\"p-col cord-body-height\">\n                    <p-header>\n                        Top\n                        <p-inputNumber [(ngModel)]=\"topBottleneckCount\" mode=\"decimal\" [useGrouping]=\"false\" [min]=\"1\"\n                            [size]=\"4\" (ngModelChange)=\"onTopCountChange()\">\n                        </p-inputNumber>\n                        Bottlenecks\n                        <!-- <button pButton type=\"button\" label=\"View\" class=\"ui-button-rounded\"\n                            (click)=\"onTopCountChange()\"></button> -->\n                    </p-header>\n\n                    <div class=\"p-grid\">\n                        <div class=\"p-col\" [style.height.px]=\"bottleneckGraphHeight\">\n                            <app-chart [data]=\"charts[0]\" [setChart]=\"charts[0]\" [loading]=\"busy\"></app-chart>\n                        </div>\n                        <div class=\"p-col\" [style.height.px]=\"bottleneckGraphHeight\">\n                            <app-chart [data]=\"charts[1]\" [setChart]=\"charts[1]\" [loading]=\"busy\"></app-chart>\n                        </div>\n                        <div class=\"p-col\" [style.height.px]=\"bottleneckGraphHeight\">\n                            <app-chart [data]=\"charts[2]\" [setChart]=\"charts[2]\" [loading]=\"busy\"></app-chart>\n                        </div>\n                    </div>\n                    <div class=\"p-grid\">\n                        <div class=\"p-col\" [style.height.px]=\"bottleneckGraphHeight\">\n                            <app-chart [data]=\"charts[3]\" [setChart]=\"charts[3]\" [loading]=\"busy\"></app-chart>\n                        </div>\n                        <div class=\"p-col\" [style.height.px]=\"bottleneckGraphHeight\">\n                            <app-chart [data]=\"charts[4]\" [setChart]=\"charts[4]\" [loading]=\"busy\"></app-chart>\n                        </div>\n                    </div>\n                </p-card>\n            </div>\n            \n            <div class=\"p-col-12\">\n                <cav-table #dt [value]=\"data?.json\" [headerRelativePath]=\"headerRelativePath\" [paginator]=\"true\"  [responsive]=\"true\"   [rows]=\"REQUEST_DETAIL.paginator.rows\" [lazyLoadingProcessBar]=\"loading\" [scrollable]=\"true\" scrollHeight=\"calc(100vh - 285px)\"></cav-table>\n            </div>\n        </p-panel>\n    </div>\n\n    <p-menu #exportMenu [popup]=\"true\" [model]=\"exportItems\" appendTo=\"body\"></p-menu>\n</div>\n";
    /***/
  },

  /***/
  "./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.scss":
  /*!******************************************************************************************************!*\
    !*** ./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.scss ***!
    \******************************************************************************************************/

  /*! exports provided: default */

  /***/
  function _src_app_pages_home_homeNsm_pageAverageReport_requestDetail_requestDetailComponentScss(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony default export */


    __webpack_exports__["default"] = "app-request-detail .request-detail-container {\n  /* Transparent Overlay */\n}\napp-request-detail .request-detail-container .ui-multiselect .ui-multiselect-trigger .ui-multiselect-trigger-icon {\n  font-size: 1.5em;\n}\napp-request-detail .request-detail-container .p-input-icon-left {\n  position: relative;\n  display: inline-block;\n}\napp-request-detail .request-detail-container .p-input-icon-left i {\n  position: absolute;\n  top: 50%;\n  margin-top: -0.5rem;\n  left: 0.25em;\n  color: #71717a;\n}\napp-request-detail .request-detail-container .p-input-icon-left input {\n  padding-left: 1.6em;\n}\napp-request-detail .request-detail-container .loading-indicator {\n  position: fixed;\n  z-index: 999;\n  height: 2em;\n  width: 2em;\n  overflow: show;\n  margin: auto;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n}\napp-request-detail .request-detail-container .loading-indicator:before {\n  content: \"\";\n  display: block;\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.53);\n}\napp-request-detail .request-detail-container .ui-panel .ui-panel-content {\n  height: calc(100vh - 164px);\n  overflow: auto;\n}\napp-request-detail .request-detail-container .ui-card .ui-card-title {\n  font-size: unset;\n  text-transform: unset;\n  font-weight: 700;\n}\napp-request-detail .request-detail-container app-chart .chart-container .chart-body {\n  height: 100%;\n}\napp-request-detail .request-detail-container app-chart .chart-container .chart-body div {\n  height: 100%;\n}\napp-request-detail .request-detail-container .bottleneck .p-col {\n  height: 100%;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.ts":
  /*!****************************************************************************************************!*\
    !*** ./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.ts ***!
    \****************************************************************************************************/

  /*! exports provided: RequestDetailComponent */

  /***/
  function _src_app_pages_home_homeNsm_pageAverageReport_requestDetail_requestDetailComponentTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "RequestDetailComponent", function () {
      return RequestDetailComponent;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common/http */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var src_app_core_breadcrumb_breadcrumb_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! src/app/core/breadcrumb/breadcrumb.service */
    "./src/app/core/breadcrumb/breadcrumb.service.ts");
    /* harmony import */


    var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");
    /* harmony import */


    var src_environments_environment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/environments/environment */
    "./src/environments/environment.ts");
    /* harmony import */


    var _synthetic_monitor_services_nvsm_utility_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../../../synthetic-monitor/services/nvsm-utility.service */
    "./src/app/pages/home/synthetic-monitor/services/nvsm-utility.service.ts");
    /* harmony import */


    var _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ../service/page-average-report.service */
    "./src/app/pages/home/home-nsm/page-average-report/service/page-average-report.service.ts");
    /* harmony import */


    var _service_request_detail_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
    /*! ./service/request-detail.model */
    "./src/app/pages/home/home-nsm/page-average-report/request-detail/service/request-detail.model.ts");
    /* harmony import */


    var lodash__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! lodash */
    "./node_modules/lodash/lodash.js");
    /* harmony import */


    var lodash__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_11__);
    /* harmony import */


    var src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(
    /*! src/app/shared/cav-toast/service/cav-message.service */
    "./src/app/shared/cav-toast/service/cav-message.service.ts");

    var RequestDetailComponent = /*#__PURE__*/function () {
      function RequestDetailComponent(breadcrumb, location, route, router, sessionService, pageAVGService, messageService, nvsmUtility) {
        var _this = this;

        _classCallCheck(this, RequestDetailComponent);

        this.breadcrumb = breadcrumb;
        this.location = location;
        this.route = route;
        this.router = router;
        this.sessionService = sessionService;
        this.pageAVGService = pageAVGService;
        this.messageService = messageService;
        this.nvsmUtility = nvsmUtility;
        this.key = 'request-detail';
        this.REQUEST_PAGE_DETAIL = _service_request_detail_model__WEBPACK_IMPORTED_MODULE_10__["REQUEST_PAGE_DETAIL"];
        this.REQUEST_DETAIL = _service_request_detail_model__WEBPACK_IMPORTED_MODULE_10__["REQUEST_DETAIL"];
        this.charts = _toConsumableArray(_service_request_detail_model__WEBPACK_IMPORTED_MODULE_10__["REQUEST_DETAIL_CHART"]);
        this.topBottleneckCount = 5;
        this.bottleneckGraphHeight = 250;
        this.cols = lodash__WEBPACK_IMPORTED_MODULE_11__["cloneDeep"](this.REQUEST_DETAIL.headers[0].cols);
        this.headerRelativePath = "rbu-reports/request-detail.json";
        this.headerRelativePathReq = "rbu-reports/request-detail-page.json";
        this.exportItems = [{
          label: 'EXCEL',
          icon: 'icons8 icons8-spreadsheet-file',
          command: function command() {
            return _this.downloadReport('excel');
          }
        }, {
          label: 'PDF',
          icon: 'icons8 icons8-pdf-2',
          command: function command() {
            return _this.downloadReport('pdf');
          }
        }, {
          label: 'WORD',
          icon: 'icons8 icons8-word',
          command: function command() {
            return _this.downloadReport('worddoc');
          }
        }];
      }

      return _createClass(RequestDetailComponent, [{
        key: "selectedColumns",
        get: function get() {
          return this._selectedColumns;
        },
        set: function set(value) {
          this._selectedColumns = value;
        }
      }, {
        key: "ngOnInit",
        value: function ngOnInit() {
          var _this2 = this;

          this.route.queryParams.subscribe(function (params) {
            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;

            _this2.queryParams = {
              pageName: (_a = params.pageName) !== null && _a !== void 0 ? _a : 'NA',
              harFileName: (_b = params.harFileName) !== null && _b !== void 0 ? _b : 'NA',
              requestType: (_c = params.requestType) !== null && _c !== void 0 ? _c : 'NA',
              testRun: (_d = params.testRun) !== null && _d !== void 0 ? _d : 'All',
              DOMContentLoadedTime: (_e = params.DOMContentLoadedTime) !== null && _e !== void 0 ? _e : 'NA',
              onload: (_f = params.onload) !== null && _f !== void 0 ? _f : 'NA',
              PageLoadTime: (_g = params.PageLoadTime) !== null && _g !== void 0 ? _g : 'NA',
              NumRequest: (_h = params.Request) !== null && _h !== void 0 ? _h : 'NA',
              ByteReceived: (_j = params.ByteReceived) !== null && _j !== void 0 ? _j : 'NA',
              ByteSend: (_k = params.ByteSend) !== null && _k !== void 0 ? _k : 'NA',
              sourcePageName: (_l = params.sourcePageName) !== null && _l !== void 0 ? _l : 'NA',
              sourceHostName: (_m = params.sourceHostName) !== null && _m !== void 0 ? _m : 'NA',
              productKey: _this2.sessionService.session.cctx.pk,
              reqLimit: (_o = _this2.topBottleneckCount) !== null && _o !== void 0 ? _o : params.reqLimit,
              harFileList: (_p = params.harFileList) !== null && _p !== void 0 ? _p : '',
              sesLoginName: _this2.sessionService.session.cctx.u,
              strOperName: (_q = params.strOperName) !== null && _q !== void 0 ? _q : ''
            };
            _this2.TestRun = (_r = _this2.queryParams.testRun) !== null && _r !== void 0 ? _r : "";
            _this2.PageName = (_s = _this2.queryParams.pageName) !== null && _s !== void 0 ? _s : "";

            _this2.setBreadcrumb(params);

            _this2.setDefaultColumnPref();

            _this2.getData();
          });
        }
      }, {
        key: "setBreadcrumb",
        value: function setBreadcrumb(params) {
          this.breadcrumb.addNewBreadcrumb({
            label: 'Request Detail',
            routerLink: '/rbu-report/request-detail',
            queryParams: params
          });
        }
      }, {
        key: "setDefaultColumnPref",
        value: function setDefaultColumnPref() {
          var _this3 = this;

          var path = src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.script.getTablePrefs.endpoint;
          var payload = {
            userName: this.sessionService.session.cctx.u,
            tableNames: new Array("viewRequestDetail")
          };
          this.pageAVGService.getDefaultColumnPreference(path, payload).subscribe(function (state) {
            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadedState"]) {
              var data = state.data.data;
              var preferedCols = data != null ? state.data.data[0].defaultColumns : null;

              if (preferedCols != null) {
                _this3.cols.forEach(function (col) {
                  var field = col.field;

                  if (preferedCols.includes(field)) {
                    col.selected = true;
                  } else col.selected = false;
                });
              }

              _this3.selectedColumns = _this3.cols.filter(function (col) {
                return col.selected;
              });
            }
          }, function (state) {
            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadingErrorState"]) {
              _this3.error = state.error;
              console.log("Error in getting default column configuration ", _this3.error);
            }
          });
        }
      }, {
        key: "getData",
        value: function getData() {
          var _this4 = this;

          var url = "".concat(src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.detailedReport.rptHarRequestDetail.endpoint, "?testRun=").concat(this.queryParams.testRun, "&pageName=").concat(this.queryParams.pageName, "&harFileName=").concat(this.queryParams.harFileName, "&reqLimit=").concat(this.queryParams.reqLimit, "&productKey=").concat(this.queryParams.productKey, "&sesLoginName=").concat(this.queryParams.sesLoginName, "&strOperName=").concat(this.queryParams.strOperName);
          var tmp = JSON.parse(JSON.stringify(this.charts));
          this.charts.forEach(function (chart, i) {
            return chart = null;
          });
          var param = {
            harfilesList: this.queryParams.harFileList
          };
          this.pageAVGService.post(url, param, {}, this.queryParams.testRun ? true : false).subscribe(function (state) {
            var _a;

            _this4.busy = state.loading;

            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadedState"]) {
              _this4.data = state.data;

              _this4.REQUEST_PAGE_DETAIL.headers[0].cols.forEach(function (col, i) {
                _this4.REQUEST_PAGE_DETAIL.data[0][col.field] = _this4.data[col.field];
              });

              _this4.data.runTime = _this4.sessionService.convertTimestampIntoFormattedString((_a = _this4.data) === null || _a === void 0 ? void 0 : _a.runTime);
              var maxDataLength = Math.max(_this4.data.arrURLBlockedBar.length, _this4.data.arrURLDNSLookUpBar.length, _this4.data.arrURLConnectBar.length, _this4.data.arrURLLoadBar.length);
              _this4.bottleneckGraphHeight = Math.max(maxDataLength, 5) * 30;
              if (_this4.bottleneckGraphHeight < 350) _this4.bottleneckGraphHeight = 350;
              console.log("this.bottleneckGraphHeight => ", _this4.bottleneckGraphHeight);
              setTimeout(function () {
                _this4.charts = tmp;
                _this4.charts[0].highchart.xAxis['categories'] = _this4.data.arrURLBlockedBar;
                _this4.charts[0].highchart.series[0]['data'] = _this4.data.arrBlockedBar.map(function (i) {
                  return parseFloat(i.replace(/,/g, ''));
                });
                _this4.charts[1].highchart.xAxis['categories'] = _this4.data.arrURLDNSLookUpBar;
                _this4.charts[1].highchart.series[0]['data'] = _this4.data.arrDNSLookUpBar.map(function (i) {
                  return parseFloat(i.replace(/,/g, ''));
                });
                _this4.charts[2].highchart.xAxis['categories'] = _this4.data.arrURLConnectBar;
                _this4.charts[2].highchart.series[0]['data'] = _this4.data.arrConnectBar.map(function (i) {
                  return parseFloat(i.replace(/,/g, ''));
                });
                _this4.charts[3].highchart.xAxis['categories'] = _this4.data.arrURLWaitBar;
                _this4.charts[3].highchart.series[0]['data'] = _this4.data.arrWaitBar.map(function (i) {
                  return parseFloat(i.replace(/,/g, ''));
                });
                _this4.charts[4].highchart.xAxis['categories'] = _this4.data.arrURLLoadBar;
                _this4.charts[4].highchart.series[0]['data'] = _this4.data.arrLoadBar.map(function (i) {
                  return parseFloat(i.replace(/,/g, ''));
                });
                console.log("chart data ", _this4.charts[0].highchart);
              }, 0);
            }
          }, function (state) {
            _this4.busy = state.loading;

            _this4.messageService.add({
              key: _this4.key,
              severity: 'error',
              summary: 'Error',
              detail: 'Failed to get the request details data'
            });
          });
        }
      }, {
        key: "viewContentStatistics",
        value: function viewContentStatistics() {
          this.router.navigate(['/rbu-report/content-type-domain-statistics'], {
            queryParams: {
              testRun: this.queryParams.testRun,
              harFileName: this.queryParams.harFileName,
              pageName: this.queryParams.pageName
            }
          });
        }
      }, {
        key: "viewWaterfall",
        value: function viewWaterfall() {
          var _this5 = this;

          var HARPath = this.queryParams.harFileName; //var harFileName = "/logs/TR" + this.queryParams.testRun + "/" + arrHarData[checkLength[0]].partitionName + "/rbu_logs/harp_files/" + arrHarData[checkLength[0]].fileName;

          var url = src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.detailedReport.isHarFileExist.endpoint;
          var payload = {
            harFileName: HARPath
          };
          this.pageAVGService.post(url, payload).subscribe(function (state) {
            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadingState"]) {
              _this5.loading = state.loading;
              _this5.error = state.error; //this.tableData = state.data ?? [];
            }

            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadedState"]) {
              var someHARFilesRemoved = false;
              var HARFiles = [];

              for (var key in state.data) {
                if (state.data[key] === false) {
                  someHARFilesRemoved = true;
                } else {
                  HARFiles.push(key);
                }
              }

              _this5.loading = false;

              if (!HARFiles.length) {
                _this5.messageService.add({
                  key: _this5.key,
                  severity: 'error',
                  summary: 'Error',
                  detail: 'All HAR files have been removed.'
                });

                return;
              }

              var harViewerURL = _this5.nvsmUtility.correctMultiDCPath("/harviewer/index.html?inputUrl=".concat(decodeURIComponent(HARPath)));

              window.open(harViewerURL, 'waterfall');
            }
          }, function (state) {
            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadingErrorState"]) {
              console.log('state ------', state);
              _this5.loading = state.loading;

              _this5.messageService.add({
                key: _this5.key,
                severity: 'error',
                summary: 'Error',
                detail: 'Failed to get the HAR file name'
              });
            }
          });
        }
      }, {
        key: "back",
        value: function back() {
          this.location.back();
          this.breadcrumb.$item.pop();
        }
      }, {
        key: "viewPageSpeedReport",
        value: function viewPageSpeedReport() {
          var _a;

          this.router.navigate(['/rbu-report/page-score'], {
            queryParams: {
              testRun: this.queryParams.testRun,
              pageName: this.queryParams.harFileName,
              DOMContentLoadedTime: this.queryParams.DOMContentLoadedTime,
              onload: this.queryParams.onload,
              PageLoadTime: this.queryParams.PageLoadTime,
              Request: (_a = this.REQUEST_PAGE_DETAIL.data[0]['NUM_RECORDS']) !== null && _a !== void 0 ? _a : this.queryParams.NumRequest,
              ByteReceived: this.queryParams.ByteReceived,
              ByteSend: this.queryParams.ByteSend,
              sourcePageName: this.queryParams.sourcePageName,
              sourceHostName: this.queryParams.sourceHostName
            }
          });
        }
      }, {
        key: "onTopCountChange",
        value: function onTopCountChange() {
          this.queryParams.reqLimit = this.topBottleneckCount;
          this.setBreadcrumb(this.queryParams);
          this.getData();
        }
      }, {
        key: "downloadReport",
        value: function downloadReport(type) {
          var _this6 = this;

          var mainDownloadDataJSON = [];
          var mainRenameJSON = [];
          var mainShowColList = [];
          this.downloadMainURLInfo(mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          this.downloadURLDetailTable(mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          this.downloadBottlenecks(mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          var url = src_environments_environment__WEBPACK_IMPORTED_MODULE_7__["environment"].api.detailedReport.requestdetailreportdownload.endpoint;
          var options = {
            params: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpParams"]().set('productKey', this.queryParams.productKey),
            headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({
              'Content-Type': 'application/x-www-form-urlencoded'
            }),
            responseType: 'text'
          };
          var body = new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpParams"]({
            fromObject: {
              reporttitle: "Request Detail (".concat(this.queryParams.pageName, ") - Test Run: ").concat(this.queryParams.testRun),
              sessionid: '15F04706B35ECDA4B384BC780795ED4E',
              srcfilename: "Request_Detail_".concat(this.queryParams.pageName),
              arrDataValues: JSON.stringify(mainDownloadDataJSON),
              renameArray: JSON.stringify(mainRenameJSON),
              colOrder: JSON.stringify(mainShowColList),
              osname: window.navigator.userAgent,
              // browserType: `${this.data.browserType}(${this.data.browserVersion})`,
              runTime: '12/05/2021 02:14:28',
              reporttype: type
            }
          });
          this.pageAVGService.post(url, body, options).subscribe(function (state) {
            _this6.busy = state.loading;

            if (state instanceof _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["DetailedReportLoadedState"]) {
              Promise.resolve().then(__webpack_require__.t.bind(null,
              /*! file-saver */
              "./node_modules/file-saver/dist/FileSaver.min.js", 7)).then(function (FileSaver) {
                FileSaver.saveAs(_this6.nvsmUtility.correctMultiDCPath("/common/".concat(state.data, "#page=1&zoom=85")), state.data);
              });
            }
          }, function (state) {
            _this6.busy = state.loading;

            _this6.messageService.add({
              key: _this6.key,
              severity: 'error',
              summary: 'Error',
              detail: 'Failed to download the report'
            });
          });
        }
      }, {
        key: "downloadBottlenecks",
        value: function downloadBottlenecks(mainDownloadDataJSON, mainRenameJSON, mainShowColList) {
          var arrRename = ['#', 'Blocking', 'Bottlenecks Time in ms'];
          this.objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          arrRename = ['#', 'Slowest DNS', 'DNS Time in ms'];
          this.objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          arrRename = ['#', 'Slowest Connect', 'Connect Time in ms'];
          this.objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          arrRename = ['#', 'Slowest Wait', 'Wait Time in ms'];
          this.objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList);
          arrRename = ['#', 'Slowest Load', 'Load Time in ms'];
          this.objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList);
        }
      }, {
        key: "downloadURLDetailTable",
        value: function downloadURLDetailTable(mainDownloadDataJSON, mainRenameJSON, mainShowColList) {
          var _this7 = this;

          var renameArray = {};
          var data = JSON.parse(JSON.stringify(this.data.json));
          data.forEach(function (i) {
            i.fs = _this7.stringFormatWithDecimal(i.fs, 0);
            i.dns = _this7.stringFormatWithDecimal(i.dns, 2);
            i.ic = _this7.stringFormatWithDecimal(i.ic, 2);
            i.wait = _this7.stringFormatWithDecimal(i.wait, 2);
            i.cd = _this7.stringFormatWithDecimal(i.cd, 2);
            i.startTime = _this7.stringFormatWithDecimal(i.startTime, 0);
            i.endTime = _this7.stringFormatWithDecimal(i.endTime, 0);
            i.block = _this7.stringFormatWithDecimal(i.block, 2);
            i.send = _this7.stringFormatWithDecimal(i.send, 2);
            i.tt = _this7.stringFormatWithDecimal(i.tt, 2);
            i.durt = _this7.stringFormatWithDecimal(i.durt, 0);
          });
          var columns = this.selectedColumns.filter(function (col) {
            return col.label !== 'Attributes';
          });
          columns.forEach(function (col) {
            renameArray[col.field] = col.label;
          });
          var keys = Object.keys(renameArray);
          data.forEach(function (i) {
            for (var dataKey in i) {
              if (!keys.includes(dataKey)) {
                delete i[dataKey];
              }
            }
          });
          columns = columns.map(function (col) {
            return col.label;
          }).join(',');
          mainDownloadDataJSON.push(data);
          mainRenameJSON.push(renameArray);
          mainShowColList.push(columns);
        }
      }, {
        key: "downloadMainURLInfo",
        value: function downloadMainURLInfo(mainDownloadDataJSON, mainRenameJSON, mainShowColList) {
          var obj = {};
          obj.onLoadTime = this.stringFormatWithDecimal(this.data.onLoadTime, 2);
          obj.onContentLoadTime = this.stringFormatWithDecimal(this.data.onContentLoadTime, 2);
          obj.mainURLResponseTime = this.stringFormatWithDecimal(this.data.mainURLResponseTime, 2);
          obj.mainURLDNSTime = this.stringFormatWithDecimal(this.data.mainURLDNSTime, 2);
          obj.mainURLConnectTime = this.stringFormatWithDecimal(this.data.mainURLConnectTime, 2);
          obj.mainURLWaitTime = this.stringFormatWithDecimal(this.data.mainURLWaitTime, 2);
          obj.mainURLContentTime = this.stringFormatWithDecimal(this.data.mainURLContentTime, 2);
          obj.NUM_RECORDS = this.transformValue(this.data.NUM_RECORDS);
          obj.browserCache = this.transformValue(this.data.browserCache);
          obj.redirectURLCount = this.transformValue(this.data.redirectURLCount);
          obj.redirectTotalTime = this.transformValue(this.data.redirectTotalTime);
          obj.hostNum = this.transformValue(this.data.hostNum);
          obj.downloadBytes = this.transformValue(this.data.downloadBytes);
          var arrRename = {
            onLoadTime: 'Webpage Response (ms)',
            onContentLoadTime: 'DOM Complete (ms)',
            mainURLResponseTime: 'Response (ms)',
            mainURLDNSTime: 'DNS (ms)',
            mainURLConnectTime: 'Connect (ms)',
            mainURLWaitTime: 'Wait (ms)',
            mainURLContentTime: 'Load (ms)',
            NUM_RECORDS: '#Request',
            browserCache: '#Browser Cache',
            redirectURLCount: '#Main URL Redirects',
            redirectTotalTime: 'Main URL Redirect Time(ms)',
            hostNum: '#Hosts',
            downloadBytes: 'Downloaded Bytes'
          };
          mainDownloadDataJSON.push([obj]);
          mainRenameJSON.push(arrRename);
          mainShowColList.push(Object.values(arrRename).join(','));
        }
      }, {
        key: "stringFormatWithDecimal",
        value: function stringFormatWithDecimal(value, uptoDecimal) {
          value = "".concat(value);

          if (value.includes('.')) {
            var strValue = value.split('.');
            var afterDecimalValue = strValue[1].substring(0, uptoDecimal);
            strValue[0] = strValue[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
            return afterDecimalValue === '' ? strValue[0] : "".concat(strValue[0], ".").concat(afterDecimalValue);
          }

          if (value == -1 || value !== 0 && value == "" || value == null || value == undefined || value == "" || value == 0) value = "-";
          value = "".concat(value);
          return value.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
        }
      }, {
        key: "transformValue",
        value: function transformValue(value) {
          if (value == -1 || value !== 0 && value == "" || value == null || value == undefined || value == "" || value == 0) value = "-";
          value = "".concat(value);
          return value;
        }
      }, {
        key: "objForBottleneck",
        value: function objForBottleneck(arrRename, mainDownloadDataJSON, mainRenameJSON, mainShowColList) {
          var arr = [];

          for (var i = 0; i < this.data.arrURLBlockedBar.length; i++) {
            var obj = {};
            obj['#'] = i + 1;
            obj.hostname = this.data.arrURLBlockedBar[i] + this.data.arrURLBlocked[i];
            obj.time = this.data.arrBlockedBar[i];
            arr.push(obj);
          }

          mainDownloadDataJSON.push(arr);
          mainRenameJSON.push({
            '#': arrRename[0],
            hostname: arrRename[1],
            time: arrRename[2]
          });
          mainShowColList.push(arrRename.join(','));
        }
      }]);
    }();

    RequestDetailComponent.ctorParameters = function () {
      return [{
        type: src_app_core_breadcrumb_breadcrumb_service__WEBPACK_IMPORTED_MODULE_5__["BreadcrumbService"]
      }, {
        type: _angular_common__WEBPACK_IMPORTED_MODULE_1__["Location"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["ActivatedRoute"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_6__["SessionService"]
      }, {
        type: _service_page_average_report_service__WEBPACK_IMPORTED_MODULE_9__["PageAverageReportService"]
      }, {
        type: src_app_shared_cav_toast_service_cav_message_service__WEBPACK_IMPORTED_MODULE_12__["CavMessageService"]
      }, {
        type: _synthetic_monitor_services_nvsm_utility_service__WEBPACK_IMPORTED_MODULE_8__["NVSMUtility"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Input"])()], RequestDetailComponent.prototype, "selectedColumns", null);
    RequestDetailComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["Component"])({
      selector: 'app-request-detail',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./request-detail.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_3__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./request-detail.component.scss */
      "./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.scss"))["default"]]
    })], RequestDetailComponent);
    /***/
  },

  /***/
  "./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.module.ts":
  /*!*************************************************************************************************!*\
    !*** ./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.module.ts ***!
    \*************************************************************************************************/

  /*! exports provided: RequestDetailModule */

  /***/
  function _src_app_pages_home_homeNsm_pageAverageReport_requestDetail_requestDetailModuleTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "RequestDetailModule", function () {
      return RequestDetailModule;
    });
    /* harmony import */


    var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
    /*! tslib */
    "./node_modules/tslib/tslib.es6.js");
    /* harmony import */


    var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
    /*! @angular/core */
    "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
    /* harmony import */


    var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! @angular/common */
    "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
    /* harmony import */


    var _request_detail_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! ./request-detail.component */
    "./src/app/pages/home/home-nsm/page-average-report/request-detail/request-detail.component.ts");
    /* harmony import */


    var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! @angular/router */
    "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* harmony import */


    var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


    var src_app_shared_chart_chart_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! src/app/shared/chart/chart.module */
    "./src/app/shared/chart/chart.module.ts");
    /* harmony import */


    var _page_report_pipe_transformPipe_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ./../page-report-pipe/transformPipe.module */
    "./src/app/pages/home/home-nsm/page-average-report/page-report-pipe/transformPipe.module.ts");
    /* harmony import */


    var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/cav-table/cav-table.module */
    "./src/app/shared/cav-table/cav-table.module.ts");

    var routes = [{
      path: '',
      component: _request_detail_component__WEBPACK_IMPORTED_MODULE_3__["RequestDetailComponent"]
    }];

    var RequestDetailModule = /*#__PURE__*/_createClass(function RequestDetailModule() {
      _classCallCheck(this, RequestDetailModule);
    });

    RequestDetailModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [_request_detail_component__WEBPACK_IMPORTED_MODULE_3__["RequestDetailComponent"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_6__["FormsModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["BreadcrumbModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputNumberModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["PanelModule"], src_app_shared_chart_chart_module__WEBPACK_IMPORTED_MODULE_7__["ChartModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ToastModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["MenuModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_5__["ProgressSpinnerModule"], src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_9__["CavTableModule"], _page_report_pipe_transformPipe_module__WEBPACK_IMPORTED_MODULE_8__["TransformPageReportsPipeModule"], _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(routes)],
      exports: [_angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"]]
    })], RequestDetailModule);
    /***/
  },

  /***/
  "./src/app/pages/home/home-nsm/page-average-report/request-detail/service/request-detail.model.ts":
  /*!********************************************************************************************************!*\
    !*** ./src/app/pages/home/home-nsm/page-average-report/request-detail/service/request-detail.model.ts ***!
    \********************************************************************************************************/

  /*! exports provided: REQUEST_DETAIL, REQUEST_PAGE_DETAIL, REQUEST_DETAIL_CHART */

  /***/
  function _src_app_pages_home_homeNsm_pageAverageReport_requestDetail_service_requestDetailModelTs(module, __webpack_exports__, __webpack_require__) {
    "use strict";

    __webpack_require__.r(__webpack_exports__);
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "REQUEST_DETAIL", function () {
      return REQUEST_DETAIL;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "REQUEST_PAGE_DETAIL", function () {
      return REQUEST_PAGE_DETAIL;
    });
    /* harmony export (binding) */


    __webpack_require__.d(__webpack_exports__, "REQUEST_DETAIL_CHART", function () {
      return REQUEST_DETAIL_CHART;
    });

    var REQUEST_DETAIL = {
      headers: [{
        cols: [{
          label: 'Attributes',
          field: 'http',
          tooltip: 'Attributes',
          classes: 'text-left',
          selected: true
        }, {
          label: '#',
          field: 'sn',
          tooltip: 'Sequence no.',
          isSort: true,
          classes: 'text-right',
          width: '50px',
          selected: true
        }, {
          label: 'Path/File',
          field: 'fn',
          tooltip: 'Path/File',
          isSort: true,
          classes: 'text-left',
          width: '180px',
          selected: true
        }, {
          label: 'Host Name',
          field: 'hn',
          tooltip: 'Host Name',
          isSort: true,
          classes: 'text-left',
          width: '125px',
          selected: true
        }, {
          label: 'Host IP Address',
          field: 'ip',
          tooltip: 'Host IP Address',
          isSort: true,
          classes: 'text-right',
          width: '135px',
          selected: true
        }, {
          label: 'Code',
          field: 'sc',
          tooltip: 'Status Code',
          isSort: true,
          classes: 'text-right',
          width: '70px',
          selected: true
        }, {
          label: 'Domain Type',
          field: 'dt',
          tooltip: 'Domain Type',
          isSort: true,
          classes: 'text-left',
          selected: true
        }, {
          label: 'Served By',
          field: 'loc',
          tooltip: 'Served By',
          isSort: true,
          classes: 'text-left',
          width: '100px',
          selected: true
        }, {
          label: 'Content Type',
          field: 'ct',
          tooltip: 'Content Type',
          isSort: true,
          classes: 'text-left',
          selected: true
        }, {
          label: 'Size(Byte)',
          field: 'fs',
          tooltip: 'Size(Bytes)',
          isSort: true,
          classes: 'text-right',
          width: '100px',
          selected: true
        }, {
          label: 'DNS(ms)',
          field: 'dns',
          tooltip: 'DNS LookUp(ms)',
          isSort: true,
          classes: 'text-right',
          width: '90px',
          selected: true
        }, {
          label: 'Connect(ms)',
          field: 'ic',
          tooltip: 'Connect Time(ms)',
          isSort: true,
          classes: 'text-right',
          width: '125px',
          selected: true
        }, {
          label: 'Block(ms)',
          field: 'block',
          tooltip: 'Block Time(ms)',
          isSort: true,
          classes: 'text-right',
          width: '125px',
          selected: true
        }, {
          label: 'Send(ms)',
          field: 'send',
          tooltip: 'Send Time(ms)',
          isSort: true,
          classes: 'text-right',
          width: '95px',
          selected: true
        }, {
          label: 'Wait(ms)',
          field: 'Wait',
          tooltip: 'Wait Time(ms)',
          isSort: true,
          classes: 'text-right',
          width: '95px',
          selected: true
        }, {
          label: 'DownLoad(ms)',
          field: 'cd',
          tooltip: 'Content Downloaded(ms)',
          isSort: true,
          classes: 'text-right',
          width: '130px',
          selected: true
        }, {
          label: 'Total Time(ms)',
          field: 'tt',
          tooltip: 'Total Time(ms), (DNS + Connect + Send + Wait + Download)',
          isSort: true,
          classes: 'text-right',
          width: '130px',
          selected: true
        }, {
          label: 'Req. Start(ms)',
          field: 'startTime',
          tooltip: 'Request Start(ms), relative to page start time',
          isSort: true,
          classes: 'text-right',
          width: '125px',
          selected: true
        }, {
          label: 'Resp. End(ms)',
          field: 'endTime',
          tooltip: 'Response End(ms), relative to page start time',
          isSort: true,
          classes: 'text-right',
          width: '125px',
          selected: true
        }, {
          label: 'Duration Time(ms)',
          field: 'durt',
          tooltip: 'Duration Time(ms)',
          isSort: true,
          classes: 'text-right',
          width: '150px',
          selected: true
        }]
      }],
      data: [],
      paginator: {
        first: 0,
        rows: 15,
        rowsPerPageOptions: [15, 30, 50, 100]
      }
    };
    var REQUEST_PAGE_DETAIL = {
      headers: [{
        cols: [{
          label: 'Page Response (ms)',
          field: 'onLoadTime',
          tooltip: 'OnLoad Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'DOM Complete (ms)',
          field: 'onContentLoadTime',
          tooltip: 'DOM Content Loaded Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Response(ms)',
          field: 'mainURLResponseTime',
          tooltip: 'Main URL Response Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'DNS(ms)',
          field: 'mainURLDNSTime',
          tooltip: 'Main URL DNS LookUp Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Connect(ms)',
          field: 'mainURLConnectTime',
          tooltip: 'Main URL Connect Time',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Wait(ms)',
          field: 'mainURLWaitTime',
          tooltip: 'Main URL Wait Time(ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Load(ms)',
          field: 'mainURLContentTime',
          tooltip: 'Main URL Content Download Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: '#Request',
          field: 'NUM_RECORDS',
          tooltip: 'Total Http Requests excluding Browser Cache',
          selected: true,
          classes: 'text-right'
        }, {
          label: '#Browser Cache',
          field: 'browserCache',
          tooltip: 'Number of resources served by Browser Cache',
          selected: true,
          classes: 'text-right'
        }, {
          label: '#Main URL Redirects',
          field: 'redirectURLCount',
          tooltip: 'Total Main URL Redirect',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Main URL Redirect Time(ms)',
          field: 'redirectTotalTime',
          tooltip: 'Main URL Redirect Time (ms)',
          selected: true,
          classes: 'text-right'
        }, {
          label: '#Hosts',
          field: 'hostNum',
          tooltip: 'Total Hosts',
          selected: true,
          classes: 'text-right'
        }, {
          label: 'Downloaded Bytes',
          field: 'downloadBytes',
          tooltip: 'Download Bytes of all Resources',
          selected: true,
          classes: 'text-right'
        }]
      }],
      data: [{
        onLoadTime: 0,
        onContentLoadTime: 0,
        mainURLResponseTime: 0,
        mainURLDNSTime: 0.0,
        mainURLConnectTime: 0,
        mainURLWaitTime: 0,
        mainURLContentTime: 0,
        NUM_RECORDS: 0,
        browserCache: 0,
        redirectURLCount: 0,
        redirectTotalTime: 0,
        hostNum: 0,
        downloadBytes: 0
      }]
    };
    var REQUEST_DETAIL_CHART = [{
      highchart: {
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Blocking (ms)'
        },
        xAxis: {
          categories: []
        },
        yAxis: {
          min: 0,
          labels: {
            style: {
              whiteSpace: "nowrap",
              textOverflow: "none"
            },
            enabled: true,
            autoRotation: false,
            overflow: "allow"
          }
        },
        tooltip: {
          pointFormat: '{point.y} ms'
        },
        plotOptions: {
          bar: {
            dataLabels: {
              enabled: true
            }
          }
        },
        legend: {
          enabled: false
        },
        series: [{
          type: 'bar',
          data: [],
          maxPointWidth: 20
        }]
      }
    }, {
      highchart: {
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Slowest DNS (ms)'
        },
        xAxis: {
          categories: []
        },
        yAxis: {
          min: 0,
          labels: {
            style: {
              whiteSpace: "nowrap",
              textOverflow: "none"
            },
            enabled: true,
            autoRotation: false,
            overflow: 'allow'
          }
        },
        tooltip: {
          pointFormat: '{point.y} ms'
        },
        plotOptions: {
          bar: {
            dataLabels: {
              enabled: true
            }
          }
        },
        legend: {
          enabled: false
        },
        series: [{
          type: 'bar',
          data: [],
          maxPointWidth: 20
        }]
      }
    }, {
      highchart: {
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Slowest Connect (ms)'
        },
        xAxis: {
          categories: []
        },
        yAxis: {
          min: 0,
          labels: {
            style: {
              whiteSpace: "nowrap",
              textOverflow: "none"
            },
            enabled: true,
            autoRotation: false,
            overflow: 'allow'
          }
        },
        tooltip: {
          pointFormat: '{point.y} ms'
        },
        plotOptions: {
          bar: {
            dataLabels: {
              enabled: true
            }
          }
        },
        legend: {
          enabled: false
        },
        series: [{
          type: 'bar',
          data: [],
          maxPointWidth: 20
        }]
      }
    }, {
      highchart: {
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Slowest Wait (ms)'
        },
        xAxis: {
          categories: []
        },
        yAxis: {
          min: 0,
          labels: {
            style: {
              whiteSpace: "nowrap",
              textOverflow: "none"
            },
            enabled: true,
            autoRotation: false,
            overflow: 'allow'
          }
        },
        tooltip: {
          pointFormat: '{point.y} ms'
        },
        plotOptions: {
          bar: {
            dataLabels: {
              enabled: true
            }
          }
        },
        legend: {
          enabled: false
        },
        series: [{
          type: 'bar',
          data: [],
          maxPointWidth: 20
        }]
      }
    }, {
      highchart: {
        chart: {
          type: 'bar'
        },
        title: {
          text: 'Slowest Load (ms)'
        },
        xAxis: {
          categories: []
        },
        yAxis: {
          min: 0,
          labels: {
            style: {
              whiteSpace: "nowrap",
              textOverflow: "none"
            },
            enabled: true,
            autoRotation: false,
            overflow: 'allow'
          }
        },
        tooltip: {
          pointFormat: '{point.y} ms'
        },
        plotOptions: {
          bar: {
            dataLabels: {
              enabled: true
            }
          }
        },
        legend: {
          enabled: false
        },
        series: [{
          type: 'bar',
          data: [],
          maxPointWidth: 20
        }]
      }
    }];
    /***/
  }
}]);