UNPKG

nsrtm-gestionarchivo-npm-prueba2

Version:

Proyecto de Libreria Frontend para la Gestión de Archivos

5,518 lines 272 kB
import * as i0 from '@angular/core';
import { Injectable, Component, Input, ChangeDetectionStrategy, HostBinding, ViewEncapsulation, EventEmitter, Output, LOCALE_ID, NgModule } from '@angular/core';
import * as i10 from '@ng-select/ng-select';
import { NgSelectModule } from '@ng-select/ng-select';
import * as i1$2 from '@angular/forms';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import * as i1 from '@ng-bootstrap/ng-bootstrap';
import { NgbDate, NgbPaginationModule, NgbToastModule } from '@ng-bootstrap/ng-bootstrap';
import * as moment from 'moment';
import * as i2 from 'ng2-pdf-viewer';
import { PdfViewerModule } from 'ng2-pdf-viewer';
import { finalize, Subject, BehaviorSubject, takeUntil, of, from, throwError } from 'rxjs';
import * as i2$1 from '@angular/common/http';
import { HttpParams, HttpHeaders, HttpRequest, HttpResponse, HTTP_INTERCEPTORS } from '@angular/common/http';
import { filter, map, catchError, switchMap } from 'rxjs/operators';
import * as i1$1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i12 from 'ngx-valdemort';
import { ValdemortModule } from 'ngx-valdemort';
import * as i2$2 from '@uiowa/digit-only';
import { DigitOnlyModule } from '@uiowa/digit-only';
import * as i1$3 from 'ngx-mask';
import { NgxMaskModule } from 'ngx-mask';
import { RouterModule } from '@angular/router';

class NsrtmGestionArchivoNpmService {
    constructor() { }
}
NsrtmGestionArchivoNpmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
NsrtmGestionArchivoNpmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }], ctorParameters: function () { return []; } });

class NsrtmGestionArchivoNpmComponent {
    constructor() { }
    ngOnInit() {
    }
}
NsrtmGestionArchivoNpmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NsrtmGestionArchivoNpmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmGestionArchivoNpmComponent, selector: "lib-nsrtm-gestion-archivo-npm", ngImport: i0, template: `
    <p>
      nsrtm-gestion-archivo-npm works!
    </p>
  `, isInline: true });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmComponent, decorators: [{
            type: Component,
            args: [{ selector: 'lib-nsrtm-gestion-archivo-npm', template: `
    <p>
      nsrtm-gestion-archivo-npm works!
    </p>
  ` }]
        }], ctorParameters: function () { return []; } });

const parseStringDate = ({ year, month, day, }) => {
    if (typeof year !== 'number' ||
        typeof month !== 'number' ||
        typeof day !== 'number')
        return '';
    const _day = getNumberWithZero(day);
    const _month = getNumberWithZero(month);
    return `${year}-${_month}-${_day}`;
};
const getNumberWithZero = (n) => {
    return n < 10 && n.toString().length === 1 ? `0${n}` : n;
};
/**
 *
 * @param strDate formato fecha, yyyy-mm-dd
 * @returns
 */
const toNgDateStruct = (strDate) => {
    const [date] = strDate.split(' ');
    const [year, month, day] = date.split('-');
    return {
        year: Number(year),
        month: Number(month),
        day: Number(day),
    };
};
/**
 *
 * @param strDate formato fecha, dd/mm/yyyy
 * @returns
 */
const dateToNgDateStruct = (strDate) => {
    const [day, month, year] = strDate.split('/');
    return {
        year: Number(year),
        month: Number(month),
        day: Number(day),
    };
};
/**
 * Retorna la fecha actual en el tipo de dato NgbDateStruct
 * @returns NgbDateStruct
 */
const getTodayNgbDateStruct = () => {
    const today = new Date();
    return {
        day: today.getDate(),
        month: today.getMonth() + 1,
        year: today.getFullYear(),
    };
};
/**
 * Retorna la fecha actual en el tipo de dato NgbDateStruct
 * @returns NgbDateStruct
 */
const getMinDateNgbDateStruct = () => {
    return {
        day: 1,
        month: 1,
        year: 1900,
    };
};
const toParseNgDateStruct = (date) => {
    if (!moment(date).isValid())
        return null;
    const mDate = moment(date);
    return { day: mDate.date(), month: mDate.month() + 1, year: mDate.year() };
};
const esTipoNgbDateStruct = (date) => {
    if (!date || typeof date !== 'object') {
        return false;
    }
    return 'year' in date && 'month' in date && 'day' in date;
};
const todayDate = () => {
    const today = new Date();
    today.setHours(0);
    today.setMinutes(0);
    today.setSeconds(0);
    today.setMilliseconds(0);
    return today;
};
/**
 *
 * @param strDate
 * @returns
 */
const setDateNgStruct = (strDate) => {
    let momentDate = null;
    if (!strDate) {
        momentDate = moment();
        return {
            year: momentDate.year(),
            month: momentDate.month() + 1,
            day: momentDate.date(),
        };
    }
    momentDate = moment(strDate);
    return {
        year: parseInt(momentDate.format('YYYY')),
        month: parseInt(momentDate.format('MM')),
        day: parseInt(momentDate.format('DD')),
    };
};
// Verifica si la fecha es menor a la fecha actual
// month: 0.....11 0: Enero 11:Diciembre
const esMenorFechaActual = (day, month, year) => {
    const startDate = new Date(year, month, day, 0, 0, 0);
    const today = todayDate();
    return startDate.getTime() < today.getTime();
};
const parseStringDateFormatUser = ({ year, month, day, }) => {
    const _day = getNumberWithZero(day);
    const _month = getNumberWithZero(month);
    return `${_day}/${_month}/${year}`;
};

class NsrtmDialogVisorDocumentoComponent {
    constructor(_activeModal) {
        this._activeModal = _activeModal;
    }
    ngOnInit() {
        if (this.contenido) {
            this.pdfSrc = URL.createObjectURL(this.contenido);
        }
    }
    close(response) {
        URL.revokeObjectURL(this.pdfSrc);
        this._activeModal.close(response);
    }
}
NsrtmDialogVisorDocumentoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogVisorDocumentoComponent, deps: [{ token: i1.NgbActiveModal }], target: i0.ɵɵFactoryTarget.Component });
NsrtmDialogVisorDocumentoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmDialogVisorDocumentoComponent, selector: "app-nsrtm-dialog-visor-documento", inputs: { contenido: "contenido", extension: "extension" }, ngImport: i0, template: "<div style=\"width: 100%; height: 550px\">\r\n\t<div class=\"modal-header\">\r\n\t\t<h6 class=\"modal-title w-100\" id=\"title\">Visor de documento</h6>\r\n\t\t<button\r\n\t\t\ttype=\"button\"\r\n\t\t\tclass=\"btn-close\"\r\n\t\t\taria-label=\"Close\"\r\n\t\t\t(click)=\"close()\"\r\n\t\t></button>\r\n\t</div>\r\n\t<div style=\"width: 100%; height: 420px\">\r\n\t\t<pdf-viewer\r\n\t\t\t[src]=\"pdfSrc\"\r\n\t\t\t[render-text]=\"true\"\r\n\t\t\t[original-size]=\"false\"\r\n\t\t\tstyle=\"width: 100%; height: 420px\"\r\n\t\t></pdf-viewer>\r\n\t</div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: i2.PdfViewerComponent, selector: "pdf-viewer", inputs: ["c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders", "src"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogVisorDocumentoComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-nsrtm-dialog-visor-documento', template: "<div style=\"width: 100%; height: 550px\">\r\n\t<div class=\"modal-header\">\r\n\t\t<h6 class=\"modal-title w-100\" id=\"title\">Visor de documento</h6>\r\n\t\t<button\r\n\t\t\ttype=\"button\"\r\n\t\t\tclass=\"btn-close\"\r\n\t\t\taria-label=\"Close\"\r\n\t\t\t(click)=\"close()\"\r\n\t\t></button>\r\n\t</div>\r\n\t<div style=\"width: 100%; height: 420px\">\r\n\t\t<pdf-viewer\r\n\t\t\t[src]=\"pdfSrc\"\r\n\t\t\t[render-text]=\"true\"\r\n\t\t\t[original-size]=\"false\"\r\n\t\t\tstyle=\"width: 100%; height: 420px\"\r\n\t\t></pdf-viewer>\r\n\t</div>\r\n</div>\r\n" }]
        }], ctorParameters: function () { return [{ type: i1.NgbActiveModal }]; }, propDecorators: { contenido: [{
                type: Input
            }], extension: [{
                type: Input
            }] } });

const DIRECTORIO_ID = {
    DEFECTO: 1,
};
const TIPO_PROCESO_ID = {
    CONFIGURACION_GENERAL: 1,
    PROCESO_NEGOCIO: 2,
    COMPLEMENTARIOS_UTILITARIOS: 3,
};
const PROCESO_MODULO_ID = {
    DJ_CONTRIBUYENTE: 1,
    DJ_PREDIAL: 2,
    DJ_VEHICULAR: 3,
    DJ_ALCABALA: 4,
    DJ_EPND: 5,
    DJ_JUEGO: 6,
    DJ_APUESTA: 7,
    DJ_CONDICION: 8,
};
const APLICACION_ID = {
    CONFIGURACION_SISTEMA: 1,
    REGISTRO_TRIBUTARIO_Y_DETERMINACION: 2,
    GESTION_CAJA: 3,
    GESTION_COBRANZA: 4,
    GESTION_NOTIFICACIONES: 5,
    PERMISOS_Y_ACCESOS: 6,
};
const MEDIO_DIGITAL_PARAMETRO = {
    DJ_JUEGOS: 36,
    APUESTAS: 37,
    ALCABALA: 38,
    VEHICULAR: 41,
    EPND: 42,
    CONTRIBUYENTE: 43,
    CONDICION_CONTRIBUYENTE: 44,
};
const TIPO_ARCHIVO_ID = [
    { key: 'PDF', value: 1 },
    { key: 'DOCX', value: 2 },
    { key: 'DOC', value: 3 },
    { key: 'XLSX', value: 4 },
    { key: 'XLS', value: 5 },
    { key: 'JPEG', value: 6 },
    { key: 'ZIP', value: 7 },
    { key: 'RAR', value: 8 },
    { key: 'JPG', value: 9 },
];
const VERSION = 1;
const TIPO_ARCHIVO_DIGITAL_ID = 1;
const PESO_MAXIMO_ARCHIVO_MODULO_ID = 1;
const PESO_MAXIMO_TIPO_PARAMETRO_ID = 35;
const MEGA_BYTES = 1048576;

var TIPO_MENSAJE_ERR_VAL;
(function (TIPO_MENSAJE_ERR_VAL) {
    TIPO_MENSAJE_ERR_VAL[TIPO_MENSAJE_ERR_VAL["DANGER"] = 0] = "DANGER";
    TIPO_MENSAJE_ERR_VAL[TIPO_MENSAJE_ERR_VAL["WARNING"] = 1] = "WARNING";
    TIPO_MENSAJE_ERR_VAL[TIPO_MENSAJE_ERR_VAL["INFO"] = 2] = "INFO";
})(TIPO_MENSAJE_ERR_VAL || (TIPO_MENSAJE_ERR_VAL = {}));

class AlertService {
    constructor() {
        this.toasts = [];
    }
    success(message, duration = 5000) {
        this.show(message, 'bg-alert-success mb-1', duration);
    }
    error(message = 'Error', errores = [], delay = 5000) {
        this.show(message, 'bg-alert-danger mb-1', delay, errores);
    }
    errorModel(errorModel) {
        const message = `${errorModel.codigo} - ${errorModel.mensaje}`;
        this.show(message, 'bg-alert-danger mb-1', 10000, errorModel.errores);
    }
    errorCampo(errores = []) {
        this.showListError(errores, 6000, 'Error');
    }
    warning(message, errores = [], duration = 6000) {
        this.show(message, 'bg-alert-warning mb-1', duration, errores);
    }
    info(message = '', errores = [], delay = 5000) {
        this.show(message, 'bg-alert-info mb-1', delay, errores);
    }
    show(message, clasname, delay, errores) {
        this.toasts.push({
            message: message,
            classname: clasname,
            delay: delay,
            errores: errores,
        });
    }
    showListError(errores, delay, message) {
        this.toasts.push({
            message: message,
            classname: 'bg-alert-danger mb-1',
            delay: delay,
            errores: errores,
        });
    }
    showAlertErrGeneric(error, delay = 5000) {
        const tipoMensaje = (error === null || error === void 0 ? void 0 : error.tipMen) || TIPO_MENSAJE_ERR_VAL.DANGER;
        const mensaje = (error === null || error === void 0 ? void 0 : error.mensaje) || 'Hubo un error';
        const errores = (error === null || error === void 0 ? void 0 : error.errores) || [];
        if (tipoMensaje === TIPO_MENSAJE_ERR_VAL.INFO)
            return this.info(mensaje, errores, delay);
        if (tipoMensaje === TIPO_MENSAJE_ERR_VAL.WARNING)
            return this.warning(mensaje, errores, delay);
        if (tipoMensaje === TIPO_MENSAJE_ERR_VAL.DANGER)
            return this.error(mensaje, errores, delay);
        return this.error(mensaje, errores, delay);
    }
    remove(toast) {
        this.toasts = this.toasts.filter((t) => t != toast);
    }
}
AlertService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
AlertService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlertService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AlertService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }] });

class ValidationFormService {
    constructor() {
        // method not implement
    }
    /**
     * @description retorna true si el campo es invalido, considera el touched y dirty del input
     * @param input: {AbstractControl} de un input
     * @param submitted:{boolean} indica si hizo click a enviar, guardar, etc.
     * @returns {boolean}
     */
    isControlInvalid(input, submitted) {
        return input.invalid && (input.dirty || input.touched || submitted);
    }
}
ValidationFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ValidationFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationFormService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ValidationFormService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return []; } });

/**
 * Component de dialogo de componente
 */
class DialogConfirmComponent {
    constructor(activeModal, alertService) {
        this.activeModal = activeModal;
        this.alertService = alertService;
        this.loading = false;
    }
    ngOnInit() {
        // method not implement
    }
    onOk() {
        const { callback } = this.options;
        if (typeof callback === 'function') {
            this.loading = true;
            callback()
                .pipe(finalize(() => (this.loading = false)))
                .subscribe({
                next: (response) => {
                    this.activeModal.close(response);
                },
                error: (error) => {
                    this.alertService.error(error.mensaje, error.errores);
                },
            });
        }
        else {
            this.activeModal.close(true);
        }
    }
    onClose() {
        this.activeModal.close();
    }
}
DialogConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogConfirmComponent, deps: [{ token: i1.NgbActiveModal }, { token: AlertService }], target: i0.ɵɵFactoryTarget.Component });
DialogConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DialogConfirmComponent, selector: "app-dialog-confirm", inputs: { options: "options" }, ngImport: i0, template: "<div class=\"dialog-confirm\">\r\n  <div class=\"modal-body\">\r\n    <div>\r\n      <span class=\"dialog-confirm__icon feather icon-trash-2\"></span>\r\n    </div>\r\n    <h3 class=\"dialog-confirm__title\">{{options.title}}</h3>\r\n    <p class=\"dialog-confirm__message\">{{options.message}}</p>\r\n  </div>\r\n  <div class=\"modal-footer justify-content-center\">\r\n    <button type=\"button\" class=\"btn-cancel\" data-dismiss=\"modal\" (click)=\"onClose()\">\r\n      <span class=\"feather icon-x me-1\"></span>\r\n      Cancelar\r\n    </button>\r\n    <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"loading\" ngbAutofocus (click)=\"onOk()\">\r\n      <span class=\"feather icon-check me-1\" *ngIf=\"!loading; else iconLoading\"></span>\r\n      <ng-template #iconLoading>\r\n        <div class=\"spinner-border spinner-border-sm me-2\" role=\"status\"></div>\r\n      </ng-template>\r\n      {{ loading ? 'Grabando...' : 'Confimar' }}\r\n    </button>\r\n  </div>\r\n</div>\r\n", styles: [".dialog-confirm{text-align:center}.dialog-confirm .modal-body{padding-top:3rem;padding-bottom:2rem}.dialog-confirm__icon{font-size:2rem;font-weight:400}.dialog-confirm__title{margin-top:1rem;font-size:18px;font-weight:700;margin-bottom:0}.dialog-confirm__message{margin-top:.5rem;margin-bottom:0}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogConfirmComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-dialog-confirm', template: "<div class=\"dialog-confirm\">\r\n  <div class=\"modal-body\">\r\n    <div>\r\n      <span class=\"dialog-confirm__icon feather icon-trash-2\"></span>\r\n    </div>\r\n    <h3 class=\"dialog-confirm__title\">{{options.title}}</h3>\r\n    <p class=\"dialog-confirm__message\">{{options.message}}</p>\r\n  </div>\r\n  <div class=\"modal-footer justify-content-center\">\r\n    <button type=\"button\" class=\"btn-cancel\" data-dismiss=\"modal\" (click)=\"onClose()\">\r\n      <span class=\"feather icon-x me-1\"></span>\r\n      Cancelar\r\n    </button>\r\n    <button type=\"button\" class=\"btn btn-primary\" [disabled]=\"loading\" ngbAutofocus (click)=\"onOk()\">\r\n      <span class=\"feather icon-check me-1\" *ngIf=\"!loading; else iconLoading\"></span>\r\n      <ng-template #iconLoading>\r\n        <div class=\"spinner-border spinner-border-sm me-2\" role=\"status\"></div>\r\n      </ng-template>\r\n      {{ loading ? 'Grabando...' : 'Confimar' }}\r\n    </button>\r\n  </div>\r\n</div>\r\n", styles: [".dialog-confirm{text-align:center}.dialog-confirm .modal-body{padding-top:3rem;padding-bottom:2rem}.dialog-confirm__icon{font-size:2rem;font-weight:400}.dialog-confirm__title{margin-top:1rem;font-size:18px;font-weight:700;margin-bottom:0}.dialog-confirm__message{margin-top:.5rem;margin-bottom:0}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.NgbActiveModal }, { type: AlertService }]; }, propDecorators: { options: [{
                type: Input
            }] } });

/**
 * Servicio para operaciones con el modal confirmacion
 * @author Jerson
 */
const initualValues = {
    title: '¿ Anular registro ?',
    message: 'Perderá el registro permanentemente',
    msgResponseError: 'No se pudo realizar la acción!',
    msgResponseSuccess: 'Se guardaron los cambios!',
};
class DialogConfirmService {
    constructor(modalService) {
        this.modalService = modalService;
    }
    /**
     * Metodo para invocar el popup de confirmacion
     * @param options: Opciones de  Configuracion
     * @returns {NgModuleRef}
     */
    confirm(options) {
        const modalRef = this.modalService.open(DialogConfirmComponent, {
            centered: true,
            backdrop: 'static',
            keyboard: false,
            size: 'sm',
            modalDialogClass: 'nsrtm-dialog-confirm',
        });
        modalRef.componentInstance.options = Object.assign(Object.assign({}, initualValues), options);
        return modalRef;
    }
}
DialogConfirmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogConfirmService, deps: [{ token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Injectable });
DialogConfirmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogConfirmService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DialogConfirmService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: i1.NgbModal }]; } });

class SpinnerService {
    constructor() {
        this.loading = false;
        // method not implement
    }
    show() {
        this.loading = true;
    }
    hide() {
        this.loading = false;
    }
}
SpinnerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpinnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
SpinnerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpinnerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SpinnerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return []; } });

/* tslint:disable */
/**
 * Global configuration
 */
class ApiConfiguration$2 {
    constructor() {
        this.rootUrl = 'https://apps2desa.mineco.gob.pe/v1/nsrtm-services/comunesregistro';
    }
}
ApiConfiguration$2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$2, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ApiConfiguration$2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$2, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$2, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }] });

/* tslint:disable */
/**
 * Base class for services
 */
class BaseService$2 {
    constructor(config, http) {
        this.config = config;
        this.http = http;
        this._rootUrl = '';
    }
    /**
     * Returns the root url for all operations in this service. If not set directly in this
     * service, will fallback to `ApiConfiguration.rootUrl`.
     */
    get rootUrl() {
        return this._rootUrl || this.config.rootUrl;
    }
    /**
     * Sets the root URL for API operations in this service.
     */
    set rootUrl(rootUrl) {
        this._rootUrl = rootUrl;
    }
}
BaseService$2.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$2, deps: [{ token: ApiConfiguration$2 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
BaseService$2.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$2 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$2, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: ApiConfiguration$2 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
/**
 * Custom parameter codec to correctly handle the plus sign in parameter
 * values. See https://github.com/angular/angular/issues/18261
 */
class ParameterCodec$2 {
    encodeKey(key) {
        return encodeURIComponent(key);
    }
    encodeValue(value) {
        return encodeURIComponent(value);
    }
    decodeKey(key) {
        return decodeURIComponent(key);
    }
    decodeValue(value) {
        return decodeURIComponent(value);
    }
}
const ParameterCodecInstance$2 = new ParameterCodec$2();
/**
 * Base class for a parameter
 */
class Parameter$2 {
    constructor(name, value, options, defaultStyle, defaultExplode) {
        this.name = name;
        this.value = value;
        this.options = options;
        this.options = options || {};
        if (this.options.style === null || this.options.style === undefined) {
            this.options.style = defaultStyle;
        }
        if (this.options.explode === null || this.options.explode === undefined) {
            this.options.explode = defaultExplode;
        }
    }
    serializeValue(value, separator = ',') {
        if (value === null || value === undefined) {
            return '';
        }
        else if (value instanceof Array) {
            return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);
        }
        else if (typeof value === 'object') {
            const array = [];
            for (const key of Object.keys(value)) {
                let propVal = value[key];
                if (propVal !== null && propVal !== undefined) {
                    propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));
                    if (this.options.explode) {
                        array.push(`${key}=${propVal}`);
                    }
                    else {
                        array.push(key);
                        array.push(propVal);
                    }
                }
            }
            return array.join(separator);
        }
        else {
            return String(value);
        }
    }
}
/**
 * A parameter in the operation path
 */
