function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }

function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }

function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }

function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }

function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }

function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }

function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }

function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }

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 _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 _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); }

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

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["home-account-summary-report-accont-summary-report-module"], {
  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.html":
  /*!***************************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.html ***!
    \***************************************************************************************************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "<highcharts-chart\n[Highcharts] = \"highcharts\" \n[options] = \"chartOptions\" \nstyle = \"width: 100%; height: 400px; display: block;\">\n</highcharts-chart>";
    /***/
  },

  /***/
  "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.html":
  /*!***************************************************************************************************************************************************!*\
    !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.html ***!
    \***************************************************************************************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "<p-toast key='msg'></p-toast>\r\n<p-messages [(value)]=\"msgs1\"></p-messages>\r\n<p-progressBar *ngIf=\"callpending\" [style]=\"{'height': '6px'}\" mode=\"indeterminate\" ></p-progressBar>\r\n\r\n<div class=\"main-div\">\r\n    <p-toolbar class=\"ui-secondary-light\">\r\n        <div class=\"p-grid p-4 p-align-center p-justify-between\">\r\n            <a routerLink=\"/home\">\r\n                <i class=\"icons8 icons8-left toolbar-icon-color\"></i>\r\n            </a>\r\n            <div class=\"p-col ui-toolbar-text\">\r\n                Account Usage Report</div>\r\n            <!-- <button type=\"button\" pButton icon=\"icons8 icons8-help\"></button> -->\r\n            <button pButton type=\"button\" [disabled] = \"isSingleBillingCycle\" [title]=\"isSingleBillingCycle ? 'this.tooltipForCompareIcon' : 'Compare Billing Report'\" icon=\"icons8 icons8-compare font-18\" (click)=\"getBillingDetails()\" class=\"mx-6\"></button>\r\n            <app-help  [helpFileName]=\"'accountTestRunUsageReport'\"  [helpTitle]=\"'Account Usage Report'\" [helpFolder]=\"'netOcean'\"></app-help>\r\n        </div>\r\n    </p-toolbar>\r\n    \r\n    <div *ngIf=\"!checkLocal\" class=\"p-grid clientBar border-1 my-10 p-10\">\r\n        <div class=\"p-grid w-100-p p-justify-between p-align-center\">\r\n            <span *ngFor=\"let info of topBarInfo\">\r\n                <label [ngClass]=\"info.isNegative ?'blinking text-danger':'mr-5 font-weight-600'\" title=\"{{info.isNegative ? 'Remaining Quantity is over consumed, Please contact to the cavisson representative and topup the account ASAP.':''}}\">{{info.label}}: </label>\r\n                <span [ngClass]=\"info.isNegative ?'blinking text-danger':''\" *ngIf=\"info.isNumField\">{{info.value | NumberToString : info.label:'fromRow'}}</span>\r\n                <span *ngIf=\"!info.isNumField\">{{info.value}}</span>\r\n                <button type=\"button\" *ngIf=\"info.alertinfo && (info.label == 'Remaining VUH' || info.label =='Remaining Transaction' || info.label =='Remaining Page View')\" class=\"btn-icon icons8 icons8-info ml-5\" title=\"{{info.alertmsg}}\"></button>\r\n            </span>\r\n            <span class=\"text-danger\"  *ngIf=\"Difference_In_Days <= 15 && Difference_In_Days >= 0 && !willexpire\">({{Difference_In_Days}} days to expire)</span>\r\n            <span class=\"text-danger\"  *ngIf=\"Difference_In_Days < 0\">(expired)</span>\r\n        </div>\r\n        <!-- <div class=\"p-grid p-align-center\">\r\n            <label class=\"mr-5 font-weight-600\">Total VUH :</label>\r\n            <div>{{totalVUH}}</div>\r\n        </div> -->\r\n        <!-- <div class=\"p-grid p-align-center\">\r\n            <label class=\"mr-5 font-weight-600\">Remaining VUH :</label>\r\n            <div>{{remainingVUH}}</div>\r\n        </div> -->\r\n        <!-- <div class=\"p-grid p-align-center\">\r\n                <label class=\"mr-5 font-weight-600\">Total Test Run : </label>\r\n                <div>  {{totalTest}}</div> -->\r\n                <!-- <ng-container *ngIf=\"Report.filteredValue != null \">\r\n                    {{Report.filteredValue.length}}\r\n                </ng-container> -->\r\n        <!-- </div>\r\n        <div class=\"p-grid p-align-center\">\r\n            <label class=\"mr-5 font-weight-600\">License Period :</label>\r\n            <div>\r\n                {{licensePeriod}} <span class=\"text-danger\">(15 days to expire)</span>\r\n            </div> -->\r\n        <!-- </div> -->\r\n    </div>\r\n    \r\n    <p-panel header=\"TEST RUN FILTER\" styleClass=\"mb-10 net-panel\">\r\n        <div class=\"p-grid\">\r\n            <div *ngIf=\"!checkLocal\" class=\"p-col-2\">\r\n                <div class=\"mb-6\">App Name</div>\r\n                <p-dropdown [options]=\"appNameList\" [(ngModel)]=\"selectAppName\"\r\n                   [style]=\"{'max-width':'80%'}\" \r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\">\r\n                </p-dropdown>\r\n            </div>\r\n            <div class=\"p-col-2\">\r\n                <div class=\"mb-6\">Test Duration</div>\r\n                <p-dropdown [options]=\"durationzforTestRunUsage\" [(ngModel)]=\"selectedDuration\"\r\n                   [style]=\"{'max-width':'80%'}\"\r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\">\r\n                </p-dropdown>\r\n            </div>\r\n            <div *ngIf=\"!checkLocal\" class=\"p-col-2\">\r\n                <div class=\"mb-6\">Controller IP</div>\r\n                <p-multiSelect resetFilterOnHide = \"true\" \r\n                    [maxSelectedLabels] = \"1\" defaultLabel=\"Select Ip\"  [options]=\"ctrlIpVal\" \r\n                    selectedItemsLabel = \"{0} Ip Selected\"  [style]=\"{'min-width':'163px' , 'max-width':'163px'}\" \r\n                    (onClick)=\"clickControllerIP($event)\" [(ngModel)]=\"selectCtrlIpVal\">\r\n                </p-multiSelect>\r\n                <!-- <p-dropdown [options]=\"ctrlIpVal\" [(ngModel)]=\"selectCtrlIpVal\" (onClick)=\"clickControllerIP($event)\"\r\n                     [style]=\"{'max-width':'80%'}\" \r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\">\r\n                </p-dropdown> -->\r\n            </div>\r\n            <div class=\"p-col-2\">\r\n                <div class=\"mb-6\">Time Period</div>\r\n                <p-dropdown [options]=\"timePeriodVal\" [(ngModel)]=\"selectTimePeriod\" \r\n                    [style]=\"{'max-width':'80%'}\" (onChange)=\"onFilterChange($event)\"\r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\">\r\n                </p-dropdown>\r\n                <i title=\"Set custom time\" *ngIf=\"selectTimePeriod == 'CUSTOM'\" class=\"icons8 icons8-settings ml-5\" (click)=\"onClickCustomTP()\"></i>\r\n            </div>\r\n            <div class=\"p-col-2\">\r\n                <div class=\"mb-6\">Group By</div>\r\n                <p-dropdown [options]=\"groupByVal\" [(ngModel)]=\"selectGroupBy\" \r\n                    [style]=\"{'max-width':'80%'}\" \r\n                    dropdownIcon=\"icons8 icons8-expand-arrow\">\r\n                </p-dropdown>\r\n            </div>\r\n            <div class=\"p-col-2\">\r\n                <div class=\"mb-6\">&nbsp;</div>\r\n                <!-- <button pButton type=\"button\" label=\"Reset\" (click)=\"resetFilter()\" class=\"mr-10\"></button> -->\r\n                <button pButton type=\"button\" pTooltip=\"Apply\" label=\"Apply\" (click)=\"applyFilter('FILTER')\" ></button>\r\n            </div>\r\n        </div>\r\n    </p-panel>\r\n    <div class=\"blockedUI\" *ngIf=\"isloading\">\r\n        <i class=\"pi pi-spin pi-spinner\"></i><span>Loading</span>\r\n    </div>\r\n    <div *ngIf=\"treeTableEnabled && !groupByNone\" class=\"mb-10\">\r\n        \r\n        <p-treeTable #Report [columns]=\"selectedtestRunUsageCols\" [value]=\"tableData\" [resizableColumns]=\"true\" class=\"lrmTable2 \" [scrollable]=\"true\" scrollHeight=\"calc(100vh - 425px)\" [paginator]=\"true\" [rows]=\"50\"\r\n        [pageLinks]=\"3\" [rowsPerPageOptions]=\"[50,200,400,800,1000]\" (sortFunction)=\"customSortfortestrunusage($event,1)\" [customSort]=\"true\">\r\n            <ng-template pTemplate=\"caption\">\r\n                <div class=\"p-grid p-align-center p-justify-between\">\r\n                    <div>\r\n                        <span\r\n                            *ngIf=\"Report != undefined && Report['_totalRecords'] != undefined && Report['_totalRecords'] == 0\"\r\n                            class=\"font-weight-600\"> TEST RUN USAGE </span>\r\n                        <span\r\n                            *ngIf=\"Report != undefined  && Report['_totalRecords'] != undefined && Report['_totalRecords'] != 0\">\r\n                            <label class=\"mr-5 font-weight-600\">Test Runs as per filter: </label>\r\n                            <ng-container *ngIf=\"Report['filteredValue'] == null\">\r\n                                {{Report['_totalRecords']}}\r\n                            </ng-container>\r\n                            <ng-container *ngIf=\"Report['filteredValue'] != null \">\r\n                                {{Report['filteredValue'].length}}\r\n                            </ng-container>\r\n                        </span>\r\n                    </div>\r\n                    <div class=\"p-grid p-align-center\">\r\n                        <p-multiSelect [options]=\"testRunUsagecols\" [(ngModel)]=\"selectedtestRunUsageCols\"\r\n                            optionLabel=\"header\" selectedItemsLabel=\"{0} columns selected\" [style]=\"{minWidth: '200px'}\"\r\n                            defaultLabel=\"Choose Columns\">\r\n                        </p-multiSelect>\r\n                        <button type=\"button\" pButton class=\"btn-primary-outline mx-8\" label=\"Column Search\"\r\n                            (click)=\"toggleSearch=!toggleSearch\"></button>\r\n                        <button type=\"button\" (click)=\"applyFilterforrefresh()\" pButton class=\"btn-icon\" pTooltip=\"Refresh\"\r\n                            icon=\"las-sync-alt-solid font-16\"></button> \r\n\r\n                            <button class=\"btn-icon\" type=\"button\" pTooltip=\"Expand/Collapse\" (click)=\"exapandORcollapse(tableData)\" >\r\n                                <i [ngClass]=\"expand ? 'las-compress-arrows-alt-solid': 'las-expand-arrows-alt-solid'\"></i>\r\n                            </button>\r\n\r\n                            <!-- <p-toggleButton [(ngModel)]=\"expand\" class=\"toggle-button-link\" onIcon=\"icons8 icons8-compress\" offIcon=\"icons8 icons8-enlarge\" (click)=\"exapandORcollapse(tableData)\"></p-toggleButton> -->\r\n                    </div>\r\n                </div>\r\n            </ng-template>\r\n\r\n            <ng-template pTemplate=\"colgroup\" let-columns>\r\n                <colgroup>\r\n                    <col *ngFor=\"let col of columns\" style=\"width:155px\">\r\n                </colgroup>\r\n            </ng-template>        \r\n            <ng-template pTemplate=\"header\" let-columns>\r\n                <tr *ngIf=\"toggleSearch\">\r\n                    <th *ngFor=\"let col of columns\" [ngSwitch]=\"col.field\" ttResizableColumn >\r\n                        <input pInputText type=\"text\" class=\"w-100-p\"\r\n                            (input)=\"Report.filter($event.target.value, getColFieldForFiltering(col.field), 'contains')\">\r\n                    </th>\r\n                </tr>\r\n                <tr>\r\n                    <th title=\"{{col.header }}\" *ngFor=\"let col of columns\" ttResizableColumn [ttSortableColumn]=\"col.field\">\r\n                        <span style=\"text-overflow: ellipsis;overflow: hidden;\">{{ col.header }}</span>\r\n                        <p-treeTableSortIcon *ngIf=\"col.field !='controllerip'\" [field]=\"col.field\">\r\n                        </p-treeTableSortIcon>\r\n                    </th>\r\n                </tr>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"emptymessage\" let-columns>\r\n                <tr>\r\n                    <td [attr.colspan]=\"columns.length\" class=\"text-center\">No Records</td>\r\n                </tr>\r\n            </ng-template>\r\n\r\n            <ng-template pTemplate=\"body\" let-rowNode let-rowData=\"rowData\" let-columns=\"columns\">\r\n                <tr>\r\n                    <td *ngFor=\"let col of columns let i = index\" title=\"{{rowNode.parent == null && i != 0 ? '' : (rowData[col.field] | NumberToString : col.field:'fromtitle')}}\" [ngClass]=\"(rowData[col.field] >= 0 || col.field == 'starttimestamp' || col.field == 'endtimestamp' || col.field == 'duration' || col.field == 'controllerip') ? 'text-right' : 'text-left'\"\r\n                    style=\"text-overflow: ellipsis;overflow: hidden;\">\r\n                        <p-treeTableToggler [rowNode]=\"rowNode\" *ngIf=\"i == 0\">\r\n                        </p-treeTableToggler>\r\n                        <span *ngIf=\"rowNode.parent != null && i != 0\">{{ rowData[col.field] | NumberToString : col.field:'fromRow'}}</span>\r\n                        <span *ngIf=\"rowNode.parent == null && i == 0\">{{ rowData[col.field] | NumberToString : col.field:'fromRow'}}</span>\r\n                        <span *ngIf=\"rowNode.parent == null && i != 0\">{{ rowData[col.field] | NumberToString : col.field:'fromRow'}}</span>\r\n                    </td>\r\n                </tr>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"footer\" let-columns>\r\n                <tr>\r\n                    <ng-container *ngFor=\"let col of columns\">\r\n                        <td *ngFor=\"let lastrow of lastRowData;\" [ngClass]=\"(lastrow[col.field] >= 0 || col.field == 'starttimestamp' || col.field == 'endtimestamp' || col.field == 'duration' || col.field == 'controllerip') ? 'text-right' : 'text-left'\">\r\n                            {{lastrow[col.field]  | NumberToString : col.field:\"fromRow\"}}\r\n                        </td>\r\n                    </ng-container>\r\n                </tr>\r\n            </ng-template>\r\n\r\n        </p-treeTable>\r\n        <div *ngIf=\"tableData.length != 0\" class=\"summery-in\">\r\n            <div class=\"p-grid p-align-center mt-8\" >\r\n                <div class=\"mx-10 font-weight-600\">Download as:</div>\r\n                <!-- <button type=\"button\" pButton (click)=\"downloadReport('pdf')\" icon=\"icons8 icons8-pdf-2\" label=\"PDF\"\r\n                    title=\"Download format(PDF)\" class=\"ui-button-secondary mx-6\"></button> -->\r\n    \r\n                <button type=\"button\" pButton (click)=\"downloadReport('excel')\" icon=\"las-file-excel\" label=\"XLS\"\r\n                    title=\"Download format(XLS)\" class=\"ui-button-secondary mx-6\"></button>\r\n    \r\n                <!-- <button type=\"button\" pButton icon=\"icons8 icons8-doc\" label=\"DOC\" (click)=\"downloadReport('worddoc')\"\r\n                    title=\"Download format(DOC)\" class=\"ui-button-secondary mx-6\"></button> -->\r\n                \r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div *ngIf=\"groupByNone && !treeTableEnabled\" class=\"mb-10\">\r\n        <p-table #Report [columns]=\"selectedtestRunUsageCols\" [value]=\"reportResult\" class=\"lrmTable2 \" [scrollable]=\"true\" [style]=\"{'width':'100%','overflow':'auto!important'}\" \r\n        [responsive]=\"true\"  [rows]=\"20\" \r\n         [resizableColumns]=\"true\" \r\n            [rows]=\"50\" [paginator]=\"true\" scrollHeight=\"calc(100vh - 420px)\"\r\n            [pageLinks]=\"3\" [rowsPerPageOptions]=\"[50,200,400,800,1000]\"  sortField=\"testRun\" [sortOrder]=\"1\" (sortFunction)=\"customSortfortestrunusage($event,0)\" [customSort]=\"true\">\r\n            <ng-template pTemplate=\"caption\">\r\n                <div class=\"p-grid p-align-center p-justify-between\">\r\n                    <div>\r\n                        <span\r\n                            *ngIf=\"Report != undefined && Report['_totalRecords'] != undefined && Report['_totalRecords'] == 0\"\r\n                            class=\"font-weight-600\"> TEST RUN USAGE </span>\r\n                        <span\r\n                            *ngIf=\"Report != undefined  && Report['_totalRecords'] != undefined && Report['_totalRecords'] != 0\">\r\n                            <label class=\"mr-5 font-weight-600\">Test Runs as per filter : </label>\r\n                            <ng-container *ngIf=\"Report.filteredValue == null\">\r\n                                {{Report['_totalRecords']}}\r\n                            </ng-container>\r\n                            <ng-container *ngIf=\"Report.filteredValue != null \">\r\n                                {{Report.filteredValue.length}}\r\n                            </ng-container>\r\n                        </span>\r\n                    </div>\r\n                    <div class=\"p-grid p-align-center\">\r\n                        <p-multiSelect [options]=\"testRunUsagecols\" [(ngModel)]=\"selectedtestRunUsageCols\"\r\n                            optionLabel=\"header\" selectedItemsLabel=\"{0} columns selected\" [style]=\"{minWidth: '200px'}\"\r\n                            defaultLabel=\"Choose Columns\">\r\n                        </p-multiSelect>\r\n                        <button type=\"button\" pButton class=\"btn-primary-outline mx-8\" pTooltip=\"Column Search\" label=\"Column Search\"\r\n                            (click)=\"toggleSearch=!toggleSearch\"></button>\r\n                        <button type=\"button\" (click)=\"applyFilterforrefresh()\" pButton class=\"btn-icon\" pTooltip=\"Refresh\"\r\n                            icon=\"las-sync-alt-solid font-16\"></button> \r\n                    </div>\r\n                </div>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"colgroup\" let-columns>\r\n                <colgroup>\r\n                    <col *ngFor=\"let col of columns\" style=\"width:160px\">\r\n                </colgroup>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"header\" let-columns>\r\n                <tr *ngIf=\"toggleSearch\">\r\n                    <th *ngFor=\"let col of columns\" [ngSwitch]=\"col.field\">\r\n                        <input pInputText type=\"text\" class=\"w-100-p\"\r\n                            (input)=\"Report.filter($event.target.value, getColFieldForFiltering(col.field), 'contains')\">\r\n                    </th>\r\n                </tr>\r\n                <tr>\r\n                    <th title=\"{{col.header }}\" *ngFor=\"let col of columns\" [pSortableColumn]=\"col.field\">\r\n                        <span style=\"text-overflow: ellipsis;overflow: hidden;\"> {{col.header}}</span>\r\n                        <span>\r\n                            <p-sortIcon *ngIf=\"col.field !='controllerip'\" [field]=\"col.field\"></p-sortIcon>\r\n                        </span>\r\n                    </th>\r\n                </tr>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"emptymessage\" let-columns>\r\n                <tr>\r\n                    <td [attr.colspan]=\"columns.length\" class=\"text-center\">No Records</td>\r\n                </tr>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n                <tr>\r\n                    <td *ngFor=\"let col of columns\" title=\"{{rowData[col.field] | NumberToString : col.field:'fromtitle' }}\"\r\n                        [ngClass]=\"(rowData[col.field] >= 0 || col.field == 'starttimestamp' || col.field == 'endtimestamp' || col.field == 'duration' || col.field == 'controllerip') ? 'text-right' : 'text-left'\"\r\n                        style=\"text-overflow: ellipsis;overflow: hidden;\">\r\n                        <!-- <span>{{rowData[col.field] | NumberToString : col.field:\"fromRow\"}}</span> -->\r\n                        <span>{{rowData[col.field] | NumberToString : col.field:'fromtitle'}}</span>\r\n                    </td>\r\n                </tr>\r\n            </ng-template>\r\n            <ng-template pTemplate=\"footer\" let-columns>\r\n                <tr>\r\n                    <ng-container *ngFor=\"let col of columns\">\r\n                        <td *ngFor=\"let lastrow of lastRowData;\" title=\"{{lastrow[col.field]  | NumberToString : col.field:'fromRow'}}\" [ngClass]=\"(lastrow[col.field] >= 0 || col.field == 'starttimestamp' || col.field == 'endtimestamp' || col.field == 'duration' || col.field == 'controllerip') ? 'text-right' : 'text-left'\">\r\n                            {{lastrow[col.field]  | NumberToString : col.field:\"fromRow\"}}\r\n                        </td>\r\n                    </ng-container>\r\n                </tr>\r\n            </ng-template>\r\n        </p-table>\r\n        <div *ngIf=\"reportResult.length != 0\" class=\"summery-in\">\r\n            <div class=\"p-grid p-align-center mt-8\" >\r\n                <div class=\"mx-10 font-weight-600\">Download as:</div>\r\n                <!-- <button type=\"button\" pButton (click)=\"downloadReport('pdf')\" icon=\"icons8 icons8-pdf-2\" label=\"PDF\"\r\n                    title=\"Download format(PDF)\" class=\"ui-button-secondary mx-6\"></button> -->\r\n    \r\n                <button type=\"button\" pButton (click)=\"downloadReport('excel')\" icon=\"las-file-excel\" label=\"XLS\"\r\n                    title=\"Download format(XLS)\" class=\"ui-button-secondary mx-6\"></button>\r\n<!--     \r\n                <button type=\"button\" pButton icon=\"icons8 icons8-doc\" label=\"DOC\" (click)=\"downloadReport('worddoc')\"\r\n                    title=\"Download format(DOC)\" class=\"ui-button-secondary mx-6\"></button> -->\r\n                \r\n            </div>\r\n        </div>\r\n    </div>\r\n    <div *ngIf=\"!reportResultAvl\" class=\"w-100-p mt-100 p-grid p-align-center p-justify-center\">\r\n        <div class=\"w-100-p p-grid p-align-center p-justify-center\" *ngIf=\"!isloading\">\r\n            <i class=\"las-exclamation-triangle-solid font-24\"></i>\r\n        </div>\r\n        <!-- <p class=\"cav-m-0 cav-text-center\"><i class=\"fa fa-warning fa-4x\"></i></p> -->\r\n        <div class=\"w-100-p\">\r\n            <p class=\"text-center  font-weight-600\" *ngIf=\"!isloading\">No Test Run Usage Data Available</p>\r\n        </div>\r\n    </div>\r\n    \r\n               \r\n    <!-- \r\n                <div *ngIf=\"reportResult.length != 0\" class=\"p-grid p-align-center\" >\r\n                    <div class=\"mx-10 font-weight-600\">Download as:\r\n                    <button type=\"button\" class=\"btn-icon mr-5\" (click)=\"downloadReport('pdf')\" \r\n                        title=\"Download format(PDF)\"><i class=\"icons8 icons8-pdf-2\"></i> <span>PDF</span></button>\r\n                    <button type=\"button\" class=\"btn-icon mr-5 btn-link-green\" (click)=\"downloadReport('excel')\" \r\n                        title=\"Download format(XLS)\"><i class=\"   las-file-excel\"></i> <span>XLS</span></button>\r\n                    <button type=\"button\" class=\"btn-icon mr-5 \"  (click)=\"downloadReport('worddoc')\"\r\n                        title=\"Download format(DOC)\"><i class=\" icons8 icons8-doc\"></i> <span>DOC</span></button>\r\n                    </div>\r\n                </div> -->\r\n    \r\n           \r\n        \r\n    </div>\r\n    \r\n    <p-dialog header=\"Custom Time Filter\"  class=\"secondary-dialog\" [(visible)]=\"showCustomTimePop\" [style]=\"{width: '50vw'}\" [baseZIndex]=\"999\" [style]=\"{width: '400px'}\" [modal]=\"true\" [closable]=\"false\">\r\n        <div class=\"p-grid w-100-p p-align-center my-16\">\r\n            <div  class=\"p-col-4 p-col-nogutter \">Start Date Time:</div >\r\n                <div class=\"p-col-6 p-col-nogutter\">\r\n                    <p-calendar  appendTo=\"body\"  [monthNavigator]=\"true\" [yearNavigator]=\"true\"  inputStyleClass=\"w-100-p\"    [baseZIndex] = \"9999\" [showTime]=\"true\" [(ngModel)]=\"accountStartDate\" yearRange=\"2000:2050\" inputId=\"time\"></p-calendar>\r\n                </div>\r\n        </div>\r\n        <div class=\"p-grid w-100-p p-align-center my-16\">\r\n            <div  class=\"p-col-4 p-col-nogutter \">End Date Time:</div >\r\n                <div class=\"p-col-6 p-col-nogutter\">\r\n                   <p-calendar inputStyleClass=\"w-100-p\"  [monthNavigator]=\"true\" [yearNavigator]=\"true\" [showTime]=\"true\" appendTo=\"body\"     [baseZIndex] = \"9999\"  [(ngModel)]=\"accountEndDate\" yearRange=\"2000:2050\" inputId=\"time\"></p-calendar>\r\n                </div>\r\n        </div>\r\n        \r\n        \r\n        \r\n        <p-footer>\r\n            <div class=\"p-grid p-justify-end my-10\">  \r\n        <button type=\"button\" pButton label=\"Save\" (click) = \"save()\" ></button>\r\n        <button type=\"button\" pButton label=\"Cancel\" (click) = \"cancelPop()\" class=\"ui-button-secondary\"></button>\r\n        </div>\r\n        </p-footer>\r\n        </p-dialog>\r\n<p-sidebar [(visible)]=\"compareAccountSidebar\" [showCloseIcon]=\"false\" \r\n[style]=\"{'height':'calc(100vh - 40px)'}\" styleClass=\"zIndex\" position=\"bottom\" [modal]=\"false\">\r\n    <div class=\"sidebar-header\">\r\n        <div class=\"sidebar-title p-grid p-align-center p-justify-between\">\r\n            <div class=\"font-16\">Compare Account Usage Report</div>\r\n            <div class=\"action-icons\">\r\n                <i title=\"Close\" (click)=\"compareAccountSidebar = false\" class=\"icons8-delete font-20 font-weight-600\"></i></div>\r\n        </div>\r\n    </div>\r\n\r\n    <!-- <h1 class=\"px-15 font-weight-500\">Compare Account Report</h1> -->\r\n<div class=\"helpBody ns-scenario\">\r\n <div class=\"content_body\">\r\n    <div class=\"p-grid p-align-center p-justify-between mb-16\">\r\n        <label class=\"font-weight-600\">Client Name:{{this.clientName}}</label>\r\n        <!-- <p-multiSelect class=\"mx-6\" [options]=\"billingCycle\" [(ngModel)]=\"selectBillCycle\" [style]=\"{'min-width':'150px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-multiSelect> -->\r\n\r\n        <div class=\"p-grid p-align-center\">\r\n        <label class=\"ml-15\">View by</label>\r\n        <p-dropdown class=\"mx-6\" [options]=\"viewBy\" [(ngModel)]=\"selectViewBy\" [style]=\"{'min-width':'200px'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\r\n        <button type=\"button\" pButton label=\"Compare\" class=\"mx-6\" (click)=\"getBillingDetails()\"></button>\r\n    </div>\r\n    </div>\r\n\r\n    <app-account-compare-graph [series]=\"this.series\" [categories] =\"this.categories\" [text] =\"this.licenceType\" [textForXaxis]=\"this.textForXaxis\"></app-account-compare-graph>\r\n    \r\n </div>\r\n</div>\r\n</p-sidebar>\r\n";
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/accont-summary-report.module.ts":
  /*!***********************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/accont-summary-report.module.ts ***!
    \***********************************************************************************/

  /*! exports provided: AccontSummaryReportModule */

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

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


    __webpack_require__.d(__webpack_exports__, "AccontSummaryReportModule", function () {
      return AccontSummaryReportModule;
    });
    /* 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 _angular_forms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
    /*! @angular/forms */
    "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
    /* harmony import */


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


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


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


    var _components_account_summary_account_summary_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ./components/account-summary/account-summary.component */
    "./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.ts");
    /* harmony import */


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


    var _pipes_numberToString_pipe__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! ./pipes/numberToString.pipe */
    "./src/app/pages/home/account-summary-report/pipes/numberToString.pipe.ts");
    /* harmony import */


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


    var _services_account_summary_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
    /*! ./services/account-summary.service */
    "./src/app/pages/home/account-summary-report/services/account-summary.service.ts");
    /* harmony import */


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


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


    var _components_account_compare_graph_account_compare_graph_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(
    /*! ./components/account-compare-graph/account-compare-graph.component */
    "./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.ts");
    /* harmony import */


    var highcharts_angular__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(
    /*! highcharts-angular */
    "./node_modules/highcharts-angular/__ivy_ngcc__/fesm2015/highcharts-angular.js");

    var routes = [{
      path: '',
      component: _components_account_summary_account_summary_component__WEBPACK_IMPORTED_MODULE_7__["AccountSummaryComponent"]
    }];
    var components = [_components_account_summary_account_summary_component__WEBPACK_IMPORTED_MODULE_7__["AccountSummaryComponent"], _components_account_compare_graph_account_compare_graph_component__WEBPACK_IMPORTED_MODULE_14__["AccountCompareGraphComponent"]];

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

    AccontSummaryReportModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
      declarations: [components, _pipes_numberToString_pipe__WEBPACK_IMPORTED_MODULE_9__["NumberToString"]],
      imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["BlockUIModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["DialogModule"], primeng_messages__WEBPACK_IMPORTED_MODULE_12__["MessagesModule"], primeng_message__WEBPACK_IMPORTED_MODULE_13__["MessageModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["ProgressBarModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["ConfirmDialogModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["InputTextModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["ToastModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["CalendarModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["MultiSelectModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_6__["HelpModule"], src_app_shared_header_header_module__WEBPACK_IMPORTED_MODULE_5__["HeaderModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["PanelModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["TooltipModule"], primeng_treetable__WEBPACK_IMPORTED_MODULE_10__["TreeTableModule"], primeng__WEBPACK_IMPORTED_MODULE_4__["SidebarModule"], _angular_router__WEBPACK_IMPORTED_MODULE_8__["RouterModule"].forChild(routes), highcharts_angular__WEBPACK_IMPORTED_MODULE_15__["HighchartsChartModule"]],
      entryComponents: [_components_account_compare_graph_account_compare_graph_component__WEBPACK_IMPORTED_MODULE_14__["AccountCompareGraphComponent"]],
      providers: [_services_account_summary_service__WEBPACK_IMPORTED_MODULE_11__["AccountSummaryService"]],
      exports: [_pipes_numberToString_pipe__WEBPACK_IMPORTED_MODULE_9__["NumberToString"]]
    })], AccontSummaryReportModule);
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.scss":
  /*!*************************************************************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.scss ***!
    \*************************************************************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "app-account-compare-graph text.highcharts-credits {\n  display: none;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.ts":
  /*!***********************************************************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.ts ***!
    \***********************************************************************************************************************/

  /*! exports provided: AccountCompareGraphComponent */

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

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


    __webpack_require__.d(__webpack_exports__, "AccountCompareGraphComponent", function () {
      return AccountCompareGraphComponent;
    });
    /* 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 highcharts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! highcharts */
    "./node_modules/highcharts/highcharts.js");
    /* harmony import */


    var highcharts__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(highcharts__WEBPACK_IMPORTED_MODULE_2__);

    var AccountCompareGraphComponent = /*#__PURE__*/function () {
      function AccountCompareGraphComponent(ref) {
        _classCallCheck(this, AccountCompareGraphComponent);

        this.ref = ref;
        this.highcharts = highcharts__WEBPACK_IMPORTED_MODULE_2__;
        this.chartOptions = {};
        this.series = [];
        this.categories = [];
        this.text = '';
        this.textForXaxis = '';
        this.highcharts = highcharts__WEBPACK_IMPORTED_MODULE_2__;
      }

      return _createClass(AccountCompareGraphComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          console.log("====in NGoninit====");
          this.plotChart(); //  setTimeout(() => {
          //   this.ref.detectChanges();
          //   },100);
        }
      }, {
        key: "ngOnChanges",
        value: function ngOnChanges(changes) {
          try {
            console.log('changes============ ', changes);

            if (changes['series'] != undefined) {
              this.series = changes['series']['currentValue'];
              this.chartOptions = {};
            }

            if (changes['categories'] != undefined) {
              this.categories = changes['categories']['currentValue'];
              this.chartOptions = {};
            }

            this.plotChart();
          } catch (error) {
            console.error('exception in ngOnChanges ', error);
          }
        }
      }, {
        key: "plotChart",
        value: function plotChart() {
          try {
            console.log("inside plotchart");
            this.chartOptions = {
              chart: {
                type: 'column'
              },
              title: {
                text: 'Account Usage Billing Cycle'
              },
              xAxis: {
                categories: this.categories,
                crosshair: true,
                title: {
                  text: this.textForXaxis
                }
              },
              yAxis: {
                min: 0,
                title: {
                  text: this.text
                }
              },
              tooltip: {
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' + '<td style="padding:0"><b>{point.y:.1f}</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
              },
              plotOptions: {
                column: {
                  pointPadding: 0.2,
                  borderWidth: 0
                }
              },
              legend: {
                enabled: true,
                align: "right",
                verticalAlign: "middle",
                layout: "vertical"
              },
              series: this.series
            };
          } catch (e) {
            console.error("Error in plotting Chart", e);
          }
        }
      }]);
    }();

    AccountCompareGraphComponent.ctorParameters = function () {
      return [{
        type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], AccountCompareGraphComponent.prototype, "series", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], AccountCompareGraphComponent.prototype, "categories", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], AccountCompareGraphComponent.prototype, "text", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])()], AccountCompareGraphComponent.prototype, "textForXaxis", void 0);
    AccountCompareGraphComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
      selector: 'app-account-compare-graph',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./account-compare-graph.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./account-compare-graph.component.scss */
      "./src/app/pages/home/account-summary-report/components/account-compare-graph/account-compare-graph.component.scss"))["default"]]
    })], AccountCompareGraphComponent);
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.scss":
  /*!*************************************************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.scss ***!
    \*************************************************************************************************************/

  /*! exports provided: default */

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

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


    __webpack_exports__["default"] = "app-account-summary .main-div {\n  padding: 6px;\n}\napp-account-summary .text-uppercase {\n  text-transform: uppercase;\n}\napp-account-summary .clientBar {\n  background-color: var(--background_color_12);\n  border-style: solid;\n  border-width: 1px;\n}\napp-account-summary .net-panel .ui-panel-titlebar {\n  background-color: var(--background_color_12) !important;\n  border: solid 1px var(--background_color_7) !important;\n}\napp-account-summary .lrmTable2 .ui-table-caption {\n  background-color: var(--background_color_12) !important;\n  border: solid 1px var(--background_color_7) !important;\n  padding: 0.25em 0.75em;\n}\napp-account-summary .summery-in {\n  top: -41px;\n  position: relative;\n  display: inline-flex;\n}\napp-account-summary .zIndex {\n  z-index: 97 !important;\n}";
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.ts":
  /*!***********************************************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.ts ***!
    \***********************************************************************************************************/

  /*! exports provided: AccountSummaryComponent */

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

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


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


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


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


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


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


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


    var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);
    /* harmony import */


    var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
    /*! primeng */
    "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
    /* 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 _transaction_detail_services_cav_config_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
    /*! ../../../transaction-detail/services/cav-config.service */
    "./src/app/pages/home/transaction-detail/services/cav-config.service.ts");
    /* harmony import */


    var _services_account_summary_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
    /*! ../../services/account-summary.service */
    "./src/app/pages/home/account-summary-report/services/account-summary.service.ts");
    /* harmony import */


    var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
    /*! src/app/shared/cav-nav-bar/cav-nav-bar.service */
    "./src/app/shared/cav-nav-bar/cav-nav-bar.service.ts");

    var AccountSummaryComponent = /*#__PURE__*/function () {
      function AccountSummaryComponent( // private _dialog: MatDialog,
      _config, http, router, sessionService, messageService, accountSummaryService, cavNavBarService) {
        _classCallCheck(this, AccountSummaryComponent);

        this._config = _config;
        this.http = http;
        this.router = router;
        this.sessionService = sessionService;
        this.messageService = messageService;
        this.accountSummaryService = accountSummaryService;
        this.cavNavBarService = cavNavBarService;
        this.msgs1 = [];
        this.reportResult = [];
        this.repotCloum = [];
        this.testRunUsagecols = [];
        this.selectedrepotCloum = [];
        this.isShowSearch = false;
        this.ipPort = "";
        this.Duration = [];
        this.showCustomTimePop = false;
        this.searchData = "";
        this.selectedtestRunUsageCols = [];
        this.isPaginator = false;
        this.ctrlIpVal = [];
        this.selectTimePeriod = 'ALL';
        this.appNameList = [];
        this.tableData = [];
        this.lastRowData = [];
        this.isloading = false;
        this.expand = false;
        this.checkLocal = false;
        this.willexpire = false;
        this.selectBillCycle = [];
        this.selectViewBy = "";
        this.isSingleBillingCycle = true;
        this.callpending = false;
        this.text = "";
        this.textForXaxis = "Billing Cycle(s)";
        this.categories = [];
        this.series = [{
          name: '',
          data: []
        }, {
          name: '',
          data: []
        }, {
          name: '',
          data: []
        }, {
          name: '',
          data: []
        }, {
          name: '',
          data: []
        }];
        this.tooltipForCompareIcon = "";
        this.licenceType = "";
        this.isUnlimited = false;

        this.getDateFromStr = function (dateString) {
          return new Date(Date.parse(dateString));
        };

        this.rowdata = [];
        this.fieldArr = [];
        this.treeTableEnabled = false;
        this.groupByNone = false;
        this.topBarInfo = [];
        this.excelTitleRow = '';
        this.controllerIPLoaded = false;
        this.cavNavBarService.showNavBar = false;
      }

      return _createClass(AccountSummaryComponent, [{
        key: "ngOnInit",
        value: function ngOnInit() {
          var _this = this;

          setTimeout(function () {
            _this.msgs1 = [];
          }, 10000);
          this.getGeneratorServer(false);
          this.durationzforTestRunUsage = [];
          this.durationzforTestRunUsage = [{
            label: 'ALL',
            value: 'ALL'
          }, {
            label: '< 30 minutes',
            value: '<30m'
          }, {
            label: '> 30 minutes',
            value: '>30m'
          }, {
            label: '> 8 hours',
            value: '>8h'
          }];
          this.timePeriodVal = [{
            label: 'Overall',
            value: 'ALL'
          }, {
            label: 'Last 4 Hour ',
            value: '4HOUR'
          }, {
            label: 'Last 8 Hour ',
            value: '8HOUR'
          }, {
            label: 'Last 24 Hour ',
            value: '24HOUR'
          }, {
            label: 'This Week ',
            value: 'THISWEEK'
          }, {
            label: 'This Year ',
            value: 'THISYEAR'
          }, {
            label: 'This Month ',
            value: 'THISMONTH'
          }, {
            label: 'Last Week ',
            value: 'LASTWEEK'
          }, {
            label: 'Last Month ',
            value: 'LASTMONTH'
          }, {
            label: 'Last Year ',
            value: 'LASTYEAR'
          }];
          this.groupByVal = [{
            label: 'None',
            value: 'none'
          }, {
            label: 'Daily',
            value: 'daily'
          }, {
            label: 'Weekly',
            value: 'weekly'
          }, {
            label: 'Monthly',
            value: 'monthly'
          }, {
            label: 'Quaterly',
            value: 'quaterly'
          }, {
            label: 'Yearly',
            value: 'yearly'
          }];
          this.billingCycle = [// {label: 'Last Billing Cycle', value: 'last_bill_cycle'},
            // {label: '01/01/2021', value: '31/12/2021'},
            // {label: '01/01/2021', value: '31/01/2021'},
          ];
          this.viewBy = [{
            label: 'Billing Cycle',
            value: 'billing cycle'
          }, {
            label: 'Monthly',
            value: 'monthly'
          }];
          this.selectViewBy = 'billing cycle'; // this.ctrlIpVal=[{label:'ALL',value:'ALL'}]
          // this.selectCtrlIpVal = this.ctrlIpVal[0].value

          this.selectedDuration = this.durationzforTestRunUsage[0].value;
          this.selectGroupBy = this.groupByVal[0].value;
        } // openSchduler(){
        //   try {
        //     const mdDialog = this._dialog.open(accountSummarySchedulerComponent, {
        //       width: '700px'
        //     });
        //   } catch (error) {
        //     console.error("error in open schduler -->>>", error);
        //   }
        // }

      }, {
        key: "clickControllerIP",
        value: function clickControllerIP(event) {
          if (!this.controllerIPLoaded) this.getGeneratorServer(true);
        }
      }, {
        key: "cancelPop",
        value: function cancelPop() {
          try {
            this.showCustomTimePop = false;
            this.accountStartDate = this.previousAccountStartDate;
            this.accountEndDate = this.previousAccountEndDate;
          } catch (error) {
            console.error("error in cancelPop -->>>", error);
          }
        } //   exapandORcollapse(nodes) {
        //     if(this.expand == true)
        //     {
        //       this.expand =false;
        //     }
        //     else{
        //       this.expand = true ;
        //     }
        //     let arr :any;
        //    arr = document.getElementsByClassName("ui-treetable-toggler");
        //   for (let a of arr) {
        //       a.click();
        //   }
        // }

      }, {
        key: "exapandORcollapse",
        value: function exapandORcollapse(nodes) {
          if (this.expand == true) {
            this.expand = false;
          } else {
            this.expand = true;
          }

          var arr;
          arr = document.getElementsByClassName("ui-treetable-toggler");

          var _iterator = _createForOfIteratorHelper(arr),
              _step;

          try {
            for (_iterator.s(); !(_step = _iterator.n()).done;) {
              var a = _step.value;

              if (this.expand && a.children[0].className.indexOf('pi-chevron-down') != -1) // skip expand for already opened
                {
                  continue;
                } else if (this.expand == false && a.children[0].className.indexOf('pi-chevron-right') != -1) //skip already collapsed links 
                {
                  continue;
                }

              a.click();
            }
          } catch (err) {
            _iterator.e(err);
          } finally {
            _iterator.f();
          }
        }
      }, {
        key: "applyFilter",
        value: function applyFilter(value) {
          try {
            var selectedController = "";

            if (this.selectCtrlIpVal.length == 0) {
              selectedController = 'ALL';
            } else if (this.selectCtrlIpVal.length == 1) {
              selectedController = this.selectCtrlIpVal.toString();
            } else {
              selectedController = this.selectCtrlIpVal.map(function (item) {
                return "'".concat(item, "'");
              }).join(', ');
              console.log("Value of selected controller is-----", selectedController);
            }

            if (this.selectTimePeriod == 'ALL') {
              console.log("Timezone is -------------->", this.sessionService.selectedTimeZone);
              var json = {
                "client": this.clientName,
                "appname": this.selectAppName,
                "testDuration": this.selectedDuration,
                "controllerIP": selectedController,
                "currentTimePeriod": this.currentTime,
                "timePeriod": this.selectTimePeriod,
                "groupBy": this.selectGroupBy,
                "timezone": this.sessionService.selectedTimeZone['zoneLabel'],
                "isCommingFromCentralRepo": false,
                "isLicenseTypeUnlimited": this.isUnlimited
              };
              this.updateDataForReportUser(json, this.selectGroupBy);
            } else if (this.selectTimePeriod == 'CUSTOM') {
              var accountStartDate = this.getDateFromStr(this.accountStartDate).getTime() / 1000;
              var accountEndDate = this.getDateFromStr(this.accountEndDate).getTime() / 1000;
              var _json = {
                "client": this.clientName,
                "appname": this.selectAppName,
                "testDuration": this.selectedDuration,
                "controllerIP": selectedController,
                "currentTimePeriod": accountEndDate,
                "timePeriod": accountStartDate,
                "groupBy": this.selectGroupBy,
                "timezone": this.sessionService.selectedTimeZone['zoneLabel'],
                "isCommingFromCentralRepo": false,
                "isLicenseTypeUnlimited": this.isUnlimited
              };
              this.updateDataForReportUser(_json, this.selectGroupBy);
            } else if (this.selectTimePeriod.startsWith('Billing')) {
              this.billingCycleStart = this.getClientConfig['billingCycleDetails'][this.selectTimePeriod]['members']['StartTimeStamp'];
              this.billingCycleEnd = this.getClientConfig['billingCycleDetails'][this.selectTimePeriod]['members']['endTimeStamp'];

              if (this.billingCycleEnd == "0") {
                this.billingCycleEnd = this.currentTime;
              }

              var _json2 = {
                "client": this.clientName,
                "appname": this.selectAppName,
                "testDuration": this.selectedDuration,
                "controllerIP": selectedController,
                "currentTimePeriod": this.billingCycleEnd,
                "timePeriod": this.billingCycleStart,
                "groupBy": this.selectGroupBy,
                "timezone": this.sessionService.selectedTimeZone['zoneLabel'],
                "isCommingFromCentralRepo": false,
                "isLicenseTypeUnlimited": this.isUnlimited
              };
              this.updateDataForReportUser(_json2, this.selectGroupBy);
            } else {
              var _json3 = {
                "client": this.clientName,
                "appname": this.selectAppName,
                "testDuration": this.selectedDuration,
                "controllerIP": selectedController,
                "currentTimePeriod": this.currentTime,
                "timePeriod": this.selectedTime,
                "groupBy": this.selectGroupBy,
                "timezone": this.sessionService.selectedTimeZone['zoneLabel'],
                "isCommingFromCentralRepo": false,
                "isLicenseTypeUnlimited": this.isUnlimited
              };
              this.updateDataForReportUser(_json3, this.selectGroupBy);
            }

            if (this.checkTimeFilterFields()) {
              // let preset = "CUSTOM";
              var endDate = '';
              var startDate = ''; // let operationUI = "REPORT";
              // let operation = "REPORT";
              // if (value == "FILTER") {
              //   operation = "TABLE";
              //   operationUI = "VIEWUSER";
              // }
              // if (this.selectedDuration["code"] == "ALL") {
              //   preset = "ALL";
              // }
              // if (this.selectedDuration["code"] != "CUSTOM" && this.selectedDuration["code"] != "ALL") {
              //   let currentTime = new Date();
              //   // let timeZoneId: string = sessionStorage.getItem('timeZoneId');
              //   let today = new Date();
              //   today = this.convertTZ(currentTime, this.timeZoneId);
              //   this.accountStartDate = this.convertTZ(currentTime, this.timeZoneId);
              //   this.accountEndDate = this.convertTZ(currentTime, this.timeZoneId);
              // console.log("today.getDate() " + today.getDate());
              //   this.accountStartDate.setDate(today.getDate());
              //   this.accountEndDate.setDate(today.getDate());
              //   if (this.selectedDuration["code"] == "4HOUR") {
              //     this.accountStartDate.setHours(this.accountStartDate.getHours() - 4);
              //   }
              //   if (this.selectedDuration["code"] == "24HOUR") {
              //     this.accountStartDate.setDate(this.accountStartDate.getDate() - 1);
              //   }
              //   if (this.selectedDuration["code"] == "LASTWEEK") {
              //     this.accountStartDate.setDate(this.accountStartDate.getDate() - 7);
              //   }
              //   if (this.selectedDuration["code"] == "LASTMONTH") {
              //     this.accountStartDate.setMonth(this.accountStartDate.getMonth() - 1);
              //   }
              //   endDate = this.accountEndDate.toLocaleString("en-GB").replace(",", "");
              //   startDate = this.accountStartDate.toLocaleString("en-GB").replace(",", "");
              // }

              if (this.selectedDuration["value"] == "CUSTOM") {
                endDate = this.accountEndDate.toLocaleString("en-GB").replace(",", "");
                startDate = this.accountStartDate.toLocaleString("en-GB").replace(",", "");
              }
            }
          } catch (error) {
            console.error("error in applyFilter -->>>", error);
          }
        }
      }, {
        key: "save",
        value: function save() {
          if (!this.accountStartDate) {
            this.messageService.clear();
            this.messageService.add({
              key: 'msg',
              severity: 'error',
              summary: '',
              detail: 'Start Date cannot be blank',
              life: 10000
            });
            return false;
          }

          if (!this.accountEndDate) {
            this.messageService.clear();
            this.messageService.add({
              key: 'msg',
              severity: 'error',
              summary: '',
              detail: 'End Date cannot be blank',
              life: 10000
            });
            return false;
          }

          if (this.selectTimePeriod == "CUSTOM" && this.accountEndDate < this.accountStartDate) {
            this.messageService.clear();
            this.messageService.add({
              key: 'msg',
              severity: 'error',
              summary: '',
              detail: 'Start date/time can not be less than End date/time',
              life: 10000
            });
            return false;
          }

          this.showCustomTimePop = false;
        }
      }, {
        key: "customSort",
        value: function customSort(event) {
          event.data.sort(function (data1, data2) {
            var value1 = data1[event.field];
            var value2 = data2[event.field];
            var result = null;
            if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (event.field == "duration") {
              var valueArr1 = value1.split(" ");
              var valueArr2 = value2.split(" ");
              var valueInSec1 = 0;
              var valueInSec2 = 0;

              var _iterator2 = _createForOfIteratorHelper(valueArr1),
                  _step2;

              try {
                for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
                  var val = _step2.value;

                  if (val.endsWith("h")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('h'))) * (60 * 60);
                  } else if (val.endsWith("m")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('m'))) * 60;
                  } else if (val.endsWith("s")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('s')));
                  }
                }
              } catch (err) {
                _iterator2.e(err);
              } finally {
                _iterator2.f();
              }

              var _iterator3 = _createForOfIteratorHelper(valueArr2),
                  _step3;

              try {
                for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
                  var _val = _step3.value;

                  if (_val.endsWith("h")) {
                    valueInSec2 += Number.parseInt(_val.substring(0, _val.indexOf('h'))) * (60 * 60);
                  } else if (_val.endsWith("m")) {
                    valueInSec2 += Number.parseInt(_val.substring(0, _val.indexOf('m'))) * 60;
                  } else if (_val.endsWith("s")) {
                    valueInSec2 += Number.parseInt(_val.substring(0, _val.indexOf('s')));
                  }
                }
              } catch (err) {
                _iterator3.e(err);
              } finally {
                _iterator3.f();
              }

              result = valueInSec1 < valueInSec2 ? -1 : valueInSec1 > valueInSec2 ? 1 : 0;
            } else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
            return event.order * result;
          });
        }
      }, {
        key: "applyFilterforrefresh",
        value: function applyFilterforrefresh() {
          try {
            this.selectAppName = "ALL";
            this.selectedDuration = "ALL"; // this.selectCtrlIpVal = "ALL";

            this.selectTimePeriod = "ALL";
            this.selectGroupBy = "none";
            this.timePeriodVal = [{
              label: 'Overall',
              value: 'ALL'
            }, {
              label: 'Last 4 Hour ',
              value: '4HOUR'
            }, {
              label: 'Last 8 Hour ',
              value: '8HOUR'
            }, {
              label: 'Last 24 Hour ',
              value: '24HOUR'
            }, {
              label: 'This Week ',
              value: 'THISWEEK'
            }, {
              label: 'This Year ',
              value: 'THISYEAR'
            }, {
              label: 'This Month ',
              value: 'THISMONTH'
            }, {
              label: 'Last Week ',
              value: 'LASTWEEK'
            }, {
              label: 'Last Month ',
              value: 'LASTMONTH'
            }, {
              label: 'Last Year ',
              value: 'LASTYEAR'
            }];
            this.getGeneratorServer(false); //     let json = {
            //       "client": this.clientName,
            //       "appname": this.selectAppName,
            //       "testDuration": this.selectedDuration,
            //       "controllerIP": this.selectCtrlIpVal,
            //       "currentTimePeriod":this.currentTime,
            //       "timePeriod": this.selectTimePeriod,
            //       "groupBy":this.selectGroupBy,
            //       "timezone":this.sessionService.selectedTimeZone['zoneLabel'],
            //       "isCommingFromCentralRepo":false
            // }
            // this.updateDataForReportUser(json, this.selectGroupBy);
          } catch (error) {}
        }
      }, {
        key: "checkTimeFilterFields",
        value: function checkTimeFilterFields() {
          try {
            if (this.isEmpty(this.selectTimePeriod)) {
              this.showError("Duration is Mandatory ");
              return false;
            } else if (this.selectTimePeriod == "CUSTOM" && this.accountEndDate < this.accountStartDate) {
              this.showError('Start date/time can not be less than End date/time');
              return false;
            }

            return true;
          } catch (error) {
            console.error("error in checkTimeFilterFields --->>", error);
          }
        }
      }, {
        key: "resetFilter",
        value: function resetFilter() {
          try {
            this.selectedDuration = {
              label: 'All',
              value: 'All'
            };
            this.applyFilter("FILTER");
          } catch (error) {
            console.error("error in resetFilter  --->>", error);
          }
        }
      }, {
        key: "onFilterChange",
        value: function onFilterChange(event) {
          try {
            this.showCustomTimePop = false; // let sysTimeZoneOffset = new Date().getTimezoneOffset();
            // //reversing signs as in server timezone offset is opposite of timzone offset sign in user system.
            // sysTimeZoneOffset = sysTimeZoneOffset.toString().startsWith("-") ? parseInt(sysTimeZoneOffset.toString().substring(1)) : parseInt(`-${sysTimeZoneOffset.toString().substring(1)}`);
            // let sysTimeZoneOffsetInMS = sysTimeZoneOffset * 60 * 1000;
            //  let serverTimeZoneOffsetInMs = this.sessionService.getTimeZoneInfoFromlocalStorage().diffTimeStamp; //
            // let currentTime= Date.now() - (sysTimeZoneOffsetInMS - serverTimeZoneOffsetInMs);       
            // console.log("serverTimeZoneOffsetInMs",currentTime);
            // console.log("this.sessionService.session.defaults.serverTimeInfo",this.sessionService.session.defaults.serverTimeInfo);

            this.accountStartDate = null;
            this.accountEndDate = null;
            this.selectedTime = 0;
            if (event.value == '4HOUR') this.selectedTime = this.currentTime - 4 * 60 * 60;
            if (event.value == '8HOUR') this.selectedTime = this.currentTime - 8 * 60 * 60;
            if (event.value == '24HOUR') this.selectedTime = this.currentTime - 24 * 60 * 60;

            if (event.value === "LASTWEEK") {
              var curr = new Date(this.currentTime * 1000);
              var firstDayOfTheWeek = new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() - (curr.getDay() + 7), 0, 0, 0);
              var lastDayOfTheWeek = new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() - curr.getDay(), 0, 0, 0);
              this.selectedTime = firstDayOfTheWeek.getTime() / 1000;
              this.currentTime = lastDayOfTheWeek.getTime() / 1000;
            } //Last 7 days
            // this.selectedTime = this.currentTime - (7 * 24 * 60 * 60);


            if (event.value === "LASTMONTH") {
              var _curr = new Date(this.currentTime * 1000);

              var year = _curr.getFullYear(),
                  month = _curr.getMonth() - 1;

              var firstDayOfTheMonth = new Date(year, month, 1);
              var lastDayOfTheMonth = new Date(year, month + 1, 1);
              this.selectedTime = firstDayOfTheMonth.getTime() / 1000;
              this.currentTime = lastDayOfTheMonth.getTime() / 1000;
            } //Last 30 days
            // this.selectedTime = this.currentTime - (30 * 24 * 60 * 60);


            if (event.value == 'LASTYEAR') {
              var _curr2 = new Date(this.currentTime * 1000);

              var _year = _curr2.getFullYear();

              var firstDayOfTheYear = new Date(_year - 1, 0, 1);
              var lastDayOfTheYear = new Date(_year, 0, 1);
              this.selectedTime = firstDayOfTheYear.getTime() / 1000;
              this.currentTime = lastDayOfTheYear.getTime() / 1000;
            } // this.selectedTime = this.currentTime - (365 * 24 * 60 * 60);
            // if(event.value == 'CUSTOM')
            //   this.showCustomTimePop = true;


            if (event.value == 'THISWEEK') {
              var _curr3 = new Date(this.currentTime * 1000);

              var _firstDayOfTheWeek = new Date(_curr3.getFullYear(), _curr3.getMonth(), _curr3.getDate() - _curr3.getDay(), 0, 0, 0);

              this.selectedTime = _firstDayOfTheWeek.getTime() / 1000;
            }

            if (event.value == 'THISMONTH') {
              var _curr4 = new Date(this.currentTime * 1000);

              var _year2 = _curr4.getFullYear(),
                  _month = _curr4.getMonth();

              var _firstDayOfTheMonth = new Date(_year2, _month, 1);

              this.selectedTime = _firstDayOfTheMonth.getTime() / 1000;
            }

            if (event.value == 'THISYEAR') {
              var _curr5 = new Date(this.currentTime * 1000);

              var _year3 = _curr5.getFullYear();

              var _firstDayOfTheYear = new Date(_year3, 0, 1);

              this.selectedTime = _firstDayOfTheYear.getTime() / 1000;
            }
          } catch (error) {
            console.error("error in onFilterChange --->>", error);
          }
        }
      }, {
        key: "convertTZ",
        value: function convertTZ(date, tzString) {
          return new Date((typeof date === "string" ? new Date(date) : date).toLocaleString("en-US", {
            timeZone: tzString
          }));
        }
      }, {
        key: "showError",
        value: function showError(meassage) {
          this.msgs = [];
          this.msgs.push({
            severity: 'error',
            summary: 'Error Message:-',
            detail: meassage
          });
        }
      }, {
        key: "isEmpty",
        value: function isEmpty(obj) {
          return Object.keys(obj).length === 0;
        }
      }, {
        key: "downloadReport",
        value: function downloadReport(value) {
          var _this2 = this;

          try {
            // let header = ['Test Run','Controller IP','Start Time','End Date/Time','Status','Client','Application','Message','Consumed VUH',"Run Time",'Scenario','Test Owner','Test Stopped By','Max Vuser','Avg Vuser','Max Page Views/Min','Avg Page Views/Min','Max PageView/Sec','Avg PageView/Sec','Total Url Hits','Max TPS','Avg TPS' ,'Total Transactions','Max Vusers Hours','Avg Vusers Hours','Total Page Views' ];
            var columnArr = [];
            this.rowdata = [];
            this.fieldArr = [];
            columnArr.push('#');
            this.selectedtestRunUsageCols.forEach(function (element) {
              columnArr.push(element['header'] + "");

              _this2.fieldArr.push(element['field'] + "");
            });
            var data = lodash__WEBPACK_IMPORTED_MODULE_4__["cloneDeep"](this.reportResult);

            if (data.length > 0) {
              for (var j = 0; j < data.length; j++) {
                var tableValues = [];
                tableValues.push(j + "");

                for (var i = 0; i <= this.fieldArr.length - 1; i++) {
                  if (this.fieldArr[i] == 'starttimestamp' || this.fieldArr[i] == 'endtimestamp') data[j][this.fieldArr[i]] = this.sessionService.convertTimestampIntoFormattedString(Number(data[j][this.fieldArr[i]]) * 1000);
                  tableValues.push(data[j][this.fieldArr[i]] + "");
                }

                tableValues.push('');
                console.log("Table values are ------ ", tableValues);
                this.rowdata.push(tableValues);
              }

              var lastRow = [];
              lastRow.push('');

              for (var _i = 0; _i < this.fieldArr.length; _i++) {
                if (this.lastRowData[0][this.fieldArr[_i]] == undefined) {
                  this.lastRowData[0][this.fieldArr[_i]] = '';
                }

                lastRow.push(this.lastRowData[0][this.fieldArr[_i]] + "");
              }

              lastRow.push('');
              this.rowdata.push(lastRow);
              console.log("this.fieldArr", this.fieldArr);
              console.log("-----------", this.rowdata);
            } else {
              var _data = lodash__WEBPACK_IMPORTED_MODULE_4__["cloneDeep"](this.tableData);

              this.downloadTreeTable(_data);
              var _lastRow = [];

              _lastRow.push('');

              for (var _i2 = 0; _i2 < this.fieldArr.length; _i2++) {
                if (this.lastRowData[0][this.fieldArr[_i2]] == undefined) {
                  this.lastRowData[0][this.fieldArr[_i2]] = '';
                }

                _lastRow.push(this.lastRowData[0][this.fieldArr[_i2]] + "");
              }

              console.log("Value of last row", _lastRow);

              _lastRow.push('');

              this.rowdata.push(_lastRow);
            }

            var titleArr = [];
            var selectedTestRunFilter = "App Name: " + this.selectAppName + "    Duration: " + this.selectedDuration + "      Controller IP: " + this.selectCtrlIpVal + "        Time Period: " + this.selectTimePeriod + "          Group By: " + this.selectGroupBy;
            titleArr.push(this.excelTitleRow);
            console.log("Excel Title row is -----", this.excelTitleRow);
            titleArr.push(selectedTestRunFilter);

            if (this.Report['_totalRecords']) {
              if (this.treeTableEnabled && !this.groupByNone) {
                titleArr.push("Test Runs as per filter(Count " + this.tableData.length + ")");
              } else {
                titleArr.push("Test Runs as per filter(Count " + this.reportResult.length + ")");
              }
            }

            var json = {
              cctx: this.sessionService.session.cctx,
              type: value,
              arrParaList: [titleArr],
              skipColumn: "",
              title: "Account Usage Report",
              rowData: this.rowdata,
              header: columnArr,
              forReport: 'accountSummary'
            };
            console.log("Value of cctx is --------", this.sessionService.session.cctx);
            var url = this._config.$serverIP + "DashboardServer/v2/web/download/data";
            this.http.post(url, json).subscribe(function (response) {
              var path = response['path'];
              var url = window.location.protocol + '//' + window.location.host;
              path = url + "/common/" + path;
              window.open(path + '?productKey=' + _this2.sessionService.session.cctx.pk + "#page=1&zoom=100", "_blank");
            }, function (error) {
              // temp.unsubscribe();^M
              _this2.messageService.add({
                key: 'msg',
                severity: 'error',
                summary: '',
                detail: "Not able to connect with CR for given configuration",
                life: 10000
              });
            });
          } catch (error) {
            console.error("error in downloadReport --->>>", error);
          }
        }
      }, {
        key: "downloadTreeTable",
        value: function downloadTreeTable(tableData) {
          for (var j = 0; j < tableData.length; j++) {
            var tableValues = [];
            tableValues.push(j + "");

            for (var i = 0; i <= this.fieldArr.length - 1; i++) {
              if (this.fieldArr[i] == 'starttimestamp' || this.fieldArr[i] == 'endtimestamp') {
                if (tableData[j]['data'][this.fieldArr[i]]) tableData[j]['data'][this.fieldArr[i]] = this.sessionService.convertTimestampIntoFormattedString(Number(tableData[j]['data'][this.fieldArr[i]]) * 1000);
              }

              tableValues.push(tableData[j]['data'][this.fieldArr[i]] + "");
            }

            tableValues.push('');
            this.rowdata.push(tableValues);
            if (tableData[j].children) this.downloadTreeTable(tableData[j].children);
          }

          console.log("Outside for loop", this.rowdata);
        }
      }, {
        key: "updateDataForReportUser",
        value: function updateDataForReportUser(json, selectedGrp) {
          var _this3 = this;

          try {
            this.treeTableEnabled = false;
            this.groupByNone = false;
            this.isloading = true;
            this.tableData = [];
            this.reportResult = [];
            this.selectedtestRunUsageCols = [];
            this.lastRowData = [];
            this.testRunUsagecols = []; // let url =  this._config.$serverIP + "DashboardServer/Cavisson/accountSummaryService/getAccountSummaryReport?productKey="+this.sessionService.session.cctx.pk;
            // console.log("Control is coming in updateDataForReportUser function----");
            // this.http.post(url, json).subscribe(

            this.accountSummaryService.getDataFromRESTUsingPOSTReq("getAccountSummaryReport", "", json, "/DashboardServer/Cavisson/accountSummaryService/", this.sessionService.preSession.dcData.filter(function (e) {
              return e.master;
            }).map(function (e) {
              return e.name;
            })[0]).subscribe(function (response) {
              //   response['columnHeaderList'] = {
              //     "key": "Group By",
              //     "testrun": "Test Run",
              //     "maxvuser": "Max VUser",
              //     "duration": "Test Duration",
              //     "starttimestamp": "Start Time",
              //     "endtimestamp": "End Time",
              //     "teststatus": "Test Status",
              //     "totaltx": "Total Transaction",
              //     "avgvuser": "Avg Vuser",
              //   "avgtps": "Avg TPS",
              //   "maxpageviewpersec": "Max Page View/Sec",
              //   "avgvuserperhr": "Avg user/Hour",
              //   "appname": "App Name",
              //   "clientname": "Client Name",
              //   "genCount": "Generator Count",
              //   "teststoppedby": "Test Stopped By",
              //   "avgpagepermin": "Avg Vuser",
              //   "maxtps": "Max TPS",
              //   "maxpagepermin": "Max VUser",
              //   "maxvuserperhr": "Max User/Hour",
              //   "testowner": "Test Owner",
              //   "totalurlhits": "Total URL Hits",
              //   "consumedvuh": "Consumed VUH",
              //   "scenarioname": "Scenario Name",
              //   "controllerip": "Controller IP",
              //   "teststatusmessage": "Test Status Message",
              //   "avgpageviewpersec": "Avg Page View/Sec",
              //   "totalpageview": "Total Page View"
              // }
              _this3.isloading = false;

              if (response['statuscode'] == 200) {
                if (response != undefined) {
                  _this3.licenceType = response['licenseType'];
                  _this3.checkLocal = response['dataFromLocal'];
                  var arrOfColumns = Object.keys(response['columnHeaderList']['members']);
                  arrOfColumns.forEach(function (element) {
                    // if(element == 'appname' || element == 'maxtps' || element == 'avgvuserperhr')
                    //   return;
                    _this3.testRunUsagecols.push({
                      field: element,
                      header: response['columnHeaderList']['members'][element],
                      width: '25%'
                    });
                  });
                  var arrOfDefaultColumns = Object.keys(response['defaultcolumnHeaderList']['members']);
                  arrOfDefaultColumns.forEach(function (element) {
                    _this3.selectedtestRunUsageCols.push({
                      field: element,
                      header: response['defaultcolumnHeaderList']['members'][element],
                      width: '25%'
                    });
                  }); // this.testRunUsagecols.splice(this.testRunUsagecols.length -1,1)

                  console.log("this.testRunUsagecols", _this3.testRunUsagecols);
                  _this3.testRunUsagecols = _this3.removeColFromArr(_this3.testRunUsagecols, ['genCount', 'key']);
                  _this3.selectedtestRunUsageCols = _this3.removeColFromArr(_this3.selectedtestRunUsageCols, ['genCount', 'key']); // this.selectedtestRunUsageCols = [
                  //   { field: "testrun", header: "Test Run",width:'25%' },
                  //   { field: "controllerip", header: "Controller IP",width:'25%' },
                  //   { field: 'starttimestamp', header: 'Start Time',width:'25%' },
                  //   { field: 'duration', header: 'Test Duration',width:'25%' },
                  //   { field: 'teststatus', header: 'Test Status',width:'25%' },
                  //   { field: 'scenarioname', header: 'Scenario Name',width:'25%' },
                  //   { field: 'testowner', header: 'Test Owner' ,width:'25%'},
                  //   { field: 'maxvuser', header: 'Max VUser',width:'25%' },
                  //   { field: 'maxpageviewpersec', header: 'Max Page View/Sec',width:'25%' },
                  //   { field: 'avgpageviewpersec', header: 'Avg Page View/Sec',width:'25%' },
                  //   { field: 'totalurlhits', header: 'Total URL Hits',width:'25%' },
                  //   { field: 'avgtps', header: 'Avg TPS',width:'25%' },
                  //   { field: 'totaltx', header: 'Total Transaction' ,width:'25%'},
                  //   { field: 'maxvuserperhr', header: 'Max User/Hour',width:'25%' },
                  //   { field: 'totalpageview', header: 'Total Page View',width:'25%' },
                  //   // { field: 'genCount', header: 'Generator Count',width:'25%' }
                  // ]

                  console.log("this.selectedtestRunUsageCols", _this3.selectedtestRunUsageCols);

                  if (selectedGrp != 'none') {
                    if (selectedGrp == 'daily') {
                      _this3.tableData = response['treeNodeStructure']['data'];
                      if (response['treeNodeStructure']['data'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                      _this3.treeTableEnabled = true;
                      _this3.groupByNone = false;

                      _this3.selectedtestRunUsageCols.unshift({
                        field: 'key',
                        header: 'Daily',
                        width: '25%'
                      }); // this.testRunUsagecols.splice(0,1);


                      _this3.testRunUsagecols.unshift({
                        field: 'key',
                        header: 'Daily',
                        width: '25%'
                      });
                    } else if (selectedGrp == 'weekly') {
                      _this3.tableData = response['treeNodeStructure']['data'];
                      if (response['treeNodeStructure']['data'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                      _this3.treeTableEnabled = true;
                      _this3.groupByNone = false;

                      _this3.selectedtestRunUsageCols.unshift({
                        field: 'key',
                        header: 'Weekly',
                        width: '25%'
                      }); // this.testRunUsagecols.splice(0,1);


                      _this3.testRunUsagecols.unshift({
                        field: 'key',
                        header: 'Weekly',
                        width: '25%'
                      });
                    } else if (selectedGrp == 'monthly') {
                      _this3.tableData = response['treeNodeStructure']['data'];
                      if (response['treeNodeStructure']['data'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                      _this3.treeTableEnabled = true;
                      _this3.groupByNone = false;

                      _this3.selectedtestRunUsageCols.unshift({
                        field: 'key',
                        header: 'Monthly',
                        width: '25%'
                      }); // this.testRunUsagecols.splice(0,1);


                      _this3.testRunUsagecols.unshift({
                        field: 'key',
                        header: 'Monthly',
                        width: '25%'
                      });
                    } else if (selectedGrp == 'quaterly') {
                      _this3.tableData = response['treeNodeStructure']['data'];
                      if (response['treeNodeStructure']['data'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                      _this3.treeTableEnabled = true;
                      _this3.groupByNone = false;

                      _this3.selectedtestRunUsageCols.unshift({
                        field: 'key',
                        header: 'Quaterly',
                        width: '25%'
                      }); // this.testRunUsagecols.splice(0,1);


                      _this3.testRunUsagecols.unshift({
                        field: 'key',
                        header: 'Quaterly',
                        width: '25%'
                      });
                    } else if (selectedGrp == 'yearly') {
                      _this3.tableData = response['treeNodeStructure']['data'];
                      if (response['treeNodeStructure']['data'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                      _this3.treeTableEnabled = true;
                      _this3.groupByNone = false;

                      _this3.selectedtestRunUsageCols.unshift({
                        field: 'key',
                        header: 'Yearly',
                        width: '25%'
                      }); // this.testRunUsagecols.splice(0,1);


                      _this3.testRunUsagecols.unshift({
                        field: 'key',
                        header: 'Yearly',
                        width: '25%'
                      });
                    }
                  } else {
                    _this3.reportResult = response['accountSummaryData'];
                    _this3.treeTableEnabled = false;
                    _this3.groupByNone = true; // this.testRunUsagecols.splice(0,1);

                    if (response['accountSummaryData'].length > 0) _this3.lastRowData.push(response['OverallSummary']);
                  }

                  _this3.reportResultAvl = true;
                }

                if (_this3.reportResult.length > 20) {
                  _this3.isPaginator = true;
                } else {
                  _this3.isPaginator = false;
                }
              } else {
                _this3.reportResultAvl = false;
              }
            }, function (error) {
              // temp.unsubscribe();^M
              _this3.messageService.add({
                key: 'msg',
                severity: 'error',
                summary: '',
                detail: "Not able to connect with CR for given configuration",
                life: 10000
              });
            });
          } catch (error) {
            this.isloading = false;
            console.error("error in updateData --->>", error);
          }
        }
        /**
        *
        * @param array array of columns
        * @param listOfCol array of columns to remove.
        * @returns
        */

      }, {
        key: "removeColFromArr",
        value: function removeColFromArr(array, listOfCol) {
          return array.filter(function (ele) {
            return listOfCol.indexOf(ele.field) > -1 ? false : true;
          });
        }
      }, {
        key: "getColFieldForFiltering",
        value: function getColFieldForFiltering(col) {
          if (col == "starttimestamp") return "startTimeInFormat";else if (col == "endtimestamp") return "endTimeInFormat";else return col;
        }
      }, {
        key: "customSortfortestrunusage",
        value: function customSortfortestrunusage(event, ttEnabled) {
          // column -> test duration -> else event.data.sort();
          event.data.sort(function (data1, data2) {
            var value1 = ttEnabled == 1 ? data1['data'][event.field] : data1[event.field];
            var value2 = ttEnabled == 1 ? data2['data'][event.field] : data2[event.field];
            var result = null;
            if (value1 == null && value2 != null) result = -1;else if (value1 != null && value2 == null) result = 1;else if (value1 == null && value2 == null) result = 0;else if (event.field == "duration") {
              var valueArr1 = value1.split(" ");
              var valueArr2 = value2.split(" ");
              var valueInSec1 = 0;
              var valueInSec2 = 0;

              var _iterator4 = _createForOfIteratorHelper(valueArr1),
                  _step4;

              try {
                for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
                  var val = _step4.value;

                  if (val.endsWith("h")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('h'))) * (60 * 60);
                  } else if (val.endsWith("m")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('m'))) * 60;
                  } else if (val.endsWith("s")) {
                    valueInSec1 += Number.parseInt(val.substring(0, val.indexOf('s')));
                  }
                }
              } catch (err) {
                _iterator4.e(err);
              } finally {
                _iterator4.f();
              }

              var _iterator5 = _createForOfIteratorHelper(valueArr2),
                  _step5;

              try {
                for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
                  var _val2 = _step5.value;

                  if (_val2.endsWith("h")) {
                    valueInSec2 += Number.parseInt(_val2.substring(0, _val2.indexOf('h'))) * (60 * 60);
                  } else if (_val2.endsWith("m")) {
                    valueInSec2 += Number.parseInt(_val2.substring(0, _val2.indexOf('m'))) * 60;
                  } else if (_val2.endsWith("s")) {
                    valueInSec2 += Number.parseInt(_val2.substring(0, _val2.indexOf('s')));
                  }
                }
              } catch (err) {
                _iterator5.e(err);
              } finally {
                _iterator5.f();
              }

              result = valueInSec1 < valueInSec2 ? -1 : valueInSec1 > valueInSec2 ? 1 : 0;
            } else if (typeof value1 === 'string' && typeof value2 === 'string') result = value1.localeCompare(value2);else result = value1 < value2 ? -1 : value1 > value2 ? 1 : 0;
            return event.order * result;
          });
        }
      }, {
        key: "showHideSearch",
        value: function showHideSearch() {
          this.searchData = "";
          this.Report.reset();
          this.isShowSearch = !this.isShowSearch;
        }
      }, {
        key: "getGeneratorServer",
        value: function getGeneratorServer(forControllerIp) {
          var _this4 = this;

          try {
            this.isloading = true;
            var json = {};
            this.currentTime = new Date(new Date(this.sessionService.time).toUTCString()).getTime() / 1000;
            var licenceTypePerBillingCycle; // let ip = this._config.$serverIP + 'DashboardServer/Cavisson/accountSummaryService/getClientConfig?forControllerIp='+forControllerIp + '&productKey=' + this.sessionService.session.cctx.pk;

            return this.accountSummaryService.getDataByRestAPI('getClientConfig?forControllerIp=' + forControllerIp, '/DashboardServer/Cavisson/accountSummaryService/', this.sessionService.preSession.dcData.filter(function (e) {
              return e.master;
            }).map(function (e) {
              return e.name;
            })[0]).subscribe( // return  this.http.get(ip).subscribe(
            function (result) {
              _this4.isloading = false;
              _this4.getClientConfig = result;

              if (result['pendingTestRun'] != "") {
                var msg = "Usages data for some of the TRs" + "<" + result['pendingTestRun'] + ">" + "are not updated, due to some internal failure. Please connect to Cavisson Administrator.";

                _this4.msgs1.push({
                  severity: 'info',
                  summary: '',
                  detail: msg
                });
              }

              console.log("lenth of timePeriod value before==>", _this4.timePeriodVal.length, _this4.timePeriodVal);

              if (result['status'] == 'ERROR') {
                _this4.appNameList.push({
                  label: 'ALL',
                  value: 'ALL'
                });

                _this4.selectAppName = _this4.appNameList[0].value;

                _this4.messageService.add({
                  key: 'msg',
                  severity: 'error',
                  summary: '',
                  detail: result['message'],
                  life: 10000
                });
              } else if (result['status'] == 'INFO') {
                _this4.messageService.add({
                  key: 'msg',
                  severity: 'info',
                  summary: '',
                  detail: result['message'],
                  life: 10000
                });
              } else {
                if (!forControllerIp) {
                  var totalvalueVUH = 0;
                  var totaltrans = 0;
                  var totalpageview = 0;
                  var threshold = 0;
                  _this4.topBarInfo = [];
                  _this4.excelTitleRow = '';
                  _this4.appNameList = [];
                  _this4.clientName = result['client'];
                  _this4.dbIp = result['dbiP'];
                  result['appname'].forEach(function (element) {
                    _this4.appNameList.push({
                      label: element,
                      value: element
                    });
                  });
                  _this4.selectAppName = _this4.appNameList[0].value;
                  totalvalueVUH = Number(result['summary']['Total VUH']);
                  totaltrans = Number(result['summary']['Total Transaction Allocated']);
                  totalpageview = Number(result['summary']['Total Page View']);
                  threshold = Number(result['summary']['throldPerForCvuh']);

                  for (var key in result['summary']) {
                    if (key == 'License Period') {
                      var startEndLicense = result['summary'][key].split("-");

                      if (startEndLicense[1] == "0") {
                        result['summary'][key] = "Unlimited";
                        _this4.willexpire = true;
                      } else {
                        _this4.willexpire = false;
                        startEndLicense[0] = _this4.sessionService.convertTimestampIntoFormattedString(Number(startEndLicense[0]) * 1000, "MM/DD/YYYY");
                        startEndLicense[1] = _this4.sessionService.convertTimestampIntoFormattedString(Number(startEndLicense[1]) * 1000, "MM/DD/YYYY");
                        result['summary'][key] = startEndLicense[0] + ' - ' + startEndLicense[1];
                        var curr = new Date(_this4.currentTime * 1000);
                        var currDate = curr.getMonth() + 1 + "/" + curr.getDate() + "/" + curr.getFullYear();
                        var Difference_In_Time = new Date(startEndLicense[1]).getTime() - curr.getTime(); // To calculate the no. of days between two dates

                        _this4.Difference_In_Days = Math.round(Difference_In_Time / (1000 * 3600 * 24)) + 1;
                      }
                    }

                    var isNegative = false;
                    var alertinfo = false;
                    var alertpercent = "";
                    var alertmsg = "";

                    if (key != 'isClientAvailable' && key != 'throldPerForCvuh') {
                      if (key == 'Remaining VUH') {
                        if (result['summary']['Remaining VUH'].toString().indexOf('-') != -1) {
                          isNegative = true;
                          alertinfo = true;
                          alertmsg = "Your balance is over. please top up your account.";
                        } else {
                          alertpercent = (Number(result['summary']['Remaining VUH']) / totalvalueVUH * 100).toFixed(2);
                          alertmsg = "Remaining balance is" + alertpercent + "%. Please top-up your account.";

                          if (Number(alertpercent) < threshold) {
                            alertinfo = true;

                            _this4.messageService.add({
                              key: 'msg',
                              severity: 'warn',
                              summary: '',
                              detail: alertmsg,
                              life: 10000
                            });
                          }

                          isNegative = false;
                        }
                      } else if (key == 'Remaining Transaction') {
                        if (result['summary']['Remaining Transaction'].toString().indexOf('-') != -1) {
                          isNegative = true;
                          alertinfo = true;
                          alertmsg = "Your balance is over. please top up your account.";
                        } else {
                          alertpercent = (Number(result['summary']['Remaining Transaction']) / totaltrans * 100).toFixed(2);
                          alertmsg = "Remaining balance is" + alertpercent + "%. Please top-up your account.";

                          if (Number(alertpercent) < threshold) {
                            alertinfo = true;

                            _this4.messageService.add({
                              key: 'msg',
                              severity: 'warn',
                              summary: '',
                              detail: alertmsg,
                              life: 10000
                            });
                          }

                          isNegative = false;
                        }
                      } else if (key == 'Remaining Page View') {
                        if (result['summary']['Remaining Page View'].toString().indexOf('-') != -1) {
                          isNegative = true;
                          alertinfo = true;
                          alertmsg = "Your balance is over. please top up your account.";
                        } else {
                          alertpercent = (Number(result['summary']['Remaining Page View']) / totalpageview * 100).toFixed(2);
                          alertmsg = "Remaining balance is" + alertpercent + "%. Please top-up your account.";

                          if (Number(alertpercent) < threshold) {
                            alertinfo = true;

                            _this4.messageService.add({
                              key: 'msg',
                              severity: 'warn',
                              summary: '',
                              detail: alertmsg,
                              life: 10000
                            });
                          }

                          isNegative = false;
                        }
                      } else {
                        isNegative = false;
                      }

                      if (key == 'Total VUH' || key == 'Total Page View' || key == 'Total Transaction Allocated') {
                        var value = result['summary'][key];

                        if (value == 'Unlimited') {
                          _this4.isUnlimited = true;
                        }
                      }

                      if (key == 'Total VUH' || key == 'Remaining VUH') {
                        result['summary'][key] = isNaN(Number(result['summary'][key])) ? result['summary'][key] : Number(result['summary'][key]).toLocaleString('en-US');
                      }

                      var isNumField = isNaN(Number.parseInt(result['summary'][key])) ? false : true;

                      _this4.topBarInfo.push({
                        label: key,
                        value: result['summary'][key],
                        isNumField: isNumField,
                        isNegative: isNegative,
                        alertinfo: alertinfo,
                        alertmsg: alertmsg
                      });
                    }

                    if (key != 'isClientAvailable') {
                      _this4.excelTitleRow += "".concat(key, ": ").concat(result['summary'][key], "        ");
                    }
                  }

                  if (result['billingCycleDetails']) {
                    var _value = 0; // taken flag for Compare billing cycle 

                    for (var _key in result['billingCycleDetails']) {
                      _value++;
                      _this4.billingCycleStart = result['billingCycleDetails'][_key]['members']['StartTimeStamp'];
                      _this4.billingCycleEnd = result['billingCycleDetails'][_key]['members']['endTimeStamp'];
                      licenceTypePerBillingCycle = result['billingCycleDetails'][_key]['members']['licenceType'];

                      if (_this4.billingCycleEnd == "0") {
                        _this4.timePeriodVal.push({
                          label: _key + '(Unlimited)',
                          value: _key
                        });

                        _this4.billingCycle.push({
                          label: _key + '(Unlimited)',
                          value: _this4.billingCycleStart + "-" + _this4.currentTime + ":" + licenceTypePerBillingCycle
                        });
                      } else {
                        var start = _this4.sessionService.convertTimestampIntoFormattedString(Number(_this4.billingCycleStart) * 1000, "MM/DD/YYYY");

                        var end = _this4.sessionService.convertTimestampIntoFormattedString(Number(_this4.billingCycleEnd) * 1000, "MM/DD/YYYY");

                        _this4.timePeriodVal.push({
                          label: _key + '( ' + start + ' - ' + end + ' )',
                          value: _key
                        });

                        _this4.billingCycle.push({
                          label: _key + '( ' + start + ' - ' + end + ' )',
                          value: _this4.billingCycleStart + "-" + _this4.billingCycleEnd + ":" + licenceTypePerBillingCycle
                        });
                      }
                    }

                    if (_value <= 1) {
                      _this4.tooltipForCompareIcon = "Onle one Billing Cycle exist,Unable to compare";
                      _this4.isSingleBillingCycle = true;
                    } else {
                      _this4.isSingleBillingCycle = false;
                    }

                    console.log("lenth of timePeriod value ", _this4.timePeriodVal.length, _this4.timePeriodVal);
                  }

                  _this4.timePeriodVal.push({
                    label: 'Custom',
                    value: 'CUSTOM'
                  });

                  console.log("lenth of timePeriod value before==>", _this4.timePeriodVal.length, _this4.timePeriodVal);

                  _this4.messageService.add({
                    key: 'msg',
                    severity: 'success',
                    summary: '',
                    detail: result['message'],
                    life: 10000
                  });
                } else if (forControllerIp) {
                  if (result['controllerIPList']) {
                    result['controllerIPList'].forEach(function (element) {
                      _this4.ctrlIpVal.push({
                        label: element,
                        value: element
                      });
                    }); // this.selectCtrlIpVal = this.ctrlIpVal[0].value

                    _this4.isloading = false;
                    _this4.controllerIPLoaded = true;
                  }
                }
              }

              var json = {
                "client": _this4.clientName,
                "appname": _this4.selectAppName,
                "testDuration": _this4.selectedDuration,
                "controllerIP": 'ALL',
                "currentTimePeriod": _this4.currentTime,
                "timePeriod": _this4.selectTimePeriod,
                "groupBy": _this4.selectGroupBy,
                "timezone": _this4.sessionService.selectedTimeZone['zoneLabel'],
                "isCommingFromCentralRepo": false,
                "isLicenseTypeUnlimited": _this4.isUnlimited
              };
              if (!forControllerIp) _this4.updateDataForReportUser(json, _this4.selectGroupBy);
            }, function (error) {
              // temp.unsubscribe();
              _this4.isloading = false;

              _this4.messageService.add({
                key: 'msg',
                severity: 'error',
                summary: '',
                detail: "Not able to connect with CR for given configuration",
                life: 10000
              });
            }, function () {// temp.unsubscribe()
            });
          } catch (e) {
            this.isloading = false;
            console.error('Error while saving Generator setting ', e);
          }
        }
      }, {
        key: "getBillingDetails",
        value: function getBillingDetails() {
          var _this5 = this;

          try {
            this.callpending = true;
            console.log("===========>", this.billingCycle, this.selectViewBy);
            var billingCycleData = [];
            this.billingCycle.forEach(function (element) {
              billingCycleData.push(element.value);
            }); // this.selectBillCycle = [];
            // this.selectBillCycle.push(this.billingCycle[0].value);

            console.log("=billing cycle==>", this.billingCycle);
            console.log("sending to server ---->>>>>>", billingCycleData);
            var json = {
              "client": this.clientName,
              "dbIp": this.dbIp,
              "billingCycleDetails": billingCycleData,
              "viewBy": this.selectViewBy,
              "timezone": this.sessionService.selectedTimeZone['zoneLabel'],
              "licenseType": this.licenceType
            };

            if (this.selectViewBy == 'monthly') {
              this.textForXaxis = "Monthly";
            } else {
              this.textForXaxis = "Billing Cycle(s)";
            }

            var url = this._config.$serverIP + "DashboardServer/Cavisson/accountSummaryService/getCompareBillingData?productKey=" + this.sessionService.session.cctx.pk;
            this.accountSummaryService.getDataFromRESTUsingPOSTReq("getCompareBillingData", "", json, "/DashboardServer/Cavisson/accountSummaryService/", this.sessionService.preSession.dcData.filter(function (e) {
              return e.master;
            }).map(function (e) {
              return e.name;
            })[0]).subscribe( // this.http.post(url, json).subscribe(
            function (response) {
              // this.isloading = false;
              if (response['statuscode'] == 200) {
                _this5.series = response['compareBillingCycleArray'];
                console.log("series====>", _this5.series);
                _this5.categories = response['categories'];
                _this5.callpending = false;
                _this5.compareAccountSidebar = true;
              } else {
                _this5.callpending = false;
              }
            });
          } catch (e) {
            console.error("Error in getBillingDetails", e);
          }
        }
      }, {
        key: "onClickCustomTP",
        value: function onClickCustomTP() {
          if (this.selectTimePeriod == "CUSTOM") this.showCustomTimePop = true;
          this.previousAccountStartDate = this.accountStartDate;
          this.previousAccountEndDate = this.accountEndDate;
        }
      }, {
        key: "ngOnDestroy",
        value: function ngOnDestroy() {
          this.cavNavBarService.showNavBar = true;
        }
      }]);
    }();

    AccountSummaryComponent.ctorParameters = function () {
      return [{
        type: _transaction_detail_services_cav_config_service__WEBPACK_IMPORTED_MODULE_7__["CavConfigService"]
      }, {
        type: _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpClient"]
      }, {
        type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"]
      }, {
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_6__["SessionService"]
      }, {
        type: primeng__WEBPACK_IMPORTED_MODULE_5__["MessageService"]
      }, {
        type: _services_account_summary_service__WEBPACK_IMPORTED_MODULE_8__["AccountSummaryService"]
      }, {
        type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_9__["CavNavBarService"]
      }];
    };

    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"])("Report")], AccountSummaryComponent.prototype, "Report", void 0);
    Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewChild"])("ReportTable")], AccountSummaryComponent.prototype, "ReportTable", void 0);
    AccountSummaryComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({
      selector: 'app-account-summary',
      template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! raw-loader!./account-summary.component.html */
      "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.html"))["default"],
      encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_2__["ViewEncapsulation"].None,
      styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(
      /*! ./account-summary.component.scss */
      "./src/app/pages/home/account-summary-report/components/account-summary/account-summary.component.scss"))["default"]]
    })], AccountSummaryComponent);
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/pipes/numberToString.pipe.ts":
  /*!********************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/pipes/numberToString.pipe.ts ***!
    \********************************************************************************/

  /*! exports provided: NumberToString */

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

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


    __webpack_require__.d(__webpack_exports__, "NumberToString", function () {
      return NumberToString;
    });
    /* 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 src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! src/app/core/session/session.service */
    "./src/app/core/session/session.service.ts");

    var NumberToString = /*#__PURE__*/function () {
      function NumberToString(sessionService) {
        _classCallCheck(this, NumberToString);

        this.sessionService = sessionService;
      }

      return _createClass(NumberToString, [{
        key: "transform",
        value: function transform(value, value1, value2) {
          if (value1 == "testrun" && value != 0) {
            return value;
          } else if (value1 == "testrun" && value == 0) {
            return "-";
          }

          if (value1 == "typeCount" && value2 == "fromtitle") {
            return "Total(Permanent,Monthly,Hourly)";
          }

          if (value == "" || value == undefined) {
            return "-";
          } else {
            if (value1 == "maxconcurrentvuser" || value1 == "maxconcurrentgenerator" || value1 == "maxconcurrenttestrun" || value1 == "maxvuserhourspermonth") {
              if (value == "Unlimited" || value == "0" || value == 0) {
                return value;
              } else {
                return Number(value).toLocaleString('en-US');
              }
            }

            if (value1 == "maxpagepermin" || value1 == "avgpagepermin" || value1 == "totaltx" || value1 == "totalpageview" || value1 == "maxvuser" || value1 == "avgvuser" || value1 == "maxpageviewpersec" || value1 == "avgpageviewpersec" || value1 == "maxtps" || value1 == "avgtps" || value1 == "totalPageView" || value1 == 'avgvuserperhr' || value1 == 'consumedvuh' || value1 == 'maxvuserperhr' || value1 == 'totalurlhits') {
              if (value == "") {
                return "-";
              } else return Number(value).toLocaleString('en-US');
            }

            if (value1 == "starttimestamp" || value1 == "endtimestamp") {
              if (value == undefined) {
                return '-';
              } else if (Number(value) == 0) {
                return '0';
              } else return isNaN(Number(this.sessionService.convertTimestampIntoFormattedString(Number(value) * 1000))) ? this.sessionService.convertTimestampIntoFormattedString(Number(value) * 1000) : Number(this.sessionService.convertTimestampIntoFormattedString(Number(value) * 1000)).toLocaleString('en-US');
            }

            if (value1 == "key" && value2 == "fromtitle") {
              if (value == undefined) {
                return "-";
              } else if (Number(value) == 0) {
                return '0';
              } else {
                this.convertDate(value); // return (isNaN(Number(this.val))) ? this.val : Number(this.val).toLocaleString('en-US');

                return this.val;
              }
            }

            if (value == "0" || value == 0) {
              return '0';
            } else {
              var val = isNaN(Number(value)) ? value : Number(value).toLocaleString('en-US');
              return value1 == 'key' ? value : val;
            }
          }
        }
      }, {
        key: "convertDate",
        value: function convertDate(value) {
          var months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
          var temp = value.indexOf("/") > -1 ? value.split("/") : value.split("-");

          if (temp.length == 3) {
            console.log("temmm", temp);
            this.val = temp[1] + " " + months[Number(temp[0]) - 1] + " " + temp[2];
            console.log("val", this.val);
          } else this.val = value;
        }
      }]);
    }();

    NumberToString.ctorParameters = function () {
      return [{
        type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_2__["SessionService"]
      }];
    };

    NumberToString = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
      name: "NumberToString"
    })], NumberToString);
    /***/
  },

  /***/
  "./src/app/pages/home/account-summary-report/services/account-summary.service.ts":
  /*!***************************************************************************************!*\
    !*** ./src/app/pages/home/account-summary-report/services/account-summary.service.ts ***!
    \***************************************************************************************/

  /*! exports provided: AccountSummaryService */

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

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


    __webpack_require__.d(__webpack_exports__, "AccountSummaryService", function () {
      return AccountSummaryService;
    });
    /* 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 src_app_core_store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
    /*! src/app/core/store/store */
    "./src/app/core/store/store.ts");
    /* harmony import */


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


    var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
    /*! rxjs/operators */
    "./node_modules/rxjs/_esm2015/operators/index.js");
    /* harmony import */


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

    var AccountSummaryService = /*#__PURE__*/function (_src_app_core_store_s) {
      function AccountSummaryService(http, SessionService) {
        var _this6;

        _classCallCheck(this, AccountSummaryService);

        _this6 = _callSuper(this, AccountSummaryService);
        _this6.http = http;
        _this6.SessionService = SessionService;
        return _this6;
      }

      _inherits(AccountSummaryService, _src_app_core_store_s);

      return _createClass(AccountSummaryService, [{
        key: "getDataByRestAPI",
        value: function getDataByRestAPI(url, baseValue, cname) {
          try {
            var base = baseValue;

            if (base) {
              if (this.SessionService.preSession.multiDc) {
                var masterURL = "";

                if (cname != '' && cname != undefined) {
                  masterURL = "/tomcat/" + cname;
                } else {
                  masterURL = "/node/ALL";
                }

                baseValue = masterURL + baseValue;
              }

              return this.controller.get(url, null, baseValue);
            }
          } catch (e) {
            console.error("Error in getDataByRestAPI()", e);
          }
        }
        /*Getting Data Through REST API by using GET Method node all handling v2 calls.*/

      }, {
        key: "getDataFromRESTUsingPOSTReq",
        value: function getDataFromRESTUsingPOSTReq(url, param, data, baseValue, cname) {
          try {
            // let base;
            var base = baseValue;

            if (base) {
              if (this.SessionService.preSession.multiDc) {
                var masterURL;

                if (cname != '' && cname != undefined) {
                  masterURL = "/tomcat/" + cname;
                } else {
                  masterURL = "/node/ALL";
                }

                baseValue = masterURL + baseValue;
              }

              return this.controller.post(url + param, data, baseValue);
            }

            return this.http.post(url + param, data).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (response) {
              return response;
            }));
          } catch (e) {
            console.error("Error in getDataFromRESTUsingPOSTReq()", e);
          }
        }
      }]);
    }(src_app_core_store_store__WEBPACK_IMPORTED_MODULE_2__["Store"].AbstractService);

    AccountSummaryService.ctorParameters = function () {
      return [{
        type: _angular_common_http__WEBPACK_IMPORTED_MODULE_5__["HttpClient"]
      }, {
        type: _app_core_session_session_service__WEBPACK_IMPORTED_MODULE_3__["SessionService"]
      }];
    };

    AccountSummaryService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()], AccountSummaryService);
    /***/
  }
}]);