wm-menu 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/bundles/wm-menu.umd.js +408 -9
  2. package/bundles/wm-menu.umd.js.map +1 -1
  3. package/bundles/wm-menu.umd.min.js +2 -2
  4. package/bundles/wm-menu.umd.min.js.map +1 -1
  5. package/esm2015/lib/wm-menu/asistente-datos/asistente-datos-api.service.js +52 -0
  6. package/esm2015/lib/wm-menu/asistente-datos/asistente-datos.component.js +178 -0
  7. package/esm2015/lib/wm-menu/asistente-datos/reconocimiento-voz.service.js +77 -0
  8. package/esm2015/lib/wm-menu/services/wm-menu-fuente-iconos.service.js +58 -0
  9. package/esm2015/lib/wm-menu/services/wm-menu-servicio.service.js +9 -1
  10. package/esm2015/lib/wm-menu/wm-menu.component.js +37 -5
  11. package/esm2015/lib/wm-menu.module.js +9 -2
  12. package/esm2015/wm-menu.js +5 -1
  13. package/esm5/lib/wm-menu/asistente-datos/asistente-datos-api.service.js +53 -0
  14. package/esm5/lib/wm-menu/asistente-datos/asistente-datos.component.js +194 -0
  15. package/esm5/lib/wm-menu/asistente-datos/reconocimiento-voz.service.js +79 -0
  16. package/esm5/lib/wm-menu/services/wm-menu-fuente-iconos.service.js +45 -0
  17. package/esm5/lib/wm-menu/services/wm-menu-servicio.service.js +9 -1
  18. package/esm5/lib/wm-menu/wm-menu.component.js +41 -5
  19. package/esm5/lib/wm-menu.module.js +9 -2
  20. package/esm5/wm-menu.js +5 -1
  21. package/fesm2015/wm-menu.js +395 -7
  22. package/fesm2015/wm-menu.js.map +1 -1
  23. package/fesm5/wm-menu.js +405 -7
  24. package/fesm5/wm-menu.js.map +1 -1
  25. package/lib/wm-menu/asistente-datos/asistente-datos-api.service.d.ts +26 -0
  26. package/lib/wm-menu/asistente-datos/asistente-datos.component.d.ts +39 -0
  27. package/lib/wm-menu/asistente-datos/reconocimiento-voz.service.d.ts +7 -0
  28. package/lib/wm-menu/services/wm-menu-fuente-iconos.service.d.ts +4 -0
  29. package/lib/wm-menu/services/wm-menu-servicio.service.d.ts +1 -0
  30. package/lib/wm-menu/wm-menu.component.d.ts +10 -1
  31. package/package.json +1 -1
  32. package/wm-menu.d.ts +4 -0
  33. package/wm-menu.metadata.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@angular/platform-browser'), require('@angular/material/icon'), require('@auth0/angular-jwt'), require('@angular/material/toolbar'), require('@angular/material/sidenav'), require('@angular/material/list'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/core')) :
