(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["netocean-config-smtp-settings-netocean-config-smtp-settings-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.html":
/*!*****************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.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=\"ns-scenario netOcean-container\">\n    <div class=\"w-100-p headerSection\">\n        <div class=\"w-100-p mt-5 p-grid py-5 pl-16 p-align-center p-justify-between\">\n        <div class=\"p-grid p-align-center py-5\">\n            <span class=\"font-16 text-uppercase font-weight-700\">SMTP Configuration</span>\n            <span class=\"mx-5\">\n                <button pButton type=\"button\" icon=\"icons8 icons8-help\" class=\"btn-icon\"\n                (click)=\"help.show('SMTPConfiguration', 'SMTP Configuration', 'netOcean')\"></button>\n            </span>\n        </div>\n        </div>\n    </div>\n    <div class=\"w-100-p  border-all border-5 border-radius-3 my-24 px-16 pb-16\">\n        <h3 class=\"text-uppercase w-100-p\" >smtp port</h3>\n\n        <div class=\"p-grid  p-align-center w-100-p\">\n            <div class=\"width-110\">IPv4 Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv4SmtpPort\" class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n            \n            <div class=\"width-110 ml-30 text-center\">IPv4 Secure Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv4SmtpSecurePort\"class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n          \n            <div class=\"width-110 ml-30 text-center\">IPv4 TLS Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv4SmtpTLSPort\"class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n        </div>\n        <div class=\"p-grid  p-align-center w-100-p\">\n            <div class=\"width-110   pl-0\">IPv6 Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv6SmtpPort\" class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n           \n            <div class=\"width-110 ml-30 text-center\">IPv6 Secure Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv6SmtpSecurePort\" class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n            \n            <div class=\"width-110 ml-30 text-center\">IPv6 TLS Ports</div>\n            <div class=\"p-col-1\">\n                <input type=\"text\" [(ngModel)]=\"IPv6SmtpTLSPort\" class=\"w-100-p  \" (input)=\"change($event)\" pInputText>\n            </div>\n            \n\n        </div>\n    </div>\n\n            <!-- ----------end SMTP Port------------- -->\n    <div class=\"w-100-p  border-all border-5 border-radius-3 my-24 px-16 pb-16\">\n        <h3 class=\"text-uppercase w-100-p\" >Service Time</h3>\n        <div class=\"p-grid p-justify-between p-align-center w-100-p\">\n            <div class=\"p-col-fixed pl-0\">Mode</div>\n            <div class=\"p-col-2\">\n                <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{'min-width':'100%'}\" (onChange)=\"modeselect()\"\n                            [options]=\"Mode\" [(ngModel)]=\"modeVal\"></p-dropdown>\n            </div>\n            <div class=\"p-col-fixed pl-0\">Command</div>\n            <div class=\"p-col-2\">\n                <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{'min-width':'100%'}\" [options]=\"Command\"\n                [(ngModel)]=\"commandVal\"></p-dropdown>\n            </div>\n            <div class=\"p-col-fixed pl-0\">Average Time</div>\n            <div class=\"p-col-2\">\n                <div class=\"ui-inputgroup\">\n                    <input pInputText class=\"w-100-p\" [disabled]=\"modeVal == '0'\" type=\"text\" (input)=\"change($event)\" (focusout)=\"validateOneHourTime(averagetime,'averagetime')\"\n                        [(ngModel)]=\"averagetime\" (keypress)=\"this._config.isNumCheck($event)\" pInputText />\n                        <span class=\"ui-inputgroup-addon px-5\">ms</span>   \n                </div>\n            </div>\n            <div class=\"p-col-fixed pl-0\">Maximum Time</div>\n            <div class=\"p-col-2\">\n                <div class=\"ui-inputgroup\">\n                    <input pInputText [disabled]=\"modeVal != '3'\" class=\"w-100-p\" type=\"text\" (input)=\"change($event)\" (focusout)=\"validateOneHourTime(maxtime,'maxtime')\"\n                        [(ngModel)]=\"maxtime\" (keypress)=\"this._config.isNumCheck($event)\" pInputText />\n                        <span class=\"ui-inputgroup-addon px-5\">ms</span> \n                </div>\n            </div>\n            <button pButton class=\"btn-icon\" icon=\"icons8 icons8-add\" pTooltip=\"Add\" type=\"button\" (click)=\"addSvcTimeConfig()\"></button>\n\n        </div>\n      \n        <div class=\"w-100-p my-8\">\n            <cav-table [value]=\"serviceTime\" [headerRelativePath]=\"this._config.headerRelativePathForServiceTime\" [scrollable]=\"true\" [responsive] =\"true\" \n                scrollHeight=\"55px\" (clickButtonEvent)=\"this._config.clickButtonEventForProtocolSettings($event,this.serviceTime)\"></cav-table>\n        </div>\n      \n\n\n    </div>\n\n                <!-- ---------------end Service Time-------------->\n    <div class=\"w-100-p  border-all border-5 border-radius-3 my-24 px-16 pb-16\">\n        <div class=\"w-100-p mt-8 p-grid p-align-center\">\n            <h3 style=\"display:inline\" class=\"text-uppercase \" >Authentication</h3>\n            <!-- <button pButton class=\"btn-icon\" icon=\"icons8 icons8-info\"  type=\"button\" ></button> -->\n            <a  class=\"blueHead clickable ml-10\" style=\"text-decoration: underline;\" (click)=goToUserReg() pTooltip=\"Users can be added from user registration settings under admin section\">\n                User Registration</a>\n        </div>\n        <div class=\"p-col-4 pl-0 p-0 p-grid p-align-center\"> \n            <div class=\"p-col-fixed pl-0\">Mode</div>\n            <div class=\"p-col-8\">\n                <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{'min-width':'100%'}\" [options]=\"authMode\" [(ngModel)]=\"smtpAuthModeVal\"></p-dropdown>\n            </div>\n        </div>\n    </div>\n            <!-- ---------------end Authentication-------------->\n    <div class=\"w-100-p  border-all border-5 border-radius-3 my-24 px-16 pb-16\">\n        <h3  class=\"text-uppercase w-100-p\" >Error Simulation</h3>\n        <div class=\"w-100-p p-grid p-align-center\">\n                <div class=\"p-col-fixed pl-0\">Command</div>\n                <div class=\"p-col-2\">\n                    <p-dropdown dropdownIcon=\"icons8 icons8-expand-arrow\" [style]=\"{'min-width':'100%'}\" [options]=\"Command\"\n                    [(ngModel)]=\"commandSimVal\"></p-dropdown>\n                </div>\n                <div class=\"p-col-fixed ml-30\">Percentage(%)</div>\n                <div class=\"p-col-2\">\n                    <input type=\"text\"class=\"w-100-p  \" (input)=\"change($event)\" pInputText [(ngModel)]=\"simPerVal\">\n                </div>\n                <div class=\"p-col-fixed ml-30\">Response</div>\n                <div class=\"p-col-4\">\n                    <input type=\"text\" class=\"w-100-p  \" (input)=\"change($event)\" pInputText [(ngModel)]=\"simBufVal\">\n                </div>\n                <button pButton class=\"btn-icon\" icon=\"icons8 icons8-add\" pTooltip=\"Add\" type=\"button\" (click)=\"addErrSimConfig()\"></button>\n\n        </div>\n        <div class=\"w-100-p mt-8 \" >\n            <cav-table [value]=\"errorSimulation\" [headerRelativePath]=\"this._config.headerRelativePathForErrorSml\" [scrollable]=\"true\" [responsive] =\"true\" \n                scrollHeight=\"55px\" (clickButtonEvent)=\"this._config.clickButtonEventForProtocolSettings($event,this.errorSimulation)\"></cav-table>\n        </div>\n        \n    </div>\n    <div class=\"p-grid p-justify-end pr-10  my-5\">\n        <button pButton type=\"button\" label=\"Save\" [disabled]=\"!serveObj.$globalConfigPermission\" (click)=\"sendSmtpInfo('')\"\n            class=\"ui-button-rounded mr-16\" [pTooltip]=\"serveObj.saveTooltipConfig\"></button>\n        <button pButton type=\"button\" label=\"Save & Activate\" [disabled]=\"!serveObj.$globalConfigPermission\" (click)=\"sendSmtpInfo('activate')\"\n            class=\"btn-primary-outline mr12\" [pTooltip]=\"serveObj.saveActivateTooltipConfig\"></button>\n    </div>\n</div>\n\n  <p-confirmDialog class=\"confirmdialog\" header=\"Confirmation\" acceptButtonStyleClass=\"ui-button-rounded px-10\"\n    rejectButtonStyleClass=\"ui-button-rounded ui-button-secondary px-10 mx-6\" acceptIcon=\"null\" rejectIcon=\"null\"\n    acceptLabel=\"Yes\" rejectLabel=\"No\"></p-confirmDialog>\n<p-toast key=\"msgs\"></p-toast>\n<app-help #help ></app-help>\n");

/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.scss":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.scss ***!
  \***************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("app-netocean-config-smtp-settings .netOcean-container {\n  max-height: calc(100vh - 102px);\n  overflow: auto;\n}\napp-netocean-config-smtp-settings .ui-dialog-content ul {\n  line-height: 1.7526;\n}");

/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.ts":
/*!*************************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.ts ***!
  \*************************************************************************************************************************/
/*! exports provided: NetoceanConfigSmtpSettingsComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetoceanConfigSmtpSettingsComponent", function() { return NetoceanConfigSmtpSettingsComponent; });
/* 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 primeng__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var _services_netocean_common_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../services/netocean-common.service */ "./src/app/pages/home/netocean/services/netocean-common.service.ts");
/* harmony import */ var _services_netocean_configuration_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../services/netocean-configuration.service */ "./src/app/pages/home/netocean/services/netocean-configuration.service.ts");
/* harmony import */ var primeng_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var _services_manage_services_info_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../services/manage-services-info.service */ "./src/app/pages/home/netocean/services/manage-services-info.service.ts");








