(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["default~home-script-manager-script-recorder-script-recorder-module~script-recorder-script-recorder-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/script-manager/script-recorder/script-recorder.component.html":
/*!********************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/script-manager/script-recorder/script-recorder.component.html ***!
  \********************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"blockedUI\" *ngIf=\"loading\">\n    <i class=\"icons8 icons8-spinner spin\"></i>\n</div>\n<!-- <div class=\"scrollableArea\"> -->\n<div class=\"scrollableArea\">\n    <p-panel styleClass=\"net-panel1\">\n        <p-header>\n            <div class=\"p-grid p-align-center p-justify-between\">\n                <span class=\"ui-panel-title font-16 ml-8 font-weight-600\">{{recorderTitle}}</span>\n                <!-- <app-help [helpFileName]=\"'scriptRecorder'\" [helpTitle]=\"recorderTitle\"\n                    [helpFolder]=\"'script'\"></app-help> -->\n            </div>\n        </p-header>\n        <div class=\"px-10 py-20\">\n            <div class=\"p-grid p-align-center w-100-p relative\">\n                <ng-container *ngIf=\"!hideParams || !hideParams.location\">\n                    <div class=\"p-col-2\">Project / Sub Project</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"projSubProjData\" [(ngModel)]=\"location\" filter=\"true\"\n                            [style]=\"{'min-width':'100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\" optionLabel=\"label\"\n                            (onChange)=\"selectScript($event.value)\" appendTo=\"body\"></p-dropdown>\n                    </div>\n                </ng-container>\n                <ng-container *ngIf=\"!hideParams || !hideParams.scriptName\">\n                    <div class=\"p-col-2\">Name</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"scriptList\" #input placeholder=\"Enter script name or select script\"\n                            (keyup)=\"EditMode(input.value)\" [(ngModel)]=\"name\" filter=\"true\"\n                            [style]=\"{'min-width':'100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n                            (onChange)=\"selectFlow($event.value)\" editable=\"true\" appendTo=\"body\"></p-dropdown>\n                    </div>\n                </ng-container>\n                <ng-container *ngIf=\"!hideParams || !hideParams.flowName\">\n                    <div class=\"p-col-2\">Flow Name</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"flowList\" [(ngModel)]=\"flowName\"\n                            placeholder=\"Enter flow name or select flow\" filter=\"true\" [style]=\"{'min-width':'100%'}\"\n                            dropdownIcon=\"icons8 icons8-expand-arrow\" editable=\"true\" appendTo=\"body\"></p-dropdown>\n                    </div>\n                </ng-container>\n                <ng-container *ngIf=\"!hideParams || !hideParams.protocol\">\n                    <div class=\"p-col-2\">Type</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"selectType1\" [(ngModel)]=\"typeWeb\" [style]=\"{'min-width':'100%'}\"\n                            dropdownIcon=\"icons8 icons8-expand-arrow\" appendTo=\"body\"></p-dropdown>\n                    </div>\n                </ng-container>\n                <ng-container *ngIf=\"!hideParams || !hideParams.browserType\">\n                    <div class=\"p-col-2\">Recording Type</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"browserTypes\" [(ngModel)]=\"selectedBrowserType\"\n                            (onChange)=\"changeBrowserType($event)\" [style]=\"{'min-width':'100%'}\"\n                            dropdownIcon=\"icons8 icons8-expand-arrow\" appendTo=\"body\"></p-dropdown>\n                    </div>\n                </ng-container>\n                <ng-container *ngIf=\"isAppium\">\n                    <div class=\"p-col-2 \">Application Name</div>\n                    <div class=\"p-col-4\">\n                        <p-dropdown [options]=\"applicationOpt\" [panelStyle]=\"{'width':'204px'}\"\n                            placeholder=\"Select Application\" [(ngModel)]=\"selectedApp\" filter=\"true\"\n                            [style]=\"{'min-width':'100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\" appendTo=\"body\"\n                            optionLabel=\"label\">\n                            <ng-template let-item pTemplate=\"item\">\n                                <div>\n                                    <span [pTooltip]=\"item.label\" tooltipPosition=\"top\">{{item.label}}</span>\n                                </div>\n                            </ng-template>\n                            <ng-template let-item pTemplate=\"selectedItem\">\n                                <div>\n                                    <span [pTooltip]=\"item.label\" tooltipPosition=\"top\">{{item.label}}</span>\n                                </div>\n                            </ng-template>\n                        </p-dropdown>\n                    </div>\n                    <div class=\"p-col-2 pl-30 relative\">\n                        <button pButton type=\"button\" class=\"w-100-p ui-button-secondary\">\n                            <i class=\"pi pi-upload font-16 \"></i>\n                            <span>Upload App</span>\n                        </button>\n                        <span class=\"custom-upload-button\"> <p-fileUpload #formRef\n                                class=\"fileUpload ui-button-rounded ml-5 \" name=\"file[]\" mode=\"basic\" [url]=\"\"\n                            chooseLabel=\"Browse\" auto=\"true\" chooseLabel=\"Upload App\"\n                                (onSelect)=\"selectFile($event, formRef)\"></p-fileUpload></span>\n                        <span class=\"ml-5 spin_icon_position\" *ngIf=\"isUploading\">\n                            <i class=\"icons8 icons8-spinner spin\"></i>\n                        </span>\n                    </div>\n\n                </ng-container>\n\n                <div class=\"p-grid p-align-center w-100-p\" *ngIf=\"!isExtBrowser &&  !isAppium\">\n\n                    <div class=\"p-col-2\">Enter The URL</div>\n                    <div class=\"p-col-10 relative\">\n                        <div class=\"ui-inputgroup\">\n                            <input type=\"text\" [(ngModel)]=\"url\" pInputText placeholder=\"eg https://www.cavisson.com/\"\n                                class=\"w-100-p\">\n                            <button pButton type=\"button\" label=\"Record\" [disabled]=\"loadingOnRecord\"\n                                (click)=\"onRecord()\" class=\"height-34\"></button>\n                        </div>\n                        <i class=\"icons8 icons8-spinner spin spinner-position\" *ngIf=\"loadingOnRecord\"></i>\n                    </div>\n                </div>\n                <div class=\"p-col-2\" *ngIf=\"isAppium\">\n                    <button pButton type=\"button\" label=\"Record\" class=\"ui-btn-primary\" [disabled]=\"loadingOnRecord\"\n                        (click)=\"onRecord()\"></button>\n                    <i class=\"icons8 icons8-spinner spin\" *ngIf=\"loadingOnRecord\"></i>\n                </div>\n                <div class=\"p-col-2 pl-30 pr-0\" *ngIf=\"isExtBrowser\">Page boundary time (in sec)</div>\n                <div class=\"p-col-4 p-grid p-0\">\n                    <div class=\"p-col\" *ngIf=\"isExtBrowser\"><input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText\n                            [(ngModel)]=\"pageBoundaryTime\"> </div>\n                    <div class=\"p-col-fixed\" *ngIf=\"isExtBrowser\">\n                        <button pButton type=\"button\" label=\"Record\" class=\"ui-btn-primary\" [disabled]=\"loadingOnRecord\"\n                            (click)=\"onRecord()\"></button>\n                        <i class=\"icons8 icons8-spinner spin spinner-position\" *ngIf=\"loadingOnRecord\"></i>\n                    </div>\n                </div>\n            </div>\n            <button type=\"button\" (click)=\"showAdvBtn =!showAdvBtn\" class=\"btn-icon p-grid p-align-center mr-10\" *ngIf=\"isRecordingOpenFrom != 'NT' &&  !isExtBrowser &&  !isAppium\">\n                <span class=\"mx-2\">Advanced Settings</span>\n                <i [ngClass]=\" showAdvBtn ? 'icons8 icons8 icons8-collapse-arrow' : 'icons8 icons8-expand-arrow' \"></i>\n            </button>\n            <ng-container *ngIf=\"showAdvBtn && isRecordingOpenFrom != 'NT' &&  !isExtBrowser &&  !isAppium\">\n\n                <div class=\"p-grid p-align-center\">\n                    <div class=\"p-col-2\">Recording Profile\n                        <i class=\"btn-icon icons8 icons8-info\" (mouseenter)=\"op2.show($event)\"\n                            (mouseleave)=\"op2.hide()\"></i>\n                    </div>\n                    <div class=\"p-grid p-col-4 p-0\">\n                        <div class=\"p-col\">\n                            <p-dropdown [options]=\"recordingProfileOpt\" [(ngModel)]=\"selectedProfile\" filter=\"true\"\n                                [style]=\"{'min-width':'100%'}\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n                                (onChange)=\"onChangeProfile($event.value)\" appendTo=\"body\"></p-dropdown>\n                        </div>\n                        <div class=\"p-col-fixed\">\n                            <p-toggleButton class=\"shoHIdeToggle\" [(ngModel)]=\"toggleBtn\" onLabel=\"Hide\" offLabel=\"Show\"\n                                (click)=\"recorderToggle=!recorderToggle\"></p-toggleButton>\n                        </div>\n                    </div>\n                </div>\n            </ng-container>\n            <p-overlayPanel styleClass=\"popHover\" #op2 [style]=\"{width: '480px'}\" appendTo=\"body\">\n                <div class=\"p-10\">\n                    <p>Use the Recording Profile option to create recording profiles where you can save the\n                        recording settings for\n                        your script. You can create one or more recording profiles and then select a recording\n                        profile while\n                        recording your script.\n                        To create a recording profile:</p>\n                    <ol class=\"ol-styled\">\n                        <li>Configure settings in the Recorder Option section. For example, you can specify the\n                            browsing option,\n                            script and NetStorm settings, and methods for recording a script.</li>\n                        <li>Specify a name for your recording profile in the Recording Profile field.</li>\n                        <li>Click Save.</li>\n                    </ol>\n                </div>\n            </p-overlayPanel>\n        </div>\n    </p-panel>\n\n    <p-panel styleClass=\"net-panel1 my-10\" *ngIf=\"showAdvBtn && recorderToggle\">\n        <p-header>\n            <div class=\"p-grid p-align-center p-justify-between\">\n                <span class=\"ui-panel-title font-16 ml-8 font-weight-600\">Recording Profile Details (\n                    {{selectedProfile}} )</span>\n            </div>\n        </p-header>\n        <div>\n            <p-panel styleClass=\"net-panel1 my-10\">\n                <p-header>\n                    <div class=\"p-grid p-align-center\">\n                        <p-inputSwitch [(ngModel)]=\"browseOption\"></p-inputSwitch>\n                        <span class=\"mtn-4 ml-10 font-12\">Browser Options</span>\n                    </div>\n                </p-header>\n\n                <div class=\"p-grid p-align-center px-10 py-20\" *ngIf=\"browseOption\">\n                    <p-selectButton class=\"custom-selectbtn\" [options]=\"browseOptionTypes\"\n                        (onOptionClick)=\"selectBrowsingData($event)\" [(ngModel)]=\"browseSelectedTypes\"\n                        multiple=\"multiple\"></p-selectButton>\n                    <span *ngIf=\"showNote\" class=\"ml-20\">Note : The Incognito mode will be activated once these three\n                        options have been\n                        selected.</span>\n                </div>\n            </p-panel>\n            <!-- <p>Selected Types: <span style=\"font-weight: bold\" *ngFor=\"let type of browseSelectedTypes\">{{type.id}} </span></p> -->\n\n            <p-panel styleClass=\"net-panel1 my-10\">\n                <p-header>\n                    <div class=\"p-grid p-align-center\">\n                        <p-inputSwitch [(ngModel)]=\"splitOption\"></p-inputSwitch>\n                        <span class=\"mtn-4 ml-10 font-12\">Split Page Options</span>\n                        <i class=\"icons8 icons8-info btn-icon not-clickable mx-6\"\n                            pTooltip=\"Following options will be used to make inline URL as main URL / page.\"></i>\n                    </div>\n                </p-header>\n\n                <ng-container *ngIf=\"splitOption\">\n                    <div class=\"p-grid p-align-center px-10 py-20\">\n                        <p-checkbox [(ngModel)]=\"timeDifferenceUrl\" binary=\"true\"></p-checkbox>\n                        <div class=\"ml-5\">Time difference of URL is more than\n                            <input id=\"input\" type=\"number\" min=\"1\" size=\"7\" value=\"20\" class=\"w-10-p\" pInputText\n                                [(ngModel)]=\"seconds\" [disabled]=\"!timeDifferenceUrl\">seconds than previous URL\n                            <i class=\"icons8 icons8-info btn-icon not-clickable mx-6\"\n                                pTooltip=\"If the time difference between two URLs exceeds the specified duration, the subsequent URL will be considered the main URL.\"></i>\n                        </div>\n                    </div>\n                    <div class=\"p-grid p-align-center w-60-p px-7\">\n                        <div class=\"width-225 p-col-fixed p-grid p-align-center\">Method\n                            <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                                pTooltip=\"Inline Url will be categarized as Main URL for selected Methods like POST, PUT, HEAD, DELETE\"></i>\n                        </div>\n                        <div class=\"p-col\">\n                            <p-selectButton class=\"custom-selectbtn\" [options]=\"methodOpt\"\n                                (onOptionClick)=\"selectMethodOptions($event)\" [(ngModel)]=\"method\"\n                                multiple=\"multiple\"></p-selectButton>\n                        </div>\n                    </div>\n\n                    <div class=\"p-grid p-align-center w-60-p ml-7\">\n                        <div class=\"width-225 p-col-fixed p-grid p-align-center\">Request Header Contains\n                            <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                                pTooltip=\"If request contain XmlHttpRequest header then it will treat the request as main url.\"></i>\n                        </div>\n                        <div class=\"p-col\"><p-selectButton class=\"custom-selectbtn\" [options]=\"xmlhttp\"\n                                (onOptionClick)=\"selectHeaderOptions($event)\" [(ngModel)]=\"xmlhttpSelected\"\n                                multiple=\"multiple\"></p-selectButton></div>\n                    </div>\n                    <div class=\"p-grid p-align-center w-60-p ml-7\">\n                        <div class=\"width-225 p-col-fixed p-grid p-align-center\">User Action\n                            <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                                pTooltip=\" If any user click occurs it will spilt the page and treat the clicked url as main url.\"></i>\n                        </div>\n                        <div class=\"p-col\"><p-selectButton class=\"custom-selectbtn\" [options]=\"userEvent\"\n                                (onOptionClick)=\"selectUserEventOptions($event)\" [(ngModel)]=\"userSelected\"\n                                multiple=\"multiple\"></p-selectButton></div>\n                    </div>\n                    <div class=\"p-grid p-align-center w-60-p ml-7\">\n                        <div class=\"width-225 p-col-fixed p-grid p-align-center\">Content Type of Response Header\n                            <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                                pTooltip=\"If content type of response header is application/json it will spilt the page as main URL.\"></i>\n                        </div>\n                        <div class=\"p-col\"><p-selectButton class=\"custom-selectbtn\" [options]=\"urlType\"\n                                (onOptionClick)=\"selectURLOptions($event)\" [(ngModel)]=\"urlSelected\"\n                                multiple=\"multiple\"></p-selectButton></div>\n                    </div>\n                </ng-container>\n            </p-panel>\n\n            <!-- [toggleable]=\"true\" -->\n            <p-panel styleClass=\"net-panel1 my-10\">\n                <p-header>\n                    <div class=\"p-grid p-align-center\">\n                        <span class=\"mtn-4 ml-10 font-12\">LoadTest Browsing Options</span>\n                    </div>\n                </p-header>\n                <div class=\"px-10 py-20\">\n                    <p-selectButton class=\"custom-selectbtn custom-selectbtn1\" [options]=\"nsBrowseOption\"\n                        (onOptionClick)=\"selectNetstormData($event)\" [(ngModel)]=\"nsBrowse\"\n                        multiple=\"multiple\"></p-selectButton>\n                    <hr class=\"hrline border-1\">\n\n                    <div class=\"p-grid p-align-center w-70-p\">\n                        <div class=\"p-col-2\">User Agent</div>\n                        <div class=\"p-col-2\">\n                            <p-dropdown [options]=\"userAgentOpt\" filter=\"true\" [style]=\"{'min-width':'100%'}\"\n                                [(ngModel)]=\"selectedUserAgent\" dropdownIcon=\"icons8 icons8-expand-arrow\"\n                                optionLabel=\"device\" optionValue=\"userAgent\" (onChange)=\"chnageValues($event.value)\"\n                                appendTo=\"body\"></p-dropdown>\n                        </div>\n                        <div class=\"p-col-8\">\n                            <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"userAgentText\">\n                        </div>\n                    </div>\n                    <!--    <div class=\"p-grid p-align-center w-70-p\"> \n            <div class=\"p-col-2\">Browser Engine</div>\n            <div class=\"p-col-2\">\n                <p-dropdown [options]=\"browserEngin\" [(ngModel)]=\"selectBrowserEngin\" filter=\"true\" [style]=\"{'min-width':'100%'}\" \n              dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n            </div>\n            <div class=\"p-col-8\" *ngIf=\"selectBrowserEngin === 'Chromium'\">\n               Chromium Engine will be downloaded at start of recording\n            </div>\n         </div-->\n                    <div class=\"p-grid p-align-center my-10  px-7\">\n                        <p-checkbox name=\"group3\" label=\"Open Browser in Hardware Accelerated Mode\" [binary]=\"true\"\n                            [(ngModel)]=\"isHeavyWeightSelected\"></p-checkbox>\n                        <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\" pTooltip=\"When the option is enabled, Browser renders content using GPU and displays it directly on a surface\n            However, when the option is disabled, Browser renders the content using GPU and copies the pixels to RAM\"\n                            tooltipStyleClass=\"max-width-400\"></i>\n                    </div>\n                </div>\n\n            </p-panel>\n\n            <p-panel styleClass=\"net-panel1 my-10\">\n                <p-header>\n                    <div class=\"p-grid p-align-center\">\n                        <span class=\"mtn-4 ml-10 font-12\">Configure Proxy Server for Recording</span>\n                    </div>\n                </p-header>\n                <div class=\"px-10 py-20\">\n                    <div class=\"p-grid p-align-center\">\n                        <div class=\"p-col-fixed\">\n                            <p-radioButton name=\"group1\" label=\"No Proxy\" value=\"NoProxy\"\n                                [(ngModel)]=\"setProxy\"></p-radioButton>\n                        </div>\n                        <div class=\"p-col-fixed\">\n                            <p-radioButton name=\"group1\" label=\"Use System Proxy Settings\" value=\"SystemProxy\"\n                                [(ngModel)]=\"setProxy\"></p-radioButton>\n                        </div>\n                        <div class=\"p-col-fixed\">\n                            <p-radioButton name=\"group1\" label=\"Use Manual Proxy Settings\" value=\"ManualProxy\"\n                                [(ngModel)]=\"setProxy\"></p-radioButton>\n                        </div>\n                    </div>\n                    <div *ngIf=\"setProxy == 'ManualProxy'\">\n                        <h4 class=\"mb-0\">Manual Proxy Configuration</h4>\n                        <hr class=\"hrline border-1\">\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-1\">HTTP Proxy</div>\n                            <div class=\"p-col-6\"><input id=\"input\" type=\"text\" [disabled]=\"setProxy!='ManualProxy'\"\n                                    class=\"w-100-p\" pInputText [(ngModel)]=\"proxy\"></div>\n                            <div class=\"p-col-2\">Port\n                                <p-inputNumber class=\"portNumber\" [(ngModel)]=\"proxyPort1\" [useGrouping]=\"false\"></p-inputNumber>\n                            </div>\n                        </div>\n                        <div class=\"p-grid p-align-center\" *ngIf=\"!sameForBoth\">\n                            <div class=\"p-col-1\">SSL Proxy</div>\n                            <div class=\"p-col-6\"> <input id=\"input\" type=\"text\" [disabled]=\"setProxy!='ManualProxy'\"\n                                    class=\"w-100-p\" pInputText [(ngModel)]=\"sslProxy\"></div>\n                            <div class=\"p-col-2\">Port\n                                <p-inputNumber class=\"portNumber\" [(ngModel)]=\"sslProxyPort2\" [useGrouping]=\"false\"></p-inputNumber>\n                            </div>\n                        </div>\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-12\">\n                                <p-checkbox name=\"group5\" [binary]=\"true\" [disabled]=\"setProxy!='ManualProxy'\"\n                                    label=\"Use Same Proxy Server for Both Protocols\"\n                                    [(ngModel)]=\"sameForBoth\"></p-checkbox>\n                            </div>\n                        </div>\n                        <h4 class=\"mb-0\">Exception</h4>\n                        <hr class=\"hrline border-1\">\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-1\">No Proxy For</div>\n                            <div class=\"p-col-6\"> <input id=\"input\" type=\"text\" [disabled]=\"setProxy!='ManualProxy'\"\n                                    class=\"w-100-p\" pInputText [(ngModel)]=\"noProxyFor\"></div>\n                        </div>\n                        <h4 class=\"mb-0\">Proxy Authentication</h4>\n                        <hr class=\"hrline border-1\">\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-12\">\n                                <p-checkbox name=\"group5\" value=\"proxyAuthentication\"\n                                    [disabled]=\"setProxy!='ManualProxy'\" [(ngModel)]=\"selectProxyAuthentications\"\n                                    binary=\"true\" label=\"Proxy Authentication Credential\"></p-checkbox>\n                            </div>\n                            <div class=\"p-col-1\">Username</div>\n                            <div class=\"p-col-2\">\n                                <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"userName\"\n                                    [disabled]=\"setProxy!='ManualProxy'\" [disabled]=\"!selectProxyAuthentications\">\n                            </div>\n                            <div class=\"p-col-1 p-offset-1\">Password</div>\n                            <div class=\"p-col-2\">\n                                <input id=\"input\" type=\"password\" class=\"w-100-p\" pInputText [(ngModel)]=\"userPassword\"\n                                    [disabled]=\"setProxy!='ManualProxy'\" [disabled]=\"!selectProxyAuthentications\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </p-panel>\n\n            <p-toggleButton styleClass=\"toggle-button-link\" [(ngModel)]=\"advancedOpt\" onLabel=\"Advanced\"\n                offLabel=\"Advanced\" onIcon=\"icons8&nbsp;icons8-expand-arrow\"\n                offIcon=\"icons8 icons8-collapse-arrow\"></p-toggleButton>\n\n            <ng-container *ngIf=\"advancedOpt\">\n                <p-panel styleClass=\"net-panel1 my-10\">\n                    <p-header>\n                        <div class=\"p-grid p-align-center\">\n                            <span class=\"mtn-4 ml-10 font-12\">Header Settings</span>\n                        </div>\n                    </p-header>\n                    <div class=\"px-10 py-20\">\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-1\">URL Pattern</div>\n                            <div class=\"p-col-4\">\n                                <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"urlPattern\">\n                            </div>\n                            <div class=\"p-col-1 text-right\">Name</div>\n                            <div class=\"p-col-2\">\n                                <p-dropdown appendTo=\"body\" [options]=\"urlPatternKeyOpt\" [(ngModel)]=\"urlPatternKey\"\n                                    filter=\"true\" [style]=\"{'min-width':'100%'}\" [editable]=\"true\"\n                                    dropdownIcon=\"icons8 icons8-expand-arrow\"></p-dropdown>\n                            </div>\n                            <div class=\"p-col-1 text-right\">Value</div>\n                            <div class=\"p-col-1\">\n                                <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"urlPatternValue\">\n                            </div>\n                            <div class=\"p-col-2 text-right\">\n                                <p-dropdown appendTo=\"body\" [options]=\"replaceOpt\" [(ngModel)]=\"replace\"\n                                    [style]=\"{'min-width':'90px', 'width':'90px'}\"\n                                    dropdownIcon=\"icons8 icons8-expand-arrow\"\n                                    (onChange)=\"changedValues($event.value)\"></p-dropdown>\n                                <button pButton type=\"button\" label=\"Add\" class=\"ml-6\"\n                                    (click)=\"addHeaderRow()\"></button>\n                            </div>\n                        </div>\n                        <cav-table #parameterListTable [value]=\"headerSettings\"\n                            [headerRelativePath]=\"headerRelativePath\" [scrollable]=\"true\" scrollHeight=\"193px\"\n                            [responsive]=\"true\" (deleteRow)=\"deleteHeaderRow($event.row)\"></cav-table>\n\n                    </div>\n                </p-panel>\n\n\n                <p-panel styleClass=\"net-panel1 my-10\">\n                    <p-header>\n                        <div class=\"p-grid p-align-center\">\n                            <span class=\"mtn-4 ml-10 font-12\">Cookies Settings</span>\n                        </div>\n                    </p-header>\n                    <div class=\"px-10 py-20\">\n                        <div class=\"p-grid p-align-center\">\n                            <div class=\"p-col-1\">Name</div>\n                            <div class=\"p-col-5\">\n                                <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"cookiesKey\">\n                            </div>\n                            <div class=\"p-col-1 text-right\">Value</div>\n                            <div class=\"p-col-4\">\n                                <input id=\"input\" type=\"text\" class=\"w-100-p\" pInputText [(ngModel)]=\"cookiessValue\">\n                            </div>\n                            <div class=\"p-col-1 text-right\">\n                                <button pButton type=\"button\" label=\"Add\" class=\"ui-button-rounded\"\n                                    (click)=\"addCookiesRow()\"></button>\n                            </div>\n                        </div>\n                        <cav-table [value]=\"cookiesSettings\" [headerRelativePath]=\"headerPathCookies\"\n                            [scrollable]=\"true\" scrollHeight=\"193px\" [responsive]=\"true\"\n                            (deleteRow)=\"deleteCookiesRow($event.row)\"></cav-table>\n\n                    </div>\n                </p-panel>\n\n                <p-panel styleClass=\"net-panel1 my-10\">\n                    <p-header>\n                        <div class=\"p-grid p-align-center\">\n                            <span class=\"mtn-4 ml-10 font-12\">Script Settings</span>\n                        </div>\n                    </p-header>\n                    <div class=\"px-10 py-20\">\n                        <div class=\"p-grid p-align-center my-10  px-7\">\n                            <div>Keep HTTP Request body as inline in flow file if size is less than\n                                <input id=\"input\" type=\"number\" min=\"0\" size=\"5\" value=\"20\" class=\"w-7-p\" pInputText\n                                    [(ngModel)]=\"httpReqBodySize\">\n                                KB (If the size exceeds the specified value, the body will be stored in a file and\n                                included in the request of the flow file.)\n                            </div>\n                        </div>\n                        <div class=\"p-grid p-align-center my-10  px-7\">\n                            <p-checkbox name=\"group2\" label=\"Show HTTP Body in Name Value Pair\" [binary]=\"true\"\n                                [(ngModel)]=\"showHttpBody\"></p-checkbox>\n                        </div>\n                    </div>\n                </p-panel>\n\n                <div class=\"p-grid p-align-center\">\n                    <div class=\"p-col-2\">\n                        <p>Add Transaction in Recorded Script</p>\n                    </div>\n                    <div class=\"p-col-2 p-grid p-align-center\">\n                        <p-radioButton name=\"group6\" label=\"Automatic\" [value]=\"true\"\n                            [(ngModel)]=\"addTxnInFlow\"></p-radioButton>\n                        <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                            pTooltip=\"Add the start and end transactions automatically to all the pages of the recorded script in the flow file for simplifying performance measurement\"\n                            tooltipStyleClass=\"max-width-400\"></i>\n                    </div>\n                    <div class=\"p-col-2 p-grid p-align-center\">\n                        <p-radioButton name=\"group6\" label=\"Manual\" [value]=\"false\"\n                            [(ngModel)]=\"addTxnInFlow\"></p-radioButton>\n                        <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                            pTooltip=\"Add the start and end transactions manually in the browser during the recording. It helps in providing flexibility for precise transaction control\"\n                            tooltipStyleClass=\"max-width-400\"></i>\n                    </div>\n                </div>\n\n                <div class=\"p-grid p-align-center my-10\">\n                    <div class=\"p-col-2 p-grid p-align-center\">Record Default Header in Flow File</div>\n                    <div class=\"p-col-9 p-grid p-align-center\">\n                        <p-selectButton class=\"custom-selectbtn custom-selectbtn1\" [options]=\"recordHeaderOpt\"\n                            [(ngModel)]=\"recordHeader\" multiple=\"multiple\"\n                            (onOptionClick)=\"selectrecordHeader($event)\"></p-selectButton>\n                    </div>\n                </div>\n\n\n\n                <div class=\"p-grid p-align-center my-10\">\n                    <!-- <div class=\"p-col-fixed\">Exclude URL Filters</div> -->\n                    <div class=\"p-col\">\n                        <!-- <textarea pInputTextarea [(ngModel)]=\"urlFilter\" class=\"w-100-p\" rows=\"2\"\n            pTooltip=\"Enter the list of urls which need not to be captured in script recording\"></textarea> -->\n                        <p-table [value]=\"tableData\" [columns]=\"columns\" [scrollable]=\"true\" scrollHeight=\"195px\"\n                            class=\"new-table\">\n                            <ng-template pTemplate=\"header\" let-columns>\n                                <tr>\n                                    <th *ngFor=\"let column of columns\">{{ column.header }}</th>\n                                </tr>\n                            </ng-template>\n                            <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n                                <tr pTooltip=\"Click to edit value\" tooltipPosition=\"top\" [tooltipZIndex]=\"110020\">\n                                    <td pEditableColumn *ngFor=\"let column of columns\">\n                                        <p-cellEditor>\n                                            <ng-template pTemplate=\"input\">\n                                                <input pInputText type=\"text\" placeholder=\"Enter Exclude URL Pattern\"\n                                                    [(ngModel)]=\"rowData[column.field]\"\n                                                    (keyup)=\"onKeyUp($event, rowData, rowIndex, column.field)\" />\n                                            </ng-template>\n                                            <ng-template pTemplate=\"output\">\n                                                <div class=\"p-grid p-align-center p-nogutter\">\n                                                    <div class=\"p-col\">\n                                                        <input pInputText type=\"text\"\n                                                            placeholder=\"Enter Exclude URL Pattern\"\n                                                            [(ngModel)]=\"rowData[column.field]\"\n                                                            (keyup)=\"onKeyUp($event, rowData, rowIndex, column.field)\"\n                                                            class=\"border-none pl-0 w-100-p\" />\n                                                    </div>\n                                                    <div class=\"p-col-fixed\">\n                                                        <button type=\"button\" pButton class=\"btn-icon\"\n                                                            icon=\"icons8 icons8-delete-trash\"\n                                                            (click)=\"tableData.splice(rowIndex, 1)\"\n                                                            [disabled]=\"rowIndex == (tableData.length - 1)\"></button>\n                                                    </div>\n                                                </div>\n\n                                            </ng-template>\n                                        </p-cellEditor>\n                                    </td>\n                                </tr>\n                            </ng-template>\n                        </p-table>\n                    </div>\n                </div>\n\n                <div class=\"p-grid p-align-center my-10\">\n                    <div class=\"p-col\">\n                        <p-table [value]=\"tableDataForSelector\" [columns]=\"columnsForSelector\" [scrollable]=\"true\"\n                            scrollHeight=\"195px\" class=\"new-table\">\n                            <ng-template pTemplate=\"header\" let-columns>\n                                <tr>\n                                    <th *ngFor=\"let column of columns\">{{ column.header }}\n                                        <i class=\"icons8 icons8-info btn-icon not-clickable mx-3\"\n                                            pTooltip=\"Give custom selectors in order of priority to be used in creating selectors.\"\n                                            tooltipStyleClass=\"max-width-400\"></i>\n                                    </th>\n                                </tr>\n                            </ng-template>\n                            <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-columns=\"columns\">\n                                <tr pTooltip=\"Click to edit value\" tooltipPosition=\"top\" [tooltipZIndex]=\"110020\">\n                                    <td pEditableColumn *ngFor=\"let column of columns\">\n                                        <p-cellEditor>\n                                            <ng-template pTemplate=\"input\">\n                                                <input pInputText type=\"text\"\n                                                    placeholder=\"Enter custom selector attribute\"\n                                                    [(ngModel)]=\"rowData[column.field]\"\n                                                    (keyup)=\"onKeyUpCustomSelector($event, rowData, rowIndex, column.field)\" />\n                                            </ng-template>\n                                            <ng-template pTemplate=\"output\">\n                                                <div class=\"p-grid p-align-center p-nogutter\">\n                                                    <div class=\"p-col\">\n                                                        <input pInputText type=\"text\"\n                                                            placeholder=\"Enter custom selector attribute\"\n                                                            [(ngModel)]=\"rowData[column.field]\"\n                                                            (keyup)=\"onKeyUpCustomSelector($event, rowData, rowIndex, column.field)\"\n                                                            class=\"border-none pl-0 w-100-p\" />\n                                                    </div>\n                                                    <div class=\"p-col-fixed\">\n                                                        <button type=\"button\" pButton class=\"btn-icon\"\n                                                            icon=\"icons8 icons8-delete-trash\"\n                                                            (click)=\"tableDataForSelector.splice(rowIndex, 1)\"\n                                                            [disabled]=\"rowIndex == (tableDataForSelector.length - 1)\"></button>\n                                                    </div>\n                                                </div>\n\n                                            </ng-template>\n                                        </p-cellEditor>\n                                    </td>\n                                </tr>\n                            </ng-template>\n                        </p-table>\n                    </div>\n                </div>\n\n            </ng-container>\n\n            <div class=\"p-grid p-align-center p-justify-center\">\n                <div class=\"p-grid p-align-center p-justify-end mb-10\">\n                    <button pButton type=\"button\" [matMenuTriggerFor]=\"beforeMenu\" label=\"Save As\" class=\"mx-6\"\n                        (click)=\"onEvent($event)\"></button>\n                    <button pButton type=\"button\" label=\"Save\" class=\"btn-primary-outline\"\n                        (click)=\"saveProf();toggleloading()\"></button>\n                </div>\n                <mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\" class=\"width-250\">\n                    <div class=\"width-250\">\n                        <div class=\"p-grid p-justify-end p-6\">\n                            <button pButton type=\"button\" icon=\"pi pi-check\"\n                                (click)=\"checkProfileName(inputt.value)\"></button>\n                            <button pButton type=\"button\" icon=\"pi pi-times\" class=\"ml-6\"></button>\n                        </div>\n                    </div>\n                    <div class=\"width-250 p-grid\">\n                        <div class=\"p-col-12\">Profile Name</div>\n                        <div class=\"p-col-12\" (click)=\"onEvent($event)\">\n                            <input type=\"text\" #inputt pInputText [(ngModel)]=\"prof\" class=\"w-100-p\">\n                        </div>\n                    </div>\n                </mat-menu>\n            </div>\n\n\n        </div>\n    </p-panel>\n\n</div>\n<p-confirmDialog class=\"confirmdialog\" acceptButtonStyleClass=\"ui-button-rounded px-10\"\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptLabel=\"Yes\"\n    rejectLabel=\"No\"></p-confirmDialog>");

/***/ }),

