(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-cadastro-cadastro-endosso-cadastro-endosso-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.html":
/*!****************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.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\" [formAction]=\"actionForm\" [itemData]=\"data.regEndosso\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\" *ngIf=\"!!data\">\n    <form autocomplete=\"off\" class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n        <app-validacoes></app-validacoes>\n        <app-card-container tituloCard=\"dadosDoEndosso\">\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <app-pesquisa-saldo-lote-deposito id=\"lote\" name=\"lote\" [modalTitle]=\"'lotes'\"\n                                [field]=\"'loteId'\" [options]=\"saldoLoteOptions\" [(ngModel)]=\"data.loteId\"\n                                [disabled]=\"true\">\n                            </app-pesquisa-saldo-lote-deposito>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"destinatarioId\" name=\"destinatarioId\" label=\"comprador\"\n                                    [(ngModel)]=\"data.destinatarioIdCliente\" tipoDestinatario=\"C\"\n                                    [disabled]=\"true\" [inSelected]=\"data.cliente\"\n                                    showCgcCpf=\"true\" showInscricao=\"false\" disabled=\"true\">\n                                </app-pesquisa-destinatario>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\"\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"data.materialId\"\n                                    (outModel)=\"trataMaterial($event)\" [disabled]=\"true\" [inSelected]=\"data.material\"\n                                    [disabled]=\"true\">\n                                </app-pesquisa-material>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-osg id=\"osgComprador\" label=\"osgComprador\" name=\"osgComprador\"\n                                    clienteOuProdutoObrigatorio=\"true\" [(ngModel)]=\"data.numeroOsg\"\n                                    [disabled]=\"true\"\n                                    [destinatarioIdCliente]=\"data?.cliente?.destinatarioId\"\n                                    [materialId]=\"data.materialId\" [inpOsg]=\"data.osg\" disabled=\"true\">\n                                </app-pesquisa-osg>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"periodoDe\">{{\"labels.dtEndosso\" | translate }}</label>\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"data.dtEndosso\" class=\"dataHora\"\n                                    [formatDateTime]=\"mascara.getFormatDataHorMin\" autofocus\n                                    [disabled]=\"true\">\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"ate\">{{\"labels.dtLimite\" | translate }}</label>\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"data.dtLimite\" class=\"dataHora\"\n                                    [formatDateTime]=\"mascara.getFormatDataHorMin\" autofocus\n                                    [disabled]=\"true\">\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"quantidade\">{{'labels.quantidDocto' | translate}}</label>\n                                <input id=\"quantidade\" [(ngModel)]=\"data.quantidade\"\n                                    class=\"form-control form-control-sm\" type=\"text\" name=\"quantidade\" currencyMask\n                                    maxlength=\"15\"\n                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                    [disabled]=\"true\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"col-lg-6 col-md-4 col-sm-4 mt-4\">\n                    <div class=\"col-lg-4 col-md-4 col-sm-4\">\n                        <div class=\"button-container\">\n                            <button class=\"btn btn-success mb-2 w-100\" type=\"submit\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                {{ 'buttons.ok' | translate }}\n                            </button>\n                            <button class=\"btn btn-secondary w-100\" type=\"button\" (click)=\"back()\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                {{ 'buttons.cancelar' | translate }}\n                            </button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </app-card-container>\n        <app-card-container tituloCard=\"destino\">\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"regime\" class=\"required\">{{ \"labels.regime\" | translate }}</label>\n                                <app-combo-padrao name=\"regime\" id=\"regime\" chave=\"Regime\" descricao=\"DescrRegime\"\n                                    ativo=\"true\" tabela=\"RegimeAduaneiro\" [(ngModel)]=\"dataDestino.regime\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" [required]=\"true\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-8 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"grupo\">{{ 'labels.grupo' |\n                                    translate}}</label>\n                                <app-combo-grupo-cliente name=\"grupo\" id=\"grupo\" [(ngModel)]=\"dataDestino.codGrupo\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    (outSelected)=\"trataGrupoCliente($event)\">\n                                </app-combo-grupo-cliente>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-12 d-flex justify-content-between align-items-center\">\n                            <div class=\"custom-control custom-checkbox\">\n                                <input id=\"subLote\" name=\"subLote\" [ngModel]=\"dataDestino.subLote === 'S'\"\n                                    (ngModelChange)=\"dataDestino.subLote=$event?'S':'N'\"\n                                    (change)=\"onCheckboxChange($event)\"\n                                    class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                                <label class=\"custom-control-label\" for=\"subLote\">{{'labels.gerarSubLote' | translate}}</label>\n                            </div>\n                            <div class=\"form-group form-group-sm mt-2\">\n                                <input id=\"novoLote\" [(ngModel)]=\"dataDestino.novoLote\"\n                                    class=\"form-control form-control-sm\" type=\"text\" name=\"novoLote\" maxlength=\"15\"\n                                    disabled>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <app-pesquisa-saldo-lote-deposito id=\"loteExistente\" name=\"loteExistente\" [modalTitle]=\"'lotes'\" [label]=\"'loteExistente'\"\n                                [field]=\"'loteId'\" [options]=\"saldoLoteOptions\" [(ngModel)]=\"dataDestino.loteDest\"\n                                (outSelected)=\"carregaDadosLote(dataDestino.loteDest)\">\n                            </app-pesquisa-saldo-lote-deposito>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"tipoOperacao\">\n                                    {{'labels.tipoOperacao' | translate}}\n                                </label>\n                                <app-combo-tipo-operacao id=\"tipoOperacao\" name=\"tipoOperacao\"\n                                    [(ngModel)]=\"dataDestino.tipoOperacao\" flagAtivo=\"S\">\n                                </app-combo-tipo-operacao>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </app-card-container>\n    </form>\n\n    <app-card-container *ngIf=\"exibirIndex\">\n        <table class=\"table table-striped table-bordered table-hover nowrap table-sm table-responsive\">\n            <thead>\n                <tr>\n                    <th>{{ \"labels.deposito\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.kilos\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.litros\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.kilosD\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.litrosD\" | translate }}</th>\n                </tr>\n            </thead>\n            <tbody>\n                <tr *ngFor=\"let val of dataSegundaIndexTmp; let i = index\" [ngClass]=\"{'info': i === _index}\">\n                    <td class=\"px-200-l\">{{ val?.deposito }}</td>\n                    <td class=\"px-100-r\">{{ val?.kilos | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.litros | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.kilosD | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.litrosD | formatCurrency: 0 }}</td>\n                </tr>\n                <tr *ngIf=\"dataSegundaIndexTmp.length == 0\">\n                    <td colspan=\"5\" class=\"text-center\">{{ 'messages.nenhumRegistroEncontrado' | translate }}</td>\n                </tr>\n            </tbody>\n        </table>\n    </app-card-container>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.html":
/*!****************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.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=\"modal fade\" id=\"modalDados\" tabindex=\"2\" role=\"dialog\" data-backdrop=\"static\">\r\n\t<div class=\"modal-dialog modal-sm\">\r\n\t\t<div class=\"modal-content\">\r\n\t\t\t<form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\r\n\t\t\t\t<div class=\"modal-header\">\r\n\t\t\t\t\t<h4 class=\"modal-title\">{{ 'titles.valores' | translate }}</h4>\r\n\t\t\t\t\t<button type=\"button\" class=\"close\" aria-label=\"Close\" data-dismiss=\"modal\">\r\n\t\t\t\t\t\t<span aria-hidden=\"true\">&times;</span>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-body\" *ngIf=\"!!data\">\r\n\t\t\t\t\t<div class=\"clearfix\">&nbsp;</div>\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t\t<div class=\"card\">\r\n\t\t\t\t\t\t\t\t<div class=\"card-body\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"deposito\">{{'labels.deposito' | translate}}</label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"deposito\" value=\"{{data?.deposito}}\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm\" type=\"text\" name=\"deposito\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdisabled=\"true\">\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"saldoKilos\">{{'labels.saldoKilos' |\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttranslate}}</label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"saldoKilos\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"{{data?.kilos | formatCurrency:0}}\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm\" type=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"saldoKilos\" maxlength=\"15\" disabled=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrencyMask\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"kilos\" class=\"required\">{{'labels.kilos' |\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttranslate}}</label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"kilos\" [(ngModel)]=\"data.kilosD\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm\" type=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"kilos\" maxlength=\"15\" required=\"true\" currencyMask\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-12\">\r\n\t\t\t\t\t\t\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"saldoLitros\">{{'labels.saldoLitros' |\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttranslate}}</label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"saldoLitros\" [(ngModel)]=\"data.litros\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm\" type=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"saldoLitros\" maxlength=\"15\" disabled=\"true\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrencyMask\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"col-lg-6\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"form-group form-group-sm\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label for=\"litros\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[class.required]=\"!desabilitaLitros\">{{'labels.litros'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t| translate}}</label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input id=\"litros\" [(ngModel)]=\"data.litrosD\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass=\"form-control form-control-sm\" type=\"text\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"litros\" maxlength=\"15\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[required]=\"!desabilitaLitros\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"desabilitaLitros\" currencyMask\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modal-footer\">\r\n\t\t\t\t\t<button type=\"submit\" class=\"btn btn-small btn-success\">{{ 'buttons.ok' | translate }}</button>\r\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-small btn-default\" data-dismiss=\"modal\">{{ 'buttons.cancelar' |\r\n\t\t\t\t\t\ttranslate }}</button>\r\n\t\t\t\t</div>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t</div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.component.html":
/*!******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.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=\"modal fade\" id=\"cadastro-endosso-filter\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"uni-modal-dialog-md-45\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ service.title | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate\n                                    }}</label>\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"service.filtro.dataI\" autofocus\n                                    class=\"dataHora\" required=\"true\">\n                                </app-data>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"service.filtro.dataF\" class=\"dataHora\"\n                                    required=\"true\">\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"destinatario\" name=\"destinatario\" tipoDestinatario=\"C\"\n                                    modalTitle=\"pesquisaDeCliente\" label=\"comprador\"\n                                    [(ngModel)]=\"service.filtro.destinatarioIdCliente\" showInscricao=\"false\"\n                                    showCgcCpf=\"false\">\n                                </app-pesquisa-destinatario>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-material id=\"materialId\" name=\"materialId\" label=\"produto\"\n                                    modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"service.filtro.materialId\">\n                                </app-pesquisa-material>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-saldo-lote-deposito id=\"lote\" name=\"lote\" [modalTitle]=\"'lotes'\"\n                                    [field]=\"'loteId'\" [options]=\"saldoLoteOptions\"\n                                    [(ngModel)]=\"service.filtro.loteId\"\n                                    (outSelected)=\"service.carregaDadosLoteFiltro(service.filtro.loteId)\">\n                                </app-pesquisa-saldo-lote-deposito>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"modal-footer\">\n                        <button class=\"btn btn-success mr-1\" type=\"submit\">\n                            {{ 'buttons.pesquisar' | translate }}\n                        </button>\n                        <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">\n                            {{ 'buttons.cancelar' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.html":
/*!**************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-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\" [formAction]=\"actionForm\" [itemData]=\"data.regEndosso\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\" *ngIf=\"!!data\">\n    <form autocomplete=\"off\" class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n        <app-validacoes></app-validacoes>\n        <app-card-container tituloCard=\"\">\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                            <app-pesquisa-saldo-lote-deposito id=\"lote\" name=\"lote\" [modalTitle]=\"'lotes'\"\n                                [field]=\"'loteId'\" [options]=\"saldoLoteOptions\" [(ngModel)]=\"data.loteId\"\n                                (outSelected)=\"carregaDadosLote(data.loteId)\" required=\"true\"\n                                [disabled]=\"funcoesService.isEdit(actionForm) || funcoesService.isDetail(actionForm)\">\n                            </app-pesquisa-saldo-lote-deposito>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"destinatarioId\" name=\"destinatarioId\" label=\"comprador\"\n                                    [(ngModel)]=\"data.destinatarioIdCliente\" tipoDestinatario=\"C\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" [inSelected]=\"data.cliente\"\n                                    showCgcCpf=\"true\" showInscricao=\"false\" required=\"true\">\n                                </app-pesquisa-destinatario>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-input-description label=\"produto\" valueID=\"{{data?.materialId}}\"\n                                    valueDescription=\"{{data?.material?.fantasia}}\"></app-input-description>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-osg id=\"osgComprador\" label=\"osgComprador\" name=\"osgComprador\"\n                                    clienteEProdutoObrigatorio=\"true\" [(ngModel)]=\"data.regOsg\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    [destinatarioIdCliente]=\"data.destinatarioIdCliente\" [materialId]=\"data.materialId\"\n                                    [inpOsg]=\"data.osg\" [required]=\"true\">\n                                </app-pesquisa-osg>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"periodoDe\" class=\"required\">{{\"labels.dataEndosso\" | translate }}</label>\n                                <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"data.dtEndosso\" class=\"dataHora\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    [formatDateTime]=\"mascara.getFormatDataHorMin\" [required]=\"true\" autofocus>\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-12 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"ate\" class=\"required\">{{\"labels.dataLimite\" | translate }}</label>\n                                <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"data.dtLimite\" class=\"dataHora\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    [formatDateTime]=\"mascara.getFormatDataHorMin\" [required]=\"true\"\n                                    (executa)=\"validaDatas()\" autofocus>\n                                </app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"quantidade\" class=\"required\">{{'labels.quantidDocto' | translate}}</label>\n                                <input id=\"quantidade\" [(ngModel)]=\"data.quantidade\"\n                                    class=\"form-control form-control-sm\" type=\"text\" name=\"quantidade\" currencyMask\n                                    maxlength=\"15\" required=\"true\"\n                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                    (blur)=\"carregarTotalTmp($event)\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"col-lg-6 col-md-4 col-sm-4 mt-4\">\n                    <div class=\"col-lg-4 col-md-4 col-sm-4\">\n                        <div class=\"button-container\">\n                            <button class=\"btn btn-success mb-2 w-100\" type=\"submit\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                {{ 'buttons.ok' | translate }}\n                            </button>\n                            <button class=\"btn btn-secondary w-100\" type=\"button\" (click)=\"back()\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                {{ 'buttons.cancelar' | translate }}\n                            </button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </app-card-container>\n    </form>\n\n    <app-card-container *ngIf=\"exibirIndex\">\n        <table class=\"table table-striped table-bordered table-hover nowrap table-sm table-responsive\">\n            <thead>\n                <tr>\n                    <th>{{ \"labels.deposito\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.kilos\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.litros\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.kilosD\" | translate }}</th>\n                    <th class=\"text-right\">{{ \"labels.litrosD\" | translate }}</th>\n                </tr>\n            </thead>\n            <tbody>\n                <tr *ngFor=\"let val of dataSegundaIndexTmp; let i = index\" (click)=\"selected(val, i)\"\n                    (dblclick)=\"_dbClick()\" [ngClass]=\"{'info': i === _index}\">\n                    <td class=\"px-200-l\">{{ val?.deposito }}</td>\n                    <td class=\"px-100-r\">{{ val?.kilos | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.litros | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.kilosD | formatCurrency: 0 }}</td>\n                    <td class=\"px-100-r\">{{ val?.litrosD | formatCurrency: 0 }}</td>\n                </tr>\n                <tr *ngIf=\"dataSegundaIndexTmp.length == 0\">\n                    <td colspan=\"5\" class=\"text-center\">{{ 'messages.nenhumRegistroEncontrado' | translate }}</td>\n                </tr>\n                <tr>\n                    <td></td>\n                    <td colspan=\"2\" class=\"text-right\">{{ 'labels.total' | translate }} {{totalSaldo | formatCurrency: 0}}</td>\n                    <td colspan=\"2\" class=\"text-right\">{{ 'labels.saldo' | translate }} {{diferenca | formatCurrency: 0}}</td>\n                </tr>\n            </tbody>\n        </table>\n    </app-card-container>\n</div>\n\n<app-cadastro-endosso-modal (outConfirma)=\"carregarTotalTmp()\"></app-cadastro-endosso-modal>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.component.html":
/*!****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.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.listaIndex\" [formAction]=\"actionForm\" [itemData]=\"data.regEndosso\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtCadastrosEndosso\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n\n    <table class=\"table table-striped table-bordered table-hover nowrap table-sm mt-5\" *ngIf=\"exibir\">\n        <thead>\n            <tr>\n                <th>{{ \"labels.deposito\" | translate }}</th>\n                <th class=\"text-right\">{{ \"labels.kilos\" | translate }}</th>\n                <th class=\"text-right\">{{ \"labels.litros\" | translate }}</th>\n                <th class=\"text-right\">{{ \"labels.kilosD\" | translate }}</th>\n                <th class=\"text-right\">{{ \"labels.litrosD\" | translate }}</th>\n            </tr>\n        </thead>\n        <tbody>\n            <tr *ngFor=\"let val of dataSegundaIndexTmp\">\n                <td>{{ val?.deposito }}</td>\n                <td class=\"text-right\">{{ val?.kilos | formatCurrency: 0 }}</td>\n                <td class=\"text-right\">{{ val?.litros | formatCurrency: 0 }}</td>\n                <td class=\"text-right\">{{ val?.kilosD | formatCurrency: 0 }}</td>\n                <td class=\"text-right\">{{ val?.litrosD | formatCurrency: 0 }}</td>\n            </tr>\n            <tr *ngIf=\"dataSegundaIndexTmp.length == 0\">\n                <td colspan=\"5\" class=\"text-center\">{{ 'messages.nenhumRegistroEncontrado' | translate }}</td>\n            </tr>\n        </tbody>\n    </table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-cadastro-endosso-filter (filtrar)=\"executaFiltro()\"></app-cadastro-endosso-filter>");

/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.scss":
/*!**************************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.scss ***!
  \**************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("div.card-body {\n  position: relative;\n}\n\ndiv._mask {\n  position: absolute;\n  height: 70%;\n  width: 70%;\n  z-index: 3;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vY2FkYXN0cm8tZW5kb3Nzby9jYWRhc3Ryby1lbmRvc3NvLWNvbmZpcm1hY2FvL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcY2FkYXN0cm9cXGNhZGFzdHJvLWVuZG9zc29cXGNhZGFzdHJvLWVuZG9zc28tY29uZmlybWFjYW9cXGNhZGFzdHJvLWVuZG9zc28tY29uZmlybWFjYW8uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2NhZGFzdHJvL2NhZGFzdHJvLWVuZG9zc28vY2FkYXN0cm8tZW5kb3Nzby1jb25maXJtYWNhby9jYWRhc3Ryby1lbmRvc3NvLWNvbmZpcm1hY2FvLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0VBQ0EsV0FBQTtFQUNBLFVBQUE7RUFDQSxVQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9jYWRhc3Ryby9jYWRhc3Ryby1lbmRvc3NvL2NhZGFzdHJvLWVuZG9zc28tY29uZmlybWFjYW8vY2FkYXN0cm8tZW5kb3Nzby1jb25maXJtYWNhby5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImRpdi5jYXJkLWJvZHkge1xyXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxufVxyXG5cclxuZGl2Ll9tYXNrIHtcclxuICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgaGVpZ2h0OiA3MCU7XHJcbiAgd2lkdGg6IDcwJTtcclxuICB6LWluZGV4OiAzO1xyXG59XHJcbiIsImRpdi5jYXJkLWJvZHkge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG59XG5cbmRpdi5fbWFzayB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgaGVpZ2h0OiA3MCU7XG4gIHdpZHRoOiA3MCU7XG4gIHotaW5kZXg6IDM7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.ts ***!
  \************************************************************************************************************************/
/*! exports provided: CadastrosEndossoConfirmacaoComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoConfirmacaoComponent", function() { return CadastrosEndossoConfirmacaoComponent; });
/* 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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cadastro-endosso.model */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts");
/* harmony import */ var _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../cadastro-endosso.constants */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts");
/* harmony import */ var _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../cadastro-endosso.service */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.ts");
/* harmony import */ var app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/cadastro/grupo-cliente/grupo-cliente.service */ "./src/app/pages/cadastro/grupo-cliente/grupo-cliente.service.ts");
/* harmony import */ var app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/operacao/operacao.service */ "./src/app/pages/cadastro/operacao/operacao.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _lote_lote_model__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../lote/lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var _lote_lote_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/pages/controle/osg/osg.service */ "./src/app/pages/controle/osg/osg.service.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





