let NetoceanConfigSmtpSettingsComponent = class NetoceanConfigSmtpSettingsComponent {
    constructor(serveObj, 
    // private log: Logger,
    _router, _config, _confirm, _manageService, messageService) {
        this.serveObj = serveObj;
        this._router = _router;
        this._config = _config;
        this._confirm = _confirm;
        this._manageService = _manageService;
        this.messageService = messageService;
        this.helpdialog = false;
        this.rtcMode = 'false';
        this.isRtcMode = true;
        this.IPv4SmtpPort = '25';
        this.IPv4SmtpSecurePort = '465';
        this.IPv4SmtpTLSPort = '587';
        this.IPv6SmtpPort = '6825';
        this.IPv6SmtpSecurePort = '6465';
        this.IPv6SmtpTLSPort = '6587';
        this.modeVal = '0';
        this.averagetime = '0';
        this.maxtime = '0';
        this.max_able = true;
        this.avg_able = true;
        this.commandVal = 'GREETING';
        this.commandSimVal = 'GREETING';
        this.simPerVal = '0';
        this.simBufVal = '';
        this.serviceTime = [];
        this.smtpAuthModeVal = '0';
        this.errorSimulation = [];
        this.unsavedChanges = false;
        if (this.serveObj.$mode === '') {
            if (localStorage.getItem('globalHttpSettings') !== null && localStorage.getItem('globalHttpSettings') !== undefined) {
                let txSession = JSON.parse(localStorage.getItem('globalHttpSettings'));
                this.serveObj.$mode = txSession['configurationMode'];
            }
            else {
                this.serveObj.$mode = 'Normal Mode';
            }
        }
        if (this.serveObj.$mode == 'RTC Mode') {
            this.rtcMode = 'true';
            this.isRtcMode = false;
        }
        this.authMode = [];
        this.authMode.push({ label: 'Do Not Enable Auth Login', value: '0' });
        this.authMode.push({ label: 'Enable Auth Login But Do Not Check Validity Of User Name/Password', value: '1' });
        this.authMode.push({ label: 'Enable Auth Login And Check Validity Of User Name/Password', value: '2' });
        this.Mode = [];
        this.Mode.push({ label: 'No Service Time', value: '0' });
        this.Mode.push({ label: 'Exponential Random', value: '1' });
        this.Mode.push({ label: 'Constant', value: '2' });
        this.Mode.push({ label: 'Uniform Distribution', value: '3' });
        this.Command = [];
        this.Command.push({ label: 'GREETING', value: 'GREETING' });
        this.Command.push({ label: 'HELO', value: 'HELO' });
        this.Command.push({ label: 'EHLO', value: 'EHLO' });
        this.Command.push({ label: 'USERNAME', value: 'USERNAME' });
        this.Command.push({ label: 'PASSWORD', value: 'PASSWORD' });
        this.Command.push({ label: 'MAIL', value: 'MAIL' });
        this.Command.push({ label: 'RCPT', value: 'RCPT' });
        this.Command.push({ label: 'DATA', value: 'DATA' });
        this.Command.push({ label: 'RSET', value: 'RSET' });
        this.Command.push({ label: 'NOOP', value: 'NOOP' });
        this.Command.push({ label: 'QUIT', value: 'QUIT' });
        this.Command.push({ label: 'HELP', value: 'HELP' });
        this.Command.push({ label: 'DATA_END', value: 'DATA_END' });
    }
    canDeactivate() {
        if (this.unsavedChanges) {
            const result = confirm('Are you sure you want to navigate? Any unsaved changes will be lost.');
            console.log(result);
            if (!result) {
                this.serveObj.confirmCommandSubject.next(this._router.url);
            }
            return result;
        }
        else {
            return true;
        }
    }
    change(event) {
        this.unsavedChanges = true;
    }
    ngOnInit() {
        // this._config.getGlobalhttpSetting(this.rtcMode);
        this._config.loading = true;
        this._config.getSMTPProtocolInfo();
        this.getGlobalHttpstatus();
        /**get message for RTC */
        // this.serveObj.showRTCmsg();
    }
    validateOneHourTime(inputTime, inputType) {
        switch (inputType) {
            case "averagetime":
                return this.averagetime = this.serveObj.validateOneHourTimeInMS(inputTime);
            case "maxtime":
                return this.maxtime = this.serveObj.validateOneHourTimeInMS(inputTime);
        }
    }
    modeselect() {
        try {
            if (this.serveObj.checkEmpty(this.modeVal) === true) {
                this.max_able = true;
                this.avg_able = true;
                if (this.modeVal === '3') {
                    this.max_able = false;
                    this.avg_able = false;
                }
                if (this.modeVal === '2' || this.modeVal === '1') {
                    this.max_able = true;
                    this.avg_able = false;
                }
            }
            else if (this.serveObj.checkEmpty(this.modeVal) === false || this.modeVal === '0') {
                this.avg_able = true;
                this.max_able = true;
            }
        }
        catch (error) {
            console.error('error in config-service-time-cgi modelselect() ->', error);
        }
    }
    /**get a operation status */
    getGlobalHttpstatus() {
        try {
            this.activeSubscriber = this._config.configProvider$.subscribe(result => {
                if (this._config.action == 'GETSMTPSETTINGS') {
                    this._config.loading = false;
                    this.serviceTime = [];
                    this.errorSimulation = [];
                    if (result['serviceTime'] != undefined && result['serviceTime'].length != 0 && result['serviceTime'][0].mode != undefined) {
                        this.serviceTime = result['serviceTime'];
                    }
                    if (result['errorSimulation'] != undefined && result['errorSimulation'].length != 0 && result['errorSimulation'][0].command != undefined) {
                        this.errorSimulation = result['errorSimulation'];
                    }
                    if (result['authentication'] != undefined && result['authentication'].mode != undefined) {
                        this.smtpAuthModeVal = result['authentication'].mode;
                    }
                    if (result['smtpPorts'] != undefined) {
                        if (result['smtpPorts'].IPV4 != undefined)
                            this.IPv4SmtpPort = result['smtpPorts'].IPV4;
                        if (result['smtpPorts'].IPV4SSL != undefined)
                            this.IPv4SmtpSecurePort = result['smtpPorts'].IPV4SSL;
                        if (result['smtpPorts'].IPV4TLS != undefined)
                            this.IPv4SmtpTLSPort = result['smtpPorts'].IPV4TLS;
                        if (result['smtpPorts'].IPV6 != undefined)
                            this.IPv6SmtpPort = result['smtpPorts'].IPV6;
                        if (result['smtpPorts'].IPV6SSL != undefined)
                            this.IPv6SmtpSecurePort = result['smtpPorts'].IPV6SSL;
                        if (result['smtpPorts'].IPV6TLS != undefined)
                            this.IPv6SmtpTLSPort = result['smtpPorts'].IPV6TLS;
                    }
                }
                if (this._config.action == 'SETSMTPSETTINGS') {
                    this._config.loading = false;
                    this.messageService.clear();
                    if (result['status'] == true) {
                        this.messageService.add({ key: 'msgs', severity: 'success', summary: 'Saved Successfully', detail: 'SMTP Settings saved successfully' });
                        ;
                        if (this.isRestart == "activate") {
                            this._config.isEnabledSpinner = true;
                            this._manageService.activateHPD();
                        }
                    }
                    else {
                        this.messageService.add({ key: 'msgs', severity: 'error', summary: 'Error', detail: 'Error in Saving SMTP Settings' });
                    }
                }
            });
        }
        catch (error) {
            console.error('error in getting git fields', error);
        }
    }
    /**add a service time configuration fields */
    addSvcTimeConfig() {
        try {
            if (this.modeVal == '0') {
                this.averagetime = '';
            }
            if (this.modeVal != '3') {
                this.maxtime = '';
            }
            if (this.modeVal == '3' && parseInt(this.averagetime) >= parseInt(this.maxtime)) {
                this._config.alertMessage = 'Maximum time should be greater than average time';
                this._config.isAlert = true;
                return false;
            }
            this.serviceTime = this.serviceTime.concat({
                mode: this.modeVal,
                command: this.commandVal,
                avgTime: this.averagetime,
                maxTime: this.maxtime
            });
            this.modeVal = '0';
            this.commandVal = 'GREETING';
            this.averagetime = '0';
            this.maxtime = '0';
        }
        catch (error) {
            console.error('Error in adding Service Time configuration fields', error);
        }
    }
    /**add a Error simulation configuration fields */
    addErrSimConfig() {
        try {
            if (parseInt(this.simPerVal) > 100) {
                this._config.alertMessage = 'Please Enter Error Simulation Percentage Within the Range(0-100)%';
                this._config.isAlert = true;
                return false;
            }
            if (this.simBufVal == '') {
                this._config.alertMessage = 'Please Enter Error Simulation Response Message';
                this._config.isAlert = true;
                return false;
            }
            if (this.simBufVal.length > 1023) {
                this._config.alertMessage = 'Response length must be less than 1024 character!';
                this._config.isAlert = true;
                return false;
            }
            this.errorSimulation = this.errorSimulation.concat({
                command: this.commandSimVal,
                percentage: this.simPerVal,
                replyBuf: this.simBufVal
            });
            this.commandSimVal = 'GREETING';
            this.simPerVal = '0';
            this.simBufVal = '';
        }
        catch (error) {
            console.error('Error in adding Error simulation configuration fields', error);
        }
    }
    validateGlobalSettings() {
        try {
            ////this.log.debug('validating the global http settings');
            if (this.serveObj.$mode != 'RTC Mode' && this.IPv4SmtpPort == '') {
                this._config.alertMessage = 'Please Enter IPV4 Ports';
                this._config.isAlert = true;
                return false;
            }
            else if (this.IPv4SmtpSecurePort == '' && this.serveObj.$mode != 'RTC Mode') {
                this._config.alertMessage = 'Please Enter IPV4 Secure Ports';
                this._config.isAlert = true;
                return false;
            }
            else if (this.IPv4SmtpTLSPort == '' && this.serveObj.$mode != 'RTC Mode') {
                this._config.alertMessage = 'Please Enter IPV4 TLS Ports';
                this._config.isAlert = true;
                return false;
            }
            else if (this.IPv6SmtpPort == '' && this.serveObj.$mode != 'RTC Mode') {
                this._config.alertMessage = 'Please Enter IPV6 Ports';
                this._config.isAlert = true;
                return false;
            }
            else if (this.IPv6SmtpSecurePort == '' && this.serveObj.$mode != 'RTC Mode') {
                this._config.alertMessage = 'Please Enter IPV6 Secure Ports';
                this._config.isAlert = true;
                return false;
            }
            else if (this.IPv6SmtpTLSPort == '' && this.serveObj.$mode != 'RTC Mode') {
                this._config.alertMessage = 'Please Enter IPV6 TLS Ports';
                this._config.isAlert = true;
                return false;
            }
            return true;
        }
        catch (error) {
            console.error('error in validating the fields');
        }
    }
    validateGlobalSettingsVal() {
        try {
            ////this.log.debug('validating the global http settings');
            if (parseInt(this.IPv4SmtpPort) <= 0 || parseInt(this.IPv4SmtpPort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV4 Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            else if (parseInt(this.IPv4SmtpSecurePort) <= 0 || parseInt(this.IPv4SmtpSecurePort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV4 Secure Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            else if (parseInt(this.IPv4SmtpTLSPort) <= 0 || parseInt(this.IPv4SmtpTLSPort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV4 TLS Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            else if (parseInt(this.IPv6SmtpPort) <= 0 || parseInt(this.IPv6SmtpPort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV6 Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            else if (parseInt(this.IPv6SmtpSecurePort) <= 0 || parseInt(this.IPv6SmtpSecurePort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV6 Secure Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            else if (parseInt(this.IPv6SmtpTLSPort) <= 0 || parseInt(this.IPv6SmtpTLSPort) > 65535) {
                this._config.alertMessage = 'Please Enter IPV6 TLS Ports In The Range(0 to 65535)';
                this._config.isAlert = true;
                return false;
            }
            return true;
        }
        catch (error) {
            console.error('error in validating the fields');
        }
    }
    ngOnDestroy() {
        this._config.loading = false;
        if (this.smtpSubscription != null)
            this.smtpSubscription.unsubscribe();
        if (this.activeSubscriber != undefined)
            this.activeSubscriber.unsubscribe();
        this._manageService.action = "";
    }
    /**send a json data for set SMTP settings */
    sendSmtpInfo(data) {
        try {
            // this.log.debug('json data for SMTP settings');
            this.isRestart = data;
            if (this.validateGlobalSettings() == false) {
                return false;
            }
            if (this.validateGlobalSettingsVal() == false) {
                return false;
            }
            let smtpPorts = {
                'IPV4': this.IPv4SmtpPort,
                'IPV4SSL': this.IPv4SmtpSecurePort,
                'IPV4TLS': this.IPv4SmtpTLSPort,
                'IPV6': this.IPv6SmtpPort,
                'IPV6SSL': this.IPv6SmtpSecurePort,
                'IPV6TLS': this.IPv6SmtpTLSPort,
            };
            let authenticationFields = {
                'mode': this.smtpAuthModeVal,
            };
            let smtpContent = {
                'smtpPorts': smtpPorts,
                'serviceTime': this.serviceTime,
                'authentication': authenticationFields,
                'errorSimulation': this.errorSimulation
            };
            this._config.loading = true;
            this._config.setSMTPSettings(smtpContent);
            this.modeVal = '0';
            this.commandVal = 'GREETING';
            this.averagetime = '0';
            this.maxtime = '0';
            this.commandSimVal = 'GREETING';
            this.simPerVal = '0';
            this.simBufVal = '';
            this.unsavedChanges = false;
        }
        catch (error) {
            console.error('error in making json data', error);
        }
    }
    goToUserReg() {
        try {
            this.serveObj.userAuthBackBtnParent = 'smtp';
            this._router.navigate(['home/net-ocean/globalHttpMain/userAuthenticationSettings']);
        }
        catch (error) {
            console.error('error in navigation', error);
        }
    }
};
NetoceanConfigSmtpSettingsComponent.ctorParameters = () => [
    { type: _services_netocean_common_service__WEBPACK_IMPORTED_MODULE_3__["NetoceanCommonService"] },
    { type: _angular_router__WEBPACK_IMPORTED_MODULE_6__["Router"] },
    { type: _services_netocean_configuration_service__WEBPACK_IMPORTED_MODULE_4__["NetoceanConfigurationService"] },
    { type: primeng__WEBPACK_IMPORTED_MODULE_2__["ConfirmationService"] },
    { type: _services_manage_services_info_service__WEBPACK_IMPORTED_MODULE_7__["ManageServicesInfoService"] },
    { type: primeng_api__WEBPACK_IMPORTED_MODULE_5__["MessageService"] }
];
NetoceanConfigSmtpSettingsComponent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
        selector: 'app-netocean-config-smtp-settings',
        template: Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! raw-loader!./netocean-config-smtp-settings.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.html")).default,
        encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
        styles: [Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__importDefault"])(__webpack_require__(/*! ./netocean-config-smtp-settings.component.scss */ "./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.scss")).default]
    })
], NetoceanConfigSmtpSettingsComponent);



/***/ }),

/***/ "./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.module.ts":
/*!**********************************************************************************************************************!*\
  !*** ./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.module.ts ***!
  \**********************************************************************************************************************/
/*! exports provided: onMonacoLoad, NetoceanConfigSmtpSettingsModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onMonacoLoad", function() { return onMonacoLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NetoceanConfigSmtpSettingsModule", function() { return NetoceanConfigSmtpSettingsModule; });
/* 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 _netocean_config_smtp_settings_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./netocean-config-smtp-settings.component */ "./src/app/pages/home/netocean/components/netocean-config-smtp-settings/netocean-config-smtp-settings.component.ts");
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
/* harmony import */ var _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/material/checkbox */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/checkbox.js");
/* harmony import */ var _angular_material_menu__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/material/menu */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/menu.js");
/* harmony import */ var _angular_material_radio__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/material/radio */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/radio.js");
/* harmony import */ var _angular_material_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/material/select */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/select.js");
/* harmony import */ var _angular_material_tabs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/material/tabs */ "./node_modules/@angular/material/__ivy_ngcc__/fesm2015/tabs.js");
/* harmony import */ var primeng__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! primeng */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng.js");
/* harmony import */ var src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! src/app/shared/help/help.module */ "./src/app/shared/help/help.module.ts");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
/* harmony import */ var ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ngx-monaco-editor */ "./node_modules/ngx-monaco-editor/__ivy_ngcc__/fesm2015/ngx-monaco-editor.js");
/* harmony import */ var _pipes_netocean_pipe_module__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../pipes/netocean-pipe.module */ "./src/app/pages/home/netocean/components/pipes/netocean-pipe.module.ts");
/* harmony import */ var _interfaces_confirmUnsavedChangesroutingguard__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../interfaces/confirmUnsavedChangesroutingguard */ "./src/app/pages/home/netocean/interfaces/confirmUnsavedChangesroutingguard.ts");
/* harmony import */ var src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! src/app/shared/cav-table/cav-table.module */ "./src/app/shared/cav-table/cav-table.module.ts");

















