(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["scenario-scenario-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario.component.html":
/*!**********************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario.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=\"scenScheduleData.loadingScen\">\r\n    <i class=\"icons8 icons8-spinner spin\"></i>\r\n</div>\r\n<div class=\"scen-blockedUI\" *ngIf=\"scenutils.loadingScen && !scenScheduleData.loadingScen\" [style.left]=\"leftPos\">\r\n    <i class=\"icons8 icons8-spinner spin\"></i>\r\n</div>\r\n\r\n<div class=\"h-100-vh page-container home-page  \">\r\n    <div class=\"content-body  \">\r\n        <router-outlet></router-outlet>\r\n    </div>\r\n</div>\r\n\r\n<p-toast *ngIf=\"!scenutils.isGroupBased\" position=\"top-right\" key=\"scenarioKey\" ></p-toast>\r\n\r\n\r\n\r\n\r\n");

/***/ }),

/***/ "./src/app/pages/scenario/constants/scen-common-constants.ts":
/*!*******************************************************************!*\
  !*** ./src/app/pages/scenario/constants/scen-common-constants.ts ***!
  \*******************************************************************/
/*! exports provided: PLATFORM_ANDROID, PLATFORM_IOS, URL_REGEX */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_ANDROID", function() { return PLATFORM_ANDROID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLATFORM_IOS", function() { return PLATFORM_IOS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URL_REGEX", function() { return URL_REGEX; });
const PLATFORM_ANDROID = 'Android';
const PLATFORM_IOS = 'iOS';
const URL_REGEX = {
    PROTOCOL_URL: /^(((http[s]?)|({[\w]+})):\/\/)/,
    NUMERIC_URL: /^(http[s]?:\/\/){0,1}((((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|([\d.]*({[\w]+}[.]?)+[\d.]*))|localhost)(([:0-9a-zA-Z.\/_%?=()&@#-]*[^.:])|({[\w]+}))*$/,
    STRING_URL: /^(?:((http(s)?)|({[\w]+})):\/\/)?(([\w.-]+)|({[\w]+}))(?:\.(([\w\.-]+)|({[\w]+})))+(([\w\-\._~:\/?#[\]@!\$&'\(\)\*\+,;=.%"^|\{\}]+)|({[\w]+}))$/
};


/***/ }),

/***/ "./src/app/pages/scenario/scenario.component.scss":
/*!********************************************************!*\
  !*** ./src/app/pages/scenario/scenario.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/scenario/scenario.component.ts":
/*!******************************************************!*\
  !*** ./src/app/pages/scenario/scenario.component.ts ***!
  \******************************************************/
/*! exports provided: ScenarioComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScenarioComponent", function() { return ScenarioComponent; });
/* 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_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./service/scenario-utils.service */ "./src/app/pages/scenario/service/scenario-utils.service.ts");
/* harmony import */ var _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./service/sch-schedule-data.service */ "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
/* harmony import */ var src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/app/shared/cav-nav-bar/cav-nav-bar.service */ "./src/app/shared/cav-nav-bar/cav-nav-bar.service.ts");







let ScenarioComponent = class ScenarioComponent {
    constructor(scenutils, messageService, scenScheduleData, router, cavNavBarService) {
        this.scenutils = scenutils;
        this.messageService = messageService;
        this.scenScheduleData = scenScheduleData;
        this.router = router;
        this.cavNavBarService = cavNavBarService;
        this.isGrpAdditionalSettings = false;
        this.leftPos = "335px";
        this.cavNavBarService.showNavBar = false;
        router.events.subscribe((eve) => {
            if (eve instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouteConfigLoadStart"]) {
                this.scenScheduleData.loadingScen = true;
            }
            if (eve instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__["RouteConfigLoadEnd"]) {
                this.scenScheduleData.loadingScen = false;
            }
            if (eve instanceof _angular_router__WEBPACK_IMPORTED_MODULE_2__["NavigationEnd"]) {
                if (eve.url.indexOf("groupBasedSettings") > -1 || eve.url.indexOf("additionalSettings") > -1) {
                    this.leftPos = "304px";
                }
                else if (eve.url.indexOf("scenarioProfile") > -1)
                    this.leftPos = "304px";
                else if (eve.url.endsWith('/scenario/basicScenario/design/scenDesign') || eve.url.indexOf('importScript') > -1)
                    this.leftPos = "0px";
                else
                    this.leftPos = "335px";
            }
        });
    }
    ngOnInit() {
        this.subscription = this.scenutils.messageObservable$.subscribe((res) => {
            this.addMessage(res);
        });
    }
    addMessage(msg) {
        this.clearMessage();
        this.messageService.add(msg);
    }
    clearMessage() {
        this.messageService.clear();
    }
    ngOnDestroy() {
        if (this.subscription) {
            this.subscription.unsubscribe();
        }
        this.cavNavBarService.showNavBar = true;
        this.scenScheduleData.repetitionParams.tableHeader = [];
        this.scenScheduleData.repetitionParams.value = [];
    }
};
ScenarioComponent.ctorParameters = () => [
    { type: _service_scenario_utils_service__WEBPACK_IMPORTED_MODULE_4__["ScenarioUtilsService"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
    { type: _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_5__["SchScheduleDataService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
    { type: src_app_shared_cav_nav_bar_cav_nav_bar_service__WEBPACK_IMPORTED_MODULE_6__["CavNavBarService"] }
];
ScenarioComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-scenario',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./scenario.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/scenario/scenario.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./scenario.component.scss */ "./src/app/pages/scenario/scenario.component.scss")).default]
    })
], ScenarioComponent);



/***/ }),

/***/ "./src/app/pages/scenario/scenario.module.ts":
/*!***************************************************!*\
  !*** ./src/app/pages/scenario/scenario.module.ts ***!
  \***************************************************/
/*! exports provided: ScenarioModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScenarioModule", function() { return ScenarioModule; });
/* 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 _angular_common_http__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
/* harmony import */ var primeng_button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
/* harmony import */ var primeng_selectbutton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/selectbutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-selectbutton.js");
/* harmony import */ var primeng_inputtext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
/* harmony import */ var primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng/confirmdialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
/* harmony import */ var primeng_messages__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js");
/* harmony import */ var primeng_sidebar__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
/* harmony import */ var primeng_inputnumber__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! primeng/inputnumber */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputnumber.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _scenario_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./scenario.component */ "./src/app/pages/scenario/scenario.component.ts");
/* harmony import */ var _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./service/scen-keyword-definition.service */ "./src/app/pages/scenario/service/scen-keyword-definition.service.ts");
/* harmony import */ var _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./service/sch-schedule-data.service */ "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
/* harmony import */ var _service_script_parameter_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./service/script-parameter.service */ "./src/app/pages/scenario/service/script-parameter.service.ts");
/* harmony import */ var _service_save_and_read_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./service/save-and-read.service */ "./src/app/pages/scenario/service/save-and-read.service.ts");
/* harmony import */ var _service_generator_list_data_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./service/generator-list-data.service */ "./src/app/pages/scenario/service/generator-list-data.service.ts");
/* harmony import */ var _service_import_script_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./service/import-script.service */ "./src/app/pages/scenario/service/import-script.service.ts");
/* harmony import */ var src_app_core_guards_cav_acl_feature_guard__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! src/app/core/guards/cav-acl-feature.guard */ "./src/app/core/guards/cav-acl-feature.guard.ts");
/* harmony import */ var _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../tools/admin/access-control-management/constants/cav-acl-features.constants */ "./src/app/pages/tools/admin/access-control-management/constants/cav-acl-features.constants.ts");
























const route = [
    {
        path: '', component: _scenario_component__WEBPACK_IMPORTED_MODULE_15__["ScenarioComponent"], children: [
            {
                path: 'createScenario',
                canActivate: [src_app_core_guards_cav_acl_feature_guard__WEBPACK_IMPORTED_MODULE_22__["CavACLFeatureGuard"]],
                data: { feature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_23__["CAV_FEATURES"].LOAD_TEST.NAME, subFeature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_23__["CAV_FEATURES"].LOAD_TEST.SUB_FEATURES.TEST_ASSETS },
                loadChildren: () => Promise.all(/*! import() | create-scenario-create-scenario-module */[__webpack_require__.e("default~create-scenario-create-scenario-module~scenario-design-scenario-design-module"), __webpack_require__.e("create-scenario-create-scenario-module")]).then(__webpack_require__.bind(null, /*! ./create-scenario/create-scenario.module */ "./src/app/pages/scenario/create-scenario/create-scenario.module.ts")).then((m) => m.CreateScenarioModule)
            },
            { path: 'basicScenario', loadChildren: () => Promise.all(/*! import() | basic-scenario-basic-scenario-module */[__webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~48e9c3b9"), __webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~c6143518"), __webpack_require__.e("default~basic-scenario-basic-scenario-module~src-app-pages-scenario-scenario-testrun-scenario-testrun-module"), __webpack_require__.e("basic-scenario-basic-scenario-module")]).then(__webpack_require__.bind(null, /*! ./basic-scenario/basic-scenario.module */ "./src/app/pages/scenario/basic-scenario/basic-scenario.module.ts")).then((m) => m.BasicScenarioModule) },
            { path: 'importScript', loadChildren: () => Promise.all(/*! import() | import-script-import-script-module */[__webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~48e9c3b9"), __webpack_require__.e("default~import-script-import-script-module~scenario-design-scenario-design-module"), __webpack_require__.e("import-script-import-script-module")]).then(__webpack_require__.bind(null, /*! ./import-script/import-script.module */ "./src/app/pages/scenario/import-script/import-script.module.ts")).then((m) => m.ImportScriptModule) },
            { path: 'scenarioProfile', loadChildren: () => __webpack_require__.e(/*! import() | scenario-profile-scenario-profile-module */ "scenario-profile-scenario-profile-module").then(__webpack_require__.bind(null, /*! ./scenario-profile/scenario-profile.module */ "./src/app/pages/scenario/scenario-profile/scenario-profile.module.ts")).then((m) => m.ScenarioProfileModule) },
            { path: 'basicScenarioLeftPanel', loadChildren: () => Promise.all(/*! import() | basic-scenario-left-panel-basic-scenario-left-panel-module */[__webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~48e9c3b9"), __webpack_require__.e("default~basic-scenario-basic-scenario-module~basic-scenario-left-panel-basic-scenario-left-panel-mod~c6143518")]).then(__webpack_require__.bind(null, /*! ./basic-scenario-left-panel/basic-scenario-left-panel.module */ "./src/app/pages/scenario/basic-scenario-left-panel/basic-scenario-left-panel.module.ts")).then((m) => m.BasicScenarioLeftPanelModule) }
        ]
    },
    {
        path: 'integrations',
        canActivate: [src_app_core_guards_cav_acl_feature_guard__WEBPACK_IMPORTED_MODULE_22__["CavACLFeatureGuard"]],
        data: { feature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_23__["CAV_FEATURES"].FUNCTIONAL.NAME, subFeature: _tools_admin_access_control_management_constants_cav_acl_features_constants__WEBPACK_IMPORTED_MODULE_23__["CAV_FEATURES"].FUNCTIONAL.SUB_FEATURES.GENERATE_WITH_AI },
        loadChildren: () => Promise.all(/*! import() | shared-integration-configuration-integrations-module */[__webpack_require__.e("default~functional-functional-module~generate-user-story-generate-user-story-module~nettest-nettest-~23bd09d6"), __webpack_require__.e("default~nettest-nettest-module~shared-integration-configuration-integrations-module"), __webpack_require__.e("shared-integration-configuration-integrations-module")]).then(__webpack_require__.bind(null, /*! ./../../shared/integration-configuration/integrations.module */ "./src/app/shared/integration-configuration/integrations.module.ts")).then((m) => m.IntegrationsModule),
    }
];
let ScenarioModule = class ScenarioModule {
};
ScenarioModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_scenario_component__WEBPACK_IMPORTED_MODULE_15__["ScenarioComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_3__["FormsModule"],
            _angular_common_http__WEBPACK_IMPORTED_MODULE_4__["HttpClientModule"],
            primeng_dropdown__WEBPACK_IMPORTED_MODULE_6__["DropdownModule"],
            primeng_button__WEBPACK_IMPORTED_MODULE_7__["ButtonModule"],
            primeng_selectbutton__WEBPACK_IMPORTED_MODULE_8__["SelectButtonModule"],
            primeng_inputtext__WEBPACK_IMPORTED_MODULE_9__["InputTextModule"],
            primeng__WEBPACK_IMPORTED_MODULE_5__["CardModule"],
            primeng__WEBPACK_IMPORTED_MODULE_5__["CheckboxModule"],
            primeng__WEBPACK_IMPORTED_MODULE_5__["MessageModule"],
            primeng__WEBPACK_IMPORTED_MODULE_5__["ToastModule"],
            primeng__WEBPACK_IMPORTED_MODULE_5__["TooltipModule"],
            primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_10__["ConfirmDialogModule"],
            primeng_messages__WEBPACK_IMPORTED_MODULE_11__["MessagesModule"],
            primeng_sidebar__WEBPACK_IMPORTED_MODULE_12__["SidebarModule"],
            primeng_inputnumber__WEBPACK_IMPORTED_MODULE_13__["InputNumberModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_14__["RouterModule"].forChild(route)
        ],
        exports: [
            _angular_router__WEBPACK_IMPORTED_MODULE_14__["RouterModule"]
        ],
        providers: [
            _service_scen_keyword_definition_service__WEBPACK_IMPORTED_MODULE_16__["ScenKeywordDefinitionService"],
            _service_sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_17__["SchScheduleDataService"],
            _service_save_and_read_service__WEBPACK_IMPORTED_MODULE_19__["SaveAndReadService"],
            _service_script_parameter_service__WEBPACK_IMPORTED_MODULE_18__["ScriptParameterService"],
            _service_generator_list_data_service__WEBPACK_IMPORTED_MODULE_20__["GeneratorListDataService"],
            _service_import_script_service__WEBPACK_IMPORTED_MODULE_21__["ImportScriptService"]
        ]
    })
], ScenarioModule);



/***/ }),