var CadastrosEndossoConfirmacaoComponent = /** @class */ (function (_super) {
    __extends(CadastrosEndossoConfirmacaoComponent, _super);
    function CadastrosEndossoConfirmacaoComponent(router, messageService, activatedRoute, serviceOperacao, funcoesService, permissoesUtils, destinatarioService, osgService, materialService, grupoClienteService, service, loteService, configuracao) {
        var _this = _super.call(this, new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__["CadastrosEndossoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.serviceOperacao = serviceOperacao;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.osgService = osgService;
        _this.materialService = materialService;
        _this.grupoClienteService = grupoClienteService;
        _this.service = service;
        _this.loteService = loteService;
        _this.configuracao = configuracao;
        _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoConfirmacao"]();
        _this.dataDestino = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoConfirmacaoDestino"]();
        _this.dataSegundaIndex = [];
        _this.dataSegundaIndexTmp = [];
        _this.dataSubLote = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoLote"]();
        _this.dataValidaTmp = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoValidaTmp"]();
        _this.dataTotalTmp = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoTotalTmpDto"]();
        _this.dataSegundaIndexTmpDados = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoSegundaIndexTmpDados"]();
        _this.mensagens = [];
        _this.constantes = new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__["CadastrosEndossoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/cadastro/cadastrosEndosso";
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_13__["Mascaras"]();
        _this.exibirIndex = false;
        _this.carregarVerificaKilos = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = this;
                        _b = parseInt;
                        return [4 /*yield*/, this.service.getVerificaKilos().toPromise()];
                    case 1:
                        _a.kilos = _b.apply(void 0, [_c.sent(), 10]);
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarSegundaIndex = function (regEndosso) { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDadosSegundaIndex(regEndosso).toPromise()];
                    case 1:
                        _a.dataSegundaIndexTmp = _b.sent();
                        if (this.dataSegundaIndexTmp && this.dataSegundaIndexTmp.length > 0) {
                            this.exibirIndex = true;
                        }
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarSubLote2 = function (lote) { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.service.getSubLote(lote).subscribe(function (resp) {
                    _this.dataDestino.novoLote = resp.lote;
                    if (resp.lote == _this.data.loteId) {
                        _this.dataDestino.novoLote = resp.lote + 'A';
                    }
                    else {
                    }
                });
                return [2 /*return*/];
            });
        }); };
        _this.carregarSubLote = function (lote) { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.service.getSubLote(lote).subscribe(function (resp) {
                    var subLote = resp.lote.trim();
                    if (resp.lote == _this.data.loteId) {
                        _this.dataDestino.novoLote = resp.lote + 'A';
                    }
                    else {
                        var ultimaLetra = subLote.charAt(subLote.length - 1);
                        if (/[A-Za-z]/.test(ultimaLetra)) {
                            var proximaLetra = String.fromCharCode(ultimaLetra.charCodeAt(0) + 1);
                            subLote = subLote.slice(0, -1) + proximaLetra;
                        }
                    }
                    _this.dataDestino.novoLote = subLote;
                });
                return [2 /*return*/];
            });
        }); };
        _this.carregarSegundaIndexTmp = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDadosSegundaIndexTmp().toPromise()];
                    case 1:
                        _a.dataSegundaIndexTmp = _b.sent();
                        if (this.dataSegundaIndexTmp && this.dataSegundaIndexTmp.length > 0) {
                            this.exibirIndex = true;
                        }
                        return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CadastrosEndossoConfirmacaoComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoConfirmacao"]();
            if (id) {
                _this.service.getDataByIdConfirmacao(+id).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        _this.carregarSegundaIndexTmp();
                        _this.dataDestino.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_15__["Lote"]();
                        _this.dataDestino.novoLote = '';
                        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["NumberUtilsStaticService"].isPositive(_this.data.destinatarioIdCliente)) {
                            _this.destinatarioService.getById(_this.data.destinatarioIdCliente).subscribe(function (cliente) {
                                _this.loadCliente(cliente);
                            });
                            _this.osgService.getById(_this.data.regOsg).subscribe(function (osg) {
                                _this.data.osg = osg;
                            });
                            _this.trataMaterial(_this.data.materialId);
                        }
                        else {
                            _this.data.destinatarioIdCliente = null;
                            _this.data.cliente = null;
                        }
                    }
                    else {
                        _this.messageService.warning("titles.cadastrosEndosso", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
            else {
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    CadastrosEndossoConfirmacaoComponent.prototype.onSubmit = function (form) {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("formError").emit(form);
            if (form.invalid) {
                return;
            }
            _this.carregarVerificaKilos();
            if (_this.kilos <= 0) {
                _this.messageService.warning(_this.service.title, "messages.kilosNaoinformado");
                return;
            }
            _this.dataDestino.regEndosso = _this.data.regEndosso;
            _this.data.logRotina = "Cadastro de Endosso";
            _this.service.addDadosConfirmacao(_this.dataDestino).subscribe(function (result) {
                _this.mensagens = _this.messageService.validationResult(result);
                if (!result.isValid) {
                    _this.messageService.error("titles.cadastrosEndosso", "messages.erroNaConfirmacaoDoEndosso");
                    _this.funcoesService.backToTop();
                }
                else {
                    _this.messageService.saveSuccess("titles.cadastrosEndosso");
                    _this.back();
                }
            });
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    CadastrosEndossoConfirmacaoComponent.prototype.trataGrupoCliente = function (grupoCliente) {
        this.dataDestino.grupoCliente = grupoCliente;
    };
    CadastrosEndossoConfirmacaoComponent.prototype.carregarConfig = function () {
        this.permAltDtLimite = this.configuracao.boolean("BAL", "CodBalCheckList");
    };
    CadastrosEndossoConfirmacaoComponent.prototype.trataMaterial = function (materialId) {
        var _this = this;
        this.materialService.getById(materialId).subscribe(function (resp) {
            _this.data.material = resp;
        });
    };
    CadastrosEndossoConfirmacaoComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    CadastrosEndossoConfirmacaoComponent.prototype.loadCliente = function (data) {
        if (!data)
            return;
        this.data.cliente = data;
    };
    CadastrosEndossoConfirmacaoComponent.prototype.onCheckboxChange = function (event) {
        var isChecked = event.target.checked;
        if (isChecked) {
            this.carregarSubLote(this.data);
        }
        else {
            this.dataDestino.novoLote = '';
        }
    };
    CadastrosEndossoConfirmacaoComponent.prototype.carregaDadosLote = function (loteId) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_16__["StringUtilsStaticService"].isNotEmpty(loteId)) {
                    this.loteService.getByLoteId(loteId).subscribe(function (resp) {
                        if (!!resp) {
                            _this.dataDestino.lote = resp;
                        }
                        else {
                            _this.dataDestino.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_15__["Lote"]();
                        }
                    });
                }
                return [2 /*return*/];
            });
        });
    };
    Object.defineProperty(CadastrosEndossoConfirmacaoComponent.prototype, "saldoLoteOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                materialId: this.data.materialId,
                sitLote: 'A',
                modo: 3,
                tipoSaldo: 1,
                dataMovimento: new Date(),
                tipoAgrupa: 'D',
                geraArquivo: 'S'
            };
        },
        enumerable: true,
        configurable: true
    });
    CadastrosEndossoConfirmacaoComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__["OperacaoService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_20__["OsgService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__["MaterialService"] },
        { type: app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__["GrupoClienteService"] },
        { type: _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoService"] },
        { type: _lote_lote_service__WEBPACK_IMPORTED_MODULE_17__["LoteService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_18__["ConfiguracaoFacade"] }
    ]; };
    CadastrosEndossoConfirmacaoComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cadastro-endosso-confirmacao",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cadastro-endosso-confirmacao.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./cadastro-endosso-confirmacao.component.scss */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__["OperacaoService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_20__["OsgService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__["MaterialService"],
            app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__["GrupoClienteService"],
            _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoService"],
            _lote_lote_service__WEBPACK_IMPORTED_MODULE_17__["LoteService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_18__["ConfiguracaoFacade"]])
    ], CadastrosEndossoConfirmacaoComponent);
    return CadastrosEndossoConfirmacaoComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.ts ***!
  \************************************************************************************************************************/
/*! exports provided: CadastrosEndossoDadosModalComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoDadosModalComponent", function() { return CadastrosEndossoDadosModalComponent; });
/* 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 app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cadastro-endosso.service */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.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 __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};









