1import{c as W,j as e,s as m,F as ee,A as v,P as E,H as te,q as h,D as se,z as ie,E as S,aR as U,r as x,G as H,aS as ae,W as B,aT as ne,ax as re,aD as oe,av as le,aU as ce,aV as de}from"./index-D_VHzs2L.js";import{p as me}from"./itinerarySearchHandoff-ZkV1s0CI.js";import{a as p,u as q,A as ue,r as pe,c as $}from"./AppShell-BJQpVtqq.js";import{I as u}from"./NotificationBell-CsPJmhQv.js";import{A as xe}from"./arrow-up-right-2LIbHwa8.js";import{T as he}from"./trending-up-DcUSaB1H.js";import{b as z,g as V,c as D,d as k,f as j,a as R,r as K,e as fe,t as ge,h as be,i as je,l as ve,j as ye,k as Ne,m as we,n as ke,o as Se}from"./homeModel-DkMlcr-P.js";import{M as _e}from"./message-square-B55GJvkV.js";import{P as Ae}from"./types-C_1V1yJk.js";import{u as $e,L as ze}from"./useCuratedDeals-C906pAaS.js";import{u as De}from"./useBeyondTrips-CVNkvG_e.js";import{u as Ie}from"./useRouteWatches-BV9_Qq6d.js";import{u as Me}from"./useUserPoints-CgnQDSYI.js";import"./sheet-B7IV0mmd.js";import"./useSearchUsage-6zmeDrTe.js";import"./user-Ct-vts3T.js";import"./log-out-DmAO4aIY.js";import"./gem-BPgMJppv.js";import"./orbit-CxNoHG1d.js";import"./bell-CMcGqi33.js";import"./trending-down-BQ56yVju.js";import"./index-BHk18-Nk.js";import"./registry-CzPE992t.js";import"./engagementAnalytics-CGJ5ZiPX.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Y=W("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Pe=W("Radar",[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]);function Re({eyebrow:t,greeting:s,context:i}){return e.jsxs("section",{"aria-label":"Plan a trip",className:"plate-photo min-w-0",children:[e.jsxs("picture",{children:[e.jsx("source",{type:"image/avif",srcSet:"/brand/tropical-hero-640.avif 640w, /brand/tropical-hero-960.avif 960w, /brand/tropical-hero-1536.avif 1536w",sizes:"(min-width: 1280px) 1080px, 100vw"}),e.jsx("source",{type:"image/webp",srcSet:"/brand/tropical-hero-640.webp 640w, /brand/tropical-hero-960.webp 960w, /brand/tropical-hero-1536.webp 1536w",sizes:"(min-width: 1280px) 1080px, 100vw"}),e.jsx("img",{src:"/brand/tropical-hero.jpg",alt:"","aria-hidden":!0,width:1536,height:864,fetchPriority:"high",decoding:"async"})]}),e.jsx("div",{className:"plate-photo-band lg:hidden","aria-hidden":!0}),e.jsxs("div",{className:"relative bg-background p-5 sm:p-7 lg:min-h-[21rem] lg:bg-transparent lg:p-9",children:[e.jsxs("div",{className:"max-w-[30rem]",children:[e.jsx("p",{className:"type-eyebrow",children:t}),e.jsx("h1",{className:"mt-2 font-display text-title-editorial text-foreground text-balance",children:s}),i&&e.jsx("p",{className:"mt-2 text-base text-muted-foreground",children:i})]}),e.jsxs(m,{to:p,className:"surface-instrument group mt-6 flex h-14 max-w-[30rem] items-center gap-3 rounded-full pl-5 pr-2 transition-colors duration-fast hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:h-16",children:[e.jsx(u,{icon:ee,size:"md",className:"shrink-0 text-primary"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-label-lg text-muted-foreground transition-colors duration-fast group-hover:text-foreground",children:"Tell me your dream tripâ¦"}),e.jsxs("span",{className:"inline-flex h-10 shrink-0 items-center gap-1.5 rounded-full bg-primary px-4 text-sm font-semibold text-primary-foreground sm:h-12 sm:px-5",children:["Plan",e.
11jsx(u,{icon:v,size:"sm",className:"transition-transform duration-fast group-hover:translate-x-0.5"})]})]}),e.jsx("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-2",children:[{icon:E,label:"Flights",to:p},{icon:te,label:"Hotels",to:`${p}?product=hotels`}].map(a=>e.jsxs(m,{to:a.to,className:"inline-flex min-h-[36px] items-center gap-1.5 rounded-full border border-border bg-card px-3.5 text-sm font-medium text-foreground transition-colors duration-fast hover:border-primary/40 hover:text-primary-text focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(u,{icon:a.icon,size:"xs"})," ",a.label]},a.label))})]})]})}const N=[{icon:se,label:"Search exact dates",description:"Fixed dates, every program you hold priced against cash.",to:p},{icon:ie,label:"Flexible dates",description:"Whole months and seasons â the planner's flexible mode.",to:p},{icon:he,label:"Optimize my points",description:"See where your balances actually go furthest.",to:"/point-map"},{icon:S,label:"Watch a route",description:"We keep checking it and tell you when it improves.",to:"/watches"}],Le={icon:Pe,label:"Discover live deals",description:"Award deals from the latest program scans.",to:"/discover"};function Te(){const{entitled:t}=q(),s=t?[N[0],N[1],Le,N[2],N[3]]:[...N];return e.jsx("nav",{"aria-label":"Quick actions",className:h("grid grid-cols-2 gap-2.5 lg:gap-3",s.length===5?"lg:grid-cols-5":"lg:grid-cols-4"),children:s.map((i,a)=>e.jsxs(m,{to:i.to,className:h("surface-object hover-lift group flex min-h-[44px] flex-col gap-2 p-3.5 transition-colors duration-fast hover:border-primary/35 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s.length%2===1&&a===s.length-1&&"col-span-2 lg:col-span-1"),children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"inline-flex h-9 w-9 items-center justify-center rounded-object bg-primary/10",children:e.jsx(u,{icon:i.icon,size:"sm",className:"text-primary"})}),e.jsx(u,{icon:xe,size:"xs",className:"text-muted-foreground transition-transform duration-fast group-hover:-translate-y-0.5 group-hover:text-primary-text"})]}),e.jsx("span",{className:"text-sm font-semibold leading-snug text-foreground",children:i.label}),e.jsx("span",{className:"text-meta text-muted-foreground",children:i.description})]},i.label))})}function _({label:t,note:s,action:i,className:a,children:l}){return e.jsxs("section",{"aria-label":t,className:h("min-w-0",a),children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[e.jsxs("div",{className:"flex min-w-0 items-baseline gap-3",children:[e.jsx("h2",{className:"type-eyebrow",children:t}),s&&e.jsx("span",{className:"truncate text-meta text-muted-foreground",children:s})]}),i&&e.jsx(m,{to:i.to,className:"text-meta text-muted-foreground hover:text-foreground transition-colors duration-fast rounded-control focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:i.label})]}),e.jsx("div",{className:"mt-3",children:l})]})}function Ce({focus:t}){var y;const{trip:s,kind:i,daysOut:a}=t,l=z(s),r=V(D(s)),n=U(r==null?void 0:r.heroImageKey),o=k(s.start_date,s.end_date),c=i==="upcoming"?a===0?"Today":a===1?"Tomorrow":`In ${a} days`:s.status==="saved"?"Saved":"Planning",d=s.travelers_count&&s.travelers_count>1?`${s.travelers_count} travelers`:null,f=[o,d].filter(Boolean).join(" · "),g=((y=s.next_action)==null?void 0:y.trim())||"Open trip";return e.jsx(_,{label:i==="upcoming"?"Next trip":"Active trip",action:{label:"All trips",to:"/adventure-vault"},children:e.jsxs(m,{to:`/trip/${s.id}`,className:h("surface-raised group grid overflow-hidden transition-colors duration-fast hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",n?"sm:grid-cols-[minmax(0,4fr)_minmax(0,6fr)]":"grid-cols-1"),children:[n&&e.jsx("div",{className:"media-object media-fill rounded-none",children:e.jsxs("picture",{children:[n.avif&&e.jsx("source",{type:"image/avif",srcSet:`${n.avif.w640} 640w, ${n.avif.w1280} 1280w`,sizes:"(min-width: 1024px) 448px, 100vw"}),e.jsx("source",{type:"image/webp",srcSet:`${n.webp.w640} 640w, ${n.webp.w1280} 1280w`,sizes:"(min-width: 1024px) 448px, 100vw"}),e.jsx("img",{src:n.jpg,alt:(r==null?void 0:r.heroImageAlt)??l.city,width:n.width,height:n.height,loading:"lazy",decoding:"async"})]})}),e.jsxs("div",{className:"flex min-w-0 flex-col justify-between gap-5 p-5 sm:p-7",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-meta text-muted-foreground",children:c}),e.jsxs("h3",{className:"mt-1 text-title-editorial leading-tight text-foreground truncate",children:[l.city,l.country&&e.jsxs("span",{className:"text-muted-foreground font-medium",children:[", ",l.country]})]}),f&&e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),s.is_monitored&&e.jsxs("p",{className:"mt-2 inline-flex items-center gap-1.5 text-meta font-semibold text-success",children:[e.jsx(u,{icon:S,size:"xs"})," Watching for a better fare"]})]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-sm font-semibold text-primary-text",children:[g,e.jsx(u,{icon:v,size:"sm",className:"transition-transform duration-fast group-hover:translate-x-0.5"})]})]})]})})}function L(){if(typeof window>"u"||typeof window.matchMedia!="function")return!0;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!0}}function Fe(t,s=600){const[i,a]=x.useState(()=>t>0&&!L()?0:t),l=x.useRef(!1);return x.useEffect(()=>{if(l.current||t<=0||L()){l.current=!0,a(t);return}l.current=!0;const r=performance.now();let n=0;const o=c=>{const d=Math.min(1,(c-r)/s),f=1-Math.pow(1-d,3);a(Math.round(t*f)),d<1&&(n=requestAnimationFrame(o))};return n=requestAnimationFrame(o),()=>cancelAnimationFrame(n)},[t,s]),i}function T({value:t,className:s}){const i=Fe(t);return e.jsx("span",{className:s,children:j(i)})}function Oe({points:t}){if(!Number.isFinite(t)||t<=0)return null;const s=Math.round(t*.03),i=Math.round(t*.1);return e.jsxs("div",{className:"mb-4 min-w-0",children:[e.jsx("p",{className:"text-meta font-semibold text-primary-text",children:"Potential travel value"}),e.jsxs("p",{className:"mt-2 text-3xl font-bold leading-tight tracking-tight tabular-nums text-primary-text sm:text-4xl",children:[e.jsxs("span",{className:"sr-only",children:[R(s)," to ",R(i)," USD"]}),e.jsxs("span",{"aria-hidden":"true",className:"flex flex-wrap items-baseline gap-x-2",children:[e.jsxs("span",{className:"whitespace-nowrap",children:["$",e.jsx(T,{value:s})]}),e.jsx("span",{children:"â"}),e.jsxs("span",{className:"whitespace-nowrap",children:["$",e.jsx(T,{value:i})]})]})]}),e.jsx("p",{className:"mt-2 text-meta font-medium text-foreground",children:"Illustrative travel value at 3â10¢ per point."}),e.jsx("p",{className:"mt-1 text-meta text-muted-foreground",children:"Actual value depends on your rewards programs, destination, cabin, award availability, timing, and flexibility. These rates are not guaranteed."})]})}const We=t=>t?t.charAt(0).toUpperCase()+t.slice(1).replace(/_/g," "):"";function w({label:t,action:s,children:i,className:a,tone:l}){return e.jsxs("section",{"aria-label":t,className:h("flex min-w-0 flex-col p-5",l==="asset"&&"bg-muted/60",a),children:[e.jsx("h2",{className:"type-eyebrow",children:t}),e.jsx("div",{className:"mt-4 flex-1",children:i}),s&&e.jsxs(m,{to:s.to,className:"mt-5 inline-flex w-fit items-center gap-1 rounded-control text-meta font-medium text-muted-foreground transition-colors duration-fast hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[s.label,e.jsx(u,{icon:v,size:"xs"})]})]})}
11function Ee({conversations:t,watches:s,activeWatchCount:i,accounts:a,totalPoints:l,now:r}){const n=[];if(t.length>0&&n.push(e.jsx(w,{label:"Recent planning",action:{label:"Open planner",to:p},children:e.jsx("ul",{className:"-mx-2 space-y-0.5",children:t.map(c=>e.jsx("li",{children:e.jsxs(m,{to:`${p}?c=${encodeURIComponent(c.id)}`,className:"flex min-h-[36px] items-center gap-2.5 rounded-control px-2 py-1.5 transition-colors duration-fast hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(u,{icon:_e,size:"xs",className:"text-muted-foreground"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:c.preview}),e.jsx("span",{className:"shrink-0 text-meta text-muted-foreground tabular-nums",children:K(c.created_at,r)})]})},c.id))})},"activity")),s.length>0){const c=i-s.length;n.push(e.jsxs(w,{label:i===1?"Watching":`Watching ${i} routes`,action:{label:"All watches",to:"/watches"},children:[e.jsx("ul",{className:"space-y-3",children:s.map(d=>e.jsx("li",{className:"min-w-0",children:e.jsxs(m,{to:"/watches",className:"-mx-2 block rounded-control px-2 py-1 transition-colors duration-fast hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("span",{className:"font-mono text-sm font-medium tracking-tight text-foreground",children:[d.origin," ",e.jsx("span",{className:"text-muted-foreground",children:"â"})," ",d.destination]}),d.improved?e.jsx("span",{className:"text-meta font-semibold text-success",children:"Improved"}):e.jsx("span",{className:"text-meta text-muted-foreground",children:k(d.outbound_date,null)})]}),e.jsxs("div",{className:"mt-0.5 flex items-baseline justify-between gap-3 text-meta text-muted-foreground",children:[e.jsxs("span",{className:"truncate",children:[We(d.cabin),d.best_points!=null&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("span",{className:"tabular-nums text-foreground",children:[j(d.best_points)," mi"]}),d.best_program&&` · ${d.best_program}`]})]}),e.jsx("span",{className:"shrink-0",children:fe(d.last_checked_at,r)})]})]})},d.id))}),c>0&&e.jsxs("p",{className:"mt-3 text-meta text-muted-foreground",children:[c," more watched"]})]},"state"))}const o=ge(a,3);return n.push(a.length===0?e.jsxs(w,{tone:"asset",label:"Points",action:{label:"Connect your points",to:"/profile?tab=accounts"},children:[e.jsx("p",{className:"text-sm text-foreground",children:"No programs connected yet"}),e.jsx("p",{className:"mt-1 text-meta text-muted-foreground",children:"Add what you hold â every recommendation is then priced against your points."})]},"asset"):e.jsxs(w,{tone:"asset",label:"Points",action:{label:"Point map",to:"/point-map"},children:[e.jsxs(m,{to:"/profile?tab=accounts",className:"-mx-2 block rounded-control px-2 py-1 transition-colors duration-fast hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(Oe,{points:l}),e.jsx("p",{className:"text-xl font-semibold leading-tight tabular-nums text-foreground",children:j(l)}),e.jsxs("p",{className:"mt-1 text-meta text-muted-foreground",children:["points across ",a.length," ",a.length===1?"program":"programs"]})]}),o.length>0&&e.jsx("ul",{className:"mt-3 space-y-1",children:o.map(c=>e.jsxs("li",{className:"flex items-baseline justify-between gap-3 text-meta",children:[e.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:c.loyalty_programs.name}),e.jsx("span",{className:"shrink-0 tabular-nums text-foreground",children:j(c.current_balance)})]},c.id))})]},"asset")),n.length===0?null:e.jsx("div",{className:h("surface-raised grid divide-y divide-border/70",n.length===2&&"sm:grid-cols-2 sm:divide-x sm:divide-y-0",n.length===3&&"lg:grid-cols-3 lg:divide-x lg:divide-y-0"),children:n})}function Ue({guide:t,because:s,showImage:i=!0}){const a=i?U(t.heroImageKey):null;return e.jsx(_,{label:"Travel intelligence",action:{label:"Library",to:"/guides"},children:e.jsxs(m,{to:t.path,className:h("surface-raised group overflow-hidden transition-colors duration-fast hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",a?"grid sm:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]":"block"),children:[a&&e.jsx("div",{className:h("media-object roun
11ded-none","media-fill"),children:e.jsxs("picture",{children:[a.avif&&e.jsx("source",{type:"image/avif",srcSet:`${a.avif.w640} 640w, ${a.avif.w1280} 1280w`,sizes:"(min-width: 1024px) 460px, 100vw"}),e.jsx("source",{type:"image/webp",srcSet:`${a.webp.w640} 640w, ${a.webp.w1280} 1280w`,sizes:"(min-width: 1024px) 460px, 100vw"}),e.jsx("img",{src:a.jpg,alt:t.heroImageAlt??t.title,width:a.width,height:a.height,loading:"lazy",decoding:"async"})]})}),e.jsxs("div",{className:h("p-4","sm:flex sm:flex-col sm:justify-center sm:p-6"),children:[e.jsxs("p",{className:"text-meta text-muted-foreground",children:[Ae[t.pillar]," · ",s]}),e.jsx("h3",{className:"mt-1 text-title-object text-foreground",children:t.title}),e.jsx("p",{className:h("mt-1 text-sm text-muted-foreground","line-clamp-3 max-w-[68ch]"),children:t.description}),e.jsxs("span",{className:"mt-3 inline-flex items-center gap-1.5 text-sm font-semibold text-primary-text",children:["Read the guide",e.jsx(u,{icon:v,size:"sm",className:"transition-transform duration-fast group-hover:translate-x-0.5"})]})]})]})})}const He=8,Be=3,qe=t=>t?t.charAt(0).toUpperCase()+t.slice(1).replace(/_/g," "):null,G=(t,s)=>{try{return Math.round(t).toLocaleString("en-US",{style:"currency",currency:s||"USD",maximumFractionDigits:0})}catch{return`${Math.round(t).toLocaleString("en-US")} ${s??""}`.trim()}};function Ve(){const{deals:t,isLoading:s,lastRefreshed:i}=$e(),{entitled:a}=q(),l=x.useMemo(()=>new Date,[]);if(s||t.length===0)return null;const r=a?"/discover":p,n=i?`refreshed ${K(i.toISOString(),l)}`:null,o=t.slice(0,He);return e.jsx(_,{label:"Live deals",note:n,action:a?{label:"Discover",to:"/discover"}:{label:"Open planner",to:p},className:"animate-rise",children:o.length===1?e.jsx(Ke,{deal:o[0],to:r}):o.length<Be?e.jsx("ul",{className:"grid gap-4 sm:grid-cols-2",children:o.map(c=>e.jsx("li",{className:"min-w-0",children:e.jsx(C,{deal:c,to:r})},c.id))}):e.jsx("ul",{className:"rail-x",children:o.map(c=>e.jsx("li",{className:"w-64 sm:w-72",children:e.jsx(C,{deal:c,to:r})},c.id))})})}function Q(t){const s=t.deal_type==="flight",i=H(t.destination,t.destination_city),a=s?t.destination_city:t.hotel_name??t.destination_city,l=s?k(t.departure_date,t.return_date):k(t.check_in_date,t.check_out_date),r=[];if(s){const o=qe(t.cabin_class);o&&r.push(o),r.push(t.stops===0?"Nonstop":`${t.stops} stop${t.stops===1?"":"s"}`)}else t.nights&&r.push(`${t.nights} night${t.nights===1?"":"s"}`),t.hotel_name||r.push(t.destination_city);l&&r.push(l);const n=t.points_price!=null?t.points_price_source==="scraped"?`${j(t.points_price)} pts${t.points_program?` · ${t.points_program}`:""}`:`â ${j(t.points_price)} pts estimated`:null;return{isFlight:s,img:i,title:a,facts:r,points:n}}function X({img:t,isFlight:s,code:i,sizes:a}){return t?e.jsxs("picture",{children:[t.srcSetAvif&&e.jsx("source",{type:"image/avif",srcSet:t.srcSetAvif,sizes:a}),t.srcSetWebp&&e.jsx("source",{type:"image/webp",srcSet:t.srcSetWebp,sizes:a}),e.jsx("img",{src:t.src,alt:t.alt,width:t.width,height:t.height,loading:"lazy",decoding:"async"})]}):e.jsxs("div",{className:"flex h-full w-full items-center justify-center gap-2 bg-secondary text-secondary-foreground","aria-hidden":!0,children:[e.jsx(u,{icon:s?E:ae,size:"md",className:"opacity-40"}),e.jsx("span",{className:"font-mono text-sm",children:i})]})}function C({deal:t,to:s}){const{isFlight:i,img:a,title:l,facts:r,points:n}=Q(t);return e.jsxs(m,{to:s,className:"surface-raised hover-lift group block h-full overflow-hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx("div",{className:"media-object rounded-none",children:e.jsx(X,{img:a,isFlight:i,code:t.destination,sizes:"(min-width: 640px) 288px, 256px"})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("h3",{className:"min-w-0 truncate text-title-object text-foreground",children:l}),i&&e.jsxs("span",{className:"shrink-0 font-mono text-meta text-muted-foreground",children:[t.origin,"â",t.destination]})]}),r.length>0&&e.jsx("p",{className:"mt-1 truncate text-meta text-muted-foreground",children:r.join(" · ")}),e.jsxs("p",{className:"mt-2 text-sm text-foreground",children:[e.jsx("span",{className:"font-semibold tabular-nums",children:G(t.cash_price,t.currency)}),n&&e.jsxs("span",{className:"text-muted-foreground",children:[" · ",n]})]})]})]})}function Ke({deal:t,to:s}){const{isFlight:i,img:a,title:l,facts:r,points:n}
11=Q(t);return e.jsxs(m,{to:s,className:"surface-raised group grid overflow-hidden transition-colors duration-fast hover:bg-muted/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]",children:[e.jsx("div",{className:"media-object media-fill rounded-none",children:e.jsx(X,{img:a,isFlight:i,code:t.destination,sizes:"(min-width: 640px) 460px, 100vw"})}),e.jsxs("div",{className:"flex min-w-0 flex-col justify-center gap-2 p-5 sm:p-7",children:[e.jsxs("p",{className:"text-meta text-muted-foreground",children:[i?"Flight":"Hotel",i&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("span",{className:"font-mono",children:[t.origin,"â",t.destination]})]})]}),e.jsx("h3",{className:"text-title-editorial leading-tight text-foreground truncate",children:l}),r.length>0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:r.join(" · ")}),e.jsxs("p",{className:"mt-1 text-base text-foreground",children:[e.jsx("span",{className:"font-semibold tabular-nums",children:G(t.cash_price,t.currency)}),n&&e.jsxs("span",{className:"text-muted-foreground",children:[" · ",n]})]}),e.jsxs("span",{className:"mt-2 inline-flex items-center gap-1.5 text-sm font-semibold text-primary-text",children:["Plan this trip",e.jsx(u,{icon:v,size:"sm",className:"transition-transform duration-fast group-hover:translate-x-0.5"})]})]})]})}const Ye=[{iata:"NRT",city:"Tokyo"},{iata:"CDG",city:"Paris"},{iata:"CUN",city:"Cancún"},{iata:"FCO",city:"Rome"},{iata:"DXB",city:"Dubai"},{iata:"LHR",city:"London"}];function F(){const t=Ye.map(s=>({idea:s,img:H(s.iata,s.city)})).filter(s=>s.img!==null);return t.length===0?null:e.jsx(_,{label:"Ideas to start from",action:{label:"Open planner",to:p},className:"animate-rise",children:e.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4",children:t.map(({idea:s,img:i})=>e.jsx("li",{className:"min-w-0",children:e.jsx(m,{to:p,"aria-label":`Plan a trip to ${s.city}`,className:"hover-lift group block rounded-object focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:e.jsxs("span",{className:"media-tile",children:[e.jsxs("picture",{children:[i.srcSetAvif&&e.jsx("source",{type:"image/avif",srcSet:i.srcSetAvif,sizes:"(min-width: 640px) 340px, 50vw"}),i.srcSetWebp&&e.jsx("source",{type:"image/webp",srcSet:i.srcSetWebp,sizes:"(min-width: 640px) 340px, 50vw"}),e.jsx("img",{src:i.src,alt:i.alt,width:i.width,height:i.height,loading:"lazy",decoding:"async"})]}),e.jsxs("span",{className:"media-tile-caption flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-title-object",children:s.city}),e.jsx("span",{className:"shrink-0 font-mono text-meta opacity-80",children:s.iata})]})]})})},s.iata))})})}const Ge=[{icon:ze,label:"Trips",to:"/adventure-vault"},{icon:B,label:"Points",to:"/point-map"},{icon:S,label:"Watches",to:"/watches"},{icon:Y,label:"Travel DNA",to:"/profile?tab=preferences"},{icon:ne,label:"Executive Lounge",to:"/promotions"}];function Qe(){return e.jsx("nav",{"aria-label":"Around Beyond Points",className:"flex flex-wrap items-center gap-x-6 gap-y-1",children:Ge.map(t=>e.jsxs(m,{to:t.to,className:"inline-flex min-h-[44px] items-center gap-1.5 rounded-control text-sm text-muted-foreground transition-colors duration-fast hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(u,{icon:t.icon,size:"xs"}),t.label]},t.to))})}const Xe=[{icon:B,title:"Connect your points",body:"Add the programs you hold so every recommendation is priced against what you actually have.",to:"/profile?tab=accounts"},{icon:S,title:"Watch a route",body:"Ask the planner to keep watching a fare â you hear the moment it gets better.",to:p},{icon:Y,title:"Set your Travel DNA",body:"Home airport, cabins, how you like to travel â so we never ask twice.",to:"/profile?tab=preferences"}];function Je(){return e.jsxs("section",{"aria-label":"Starting points",className:"min-w-0",children:[e.jsx("h2",{className:"type-eyebrow",children:"Starting points"}),e.jsx("p",{className:"mt-3 max-w-[46ch] font-display text-title-section leading-snug text-foreground",children:"Three things make every recommendation sharper."}),e.jsx("ul",{className:"mt-6 surface-object divide-y divide-border/70",children:Xe.map(t=>e.jsx("li",{children:e.jsx(m,{to:t.to,className:"group block p-5 transition-colors duration-fast hover:bg-muted/40 focu
11s-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring sm:p-6",children:e.jsxs("span",{className:"flex w-full max-w-[46rem] items-start gap-5",children:[e.jsx(u,{icon:t.icon,size:"md",className:"mt-0.5 text-primary"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-title-object text-foreground",children:t.title}),e.jsx("span",{className:"mt-1 block text-sm text-muted-foreground",children:t.body})]}),e.jsx(u,{icon:v,size:"sm",className:"mt-1 shrink-0 text-muted-foreground transition-transform duration-fast group-hover:translate-x-0.5 group-hover:text-primary-text"})]})})},t.title))})]})}const Ze=t=>`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`;function et(){var I,M;const{user:t}=re(),s=De(),i=Ie(),a=Me(),l=oe(t==null?void 0:t.id),r=x.useMemo(()=>new Date,[]),n=be((I=t==null?void 0:t.user_metadata)==null?void 0:I.full_name),o=x.useMemo(()=>je(s.trips,Ze(r)),[s.trips,r]),c=x.useMemo(()=>ve(i.activeWatches,3),[i.activeWatches]),d=x.useMemo(()=>ye(l.data??[],3),[l.data]),f=x.useMemo(()=>{const A=[];o&&A.push({code:D(o.trip),because:`because you're going to ${z(o.trip).city}`});for(const b of c)A.push({code:b.destination,because:`because you're watching ${b.origin} â ${b.destination}`});for(const b of A){const P=Ne([b.code]);if(P)return{guide:P,because:b.because}}return null},[o,c]),g=!s.isLoading&&!i.isLoading&&!a.isLoading&&!l.isLoading,y=g&&we({trips:s.trips.length,watches:i.activeWatches.length,accounts:a.accounts.length,recent:d.length}),J=!!o,Z=g?(o==null?void 0:o.kind)==="upcoming"&&o.daysOut!==null&&o.daysOut>0?`${z(o.trip).city} is ${o.daysOut} ${o.daysOut===1?"day":"days"} away.`:"Your AI travel strategist â tell it the trip, get the smartest way to pay for it.":null;return e.jsx(ue,{headerTone:"quiet",children:e.jsxs("main",{className:"mx-auto w-full max-w-[1120px] px-4 pb-6 pt-4 sm:px-6 lg:px-8 lg:pb-16 lg:pt-8",children:[e.jsx(Re,{eyebrow:ke(r),greeting:Se(r,n),context:Z}),e.jsx("div",{className:"mt-5 animate-rise",children:e.jsx(Te,{})}),!g&&e.jsx("div",{className:"mt-10 space-y-8","aria-busy":"true","aria-label":"Loading your home",children:e.jsx(tt,{})}),g&&y&&e.jsxs("div",{className:"mt-10 space-y-8",children:[e.jsx(Je,{}),e.jsx(F,{})]}),g&&!y&&e.jsxs("div",{className:"mt-10 space-y-8",children:[J&&o&&e.jsx(Ce,{focus:o}),e.jsx(Ee,{conversations:d,watches:c,activeWatchCount:i.activeWatches.length,accounts:a.accounts,totalPoints:a.totalPoints,totalValue:a.totalValue,now:r}),f&&e.jsx(Ue,{guide:f.guide,because:f.because,showImage:!o||((M=V(D(o.trip)))==null?void 0:M.heroImageKey)!==f.guide.heroImageKey}),e.jsx(Ve,{}),e.jsx(F,{})]}),g&&e.jsx("div",{className:"mt-10 border-t border-border/60 pt-4 animate-rise [animation-delay:120ms]",children:e.jsx(Qe,{})})]})})}function tt(){return e.jsx("div",{className:"surface-raised grid divide-y divide-border/70 lg:grid-cols-3 lg:divide-x lg:divide-y-0","aria-hidden":!0,children:[0,1,2].map(t=>e.jsxs("div",{className:"p-5",children:[e.jsx("div",{className:"h-3 w-24 rounded-control bg-muted"}),e.jsx("div",{className:"mt-5 h-3.5 w-2/3 rounded-control bg-muted"}),e.jsx("div",{className:"mt-2.5 h-3 w-1/3 rounded-control bg-muted/70"})]},t))})}function O(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function _t(){const t=le(),[s]=x.useState(()=>{const a=O(),l=ce(),r=me(),n=[l?`draft:${l.id}`:null,r?`handoff:${JSON.stringify(r)}`:null];return{entry:pe({search:t.search,state:t.state??null,hasIntentDraft:$(n[0],a,!1),hasSearchHandoff:$(n[1],a,!1)}),fingerprints:n}});x.useEffect(()=>{if(s.entry.kind!=="planner")return;const a=O();for(const l of s.fingerprints)$(l,a,!0)},[s]);const{entry:i}=s;return i.kind==="planner"?e.jsx(de,{to:i.to,state:i.state,replace:!0}):e.jsx(et,{})}export{_t 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.