class PathParameter$2 extends Parameter$2 {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(path) {
        let value = this.value;
        if (value === null || value === undefined) {
            value = '';
        }
        let prefix = this.options.style === 'label' ? '.' : '';
        let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';
        let alreadySerialized = false;
        if (this.options.style === 'matrix') {
            // The parameter name is just used as prefix, except in some cases...
            prefix = `;${this.name}=`;
            if (this.options.explode && typeof value === 'object') {
                prefix = ';';
                if (value instanceof Array) {
                    // For arrays we have to repeat the name for each element
                    value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);
                    value = value.join(';');
                    alreadySerialized = true;
                }
                else {
                    // For objects we have to put each the key / value pairs
                    value = this.serializeValue(value, ';');
                    alreadySerialized = true;
                }
            }
        }
        value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));
        // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account
        path = path.replace(`{${this.name}}`, value);
        path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);
        return path;
    }
    // @ts-ignore
    serializeValue(value, separator = ',') {
        var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);
        result = result.replace(/%3D/g, '=');
        result = result.replace(/%3B/g, ';');
        result = result.replace(/%2C/g, ',');
        return result;
    }
}
/**
 * A parameter in the query
 */
class QueryParameter$2 extends Parameter$2 {
    constructor(name, value, options) {
        super(name, value, options, 'form', true);
    }
    append(params) {
        if (this.value instanceof Array) {
            // Array serialization
            if (this.options.explode) {
                for (const v of this.value) {
                    params = params.append(this.name, this.serializeValue(v));
                }
            }
            else {
                const separator = this.options.style === 'spaceDelimited'
                    ? ' ' : this.options.style === 'pipeDelimited'
                    ? '|' : ',';
                return params.append(this.name, this.serializeValue(this.value, separator));
            }
        }
        else if (this.value !== null && typeof this.value === 'object') {
            // Object serialization
            if (this.options.style === 'deepObject') {
                // Append a parameter for each key, in the form `name[key]`
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));
                    }
                }
            }
            else if (this.options.explode) {
                // Append a parameter for each key without using the parameter name
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(key, this.serializeValue(propVal));
                    }
                }
            }
            else {
                // Append a single parameter whose values are a comma-separated list of key,value,key,value...
                const array = [];
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        array.push(key);
                        array.push(propVal);
                    }
                }
                params = params.append(this.name, this.serializeValue(array));
            }
        }
        else if (this.value !== null && this.value !== undefined) {
            // Plain value
            params = params.append(this.name, this.serializeValue(this.value));
        }
        return params;
    }
}
/**
 * A parameter in the HTTP request header
 */
class HeaderParameter$2 extends Parameter$2 {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(headers) {
        if (this.value !== null && this.value !== undefined) {
            if (this.value instanceof Array) {
                for (const v of this.value) {
                    headers = headers.append(this.name, this.serializeValue(v));
                }
            }
            else {
                headers = headers.append(this.name, this.serializeValue(this.value));
            }
        }
        return headers;
    }
}
/**
 * Helper to build http requests from parameters
 */
class RequestBuilder$2 {
    constructor(rootUrl, operationPath, method) {
        this.rootUrl = rootUrl;
        this.operationPath = operationPath;
        this.method = method;
        this._path = new Map();
        this._query = new Map();
        this._header = new Map();
    }
    /**
     * Sets a path parameter
     */
    path(name, value, options) {
        this._path.set(name, new PathParameter$2(name, value, options || {}));
    }
    /**
     * Sets a query parameter
     */
    query(name, value, options) {
        this._query.set(name, new QueryParameter$2(name, value, options || {}));
    }
    /**
     * Sets a header parameter
     */
    header(name, value, options) {
        this._header.set(name, new HeaderParameter$2(name, value, options || {}));
    }
    /**
     * Sets the body content, along with the content type
     */
    body(value, contentType = 'application/json') {
        if (value instanceof Blob) {
            this._bodyContentType = value.type;
        }
        else {
            this._bodyContentType = contentType;
        }
        if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {
            // Handle URL-encoded data
            const pairs = [];
            for (const key of Object.keys(value)) {
                let val = value[key];
                if (!(val instanceof Array)) {
                    val = [val];
                }
                for (const v of val) {
                    const formValue = this.formDataValue(v);
                    if (formValue !== null) {
                        pairs.push([key, formValue]);
                    }
                }
            }
            this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');
        }
        else if (this._bodyContentType === 'multipart/form-data') {
            // Handle multipart form data
            const formData = new FormData();
            if (value !== null && value !== undefined) {
                for (const key of Object.keys(value)) {
                    const val = value[key];
                    if (val instanceof Array) {
                        for (const v of val) {
                            const toAppend = this.formDataValue(v);
                            if (toAppend !== null) {
                                formData.append(key, toAppend);
                            }
                        }
                    }
                    else {
                        const toAppend = this.formDataValue(val);
                        if (toAppend !== null) {
                            formData.set(key, toAppend);
                        }
                    }
                }
            }
            this._bodyContent = formData;
        }
        else {
            // The body is the plain content
            this._bodyContent = value;
        }
    }
    formDataValue(value) {
        if (value === null || value === undefined) {
            return null;
        }
        if (value instanceof Blob) {
            return value;
        }
        if (typeof value === 'object') {
            return JSON.stringify(value);
        }
        return String(value);
    }
    /**
     * Builds the request with the current set parameters
     */
    build(options) {
        options = options || {};
        // Path parameters
        let path = this.operationPath;
        for (const pathParam of this._path.values()) {
            path = pathParam.append(path);
        }
        const url = this.rootUrl + path;
        // Query parameters
        let httpParams = new HttpParams({
            encoder: ParameterCodecInstance$2
        });
        for (const queryParam of this._query.values()) {
            httpParams = queryParam.append(httpParams);
        }
        // Header parameters
        let httpHeaders = new HttpHeaders();
        if (options.accept) {
            httpHeaders = httpHeaders.append('Accept', options.accept);
        }
        for (const headerParam of this._header.values()) {
            httpHeaders = headerParam.append(httpHeaders);
        }
        // Request content headers
        if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {
            httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);
        }
        // Perform the request
        return new HttpRequest(this.method.toUpperCase(), url, this._bodyContent, {
            params: httpParams,
            headers: httpHeaders,
            responseType: options.responseType,
            reportProgress: options.reportProgress,
            context: options.context
        });
    }
}