var CadastrosEndossoDadosModalComponent = /** @class */ (function () {
    function CadastrosEndossoDadosModalComponent(router, funcoesService, messageService, service) {
        var _this = this;
        this.router = router;
        this.funcoesService = funcoesService;
        this.messageService = messageService;
        this.service = service;
        this.outConfirma = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mensagens = [];
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["Mascaras"]();
        this.validaKilos = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = this;
                        _b = parseInt;
                        return [4 /*yield*/, this.service.getVerificaKilos().toPromise()];
                    case 1:
                        _a.kilos = _b.apply(void 0, [_c.sent()]);
                        return [2 /*return*/];
                }
            });
        }); };
    }
    CadastrosEndossoDadosModalComponent.prototype.ngOnInit = function () {
    };
    CadastrosEndossoDadosModalComponent.prototype.open = function (data) {
        this.data = app_shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_6__["ObjectUtilsStaticService"].clone(data);
        app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["ModalUtilsStaticService"].openModal("modalDados");
    };
    CadastrosEndossoDadosModalComponent.prototype.onSubmit = function (form) {
        var _this = this;
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        this.validaKilos();
        if (form.invalid) {
            return;
        }
        if (this.data.kilosD < 0) {
            this.messageService.info("titles.cadastrosEndosso", "messages.kilosInvalidos");
            return;
        }
        if (!this.desabilitaLitros && this.data.litros < 0) {
            this.messageService.info("titles.cadastrosEndosso", "messages.litrosInvalidos");
            return;
        }
        if (this.data.kilos < this.data.kilosD) {
            this.messageService.info("titles.cadastrosEndosso", "messages.kilosMaiorSaldoKilos");
            return;
        }
        if (this.data.litros < this.data.litrosD) {
            this.messageService.info("titles.cadastrosEndosso", "messages.litrosMaiorSaldoLitros");
            return;
        }
        if (this.kilos < 0) {
            this.messageService.info("titles.cadastrosEndosso", "messages.kilosNaoInformado");
            return;
        }
        this.service.gravarDadosSegundaGrid(this.data).subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result);
            if (!result.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                _this.funcoesService.backToTop();
            }
            else {
                _this.messageService.saveSuccess("messages.valoresSalvosComSucesso", "titles.cadastrosEndosso");
                _this.outConfirma.emit(_this.data);
                app_shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["ModalUtilsStaticService"].closeModal("modalDados");
            }
        });
    };
    Object.defineProperty(CadastrosEndossoDadosModalComponent.prototype, "desabilitaLitros", {
        get: function () {
            return (!['LT', 'CC'].includes(this.service.dataValidaTmp.unidade));
        },
        enumerable: true,
        configurable: true
    });
    CadastrosEndossoDadosModalComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], CadastrosEndossoDadosModalComponent.prototype, "outConfirma", void 0);
    CadastrosEndossoDadosModalComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cadastro-endosso-modal",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cadastro-endosso-dados-modal.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoService"]])
    ], CadastrosEndossoDadosModalComponent);
    return CadastrosEndossoDadosModalComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.component.ts ***!
  \**************************************************************************************************************/