/***/ "./src/app/pages/home/script-manager/script-recorder/script-recorder.component.scss":
/*!******************************************************************************************!*\
  !*** ./src/app/pages/home/script-manager/script-recorder/script-recorder.component.scss ***!
  \******************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("@charset \"UTF-8\";\napp-script-recorder {\n  width: 100%;\n}\napp-script-recorder .spin_icon_position {\n  position: absolute;\n  right: -8px;\n  top: 13px;\n}\napp-script-recorder .custom-upload-button {\n  left: 0;\n  position: absolute;\n  opacity: 0;\n}\napp-script-recorder .scrollableArea {\n  overflow: auto;\n  max-height: calc(100vh - 100px);\n}\napp-script-recorder .type-search i {\n  z-index: 15;\n}\napp-script-recorder .ui-fieldset-legend-text {\n  font-weight: 700;\n  font-size: 110%;\n}\napp-script-recorder .customComplete {\n  width: 100%;\n}\napp-script-recorder .customComplete .ui-autocomplete {\n  display: block;\n}\napp-script-recorder .customComplete .ui-autocomplete .ui-autocomplete-input {\n  width: 100%;\n  padding-left: 20px;\n}\napp-script-recorder .spinner-position {\n  position: absolute;\n  right: -11px;\n  top: 15px;\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button {\n  margin: 5px 0px;\n  background-color: var(--background_color_1);\n  border-color: var(--background_color_2);\n  color: var(--color_2);\n  border-right: solid 1px;\n  margin-left: -1px;\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button .ui-button-text {\n  margin-left: 18px;\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button::before {\n  content: \"\";\n  position: absolute;\n  border: solid 1px var(--background_color_2);\n  height: 18px;\n  width: 18px;\n  left: 8px;\n  bottom: 6px;\n  border-radius: 2px;\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button.ui-state-active {\n  background-color: var(--background_color_1);\n  border-color: var(--background_color_2);\n  color: var(--color_2);\n  border-width: 1px;\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button.ui-state-active:not(.ui-state-disabled):hover {\n  background-color: var(--background_color_1);\n  color: var(--color_2);\n}\napp-script-recorder .custom-selectbtn .ui-selectbutton .ui-button.ui-state-active:after {\n  content: \"✓\";\n  position: absolute;\n  height: 18px;\n  width: 18px;\n  left: 8px;\n  font-weight: bold;\n  border-radius: 2px;\n  border: solid 1px var(--background_color_2);\n  background-color: var(--background_color_2);\n  color: var(--color_5);\n  bottom: 6px;\n}\napp-script-recorder .custom-selectbtn1 .ui-selectbutton .ui-button:nth-child(7) {\n  border-right: solid 1px;\n}\napp-script-recorder .shoHIdeToggle .ui-togglebutton {\n  background-color: var(--background_color_1);\n  border: 1px solid var(--primary-button-border-color);\n  color: var(--primary-button-border-color);\n}\napp-script-recorder .shoHIdeToggle .ui-togglebutton.ui-state-active {\n  background-color: var(--background_color_1) !important;\n  color: var(--primary-button-border-color) !important;\n  border-color: var(--primary-button-border-color) !important;\n}\napp-script-recorder .shoHIdeToggle .ui-togglebutton.ui-state-active:not(.ui-state-disabled):not(.ui-state-active):hover {\n  background-color: var(--background_color_1) !important;\n  color: var(--primary-button-border-color) !important;\n  border-color: var(--primary-button-border-color) !important;\n}\napp-script-recorder .shoHIdeToggle .ui-togglebutton.ui-state-active:not(.ui-state-disabled):not(.ui-state-active).ui-state-focus {\n  background-color: var(--background_color_1) !important;\n  color: var(--primary-button-border-color) !important;\n  border-color: var(--primary-button-border-color) !important;\n}\napp-script-recorder .shoHIdeToggle .ui-togglebutton:hover {\n  background-color: var(--primary-button-border-color) !important;\n  border: 1px solid var(--primary-button-border-color) !important;\n  color: var(--color_5) !important;\n}\napp-script-recorder .portNumber .ui-inputnumber-input {\n  width: 70px;\n  margin-left: 5px;\n}\napp-script-recorder .portNumber .net-panel1 .ui-panel .ui-panel-content {\n  padding: 0px;\n}\napp-script-recorder .portNumber .ui-button {\n  text-transform: inherit;\n}\napp-script-recorder .w-7-p {\n  width: 7%;\n}\napp-script-recorder .blockedUI {\n  position: fixed;\n  z-index: 55;\n  background-color: rgba(0, 0, 0, 0.2);\n  left: 0px;\n  top: 0px;\n  right: 0px;\n  bottom: 0px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\napp-script-recorder .blockedUI .spin {\n  font-size: 36px;\n}\napp-script-recorder .loadingIcon {\n  position: absolute;\n  right: -13px;\n  top: 12px;\n}\napp-script-recorder .p-5.ui-fieldset .ui-fieldset-legend {\n  padding: 5px;\n}");

/***/ }),