3
- typeof define === 'function' && define.amd ? define('wm-menu', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', '@angular/platform-browser', '@angular/material/icon', '@auth0/angular-jwt', '@angular/material/toolbar', '@angular/material/sidenav', '@angular/material/list', '@angular/material/button', '@angular/material/menu', '@angular/material/core'], factory) :
4
- (global = global || self, factory(global['wm-menu'] = {}, global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.ng.platformBrowser, global.ng.material.icon, global.angularJwt, global.ng.material.toolbar, global.ng.material.sidenav, global.ng.material.list, global.ng.material.button, global.ng.material.menu, global.ng.material.core));
5
- }(this, (function (exports, core, http, operators, rxjs, platformBrowser, icon, angularJwt, toolbar, sidenav, list, button, menu, core$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('@angular/platform-browser'), require('@angular/material/icon'), require('@auth0/angular-jwt'), require('@angular/material/toolbar'), require('@angular/material/sidenav'), require('@angular/material/list'), require('@angular/material/button'), require('@angular/material/menu'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@angular/material/core'), require('@angular/forms')) :
3
+ typeof define === 'function' && define.amd ? define('wm-menu', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', '@angular/platform-browser', '@angular/material/icon', '@auth0/angular-jwt', '@angular/material/toolbar', '@angular/material/sidenav', '@angular/material/list', '@angular/material/button', '@angular/material/menu', '@angular/material/table', '@angular/material/tooltip', '@angular/material/core', '@angular/forms'], factory) :
4
+ (global = global || self, factory(global['wm-menu'] = {}, global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.ng.platformBrowser, global.ng.material.icon, global.angularJwt, global.ng.material.toolbar, global.ng.material.sidenav, global.ng.material.list, global.ng.material.button, global.ng.material.menu, global.ng.material.table, global.ng.material.tooltip, global.ng.material.core, global.ng.forms));
5
+ }(this, (function (exports, core, http, operators, rxjs, platformBrowser, icon, angularJwt, toolbar, sidenav, list, button, menu, table, tooltip, core$1, forms) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -310,6 +310,14 @@
310
310
  return rxjs.throwError(error.error);
311
311
  }));
312
312
  };
313
+ // Funciones (permisos) del usuario autenticado, para gatear features del menú como el
314
+ // asistente "Pregúntale a tus datos" (CodigoLogica === 'WebChatConsultaIA').
315
+ WmMenuServicioService.prototype.funcionesObtener = function (url, token) {
316
+ var headers = new http.HttpHeaders({
317
+ 'Authorization': "Bearer " + token
318
+ });
319
+ return this.http.get(url, { headers: headers }).pipe(operators.map(function (resp) { return resp; }), operators.catchError(function (error) { return rxjs.throwError(error.error); }));
320
+ };
313
321
  WmMenuServicioService.ctorParameters = function () { return [
314
322
  { type: http.HttpClient },
315
323
  { type: icon.MatIconRegistry },
@@ -478,19 +486,82 @@
478
486
  return WmMenuAlertaPanicoService;
479
487
  }());
480
488
 
489
+ // Material Symbols Outlined (rellena) registrada con un nombre propio para que no choque con la
490
+ // versión de Material Symbols o Material Icons que cargue la página que aloja el menú.
491
+ var FAMILIA = 'WM Menu Symbols';
492
+ var URL_CSS = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0';
493
+ var WmMenuFuenteIconosService = /** @class */ (function () {
494
+ function WmMenuFuenteIconosService() {
495
+ this.iniciada = false;
496
+ }
497
+ WmMenuFuenteIconosService.prototype.cargar = function () {
498
+ if (this.iniciada) {
499
+ return;
500
+ }
501
+ this.iniciada = true;
502
+ var estilo = document.createElement('style');
503
+ estilo.textContent = ".wm-menu-iconos {\n font-family: '" + FAMILIA + "';\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n }";
504
+ document.head.appendChild(estilo);
505
+ // Oculta los iconos mientras carga la fuente para que no se vea el nombre del icono como texto.
506
+ var ocultar = document.createElement('style');
507
+ ocultar.textContent = '.wm-menu-iconos { visibility: hidden; }';
508
+ document.head.appendChild(ocultar);
509
+ // Se lee la URL del archivo desde el CSS de Google Fonts en lugar de fijarla, porque cambia con cada versión.
510
+ fetch(URL_CSS)
511
+ .then(function (resp) { return resp.text(); })
512
+ .then(function (css) {
513
+ var urlFuente = /url\(([^)]+)\)/.exec(css)[1];
514
+ var fuente = new window.FontFace(FAMILIA, "url(" + urlFuente + ")");
515
+ document.fonts.add(fuente);
516
+ return fuente.load();
517
+ })
518
+ .catch(function (error) { return console.error('wm-menu: no se pudo cargar la fuente de iconos', error); })
519
+ .then(function () { return document.head.removeChild(ocultar); });
520
+ };
521
+ WmMenuFuenteIconosService.ɵprov = core.ɵɵdefineInjectable({ factory: function WmMenuFuenteIconosService_Factory() { return new WmMenuFuenteIconosService(); }, token: WmMenuFuenteIconosService, providedIn: "root" });
522
+ WmMenuFuenteIconosService = __decorate([
523
+ core.Injectable({
524
+ providedIn: 'root'
525
+ })
526
+ ], WmMenuFuenteIconosService);
527
+ return WmMenuFuenteIconosService;
528
+ }());
529
+
481
530
  var WmMenuComponent = /** @class */ (function () {
482
- function WmMenuComponent(wmMenuServicioService, alertaPanicoService) {
531
+ function WmMenuComponent(wmMenuServicioService, alertaPanicoService, fuenteIconosService) {
483
532
  this.wmMenuServicioService = wmMenuServicioService;
484
533
  this.alertaPanicoService = alertaPanicoService;
534
+ this.fuenteIconosService = fuenteIconosService;
535
+ this.mostrarAsistente = false;
536
+ this.idiomaAsistente = 'es-CO';
537
+ this.asistenteAbierto = false;
538
+ this.funcionesUsuario = [];
485
539
  this.menuSecundarioSel = new MenuSecundario();
486
540
  this.menuLateralAbierto = false;
487
541
  this.menuIdioma = [];
488
542
  this.intervaloPeticionesMs = 60000;
489
543
  }
544
+ Object.defineProperty(WmMenuComponent.prototype, "puedeAsistente", {
545
+ get: function () {
546
+ var forzado = this.mostrarAsistente === true || this.mostrarAsistente === 'true' || this.mostrarAsistente === '1';
547
+ var tienePermiso = this.funcionesUsuario.some(function (f) { return f.CodigoLogica === 'WebChatConsultaIA'; });
548
+ return forzado || tienePermiso;
549
+ },
550
+ enumerable: true,
551
+ configurable: true
552
+ });
490
553
  WmMenuComponent.prototype.ngOnInit = function () {
491
554
  var _this = this;
555
+ this.fuenteIconosService.cargar();
492
556
  this.cargarMenuCuenta();
493
557
  this.alertaPanicoService.iniciarProceso(this.intervaloPeticionesMs, function () { return _this.alertaPanicoService.revisarAlertasPendientes(_this.urlObtenerAlertasPanico, _this.token); }, this.urlObtenerParametro, this.token, this.rutaAudio);
558
+ // Carga las funciones del usuario para gatear el asistente (puedeAsistente / WebChatConsultaIA).
559
+ // Si falla (ej. 401), queda vacía y el asistente no se muestra.
560
+ if (this.urlObtenerFunciones && this.token) {
561
+ this.wmMenuServicioService
562
+ .funcionesObtener(this.urlObtenerFunciones, this.token)
563
+ .subscribe(function (resp) { _this.funcionesUsuario = (resp !== null && resp !== void 0 ? resp : []); }, function () { _this.funcionesUsuario = []; });
564
+ }
494
565
  if (this.urlMenu && this.token) {
495
566
  var helper = new angularJwt.JwtHelperService();
496
567
  var decodedToken = helper.decodeToken(this.token);
@@ -556,7 +627,8 @@
556
627
  };
557
628
  WmMenuComponent.ctorParameters = function () { return [
558
629
  { type: WmMenuServicioService },
559
- { type: WmMenuAlertaPanicoService }
630
+ { type: WmMenuAlertaPanicoService },
631
+ { type: WmMenuFuenteIconosService }
560
632
  ]; };
561
633
  __decorate([
562
634
  core.Input()
@@ -612,30 +684,353 @@
612
684
  __decorate([
613
685
  core.Input()
614
686
  ], WmMenuComponent.prototype, "urlIdiomas", void 0);
687
+ __decorate([
688
+ core.Input()
689
+ ], WmMenuComponent.prototype, "urlObtenerFunciones", void 0);
690
+ __decorate([
691
+ core.Input()
692
+ ], WmMenuComponent.prototype, "mostrarAsistente", void 0);
693
+ __decorate([
694
+ core.Input()
695
+ ], WmMenuComponent.prototype, "urlAsistenteConsultar", void 0);
696
+ __decorate([
697
+ core.Input()
698
+ ], WmMenuComponent.prototype, "idiomaAsistente", void 0);
615
699
  WmMenuComponent = __decorate([
616
700
  core.Component({
617
701
  selector: 'wm-menu',
618
- template: "<div class=\"menu\" [ngStyle]=\"{'background-color': colorFondo, 'color': colorTexto}\">\r\n <div class=\"d-lg-none\">\r\n <button mat-icon-button (click)=\"menuLateralAbierto=!menuLateralAbierto; menuPrincipalSel = null\">\r\n <mat-icon *ngIf=\"!menuLateralAbierto\" class=\"animate__animated animate__fadeInRight animate__faster\">menu\r\n </mat-icon>\r\n <mat-icon *ngIf=\"menuLateralAbierto\" class=\"animate__animated animate__fadeInLeft animate__faster\">close\r\n </mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"d-lg-none logo-menu-principal\">\r\n <img class=\"logo\" src=\"{{logo}}\">\r\n </div>\r\n <div class=\"d-none d-lg-block\">\r\n <img class=\"logo\" src=\"{{logo}}\">\r\n <div *ngFor=\"let menuItem of menuPrincipal; let i=index\" class=\"d-inline-block\">\r\n\r\n <a *ngIf=\"menuItem.url\" mat-button [href]=\"menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n {{menuItem.titulo}}\r\n </a>\r\n <button *ngIf=\"!menuItem.url\" mat-button (click)=\"clickMenuPrincipal(i)\">\r\n {{menuItem.titulo}}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"info-adicional\">\r\n <div class=\"datos border-r mt-1\" *ngIf=\"nombreCliente\">{{nombreCliente}}<mat-icon>people</mat-icon></div>\r\n <div class=\"datos border-r mt-1\" *ngIf=\"nombreUsuario\">{{nombreUsuario}}<mat-icon>person_outline</mat-icon></div>\r\n <div class=\"version\" *ngIf=\"versionWeb\">{{versionWeb}}</div>\r\n <div class=\"content-idioma\" *ngIf=\"urlIdiomas\">\r\n <mat-menu #menuIdiomas=\"matMenu\">\r\n <a mat-menu-item *ngFor=\"let menuItem of menuIdioma.Culturas\" href=\"{{urlCuentaSeguridad}}CambiarIdioma?culture={{menuItem.Name}}&ReturnUrl=/\">\r\n {{menuItem.NativeName}}\r\n </a>\r\n </mat-menu>\r\n <button mat-button [matMenuTriggerFor]=\"menuIdiomas\"><label class=\"mt-1\">{{menuIdioma.Lenguaje}}</label><mat-icon class=\"icon-idioma\">language</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n <div>\r\n <mat-menu #submenu=\"matMenu\">\r\n <a mat-menu-item *ngFor=\"let menuItem of menuSecundarioSel.hijos\" href=\"{{menuItem.url}}\"\r\n [disabled]=\"!menuItem.url\">\r\n <mat-icon *ngIf=\"menuItem.icono\">{{menuItem.icono}}</mat-icon>\r\n {{menuItem.titulo}}\r\n </a>\r\n </mat-menu>\r\n <button *ngFor=\"let menuItem of menuSecundario; let i = index\" mat-icon-button [matMenuTriggerFor]=\"submenu\"\r\n (click)=\"clickMenuSecundario(i)\">\r\n <mat-icon>{{menuItem.icono}}</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"menu-lateral d-lg-none animate__animated animate__fadeInRight animate__faster\" *ngIf=\"menuLateralAbierto\">\r\n <div class=\"row\">\r\n <div *ngFor=\"let menuItem of menuPrincipal; let i=index\" class=\"col-sm-6 col-md-4\">\r\n <a *ngIf=\"menuItem.url\" [href]=\"menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n <div>\r\n <mat-icon svgIcon=\"{{menuItem.icono}}\">{{menuItem.icono}}</mat-icon>\r\n <p>{{menuItem.titulo}}</p>\r\n </div>\r\n </a>\r\n <span *ngIf=\"!menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n <div>\r\n <mat-icon svgIcon=\"{{menuItem.icono}}\">{{menuItem.icono}}</mat-icon>\r\n <p>{{menuItem.titulo}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"sub-menu-fondo animate__animated animate__fadeIn animate__faster\" (click)=\"menuPrincipalSel=null\"\r\n *ngIf=\"menuPrincipalSel\"></div>\r\n\r\n<div class=\"sub-menu animate__animated animate__fadeIn animate__faster\" *ngIf=\"menuPrincipalSel\">\r\n <div class=\"container-fluid\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-lg-5\">\r\n <div class=\"px-3 px-sm-5 pt-5 pb-lg-5 text-center descripcion-menu\">\r\n <mat-icon [ngStyle]=\"{'color': colorFondo}\" svgIcon=\"{{menuPrincipalSel.icono}}\">\r\n {{menuPrincipalSel.icono}}</mat-icon>\r\n <p>{{menuPrincipalSel.titulo}}</p>\r\n <p class=\"text-secondary\">{{menuPrincipalSel.descripcion}}</p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-lg-7 my-4\">\r\n <div class=\"px-3 px-md-4 py-2 py-md-2\">\r\n <ul class=\"list-unstyled\">\r\n\r\n <li class=\"mb-3 d-flex\" *ngFor=\"let menuItem of menuPrincipalSel.hijos\">\r\n <mat-icon>{{menuItem.icono}}</mat-icon>\r\n <div class=\"ml-2 flex-fill\">\r\n <a href=\"{{menuItem.url}}\" *ngIf=\"menuItem.url\">\r\n <div class=\"lead mb-2\">{{menuItem.titulo}}</div>\r\n </a>\r\n <div class=\"lead mb-2\" *ngIf=\"!menuItem.url\">{{menuItem.titulo}}</div>\r\n\r\n <a href=\"{{menuSubItem.url}}\" class=\"pl-2 my-2\" *ngFor=\"let menuSubItem of menuItem.hijos\">\r\n <div class=\"text-secondary\">{{menuSubItem.titulo}}</div>\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button mat-icon-button class=\"close-icon d-lg-none\" (click)=\"menuPrincipalSel=null\">\r\n <mat-icon>arrow_back</mat-icon>\r\n </button>\r\n</div>\r\n<div class=\"alerta-almacenamiento\" *ngIf=\"porcentajeUtilizado >= 100\">Su capacidad de almacenamiento ha llegado al {{porcentajeUtilizado}}% , libere espacio o adquiera mayor capacidad</div>",
619
- styles: [".menu{height:46px;display:flex;justify-content:space-between;align-items:center;top:0;left:0;right:0;background-color:#1c98a4;color:#fff;padding:0 4px}.menu .d-lg-block .mat-button{font-weight:400;height:46px;line-height:46px}.menu .logo{display:inline-block;height:40px}.menu .logo-menu-principal{position:absolute;display:block;left:65px}.menu .logo-menu-principal>img{display:block;margin:0 -50%}.menu .info-adicional{color:#fff;display:flex;justify-content:end;font-size:13px;position:absolute;right:47px}.menu .info-adicional .border-r{border-right:1px solid #fff}.menu .info-adicional .version{margin:7px 0 0 7px}.menu .info-adicional div.datos{margin:0 2px 0 5px;height:28px}.menu .info-adicional .mat-icon{vertical-align:middle;font-size:17px;color:#fff;line-height:21px;margin-left:2px}.menu .info-adicional button{padding:0 0 0 15px}.menu .info-adicional .content-idioma{margin:-5px 2px 0 5px;display:block;cursor:pointer}.menu .info-adicional .icon-idioma{font-size:17px!important;vertical-align:text-top!important;color:#fffc}.sub-menu{width:100%;position:absolute;top:46px;z-index:1000;background-color:#fff;display:flex;overflow-y:auto;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.sub-menu .close-icon{position:absolute;left:4px;top:4px}.sub-menu .descripcion-menu .mat-icon{color:#1c98a4;width:100px;height:100px}.sub-menu .descripcion-menu p:first-of-type{font-weight:300;font-size:30px;margin:16px 0}.sub-menu .descripcion-menu p:last-of-type{color:#6c757d}.sub-menu li{float:left;width:50%}.sub-menu li>.mat-icon{color:#444}.sub-menu li:nth-child(even){float:right}.sub-menu li a{transition:.5s;display:block}.sub-menu li a:hover{margin-left:8px}.sub-menu li .lead{line-height:24px;color:#212529;font-size:17px}.sub-menu-fondo{background:#272d3357;position:absolute;top:46px;bottom:0;left:0;right:0;z-index:1000}.menu-lateral{width:100%;position:absolute;top:46px;bottom:0;left:0;right:0;z-index:1000;display:flex;flex-direction:column;overflow-y:auto;background:#f7f7f7;padding:20px}.menu-lateral>div>div>*>div{text-align:center;padding:16px;background-color:#fff;margin:0 0 16px;color:#333;cursor:pointer;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.menu-lateral>div>div>*>div>.mat-icon{width:50px;height:50px}.menu-lateral>div>div>*>div>p{padding:0;margin:8px 0 0}a.mat-menu-item{color:#444!important}.alerta-almacenamiento{background:#ffffec;border-bottom:1px solid #efff00;min-height:39px;line-height:36px;font-size:12px;padding:0 0 0 25px}@media (max-width:767.98px){.sub-menu ul{margin:auto;padding:0 10px}.sub-menu ul li{float:none;width:100%}.sub-menu ul li:nth-child(even){float:none}}@media (max-width:991.98px){.sub-menu{bottom:0}}@media (min-width:600px){.logo-menu-principal{left:50%!important}}* :focus,:active{outline:0!important}"]
702
+ template: "<div class=\"menu\" [ngStyle]=\"{'background-color': colorFondo, 'color': colorTexto}\">\r\n <div class=\"d-lg-none\">\r\n <button mat-icon-button (click)=\"menuLateralAbierto=!menuLateralAbierto; menuPrincipalSel = null\">\r\n <mat-icon fontSet=\"wm-menu-iconos\" *ngIf=\"!menuLateralAbierto\" class=\"animate__animated animate__fadeInRight animate__faster\">menu\r\n </mat-icon>\r\n <mat-icon fontSet=\"wm-menu-iconos\" *ngIf=\"menuLateralAbierto\" class=\"animate__animated animate__fadeInLeft animate__faster\">close\r\n </mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"d-lg-none logo-menu-principal\">\r\n <img class=\"logo\" src=\"{{logo}}\">\r\n </div>\r\n <div class=\"d-none d-lg-block\">\r\n <img class=\"logo\" src=\"{{logo}}\">\r\n <div *ngFor=\"let menuItem of menuPrincipal; let i=index\" class=\"d-inline-block\">\r\n\r\n <a *ngIf=\"menuItem.url\" mat-button [href]=\"menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n {{menuItem.titulo}}\r\n </a>\r\n <button *ngIf=\"!menuItem.url\" mat-button (click)=\"clickMenuPrincipal(i)\">\r\n {{menuItem.titulo}}\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"info-adicional\">\r\n <div class=\"datos border-r mt-1 boton-asistente-datos\" *ngIf=\"puedeAsistente\" matTooltip=\"Preg\u00FAntale a tus datos\" (click)=\"asistenteAbierto = !asistenteAbierto\">\r\n <span class=\"icono-asistente-fab\"></span>\r\n </div>\r\n <div class=\"datos border-r mt-1\" *ngIf=\"nombreCliente\">{{nombreCliente}}<mat-icon fontSet=\"wm-menu-iconos\">people</mat-icon></div>\r\n <div class=\"datos border-r mt-1\" *ngIf=\"nombreUsuario\">{{nombreUsuario}}<mat-icon fontSet=\"wm-menu-iconos\">person_outline</mat-icon></div>\r\n <div class=\"version\" *ngIf=\"versionWeb\">{{versionWeb}}</div>\r\n <div class=\"content-idioma\" *ngIf=\"urlIdiomas\">\r\n <mat-menu #menuIdiomas=\"matMenu\">\r\n <a mat-menu-item *ngFor=\"let menuItem of menuIdioma.Culturas\" href=\"{{urlCuentaSeguridad}}CambiarIdioma?culture={{menuItem.Name}}&ReturnUrl=/\">\r\n {{menuItem.NativeName}}\r\n </a>\r\n </mat-menu>\r\n <button mat-button [matMenuTriggerFor]=\"menuIdiomas\"><label class=\"mt-1\">{{menuIdioma.Lenguaje}}</label><mat-icon fontSet=\"wm-menu-iconos\" class=\"icon-idioma\">language</mat-icon></button>\r\n </div>\r\n\r\n </div>\r\n <div>\r\n <mat-menu #submenu=\"matMenu\">\r\n <a mat-menu-item *ngFor=\"let menuItem of menuSecundarioSel.hijos\" href=\"{{menuItem.url}}\"\r\n [disabled]=\"!menuItem.url\">\r\n <mat-icon fontSet=\"wm-menu-iconos\" *ngIf=\"menuItem.icono\">{{menuItem.icono}}</mat-icon>\r\n {{menuItem.titulo}}\r\n </a>\r\n </mat-menu>\r\n <button *ngFor=\"let menuItem of menuSecundario; let i = index\" mat-icon-button [matMenuTriggerFor]=\"submenu\"\r\n (click)=\"clickMenuSecundario(i)\">\r\n <mat-icon fontSet=\"wm-menu-iconos\">{{menuItem.icono}}</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<div class=\"menu-lateral d-lg-none animate__animated animate__fadeInRight animate__faster\" *ngIf=\"menuLateralAbierto\">\r\n <div class=\"row\">\r\n <div *ngFor=\"let menuItem of menuPrincipal; let i=index\" class=\"col-sm-6 col-md-4\">\r\n <a *ngIf=\"menuItem.url\" [href]=\"menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n <div>\r\n <mat-icon svgIcon=\"{{menuItem.icono}}\">{{menuItem.icono}}</mat-icon>\r\n <p>{{menuItem.titulo}}</p>\r\n </div>\r\n </a>\r\n <span *ngIf=\"!menuItem.url\" (click)=\"clickMenuPrincipal(i)\">\r\n <div>\r\n <mat-icon svgIcon=\"{{menuItem.icono}}\">{{menuItem.icono}}</mat-icon>\r\n <p>{{menuItem.titulo}}</p>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class=\"sub-menu-fondo animate__animated animate__fadeIn animate__faster\" (click)=\"menuPrincipalSel=null\"\r\n *ngIf=\"menuPrincipalSel\"></div>\r\n\r\n<div class=\"sub-menu animate__animated animate__fadeIn animate__faster\" *ngIf=\"menuPrincipalSel\">\r\n <div class=\"container-fluid\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-lg-5\">\r\n <div class=\"px-3 px-sm-5 pt-5 pb-lg-5 text-center descripcion-menu\">\r\n <mat-icon [ngStyle]=\"{'color': colorFondo}\" svgIcon=\"{{menuPrincipalSel.icono}}\">\r\n {{menuPrincipalSel.icono}}</mat-icon>\r\n <p>{{menuPrincipalSel.titulo}}</p>\r\n <p class=\"text-secondary\">{{menuPrincipalSel.descripcion}}</p>\r\n </div>\r\n </div>\r\n <div class=\"col-12 col-lg-7 my-4\">\r\n <div class=\"px-3 px-md-4 py-2 py-md-2\">\r\n <ul class=\"list-unstyled\">\r\n\r\n <li class=\"mb-3 d-flex\" *ngFor=\"let menuItem of menuPrincipalSel.hijos\">\r\n <mat-icon fontSet=\"wm-menu-iconos\">{{menuItem.icono}}</mat-icon>\r\n <div class=\"ml-2 flex-fill\">\r\n <a href=\"{{menuItem.url}}\" *ngIf=\"menuItem.url\">\r\n <div class=\"lead mb-2\">{{menuItem.titulo}}</div>\r\n </a>\r\n <div class=\"lead mb-2\" *ngIf=\"!menuItem.url\">{{menuItem.titulo}}</div>\r\n\r\n <a href=\"{{menuSubItem.url}}\" class=\"pl-2 my-2\" *ngFor=\"let menuSubItem of menuItem.hijos\">\r\n <div class=\"text-secondary\">{{menuSubItem.titulo}}</div>\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <button mat-icon-button class=\"close-icon d-lg-none\" (click)=\"menuPrincipalSel=null\">\r\n <mat-icon fontSet=\"wm-menu-iconos\">arrow_back</mat-icon>\r\n </button>\r\n</div>\r\n<div class=\"alerta-almacenamiento\" *ngIf=\"porcentajeUtilizado >= 100\">Su capacidad de almacenamiento ha llegado al {{porcentajeUtilizado}}% , libere espacio o adquiera mayor capacidad</div>\r\n\r\n<!-- Asistente \"Preg\u00FAntale a tus datos\": panel flotante que se abre desde el bot\u00F3n del men\u00FA. -->\r\n<wm-asistente-datos *ngIf=\"puedeAsistente\" [abierto]=\"asistenteAbierto\" [urlConsultar]=\"urlAsistenteConsultar\"\r\n [idioma]=\"idiomaAsistente\" (cerrarChange)=\"asistenteAbierto = false\"></wm-asistente-datos>",
703
+ styles: [".menu{height:46px;display:flex;justify-content:space-between;align-items:center;top:0;left:0;right:0;background-color:#1c98a4;color:#fff;padding:0 4px}.menu .d-lg-block .mat-button{font-weight:400;height:46px;line-height:46px}.menu .logo{display:inline-block;height:40px}.menu .logo-menu-principal{position:absolute;display:block;left:65px}.menu .logo-menu-principal>img{display:block;margin:0 -50%}.menu .info-adicional{color:#fff;display:flex;justify-content:end;font-size:13px;position:absolute;right:47px}.menu .info-adicional .border-r{border-right:1px solid #fff}.menu .info-adicional .version{margin:7px 0 0 7px}.menu .info-adicional div.datos{margin:0 2px 0 5px;height:28px}.menu .info-adicional .boton-asistente-datos{cursor:pointer;padding-right:10px}.menu .info-adicional .mat-icon{vertical-align:middle;font-size:17px;color:#fff;line-height:21px;margin-left:2px}.menu .info-adicional button{padding:0 0 0 15px}.menu .info-adicional .content-idioma{margin:-5px 2px 0 5px;display:block;cursor:pointer}.menu .info-adicional .icon-idioma{font-size:17px!important;vertical-align:text-top!important;color:#fffc}.sub-menu{width:100%;position:absolute;top:46px;z-index:1000;background-color:#fff;display:flex;overflow-y:auto;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.sub-menu .close-icon{position:absolute;left:4px;top:4px}.sub-menu .descripcion-menu .mat-icon{color:#1c98a4;width:100px;height:100px}.sub-menu .descripcion-menu p:first-of-type{font-weight:300;font-size:30px;margin:16px 0}.sub-menu .descripcion-menu p:last-of-type{color:#6c757d}.sub-menu li{float:left;width:50%}.sub-menu li>.mat-icon{color:#444}.sub-menu li:nth-child(even){float:right}.sub-menu li a{transition:.5s;display:block}.sub-menu li a:hover{margin-left:8px}.sub-menu li .lead{line-height:24px;color:#212529;font-size:17px}.sub-menu-fondo{background:#272d3357;position:absolute;top:46px;bottom:0;left:0;right:0;z-index:1000}.menu-lateral{width:100%;position:absolute;top:46px;bottom:0;left:0;right:0;z-index:1000;display:flex;flex-direction:column;overflow-y:auto;background:#f7f7f7;padding:20px}.menu-lateral>div>div>*>div{text-align:center;padding:16px;background-color:#fff;margin:0 0 16px;color:#333;cursor:pointer;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.menu-lateral>div>div>*>div>.mat-icon{width:50px;height:50px}.menu-lateral>div>div>*>div>p{padding:0;margin:8px 0 0}a.mat-menu-item{color:#444!important}.alerta-almacenamiento{background:#ffffec;border-bottom:1px solid #efff00;min-height:39px;line-height:36px;font-size:12px;padding:0 0 0 25px}@media (max-width:767.98px){.sub-menu ul{margin:auto;padding:0 10px}.sub-menu ul li{float:none;width:100%}.sub-menu ul li:nth-child(even){float:none}}@media (max-width:991.98px){.sub-menu{bottom:0}}@media (min-width:600px){.logo-menu-principal{left:50%!important}}* :focus,:active{outline:0!important}.icono-asistente-fab{display:inline-block;width:32px;height:32px;vertical-align:middle;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAHdElNRQfqChsPKQzwD86GAAAKkUlEQVRYw42Xe4xd1XXGf3vv87r3zr3z8IxnPLbHL4wntQHbNaFQ1zZ2HcCYNoUmKaJqQ6FKWlpVStJWaqUoSpX80zZCSoqg5ZEHJMFRcFqCYaDETsDIiWV7sI3x+P2ap2fGc9/ntffuH3dmjHmIbumce865Oudb+1vf+vbagg8ZG/r6GDlbxHcdLpfK3LfxVvnSvoPLozjebLS+3Wh9gzWm2xiTEyCEEBWh5LCQ6qhS6peuo15f13v9wN7D7+jO5jxhkrIx381//emGD2CJ9z9Y/8RP6S9eoTXI8Pk7Nomn+3avS+L48zpJ7kzjuEcniWOtxVqLnfmAMQhACIF0nNTx/UHXD171fO+7a5ct3nfw1FlzcarI7dctZvcD2z86gJuf3skDt6zjG32v0xQEc2th+HdJGD6c1OtztbVY5YLrgnJAiMbbFrAWtMamCUQRIo1RSuLlchNuJvu9XCb4VqlaH7x1aQ8XJq7w9hc++8EAbvn+z2nJZth35iyFTGZ1GIb/FtVqW9IkxXo+wg9AKhACi0W8hwFL4ySsBaOxaQphHaIarufjFQpvBkHwpfFyZf/qhfPQqWb/w38MgGzM/EW+sGljAzybva1Wrz9bL1e2JAZoKkAmh5YSbQ3aGKyxGNs4tLEYYzBGo41GW4uWEpvNQb6FWGvCyYn1tUr12bZcdlP/xRF6uzq49cmfNhhY8M//QrW9B09KPOXcWK/XngvL5VXa9SHIgoA5gc/i5hztGR9Pqau0WXs1f9YCDW3U4pRLpQrnpkrU4wRRqyLTmKCldSCbyz0QpemBSpLwB0t7EKue3Ek5ilBStldq1R/Wy+WtWrmYTJZmz+O2+e20BR6DpQpjtTqxbgjuKvezP7PPm1yXhfkcza7DoaHLvDM2ga1VcUxK0DbnF/lc7v4kTceyroOTcV2OPvxHdD36g7+Oa7WtWihMkGV+U5YtPV0MTExycGiU6+e0sLGnm1bfQ4gGur02DgSQGMOlUpUDI+NU44Tb5nfSmcuw5+wgaaVIXC5trjvO3wx/+cGvrn5iB2L+t5/DkerGarWyq16rzzfZJjpyWbYt7eaNC0O0ZXy+cstNbFzUTbPnNtT/MUMbw/lihafePs6zR0/wO92dFMtVfnnmIrJaJmhpGc7l83enWh9S5ZdfIPupP/xKVK3dqV0Px/O5e2k3h0Yu05XL8sRdG7h1QReBktiPARbTwQmgLROwsWcegVLsOHaa1V3tVMKYyXqISOK89IPa8Jcf7FNLH//J0jCsfz2KknbjZ7iho5UmR3KpXOU7d6xn1dw2rP046Ab4oZFx9g2Osqy1gBQCJQSrO9s5V6rw1tAYazvbOD5exEZ1lOe1P9Y/8LKMdXp7mqRLrOOilKK3rcDhsQnu613Cb3e1/7/AjQVtLM8fO8U39h6kGMYIIbCA5ygeWt1LrDXKcehsymCkIg3DxbHWmxyd6s06TT3r+DS7Ck8KwlRz59IeEKKhbGtnJW6tnaV65nrHoRIDYwkVDNbCgSvDFCerfLq7F1859M5pYWV7K0O1kAX5HIOTU5g4do3Wt0tjzWpjLVZKWnyXShzTEngsackTpSn9I+NMRTGjlTqHxyaIteb4+BUulMpEoaY8FbH/fMgvTtaoJRYpBC+NnODbp/ZxoVJjrGwIHIfr57QwGUa0ZXyQCqM1Ok1vcqyxC6wFpCRQiijVZB2HJs/ltbODPNL3Bn+1diXDlRp9Zy7ytQ3rePQ3R1jcmuchtZyRExWS+W2oBlVYLMYapBDs6C8zcKnO45/ppNn3SLTBd51G6VqLNXqBY43Jz2RZG4MSgtRYUmPozGVY3TmHZa0FCp7LaLXGokITqzraWNzSRHg+ZfJyiOmyiPcaAo3UTVY1Q0VItKWWpCgpSFM9mz6rdd5hurKFEJTihJzrcCWKGK7UuLl7Lj/69O8TKIUBHrypl4yjWNPZjqMkl9rLdHVnOTMh0UYjpjWjpgV4z8om7lqWwXctZ6ZKFDyXUrmMnfESC46QsgZkBTAVxnhCEGnN3kujrOxoI+s4WEABjqOwgO8oABavKLB4RTPv7i+S9SVFBamxbJ+3go0s5LZ5zXjS4cyVEkfGJlnVVqB/cBgpRCNYpWqOVGpYwDKMJkQwVKqyrDnPc0dPsP26HrrzudlF5/0FaafX4fvX5sEKfnayREvgsH7uQrKuM7tA7Xj3NJUkIWcMQ5U6QigQIB01IqWSR5QUWK2RUnJodJLelgLnihW++dYhpsJotuw+ajhS4Cq4b8USvr7hZjKOaoQrBLtOXeSp/uOs7Wjl+OAwIRJhNUo5SMc5KqVUu5XjaNIEIQQTqebtoTG2LOziheNneKTvTU5OTs3mV8zQ974DIZBS4iiJEDBRj3iy/12+9L9vMa8pQzaK6B+9gnJdbJIiPU8r5exxXEe95vjeBRFVllijkY7LwYkSeSXYuqibn5+6wLZlC1ne1kItTXnl9EXOFst8FCfGwmi1zv7hMU5OFlnV3kqPNPzPkZNoz29MwqQ4Qf6i66jXnE/1Xj/w4uGjuxxHPZLEMSLIgOdztFhje2cHhcBjxZwWBstVvrn3ID87cQ5XSeQ1Icy2pwAEjqI7l2F7TxeXx8bZeW6QmusjXRdbr6FcF8f3X7ntup7jzktHjhlXOU97meDetFyZZ10XKxVdLQXG44S2TMCpyRL/8PqvOVcsccfCTtwkJjWGDzbVFizEacrlqSu8evI0I2GKzGaRjovVGpIIt7n5sue5z+w5dto4c5uyHPizew7O/48fPeFF8dfCsI4JsszNBYzXQ8aqdf5pz2+Yk/HZtqCTX584w7HJYqNBnVl7Z8rDTjshAiskynVRTRmQsuGR9Squ7+NlMs/c8VvL9+8/cwGx8qmd1JIEJdWccq32g3qpdFdk4ZM93SxobmLv4ChrOlrpEJZXB84ymlpUEICQ7+kJG4qfbdHFtBdOZ8Zai61VUSYh29r2Rj6X/Vyq9XDgOKgta36PgcBHa133XfcQQvyujcKusakiPbmANe3NTE5O8cqpC5QdHxlcbc8RH1IVslENM/9baxt51wlBc/OJTDb7xUoYDowUSyzt6GwkccPTL/Krv7iH1m99j7znrquH4X+GpdKaJIxwPZdUOYggg1BqxrixxoC10zjTPeL0vaXBjk1TbL2KsoagUBgIMpkvTlRre+5auZxqPabvT+68qqKbn9nJkvY29pw6T+A6nwij+F/jWnVbHEUC10d4PswG0JjZ1S3Z9Glmy2YsxBFEdVzPxWvK784Ewd9fLlUOrFnYRS2K6f/Lz8C0xQMw9N/Pw6ZtnPvqvxOs/+R4IRO8bJVTVkqtsGlcMFEIOr3Gj8X0jQCsNqATTBQhojoKS5DLjQT5/KP5ptw/VsP45L1rP8HIVJmD07uimXevGeu//wLvXi7R5Huc/8lOFn323hvjJPnzJIruSeN4sU4T15j3RtGYOdPdkXJU6nj+BTfwd3mu991fPXL/wU2P/diO1ups6Omi73PbrsH7UEO74c3D6HeOk3FdRipVLv3tAyx9fMfyOEk2a603G61vNEbPt8Y0AQgpK0LKIamcI0qp3Z6jXn/o7q0nHtu5y3a3thAmCasWFXh+69YPYP0fkxcdMAP8qLgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjYtMTAtMjdUMTU6NDE6MDkrMDA6MDB4bGCMAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDI2LTEwLTI3VDE1OjQxOjA5KzAwOjAwCTHYMAAAACh0RVh0ZGF0ZTp0aW1lc3RhbXAAMjAyNi0xMC0yN1QxNTo0MToxMiswMDowMJCJrYsAAAAASUVORK5CYII=) center/contain no-repeat}"]
620
704
  })
621
705
  ], WmMenuComponent);
622
706
  return WmMenuComponent;
623
707
  }());
624
708
 
709
+ // Envoltorio de la Web Speech API (SpeechRecognition) del navegador — dictado de voz a texto,
710
+ // 100% cliente, sin backend. Soportado en Chrome/Edge; SIN soporte en Firefox y de forma
711
+ // inconsistente en Safari (limitación real del navegador, no de esta implementación).
712
+ var ReconocimientoVozService = /** @class */ (function () {
713
+ function ReconocimientoVozService() {
714
+ this.reconocimiento = null;
715
+ }
716
+ ReconocimientoVozService.prototype.estaSoportado = function () {
717
+ return !!(this.obtenerConstructor());
718
+ };
719
+ // onResultado se llama con el texto reconocido hasta el momento (incluye resultados
720
+ // provisionales — interimResults: true — para que el cuadro de texto se vea llenar en vivo).
721
+ // onFin se llama cuando el reconocimiento termina, ya sea porque el navegador detectó una
722
+ // pausa (continuous: false) o porque se llamó a detener().
723
+ ReconocimientoVozService.prototype.iniciar = function (idioma, onResultado, onFin) {
724
+ var _this = this;
725
+ var SpeechRecognitionCtor = this.obtenerConstructor();
726
+ if (!SpeechRecognitionCtor) {
727
+ onFin();
728
+ return;
729
+ }
730
+ this.detener();
731
+ this.reconocimiento = new SpeechRecognitionCtor();
732
+ this.reconocimiento.lang = idioma;
733
+ this.reconocimiento.continuous = false;
734
+ this.reconocimiento.interimResults = true;
735
+ this.reconocimiento.onresult = function (evento) {
736
+ var texto = Array.from(evento.results)
737
+ .map(function (resultado) { return resultado[0].transcript; })
738
+ .join(' ');
739
+ onResultado(texto);
740
+ };
741
+ this.reconocimiento.onerror = function (evento) {
742
+ var _a;
743
+ // Motivos típicos (event.error de SpeechRecognitionErrorEvent): "not-allowed" (permiso de
744
+ // micrófono denegado o sitio sin HTTPS/localhost), "no-speech", "audio-capture" (sin
745
+ // micrófono), "network". Se deja en consola porque no hay backend que lo registre y el
746
+ // navegador no explica el motivo en la UI.
747
+ console.error('Reconocimiento de voz: error -', (_a = evento) === null || _a === void 0 ? void 0 : _a.error);
748
+ _this.reconocimiento = null;
749
+ onFin();
750
+ };
751
+ this.reconocimiento.onend = function () {
752
+ _this.reconocimiento = null;
753
+ onFin();
754
+ };
755
+ try {
756
+ this.reconocimiento.start();
757
+ }
758
+ catch (e) {
759
+ console.error('Reconocimiento de voz: no se pudo iniciar -', e);
760
+ this.reconocimiento = null;
761
+ onFin();
762
+ }
763
+ };
764
+ ReconocimientoVozService.prototype.detener = function () {
765
+ if (this.reconocimiento) {
766
+ this.reconocimiento.onend = null;
767
+ this.reconocimiento.onerror = null;
768
+ this.reconocimiento.stop();
769
+ this.reconocimiento = null;
770
+ }
771
+ };
772
+ ReconocimientoVozService.prototype.obtenerConstructor = function () {
773
+ return window.SpeechRecognition || window.webkitSpeechRecognition || null;
774
+ };
775
+ ReconocimientoVozService.ɵprov = core.ɵɵdefineInjectable({ factory: function ReconocimientoVozService_Factory() { return new ReconocimientoVozService(); }, token: ReconocimientoVozService, providedIn: "root" });
776
+ ReconocimientoVozService = __decorate([
777
+ core.Injectable({
778
+ providedIn: 'root',
779
+ })
780
+ ], ReconocimientoVozService);
781
+ return ReconocimientoVozService;
782
+ }());
783
+
784
+ var AsistenteDatosApiService = /** @class */ (function () {
785
+ function AsistenteDatosApiService(http) {
786
+ this.http = http;
787
+ // La fija el componente desde su @Input urlConsultar (reemplaza WmChatConfigService.urlConsultar).
788
+ this.url = '';
789
+ // Mismo origen del JWT que WmSeguridadService.getJWT() en wm-chat: localStorage['WMTKN'],
790
+ // descartado si está vencido. Se replica aquí para que el header Authorization sea idéntico
791
+ // al del chat original sin depender de un servicio de config externo.
792
+ this.TOKEN_KEY = 'WMTKN';
793
+ this.jwtHelper = new angularJwt.JwtHelperService();
794
+ }
795
+ AsistenteDatosApiService.prototype.consultar = function (pregunta, proveedor) {
796
+ var headers = new http.HttpHeaders({
797
+ Authorization: "Bearer " + this.obtenerJWT(),
798
+ 'Content-Type': 'application/json; charset=utf-8',
799
+ });
800
+ return this.http
801
+ .post(this.url, { Pregunta: pregunta, Proveedor: proveedor }, { headers: headers })
802
+ .pipe(operators.catchError(function (error) {
803
+ return rxjs.throwError(error.error);
804
+ }));
805
+ };
806
+ AsistenteDatosApiService.prototype.obtenerJWT = function () {
807
+ var jwt = localStorage.getItem(this.TOKEN_KEY);
808
+ if (jwt) {
809
+ try {
810
+ return this.jwtHelper.isTokenExpired(jwt) ? null : jwt;
811
+ }
812
+ catch (_a) { }
813
+ }
814
+ return null;
815
+ };
816
+ AsistenteDatosApiService.ctorParameters = function () { return [
817
+ { type: http.HttpClient }
818
+ ]; };
819
+ AsistenteDatosApiService.ɵprov = core.ɵɵdefineInjectable({ factory: function AsistenteDatosApiService_Factory() { return new AsistenteDatosApiService(core.ɵɵinject(http.HttpClient)); }, token: AsistenteDatosApiService, providedIn: "root" });
820
+ AsistenteDatosApiService = __decorate([
821
+ core.Injectable({
822
+ providedIn: 'root',
823
+ })
824
+ ], AsistenteDatosApiService);
825
+ return AsistenteDatosApiService;
826
+ }());
827
+
828
+ var AsistenteDatosComponent = /** @class */ (function () {
829
+ function AsistenteDatosComponent(asistenteDatosApiService, reconocimientoVoz) {
830
+ this.asistenteDatosApiService = asistenteDatosApiService;
831
+ this.reconocimientoVoz = reconocimientoVoz;
832
+ // La apertura/cierre del panel la controla el padre (el menú). El panel solo se renderiza
833
+ // cuando `abierto` es true y avisa, vía `cerrarChange`, cuando el usuario toca la X.
834
+ this.abierto = false;
835
+ // Idioma para el reconocimiento de voz (Web Speech API).
836
+ this.idioma = 'es-CO';
837
+ this.cerrarChange = new core.EventEmitter();
838
+ this.mensajes = [];
839
+ this.borrador = '';
840
+ // Alterna el alto de la caja del mensaje (compacta ↔ expandida), igual que el "pedir cambios"
841
+ // del asistente de IA del generador de formularios (ver filasBorrador / onClickExpandirBorrador).
842
+ this.borradorExpandido = false;
843
+ this.consultando = false;
844
+ // "Gemini" o "Groq" — mismo selector que el asistente de generación de formularios
845
+ // (ver ProveedorIAServicio en el backend).
846
+ this.proveedorSeleccionado = 'Gemini';
847
+ // Dictado por voz (Web Speech API) — sin soporte en Firefox, inconsistente en Safari.
848
+ this.escuchando = false;
849
+ // Preguntas ya verificadas como respondibles hoy (whitelist + contrato de la IA — ver
850
+ // ChatConsultaWhitelistServicio/ChatConsultaPromptServicio en el backend), mostradas como chips
851
+ // de sugerencia en el estado vacío del chat.
852
+ this.chipsSugeridos = [
853
+ '¿Cuántos formularios se diligenciaron hoy?',
854
+ '¿Cuántos formularios se diligenciaron esta semana?',
855
+ 'Muéstrame los últimos 10 formularios diligenciados',
856
+ ];
857
+ }
858
+ Object.defineProperty(AsistenteDatosComponent.prototype, "urlConsultar", {
859
+ // URL del POST de consulta. Se refleja en el api service (propiedad `url`), que es donde se usa.
860
+ set: function (valor) {
861
+ if (valor) {
862
+ this.asistenteDatosApiService.url = valor;
863
+ }
864
+ },
865
+ enumerable: true,
866
+ configurable: true
867
+ });
868
+ // El padre abre/cierra el panel; aquí solo se avisa que el usuario pidió cerrarlo (botón X).
869
+ AsistenteDatosComponent.prototype.cerrar = function () {
870
+ this.cerrarChange.emit();
871
+ };
872
+ Object.defineProperty(AsistenteDatosComponent.prototype, "filasBorrador", {
873
+ // Caja del mensaje compacta (1 fila, como era el chat originalmente) ↔ expandida (6 filas).
874
+ // El botón de expandir es el mismo patrón del "pedir cambios" del generador.
875
+ get: function () {
876
+ return this.borradorExpandido ? 6 : 1;
877
+ },
878
+ enumerable: true,
879
+ configurable: true
880
+ });
881
+ AsistenteDatosComponent.prototype.onClickExpandirBorrador = function () {
882
+ this.borradorExpandido = !this.borradorExpandido;
883
+ };
884
+ Object.defineProperty(AsistenteDatosComponent.prototype, "micDisponible", {
885
+ get: function () {
886
+ return this.reconocimientoVoz.estaSoportado();
887
+ },
888
+ enumerable: true,
889
+ configurable: true
890
+ });
891
+ AsistenteDatosComponent.prototype.onClickMicrofono = function () {
892
+ var _this = this;
893
+ if (this.escuchando) {
894
+ this.reconocimientoVoz.detener();
895
+ this.escuchando = false;
896
+ return;
897
+ }
898
+ if (!this.reconocimientoVoz.estaSoportado()) {
899
+ return;
900
+ }
901
+ // El resultado del reconocimiento no incluye lo que ya estaba escrito — se guarda antes de
902
+ // empezar y se antepone en cada actualización (que llega con la transcripción COMPLETA de
903
+ // esta sesión de escucha, no un incremento) para no perder lo que ya había en el campo.
904
+ var textoPrevio = this.borrador.trim();
905
+ this.escuchando = true;
906
+ this.reconocimientoVoz.iniciar(this.idioma, function (texto) { return (_this.borrador = textoPrevio ? textoPrevio + " " + texto : texto); }, function () { return (_this.escuchando = false); });
907
+ };
908
+ AsistenteDatosComponent.prototype.onClickEnviar = function (textoPreset) {
909
+ var _this = this;
910
+ var pregunta = ((textoPreset !== null && textoPreset !== void 0 ? textoPreset : this.borrador)).trim();
911
+ if (!pregunta || this.consultando) {
912
+ return;
913
+ }
914
+ this.mensajes.push({ deUsuario: true, texto: pregunta });
915
+ this.borrador = '';
916
+ // Sin url de consulta no se hace la petición: el usuario ve el mismo error genérico que
917
+ // cuando la API falla.
918
+ if (!this.asistenteDatosApiService.url) {
919
+ this.mensajes.push({
920
+ deUsuario: false,
921
+ texto: 'No se pudo procesar la consulta.',
922
+ esError: true,
923
+ });
924
+ this.scrollAlFinal();
925
+ return;
926
+ }
927
+ this.consultando = true;
928
+ this.scrollAlFinal();
929
+ this.asistenteDatosApiService.consultar(pregunta, this.proveedorSeleccionado).subscribe({
930
+ // El tipo (RespuestaAsistenteDatos) se infiere del Observable: importar la interfaz
931
+ // dejaba un import a un símbolo inexistente en el JS de la librería (aviso de rollup).
932
+ next: function (respuesta) {
933
+ var _a;
934
+ _this.consultando = false;
935
+ _this.mensajes.push({
936
+ deUsuario: false,
937
+ descripcion: respuesta.Descripcion,
938
+ resultado: (_a = respuesta.Resultado, (_a !== null && _a !== void 0 ? _a : [])),
939
+ proveedor: respuesta.Proveedor,
940
+ });
941
+ _this.scrollAlFinal();
942
+ },
943
+ error: function (error) {
944
+ var _a;
945
+ _this.consultando = false;
946
+ _this.mensajes.push({
947
+ deUsuario: false,
948
+ texto: ((_a = error) === null || _a === void 0 ? void 0 : _a.Mensaje) || 'No se pudo procesar la consulta.',
949
+ esError: true,
950
+ });
951
+ _this.scrollAlFinal();
952
+ },
953
+ });
954
+ };
955
+ // El nuevo mensaje recién se refleja en el DOM después del siguiente ciclo de detección de
956
+ // cambios — por eso el scrollTop se ajusta en un setTimeout(0), no inmediatamente después del
957
+ // push, para que scrollHeight ya incluya el mensaje agregado.
958
+ AsistenteDatosComponent.prototype.scrollAlFinal = function () {
959
+ var _this = this;
960
+ setTimeout(function () {
961
+ var _a;
962
+ var elemento = (_a = _this.mensajesContainer) === null || _a === void 0 ? void 0 : _a.nativeElement;
963
+ if (elemento) {
964
+ elemento.scrollTop = elemento.scrollHeight;
965
+ }
966
+ });
967
+ };
968
+ AsistenteDatosComponent.prototype.columnasDe = function (resultado) {
969
+ return resultado.length ? Object.keys(resultado[0]) : [];
970
+ };
971
+ // El backend devuelve un conteo (ChatConsultaIAServicio.EjecutarConteo) como una sola fila con
972
+ // una sola columna llamada literalmente "Resultado" — se muestra como número grande en vez de
973
+ // como tabla de una celda.
974
+ AsistenteDatosComponent.prototype.esConteo = function (resultado) {
975
+ var _a;
976
+ return ((_a = resultado) === null || _a === void 0 ? void 0 : _a.length) === 1 && Object.keys(resultado[0]).length === 1 && 'Resultado' in resultado[0];
977
+ };
978
+ // Listado con una sola columna (ej. una lista de nombres/ids) — se muestra como texto simple
979
+ // en vez de una tabla de una sola columna repetida.
980
+ AsistenteDatosComponent.prototype.esListaSimple = function (resultado) {
981
+ var _a;
982
+ return ((_a = resultado) === null || _a === void 0 ? void 0 : _a.length) > 0 && !this.esConteo(resultado) && this.columnasDe(resultado).length === 1;
983
+ };
984
+ AsistenteDatosComponent.prototype.textoListaSimple = function (resultado) {
985
+ var columna = this.columnasDe(resultado)[0];
986
+ return resultado.map(function (fila) { return fila[columna]; }).join(', ');
987
+ };
988
+ AsistenteDatosComponent.ctorParameters = function () { return [
989
+ { type: AsistenteDatosApiService },
990
+ { type: ReconocimientoVozService }
991
+ ]; };
992
+ __decorate([
993
+ core.ViewChild('mensajesContainer')
994
+ ], AsistenteDatosComponent.prototype, "mensajesContainer", void 0);
995
+ __decorate([
996
+ core.Input()
997
+ ], AsistenteDatosComponent.prototype, "abierto", void 0);
998
+ __decorate([
999
+ core.Input()
1000
+ ], AsistenteDatosComponent.prototype, "urlConsultar", null);
1001
+ __decorate([
1002
+ core.Input()
1003
+ ], AsistenteDatosComponent.prototype, "idioma", void 0);
1004
+ __decorate([
1005
+ core.Output()
1006
+ ], AsistenteDatosComponent.prototype, "cerrarChange", void 0);
1007
+ AsistenteDatosComponent = __decorate([
1008
+ core.Component({
1009
+ selector: 'wm-asistente-datos',
1010
+ template: "<!-- Panel (abierto) -->\r\n<div class=\"chat-ia-panel\" *ngIf=\"abierto\">\r\n <div class=\"chat-ia-header\">\r\n <div class=\"chat-ia-header-info\">\r\n <div class=\"chat-ia-header-icono\">\r\n <svg width=\"17\" height=\"17\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1.8\">\r\n <path d=\"M4 5h16v10H9l-4 4V15H4z\"></path>\r\n </svg>\r\n </div>\r\n <div>\r\n <div class=\"chat-ia-titulo\">Preg\u00FAntale a tus Datos</div>\r\n <div class=\"chat-ia-subtitulo\">Consulta tus reportes en lenguaje natural</div>\r\n </div>\r\n </div>\r\n <div class=\"chat-ia-cerrar\" (click)=\"cerrar()\">\r\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\" stroke-linecap=\"round\">\r\n <path d=\"M6 6l12 12M18 6L6 18\"></path>\r\n </svg>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-ia-mensajes\" #mensajesContainer>\r\n <div class=\"chat-ia-bienvenida-texto\">Hola, soy tu asistente de datos de Snap Forms. Preg\u00FAntame lo que quieras saber sobre tu operaci\u00F3n.</div>\r\n\r\n <div class=\"chat-ia-mensaje\" *ngFor=\"let mensaje of mensajes\" [class.chat-ia-mensaje-usuario]=\"mensaje.deUsuario\">\r\n <div class=\"chat-ia-burbuja\" [class.chat-ia-burbuja-error]=\"mensaje.esError\">\r\n <span *ngIf=\"mensaje.texto\">{{ mensaje.texto }}</span>\r\n\r\n <ng-container *ngIf=\"mensaje.resultado\">\r\n <div class=\"chat-ia-descripcion\" *ngIf=\"mensaje.descripcion\">{{ mensaje.descripcion }}</div>\r\n\r\n <div class=\"chat-ia-sin-resultados\" *ngIf=\"mensaje.resultado.length === 0\">La consulta no encontr\u00F3 resultados.</div>\r\n\r\n <div class=\"chat-ia-stat\" *ngIf=\"esConteo(mensaje.resultado)\">\r\n <div class=\"chat-ia-stat-valor\">{{ mensaje.resultado[0].Resultado | number }}</div>\r\n </div>\r\n\r\n <div class=\"chat-ia-lista-simple\" *ngIf=\"esListaSimple(mensaje.resultado)\">{{ textoListaSimple(mensaje.resultado) }}</div>\r\n\r\n <div class=\"chat-ia-tabla-resultado\" *ngIf=\"mensaje.resultado.length > 0 && !esConteo(mensaje.resultado) && !esListaSimple(mensaje.resultado)\">\r\n <table mat-table [dataSource]=\"mensaje.resultado\">\r\n <ng-container *ngFor=\"let columna of columnasDe(mensaje.resultado)\" [matColumnDef]=\"columna\">\r\n <th mat-header-cell *matHeaderCellDef>{{ columna }}</th>\r\n <td mat-cell *matCellDef=\"let fila\">{{ fila[columna] }}</td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"columnasDe(mensaje.resultado)\"></tr>\r\n <tr mat-row *matRowDef=\"let fila; columns: columnasDe(mensaje.resultado);\"></tr>\r\n </table>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-ia-pensando\" *ngIf=\"consultando\">\r\n <span class=\"chat-ia-dot\"></span><span class=\"chat-ia-dot\"></span><span class=\"chat-ia-dot\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"chips-chat-ia\">\r\n <span class=\"chip-chat-ia\" *ngFor=\"let chip of chipsSugeridos\"\r\n (click)=\"onClickEnviar(chip)\">{{ chip }}</span>\r\n </div>\r\n\r\n <div class=\"chat-ia-entrada\">\r\n <div class=\"chat-ia-caja-entrada\">\r\n <mat-icon fontSet=\"wm-menu-iconos\" class=\"chat-ia-expandir\" (click)=\"onClickExpandirBorrador()\">{{ borradorExpandido ? 'close_fullscreen' : 'open_in_full' }}</mat-icon>\r\n <textarea [rows]=\"filasBorrador\" [(ngModel)]=\"borrador\" (keydown.enter)=\"$event.preventDefault(); onClickEnviar()\"\r\n [class.chat-ia-textarea-expandido]=\"borradorExpandido\"\r\n placeholder=\"Escribe tu pregunta...\"></textarea>\r\n <div class=\"chat-ia-pie-entrada\">\r\n <button class=\"chat-ia-selector-modelo\" [matMenuTriggerFor]=\"menuModeloChatIA\" type=\"button\">\r\n <span *ngIf=\"proveedorSeleccionado === 'Gemini'\">Gemini</span>\r\n <span *ngIf=\"proveedorSeleccionado === 'Groq'\">Groq</span>\r\n <svg width=\"10\" height=\"10\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M6 9l6 6 6-6\"></path>\r\n </svg>\r\n </button>\r\n <button class=\"chat-ia-microfono\" [class.chat-ia-microfono-activo]=\"escuchando\" *ngIf=\"micDisponible\"\r\n (click)=\"onClickMicrofono()\" type=\"button\">\r\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z\"></path>\r\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\"></path>\r\n <line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"23\"></line>\r\n </svg>\r\n </button>\r\n <button class=\"chat-ia-enviar\" [disabled]=\"!borrador.trim() || consultando\" (click)=\"onClickEnviar()\" type=\"button\">\r\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M12 19V6\"></path>\r\n <path d=\"M5 13l7-7 7 7\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<mat-menu #menuModeloChatIA=\"matMenu\" class=\"menu-modelo-chat-ia\">\r\n <button mat-menu-item [class.opcion-activa]=\"proveedorSeleccionado === 'Gemini'\"\r\n (click)=\"proveedorSeleccionado = 'Gemini'\">\r\n <span>Gemini</span>\r\n <svg *ngIf=\"proveedorSeleccionado === 'Gemini'\" class=\"chat-ia-check\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M20 6L9 17l-5-5\"></path>\r\n </svg>\r\n </button>\r\n <button mat-menu-item [class.opcion-activa]=\"proveedorSeleccionado === 'Groq'\"\r\n (click)=\"proveedorSeleccionado = 'Groq'\">\r\n <span>Groq</span>\r\n <svg *ngIf=\"proveedorSeleccionado === 'Groq'\" class=\"chat-ia-check\" width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n <path d=\"M20 6L9 17l-5-5\"></path>\r\n </svg>\r\n </button>\r\n</mat-menu>\r\n",
1011
+ styles: [":host{position:fixed;right:32px;bottom:32px;z-index:1000;font-family:Roboto,sans-serif}.chat-ia-panel{width:450px;height:650px;max-width:calc(100vw - 48px);max-height:calc(100vh - 96px);background:#fff;border-radius:18px;box-shadow:0 24px 60px rgba(20,25,30,.28);display:flex;flex-direction:column;overflow:hidden}.chat-ia-header{background:linear-gradient(135deg,#7c5ce0,#5f42bd);padding:16px 18px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.chat-ia-header-info{display:flex;align-items:center;gap:10px;min-width:0}.chat-ia-header-icono{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;flex:none}.chat-ia-titulo{color:#fff;font-size:14px;font-weight:500}.chat-ia-subtitulo{color:rgba(255,255,255,.75);font-size:11px;margin-top:1px}.chat-ia-cerrar{width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.85;flex:none}.chat-ia-cerrar:hover{opacity:1}.chat-ia-mensajes{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:16px;background:#fbfafc}.chat-ia-mensaje{display:flex}.chat-ia-mensaje .chat-ia-burbuja{max-width:88%;background:#f2eefb;color:#26313a;border-radius:14px 14px 14px 3px;padding:10px 13px;font-size:13px;line-height:1.5}.chat-ia-mensaje .chat-ia-burbuja-error{background:#fdecea;color:#7a1f14}.chat-ia-mensaje.chat-ia-mensaje-usuario{justify-content:flex-end}.chat-ia-mensaje.chat-ia-mensaje-usuario .chat-ia-burbuja{background:#7c5ce0;color:#fff;border-radius:14px 14px 3px}.chat-ia-bienvenida-texto{align-self:flex-start;max-width:88%;background:#f2eefb;color:#26313a;border-radius:14px 14px 14px 3px;padding:10px 13px;font-size:13px;line-height:1.5}.chips-chat-ia{flex:none;display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px}.chip-chat-ia{border:1px solid #e7e2f5;background:#f2eefb;color:#5f42bd;border-radius:14px;padding:5px 10px;font-size:11px;cursor:pointer}.chip-chat-ia:hover{background:#e7ddfa}.chat-ia-descripcion{font-size:13px;line-height:1.5;margin-bottom:6px}.chat-ia-sin-resultados{color:#5a5a5a;font-style:italic}.chat-ia-stat{margin-top:4px}.chat-ia-stat-valor{font-size:30px;font-weight:600;color:#5f42bd;line-height:1.15;font-variant-numeric:proportional-nums}.chat-ia-lista-simple,.chat-ia-tabla-resultado{margin-top:4px;background:#fff;border-radius:10px;padding:8px 10px}.chat-ia-lista-simple{font-size:13px;line-height:1.5}.chat-ia-tabla-resultado{overflow-x:auto;max-width:100%;padding:4px 10px}.chat-ia-tabla-resultado table{font-size:12px;background:0 0}.chat-ia-tabla-resultado th.mat-header-cell{color:#6b6478;font-weight:600;padding:0 14px 5px 0;border-bottom:1px solid #f0edf7;white-space:nowrap}.chat-ia-tabla-resultado td.mat-cell{padding:7px 14px 0 0;white-space:nowrap;font-variant-numeric:tabular-nums}.chat-ia-pensando{align-self:flex-start;background:#f2eefb;padding:12px 16px;border-radius:14px 14px 14px 3px;display:flex;gap:5px;flex-shrink:0}.chat-ia-dot{width:6px;height:6px;border-radius:50%;background:#9a93ae;-webkit-animation:1.1s ease-in-out infinite chatIaBlink;animation:1.1s ease-in-out infinite chatIaBlink}.chat-ia-dot:nth-child(2){-webkit-animation-delay:.15s;animation-delay:.15s}.chat-ia-dot:nth-child(3){-webkit-animation-delay:.3s;animation-delay:.3s}@-webkit-keyframes chatIaBlink{0%,100%,80%{opacity:.25}40%{opacity:1}}@keyframes chatIaBlink{0%,100%,80%{opacity:.25}40%{opacity:1}}.chat-ia-entrada{padding:10px 14px 14px;border-top:1px solid #e9f2ee;flex-shrink:0}.chat-ia-caja-entrada{position:relative;background:#f2f7f5;border:1px solid #e6efea;border-radius:18px;padding:10px 12px 8px}.chat-ia-caja-entrada textarea{border:none;outline:0;background:0 0;width:100%;font:inherit;font-size:13.5px;color:#26313a;resize:none;line-height:1.45;max-height:110px;overflow-y:auto;display:block;padding:0 28px 0 0}.chat-ia-caja-entrada textarea.chat-ia-textarea-expandido{max-height:160px}.chat-ia-caja-entrada textarea::-webkit-input-placeholder{color:#9a93ae}.chat-ia-caja-entrada textarea::-moz-placeholder{color:#9a93ae}.chat-ia-caja-entrada textarea:-ms-input-placeholder{color:#9a93ae}.chat-ia-caja-entrada textarea::-ms-input-placeholder{color:#9a93ae}.chat-ia-caja-entrada textarea::placeholder{color:#9a93ae}.chat-ia-expandir{position:absolute;top:8px;right:10px;font-size:17px;height:17px;width:17px;color:#9a9a9a;cursor:pointer}.chat-ia-pie-entrada{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:8px}.chat-ia-selector-modelo{display:inline-flex;align-items:center;gap:4px;border:none;background:0 0;color:#4e5d57;border-radius:14px;padding:5px 9px;font-size:11.5px;font-weight:600;cursor:pointer}.chat-ia-enviar{width:32px;height:32px;border-radius:50%;border:none;background:#7c5ce0;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}.chat-ia-enviar:disabled{background:#dce6e1;color:#a9bab3;cursor:default}.chat-ia-microfono{width:28px;height:28px;border-radius:50%;border:none;background:0 0;color:#6b6478;display:flex;align-items:center;justify-content:center;cursor:pointer;flex:none}.chat-ia-microfono:hover{background:#f2eefb}.chat-ia-microfono.chat-ia-microfono-activo{color:#fff;background:#e05a5a;-webkit-animation:1.1s ease-in-out infinite chatIaBlink;animation:1.1s ease-in-out infinite chatIaBlink}::ng-deep .mat-menu-panel.menu-modelo-chat-ia{min-width:132px;border:1px solid #e6efea;border-radius:10px;box-shadow:0 12px 26px rgba(20,25,30,.16)}::ng-deep .mat-menu-panel.menu-modelo-chat-ia .mat-menu-content{padding:4px}::ng-deep .mat-menu-panel.menu-modelo-chat-ia .mat-menu-item{display:flex;align-items:center;justify-content:space-between;gap:8px;height:auto;line-height:normal;padding:7px 10px;font-size:12px;color:#26313a;border-radius:7px}::ng-deep .mat-menu-panel.menu-modelo-chat-ia .mat-menu-item.opcion-activa{background:#f2f7f5}::ng-deep .mat-menu-panel.menu-modelo-chat-ia .mat-menu-item .chat-ia-check{color:#7c5ce0}"]
1012
+ })
1013
+ ], AsistenteDatosComponent);
1014
+ return AsistenteDatosComponent;
1015
+ }());
1016
+
625
1017
  var WmMenuModule = /** @class */ (function () {
626
1018
  function WmMenuModule() {
627
1019
  }
628
1020
  WmMenuModule = __decorate([
629
1021
  core.NgModule({
630
- declarations: [WmMenuComponent],
1022
+ declarations: [WmMenuComponent, AsistenteDatosComponent],
631
1023
  imports: [
632
1024
  platformBrowser.BrowserModule,
1025
+ forms.FormsModule,
633
1026
  toolbar.MatToolbarModule,
634
1027
  sidenav.MatSidenavModule,
635
1028
  list.MatListModule,
636
1029
  button.MatButtonModule,
637
1030
  icon.MatIconModule,
638
1031
  menu.MatMenuModule,
1032
+ table.MatTableModule,
1033
+ tooltip.MatTooltipModule,
639
1034
  core$1.MatRippleModule,
640
1035
  http.HttpClientModule,
641
1036
  angularJwt.JwtModule
@@ -650,6 +1045,10 @@
650
1045
  exports.WmMenuComponent = WmMenuComponent;
651
1046
  exports.WmMenuModule = WmMenuModule;
652
1047
  exports.WmMenuServicioService = WmMenuServicioService;
1048
+ exports.ɵa = WmMenuFuenteIconosService;
1049
+ exports.ɵb = AsistenteDatosComponent;
1050
+ exports.ɵc = AsistenteDatosApiService;
1051
+ exports.ɵd = ReconocimientoVozService;
653
1052
 
654
1053
  Object.defineProperty(exports, '__esModule', { value: true });
655
1054