/*! exports provided: CadastrosEndossoFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoFilterComponent", function() { return CadastrosEndossoFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../cadastro-endosso.constants */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts");
/* harmony import */ var _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cadastro-endosso.model */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts");
/* harmony import */ var _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../cadastro-endosso.service */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.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 __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 CadastrosEndossoFilterComponent = /** @class */ (function () {
    function CadastrosEndossoFilterComponent(service, message) {
        this.service = service;
        this.message = message;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.constantes = new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_4__["CadastrosEndossoConstants"]();
    }
    CadastrosEndossoFilterComponent.prototype.ngOnInit = function () {
        if (!this.service.filtro) {
            this.service.filtro = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndossoFilter"]();
        }
    };
    CadastrosEndossoFilterComponent.prototype.onSubmit = function (form) {
        if (!this.validaData()) {
            return;
        }
        if (!form.invalid) {
            this.filtrar.emit();
            jQuery("#cadastro-endosso-filter").modal("hide");
        }
    };
    CadastrosEndossoFilterComponent.prototype.validaData = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["DateTimeUtilsStaticService"].menorA(this.service.filtro.dataF, this.service.filtro.dataI, ['H', 'M'])) {
            this.message.warning(this.service.title, "messages.periodoDeMaiorQueAte");
            return false;
        }
        return true;
    };
    Object.defineProperty(CadastrosEndossoFilterComponent.prototype, "saldoLoteOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.service.filtro.destinatarioIdCliente,
                materialId: this.service.filtro.materialId,
                sitLote: 'A',
                modo: 5,
                tipoSaldo: 5,
                tipoAgrupa: 'L',
                geraArquivo: 'N'
            };
        },
        enumerable: true,
        configurable: true
    });
    CadastrosEndossoFilterComponent.ctorParameters = function () { return [
        { type: _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_6__["CadastrosEndossoService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], CadastrosEndossoFilterComponent.prototype, "filtrar", void 0);
    CadastrosEndossoFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cadastro-endosso-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cadastro-endosso-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_6__["CadastrosEndossoService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"]])
    ], CadastrosEndossoFilterComponent);
    return CadastrosEndossoFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.scss":