/* tslint:disable */
class TablaCatalogoControllerService extends BaseService$2 {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Realiza la actualizacion del registro en la tabla seleccionada.
     *
     * Realiza la actualizacion del registro en la tabla seleccionada
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `modificarRegistroDetalle()` instead.
     *
     * This method sends `application/json` and handles request body of type `application/json`.
     */
    modificarRegistroDetalle$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.ModificarRegistroDetallePath, 'put');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo1', params.codigo1, {});
            rb.path('codigo2', params.codigo2, {});
            rb.body(params.body, 'application/json');
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Realiza la actualizacion del registro en la tabla seleccionada.
     *
     * Realiza la actualizacion del registro en la tabla seleccionada
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `modificarRegistroDetalle$Response()` instead.
     *
     * This method sends `application/json` and handles request body of type `application/json`.
     */
    modificarRegistroDetalle(params) {
        return this.modificarRegistroDetalle$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Realiza el registro en la tabla seleccionada.
     *
     * Realiza el registro en la tabla seleccionada
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `crearRegistroDetalle()` instead.
     *
     * This method sends `application/json` and handles request body of type `application/json`.
     */
    crearRegistroDetalle$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.CrearRegistroDetallePath, 'post');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo1', params.codigo1, {});
            rb.path('codigo2', params.codigo2, {});
            rb.body(params.body, 'application/json');
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Realiza el registro en la tabla seleccionada.
     *
     * Realiza el registro en la tabla seleccionada
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `crearRegistroDetalle$Response()` instead.
     *
     * This method sends `application/json` and handles request body of type `application/json`.
     */
    crearRegistroDetalle(params) {
        return this.crearRegistroDetalle$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite realizar la busqueda de tablas tipo 1 , 2 , 3.
     *
     * Permite realizar la busqueda de tablas tipo 1 , 2 , 3.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `buscarTablaCatalogo()` instead.
     *
     * This method doesn't expect any request body.
     */
    buscarTablaCatalogo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.BuscarTablaCatalogoPath, 'get');
        if (params) {
            rb.query('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.query('tabla', params.tabla, {});
            rb.query('descripcion', params.descripcion, {});
            rb.query('tipo', params.tipo, {});
            rb.query('page', params.page, {});
            rb.query('page_size', params.page_size, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite realizar la busqueda de tablas tipo 1 , 2 , 3.
     *
     * Permite realizar la busqueda de tablas tipo 1 , 2 , 3.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `buscarTablaCatalogo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    buscarTablaCatalogo(params) {
        return this.buscarTablaCatalogo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los elementos del formulario de la tabla a dar mantenimiento.
     *
     * Permite listar los elementos del formulario de la tabla a dar mantenimiento
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarFormElement()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarFormElement$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.ListarFormElementPath, 'get');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los elementos del formulario de la tabla a dar mantenimiento.
     *
     * Permite listar los elementos del formulario de la tabla a dar mantenimiento
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarFormElement$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarFormElement(params) {
        return this.listarFormElement$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar todos los registros de la tabla catalogo a consultar.
     *
     * Permite listar todos los registros de la tabla catalogo a consultar.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDetalleTablaCatalogo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDetalleTablaCatalogo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.ListarDetalleTablaCatalogoPath, 'get');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo_padre', params.codigo_padre, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar todos los registros de la tabla catalogo a consultar.
     *
     * Permite listar todos los registros de la tabla catalogo a consultar.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDetalleTablaCatalogo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDetalleTablaCatalogo(params) {
        return this.listarDetalleTablaCatalogo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los registros de la tabla catalogo a consultar.
     *
     * Permite listar los registros de la tabla catalogo a consultar.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDetalleHistorico()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDetalleHistorico$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.ListarDetalleHistoricoPath, 'get');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo1', params.codigo1, {});
            rb.path('codigo2', params.codigo2, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los registros de la tabla catalogo a consultar.
     *
     * Permite listar los registros de la tabla catalogo a consultar.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDetalleHistorico$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDetalleHistorico(params) {
        return this.listarDetalleHistorico$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener los datos del registro de la tabla seleccionada.
     *
     * Permite obtener los datos del registro de la tabla seleccionada.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerRegistroDetalle()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerRegistroDetalle$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.ObtenerRegistroDetallePath, 'get');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo1', params.codigo1, {});
            rb.path('codigo2', params.codigo2, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener los datos del registro de la tabla seleccionada.
     *
     * Permite obtener los datos del registro de la tabla seleccionada.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerRegistroDetalle$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerRegistroDetalle(params) {
        return this.obtenerRegistroDetalle$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Realiza la anulación del registro en la tabla seleccionada.
     *
     * Realiza la anulación del registro en la tabla seleccionada
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `anularRegistroDetalle()` instead.
     *
     * This method doesn't expect any request body.
     */
    anularRegistroDetalle$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, TablaCatalogoControllerService.AnularRegistroDetallePath, 'delete');
        if (params) {
            rb.path('tabla_catalogo_id', params.tabla_catalogo_id, {});
            rb.path('codigo1', params.codigo1, {});
            rb.path('codigo2', params.codigo2, {});
            rb.path('terminal', params.terminal, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Realiza la anulación del registro en la tabla seleccionada.
     *
     * Realiza la anulación del registro en la tabla seleccionada
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `anularRegistroDetalle$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    anularRegistroDetalle(params) {
        return this.anularRegistroDetalle$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation modificarRegistroDetalle
 */
TablaCatalogoControllerService.ModificarRegistroDetallePath = '/catalogos/{tabla_catalogo_id}/{codigo1}/{codigo2}';
/**
 * Path part for operation crearRegistroDetalle
 */
TablaCatalogoControllerService.CrearRegistroDetallePath = '/catalogos/{tabla_catalogo_id}/{codigo1}/{codigo2}';
/**
 * Path part for operation buscarTablaCatalogo
 */
TablaCatalogoControllerService.BuscarTablaCatalogoPath = '/catalogos';
/**
 * Path part for operation listarFormElement
 */
TablaCatalogoControllerService.ListarFormElementPath = '/catalogos/listar-form-element/{tabla_catalogo_id}';
/**
 * Path part for operation listarDetalleTablaCatalogo
 */
TablaCatalogoControllerService.ListarDetalleTablaCatalogoPath = '/catalogos/listar-detalle/{tabla_catalogo_id}/{codigo_padre}';
/**
 * Path part for operation listarDetalleHistorico
 */
TablaCatalogoControllerService.ListarDetalleHistoricoPath = '/catalogos/listar-detalle-historico/{tabla_catalogo_id}/{codigo1}/{codigo2}';
/**
 * Path part for operation obtenerRegistroDetalle
 */
TablaCatalogoControllerService.ObtenerRegistroDetallePath = '/catalogos/detalle/{tabla_catalogo_id}/{codigo1}/{codigo2}';
/**
 * Path part for operation anularRegistroDetalle
 */
TablaCatalogoControllerService.AnularRegistroDetallePath = '/catalogos/{tabla_catalogo_id}/{codigo1}/{codigo2}/{terminal}';
TablaCatalogoControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TablaCatalogoControllerService, deps: [{ token: ApiConfiguration$2 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
TablaCatalogoControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TablaCatalogoControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TablaCatalogoControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration$2 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
class ComunesRegistroControllerService extends BaseService$2 {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Permite listar los datos comunes.
     *
     * Permite listar los datos comunes de la tabla de catálogo de registro
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listar()` instead.
     *
     * This method doesn't expect any request body.
     */
    listar$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarPath, 'get');
        if (params) {
            rb.path('codigo', params.codigo, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los datos comunes.
     *
     * Permite listar los datos comunes de la tabla de catálogo de registro
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listar$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listar(params) {
        return this.listar$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de zona urbana.
     *
     * Devuelve la lista de los tipos zona urbana por tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoZonaUrbana()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoZonaUrbana$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoZonaUrbanaPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de zona urbana.
     *
     * Devuelve la lista de los tipos zona urbana por tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoZonaUrbana$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoZonaUrbana(params) {
        return this.listarTipoZonaUrbana$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos zona influencia.
     *
     * Permite listar los tipos zona influencia
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarZonaInfluenciaTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarZonaInfluenciaTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarZonaInfluenciaTipoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos zona influencia.
     *
     * Permite listar los tipos zona influencia
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarZonaInfluenciaTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarZonaInfluenciaTipo(params) {
        return this.listarZonaInfluenciaTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de vía.
     *
     * Devuelve la lista de los tipos vía por tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoVia()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoVia$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoViaPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de vía.
     *
     * Devuelve la lista de los tipos vía por tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoVia$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoVia(params) {
        return this.listarTipoVia$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos de uso de arbitrios.
     *
     * Permite listar los tipos de uso de arbitrios
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoUsoArbitrio()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoUsoArbitrio$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoUsoArbitrioPath, 'get');
        if (params) {
            rb.path('anio', params.anio, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos de uso de arbitrios.
     *
     * Permite listar los tipos de uso de arbitrios
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoUsoArbitrio$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoUsoArbitrio(params) {
        return this.listarTipoUsoArbitrio$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de subzona urbana.
     *
     * Devuelve la lista de los tipos subzona urbana por tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoSubZonaUrbana()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoSubZonaUrbana$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoSubZonaUrbanaPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de subzona urbana.
     *
     * Devuelve la lista de los tipos subzona urbana por tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoSubZonaUrbana$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoSubZonaUrbana(params) {
        return this.listarTipoSubZonaUrbana$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de relacionado.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de relacionado
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoRelacionadoPorTipoPersona()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoRelacionadoPorTipoPersona$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoRelacionadoPorTipoPersonaPath, 'get');
        if (params) {
            rb.path('tipo_persona_id', params.tipo_persona_id, {});
            rb.path('fallecido', params.fallecido, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de relacionado.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de relacionado
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoRelacionadoPorTipoPersona$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoRelacionadoPorTipoPersona(params) {
        return this.listarTipoRelacionadoPorTipoPersona$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de propiedad por concepto de recaudación.
     *
     * Devuelve la lista de tipos de propiedad por concepto de recaudación
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoPropiedad()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoPropiedad$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoPropiedadPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de propiedad por concepto de recaudación.
     *
     * Devuelve la lista de tipos de propiedad por concepto de recaudación
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoPropiedad$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoPropiedad(params) {
        return this.listarTipoPropiedad$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos nivel de afluencia.
     *
     * Permite listar los tipos nivel de afluencia
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarNivelAfluenciaTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarNivelAfluenciaTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarNivelAfluenciaTipoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos nivel de afluencia.
     *
     * Permite listar los tipos nivel de afluencia
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarNivelAfluenciaTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarNivelAfluenciaTipo(params) {
        return this.listarNivelAfluenciaTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos de juegos por concepto de recaudación.
     *
     * Devuelve la lista de tipos de juegos por concepto de recaudación
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoJuegoRecaudacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoJuegoRecaudacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoJuegoRecaudacionPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos de juegos por concepto de recaudación.
     *
     * Devuelve la lista de tipos de juegos por concepto de recaudación
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoJuegoRecaudacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoJuegoRecaudacion(params) {
        return this.listarTipoJuegoRecaudacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de interior.
     *
     * Devuelve la lista de los tipos interior por tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoInterior()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoInterior$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoInteriorPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de interior.
     *
     * Devuelve la lista de los tipos interior por tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoInterior$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoInterior(params) {
        return this.listarTipoInterior$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de edificación.
     *
     * Devuelve la lista de los tipos edificación por tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoEdificacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoEdificacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoEdificacionPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de edificación.
     *
     * Devuelve la lista de los tipos edificación por tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoEdificacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoEdificacion(params) {
        return this.listarTipoEdificacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de documentos en registro por municipalidad.
     *
     * Permite listar tipos de documentos en registro por municipalidad
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDocumentoTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocumentoTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarDocumentoTipoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de documentos en registro por municipalidad.
     *
     * Permite listar tipos de documentos en registro por municipalidad
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDocumentoTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocumentoTipo(params) {
        return this.listarDocumentoTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de documento de sustento por concepto de recaudación.
     *
     * Devuelve la lista de documentos de sustento por concepto de recaudación y tipo de transferencia
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocumentoSustentoRecaudacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoRecaudacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocumentoSustentoRecaudacionPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
            rb.path('tipo_transferencia_id', params.tipo_transferencia_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de documento de sustento por concepto de recaudación.
     *
     * Devuelve la lista de documentos de sustento por concepto de recaudación y tipo de transferencia
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocumentoSustentoRecaudacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoRecaudacion(params) {
        return this.listarTipoDocumentoSustentoRecaudacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de documento de primera venta.
     *
     * Devuelve la lista de documentos de sustento por primera venta
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocumentoSustentoMotivoPrimeraVenta()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoMotivoPrimeraVenta$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocumentoSustentoMotivoPrimeraVentaPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
            rb.path('tipo_transferencia_id', params.tipo_transferencia_id, {});
            rb.path('motivo-primera_venta_id', params['motivo-primera_venta_id'], {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de documento de primera venta.
     *
     * Devuelve la lista de documentos de sustento por primera venta
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocumentoSustentoMotivoPrimeraVenta$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoMotivoPrimeraVenta(params) {
        return this.listarTipoDocumentoSustentoMotivoPrimeraVenta$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de documento de sustento por condición de inafectación.
     *
     * Devuelve la lista de documentos de sustento por condición de inafectación del Contribuyente
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocumentoSustentoCondicionInafectacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoCondicionInafectacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocumentoSustentoCondicionInafectacionPath, 'get');
        if (params) {
            rb.path('tipo_con_inafeccion_id', params.tipo_con_inafeccion_id, {});
            rb.path('tipo_con_concursal_id', params.tipo_con_concursal_id, {});
            rb.path('principal', params.principal, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de documento de sustento por condición de inafectación.
     *
     * Devuelve la lista de documentos de sustento por condición de inafectación del Contribuyente
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocumentoSustentoCondicionInafectacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoSustentoCondicionInafectacion(params) {
        return this.listarTipoDocumentoSustentoCondicionInafectacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar las condiciones según el tipo de predio.
     *
     * Devuelve una lista de las condiciones según el tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocumentoPorCondicion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoPorCondicion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocumentoPorCondicionPath, 'get');
        if (params) {
            rb.path('tipo_con_inafectacion_id', params.tipo_con_inafectacion_id, {});
            rb.path('tip_con_concursal_id', params.tip_con_concursal_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar las condiciones según el tipo de predio.
     *
     * Devuelve una lista de las condiciones según el tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocumentoPorCondicion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocumentoPorCondicion(params) {
        return this.listarTipoDocumentoPorCondicion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de sustento por condición de Predio.
     *
     * Permite listar los documentos de sustento por condición de Predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDocumentoTipoPorCondicionPredio()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocumentoTipoPorCondicionPredio$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarDocumentoTipoPorCondicionPredioPath, 'get');
        if (params) {
            rb.path('tip_con_predio_id', params.tip_con_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de sustento por condición de Predio.
     *
     * Permite listar los documentos de sustento por condición de Predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDocumentoTipoPorCondicionPredio$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocumentoTipoPorCondicionPredio(params) {
        return this.listarDocumentoTipoPorCondicionPredio$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos de juegos por concepto de recaudación.
     *
     * Devuelve la lista de tipos de juegos por concepto de recaudación
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDocSusConVehiculoTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSusConVehiculoTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarDocSusConVehiculoTipoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos de juegos por concepto de recaudación.
     *
     * Devuelve la lista de tipos de juegos por concepto de recaudación
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDocSusConVehiculoTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSusConVehiculoTipo(params) {
        return this.listarDocSusConVehiculoTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de identidad.
     *
     * Devuelve una lista de los documentos de identidad
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocIdentidad()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidad$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocIdentidadPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de identidad.
     *
     * Devuelve una lista de los documentos de identidad
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocIdentidad$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidad(params) {
        return this.listarTipoDocIdentidad$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de relacionado.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de relacionado
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocIdentidadPorTipoRelacionado()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidadPorTipoRelacionado$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocIdentidadPorTipoRelacionadoPath, 'get');
        if (params) {
            rb.path('tipo_relacionado_id', params.tipo_relacionado_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de relacionado.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de relacionado
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocIdentidadPorTipoRelacionado$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidadPorTipoRelacionado(params) {
        return this.listarTipoDocIdentidadPorTipoRelacionado$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de persona.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de persona
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoDocIdentidadPorTipoPersona()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidadPorTipoPersona$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoDocIdentidadPorTipoPersonaPath, 'get');
        if (params) {
            rb.path('tipo_persona_id', params.tipo_persona_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de identidad según el tipo de persona.
     *
     * Devuelve una lista de los documentos de identidad según el tipo de persona
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoDocIdentidadPorTipoPersona$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoDocIdentidadPorTipoPersona(params) {
        return this.listarTipoDocIdentidadPorTipoPersona$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los tipos de consulta para contribuyente.
     *
     * Permite listar los tipos de consulta para contribuyente
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoBusquedaContribuyente()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoBusquedaContribuyente$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoBusquedaContribuyentePath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los tipos de consulta para contribuyente.
     *
     * Permite listar los tipos de consulta para contribuyente
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoBusquedaContribuyente$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoBusquedaContribuyente(params) {
        return this.listarTipoBusquedaContribuyente$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar las condiciones según el tipo de predio.
     *
     * Devuelve una lista de las condiciones según el tipo de predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoCondicionPorTipoPredio()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionPorTipoPredio$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoCondicionPorTipoPredioPath, 'get');
        if (params) {
            rb.path('tipo_predio_id', params.tipo_predio_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar las condiciones según el tipo de predio.
     *
     * Devuelve una lista de las condiciones según el tipo de predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoCondicionPorTipoPredio$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionPorTipoPredio(params) {
        return this.listarTipoCondicionPorTipoPredio$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de condición de inafectación.
     *
     * Devuelve la lista de condición de inafectación por tipo de persona
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoCondicionInafectacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionInafectacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoCondicionInafectacionPath, 'get');
        if (params) {
            rb.path('tipo_persona_id', params.tipo_persona_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de condición de inafectación.
     *
     * Devuelve la lista de condición de inafectación por tipo de persona
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoCondicionInafectacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionInafectacion(params) {
        return this.listarTipoCondicionInafectacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de condición concursal por tipo de persona.
     *
     * Devuelve la lista de condición concursal por tipo de persona
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoCondicionConcursal()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionConcursal$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoCondicionConcursalPath, 'get');
        if (params) {
            rb.path('tipo_persona_id', params.tipo_persona_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de condición concursal por tipo de persona.
     *
     * Devuelve la lista de condición concursal por tipo de persona
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoCondicionConcursal$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoCondicionConcursal(params) {
        return this.listarTipoCondicionConcursal$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipo area verde.
     *
     * Permite listar tipo area verde
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarAreaVerdeTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarAreaVerdeTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarAreaVerdeTipoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipo area verde.
     *
     * Permite listar tipo area verde
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarAreaVerdeTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarAreaVerdeTipo(params) {
        return this.listarAreaVerdeTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de adquisición.
     *
     * Permite listar tipos de adquisición
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarTipoAdquisicion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoAdquisicion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarTipoAdquisicionPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de adquisición.
     *
     * Permite listar tipos de adquisición
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarTipoAdquisicion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarTipoAdquisicion(params) {
        return this.listarTipoAdquisicion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener la descripcion de un domicilio urbano.
     *
     * Permite obtener la descripcion de un domicilio urbano
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerDesDomicilioUrbano()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDesDomicilioUrbano$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ObtenerDesDomicilioUrbanoPath, 'get');
        if (params) {
            rb.path('departamento', params.departamento, {});
            rb.path('provincia', params.provincia, {});
            rb.path('distrito', params.distrito, {});
            rb.query('request', params.request, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener la descripcion de un domicilio urbano.
     *
     * Permite obtener la descripcion de un domicilio urbano
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerDesDomicilioUrbano$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDesDomicilioUrbano(params) {
        return this.obtenerDesDomicilioUrbano$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener la descripcion de un domicilio rustico.
     *
     * Permite obtener la descripcion de un domicilio rustico
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerDesDomicilioRustico()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDesDomicilioRustico$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ObtenerDesDomicilioRusticoPath, 'get');
        if (params) {
            rb.path('departamento', params.departamento, {});
            rb.path('provincia', params.provincia, {});
            rb.path('distrito', params.distrito, {});
            rb.query('request', params.request, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener la descripcion de un domicilio rustico.
     *
     * Permite obtener la descripcion de un domicilio rustico
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerDesDomicilioRustico$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDesDomicilioRustico(params) {
        return this.obtenerDesDomicilioRustico$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar Notarias por municipalidad.
     *
     * Permite listar Notarias por municipalidad
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarNotarias()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarNotarias$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarNotariasPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar Notarias por municipalidad.
     *
     * Permite listar Notarias por municipalidad
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarNotarias$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarNotarias(params) {
        return this.listarNotarias$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar modelos por marca de vehiculos.
     *
     * Permite listar modelos por marca de vehiculos
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarModeloMarca()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloMarca$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarModeloMarcaPath, 'get');
        if (params) {
            rb.path('cod_marca', params.cod_marca, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar modelos por marca de vehiculos.
     *
     * Permite listar modelos por marca de vehiculos
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarModeloMarca$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloMarca(params) {
        return this.listarModeloMarca$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de modelo oficial de vehiculos.
     *
     * Permite listar tipos de modelo oficial de vehiculos por Marca y Año
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarModeloOficialVehiculo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloOficialVehiculo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarModeloOficialVehiculoPath, 'get');
        if (params) {
            rb.path('marca_vehiculo', params.marca_vehiculo, {});
            rb.path('anio_fabricacion', params.anio_fabricacion, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de modelo oficial de vehiculos.
     *
     * Permite listar tipos de modelo oficial de vehiculos por Marca y Año
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarModeloOficialVehiculo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloOficialVehiculo(params) {
        return this.listarModeloOficialVehiculo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de modelo equivalente de vehiculos.
     *
     * Permite listar tipos de modelo equivalente de vehiculos por Marca y Año. Datos de MTC
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarModeloEquivalenteVehiculo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloEquivalenteVehiculo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarModeloEquivalenteVehiculoPath, 'get');
        if (params) {
            rb.path('marca_vehiculo', params.marca_vehiculo, {});
            rb.path('otra_marca', params.otra_marca, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de modelo equivalente de vehiculos.
     *
     * Permite listar tipos de modelo equivalente de vehiculos por Marca y Año. Datos de MTC
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarModeloEquivalenteVehiculo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarModeloEquivalenteVehiculo(params) {
        return this.listarModeloEquivalenteVehiculo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los medios de Determinación.
     *
     * Devuelve una lista de los medios de determinación según el medio de presentación
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarMedioDeterminacionPorMedioPresentacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMedioDeterminacionPorMedioPresentacion$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarMedioDeterminacionPorMedioPresentacionPath, 'get');
        if (params) {
            rb.path('tipo_medio_determina_id', params.tipo_medio_determina_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los medios de Determinación.
     *
     * Devuelve una lista de los medios de determinación según el medio de presentación
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarMedioDeterminacionPorMedioPresentacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMedioDeterminacionPorMedioPresentacion(params) {
        return this.listarMedioDeterminacionPorMedioPresentacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de marca oficial de vehiculos.
     *
     * Permite listar tipos de marca oficial de vehiculos por Marca y Año
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarMarcaOficialVehiculo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMarcaOficialVehiculo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarMarcaOficialVehiculoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de marca oficial de vehiculos.
     *
     * Permite listar tipos de marca oficial de vehiculos por Marca y Año
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarMarcaOficialVehiculo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMarcaOficialVehiculo(params) {
        return this.listarMarcaOficialVehiculo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de marca equivalente de vehiculos.
     *
     * Permite listar tipos de marca equivalente de vehiculos por Marca y Año, Datos de MTC
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarMarcaEquivalenteVehiculo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMarcaEquivalenteVehiculo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarMarcaEquivalenteVehiculoPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de marca equivalente de vehiculos.
     *
     * Permite listar tipos de marca equivalente de vehiculos por Marca y Año, Datos de MTC
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarMarcaEquivalenteVehiculo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarMarcaEquivalenteVehiculo(params) {
        return this.listarMarcaEquivalenteVehiculo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de sustento por condición de Vehículo.
     *
     * Permite listar los documentos de sustento por condición de Vehículo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDocSustentoPorCondicionVehiculo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSustentoPorCondicionVehiculo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarDocSustentoPorCondicionVehiculoPath, 'get');
        if (params) {
            rb.path('tip_con_vehiculo_id', params.tip_con_vehiculo_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de sustento por condición de Vehículo.
     *
     * Permite listar los documentos de sustento por condición de Vehículo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDocSustentoPorCondicionVehiculo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSustentoPorCondicionVehiculo(params) {
        return this.listarDocSustentoPorCondicionVehiculo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar categoria vehiculos.
     *
     * Permite listar categoria vehiculos
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarCategoria()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCategoria$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarCategoriaPath, 'get');
        if (params) {
            rb.path('cod_categoria', params.cod_categoria, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar categoria vehiculos.
     *
     * Permite listar categoria vehiculos
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarCategoria$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCategoria(params) {
        return this.listarCategoria$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los documentos de sustento por listado de ids.
     *
     * Permite listar los documentos de sustento por condición de Predio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarDocSustentoTipo()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSustentoTipo$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarDocSustentoTipoPath, 'get');
        if (params) {
            rb.path('arr_tip_doc_sustento_id', params.arr_tip_doc_sustento_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los documentos de sustento por listado de ids.
     *
     * Permite listar los documentos de sustento por condición de Predio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarDocSustentoTipo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarDocSustentoTipo(params) {
        return this.listarDocSustentoTipo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar condición de propiedad.
     *
     * Permite listar condición de propiedad
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarCondicionPropiedad()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCondicionPropiedad$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarCondicionPropiedadPath, 'get');
        if (params) {
            rb.path('con_recaudacion_id', params.con_recaudacion_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar condición de propiedad.
     *
     * Permite listar condición de propiedad
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarCondicionPropiedad$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCondicionPropiedad(params) {
        return this.listarCondicionPropiedad$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar las condiciones activas del contribuyente.
     *
     * Permite listar las condiciones activas del contribuyente
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarConContribuyente()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarConContribuyente$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarConContribuyentePath, 'get');
        if (params) {
            rb.path('contribuyente_numero', params.contribuyente_numero, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar las condiciones activas del contribuyente.
     *
     * Permite listar las condiciones activas del contribuyente
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarConContribuyente$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarConContribuyente(params) {
        return this.listarConContribuyente$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de Clase por el codigo de carroceria de vehiculos.
     *
     * Permite listar tipos de Clase por el codigo de carroceria de vehiculos
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarClasePorCarroceria()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarClasePorCarroceria$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarClasePorCarroceriaPath, 'get');
        if (params) {
            rb.path('carroceria_id', params.carroceria_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de Clase por el codigo de carroceria de vehiculos.
     *
     * Permite listar tipos de Clase por el codigo de carroceria de vehiculos
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarClasePorCarroceria$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarClasePorCarroceria(params) {
        return this.listarClasePorCarroceria$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar tipos de Categoria MEF por el codigo de clase de vehiculos.
     *
     * Permite listar tipos de Categoria por el codigo de clase de vehiculos
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarCategoriaPorClase()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCategoriaPorClase$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarCategoriaPorClasePath, 'get');
        if (params) {
            rb.path('clase_id', params.clase_id, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar tipos de Categoria MEF por el codigo de clase de vehiculos.
     *
     * Permite listar tipos de Categoria por el codigo de clase de vehiculos
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarCategoriaPorClase$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarCategoriaPorClase(params) {
        return this.listarCategoriaPorClase$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar area verde.
     *
     * Permite listar area verde
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarAreaVerde()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarAreaVerde$Response(params) {
        const rb = new RequestBuilder$2(this.rootUrl, ComunesRegistroControllerService.ListarAreaVerdePath, 'get');
        if (params) {
            rb.path('tipo_area_verde', params.tipo_area_verde, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar area verde.
     *
     * Permite listar area verde
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarAreaVerde$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarAreaVerde(params) {
        return this.listarAreaVerde$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation listar
 */
ComunesRegistroControllerService.ListarPath = '/comunesregistro/{codigo}';
/**
 * Path part for operation listarTipoZonaUrbana
 */
ComunesRegistroControllerService.ListarTipoZonaUrbanaPath = '/comunesregistro/tipo-zona-urbana/{tipo_predio_id}';
/**
 * Path part for operation listarZonaInfluenciaTipo
 */
ComunesRegistroControllerService.ListarZonaInfluenciaTipoPath = '/comunesregistro/tipo-zona-influencia';
/**
 * Path part for operation listarTipoVia
 */
ComunesRegistroControllerService.ListarTipoViaPath = '/comunesregistro/tipo-via/{tipo_predio_id}';
/**
 * Path part for operation listarTipoUsoArbitrio
 */
ComunesRegistroControllerService.ListarTipoUsoArbitrioPath = '/comunesregistro/tipo-uso-arbitrio/{anio}';
/**
 * Path part for operation listarTipoSubZonaUrbana
 */
ComunesRegistroControllerService.ListarTipoSubZonaUrbanaPath = '/comunesregistro/tipo-subzona-urbana/{tipo_predio_id}';
/**
 * Path part for operation listarTipoRelacionadoPorTipoPersona
 */
ComunesRegistroControllerService.ListarTipoRelacionadoPorTipoPersonaPath = '/comunesregistro/tipo-relacionado-por-tipo-persona/{tipo_persona_id}/{fallecido}';
/**
 * Path part for operation listarTipoPropiedad
 */
ComunesRegistroControllerService.ListarTipoPropiedadPath = '/comunesregistro/tipo-propiedad/{con_recaudacion_id}';
/**
 * Path part for operation listarNivelAfluenciaTipo
 */
ComunesRegistroControllerService.ListarNivelAfluenciaTipoPath = '/comunesregistro/tipo-nivel-afluencia';
/**
 * Path part for operation listarTipoJuegoRecaudacion
 */
ComunesRegistroControllerService.ListarTipoJuegoRecaudacionPath = '/comunesregistro/tipo-juego-recaudacion/{con_recaudacion_id}';
/**
 * Path part for operation listarTipoInterior
 */
ComunesRegistroControllerService.ListarTipoInteriorPath = '/comunesregistro/tipo-interior/{tipo_predio_id}';
/**
 * Path part for operation listarTipoEdificacion
 */
ComunesRegistroControllerService.ListarTipoEdificacionPath = '/comunesregistro/tipo-edificacion/{tipo_predio_id}';
/**
 * Path part for operation listarDocumentoTipo
 */
ComunesRegistroControllerService.ListarDocumentoTipoPath = '/comunesregistro/tipo-documento';
/**
 * Path part for operation listarTipoDocumentoSustentoRecaudacion
 */
ComunesRegistroControllerService.ListarTipoDocumentoSustentoRecaudacionPath = '/comunesregistro/tipo-documento-sustento-recaudacion/{con_recaudacion_id}/{tipo_transferencia_id}';
/**
 * Path part for operation listarTipoDocumentoSustentoMotivoPrimeraVenta
 */
ComunesRegistroControllerService.ListarTipoDocumentoSustentoMotivoPrimeraVentaPath = '/comunesregistro/tipo-documento-sustento-motivo-primera-venta/{con_recaudacion_id}/{tipo_transferencia_id}/{motivo-primera_venta_id}';
/**
 * Path part for operation listarTipoDocumentoSustentoCondicionInafectacion
 */
ComunesRegistroControllerService.ListarTipoDocumentoSustentoCondicionInafectacionPath = '/comunesregistro/tipo-documento-sustento-condicion-inafectacion/{tipo_con_inafeccion_id}/{tipo_con_concursal_id}/{principal}';
/**
 * Path part for operation listarTipoDocumentoPorCondicion
 */
ComunesRegistroControllerService.ListarTipoDocumentoPorCondicionPath = '/comunesregistro/tipo-documento-por-condicion/{tipo_con_inafectacion_id}/{tip_con_concursal_id}';
/**
 * Path part for operation listarDocumentoTipoPorCondicionPredio
 */
ComunesRegistroControllerService.ListarDocumentoTipoPorCondicionPredioPath = '/comunesregistro/tipo-documento-por-condicion-predio/{tip_con_predio_id}';
/**
 * Path part for operation listarDocSusConVehiculoTipo
 */
ComunesRegistroControllerService.ListarDocSusConVehiculoTipoPath = '/comunesregistro/tipo-doc-sus-vehiculo/{con_recaudacion_id}';
/**
 * Path part for operation listarTipoDocIdentidad
 */
ComunesRegistroControllerService.ListarTipoDocIdentidadPath = '/comunesregistro/tipo-doc-identidad';
/**
 * Path part for operation listarTipoDocIdentidadPorTipoRelacionado
 */
ComunesRegistroControllerService.ListarTipoDocIdentidadPorTipoRelacionadoPath = '/comunesregistro/tipo-doc-identidad-por-tipo-relacionado/{tipo_relacionado_id}';
/**
 * Path part for operation listarTipoDocIdentidadPorTipoPersona
 */
ComunesRegistroControllerService.ListarTipoDocIdentidadPorTipoPersonaPath = '/comunesregistro/tipo-doc-identidad-por-tipo-persona/{tipo_persona_id}';
/**
 * Path part for operation listarTipoBusquedaContribuyente
 */
ComunesRegistroControllerService.ListarTipoBusquedaContribuyentePath = '/comunesregistro/tipo-consulta-contribuyente';
/**
 * Path part for operation listarTipoCondicionPorTipoPredio
 */
ComunesRegistroControllerService.ListarTipoCondicionPorTipoPredioPath = '/comunesregistro/tipo-condicion-por-tipo-predio/{tipo_predio_id}';
/**
 * Path part for operation listarTipoCondicionInafectacion
 */
ComunesRegistroControllerService.ListarTipoCondicionInafectacionPath = '/comunesregistro/tipo-condicion-inafectacion/{tipo_persona_id}';
/**
 * Path part for operation listarTipoCondicionConcursal
 */
ComunesRegistroControllerService.ListarTipoCondicionConcursalPath = '/comunesregistro/tipo-condicion-concursal/{tipo_persona_id}';
/**
 * Path part for operation listarAreaVerdeTipo
 */
ComunesRegistroControllerService.ListarAreaVerdeTipoPath = '/comunesregistro/tipo-area-verde';
/**
 * Path part for operation listarTipoAdquisicion
 */
ComunesRegistroControllerService.ListarTipoAdquisicionPath = '/comunesregistro/tipo-adquisicion/{con_recaudacion_id}';
/**
 * Path part for operation obtenerDesDomicilioUrbano
 */
ComunesRegistroControllerService.ObtenerDesDomicilioUrbanoPath = '/comunesregistro/obtener-domicilio-urbano-lineal/{departamento}/{provincia}/{distrito}';
/**
 * Path part for operation obtenerDesDomicilioRustico
 */
ComunesRegistroControllerService.ObtenerDesDomicilioRusticoPath = '/comunesregistro/obtener-domicilio-rustico-lineal/{departamento}/{provincia}/{distrito}';
/**
 * Path part for operation listarNotarias
 */
ComunesRegistroControllerService.ListarNotariasPath = '/comunesregistro/notarias';
/**
 * Path part for operation listarModeloMarca
 */
ComunesRegistroControllerService.ListarModeloMarcaPath = '/comunesregistro/modelo-vehiculo/{cod_marca}';
/**
 * Path part for operation listarModeloOficialVehiculo
 */
ComunesRegistroControllerService.ListarModeloOficialVehiculoPath = '/comunesregistro/modelo-oficial-vehiculo/{marca_vehiculo}/{anio_fabricacion}';
/**
 * Path part for operation listarModeloEquivalenteVehiculo
 */
ComunesRegistroControllerService.ListarModeloEquivalenteVehiculoPath = '/comunesregistro/modelo-equivalente-vehiculo/{marca_vehiculo}/{otra_marca}';
/**
 * Path part for operation listarMedioDeterminacionPorMedioPresentacion
 */
ComunesRegistroControllerService.ListarMedioDeterminacionPorMedioPresentacionPath = '/comunesregistro/medio-determinacion/{tipo_medio_determina_id}';
/**
 * Path part for operation listarMarcaOficialVehiculo
 */
ComunesRegistroControllerService.ListarMarcaOficialVehiculoPath = '/comunesregistro/marca-oficial-vehiculo';
/**
 * Path part for operation listarMarcaEquivalenteVehiculo
 */
ComunesRegistroControllerService.ListarMarcaEquivalenteVehiculoPath = '/comunesregistro/marca-equivalente-vehiculo';
/**
 * Path part for operation listarDocSustentoPorCondicionVehiculo
 */
ComunesRegistroControllerService.ListarDocSustentoPorCondicionVehiculoPath = '/comunesregistro/listar-sustento-condicion-vehiculo/{tip_con_vehiculo_id}';
/**
 * Path part for operation listarCategoria
 */
ComunesRegistroControllerService.ListarCategoriaPath = '/comunesregistro/lista-categoria-vehiculo/{cod_categoria}';
/**
 * Path part for operation listarDocSustentoTipo
 */
ComunesRegistroControllerService.ListarDocSustentoTipoPath = '/comunesregistro/doc-sustento_tipo/{arr_tip_doc_sustento_id}';
/**
 * Path part for operation listarCondicionPropiedad
 */
ComunesRegistroControllerService.ListarCondicionPropiedadPath = '/comunesregistro/condicion-propiedad/{con_recaudacion_id}';
/**
 * Path part for operation listarConContribuyente
 */
ComunesRegistroControllerService.ListarConContribuyentePath = '/comunesregistro/condicion-contribuyente/{contribuyente_numero}';
/**
 * Path part for operation listarClasePorCarroceria
 */
ComunesRegistroControllerService.ListarClasePorCarroceriaPath = '/comunesregistro/clase-vehiculo/{carroceria_id}';
/**
 * Path part for operation listarCategoriaPorClase
 */
ComunesRegistroControllerService.ListarCategoriaPorClasePath = '/comunesregistro/categoria-vehiculo/{clase_id}';
/**
 * Path part for operation listarAreaVerde
 */
ComunesRegistroControllerService.ListarAreaVerdePath = '/comunesregistro/area-verde/{tipo_area_verde}';
ComunesRegistroControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ComunesRegistroControllerService, deps: [{ token: ApiConfiguration$2 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
ComunesRegistroControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ComunesRegistroControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ComunesRegistroControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration$2 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
/**
 * Global configuration
 */
class ApiConfiguration$1 {
    constructor() {
        this.rootUrl = 'https://apps2desa.mineco.gob.pe/v1/nsrtm-services/parametrocomun';
    }
}
ApiConfiguration$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$1, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ApiConfiguration$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$1, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration$1, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }] });

/* tslint:disable */
/**
 * Base class for services
 */
class BaseService$1 {
    constructor(config, http) {
        this.config = config;
        this.http = http;
        this._rootUrl = '';
    }
    /**
     * Returns the root url for all operations in this service. If not set directly in this
     * service, will fallback to `ApiConfiguration.rootUrl`.
     */
    get rootUrl() {
        return this._rootUrl || this.config.rootUrl;
    }
    /**
     * Sets the root URL for API operations in this service.
     */
    set rootUrl(rootUrl) {
        this._rootUrl = rootUrl;
    }
}
BaseService$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$1, deps: [{ token: ApiConfiguration$1 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
BaseService$1.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$1 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService$1, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: ApiConfiguration$1 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
/**
 * Custom parameter codec to correctly handle the plus sign in parameter
 * values. See https://github.com/angular/angular/issues/18261
 */
class ParameterCodec$1 {
    encodeKey(key) {
        return encodeURIComponent(key);
    }
    encodeValue(value) {
        return encodeURIComponent(value);
    }
    decodeKey(key) {
        return decodeURIComponent(key);
    }
    decodeValue(value) {
        return decodeURIComponent(value);
    }
}
const ParameterCodecInstance$1 = new ParameterCodec$1();
/**
 * Base class for a parameter
 */
class Parameter$1 {
    constructor(name, value, options, defaultStyle, defaultExplode) {
        this.name = name;
        this.value = value;
        this.options = options;
        this.options = options || {};
        if (this.options.style === null || this.options.style === undefined) {
            this.options.style = defaultStyle;
        }
        if (this.options.explode === null || this.options.explode === undefined) {
            this.options.explode = defaultExplode;
        }
    }
    serializeValue(value, separator = ',') {
        if (value === null || value === undefined) {
            return '';
        }
        else if (value instanceof Array) {
            return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);
        }
        else if (typeof value === 'object') {
            const array = [];
            for (const key of Object.keys(value)) {
                let propVal = value[key];
                if (propVal !== null && propVal !== undefined) {
                    propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));
                    if (this.options.explode) {
                        array.push(`${key}=${propVal}`);
                    }
                    else {
                        array.push(key);
                        array.push(propVal);
                    }
                }
            }
            return array.join(separator);
        }
        else {
            return String(value);
        }
    }
}
/**
 * A parameter in the operation path
 */
class PathParameter$1 extends Parameter$1 {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(path) {
        let value = this.value;
        if (value === null || value === undefined) {
            value = '';
        }
        let prefix = this.options.style === 'label' ? '.' : '';
        let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';
        let alreadySerialized = false;
        if (this.options.style === 'matrix') {
            // The parameter name is just used as prefix, except in some cases...
            prefix = `;${this.name}=`;
            if (this.options.explode && typeof value === 'object') {
                prefix = ';';
                if (value instanceof Array) {
                    // For arrays we have to repeat the name for each element
                    value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);
                    value = value.join(';');
                    alreadySerialized = true;
                }
                else {
                    // For objects we have to put each the key / value pairs
                    value = this.serializeValue(value, ';');
                    alreadySerialized = true;
                }
            }
        }
        value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));
        // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account
        path = path.replace(`{${this.name}}`, value);
        path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);
        return path;
    }
    // @ts-ignore
    serializeValue(value, separator = ',') {
        var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);
        result = result.replace(/%3D/g, '=');
        result = result.replace(/%3B/g, ';');
        result = result.replace(/%2C/g, ',');
        return result;
    }
}
/**
 * A parameter in the query
 */
class QueryParameter$1 extends Parameter$1 {
    constructor(name, value, options) {
        super(name, value, options, 'form', true);
    }
    append(params) {
        if (this.value instanceof Array) {
            // Array serialization
            if (this.options.explode) {
                for (const v of this.value) {
                    params = params.append(this.name, this.serializeValue(v));
                }
            }
            else {
                const separator = this.options.style === 'spaceDelimited'
                    ? ' ' : this.options.style === 'pipeDelimited'
                    ? '|' : ',';
                return params.append(this.name, this.serializeValue(this.value, separator));
            }
        }
        else if (this.value !== null && typeof this.value === 'object') {
            // Object serialization
            if (this.options.style === 'deepObject') {
                // Append a parameter for each key, in the form `name[key]`
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));
                    }
                }
            }
            else if (this.options.explode) {
                // Append a parameter for each key without using the parameter name
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(key, this.serializeValue(propVal));
                    }
                }
            }
            else {
                // Append a single parameter whose values are a comma-separated list of key,value,key,value...
                const array = [];
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        array.push(key);
                        array.push(propVal);
                    }
                }
                params = params.append(this.name, this.serializeValue(array));
            }
        }
        else if (this.value !== null && this.value !== undefined) {
            // Plain value
            params = params.append(this.name, this.serializeValue(this.value));
        }
        return params;
    }
}
/**
 * A parameter in the HTTP request header
 */
class HeaderParameter$1 extends Parameter$1 {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(headers) {
        if (this.value !== null && this.value !== undefined) {
            if (this.value instanceof Array) {
                for (const v of this.value) {
                    headers = headers.append(this.name, this.serializeValue(v));
                }
            }
            else {
                headers = headers.append(this.name, this.serializeValue(this.value));
            }
        }
        return headers;
    }
}
/**
 * Helper to build http requests from parameters
 */
class RequestBuilder$1 {
    constructor(rootUrl, operationPath, method) {
        this.rootUrl = rootUrl;
        this.operationPath = operationPath;
        this.method = method;
        this._path = new Map();
        this._query = new Map();
        this._header = new Map();
    }
    /**
     * Sets a path parameter
     */
    path(name, value, options) {
        this._path.set(name, new PathParameter$1(name, value, options || {}));
    }
    /**
     * Sets a query parameter
     */
    query(name, value, options) {
        this._query.set(name, new QueryParameter$1(name, value, options || {}));
    }
    /**
     * Sets a header parameter
     */
    header(name, value, options) {
        this._header.set(name, new HeaderParameter$1(name, value, options || {}));
    }
    /**
     * Sets the body content, along with the content type
     */
    body(value, contentType = 'application/json') {
        if (value instanceof Blob) {
            this._bodyContentType = value.type;
        }
        else {
            this._bodyContentType = contentType;
        }
        if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {
            // Handle URL-encoded data
            const pairs = [];
            for (const key of Object.keys(value)) {
                let val = value[key];
                if (!(val instanceof Array)) {
                    val = [val];
                }
                for (const v of val) {
                    const formValue = this.formDataValue(v);
                    if (formValue !== null) {
                        pairs.push([key, formValue]);
                    }
                }
            }
            this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');
        }
        else if (this._bodyContentType === 'multipart/form-data') {
            // Handle multipart form data
            const formData = new FormData();
            if (value !== null && value !== undefined) {
                for (const key of Object.keys(value)) {
                    const val = value[key];
                    if (val instanceof Array) {
                        for (const v of val) {
                            const toAppend = this.formDataValue(v);
                            if (toAppend !== null) {
                                formData.append(key, toAppend);
                            }
                        }
                    }
                    else {
                        const toAppend = this.formDataValue(val);
                        if (toAppend !== null) {
                            formData.set(key, toAppend);
                        }
                    }
                }
            }
            this._bodyContent = formData;
        }
        else {
            // The body is the plain content
            this._bodyContent = value;
        }
    }
    formDataValue(value) {
        if (value === null || value === undefined) {
            return null;
        }
        if (value instanceof Blob) {
            return value;
        }
        if (typeof value === 'object') {
            return JSON.stringify(value);
        }
        return String(value);
    }
    /**
     * Builds the request with the current set parameters
     */
    build(options) {
        options = options || {};
        // Path parameters
        let path = this.operationPath;
        for (const pathParam of this._path.values()) {
            path = pathParam.append(path);
        }
        const url = this.rootUrl + path;
        // Query parameters
        let httpParams = new HttpParams({
            encoder: ParameterCodecInstance$1
        });
        for (const queryParam of this._query.values()) {
            httpParams = queryParam.append(httpParams);
        }
        // Header parameters
        let httpHeaders = new HttpHeaders();
        if (options.accept) {
            httpHeaders = httpHeaders.append('Accept', options.accept);
        }
        for (const headerParam of this._header.values()) {
            httpHeaders = headerParam.append(httpHeaders);
        }
        // Request content headers
        if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {
            httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);
        }
        // Perform the request
        return new HttpRequest(this.method.toUpperCase(), url, this._bodyContent, {
            params: httpParams,
            headers: httpHeaders,
            responseType: options.responseType,
            reportProgress: options.reportProgress,
            context: options.context
        });
    }
}

/* tslint:disable */
class ParametroComunControllerService extends BaseService$1 {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Permite obtener los datos de un parámetro.
     *
     * Permite obtener los datos de un parámetro según Municipalidad y aplicación.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarPorMunicipalidadAplicacion()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarPorMunicipalidadAplicacion$Response(params) {
        const rb = new RequestBuilder$1(this.rootUrl, ParametroComunControllerService.ListarPorMunicipalidadAplicacionPath, 'get');
        if (params) {
            rb.path('aplicacionId', params.aplicacionId, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener los datos de un parámetro.
     *
     * Permite obtener los datos de un parámetro según Municipalidad y aplicación.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarPorMunicipalidadAplicacion$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarPorMunicipalidadAplicacion(params) {
        return this.listarPorMunicipalidadAplicacion$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener los datos de un parámetro.
     *
     * Permite obtener los datos de un parámetro según Municipalidad, aplicación y id del parámetro.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `consultar()` instead.
     *
     * This method doesn't expect any request body.
     */
    consultar$Response(params) {
        const rb = new RequestBuilder$1(this.rootUrl, ParametroComunControllerService.ConsultarPath, 'get');
        if (params) {
            rb.path('aplicacionId', params.aplicacionId, {});
            rb.path('parametroId', params.parametroId, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener los datos de un parámetro.
     *
     * Permite obtener los datos de un parámetro según Municipalidad, aplicación y id del parámetro.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `consultar$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    consultar(params) {
        return this.consultar$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener los datos de un tipo de parámetro.
     *
     * Permite obtener los datos de un tipo de parámetro según modulo y tipo parámetro.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `consultarParametroGlobal()` instead.
     *
     * This method doesn't expect any request body.
     */
    consultarParametroGlobal$Response(params) {
        const rb = new RequestBuilder$1(this.rootUrl, ParametroComunControllerService.ConsultarParametroGlobalPath, 'get');
        if (params) {
            rb.path('moduloId', params.moduloId, {});
            rb.path('tipoParametroId', params.tipoParametroId, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener los datos de un tipo de parámetro.
     *
     * Permite obtener los datos de un tipo de parámetro según modulo y tipo parámetro.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `consultarParametroGlobal$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    consultarParametroGlobal(params) {
        return this.consultarParametroGlobal$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite obtener todos los parámetros de sistema.
     *
     * Permite obtener todos los parámetros de sistema.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listar()` instead.
     *
     * This method doesn't expect any request body.
     */
    listar$Response(params) {
        const rb = new RequestBuilder$1(this.rootUrl, ParametroComunControllerService.ListarPath, 'get');
        if (params) {
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite obtener todos los parámetros de sistema.
     *
     * Permite obtener todos los parámetros de sistema.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listar$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listar(params) {
        return this.listar$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation listarPorMunicipalidadAplicacion
 */
ParametroComunControllerService.ListarPorMunicipalidadAplicacionPath = '/parametros/{aplicacionId}';
/**
 * Path part for operation consultar
 */
ParametroComunControllerService.ConsultarPath = '/parametros/{aplicacionId}/{parametroId}';
/**
 * Path part for operation consultarParametroGlobal
 */
ParametroComunControllerService.ConsultarParametroGlobalPath = '/parametros/consultar-global/{moduloId}/{tipoParametroId}';
/**
 * Path part for operation listar
 */
ParametroComunControllerService.ListarPath = '/parametros/';
ParametroComunControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ParametroComunControllerService, deps: [{ token: ApiConfiguration$1 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
ParametroComunControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ParametroComunControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ParametroComunControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration$1 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
class CacheControllerService extends BaseService$1 {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Limpia la CACHE de los Párametros del sistema.
     *
     * Limpia la CACHE de los Párametros según el nombre del mismo.
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `clearCache()` instead.
     *
     * This method doesn't expect any request body.
     */
    clearCache$Response(params) {
        const rb = new RequestBuilder$1(this.rootUrl, CacheControllerService.ClearCachePath, 'get');
        if (params) {
            rb.path('cacheName', params.cacheName, {});
        }
        return this.http.request(rb.build({
            responseType: 'blob',
            accept: '*/*',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Limpia la CACHE de los Párametros del sistema.
     *
     * Limpia la CACHE de los Párametros según el nombre del mismo.
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `clearCache$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    clearCache(params) {
        return this.clearCache$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation clearCache
 */
CacheControllerService.ClearCachePath = '/cache/clear/{cacheName}';
CacheControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CacheControllerService, deps: [{ token: ApiConfiguration$1 }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
CacheControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CacheControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CacheControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration$1 }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
/**
 * Global configuration
 */
class ApiConfiguration {
    constructor() {
        this.rootUrl = 'https://apps2desa.mineco.gob.pe/v1/nsrtm-services/gestionarchivo';
    }
}
ApiConfiguration.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ApiConfiguration.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ApiConfiguration, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }] });

/* tslint:disable */
/**
 * Base class for services
 */
class BaseService {
    constructor(config, http) {
        this.config = config;
        this.http = http;
        this._rootUrl = '';
    }
    /**
     * Returns the root url for all operations in this service. If not set directly in this
     * service, will fallback to `ApiConfiguration.rootUrl`.
     */
    get rootUrl() {
        return this._rootUrl || this.config.rootUrl;
    }
    /**
     * Sets the root URL for API operations in this service.
     */
    set rootUrl(rootUrl) {
        this._rootUrl = rootUrl;
    }
}
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService, deps: [{ token: ApiConfiguration }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseService, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: ApiConfiguration }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
/**
 * Custom parameter codec to correctly handle the plus sign in parameter
 * values. See https://github.com/angular/angular/issues/18261
 */
class ParameterCodec {
    encodeKey(key) {
        return encodeURIComponent(key);
    }
    encodeValue(value) {
        return encodeURIComponent(value);
    }
    decodeKey(key) {
        return decodeURIComponent(key);
    }
    decodeValue(value) {
        return decodeURIComponent(value);
    }
}
const ParameterCodecInstance = new ParameterCodec();
/**
 * Base class for a parameter
 */
class Parameter {
    constructor(name, value, options, defaultStyle, defaultExplode) {
        this.name = name;
        this.value = value;
        this.options = options;
        this.options = options || {};
        if (this.options.style === null || this.options.style === undefined) {
            this.options.style = defaultStyle;
        }
        if (this.options.explode === null || this.options.explode === undefined) {
            this.options.explode = defaultExplode;
        }
    }
    serializeValue(value, separator = ',') {
        if (value === null || value === undefined) {
            return '';
        }
        else if (value instanceof Array) {
            return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator);
        }
        else if (typeof value === 'object') {
            const array = [];
            for (const key of Object.keys(value)) {
                let propVal = value[key];
                if (propVal !== null && propVal !== undefined) {
                    propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator));
                    if (this.options.explode) {
                        array.push(`${key}=${propVal}`);
                    }
                    else {
                        array.push(key);
                        array.push(propVal);
                    }
                }
            }
            return array.join(separator);
        }
        else {
            return String(value);
        }
    }
}
/**
 * A parameter in the operation path
 */
class PathParameter extends Parameter {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(path) {
        let value = this.value;
        if (value === null || value === undefined) {
            value = '';
        }
        let prefix = this.options.style === 'label' ? '.' : '';
        let separator = this.options.explode ? prefix === '' ? ',' : prefix : ',';
        let alreadySerialized = false;
        if (this.options.style === 'matrix') {
            // The parameter name is just used as prefix, except in some cases...
            prefix = `;${this.name}=`;
            if (this.options.explode && typeof value === 'object') {
                prefix = ';';
                if (value instanceof Array) {
                    // For arrays we have to repeat the name for each element
                    value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`);
                    value = value.join(';');
                    alreadySerialized = true;
                }
                else {
                    // For objects we have to put each the key / value pairs
                    value = this.serializeValue(value, ';');
                    alreadySerialized = true;
                }
            }
        }
        value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator));
        // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account
        path = path.replace(`{${this.name}}`, value);
        path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value);
        return path;
    }
    // @ts-ignore
    serializeValue(value, separator = ',') {
        var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator);
        result = result.replace(/%3D/g, '=');
        result = result.replace(/%3B/g, ';');
        result = result.replace(/%2C/g, ',');
        return result;
    }
}
/**
 * A parameter in the query
 */
class QueryParameter extends Parameter {
    constructor(name, value, options) {
        super(name, value, options, 'form', true);
    }
    append(params) {
        if (this.value instanceof Array) {
            // Array serialization
            if (this.options.explode) {
                for (const v of this.value) {
                    params = params.append(this.name, this.serializeValue(v));
                }
            }
            else {
                const separator = this.options.style === 'spaceDelimited'
                    ? ' ' : this.options.style === 'pipeDelimited'
                    ? '|' : ',';
                return params.append(this.name, this.serializeValue(this.value, separator));
            }
        }
        else if (this.value !== null && typeof this.value === 'object') {
            // Object serialization
            if (this.options.style === 'deepObject') {
                // Append a parameter for each key, in the form `name[key]`
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal));
                    }
                }
            }
            else if (this.options.explode) {
                // Append a parameter for each key without using the parameter name
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        params = params.append(key, this.serializeValue(propVal));
                    }
                }
            }
            else {
                // Append a single parameter whose values are a comma-separated list of key,value,key,value...
                const array = [];
                for (const key of Object.keys(this.value)) {
                    const propVal = this.value[key];
                    if (propVal !== null && propVal !== undefined) {
                        array.push(key);
                        array.push(propVal);
                    }
                }
                params = params.append(this.name, this.serializeValue(array));
            }
        }
        else if (this.value !== null && this.value !== undefined) {
            // Plain value
            params = params.append(this.name, this.serializeValue(this.value));
        }
        return params;
    }
}
/**
 * A parameter in the HTTP request header
 */
class HeaderParameter extends Parameter {
    constructor(name, value, options) {
        super(name, value, options, 'simple', false);
    }
    append(headers) {
        if (this.value !== null && this.value !== undefined) {
            if (this.value instanceof Array) {
                for (const v of this.value) {
                    headers = headers.append(this.name, this.serializeValue(v));
                }
            }
            else {
                headers = headers.append(this.name, this.serializeValue(this.value));
            }
        }
        return headers;
    }
}
/**
 * Helper to build http requests from parameters
 */
class RequestBuilder {
    constructor(rootUrl, operationPath, method) {
        this.rootUrl = rootUrl;
        this.operationPath = operationPath;
        this.method = method;
        this._path = new Map();
        this._query = new Map();
        this._header = new Map();
    }
    /**
     * Sets a path parameter
     */
    path(name, value, options) {
        this._path.set(name, new PathParameter(name, value, options || {}));
    }
    /**
     * Sets a query parameter
     */
    query(name, value, options) {
        this._query.set(name, new QueryParameter(name, value, options || {}));
    }
    /**
     * Sets a header parameter
     */
    header(name, value, options) {
        this._header.set(name, new HeaderParameter(name, value, options || {}));
    }
    /**
     * Sets the body content, along with the content type
     */
    body(value, contentType = 'application/json') {
        if (value instanceof Blob) {
            this._bodyContentType = value.type;
        }
        else {
            this._bodyContentType = contentType;
        }
        if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') {
            // Handle URL-encoded data
            const pairs = [];
            for (const key of Object.keys(value)) {
                let val = value[key];
                if (!(val instanceof Array)) {
                    val = [val];
                }
                for (const v of val) {
                    const formValue = this.formDataValue(v);
                    if (formValue !== null) {
                        pairs.push([key, formValue]);
                    }
                }
            }
            this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&');
        }
        else if (this._bodyContentType === 'multipart/form-data') {
            // Handle multipart form data
            const formData = new FormData();
            if (value !== null && value !== undefined) {
                for (const key of Object.keys(value)) {
                    const val = value[key];
                    if (val instanceof Array) {
                        for (const v of val) {
                            const toAppend = this.formDataValue(v);
                            if (toAppend !== null) {
                                formData.append(key, toAppend);
                            }
                        }
                    }
                    else {
                        const toAppend = this.formDataValue(val);
                        if (toAppend !== null) {
                            formData.set(key, toAppend);
                        }
                    }
                }
            }
            this._bodyContent = formData;
        }
        else {
            // The body is the plain content
            this._bodyContent = value;
        }
    }
    formDataValue(value) {
        if (value === null || value === undefined) {
            return null;
        }
        if (value instanceof Blob) {
            return value;
        }
        if (typeof value === 'object') {
            return JSON.stringify(value);
        }
        return String(value);
    }
    /**
     * Builds the request with the current set parameters
     */
    build(options) {
        options = options || {};
        // Path parameters
        let path = this.operationPath;
        for (const pathParam of this._path.values()) {
            path = pathParam.append(path);
        }
        const url = this.rootUrl + path;
        // Query parameters
        let httpParams = new HttpParams({
            encoder: ParameterCodecInstance
        });
        for (const queryParam of this._query.values()) {
            httpParams = queryParam.append(httpParams);
        }
        // Header parameters
        let httpHeaders = new HttpHeaders();
        if (options.accept) {
            httpHeaders = httpHeaders.append('Accept', options.accept);
        }
        for (const headerParam of this._header.values()) {
            httpHeaders = headerParam.append(httpHeaders);
        }
        // Request content headers
        if (this._bodyContentType && !(this._bodyContent instanceof FormData)) {
            httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType);
        }
        // Perform the request
        return new HttpRequest(this.method.toUpperCase(), url, this._bodyContent, {
            params: httpParams,
            headers: httpHeaders,
            responseType: options.responseType,
            reportProgress: options.reportProgress,
            context: options.context
        });
    }
}

/* tslint:disable */
class GestionArchivoControllerService extends BaseService {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Agregar archivo.
     *
     * Permite agregar directorio
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `agregarArchivo()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    agregarArchivo$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.AgregarArchivoPath, 'post');
        if (params) {
            rb.body(params.body, 'multipart/form-data');
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Agregar archivo.
     *
     * Permite agregar directorio
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `agregarArchivo$Response()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    agregarArchivo(params) {
        return this.agregarArchivo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Cargar archivo por funcionalidad.
     *
     * Permite Cargar archivo por funcionalidad
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `cargarArchivoTrama()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    cargarArchivoTrama$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.CargarArchivoTramaPath, 'post');
        if (params) {
            rb.body(params.body, 'multipart/form-data');
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Cargar archivo por funcionalidad.
     *
     * Permite Cargar archivo por funcionalidad
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `cargarArchivoTrama$Response()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    cargarArchivoTrama(params) {
        return this.cargarArchivoTrama$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite la carga de archivos masivo.
     *
     * Permite la carga de archivos masivo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `cargarArchivosMasivo()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    cargarArchivosMasivo$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.CargarArchivosMasivoPath, 'post');
        if (params) {
            rb.body(params.body, 'multipart/form-data');
        }
        return this.http.request(rb.build({
            responseType: 'text',
            accept: '*/*',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r.clone({ body: undefined });
        }));
    }
    /**
     * Permite la carga de archivos masivo.
     *
     * Permite la carga de archivos masivo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `cargarArchivosMasivo$Response()` instead.
     *
     * This method sends `multipart/form-data` and handles request body of type `multipart/form-data`.
     */
    cargarArchivosMasivo(params) {
        return this.cargarArchivosMasivo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Retorna el detalle del archivo.
     *
     * Permite obtener el detalle de un archivo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerDetalleArchivo()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDetalleArchivo$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.ObtenerDetalleArchivoPath, 'get');
        if (params) {
            rb.query('id_archivo', params.id_archivo, {});
            rb.query('anio', params.anio, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Retorna el detalle del archivo.
     *
     * Permite obtener el detalle de un archivo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerDetalleArchivo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerDetalleArchivo(params) {
        return this.obtenerDetalleArchivo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Retorna el contenido del archivo.
     *
     * Permite descargar el archivo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerContenidoArchivo()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerContenidoArchivo$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.ObtenerContenidoArchivoPath, 'get');
        if (params) {
            rb.query('id_laserfiche', params.id_laserfiche, {});
        }
        return this.http.request(rb.build({
            responseType: 'blob',
            accept: 'application/octet-stream',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Retorna el contenido del archivo.
     *
     * Permite descargar el archivo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerContenidoArchivo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerContenidoArchivo(params) {
        return this.obtenerContenidoArchivo$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Retorna el contenido del archivo.
     *
     * Permite descargar el archivo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `obtenerContenidoArchivoPorId()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerContenidoArchivoPorId$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.ObtenerContenidoArchivoPorIdPath, 'get');
        if (params) {
            rb.query('id_archivo', params.id_archivo, {});
            rb.query('anio', params.anio, {});
        }
        return this.http.request(rb.build({
            responseType: 'blob',
            accept: 'application/octet-stream',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Retorna el contenido del archivo.
     *
     * Permite descargar el archivo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `obtenerContenidoArchivoPorId$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    obtenerContenidoArchivoPorId(params) {
        return this.obtenerContenidoArchivoPorId$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite listar los archivos de una Declaracion / Liquidacion.
     *
     * Permite listar los archivos de una Declaracion / Liquidacion
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `listarArchivos()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarArchivos$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.ListarArchivosPath, 'get');
        if (params) {
            rb.query('numero_dec_liq', params.numero_dec_liq, {});
            rb.query('medio_digital_id', params.medio_digital_id, {});
            rb.query('procesoModuloId', params.procesoModuloId, {});
            rb.query('anio', params.anio, {});
            rb.query('campo2', params.campo2, {});
            rb.query('campo3', params.campo3, {});
            rb.query('page', params.page, {});
            rb.query('page_size', params.page_size, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite listar los archivos de una Declaracion / Liquidacion.
     *
     * Permite listar los archivos de una Declaracion / Liquidacion
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `listarArchivos$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    listarArchivos(params) {
        return this.listarArchivos$Response(params).pipe(map((r) => r.body));
    }
    /**
     * Permite anula un archivo.
     *
     * Anula un archivo
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `anularArchivo()` instead.
     *
     * This method doesn't expect any request body.
     */
    anularArchivo$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, GestionArchivoControllerService.AnularArchivoPath, 'delete');
        if (params) {
            rb.path('archivoId', params.archivoId, {});
            rb.path('anio', params.anio, {});
        }
        return this.http.request(rb.build({
            responseType: 'json',
            accept: 'application/json',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite anula un archivo.
     *
     * Anula un archivo
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `anularArchivo$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    anularArchivo(params) {
        return this.anularArchivo$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation agregarArchivo
 */
GestionArchivoControllerService.AgregarArchivoPath = '/gestion-archivos/subir';
/**
 * Path part for operation cargarArchivoTrama
 */
GestionArchivoControllerService.CargarArchivoTramaPath = '/gestion-archivos/cargar-archivo-trama';
/**
 * Path part for operation cargarArchivosMasivo
 */
GestionArchivoControllerService.CargarArchivosMasivoPath = '/gestion-archivos/cargar-archivo-trama-masivo';
/**
 * Path part for operation obtenerDetalleArchivo
 */
GestionArchivoControllerService.ObtenerDetalleArchivoPath = '/gestion-archivos/obtener';
/**
 * Path part for operation obtenerContenidoArchivo
 */
GestionArchivoControllerService.ObtenerContenidoArchivoPath = '/gestion-archivos/obtener-contenido';
/**
 * Path part for operation obtenerContenidoArchivoPorId
 */
GestionArchivoControllerService.ObtenerContenidoArchivoPorIdPath = '/gestion-archivos/obtener-contenido-archivo';
/**
 * Path part for operation listarArchivos
 */
GestionArchivoControllerService.ListarArchivosPath = '/gestion-archivos/listar';
/**
 * Path part for operation anularArchivo
 */
GestionArchivoControllerService.AnularArchivoPath = '/gestion-archivos/anular/{archivoId}/{anio}';
GestionArchivoControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GestionArchivoControllerService, deps: [{ token: ApiConfiguration }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
GestionArchivoControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GestionArchivoControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GestionArchivoControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration }, { type: i2$1.HttpClient }]; } });

/* tslint:disable */
class DescargaDocumentoControllerService extends BaseService {
    constructor(config, http) {
        super(config, http);
    }
    /**
     * Permite descargar un documento.
     *
     * Descarga publica de documentos
     *
     * This method provides access to the full `HttpResponse`, allowing access to response headers.
     * To access only the response body, use `descargarDocumento()` instead.
     *
     * This method doesn't expect any request body.
     */
    descargarDocumento$Response(params) {
        const rb = new RequestBuilder(this.rootUrl, DescargaDocumentoControllerService.DescargarDocumentoPath, 'get');
        if (params) {
            rb.path('parametro', params.parametro, {});
        }
        return this.http.request(rb.build({
            responseType: 'blob',
            accept: 'application/octet-stream',
            context: params === null || params === void 0 ? void 0 : params.context
        })).pipe(filter((r) => r instanceof HttpResponse), map((r) => {
            return r;
        }));
    }
    /**
     * Permite descargar un documento.
     *
     * Descarga publica de documentos
     *
     * This method provides access to only to the response body.
     * To access the full response (for headers, for example), `descargarDocumento$Response()` instead.
     *
     * This method doesn't expect any request body.
     */
    descargarDocumento(params) {
        return this.descargarDocumento$Response(params).pipe(map((r) => r.body));
    }
}
/**
 * Path part for operation descargarDocumento
 */
DescargaDocumentoControllerService.DescargarDocumentoPath = '/descarga-documentos/descargar/{parametro}';
DescargaDocumentoControllerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DescargaDocumentoControllerService, deps: [{ token: ApiConfiguration }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
DescargaDocumentoControllerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DescargaDocumentoControllerService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DescargaDocumentoControllerService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: ApiConfiguration }, { type: i2$1.HttpClient }]; } });

/**
 * @description componente boton usando las clases de bootstrap
 * @version 1.0.0
 */
class NsrtmButtonComponent {
    constructor() {
        this.texto = 'Aceptar';
        this.disabled = false;
        this.loading = false;
        this.loadingTexto = 'Guardado...';
        this.esIcono = false;
        this.icon = 'save'; // icono feather
        this.color = 'primary'; // por ahora estos colores
        this.variant = 'flat'; // variantes del boton
        this.size = 'medium';
        this.classes = ''; // clases adicionales
        this.block = false; // ajusta el width al 100% de su contenedor
    }
    get pEvents() {
        if (this.disabled) {
            return 'none';
        }
        return 'auto';
    }
    get pDisplay() {
        if (this.block) {
            return 'block';
        }
        return 'inline-block';
    }
    getClasses() {
        const classes = ['btn'];
        // clase para variant
        const classVariant = this.getClassVariantColor(this.variant);
        if (classVariant)
            classes.push(classVariant);
        // clase para size
        const classSize = this.getClassSize(this.size);
        if (classSize)
            classes.push(classSize);
        if (this.esIcono)
            classes.push('btn-icon');
        if (this.block)
            classes.push('w-100 d-flex');
        if (this.classes.trim().length > 0)
            classes.push(this.classes);
        return classes.join(' ');
    }
    getClassVariantColor(variant) {
        if (variant === 'outlined') {
            return `btn-outline-${this.color}`;
        }
        // flat variant
        return `btn-${this.color}`;
    }
    getClassSize(size) {
        switch (size) {
            case 'small':
                return 'btn-sm';
            case 'large':
                return 'btn-lg';
            default:
                return '';
        }
    }
    get localTexto() {
        if (this.esIcono)
            return '';
        return this.texto;
    }
    get isDisabled() {
        return this.loading || this.disabled;
    }
    get isIcon() {
        return typeof this.icon === 'string' && this.icon.trim().length > 0;
    }
    get localDisabled() {
        return this.loading;
    }
}
NsrtmButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NsrtmButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmButtonComponent, selector: "nsrtm-button", inputs: { texto: "texto", disabled: "disabled", loading: "loading", loadingTexto: "loadingTexto", esIcono: "esIcono", icon: "icon", color: "color", variant: "variant", size: "size", classes: "classes", block: "block" }, host: { properties: { "style.pointer-events": "this.pEvents", "style.display": "this.pDisplay" } }, ngImport: i0, template: "<button type=\"button\" [class]=\"getClasses()\" [disabled]=\"isDisabled\">\r\n\t<span *ngIf=\"isIcon\" [class]=\"['feather', 'icon-' + icon]\"></span>\r\n\r\n\t<span [class]=\"{ 'ms-1': localTexto }\">{{\r\n\t\tloading ? loadingTexto : localTexto\r\n\t}}</span>\r\n\r\n\t<ng-container *ngIf=\"loading\">\r\n\t\t<span class=\"spinner-border spinner-border-sm ms-1\" role=\"status\"></span>\r\n\t</ng-container>\r\n</button>\r\n", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nsrtm-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\" [class]=\"getClasses()\" [disabled]=\"isDisabled\">\r\n\t<span *ngIf=\"isIcon\" [class]=\"['feather', 'icon-' + icon]\"></span>\r\n\r\n\t<span [class]=\"{ 'ms-1': localTexto }\">{{\r\n\t\tloading ? loadingTexto : localTexto\r\n\t}}</span>\r\n\r\n\t<ng-container *ngIf=\"loading\">\r\n\t\t<span class=\"spinner-border spinner-border-sm ms-1\" role=\"status\"></span>\r\n\t</ng-container>\r\n</button>\r\n" }]
        }], propDecorators: { texto: [{
                type: Input
            }], disabled: [{
                type: Input
            }], loading: [{
                type: Input
            }], loadingTexto: [{
                type: Input
            }], esIcono: [{
                type: Input
            }], icon: [{
                type: Input
            }], color: [{
                type: Input
            }], variant: [{
                type: Input
            }], size: [{
                type: Input
            }], classes: [{
                type: Input
            }], block: [{
                type: Input
            }], pEvents: [{
                type: HostBinding,
                args: ['style.pointer-events']
            }], pDisplay: [{
                type: HostBinding,
                args: ['style.display']
            }] } });

