fansunited-sports-ui 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,7 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),j=require("react"),Kt=require("react-dom"),Xt={default:"bg-neutral-700 text-white border-neutral-700",primary:"text-white bg-primary-500 border-primary-500",secondary:"text-white bg-secondary-500 border-secondary-500",danger:"bg-red-600 text-white border-red-700",warning:"bg-yellow-600 text-white border-yellow-700",success:"bg-green-600 text-white border-green-700",info:"bg-cyan-600 text-white border-cyan-700",custom:""};function $e({badge:e}){const s=e.variant||"default",r=s==="custom",o=Xt[s],n=e.styles?.container||"",a=r?n:`inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border ${o} ${n}`;return t.jsx("span",{role:"status","aria-label":e.text,className:a,children:e.text})}const Qt={"top-left":"absolute top-2 sm:top-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","top-right":"absolute top-2 sm:top-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10","bottom-left":"absolute bottom-2 sm:bottom-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","bottom-right":"absolute bottom-2 sm:bottom-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10"};function we({badges:e,positions:s=["top-left","top-right","bottom-left","bottom-right"],styles:r}){if(!e||e.length===0)return null;const o=r?.container||"";return t.jsx(t.Fragment,{children:s.map(n=>{const a=e.filter(i=>i.position===n);return a.length===0?null:t.jsx("div",{className:`${Qt[n]} ${o}`,role:"group","aria-label":`${n} badges`,children:a.map((i,l)=>t.jsx($e,{badge:i},`${n}-${l}`))},n)})})}const Jt={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},ye={cell:"backdrop-blur-md bg-black/10 rounded-lg px-2 py-1",gap:"md",typography:{value:"font-bold",label:"text-xs mt-1 opacity-90"}};function es(e){return`${e?.cell??ye.cell} flex min-w-12 text-center items-center justify-center`}function ts(e){return Jt.gap[e?.gap??ye.gap]}function Ge(e,s){return s?.typography?.[e]??ye.typography[e]}const Q={days:"Days",hours:"Hours",minutes:"Mins",seconds:"Secs"};function ze(e){const s=e.getTime()-new Date().getTime();return s<=0?{days:0,hours:0,minutes:0,seconds:0,total:0}:{days:Math.floor(s/(1e3*60*60*24)),hours:Math.floor(s/(1e3*60*60)%24),minutes:Math.floor(s/1e3/60%60),seconds:Math.floor(s/1e3%60),total:s}}function nt({targetDate:e,styles:s,labels:r}){const o=j.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[n,a]=j.useState(ze(o)),i=s?.container||"",l=es(s),c=ts(s),d=Ge("value",s),u=Ge("label",s),m={days:r?.days??Q.days,hours:r?.hours??Q.hours,minutes:r?.minutes??Q.minutes,seconds:r?.seconds??Q.seconds};return j.useEffect(()=>{const x=setInterval(()=>{a(ze(o))},1e3);return()=>clearInterval(x)},[o]),t.jsxs("div",{className:`flex ${c} ${i}`,role:"timer","aria-live":"polite",children:[n.days>0&&t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:`${l} ${d}`,children:n.days}),t.jsx("div",{className:u,children:m.days})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:`${l} ${d}`,children:String(n.hours).padStart(2,"0")}),t.jsx("div",{className:u,children:m.hours})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:`${l} ${d}`,children:String(n.minutes).padStart(2,"0")}),t.jsx("div",{className:u,children:m.minutes})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:`${l} ${d}`,children:String(n.seconds).padStart(2,"0")}),t.jsx("div",{className:u,children:m.seconds})]})]})}const ss={default:"bg-muted text-foreground hover:bg-muted/80 border border-transparent",primary:"bg-primary-500 text-white hover:bg-primary-600 border border-transparent",secondary:"bg-secondary-500 text-secondary-foreground hover:bg-secondary-500/80 border border-transparent",outline:"bg-transparent border border-current text-foreground hover:bg-muted",link:"bg-transparent text-primary hover:underline border border-transparent",custom:""};function rs({cta:e}){const s=e.variant==="custom",r=ss[e.variant||"default"],o=e.styles?.container||"",n=s?o:`box-border w-full flex items-center justify-center px-4 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap cursor-pointer ${r} ${o}`,a=i=>{e.onClick&&(i.preventDefault(),i.stopPropagation(),e.onClick())};return e.href?t.jsx("a",{href:e.href,className:n,onClick:a,role:"link","aria-label":e.text,children:e.text}):t.jsx("button",{type:"button",className:n,onClick:a,"aria-label":e.text,children:e.text})}const ns={vertical:"flex flex-col gap-2 sm:gap-1.5",horizontal:"flex flex-row gap-2 sm:gap-3",responsive:"flex flex-col sm:flex-row gap-1 sm:gap-2"};function se({primaryCta:e,secondaryCta:s,layout:r="responsive",styles:o}){if(!e&&!s)return null;const n=o?.container||"";return t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:`${ns[r]} ${n}`,children:[e,s]})}const os={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"},as={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},is={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function S({name:e,mobileName:s,imageUrl:r,subtitle:o,orientation:n="ltr",truncate:a=!1,styles:i}){const l=i?.imageSize||"md",c=i?.imageBorderRadius||"md",d=i?.imageBorder||"",u=i?.gap||"2",m=i?.textAlign||"left",x=i?.container||"",f=os[l],v=is[c],h=as[u],N=i?.typography?.name||"font-semibold leading-5",p=i?.typography?.subtitle||"text-xs text-muted-foreground",g=n==="rtl"?"flex-row-reverse":"flex-row",b=m==="right"?"text-right":"text-left";return t.jsxs("div",{className:`flex items-center ${g} ${h} ${x}`,role:"group","aria-label":`${e}${o?` - ${o}`:""}`,children:[r&&t.jsx("img",{src:r,alt:"","aria-hidden":"true",className:`${f} ${v} object-cover shrink-0 ${d}`}),t.jsxs("div",{className:`flex flex-col ${b} ${a?"min-w-0":""}`,children:[s?t.jsxs("span",{className:`${N} ${a?"truncate":""}`,children:[t.jsx("span",{className:"sm:hidden",children:s}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:`${N} ${a?"truncate":""}`,children:e}),o&&t.jsx("span",{className:`${p} ${a?"truncate":""}`,children:o})]})]})}const P={sm:{button:"px-2 py-1 text-xs min-w-[28px]",icon:"w-3 h-3",dot:"w-2 h-2"},md:{button:"px-3 py-1.5 text-sm min-w-[36px]",icon:"w-4 h-4",dot:"w-2.5 h-2.5"},lg:{button:"px-4 py-2 text-base min-w-[44px]",icon:"w-5 h-5",dot:"w-3 h-3"}},re={sm:"gap-1",md:"gap-2",lg:"gap-3"},ne={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},Ce=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),Se=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),ls=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 19l-7-7 7-7M18 19l-7-7 7-7"})}),ds=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 5l7 7-7 7M6 5l7 7-7 7"})});function A({onClick:e,disabled:s,active:r,size:o,styles:n,children:a,ariaLabel:i}){const l=P[o],c="inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",d=s?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":r?`cursor-pointer bg-primary-500 text-white ${n?.typography?.activeButton||""}`:`cursor-pointer bg-muted text-foreground hover:bg-muted/80 ${n?.typography?.button||""}`;return t.jsx("button",{type:"button",onClick:e,disabled:s,"aria-label":i,"aria-current":r?"page":void 0,className:`${c} ${l.button} ${d}`,children:a})}function cs(e,s,r){if(s<=r)return Array.from({length:s},(l,c)=>c+1);const o=Math.floor(r/2);let n=Math.max(1,e-o),a=Math.min(s,n+r-1);a-n+1<r&&(n=Math.max(1,a-r+1));const i=[];n>1&&(i.push(1),n>2&&i.push("ellipsis"));for(let l=n;l<=a;l++)l!==1&&l!==s&&i.push(l);return a<s&&(a<s-1&&i.push("ellipsis"),i.push(s)),i}function us({currentPage:e,totalPages:s,onPageChange:r,disabled:o,size:n="md",icons:a,labels:i,styles:l,maxVisiblePages:c=5,showFirstLast:d=!1,showPrevNext:u=!0}){const m=P[n],x={...ne,...i},f=cs(e,s,c),v=re[l?.gap||"sm"];return t.jsxs("nav",{className:`flex items-center ${v} ${l?.container||""}`,"aria-label":"Pagination",children:[d&&t.jsx(A,{onClick:()=>r(1),disabled:o||e===1,size:n,styles:l,ariaLabel:x.first,children:a?.first||t.jsx(ls,{className:m.icon})}),u&&t.jsx(A,{onClick:()=>r(e-1),disabled:o||e===1,size:n,styles:l,ariaLabel:x.previous,children:a?.previous||t.jsx(Ce,{className:m.icon})}),f.map((h,N)=>h==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${N}`):t.jsx(A,{onClick:()=>r(h),disabled:o,active:h===e,size:n,styles:l,ariaLabel:`Page ${h}`,children:h},h)),u&&t.jsx(A,{onClick:()=>r(e+1),disabled:o||e===s,size:n,styles:l,ariaLabel:x.next,children:a?.next||t.jsx(Se,{className:m.icon})}),d&&t.jsx(A,{onClick:()=>r(s),disabled:o||e===s,size:n,styles:l,ariaLabel:x.last,children:a?.last||t.jsx(ds,{className:m.icon})})]})}function ms({currentPage:e,totalPages:s,onPageChange:r,disabled:o,size:n="md",icons:a,labels:i,styles:l,showLabels:c=!0}){const d=P[n],u={...ne,...i},m=re[l?.gap||"md"];return t.jsxs("nav",{className:`flex items-center ${m} ${l?.container||""}`,"aria-label":"Pagination",children:[t.jsxs(A,{onClick:()=>r(e-1),disabled:o||e===1,size:n,styles:l,ariaLabel:u.previous,children:[a?.previous||t.jsx(Ce,{className:d.icon}),c&&t.jsx("span",{className:"ml-1",children:u.previous})]}),t.jsxs(A,{onClick:()=>r(e+1),disabled:o||e===s,size:n,styles:l,ariaLabel:u.next,children:[c&&t.jsx("span",{className:"mr-1",children:u.next}),a?.next||t.jsx(Se,{className:d.icon})]})]})}function xs({currentPage:e,totalPages:s,onPageChange:r,disabled:o,size:n="md",icons:a,labels:i,styles:l}){const c=P[n],d={...ne,...i},u=re[l?.gap||"md"],m=d.pageInfo.replace("{current}",String(e)).replace("{total}",String(s));return t.jsxs("nav",{className:`flex items-center ${u} ${l?.container||""}`,"aria-label":"Pagination",children:[t.jsx(A,{onClick:()=>r(e-1),disabled:o||e===1,size:n,styles:l,ariaLabel:d.previous,children:a?.previous||t.jsx(Ce,{className:c.icon})}),t.jsx("span",{className:`px-2 ${l?.typography?.pageInfo||"text-sm text-muted-foreground"}`,children:m}),t.jsx(A,{onClick:()=>r(e+1),disabled:o||e===s,size:n,styles:l,ariaLabel:d.next,children:a?.next||t.jsx(Se,{className:c.icon})})]})}function gs({currentPage:e,totalPages:s,onPageChange:r,disabled:o,size:n="md",styles:a}){const i=P[n],l=re[a?.gap||"sm"];return t.jsx("nav",{className:`flex items-center ${l} ${a?.container||""}`,"aria-label":"Pagination",children:Array.from({length:s},(c,d)=>d+1).map(c=>t.jsx("button",{type:"button",onClick:()=>r(c),disabled:o,"aria-label":`Page ${c}`,"aria-current":c===e?"page":void 0,className:`${i.dot} rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 ${o?"opacity-50 cursor-not-allowed":"cursor-pointer"} ${c===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50"}`},c))})}function ps({totalPages:e,onPageChange:s,disabled:r,size:o="md",labels:n,styles:a,loading:i=!1,loadingLabel:l="Loading..."}){const c=P[o],d={...ne,...n},u=r||i||e<=1;return t.jsx("nav",{className:`flex items-center justify-center ${a?.container||""}`,"aria-label":"Load more",children:t.jsx("button",{type:"button",onClick:()=>s(2),disabled:u,"aria-label":i?l:d.loadMore,className:`inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1 ${c.button} ${u?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"cursor-pointer bg-primary-500 text-white hover:bg-primary-600"} ${a?.typography?.button||""}`,children:i?l:d.loadMore})})}function ke(e){switch(e.variant){case"numbered":return t.jsx(us,{...e});case"simple":return t.jsx(ms,{...e});case"compact":return t.jsx(xs,{...e});case"dots":return t.jsx(gs,{...e});case"load-more":return t.jsx(ps,{...e});default:return null}}function G({content:e,children:s,position:r="top",styles:o}){const[n,a]=j.useState(!1),[i,l]=j.useState({top:0,left:0}),c=j.useRef(null),d=j.useId(),u=()=>{if(!c.current)return{top:0,left:0};const g=c.current.getBoundingClientRect();switch(r){case"top":return{top:g.top-8,left:g.left+g.width/2};case"bottom":return{top:g.bottom+8,left:g.left+g.width/2};case"left":return{top:g.top+g.height/2,left:g.left-8};case"right":return{top:g.top+g.height/2,left:g.right+8};default:return{top:0,left:0}}},m=()=>{l(u()),a(!0)},x=()=>{a(!1)},f=()=>{l(u()),a(!0)},v=()=>{a(!1)},h={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"},N={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent border-t-gray-900",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent border-b-gray-900",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent border-l-gray-900",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent border-r-gray-900"},p=n&&t.jsx("div",{id:d,role:"tooltip","aria-hidden":!n,className:`fixed z-9999 pointer-events-none ${h[r]} ${o?.container||""}`,style:{top:`${i.top}px`,left:`${i.left}px`},children:t.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1.5 px-2.5 whitespace-nowrap shadow-lg",children:[e,t.jsx("div",{className:`absolute w-0 h-0 border-4 ${N[r]}`,"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:c,className:"inline-block",onMouseEnter:m,onMouseLeave:x,onFocus:f,onBlur:v,"aria-describedby":n?d:void 0,children:s}),typeof document<"u"&&Kt.createPortal(p,document.body)]})}function oe(e){const s=!!(e.onClick||e.link),r=j.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:s,handleClick:s?r:void 0}}const z={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},H={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2 sm:p-3",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"}},he={title:{hero:"text-lg sm:text-3xl font-bold",standard:"text-lg sm:text-base font-bold",compact:"text-sm sm:text-base font-bold",minimal:"text-sm sm:text-base font-bold",game:"text-lg sm:text-xl md:text-2xl font-bold",promo:"text-2xl sm:text-3xl md:text-4xl font-bold",social:"text-sm font-bold"},subtitle:"text-base sm:text-lg font-semibold",description:"text-sm",category:"text-xs font-semibold uppercase",metadata:"text-xs"};function ot(e){const s=e?.borderRadius||z.borderRadius;return H.borderRadius[s]}function hs(e){const s=e?.shadow||z.shadow;return H.shadow[s]}function fs(e){if(!(e?.hoverable??!0))return"";const r=e?.hoverShadow||z.hoverShadow;return H.hoverShadow[r]}function bs(e){const s=e?.padding||z.padding;return H.padding[s]}function js(e){const s=e?.borderWidth||z.borderWidth;return H.borderWidth[s]}function vs(e){return e?.borderColor||"border-border"}function R(e,s,r){return s?.typography?.[e]?s.typography[e]:e==="title"&&r&&r in he.title?he.title[r]:he[e]}function Ns(e){const s=[ot(e),hs(e),fs(e),js(e),vs(e)];return e?.container&&s.push(e.container),s.filter(Boolean).join(" ")}function $s(e){const s=[ot(e)];return e?.imageContainer&&s.push(e.imageContainer),s.filter(Boolean).join(" ")}function ws(e){return e?.background||""}const ys={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function U(e,s="standard"){return j.useMemo(()=>{const r=ys[s],o=e?.imageAspectRatio||r.imageAspectRatio;return{container:Ns(e),imageContainer:$s(e),padding:bs(e),background:ws(e),imageAspectRatio:o,typography:{title:R("title",e,s),subtitle:R("subtitle",e),description:R("description",e),category:R("category",e),metadata:R("metadata",e)},isHoverable:e?.hoverable??!0}},[e,s])}function at({content:e,styles:s,primaryCta:r,secondaryCta:o,matchScore:n}){const a=e.image?.url,i=e.gradient||"linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)",{isClickable:l,handleClick:c}=oe(e),d=U(s,"hero");return t.jsx("article",{className:`dark group overflow-hidden ${d.container} ${l?"cursor-pointer":""}`,onClick:c,children:t.jsxs("div",{className:`relative overflow-hidden ${d.background} ${d.imageContainer}`,style:{aspectRatio:d.imageAspectRatio},children:[a?t.jsx("img",{src:a,alt:e.image?.alt||e.title||"",className:"absolute inset-0 w-full h-full object-cover"}):t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}),a&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(we,{badges:e.badges,positions:["top-left","top-right"]}),t.jsx("div",{className:`absolute inset-0 flex flex-col justify-end ${d.padding} z-10`,children:t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsx("div",{className:"flex-1"}),t.jsxs("div",{children:[n&&t.jsx("div",{className:"mb-1",children:n}),t.jsxs("div",{className:"hidden md:flex items-center justify-start space-x-3 ",children:[e.badges&&e.badges.filter(u=>u.position==="bottom-left").length>0&&t.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:e.badges.filter(u=>u.position==="bottom-left").map((u,m)=>t.jsx($e,{badge:u},m))}),e.category&&t.jsx("div",{className:`${d.typography.category} text-white/90 mb-2 uppercase tracking-wide`,children:e.category})]}),e.title&&t.jsxs("h3",{className:`${d.typography.title} text-white mb-2 ${d.isHoverable?"transition-colors":""}`,children:[e.contextLabel&&t.jsx("div",{className:"text-black px-1 mr-2 mb-1 inline-block bg-white",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:`${d.typography.description} text-white/90 mb-2 max-w-3xl hidden md:block line-clamp-2`,children:e.description}),e.metadata?.time&&t.jsx("div",{className:`${d.typography.metadata} text-white/70`,children:e.metadata.time})]}),t.jsx(se,{primaryCta:r,secondaryCta:o,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const Cs=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ss=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,o)=>o?o.toUpperCase():r.toLowerCase()),He=e=>{const s=Ss(e);return s.charAt(0).toUpperCase()+s.slice(1)},it=(...e)=>e.filter((s,r,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===r).join(" ").trim(),ks=e=>{for(const s in e)if(s.startsWith("aria-")||s==="role"||s==="title")return!0};var As={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Rs=j.forwardRef(({color:e="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...l},c)=>j.createElement("svg",{ref:c,...As,width:s,height:s,stroke:e,strokeWidth:o?Number(r)*24/Number(s):r,className:it("lucide",n),...!a&&!ks(l)&&{"aria-hidden":"true"},...l},[...i.map(([d,u])=>j.createElement(d,u)),...Array.isArray(a)?a:[a]]));const ae=(e,s)=>{const r=j.forwardRef(({className:o,...n},a)=>j.createElement(Rs,{ref:a,iconNode:s,className:it(`lucide-${Cs(He(e))}`,`lucide-${e}`,o),...n}));return r.displayName=He(e),r};const Ls=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ts=ae("check",Ls);const Ms=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_s=ae("circle-play",Ms);const Ds=[["path",{d:"M5 12h14",key:"1ays0h"}]],Bs=ae("minus",Ds);const Os=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ps=ae("x",Os),Is={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-12 h-12 sm:w-16 sm:h-16",lg:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24",xl:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32","2xl":"w-24 h-24 sm:w-32 sm:h-32 md:w-40 md:h-40","3xl":"w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48","4xl":"w-40 h-40 sm:w-48 sm:h-48 md:w-56 md:h-56","5xl":"w-48 h-48 sm:w-56 sm:h-56 md:w-64 md:h-64"};function lt({content:e,styles:s}){const r=s?.mainIconSize||"md",o=Is[r];return s?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:o,children:s.mainIcon})}):e.type==="video"?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx(_s,{className:`${o} text-white opacity-90`})}):null}function dt({imageUrl:e,alt:s,aspectRatio:r,imageContainerClasses:o,content:n,styles:a,showBadges:i=!0,badgePositions:l=["top-left","top-right","bottom-left","bottom-right"],fallbackGradient:c=!1}){return t.jsxs("div",{className:`relative w-full ${o}`,style:{aspectRatio:r},children:[e?t.jsx("img",{src:e,alt:s||n.title||"",className:"absolute inset-0 w-full h-full object-cover"}):c?t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}):null,i&&t.jsx(we,{badges:n.badges,positions:l}),t.jsx(lt,{content:n,styles:a})]})}function ct({content:e,styles:s,isHoverable:r=!0,primaryCta:o,secondaryCta:n,ctaLayout:a="vertical",bettingOdds:i,matchScore:l}){const c=R("title",s,"compact"),d=R("category",s),u=R("description",s),m=R("metadata",s);return t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsxs("div",{children:[l&&t.jsx("div",{className:"mb-1",children:l}),e.category&&t.jsx("div",{className:`${d} text-muted-foreground mb-1`,children:e.category}),e.title&&t.jsxs("h3",{className:`${c} text-foreground mb-1 ${r?"group-hover:text-primary transition-colors":""}`,children:[e.contextLabel&&t.jsx("div",{className:"text-white px-1 mr-2 mb-1 inline-block bg-neutral-700",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:`${u} text-muted-foreground mb-2`,children:e.description}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:`flex items-center gap-2 ${m} text-muted-foreground`,children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),(o||n||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(o||n)&&t.jsxs("div",{className:`flex ${a==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"} mt-4`,children:[o&&t.jsx("div",{className:a==="horizontal"?"w-full sm:w-auto":"w-full",children:o}),n&&t.jsx("div",{className:a==="horizontal"?"w-full sm:w-auto":"w-full",children:n})]}),i&&t.jsx("div",{className:o||n?"mt-2":"mt-4",children:i})]})]})}function ut({content:e,styles:s,primaryCta:r,secondaryCta:o,bettingOdds:n,matchScore:a}){const i=e.image?.url,{isClickable:l,handleClick:c}=oe(e),d=U(s,"standard");return t.jsxs("article",{className:`group bg-card text-card-foreground border-border overflow-hidden ${d.container} ${d.background} ${l?"cursor-pointer":""}`,onClick:c,children:[i&&t.jsx(dt,{imageUrl:i,alt:e.image?.alt,aspectRatio:d.imageAspectRatio,imageContainerClasses:d.imageContainer,content:e,styles:s}),t.jsx("div",{className:d.padding,children:t.jsx(ct,{content:e,styles:s,isHoverable:d.isHoverable,primaryCta:r,secondaryCta:o,bettingOdds:n,matchScore:a})})]})}function Es({content:e,styles:s,primaryCta:r,secondaryCta:o,bettingOdds:n,matchScore:a}){const i=e.image?.url,{isClickable:l,handleClick:c}=oe(e),d=U(s,"standardHorizontal");return t.jsxs("article",{className:`group bg-card text-card-foreground border-border overflow-hidden flex flex-col sm:flex-row ${d.container} ${d.background} ${l?"cursor-pointer":""}`,onClick:c,children:[i&&t.jsx("div",{className:"relative w-full sm:w-2/5 shrink-0",children:t.jsx(dt,{imageUrl:i,alt:e.image?.alt,aspectRatio:d.imageAspectRatio,imageContainerClasses:d.imageContainer,content:e,styles:s})}),t.jsx("div",{className:`flex-1 ${d.padding}`,children:t.jsx(ct,{content:e,styles:s,isHoverable:d.isHoverable,primaryCta:r,secondaryCta:o,ctaLayout:"horizontal",bettingOdds:n,matchScore:a})})]})}function mt({content:e,styles:s,primaryCta:r,secondaryCta:o}){const n=e.coverImage?.url,a=!!e.gradient,i=e.textColor||"white",l=U(s,"promo");let c="",d={color:i};return l.background?c=l.background:n?d={backgroundImage:`url(${n})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:a?d={background:e.gradient,color:i}:c="bg-gradient-to-br from-gray-500 to-gray-800",t.jsx("div",{className:`dark overflow-hidden border-none ${l.container}`,children:t.jsxs("div",{className:`${l.padding} ${c}`,style:d,children:[(e.image||e.subtitle)&&t.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mb-4 gap-3",children:[e.image&&t.jsx("div",{className:"text-center md:text-left",children:t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"h-12 sm:h-12 my-4 w-auto inline-block"})}),e.subtitle&&t.jsx("div",{className:`${l.typography.subtitle} opacity-80 text-center md:text-left`,children:e.subtitle})]}),t.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end justify-between gap-6",children:[t.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.title&&t.jsx("h3",{className:`${l.typography.title} mb-2`,children:e.title}),e.description&&t.jsx("p",{className:`${l.typography.description} opacity-90 max-w-xl`,children:e.description}),e.metrics&&e.metrics.length>0&&t.jsx("div",{className:"flex gap-6 mt-4 justify-center md:justify-start",children:e.metrics.map((u,m)=>t.jsxs("div",{className:"text-center md:text-left",children:[t.jsx("div",{className:"text-2xl font-bold",children:u.value}),t.jsx("div",{className:"text-xs opacity-80",children:u.label})]},m))}),e.countdownTo&&t.jsx("div",{className:"mt-4 flex justify-center md:justify-start",children:t.jsx(nt,{targetDate:e.countdownTo})})]}),(r||o||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx(se,{primaryCta:r,secondaryCta:o,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function xt({content:e,styles:s,primaryCta:r,secondaryCta:o,bettingOdds:n,matchScore:a}){const{isClickable:i,handleClick:l}=oe(e),c=U(s,"minimal");return t.jsx("article",{className:`group ${c.container} ${i?"cursor-pointer":""}`,onClick:l,children:t.jsxs("div",{className:`flex gap-3 sm:gap-4 ${c.padding} ${c.background}`,children:[e.image&&t.jsxs("div",{className:`shrink-0 w-20 sm:w-24 overflow-hidden ${c.imageContainer} relative`,style:{aspectRatio:c.imageAspectRatio},children:[t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"w-full h-full object-cover"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(lt,{content:e,styles:s})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[a&&t.jsx("div",{className:"mb-2",children:a}),e.category&&t.jsx("div",{className:`${c.typography.category} text-muted-foreground mb-1`,children:e.category}),e.title&&t.jsxs("h3",{className:`${c.typography.title} text-foreground mb-1 ${c.isHoverable?"group-hover:text-primary transition-colors":""}`,children:[e.contextLabel&&t.jsx("span",{className:"text-white px-1 mr-1 mb-1 inline-block bg-neutral-700 rounded-sm",children:e.contextLabel}),e.title]}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:`flex items-center gap-2 ${c.typography.metadata} text-muted-foreground`,children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),t.jsxs("div",{children:[t.jsx(se,{primaryCta:r,secondaryCta:o,layout:"responsive",styles:{container:"mt-4"}}),n&&t.jsx("div",{className:"mt-2",children:n})]})]})]})})}function L({content:e,variant:s,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:i}){switch(s||"standard"){case"hero":return t.jsx(at,{content:e,styles:r,primaryCta:o,secondaryCta:n,matchScore:i});case"standardHorizontal":return t.jsx(Es,{content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:i});case"promo":return t.jsx(mt,{content:e,styles:r,primaryCta:o,secondaryCta:n});case"minimal":return t.jsx(xt,{content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:i});case"standard":default:return t.jsx(ut,{content:e,styles:r,primaryCta:o,secondaryCta:n,bettingOdds:a,matchScore:i})}}const I={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},E={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}};function Gs(e){const s=e?.borderRadius||I.borderRadius;return E.borderRadius[s]}function zs(e){const s=e?.shadow||I.shadow;return E.shadow[s]}function Hs(e){if(!(e?.hoverable??!0))return"";const r=e?.hoverShadow||I.hoverShadow;return E.hoverShadow[r]}function Us(e){const s=e?.padding||I.padding;return E.padding[s]}function Ws(e){const s=e?.borderWidth||I.borderWidth;return E.borderWidth[s]}function Fs(e){return e?.borderColor||"border-border"}function Vs(e){const s=e?.logoSize||I.logoSize;return E.logoSize[s]}function Ys(e){const s=[Gs(e),zs(e),Hs(e),Ws(e),Fs(e)];return e?.container&&s.push(e.container),s.filter(Boolean).join(" ")}function k(e){return e?.main??null}function O(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const Zs={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},qs={inline:{teamName:"text-sm text-foreground",score:"text-lg font-bold text-foreground",status:"text-xs text-foreground/90",metadata:"text-xs text-foreground/90"},scoreCard:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},scoreLine:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},embedded:{teamName:"text-sm font-medium",score:"text-sm font-bold",status:"text-xs font-medium",metadata:"text-xs"}},Ks={inline:{borderWidth:"0",borderRadius:"none",shadow:"none",hoverable:!1},scoreCard:{},scoreLine:{},embedded:{borderWidth:"0",borderRadius:"none",shadow:"none",padding:"none",hoverable:!1}};function ie(e,s="scoreCard"){return j.useMemo(()=>{const r=Zs[s],o=e?.logoSize||r,a={...Ks[s],...e,logoSize:o},i=qs[s];return{container:Ys(a),padding:Us(a),background:a.background||(s==="inline"?"":"bg-card text-card-foreground"),logoSize:Vs(a),logoSizeValue:o,typography:{teamName:e?.typography?.teamName||i.teamName,score:e?.typography?.score||i.score,status:e?.typography?.status||i.status,metadata:e?.typography?.metadata||i.metadata},isHoverable:a.hoverable??!0}},[e,s])}function le(e){const s=!!(e.onClick||e.link),r=j.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:s,handleClick:s?r:void 0}}function gt({match:e,styles:s}){const r=ie(s,"inline"),{isClickable:o,handleClick:n}=le(e),a=e.competitorTwo.shortName||e.competitorTwo.name,i=e.competitorOne.shortName||e.competitorOne.name,l=e.period?.label??((e.period?.current?` ${e.period.current}`:"")||e.status.toUpperCase());return t.jsxs("div",{className:`inline-flex items-center gap-1.5 ${r.container} ${o?"cursor-pointer hover:opacity-80":""}`,onClick:n,children:[t.jsx("span",{className:r.typography.teamName,children:a}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:`${r.logoSize} object-contain rounded-full`}),k(e.competitorTwo.score)!==null&&t.jsx("span",{className:r.typography.score,children:k(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),k(e.competitorOne.score)!==null&&t.jsx("span",{className:r.typography.score,children:k(e.competitorOne.score)}),e.competitorOne.logo&&t.jsx("img",{src:e.competitorOne.logo.url,alt:e.competitorOne.name,className:`${r.logoSize} object-contain rounded-full`}),t.jsx("span",{className:r.typography.teamName,children:i}),t.jsx("span",{className:`${r.typography.status} ml-0.5`,children:l})]})}function te({team:e,score:s,penaltyScore:r,isWinner:o,variant:n,classes:a,logoSize:i="md",align:l="left"}){return n==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(S,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:`text-foreground ${a.typography.teamName}`,subtitle:`text-muted-foreground ${a.typography.metadata}`}}}),t.jsxs("div",{className:"flex items-center gap-2",children:[r!=null&&t.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${o?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 font-bold":"text-muted-foreground"}`,children:r}),s!==null&&t.jsx("span",{className:`text-foreground ${a.typography.score}`,children:s})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx(S,{name:e.name,mobileName:e.shortName,imageUrl:e.logo?.url,subtitle:e.subtitle,orientation:l==="right"?"rtl":"ltr",styles:{imageSize:i,typography:{name:`text-foreground ${a.typography.teamName}`,subtitle:`text-muted-foreground ${a.typography.metadata}`},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Xs({competitorOneScore:e,competitorTwoScore:s,competitorOnePenalty:r,competitorTwoPenalty:o,winner:n,classes:a,isLive:i,liveIndicator:l,statusText:c,period:d}){const u=r!==null||o!==null;return t.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[u&&r!==null&&r!==void 0&&t.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${n==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"}`,children:r}),e!==null&&t.jsx("span",{className:`text-foreground ${a.typography.score}`,children:e})]}),c?t.jsxs("div",{className:"flex flex-col items-center",children:[i&&l&&t.jsx("div",{className:`w-2 h-2 rounded-full mb-1 animate-pulse ${l.color||"bg-primary-500"}`}),t.jsx("span",{className:`${a.typography.status} text-muted-foreground whitespace-nowrap`,children:c}),d?.current&&!i&&t.jsx("span",{className:`${a.typography.metadata} text-muted-foreground`,children:d.current})]}):t.jsx("span",{className:`text-muted-foreground ${a.typography.score}`,children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[s!==null&&t.jsx("span",{className:`text-foreground ${a.typography.score}`,children:s}),u&&o!==null&&o!==void 0&&t.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${n==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"}`,children:o})]})]})}function pt({odds:e,operator:s,styles:r={}}){const{container:o="",padding:n="md",typography:a="md",mode:i="default",flashInterval:l=3e3}=r,[c,d]=j.useState(!0);j.useEffect(()=>{if(i!=="flash")return;const p=setInterval(()=>{d(g=>!g)},l);return()=>clearInterval(p)},[i,l]);const u=()=>{const p={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return p[n]||p.md},m=()=>{const p={sm:"text-xs",md:"text-xs",lg:"text-sm"};return p[a]||p.md},x=p=>!p||p==="none"?null:t.jsx("span",{className:`ml-0.5 ${p==="up"?"text-green-500":"text-red-500"}`,children:p==="up"?"↑":"↓"}),f=(p,g=!1)=>{const b=u(),C=m(),M=t.jsxs("div",{className:`flex items-center cursor-pointer justify-between ${C}`,children:[t.jsx("span",{className:"text-muted-foreground",children:p.label}),t.jsxs("span",{className:"font-bold",children:[p.value,x(p.change)]})]}),X=`${g?"":"flex-1"} bg-muted hover:bg-muted/60 text-foreground rounded ${b} transition-colors`,Ie=Ee=>{Ee.stopPropagation(),p.onClick&&(Ee.preventDefault(),p.onClick(p))};return p.url?t.jsx("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:X,onClick:Ie,children:M},p.label):t.jsx("button",{className:X,onClick:Ie,children:M},p.label)},v=p=>{p.stopPropagation(),s?.onClick&&(p.preventDefault(),s.onClick(s))},h=(p="")=>{if(!s)return null;const g=u();return t.jsx("a",{href:s.url,target:"_blank",rel:"noopener noreferrer",className:`flex items-center justify-center bg-muted/50 hover:bg-muted/70 rounded ${g} transition-colors ${p}`,style:{backgroundColor:s.backgroundColor},onClick:v,children:s.logo?t.jsx("img",{src:s.logo.url,alt:s.name,className:"h-4 w-auto object-contain"}):t.jsx("span",{className:"text-xs font-semibold",style:{color:s.textColor},children:s.name})})},N=e.length>3;return i==="flash"?t.jsx("div",{className:`${N?"space-y-1":"flex gap-1"} ${o}`,children:c&&s?h("flex-1"):N?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(p=>f(p,!0))}):t.jsx(t.Fragment,{children:e.map(p=>f(p,!1))})}):N?t.jsxs("div",{className:`space-y-1 ${o}`,children:[h(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(p=>f(p,!0))})]}):t.jsxs("div",{className:`flex gap-1 ${o}`,children:[h("w-full max-w-[110px]"),e.map(p=>f(p,!1))]})}function ht({match:e,styles:s}){const r=ie(s,"scoreCard"),{isClickable:o,handleClick:n}=le(e),a=e.status==="live",i=!!e.odds,l=O(e.competitorOne.score),c=O(e.competitorTwo.score),d=e.metadata?.winner;return t.jsx("article",{className:`${r.background} ${r.container} ${o?"cursor-pointer":""}`,onClick:n,children:t.jsxs("div",{className:r.padding,children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a&&e.liveIndicator?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:`w-2 h-2 rounded-full animate-pulse ${e.liveIndicator.color||"bg-primary-500"}`}),t.jsx("span",{className:`text-foreground ${r.typography.status}`,children:"LIVE"})]}):t.jsx("span",{className:`text-foreground ${r.typography.status} py-1`,children:e.period?.label||e.metadata?.time||""}),a&&e.period?.current&&t.jsx("span",{className:`text-foreground ${r.typography.metadata}`,children:e.period.current})]}),t.jsxs("div",{className:`space-y-2 ${i?"mb-3":""}`,children:[t.jsx(te,{team:e.competitorOne,score:k(e.competitorOne.score),penaltyScore:l,isWinner:d==="competitorOne",variant:"scoreCard",classes:r,logoSize:r.logoSizeValue}),t.jsx(te,{team:e.competitorTwo,score:k(e.competitorTwo.score),penaltyScore:c,isWinner:d==="competitorTwo",variant:"scoreCard",classes:r,logoSize:r.logoSizeValue})]}),i&&t.jsx("div",{className:"pt-2 border-t border-border",children:t.jsx(pt,{odds:e.odds.odds,operator:e.odds.operator,label:e.odds.label,styles:{padding:s?.padding==="xl"?"lg":s?.padding}})})]})})}function ft({match:e,styles:s}){const r=ie(s,"scoreLine"),{isClickable:o,handleClick:n}=le(e),a=e.status==="live",i=a&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=O(e.competitorOne.score),c=O(e.competitorTwo.score),d=e.metadata?.winner;return t.jsx("article",{className:`${r.background} ${r.container} ${o?"cursor-pointer":""} ${r.isHoverable?"transition-opacity hover:opacity-90":""}`,onClick:n,children:t.jsxs("div",{className:`${r.padding} grid grid-cols-[1fr_auto_1fr] items-center gap-4`,children:[t.jsx(te,{team:e.competitorOne,score:null,variant:"scoreLine",classes:r,logoSize:r.logoSizeValue}),t.jsx(Xs,{competitorOneScore:k(e.competitorOne.score),competitorTwoScore:k(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:c,winner:d,classes:r,isLive:a,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(te,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:r,logoSize:r.logoSizeValue,align:"right"})]})})}const Qs={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Ue={square:"sm",round:"full"};function Js(e,s){switch(e.status){case"scheduled":return e.metadata?.date||"-";case"live":return e.period?.current||"LIVE";case"final":return s==="date"?e.metadata?.date||e.period?.label||"FT":e.period?.label||"FT";case"postponed":return"PPD";case"cancelled":return"CAN";case"suspended":return"SUS";default:return e.period?.label||"-"}}function er({match:e,styles:s}){const r=ie(s,"embedded"),{isClickable:o,handleClick:n}=le(e),a=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=k(e.competitorOne.score),c=k(e.competitorTwo.score),d=O(e.competitorOne.score),u=O(e.competitorTwo.score),m=d!==null||u!==null,x=e.metadata?.winner,f=e.status==="scheduled",v=e.metadata?.time||e.period?.label||"-",h=Js(e,s?.finishedStatusDisplay),N=s?.statusColumnWidth||"w-[60px]",p=s?.typography?.status||"text-xs font-medium",g=Qs[s?.logoSize||"md"],b=Ue[e.competitorOne.logoShape||"square"],C=Ue[e.competitorTwo.logoShape||"square"],M={imageSize:g,gap:"2",typography:{name:r.typography.teamName}};return t.jsxs("article",{className:`flex items-center w-full ${r.padding} ${o?"cursor-pointer":""} ${s?.container||""}`,onClick:n,children:[t.jsxs("div",{className:`shrink-0 ${N} ${p} flex items-center justify-start gap-1.5 ${a?"text-danger":"text-muted-foreground"}`,children:[a&&t.jsx("div",{className:`w-2 h-2 rounded-full animate-pulse shrink-0 ${i}`}),t.jsx("span",{children:h})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-center min-w-0",children:[t.jsx("div",{className:"flex-1 min-w-0 flex justify-end",children:t.jsx(S,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{...M,imageBorderRadius:b,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:f?t.jsx("span",{className:`${r.typography.score} text-muted-foreground`,children:v}):t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[m&&d!==null&&t.jsx("span",{className:`text-[10px] px-1 py-0.5 rounded ${x==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"}`,children:d}),t.jsxs("span",{className:`${r.typography.score} ${a?"text-danger":""}`,children:[l," - ",c]}),m&&u!==null&&t.jsx("span",{className:`text-[10px] px-1 py-0.5 rounded ${x==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"}`,children:u})]})}),t.jsx("div",{className:"flex-1 min-w-0 flex justify-start",children:t.jsx(S,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{...M,imageBorderRadius:C,textAlign:"left"}})})]})]})}function y({match:e,variant:s,styles:r}){switch(s||"scoreCard"){case"inline":return t.jsx(gt,{match:e,styles:r});case"scoreLine":return t.jsx(ft,{match:e,styles:r});case"embedded":return t.jsx(er,{match:e,styles:r});case"scoreCard":default:return t.jsx(ht,{match:e,styles:r})}}const W={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},F={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}},tr={header:"text-xs uppercase font-bold text-muted-foreground",cell:"text-sm text-foreground",disclaimer:"text-xs text-muted-foreground",legend:"text-xs text-muted-foreground"};function sr(e){const s=e?.borderRadius||W.borderRadius;return F.borderRadius[s]}function rr(e){const s=e?.shadow||W.shadow;return F.shadow[s]}function nr(e){const s=e?.padding||W.padding;return F.padding[s]}function or(e){const s=e?.borderWidth||W.borderWidth;return F.borderWidth[s]}function ar(e){return e?.borderColor||"border-border"}function ir(e){const s=e?.logoSize||W.logoSize;return F.logoSize[s]}function J(e,s){return s?.typography?.[e]?s.typography[e]:tr[e]}function lr(e){return e?.background||"bg-card"}function dr(e){const s=[sr(e),rr(e),or(e),ar(e),lr(e)];return e?.container&&s.push(e.container),s.filter(Boolean).join(" ")}function cr(e){return j.useMemo(()=>({container:dr(e),padding:nr(e),logoSize:ir(e),typography:{header:J("header",e),cell:J("cell",e),disclaimer:J("disclaimer",e),legend:J("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function ur(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function We(e){switch(e){case"none":return"0";case"xs":return"28px";case"sm":return"36px";case"md":return"48px";case"lg":return"96px";case"xl":return"128px";case"2xl":return"160px";case"3xl":return"192px";case"4xl":return"256px";case"flex":return"1fr";case"auto":default:return"auto"}}function bt(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function Ne(e,s){return e.filter(r=>bt(r.width)?(s==="mobile"?r.width.mobile:r.width.desktop)!=="none":r.width!=="none")}function Fe(e,s){const r=["4px"];return Ne(e,s).forEach(n=>{if(bt(n.width)){const a=s==="mobile"?n.width.mobile:n.width.desktop;r.push(We(a))}else r.push(We(n.width))}),r.join(" ")}function ee(e){const s=ur(e.align),r=e.className||"";return e.key==="entity"||e.key==="team"||e.key==="player"||e.key==="user"?`flex items-center gap-1 min-w-0 ${r}`:`${s} ${r}`}function mr({columns:e,rows:s,legend:r,showLegend:o,disclaimer:n,description:a,styles:i,onRowClick:l,filterRowIds:c}){const d=cr(i),u=j.useMemo(()=>{if(!c||c.length===0)return s;const g=new Set(c);return s.filter(b=>g.has(b.id))},[s,c]),m=j.useMemo(()=>{if(r)return r;const g=new Map;return u.forEach(b=>{if(b.zone){const C=`${b.zone.color}-${b.zone.label}`;g.has(C)||g.set(C,{color:b.zone.color,label:b.zone.label})}}),Array.from(g.values())},[u,r]),x=o!==void 0?o:m.length>0,f=j.useMemo(()=>Ne(e,"mobile"),[e]),v=j.useMemo(()=>Ne(e,"desktop"),[e]),h=j.useMemo(()=>Fe(e,"mobile"),[e]),N=j.useMemo(()=>Fe(e,"desktop"),[e]),p=i?.container||d.container;return t.jsx("div",{className:p,children:t.jsxs("div",{className:d.padding,children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("ul",{className:d.table,children:[t.jsxs("li",{className:`md:hidden grid items-center gap-1 border-b border-border pb-3 ${d.headerRow}`,style:{gridTemplateColumns:h},children:[t.jsx("div",{"aria-label":"Zone"}),f.map(g=>t.jsx("div",{className:`${d.typography.header} ${ee(g)}`,children:g.header},g.key))]}),t.jsxs("li",{className:`hidden md:grid items-center gap-1 border-b border-border pb-3 lg:px-2 ${d.headerRow}`,style:{gridTemplateColumns:N},children:[t.jsx("div",{"aria-label":"Zone"}),v.map(g=>t.jsx("div",{className:`${d.typography.header} ${ee(g)}`,children:g.header},g.key))]}),u.map(g=>t.jsxs("li",{className:`relative border-b border-border last:border-0 ${g.highlight?"bg-muted":""} ${d.isHoverable&&l?"hover:bg-muted/50 cursor-pointer transition-colors":""} ${d.bodyRow}`,onClick:()=>l?.(g),children:[g.zone&&t.jsx("div",{className:`absolute left-0 top-0 bottom-0 w-1 ${g.zone.color} rounded-r-sm`}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:h},children:[t.jsx("div",{}),f.map(b=>t.jsx("div",{className:`${d.typography.cell} ${ee(b)}`,children:b.render?b.render(g[b.key],g):g[b.key]},b.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),v.map(b=>t.jsx("div",{className:`${d.typography.cell} ${ee(b)}`,children:b.render?b.render(g[b.key],g):g[b.key]},b.key))]})]},g.id))]})}),a&&t.jsx("div",{className:`mt-4 ${d.typography.disclaimer}`,children:a}),x&&m.length>0&&t.jsx("div",{className:`mt-4 flex flex-wrap gap-4 ${d.legendContainer}`,children:m.map((g,b)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:`w-3 h-4 ${g.color} rounded-sm`}),t.jsx("span",{className:d.typography.legend,children:g.label})]},b))}),n&&t.jsx("div",{className:`mt-4 ${d.typography.disclaimer}`,children:n})]})})}const de={borderRadius:"md",padding:"md",alignment:"left",background:"bg-muted"},_={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},alignment:{left:"text-left items-start",center:"text-center items-center",right:"text-right items-end"},gap:{none:"gap-0",xs:"gap-0.5",sm:"gap-1",md:"gap-2",lg:"gap-4",xl:"gap-6"},colsMobile:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},colsTablet:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",8:"md:grid-cols-8",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},colsDesktop:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",8:"lg:grid-cols-8",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},xr={default:{value:"text-2xl font-bold text-foreground",label:"text-xs font-medium text-foreground uppercase",secondaryLabel:"text-xs text-foreground"},stacked:{value:"text-2xl font-bold text-foreground",label:"text-[10px] font-medium text-foreground uppercase tracking-wider",secondaryLabel:"text-xs text-foreground"},horizontal:{value:"text-lg font-bold text-foreground",label:"text-sm text-foreground",secondaryLabel:"text-xs text-foreground"}};function gr(e){const s=e?.borderRadius||de.borderRadius;return _.borderRadius[s]}function pr(e){const s=e?.padding||de.padding;return _.padding[s]}function Ae(e){const s=e?.alignment||de.alignment;return _.alignment[s]}function hr(e){return e?.background||de.background}function B(e,s,r){return s?.typography?.[e]?s.typography[e]:xr[r||"default"][e]}function fr(e){const s=e?.colsMobile||2,r=e?.colsTablet||3,o=e?.colsDesktop||3,n=e?.gap||"sm";return["grid",_.colsMobile[s],_.colsTablet[r],_.colsDesktop[o],_.gap[n]].join(" ")}function jt(e){return[gr(e),pr(e),hr(e),Ae(e),"flex flex-col"].join(" ")}function br(e,s,r){return j.useMemo(()=>({grid:fr(e),item:{container:jt(s),alignment:Ae(s),typography:{value:B("value",s,r),label:B("label",s,r),secondaryLabel:B("secondaryLabel",s,r)}}}),[e,s,r])}function Re(e,s){return j.useMemo(()=>({container:jt(e),alignment:Ae(e),typography:{value:B("value",e,s),label:B("label",e,s),secondaryLabel:B("secondaryLabel",e,s)}}),[e,s])}function vt({item:e,styles:s}){const r=Re(s,"default"),o=r.container;return t.jsxs("div",{className:o,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:r.typography.label,children:e.label})]}),t.jsx("div",{className:r.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:`mt-1 ${r.typography.secondaryLabel}`,children:e.secondaryLabel})]})}function Nt({item:e,styles:s}){const r=Re(s,"stacked"),o=r.container;return t.jsxs("div",{className:o,children:[e.icon&&t.jsx("div",{className:"mb-2",children:e.icon}),t.jsx("div",{className:`mb-2 ${r.typography.label}`,children:e.label}),t.jsx("div",{className:r.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:`mt-1 ${r.typography.secondaryLabel}`,children:e.secondaryLabel})]})}function $t({item:e,styles:s,orientation:r="ltr"}){const o=Re(s,"horizontal"),n=o.container,a=r==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:`flex flex-col ${a} gap-1`,children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:o.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:o.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:o.typography.value,children:e.value});return t.jsx("div",{className:n,children:t.jsx("div",{className:"flex items-center justify-between gap-4 w-full",children:r==="ltr"?t.jsxs(t.Fragment,{children:[i,l]}):t.jsxs(t.Fragment,{children:[l,i]})})})}function wt({item:e,styles:s,variant:r="default",orientation:o}){const n={item:e,styles:s};switch(r){case"stacked":return t.jsx(Nt,{...n});case"horizontal":return t.jsx($t,{...n,orientation:o});default:return t.jsx(vt,{...n})}}function D({items:e=[],itemVariant:s="default",itemOrientation:r,styles:o}){const{container:n="",grid:a,item:i}=o||{},l=br(a,i,s),c=n||l.grid;return t.jsx("div",{className:c,children:e.map(d=>t.jsx(wt,{item:d,styles:i,variant:s,orientation:r},d.id))})}const ce={padding:"none",itemSpacing:"md",borderRadius:"none",background:""},ue={leftBarColor:"bg-green-500",rightBarColor:"bg-blue-500",height:"md",borderRadius:"sm"},V={padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},itemSpacing:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},barHeight:{xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},barBorderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},jr={bar:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"},comparison:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"}};function vr(e){const s=e?.padding||ce.padding;return V.padding[s]}function Nr(e){const s=e?.itemSpacing||ce.itemSpacing;return V.itemSpacing[s]}function $r(e){const s=e?.borderRadius||ce.borderRadius;return V.borderRadius[s]}function wr(e){return e?.background||ce.background}function yt(e){const s=e?.height||ue.height;return V.barHeight[s]}function Ct(e){const s=e?.borderRadius||ue.borderRadius;return V.barBorderRadius[s]}function St(e){return e?.leftBarColor||ue.leftBarColor}function kt(e){return e?.rightBarColor||ue.rightBarColor}function fe(e,s,r="comparison"){return s?.typography?.[e]?s.typography[e]:jr[r][e]}function yr(e){return["flex flex-col",vr(e),Nr(e),$r(e),wr(e)].filter(Boolean).join(" ")}function Le(e,s="comparison"){return j.useMemo(()=>{const r=e?.bar;return{container:yr(e),typography:{label:fe("label",e,s),leftValue:fe("leftValue",e,s),rightValue:fe("rightValue",e,s)},bar:{height:yt(r),borderRadius:Ct(r),leftBarColor:St(r),rightBarColor:kt(r)}}},[e,s])}function At(e,s){return j.useMemo(()=>{const r={...e,...s};return{height:yt(r),borderRadius:Ct(r),leftBarColor:St(r),rightBarColor:kt(r)}},[e,s])}function Rt({item:e,styles:s}){const r=Le(s,"bar"),o=At(s?.bar,e.barStyles),n=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,a=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=n+a,l=i>0?n/i*100:50,c=i>0?a/i*100:50,d=e.leftDisplay??String(e.leftValue),u=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:`${r.typography.leftValue} w-12`,children:d}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:r.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:`${r.typography.rightValue} w-12 text-right`,children:u})]}),t.jsxs("div",{className:"flex w-full overflow-hidden gap-0.5",children:[t.jsx("div",{className:`${o.leftBarColor} ${o.height} ${o.borderRadius} transition-all duration-300`,style:{width:`${l}%`}}),t.jsx("div",{className:`${o.rightBarColor} ${o.height} ${o.borderRadius} transition-all duration-300`,style:{width:`${c}%`}})]})]})}function Lt({item:e,styles:s}){const r=Le(s,"comparison"),o=At(s?.bar,e.barStyles),n=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,a=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=n+a,l=i>0?n/i*100:50,c=i>0?a/i*100:50,d=e.leftDisplay??String(e.leftValue),u=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:`${r.typography.leftValue} w-12`,children:d}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:r.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:`${r.typography.rightValue} w-12 text-right`,children:u})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("div",{className:`flex-1 flex justify-end bg-muted ${o.height} ${o.borderRadius}`,children:t.jsx("div",{className:`${o.leftBarColor} ${o.height} ${o.borderRadius} transition-all duration-300`,style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:`flex-1 flex justify-start bg-muted ${o.height} ${o.borderRadius}`,children:t.jsx("div",{className:`${o.rightBarColor} ${o.height} ${o.borderRadius} transition-all duration-300`,style:{width:`${c}%`,minWidth:"2px"}})})]})]})}function Tt({item:e,styles:s}){const r={item:e,styles:s};switch(e.variant){case"bar":return t.jsx(Rt,{...r});case"comparison":default:return t.jsx(Lt,{...r})}}function Te({items:e=[],styles:s}){const r=Le(s,"comparison"),o=s?.container||r.container;return t.jsx("div",{className:o,children:e.map(n=>t.jsx(Tt,{item:n,styles:s},n.id))})}const Me={win:"W",draw:"D",loss:"L",vs:"vs"};function Cr(e,s={}){const r={...Me,...s};switch(e){case"W":return r.win;case"D":return r.draw;case"L":return r.loss}}function Sr(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function kr(e){switch(e){case"W":return t.jsx(Ts,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(Bs,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Ps,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function _e(e,s){if(s!==void 0){if(String(e.competitorOne?.id)===String(s))return e.competitorTwo;if(String(e.competitorTwo?.id)===String(s))return e.competitorOne}return e.competitorTwo}function Ar(e,s){if(s!==void 0){if(String(e.competitorOne?.id)===String(s))return e.competitorOne;if(String(e.competitorTwo?.id)===String(s))return e.competitorTwo}return e.competitorOne}function Rr(e,s){return _e(e,s)?.name||"Unknown"}function Mt(e,s){const r=Ar(e,s),o=_e(e,s);if(r?.score!==void 0&&o?.score!==void 0)return`${r.score}-${o.score}`}function _t(e,s,r={}){const o={...Me,...r},n=[],a=Rr(e,s);n.push(`${o.vs} ${a}`);const i=Mt(e,s);return i&&n.push(i),e.date&&n.push(e.date),n.length===0?e.outcome==="W"?"Win":e.outcome==="D"?"Draw":"Loss":n.join(" • ")}function Lr({form:e,teamId:s,maxItems:r=5,labels:o,matchSeparator:n,styles:a,onClick:i}){const l=e.slice(-r),c=o&&(o.win||o.draw||o.loss),d=(m,x)=>{if(i){const f=e.length-l.length+x;i(m,f)}},{container:u=""}=a||{};return t.jsx("div",{className:`flex items-center gap-1 justify-end ${u}`,children:l.map((m,x)=>{const f=x===0,v=x===l.length-1,h=t.jsx("div",{className:`w-5 h-5 rounded-full ${Sr(m.outcome)} flex items-center justify-center ${i?"cursor-pointer hover:opacity-80 transition-opacity":""}`,onClick:()=>d(m,x),children:c?t.jsx("span",{className:"text-white text-xs font-bold leading-none",children:Cr(m.outcome,o)}):kr(m.outcome)}),p=m.competitorOne?.score!==void 0||m.competitorTwo?.score!==void 0||m.date!==void 0?t.jsx(G,{content:_t(m,s,o),position:"top",children:h}):h;return t.jsxs(j.Fragment,{children:[n==="last"&&v&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),p,n==="first"&&f&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},x)})})}function Tr(e){switch(e){case"W":return"border-t-green-600";case"D":return"border-t-gray-400";case"L":return"border-t-red-500"}}function Mr(e){switch(e){case"W":return"bg-green-600 text-white";case"D":return"bg-gray-400 text-white";case"L":return"bg-red-500 text-white"}}const be={win:"WIN",draw:"DRAW",loss:"LOSS"};function _r(e,s){switch(e){case"W":return s?.win||be.win;case"D":return s?.draw||be.draw;case"L":return s?.loss||be.loss}}const Ve={gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12"}},je={badge:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs"};function Dr({form:e,teamId:s,maxItems:r=5,labels:o,styles:n,onClick:a}){const i=e.slice(-r),l=(h,N)=>{if(a){const p=e.length-i.length+N;a(h,p)}},c=h=>{if(s!==void 0){if(String(h.competitorOne?.id)===String(s))return{ourTeam:h.competitorOne,opponent:h.competitorTwo};if(String(h.competitorTwo?.id)===String(s))return{ourTeam:h.competitorTwo,opponent:h.competitorOne}}return{ourTeam:h.competitorOne,opponent:h.competitorTwo}},d=n?.container||"",u=Ve.gap[n?.gap||"3"],m=Ve.logoSize[n?.logoSize||"md"],x=n?.typography?.badge||je.badge,f=n?.typography?.score||je.score,v=n?.typography?.date||je.date;return t.jsx("div",{className:`flex items-start ${u} overflow-x-auto ${d}`,children:i.map((h,N)=>{const{date:p,outcome:g}=h,{ourTeam:b,opponent:C}=c(h),M=b.score??"-",X=C.score??"-";return t.jsxs("div",{className:"flex flex-col items-center gap-1",children:[t.jsxs("div",{className:`
2
- flex flex-col items-center gap-2 px-4 py-3
3
- bg-card border border-border rounded-md
4
- border-t-4 ${Tr(g)}
5
- ${a?"cursor-pointer hover:bg-muted/50 transition-colors":""}
6
- `,onClick:()=>l(h,N),children:[t.jsx("span",{className:`px-3 py-0.5 rounded-full ${x} ${Mr(g)}`,children:_r(g,o)}),t.jsxs("div",{className:`flex items-center gap-2 ${f} text-foreground`,children:[t.jsx("span",{children:M}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:X})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(G,{content:b.name,children:b.image?t.jsx("img",{src:b.image,alt:b.name,className:`${m} object-contain`}):t.jsx("div",{className:`${m} bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground`,children:b.name.charAt(0)})}),t.jsx(G,{content:C.name,children:C.image?t.jsx("img",{src:C.image,alt:C.name,className:`${m} object-contain`}):t.jsx("div",{className:`${m} bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground`,children:C.name.charAt(0)})})]})]}),p&&t.jsx("span",{className:`${v} text-muted-foreground`,children:p})]},h.matchId)})})}const Br=e=>{switch(e){case"W":return"text-green-600 dark:text-green-400";case"L":return"text-red-600 dark:text-red-400";case"D":default:return"text-gray-500 dark:text-gray-400"}},Or=(e,s)=>{const r=_e(e,s);return r?.name?r.shortName||r.name.substring(0,3).toUpperCase():"???"};function Pr({form:e,teamId:s,maxItems:r=5,labels:o,styles:n,onClick:a}){const i=e.slice(-r),{container:l=""}=n||{},c=(d,u)=>{if(a){const m=e.length-i.length+u;a(d,m)}};return t.jsx("div",{className:`overflow-x-auto ${l}`,children:t.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${i.length}, minmax(48px, 1fr))`,minWidth:"100%"},children:i.map((d,u)=>{const m=t.jsxs("div",{className:`flex flex-col items-center py-2 px-1 bg-muted rounded-lg ${a?"cursor-pointer hover:bg-muted/80":"cursor-default"}`,onClick:()=>c(d,u),children:[t.jsx("span",{className:`text-sm font-bold ${Br(d.outcome)}`,children:Mt(d,s)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:Or(d,s)})]});return d.competitorOne?.name!==void 0||d.competitorTwo?.name!==void 0||d.date!==void 0?t.jsx(G,{content:_t(d,s,o),position:"top",children:m},u):t.jsx("div",{children:m},u)})})})}function Y({variant:e="embedded",...s}){switch(e){case"detailed":return t.jsx(Dr,{...s});case"scoreCards":return t.jsx(Pr,{...s});case"embedded":default:return t.jsx(Lr,{...s})}}const Ir={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},Er={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Gr={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Z({entity:e,primaryCta:s,secondaryCta:r,layout:o="horizontal",ctaLayout:n="responsive",styles:a}){const{container:i="",background:l="",padding:c="4",borderRadius:d="none",ctaGap:u="2"}=a||{},m=Ir[c],x=Er[d],f=Gr[u],v=s||r,h={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},N={inline:"flex flex-row items-center justify-between gap-4",stacked:"flex flex-col gap-4",responsive:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"};return o==="stacked"?t.jsxs("div",{className:`flex flex-col items-center text-center gap-4 ${m} ${x} ${l} ${i}`,children:[t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:`object-contain ${zr(e.styles?.imageSize)} ${Hr(e.styles?.imageBorderRadius)} ${e.styles?.imageBorder||""}`}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("span",{className:e.styles?.typography?.name||"font-semibold",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-xs text-muted-foreground",children:e.subtitle})]})]}),v&&t.jsxs("div",{className:`flex flex-col items-center ${f}`,children:[s,r]})]}):t.jsxs("div",{className:`${N[n]} ${m} ${x} ${l} ${i}`,children:[t.jsx(S,{...e}),v&&t.jsxs("div",{className:`${h[n]} ${f} shrink-0`,children:[s,r]})]})}const Ye={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24","2xl":"w-32 h-32","3xl":"w-40 h-40"},Ze={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function zr(e){return Ye[e]||Ye.md}function Hr(e){return Ze[e]||Ze.none}const Ur={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},Wr={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 w-24","2xl":"w-28 h-28","3xl":"w-32 h-32"},Fr={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Vr(e){const s=Wr[e?.imageSize||"lg"],r=e?.imageBorderRadius?Fr[e.imageBorderRadius]:"",o=e?.imageBorder||"";return`${s} ${r} ${o}`.trim()}function qe({entity:e}){return t.jsxs("div",{className:"flex-1 flex flex-col items-center text-center",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:`${Vr(e.styles)} object-contain mb-3`}),t.jsx("span",{className:e.styles?.typography?.name||"text-lg font-semibold text-white",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-sm text-white/70",children:e.subtitle})]})}function Ke({content:e,typography:s}){return t.jsx("div",{className:"shrink-0",children:typeof e=="string"?t.jsx("span",{className:s,children:e}):e})}function De({leftEntity:e,rightEntity:s,centerContent:r,variant:o="inline",styles:n,leftBackground:a="",rightBackground:i="",overlay:l=""}){const{container:c="",background:d="",gap:u="4",centerTypography:m="text-sm text-muted-foreground font-medium"}=n||{},x=Ur[u];if(o==="stacked")return t.jsxs("div",{className:`relative overflow-hidden rounded-xl ${c}`,children:[t.jsxs("div",{className:"absolute inset-0 flex",children:[t.jsx("div",{className:`flex-1 ${a}`}),t.jsx("div",{className:`flex-1 ${i}`})]}),l&&t.jsx("div",{className:`absolute inset-0 ${l}`}),t.jsxs("div",{className:`relative z-10 flex items-center justify-between px-8 py-6 ${x}`,children:[t.jsx(qe,{entity:e}),r&&t.jsx(Ke,{content:r,typography:m}),t.jsx(qe,{entity:s})]})]});const f={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},v={...s,orientation:"ltr",styles:{...s.styles,textAlign:"left"}};return t.jsxs("div",{className:`flex items-center justify-between ${x} ${d} ${c}`,children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx(S,{...f})}),r&&t.jsx(Ke,{content:r,typography:m}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx(S,{...v})})]})}const Yr={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function $({entity:e,primaryCta:s,secondaryCta:r,styles:o}){const n=o?.ctaGap||"2",a=o?.container||"",i=Yr[n];return s||r?t.jsxs("div",{className:`flex items-center justify-between gap-4 ${a}`,children:[t.jsx(S,{...e}),t.jsxs("div",{className:`flex items-center ${i} shrink-0`,children:[s,r]})]}):t.jsx("div",{className:a,children:t.jsx(S,{...e})})}const Zr={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Dt={left:"text-left",center:"text-center",right:"text-right"},qr={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Bt(e){return`overflow-hidden ${e?.borderRadius?Zr[e.borderRadius]:"rounded-xl"} ${e?.container||""}`.trim()}function Ot(e){return Dt[e?.titlePosition||"left"]}function Pt(e){return Dt[e?.oddsLabelPosition||"left"]}function It(e){return qr[e?.oddsGap||"1"]}const Xe="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Kr({matchupHeader:e,stats:s,title:r,bettingOdds:o,oddsLabel:n,styles:a}){const i=Ot(a),l=Pt(a);return t.jsxs("div",{className:`bg-card border border-muted shadow-sm ${Bt(a)}`,children:[t.jsx("div",{className:`bg-muted/30 p-4 ${a?.headerSection||""}`,children:t.jsx(De,{...e,variant:"inline"})}),t.jsxs("div",{className:`p-4 ${a?.statsSection||""}`,children:[r&&t.jsx($,{entity:{name:r,styles:{typography:{name:`${Xe} ${i}`},container:"mb-2.5 mt-1"}}}),t.jsx(Te,{...s})]}),o&&o.length>0&&t.jsxs("div",{className:`p-4 pt-0 ${a?.oddsSection||""}`,children:[n&&t.jsx($,{entity:{name:n,styles:{typography:{name:`${Xe} ${l}`},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:`flex flex-col ${It(a)}`,children:o.map((c,d)=>t.jsx("div",{children:c},d))})]})]})}const Qe="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Xr({matchupHeader:e,stats:s,title:r,bettingOdds:o,oddsLabel:n,styles:a}){const i={...e,variant:"stacked"},l=Ot(a),c=Pt(a);return t.jsxs("div",{className:`shadow-lg ${Bt(a)}`,children:[t.jsx(De,{...i}),t.jsxs("div",{className:`bg-card p-6 ${a?.statsSection||""}`,children:[r&&t.jsx($,{entity:{name:r,styles:{typography:{name:`${Qe} ${l}`},container:"mb-2.5 mt-1"}}}),t.jsx(Te,{...s})]}),o&&o.length>0&&t.jsxs("div",{className:`bg-card p-6 pt-0 ${a?.oddsSection||""}`,children:[n&&t.jsx($,{entity:{name:n,styles:{typography:{name:`${Qe} ${c}`},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:`flex flex-col ${It(a)}`,children:o.map((d,u)=>t.jsx("div",{children:d},u))})]})]})}function Qr({variant:e="card",...s}){switch(e){case"hero":return t.jsx(Xr,{...s});case"card":default:return t.jsx(Kr,{...s})}}const Jr={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},en={left:"text-left",center:"text-center",right:"text-right"},tn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function me(e){return`overflow-hidden ${e?.borderRadius?Jr[e.borderRadius]:"rounded-xl"} ${e?.container||""}`.trim()}function xe(e){return en[e?.titlePosition||"left"]}function ge(e){return tn[e?.oddsGap||"1"]}const sn="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function rn({profileHeader:e,stats:s,statsTitle:r,form:o,formTitle:n,featuredMatch:a,matchTitle:i,bettingOdds:l,oddsLabel:c,styles:d}){const u=xe(d),m={typography:{name:`${sn} ${u}`},container:"mb-1.5"};return t.jsxs("div",{className:`bg-card border border-muted shadow-sm ${me(d)}`,children:[t.jsx("div",{className:d?.headerSection||"",children:t.jsx(Z,{...e})}),s&&t.jsxs("div",{className:`p-4 ${d?.statsSection||""}`,children:[r&&t.jsx($,{entity:{name:r,styles:m}}),t.jsx(D,{...s})]}),o&&t.jsxs("div",{className:`px-4 pb-4 ${d?.formSection||""}`,children:[n&&t.jsx($,{entity:{name:n,styles:m}}),t.jsx(Y,{...o,variant:"scoreCards"})]}),a&&t.jsxs("div",{className:`p-4 pt-0 ${d?.matchSection||""}`,children:[i&&t.jsx($,{entity:{name:i,styles:m}}),t.jsx(y,{...a})]}),l&&l.length>0&&t.jsxs("div",{className:`p-4 pt-0 ${d?.oddsSection||""}`,children:[c&&t.jsx($,{entity:{name:c,styles:m}}),t.jsx("div",{className:`flex flex-col ${ge(d)}`,children:l.map((x,f)=>t.jsx("div",{children:x},f))})]})]})}const nn="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function on({profileHeader:e,stats:s,statsTitle:r,form:o,formTitle:n,featuredMatch:a,matchTitle:i,bettingOdds:l,oddsLabel:c,styles:d}){const u=xe(d),m={typography:{name:`${nn} ${u}`},container:"mb-1.5"};return t.jsxs("div",{className:`shadow-lg ${me(d)}`,children:[t.jsx("div",{className:d?.headerSection||"",children:t.jsx(Z,{...e})}),s&&t.jsxs("div",{className:`bg-card p-5 ${d?.statsSection||""}`,children:[r&&t.jsx($,{entity:{name:r,styles:m}}),t.jsx(D,{...s})]}),o&&t.jsxs("div",{className:`bg-card px-4 pb-4 ${d?.formSection||""}`,children:[n&&t.jsx($,{entity:{name:n,styles:m}}),t.jsx(Y,{...o,variant:"scoreCards"})]}),a&&t.jsxs("div",{className:`bg-card p-4 pt-0 ${d?.matchSection||""}`,children:[i&&t.jsx($,{entity:{name:i,styles:m}}),t.jsx(y,{...a})]}),l&&l.length>0&&t.jsxs("div",{className:`bg-card p-4 pt-0 ${d?.oddsSection||""}`,children:[c&&t.jsx($,{entity:{name:c,styles:m}}),t.jsx("div",{className:`flex flex-col ${ge(d)}`,children:l.map((x,f)=>t.jsx("div",{children:x},f))})]})]})}const an="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ln({profileHeader:e,stats:s,form:r,formTitle:o,matchTitle:n,featuredMatch:a,bettingOdds:i,oddsLabel:l,styles:c}){const d=xe(c),u={typography:{name:`${an} ${d}`},container:"mb-1.5"};return t.jsxs("div",{className:`bg-card border border-muted shadow-sm ${me(c)}`,children:[t.jsx("div",{className:c?.headerSection||"",children:t.jsx(Z,{...e})}),s&&t.jsx("div",{className:`p-3 ${c?.statsSection||""}`,children:t.jsx(D,{...s})}),r&&t.jsxs("div",{className:`bg-card px-3 pb-3 ${c?.formSection||""}`,children:[o&&t.jsx($,{entity:{name:o,styles:u}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(Y,{...r,matchSeparator:"last",variant:"embedded"})})]}),a&&t.jsxs("div",{className:`px-3 pb-3 ${c?.matchSection||""}`,children:[n&&t.jsx($,{entity:{name:n,styles:u}}),t.jsx(y,{...a,styles:{logoSize:"sm",typography:{teamName:"text-sm uppercase"}}})]}),i&&i.length>0&&t.jsxs("div",{className:`px-3 pb-3 ${c?.oddsSection||""}`,children:[l&&t.jsx($,{entity:{name:l,styles:u}}),t.jsx("div",{className:`flex flex-col ${ge(c)}`,children:i.map((m,x)=>t.jsx("div",{children:m},x))})]})]})}const dn="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function cn({profileHeader:e,stats:s,statsTitle:r,form:o,formTitle:n,featuredMatch:a,matchTitle:i,bettingOdds:l,oddsLabel:c,styles:d}){const u=e.styles?.background||"bg-gradient-to-br from-primary-600 to-primary-800",m=e.styles?{...e.styles,background:void 0}:void 0,x=xe(d),f={typography:{name:`${dn} ${x}`},container:"mb-1.5"};return t.jsx("div",{className:`shadow-lg ${me(d)}`,children:t.jsxs("div",{className:"flex flex-col md:flex-row",children:[t.jsx("div",{className:`w-full md:w-1/3 flex items-center justify-center ${u} ${d?.headerSection||""}`,children:t.jsx(Z,{...e,styles:m,layout:"stacked",ctaLayout:"stacked"})}),t.jsxs("div",{className:"w-full md:flex-1 flex flex-col bg-card p-4 space-y-4",children:[s&&t.jsxs("div",{className:d?.statsSection||"",children:[r&&t.jsx($,{entity:{name:r,styles:f}}),t.jsx(D,{...s})]}),o&&t.jsxs("div",{className:d?.formSection||"",children:[n&&t.jsx($,{entity:{name:n,styles:f}}),t.jsx(Y,{...o,variant:"scoreCards"})]}),a&&t.jsxs("div",{className:d?.matchSection||"",children:[i&&t.jsx($,{entity:{name:i,styles:f}}),t.jsx(y,{...a})]}),l&&l.length>0&&t.jsxs("div",{className:d?.oddsSection||"",children:[c&&t.jsx($,{entity:{name:c,styles:f}}),t.jsx("div",{className:`flex flex-col ${ge(d)}`,children:l.map((v,h)=>t.jsx("div",{children:v},h))})]})]})]})})}function un({variant:e="card",...s}){switch(e){case"hero":return t.jsx(on,{...s});case"compact":return t.jsx(ln,{...s});case"horizontal":return t.jsx(cn,{...s});case"card":default:return t.jsx(rn,{...s})}}const mn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},xn={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},gn={1:"grid-cols-1",2:"grid-cols-2"},pn={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},hn={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},fn={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6"};function Et(e){const s=e?.borderRadius?mn[e.borderRadius]:"rounded-xl",r=e?.background||"";return`overflow-hidden ${s} ${r} ${e?.container||""}`.trim()}function Gt(e){return xn[e?.gap||"md"]}function bn(e){const s=e?.sm||1,r=e?.md||2,o=e?.lg||3,n=e?.xl||4;return`${gn[s]} ${pn[r]} ${hn[o]} ${fn[n]}`}function jn({items:e,sectionHeader:s,cardVariant:r="standard",cardStyles:o,pagination:n,styles:a}){const i=Gt(a),l=bn(a?.columns);return t.jsxs("div",{className:Et(a),children:[s,t.jsx("div",{className:`grid ${l} ${i} ${a?.contentSection||""}`,children:e.map(c=>t.jsx(L,{content:c.content,variant:r,styles:o,primaryCta:c.primaryCta,secondaryCta:c.secondaryCta,bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id))}),n&&t.jsx("div",{className:`mt-6 flex justify-center ${a?.paginationSection||""}`,children:t.jsx(ke,{...n})})]})}function vn({items:e,sectionHeader:s,cardVariant:r="standardHorizontal",cardStyles:o,pagination:n,styles:a}){const i=Gt(a),l=r==="standard"?"standardHorizontal":r;return t.jsxs("div",{className:Et(a),children:[s,t.jsx("div",{className:`flex flex-col ${i} ${a?.contentSection||""}`,children:e.map(c=>t.jsx(L,{content:c.content,variant:l,styles:o,primaryCta:c.primaryCta,secondaryCta:c.secondaryCta,bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id))}),n&&t.jsx("div",{className:`mt-6 flex justify-center ${a?.paginationSection||""}`,children:t.jsx(ke,{...n})})]})}function Nn({variant:e="grid",...s}){switch(e){case"list":return t.jsx(vn,{...s});case"grid":default:return t.jsx(jn,{...s})}}const $n={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},wn={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Be(e){const s=e?.borderRadius?$n[e.borderRadius]:"",r=e?.background||"";return`${s} ${r} ${e?.container||""}`.trim()}function Oe(e){return wn[e?.gap||"md"]}const yn={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},Cn={1:{title:"text-xl md:text-3xl font-bold line-clamp-3",description:"text-sm md:text-base line-clamp-2",category:"text-sm",metadata:"text-sm opacity-80"},2:{title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},3:{title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"},4:{title:"text-xl md:text-sm font-semibold line-clamp-2",metadata:"text-xs opacity-80"}};function Sn(e,s){return s<=1?e:{...e,content:{...e.content,description:void 0,category:s>=3?void 0:e.content.category}}}function ve({items:e,config:s,cardStyles:r,gapClass:o}){const n=yn[s.columns],a=Cn[s.columns];return t.jsx("div",{className:`grid ${n} ${o}`,children:e.map(i=>{const l=Sn(i,s.columns);return t.jsx(L,{content:l.content,variant:"hero",styles:{...r,typography:{...a,...r?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function kn({items:e,sectionHeader:s,cardStyles:r,styles:o,stackedConfig:n}){const a=n?.row1||{columns:1},i=n?.row2||{columns:2},l=n?.row3||{columns:3},c=Oe(o),d=a.columns,u=i.columns,m=l.columns,x=e.slice(0,d),f=e.slice(d,d+u),v=e.slice(d+u,d+u+m);return t.jsxs("div",{className:Be(o),children:[s,t.jsxs("div",{className:`flex flex-col ${c}`,children:[x.length>0&&t.jsx(ve,{items:x,config:a,cardStyles:r,gapClass:c}),f.length>0&&t.jsx(ve,{items:f,config:i,cardStyles:r,gapClass:c}),v.length>0&&t.jsx(ve,{items:v,config:l,cardStyles:r,gapClass:c})]})]})}const An={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Rn={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function Je(e,s=!1){return{...e,content:{...e.content,description:void 0,category:s?void 0:e.content.category}}}function Ln({items:e,sectionHeader:s,cardStyles:r,styles:o}){const n=Oe(o),a=e[0],i=e.slice(1,3),l=e.slice(3,6);return a?t.jsxs("div",{className:Be(o),children:[s,t.jsxs("div",{className:`flex flex-col ${n}`,children:[t.jsxs("div",{className:`grid grid-cols-1 lg:grid-cols-3 ${n}`,children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(L,{content:a.content,variant:"hero",styles:{...r,imageAspectRatio:"auto",container:`h-full ${r?.container||""}`,imageContainer:`h-full ${r?.imageContainer||""}`},bettingOdds:a.bettingOdds,matchScore:a.matchScore})}),i.length>0&&t.jsx("div",{className:`flex flex-col ${n}`,children:i.map(c=>{const d=Je(c);return t.jsx(L,{content:d.content,variant:"hero",styles:{...r,container:`flex-1 ${r?.container||""}`,typography:{...An,...r?.typography}},bettingOdds:d.bettingOdds,matchScore:d.matchScore},d.content.id)})})]}),l.length>0&&t.jsx("div",{className:`grid grid-cols-1 md:grid-cols-3 ${n}`,children:l.map(c=>{const d=Je(c,!0);return t.jsx(L,{content:d.content,variant:"hero",styles:{...r,typography:{...Rn,...r?.typography}},bettingOdds:d.bettingOdds,matchScore:d.matchScore},d.content.id)})})]})]}):null}const Tn={title:"text-base font-semibold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"};function Mn(e){return{...e,content:{...e.content,description:void 0}}}function _n({items:e,sectionHeader:s,cardStyles:r,styles:o}){const n=Oe(o),a=e[0],i=e.slice(1);return a?t.jsxs("div",{className:Be(o),children:[s,t.jsxs("div",{className:`grid grid-cols-1 lg:grid-cols-2 ${n}`,children:[t.jsx("div",{className:"lg:h-full",children:t.jsx(L,{content:a.content,variant:"standard",styles:{...r,container:`h-full ${r?.container||""}`},primaryCta:a.primaryCta,secondaryCta:a.secondaryCta,bettingOdds:a.bettingOdds,matchScore:a.matchScore})}),i.length>0&&t.jsx("div",{className:`flex flex-col ${n}`,children:i.map(l=>{const c=Mn(l);return t.jsx(L,{content:c.content,variant:"minimal",styles:{...r,typography:{...Tn,...r?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}function Dn({variant:e="stacked",...s}){switch(e){case"spotlight":return t.jsx(Ln,{...s});case"highlight":return t.jsx(_n,{...s});case"stacked":default:return t.jsx(kn,{...s})}}const Pe={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Bn={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},zt={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function w(e){const s=e?.borderRadius?Pe[e.borderRadius]:"rounded-xl",r=e?.background||"";return`overflow-hidden ${s} ${r} ${e?.container||""}`.trim()}function Ht(e){return Bn[e||"md"]}function et(e){const s=e?.typography||"text-sm font-semibold text-muted-foreground",r=e?.background||"bg-muted",o=zt[e?.padding||"md"],n=e?.borderRadius?Pe[e.borderRadius]:"";return`${s} ${r} ${o} ${n}`.trim()}function On(e){const s=new Map;return e.forEach(r=>{const o=r.dateGroup||r.match.metadata?.date||"Unknown",n=s.get(o)||[];s.set(o,[...n,r])}),s}function Pn(e){const s=new Map;return e.forEach(r=>{const o=r.roundGroup||r.match.metadata?.round||"Unknown",n=s.get(o)||[];s.set(o,[...n,r])}),s}function T({message:e}){return t.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:e})})}function Ut({title:e,styles:s,action:r}){return r?t.jsxs("div",{className:`flex items-center justify-between ${et(s)}`,children:[t.jsx("span",{children:e}),r]}):t.jsx("div",{className:et(s),children:e})}function pe({title:e,subtitle:s,logo:r,action:o,styles:n}){const a=n?.typography||"text-sm font-semibold",i=n?.subtitleTypography||"text-xs text-muted-foreground",l=n?.background||"bg-muted",c=zt[n?.padding||"md"],d=n?.borderRadius?Pe[n.borderRadius]:"";return t.jsxs("div",{className:`flex items-center justify-between ${l} ${c} ${d}`,children:[t.jsxs("div",{className:"flex items-center gap-2",children:[r&&t.jsx("img",{src:r,alt:e,className:"w-6 h-6 object-contain"}),t.jsxs("div",{children:[t.jsx("div",{className:a,children:e}),s&&t.jsx("div",{className:i,children:s})]})]}),o&&t.jsx("div",{children:o})]})}function q({children:e,bettingOdds:s,oddsColumnWidth:r="w-[360px]",hasOddsColumn:o=!1}){return o?t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-2 py-2 px-2",children:[t.jsx("div",{className:"flex-1 min-w-0",children:e}),t.jsx("div",{className:`shrink-0 hidden md:block ${r}`,children:s}),s&&t.jsx("div",{className:"md:hidden",children:s})]}):t.jsx("div",{className:"py-2 px-2",children:e})}function K({items:e,styles:s,renderMatch:r,hasOddsColumn:o}){const n=o??e.some(a=>a.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(a=>t.jsx(q,{bettingOdds:a.bettingOdds,oddsColumnWidth:s?.oddsColumnWidth,hasOddsColumn:n,children:r(a)},a.match.id))})}function tt({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=e.some(i=>i.bettingOdds),a=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const c=a(i),d=l>0?a(e[l-1]):null,u=c!==d;return t.jsxs("div",{children:[u&&t.jsx(pe,{title:c,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:s?.groupHeader}),t.jsx(q,{bettingOdds:i.bettingOdds,oddsColumnWidth:s?.oddsColumnWidth,hasOddsColumn:n,children:t.jsx(y,{match:i.match,variant:"embedded",styles:s?.matchScoreStyles})})]},i.match.id)})})]})}function In({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=On(e),a=Ht(s?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:`flex flex-col ${a}`,children:Array.from(n.entries()).map(([l,c])=>{const d=c[0];return t.jsxs("div",{children:[t.jsx(Ut,{title:l,styles:s?.groupHeader,action:d.groupAction}),t.jsx(K,{items:c,styles:s,hasOddsColumn:i,renderMatch:u=>t.jsx(y,{match:u.match,variant:"embedded",styles:s?.matchScoreStyles})})]},l)})})]})}function En({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found",scrollToActiveRound:n=!1}){const a=j.useRef(null);if(j.useEffect(()=>{n&&a.current&&a.current.scrollIntoView({behavior:"smooth",block:"start"})},[n]),e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const i=Pn(e),l=Ht(s?.groupGap||"md"),c=e.some(d=>d.bettingOdds);return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:`flex flex-col ${l}`,children:Array.from(i.entries()).map(([d,u])=>{const m=u[0],x=u.some(f=>f.isActiveRound);return t.jsxs("div",{ref:x?a:void 0,children:[t.jsx(Ut,{title:d,styles:s?.groupHeader,action:m.groupAction}),t.jsx(K,{items:u,styles:s,hasOddsColumn:c,renderMatch:f=>t.jsx(y,{match:f.match,variant:"embedded",styles:s?.matchScoreStyles})})]},d)})})]})}function Gn({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n={...s?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:w(s),children:[r,t.jsx(K,{items:e,styles:s,renderMatch:a=>t.jsx(y,{match:a.match,variant:"embedded",styles:n})})]})}function zn({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=e.some(l=>l.bettingOdds),a=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...s?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,c)=>{const d=a(l),u=c>0?a(e[c-1]):null,m=d!==u;return t.jsxs("div",{children:[m&&t.jsx(pe,{title:d,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:s?.groupHeader}),t.jsx(q,{bettingOdds:l.bettingOdds,oddsColumnWidth:s?.oddsColumnWidth,hasOddsColumn:n,children:t.jsx(y,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Hn({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){return e.length===0?t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]}):t.jsxs("div",{className:w(s),children:[r,t.jsx(K,{items:e,styles:s,renderMatch:n=>t.jsx(y,{match:n.match,variant:"embedded",styles:s?.matchScoreStyles})})]})}function Un({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=e.some(i=>i.bettingOdds),a=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const c=a(i),d=l>0?a(e[l-1]):null,u=c!==d;return t.jsxs("div",{children:[u&&t.jsx(pe,{title:c,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:s?.groupHeader}),t.jsx(q,{bettingOdds:i.bettingOdds,oddsColumnWidth:s?.oddsColumnWidth,hasOddsColumn:n,children:t.jsx(y,{match:i.match,variant:"embedded",styles:s?.matchScoreStyles})})]},i.match.id)})})]})}function Wn({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=e.filter(l=>l.match.status!=="scheduled"),a=e.filter(l=>l.match.status==="scheduled"),i=[...n,...a];return t.jsxs("div",{className:w(s),children:[r,t.jsx(K,{items:i,styles:s,renderMatch:l=>t.jsx(y,{match:l.match,variant:"embedded",styles:s?.matchScoreStyles})})]})}function Fn({items:e,styles:s,sectionHeader:r,emptyMessage:o="No matches found"}){if(e.length===0)return t.jsxs("div",{className:w(s),children:[r,t.jsx(T,{message:o})]});const n=e.some(l=>l.bettingOdds),a=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i=l=>l.match.status!=="scheduled"?{...s?.matchScoreStyles,finishedStatusDisplay:"date"}:s?.matchScoreStyles;return t.jsxs("div",{className:w(s),children:[r,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,c)=>{const d=a(l),u=c>0?a(e[c-1]):null,m=d!==u;return t.jsxs("div",{children:[m&&t.jsx(pe,{title:d,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:s?.groupHeader}),t.jsx(q,{bettingOdds:l.bettingOdds,oddsColumnWidth:s?.oddsColumnWidth,hasOddsColumn:n,children:t.jsx(y,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Vn({variant:e="daily",...s}){switch(e){case"daily":return t.jsx(tt,{...s});case"round":return t.jsx(In,{...s});case"competition":return t.jsx(En,{...s});case"teamResults":return t.jsx(Gn,{...s});case"teamResultsByCompetition":return t.jsx(zn,{...s});case"teamFixtures":return t.jsx(Hn,{...s});case"teamFixturesByCompetition":return t.jsx(Un,{...s});case"teamMatches":return t.jsx(Wn,{...s});case"teamMatchesByCompetition":return t.jsx(Fn,{...s});default:return t.jsx(tt,{...s})}}const Yn="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%239ca3af'%3E%3Ccircle cx='50' cy='35' r='20'/%3E%3Cpath d='M20 95 Q20 60 50 60 Q80 60 80 95 Z'/%3E%3C/svg%3E";function Wt(e){return e.imageUrl||Yn}const Zn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Ft={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Vt(e){const s=e?.borderRadius?Zn[e.borderRadius]:"rounded-xl",r=e?.background||"bg-card";return`overflow-hidden ${s} ${r} ${e?.container||""}`.trim()}function Yt(e){return Ft[e?.groupGap||"md"]}function Zt(e){return Ft[e?.memberGap||"sm"]}function qt(e,s){const r=new Map;s&&s.forEach(a=>r.set(a.key,a));const o=new Map;e.forEach(a=>{const i=a.positionGroup;o.has(i)||o.set(i,[]),o.get(i).push(a)});const n=Array.from(o.entries()).map(([a,i])=>{const l=r.get(a);return{key:a,label:l?.label||a,order:l?.order??999,members:i}});return n.sort((a,i)=>a.order-i.order),n.map(({key:a,label:i,members:l})=>({key:a,label:i,members:l}))}function qn(e,s){const r=[];return s?.showNumber&&e.jerseyNumber!==void 0&&r.push(`#${e.jerseyNumber}`),s?.showPosition&&e.position&&r.push(e.position),s?.showSubtitle&&e.subtitle&&r.push(e.subtitle),r.length>0?r.join(" • "):void 0}const Kn="text-sm font-semibold text-muted-foreground uppercase tracking-wider",st={2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"};function Xn({members:e,positionGroups:s,display:r={showNumber:!0,showPosition:!0},header:o,styles:n}){const a=qt(e,s),i=n?.groupHeaderTypography||Kn,l=n?.memberNameTypography||"font-semibold text-foreground",c=n?.memberSubtitleTypography||"text-xs text-muted-foreground",d=n?.columns||3,u=st[d]||st[3];return t.jsxs("div",{className:`${Vt(n)}`,children:[o&&t.jsx("div",{className:"p-4 border-b border-muted",children:o}),t.jsx("div",{className:`p-4 flex flex-col ${Yt(n)}`,children:a.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:`grid ${u} ${Zt(n)}`,children:m.members.map(x=>{const f=x.href||x.onClick,v=x.href?"a":"div",h=x.href?{href:x.href}:x.onClick?{onClick:x.onClick,role:"button",tabIndex:0}:{};return t.jsxs(v,{className:`bg-muted rounded-lg p-3 flex flex-col gap-3 ${f?"cursor-pointer hover:bg-muted/80 transition-colors":""}`,...h,children:[t.jsx(S,{name:x.name,mobileName:x.shortName,imageUrl:Wt(x),subtitle:qn(x,r),styles:{imageBorderRadius:"full",imageSize:n?.memberStyles?.imageSize||"xl",typography:{name:l,subtitle:c},gap:"3",...n?.memberStyles}}),x.stats&&x.stats.length>0&&t.jsx(D,{items:x.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...n?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",background:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...n?.statsItem}}})]},x.id)})})]},m.key))})]})}const Qn="text-sm font-semibold text-muted-foreground uppercase tracking-wider",rt={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function Jn(e){const s=new Date(e),r=new Date;let o=r.getFullYear()-s.getFullYear();const n=r.getMonth()-s.getMonth();return(n<0||n===0&&r.getDate()<s.getDate())&&o--,o}function eo(e,s){const r=[];if(s?.showPosition&&e.position&&r.push({label:"Position",value:e.position}),e.birthDate&&r.push({label:"Age",value:`${Jn(e.birthDate)}`}),e.height&&r.push({label:"Height",value:e.height}),e.contractEnd){const o=new Date(e.contractEnd).getFullYear();r.push({label:"Contract",value:`${o}`})}return e.marketValue&&r.push({label:"Value",value:e.marketValue}),r}function to({members:e,positionGroups:s,display:r={showNumber:!0,showPosition:!0},header:o,styles:n}){const a=qt(e,s),i=n?.groupHeaderTypography||Qn,l=n?.columns||2,c=rt[l]||rt[2];return t.jsxs("div",{className:`${Vt(n)}`,children:[o&&t.jsx("div",{className:"p-4 border-b border-muted",children:o}),t.jsx("div",{className:`p-4 flex flex-col ${Yt(n)}`,children:a.map(d=>t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:i,children:d.label}),t.jsx("div",{className:`grid ${c} ${Zt(n)}`,children:d.members.map(u=>{const m=eo(u,r),x=u.href||u.onClick,f=u.href?"a":"div",v=u.href?{href:u.href}:u.onClick?{onClick:u.onClick,role:"button",tabIndex:0}:{};return t.jsxs(f,{className:`bg-muted rounded-xl overflow-hidden flex flex-row ${x?"cursor-pointer hover:bg-muted/80 transition-colors":""}`,...v,children:[t.jsxs("div",{className:"relative w-40 sm:w-48 shrink-0 bg-gradient-to-b from-primary-600/20 to-primary-800/20",children:[t.jsx("img",{src:Wt(u),alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover object-top"}),r?.showNumber&&u.jerseyNumber&&t.jsx("div",{className:"absolute top-3 right-3 bg-background/90 backdrop-blur-sm rounded-lg px-2 py-1 font-bold text-sm text-foreground",children:u.jerseyNumber})]}),t.jsxs("div",{className:"p-4 flex flex-col gap-3 flex-1 min-w-0",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[u.nationality?.flagUrl&&t.jsx("img",{src:u.nationality.flagUrl,alt:u.nationality.name,className:"w-6 h-4 object-cover rounded shadow-sm shrink-0"}),t.jsx("h3",{className:"text-xl font-bold text-foreground truncate",children:u.name})]}),u.subtitle&&t.jsx("p",{className:"text-sm text-primary-600 font-medium",children:u.subtitle})]}),m.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:m.map(h=>t.jsxs("div",{className:"flex gap-1",children:[t.jsxs("span",{className:"text-muted-foreground",children:[h.label,":"]}),t.jsx("span",{className:"font-medium text-foreground",children:h.value})]},h.label))}),u.stats&&u.stats.length>0&&t.jsx(D,{items:u.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...n?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",background:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...n?.statsItem}}})]})]},u.id)})})]},d.key))})]})}function so({variant:e="card",...s}){switch(e){case"detailed":return t.jsx(to,{...s});case"card":default:return t.jsx(Xn,{...s})}}exports.Badge=$e;exports.BadgeGroup=we;exports.BarItem=Rt;exports.BettingOdds=pt;exports.CTAButton=rs;exports.CTAGroup=se;exports.ComparisonItem=Lt;exports.CompetitorProfileBlock=un;exports.ContentCard=L;exports.ContentListBlock=Nn;exports.Countdown=nt;exports.DefaultStatItem=vt;exports.EntityDisplay=S;exports.FORM_INDICATOR_DEFAULT_LABELS=Me;exports.FeaturedContentBlock=Dn;exports.FormIndicator=Y;exports.HeadToHeadBlock=Qr;exports.HeadToHeadItem=Tt;exports.HeroCard=at;exports.HorizontalStatItem=$t;exports.InlineScore=gt;exports.MatchListBlock=Vn;exports.MatchScore=y;exports.MatchupHeader=De;exports.MinimalCard=xt;exports.Pagination=ke;exports.ProfileHeader=Z;exports.PromoCard=mt;exports.ScoreCard=ht;exports.ScoreLine=ft;exports.SectionHeader=$;exports.SquadBlock=so;exports.StackedStatItem=Nt;exports.StandardCard=ut;exports.StatItem=wt;exports.StatsGrid=D;exports.StatsHeadToHead=Te;exports.StatsTable=mr;exports.Tooltip=G;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),io=require("react-dom"),lo=(e,r)=>{const o=new Array(e.length+r.length);for(let s=0;s<e.length;s++)o[s]=e[s];for(let s=0;s<r.length;s++)o[e.length+s]=r[s];return o},co=(e,r)=>({classGroupId:e,validator:r}),ar=(e=new Map,r=null,o)=>({nextPart:e,validators:r,classGroupId:o}),Ie="-",Dt=[],uo="arbitrary..",mo=e=>{const r=po(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return go(i);const l=i.split(Ie),u=l[0]===""&&l.length>1?1:0;return ir(l,u,r)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=s[i],c=o[i];return u?c?lo(c,u):u:c||Dt}return o[i]||Dt}}},ir=(e,r,o)=>{if(e.length-r===0)return o.classGroupId;const a=e[r],n=o.nextPart.get(a);if(n){const c=ir(e,r+1,n);if(c)return c}const i=o.validators;if(i===null)return;const l=r===0?e.join(Ie):e.slice(r).join(Ie),u=i.length;for(let c=0;c<u;c++){const m=i[c];if(m.validator(l))return m.classGroupId}},go=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),o=r.indexOf(":"),s=r.slice(0,o);return s?uo+s:void 0})(),po=e=>{const{theme:r,classGroups:o}=e;return xo(o,r)},xo=(e,r)=>{const o=ar();for(const s in e){const a=e[s];mt(a,o,s,r)}return o},mt=(e,r,o,s)=>{const a=e.length;for(let n=0;n<a;n++){const i=e[n];ho(i,r,o,s)}},ho=(e,r,o,s)=>{if(typeof e=="string"){fo(e,r,o);return}if(typeof e=="function"){bo(e,r,o,s);return}jo(e,r,o,s)},fo=(e,r,o)=>{const s=e===""?r:lr(r,e);s.classGroupId=o},bo=(e,r,o,s)=>{if(vo(e)){mt(e(s),r,o,s);return}r.validators===null&&(r.validators=[]),r.validators.push(co(o,e))},jo=(e,r,o,s)=>{const a=Object.entries(e),n=a.length;for(let i=0;i<n;i++){const[l,u]=a[i];mt(u,lr(r,l),o,s)}},lr=(e,r)=>{let o=e;const s=r.split(Ie),a=s.length;for(let n=0;n<a;n++){const i=s[n];let l=o.nextPart.get(i);l||(l=ar(),o.nextPart.set(i,l)),o=l}return o},vo=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wo=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),s=Object.create(null);const a=(n,i)=>{o[n]=i,r++,r>e&&(r=0,s=o,o=Object.create(null))};return{get(n){let i=o[n];if(i!==void 0)return i;if((i=s[n])!==void 0)return a(n,i),i},set(n,i){n in o?o[n]=i:a(n,i)}}},ct="!",Ot=":",yo=[],Bt=(e,r,o,s,a)=>({modifiers:e,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),No=e=>{const{prefix:r,experimentalParseClassName:o}=e;let s=a=>{const n=[];let i=0,l=0,u=0,c;const m=a.length;for(let v=0;v<m;v++){const N=a[v];if(i===0&&l===0){if(N===Ot){n.push(a.slice(u,v)),u=v+1;continue}if(N==="/"){c=v;continue}}N==="["?i++:N==="]"?i--:N==="("?l++:N===")"&&l--}const g=n.length===0?a:a.slice(u);let f=g,w=!1;g.endsWith(ct)?(f=g.slice(0,-1),w=!0):g.startsWith(ct)&&(f=g.slice(1),w=!0);const S=c&&c>u?c-u:void 0;return Bt(n,w,f,S)};if(r){const a=r+Ot,n=s;s=i=>i.startsWith(a)?n(i.slice(a.length)):Bt(yo,!1,i,void 0,!0)}if(o){const a=s;s=n=>o({className:n,parseClassName:a})}return s},Co=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((o,s)=>{r.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let n=0;n<o.length;n++){const i=o[n],l=i[0]==="[",u=r.has(i);l||u?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(i)):a.push(i)}return a.length>0&&(a.sort(),s.push(...a)),s}},ko=e=>({cache:wo(e.cacheSize),parseClassName:No(e),sortModifiers:Co(e),...mo(e)}),So=/\s+/,Ao=(e,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:n}=r,i=[],l=e.trim().split(So);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:g,modifiers:f,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}=o(m);if(g){u=m+(u.length>0?" "+u:u);continue}let N=!!v,b=s(N?S.substring(0,v):S);if(!b){if(!N){u=m+(u.length>0?" "+u:u);continue}if(b=s(S),!b){u=m+(u.length>0?" "+u:u);continue}N=!1}const h=f.length===0?"":f.length===1?f[0]:n(f).join(":"),k=w?h+ct:h,R=k+b;if(i.indexOf(R)>-1)continue;i.push(R);const M=a(b,N);for(let P=0;P<M.length;++P){const E=M[P];i.push(k+E)}u=m+(u.length>0?" "+u:u)}return u},Ro=(...e)=>{let r=0,o,s,a="";for(;r<e.length;)(o=e[r++])&&(s=dr(o))&&(a&&(a+=" "),a+=s);return a},dr=e=>{if(typeof e=="string")return e;let r,o="";for(let s=0;s<e.length;s++)e[s]&&(r=dr(e[s]))&&(o&&(o+=" "),o+=r);return o},To=(e,...r)=>{let o,s,a,n;const i=u=>{const c=r.reduce((m,g)=>g(m),e());return o=ko(c),s=o.cache.get,a=o.cache.set,n=l,l(u)},l=u=>{const c=s(u);if(c)return c;const m=Ao(u,o);return a(u,m),m};return n=i,(...u)=>n(Ro(...u))},Lo=[],L=e=>{const r=o=>o[e]||Lo;return r.isThemeGetter=!0,r},cr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ur=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mo=/^\d+\/\d+$/,zo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Io=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_o=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Po=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Do=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ee=e=>Mo.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&C(e.slice(0,-1)),H=e=>zo.test(e),Oo=()=>!0,Bo=e=>Io.test(e)&&!_o.test(e),mr=()=>!1,Eo=e=>Po.test(e),$o=e=>Do.test(e),Go=e=>!p(e)&&!x(e),Wo=e=>oe(e,xr,mr),p=e=>cr.test(e),K=e=>oe(e,hr,Bo),ot=e=>oe(e,Yo,C),Et=e=>oe(e,gr,mr),Ho=e=>oe(e,pr,$o),Ae=e=>oe(e,fr,Eo),x=e=>ur.test(e),le=e=>se(e,hr),Vo=e=>se(e,qo),$t=e=>se(e,gr),Uo=e=>se(e,xr),Fo=e=>se(e,pr),Re=e=>se(e,fr,!0),oe=(e,r,o)=>{const s=cr.exec(e);return s?s[1]?r(s[1]):o(s[2]):!1},se=(e,r,o=!1)=>{const s=ur.exec(e);return s?s[1]?r(s[1]):o:!1},gr=e=>e==="position"||e==="percentage",pr=e=>e==="image"||e==="url",xr=e=>e==="length"||e==="size"||e==="bg-size",hr=e=>e==="length",Yo=e=>e==="number",qo=e=>e==="family-name",fr=e=>e==="shadow",Zo=()=>{const e=L("color"),r=L("font"),o=L("text"),s=L("font-weight"),a=L("tracking"),n=L("leading"),i=L("breakpoint"),l=L("container"),u=L("spacing"),c=L("radius"),m=L("shadow"),g=L("inset-shadow"),f=L("text-shadow"),w=L("drop-shadow"),S=L("blur"),v=L("perspective"),N=L("aspect"),b=L("ease"),h=L("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),x,p],P=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],j=()=>[x,p,u],_=()=>[ee,"full","auto",...j()],ve=()=>[q,"none","subgrid",x,p],we=()=>["auto",{span:["full",q,x,p]},q,x,p],ye=()=>[q,"auto",x,p],Lt=()=>["auto","min","max","fr",x,p],Je=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],J=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],Z=()=>[ee,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],y=()=>[e,x,p],Mt=()=>[...R(),$t,Et,{position:[x,p]}],zt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],It=()=>["auto","cover","contain",Uo,Wo,{size:[x,p]}],et=()=>[rt,le,K],D=()=>["","none","full",c,x,p],B=()=>["",C,le,K],Ne=()=>["solid","dashed","dotted","double"],_t=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[C,rt,$t,Et],Pt=()=>["","none",S,x,p],Ce=()=>["none",C,x,p],ke=()=>["none",C,x,p],tt=()=>[C,x,p],Se=()=>[ee,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[H],breakpoint:[H],color:[Oo],container:[H],"drop-shadow":[H],ease:["in","out","in-out"],font:[Go],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[H],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[H],shadow:[H],spacing:["px",C],text:[H],"text-shadow":[H],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ee,p,x,N]}],container:["container"],columns:[{columns:[C,p,x,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:_()}],"inset-x":[{"inset-x":_()}],"inset-y":[{"inset-y":_()}],start:[{start:_()}],end:[{end:_()}],top:[{top:_()}],right:[{right:_()}],bottom:[{bottom:_()}],left:[{left:_()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",x,p]}],basis:[{basis:[ee,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,ee,"auto","initial","none",p]}],grow:[{grow:["",C,x,p]}],shrink:[{shrink:["",C,x,p]}],order:[{order:[q,"first","last","none",x,p]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":ye()}],"col-end":[{"col-end":ye()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":ye()}],"row-end":[{"row-end":ye()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Lt()}],"auto-rows":[{"auto-rows":Lt()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...Je(),"normal"]}],"justify-items":[{"justify-items":[...J(),"normal"]}],"justify-self":[{"justify-self":["auto",...J()]}],"align-content":[{content:["normal",...Je()]}],"align-items":[{items:[...J(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...J(),{baseline:["","last"]}]}],"place-content":[{"place-content":Je()}],"place-items":[{"place-items":[...J(),"baseline"]}],"place-self":[{"place-self":["auto",...J()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",o,le,K]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,x,ot]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,p]}],"font-family":[{font:[Vo,p,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,x,p]}],"line-clamp":[{"line-clamp":[C,"none",x,ot]}],leading:[{leading:[n,...j()]}],"list-image":[{"list-image":["none",x,p]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",x,p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",x,K]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[C,"auto",x,p]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",x,p]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",x,p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Mt()}],"bg-repeat":[{bg:zt()}],"bg-size":[{bg:It()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,x,p],radial:["",x,p],conic:[q,x,p]},Fo,Ho]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ne(),"hidden","none"]}],"divide-style":[{divide:[...Ne(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...Ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,x,p]}],"outline-w":[{outline:["",C,le,K]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",m,Re,Ae]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",g,Re,Ae]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[C,K]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",f,Re,Ae]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[C,x,p]}],"mix-blend":[{"mix-blend":[..._t(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_t()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[x,p]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Mt()}],"mask-repeat":[{mask:zt()}],"mask-size":[{mask:It()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",x,p]}],filter:[{filter:["","none",x,p]}],blur:[{blur:Pt()}],brightness:[{brightness:[C,x,p]}],contrast:[{contrast:[C,x,p]}],"drop-shadow":[{"drop-shadow":["","none",w,Re,Ae]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",C,x,p]}],"hue-rotate":[{"hue-rotate":[C,x,p]}],invert:[{invert:["",C,x,p]}],saturate:[{saturate:[C,x,p]}],sepia:[{sepia:["",C,x,p]}],"backdrop-filter":[{"backdrop-filter":["","none",x,p]}],"backdrop-blur":[{"backdrop-blur":Pt()}],"backdrop-brightness":[{"backdrop-brightness":[C,x,p]}],"backdrop-contrast":[{"backdrop-contrast":[C,x,p]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,x,p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,x,p]}],"backdrop-invert":[{"backdrop-invert":["",C,x,p]}],"backdrop-opacity":[{"backdrop-opacity":[C,x,p]}],"backdrop-saturate":[{"backdrop-saturate":[C,x,p]}],"backdrop-sepia":[{"backdrop-sepia":["",C,x,p]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",x,p]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",x,p]}],ease:[{ease:["linear","initial",b,x,p]}],delay:[{delay:[C,x,p]}],animate:[{animate:["none",h,x,p]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,x,p]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[x,p,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",x,p]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",x,p]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[C,le,K,ot]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ko=To(Zo);function d(...e){return Ko(e.filter(Boolean).join(" "))}const Xo={default:"bg-neutral-700 text-white border-neutral-700",primary:"text-white bg-primary-500 border-primary-500",secondary:"text-white bg-secondary-500 border-secondary-500",danger:"bg-red-600 text-white border-red-700",warning:"bg-yellow-600 text-white border-yellow-700",success:"bg-green-600 text-white border-green-700",info:"bg-cyan-600 text-white border-cyan-700",custom:""};function gt({badge:e}){const r=e.variant||"default",o=r==="custom",s=Xo[r],a=e.styles?.container,n=o?a:d("inline-block text-xs font-semibold px-2 sm:px-3 py-1 rounded border",s,a);return t.jsx("span",{role:"status","aria-label":e.text,className:n,children:e.text})}const Qo={"top-left":"absolute top-2 sm:top-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","top-right":"absolute top-2 sm:top-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10","bottom-left":"absolute bottom-2 sm:bottom-3 left-2 sm:left-3 flex flex-wrap gap-2 z-10","bottom-right":"absolute bottom-2 sm:bottom-3 right-2 sm:right-3 flex flex-wrap gap-2 justify-end z-10"};function pt({badges:e,positions:r=["top-left","top-right","bottom-left","bottom-right"],styles:o}){return!e||e.length===0?null:t.jsx(t.Fragment,{children:r.map(s=>{const a=e.filter(n=>n.position===s);return a.length===0?null:t.jsx("div",{className:d(Qo[s],o?.container),role:"group","aria-label":`${s} badges`,children:a.map((n,i)=>t.jsx(gt,{badge:n},`${s}-${i}`))},s)})})}const Jo={gap:{none:"gap-0",sm:"gap-1",md:"gap-2",lg:"gap-3",xl:"gap-4"}},xt={cell:"backdrop-blur-md bg-black/10 rounded-lg px-2 py-1",gap:"md",typography:{value:"font-bold",label:"text-xs mt-1 opacity-90"}};function es(e){return`${e?.cell??xt.cell} flex min-w-12 text-center items-center justify-center`}function ts(e){return Jo.gap[e?.gap??xt.gap]}function Gt(e,r){return r?.typography?.[e]??xt.typography[e]}const Te={days:"Days",hours:"Hours",minutes:"Mins",seconds:"Secs"};function Wt(e){const r=e.getTime()-new Date().getTime();return r<=0?{days:0,hours:0,minutes:0,seconds:0,total:0}:{days:Math.floor(r/(1e3*60*60*24)),hours:Math.floor(r/(1e3*60*60)%24),minutes:Math.floor(r/1e3/60%60),seconds:Math.floor(r/1e3%60),total:r}}function br({targetDate:e,styles:r,labels:o}){const s=A.useMemo(()=>typeof e=="string"?new Date(e):e,[e]),[a,n]=A.useState(Wt(s)),i=es(r),l=ts(r),u=Gt("value",r),c=Gt("label",r),m={days:o?.days??Te.days,hours:o?.hours??Te.hours,minutes:o?.minutes??Te.minutes,seconds:o?.seconds??Te.seconds};return A.useEffect(()=>{const g=setInterval(()=>{n(Wt(s))},1e3);return()=>clearInterval(g)},[s]),t.jsxs("div",{className:d("flex",l,r?.container),role:"timer","aria-live":"polite",children:[a.days>0&&t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:a.days}),t.jsx("div",{className:c,children:m.days})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.hours).padStart(2,"0")}),t.jsx("div",{className:c,children:m.hours})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.minutes).padStart(2,"0")}),t.jsx("div",{className:c,children:m.minutes})]}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("div",{className:d(i,u),children:String(a.seconds).padStart(2,"0")}),t.jsx("div",{className:c,children:m.seconds})]})]})}const rs={default:"bg-muted text-foreground hover:bg-muted/80 border border-transparent",primary:"bg-primary-500 text-white hover:bg-primary-600 border border-transparent",secondary:"bg-secondary-500 text-secondary-foreground hover:bg-secondary-500/80 border border-transparent",outline:"bg-transparent border border-current text-foreground hover:bg-muted",link:"bg-transparent text-primary-500 hover:underline border border-transparent px-0 py-0",custom:""};function os({cta:e}){const r=e.variant==="custom",o=rs[e.variant||"default"],s=e.styles?.container,a=r?s:d("box-border w-full flex items-center justify-center px-4 py-2 rounded text-sm font-medium transition-colors whitespace-nowrap cursor-pointer",o,s),n=i=>{e.onClick&&(i.preventDefault(),i.stopPropagation(),e.onClick())};return e.href?t.jsx("a",{href:e.href,className:a,onClick:n,role:"link","aria-label":e.text,children:e.text}):t.jsx("button",{type:"button",className:a,onClick:n,"aria-label":e.text,children:e.text})}const ss={vertical:"flex flex-col gap-2 sm:gap-1.5",horizontal:"flex flex-row gap-2 sm:gap-3",responsive:"flex flex-col sm:flex-row gap-1 sm:gap-2"};function Ee({primaryCta:e,secondaryCta:r,layout:o="responsive",styles:s}){return!e&&!r?null:t.jsxs("div",{role:"group","aria-label":"Call to action buttons",className:d(ss[o],s?.container),children:[e,r]})}const ns={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"},as={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"},is={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function $({name:e,mobileName:r,imageUrl:o,subtitle:s,orientation:a="ltr",truncate:n=!1,styles:i}){const l=i?.imageSize||"md",u=i?.imageBorderRadius||"md",c=i?.imageBorder||"",m=i?.gap||"2",g=i?.textAlign||"left",f=ns[l],w=is[u],S=as[m],v=i?.typography?.name||"font-semibold leading-5",N=i?.typography?.subtitle||"text-xs text-muted-foreground",b=a==="rtl"?"flex-row-reverse":"flex-row",h=g==="right"?"text-right":"text-left";return t.jsxs("div",{className:d("flex items-center",b,S,i?.container),role:"group","aria-label":`${e}${s?` - ${s}`:""}`,children:[o&&t.jsx("img",{src:o,alt:"","aria-hidden":"true",className:d(f,w,"object-cover shrink-0",c)}),t.jsxs("div",{className:d("flex flex-col",h,n&&"min-w-0"),children:[r?t.jsxs("span",{className:d(v,n&&"truncate"),children:[t.jsx("span",{className:"sm:hidden",children:r}),t.jsx("span",{className:"hidden sm:inline",children:e})]}):t.jsx("span",{className:d(v,n&&"truncate"),children:e}),s&&t.jsx("span",{className:d(N,n&&"truncate"),children:s})]})]})}const ne={sm:{button:"px-2 py-1 text-xs min-w-[28px]",icon:"w-3 h-3",dot:"w-2 h-2"},md:{button:"px-3 py-1.5 text-sm min-w-[36px]",icon:"w-4 h-4",dot:"w-2.5 h-2.5"},lg:{button:"px-4 py-2 text-base min-w-[44px]",icon:"w-5 h-5",dot:"w-3 h-3"}},$e={sm:"gap-1",md:"gap-2",lg:"gap-3"},Ge={previous:"Previous",next:"Next",first:"First",last:"Last",loadMore:"Load More",pageInfo:"Page {current} of {total}"},ht=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})}),ft=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),ls=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 19l-7-7 7-7M18 19l-7-7 7-7"})}),ds=({className:e})=>t.jsx("svg",{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 5l7 7-7 7M6 5l7 7-7 7"})});function V({onClick:e,disabled:r,active:o,size:s,styles:a,children:n,ariaLabel:i}){const l=ne[s],u="inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",c=r?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":o?d("cursor-pointer bg-primary-500 text-white",a?.typography?.activeButton):d("cursor-pointer bg-muted text-foreground hover:bg-muted/80",a?.typography?.button);return t.jsx("button",{type:"button",onClick:e,disabled:r,"aria-label":i,"aria-current":o?"page":void 0,className:d(u,l.button,c),children:n})}function cs(e,r,o){if(r<=o)return Array.from({length:r},(l,u)=>u+1);const s=Math.floor(o/2);let a=Math.max(1,e-s),n=Math.min(r,a+o-1);n-a+1<o&&(a=Math.max(1,n-o+1));const i=[];a>1&&(i.push(1),a>2&&i.push("ellipsis"));for(let l=a;l<=n;l++)l!==1&&l!==r&&i.push(l);return n<r&&(n<r-1&&i.push("ellipsis"),i.push(r)),i}function us({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,maxVisiblePages:u=5,showFirstLast:c=!1,showPrevNext:m=!0}){const g=ne[a],f={...Ge,...i},w=cs(e,r,u),S=$e[l?.gap||"sm"];return t.jsxs("nav",{className:d("flex items-center",S,l?.container),"aria-label":"Pagination",children:[c&&t.jsx(V,{onClick:()=>o(1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.first,children:n?.first||t.jsx(ls,{className:g.icon})}),m&&t.jsx(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:f.previous,children:n?.previous||t.jsx(ht,{className:g.icon})}),w.map((v,N)=>v==="ellipsis"?t.jsx("span",{className:"px-2 text-muted-foreground",children:"..."},`ellipsis-${N}`):t.jsx(V,{onClick:()=>o(v),disabled:s,active:v===e,size:a,styles:l,ariaLabel:`Page ${v}`,children:v},v)),m&&t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:f.next,children:n?.next||t.jsx(ft,{className:g.icon})}),c&&t.jsx(V,{onClick:()=>o(r),disabled:s||e===r,size:a,styles:l,ariaLabel:f.last,children:n?.last||t.jsx(ds,{className:g.icon})})]})}function ms({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l,showLabels:u=!0}){const c=ne[a],m={...Ge,...i},g=$e[l?.gap||"md"];return t.jsxs("nav",{className:d("flex items-center",g,l?.container),"aria-label":"Pagination",children:[t.jsxs(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:m.previous,children:[n?.previous||t.jsx(ht,{className:c.icon}),u&&t.jsx("span",{className:"ml-1",children:m.previous})]}),t.jsxs(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:m.next,children:[u&&t.jsx("span",{className:"mr-1",children:m.next}),n?.next||t.jsx(ft,{className:c.icon})]})]})}function gs({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",icons:n,labels:i,styles:l}){const u=ne[a],c={...Ge,...i},m=$e[l?.gap||"md"],g=c.pageInfo.replace("{current}",String(e)).replace("{total}",String(r));return t.jsxs("nav",{className:d("flex items-center",m,l?.container),"aria-label":"Pagination",children:[t.jsx(V,{onClick:()=>o(e-1),disabled:s||e===1,size:a,styles:l,ariaLabel:c.previous,children:n?.previous||t.jsx(ht,{className:u.icon})}),t.jsx("span",{className:d("px-2",l?.typography?.pageInfo||"text-sm text-muted-foreground"),children:g}),t.jsx(V,{onClick:()=>o(e+1),disabled:s||e===r,size:a,styles:l,ariaLabel:c.next,children:n?.next||t.jsx(ft,{className:u.icon})})]})}function ps({currentPage:e,totalPages:r,onPageChange:o,disabled:s,size:a="md",styles:n}){const i=ne[a],l=$e[n?.gap||"sm"];return t.jsx("nav",{className:d("flex items-center",l,n?.container),"aria-label":"Pagination",children:Array.from({length:r},(u,c)=>c+1).map(u=>t.jsx("button",{type:"button",onClick:()=>o(u),disabled:s,"aria-label":`Page ${u}`,"aria-current":u===e?"page":void 0,className:d(i.dot,"rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",s?"opacity-50 cursor-not-allowed":"cursor-pointer",u===e?"bg-primary-500":"bg-muted hover:bg-muted-foreground/50")},u))})}function xs({totalPages:e,onPageChange:r,disabled:o,size:s="md",labels:a,styles:n,loading:i=!1,loadingLabel:l="Loading..."}){const u=ne[s],c={...Ge,...a},m=o||i||e<=1;return t.jsx("nav",{className:d("flex items-center justify-center",n?.container),"aria-label":"Load more",children:t.jsx("button",{type:"button",onClick:()=>r(2),disabled:m,"aria-label":i?l:c.loadMore,className:d("inline-flex items-center justify-center rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-1",u.button,m?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"cursor-pointer bg-primary-500 text-white hover:bg-primary-600",n?.typography?.button),children:i?l:c.loadMore})})}function bt(e){switch(e.variant){case"numbered":return t.jsx(us,{...e});case"simple":return t.jsx(ms,{...e});case"compact":return t.jsx(gs,{...e});case"dots":return t.jsx(ps,{...e});case"load-more":return t.jsx(xs,{...e});default:return null}}function de({content:e,children:r,position:o="top",styles:s}){const[a,n]=A.useState(!1),[i,l]=A.useState({top:0,left:0}),u=A.useRef(null),c=A.useId(),m=()=>{if(!u.current)return{top:0,left:0};const h=u.current.getBoundingClientRect();switch(o){case"top":return{top:h.top-8,left:h.left+h.width/2};case"bottom":return{top:h.bottom+8,left:h.left+h.width/2};case"left":return{top:h.top+h.height/2,left:h.left-8};case"right":return{top:h.top+h.height/2,left:h.right+8};default:return{top:0,left:0}}},g=()=>{l(m()),n(!0)},f=()=>{n(!1)},w=()=>{l(m()),n(!0)},S=()=>{n(!1)},v={top:"-translate-x-1/2 -translate-y-full",bottom:"-translate-x-1/2",left:"-translate-x-full -translate-y-1/2",right:"-translate-y-1/2"},N={top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent border-t-gray-900",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent border-b-gray-900",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent border-l-gray-900",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent border-r-gray-900"},b=a&&t.jsx("div",{id:c,role:"tooltip","aria-hidden":!a,className:d("fixed z-9999 pointer-events-none",v[o],s?.container),style:{top:`${i.top}px`,left:`${i.left}px`},children:t.jsxs("div",{className:"bg-gray-900 text-white text-xs rounded-md py-1.5 px-2.5 whitespace-nowrap shadow-lg",children:[e,t.jsx("div",{className:d("absolute w-0 h-0 border-4",N[o]),"aria-hidden":"true"})]})});return t.jsxs(t.Fragment,{children:[t.jsx("div",{ref:u,className:"inline-block",onMouseEnter:g,onMouseLeave:f,onFocus:w,onBlur:S,"aria-describedby":a?c:void 0,children:r}),typeof document<"u"&&io.createPortal(b,document.body)]})}function We(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}const ce={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1"},ue={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2 sm:p-3",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"}},st={title:{hero:"text-lg sm:text-3xl font-bold",standard:"text-lg sm:text-base font-bold",compact:"text-sm sm:text-base font-bold",minimal:"text-sm sm:text-base font-bold",game:"text-lg sm:text-xl md:text-2xl font-bold",promo:"text-2xl sm:text-3xl md:text-4xl font-bold",social:"text-sm font-bold"},subtitle:"text-base sm:text-lg font-semibold",description:"text-sm",category:"text-xs font-semibold uppercase",metadata:"text-xs"};function jr(e){const r=e?.borderRadius||ce.borderRadius;return ue.borderRadius[r]}function hs(e){const r=e?.shadow||ce.shadow;return ue.shadow[r]}function fs(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ce.hoverShadow;return ue.hoverShadow[o]}function bs(e){const r=e?.padding||ce.padding;return ue.padding[r]}function js(e){const r=e?.borderWidth||ce.borderWidth;return ue.borderWidth[r]}function vs(e){return e?.borderColor||"border-border"}function U(e,r,o){return r?.typography?.[e]?r.typography[e]:e==="title"&&o&&o in st.title?st.title[o]:st[e]}function ws(e){const r=[jr(e),hs(e),fs(e),js(e),vs(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function ys(e){const r=[jr(e)];return e?.imageContainer&&r.push(e.imageContainer),r.filter(Boolean).join(" ")}function Ns(e){return e?.background||""}const Cs={standard:{imageAspectRatio:"16/9"},standardHorizontal:{imageAspectRatio:"16/9"},hero:{imageAspectRatio:"16/9"},minimal:{imageAspectRatio:"1/1"},promo:{imageAspectRatio:"16/9"}};function me(e,r="standard"){return A.useMemo(()=>{const o=Cs[r],s=e?.imageAspectRatio||o.imageAspectRatio;return{container:ws(e),imageContainer:ys(e),padding:bs(e),background:Ns(e),imageAspectRatio:s,typography:{title:U("title",e,r),subtitle:U("subtitle",e),description:U("description",e),category:U("category",e),metadata:U("metadata",e)},isHoverable:e?.hoverable??!0}},[e,r])}function vr({content:e,styles:r,primaryCta:o,secondaryCta:s,matchScore:a}){const n=e.image?.url,i=e.gradient||"linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)",{isClickable:l,handleClick:u}=We(e),c=me(r,"hero");return t.jsx("article",{className:d("dark group overflow-hidden",c.container,l&&"cursor-pointer"),onClick:u,children:t.jsxs("div",{className:d("relative overflow-hidden",c.background,c.imageContainer),style:{aspectRatio:c.imageAspectRatio},children:[n?t.jsx("img",{src:n,alt:e.image?.alt||e.title||"",className:"absolute inset-0 w-full h-full object-cover"}):t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}),n&&t.jsx("div",{className:"absolute inset-0 z-0",style:{background:i}}),t.jsx(pt,{badges:e.badges,positions:["top-left","top-right"]}),t.jsx("div",{className:d("absolute inset-0 flex flex-col justify-end z-10",c.padding),children:t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsx("div",{className:"flex-1"}),t.jsxs("div",{children:[a&&t.jsx("div",{className:"mb-1",children:a}),t.jsxs("div",{className:"hidden md:flex items-center justify-start space-x-3 ",children:[e.badges&&e.badges.filter(m=>m.position==="bottom-left").length>0&&t.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:e.badges.filter(m=>m.position==="bottom-left").map((m,g)=>t.jsx(gt,{badge:m},g))}),e.category&&t.jsx("div",{className:d(c.typography.category,"text-white/90 mb-2 uppercase tracking-wide"),children:e.category})]}),e.title&&t.jsxs("h3",{className:d(c.typography.title,"text-white mb-2",c.isHoverable&&"transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-black px-1 mr-2 mb-1 inline-block bg-white",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(c.typography.description,"text-white/90 mb-2 max-w-3xl hidden md:block line-clamp-2"),children:e.description}),e.metadata?.time&&t.jsx("div",{className:d(c.typography.metadata,"text-white/70"),children:e.metadata.time})]}),t.jsx(Ee,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}})]})})]})})}const ks=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ss=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,s)=>s?s.toUpperCase():o.toLowerCase()),Ht=e=>{const r=Ss(e);return r.charAt(0).toUpperCase()+r.slice(1)},wr=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim(),As=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Rs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ts=A.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:n,iconNode:i,...l},u)=>A.createElement("svg",{ref:u,...Rs,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:wr("lucide",a),...!n&&!As(l)&&{"aria-hidden":"true"},...l},[...i.map(([c,m])=>A.createElement(c,m)),...Array.isArray(n)?n:[n]]));const He=(e,r)=>{const o=A.forwardRef(({className:s,...a},n)=>A.createElement(Ts,{ref:n,iconNode:r,className:wr(`lucide-${ks(Ht(e))}`,`lucide-${e}`,s),...a}));return o.displayName=Ht(e),o};const Ls=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ms=He("check",Ls);const zs=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Is=He("circle-play",zs);const _s=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ps=He("minus",_s);const Ds=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Os=He("x",Ds),Bs={sm:"w-8 h-8 sm:w-10 sm:h-10",md:"w-12 h-12 sm:w-16 sm:h-16",lg:"w-16 h-16 sm:w-20 sm:h-20 md:w-24 md:h-24",xl:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32","2xl":"w-24 h-24 sm:w-32 sm:h-32 md:w-40 md:h-40","3xl":"w-32 h-32 sm:w-40 sm:h-40 md:w-48 md:h-48","4xl":"w-40 h-40 sm:w-48 sm:h-48 md:w-56 md:h-56","5xl":"w-48 h-48 sm:w-56 sm:h-56 md:w-64 md:h-64"};function yr({content:e,styles:r}){const o=r?.mainIconSize||"md",s=Bs[o];return r?.mainIcon?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx("div",{className:s,children:r.mainIcon})}):e.type==="video"?t.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20",children:t.jsx(Is,{className:d(s,"text-white opacity-90")})}):null}function Nr({imageUrl:e,alt:r,aspectRatio:o,imageContainerClasses:s,content:a,styles:n,showBadges:i=!0,badgePositions:l=["top-left","top-right","bottom-left","bottom-right"],fallbackGradient:u=!1}){return t.jsxs("div",{className:d("relative w-full",s),style:{aspectRatio:o},children:[e?t.jsx("img",{src:e,alt:r||a.title||"",className:"absolute inset-0 w-full h-full object-cover"}):u?t.jsx("div",{className:"absolute inset-0 bg-linear-to-br from-primary-600 to-primary-800"}):null,i&&t.jsx(pt,{badges:a.badges,positions:l}),t.jsx(yr,{content:a,styles:n})]})}function Cr({content:e,styles:r,isHoverable:o=!0,primaryCta:s,secondaryCta:a,ctaLayout:n="vertical",bettingOdds:i,matchScore:l}){const u=U("title",r,"compact"),c=U("category",r),m=U("description",r),g=U("metadata",r);return t.jsxs("div",{className:"flex flex-col justify-between h-full",children:[t.jsxs("div",{children:[l&&t.jsx("div",{className:"mb-1",children:l}),e.category&&t.jsx("div",{className:d(c,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u,"text-foreground mb-1",o&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("div",{className:"text-white px-1 mr-2 mb-1 inline-block bg-neutral-700",children:e.contextLabel}),t.jsx("div",{children:e.title})]}),e.description&&t.jsx("p",{className:d(m,"text-muted-foreground mb-2"),children:e.description}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",g),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),(s||a||i)&&t.jsxs("div",{className:"flex flex-col space-y-0",children:[(s||a)&&t.jsxs("div",{className:d("flex mt-4",n==="horizontal"?"flex-col sm:flex-row gap-2 sm:gap-3":"flex-col gap-2"),children:[s&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:s}),a&&t.jsx("div",{className:n==="horizontal"?"w-full sm:w-auto":"w-full",children:a})]}),i&&t.jsx("div",{className:s||a?"mt-2":"mt-4",children:i})]})]})}function kr({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=We(e),c=me(r,"standard");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx(Nr,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r}),t.jsx("div",{className:c.padding,children:t.jsx(Cr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n})})]})}function Es({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const i=e.image?.url,{isClickable:l,handleClick:u}=We(e),c=me(r,"standardHorizontal");return t.jsxs("article",{className:d("group bg-card text-card-foreground border-border overflow-hidden flex flex-col sm:flex-row",c.container,c.background,l&&"cursor-pointer"),onClick:u,children:[i&&t.jsx("div",{className:"relative w-full sm:w-2/5 shrink-0",children:t.jsx(Nr,{imageUrl:i,alt:e.image?.alt,aspectRatio:c.imageAspectRatio,imageContainerClasses:c.imageContainer,content:e,styles:r})}),t.jsx("div",{className:d("flex-1",c.padding),children:t.jsx(Cr,{content:e,styles:r,isHoverable:c.isHoverable,primaryCta:o,secondaryCta:s,ctaLayout:"horizontal",bettingOdds:a,matchScore:n})})]})}function Sr({content:e,styles:r,primaryCta:o,secondaryCta:s}){const a=e.coverImage?.url,n=!!e.gradient,i=e.textColor||"white",l=me(r,"promo");let u="",c={color:i};return l.background?u=l.background:a?c={backgroundImage:`url(${a})`,backgroundSize:"cover",backgroundPosition:"center",color:i}:n?c={background:e.gradient,color:i}:u="bg-gradient-to-br from-gray-500 to-gray-800",t.jsx("div",{className:d("dark overflow-hidden border-none",l.container),children:t.jsxs("div",{className:d(l.padding,u),style:c,children:[(e.image||e.subtitle)&&t.jsxs("div",{className:"flex flex-col md:flex-row md:justify-between md:items-center mb-4 gap-3",children:[e.image&&t.jsx("div",{className:"text-center md:text-left",children:t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"h-12 sm:h-12 my-4 w-auto inline-block"})}),e.subtitle&&t.jsx("div",{className:d(l.typography.subtitle,"opacity-80 text-center md:text-left"),children:e.subtitle})]}),t.jsxs("div",{className:"flex flex-col md:flex-row items-center md:items-end justify-between gap-6",children:[t.jsxs("div",{className:"flex-1 text-center md:text-left",children:[e.title&&t.jsx("h3",{className:d(l.typography.title,"mb-2"),children:e.title}),e.description&&t.jsx("p",{className:d(l.typography.description,"opacity-90 max-w-xl"),children:e.description}),e.metrics&&e.metrics.length>0&&t.jsx("div",{className:"flex gap-6 mt-4 justify-center md:justify-start",children:e.metrics.map((m,g)=>t.jsxs("div",{className:"text-center md:text-left",children:[t.jsx("div",{className:"text-2xl font-bold",children:m.value}),t.jsx("div",{className:"text-xs opacity-80",children:m.label})]},g))}),e.countdownTo&&t.jsx("div",{className:"mt-4 flex justify-center md:justify-start",children:t.jsx(br,{targetDate:e.countdownTo})})]}),(o||s||e.disclaimer)&&t.jsxs("div",{className:"flex flex-col items-center md:items-end gap-3 shrink-0",children:[t.jsx(Ee,{primaryCta:o,secondaryCta:s,layout:"horizontal"}),e.disclaimer&&t.jsx("p",{className:"text-xs opacity-70",children:e.disclaimer})]})]})]})})}function Ar({content:e,styles:r,primaryCta:o,secondaryCta:s,bettingOdds:a,matchScore:n}){const{isClickable:i,handleClick:l}=We(e),u=me(r,"minimal");return t.jsx("article",{className:d("group",u.container,i&&"cursor-pointer"),onClick:l,children:t.jsxs("div",{className:d("flex gap-3 sm:gap-4",u.padding,u.background),children:[e.image&&t.jsxs("div",{className:d("shrink-0 w-20 sm:w-24 overflow-hidden relative",u.imageContainer),style:{aspectRatio:u.imageAspectRatio},children:[t.jsx("img",{src:e.image.url,alt:e.image.alt||e.title||"",className:"w-full h-full object-cover"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx(yr,{content:e,styles:r})})]}),t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-between",children:[t.jsxs("div",{children:[n&&t.jsx("div",{className:"mb-2",children:n}),e.category&&t.jsx("div",{className:d(u.typography.category,"text-muted-foreground mb-1"),children:e.category}),e.title&&t.jsxs("h3",{className:d(u.typography.title,"text-foreground mb-1",u.isHoverable&&"group-hover:text-primary transition-colors"),children:[e.contextLabel&&t.jsx("span",{className:"text-white px-1 mr-1 mb-1 inline-block bg-neutral-700 rounded-sm",children:e.contextLabel}),e.title]}),(e.metadata?.author||e.metadata?.time)&&t.jsxs("div",{className:d("flex items-center gap-2 text-muted-foreground",u.typography.metadata),children:[e.metadata.author&&t.jsx("span",{children:e.metadata.author}),e.metadata.author&&e.metadata.time&&t.jsx("span",{children:"•"}),e.metadata.time&&t.jsx("span",{children:e.metadata.time})]})]}),t.jsxs("div",{children:[t.jsx(Ee,{primaryCta:o,secondaryCta:s,layout:"responsive",styles:{container:"mt-4"}}),a&&t.jsx("div",{className:"mt-2",children:a})]})]})]})})}function F({content:e,variant:r,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i}){switch(r||"standard"){case"hero":return t.jsx(vr,{content:e,styles:o,primaryCta:s,secondaryCta:a,matchScore:i});case"standardHorizontal":return t.jsx(Es,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"promo":return t.jsx(Sr,{content:e,styles:o,primaryCta:s,secondaryCta:a});case"minimal":return t.jsx(Ar,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i});case"standard":default:return t.jsx(kr,{content:e,styles:o,primaryCta:s,secondaryCta:a,bettingOdds:n,matchScore:i})}}const ae={borderRadius:"lg",shadow:"none",hoverShadow:"md",padding:"md",borderWidth:"1",logoSize:"md"},ie={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},hoverShadow:{none:"hover:shadow-none",sm:"hover:shadow-sm",md:"hover:shadow-md",lg:"hover:shadow-lg",xl:"hover:shadow-xl","2xl":"hover:shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}};function $s(e){const r=e?.borderRadius||ae.borderRadius;return ie.borderRadius[r]}function Gs(e){const r=e?.shadow||ae.shadow;return ie.shadow[r]}function Ws(e){if(!(e?.hoverable??!0))return"";const o=e?.hoverShadow||ae.hoverShadow;return ie.hoverShadow[o]}function Hs(e){const r=e?.padding||ae.padding;return ie.padding[r]}function Vs(e){const r=e?.borderWidth||ae.borderWidth;return ie.borderWidth[r]}function Us(e){return e?.borderColor||"border-border"}function Fs(e){const r=e?.logoSize||ae.logoSize;return ie.logoSize[r]}function Ys(e){const r=[$s(e),Gs(e),Ws(e),Vs(e),Us(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function G(e){return e?.main??null}function re(e){return e?.breakdown?.penalties?e.breakdown.penalties:null}const qs={inline:"xs",scoreCard:"md",scoreLine:"md",embedded:"sm"},Zs={inline:{teamName:"text-sm text-foreground",score:"text-lg font-bold text-foreground",status:"text-xs text-foreground/90",metadata:"text-xs text-foreground/90"},scoreCard:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},scoreLine:{teamName:"text-sm sm:text-base font-semibold",score:"text-xl sm:text-2xl font-bold",status:"text-xs sm:text-sm font-medium",metadata:"text-xs"},embedded:{teamName:"text-sm font-medium",score:"text-sm font-bold",status:"text-xs font-medium",metadata:"text-xs"}},Ks={inline:{borderWidth:"0",borderRadius:"none",shadow:"none",hoverable:!1},scoreCard:{},scoreLine:{},embedded:{borderWidth:"0",borderRadius:"none",shadow:"none",padding:"none",hoverable:!1}};function Ve(e,r="scoreCard"){return A.useMemo(()=>{const o=qs[r],s=e?.logoSize||o,n={...Ks[r],...e,logoSize:s},i=Zs[r];return{container:Ys(n),padding:Hs(n),background:n.background||(r==="inline"?"":"bg-card text-card-foreground"),logoSize:Fs(n),logoSizeValue:s,typography:{teamName:e?.typography?.teamName||i.teamName,score:e?.typography?.score||i.score,status:e?.typography?.status||i.status,metadata:e?.typography?.metadata||i.metadata},isHoverable:n.hoverable??!0}},[e,r])}function Ue(e){const r=!!(e.onClick||e.link),o=A.useCallback(()=>{e.onClick?e.onClick():e.link&&(window.location.href=e.link)},[e]);return{isClickable:r,handleClick:r?o:void 0}}function Rr({match:e,styles:r}){const o=Ve(r,"inline"),{isClickable:s,handleClick:a}=Ue(e),n=e.competitorTwo.shortName||e.competitorTwo.name,i=e.competitorOne.shortName||e.competitorOne.name,l=e.period?.label??((e.period?.current?` ${e.period.current}`:"")||e.status.toUpperCase());return t.jsxs("div",{className:d("inline-flex items-center gap-1.5",o.container,s&&"cursor-pointer hover:opacity-80"),onClick:a,children:[t.jsx("span",{className:o.typography.teamName,children:n}),e.competitorTwo.logo&&t.jsx("img",{src:e.competitorTwo.logo.url,alt:e.competitorTwo.name,className:d(o.logoSize,"object-contain rounded-full")}),G(e.competitorTwo.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(e.competitorTwo.score)}),t.jsx("span",{className:"mx-0.5 text-foreground",children:"-"}),G(e.competitorOne.score)!==null&&t.jsx("span",{className:o.typography.score,children:G(e.competitorOne.score)}),e.competitorOne.logo&&t.jsx("img",{src:e.competitorOne.logo.url,alt:e.competitorOne.name,className:d(o.logoSize,"object-contain rounded-full")}),t.jsx("span",{className:o.typography.teamName,children:i}),t.jsx("span",{className:d(o.typography.status,"ml-0.5"),children:l})]})}function _e({team:e,score:r,penaltyScore:o,isWinner:s,variant:a,classes:n,logoSize:i="md",align:l="left"}){return a==="scoreCard"?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx($,{name:e.name,imageUrl:e.logo?.url,subtitle:e.subtitle,styles:{container:"flex-1",imageSize:i,typography:{name:d("text-foreground",n.typography.teamName),subtitle:d("text-muted-foreground",n.typography.metadata)}}}),t.jsxs("div",{className:"flex items-center gap-2",children:[o!=null&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",s?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 font-bold":"text-muted-foreground"),children:o}),r!==null&&t.jsx("span",{className:d("text-foreground",n.typography.score),children:r})]})]}):t.jsx("div",{className:l==="right"?"justify-self-end":"justify-self-start",children:t.jsx($,{name:e.name,mobileName:e.shortName,imageUrl:e.logo?.url,subtitle:e.subtitle,orientation:l==="right"?"rtl":"ltr",styles:{imageSize:i,typography:{name:d("text-foreground",n.typography.teamName),subtitle:d("text-muted-foreground",n.typography.metadata)},gap:"2",textAlign:l==="right"?"right":"left"}})})}function Xs({competitorOneScore:e,competitorTwoScore:r,competitorOnePenalty:o,competitorTwoPenalty:s,winner:a,classes:n,isLive:i,liveIndicator:l,statusText:u,period:c}){const m=o!==null||s!==null;return t.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[m&&o!==null&&o!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:o}),e!==null&&t.jsx("span",{className:d("text-foreground",n.typography.score),children:e})]}),u?t.jsxs("div",{className:"flex flex-col items-center",children:[i&&l&&t.jsx("div",{className:d("w-2 h-2 rounded-full mb-1 animate-pulse",l.color||"bg-primary-500")}),t.jsx("span",{className:d(n.typography.status,"text-muted-foreground whitespace-nowrap"),children:u}),c?.current&&!i&&t.jsx("span",{className:d(n.typography.metadata,"text-muted-foreground"),children:c.current})]}):t.jsx("span",{className:d("text-muted-foreground",n.typography.score),children:"-"}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[r!==null&&t.jsx("span",{className:d("text-foreground",n.typography.score),children:r}),m&&s!==null&&s!==void 0&&t.jsx("span",{className:d("text-xs px-1.5 py-0.5 rounded",a==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:s})]})]})}function Tr({odds:e,operator:r,styles:o={}}){const{container:s="",padding:a="md",typography:n="md",mode:i="default",flashInterval:l=3e3}=o,[u,c]=A.useState(!0);A.useEffect(()=>{if(i!=="flash")return;const b=setInterval(()=>{c(h=>!h)},l);return()=>clearInterval(b)},[i,l]);const m=()=>{const b={none:"",sm:"px-1.5 py-1",md:"px-2 py-1.5",lg:"px-3 py-2"};return b[a]||b.md},g=()=>{const b={sm:"text-xs",md:"text-xs",lg:"text-sm"};return b[n]||b.md},f=b=>!b||b==="none"?null:t.jsx("span",{className:d("ml-0.5",b==="up"?"text-green-500":"text-red-500"),children:b==="up"?"↑":"↓"}),w=(b,h=!1)=>{const k=m(),R=g(),M=t.jsxs("div",{className:d("flex items-center cursor-pointer justify-between",R),children:[t.jsx("span",{className:"text-muted-foreground",children:b.label}),t.jsxs("span",{className:"font-bold",children:[b.value,f(b.change)]})]}),P=d(h?"":"flex-1","bg-muted hover:bg-muted/60 text-foreground rounded transition-colors",k),E=j=>{j.stopPropagation(),b.onClick&&(j.preventDefault(),b.onClick(b))};return b.url?t.jsx("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:P,onClick:E,children:M},b.label):t.jsx("button",{className:P,onClick:E,children:M},b.label)},S=b=>{b.stopPropagation(),r?.onClick&&(b.preventDefault(),r.onClick(r))},v=(b="")=>{if(!r)return null;const h=m();return t.jsx("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:d("flex items-center justify-center bg-muted/50 hover:bg-muted/70 rounded transition-colors",h,b),style:{backgroundColor:r.backgroundColor},onClick:S,children:r.logo?t.jsx("img",{src:r.logo.url,alt:r.name,className:"h-4 w-auto object-contain"}):t.jsx("span",{className:"text-xs font-semibold",style:{color:r.textColor},children:r.name})})},N=e.length>3;return i==="flash"?t.jsx("div",{className:d(N?"space-y-1":"flex gap-1",s),children:u&&r?v("flex-1"):N?t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))}):t.jsx(t.Fragment,{children:e.map(b=>w(b,!1))})}):N?t.jsxs("div",{className:d("space-y-1",s),children:[v(),t.jsx("div",{className:"grid grid-cols-3 gap-1",children:e.map(b=>w(b,!0))})]}):t.jsxs("div",{className:d("flex gap-1",s),children:[v("w-full max-w-[110px]"),e.map(b=>w(b,!1))]})}function Lr({match:e,styles:r,primaryCta:o,secondaryCta:s}){const a=Ve(r,"scoreCard"),{isClickable:n,handleClick:i}=Ue(e),l=e.status==="live",u=!!e.odds,c=o||s,m=re(e.competitorOne.score),g=re(e.competitorTwo.score),f=e.metadata?.winner;return t.jsx("article",{className:d(a.background,a.container,n&&"cursor-pointer"),onClick:i,children:t.jsxs("div",{className:a.padding,children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l&&e.liveIndicator?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse",e.liveIndicator.color||"bg-primary-500")}),t.jsx("span",{className:d("text-foreground",a.typography.status),children:"LIVE"})]}):t.jsx("span",{className:d("text-foreground py-1",a.typography.status),children:e.period?.label||e.metadata?.time||""}),l&&e.period?.current&&t.jsx("span",{className:d("text-foreground",a.typography.metadata),children:e.period.current})]}),t.jsxs("div",{className:d("space-y-2",!!(u||c)&&"mb-3"),children:[t.jsx(_e,{team:e.competitorOne,score:G(e.competitorOne.score),penaltyScore:m,isWinner:f==="competitorOne",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue}),t.jsx(_e,{team:e.competitorTwo,score:G(e.competitorTwo.score),penaltyScore:g,isWinner:f==="competitorTwo",variant:"scoreCard",classes:a,logoSize:a.logoSizeValue})]}),u&&t.jsx("div",{className:d("pt-2 border-t border-border",!!c&&"mb-3"),children:t.jsx(Tr,{odds:e.odds.odds,operator:e.odds.operator,label:e.odds.label,styles:{padding:r?.padding==="xl"?"lg":r?.padding}})}),c&&t.jsx("div",{className:"pt-2 border-t border-border",children:t.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[o,s]})})]})})}function Mr({match:e,styles:r}){const o=Ve(r,"scoreLine"),{isClickable:s,handleClick:a}=Ue(e),n=e.status==="live",i=n&&e.period?.current?e.period.current:e.period?.label||e.status.toUpperCase(),l=re(e.competitorOne.score),u=re(e.competitorTwo.score),c=e.metadata?.winner;return t.jsx("article",{className:d(o.background,o.container,s&&"cursor-pointer",o.isHoverable&&"transition-opacity hover:opacity-90"),onClick:a,children:t.jsxs("div",{className:d(o.padding,"grid grid-cols-[1fr_auto_1fr] items-center gap-4"),children:[t.jsx(_e,{team:e.competitorOne,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue}),t.jsx(Xs,{competitorOneScore:G(e.competitorOne.score),competitorTwoScore:G(e.competitorTwo.score),competitorOnePenalty:l,competitorTwoPenalty:u,winner:c,classes:o,isLive:n,liveIndicator:e.liveIndicator,statusText:i,period:e.period}),t.jsx(_e,{team:e.competitorTwo,score:null,variant:"scoreLine",classes:o,logoSize:o.logoSizeValue,align:"right"})]})})}const Qs={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg","2xl":"xl","3xl":"2xl"},Vt={square:"sm",round:"full"};function Js(e,r){switch(e.status){case"scheduled":return e.metadata?.date||"-";case"live":return e.period?.current||"LIVE";case"final":return r==="date"?e.metadata?.date||e.period?.label||"FT":e.period?.label||"FT";case"postponed":return"PPD";case"cancelled":return"CAN";case"suspended":return"SUS";default:return e.period?.label||"-"}}function en({match:e,styles:r}){const o=Ve(r,"embedded"),{isClickable:s,handleClick:a}=Ue(e),n=e.status==="live",i=e.liveIndicator?.color||"bg-red-500",l=G(e.competitorOne.score),u=G(e.competitorTwo.score),c=re(e.competitorOne.score),m=re(e.competitorTwo.score),g=c!==null||m!==null,f=e.metadata?.winner,w=e.status==="scheduled",S=e.metadata?.time||e.period?.label||"-",v=Js(e,r?.finishedStatusDisplay),N=r?.statusColumnWidth||"w-[60px]",b=r?.typography?.status||"text-xs font-medium",h=Qs[r?.logoSize||"md"],k=Vt[e.competitorOne.logoShape||"square"],R=Vt[e.competitorTwo.logoShape||"square"],M={imageSize:h,gap:"2",typography:{name:o.typography.teamName}};return t.jsxs("article",{className:d("flex items-center w-full",o.padding,s&&"cursor-pointer",r?.container),onClick:a,children:[t.jsxs("div",{className:d("shrink-0 flex items-center justify-start gap-1.5",N,b,n?"text-danger":"text-muted-foreground"),children:[n&&t.jsx("div",{className:d("w-2 h-2 rounded-full animate-pulse shrink-0",i)}),t.jsx("span",{children:v})]}),t.jsxs("div",{className:"flex-1 flex items-center justify-center min-w-0",children:[t.jsx("div",{className:"flex-1 min-w-0 flex justify-end",children:t.jsx($,{name:e.competitorOne.name,imageUrl:e.competitorOne.logo?.url,orientation:"rtl",truncate:!0,styles:{...M,imageBorderRadius:k,textAlign:"right"}})}),t.jsx("div",{className:"shrink-0 px-3 text-center min-w-[70px]",children:w?t.jsx("span",{className:d(o.typography.score,"text-muted-foreground"),children:S}):t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[g&&c!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",f==="competitorOne"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:c}),t.jsxs("span",{className:d(o.typography.score,n&&"text-danger"),children:[l," - ",u]}),g&&m!==null&&t.jsx("span",{className:d("text-[10px] px-1 py-0.5 rounded",f==="competitorTwo"?"bg-muted-foreground text-muted font-bold":"bg-muted text-muted-foreground"),children:m})]})}),t.jsx("div",{className:"flex-1 min-w-0 flex justify-start",children:t.jsx($,{name:e.competitorTwo.name,imageUrl:e.competitorTwo.logo?.url,orientation:"ltr",truncate:!0,styles:{...M,imageBorderRadius:R,textAlign:"left"}})})]})]})}function O({match:e,variant:r,styles:o,primaryCta:s,secondaryCta:a}){switch(r||"scoreCard"){case"inline":return t.jsx(Rr,{match:e,styles:o});case"scoreLine":return t.jsx(Mr,{match:e,styles:o});case"embedded":return t.jsx(en,{match:e,styles:o});case"scoreCard":default:return t.jsx(Lr,{match:e,styles:o,primaryCta:s,secondaryCta:a})}}const ge={borderRadius:"lg",shadow:"none",padding:"md",borderWidth:"1",logoSize:"md"},pe={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},shadow:{none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},padding:{none:"p-0",sm:"p-2",md:"p-3 sm:p-4",lg:"p-4 sm:p-6",xl:"p-6 sm:p-8"},borderWidth:{0:"border-0",1:"border",2:"border-2",4:"border-4",8:"border-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12","2xl":"w-16 h-16","3xl":"w-20 h-20"}},tn={header:"text-xs uppercase font-bold text-muted-foreground",cell:"text-sm text-foreground",disclaimer:"text-xs text-muted-foreground",legend:"text-xs text-muted-foreground"};function rn(e){const r=e?.borderRadius||ge.borderRadius;return pe.borderRadius[r]}function on(e){const r=e?.shadow||ge.shadow;return pe.shadow[r]}function sn(e){const r=e?.padding||ge.padding;return pe.padding[r]}function nn(e){const r=e?.borderWidth||ge.borderWidth;return pe.borderWidth[r]}function an(e){return e?.borderColor||"border-border"}function ln(e){const r=e?.logoSize||ge.logoSize;return pe.logoSize[r]}function Le(e,r){return r?.typography?.[e]?r.typography[e]:tn[e]}function dn(e){return e?.background||"bg-card"}function cn(e){const r=[rn(e),on(e),nn(e),an(e),dn(e)];return e?.container&&r.push(e.container),r.filter(Boolean).join(" ")}function un(e){return A.useMemo(()=>({container:cn(e),padding:sn(e),logoSize:ln(e),typography:{header:Le("header",e),cell:Le("cell",e),disclaimer:Le("disclaimer",e),legend:Le("legend",e)},table:e?.table||"",headerRow:e?.headerRow||"",bodyRow:e?.bodyRow||"",legendContainer:e?.legendContainer||"",isHoverable:e?.hoverable??!0}),[e])}function mn(e){switch(e){case"center":return"text-center";case"right":return"text-right";case"left":default:return"text-left"}}function Ut(e){switch(e){case"none":return"0";case"xs":return"28px";case"sm":return"36px";case"md":return"48px";case"lg":return"96px";case"xl":return"128px";case"2xl":return"160px";case"3xl":return"192px";case"4xl":return"256px";case"flex":return"1fr";case"auto":default:return"auto"}}function zr(e){return typeof e=="object"&&e!==null&&("mobile"in e||"desktop"in e)}function ut(e,r){return e.filter(o=>zr(o.width)?(r==="mobile"?o.width.mobile:o.width.desktop)!=="none":o.width!=="none")}function Ft(e,r){const o=["4px"];return ut(e,r).forEach(a=>{if(zr(a.width)){const n=r==="mobile"?a.width.mobile:a.width.desktop;o.push(Ut(n))}else o.push(Ut(a.width))}),o.join(" ")}function Me(e){const r=mn(e.align);return e.key==="entity"||e.key==="team"||e.key==="player"||e.key==="user"?d("flex items-center gap-1 min-w-0",e.className):d(r,e.className)}function gn({columns:e,rows:r,legend:o,showLegend:s,disclaimer:a,description:n,styles:i,onRowClick:l,filterRowIds:u}){const c=un(i),m=A.useMemo(()=>{if(!u||u.length===0)return r;const h=new Set(u);return r.filter(k=>h.has(k.id))},[r,u]),g=A.useMemo(()=>{if(o)return o;const h=new Map;return m.forEach(k=>{if(k.zone){const R=`${k.zone.color}-${k.zone.label}`;h.has(R)||h.set(R,{color:k.zone.color,label:k.zone.label})}}),Array.from(h.values())},[m,o]),f=s!==void 0?s:g.length>0,w=A.useMemo(()=>ut(e,"mobile"),[e]),S=A.useMemo(()=>ut(e,"desktop"),[e]),v=A.useMemo(()=>Ft(e,"mobile"),[e]),N=A.useMemo(()=>Ft(e,"desktop"),[e]),b=i?.container||c.container;return t.jsx("div",{className:b,children:t.jsxs("div",{className:c.padding,children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("ul",{className:c.table,children:[t.jsxs("li",{className:d("md:hidden grid items-center gap-1 border-b border-border pb-3",c.headerRow),style:{gridTemplateColumns:v},children:[t.jsx("div",{"aria-label":"Zone"}),w.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.key))]}),t.jsxs("li",{className:d("hidden md:grid items-center gap-1 border-b border-border pb-3 lg:px-2",c.headerRow),style:{gridTemplateColumns:N},children:[t.jsx("div",{"aria-label":"Zone"}),S.map(h=>t.jsx("div",{className:d(c.typography.header,Me(h)),children:h.header},h.key))]}),m.map(h=>t.jsxs("li",{className:d("relative border-b border-border last:border-0",h.highlight&&"bg-muted",c.isHoverable&&l&&"hover:bg-muted/50 cursor-pointer transition-colors",c.bodyRow),onClick:()=>l?.(h),children:[h.zone&&t.jsx("div",{className:d("absolute left-0 top-0 bottom-0 w-1 rounded-r-sm",h.zone.color)}),t.jsxs("div",{className:"md:hidden grid items-center gap-1 py-3 pl-2",style:{gridTemplateColumns:v},children:[t.jsx("div",{}),w.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]}),t.jsxs("div",{className:"hidden md:grid items-center gap-1 py-3 lg:px-2 pl-2",style:{gridTemplateColumns:N},children:[t.jsx("div",{}),S.map(k=>t.jsx("div",{className:d(c.typography.cell,Me(k)),children:k.render?k.render(h[k.key],h):h[k.key]},k.key))]})]},h.id))]})}),n&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:n}),f&&g.length>0&&t.jsx("div",{className:d("mt-4 flex flex-wrap gap-4",c.legendContainer),children:g.map((h,k)=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:d("w-3 h-4 rounded-sm",h.color)}),t.jsx("span",{className:c.typography.legend,children:h.label})]},k))}),a&&t.jsx("div",{className:d("mt-4",c.typography.disclaimer),children:a})]})})}const Fe={borderRadius:"md",padding:"md",alignment:"left",background:"bg-muted"},X={borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl"},padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},alignment:{left:"text-left items-start",center:"text-center items-center",right:"text-right items-end"},gap:{none:"gap-0",xs:"gap-0.5",sm:"gap-1",md:"gap-2",lg:"gap-4",xl:"gap-6"},colsMobile:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},colsTablet:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",8:"md:grid-cols-8",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},colsDesktop:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",8:"lg:grid-cols-8",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},pn={default:{value:"text-2xl font-bold text-foreground",label:"text-xs font-medium text-foreground uppercase",secondaryLabel:"text-xs text-foreground"},stacked:{value:"text-2xl font-bold text-foreground",label:"text-[10px] font-medium text-foreground uppercase tracking-wider",secondaryLabel:"text-xs text-foreground"},horizontal:{value:"text-lg font-bold text-foreground",label:"text-sm text-foreground",secondaryLabel:"text-xs text-foreground"}};function xn(e){const r=e?.borderRadius||Fe.borderRadius;return X.borderRadius[r]}function hn(e){const r=e?.padding||Fe.padding;return X.padding[r]}function jt(e){const r=e?.alignment||Fe.alignment;return X.alignment[r]}function fn(e){return e?.background||Fe.background}function te(e,r,o){return r?.typography?.[e]?r.typography[e]:pn[o||"default"][e]}function bn(e){const r=e?.colsMobile||2,o=e?.colsTablet||3,s=e?.colsDesktop||3,a=e?.gap||"sm";return["grid",X.colsMobile[r],X.colsTablet[o],X.colsDesktop[s],X.gap[a]].join(" ")}function Ir(e){return[xn(e),hn(e),fn(e),jt(e),"flex flex-col"].join(" ")}function jn(e,r,o){return A.useMemo(()=>({grid:bn(e),item:{container:Ir(r),alignment:jt(r),typography:{value:te("value",r,o),label:te("label",r,o),secondaryLabel:te("secondaryLabel",r,o)}}}),[e,r,o])}function vt(e,r){return A.useMemo(()=>({container:Ir(e),alignment:jt(e),typography:{value:te("value",e,r),label:te("label",e,r),secondaryLabel:te("secondaryLabel",e,r)}}),[e,r])}function _r({item:e,styles:r}){const o=vt(r,"default"),s=o.container;return t.jsxs("div",{className:s,children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:o.typography.label,children:e.label})]}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function Pr({item:e,styles:r}){const o=vt(r,"stacked"),s=o.container;return t.jsxs("div",{className:s,children:[e.icon&&t.jsx("div",{className:"mb-2",children:e.icon}),t.jsx("div",{className:d("mb-2",o.typography.label),children:e.label}),t.jsx("div",{className:o.typography.value,children:e.value}),e.secondaryLabel&&t.jsx("div",{className:d("mt-1",o.typography.secondaryLabel),children:e.secondaryLabel})]})}function Dr({item:e,styles:r,orientation:o="ltr"}){const s=vt(r,"horizontal"),a=s.container,n=o==="ltr"?"items-start":"items-end",i=t.jsxs("div",{className:d("flex flex-col gap-1",n),children:[e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),t.jsx("span",{className:s.typography.label,children:e.label}),e.secondaryLabel&&t.jsx("div",{className:s.typography.secondaryLabel,children:e.secondaryLabel})]}),l=t.jsx("div",{className:s.typography.value,children:e.value});return t.jsx("div",{className:a,children:t.jsx("div",{className:"flex items-center justify-between gap-4 w-full",children:o==="ltr"?t.jsxs(t.Fragment,{children:[i,l]}):t.jsxs(t.Fragment,{children:[l,i]})})})}function Or({item:e,styles:r,variant:o="default",orientation:s}){const a={item:e,styles:r};switch(o){case"stacked":return t.jsx(Pr,{...a});case"horizontal":return t.jsx(Dr,{...a,orientation:s});default:return t.jsx(_r,{...a})}}function Q({items:e=[],itemVariant:r="default",itemOrientation:o,styles:s}){const{container:a="",grid:n,item:i}=s||{},l=jn(n,i,r),u=a||l.grid;return t.jsx("div",{className:u,children:e.map(c=>t.jsx(Or,{item:c,styles:i,variant:r,orientation:o},c.id))})}const Ye={padding:"none",itemSpacing:"md",borderRadius:"none",background:""},qe={leftBarColor:"bg-green-500",rightBarColor:"bg-blue-500",height:"md",borderRadius:"sm"},xe={padding:{none:"p-0",sm:"p-2",md:"p-4",lg:"p-6",xl:"p-8"},itemSpacing:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},barHeight:{xs:"h-1",sm:"h-1.5",md:"h-2",lg:"h-3"},barBorderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},vn={bar:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"},comparison:{label:"text-sm font-medium text-foreground",leftValue:"text-sm font-semibold text-foreground",rightValue:"text-sm font-semibold text-foreground"}};function wn(e){const r=e?.padding||Ye.padding;return xe.padding[r]}function yn(e){const r=e?.itemSpacing||Ye.itemSpacing;return xe.itemSpacing[r]}function Nn(e){const r=e?.borderRadius||Ye.borderRadius;return xe.borderRadius[r]}function Cn(e){return e?.background||Ye.background}function Br(e){const r=e?.height||qe.height;return xe.barHeight[r]}function Er(e){const r=e?.borderRadius||qe.borderRadius;return xe.barBorderRadius[r]}function $r(e){return e?.leftBarColor||qe.leftBarColor}function Gr(e){return e?.rightBarColor||qe.rightBarColor}function nt(e,r,o="comparison"){return r?.typography?.[e]?r.typography[e]:vn[o][e]}function kn(e){return["flex flex-col",wn(e),yn(e),Nn(e),Cn(e)].filter(Boolean).join(" ")}function wt(e,r="comparison"){return A.useMemo(()=>{const o=e?.bar;return{container:kn(e),typography:{label:nt("label",e,r),leftValue:nt("leftValue",e,r),rightValue:nt("rightValue",e,r)},bar:{height:Br(o),borderRadius:Er(o),leftBarColor:$r(o),rightBarColor:Gr(o)}}},[e,r])}function Wr(e,r){return A.useMemo(()=>{const o={...e,...r};return{height:Br(o),borderRadius:Er(o),leftBarColor:$r(o),rightBarColor:Gr(o)}},[e,r])}function Hr({item:e,styles:r}){const o=wt(r,"bar"),s=Wr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex w-full overflow-hidden gap-0.5",children:[t.jsx("div",{className:d(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`}}),t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`}})]})]})}function Vr({item:e,styles:r}){const o=wt(r,"comparison"),s=Wr(r?.bar,e.barStyles),a=typeof e.leftValue=="number"?e.leftValue:parseFloat(String(e.leftValue))||0,n=typeof e.rightValue=="number"?e.rightValue:parseFloat(String(e.rightValue))||0,i=a+n,l=i>0?a/i*100:50,u=i>0?n/i*100:50,c=e.leftDisplay??String(e.leftValue),m=e.rightDisplay??String(e.rightValue);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-1",children:[t.jsx("span",{className:d(o.typography.leftValue,"w-12"),children:c}),t.jsxs("div",{className:"flex items-center justify-center gap-1 flex-1",children:[t.jsx("span",{className:o.typography.label,children:e.label}),e.icon&&t.jsx("span",{className:"shrink-0",children:e.icon}),e.description&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",e.description,")"]})]}),t.jsx("span",{className:d(o.typography.rightValue,"w-12 text-right"),children:m})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("div",{className:d("flex-1 flex justify-end bg-muted",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.leftBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${l}%`,minWidth:"2px"}})}),t.jsx("div",{className:d("flex-1 flex justify-start bg-muted",s.height,s.borderRadius),children:t.jsx("div",{className:d(s.rightBarColor,s.height,s.borderRadius,"transition-all duration-300"),style:{width:`${u}%`,minWidth:"2px"}})})]})]})}function Ur({item:e,styles:r}){const o={item:e,styles:r};switch(e.variant){case"bar":return t.jsx(Hr,{...o});case"comparison":default:return t.jsx(Vr,{...o})}}function yt({items:e=[],styles:r}){const o=wt(r,"comparison"),s=r?.container||o.container;return t.jsx("div",{className:s,children:e.map(a=>t.jsx(Ur,{item:a,styles:r},a.id))})}const Nt={win:"W",draw:"D",loss:"L",vs:"vs"};function Sn(e,r={}){const o={...Nt,...r};switch(e){case"W":return o.win;case"D":return o.draw;case"L":return o.loss}}function An(e){switch(e){case"W":return"bg-green-600";case"D":return"bg-gray-500";case"L":return"bg-red-500"}}function Rn(e){switch(e){case"W":return t.jsx(Ms,{height:13,width:13,strokeWidth:3,color:"#fff"});case"D":return t.jsx(Ps,{height:13,width:13,strokeWidth:3,color:"#fff"});case"L":return t.jsx(Os,{height:13,width:13,strokeWidth:3,color:"#fff"});default:return null}}function Ct(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorTwo;if(String(e.competitorTwo?.id)===String(r))return e.competitorOne}return e.competitorTwo}function Tn(e,r){if(r!==void 0){if(String(e.competitorOne?.id)===String(r))return e.competitorOne;if(String(e.competitorTwo?.id)===String(r))return e.competitorTwo}return e.competitorOne}function Ln(e,r){return Ct(e,r)?.name||"Unknown"}function Fr(e,r){const o=Tn(e,r),s=Ct(e,r);if(o?.score!==void 0&&s?.score!==void 0)return`${o.score}-${s.score}`}function Yr(e,r,o={}){const s={...Nt,...o},a=[],n=Ln(e,r);a.push(`${s.vs} ${n}`);const i=Fr(e,r);return i&&a.push(i),e.date&&a.push(e.date),a.length===0?e.outcome==="W"?"Win":e.outcome==="D"?"Draw":"Loss":a.join(" • ")}const ze={size:{xs:"w-4 h-4",sm:"w-5 h-5",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-10 h-10"},borderRadius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"},textSize:{xs:"text-xs",sm:"text-sm",md:"text-base",lg:"text-lg"},fontWeight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}};function Mn({form:e,teamId:r,maxItems:o=5,labels:s,matchSeparator:a,styles:n,onClick:i}){const l=e.slice(-o),u=s&&(s.win||s.draw||s.loss),c=(v,N)=>{if(i){const b=e.length-l.length+N;i(v,b)}},m=n?.container||"",g=ze.size[n?.indicator?.size||"sm"],f=ze.borderRadius[n?.indicator?.borderRadius||"full"],w=ze.textSize[n?.indicator?.textSize||"xs"],S=ze.fontWeight[n?.indicator?.fontWeight||"bold"];return t.jsx("div",{className:d("flex items-center gap-1 justify-end",m),children:l.map((v,N)=>{const b=N===0,h=N===l.length-1,k=t.jsx("div",{className:d("flex items-center justify-center",g,f,An(v.outcome),i&&"cursor-pointer hover:opacity-80 transition-opacity"),onClick:()=>c(v,N),children:u?t.jsx("span",{className:d("text-white leading-none",w,S),children:Sn(v.outcome,s)}):Rn(v.outcome)}),M=v.competitorOne?.score!==void 0||v.competitorTwo?.score!==void 0||v.date!==void 0?t.jsx(de,{content:Yr(v,r,s),position:"top",children:k}):k;return t.jsxs(A.Fragment,{children:[a==="last"&&h&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"}),M,a==="first"&&b&&l.length>1&&t.jsx("div",{className:"h-5 w-px bg-border mx-0.5","aria-hidden":"true"})]},N)})})}function zn(e){switch(e){case"W":return"border-t-green-600";case"D":return"border-t-gray-400";case"L":return"border-t-red-500"}}function In(e){switch(e){case"W":return"bg-green-600 text-white";case"D":return"bg-gray-400 text-white";case"L":return"bg-red-500 text-white"}}const at={win:"WIN",draw:"DRAW",loss:"LOSS"};function _n(e,r){switch(e){case"W":return r?.win||at.win;case"D":return r?.draw||at.draw;case"L":return r?.loss||at.loss}}const it={gap:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},logoSize:{xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10",xl:"w-12 h-12"},layout:{scroll:"flex overflow-x-auto",grid:"grid",responsive:"flex md:grid overflow-x-auto md:overflow-visible"}},lt={badge:"text-xs font-semibold uppercase",score:"text-lg font-semibold",date:"text-xs mt-2"};function Pn({form:e,teamId:r,maxItems:o=5,labels:s,layout:a,styles:n,onClick:i}){const l=e.slice(-o),u=(R,M)=>{if(i){const P=e.length-l.length+M;i(R,P)}},c=R=>{if(r!==void 0){if(String(R.competitorOne?.id)===String(r))return{ourTeam:R.competitorOne,opponent:R.competitorTwo};if(String(R.competitorTwo?.id)===String(r))return{ourTeam:R.competitorTwo,opponent:R.competitorOne}}return{ourTeam:R.competitorOne,opponent:R.competitorTwo}},m=n?.container||"",g=it.gap[n?.gap||"3"],f=it.logoSize[n?.logoSize||"md"],w=n?.typography?.badge||lt.badge,S=n?.typography?.score||lt.score,v=n?.typography?.date||lt.date,N=a||n?.layout||"scroll",b=it.layout[N],h=()=>N==="scroll"?"shrink-0":N==="grid"?"min-w-0":"shrink-0 md:shrink md:min-w-0",k=N==="scroll"?void 0:{gridTemplateColumns:`repeat(${l.length}, minmax(0, 1fr))`};return t.jsx("div",{className:d("items-start",b,g,m),style:k,children:l.map((R,M)=>{const{date:P,outcome:E}=R,{ourTeam:j,opponent:_}=c(R),ve=j.score??"-",we=_.score??"-";return t.jsx("div",{className:d("flex flex-col items-center gap-1",h()),children:t.jsxs("div",{className:d("flex flex-col items-center gap-2 px-4 py-3","bg-card border border-border rounded-md border-t-4",zn(E),i&&"cursor-pointer hover:bg-muted/50 transition-colors"),onClick:()=>u(R,M),children:[t.jsx("span",{className:d("px-3 py-0.5 rounded-full",w,In(E)),children:_n(E,s)}),t.jsxs("div",{className:d("flex items-center gap-2 text-foreground",S),children:[t.jsx("span",{children:ve}),t.jsx("span",{className:"text-muted-foreground",children:"-"}),t.jsx("span",{children:we})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(de,{content:j.name,children:j.image?t.jsx("img",{src:j.image,alt:j.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:j.name.charAt(0)})}),t.jsx(de,{content:_.name,children:_.image?t.jsx("img",{src:_.image,alt:_.name,className:d(f,"object-contain")}):t.jsx("div",{className:d(f,"bg-muted rounded-full flex items-center justify-center text-xs text-muted-foreground"),children:_.name.charAt(0)})})]}),P&&t.jsx("span",{className:d(v,"text-muted-foreground"),children:P})]})},R.matchId)})})}const Dn=e=>{switch(e){case"W":return"text-green-600 dark:text-green-400";case"L":return"text-red-600 dark:text-red-400";case"D":default:return"text-gray-500 dark:text-gray-400"}},On=(e,r)=>{const o=Ct(e,r);return o?.name?o.shortName||o.name.substring(0,3).toUpperCase():"???"};function Bn({form:e,teamId:r,maxItems:o=5,labels:s,styles:a,onClick:n}){const i=e.slice(-o),{container:l=""}=a||{},u=(c,m)=>{if(n){const g=e.length-i.length+m;n(c,g)}};return t.jsx("div",{className:d("overflow-x-auto",l),children:t.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${i.length}, minmax(48px, 1fr))`,minWidth:"100%"},children:i.map((c,m)=>{const g=t.jsxs("div",{className:d("flex flex-col items-center py-2 px-1 bg-muted rounded-lg",n?"cursor-pointer hover:bg-muted/80":"cursor-default"),onClick:()=>u(c,m),children:[t.jsx("span",{className:d("text-sm font-bold",Dn(c.outcome)),children:Fr(c,r)||"?-?"}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:On(c,r)})]});return c.competitorOne?.name!==void 0||c.competitorTwo?.name!==void 0||c.date!==void 0?t.jsx(de,{content:Yr(c,r,s),position:"top",children:g},m):t.jsx("div",{children:g},m)})})})}function he({variant:e="embedded",...r}){switch(e){case"detailed":return t.jsx(Pn,{...r});case"scoreCards":return t.jsx(Bn,{...r});case"embedded":default:return t.jsx(Mn,{...r})}}const En={0:"p-0",2:"p-2",3:"p-3",4:"p-4",6:"p-6",8:"p-8"},$n={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Gn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function fe({entity:e,primaryCta:r,secondaryCta:o,layout:s="horizontal",ctaLayout:a="responsive",styles:n}){const{container:i="",background:l="",padding:u="4",borderRadius:c="none",ctaGap:m="2"}=n||{},g=En[u],f=$n[c],w=Gn[m],S=r||o,v={inline:"flex flex-row items-center",stacked:"flex flex-col",responsive:"flex flex-col sm:flex-row sm:items-center"},N={inline:"flex flex-row items-center justify-between gap-4",stacked:"flex flex-col gap-4",responsive:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"};return s==="stacked"?t.jsxs("div",{className:d("flex flex-col items-center text-center gap-4",g,f,l,i),children:[t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d("object-contain",Wn(e.styles?.imageSize),Hn(e.styles?.imageBorderRadius),e.styles?.imageBorder)}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("span",{className:e.styles?.typography?.name||"font-semibold",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-xs text-muted-foreground",children:e.subtitle})]})]}),S&&t.jsxs("div",{className:d("flex flex-col items-center",w),children:[r,o]})]}):t.jsxs("div",{className:d(N[a],g,f,l,i),children:[t.jsx($,{...e}),S&&t.jsxs("div",{className:d(v[a],w,"shrink-0"),children:[r,o]})]})}const Yt={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 h-24","2xl":"w-32 h-32","3xl":"w-40 h-40"},qt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Wn(e){return Yt[e]||Yt.md}function Hn(e){return qt[e]||qt.none}const Vn={2:"gap-2",3:"gap-3",4:"gap-4",6:"gap-6",8:"gap-8"},Un={xs:"w-8 h-8",sm:"w-12 h-12",md:"w-16 h-16",lg:"w-20 h-20",xl:"w-24 w-24","2xl":"w-28 h-28","3xl":"w-32 h-32"},Fn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"};function Yn(e){const r=Un[e?.imageSize||"lg"],o=e?.imageBorderRadius?Fn[e.imageBorderRadius]:"",s=e?.imageBorder||"";return d(r,o,s)}function Zt({entity:e}){return t.jsxs("div",{className:"flex-1 flex flex-col items-center text-center",children:[e.imageUrl&&t.jsx("img",{src:e.imageUrl,alt:e.name,className:d(Yn(e.styles),"object-contain mb-3")}),t.jsx("span",{className:e.styles?.typography?.name||"text-lg font-semibold text-white",children:e.name}),e.subtitle&&t.jsx("span",{className:e.styles?.typography?.subtitle||"text-sm text-white/70",children:e.subtitle})]})}function Kt({content:e,typography:r}){return t.jsx("div",{className:"shrink-0",children:typeof e=="string"?t.jsx("span",{className:r,children:e}):e})}function kt({leftEntity:e,rightEntity:r,centerContent:o,variant:s="inline",styles:a,leftBackground:n="",rightBackground:i="",overlay:l=""}){const{container:u="",background:c="",gap:m="4",centerTypography:g="text-sm text-muted-foreground font-medium"}=a||{},f=Vn[m];if(s==="stacked")return t.jsxs("div",{className:d("relative overflow-hidden rounded-xl",u),children:[t.jsxs("div",{className:"absolute inset-0 flex",children:[t.jsx("div",{className:d("flex-1",n)}),t.jsx("div",{className:d("flex-1",i)})]}),l&&t.jsx("div",{className:d("absolute inset-0",l)}),t.jsxs("div",{className:d("relative z-10 flex items-center justify-between px-8 py-6",f),children:[t.jsx(Zt,{entity:e}),o&&t.jsx(Kt,{content:o,typography:g}),t.jsx(Zt,{entity:r})]})]});const w={...e,orientation:"rtl",styles:{...e.styles,textAlign:"right"}},S={...r,orientation:"ltr",styles:{...r.styles,textAlign:"left"}};return t.jsxs("div",{className:d("flex items-center justify-between",f,c,u),children:[t.jsx("div",{className:"flex-1 flex justify-end",children:t.jsx($,{...w})}),o&&t.jsx(Kt,{content:o,typography:g}),t.jsx("div",{className:"flex-1 flex justify-start",children:t.jsx($,{...S})})]})}const qn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function T({entity:e,primaryCta:r,secondaryCta:o,styles:s}){const a=s?.ctaGap||"2",n=s?.container||"",i=qn[a];return r||o?t.jsxs("div",{className:d("flex items-center justify-between gap-4",n),children:[t.jsx($,{...e}),t.jsxs("div",{className:d("flex items-center shrink-0",i),children:[r,o]})]}):t.jsx("div",{className:n,children:t.jsx($,{...e})})}const Zn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},qr={left:"text-left",center:"text-center",right:"text-right"},Kn={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Zr(e){const r=e?.borderRadius?Zn[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Kr(e){return qr[e?.titlePosition||"left"]}function Xr(e){return qr[e?.oddsLabelPosition||"left"]}function Qr(e){return Kn[e?.oddsGap||"1"]}const Xt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Xn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i=Kr(n),l=Xr(n);return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Zr(n)),children:[t.jsx("div",{className:d("bg-muted/30 p-4",n?.headerSection),children:t.jsx(kt,{...e,variant:"inline"})}),t.jsxs("div",{className:d("p-4",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Xt,i)},container:"mb-2.5 mt-1"}}}),t.jsx(yt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("p-4 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Xt,l)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Qr(n)),children:s.map((u,c)=>t.jsx("div",{children:u},c))})]})]})}const Qt="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function Qn({matchupHeader:e,stats:r,title:o,bettingOdds:s,oddsLabel:a,styles:n}){const i={...e,variant:"stacked"},l=Kr(n),u=Xr(n);return t.jsxs("div",{className:d("shadow-lg",Zr(n)),children:[t.jsx(kt,{...i}),t.jsxs("div",{className:d("bg-card p-6",n?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:{typography:{name:d(Qt,l)},container:"mb-2.5 mt-1"}}}),t.jsx(yt,{...r})]}),s&&s.length>0&&t.jsxs("div",{className:d("bg-card p-6 pt-0",n?.oddsSection),children:[a&&t.jsx(T,{entity:{name:a,styles:{typography:{name:d(Qt,u)},container:"mb-2.5 mt-1"}}}),t.jsx("div",{className:d("flex flex-col",Qr(n)),children:s.map((c,m)=>t.jsx("div",{children:c},m))})]})]})}function Jn({variant:e="card",...r}){switch(e){case"hero":return t.jsx(Qn,{...r});case"card":default:return t.jsx(Xn,{...r})}}const ea={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ta={left:"text-left",center:"text-center",right:"text-right"},ra={1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4"};function Ze(e){const r=e?.borderRadius?ea[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.container)}function Ke(e){return ta[e?.titlePosition||"left"]}function Xe(e){return ra[e?.oddsGap||"1"]}const oa="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function sa({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),g={typography:{name:d(oa,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsxs("div",{className:d("p-4",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:g}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:g}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:g}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:g}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const na="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function aa({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=Ke(c),g={typography:{name:d(na,m)},container:"mb-1.5"};return t.jsxs("div",{className:d("shadow-lg",Ze(c)),children:[t.jsx("div",{className:c?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsxs("div",{className:d("bg-card p-5",c?.statsSection),children:[o&&t.jsx(T,{entity:{name:o,styles:g}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:d("bg-card px-4 pb-4",c?.formSection),children:[a&&t.jsx(T,{entity:{name:a,styles:g}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.matchSection),children:[i&&t.jsx(T,{entity:{name:i,styles:g}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:d("bg-card p-4 pt-0",c?.oddsSection),children:[u&&t.jsx(T,{entity:{name:u,styles:g}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((f,w)=>t.jsx("div",{children:f},w))})]})]})}const ia="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function la({profileHeader:e,stats:r,form:o,formTitle:s,matchTitle:a,featuredMatch:n,bettingOdds:i,oddsLabel:l,styles:u}){const c=Ke(u),m={typography:{name:d(ia,c)},container:"mb-1.5"};return t.jsxs("div",{className:d("bg-card border border-muted shadow-sm",Ze(u)),children:[t.jsx("div",{className:u?.headerSection,children:t.jsx(fe,{...e})}),r&&t.jsx("div",{className:d("p-3",u?.statsSection),children:t.jsx(Q,{...r})}),o&&t.jsxs("div",{className:d("bg-card px-3 pb-3",u?.formSection),children:[s&&t.jsx(T,{entity:{name:s,styles:m}}),t.jsx("div",{className:"flex justify-start",children:t.jsx(he,{...o,matchSeparator:"last",variant:"embedded"})})]}),n&&t.jsxs("div",{className:d("px-3 pb-3",u?.matchSection),children:[a&&t.jsx(T,{entity:{name:a,styles:m}}),t.jsx(O,{...n,styles:{logoSize:"sm",typography:{teamName:"text-sm uppercase"}}})]}),i&&i.length>0&&t.jsxs("div",{className:d("px-3 pb-3",u?.oddsSection),children:[l&&t.jsx(T,{entity:{name:l,styles:m}}),t.jsx("div",{className:d("flex flex-col",Xe(u)),children:i.map((g,f)=>t.jsx("div",{children:g},f))})]})]})}const da="text-xs font-semibold text-muted-foreground uppercase tracking-wider";function ca({profileHeader:e,stats:r,statsTitle:o,form:s,formTitle:a,featuredMatch:n,matchTitle:i,bettingOdds:l,oddsLabel:u,styles:c}){const m=e.styles?.background||"bg-gradient-to-br from-primary-600 to-primary-800",g=e.styles?{...e.styles,background:void 0}:void 0,f=Ke(c),w={typography:{name:d(da,f)},container:"mb-1.5"};return t.jsx("div",{className:d("shadow-lg",Ze(c)),children:t.jsxs("div",{className:"flex flex-col md:flex-row",children:[t.jsx("div",{className:d("w-full md:w-1/3 flex items-center justify-center",m,c?.headerSection),children:t.jsx(fe,{...e,styles:g,layout:"stacked",ctaLayout:"stacked"})}),t.jsxs("div",{className:"w-full md:flex-1 flex flex-col bg-card p-4 space-y-4",children:[r&&t.jsxs("div",{className:c?.statsSection,children:[o&&t.jsx(T,{entity:{name:o,styles:w}}),t.jsx(Q,{...r})]}),s&&t.jsxs("div",{className:c?.formSection,children:[a&&t.jsx(T,{entity:{name:a,styles:w}}),t.jsx(he,{...s,variant:"scoreCards"})]}),n&&t.jsxs("div",{className:c?.matchSection,children:[i&&t.jsx(T,{entity:{name:i,styles:w}}),t.jsx(O,{...n})]}),l&&l.length>0&&t.jsxs("div",{className:c?.oddsSection,children:[u&&t.jsx(T,{entity:{name:u,styles:w}}),t.jsx("div",{className:d("flex flex-col",Xe(c)),children:l.map((S,v)=>t.jsx("div",{children:S},v))})]})]})]})})}function ua({variant:e="card",...r}){switch(e){case"hero":return t.jsx(aa,{...r});case"compact":return t.jsx(la,{...r});case"horizontal":return t.jsx(ca,{...r});case"card":default:return t.jsx(sa,{...r})}}const ma={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},ga={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},pa={1:"grid-cols-1",2:"grid-cols-2"},xa={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},ha={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4"},fa={1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6"};function Jr(e){const r=e?.borderRadius?ma[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function eo(e){return ga[e?.gap||"md"]}function ba(e){const r=e?.sm||1,o=e?.md||2,s=e?.lg||3,a=e?.xl||4;return d(pa[r],xa[o],ha[s],fa[a])}function ja({items:e,sectionHeader:r,cardVariant:o="standard",cardStyles:s,pagination:a,styles:n}){const i=eo(n),l=ba(n?.columns);return t.jsxs("div",{className:Jr(n),children:[r,t.jsx("div",{className:d("grid",l,i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:o,styles:s,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",n?.paginationSection),children:t.jsx(bt,{...a})})]})}function va({items:e,sectionHeader:r,cardVariant:o="standardHorizontal",cardStyles:s,pagination:a,styles:n}){const i=eo(n),l=o==="standard"?"standardHorizontal":o;return t.jsxs("div",{className:Jr(n),children:[r,t.jsx("div",{className:d("flex flex-col",i,n?.contentSection),children:e.map(u=>t.jsx(F,{content:u.content,variant:l,styles:s,primaryCta:u.primaryCta,secondaryCta:u.secondaryCta,bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id))}),a&&t.jsx("div",{className:d("mt-6 flex justify-center",n?.paginationSection),children:t.jsx(bt,{...a})})]})}function wa({variant:e="grid",...r}){switch(e){case"list":return t.jsx(va,{...r});case"grid":default:return t.jsx(ja,{...r})}}const ya={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Na={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function St(e){const r=e?.borderRadius?ya[e.borderRadius]:"";return d(r,e?.background,e?.container)}function At(e){return Na[e?.gap||"md"]}const Ca={1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"},ka={1:{title:"text-xl md:text-3xl font-bold line-clamp-3",description:"text-sm md:text-base line-clamp-2",category:"text-sm",metadata:"text-sm opacity-80"},2:{title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},3:{title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"},4:{title:"text-xl md:text-sm font-semibold line-clamp-2",metadata:"text-xs opacity-80"}};function Sa(e,r){return r<=1?e:{...e,content:{...e.content,description:void 0,category:r>=3?void 0:e.content.category}}}function dt({items:e,config:r,cardStyles:o,gapClass:s}){const a=Ca[r.columns],n=ka[r.columns];return t.jsx("div",{className:d("grid",a,s),children:e.map(i=>{const l=Sa(i,r.columns);return t.jsx(F,{content:l.content,variant:"hero",styles:{...o,typography:{...n,...o?.typography}},bettingOdds:l.bettingOdds,matchScore:l.matchScore},l.content.id)})})}function Aa({items:e,sectionHeader:r,cardStyles:o,styles:s,stackedConfig:a}){const n=a?.row1||{columns:1},i=a?.row2||{columns:2},l=a?.row3||{columns:3},u=At(s),c=n.columns,m=i.columns,g=l.columns,f=e.slice(0,c),w=e.slice(c,c+m),S=e.slice(c+m,c+m+g);return t.jsxs("div",{className:St(s),children:[r,t.jsxs("div",{className:d("flex flex-col",u),children:[f.length>0&&t.jsx(dt,{items:f,config:n,cardStyles:o,gapClass:u}),w.length>0&&t.jsx(dt,{items:w,config:i,cardStyles:o,gapClass:u}),S.length>0&&t.jsx(dt,{items:S,config:l,cardStyles:o,gapClass:u})]})]})}const Ra={title:"text-xl md:text-lg font-bold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"},Ta={title:"text-xl md:text-base font-semibold line-clamp-2",metadata:"text-xs opacity-80"};function Jt(e,r=!1){return{...e,content:{...e.content,description:void 0,category:r?void 0:e.content.category}}}function La({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=At(s),n=e[0],i=e.slice(1,3),l=e.slice(3,6);return n?t.jsxs("div",{className:St(s),children:[r,t.jsxs("div",{className:d("flex flex-col",a),children:[t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-3",a),children:[t.jsx("div",{className:"lg:col-span-2",children:t.jsx(F,{content:n.content,variant:"hero",styles:{...o,imageAspectRatio:"auto",container:d("h-full",o?.container),imageContainer:d("h-full",o?.imageContainer)},bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(u=>{const c=Jt(u);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,container:d("flex-1",o?.container),typography:{...Ra,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]}),l.length>0&&t.jsx("div",{className:d("grid grid-cols-1 md:grid-cols-3",a),children:l.map(u=>{const c=Jt(u,!0);return t.jsx(F,{content:c.content,variant:"hero",styles:{...o,typography:{...Ta,...o?.typography}},bettingOdds:c.bettingOdds,matchScore:c.matchScore},c.content.id)})})]})]}):null}const Ma={title:"text-base font-semibold line-clamp-2",category:"text-xs",metadata:"text-xs opacity-80"};function za(e){return{...e,content:{...e.content,description:void 0}}}function Ia({items:e,sectionHeader:r,cardStyles:o,styles:s}){const a=At(s),n=e[0],i=e.slice(1);return n?t.jsxs("div",{className:St(s),children:[r,t.jsxs("div",{className:d("grid grid-cols-1 lg:grid-cols-2",a),children:[t.jsx("div",{className:"lg:h-full",children:t.jsx(F,{content:n.content,variant:"standard",styles:{...o,container:d("h-full",o?.container)},primaryCta:n.primaryCta,secondaryCta:n.secondaryCta,bettingOdds:n.bettingOdds,matchScore:n.matchScore})}),i.length>0&&t.jsx("div",{className:d("flex flex-col",a),children:i.map(l=>{const u=za(l);return t.jsx(F,{content:u.content,variant:"minimal",styles:{...o,typography:{...Ma,...o?.typography}},bettingOdds:u.bettingOdds,matchScore:u.matchScore},u.content.id)})})]})]}):null}function _a({variant:e="stacked",...r}){switch(e){case"spotlight":return t.jsx(La,{...r});case"highlight":return t.jsx(Ia,{...r});case"stacked":default:return t.jsx(Aa,{...r})}}const Rt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},Pa={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"},to={none:"",sm:"px-2 py-1",md:"px-3 py-2",lg:"px-4 py-3"};function I(e){const r=e?.borderRadius?Rt[e.borderRadius]:"rounded-xl";return d("overflow-hidden",r,e?.background,e?.container)}function ro(e){return Pa[e||"md"]}function er(e){const r=e?.typography||"text-sm font-semibold text-muted-foreground",o=e?.background||"bg-muted",s=to[e?.padding||"md"],a=e?.borderRadius?Rt[e.borderRadius]:"";return d(r,o,s,a)}function Da(e){const r=new Map;return e.forEach(o=>{const s=o.dateGroup||o.match.metadata?.date||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Oa(e){const r=new Map;return e.forEach(o=>{const s=o.roundGroup||o.match.metadata?.round||"Unknown",a=r.get(s)||[];r.set(s,[...a,o])}),r}function Y({message:e}){return t.jsx("div",{className:"flex items-center justify-center py-12 text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:e})})}function oo({title:e,styles:r,action:o}){return o?t.jsxs("div",{className:d("flex items-center justify-between",er(r)),children:[t.jsx("span",{children:e}),o]}):t.jsx("div",{className:er(r),children:e})}function Qe({title:e,subtitle:r,logo:o,action:s,styles:a}){const n=a?.typography||"text-sm font-semibold",i=a?.subtitleTypography||"text-xs text-muted-foreground",l=a?.background||"bg-muted",u=to[a?.padding||"md"],c=a?.borderRadius?Rt[a.borderRadius]:"";return t.jsxs("div",{className:d("flex items-center justify-between",l,u,c),children:[t.jsxs("div",{className:"flex items-center gap-2",children:[o&&t.jsx("img",{src:o,alt:e,className:"w-6 h-6 object-contain"}),t.jsxs("div",{children:[t.jsx("div",{className:n,children:e}),r&&t.jsx("div",{className:i,children:r})]})]}),s&&t.jsx("div",{children:s})]})}function be({children:e,bettingOdds:r,oddsColumnWidth:o="w-[360px]",hasOddsColumn:s=!1}){return s?t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-2 py-2 px-2",children:[t.jsx("div",{className:"flex-1 min-w-0",children:e}),t.jsx("div",{className:d("shrink-0 hidden md:block",o),children:r}),r&&t.jsx("div",{className:"md:hidden",children:r})]}):t.jsx("div",{className:"py-2 px-2",children:e})}function je({items:e,styles:r,renderMatch:o,hasOddsColumn:s}){const a=s??e.some(n=>n.bettingOdds);return t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map(n=>t.jsx(be,{bettingOdds:n.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:o(n)},n.match.id))})}function tr({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Ba({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=Da(e),n=ro(r?.groupGap||"md"),i=e.some(l=>l.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",n),children:Array.from(a.entries()).map(([l,u])=>{const c=u[0];return t.jsxs("div",{children:[t.jsx(oo,{title:l,styles:r?.groupHeader,action:c.groupAction}),t.jsx(je,{items:u,styles:r,hasOddsColumn:i,renderMatch:m=>t.jsx(O,{match:m.match,variant:"embedded",styles:r?.matchScoreStyles})})]},l)})})]})}function Ea({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found",scrollToActiveRound:a=!1}){const n=A.useRef(null);if(A.useEffect(()=>{a&&n.current&&n.current.scrollIntoView({behavior:"smooth",block:"start"})},[a]),e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const i=Oa(e),l=ro(r?.groupGap||"md"),u=e.some(c=>c.bettingOdds);return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:d("flex flex-col",l),children:Array.from(i.entries()).map(([c,m])=>{const g=m[0],f=m.some(w=>w.isActiveRound);return t.jsxs("div",{ref:f?n:void 0,children:[t.jsx(oo,{title:c,styles:r?.groupHeader,action:g.groupAction}),t.jsx(je,{items:m,styles:r,hasOddsColumn:u,renderMatch:w=>t.jsx(O,{match:w.match,variant:"embedded",styles:r?.matchScoreStyles})})]},c)})})]})}function $a({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:n=>t.jsx(O,{match:n.match,variant:"embedded",styles:a})})]})}function Ga({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i={...r?.matchScoreStyles,finishedStatusDisplay:"date"};return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,g=c!==m;return t.jsxs("div",{children:[g&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i})})]},l.match.id)})})]})}function Wa({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){return e.length===0?t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]}):t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:e,styles:r,renderMatch:a=>t.jsx(O,{match:a.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Ha({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(i=>i.bettingOdds),n=i=>i.competitionGroup||i.match.metadata?.competition||"Unknown";return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((i,l)=>{const u=n(i),c=l>0?n(e[l-1]):null,m=u!==c;return t.jsxs("div",{children:[m&&t.jsx(Qe,{title:u,subtitle:i.competitionSubtitle,logo:i.competitionLogo,action:i.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:i.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:i.match,variant:"embedded",styles:r?.matchScoreStyles})})]},i.match.id)})})]})}function Va({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.filter(l=>l.match.status!=="scheduled"),n=e.filter(l=>l.match.status==="scheduled"),i=[...a,...n];return t.jsxs("div",{className:I(r),children:[o,t.jsx(je,{items:i,styles:r,renderMatch:l=>t.jsx(O,{match:l.match,variant:"embedded",styles:r?.matchScoreStyles})})]})}function Ua({items:e,styles:r,sectionHeader:o,emptyMessage:s="No matches found"}){if(e.length===0)return t.jsxs("div",{className:I(r),children:[o,t.jsx(Y,{message:s})]});const a=e.some(l=>l.bettingOdds),n=l=>l.competitionGroup||l.match.metadata?.competition||"Unknown",i=l=>l.match.status!=="scheduled"?{...r?.matchScoreStyles,finishedStatusDisplay:"date"}:r?.matchScoreStyles;return t.jsxs("div",{className:I(r),children:[o,t.jsx("div",{className:"flex flex-col divide-y divide-border",children:e.map((l,u)=>{const c=n(l),m=u>0?n(e[u-1]):null,g=c!==m;return t.jsxs("div",{children:[g&&t.jsx(Qe,{title:c,subtitle:l.competitionSubtitle,logo:l.competitionLogo,action:l.groupAction,styles:r?.groupHeader}),t.jsx(be,{bettingOdds:l.bettingOdds,oddsColumnWidth:r?.oddsColumnWidth,hasOddsColumn:a,children:t.jsx(O,{match:l.match,variant:"embedded",styles:i(l)})})]},l.match.id)})})]})}function Fa({variant:e="daily",...r}){switch(e){case"daily":return t.jsx(tr,{...r});case"round":return t.jsx(Ba,{...r});case"competition":return t.jsx(Ea,{...r});case"teamResults":return t.jsx($a,{...r});case"teamResultsByCompetition":return t.jsx(Ga,{...r});case"teamFixtures":return t.jsx(Wa,{...r});case"teamFixturesByCompetition":return t.jsx(Ha,{...r});case"teamMatches":return t.jsx(Va,{...r});case"teamMatchesByCompetition":return t.jsx(Ua,{...r});default:return t.jsx(tr,{...r})}}const Ya="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='%239ca3af'%3E%3Ccircle cx='50' cy='35' r='20'/%3E%3Cpath d='M20 95 Q20 60 50 60 Q80 60 80 95 Z'/%3E%3C/svg%3E";function so(e){return e.imageUrl||Ya}const Tt={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl"},no={none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"};function Pe(e){const r=e?.borderRadius?Tt[e.borderRadius]:"rounded-xl",o=e?.background||"bg-card";return d("overflow-hidden p-4",r,o,e?.container)}function De(e){const r=e?.header?.border??"border-b border-muted",o=e?.header?.padding??"pb-4";return d(r,o,e?.header?.container)}function Oe(e){return no[e?.groupGap||"md"]}function Be(e){return no[e?.memberGap||"sm"]}function ao(e,r){const o=new Map;r&&r.forEach(n=>o.set(n.key,n));const s=new Map;e.forEach(n=>{const i=n.positionGroup;s.has(i)||s.set(i,[]),s.get(i).push(n)});const a=Array.from(s.entries()).map(([n,i])=>{const l=o.get(n);return{key:n,label:l?.label||n,order:l?.order??999,members:i}});return a.sort((n,i)=>n.order-i.order),a.map(({key:n,label:i,members:l})=>({key:n,label:i,members:l}))}function qa(e,r){const o=[];return r?.showNumber&&e.jerseyNumber!==void 0&&o.push(`#${e.jerseyNumber}`),r?.showPosition&&e.position&&o.push(e.position),r?.showSubtitle&&e.subtitle&&o.push(e.subtitle),o.length>0?o.join(" • "):void 0}const Za="text-sm font-semibold text-muted-foreground uppercase tracking-wider",rr={2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-4 lg:grid-cols-6"};function or({member:e,display:r,styles:o}){const s=o?.memberNameTypography||"font-semibold text-foreground",a=o?.memberSubtitleTypography||"text-xs text-muted-foreground",n=o?.memberCard,i=e.href||e.onClick,l=e.href?"a":"div",u=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},c=n?.background||"bg-muted",m=n?.borderRadius?Tt[n.borderRadius]:"rounded-lg",g=n?.padding||"p-3",f=n?.gap||"gap-3";return t.jsxs(l,{className:d(c,m,g,"flex flex-col",f,i&&"cursor-pointer hover:opacity-80 transition-opacity",n?.container),...u,children:[t.jsx($,{name:e.name,mobileName:e.shortName,imageUrl:so(e),subtitle:qa(e,r),styles:{imageBorderRadius:"full",imageSize:n?.entityDisplay?.imageSize||"xl",typography:{name:s,subtitle:a},gap:"3",...n?.entityDisplay}}),e.stats&&e.stats.length>0&&t.jsx(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...n?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"md",background:"bg-foreground/5",typography:{value:"text-sm font-semibold text-foreground",label:"text-[9px] font-medium text-muted-foreground uppercase"},...n?.statsItem}}})]},e.id)}function Ka({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||Za,l=n?.columns||3,u=rr[l]||rr[3];if(r){const c=ao(e,o);return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-3",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,Be(n)),children:m.members.map(g=>t.jsx(or,{member:g,display:s,styles:n},g.id))})]},m.key))]})}return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),t.jsx("div",{className:d("grid",u,Be(n)),children:e.map(c=>t.jsx(or,{member:c,display:s,styles:n},c.id))})]})}const Xa="text-sm font-semibold text-muted-foreground uppercase tracking-wider",sr={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2"};function Qa(e){const r=new Date(e),o=new Date;let s=o.getFullYear()-r.getFullYear();const a=o.getMonth()-r.getMonth();return(a<0||a===0&&o.getDate()<r.getDate())&&s--,s}function Ja(e,r){const o=[];if(r?.showPosition&&e.position&&o.push({label:"Position",value:e.position}),e.birthDate&&o.push({label:"Age",value:`${Qa(e.birthDate)}`}),e.height&&o.push({label:"Height",value:e.height}),e.contractEnd){const s=new Date(e.contractEnd).getFullYear();o.push({label:"Contract",value:`${s}`})}return e.marketValue&&o.push({label:"Value",value:e.marketValue}),o}function nr({member:e,display:r,styles:o}){const s=Ja(e,r),a=o?.memberCard,n=e.href||e.onClick,i=e.href?"a":"div",l=e.href?{href:e.href}:e.onClick?{onClick:e.onClick,role:"button",tabIndex:0}:{},u=a?.background||"bg-muted",c=a?.borderRadius?Tt[a.borderRadius]:"rounded-xl";return t.jsxs(i,{className:d(u,c,"overflow-hidden flex flex-row",n&&"cursor-pointer hover:opacity-80 transition-opacity",a?.container),...l,children:[t.jsxs("div",{className:"relative w-40 sm:w-48 shrink-0 bg-linear-to-b from-primary-600/20 to-primary-800/20",children:[t.jsx("img",{src:so(e),alt:"","aria-hidden":"true",className:"absolute inset-0 w-full h-full object-cover object-top"}),r?.showNumber&&e.jerseyNumber&&t.jsx("div",{className:"absolute top-3 right-3 bg-background/90 backdrop-blur-sm rounded-lg px-2 py-1 font-bold text-sm text-foreground",children:e.jerseyNumber})]}),t.jsxs("div",{className:d("p-4 flex flex-col gap-3 flex-1 min-w-0",a?.padding,a?.gap),children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[e.nationality?.flagUrl&&t.jsx("img",{src:e.nationality.flagUrl,alt:e.nationality.name,className:"w-6 h-4 object-cover rounded shadow-sm shrink-0"}),t.jsx("h3",{className:d("text-xl font-bold text-foreground truncate",o?.memberNameTypography),children:e.name})]}),e.subtitle&&t.jsx("p",{className:d("text-sm text-primary-600 font-medium",o?.memberSubtitleTypography),children:e.subtitle})]}),s.length>0&&t.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm",children:s.map(m=>t.jsxs("div",{className:"flex gap-1",children:[t.jsxs("span",{className:"text-muted-foreground",children:[m.label,":"]}),t.jsx("span",{className:"font-medium text-foreground",children:m.value})]},m.label))}),e.stats&&e.stats.length>0&&t.jsx(Q,{items:e.stats,itemVariant:"stacked",styles:{grid:{colsMobile:3,colsTablet:3,colsDesktop:3,gap:"sm",...a?.statsGrid},item:{alignment:"center",padding:"sm",borderRadius:"lg",background:"bg-foreground/5",typography:{value:"text-lg font-bold text-foreground",label:"text-[10px] font-medium text-muted-foreground uppercase"},...a?.statsItem}}})]})]})}function ei({members:e,groupByPosition:r=!0,positionGroups:o,display:s={showNumber:!0,showPosition:!0},header:a,styles:n}){const i=n?.groupHeaderTypography||Xa,l=n?.columns||2,u=sr[l]||sr[2];if(r){const c=ao(e,o);return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),c.map(m=>t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{className:i,children:m.label}),t.jsx("div",{className:d("grid",u,Be(n)),children:m.members.map(g=>t.jsx(nr,{member:g,display:s,styles:n},g.id))})]},m.key))]})}return t.jsxs("div",{className:d(Pe(n),"flex flex-col",Oe(n)),children:[a&&t.jsx("div",{className:De(n),children:a}),t.jsx("div",{className:d("grid",u,Be(n)),children:e.map(c=>t.jsx(nr,{member:c,display:s,styles:n},c.id))})]})}function ti({variant:e="card",...r}){switch(e){case"detailed":return t.jsx(ei,{...r});case"card":default:return t.jsx(Ka,{...r})}}exports.Badge=gt;exports.BadgeGroup=pt;exports.BarItem=Hr;exports.BettingOdds=Tr;exports.CTAButton=os;exports.CTAGroup=Ee;exports.ComparisonItem=Vr;exports.CompetitorProfileBlock=ua;exports.ContentCard=F;exports.ContentListBlock=wa;exports.Countdown=br;exports.DefaultStatItem=_r;exports.EntityDisplay=$;exports.FORM_INDICATOR_DEFAULT_LABELS=Nt;exports.FeaturedContentBlock=_a;exports.FormIndicator=he;exports.HeadToHeadBlock=Jn;exports.HeadToHeadItem=Ur;exports.HeroCard=vr;exports.HorizontalStatItem=Dr;exports.InlineScore=Rr;exports.MatchListBlock=Fa;exports.MatchScore=O;exports.MatchupHeader=kt;exports.MinimalCard=Ar;exports.Pagination=bt;exports.ProfileHeader=fe;exports.PromoCard=Sr;exports.ScoreCard=Lr;exports.ScoreLine=Mr;exports.SectionHeader=T;exports.SquadBlock=ti;exports.StackedStatItem=Pr;exports.StandardCard=kr;exports.StatItem=Or;exports.StatsGrid=Q;exports.StatsHeadToHead=yt;exports.StatsTable=gn;exports.Tooltip=de;exports.cn=d;
7
2
  //# sourceMappingURL=index.cjs.map