(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["page-dump-parameters-page-dump-parameters-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.html":
/*!*************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.html ***!
  \*************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"blockedUI\" *ngIf=\"loading\">\n    <i class=\"icons8 icons8-spinner spin\"></i>\n</div>\n<div class=\"w-100-p\" *ngFor=\"let param of parameterData\">\n<div class=\"mt-10 mb-5 py-5 font-weight-700 font-14 bottom-border border-5 blueHead\" *ngIf=\"pageDumpUtilService.isCompare\">{{param.pageName}} ({{param.keyName}})</div>\n<cav-table *ngIf=\"param.data.length > 0 && param.data[0]['name'] != ''\"  [value]=\"param.data\" [showCurrentPageReport]=\"true\" [headerRelativePath]=\"headerRelativePath\" \n        [scrollable]=\"true\" scrollHeight=\"calc(100vh - 190px)\"  (clickButtonEvent)=\"clickButtonEvent($event,param)\" [responsive]=\"true\" >\n</cav-table>\n\n<div class=\"text-center p-10\" *ngIf=\"param.data.length == 0 || (param.data.length == 1 && param.data[0]['name'] == '')\">\n    No Parameters Found.\n</div>\n<div class=\"p-10\" *ngIf=\"param.data.length > 0 && param.data[0]['name'] != ''\">\n    <strong>Note:</strong> These are the parameters that are used in the main URL.\n</div>\n</div>\n");

/***/ }),

/***/ "./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.scss":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.scss ***!
  \***********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("");

/***/ }),

/***/ "./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.ts":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.ts ***!
  \*********************************************************************************************************************************************/
/*! exports provided: PageDumpParametersComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageDumpParametersComponent", function() { return PageDumpParametersComponent; });
/* 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 _service_page_dump_http_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../service/page-dump-http.service */ "./src/app/pages/ddr/components/page-dump-revamped/service/page-dump-http.service.ts");
/* harmony import */ var _service_page_dump_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../service/page-dump.state */ "./src/app/pages/ddr/components/page-dump-revamped/service/page-dump.state.ts");
/* harmony import */ var _service_page_dump_utils_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../service/page-dump-utils.service */ "./src/app/pages/ddr/components/page-dump-revamped/service/page-dump-utils.service.ts");





