1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6003],{18250:(e,t,a)=>{"use strict";a.d(t,{SportsList:()=>o});var s=a(95155),l=a(12115),r=a(68578),i=a(14149),c=a(65541),n=a(83182);let d=["basketball","football","american-football","hockey","baseball","motor-sports","fight","tennis","rugby","golf","billiards","afl","darts","cricket","other"];function o(e){let{id:t}=e,[a,o]=(0,l.useState)({isLive:!1,isPopular:!1}),[x,m]=(0,l.useState)("all"),[h,p]=(0,l.useState)([]),[g,u]=(0,l.useState)(!0),[f,v]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e,s=async()=>{u(!0);try{m(t);let e=a.isLive?await (0,n._t)():await (0,n.sh)();p(e),v(null)}catch(e){v("Failed to fetch matches"),console.error("Error fetching matches:",e)}finally{u(!1)}};return s(),a.isLive&&(e=setInterval(s,36e6)),()=>{e&&clearInterval(e)}},[a.isLive,t]);let y=null==h?void 0:h.filter(e=>{let t="all"===x||e.category.toLowerCase()===x.toLowerCase(),s=!a.isPopular||e.popular;return t&&s}),j=e=>{o(t=>({...t,[e]:!t[e]}))};return(0,l.useEffect)(()=>{let e=e=>{var t;m((null==(t=e.state)?void 0:t.id)||"all")};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,s.jsx)("div",{className:"min-h-screen",children:(0,s.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 md:px-6 lg:px-8 py-12 space-y-4 pt-20",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 md:gap-4 mb-8",children:[(0,s.jsxs)("div",{className:"flex space-x-2 md:space-x-4 w-full sm:w-auto",children:[(0,s.jsx)("button",{onClick:()=>j("isLive"),className:"px-2 py-2 md:px-6 rounded-full transition-all text-sm md:text-md ".concat(a.isLive?"bg-red-600 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"),children:"Live"}),(0,s.jsx)("button",{onClick:()=>j("isPopular"),className:"px-2 py-2 md:px-6 rounded-full transition-all text-sm md:text-md ".concat(a.isPopular?"bg-red-600 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300"),children:"Popular"})]}),(0,s.jsxs)(c.l6,{value:x,onValueChange:e=>{m(e);let t="/sport/".concat(e);window.history.pushState({id:e},"",t)},children:[(0,s.jsx)(c.bq,{className:"w-full sm:w-[300px] text-sm md:text-md",children:"all"===x?"Select a sport":x.charAt(0).toUpperCase()+x.slice(1)}),(0,s.jsxs)(c.gC,{children:[(0,s.jsx)(c.eb,{value:"all",children:"All Sports"}),d.map(e=>(0,s.jsx)(c.eb,{value:e,children:"fight"===e?"Fight (UFC, Boxing)":e.charAt(0).toUpperCase()+e.slice(1)},e))]})]})]}),f?(0,s.jsx)("div",{className:"text-center text-red-600 dark:text-red-400 py-12",children:"Error loading matches. Please try again later."}):g?(0,s.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-4 sm:gap-6 md:gap-8",children:[...Array(10)].map((e,t)=>(0,s.jsx)(i.x,{},t))}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"space-y-8",children:(function(e){let t=e.filter(e=>0===e.date),a=e.filter(e=>0!==e.date).reduce((e,t)=>{let a=function(e){let t=new Date(e);return{day:t.toLocaleDateString("en-US",{weekday:"short"}),date:t.getDate(),month:t.toLocaleDateString("en-US",{month:"short"})}}(t.date),s="".concat(a.date,"-").concat(a.month);return e[s]||(e[s]={...a,type:"date",matches:[]}),e[s].matches.push(t),e},{}),s=[];return t.length>0&&s.push({type:"24/7",matches:t}),s.push(...Object.values(a).sort((e,t)=>(e.date||0)-(t.date||0))),s})(y||[]).map(e=>(0,s.jsxs)("div",{className:"flex flex-row gap-1 md:gap-4",children:[(0,s.jsx)("div",{className:"flex-shrink-0",children:"24/7"===e.type?(0,s.jsxs)("div",{className:"flex flex-col gap-1 items-center text-sm w-16",children:[(0,s.jsx)("h1",{className:"font-bold text-xl",children:"24/7"}),(0,s.jsx)("span",{children:"FREE"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1 items-center text-primary text-sm w-16 sticky top-4",children:[(0,s.jsx)("span",{className:"font-extrabold",children:e.day}),(0,s.jsx)("h1",{className:"font-bold text-4xl",children:e.date}),(0,s.jsx)("span",{children:e.month})]})}),(0,s.jsx)("div",{className:"flex-grow",children:(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ga
1p-4 sm:gap-6 md:gap-8 items-baseline",children:e.matches.map(e=>(0,s.jsx)(r.C,{match:e,isMatchLive:a.isLive},e.id))})})]},"24/7"===e.type?"24/7":"".concat(e.date,"-").concat(e.month)))}),(null==y?void 0:y.length)===0&&(0,s.jsx)("div",{className:"text-center dark:text-gray-400 text-gray-600 py-12",children:"No matches found for the selected filters."})]})]})})}},78040:(e,t,a)=>{Promise.resolve().then(a.bind(a,18250))}},e=>{e.O(0,[8096,2076,7405,7358],()=>e(e.s=78040)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.