PageSourceSearch

https://flightsim.to/assets/AirportCountryPage-Di2_Gn3l.js

js flightsim.to collected 2026-09-24 08:51:03 UTC 10,033 bytes, 1 lines download raw bytes

1import{h as Oe,u as _e,a8 as De,a_ as Le,aX as Fe,r as s,aO as Be,ai as Ue,dw as Me,ac as ke,b7 as Ge,ab as We,j as t,dx as He,ad as Ve,N as Q,b as Y,au as $e,ce as ze}from"./index-B6VyhArb.js";import{d as qe,e as J,S as Qe,F as Ye,a as Je,A as Ke}from"./ActiveFilters-BsM7Ehue.js";import{A as Xe}from"./AddonGrid-DodytKIc.js";import{P as Ze}from"./Pagination-t7dyVY6t.js";import{B as et}from"./BaseProductCards-8WIsaWLL.js";import{u as tt}from"./useAddons-CZblphBm.js";import{u as ot}from"./useCountrySeo-CV84DWI_.js";import{i as st,g as rt}from"./countryNames-BEVf-rBe.js";import{u as at}from"./useGridAdCount-BiwJLYtB.js";import{H as nt}from"./house-B_36s4T9.js";import"./types-DXPrN7FL.js";import"./checkbox-C74p5cIM.js";import"./minus-DflIUhDo.js";import"./useFilters-DeSUeq6_.js";import"./useCategories-DftlvZQr.js";import"./select-DNd0oyui.js";import"./PremiumUpsellModal-DfkioD2L.js";import"./grid-3x3-DrHlsbqR.js";import"./list-Dysu8a_g.js";import"./useUserDownloads-ComG1wSK.js";import"./addonApi-DpLuacJX.js";const o={SEARCH:"q",SUBCATEGORIES:"sub_cat",SIMULATORS:"sim",BASE_PRODUCTS:"product",RATING:"rating",UPDATE_TIME:"updated",FREEWARE:"free",PAYWARE:"paid",PROFESSIONAL:"pro",VIEW:"view",PER_PAGE:"per_page",MIN_DOWNLOADS:"min_downloads"},K=a=>a?a.split(",").filter(Boolean):[],X=(a,C)=>a===null?C:a==="1"||a==="true",it=(a,C)=>{if(!a)return C;const j=parseInt(a,10);return isNaN(j)?C:j},Z="/airports/country",I="newest";function It(){const{t:a}=Oe("countries"),{countryCode:C,"*":j}=_e(),n=(C||"").toUpperCase(),h=st(n),p=rt(n),ee=De(),fe=Le(),[l,te]=Fe(),Se=(j||"").split("/").filter(Boolean),oe=qe(Se),se=oe.sort||I,re=oe.page||1,[v,O]=s.useState(()=>l.get(o.SEARCH)||""),ae=Be(v,500),[f,M]=s.useState(()=>K(l.get(o.SUBCATEGORIES))),[k,he]=s.useState([]),[g,_]=s.useState(()=>K(l.get(o.SIMULATORS))),[c,y]=s.useState(()=>K(l.get(o.BASE_PRODUCTS))),[x,D]=s.useState(()=>{const e=l.get(o.RATING);return e?parseInt(e,10):null}),[P,L]=s.useState(()=>l.get(o.UPDATE_TIME)),[A,G]=s.useState(()=>X(l.get(o.FREEWARE),!0)),[b,W]=s.useState(()=>X(l.get(o.PAYWARE),!0)),[R,H]=s.useState(()=>X(l.get(o.PROFESSIONAL),!1)),[d,V]=s.useState(se),[E,xe]=s.useState(()=>l.get(o.VIEW)||"grid"),[F,r]=s.useState(re),[S,ne]=s.useState(()=>it(l.get(o.PER_PAGE),12)),[w,B]=s.useState(()=>{const e=l.get(o.MIN_DOWNLOADS);return e?parseInt(e,10):null}),[U,ie]=s.useState(!1),Pe=at();s.useEffect(()=>{V(se),r(re)},[j]);const le=s.useRef(n);s.useEffect(()=>{le.current!==n&&(r(1),O(""),le.current=n)},[n]);const{data:m,isLoading:Ce,isFetching:ve}=tt({q:ae||void 0,cat:["airports"],subCat:f.length>0?f:void 0,sim:g.length>
10?g:void 0,country:[n],product:c.length>0?c:void 0,rating:x??void 0,updated:P??void 0,free:A?void 0:!1,paid:b?void 0:!1,pro:R||void 0,sort:d,page:F,perPage:S-Pe,minDownloads:w??void 0,excludeCat:k.length>0?k:void 0}),ce=(m==null?void 0:m.addons)??[],ye=(m==null?void 0:m.meta.totalPages)??1,N=(m==null?void 0:m.meta.total)??0,$=Ce||ve,de=s.useRef("");s.useEffect(()=>{const e=new URLSearchParams;v&&e.set(o.SEARCH,v),f.length>0&&e.set(o.SUBCATEGORIES,f.join(",")),g.length>0&&e.set(o.SIMULATORS,g.join(",")),c.length>0&&e.set(o.BASE_PRODUCTS,c.join(",")),x!==null&&e.set(o.RATING,x.toString()),P&&e.set(o.UPDATE_TIME,P),A||e.set(o.FREEWARE,"0"),b||e.set(o.PAYWARE,"0"),R&&e.set(o.PROFESSIONAL,"1"),E!=="grid"&&e.set(o.VIEW,E),S!==12&&e.set(o.PER_PAGE,S.toString()),w!==null&&e.set(o.MIN_DOWNLOADS,w.toString());const i=e.toString();i!==de.current&&(de.current=i,te(e,{replace:!0}))},[v,f,g,c,x,P,A,b,R,E,S,w,te]);const ue=(e,i)=>{const T=J(Z,n,e,i,I);ee(`${T}${fe.search}`,{replace:!1})},u=e=>i=>{e(i),r(1)},Ae=()=>{O(""),M([]),_([]),y([]),D(null),L(null),G(!0),W(!0),H(!1),B(null),r(1)},be={q:v||void 0,cat:["airports"],subCat:f.length>0?f:void 0,sim:g.length>
10?g:void 0,country:[n],product:c.length>0?c:void 0,rating:x??void 0,updated:P??void 0,free:A?void 0:!1,paid:b?void 0:!1,pro:R||void 0,sort:d!=="newest"?d:void 0,perPage:S!==12?S:void 0},{longdesc:ge,metaDescription:Re}=ot(h?n:""),Ee=`${p} Airports for MSFS 2024 & 2020 | Flightsim.to`,we=`Download free airport scenery add-ons for ${p} in Microsoft Flight Simulator 2024 and 2020. Detailed terminals, ground enhancements, and more.`,je=h?Ee:"Page not found | Flightsim.to",me=h?Re||we:"The page you were looking for could not be found.",pe=ge?Ue(ge):"",Ne=Me(),z=d==="random",q=!d||d===I,Te=h?`${Ne}${J(Z,n,q&&!z?d:void 0,q&&!z?F:1,I)}`:null,Ie=h?z||!q&&F>1?"noindex,follow":void 0:"noindex,follow";return ke({title:je,description:me,canonical:Te,robots:Ie,jsonLd:h?[Ge({category:`${p} Airports`,description:me,itemCount:N,url:`/airports/country/${n}`}),We([{name:"Home",url:"/"},{name:"Airports",url:"/airports"},{name:"Countries",url:"/countries"},{name:p,url:`/airports/country/${n}`}])]:void 0}),h?t.jsxs(Ve,{children:[t.jsxs("div",{className:"relative overflow-hidden bg-gradient-to-br from-emerald-500/10 via-background to-emerald-500/10 border-b border-border",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 h-1 bg-gradient-to-r from-emerald-500 via-teal-400 to-emerald-500 z-10"}),t.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[t.jsx("div",{className:"absolute -top-1/2 -right-1/4 w-96 h-96 bg-emerald-500/5 rounded-full blur-3xl animate-pulse"}),t.jsx("div",{className:"absolute -bottom-1/2 -left-1/4 w-96 h-96 bg-emerald-500/5 rounded-full blur-3xl animate-pulse",style:{animationDelay:"1s"}}),t.jsx("div",{className:"absolute inset-0 opacity-[0.02]",style:{backgroundImage:"linear-gradient(hsl(var(--foreground)) 1px, transparent 1px), linear-gradient(90deg, hsl(var(--foreground)) 1px, transparent 1px)",backgroundSize:"50px 50px"}})]}),t.jsxs("div",{className:"relative max-w-[1920px] mx-auto px-4 sm:px-6 py-16 lg:py-20 text-center",children:[t.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex items-center justify-center gap-1.5 text-sm text-muted-foreground mb-6",children:[t.jsxs(Q,{to:"/",className:"hover:text-foreground transition-colors flex items-center gap-1",children:[t.jsx(nt,{className:"h-3.5 w-3.5"}),t.jsx("span",{children:a("home")})]}),t.jsx(Y,{className:"h-3.5 w-3.5"}),t.jsx(Q,{to:"/airports",className:"hover:text-foreground transition-colors",children:a("airports")}),t.jsx(Y,{className:"h-3.5 w-3.5"}),t.jsx(Q,{to:"/countries",className:"hover:text-foreground transition-colors",children:a("countries")}),t.jsx(Y,{className:"h-3.5 w-3.5"}),t.jsx("span",{className:"text-foreground font-medium",children:p})]}),t.jsxs("h1",{className:"text-4xl font-extrabold tracking-tight md:text-5xl mb-4 flex flex-wrap items-center justify-center gap-3",children:[t.jsx($e,{countryCode:n,size:"lg"}),t.jsx("span",{className:"bg-gradient-to-r from-foreground via-foreground to-emerald-500 bg-clip-text text-transparent",children:a("country_airports",{country:p,defaultValue:"{{country}} Airports"})})]}),t.jsx("p",{className:"text-xl font-medium text-muted-foreground max-w-6xl mx-auto text-center",children:N>0?a("airport_addons_available",{num:N.toLocaleString(),defaultValue:"{{num}} airport addons available"}):a("airport_scenery_addons",{defaultValue:"Airport scenery addons"})}),pe&&t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-6xl mx-auto mt-6 text-muted-foreground text-justify",dangerouslySetInnerHTML:{__html:pe}})]})]}),t.jsxs("div",{className:"min-h-screen bg-background max-w-[1920px] mx-auto category-cards-light",children:[t.jsx(Qe,{searchQuery:v,onSearchChange:e=>{O(e),r(1)},resultCount:N,onToggleSidebar:()=>ie(!U),isSidebarOpen:U,title:a("country_airports",{country:p,defaultValue:"{{country}} Airports"}),placeholder:a("search_country_airports",{country:p,defaultValue:"Search {{country}} airports..."}),disableSuggestions:!0}),t.jsxs("div",{className:"flex",children:[t.jsx(Ye,{selectedCategories:["airports"],onCategoryChange:()=>{},selectedSubcategories:f,onSubcategoryChange:u(M),excludedCategories:k,onExcludedCategoriesChange:u(he),selectedSimulators:g,onSimulatorChange:u(_),selectedCountries:[n],onCountryChange:()=>{},selectedBaseProducts:c,onBaseProductChange:u(y),selectedRating:x,onRatingChange:u(D),selectedUpdateTime:P,onUpdateTimeChange:u(L),showFreeware:A,onFreewareChange:u(G),showPayware:b,onPaywareChange:u(W),professionalOnly:R,onProfessionalChange:u(H),isOpen:U,lockedCategory:"airports",lockedCountry:n,minDownloads:w,onMinDownloadsChange:u(B)}),U&&t.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-30 lg:hidden",onClick:()=>ie(!1)}),t.jsxs("main",{className:"flex-1 min-w-0 p-4 sm:p-6",children:[t.jsx(Je,{viewMode:E,onViewModeChange:xe,sortBy:d,onSortChange:e=>{V(e),r(1),ue(e,1)},currentSearchParams:be,onLoadSearch:e=>{e.q!==void 0&&O(e.q||""),e.subCat&&M(e.subCat),e.sim&&_(e.sim),e.product&&y(e.product),e.rating!==void 0&&D(e.rating??null),e.updated!==void 0&&L(e.updated??null),e.sort&&V(e.sort),e.perPage&&ne(e.perPage),e.minDownloads!==void 0&&B(e.minDownloads??null),r(1)},scope:"airports-country"}),t.jsx(Ke,{selectedCategories:["airports"],onCategoryRemove:()=>{},selectedSimulators:g,onSimulatorRemove:e=>{_(i=>i.filter(T=>T!==e)),r(1)},selectedCountries:[n],onCountryRemove:()=>ee("/airports"),selectedBaseProducts:c,onBaseProductRemove:e=>{y(i=>i.filter(T=>T!==e)),r(1)},selectedRating:x,onRatingRemove:()=>{D(null),r(1)},selectedUpdateTime:P,onUpdateTimeRemove:()=>{L(null),r(1)},showFreeware:A,showPayware:b,onFreewareToggle:()=>{G(!0),r(1)},onPaywareToggle:()=>{W(!0),r(1)},professionalOnly:R,onProfessionalRemove:()=>{H(!1),r(1)},minDownloads:w,onMinDownloadsRemove:()=>{B(null),r(1)},onClearAll:Ae,lockedCategory:"airports"}),!$&&t.jsx(et,{addons:ce,searchQuery:ae,selectedBaseProducts:c,onBaseProductSelect:e=>{y(i=>[...i,e]),r(1)}}),$?t.jsx(ze,{viewMode:E,count:S}):t.jsx(Xe,{addons:ce,viewMode:E,onBaseProductSelect:e=>{y(i=>i.includes(e)?i:[...i,e]),r(1)}}),!$&&t.jsx(Ze,{currentPage:F,totalPages:ye,totalItems:N,itemsPerPage:S,onPageChange:e=>{r(e),ue(d,e)},getPageHref:e=>J(Z,n,d,e,I),onItemsPerPageChange:e=>{ne(e),r(1)},showPerPage:!1})]})]})]})]}):t.jsx(He,{})}export{It 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.