class ToastLoadingService {
    constructor() {
        this.showToast = false;
    }
    mostrar() {
        this.showToast = true;
    }
    ocultar() {
        this.showToast = false;
    }
}
ToastLoadingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastLoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ToastLoadingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastLoadingService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastLoadingService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }], ctorParameters: function () { return []; } });

class ToastLoadingComponent {
    constructor(_toastLoadingService) {
        this._toastLoadingService = _toastLoadingService;
        this.show = false;
        this.descripcion = 'Descargando archivo...';
        // not implemented
    }
    ngOnInit() {
        // not implemented
    }
    get showToast() {
        return this._toastLoadingService.showToast;
    }
}
ToastLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastLoadingComponent, deps: [{ token: ToastLoadingService }], target: i0.ɵɵFactoryTarget.Component });
ToastLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ToastLoadingComponent, selector: "toast-loading", inputs: { show: "show", descripcion: "descripcion" }, ngImport: i0, template: "<ngb-toast\r\n\tclass=\"toast-loading alert alert-info m-0 p-0\"\r\n\t[autohide]=\"false\"\r\n\t*ngIf=\"show\"\r\n\t(hide)=\"show = false\"\r\n>\r\n\t<div class=\"container-fluid px-0\">\r\n\t\t<div class=\"row align-items-center gx-2\">\r\n\t\t\t<div class=\"col d-flex align-items-center\">\r\n\t\t\t\t<span\r\n\t\t\t\t\tclass=\"spinner-border spinner-border-sm me-2 text-info\"\r\n\t\t\t\t></span>\r\n\t\t\t\t<span class=\"text-info\">{{ descripcion }}</span>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-auto\">\r\n\t\t\t\t<!-- <button\r\n\t\t\t\t\tclass=\"btn btn-icon btn-outline-secondary\"\r\n\t\t\t\t\tngbTooltip=\"Cancelar\"\r\n\t\t\t\t\tplacement=\"bottom\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"feather icon-x\"></span>\r\n\t\t\t\t</button> -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ngb-toast>\r\n", styles: [".toast-loading{position:absolute;bottom:1.25rem;right:1rem;z-index:10}.toast-loading .toast-body{padding-top:.55rem!important;padding-bottom:.55rem!important;flex-grow:1}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1.NgbToast, selector: "ngb-toast", inputs: ["animation", "delay", "autohide", "header"], outputs: ["shown", "hidden"], exportAs: ["ngbToast"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ToastLoadingComponent, decorators: [{
            type: Component,
            args: [{ selector: 'toast-loading', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ngb-toast\r\n\tclass=\"toast-loading alert alert-info m-0 p-0\"\r\n\t[autohide]=\"false\"\r\n\t*ngIf=\"show\"\r\n\t(hide)=\"show = false\"\r\n>\r\n\t<div class=\"container-fluid px-0\">\r\n\t\t<div class=\"row align-items-center gx-2\">\r\n\t\t\t<div class=\"col d-flex align-items-center\">\r\n\t\t\t\t<span\r\n\t\t\t\t\tclass=\"spinner-border spinner-border-sm me-2 text-info\"\r\n\t\t\t\t></span>\r\n\t\t\t\t<span class=\"text-info\">{{ descripcion }}</span>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"col-auto\">\r\n\t\t\t\t<!-- <button\r\n\t\t\t\t\tclass=\"btn btn-icon btn-outline-secondary\"\r\n\t\t\t\t\tngbTooltip=\"Cancelar\"\r\n\t\t\t\t\tplacement=\"bottom\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"feather icon-x\"></span>\r\n\t\t\t\t</button> -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ngb-toast>\r\n", styles: [".toast-loading{position:absolute;bottom:1.25rem;right:1rem;z-index:10}.toast-loading .toast-body{padding-top:.55rem!important;padding-bottom:.55rem!important;flex-grow:1}\n"] }]
        }], ctorParameters: function () { return [{ type: ToastLoadingService }]; }, propDecorators: { show: [{
                type: Input
            }], descripcion: [{
                type: Input
            }] } });

