(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-configuracoes-interface-appa-infoger-interface-appa-infoger-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.html":
/*!*************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.html ***!
  \*************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [itemData]=\"data.filialId\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <app-form-legenda></app-form-legenda>\n            <div class=\"card-body widget-body\">\n                <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"_onSubmit(f)\">\n                    <app-validacoes></app-validacoes>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <app-card-container tituloCard=\"integracaoAppaInfoger\">\n                                <div class=\"row mt-2\">\n                                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                                        <div class=\"form-group form-group-sm form-inline\">\n                                            <label for=\"appaPrefixo\" style=\"align-self: center;\">{{\"labels.prefixoId\"\n                                                |\n                                                translate }}</label>\n                                            <input id=\"appaPrefixo\" name=\"prefixoId\" [(ngModel)]=\"data.appaPrefixo\"\n                                                currencyMask maxlength=\"3\"\n                                                class=\"form-control form-control-sm input-inline-middle ml-2\"\n                                                type=\"text\" [options]=\"funcoesService.optionCurrency(0)\"\n                                                style=\"width: 75px;\">\n                                        </div>\n                                    </div>\n                                    <div class=\"col-lg-3 col-md-3 col-md-12\">\n                                        <div class=\"custom-control custom-checkbox\">\n                                            <input id=\"appaAtivo\" name=\"ativo\" [ngModel]=\"data.appaAtivo === 'S'\"\n                                                (ngModelChange)=\"data.appaAtivo=$event?'S':'N'\"\n                                                class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                                            <label class=\"custom-control-label\" for=\"appaAtivo\">{{'labels.ativo' |\n                                                translate}}</label>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row mt-2\">\n                                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label class=\"mr-2\" for=\"appaTpAmb\">{{\n                                                \"labels.ambiente\" | translate\n                                                }}</label>\n                                            <select id=\"appaTpAmb\" name=\"ambiente\" [(ngModel)]=\"data.appaTpAmb\"\n                                                class=\"form-control form-control-sm\">\n                                                <option value=\"1\">\n                                                    {{ \"labels.producao\" | translate }}\n                                                </option>\n                                                <option value=\"2\">\n                                                    {{ \"labels.homologacao\" | translate }}\n                                                </option>\n                                            </select>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaCodTerm\">{{'labels.codTerminal' |\n                                                translate}}</label>\n                                            <input id=\"appaCodTerm\" name=\"codTerminal\" [(ngModel)]=\"data.appaCodTerm\"\n                                                maxlength=\"10\" class=\"form-control form-control-sm\" type=\"text\"\n                                                (keypress)=\"apenasNumeros($event)\">\n                                        </div>\n                                    </div>\n                                    <div class=\"form-inline mt-3\">\n                                        <label for=\"appaCodTerm\">({{'labels.somenteNumeros' | translate}})</label>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaCnpj\">{{'labels.cnpjTerminal' |\n                                                translate}}</label>\n                                            <input id=\"appaCnpj\" name=\"cnpjTerminal\" [(ngModel)]=\"data.appaCnpj\"\n                                                class=\"form-control form-control-sm\" type=\"text\" cnpjFormat\n                                                (blur)=\"validaCpfCnpj('cnpj')\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-3 col-md-3 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaCpf\">{{'labels.cpfResponsavel' |\n                                                translate}}</label>\n                                            <input id=\"appaCpf\" name=\"cpfResponsavel\" [(ngModel)]=\"data.appaCpf\"\n                                                cpfFormat class=\"form-control form-control-sm\" type=\"text\"\n                                                (blur)=\"validaCpfCnpj('cpf')\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaChave\">{{'labels.chaveDeAcesso' |\n                                                translate}}</label>\n                                            <input id=\"appaChave\" name=\"chaveDeAcesso\" [(ngModel)]=\"data.appaChave\"\n                                                maxlength=\"32\" class=\"form-control form-control-sm\" type=\"text\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaUrlPrd\">{{'labels.appaUrlPrd' |\n                                                translate}}</label>\n                                            <input id=\"appaUrlPrd\" name=\"appaUrlPrd\" [(ngModel)]=\"data.appaUrlPrd\"\n                                                maxlength=\"150\" class=\"form-control form-control-sm\" type=\"text\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaUrlHom\">{{'labels.appaUrlHom' |\n                                                translate}}</label>\n                                            <input id=\"appaUrlHom\" name=\"appaUrlHom\" [(ngModel)]=\"data.appaUrlHom\"\n                                                maxlength=\"150\" class=\"form-control form-control-sm\" type=\"text\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaUrlPrdCon\">{{'labels.appaUrlPrdCon' |\n                                                translate}}</label>\n                                            <input id=\"appaUrlPrdCon\" name=\"appaUrlPrdCon\"\n                                                [(ngModel)]=\"data.appaUrlPrdCon\" maxlength=\"150\"\n                                                class=\"form-control form-control-sm\" type=\"text\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"row\">\n                                    <div class=\"col-lg-8 col-md-8 col-sm-12\">\n                                        <div class=\"form-group form-group-sm\">\n                                            <label for=\"appaUrlHomCon\">{{'labels.appaUrlHomCon' |\n                                                translate}}</label>\n                                            <input id=\"appaUrlHomCon\" name=\"appaUrlHomCon\"\n                                                [(ngModel)]=\"data.appaUrlHomCon\" maxlength=\"150\"\n                                                class=\"form-control form-control-sm\" type=\"text\">\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class=\"clearfix\">&nbsp;</div>\n                            </app-card-container>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group\">\n                                <button class=\"btn btn-success mr-2\" type=\"submit\">\n                                    {{ 'buttons.salvar' | translate }}\n                                </button>\n                            </div>\n                        </div>\n                    </div>\n                </form>\n            </div>\n        </div>\n    </div>\n</div>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.ts":
/*!*********************************************************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.ts ***!
  \*********************************************************************************************************************************/
/*! exports provided: InterfaceAppaInfogerFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceAppaInfogerFormComponent", function() { return InterfaceAppaInfogerFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.model */ "./src/app/shared/services/funcoes/configuracao/configuracao.model.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _interface_appa_infoger_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../interface-appa-infoger.constants */ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.constants.ts");
/* harmony import */ var _interface_appa_infoger_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../interface-appa-infoger.model */ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};












