PageSourceSearch

https://www.elcerrodeandevalo.es/es/.content/AV/default.module-EANA4G45.js

js elcerrodeandevalo.es collected 2026-10-02 23:17:55 UTC 54,695 bytes, 8 lines download raw bytes

1import{a as Pt,b as Bt}from"./chunk-P5YMQ6NI.js";import{a as kt}from"./chunk-G3IYRU5Z.js";import{G as jt,H as Ge,I as Dt,b as we,c as Se,d as vt,e as Ie,g as H,h as Te,i as ce,j as Me,k as bt,l as yt,m as xt,n as wt,o as St,p as It,q as Tt,r as Mt,s as Et,t as Ee}from"./chunk-EAFGGBBB.js";import{e as _t,f as ke}from"./chunk-4HNAA3QD.js";import{m as Ct}from"./chunk-ZR2VQGMP.js";import{i as ne,j,k as B}from"./chunk-WQW72BYF.js";import{$b as te,Ab as y,Ac as be,Bc as ye,Cb as v,Cc as xe,Db as m,Dc as gt,Ec as ut,Fc as E,Gb as ve,Gc as ft,Hc as ht,Ib as $,Jb as N,K as Ue,Kb as z,Lb as ee,Mb as C,Nb as lt,Ob as R,Pb as mt,Qb as ct,R as He,Ra as q,Rb as pt,Sa as b,Sb as Ce,Ta as it,U as Je,Ub as dt,V as Ke,Va as a,Vb as F,Wa as Q,Y as u,Yb as p,Zb as d,_b as U,ba as x,bb as nt,ca as Xe,ea as ue,eb as L,fb as ot,g as ge,ib as c,ja as Ye,k as T,lb as K,ma as h,mb as o,na as _,nb as Y,nc as ie,oa as Ze,ob as Z,pa as et,pb as me,pc as Qe,q as J,qa as tt,qb as he,rb as at,sa as qe,sb as rt,tb as st,ua as le,ub as s,uc as G,vb as l,wb as f,xa as fe,xb as w,xc as P,ya as X,yb as S,yc as W,za as V,zb as _e,zc as M}from"./chunk-6ER5EEDF.js";var je=class{acceptedfiles;defaultImageValue="assets/default/imageNotFound.png";previewImageUrl$=new T(this.defaultImageValue);previewVideo$=new T("");file={errormessage:{showError:!1,message:""},kindfile:null,enabled:!1};input;LoadedFile;constructor(t,e){this.acceptedfiles=e,this.input=t,this.listener(t)}listener(t){t.addEventListener("change",()=>{let e=this.reviewFile(t);e||(this.file.errormessage.showError=!0,this.file.errormessage.message="Solo se permiten Videos e Imagenes");let n=this.reviewsize(t,5);n||(this.file.errormessage.showError=!0,this.file.errormessage.message="El m\xE1ximo tama\xF1o permitido es 5 MB"),e&&n&&(this.file.enabled=!0,this.file.errormessage.showError=!1,this.file.kindfile&&this.generarVistaPrevia(this.file.kindfile,t.files[0]))})}reviewsize(t,e){return t.files[0].size/1024/1024<=e}reviewFile(t){let e=!1;return this.file.enabled=!1,this.acceptedfiles.forEach(n=>{t.files&&t.files[0]&&t.files[0].type.includes(n)&&(e=!0,this.file.kindfile=n)}),e}generarVistaPrevia(t,e){let n=new FileReader;n.readAsDataURL(e),n.addEventListener("load",r=>{switch(t){case"image":this.LoadedFile=r.target.result,this.previewImageUrl$.next(this.LoadedFile);break;case"video":this.LoadedFile=r.target.result,this.previewVideo$.next(this.LoadedFile);break;case"pdf":let g=new Blob([e],{type:"application/pdf"}),D=window.URL.createObjectURL(g);this.LoadedFile=r.target.result;let I=document.querySelector("#archivo-preview-pdf");I&&I.setAttribute("href",D);break;default:break}})}resetfile(){this.file={errormessage:{showError:!1,message:""},kindfile:null,enabled:!1}}sendfile(){this.file.enabled=!0}getMime(){try{return this.input.files?this.input.files[0].type:!1}catch{return!1}}};var $t=["inputAttachedFile"],Nt=i=>({show:i});function zt(i,t){if(i&1){let e=y();s(0,"img",14,2),p(2,"async"),v("error",function(r){h(e);let g=m(3);return _(g.error(r))}),l()}if(i&2){let e=m(3);o("src",d(2,1,e.previewImageUrl$),b)}}function Rt(i,t){if(i&1&&(s(0,"video",16),C(1," Tu navegador no soporta la reproducci\xF3n de este video. "),l()),i&2){let e=t.ngIf;o("src",e,b)}}function Ut(i,t){if(i&1&&(w(0),c(1,Rt,2,1,"video",15),p(2,"async"),S()),i&2){let e=m(3);a(),o("ngIf",d(2,1,e.previewVideo$))}}function Ht(i,t){if(i&1&&(s(0,"a",18),f(1,"img",19),p(2,"fixAssetsDirectory"),l()),i&2){let e=m().ngIf;a(),o("src",d(2,1,e),b)}}function qt(i,t){if(i&1&&(w(0),c(1,Ht,3,3,"a",17),S()),i&2){let e=m(3);a(),o("ngIf",e.file.file.kindfile=="pdf")}}function Qt(i,t){if(i&1&&(w(0),c(1,zt,3,3,"img",12)(2,Ut,3,3,"ng-container",13)(3,qt,2,1,"ng-container",13),p(4,"async"),S()),i&2){let e=m(2);a(),o("ngIf",e.file.file.kindfile=="image"),a(),o("ngIf",e.file.file.kindfile=="video"),a(),o("ngIf",d(4,3,e.pdfImage$))}}function Gt(i,t){if(i&1&&(s(0,"div",21),C(1),l()),i&2){let e=m(3);a(),R(" ",e.file.file.errormessage.message," ")}}function Wt(i,t){if(i&1&&c(0,Gt,2,1,"div",20),i&2){let e=m(2);o("ngIf",e.file.file.errormessage.showError)}}function Jt(i,t){if(i&1){let e=y();s(0,"div",22)(1,"img",23),p(2,"fixAssetsDirectory"),v("click",function(){h(e);let r=m(2);return _(r.sendFile())}),l()()}if(i&2){let e=m(2);a(),o("src",d(2,1,e.sendImage),b)}}function Kt(i,t){if(i&1){let e=y();s(0,"div",6)(1,"div",7),C(2," Vista previa "),s(3,"span",8),v("click",function(){h(e);let r=m();return _(r.cancelLoadFile())}),C(4,"\u2716"),l()(),s(5,"div",9),c(6,Qt,5,5,"ng-container",10)(7,Wt,1,1,"ng-template",null,1,te),l(),c(9,Jt,3,3,"div",11),l()}if(i&2){let e=ee(8),n=m();o("ngClass",F(4,Nt,n.file.file.enabled==!0||n.file.file.errormessage.showError)),a(6),o("ngIf",n.file.file.enabled)("ngIfElse",e),a(3),o("ngIf",n.file.file.kindfile!=null&&!n.file.file.errormessage.showError)}}var oe=class i{_configLoaderService=u(j);_baseChatService=u(H);_realtimeService=u(Ie);_config=this._configLoaderService.config;_theme=this._configLoaderService.config.theme;client$=this._baseChatService.client$;_token=this._config.TOKEN;sendImage=this._theme.images?.sendImage||"assets/default/defaultSendImage.svg";pdfImage$=new T(this._theme.images?.attachedImage||"assets/default/defaultAttachedImage.svg");showoutput=new le;send=new le;inputFile;file;enviando=!1;previewImageUrl$=null;previewVideo$=null;cargarAdjunto(){this.file||(this.file=new je(this.inputFile.nativeElement,["image","video"])),this.previewImageUrl$=this.file.previewImageUrl$,this.previewVideo$=this.file.previewVideo$,this.inputFile.nativeElement.click()}cancelLoadFile(){this.file.resetfile()}error(t){this.file&&this.file.previewImageUrl$.next(this.file.defaultImageValue)}sendFile(){if(!this.enviando){this.enviando=!0;let t={kind:this.file.file.kindfile,type:this.file.getMime(),source:this.file.LoadedFile};this.send.emit(JSON.stringify(t)),this.file.file.enabled=!1,this.showoutput.emit(!1);let e={texto:this.file.LoadedFile,file_mime:this.file.getMime(),file_token:this._token,iduser:this.client$.getValue()};this._realtimeService.sendFile(e),this.enviando=!1}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme-chat-adjuntos"]],viewQuery:function(e,n){if(e&1&&$($t,5),e&2){let r;N(r=z())&&(n.inputFile=r.first)}},outputs:{showoutput:"showoutput",send:"send"},decls:4,vars:1,consts:[["inputAttachedFile",""],["notAllowed",""],["image",""],[1,"adjuntos-container"],["type","file","accept","image/*, video/*"],["class","archivo-preview",3,"ngClass",4,"ngIf"],[1,"archivo-preview",3,"ngClass"],[1,"archivo-preview-title"],[1,"pr-1","clickable",3,"click"],[1,"archivo-preview-showed"],[4,"ngIf","ngIfElse"],["class","archivo-send",4,"ngIf"],["alt","vista previa",3,"src","error",4,"ngIf"],[4,"ngIf"],["alt","vista previa",3,"error","src"],["class","video","controls","",3,"src",4,"ngIf"],["controls","",1,"video",3,"src"],["class","PDF-link clickable","target","_blank","id","archivo-preview-pdf",4,"ngIf"],["target","_blank","id","archivo-preview-pdf",1,"PDF-link","clickable"],[1,"img-silice",3,"src"],["class","texto-secundario danger",4,"ngIf"],[1,"texto-secundario","danger"],[1,"archivo-send"],[3,"click","
1src"]],template:function(e,n){e&1&&(s(0,"div",3),f(1,"input",4,0),l(),c(3,Kt,10,6,"div",5)),e&2&&(a(3),o("ngIf",n.file))},dependencies:[P,M,E,B],styles:[".adjuntos-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:absolute;left:0;bottom:50px;transform:scaley(0);transition:transform .2s ease;transform-origin:bottom left}.adjuntos-container.show[_ngcontent-%COMP%]{transform:scaley(1)}.adjuntos-container[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:0%;height:0%;position:absolute;visibility:hidden}.texto-secundario[_ngcontent-%COMP%]{color:#0000006e;font-weight:700;font-size:1.3em;text-align:center}.danger[_ngcontent-%COMP%]{color:#e61919e6}.archivo-preview[_ngcontent-%COMP%]{width:100%;height:calc(100% - 40px);background:#f2f2f2;position:absolute;top:60px;left:0;z-index:20;display:grid;grid-template-rows:min-content 1fr min-content;transform:scaley(0);transition:transform .4s ease;transform-origin:bottom left;border-radius:0 0 10px 10px}.archivo-preview-title[_ngcontent-%COMP%]{width:calc(100% - 32px);height:40px;background:var(--backgroundAttachedFiles, var(--mainColor, hsl(0, 0%, 60%)));display:flex;align-items:center;font-size:12pt;color:#fff;padding:0 1em;font-weight:600;justify-content:space-between}.archivo-preview-showed[_ngcontent-%COMP%]{max-width:500px;max-height:90dvh;width:90%;height:68%;border:1px dashed var(--borderAttachedFiles, var(--mainColor, hsl(0, 0%, 60%)));justify-self:center;align-self:center;display:flex;justify-content:center;align-items:center}.archivo-preview-showed[_ngcontent-%COMP%]   *[_ngcontent-%COMP%]{max-width:100%;max-height:100%}.archivo-send[_ngcontent-%COMP%]{align-self:start;justify-self:end;cursor:pointer;margin-right:1em;margin-bottom:1em}.archivo-send[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{--sizeimgsend: 2em;width:var(--sizeimgsend);height:var(--sizeimgsend)}.video[_ngcontent-%COMP%]{width:100%;height:100%}.archivo-preview.show[_ngcontent-%COMP%]{transform:scaley(1)}.clickable[_ngcontent-%COMP%]{cursor:pointer}.PDF-link[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.PDF-link[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{height:80%}"]})};function Yt(i,t){if(i&1&&(w(0),s(1,"a",1),f(2,"img",2),p(3,"fixAssetsDirectory"),l(),S()),i&2){let e=t.ngIf;a(),o("href","https://api.whatsapp.com/send?phone=$"+e,b),a(),o("src",d(3,2,"assets/default/wa.png"),b)}}function Zt(i,t){if(i&1&&(w(0),s(1,"a",1),f(2,"img",2),p(3,"fixAssetsDirectory"),l(),S()),i&2){let e=t.ngIf;a(),o("href","https://t.me/"+e,b),a(),o("src",d(3,2,"assets/default/te.png"),b)}}var De=class i{data=u(Pt);static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["app-modal-mobile-contact"]],decls:4,vars:2,consts:[[4,"ngIf"],[3,"href"],[3,"src"]],template:function(e,n){e&1&&(s(0,"p"),C(1,` Para contactar con nosotros v\xEDa m\xF3vil, disponemos de los siguientes canales
2`),l(),c(2,Yt,4,4,"ng-container",0)(3,Zt,4,4,"ng-container",0)),e&2&&(a(2),o("ngIf",n.data.whatsapp),a(),o("ngIf",n.data.telegram))},dependencies:[M,B]})};var ae=class i{constructor(){}emoji=L(void 0);addemoji(t){this.emoji.set(t)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Je({token:i,factory:i.\u0275fac,providedIn:"root"})};function ti(i,t){if(i&1){let e=y();s(0,"span",3),v("click",function(){let r=h(e).index,g=m();return _(g.selectedIndex=r)}),l()}if(i&2){let e=t.$implicit;o("innerHTML",e,q)}}function ii(i,t){if(i&1&&(s(0,"div",4),_e(1,5),l()),i&2){let e=t.$implicit,n=t.index,r=m();Y("display",r.selectedIndex===n?"flex":"none"),a(),o("ngTemplateOutlet",e.content)}}var Pe=class i extends Ge{headers$=new T([]);set headers(t){t&&this.headers$.next(t)}onClick(t){this.selectedIndex=t}static \u0275fac=(()=>{let t;return function(n){return(t||(t=tt(i)))(n||i)}})();static \u0275cmp=x({type:i,selectors:[["custom-stepper"]],inputs:{headers:"headers"},features:[Ce([{provide:Ge,useExisting:i}]),ot],decls:4,vars:4,consts:[[1,"stepper-header"],["class","header-option",3,"innerHTML","click",4,"ngFor","ngForOf"],["class","stepper-body",3,"display",4,"ngFor","ngForOf"],[1,"header-option",3,"click","innerHTML"],[1,"stepper-body"],[3,"ngTemplateOutlet"]],template:function(e,n){e&1&&(s(0,"div",0),c(1,ti,1,1,"span",1),p(2,"async"),l(),c(3,ii,2,3,"div",2)),e&2&&(a(),o("ngForOf",d(2,2,n.headers$)),a(2),o("ngForOf",n.steps))},dependencies:[W,ut,E],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.stepper-header[_ngcontent-%COMP%]{margin-bottom:.5em;display:flex;justify-content:space-between;padding-inline:var(--padding-x)}.stepper-body[_ngcontent-%COMP%]{flex-wrap:wrap;overflow-x:auto}.header-option[_ngcontent-%COMP%]{cursor:pointer}"]})};var oi=i=>({show:i}),ai=()=>[];function ri(i,t){if(i&1){let e=y();s(0,"span",3),v("click",function(){let r=h(e).$implicit,g=m(2);return _(g.addemoji(r))}),l()}if(i&2){let e=t.$implicit;o("innerHtml",e,q)}}function si(i,t){if(i&1&&(s(0,"div")(1,"cdk-step"),c(2,ri,1,1,"span",2),l()()),i&2){let e=t.$implicit;a(2),o("ngForOf",e.emojivalues)}}var Be=class i{constructor(t,e){this._emojiService=t;this._elementRef=e}onClose=new le;set showMenu(t){setTimeout(()=>{this.toggleemojimenu=t},100)}toggleemojimenu=!1;selected=0;limits=[[128512,128692,128513],[127747,127776,127748],[127789,127868,127822],[127968,127984,127969],[128e3,128062,128021],[128066,128145,128100],[128147,128255,128161],[128336,128359,128337]];emojis$=new T([]);emojiHeaders$=new T([]);ngOnInit(){this.createEmojis()}addemoji(t){this._emojiService.addemoji(t)}createEmojis(){for(let t=0;t<this.limits.length;t++){let e=[],n=`&#${this.limits[t][2]};`;for(let g=this.limits[t][0];g<this.limits[t][1];g++)e.push(`&#${g};`);let r={principal:n,emojivalues:e};this._addnewEmoji(r)}}changeSelected(t){this.selected=t}clickout(t){if(!this.toggleemojimenu)return;let e=this._elementRef.nativeElement;t.composedPath().includes(e)||(this.onClose.next(!1),this.toggleemojimenu=!1)}_addNewEmojiHeader(t){let e=this.emojiHeaders$.getValue();e.push(t),this.emojiHeaders$.next(e)}_addnewEmoji(t){this._addNewEmojiHeader(t.principal);let e=this.emojis$.getValue();e.push(t),this.emojis$.next(e)}static \u0275fac=function(e){return new(e||i)(Q(ae),Q(V))};static \u0275cmp=x({type:i,selectors:[["emoji"]],hostBindings:function(e,n){e&1&&v("click",function(g){return n.clickout(g)},!1,it)},inputs:{showMenu:"showMenu"},outputs:{onClose:"onClose"},decls:4,vars:10,consts:[["linear","",1,"emoji-container",3,"ngClass","headers"],[4,"ngFor","ngForOf"],["class","emoji",3,"innerHtml","click",4,"ngFor","ngForOf"],[1,"emoji",3,"click","innerHtml"]],template:function(e,n){e&1&&(s(0,"custom-stepper",0),p(1,"async"),c(2,si,3,1,"div",1),p(3,"async"),l()),e&2&&(o("ngClass",F(7,oi,n.toggleemojimenu))("headers",d(1,3,n.emojiHeaders$)||dt(9,ai)),a(2),o("ngForOf",d(3,5,n.emojis$)))},dependencies:[P,W,jt,Pe,E],styles:[".emoji-container[_ngcontent-%COMP%]{--padding-x: 7px;--padding-y: 10px;font-size:1.4em;position:absolute;overflow:hidden;--width: 100% ;width:var(--width);padding-inline:var(--padding-x);padding-block:var(--padding-y);--height: 9.6em ;top:calc(100% - var(--height));left:0;height:calc(var(--height) - 30px - var(--padding-y));visibility:hidden;display:none;border-radius:10px 10px 0 0;background:#ccc}.emoji-container.show[_ngcontent-%COMP%]{visibility:visible;display:flex}.emojis.show[_ngcontent-%COMP%]{visibility:visible;display:block}.emoji[_ngcontent-%COMP%]{cursor:pointer;margin:0;padding:0}"]})};var ci=["inputElement"],pi=i=>
2({disabled:i});function di(i,t){if(i&1){let e=y();s(0,"img",8),p(1,"fixAssetsDirectory"),v("click",function(){h(e);let r=m();return _(r.toggleEmojisMenu())}),l()}if(i&2){let e=m();o("src",d(1,1,e.emojiImage()),b)}}var Fe=class i{send=fe();dismiss=fe();toggleAttOptions=fe();inputElement;_defaultThemeService=u(ne);_emojiService=u(ae);_configLoaderService=u(j);_theme=this._configLoaderService.config.theme;placeHolder$=this._defaultThemeService.placeHolder$;sendImage=L(this._theme.images?.sendImage||"assets/default/defaultSendImage.svg");attachedImage=L(this._theme.images?.attachedImage||"assets/default/defaultAttachedImage.svg");emojiImage=L(this._theme.images?.emojiImage||"assets/default/defaultEmojiImage.svg");messageControler=new yt("",{validators:[ce.required],nonNullable:!0});supportEmojis=navigator.userAgent.toLowerCase().includes("windows nt 10");showMenu=L(!1);constructor(){Qe(()=>{let t=this._emojiService.emoji();if(t){let e=document.createElement("div");e.innerHTML=t,this.inputElement.nativeElement.value+=e.innerHTML}})}onSubmit(){if(this.messageControler.invalid)return;let t=this.messageControler.value;t.trim()!==""&&(this.send.emit(t),this.messageControler.reset(),this._focusMessage())}toggleAttachedOptions(){this.toggleAttOptions.emit()}toggleEmojisMenu(){this.showMenu.update(t=>!t)}_focusMessage(){this.inputElement.nativeElement&&this.inputElement.nativeElement.focus()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme-chat-input"]],viewQuery:function(e,n){if(e&1&&$(ci,5),e&2){let r;N(r=z())&&(n.inputElement=r.first)}}
2,outputs:{send:"send",dismiss:"dismiss",toggleAttOptions:"toggleAttOptions"},decls:11,vars:15,consts:[["inputElement",""],[1,"chat-input"],["data-testId","AttachedImgElement",1,"icon",3,"click","src"],[1,"chat-input__input-container"],["id","inputElement","data-testId","inputElement","type","text",1,"chat-input__input",3,"keydown.enter","keyup.escape","placeholder","formControl"],["data-testId","sendImgElement",1,"icon",3,"click","ngClass","src"],["class","icon","data-testId","emojiImgElement",3,"src","click",4,"ngIf"],[1,"chat-input__emoji-modal",3,"onClose","showMenu"],["data-testId","emojiImgElement",1,"icon",3,"click","src"]],template:function(e,n){if(e&1){let r=y();s(0,"div",1)(1,"img",2),p(2,"fixAssetsDirectory"),v("click",function(){return h(r),_(n.toggleAttachedOptions())}),l(),s(3,"div",3)(4,"input",4,0),p(6,"async"),v("keydown.enter",function(){return h(r),_(n.onSubmit())})("keyup.escape",function(){return h(r),_(n.dismiss.emit())}),l(),s(7,"img",5),p(8,"fixAssetsDirectory"),v("click",function(){return h(r),_(n.onSubmit())}),l()(),c(9,di,2,3,"img",6),s(10,"emoji",7),v("onClose",function(){return h(r),_(n.showMenu.set(!1))}),l()()}e&2&&(a(),o("src",d(2,7,n.attachedImage()),b),a(3),o("placeholder",d(6,9,n.placeHolder$))("formControl",n.messageControler),a(3),o("ngClass",F(13,pi,n.messageControler.invalid))("src",d(8,11,n.sendImage()),b),a(2),o("ngIf",n.supportEmojis),a(),o("showMenu",n.showMenu()))},dependencies:[P,M,Te,Me,wt,Be,E,B],styles:[".chat-input[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:space-evenly;gap:.5em;padding-inline:.5em;align-items:center;background-color:#d1d1d6;flex-wrap:nowrap;margin:0;border-radius:0 0 10px 10px}.chat-input__input-container[_ngcontent-%COMP%]{flex-grow:1;background-color:#fff;color:#000;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;padding-left:1em;padding-right:.5em;padding-block:5px;border-radius:50vmin}.chat-input__input[_ngcontent-%COMP%]{all:unset;font-size:.9em;border:none;outline:none;flex-grow:1}.chat-input__emoji-modal[_ngcontent-%COMP%]{position:absolute;width:100%;bottom:0}.icon[_ngcontent-%COMP%]{flex-grow:0;margin:0;padding:0;height:20px;width:20px;cursor:pointer}.disabled[_ngcontent-%COMP%]{opacity:.2;cursor:auto}.input[_ngcontent-%COMP%]:focus{outline:none}.hidden[_ngcontent-%COMP%]{display:none}"]})};function ui(i,t){i&1&&(s(0,"span",11),C(1,"*"),l())}function fi(i,t){i&1&&(s(0,"span",11),C(1,"*"),l())}function hi(i,t){i&1&&(s(0,"span",11),C(1,"*"),l())}function _i(i,t){if(i&1&&(w(0),s(1,"div",12),C(2," El correo es requerido "),l(),s(3,"div",12),C(4," Debe ser un correo valido "),l(),S()),i&2){let e=t.ngIf;a(),Z("show",e.required),a(2),Z("show",e.email)}}var Oe=class i{constructor(t,e,n,r){this._formBuilder=t;this._conversationService=e;this._realTimeService=n;this._configLoaderService=r;this._config=this._configLoaderService.config,this.datosInicialesDelCliente=this._formBuilder.group({nombre:this._formBuilder.control("",{nonNullable:!0}),apellido:this._formBuilder.control("",{nonNullable:!0}),email:this._formBuilder.control("",{validators:[ce.required,ce.email],nonNullable:!0})})}_config;datosInicialesDelCliente;enviarFormulario(){return ge(this,null,function*(){if(this.datosInicialesDelCliente.invalid)return this.datosInicialesDelCliente.markAllAsTouched();let{nombre:t="",apellido:e="Invitado",email:n="Undefined"}=this.datosInicialesDelCliente.value;this._conversationService.client$.next({name:t,apellido:e,email:n,id:"",avatar:"",status:""});let r=new vt(t,this._config.TOKEN,n,e);yield this._realTimeService.newUser(r).toPromise(),this._conversationService.showInitialForm$.next(!1)})}hasRequiredField=t=>{if(t.validator){let e=t.validator({});if(e&&e.required)return!0}return!1};get nombre(){return this.datosInicialesDelCliente.controls.nombre}get apellido(){return this.datosInicialesDelCliente.controls.apellido}get email(){return this.datosInicialesDelCliente.controls.email}static \u0275fac=function(e){return new(e||i)(Q(Tt),Q(we),Q(Ie),Q(j))};static \u0275cmp=x({type:i,selectors:[["default-theme-initial-form"]],decls:24,vars:11,consts:[["novalidate","",1,"silice-formGroup",3,"formGroup"],[1,"silice-input-container"],["for","nombre"],["class","text-red",4,"ngIf"],["type","text","formControlName","nombre","name","nombre"],["for","apellido"],["type","text","formControlName","apellido","name","apellido"],["for","email"],["type","text","formControlName","email","name","email"],[4,"ngIf"],[1,"button-send-form",3,"click"],[1,"text-red"],[1,"feedback"]],template:function(e,n){e&1&&(s(0,"div"),C(1,"para poder continuar, por favor Brindenos la siguiente informaci\xF3n"),l(),s(2,"form",0)(3,"div",1)(4,"label",2),C(5,"Nombre"),c(6,ui,2,0,"span",3),C(7,": "),l(),f(8,"input",4),l(),s(9,"div",1)(10,"label",5),C(11,"Apellido"),c(12,fi,2,0,"span",3),C(13,": "),l(),f(14,"input",6),l(),s(15,"div",1)(16,"label",7),C(17,"Correo"),c(18,hi,2,0,"span",3),C(19,": "),l(),f(20,"input",8),c(21,_i,5,4,"ng-container",9),l(
2),s(22,"button",10),v("click",function(){return n.enviarFormulario()}),C(23," Iniciar Conversaci\xF3n "),l()()),e&2&&(a(2),o("formGroup",n.datosInicialesDelCliente),a(),Z("is-invalid",n.nombre.invalid&&n.nombre.touched),a(3),o("ngIf",n.hasRequiredField(n.nombre)),a(3),Z("is-invalid",n.apellido.invalid&&n.apellido.touched),a(3),o("ngIf",n.hasRequiredField(n.apellido)),a(3),Z("is-invalid",n.email.invalid&&n.email.touched),a(3),o("ngIf",n.hasRequiredField(n.email)),a(3),o("ngIf",n.email.errors))},dependencies:[M,xt,Te,Me,bt,St,It]})};function de(i,t){let e=!t?.manualCleanup;e&&!t?.injector&&Ye(de);let n=e?t?.injector?.get(qe)??u(qe):null,r=Ci(t?.equal),g;t?.requireSync?g=L({kind:0},{equal:r}):g=L({kind:1,value:t?.initialValue},{equal:r});let D=i.subscribe({next:I=>g.set({kind:1,value:I}),error:I=>{if(t?.rejectErrors)throw I;g.set({kind:2,error:I})}});if(t?.requireSync&&g().kind===0)throw new He(601,!1);return n?.onDestroy(D.unsubscribe.bind(D)),ie(()=>{let I=g();switch(I.kind){case 1:return I.value;case 2:throw I.error;case 0:throw new He(601,!1)}},{equal:t?.equal})}function Ci(i=Object.is){return(t,e)=>t.kind===1&&e.kind===1&&i(t.value,e.value)}var bi=["superMessage",""],Ft=i=>({color:i});function yi(i,t){if(i&1&&f(0,"div",5),i&2){let e=m(2);Y("background-image","url("+e.superMessage.image+")")}}function xi(i,t){if(i&1&&(s(0,"div",1),c(1,yi,1,2,"div",2),s(2,"div",3),C(3),l(),s(4,"div",4),C(5),l()()),i&2){let e=m();a(),o("ngIf",e.superMessage.image),a(),o("ngStyle",F(5,Ft,e.superMessage.titleColor||"var(--headerTextColor)")),a(),R(" ",e.superMessage.title," "),a(),o("ngStyle",F(7,Ft,e.superMessage.messageColor||"#000")),a(),R(" ",e.superMessage.message," ")}}var Ae=class i{superMessage;constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme-super-message","superMessage",""]],inputs:{superMessage:"superMessage"},attrs:bi,decls:1,vars:1,consts:[["class","super-message",4,"ngIf"],[1,"super-message"],["class","background",3,"background-image",4,"ngIf"],[1,"titulo",3,"ngStyle"],[1,"contenido",3,"ngStyle"],[1,"background"]],template:function(e,n){e&1&&c(0,xi,6,9,"div",0),e&2&&o("ngIf",n.superMessage)},dependencies:[M,gt],styles:[".super-message[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]{border-radius:10px;overflow:hidden;margin:auto;position:relative}.super-message[_ngcontent-%COMP%]   .background[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]   .background[_ngcontent-%COMP%]{position:absolute;background-position:center;background-repeat:no-repeat;background-size:contain;width:100%;height:100%;background-size:cover}.super-message[_ngcontent-%COMP%]   .titulo[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]   .titulo[_ngcontent-%COMP%]{position:relative;padding:12px 12px 0;font-size:1.4em;font-weight:700}.super-message[_ngcontent-%COMP%]   .contenido[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]   .contenido[_ngcontent-%COMP%]{position:relative;padding:0 12px 12px;font-size:.875em;font-weight:700}@media all and (min-width: 768px) and (max-width: 1600px){.super-message[_ngcontent-%COMP%]   .titulo[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%]   .titulo[_ngcontent-%COMP%]{font-size:1em}}"]})};var Si=["imageButtons",""];function Ii(i,t){if(i&1&&f(0,"a",3),i&2){let e=t.$implicit;Y("background-image","url("+e.image+")"),K("href",e.href,b)("target",e.target)}}function Ti(i,t){if(i&1&&(w(0),s(1,"div",1),c(2,Ii,1,4,"a",2),l(),S()),i&2){let e=m();a(2),o("ngForOf",e.imageButtons)}}var Ve=class i{imageButtons;constructor(){}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme-image-buttons","imageButtons",""]],inputs:{imageButtons:"imageButtons"},attrs:Si,decls:1,vars:1,consts:[[4,"ngIf"],[1,"silice-actions"],["class","silice-background",3,"background-image",4,"ngFor","ngForOf"],[1,"silice-background"]],template:function(e,n){e&1&&c(0,Ti,3,1,"ng-container",0),e&2&&o("ngIf",n.imageButtons)},dependencies:[W,M],styles:[".silice-actions[_ngcontent-%COMP%]{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;align-items:center}.silice-background[_ngcontent-%COMP%]{width:fit-content;min-width:300px;min-height:50px;box-shadow:4px 4px 4px #0000001a;border-radius:2em;display:block;background-position:center;background-size:cover}"]})};var re=class i{constructor(){}transform(t){if(!(t.text.trim()!=""))return!1;let n=t.options;return n?n.isVisible!=!1:!0}
2static \u0275fac=function(e){return new(e||i)};static \u0275pipe=ue({name:"showMessage",type:i,pure:!0,standalone:!0})};var se=class i{constructor(){}transform(t,e){let n=e;switch(t){case"sent":n+=` ${n}-user`;break;case"received":n+=` ${n}-bot`;break;default:break}return n}static \u0275fac=function(e){return new(e||i)};static \u0275pipe=ue({name:"addClass",type:i,pure:!0,standalone:!0})};var ki=i=>({bothTrue:i});function ji(i,t){if(i&1){let e=y();w(0),s(1,"img",12),p(2,"fixAssetsDirectory"),v("error",function(){h(e);let r=m(3);return _(r.botImage$.next(null))}),l(),S()}if(i&2){let e=t.ngIf;a(),o("src",d(2,1,e),b)}}function Di(i,t){if(i&1){let e=y();f(0,"div",13)(1,"div",14)(2,"div",15),s(3,"img",12),p(4,"fixAssetsDirectory"),v("error",function(){h(e);let r=m(3);return _(r.botImage$.next(null))}),l()}i&2&&(a(3),o("src",d(4,1,"assets/default/defaultBotBody.svg"),b))}function Pi(i,t){if(i&1&&(w(0),c(1,ji,3,3,"ng-container",11),p(2,"async"),c(3,Di,5,3,"ng-template",null,0,te),S()),i&2){let e=ee(4),n=m(2);a(),o("ngIf",d(2,2,n.botImage$))("ngIfElse",e)}}function Bi(i,t){if(i&1&&(w(0),f(1,"img",16),p(2,"fixAssetsDirectory"),S()),i&2){let e=t.ngIf;a(),o("src",d(2,1,e),b)}}function Fi(i,t){if(i&1&&(w(0),c(1,Bi,3,3,"ng-container",4),p(2,"async"),S()),i&2){let e=m(2);a(),o("ngIf",d(2,1,e.clientImage$))}}function Oi(i,t){if(i&1&&(s(0,"div",17),f(1,"div",18),p(2,"boldAndLinks"),l()),i&2){let e=m(2);a(),o("innerHTML",d(2,1,e.message().text),q)}}function Ai(i,t){if(i&1&&(s(0,"div",20),f(1,"img",21),l()),i&2){let e=m(3);a(),ve("src",e.message().text,b)}}function Vi(i,t){if(i&1&&(s(0,"div")(1,"video",22),f(2,"source",23),l()()),i&2){let e=m(3);a(2),ve("type",e.message().file_mime),o("src",e.message().text,b)}}function Li(i,t){if(i&1&&(s(0,"div")(1,"audio",22),f(2,"source",23),l()()),i&2){let e=m(3);a(2),ve("type",e.message().file_mime),o("src",e.message().text,b)}}function $i(i,t){if(i&1){let e=y();s(0,"div")(1,"button",24),v("click",function(){h(e);let r=m(3);return _(r.goToLink(r.message().text))}),f(2,"i",25),s(3,"span"),C(4,"Descargar Fichero"),f(5,"br"),l()()()}}function Ni(i,t){if(i&1&&(s(0,"div",6),c(1,Ai,2,1,"div",19)(2,Vi,3,2,"div",7)(3,Li,3,2,"div",7)(4,$i,6,0,"div",8),l()),i&2){let e=m(2);o("ngSwitch",!0),a(),o("ngSwitchCase",e.message().file_mime==="image/gif"||e.message().file_mime==="image/webp"||e.message().file_mime==="image/png"||e.message().file_mime==="image/jpg"||e.message().file_mime==="image/jpeg"),a(),o("ngSwitchCase",e.message().file_mime==="video/mp4"),a(),o("ngSwitchCase",e.message().file_mime==="audio/ogg; codecs=opus"||e.message().file_mime==="audio/mp3"||e.message().file_mime==="audio/ogg"||e.message().file_mime==="audio/mp4")}}function zi(i,t){if(i&1&&(s(0,"div",2)(1,"div"),p(2,"addClass"),s(3,"div",5),w(4,6),c(5,Pi,5,4,"ng-container",7)(6,Fi,3,3,"ng-container",8),S(),l(),c(7,Oi,3,3,"div",9)(8,Ni,5,4,"div",10),s(9,"div"),p(10,"addClass"),C(11),p(12,"date"),l()()()),i&2){let e=m();K("id",e.isLastMessage()?"lastMessage":""),a(),me(U(2,10,e.message().type,"message")),a(3),o("ngSwitch",e.message().type),a(),o("ngSwitchCase","received"),a(2),o("ngIf",e.message().tipo==1),a(),o("ngIf",e.message().tipo==2),a(),me(U(10,13,e.message().type,"message-time")),a(2),R(" ",U(12,16,e.message().date,"d/M/yy, H:mm ")," ")}}function Ri(i,t){if(i&1&&f(0,"default-theme-super-message",26),i&2){let e=t.ngIf;o("superMessage",e)}}function Ui(i,t){if(i&1){let e=y();s(0,"div",29),v("click",function(){let r,g=h(e).$implicit,D=m(2);return _(D.buttonMessageClick(g.action,((r=D.message().options)==null?null:r.areButtonsEnabled)||D.isLastMessage()))}),C(1),l()}if(i&2){let e,n=t.$implicit,r=m(2);o("ngClass",F(2,ki,((e=r.message().options)==null?null:e.areButtonsEnabled)&&r.isLastMessage())),a(),R(" ",n.text," ")}}function Hi(i,t){if(i&1&&(s(0,"div",2)(1,"div",27),c(2,Ui,2,4,"div",28),l()()),i&2){let e=t.ngIf,n=m();K("id",n.isLastMessage()?"lastMessage":""),a(2),o("ngForOf",e)}}function qi(i,t){if(i&1&&(w(0),f(1,"default-theme-image-buttons",30),S()),i&2){let e=t.ngIf;a(),o("imageButtons",e)}}var Le=class i{index=X.required();message=X.required();_configLoaderService=u(j);_baseChatService=u(H);_messageParserService=u(Se);_document=u(G);_elementRef=u(V);config=this._configLoaderService.config;theme=this.config.theme;messages$=this._baseChatService.chatMessages$;messagesLenght=de(this.messages$.pipe(J(t=>t.length)),{requireSync:!0});isLastMessage=ie(()=>{let t=this.messagesLenght();return this.index()+1==t});botImage$=new T(this.theme.images?.botImage||null);clientImage$=new T(this.theme.images?.clientImage||"assets/default/defaultClient.svg");ngOnInit(){if(this.theme.styles){let t=this.theme.styles.message;if(t){let e=this.config.assetsUrl+t;this._baseChatService.loadStyle(this._elementRef.nativeElement,this._document,e)}}}goToLink=t=>{window.open(t)};buttonMessageClick=(t,e)=>{if(!e)return;if(typeof t=="string"){this._baseChatService.transmitMessage(t);return}let n={text:"",options:t},r=this._messageParserService.objectToString(n);this._baseChatService.transmitMessage(r)};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme-body"]],inputs:{index:[1,"index"],message:[1,"message"]},decls:6,vars:6,consts:[["changeBotImage",""],["class","chat-message",4,"ngIf"],[1,"chat-message"],[3,"superMessage",4,"ngIf"],[4,"ngIf"],[1,"message-photo"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","message-text",4,"ngIf"],[3,"ngSwitch",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"body",3,"error","src"],[1,"background"],[1,"traje1"],[1,"traje2"],[1,"body",3,"src"],[1,"message-text"],[2,"white-space","pre-line",3,"innerHTML"],["class","message-image",4,"ngSwitchCase"],[1,"message-image"],[3,"src"],["controls","",2,"max-width","100%","max-height","400px"],[3,"src","type"],["type","button",1,"btn","btn-float","btn-float-lg","btn-outline-pink",3,"click"],[1,"fa","fa-cloud-download"],[3,"superMessage"],[1,"message","message-buttons-array","message-bot"],["class","message-button-option",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"message-button-option",3,"click","ngClass"],[3,"imageButtons"]],template:function(e,n){if(e&1&&(c(0,zi,13,19,"div",1),p(1,"showMessage"),s(2,"div",2),c(3,Ri,1,1,"default-theme-super-message",3),l(),c(4,Hi,3,2,"div",1)(5,qi,2,1,"ng-container",4)),e&2){let r,g,D;o("ngIf",d(1,4,n.message())),a(3),o("ngIf",(r=n.message().options)==null?null:r.superMessage),a(),o("ngIf",(g=n.message().options)==null?null:g.buttons),a(),o("ngIf",(D=n.message().options)==null?null:D.imageButtons)}},dependencies:[P,W,M,be,ye,xe,Ae,Ve,E,ft,re,B,se,Ee]})};var Wi=["siliceTooltip"],$e=class i{_configLoaderService=u(j);chatService=u(ne);baseChatService=u(H);_document=u(G);_config=this._configLoaderService.config;theme=this._config.theme;chatState$=this.chatService.chatState$;_elementRef=u(V);_tooltipElement=null;set siliceToltip(t){if(!t){this._tooltipElement=null;return}if(this._tooltipElement)return;this._tooltipElement=t.nativeElement;let{tooltip:e}=this.theme;e&&(e.background&&this._tooltipElement.style.setProperty("--tooltip-background",e.background),e.color&&this._tooltipElement.style.setProperty("--tooltip-color",e.color),e.fontSize&&this._tooltipElement.style.setProperty("--tooltip-fontsize",e.fontSize),e.width&&this._tooltipElement.style.setProperty("--tooltip-width",e.width),e.right&&this._tooltipElement.style.setProperty("--tooltip-right",e.right),e.bottom&&this._tooltipElement.style.setProperty("--tooltip-bottom",e.bottom))}ngOnInit(){switch(this.theme.tooltip?.style){case"tooltip-theme-one":this._loadStyle("tooltip-theme-one");break}}_loadStyle(t){if(t){this._addbubbleVariables();let e=this._config.assetsUrl+t;this.baseChatService.loadStyle(this._elementRef.nativeElement,this._document,e)}}_addbubbleVariables(){let t=this._config.triggerVariant;if(!t||t.triggerType!="default")return;let e=this._elementRef.nativeElement.style,{bottom:n="20px",end:r="20px",size:g="60px"}=t||{};e.removeProperty("--bubble-size"),e.removeProperty("--bubble-bottom"),e.removeProperty("--bubble-right"),e.setProperty("--bubble-size",g),e.setProperty("--bubble-bottom",n),e.setProperty("--bubble-right",r)}openChat(){this.chatService.resolveToggleChat("open")}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["chat-tooltip"]],viewQuery:function(e,n){if(e&1&&$(Wi,5),e&2){let r;N(r=z())&&(n.siliceToltip=r.first)}},decls:5,vars:7,consts:[["siliceTooltip",""],["data-testId","chat-widget__tooltip",1,"chat-widget__tooltip",3,"click","ngClass"]],template:function(e,n){if(e&1){let r=y();
2s(0,"p",1,0),p(2,"async"),p(3,"addModifier"),v("click",function(){return h(r),_(n.openChat())}),C(4),l()}e&2&&(o("ngClass",U(3,4,"chat-widget__tooltip",d(2,2,n.chatState$)||"close")),a(4),R(`
3`,n.theme.tooltip==null?null:n.theme.tooltip.text,`
4`))},dependencies:[P,E,ke],styles:[".chat-widget__tooltip[_ngcontent-%COMP%]{cursor:pointer}.chat-widget__tooltip.chat-widget__tooltip--close[_ngcontent-%COMP%]{width:var(--tooltip-width, max-content);font-size:var(--tooltip-fontsize, 16px);background-color:var(--tooltip-background, white);color:var(--tooltip-color, black);border-radius:50vmin;box-sizing:border-box;margin:0;position:fixed;height:calc(1em + var(--bubble-size, 60px));bottom:calc(var(--bubble-bottom, 20px) - .5em);right:calc(var(--bubble-right, 20px) - .5em);padding-right:calc(1em + var(--bubble-size, 60px));padding-left:1em;display:flex;justify-content:center;align-items:center}.chat-widget__tooltip.chat-widget__tooltip--close[_ngcontent-%COMP%]:before{content:none}"]})};function Ki(i,t){if(i&1){let e=y();w(0),s(1,"img",9),p(2,"fixAssetsDirectory"),v("error",function(){h(e);let r=m(3);return _(r.botImage$.next(null))}),l(),S()}if(i&2){let e=t.ngIf;a(),o("src",d(2,1,e),b)}}function Xi(i,t){if(i&1){let e=y();f(0,"div",10)(1,"div",11)(2,"div",12),s(3,"img",9),p(4,"fixAssetsDirectory"),v("error",function(){h(e);let r=m(3);return _(r.botImage$.next(null))}),l()}i&2&&(a(3),o("src",d(4,1,"assets/default/defaultBotBody.svg"),b))}function Yi(i,t){if(i&1&&(w(0),c(1,Ki,3,3,"ng-container",8),p(2,"async"),c(3,Xi,5,3,"ng-template",null,0,te),S()),i&2){let e=ee(4),n=m(2);a(),o("ngIf",d(2,2,n.botImage$))("ngIfElse",e)}}function Zi(i,t){if(i&1&&(w(0),f(1,"img",14),p(2,"fixAssetsDirectory"),S()),i&2){let e=t.ngIf;a(),o("src",d(2,1,e),b)}}function en(i,t){if(i&1&&(w(0),c(1,Zi,3,3,"ng-container",13),p(2,"async"),S()),i&2){let e=m(2);a(),o("ngIf",d(2,1,e.clientImage$))}}function tn(i,t){if(i&1&&(s(0,"div",15),f(1,"div",16),p(2,"boldAndLinks"),l()),i&2){let e=m(2);a(),o("innerHTML",d(2,1,e.message().text),q)}}function nn(i,t){if(i&1&&(s(0,"div",2)(1,"div"),p(2,"addClass"),s(3,"div",3),w(4,4),c(5,Yi,5,4,"ng-container",5)(6,en,3,3,"ng-container",6),S(),l(),c(7,tn,3,3,"div",7),l()()),i&2){let e=m();K("id",e.isLastMessage()?"lastMessage":""),a(),me(U(2,6,e.message().type,"message")),a(3),o("ngSwitch",e.message().type),a(),o("ngSwitchCase","received"),a(2),o("ngIf",e.message().tipo==1)}}var Ne=class i{index=X.required();message=X.required();_configLoaderService=u(j);_baseChatService=u(H);_messageParserService=u(Se);_document=u(G);_elementRef=u(V);config=this._configLoaderService.config;theme=this.config.theme;messages$=this._baseChatService.chatMessages$;messagesLenght=de(this.messages$.pipe(J(t=>t.length)),{requireSync:!0});isLastMessage=ie(()=>{let t=this.messagesLenght();return this.index()+1==t});botImage$=new T(this.theme.images?.botImage||null);clientImage$=new T(this.theme.images?.clientImage||"assets/default/defaultClient.svg");ngOnInit(){if(this.theme.styles){let t=this.theme.styles.message;if(t){let e=this.config.assetsUrl+t;this._baseChatService.loadStyle(this._elementRef.nativeElement,this._document,e)}}}goToLink=t=>{window.open(t)};buttonMessageClick=(t,e)=>{if(!e)return;if(typeof t=="string"){this._baseChatService.transmitMessage(t);return}let n={text:"",options:t},r=this._messageParserService.objectToString(n);this._baseChatService.transmitMessage(r)};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["app-loading"]],inputs:{index:[1,"index"],message:[1,"message"]},decls:2,vars:3,consts:[["changeBotImage",""],["class","chat-message",4,"ngIf"],[1,"chat-message"],[1,"message-photo"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["class","message-text",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"body",3,"error","src"],[1,"background"],[1,"traje1"],[1,"traje2"],[4,"ngIf"],[1,"body",3,"src"],[1,"message-text"],[2,"white-space","pre-line",3,"innerHTML"]],template:function(e,n){e&1&&(c(0,nn,8,9,"div",1),p(1,"showMessage")),e&2&&o("ngIf",d(1,1,n.message()))},dependencies:[M,be,ye,xe,E,re,B,se,Ee]})};var an=["chatMessagesContainer"],rn=["triggerContainer"];function sn(i,t){if(i&1&&(f(0,"img",4),p(1,"fixAssetsDirectory")),i&2){m();let e=pt(5);o("src",d(1,1,e),b)}}function ln(i,t){i&1&&f(0,"div",5)}function mn(i,t){i&1&&f(0,"default-theme-initial-form",11)}function cn(i,t){if(i&1&&f(0,"default-theme-body",18),i&2){let e=t.$implicit,n=t.$index;o("message",e)("index",n)}}function pn(i,t){if(i&1&&f(0,"app-loading",18),i&2){let e=m(3);o("message",e.message)("index",10)}}function dn(i,t){if(i&1&&(s(0,"div",17,1),rt(2,cn,1,2,"default-theme-body",18,at),c(4,pn,1,2,"app-loading",19),p(5,"async"),l()),i&2){let e=t.ngIf,n=m(2);a(2),st(e),a(2),o("ngIf",n.loading&&d(5,1,n.messageLoading))}}function gn(i,t){if(i&1){let e=y();c(0,dn,6,3,"div",13),p(1,"async"),s(2,"div",14)(3,"default-theme-chat-input",15),v("send",function(r){h(e);let g=m();return _(g.transmitMessage(r))}
4)("dismiss",function(){h(e);let r=m();return _(r.closeChat())})("toggleAttOptions",function(){h(e);let r=m();return _(r.toggleAttOptions())}),l(),s(4,"default-theme-chat-adjuntos",16),v("send",function(r){h(e);let g=m();return _(g.sendFile(r))}),l()()}if(i&2){let e=m();o("ngIf",d(1,1,e.messages$))}}function un(i,t){i&1&&(f(0,"img",20),p(1,"fixAssetsDirectory")),i&2&&o("src",d(1,1,"assets/default/poweredBy.png"),b)}function fn(i,t){if(i&1){let e=y();s(0,"chat-tooltip",21),v("click",function(){h(e);let r=m();return _(r.openChat())}),l()}}var ze=class i{chatService=u(ne);baseChatService=u(H);_dialog=u(Bt);_configLoaderService=u(j);_conversationService=u(we);_breakpointObserver=u(Ct);_document=u(G);_elementRef=u(V);_config=this._configLoaderService.config;theme=this._config.theme;trigger=this._config.triggerVariant;headerAvatarImage$=new T(this.theme.images?.headerAvatarImage?this.theme.images?.headerAvatarImage:null).pipe(Ue(1));messageLoading=new T(this.theme.isLoading?.image||null).pipe(Ue(1));messages$=this.baseChatService.chatMessages$;showInitialForm$=this._conversationService.showInitialForm$;transmitMessage=this.baseChatService.transmitMessage;isMobileResolution$=this._breakpointObserver.observe("(max-width: 768px)").pipe(J(t=>t.matches));chatDraggable$=this.isMobileResolution$.pipe(J(t=>t?!1:!!this.theme.isChatDraggable));loading=!1;loadingTimeout;message={from:"user123",text:"Escribiendo...",type:"received",tipo:1,file_mime:null,options:null,date:Date.now()};chatState$=this.chatService.chatState$;AdjuntosComponent;chatMessagesContainer;set triggercontainer(t){t&&this._loadTrigger(t)}closeChat(){this.chatService.resolveToggleChat("close")}_loadTrigger(t){return ge(this,null,function*(){if(t.length>0)return;switch(this.trigger?.triggerType){case"extremadura":let{ExtremaduraTriggerComponent:r}=yield import("./extremadura-trigger.component-U75OY7QF.js"),g=t.createComponent(r);g.instance.trigger=this.trigger,g.instance.dispatch.subscribe(()=>this.openChat());break;case"default":default:let{BubbleTriggerComponent:D}=yield import("./bubble-trigger.component-5JUBBUJI.js"),I=t.createComponent(D);this.isMobileResolution$.subscribe(Lt=>{let We=this.trigger?.bubbleImageWhatsApp,Re=this.trigger?.bubbleImage,hn;Lt?We?(I.instance.trigger=void 0,I.instance.image=We,I.instance.dispatch.subscribe(()=>this._onRedirect())):Re?(I.instance.trigger=void 0,I.instance.image=Re,I.instance.dispatch.subscribe(()=>this.openChat())):(I.instance.trigger=void 0,I.instance.image="assets/default/defaultBubble.svg"):(I.instance.trigger=this.trigger,I.instance.image=Re||"assets/default/defaultBubble.svg",I.instance.dispatch.subscribe(()=>this.openChat()))});break}})}ngAfterViewInit(){if(this.chatMessagesContainer){let t=this.chatMessagesContainer.nativeElement;if(!t)return;this.baseChatService.element=t}}ngOnInit(){if(this._config.showInitialForm&&!this._conversationService.client&&this._config.showInitialForm&&this._conversationService.showInitialForm$.next(!0),this.theme.open&&(this._breakpointObserver.isMatched("(max-width: 768px)")||this._openChat()),this.theme.styles){let t=`${this._config.assetsUrl}assets/brand/chat-background.png`;this._elementRef.nativeElement.shadowRoot.host.style.setProperty("--chat-widget-background-image",`url(${t})`);let n=this.theme.styles.header;if(n){let r=this._config.assetsUrl+n;this.baseChatService.loadStyle(this._elementRef.nativeElement.shadowRoot,this._document,r)}}this.messages$.subscribe(t=>{if(!t?.length)return;t[t.length-1].type==="sent"?(this.loading=!0,this.loadingTimeout&&clearTimeout(this.loadingTimeout),this.loadingTimeout=setTimeout(()=>{this.loading=!1},5e3)):(this.loading=!1,this.loadingTimeout&&clearTimeout(this.loadingTimeout))})}openChat(){let t=this._breakpointObserver.isMatched("(max-width: 768px)"),{mobileContactNumbers:e}=this.theme;if(e&&t){this._openModalRedirect();return}this._openChat()}sendFile(t){let e=JSON.parse(t);switch(e.kind){case"image":this.baseChatService.convertAppendMessageToMessage({from:this.baseChatService.operator,text:e.source,type:"sent",messageType:2,file_mime:e.type});break;case"video":this.baseChatService.convertAppendMessageToMessage({from:this.baseChatService.operator,text:e.source,type:"sent",messageType:2,file_mime:e.type});break;default:break}}toggleAttOptions(){this.AdjuntosComponent.cargarAdjunto()}_openChat(){this.chatService.resolveToggleChat("open"),this.baseChatService.isValid$.next(this.baseChatService.verifyChatData()),this.baseChatService.autoScrollToLatestMessage()}_openModalRedirect(){let t=this.theme.mobileContactNumbers;if(!t)return;let{whatsapp:e,telegram:n}=t;this._dialog.open(De,{height:"400px",data:{whatsapp:e,telegram:n},closeOnOverlayDetachments:!1,disableClose:!0})}_onRedirect(){let t=this.theme.mobileContactNumbers;if(!t)return;let{whatsapp:e}=t;
4if(e){let n=`https://api.whatsapp.com/send?phone=${e}`;window.open(n,"_blank")}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["default-theme"]],viewQuery:function(e,n){if(e&1&&($(oe,5),$(an,5),$(rn,7,nt)),e&2){let r;N(r=z())&&(n.AdjuntosComponent=r.first),N(r=z())&&(n.chatMessagesContainer=r.first),N(r=z())&&(n.triggercontainer=r.first)}},features:[Ce([_t])],decls:23,vars:21,consts:[["triggerContainer",""],["chatMessagesContainer",""],["cdkDrag","","data-testId","chat-widget",1,"chat-widget",3,"ngClass","cdkDragDisabled"],[1,"chat-widget__header"],["data-testId","chat-widget__logo",1,"chat-widget__logo",3,"src"],["data-testId","chat-widget__logo--without-image",1,"chat-widget__logo"],[1,"chat-widget__header-text"],["data-testId","chat-widget__close",1,"chat-widget__close",3,"click"],["height","329pt","viewBox","0 0 329.26933 329","width","329pt","xmlns","http://www.w3.org/2000/svg",2,"fill","var(--headerTextColor)"],["d","m194.800781 164.769531 128.210938-128.214843c8.34375-8.339844 8.34375-21.824219 0-30.164063-8.339844-8.339844-21.824219-8.339844-30.164063 0l-128.214844 128.214844-128.210937-128.214844c-8.34375-8.339844-21.824219-8.339844-30.164063 0-8.34375 8.339844-8.34375 21.824219 0 30.164063l128.210938 128.214843-128.210938 128.214844c-8.34375 8.339844-8.34375 21.824219 0 30.164063 4.15625 4.160156 9.621094 6.25 15.082032 6.25 5.460937 0 10.921875-2.089844 15.082031-6.25l128.210937-128.214844 128.214844 128.214844c4.160156 4.160156 9.621094 6.25 15.082032 6.25 5.460937 0 10.921874-2.089844 15.082031-6.25 8.34375-8.339844 8.34375-21.824219 0-30.164063zm0 0"],[1,"chat-widget__content"],["data-testId","default-theme-initial-form"],["class","chat-widget__silice-logo",3,"src",4,"ngIf"],["class","chat-widget__body",4,"ngIf"],[1,"chat-widget__footer"],[3,"send","dismiss","toggleAttOptions"],[3,"send"],[1,"chat-widget__body"],["data-testId","default-theme-body",3,"message","index"],["data-testId","default-theme-body",3,"message","index",4,"ngIf"],[1,"chat-widget__silice-logo",3,"src"],[3,"click"]],template:function(e,n){if(e&1){let r=y();s(0,"div",2),p(1,"async"),p(2,"addModifier"),p(3,"async"),s(4,"div",3),mt(5),p(6,"async"),c(7,sn,2,3,"img",4)(8,ln,1,0,"div",5),s(9,"div",6),C(10),l(),s(11,"div",7),v("click",function(){return h(r),_(n.closeChat())}),Ze(),s(12,"svg",8),f(13,"path",9),l()()(),et(),s(14,"div",10),c(15,mn,1,0,"default-theme-initial-form",11),p(16,"async"),c(17,gn,5,3),l(),c(18,un,2,3,"img",12),_e(19,null,0),c(21,fn,1,0,"chat-tooltip"),p(22,"async"),l()}if(e&2){o("ngClass",U(2,9,"chat-widget",d(1,7,n.chatState$)||"close"))("cdkDragDisabled",!d(3,12,n.chatDraggable$)),a(5);let r=ct(d(6,14,n.headerAvatarImage$));a(2),he(r?7:8),a(3),lt(n.theme.chatHeaderText),a(5),he(d(16,17,n.showInitialForm$)?15:17),a(3),o("ngIf",n.theme.allowPoweredBySilice),a(3),he(!d(22,19,n.isMobileResolution$)&&n.theme.tooltip?21:-1)}},dependencies:[P,M,kt,Fe,Oe,oe,Le,$e,Ne,E,B,ke],styles:[`.chat-widget{position:fixed;right:0;bottom:0;z-index:999}.chat-widget.chat-widget--open{display:grid;--chat-widget--open---headerSize: 50px;--chat-widget--open---height: min(100dvh, 700px);grid-template-rows:var(--chat-widget--open---headerSize) var(--chat-widget--open---height);width:min(100dvw,400px);height:var(--chat-widget--open---height);border-radius:10px;box-shadow:0 0 20px -15px;background-color:#f5f5f5;font-size:15px}.chat-widget.chat-widget--open .chat-widget__header{cursor:move;display:flex;position:relative;flex-direction:row;flex-wrap:nowrap;width:100%;height:calc(100% - 10px);background:var(--mainColor);border-radius:10px 10px 20px 0;margin:0 0 10px;box-shadow:0 6px 14px -9px;align-items:center;visibility:visible;padding-block:1.6em}.chat-widget.chat-widget--open .chat-widget__header:before{background-color:inherit;width:calc(10% - 1px);height:9px}.chat-widget.chat-widget--open .chat-widget__header:after{z-index:2;width:10%;height:10px;box-shadow:inset 2px 2px 10px -9px #000;border-top-left-radius:100%;background-image:linear-gradient(180deg,#c9c9c9 10%,#f2f2f2 84%)}.chat-widget.chat-widget--open .chat-widget__header:after,.chat-widget.chat-widget--open .chat-widget__header:before{content:"";position:absolute;top:100%}.chat-widget.chat-widget--open .chat-widget__logo{width:40px;height:40px;margin-left:.5em}.chat-widget.chat-widget--open .chat-widget__header-text{width:calc(100% - 80px);
4display:flex;align-items:center;color:var(--headerTextColor);padding:0 0 0 10px}.chat-widget.chat-widget--open .chat-widget__close{display:flex;justify-content:center;align-items:center;font-size:1em;color:var(--headerTextColor);width:1.2em;height:1.2em;position:relative;z-index:10;font-weight:700;overflow:hidden;cursor:pointer}.chat-widget.chat-widget--open .chat-widget__body{width:100%;height:100%;margin:1px 0 0;padding-inline:20px;padding-bottom:1em;padding-top:0;overflow-y:auto;scroll-behavior:smooth}.chat-widget.chat-widget--open .chat-widget__body::-webkit-scrollbar-thumb{background-color:#d7d9e0}.chat-widget.chat-widget--open .chat-widget__body::-webkit-scrollbar{width:10px}.chat-widget.chat-widget--open .chat-widget__content{display:grid;grid-template-rows:1fr 40px;height:calc(var(--chat-widget--open---height) - var(--chat-widget--open---headerSize));visibility:visible}.chat-widget.chat-widget--open .chat-widget__footer{display:block;visibility:visible}.chat-widget.chat-widget--open .chat-widget__extremadura,.chat-widget.chat-widget--open .chat-widget__bubble{visibility:hidden;display:none}.chat-widget.chat-widget--open .chat-widget__silice-logo{width:100%;height:20px;position:absolute;right:0;top:100%;object-fit:contain;opacity:50%;visibility:visible;display:block}.chat-widget.chat-widget--close .chat-widget__header,.chat-widget.chat-widget--close .chat-widget__content,.chat-widget.chat-widget--close .chat-widget__footer{visibility:hidden;display:none}.chat-widget.chat-widget--close .chat-widget__bubble{z-index:999;width:var(--bubble-size, 60px);height:var(--bubble-size, 60px);bottom:var(--bubble-bottom, 20px);right:var(--bubble-right, 20px);cursor:pointer;position:absolute;background-position:center 52%;background-repeat:no-repeat;background-size:contain;display:flex;visibility:visible}.chat-widget.chat-widget--close .chat-widget__silice-logo{visibility:hidden;display:none}@media (max-width: 768px){.chat-widget.chat-widget--open{--chat-widget--open---height: 100dvh}}
5`,`.chat-message{margin:1em;display:flex;flex-direction:column}.message-text{overflow-wrap:break-word;width:100%;font-size:.85em}.message{position:relative;width:80%;border-radius:10px;padding:10px;display:flex;flex-direction:column;box-shadow:0 4px 10px -6px #000}.message.message-user{align-items:flex-end;align-self:flex-end;background-color:var(--mainColor);color:var(--userTextColor, hsl(0, 0%, 10%));text-align:right}::ng-deep .message.message-user a.linkified{color:var(--userLinkColor, var(--userTextColor, hsl(240, 100%, 50%)))}.message.message-user:before{right:0;clip-path:polygon(0 0,100% 100%,100% 0)}.message.message-user .message-photo{right:-30px}.message-time.message-time-user{color:var(--userMessageTime, var(--userTextColor, hsl(0, 0%, 80%)))}.message-time.message-time-bot{color:var(--botMessageTime, var(--botTextColor, hsl(0, 0%, 80%)))}.message.message-bot{align-items:flex-start;align-self:flex-start;background-color:#e6e5eb;color:var(--botTextColor);text-align:left}.message.message-bot:before{left:0;clip-path:polygon(0 0,0% 100%,100% 0)}.message.message-bot .message-photo{left:-30px}.message.message-bot .message-photo .traje1,.message.message-bot .message-photo .traje2,.message.message-bot .message-photo .background,.message.message-bot .message-photo .body{position:absolute;top:0;left:0;width:100%;height:100%}.message.message-bot .message-photo .traje1{clip-path:polygon(10% 100%,20% 58%,42% 58%,46% 100%,53% 100%,58% 58%,80% 58%,90% 100%);background-color:var(--suitBotColor1, hsl(0, 0%, 10%))}.message.message-bot .message-photo .traje2{clip-path:polygon(30% 100%,40% 75%,34% 64%,42% 58%,47% 100%,53% 100%,58% 58%,66% 64%,60% 75%,70% 100%);background-color:var(--suitBotColor2, hsl(0, 0%, 70%))}.message.message-bot .message-photo .background{background-color:#cbe2ff}.message.message-bot .message-photo .body{background-size:100%;background-repeat:no-repeat;background-position:center}.message:before{content:"";position:absolute;width:30px;height:15px;background:inherit;bottom:-8px}.message .message-time{font-size:var(--step--2, .6em);display:block;width:100%;text-align:right}.message .message-photo{position:absolute;width:30px;height:30px;clip-path:circle(50% at 50% 50%);bottom:-32px;background-position:center;background-repeat:no-repeat;background-size:100%}.message .message-photo .body{background-size:contain;width:30px;height:30px}.message .message-image img{max-width:100%;max-height:300px;object-fit:cover;border-radius:10px}.message .message-image{width:100%;display:flex;justify-content:center;align-items:center}.message .video-message{box-shadow:0 0 20px -10px;border-radius:10px}.message .video-message:focus{outline:none}.message-buttons-array{padding:.1em;margin:.1em 0;font-weight:700;font-size:.85em;display:flex;flex-wrap:wrap;justify-content:center;align-items:inherit!important}.message-buttons-array .message-button-option{padding:8px;margin:5px 3px;border:1px solid;border-radius:50vmin;text-align:center}.message-buttons-array .message-button-option{border-color:var(--buttonBorder, var(--mainColor, hsl(0, 0%, 60%)));color:var(--buttonText, var(--mainColor, hsl(0, 0%, 60%)));background-color:var(--buttonColorFondo)}.message-buttons-array .message-button-option:hover{border-color:var(--buttonBorderHover, var(--mainColor, hsl(0, 0%, 60%)));color:var(--buttonTextHover, var(--mainColor, hsl(0, 0%, 60%)));
5background-color:var(--buttonBackgroundHover, var(--headerTextColor, hsl(0, 0%, 90%)));cursor:pointer}.message-button-option.disabled{color:#333!important;border:none!important;cursor:default!important;text-align:left!important}.message-button-option.disabled:hover{background-color:transparent!important}.message-button-option.disabled.selectable{background-color:#999}.message-button-option.disabled.selectable:hover{background-color:transparent!important}
6`,`*{box-sizing:border-box}chat-input{width:100%;margin:0!important}.header-text-color{fill:var(--headerTextColor)}
7`,`:host{font-family:var(--silice-font-family),"Abel",sans-serif}
8`],encapsulation:3})};var Vt=class i{static components={main:ze};static \u0275fac=function(e){return new(e||i)};static \u0275mod=Xe({type:i});static \u0275inj=Ke({imports:[ht,Mt,Et,Dt]})};export{Vt as DefaultThemeModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.