class NsrtmGrupoBotonesDocumentoComponent {
    constructor() {
        this.crear = new EventEmitter();
        this.ver = new EventEmitter();
        this.descargar = new EventEmitter();
        this.anular = new EventEmitter();
        this.onDestroy$ = new Subject();
        this.showToast = false;
    }
    ngOnInit() { }
    ngOnDestroy() {
        this.onDestroy$.next(true);
        this.onDestroy$.complete();
    }
    onVer(item) {
        if (item)
            this.ver.emit(item);
    }
    onDescargar(item) {
        if (item)
            this.descargar.emit(item);
    }
    onAnular(item) {
        if (item)
            this.anular.emit(item);
    }
    onFileSelected(event) {
        const file = event.target.files[0];
        if (file)
            this.crear.emit(file);
    }
    isDeshabilitado(item) {
        if (!item)
            return true;
        if (item.extension.toUpperCase() != 'PDF')
            return true;
        return false;
    }
}
NsrtmGrupoBotonesDocumentoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGrupoBotonesDocumentoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NsrtmGrupoBotonesDocumentoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmGrupoBotonesDocumentoComponent, selector: "app-nsrtm-grupo-botones-documento", inputs: { showAgregar: "showAgregar", showAnular: "showAnular", itemSeleccionado: "itemSeleccionado" }, outputs: { crear: "crear", ver: "ver", descargar: "descargar", anular: "anular" }, ngImport: i0, template: "<div class=\"d-flex gap-2\">\r\n\t<input\r\n\t\tstyle=\"display: none\"\r\n\t\ttype=\"file\"\r\n\t\tclass=\"file-input\"\r\n\t\t(change)=\"onFileSelected($event)\"\r\n\t\t#fileUpload\r\n\t/>\r\n\t<nsrtm-button\r\n\t\t*ngIf=\"showAgregar\"\r\n\t\tcolor=\"primary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"folder-plus\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Nuevo\"\r\n\t\t(click)=\"fileUpload.click()\"\r\n\t></nsrtm-button>\r\n\t<nsrtm-button\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"search\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Visualizar\"\r\n\t\t[disabled]=\"isDeshabilitado(itemSeleccionado)\"\r\n\t\t(click)=\"onVer(itemSeleccionado)\"\r\n\t>\r\n\t</nsrtm-button>\r\n\t<nsrtm-button\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"download\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Descargar\"\r\n\t\t[disabled]=\"!itemSeleccionado\"\r\n\t\t(click)=\"onDescargar(itemSeleccionado)\"\r\n\t>\r\n\t</nsrtm-button>\r\n\t<nsrtm-button\r\n\t\t*ngIf=\"showAnular\"\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"trash-2\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Anular documento\"\r\n\t\t[disabled]=\"!itemSeleccionado\"\r\n\t\t(click)=\"onAnular(itemSeleccionado)\"\r\n\t></nsrtm-button>\r\n</div>\r\n\r\n<toast-loading [show]=\"showToast\"></toast-loading>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NsrtmButtonComponent, selector: "nsrtm-button", inputs: ["texto", "disabled", "loading", "loadingTexto", "esIcono", "icon", "color", "variant", "size", "classes", "block"] }, { kind: "component", type: ToastLoadingComponent, selector: "toast-loading", inputs: ["show", "descripcion"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGrupoBotonesDocumentoComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-nsrtm-grupo-botones-documento', template: "<div class=\"d-flex gap-2\">\r\n\t<input\r\n\t\tstyle=\"display: none\"\r\n\t\ttype=\"file\"\r\n\t\tclass=\"file-input\"\r\n\t\t(change)=\"onFileSelected($event)\"\r\n\t\t#fileUpload\r\n\t/>\r\n\t<nsrtm-button\r\n\t\t*ngIf=\"showAgregar\"\r\n\t\tcolor=\"primary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"folder-plus\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Nuevo\"\r\n\t\t(click)=\"fileUpload.click()\"\r\n\t></nsrtm-button>\r\n\t<nsrtm-button\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"search\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Visualizar\"\r\n\t\t[disabled]=\"isDeshabilitado(itemSeleccionado)\"\r\n\t\t(click)=\"onVer(itemSeleccionado)\"\r\n\t>\r\n\t</nsrtm-button>\r\n\t<nsrtm-button\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"download\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Descargar\"\r\n\t\t[disabled]=\"!itemSeleccionado\"\r\n\t\t(click)=\"onDescargar(itemSeleccionado)\"\r\n\t>\r\n\t</nsrtm-button>\r\n\t<nsrtm-button\r\n\t\t*ngIf=\"showAnular\"\r\n\t\tcolor=\"secondary\"\r\n\t\tvariant=\"outlined\"\r\n\t\ticon=\"trash-2\"\r\n\t\t[esIcono]=\"true\"\r\n\t\tplacement=\"bottom\"\r\n\t\tngbTooltip=\"Anular documento\"\r\n\t\t[disabled]=\"!itemSeleccionado\"\r\n\t\t(click)=\"onAnular(itemSeleccionado)\"\r\n\t></nsrtm-button>\r\n</div>\r\n\r\n<toast-loading [show]=\"showToast\"></toast-loading>\r\n" }]
        }], ctorParameters: function () { return []; }, propDecorators: { showAgregar: [{
                type: Input
            }], showAnular: [{
                type: Input
            }], itemSeleccionado: [{
                type: Input
            }], crear: [{
                type: Output
            }], ver: [{
                type: Output
            }], descargar: [{
                type: Output
            }], anular: [{
                type: Output
            }] } });

