1import{_ as F}from"./CWjc5tAk.js";import{d as S,e as P,j as O,c as i,F as $,r as C,g as u,w as m,h as E,b as e,o,m as R,v as N,f as a,T as X,t as v,l as b,n as H,p as q,k as x,q as G,_ as z,i as j,s as Y,x as J,y as K,z as k}from"./BLop4L-3.js";import{_ as Q}from"./DlAUqK2U.js";import{_ as Z}from"./C17mP4VD.js";import{_ as tt}from"./UfRNNVWe.js";import{t as et}from"./Ct8u8BPc.js";import{_ as D}from"./CXn8bYBE.js";import{_ as M}from"./itlkkSpp.js";import{_ as ot}from"./DxFUA4n0.js";import{_ as nt}from"./D3bF55wA.js";import{u as st}from"./XT0yznvY.js";import{u as lt}from"./DeZSPtBr.js";import{c as at}from"./DkiqH2WO.js";import"./Bm5F1oka.js";import"./BF4Cdv7I.js";import"./Dw3WuVwo.js";import"./CRXxABcG.js";import"./CIn-wLIJ.js";import"./DN6FNrxp.js";import"./h0eaYUaQ.js";import"./DmGOdiMz.js";const it={class:"relative w-full h-600 sm:h-700 md:h-[760px] overflow-hidden"},rt=["srcset"],ct=["src"],ut={class:"flex-1 relative"},dt={class:"flex flex-col justify-between"},mt={class:"heading bg-white/80 w-fit px-2 text-neutral-800 rounded-md font-bold uppercase font-display"},ft={class:"subheading mt-2 text-white text-lg md:text-lg font-light font-sans transition ease"},_t=["onClick"],ht=["onClick"],pt={class:"flex justify-around gap-3 font-sans font-light w-full"},vt=["onClick"],xt={class:"w-full h-0.5 bg-gray-300 relative rounded-full"},gt={key:0,class:"w-full h-0.5 bg-xt-red absolute"},wt=S({__name:"Carousel",props:{bannerList:{},changeSecond:{default:6}},setup(n){const l=E(0);let r=null;function t(d){r&&clearInterval(r),l.value=d,r=window.setInterval(g,n.changeSecond*1e3)}function g(){if(l.value>=n.bannerList.length-1){l.value=0;return}l.value=l.value+1}const p=E(!1),_=d=>{const w=d===null?"":d,y=w.startsWith("http");q(w,{external:y})};return P(()=>{p.value=!0,t(l.value)}),O(()=>{r&&window.clearInterval(r)}),(d,w)=>{const y=F;return o(),i("div",it,[(o(!0),i($,null,C(n.bannerList,(c,f)=>(o(),i("div",null,[u(X,{duration:{enter:6e3,leave:100},name:"carousel"},{default:m(()=>[R((o(),i("picture",{key:c.uuid},[e("source",{srcset:c.mobile_image||c.main_image||"",media:"(width <= 500px)"},null,8,rt),e("img",{class:"banner-pic absolute w-full h-full object-cover object-top transition ease brightness-75",src:c.main_image||"",alt:""},null,8,ct)])),[[N,f===a(l)&&a(p)]])]),_:2},1024)]))),256)),u(y,{width:1440,class:"relative h-full flex flex-col gap-6 pb-8"},{default:m(()=>[e("div",ut,[(o(!0),i($,null,C(n.bannerList,(c,f)=>(o(),i("div",{key:c.uuid,class:"absolute bottom-0 h-120 flex flex-col justify-end"},[u(X,{duration:500,name:"content"},{default:m(()=>[R(e("div",dt,[e("p",mt,v(c.tag),1),e("div",null,[e("p",ft,v(c.subheading),1),e("h1",{class:"heading mt-8 mb-4 text-white text-4xl font-black font-display grow cursor-pointer sm:text-64px sm:leading-none",onClick:h=>_(c.button_link)},v(c.heading),9,_t),e("button",{class:"cta-button bg-xt-red flex justify-center items-center text-white font-medium text-lg w-fit py-1 px-8 rounded-md font-display transition ease hover:bg-transparent hover:border hover:border-white",onClick:h=>_(c.button_link)},[e("span",null,v(c.button_text),1)],8,ht)])],512),[[N,f===a(l)&&a(p)]])]),_:2},1024)]))),128))]),e("div",pt,[(o(!0),i($,null,C(n.bannerList,(c,f)=>(o(),i("div",{class:"flex flex-col w-2/12 cursor-pointer select-none",onClick:h=>t(f)},[e("div",xt,[u(X,{name:"progress"},{default:m(()=>[f===a(l)&&a(p)?(o(),i("div",gt)):b("",!0)]),_:2},1024)]),e("div",{class:H(["text-gray-300 hidden lg:block",{"text-white font-medium":a(l)===f}])},v(c.heading),3)],8,vt))),256))])]),_:1})])}}}),bt=Q(wt,[["__scopeId","data-v-2754983f"]]),yt=S({__name:"MutedLink",props:{customClass:{},to:{}},setup(n){return(l,r)=>{const t=z;return o(),x(t,{to:n.to,class:H(a(et)("font-display transition-colors duration-500 cursor-pointer hover:text-xt-lightred focus:ring-0",n.customClass||""))},{default:m(()=>[G(l.$slots,"default")]),_:3},8,["to","class"])}}}),kt={class:"relative w-full h-700 overflow-hidden"},$t={key:1,class:"absolute text-center inset-0 flex flex-col justify-end items-center z-20 text-white lg:items-start lg:pl-8 max-w-1440 mx-auto px-8"},Ct={class:"text-white text-4.5xl font-extrabold font-display lg:text-5xl"},St={class:"flex flex-col items-center lg:flex-row lg:justify-between lg:w-full"},jt={class:"w-fit flex flex-col items-center sm:flex-row"},Et={class:"mb-0 sm:mb-2 text-white font-light"},Lt={class:"mb-0 sm:mb-2 text-white font-light"},Bt=S({__name:"FeaturedEventBanner",props:{event:{}},setup(n){const l=E(!1);return(r,t)=>{const g=D,p=M,_=ot;return o(),i("div",kt,[(o(),x(g,{src:n.event?.content?.banner_image||"",key:n.event?.content?.banner_image||"",onLoad:t[0]||(t[0]=d=>l.value=!0),placeholder:"/images/placeholder.svg",class:"absolute w-full h-full object-cover z-0"},null,8,["src"])),t[4]||(t[4]=e("div",{class:"absolute inset-0 top-0 left-0 w-full h-full z-10 bg-linear-to-b from-transparent from-40% to-black"},null,-1)),a(l)?b("",!0):(o(),x(p,{key:0,width:"100%",height:"100%"})),n.event?(o(),i("div",$t,[t[3]||(t[3]=e("p",{class:"mb-4 bg-white w-fit px-3 py-1 rounded-md font-bold text-black text-sm font-display capitalize"}," Featured Event ",-1)),e("h2",Ct,v(n.event?.content?.event_name),1),e("div",St,[e("div",jt,[e("p",Et,v(n.event?.content?.date_range_short),1),t[1]||(t[1]=e("p",{class:"hidden sm:block sm:mx-2 sm:text-white sm:mb-2 text-3xl"}," · ",-1)),e("p",Lt,v(n.event?.content?.location?.location)+", "+v(n.event?.content?.location?.country?.name),1)]),u(_,{link:`/event/${n.event?.content?.slug}`,class:"my-8"},{default:m(()=>[...t[2]||(t[2]=[j("View Event",-1)])]),_:1},8,["link"])])])):b("",!0)])}}}),It={class:"absolute z-10 w-full h-full px-3 py-4 flex flex-col justify-between"},Tt={class:"bg-white/75 rounded-lg font-display p-1 w-fit text-xs"},Xt={class:"font-display text-white text-xl"},Pt=S({__name:"EventScroll",props:{events:{}},setup(n){const l=E(!1),r=E(null);let t=null;function g(_){return new Promise(d=>window?.setTimeout(d,_))}async function p(_){const d=[30,30,20];for(let w of d)_.scrollBy({top:0,left:w,behavior:"smooth"}),await g(750),_.scrollBy({top:0,left:w*-1,behavior:"smooth"}),await g(740);t&&r.value&&t.unobserve(r.value)}return P(()=>{t=new IntersectionObserver(_=>{_.forEach(d=>{d.isIntersecting&&p(d.target)})},{threshold:1}),r.value&&t.observe(r.value)}),(_,d)=>{const w=D,y=M,c=z;return o(),i("div",{ref_key:"wrapper",ref:r,class:"w-full overflow-x-auto flex gap-5 relative p-4 snap-x"}
1,[(o(!0),i($,null,C(n.events,f=>(o(),x(c,{key:f.uuid,to:`/event/${f.list_content?.slug}`,class:"relative min-w-56 min-h-44 rounded-md flex-1"},{default:m(()=>[u(w,{src:f.list_content?.main_image||"",class:"absolute w-full h-full object-cover brightness-75 rounded-md z-0",onLoad:d[0]||(d[0]=h=>l.value=!0)},null,8,["src"]),a(l)?b("",!0):(o(),x(y,{key:0,width:"100%",height:"100%"})),e("div",It,[e("p",Tt,v(f.list_content?.date_range_short),1),e("h4",Xt,v(f.list_content?.event_name),1)])]),_:2},1032,["to"]))),128))],512)}}}),zt={class:"relative w-full h-700 overflow-hidden"},Dt={key:0,class:"absolute w-10/12 text-center inset-0 flex flex-col justify-center items-center z-10 text-white max-w-800 mx-auto sm:w-9/10"},Rt={class:"leading-normal mb-8 text-white text-4.5xl font-extrabold font-display sm:text-7xl"},Nt={class:"flex flex-col items-center"},Ft={class:"w-fit flex flex-col items-center"},Ht={class:"leading-snug mb-2 text-white text-xl"},Mt=S({__name:"XDiscoveryBanner",props:{discovery:{}},setup(n){return(l,r)=>{const t=D,g=nt,p=z;return o(),i("div",zt,[(o(),x(t,{src:n.discovery?.header_image||"",key:n.discovery?.header_image||"",placeholder:"/images/placeholder.svg",class:"absolute w-full h-full object-cover z-0 brightness-75"},null,8,["src"])),n.discovery?(o(),i("div",Dt,[e("h2",Rt,v(n.discovery?.title),1),e("div",Nt,[e("div",Ft,[e("p",Ht,v(n.discovery?.description),1)]),u(p,{to:`/x-discovery/${n.discovery?.slug}`,class:"mt-8 rounded-full border-white border-2 border-solid py-2 px-4 flex gap-2 items-center bg-black/20 text-white hover:bg-white hover:text-black"},{default:m(()=>[u(g,{class:"size-6"}),r[0]||(r[0]=e("p",{class:"font-display text-xl font-extrabold"},"Watch",-1))]),_:1},8,["to"])])])):b("",!0)])}}}),Vt={class:"py-2 no-scrollbar relative"},At={class:"flex justify-center items-center mt-12 mb-4"},Ut={key:0,class:"no-scrollbar relative"},Wt={class:"mt-12 flex gap-2 w-full justify-center"},Ot={key:0,class:"no-scrollbar relative"},qt={class:"flex justify-center items-center mt-12 mb-4"},he=S({__name:"index",async setup(n){let l,r;st({title:()=>"XTERRA",description:()=>"XTERRA is a global lifestyle brand that champions the outdoor enthusiast in their relentless pursuit of adventure.",ogImage:()=>"https://xt-assets-media.fra1.cdn.digitaloceanspaces.com/70250/conversions/gb4I9jotUHkStBPbPS1H5jRSX65V9CzrRUygGBfx-web.jpg"});const t=lt(),g=k(()=>t.homePageBanners),p=k(()=>t.topCultureStories),_=k(()=>t.topSportStories),d=k(()=>t.featuredEvent),w=k(()=>t.topEvents),y=k(()=>t.featuredXDiscovery),c=k(()=>t.topXDiscoveries);return P(async()=>{await Promise.all([t.fetchFeaturedEvent(),t.fetchFeaturedXDiscovery(),t.fetchSportStories(),t.fetchTopXDiscoveries(),t.fetchTopEvents()])}),[l,r]=Y(async()=>at("home-page",async()=>{try{await Promise.all([t.fetchCultureStories(),t.fetchHomePageBanners()])}catch(f){if(J(f))throw K(f)}},"$tSYg1XvWNe")),await l,r(),(f,h)=>{const V=bt,B=Z,I=tt,L=yt,T=F,A=Bt,U=Pt,W=Mt;return o(),i("div",null,[a(g).length?(o(),x(V,{key:0,bannerList:a(g)},null,8,["bannerList"])):b("",!0),u(T,{padded:"none",width:1440,class:"py-12 px-4 md:px-8"},{default:m(()=>[e("div",Vt,[a(p)?(o(),x(I,{key:0,gap:"gap-7 "},{default:m(()=>[(o(!0),i($,null,C(a(p),s=>(o(),x(B,{data:{image:s?.tile_image||"",title:s?.title||"",author:s?.author?.name||"",readTime:s?.read_time||1,description:s?.hook||"",slug:s?.slug||""},key:s.uuid||""},null,8,["data"]))),128))]),_:1})):b("",!0)]),e("div",At,[u(L,{to:"/stories/culture"},{default:m(()=>[...h[0]||(h[0]=[j("More From XTERRA Culture",-1)])]),_:1})])]),_:1}),u(A,{event:a(d)},null,8,["event"]),u(T,{padded:"none",width:1440,class:"py-12 px-4 md:px-8"},{default:m(()=>[a(_).length?(o(),i("div",Ut,[u(I,{gap:"gap-7"},{default:m(()=>[(o(!0),i($,null,C(a(_),s=>(o(),x(B,{data:{image:s?.tile_image||"",title:s?.title||"",author:s?.author?.name||"",readTime:s?.read_time||1,description:s?.hook||"",slug:s?.slug||""},key:s.uuid||"",variant:"black"},null,8,["data"]))),128))]),_:1})])):b("",!0),a(w)?.length?(o(),x(U,{key:1,class:"mt-2 mb-8",events:a(w)},null,8,["events"])):b("",!0),e("div",Wt,[u(L,{to:"/stories/sports"},{default:m(()=>[...h[1]||(h[1]=[j("More XTERRA Sports Stories",-1)])]),_:1}),h[3]||(h[3]=e("p",{class:"text-gray-600 font-bold"},"|",-1)),u(L,{to:"/events"},{default:m(()=>[...h[2]||(h[2]=[j("Find an Event",-1)])]),_:1})])]),_:1}),u(W,{discovery:a(y)},null,8,["discovery"]),u(T,{padded:"none",width:1440,class:"py-12 px-4 md:px-8"},{default:m(()=>[a(c).length?(o(),i("div",Ot,[u(I,{gap:"gap-7"},{default:m(()=>
1[(o(!0),i($,null,C(a(c),s=>(o(),x(B,{data:{image:s?.thumbnail_image||"",title:s?.title||"",author:s?.author?.name||"",readTime:s?.watch_time||1,description:s?.description||"",slug:s?.slug||""},variant:"white",key:s.uuid||"",isXDiscovery:!0},null,8,["data"]))),128))]),_:1})])):b("",!0),e("div",qt,[u(L,{to:"x-discovery",class:""},{default:m(()=>[...h[4]||(h[4]=[j(" View All X-Discovery Films ",-1)])]),_:1})])]),_:1})])}}});export{he as default};
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.