1import{j as t}from"./editor-BhGk7_S1.js";import{u as I,b as B,L as X,a as K}from"./index-BjIHAQhU.js";import{B as C}from"./button-CK76V7Lo.js";import{t as k}from"./countryTranslations--xXtAg9U.js";import{b as i,a as M}from"./leaflet-DcfcX7a_.js";import{A as Y}from"./arrow-left-DCV3pRgt.js";import{S as J}from"./search-DBs4wGfH.js";import{D as W}from"./download-DqerNq_s.js";import"./mapbox-BPFQ-Sfv.js";import"./trpc-DqtxhgQo.js";const F={sure:{en:"Certain",fr:"Certain"},very_probable:{en:"Very Probable",fr:"Très probable"},probable:{en:"Probable",fr:"Probable"},uncertain:{en:"Uncertain",fr:"Incertain"}},R={all:{en:"All Continents",fr:"Tous les continents"},Africa:{en:"Africa",fr:"Afrique"},"North America":{en:"North America & Central",fr:"Amérique du Nord & Centrale"},"South America":{en:"South America",fr:"Amérique du Sud"},Asia:{en:"Asia",fr:"Asie"},Europe:{en:"Europe",fr:"Europe"},"Middle East":{en:"Middle East",fr:"Moyen-Orient"},Oceania:{en:"Oceania",fr:"Océanie"},Arctic:{en:"Arctic",fr:"Arctique"},Antarctica:{en:"Antarctica",fr:"Antarctique"}};function Z(s){return s>=1e9?`${(s/1e9).toFixed(1)}B`:s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toString()}function tt({countryId:s,countryName:S,highestProbability:A,cardElement:j}){const{language:b}=I(),{data:p,isLoading:v}=B.countriesStatus.getContactLeads.useQuery({countryId:s}),[g,N]=i.useState({top:0,left:0});i.useEffect(()=>{if(j){const d=j.getBoundingClientRect(),x=288,w=200,l=16,L=window.innerWidth<768;let m,n;L?(m=d.bottom+8,n=Math.max(l,Math.min(window.innerWidth-x-l,d.left+d.width/2-x/2)),d.bottom+w>window.innerHeight&&(m=d.top-w-8)):(m=d.bottom+window.scrollY+8,n=d.left+window.scrollX,n+x>window.innerWidth&&(n=window.innerWidth-x-l),n<l&&(n=l)),N({top:m,left:n})}},[j]);const c=typeof window<"u"&&window.innerWidth<768,T=c?"fixed":"absolute";if(v||!p)return M.createPortal(t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:104",className:`${T} bg-gray-900 text-white text-xs rounded-lg p-3 w-72 shadow-lg z-[9999] border border-gray-700 pointer-events-none`,style:{top:c?`${g.top}px`:`${g.top}px`,left:c?`${g.left}px`:`${g.left}px`},children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:108",className:"font-semibold mb-2",children:[k(S,b)," - ",A?F[A][b]:"N/A"]}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:111",className:"text-gray-400",children:b==="fr"?"Chargement...":"Loading..."})]}),document.body);const h={sure:Object.values(p.sure||{}).flat().length,very_probable:Object.values(p.very_probable||{}).flat().length,probable:Object.values(p.probable||{}).flat().length,uncertain:Object.values(p.uncertain||{}).flat().length};return M.createPortal(t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:126",className:`${T} bg-gray-900 text-white text-xs rounded-lg p-3 w-72 shadow-lg z-[9999] border border-gray-700 pointer-events-none max-h-96 overflow-y-auto`,style:{top:c?`${g.top}px`:`${g.top}px`,left:c?`${g.left}px`:`${g.left}px`},children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:130",className:"font-semibold mb-2",children:[k(S,b)," - ",A?F[A][b]:"N/A"]}),Object.entries(p).map(([d,x])=>{const w=h[d];return w===0?null:t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:139",className:"mb-2",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:140",className:"font-semibold text-gray-300",children:[F[d][b]," (",w,")"]}),Object.entries(x).map(([l,L])=>t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:144",className:"ml-2 text-gray-400",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:145",className:"text-gray-500",children:[l,":"]}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:146",className:"ml-2",children:L.map((m,n)=>t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:148",children:m.name},n))})]},l))]},d)})]}),document.body)}function ut(){const{language:s}=I(),[S,A]=i.useState("all"),[j,b]=i.useState("probable"),[p,v]=i.useState(null),[g,N]=i.useState(null),[c,T]=i.useState(()=>typeof window<"u"&&localStorage.getItem("countriesSortBy")||"alphabetical"),[h,d]=i.useState(""),[x,w]=i.useState(!0),[l,L]=i.useState(!0),m=e=>{T(e),typeof window<"u"&&localStorage.setItem("countriesSortBy",e)},{data:n}=B.countriesStatus.getGlobalStats.useQuery(),{data:P,isLoading:_}=B.countriesStatus.getCountriesStatus.useQuery({continent:S==="all"?void 0:S,probabilityFilters:["sure","very_probable","probable","uncertain"]}),f=i.useMemo(()=>P?P.filter(e=>!!(x&&!e.participating||l&&e.participating)):[],[P,x,l]),O=e=>{if(!e)return!1;const a=["sure","very_probable","probable","uncertain"],r=a.indexOf(e),u=a.indexOf(j);return r<=u},[E,z]=i.useState(!1);i.useEffect(()=>{z("ontouchstart"in window||navigator.maxTouchPoints>0)},[]);const $=i.useMemo(()=>
1{if(!f)return[];let e=[...f];return h.trim()&&(e=e.filter(a=>k(a.name,s).toLowerCase().includes(h.toLowerCase()))),c==="alphabetical"?e.sort((a,r)=>a.name.localeCompare(r.name)):c==="population"&&e.sort((a,r)=>r.population-a.population),e},[f,h,c,s]),D=(e,a)=>{E||(v(e),N(a))},U=()=>{E||(v(null),N(null))},q=(e,a,r)=>{E&&(r.stopPropagation(),p===e?(v(null),N(null)):(v(e),N(a)))};i.useEffect(()=>{if(!E||!p)return;const e=r=>{r.target.closest("[data-country-id]")||(v(null),N(null))},a=setTimeout(()=>{document.addEventListener("click",e),document.addEventListener("touchstart",e)},100);return()=>{clearTimeout(a),document.removeEventListener("click",e),document.removeEventListener("touchstart",e)}},[p,E]),f?.length,f?.filter(e=>e.isPotential&&e.highestProbability&&O(e.highestProbability)).length;const Q=n?.participating||0,G=n?.potential||0,H=n?.toReach||0,V=n?.missing||0;return t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:315",className:"min-h-screen bg-background text-foreground",children:[t.jsx("header",{"data-loc":"client/src/pages/CountriesStatus.tsx:316",className:"border-b border-border bg-card/50 backdrop-blur-sm",children:t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:317",className:"container mx-auto px-4 py-6",children:[t.jsx(X,{"data-loc":"client/src/pages/CountriesStatus.tsx:318",href:"/",children:t.jsxs(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:319",variant:"ghost",size:"sm",className:"mb-3",children:[t.jsx(Y,{"data-loc":"client/src/pages/CountriesStatus.tsx:320",className:"w-4 h-4 mr-2"}),s==="fr"?"Retour":"Back"]})}),t.jsx("h1",{"data-loc":"client/src/pages/CountriesStatus.tsx:324",className:"text-3xl font-bold mb-1",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:s==="fr"?"Ãtat du défi":"Challenge Status"}),t.jsx("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:327",className:"text-sm text-muted-foreground",children:s==="fr"?"Pays non-participants : potentiels (nuances de bleu) et à atteindre (gris)":"Non-participating countries: potential (shades of blue) and to reach (grey)"})]})}),t.jsxs("main",{"data-loc":"client/src/pages/CountriesStatus.tsx:335",className:"container mx-auto px-4 py-6",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:337",className:"bg-card/50 backdrop-blur-sm rounded-lg border-2 border-[#4A9EFF] p-4 mb-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:338",className:"relative",children:[t.jsx(J,{"data-loc":"client/src/pages/CountriesStatus.tsx:339",className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),t.jsx("input",{"data-loc":"client/src/pages/CountriesStatus.tsx:340",type:"text",placeholder:s==="fr"?"Rechercher un pays...":"Search for a country...",value:h,onChange:e=>d(e.target.value),className:"w-full bg-background border border-border rounded-md pl-10 pr-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-[oklch(0.50_0.15_259)] transition-all"})]}),h&&t.jsxs("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:349",className:"mt-2 text-xs text-muted-foreground",children:[f?.filter(e=>k(e.name,s).toLowerCase().includes(h.toLowerCase())).length||0," ",s==="fr"?"résultats":"results"]})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:359",className:"space-y-3 mb-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:361",className:"bg-white/5 backdrop-blur-md rounded-xl border border-white/10 p-4",children:[t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:362",className:"text-xs font-semibold mb-2 uppercase tracking-wide",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:s==="fr"?"Afficher":"Show"}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:365",className:"flex flex-wrap gap-1.5",children:[t.jsx(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:366",size:"sm",variant:x?"default":"outline",onClick:()=>w(!x),className:`text-xs h-7 transition-all duration-200 ${x?"bg-gradient-to-r from-[#002FA7] to-[#0047FF] text-white":"hover:bg-white/10"}`,children:s==="fr"?"Pays manquants":"Missing Countries"}),t.jsx(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:374",size:"sm",variant:l?"default":"outline",onClick:()=>L(!l),className:`text-xs h-7 transition-all duration-200 ${l?"bg-gradient-to-r from-[#002FA7] to-[#0047FF] text-white":"hover:bg-white/10"}`,children:s==="fr"?"Pays existants":"Existing Countries"})]})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:386",className:"bg-white/5 backdrop-blur-md rounded-xl border border-white/10 p-4",children:[t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:387",className:"text-xs font-semibold mb-2 uppercase tracking-wide",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:"Continent"}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:390",className:"flex flex-wrap gap-1.5",children:Object.keys(R).map(e=>t.jsx(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:392",size:"sm",variant:S===e?"default":"outline",onClick:()=>A(e),className:`text-xs h-7 transition-all duration-200 ${S===e?"bg-gradient-to-r from-[#002FA7] to-[#0047FF] text-white":"hover:bg-white/10"}`,children:R[e][s]},e))})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:406",className:"bg-white/5 backdrop-blur-md rounded-xl border border-white/10 p-4",children:[t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:407",className:"text-xs font-semibold mb-3 uppercase tracking-wide",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:s==="fr"?"Seuil de confiance":"Confidence Threshold"}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:410",className:"max-w-md mx-auto px-2",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:411",className:"relative pt-1 pb-1",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:413",className:"relative h-2 bg-gray-700 rounded-full",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:415",className:"absolute top-0 left-0 h-full w-1/3 bg-[#2563EB] rounded-l-full"}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:416",className:"absolute top-0 left-1/3 h-full w-1/3 bg-[#3B82F6]"}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:417",className:"absolute top-0 left-2/3 h-full w-1/3 bg-[#60A5FA] rounded-r-full"}),["sure","very_probable","probable","uncertain"].map((e,a)=>{const r=j===e,u=["0%","33.33%","66.66%","100%"];return t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:424",className:`absolute top-1/2 -translate-y-1/2 rounded-full bg-white border-2 border-white shadow-md transition-all duration-200 ${r?"w-4 h-4":"w-3 h-3"}`,style:{left:u[a],marginLeft:r?"-8px":"-6px"},children:r&&t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:432",className:"absolute inset-0 m-auto w-2 h-2 rounded-full bg-[#2563EB]"})},e)})]}),t.jsx("input",{"data-loc":"client/src/pages/CountriesStatus.tsx:440",type:"range",min:"0",max:"3",step:"1",value:["sure","very_probable","probable","uncertain"].indexOf(j),onChange:e=>{b(["sure","very_probable","probable","uncertain"][parseInt(e.target.value)])},className:"absolute -top-2 -left-2 w-[calc(100%+16px)] h-12 opacity-0 cursor-pointer",style:{margin:0}}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:453",className:"flex justify-between mt-2 text-xs",children:[t.jsxs("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:454",className:"text-foreground flex items-center gap-1",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:455",className:"w-3 h-3 rounded",style:{backgroundColor:"#2563EB"}}),F.sure[s]]}),t.jsxs("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:458",className:"text-foreground flex items-center gap-1",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:459",className:"w-3 h-3 rounded",style:{backgroundColor:"#3B82F6"}}),F.very_probable[s]]}),t.jsxs("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:462",className:"text-foreground flex items-center gap-1",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:463",className:"w-3 h-3 rounded",style:{backgroundColor:"#60A5FA"}}),F.probable[s]]}),t.jsxs("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:466",className:"text-foreground flex items-center gap-1",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:467",className:"w-3 h-3 rounded",style:{backgroundColor:"#93C5FD"}}),F.uncertain[s]]})]})]}),t.jsx("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:472",className:"text-xs text-muted-foreground mt-2 text-center",children:s==="fr"?"Tous les pays restent visibles : en couleur (au-dessus du seuil) ou en gris (en dessous)":"All countries remain visible: in color (above threshold) or gray (below)"})]})]}),t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:481",className:"bg-white/5 backdrop-blur-md rounded-xl border border-white/10 p-4",children:t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:482",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:484",children:[t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:485",className:"text-xs font-semibold mb-2 uppercase tracking-wide",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:s==="fr"?"Trier par":"Sort by"}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:488",className:"flex flex-wrap gap-1.5",children:[t.jsx(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:489",size:"sm",variant:c==="alphabetical"?"default":"outline",onClick:()=>m("alphabetical"),className:`text-xs h-7 transition-all duration-200 ${c==="alphabetical"?"bg-gradient-to-r from-[#002FA7] to-[#0047FF] text-white":"hover:bg-white/10"}`,children:s==="fr"?"Alphabétique":"Alphabetical"}),t.jsx(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:497",size:"sm",variant:c==="population"?"default":"outline",onClick:()=>m("population"),className:`text-xs h-7 transition-all duration-200 ${c==="population"?"bg-gradient-to-r from-[#002FA7] to-[#0047FF] text-white":"hover:bg-white/10"}`,children:"Population"})]})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:509",children:[t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:510",className:"text-xs font-semibold mb-2 uppercase tracking-wide",style:{background:"linear-gradient(90deg, #0047FF 0%, #00A3FF 50%, #4AC3FF 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",color:"transparent"},children:s==="fr"?"Exporter liste":"Export list"}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:513",className:"flex flex-wrap gap-1.5",children:[t.jsxs(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:514",size:"sm",variant:"outline",onClick:()=>{const a=$.filter(y=>!y.participating).map(y=>k(y.name,s)).join(` 2`),r=new Blob([a],{type:"text/csv"}),u=URL.createObjectURL(r),o=document.createElement("a");o.href=u,o.download=`missing-countries-${new Date().toISOString().split("T")[0]}.csv`,o.click(),URL.revokeObjectURL(u)},className:"text-xs h-7",children:[t.jsx(W,{"data-loc":"client/src/pages/CountriesStatus.tsx:530",className:"w-3 h-3 mr-1"}),"CSV"]}),t.jsxs(C,{"data-loc":"client/src/pages/CountriesStatus.tsx:533",size:"sm",variant:"outline",onClick:()=>{const a=$.filter(y=>!y.participating).map(y=>k(y.name,s)).join(` 3`),r=new Blob([a],{type:"text/plain"}),u=URL.createObjectURL(r),o=document.createElement("a");o.href=u,o.download=`missing-countries-${new Date().toISOString().split("T")[0]}.txt`,o.click(),URL.revokeObjectURL(u)},className:"text-xs h-7",children:[t.jsx(W,{"data-loc":"client/src/pages/CountriesStatus.tsx:549",className:"w-3 h-3 mr-1"}),"TXT"]})]})]})]})})]}),n&&t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:560",className:"grid grid-cols-2 gap-2 mb-4 text-sm md:text-base",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:562",className:"bg-muted/30 backdrop-blur-sm rounded border border-border px-3 py-1.5",children:[t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:563",className:"text-muted-foreground",children:s==="fr"?"Manquants :":"Missing:"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:564",className:"ml-1.5 font-semibold",children:V})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:566",className:"bg-muted/30 backdrop-blur-sm rounded border border-border px-3 py-1.5",children:[t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:567",className:"text-muted-foreground",children:s==="fr"?"Participants :":"Participating:"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:568",className:"ml-1.5 font-semibold",style:{color:"oklch(0.33 0.18 259)"},children:Q})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:571",className:"bg-muted/30 backdrop-blur-sm rounded border border-border px-3 py-1.5",children:[t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:572",className:"text-muted-foreground",children:s==="fr"?"Potentiels :":"Potential:"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:573",className:"ml-1.5 font-semibold",style:{color:"oklch(0.50 0.15 259)"},children:G})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:575",className:"bg-muted/30 backdrop-blur-sm rounded border border-border px-3 py-1.5",children:[t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:576",className:"text-muted-foreground",children:s==="fr"?"à atteindre :":"To reach:"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:577",className:"ml-1.5 font-semibold text-muted-foreground",children:H})]})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:583",className:"mb-4 p-3 bg-muted/20 rounded-lg border border-border/50",children:[t.jsx("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:584",className:"text-xs text-muted-foreground uppercase tracking-widest font-semibold mb-2.5",children:s==="fr"?"Légende":"Legend"}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:587",className:"flex flex-wrap gap-x-5 gap-y-2",children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:588",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:589",className:"w-4 h-4 rounded-sm flex-shrink-0",style:{backgroundColor:"oklch(0.33 0.18 259)"}}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:590",className:"text-xs text-foreground
3/80",children:s==="fr"?"Participant (projection confirmée)":"Participating (confirmed screening)"})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:594",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:595",className:"w-4 h-4 rounded-sm flex-shrink-0 bg-blue-600"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:596",className:"text-xs text-foreground/80",children:"Certain"})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:600",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:601",className:"w-4 h-4 rounded-sm flex-shrink-0 bg-blue-500"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:602",className:"text-xs text-foreground/80",children:s==="fr"?"Très probable":"Very likely"})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:606",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:607",className:"w-4 h-4 rounded-sm flex-shrink-0 bg-blue-400"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:608",className:"text-xs text-foreground/80",children:"Probable"})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:612",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:613",className:"w-4 h-4 rounded-sm flex-shrink-0 bg-blue-300"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:614",className:"text-xs text-foreground/80",children:s==="fr"?"Incertain":"Uncertain"})]}),t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:618",className:"flex items-center gap-2",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:619",className:"w-4 h-4 rounded-sm flex-shrink-0 bg-gray-600"}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:620",className:"text-xs text-foreground/80",children:s==="fr"?"à atteindre (pas encore contacté)":"To reach (not yet contacted)"})]})]})]}),_?t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:629",className:"flex items-center justify-center py-12",children:[t.jsx(K,{"data-loc":"client/src/pages/CountriesStatus.tsx:630",className:"w-8 h-8 animate-spin",style:{color:"oklch(0.50 0.15 259)"}}),t.jsx("span",{"data-loc":"client/src/pages/CountriesStatus.tsx:631",className:"ml-3 text-sm text-muted-foreground",children:s==="fr"?"Chargement...":"Loading..."})]}):f&&f.length>0?t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:636",className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 xl:grid-cols-10 gap-2 overflow-visible relative z-0",children:$.map(e=>{let a="bg-gray-600",r="border-gray-500",u={};if(e.participating)u={backgroundColor:"oklch(0.33 0.18 259)"},r="border-blue-700";else if(e.isPotential&&e.highestProbability)if(O(e.highestProbability))switch(e.highestProbability){case"sure":a="bg-blue-600",r="border-blue-500";break;case"very_probable":a="bg-blue-500",r="border-blue-400";break;case"probable":a="bg-blue-400",r="border-blue-300";break;case"uncertain":a="bg-blue-300",r="border-blue-200";break}else a="bg-gray-500",r="border-gray-400";return t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:677","data-country-id":e.id,className:`backdrop-blur-sm rounded border p-3 transition-all hover:scale-105 cursor-pointer relative ${a} ${r}`,style:u,onMouseEnter:o=>D(e.id,o.currentTarget),onMouseLeave:()=>U(),onClick:o=>q(e.id,o.currentTarget,o),children:[t.jsxs("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:686",className:"flex flex-col items-center text-center gap-1",children:[t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:687",className:"w-8 h-6 flex items-center justify-center",children:t.jsx("img",{"data-loc":"client/src/pages/CountriesStatus.tsx:688",src:`https://flagcdn.com/40x30/${e.alpha2Code.toLowerCase()}.png`,alt:e.alpha2Code,width:40,height:30,className:"object-contain",onError:o=>{o.target.style.display="none"}})}),t.jsx("h3",{"data-loc":"client/src/pages/CountriesStatus.tsx:697",className:"text-[10px] font-semibold leading-tight line-clamp-2 text-white",children:k(e.name,s)}),t.jsx("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:700",className:"text-[9px] text-white/80",children:Z(e.population)}),e.isPotential&&t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:705",className:"absolute top-1 right-1 w-2 h-2 bg-white rounded-full opacity-60"})]}),p===e.id&&t.jsx(tt,{"data-loc":"client/src/pages/CountriesStatus.tsx:709",countryId:e.id,countryName:e.n
3ame,highestProbability:e.highestProbability,cardElement:g})]},e.id)})}):t.jsx("div",{"data-loc":"client/src/pages/CountriesStatus.tsx:721",className:"text-center py-12",children:t.jsx("p",{"data-loc":"client/src/pages/CountriesStatus.tsx:722",className:"text-muted-foreground",children:s==="fr"?"Aucun pays trouvé.":"No countries found."})})]})]})}export{ut 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.