/***/ "./src/app/pages/home/script-manager/script-recorder/script-recorder.component.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/pages/home/script-manager/script-recorder/script-recorder.component.ts ***!
  \****************************************************************************************/
/*! exports provided: ScriptRecorderComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScriptRecorderComponent", function() { return ScriptRecorderComponent; });
/* 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_platform_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/core/session/session.service */ "./src/app/core/session/session.service.ts");
/* harmony import */ var _services_script_rest_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../services/script-rest.service */ "./src/app/pages/home/script-manager/services/script-rest.service.ts");
/* harmony import */ var _services_script_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../services/script-utils.service */ "./src/app/pages/home/script-manager/services/script-utils.service.ts");
/* harmony import */ var _services_script_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../services/script.state */ "./src/app/pages/home/script-manager/services/script.state.ts");
/* harmony import */ var src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_9__ = __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 _netocean_services_netocean_config_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../netocean/services/netocean-config-service */ "./src/app/pages/home/netocean/services/netocean-config-service.ts");
/* harmony import */ var _load_test_services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../load-test/services/load-test-utils.service */ "./src/app/pages/home/load-test/services/load-test-utils.service.ts");
/* harmony import */ var _netocean_services_netocean_common_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../netocean/services/netocean-common.service */ "./src/app/pages/home/netocean/services/netocean-common.service.ts");
/* harmony import */ var _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./interface/recorder.interface */ "./src/app/pages/home/script-manager/script-recorder/interface/recorder.interface.ts");
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
/* harmony import */ var src_app_shared_common_services_rdt_app_list_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! src/app/shared/common-services/rdt-app-list.service */ "./src/app/shared/common-services/rdt-app-list.service.ts");
