/***/ "./src/app/pages/scenario/service/generator-list-data.service.ts":
/*!***********************************************************************!*\
  !*** ./src/app/pages/scenario/service/generator-list-data.service.ts ***!
  \***********************************************************************/
/*! exports provided: GeneratorListDataService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GeneratorListDataService", function() { return GeneratorListDataService; });
/* 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 rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");



let GeneratorListDataService = class GeneratorListDataService {
    constructor() {
        this.genInfoListForLocation = [];
        this.genInfoList = [];
        /**Used to check the value of "NS_GENERATOR" keyword */
        this._genArr = [];
        this.selectedGenaratorType = "1";
        /**
         * Used to check whether USE ALL GENERATOR FOR ALL SCENARIO is selected or not.
         * NS_GENERATOR_MODE */
        this._genMode = true;
        this._locationPerMode = false;
        this._locationPerValue = 0;
        this.isLocationMode = false;
        this.allSelectedLocation = "";
        this._genLocatioPercentage = [];
        this._numGenerators = 1;
        this._addGeneratorRes = null;
        this.parentCompSaveEvent = new rxjs__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
        this.$parentCompSaveEventSubs = this.parentCompSaveEvent.asObservable();
        this._vendorList = [];
    }
    emitSaveEvent() {
        this.parentCompSaveEvent.next();
        return new Promise((onFulfill, onReject) => {
            this.intervalId = setInterval(() => {
                if (this.addGeneratorRes != null) {
                    clearInterval(this.intervalId);
                    if (this.addGeneratorRes) {
                        this.addGeneratorRes = null;
                        onFulfill(true);
                    }
                    else {
                        this.addGeneratorRes = null;
                        onFulfill(false);
                    }
                }
            }, 300);
        });
    }
    get addGeneratorRes() {
        return this._addGeneratorRes;
    }
    set addGeneratorRes(value) {
        this._addGeneratorRes = value;
    }
    get isGeneratorOpt() {
        return this._isGeneratorOpt;
    }
    set isGeneratorOpt(value) {
        this._isGeneratorOpt = value;
    }
    set $genInfoListForLocation(genList) {
        this.genInfoListForLocation = genList;
    }
    get $genInfoListForLocation() {
        return this.genInfoListForLocation;
    }
    get $genInfoList() {
        return this.genInfoList;
    }
    set $genInfoList(genList) {
        this.genInfoList = genList;
    }
    get genArr() {
        return this._genArr;
    }
    set genArr(value) {
        this._genArr = value;
    }
    get genMode() {
        return this._genMode;
    }
    set genMode(value) {
        this._genMode = value;
    }
    get locationPerMode() {
        return this._locationPerMode;
    }
    set locationPerMode(value) {
        this._locationPerMode = value;
    }
    get locationPerValue() {
        return this._locationPerValue;
    }
    set locationPerValue(value) {
        this._locationPerValue = value;
    }
    get message() {
        return this._message;
    }
    clearMessage() {
        this._message = [];
    }
    get $isLocationMode() {
        return this.isLocationMode;
    }
    set $isLocationMode(mode) {
        this.isLocationMode = mode;
    }
    get $genLocatioPercentage() {
        return this._genLocatioPercentage;
    }
    set $genLocatioPercentage(genList) {
        this._genLocatioPercentage = genList;
    }
    set numGenerators(value) {
        this._numGenerators = value;
    }
    get numGenerators() {
        return this._numGenerators;
    }
    get selectedVendor() {
        return this._selectedVendor;
    }
    set selectedVendor(value) {
        this._selectedVendor = value;
    }
    get vendorList() {
        return this._vendorList;
    }
    set vendorList(value) {
        this._vendorList = value;
    }
};
GeneratorListDataService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
], GeneratorListDataService);



/***/ }),

/***/ "./src/app/pages/scenario/service/import-script.service.ts":
/*!*****************************************************************!*\
  !*** ./src/app/pages/scenario/service/import-script.service.ts ***!
  \*****************************************************************/
/*! exports provided: ImportScriptService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ImportScriptService", function() { return ImportScriptService; });
/* 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 _sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sch-schedule-data.service */ "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
/* harmony import */ var _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../interface/sch-group-data */ "./src/app/pages/scenario/interface/sch-group-data.ts");
/* harmony import */ var _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../interface/sch-request-data */ "./src/app/pages/scenario/interface/sch-request-data.ts");
/* harmony import */ var _scenario_share_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scenario-share.service */ "./src/app/pages/scenario/service/scenario-share.service.ts");
/* harmony import */ var _scenario_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scenario-utils.service */ "./src/app/pages/scenario/service/scenario-utils.service.ts");







let ImportScriptService = class ImportScriptService {
    constructor(scenUtilService, scenScheduleData, scenSharedService) {
        this.scenUtilService = scenUtilService;
        this.scenScheduleData = scenScheduleData;
        this.scenSharedService = scenSharedService;
        this.requestNameObj = {};
        this.uniqueReqNameCounter = -1;
        this.jsType = false;
        this.imageType = false;
        this.fontType = false;
        this.cssType = false;
        this.selectionOpt = [];
        this.selectionType = '0';
        this.flowTypeOpt = [];
        this.flowType = 'folder';
    }
    /**
     * This method parse the har json and returns the groupdata in format expected by scenario-design
     * @param fileData har json imported from file.
     * @return {
     *              'success': true/false,
     *              'msg': 'error message in case of success is false',
     *              'grpData': 'group data for scenario-design'
     *         }
     */
    getParsedGrpDataFrmHar(fileData) {
        try {
            fileData = JSON.parse(fileData);
            if (fileData.log) {
                let pagesObj = {};
                let entries = [];
                let reqArr = [];
                entries = fileData.log.entries;
                for (let page of fileData.log.pages)
                    pagesObj[page.id] = {
                        title: page.title,
                        inlineUrl: [],
                        foundInHar: false
                    };
                let requestCount = 0;
                for (let i = 0; i < entries.length; i++) {
                    if (!this.isValidRequest(entries[i]))
                        continue;
                    let pageref = entries[i]['pageref'];
                    let url = entries[i]['request']['url'];
                    if (this.selectionType != "0" && pageref && pagesObj[pageref] && pagesObj[pageref].title != url) {
                        let reqObj = this.getReqFrmHar(entries[i], true);
                        if (reqObj == null)
                            continue;
                        pagesObj[pageref].inlineUrl.push(reqObj);
                    }
                    else if (pageref && pagesObj[pageref] && pagesObj[pageref].title == url) {
                        let reqObj = this.getReqFrmHar(entries[i], false);
                        reqObj.inlineReqArr = this.selectionType == "2" ? [] : pagesObj[pageref].inlineUrl;
                        if (reqObj == null)
                            continue;
                        reqArr.push(reqObj);
                        reqArr.push(this.getDefaultThinkTime());
                        requestCount++;
                        //Need to push inline url in main url if isConvertInineUrl is true.
                        if (this.selectionType != "2")
                            pagesObj[pageref].foundInHar = true;
                    }
                    //Adding main request only which does not have pageref. 
                    else if (!pageref) {
                        let reqObj = this.getReqFrmHar(entries[i], false);
                        if (reqObj == null)
                            continue;
                        reqArr.push(reqObj);
                        reqArr.push(this.getDefaultThinkTime());
                        requestCount++;
                    }
                }
                //checking for pages which are not found in entries and appending their inlineUrls to main request.
                for (let page in pagesObj) {
                    if (!pagesObj[page].foundInHar) {
                        for (let request of pagesObj[page].inlineUrl) {
                            request.reqName = this.getUniqueReqName(new URL(request.url).pathname);
                            reqArr.push(request);
                            reqArr.push(this.getDefaultThinkTime());
                            requestCount++;
                        }
                    }
                }
                this.resetServiceData();
                if (reqArr.length == 0)
                    return {
                        'success': false,
                        'msg': 'Selected har file is corrupted. Please select valid har file.'
                    };
                return {
                    'success': true,
                    'grpData': this.getGrpData(reqArr, requestCount),
                    'msg': 'Har File Imported Successfully'
                };
            }
            else {
                this.resetServiceData();
                return {
                    'success': false,
                    'msg': 'Selected har file is corrupted. Please select valid har file.'
                };
            }
        }
        catch (e) {
            console.log(e);
            return {
                'success': false,
                'msg': 'Selected har file is corrupted. Please select valid har file.'
            };
        }
    }
    getGrpData(reqArr, requestCount) {
        let grpObj = new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_3__["SchGroupData"]();
        let flowObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_4__["APIFlow"]();
        flowObj.reqArr = reqArr;
        flowObj.totalRequest = requestCount;
        flowObj.flowName = "Flow_1";
        grpObj.grpName = this.scenSharedService.getLatestGroupName(this.scenScheduleData.groupDataList);
        grpObj.flowArr = [flowObj];
        grpObj.totalRequest = requestCount;
        grpObj.headers = this.scenUtilService.defaultheaders;
        grpObj.scriptName = `${this.scenUtilService.Project}/${this.scenUtilService.subProject}/${this.scenUtilService.scenarioName}_${grpObj.grpName}`;
        return grpObj;
    }
    /**
     * This method returns default request/thinktime object.
     * @returns
     */
    getDefaultThinkTime() {
        let ttObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_4__["SchRequestData"]();
        ttObj.thinkTime = "0";
        return ttObj;
    }
    /**
     * This returns the request object that is shown in scenario design.
     * @param request request Data
     * @return request object for scenario design(SchRequestData).
     */
    getReqFrmHar(entry, isInline) {
        try {
            let requestObj = new _interface_sch_request_data__WEBPACK_IMPORTED_MODULE_4__["SchRequestData"]();
            let url = new URL(entry.request.url);
            requestObj.url = url.href;
            requestObj.method = entry.request.method;
            if (!isInline)
                requestObj.reqName = this.getUniqueReqName(url.pathname);
            requestObj.headers = [...requestObj.headers, ...this.parseHeaders(entry.request.headers)];
            if (entry.request.postData) {
                let postData = entry.request.postData;
                if (postData.text && (!postData.params || postData.params.length == 0)) {
                    requestObj.body = postData.text;
                    requestObj.isBodyEditor = true;
                }
                else if (postData.params) {
                    requestObj.isBodyEditor = false;
                    let bodyArr = [];
                    if (postData.mimeType.startsWith("multipart/form-data")) {
                        let fileNameArr = [];
                        if (postData.text) {
                            let text = postData.text;
                            let fIndex = text.indexOf('filename');
                            while (fIndex > -1) {
                                //This will extract filename from text and then update text and fIndex.
                                fileNameArr.push(text.substring(fIndex + 10, text.indexOf("\"", fIndex + 10)));
                                text = text.substring(text.indexOf("\"", fIndex + 10) + 1);
                                fIndex = text.indexOf('filename');
                            }
                        }
                        for (let i = 0; i < postData.params.length; i++) {
                            bodyArr.push({
                                bodyKey: {
                                    name: postData.params[i].name
                                },
                                bodyValue: {
                                    name: postData.params[i].value == '(binary)' ? fileNameArr[i] : postData.params[i].value
                                },
                                del: true,
                                chk: true,
                                bodyKeySel: postData.params[i].value == '(binary)' ? 'file' : 'text',
                                bodyKeyOpt: [
                                    { label: "Text", value: 'text' },
                                    { label: "File", value: 'file' }
                                ]
                            });
                        }
                        bodyArr.push({
                            bodyKey: {
                                name: ''
                            },
                            bodyValue: {
                                name: ''
                            },
                            del: false,
                            chk: false,
                            bodyKeySel: 'text',
                            bodyKeyOpt: [
                                { label: "Text", value: 'text' },
                                { label: "File", value: 'file' }
                            ]
                        });
                    }
                    else if (postData.mimeType.startsWith("multipart/x-www-form-urlencoded")) {
                        for (let i = 0; i < postData.params.length; i++) {
                            bodyArr.push({
                                bodyKey: {
                                    name: postData.params[i].name
                                },
                                bodyValue: {
                                    name: postData.params[i].value
                                },
                                del: true,
                                chk: true
                            });
                        }
                        bodyArr.push({
                            bodyKey: {
                                name: ''
                            },
                            bodyValue: {
                                name: ''
                            },
                            del: false,
                            chk: false
                        });
                    }
                    requestObj.bodyArr = bodyArr;
                }
                if (postData.mimeType.startsWith("application/json"))
                    requestObj.bodyType = "json";
                else if (postData.mimeType.startsWith("text/plain"))
                    requestObj.bodyType = "text";
                else if (postData.mimeType.startsWith("application/xml"))
                    requestObj.bodyType = "xml";
                else if (postData.mimeType.startsWith("application/javascript"))
                    requestObj.bodyType = "js";
                else if (postData.mimeType.startsWith("text/html"))
                    requestObj.bodyType = "html";
                else if (postData.mimeType.startsWith("multipart/form-data"))
                    requestObj.bodyType = "form-data";
                else if (postData.mimeType.startsWith("multipart/x-www-form-urlencoded"))
                    requestObj.bodyType = "x-www-form-urlencoded";
            }
            return requestObj;
        }
        catch (e) {
            console.error(e);
            return null;
        }
    }
    /**
     * This methods parse headers in given format to header accepted by SchRequestData.
     * @param headers headers in following format:
     * [{'name': 'headerName', 'value': 'headerValue'}]
     * @returns
     */
    parseHeaders(headers) {
        let headerArr = [];
        for (let header of headers) {
            headerArr.push({
                headerKey: {
                    name: header['name']
                },
                headerValue: {
                    name: header['value']
                },
                del: true,
                chk: true
            });
        }
        headerArr.push({
            headerKey: {
                name: ''
            },
            headerValue: {
                name: ''
            },
            del: false,
            chk: false
        });
        return headerArr;
    }
    /**
     * This method returns unique request Name.
     * @params '/abc/index.html' or '/'
     * @returns requestName
     */
    getUniqueReqName(pathname) {
        try {
            pathname = ((pathname && pathname == '/') || (pathname && Number.isInteger(pathname))) ? pathname : pathname.substring(pathname.lastIndexOf('/') + 1);
            if (pathname && pathname != '/' && !Number.isInteger(pathname) && !this.requestNameObj[pathname] && pathname.length < 64) {
                this.requestNameObj[pathname] = { nameCounter: 0 };
                let finalPath = pathname.trim().replace(/[^a-zA-Z0-9]/g, '_');
                let pattern = /^[a-zA-Z][a-zA-Z0-9_]*$/;
                if (!pattern.test(finalPath))
                    return this.getUniqueReqName("index" + (++this.uniqueReqNameCounter == 0 ? '' : ('_' + this.uniqueReqNameCounter)));
                return finalPath;
            }
            else if (pathname && pathname != '/' && !Number.isInteger(pathname) && this.requestNameObj[pathname] && pathname.length < 64) {
                return this.getUniqueReqName(++this.requestNameObj[pathname]['nameCounter']);
            }
            else {
                return this.getUniqueReqName("index" + (++this.uniqueReqNameCounter == 0 ? '' : ('_' + this.uniqueReqNameCounter)));
            }
        }
        catch (e) {
            console.error(e);
            return this.getUniqueReqName("index" + (++this.uniqueReqNameCounter == 0 ? '' : ('_' + this.uniqueReqNameCounter)));
        }
    }
    /**
     * This method determines if given request/entry should be considered or ingnored based on following criteria:
     * - resourceType
     * - response data content type
     * @param  request
     * @returns true/false.
     */
    isValidRequest(entry) {
        //Allowing DELETE,HEAD,OPTIONS,CONNECT,TRACE methods.
        if (entry['request']['method'] == "DELETE" || entry['request']['method'] == "HEAD" || entry['request']['method'] == "OPTIONS" || entry['request']['method'] == "CONNECT" || entry['request']['method'] == "TRACE")
            return true;
        //Ignoring js(script),images etc files.
        if (entry['_resourceType'] && (entry['_resourceType'] == 'document' || entry['_resourceType'] == 'fetch' || entry['_resourceType'] == 'xhr' || entry['_resourceType'] == 'preflight' || (this.jsType && entry['_resourceType'] == 'script') || (this.imageType && entry['_resourceType'] == 'image') || (this.cssType && entry['_resourceType'] == 'stylesheet') || (this.fontType && entry['_resourceType'] == 'font')))
            return true;
        if (entry['response']['content']['mimeType'] == 'text/plain' || entry['response']['content']['mimeType'] == 'text/html' || entry['response']['content']['mimeType'] == 'text/xml' || entry['response']['content']['mimeType'] == 'application/json' || entry['response']['content']['mimeType'] == 'multipart/form-data' || (this.cssType && entry['response']['content']['mimeType'] == 'text/css') || (this.jsType && entry['response']['content']['mimeType'].includes('/javascript')) || (this.imageType && entry['response']['content']['mimeType'].startsWith("image/")) || (this.fontType && entry['response']['content']['mimeType'].startsWith("font/")))
            return true;
        if (entry['response']['status'] >= 301 && entry['response']['status'] <= 399)
            return true;
        return false;
    }
    resetServiceData() {
        this.requestNameObj = {};
        this.uniqueReqNameCounter = -1;
        this.selectionType = '0';
        this.jsType = false;
        this.imageType = false;
        this.fontType = false;
        this.cssType = false;
    }
};
ImportScriptService.ctorParameters = () => [
    { type: _scenario_utils_service__WEBPACK_IMPORTED_MODULE_6__["ScenarioUtilsService"] },
    { type: _sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_2__["SchScheduleDataService"] },
    { type: _scenario_share_service__WEBPACK_IMPORTED_MODULE_5__["ScenarioSharedService"] }
];
ImportScriptService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
], ImportScriptService);