var InterfaceAppaInfogerFormComponent = /** @class */ (function (_super) {
    __extends(InterfaceAppaInfogerFormComponent, _super);
    function InterfaceAppaInfogerFormComponent(messageService, configuracao, funcoesService, loginService, permissoesUtils, funcoes, cpfCnpjService) {
        var _this = _super.call(this, new _interface_appa_infoger_constants__WEBPACK_IMPORTED_MODULE_10__["InterfaceAppaInfogerConstants"](), funcoesService) || this;
        _this.messageService = messageService;
        _this.configuracao = configuracao;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.funcoes = funcoes;
        _this.cpfCnpjService = cpfCnpjService;
        _this.data = new _interface_appa_infoger_model__WEBPACK_IMPORTED_MODULE_11__["InterfaceAppaInfoger"]();
        _this.mensagens = [];
        _this.constantes = new _interface_appa_infoger_constants__WEBPACK_IMPORTED_MODULE_10__["InterfaceAppaInfogerConstants"]();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.data.filialId = _this.loginService.getLogin().filialId;
                _this.data.appaPrefixo = _this.configuracao.lerConfig("CTV", "AppaPrefixo");
                _this.data.appaAtivo = _this.configuracao.lerConfig("CTV", "AppaAtivo");
                _this.data.appaTpAmb = _this.configuracao.lerConfig("CTV", "AppaTpAmb");
                _this.data.appaCodTerm = _this.configuracao.lerConfig("CTV", "AppaCodTerm");
                _this.data.appaCnpj = _this.configuracao.lerConfig("CTV", "AppaCnpj");
                _this.data.appaCpf = _this.configuracao.lerConfig("CTV", "AppaCpf");
                _this.data.appaChave = _this.configuracao.lerConfig("CTV", "AppaChave");
                _this.data.appaUrlPrd = _this.configuracao.lerConfig("CTV", "AppaUrlPrd");
                _this.data.appaUrlHom = _this.configuracao.lerConfig("CTV", "AppaUrlHom");
                _this.data.appaUrlPrdCon = _this.configuracao.lerConfig("CTV", "AppaUrlPrdCon");
                _this.data.appaUrlHomCon = _this.configuracao.lerConfig("CTV", "AppaUrlHomCon");
            }
        };
        return _this;
    }
    InterfaceAppaInfogerFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.configuracao.getConfig({
                codRotina: _this.constantes.sisFormularioId,
                configs: _this.constantes.configuracoes
            }, _this.loadConfig);
        }, function () { return _this.permissoesUtils.back(); }, true);
    };
    InterfaceAppaInfogerFormComponent.prototype._onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data.appaCnpj)) {
            if (!this.validaCpfCnpj('cnpj')) {
                return;
            }
        }
        if (this.funcoesService.isNotUndefinedOrNull(this.data.appaCpf)) {
            if (!this.validaCpfCnpj('cpf')) {
                return;
            }
        }
        this.messageService.confirm('titles.interfaceAppaInfoger', 'messages.updateConfigConfirm', null, function () { return _this.onSubmit(); });
    };
    InterfaceAppaInfogerFormComponent.prototype.onSubmit = function () {
        var _this = this;
        var object = new _shared_services_funcoes_configuracao_configuracao_model__WEBPACK_IMPORTED_MODULE_5__["Config"](this.constantes.sisFormularioId);
        object.setConfig(this.data.filialId, 'CTV', 'AppaPrefixo', this.data.appaPrefixo, 'I');
        object.setConfig(this.data.filialId, 'CTV', 'AppaAtivo', this.data.appaAtivo, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaTpAmb', this.data.appaTpAmb, 'I');
        object.setConfig(this.data.filialId, 'CTV', 'AppaCodTerm', this.data.appaCodTerm, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaCnpj', this.data.appaCnpj, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaCpf', this.data.appaCpf, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaChave', this.data.appaChave, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaUrlPrd', this.data.appaUrlPrd, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaUrlHom', this.data.appaUrlHom, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaUrlPrdCon', this.data.appaUrlPrdCon, 'S');
        object.setConfig(this.data.filialId, 'CTV', 'AppaUrlHomCon', this.data.appaUrlHomCon, 'S');
        this.configuracao
            .save(object)
            .subscribe(function (result) {
            if (result.validationResult != null && !result.validationResult.isValid) {
                _this.mensagens = _this.messageService.validationResult(result.validationResult);
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.interfaceAppaInfoger", "messages.configuracaoDe");
            }
        });
    };
    InterfaceAppaInfogerFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    InterfaceAppaInfogerFormComponent.prototype.validaCpfCnpj = function (dados) {
        var cnpjCpf = dados === 'cnpj' ? this.data.appaCnpj.replace(/[^0-9]/g, '') : this.data.appaCpf.replace(/[^0-9]/g, '');
        if (cnpjCpf.trim() !== "") {
            var valid = this.cpfCnpjService.valida_cpf_cnpj(cnpjCpf);
            if (!valid) {
                dados === 'cnpj' ? this.messageService.warning("titles.interfaceAppaInfoger", "messages.cnpjInvalido") : this.messageService.warning("titles.interfaceAppaInfoger", "messages.cpfInvalido");
                return false;
            }
        }
        return true;
    };
    InterfaceAppaInfogerFormComponent.prototype.apenasNumeros = function (event) {
        var charCode = (event.which) ? event.which : event.keyCode;
        if (charCode < 48 || charCode > 57) {
            event.preventDefault();
            return false;
        }
        else {
            return true;
        }
    };
    InterfaceAppaInfogerFormComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_1__["CpfCnpjService"] }
    ]; };
    InterfaceAppaInfogerFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-interface-appa-infoger-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./interface-appa-infoger-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_1__["CpfCnpjService"]])
    ], InterfaceAppaInfogerFormComponent);
    return InterfaceAppaInfogerFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_2__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.constants.ts":
