PageSourceSearch

https://www.adslzone.net/_nuxt/4kxbOnlb.js

js adslzone.net collected 2026-09-24 15:17:49 UTC 164,990 bytes, 11 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BAgKNOPc.js","./e3tOYKGx.js","./DLRJqYEF.js","./CHsDANkH.js","./entry.DLH8S2id.css","./B2drtvok.js","./ArticleCard.D7StgeiC.css","./BPTdupsU.js","./Ad.BZYh3QDH.css","./CyGJ8Cyr.js","./DlyVxuzD.js","./0N_LmYZO.js","./ChgzEZ74.js","./twitter.BAmU9E2U.css","./DoXJxxXp.js","./BHsdlzaP.js","./Grid.BhWKGItb.css","./BLOPhFvs.js","./BOpigEKm.js","./Card.SFuZg9AZ.css","./BAWL4_y_.js","./Item.DT186Wl0.css","./CommentForm.CUz8PdLC.css","./B89PRjMg.js","./Comment.CSIFuYyY.css","./PreviewFade.DCFZf-Dq.css","./CYE6kOPq.js","./FeaturedPostCarousel.C9CB9QN3.css","./CyJ5BTR0.js","./Separator.BIcco26d.css","./CzjyQh7Q.js","./B5SJxJTu.js","./GlobalScore.TE95JKBA.css","./ReviewRating.BcCz5nG0.css","./Bo0MZzyw.js","./List.jt1X7thd.css","./BhE0VErf.js","./SourceVia.EMs-6HlY.css","./DyezePKG.js","./SeoLinks.ClS65Xvc.css","./ldfEloh-.js","./About.CkC6Gf7L.css","./B2nwOw4G.js","./Progress.B1Mg7tsP.css","./DbsV9yor.js","./Header.LCWH0-V6.css","./DIQqbBSw.js","./CommentsCard.CGqUlcZe.css","./-2UA3IAe.js","./x_rD_Ya3.js","./Card.DxBtgXLd.css","./6FVOGlyJ.js","./Card.D_nGuPCw.css","./BXU4-f35.js","./Sheet.D6pTzQlm.css","./OGujkN15.js","./BcovbgY4.js","./Bar.B6leCVDF.css","./Cotdi13U.js","./DiZWCBQr.js","./Carousel.DHz8RPye.css","./YoutubeGallery.E6KVZo2x.css","./YlGCgVos.js","./5gMAvxhR.js","./Feed.FJh9e3Gm.css","./BbIjLP6v.js","./Products.DWwGYhtI.css","./Bud4iapq.js","./InfiniteCascade.DdWd8RIc.css","./BgkuAP-6.js","./PostArticle.CbJZlJZ9.css","./CG_04qqo.js","./BM_hUfR0.js","./FullScreenOverlay.D6jHTKu3.css","./Modal.BBzNHbr8.css","./CQrNO3ra.js","./CmMxrdpO.js","./Features.DS4W0GyO.css","./BRY3QZs3.js","./Specs.CsG6ecAD.css","./BSqEa-6Z.js","./CompareCard.B1pGXoz_.css","./C8RocyRb.js","./PromotionalBanner.Dkmb3Dso.css"])))=>i.map(i=>d[i]);
2import{k as te,e as i,o as n,l as t,h as w,f as T,m as re,p as me,q as Vo,F as U,r as K,t as B,s as Pe,N as Ee,v as G,x as ge,y as Ot,z as ye,A as _t,a as ie,b as fe,B as Bo,i as e,C as xe,n as Z,D as V,E as no,G as ue,g as H,T as Ne,d as j,_ as W,H as wt,I as Ct,J as Ue,K as nt,L as De,j as kt,w as mt,c as $t,M as Ho,O as Ro,P as Go,Q as qe,R as No,S as Vt,U as pt,V as Te,W as Dt,X as so,Y as ao,Z as Fo,$ as Uo,a0 as ro,u as io,a1 as Mt,a2 as Fe,a3 as lo,a4 as qo,a5 as co,a6 as Jt,a7 as jo,a8 as Wo,a9 as Yo}from"./CHsDANkH.js";import{u as uo,a as Tt,_ as Bt,b as gt}from"./B2drtvok.js";import _o from"./BPTdupsU.js";import{_ as Ht,c as po}from"./CyGJ8Cyr.js";import{A as ee}from"./DlyVxuzD.js";import{a as Ko,b as Xo,c as Rt,d as Qo,e as Jo,u as Ve}from"./0N_LmYZO.js";import{_ as Zo,a as en}from"./ChgzEZ74.js";import{l as st}from"./DoXJxxXp.js";import{a as tn,_ as on}from"./BHsdlzaP.js";import{u as xt}from"./BLOPhFvs.js";import{_ as Gt,a as Nt}from"./BOpigEKm.js";import{_ as mo}from"./BAWL4_y_.js";const nn={class:"breadcrumb-nav"},sn={class:"breadcrumb"},an={class:"breadcrumb__item"},rn={key:0,class:"breadcrumb__separator"},ln={key:1,class:"breadcrumb__item"},cn=["innerHTML"],dn={__name:"Breadcrumb",props:["crums","currentTitle"],setup(o){const a=o;return(p,c)=>{const l=Vo;return n(),i("nav",nn,[t("ol",sn,[t("li",an,[T(l,{class:"breadcrumb__link",to:"/"},{default:re(()=>c[0]||(c[0]=[me("Portada")])),_:1}),c[1]||(c[1]=t("span",{class:"breadcrumb__separator"},">",-1))]),a.crums!==void 0?(n(!0),i(U,{key:0},K(a.crums,(s,_)=>(n(),i("li",{class:"breadcrumb__item",key:s.name},[T(l,{class:"breadcrumb__link",to:s.url},{default:re(()=>[me(B(s.name),1)]),_:2},1032,["to"]),_<a.crums.length-1||a.currentTitle?(n(),i("span",rn," > ")):w("",!0)]))),128)):w("",!0),a.currentTitle?(n(),i("li",ln,[t("span",{class:"breadcrumb__link breadcrumb__link--current",innerHTML:a.currentTitle},null,8,cn)])):w("",!0)])])}}},Oe=te(dn,[["__scopeId","data-v-311b6a5a"]]),un={viewBox:"0 0 68 48"};function _n(o,a){return n(),i("svg",un,a[0]||(a[0]=[t("path",{fill:"#F03",d:"M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26",class:"i1539761497__ytp-large-play-button-bg"},null,-1),t("path",{fill:"#fff",d:"M45 24 27 14v20",class:"i1539761497__triangle"},null,-1)]))}const pn={render(){return Pe(Ee,{icon:{render:_n},name:"youtubeTrans"})}},mn={class:"post-opening-video"},gn={key:0,class:"post-opening-video__icon-container"}
2,hn={key:1,id:"videoContainer",class:"post-opening-video__iframe-container"},fn=["src"],Ft={__name:"OpeningVideo",props:["videoUrl"],setup(o){const a=o,p=G(!1),c=G(""),l=G(!1);let s=null,_=null;ge(()=>{p.value&&h()}),Ot(()=>{s&&(s=null)});const b=()=>{p.value||(h(),c.value=`https://www.youtube.com/embed/${x(a.videoUrl)}?autoplay=1&rel=0&modestbranding=1&controls=1&autohide=1&enablejsapi=1`,p.value=!0),l.value=!0},x=f=>{const r=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,z=f.match(r);return z&&z[7].length===11?z[7]:!1},y=f=>{const r=f.data;r===2?_=setTimeout(()=>{s.getPlayerState()===2&&(l.value=!1)},200):r===1?(clearTimeout(_),_=null):r===0&&(l.value=!1)},I=()=>{s=new YT.Player("postOpeningVideo",{events:{onStateChange:y}})},h=()=>{if(window.YT)I();else{const f=document.createElement("script");f.src="https://www.youtube.com/iframe_api",document.head.appendChild(f),window.onYouTubeIframeAPIReady=I}};return(f,r)=>{const z=pn;return n(),i("div",mn,[l.value?w("",!0):(n(),i("div",gn,[T(z,{class:"post-opening-video__icon",onClick:b}),r[0]||(r[0]=t("div",{class:"post-opening-video__instructions"}," Pulsa para ver el video ",-1))])),p.value?(n(),i("div",hn,[ye(t("iframe",{id:"postOpeningVideo",width:"560",height:"315",src:c.value,frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""},null,8,fn),[[_t,l.value]])])):w("",!0)])}}},vn={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 30"};function bn(o,a){return n(),i("svg",vn,a[0]||(a[0]=[t("path",{fill:"#0078FF",d:"M29.333 2.667V20H13.81L8 24.14V20H2.667V2.667zM32 0H0v22.641h5.333v6.692l9.334-6.692H32z"},null,-1)]))}const Ut={render(){return Pe(Ee,{icon:{render:bn},name:"shareCount"})}},yn={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 33"};function $n(o,a){return n(),i("svg",yn,a[0]||(a[0]=[t("path",{fill:"#2E4688",d:"M16 2.743c7.352 0 13.333 5.981 13.333 13.333S23.352 29.41 16 29.41 2.667 23.428 2.667 16.076 8.648 2.743 16 2.743m0-2.667c-8.836 0-16 7.164-16 16s7.164 16 16 16 16-7.164 16-16-7.164-16-16-16M13.333 13.41h-2.666v2.666h2.666v8h4v-8h2.427L20 13.41h-2.667v-1.111c0-.637.128-.89.744-.89H20V8.077h-3.205c-2.398 0-3.462 1.056-3.462 3.078z"},null,-1)]))}const wn={render(){return Pe(Ee,{icon:{render:$n},name:"shareFacebook"})}},Cn={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function kn(o,a){return n(),i("svg",Cn,a[0]||(a[0]=[t("circle",{cx:"16",cy:"16",r:"14.5",style:{fill:"none",stroke:"#000","stroke-width":"2.5"}},null,-1),t("path",{"stroke-linecap":"round",d:"M236 0h46L181 115l118 156h-92.6l-72.5-94.8-83 94.8h-46l107-123L-1.1 0h94.9l65.5 86.6zm-16.1 244h25.5L80.4 26H53z",style:{fill:"#000",stroke:"#000","stroke-width":"1.5"},transform:"translate(8 8)scale(.055)"},null,-1)]))}const go={render(){return Pe(Ee,{icon:{render:kn},name:"shareX"})}},Tn={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function xn(o,a){return n(),i("svg",Tn,a[0]||(a[0]=[t("path",{d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10S2 17.514 2 12 6.486 2 12 2m0-2C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0M6 17c1.513-6.587 7-7.778 7-7.778V7l5 4.425-5 4.464v-2.223c0 .001-3.78-.114-7 3.334"},null,-1)]))}const ho={render(){return Pe(Ee,{icon:{render:xn},name:"share"})}},at=()=>{const o=ie("commentsCard",()=>({isVisible:!1,isLoginPanelVisible:!1,isUserPanelVisible:!1,postId:void 0,postComments:[],isLoading:!1,error:null,user:null,isGoogleScriptLoaded:!1,feedback:{status:"error",message:""}})),a=ie("gazConfigData"),{$resolveGazApiEndpoint:p}=fe(),c=(m,P)=>{o.value.feedback.status=m,o.value.feedback.message=P},l=async m=>{o.value.isVisible=!0,o.value.isLoading=!0,o.value.postId=m,await E()&&k(),await _(m),o.value.isLoading=!1},s=(m,P=!0)=>{o.value.user={id:m.userID,uId:m.uid,alias:m.alias,email:m.email,token:m.token,uidHash:m.uidHash},P&&C(m.token)},_=async m=>{const P=`${p()}/comment/${a.value.site}/get/${m}`;o.value.loading=!0,o.value.error=null;try{const L=await $fetch(P);o.value.postComments=L||[]}catch(L){console.error("Error recuperando los comentarios:",L),o.value.error="No se pudieron cargar los comentarios."}finally{o.value.loading=!1}},b=async(m,P)=>{if(!$())return;const L=`${p()}/comment/${a.value.site}`;try{return await $fetch(L,{method:"POST",body:{userID:o.value.user.id,postID:o.value.postId,content:m,parentID:P,token:o.value.user.token}})}catch(S){throw console.error("Error creando el comentario:",S),new Error("No se pudo enviar el comentario.")}},x=async(m,P)=>{var S;if(!$())return;const L=`${p()}/comment/${a.value.site}`;try{await $fetch(L,{method:"PUT",body:{userID:o.value.user.id,postID:o.value.postId,content:P,commentID:m,token:o.value.user.token}})}catch(R){console.error("Error al editar el comentario:",R);const oe=((S=R==null?void 0:R.data)==null?void 0:S.error)||"No se pudo editar el comentario.";throw new Error(oe)}},y=async m=>{if(!$())return;const P=`${p()}/comment/${a.value.site}`;try{await $fetch(P,{method:"DELETE",body:{userID:o.value.user.id,postID:o.value.postId,commentID:m,token:o.value.user.token}}),c("success","Comentario borrado")}catch(L){throw console.error("Error al eliminar el comentario:",L),c("error","Error al borrar comentario"),new Error("No se pudo eliminar el comentario.")}},I=async(m,P)=>{var S;const L=`${p()}/comment/user/login`;try{const R=await $fetch(L,{method:"POST",body:{login:m,password:P}});s(R)}catch(R){const oe=((S=R==null?void 0:R.data)==null?void 0:S.error)||"Error desconocido";throw new Error(oe)}},h=async m=>{var L;const P=`${p()}/comment/user/login/google`;try{const S=await $fetch(P,{method:"POST",body:{domain:a.value.site,google_token:m}});s(S),k()}catch(S){const R=((L=S==null?void 0:S.data)==null?void 0:L.error)||"Error desconocido";throw new Error(R)}},f=async m=>{var L;const P=`${p()}/comment/user/create`;try{return await $fetch(P,{method:"POST",body:{login:m.username,password:m.password,email:m.email,alias:m.email.split("@")[0],return_url:a.value.url}})}catch(S){const R=((L=S==null?void 0:S.data)==null?void 0:L.error)||"No se pudo completar el registro.";throw new Error(R)}},r=async m=>{var L;const P=`${p()}/comment/user/password-reset`;try{await $fetch(P,{method:"POST",body:{email:m}})}catch(S){const R=((L=S==null?void 0:S.data)==null?void 0:L.error)||"No se pudo iniciar el proceso de recuperación de contraseña.";throw new Error(R)}},z=async m=>{var L;if(!$())return;const P=`${p()}/comment/user/password`;try{await $fetch(P,{method:"POST",body:{token:o.value.user.token,password:m}}),await k()}catch(S){console.error("Error al cambiar contraseña:",S);const R=((L=S==null?void 0:S.data)==null?void 0:L.error)||"No se pudo cambiar la contraseña.";throw new Error(R)}},M=()=>{o.value.user=null,g()},E=async()=>{var L;const m=((L=o.value.user)==null?void 0:L.token)||D();if(!m)return M(),!1;const P=`${p()}/comment/token/validate`;try{const S=await $fetch(P,{method:"POST",body:{token:m}});return!0}catch(S){return console.error("Token inválido:",S),M(),!1}}
2,k=async()=>{var L,S;const m=((L=o.value.user)==null?void 0:L.token)||D();if(!m)return console.error("No se puede refrescar el token: No hay token disponible."),M(),!1;const P=`${p()}/comment/token/refresh`;try{const R=await $fetch(P,{method:"POST",body:{token:m}});return s(R),!0}catch(R){console.error("Error al refrescar el token:",R);const oe=((S=R==null?void 0:R.data)==null?void 0:S.error)||"Error desconocido al refrescar el token.";return console.error(oe),M(),!1}},$=()=>o.value.user?!0:(alert("Inicia sesión para realizar esta acción."),!1),C=m=>{localStorage.setItem("comments_user_token",m)},D=()=>localStorage.getItem("comments_user_token"),g=()=>{localStorage.removeItem("comments_user_token")};return{commentsCard:o,updateFeedback:c,showPostComments:l,loadPostComments:_,createComment:b,insertFlashComment:m=>{const P=L=>{for(const S of L){if(S.id===m.parentId)return S.items.push(m),!0;if(S.items.length>0&&P(S.items))return!0}return!1};m.parentId===0?o.value.postComments.push(m):P(o.value.postComments)},editComment:x,updateFlashComment:(m,P)=>{const L=S=>{for(const R of S){if(R.id===m)return R.content=P,!0;if(R.items&&R.items.length>0&&L(R.items))return!0}return!1};L(o.value.postComments)},deleteComment:y,login:I,loginWithGoogle:h,register:f,resetPassword:r,changePassword:z,logout:M,validateToken:E,getToken:D,changeAlias:async m=>{var L;await E();const P=`${p()}/comment/user/alias`;try{await $fetch(P,{method:"POST",body:{token:o.value.user.token,alias:m,domain:a.value.site}}),await k(),await _(o.value.postId)}catch(S){const R=((L=S==null?void 0:S.data)==null?void 0:L.error)||"No se pudo cambiar el alias.";throw new Error(R)}}}},In={key:0,class:"social-share-buttons__item social-share-buttons__item--comments"},zn={class:"social-share-buttons__comments-icon-wrap"},Ln={class:"social-share-buttons__comments-count"},Sn={key:0,class:"social-share-buttons__comments-text"},An={class:"social-share-buttons__item"},Pn={class:"social-share-buttons__item"},En={class:"social-share-buttons__item social-share-buttons__item--mobile"},Dn={__name:"SocialShareButtons",props:{title:String,url:String,postId:Number,commentCount:Number,showComments:{type:Boolean,default:!0},showCommentsText:{typeo:Boolean,default:!0},inline:{type:Boolean,default:!1}},setup(o){const{registerGazEventAnalytics:a}=Bo(),{$isMobile:p}=fe(),{showPostComments:c}=at(),l=o,s=l.title,_=l.url,b=l.postId;function x(f){const r=p?"_blank":"_blank,scrollbars=0,resizable=1,menubar=0,left=100,top=100,width=550,height=440,toolbar=0,status=0";window.open(f,"_blank",p?"":r)}const y=()=>{navigator.share!==void 0&&navigator.share({title:s,url:_}).then(()=>console.log("Successful share")).catch(f=>console.log("Error sharing",f))},I=()=>{a("share");const f="https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(_);x(f)},h=()=>{a("share");const f=`https://twitter.com/intent/tweet?url=${encodeURIComponent(_)}&text=${s}`;x(f)};return(f,r)=>{const z=Ut,M=wn,E=go,k=ho;return n(),i("ul",{class:Z(["social-share-buttons",{"social-share-buttons--inline":o.inline}])},[o.showComments?(n(),i("li",In,[t("button",{class:"social-share-buttons__btn social-share-buttons__comments",onClick:r[0]||(r[0]=$=>e(c)(e(b))),"aria-label":"Comentar"},[t("span",zn,[t("span",Ln,B(l.commentCount>0?l.commentCount:""),1),T(z,{class:"social-share-buttons__icon social-share-buttons__icon--count"})]),o.showCommentsText?(n(),i("span",Sn,r[1]||(r[1]=[me("Comenta "),t("br",null,null,-1),me("la noticia")]))):w("",!0)])])):w("",!0),t("li",An,[t("button",{class:"social-share-buttons__btn",onClick:xe(I,["prevent"]),"aria-label":"Compartir en Facebook"},[T(M,{class:"social-share-buttons__icon social-share-buttons__icon--facebook"})])]),t("li",Pn,[t("button",{class:"social-share-buttons__btn",onClick:xe(h,["prevent"]),"aria-label":"Compartir en X"},[T(E,{class:"social-share-buttons__icon social-share-buttons__icon--x"})])]),t("li",En,[t("button",{class:"social-share-buttons__btn",onClick:xe(y,["prevent"]),"aria-label":"Compartir"},[T(k,{class:"social-share-buttons__icon social-share-buttons__icon--mobile-share"})])])],2)}}},ht=te(Dn,[["__scopeId","data-v-60109bb1"]]),Mn={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"};function On(o,a){return n(),i("svg",Mn,a[0]||(a[0]=[t("path",{d:"M25.996 48C13.313 48 2.992 37.684 2.992 25S13.313 2 25.996 2a22.96 22.96 0 0 1 15.492 5.996l.774.707-7.586 7.586-.703-.602a12.25 12.25 0 0 0-7.977-2.957c-6.766 0-12.274 5.504-12.274 12.27s5.508 12.27 12.274 12.27c4.879 0 8.734-2.492 10.55-6.738h-11.55V20.176l22.55.031.168.793c1.176 5.582.235 13.792-4.531 19.668C39.238 45.531 33.457 48 25.996 48"},null,-1)]))}const Vn={render(){return Pe(Ee,{icon:{render:On},name:"googleG"})}},Bn=["href","aria-label"],Hn={class:"google-preferences-banner__main"},Rn={class:"google-preferences-banner__icon-badge","aria-hidden":"true"},Gn={class:"google-preferences-banner__content"},Nn={class:"google-preferences-banner__title"},Fn={key:0,class:"google-preferences-banner__description"},Zt="google_preferences_banner_saved",Un={__name:"GooglePreferencesBanner",props:{title:{type:String,default:"Añádenos a tus favoritos en Google"},description:{type:String,default:"Así nos verás más en tus búsquedas"},source:{type:String,default:""},embedded:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1},hideOnMobile:{type:Boolean,default:!1}},setup(o){const a=o,p=ie("gazConfigData"),c=ie("isNewsPromotionCardVisible",()=>!1),l=ie("isGooglePreferencesBannerStored",()=>!1),s=ue("content",void 0),{$removeTrailingSlash:_}=fe(),b=V(()=>{var k,$;const E=(k=p.value)==null?void 0:k.url;if(E)try{return new URL(_(E)).hostname.replace(/^www\./,"")}catch{return E.replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/+$/,"")}return(($=p.value)==null?void 0:$.site)||""}),x=V(()=>`https://www.google.com/preferences/source?q=${encodeURIComponent(b.value)}`),y=p.value.site,I=no(!1),h=V(()=>{var E;return!!((E=s==null?void 0:s.data)!=null&&E.product)}),f=V(()=>(s==null?void 0:s.objectType)==="post"),r=V(()=>
2!h.value&&(a.embedded||!c.value)&&(a.persistent||I.value&&!l.value)),z=V(()=>{var E;return!a.embedded&&(s==null?void 0:s.objectType)==="post"&&!((E=s==null?void 0:s.data)!=null&&E.product)});ge(()=>{if(!a.persistent){try{l.value=localStorage.getItem(Zt)==="1"}catch{l.value=!1}I.value=!0}});const M=()=>{if(!a.persistent)try{localStorage.setItem(Zt,"1"),l.value=!0}catch{}};return(E,k)=>{const $=Vn;return n(),H(Ne,{name:"google-preferences-banner"},{default:re(()=>[e(r)?(n(),i("a",{key:0,href:e(x),class:Z(["google-preferences-banner",{"google-preferences-banner--embedded":o.embedded,"google-preferences-banner--compact":o.compact,"google-preferences-banner--floating-post":!o.embedded&&e(f),"google-preferences-banner--hidden-mobile":o.hideOnMobile,"google-preferences-banner--with-mobile-share":e(z)}]),target:"_blank",rel:"nofollow noopener noreferrer","aria-label":`Abrir preferencias de Google para ${e(y)}`,onClick:M},[k[0]||(k[0]=t("span",{class:"google-preferences-banner__accent","aria-hidden":"true"},null,-1)),t("span",Hn,[t("span",Rn,[T($,{class:"google-preferences-banner__icon google-preferences-banner__icon--google"})]),t("span",Gn,[t("strong",Nn,B(o.title),1),!o.compact&&o.description?(n(),i("span",Fn,B(o.description),1)):w("",!0)])])],10,Bn)):w("",!0)]),_:1})}}},qn=te(Un,[["__scopeId","data-v-9f09a373"]]),jn={class:"post-article-author"},Wn=["href"],Yn={key:1},Kn={__name:"Author",props:["author"],setup(o){const a=o;return(p,c)=>(n(),i("div",jn,[a.author.url?(n(),i("a",{key:0,rel:"author",href:a.author.url,class:"author"},B(a.author.name),9,Wn)):(n(),i("span",Yn,B(a.author.name),1))]))}},fo=te(Kn,[["__scopeId","data-v-d6946522"]]),Xn={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 22"};function Qn(o,a){return n(),i("svg",Xn,a[0]||(a[0]=[t("path",{fill:"#fff",d:"M22 2v13H10.357L6 18.105V15H2V2zm2-2H0v16.981h4V22l7-5.019h13z"},null,-1)]))}const qt={render(){return Pe(Ee,{icon:{render:Qn},name:"comments"})}},Jn=j(()=>W(()=>import("./BAgKNOPc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]),import.meta.url).then(o=>o.default||o)),Zn={key:0,class:"comments-button-wrapper"},es={class:"flex-center"},ts={__name:"ButtonWrapper",props:{isStaticPage:{type:Boolean,default:!1},comments:{type:Array,default:()=>[]},postId:{type:[Number,String],required:!0},commentCount:{type:[Number,String],default:0}},setup(o){const a=o,{showPostComments:p}=at(),c=V(()=>Number(a.commentCount)>0);return(l,s)=>{var x;const _=Jn,b=qt;return o.isStaticPage?w("",!0):(n(),i("div",Zn,[((x=o.comments)==null?void 0:x.length)>0?(n(),H(_,{key:0,comments:o.comments},null,8,["comments"])):w("",!0),t("div",es,[t("button",{class:"gaz-button gaz-button gaz-button--full-width",onClick:s[0]||(s[0]=y=>e(p)(o.postId))},[T(b,{class:"comments-button-wrapper__comments-icon"}),t("span",null,B(e(c)?"¡Únete a la conversación!":"Ver comentarios"),1)])])]))}}},vo=te(ts,[["__scopeId","data-v-4489cea4"]]),os=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),ns=j(()=>W(()=>import("./CYE6kOPq.js"),__vite__mapDeps([26,5,3,4,6,27]),import.meta.url).then(o=>o.default||o)),ss={class:"sidebar"},as={key:0,class:"sidebar__item sidebar__item--ad"},rs={key:1,class:"sidebar__item sidebar__item--ad sidebar__item--sticky"},is=["innerHTML"],ls={key:3,class:Z(["sidebar__item","sidebar__item--ad"])},cs={__name:"Sidebar",props:["content","adTarget","termId","postType","objectType"],setup(o){const a=ie("gazConfigData"),{$isDesktop:p}=fe(),c=wt(),l=o,s=G([]),_=V(()=>l.postType!==void 0),x=V(()=>Array.isArray(l.content)&&l.content.some(r=>{var z;return(z=r==null?void 0:r.content)==null?void 0:z.html})),y=V(()=>Array.isArray(s.value)&&s.value.length>0),I=V(()=>_.value&&y.value),h=V(()=>{const r=[];return r.push("roba1"),I.value&&r.push("trending"),x.value&&r.push("content"),r.push("roba2"),r.push("roba1_sticky"),r});ge(()=>{_.value&&f()});const f=async()=>{const r=Ko();try{let z=`${c.public.gazPromotionsEndpoint}/trending/${a.value.site}/${l.postType}/${l.termId}?country=${r.value}`;c.public.gazEnviroment==="development"&&(z=`${z}&env=dev`);const E=await(await fetch(z)).json();let k=Array.isArray(E)?E:[];s.value=k}catch(z){console.error("Error fetching data:",z),s.value=[]}};return(r,z)=>{const M=_o,E=os,k=ns,$=Ht;return n(),i("aside",ss,[(n(!0),i(U,null,K(e(h),C=>(n(),i(U,{key:C},[C==="roba1"?(n(),i("section",as,[T(M,{"format-i-d":e(ee).roba1,target:l.adTarget,device:"desktop","meta-key":"post_0"},null,8,["format-i-d","target"])])):w("",!0),C==="roba1_sticky"?(n(),i("section",rs,[T(M,{"format-i-d":e(ee).roba1,target:l.adTarget,device:"desktop","meta-key":"post_1"},null,8,["format-i-d","target"])])):w("",!0),C==="content"?(n(!0),i(U,{key:2},K(l.content,(D,g)=>(n(),i(U,{key:g},[D.content&&D.content.html?(n(),i("section",{key:0,class:Z(["sidebar__item",{"sidebar__item--html":D.content.html}]),innerHTML:D.content.html},null,10,is)):w("",!0)],64))),128)):w("",!0),C==="roba2"?(n(),i("section",ls,[T(E,{"format-i-d":e(ee).roba2,target:l.adTarget,device:"desktop"},null,8,["format-i-d","target"])])):w("",!0),C==="trending"?(n(),H($,{key:4},{default:re(()=>[T(k,{title:"Tendencias",content:e(s),type:"vertical",showArticleTerm:!1,class:Z(["sidebar__item sidebar__item--trending-posts"])},null,8,["content"])]),_:1})):w("",!0)],64))),128))])}}},jt=te(cs,[["__scopeId","data-v-2da71fa1"]]);function It(){us(),_s(),gs(),ps(),ms()}const ut=(o,a,p="text/javascript")=>{console.log(`>> Injecting script ${o}Script`),Ct({script:[{id:`${o}Script`,src:a,type:p}]})};function ds(){document.querySelectorAll(".video-embed-container.playing").forEach(a=>{const p=a.querySelector("lite-youtube"),c=p.shadowRoot.querySelector("iframe");c.contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo"}),"*"),a.classList.remove("playing");
2let l=document.createElement("span");l.className="video-layer",a.appendChild(l),l.addEventListener("click",function(){bo(c,p)})})}function bo(o,a){const p=a.parentElement,c=a.getAttribute("videoid"),l=document.getElementById(`glo-${c}`);l&&l.remove();const s=p.querySelector(".video-layer");s&&s.remove(),ds(),o.contentWindow.postMessage(JSON.stringify({event:"command",func:"playVideo"}),"*"),p.classList.add("playing")}function us(){const o={root:null,rootMargin:"-100px",threshold:0},a=new IntersectionObserver(c=>{c.forEach(l=>{l.isIntersecting&&(document.getElementById("swipeScript")===null&&document.querySelector(".gallery.swipe")!==null&&ut("swipe","/js/swipe.min.js"),document.getElementById("instagramScript")===null&&document.querySelector("blockquote.instagram-media")!==null&&ut("instagram","https://www.instagram.com/embed.js"),document.getElementById("tiktokScript")===null&&document.querySelector("blockquote.tiktok-embed")!==null&&ut("tiktok","https://www.tiktok.com/embed.js"),document.getElementById("redditScript")===null&&document.querySelector("blockquote.reddit-embed-bq")!==null&&ut("reddit","https://embed.reddit.com/widgets.js"),document.querySelector("lite-youtube")!==null&&document.getElementById("liteYoutubeScript")===null&&(ut("liteYoutube","/js/lite-youtube.js","module"),document.addEventListener("liteYoutubeIframeLoaded",s=>{const _=s.target,b=_.shadowRoot.querySelector("iframe");b.addEventListener("load",()=>{_.parentElement.classList.add("loaded"),bo(b,_)})},!1)))})},o);document.querySelectorAll(".post-article__entry-content").forEach(c=>{a.observe(c)})}function _s(){const o={root:null,rootMargin:"0px",threshold:0},a=new IntersectionObserver(c=>{c.forEach(l=>{if(l.isIntersecting){let s=l.target;window.mySwipe=new Swipe(s,{startSlide:0,auto:0,draggable:!0,autoRestart:!1,continuous:!0,disableScroll:!0,stopPropagation:!1,callback:function(x,y){let I=s.getElementsByClassName("progress-dots")[0];for(let h=0;h<I.childNodes.length;h++){let f=I.childNodes[h];f.classList.remove("active"),h===x&&f.classList.add("active")}},transitionEnd:function(x,y){}});let _=s.getElementsByClassName("swipe-prev")[0],b=s.getElementsByClassName("swipe-next")[0];_&&b&&(_.onclick=mySwipe.prev,b.onclick=mySwipe.next),a.unobserve(s)}})},o);document.querySelectorAll(".gallery").forEach(c=>{a.observe(c)})}function yo(o,a,p,c,l){let s="";s+=`<div data-itemtype='product' class="affiliate-button-item affiliate-button-item--${l}">
3    <div class="affiliate-button-item__image affiliate-button-item__image">`,o.images?o.images.forEach(function(x){var y=x.url;s+=` <img width='200' height='200' src="${y}" alt="" loading="lazy">`}):s+=` <img width='200' height='200' src="${o.image}" alt="" loading="lazy">`,s+='</div><div class="affiliate-button-item__content">',a||(a=o.title),s+=`<div class="affiliate-button-item__title">${a}</div>`;let _=Number(o.price).toLocaleString("es-ES");c&&(_=Number(c.replace(",",".")).toLocaleString("es-ES"));const b=Number(o.original_price).toLocaleString("es-ES");return o.price>0&&(s+=`<div class="affiliate-button-item__price-wrapper">
4            <div class="affiliate-button-item__price">${_} ${o.currency}</div>`,o.original_price&&(s+=`<span class='affiliate-button-item__old-price'>${b} ${o.currency}</span>`),s+="</div>"),o.prime&&(s+=`<div class="affiliate-button-item__prime">
5            <img loading="lazy" width="65" height="19" src="/imgs/shortcodes/affiliates/prime-logo.png" alt="${l} Logo">
6        </div>`),s+=`<a href="${p}" target="_blank" class="affiliate-button-item__link affiliate-button-item__link--${l} gaz-button" rel="noopener sponsored">Ver oferta</a>
7    </div>
8    <div class="affiliate-button-item__logo affiliate-button-item__logo--${l}">
9        <img src="/imgs/shortcodes/affiliates/${l}.png" alt="${l} logo">
10    </div>
11    </div>`,s}function ps(){const o=wt(),a={root:null,rootMargin:"0px",threshold:0},p=new IntersectionObserver(l=>{l.forEach(s=>{if(s.isIntersecting){let _=s.target;if(_.hasChildNodes())return!1;const b=_.getAttribute("data-asin"),x=_.getAttribute("data-url");let y=_.getAttribute("data-title");const I=_.getAttribute("data-price");fetch(`${o.public.gazProductsEndpoint}/amzn/${b}?${location.origin}/`,{method:"GET"}).then(h=>h.json()).then(h=>
11{_.hasChildNodes()||_.insertAdjacentHTML("beforeend",yo(h,y,x,I,"amazon"))}).catch(()=>{_.remove()}),p.unobserve(_)}})},a),c=document.querySelectorAll(".amazon-button");c&&c.forEach(l=>{p.observe(l)})}function ms(){const o=wt(),a={root:null,rootMargin:"0px",threshold:0},p=new IntersectionObserver(l=>{l.forEach(s=>{if(s.isIntersecting){let _=s.target;if(_.hasChildNodes())return!1;const b=_.getAttribute("data-id"),x=_.getAttribute("data-awid");let y=_.getAttribute("data-title");const I=_.getAttribute("data-price");fetch(`${o.public.gazProductsEndpoint}/awin/${b}?${location.origin}/`,{method:"GET"}).then(h=>h.json()).then(h=>{const f=`https://www.awin1.com/pclick.php?p=${h.aw_product_id}&a=${x}&m=${h.affiliate_id}`,r=h.affiliate.replace(/\s+/g,"_").toLowerCase();_.insertAdjacentHTML("beforeend",yo(h,y,f,I,r))}).catch(()=>{_.remove()}),p.unobserve(_)}})},a),c=document.querySelectorAll(".affiliate-button");c&&c.forEach(l=>{p.observe(l)})}function gs(){const o=new IntersectionObserver(p=>{p.forEach(c=>{c.isIntersecting&&(c.target.style.backgroundImage="url('"+c.target.getAttribute("data-bg")+"')",c.target.classList.add("bg-visible"),o.unobserve(c.target))})},{});[].slice.call(document.querySelectorAll(".lazy-background:not(.bg-visible)")).forEach(p=>{o.observe(p)})}function Wt(o){let a=Xo(),p=Rt();a.value[o.postId]=o;const c={root:null,threshold:0},l=new IntersectionObserver(_=>{_.forEach(b=>{if(b.isIntersecting){const x=b.target.id.split("-")[1],y=a.value[x];if(y&&p.value.postId!==y.postId){p.value=y;const I=new URL(y.url,window.location.origin),h=I.pathname+I.search+I.hash;window.history.pushState({infCurrentRoute:h},"",h)}}})},c);document.querySelectorAll(".post-article__content").forEach(_=>{l.observe(_)})}function $o(o,a=!1,p=!1){const c=ie("gazConfigData"),{$getMimeType:l,$removeTrailingSlash:s}=fe(),_={title:o.seoTitle,description:o.seoDescription,robots:o.robotsNoIndex||a?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",articleModifiedTime:o.updated,ogUrl:o.url,ogTitle:o.title,ogDescription:o.seoDescription,ogLocale:"es_ES",ogSiteName:c.value.name,ogType:p?"website":"article",twitterCard:"summary_large_image",twitterSite:c.value.t
11witterSite,twitterTitle:o.seoTitle,twitterDescription:o.seoDescription};return o.heroImage&&(_.ogImage=o.heroImage.url,_.ogImageWidth=o.heroImage.width,_.ogImageHeight=o.heroImage.height,_.ogImageType=l(o.heroImage.url),_.twitterImage=o.heroImage.url),_}const hs=j(()=>W(()=>import("./CyJ5BTR0.js"),__vite__mapDeps([28,3,4,29]),import.meta.url).then(o=>o.default||o)),fs=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),vs=j(()=>W(()=>import("./CzjyQh7Q.js"),__vite__mapDeps([30,31,3,4,32,18,5,6,19,7,8,9,10,11,12,13,14,15,16,17,20,21,33]),import.meta.url).then(o=>o.default||o)),bs=j(()=>W(()=>import("./Bo0MZzyw.js"),__vite__mapDeps([34,3,4,35]),import.meta.url).then(o=>o.default||o)),ys=j(()=>W(()=>import("./BhE0VErf.js"),__vite__mapDeps([36,3,4,37]),import.meta.url).then(o=>o.default||o)),$s=j(()=>W(()=>import("./DyezePKG.js"),__vite__mapDeps([38,3,4,39]),import.meta.url).then(o=>o.default||o)),ws=j(()=>W(()=>import("./ldfEloh-.js"),__vite__mapDeps([40,3,4,41]),import.meta.url).then(o=>o.default||o)),Cs=["id"],ks={key:0,class:"post-article__review-score"},Ts=["innerHTML"],xs={key:0},Is=["srcset","width","height"],zs=["srcset"],Ls=["src","alt"],Ss={class:"post-article__body"},As={key:0,class:"post-article__share-col"},Ps={class:"post-article__content-wrapper"},Es={key:0,class:"post-article__mobile-meta"},Ds={class:"post-article__mobile-meta-actions"},Ms={class:"post-article__meta-comments-icon-wrap"},Os={class:"post-article__meta-comments-count"},Vs={class:"post-article__mobile-meta-info"},Bs={class:"post-article__meta-author"},Hs=["datetime"],Rs={key:1,class:"post-article__meta"},Gs={class:"post-article__meta-author"},Ns=["datetime"],Fs={class:"post-article__meta-comments"},Us={class:"post-article__meta-comments-icon-wrap"},qs={class:"post-article__meta-comments-count"},js=["id"],Ws=["innerHTML"],Ys={class:"post-article__entry-content"},Ks=["innerHTML"],Xs=["innerHTML"],Qs=["innerHTML"],Js={class:"post-article__footer"},Zs={__name:"Post",props:{contentData:{type:Object,required:!0},isFirst:{type:Boolean,required:!1,default:!0},previewMode:{type:Boolean,required:!1,default:!1}},setup(o){var f,r,z,M,E;ie("gazConfigData");const{showPostComments:a}=at(),{addPixel:p}=uo(),{getPostDate:c}=Tt(),l=o,s=l.contentData.data||l.contentData,_=l.contentData.sidebar,b=(f=l.contentData)==null?void 0:f.termId,x=(r=l.contentData)==null?void 0:r.postTypeName,y=((M=(z=s.categories)==null?void 0:z[0])==null?void 0:M.name)||((E=l.contentData)==null?void 0:E.postTypeLabel)||"",I=l.contentData.view,h=l.contentData.postTypeName==="static-pages";return ge(()=>{l.previewMode||Wt(s),It(),p(!!s.postPixel,s.postPixel||""),setTimeout(()=>{st()},100)}),(k,$)=>{var ve,be,le,ce;const C=hs,D=Oe,g=Bt,A=Ft,F=ht,u=Ut,m=qn,P=fo,L=fs,S=vs,R=bs,oe=ys,se=vo,ne=$s,O=ws,de=jt;return n(),i("div",null,[l.isFirst?w("",!0):(n(),H(C,{key:0,category:e(y)},null,8,["category"])),t("article",{id:`post-${e(s).postId}`,class:Z(["post-article",`post-article--${e(I)}`,{"post-article--with-separator":!l.isFirst,"post-article--no-hero":!e(s).heroImage}]),"data-test":"post-template"},[h?w("",!0):(n(),H(D,{key:0,crums:e(s).breadcrumb},null,8,["crums"])),h?w("",!0):(n(),H(g,{key:1,categories:e(s).categories},null,8,["categories"])),t("div",{class:Z(["post-article__heading",{"post-article__heading--has-review-score":(ve=e(s).review)==null?void 0:ve.product_rating}])},[(be=e(s).review)!=null&&be.product_rating?(n(),i("div",ks,B(e(s).review.product_rating),1)):w("",!0),t("h1",{class:"post-article__title heading heading--xxl",innerHTML:e(s).title},null,8,Ts)],2),e(s).heroImage||e(s).openingVideo?(n(),i("div",{key:2,class:Z(["post-article__base-image",{"post-article__base-image--has-video":e(s).openingVideo}])},[e(s).openingVideo?(n(),H(A,{key:0,videoUrl:e(s).openingVideo},null,8,["videoUrl"])):w("",!0),t("figure",null,[e(s).heroImage?(n(),i("picture",xs,[t("source",{media:"(min-width: 1024px)",srcset:`${e(s).heroImage.url}?quality=80`,width:e(s).heroImage.width,height:e(s).heroImage.height},null,8,Is),t("source",{media:"(min-width: 501px)",srcset:`${e(s).heroImage.url}?x=800&y=470&quality=80`,width:"800",height:"470"},null,8,zs),t("img",{decoding:"async",fetchpriority:"high",loading:"eager",width:"500",height:"295",src:`${e(s).heroImage.url}?x=500&y=295&quality=80`,alt:e(s).heroImage.alt},null,8,Ls)])):w("",!0),(le=e(s).heroImage)!=null&&le.caption?(n(),i("figcaption",{key:1,class:"post-article__base-image-image-caption",style:Ue({maxWidth:`${e(s).heroImage.width}px`})},B(e(s).heroImage.caption),5)):w("",!0)])],2)):w("",!0),t("div",Ss,[t("div",{class:Z(["post-article__grid",{"post-article__grid--static-page":h}])}
11,[h?w("",!0):(n(),i("div",As,[T(F,{class:"post-article__social-share",title:e(s).title,url:e(s).canonical,postId:e(s).postId,commentCount:e(s).commentCount},null,8,["title","url","postId","commentCount"])])),t("div",Ps,[h?w("",!0):(n(),i("div",Es,[t("div",Ds,[t("button",{class:"post-article__meta-comments-btn",onClick:$[0]||($[0]=we=>e(a)(e(s).postId)),"aria-label":"Comentar"},[t("span",Ms,[t("span",Os,B(e(s).commentCount>0?e(s).commentCount:""),1),T(u,{class:"social-share-buttons__icon social-share-buttons__icon--count"})]),$[2]||($[2]=t("span",{class:"post-article__meta-comments-text"},[me("Comenta la"),t("br",{class:"post-article__meta-comments-mobile-break"}),me(" noticia")],-1))]),T(m,{class:"post-article__mobile-google-preferences",title:"Síguenos en Google",embedded:"",compact:"",persistent:""})]),t("div",Vs,[t("div",Bs,[e(s).author?(n(),H(P,{key:0,author:e(s).author},null,8,["author"])):w("",!0),t("time",{class:"post-article__pubdate publication-date",datetime:e(c)(e(s),!1)},B(e(c)(e(s),!0)),9,Hs)]),T(F,{class:"post-article__mobile-social-share",title:e(s).title,url:e(s).canonical,postId:e(s).postId,commentCount:e(s).commentCount,showComments:!1,inline:""},null,8,["title","url","postId","commentCount"])])])),h?w("",!0):(n(),i("div",Rs,[t("div",Gs,[e(s).author?(n(),H(P,{key:0,author:e(s).author},null,8,["author"])):w("",!0),t("time",{class:"post-article__pubdate publication-date",datetime:e(c)(e(s),!1)},B(e(c)(e(s),!0)),9,Ns)]),t("div",Fs,[T(m,{class:"post-article__google-preferences",title:"Síguenos en Google",embedded:"",compact:"",persistent:""}),t("button",{class:"post-article__meta-comments-btn",onClick:$[1]||($[1]=we=>e(a)(e(s).postId)),"aria-label":"Comentar"},[t("span",Us,[t("span",qs,B(e(s).commentCount>0?e(s).commentCount:""),1),T(u,{class:"social-share-buttons__icon social-share-buttons__icon--count"})]),$[3]||($[3]=t("span",{class:"post-article__meta-comments-text"},[me("Comenta la"),t("br",{class:"post-article__meta-comments-mobile-break"}),me(" noticia")],-1))])])])),t("div",{class:"post-article__content",id:`postContent-${e(s).postId}`},[t("div",{class:"post-article__excerpt",innerHTML:e(s).excerpt},null,8,Ws),h?w("",!0):(n(),H(L,{key:0,"format-i-d":e(ee).roba1,target:e(s).adsTarget,device:"mobile"},null,8,["format-i-d","target"])),t("div",Ys,[t("span",{innerHTML:e(s).preAd},null,8,Ks),h?w("",!0):(n(),H(L,{key:0,"format-i-d":e(ee).roba2,target:e(s).adsTarget,device:"mobile"},null,8,["format-i-d","target"])),t("span",{innerHTML:e(s).postAd},null,8,Xs),h?w("",!0):(n(),H(L,{key:1,"format-i-d":e(ee).roba3,target:e(s).adsTarget,device:"mobile"},null,8,["format-i-d","target"])),t("span",{innerHTML:e(s).lateAd},null,8,Qs),h?w("",!0):(n(),H(L,{key:2,"format-i-d":e(ee).roba4,target:e(s).adsTarget,device:"mobile"},null,8,["format-i-d","target"])),e(s).review?(n(),H(S,{key:3,post:e(s)},null,8,["post"])):w("",!0),e(s).best&&e(s).best.length>0?(n(),H(R,{key:4,bestProducts:e(s).best},null,8,["bestProducts"])):w("",!0)]),t("footer",Js,[e(s).sources||e(s).via?(n(),H(oe,{key:0,sources:e(s).sources,vias:e(s).via},null,8,["sources","vias"])):w("",!0),T(se,{isStaticPage:h,comments:e(s).comments,postId:e(s).postId,commentCount:e(s).commentCount},null,8,["comments","postId","commentCount"]),(n(!0),i(U,null,K(e(_),(we,he)=>(n(),i(U,{key:`post-seo-links-${he}`},[Array.isArray(we.content)?(n(),H(ne,{key:0,title:we.title,content:we.content},null,8,["title","content"])):w("",!0)],64))),128)),h?w("",!0):(n(),H(L,{key:1,class:"post-article__last-desktop-ad","format-i-d":e(ee).roba3,target:e(s).adsTarget,device:"desktop"},null,8,["format-i-d","target"])),(ce=e(s).author)!=null&&ce.bio&&!h?(n(),H(O,{key:2,authorData:e(s).author},null,8,["authorData"])):w("",!0),h?w("",!0):(n(),H(L,{key:3,"format-i-d":e(ee).mobileBottom,target:e(s).adsTarget,device:"mobile"},null,8,["format-i-d","target"]))])],8,js)])],2)]),e(I)!=="full-width"?(n(),H(de,{key:3,termId:e(b),postType:e(x),content:e(_),adTarget:e(s).adsTarget,objectType:"post"},null,8,["termId","postType","content","adTarget"])):w("",!0)],10,Cs)])}}},wo=te(Zs,[["__scopeId","data-v-ade4ee39"]]),Co=()=>{const o=ie("gazConfigData"),a=Qo(),p=Jo(),{$isMobile:c}=fe();return{trackByPost:(s=null)=>{var x;if(typeof window>"u"||!s)return;const _=s!=null&&s.created?new Date(s.created).toISOString().split("T")[0]:"",b={page_title:s.title,page_location:window.location.href,page_path:window.location.pathname,hora:new Date().getHours(),dimension1:((x=s==null?void 0:s.author)==null?void 0:x.name)||"",dimension2:_,dimension3:c?"gaz_mobile":"gaz_desktop"};typeof window.gtag=="function"?window.gtag("event","page_view",b):console.warn("gtag is not defined. Unable to track page view."),p.value&&window.COMSCORE&&typeof window.COMSCORE.beacon=="function"&&window.COMSCORE.beacon({c1:"2",c2:o.value.comscore,cs_ucfr:a.value})}}},ea=j(()=>W(()=>import("./B2nwOw4G.js"),__vite__mapDeps([42,3,4,11,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,43]),import.meta.url).then(o=>o.default||o)),ta=j(()=>W(()=>import("./DbsV9yor.js"),__vite__mapDeps([44,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,45]),import.meta.url).then(o=>o.default||o)),oa=j(()=>W(()=>import("./DIQqbBSw.js"),__vite__mapDeps([46,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,47]),import.meta.url).then(o=>o.default||o)),na=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),sa=j(()=>W(()=>import("./6FVOGlyJ.js"),__vite__mapDeps([51,3,4,5,6,11,52]),import.meta.url).then(o=>o.default||o).then(o=>po(o))),aa=j(()=>W(()=>import("./BXU4-f35.js"),__vite__mapDeps([53,3,4,5,6,54]),import.meta.url).then(o=>o.default||o).then(o=>po(o))),ra=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),ia={class:"infinite-wrapper"},la={__name:"Wrapper",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){const{$isMobile:a,$isDesktop:p}=fe(),c=o,l=ue("content"),s=l.data,_=Ve(),b=ie("gazConfigData"),{$resolveGazApiEndpoint:x}=fe(),{commentsCard:y}=at(),I=Rt(),{trackByPost:h}=Co(),f=G(!1),r=V(()=>{var g;return{postID:((g=I.value)==null?void 0:g.postId)||s.postId}});let z=G(void 0),M=G([]),E=G(1);M.value.push(l),z.value=s.postId;const k=async()=>{const D=`${x()}/post/infinite/${b.value.site}/${z.value}/${E.value}/1`;try{const g=await $fetch(D);M.value=[...M.value,...g],E.value=E.value+1}catch(g){console.error("Error fetching data:",g)}};ge(()=>{l.infinite&&!c.previewMode&&new IntersectionObserver(g=>{g.forEach(A=>{A.isIntersecting&&k()})},{}).observe(document.getElementById("observer-lazy-load-post"))});const $=()=>{y.value.isVisible=!1,y.value.postId=void 0},C=D=>{I.value.commentCount=D};return nt(I,D=>{if(D!=null&&D.postId){if(!f.value){f.value=!0;return}De($o(D,c.previewMode)),Ct({link:[{rel:"canonical",href:D.canonical}]}),h(D)}}),(D,g)=>{const A=ea,F=wo,u=ta,m=oa,P=na,L=sa,S=aa,R=Ht,oe=ra;return n(),i("div",ia,[T(A),(n(!0),i(U,null,K(e(M),(se,ne)=>(n(),H(F,{contentData:se,isFirst:ne===0,previewMode:o.previewMode},null,8,["contentData","isFirst","previewMode"]))),256)),g[0]||(g[0]=t("div",{id:"observer-lazy-load-post"},null,-1)),T(P,{title:e(I).title,isVisible:e(y).isVisible,feedback:e(y).feedback,isLoading:e(y).isLoading,onClose:$},{header:re(()=>[T(u)]),default:re(()=>[T(m,{onCommentCreated:C})]),_:1},8,["title","isVisible","feedback","isLoading"]),e(l).postTypeName!=="static-pages"?(n(),H(R,{key:0},{default:re(()=>[e(p)?(n(),H(L,{key:0})):w("",!0),e(a)?(n(),H(S,{key:1})):w("",!0)]),_:1})):w("",!0),e(_)?(n(),H(oe,{key:e(r).postID,data:e(r)},null,8,["data"])):w("",!0)])}}},ca=["src"],da=["src"],ua=1352,_a=430,eo=200,to=150,pa={__name:"PromoBanner",props:["data"],setup(o){return(a,p)=>(n(),i("div",{class:Z(["term-promo-banner",{"term-promo-banner--has-no-mobile":!o.data.imageMobile,"term-promo-banner--has-no-desktop":!o.data.imageDesktop}]),style:Ue({"--img-mobile-height":`${to}px`,"--img-desktop-height":`${eo}px`})},[(n(),H(kt(o.data.imageLink?"a":"div"),{href:o.data.imageLink||void 0,target:o.data.imageLink||null,rel:o.data.imageLink||null,class:"term-promo-banner__link"},{default:re(()=>[o.data.imageDesktop?(n(),i("img",{key:0,class:"term-promo-banner__img term-promo-banner__img--desktop",src:o.data.imageDesktop,width:ua,height:eo,alt:"Imagen promocional"},null,8,ca)):w("",!0),o.data.imageMobile?(n(),i("img",{key:1,class:"term-promo-banner__img term-promo-banner__img--mobile",src:o.data.imageMobile,width:_a,height:to,alt:"Imagen promocional"},null,8,da)):w("",!0)]),_:1},8,["href","target","rel"]))],6))}},ma=te(pa,[["__scopeId","data-v-af043111"]]),ga={key:0,class:"paginator","aria-label":"Paginacion"},ha=["href"],fa={key:1,class:"paginator__arrow paginator__arrow--left paginator__arrow--disabled","aria-hidden":"true"},va={class:"paginator__list"},ba={key:0,class:"paginator__ellipsis","aria-hidden":"true"},ya=["aria-current"],$a=["href","aria-label"],wa=["href"],Ca={key:3,class:"paginator__arrow paginator__arrow--right paginator__arrow--disabled","aria-hidden":"true"},ka={__name:"Paginator",props:{data:{type:Object,default:()=>({currentPage:1,pages:1,recordsPerPage:50})},url:{type:String,default:null}},setup(o){const a=o,p=(h,f=1)=>{const r=Number.parseInt(h,10);return Number.isFinite(r)&&r>0?r:f},c=V(()=>{var h;return p((h=a.data)==null?void 0:h.pages,1)}),l=V(()=>{var h;return Math.min(p((h=a.data)==null?void 0:h.currentPage,1),c.value)}),s=V(()=>l.value>1),_=V(()=>l.value<c.value),b=V(()=>typeof a.url=="string"&&a.url.trim().length>0),x=V(()=>{const h=(a.url||"").trim();if(!h)return{basePath:"",query:"",hash:""};const f=h.indexOf("#"),r=f>=0?h.slice(f):"",z=f>=0?h.slice(0,f):h,M=z.indexOf("?"),E=M>=0?z.slice(M):"",$=(M>=0?z.slice(0,M):z).replace(/\/+$/,""),C=new RegExp(`/${l.value}/?$`);let D=l.value>1?$.replace(C,""):$;return D||(D="/"),{basePath:D,query:E,hash:r}}),y=h=>{const f=p(h,1),{basePath:r,query:z,hash:M}=x.value;return r?f<=1?`${r}${z}${M}`:`${r==="/"?"":r}/${f}/${z}${M}`:""},I=V(()=>{const h=c.value,f=l.value;if(h<=9)return Array.from({length:h},(E,k)=>({type:"page",page:k+1,key:`page-${k+1}`}));let r=Math.max(2,f-2),z=Math.min(h-1,f+2);f<=4?(r=2,z=6):f>
11=h-3&&(r=h-5,z=h-1);const M=[{type:"page",page:1,key:"page-1"}];r>2&&M.push({type:"ellipsis",key:"ellipsis-left"});for(let E=r;E<=z;E+=1)M.push({type:"page",page:E,key:`page-${E}`});return z<h-1&&M.push({type:"ellipsis",key:"ellipsis-right"}),M.push({type:"page",page:h,key:`page-${h}`}),M});return(h,f)=>e(c)>1?(n(),i("nav",ga,[e(s)&&e(b)?(n(),i("a",{key:0,href:y(e(l)-1),class:"paginator__arrow paginator__arrow--left","aria-label":"Pagina anterior"},f[0]||(f[0]=[t("span",{class:"paginator__arrow-top"},null,-1),t("span",{class:"paginator__arrow-bottom"},null,-1)]),8,ha)):(n(),i("span",fa,f[1]||(f[1]=[t("span",{class:"paginator__arrow-top"},null,-1),t("span",{class:"paginator__arrow-bottom"},null,-1)]))),t("ol",va,[(n(!0),i(U,null,K(e(I),r=>(n(),i("li",{key:r.key,class:"paginator__item"},[r.type==="ellipsis"?(n(),i("span",ba,"...")):r.page===e(l)||!e(b)?(n(),i("span",{key:1,class:Z(["paginator__page",{"paginator__page--active":r.page===e(l)}]),"aria-current":r.page===e(l)?"page":void 0},B(r.page),11,ya)):(n(),i("a",{key:2,href:y(r.page),class:"paginator__page","aria-label":`Ir a pagina ${r.page}`},B(r.page),9,$a))]))),128))]),e(_)&&e(b)?(n(),i("a",{key:2,href:y(e(l)+1),class:"paginator__arrow paginator__arrow--right","aria-label":"Pagina siguiente"},f[2]||(f[2]=[t("span",{class:"paginator__arrow-top"},null,-1),t("span",{class:"paginator__arrow-bottom"},null,-1)]),8,wa)):(n(),i("span",Ca,f[3]||(f[3]=[t("span",{class:"paginator__arrow-top"},null,-1),t("span",{class:"paginator__arrow-bottom"},null,-1)])))])):w("",!0)}},Ta=te(ka,[["__scopeId","data-v-8c5018fa"]]),xa=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),Ia=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),za={key:0,class:"term-page","data-test":"category-template"},La={class:"term-page__header"},Sa={class:"term-page__title section-title"},Aa={class:"term-page__body"},Pa={class:"term-page__content"},Ea={class:"term-page__excerpt"},Da=["innerHTML"],Ma={class:"term-page__post-list"},Oa={key:0,class:"term-page__ad"},Va={__name:"Category",async setup(o){let a,p;const c=ie("gazConfigData"),{$resolveGazApiEndpoint:l,$removeTrailingSlash:s,$gazApiFetch:_}=fe(),b=Ve(),x=ue("content"),y=V(()=>x.dataType==="postType"),I=x.objectType,h=x.data,f=x.sidebar,r=h.termId,z=h.postType,M=x.pagination,E=G(0),k=[ee.roba1,ee.roba2,ee.roba3],$=G(1),C=G([]);ge(()=>{setTimeout(()=>{st()},100)});const D=h.url;De({title:h.seoTitle,description:h.seoDescription,robots:h.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:D,ogType:"website",ogTitle:h.seoTitle,ogDescription:h.seoDescription,ogLocale:"es_ES",ogSiteName:c.value.name,twitterCard:"summary_large_image",twitterSite:c.value.t
11witterSite,twitterTitle:h.seoTitle,twitterDescription:h.seoDescription,twitterDomain:c.value.site});const g=S=>{E.value=S.length,C.value=[...C.value,...S],$.value=$.value+1,setTimeout(()=>{st()},100)},A=x.dataType==="category"?"category":"post-type",{isFetching:F,data:u,error:m}=([a,p]=mt(()=>xt(`${l()}/${A}/post/${c.value.site}/${r}/${M.currentPage}/${M.recordsPerPage}`,{key:r.toString(),$fetch:_},"$tV6g-phy8H")),a=await a,p(),a),P=V(()=>Array.isArray(u.value)?u.value:[]);if(m.value)throw $t({statusCode:m.value.statusCode,statusMessage:"Se ha producido un error"});const L={content:P.value.slice(0,5),order:1,options:{areaType:"bottom",featuredArticleType:"x-large-reverse",articleCardType:"small"},type:"cascade"};return L.options=y.value?{areaType:"bottom",articleCardType:"small",featuredArticleType:"x-large-reverse"}:{areaType:"right",articleCardType:"small"},y.value||(L.format="carousel_dos"),g(P.value),ge(()=>{}),(S,R)=>{const oe=Oe,se=ma,ne=on,O=tn,de=gt,ve=xa,be=Ta,le=jt,ce=Ia;return e(F)?w("",!0):(n(),i("div",za,[t("div",La,[T(oe,{crums:e(h).breadcrumb,currentTitle:e(h).name},null,8,["crums","currentTitle"]),t("h1",Sa,B(e(h).name),1),e(h).imageDesktop||e(h).imageMobile?(n(),H(se,{key:0,data:e(h)},null,8,["data"])):w("",!0),L.content.length>0?(n(),H(ne,{key:1,content:L})):w("",!0)]),t("div",Aa,[t("div",Pa,[t("div",Ea,[e(h).featuredCategories?(n(),H(O,{key:0,class:"term-page__cloud-tags",tags:e(h).featuredCategories},null,8,["tags"])):w("",!0),t("span",{innerHTML:e(h).description},null,8,Da)]),t("div",Ma,[(n(!0),i(U,null,K(e(C).slice(5),(we,he)=>(n(),i(U,null,[T(de,{post:we,"show-summary":!0,imageCropParams:{x:398,y:223},summaryLineClamp:8},null,8,["post"]),(he+1)%e(E)===0?(n(),i("div",Oa,[T(ve,{"format-i-d":k[he%k.length],target:e(h).adsTarget,device:"mobile"},null,8,["format-i-d","target"])])):w("",!0)],64))),256)),R[0]||(R[0]=t("div",{id:"observer-lazy-load-term"},null,-1))]),e(M)&&Number(e(M).pages)>1?(n(),H(be,{key:0,data:e(M),url:e(h).url},null,8,["data","url"])):w("",!0)]),T(le,{class:"term-page__sidebar",termId:e(r),postType:e(z),objectType:e(I),content:e(f),adTarget:e(h).adsTarget},null,8,["termId","postType","objectType","content","adTarget"])]),e(b)&&e(x).dataType==="category"?(n(),H(ce,{key:0,data:{termID:e(h).termId}},null,8,["data"])):w("",!0)]))}}},Ba=te(Va,[["__scopeId","data-v-dbc7d07d"]]),Ha={class:"author-page","data-test":"author-template"},Ra={class:"author-page__sidebar"},Ga={class:"author-page__avatar"},Na=["src","alt"],Fa={class:"author-page__author-title"},Ua={class:"author-page__author-job"},qa=["href"],ja=["innerHTML"],Wa={class:"author-page__author-social-links-list"},Ya={class:"author-page__author-social-item"},Ka=["href"],Xa={class:"author-page__body"},Qa=["innerHTML"],Ja={class:"author-page__latest-articles"},Za={class:"author-page__latest-articles-list"},er={__name:"Author",async setup(o){let a,p;const c=ie("gazConfigData"),{$resolveGazApiEndpoint:l,$stripHtmlTags:s,$gazApiFetch:_}=fe(),x=ue("content").data,y=`${x.name} · ${x.jobTitle?`${x.jobTitle} · `:""}${c.value.name}`;De({title:y,description:s(x.summary),robots:"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:x.url,ogType:"website",ogTitle:y,ogDescription:s(x.summary),ogLocale:"es_ES",ogSiteName:c.value.name,twitterCard:"summary_large_image",twitterSite:c.value.t
11witterSite,twitterTitle:y,twitterDescription:s(x.summary),twitterDomain:c.value.site});const I=x.userId,{data:h,error:f}=([a,p]=mt(()=>xt(`${l()}/author/post/${c.value.site}/${I}/1`,{key:I.toString(),$fetch:_},"$s2bBgCNcwF")),a=await a,p(),a);if(f.value)throw $t({statusCode:f.value.statusCode,statusMessage:"Se ha producido un error"});const r=M=>{switch(M[0]){case"www":return en;case"twitter":return Zo;case"instagram":return Go;case"linkedin":return Ro;case"youtube":return Ho}},z=()=>{var E;const M=(E=history.state)==null?void 0:E.back;M?window.location.href=M:window.history.back()};return(M,E)=>{const k=gt;return n(),i("div",Ha,[t("aside",Ra,[t("div",Ga,[t("img",{width:"125",height:"125",src:e(x).avatar,alt:e(x).name},null,8,Na)]),t("h1",Fa,B(e(x).name),1),t("div",Ua,B(e(x).jobTitle),1),t("a",{class:"author-page__author-email",href:`mailto:${e(x).email}`},B(e(x).email),9,qa),t("div",{class:"author-page__author-summary",innerHTML:e(x).summary},null,8,ja),t("div",Wa,[(n(!0),i(U,null,K(e(x).social,$=>(n(),i("div",Ya,[t("a",{href:$[Object.keys($)],target:"_blank"},[(n(),H(kt(r(Object.keys($)))))],8,Ka)]))),256))]),t("a",{href:"#",class:"gaz-button author-page__back-btn",onClick:xe(z,["prevent"])},"Volver y continuar leyendo")]),t("div",Xa,[t("div",{class:"author-page__author-bio",innerHTML:e(x).bio},null,8,Qa),t("div",Ja,[E[0]||(E[0]=t("div",{class:"author-page__title section-title"},"Últimos artículos",-1)),t("div",Za,[(n(!0),i(U,null,K(e(h),($,C)=>(n(),H(k,{post:$,showMeta:!1,imageCropParams:{x:472,y:266},lazyImage:C>1},null,8,["post","lazyImage"]))),256))])]),t("a",{href:"#",class:"gaz-button gaz-button--rounded author-page__back-btn author-page__back-btn--mobile",onClick:xe(z,["prevent"])},"Volver y continuar leyendo")])])}}},tr=te(er,[["__scopeId","data-v-37c6444e"]]),or=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),nr={class:"branded-sidebar"},sr={class:"branded-sidebar__items"},ar=["innerHTML"],rr={__name:"Sidebar",props:["sidebarItems","adTarget"],setup(o){qe(s=>({"18b208a2":e(l)}));const a=o,c=ue("brandedContent").branded,l=V(()=>c.postTextColor);return(s,_)=>{const b=or;return n(),i("div",nr,[t("div",sr,[T(b,{"format-i-d":e(ee).brandedSidebar,target:a.adTarget,device:"desktop",hasReservedSlot:!1},null,8,["format-i-d","target"]),(n(!0),i(U,null,K(a.sidebarItems,(x,y)=>(n(),i("div",{key:y,class:"branded-sidebar__item",innerHTML:x.content.html},null,8,ar))),128))])])}}},ir=te(rr,[["__scopeId","data-v-74e95bbb"]]),lr=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),cr=["id"],dr={class:"post-article__title heading heading--xxl"},ur={key:1},_r=["srcset"],pr=["width","height","src","alt"],mr={class:"post-article__body"},gr={class:"post-article__meta"},hr=["pubdate"],fr=["id"],vr=["innerHTML"],br={class:"post-article__entry-content"},yr=["innerHTML"],$r=["innerHTML"],wr=["innerHTML"],Cr={__name:"Post",props:{contentData:{type:Object,required:!0},isFirst:{type:Boolean,required:!1,default:!0},previewMode:{type:Boolean,required:!1,default:!1},isLatestPost:{type:Boolean,required:!1,default:!1}},setup(o){qe(r=>({"18f8056e":e(I),"46eb9ca9":e(b),"47f36602":e(x),a09fd5cc:e(y),"29489a27":e(f),"4813ca4f":e(h)}));const{getPostDate:a}=Tt(),p=o,c=p.contentData.data,l=p.contentData.sidebar,_=ue("brandedContent").branded,b=_.headerColor,x=_.postBackgroundColor,y=V(()=>_.postTextColor??"#000"),I=V(()=>_.linkColor??"#000"),h=V(()=>{var r;return((r=_.brandedLinks)==null?void 0:r.background)??"#000"}),f=V(()=>{var r;return((r=_.brandedLinks)==null?void 0:r.color)??"#fff"});return ge(()=>{console.log("Branded Post mounted"),Wt(c),It(),setTimeout(()=>{st()},100)}),(r,z)=>{var g;const M=Oe,E=Bt,k=Ft,$=ht,C=lr,D=ir;return n(),i("div",{class:Z(["branded-article-wrapper",{"branded-article-wrapper--latest-post":p.isLatestPost}])},[t("article",{id:`post-${e(c).postId}`,class:"post-article branded-article"},[T(M,{crums:e(c).breadcrumb},null,8,["crums"]),T(E,{class:"post-article__categories",categories:e(c).categories},null,8,["categories"]),t("h1",dr,B(e(c).title),1),t("div",{class:Z(["post-article__base-image",{"post-article__base-image--has-video":e(c).openingVideo}])},[e(c).openingVideo?(n(),H(k,{key:0,videoUrl:e(c).openingVideo},null,8,["videoUrl"])):w("",!0),e(c).heroImage?(n(),i("figure",ur,[t("picture",null,[t("source",{media:"(max-width: 480px)",srcset:`${e(c).heroImage.url}?x=480&y=375`},null,8,_r),t("img",{decoding:"async",width:e(c).heroImage.width,height:e(c).heroImage.height,src:`${e(c).heroImage.url}?y=439`,alt:e(c).heroImage.alt},null,8,pr)]),(g=e(c).heroImage)!=null&&g.caption?(n(),i("figcaption",{key:0,class:"post-article__base-image-image-caption",style:Ue({maxWidth:`${e(c).heroImage.width}px`})},B(e(c).heroImage.caption),5)):w("",!0)])):w("",!0)],2),t("div",mr,[t("div",gr,[t("div",null,[t("time",{class:"post-article__pubdate",pubdate:e(a)(e(c),!1)},B(e(a)(e(c),!0)),9,hr)]),T($,{title:e(c).title,url:e(c).canonical,postId:e(c).postId,showComments:!1},null,8,["title","url","postId"])]),t("div",{class:"post-article__content",id:`postContent-${e(c).postId}`},[t("div",{class:"post-article__excerpt",innerHTML:e(c).excerpt},null,8,vr),t("div",br,[t("span",{innerHTML:e(c).preAd},null,8,yr),T(C,{"format-i-d":e(ee).brandedContent,target:`pid=${e(c).postId}`,hasReservedSlot:!1},null,8,["format-i-d","target"]),t("span",{innerHTML:e(c).postAd},null,8,$r),t("span",{innerHTML:e(c).lateAd},null,8,wr)])],8,fr)])],8,cr),T(D,{class:Z(["branded-article-wrapper__sidebar",{"branded-article-wrapper__sidebar--hidden":!o.isFirst}]),sidebarItems:e(l),adTarget:`pid=${e(c).postId}`},null,8,["class","sidebarItems","adTarget"])],2)}}},kr=te(Cr,[["__scopeId","data-v-aedee75d"]]),Tr={class:"main-container"},xr={class:"main-container__inner"},Ir={class:"branded-body-layout"},zr={class:"branded-body-layout__body"},Lr={__name:"Body",props:["sidebarItems"],setup(o){return ue("brandedContent").branded.headerColor,(c,l)=>
11(n(),i("div",Tr,[t("div",xr,[t("div",Ir,[t("div",zr,[No(c.$slots,"default",{},void 0,!0)])])])]))}},ko=te(Lr,[["__scopeId","data-v-f6575dd7"]]),Sr=j(()=>W(()=>import("./B2nwOw4G.js"),__vite__mapDeps([42,3,4,11,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,43]),import.meta.url).then(o=>o.default||o)),Ar=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),Pr={class:"branded-infinite-wrapper"},Er={__name:"Wrapper",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){qe(C=>({"628beb8a":e(E),"32504eff":e(k)}));const a=o,p=ue("brandedContent"),c=p.branded,l=Ve(),s=ie("gazConfigData"),{$resolveGazApiEndpoint:_}=fe(),b=Rt(),{trackByPost:x}=Co(),y=G(!1);let I=G(void 0),h=G([]),f=G(1);const r=G(null),z=G(!1),M=p.postType;h.value.push(p),I.value=p.data.postId;const E=c.linkColor,k=c.headerColor,$=async()=>{const C=`${_()}/post-type/infinite/${s.value.site}/${M}/${I.value}/${f.value}`;try{const D=await $fetch(C);!D||D.length===0?(z.value=!0,r.value&&r.value.disconnect()):(h.value=[...h.value,...D],f.value+=1)}catch(D){D.response&&D.response.status===404?(z.value=!0,r.value&&r.value.disconnect()):console.error("Error fetching data:",D)}};return ge(()=>{p.infinite&&(r.value=new IntersectionObserver(C=>{C.forEach(D=>{D.isIntersecting&&!z.value&&$()})},{}),r.value.observe(document.getElementById("observer-lazy-load-branded-post")))}),Vt(()=>{r.value&&r.value.disconnect()}),nt(b,C=>{if(C!=null&&C.postId){if(!y.value){y.value=!0;return}De($o(C,a.previewMode)),Ct({link:[{rel:"canonical",href:C.canonical}]}),x(C)}}),(C,D)=>{const g=Sr,A=kr,F=Ar,u=ko;return n(),H(u,{sidebarItems:e(p).sidebar},{default:re(()=>[t("div",Pr,[T(g,{selector:".branded-main-header"}),(n(!0),i(U,null,K(e(h),(m,P)=>(n(),H(A,{key:m.data.postId,contentData:m,isFirst:P===0,previewMode:o.previewMode,isLatestPost:e(z)&&P===e(h).length-1},null,8,["contentData","isFirst","previewMode","isLatestPost"]))),128)),D[0]||(D[0]=t("div",{id:"observer-lazy-load-branded-post"},null,-1))]),e(l)?(n(),H(F,{key:e(b).postId,data:{postID:e(b).postId||e(p).data.postId}},null,8,["data"])):w("",!0)]),_:1},8,["sidebarItems"])}}},Dr=te(Er,[["__scopeId","data-v-cd9b861b"]]),Mr=["src"],Or={key:0,class:"branded-hero__overlay"},Vr={class:"branded-hero__overlay-inner"},Br={class:"branded-hero__title"},Hr=["innerHTML"],Rr={__name:"Hero",props:["title","description"],setup(o){qe(I=>({"18af9290":e(s),"716d1e24":e(_)}));const a=o,c=ue("brandedContent").branded,l=c.homeHeroImage,s=c.menuLinkColor,_=c.headerColor,b=G(null),x=G(null),y=()=>
11{if(!b.value||!x.value)return;const I=window.scrollY,h=b.value.offsetTop,f=window.innerHeight;if(I+f>h){const z=(I-h)*.3;x.value.style.transform=`translateY(${z}px)`}};return ge(()=>{window.addEventListener("scroll",y)}),Vt(()=>{window.removeEventListener("scroll",y)}),(I,h)=>(n(),i("div",{class:"branded-hero",ref_key:"hero",ref:b},[t("img",{class:"branded-hero__image",ref_key:"parallaxImage",ref:x,src:e(l),alt:""},null,8,Mr),a.title?(n(),i("div",Or,[t("div",Vr,[t("h1",Br,B(a.title),1),t("div",{class:"branded-hero__description",innerHTML:a.description},null,8,Hr)])])):w("",!0)],512))}},Gr=te(Rr,[["__scopeId","data-v-96d6b0ba"]]),Nr={key:0,class:"branded-home__custom-html main-container"},Fr={key:0,class:"branded-home__custom-html-block branded-home__custom-html-block--mobile"},Ur=["innerHTML"],qr={key:1,class:"branded-home__custom-html-block branded-home__custom-html-block--desktop"},jr=["innerHTML"],Wr={__name:"CustomHtml",props:["content"],setup(o){const a=o,p=V(()=>{var s;return((s=a.content)==null?void 0:s.mobile)||""}),c=V(()=>{var s;return((s=a.content)==null?void 0:s.desktop)||""}),l=V(()=>p.value||c.value);return(s,_)=>e(l)?(n(),i("div",Nr,[e(p)?(n(),i("div",Fr,[t("div",{class:"branded-home__custom-html-inner",innerHTML:e(p)},null,8,Ur)])):w("",!0),e(c)?(n(),i("div",qr,[t("div",{class:"branded-home__custom-html-inner",innerHTML:e(c)},null,8,jr)])):w("",!0)])):w("",!0)}},Yr=te(Wr,[["__scopeId","data-v-47a36585"]]),Kr={class:"branded-featured-articles"},Xr={class:"main-container"},Qr={class:"branded-featured-articles__list"},Jr={__name:"FeaturedArticles",props:["posts"],setup(o){qe(b=>({"54715ac0":e(_),"00e04fec":e(s),"57382d54":e(l)}));const a=o,c=ue("brandedContent").branded;c.headerColor;const l=c.postBackgroundColor,s=V(()=>c.postTextColor),_=V(()=>c.linkColor);return(b,x)=>{const y=gt;return n(),i("section",Kr,[t("div",Xr,[t("div",Qr,[(n(!0),i(U,null,K(a.posts,I=>(n(),H(y,{post:I,showMeta:!0,showSummary:!1,type:"x-large-reverse"},null,8,["post"]))),256))])])])}}},Zr=j(()=>W(()=>Promise.resolve().then(()=>zt),void 0,import.meta.url).then(o=>o.default||o)),ei=j(()=>W(()=>import("./Cotdi13U.js"),__vite__mapDeps([58,59,3,4,60,61]),import.meta.url).then(o=>o.default||o)),ti=j(()=>W(()=>import("./YlGCgVos.js"),__vite__mapDeps([62,63,3,4,23,59,60,64]),import.meta.url).then(o=>o.default||o)),oi=j(()=>W(()=>import("./BbIjLP6v.js"),__vite__mapDeps([65,59,3,4,60,66]),import.meta.url).then(o=>o.default||o)),ni=j(()=>W(()=>import("./Bud4iapq.js"),__vite__mapDeps([67,5,3,4,6,68]),import.meta.url).then(o=>o.default||o)),si={class:"branded-home"},ai={class:"branded-home__section-list"},ri={key:0,class:"branded-home__section branded-home__section--hero-description"},ii={class:"main-container"},li={class:"branded-home__main-title"},ci=["innerHTML"],di={key:0,class:"branded-home__section-loader"},ui={key:0,class:"branded-home__section-loader"},_i={key:0,class:"branded-home__section-loader"},pi={__name:"Home",setup(o){qe($=>({cfeee1e8:e(M),"42643ec4":e(E),"927cfe7c":e(k)}));const a=ie("gazConfigData"),p=ue("brandedContent"),c=G(!1),l=p.data,s=p.home,_=p.branded,b=l.homePromotionLower,x=l.homePromotionUpper;Ct(()=>{var $,C;return{link:[{rel:"canonical",href:l.url},{rel:"alternate",type:"application/rss+xml",href:($=l.feed)==null?void 0:$.url,title:(C=l.feed)==null?void 0:C.title}]}}),De({title:l.seoTitle,description:l.seoDescription,robots:l.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:l.url,ogType:"website",ogTitle:l.seoTitle,ogDescription:l.seoDescription,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:l.seoTitle,twitterDescription:l.seoDescription,twitterDomain:a.value.site});const y=$=>s.find(C=>C.type===$)||[],I=y("manual_selection"),h=y("cascade"),f=y("product_carousel"),r=y("twitter_feed"),z=y("youtube_feed"),M=V(()=>_.backgroundColor),E=V(()=>_.headerColor),k=V(()=>_.postTextColor);return ge(()=>{c.value=!0}),($,C)=>{var R;const D=Gr,g=Zr,A=ei,F=Ht,u=Yr,m=Jr,P=ti,L=oi,S=ni;return n(),i("div",si,[e(_).homeHeroImage?(n(),H(D,{key:0,title:e(l).title,de
11scription:e(l).description},null,8,["title","description"])):w("",!0),t("div",ai,[!e(_).homeHeroImage&&e(l).title?(n(),i("section",ri,[t("div",ii,[t("h1",li,B(e(l).title),1),t("div",{class:"branded-home__main-description",innerHTML:e(l).description},null,8,ci)])])):w("",!0),e(z).content?(n(),i("div",{key:1,class:Z(["branded-home__section",`branded-home__section--${e(z).type}`])},[e(c)?w("",!0):(n(),i("div",di,[T(g,{class:"branded-home__loading-icon"})])),T(F,null,{default:re(()=>[T(A,{youtubeFeed:e(z).content},null,8,["youtubeFeed"])]),_:1})],2)):w("",!0),e(x)?(n(),H(u,{key:2,content:e(x)},null,8,["content"])):w("",!0),((R=e(I).content)==null?void 0:R.length)>0?(n(),H(m,{key:3,class:Z(["branded-home__section",`branded-home__section--${e(I).type}`]),posts:e(I).content},null,8,["class","posts"])):w("",!0),e(r).content?(n(),i("div",{key:4,class:Z(["branded-home__section",`branded-home__section--${e(r).type}`])},[e(c)?w("",!0):(n(),i("div",ui)),T(F,null,{default:re(()=>[T(P,{XHandle:e(r).title,XFeed:e(r).content},null,8,["XHandle","XFeed"])]),_:1})],2)):w("",!0),e(f).content?(n(),i("div",{key:5,class:Z(["branded-home__section",`branded-home__section--${e(f).type}`])},[e(c)?w("",!0):(n(),i("div",_i,[T(g,{class:"branded-home__loading-icon"})])),T(F,null,{default:re(()=>[T(L,{products:e(f).content},null,8,["products"])]),_:1})],2)):w("",!0),e(b)?(n(),H(u,{key:6,content:e(b)},null,8,["content"])):w("",!0),T(S,{class:Z(["branded-home__section",`branded-home__section--${e(h).type}`]),posts:e(h).content,postTypeId:e(p).postType},null,8,["class","posts","postTypeId"])])])}}},mi=te(pi,[["__scopeId","data-v-a9d635b4"]]),gi=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),hi={class:"branded-term-page"},fi={class:"branded-term-page__title section-title"},vi={class:"branded-term-page__post-list"},bi={__name:"Category",async setup(o){let a,p;qe(m=>({"42bd6674":e(z),"0477ba2f":e(h),"6d3c32a0":e(r),"36d52d08":e(f)}));const{$resolveGazApiEndpoint:c,$removeTrailingSlash:l,$gazApiFetch:s}=fe(),_=Ve(),b=ie("gazConfigData"),x=ue("brandedContent"),y=x.branded,I=x.data,h=y.postTextColor,f=y.postBackgroundColor,r=V(()=>y.postTextColor),z=V(()=>y.linkColor),M=G(1),E=G([]),k=G(null),$=m=>{E.value=[...E.value,...m],M.value=M.value+1},C=I.termId,{isFetching:D,data:g,error:A}=([a,p]=mt(()=>xt(`${c()}/category/post/${b.value.site}/${C}/${M.value}`,{key:C.toString(),$fetch:s},"$4gCeuQY72S")),a=await a,p(),a);$(g.value),ge(()=>{x.infinite&&(k.value=new IntersectionObserver(m=>{m.forEach(P=>{P.isIntersecting&&F()})},{}),k.value.observe(document.getElementById("observer-lazy-load-branded-term")))});const F=()=>{const m=`${c()}/category/post/${b.value.site}/${C}/${M}`;$fetch(m).then(P=>{Array.isArray(P)&&P.length>0?$(P):k.value&&(k.value.disconnect(),console.log("No more posts, stopping observer."))})},u=I.url;return De({title:I.seoTitle,description:I.seoDescription,robots:I.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:u,ogType:"website",ogTitle:I.seoTitle,ogDescription:I.seoDescription,ogLocale:"es_ES",ogSiteName:b.value.name,twitterCard:"summary_large_image",twitterSite:b.value.twitterSite,twitterTitle:I.seoTitle,twitterDescription:I.seoDescription,twitterDomain:b.value.site}),(m,P)=>{const L=Oe,S=gt,R=gi,oe=ko;return n(),H(oe,null,{default:re(()=>[t("div",hi,[T(L,{crums:e(I).breadcrumb,currentTitle:e(I).name},null,8,["crums","currentTitle"]),t("h1",fi,B(e(I).name),1),t("div",vi,[(n(!0),i(U,null,K(e(E),(se,ne)=>(n(),H(S,{post:se,type:"medium","show-summary":!0,"lazy-image":ne>0},null,8,["post","lazy-image"]))),256)),P[0]||(P[0]=t("div",{id:"observer-lazy-load-branded-term"},null,-1))])]),e(_)?(n(),H(R,{key:0,data:{termID:e(I).termId}},null,8,["data"])):w("",!0)]),_:1})}}},yi=te(bi,[["__scopeId","data-v-9e1e6105"]]),$i={class:"offers-banner__bubble"},wi={class:"offers-banner__bubble-inner"},Ci={key:0,class:"offers-banner__icon"},ki=["src","alt"],Ti={class:"offers-banner__content"},xi={class:"offers-banner__title"},Ii=["innerHTML"],zi={__name:"Banner",setup(o){qe(_=>({57616082:e(l),d68ef8d2:e(s)}));const p=ue("offersContent").data||{},c=p.offersSelection||{},l=V(()=>c.backgroundColor||"#000"),s=V(()=>c.bannerDescriptionColor||"#fff");return(_,b)=>{var x,y;return n(),i("div",{class:"offers-banner",style:Ue({backgroundImage:`url(${e(c).backgroundImage})`})},[t("div",$i,[t("div",wi,[e(c).iconImage?(n(),i("div",Ci,[t("img",{src:e(c).iconImage,alt:e(p).name,width:"150",height:"150"}
11,null,8,ki)])):w("",!0),t("div",Ti,[t("div",xi,B((x=e(p))==null?void 0:x.name),1),t("div",{class:"offers-banner__description",innerHTML:(y=e(p))==null?void 0:y.description},null,8,Ii)])])])],4)}}},Li=te(zi,[["__scopeId","data-v-71f2bc55"]]),Si={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ai(o,a){return n(),i("svg",Si,a[0]||(a[0]=[t("path",{d:"M12 9a1.001 1.001 0 1 1-1 1c0-.551.448-1 1-1m0-2a3 3 0 1 0 0 6 3 3 0 0 0 0-6m-9 4a3 3 0 1 0 0 6 3 3 0 0 0 0-6m18 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6m-9-6q.515.001 1 .101V2a1 1 0 1 0-2 0v3.101A5 5 0 0 1 12 5m9 4q.515.001 1 .101V2a1 1 0 1 0-2 0v7.101A5 5 0 0 1 21 9m0 10q-.515-.001-1-.101V22a1 1 0 1 0 2 0v-3.101A5 5 0 0 1 21 19M3 9q.515.001 1 .101V2a1 1 0 1 0-2 0v7.101A5 5 0 0 1 3 9m9 6q-.515-.001-1-.101V22a1 1 0 1 0 2 0v-7.101A5 5 0 0 1 12 15m-9 4q-.515-.001-1-.101V22a1 1 0 1 0 2 0v-3.101A5 5 0 0 1 3 19"},null,-1)]))}const Pi={render(){return Pe(Ee,{icon:{render:Ai},name:"filters"})}},Ei={},Di={class:"loading-icon"};function Mi(o,a){return n(),i("div",Di,a[0]||(a[0]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"spinner"},[t("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-dasharray":"80","stroke-dashoffset":"60"})],-1)]))}const Yt=te(Ei,[["render",Mi],["__scopeId","data-v-87a45c26"]]),zt=Object.freeze(Object.defineProperty({__proto__:null,default:Yt},Symbol.toStringTag,{value:"Module"})),Oi={class:"offer-product__image"},Vi=["src","alt"],Bi={class:"offer-product__title"},Hi=["href","innerHTML"],Ri={class:"offer-product__price"},Gi={class:"offer-product__price-value"},Ni={class:"offer-product__currency"},Fi={class:"offer-product__description"},Ui={class:"offer-product__featured-hover"},qi={class:"content"},ji={class:"text-brand"},Wi={class:"price-brand"},Yi=["src"],Ki={class:"price"},Xi={class:"currency"},Qi={class:"value"},Ji="/imgs/shortcodes/affiliates/amazon_logo_min.png",Zi={__name:"Product",props:["item","category","purchaseText","meta"],setup(o){const a=o,{$getFormatedPrice:p}=fe(),c=G(!1),l=V(()=>({"--offer-product-price-text-color":a.meta.productTextColor||"#af1a1a","--offer-product-hover-bg-color":a.meta.productHoverColor||"#3D3D3D"}));return(s,_)=>(n(),i("div",{class:"offer-product",onMouseover:_[0]||(_[0]=b=>c.value=!0),onMouseleave:_[1]||(_[1]=b=>c.value=!1),style:Ue(e(l))},[t("div",Oi,[t("img",{src:o.item.product.image,alt:o.item.title.rendered},null,8,Vi)]),t("h3",Bi,[t("a",{href:o.item.productUrl,target:"_blank",innerHTML:o.item.title.rendered},null,8,Hi)]),t("div",Ri,[t("span",Gi,B(e(p)(o.item.product.price)),1),t("span",Ni,B(o.item.product.currency),1)]),t("ul",Fi,[(n(!0),i(U,null,K(o.item.meta.offer_item_amazon_product_highlights_group,b=>(n(),i("li",null,B(b.offer_item_amazon_product_highlight),1))),256))]),T(Ne,null,{default:re(()=>[ye(t("div",Ui,[t("div",qi,[t("span",ji,B(o.meta.purchaseText),1),t("div",Wi,[t("img",{src:o.meta.affiliateIconBig?o.meta.affiliateIconBig:Ji,width:"140",loading:"lazy",alt:"Logo del comercio"},null,8,Yi),t("div",Ki,[t("span",Xi,B(o.item.product.currency),1),t("span",Qi,B(e(p)(o.item.product.price)),1)])])])],512),[[_t,e(c)]])]),_:1})],36))}},el=te(Zi,[["__scopeId","data-v-c47cb99b"]]),tl=j(()=>W(()=>import("./BgkuAP-6.js"),__vite__mapDeps([69,12,3,4,13,70]),import.meta.url).then(o=>o.default||o)),ol={class:"main-container"},nl={class:"main-container__inner"},sl={key:0,class:"offers__panel"},al={class:"offers__filters"},rl={class:"offers__filters-inner"},il={class:Z(["offers__filters-section","offers__filters-section--main"])},ll={class:"gaz-form__group"},cl={class:"offers__filters-section offers__filters-section--category"},dl=["id","value"],ul=["for"],_l={class:"offers__filters-section offers__filters-section--price"},pl=["id","value"],ml=["for"],gl={class:"offers__list-wrapper"},hl={key:0,class:"offers__loading-wrapper"},fl={key:0,class:"offers__current-filters"},vl=["onClick"],bl=["onClick"],yl={class:"offers__category-title"},$l={class:"offers__product-list"},wl={key:2,class:"offers__no-results"},Cl={key:1,class:"offers__no-items"},kl={__name:"Index",setup(o){const a=wt(),p=ie("gazConfigData"),s=ue("offersContent").data.offersSelection,_=G(!1),b=[{label:"Menos de 5€",min:0,max:5},{label:"6€ - 10€",min:6,max:10},{label:"11€ - 50€",min:11,max:50},{label:"51€ - 100€",min:51,max:100},{label:"101€ - 200€",min:101,max:200},{label:"201€ - 500€",min:201,max:500},{label:"501€ - 1.000€",min:501,max:1e3},{label:"Más de 1.000€",min:1e3,max:99999}],x=V(()=>({"--offer-body-bg-color":(s==null?void 0:s.backgroundColor)||"#fff","--offer-filters-bg-color":(s==null?void 0:s.filtersBackgroun
11dColor)||"#333","--offer-filters-text-color":(s==null?void 0:s.filtersTextColor)||"#fff","--offer-category-bg-color":(s==null?void 0:s.filtersBackgroundColor)||"#333","--offer-category-text-color":(s==null?void 0:s.filtersTextColor)||"#fff","--offer-filters-type-text-color":(s==null?void 0:s.filtersTypeTextColor)||"#fff","--color-loading-icon":(s==null?void 0:s.filtersTypeTextColor)||"#fff"})),y=()=>{const $=document.querySelector(".main-container");$&&$.scrollIntoView({behavior:"smooth",block:"start"})},I=$=>r.value.some(C=>C.label===$.label),h=($="all",C=null)=>{($==="categories"||$==="all")&&(f.value=C?f.value.filter(D=>D!==C):[]),($==="prices"||$==="all")&&(r.value=C?r.value.filter(D=>D.label!==C):[]),($==="search"||$==="all")&&(z.value="")},f=G([]),r=G([]),z=G(""),M=G(!1),E=G((s==null?void 0:s.products)||{}),k=V(()=>{let $={};return Object.entries(E.value).forEach(([C,D])=>{let g=D.items.filter(A=>{let F=f.value.length===0||f.value.includes(D.name),u=A.title.rendered.toLowerCase().includes(z.value.toLowerCase()),m=r.value.length===0||r.value.some(P=>{const L=parseFloat(A.product.price)||0;return L>=P.min&&L<=P.max});return F&&u&&m&&A.product.visible});g.length>0&&($[C]={name:D.name,items:g})}),$});return nt([f,r,z],()=>{y()}),ge(async()=>{let $=E.value;_.value=!0;let C=[];for(const D in $)$[D].items.forEach(g=>{g.product.visible=!1;const A=g.product.asin;if(A!==null&&A!==""){let F=fetch(`${a.public.gazProductsEndpoint}/amzn/${A}?${p.value.site}`).then(u=>u.json()).then(u=>{u.error?g.product.visible=!1:(g.product.price=u.price,g.hasOwnProperty("meta")&&g.meta.hasOwnProperty("offer_item_show_prime_price")&&u.prime_price>0&&g.meta.offer_item_show_prime_price==="1"&&(g.product.price=u.prime_price),g.hasOwnProperty("meta")&&g.meta.hasOwnProperty("offer_item_amazon_custom_price")&&!isNaN(g.meta.offer_item_amazon_custom_price)&&parseFloat(g.meta.offer_item_amazon_custom_price).toFixed(2)>0&&(g.product.price=g.meta.offer_item_amazon_custom_price),g.product.image=u.images[0].url,g.product.currency=u.currency,g.product.visible=!0)});C.push(F)}else g.hasOwnProperty("meta")&&g.meta.hasOwnProperty("offer_item_amazon_custom_price")&&!isNaN(g.meta.offer_item_amazon_custom_price)&&parseFloat(g.meta.offer_item_amazon_custom_price).toFixed(2)>0&&(g.product.price=g.meta.offer_item_amazon_custom_price),g.product.currency="EUR",g.product.visible=!0});await Promise.all(C),_.value=!1}),($,C)=>{var P;const D=Li,g=Pi,A=so,F=Yt,u=el,m=tl;return n(),i("div",{class:"offers",style:Ue(e(x))},[T(D),t("div",ol,[t("div",nl,[(P=e(s))!=null&&P.products&&Object.keys(e(s).products).length>0?(n(),i("div",sl,[t("div",al,[t("div",rl,[t("form",{class:"gaz-form offers__filters-form",onSubmit:C[4]||(C[4]=xe(()=>{},["prevent"]))},[t("div",il,[t("button",{class:"offers__filters-toggle-btn",onClick:C[0]||(C[0]=L=>M.value=!e(M))},[e(M)?w("",!0):(n(),H(g,{key:0,class:"offers__filters-icon",filled:""})),e(M)?(n(),H(A,{key:1,class:"offers__filters-close-icon"})):w("",!0)]),t("div",ll,[ye(t("input",{"onUpdate:modelValue":C[1]||(C[1]=L=>Te(z)?z.value=L:null),class:"gaz-form__input",type:"text",placeholder:"Buscar oferta"},null,512),[[pt,e(z)]])])]),t("div",{class:Z(["offers__filters-section-toggle",{"offers__filters-section-toggle--active":e(M)}])},[t("div",cl,[C[7]||(C[7]=t("h4",{class:"offers__filters-type-title"},"Categorias",-1)),(n(!0),i(U,null,K(e(s).products,(L,S)=>(n(),i("div",{key:S,class:Z(["gaz-form__group gaz-form__group--checkbox",{checked:e(f).includes(L.name)}])},[ye(t("input",{type:"checkbox",id:L.name,value:L.name,"onUpdate:modelValue":C[2]||(C[2]=R=>Te(f)?f.value=R:null)},null,8,dl),[[Dt,e(f)]]),t("label",{for:L.name},B(L.name),9,ul)],2))),128))]),t("div",_l,[C[8]||(C[8]=t("h4",{class:"offers__filters-type-title"},"Precio",-1)),(n(),i(U,null,K(b,L=>t("div",{key:L.label,class:Z(["gaz-form__group gaz-form__group--checkbox",{checked:I(L)}])},[ye(t("input",{type:"checkbox",id:L.label,value:L,"onUpdate:modelValue":C[3]||(C[3]=S=>Te(r)?r.value=S:null)},null,8,pl),[[Dt,e(r)]]),t("label",{for:L.label},B(L.label),9,ml)],2)),64))])],2)],32)])]),t("div",gl,[e(_)?(n(),i("div",hl,[T(F,{class:"gaz-card__loading-icon"}),C[9]||(C[9]=me(" Cargando productos "))])):(n(),i(U,{key:1},[e(f).length>0||e(r).length>0||e(z)?(n(),i("div",fl,[t("a",{class:"offers__remove-all-filters-btn",href:"#",onClick:C[5]||(C[5]=xe(L=>h("all"),["prevent"]))},[C[10]||(C[10]=t("span",null,"Quitar todo",-1)),C[11]||(C[11]=me()),T(A)]),e(z)?(n(),i("div",{key:0,class:"offers__current-filter",onClick:C[6]||(C[6]=L=>h("search"))},[t("span",null,B(e(z)),1),T(A)])):w("",!0),(n(!0),i(U,null,K(e(f),L=>(n(),i("div",{class:"offers__current-filter",onClick:S=>h("categories",L)},[t("span",null,B(L),1),T(A)],8,vl))),256)),(n(!0),i(U,null,K(e(r),L=>(n(),i("div",{class:"offers__current-filter",onClick:S=>h("prices",L.label)},[t("span",null,B(L.label),1),T(A)],8,bl))),256))])):w("",!0),e(k)&&Object.keys(e(k)).length>0?(n(!0),i(U,{key:1},K(e(k),(L,S)=>(n(),i("div",{key:S},[t("h3",yl,B(S),1),t("div",$l,[(n(!0),i(U,null,K(L.items,R=>(n(),H(u,{key:R.id,item:R,categoryName:S,meta:e(s)},null,8,["item","categoryName","meta"]))),128))])]))),128)):(n(),i("div",wl,C[12]||(C[12]=[t("p",null,"No se encontraron ofertas que coincidan con tu busqueda",-1)])))],64))])])):(n(),i("div",Cl,C[13]||(C[13]=[t("p",null,"Todavía hay ofertas disponibles",-1)]))),T(m)])])],4)}}},Tl=te(kl,[["__scopeId","data-v-d5899d20"]]),xl={class:"score-bar"},Il={class:"score-bar__info"},zl={class:"score-bar__title"},Ll={key:0},Sl={class:"score-bar__score"},Al={class:"score-bar__progress"},Pl={__name:"ScoreBar",props:{score:{type:Number,required:!0},maxScore:{type:Number,default:100},title:{type:String,required:!1},showScore:{type:Boolean,default:!0},showScoreDecimals:{type:Boolean,default:!0},isScoreInPercent:{type:Boolean,default:!1}},setup(o){const a=o,p=V(()=>a.score),c=V(()=>a.isScoreInPercent?a.score:a.score*10/a.maxScore*100);return(l,s)=>(n(),i("div",xl,[t("div",Il,[t("div",zl,[o.title?(n(),i("span",Ll,B(o.title),1)):w("",!0)]),t("div",Sl,B(e(p).toLocaleStr
11ing("es-ES",{minimumFractionDigits:o.showScoreDecimals?1:0,maximumFractionDigits:o.showScoreDecimals?1:0}))+B(o.isScoreInPercent?"%":""),1)]),t("div",Al,[t("div",{style:Ue({width:`${e(c)}%`})},null,4)])]))}},El=te(Pl,[["__scopeId","data-v-451438c8"]]),To=()=>{const o=ie("opinionsCard",()=>({isVisible:!1,isConfirmationPanelVisible:!1,postId:void 0,isLoading:!1,error:null,feedback:{status:"error",message:""}}));ie("gazConfigData");const{$resolveGazApiEndpoint:a}=fe();return{opinionsCard:o,updateFeedback:(s,_)=>{o.value.feedback.status=s,o.value.feedback.message=_},createOpinion:async s=>{const _=`${a()}/opinions`;try{return await $fetch(_,{method:"POST",body:s})}catch(b){throw console.error("Error creando la opinión:",b),new Error("No se pudo enviar la opinión.")}},confirmOpinion:async s=>{const _=`${a()}/opinions/confirm`;try{return await $fetch(_,{method:"POST",body:{token:s}})}catch(b){throw console.error("Error confirmando el token la opinión:",b),new Error("Se ha producido un error al confirmar la opinión.")}}}},Dl={xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","clip-rule":"evenodd",viewBox:"0 0 24 24"};function Ml(o,a){return n(),i("svg",Dl,a[0]||(a[0]=[t("path",{d:"M21 6.285 9.84 19.018 3 13l1.319-1.49 5.341 4.686L19.525 5z"},null,-1)]))}const xo={render(){return Pe(Ee,{icon:{render:Ml},name:"check"})}},Xm=o=>{const a=window;if(!a.requestAnimationFrame){const p=["moz","webkit","ms"];for(const c of p)if(a[c+"RequestAnimationFrame"]){a.requestAnimationFrame=a[c+"RequestAnimationFrame"];break}}a.requestAnimationFrame?a.requestAnimationFrame(o):o(0)},Ol=o=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o),Qm=o=>/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_])[A-Za-z\d\W_]{8,}$/.test(o),Vl={key:0,class:"opinion-confirmation-panel"},Bl={class:"gaz-form opinion-form"},Hl={class:"gaz-form__label"},Rl={class:"gaz-form__group opinion-form__general-rating"},Gl={class:"gaz-form__group"},Nl={class:"gaz-form__group"},Fl={class:"gaz-form__group"},Ul={class:"gaz-form__group gaz-form__group--checkbox"},ql={class:"gaz-form__group"},jl={__name:"Form",props:["criterias"],setup(o){const a=o,{opinionsCard:p,updateFeedback:c,createOpinion:l}=To(),s=ie("gazConfigData"),_=V(()=>a.criterias.length===0),b=ao({}),x=G(0),y=V({get(){if(_.value)return x.value;const E=Object.keys(b);if(!E.length)return 0;const $=E.reduce((C,D)=>C+Number(b[D]||0),0)/E.length;return $?Math.round($*2)/2:0},set(E){_.value&&(x.value=E)}}),I=G(""),h=G(""),f=G(""),r=G(!1);ge(()=>{var E;
11(E=a.criterias)==null||E.forEach(k=>{b[k.rating_category_id]=0})});const z=()=>{p.value.isConfirmationPanelVisible=!1,p.value.isVisible=!1},M=async function(){if(_.value&&!y.value){c("error","Debes puntuar la valoración general.");return}for(const[k,$]of Object.entries(b))if(!$){const C=a.criterias.find(D=>D.rating_category_id==k);c("error",`Debes puntuar ${(C==null?void 0:C.category_name)||"un criterio"}.`);return}if(!I.value.trim()){c("error","Debes escribir tu valoración.");return}if(!Ol(h.value)){c("error","Ingresa un correo electrónico válido.");return}if(!f.value.trim()){c("error","Debes escribir tu nombre.");return}if(!r.value){c("error","Debes certificar tu opinión.");return}p.value.isLoading=!0;const E=Object.entries(b).map(([k,$])=>({[k]:String($)}));try{const k=await l({postId:p.value.postId,url:window.location.origin+window.location.pathname,generalRating:String(y.value),site:s.value.site,criteria:E,comment:I.value,email:h.value,name:f.value,legalTerm:r.value});p.value.isLoading=!1,p.value.isConfirmationPanelVisible=!0}catch(k){p.value.isLoading=!1,c("error",`Ha ocurrido un error: ${k.message}`)}};return(E,k)=>{const $=xo,C=Fo,D=ho,g=Gt;return n(),i("div",null,[T(Ne,{name:"slide-left"},{default:re(()=>[e(p).isConfirmationPanelVisible?(n(),i("div",Vl,[k[8]||(k[8]=t("div",{class:"opinion-confirmation-panel__title"},"¡Gracias por dar tu opinión!",-1)),t("p",null,[T($,{class:"opinion-confirmation-panel__icon"}),k[5]||(k[5]=me(" Tu valoración se ha registrado correctamente."))]),t("p",null,[T(C,{class:"opinion-confirmation-panel__icon"}),k[6]||(k[6]=me(" Te hemos enviado un email para que verifiques tu dirección de correo. "))]),t("p",null,[T(D,{class:"opinion-confirmation-panel__icon"}),k[7]||(k[7]=me(" Una vez confirmada, tu opinión entrará en revisión y luego será visible en el listado. "))]),t("button",{type:"button",class:"gaz-button gaz-button--full-width",onClick:z},"Cerrar ventana")])):w("",!0)]),_:1}),t("div",Bl,[(n(!0),i(U,null,K(a.criterias,A=>(n(),i("div",{key:A.rating_category_id,class:"gaz-form__group"},[t("label",Hl,B(A.category_name),1),T(g,{gap:0,enableRating:!0,rating:e(b)[A.rating_category_id],"onUpdate:rating":F=>e(b)[A.rating_category_id]=F},null,8,["rating","onUpdate:rating"])]))),128)),t("div",Rl,[k[9]||(k[9]=t("label",{class:"gaz-form__label"},"Valoración general",-1)),T(g,{gap:0,enableRating:e(_),starSize:40,rating:e(y),"onUpdate:rating":k[0]||(k[0]=A=>Te(y)?y.value=A:null)},null,8,["enableRating","rating"])]),t("div",Gl,[k[10]||(k[10]=t("label",{class:"gaz-form__label"},"Escribe tu valoración",-1)),ye(t("textarea",{class:"gaz-form__textarea","onUpdate:modelValue":k[1]||(k[1]=A=>Te(I)?I.value=A:null),rows:"4"},null,512),[[pt,e(I)]])]),t("div",Nl,[k[11]||(k[11]=t("label",{class:"gaz-form__label"},"Tu e-mail",-1)),ye(t("input",{class:"gaz-form__input",type:"email","onUpdate:modelValue":k[2]||(k[2]=A=>Te(h)?h.value=A:null)},null,512),[[pt,e(h)]]),k[12]||(k[12]=t("div",{class:"gaz-form__group-info"}," *Recibirás un enlace para verificar tu dirección de correo. ",-1))]),t("div",Fl,[k[13]||(k[13]=t("label",{class:"gaz-form__label"},"Tu nombre",-1)),ye(t("input",{class:"gaz-form__input",type:"text","onUpdate:modelValue":k[3]||(k[3]=A=>Te(f)?f.value=A:null)},null,512),[[pt,e(f)]])]),t("div",Ul,[ye(t("input",{id:"certification",class:"gaz-form__checkbox",type:"checkbox","onUpdate:modelValue":k[4]||(k[4]=A=>Te(r)?r.value=A:null)},null,512),[[Dt,e(r)]]),k[14]||(k[14]=t("label",{for:"certification"}," Certifico que esta valoración está basada en mi propia experiencia y que refleja mi opinión sincera. ",-1))]),t("div",ql,[t("button",{class:"gaz-form__submit-btn gaz-button gaz-button--full-width",onClick:xe(M,["prevent"])}," Enviar opinión ")])])])}}},Wl=te(jl,[["__scopeId","data-v-57017e87"]]),Yl={class:"user-opinion"},Kl={class:"user-opinion__header"},Xl={class:"user-opinion__user-name"},Ql=["datetime","title"],Jl={class:"user-opinion__body"},Zl={key:0},ec={key:1},Et=250,tc={__name:"UserOpinion",props:["opinion"],setup(o){const p=Uo(o).opinion,c=G(!1),l=V(()=>p.value.comment.length>Et),s=V(()=>p.value.comment.length>Et?p.value.comment.slice(0,Et)+"…":p.value.comment);function _(){c.value=!c.value}return(b,x)=>{const y=Gt;return n(),i("div",Yl,[t("div",Kl,[t("div",Xl,B(e(p).name),1),T(y,{max:5,rating:e(p).rating,"star-size":25},null,8,["rating"])]),t("time",{class:"user-opinion__pubdate",pubdate:"",datetime:e(p).date,title:e(p).date},B(e(p).date),9,Ql),t("div",Jl,[e(c)?(n(),i("span",ec,B(e(p).comment),1)):(n(),i("span",Zl,B(e(s)),1)),e(l)?(n(),i("a",{key:2,href:"#",onClick:xe(_,["prevent"])},B(e(c)?"Ver menos":"Ver más"),1)):w("",!0)])])}}},oc=te(tc,[["__scopeId","data-v-ea5bf472"]]),nc=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),sc=j(()=>W(()=>Promise.resolve().then(()=>zt),void 0,import.meta.url).then(o=>o.default||o)),ac=j(()=>W(()=>import("./CzjyQh7Q.js"),__vite__mapDeps([30,31,3,4,32,18,5,6,19,7,8,9,10,11,12,13,14,15,16,17,20,21,33]),import.meta.url).then(o=>o.default||o)),rc=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),ic=j(()=>W(()=>import("./CG_04qqo.js"),__vite__mapDeps([71,72,3,4,73,74]),import.meta.url).then(o=>o.default||o)),lc=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),cc={class:"opinions-page"},dc={class:"opinions-page__header"},uc={class:"opinions-page__header-left"},_c=["src","alt"],pc={class:"opinions-page__header-right"},mc={class:"gaz-page__title opinions-page__title"},gc={class:"opinions-page__global-rating"},hc={href:"#user-comments"},fc=["innerHTML"],vc={key:0,class:"opinions-page__nav"},bc=["href","target"],yc={class:"opinions-page__main"},$c={class:"opinions-page__resume"},wc={class:"opinions-page__resume-inner"},Cc={class:"opinions-page__global-rating"},kc={class:"opinions-page__rating-ranges"},Tc={class:"opinions-page__rating-count"},xc={key:0,class:"opinions-page__rating-apportionment"},Ic={class:"opinions-page__aside-ad"},zc={class:"opinions-page__rating-solicitation"},Lc={id:"user-comments",class:"opinions-page__body"},Sc={class:"opinions-page__opinions"},Ac={class:"opinions-page__opinions-filters"},Pc=["disabled"],Ec=["disabled"],Dc=["value"],Mc=["disabled"],Oc={key:1},Vc={key:2},Bc={class:"opinions-page__post-article post-article"},Hc={class:"post-article__body"},Rc={class:"post-article__content"},Gc=["innerHTML"],Nc={class:"post-article__entry-content"},Fc=["innerHTML"],Uc=["innerHTML"],qc=["innerHTML"],jc={key:0,class:"opinions-page__related-opinions"},Wc={class:"opinions-page__related-opinions-list"},Yc={key:1,class:"opinions-page__related-news"},Kc={class:"opinions-page__related-news-list"},Xc=ro({__name:"Post",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){var se;const a=["Pésima","Mala","Regular","Buena","Excelente"],p=ie("gazConfigData"),c=io(),{$resolveGazApiEndpoint:l,$isMobile:s}=fe(),{opinionsCard:_,confirmOpinion:b}=To(),x=Ve(),y=G(!1),I=G(0),h=ue("content"),f=h.data,r=h.opinion,z=r.navigation,M=V(()=>{const ne=r==null?void 0:r.starsPercentage;return ne?Object.keys(ne).sort((O,de)=>Number(de)-Number(O)).map(O=>({rating:O,percentage:ne[O]??0})):[]}),E=Array.isArray(h.sidebar)&&h.sidebar.length>0?((se=h.sidebar[0])==null?void 0:se.content)??[]:[],k=f.postId;_.value.postId=k;const $=G([...r.items]),C=G(0),D=G(!1),g=G("all"),A=G("recent"),F=G(1),u=G(!1),m=V(()=>$.value.length<C.value),P=()=>{D.value=!1;const ne=new URL(window.location.href);ne.searchParams.delete("token"),window.history.replaceState({},"",ne)},L=async ne=>{try{const O=await b(ne);D.value=!0}catch(O){console.log(O)}D.value=!0},S=()=>{oe(!0)},R=()=>{F.value++,oe(!1)},oe=async(ne=!1)=>{u.value=!0,ne&&(F.value=1);try{const O=await $fetch(`${l()}/opinions/${p.value.site}/${k}/${g.value}/${A.value}/${F.value}`,{method:"GET"});O&&(ne?$.value=O.items:$.value.push(...O.items),C.value=O.totalItems)}catch(O){console.error("Error al cargar opiniones",O)}finally{u.value=!1,I.value=Date.now(),setTimeout(()=>{st()},500)}};return ge(()=>{if(c.query.token&&L(c.query.token),C.value=r.totalOpinions,s){const ne=()=>{y.value=window.scrollY>20};window.addEventListener("scroll",ne),Ot(()=>{window.removeEventListener("scroll",ne)})}}),(ne,O)=>{const de=Oe,ve=Gt,be=El,le=nc,ce=qt,we=sc,he=ac,Be=gt,je=rc,Ke=ic,Xe=lc;return n(),i(U,null,[t("div",cc,[T(de,{crums:e(f).breadcrumb},null,8,["crums"]),t("div",dc,[t("div",uc,[t("img",{src:`${e(f).heroImage.url}?x=205&y=150`,alt:e(f).heroImage.alt},null,8,_c),t("button",{class:"gaz-button gaz-button--full-width",onClick:O[0]||(O[0]=ae=>e(_).isVisible=!0)},"Escribir mi opinion")]),t("div",pc,[t("h1",mc,"Opiniones sobre "+B(e(f).title),1),t("div",gc,[T(ve,{max:
115,rating:Number(e(r).average)},null,8,["rating"]),t("div",null,[me(B(e(r).average)+" sobre 5 en ",1),t("a",hc,B(e(r).totalOpinions)+" opiniones",1)])]),t("div",{class:"gaz-page__excerpt opinions-page__excerpt",innerHTML:e(r).excerpt},null,8,fc)])]),e(z)?(n(),i("nav",vc,[t("ul",null,[(n(!0),i(U,null,K(e(z),(ae,Ie)=>(n(),i("li",{key:Ie},[t("a",{href:ae.url,target:ae.external?"_blank":"_self"},B(ae.name),9,bc)]))),128))])])):w("",!0),t("main",yc,[t("aside",$c,[t("div",wc,[O[8]||(O[8]=t("h3",null,"Valoración de los usuarios",-1)),t("div",Cc,[T(ve,{max:5,rating:Number(e(r).average)},null,8,["rating"]),t("div",null,B(e(r).average)+" sobre 5",1)]),t("div",kc,[(n(!0),i(U,null,K(e(M),ae=>(n(),H(be,{key:ae.rating,title:`${a[Number(ae.rating)-1]}`,score:ae.percentage,showScoreDecimals:!1,isScoreInPercent:!0},null,8,["title","score"]))),128)),t("div",Tc,B(e(r).totalOpinions)+" valoraciones",1)]),e(r).criteria.length>0?(n(),i("div",xc,[(n(!0),i(U,null,K(e(r).criteria,(ae,Ie)=>(n(),i("div",{key:ae.rating_category_id},[t("span",null,B(ae.category_name),1),T(ve,{max:5,rating:Number(ae.average)},null,8,["rating"])]))),128))])):w("",!0),t("div",Ic,[T(le,{"format-i-d":e(ee).roba1,target:e(f).adsTarget,device:"mobile"},null,8,["format-i-d","target"])]),t("div",zc,[t("h4",null,"Opinar sobre "+B(e(f).title),1),O[7]||(O[7]=t("div",null,"Comparte tu opinión con otros usuarios",-1)),t("button",{type:"button",class:"gaz-button opinions-page__rating-solicitation-btn opinions-page__rating-solicitation-btn--desktop",onClick:O[1]||(O[1]=ae=>e(_).isVisible=!0)},"Escribir mi opinion")])])]),t("div",Lc,[t("div",Sc,[O[14]||(O[14]=t("h2",null,"Todos los comentarios",-1)),t("div",Ac,[t("div",null,[O[10]||(O[10]=t("label",{for:"orderOpinionsBy"},"Ordenar por:",-1)),ye(t("select",{name:"orderOpinionsBy",id:"orderOpinionsBy","onUpdate:modelValue":O[2]||(O[2]=ae=>Te(A)?A.value=ae:null),onChange:S,disabled:e(g)!=="all"||e(r).items.length<=1},O[9]||(O[9]=[t("option",{value:"recent",selected:""},"Recientes",-1),t("option",{value:"best_rating"},"Mejor Puntuación",-1),t("option",{value:"worst_rating"},"Peor Puntuación",-1)]),40,Pc),[[Mt,e(A)]])]),t("div",null,[O[12]||(O[12]=t("label",{for:"filterOpinionsBy"},"Filtrar por:",-1)),ye(t("select",{name:"filterOpinionsBy",id:"filterOpinionsBy","onUpdate:modelValue":O[3]||(O[3]=ae=>Te(g)?g.value=ae:null),onChange:S,disabled:e(r).items.length<=1},[O[11]||(O[11]=t("option",{value:"all",selected:""},"Todas las valoraciones",-1)),(n(),i(U,null,K(a,(ae,Ie)=>t("option",{value:Ie+1},B(ae),9,Dc)),64))],40,Ec),[[Mt,e(g)]])])]),t("div",{class:Z(["opinions-page__opinions-list",{"opinions-page__opinions-list--loading":e(u)}])},[e(r).items.length===0?(n(),H(le,{"format-i-d":e(ee).roba1,target:e(f).adsTarget,device:"desktop",key:`ad-${e(g)}-${e(I)}`},null,8,["format-i-d","target"])):w("",!0),(n(!0),i(U,null,K(e($),(ae,Ie)=>(n(),i(U,{key:Ie},[T(e(oc),{opinion:ae},null,8,["opinion"]),e(r).items.length===1||Ie===1||e($).length===1?(n(),H(le,{"format-i-d":e(ee).roba1,target:e(f).adsTarget,device:"desktop",key:`ad-${e(g)}-${e(I)}`},null,8,["format-i-d","target"])):w("",!0)],64))),128))],2),t("div",{class:Z(["opinions-page__opinions-load-btn",{"opinions-page__opinions-load-btn--no-more":!e(m)}])},[e(m)?(n(),i(U,{key:0},[e(u)?(n(),H(we,{key:1,class:"opinions-page__loading-icon"})):(n(),i("button",{key:0,class:"post-article__comments-btn gaz-button",onClick:R,disabled:e(u)},[T(ce,{class:"post-article__comments-icon"}),O[13]||(O[13]=t("span",null," Cargar más comentarios ",-1))],8,Mc))],64)):w("",!0),e($).length===0&&e(r).items.length===0?(n(),i("p",Oc,"Aún no hay opiniones. ¡Sé el primero en valorar!")):w("",!0),!e(m)&&!e(u)&&e(g)!=="all"&&e(C)===0&&e(r).items.length>0?(n(),i("p",Vc,"No hay opiniones con esta valoración.")):w("",!0)],2)]),t("article",Bc,[t("div",Hc,[t("div",Rc,[e(f).review?(n(),H(he,{key:0,class:"opinions-page__review-rating",post:e(f),showReadersScore:!1},null,8,["post"])):w("",!0),T(le,{"format-i-d":e(ee).roba2,target:e(f).adsTarget,device:"all"},null,8,["format-i-d","target"]),t("div",{class:"post-article__excerpt",innerHTML:e(f).excerpt},null,8,Gc),t("div",Nc,[t("span",{innerHTML:e(f).preAd},null,8,Fc),T(le,{"format-i-d":e(ee).roba3,target:e(f).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("span",{innerHTML:e(f).postAd},null,8,Uc),T(le,{"format-i-d":e(ee).roba4,target:e(f).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("span",{innerHTML:e(f).lateAd},null,8,qc)])])])]),e(r).relatedOpinions.length>0?(n(),i("div",jc,[O[15]||(O[15]=t("h3",null,"Otras opiniones",-1)),t("div",Wc,[(n(!0),i(U,null,K(e(r).relatedOpinions,(ae,Ie)=>(n(),H(e(Nt),{key:Ie,showTermLink:!1,showDescription:!1,opinion:ae,type:"mini"},null,8,["opinion"]))),128))])])):w("",!0),e(E)&&e(E).length>0?(n(),i("div",Yc,[O[16]||(O[16]=t("h3",null,"Noticias relacionadas",-1)),t("div",Kc,[(n(!0),i(U,null,K(e(E),ae=>(n(),H(Be,{key:ae.id,post:ae,"show-summary":!1},null,8,["post"]))),128))])])):w("",!0)])])]),T(je,{title:`Opinia sobre ${e(f).title}`,isVisible:e(_).isVisible,feedback:e(_).feedback,isLoading:e(_).isLoading,onClose:O[4]||(O[4]=ae=>e(_).isVisible=!1)},{default:re(()=>[T(e(Wl),{criterias:e(r).criteria,postId:e(_).postId},null,8,["criterias","postId"])]),_:1},8,["title","isVisible","feedback","isLoading"]),T(Ke,{visible:e(D),title:"Tu dirección ha sido verificada",onClose:O[5]||(O[5]=ae=>D.value=!1)},{default:re(()=>O[17]||(O[17]=[t("p",null,"Tu opinión será procesada para su publicación.",-1),t("p",null,"Si todo es correcto en breve la verás publicada",-1)])),footer:re(()=>[t("button",{class:"gaz-button gaz-button--primary",onClick:P},"¡Entendido!")]),_:1},8,["visible"]),t("button",{type:"button",class:Z(["gaz-button opinions-page__rating-solicitation-btn opinions-page__rating-solicitation-btn--mobile",{"is-visible":e(y)}]),onClick:O[6]||(O[6]=ae=>e(_).isVisible=!0)},"Escribir mi opinion",2),e(x)?(n(),H(Xe,{key:0,data:{postID:e(f).postId}},null,8,["data"])):w("",!0)],64)}}}),Qc=te(Xc,[["__scopeId","data-v-27a66212"]]),Jc=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),Zc={class:"term-page term-page-opinions"},ed={class:"term-page-opinions__title section-title"},td=["innerHTML"],od={class:"term-page-opinions__filter"},nd={__name:"Category",setup(o){const a=ie("gazConfigData"),{$resolveGazApiEndpoint:p}=fe(),c=Ve(),l=ue("content"),s=l.data,_=l.opinion,b=s.termId,x=G(1),y=G([]),I=G(null),h=G(!1),f=G("recent"),r=V(()=>{const k=[...y.value];return f.value==="best_rating"?k.sort(($,C)=>parseFloat(C.opinionsAverage)-parseFloat($.opinionsAverage)):f.value==="worst_rating"?k.sort(($,C)=>parseFloat($.opinionsAverage)-parseFloat(C.opinionsAverage)):k}),z=k=>{y.value=[...y.value,...k],x.value++};z((_==null?void 0:_.items)||[]);const M=()=>{const k=`${p()}/opinions/term/${a.value.site}/${b}/${x.value}`;$fetch(k).then($=>{Array.isArray($)&&$.length>0?z($):I.value&&(I.value.disconnect(),console.log("No more posts, stopping observer."))})};ge(()=>{var k;(k=_==null?void 0:_.items)!=null&&k.length&&(I.value=new IntersectionObserver($=>{$.forEach(C=>{C.isIntersecting&&M()})}),I.value.observe(document.getElementById("observer-lazy-load-opinion-term")))});const E=s.url;
11return De({title:s.seoTitle,description:s.seoDescription,robots:s.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:E,ogType:"website",ogTitle:s.seoTitle,ogDescription:s.seoDescription,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:s.seoTitle,twitterDescription:s.seoDescription,twitterDomain:a.value.site}),(k,$)=>{var A,F,u;const C=Oe,D=Nt,g=Jc;return n(),i("div",Zc,[T(C,{crums:e(s).breadcrumb,currentTitle:(A=e(_))==null?void 0:A.title},null,8,["crums","currentTitle"]),t("h1",ed,B((F=e(_))==null?void 0:F.title),1),t("div",{class:"term-page-opinions__description",innerHTML:(u=e(_))==null?void 0:u.description},null,8,td),t("div",od,[$[2]||($[2]=t("label",{for:"orderOpinionsTermBy"},"Ordenar por:",-1)),ye(t("select",{name:"orderOpinionsTermBy",id:"orderOpinionsTermBy","onUpdate:modelValue":$[0]||($[0]=m=>Te(f)?f.value=m:null)},$[1]||($[1]=[t("option",{value:"recent",selected:""},"Recientes",-1),t("option",{value:"best_rating"},"Mejor Puntuación",-1),t("option",{value:"worst_rating"},"Peor Puntuación",-1)]),512),[[Mt,e(f)]])]),t("div",{class:Z(["term-page-opinions__list",{"term-page-opinions__list--loading":e(h)}])},[(n(!0),i(U,null,K(e(r),(m,P)=>(n(),H(D,{key:m.id||P,showTermLink:!1,showDescription:!0,opinion:m,type:"medium"},null,8,["opinion"]))),128)),$[3]||($[3]=t("div",{id:"observer-lazy-load-opinion-term"},null,-1))],2),e(c)?(n(),H(g,{key:0,data:{termID:e(s).termId}},null,8,["data"])):w("",!0)])}}},sd=te(nd,[["__scopeId","data-v-1136e7a1"]]),ad={class:"term-page term-page-opinions"},rd={class:"term-page-opinions__title section-title"},id=["innerHTML"],ld={key:0,class:"term-page-opinions__anchors","aria-label":"Categorías de opiniones"},cd=["href","onClick"],dd={class:"term-page-opinions__search"},ud={key:1,class:"term-page-opinions__results"},_d={key:0,class:"term-page-opinions__list"},pd={key:1,class:"term-page-opinions__empty"},md=["id"],gd={class:"term-page-opinions__category-header"},hd={class:"term-page-opinions__category-title"},fd=["href"],vd=["href"],bd={class:"term-page-opinions__list"},yd={__name:"Home",setup(o){var E,k,$,C,D,g,A,F;const a=ie("gazConfigData"),p=ue("content"),c=V(()=>e(p)??{}),l=V(()=>c.value.data??{}),s=G(""),_=(u,m)=>`opinion-cat-${(u||"").toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"categoria"}-${m+1}`,b=(u,m)=>{const P=Array.isArray(u==null?void 0:u.items)?u.items:[],L=_(u==null?void 0:u.name,m);return{...u,anchorId:L,items:P.map(S=>({...S,category:S.category??{url:u==null?void 0:u.url,name:u==null?void 0:u.name}}))}},x=V(()=>{var m,P,L,S;const u=((m=l.value)==null?void 0:m.opinion)??((P=c.value)==null?void 0:P.opinion)??[];return Array.isArray(u)?u.map((R,oe)=>b(R,oe)):u&&typeof u=="object"?[b({...u,url:u.url||((L=l.value)==null?void 0:L.url),name:u.name||((S=l.value)==null?void 0:S.title)},0)]:[]}),y=V(()=>x.value.flatMap(u=>u.items)),I=V(()=>s.value.trim().toLowerCase()),h=V(()=>I.value?y.value.filter(u=>{var m;return(m=u.title)==null?void 0:m.toLowerCase().includes(I.value)}):y.value),f=V(()=>I.value.length>0),r=V(()=>x.value.map((u,m)=>({name:u.name||`Categoría ${m+1}`,anchorId:u.anchorId}))),z=u=>{if(!u)return;const m=document.getElementById(u);m!=null&&m.scrollIntoView&&m.scrollIntoView({behavior:"smooth",block:"start"})},M=(E=l.value)==null?void 0:E.url;return De({title:(k=l.value)==null?void 0:k.seoTitle,description:($=l.value)==null?void 0:$.seoDescription,robots:(C=l.value)!=null&&C.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:M,ogType:"website",ogTitle:(D=l.value)==null?void 0:D.seoTitle,ogDescription:(g=l.value)==null?void 0:g.seoDescription,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:(A=l.value)==null?void 0:A.seoTitle,twitterDescription:(F=l.value)==null?void 0:F.seoDescription,twitterDomain:a.value.site}),(u,m)=>{const P=Oe,L=Nt;return n(),i("div",ad,[T(P,{currentTitle:e(l).title},null,8,["currentTitle"]),t("h1",rd,B(e(l).title),1),t("div",{class:"term-page-opinions__description",innerHTML:e(l).description},null,8,id),!e(f)&&e(r).length?(n(),i("nav",ld,[(n(!0),i(U,null,K(e(r),S=>(n(),i("a",{key:S.anchorId,class:"term-page-opinions__anchor",href:`#${S.anchorId}`,onClick:xe(R=>
11z(S.anchorId),["prevent"])},B(S.name),9,cd))),128))])):w("",!0),t("div",dd,[ye(t("input",{id:"opinions-search",class:"term-page-opinions__search-input",type:"search","onUpdate:modelValue":m[0]||(m[0]=S=>Te(s)?s.value=S:null),placeholder:"Buscar por nombre","aria-label":"Buscar por nombre"},null,512),[[pt,e(s)]])]),e(f)?(n(),i("div",ud,[m[1]||(m[1]=t("h2",{class:"term-page-opinions__section-title"},"Resultados de la búsqueda",-1)),e(h).length?(n(),i("div",_d,[(n(!0),i(U,null,K(e(h),S=>(n(),H(L,{key:S.url||S.title,showTermLink:!0,showDescription:!1,opinion:S,type:"medium"},null,8,["opinion"]))),128))])):(n(),i("p",pd,'No hemos encontrado opiniones para "'+B(e(s))+'".',1))])):(n(!0),i(U,{key:2},K(e(x),S=>(n(),i("section",{key:S.url||S.name,id:S.anchorId,class:"term-page-opinions__category"},[t("header",gd,[t("h2",hd,[t("a",{href:S.url},B(S.name),9,fd)]),S.url?(n(),i("a",{key:0,class:"term-page-opinions__category-link",href:S.url}," Ver todas ",8,vd)):w("",!0)]),t("div",bd,[(n(!0),i(U,null,K(S.items,R=>(n(),H(L,{key:R.url||R.title,showTermLink:!1,showDescription:!1,opinion:R,type:"medium"},null,8,["opinion"]))),128))])],8,md))),128))])}}},$d=te(yd,[["__scopeId","data-v-fddc6f44"]]),wd=j(()=>W(()=>Promise.resolve().then(()=>zt),void 0,import.meta.url).then(o=>o.default||o)),Cd={class:"product-article__section product-slider"},kd={key:1,class:"product-slider__single"},Td={class:"product-slider__slide is-center"},xd=["src","alt","width","height"],Id={key:2,class:"product-slider__two-wrapper"},zd=["onClick"],Ld=["src","alt","width","height"],Sd={class:"product-slider__dots"},Ad=["onClick","aria-label"],Pd={key:3},Ed=["id","onClick"],Dd=["src","alt","width","height"],Md={key:2,class:"product-slider__dots"},Od=["onClick","aria-label"],Vd=ro({__name:"GalleryV2",props:{gallery:{},showNavigation:{type:Boolean,default:!0}},setup(o){const a=o,p=G(null),c=G(null),l=G(1),s=G(0),_=G(!1),b=G(!1),x=V(()=>a.gallery.length<=2?a.gallery:[a.gallery[a.gallery.length-1],...a.gallery,a.gallery[0]]),y=g=>{if(a.gallery.length<=2)return g;const A=a.gallery.length;return g===0?A-1:g===x.value.length-1?0:g-1},I=g=>{const A=c.value;if(!A)return;const u=A.querySelectorAll(".product-slider__slide")[g];if(!u)return;const m=u.offsetLeft,P=u.offsetWidth,L=A.offsetWidth,S=m-(L-P)/2;A.scrollTo({left:S,behavior:"smooth"})},h=()=>{if(b.value)return;b.value=!0;const g=s.value===0?1:0;s.value=g,I(g),setTimeout(()=>{b.value=!1},500)},f=g=>{b.value||(b.value=!0,s.value=g,I(g),setTimeout(()=>{b.value=!1},500))},r=g=>{g!==s.value&&!b.value&&f(g)},z=g=>{const A=g.querySelectorAll(".product-slider__slide"),F=g.scrollLeft+g.offsetWidth/2;let u=0,m=1/0;A.forEach((P,L)=>{const S=P,R=S.offsetLeft+S.offsetWidth/2,oe=Math.abs(F-R);oe<m&&(m=oe,u=L)}),l.value=u},M=g=>{const A=g.querySelectorAll(".product-slider__slide"),F=A[0].offsetWidth,u=A.length;if(l.value===u-1&&(g.scrollTo({left:F,behavior:"auto"}),l.value=1),l.value===0){const m=F*(u-2);g.scrollTo({left:m,behavior:"auto"}),l.value=u-2}},E=(g,A)=>{const u=A.querySelectorAll(".product-slider__slide")[g];if(!u){b.value=!1;return}const m=u.offsetLeft,P=u.offsetWidth,L=A.offsetWidth,S=m-(L-P)/2;A.scrollTo({left:S,behavior:"smooth"}),setTimeout(()=>{z(A),M(A),setTimeout(()=>{b.value=!1},50)},700)},k=g=>{const A=p.value;!A||b.value||(b.value=!0,E(g,A))},$=()=>{const g=p.value;!g||b.value||(b.value=!0,E(l.value+1,g))},C=()=>{const g=p.value;!g||b.value||(b.value=!0,E(l.value-1,g))},D=g=>{g!==l.value&&(b.value||k(g))};return ge(async()=>{if(a.gallery.length===1){_.value=!0;return}if(a.gallery.length===2){const A=c.value;if(A){await Fe();const F=Array.from(A.querySelectorAll("img")).map(u=>u.complete?Promise.resolve():new Promise(m=>{u.addEventListener("load",m),u.addEventListener("error",m)}));await Promise.all(F),I(0),_.value=!0}return}const g=p.value;if(g){let A=!1,F,u,m=!1;const P=g.querySelectorAll(".product-slider__slide");g.querySelectorAll("img").forEach(O=>{O.addEventListener("dragstart",de=>de.preventDefault())}),await Fe();const L=Array.from(g.querySelectorAll("img")).map(O=>O.complete?Promise.resolve():new Promise(de=>{O.addEventListener("load",de),O.addEventListener("error",de)}));await Promise.all(L);const S=P[1],R=S.offsetLeft,oe=S.offsetWidth,se=g.offsetWidth,ne=R-(se-oe)/2;g.scrollTo({left:ne,behavior:"auto"}),z(g),_.value=!0,g.addEventListener("wheel",O=>{if(O.preventDefault(),m||b.value)return;const de=O.deltaY>0?1:-1,ve=l.value+de;b.value=!0,E(ve,g),m=!0,setTimeout(()=>{m=!1},800)},{passive:!1}),g.addEventListener("mousedown",O=>{A=!0,g.classList.add("is-dragging"),F=O.pageX-g.getBoundingClientRect().left,u=g.scrollLeft}),document.addEventListener("mouseup",()=>{A&&(A=!1,g.classList.remove("is-dragging"),z(g),M(g))}),document.addEventListener("mousemove",O=>{if(!A)return;O.preventDefault();const ve=O.pageX-g.getBoundingClientRect().left-F;g.scrollLeft=u-ve}),g.addEventListener("mouseleave",()=>{A&&(A=!1,g.classList.remove("is-dragging"),z(g),M(g))}),g.addEventListener("scroll",()=>{z(g)})}}),(g,A)=>{const F=wd;return n(),i("section",Cd,[e(_)?w("",!0):(n(),H(F,{key:0,class:"product-slider__loading-icon"})),a.gallery.length===1?(n(),i("div",kd,[t("div",Td,[t("img",{class:"product-slider__img",src:a.gallery[0].url,alt:a.gallery[0].alt,width:a.gallery[0].width,height:a.gallery[0].height},null,8,xd)])])):a.gallery.length===2?(n(),i("div",Id,[t("div",{class:Z(["product-slider__slides product-slider__slides--two",{"is-ready":e(_)}]),ref_key:"sliderSlidesTwo",ref:c},[(n(!0),i(U,null,K(a.gallery,(u,m)=>(n(),i("div",{class:Z(["product-slider__slide",{"is-center":m===e(s)}]),key:`two-${m}`,onClick:P=>r(m)},[t("img",{class:"product-slider__img",src:u.url,alt:u.alt,width:u.width,height:u.height}
11,null,8,Ld)],10,zd))),128))],2),e(_)&&a.showNavigation?(n(),i("button",{key:0,class:"product-slider__arrow product-slider__arrow--prev",onClick:h,"aria-label":"Imagen anterior"},A[0]||(A[0]=[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):w("",!0),e(_)&&a.showNavigation?(n(),i("button",{key:1,class:"product-slider__arrow product-slider__arrow--next",onClick:h,"aria-label":"Siguiente imagen"},A[1]||(A[1]=[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):w("",!0),t("div",Sd,[(n(!0),i(U,null,K(a.gallery,(u,m)=>(n(),i("button",{key:m,class:Z(["product-slider__dot",{"is-active":e(s)===m}]),onClick:P=>f(m),"aria-label":`Ir a imagen ${m+1}`},null,10,Ad))),128))])])):(n(),i("div",Pd,[t("div",{class:Z(["product-slider__slides",{"is-ready":e(_)}]),ref_key:"sliderSlides",ref:p},[(n(!0),i(U,null,K(e(x),(u,m)=>(n(),i("div",{class:Z(["product-slider__slide",{"is-center":m===e(l)}]),id:`slide-${m}`,key:`${m}-${u.url}`,onClick:P=>D(m)},[t("img",{class:"product-slider__img",src:u.url,alt:u.alt,width:u.width,height:u.height},null,8,Dd)],10,Ed))),128))],2),e(_)&&a.showNavigation?(n(),i("button",{key:0,class:"product-slider__arrow product-slider__arrow--prev",onClick:C,"aria-label":"Imagen anterior"},A[2]||(A[2]=[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):w("",!0),e(_)&&a.showNavigation?(n(),i("button",{key:1,class:"product-slider__arrow product-slider__arrow--next",onClick:$,"aria-label":"Siguiente imagen"},A[3]||(A[3]=[t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))):w("",!0),e(_)?(n(),i("div",Md,[(n(!0),i(U,null,K(a.gallery,(u,m)=>(n(),i("button",{key:m,class:Z(["product-slider__dot",{"is-active":y(e(l))===m}]),onClick:P=>k(m+1),"aria-label":`Ir a imagen ${m+1}`},null,10,Od))),128))])):w("",!0)]))])}}}),Io=te(Vd,[["__scopeId","data-v-1e94ddf0"]]),Bd=["href"],Hd=["src"],Rd={__name:"PriceBtn",props:{vendor:{type:[String,Number],required:!0},url:{type:String,required:!0},price:{type:[String,Number],required:!0}},setup(o){return(a,p)=>(n(),i("a",{href:o.url,target:"_blank",class:"product-article__price-btn",rel:"nofollow sponsored noopener noreferrer"},[t("img",{loading:"lazy",src:`/imgs/shop_icons/shop${o.vendor}.svg`,width:"30"},null,8,Hd),t("span",null,B(o.price),1)],8,Bd))}},zo=te(Rd,[["__scopeId","data-v-f3a976d7"]]),oo=3,Kt=()=>{const{$resolveGazApiEndpoint:o}=fe(),a=ie("compareCard",()=>({isVisible:!1,isLoading:!1,products:[],catalog:[],feedback:{status:"info",message:""}})),p=r=>{a.value.products=r?[r]:[]},c=r=>a.value.products.findIndex(M=>typeof r=="number"||typeof r=="string"?M.id===r||M.slug===r:M.id===r.id||M.slug&&M.slug===r.slug),l=r=>{if(!(!r||c(r)!==-1)){if(a.value.products.length>=oo){y("warning",`Solo puedes comparar hasta ${oo} productos`);return}a.value.products.push(r),a.value.isVisible=!0}},s=r=>{const z=c(r);z!==-1&&a.value.products.splice(z,1)},_=r=>{r&&p(r),a.value.isVisible=!0,f()},b=()=>{a.value.isVisible=!1,a.value.isLoading=!1,a.value.feedback={status:"info",message:""}},x=r=>{a.value.isLoading=r},y=(r,z)=>{a.value.feedback.status=r,a.value.feedback.message=z},I=()=>{if(typeof window>"u")return[];const r=sessionStorage.getItem("products");if(!r)return[];try{const z=JSON.parse(r);return Array.isArray(z)?z:[]}catch(z){return console.warn("No se pudo parsear products de sessionStorage",z),[]}},h=r=>{if(!(typeof window>"u"))try{sessionStorage.setItem("products",JSON.stringify(r||[]))}catch(z){console.warn("No se pudo guardar products en sessionStorage",z)}},f=async()=>{const r=I();if(r.length)return a.value.catalog=r,r;a.value.isLoading=!0;try{const z=`${o()}/product-list/movilzona.es`,M=await $fetch(z),E=Array.isArray(M)?M:[];return a.value.catalog=E,h(E),E}catch(z){return console.error("Error cargando catálogo de productos para comparar",z),y("error","No se pudieron cargar productos para comparar"),[]}finally{a.value.isLoading=!1}};return{compareCard:a,openCompareCard:_,closeCompareCard:b,addProduct:l,removeProduct:s,setMainProduct:p,set
11Loading:x,updateFeedback:y,loadCatalogIfNeeded:f}},Gd=j(()=>W(()=>import("./CQrNO3ra.js"),__vite__mapDeps([75,76,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,77]),import.meta.url).then(o=>o.default||o)),Nd=j(()=>W(()=>import("./CzjyQh7Q.js"),__vite__mapDeps([30,31,3,4,32,18,5,6,19,7,8,9,10,11,12,13,14,15,16,17,20,21,33]),import.meta.url).then(o=>o.default||o)),Fd=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),Ud=j(()=>W(()=>import("./BRY3QZs3.js"),__vite__mapDeps([78,3,4,76,10,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,79]),import.meta.url).then(o=>o.default||o)),qd=j(()=>W(()=>import("./DbsV9yor.js"),__vite__mapDeps([44,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,45]),import.meta.url).then(o=>o.default||o)),jd=j(()=>W(()=>import("./DIQqbBSw.js"),__vite__mapDeps([46,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,47]),import.meta.url).then(o=>o.default||o)),Wd=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),Yd=j(()=>W(()=>import("./BSqEa-6Z.js"),__vite__mapDeps([80,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,81]),import.meta.url).then(o=>o.default||o)),Kd=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),Xd={class:"post-article product-article"},Qd={class:"product-article__header"},Jd={class:"post-article__title heading product-article__title"},Zd=["datetime"],eu={class:""},tu={class:"product-article__grid"},ou={class:"product-article__share-col"},nu={class:"product-article__content-wrapper"},su={key:0,class:"product-article__price-bar"},au={class:"product-article__price-btns"},ru={class:"product-article__content-wrapper-inner"},iu={class:"product-article__resume"},lu={class:"product-article__resume-item"},cu=["datetime"],du={class:"product-article__resume-item"},uu={class:"product-article__resume-value"},_u={class:"product-article__resume-item product-article__resume-item--mobile"},pu={class:"product-article__resume-value"},mu={class:"product-article__section features-summary-wrapper"},gu={class:"product-article__section-title"},hu={class:"post-article__body"},fu={class:"post-article__content"},vu=["innerHTML"],bu={key:1,class:"post-article__entry-content"},yu=["innerHTML"],$u=["innerHTML"],wu=["innerHTML"],Cu={class:"flex-center"},ku={__name:"Post",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){ie("gazConfigData");const{commentsCard:a,showPostComments:p}=at(),{compareCard:c,openCompareCard:l,closeCompareCard:s}=Kt(),{getPostDate:_}=Tt(),b=Ve(),y=ue("content").data,I=y.product||{},h=G(y.commentCount||0),f=V(()=>{const k=I.gallery||[];return k.length>0?k:I.phoneBigImageData?[I.phoneBigImageData]:[]}),r=V(()=>!!(y.excerpt||y.preAd||y.postAd||y.lateAd));ge(()=>{It()});const z=k=>{h.value=k},M=()=>{l(I)},E=()=>{a.value.isVisible=!1,a.value.postId=void 0};return(k,$)=>{const C=Oe,D=Io,g=ht,A=zo,F=Gd,u=Nd,m=Fd,P=Ud,L=qt,S=qd,R=jd,oe=Wd,se=Yd,ne=Kd;return n(),i(U,null,[t("article",Xd,[T(C,{crums:e(y).breadcrumb},null,8,["crums"]),t("header",Qd,[t("button",{class:"gaz-button product-article__compare-btn",onClick:M},$[1]||($[1]=[t("svg",{width:"30",height:"30",fill:"white",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M2 4h9v1H3v15h8v1H2zm10 19h1V2h-1zM8.283 10.283l-.566-.566L4.934 12.5l2.783 2.783.566-.566L6.566 13H11v-1H6.566zM14 12h4.08l-1.54-1.54.92-.92 2.96 2.96-2.96 2.96-.92-.92L18.08 13H14v8h9V4h-9z"}),t("path",{fill:"none",d:"M0 0h24v24H0z"})],-1)])),t("div",null,[t("h1",Jd,B(e(I).basicInfo.h1||e(y).title),1),t("time",{class:"product-article__pubdate publication-date",datetime:e(_)(e(y),!1)},B(e(_)(e(y),!0)),9,Zd)])]),t("section",eu,[T(D,{gallery:e(f)},null,8,["gallery"])]),t("div",tu,[t("div",ou,[T(g,{class:"product-article__social-share",title:e(y).title,url:e(y).canonical,postId:e(y).postId,commentCount:e(h),showCommentsText:!1},null,8,["title","url","postId","commentCount"])]),t("div",nu,[e(I).prices&&e(I).prices.length>0?(n(),i("section",su,[t("div",au,[(n(!0),i(U,null,K(e(I).prices,O=>(n(),H(A,{key:O.url||`${O.vendor}-${O.price}`,vendor:O.vendor,url:O.url,price:O.price},null,8,["vendor","url","price"]))),128))])])):w("",!0),t("div",ru,[t("div",iu,[t("div",lu,[$[2]||($[2]=t("span",null,"Fecha de lanzamiento: ",-1)),t("time",{class:"product-article__resume-value",datetime:e(I).phoneLaunchDate},B(e(I).phoneLaunchDate),9,cu)]),t("div",du,[$[3]||($[3]=t("span",null,"Marca: ",
11-1)),t("span",uu,B(e(I).basicInfo.brand),1)]),t("div",_u,[$[4]||($[4]=t("span",null,"Modelo: ",-1)),t("span",pu,B(e(y).title),1)])]),t("section",mu,[t("h2",gu,[$[5]||($[5]=me("Resumen de características del ")),t("em",null,B(e(y).title),1)]),T(F,{class:"product-article__features-summary",features:e(I).specifications},null,8,["features"])]),e(y).review?(n(),H(u,{key:0,class:"product-article__review",post:e(y)},null,8,["post"])):w("",!0),t("div",hu,[t("div",fu,[e(r)?(n(),i("div",{key:0,class:"post-article__excerpt",innerHTML:e(y).excerpt},null,8,vu)):w("",!0),T(m,{"format-i-d":e(ee).roba1,target:e(y).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),e(r)?(n(),i("div",bu,[t("span",{innerHTML:e(y).preAd},null,8,yu),T(m,{"format-i-d":e(ee).roba2,target:e(y).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("span",{innerHTML:e(y).postAd},null,8,$u),t("span",{innerHTML:e(y).lateAd},null,8,wu)])):w("",!0)])]),T(P,{specs:e(I).specifications,hasArticle:e(r),adTarget:e(y).adsTarget,class:"product-article__specs"},null,8,["specs","hasArticle","adTarget"])])])]),t("div",Cu,[t("button",{class:"post-article__comments-btn gaz-button gaz-button gaz-button",onClick:$[0]||($[0]=O=>e(p)(e(y).postId))},[T(L,{class:"post-article__comments-icon"}),$[6]||($[6]=t("span",null,"Ver comentarios",-1))])])]),T(oe,{title:e(y).title,isVisible:e(a).isVisible,feedback:e(a).feedback,isLoading:e(a).isLoading,onClose:E},{header:re(()=>[T(S)]),default:re(()=>[T(R,{onCommentCreated:z})]),_:1},8,["title","isVisible","feedback","isLoading"]),T(oe,{title:`Comparar ${e(y).title} con...`,isVisible:e(c).isVisible,feedback:e(c).feedback,isLoading:e(c).isLoading,onClose:e(s)},{default:re(()=>[T(se)]),_:1},8,["title","isVisible","feedback","isLoading","onClose"]),e(b)?(n(),H(ne,{key:0,data:{postID:e(y).postId}},null,8,["data"])):w("",!0)],64)}}},Tu=te(ku,[["__scopeId","data-v-5580db34"]]),xu={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Iu(o,a){return n(),i("svg",xu,a[0]||(a[0]=[t("path",{d:"M19 2a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2zm-8.5 0h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1M12 22a1 1 0 1 1 0-2 1 1 0 0 1 0 2m5-3H7V4.976h10z"},null,-1)]))}const Lo={render(){return Pe(Ee,{icon:{render:Iu},name:"smartphone"})}},zu={xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","stroke-linejoin":"round","stroke-miterlimit":"2","clip-rule":"evenodd",viewBox:"0 0 24 24"};function Lu(o,a){return n(),i("svg",zu,a[0]||(a[0]=[t("path",{d:"m12 10.93 5.719-5.72a.749.749 0 1 1 1.062 1.062l-5.72 5.719 5.719 5.719a.75.75 0 1 1-1.061 1.062L12 13.053l-5.719 5.719A.75.75 0 0 1 5.22 17.71l5.719-5.719-5.72-5.719A.752.752 0 0 1 6.281 5.21z"},null,-1)]))}const Su={render(){return Pe(Ee,{icon:{render:Lu},name:"xMark"})}},Au={class:"product-spec-value"},Pu=["innerHTML"],Eu={__name:"SpecValue",props:{value:{type:[String,Number,Boolean,Array],default:""},trimSlash:{type:Boolean,default:!1}},setup(o){const a=o,p=V(()=>{if(a.value===null||a.value===void 0)return"";if(Array.isArray(a.value)){const b=a.value.map(x=>x==null?"":x.toString().trim()).filter(Boolean);return b.length?`<ul>${b.map(x=>`<li>${x}</li>`).join("")}</ul>`:""}const _=a.value.toString().trim();if(a.trimSlash&&_.includes("/")){const b=_.split("/").map(x=>x.trim()).filter(Boolean);return b.length?`<ul>${b.map(x=>`<li>${x}</li>`).join("")}</ul>`:""}return _}),c=V(()=>{const _=p.value.toLowerCase();return _==="si"||_==="sí"?"check":_==="no"?"xMark":"text"}),l=V(()=>c.value!=="text"),s=V(()=>c.value==="check"?xo:c.value==="xMark"?Su:null);return(_,b)=>(n(),i("div",Au,[e(l)?(n(),H(kt(e(s)),{key:0,class:Z(`product-spec-value__icon product-spec-value__icon--${e(c)}`)},null,8,["class"])):(n(),i("span",{key:1,innerHTML:e(p)},null,8,Pu))]))}},Du=te(Eu,[["__scopeId","data-v-e1de91cd"]]),Mu=j(()=>W(()=>Promise.resolve().then(()=>zt),void 0,import.meta.url).then(o=>o.default||o)),Ou=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),Vu=j(()=>W(()=>import("./BSqEa-6Z.js"),__vite__mapDeps([80,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,81]),import.meta.url).then(o=>o.default||o)),Bu=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),Hu={key:0,class:"gallery-overlay"},Ru={class:"gallery-overlay__header"},Gu={class:"gallery-overlay__title"},Nu={class:"gallery-overlay__content"},Fu={class:"compare-hero__content"},Uu={class:"compare-hero__title"},qu=["href"],ju={class:"compare-hero__image"},Wu=["src","alt"],Yu={key:0},Ku={key:1,class:"compare-hero__gallery"},Xu=["onClick"],Qu=["src","alt"],Ju=["onClick"],Zu={key:2,class:"compare-hero__price"},e_={class:"compare-hero__launch-date"},t_={class:"compare-hero__content compare-hero__content--empty"},o_={class:"comparison-header main-container"},n_={key:0,class:"comparison-header__image"},s_=["src","alt"],a_={class:"comparison-header__title"},r_={class:"comparison-header__price-from"},i_={class:"product-compare-page__options"},l_={class:"comparison-content"},c_=["onClick"],d_={class:"specs-table-title__text"},u_=["aria-label"],__={class:"specs-table__rating-row"},p_={class:"specs-table__value"},m_={key:0,class:"specs-table__rating"},g_={scope:"row"},h_={class:"specs-table__property"},f_={class:"specs-table specs-table--prices","aria-label":"Tabla comparativa para precios"},v_={key:0,class:"prices-list"},b_={key:1,class:"specs-table__value"},y_=3,$_=5,w_={__name:"Comparative",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){var bt;const a=ie("gazConfigData"),p=ue("content"),c=V(()=>e(p)??{}),l=V(()=>{var v;const d=(v=c.value)==null?void 0:v.data;return d&&!Array.isArray(d)?d:{}}),s=V(()=>{var q,N;const d=(q=c.value)==null?void 0:q.products;if(Array.isArray(d))return d;const v=(N=c.value)==null?void 0:N.data;return Array.isArray(v)?v:[]}),_=d=>{var q;const v=(d==null?void 0:d.product)||{};return{...v,postId:d==null?void 0:d.postId,postUrl:d==null?void 0:d.url,title:(d==null?void 0:d.title)||((q=v==null?void 0:v.basicInfo)==null?void 0:q.h1)||"",canonical:(d==null?void 0:d.canonical)||(d==null?void 0:d.url)||"",breadcrumb:Array.isArray(d==null?void 0:d.breadcrumb)?d.breadcrumb:[],phoneLaunchDate:(v==null?void 0:v.phoneLaunchDate)||"-",prices:Array.isArray(v==null?void 0:v.prices)?v.prices:[],gallery:Array.isArray(v==null?void 0:v.gallery)?v.gallery:[],phoneImageData:(v==null?void 0:v.phoneImageData)||null,phoneBigImageData:(v==null?void 0:v.phoneBigImageData)||null,specifications:Array.isArray(v==null?void 0:v.specifications)?v.specifications:[],basicInfo:(v==null?void 0:v.basicInfo)||{}}},b=V(()=>s.value.slice(0,3).map(_)),x=V(()=>{var v,q;if((v=l.value)!=null&&v.title)return l.value.title;if((q=l.value)!=null&&q.seoTitle)return l.value.seoTitle;const d=b.value.map(N=>
11Se(N)).filter(Boolean);return d.length?d.join(" vs "):"Comparación de teléfonos móviles"}),y=V(()=>b.value.some(d=>(d.prices??[]).length>0)),I=V(()=>{var d;return((d=l.value)==null?void 0:d.adsTarget)||""}),{compareCard:h,openCompareCard:f,closeCompareCard:r,loadCatalogIfNeeded:z}=Kt(),M=d=>d!==null&&typeof d=="object",E=G(null),k=G(!1),$=G(!1),C=()=>{$.value=window.innerWidth<1280},D=()=>$.value?y_:$_,g=d=>{if(!d||d.length===0)return[];const v=D();return d.slice(0,v)},A=d=>{if(!d||d.length===0)return 0;const v=D();return Math.max(0,d.length-v)},F=G(!1);let u=null;const m=()=>{le.value&&(u=new IntersectionObserver(d=>{d.forEach(v=>{const q=!v.isIntersecting;q&&!F.value?(F.value=!0,P.isVisible&&S()):!q&&F.value&&(F.value=!1)})},{threshold:0,rootMargin:"-10px 0px 0px 0px"}),u.observe(le.value))},P=ao({isVisible:!1,title:"",gallery:[],itemIndex:0}),L=d=>{const v=b.value[d];v&&(P.itemIndex=d,P.title=Se(v),P.gallery=R(v),P.isVisible=!0)},S=()=>{P.isVisible=!1,P.gallery=[],P.title=""},R=d=>{if(!d)return[];const v=d.gallery||[];return v.length>0?v:d.phoneBigImageData?[d.phoneBigImageData]:[]},oe=d=>{d.key==="Escape"&&P.isVisible&&S()},se=G(new Set),ne=d=>d==="prices"?Le.value.length:Le.value.findIndex(v=>v.id===d),O=d=>{Fe(()=>{requestAnimationFrame(()=>{const v=ne(d);if(v<0)return;const q=he.value[v];q&&(q.scrollLeft=Be.value)})})},de=d=>{se.value.has(d)?se.value.delete(d):(se.value.add(d),O(d)),se.value=new Set(se.value)},ve=d=>{se.value.has(d)||(se.value.add(d),O(d),se.value=new Set(se.value))},be=d=>se.value.has(d),le=G(null),ce=G(null),we=G(null),he=G([]),Be=G(0);let je=!1;const Ke=(d,v)=>{d&&(he.value[v]=d)},Xe=d=>d?Array.isArray(d)?d.reduce((v,q)=>(q&&typeof q=="object"&&!Array.isArray(q)&&Object.entries(q).forEach(([N,Y])=>{v[N]=Y}),v),{}):typeof d=="object"?d:{}:{},ae=d=>d==null||d===""?"-":d,Ie=d=>Array.isArray(d)&&d.some(v=>v!==null&&typeof v=="object"),He=d=>!(d==null||d===""||M(d)&&!Array.isArray(d)||Array.isArray(d)&&(d.length===0||Ie(d))),ft=d=>(d==null?void 0:d.postUrl)||(d==null?void 0:d.canonical)||"#",Se=d=>{var v;return ae((d==null?void 0:d.title)||((v=d==null?void 0:d.basicInfo)==null?void 0:v.h1)||"")},rt=d=>{var v,q;return((q=(v=d==null?void 0:d.prices)==null?void 0:v[0])==null?void 0:q.price)||""},Lt=d=>{var v,q;return((q=(v=d==null?void 0:d.prices)==null?void 0:v[0])==null?void 0:q.url)||"#"},it=d=>{var v,q,N,Y;return((v=d==null?void 0:d.phoneImageData)==null?void 0:v.url)||((q=d==null?void 0:d.phoneBigImageData)==null?void 0:q.url)||((Y=(N=d==null?void 0:d.gallery)==null?void 0:N[0])==null?void 0:Y.url)||""},vt=d=>{var v;return((v=d==null?void 0:d.phoneImageData)==null?void 0:v.alt)||Se(d)},X=d=>{var v,q,N,Y;return((v=d==null?void 0:d.phoneBigImageData)==null?void 0:v.url)||((q=d==null?void 0:d.phoneImageData)==null?void 0:q.url)||((Y=(N=d==null?void 0:d.gallery)==null?void 0:N[0])==null?void 0:Y.url)||""},Q=d=>{var v;return((v=d==null?void 0:d.phoneBigImageData)==null?void 0:v.alt)||Se(d)},$e=()=>{f()},ze=async()=>{const d=b.value.map(Y=>Y==null?void 0:Y.postId).filter(Y=>Y!=null).map(Y=>String(Y));if(!d.length)return;const v=await z();if(!Array.isArray(v)||v.length===0)return;const q=new Map(v.filter(Y=>(Y==null?void 0:Y.post_id)!==null&&(Y==null?void 0:Y.post_id)!==void 0||(Y==null?void 0:Y.id)!==null&&(Y==null?void 0:Y.id)!==void 0).map(Y=>[String(Y.post_id??Y.id),Y])),N=d.map(Y=>q.get(Y)).filter(Boolean);N.length>0&&(h.value.products=N)},Qe=async()=>{y.value&&(ve("prices"),await Fe(),requestAnimationFrame(()=>{var N;const d=we.value;if(!d)return;const v=((N=ce.value)==null?void 0:N.offsetHeight)??0,q=d.getBoundingClientRect().top+window.scrollY-v-8;window.scrollTo({top:Math.max(q,0),behavior:"smooth"})}))},Je=(d,v,q)=>{var _e,Ce;const N=(_e=d==null?void 0:d.specifications)==null?void 0:_e.find(Pt=>Pt.key===v),Y=(Ce=Xe(N==null?void 0:N.values))==null?void 0:Ce[q];return He(Y)?ae(Y):"-"},We=(d,v)=>{var Y;const q=(Y=d==null?void 0:d.specifications)==null?void 0:Y.find(_e=>_e.key===v),N=q==null?void 0:q.rating;return N===0||N==="0"||N==null||N===""?"":N},Ze=(d,v)=>We(d,v)!=="",et=d=>String(d||"").toLowerCase()==="extras",Ae=[ee.roba1,ee.roba2,ee.roba3],Me=d=>{if((d+1)%3!==0)return null;const v=Math.floor((d+1)/3)-1;return Ae[v]||null},Ye=()=>{const d=new Map;return b.value.forEach(v=>
11{((v==null?void 0:v.specifications)??[]).forEach(q=>{const N=q.key;d.has(N)||d.set(N,{id:N,label:q.label??N,valueKeys:new Set});const Y=d.get(N);Object.entries(Xe(q.values)).forEach(([_e,Ce])=>{He(Ce)&&Y.valueKeys.add(_e)})})}),Array.from(d.values()).map(v=>({id:v.id,label:v.label,rows:Array.from(v.valueKeys).map(q=>({label:q}))}))},Le=V(()=>Ye());nt(Le,d=>{const v=new Set;d.length>0&&v.add(d[0].id),se.value.has("prices")&&v.add("prices"),se.value=v},{immediate:!0});const tt=(d,v)=>{if(je)return;je=!0;const q=[];le.value&&q.push(le.value),F.value&&ce.value&&q.push(ce.value),he.value.forEach(_e=>{_e&&q.push(_e)});let N=1/0;q.forEach(_e=>{if(_e){const Ce=_e.scrollWidth-_e.clientWidth;Ce<N&&Ce>0&&(N=Ce)}}),N===1/0&&(N=0);const Y=Math.min(Math.max(0,v),N);Be.value=Y,q.forEach(_e=>{_e&&(_e.scrollLeft=Y)}),requestAnimationFrame(()=>{je=!1})},ot=()=>{var d;tt(le.value,((d=le.value)==null?void 0:d.scrollLeft)??0)},Re=()=>{var d;tt(ce.value,((d=ce.value)==null?void 0:d.scrollLeft)??0)},St=d=>{const v=he.value[d];tt(v,(v==null?void 0:v.scrollLeft)??0)};nt(F,d=>{var v;if(d&&ce.value){const q=Be.value??((v=le.value)==null?void 0:v.scrollLeft)??0;ce.value.scrollLeft=q,requestAnimationFrame(()=>{ce.value&&(ce.value.scrollLeft=q)}),ce.value.removeEventListener("scroll",Re),ce.value.addEventListener("scroll",Re,{passive:!0})}else!d&&ce.value&&ce.value.removeEventListener("scroll",Re)},{flush:"post"}),ge(()=>{k.value=!0,C(),window.addEventListener("resize",C),window.addEventListener("keydown",oe),ze(),Fe(()=>{m()}),le.value&&le.value.addEventListener("scroll",ot,{passive:!0}),he.value.forEach((d,v)=>{if(d){const q=()=>St(v);d.__syncHandler=q,d.addEventListener("scroll",q,{passive:!0})}})}),Vt(()=>{window.removeEventListener("resize",C),window.removeEventListener("keydown",oe),u&&u.disconnect(),le.value&&le.value.removeEventListener("scroll",ot),ce.value&&ce.value.removeEventListener("scroll",Re),he.value.forEach((d,v)=>{d&&d.removeEventListener("scroll",d.__syncHandler)})});const lt=V(()=>{var d;return((d=l.value)==null?void 0:d.seoTitle)||x.value}),ct=V(()=>{var v;if((v=l.value)!=null&&v.seoDescription)return l.value.seoDescription;const d=s.value[0];return(d==null?void 0:d.seoDescription)||""}),At=V(()=>{var d,v,q,N;return(d=l.value)!=null&&d.canonical?l.value.canonical:(v=l.value)!=null&&v.url?l.value.url:((q=s.value[0])==null?void 0:q.canonical)||((N=s.value[0])==null?void 0:N.url)||""});return De({title:lt,description:ct,robots:(bt=l.value)!=null&&bt.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:At,ogType:"website",ogTitle:lt,ogDescription:ct,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:lt,twitterDescription:ct,twitterDomain:a.value.site}),(d,v)=>{const q=so,N=Io,Y=Mu,_e=zo,Ce=Lo,Pt=ht,Xt=lo,Qt=qo,Po=Du,Eo=Ou,Do=Vu,Mo=Bu;return n(),i(U,null,[t("article",{class:"product-compare-page",ref_key:"pageRef",ref:E},[t("div",{class:"product-compare-page__header",ref_key:"mainHeaderScrollRef",ref:le},[T(Ne,{name:"gallery-overlay"},{default:re(()=>[P.isVisible?(n(),i("div",Hu,[t("div",Ru,[t("h3",Gu,B(P.title),1),t("button",{class:"gallery-overlay__close",onClick:S,"aria-label":"Cerrar galería"},[T(q)])]),t("div",Nu,[P.isVisible?(n(),H(N,{key:0,gallery:P.gallery},null,8,["gallery"])):w("",!0)]),v[2]||(v[2]=t("div",{class:"gallery-overlay__fade"},null,-1))])):w("",!0)]),_:1}),t("div",{class:Z(["compare-hero",{"is-hidden":P.isVisible}])},[(n(!0),i(U,null,K(b.value,(J,ke)=>{var pe,Ge;return n(),i("div",{key:`hero-${ke}`,class:"compare-hero__item"},[t("div",Fu,[t("h2",Uu,[t("a",{href:ft(J)},B(Se(J)),9,qu)]),t("div",ju,[t("img",{src:X(J),alt:Q(J),loading:"lazy"},null,8,Wu)]),k.value?J.gallery&&J.gallery.length>0?(n(),i("div",Ku,[(n(!0),i(U,null,K(g(J.gallery),(dt,Oo)=>(n(),i("div",{key:`gallery-${ke}-${Oo}`,class:"compare-hero__gallery-item",onClick:Vm=>L(ke)},[t("img",{src:dt.url,alt:dt.alt||Se(J),loading:"lazy"},null,8,Qu)],8,Xu))),128)),A(J.gallery)>0?(n(),i("div",{key:0,class:"compare-hero__gallery-item compare-hero__gallery-more",onClick:dt=>L(ke)}," +"+B(A(J.gallery)),9,Ju)):w("",!0)])):w("",!0):(n(),i("div",Yu,[T(Y,{class:"compare-hero__loading"})])),rt(J)?(n(),i("div",Zu,[T(_e,{url:Lt(J),price:rt(J),vendor:(Ge=(pe=J.prices)==null?void 0:pe[0])==null?void 0:Ge.vendor},null,8,["url","price","vendor"])])):w("",!0),t("div",e_,[v[3]||(v[3]=me(" Fecha de lanzamiento: ")),t("span",null,B(J.ph
11oneLaunchDate),1)])])])}),128)),b.value.length===2?(n(),i("div",{key:0,class:"compare-hero__item compare-hero__item--empty",onClick:$e},[t("div",t_,[T(Ce,{class:"compare-hero__empty-icon"}),v[4]||(v[4]=t("span",{class:"compare-hero__empty-text"},"VS",-1))])])):w("",!0)],2)],512),T(Ne,{name:"sticky-header"},{default:re(()=>[ye(t("div",{class:"comparison-header-wrapper",ref_key:"headerScrollRef",ref:ce},[t("div",o_,[(n(!0),i(U,null,K(b.value,(J,ke)=>(n(),i("div",{key:`header-${ke}`,class:"comparison-header__item"},[it(J)?(n(),i("div",n_,[t("img",{src:it(J),alt:vt(J),loading:"lazy"},null,8,s_)])):w("",!0),t("div",a_,[me(B(Se(J)),1),v[6]||(v[6]=t("br",null,null,-1)),t("span",r_,[v[5]||(v[5]=me(" desde ")),t("a",{href:"#",onClick:xe(Qe,["prevent"])},B(rt(J)),1)])])]))),128)),b.value.length===2?(n(),i("div",{key:0,class:"comparison-header__item comparison-header__item--empty",onClick:$e},[v[7]||(v[7]=t("span",null,"VS",-1)),T(Ce,{class:"comparison-header__vs"})])):w("",!0)])],512),[[_t,F.value]])]),_:1}),t("div",i_,[t("button",{type:"button",onClick:v[0]||(v[0]=J=>e(f)()),class:"gaz-button gaz-button--primary product-compare-page__update-compare"},v[8]||(v[8]=[t("svg",{class:"product-compare-page__compare-icon",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M2 4h9v1H3v15h8v1H2zm10 19h1V2h-1zM8.283 10.283l-.566-.566L4.934 12.5l2.783 2.783.566-.566L6.566 13H11v-1H6.566zM14 12h4.08l-1.54-1.54.92-.92 2.96 2.96-2.96 2.96-.92-.92L18.08 13H14v8h9V4h-9z"}),t("path",{fill:"none",d:"M0 0h24v24H0z"})],-1),t("span",null,"Modificar comparación",-1)])),T(Pt,{class:"product-article__social-share",title:l.value.title,url:l.value.url,showComments:!1},null,8,["title","url"])]),t("div",l_,[(n(!0),i(U,null,K(Le.value,(J,ke)=>(n(),i("div",{key:J.id,class:"specs-section"},[t("h2",{class:Z(["specs-table-title",{"is-open":be(J.id)}]),onClick:pe=>de(J.id)},[t("span",d_,B(J.label),1),be(J.id)?(n(),H(Qt,{key:1,class:"specs-table-title__icon"})):(n(),H(Xt,{key:0,class:"specs-table-title__icon"}))],10,c_),T(Ne,{name:"accordion"},{default:re(()=>[ye(t("div",{class:"specs-table-scroll",ref_for:!0,ref:pe=>Ke(pe,ke)},[t("table",{class:"specs-table","aria-label":`Tabla comparativa para ${J.label}`},[t("thead",null,[t("tr",null,[v[9]||(v[9]=t("th",{scope:"col"},[t("span",null,"Propiedad")],-1)),(n(!0),i(U,null,K(b.value,(pe,Ge)=>(n(),i("th",{key:Ge,scope:"col"},[t("span",null,B(Se(pe)),1)]))),128))])]),t("tbody",null,[t("tr",__,[(n(!0),i(U,null,K(b.value,(pe,Ge)=>(n(),i("td",{key:Ge},[t("span",p_,[Ze(pe,J.id)?(n(),i("div",m_,B(We(pe,J.id))+" Puntos",1)):w("",!0)])]))),128))]),(n(!0),i(U,null,K(J.rows,pe=>(n(),i("tr",{key:pe.label},[t("th",g_,[t("span",h_,[t("span",null,B(pe.label),1)])]),(n(!0),i(U,null,K(b.value,(Ge,dt)=>(n(),i("td",{key:dt},[T(Po,{class:"specs-table__value",value:Je(Ge,J.id,pe.label),trimSlash:et(pe.label)},null,8,["value","trimSlash"])]))),128))]))),128))])],8,u_)],512),[[_t,be(J.id)]])]),_:2},1024),Me(ke)?(n(),H(Eo,{key:0,"format-i-d":Me(ke),target:I.value,device:"all"},null,8,["format-i-d","target"])):w("",!0)]))),128)),y.value?(n(),i("div",{key:0,class:"specs-section",ref_key:"pricesSectionRef",ref:we},[t("h2",{id:"prices",class:Z(["specs-table-title",{"is-open":be("prices")}]),onClick:v[1]||(v[1]=J=>de("prices"))},[v[10]||(v[10]=t("span",{class:"specs-table-title__text"},"Precios",-1)),be("prices")?(n(),H(Qt,{key:1,class:"specs-table-title__icon"})):(n(),H(Xt,{key:0,class:"specs-table-title__icon"}))],2),T(Ne,{name:"accordion"},{default:re(()=>[ye(t("div",{class:"specs-table-scroll",ref:J=>Ke(J,Le.value.length)},[t("table",f_,[t("thead",null,[t("tr",null,[v[11]||(v[11]=t("th",{scope:"col"},[t("span",null,"Propiedad")],-1)),(n(!0),i(U,null,K(b.value,(J,ke)=>(n(),i("th",{key:ke,scope:"col"},[t("span",null,B(Se(J)),1)]))),128))])]),t("tbody",null,[t("tr",null,[v[12]||(v[12]=t("th",{scope:"row"},[t("span",{class:"specs-table__property"})],-1)),(n(!0),i(U,null,K(b.value,(J,ke)=>(n(),i("td",{key:ke},[J.prices&&J.prices.length>0?(n(),i("div",v_,[(n(!0),i(U,null,K(J.prices,pe=>(n(),H(_e,{key:pe.url||`${pe.vendor}-${pe.price}
11`,vendor:pe.vendor,url:pe.url,price:pe.price},null,8,["vendor","url","price"]))),128))])):(n(),i("span",b_,"-"))]))),128))])])])],512),[[_t,be("prices")]])]),_:1})],512)):w("",!0)])],512),T(Mo,{title:"Comparar",isVisible:e(h).isVisible,feedback:e(h).feedback,isLoading:e(h).isLoading,onClose:e(r)},{default:re(()=>[T(Do)]),_:1},8,["isVisible","feedback","isLoading","onClose"])],64)}}},C_=te(w_,[["__scopeId","data-v-3859ee99"]]),k_={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function T_(o,a){return n(),i("svg",k_,a[0]||(a[0]=[t("path",{d:"M5 10v7h10.797l1.594 2H3v-9H0l4-5 4 5zm14 4V7H8.203L6.609 5H21v9h3l-4 5-4-5z"},null,-1)]))}const So={render(){return Pe(Ee,{icon:{render:T_},name:"refresh"})}},x_=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),I_=j(()=>W(()=>import("./BSqEa-6Z.js"),__vite__mapDeps([80,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,81]),import.meta.url).then(o=>o.default||o)),z_=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),L_={class:"post-article post-article--full-width post-article--no-hero gaz-page comparator-page"},S_={class:"post-article__body"},A_={class:"post-article__content"},P_={class:"comparator-page__comparartor"},E_={class:"comparator-hero"},D_={class:"comparator-hero__header"},M_={class:"post-article__heading comparator-page__heading"},O_={class:"gaz-page__title comparator-page__title comparator-hero__title"},V_={class:"compare-hero compare-hero--empty-state"},B_={class:"compare-hero__slot-main"},H_={class:"compare-hero__phone-image"},R_=["src","alt"],G_={class:"compare-hero__phone-title"},N_={key:"empty",class:"compare-hero__content compare-hero__content--empty"},F_={class:"compare-hero__slot-main"},U_={class:"compare-hero__slot-copy"},q_={class:"comparator-page__compare-cta"},j_=["href","aria-disabled"],W_={class:"comparator-popular"},Y_={class:"comparator-popular__title"},K_={class:"comparator-popular__grid"},X_={class:"comparator-page__layout"},Q_={class:"comparator-page__main-content"},J_=["innerHTML"],Z_={class:"comparator-page__sidebar"},ep={class:"comparator-page__sidebar-item comparator-page__sidebar-item--ad"},tp={class:"comparator-page__sidebar-item comparator-page__sidebar-item--ad"},op={class:"comparator-page__sidebar-item comparator-page__sidebar-item--ad"},np={class:"comparator-page__sidebar-item comparator-page__sidebar-item--ad comparator-page__sidebar-item--sticky"},sp={__name:"Comparator",setup(o){var F;const a=ie("gazConfigData"),p=ue("content"),c=V(()=>{const u=p==null?void 0:p.data;return u&&typeof u=="object"&&!Array.isArray(u)?u:{}}),l=[0,1,2],{compareCard:s,openCompareCard:_,closeCompareCard:b}=Kt(),x=G(null),y=V(()=>{const u=Array.isArray(s.value.products)?s.value.products.slice(0,3):[];return[u[0]||null,u[1]||null,u[2]||null]}),I=V(()=>(Array.isArray(s.value.products)?s.value.products:[]).map(u=>(u==null?void 0:u.product_slug)||(u==null?void 0:u.slug)||null).filter(Boolean)),h=V(()=>`/comparativa/${I.value.join("--vs--")}`),f=V(()=>I.value.length>1);V(()=>I.value.length);const r=V(()=>{const u=p==null?void 0:p.products;return Array.isArray(u)?u:[]}),z=()=>{_()},M=()=>{f.value&&co(h.value)},E=u=>(u==null?void 0:u.id)||(u==null?void 0:u.product_slug)||(u==null?void 0:u.slug)||(u==null?void 0:u.model)||"",k=u=>{var m;return((m=u==null?void 0:u.basicInfo)==null?void 0:m.h1)||(u==null?void 0:u.title)||(u==null?void 0:u.model)||""},$=u=>{var m,P;return((m=u==null?void 0:u.phoneImageData)==null?void 0:m.url)||((P=u==null?void 0:u.phoneBigImageData)==null?void 0:P.url)||(u==null?void 0:u.img)||""},C=u=>{const m=E(u),P=y.value.findIndex(L=>E(L)===m);P!==-1&&(x.value=P,setTimeout(()=>{x.value=null},700))},D=V(()=>{var u,m;return((u=c.value)==null?void 0:u.seoTitle)||((m=c.value)==null?void 0:m.title)||"Comparador de móviles"}),g=V(()=>{var u;return((u=c.value)==null?void 0:u.seoDescription)||""}),A=V(()=>{var u,m;return((u=c.value)==null?void 0:u.canonical)||((m=c.value)==null?void 0:m.url)||""});return De({title:D,description:g,robots:(F=c.value)!=null&&F.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:A,ogType:"website",ogTitle:D,ogDescription:g,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.t
11witterSite,twitterTitle:D,twitterDescription:g,twitterDomain:a.value.site}),(u,m)=>{const P=Lo,L=So,S=lo,R=x_,oe=mo,se=I_,ne=z_;return n(),i(U,null,[t("article",L_,[t("div",S_,[t("div",A_,[t("section",P_,[t("div",E_,[t("header",D_,[t("div",M_,[t("h1",O_,B(e(c).title||"Comparador de móviles"),1)]),m[0]||(m[0]=t("p",{class:"comparator-hero__subtitle"},"Selecciona los modelos que deseas comparar",-1))]),t("div",V_,[(n(),i(U,null,K(l,O=>t("div",{key:`compare-slot-${O}`,class:"compare-hero__item compare-hero__item--empty"},[T(Ne,{name:"compare-slot-switch",mode:"out-in"},{default:re(()=>[e(y)[O]?(n(),i("div",{key:`filled-${E(e(y)[O])}`,class:Z(["compare-hero__content compare-hero__content--filled",{"compare-hero__content--highlighted":e(x)===O}])},[t("div",B_,[t("div",H_,[$(e(y)[O])?(n(),i("img",{key:0,src:$(e(y)[O]),alt:k(e(y)[O]),loading:"lazy"},null,8,R_)):(n(),H(P,{key:1,class:"compare-hero__empty-icon"}))]),t("div",null,[t("div",G_,B(k(e(y)[O])),1),t("button",{type:"button",class:"compare-hero__change-btn",onClick:z},[T(L,{class:"compare-hero__change-icon"}),m[1]||(m[1]=t("span",null,"Cambiar",-1))])])])],2)):(n(),i("div",N_,[t("div",F_,[t("div",{onClick:z,class:"compare-hero__empty-icon-wrap"},[T(S,{class:"compare-hero__plus-icon"})]),t("div",null,[t("button",{type:"button",class:"gaz-button gaz-button--primary gaz-button--rounded compare-hero__add-btn",onClick:z},m[2]||(m[2]=[t("span",null,"Añadir móvil",-1)])),t("p",U_,"Selecciona el "+B(["primer","segundo","tercer"][O])+" móvil",1)])])]))]),_:2},1024)])),64))]),t("div",q_,[t("a",{href:e(f)?e(h):"#",class:Z(["gaz-button gaz-button--primary comparator-page__compare-btn",{"comparator-page__compare-btn--disabled":!e(f)}]),"aria-disabled":!e(f),onClick:xe(M,["prevent"])}," Comparar ahora ",10,j_)]),T(R,{"format-i-d":e(ee).roba1,target:e(c).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("div",W_,[t("h3",Y_,B(e(c).featuredProductsTitle||"Móviles más populares"),1),t("div",K_,[(n(!0),i(U,null,K(e(r),(O,de)=>(n(),H(oe,{key:`popular-${O.url||de}`,product:O},null,8,["product"]))),128))])])])]),t("div",X_,[t("div",Q_,[T(R,{"format-i-d":e(ee).roba2,target:e(c).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),e(c).preAd?(n(),i("div",{key:0,class:"post-article__text",innerHTML:e(c).preAd},null,8,J_)):w("",!0)]),t("aside",Z_,[t("div",ep,[T(R,{"format-i-d":e(ee).roba1,target:e(c).adsTarget,device:"desktop"},null,8,["format-i-d","target"])]),t("div",tp,[T(R,{"format-i-d":e(ee).roba2,target:e(c).adsTarget,device:"desktop"},null,8,["format-i-d","target"])]),t("div",op,[T(R,{"format-i-d":e(ee).roba3,target:e(c).adsTarget,device:"desktop"},null,8,["format-i-d","target"])]),t("div",np,[T(R,{"format-i-d":e(ee).roba1,target:e(c).adsTarget,device:"desktop","meta-key":"comp_sticky"},null,8,["format-i-d","target"])])])])])])]),T(ne,{title:"Comparar móviles",isVisible:e(s).isVisible,feedback:e(s).feedback,isLoading:e(s).isLoading,onClose:e(b)},{default:re(()=>[T(se,{onProductSelected:C})]),_:1},8,["isVisible","feedback","isLoading","onClose"])],64)}}},ap=te(sp,[["__scopeId","data-v-ef60eb8d"]]),rp={class:"product-search"},ip=["value","placeholder","aria-label"],lp={__name:"Search",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},ariaLabel:{type:String,default:""}},emits:["update:modelValue"],setup(o,{emit:a}){const p=a,c=l=>{p("update:modelValue",l.target.value)};return(l,s)=>(n(),i("section",rp,[t("input",{value:o.modelValue,type:"text",placeholder:o.placeholder,"aria-label":o.ariaLabel||o.placeholder,onInput:c},null,40,ip)]))}},Ao=te(lp,[["__scopeId","data-v-60f61601"]]),cp=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),dp={class:"product-term"},up={class:"product-term__hero"},_p={class:"product-term__brand-logo"},pp=["src","width","height"],mp=["innerHTML"],gp={key:0,class:"product-term__product-list"},hp={key:1,class:"product-term__no-results"},fp={class:"product-term__post-article post-article"},vp={class:"post-article__body"},bp={class:"post-article__content"},yp={class:"post-article__entry-content"},$p=["innerHTML"],wp={__name:"Category",setup(o){const a=ie("gazConfigData"),p=Ve(),l=ue("content").data,s=l.brand,_=s.products,b=G(""),x=V(()=>{const h=b.value.trim().toLowerCase();return h?_.filter(f=>{var M;const r=(f.title||"").toLowerCase(),z=(((M=f.price)==null?void 0:M.title)||"").toLowerCase();return r.includes(h)||z.includes(h)}):_}),y=V(()=>b.value.trim().toLowerCase()&&x.value.length===0),I=l.url;
11return De({title:l.seoTitle,description:l.seoDescription,robots:l.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:I,ogType:"website",ogTitle:l.seoTitle,ogDescription:l.seoDescription,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:l.seoTitle,twitterDescription:l.seoDescription,twitterDomain:a.value.site}),(h,f)=>{const r=Oe,z=Ao,M=mo,E=cp;return n(),i("div",dp,[T(r,{crums:e(l).breadcrumb,currentTitle:e(l).name},null,8,["crums","currentTitle"]),t("section",up,[t("div",_p,[t("img",{src:e(s).brandLogo.url,width:e(s).brandLogo.width,height:e(s).brandLogo.height,alt:""},null,8,pp)]),e(s).brandExcerpt?(n(),i("div",{key:0,class:"product-term__excerpt",innerHTML:e(s).brandExcerpt},null,8,mp)):w("",!0)]),T(z,{class:"product-term__search",modelValue:e(b),"onUpdate:modelValue":f[0]||(f[0]=k=>Te(b)?b.value=k:null),placeholder:`¿Qué modelo de ${e(l).name} buscas?`,"aria-label":`Buscar móviles ${e(l).name}`},null,8,["modelValue","placeholder","aria-label"]),e(y)?w("",!0):(n(),i("section",gp,[(n(!0),i(U,null,K(e(x),(k,$)=>(n(),H(M,{key:$,product:k},null,8,["product"]))),128))])),e(y)?(n(),i("div",hp,[f[1]||(f[1]=me(" No se han encontrado productos que coincidan con ")),t("em",null,B(e(b)),1)])):w("",!0),t("article",fp,[t("div",vp,[t("div",bp,[t("div",yp,[t("span",{innerHTML:e(l).description},null,8,$p)])])])]),e(p)?(n(),H(E,{key:2,data:{termID:e(l).termId}},null,8,["data"])):w("",!0)])}}},Cp=te(wp,[["__scopeId","data-v-ac1c0dc5"]]),kp={class:"product-term product-home"},Tp={class:"product-home__title section-title","data-v-bd99ad28":""},xp=["innerHTML"],Ip={key:0,class:"product-home__brand-list"},zp={class:"product-brand"},Lp={class:"product-brand__image"},Sp=["src","alt","width","height"],Ap={class:"product-brand__content"},Pp={class:"product-brand__title"},Ep=["href"],Dp=["innerHTML"],Mp={key:1,class:"product-home__no-results"},Op={__name:"Home",setup(o){var I,h,f,r,z,M,E,k;const a=ie("gazConfigData"),p=ue("content"),c=V(()=>e(p)??{}),l=V(()=>c.value.data??{}),s=V(()=>l.value.brands||[]),_=G(""),b=V(()=>{const $=_.value.trim().toLowerCase();return $?s.value.filter(C=>{const D=(C.name||"").toLowerCase(),g=(C.description||"").toLowerCase();return D.includes($)||g.includes($)}):s.value}),x=V(()=>_.value.trim()&&b.value.length===0),y=(I=l.value)==null?void 0:I.url;return De({title:(h=l.value)==null?void 0:h.seoTitle,description:(f=l.value)==null?void 0:f.seoDescription,robots:(r=l.value)!=null&&r.robotsNoIndex?"noindex, follow":"index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",ogUrl:y,ogType:"website",ogTitle:(z=l.value)==null?void 0:z.seoTitle,ogDescription:(M=l.value)==null?void 0:M.seoDescription,ogLocale:"es_ES",ogSiteName:a.value.name,twitterCard:"summary_large_image",twitterSite:a.value.twitterSite,twitterTitle:(E=l.value)==null?void 0:E.seoTitle,twitterDescription:(k=l.value)==null?void 0:k.seoDescription,twitterDomain:a.value.site}),($,C)=>{const D=Ao;return n(),i("div",kp,[t("h1",Tp,B(e(l).title),1),t("div",{class:"product-home__excerpt",innerHTML:e(l).description},null,8,xp),T(D,{class:"product-home__search",modelValue:e(_),"onUpdate:modelValue":C[0]||(C[0]=g=>Te(_)?_.value=g:null),placeholder:"¿Qué marca buscas?","aria-label":"Buscar marcas"},null,8,["modelValue"]),e(x)?w("",!0):(n(),i("div",Ip,[(n(!0),i(U,null,K(e(b),(g,A)=>(n(),i("div",zp,[t("div",Lp,[t("img",{src:g.image.url,alt:g.image.alt,width:g.image.width,height:g.image.height},null,8,Sp)]),t("div",Ap,[t("h2",Pp,[t("a",{class:"product-brand__link",href:g.url},B(g.name),9,Ep)]),t("div",{class:"product-brand__description",innerHTML:g.description},null,8,Dp)])]))),256))])),e(x)?(n(),i("div",Mp,[C[1]||(C[1]=me(" No se han encontrado marcas que coincidan con ")),t("em",null,B(e(_)),1)])):w("",!0)])}}},Vp=te(Op,[["__scopeId","data-v-77b1fc0e"]]),Bp=j(()=>W(()=>import("./BPTdupsU.js"),__vite__mapDeps([7,3,4,8]),import.meta.url).then(o=>o.default||o)),Hp=j(()=>W(()=>
11import("./BhE0VErf.js"),__vite__mapDeps([36,3,4,37]),import.meta.url).then(o=>o.default||o)),Rp=j(()=>W(()=>import("./DyezePKG.js"),__vite__mapDeps([38,3,4,39]),import.meta.url).then(o=>o.default||o)),Gp=j(()=>W(()=>import("./ldfEloh-.js"),__vite__mapDeps([40,3,4,41]),import.meta.url).then(o=>o.default||o)),Np=j(()=>W(()=>import("./OGujkN15.js"),__vite__mapDeps([55,3,4,56,57]),import.meta.url).then(o=>o.default||o)),Fp=j(()=>W(()=>import("./DbsV9yor.js"),__vite__mapDeps([44,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,45]),import.meta.url).then(o=>o.default||o)),Up=j(()=>W(()=>import("./DIQqbBSw.js"),__vite__mapDeps([46,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,47]),import.meta.url).then(o=>o.default||o)),qp=j(()=>W(()=>import("./-2UA3IAe.js"),__vite__mapDeps([48,3,4,49,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,50]),import.meta.url).then(o=>o.default||o)),jp=["id"],Wp={class:"post-article__heading post-live__heading"},Yp=["innerHTML"],Kp={class:"post-live__heading-excerpt"},Xp={key:0,class:"post-article__base-image"},Qp=["srcset","width","height"],Jp=["srcset"],Zp=["src","alt"],em={class:"post-article__body"},tm={class:"post-article__meta"},om=["datetime"],nm={class:"post-article__meta-comments"},sm={class:"post-article__meta-comments-icon-wrap"},am={class:"post-article__meta-comments-count"},rm={class:"post-live__grid"},im={class:"post-live__share-col"},lm=["id"],cm={key:0,class:"post-live__related","aria-label":"Relacionados"},dm={class:"post-live__related-list"},um=["href"],_m={class:"post-article__excerpt"},pm={class:"post-live__timeline-header"},mm=["disabled","aria-disabled"],gm=["datetime"],hm={class:"post-live__timeline-list"},fm={class:"post-live__timeline-item"},vm={class:"post-live__timeline-card-header"},bm=["datetime"],ym={key:0,class:"post-live__timeline-headline"},$m=["innerHTML"],wm={key:1,class:"post-live__timeline-image"},Cm=["src","width","height","alt"],km={class:"post-live__timeline-card-footer"},Tm=["onClick"],xm=["innerHTML"],Im={class:"post-article__entry-content"},zm=["innerHTML"],Lm=["innerHTML"],Sm=["innerHTML"],Am={class:"post-article__footer"},yt=3,Pm=45e3,Em={__name:"PostLive",props:{previewMode:{type:Boolean,required:!1,default:!1}},setup(o){var it,vt;const a=[ee.roba1,ee.roba2,ee.roba3];Jt.locale("es",jo);const p=o,c=ie("gazConfigData"),{$resolveGazApiEndpoint:l,$isMobile:s,$stripHtmlTags:_}=fe(),{commentsCard:b,showPostComments:x}=at(),{addPixel:y}=uo(),{getPostDate:I}=Tt(),h=Ve(),f=ue("content"),r=f.data,z=f.sidebar||[],M=f==null?void 0:f.termId,E=f==null?void 0:f.postTypeName,k={...r.live||{},liveRelatedLinks:Array.isArray((it=r.live)==null?void 0:it.liveRelatedLinks)?r.live.liveRelatedLinks:[]},$=G(Array.isArray(k.liveTimelineItems)?[...k.liveTimelineItems]:[]),C=G(!1),D=G(null),g=X=>{if(!X)return null;const Q=new Date(X.replace(" ","T"));return Number.isNaN(Q.getTime())?null:Q},A=X=>{const Q=g(X);return!!Q&&Date.now()>=Q.getTime()},F=G(((vt=r.live)==null?void 0:vt.coverageEndTime)||""),u=G(A(F.value)),m=V(()=>[...$.value].reverse()),P=G(r.commentCount||0),L=V(()=>C.value||u.value),S=V(()=>C.value?"Actualizando":"Actualizar"),R=new Map,oe=G(new Set);let se,ne,O;const de=()=>{ne&&(clearInterval(ne),ne=void 0)},ve=()=>{O&&(clearTimeout(O),O=void 0)},be=()=>{se&&(se.disconnect(),se=void 0)},le=()=>{be(),R.size!==0&&(se=new IntersectionObserver(X=>{const Q=new Set(oe.value);X.forEach($e=>{const ze=$e.target.getAttribute("data-live-card-key");ze&&($e.isIntersecting?Q.add(ze):Q.delete(ze))}),oe.value=Q},{threshold:.45}),R.forEach(X=>{se.observe(X)}))},ce=(X,Q)=>{if(!(X instanceof HTMLElement)){R.delete(Q);return}X.setAttribute("data-live-card-key",Q),R.set(Q,X)},we=X=>{if(X.liveTimelineFormat!=="superHighlighted")return!1;const Q=He(X);return oe.value.has(Q)},he=()=>{const X=A(F.value);return u.value=X,X&&(de(),ve()),X},Be=()=>{ve();const X=g(F.value);if(!X){u.value=!1;return}const Q=X.getTime()-Date.now();if(Q<=0){he();return}u.value=!1,O=window.setTimeout(()=>{he()},Q+1)},je=X=>{F.value=typeof X=="string"?X:"",he(),Be()};ge(()=>{he(),Be(),p.previewMode||(Wt(r),u.value||(ne=window.setInterval(()=>{Se({shouldScroll:!1,source:"auto-45s"})},Pm))),It(),y(!!r.postPixel,r.postPixel||""),setTimeout(()=>{st()},100),Fe(()=>{le()})}),nt(m,()=>{Fe(()=>{le()})}),Ot(()=>{be(),de(),ve()});const Ke=X=>{const Q=g(X);return Q?new Intl.DateTimeFormat("es-ES",{hour:"2-digit",minute:"2-digit",hour12:!1}).format(Q):X},Xe=X=>{const Q=g(X);return Q?Q.toISOString():""},ae=(X,Q=!1)=>`${Q?"Actualizado el ":""}${Jt(X).format("DD [de] MMMM, YYYY • HH:mm")}`,Ie=X=>{P.value=X},He=X=>X?`${X.liveTimelineDateTime||""}::${X.liveTimelineFormat||""}::${X.liveTimelineContentHtml||""}`:"",ft=(X,Q)=>{if(!Number.isInteger(X)||X<0||!Number.isInteger(Q)||Q<=1||!Number.isInteger(yt)||yt<=0||X>=Q-1)return null;const $e=X+1;if(($e-1)%yt!==0)return null;const ze=($e-1)/yt;return a[ze%a.length]},Se=async({shouldScroll:X=!0,source:Q="manual"}={})=>{var Qe,Je,We,Ze,et;if(C.value||he())return;const $e=encodeURIComponent(r.url),ze=`${l()}/content/${c.value.site}/${$e}`;C.value=!0;try{const Ae=await $fetch(ze);if(je(((Je=(Qe=Ae==null?void 0:Ae.data)==null?void 0:Qe.live)==null?void 0:Je.coverageEndTime)??F.value),u.value)return;const Me=(Ze=(We=Ae==null?void 0:Ae.data)==null?void 0:We.live)==null?void 0:Ze.liveTimelineItems;if(!Array.isArray(Me)||Me.length===0)return;const Ye=$.value.map(He),Le=Me.map(He);
11if(!(Ye.length!==Le.length||Ye.some((ot,Re)=>ot!==Le[Re]))){console.log(`[PostLive] Timeline comprobado (${Q}): sin cambios`);return}$.value=[...Me],console.log(`[PostLive] Timeline actualizado (${Q}): ${Me.length} item(s) sincronizados`),X&&(await Fe(),(et=D.value)==null||et.scrollIntoView({behavior:"smooth",block:"start"}))}catch(Ae){console.error("Error updating live timeline",Ae)}finally{C.value=!1}},rt=()=>{b.value.isVisible=!1,b.value.postId=void 0},Lt=X=>{const Q=_(X.liveTimelineContentHtml),$e=s?"_blank":"_blank,scrollbars=0,resizable=1,menubar=0,left=100,top=100,width=550,height=440,toolbar=0,status=0",ze=`https://twitter.com/intent/tweet?url=${encodeURIComponent(r.url)}&text=${Q}`;window.open(ze,"_blank",s?"":$e)};return(X,Q)=>{var v,q;const $e=Oe,ze=Bt,Qe=Ft,Je=fo,We=Ut,Ze=ht,et=Yt,Ae=So,Me=go,Ye=_o,Le=Bp,tt=Hp,ot=Rp,Re=vo,St=Gp,lt=Np,ct=jt,At=Fp,bt=Up,d=qp;return n(),i(U,null,[t("article",{id:`post-${e(r).postId}`,class:Z(["post-article","post-live",{"post-article--no-hero":!e(r).heroImage}]),"data-test":"post-live-template"},[T($e,{crums:e(r).breadcrumb},null,8,["crums"]),T(ze,{categories:e(r).categories},null,8,["categories"]),t("div",Wp,[t("h1",{class:"post-article__title heading heading--xxl",innerHTML:e(r).title},null,8,Yp),t("div",Kp,B(k.liveH1),1)]),e(r).heroImage?(n(),i("div",Xp,[e(r).openingVideo?(n(),H(Qe,{key:0,videoUrl:e(r).openingVideo},null,8,["videoUrl"])):w("",!0),t("figure",null,[t("picture",null,[t("source",{media:"(min-width: 1024px)",srcset:`${e(r).heroImage.url}?quality=80`,width:e(r).heroImage.width,height:e(r).heroImage.height},null,8,Qp),t("source",{media:"(min-width: 501px)",srcset:`${e(r).heroImage.url}?x=800&y=470&quality=80`,width:"800",height:"470"},null,8,Jp),t("img",{decoding:"async",fetchpriority:"high",loading:"eager",width:"500",height:"295",src:`${e(r).heroImage.url}?x=500&y=295&quality=80`,alt:e(r).heroImage.alt},null,8,Zp)]),(v=e(r).heroImage)!=null&&v.caption?(n(),i("figcaption",{key:0,class:"post-article__base-image-image-caption",style:Ue({maxWidth:`${e(r).heroImage.width}px`})},B(e(r).heroImage.caption),5)):w("",!0)])])):w("",!0),t("div",em,[t("div",tm,[t("div",null,[e(r).author?(n(),H(Je,{key:0,author:e(r).author},null,8,["author"])):w("",!0),t("time",{class:"post-article__pubdate publication-date",datetime:e(I)(e(r),!1)},B(e(I)(e(r),!0)),9,om)]),t("div",nm,[t("button",{class:"post-article__meta-comments-btn",onClick:Q[0]||(Q[0]=N=>e(x)(e(r).postId)),"aria-label":"Comentar"},[t("span",sm,[t("span",am,B(e(r).commentCount>0?e(r).commentCount:""),1),T(We,{class:"social-share-buttons__icon social-share-buttons__icon--count"})]),Q[1]||(Q[1]=t("span",{class:"post-article__meta-comments-text"},"Comenta la noticia",-1))])])]),t("div",rm,[t("div",im,[T(Ze,{class:"post-live__social-share",title:e(r).title,url:e(r).canonical,postId:e(r).postId,commentCount:e(P)},null,8,["title","url","postId","commentCount"])]),t("div",{class:"post-article__content post-article__entry-content",id:`postContent-${e(r).postId}`},[k.liveRelatedLinks.length?(n(),i("section",cm,[Q[2]||(Q[2]=t("div",{class:"post-live__related-title"},"Relacionados",-1)),t("ul",dm,[(n(!0),i(U,null,K(k.liveRelatedLinks,(N,Y)=>(n(),i("li",{key:`${N.liveRelatedLinkUrl}-${Y}`,class:"post-live__related-item"},[t("a",{href:N.liveRelatedLinkUrl,class:"post-live__related-link"},B(N.liveRelatedLinkText),9,um)]))),128))])])):w("",!0),t("div",_m,B(k.liveExcerpt),1),t("section",{ref_key:"timelineSectionRef",ref:D,class:"post-live__timeline","aria-label":"Última hora"},[t("div",pm,[t("button",{type:"button",class:Z(["gaz-button","gaz-button--rounded","post-live__refresh-btn",{"post-live__refresh-btn--disabled":e(u)}]),disabled:e(L),"aria-disabled":e(L),onClick:xe(Se,["prevent"])},[e(C)?(n(),H(et,{key:0,class:"post-live__refresh-loading"})):(n(),H(Ae,{key:1})),t("span",null,B(e(S)),1)],10,mm)]),t("time",{class:"post-live__last-pub-date",datetime:ae(e(m)[0].liveTimelineDateTime,!1)},B(ae(e(m)[0].liveTimelineDateTime,!0)),9,gm),t("ul",hm,[(n(!0),i(U,null,K(e(m),(N,Y)=>{var _e;return n(),i(U,{key:He(N)},[t("li",fm,[t("article",null,[Q[3]||(Q[3]=t("span",{class:"post-live__dot","aria-hidden":"true"},null,-1)),t("div",{class:Z(["post-live__timeline-card",`post-live__timeline-card--${N.liveTimelineFormat}`,{"post-live__timeline-card--visible":we(N)}]),ref_for:!0,ref:N.liveTimelineFormat==="superHighlighted"?Ce=>ce(Ce,He(N)):null},[t("header",vm,[t("time",{class:"post-live__timeline-time",datetime:Xe(N.liveTimelineDateTime)},B(Ke(N.liveTimelineDateTime)),9,bm)]),N.liveTimelineHeadline?(n(),i("h2",ym,B(N.liveTimelineHeadline),1)):w("",!0),t("div",{class:"post-live__timeline-content",innerHTML:N.liveTimelineContentHtml},null,8,$m),(_e=N.liveTimelineImage)!=null&&_e.url?(n(),i("figure",wm,[t("img",{src:N.liveTimelineImage.url,width:N.liveTimelineImage.width||void 0,height:N.liveTimelineImage.height||void 0,alt:N.liveTimelineImage.alt||N.liveTimelineHeadline||"",loading:"lazy"},null,8,Cm)])):w("",!0),t("footer",km,[t("button",{id:"xShare",class:"post-live__timeline-card-x-btn",onClick:xe(Ce
11=>Lt(N),["prevent"]),"aria-label":"Compartir en X"},[T(Me,{class:"post-live__timeline-card-x-logo social-share-buttons__icon--x"})],8,Tm)])],2)])]),ft(Y,e(m).length)?(n(),i("li",{key:`timeline-ad-${Y}`,class:"post-live__timeline-item post-live__timeline-item--ad"},[T(Ye,{class:"post-live__timeline-ad","format-i-d":ft(Y,e(m).length),target:e(r).adsTarget,device:"mobile","meta-key":`live-timeline-ad-${Y}`},null,8,["format-i-d","target","meta-key"])])):w("",!0)],64)}),128))])],512),e(r).excerpt?(n(),i("div",{key:1,class:"post-article__excerpt",innerHTML:e(r).excerpt},null,8,xm)):w("",!0),T(Le,{"format-i-d":e(ee).roba1,target:e(r).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("div",Im,[t("span",{innerHTML:e(r).preAd},null,8,zm),T(Le,{"format-i-d":e(ee).roba2,target:e(r).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("span",{innerHTML:e(r).postAd},null,8,Lm),T(Le,{"format-i-d":e(ee).roba3,target:e(r).adsTarget,device:"mobile"},null,8,["format-i-d","target"]),t("span",{innerHTML:e(r).lateAd},null,8,Sm),T(Le,{"format-i-d":e(ee).roba4,target:e(r).adsTarget,device:"mobile"},null,8,["format-i-d","target"])]),t("footer",Am,[e(r).sources||e(r).via?(n(),H(tt,{key:0,sources:e(r).sources,vias:e(r).via},null,8,["sources","vias"])):w("",!0),(n(!0),i(U,null,K(e(z),(N,Y)=>(n(),i(U,{key:`post-seo-links-${Y}`},[Array.isArray(N.content)?(n(),H(ot,{key:0,title:N.title,content:N.content},null,8,["title","content"])):w("",!0)],64))),128)),T(Re,{isStaticPage:!1,comments:e(r).comments,postId:e(r).postId,commentCount:e(r).commentCount},null,8,["comments","postId","commentCount"]),T(Ye,{class:"post-article__last-desktop-ad","format-i-d":e(ee).roba3,target:e(r).adsTarget,device:"desktop"},null,8,["format-i-d","target"]),(q=e(r).author)!=null&&q.bio?(n(),H(St,{key:1,authorData:e(r).author},null,8,["authorData"])):w("",!0)])],8,lm)]),e(h)?(n(),H(lt,{key:0,data:{postID:e(r).postId}},null,8,["data"])):w("",!0)]),T(ct,{termId:e(M),postType:e(E),content:e(z),adTarget:e(r).adsTarget,objectType:"post"},null,8,["termId","postType","content","adTarget"])],10,jp),T(d,{title:e(r).title,isVisible:e(b).isVisible,feedback:e(b).feedback,isLoading:e(b).isLoading,onClose:rt},{header:re(()=>[T(At)]),default:re(()=>[T(bt,{onCommentCreated:Ie})]),_:1},8,["title","isVisible","feedback","isLoading"])],64)}}},Dm=te(Em,[["__scopeId","data-v-439e972a"]]),Mm=j(()=>W(()=>import("./C8RocyRb.js"),__vite__mapDeps([82,3,4,11,83]),import.meta.url).then(o=>o.default||o)),Om={__name:"[...slug]",async setup(o){var k,$,C;let a,p;const c={post:la,category:Ba,author:tr,"post-branded":Dr,"category-branded-home":mi,"category-branded":yi,"category-offers":Tl,"post-opinions":Qc,"category-opinions":sd,"category-opinions-home":$d,"post-product":Tu,"post-product-comparative":C_,"post-product-comparator":ap,"category-product":Cp,"category-product-home":Vp,"post-live":Dm,default:wo},l=ie("gazConfigData"),s=io(),{$resolveGazApiEndpoint:_,$gazApiFetch:b}=fe(),x=encodeURIComponent(`${l.value.url}/${s.path}`);let y=`${_()}/content/${l.value.site}/${x}`,I=!1;if(s.params.slug[0]==="preview"){I=!0;const D=s.params.slug[1],g=s.params.slug[2],A=s.params.slug[3];y=`${_()}/post/draft/${l.value.site}/${D}/${g}/${A}`}const{error:h,data:f}=([a,p]=mt(()=>xt(y,{key:x,$fetch:b,transform:D=>{const{schema:g,...A}=D;return A}},"$JFi7f6lSsS")),a=await a,p(),a),r=V(()=>{var D,g;return((D=f.value)==null?void 0:D.objectType)==="post"&&((g=f.value)==null?void 0:g.postTypeName)!=="static-pages"});if(h.value)throw $t({statusCode:h.value.statusCode,statusMessage:"Error al recuperar los contenidos"});let z="default";const M=no(null),E=((k=f.value)==null?void 0:k["301"])||((C=($=f.value)==null?void 0:$.data)==null?void 0:C.redirect301);if(E)[a,p]=mt(()=>co(E,{external:!0})),await a,p();else{if(!f.value)throw $t({statusCode:404,statusMessage:"No content data"});Wo("content",f.value),z={branded:"branded",offers:"offers"}[f.value.view]||"default";const{objectType:D,branded:g,view:A,home:F,opinion:u,dataType:m,data:P}=f.value;let L=D;D==="post"?A==="live"?L+="-live":A==="comparative"?L+="-product-comparative":A==="comparator"?L+="-product-comparator":g?L+="-branded":u?L+="-opinions":P.product&&(L+="-product"):D==="category"&&A&&(L+={opinions:m==="postType"?"-opinions-home":"-opinions",branded:F?"-branded-home":"-branded",offers:"-offers",product:m==="postType"?"-product-home":"-product"}[A]||""),M.value=c[L]||c.default}return(D,g)=>{const A=Mm,F=Yo;return n(),H(F,{name:e(z)},{default:re(()=>[e(r)?(n(),H(A,{key:0})):w("",!0),e(M)?(n(),H(kt(e(M)),{key:1,previewMode:e(I)},null,8,["previewMode"])):w("",!0)]),_:1},8,["name"])}}},Jm=Object.freeze(Object.defineProperty({__proto__:null,default:Om},Symbol.toStringTag,{value:"Module"}));
11export{Yt as _,Du as a,El as b,Kt as c,Qm as d,qt as e,Jm as f,Ol as i,Xm as r,at as u};

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.