/***/ }),

/***/ "./src/app/pages/scenario/service/save-and-read.service.ts":
/*!*****************************************************************!*\
  !*** ./src/app/pages/scenario/service/save-and-read.service.ts ***!
  \*****************************************************************/
/*! exports provided: SaveAndReadService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SaveAndReadService", function() { return SaveAndReadService; });
/* 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 rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var src_app_core_store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/store/store */ "./src/app/core/store/store.ts");
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../interface/scenario-state */ "./src/app/pages/scenario/interface/scenario-state.ts");
/* harmony import */ var _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../interface/sch-group-data */ "./src/app/pages/scenario/interface/sch-group-data.ts");
/* harmony import */ var _scenario_http_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./scenario-http.service */ "./src/app/pages/scenario/service/scenario-http.service.ts");
/* harmony import */ var _scenario_utils_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scenario-utils.service */ "./src/app/pages/scenario/service/scenario-utils.service.ts");
/* harmony import */ var _sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./sch-schedule-data.service */ "./src/app/pages/scenario/service/sch-schedule-data.service.ts");
/* harmony import */ var _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../constants/scen-schedule-constants */ "./src/app/pages/scenario/constants/scen-schedule-constants.ts");
/* harmony import */ var _interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../interface/script-parameter.constant */ "./src/app/pages/scenario/interface/script-parameter.constant.ts");
/* harmony import */ var src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/shared/header/work-profile/services/work-profile-active.service */ "./src/app/shared/header/work-profile/services/work-profile-active.service.ts");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_15__);
/* harmony import */ var _commons_sch_utility__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../commons/sch-utility */ "./src/app/pages/scenario/commons/sch-utility.ts");
/* harmony import */ var papaparse__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! papaparse */ "./node_modules/papaparse/papaparse.min.js");
/* harmony import */ var papaparse__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(papaparse__WEBPACK_IMPORTED_MODULE_17__);
/* harmony import */ var src_app_shared_cavLoggerService_cav_logging_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! src/app/shared/cavLoggerService/cav-logging.service */ "./src/app/shared/cavLoggerService/cav-logging.service.ts");
/* harmony import */ var _home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../home/script-manager/services/script.state */ "./src/app/pages/home/script-manager/services/script.state.ts");
/* harmony import */ var _home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../home/script-manager/services/script-rest.service */ "./src/app/pages/home/script-manager/services/script-rest.service.ts");
/* harmony import */ var _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../import-script/browse-test-sidebar/constants/browse-test.constants */ "./src/app/pages/scenario/import-script/browse-test-sidebar/constants/browse-test.constants.ts");
/* harmony import */ var _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../constants/scenario-config-data */ "./src/app/pages/scenario/constants/scenario-config-data.ts");
/* harmony import */ var _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../constants/scen-common-constants */ "./src/app/pages/scenario/constants/scen-common-constants.ts");
