/*!************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.scss ***!
  \************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("div.card-body {\n  position: relative;\n}\n\ndiv._mask {\n  position: absolute;\n  height: 70%;\n  width: 70%;\n  z-index: 3;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vY2FkYXN0cm8tZW5kb3Nzby9jYWRhc3Ryby1lbmRvc3NvLWZvcm0vQzpcXENvcnBvcmF0ZVxcQ29ycG9yYXRlV2ViRGVzZW52XFxfdW5pc29sdXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxjYWRhc3Ryb1xcY2FkYXN0cm8tZW5kb3Nzb1xcY2FkYXN0cm8tZW5kb3Nzby1mb3JtXFxjYWRhc3Ryby1lbmRvc3NvLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3BhZ2VzL2NhZGFzdHJvL2NhZGFzdHJvLWVuZG9zc28vY2FkYXN0cm8tZW5kb3Nzby1mb3JtL2NhZGFzdHJvLWVuZG9zc28tZm9ybS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGtCQUFBO0FDQ0Y7O0FERUE7RUFDRSxrQkFBQTtFQUNBLFdBQUE7RUFDQSxVQUFBO0VBQ0EsVUFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvY2FkYXN0cm8vY2FkYXN0cm8tZW5kb3Nzby9jYWRhc3Ryby1lbmRvc3NvLWZvcm0vY2FkYXN0cm8tZW5kb3Nzby1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiZGl2LmNhcmQtYm9keSB7XHJcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG59XHJcblxyXG5kaXYuX21hc2sge1xyXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICBoZWlnaHQ6IDcwJTtcclxuICB3aWR0aDogNzAlO1xyXG4gIHotaW5kZXg6IDM7XHJcbn1cclxuIiwiZGl2LmNhcmQtYm9keSB7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbn1cblxuZGl2Ll9tYXNrIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBoZWlnaHQ6IDcwJTtcbiAgd2lkdGg6IDcwJTtcbiAgei1pbmRleDogMztcbn0iXX0= */");

/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.ts ***!
  \**********************************************************************************************************/
/*! exports provided: CadastrosEndossoFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoFormComponent", function() { return CadastrosEndossoFormComponent; });
/* 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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cadastro-endosso.model */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts");
/* harmony import */ var _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../cadastro-endosso.constants */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts");
/* harmony import */ var _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../cadastro-endosso.service */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.ts");
/* harmony import */ var app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/cadastro/grupo-cliente/grupo-cliente.service */ "./src/app/pages/cadastro/grupo-cliente/grupo-cliente.service.ts");
/* harmony import */ var app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/pages/cadastro/operacao/operacao.service */ "./src/app/pages/cadastro/operacao/operacao.service.ts");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! app/shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var _lote_lote_model__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../lote/lote.model */ "./src/app/pages/cadastro/lote/lote.model.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var _lote_lote_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! app/pages/controle/osg/osg.service */ "./src/app/pages/controle/osg/osg.service.ts");
/* harmony import */ var _cadastro_endosso_dados_modal_cadastro_endosso_dados_modal_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};