/*!************************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.constants.ts ***!
  \************************************************************************************************/
/*! exports provided: InterfaceAppaInfogerConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceAppaInfogerConstants", function() { return InterfaceAppaInfogerConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var InterfaceAppaInfogerConstants = /** @class */ (function () {
    function InterfaceAppaInfogerConstants() {
        this.sisFormularioId = 35144;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.pemissoes" },
        ];
        this.configuracoes = [];
        this.nomeForm = "titles.interfaceAppaInfoger";
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.configuracoes = [
            {
                sistema: "CTV",
                parametros: [
                    "AppaPrefixo",
                    "AppaAtivo",
                    "AppaTpAmb",
                    "AppaCodTerm",
                    "AppaCnpj",
                    "AppaCpf",
                    "AppaChave",
                    "AppaUrlPrd",
                    "AppaUrlHom",
                    "AppaUrlPrdCon",
                    "AppaUrlHomCon"
                ]
            }
        ];
    }
    return InterfaceAppaInfogerConstants;
}());



/***/ }),

/***/ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.model.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.model.ts ***!
  \********************************************************************************************/
/*! exports provided: InterfaceAppaInfoger */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceAppaInfoger", function() { return InterfaceAppaInfoger; });
/* harmony import */ var _shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var InterfaceAppaInfoger = /** @class */ (function (_super) {
    __extends(InterfaceAppaInfoger, _super);
    function InterfaceAppaInfoger() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return InterfaceAppaInfoger;
}(_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.module.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.module.ts ***!
  \*********************************************************************************************/
/*! exports provided: InterfaceAppaInfogerModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceAppaInfogerModule", function() { return InterfaceAppaInfogerModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _interface_appa_infoger_form_interface_appa_infoger_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interface-appa-infoger-form/interface-appa-infoger-form.component */ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.ts");
/* harmony import */ var _interface_appa_infoger_routing_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interface-appa-infoger.routing.module */ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.routing.module.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var InterfaceAppaInfogerModule = /** @class */ (function () {
    function InterfaceAppaInfogerModule() {
    }
    InterfaceAppaInfogerModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [_interface_appa_infoger_form_interface_appa_infoger_form_component__WEBPACK_IMPORTED_MODULE_3__["InterfaceAppaInfogerFormComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_1__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _interface_appa_infoger_routing_module__WEBPACK_IMPORTED_MODULE_4__["InterfaceAppaInfogerRoutingModule"]
            ]
        })
    ], InterfaceAppaInfogerModule);
    return InterfaceAppaInfogerModule;
}());