const SCENARIO_TYPE = {
    FIX_CONCURRENT_USERS: "FIX_CONCURRENT_USERS",
    FIX_SESSION_RATE: "FIX_SESSION_RATE",
    MIXED_MODE: "MIXED_MODE",
    REPLAY_ACCESS_LOGS: "REPLAY_ACCESS_LOGS"
};
let SaveAndReadService = class SaveAndReadService extends src_app_core_store_store__WEBPACK_IMPORTED_MODULE_5__["Store"].AbstractService {
    constructor(scenUtils, schScheduleData, sessionService, scenHttpService, activeWPService, cavLogger, scriptRestService) {
        super();
        this.scenUtils = scenUtils;
        this.schScheduleData = schScheduleData;
        this.sessionService = sessionService;
        this.scenHttpService = scenHttpService;
        this.activeWPService = activeWPService;
        this.cavLogger = cavLogger;
        this.scriptRestService = scriptRestService;
        this.paramScenPoolList = {};
        this.bodyKeyFiles = [];
        this.reqBodyPoolList = {};
        this.schUtility = new _commons_sch_utility__WEBPACK_IMPORTED_MODULE_16__["SchUtility"](this.scenUtils);
        this.subscription = this.scenUtils.notifySaveAndReadService$.subscribe((res) => {
            switch (res['action']) {
                case 'save':
                    break;
                default:
                    break;
            }
        });
    }
    /**
     * This method converts groupArra to json that will be saved in server file (scenario.json).
     * @param groupArray groupArray from API configuration, used to hold and display all group data.
     */
    convertGroupArrayToJSON(groupArray) {
        var _a, _b, _c, _d, _e;
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            let json = {};
            let configurationObj = { testname: `${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}`, isFlow: this.scenUtils.isFlowInline };
            json['configuration'] = configurationObj;
            json['tags'] = this.schScheduleData.tagsData;
            json['description'] = this.schScheduleData.scenDescription;
            if (this.schScheduleData.comment && Object.keys(this.schScheduleData.comment).length > 0) {
                json['comment'] = this.schScheduleData.comment;
            }
            json['preTest'] = this.schScheduleData.preTest;
            json['postTest'] = this.schScheduleData.postTest;
            let scheduleArr = [];
            let scriptObj = {};
            this.scenUtils.shareTestInfoList = [];
            //Check for RAL
            if (this.schScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCENARIO_TYPE"].REPLAY_ACESS_LOGS) {
                json['schedule'] = scheduleArr;
                json['scripts'] = scriptObj;
                let scenarioObj = {};
                for (let keyword of Object.keys(this.schScheduleData.saveKeywordData)) {
                    scenarioObj[keyword] = this.schScheduleData.saveKeywordData[keyword];
                }
                json['scenario'] = scenarioObj;
                return json;
            }
            //This is for maintaining order of scenario group when it is saved in json.
            let order = 0;
            //Now creating group data for fcu/fsr scenario
            yield Promise.all(groupArray.map((groupData, i) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
                var _f, _g, _h, _j;
                scheduleArr.push({
                    concurrency: 1,
                    duration: "00:01:00",
                    script: groupData.grpName,
                });
                if (groupData.prescript && groupData.postscript)
                    yield this.bodySave({ [`${groupData.grpName}.pre`]: groupData.prescript, [`${groupData.grpName}.post`]: groupData.postscript });
                let parameters = lodash__WEBPACK_IMPORTED_MODULE_15__["cloneDeep"](groupData.parameters);
                for (let key in parameters) {
                    // 1. Filter out entries where refId is NOT null and NOT empty
                    // This keeps only the items where refId is missing, null, or ""
                    parameters[key] = parameters[key].filter(param => {
                        const noRefID = (groupData.refId != null && groupData.refId != "") || param.refId == undefined || param.refId == null || param.refId == "";
                        return noRefID;
                    });
                    if (key == "file" || key == "index_file") {
                        yield this.uploadBodyFile(parameters[key]);
                        yield this.getEncryptedParametersForFile(parameters[key]);
                        for (let param of parameters[key]) {
                            //deleting file in parameters as it is not needed in scenario.json.
                            delete param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__["FILE_PARAM_CONST"].file];
                        }
                    }
                }
                // similar to parameter , filter assertion array with refId == null 
                let assertions = (_f = groupData.assertions) === null || _f === void 0 ? void 0 : _f.filter(assertion => {
                    const noRefID = (groupData.refId != null && groupData.refId != "") || assertion.refId == undefined || assertion.refId == null || assertion.refId == "";
                    return noRefID;
                });
                let grpHeaders = {};
                if (groupData.headers == undefined)
                    groupData.headers = [];
                for (let header of groupData.headers) {
                    if (header.headerKey.name && header.del)
                        grpHeaders[header.headerKey.name] = header.headerValue.name;
                }
                let baseObj = {
                    parameters: parameters,
                    assertions: assertions,
                    assertionsV2: groupData.assertionsV2 || [],
                    headers: grpHeaders,
                    scriptType: groupData.scriptLanguage,
                    order: order++,
                    scriptMode: groupData.scriptMode,
                    protocol: groupData.protocol ? Object.assign({}, groupData.protocol) : undefined
                };
                // Save assertionV2 data files
                let assertionV2DataFiles = {};
                // Populate assertionV2DataFiles with file-based assertions
                if (groupData.assertionsV2) {
                    for (let assertion of groupData.assertionsV2) {
                        if (assertion.rhs && assertion.rhs.type === 'file' && assertion.ui && assertion.ui.rhsText) {
                            assertionV2DataFiles[assertion.rhs.value] = assertion.ui.rhsText;
                        }
                    }
                }
                yield this.bodySave(assertionV2DataFiles);
                scriptObj[groupData.grpName] = baseObj;
                let flowsObj = {};
                let flowOrder = 0;
                for (let flowObj of groupData.flowArr) {
                    let requestArray = [];
                    let stepsArr = [];
                    // bodyTextArr will collect body files to be saved for this flow
                    let bodyTextArr = {};
                    // If group or flow is a referenced/shared asset (has refId),
                    // bodies are stored in source scenario and must not be modified here.
                    const isReferenced = !!groupData.refId || !!flowObj.refId;
                    if (groupData.scriptType === "RDTURL") {
                        groupData.grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].RDT_NATIVE;
                    }
                    stepsArr = lodash__WEBPACK_IMPORTED_MODULE_15__["cloneDeep"](flowObj.stepsArr || []);
                    stepsArr.forEach(step => {
                        var _a, _b;
                        if ((_a = step.preStep) === null || _a === void 0 ? void 0 : _a.inline) {
                            step.preStep.inline = btoa(step.preStep.inline);
                        }
                        if ((_b = step.postStep) === null || _b === void 0 ? void 0 : _b.inline) {
                            step.postStep.inline = btoa(step.postStep.inline);
                        }
                        // Preserve condition data for steps (same as requests)
                        if (!step.condition) {
                            step.condition = [];
                        }
                    });
                    for (let requestObj of flowObj.reqArr) {
                        let inlineRequestArray = [];
                        let headers = {};
                        let inlineBodyTextArr = {};
                        if (requestObj.inlineReqArr && requestObj.inlineReqArr.length != 0) {
                            for (let inlineReqObj in requestObj.inlineReqArr) {
                                let hederInlineReq = {};
                                // If referenced, pass a throwaway object so we don't collect body text
                                const inlineBodyCollector = isReferenced ? {} : inlineBodyTextArr;
                                this.parseReqDataJson(requestObj.inlineReqArr[inlineReqObj], hederInlineReq, groupData, inlineBodyCollector, requestObj, inlineReqObj, flowObj);
                                let inReqObj = {
                                    url: requestObj.inlineReqArr[inlineReqObj].url,
                                    label: requestObj.inlineReqArr[inlineReqObj].reqName,
                                    method: requestObj.inlineReqArr[inlineReqObj].method,
                                    headers: hederInlineReq,
                                    thinkTime: requestObj.inlineReqArr[inlineReqObj].thinkTime == "-1" ? "" : requestObj.inlineReqArr[inlineReqObj].thinkTime.toString(),
                                    bodyFile: requestObj.inlineReqArr[inlineReqObj].bodyFile
                                };
                                if (requestObj.inlineReqArr[inlineReqObj].repeatInline != "" || requestObj.inlineReqArr[inlineReqObj].repeatInline > 0) {
                                    inReqObj['repeatInline'] = requestObj.inlineReqArr[inlineReqObj].repeatInline;
                                    inReqObj['repeatNum'] = requestObj.inlineReqArr[inlineReqObj].repeatNum;
                                }
                                inlineRequestArray.push(inReqObj);
                            }
                            yield this.bodySave(inlineBodyTextArr);
                        }
                        // Parse request and collect body only when not referenced
                        const mainBodyCollector = isReferenced ? {} : bodyTextArr;
                        this.parseReqDataJson(requestObj, headers, groupData, mainBodyCollector, null, null, flowObj);
                        let preRequestInline = requestObj.preRequest ? requestObj.preRequest.inline : '';
                        let postResponseInline = requestObj.postResponse ? requestObj.postResponse.inline : '';
                        let condition = requestObj.condition ? requestObj.condition : [];
                        let reqObj = {
                            url: requestObj.url,
                            label: requestObj.reqName,
                            method: requestObj.method,
                            headers,
                            thinkTime: requestObj.thinkTime == "-1" ? "" : requestObj.thinkTime.toString(),
                            inlineRequests: inlineRequestArray,
                            bodyFile: requestObj.bodyFile,
                            enable: requestObj.enable,
                            preRequest: { inline: btoa(preRequestInline) },
                            postResponse: { inline: btoa(postResponseInline) },
                            condition: condition
                        };
                        // Save DNS fields under dns property if present
                        if (requestObj.dns) {
                            reqObj.dns = requestObj.dns;
                        }
                        requestArray.push(reqObj);
                    }
                    yield this.bodySave(bodyTextArr);
                    flowsObj[flowObj.flowName] = {
                        requests: requestArray,
                        steps: stepsArr,
                        order: flowOrder++,
                        enable: flowObj.enable,
                        refId: flowObj.refId,
                        ownerId: (_g = flowObj.ownerId) !== null && _g !== void 0 ? _g : null,
                    };
                    if (flowObj.refId || flowObj.ownerId) {
                        try {
                            let refId = flowObj.refId || flowObj.ownerId;
                            const md5sum = this.scenUtils.jsonToMd5(flowsObj[flowObj.flowName], _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["IGNORE_KEYS_FOR_MD5"]);
                            const shareInfo = {
                                refID: refId,
                                md5sum: md5sum,
                                md5FromServer: flowObj.md5FromServer || null,
                                operation: flowObj.refId ? _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["SHARE_TEST_OPERATION"].SAVE : _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["SHARE_TEST_OPERATION"].SHARE,
                                type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["BROWSE_TEST_MODE"].IMPORT_FLOW,
                                groupName: groupData.grpName,
                                flowName: flowObj.flowName
                            };
                            groupData.shareTestInfo = [shareInfo];
                            this.scenUtils.shareTestInfoList = this.scenUtils.shareTestInfoList || [];
                            this.scenUtils.shareTestInfoList.push(shareInfo);
                        }
                        catch (e) {
                            // swallow hashing errors silently
                        }
                    }
                }
                scriptObj[groupData.grpName]['state'] = (_h = groupData.state) !== null && _h !== void 0 ? _h : _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_22__["NO_CODE_TEST_STATE"].MANUAL;
                scriptObj[groupData.grpName]['ownerId'] = groupData.ownerId;
                scriptObj[groupData.grpName]['refId'] = groupData.refId ? groupData.refId : null;
                scriptObj[groupData.grpName]['flows'] = flowsObj;
                scriptObj[groupData.grpName]['genCapacity'] = groupData.genCapacity;
                scriptObj[groupData.grpName]['type'] = groupData.grpType;
                if (groupData.rumsid)
                    scriptObj[groupData.grpName]['rumsid'] = groupData.rumsid;
                scriptObj[groupData.grpName][groupData.grpType] = groupData[groupData.grpType];
                if (groupData.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].RDT_NATIVE) {
                    const rdtConfig = (groupData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].RDT_NATIVE] || []);
                    // Persist only normalized platform values so UI load/save behavior remains stable.
                    const resolvedPrimaryOS = (((groupData.primaryOS || ((_j = rdtConfig === null || rdtConfig === void 0 ? void 0 : rdtConfig[0]) === null || _j === void 0 ? void 0 : _j.os) || '') + '').trim()).toLowerCase();
                    scriptObj[groupData.grpName]['primaryOS'] = (resolvedPrimaryOS === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_IOS"]) ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_ANDROID"];
                }
                scriptObj[groupData.grpName]['runlogic'] = groupData.runlogicList;
                // (Removed group-level DNS saving)
                // If this group was imported (has refId), compute md5 of its content and register shareTestInfo
                if (groupData.refId || groupData.ownerId) {
                    try {
                        let refId = groupData.refId || groupData.ownerId;
                        const md5sum = this.scenUtils.jsonToMd5(scriptObj[groupData.grpName], _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["IGNORE_KEYS_FOR_MD5"]);
                        const shareInfo = {
                            refID: refId,
                            md5sum: md5sum,
                            md5FromServer: groupData.md5FromServer || null,
                            operation: groupData.refId ? _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["SHARE_TEST_OPERATION"].SAVE : _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["SHARE_TEST_OPERATION"].SHARE,
                            type: _import_script_browse_test_sidebar_constants_browse_test_constants__WEBPACK_IMPORTED_MODULE_21__["BROWSE_TEST_MODE"].IMPORT_SCRIPT,
                            groupName: groupData.grpName
                        };
                        groupData.shareTestInfo = [shareInfo];
                        this.scenUtils.shareTestInfoList = this.scenUtils.shareTestInfoList || [];
                        this.scenUtils.shareTestInfoList.push(shareInfo);
                    }
                    catch (e) {
                        // swallow hashing errors silently
                    }
                }
            })));
            if (((_b = (_a = this.schScheduleData) === null || _a === void 0 ? void 0 : _a.repetitionParams) === null || _b === void 0 ? void 0 : _b.value) && ((_d = (_c = this.schScheduleData) === null || _c === void 0 ? void 0 : _c.repetitionParams) === null || _d === void 0 ? void 0 : _d.value.length) > 0) {
                this.saveRepetitionParamsAsCSV((_e = this.schScheduleData) === null || _e === void 0 ? void 0 : _e.repetitionParams);
            }
            json['schedule'] = scheduleArr;
            json['scripts'] = scriptObj;
            let scenarioObj = {};
            for (let keyword of Object.keys(this.schScheduleData.saveKeywordData)) {
                scenarioObj[keyword] = this.schScheduleData.saveKeywordData[keyword];
            }
            json['scenario'] = scenarioObj;
            json['defaultScriptType'] = this.scenUtils.scriptType;
            return json;
        });
    }
    getEncryptedParametersForFile(fileParamArray) {
        var _a, _b, _c, _d;
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            if (!Array.isArray(fileParamArray) || fileParamArray.length === 0) {
                console.warn('No file parameters provided.');
                return;
            }
            for (const fileParam of fileParamArray) {
                const encodeMode = (_a = fileParam['encodeMode']) !== null && _a !== void 0 ? _a : '';
                const varName = (_b = fileParam['parameter-name']) !== null && _b !== void 0 ? _b : '';
                if (encodeMode === '') {
                    console.warn(`Skipping encryption for ${fileParam['fileName']} — encodeMode is empty.`);
                    continue;
                }
                let columnIndex = [];
                if (varName.includes(":E")) {
                    if (varName.includes(",")) {
                        const arr = varName.split(",");
                        arr.forEach((element, i) => {
                            if (element.includes(":E")) {
                                columnIndex.push(i + 1);
                            }
                        });
                    }
                    else {
                        columnIndex.push(1);
                    }
                    const fileName = (_d = (_c = fileParam['file']) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : fileParam['fileName'];
                    const testName = `${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}`;
                    const tmpArr = testName.split("/");
                    const user = this.sessionService.session.cctx.u === 'cavisson' ? 'admin' : this.sessionService.session.cctx.u;
                    const filePath = `/home/cavisson/${this.sessionService.preSession.controllerName}/workspace/${user}/${this.activeWPService.profile}/cavisson/${tmpArr[0]}/${tmpArr[1]}/scenarios/${tmpArr[2]}/${fileName}`;
                    const req = `-f ${filePath} -c ${columnIndex.join(",")} -d ${fileParam['delimiter']} -o ${filePath} -l ${fileParam['firstDataLine']}`;
                    const payload = {
                        reqData: req,
                        opCode: 5,
                    };
                    this.scriptRestService.getStatusError(payload).subscribe((state) => {
                        if (state instanceof _home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_19__["ScriptRestLoading"])
                            return;
                        if (state instanceof _home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_19__["ScriptRestLoaded"]) {
                            if (state.data['status']) {
                                console.log(`FILE ${fileParam['fileName']} SUCCESSFULLY ENCRYPTED`);
                            }
                            else {
                                this.scenUtils.warnMessage(`Error encrypting file "${fileParam['fileName']}": ${state.data['output'][0]}`);
                            }
                        }
                    });
                }
            }
        });
    }
    uploadReqBody() {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            let f = new FormData();
            for (let trans in this.bodyKeyFiles) {
                for (let file in this.bodyKeyFiles[trans]) {
                    if (this.bodyKeyFiles[trans][file])
                        f.append(this.bodyKeyFiles[trans][file]['name'], this.bodyKeyFiles[trans][file]);
                }
            }
            this.uploadFileAPI(f);
        });
    }
    bodySave(bodyTextArr) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            if (Object.keys(bodyTextArr).length > 0) {
                let headers = new _angular_common_http__WEBPACK_IMPORTED_MODULE_1__["HttpHeaders"]();
                headers.append("Content-Type", "application/json");
                this.saveYamlBodyFile(`${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}`, bodyTextArr).subscribe((state) => {
                    if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["SaveYamlBodyLoadingState"]) {
                        return Promise.resolve();
                    }
                    if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["SaveYamlBodyLoadedState"]) {
                        return;
                    }
                }, (state) => {
                });
            }
            else {
                return Promise.resolve();
            }
        });
    }
    saveYamlBodyFile(scenarioName, value) {
        const output = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
        setTimeout(() => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["SaveYamlBodyLoadingState"]());
        }, 0);
        const path = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWizardServices.saveYamlBodyFile.endpoint + '?scenName=' + scenarioName + '&productKey=' + this.sessionService.session.cctx.pk + "&userName=" + this.sessionService.session.cctx.u;
        let base = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWizardServices.base.defaultBase;
        if (this.sessionService.preSession.multiDc) {
            const masterURL = this.sessionService.preSession.dcData.filter(e => e.master).map(e => e.url)[0];
            base = masterURL + src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWizardServices.base.defaultBase;
        }
        this.controller.post(path, value, base).subscribe((data) => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["SaveYamlBodyLoadedState"](data));
            output.complete();
        }, (e) => {
            output.error(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["SaveYamlBodyLoadingErrorState"](e));
            output.complete();
            this.logger.error('loading failed', e);
        });
        return output;
    }
    /**
     *  This method takes body from groupArray and upload it to scenario directory.
     *  @param - fileParamObj: file parameter object containing file information like file, file name, etc.
     *  @returns - Returns promise upon uploadFile request success or error callback.
     */
    uploadBodyFile(fileParam) {
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            let formdata = new FormData();
            let fileParamData = [];
            for (let i = 0; i < fileParam.length; i++) {
                fileParamData = [...fileParamData, fileParam[i]];
                for (let ii = 0; ii < fileParamData.length; ii++) {
                    let file;
                    if (fileParamData[ii][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__["FILE_PARAM_CONST"].file] == undefined)
                        continue;
                    if (fileParamData[ii][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__["FILE_PARAM_CONST"].file].toString() == new Blob().toString()) {
                        continue;
                    }
                    else
                        file = fileParamData[ii][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__["FILE_PARAM_CONST"].file];
                    formdata.append(fileParamData[ii][_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_13__["FILE_PARAM_CONST"].file].name, file);
                }
            }
            return this.uploadFileAPI(formdata);
        });
    }
    saveRepetitionParamsAsCSV(data) {
        var _a;
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            try {
                const rep = data;
                if (!rep) {
                    this.cavLogger.error("No repetitionParams found");
                    return;
                }
                if (!rep.value || rep.value.length === 0) {
                    this.cavLogger.error("No data in repetitionParams.value");
                    return;
                }
                if (!rep.fileName) {
                    this.cavLogger.error("No fileName set in repetitionParams, using default");
                    rep.fileName = "repetitionParams.csv";
                }
                // unwrap cols if needed
                const cols = ((_a = rep.tableHeader[0]) === null || _a === void 0 ? void 0 : _a.cols) || rep.tableHeader;
                const headers = cols.map((h) => h.label || h.field || h.key);
                const rows = rep.value.map((row) => cols.map((h) => { var _a; return (_a = row[h.key]) !== null && _a !== void 0 ? _a : ""; }));
                // Use Papa.unparse instead of manually joining
                const csvContent = papaparse__WEBPACK_IMPORTED_MODULE_17__["unparse"]({
                    fields: headers,
                    data: rows,
                });
                const blob = new Blob([csvContent], { type: "text/csv" });
                const formData = new FormData();
                //   formData.append("file", blob, rep.fileName);
                const file = new File([csvContent], rep.fileName);
                formData.append('file', file, file.name);
                yield this.uploadFileAPI(formData);
            }
            catch (err) {
                this.cavLogger.error("Error saving repetitionParams to CSV:", err);
            }
        });
    }
    uploadFileAPI(formdata) {
        let testName = `${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}`;
        let tmpArr = testName.split("/");
        let queryParam = "for=fileExplorer&destination=/home/cavisson/" + this.sessionService.preSession.controllerName + "/workspace/" + ((this.sessionService.session.cctx.u === 'cavisson') ? 'admin' : this.sessionService.session.cctx.u) + "/" + this.activeWPService.profile + "/cavisson/" + tmpArr[0] + "/" + tmpArr[1] + "/scenarios/" + tmpArr[2];
        return new Promise((resolve, reject) => {
            let subscription;
            subscription = this.uploadFile(queryParam, formdata).subscribe((state) => {
                if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["UploadFileLoadedState"]) {
                    let res = state.data;
                    if (res.success == "false") {
                        this.scenUtils.errorMessage(res.msg);
                        if (subscription)
                            subscription.unsubscribe();
                        reject(new Error(res.msg));
                    }
                    else {
                        if (subscription)
                            subscription.unsubscribe();
                        resolve(undefined);
                    }
                }
                // Ignore UploadFileLoadingState - just wait for LoadedState
            }, (error) => {
                if (subscription)
                    subscription.unsubscribe();
                reject(error);
            });
        });
    }
    /**
     * This method uploads body file inside scenario directory.
     * @param queryParam - query paramters for request.
     * @param data - post body data.
     * @returns - subject that can be subscribed for response.
     */
    uploadFile(queryParam, data) {
        const output = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
        setTimeout(() => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["UploadFileLoadingState"]());
        }, 0);
        let base = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.core.defaultBase;
        const path = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.uploadFile.load.endpoint + '?' + queryParam + '&productKey=' + this.sessionService.session.cctx.pk;
        if (this.sessionService.preSession.multiDc) {
            const masterURL = this.sessionService.preSession.dcData.filter(e => e.master).map(e => e.url)[0];
            base = masterURL + src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.core.defaultBase;
        }
        this.controller.postWithoutDefaultOpt(path, data, base).subscribe((data) => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["UploadFileLoadedState"](data));
            output.complete();
        }, (e) => {
            output.error(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["UploadFileLoadingErrorState"](e));
            output.complete();
            this.logger.error('loading failed', e);
        });
        return output;
    }
    /**
     * This methods get file for data file parameter.
     * @param fileName - file to get
     * @param scenarioName - scenario name
     * @returns - returns file download from server
     */
    getDataFile(fileName, scenarioName) {
        const output = new rxjs__WEBPACK_IMPORTED_MODULE_3__["Subject"]();
        setTimeout(() => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["GetDataFileLoadingState"]());
        }, 0);
        const path = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWebService.getDataFile.endpoint + `?productKey=${this.sessionService.session.cctx.pk}&fileName=${fileName}&scenarioName=${scenarioName}&userName=${this.sessionService.session.cctx.u}`;
        let base = src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWebService.base.defaultBase;
        if (this.sessionService.preSession.multiDc) {
            const masterURL = this.sessionService.preSession.dcData.filter(e => e.master).map(e => e.url)[0];
            base = masterURL + src_environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].api.scenarioWebService.base.defaultBase;
        }
        this.controller.getForBlobResp(path, null, base).subscribe((data) => {
            output.next(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["GetDataFileLoadedState"](data));
            output.complete();
        }, (e) => {
            output.error(new _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["GetDataFileLoadingErrorState"](e));
            output.complete();
            this.logger.error('loading failed', e);
        });
        return output;
    }
    parsedGrpFromJson(grpName, scriptData, phaseListTemp, arrKeyword, defaultScriptType) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j;
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            try {
                let grpData = new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_8__["SchGroupData"]();
                let flowArr = [];
                grpData.grpName = grpName;
                grpData = this.getGrpData(arrKeyword, grpName);
                grpData.dataDirectory = this.readDataDir(arrKeyword, grpName);
                grpData.totalRequest = 0;
                grpData.order = (_a = scriptData.order) !== null && _a !== void 0 ? _a : null;
                grpData.genCapacity = (_b = scriptData.genCapacity) !== null && _b !== void 0 ? _b : 0;
                grpData.refId = (_c = scriptData.refId) !== null && _c !== void 0 ? _c : null;
                grpData.md5FromServer = (_d = scriptData.md5FromServer) !== null && _d !== void 0 ? _d : null;
                grpData.ownerId = (_e = scriptData.ownerId) !== null && _e !== void 0 ? _e : null;
                grpData.runlogicList = (_f = scriptData.runlogic) !== null && _f !== void 0 ? _f : [];
                grpData.state = (_g = scriptData.state) !== null && _g !== void 0 ? _g : _constants_scenario_config_data__WEBPACK_IMPORTED_MODULE_22__["NO_CODE_TEST_STATE"].MANUAL;
                if (scriptData.rumsid) {
                    grpData.rumsid = scriptData.rumsid;
                }
                if (this.scenUtils.scheduleSettingType)
                    grpData.phaseList = phaseListTemp[grpName];
                else {
                    if (grpData.schBasicPhaseList == undefined)
                        grpData.schBasicPhaseList = [];
                    grpData.schBasicPhaseList = phaseListTemp[grpName];
                }
                for (let i in this.schScheduleData.groupDataList) {
                    if (this.schScheduleData.groupDataList[i].grpName == grpName) {
                        grpData.generatorNames = this.schScheduleData.groupDataList[i].generatorNames;
                        if (!this.scenUtils.scheduleSettingType)
                            grpData.phaseList = this.schUtility.createDefaultGpData(this.schScheduleData, grpData.grpName, grpData, this.schScheduleData.scheduleType);
                    }
                }
                if (Object.keys(scriptData.flows).length != 0) {
                    //Here, we are initializing isFlowInline variable if it is an old scenairo i.e., when isFlow property is undefined in configuration od scenJson.
                    if (!this.scenUtils.isFlowInline && Object.keys(scriptData.flows).length >= 2)
                        this.scenUtils.isFlowInline = 'yes';
                    else if (!this.scenUtils.isFlowInline && Object.keys(scriptData.flows).length < 2)
                        this.scenUtils.isFlowInline = "no";
                    if (!defaultScriptType)
                        this.scenUtils.scriptType = scriptData.scriptType;
                    else
                        this.scenUtils.scriptType = defaultScriptType;
                    grpData.scriptLanguage = scriptData.scriptType;
                    grpData.scriptMode = scriptData.scriptMode;
                    grpData.grpType = (_h = scriptData === null || scriptData === void 0 ? void 0 : scriptData.type) !== null && _h !== void 0 ? _h : _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].API;
                    grpData[grpData.grpType] = scriptData === null || scriptData === void 0 ? void 0 : scriptData[grpData.grpType];
                    if (grpData.grpType === _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].RDT_NATIVE) {
                        const rdtConfig = (grpData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].RDT_NATIVE] || []);
                        const resolvedPrimaryOS = (((scriptData.primaryOS || ((_j = rdtConfig === null || rdtConfig === void 0 ? void 0 : rdtConfig[0]) === null || _j === void 0 ? void 0 : _j.os) || '') + '').trim()).toLowerCase();
                        grpData.primaryOS = (resolvedPrimaryOS === _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_IOS"]) ? _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_IOS"] : _constants_scen_common_constants__WEBPACK_IMPORTED_MODULE_23__["PLATFORM_ANDROID"];
                    }
                    // Restore group-level protocol
                    if (scriptData.protocol) {
                        grpData.protocol = Object.assign({}, scriptData.protocol);
                    }
                    // (Removed group-level DNS loading)
                    // In buildFlowArr or after, for each request in each flow, restore DNS fields if present
                    // (Assuming buildFlowArr is responsible for constructing reqArr from JSON)
                    // Build flowArr using new helper to allow reuse from other places
                    flowArr = this.buildFlowArr(scriptData.flows, grpData);
                    grpData.flowArr = flowArr;
                    grpData.assertions = (scriptData === null || scriptData === void 0 ? void 0 : scriptData.assertions) || [];
                    grpData.assertionsV2 = (scriptData === null || scriptData === void 0 ? void 0 : scriptData.assertionsV2) || [];
                    let parameters = scriptData === null || scriptData === void 0 ? void 0 : scriptData.parameters;
                    grpData.parameters = parameters || {};
                    let headers = [];
                    let grpHeaders = (scriptData === null || scriptData === void 0 ? void 0 : scriptData.headers) || [];
                    for (let header in grpHeaders) {
                        let obj = { 'headerKey': { 'name': '' }, 'headerValue': { 'name': '' }, 'del': true, "chk": true };
                        obj['headerKey']['name'] = header;
                        obj['headerValue']['name'] = grpHeaders[header];
                        headers.push(obj);
                    }
                    grpData.headers = this.parseHeaders(scriptData === null || scriptData === void 0 ? void 0 : scriptData.headers);
                }
                else {
                    grpData.flowArr = [];
                    grpData.grpType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GROUP_TYPE"].CAVISSON;
                    grpData.dataDirectory = this.readDataDir(arrKeyword, grpName);
                    grpData.runLogic = this.readRunlogic(arrKeyword, grpName);
                }
                return grpData;
            }
            catch (e) {
                this.scenUtils.errorMessage(`${this.scenUtils.scenarioName} has been corrupted i.e., json file has been changed.`);
                return new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_8__["SchGroupData"]();
            }
        });
    }
    /**
     * This method parses headers from scenario.json and converts it to UI format.
     * @param headers from scenario.json
     *        {'Accept': 'text/plain'}
     * @return headers in Ui format.
     * [{'headerKey': {'name': 'Accept'}, 'headerValue': {'name': 'text/plain'}}]
     */
    parseHeaders(headersToParse) {
        let headers = [];
        //Adding default headers
        headers = lodash__WEBPACK_IMPORTED_MODULE_15__["cloneDeep"](this.scenUtils.defaultheaders);
        let grpHeaders = headersToParse || [];
        for (let header in grpHeaders) {
            let obj = { 'headerKey': { 'name': '' }, 'headerValue': { 'name': '' }, 'del': true, "chk": true };
            obj['headerKey']['name'] = header;
            if (grpHeaders[header] && grpHeaders[header].startsWith("//")) {
                obj['headerValue']['name'] = grpHeaders[header].substring(2);
                obj['chk'] = false;
            }
            else
                obj['headerValue']['name'] = grpHeaders[header];
            headers.push(obj);
        }
        headers.push({ 'headerKey': { 'name': '' }, 'headerValue': { 'name': '' }, 'del': false, "chk": false });
        return headers;
    }
    /**
     * This method get any file inside given scenario directory.
     * @param fileName - file to get
     * @param scenarioName - scenario name from which file to get.
     */
    getFileFromScenario(fileName, scenarioName) {
        return new Promise((onFulfill) => {
            if (this.paramScenPoolList && this.paramScenPoolList[scenarioName] != undefined) {
                onFulfill(this.paramScenPoolList[scenarioName]);
            }
            else {
                this.getDataFile(fileName, scenarioName).subscribe((state) => {
                    if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["GetDataFileLoadedState"]) {
                        let res = state.data;
                        let file = res ? res : {};
                        this.paramScenPoolList[scenarioName] = file;
                        onFulfill(file);
                    }
                }, (state) => {
                    onFulfill(null);
                });
            }
        });
    }
    setReqBody(req, res) {
        let bodyObj = {};
        let body = "";
        let bodyArr = [];
        let bodyData = {};
        let isBodyEditor = true;
        let bodyType = "text";
        bodyData = res;
        if (req['bodyFile']) {
            bodyType = req['bodyFile'].split(".")[1];
            if (bodyType == "formdata") {
                bodyType = "form-data";
                isBodyEditor = false;
                bodyArr = this.parseBodyArr(bodyData, req);
                bodyArr.push({
                    bodyKey: { name: "" }, bodyValue: { name: "" }, del: false, chk: true, bodyKeySel: 'text', bodyKeyOpt: [
                        { label: "Text", value: 'text' },
                        { label: "File", value: 'file' }
                    ]
                });
            }
            else if (bodyType == "urlencoded") {
                bodyType = "x-www-form-urlencoded";
                isBodyEditor = false;
                bodyArr = this.parseBodyArr(bodyData);
                bodyArr.push({ bodyKey: { name: "" }, bodyValue: { name: "" }, del: false, chk: true });
            }
            else {
                isBodyEditor = true;
                if (bodyData['status'] != "fail")
                    body = bodyData['yamlData'];
            }
        }
        bodyObj = {
            body: body,
            bodyArr: bodyArr,
            bodyType: bodyType,
            isBodyEditor: isBodyEditor
        };
        return bodyObj;
    }
    parseBodyArr(bodyData, requestData) {
        if (bodyData['status'] != "fail") {
            let body = JSON.parse(bodyData['yamlData']);
            let newBody = [];
            body.forEach((ele) => Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
                let obj = { 'bodyKey': { 'name': '' }, 'bodyValue': { 'name': '' } };
                if (ele['tp'] == 'file') {
                    obj['bodyKeySel'] = 'file';
                    obj['bodyKeyOpt'] = [
                        { label: "Text", value: "text" },
                        { label: "File", value: "file" }
                    ];
                    obj['bodyKey']['name'] = Object.keys(ele)[0];
                    obj['bodyValue']['name'] = Object.values(ele)[0];
                    obj['chk'] = true;
                    obj['del'] = true;
                    this.getFileFromScenario(obj['bodyValue']['name'], `${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}`).then((res) => {
                        this.bodyKeyFiles[requestData['bodyFile']] = res;
                    });
                }
                else if (ele['tp'] == undefined) {
                    obj['bodyKey']['name'] = Object.keys(ele)[0];
                    obj['bodyValue']['name'] = Object.values(ele)[0];
                    obj['chk'] = true;
                    obj['del'] = true;
                    if (requestData && requestData.bodyFile && requestData.bodyFile.includes("formdata")) {
                        obj['bodyKeySel'] = 'text';
                        obj['bodyKeyOpt'] = [
                            { label: "Text", value: "text" },
                            { label: "File", value: "file" }
                        ];
                    }
                }
                newBody.push(obj);
            }));
            return newBody;
        }
    }
    getBodyInString(grpData, oldBodyFile, shareTestInfo) {
        return new Promise((onFulfill) => {
            let path = `${this.scenUtils.Project}/${this.scenUtils.subProject}/${this.scenUtils.scenarioName}/${(oldBodyFile) ? oldBodyFile : grpData['bodyFile']}`;
            let template = "bodyFile";
            if ((!grpData['bodyFile'] || grpData['bodyFile'] == undefined) && (!grpData['body'] || !grpData['bodyArr']))
                onFulfill("");
            else if (this.reqBodyPoolList[path] != undefined) {
                onFulfill(this.reqBodyPoolList[path]);
            }
            else {
                this.scenHttpService.getBodyInString(template, path, shareTestInfo).subscribe((state) => {
                    if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["ScenarioRestLoadingState"]) {
                        return;
                    }
                    if (state instanceof _interface_scenario_state__WEBPACK_IMPORTED_MODULE_7__["ScenarioRestLoadedState"]) {
                        this.reqBodyPoolList[path] = state.data;
                        onFulfill(state.data);
                    }
                }, (state) => {
                });
            }
        });
    }
    /**
     * 0 - group name
     * 1 - Controller mode (if generator is applied)
     * 2 - Scenario Type
     * 3 - UserProfile
     * 4 - type (Script[0]/URL[1])
     * 5 - session name/URL
     * 6 - number OR percentage
     * 7 - cluster Id (if USE_CLUSTER is non-zero)
     * 8 - gen weightage
     */
    getGrpData(data, grpName) {
        try {
            let gpData = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].SGRP]["_G"];
            let totalUser = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].NUM_USERS] ? data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].NUM_USERS]["_G"][0][0] : "";
            if (this.schScheduleData.scenarioType == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCENARIO_TYPE"].FSR)
                totalUser = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].TARGET_RATE] ? data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].TARGET_RATE]["_G"][0][0] : "";
            let schGroupData = new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_8__["SchGroupData"]();
            for (let i = 0; i < gpData.length; i++) {
                if (gpData[i][0] != grpName) {
                    continue;
                }
                else {
                    schGroupData.grpName = gpData[i][0];
                    if (gpData[i][2] == SCENARIO_TYPE.FIX_SESSION_RATE)
                        schGroupData.scenType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCENARIO_TYPE"].FSR;
                    else if (gpData[i][2] == SCENARIO_TYPE.FIX_CONCURRENT_USERS)
                        schGroupData.scenType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCENARIO_TYPE"].FCU;
                    else if (gpData[i][2] == "NA")
                        schGroupData.scenType = this.schScheduleData.scenarioType;
                    schGroupData.userProfile = gpData[i][3];
                    schGroupData.scriptName = gpData[i][5];
                    if (this.schScheduleData.distributeMode == _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["DISTRIBUTE_MODE"].BY_PERCENTAGE) {
                        schGroupData.percentage = +gpData[i][6];
                        this.schScheduleData.cumNumUser = totalUser;
                        schGroupData.numVUser = Math.round((totalUser * schGroupData.percentage) / 100);
                    }
                    else
                        schGroupData.numVUser = +gpData[i][6];
                    if (gpData[i][4] == "1")
                        schGroupData.scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCRIPT_TYPE"].URL;
                    else if (gpData[i][4] == "0")
                        schGroupData.scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCRIPT_TYPE"].SCRIPT;
                    else if (gpData[i][4] == "10")
                        schGroupData.scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCRIPT_TYPE"].RDT_URL;
                    else if (gpData[i][4] == "100")
                        schGroupData.scriptType = _constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCRIPT_TYPE"].JMETER_SCRIPT;
                    if (gpData[i][7])
                        schGroupData.clusterID = gpData[i][7] == -1 ? 0 : gpData[i][7];
                    if (gpData[i][8])
                        schGroupData.genWeightage = gpData[i][8] == -1 ? 1 : Number.parseFloat(gpData[i][8]);
                }
            }
            return schGroupData;
        }
        catch (e) {
            return new _interface_sch_group_data__WEBPACK_IMPORTED_MODULE_8__["SchGroupData"]();
        }
    }
    readDataDir(data, grpName) {
        let gpData = data[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].G_DATADIR];
        let dataDirScript = "";
        for (let gp in gpData) {
            if (gp == grpName) {
                dataDirScript = gpData[gp][0][1];
                break;
            }
            else if (gp == "ALL") {
                dataDirScript = gpData[gp][0][1];
            }
        }
        return (dataDirScript == "NA") ? "as per script" : dataDirScript;
    }
    readRunlogic(keywordData, grpName) {
        if (keywordData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].G_SCRIPT_RUNLOGIC]) {
            let gpData = keywordData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].G_SCRIPT_RUNLOGIC][_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["GLOBAL_KEY"]];
            let runLogic = "";
            if (!gpData) {
                gpData = keywordData[_constants_scen_schedule_constants__WEBPACK_IMPORTED_MODULE_12__["SCH_KEYWORD"].G_SCRIPT_RUNLOGIC];
                for (let gp in gpData) {
                    if (gp == grpName) {
                        runLogic = gpData[gp][0][0];
                    }
                    else
                        continue;
                }
            }
            else {
                for (let gp in gpData) {
                    if (gpData[gp][0] == grpName) {
                        runLogic = gpData[gp][1];
                    }
                    else
                        continue;
                }
            }
            return (runLogic == "NA" || !runLogic) ? "as per script" : runLogic;
        }
    }
    parseReqDataJson(reqObj, headers, groupData, bodyTextArr, requestObj, i, flowObj) {
        for (let header of reqObj.headers) {
            if (header.headerKey.name && header.del && header.chk)
                headers[header.headerKey.name] = header.headerValue.name;
            else if (header.headerKey.name && header.del && !header.chk)
                headers[header.headerKey.name] = "//" + header.headerValue.name;
        }
        let bodyFile = "";
        if (reqObj.bodyType != "form-data" && reqObj.bodyType != "x-www-form-urlencoded") {
            /**
             * Use Case: This change is done for when a particular request is not visited. Before, while saving it used to save that unvisited req's bodytype as text by default.
             * So now, we will only initialize bodyFile when our req's bodyFile is undefined. And while changine bodyType, we will alter our bodyFile.
             */
            bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${reqObj.reqName}.${reqObj.bodyType}`;
            if (!reqObj.reqName && requestObj)
                bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${requestObj.reqName}_${i}.${reqObj.bodyType}`;
            if (reqObj.body)
                bodyTextArr[bodyFile] = reqObj.body;
        }
        else if (reqObj.bodyType == "x-www-form-urlencoded") {
            bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${reqObj.reqName}.urlencoded`;
            if (!reqObj.reqName && requestObj)
                bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${requestObj.reqName}_${i}.urlencoded`;
            for (let i = 0; i < reqObj.bodyArr.length; i++) {
                if (reqObj.bodyArr[i]['bodyKey']['name']) {
                    if (bodyTextArr[bodyFile] == undefined)
                        bodyTextArr[bodyFile] = [{
                                [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name']
                            }];
                    else
                        bodyTextArr[bodyFile].push({ [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name'] });
                }
            }
        }
        else {
            bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${reqObj.reqName}.formdata`;
            if (!reqObj.reqName && requestObj)
                bodyFile = reqObj.bodyFile || `${groupData.grpName}_${flowObj.flowName}_${requestObj.reqName}_${i}.formdata`;
            for (let i = 0; i < reqObj.bodyArr.length; i++) {
                if (reqObj.bodyArr[i]['bodyKey']['name'])
                    if (bodyTextArr[bodyFile] == undefined) {
                        if (reqObj.bodyArr[i]['bodyKeySel'] == 'text') {
                            bodyTextArr[bodyFile] = [{
                                    [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name']
                                }];
                        }
                        else {
                            bodyTextArr[bodyFile] = [{
                                    [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name'], "tp": reqObj.bodyArr[i]['bodyKeySel']
                                }];
                            this.bodyKeyFiles[bodyFile] = {
                                [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['file']
                            };
                            this.uploadReqBody();
                        }
                    }
                    else {
                        if (reqObj.bodyArr[i]['bodyKeySel'] == 'text') {
                            bodyTextArr[bodyFile].push({ [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name'] });
                        }
                        else {
                            bodyTextArr[bodyFile].push({ [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['name'], "tp": reqObj.bodyArr[i]['bodyKeySel'] });
                            if (this.bodyKeyFiles && this.bodyKeyFiles[bodyFile])
                                this.bodyKeyFiles[bodyFile][reqObj.bodyArr[i]['bodyKey']['name']] = reqObj.bodyArr[i]['bodyValue']['file'];
                            else
                                this.bodyKeyFiles[bodyFile] = {
                                    [reqObj.bodyArr[i]['bodyKey']['name']]: reqObj.bodyArr[i]['bodyValue']['file']
                                };
                            this.uploadReqBody();
                        }
                    }
            }
        }
        if (bodyTextArr[bodyFile] != undefined && (bodyFile.endsWith("urlencoded") || bodyFile.endsWith("formdata"))) {
            bodyTextArr[bodyFile] = JSON.stringify(bodyTextArr[bodyFile]);
        }
        reqObj['bodyFile'] = bodyFile;
    }
    /**
     * Build flowArr from flows object in scenario.json.
     * This is extracted for reuse from parsedGrpFromJson.
     * @param flows - scriptData.flows
     * @param grpData - group data that will be mutated for totals
     */
    buildFlowArr(flows, grpData) {
        var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
        const flowArr = [];
        for (let flow in flows) {
            let reqCount = 0;
            let reqData = flows[flow].requests;
            let reqArr = [];
            let stepsArr = flows[flow].steps || [];
            stepsArr.forEach(step => {
                var _a, _b;
                if ((_a = step.preStep) === null || _a === void 0 ? void 0 : _a.inline) {
                    try {
                        step.preStep.inline = atob(step.preStep.inline);
                    }
                    catch (_c) {
                        step.preStep.inline = '';
                    }
                }
                if ((_b = step.postStep) === null || _b === void 0 ? void 0 : _b.inline) {
                    try {
                        step.postStep.inline = atob(step.postStep.inline);
                    }
                    catch (_d) {
                        step.postStep.inline = '';
                    }
                }
                // Load condition data for steps (same as requests)
                if (!step.condition) {
                    step.condition = [];
                }
            });
            //If enable is undefined or null then its set to true other wise its value remain same.
            stepsArr.forEach(s => { var _a; return s.enable = (_a = s.enable) !== null && _a !== void 0 ? _a : true; });
            const item = { flowName: flow, reqArr: [], stepsArr: stepsArr, totalRequest: stepsArr.length, order: (_a = flows[flow].order) !== null && _a !== void 0 ? _a : null, enable: (_b = flows[flow].enable) !== null && _b !== void 0 ? _b : true, refId: (_c = flows[flow].refId) !== null && _c !== void 0 ? _c : null, ownerId: (_d = flows[flow].ownerId) !== null && _d !== void 0 ? _d : null, md5FromServer: (_e = flows[flow].md5FromServer) !== null && _e !== void 0 ? _e : null };
            const order = Number.isInteger((_f = flows[flow]) === null || _f === void 0 ? void 0 : _f.order) && flows[flow].order >= 0 ? flows[flow].order : null;
            // if (order !== null && flowArr[order] == null) {
            //     flowArr[order] = item; // place at exact index (may create holes)
            // } else {
            //     flowArr.push(item);
            // }
            // For browser/RDT types, totalBrowserSteps should reflect steps length. If multiple flows exist, accumulate.
            grpData.totalBrowserSteps = (grpData.totalBrowserSteps || 0) + stepsArr.length;
            for (let i = 0; i < (reqData || []).length; i++) {
                let inlineReqArr = [];
                if (reqData[i].inlineRequests && reqData[i].inlineRequests.length != 0) {
                    for (let ii = 0; ii < reqData[i].inlineRequests.length; ii++) {
                        let headers = this.parseHeaders(reqData[i].inlineRequests[ii].headers);
                        inlineReqArr.push({
                            reqName: reqData[i].inlineRequests[ii].label,
                            bodyFile: reqData[i].inlineRequests[ii]['bodyFile'],
                            headers: headers,
                            url: reqData[i].inlineRequests[ii].url,
                            body: reqData[i].inlineRequests[ii].body || "",
                            bodyArr: [],
                            bodyType: "text",
                            thinkTime: reqData[i].inlineRequests[ii].thinkTime || "-1",
                            isBodyEditor: false,
                            method: reqData[i].inlineRequests[ii].method,
                            assertions: reqData[i].inlineRequests[ii].assertions,
                            searchParameters: [],
                            repeatInline: reqData[i].inlineRequests[ii].repeatInline,
                            repeatNum: reqData[i].inlineRequests[ii].repeatNum,
                            preRequest: { inline: reqData[i].inlineRequests[ii].preRequest },
                            postResponse: { inline: reqData[i].inlineRequests[ii].postResponse },
                        });
                    }
                }
                let headers = this.parseHeaders(reqData[i].headers);
                let preRequestInline = reqData[i].preRequest ? reqData[i].preRequest.inline : '';
                let postResponseInline = reqData[i].postResponse ? reqData[i].postResponse.inline : '';
                try {
                    preRequestInline = atob(preRequestInline);
                    postResponseInline = atob(postResponseInline);
                }
                catch (e) {
                    preRequestInline = '';
                    postResponseInline = '';
                }
                reqArr.push({
                    reqName: reqData[i].label,
                    bodyFile: reqData[i]['bodyFile'],
                    headers: headers,
                    url: reqData[i].url,
                    body: reqData[i].body || "",
                    bodyArr: [],
                    bodyType: "text",
                    thinkTime: reqData[i].thinkTime || "-1",
                    isBodyEditor: false,
                    method: reqData[i].method,
                    assertions: reqData[i].assertions,
                    searchParameters: [],
                    inlineReqArr: inlineReqArr,
                    enable: (_h = (_g = reqData[i]) === null || _g === void 0 ? void 0 : _g.enable) !== null && _h !== void 0 ? _h : true,
                    preRequest: { inline: preRequestInline },
                    postResponse: { inline: postResponseInline },
                    condition: ((_j = reqData[i]) === null || _j === void 0 ? void 0 : _j.condition) || [],
                    dns: ((_k = reqData[i]) === null || _k === void 0 ? void 0 : _k.dns) || null
                });
                // Backward compatibility: an embedded thinkTime as a separate entry
                if (reqData[i + 1] && (reqData[i + 1].thinkTime != "-1" && reqData[i + 1].thinkTime != "")) {
                    reqArr.push({
                        reqName: reqData[i + 1].label,
                        bodyFile: reqData[i + 1]['bodyFile'],
                        headers: headers,
                        url: "",
                        body: reqData[i + 1].body || "",
                        bodyArr: [],
                        bodyType: "text",
                        thinkTime: reqData[i + 1].thinkTime,
                        isBodyEditor: false,
                        method: reqData[i + 1].method,
                        assertions: [],
                        searchParameters: [],
                        enable: (_m = (_l = reqData[i]) === null || _l === void 0 ? void 0 : _l.enable) !== null && _m !== void 0 ? _m : true
                    });
                    i++;
                }
                else {
                    reqArr.push({
                        reqName: "",
                        bodyFile: "",
                        headers: headers,
                        url: "",
                        body: "",
                        bodyArr: [],
                        bodyType: "text",
                        thinkTime: "0",
                        isBodyEditor: false,
                        method: "",
                        assertions: [],
                        searchParameters: [],
                        enable: (_p = (_o = reqData[i]) === null || _o === void 0 ? void 0 : _o.enable) !== null && _p !== void 0 ? _p : true
                    });
                }
            }
            reqCount = reqArr.length / 2;
            item.reqArr = reqArr;
            item.totalRequest = reqCount;
            const requestOrder = Number.isInteger((_q = flows[flow]) === null || _q === void 0 ? void 0 : _q.order) && flows[flow].order >= 0 ? flows[flow].order : null;
            if (requestOrder !== null && flowArr[requestOrder] == null) {
                flowArr[requestOrder] = item;
            }
            else {
                flowArr.push(item);
            }
            grpData.totalRequest = (grpData.totalRequest || 0) + reqCount;
        }
        // Compact any undefined holes created by placing at exact indices
        const compact = flowArr.filter((x) => !!x);
        return compact;
    }
    ngOnDestroy() {
        if (this.subscription)
            this.subscription.unsubscribe();
    }
};
SaveAndReadService.ctorParameters = () => [
    { type: _scenario_utils_service__WEBPACK_IMPORTED_MODULE_10__["ScenarioUtilsService"] },
    { type: _sch_schedule_data_service__WEBPACK_IMPORTED_MODULE_11__["SchScheduleDataService"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_4__["SessionService"] },
    { type: _scenario_http_service__WEBPACK_IMPORTED_MODULE_9__["ScenarioHttpService"] },
    { type: src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_14__["WorkProfileActiveService"] },
    { type: src_app_shared_cavLoggerService_cav_logging_service__WEBPACK_IMPORTED_MODULE_18__["CavLoggingService"] },
    { type: _home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_20__["ScriptRestService"] }
];
SaveAndReadService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Injectable"])()
], SaveAndReadService);



/***/ }),

/***/ "./src/app/pages/scenario/service/script-parameter.service.ts":
/*!********************************************************************!*\
  !*** ./src/app/pages/scenario/service/script-parameter.service.ts ***!
  \********************************************************************/
/*! exports provided: ScriptParameterService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScriptParameterService", function() { return ScriptParameterService; });
/* 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 _interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../interface/script-parameter.constant */ "./src/app/pages/scenario/interface/script-parameter.constant.ts");
/* harmony import */ var _home_script_manager_parameter_components_add_parameter_parameter_data_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../home/script-manager/parameter/components/add-parameter/parameter-data.service */ "./src/app/pages/home/script-manager/parameter/components/add-parameter/parameter-data.service.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 _scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scenario-utils.service */ "./src/app/pages/scenario/service/scenario-utils.service.ts");






let ScriptParameterService = class ScriptParameterService {
    constructor(parameterDataService, router, scenUtilService) {
        this.parameterDataService = parameterDataService;
        this.router = router;
        this.scenUtilService = scenUtilService;
        this.isParamOpen = false; // This variable tells if parameter UI is open then only data will be emitted from scenario-design.component.
        this.isAssertionOpen = false; // This variable tells if parameter UI is open then only data will be emitted from scenario-design.component.
        this.router.events.subscribe(event => {
            if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_4__["NavigationStart"]) {
                if (event.url.indexOf("parameter") > -1)
                    this.isParamOpen = false;
                if (event.url.indexOf("checkpoint") > -1)
                    this.isAssertionOpen = false;
            }
            if (event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_4__["NavigationEnd"]) {
                if (event.url.indexOf("parameter") > -1)
                    this.isParamOpen = true;
                if (event.url.indexOf("checkpoint") > -1)
                    this.isAssertionOpen = true;
                let url = event.url;
                this.scenUtilService.openFrom = url.startsWith("/scenario") && url.indexOf('script:script-editor') == -1 ? "scenario" : "script";
            }
        });
    }
    getParamTableRow(res) {
        let tableObj = {};
        if (res.paramType == 'file') {
            if (res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].config] !== undefined && res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].config] !== "") {
                tableObj = {
                    name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].paramName],
                    type: res.paramType,
                    specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].paramName] + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].dataDir] + ", File=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].fileName]
                        + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].update] + ", Mode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].mode]
                        + ", FirstDataLine=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].firstDataLine] + ", ColumnDelimiter=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].delimiter] + ", VAR_VALUE=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].varValue] + ", EncodeMode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].encodeMode] + ", RemoveDupRecords=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].removeDupRecords]
                        + ", config=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].config]
                };
            }
            else {
                tableObj = {
                    name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].paramName],
                    type: res.paramType,
                    specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].paramName] + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].dataDir] + ", File=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].fileName]
                        + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].update] + ", Mode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].mode]
                        + ", FirstDataLine=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].firstDataLine] + ", ColumnDelimiter=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].delimiter] + ", VAR_VALUE=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].varValue] + ", EncodeMode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].encodeMode] + ", RemoveDupRecords=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].removeDupRecords]
                };
            }
        }
        if (res.paramType == 'scratch') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].paramName] + ",DefaultValue=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].defaultValue]
            };
        }
        if (res.paramType == 'search') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].paramName] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].label] + ", LB=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].LB] + ", RB=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].RB] + ", RE=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].regex] + ", GROUP=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].groupVal] + ", LBMATCH=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].LBMATCH] + ", ORD=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].ORD] + ", SaveOffset=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].saveOffset] + ", SaveLen=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].saveLen] + ", Convert=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].convertValue] + ", EncodeMode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].encodeMode] + ", ActionOnNotFound=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].actionOnNotFound] + ", Search=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].searchIn]
            };
        }
        if (res.paramType == 'dateTime') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].paramName] + ", Format=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].formatName] + ", DayType=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].dayType] + ", Offset=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].offset] + ", Min=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].minDays] + ", Max=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].maxDays] + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].updateOn]
            };
        }
        if (res.paramType == 'random_string') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].paramName] + ", Min=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].minValue] + ", Max=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].maxValue] + ", CharSet=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].encodeMode] + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].updateOn]
            };
        }
        if (res.paramType == 'json') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].paramName] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].label] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].lbValue] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].tempOrdValue] + ", SaveOffset=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].saveoffSet] + ", SaveLen=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].saveLength] + ", Convert=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].convertValue] + ", RedirectionDepth=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].redirectionDepth] + ", ActionOnNotFound=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].actionOnNotFound] + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].retainPreValue] + ", CharsToEncode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].encodeMode]
            };
        }
        if (res.paramType == 'xml') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: (res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].regStrLine]).replace(/nsl_xml_var/g, '').replace("(", '').replace(")", '')
            };
        }
        if (res.paramType == 'index_file') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].paramName] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].dataDir] + ", " + "FILE=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].fileName] + "," + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].indexVar] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].firstDataLine] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].delimiter] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].varValue] + ", CharsToEncode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].encodeMode]
            };
        }
        if (res.paramType == 'random_number') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].paramName] + ", Min=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].minValue] + ", Max=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].maxValue] + ", FORMAT=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].format] + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].updateOn]
            };
        }
        if (res.paramType == 'unique_number') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].paramName] + ", MINLENGTH=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].minLength] + ", Refresh=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].updateOn]
            };
        }
        if (res.paramType == 'scratch_array') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].paramName] + ",DefaultValue=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].defaultValue] + ",SIZE=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].size]
            };
        }
        if (res.paramType == 'unique_range') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].paramName] + ", StartRange=" + "\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].startRange] + "\"" + ", UserBlockSize=" + "\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].userBlockSize] + "\"" + ", Refresh=" + "\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].updateValueOn] + "\"" + ", Format=" + "\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].format] + "\"" + ", ActionOnRangeExceed=" + "\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].actionOnRange]
            };
        }
        if (res.paramType == 'Dataset using Query') {
            tableObj = {
                name: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].paramName],
                type: res.paramType,
                specification: res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].paramName] + ", DRIVER = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].drivers] + ", HOST = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].hostName] + ", PORT = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].port] + ", USER = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].userName] + ", PASSWORD = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].password] + ", DATABASE = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].dataBase] + ", QUERY = " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].query] + ", REFRESH=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].refreshName] + ", Mode=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].modeName] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].isSaveInToFile] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].filePathOnNetStorm] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].copyToTestRun] + ", " + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].saveUseOnceOption] + ", FirstDataLine=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].firstDataLine] + ", ColumnDelimiter=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].columnDelimiter] + ", HeaderLine=" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].headerLine] + ", CharsToEncode=\"" + res.obj[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].charToEncode]
            };
        }
        return tableObj;
    }
    /**
     *
     * @param strValue - String value to append.
     * @param value - Value to append. This value will be checked if it is empty or not.
     * @returns - String to append
     */
    appendString(strValue, value) {
        if (!value)
            return "";
        return strValue;
    }
    getAssertionTableRow(res) {
        let assertionObj = {};
        assertionObj = {
            page: (res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].label]).split("=")[1] == '*' ? 'All Pages' : (res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].label]).split("=")[1],
            criteria: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].assertionType] == 'content' ? res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isTextMatch] : res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].assertionType],
            criteriaValue: ((res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].assertionTxt]).replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '')).replace(/"/g, ''),
            messageOnFailure: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].id],
            saveCountVar: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].saveCountVarName],
            templateFailureStr: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].tempFailStr],
            actionOnFailure: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].actionOnFail],
            searchIN: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].searchIn],
            isTextMatch: res[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isTextMatch]
        };
        return assertionObj;
    }
    updateParameterData(parameterArr, rowData, paramType, reqArr) {
        for (let param of parameterArr) {
            if (param['parameter-name'] == rowData['name']) {
                //Setting edit param name in case of
                this.scenUtilService.editParamName = rowData['name'];
                this.manipulateParameterData(param, paramType, reqArr);
            }
        }
    }
    manipulateParameterData(param, paramType, reqArr) {
        if (paramType == 'file') {
            this.parameterDataService.objForFileParameter['varName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].paramName];
            this.parameterDataService.commonObj['dataDir'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].dataDir];
            this.parameterDataService.objForFileParameter['refreshName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].update];
            this.parameterDataService.objForFileParameter['modeName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].mode];
            this.parameterDataService.objForFileParameter['firstdataLine'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].dataHeaderRaw];
            this.parameterDataService.objForFileParameter['columnDelimeter'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].delimiter];
            this.parameterDataService.objForFileParameter['varValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].varValue];
            this.parameterDataService.objForFileParameter['encodeChar'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].encodeMode];
            this.parameterDataService.objForFileParameter['removeDupRecords'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].removeDupRecords];
            this.parameterDataService.objForFileParameter['fileName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].fileName];
            this.parameterDataService.objForFileParameter['firstDataLine'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].firstDataLine];
            if (param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].config]) {
                this.parameterDataService.objForFileParameter['config'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].config];
            }
            else {
                this.parameterDataService.textArea = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["FILE_PARAM_CONST"].textArea];
            }
        }
        if (paramType == 'search') {
            this.parameterDataService.objForSearchParameter.varName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].paramName];
            this.parameterDataService.objForSearchParameter.searchIn = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].searchIn];
            this.parameterDataService.objForSearchParameter.selectColumn = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].type];
            this.parameterDataService.objForSearchParameter.inputModeOptionForLB = this.parameterDataService.objForSearchParameter.selectColumn == 'Boundary' ? 'text' : param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].lbType];
            this.parameterDataService.objForSearchParameter.inputModeOptionForRB = this.parameterDataService.objForSearchParameter.selectColumn == 'Boundary' ? 'text' : param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].rbType];
            this.parameterDataService.objForSearchParameter.lBName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].LB];
            this.parameterDataService.objForSearchParameter.rBName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].RB];
            this.parameterDataService.objForSearchParameter.regularExpression = (this.parameterDataService.objForSearchParameter.selectColumn == 'boundaryAdv' || this.parameterDataService.objForSearchParameter.selectColumn == 'Boundary' ? null : param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].regex]);
            this.parameterDataService.objForSearchParameter.groupName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].groupVal];
            this.parameterDataService.objForSearchParameter.lbMatchValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].LBMATCH];
            this.parameterDataService.objForSearchParameter.oRDName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].ORD];
            this.parameterDataService.objForSearchParameter.saveoffSet = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].saveOffset];
            this.parameterDataService.objForSearchParameter.saveLength = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].saveLen];
            this.parameterDataService.objForSearchParameter.convertValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].convertValue];
            this.parameterDataService.objForFileParameter['encodeChar'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].encodeMode];
            this.parameterDataService.objForSearchParameter.actionOnNotFound = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].actionOnNotFound];
            let selectedPageList = this.getSelectedPagesList(param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].label], reqArr);
            this.getTransactions(reqArr, true, selectedPageList);
            this.parameterDataService.objForSearchParameter.redirectionDepth = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].redirectionDepth];
            this.parameterDataService.objForSearchParameter.variableRetainPreValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].variableRetainPreValue];
            this.parameterDataService.objForSearchParameter.idxValForSearchParam = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].idxValForSearchParam];
            this.parameterDataService.objForSearchParameter.isICcheckedRB = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].isICcheckedRB];
            this.parameterDataService.objForSearchParameter.isICcheckedLB = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].isICcheckedLB];
            this.parameterDataService.objForSearchParameter.selectLeftBoundary = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].lbType];
            this.parameterDataService.objForSearchParameter.selectRightBoundary = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SEARCH_PARAM_CONST"].rbType];
        }
        if (paramType == 'scratch') {
            let declareParam = {};
            this.parameterDataService.objForDeclareParameter.varName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].paramName];
            this.parameterDataService.objForDeclareParameter.defaultValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].defaultValue];
            this.parameterDataService.objForDeclareParameter.retainPrevValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].retainValue];
            declareParam[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].paramName] = this.parameterDataService.objForDeclareParameter.varName;
            declareParam[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].defaultValue] = this.parameterDataService.objForDeclareParameter.defaultValue;
            declareParam[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_PARAM_CONST"].retainValue] = this.parameterDataService.objForDeclareParameter.retainPrevValue;
            this.scenUtilService.emitParamObjObs(declareParam);
        }
        if (paramType == 'dateTime') {
            this.parameterDataService.objForDateTimeParam.paramName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].paramName];
            this.parameterDataService.objForDateTimeParam.formatName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].formatName];
            this.parameterDataService.objForDateTimeParam.isUnique = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].isUnique];
            this.parameterDataService.objForDateTimeParam.dayType = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].dayType];
            this.parameterDataService.objForDateTimeParam.minDate = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].minDays];
            this.parameterDataService.objForDateTimeParam.maxDate = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].maxDays];
            this.parameterDataService.objForDateTimeParam.refreshName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DATETIME_PARAM_CONST"].updateOn];
        }
        if (paramType == 'random_string') {
            this.parameterDataService.objForRandomStringParameter['paramName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].paramName];
            this.parameterDataService.objForRandomStringParameter['minValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].minValue];
            this.parameterDataService.objForRandomStringParameter['maxValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].maxValue];
            this.parameterDataService.objForRandomStringParameter['charSet'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].encodeMode];
            this.parameterDataService.objForRandomStringParameter['refreshName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMSTR_PARAM_CONST"].updateOn];
        }
        if (paramType == 'json') {
            this.parameterDataService.objForJsonParameter.varName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].paramName];
            this.parameterDataService.objForJsonParameter.objectPath = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].lbValue];
            this.parameterDataService.objForJsonParameter.encodeChar = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].encodeMode];
            this.parameterDataService.objForJsonParameter.saveoffSet = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].saveoffSet];
            this.parameterDataService.objForJsonParameter.saveLength = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].saveLength];
            this.parameterDataService.objForJsonParameter.convertValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].convertValue];
            this.parameterDataService.objForJsonParameter.redirectionDepth = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].redirectionDepth];
            this.parameterDataService.objForJsonParameter.actionOnNotFound = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].actionOnNotFound];
            let selectedPageList = this.getSelectedPagesList(param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].label], reqArr);
            this.getTransactions(reqArr, true, selectedPageList);
            this.parameterDataService.objForJsonParameter.oRDName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].oRDName];
            this.parameterDataService.idxVal = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["JSON_PARAM_CONST"].idxVal];
        }
        if (paramType == 'xml') {
            this.parameterDataService.objXMLParameter.varName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].paramName];
            this.parameterDataService.objXMLParameter.nodePath = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].node];
            this.parameterDataService.objXMLParameter.value = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].nodeValueStr];
            this.parameterDataService.objXMLParameter.convertValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].convert];
            this.parameterDataService.objForJsonParameter.encodeChar = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].encodeMode];
            this.parameterDataService.objXMLParameter.redirectionDepth = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].redirectionDepth];
            this.parameterDataService.objXMLParameter.ordValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].tempOrdStr];
            this.parameterDataService.objXMLParameter.actionOnNotFound = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].actionOnNotFound];
            let selectedPageList = this.getSelectedPagesList(param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].label], reqArr);
            this.getTransactions(reqArr, true, selectedPageList);
            this.parameterDataService.objXMLParameter.ordValue = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].ordValue];
            this.parameterDataService.conversionCheck = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].conversionCheck];
            this.parameterDataService.redirectionCheck = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].redirectionCheck];
            this.parameterDataService.actionCheck = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].actionCheck];
            this.parameterDataService.selectType = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].selectType];
            this.parameterDataService.idxValforXmlParam = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].idxValforXmlParam];
            this.parameterDataService.objXMLParameter.vecWhere = [];
            let whereStr = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["XML_PARAM_CONST"].whereStr];
            if (whereStr) {
                for (const match of whereStr.matchAll(/WHERE=<([^>]*)>="([^"]+)"/g)) {
                    if (match[1] === "") {
                        this.parameterDataService.objXMLParameter.vecWhere.push({ isNode: true, value: match[2] });
                    }
                    else {
                        this.parameterDataService.objXMLParameter.vecWhere.push({ isNode: false, attributeName: match[1], value: match[2] });
                    }
                }
            }
        }
        if (paramType == 'index_file') {
            this.parameterDataService.objForIndexFileParameter['varName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].paramName];
            this.parameterDataService.commonObj['dataDir'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].dataDir];
            this.parameterDataService.objForIndexFileParameter['columnDelimiter'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].delimiter];
            this.parameterDataService.objForIndexFileParameter['indexParameter'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].indexVar];
            this.parameterDataService.objForIndexFileParameter['firstDataLine'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].firstDataLine];
            this.parameterDataService.objForIndexFileParameter['varValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].varValue];
            this.parameterDataService.objForFileParameter['encodeChar'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].encodeMode];
            this.parameterDataService.objForIndexFileParameter['fileName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["INDEX_FILE__PARAM_CONST"].fileName];
        }
        if (paramType == 'random_number') {
            this.parameterDataService.objForRandomNumberParameter['paramName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].paramName];
            this.parameterDataService.objForRandomNumberParameter['minValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].minValue];
            this.parameterDataService.objForRandomNumberParameter['maxValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].maxValue];
            this.parameterDataService.objForRandomNumberParameter['format'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].format];
            this.parameterDataService.objForRandomNumberParameter['refreshName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["RANDOMNUM_PARAM_CONST"].updateOn];
        }
        if (paramType == 'unique_number') {
            this.parameterDataService.objForUniqueNumberParameter.paramName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].paramName];
            this.parameterDataService.minLength = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].minLength];
            this.parameterDataService.objForUniqueNumberParameter.refreshName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUENUM_PARAM_CONST"].updateOn];
        }
        if (paramType == 'scratch_array') {
            this.parameterDataService.objForDeclareArrayParameter['varName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].paramName];
            this.parameterDataService.objForDeclareArrayParameter['size'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].size];
            this.parameterDataService.objForDeclareArrayParameter['defaultValue'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["DECLARE_ARRAY_PARAM_CONST"].defaultValue];
        }
        if (paramType == 'unique_range') {
            this.parameterDataService.objForUniqueRangeParameter['paramName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].paramName];
            this.parameterDataService.objForUniqueRangeParameter['startRange'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].startRange];
            this.parameterDataService.objForUniqueRangeParameter['userBlockSize'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].userBlockSize];
            this.parameterDataService.objForUniqueRangeParameter['updateValueOn'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].updateValueOn];
            this.parameterDataService.objForUniqueRangeParameter['format'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].format];
            this.parameterDataService.objForUniqueRangeParameter['actionOnRange'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["UNIQUE_RANGE_PARAM_CONST"].actionOnRange];
        }
        if (paramType == 'Dataset using Query') {
            this.parameterDataService.objForSQLParameter.varName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].paramName];
            this.parameterDataService.objForSQLParameter.drivers = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].drivers];
            this.parameterDataService.objForSQLParameter.hostName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].hostName];
            this.parameterDataService.objForSQLParameter.port = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].port];
            this.parameterDataService.objForSQLParameter.userName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].userName];
            this.parameterDataService.objForSQLParameter.password = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].password];
            this.parameterDataService.objForSQLParameter.dataBase = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].dataBase];
            this.parameterDataService.objForSQLParameter.query = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].query];
            this.parameterDataService.objForFileParameter['refreshName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].refreshName];
            this.parameterDataService.objForFileParameter['modeName'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].modeName];
            this.parameterDataService.objForSQLParameter.fileName = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].filePathOnNetStorm];
            this.parameterDataService.objForSQLParameter.copyToTestRun = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].copyToTestRun];
            this.parameterDataService.objForFileParameter['saveUseOnceOption'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].saveUseOnceOption];
            this.parameterDataService.objForSQLParameter['firstDataLine'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].firstDataLine];
            this.parameterDataService.objForSQLParameter['columnDelimiter'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].columnDelimiter];
            this.parameterDataService.objForSQLParameter['headerLine'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].headerLine];
            this.parameterDataService.commonObj['charToEncode'] = param[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["SQL_PARAM_CONST"].charToEncode];
        }
    }
    getSelectedPagesList(pageListStr, reqArr) {
        if (pageListStr.indexOf("PAGE=*") > -1) {
            let transactionNameArr = [];
            for (let i in reqArr) {
                if (reqArr[i].thinkTime == "-1")
                    transactionNameArr.push(reqArr[i].reqName);
            }
            return transactionNameArr;
        }
        let pageList = pageListStr.split(",");
        pageList.map((ele) => {
            if (ele.indexOf("PAGE") > -1) {
                return ele.substring(5);
            }
        });
        return pageList;
    }
    escapeStr(lbrbs) {
        let lbrb = lbrbs.split('');
        let str = '';
        let i = 0;
        lbrb.forEach((find) => {
            if (find == '"') {
                lbrb[i] = '\\"';
            }
            str += lbrb[i];
            i++;
        });
        return str;
    }
    /**
     * This method is used to get the list of transactions or request added in a api group.
     * @param reqArr Array of requests for group selected in request list.
     * @param isEdit
     * @param selectedPageList
     */
    getTransactions(reqArr, isEdit, selectedPageList) {
        let transactionNameArr = [];
        for (let i in reqArr) {
            if (reqArr[i].reqName) {
                if (reqArr[i].thinkTime == "-1")
                    transactionNameArr.push(reqArr[i].reqName);
            }
            else {
                transactionNameArr.push(reqArr[i].stepName);
            }
        }
        let editObj = {};
        if (isEdit) {
            editObj['mode'] = "Update";
            editObj['selectedPages'] = selectedPageList;
        }
        //Interval so that code is initialzed for assertion
        let interval = setInterval(() => {
            setTimeout(() => {
                if (this.isParamOpen || this.isAssertionOpen) {
                    this.scenUtilService.emitScenDataToScript(Object.assign({ emitFor: "assertionOrParamData", data: transactionNameArr }, editObj));
                    this.scenUtilService.pageListDataForParamAssertion = transactionNameArr;
                }
            }, 1500);
            clearInterval(interval);
        }, 100);
    }
    updateAssertionData(assertionArr, rowData, reqArr) {
        for (let assertion of assertionArr) {
            if ((assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '')).replace(/"/g, '') == rowData['criteriaValue']) {
                //Setting edit assertion name 
                this.scenUtilService.editAssertionName = rowData['criteriaValue'];
                this.manipulateAssertionData(assertion, rowData, reqArr);
            }
        }
    }
    manipulateAssertionData(assertion, rowData, reqArr) {
        this.parameterDataService.assertionData.matchTextValue = (assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].assertionTxt].replace(/(TextPfx=|TextSfx=|TEXT=|TEXT\/|RE\/|IC=)/g, '')).replace(/"/g, '');
        let selectedPageList = this.getSelectedPagesList(assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].label], reqArr);
        this.getTransactions(reqArr, true, selectedPageList);
        this.parameterDataService.assertionData.saveCountVarName = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].saveCountVarName];
        this.parameterDataService.assertionData.iDValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].id];
        this.parameterDataService.assertionData.isTextMatch = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isTextMatch];
        this.parameterDataService.assertionData.saveCountVarName = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].saveCountVarName];
        this.parameterDataService.assertionData['templateFailureStr'] = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].tempFailStr];
        this.parameterDataService.assertionData.actionOnFail = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].actionOnFail];
        this.parameterDataService.assertionData['searchIN'] = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].searchIn];
        this.parameterDataService.assertionData.isCountVarNameEnabled = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isCountVarNameEnabled];
        this.parameterDataService.searchParam = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].searchParam];
        this.parameterDataService.assertionData.compareChecksumValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].compareChecksumValue];
        this.parameterDataService.assertionData.compareChecksumCookieValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].compareChecksumCookieValue];
        this.parameterDataService.assertionData.compareFileValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].compareFileValue];
        this.parameterDataService.assertionData.prefixValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].prefixValue];
        this.parameterDataService.assertionData.suffixValue = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].suffixValue];
        this.parameterDataService.assertionData.isIgnoreCase = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isIgnoreCase];
        this.parameterDataService.assertionData.isRegularExp = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isRegularExp];
        this.parameterDataService.assertionData.chkFailOn = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].chkFailOn];
        this.parameterDataService.assertionData.isIgnoreCaseForSuffix = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isIgnoreCaseForSuffix];
        this.parameterDataService.assertionData.failOn = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].failOn];
        this.parameterDataService.assertionData.isRegularExpForSuffix = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].isRegularExpForSuffix];
        this.parameterDataService.assertionData.pattern = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].pattern];
        this.parameterDataService.assertionData.target = assertion[_interface_script_parameter_constant__WEBPACK_IMPORTED_MODULE_2__["ASSERTION_CONST"].target];
    }
};
ScriptParameterService.ctorParameters = () => [
    { type: _home_script_manager_parameter_components_add_parameter_parameter_data_service__WEBPACK_IMPORTED_MODULE_3__["ParameterDataService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_4__["Router"] },
    { type: _scenario_utils_service__WEBPACK_IMPORTED_MODULE_5__["ScenarioUtilsService"] }
];
ScriptParameterService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])()
], ScriptParameterService);



/***/ })

}]);