/**
 * Componente mostrar contenido sin resultados, sin datos.
 * Utilizar principalmente cuando no se encontraros datos, cuando la lista esta vacia, etc.
 * @author jerson
 */
class NoResultsComponent {
    constructor() {
        this.message = 'No se encontraron resultados!';
        // method not implement
    }
    ngOnInit() {
        // method not implement
    }
}
NoResultsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoResultsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NoResultsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NoResultsComponent, selector: "nsrtm-no-results", inputs: { message: "message" }, ngImport: i0, template: "<div class=\"no-results\">\r\n  <div>\r\n    <span class=\"no-results__icon feather icon-box\"></span>\r\n  </div>\r\n  <p class=\"no-results__text\">{{ message }}</p>\r\n</div>\r\n", styles: [".no-results{padding:2rem 1.5rem;text-align:center}.no-results__icon{font-size:1.75rem;color:#828283}.no-results__text{font-size:15px;color:#828283;margin-bottom:0}.table-sticky tbody .no-results{height:auto}.table-sticky .no-results{display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(100% - 48px)}\n"], encapsulation: i0.ViewEncapsulation.None });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NoResultsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nsrtm-no-results', encapsulation: ViewEncapsulation.None, template: "<div class=\"no-results\">\r\n  <div>\r\n    <span class=\"no-results__icon feather icon-box\"></span>\r\n  </div>\r\n  <p class=\"no-results__text\">{{ message }}</p>\r\n</div>\r\n", styles: [".no-results{padding:2rem 1.5rem;text-align:center}.no-results__icon{font-size:1.75rem;color:#828283}.no-results__text{font-size:15px;color:#828283;margin-bottom:0}.table-sticky tbody .no-results{height:auto}.table-sticky .no-results{display:flex;flex-direction:column;align-items:center;justify-content:center;height:calc(100% - 48px)}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { message: [{
                type: Input
            }] } });

/**
 * Clase del componente Modal componente.
 *
 * @class ModalComponent
 */
class LoadingComponent {
    constructor() {
        /**
         * Declaración de variables
         */
        this.message = 'Estamos cargando la información solicitada';
    }
}
LoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
LoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LoadingComponent, selector: "nsrtm-loading", inputs: { message: "message" }, ngImport: i0, template: "<div class=\"w-100 text-center p-3\">\r\n  <div class=\"lds-spinner\">\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n  </div>\r\n  <h6>\r\n    Estamos cargando la informaci\u00F3n solicitada,\r\n    <strong>espere por favor.</strong>\r\n  </h6>\r\n</div>\r\n", styles: [".lds-spinner{display:inline-block;position:relative;width:80px;height:80px}.lds-spinner div{transform-origin:40px 40px;animation:lds-spinner .8s linear infinite}.lds-spinner div:after{content:\"\";display:block;position:absolute;top:16px;left:37px;width:6px;height:16px;border-radius:10px;background:#828283}.lds-spinner div:nth-child(1){transform:rotate(0);animation-delay:-.7s}.lds-spinner div:nth-child(2){transform:rotate(45deg);animation-delay:-.6s}.lds-spinner div:nth-child(3){transform:rotate(90deg);animation-delay:-.5s}.lds-spinner div:nth-child(4){transform:rotate(135deg);animation-delay:-.4s}.lds-spinner div:nth-child(5){transform:rotate(180deg);animation-delay:-.3s}.lds-spinner div:nth-child(6){transform:rotate(225deg);animation-delay:-.2s}.lds-spinner div:nth-child(7){transform:rotate(270deg);animation-delay:-.1s}.lds-spinner div:nth-child(8){transform:rotate(315deg);animation-delay:0s}@keyframes lds-spinner{0%{opacity:1}to{opacity:0}}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LoadingComponent, decorators: [{
            type: Component,
            args: [{ selector: 'nsrtm-loading', template: "<div class=\"w-100 text-center p-3\">\r\n  <div class=\"lds-spinner\">\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n    <div></div>\r\n  </div>\r\n  <h6>\r\n    Estamos cargando la informaci\u00F3n solicitada,\r\n    <strong>espere por favor.</strong>\r\n  </h6>\r\n</div>\r\n", styles: [".lds-spinner{display:inline-block;position:relative;width:80px;height:80px}.lds-spinner div{transform-origin:40px 40px;animation:lds-spinner .8s linear infinite}.lds-spinner div:after{content:\"\";display:block;position:absolute;top:16px;left:37px;width:6px;height:16px;border-radius:10px;background:#828283}.lds-spinner div:nth-child(1){transform:rotate(0);animation-delay:-.7s}.lds-spinner div:nth-child(2){transform:rotate(45deg);animation-delay:-.6s}.lds-spinner div:nth-child(3){transform:rotate(90deg);animation-delay:-.5s}.lds-spinner div:nth-child(4){transform:rotate(135deg);animation-delay:-.4s}.lds-spinner div:nth-child(5){transform:rotate(180deg);animation-delay:-.3s}.lds-spinner div:nth-child(6){transform:rotate(225deg);animation-delay:-.2s}.lds-spinner div:nth-child(7){transform:rotate(270deg);animation-delay:-.1s}.lds-spinner div:nth-child(8){transform:rotate(315deg);animation-delay:0s}@keyframes lds-spinner{0%{opacity:1}to{opacity:0}}\n"] }]
        }], propDecorators: { message: [{
                type: Input
            }] } });

const initialPagination = {
    page: 1,
    pageSize: 10,
};
class TableFooterPaginationComponent {
    constructor() {
        this.totalItems = 0;
        this.pageSize = initialPagination.pageSize;
        this.page = initialPagination.page;
        this.totalItemsPerPage = 0;
        this.changePaginate = new EventEmitter();
        this.localPage = this.page;
        this.localPageSize = this.pageSize;
        this.pageSizes = [10, 25, 100];
        this.to = 1;
        this.from = this.pageSize;
        // not implements
    }
    ngOnChanges(changes) {
        this.calPaginationPerPage(this.localPage, this.localPageSize);
    }
    onChangePageSize(pageSize) {
        this.localPageSize = pageSize;
        this.calPaginationPerPage(this.localPage, pageSize);
        this.changePaginate.emit({ page: this.localPage, pageSize });
    }
    onChangePaginate(page) {
        this.localPage = page;
        this.calPaginationPerPage(this.localPage, this.localPageSize);
        this.changePaginate.emit({ page, pageSize: this.localPageSize });
    }
    calPaginationPerPage(page, pageSize) {
        this.to = pageSize * page - pageSize + 1;
        this.from = pageSize * page - (pageSize - this.totalItemsPerPage);
    }
}
TableFooterPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableFooterPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TableFooterPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TableFooterPaginationComponent, selector: "table-footer-pagination", inputs: { totalItems: "totalItems", pageSize: "pageSize", page: "page", totalItemsPerPage: "totalItemsPerPage" }, outputs: { changePaginate: "changePaginate" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"table-footer border-top px-2\" [ngClass]=\"{ 'd-none': !totalItems }\">\r\n\t<div class=\"d-flex align-items-center\">\r\n\t\t<span class=\"label-regular me-2\">Filas</span>\r\n\t\t<select\r\n\t\t\tclass=\"form-control form-select\"\r\n\t\t\t[(ngModel)]=\"localPageSize\"\r\n\t\t\t(ngModelChange)=\"onChangePageSize($event)\"\r\n\t\t>\r\n\t\t\t<option *ngFor=\"let size of pageSizes\" [ngValue]=\"size\">\r\n\t\t\t\t{{ size }}\r\n\t\t\t</option>\r\n\t\t</select>\r\n\t</div>\r\n\t<div class=\"content-pagination\">\r\n\t\t<span class=\"label-regular\"\r\n\t\t\t>{{ to }} a {{ from }} de {{ totalItems }} registros</span\r\n\t\t>\r\n\t\t<ngb-pagination\r\n\t\t\t[maxSize]=\"3\"\r\n\t\t\t[rotate]=\"true\"\r\n\t\t\t[ellipses]=\"false\"\r\n\t\t\t[collectionSize]=\"totalItems\"\r\n\t\t\t[page]=\"localPage\"\r\n\t\t\t[pageSize]=\"localPageSize\"\r\n\t\t\t(pageChange)=\"onChangePaginate($event)\"\r\n\t\t>\r\n\t\t\t<ng-template ngbPaginationPrevious>\r\n\t\t\t\t<span class=\"feather icon-chevron-left\"></span>\r\n\t\t\t</ng-template>\r\n\t\t\t<ng-template ngbPaginationNext>\r\n\t\t\t\t<span class=\"feather icon-chevron-right\"></span>\r\n\t\t\t</ng-template>\r\n\t\t</ngb-pagination>\r\n\t</div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: i1.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }, { kind: "directive", type: i1.NgbPaginationNext, selector: "ng-template[ngbPaginationNext]" }, { kind: "directive", type: i1.NgbPaginationPrevious, selector: "ng-template[ngbPaginationPrevious]" }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TableFooterPaginationComponent, decorators: [{
            type: Component,
            args: [{ selector: 'table-footer-pagination', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"table-footer border-top px-2\" [ngClass]=\"{ 'd-none': !totalItems }\">\r\n\t<div class=\"d-flex align-items-center\">\r\n\t\t<span class=\"label-regular me-2\">Filas</span>\r\n\t\t<select\r\n\t\t\tclass=\"form-control form-select\"\r\n\t\t\t[(ngModel)]=\"localPageSize\"\r\n\t\t\t(ngModelChange)=\"onChangePageSize($event)\"\r\n\t\t>\r\n\t\t\t<option *ngFor=\"let size of pageSizes\" [ngValue]=\"size\">\r\n\t\t\t\t{{ size }}\r\n\t\t\t</option>\r\n\t\t</select>\r\n\t</div>\r\n\t<div class=\"content-pagination\">\r\n\t\t<span class=\"label-regular\"\r\n\t\t\t>{{ to }} a {{ from }} de {{ totalItems }} registros</span\r\n\t\t>\r\n\t\t<ngb-pagination\r\n\t\t\t[maxSize]=\"3\"\r\n\t\t\t[rotate]=\"true\"\r\n\t\t\t[ellipses]=\"false\"\r\n\t\t\t[collectionSize]=\"totalItems\"\r\n\t\t\t[page]=\"localPage\"\r\n\t\t\t[pageSize]=\"localPageSize\"\r\n\t\t\t(pageChange)=\"onChangePaginate($event)\"\r\n\t\t>\r\n\t\t\t<ng-template ngbPaginationPrevious>\r\n\t\t\t\t<span class=\"feather icon-chevron-left\"></span>\r\n\t\t\t</ng-template>\r\n\t\t\t<ng-template ngbPaginationNext>\r\n\t\t\t\t<span class=\"feather icon-chevron-right\"></span>\r\n\t\t\t</ng-template>\r\n\t\t</ngb-pagination>\r\n\t</div>\r\n</div>\r\n" }]
        }], ctorParameters: function () { return []; }, propDecorators: { totalItems: [{
                type: Input
            }], pageSize: [{
                type: Input
            }], page: [{
                type: Input
            }], totalItemsPerPage: [{
                type: Input
            }], changePaginate: [{
                type: Output
            }] } });

class NsrtmTablaDocumentoComponent {
    constructor() {
        this.datasource = [];
        this.loading = false;
        this.totalItems = 0;
        this.page = 1;
        this.pageSize = 10;
        this.seleccionar = new EventEmitter();
        this.paginar = new EventEmitter();
        this.setFolio = new EventEmitter();
    }
    onSeleccionarFila(fila) {
        this.seleccionar.emit(fila);
    }
    onChangePaginate(event) {
        if (!this.totalItems)
            return;
        const { page, pageSize } = event;
        // hack para evitar lanzar el request cuando la página es > 1 y se cambia de pageSize
        // solo aplicado cuando la pagination es desde backend
        if (pageSize !== this.pageSize && page > 1) {
            return;
        }
        this.paginar.emit(event);
    }
    get itemId() {
        var _a, _b;
        return Number((_b = (_a = this.filaSeleccionada) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : 0);
    }
    getKiloBytes(tamanio) {
        return (Number(tamanio) / 1024 / 1024).toFixed(3);
    }
    change(item, event) {
        item.folio = event.target.value;
        this.setFolio.emit(item);
    }
}
NsrtmTablaDocumentoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmTablaDocumentoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NsrtmTablaDocumentoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmTablaDocumentoComponent, selector: "app-nsrtm-tabla-documento", inputs: { datasource: "datasource", loading: "loading", totalItems: "totalItems", page: "page", pageSize: "pageSize", filaSeleccionada: "filaSeleccionada" }, outputs: { seleccionar: "seleccionar", paginar: "paginar", setFolio: "setFolio" }, ngImport: i0, template: "<div\r\n\tclass=\"table-responsive\"\r\n\t[ngClass]=\"{\r\n\t\t'table-sticky table-sticky--height': datasource.length > 10\r\n\t}\"\r\n>\r\n\t<table class=\"table tbl-grid m-0 head-no-rounded\">\r\n\t\t<caption class=\"d-none\">\r\n\t\t\tTabla Registros Vehicular Activos\r\n\t\t</caption>\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center min-w-60px w-80px\">ITEM</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">NOMBRE DEL ARCHIVO</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">FECHA</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">TAMA\u00D1O(Mb)</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">FOLIO</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody *ngIf=\"!loading\">\r\n\t\t\t<tr\r\n\t\t\t\t*ngFor=\"let item of datasource; index as i\"\r\n\t\t\t\t[class]=\"'c-pointer tbl-row tbl-row-' + i\"\r\n\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\tactive: item.index === itemId\r\n\t\t\t\t}\"\r\n\t\t\t\t(click)=\"onSeleccionarFila(item)\"\r\n\t\t\t>\r\n\t\t\t\t<td class=\"text-center\">{{ item.index }}</td>\r\n\t\t\t\t<td class=\"text-center\">{{ item.nombre }}</td>\r\n\t\t\t\t<td class=\"text-center\">{{ item.fechaUpload }}</td>\r\n\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t{{ getKiloBytes(item.tamanio) }}\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class=\"text-center col-md-2\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\tmaxlength=\"10\"\r\n\t\t\t\t\t\t[value]=\"item.folio ? item.folio : ''\"\r\n\t\t\t\t\t\t[disabled]=\"item.laserficheId ? true : false\"\r\n\t\t\t\t\t\t(change)=\"change(item, $event)\"\r\n\t\t\t\t\t\tdigitOnly\r\n\t\t\t\t\t/>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n\r\n\t<ng-container *ngIf=\"!loading && !totalItems\">\r\n\t\t<nsrtm-no-results></nsrtm-no-results>\r\n\t</ng-container>\r\n\r\n\t<ng-container *ngIf=\"loading\">\r\n\t\t<nsrtm-loading></nsrtm-loading>\r\n\t</ng-container>\r\n</div>\r\n<!-- PAGINATE -->\r\n<table-footer-pagination\r\n\t[totalItems]=\"totalItems\"\r\n\t[totalItemsPerPage]=\"datasource.length\"\r\n\t(changePaginate)=\"onChangePaginate($event)\"\r\n\t[page]=\"page\"\r\n\t[pageSize]=\"pageSize\"\r\n></table-footer-pagination>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.DigitOnlyDirective, selector: "[digitOnly]", inputs: ["decimal", "decimalSeparator", "allowNegatives", "allowPaste", "negativeSign", "min", "max", "pattern"] }, { kind: "component", type: NoResultsComponent, selector: "nsrtm-no-results", inputs: ["message"] }, { kind: "component", type: LoadingComponent, selector: "nsrtm-loading", inputs: ["message"] }, { kind: "component", type: TableFooterPaginationComponent, selector: "table-footer-pagination", inputs: ["totalItems", "pageSize", "page", "totalItemsPerPage"], outputs: ["changePaginate"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmTablaDocumentoComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-nsrtm-tabla-documento', template: "<div\r\n\tclass=\"table-responsive\"\r\n\t[ngClass]=\"{\r\n\t\t'table-sticky table-sticky--height': datasource.length > 10\r\n\t}\"\r\n>\r\n\t<table class=\"table tbl-grid m-0 head-no-rounded\">\r\n\t\t<caption class=\"d-none\">\r\n\t\t\tTabla Registros Vehicular Activos\r\n\t\t</caption>\r\n\t\t<thead>\r\n\t\t\t<tr>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center min-w-60px w-80px\">ITEM</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">NOMBRE DEL ARCHIVO</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">FECHA</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">TAMA\u00D1O(Mb)</th>\r\n\t\t\t\t<th scope=\"col\" class=\"text-center\">FOLIO</th>\r\n\t\t\t</tr>\r\n\t\t</thead>\r\n\t\t<tbody *ngIf=\"!loading\">\r\n\t\t\t<tr\r\n\t\t\t\t*ngFor=\"let item of datasource; index as i\"\r\n\t\t\t\t[class]=\"'c-pointer tbl-row tbl-row-' + i\"\r\n\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\tactive: item.index === itemId\r\n\t\t\t\t}\"\r\n\t\t\t\t(click)=\"onSeleccionarFila(item)\"\r\n\t\t\t>\r\n\t\t\t\t<td class=\"text-center\">{{ item.index }}</td>\r\n\t\t\t\t<td class=\"text-center\">{{ item.nombre }}</td>\r\n\t\t\t\t<td class=\"text-center\">{{ item.fechaUpload }}</td>\r\n\t\t\t\t<td class=\"text-center\">\r\n\t\t\t\t\t{{ getKiloBytes(item.tamanio) }}\r\n\t\t\t\t</td>\r\n\t\t\t\t<td class=\"text-center col-md-2\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\ttype=\"text\"\r\n\t\t\t\t\t\tclass=\"form-control\"\r\n\t\t\t\t\t\tmaxlength=\"10\"\r\n\t\t\t\t\t\t[value]=\"item.folio ? item.folio : ''\"\r\n\t\t\t\t\t\t[disabled]=\"item.laserficheId ? true : false\"\r\n\t\t\t\t\t\t(change)=\"change(item, $event)\"\r\n\t\t\t\t\t\tdigitOnly\r\n\t\t\t\t\t/>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t</tbody>\r\n\t</table>\r\n\r\n\t<ng-container *ngIf=\"!loading && !totalItems\">\r\n\t\t<nsrtm-no-results></nsrtm-no-results>\r\n\t</ng-container>\r\n\r\n\t<ng-container *ngIf=\"loading\">\r\n\t\t<nsrtm-loading></nsrtm-loading>\r\n\t</ng-container>\r\n</div>\r\n<!-- PAGINATE -->\r\n<table-footer-pagination\r\n\t[totalItems]=\"totalItems\"\r\n\t[totalItemsPerPage]=\"datasource.length\"\r\n\t(changePaginate)=\"onChangePaginate($event)\"\r\n\t[page]=\"page\"\r\n\t[pageSize]=\"pageSize\"\r\n></table-footer-pagination>\r\n" }]
        }], propDecorators: { datasource: [{
                type: Input
            }], loading: [{
                type: Input
            }], totalItems: [{
                type: Input
            }], page: [{
                type: Input
            }], pageSize: [{
                type: Input
            }], filaSeleccionada: [{
                type: Input
            }], seleccionar: [{
                type: Output
            }], paginar: [{
                type: Output
            }], setFolio: [{
                type: Output
            }] } });