/***/ }),

/***/ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.routing.module.ts":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger.routing.module.ts ***!
  \*****************************************************************************************************/
/*! exports provided: InterfaceAppaInfogerRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InterfaceAppaInfogerRoutingModule", function() { return InterfaceAppaInfogerRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _interface_appa_infoger_form_interface_appa_infoger_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interface-appa-infoger-form/interface-appa-infoger-form.component */ "./src/app/pages/configuracoes/interface-appa-infoger/interface-appa-infoger-form/interface-appa-infoger-form.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var MRoutes = [
    {
        path: "",
        component: _interface_appa_infoger_form_interface_appa_infoger_form_component__WEBPACK_IMPORTED_MODULE_3__["InterfaceAppaInfogerFormComponent"],
        data: { breadcrumb: "interfaceAppaInfoger", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create } }
    }
];
var InterfaceAppaInfogerRoutingModule = /** @class */ (function () {
    function InterfaceAppaInfogerRoutingModule() {
    }
    InterfaceAppaInfogerRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], InterfaceAppaInfogerRoutingModule);
    return InterfaceAppaInfogerRoutingModule;
}());



/***/ }),

/***/ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts":
/*!**********************************************************************!*\
  !*** ./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts ***!
  \**********************************************************************/
/*! exports provided: CpfCnpjService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CpfCnpjService", function() { return CpfCnpjService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var CpfCnpjService = /** @class */ (function () {
    function CpfCnpjService() {
        this.mask$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__["BehaviorSubject"]('AA.AAA.AAA/AAAA-00');
    }
    CpfCnpjService.prototype.verifica_cpf_cnpj = function (valor) {
        valor = valor.toString();
        valor = valor.replace(/[^0-9A-Za-z]/g, '');
        if (valor.length === 11) {
            return 'CPF';
        }
        else if (valor.length === 14) {
            return 'CNPJ';
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.valida_cpf = function (valor) {
        if (!valor)
            return true;
        valor = valor.replace(/[^0-9]/g, '');
        if (!/^\d{11}$/.test(valor))
            return false;
        // elimina CPFs inválidos conhecidos (ex: 00000000000, 11111111111 etc.)
        if (/^(\d)\1{10}$/.test(valor))
            return false;
        var digitos = valor.substring(0, 9);
        // calcula 1º DV
        var soma = 0;
        for (var i = 0; i < 9; i++) {
            soma += parseInt(digitos.charAt(i), 10) * (10 - i);
        }
        var resto = soma % 11;
        var dv1 = resto < 2 ? 0 : 11 - resto;
        // calcula 2º DV
        soma = 0;
        var digitosMaisDv1 = digitos + dv1;
        for (var i = 0; i < 10; i++) {
            soma += parseInt(digitosMaisDv1.charAt(i), 10) * (11 - i);
        }
        resto = soma % 11;
        var dv2 = resto < 2 ? 0 : 11 - resto;
        // monta CPF completo calculado
        var cpfCalculado = digitos + dv1.toString() + dv2.toString();
        return valor === cpfCalculado;
    };
    CpfCnpjService.prototype.valida_cnpj = function (cnpj) {
        function calc_digitos_cnpj(digitos) {
            var soma = 0;
            var peso = digitos.length === 12 ? 5 : 6; // 1º DV começa em 5, 2º em 6
            for (var i = 0; i < digitos.length; i++) {
                var char = digitos.charAt(i);
                var valorNumerico = void 0;
                if (/[0-9]/.test(char)) {
                    valorNumerico = parseInt(char, 10);
                }
                else if (/[A-Z]/.test(char)) {
                    valorNumerico = char.charCodeAt(0) - 48; // NT 49/2024
                }
                else {
                    throw new Error("Caractere inv\u00E1lido no CNPJ: '" + char + "'");
                }
                soma += valorNumerico * peso;
                peso--;
                if (peso < 2)
                    peso = 9;
            }
            var resto = soma % 11;
            return resto < 2 ? 0 : 11 - resto;
        }
        cnpj = cnpj.replace(/[^0-9A-Za-z]/g, '').toUpperCase();
        if (!/^[0-9A-Z]{12}[0-9]{2}$/.test(cnpj)) {
            return false;
        }
        var corpo = cnpj.substring(0, 12);
        var dv1Informado = parseInt(cnpj.charAt(12), 10);
        var dv2Informado = parseInt(cnpj.charAt(13), 10);
        var dv1Calculado = calc_digitos_cnpj(corpo);
        var dv2Calculado = calc_digitos_cnpj(corpo + dv1Calculado);
        return dv1Informado === dv1Calculado && dv2Informado === dv2Calculado;
    };
    CpfCnpjService.prototype.valida_cpf_cnpj = function (valor) {
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            return this.valida_cpf(valor);
        }
        else if (valida === 'CNPJ') {
            return this.valida_cnpj(valor);
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.formata_cpf_cnpj = function (valor) {
        var formatado = "";
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            if (this.valida_cpf(valor)) {
                formatado = valor.substr(0, 3) + '.';
                formatado += valor.substr(3, 3) + '.';
                formatado += valor.substr(6, 3) + '-';
                formatado += valor.substr(9, 2) + '';
            }
        }
        else if (valida === 'CNPJ') {
            if (this.valida_cnpj(valor)) {
                formatado = valor.substr(0, 2) + '.';
                formatado += valor.substr(2, 3) + '.';
                formatado += valor.substr(5, 3) + '/';
                formatado += valor.substr(8, 4) + '-';
                formatado += valor.substr(12, 14) + '';
            }
        }
        return formatado;
    };
    CpfCnpjService.prototype.format = function (documento, tipo) {
        var _this = this;
        if (tipo === void 0) { tipo = ''; }
        var valor = documento.replace(/[^a-zA-Z0-9]/g, '') || '';
        setTimeout(function () {
            var novaMask = 'AA.AAA.AAA/AAAA-00';
            if (tipo === 'F') {
                novaMask = '000.000.000-00';
            }
            else if (tipo === 'J') {
                if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            else {
                // tipo vazio
                if (/^[0-9]{11}$/.test(valor)) {
                    novaMask = '000.000.000-00';
                }
                else if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            _this.mask$.next(novaMask);
        });
    };
    CpfCnpjService.prototype.length = function (tipo) {
        if (tipo === 'F') {
            return 14;
        }
        else {
            return 18;
        }
    };
    CpfCnpjService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [])
    ], CpfCnpjService);
    return CpfCnpjService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-configuracoes-interface-appa-infoger-interface-appa-infoger-module.js.map