var CadastrosEndossoFormComponent = /** @class */ (function (_super) {
    __extends(CadastrosEndossoFormComponent, _super);
    function CadastrosEndossoFormComponent(router, messageService, activatedRoute, serviceOperacao, funcoesService, permissoesUtils, destinatarioService, osgService, materialService, grupoClienteService, service, loteService, configuracao) {
        var _this = _super.call(this, new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__["CadastrosEndossoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.serviceOperacao = serviceOperacao;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.osgService = osgService;
        _this.materialService = materialService;
        _this.grupoClienteService = grupoClienteService;
        _this.service = service;
        _this.loteService = loteService;
        _this.configuracao = configuracao;
        _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndosso"]();
        _this.dataSegundaIndex = [];
        _this.dataSegundaIndexTmp = [];
        _this.dataTotalTmp = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoTotalTmpDto"]();
        _this.dataSegundaIndexTmpDados = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndossoSegundaIndexTmpDados"]();
        _this.mensagens = [];
        _this.constantes = new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_9__["CadastrosEndossoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/cadastro/cadastrosEndosso";
        _this.mascara = new app_config_enumerables__WEBPACK_IMPORTED_MODULE_13__["Mascaras"]();
        _this.exibirIndex = false;
        _this.carregarDataLote = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDataLote(this.data).toPromise()];
                    case 1:
                        _a.dataLote = _b.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarSegundaIndex = function (regEndosso) { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDadosSegundaIndex(regEndosso).toPromise()];
                    case 1:
                        _a.dataSegundaIndex = _b.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarSegundaIndexTmp = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a, response;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDadosSegundaIndexTmp().toPromise()];
                    case 1:
                        _a.dataSegundaIndexTmp = _b.sent();
                        if (!this.funcoesService.isEdit(this.actionForm)) return [3 /*break*/, 4];
                        if (!(this.dataSegundaIndexTmp && this.dataSegundaIndexTmp.length > 0)) return [3 /*break*/, 3];
                        this.dataSegundaIndexTmp = this.dataSegundaIndexTmp.map(function (tmpItem) {
                            var correspondingItem = _this.dataSegundaIndex.find(function (item) { return item.deposito === tmpItem.deposito; });
                            if (correspondingItem) {
                                if (correspondingItem.kilosD <= tmpItem.kilos) {
                                    tmpItem.kilosD = correspondingItem.kilosD;
                                }
                                if (correspondingItem.litrosD <= tmpItem.litros) {
                                    tmpItem.litrosD = correspondingItem.litrosD;
                                }
                            }
                            return tmpItem;
                        });
                        return [4 /*yield*/, this.service.updateDadosTmp(this.dataSegundaIndexTmp).toPromise()];
                    case 2:
                        response = _b.sent();
                        this.exibirIndex = true;
                        _b.label = 3;
                    case 3: return [3 /*break*/, 5];
                    case 4:
                        this.exibirIndex = true;
                        _b.label = 5;
                    case 5: return [2 /*return*/];
                }
            });
        }); };
        _this.carregarValidacao = function (lote) { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this.service;
                        return [4 /*yield*/, this.service.getDadosValidaTmp(lote).toPromise()];
                    case 1:
                        _a.dataValidaTmp = _b.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarTotalTmp = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0: return [4 /*yield*/, this.carregarSegundaIndexTmp()];
                    case 1:
                        _b.sent();
                        _a = this;
                        return [4 /*yield*/, this.service.getTotalTmp().toPromise()];
                    case 2:
                        _a.dataTotalTmp = _b.sent();
                        if (this.service.dataValidaTmp.unidade == 'LT' || this.service.dataValidaTmp.unidade == 'CC') {
                            this.totalSaldo = this.dataTotalTmp.totalLitrosD;
                        }
                        else {
                            this.totalSaldo = this.dataTotalTmp.totalKilosD;
                        }
                        this.diferenca = this.totalSaldo - (this.data.quantidade !== undefined ? this.data.quantidade : 0);
                        return [2 /*return*/];
                }
            });
        }); };
        _this.gravarTmp = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.service.addDadosTmp(this.data).subscribe(function (result) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    if (!result.isValid) {
                        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("backError").emit(_this.mensagens);
                        _this.funcoesService.backToTop();
                    }
                    _this.carregarSegundaIndexTmp();
                    _this.carregarValidacao(_this.data);
                    _this.carregarTotalTmp();
                });
                return [2 /*return*/];
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CadastrosEndossoFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_8__["CadastrosEndosso"]();
            if (id) {
                _this.service.getDataById(+id).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        if (_this.funcoesService.isEdit(_this.actionForm)) {
                            _this.gravarTmp();
                            _this.carregarSegundaIndex(_this.data.regEndosso);
                            _this.carregarSegundaIndexTmp();
                            _this.carregarTotalTmp();
                            _this.carregaDadosLote(_this.data.loteId);
                        }
                        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_20__["NumberUtilsStaticService"].isPositive(_this.data.destinatarioIdCliente)) {
                            _this.destinatarioService.getById(_this.data.destinatarioIdCliente).subscribe(function (cliente) {
                                _this.loadCliente(cliente);
                            });
                            _this.osgService.getById(_this.data.regOsg).subscribe(function (osg) {
                                _this.data.osg = osg;
                            });
                            _this.trataMaterial(_this.data.materialId);
                        }
                        else {
                            _this.data.destinatarioIdCliente = null;
                            _this.data.cliente = null;
                        }
                    }
                    else {
                        _this.messageService.warning("titles.cadastrosEndosso", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
            else {
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    CadastrosEndossoFormComponent.prototype.onSubmit = function (form) {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("formError").emit(form);
            if (form.invalid) {
                return;
            }
            _this.carregarConfig();
            if (_this.data.destinatarioIdCliente == 0) {
                _this.messageService.warning(_this.service.title, "messages.compradorNaoinformado");
                return;
            }
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["DateTimeUtilsStaticService"].menorA(_this.data.dtEndosso, _this.dataLote.dataLote)) {
                _this.messageService.warning(_this.service.title, "messages.dataDoEndossoNaoPodeSerInferiorADataDoLote");
                return;
            }
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["DateTimeUtilsStaticService"].menorA(_this.data.dtLimite, _this.data.dtEndosso) && (_this.funcoesService.isCreate(_this.actionForm) || !_this.permAltDtLimite)) {
                _this.messageService.warning(_this.service.title, "messages.dataLimiteNaoPodeSerInferiorAHoje");
                return;
            }
            if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["DateTimeUtilsStaticService"].menorA(_this.data.dtLimite, _this.data.dtEndosso)) {
                _this.messageService.warning(_this.service.title, "messages.dataLimiteNaoPodeSerInferiorADataDoEndosso");
                return;
            }
            if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_20__["NumberUtilsStaticService"].isNotPositive(_this.data.quantidade)) {
                _this.messageService.warning(_this.service.title, "messages.quantidadeDoDocumentoInvalida");
                return;
            }
            if (_this.totalSaldo != _this.data.quantidade && (_this.funcoesService.isCreate(_this.actionForm) || !_this.permAltDtLimite)) {
                _this.messageService.warning(_this.service.title, "messages.saldoKilosLitrosDeveSerIgualzero");
                return;
            }
            _this.data.logRotina = "Cadastro de Endosso";
            _this.service.addDados(_this.data).subscribe(function (result) {
                _this.mensagens = _this.messageService.validationResult(result);
                if (!result.isValid) {
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("backError").emit(_this.mensagens);
                    _this.funcoesService.backToTop();
                }
                else {
                    _this.messageService.saveSuccess("titles.cadastrosEndosso");
                    _this.back();
                }
            });
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    CadastrosEndossoFormComponent.prototype.carregarConfig = function () {
        this.permAltDtLimite = this.configuracao.boolean("CTR", "PermAltDtLimite");
    };
    CadastrosEndossoFormComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.dataSegundaIndexTmpDados = val;
    };
    CadastrosEndossoFormComponent.prototype._dbClick = function () {
        if (this.funcoesService.isDetail(this.actionForm)) {
            return;
        }
        this.modal.open(this.dataSegundaIndexTmpDados);
    };
    CadastrosEndossoFormComponent.prototype.trataMaterial = function (materialId) {
        var _this = this;
        this.materialService.getById(materialId).subscribe(function (resp) {
            _this.data.material = resp;
            _this.data.materialId = resp.materialId;
        });
    };
    CadastrosEndossoFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    CadastrosEndossoFormComponent.prototype.loadCliente = function (data) {
        if (!data)
            return;
        this.data.cliente = data;
    };
    CadastrosEndossoFormComponent.prototype.validaDatas = function () {
        if (app_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_15__["DateTimeUtilsStaticService"].menorA(this.data.dtLimite, this.data.dtEndosso, ['H', 'M'])) {
            this.messageService.warning(this.service.title, "messages.dataLimiteNpodeSerInferiorADataDoEndosso");
        }
    };
    CadastrosEndossoFormComponent.prototype.carregaDadosLote = function (loteId) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_17__["StringUtilsStaticService"].isNotEmpty(loteId)) {
                    this.loteService.getByLoteId(loteId).subscribe(function (resp) {
                        if (!!resp) {
                            _this.data.lote = resp;
                            _this.trataMaterial(_this.data.lote.materialId);
                            _this.gravarTmp();
                            _this.carregarTotalTmp();
                            _this.carregarDataLote();
                        }
                        else {
                            _this.data.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_16__["Lote"]();
                        }
                    });
                }
                return [2 /*return*/];
            });
        });
    };
    Object.defineProperty(CadastrosEndossoFormComponent.prototype, "saldoLoteOptions", {
        get: function () {
            return {
                destinatarioIdCliente: this.data.destinatarioIdCliente,
                materialId: this.data.materialId,
                sitLote: 'A',
                modo: 1,
                tipoSaldo: 1,
                tipoAgrupa: 'L',
                geraArquivo: 'N'
            };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CadastrosEndossoFormComponent.prototype, "desabilitaLitros", {
        get: function () {
            return (!['LT', 'CC'].includes(this.service.dataValidaTmp.unidade));
        },
        enumerable: true,
        configurable: true
    });
    CadastrosEndossoFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__["OperacaoService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_21__["OsgService"] },
        { type: app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__["MaterialService"] },
        { type: app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__["GrupoClienteService"] },
        { type: _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoService"] },
        { type: _lote_lote_service__WEBPACK_IMPORTED_MODULE_18__["LoteService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_19__["ConfiguracaoFacade"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(_cadastro_endosso_dados_modal_cadastro_endosso_dados_modal_component__WEBPACK_IMPORTED_MODULE_22__["CadastrosEndossoDadosModalComponent"], { static: true }),
        __metadata("design:type", _cadastro_endosso_dados_modal_cadastro_endosso_dados_modal_component__WEBPACK_IMPORTED_MODULE_22__["CadastrosEndossoDadosModalComponent"])
    ], CadastrosEndossoFormComponent.prototype, "modal", void 0);
    CadastrosEndossoFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cadastro-endosso-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cadastro-endosso-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./cadastro-endosso-form.component.scss */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            app_pages_cadastro_operacao_operacao_service__WEBPACK_IMPORTED_MODULE_12__["OperacaoService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            app_pages_controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_21__["OsgService"],
            app_pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_14__["MaterialService"],
            app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_11__["GrupoClienteService"],
            _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoService"],
            _lote_lote_service__WEBPACK_IMPORTED_MODULE_18__["LoteService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_19__["ConfiguracaoFacade"]])
    ], CadastrosEndossoFormComponent);
    return CadastrosEndossoFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.component.ts":
/*!************************************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.component.ts ***!
  \************************************************************************************************************/
/*! exports provided: CadastrosEndossoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoIndexComponent", function() { return CadastrosEndossoIndexComponent; });
/* 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 _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../cadastro-endosso.model */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts");
/* harmony import */ var _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cadastro-endosso.constants */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts");
/* harmony import */ var _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../cadastro-endosso.service */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.ts");
/* harmony import */ var app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/pages/cadastro/grupo-cliente/grupo-cliente.service */ "./src/app/pages/cadastro/grupo-cliente/grupo-cliente.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};















var CadastrosEndossoIndexComponent = /** @class */ (function (_super) {
    __extends(CadastrosEndossoIndexComponent, _super);
    function CadastrosEndossoIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService, grupoClienteService, destinatarioService) {
        var _this = _super.call(this, new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_11__["CadastrosEndossoConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.grupoClienteService = grupoClienteService;
        _this.destinatarioService = destinatarioService;
        _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndosso"]();
        _this.constantes = new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_11__["CadastrosEndossoConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/cadastro/cadastrosEndosso";
        _this.mensagens = [];
        _this.cadastrosCadEndosso = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__["CadastrosCadEndosso"]();
        _this.dataSegundaIndexTmp = [];
        _this.dataSegundaIndexTmpDados = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoSegundaIndexTmpDados"]();
        _this.exibirIndex = false;
        _this.exibir = false;
        _this.carregarSegundaIndex = function (regEndosso) { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDadosSegundaIndex(regEndosso).toPromise()];
                    case 1:
                        _a.dataSegundaIndexTmp = _b.sent();
                        if (this.dataSegundaIndexTmp && this.dataSegundaIndexTmp.length > 0) {
                            this.exibirIndex = true;
                        }
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarCadEndosso = function (regPlanej) { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getValidaExluir(regPlanej).toPromise()];
                    case 1:
                        _a.cadastrosCadEndosso = _b.sent();
                        return [2 /*return*/];
                }
            });
        }); };
        _this.carregarValidaKilos = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = this;
                        _b = parseInt;
                        return [4 /*yield*/, this.service.getVerificaKilos().toPromise()];
                    case 1:
                        _a.kilos = _b.apply(void 0, [_c.sent()]);
                        return [2 /*return*/];
                }
            });
        }); };
        _this.confirmacao = function () { return __awaiter(_this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () { return __awaiter(_this, void 0, void 0, function () {
                    var _this = this;
                    return __generator(this, function (_a) {
                        if (this.data.situacao !== 'Aberto') {
                            this.messageService.info("titles.cadastrosEndosso", "messages.somenteEPossivelConfirmarEndossosEmAberto");
                            return [2 /*return*/];
                        }
                        this.service.addTmpConfirmacao(this.data.regEndosso).subscribe(function (result) {
                            _this.mensagens = _this.messageService.validationResult(result);
                        });
                        if (!!(this.data.regEndosso)) {
                            this.router.navigate(["" + this.target + this.pageRoute + "/confirmacao/" + this.data.regEndosso]);
                        }
                        return [2 /*return*/];
                    });
                }); });
                return [2 /*return*/];
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    CadastrosEndossoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _this.service.filtro = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndossoFilter"]();
                    _this.filtrar();
                }
                else {
                    _this.refresh();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'confirmacao', func: function () { return _this.confirmacao; } }
        ]);
    };
    CadastrosEndossoIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getDados(this.service.filtro).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("regEndosso", "codigo"),
                _this.datatablesService.getDataString("loteOrigem", "loteOrigem"),
                _this.datatablesService.getDataString("situacao", "situacao"),
                _this.datatablesService.getDataString("fantasia", "comprador"),
                _this.datatablesService.getDataString("descrMater", "produto"),
                _this.datatablesService.getDataString("numeroOSG", "oSG"),
                _this.datatablesService.getDataDateTime("dtEndosso", "dtEndosso", "DD/MM/YYYY"),
                _this.datatablesService.getDataDateTime("dtLimite", "dtLimite", "DD/MM/YYYY"),
                _this.datatablesService.getDataDouble("quantidade", "quantidade", 0)
            ];
            _this.datatablesService.toDataTable({ tableId: "dtCadastrosEndosso", columns: columns, data: data, orientationOrder: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["EOrientationOrder"].ASC, }, function (aData) {
                _this.data = aData;
                _this.trataDados(_this.data);
                _this.carregarSegundaIndex(_this.data.regEndosso);
                _this.exibir = true;
            });
        });
    };
    CadastrosEndossoIndexComponent.prototype.trataDados = function (data) {
        var _this = this;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["NumberUtilsStaticService"].isPositive(data.destinatarioIdCliente)) {
            this.destinatarioService.getById(data.destinatarioIdCliente).subscribe(function (cliente) {
                _this.data.cliente = cliente;
            });
        }
        else {
            this.data.cliente = null;
        }
    };
    CadastrosEndossoIndexComponent.prototype.filtrar = function () {
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__["EventEmitterService"].get("formError").emit(null);
        jQuery("#cadastro-endosso-filter").modal("show");
    };
    CadastrosEndossoIndexComponent.prototype.executaFiltro = function () {
        this.refresh();
    };
    CadastrosEndossoIndexComponent.prototype.remove = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
                    var _this = this;
                    return __generator(this, function (_a) {
                        switch (_a.label) {
                            case 0:
                                if (!this.data || !this.data.regEndosso) {
                                    this.messageService.info("titles.cadastrosEndosso", "messages.nenhumRegistroSelecionado");
                                    return [2 /*return*/];
                                }
                                return [4 /*yield*/, this.carregarCadEndosso(this.data.regEndosso)];
                            case 1:
                                _a.sent();
                                if (this.cadastrosCadEndosso.sitReg == 'P') {
                                    this.messageService.info("titles.cadastrosEndosso", "messages.endossoConfimadoExlusaoNPermitida");
                                    return [2 /*return*/];
                                }
                                return [4 /*yield*/, this.carregarValidaKilos()];
                            case 2:
                                _a.sent();
                                if (this.kilos < 0) {
                                    this.messageService.info("titles.cadastrosEndosso", "messages.kilosNaoInformado");
                                    return [2 /*return*/];
                                }
                                this.messageService.removeConfirm(function () {
                                    _this.service.deleteDados(_this.data).subscribe(function (result) {
                                        _this.mensagens = _this.messageService.validationResult(result);
                                        if (!result.isValid) {
                                            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_8__["EventEmitterService"].get("backError").emit(_this.mensagens);
                                            _this.funcoesService.backToTop();
                                        }
                                        else {
                                            _this.messageService.removeSuccess();
                                            _this.refresh();
                                            _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_10__["CadastrosEndosso"]();
                                        }
                                    });
                                });
                                return [2 /*return*/];
                        }
                    });
                }); });
                return [2 /*return*/];
            });
        });
    };
    CadastrosEndossoIndexComponent.prototype.create = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/create"]);
    };
    CadastrosEndossoIndexComponent.prototype.edit = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.regEndosso]);
    };
    CadastrosEndossoIndexComponent.prototype.detail = function () {
        if (!!(this.data.regEndosso)) {
            this.router.navigate(["" + this.target + this.pageRoute + "/detail/" + this.data.regEndosso]);
        }
    };
    CadastrosEndossoIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _this.constantes.paramRelatorio = {
                dataI: _this.service.filtro.dataI,
                dataF: _this.service.filtro.dataF,
                destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_9__["NumberUtilsStaticService"].toNumber(_this.service.filtro.destinatarioIdCliente),
                materialId: _this.service.filtro.materialId,
                loteId: _this.service.filtro.loteId,
            };
            _super.prototype.print.call(_this);
        });
    };
    CadastrosEndossoIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    CadastrosEndossoIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    CadastrosEndossoIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_12__["CadastrosEndossoService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] },
        { type: app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_13__["GrupoClienteService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"] }
    ]; };
    CadastrosEndossoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-cadastro-endosso-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./cadastro-endosso-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _cadastro_endosso_service__WEBPACK_IMPORTED_MODULE_12__["CadastrosEndossoService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"],
            app_pages_cadastro_grupo_cliente_grupo_cliente_service__WEBPACK_IMPORTED_MODULE_13__["GrupoClienteService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_14__["DestinatarioService"]])
    ], CadastrosEndossoIndexComponent);
    return CadastrosEndossoIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts ***!
  \*******************************************************************************/