class NsrtmDialogUploadFilesComponent {
    constructor(_fb, _alertService, _modalService, _activeModal, _validationFormService, _dialogConfirm, spinner, comunesRegistroController, parametroController, _gestionArchivoControllerService) {
        this._fb = _fb;
        this._alertService = _alertService;
        this._modalService = _modalService;
        this._activeModal = _activeModal;
        this._validationFormService = _validationFormService;
        this._dialogConfirm = _dialogConfirm;
        this.spinner = spinner;
        this.comunesRegistroController = comunesRegistroController;
        this.parametroController = parametroController;
        this._gestionArchivoControllerService = _gestionArchivoControllerService;
        this.showAgregar = true;
        this.showAnular = true;
        this.idMedioDigital = 0;
        this.pesoMaximoArchivo = 0;
        this.listaDocSustento = [];
        this.datasourceDocumentos = [];
        this.totalItems = 0;
        this._queryFilter = new BehaviorSubject(null);
        this.submitted = false;
        this.loading = false;
        this.onDestroy$ = new Subject();
    }
    ngOnInit() {
        var _a;
        localStorage.setItem("LIBRERIA", "1");
        this.obtenerPesoMaximoAnexo();
        this.obtenerParametroMedioDigital();
        this.obtenerDocSustento();
        this._crearFormulario();
        (_a = this.docSustento) === null || _a === void 0 ? void 0 : _a.setValue(this.listaIdDocSustento);
        this._queryFilter.subscribe((query) => {
            //if (query) this._obtenerBusqueda(query);
        });
    }
    obtenerDocSustento() {
        this.comunesRegistroController
            .listarDocSustentoTipo({
            arr_tip_doc_sustento_id: this.listaIdDocSustento.toString(),
        })
            .pipe(takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                if (response) {
                    this.listaDocSustento = response;
                }
            },
        });
    }
    obtenerParametroMedioDigital() {
        this.spinner.show();
        this.parametroController
            .consultar({
            aplicacionId: this.aplicacionId,
            parametroId: this.medioDigitalParametroId,
        })
            .pipe(takeUntil(this.onDestroy$), finalize(() => this.spinner.hide()))
            .subscribe({
            next: (response) => {
                var _a;
                if (response && (response === null || response === void 0 ? void 0 : response.data)) {
                    this.idMedioDigital = (_a = response.data) === null || _a === void 0 ? void 0 : _a.valorNumerico;
                    this.obtenerDocsLaserfiche();
                }
            },
        });
    }
    obtenerPesoMaximoAnexo() {
        this.spinner.show();
        this.parametroController
            .consultarParametroGlobal({
            moduloId: PESO_MAXIMO_ARCHIVO_MODULO_ID,
            tipoParametroId: PESO_MAXIMO_TIPO_PARAMETRO_ID,
        })
            .pipe(takeUntil(this.onDestroy$), finalize(() => this.spinner.hide()))
            .subscribe({
            next: (response) => {
                var _a;
                if (response && (response === null || response === void 0 ? void 0 : response.data)) {
                    this.pesoMaximoArchivo = (_a = response.data) === null || _a === void 0 ? void 0 : _a.valorNumerico;
                }
            },
        });
    }
    setFolio(item) {
        this.datasourceDocumentos[item.index - 1] = item;
    }
    obtenerDocsLaserfiche() {
        this.datasourceDocumentos = [];
        this._gestionArchivoControllerService
            .listarArchivos({
            numero_dec_liq: this.idDj,
            medio_digital_id: this.idMedioDigital,
            procesoModuloId: this.procesoModuloId,
            anio: Number(new Date().getFullYear()),
            campo2: this.procesoModuloId == PROCESO_MODULO_ID.DJ_CONDICION
                ? this.contribuyenteNumero.toString()
                : '',
            campo3: this.procesoModuloId == PROCESO_MODULO_ID.DJ_CONDICION
                ? this.condicionContribuyenteId.toString()
                : '',
        })
            .pipe(takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                var _a;
                (_a = response.data) === null || _a === void 0 ? void 0 : _a.forEach((it) => {
                    var _a, _b;
                    const extension = (_a = it.nombreOriginal) === null || _a === void 0 ? void 0 : _a.split('.').pop();
                    const anio = Number((_b = it.fecha) === null || _b === void 0 ? void 0 : _b.split('/').pop());
                    this.datasourceDocumentos.push({
                        index: this.datasourceDocumentos.length + 1,
                        laserficheId: it.archivoId,
                        nombre: it.nombreOriginal ? it.nombreOriginal : '',
                        fechaUpload: it.fecha ? it.fecha : '',
                        tamanio: it.pesoArchivo ? it.pesoArchivo : 0,
                        anioUpload: anio ? anio : 0,
                        extension: extension ? extension : 'S/E',
                        folio: it.folio,
                    });
                });
                this.totalItems = this.datasourceDocumentos.length;
            },
        });
    }
    _crearFormulario() {
        this.formulario = this._fb.group({
            docSustento: [null],
        });
    }
    ngOnDestroy() {
        var _a;
        (_a = this.refSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
    }
    onSubmit() {
        this.submitted = true;
        const data = this.datasourceDocumentos.filter((it) => !it.laserficheId);
        const docsSinFolios = this.datasourceDocumentos.filter((it) => it.folio == null || it.folio == undefined);
        if (!data.length) {
            this._alertService.error('Debe anexar al menos un nuevo documento.');
        }
        else {
            if (docsSinFolios.length) {
                this._alertService.error('Debe ingresar el número de folios.');
            }
            else
                this.guardarDocumentosAplicacion();
        }
    }
    guardarDocumentosAplicacion() {
        this.loading;
        let request = [];
        let listFiles = [];
        this.datasourceDocumentos.forEach((it) => {
            if (!it.laserficheId) {
                const tipoArchivo = TIPO_ARCHIVO_ID.find((tipo) => tipo.key == it.extension);
                request.push({
                    anio: it.anioUpload,
                    directorioId: this.directorioId,
                    tipoProcesoId: this.tipoProcesoId,
                    procesoModuloId: this.procesoModuloId,
                    tipoArchivoId: tipoArchivo === null || tipoArchivo === void 0 ? void 0 : tipoArchivo.value,
                    version: this.version,
                    folio: it.folio,
                    idDJ: this.idDj,
                    medioDigitalId: this.idMedioDigital,
                    tipoArchivoDigitalId: this.tipoArchivoDigitalId,
                    campo2: this.procesoModuloId == PROCESO_MODULO_ID.DJ_CONDICION
                        ? this.contribuyenteNumero
                        : null,
                    campo3: this.procesoModuloId == PROCESO_MODULO_ID.DJ_CONDICION
                        ? this.condicionContribuyenteId
                        : null,
                });
                if (it.file)
                    listFiles.push(it.file);
            }
        });
        this.spinner.show();
        this._gestionArchivoControllerService
            .cargarArchivosMasivo({
            body: {
                request: JSON.stringify(request),
                files: listFiles,
            },
        })
            .pipe(finalize(() => this.spinner.hide()), takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                this.close(this.datasourceDocumentos);
            },
        });
    }
    close(response) {
        this._activeModal.close(response);
    }
    esControlInvalido(input) {
        return (input &&
            this._validationFormService.isControlInvalid(input, this.submitted));
    }
    onSeleccionarDocumento(documento) {
        this.documentoSeleccionado = documento;
    }
    onChangePaginacion(event) {
        const merge = {
            //...this.actualFiltro,
            page: event.page,
            pageSize: event.pageSize,
        };
        this._queryFilter.next(merge);
        this.limpiarItemSeleccionado();
    }
    limpiarItemSeleccionado() {
        this.documentoSeleccionado = undefined;
    }
    onCrearDocumento(file) {
        var _a;
        const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
        const tipoArchivo = TIPO_ARCHIVO_ID.find((tipo) => tipo.key == extension);
        if (!tipoArchivo) {
            this._alertService.error('Solo se puede anexar archivos con extension PDF, DOCX, DOC, XLSX, XLS, JPEG, ZIP, RAR o JPG.');
            return;
        }
        if (file.size > this.pesoMaximoArchivo * MEGA_BYTES) {
            this._alertService.error('Solo se puede anexar archivos con peso máximo a ' +
                this.pesoMaximoArchivo +
                'Mb.');
            return;
        }
        const reader = new FileReader();
        reader.onload = () => {
            if (reader.result) {
                var blob = new Blob([reader.result]);
                const date = new Date();
                let doc = {
                    index: this.datasourceDocumentos.length + 1,
                    nombre: file.name,
                    contenido: blob,
                    fechaUpload: parseStringDateFormatUser(new NgbDate(date.getFullYear(), date.getMonth(), date.getDay())),
                    anioUpload: date.getFullYear(),
                    tamanio: file.size,
                    extension: extension ? extension.toUpperCase() : 'S/E',
                    file: file,
                };
                this.datasourceDocumentos.push(doc);
                this.totalItems = this.datasourceDocumentos.length;
            }
        };
        if (file) {
            reader.readAsArrayBuffer(file);
        }
    }
    onDescargarDocumento(documento) {
        if (!documento.laserficheId) {
            this.descargarDocumentoMemoria(documento);
        }
        else {
            this.descargarDocumentoLaserfiche(documento);
        }
    }
    descargarDocumentoMemoria(documento) {
        var blob = documento.contenido;
        if (blob) {
            const a = document.createElement('a');
            const objectUrl = URL.createObjectURL(blob);
            a.href = objectUrl;
            a.download = documento.nombre ? documento.nombre : '';
            a.click();
            URL.revokeObjectURL(objectUrl);
        }
    }
    descargarDocumentoLaserfiche(documento) {
        this._gestionArchivoControllerService
            .obtenerContenidoArchivoPorId({
            id_archivo: Number(documento.laserficheId),
            anio: documento.anioUpload,
        })
            .pipe(takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                if (response) {
                    const a = document.createElement('a');
                    const objectUrl = URL.createObjectURL(response);
                    a.href = objectUrl;
                    a.download = documento.nombre ? documento.nombre : '';
                    a.click();
                    URL.revokeObjectURL(objectUrl);
                }
            },
        });
    }
    onVerDocumento(documento) {
        if (!documento.laserficheId) {
            this.verDocumentoMemoria(documento);
        }
        else {
            this.verDocumentoLaserfiche(documento);
        }
    }
    verDocumentoMemoria(documento) {
        var blob = documento.contenido;
        if (blob) {
            const modalRef = this._modalService.open(NsrtmDialogVisorDocumentoComponent, {
                centered: true,
                backdrop: 'static',
                keyboard: false,
                fullscreen: true,
                scrollable: true,
                size: 'xl',
            });
            modalRef.componentInstance.contenido = blob;
            modalRef.componentInstance.extension = documento.extension;
            modalRef.closed.subscribe({
                next: (response) => {
                    if (response) {
                    }
                },
                error: (error) => {
                    this._alertService.error(error.message);
                },
            });
        }
    }
    verDocumentoLaserfiche(documento) {
        this._gestionArchivoControllerService
            .obtenerContenidoArchivoPorId({
            id_archivo: Number(documento.laserficheId),
            anio: documento.anioUpload,
        })
            .pipe(takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                if (response) {
                    const modalRef = this._modalService.open(NsrtmDialogVisorDocumentoComponent, {
                        centered: true,
                        backdrop: 'static',
                        keyboard: false,
                        size: 'lg',
                    });
                    modalRef.componentInstance.contenido = response;
                    modalRef.componentInstance.extension = documento.extension;
                    modalRef.closed.subscribe({
                        next: (response) => {
                            if (response) {
                            }
                        },
                        error: (error) => {
                            this._alertService.error(error.message);
                        },
                    });
                }
            },
        });
    }
    onAnularDocumento(documento) {
        this._dialogConfirm
            .confirm({
            title: '¿Cancelar el documento anexo?',
            message: '',
        })
            .closed.subscribe({
            next: (response) => {
                if (response) {
                    if (!documento.laserficheId) {
                        this.anularDocumentoMemoria(documento);
                    }
                    else {
                        this.anularDocumentoLaserfiche(documento);
                    }
                }
            },
        });
    }
    anularDocumentoMemoria(documento) {
        this.datasourceDocumentos.splice(documento.index - 1, 1);
        this.datasourceDocumentos.forEach((it, index) => {
            it.index = index + 1;
        });
        this.documentoSeleccionado = undefined;
    }
    anularDocumentoLaserfiche(documento) {
        this._gestionArchivoControllerService
            .anularArchivo({
            archivoId: Number(documento.laserficheId),
            anio: documento.anioUpload,
        })
            .pipe(takeUntil(this.onDestroy$))
            .subscribe({
            next: (response) => {
                if (response) {
                    this._alertService.success(response.message);
                    this.obtenerDocsLaserfiche();
                }
            },
        });
    }
    get page() {
        var _a;
        return (_a = this._queryFilter.value) === null || _a === void 0 ? void 0 : _a.page;
    }
    get pageSize() {
        var _a;
        return (_a = this._queryFilter.value) === null || _a === void 0 ? void 0 : _a.pageSize;
    }
    get docSustento() {
        return this.formulario.get('docSustento');
    }
}
NsrtmDialogUploadFilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogUploadFilesComponent, deps: [{ token: i1$2.FormBuilder }, { token: AlertService }, { token: i1.NgbModal }, { token: i1.NgbActiveModal }, { token: ValidationFormService }, { token: DialogConfirmService }, { token: SpinnerService }, { token: ComunesRegistroControllerService }, { token: ParametroComunControllerService }, { token: GestionArchivoControllerService }], target: i0.ɵɵFactoryTarget.Component });
NsrtmDialogUploadFilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmDialogUploadFilesComponent, selector: "app-nsrtm-dialog-upload-files", inputs: { directorioId: "directorioId", tipoProcesoId: "tipoProcesoId", procesoModuloId: "procesoModuloId", aplicacionId: "aplicacionId", medioDigitalParametroId: "medioDigitalParametroId", version: "version", idDj: "idDj", contribuyenteNumero: "contribuyenteNumero", condicionContribuyenteId: "condicionContribuyenteId", tipoArchivoDigitalId: "tipoArchivoDigitalId", listaIdDocSustento: "listaIdDocSustento", showAgregar: "showAgregar", showAnular: "showAnular" }, ngImport: i0, template: "<div class=\"modal-header\">\r\n\t<h6 class=\"modal-title w-100\" id=\"title\">Documentoooos anexos</h6>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn-close\"\r\n\t\taria-label=\"Close\"\r\n\t\t(click)=\"close()\"\r\n\t></button>\r\n</div>\r\n<div class=\"modal-body\">\r\n\t<div class=\"siaf-card shadow-none p-0\">\r\n\t\t<div class=\"container-fluid px-0\">\r\n\t\t\t<div class=\"row gx-3 align-items-baseline\"></div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"siaf-card\">\r\n\t\t<div class=\"p-content d-flex justify-content-between align-items-center\">\r\n\t\t\t<span class=\"title-group-uppercase\">Listado de documentos anexos</span>\r\n\t\t\t<app-nsrtm-grupo-botones-documento\r\n\t\t\t\t[showAgregar]=\"showAgregar\"\r\n\t\t\t\t[showAnular]=\"showAnular\"\r\n\t\t\t\t[itemSeleccionado]=\"documentoSeleccionado\"\r\n\t\t\t\t(crear)=\"onCrearDocumento($event)\"\r\n\t\t\t\t(ver)=\"onVerDocumento($event)\"\r\n\t\t\t\t(descargar)=\"onDescargarDocumento($event)\"\r\n\t\t\t\t(anular)=\"onAnularDocumento($event)\"\r\n\t\t\t>\r\n\t\t\t</app-nsrtm-grupo-botones-documento>\r\n\t\t</div>\r\n\t\t<app-nsrtm-tabla-documento\r\n\t\t\t[datasource]=\"datasourceDocumentos\"\r\n\t\t\t[loading]=\"loading\"\r\n\t\t\t[totalItems]=\"totalItems\"\r\n\t\t\t[page]=\"page!\"\r\n\t\t\t[pageSize]=\"pageSize!\"\r\n\t\t\t[filaSeleccionada]=\"documentoSeleccionado\"\r\n\t\t\t(seleccionar)=\"onSeleccionarDocumento($event)\"\r\n\t\t\t(setFolio)=\"setFolio($event)\"\r\n\t\t\t(paginar)=\"onChangePaginacion($event)\"\r\n\t\t>\r\n\t\t</app-nsrtm-tabla-documento>\r\n\t</div>\r\n\t<br />\r\n\t<div class=\"siaf-card mt-1\">\r\n\t\t<form [formGroup]=\"formulario\" autocomplete=\"off\">\r\n\t\t\t<div class=\"container-fluid px-0\">\r\n\t\t\t\t<ng-container *ngIf=\"listaDocSustento.length > 0\">\r\n\t\t\t\t\t<div class=\"col-12 mb-1\">\r\n\t\t\t\t\t\t<span class=\"title-group-uppercase\"\r\n\t\t\t\t\t\t\t>DOCUMENTOS DE SUSTENTO</span\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"row gx-3 align-items-baseline\">\r\n\t\t\t\t\t\t<div class=\"col-12 col-sm-6 col-md-9\">\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label class=\"form-label\" for=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\t>Documento(s) de sustento</label\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<ng-select\r\n\t\t\t\t\t\t\t\t\tid=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\tformControlName=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\tbindValue=\"maestroId\"\r\n\t\t\t\t\t\t\t\t\tbindLabel=\"descripcion\"\r\n\t\t\t\t\t\t\t\t\t[searchable]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[clearable]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[multiple]=\"true\"\r\n\t\t\t\t\t\t\t\t\t[items]=\"listaDocSustento\"\r\n\t\t\t\t\t\t\t\t\t[closeOnSelect]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[readonly]=\"true\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<ng-template\r\n\t\t\t\t\t\t\t\t\t\tng-option-tmp\r\n\t\t\t\t\t\t\t\t\t\tlet-item=\"item\"\r\n\t\t\t\t\t\t\t\t\t\tlet-item$=\"item$\"\r\n\t\t\t\t\t\t\t\t\t\tlet-index=\"index\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tid=\"item-sustento-{{ index }}\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[checked]=\"item$.selected\"\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"form-check-input\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t{{ item.descripcion }}\r\n\t\t\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t\t\t</ng-select>\r\n\t\t\t\t\t\t\t\t<val-errors controlName=\"docSustento\"></val-errors>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</div>\r\n\t\t</form>\r\n\t</div>\r\n</div>\r\n<div class=\"modal-footer\">\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn-cancel\"\r\n\t\tdata-dismiss=\"modal\"\r\n\t\t(click)=\"close()\"\r\n\t>\r\n\t\t<span class=\"feather icon-x me-1\"></span>\r\n\t\tCancelar\r\n\t</button>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn btn-primary\"\r\n\t\t[disabled]=\"loading\"\r\n\t\tngbAutofocus\r\n\t\t(click)=\"onSubmit()\"\r\n\t>\r\n\t\t<span\r\n\t\t\tclass=\"feather icon-save me-1\"\r\n\t\t\t*ngIf=\"!loading; else iconLoading\"\r\n\t\t></span>\r\n\t\t<ng-template #iconLoading>\r\n\t\t\t<div class=\"spinner-border spinner-border-sm me-2\" role=\"status\"></div>\r\n\t\t</ng-template>\r\n\t\t{{ loading ? \"Grabando...\" : \"Grabar\" }}\r\n\t</button>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: i10.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i10.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i12.ValidationErrorsComponent, selector: "val-errors", inputs: ["control", "controlName", "label"] }, { kind: "component", type: NsrtmGrupoBotonesDocumentoComponent, selector: "app-nsrtm-grupo-botones-documento", inputs: ["showAgregar", "showAnular", "itemSeleccionado"], outputs: ["crear", "ver", "descargar", "anular"] }, { kind: "component", type: NsrtmTablaDocumentoComponent, selector: "app-nsrtm-tabla-documento", inputs: ["datasource", "loading", "totalItems", "page", "pageSize", "filaSeleccionada"], outputs: ["seleccionar", "paginar", "setFolio"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogUploadFilesComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-nsrtm-dialog-upload-files', template: "<div class=\"modal-header\">\r\n\t<h6 class=\"modal-title w-100\" id=\"title\">Documentoooos anexos</h6>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn-close\"\r\n\t\taria-label=\"Close\"\r\n\t\t(click)=\"close()\"\r\n\t></button>\r\n</div>\r\n<div class=\"modal-body\">\r\n\t<div class=\"siaf-card shadow-none p-0\">\r\n\t\t<div class=\"container-fluid px-0\">\r\n\t\t\t<div class=\"row gx-3 align-items-baseline\"></div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"siaf-card\">\r\n\t\t<div class=\"p-content d-flex justify-content-between align-items-center\">\r\n\t\t\t<span class=\"title-group-uppercase\">Listado de documentos anexos</span>\r\n\t\t\t<app-nsrtm-grupo-botones-documento\r\n\t\t\t\t[showAgregar]=\"showAgregar\"\r\n\t\t\t\t[showAnular]=\"showAnular\"\r\n\t\t\t\t[itemSeleccionado]=\"documentoSeleccionado\"\r\n\t\t\t\t(crear)=\"onCrearDocumento($event)\"\r\n\t\t\t\t(ver)=\"onVerDocumento($event)\"\r\n\t\t\t\t(descargar)=\"onDescargarDocumento($event)\"\r\n\t\t\t\t(anular)=\"onAnularDocumento($event)\"\r\n\t\t\t>\r\n\t\t\t</app-nsrtm-grupo-botones-documento>\r\n\t\t</div>\r\n\t\t<app-nsrtm-tabla-documento\r\n\t\t\t[datasource]=\"datasourceDocumentos\"\r\n\t\t\t[loading]=\"loading\"\r\n\t\t\t[totalItems]=\"totalItems\"\r\n\t\t\t[page]=\"page!\"\r\n\t\t\t[pageSize]=\"pageSize!\"\r\n\t\t\t[filaSeleccionada]=\"documentoSeleccionado\"\r\n\t\t\t(seleccionar)=\"onSeleccionarDocumento($event)\"\r\n\t\t\t(setFolio)=\"setFolio($event)\"\r\n\t\t\t(paginar)=\"onChangePaginacion($event)\"\r\n\t\t>\r\n\t\t</app-nsrtm-tabla-documento>\r\n\t</div>\r\n\t<br />\r\n\t<div class=\"siaf-card mt-1\">\r\n\t\t<form [formGroup]=\"formulario\" autocomplete=\"off\">\r\n\t\t\t<div class=\"container-fluid px-0\">\r\n\t\t\t\t<ng-container *ngIf=\"listaDocSustento.length > 0\">\r\n\t\t\t\t\t<div class=\"col-12 mb-1\">\r\n\t\t\t\t\t\t<span class=\"title-group-uppercase\"\r\n\t\t\t\t\t\t\t>DOCUMENTOS DE SUSTENTO</span\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"row gx-3 align-items-baseline\">\r\n\t\t\t\t\t\t<div class=\"col-12 col-sm-6 col-md-9\">\r\n\t\t\t\t\t\t\t<div class=\"form-group\">\r\n\t\t\t\t\t\t\t\t<label class=\"form-label\" for=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\t>Documento(s) de sustento</label\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t<ng-select\r\n\t\t\t\t\t\t\t\t\tid=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\tformControlName=\"docSustento\"\r\n\t\t\t\t\t\t\t\t\tbindValue=\"maestroId\"\r\n\t\t\t\t\t\t\t\t\tbindLabel=\"descripcion\"\r\n\t\t\t\t\t\t\t\t\t[searchable]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[clearable]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[multiple]=\"true\"\r\n\t\t\t\t\t\t\t\t\t[items]=\"listaDocSustento\"\r\n\t\t\t\t\t\t\t\t\t[closeOnSelect]=\"false\"\r\n\t\t\t\t\t\t\t\t\t[readonly]=\"true\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<ng-template\r\n\t\t\t\t\t\t\t\t\t\tng-option-tmp\r\n\t\t\t\t\t\t\t\t\t\tlet-item=\"item\"\r\n\t\t\t\t\t\t\t\t\t\tlet-item$=\"item$\"\r\n\t\t\t\t\t\t\t\t\t\tlet-index=\"index\"\r\n\t\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tid=\"item-sustento-{{ index }}\"\r\n\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\r\n\t\t\t\t\t\t\t\t\t\t\t[checked]=\"item$.selected\"\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"form-check-input\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t\t{{ item.descripcion }}\r\n\t\t\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t\t\t</ng-select>\r\n\t\t\t\t\t\t\t\t<val-errors controlName=\"docSustento\"></val-errors>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</div>\r\n\t\t</form>\r\n\t</div>\r\n</div>\r\n<div class=\"modal-footer\">\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn-cancel\"\r\n\t\tdata-dismiss=\"modal\"\r\n\t\t(click)=\"close()\"\r\n\t>\r\n\t\t<span class=\"feather icon-x me-1\"></span>\r\n\t\tCancelar\r\n\t</button>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"btn btn-primary\"\r\n\t\t[disabled]=\"loading\"\r\n\t\tngbAutofocus\r\n\t\t(click)=\"onSubmit()\"\r\n\t>\r\n\t\t<span\r\n\t\t\tclass=\"feather icon-save me-1\"\r\n\t\t\t*ngIf=\"!loading; else iconLoading\"\r\n\t\t></span>\r\n\t\t<ng-template #iconLoading>\r\n\t\t\t<div class=\"spinner-border spinner-border-sm me-2\" role=\"status\"></div>\r\n\t\t</ng-template>\r\n\t\t{{ loading ? \"Grabando...\" : \"Grabar\" }}\r\n\t</button>\r\n</div>\r\n" }]
        }], ctorParameters: function () { return [{ type: i1$2.FormBuilder }, { type: AlertService }, { type: i1.NgbModal }, { type: i1.NgbActiveModal }, { type: ValidationFormService }, { type: DialogConfirmService }, { type: SpinnerService }, { type: ComunesRegistroControllerService }, { type: ParametroComunControllerService }, { type: GestionArchivoControllerService }]; }, propDecorators: { directorioId: [{
                type: Input
            }], tipoProcesoId: [{
                type: Input
            }], procesoModuloId: [{
                type: Input
            }], aplicacionId: [{
                type: Input
            }], medioDigitalParametroId: [{
                type: Input
            }], version: [{
                type: Input
            }], idDj: [{
                type: Input
            }], contribuyenteNumero: [{
                type: Input
            }], condicionContribuyenteId: [{
                type: Input
            }], tipoArchivoDigitalId: [{
                type: Input
            }], listaIdDocSustento: [{
                type: Input
            }], showAgregar: [{
                type: Input
            }], showAnular: [{
                type: Input
            }] } });

