PageSourceSearch

https://faf.co.ao/assets/MatchCenter-D5oSgFhc.js

js faf.co.ao collected 2026-10-02 19:10:34 UTC 38,074 bytes, 30 lines download raw bytes

1import{j as e,b as A,r as q,L as R,t as W}from"./vendor-react-core-_0sZDOLQ.js";import{f as M,o as G,b as _,B as v,c as V}from"./index-j07E1qHv.js";import{T as J,a as B,b,c as y}from"./tabs-BUF6w8PE.js";import{S as T}from"./skeleton-ClHfYp06.js";import{h as K}from"./vendor-utils-BRu4i-LD.js";import{C as g,a as u,b as f,c as N}from"./card-DHmBnTdH.js";import{m as p,A as ee}from"./vendor-framer-motion-C1oRD-X5.js";import{l as D,aB as k,aU as F,a$ as U,w as H,as as se,T as z,Z as S,U as Y,af as ae,y as E,aN as Q,S as I,n as Z,aD as te,L as le,_ as re}from"./vendor-lucide-Ddz0eB7N.js";import{M as ie}from"./MatchReportCard-DgBl4nvX.js";import{B as O}from"./badge-BXqwvh8U.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-supabase-Ca6cp8v2.js";function ne({match:l,events:a}){const s=a.filter(r=>r.team==="home"&&(r.event_type==="goal"||r.event_type==="penalty")).length,m=a.filter(r=>r.team==="away"&&(r.event_type==="goal"||r.event_type==="penalty")).length,i=a.filter(r=>r.team==="home"&&r.event_type==="yellow_card").length,c=a.filter(r=>r.team==="away"&&r.event_type==="yellow_card").length,n=a.filter(r=>r.team==="home"&&r.event_type==="red_card").length,h=a.filter(r=>r.team==="away"&&r.event_type==="red_card").length,d=[...a].reverse().slice(0,5);return e.jsxs("div",{className:"space-y-6",children:[e.jsx(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:e.jsx(g,{className:"border-2 border-red-600 shadow-lg",children:e.jsx(u,{className:"p-6",children:e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[e.jsx("div",{className:"w-3 h-3 bg-red-600 rounded-full animate-pulse"}),e.jsx(D,{className:"w-5 h-5"})]}),e.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:"Jogo em Direto"}),e.jsx(k,{className:"w-6 h-6 text-red-600 animate-pulse"})]})})})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(g,{className:"shadow-lg",children:e.jsxs(u,{className:"p-6 text-center",children:[e.jsx("h4",{className:"text-gray-500 mb-2",children:"Golos"}),e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx("span",{className:"text-4xl font-bold text-red-600",children:s}),e.jsx("span",{className:"text-2xl text-gray-400",children:"-"}),e.jsx("span",{className:"text-4xl font-bold text-blue-600",children:m})]})]})}),e.jsx(g,{className:"shadow-lg",children:e.jsxs(u,{className:"p-6 text-center",children:[e.jsx("h4",{className:"text-gray-500 mb-2",children:"Cartões Amarelos"}),e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx("span",{className:"text-4xl font-bold text-yellow-600",children:i}),e.jsx("span",{className:"text-2xl text-gray-400",children:"-"}),e.jsx("span",{className:"text-4xl font-bold text-yellow-600",children:c})]})]})}),e.jsx(g,{className:"shadow-lg",children:e.jsxs(u,{className:"p-6 text-center",children:[e.jsx("h4",{className:"text-gray-500 mb-2",children:"Cartões Vermelhos"}),e.jsxs("div",{className:"flex items-center justify-center gap-4",children:[e.jsx("span",{className:"text-4xl font-bold text-red-600",children:n}),e.jsx("span",{className:"text-2xl text-gray-400",children:"-"}),e.jsx("span",{className:"text-4xl font-bold text-red-600",children:h})]})]})})]}),e.jsx(g,{className:"shadow-lg",children:e.jsxs(u,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-4",children:"Últimos Eventos"}),d.length>0?e.jsx("div",{className:"space-y-3",children:d.map((r,t)=>e.jsxs(p.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:t*.1},className:"flex items-center gap-4 p-3 bg-gray-50 rounded-lg",children:[e.jsxs("div",{className:"w-12 h-12 bg-red-600 rounded-full flex items-center justify-center text-white font-bold flex-shrink-0",children:[r.minute,"'"]}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"font-semibold text-gray-900",children:[r.event_type==="goal"&&"⚽ Golo!",r.event_type==="yellow_card"&&"🟨 Cartão Amarelo",r.event_type==="red_card"&&"🟥 Cartão Vermelho",r.event_type==="substitution"&&"🔄 Substituição",r.event_type==="penalty"&&"⚽ Penálti!"]}),e.jsxs("p",{className:"text-sm text-gray-600",children:[r.player_name," 
1(",r.team==="home"?l.home_team:l.away_team,")"]})]})]},r.id))}):e.jsx("p",{className:"text-center text-gray-500 py-8",children:"Ainda sem eventos registados"})]})})]})}const oe={goal:"⚽",penalty:"⚽",own_goal:"⚽",yellow_card:"🟨",red_card:"🟥",substitution:"🔄"},ce={goal:"Golo",penalty:"Penálti",own_goal:"Auto-Golo",yellow_card:"Cartão Amarelo",red_card:"Cartão Vermelho",substitution:"Substituição"};function de({events:l,match:a}){return e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-red-600 to-red-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(D,{className:"w-5 h-5"}),"Cronologia do Jogo"]})}),e.jsx(u,{className:"p-6",children:l.length>0?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-1/2 top-0 bottom-0 w-1 bg-gray-200 transform -translate-x-1/2"}),e.jsx("div",{className:"space-y-8",children:l.map((s,m)=>{const i=s.team==="home";return e.jsxs(p.div,{initial:{opacity:0,x:i?-50:50},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{delay:m*.1},className:`relative flex items-center ${i?"justify-start":"justify-end"}`,children:[e.jsx("div",{className:`w-5/12 ${i?"text-right pr-8":"text-left pl-8"}`,children:e.jsxs("div",{className:`inline-block bg-white rounded-lg shadow-md p-4 border-l-4 ${s.event_type==="goal"||s.event_type==="penalty"?"border-green-500":s.event_type==="yellow_card"?"border-yellow-500":s.event_type==="red_card"?"border-red-500":"border-blue-500"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-2xl",children:oe[s.event_type]}),e.jsx("span",{className:"font-bold text-gray-900",children:ce[s.event_type]})]}),e.jsx("p",{className:"text-sm font-semibold text-gray-900",children:s.player_name}),s.event_type==="substitution"&&s.player_out&&e.jsxs("p",{className:"text-xs text-gray-600 mt-1",children:["Sai: ",s.player_out]}),s.description&&e.jsx("p",{className:"text-xs text-gray-600 mt-1",children:s.description}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i?a.home_team:a.away_team})]})}),e.jsxs("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-12 h-12 bg-red-600 rounded-full flex items-center justify-center text-white font-bold shadow-lg z-10",children:[s.minute,"'"]}),e.jsx("div",{className:"w-5/12"})]},s.id)})})]}):e.jsxs("div",{className:"text-center py-12",children:[e.jsx(D,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-500",children:"Ainda sem eventos registados neste jogo"})]})})]})}function me({match:l}){const a={formation:"4-3-3",goalkeeper:{name:"Guarda-Redes",number:1},defenders:[{name:"Defesa",number:2},{name:"Defesa",number:3},{name:"Defesa",number:4},{name:"Defesa",number:5}],midfielders:[{name:"Médio",number:6},{name:"Médio",number:8},{name:"Médio",number:10}],forwards:[{name:"Avançado",number:7},{name:"Avançado",number:9},{name:"Avançado",number:11}]},s={...a},m=({player:i,team:c})=>e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center text-white font-bold shadow-lg ${c==="home"?"bg-red-600":"bg-blue-600"}`,children:i.number}),e.jsx("span",{className:"text-xs mt-1 text-white bg-black/50 px-2 py-1 rounded",children:i.name})]});return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs(g,{className:"border-0 shadow-lg overflow-hidden",children:[e.jsx(f,{className:"bg-gradient-to-r from-red-600 to-red-700",children:e.jsxs(N,{className:"text-white flex items-center justify-between",children:[e.jsx("span",{children:l.home_team}),e.jsx("span",{className:"text-sm",children:a.formation})]})}),e.jsx(u,{className:"p-0",children:e.jsxs("div",{className:"relative h-[600px] bg-cover bg-center",style:{backgroundImage:`url(${M.pitch})`},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-green-900/40 to-green-900/60"}),e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/30"}),e.jsx("div",{className:"absolute left-1/2 top-0 bottom-0 w-px bg-white/30"}),e.jsx("div",{className:"absolute left-1/2 top-1/2 w-20 h-20 border-2 border-white/30 rounded-full transform -translate-x-1/2 -translate-y-1/2"})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col justify-around p-8",children:[e.jsx("div",{className:"flex justify-around",children:a.forwards.map((i,c)=>e.jsx(m,{player:i,team:"home"},c))}),e.jsx("div",{className:"flex justify-around",children:a.midfielders.map((i,c)=>e.jsx(m,{player:i,team:"home"},c))}),e.jsx("div",{className:"flex justify-around",children:a.defenders.map((i,c)=>e.jsx(m,{player:i,team:"home"},c))}),e.jsx("div",{className:"flex justify-center",children:e.jsx(m,{player:
1a.goalkeeper,team:"home"})})]})]})})]}),e.jsxs(g,{className:"border-0 shadow-lg overflow-hidden",children:[e.jsx(f,{className:"bg-gradient-to-r from-blue-600 to-blue-700",children:e.jsxs(N,{className:"text-white flex items-center justify-between",children:[e.jsx("span",{children:l.away_team}),e.jsx("span",{className:"text-sm",children:s.formation})]})}),e.jsx(u,{className:"p-0",children:e.jsxs("div",{className:"relative h-[600px] bg-cover bg-center",style:{backgroundImage:`url(${M.pitch})`},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-green-900/40 to-green-900/60"}),e.jsxs("div",{className:"absolute inset-0",children:[e.jsx("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/30"}),e.jsx("div",{className:"absolute left-1/2 top-0 bottom-0 w-px bg-white/30"}),e.jsx("div",{className:"absolute left-1/2 top-1/2 w-20 h-20 border-2 border-white/30 rounded-full transform -translate-x-1/2 -translate-y-1/2"})]}),e.jsxs("div",{className:"absolute inset-0 flex flex-col justify-around p-8",children:[e.jsx("div",{className:"flex justify-around",children:s.forwards.map((i,c)=>e.jsx(m,{player:i,team:"away"},c))}),e.jsx("div",{className:"flex justify-around",children:s.midfielders.map((i,c)=>e.jsx(m,{player:i,team:"away"},c))}),e.jsx("div",{className:"flex justify-around",children:s.defenders.map((i,c)=>e.jsx(m,{player:i,team:"away"},c))}),e.jsx("div",{className:"flex justify-center",children:e.jsx(m,{player:s.goalkeeper,team:"away"})})]})]})})]})]})}function xe({match:l}){const a=[{title:"Resumo do Jogo",thumbnail:M.cafCeremony,url:(l==null?void 0:l.highlights_url)||(l==null?void 0:l.video_url)},{title:"Melhores Momentos",thumbnail:M.cafCrowd,url:l==null?void 0:l.best_moments_url},{title:"Todos os Golos",thumbnail:M.players.gelsonDala,url:l==null?void 0:l.goals_video_url}].filter(m=>!!m.url),s=l==null?void 0:l.full_match_url;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-red-600 to-red-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(F,{className:"w-5 h-5"}),"Destaques do Jogo"]})}),e.jsxs(u,{className:"p-6",children:[a.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map(m=>e.jsx("a",{href:m.url,target:"_blank",rel:"noopener noreferrer",className:"group",children:e.jsxs("div",{className:"relative overflow-hidden rounded-xl shadow-md hover:shadow-xl transition-all",children:[e.jsx("img",{src:m.thumbnail,alt:m.title,className:"w-full h-48 object-cover group-hover:scale-105 transition-transform duration-300"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent"}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-16 h-16 bg-red-600 rounded-full flex items-center justify-center group-hover:scale-110 transition-transform",children:e.jsx("div",{className:"w-0 h-0 border-l-8 border-t-6 border-b-6 border-transparent border-l-white ml-1"})})}),e.jsx("div",{className:"absolute bottom-4 left-4",children:e.jsx("h4",{className:"text-white font-bold",children:m.title})})]})},m.title))}):e.jsxs("div",{className:"rounded-xl border border-dashed border-gray-200 bg-gray-50 p-10 text-center",children:[e.jsx(F,{className:"mx-auto mb-3 h-10 w-10 text-gray-300"}),e.jsx("p",{className:"font-semibold text-gray-800",children:"Destaques ainda não publicados"}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Os vídeos serão apresentados quando existir uma ligação oficial associada ao jogo."})]}),s&&e.jsx("div",{className:"mt-6 p-6 bg-gradient-to-r from-gray-900 to-gray-800 rounded-xl",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-16 h-16 bg-red-600 rounded-full flex items-center justify-center",children:e.jsx(F,{className:"w-8 h-8 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-bold text-lg",children:"Jogo Completo"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"Ver transmissão integral"})]})]}),e.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-lg font-semibold transition-colors",children:["Assistir",e.jsx(U,{className:"w-4 h-4"})]})]})})]})]}),e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{children:e.jsx(N,{children:"Nas Redes Sociais"})}),e.jsxs(u,{children:[e.jsx("p",{className:"text-gray-600 text-center py-8",children:"Siga a FAF nas redes sociais para mais conteúdo exclusivo e bastidores"}),e.jsxs("div",{className:"flex justify-center gap-4",children:[e.jsx("a",{href:G.facebook,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:text-blue-700 font-semibold",children:"Facebook"}),e.jsx("a",{href:G.instagram,target:"_blank",rel:"noreferrer",className:"text-pink-600 hover:text-pink-700 font-semibold",children:"Instagram"})]})]})]})]})}function he({matchId:l}){const{data:a,isLoading:s}=A({queryKey:["odds",l],queryFn:async()=>(await _.entities.MatchOdds.filter({match_id:l}))[0],enabled:!!l});if(s||!a)return null;const m=[{label:"Casa",value:a.home_win,color:"bg-red-50 hover:bg-red-100 border-red-200"},{label:"Empate",value:a.draw,color:"bg-gray-50 hover:bg-gray-100 border-gray-200"},{label:"Fora",value:a.away_win,color:"bg-blue-50 hover:bg-blue-100 border-blue-200"}],i=[{label:"Mais de 2.5",value:a.over_2_5},{label:"Menos de 2.5",value:a.under_2_5}],c=[{label:"Ambas Marcam - Sim",value:a.btts_yes},{label:"Ambas Marcam - Não",value:a.btts_no}];return e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-green-600 to-green-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(H,{className:"w-5 h-5"}),"Odds do Jogo",a.last_updated&&e.jsxs(O,{variant:"outline",className:"ml-auto bg-white/20 text-white border-white/30",children:["Atualizado ",K(a.last_updated).fromNow()]})]})}),e.jsxs(u,{className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Resultado Final"}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:m.map((n,h)=>{var d;return e.jsxs(p.button,{initial:{opacity:0,y:10}
1,animate:{opacity:1,y:0},transition:{delay:h*.1},className:`${n.color} border-2 rounded-xl p-4 transition-all cursor-pointer`,children:[e.jsx("div",{className:"text-sm text-gray-600 mb-1",children:n.label}),e.jsx("div",{className:"text-2xl font-bold text-gray-900",children:(d=n.value)==null?void 0:d.toFixed(2)})]},n.label)})})]}),(a.over_2_5||a.under_2_5)&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Total de Golos"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map((n,h)=>n.value&&e.jsxs(p.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3+h*.1},className:"bg-gray-50 hover:bg-gray-100 border-2 border-gray-200 rounded-xl p-4 transition-all cursor-pointer",children:[e.jsx("div",{className:"text-sm text-gray-600 mb-1",children:n.label}),e.jsx("div",{className:"text-xl font-bold text-gray-900",children:n.value.toFixed(2)})]},n.label))})]}),(a.btts_yes||a.btts_no)&&e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Ambas as Equipas Marcam"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:c.map((n,h)=>n.value&&e.jsxs(p.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5+h*.1},className:"bg-purple-50 hover:bg-purple-100 border-2 border-purple-200 rounded-xl p-4 transition-all cursor-pointer",children:[e.jsx("div",{className:"text-sm text-gray-600 mb-1",children:n.label}),e.jsx("div",{className:"text-xl font-bold text-gray-900",children:n.value.toFixed(2)})]},n.label))})]}),a.provider&&e.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 pt-4 border-t",children:[e.jsx(se,{className:"w-4 h-4"}),e.jsxs("span",{children:["Odds fornecidas por ",a.provider]})]}),e.jsx("div",{className:"text-xs text-gray-500 bg-yellow-50 p-3 rounded-lg",children:"⚠️ As apostas podem causar dependência. Jogue com responsabilidade. +18"})]})]})}function ge({matchId:l,match:a}){const[s,m]=q.useState(null),[i,c]=q.useState(1),{data:n=[],isLoading:h}=A({queryKey:["tickets",l],queryFn:async()=>await _.entities.Ticket.filter({match_id:l}),enabled:!!l}),d=n.filter(o=>!o.ticket_type.includes("pacote")),r=n.filter(o=>o.ticket_type.includes("pacote")),t=()=>{alert(`Compra de ${i} ingresso(s) do tipo "${s.ticket_type}" iniciada!`)},x={vip:{icon:ae,color:"from-yellow-500 to-yellow-600"},bancada:{icon:Y,color:"from-blue-500 to-blue-600"},geral:{icon:z,color:"from-gray-500 to-gray-600"},pacote_mensal:{icon:S,color:"from-green-500 to-green-600"},pacote_temporada:{icon:S,color:"from-purple-500 to-purple-600"}},j={vip:"VIP",bancada:"Bancada",geral:"Geral",pacote_mensal:"Pacote Mensal",pacote_temporada:"Pacote Temporada"};return h||n.length===0?null:e.jsxs("div",{className:"space-y-6",children:[d.length>0&&e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-red-600 to-red-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5"}),"Ingressos Disponíveis"]})}),e.jsxs(u,{className:"p-6",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map((o,C)=>{const w=x[o.ticket_type]||x.geral,P=w.icon,$=(s==null?void 0:s.id)===o.id;return e.jsx(p.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:C*.1},onClick:()=>m(o),className:`relative cursor-pointer rounded-xl overflow-hidden transition-all ${$?"ring-4 ring-red-500 scale-105":"hover:scale-105"}`,children:e.jsxs("div",{className:`bg-gradient-to-br ${w.color} p-6 text-white`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 backdrop-blur-sm rounded-lg flex items-center justify-center",children:e.jsx(P,{className:"w-6 h-6"})}),$&&e.jsx("div",{className:"w-8 h-8 bg-white rounded-full flex items-center justify-center",children:e.jsx(E,{className:"w-5 h-5 text-green-600"})})]}),e.jsx("h3",{className:"text-xl font-bold mb-2",children:j[o.ticket_type]}),o.sector&&e.jsxs("div",{className:"flex items-center gap-1 text-sm mb-3 text-white/90",children:[e.jsx(Q,{className:"w-4 h-4"}),o.sector]}),e.jsxs("div",{className:"text-3xl font-bold mb-4",children:[o.price.toLocaleStr
1ing("pt-AO")," Kz"]}),o.benefits&&o.benefits.length>0&&e.jsx("div",{className:"space-y-1",children:o.benefits.slice(0,3).map((L,X)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm text-white/90",children:[e.jsx(E,{className:"w-4 h-4"}),L]},X))}),e.jsx("div",{className:"mt-4 pt-4 border-t border-white/20 text-sm",children:o.quantity_available>0?e.jsxs("span",{className:"text-white/90",children:[o.quantity_available," disponíveis"]}):e.jsx(O,{className:"bg-red-500 text-white",children:"Esgotado"})})]})},o.id)})}),e.jsx(ee,{children:s&&e.jsx(p.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-6 pt-6 border-t",children:e.jsxs("div",{className:"bg-gray-50 rounded-xl p-6",children:[e.jsx("h4",{className:"font-bold text-gray-900 mb-4",children:"Finalizar Compra"}),e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm text-gray-600 mb-2",children:"Quantidade"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{variant:"outline",size:"sm",onClick:()=>c(Math.max(1,i-1)),children:"-"}),e.jsx("span",{className:"w-12 text-center font-bold",children:i}),e.jsx(v,{variant:"outline",size:"sm",onClick:()=>c(Math.min(10,i+1)),children:"+"})]})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"text-sm text-gray-600 mb-1",children:"Total"}),e.jsxs("div",{className:"text-3xl font-bold text-red-600",children:[(s.price*i).toLocaleString("pt-AO")," Kz"]})]})]}),e.jsx(v,{className:"w-full bg-red-600 hover:bg-red-700 text-white",size:"lg",onClick:t,disabled:s.quantity_available===0,children:s.quantity_available===0?"Esgotado":"Comprar Ingressos"})]})})})]})]}),r.length>0&&e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-purple-600 to-purple-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(S,{className:"w-5 h-5"}),"Pacotes de Ingressos"]})}),e.jsx(u,{className:"p-6",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:r.map((o,C)=>{const w=x[o.ticket_type]||x.pacote_mensal,P=w.icon;return e.jsx(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:C*.1},className:"border-2 border-purple-200 rounded-xl p-6 hover:border-purple-400 transition-all cursor-pointer",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:`w-14 h-14 bg-gradient-to-br ${w.color} rounded-xl flex items-center justify-center text-white`,children:e.jsx(P,{className:"w-7 h-7"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:j[o.ticket_type]}),o.package_matches&&e.jsxs(O,{variant:"outline",className:"mb-3",children:[o.package_matches.length," jogos incluídos"]}),o.benefits&&o.benefits.length>0&&e.jsx("div",{className:"space-y-1 mb-4",children:o.benefits.map(($,L)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(E,{className:"w-4 h-4 text-green-600"}),$]},L))}),e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsxs("div",{className:"text-2xl font-bold text-purple-600",children:[o.price.toLocaleString("pt-AO")," Kz"]}),e.jsx(v,{className:"bg-purple-600 hover:bg-purple-700",children:"Comprar Pacote"})]})]})]})},o.id)})})})]})]})}function ue({matchId:l,match:a}){const{data:s=[],isLoading:m}=A({queryKey:["player-stats",l],queryFn:async()=>await _.entities.PlayerStats.filter({match_id:l}),enabled:!!l&&(a==null?void 0:a.status)==="finished"});if((a==null?void 0:a.status)!=="finished"||m||s.length===0)return null;const i=s.filter(t=>t.team==="home"),c=s.filter(t=>t.team==="away"),n=({label:t,homeValue:x,awayValue:j,max:o})=>{const C=x/o*100,w=j/o*100;return e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[e.jsx("span",{className:"font-semibold text-red-600",children:x}),e.jsx("span",{className:"text-gray-600",children:t}),e.jsx("span",{className:"font-semibold text-blue-600",children:j})]}),e.jsxs("div",{className:"flex gap-1 h-2",children:[e.jsx("div",{className:"flex-1 flex justify-end",children:e.jsx("div",{className:"bg-red-600 rounded-l",style:{width:`${C}%`}})}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"bg-blue-600 rounded-r",style:{width:`${w}%`}})})]})]})},h=({stats:t})=>{const x=t.passes_attempted>0?(t.passes_completed/t.passes_attempted*100).toFixed(0):0;return e.jsxs(p.div,{initial:{opacity:0,y:10}
1,animate:{opacity:1,y:0},className:"p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors group relative",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-gray-900",children:t.player_name}),e.jsxs("div",{className:"text-xs text-gray-500",children:[t.minutes_played,"'"]})]}),t.player_id&&e.jsx(R,{to:V(`PlayerDetail?id=${t.player_id}`),children:e.jsx(U,{className:"w-4 h-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity"})})]}),t.rating&&e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-yellow-400 to-yellow-600 rounded-lg flex items-center justify-center",children:e.jsx("span",{className:"text-white font-bold text-lg",children:t.rating.toFixed(1)})})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 text-center text-xs",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-green-600",children:t.goals}),e.jsx("div",{className:"text-gray-500",children:"⚽"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-blue-600",children:t.assists}),e.jsx("div",{className:"text-gray-500",children:"🎯"})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-bold text-purple-600",children:t.shots}),e.jsx("div",{className:"text-gray-500",children:"🥅"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"font-bold text-orange-600",children:[x,"%"]}),e.jsx("div",{className:"text-gray-500",children:"📊"})]})]}),t.yellow_cards>0&&e.jsx("div",{className:"mt-2 flex gap-1",children:Array(t.yellow_cards).fill(0).map((j,o)=>e.jsx("div",{className:"w-3 h-4 bg-yellow-400 rounded-sm"},o))}),t.red_cards>0&&e.jsx("div",{className:"mt-2 flex gap-1",children:Array(t.red_cards).fill(0).map((j,o)=>e.jsx("div",{className:"w-3 h-4 bg-red-600 rounded-sm"},o))})]})},d={shots:i.reduce((t,x)=>t+(x.shots||0),0),passes:i.reduce((t,x)=>t+(x.passes_completed||0),0),tackles:i.reduce((t,x)=>t+(x.tackles||0),0)},r={shots:c.reduce((t,x)=>t+(x.shots||0),0),passes:c.reduce((t,x)=>t+(x.passes_completed||0),0),tackles:c.reduce((t,x)=>t+(x.tackles||0),0)};return e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-indigo-600 to-indigo-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(k,{className:"w-5 h-5"}),"Estatísticas dos Jogadores"]})}),e.jsx(u,{className:"p-6",children:e.jsxs(J,{defaultValue:"overview",className:"space-y-6",children:[e.jsxs(B,{className:"grid grid-cols-3 w-full",children:[e.jsx(b,{value:"overview",children:"Visão Geral"}),e.jsx(b,{value:"home",children:a.home_team}),e.jsx(b,{value:"away",children:a.away_team})]}),e.jsxs(y,{value:"overview",className:"space-y-4",children:[e.jsx(n,{label:"Remates",homeValue:d.shots,awayValue:r.shots,max:Math.max(d.shots,r.shots)}),e.jsx(n,{label:"Passes Completados",homeValue:d.passes,awayValue:r.passes,max:Math.max(d.passes,r.passes)}),e.jsx(n,{label:"Desarmes",homeValue:d.tackles,awayValue:r.tackles,max:Math.max(d.tackles,r.tackles)})]}),e.jsx(y,{value:"home",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map(t=>e.jsx(h,{stats:t},t.id))})}),e.jsx(y,{value:"away",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:c.map(t=>e.jsx(h,{stats:t},t.id))})})]})})]})}function je({match:l,events:a,report:s}){const[m,i]=q.useState(""),c=W({mutationFn:async()=>{const n={home_team:l.home_team,away_team:l.away_team,home_score:l.home_score,away_score:l.away_score,competition:l.competition,venue:l.venue,events:a.map(t=>({minute:t.minute,type:t.event_type,player:t.player_name,team:t.team})),stats:s?{possession:{home:s.home_possession,away:s.away_possession},shots:{home:s.home_shots,away:s.away_shots},shots_on_target:{home:s.home_shots_on_target,away:s.away_shots_on_target}}:null},h=`Produza um rascunho editorial em português de Angola usando EXCLUSIVAMENTE os dados fornecidos abaixo.
2
3REGRAS OBRIGATÓRIAS:
4- Não invente golos, autores, minutos, desempenhos, contexto, público, tática ou declarações.
5- Não deduza factos que não estejam nos dados.
6- Quando faltar informação, escreva de forma neutra ou omita o ponto.
7- Não apresente o texto como comunicado oficial da FAF, CAF ou FIFA.
8- Produza no máximo 3 parágrafos e inclua no fim: "Rascunho gerado por IA, sujeito a revisão humana."
9
10${l.home_team} ${l.home_score} x ${l.away_score} ${l.away_team}
11Competição: ${l.competition}
12${l.venue?`Estádio: ${l.venue}`:""}
13
14Eventos principais:
15${a.slice(0,10).map(t=>`- ${t.minute}': ${t.event_type} - ${t.player_name} (${t.team==="home"?l.home_team:l.away_team})`).join(`
16`)}
17
18${s?`
19Estatísticas:
20- Posse de bola: ${s.home_possession}% x ${s.away_possession}%
21- Remates: ${s.home_shots} x ${s.away_shots}
22- Remates à baliza: ${s.home_shots_on_target} x ${s.away_shots_on_target}
23`:""}
24
25${s!=null&&s.man_of_match?`Homem do jogo registado: ${s.man_of_match}`:""}
26
27Contexto estruturado de controlo:
28${JSON.stringify(n)}`,d=await _.integrations.Core.InvokeLLM({prompt:h,add_context_from_internet:!1}
28),r=typeof d=="string"?d:(d==null?void 0:d.response)||(d==null?void 0:d.text)||(d==null?void 0:d.content);if(!r||typeof r!="string")throw new Error("A função de IA não devolveu texto.");return r.trim()},onSuccess:n=>{i(n)}});return l.status!=="finished"?null:e.jsxs(g,{className:"border-0 shadow-lg",children:[e.jsx(f,{className:"bg-gradient-to-r from-pink-600 to-pink-700",children:e.jsxs(N,{className:"text-white flex items-center gap-2",children:[e.jsx(I,{className:"w-5 h-5"}),"Resumo do Jogo por IA"]})}),e.jsxs(u,{className:"p-6",children:[!m&&!c.isPending&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx(Z,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"Gere um rascunho baseado apenas nos eventos e estatísticas registados"}),e.jsxs("div",{className:"mx-auto mb-5 flex max-w-lg items-start gap-2 rounded border border-amber-200 bg-amber-50 p-3 text-left text-xs text-amber-800",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("span",{children:"O texto não é oficial e deve ser revisto por uma pessoa antes de ser publicado."})]}),e.jsxs(v,{onClick:()=>c.mutate(),className:"bg-pink-600 hover:bg-pink-700",children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),"Gerar Resumo"]})]}),c.isPending&&e.jsxs("div",{className:"text-center py-12",children:[e.jsx(le,{className:"w-12 h-12 text-pink-600 mx-auto mb-4 animate-spin"}),e.jsx("p",{className:"text-gray-600",children:"A IA está a analisar o jogo e a gerar o resumo..."})]}),m&&e.jsxs(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[e.jsx("div",{className:"prose prose-gray max-w-none",children:m.split(`
29
30`).map((n,h)=>e.jsx("p",{className:"text-gray-700 leading-relaxed",children:n},h))}),e.jsxs(v,{onClick:()=>c.mutate(),variant:"outline",size:"sm",className:"mt-4",children:[e.jsx(I,{className:"w-4 h-4 mr-2"}),"Gerar Novo Resumo"]})]}),c.isError&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-red-600 mb-4",children:"Erro ao gerar resumo. Tente novamente."}),e.jsx(v,{onClick:()=>c.mutate(),variant:"outline",children:"Tentar Novamente"})]})]})]})}function Se(){var t,x;const a=new URLSearchParams(window.location.search).get("id"),{data:s,isLoading:m}=A({queryKey:["match",a],queryFn:async()=>(await _.entities.Match.filter({id:a}))[0],enabled:!!a,refetchInterval:j=>(j==null?void 0:j.status)==="live"?3e4:!1}),{data:i=[],isLoading:c}=A({queryKey:["match-events",a],queryFn:async()=>await _.entities.MatchEvent.filter({match_id:a},"minute"),enabled:!!a,refetchInterval:(s==null?void 0:s.status)==="live"?3e4:!1}),{data:n,isLoading:h}=A({queryKey:["match-report",a],queryFn:async()=>(await _.entities.MatchReport.filter({match_id:a}))[0],enabled:!!a&&(s==null?void 0:s.status)==="finished"});if(m)return e.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx(T,{className:"h-64 rounded-2xl mb-8"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsx(T,{className:"h-96"}),e.jsx(T,{className:"h-96"})]})]})});if(!s)return e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"w-20 h-20 text-gray-300 mx-auto mb-4"}),e.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Jogo não encontrado"}),e.jsx(R,{to:V("Matches"),children:e.jsx(v,{children:"Voltar aos Jogos"})})]})});const d=s.status==="live",r=s.status==="finished";return e.jsxs("main",{className:"min-h-screen bg-gray-50",children:[e.jsx("section",{className:"bg-gradient-to-br from-faf-blue via-faf-blue-light to-faf-blue-dark py-8",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsx(R,{to:V("Matches"),children:e.jsxs(v,{variant:"ghost",className:"text-white hover:bg-white/10 mb-6",children:[e.jsx(re,{className:"w-4 h-4 mr-2"}),"Voltar aos Jogos"]})}),e.jsxs("div",{className:"bg-white/10 backdrop-blur-lg rounded-2xl p-6 md:p-8",children:[e.jsxs("div",{className:"flex items-center justify-center gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(S,{className:"w-4 h-4"}),e.jsx("span",{children:K(s.match_date).format("DD/MM/YYYY - HH:mm")}
30)]}),s.venue&&e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(Q,{className:"w-4 h-4"}),e.jsx("span",{children:s.venue})]})]}),e.jsx("div",{className:"text-center mb-4",children:e.jsx("span",{className:"text-gray-300 text-sm",children:s.competition})}),e.jsxs("div",{className:"grid grid-cols-3 items-center gap-4 md:gap-8",children:[e.jsxs("div",{className:"text-center",children:[s.home_logo?e.jsx("img",{src:s.home_logo,alt:s.home_team,loading:"lazy",decoding:"async",className:"w-20 h-20 md:w-24 md:h-24 mx-auto mb-4 object-contain"}):e.jsx("div",{className:"w-20 h-20 md:w-24 md:h-24 mx-auto mb-4 bg-white/20 rounded-full flex items-center justify-center text-white text-3xl font-bold",children:(t=s.home_team)==null?void 0:t.charAt(0)}),e.jsx("h2",{className:"text-white font-bold text-xl md:text-2xl",children:s.home_team})]}),e.jsxs("div",{className:"text-center",children:[d&&e.jsxs("div",{className:"inline-flex items-center gap-2 bg-red-600 text-white px-4 py-1 rounded-full mb-4 animate-pulse",children:[e.jsx("span",{className:"w-2 h-2 bg-white rounded-full"}),e.jsx("span",{className:"font-bold",children:"AO VIVO"})]}),e.jsxs("div",{className:"text-5xl md:text-6xl font-bold text-white",children:[s.home_score??"-"," : ",s.away_score??"-"]}),r&&e.jsx("div",{className:"text-green-400 mt-2 font-semibold",children:"FINALIZADO"}),s.status==="scheduled"&&e.jsx("div",{className:"text-gray-300 mt-2",children:"AGENDADO"})]}),e.jsxs("div",{className:"text-center",children:[s.away_logo?e.jsx("img",{src:s.away_logo,alt:s.away_team,loading:"lazy",decoding:"async",className:"w-20 h-20 md:w-24 md:h-24 mx-auto mb-4 object-contain"}):e.jsx("div",{className:"w-20 h-20 md:w-24 md:h-24 mx-auto mb-4 bg-white/20 rounded-full flex items-center justify-center text-white text-3xl font-bold",children:(x=s.away_team)==null?void 0:x.charAt(0)}),e.jsx("h2",{className:"text-white font-bold text-xl md:text-2xl",children:s.away_team})]})]})]})]})}),e.jsx("section",{className:"py-8",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs(J,{defaultValue:d?"live":r?"stats":"info",className:"space-y-6",children:[e.jsxs(B,{className:"bg-white shadow-sm p-1 rounded-xl",children:[d&&e.jsxs(b,{value:"live",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(k,{className:"w-4 h-4 mr-2"}),"Ao Vivo"]}),(d||r)&&e.jsxs(e.Fragment,{children:[e.jsxs(b,{value:"timeline",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(Z,{className:"w-4 h-4 mr-2"}),"Cronologia"]}),e.jsxs(b,{value:"stats",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(k,{className:"w-4 h-4 mr-2"}),"Estatísticas"]})]}),e.jsxs(b,{value:"formations",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),"Formações"]}),e.jsxs(b,{value:"odds",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(H,{className:"w-4 h-4 mr-2"}),"Odds"]}),e.jsxs(b,{value:"tickets",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(S,{className:"w-4 h-4 mr-2"}),"Ingressos"]}),r&&e.jsxs(b,{value:"highlights",className:"data-[state=active]:bg-red-600 data-[state=active]:text-white",children:[e.jsx(F,{className:"w-4 h-4 mr-2"}),"Destaques"]})]}),d&&e.jsx(y,{value:"live",children:e.jsx(ne,{match:s,events:i})}),e.jsx(y,{value:"timeline",children:e.jsx(de,{events:i,match:s})}),e.jsxs(y,{value:"stats",className:"space-y-6",children:[e.jsx(je,{match:s,events:i,report:n}),n?e.jsx(ie,{report:n,match:s}):e.jsxs("div",{className:"bg-white rounded-xl p-12 text-center shadow-sm",children:[e.jsx(k,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-500",children:"Estatísticas não disponíveis"})]}),e.jsx(ue,{matchId:a,match:s})]}),e.jsx(y,{value:"formations",children:e.jsx(me,{match:s})}),e.jsx(y,{value:"odds",children:e.jsx(he,{matchId:a})}),e.jsx(y,{value:"tickets",children:e.jsx(ge,{matchId:a,match:s})}),r&&e.jsx(y,{value:"highlights",children:e.jsx(xe,{match:s})})]})})})]})}export{Se as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.