PageSourceSearch

https://www.getstopover.com/_next/static/chunks/07gpefc0nq_q5.js

js getstopover.com collected 2026-10-02 01:30:52 UTC 31,941 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58308,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(74080);let a=(0,e.i(56420).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var s=e.i(24071),l=e.i(67927),o=e.i(45129);let i=["January","February","March","April","May","June","July","August","September","October","November","December"],c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],u=["Su","Mo","Tu","We","Th","Fr","Sa"];function d(e,t){return new Date(e,t+1,0).getDate()}function m(e){if(!e)return"";let[,t,r]=e.split("-").map(Number);return`${r} ${c[t-1]}`}function f(e,t){return 11===t?{y:e+1,m:0}:{y:e,m:t+1}}let x={low:"bg-emerald-500",mid:"bg-amber-400",high:"bg-red-500"};function p({viewYear:e,viewMonth:r,showPrev:n,showNext:a,onPrev:o,onNext:c,onPick:m,isDisabled:f,isToday:h,selStart:b,selEnd:y,previewEnd:g,onHover:w,prices:v,bare:j=!1}){let N=d(e,r),k=new Date(e,r,1).getDay(),C=[];for(let e=0;e<k;e++)C.push(null);for(let e=1;e<=N;e++)C.push(e);let $=y??g??null,S=!!b&&!!$;return(0,t.jsxs)("div",{className:j?"w-full":"flex-1 min-w-0 max-w-[336px]",children:[!j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2 h-9",children:[n?(0,t.jsx)("button",{type:"button",onClick:o,className:"p-2 rounded-full hover:bg-surface-container-high transition-colors","aria-label":"Previous month",children:(0,t.jsx)(s.ChevronLeft,{className:"h-4 w-4 text-ink",strokeWidth:2,"aria-hidden":"true"})}):(0,t.jsx)("span",{className:"w-8"}),(0,t.jsxs)("span",{className:"text-[15px] font-semibold text-ink",children:[i[r]," ",e]}),a?(0,t.jsx)("button",{type:"button",onClick:c,className:"p-2 rounded-full hover:bg-surface-container-high transition-colors","aria-label":"Next month",children:(0,t.jsx)(l.ChevronRight,{className:"h-4 w-4 text-ink",strokeWidth:2,"aria-hidden":"true"})}):(0,t.jsx)("span",{className:"w-8"})]}),(0,t.jsx)("div",{className:"grid grid-cols-7 mb-1",children:u.map(e=>(0,t.jsx)("div",{className:"text-center text-[10px] font-medium text-muted py-1",children:e[0]},e))})]}),(0,t.jsx)("div",{className:`grid grid-cols-7 content-start gap-y-0.5 ${j?"":"min-h-[322px]"}`,children:C.map((n,a)=>{var s;let l,o,i;if(null===n)return(0,t.jsx)("div",{},`empty-${a}`);let c=(l=(s=new Date(e,r,n)).getFullYear(),o=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0"),`${l}-${o}-${i}`),u=f(n),d=h(n),p=u?void 0:v?.[c],g=!!b&&c===b,N=!!y&&c===y,k=!!$&&c===$,C=g||N||k&&!y;return(0,t.jsxs)("button",{type:"button",disabled:u,onClick:()=>m(c),onMouseEnter:()=>{u||w?.(c)},className:`relative h-[52px] w-full text-sm transition-colors ${u?"text-muted/40 cursor-not-allowed":"cursor-pointer"}`,children:[!!b&&!!$&&c>b&&c<$&&(0,t.jsx)("span",{className:"absolute inset-x-0 inset-y-2 bg-primary/10","aria-hidden":"true"}),g&&S&&(0,t.jsx)("span",{className:"absolute left-1/2 right-0 inset-y-2 bg-primary/10","aria-hidden":"true"}),k&&S&&(0,t.jsx)("span",{className:"absolute left-0 right-1/2 inset-y-2 bg-primary/10","aria-hidden":"true"}),(0,t.jsx)("span",{className:`relative z-10 flex items-center justify-center transition-colors ${C?"mx-auto my-1.5 h-[calc(100%-12px)] w-10 rounded-[10px] bg-primary text-on-primary font-semibold":u?"h-full w-full":`mx-auto my-1.5 h-[calc(100%-12px)] w-10 rounded-[10px] hover:bg-primary/10 ${d?j?"border border-outline text-on-surface":"font-semibold text-primary":""}`}`,children:n}),!C&&(p?(0,t.jsx)("span",{className:`absolute bottom-1 left-1/2 -translate-x-1/2 h-1.5 w-1.5 rounded-full z-10 ${x[p]}`,"aria-hidden":"true"}):d?j?(0,t.jsx)("span",{className:"absolute -bottom-1.5 left-1/2 z-10 -translate-x-1/2 text-[9px] font-medium leading-none text-muted",children:"Today"}):(0,t.jsx)("span",{className:"absolute bottom-1 left-1/2 -translate-x-1/2 h-1 w-1 rounded-full bg-primary z-10"}):null)]},n)})})]})}e.s(["DatePicker",0,function({value:e,onChange:s,min:l,label:c,placeholder:x="Select date",variant:h="default",icon:b,ariaLabel:y,triggerClassName:g,compact:w=!1,wide:v=!1,prices:j,returnValue:N,tripType:k,onRangeChange:C,openSignal:$}){let S,D,E=!!C,M=k??"oneway",[P,R]=(0,r.useState)(!1),[T,A]=(0,r.useState)(null),O=(0,r.useRef)(null),L=(0,r.useRef)(null),F=(0,r.useRef)(null),U=(0,o.useMediaQuery)("(max-width: 1023px)"),z=(0,o.useMediaQuery)("(min-width: 1024px)")&&!w&&(!!C||v),I=new Date;I.setHours(0,0,0,0);let _=l?new Date(l+"T00:00:00"):I,W=e?new Date(e+"T00:00:00"):I,[Y,G]=(0,r.useState)(W.getFullYear()),[K,H]=(0,r.useState)(W.getMonth()),J=(0,r.useCallback)(e=>{let t=e.target;O.current?.contains(t)||L.current?.contains(t)||R(!1)},[]);(0,r.useEffect)(()=>(document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)),[J]),(0,r.useEffect)(()=>
1{if(!P||w)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[P,w]),(0,r.useEffect)(()=>{if(!$)return;let e=setTimeout(()=>R(!0),0);return()=>clearTimeout(e)},[$]),(0,r.useEffect)(()=>{if(!P||!U)return;let t=F.current;if(!t)return;let r=e?new Date(e+"T00:00:00"):new Date,n=t.querySelector(`[data-month="${r.getFullYear()}-${r.getMonth()}"]`);n&&n.scrollIntoView({block:"start"})},[P,U,e]);let q=(0,r.useRef)(!1);(0,r.useEffect)(()=>{q.current&&!P&&E&&"roundtrip"===M&&e&&!N&&C?.(e,null,"oneway"),q.current=P},[P,E,M,e,N,C]);let[B,Q]=(0,r.useState)(e);if(e!==B&&(Q(e),e)){let t=new Date(e+"T00:00:00"),r=t.getFullYear(),n=t.getMonth(),a=z?f(Y,K):null;r===Y&&n===K||a&&r===a.y&&n===a.m||(G(r),H(n))}function V(e){let t=K+e,r=Y;for(;t<0;)t+=12,r-=1;for(;t>11;)t-=12,r+=1;H(t),G(r)}function X(e,t,r){return new Date(e,t,r)<_}function Z(e,t,r){let n=new Date;return r===n.getDate()&&t===n.getMonth()&&e===n.getFullYear()}let ee=(S=0===K?11:K-1,new Date(D=0===K?Y-1:Y,S,d(D,S))>=_);function et(t){if(!E)return void s?.(t);if("oneway"===M)return void C(t,null,"oneway");let r=!!N;!e||r||t<e?C(t,null,"roundtrip"):C(e,t,"roundtrip"),A(null)}function er(t){t!==M&&("oneway"===t?C(e,null,"oneway"):C(e,N||null,"roundtrip"))}let en="",ea="";function es(){let r=e||null,n=E&&"roundtrip"===M&&N||null,a=E&&"roundtrip"===M&&r&&!n&&T&&T>r?T:null,s=z?[{y:Y,m:K},f(Y,K)]:[{y:Y,m:K}],l=!!j&&Object.keys(j).length>0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex gap-8 justify-center",onMouseLeave:()=>A(null),children:s.map((e,l)=>(0,t.jsx)(p,{viewYear:e.y,viewMonth:e.m,showPrev:0===l&&ee,showNext:l===s.length-1,onPrev:()=>V(-1),onNext:()=>V(1),onPick:et,isDisabled:t=>X(e.y,e.m,t),isToday:t=>Z(e.y,e.m,t),selStart:r,selEnd:n,previewEnd:a,onHover:A,prices:j},l))}),l&&(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-center gap-4 text-[11px] font-medium text-on-surface-variant",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500","aria-hidden":"true"})," Good price"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-400","aria-hidden":"true"})," Average"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-red-500","aria-hidden":"true"})," High"]})]})]})}function el(){let r=(0,t.jsx)("button",{type:"button",onClick:()=>R(!1),disabled:!e,className:"h-[38px] rounded-full bg-primary px-5 text-sm font-semibold text-on-primary transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:"Apply"});return E?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-5",children:[(0,t.jsx)("span",{className:"text-base sm:text-lg font-bold text-on-surface truncate",children:"oneway"===M?e?`${m(e)} \xb7 one-way`:"Select date":e&&N?`${m(e)} → ${m(N)}`:e?`${m(e)} \xb7 pick return`:"Select departure"}),(0,t.jsx)("div",{className:"flex items-center gap-0.5 shrink-0 rounded-full bg-surface-container-high p-[3px] text-sm font-medium",children:["oneway","roundtrip"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>er(e),className:`px-3.5 py-1.5 rounded-full transition-colors ${M===e?"bg-surface-container-lowest text-on-surface shadow-sm":"text-on-surface-variant hover:text-on-surface"}`,children:"oneway"===e?"One-way":"Round-trip"},e))})]}),es(),(0,t.jsxs)("div",{className:"sticky bottom-0 mt-4 flex items-center justify-between gap-3 border-t border-outline-variant/15 bg-surface-container-lowest pt-4 pb-1",children:[(0,t.jsx)("span",{className:"text-[13px] font-medium text-on-surface-variant",children:function(){if("oneway"===M)return e?`${m(e)} \xb7 one-way`:"Pick your departure date";if(e&&N){let t,r=(t=new Date(e+"T00:00:00").getTime(),Math.max(0,Math.round((new Date(N+"T00:00:00").getTime()-t)/864e5)));return`${m(e)} → ${m(N)} \xb7 ${r} night${1===r?"":"s"}`}return e?"Pick your return date":"Pick your departure date"}()}),r]})]}):(0,t.jsxs)("div",{children:[es(),(0,t.jsx)("div",{className:"sticky bottom-0 mt-4 flex justify-end border-t border-outline-variant/15 bg-surface-container-lowest pt-4 pb-1",children:r})]})}E&&"roundtrip"===M?e&&N?en=`${m(e)} → ${m(N)}`:e&&(en=m(e),ea=" → Add return"):E?e&&(en=m(e),ea=" · one-way"):en=e?function(e){if(!e)return"";let[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}(e):"";let eo=P&&w&&(0,t.jsx)("div",{className:`mt-2 w-full ${"hero"===h?"rounded-none border border-border-line bg-surface shadow-brutal-sm":"rounded-xl border border-outline-variant/20 bg-surface-container-lowest editorial-shadow"} p-4`,children:el()}),ei=P&&U&&!w&&"u">typeof document?(0,n.createPortal)(function(){let r=e||null,n=E&&"roundtrip"===M&&N||null,s=new Date(Math.max(I.getTime(),_.getTime())),l=[];for(let e=0;e<12;e++)l.push({y:new Date(s.getFullYear(),s.getMonth()+e,1).getFullYear(),m:new Date(s.getFullYear(),s.getMonth()+e,1).getMonth()});return(0,t.jsxs)("div",{ref:L,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] flex flex-col bg-surface-container-lowest",children:[(0,t.jsxs)("div",{className:"relative flex h-14 shrink-0 items-center justify-center",children:[(0,t.jsx)("button",{type:"button",onClick:()=>R(!1),"aria-label":"Close date picker",className:"absolute left-2 flex h-10 w-10 items-center justify-center rounded-full text-on-surface transition-colors hover:bg-surface-container-low",children:(0,t.jsx)(a,{className:"h-5 w-5",strokeWidth:2,"aria-hidden":"true"})}),(0,t.jsx)("span",{className:"text-base font-bold text-on-surface",children:"Select Dates"})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-5 pb-3",children:[(0,t.jsx)("span",{className:"min-w-0 text-lg leading-snug",children:E?"oneway"===M?e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-bold text-on-surface",children:m(e)}),(0,t.jsx)("span",{className:"font-medium text-on-surface-variant",children:" · one-way"})]}):(0,t.jsx)("span",{className:"font-medium text-on-surface-variant",children:"Pick departure"}):e&&N?(0,t.jsxs)("span",{className:"font-bold text-on-surface",children:[m(e)," → ",m(N)]}):e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-bold text-on-surface",children:m(e)}),(0,t.jsx)("span",{className:"font-medium text-on-surface-variant",children:" · pick return"})]}):(0,t.jsx)("span",{className:"font-medium text-on-surface-variant",children:"Pick departure"}):e?(0,t.jsx)("span",{className:"font-bold text-on-surface",children:m(e)}):(0,t.jsx)("span",{className:"font-medium text-on-surface-variant",children:"Pick a date"})}),E&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-0.5 rounded-full bg-surface-container-high p-[3px] text-sm font-medium",children:["oneway","roundtrip"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>er(e),className:`px-3.5 py-1.5 rounded-full transition-colors ${M===e?"bg-surface-container-lowest text-on-surface shadow-sm":"text-on-surface-variant hover:text-on-surface"}`,children:"oneway"===e?"One-way":"Roundtrip"},e))})]}),(0,t.jsx)("div",{className:"grid shrink-0 grid-cols-7 border-b border-outline-variant px-5 pb-2",children:u.map((e,r)=>(0,t.jsx)("span",{className:"text-center text-[11px] font-medium text-muted",children:e[0]},r))}),(0,t.jsx)("div",{ref:F,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-4",children:l.map(e=>(0,t.jsxs)("div",{"data-month":`${e.y}-${e.m}`,children:[(0,t.jsxs)("p",{className:"pb-2 pt-6 text-center text-[15px] font-bold text-on-surface",children:[i[e.m]," ",e.y]}),(0,t.jsx)(p,{viewYear:e.y,viewMonth:e.m,showPrev:!1,showNext:!1,onPrev:()=>{},onNext:()=>{},onPick:et,isDisabled:t=>X(e.y,e.m,t),isToday:t=>Z(e.y,e.m,t),selStart:r,selEnd:n,previewEnd:null,prices:j,bare:!0})]},`${e.y}-${e.m}`))}),(0,t.jsx)("div",{className:"shrink-0 border-t border-outline-variant px-5 pb-[max(1rem,env(safe-area-inset-bottom))] pt-3",children:(0,t.jsx)("button",{type:"button",onClick:()=>R(!1),disabled:!e,className:"w-full rounded-full bg-primary py-3.5 text-[15px] font-bold text-on-primary transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40",children:"Apply"})})]})}(),document.body):null,ec=!P||U||w||"u"<typeof document?null:(0,n.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm","aria-hidden":"true",onClick:()=>R(!1)}),(0,t.jsx)("div",{ref:L,role:"dialog","aria-modal":"true",className:`relative w-full ${z?"max-w-[760px]":"max-w-[400px]"} max-h-[90vh] overflow-y-auto rounded-3xl border border-outline-variant bg-surface-container-lowest px-7 pt-8 pb-6 editorial-shadow`,children:el()})]}),document.body),eu=y??`${c??"Date"}: ${en?en+ea:x}`;return"pill"===h?(0,t.jsxs)("div",{ref:O,className:"relative",children:[c&&(0,t.jsx)("label",{className:"text-xs font-medium text-on-surface-variant block mb-0.5",children:c}),(0,t.jsx)("button",{type:"button",onClick:()=>R(!0),"aria-label":eu,"aria-expanded":P,"aria-haspopup":"dialog",className:g??"w-full text-left text-sm font-semibold text-on-surface bg-transparent outline-none flex items-center gap-2",children:en?(0,t.jsxs)("span",{className:"truncate",children:[en,ea&&(0,t.jsx)("span",{className:"font-medium text-on-surface-variant/80",children:ea})]}):(0,t.jsx)("span",{className:"text-on-surface-variant/90",children:x})}),eo,ei,ec]}):"hero"===h?(0,t.jsxs)("div",{ref:O,className:"relative",children:[(0,t.jsxs)("div",{className:"relative",children:[b&&(0,t.jsx)("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted",children:b}),(0,t.jsx)("button",{type:"button",onClick:()=>R(!0),"aria-label":eu,"aria-expanded":P,"aria-haspopup":"dialog",className:`w-full text-left rounded-none border-0 bg-surface py-3 text-sm text-ink placeholder-muted focus:outline-none focus:ring-2 focus:ring-accent/40 ${b?"pl-9 pr-4":"px-4"}`,children:en||(0,t.jsx)("span",{className:"text-muted",children:x})})]}),eo,ei,ec]}):(0,t.jsxs)("div",{ref:O,className:"relative",children:[c&&(0,t.jsx)("label",{className:"mb-1 block text-sm font-medium text-ink-light",children:c}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[b&&(0,t.jsx)("div",{className:"shrink-0 text-outline",children:b}),(0,t.jsx)("button",{type:"button",onClick:()=>R(!0),"aria-label":eu,"aria-expanded":P,"aria-haspopup":"dialog",className:"w-full text-left border-none p-0 text-base md:text-lg font-semibold focus:outline-none focus:ring-0 bg-transparent",children:en?(0,t.jsx)("span",{className:"text-on-surface",children:en}):(0,t.jsx)("span",{className:"text-on-surface-variant/80",children:x})})]}),eo,ei,ec]})}],58308)},1254,e=>{"use strict";function t(e){return e.slice(2,4)+e.slice(5,7)+e.slice(8,10)}e.s(["buildFlightHref",0,function(e){let r=`/flights/${e.origin.toLowerCase()}/${e.destination.toLowerCase()}/${t(e.depart)}`;return e.returnDate&&(r+=`/${t(e.returnDate)}
1`),e.cabin&&"economy"!==e.cabin&&(r+=`?cabin=${e.cabin}`),r},"toCompactDate",0,t])},16058,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(91511),a=e.i(69355),s=e.i(71829);function l({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"})})}function o({className:e}){return(0,t.jsx)(a.Plane,{className:e,fill:"currentColor",strokeWidth:1.5,"aria-hidden":"true"})}let i=(()=>{let e=new Set(s.METRO_GROUPS.flatMap(e=>e.airports)),t=[];for(let e of s.METRO_GROUPS.slice(0,4))t.push({type:"city",code:e.code,name:e.city,cityName:e.city,countryCode:e.country});for(let r of s.POPULAR_AIRPORTS){if(t.length>=8)break;e.has(r.code)||t.push({type:"airport",code:r.code,name:r.fullName??r.city,cityName:r.city,countryCode:r.country})}return t})();function c(e){if("everywhere"===e)return"Everywhere";let t=s.METRO_GROUPS.find(t=>t.code===e);if(t)return d({type:"city",code:t.code,name:t.city,cityName:t.city,countryCode:t.country});let r=s.POPULAR_AIRPORTS.find(t=>t.code===e);return r?d({type:"airport",code:r.code,name:r.fullName??r.city,cityName:r.city,countryCode:r.country}):e}function u(e){return s.COUNTRIES.find(t=>t.code===e)?.name??e}function d(e){return"everywhere"===e.code?"Everywhere":"city"===e.type?`${e.cityName} (Any)`:`${e.cityName} (${e.code})`}let m={type:"city",code:"everywhere",name:"Everywhere",cityName:"Everywhere",countryCode:""},f=new Set([...s.POPULAR_AIRPORTS.map(e=>e.code),...s.METRO_GROUPS.map(e=>e.code)]),x=new Set([...s.POPULAR_AIRPORTS.map(e=>e.city.toLowerCase()),...s.METRO_GROUPS.map(e=>e.city.toLowerCase())]);function p(e,t){let r=t.trim().toLowerCase();return e.map((e,t)=>{let n,a,s,l;return{p:e,i:t,s:(n=e.code.toLowerCase(),a=e.cityName.toLowerCase(),s=e.name.toLowerCase(),l=0,n===r?l+=1e3:n.startsWith(r)&&(l+=600),a===r?l+=450:a.startsWith(r)?l+=320:a.includes(r)&&(l+=90),s.startsWith(r)?l+=150:s.includes(r)&&(l+=50),"city"===e.type&&(l+=60),("city"===e.type?f.has(e.code)||x.has(e.cityName.toLowerCase()):f.has(e.code))&&(l+=800),l)}}).sort((e,t)=>t.s-e.s||e.i-t.i).slice(0,8).map(e=>e.p)}function h(e){let t=[],r=new Set;return e.forEach((n,a)=>{r.has(a)||(t.push(n),r.add(a),"city"===n.type&&e.forEach((e,a)=>{r.has(a)||"airport"!==e.type||e.cityName===n.cityName&&e.countryCode===n.countryCode&&(t.push(e),r.add(a))}))}),t}let b=new Map;function y(e,t){if(b.size>=200){let e=b.keys().next().value;void 0!==e&&b.delete(e)}b.set(e,t)}function g(e){for(let t of b.values()){let r=t.find(t=>t.code===e);if(r)return r}return null}function w({results:e,loading:r,onExplore:a,explorePosition:s,highlightIndex:i,onMouseEnter:c,onSelect:d,className:m,itemClassName:f}){let x,p=!!a&&!!s,h=+("top"===s),b="top"===s?0:e.length;if(0===e.length&&(r||!p))return(0,t.jsx)("ul",{className:m,"aria-live":"polite",children:(0,t.jsx)("li",{className:`${f} flex items-center gap-2.5 text-on-surface-variant`,children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-primary animate-pulse","aria-hidden":"true"}),"Searching…"]}):"No matches"})});let y=p&&(0,t.jsxs)("li",{onMouseDown:e=>{e.preventDefault(),a?.()},onMouseEnter:()=>c(b),className:`${f} cursor-pointer flex items-center gap-3 ${i===b?"bg-surface-container-low":""}`,children:[(0,t.jsx)("span",{className:"shrink-0 text-primary",children:(0,t.jsx)(n.Globe,{className:"w-4 h-4",strokeWidth:1.75,"aria-hidden":"true"})}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"block font-medium text-on-surface",children:"Explore everywhere"}),(0,t.jsx)("span",{className:"block text-xs text-on-surface-variant",children:"Discover stopover destinations"})]})]});return(0,t.jsxs)("ul",{className:m,children:["top"===s&&y,(x=new Set(e.filter(e=>"city"===e.type).map(e=>`${e.cityName}|${e.countryCode}`)),e.map((e,r)=>{let n=r+h,a="city"===e.type,s=!a&&x.has(`${e.cityName}|${e.countryCode}
1`),m=n===i,p=a?e.cityName:e.name,b=a?"(Any airport)":`(${e.code})`,y=a||s?u(e.countryCode):`${e.cityName} \xb7 ${u(e.countryCode)}`;return(0,t.jsxs)("li",{onMouseDown:t=>{t.preventDefault(),d(e)},onMouseEnter:()=>c(n),className:`${f} cursor-pointer flex items-center gap-3 ${m?"bg-surface-container-low":""} ${s?"!pl-11":""}`,children:[(0,t.jsx)("span",{className:`shrink-0 ${a?"text-on-surface":"text-on-surface-variant/70"}`,children:a?(0,t.jsx)(l,{className:"w-4 h-4"}):(0,t.jsx)(o,{className:"w-4 h-4"})}),(0,t.jsxs)("span",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("span",{className:"flex items-baseline gap-1.5 text-on-surface",children:[(0,t.jsx)("span",{className:"truncate min-w-0 font-semibold",children:p}),(0,t.jsx)("span",{className:"shrink-0 font-normal text-on-surface-variant",children:b})]}),(0,t.jsx)("span",{className:"block text-xs text-on-surface-variant/80 truncate",children:y})]})]},`${e.type}-${e.code}`)})),"bottom"===s&&y]})}e.s(["AirportPicker",0,function({value:e,onChange:n,placeholder:a="City or airport",label:l,icon:o,variant:u="default",hideLabel:f=!1,focusSignal:x,compact:v=!1,onExplore:j}){let[N,k]=(0,r.useState)(""),[C,$]=(0,r.useState)(!1),[S,D]=(0,r.useState)(0),[E,M]=(0,r.useState)(!0),[P,R]=(0,r.useState)(i),[T,A]=(0,r.useState)(!1),[O,L]=(0,r.useState)(()=>e?g(e):null),F=(0,r.useRef)(null),U=(0,r.useRef)(null),z=e?O?.code===e?d(O):c(e):"",I=(()=>
1{if(!e)return"";if(O?.code===e)return O.cityName;let t=s.METRO_GROUPS.find(t=>t.code===e);if(t)return t.city;let r=s.POPULAR_AIRPORTS.find(t=>t.code===e);return r?r.city:""})(),_=N.trim().length>=2;function W(e){n(e.code),L(e),k(""),M(!0),$(!1),U.current?.blur()}(0,r.useEffect)(()=>{let e=N.trim();if(e.length<2){R(i),A(!1);return}let t=e.toLowerCase(),r=b.get(t);if(r){R(h(p(r,e))),A(!1);return}let n=!1,a=function(e){let t=null,r=0;for(let[n,a]of b)n.length>=2&&n.length>r&&e.startsWith(n)&&(t=a,r=n.length);return t}(t);if(a){let r=a.filter(e=>e.code.toLowerCase().includes(t)||e.cityName.toLowerCase().includes(t)||e.name.toLowerCase().includes(t));r.length&&(R(h(p(r,e))),n=!0)}n||R([]),A(!0);let s=new AbortController,l=setTimeout(()=>{fetch(`/api/places?q=${encodeURIComponent(e)}`,{signal:s.signal}).then(e=>e.ok?e.json():[]).then(r=>{Array.isArray(r)&&r.length>0&&(y(t,r),R(h(p(r,e)))),A(!1)}).catch(e=>{e?.name!=="AbortError"&&A(!1)})},200);return()=>{clearTimeout(l),s.abort()}},[N]),(0,r.useEffect)(()=>{if(!e||O?.code===e||c(e)!==e)return;let t=g(e);if(t)return void L(t);let r=new AbortController;return fetch(`/api/places?q=${encodeURIComponent(e)}`,{signal:r.signal}).then(e=>e.ok?e.json():[]).then(t=>{if(!Array.isArray(t))return;y(e.toLowerCase(),t);let r=t.find(t=>t.code===e);r&&L(r)}).catch(()=>{}),()=>r.abort()},[e,O]),(0,r.useEffect)(()=>{if(!x)return;let e=requestAnimationFrame(()=>{U.current?.focus(),k(""),M(!0),$(!0)});return()=>cancelAnimationFrame(e)},[x]),(0,r.useEffect)(()=>{D(0)},[P.length]),(0,r.useEffect)(()=>{function e(e){F.current&&!F.current.contains(e.target)&&$(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Y=j?()=>W(m):void 0,G=Y?_?"bottom":"top":null;function K(e){if(!C)return;let t=+("top"===G),r="top"===G?0:"bottom"===G?P.length:-1;if("ArrowDown"===e.key)e.preventDefault(),D(e=>Math.min(e+1,P.length-1+ +!!G));else if("ArrowUp"===e.key)e.preventDefault(),D(e=>Math.max(e-1,0));else if("Enter"===e.key){if(e.preventDefault(),S===r)return void Y?.();let n=P[S-t];n&&W(n)}else"Escape"===e.key&&($(!1),U.current?.blur())}let H=`airport-picker-${l.toLowerCase().replace(/\s+/g,"-")}`;return"hero"===u?(0,t.jsxs)("div",{className:"relative",ref:F,children:[(0,t.jsxs)("div",{className:"relative",children:[o&&(0,t.jsx)("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted",children:o}),(0,t.jsx)("input",{id:H,ref:U,type:"text",placeholder:a,"aria-label":l,autoComplete:"off",value:C?N:N||z,onChange:e=>{k(e.target.value),$(!0)},onFocus:()=>{$(!0)},onKeyDown:K,className:`w-full rounded-none border-0 bg-surface py-3 text-sm text-ink placeholder-muted focus:outline-none focus:ring-2 focus:ring-accent/40 ${o?"pl-9 pr-4":"px-4"}`})]}),C&&(P.length>0||_)&&(0,t.jsx)(w,{results:P,loading:T,onExplore:Y,explorePosition:G??void 0,highlightIndex:S,onMouseEnter:D,onSelect:W,className:"absolute z-50 mt-1 max-h-72 w-full overflow-auto overscroll-contain scrollbar-hide rounded-none border border-border-line bg-surface shadow-brutal-sm",itemClassName:"px-4 py-2 text-sm"})]}):"landing"===u?(0,t.jsxs)("div",{ref:F,onClick:e=>{e.target.closest("ul")||U.current?.focus()},className:`flex flex-col bg-surface-container-low hover:bg-surface-container-high transition-colors group relative cursor-pointer ${f?"px-4 py-2 rounded-full":"gap-1.5 md:gap-2 p-4 md:p-6 rounded-lg"}`,children:[!f&&(0,t.jsx)("label",{htmlFor:H,className:"text-xs font-bold uppercase tracking-widest text-on-surface-variant/80 group-hover:text-primary transition-colors",children:l}),(0,t.jsxs)("div",{className:`flex items-center ${f?"gap-2":"gap-3"}`,children:[o&&(0,t.jsx)("div",{className:"shrink-0 text-outline",children:o}),(0,t.jsx)("input",{id:H,ref:U,type:"text",autoComplete:"off",value:C?E?z:N:!E&&N?N:z,onChange:e=>{k(e.target.value),M(!1),C||$(!0)},onFocus:e=>{E&&(k(I),e.currentTarget.select()),$(!0)},onMouseUp:e=>{0===e.button&&(e.preventDefault(),e.currentTarget.select())},onKeyDown:K,placeholder:a,className:`bg-transparent border-none p-0 focus:ring-0 focus:outline-none outline-none placeholder:text-on-surface-variant/80 w-full ${f?"text-sm font-medium text-on-surface":"text-base md:text-lg font-semibold"}`})]}),C&&(P.length>0||_)&&(0,t.jsx)(w,{results:P,loading:T,onExplore:Y,explorePosition:G??void 0,highlightIndex:S,onMouseEnter:D,onSelect:W,className:`absolute z-50 top-full left-0 mt-2 max-h-96 overflow-auto overscroll-contain scrollbar-hide rounded-xl border border-outline-variant bg-surface-container-lowest editorial-shadow ${v?"w-full max-w-[380px]":"w-full max-w-[380px] md:w-[380px] md:max-w-[calc(100vw-2rem)]"}`,itemClassName:"px-4 py-3 text-sm"})]}):"inline"===u?(0,t.jsxs)("div",{ref:F,className:"relative",children:[(0,t.jsx)("input",{id:H,ref:U,type:"text",autoComplete:"off","aria-label":l,value:C?E?z:N:!E&&N?N:z,onChange:e=>{k(e.target.value),M(!1),C||$(!0)},onFocus:e=>{E&&(k(I),e.currentTarget.select()),$(!0)},onMouseUp:e=>{0===e.button&&(e.preventDefault(),e.currentTarget.select())},onKeyDown:K,placeholder:a,className:"bg-transparent border-none p-0 focus:ring-0 focus:outline-none outline-none placeholder:text-on-surface-variant/80 w-full text-sm font-semibold text-on-surface"}),C&&(P.length>0||_)&&(0,t.jsx)(w,{results:P,loading:T,onExplore:Y,explorePosition:G??void 0,highlightIndex:S,onMouseEnter:D,onSelect:W,className:`absolute z-50 top-full left-0 mt-2 max-h-96 overflow-auto overscroll-contain scrollbar-hide rounded-[14px] border border-outline-variant bg-surface-container-lowest editorial-shadow ${v?"w-full max-w-[380px]":"w-full max-w-[380px] md:w-[380px] md:max-w-[calc(100vw-2rem)]"}`,itemClassName:"px-4 py-3 text-sm"})]}):(0,t.jsxs)("div",{className:"relative",ref:F,children:[(0,t.jsx)("label",{htmlFor:H,className:"mb-1 block text-sm font-medium text-ink-light",children:l}),(0,t.jsx)("input",{id:H,ref:U,type:"text",placeholder:a,"aria-label":l,autoComplete:"off",value:C?N:N||z,onChange:e=>{k(e.target.value),$(!0)},onFocus:()=>{k(""),$(!0)},onKeyDown:K,className:"w-full rounded-none border border-border-line px-4 py-3 text-sm focus:border-ink focus:outline-none focus:ring-2 focus:ring-ink/20"}),C&&(P.length>0||_)&&(0,t.jsx)(w,{results:P,loading:T,onExplore:Y,explorePosition:G??void 0,highlightIndex:S,onMouseEnter:D,onSelect:W,className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto overscroll-contain scrollbar-hide rounded-none border border-border-line bg-surface shadow-brutal-sm",itemClassName:"px-4 py-2 text-sm"})]})}])},75005,e=>{"use strict";var t=e.i(43476),r=e.i(71645),n=e.i(89664),a=e.i(16327);let s=[{value:"economy",label:"Economy"},{value:"premium_economy",label:"Premium Economy"},{value:"business",label:"Business"},{value:"first",label:"First"}];
1e.s(["CabinSelect",0,function({value:e,onChange:l,wrapperClassName:o="relative",triggerClassName:i="w-full flex items-center justify-between gap-2 bg-transparent text-sm font-semibold text-on-surface outline-none cursor-pointer",dropdownClassName:c="absolute z-50 top-full left-0 mt-2 w-48 min-w-full overflow-hidden rounded-[14px] border border-outline-variant bg-surface-container-lowest py-1 editorial-shadow",leadingIcon:u,showChevron:d=!1}){let[m,f]=(0,r.useState)(!1),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(m)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){x.current&&!x.current.contains(e.target)&&f(!1)}},[m]);let p=s.find(t=>t.value===e)?.label??"Economy";return(0,t.jsxs)("div",{ref:x,className:o,children:[(0,t.jsxs)("button",{type:"button",onClick:()=>f(e=>!e),"aria-haspopup":"listbox","aria-expanded":m,className:i,children:[u,(0,t.jsx)("span",{className:"truncate",children:p}),d&&(0,t.jsx)(a.ChevronDown,{className:"h-3.5 w-3.5 shrink-0 text-on-surface-variant",strokeWidth:2.5,"aria-hidden":"true"})]}),m&&(0,t.jsx)("ul",{role:"listbox",className:c,children:s.map(r=>(0,t.jsxs)("li",{role:"option","aria-selected":r.value===e,tabIndex:0,onClick:()=>{l(r.value),f(!1)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),l(r.value),f(!1))},className:`flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 text-sm hover:bg-surface-container-low ${r.value===e?"font-bold text-primary":"font-medium text-on-surface"}`,children:[(0,t.jsx)("span",{className:"truncate",children:r.label}),r.value===e&&(0,t.jsx)(n.Check,{className:"h-4 w-4 shrink-0 text-primary",strokeWidth:2.5,"aria-hidden":"true"})]},r.value))})]})}])},46123,36669,81837,e=>{"use strict";let t;var r=e.i(43476),n=e.i(71645);let a=(0,e.i(56420).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["RouteErrorToast",0,function({message:e,onDismiss:t}){return(0,n.useEffect)(()=>{let e=setTimeout(t,4e3);return()=>clearTimeout(e)},[e,t]),(0,r.jsxs)("div",{role:"alert",className:"fixed bottom-8 left-1/2 z-[90] flex -translate-x-1/2 items-center gap-3 rounded-2xl bg-surface-container-lowest py-3 pl-3 pr-6 shadow-[0_12px_40px_-8px_rgba(26,28,26,0.25)] animate-in fade-in-0 slide-in-from-bottom-2 duration-200",children:[(0,r.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-error-container/60",children:(0,r.jsx)(a,{className:"h-[18px] w-[18px] text-error",strokeWidth:2,"aria-hidden":"true"})}),(0,r.jsx)("span",{className:"whitespace-nowrap text-base font-semibold text-on-surface",children:e})]})}],46123);let s=null;function l(e){let t=new Date;return t.setDate(t.getDate()+e),t.toISOString().split("T")[0]}e.s(["useDetectedOrigin",0,function(){let[e,r]=(0,n.useState)(t??null);return(0,n.useEffect)(()=>{let e=!0;return(void 0!==t?Promise.resolve(t):(!s&&(s=fetch("/api/geo",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>t=e?.airport??null).catch(()=>(t=null,null))),s)).then(t=>{e&&r(t)}),()=>{e=!1}},[]),e}],36669),e.s(["defaultDepartISO",0,function(){return l(14)},"defaultReturnISO",0,function(){return l(21)}],81837)},26909,e=>{"use strict";let t=(0,e.i(56420).default)("arrow-left-right",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);e.s(["ArrowLeftRight",0,t],26909)}]);

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.