/**
 * Clase del componente Loading componente.
 *
 * @class LoadingComponent
 */
class NsrtmLoadingComponent {
    constructor() {
        /**
         * Declaración de variables
         */
        this.message = 'Estamos cargando la información solicitada';
        // method not implement
    }
    ngOnInit() {
        // method not implement
    }
}
NsrtmLoadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
NsrtmLoadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NsrtmLoadingComponent, selector: "app-nsrtm-loading", inputs: { message: "message" }, ngImport: i0, template: "<div class=\"w-100 text-center p-3\">\r\n\t<div class=\"lds-spinner\">\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t</div>\r\n\t<h6>\r\n\t\t<span>{{message}}</span>,<br/>\r\n\t\t<strong>espere por favor.</strong>\r\n\t</h6>\r\n</div>", styles: [".lds-spinner{display:inline-block;position:relative;width:80px;height:80px}.lds-spinner div{transform-origin:40px 40px;animation:lds-spinner .8s linear infinite}.lds-spinner div:after{content:\"\";display:block;position:absolute;top:16px;left:37px;width:6px;height:16px;border-radius:10px;background:#828283}.lds-spinner div:nth-child(1){transform:rotate(0);animation-delay:-.7s}.lds-spinner div:nth-child(2){transform:rotate(45deg);animation-delay:-.6s}.lds-spinner div:nth-child(3){transform:rotate(90deg);animation-delay:-.5s}.lds-spinner div:nth-child(4){transform:rotate(135deg);animation-delay:-.4s}.lds-spinner div:nth-child(5){transform:rotate(180deg);animation-delay:-.3s}.lds-spinner div:nth-child(6){transform:rotate(225deg);animation-delay:-.2s}.lds-spinner div:nth-child(7){transform:rotate(270deg);animation-delay:-.1s}.lds-spinner div:nth-child(8){transform:rotate(315deg);animation-delay:0s}@keyframes lds-spinner{0%{opacity:1}to{opacity:0}}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmLoadingComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-nsrtm-loading', template: "<div class=\"w-100 text-center p-3\">\r\n\t<div class=\"lds-spinner\">\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t\t<div></div>\r\n\t</div>\r\n\t<h6>\r\n\t\t<span>{{message}}</span>,<br/>\r\n\t\t<strong>espere por favor.</strong>\r\n\t</h6>\r\n</div>", styles: [".lds-spinner{display:inline-block;position:relative;width:80px;height:80px}.lds-spinner div{transform-origin:40px 40px;animation:lds-spinner .8s linear infinite}.lds-spinner div:after{content:\"\";display:block;position:absolute;top:16px;left:37px;width:6px;height:16px;border-radius:10px;background:#828283}.lds-spinner div:nth-child(1){transform:rotate(0);animation-delay:-.7s}.lds-spinner div:nth-child(2){transform:rotate(45deg);animation-delay:-.6s}.lds-spinner div:nth-child(3){transform:rotate(90deg);animation-delay:-.5s}.lds-spinner div:nth-child(4){transform:rotate(135deg);animation-delay:-.4s}.lds-spinner div:nth-child(5){transform:rotate(180deg);animation-delay:-.3s}.lds-spinner div:nth-child(6){transform:rotate(225deg);animation-delay:-.2s}.lds-spinner div:nth-child(7){transform:rotate(270deg);animation-delay:-.1s}.lds-spinner div:nth-child(8){transform:rotate(315deg);animation-delay:0s}@keyframes lds-spinner{0%{opacity:1}to{opacity:0}}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { message: [{
                type: Input
            }] } });

// type ErrorHandle = {
// 	status?: number;
// 	message?: string;
// };
const getStructError$ = (httpError) => {
    //console.log('httpError', httpError);
    const { error, status, message } = httpError;
    if (error instanceof Blob) {
        return readBlobAsJson(error);
    }
    if (status > 500 || status < 400)
        return of({
            mensaje: message,
            errores: [],
            codigo: status.toString(),
            tipMen: TIPO_MENSAJE_ERR_VAL.DANGER,
        });
    if (status === 403) {
        return of({
            mensaje: message,
            errores: [],
            codigo: status.toString(),
            tipMen: TIPO_MENSAJE_ERR_VAL.DANGER,
        });
    }
    if (status === 500) {
        return of({
            mensaje: (error === null || error === void 0 ? void 0 : error.mensaje) || message,
            errores: [],
            codigo: status.toString(),
            tipMen: TIPO_MENSAJE_ERR_VAL.DANGER,
        });
    }
    return of(error);
};
const readBlobAsJson = (blob) => {
    return from(readBlobAsText(blob)).pipe(map((jsonString) => JSON.parse(jsonString)));
};
const readBlobAsText = (blob) => {
    return new Promise((resolve, reject) => {
        const reader = new FileReader();
        reader.onload = () => {
            const text = reader.result;
            resolve(text);
        };
        reader.onerror = reject;
        reader.readAsText(blob);
    });
};
class ErrorCatchingInterceptor {
    constructor() { }
    intercept(request, next) {
        return next.handle(request).pipe(catchError((httpError) => {
            return getStructError$(httpError).pipe(switchMap((error) => {
                return throwError(() => error);
            }));
        }));
    }
}
ErrorCatchingInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorCatchingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
ErrorCatchingInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorCatchingInterceptor });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorCatchingInterceptor, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return []; } });

const keyStorageTerminal = 'IPLOCAL-NSRTM';
class SessionTerminalService {
    constructor() {
        // method not implemented
    }
    obtenerSesionTerminal() {
        const sessionTerminal = window.localStorage.getItem(keyStorageTerminal);
        if (!sessionTerminal)
            return '0.0.0.0';
        return sessionTerminal;
    }
}
SessionTerminalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionTerminalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
SessionTerminalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionTerminalService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SessionTerminalService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }], ctorParameters: function () { return []; } });

class AuthInterceptorService {
    constructor(sessionTerminal) {
        this.sessionTerminal = sessionTerminal;
    }
    intercept(req, next) {
        var _a;
        //1.- obtener token
        const token = (_a = localStorage
            .getItem('TKN-NSRTM')) === null || _a === void 0 ? void 0 : _a.replace(/['"]+/g, '');
        //2.- obtener ip
        const auditoriaRequest = {
            terminal: this.sessionTerminal.obtenerSesionTerminal(),
        };
        let request = req;
        if (token) {
            request = req.clone({
                setHeaders: {
                    authorization: `Bearer ${token}`,
                    'client-nsrtm': JSON.stringify(auditoriaRequest),
                },
            });
        }
        return next.handle(request);
    }
}
AuthInterceptorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptorService, deps: [{ token: SessionTerminalService }], target: i0.ɵɵFactoryTarget.Injectable });
AuthInterceptorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptorService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthInterceptorService, decorators: [{
            type: Injectable
        }], ctorParameters: function () { return [{ type: SessionTerminalService }]; } });

const httpInterceptorProviders = [
    {
        provide: HTTP_INTERCEPTORS,
        useClass: ErrorCatchingInterceptor,
        multi: true,
    },
    {
        provide: HTTP_INTERCEPTORS,
        useClass: AuthInterceptorService,
        multi: true,
    },
];

class NsrtmGestionArchivoNpmModule {
}
NsrtmGestionArchivoNpmModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
NsrtmGestionArchivoNpmModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmModule, declarations: [NsrtmGestionArchivoNpmComponent,
        NsrtmDialogUploadFilesComponent,
        NsrtmDialogVisorDocumentoComponent,
        NsrtmGrupoBotonesDocumentoComponent,
        NsrtmButtonComponent,
        ToastLoadingComponent,
        NsrtmTablaDocumentoComponent,
        NoResultsComponent,
        NsrtmLoadingComponent,
        LoadingComponent,
        TableFooterPaginationComponent], imports: [NgSelectModule,
        NgbPaginationModule,
        CommonModule,
        FormsModule,
        ReactiveFormsModule,
        DigitOnlyModule, i1$3.NgxMaskModule, NgbToastModule,
        RouterModule,
        ValdemortModule,
        PdfViewerModule], exports: [NsrtmGestionArchivoNpmComponent,
        NsrtmDialogUploadFilesComponent,
        NsrtmGrupoBotonesDocumentoComponent,
        NsrtmButtonComponent,
        ToastLoadingComponent,
        NsrtmTablaDocumentoComponent,
        NoResultsComponent,
        NsrtmLoadingComponent,
        LoadingComponent,
        TableFooterPaginationComponent] });
NsrtmGestionArchivoNpmModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmModule, providers: [
        httpInterceptorProviders,
        { provide: LOCALE_ID, useValue: "es-PE" },
    ], imports: [NgSelectModule,
        NgbPaginationModule,
        CommonModule,
        FormsModule,
        ReactiveFormsModule,
        DigitOnlyModule,
        NgxMaskModule.forRoot(),
        NgbToastModule,
        RouterModule,
        ValdemortModule,
        PdfViewerModule] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmGestionArchivoNpmModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [
                        NsrtmGestionArchivoNpmComponent,
                        NsrtmDialogUploadFilesComponent,
                        NsrtmDialogVisorDocumentoComponent,
                        NsrtmGrupoBotonesDocumentoComponent,
                        NsrtmButtonComponent,
                        ToastLoadingComponent,
                        NsrtmTablaDocumentoComponent,
                        NoResultsComponent,
                        NsrtmLoadingComponent,
                        LoadingComponent,
                        TableFooterPaginationComponent,
                    ],
                    imports: [
                        NgSelectModule,
                        NgbPaginationModule,
                        CommonModule,
                        FormsModule,
                        ReactiveFormsModule,
                        DigitOnlyModule,
                        NgxMaskModule.forRoot(),
                        NgbToastModule,
                        RouterModule,
                        ValdemortModule,
                        PdfViewerModule,
                    ],
                    exports: [
                        NsrtmGestionArchivoNpmComponent,
                        NsrtmDialogUploadFilesComponent,
                        NsrtmGrupoBotonesDocumentoComponent,
                        NsrtmButtonComponent,
                        ToastLoadingComponent,
                        NsrtmTablaDocumentoComponent,
                        NoResultsComponent,
                        NsrtmLoadingComponent,
                        LoadingComponent,
                        TableFooterPaginationComponent,
                    ],
                    providers: [
                        httpInterceptorProviders,
                        { provide: LOCALE_ID, useValue: "es-PE" },
                    ],
                }]
        }] });

class NsrtmDialogUploadFilesService {
    constructor(_modalService) {
        this._modalService = _modalService;
    }
    openDialogUploadFiles(props) {
        const modalRef = this._modalService.open(NsrtmDialogUploadFilesComponent, {
            backdrop: 'static',
            centered: true,
            keyboard: false,
            size: 'lg',
        });
        modalRef.componentInstance.directorioId = props.directorioId;
        modalRef.componentInstance.tipoProcesoId = props.tipoProcesoId;
        modalRef.componentInstance.procesoModuloId = props.procesoModuloId;
        modalRef.componentInstance.aplicacionId = props.aplicacionId;
        modalRef.componentInstance.medioDigitalParametroId =
            props.medioDigitalParametroId;
        modalRef.componentInstance.version = props.version;
        modalRef.componentInstance.idDj = props.idDj;
        modalRef.componentInstance.tipoArchivoDigitalId =
            props.tipoArchivoDigitalId;
        modalRef.componentInstance.listaIdDocSustento = props.listaIdDocSustento;
        modalRef.componentInstance.contribuyenteNumero =
            props.contribuyenteNumero;
        modalRef.componentInstance.condicionContribuyenteId =
            props.condicionContribuyenteId;
        modalRef.componentInstance.showAgregar = props.showAgregar;
        modalRef.componentInstance.showAnular = props.showAnular;
        return modalRef.closed;
    }
}
NsrtmDialogUploadFilesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogUploadFilesService, deps: [{ token: i1.NgbModal }], target: i0.ɵɵFactoryTarget.Injectable });
NsrtmDialogUploadFilesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogUploadFilesService, providedIn: 'root' });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NsrtmDialogUploadFilesService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }], ctorParameters: function () { return [{ type: i1.NgbModal }]; } });

/*
 * Public API Surface of nsrtm-gestion-archivo-npm
 */

/**
 * Generated bundle index. Do not edit.
 */

export { APLICACION_ID, DIRECTORIO_ID, LoadingComponent, MEDIO_DIGITAL_PARAMETRO, MEGA_BYTES, NoResultsComponent, NsrtmButtonComponent, NsrtmDialogUploadFilesComponent, NsrtmDialogUploadFilesService, NsrtmGestionArchivoNpmComponent, NsrtmGestionArchivoNpmModule, NsrtmGestionArchivoNpmService, NsrtmGrupoBotonesDocumentoComponent, NsrtmLoadingComponent, NsrtmTablaDocumentoComponent, PESO_MAXIMO_ARCHIVO_MODULO_ID, PESO_MAXIMO_TIPO_PARAMETRO_ID, PROCESO_MODULO_ID, TIPO_ARCHIVO_DIGITAL_ID, TIPO_ARCHIVO_ID, TIPO_PROCESO_ID, TableFooterPaginationComponent, ToastLoadingComponent, VERSION, initialPagination };
//# sourceMappingURL=nsrtm-gestionarchivo-npm-prueba2.mjs.map