1import{j as e}from"./vendor-ui-y7gWrFj_.js";import{L as u}from"./vendor-react-B-LUs8MM.js";import{ak as p,D as g,N as f,m as d,e as h,F as j,al as N,c6 as b}from"./index-BQEiBH1l.js";import"./vendor-data-BnvdHUK4.js";import"./vendor-charts-cFGvS3Ww.js";import"./vendor-editor-DotdaXd8.js";import"./vendor-dnd-D9eei3Si.js";const y=r=>{if(!r)return"";if(typeof document<"u"){const t=document.createElement("div");return t.innerHTML=r,t.textContent||t.innerText||""}return r.replace(/<[^>]*>/g,"")},v=(r,t=160)=>{const a=r.replace(/\s+/g," ").trim();return a.length<=t?a:a.slice(0,t-1).trimEnd()+"â¦"},m=({partner:r})=>{const t=N(r.name),a=v(y(r.popup_content));return e.jsxs(u,{to:`/partners/${t}`,className:"group h-full flex flex-col p-6 rounded-xl bg-card border border-border shadow-card hover:shadow-lg transition-shadow",children:[e.jsx("div",{className:"h-48 w-full rounded-lg border border-border bg-background p-4 flex items-center justify-center mb-4",children:r.image_url?e.jsx("img",{src:r.image_url,alt:r.name,className:"max-h-full max-w-full object-contain",loading:"lazy"}):e.jsx("span",{className:"text-sm text-muted-foreground",children:r.name})}),e.jsx("h3",{className:"text-xl font-bold uppercase mb-3 text-foreground",children:r.name}),a&&e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:a}),e.jsxs("span",{className:"mt-auto inline-flex items-center gap-1 text-primary text-sm font-medium group-hover:underline",children:["View details",e.jsx(b,{className:"h-4 w-4"})]})]})},w=({tier:r,partners:t})=>{const a=t.length>=4;return e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-8 text-center text-gradient-title",children:r}),a?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:t.map(i=>e.jsx(m,{partner:i},i.id))}):e.jsx("div",{className:"flex flex-wrap justify-center gap-8",children:t.map(i=>e.jsx("div",{className:"w-full md:w-[calc(50%-1rem)] lg:w-[calc(25%-1.5rem)]",children:e.jsx(m,{partner:i})},i.id))})]})},c="Other Partners",x=["Headline Partners","Media Partners"],E=r=>{const t=new Map,a=new Map;for(const n of r){const s=n.tier&&n.tier.trim()||c,o=n.display_order??Number.MAX_SAFE_INTEGER;(!t.has(s)||o<(t.get(s)??1/0))&&t.set(s,o),a.has(s)||a.set(s,[]),a.get(s).push(n)}return Array.from(a.keys()).sort((n,s)=>{if(n===c)return 1;if(s===c)return-1;const o=x.indexOf(n),l=x.indexOf(s);return o!==-1||l!==-1?o===-1?1:l===-1?-1:o-l:(t.get(n)??0)-(t.get(s)??0)}).map(n=>({tier:n,partners:[...a.get(n)].sort((s,o)=>s.name.localeCompare(o.name))}))},R=()=>{const{data:r,isLoading:t,isError:a}=p(),i=(r??[]).filter(s=>s.is_active),n=E(i);return e.jsxs(e.Fragment,{children:[e.jsx(g,{titlePrefix:"Sponsors and Partners",description:"Meet the sponsors and partners supporting {eventName}."}),e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(f,{}),e.jsxs("main",{className:"flex-1 pt-page",children:[e.jsx("section",{className:"pt-page pb-5 bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 text-center",children:[e.jsx(d,{pageName:"media-partners",sectionName:"hero",contentKey:"title",defaultValue:"Sponsors and Partners",className:"text-4xl md:text-5xl font-bold mb-4 text-gradient-title",as:"h1"}),e.jsx(d,{pageName:"media-partners",sectionName:"hero",contentKey:"subtitle",defaultValue:"Our event wouldn't be possible without the support of our amazing partners. Discover the brands that have helped make this event a success.",className:"text-lg text-muted-foreground page-subtitle",as:"p"})]})}),e.jsx("section",{className:"py-16",children:e.jsx("div",{className:"container mx-auto px-4",children:t?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(h,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):a?e.jsx("p",{className:"text-center text-muted-foreground py-12",children:"Unable to load partners right now. Please try again shortly."}):n.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-12",children:"Partners will be announced soon."}):n.map(s=>e.jsx(w,{tier:s.tier,partners:s.partners},s.tier))})})]}),e.jsx(j,{})]})]})};export{R 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.