/*! exports provided: CadastrosEndossoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoConstants", function() { return CadastrosEndossoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var CadastrosEndossoConstants = /** @class */ (function () {
    function CadastrosEndossoConstants() {
        this.sisFormularioId = 375209;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.confirmacao" },
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.cadastrosEndosso";
        this.reportId = "CAD0294";
        this.reportTitulo = { "titulo": "Cadastro de Endosso", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Confirmacao', action: 'confirmacao', icon: "fa fa-check", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    return CadastrosEndossoConstants;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts ***!
  \***************************************************************************/
/*! exports provided: CadastrosEndossoIndex, CadastrosEndossoSegundaIndex, CadastrosCadEndosso, CadastrosEndossoSegundaIndexTmp, CadastrosEndossoValidaTmp, CadastrosEndossoSegundaIndexTmpDados, CadastrosEndosso, CadastrosEndossoConfirmacao, CadastrosEndossoConfirmacaoDestino, CadastrosEndossoFilter, CadastrosEndossoTotalTmpDto, DataLote, CadastrosEndossoLote */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoIndex", function() { return CadastrosEndossoIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoSegundaIndex", function() { return CadastrosEndossoSegundaIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosCadEndosso", function() { return CadastrosCadEndosso; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoSegundaIndexTmp", function() { return CadastrosEndossoSegundaIndexTmp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoValidaTmp", function() { return CadastrosEndossoValidaTmp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoSegundaIndexTmpDados", function() { return CadastrosEndossoSegundaIndexTmpDados; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndosso", function() { return CadastrosEndosso; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoConfirmacao", function() { return CadastrosEndossoConfirmacao; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoConfirmacaoDestino", function() { return CadastrosEndossoConfirmacaoDestino; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoFilter", function() { return CadastrosEndossoFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoTotalTmpDto", function() { return CadastrosEndossoTotalTmpDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DataLote", function() { return DataLote; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoLote", function() { return CadastrosEndossoLote; });
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var _grupo_cliente_grupo_cliente_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../grupo-cliente/grupo-cliente.model */ "./src/app/pages/cadastro/grupo-cliente/grupo-cliente.model.ts");
/* harmony import */ var _lote_lote_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../lote/lote.model */ "./src/app/pages/cadastro/lote/lote.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 CadastrosEndossoIndex = /** @class */ (function (_super) {
    __extends(CadastrosEndossoIndex, _super);
    function CadastrosEndossoIndex() {
        return _super.call(this) || this;
    }
    return CadastrosEndossoIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

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

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

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

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

var CadastrosEndossoSegundaIndexTmpDados = /** @class */ (function (_super) {
    __extends(CadastrosEndossoSegundaIndexTmpDados, _super);
    function CadastrosEndossoSegundaIndexTmpDados() {
        var _this = _super.call(this) || this;
        _this.kilos = 0;
        _this.litros = 0;
        _this.kilosD = 0;
        _this.litrosD = 0;
        return _this;
    }
    return CadastrosEndossoSegundaIndexTmpDados;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var CadastrosEndosso = /** @class */ (function (_super) {
    __extends(CadastrosEndosso, _super);
    function CadastrosEndosso() {
        var _this = _super.call(this) || this;
        _this.dtEndosso = new Date();
        var currentDate = new Date();
        currentDate.setDate(currentDate.getDate() + 1);
        _this.dtLimite = currentDate;
        _this.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_2__["Lote"]();
        return _this;
    }
    return CadastrosEndosso;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var CadastrosEndossoConfirmacao = /** @class */ (function (_super) {
    __extends(CadastrosEndossoConfirmacao, _super);
    function CadastrosEndossoConfirmacao() {
        var _this = _super.call(this) || this;
        _this.dtEndosso = new Date();
        var currentDate = new Date();
        currentDate.setDate(currentDate.getDate() + 1);
        _this.dtLimite = currentDate;
        _this.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_2__["Lote"]();
        _this.desabilitaLitros = true;
        return _this;
    }
    return CadastrosEndossoConfirmacao;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var CadastrosEndossoConfirmacaoDestino = /** @class */ (function (_super) {
    __extends(CadastrosEndossoConfirmacaoDestino, _super);
    function CadastrosEndossoConfirmacaoDestino() {
        var _this = _super.call(this) || this;
        _this.regime = '';
        _this.codGrupo = 0;
        _this.subLote = '';
        _this.novoLote = '';
        _this.loteDest = '';
        _this.tipoOperacao = 0;
        _this.grupoCliente = new _grupo_cliente_grupo_cliente_model__WEBPACK_IMPORTED_MODULE_1__["GrupoCliente"]();
        _this.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_2__["Lote"]();
        return _this;
    }
    return CadastrosEndossoConfirmacaoDestino;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_0__["BaseModel"]));

var CadastrosEndossoFilter = /** @class */ (function () {
    function CadastrosEndossoFilter() {
        this.dataI = new Date();
        var currentDate = new Date();
        currentDate.setDate(currentDate.getDate() + 1);
        this.dataF = currentDate;
        this.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_2__["Lote"]();
    }
    return CadastrosEndossoFilter;
}());

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

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

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



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.module.ts":
/*!****************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.module.ts ***!
  \****************************************************************************/
/*! exports provided: CadastrosEndossoModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoModule", function() { return CadastrosEndossoModule; });
/* 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_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _cadastro_endosso_confirmacao_cadastro_endosso_confirmacao_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.ts");
/* harmony import */ var _cadastro_endosso_dados_modal_cadastro_endosso_dados_modal_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-dados-modal/cadastro-endosso-dados-modal.component.ts");
/* harmony import */ var _cadastro_endosso_filter_cadastro_endosso_filter_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cadastro-endosso-filter/cadastro-endosso-filter.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-filter/cadastro-endosso-filter.component.ts");
/* harmony import */ var _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cadastro-endosso-form/cadastro-endosso-form.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.ts");
/* harmony import */ var _cadastro_endosso_index_cadastro_endosso_index_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cadastro-endosso-index/cadastro-endosso-index.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.component.ts");
/* harmony import */ var _cadastro_endosso_routing_module__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./cadastro-endosso.routing.module */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.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 CadastrosEndossoModule = /** @class */ (function () {
    function CadastrosEndossoModule() {
    }
    CadastrosEndossoModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _cadastro_endosso_index_cadastro_endosso_index_component__WEBPACK_IMPORTED_MODULE_6__["CadastrosEndossoIndexComponent"],
                _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndossoFormComponent"],
                _cadastro_endosso_filter_cadastro_endosso_filter_component__WEBPACK_IMPORTED_MODULE_4__["CadastrosEndossoFilterComponent"],
                _cadastro_endosso_dados_modal_cadastro_endosso_dados_modal_component__WEBPACK_IMPORTED_MODULE_3__["CadastrosEndossoDadosModalComponent"],
                _cadastro_endosso_confirmacao_cadastro_endosso_confirmacao_component__WEBPACK_IMPORTED_MODULE_2__["CadastrosEndossoConfirmacaoComponent"]
            ],
            imports: [
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _cadastro_endosso_routing_module__WEBPACK_IMPORTED_MODULE_7__["CadastrosEndossoRoutingModule"]
            ]
        })
    ], CadastrosEndossoModule);
    return CadastrosEndossoModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.routing.module.ts":
/*!************************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.routing.module.ts ***!
  \************************************************************************************/
/*! exports provided: CadastrosEndossoRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoRoutingModule", function() { return CadastrosEndossoRoutingModule; });
/* 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 _cadastro_endosso_confirmacao_cadastro_endosso_confirmacao_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-confirmacao/cadastro-endosso-confirmacao.component.ts");
/* harmony import */ var _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cadastro-endosso-form/cadastro-endosso-form.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-form/cadastro-endosso-form.component.ts");
/* harmony import */ var _cadastro_endosso_index_cadastro_endosso_index_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cadastro-endosso-index/cadastro-endosso-index.component */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso-index/cadastro-endosso-index.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 CadastrosEndossoRoutes = [
    {
        path: "",
        component: _cadastro_endosso_index_cadastro_endosso_index_component__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndossoIndexComponent"],
        data: {
            breadcrumb: "cadastrosEndosso",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "create",
        component: _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_4__["CadastrosEndossoFormComponent"],
        data: {
            breadcrumb: "cadastrosEndosso",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "detail/:id",
        component: _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_4__["CadastrosEndossoFormComponent"],
        data: {
            breadcrumb: "cadastrosEndosso",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:id",
        component: _cadastro_endosso_form_cadastro_endosso_form_component__WEBPACK_IMPORTED_MODULE_4__["CadastrosEndossoFormComponent"],
        data: {
            breadcrumb: "cadastrosEndosso",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "confirmacao/:id",
        component: _cadastro_endosso_confirmacao_cadastro_endosso_confirmacao_component__WEBPACK_IMPORTED_MODULE_3__["CadastrosEndossoConfirmacaoComponent"],
        data: {
            breadcrumb: "cadastrosEndosso",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    }
];
var CadastrosEndossoRoutingModule = /** @class */ (function () {
    function CadastrosEndossoRoutingModule() {
    }
    CadastrosEndossoRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(CadastrosEndossoRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], CadastrosEndossoRoutingModule);
    return CadastrosEndossoRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.service.ts ***!
  \*****************************************************************************/
/*! exports provided: CadastrosEndossoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CadastrosEndossoService", function() { return CadastrosEndossoService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cadastro-endosso.model */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.model.ts");
/* harmony import */ var _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./cadastro-endosso.constants */ "./src/app/pages/cadastro/cadastro-endosso/cadastro-endosso.constants.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
/* harmony import */ var _lote_lote_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../lote/lote.service */ "./src/app/pages/cadastro/lote/lote.service.ts");
/* harmony import */ var _lote_lote_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../lote/lote.model */ "./src/app/pages/cadastro/lote/lote.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 __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};











var CadastrosEndossoService = /** @class */ (function (_super) {
    __extends(CadastrosEndossoService, _super);
    function CadastrosEndossoService(http, loteService) {
        var _this = _super.call(this, http, "cadastros/cadastrosEndosso") || this;
        _this.http = http;
        _this.loteService = loteService;
        _this.filtro = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndossoFilter"]();
        _this.data = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndosso"]();
        _this.constantes = new _cadastro_endosso_constants__WEBPACK_IMPORTED_MODULE_6__["CadastrosEndossoConstants"]();
        _this.title = "titles.cadastrosEndosso";
        _this.dataValidaTmp = new _cadastro_endosso_model__WEBPACK_IMPORTED_MODULE_5__["CadastrosEndossoValidaTmp"]();
        return _this;
    }
    CadastrosEndossoService.prototype.getDados = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getData", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDadosSegundaIndex = function (regEndosso) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDataSegundaIndex/" + regEndosso)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDataById = function (regEndosso) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDataById/" + regEndosso)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getSubLote = function (lote) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getSubLote", lote)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDataByIdConfirmacao = function (regEndosso) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDataByIdConfirmacao/" + regEndosso)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getValidaExluir = function (regEndosso) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getValidaExluir/" + regEndosso)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getVerificaKilos = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getValidaKilos")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getValidaSegundaIndex = function (regEndosso) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getValidaSegundaIndex/" + regEndosso)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDadosValidaTmp = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDadosValidaTmp", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDataLote = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDataLote", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getDadosSegundaIndexTmp = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getDataSegundaIndexTmp")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.getTotalTmp = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/getTotalTmp")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.addDadosTmp = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/addDadosTmp", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.addDados = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/addDados", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.addDadosConfirmacao = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/addDadosConfirmacao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.addTmpConfirmacao = function (regEndosso) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/addTmpConfirmacao", { regEndosso: regEndosso })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.deleteDados = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/deleteDados", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.gravarDadosSegundaGrid = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/gravarDadosSegundaGrid", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.updateDadosTmp = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/cadastros/cadastrosEndosso/updateDadosTmp", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    CadastrosEndossoService.prototype.carregaDadosLoteFiltro = function (loteId) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_8__["StringUtilsStaticService"].isNotEmpty(loteId)) {
                    this.loteService.getByLoteId(loteId).subscribe(function (resp) {
                        if (!!resp) {
                            _this.filtro.lote = resp;
                        }
                        else {
                            _this.filtro.lote = new _lote_lote_model__WEBPACK_IMPORTED_MODULE_10__["Lote"]();
                        }
                    });
                }
                return [2 /*return*/];
            });
        });
    };
    CadastrosEndossoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] },
        { type: _lote_lote_service__WEBPACK_IMPORTED_MODULE_9__["LoteService"] }
    ]; };
    CadastrosEndossoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"],
            _lote_lote_service__WEBPACK_IMPORTED_MODULE_9__["LoteService"]])
    ], CadastrosEndossoService);
    return CadastrosEndossoService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-cadastro-cadastro-endosso-cadastro-endosso-module.js.map