1import{r as h,d as ie,o as oe,q as ce,j as s,t as de,z as me,v as A,A as v,D as F,L as P,G as he,H as ue,R as xe,I as X,F as fe,x as ge,J as pe,K as be}from"./index-zzNIZNzt.js";import{p as we,v as ye,a as je}from"./virtualChallengeTemplates-CW7aPtlD.js";import{r as ve,i as Ne,f as N,c as H,a as J,p as ke,v as Se,b as Ce,d as Le,e as Ee,n as Q,g as ze,s as Te,u as M,h as Z,j as B,m as j,M as We,k as T,l as S}from"./proxy-BXBrhS2a.js";import{S as Fe}from"./sparkles-BB8ZggA7.js";import{F as V}from"./footprints-C3-KnVck.js";import{M as I}from"./medal-C4Ng4jjc.js";import{C as Pe}from"./circle-check-_D1rKouY.js";const E=new WeakMap;let f;const ee=(e,t,r)=>(l,a)=>a&&a[0]?a[0][e+"Size"]:Ne(l)&&"getBBox"in l?l.getBBox()[t]:l[r],_e=ee("inline","width","offsetWidth"),He=ee("block","height","offsetHeight");function Me({target:e,borderBoxSize:t}){var r;(r=E.get(e))==null||r.forEach(l=>{l(e,{get width(){return _e(e,t)},get height(){return He(e,t)}})})}function Oe(e){e.forEach(Me)}function Re(){typeof ResizeObserver>"u"||(f=new ResizeObserver(Oe))}function Ae(e,t){f||Re();const r=ve(e);return r.forEach(l=>{let a=E.get(l);a||(a=new Set,E.set(l,a)),a.add(t),f==null||f.observe(l)}),()=>{r.forEach(l=>{const a=E.get(l);a==null||a.delete(t),a!=null&&a.size||f==null||f.unobserve(l)})}}const z=new Set;let b;function Be(){b=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};z.forEach(t=>t(e))},window.addEventListener("resize",b)}function Ve(e){return z.add(e),b||Be(),()=>{z.delete(e),!z.size&&typeof b=="function"&&(window.removeEventListener("resize",b),b=void 0)}}function Ie(e,t){return typeof e=="function"?Ve(e):Ae(e,t)}function te(e,t){let r;const l=()=>{const{currentTime:a}=t,i=(a===null?0:a.value)/100;r!==i&&e(i),r=i};return N.preUpdate(l,!0),()=>H(l)}function Ye(...e){const t=!Array.isArray(e[0]),r=t?0:-1,l=e[0+r],a=e[1+r],n=e[2+r],i=e[3+r],o=J(a,n,i);return t?o(l):o}const De=50,Y=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),$e=()=>({time:0,x:Y(),y:Y()}),Ge={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function D(e,t,r,l){const a=r[t],{length:n,position:i}=Ge[t],o=a.current,c=r.time;a.current=e[`scroll${i}`],a.scrollLength=e[`scroll${n}`]-e[`client${n}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=ke(0,a.scrollLength,a.current);const d=l-c;a.velocity=d>De?0:Se(a.current-o,d)}function Ke(e,t,r){D(e,"x",t,r),D(e,"y",t,r),t.time=r}function qe(e,t){const r={x:0,y:0};let l=e;for(;l&&l!==t;)if(Ce(l))r.x+=l.offsetLeft,r.y+=l.offsetTop,l=l.offsetParent;else if(l.tagName==="svg"){const a=l.getBoundingClientRect();l=l.parentElement;const n=l.getBoundingClientRect();r.x+=a.left-n.left,r.y+=a.top-n.top}else if(l instanceof SVGGraphicsElement){const{x:a,y:n}=l.getBBox();r.x+=a,r.y+=n;let i=null,o=l.parentNode;for(;!i;)o.tagName==="svg"&&(i=o),o=l.parentNode;l=i}else break;return r}const _={start:0,center:.5,end:1};function $(e,t,r=0){let l=0;if(e in _&&(e=_[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?l=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?l=a/100*document.documentElement.clientWidth:e.endsWith("vh")?l=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(l=t*e),r+l}const Ue=[0,0];function Xe(e,t,r,l){let a=Array.isArray(e)?e:Ue,n=0,i=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,_[e]?e:"0"]),n=$(a[0],r,l),i=$(a[1],t),n-i}const Je={All:[[0,0],[1,1]]},Qe={x:0,y:0};function Ze(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function et(e,t,r){const{offset:l=Je.All}=r,{target:a=e,axis:n="y"}=r,i=n==="y"?"height":"width",o=a!==e?qe(a,e):Qe,c=a===e?{width:e.scrollWidth,height:e.scrollHeight}:Ze(a),d={width:e.clientWidth,height:e.clientHeight};t[n].offset.length=0;let x=!t[n].interpolate;const g=l.length;for(let m=0;m<g;m++){const p=Xe(l[m],d[i],c[i],o[n]);!x&&p!==t[n].interpolatorOffsets[m]&&(x=!0),t[n].offset[m]=p}x&&(t[n].interpolate=J(t[n].offset,Le(l),{clamp:!1}
1),t[n].interpolatorOffsets=[...t[n].offset]),t[n].progress=Ee(0,1,t[n].interpolate(t[n].current))}function tt(e,t=e,r){if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let l=t;for(;l&&l!==e;)r.x.targetOffset+=l.offsetLeft,r.y.targetOffset+=l.offsetTop,l=l.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight}function st(e,t,r,l={}){return{measure:a=>{tt(e,l.target,r),Ke(e,r,a),(l.offset||l.target)&&et(e,r,l)},notify:()=>t(r)}}const y=new WeakMap,G=new WeakMap,W=new WeakMap,K=e=>e===document.scrollingElement?window:e;function se(e,{container:t=document.scrollingElement,...r}={}){if(!t)return Q;let l=W.get(t);l||(l=new Set,W.set(t,l));const a=$e(),n=st(t,e,a,r);if(l.add(n),!y.has(t)){const o=()=>{for(const g of l)g.measure(ze.timestamp);N.preUpdate(c)},c=()=>{for(const g of l)g.notify()},d=()=>N.read(o);y.set(t,d);const x=K(t);window.addEventListener("resize",d,{passive:!0}),t!==document.documentElement&&G.set(t,Ie(t,d)),x.addEventListener("scroll",d,{passive:!0}),d()}const i=y.get(t);return N.read(i,!1,!0),()=>{var d;H(i);const o=W.get(t);if(!o||(o.delete(n),o.size))return;const c=y.get(t);y.delete(t),c&&(K(t).removeEventListener("scroll",c),(d=G.get(t))==null||d(),window.removeEventListener("resize",c))}}const q=new Map;function rt(e){const t={value:0},r=se(l=>{t.value=l[e.axis].progress*100},e);return{currentTime:t,cancel:r}}function re({source:e,container:t,...r}){const{axis:l}=r;e&&(t=e);const a=q.get(t)??new Map;q.set(t,a);const n=r.target??"self",i=a.get(n)??{},o=l+(r.offset??[]).join(",");return i[o]||(i[o]=!r.target&&Te()?new ScrollTimeline({source:t,axis:l}):rt({container:t,...r})),i[o]}function lt(e,t){const r=re(t);return e.attachTimeline({timeline:t.target?void 0:r,observe:l=>(l.pause(),te(a=>{l.time=l.iterationDuration*a},r))})}function at(e){return e.length===2}function nt(e,t){return at(e)?se(r=>{e(r[t.axis].progress,r)},t):te(e,re(t))}function it(e,{axis:t="y",container:r=document.scrollingElement,...l}={}){if(!r)return Q;const a={axis:t,container:r,...l};return typeof e=="function"?nt(e,a):lt(e,a)}const ot=()=>({scrollX:j(0),scrollY:j(0),scrollXProgress:j(0),scrollYProgress:j(0)}),C=e=>e?!e.current:!1;function ct({container:e,target:t,...r}={}){const l=M(ot),a=h.useRef(null),n=h.useRef(!1),i=h.useCallback(()=>(a.current=it((o,{x:c,y:d})=>{l.scrollX.set(c.current),l.scrollXProgress.set(c.progress),l.scrollY.set(d.current),l.scrollYProgress.set(d.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var o;(o=a.current)==null||o.call(a)}),[e,t,JSON.stringify(r.offset)]);return Z(()=>{if(n.current=!1,C(e)||C(t)){n.current=!0;return}else return i()},[i]),h.useEffect(()=>{if(n.current)return B(!C(e)),B(!C(t)),i()},[i]),l}function dt(e){const t=M(()=>j(e)),{isStatic:r}=h.useContext(We);if(r){const[,l]=h.useState(e);h.useEffect(()=>t.on("change",l),[])}return t}function le(e,t){const r=dt(t()),l=()=>r.set(t());return l(),Z(()=>{const a=()=>N.preRender(l,!1,!0),n=e.map(i=>i.on("change",a));return()=>{n.forEach(i=>i()),H(l)}}),r}function mt(e){T.current=[],e();const t=le(T.current,e);return T.current=void 0,t}function L(e,t,r,l){if(typeof e=="function")return mt(e);const a=typeof t=="function"?t:Ye(t,r,l);return Array.isArray(e)?U(e,a):U([e],([n])=>a(n))}function U(e,t){const r=M(()=>[]);return le(e,()=>{r.length=0;const l=e.length;for(let a=0;a<l;a++)r[a]=e[a].get();return t(r)})}function ht(e){const t=we(e.challenge_config),r=ye(t.templateKey)||je(e.slug);return{image:(r==null?void 0:r.coverImage)||t.heroImage||e.image_url||(r==null?void 0:r.imageUrl)||"",accent:t.accent||(r==null?void 0:r.accent)||"#f97316",tagline:e.story_tagline||(r==null?void 0:r.storyTagline)||"An extraordinary route you can complete from anywhere.",activities:t.activities||(r==null?void 0:r.activities)||["Walk","Run"],start:t.startLabel||(r==null?void 0:r.startLabel)||"Start anywhere",finish:t.finishLabel||(r==null?void 0:r.finishLabel)||"Challenge complete"}}function ut({event:e}){const t=ht(e),r=pe(e),l=(e.ticket_types||[]).reduce((n,i)=>n+(i.current_sales||0),0),a=r.maxDistanceKm||r.minDistanceKm;return s.jsx("article",{className:"group overflow-hidden rounded-[1.75rem] border border-slate-200 bg-white shadow-xl shadow-slate-900/5 transition hover:-translate-y-1 hover:border-slate-300",children:s.jsxs(P,{to:`/event/${e.slug||e.id}`,className:"block h-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-orange-400",children:[s.jsxs("div",{className:"relative aspect-[16/10] overflow-hidden bg-slate-900",children:[t.image?s.jsx("img",{src:t.image,alt:"",className:"h-full w-full object-cover transition duration-700 group-hover:scale-105",loading:"lazy"}):s.jsx("div",{className:"flex h-full items-center justify-center bg-gradient-to-br from-slate-800 to-slate-950",children:s.jsx(X,{className:"h-16 w-16 text-white/30"})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#090b10] via-black/5 to-transparent"}),s.jsx("div",{className:"absolute left-5 top-5 rounded-full border border-white/20 bg-black/55 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.18em] text-white backdrop-blur",children:"Start anytime"}),a&&s.jsxs("div",{className:"absolute bottom-5 left-5 flex items-center gap-2 text-sm font-semibold text-white",children:[s.jsx(F,{className:"h-4 w-4"}
1),a.toLocaleString()," km"]})]}),s.jsxs("div",{className:"flex h-[calc(100%-1px)] flex-col p-6",children:[s.jsx("div",{className:"mb-3 flex flex-wrap gap-2",children:t.activities.slice(0,3).map(n=>s.jsx("span",{className:"rounded-full border px-2.5 py-1 text-[11px] font-semibold text-slate-600",style:{borderColor:`${t.accent}70`},children:n},n))}),s.jsx("h2",{className:"text-2xl font-bold leading-tight text-slate-950",children:e.title}),s.jsx("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-slate-600",children:t.tagline}),s.jsx("div",{className:"mt-6 border-t border-slate-200 pt-4 text-xs text-slate-500",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("span",{className:"truncate",children:t.start}),s.jsx(v,{className:"h-3.5 w-3.5 shrink-0"}),s.jsx("span",{className:"truncate text-right",children:t.finish})]})}),s.jsxs("div",{className:"mt-5 flex items-end justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs uppercase tracking-wider text-slate-500",children:l>0?`${l.toLocaleString()} taking part`:"Your route awaits"}),s.jsx("p",{className:"mt-1 text-lg font-bold text-slate-950",children:r.lowestPrice==null?"View entry":r.lowestPrice===0?"Free":`From ${be(r.lowestPrice,e.currency||"GBP")}`})]}),s.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-full text-slate-950 transition group-hover:translate-x-1",style:{backgroundColor:t.accent},"aria-hidden":"true",children:s.jsx(v,{className:"h-5 w-5"})})]})]})]})})}function jt(){var R;const e=h.useRef(null),{scrollYProgress:t}=ct({target:e,offset:["start start","end start"]}),r=L(t,[0,1],[0,-90]),l=L(t,[0,1],[0,-145]),a=L(t,[0,1],[0,-65]),n=L(t,[0,1],[1,1.08]),[i,o]=ie(),c=(i.get("q")||"").slice(0,120),[d,x]=h.useState(c);h.useEffect(()=>x(c),[c]);const g=h.useMemo(()=>({...oe,q:c,sort:"newest"}),[c]),m=ce(g,"virtual"),p=((R=m.data)==null?void 0:R.pages.flat())||[],O=u=>{u.preventDefault();const k=d.trim();o(k?{q:k}:{}),window.requestAnimationFrame(()=>{var w;(w=document.getElementById("virtual-list-title"))==null||w.scrollIntoView({behavior:"smooth",block:"start"})})};return s.jsxs("div",{className:"discovery-shell bg-[#f7f6f2] text-slate-950",children:[s.jsx(de,{title:"Virtual challenges | Start anywhere | 26.events",description:"Choose an immersive virtual challenge, log your distance from anywhere and unlock route stories and a finisher reward as you progress.",path:"/virtual-challenges"}),s.jsxs("main",{children:[s.jsxs("section",{ref:e,className:"relative isolate min-h-[760px] overflow-hidden bg-[#071b17] text-white",children:[s.jsx("img",{src:"/virtual-challenges/images/mourne-hero.webp",alt:"",className:"absolute inset-0 -z-30 h-full w-full object-cover object-[66%_center]"}),s.jsx("div",{className:"absolute inset-0 -z-20 bg-[linear-gradient(90deg,rgba(5,22,19,.96)_0%,rgba(5,22,19,.83)_38%,rgba(5,22,19,.26)_72%,rgba(5,22,19,.08)_100%)]"}),s.jsx("div",{className:"absolute inset-0 -z-10 bg-[linear-gradient(0deg,rgba(4,17,15,.92)_0%,transparent_58%)]"}),s.jsx(me,{}),s.jsxs("div",{id:"main-content",className:"discovery-container flex min-h-[760px] flex-col pb-7 pr-8 pt-32 sm:pr-0 sm:pt-36",children:[s.jsx("div",{className:"flex",children:s.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-white/25 bg-[#091f1a]/60 px-4 py-2 text-xs font-semibold uppercase tracking-[0.18em] text-white/85 backdrop-blur-md",children:[s.jsx(Fe,{className:"h-4 w-4 text-[#ff915f]"})," Your route. Your pace. Your adventure."]})}),s.jsxs("div",{className:"grid flex-1 items-end gap-12 pb-10 pt-10 lg:grid-cols-3",children:[s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("p",{className:"mb-5 text-[11px] font-semibold uppercase tracking-[0.18em] text-[#e3ccc0]",children:"Virtual challenges by 26.events"}),s.jsxs("h1",{className:"max-w-4xl font-semibold",style:{fontSize:"clamp(3.35rem, 6.7vw, 6.4rem)",lineHeight:.98,letterSpacing:"-0.055em"},children:["Take on the world.",s.jsxs("span",{className:"block font-normal italic text-[#ff915f]",style:{fontFamily:"Georgia, serif",fontSize:"clamp(3rem, 6.3vw, 6rem)",lineHeight:.98,letterSpacing:"-0.045em"},children:["From ",s.jsxs("span",{className:"block sm:inline",children:["wherever ",s.jsx("span",{className:"block sm:inline",children:"you are."})]})]})]}),s.jsx("p",{className:"mt-7 max-w-2xl text-base leading-7 text-white/80 sm:text-lg",children:"Walk, run, ride or swim through remarkable real-world routes. Every kilometre moves you forward, reveals the story and brings the finish closer."}),s.jsxs("form",{onSubmit:O,role:"search",className:"mt-8 flex max-w-xl items-center gap-2 rounded-2xl border border-white bg-white p-1.5 pl-4 text-slate-900 shadow-2xl shadow-black/25",children:[s.jsx(A,{className:"h-5 w-5 shrink-0 text-slate-500","aria-hidden":"true"}),s.jsx("label",{className:"sr-only",htmlFor:"virtual-hero-search",children:"Search virtual challenges"}),s.jsx("input",{id:"virtual-hero-search",value:d,onChange:u=>x(u.target.value),placeholder:"Search challenges",maxLength:120,className:"min-w-0 flex-1 bg-transparent px-2 py-3 text-sm outline-none placeholder:text-slate-500"}),s.jsxs("button",{type:"submit",className:"inline-flex min-h-11 items-center gap-2 rounded-xl bg-[#cf4510] px-4 text-sm font-bold text-white transition hover:bg-[#b83c0b]",children:["Find a challenge ",s.jsx(v,{className:"h-4 w-4"})]})]})]}),s.jsxs(S.div,{style:{scale:n},className:"relative h-[390px] self-end sm:h-[450px] lg:mb-0 lg:h-[570px]","aria-hidden":"true",children:[s.jsx("div",{className:"absolute inset-x-0 bottom-10 mx-auto h-72 w-72 rounded-full bg-[#ff8a58]/25 blur-3xl lg:bottom-20"}),s.jsx(S.img,{style:{y:r},src:"/virtual-challenges/medals/channel-crossing.png",alt:"",className:"absolute bottom-[-44px] left-[-42px] z-10 w-[210px] -rotate-[14deg] drop-shadow-[0_30px_28px_rgba(0,0,0,.55)] sm:left-[2%] sm:w-[245px] lg:bottom-[-40px] lg:left-[-14%] lg:w-[260px]",loading:"eager"}),s.jsx(S.img,{style:{x:"-50%",y:l},src:"/virtual-challenges/medals/lap-of-the-moon.png",alt:"",className:"absolute bottom-[-54px] left-1/2 z-20 w-[245px] drop-shadow-[0_34px_30px_rgba(0,0,0,.62)] sm:w-[285px] lg:bottom-[-60px] lg:w-[310px]",loading:"eager"}),s.jsx(S.img,{style:{y:a},src:"/virtual-challenges/medals/mount-everest-climb.png",alt:"",className:"absolute bottom-[-24px] right-[-28px] z-30 w-[210px] rotate-[14deg] drop-shadow-[0_30px_28px_rgba(0,0,0,.55)] sm:right-[2%] sm:w-[245px] lg:bottom-[-12px] lg:right-[-8%] lg:w-[250px]",loading:"eager"}),s.jsx("div",{className:"absolute inset-x-0 bottom-0 z-40 h-20 bg-gradient-to-t from-[#061813] to-transparent"})]})]}),s.jsxs("div",{className:"flex items-center justify-between border-t border-white/15 pt-5 text-[11px] text-white/70",children:[s.jsx("span",{children:"Legendary routes. Your everyday miles."}),s.jsxs("a",{href:"#virtual-list-title",className:"flex items-center gap-2 font-semibold text-white",children:["Choose your challenge ",s.jsx(v,{className:"h-4 w-4 rotate-90"})]})]})]})]}),s.jsx("div",{className:"discovery-promise relative z-20",children:s.jsxs("div",{className:"discovery-container",children:[s.jsxs("span",{children:[s.jsx(V,{})," Start from anywhere"]}),s.jsxs("span",{children:[s.jsx(F,{})," Follow a real route"]}),s.jsxs("span",{children:[s.jsx(I,{})," Finish something epic"]})]})}),s.jsx("section",{className:"overflow-hidden border-b border-slate-200 bg-[#eef0eb] py-14 sm:py-20","aria-labelledby":"journey-title",children:s.jsxs("div",{className:"discovery-container",children:[s.jsxs("div",{className:"flex flex-col gap-5 lg:flex-row lg:items-end lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.24em] text-[#b5441d]",children:"One journey. Three simple steps."}),s.jsx("h2",{id:"journey-title",className:"mt-3 max-w-3xl text-3xl font-semibold tracking-[-0.04em] text-slate-950 sm:text-5xl",children:"The route is real. The way you finish is yours."})]}),s.jsxs(P,{to:"/my-tickets",className:"inline-flex shrink-0 items-center gap-2 text-sm font-semibold text-slate-900",children:["Already entered? Continue your journey ",s.jsx(he,{className:"h-4 w-4"})]})]}),s.jsx("div",{className:"-mx-5 mt-9 flex snap-x gap-4 overflow-x-auto px-5 pb-3 sm:-mx-8 sm:px-8 lg:mx-0 lg:grid lg:grid-cols-3 lg:overflow-visible lg:px-0",children:[[V,"01","Move anywhere","Walk, run, hike, cycle or swim. Your everyday movement carries you along the route."],[F,"02","Watch the route unfold","See your progress grow and unlock new places, milestones and stories along the way."],[I,"03","Own the finish","Complete the journey and claim a real medal made to celebrate the distance you covered."]].map(([u,k,w,ae])=>{const ne=u;return s.jsxs("article",{className:"min-w-[280px] flex-1 snap-start rounded-[1.5rem] border border-slate-300/80 bg-white/70 p-6 shadow-sm backdrop-blur-sm lg:min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-[#09231d] text-[#ff915f]",children:s.jsx(ne,{className:"h-5 w-5"})}),s.jsx("span",{className:"text-xs font-bold tracking-[0.2em] text-slate-400",children:String(k)})]}),s.jsx("h3",{className:"mt-7 text-xl font-semibold text-slate-950",children:String(w)}),s.jsx("p",{className:"mt-2 text-sm leading-6 text-slate-600",children:String(ae)})]},String(w))})})]})}),s.jsxs("section",{className:"mx-auto max-w-7xl px-5 py-16 sm:px-8 sm:py-24","aria-labelledby":"virtual-list-title",children:[s.jsxs("div",{className:"mb-10 flex flex-col gap-6 sm:flex-row sm:items-end sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-orange-400",children:"Choose your journey"}),s.jsx("h2",{id:"virtual-list-title",className:"mt-3 text-3xl font-semibold sm:text-5xl",children:"Start anytime. Finish your way."}),s.jsx("p",{className:"mt-3 max-w-2xl text-slate-600",children:"Virtual challenges live here in their own collection, separate from physical race listings."})]}),s.jsxs("form",{onSubmit:O,role:"search",className:"flex w-full max-w-md items-center rounded-full border border-slate-200 bg-white p-1.5
1shadow-sm focus-within:border-orange-400/70",children:[s.jsx(A,{className:"ml-3 h-4 w-4 text-slate-400","aria-hidden":"true"}),s.jsx("label",{className:"sr-only",htmlFor:"virtual-search",children:"Search virtual challenges"}),s.jsx("input",{id:"virtual-search",value:d,onChange:u=>x(u.target.value),placeholder:"Search challenges",maxLength:120,className:"min-w-0 flex-1 bg-transparent px-3 py-2 text-sm text-slate-950 outline-none placeholder:text-slate-400"}),s.jsx("button",{type:"submit",className:"rounded-full bg-orange-500 px-4 py-2 text-sm font-semibold text-slate-950 transition hover:bg-orange-400",children:"Search"})]})]}),m.isLoading?s.jsxs("div",{className:"flex min-h-72 items-center justify-center",role:"status",children:[s.jsx(ue,{className:"h-8 w-8 animate-spin text-orange-400"}),s.jsx("span",{className:"sr-only",children:"Loading virtual challenges"})]}):m.isError?s.jsxs("div",{className:"rounded-3xl border border-slate-200 bg-white py-16 text-center",children:[s.jsx(xe,{className:"mx-auto h-8 w-8 text-orange-400"}),s.jsx("h2",{className:"mt-4 text-2xl font-semibold",children:"The challenges couldnât load"}),s.jsx("p",{className:"mt-2 text-slate-600",children:"Please try again in a moment."}),s.jsx("button",{onClick:()=>m.refetch(),className:"mt-6 rounded-full border border-slate-300 px-5 py-2.5 text-sm font-semibold",children:"Try again"})]}):p.length?s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"mb-6 text-sm text-slate-500",role:"status",children:[p.length,m.hasNextPage?"+":""," challenge",p.length===1?"":"s"]}),s.jsx("div",{className:"grid gap-6 md:grid-cols-2 xl:grid-cols-3",children:p.map(u=>s.jsx(ut,{event:u},u.id))}),m.hasNextPage&&s.jsx("div",{className:"mt-10 text-center",children:s.jsx("button",{onClick:()=>m.fetchNextPage(),disabled:m.isFetchingNextPage,className:"rounded-full border border-slate-300 bg-white px-6 py-3 text-sm font-semibold transition hover:border-orange-400/60 disabled:opacity-50",children:m.isFetchingNextPage?"Loadingâ¦":"Show more challenges"})})]}):s.jsxs("div",{className:"rounded-3xl border border-slate-200 bg-white py-16 text-center",children:[s.jsx(X,{className:"mx-auto h-10 w-10 text-orange-400"}),s.jsx("h2",{className:"mt-4 text-2xl font-semibold",children:c?"No challenges match that search":"New journeys are being prepared"}),s.jsx("p",{className:"mx-auto mt-2 max-w-lg text-slate-600",children:c?"Try another route, place or challenge name.":"Check back soon for the next route you can complete from anywhere."}),c&&s.jsx("button",{onClick:()=>o({}),className:"mt-6 rounded-full border border-slate-300 px-5 py-2.5 text-sm font-semibold",children:"Clear search"})]})]}),s.jsx("section",{className:"border-y border-slate-200 bg-white px-5 py-14 sm:px-8",children:s.jsxs("div",{className:"mx-auto grid max-w-7xl gap-8 md:grid-cols-[1fr_auto] md:items-center",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"flex items-center gap-2 text-sm font-semibold text-orange-400",children:[s.jsx(Pe,{className:"h-4 w-4"})," Already entered?"]}),s.jsx("h2",{className:"mt-3 text-3xl font-semibold",children:"Your progress lives with your ticket."}),s.jsx("p",{className:"mt-2 text-slate-600",children:"Open My tickets to log activity, see your route and continue your journey."})]}),s.jsxs(P,{to:"/my-tickets",className:"inline-flex items-center justify-center gap-2 rounded-full bg-slate-950 px-6 py-3 font-semibold text-white",children:["Open my tickets ",s.jsx(v,{className:"h-4 w-4"})]})]})})]}),s.jsx(fe,{}),s.jsx(ge,{})]})}export{jt 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.