function onMonacoLoad() {
    console.log(window.monaco);
    return window.monaco;
}
const monacoConfig = {
    baseUrl: './assets',
    defaultOptions: { scrollBeyondLastLine: false },
    onMonacoLoad: onMonacoLoad // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.
};
const routes = [
    {
        path: '',
        component: _netocean_config_smtp_settings_component__WEBPACK_IMPORTED_MODULE_3__["NetoceanConfigSmtpSettingsComponent"], canDeactivate: [_interfaces_confirmUnsavedChangesroutingguard__WEBPACK_IMPORTED_MODULE_15__["ConfirmUnsavedChangesGuard"]]
    }
];
let NetoceanConfigSmtpSettingsModule = class NetoceanConfigSmtpSettingsModule {
};
NetoceanConfigSmtpSettingsModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
    Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
        declarations: [_netocean_config_smtp_settings_component__WEBPACK_IMPORTED_MODULE_3__["NetoceanConfigSmtpSettingsComponent"]],
        imports: [
            _angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"],
            _angular_router__WEBPACK_IMPORTED_MODULE_12__["RouterModule"].forChild(routes),
            _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], src_app_shared_help_help_module__WEBPACK_IMPORTED_MODULE_11__["HelpModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DynamicDialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TabMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TreeModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["TieredMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["CalendarModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["InputTextareaModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["AccordionModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["SidebarModule"], ngx_monaco_editor__WEBPACK_IMPORTED_MODULE_13__["MonacoEditorModule"].forRoot(monacoConfig),
            primeng__WEBPACK_IMPORTED_MODULE_10__["SplitButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TooltipModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["MenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToolbarModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TableModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ScrollPanelModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["TabViewModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["CheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["DropdownModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ConfirmDialogModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["FieldsetModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["PanelModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["FileUploadModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToastModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["MultiSelectModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["RadioButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["OverlayPanelModule"], _angular_material_menu__WEBPACK_IMPORTED_MODULE_6__["MatMenuModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["SpinnerModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ToggleButtonModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["OrderListModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["ChipsModule"], _angular_material_radio__WEBPACK_IMPORTED_MODULE_7__["MatRadioModule"], _angular_material_select__WEBPACK_IMPORTED_MODULE_8__["MatSelectModule"], _angular_material_tabs__WEBPACK_IMPORTED_MODULE_9__["MatTabsModule"], _angular_material_checkbox__WEBPACK_IMPORTED_MODULE_5__["MatCheckboxModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["BreadcrumbModule"], primeng__WEBPACK_IMPORTED_MODULE_10__["ProgressBarModule"],
            primeng__WEBPACK_IMPORTED_MODULE_10__["CardModule"], _pipes_netocean_pipe_module__WEBPACK_IMPORTED_MODULE_14__["NetoceanPipeModule"], src_app_shared_cav_table_cav_table_module__WEBPACK_IMPORTED_MODULE_16__["CavTableModule"]
        ],
        providers: [],
        schemas: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["CUSTOM_ELEMENTS_SCHEMA"]]
    })
], NetoceanConfigSmtpSettingsModule);



/***/ })

}]);