1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5231],{5231:(e,l,t)=>{t.d(l,{I:()=>g});var a=t(5155),s=t(2115),i=t(6874),o=t.n(i),r=t(6766),c=t(5005),n=t(1463),d=t(2355),u=t(3052),h=t(3956);let m=["https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/ICONOS-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/AQI-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/BARRIOS-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/MERCADOS-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/MIRADORES-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/CULTURA-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/PALACIOS-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/PARQUES-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/FUERA-DE-SGO-scaled.webp","https://azure-seal-918691.hostingersite.com/wp-content/uploads/2025/09/slider-100-scaled.webp"],p=[...m];function g(e){let{desktopImages:l,mobileImages:t,sliderKeyDesktop:i,sliderKeyMobile:g,objectFit:f="cover",objectPosition:b="center",desktopHeight:w=437,mobileHeight:v=550,dotActiveClass:x="bg-[#E40E36] w-3 h-3",dotInactiveClass:y="bg-white w-2 h-2",dotBottom:j=28,slideHref:S,slideHrefs:k,slideHrefsMobile:N,preferApiHrefs:z=!1,autoplay:A=!0,showArrows:E=!1,mobileStaticFirst:_=!1,autoHeight:C=!1,desktopImageClassName:P,mobileImageClassName:R}=e,{cachedFetchWithSite:I}=(0,n.R)(),[O,H]=(0,s.useState)(null),[M,U]=(0,s.useState)(null),[D,F]=(0,s.use
1State)(null),[L,B]=(0,s.useState)(null),[G,K]=(0,s.useState)(!1),[Q,T]=(0,s.useState)(!1),[q,J]=(0,s.useState)(void 0!==l||!i),[V,W]=(0,s.useState)(void 0!==t||!g),X=!!i&&void 0===l&&!q,Y=!!g&&void 0===t&&!V,Z=void 0!==l?l:O&&O.length?O:X||i?[]:m,$=void 0!==t?t:M&&M.length?M:Y||g?[]:p,ee=(0,s.useMemo)(()=>Z.map(e=>(0,h.a)(e,1920)),[Z]),el=(0,s.useMemo)(()=>$.map(e=>(0,h.a)(e,900)),[$]),[et,ea]=(0,c.A)({loop:!0}),[es,ei]=(0,c.A)({loop:!0}),[eo,er]=(0,s.useState)(0),[ec,en]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=()=>{en(window.matchMedia("(max-width: 767.98px)").matches)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,s.useEffect)(()=>{if(!A)return;let e=ec?ei:ea;if(!e)return;let l=setInterval(()=>e.scrollNext(),5e3);return()=>clearInterval(l)},[A,ec,ea,ei]),(0,s.useEffect)(()=>{let e=!1;return async function(){try{K(!1),T(!1),void 0===l&&i&&J(!1),void 0===t&&g&&W(!1);let a=void 0===l,s=void 0===t;if(!a&&!s)return;let o=async e=>{let l=await I("/api/sliders/".concat(encodeURIComponent(e))),t=Array.isArray(null==l?void 0:l.items)?l.items:[];if(!l)return{images:[],hrefs:[]};let a=t.filter(e=>(null==e?void 0:e.active)!==!1),s=a.map(e=>String((null==e?void 0:e.image_url)||"").trim()).filter(Boolean),i=a.map(e=>(null==e?void 0:e.href)?String(e.href).trim():"");return{images:s,hrefs:i}},r=async()=>{let l=!1;if(a&&i){console.log("[HeroSlider] fetch desktop key:",i);let{images:t,hrefs:a}=await o(i);if(e)return!0;console.log("[HeroSlider] desktop result:",{key:i,count:t.length,sample:t.slice(0,3)}),t.length&&(H(t),F(a),K(!0),l=!0),J(!0)}if(s&&g){console.log("[HeroSlider] fetch mobile key:",g);let{images:t,hrefs:a}=await o(g);if(e)return!0;console.log("[HeroSlider] mobile result:",{key:g,count:t.length,sample:t.slice(0,3)}),t.length?(U(t),B(a),T(!0),l=!0):(U([]),B([]),T(!1)),W(!0)}return l};if(await r()||i||g)return;let c=await I("/api/slider-images");if(!c){a&&i&&J(!0),s&&g&&W(!0);return}if(e)return;a&&Array.isArray(c.desktop)&&H(c.desktop),s&&Array.isArray(c.mobile)&&U(c.mobile),a&&i&&J(!0),s&&g&&W(!0)}catch(e){void 0===l&&i&&J(!0),void 0===t&&g&&W(!0)}}(),()=>{e=!0}},[l,t,i,g,I]);let ed=(e,l)=>{let t="mobile"===l?L:D,a=(null==t?void 0:t[e])?String(t[e]).trim():"",s="mobile"===l?N&&N[e]||k&&k[e]||S||"":k&&k[e]||S||"";return z?("mobile"===l?Q:G)?a:a||s:s||a};(0,s.useEffect)(()=>{let e=ec?ei:ea;if(!e)return;let l=()=>er(e.selectedScrollSnap());return e.on("select",l),l(),()=>{e.off("select",l)}},[ec,ea,ei]);let eu=e=>{let l=ec?ei:ea;null==l||l.scrollTo(e),er(e)},eh=(0,s.useCallback)(()=>{let e=ec?ei:ea;null==e||e.scrollPrev()},[ec,ea,ei]),em=(0,s.useCallback)(()=>{let e=ec?ei:ea;null==e||e.scrollNext()},[ec,ea,ei]),ep=null!=ec&&ec?$:Z,eg=!!(ec&&_),ef=E&&ep.length>1,eb=null!=ec&&ec?Y:X,ew=null===ec;(0,s.useEffect)(()=>{ew||eb||console.log("[HeroSlider] render source:",{isMobile:ec,sliderKeyDesktop:i||null,sliderKeyMobile:g||null,using:ec?"mobile":"desktop",count:ep.length,sample:ep.slice(0,3)})},[ew,eb,ec,i,g,ep]);let ev=e=>{let l=C?"w-full h-auto":"w-full h-full ".concat("contain"===f?"object-contain":"object-cover"," ").concat("top"===b?"object-top":"bottom"===b?"object-bottom":"left"===b?"object-left":"right"===b?"object-right":"object-center");return"".concat(l," ").concat(e||"").trim()};if(ew||eb||0===ep.length){let e=null!=ec&&ec?v:w;return(0,a.jsx)("div",{className:"relative w-full overflow-hidden bg-black",style:C?{minHeight:120}:{height:"".concat(e,"px")},"aria-hidden":!0})}return(0,a.jsxs)("div",{className:"relative w-full overflow-hidden bg-black",children:[ec?(0,a.jsx)("div",{className:"bg-black",children:eg?(0,a.jsx)("div",{className:"relative",style:C?void 0:{height:"".concat(v,"px")},children:ed(0,"mobile")?(0,a.jsx)(o(),{href:ed(0,"mobile"),className:"block w-full ".concat(C?"h-auto":"h-full"),children:C?(0,a.jsx)(r.default,{src:el[0],alt:"Slide 1",width:900,height:1400,sizes:"100vw",priority:!0,loading:"eager",fetchPriority:"high",className:ev(R)}):(0,a.jsx)(r.default,{src:el[0],alt:"Slide 1",fill:!0,sizes:"100vw",priority:!0,loading:"eager",fetchPriority:"high",className:ev(R)})}):C?(0,a.jsx)(r.default,{src:$[0]||"/placeholder.svg",alt:"Slide 1",width:900,height:1400,sizes:"100vw",priority:!0,loading:"eager",fetchPriority:"high",className:ev(R)}):(0,a.jsx)(r.default,{src:$[0]||"/placeholder.svg",alt:"Slide 1",fill:!0,sizes:"100vw",priority:!0,loading:"eager",fetchPriority:"high",className:ev(R)})}):(0,a.jsx)("div",{className:"embla bg-black",ref:es,children:(0,a.jsx)("div",{className:"embla__container flex",children:el.map((e,l)=>(0,a.jsx)("div",{className:"embla__slide min-w-full relative bg-black",style:C?void 0:{height:"".concat(v,"px")},children:ed(l,"mobile")?(0,a.jsx)(o(),{href:ed(l,"mobile"),className:"block w-full ".concat(C?"h-auto":"h-full"),children:C?(0,a.jsx)(r.default,{src:e,alt:"Slide ".concat(l+1),width:900,height:1400,sizes:"100vw",priority:0===l,loading:0===l?"eager":"lazy",fetchPriority:0===l?"high":"auto",className:ev(R)}):(0,a.jsx)(r.default,{src:e,alt:"Slide ".concat(l+1),fill:!0,sizes:"100vw",priority:0===l,loading:0===l?"eager":"lazy",fetchPriority:0===l?"high":"auto",className:ev(R)})}):(0,a.jsx)(a.Fragment,{children:C?(0,a.jsx)(r.default,{src:e,alt:"Slide ".concat(l+1),width:900,height:1400,sizes:"100vw",priority:0===l,loading:0===l?"eager":"lazy",fetchPriority:0===l?"high":"auto",className:ev(R)}):(0,a.jsx)(r.default,{src:e,alt:"Slide ".concat(l+1),fill:!0,sizes:"100vw",priority:0===l,loading:0===l?"eager":"lazy",fetchPriority:0===l?"high":"auto",className:ev(R)})})},"m-".concat(l)))})})}):(0,a.jsx)("div",{className:"bg-black",children:(0,a.jsx)("div",{className:"embla bg-black",ref:et,children:(0,a.jsx)("div",{className:"embla__container flex",children:ee.map((e,l)=>(0,a.jsx)("div",{className:"embla__slide min-w-full relative bg-black",style:C?void 0:{height:"".concat(w,"px")},children:ed(l,"desktop")?(0,a.jsx)(o(),{href:ed(l,"desktop"),className:"block w-full ".concat(C?"h-auto":"h-full"),children:(0,a.jsx)("img",{src:e,alt:"Slide ".concat(l+1),className:ev(P)})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("img",{src:e,alt:"Slide ".concat(l+1),className:ev(P)})})},"d-".concat(l)))})})}),!eg&&ef&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button","aria-label":"Slide previo",onClick:eh,className:"absolute left-2 md:left-3 top-1/2 -translate-y-1/2 z-30 text-white bg-black/30 hover:bg-black/50 backdrop-blur-[2px] p-2 md:p-3 rounded-full focus:outline-none focus:ring-2 focus:ring-white/70",children:(0,a.jsx)(d.A,{className:"w-5 h-5 md:w-6 md:h-6"})}),(0,a.jsx)("button",{type:"button","aria-label":"Slide siguiente",onClick:em,className:"absolute right-2 md:right-3 top-1/2 -translate-y-1/2 z-30 text-white bg-black/30 hover:bg-black/50 backdrop-blur-[2px] p-2 md:p-3 rounded-full focus:outline-none focus:ring-2 focus:ring-white/70",children:(0,a.jsx)(u.A,{className:"w-5 h-5 md:w-6 md:h-6"})})]}),!eg&&(0,a.jsx)("div",{className:"absolute left-0 right-0 z-40 flex justify-center pointer-events-auto",style:{bottom:"".concat(j,"px")},children:(0,a.jsx)("div",{className:"flex gap-2",children:ep.map((e,l)=>(0,a.jsx)("button",{onClick:()=>eu(l),className:"rounded-full transition-all focus:outline-none ".concat(l===eo?x:y),"aria-label":"Go to slide ".concat(l+1)},"global-dot-".concat(l)))})})]})}}}]);
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.