PageSourceSearch

https://evisas.io/assets/PassportRankingPage-DGTH3q2u.js

js evisas.io collected 2026-10-04 02:56:00 UTC 7,499 bytes, 1 lines download raw bytes

1import{r as x,j as e}from"./vendor-react-CuUun9aL.js";import{L as p}from"./vendor-router-CIKCSSKp.js";import{u as q}from"./vendor-query-Ch735aT_.js";import{L}from"./Layout-Bk_vQitF.js";import{S as I}from"./SEOHead-xAnMX-_f.js";import{S as y}from"./StructuredData-BrIJJOA7.js";import{C as v,c as w}from"./card-khC1k9a2.js";import{I as T}from"./input-Ccd_OHYE.js";import{B as A}from"./badge-tBo3c1at.js";import{T as F,a as P,b as h,c as k,d as D,e as t}from"./table-Bf8kae7D.js";import{C as E}from"./CountryFlag-NpnLM-_i.js";import{ALL_COUNTRIES as U}from"./visaRequirements-f5162uEq.js";import{g as V,a as B}from"./passportRankingSEOContent-B_Vpoz4N.js";import{J as H,i as O,ap as M,aq as Q,ar as $,I as z}from"./vendor-icons-9tdgZqZ8.js";import"./Navbar-CqwzzPzc.js";import"./index-CffYHF1C.js";import"./vendor-supabase-V01cKGWO.js";import"./vendor-radix-DHc79Ej6.js";import"./UrlOverrideIndicator-CJCJwHPD.js";import"./popover-Bf6khzEE.js";import"./usePermissions-DvkYesNC.js";import"./dropdown-menu-LhELHrUX.js";import"./sheet-C33TcIpV.js";import"./Footer-B7AGr3h3.js";import"./countryDemonyms-BoC0npe0.js";const u=r=>{var d;return((d=U.find(a=>a.code===r))==null?void 0:d.name)||r},fe=()=>{const[r,d]=x.useState(""),[a,S]=x.useState("rank"),[g,j]=x.useState("asc"),{data:m=[],isLoading:f}=q({queryKey:["passport-rankings"],queryFn:B,staleTime:24*60*60*1e3}),i=V(),b=x.useMemo(()=>{let s=m;if(r.trim()){const l=r.toLowerCase();s=s.filter(c=>c.passport_code.toLowerCase().includes(l)||u(c.passport_code).toLowerCase().includes(l))}return[...s].sort((l,c)=>{const N=g==="asc"?1:-1;return a==="rank"?N*(l.rank-c.rank):N*(l[a]-c[a])})},[m,r,a,g]),C=s=>{a===s?j(o=>o==="asc"?"desc":"asc"):(S(s),j(s==="rank"?"asc":"desc"))},n=({field:s,children:o,className:l=""})=>e.jsx(k,{className:`cursor-pointer select-none hover:bg-muted/50 transition-colors ${l}`,onClick:()=>C(s),children:e.jsxs("div",{className:"flex items-center gap-1",children:[o,e.jsx(M,{className:`h-3 w-3 ${a===s?"text-primary":"text-muted-foreground/50"}`})]})}),_=s=>s===1?e.jsx(Q,{className:"h-5 w-5 text-yellow-500"}):s===2?e.jsx($,{className:"h-5 w-5 text-gray-400"}):s===3?e.jsx(z,{className:"h-5 w-5 text-amber-600"}):null,R=s=>s===1?"bg-yellow-50 border-yellow-200 dark:bg-yellow-950/20":s===2?"bg-gray-50 border-gray-200 dark:bg-gray-950/20":s===3?"bg-amber-50 border-amber-200 dark:bg-amber-950/20":s<=10?"bg-primary/5 border-primary/10":"";return e.jsxs(L,{children:[e.jsx(I,{title:i.title,description:i.description,canonicalUrl:i.canonicalUrl,ogUrl:i.ogUrl,ogImage:"https://evisas.io/og-image.png"}),e.jsx(y,{type:"BreadcrumbList",breadcrumbItems:[{name:"Home",url:"https://evisas.io/"},{name:"Passport Ranking",url:"https://evisas.io/passport-ranking"}]}),e.jsx(y,{type:"FAQPage",faqItems:i.faqItems}),e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-primary/5 to-background",children:[e.jsx("section",{className:"bg-primary text-primary-foreground py-12 md:py-16",children:e.jsxs("div",{className:"container-custom text-center",children:[e.jsx("div",{className:"flex items-center justify-center gap-3 mb-4",children:e.jsx(H,{className:"h-10 w-10 md:h-12 md:w-12"})}),e.jsxs("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-4",children:["Passport Ranking ",new Date().getFullYear()]}),e.jsx("p",{className:"text-lg md:text-xl text-primary-foreground/80 max-w-2xl mx-auto",children:"Travel Mobility Score — Ranking passports by visa-free, eVisa, and visa-on-arrival access worldwide"}),m.length>0&&e.jsxs("p",{className:"mt-3 text-primary-foreground/60 text-sm",children:[m.length," passports ranked • Data updated regularly"]})]})}),e.jsxs("section",{className:"container-custom py-8 md:py-12",children:[e.jsx("div",{className:"mb-6",children:e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(O,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(T,{placeholder:"Search by country name or code...",value:r,onChange:s=>d(s.target.value),className:"pl-10"})]})}),f?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent roun
1ded-full animate-spin"})}):e.jsx(v,{children:e.jsx(w,{className:"p-0",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(F,{children:[e.jsx(P,{children:e.jsxs(h,{className:"bg-muted/30",children:[e.jsx(n,{field:"rank",className:"w-16",children:"Rank"}),e.jsx(k,{className:"min-w-[200px]",children:"Country"}),e.jsx(n,{field:"score",className:"text-center",children:"Score"}),e.jsx(n,{field:"visa_free",className:"text-center hidden sm:table-cell",children:"Visa Free"}),e.jsx(n,{field:"e_visa",className:"text-center hidden sm:table-cell",children:"eVisa"}),e.jsx(n,{field:"visa_on_arrival",className:"text-center hidden md:table-cell",children:"VOA"}),e.jsx(n,{field:"visa_required",className:"text-center hidden lg:table-cell",children:"Required"})]})}),e.jsxs(D,{children:[b.map(s=>e.jsxs(h,{className:R(s.rank),children:[e.jsx(t,{className:"font-bold text-center",children:e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[_(s.rank),e.jsx("span",{children:s.rank})]})}),e.jsx(t,{children:e.jsxs(p,{to:`/passport-ranking/${s.passport_code.toLowerCase()}`,className:"flex items-center gap-3 hover:text-primary transition-colors group",children:[e.jsx(E,{code:s.passport_code,name:u(s.passport_code),size:"md"}),e.jsx("span",{className:"font-medium group-hover:underline",children:u(s.passport_code)})]})}),e.jsx(t,{className:"text-center",children:e.jsx(A,{variant:"default",className:"text-sm font-bold px-3 py-1",children:s.score})}),e.jsx(t,{className:"text-center hidden sm:table-cell",children:e.jsx("span",{className:"text-green-600 font-semibold",children:s.visa_free})}),e.jsx(t,{className:"text-center hidden sm:table-cell",children:e.jsx("span",{className:"text-blue-600 font-semibold",children:s.e_visa})}),e.jsx(t,{className:"text-center hidden md:table-cell",children:e.jsx("span",{className:"text-yellow-600 font-semibold",children:s.visa_on_arrival})}),e.jsx(t,{className:"text-center hidden lg:table-cell",children:e.jsx("span",{className:"text-red-500 font-semibold",children:s.visa_required})})]},s.passport_code)),b.length===0&&!f&&e.jsx(h,{children:e.jsxs(t,{colSpan:7,className:"text-center py-12 text-muted-foreground",children:['No passports found matching "',r,'"']})})]})]})})})})]}),e.jsxs("section",{className:"container-custom pb-12 md:pb-16",children:[e.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Frequently Asked Questions"}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:i.faqItems.map((s,o)=>e.jsx(v,{children:e.jsxs(w,{className:"p-6",children:[e.jsx("h3",{className:"font-semibold text-foreground mb-2",children:s.question}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.answer})]})},o))})]}),e.jsx("section",{className:"container-custom pb-12",children:e.jsxs("div",{className:"flex flex-wrap gap-3 justify-center text-sm",children:[e.jsx(p,{to:"/visa-requirements",className:"text-primary hover:underline",children:"Visa Requirements by Passport"}),e.jsx("span",{className:"text-muted-foreground",children:"•"}),e.jsx(p,{to:"/visa-eligibility",className:"text-primary hover:underline",children:"Visa Eligibility Checker"}),e.jsx("span",{className:"text-muted-foreground",children:"•"}),e.jsx(p,{to:"/countries",className:"text-primary hover:underline",children:"All Countries"})]})})]})]})};export{fe 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.