(globalThis.TURBOPACK_remote_chunk_loading_global_prj_Ea8QNpCs22Ye85AIRZ6hT1aa8n7z||(globalThis.TURBOPACK_remote_chunk_loading_global_prj_Ea8QNpCs22Ye85AIRZ6hT1aa8n7z=[])).push(["object"==typeof document?document.currentScript:void 0,1702,e=>{e.v({board:"comingSoon-module__BuCSia__board",bottom:"comingSoon-module__BuCSia__bottom",break:"comingSoon-module__BuCSia__break",breathe:"comingSoon-module__BuCSia__breathe",chart:"comingSoon-module__BuCSia__chart",chartLabel:"comingSoon-module__BuCSia__chartLabel",divider:"comingSoon-module__BuCSia__divider",drift:"comingSoon-module__BuCSia__drift",flap:"comingSoon-module__BuCSia__flap",glyph:"comingSoon-module__BuCSia__glyph",interactive:"comingSoon-module__BuCSia__interactive",line:"comingSoon-module__BuCSia__line",lockup:"comingSoon-module__BuCSia__lockup",logo:"comingSoon-module__BuCSia__logo",page:"comingSoon-module__BuCSia__page",planeMoving:"comingSoon-module__BuCSia__planeMoving",planeStatic:"comingSoon-module__BuCSia__planeStatic",rings:"comingSoon-module__BuCSia__rings",top:"comingSoon-module__BuCSia__top",wordmark:"comingSoon-module__BuCSia__wordmark"})},78259,e=>{"use strict";var t=e.i(43476),n=e.i(71645),i=e.i(20973),r=e.i(38044),a=e.i(1702);function l({char:e,extra:n}){return(0,t.jsxs)("span",{className:a.default.flap,"data-flap":!0,"data-extra":n||void 0,children:[(0,t.jsx)("span",{className:a.default.top,children:(0,t.jsx)("span",{className:a.default.glyph,"data-c":e})}),(0,t.jsx)("span",{className:a.default.bottom,children:(0,t.jsx)("span",{className:a.default.glyph,"data-c":e})})]})}let o=2*r.ROW_TILES,s=[...r.HOME_PHRASE.padEnd(o)];e.s(["default",0,function(){let e=(0,n.useRef)(null),u=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=e.current;if(!t)return;let n=matchMedia("(prefers-reduced-motion: reduce)").matches,a=[...t.querySelectorAll("[data-flap]")].map(e=>({el:e,top:e.firstElementChild,glyphs:[...e.querySelectorAll("[data-c]")],cur:" ",target:" ",queue:[],next:0,step:i.FLAP_STEP_MS,spin:!1}));t.dataset.intro="done";let l=(e,t,i)=>{for(let n of(e.cur=t,e.glyphs))n.dataset.c=" "===t?"":t;i&&!n&&e.top.animate([{transform:"perspective(240px) rotateX(-75deg)"},{transform:"none"}],{duration:e.step,easing:"ease-out"})};for(let e of a)l(e," ",!1);let s=!1,d=r.HOME_PHRASE,c=e=>s?(0,i.twoRowField)(e,r.ROW_TILES):[...e.toUpperCase().padEnd(o)],f=()=>{let e=s;return delete t.dataset.stacked,(s=a[r.BOARD_TILES-1].el.getBoundingClientRect().top>a[0].el.getBoundingClientRect().top)&&(t.dataset.stacked=""),s!==e},g=()=>{f()&&c(d).forEach((e,t)=>{let n=a[t];n.spin=!1,n.queue=[],n.target=e,l(n,e,!1)})},p=0,h=e=>{let t=!1;for(let n of a)(n.spin||n.queue.length)&&(t=!0,e{p||(p=requestAnimationFrame(h))},S=(e,r=!1)=>{d=e;let o=c(e);if(n){t.animate([{opacity:.35},{opacity:1}],{duration:120,easing:"linear"}),a.forEach((e,t)=>{e.spin=!1,e.queue=[],e.target=o[t],l(e,e.target,!1)});return}let s=performance.now(),u=0;a.forEach((e,t)=>{e.spin=!1,e.step=i.FLAP_STEP_MS,e.target=o[t];let n=(0,i.flapSequence)(e.cur,e.target,r&&" "===e.target?1:3+Math.floor(5*Math.random()));n.length&&(e.queue=n,e.next=s+(r?t:u)*i.FLAP_STAGGER_MS,u++)}),m()},E=null,_=null,A=(0,i.createWordBag)(r.ALL_FLIGHT_PHRASES,r.HOME_PHRASE,Math.random),v=0,I=!1,L=()=>{!I||E||a.some(e=>e.spin)||(I=!1,d!==r.HOME_PHRASE&&S(r.HOME_PHRASE))},y=e=>{n||e.spin||(e.spin=!0,e.step=i.FLAP_SPIN_STEP_MS,e.queue=[],e.next=performance.now(),m())},T=e=>{e.spin&&(e.spin=!1,e.queue=(0,i.flapSequence)(e.cur,e.target,2+Math.floor(3*Math.random())),e.next=performance.now()+e.step,m(),L())},R=e=>{let t=e instanceof Element?e.closest("[data-flap]"):null;return a.find(e=>e.el===t)},O=(e,t)=>R(document.elementFromPoint(e,t)),b=e=>{if("mouse"!==e.pointerType)return;let t=R(e.target);t&&y(t)},N=e=>{if("mouse"!==e.pointerType)return;let t=R(e.target);t&&R(e.relatedTarget)!==t&&T(t)},C=e=>{let t="mouse"!==e.pointerType;if(E={t0:performance.now(),x:e.clientX,y:e.clientY,moved:!1,touch:t,held:new Set,timer:0},!t)return;let n=E;n.timer=window.setTimeout(()=>{let e=O(n.x,n.y);e&&(y(e),n.held.add(e))},120)},w=e=>{if(!E||(Math.hypot(e.clientX-E.x,e.clientY-E.y)>10&&(E.moved=!0),!E.touch||!E.moved))return;window.clearTimeout(E.timer);let t=O(e.clientX,e.clientY);t&&!E.held.has(t)&&(y(t),E.held.add(t))},D=()=>{E&&(window.clearTimeout(E.timer),E.touch&&(E.held.forEach(T),_={long:E.moved||performance.now()-E.t0>=250}),E=null,L())},V=()=>{let e;if(_?.long){_=null;return}_=null,S(e=A.next()),u.current&&(u.current.textContent=`${e.charAt(0)}${e.slice(1).toLowerCase()}`),I=!1,window.clearTimeout(v),v=window.setTimeout(()=>{I=!0,L()},i.FLAP_BOARD_RETURN_MS)};t.addEventListener("pointerover",b),t.addEventListener("pointerout",N),t.addEventListener("pointerdown",C),t.addEventListener("pointermove",w),t.addEventListener("pointerup",D),t.addEventListener("pointercancel",D),t.addEventListener("click",V);let F=0,M=new ResizeObserver(()=>{cancelAnimationFrame(F),F=requestAnimationFrame(g)});return f(),S(r.HOME_PHRASE,!0),M.observe(t),()=>{cancelAnimationFrame(p),cancelAnimationFrame(F),window.clearTimeout(v),M.disconnect(),t.removeEventListener("pointerover",b),t.removeEventListener("pointerout",N),t.removeEventListener("pointerdown",C),t.removeEventListener("pointermove",w),t.removeEventListener("pointerup",D),t.removeEventListener("pointercancel",D),t.removeEventListener("click",V)}},[]),(0,t.jsxs)("button",{ref:e,type:"button","aria-label":"Boarding soon. Show another flight phrase",className:`${a.default.board} ${a.default.interactive}`,"data-intro":"pending",children:[(0,t.jsx)("noscript",{children:(0,t.jsx)("style",{children:'[data-intro="pending"] [data-c]::after { content: attr(data-c) !important; }'})}),s.map((e,i)=>(0,t.jsxs)(n.Fragment,{children:[i===r.ROW_TILES&&(0,t.jsx)("span",{className:a.default.break}),(0,t.jsx)(l,{char:e.trim(),extra:i>=r.BOARD_TILES})]},i)),(0,t.jsx)("span",{ref:u,className:"sr-only","aria-live":"polite"})]})}])},38044,e=>{"use strict";let t={"At the gate":["BOARDING PASS","AIRPLANE MODE","TICKETS READY","UPGRADE READY","GATES OPENING","PACKING LISTS","LAYOVER LUNCH","EARNING MILES"],Onboard:["TRAYS UPRIGHT","WINDOW GAZING","SNACKS SERVED","COFFEE SERVED","LEGROOM AHEAD"],"In the air":["TAKEOFF READY","SOARING ABOVE","FLYING HIGHER","CRUISING HIGH","SMOOTH FLIGHT","SUNSET FLIGHT","CLOUD SURFING","GLIDING ALONG","HUMMING ALONG","ENDLESS SKIES","BLUE HORIZONS","SUNRISE VIEWS","CITY SKYLINES"],Arrival:["TOUCHING DOWN","SOFT LANDINGS","HAPPY LANDING","EARLY ARRIVAL","WARM WELCOMES","HAPPY REUNION","FAMILY VISITS"],Weather:["GREAT WEATHER","SUNNY OUTLOOK","FORECAST FAIR","CLEAR AIRWAYS","GLOWING SKIES","GENTLE BREEZE","WARMING TREND","RADAR LOADING","RADAR CHECKED"],"Going places":["HAPPY TRAVELS","TRAVEL DREAMS","TRIPS PLANNED","BOOKING TRIPS","WEEKENDS AWAY","SUNNY BEACHES","BEACH CALLING","ISLAND ESCAPE"]},n=Object.values(t).flat(),i="BOARDING SOON",r=i.length;e.s(["ALL_FLIGHT_PHRASES",0,n,"BOARD_TILES",0,r,"FLIGHT_PHRASES",0,t,"HOME_PHRASE",0,i,"ROW_TILES",0,8])},76432,e=>{"use strict";var t=e.i(43476),n=e.i(30086),i=e.i(71645),r=e.i(6603),a=e.i(52236),l=e.i(74271),o=e.i(67491);let s=[{value:"system",label:"System theme",icon:n.Monitor},{value:"light",label:"Light theme",icon:n.Sun},{value:"dark",label:"Dark theme",icon:n.Moon}],u=[{value:"light",text:"Light"},{value:"dark",text:"Dark"},{value:"system",text:"System"}];e.s(["default",0,function({className:e,labeled:n=!1}){let[d,c]=(0,i.useState)(r.DEFAULT_THEME);return((0,i.useEffect)(()=>{c((0,r.readTheme)())},[]),n)?(0,t.jsxs)("div",{role:"radiogroup","aria-label":"Color theme","data-testid":"theme-switch",className:(0,a.cn)(l.segmentTrack,"relative",e),children:[(0,t.jsx)(o.SegmentPill,{className:l.segmentPill}),u.map(({value:e,text:n})=>{let i=s.find(t=>t.value===e),o=i.icon,u=d===e;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":u,"aria-label":i.label,onClick:()=>{c(e),(0,r.saveTheme)(e)},className:(0,a.cn)(l.segmentItem,(0,l.segmentItemState)(u,!0)),children:[(0,t.jsx)(o,{className:"size-4","aria-hidden":!0}),n]},e)})]}):(0,t.jsxs)("div",{role:"radiogroup","aria-label":"Color theme","data-testid":"theme-switch",className:(0,a.cn)("relative inline-flex items-center gap-0.5 rounded-full bg-surface-muted p-0.5",e),children:[(0,t.jsx)(o.SegmentPill,{className:"inset-y-0.5 rounded-full bg-surface shadow-sm"}),s.map(({value:e,label:n,icon:i})=>(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":d===e,"aria-label":n,title:n,onClick:()=>{c(e),(0,r.saveTheme)(e)},className:(0,a.cn)("relative inline-flex size-7 items-center justify-center rounded-full transition-hover",d===e?"text-fg-interactive":"text-fg-secondary hover:text-fg"),children:(0,t.jsx)(i,{className:"size-4","aria-hidden":!0})},e))]})}])},7386,e=>{"use strict";let t="itineraries-changed",n=0;e.s(["ITINERARIES_CHANGED",0,t,"announceItinerariesSaved",0,function(){n=Date.now(),window.dispatchEvent(new Event(t))},"lastItinerariesSaveAt",0,function(){return n}])},73052,e=>{"use strict";var t=e.i(38160),n=e.i(7386);let i=(0,t.createItineraryStore)(()=>localStorage,{onSaved:n.announceItinerariesSaved});e.s(["loadItineraries",0,()=>i.load(),"saveItineraries",0,e=>i.save(e)])},96095,e=>{"use strict";var t=e.i(71645),n=e.i(40889);let i=null;e.s(["useSignedIn",0,function(){let[e,r]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=!1;return(i??=(0,n.fetchTrips)().then(()=>!0,()=>!1)).then(t=>{e||r(t)}),()=>{e=!0}},[]),e}])},30374,e=>{"use strict";var t=e.i(39493),n=e.i(75004),i=e.i(56669),r=e.i(9875),a=e.i(26320);let l=(0,t.createFlightsApiV1)({baseUrl:r.BASE_PATH,fetch:(e,t)=>fetch(e,t)}),o=(0,t.createFlightsApiV1)({baseUrl:r.BASE_PATH,fetch:(e,t)=>fetch(e,{...t,cache:"no-store"})}),s=new Map,u=null,d=null;function c(){return u??=e.A(46984).catch(e=>{throw u=null,e})}function f(e){let t=e.toUpperCase();return/^[A-Z0-9]{4}$/.test(t)?t:(0,i.getAirportByIata)(t)?.icao??s.get(t)}async function g(e){let t=f(e);if(void 0!==t)return t;let n=await c().catch(()=>null);if(!n)return null;d??=new Map(n.airportIndex.filter(e=>e.icao).map(e=>[e.iata,e.icao]));let i=e.toUpperCase(),r=d.get(i)??null;return s.set(i,r),r}e.s(["icaoOf",0,g,"knownIcao",0,f,"loadAirportIndex",0,c,"units",0,()=>(0,n.v1Units)((0,a.currentUnits)()),"v1",0,l,"v1Fresh",0,o])},81789,e=>{"use strict";var t=e.i(71645),n=e.i(75004),i=e.i(26320),r=e.i(51871),a=e.i(30374);let l=new Map,o=(e,t)=>{let n=`${e}|${t}`;return l.get(n)??n},s=(0,r.createStore)({fetcher:async(e,{fresh:t})=>{let n=e.lastIndexOf("|"),i=e.slice(0,n),r=e.slice(n+1),o=await (t?a.v1Fresh:a.v1).flight(i,r);if(o.ok){let t=`${o.data.id}|${r}`;return o.data.id===i||l.has(t)||s.status(t)||l.set(t,e),o.data}if("http"===o.reason&&404===o.status)return null;throw Error("http"===o.reason?`status ${o.status}`:o.message)},fallback:null,ttlMs:6e4,errorTtlMs:3e4}),u=e=>[e.ident,e.date,e.origin,e.destination].map(e=>e?.trim().toUpperCase()??"").join("|"),d=(0,r.createStore)({fetcher:async e=>{let[t="",i,r,l]=e.split("|"),o=await (0,n.resolveFlightId)(a.v1,{ident:t,date:i,origin:r,destination:l},a.icaoOf);if(!o.ok)throw Error("flight search failed");return o.data},fallback:null,ttlMs:18e5,errorTtlMs:3e4});function c(e){let t=e.origin?(0,a.knownIcao)(e.origin)??null:null,i=(0,n.flightIdFromParts)(e,t);if(i)return i;let r=u(e);return d.status(r)?d.get(r):void 0}async function f(e){let t=c(e);return void 0!==t?t:d.load(u(e))}async function g(e,{units:t=(0,a.units)(),fresh:n=!1}={}){let i=o(e,t);return{data:await s.load(i,{fresh:n}),failed:s.status(i)?.failed??!1}}async function p(e){let t=(0,n.legFlightId)(e,e=>(0,a.knownIcao)(e)??null);if(t)return t;let i=e.identIcao??e.identIata;return i&&e.scheduledDate?f({ident:i,date:e.scheduledDate,origin:e.originIata,destination:e.destinationIata}):null}async function h(e){let t=await p(e);if(!t)return null;let{data:n,failed:i}=await g(t);return i?null:n}function m(e){if(!e)return null;let t=e.flightId??e.identIcao??e.faFlightId??e.identIata;return t?{ident:t,date:e.scheduledDate||null,origin:e.originIata,destination:e.destinationIata}:null}e.s(["flightIdFor",0,f,"legRef",0,m,"loadFlight",0,g,"refreshLegSnapshot",0,h,"selectionRef",0,function(e){return{ident:e.identIcao,date:e.date||new Date().toISOString().slice(0,10),origin:e.originIata,destination:e.destinationIata}},"useFlightResource",0,function(e,{pollMs:a}={}){let l=(0,r.useStoreVersion)(),f=(0,n.v1Units)((0,i.useUnits)()),g=e?c(e):null,p=e?u(e):null;(0,t.useEffect)(()=>{e&&void 0===c(e)&&d.ensure(u(e))},[p,l]);let h=g?o(g,f):null;if((0,t.useEffect)(()=>{h&&s.ensure(h)},[h,l]),(0,t.useEffect)(()=>{if(!h||!a)return;let e=setInterval(()=>{document.hidden||s.ensure(h)},a),t=()=>{document.hidden||s.ensure(h)};return document.addEventListener("visibilitychange",t),()=>{clearInterval(e),document.removeEventListener("visibilitychange",t)}},[h,a]),!h)return{id:g,data:null===g?null:void 0,status:p?d.status(p):null};let m=s.status(h);return{id:g,data:m?s.get(h):void 0,status:m}},"v1HistoryFor",0,function(e){let t=m(e),n=t?c(t):null;return(n?s.get(o(n,(0,a.units)()))?.history:null)??null}])},51871,43975,39493,e=>{"use strict";var t=e.i(71645);let n=0,i=new Set,r=()=>{n++,i.forEach(e=>e())},a=e=>(i.add(e),()=>{i.delete(e)});function l(){return(0,t.useSyncExternalStore)(a,()=>n,()=>0)}e.s(["createStore",0,function(e){let t=new Map,n=new Map,a=e=>t.get(e)?.value??null,l=(a,o=!1)=>{let s=t.get(a);!o&&s&&s.expiresAt>Date.now()||n.has(a)||n.set(a,e.fetcher(a,{fresh:o}).then(t=>({value:t,ttl:e.ttlMs,failed:!1})).catch(()=>({value:s&&null!=s.goodAt?s.value:e.fallback,ttl:e.errorTtlMs??3e4,failed:!0})).then(({value:e,ttl:o,failed:u})=>{let d=Date.now();t.set(a,{value:e,expiresAt:d+o,failed:u,goodAt:u?s?.goodAt??null:d}),n.delete(a),r(),u&&setTimeout(()=>{i.size>0&&t.get(a)?.failed&&l(a)},o)}))};return{get:a,status(e){let n=t.get(e);return n?{failed:n.failed,at:n.goodAt}:null},ensure:e=>l(e),load:async(e,{fresh:t=!1}={})=>(l(e,t),await n.get(e),a(e)),clear(){t.clear(),n.clear()}}},"notifyStores",0,r,"useLoadStatus",0,function(e,t){return l(),t?e.status(t):null},"useStoreVersion",0,l],51871);var o=e.i(944);function s(e,t){return e.includes(t)?t:"unknown"}let u=(e,t)=>null===t?null:s(e,t),d=(e,t)=>t.map(t=>s(e,t)),c=e=>s(o.V1_ERROR_CODES,e);function f(e){e.bestSource=u(o.V1_TIME_SOURCES,e.bestSource)}function g(e){e.level=s(o.V1_DELAY_LEVELS,e.level),e.departureLevel=s(o.V1_DELAY_LEVELS,e.departureLevel),e.arrivalLevel=s(o.V1_DELAY_LEVELS,e.arrivalLevel)}function p(e){for(let t of e??[])t.kind=s(o.V1_HAZARD_KINDS,t.kind),t.delayRisk=s(o.V1_HAZARD_LEVELS,t.delayRisk)}function h(e){e.condition=s(o.V1_CONDITIONS,e.condition)}function m(e){e&&(e.level=s(o.V1_AIRPORT_LEVELS,e.level),e.departures.delayLevel=s(o.V1_DELAY_LEVELS,e.departures.delayLevel),e.arrivals.delayLevel=s(o.V1_DELAY_LEVELS,e.arrivals.delayLevel),e.hazards=d(o.V1_HAZARD_KINDS,e.hazards))}function S(e){e.flightCategory.now=u(o.V1_FLIGHT_CATEGORIES,e.flightCategory.now),e.flightCategory.atFlightTime=u(o.V1_FLIGHT_CATEGORIES,e.flightCategory.atFlightTime),p(e.hazards)}let E={flight:function(e){return e.resolution=s(o.V1_RESOLUTIONS,e.resolution),e.status=s(o.V1_FLIGHT_STATUSES,e.status),e.phase=s(o.V1_FLIGHT_PHASES,e.phase),Object.values(e.times).forEach(f),g(e.delay),S(e.origin),S(e.destination),e.inbound&&(e.inbound.status=s(o.V1_FLIGHT_STATUSES,e.inbound.status),f(e.inbound.times.gateOut),f(e.inbound.times.gateIn),g(e.inbound.delay)),!function(e){if(!e)return;e.status=s(o.V1_ROUTE_WEATHER_STATUSES,e.status),e.routeSource=u(o.V1_ROUTE_SOURCES,e.routeSource),e.cruiseSource=u(o.V1_CRUISE_SOURCES,e.cruiseSource);let t=e.turbulence;if(t){for(let e of(t.maxLevel=u(o.V1_TURBULENCE_LEVELS,t.maxLevel),t.windows))e.level=s(o.V1_TURBULENCE_LEVELS,e.level);for(let e of t.timeline)e.level=u(o.V1_TURBULENCE_LEVELS,e.level)}for(let t of e.pireps)t.kind=s(o.V1_PIREP_KINDS,t.kind),t.intensity=s(o.V1_PIREP_INTENSITIES,t.intensity);for(let t of e.advisories?.hits??[])t.kind=s(o.V1_ADVISORY_KINDS,t.kind),t.source=s(o.V1_ADVISORY_SOURCES,t.source),t.relation=s(o.V1_ADVISORY_RELATIONS,t.relation)}(e.routeWeather),e.windsAloft&&(e.windsAloft.effect=s(o.V1_WIND_EFFECTS,e.windsAloft.effect)),e},airport:function(e){if(m(e.status),e.weather)for(let t of(h(e.weather.current),e.weather.flightCategory=u(o.V1_FLIGHT_CATEGORIES,e.weather.flightCategory),Array.isArray(e.weather.hourly)||(e.weather.hourly=[]),e.weather.hourly))h(t),t.flightCategory=u(o.V1_FLIGHT_CATEGORIES,t.flightCategory);for(let t of(p(e.hazards),e.impact??[]))t.level=s(o.V1_IMPACT_LEVELS,t.level),t.hazards=d(o.V1_HAZARD_KINDS,t.hazards);if(e.tsa)for(let t of(e.tsa.level=s(o.V1_TSA_LEVELS,e.tsa.level),e.tsa.typical))t.level=s(o.V1_TSA_LEVELS,t.level);for(let t of e.turbulence?.blocks??[])t.level=u(o.V1_TURBULENCE_LEVELS,t.level);for(let t of(e.capacity&&(e.capacity.rateKind=s(o.V1_CAPACITY_RATE_KINDS,e.capacity.rateKind)),e.capacity?.hours??[]))for(let e of[t.arrivals,t.departures])e.faaCongestionLevel=s(o.V1_CONGESTION_LEVELS,e.faaCongestionLevel),e.predictedCongestionLevel=s(o.V1_CONGESTION_LEVELS,e.predictedCongestionLevel);for(let t of e.deicing?.hours??[])t.severity=s(o.V1_DEICING_SEVERITIES,t.severity),t.condition=u(o.V1_CONDITIONS,t.condition),t.level=1===t.level||2===t.level||3===t.level?t.level:0;return e},airports:function(e){for(let t of e.airports)m(t.status);return e},searchFlights:function(e){for(let t of e.matches)t.resolution=s(o.V1_RESOLUTIONS,t.resolution),t.status=s(o.V1_FLIGHT_STATUSES,t.status);return e},driveTime:function(e){return e.drive&&(e.drive.source=s(o.V1_DRIVE_SOURCES,e.drive.source)),e}};e.s(["normalizeErrorCode",0,c,"normalizeFlightAircraft",0,function(e){e.whereabouts&&(e.whereabouts.state=s(o.V1_AIRCRAFT_STATES,e.whereabouts.state));let t=e=>{e.weather&&(e.weather.level=s(o.V1_IMPACT_LEVELS,e.weather.level),e.weather.hazards=d(o.V1_HAZARD_KINDS,e.weather.hazards))};for(let n of e.earlierFlights??[])n.status=s(o.V1_FLIGHT_STATUSES,n.status),f(n.times.gateOut),f(n.times.gateIn),g(n.delay),t(n.turn);return e.knockOn&&(e.knockOn.level=s(o.V1_DELAY_LEVELS,e.knockOn.level)),e.verdict&&(e.verdict.kind=s(o.V1_PLANE_DAY_VERDICTS,e.verdict.kind),e.verdict.level=s(o.V1_IMPACT_LEVELS,e.verdict.level),e.verdict.turn&&t(e.verdict.turn)),e},"normalizeV1Enums",0,E],43975);let _=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),A=e=>e instanceof Error?e.message:String(e);e.s(["createFlightsApiV1",0,function({baseUrl:e,fetch:t,headers:n}){let i=`${e.replace(/\/+$/,"")}/api/v1`,r=(e,t,n)=>a(e,void 0,t,n);async function a(e,r,l,o=e=>e){let s,u,d=n?.(),f=void 0===r?d&&{headers:d}:{method:"POST",headers:{...d,"Content-Type":"application/json"},body:JSON.stringify(r)};try{s=await t(`${i}${e}`,f)}catch(e){return{ok:!1,reason:"network",message:A(e)}}if(!s.ok){let e=await s.json().catch(()=>null),t=_(e)&&_(e.error)&&"string"==typeof e.error.code?c(e.error.code):void 0;return{ok:!1,reason:"http",status:s.status,code:t}}try{u=await s.json()}catch(e){return{ok:!1,reason:"parse",message:A(e)}}if(!_(u)||!l(u))return{ok:!1,reason:"parse",message:"unexpected body"};try{return{ok:!0,data:o(u)}}catch(e){return{ok:!1,reason:"parse",message:A(e)}}}let l=e=>encodeURIComponent(e.toUpperCase());return{get:r,airports:e=>r(e?`/airports?icao=${[...new Set(e)].sort().map(l).join(",")}`:"/airports",e=>Array.isArray(e.airports),E.airports),airport:(e,t)=>r(`/airports/${l(e)}?units=${t}`,e=>_(e.airport)&&Array.isArray(e.unavailable),E.airport),searchFlights:e=>{let t=[["ident",e.ident],["date",e.date],["origin",e.origin?.toUpperCase()],["destination",e.destination?.toUpperCase()]].filter(e=>!!e[1]).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&");return r(`/flights?${t}`,e=>Array.isArray(e.matches),E.searchFlights)},flight:(e,t)=>r(`/flights/${encodeURIComponent(e)}?units=${t}`,e=>"string"==typeof e.id&&Array.isArray(e.unavailable),E.flight),dayDepartures:(e,t,n)=>r(`/airports/${l(e)}/departures/${encodeURIComponent(t)}${n?`?destination=${l(n)}`:""}`,e=>Array.isArray(e.flights)&&_(e.origin)),board:(e,t)=>r(`/airports/${l(e)}/${t}`,e=>Array.isArray(e.hours)),driveTime:e=>a("/drive-time",{airport:e.airport.toUpperCase(),from:e.from},e=>"number"==typeof e.distanceNm&&(null===e.drive||_(e.drive)&&"number"==typeof e.drive.minutes),E.driveTime),satellite:()=>r("/satellite",e=>"string"==typeof e.id&&"string"==typeof e.observedAt)}}],39493)},45165,94311,84038,e=>{"use strict";var t=e.i(55529),n=e.i(30929),i=e.i(73621),r=e.i(2052);function a(e,t,n){let i=e?Date.parse(e):NaN;return!Number.isFinite(i)||i-tnew Date(e).toISOString();return(0,r.localDateStr)(a(i),t)(0,t.formatClock)(e,n)??"—",f=e=>({icao:e.icao,code:e.iata??e.icao,...e.position}),g=(e,t)=>(0,n.bearing)([e.lon,e.lat],[t.lon,t.lat]);function p(e,t){var i;let r=(e,t)=>{for(let n=t;n>=0;n--)if(e(n))return n;return -1};if(("on-inbound"===t.state||"on-flight-before"===t.state)&&t.position&&t.flight){let a,l,o,{origin:s,destination:u}=t.flight,d=r(t=>e[t].icao===s.icao&&e[t+1].icao===u.icao,e.length-2);return d1e3?(0,n.bearing)(l,[a.lon,a.lat]):i.headingDeg,{lat:i.lat,lon:i.lon,heading:o,afterStop:d,onGround:!1})}if(("at-flight-before-origin"===t.state||"at-inbound-origin"===t.state||"at-our-airport"===t.state)&&t.airport){let n,i,a,l,o=t.airport.icao,s=r(t=>e[t].icao===o,e.length-1);return s[e.lon,e.lat]);t&&r.splice(n+1,0,[t.lon,t.lat]);let a=[r[0]],l=[0];for(let e=1;es[l[t&&i>n?i+1:i]]),planeAt:t?s[u]:null,groundStop:t?.onGround?n:null,bounds:s.length>1?(0,o.lineBounds)(s):null}},"wheresMyPlaneMap",0,function(e,n,i,r){let a=function(e){let n=n=>{let i=(0,t.formatClock)(e?.arrivedAt,n.timezone);return i?` since ${i}`:""};if(e?.state==="at-inbound-origin"&&e.airport){let t;return`At ${(t=e.airport).iata??t.icao}${n(e.airport)}`}let i=e?.flight;if(!i)return null;let r=i.ident.iata??i.ident.icao;if("on-flight-before"===e.state){let e;return`On ${r} from ${(e=i.origin).iata??e.icao}`}if("at-flight-before-origin"===e.state){let t,a,l;return e.arrivedAt?`At ${(t=i.origin).iata??t.icao}${n(i.origin)}`:`At ${(a=i.origin).iata??a.icao} for ${r} to ${(l=i.destination).iata??l.icao}`}return null}(i),l=i?.position?.reportedAt??null,o=[...(i?.state==="on-flight-before"||i?.state==="at-flight-before-origin")&&i.flight?[i.flight.origin,i.flight.destination].filter((e,t,i)=>e.icao!==n.origin.icao&&i.findIndex(t=>t.icao===e.icao)===t):[],n.origin,e].map(f),s=function(e,t,n){if(!n||n.length0===t||n[t-1].destination.icao===e.origin.icao)||i.origin.icao!==t.origin.icao||i.destination.icao!==e.icao||n.some(e=>"cancelled"===e.status||"diverted"===e.status)?null:[...n.map(e=>f(e.origin)),f(e)]}(e,n,r),u=s&&i?p(s,i):null,d=e=>e&&!e.onGround?l:null;if(s&&(u||!i||!p(o,i)))return{stops:s,plane:u,where:a,reportedAt:d(u)};let c=i?p(o,i):null;return{stops:o,plane:c,where:a,reportedAt:d(c)}},"wheresMyPlaneShows",0,d,"wheresMyPlaneView",0,function({flight:e,aircraft:n,inbound:i,now:r}){if(!d(e,r))return null;let a=e.origin.timezone,o={aircraftName:n?.typeName??null,registration:n?.registration??e.aircraft.registration,photo:n?.photo??null};if(!i)return{...o,subtitle:"Inbound flight not listed yet",verdict:null,turn:null};let s=e.times.gateOut.best,f=function(e){let t=u(e);if("cancelled"===t)return{tone:"danger",message:"Your plane’s previous flight was cancelled, so it may not be here for yours.",state:t,landsIso:null};if("diverted"===t)return{tone:"danger",message:"Your plane’s previous flight was diverted, so it may be late for yours.",state:t,landsIso:null};let n="landed"===t,i=e.times.gateIn.best,r=e.turnMinutes,a=!n&&e.late?e.delay.arrivalMinutes??0:null,o=(e,n)=>({tone:e,message:n,state:t,landsIso:null!=(e=>{if(!e)return null;let t=Date.parse(e);return Number.isFinite(t)?t:null})(i)?i:null});if(null==r)return n?o("success","Your plane has landed."):null!=a?o("warning",`Your plane is running ${(0,l.formatMinutes)(a)} late.`):"unknown"===e.status?o("neutral","Your plane’s status is not known yet."):o("success","airborne"===t?"Your plane is in the air and on time.":"Your plane is on schedule.");let s=n?"Landed":"Lands";return r{t.exports=e.r(76562)},75004,10119,e=>{"use strict";var t=e.i(56669);let n=/^c\.([A-Z0-9]{2,8})-(\d{4})(\d{2})(\d{2})-([A-Z0-9]{4})$/;function i(e){return e&&/^[A-Za-z0-9]{2,8}-\d{8,12}-[A-Za-z]+-[A-Za-z0-9]{1,8}$/.test(e)?e:null}function r({ident:e,date:t,origin:n}){let i=`c.${e.toUpperCase()}-${t.replaceAll("-","")}-${n.toUpperCase()}`;return/^\d{4}-\d{2}-\d{2}$/.test(t)&&a(i)?i:null}function a(e){let t,i=n.exec(e);if(!i)return null;let r=`${i[2]}-${i[3]}-${i[4]}`;return Number.isFinite(t=Date.parse(`${r}T00:00:00Z`))&&new Date(t).toISOString().slice(0,10)===r?{ident:i[1],date:r,origin:i[5]}:null}function l(e){if(e.startsWith("c.")){let t=a(e);return t?{kind:"composite",key:e,...t}:null}let t=i(e);return t?{kind:"fa",faFlightId:t}:null}e.s(["classifyFlightId",0,l,"formatFlightKey",0,r,"parseFaFlightId",0,i],10119);let o=e=>(0,t.getAirportByIata)(e.toUpperCase())?.icao??null;async function s(e,t){let n=e?.trim().toUpperCase();return n?/^[A-Z0-9]{4}$/.test(n)?n:await t(n)??null:null}let u=/^[A-Z]{3}\d{1,4}[A-Z]?$/;function d(e,t){if(l(e.ident))return e.ident;let n=e.ident.trim().toUpperCase();return u.test(n)&&e.date&&t?r({ident:n,date:e.date,origin:t}):null}async function c(e,t,n=o){let i=await s(t.origin,n),r=d(t,i);if(r)return{ok:!0,data:r};if(!t.date)return{ok:!0,data:null};let a=await s(t.destination,n),l=await e.searchFlights({ident:t.ident,date:t.date,origin:i??void 0,destination:a??void 0});if(!l.ok)return l;let u=(e,t)=>{let n=e?.trim().toUpperCase();return!n||t.icao===n||t.iata===n},f=l.data.matches.find(e=>u(t.origin,e.origin)&&u(t.destination,e.destination));return{ok:!0,data:f?.id??null}}e.s(["flightIdFromParts",0,d,"legFlightId",0,function(e,t=o){if(e.flightId)return e.flightId;if(e.snapshot?.id)return e.snapshot.id;let n=e.snapshot?.origin.icao||(e.originIata?t(e.originIata):null),i=e.identIcao??e.snapshot?.ident.icao??null;return(i?d({ident:i,date:e.scheduledDate},n):null)??e.faFlightId},"resolveFlightId",0,c,"v1Units",0,e=>"metric"===e?"m":"e"],75004)},46998,e=>{"use strict";let t=e=>({icao:e.icao,iata:e.iata,name:e.name,city:e.city,timezone:e.timezone,position:e.position,gate:e.gate,terminal:e.terminal,baggageClaim:e.baggageClaim??null});e.s(["snapshotOf",0,function(e){let n=e.inbound;return{id:e.id,asOf:e.asOf,resolution:e.resolution,ident:e.ident,operating:e.operating,status:e.status,cancelled:e.cancelled,diverted:e.diverted,phase:e.phase,atAirportStartsAt:e.atAirportStartsAt,times:e.times,delay:e.delay,progressPercent:e.progressPercent,routeDistanceNm:e.routeDistanceNm,remainingDistanceNm:e.remainingDistanceNm??null,position:e.position,plan:e.plan?{cruiseAltitudeFt:e.plan.cruiseAltitudeFt}:null,aircraft:{type:e.aircraft.type,registration:e.aircraft.registration},origin:t(e.origin),destination:t(e.destination),inbound:n?{ident:n.ident,origin:{icao:n.origin.icao,iata:n.origin.iata},status:n.status,delay:n.delay,times:{gateIn:n.times.gateIn},turnMinutes:n.turnMinutes,tightTurn:n.tightTurn,late:n.late,tightScheduledTurn:n.tightScheduledTurn}:null}}])},40875,86632,e=>{"use strict";var t=e.i(36966),n=e.i(944);function i(e){return(0,t.rankOf)(n.V1_AIRPORT_LEVELS,e)}e.s(["airportDelayLine",0,function(e){let t=e.departures.averageDelayMinutes,n=e.departures.delayedPercent;return null==t&&null==n?null:["normal"===e.level?"On time":null,null==t?null:`avg ${t}m`,null==n?null:`${n}% late`].filter(Boolean).join(" · ")},"airportLevelWords",0,function(e){return t.AIRPORT_LEVEL_PRESENTATION[e]},"airportStatusOf",0,function(e,t){return e[t.toUpperCase()]??null},"airportStatusesFrom",0,function(e){let t={};for(let n of e.airports)t[n.icao]=n.status;return t},"airportsOutage",0,function(e){let t=Object.values(e);return 2*t.filter(e=>"unknown"===e.level).length>t.length},"compareAirportLevels",0,function(e,t){return i(t)-i(e)},"hasAirportStatuses",0,function(e){return void 0!==e&&Object.keys(e).length>0}],40875);var r=e.i(71645),a=e.i(40889);e.i(28303);let l=null,o=null;async function s(){return l&&Date.now()-l.at(l={at:Date.now(),status:e},e)).catch(()=>null).finally(()=>{o=null})}e.s(["usePremium",0,function(){let[e,t]=(0,r.useState)(l&&Date.now()-l.at{let e=!0;return s().then(n=>e&&t(n)),()=>{e=!1}},[]),e}],86632)},7746,e=>{"use strict";e.s(["isGateChangeFreshV1",0,function(e,t,n=Date.now()){return!!e&&"landed"!==t&&"arrived"!==t&&"cancelled"!==t&&"diverted"!==t&&n-new Date(e).getTime(){"use strict";var t=e.i(46998),n=e.i(7746),i=e.i(84275);let r=new Set;function a(e){let t=(0,i.legGateTimes)(e).in;for(let e of[t.best,t.scheduled]){let t=e?Date.parse(e):NaN;if(Number.isFinite(t))return t}let n=Date.parse(`${e.scheduledDate}T00:00:00Z`);return Number.isFinite(n)?n+864e5:null}e.s(["isLegOpenable",0,function(e,t=Date.now()){let n=a(e);return null==n||t-nt)continue;let u=a(e);if(null==u||!(n-u>i.OLD_LEG_AFTER_MS)){if(null!=u&&n-u>432e5){if(l.has(e.id))continue;l.add(e.id)}o.push({itId:r.id,leg:e})}}return o}])},38160,e=>{"use strict";var t=e.i(84275);let n="flights-itineraries",i="flights-itineraries-version";e.s(["createItineraryStore",0,function(e,{onSaved:r}={}){return{load(){try{let r=e(),a=r.getItem(n);if(null!=a)return(0,t.parseItineraries)(a);let l=r.getItem("airport-intelligence-itineraries");if(null==l)return[];let o=(0,t.parseItineraries)(l);return r.setItem(n,(0,t.serializeItineraries)(o)),r.setItem(i,String(t.ITINERARIES_VERSION)),o}catch{return[]}},save(a){try{let l=e();l.setItem(n,(0,t.serializeItineraries)(a)),l.setItem(i,String(t.ITINERARIES_VERSION)),r?.()}catch{}}}},"isItinerariesStorageKey",0,e=>null===e||e===n])}]);