let ScriptRecorderComponent = class ScriptRecorderComponent {
    constructor(workprofile, confirmationService, utilservice, router, sessionService, scriptRestService, sanitizer, noRecordConfig, loadTestUtils, NOCommonService, route, rdtAppListService) {
        this.workprofile = workprofile;
        this.confirmationService = confirmationService;
        this.utilservice = utilservice;
        this.router = router;
        this.sessionService = sessionService;
        this.scriptRestService = scriptRestService;
        this.sanitizer = sanitizer;
        this.noRecordConfig = noRecordConfig;
        this.loadTestUtils = loadTestUtils;
        this.NOCommonService = NOCommonService;
        this.route = route;
        this.rdtAppListService = rdtAppListService;
        this.country = ['Audi', 'BMW', 'Fiat', 'Ford', 'Honda', 'Jaguar', 'Mercedes', 'Renault', 'Volvo', 'VW'];
        this.incognito = false;
        this.headerRelativePath = "script/header-settings.json";
        this.headerPathCookies = "script/cookies-settings.json";
        this.browseOption = true;
        this.advancedOpt = false;
        this.toggleBtn = false;
        this.splitOption = true;
        this.selectBrowserEngin = 'Chromium';
        this.xmlhttpSelected = [];
        this.userSelected = [];
        this.urlSelected = [];
        this.recordHeader = [];
        this.nsBrowse = [];
        this.recorderToggle = false;
        this.browseSelectedTypes = [];
        this.timeDifferenceUrl = false;
        this.seconds = 1;
        this.method = [];
        this.isHeavyWeightSelected = false;
        this.selectProxyAuthentications = false;
        this.showHttpBody = false;
        this.headerSettings = [];
        this.cookiesSettings = [];
        this.setProxy = "NoProxy";
        this.proxyPort1 = 80;
        this.sslProxyPort2 = 443;
        this.httpReqBodySize = 10;
        this.proxy = "";
        this.sslProxy = "";
        this.sameForBoth = false;
        this.addTxnInFlow = true;
        this.loading = false;
        this.loadingOnRecord = false;
        this.pageBoundaryTime = 15;
        this.isExtBrowser = false;
        this.collapseAdvance = true;
        this.recordExist = true;
        this.showNote = true;
        this.columns = [];
        this.columnsForSelector = [];
        this.tableData = [];
        this.tableDataForSelector = [];
        this.filteredLocation = "";
        this.isRecordingOpenFrom = "script";
        this.backLocation = "/home/script-manager/view";
        this.isAppium = false;
        this.showAdvBtn = false;
        this.recorderTitle = "Script Recorder";
        this.recordMode = _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__["RecordingMode"].CODE;
        this.hideParams = {};
        this.isLoading = false;
        this.toggleloading = () => {
            this.isLoading = true;
            // this.recProfile.ProfileName = this.scriptService.selectedProfile;
            this.utilservice.successMessage(this.selectedProfile + ' profile saved ');
            setTimeout(() => {
                this.isLoading = false;
            }, 1000);
        };
        this.isUploading = false;
        this.validhttpurl = true;
        this.username = this.sessionService.session.cctx.u;
        // Check if found recording open from information from query string
        this.route.queryParams.subscribe(params => {
            if (params['openFrom'] != undefined && params['openFrom'] != '') {
                this.isRecordingOpenFrom = params['openFrom'];
                this.filteredLocation = params['location'];
                this.urlQueryParams = params;
                this.handleRouteQueryParams(params);
            }
        });
        this.userAgentOpt = [
            {
                "device": "default",
                "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
            },
            {
                "device": "Pixel 5",
                "userAgent": "Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1"
            },
            {
                "device": "iPhone 12 pro",
                "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
            },
            {
                "device": "iPad Air",
                "userAgent": "Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1"
            },
            {
                "device": "Galaxy Fold",
                "userAgent": "Mozilla/5.0 (Linux; Android 9.0; SAMSUNG SM-F900U Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36"
            },
            {
                "device": "Mozilla Firefox",
                "userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0"
            },
            {
                "device": "Edge",
                "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59"
            }
        ];
        this.userAgentText = this.userAgentOpt[0].userAgent;
        this.selectedUserAgent = this.userAgentOpt[0];
        if (this.isRecordingOpenFrom == "NT") {
            this.browserTypes = [
                { label: 'LoadTest Browser', value: 'Netstorm Browser' }
            ];
        }
        else {
            this.browserTypes = [
                { label: 'LoadTest Browser', value: 'Netstorm Browser' },
                { label: 'External Browser/Native Apps', value: 'External Browser/Native Apps' },
                { label: 'RDT Native', value: 'RDT Native' },
            ];
        }
        if (this.isRecordingOpenFrom == "NT") {
            this.selectType = [
                { label: 'WebClickAndScript(JAVA)', value: 'WebClickAndScript(JAVA)' },
                { label: 'WebClickAndScript', value: 'WebClickAndScript' }
            ];
        }
        else {
            this.selectType = [
                { label: 'WebC(HTTP/HTML)', value: 'WebC(HTTP/HTML)' },
                { label: 'WebJava(HTTP/HTML)', value: 'WebJava(HTTP/HTML)' },
                { label: 'WebJavascript(HTTP/HTML)', value: 'WebJavascript(HTTP/HTML)' },
                { label: 'WebClickAndScript', value: 'WebClickAndScript' },
                { label: 'WebClickAndScript(JAVA)', value: 'WebClickAndScript(JAVA)' },
                { label: 'WebClickAndScript(Javascript)', value: 'WebClickAndScript(Javascript)' },
                { label: 'RealDeviceTesting(RDT)', value: 'RealDeviceTesting(RDT)' },
            ];
        }
        this.browserEngin = [
            { label: 'Chromium', value: 'Chromium' },
            { label: 'Mozilla', value: 'Mozilla' },
        ];
        this.replaceOpt = [
            { label: 'Replace', value: 'Replace' },
            { label: 'Append', value: 'Append' },
        ];
        this.browseOptionTypes = [
            { label: 'Clear Cache', title: 'The cache will be cleared before creating browser for recording.', value: { id: 'Clear Cache', status: false } },
            { label: 'Clear Cookie', title: ' The cookie will be cleared before creating browser for recording.', value: { id: 'Clear Cookie', status: false } },
            { label: 'Clear Local Storage', title: 'The Local Storage will be cleared before creating browser for recording.', value: { id: 'Clear Local Storage', status: false } }
        ];
        this.methodOpt = [
            { label: 'PUT', value: { id: 'PUT', status: false } },
            { label: 'POST', value: { id: 'POST', status: false } },
            { label: 'HEAD', value: { id: 'HEAD', status: false } },
            { label: 'DELETE', value: { id: 'DELETE', status: false } }
        ];
        this.xmlhttp = [
            { label: 'XmlHttpRequest', value: { id: 'XmlHttpRequest', status: false } },
        ];
        this.userEvent =
            [{ label: 'Click', value: { id: 'User Click', status: false } }];
        this.urlType = [
            { label: 'application/json', value: { id: 'Json URL', status: false } }
        ];
        this.nsBrowseOption = [
            { label: 'Enable Javascript', title: 'It enables browser JavaScript, allowing the loading and capturing of Inline Javascript content in the script.', value: { id: 'Enable Javascript', status: false } },
            { label: 'Image Download', title: 'Download images from webpages during recording and captures them as inline request in the script.', value: { id: 'Image Download', status: false } },
            { label: 'Disable Plugins', title: 'Chromium plugins can be disabled using this option while recording ensuring a streamlined browsing experience.', value: { id: 'Disable Plugins', status: false } },
            { label: 'Ignore Security Certificate warnings', title: 'Option is used to bypass security certificate warnings during recording allowing access to websites with SSL/TLS certificate issues.', value: { id: 'Ignore', status: false } },
            { label: 'Escape Authentication', title: 'Skip authentication pop-ups during recording providing uninterrupted browsing. It is also to be noted that this may result in unauthorized access.', value: { id: 'Escape Authentication', status: false } },
            { label: 'Enable Snapshot Capturing', title: 'Capture a screenshot of the page after successfully reloading a new URL-enhancing script visualization.', value: { id: 'Enable Snap', status: false } },
            { label: 'Enable PreSnapshot Capturing', title: 'Capture a snapshot of the previous page visited before loading subsequent URLs aiding in script analysis.', value: { id: 'Enablr Pre', status: false } },
            { label: 'Verify SSL Certificate', title: "Verifies the authenticity and validity of the SSL certificate used by a website. This verification ensures that the website's connection is secure.", value: { id: 'Verify ssl', status: false } },
            // { label: 'Enable Devtools', value: { id: 'Enable Devtools', status: false } },
            { label: 'Capture Request Response', title: 'Captures the incoming requests made to a website and the corresponding responses sent back by the server for thorough script analysis.', value: { id: 'Capture Dump', status: false } },
            { label: 'Record Mouse Hover UserEvent', title: 'Enabling this option allows users to capture mouse hover events in WebClickAndScript.', value: { id: 'Record Mouse Hover', status: false } },
            { label: 'Record Scroll UserEvent', title: 'Enabling this option allows users to capture scroll events in WebClickAndScript', value: { id: 'Record Scroll Event', status: false } },
            { label: 'Encrypt Sensitive Data', title: 'Enabling this option will encrypt the sensitive user input like password, credit card details in WebClickAndScrpit recording.', value: { id: 'Encrypt Sensitive Data', status: false } },
            { label: 'Allow Cross Origin Frame Recording', title: 'Enables the ability to capture elements (e.g., XPath) inside cross-origin iframes by launching the browser with web security disabled.', value: { id: 'Allow Cross Origin Frame Recording', status: true } },
            { label: 'Enable DRM Video Content', title: 'Enables playback of DRM-protected content.', value: { id: 'Enable DRM Video Content', status: false } }
        ];
        this.recordHeaderOpt = [
            { label: 'Accept', value: { id: 'Accept', status: false } },
            { label: 'Accept-Encoding', value: { id: 'Accept-Encoding', status: false } },
            { label: 'Keep-Alive', value: { id: 'Keep-Alive', status: false } },
            { label: 'User-Agent', value: { id: 'User-Agent', status: false } },
            { label: 'Host', value: { id: 'Host', status: false } },
            { label: 'Connection', value: { id: 'Connection', status: false } },
            { label: 'Referer', value: { id: 'Referer', status: false } },
        ];
        this.cols = [
            { field: 'col1', header: 'URL Pattern' },
            { field: 'col2', header: 'Name' },
            { field: 'col3', header: 'Value' },
            { field: 'col4', header: 'Mode' },
        ];
        this.cols1 = [
            { field: 'col1', header: 'Name' },
            { field: 'col2', header: 'Value' },
        ];
        this.urlPatternKeyOpt = [
            { label: 'A-IM', value: 'A-IM' },
            { label: 'Accept-Charset', value: 'Accept-Charset' },
            { label: 'Accept-DateTime', value: 'Accept-Datetime' },
            { label: 'Accept-Encoding', value: 'Accept-Encoding' },
        ];
        this.urlPatternKey = this.urlPatternKeyOpt[0].value;
        this.replace = "Replace";
    }
    handleRouteQueryParams(params) {
        if (params) {
            this.hideParams = params;
            this.isRecordingOpenFrom = params.openFrom;
            this.filteredLocation = params.location;
            this.location = { value: this.filteredLocation, label: this.filteredLocation };
            this.selectedBrowserType = params.browserType;
            this.typeWeb = params.protocol;
            this.name = params.scriptName;
            this.flowName = params.flowName;
            this.flowList = [];
            this.recorderTitle = params.title != null ? params.title : this.recorderTitle;
            this.recordMode = params.recordMode != null ? params.recordMode : _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__["RecordingMode"].CODE;
            this.changeBrowserType({ value: this.selectedBrowserType });
        }
    }
    ngOnInit() {
        // this code for when page scroll close dropdown, menu, calender etc  
        $(document).ready(function () {
            $('div').scroll(function () {
                if ($(this).scrollTop() > 50) {
                    $('.ng-trigger-overlayAnimation').fadeOut();
                    $('body').click();
                }
                else {
                }
            });
        });
        // this code for when page scroll close dropdown, menu, calender etc  
        if (this.recordMode == _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__["RecordingMode"].CODE)
            this.getScriptDetail();
        this.getAvailableProfs();
        this.columns = [
            { header: 'Exclude URL Filters', field: 'url' },
        ];
        this.columnsForSelector = [
            { header: 'Custom Selector Attribute ', field: 'selector' },
        ];
    }
    chnageValues(eve) {
        // this.selDeviceLab = eve.device;
        this.userAgentText = eve.userAgent;
    }
    onEvent(event) {
        event.stopPropagation();
    }
    addHeaderRow() {
        if (this.urlPatternKey != undefined && this.urlPatternValue != undefined && this.urlPattern != '' && this.replace != undefined) {
            this.headerSettings.push({
                sno: this.headerSettings.length + 1,
                col1: this.urlPattern,
                col2: this.urlPatternKey,
                col3: this.urlPatternValue,
                col4: this.replace
            });
            this.headerSettings = [...this.headerSettings];
            // CLEAR TEXTBOX.
            this.urlPattern = null;
            this.urlPatternValue = null;
            this.urlPatternKey = this.urlPatternKeyOpt[0].value;
            this.replace = this.replaceOpt[0].value;
            this.utilservice.successMessage("Header added successfully.");
        }
        else {
            this.utilservice.warnMessage("Value is required.");
        }
    }
    deleteHeaderRow(row) {
        // Find the index of the row to be deleted
        const index = this.headerSettings.findIndex(item => item.sno === row.sno);
        if (index !== -1) {
            // Remove the row from the array
            this.headerSettings.splice(index, 1);
        }
        this.headerSettings = [...this.headerSettings];
        this.utilservice.successMessage("Header deleted successfully.");
    }
    addCookiesRow() {
        if (this.cookiesKey != undefined && this.cookiesKey != '' && this.cookiessValue != undefined && this.cookiessValue != '') {
            this.cookiesSettings.push({
                sno: this.cookiesSettings.length + 1,
                col1: this.cookiesKey,
                col2: this.cookiessValue
            });
            this.cookiesSettings = [...this.cookiesSettings];
            // CLEAR TEXTBOX.
            this.cookiesKey = null;
            this.cookiessValue = null;
            this.utilservice.successMessage("Cookies added successfully.");
        }
        else {
            if (this.cookiessValue == undefined || this.cookiessValue == '') {
                this.utilservice.warnMessage("Value is required.");
            }
            if (this.cookiesKey == undefined || this.cookiesKey == '') {
                this.utilservice.warnMessage("Name is required.");
            }
        }
    }
    deleteCookiesRow(row) {
        const index = this.cookiesSettings.findIndex(item => item.sno === row.sno);
        if (index !== -1) {
            // Remove the row from the array
            this.cookiesSettings.splice(index, 1);
        }
        this.cookiesSettings = [...this.cookiesSettings];
        this.utilservice.successMessage("Cookies deleted successfully.");
    }
    onRecord() {
        var _a;
        return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
            var pattern = /^[A-Za-z][A-Za-z0-9_.]{0,1023}$/;
            this.name = this.name.trim();
            this.flowName = this.flowName.trim();
            if (this.location == undefined) {
                this.utilservice.errorMessage(`Project and subproject is not assigned to user ${this.workprofile.userName}.`);
                return;
            }
            if (!this.name || !pattern.test(this.name)) {
                this.utilservice.warnMessage('Please add valid script name.\n Script name is of maximum 64 characters.\n First character must be Alpha.\n Other characters are Alpha,Numeric or Underscore');
                return false;
            }
            if (!this.flowName || !pattern.test(this.flowName)) {
                this.utilservice.warnMessage('Please add valid flow name.\n Flow name is of maximum 64 characters.\n First character must be Alpha.\n Other characters are Alpha,Numeric or Underscore');
                return false;
            }
            let privilege;
            yield this.loadTestUtils.getPermissions().then(res => {
                privilege = JSON.parse(res);
            });
            //this means that if user has readall capabilities than will not be able to record script.
            if (((_a = privilege === null || privilege === void 0 ? void 0 : privilege.All) === null || _a === void 0 ? void 0 : _a.All) <= 4) {
                this.utilservice.errorMessage(`User ${this.workprofile.userName} doesn't have write permissions.`);
                return;
            }
            if (this.selectedBrowserType == "Netstorm Browser") {
                if (this.url != undefined && this.url != '') {
                    let urlvar = this.url;
                    let cutommsg = this.utilservice.checkForValidUrl(urlvar);
                    if (cutommsg == true) {
                        let forceStart = 0;
                        for (let i = 0; i < this.flowList.length; i++) {
                            if (this.flowName == this.flowList[i].value) {
                                // this.confirmationService.confirm({
                                //   message: "Do you want to override already existing flow ?",
                                //   header: 'Confirmation',
                                //   accept: () => {
                                //     this.startRec(forceStart,this.recordExist);   
                                //   },
                                //   reject: () => {
                                //   }
                                // });
                                this.utilservice.errorMessage("Flow name already exists.");
                                return false;
                            }
                        }
                        this.startRec(forceStart, this.recordExist);
                    }
                    else {
                        this.utilservice.warnMessage("Enter valid URL. For example: https://www.cavisson.com");
                        return false;
                    }
                }
                else {
                    this.utilservice.warnMessage("Please add valid url you want to record");
                    return false;
                }
            }
            else if (this.selectedBrowserType == "RDT Native") {
                if (this.selectedApp == undefined) {
                    this.utilservice.errorMessage("Please Select application name.");
                    return false;
                }
                this.saveAppium();
            }
            else {
                if (this.typeWeb != "WebC(HTTP/HTML)") {
                    this.utilservice.warnMessage('Please select WebC(HTTP/HTML) script type');
                    return;
                }
                else {
                    //TODO : 
                    this.NOCommonService.userPermission = 7;
                    this.noRecordConfig.openFrom = this.isRecordingOpenFrom;
                    this.noRecordConfig.createScriptInfo.wp = (this.username == 'cavisson' ? 'admin' : this.username) + '/' + this.workprofile.profile;
                    this.noRecordConfig.createScriptInfo.s = this.location.value + '/scripts/' + this.name;
                    this.noRecordConfig.createScriptInfo.F = this.flowName;
                    this.noRecordConfig.createScriptInfo.t = this.pageBoundaryTime;
                    this.router.navigate(['/home/script-manager/script-recorder/recordServices']);
                    // let productType = 'netstorm';
                    // let host = `${window.location.protocol}//${window.location.host}`;
                    // if (this.username == 'cavisson')
                    //   this.username = 'admin';
                    // let scriptName = "workspace/" + this.username + "/" + this.workprofile.profile + "/cavisson/" + this.location.value + "/scripts/" + this.name
                    // var url = host + '/' + productType + "/recorder/recProcedure.jsp?referer=correlation&mode=script&scriptName=" + scriptName + "&sesLoginName=" + this.username + "&flowName=" + this.flowName + "&recordingMode=1&pageBoundaryTime=" + this.pageBoundaryTime + "&isNew=false&sessUserType=undefined&sessGroupName=undefined&sessServerTitle=NetStorm"
                    // window.open(url)
                }
            }
        });
    }
    saveAppium() {
        let platformName = "android";
        let deviceName = "Samsung Galaxy S21";
        let version = "11.0";
        let lastIndex = this.selectedApp.label.lastIndexOf("(");
        let appName = this.selectedApp.label.substring(0, lastIndex);
        if (appName.endsWith('.ipa')) {
            platformName = "ios";
            deviceName = "iphone 14";
            version = "16";
        }
        const payload = {
            "payload": {
                "appium:app": this.selectedApp.value,
                "platformName": platformName,
            }
        };
        this.platform = platformName;
        this.scriptRestService.saveAppium(payload).subscribe((state) => {
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["ScriptRestLoading"]) {
                this.onLoadingSaveCap(state);
                return;
            }
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["ScriptRestLoaded"]) {
                this.onLoadedSaveCap(state);
                return;
            }
        }, (state) => {
            this.onLoadedErrorSaveCap(state);
        });
    }
    onLoadedErrorSaveCap(state) {
    }
    onLoadedSaveCap(state) {
        let res = state.data;
        let forceStart = 0;
        this.scriptRestService.uuid = res['uuid'];
        this.startRec(forceStart, this.recordExist, "appium", res['uuid']);
    }
    onLoadingSaveCap(state) {
    }
    onChangeProfile(event) {
        this.browseSelectedTypes = [];
        this.method = [];
        this.xmlhttpSelected = [];
        this.userSelected = [];
        this.urlSelected = [];
        this.nsBrowse = [];
        this.recordHeader = [];
        this.obj = {};
        this.obj1 = {};
        this.tableData = [];
        this.tableDataForSelector = [];
        for (let i = 0; i < this.nsBrowseOption.length; i++) {
            this.nsBrowseOption[i].value.status = false;
        }
        for (let i = 0; i < this.browseOptionTypes.length; i++) {
            this.browseOptionTypes[i].value.status = false;
        }
        for (let i = 0; i < this.methodOpt.length; i++) {
            this.methodOpt[i].value.status = false;
        }
        for (let i = 0; i < this.recordHeaderOpt.length; i++) {
            this.recordHeaderOpt[i].value.status = false;
        }
        this.userEvent[0].value.status = false;
        this.xmlhttp[0].value.status = false;
        this.urlType[0].value.status = false;
        this.getRecordingProfileData(event);
    }
    changeBrowserType(event) {
        this.selectType1 = this.selectType;
        if (event.value == "Netstorm Browser") {
            this.isExtBrowser = false;
            this.isAppium = false;
        }
        else if (event.value == "RDT Native") {
            this.isAppium = true;
            this.isExtBrowser = false;
            this.selectType1 = [{ label: 'RealDeviceTesting(RDT)', value: 'RealDeviceTesting(RDT)' }];
            this.typeWeb = "RealDeviceTesting(RDT)";
            this.fillAppDetails();
        }
        else {
            this.isExtBrowser = true;
            this.isAppium = false;
        }
    }
    fillAppDetails() {
        this.rdtAppListService.getApplicationOptions(true).subscribe((options) => {
            this.applicationOpt = options || [];
            if (this.isUploading) {
                this.selectedApp = this.applicationOpt[0];
                this.isUploading = false;
            }
        }, (_state) => {
        });
    }
    getRecordingProfileData(profile) {
        this.scriptRestService.getRecordingProfileData(profile).subscribe((state) => {
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["RecordingProfileDataLoadingState"]) {
                this.onLoadingRecordingProfileData(state);
                return;
            }
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["RecordingProfileDataLoadedState"]) {
                this.onLoadedRecordingProfileData(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorRecordingProfileData(state);
        });
    }
    onLoadingErrorRecordingProfileData(state) {
        this.loading = false;
    }
    onLoadedRecordingProfileData(state) {
        this.loading = false;
        let res = state.data;
        this.selectedProfileData = res.profileData;
        let profTemp = JSON.parse(this.selectedProfileData);
        if (this.selectedProfile != undefined && this.selectedProfile != "") {
            if (!profTemp)
                return;
            if (profTemp.clearCache || profTemp.clearCookie || profTemp.clearLocalStorage)
                this.browseOption = true;
            else
                this.browseOption = false;
            if (profTemp.splitForPut || profTemp.splitForPost || profTemp.splitForHead || profTemp.splitForDelete || profTemp.splitForHeader || profTemp.splitForUserClick || profTemp.splitForURLType)
                this.splitOption = true;
            else
                this.splitOption = false;
            this.httpReqBodySize = Number(profTemp.bodySize);
            this.seconds = profTemp.pageSplitLimit;
            this.sameForBoth = profTemp.isForBothHttpAndHttps;
            this.addTxnInFlow = profTemp.addTransaction;
            this.selectProxyAuthentications = profTemp.prxoAutenticationCredential;
            if (profTemp.clearCache) {
                this.browseOptionTypes[0].value.status = profTemp.clearCache;
                this.browseSelectedTypes[0] = this.browseOptionTypes[0].value;
            }
            if (profTemp.clearCookie) {
                this.browseOptionTypes[1].value.status = profTemp.clearCookie;
                this.browseSelectedTypes[1] = this.browseOptionTypes[1].value;
            }
            if (profTemp.clearLocalStorage) {
                this.browseOptionTypes[2].value.status = profTemp.clearLocalStorage;
                this.browseSelectedTypes[2] = this.browseOptionTypes[2].value;
            }
            if (profTemp.enableJavaScript) {
                this.nsBrowseOption[0].value.status = profTemp.enableJavaScript;
                this.nsBrowse[0] = this.nsBrowseOption[0].value;
            }
            if (profTemp.imageDownload) {
                this.nsBrowseOption[1].value.status = profTemp.imageDownload;
                this.nsBrowse[1] = this.nsBrowseOption[1].value;
            }
            if (profTemp.disablePlugins) {
                this.nsBrowseOption[2].value.status = profTemp.disablePlugins;
                this.nsBrowse[2] = this.nsBrowseOption[2].value;
            }
            if (profTemp.ignoreHTTPSWarnings) {
                this.nsBrowseOption[3].value.status = profTemp.ignoreHTTPSWarnings;
                this.nsBrowse[3] = this.nsBrowseOption[3].value;
            }
            if (profTemp.enableAuth) {
                this.nsBrowseOption[4].value.status = profTemp.enableAuth;
                this.nsBrowse[4] = this.nsBrowseOption[4].value;
            }
            if (profTemp.snapshot) {
                this.nsBrowseOption[5].value.status = profTemp.snapshot;
                this.nsBrowse[5] = this.nsBrowseOption[5].value;
            }
            if (profTemp.preSnapshot) {
                this.nsBrowseOption[6].value.status = profTemp.preSnapshot;
                this.nsBrowse[6] = this.nsBrowseOption[6].value;
            }
            if (profTemp.verifySSLCertificate) {
                this.nsBrowseOption[7].value.status = profTemp.verifySSLCertificate;
                this.nsBrowse[7] = this.nsBrowseOption[7].value;
            }
            // if (profTemp.enableDevTool) {
            //   this.nsBrowseOption[8].value.status=profTemp.enableDevTool
            //   this.nsBrowse[8] = this.nsBrowseOption[8].value
            // }
            if (profTemp.isToSaveDump) {
                this.nsBrowseOption[8].value.status = profTemp.isToSaveDump;
                this.nsBrowse[8] = this.nsBrowseOption[8].value;
            }
            if (profTemp.recordMouseHover) {
                this.nsBrowseOption[9].value.status = profTemp.recordMouseHover;
                this.nsBrowse[9] = this.nsBrowseOption[9].value;
            }
            if (profTemp.recordScrollEvent) {
                this.nsBrowseOption[10].value.status = profTemp.recordScrollEvent;
                this.nsBrowse[10] = this.nsBrowseOption[10].value;
            }
            if (profTemp.encryptSensitiveInfo) {
                this.nsBrowseOption[11].value.status = profTemp.encryptSensitiveInfo;
                this.nsBrowse[11] = this.nsBrowseOption[11].value;
            }
            if (profTemp.allowCrossOriginFrameRecording) {
                this.nsBrowseOption[12].value.status = profTemp.allowCrossOriginFrameRecording;
                this.nsBrowse[12] = this.nsBrowseOption[12].value;
            }
            else {
                this.nsBrowse[12] = this.nsBrowseOption[12].value.status = false;
            }
            if (profTemp.enableDRMVideoContent) {
                this.nsBrowseOption[13].value.status = profTemp.enableDRMVideoContent;
                this.nsBrowse[13] = this.nsBrowseOption[13].value;
            }
            else {
                this.nsBrowse[13] = this.nsBrowseOption[13].value.status = false;
            }
            if (profTemp.splitForPut) {
                this.methodOpt[0].value.status = profTemp.splitForPut;
                this.method[0] = this.methodOpt[0].value;
            }
            if (profTemp.splitForPost) {
                this.methodOpt[1].value.status = profTemp.splitForPost;
                this.method[1] = this.methodOpt[1].value;
            }
            if (profTemp.splitForHead) {
                this.methodOpt[2].value.status = profTemp.splitForHead;
                this.method[2] = this.methodOpt[2].value;
            }
            if (profTemp.splitForDelete) {
                this.methodOpt[3].value.status = profTemp.splitForDelete;
                this.method[3] = this.methodOpt[3].value;
            }
            if (profTemp.splitForHeader) {
                this.xmlhttp[0].value.status = profTemp.splitForHeader;
                this.xmlhttpSelected[0] = this.xmlhttp[0].value;
            }
            if (profTemp.splitForUserClick) {
                this.userEvent[0].value.status = profTemp.splitForUserClick;
                this.userSelected[0] = this.userEvent[0].value;
            }
            if (profTemp.splitForURLType) {
                this.urlType[0].value.status = profTemp.splitForURLType;
                this.urlSelected[0] = this.urlType[0].value;
            }
            if (profTemp.recordAcceptHeader) {
                this.recordHeaderOpt[0].value.status = profTemp.recordAcceptHeader;
                this.recordHeader[0] = this.recordHeaderOpt[0].value;
            }
            if (profTemp.recordAcceptEncodingHeader) {
                this.recordHeaderOpt[1].value.status = profTemp.recordAcceptEncodingHeader;
                this.recordHeader[1] = this.recordHeaderOpt[1].value;
            }
            if (profTemp.recordKeepAliveHeader) {
                this.recordHeaderOpt[2].value.status = profTemp.recordKeepAliveHeader;
                this.recordHeader[2] = this.recordHeaderOpt[2].value;
            }
            if (profTemp.recordUserAgentHeader) {
                this.recordHeaderOpt[3].value.status = profTemp.recordUserAgentHeader;
                this.recordHeader[3] = this.recordHeaderOpt[3].value;
            }
            if (profTemp.recordHostHeader) {
                this.recordHeaderOpt[4].value.status = profTemp.recordHostHeader;
                this.recordHeader[4] = this.recordHeaderOpt[4].value;
            }
            if (profTemp.recordConnectionHeader) {
                this.recordHeaderOpt[5].value.status = profTemp.recordConnectionHeader;
                this.recordHeader[5] = this.recordHeaderOpt[5].value;
            }
            if (profTemp.recordRefererHeader) {
                this.recordHeaderOpt[6].value.status = profTemp.recordRefererHeader;
                this.recordHeader[6] = this.recordHeaderOpt[6].value;
            }
            if (profTemp.userAgent) {
                this.userAgentText = profTemp.userAgent;
                this.userAgentOpt.forEach(element => {
                    if (element.userAgent == this.userAgentText) {
                        this.selectedUserAgent = element;
                    }
                });
            }
            this.proxy = profTemp.httpServerIP;
            this.proxyPort1 = profTemp.httpServerPort;
            this.sslProxy = profTemp.httpsServerIP;
            this.sslProxyPort2 = profTemp.httpsServerPort;
            this.userName = profTemp.httpsServerUserName;
            this.userPassword = profTemp.httpsServerPassword;
            this.noProxyFor = profTemp.exceptions;
            this.headerSettings = [];
            if (profTemp.modifiedHeaderMap != undefined) {
                for (let i = 0; i < Object.keys(profTemp.modifiedHeaderMap).length; i++) {
                    let key = Object.keys(profTemp.modifiedHeaderMap)[i];
                    if (JSON.stringify(profTemp.modifiedHeaderMap) !== '{}') {
                        let mode;
                        if (profTemp.modifiedHeaderMap[key]['mode'] == 0) {
                            mode = "Replace";
                        }
                        else {
                            mode = "Append";
                        }
                        this.headerSettings.push({
                            sno: this.headerSettings.length + 1,
                            col1: profTemp.modifiedHeaderMap[key]['urlPattern'],
                            col2: profTemp.modifiedHeaderMap[key]['headerKey'],
                            col3: profTemp.modifiedHeaderMap[key]['headerValue'],
                            col4: mode
                        });
                    }
                    else {
                        this.headerSettings = [];
                    }
                }
            }
            this.cookiesSettings = [];
            if (profTemp.modifiedCookieMap != undefined) {
                for (let i = 0; i < Object.keys(profTemp.modifiedCookieMap).length; i++) {
                    let key2 = Object.keys(profTemp.modifiedCookieMap)[i];
                    if (JSON.stringify(profTemp.modifiedCookieMap) !== '{}') {
                        this.cookiesSettings.push({
                            sno: this.cookiesSettings.length + 1,
                            col1: key2,
                            col2: profTemp.modifiedCookieMap[key2]
                        });
                    }
                    else {
                        this.cookiesSettings = [];
                    }
                }
            }
            if (profTemp.proxySetting == 0) {
                this.setProxy = "NoProxy";
            }
            else if (profTemp.proxySetting == 1) {
                this.setProxy = "SystemProxy";
            }
            else {
                this.setProxy = "ManualProxy";
            }
            if (profTemp.filteredUrls) {
                //let str = "";
                profTemp.filteredUrls.forEach(element => {
                    //str += element + "\n" ;
                    if (element != '')
                        this.tableData.push({ 'url': element });
                });
                this.tableData.push({ 'url': '' });
                //this.urlFilter=str;
            }
            else {
                //this.urlFilter="";
                const newRow = {};
                newRow[this.columns[0].field] = '';
                this.tableData[0] = newRow;
            }
            if (profTemp.customAttributeSelectors) {
                //let str = "";
                profTemp.customAttributeSelectors.forEach(element => {
                    //str += element + "\n" ;
                    if (element != '')
                        this.tableDataForSelector.push({ 'selector': element });
                });
                this.tableDataForSelector.push({ 'selector': '' });
                //this.urlFilter=str;
            }
            else {
                const newRow = {};
                newRow[this.columnsForSelector[0].field] = '';
                this.tableDataForSelector[0] = newRow;
            }
            this.showHttpBody = profTemp.nameValuePair;
            this.isHeavyWeightSelected = profTemp.isHeavyWeightSelected;
            this.selectBrowserEngin = profTemp.recordingEngine;
        }
    }
    onLoadingRecordingProfileData(state) {
    }
    checkProfileName(profileName) {
        if (this.recordingProfileOpt.length == 0) {
            this.recordingProfileOpt.push({ label: profileName, value: profileName });
            this.collectProfiledata(profileName);
            this.utilservice.successMessage(profileName + ' profile saved ', 'successfully');
            this.prof = "";
        }
        else {
            for (let i = 0; i < this.recordingProfileOpt.length; i++) {
                if (this.recordingProfileOpt[i].value.indexOf(profileName) != -1) {
                    this.utilservice.warnMessage('profile not saved ', 'Unsuccessful');
                    alert("profilename exist already");
                    this.prof = "";
                    break;
                }
                else if (i == this.recordingProfileOpt.length - 1) {
                    this.recordingProfileOpt.push({ label: profileName, value: profileName });
                    this.collectProfiledata(profileName);
                    this.utilservice.successMessage(profileName + ' profile saved ', 'successfully');
                    this.prof = "";
                    return;
                }
            }
        }
    }
    getScriptDetail() {
        this.selectedBrowserType = this.browserTypes[0].value;
        let user = this.username;
        this.loading = true;
        this.scriptRestService.getProjList({ cctx: this.sessionService.session.cctx }).subscribe((state) => {
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["ScriptRestLoading"]) {
                return;
            }
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["ScriptRestLoaded"]) {
                if (state.data['status'] == false) {
                    this.utilservice.errorMessage("Error occurred while fetching script lists.");
                    this.loading = false;
                    return;
                }
                this.loading = false;
                this.totalProjSubProjList = state.data['output'];
                this.projectName = this.totalProjSubProjList[0].Project;
                this.subProjectName = this.totalProjSubProjList[0].SubProject;
                let res = this.totalProjSubProjList;
                let prjSubArr = [];
                for (let i = 0; i < res.length; i++) {
                    if (res[i].permission > 4) {
                        let loc = res[i].Project + "/" + res[i].SubProject;
                        if (this.isRecordingOpenFrom == "script") {
                            prjSubArr.push({ label: loc, value: loc });
                        }
                        else {
                            if (this.filteredLocation.trim() != '') {
                                if (loc.trim() == this.filteredLocation.trim()) {
                                    prjSubArr.push({ label: loc, value: loc });
                                }
                            }
                            else {
                                this.utilservice.errorMessage("Location not available for NetTest script recording.");
                                return;
                            }
                        }
                    }
                }
                if (this.isRecordingOpenFrom == "NT" && prjSubArr.length == 0) {
                    this.utilservice.errorMessage("Location not found for NetTest script recording.");
                    return;
                }
                const key = 'value';
                const arrayUniqueProj = [...new Map(prjSubArr.map(item => [item[key], item])).values()];
                this.projSubProjData = arrayUniqueProj;
                this.location = this.projSubProjData[0];
                this.projSubProjData.sort((a, b) => a.value.localeCompare(b.value));
                this.selectScript(this.location);
                //this.handleRouteQueryParams(this.hideParams as RecorderOptions);
                return;
            }
        }, (state) => {
            this.loading = false;
            this.utilservice.errorMessage("Error occurred while fetching script lists.");
        });
    }
    // onLoadingErrorList(state: ProjectListLoadingErrorState) {
    // }
    // onScriptDetailsLoaded(state: ProjectListLoadedState) {
    // }
    // onLoadingList(state: ProjectListLoadingState) {
    // }
    EditMode(scriptname) {
        let scriptListOption = [];
        for (let i = 0; i < this.scriptList.length; i++) {
            scriptListOption.push(this.scriptList[i].value);
        }
        if (scriptname == "") {
            this.selectScript(this.location);
        }
        else if (!scriptListOption.includes(scriptname)) {
            this.recordExist = false;
            this.flowName = "flow";
            if (this.selectedBrowserType != 'RDT Native') {
                this.selectType1 = this.selectType;
                this.typeWeb = this.selectType1[0].label;
            }
            else {
                this.selectType1 = [{ label: 'RealDeviceTesting(RDT)', value: 'RealDeviceTesting(RDT)' }];
                this.typeWeb = "RealDeviceTesting(RDT)";
            }
            //  this.selectFlow(scriptName);
        }
        else {
            this.selectFlow(scriptname);
        }
    }
    selectScript(event) {
        this.scriptList = [];
        this.name = "";
        this.flowName = "";
        let res = this.totalProjSubProjList;
        for (let i = 0; i < res.length; i++) {
            let prjsub = res[i].Project + "/" + res[i].SubProject;
            if (prjsub == event.value) {
                if (this.scriptList.indexOf(res[i].SubProject) == -1 && res[i].ScriptList)
                    this.scriptList.push({ label: res[i].ScriptList, value: res[i].ScriptList });
            }
        }
    }
    selectFlow(event) {
        this.flowList = [];
        this.flowName = "";
        let res = this.totalProjSubProjList;
        for (let i = 0; i < res.length; i++) {
            let prjsub = res[i].Project + "/" + res[i].SubProject;
            if (prjsub == this.location['value']) {
                if (res[i].ScriptList == event) {
                    this.recordExist = true;
                    if (this.flowList.indexOf(res[i].ScriptList) == -1)
                        for (let j = 0; j < res[i].FlowList.length; j++) {
                            this.flowList.push({ label: res[i].FlowList[j], value: res[i].FlowList[j] });
                        }
                }
            }
        }
        this.projectName = this.location.value.split("/")[0];
        this.subProjectName = this.location.value.split("/")[1];
        this.getScriptType(this.projectName, this.subProjectName, event);
    }
    getScriptType(projectName, subProjectName, scriptName) {
        this.selectType1 = [];
        let res = this.totalProjSubProjList;
        for (let i = 0; i < res.length; i++) {
            if (res[i].Project == projectName) {
                if (res[i].SubProject == subProjectName) {
                    if (res[i].ScriptList == scriptName) {
                        if (res[i].Type == 'C' && res[i].SubType == 'HTTP') {
                            this.selectType1.push({
                                label: 'WebC(HTTP/HTML)',
                                value: 'WebC(HTTP/HTML)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'C' && res[i].SubType == 'CLICK_AND_SCRIPT') {
                            this.selectType1.push({
                                label: 'WebClickAndScript',
                                value: 'WebClickAndScript'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'JAVA' && res[i].SubType == 'CLICK_AND_SCRIPT') {
                            this.selectType1.push({
                                label: 'WebClickAndScript(JAVA)',
                                value: 'WebClickAndScript(JAVA)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'JAVA' && res[i].SubType == 'HTTP') {
                            this.selectType1.push({
                                label: 'WebJava(HTTP/HTML)',
                                value: 'WebJava(HTTP/HTML)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'JAVA' && res[i].SubType == 'RealDeviceTesting(RDT)') {
                            this.selectType1.push({
                                label: 'RealDeviceTesting(RDT)',
                                value: 'RealDeviceTesting(RDT)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'JS' && res[i].SubType == 'CLICK_AND_SCRIPT') {
                            this.selectType1.push({
                                label: 'WebClickAndScript(Javascript)',
                                value: 'WebClickAndScript(Javascript)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                        else if (res[i].Type == 'JS' && res[i].SubType == 'HTTP') {
                            this.selectType1.push({
                                label: 'WebJavascript(HTTP/HTML)',
                                value: 'WebJavascript(HTTP/HTML)'
                            });
                            this.typeWeb = this.selectType1[0].label;
                        }
                    }
                }
            }
        }
    }
    startRec(forceStart, isRecordToExistedScript, mode, uuid) {
        this.loadingOnRecord = true;
        let user = this.username;
        if (user == 'cavisson') {
            user = 'admin';
        }
        else {
            user = this.username;
        }
        var pattern = /^[a-zA-Z][a-zA-Z0-9_]{0,63}$/;
        if (!pattern.test(this.name)) {
            this.utilservice.warnMessage('Please enter valid script name.\nScript name is of maximum 64 characters.\nFirst character must be Alpha.\r\nOther characters are Alphanumeric or underscore.');
            this.loadingOnRecord = false;
            return;
        }
        if (this.name == 'scripts') {
            this.utilservice.warnMessage("Script name 'scripts' is not allowed");
            this.loadingOnRecord = false;
            return;
        }
        if (this.isRecordingOpenFrom == "NT") {
            this.selectedProfile = "default";
        }
        let scriptPath = "workspace/" + user + "/" + this.workprofile.profile + "/cavisson/" + this.location.value + "/scripts/" + this.name;
        this.scriptRestService.scriptPath = scriptPath;
        this.scriptRestService.recordingType = this.selectedBrowserType;
        let queryParams = new _angular_common_http__WEBPACK_IMPORTED_MODULE_14__["HttpParams"]()
            .set('profile', this.selectedProfile)
            .set('productKey', this.sessionService.session.cctx.pk)
            .set('url', encodeURIComponent(this.url))
            .set('scriptName', scriptPath)
            .set('protocol', this.typeWeb)
            .set('flowName', this.flowName)
            .set('forceStart', forceStart)
            .set('isRecordToExistedScript', isRecordToExistedScript)
            .set('recordMode', this.recordMode.toString());
        if (this.selectedBrowserType == _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__["RecorderBrowser"].MOBILE_NATIVE) {
            queryParams = queryParams.set('mode', mode)
                .set('uuid', uuid);
        }
        this.scriptRestService.startRecording(queryParams).subscribe(data => {
            let status = data['status'];
            let type = data['type'];
            if (status == "true") {
                setTimeout(() => {
                    if (this.selectedApp) {
                        if (this.urlQueryParams == null || this.urlQueryParams == undefined) {
                            this.urlQueryParams = { appURL: this.selectedApp.value, back: '/home/script-manager/view', openFrom: 'script', platform: this.platform };
                        }
                        else {
                            this.urlQueryParams = Object.assign(Object.assign({}, this.urlQueryParams), { platform: this.platform, appURL: this.selectedApp.value });
                        }
                    }
                    if (this.urlQueryParams != null && this.recordMode == _interface_recorder_interface__WEBPACK_IMPORTED_MODULE_13__["RecordingMode"].NO_CODE)
                        this.urlQueryParams = Object.assign(Object.assign({}, this.urlQueryParams), { uuid: data['uuid'] });
                    this.router.navigate(['/record'], {
                        queryParams: this.urlQueryParams
                    });
                    this.loadingOnRecord = false;
                    let url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/cav-record/index.html?display=" + data['displayId'] + '&productKey=' + this.sessionService.session.cctx.pk;
                    if (data['recorderport'])
                        url += '&port=' + data['recorderport'];
                    if (this.selectedBrowserType == "RDT Native" && data['appiumClient'] == 'html') {
                        url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/RDT/index.html?autostart=1&profile=" + data['uuid'];
                    }
                    this.scriptRestService.recordUrl = url;
                    this.scriptRestService._recorderUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url);
                }, 1000);
            }
            else if (status == "false" && type == "prompt") {
                this.confirmationService.confirm({
                    message: data['msg'],
                    header: 'Confirmation',
                    accept: () => {
                        let forceToStart = 1;
                        let mode;
                        uuid;
                        if (this.selectedBrowserType == "RDT Native") {
                            mode = "appium";
                            uuid = this.scriptRestService.uuid;
                        }
                        this.startRec(forceToStart, this.recordExist, mode, uuid);
                    },
                    reject: () => {
                        this.loadingOnRecord = false;
                    }
                });
            }
            else {
                this.utilservice.errorMessage(data['msg']);
                this.loadingOnRecord = false;
            }
        });
    }
    getAvailableProfs() {
        this.scriptRestService.getAvaialbleProfiles().subscribe((state) => {
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["AvailableProfsLoadingState"]) {
                this.onLoadingAvailableProfs(state);
                return;
            }
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["AvailableProfsLoadedState"]) {
                this.onAvailableProfsLoaded(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorAvailableProfs(state);
        });
    }
    onLoadingAvailableProfs(state) {
        this.loading = true;
    }
    onAvailableProfsLoaded(state) {
        let arr = [];
        let res = state.data;
        if (Object.keys(res).length === 0) {
            arr.push({ label: "default", value: "default" });
        }
        for (var key in res) {
            key = key.split('.').slice(0, -1).join('.');
            if (key.toString().startsWith('.') || key.toString().trim().toLowerCase().startsWith('data'))
                continue;
            arr.push({ label: key, value: key });
            if (key === 'default' && res[res[key]]) {
                this.selectedProfile = res[key];
                continue;
            }
            try {
                if (res[key])
                    this.recordingdata[key] = JSON.parse(res[key]);
            }
            catch (error) {
                console.error(error);
            }
        }
        this.recordingProfileOpt = arr;
        if (this.recordingProfileOpt.length != 0) {
            this.selectedProfile = this.recordingProfileOpt[0].value;
            this.getRecordingProfileData(this.selectedProfile);
        }
    }
    onLoadingErrorAvailableProfs(state) {
        this.loading = false;
    }
    saveProf() {
        this.recProfile = this.collectProfiledata(this.selectedProfile);
    }
    saveRecordingProfile(sbs, prof) {
        this.scriptRestService.saveRecordingProfile(sbs, prof).subscribe((state) => {
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["SaveRecordingProfileLoadingState"]) {
                this.onLoadingSaveRecording(state);
                return;
            }
            if (state instanceof _services_script_state__WEBPACK_IMPORTED_MODULE_8__["SaveRecordingProfileLoadedState"]) {
                this.onLoadedSaverecording(state);
                return;
            }
        }, (state) => {
            this.onLoadingErrorSaveRecording(state);
        });
    }
    onLoadingErrorSaveRecording(state) {
    }
    onLoadedSaverecording(state) {
    }
    onLoadingSaveRecording(state) {
    }
    changedValues(value) {
        this.changedValue = value;
    }
    collectProfiledata(profileName) {
        if (this.setProxy == "NoProxy") {
            this.selectedProxy = 0;
        }
        else if (this.setProxy == "SystemProxy") {
            this.selectedProxy = 1;
        }
        else {
            this.selectedProxy = 2;
        }
        this.obj1 = {};
        this.obj = {};
        for (let i = 0; i < this.cookiesSettings.length; i++) {
            this.key2 = this.cookiesSettings[i]['col1'];
            this.obj1[this.key2] = this.cookiesSettings[i]['col2'];
        }
        for (let i = 0; i < this.headerSettings.length; i++) {
            var modigyHeader = [], mode;
            if (this.headerSettings[i]['col4'] == "Replace") {
                mode = 0;
            }
            else {
                mode = 1;
            }
            this.key1 = this.headerSettings[i]['col1'] + "@@" + this.headerSettings[i]['col2'];
            modigyHeader = {
                urlPattern: this.headerSettings[i]['col1'],
                headerValue: this.headerSettings[i]['col3'],
                headerKey: this.headerSettings[i]['col2'],
                mode: mode
            };
            this.obj[this.key1] = modigyHeader;
        }
        if (!this.browseOption) {
            this.browseOptionTypes[0].value.status = false;
            this.browseOptionTypes[1].value.status = false;
            this.browseOptionTypes[2].value.status = false;
        }
        if (!this.splitOption) {
            for (let i in this.methodOpt) {
                this.methodOpt[i].value.status = false;
            }
            this.method = [];
            this.xmlhttpSelected = [];
            this.userSelected = [];
            this.urlSelected = [];
            this.xmlhttp[0].value.status = false;
            this.userEvent[0].value.status = false;
            this.urlType[0].value.status = false;
        }
        let arrOfFilter, arrOfSelectors;
        // if(this.urlFilter){
        //   filterArr=this.urlFilter.split("\n")
        //   arrOfFilter=filterArr.filter(element => element != "")
        // }    
        if (this.tableData.length > 0) {
            let excludeUrls = [];
            this.tableData.forEach((fields) => {
                if (fields.url != '')
                    excludeUrls.push(fields.url);
            });
            arrOfFilter = excludeUrls.filter(element => element != "");
        }
        if (this.tableDataForSelector.length > 0) {
            let selectors = [];
            this.tableDataForSelector.forEach((fields) => {
                if (fields.selector != '')
                    selectors.push(fields.selector);
            });
            arrOfSelectors = selectors.filter(element => element != "");
        }
        let SBSettings = {
            clearCache: this.browseOptionTypes[0].value.status,
            clearCookie: this.browseOptionTypes[1].value.status,
            clearLocalStorage: this.browseOptionTypes[2].value.status,
            splitForPost: this.methodOpt[1].value.status,
            splitForPut: this.methodOpt[0].value.status,
            splitForHead: this.methodOpt[2].value.status,
            splitForHeader: this.xmlhttp[0].value.status,
            splitForDelete: this.methodOpt[3].value.status,
            splitForURLType: this.urlType[0].value.status,
            splitForUserClick: this.userEvent[0].value.status,
            enableJavaScript: this.nsBrowseOption[0].value.status,
            imageDownload: this.nsBrowseOption[1].value.status,
            disablePlugins: this.nsBrowseOption[2].value.status,
            ignoreHTTPSWarnings: this.nsBrowseOption[3].value.status,
            enableAuth: this.nsBrowseOption[4].value.status,
            snapshot: this.nsBrowseOption[5].value.status,
            preSnapshot: this.nsBrowseOption[6].value.status,
            verifySSLCertificate: this.nsBrowseOption[7].value.status,
            isToSaveDump: this.nsBrowseOption[8].value.status,
            recordMouseHover: this.nsBrowseOption[9].value.status,
            recordScrollEvent: this.nsBrowseOption[10].value.status,
            encryptSensitiveInfo: this.nsBrowseOption[11].value.status,
            allowCrossOriginFrameRecording: this.nsBrowseOption[12].value.status,
            enableDRMVideoContent: this.nsBrowseOption[13].value.status,
            isHeavyWeightSelected: this.isHeavyWeightSelected,
            // enableDevTool: this.nsBrowseOption[8].value.status,
            userAgent: this.userAgentText,
            recordingEngine: this.selectBrowserEngin,
            bodySize: this.httpReqBodySize,
            nameValuePair: this.showHttpBody,
            recordAcceptHeader: this.recordHeaderOpt[0].value.status,
            recordAcceptEncodingHeader: this.recordHeaderOpt[1].value.status,
            recordKeepAliveHeader: this.recordHeaderOpt[2].value.status,
            recordUserAgentHeader: this.recordHeaderOpt[3].value.status,
            recordHostHeader: this.recordHeaderOpt[4].value.status,
            recordConnectionHeader: this.recordHeaderOpt[5].value.status,
            recordRefererHeader: this.recordHeaderOpt[6].value.status,
            proxySetting: this.selectedProxy,
            httpServerIP: this.proxy,
            httpServerPort: this.proxyPort1,
            httpsServerIP: this.sslProxy,
            httpsServerPort: this.sslProxyPort2,
            httpsServerUserName: this.userName,
            httpsServerPassword: this.userPassword,
            exceptions: this.noProxyFor,
            modifiedHeaderMap: this.obj,
            modifiedCookieMap: this.obj1,
            pageSplitLimit: this.seconds,
            isForBothHttpAndHttps: this.sameForBoth,
            addTransaction: this.addTxnInFlow,
            prxoAutenticationCredential: this.selectProxyAuthentications,
            filteredUrls: arrOfFilter,
            customAttributeSelectors: arrOfSelectors
        };
        this.saveRecordingProfile(SBSettings, profileName);
        return SBSettings;
    }
    selectBrowsingData(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.browseOptionTypes[event.index] = selectedOption;
        if (this.browseOptionTypes[0].value.status && this.browseOptionTypes[1].value.status && this.browseOptionTypes[2].value.status)
            this.showNote = true;
        else
            this.showNote = false;
    }
    selectMethodOptions(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.methodOpt[event.index] = selectedOption;
        setTimeout(() => {
            if (selectedOption.label == 'ALL') {
                this.method = [];
                this.methodOpt.forEach((val, idx) => {
                    this.methodOpt[idx].value.status = selectedOption.value.status; // selectedOption is already updated above
                    if (selectedOption.value.status)
                        this.method.push(this.methodOpt[idx].value);
                });
            }
        }, 10);
    }
    selectURLOptions(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.urlType[event.index] = selectedOption;
    }
    selectUserEventOptions(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.userEvent[event.index] = selectedOption;
    }
    selectHeaderOptions(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.xmlhttp[event.index] = selectedOption;
    }
    selectNetstormData(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.nsBrowseOption[event.index] = selectedOption;
        if (this.nsBrowseOption[12].value.status && this.nsBrowseOption[13].value.status) {
            this.utilservice.warnMessage("You have enabled \"Allow Cross Origin Frame Recording,\" which may affect the functionality of \"Enable DRM Video Content.\"");
        }
    }
    selectrecordHeader(event) {
        let selectedOption = event.option;
        selectedOption.value.status = !selectedOption.value.status;
        this.recordHeaderOpt[event.index] = selectedOption;
    }
    onKeyUp(event, rowData, rowIndex, columnField) {
        if (columnField === this.columns[this.columns.length - 1].field && rowIndex === this.tableData.length - 1) {
            this.addNewRow(this.columns, this.tableData);
        }
        if (rowData.url == '' && rowIndex != this.tableData.length - 1)
            this.tableData.splice(rowIndex, 1);
    }
    onKeyUpCustomSelector(event, rowData, rowIndex, columnField) {
        if (columnField === this.columnsForSelector[this.columnsForSelector.length - 1].field && rowIndex === this.tableDataForSelector.length - 1) {
            this.addNewRow(this.columnsForSelector, this.tableDataForSelector);
        }
        if (rowData.selector == '' && rowIndex != this.tableDataForSelector.length - 1)
            this.tableDataForSelector.splice(rowIndex, 1);
    }
    addNewRow(columns, tableData) {
        const newRow = {};
        columns.forEach(column => {
            newRow[column.field] = '';
        });
        tableData.push(newRow);
    }
    selectFile(fileList, formRef) {
        var _a;
        const fileObj = (_a = fileList === null || fileList === void 0 ? void 0 : fileList['files']) === null || _a === void 0 ? void 0 : _a[0];
        if (!fileObj) {
            return;
        }
        this.isUploading = true;
        this.rdtAppListService.uploadApplication(fileObj, ['.apk', '.ipa']).subscribe((options) => {
            this.applicationOpt = options || [];
            if (this.applicationOpt.length > 0) {
                this.selectedApp = this.applicationOpt[0];
            }
            this.isUploading = false;
            formRef === null || formRef === void 0 ? void 0 : formRef.clear();
        }, (error) => {
            this.isUploading = false;
            formRef === null || formRef === void 0 ? void 0 : formRef.clear();
            this.utilservice.warnMessage((error === null || error === void 0 ? void 0 : error.message) || 'Failed to upload application.');
        });
    }
};
ScriptRecorderComponent.ctorParameters = () => [
    { type: src_app_shared_header_work_profile_services_work_profile_active_service__WEBPACK_IMPORTED_MODULE_9__["WorkProfileActiveService"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_4__["ConfirmationService"] },
    { type: _services_script_utils_service__WEBPACK_IMPORTED_MODULE_7__["ScriptUtilService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] },
    { type: src_app_core_session_session_service__WEBPACK_IMPORTED_MODULE_5__["SessionService"] },
    { type: _services_script_rest_service__WEBPACK_IMPORTED_MODULE_6__["ScriptRestService"] },
    { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["DomSanitizer"] },
    { type: _netocean_services_netocean_config_service__WEBPACK_IMPORTED_MODULE_10__["NetoceanConfig"] },
    { type: _load_test_services_load_test_utils_service__WEBPACK_IMPORTED_MODULE_11__["LoadTestUtilsService"] },
    { type: _netocean_services_netocean_common_service__WEBPACK_IMPORTED_MODULE_12__["NetoceanCommonService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["ActivatedRoute"] },
    { type: src_app_shared_common_services_rdt_app_list_service__WEBPACK_IMPORTED_MODULE_15__["RdtAppListService"] }
];
ScriptRecorderComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-script-recorder',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./script-recorder.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/script-manager/script-recorder/script-recorder.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./script-recorder.component.scss */ "./src/app/pages/home/script-manager/script-recorder/script-recorder.component.scss")).default]
    })
], ScriptRecorderComponent);



/***/ }),

/***/ "./src/app/pages/home/script-manager/script-recorder/script-recorder.module.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/pages/home/script-manager/script-recorder/script-recorder.module.ts ***!
  \*************************************************************************************/
/*! exports provided: ScriptRecorderModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScriptRecorderModule", function() { return ScriptRecorderModule; });
/* 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 primeng__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var primeng_dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
/* harmony import */ var primeng_autocomplete__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/autocomplete */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-autocomplete.js");
/* harmony import */ var _script_recorder_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./script-recorder.component */ "./src/app/pages/home/script-manager/script-recorder/script-recorder.component.ts");
/* harmony import */ var primeng_radiobutton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js");
/* harmony import */ var primeng_table__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _angular_material_menu__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @angular/material/menu */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! primeng/confirmdialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");















const routes = [
    {
        path: '',
        component: _script_recorder_component__WEBPACK_IMPORTED_MODULE_6__["ScriptRecorderComponent"],
    },
    {
        path: 'recordServices',
        loadChildren: () => Promise.all(/*! import() | netocean-components-netocean-record-services-netocean-record-services-module */[__webpack_require__.e("default~components-netocean-record-services-netocean-record-services-module~netocean-components-neto~5c63c60d"), __webpack_require__.e("default~netocean-components-netocean-record-services-netocean-record-services-module~netocean-netocean-module")]).then(__webpack_require__.bind(null, /*! ./../../netocean/components/netocean-record-services/netocean-record-services.module */ "./src/app/pages/home/netocean/components/netocean-record-services/netocean-record-services.module.ts")).then((m) => m.NetoceanRecordServicesModule)
    }
];
let ScriptRecorderModule = class ScriptRecorderModule {
};
ScriptRecorderModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_script_recorder_component__WEBPACK_IMPORTED_MODULE_6__["ScriptRecorderComponent"]],
        exports: [_script_recorder_component__WEBPACK_IMPORTED_MODULE_6__["ScriptRecorderComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["ButtonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["AccordionModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["ToastModule"],
            primeng_dialog__WEBPACK_IMPORTED_MODULE_4__["DialogModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["InputTextModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["CheckboxModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["FileUploadModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["FieldsetModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["DropdownModule"],
            primeng_autocomplete__WEBPACK_IMPORTED_MODULE_5__["AutoCompleteModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["PanelModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["InputSwitchModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["SelectButtonModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["ToggleButtonModule"],
            primeng_radiobutton__WEBPACK_IMPORTED_MODULE_7__["RadioButtonModule"],
            primeng_table__WEBPACK_IMPORTED_MODULE_8__["TableModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["TooltipModule"],
            _angular_forms__WEBPACK_IMPORTED_MODULE_9__["FormsModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["InputNumberModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["OverlayPanelModule"],
            _angular_material_menu__WEBPACK_IMPORTED_MODULE_10__["MatMenuModule"],
            primeng_confirmdialog__WEBPACK_IMPORTED_MODULE_12__["ConfirmDialogModule"],
            primeng__WEBPACK_IMPORTED_MODULE_3__["InputTextareaModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_11__["RouterModule"].forChild(routes),
            src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_13__["HelpModule"],
            src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_14__["CavTableModule"]
        ]
    })
], ScriptRecorderModule);



/***/ }),

/***/ "./src/app/shared/common-services/rdt-app-list.service.ts":
/*!****************************************************************!*\
  !*** ./src/app/shared/common-services/rdt-app-list.service.ts ***!
  \****************************************************************/
/*! exports provided: RdtAppListService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RdtAppListService", function() { return RdtAppListService; });
/* 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");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
/* harmony import */ var src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/pages/home/script-manager/services/script-rest.service */ "./src/app/pages/home/script-manager/services/script-rest.service.ts");
/* harmony import */ var src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/app/pages/home/script-manager/services/script.state */ "./src/app/pages/home/script-manager/services/script.state.ts");






let RdtAppListService = class RdtAppListService {
    constructor(scriptRestService) {
        this.scriptRestService = scriptRestService;
        this.applicationOpt = [];
        this.defaultAllowedExtensions = ['.apk', '.ipa'];
    }
    normalizeAllowedExtensions(allowedExtensions) {
        const source = Array.isArray(allowedExtensions) && allowedExtensions.length > 0
            ? allowedExtensions
            : this.defaultAllowedExtensions;
        return source
            .map((ext) => (ext || '').trim().toLowerCase())
            .filter((ext) => ext.startsWith('.'));
    }
    extractFileExtension(fileName) {
        const normalizedName = (fileName || '').trim().toLowerCase();
        const lastDotIdx = normalizedName.lastIndexOf('.');
        if (lastDotIdx < 0) {
            return '';
        }
        return normalizedName.substring(lastDotIdx);
    }
    isAllowedAppFile(fileName, allowedExtensions) {
        const ext = this.extractFileExtension(fileName);
        if (!ext) {
            return false;
        }
        return this.normalizeAllowedExtensions(allowedExtensions).includes(ext);
    }
    getAcceptString(allowedExtensions) {
        return this.normalizeAllowedExtensions(allowedExtensions).join(',');
    }
    uploadApplication(fileObj, allowedExtensions) {
        if (!fileObj || !fileObj.name) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(() => new Error('No file selected for upload.'));
        }
        if (!this.isAllowedAppFile(fileObj.name, allowedExtensions)) {
            const acceptText = this.getAcceptString(allowedExtensions);
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(() => new Error(`Invalid file type. Allowed type(s): ${acceptText}`));
        }
        const formData = new FormData();
        formData.append('file', fileObj, fileObj.name);
        const payload = {
            appID: '',
            appName: fileObj.name
        };
        return this.scriptRestService.uploadFile('RDT/app', formData).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])((uploadState) => {
            if (!(uploadState instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
                return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
            }
            return this.scriptRestService.rdtOperation(payload, 'UPLOAD');
        }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["switchMap"])((registerState) => {
            var _a;
            if (!(registerState instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
                return rxjs__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
            }
            let uploadRes = {};
            try {
                uploadRes = JSON.parse(((_a = registerState.data) === null || _a === void 0 ? void 0 : _a.res) || '{}');
            }
            catch (e) {
                uploadRes = {};
            }
            if (uploadRes === null || uploadRes === void 0 ? void 0 : uploadRes.error) {
                return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["throwError"])(() => new Error(uploadRes.error));
            }
            return this.getApplicationOptions(true);
        }));
    }
    getApplicationOptions(forceRefresh = false) {
        if (!forceRefresh && this.applicationOpt.length > 0) {
            return Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["of"])([...this.applicationOpt]);
        }
        const payload = {
            appID: '',
            appName: ''
        };
        return this.scriptRestService.rdtOperation(payload, 'LIST').pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_3__["map"])((state) => {
            var _a;
            if (!(state instanceof src_app_pages_home_script_manager_services_script_state__WEBPACK_IMPORTED_MODULE_5__["ScriptRestLoaded"])) {
                return this.applicationOpt;
            }
            let res = [];
            try {
                res = JSON.parse(((_a = state.data) === null || _a === void 0 ? void 0 : _a.res) || '[]');
            }
            catch (e) {
                res = [];
            }
            this.applicationOpt = (Array.isArray(res) ? res : []).map((element) => ({
                label: `${(element === null || element === void 0 ? void 0 : element.app_name) || ''}(${(element === null || element === void 0 ? void 0 : element.app_version) || ''})`,
                value: (element === null || element === void 0 ? void 0 : element.app_url) || ''
            }));
            return this.applicationOpt;
        }));
    }
};
RdtAppListService.ctorParameters = () => [
    { type: src_app_pages_home_script_manager_services_script_rest_service__WEBPACK_IMPORTED_MODULE_4__["ScriptRestService"] }
];
RdtAppListService = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
        providedIn: 'root'
    })
], RdtAppListService);



/***/ })

}]);