let PageDumpParametersComponent = class PageDumpParametersComponent {
    constructor(pagedumpHttpService, pageDumpUtilService) {
        this.pagedumpHttpService = pagedumpHttpService;
        this.pageDumpUtilService = pageDumpUtilService;
        this.columns = [];
        this.parameterData = [];
    }
    ngOnInit() {
        this.headerRelativePath = "netstrom/network-log/parameters.json";
        if (this.pageDumpUtilService.isCompare)
            this.getCompareParameterDataTable();
        else
            this.viewParameterSubstitute(this.pageDumpUtilService.pageReqInfo.node.parameterSubstitution, this.pageDumpUtilService.pageReqInfo.node.pageName);
    }
    getCompareParameterDataTable() {
        for (let i = 0; i < this.pageDumpUtilService.comparePageReqInfoArr.length; i++) {
            this.viewParameterSubstitute(this.pageDumpUtilService.comparePageReqInfoArr[i]['data'].parameterSubstitution, this.pageDumpUtilService.comparePageReqInfoArr[i]['data'].pageName, this.pageDumpUtilService.comparePageReqInfoArr[i]['pageVal']);
        }
    }
    clickButtonEvent(event, param) {
        var _a, _b;
        if (((_b = (_a = event === null || event === void 0 ? void 0 : event.cavEventExt) === null || _a === void 0 ? void 0 : _a.actionConfig) === null || _b === void 0 ? void 0 : _b.action) == "clickable") {
            if (this.isKeyValuePairExist(event.cavEventExt.row.value))
                this.pageDumpParameter(this.viewParamRes, param.pageName);
        }
        //this.showResponse(2,event.cavEventExt.row);
    }
    viewParameterSubstitute(paramList, pageName, keyName) {
        let parameter = this.ReplaceAll(this.ReplaceAll(this.ReplaceAll(this.replaceHtmlTags(paramList), "$Cav_%3B", ";"), "\\\'", "\'"), "\\\\", "\\");
        parameter = this.ReplaceAll(parameter, "&", "$Cav$");
        parameter = this.ReplaceAll(parameter, "=", "*Cav*");
        parameter = this.ReplaceAll(parameter, "%", "@*@");
        parameter = this.ReplaceAll(parameter, "\n", "@$@");
        parameter = this.ReplaceAll(parameter, "+", "@Cav@");
        parameter = this.ReplaceAll(parameter, "CAV_COMMA", "'");
        this.pagedumpHttpService.getPageParameterData(parameter).subscribe((state) => {
            if (state instanceof _service_page_dump_state__WEBPACK_IMPORTED_MODULE_3__["GetPageParameterDataLoadingState"]) {
                this.loading = true;
                return;
            }
            if (state instanceof _service_page_dump_state__WEBPACK_IMPORTED_MODULE_3__["GetPageParameterDataLoadedState"]) {
                this.loading = false;
                let data = state.data;
                this.viewParamRes = data;
                this.pageDumpParameter(data, pageName, keyName);
                return;
            }
        }, (state) => {
            console.error(state.error);
            this.loading = false;
            let data = [{ name: "", value: "", encoded: "" }];
            this.viewParamRes = data;
            this.pageDumpParameter(data, pageName, keyName);
            return;
        });
    }
    pageDumpParameter(res, pageName, keyName) {
        for (let i = 0; i < res.length; i++) {
            let value = res[i].value;
            if (!value)
                continue;
            value = this.decodeURI(value);
            res[i].value = value;
        }
        this.columns = [
            { field: 'name', header: 'Parameter Name', sortable: true, action: true, width: '150' },
            { field: 'value', header: 'Parameter Value', sortable: true, action: true, width: '600' },
        ];
        if (this.pageDumpUtilService.isCompare)
            this.parameterData.push({ data: res, pageName: pageName, keyName: keyName });
        else {
            this.parameterData = [];
            this.parameterData.push({ data: res, pageName: pageName });
        }
    }
    ReplaceAll(Source, stringToFind, stringToReplace) {
        let temp = Source;
        let index = temp === null || temp === void 0 ? void 0 : temp.indexOf(stringToFind);
        while (index != -1) {
            temp = temp === null || temp === void 0 ? void 0 : temp.replace(stringToFind, stringToReplace);
            index = temp === null || temp === void 0 ? void 0 : temp.indexOf(stringToFind);
        }
        return temp;
    }
    decodeHtml(html) {
        let txt = document.createElement("textarea");
        txt.innerHTML = html;
        return txt.value;
    }
    replaceHtmlTags(text) {
        return text
            .replace(/&amp;/g, "&")
            .replace(/&lt;/g, "<")
            .replace(/&gt;/g, ">")
            .replace(/&quot;/g, '"')
            .replace(/&#039;/g, "'");
    }
    isKeyValuePairExist(index) {
        index = this.decodeURI(index);
        var temp = this.ReplaceAll(index, ">", "&gt;");
        temp = this.ReplaceAll(temp, "<", "&lt;");
        if (temp.indexOf("&") > -1 && temp.indexOf(("=")) > -1) {
            return true;
        }
        else {
            return false;
        }
    }
    decodeURI(value) {
        value = this.ReplaceAll(value, "\\$Cav\\$", "&");
        value = this.ReplaceAll(value, "@Cav@", "+");
        value = this.ReplaceAll(value, "\\*Cav\\*", "=");
        value = this.ReplaceAll(value, "@\\*@", "%");
        value = this.ReplaceAll(value, "@\\$@", "\\\\n");
        return value;
    }
};
PageDumpParametersComponent.ctorParameters = () => [
    { type: _service_page_dump_http_service__WEBPACK_IMPORTED_MODULE_2__["PagedumpHttpService"] },
    { type: _service_page_dump_utils_service__WEBPACK_IMPORTED_MODULE_4__["PageDumpUtilsService"] }
];
PageDumpParametersComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-page-dump-parameters',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./page-dump-parameters.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.html")).default,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./page-dump-parameters.component.scss */ "./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.scss")).default]
    })
], PageDumpParametersComponent);



/***/ }),

/***/ "./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.module.ts":
/*!******************************************************************************************************************************************!*\
  !*** ./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.module.ts ***!
  \******************************************************************************************************************************************/
/*! exports provided: PageDumpParametersModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PageDumpParametersModule", function() { return PageDumpParametersModule; });
/* 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 _page_dump_parameters_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./page-dump-parameters.component */ "./src/app/pages/ddr/components/page-dump-revamped/page-dump-sidebar-components/page-dump-parameters/page-dump-parameters.component.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _pipe_cookie_pipe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../pipe/cookie.pipe */ "./src/app/pages/ddr/components/page-dump-revamped/pipe/cookie.pipe.ts");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");









const route = [{
        path: '', component: _page_dump_parameters_component__WEBPACK_IMPORTED_MODULE_3__["PageDumpParametersComponent"]
    }];
let PageDumpParametersModule = class PageDumpParametersModule {
};
PageDumpParametersModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_page_dump_parameters_component__WEBPACK_IMPORTED_MODULE_3__["PageDumpParametersComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"].forChild(route),
            primeng__WEBPACK_IMPORTED_MODULE_5__["TableModule"],
            _pipe_cookie_pipe__WEBPACK_IMPORTED_MODULE_6__["CookiePipeModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_7__["InputTextModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_8__["CavTableModule"]
        ],
        exports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_4__["RouterModule"]
        ],
    })
], PageDumpParametersModule);



/***/ })

}]);