1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0e5cc-73a9-7181-8fd0-53af9fc5b074")}catch(e){}}();import{d as O,X as $,e as M,n as F,o as n,c as o,a as l,k as g,F as f,B as k,j as U,t as C,m as E,g as S,f as P,i as m,bQ as V,bR as D,bS as H,bT as q,_ as J,r as p,z as Q,p as X}from"#entry";import{S as G,a as K}from"./CfZ_9dFn.js";import{u as B}from"./mFFqa8NF.js";const W=["section","id","__typename"],Y={key:0,class:"relative banner-placeholder w-full"},Z={key:1,class:"simple-banner"},ee=["src","alt","onError","onLoad"],te={key:0,class:"banner-fallback"},ae={class:"flex flex-col items-center justify-center p-8 bg-gray-100 h-full w-full"},ne={class:"text-lg font-bold"},oe={key:0,class:"slider-wrapper"},re={class:"navigation-container"},le={class:"swiper-container"},se={class:"relative"},ie=["onClick"],ce=["src","alt","onError","onLoad"],ue={key:1,class:"absolute inset-0 flex items-center justify-center bg-gray-100"},ge={class:"text-center"},de={class:"text-gray-400"},pe={key:1,class:"bg-gray-100 p-4 text-center"},ve=O({__name:"PageHero",props:{content:{type:Object,required:!0,default:()=>({heading:"",swiper:[]})},section:{type:Object,default:()=>({})},id:{type:[String,Number],default:null},__typename:{type:String,default:null}},setup(i){const c=i,y=p(!1),d=p([]),I=p(!1),s=p({}),L=p([]),h=p(0),r=p(null),b=Q(()=>y.value&&Array.isArray(d.value)&&d.value.length>0),w=t=>{try{return t.formats?.medium?.url?B(t.formats.medium.url):B(t.url)}catch(e){return console.error("Error resolving media URL:",e),""}},x=(t,e)=>{e?.url&&(s.value[e.url]="error")},R=(t,e)=>{e?.url&&(s.value[e.url]="loaded")},T=$(),j=t=>{console.log("Swiper initialized"),h.value=0},z=t=>{if(r.value&&r.value.swiper){const e=r.value.swiper.activeIndex;console.log("Slide changed to:",e),h.value=e}},A=t=>{const e=L.value[t],_=e?e[t.toString()]:null;return console.log(`URL lookup - Index: ${t}, Object:`,e,"URL:",_),_},N=t=>{const e=A(t);console.log(`Clicked image ${t}, URL:`,e),e&&T.push(e)};return M(async()=>{await F(),console.log("Initial swiper data:",c.content.swiper),console.log("Initial target URLs from props:",JSON.stringify(c.content.swiperImageTargetURLs,null,2)),setTimeout(()=>{console.log("Checking swiper initialization"),r.value?console.log("Swiper instance available:",r.value):console.log("Swiper instance not available")},1e3),Array.isArray(c.content?.swiperImageTargetURLs)&&(L.value=c.content.swiperImageTargetURLs),Array.isArray(c.content?.swiper)&&(d.value=c.content.swiper.filter(t=>t&&typeof t=="object"&&t.url),d.value.forEach((t,e)=>{s.value[t.url]="loading"})),c.content?.swiperImageTargetURLs&&c.content.swiperImageTargetURLs.forEach((t,e)=>{console.log(`URL object ${e}:`,t),console.log(`Has property ${e}:`,t.hasOwnProperty(e.toString())),console.log(`Value for ${e}:`,t[e.toString()])}),setTimeout(()=>{r.value&&r.value.swiper?(console.log("Setting up swiper events"),r.value.swiper.on("slideChange",()=>{console.log("Slide changed to:",r.value.swiper.activeIndex),h.value=r.value.swiper.activeIndex})):console.log("Swiper not initialized yet")},500),y.value=!0}),(t,e)=>{const _=J;return n(),o("section",{class:"relative w-full hidden md:block page-hero-container mt-16",section:i.section,id:String(i.id),__typename:i.__typename},[y.value?g("",!0):(n(),o("div",Y,[...e[0]||(e[0]=[l("div",{class:"text-center py-4 text-gray-400"},"Loading banner...",-1)])])),b.value&&I.value?(n(),o("div",Z,[(n(!0),o(f,null,k(d.value,(a,v)=>(n(),o(f,{key:v},[a?(n(),o("img",{key:0,src:w(a),loading:"lazy",alt:a.caption||i.content?.heading||"Banner image",class:U(["w-full banner-image",{"blur-sm":!s.value[a.url]||s.value[a.url]==="loading"}]),onError:u=>x(u,a),onLoad:u=>R(u,a)},null,42,ee)):g("",!0)],64))),128)),(n(!0),o(f,null,k(d.value,(a,v)=>(n(),o(f,{key:"fallback-"+v},[!a||!w(a)||s.value[a.url]==="error"?(n(),o("div",te,[l("div",ae,[l("p",ne,C(a?.caption||i.content?.heading||"Banner"),1),e[1]||(e[1]=l("p",{class:"text-sm text-gray-500"},"Image could not be loaded",-1))])])):g("",!0)],64))),128))])):g("",!0),I.value?g("",!0):(n(),E(_,{key:2},{default:S(()=>[b.value?(n(),o("div",oe,[l("div",re,[l("div",le,[P(m(G),{ref_key:"swiper",ref:r,modules:[m(V),m(D),m(H),m(q)],"slides-per-view":1,loop:!0,effect:"fade",autoplay:{delay:3e3,disableOnInteraction:!1},navigation:{prevEl:".swiper-button-prev",nextEl:".swiper-button-next"},pagination:{clickable:!0,dynamicBullets:!1},onSwiper:j,onSlideChange:z},{default:S(()=>[(n(!0),o(f,null,k(d.value,(a,v)=>(n(),E(m(K),{key:v},{default:S(()=>[l("div",se,[a?(n(),o("div",{key:0,class:"image-wrapper cursor-pointer",onClick:u=>N(v)},[l("img",{src:w(a),loading:"lazy",alt:a.caption||i.content?.heading||"Banner image",class:U(["slide-image",{"blur-sm":!s.value[a.url]||s.value[a.url]==="loading"}]),onError:u=>x(u,a),onLoad:u=>R(u,a)},null,42,ce)],8,ie)):g("",!0),!a||!w(a)||s.value[a.url]==="error"?(n(),o("div",ue,[l("div",ge,[l("div",de,C(a?.caption||i.content?.heading||"Banner image"),1)])])):g("",!0)])]),_:2},1024))),128))]),_:1},8,["modules"])])])])):y.value&&!b.value?(n(),o("div",pe,[...e[2]||(e[2]=[l("p",null,"No banner images available",-1)])])):g("",!0)]),_:1}))],8,W)}}}),we=X(ve,[["__scopeId","data-v-7ca3e814"]]);export{we as default}; 2//# sourceMappingURL=lssVraSX.js.map 3 4//# chunkId=01a0e5cc-73a9-7181-8fd0-53af9fc5b074
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.