(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-especificos-cli-agendamento-distribuicao-de-cotas-distribuicao-de-cotas-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.component.html":
/*!**********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.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=\"agenda-dia--item mb-2\">\r\n    <div class=\"agenda-item\">\r\n        <div class=\"agenda-item--dia-semana title-dia\">\r\n            {{dataList.diaSemana}}, {{dataList.diaMes}}\r\n        </div>\r\n        <div class=\"container-all\">\r\n            <div class=\"table-header\">\r\n                <div class=\"table-cell-header\">\r\n                    {{'labels.codCliente' | translate}}\r\n                </div>\r\n                <div class=\"table-cell-header\">\r\n                    {{'labels.cliente' | translate}}\r\n                </div>\r\n                <div class=\"table-cell-header\">\r\n                    {{'labels.material' | translate}}\r\n                </div>\r\n                <div class=\"table-cell-header\">\r\n                    {{'labels.produto' | translate}}\r\n                </div>\r\n                <div class=\"table-cell-header\">\r\n                    {{'labels.vagas' | translate}}\r\n                </div>\r\n            </div>\r\n            <div class=\"table-row clickable\" *ngFor=\"let item of dataList.list\"\r\n                [ngClass]=\"{ info: item === selectedItem }\" (click)=\"setSelectedItem(item)\">\r\n                <div class=\"table-cell\">{{item.destinatarioIdCliente}}</div>\r\n                <div>{{item.fantasiaCliente}}</div>\r\n                <div class=\"table-cell\">{{item.material}}</div>\r\n                <div>{{item.fantasiaMaterial}}</div>\r\n                <div class=\"table-cell\">{{item.qtVagas}}</div>\r\n            </div>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.html":
/*!************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-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.regCota\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <app-form-legenda></app-form-legenda>\n    <div class=\"card-body widget-body\">\n        <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n            <app-validacoes></app-validacoes>\n            <div class=\"row\">\n                <div class=\"col-6\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"contrato\" class=\"required\">{{\"labels.contrato\" | translate}}</label>\n                                <select id=\"contrato\" class=\"form-control form-control-sm\" name=\"contrato\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" (change)=\"onContratoChange($event)\"\n                                    [(ngModel)]=\"data.stoContratoId\" [required]=\"true\">\n                                    <option value=\"0\">{{\"labels.selecione\" | translate}}</option>\n                                    <option [value]=\"c.stoContratoId\" *ngFor=\"let c of contratos\">\n                                        {{ c.contratoTrading }}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"destinatarioIdCliente\" name=\"destinatarioIdCliente\"\n                                    label=\"destinatario\" [inSelected]=\"data.cliente\" modalTitle=\"pesquisaDeCliente\"\n                                    (outModel)=\"trataCliente($event)\" [(ngModel)]=\"data.destinatarioIdCliente\"\n                                    [disabled]=\"true\" required=\"true\">\n                                </app-pesquisa-destinatario>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"contrato\" class=\"required\">{{\"labels.produto\" | translate}}</label>\n                                <select id=\"produto\" class=\"form-control form-control-sm\" name=\"produto\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm) || data.stoContratoId == 0 || data.stoContratoId === undefined\"\n                                    [(ngModel)]=\"data.materialId\" required (change)=\"getDisponivel()\">\n                                    <option value=\"0\">{{\"labels.selecione\" | translate}}</option>\n                                    <option [value]=\"p.material\" *ngFor=\"let p of produtos\">\n                                        {{ p.produto }}\n                                    </option>\n                                </select>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-4 col-md-6 col-sm-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"dtJanela\" class=\"required\">Data</label>\n                                <app-data id=\"dtJanela\" name=\"dtJanela\" required [(ngModel)]=\"data.dtJanela\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" (executa)=\"validaDtJanela()\">\n                                </app-data>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-4 col-md-6 col-sm-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"janela\" class=\"required\">Janela</label>\n                                <app-combo-padrao id=\"regJanela\" name=\"janela\" [(ngModel)]=\"data.ptlJanelaOperacionalId\"\n                                    [required]=\"true\" tabela=\"PtlJanela\" chave=\"RegJanela\" descricao=\"DescrJanela\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" (change)=\"getDisponivel()\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-4 col-md-6 col-sm-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"qtVagas\" class=\"form-label\" class=\"required\">Vagas</label>\n                                <input type=\"text\" class=\"form-control form-control-sm\" id=\"qtVagas\" name=\"qtVagas\"\n                                    maxlength=\"4\" required [(ngModel)]=\"data.qtVagas\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\" currencyMask\n                                    [options]=\"funcoesService.optionCurrency(0)\">\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-4 col-md-6 col-sm-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"qtVagasDisp\" class=\"form-label\">{{\"labels.disponivel\" | translate}}</label>\n                                <input type=\"text\" class=\"form-control form-control-sm\" id=\"qtVagasDisp\"\n                                    name=\"qtVagasDisp\" required [(ngModel)]=\"disponivel\" disabled currencyMask\n                                    [options]=\"funcoesService.optionCurrency(0)\">\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"col-6\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"listaTipoVeiculo\" class=\"required\">{{\"labels.tipoVeiculo\" |\n                                    translate}}</label>\n                                <app-combo-multi-padrao id=\"listaTipoVeiculo\" name=\"listaTipoVeiculo\"\n                                    tabela=\"TipoVeiculo\" chave=\"TipoVeiculo\" descricao=\"DescrTipoVeiculo\" ativos=\"true\"\n                                    [qtShowItens]=\"2\" [selected]=\"data.rListaTipoVeiculo\"\n                                    (outObjeto)=\"data.listaTipoVeiculo = $event\" [resetCombo]=\"deveLimpar\"\n                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                </app-combo-multi-padrao>\n\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-sm-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"listaPatio\" class=\"required\">{{\"labels.patio\" | translate}}</label>\n                                <app-combo-multi-padrao id=\"listaPatio\" name=\"listaPatio\" tabela=\"Patio\"\n                                    [qtShowItens]=\"2\" chave=\"CodPatio\" descricao=\"DescrPatio\" ativos=\"true\"\n                                    [selected]=\"data.rListaPatio\" (outObjeto)=\"data.listaPatio = $event\"\n                                    [resetCombo]=\"deveLimpar\" [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                </app-combo-multi-padrao>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row mt-2\">\n                <div class=\"col-12\">\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success mr-2\" type=\"submit\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvar' | translate }}\n                        </button>\n                        <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvarNovo' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.html":
/*!**************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-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\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"selectedItem?.regCota\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row mb-2\">\n    <div class=\"col-12\">\n        <div class=\"card\">\n            <div class=\"card-body\">\n                <div class=\"row\">\n                    <div class=\"col-lg-3 col-md-4 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"dtselecioneMes\" class=\"required\">{{ 'labels.selecionaMes' | translate }}</label>\n                            <div class=\"input-group\">\n                                <app-mes-ano id=\"dtselecioneMes\" name=\"dtselecioneMes\" [required]=\"true\"\n                                    [disabled]=\"false\" [(ngModel)]=\"filtro.data\">\n                                </app-mes-ano>\n                                <div class=\"input-group-append ml-3\">\n                                    <div>\n                                        <button type=\"button\" class=\"btn btn-sm btn-success\" (click)=\"trocaVisao()\">{{\n                                            'buttons.localizar' | translate }}</button>\n                                    </div>\n                                </div>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"col-lg-3 col-md-4 col-sm-12\">\n                        <div class=\"form-group form-group-sm\">\n                            <label for=\"visao\">{{\"labels.visao\" | translate}}</label>\n                            <select id=\"visao\" name=\"visao\" data-title=\"{{ 'labels.visao' | translate }}\"\n                                class=\"form-control form-control-sm\" [(ngModel)]=\"filtro.visao\" (change)=\"trocaVisao()\">\n                                <option value=\"D\">{{ 'labels.diaria' | translate}}</option>\n                                <option value=\"M\">{{ 'labels.mensal' | translate}}</option>\n                            </select>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n\n<ng-container *ngIf=\"hasMensal\">\n    <div class=\"row\">\n        <div class=\"col-lg-12 col-md-12\">\n            <div class=\"card sem-borda\">\n                <div class=\"card-body\">\n                    <div class=\"row agenda--line\">\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana text-danger\">\n                                {{ 'labels.domingo' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana\">\n                                {{ 'labels.segundaFeira' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana\">\n                                {{ 'labels.tercaFeira' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana\">\n                                {{ 'labels.quartaFeira' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana\">\n                                {{ 'labels.quintaFeira' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana\">\n                                {{ 'labels.sextaFeira' | translate }}\n                            </div>\n                        </div>\n                        <div class=\"text-center agenda-mes--item\">\n                            <div class=\"agenda-item--dia-semana text-danger\">\n                                {{ 'labels.sabado' | translate }}\n                            </div>\n                        </div>\n\n                    </div>\n                    <ng-container *ngFor=\"let semana of semanasLiberadas\">\n                        <div class=\"row agenda--line\">\n                            <ng-container *ngFor=\"let dadosDia of semana.dados\">\n                                <div class=\"text-center agenda-mes--item\">\n                                    <app-distribuicao-de-cotas-mes [dataList]=\"dadosDia\"\n                                        [selectedItem]=\"selectedItem\" (outSelected)=\"outSelected($event)\" (dblclick)=\"detail()\">\n                                    </app-distribuicao-de-cotas-mes>\n                                </div>\n                            </ng-container>\n                        </div>\n                    </ng-container>\n                </div>\n            </div>\n        </div>\n    </div>\n</ng-container>\n\n<ng-container *ngIf=\"hasDiario\">\n    <div class=\"row\">\n        <div class=\"col-lg-12 col-md-12\">\n            <div class=\"card sem-borda\">\n                <div class=\"card-body\">\n                    <div class=\"row\">\n                        <ng-container *ngFor=\"let dia of dadosPorDia\">\n                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                <app-distribuicao-de-cotas-dia [dataList]=\"dia\"\n                                    [selectedItem]=\"selectedItem\" (outSelected)=\"outSelected($event)\" (dblclick)=\"detail()\">\n                                </app-distribuicao-de-cotas-dia>\n                            </div>\n                        </ng-container>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</ng-container>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.html":
/*!**********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.html ***!
  \**********************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<ng-container *ngIf=\"!!dataList\">\r\n    <div class=\"agenda-item\">\r\n        <ng-container *ngIf=\"dataList.apresenta\">\r\n            <div class=\"agenda-item--dia-mes\">\r\n                {{dataList.diaMes}}\r\n            </div>\r\n            <div class=\"container-all\">\r\n                <div class=\"table-header\">\r\n                    <div class=\"table-cell-header\">\r\n                        {{'labels.codCliente' | translate}}\r\n                    </div>\r\n                    <div class=\"table-cell-header\">\r\n                        {{'labels.cliente' | translate}}\r\n                    </div>\r\n                    <div class=\"table-cell-header\">\r\n                        {{'labels.material' | translate}}\r\n                    </div>\r\n                    <div class=\"table-cell-header\">\r\n                        {{'labels.produto' | translate}}\r\n                    </div>\r\n                    <div class=\"table-cell-header\">\r\n                        {{'labels.vagas' | translate}}\r\n                    </div>\r\n                </div>\r\n                <div class=\"table-row clickable\" *ngFor=\"let item of dataList.list\"\r\n                    [ngClass]=\"{ info: item === selectedItem }\" (click)=\"setSelectedItem(item)\">\r\n                    <div class=\"table-cell\">{{item.destinatarioIdCliente}}</div>\r\n                    <div>{{item.fantasiaCliente}}</div>\r\n                    <div class=\"table-cell\">{{item.material}}</div>\r\n                    <div>{{item.fantasiaMaterial}}</div>\r\n                    <div class=\"table-cell\">{{item.qtVagas}}</div>\r\n                </div>\r\n            </div>\r\n        </ng-container>\r\n        <ng-container *ngIf=\"!dataList.apresenta\">\r\n            <div class=\"container-all\">\r\n\r\n            </div>\r\n        </ng-container>\r\n    </div>\r\n</ng-container>");

/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.component.ts":
/*!******************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.component.ts ***!
  \******************************************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasDiaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasDiaComponent", function() { return DistribuicaoDeCotasDiaComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../distribuicao-de-cotas.model */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.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 DistribuicaoDeCotasDiaComponent = /** @class */ (function () {
    function DistribuicaoDeCotasDiaComponent() {
        this.dataList = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasDados"]();
        this.outSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.dataAux = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasItem"]();
    }
    DistribuicaoDeCotasDiaComponent.prototype.ngOnInit = function () {
    };
    DistribuicaoDeCotasDiaComponent.prototype.setSelectedItem = function (selected) {
        this.dataAux = selected;
        this.outSelected.emit(selected);
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasDados"])
    ], DistribuicaoDeCotasDiaComponent.prototype, "dataList", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], DistribuicaoDeCotasDiaComponent.prototype, "selectedItem", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], DistribuicaoDeCotasDiaComponent.prototype, "outSelected", void 0);
    DistribuicaoDeCotasDiaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-distribuicao-de-cotas-dia",
            template: __importDefault(__webpack_require__(/*! raw-loader!./distribuicao-de-cotas-dia.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./../distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [])
    ], DistribuicaoDeCotasDiaComponent);
    return DistribuicaoDeCotasDiaComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.ts":
/*!********************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.ts ***!
  \********************************************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasFormComponent", function() { return DistribuicaoDeCotasFormComponent; });
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../distribuicao-de-cotas.constants */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.constants.ts");
/* harmony import */ var _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../distribuicao-de-cotas.model */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.ts");
/* harmony import */ var _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../distribuicao-de-cotas.service */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.service.ts");
/* harmony import */ var _pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../../../../../pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../../../../../../pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./../../../../../../pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../../../../../../pages/cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../../../../../../shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var _shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./../../../../../../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 _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./../../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./../../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./../../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.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 DistribuicaoDeCotasFormComponent = /** @class */ (function (_super) {
    __extends(DistribuicaoDeCotasFormComponent, _super);
    function DistribuicaoDeCotasFormComponent(router, messageService, activatedRoute, funcoesService, permissoesUtils, destinatarioService, materialService, service, cpfCnpjService) {
        var _this = _super.call(this, new _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.materialService = materialService;
        _this.service = service;
        _this.cpfCnpjService = cpfCnpjService;
        _this.data = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_4__["DistribuicaoDeCotas"]();
        _this.contratos = [];
        _this.produtos = [];
        _this.habilitaCampos = true;
        _this.mensagens = [];
        _this.constantes = new _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasConstants"]();
        _this.disponivel = 0;
        _this.deveLimpar = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cli/agendamento/distribuicaoDeCotas";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    DistribuicaoDeCotasFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            _this.getCombos();
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            if (id) {
                _this.service.getById(+id).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        _this.getCombos();
                        _this.getDisponivel();
                        _this.materialService.getById(resp.materialId).subscribe(function (material) {
                            _this.trataMaterial(material);
                        });
                        _this.contratoSelecionado = _this.contratos.find(function (c) { return c.stoContratoId === resp.stoContratoId; });
                        _this.buscarDestinatario(_this.contratoSelecionado.destinatarioIdCliente);
                        _this.getComboProduto(_this.contratoSelecionado.stoContratoId);
                    }
                    else {
                        _this.messageService.warning("titles.distribuicaoDeCotas", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.getCombos = function () {
        return __awaiter(this, void 0, void 0, function () {
            var result;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.carregaComboDeContratos().toPromise()];
                    case 1:
                        result = _a.sent();
                        this.contratos = result;
                        this.contratoSelecionado = result.find(function (c) { return c.stoContratoId === _this.data.stoContratoId; });
                        this.buscarDestinatario(!!this.contratoSelecionado ? this.contratoSelecionado.destinatarioIdCliente : 0);
                        this.getComboProduto(!!this.contratoSelecionado ? this.contratoSelecionado.stoContratoId : 0);
                        return [2 /*return*/];
                }
            });
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.getComboProduto = function (id) {
        return __awaiter(this, void 0, void 0, function () {
            var result;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0: return [4 /*yield*/, this.service.carregaComboDeProdutos(id).toPromise()];
                    case 1:
                        result = _a.sent();
                        this.produtos = result;
                        if (result.length == 1) {
                            this.data.materialId = result[0].material;
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.getDisponivel = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!(this.data.ptlJanelaOperacionalId > 0 && this.data.materialId !== '' && this.data.materialId !== null && this.data.dtJanela)) return [3 /*break*/, 2];
                        _a = this;
                        return [4 /*yield*/, this.service.getQtdGeral({
                                material: this.data.materialId,
                                regJanela: this.data.ptlJanelaOperacionalId,
                                dtJanela: this.data.dtJanela,
                                regContrato: this.data.stoContratoId,
                                regCota: this.data.regCota
                            }).toPromise()];
                    case 1:
                        _a.dataDisponivel = _b.sent();
                        if (this.data.qtVagas == 0 || this.data.qtVagas && this.dataDisponivel.qtGeral > 0 || this.dataDisponivel.qtGeral != undefined) {
                            this.disponivel = this.dataDisponivel.qtGeral;
                        }
                        _b.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.onContratoChange = function (event) {
        var contratoSelecionadoId = +event.target.value;
        if (contratoSelecionadoId === 0) {
            this.data.cliente = new _pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_6__["Destinatario"]();
            this.data.destinatarioIdCliente = 0;
            this.data.materialId = '';
            this.data.currentMaterial = new _pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_8__["Material"]();
            return;
        }
        this.contratoSelecionado = this.contratos.find(function (c) { return c.stoContratoId === contratoSelecionadoId; });
        if (this.contratoSelecionado) {
            this.buscarDestinatario(this.contratoSelecionado.destinatarioIdCliente);
            this.buscarMaterial(this.contratoSelecionado.materialId);
            this.getComboProduto(this.contratoSelecionado.stoContratoId);
            this.getDisponivel();
        }
    };
    DistribuicaoDeCotasFormComponent.prototype.buscarDestinatario = function (destinatarioId) {
        var _this = this;
        this.destinatarioService.getById(destinatarioId).subscribe(function (cliente) {
            _this.trataCliente(cliente);
            _this.data.destinatarioIdCliente = destinatarioId;
            _this.getDisponivel();
        }, function (error) {
            _this.messageService.error("titles.distribuicaoDeCotas", "messages.erroAoBuscarDestinatario");
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.buscarMaterial = function (materialId) {
        var _this = this;
        this.materialService.getById(materialId).subscribe(function (material) {
            _this.trataMaterial(material);
            _this.data.materialId = materialId;
        }, function (error) {
            _this.messageService.error("titles.distribuicaoDeCotas", "messages.erroAoBuscarDestinatario");
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.data.stoContratoId <= 0) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.contratoNaoSelecionado");
            return;
        }
        if (!this.data.listaTipoVeiculo || _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isNotPositive(this.data.listaTipoVeiculo.length)) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.campoObrigatorio", { name: this.messageService.translate('labels.tipoVeiculo') });
            return;
        }
        if (!this.data.listaPatio || _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["NumberUtilsStaticService"].isNotPositive(this.data.listaPatio.length)) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.campoObrigatorio", { name: this.messageService.translate('labels.patio') });
            return;
        }
        if (this.data.qtVagas > this.disponivel) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.vagasNaoPodeSerMaiorQueODisponivel");
            return;
        }
        if (this.data.qtVagas == 0) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.vagasNaoPodeSerZero");
            return;
        }
        if (this.data.ptlJanelaOperacionalId > 0) {
            this.validaData();
        }
        this.data.logRotina = "Distribuição de Cotas";
        this.data.stoContratoId = Number(this.data.stoContratoId);
        this.service
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.distribuicaoDeCotas");
                if (create) {
                    _this.disponivel = 0;
                    _this.data.rListaTipoVeiculo = [];
                    _this.data.rListaPatio = [];
                    _this.data = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_4__["DistribuicaoDeCotas"]();
                    _this.data.listaTipoVeiculo = '';
                    _this.data.listaPatio = '';
                    _this.deveLimpar = true;
                    setTimeout(function () { return _this.deveLimpar = false; }, 0);
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
                }
                else {
                    _this.back();
                }
            }
        });
    };
    DistribuicaoDeCotasFormComponent.prototype.validaData = function () {
        var novaData = new Date(this.data.dtJanela);
        novaData.setHours(0, 0, 0, 0);
        this.data.dtJanela = novaData;
    };
    DistribuicaoDeCotasFormComponent.prototype.validaDtJanela = function () {
        if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["DateTimeUtilsStaticService"].menorAHoje(this.data.dtJanela)) {
            this.messageService.warning("titles.distribuicaoDeCotas", "messages.campoDataNaoPodeSerMenorQueADataAtual");
            this.data.dtJanela = new Date();
            return;
        }
        this.getDisponivel();
    };
    DistribuicaoDeCotasFormComponent.prototype.trataMaterial = function (material) {
        this.data.currentMaterial = material;
    };
    DistribuicaoDeCotasFormComponent.prototype.edit = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.regCota]);
    };
    DistribuicaoDeCotasFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    DistribuicaoDeCotasFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    DistribuicaoDeCotasFormComponent.prototype.trataCliente = function (cliente) {
        this.data.cliente = !!cliente ? cliente : new _pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_6__["Destinatario"]();
    };
    DistribuicaoDeCotasFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_16__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_14__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"] },
        { type: _pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"] },
        { type: _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"] },
        { type: _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_5__["DistribuicaoDeCotasService"] },
        { type: _shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"] }
    ]; };
    DistribuicaoDeCotasFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-distribuicao-de-cotas-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./distribuicao-de-cotas-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_16__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_14__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_15__["PermissoesUtilsService"],
            _pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"],
            _pages_cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"],
            _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_5__["DistribuicaoDeCotasService"],
            _shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"]])
    ], DistribuicaoDeCotasFormComponent);
    return DistribuicaoDeCotasFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_10__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss":
/*!************************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss ***!
  \************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("app-mes-ano {\n  width: 65%;\n}\n@media (max-width: 1240px) {\n  app-mes-ano {\n    width: 55%;\n  }\n}\n.agenda--line {\n  padding: 0 10px;\n}\n.agenda--line:last-child {\n  border-bottom: 1px solid #ddd;\n}\n.sem-borda {\n  border: 0;\n}\n.agenda-mes--item {\n  width: 14.28%;\n  border-right: 0;\n  border-top: 1px;\n  border-bottom: 0;\n  border-left: 1px;\n  border-color: #ddd;\n  border-style: solid;\n}\n.agenda-mes--item:last-child {\n  border-right: 1px solid #ddd;\n}\n.agenda-mes--item .agenda-item--dia-semana {\n  padding: 5px 0;\n}\n.agenda-dia--item {\n  border-right: 0;\n  border: 1px solid #ddd;\n}\napp-distribuicao-de-cotas-mes .agenda-item--dia-semana,\napp-distribuicao-de-cotas-dia .agenda-item--dia-semana {\n  border-bottom: 1px solid #ddd;\n  padding: 3px 0px;\n}\napp-distribuicao-de-cotas-mes .agenda-item--dia-mes,\napp-distribuicao-de-cotas-dia .agenda-item--dia-mes {\n  border-bottom: 1px solid #ddd;\n  background-color: #fff6f6;\n}\napp-distribuicao-de-cotas-mes .agenda-item--dia-mes div,\napp-distribuicao-de-cotas-dia .agenda-item--dia-mes div {\n  font-size: 9px;\n  margin-top: -13px;\n  text-align: right;\n  padding-right: 5px;\n}\napp-distribuicao-de-cotas-mes .container-all {\n  white-space: nowrap;\n  overflow-x: auto;\n  height: 130px;\n  width: 100%;\n  background-color: #e1f9d9;\n}\napp-distribuicao-de-cotas-mes .container-all::-webkit-scrollbar {\n  width: 8px;\n  height: 8px;\n}\napp-distribuicao-de-cotas-mes .container-all .table-header {\n  display: table-row;\n  font-weight: bold;\n  text-align: left;\n}\napp-distribuicao-de-cotas-mes .container-all .table-cell-header {\n  display: table-cell;\n  border-width: thin;\n  width: 192px;\n  padding: 5px;\n}\napp-distribuicao-de-cotas-mes .container-all .table-row {\n  display: table-row;\n}\napp-distribuicao-de-cotas-mes .container-all .table-row:hover {\n  cursor: pointer;\n  background-color: #cdebc3;\n}\napp-distribuicao-de-cotas-mes .container-all .table-row.info {\n  background-color: #afcfa5;\n}\napp-distribuicao-de-cotas-mes .container-all .table-cell {\n  display: table-cell;\n  border-width: thin;\n  padding-left: 5px;\n  padding-right: 5px;\n}\napp-distribuicao-de-cotas-dia .agenda-item--dia-semana.title-dia {\n  padding-left: 5px;\n}\napp-distribuicao-de-cotas-dia .agenda-item--dia-semana span {\n  font-size: 9px;\n}\napp-distribuicao-de-cotas-dia .container-all {\n  white-space: nowrap;\n  overflow-x: auto;\n  height: 130px;\n  background-color: #e1f9d9;\n}\napp-distribuicao-de-cotas-dia .container-all::-webkit-scrollbar {\n  width: 8px;\n  height: 8px;\n}\napp-distribuicao-de-cotas-dia .container-all .table-header {\n  display: table-row;\n  font-weight: bold;\n  text-align: left;\n}\napp-distribuicao-de-cotas-dia .container-all .table-cell-header {\n  display: table-cell;\n  border-width: thin;\n  width: 192px;\n  padding: 5px;\n}\napp-distribuicao-de-cotas-dia .container-all .table-row {\n  display: table-row;\n}\napp-distribuicao-de-cotas-dia .container-all .table-row:hover {\n  cursor: pointer;\n  background-color: #cdebc3;\n}\napp-distribuicao-de-cotas-dia .container-all .table-row.info {\n  background-color: #afcfa5;\n}\napp-distribuicao-de-cotas-dia .container-all .table-cell {\n  display: table-cell;\n  border-width: thin;\n  padding-left: 5px;\n  padding-right: 5px;\n  text-align: center;\n}\napp-distribuicao-de-cotas-dados .card {\n  margin-top: 10px;\n  margin-bottom: -10px;\n}\napp-distribuicao-de-cotas-dados select option:disabled {\n  background-color: #ddd;\n}\n/*# sourceMappingURL=data:application/json;base64,  */");

/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.ts":
/*!**********************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.ts ***!
  \**********************************************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasIndexComponent", function() { return DistribuicaoDeCotasIndexComponent; });
/* 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_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../distribuicao-de-cotas.service */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.service.ts");
/* harmony import */ var _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../distribuicao-de-cotas.model */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.ts");
/* harmony import */ var _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../distribuicao-de-cotas.constants */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.constants.ts");
/* harmony import */ var app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! app/pages/login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_pages_portal_ptl_programacao_agenda_ptl_programacao_agenda_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/pages/portal/ptl-programacao-agenda/ptl-programacao-agenda.service */ "./src/app/pages/portal/ptl-programacao-agenda/ptl-programacao-agenda.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 DistribuicaoDeCotasIndexComponent = /** @class */ (function (_super) {
    __extends(DistribuicaoDeCotasIndexComponent, _super);
    function DistribuicaoDeCotasIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService, ptlProgramacaoAgendaService) {
        var _this = _super.call(this, new _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_9__["DistribuicaoDeCotasConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.ptlProgramacaoAgendaService = ptlProgramacaoAgendaService;
        _this.data = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotas"]();
        _this.dados = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasIndex"]();
        _this.dadosCalendario = [];
        _this.constantes = new _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_9__["DistribuicaoDeCotasConstants"]();
        _this.semanas = [];
        _this.filtro = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasFilter"]();
        _this.hasDiario = false;
        _this.hasMensal = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/especificos/cli/agendamento/distribuicaoDeCotas";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    DistribuicaoDeCotasIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                _this.refresh();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    DistribuicaoDeCotasIndexComponent.prototype.refresh = function () {
        this.trocaVisao();
    };
    DistribuicaoDeCotasIndexComponent.prototype.trocaVisao = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.selectedItem = null;
                        this.hasDiario = this.filtro.visao === "D";
                        this.hasMensal = this.filtro.visao !== "D";
                        return [4 /*yield*/, this.montaDiasMes()];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    DistribuicaoDeCotasIndexComponent.prototype.resetarSemanas = function () {
        this.semanas = [];
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](1));
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](2));
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](3));
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](4));
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](5));
        this.semanas.push(new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_8__["DistribuicaoDeCotasSemanas"](6));
    };
    DistribuicaoDeCotasIndexComponent.prototype.montaDiasMes = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _a;
            var _this = this;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getDados({ dtRef: this.filtro.data })];
                    case 1:
                        _a.dadosCalendario = _b.sent();
                        this.resetarSemanas();
                        if (this.hasMensal) {
                            this.semanas.forEach(function (semana) {
                                var vrfApresentaSemana = true;
                                semana.diasDaLinha.forEach(function (dia) {
                                    var item = _this.dadosCalendario.find(function (c) { return c.item === dia && c.apresenta; });
                                    if (vrfApresentaSemana && !!item && !!item.apresenta) {
                                        semana.apresentaSemana = true;
                                        vrfApresentaSemana = false;
                                    }
                                    semana.dados.push(item);
                                });
                            });
                        }
                        return [2 /*return*/];
                }
            });
        });
    };
    Object.defineProperty(DistribuicaoDeCotasIndexComponent.prototype, "dadosPorDia", {
        get: function () {
            return this.dadosCalendario.filter(function (c) { return c.apresenta; });
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DistribuicaoDeCotasIndexComponent.prototype, "semanasLiberadas", {
        get: function () {
            return this.semanas.filter(function (c) { return c.apresentaSemana; });
        },
        enumerable: true,
        configurable: true
    });
    DistribuicaoDeCotasIndexComponent.prototype.outSelected = function (selected) {
        this.selectedItem = selected;
        this.data.regCota = selected.regCota;
        this.data.stoContratoId = selected.regContrato;
        this.data.materialId = selected.material;
        this.data.ptlJanelaOperacionalId = selected.regJanela;
        this.data.qtVagas = selected.qtVagas;
        this.data.dtJanela = selected.dtJanela;
    };
    DistribuicaoDeCotasIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.selectedItem.regCota)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.messageService.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function (result) {
                        if (!result.validationResult.isValid) {
                            var mensagens = _this.messageService.validationResult(result.validationResult);
                            mensagens.forEach(function (m) { return _this.messageService.warning('titles.distribuicaoDeCotas', m); });
                        }
                        else {
                            _this.service.remove(_this.data);
                            _this.refresh();
                            _this.datatablesService.remove("dtDistribuicaoDeCotas");
                        }
                    });
                });
            });
        }
    };
    DistribuicaoDeCotasIndexComponent.prototype.create = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
        });
    };
    DistribuicaoDeCotasIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (_this.funcoesService.isNotUndefinedOrNull(_this.selectedItem.regCota)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.selectedItem.regCota]);
            }
        });
    };
    DistribuicaoDeCotasIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/detail/" + _this.selectedItem.regCota]);
        });
    };
    DistribuicaoDeCotasIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _super.prototype.properties.call(_this, _this.selectedItem);
        });
    };
    DistribuicaoDeCotasIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    DistribuicaoDeCotasIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_7__["DistribuicaoDeCotasService"] },
        { type: app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: app_pages_portal_ptl_programacao_agenda_ptl_programacao_agenda_service__WEBPACK_IMPORTED_MODULE_11__["PtlProgramacaoAgendaService"] }
    ]; };
    DistribuicaoDeCotasIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-distribuicao-de-cotas-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./distribuicao-de-cotas-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./distribuicao-de-cotas-index.component.scss */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _distribuicao_de_cotas_service__WEBPACK_IMPORTED_MODULE_7__["DistribuicaoDeCotasService"],
            app_shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            app_shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            app_pages_portal_ptl_programacao_agenda_ptl_programacao_agenda_service__WEBPACK_IMPORTED_MODULE_11__["PtlProgramacaoAgendaService"]])
    ], DistribuicaoDeCotasIndexComponent);
    return DistribuicaoDeCotasIndexComponent;
}(app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.ts":
/*!******************************************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.ts ***!
  \******************************************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasMesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasMesComponent", function() { return DistribuicaoDeCotasMesComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../distribuicao-de-cotas.model */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.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 DistribuicaoDeCotasMesComponent = /** @class */ (function () {
    function DistribuicaoDeCotasMesComponent() {
        this.dataList = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasDados"]();
        this.outSelected = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.dataAux = new _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasItem"]();
    }
    DistribuicaoDeCotasMesComponent.prototype.ngOnInit = function () {
    };
    DistribuicaoDeCotasMesComponent.prototype.setSelectedItem = function (selected) {
        this.dataAux = selected;
        this.outSelected.emit(selected);
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _distribuicao_de_cotas_model__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasDados"])
    ], DistribuicaoDeCotasMesComponent.prototype, "dataList", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Object)
    ], DistribuicaoDeCotasMesComponent.prototype, "selectedItem", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], DistribuicaoDeCotasMesComponent.prototype, "outSelected", void 0);
    DistribuicaoDeCotasMesComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-distribuicao-de-cotas-mes",
            template: __importDefault(__webpack_require__(/*! raw-loader!./distribuicao-de-cotas-mes.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./../distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [])
    ], DistribuicaoDeCotasMesComponent);
    return DistribuicaoDeCotasMesComponent;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.constants.ts":
/*!************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.constants.ts ***!
  \************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasConstants", function() { return DistribuicaoDeCotasConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var DistribuicaoDeCotasConstants = /** @class */ (function () {
    function DistribuicaoDeCotasConstants() {
        this.sisFormularioId = 375290;
        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.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "PTL";
        this.nomeForm = "titles.distribuicaoDeCotas";
        this.reportId = "PTL0009";
        this.reportTitulo = { "titulo": "Distribuição de Cotas", "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: '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' }
        ];
        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 DistribuicaoDeCotasConstants;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.ts":
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.model.ts ***!
  \********************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasIndex, DistribuicaoDeCotas, ContratosComboDto, ProdutosComboDto, DisponivelDto, DistribuicaoDeCotasDados, DistribuicaoDeCotasItem, DistribuicaoDeCotasSemanas, DistribuicaoDeCotasFilter, DistribuicaoDeCotasQtdGeralVo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasIndex", function() { return DistribuicaoDeCotasIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotas", function() { return DistribuicaoDeCotas; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ContratosComboDto", function() { return ContratosComboDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProdutosComboDto", function() { return ProdutosComboDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DisponivelDto", function() { return DisponivelDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasDados", function() { return DistribuicaoDeCotasDados; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasItem", function() { return DistribuicaoDeCotasItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasSemanas", function() { return DistribuicaoDeCotasSemanas; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasFilter", function() { return DistribuicaoDeCotasFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasQtdGeralVo", function() { return DistribuicaoDeCotasQtdGeralVo; });
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/pages/cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_3__);
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 DistribuicaoDeCotasIndex = /** @class */ (function (_super) {
    __extends(DistribuicaoDeCotasIndex, _super);
    function DistribuicaoDeCotasIndex() {
        var _this = _super.call(this) || this;
        _this.regCota = 0;
        _this.regContrato = 0;
        _this.material = '';
        _this.regJanela = 0;
        _this.currentMaterial = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_1__["Material"]();
        return _this;
        // this.cliente = new Destinatario();
    }
    return DistribuicaoDeCotasIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__["BaseModel"]));

var DistribuicaoDeCotas = /** @class */ (function (_super) {
    __extends(DistribuicaoDeCotas, _super);
    function DistribuicaoDeCotas() {
        var _this = _super.call(this) || this;
        _this.destinatarioIdCliente = 0;
        _this.regCota = 0;
        _this.stoContratoId = 0;
        _this.qtVagas = 0;
        _this.materialId = '';
        _this.ptlJanelaOperacionalId = '';
        _this.currentMaterial = new app_pages_cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_1__["Material"]();
        _this.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        _this.dtJanela = new Date();
        return _this;
    }
    return DistribuicaoDeCotas;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_2__["BaseModel"]));

var ContratosComboDto = /** @class */ (function () {
    function ContratosComboDto() {
        this.destinatarioIdCliente = 0;
        this.materialId = "";
        this.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
    }
    return ContratosComboDto;
}());

var ProdutosComboDto = /** @class */ (function () {
    function ProdutosComboDto() {
    }
    return ProdutosComboDto;
}());

var DisponivelDto = /** @class */ (function () {
    function DisponivelDto() {
    }
    return DisponivelDto;
}());

var DistribuicaoDeCotasDados = /** @class */ (function () {
    function DistribuicaoDeCotasDados() {
    }
    return DistribuicaoDeCotasDados;
}());

var DistribuicaoDeCotasItem = /** @class */ (function () {
    function DistribuicaoDeCotasItem() {
    }
    return DistribuicaoDeCotasItem;
}());

var DistribuicaoDeCotasSemanas = /** @class */ (function () {
    function DistribuicaoDeCotasSemanas(semanaDoQuadro) {
        var _this = this;
        this.apresentaSemana = false;
        this.semanaDoQuadro = semanaDoQuadro;
        this.dados = [];
        var baseDiasDaLinha = [1, 2, 3, 4, 5, 6, 7];
        if (semanaDoQuadro > 1) {
            this.diasDaLinha = [];
            baseDiasDaLinha.forEach(function (dia) {
                _this.diasDaLinha.push(dia + (7 * (semanaDoQuadro - 1)));
            });
        }
        else {
            this.diasDaLinha = baseDiasDaLinha;
        }
    }
    return DistribuicaoDeCotasSemanas;
}());

var DistribuicaoDeCotasFilter = /** @class */ (function () {
    function DistribuicaoDeCotasFilter() {
        this.data = moment__WEBPACK_IMPORTED_MODULE_3__().startOf('month').toDate();
        this.visao = "M";
    }
    return DistribuicaoDeCotasFilter;
}());

var DistribuicaoDeCotasQtdGeralVo = /** @class */ (function () {
    function DistribuicaoDeCotasQtdGeralVo() {
        this.material = "";
        this.regJanela = 0;
        this.dtJanela = new Date();
        this.regContrato = 0;
        this.regCota = 0;
    }
    return DistribuicaoDeCotasQtdGeralVo;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.module.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.module.ts ***!
  \*********************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasModule", function() { return DistribuicaoDeCotasModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _distribuicao_de_cotas_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distribuicao-de-cotas.routing.module */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.routing.module.ts");
/* harmony import */ var _distribuicao_de_cotas_index_distribuicao_de_cotas_index_component__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./distribuicao-de-cotas-index/distribuicao-de-cotas-index.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-index.component.ts");
/* harmony import */ var _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./distribuicao-de-cotas-form/distribuicao-de-cotas-form.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.ts");
/* harmony import */ var app_shared_shared_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! app/shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _distribuicao_de_cotas_mes_distribuicao_de_cotas_mes_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-mes/distribuicao-de-cotas-mes.component.ts");
/* harmony import */ var _distribuicao_de_cotas_dia_distribuicao_de_cotas_dia_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-dia/distribuicao-de-cotas-dia.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 DistribuicaoDeCotasModule = /** @class */ (function () {
    function DistribuicaoDeCotasModule() {
    }
    DistribuicaoDeCotasModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _distribuicao_de_cotas_index_distribuicao_de_cotas_index_component__WEBPACK_IMPORTED_MODULE_2__["DistribuicaoDeCotasIndexComponent"],
                _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasFormComponent"],
                _distribuicao_de_cotas_mes_distribuicao_de_cotas_mes_component__WEBPACK_IMPORTED_MODULE_6__["DistribuicaoDeCotasMesComponent"],
                _distribuicao_de_cotas_dia_distribuicao_de_cotas_dia_component__WEBPACK_IMPORTED_MODULE_7__["DistribuicaoDeCotasDiaComponent"]
            ],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_5__["CommonModule"],
                app_shared_shared_module__WEBPACK_IMPORTED_MODULE_4__["SharedModule"],
                _distribuicao_de_cotas_routing_module__WEBPACK_IMPORTED_MODULE_1__["DistribuicaoDeCotasRoutingModule"]
            ]
        })
    ], DistribuicaoDeCotasModule);
    return DistribuicaoDeCotasModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.routing.module.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.routing.module.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasRoutingModule", function() { return DistribuicaoDeCotasRoutingModule; });
/* 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 _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./distribuicao-de-cotas-form/distribuicao-de-cotas-form.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-form/distribuicao-de-cotas-form.component.ts");
/* harmony import */ var _distribuicao_de_cotas_index_distribuicao_de_cotas_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./distribuicao-de-cotas-index/distribuicao-de-cotas-index.component */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas-index/distribuicao-de-cotas-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 DistribuicaoDeCotasRoutes = [
    {
        path: "",
        component: _distribuicao_de_cotas_index_distribuicao_de_cotas_index_component__WEBPACK_IMPORTED_MODULE_4__["DistribuicaoDeCotasIndexComponent"],
        data: {
            breadcrumb: "distribuicaoDeCotas",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "create",
        component: _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasFormComponent"],
        data: {
            breadcrumb: "distribuicaoDeCotas",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "detail/:id",
        component: _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasFormComponent"],
        data: {
            breadcrumb: "distribuicaoDeCotas",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:id",
        component: _distribuicao_de_cotas_form_distribuicao_de_cotas_form_component__WEBPACK_IMPORTED_MODULE_3__["DistribuicaoDeCotasFormComponent"],
        data: {
            breadcrumb: "distribuicaoDeCotas",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    }
];
var DistribuicaoDeCotasRoutingModule = /** @class */ (function () {
    function DistribuicaoDeCotasRoutingModule() {
    }
    DistribuicaoDeCotasRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(DistribuicaoDeCotasRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], DistribuicaoDeCotasRoutingModule);
    return DistribuicaoDeCotasRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.service.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.service.ts ***!
  \**********************************************************************************************************/
/*! exports provided: DistribuicaoDeCotasService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistribuicaoDeCotasService", function() { return DistribuicaoDeCotasService; });
/* 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 _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./distribuicao-de-cotas.constants */ "./src/app/pages/especificos/cli/agendamento/distribuicao-de-cotas/distribuicao-de-cotas.constants.ts");
/* harmony import */ var app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/base/specifics.base.service */ "./src/app/shared/services/base/specifics.base.service.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};







var DistribuicaoDeCotasService = /** @class */ (function (_super) {
    __extends(DistribuicaoDeCotasService, _super);
    function DistribuicaoDeCotasService(http) {
        var _this = _super.call(this, http, "cli/agendamento/distribuicaoDeCotas") || this;
        _this.http = http;
        _this.constantes = new _distribuicao_de_cotas_constants__WEBPACK_IMPORTED_MODULE_2__["DistribuicaoDeCotasConstants"]();
        return _this;
    }
    DistribuicaoDeCotasService.prototype.carregaComboDeContratos = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/cli/agendamento/distribuicaoDeCotas/getComboContrato")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    DistribuicaoDeCotasService.prototype.carregaComboDeProdutos = function (id) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/cli/agendamento/distribuicaoDeCotas/getComboProdutos/" + id)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    DistribuicaoDeCotasService.prototype.getQtdGeral = function (data) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/cli/agendamento/distribuicaoDeCotas/getQtdGeral", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError));
    };
    DistribuicaoDeCotasService.prototype.getDados = function (filtro) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].specifics_service_url + "/api/v1/cli/agendamento/distribuicaoDeCotas/getDados", filtro)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_6__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"].handleError)).toPromise();
    };
    DistribuicaoDeCotasService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    DistribuicaoDeCotasService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], DistribuicaoDeCotasService);
    return DistribuicaoDeCotasService;
}(app_shared_services_base_specifics_base_service__WEBPACK_IMPORTED_MODULE_3__["SpecificsBaseService"]));



/***/ }),

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

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


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



/***/ })

}]);
//# sourceMappingURL=app-pages-especificos-cli-agendamento-distribuicao-de-cotas-distribuicao-de-cotas-module.js.map