1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,864476,e=>{"use strict";var l=e.i(843476),a=e.i(215505),t=e.i(13251),n=e.i(719658),i=e.i(860999),s=e.i(271645),o=e.i(618566);let r={recharge:"recharge_look",explore_new:"explore_excites",food_drink:"food_personality",adrenaline:"adrenaline_kind",history_culture:"culture_pull",celebrate:"celebrate_occasion"},c={recharge_look:"recharge_setting",recharge_setting:"shared_destination_kind",explore_excites:"explore_bring_home",explore_bring_home:"shared_destination_kind",food_personality:"food_palate",food_palate:"shared_destination_kind",adrenaline_kind:"adrenaline_intensity",adrenaline_intensity:"shared_destination_kind",culture_pull:"culture_experience",culture_experience:"shared_destination_kind",celebrate_occasion:"celebrate_vibe",celebrate_vibe:"shared_destination_kind",shared_destination_kind:"shared_setting",shared_setting:"shared_scenes",shared_scenes:"shared_when",shared_when:"shared_duration",shared_duration:"shared_companion",shared_companion:"shared_budget",shared_budget:"shared_avoid",shared_avoid:"shared_soft",shared_soft:"shared_notes"},d={setting_ancient:[{value:"scene_cobblestone",label:"Cobblestone old towns"},{value:"scene_ruins_dawn",label:"Temple ruins at dawn"},{value:"scene_underground",label:"Hidden underground layers"},{value:"scene_traditions",label:"Living traditions & rituals"}],setting_coast:[{value:"scene_secret_coves",label:"Secret coves & beaches"},{value:"scene_clifftop",label:"Clifftop villages"},{value:"scene_harbors",label:"Fishing harbors & seafood"},{value:"scene_island_hop",label:"Island hopping by boat"}],setting_mountains:[{value:"scene_alpine",label:"Alpine villages"},{value:"scene_ridge_trails",label:"Hiking ridge trails"},{value:"scene_hot_springs",label:"Hot springs & valleys"},{value:"scene_monasteries",label:"Mountain monasteries"}],setting_cities:[{value:"scene_rooftops",label:"Rooftop bars & nightlife"},{value:"scene_street_art",label:"Street art & neighborhoods"},{value:"scene_markets",label:"Markets & street food"},{value:"scene_design",label:"Design & architecture"}],setting_nature:[{value:"scene_waterfalls",label:"Waterfalls & swimming holes"},{value:"scene_forest_silence",label:"Forest trails & silence"},{value:"scene_wildlife",label:"Wildlife encounters"},{value:"scene_road_trips",label:"Scenic road trips"}],setting_desert:[{value:"scene_stargazing",label:"Stargazing & silence"},{value:"scene_canyons",label:"Canyon landscapes"},{value:"scene_oasis",label:"Oasis towns"},{value:"scene_nomadic",label:"Nomadic culture"}]};function u(e){let l=new Set,a=[];for(let t of e)l.has(t.value)||(l.add(t.value),a.push(t));return a}let h={root:{id:"root",question:"What's pulling you to travel right now?",subtitle:"Select all that apply â your first pick shapes what we ask next.",kind:"multi_select",minSelect:1,maxSelect:6,options:[{emoji:"ð",label:"I need to disconnect and recharge",value:"recharge"},{emoji:"ð§",label:"I want to explore somewhere I've never been",value:"explore_new"},{emoji:"ð",label:"I'm chasing incredible food and drink",value:"food_drink"},{emoji:"â°ï¸",label:"I want an adrenaline rush",value:"adrenaline"},{emoji:"ðï¸",label:"I want to feel inspired by history and culture",value:"history_culture"},{emoji:"ð¥",label:"I'm celebrating something special",value:"celebrate"}]},recharge_look:{id:"recharge_look",question:"What does recharging look like for you?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:5,options:[{value:"beach_nothing",label:"Doing absolutely nothing on a beach",emoji:"ðï¸"},{value:"slow_town",label:"Slow mornings in a beautiful town",emoji:"â"},{value:"spa",label:"Spa and wellness immersion",emoji:"ð"},{value:"alone_nature",label:"Being alone in nature with no one around",emoji:"ð²"},{value:"yoga_retreat",label:"Yoga or meditation retreat",emoji:"ð§"}]},recharge_setting:{id:"recharge_setting",question:"What setting speaks to you?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:5,options:[{value:"ocean",label:"Ocean and coast",emoji:"ð"},{value:"mountains",label:"Mountains and valleys",emoji:"ðï¸"},{value:"countryside",label:"Countryside and vineyards",emoji:"ð"},{value:"jungle",label:"Tropical jungle",emoji:"ð´"},{value:"desert",label:"Desert and open sky",emoji:"ðï¸"}]},explore_excites:{id:"explore_excites",question:"What kind of exploring excites you?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:5,options:[{value:"no_plan",label:"Wandering streets with no plan",emoji:"ð¶"},{value:"deep_neighborhood",label:"Going deep on one neighborhood at a time",emoji:"ð§"},{value:"cover_ground",label:"Covering as much ground as possible",emoji:"ðºï¸"},{value:"lost_on_purpose",label:"Getting lost on purpose",emoji:"ð"},{value:"locals_not_tourists",label:"Going where locals go",emoji:"ðï¸"}]},explore_bring_home:{id:"explore_bring_home",question:"What do you want to come home with?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:5,options:[{value:"photos",label:"Incredible photos",emoji:"ð¸"},{value:"perspective",label:"A new perspective",emoji:"ð¡"},{value:"stories",label:"Stories no one else has",emoji:"ð"},{value:"return_list",label:"A list of places to return to",emoji:"ð"},{value:"culture_deep",label:"A deeper understanding of a culture",emoji:"ð"}]},food_personality:{id:"food_personality",question:"What's your food personality?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:6,options:[{value:"street",label:"Street food hunter â the dirtier the stall, the better",emoji:"ð®"},{value:"fine",label:"Fine dining and tasting menus",emoji:"ð½ï¸"},{value:"markets_class",label:"Markets and cooking classes",emoji:"ð§âð³"},{value:"wine_spirits",label:"Wine, sake, or spirits focused",emoji:"ð·"},{value:"cafe",label:"Breakfast and café culture",emoji:"â"},{value:"signature_dish",label:"The thing this place is known for",emoji:"â"}]},food_palate:{id:"food_palate",question:"How adventurous is your palate?",kind:"single_select",options:[{value:"anything",label:"I'll eat anything put in front of me",emoji:"ð¥"},{value:"adventurous_limits",label:"Adventurous but I have limits",emoji:"ð"},{value:"familiar_great",label:"I like familiar food done really well",emoji:"ð "},{value:"dietary",label:"I have dietary restrictions that matter",emoji:"ð¥"}]},adrenaline_kind:{id:"adrenaline_kind",question:"What kind of rush?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:6,options:[{value:"hike",label:"Hiking and trekking",emoji:"ð¥¾"},{value:"water",label:"Water sports â surf, dive, snorkel",emoji:"ð"},{value:"climb",label:"Climbing and heights",emoji:"ð§"},{value:"wildlife",label:"Wildlife encounters",emoji:"ð¦"},{value:"extreme",label:"Paragliding, skydiving, bungeeâ¦",emoji:"ðª"},{value:"motorbike",label:"Motorcycles and road trips",emoji:"ðï¸"}]},adrenaline_intensity:{id:"adrenaline_intensity",question:"How intense?",kind:"single_select",options:[{value:"bucket",label:"Bucket-list â I
1want to be scared",emoji:"â¡"},{value:"challenging",label:"Challenging but not reckless",emoji:"ðª"},{value:"active_safe",label:"Active and physical but safe",emoji:"ð¿"},{value:"mild",label:"Mild â I want to say I did it",emoji:"â¨"}]},culture_pull:{id:"culture_pull",question:"What pulls you in?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:6,options:[{value:"ancient",label:"Ancient civilizations and ruins",emoji:"ðº"},{value:"spiritual",label:"Religious sites and spiritual places",emoji:"ð"},{value:"art_museums",label:"Art and museums",emoji:"ð¼ï¸"},{value:"architecture",label:"Architecture you can't see elsewhere",emoji:"ðï¸"},{value:"living_culture",label:"Living culture â festivals, music, dance",emoji:"ð"},{value:"dark_history",label:"Dark history and untold stories",emoji:"ð"}]},culture_experience:{id:"culture_experience",question:"How do you like to experience it?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:4,options:[{value:"guided",label:"Guided tours with an expert",emoji:"ð§"},{value:"wander",label:"Wandering and discovering on my own",emoji:"ð¶"},{value:"immersion",label:"Full immersion â homestays and local life",emoji:"ð¡"},{value:"read_first",label:"Reading everything before I go",emoji:"ð"}]},celebrate_occasion:{id:"celebrate_occasion",question:"What's the occasion?",kind:"single_select",options:[{value:"honeymoon",label:"Honeymoon or anniversary",emoji:"ð"},{value:"birthday",label:"Birthday",emoji:"ð"},{value:"engagement",label:"Engagement trip",emoji:"ð"},{value:"milestone",label:"Graduation or career milestone",emoji:"ð"},{value:"no_reason",label:"We just need this â no reason needed",emoji:"â¨"}]},celebrate_vibe:{id:"celebrate_vibe",question:"What vibe fits the celebration?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:1,maxSelect:5,options:[{value:"romantic",label:"Romantic and intimate",emoji:"ð¯ï¸"},{value:"luxury",label:"Luxurious and indulgent",emoji:"ð¥"},{value:"adventurous",label:"Adventurous and unforgettable",emoji:"ð"},{value:"relaxed",label:"Relaxed and off-grid",emoji:"ð"},{value:"party",label:"Party and nightlife",emoji:"ð"}]},shared_destination_kind:{id:"shared_destination_kind",question:"What kind of destination?",kind:"single_select",options:[{value:"greatest_hits",label:"The Greatest Hits â iconic bucket-list classics",emoji:"â"},{value:"hidden_gems",label:"Hidden Gems â places most travelers haven't heard of",emoji:"â¨"},{value:"surprise_me",label:"Surprise Me â let the Genie decide the mix",emoji:"ðª"}]},shared_setting:{id:"shared_setting",question:"Pick your dream setting",subtitle:"Choose 2â3. Just the vibe at a glance.",kind:"visual_picker",minSelect:2,maxSelect:3,options:[{value:"setting_ancient",emoji:"ðï¸",label:"Ancient & historic"},{value:"setting_coast",emoji:"ð",label:"Coast & islands"},{value:"setting_mountains",emoji:"ðï¸",label:"Mountains & valleys"},{value:"setting_cities",emoji:"ðï¸",label:"Vibrant cities"},{value:"setting_nature",emoji:"ð¿",label:"Nature & wilderness"},{value:"setting_desert",emoji:"ðï¸",label:"Desert & remote"}]},shared_scenes:{id:"shared_scenes",question:"What scenes excite you?",subtitle:"Select all that apply.",kind:"visual_picker",minSelect:1,maxSelect:8,options:[]},shared_when:{id:"shared_when",question:"When are you thinking?",subtitle:"Select every month you're considering.",kind:"multi_select",minSelect:1,maxSelect:12,options:[{value:"0",label:"Jan",emoji:"âï¸"},{value:"1",label:"Feb",emoji:"ð"},{value:"2",label:"Mar",emoji:"ð·"},{value:"3",label:"Apr",emoji:"ð¸"},{value:"4",label:"May",emoji:"ð¿"},{value:"5",label:"Jun",emoji:"âï¸"},{value:"6",label:"Jul",emoji:"ð"},{value:"7",label:"Aug",emoji:"ðï¸"},{value:"8",label:"Sep",emoji:"ð"},{value:"9",label:"Oct",emoji:"ð"},{value:"10",label:"Nov",emoji:"ð"},{value:"11",label:"Dec",emoji:"ð"}]},shared_duration:{id:"shared_duration",question:"How long do you have?",kind:"single_select",options:[{value:"weekend",label:"Weekend getaway",emoji:"ð"},{value:"five_seven",label:"5â7 days",emoji:"ð
"},{value:"eight_fourteen",label:"8â14 days",emoji:"ð§³"},{value:"two_plus",label:"2+ weeks",emoji:"ð"},{value:"flexible",label:"I'm flexible",emoji:"â¨"}]},shared_companion:{id:"shared_companion",question:"Who's coming?",kind:"single_select",options:[{value:"solo",label:"Solo",emoji:"ð§"},{value:"partner",label:"Partner",emoji:"ð"},{value:"friends",label:"Friends",emoji:"ð¯"},{value:"family_kids",label:"Family (kids)",emoji:"ð¨âð©âð§"},{value:"family_no_kids",label:"Family (no kids)",emoji:"ð«"}]},shared_budget:{id:"shared_budget",question:"What's your budget comfort zone?",kind:"single_select",options:[{value:"luxury_300plus",label:"I don't want to think about money â about $500+/day",emoji:"ð"},{value:"comfortable_150_300",label:"Comfortable â about $150â300/day",emoji:"ð¨"},{value:"smart_80_150",label:"Smart spending â about $80â150/day",emoji:"âï¸"},{value:"affordable_under_80",label:"As affordable as possible â under about $80/day",emoji:"ðï¸"}]},shared_avoid:{id:"shared_avoid",question:"Anything you want to avoid?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:0,maxSelect:8,options:[{value:"long_flights",label:"Long flights over 10 hours",emoji:"âï¸"}
1,{value:"language_barriers",label:"Language barriers",emoji:"ð¬"},{value:"extreme_heat",label:"Extreme heat",emoji:"ð¡ï¸"},{value:"extreme_cold",label:"Extreme cold",emoji:"ð¥¶"},{value:"crowds",label:"Crowds and overtourism",emoji:"ð¥"},{value:"expensive",label:"Very expensive destinations",emoji:"ð¸"},{value:"visa_hassle",label:"Visa complications",emoji:"ð"},{value:"instability",label:"Political instability",emoji:"â ï¸"}]},shared_soft:{id:"shared_soft",question:"Any of these make or break it?",subtitle:"Select all that apply.",kind:"multi_select",minSelect:0,maxSelect:8,options:[{value:"near_water",label:"Near ocean or water",emoji:"ð"},{value:"reliable_wifi",label:"Reliable Wi-Fi",emoji:"ð¶"},{value:"walkable_no_car",label:"Walkable without a car",emoji:"ð¶"},{value:"direct_flights_home",label:"Direct flights from home",emoji:"ð«"},{value:"english_spoken",label:"English widely spoken",emoji:"ð£ï¸"},{value:"safe_solo_night",label:"Safe at night",emoji:"ð"},{value:"lgbtq_friendly",label:"LGBTQ+ friendly",emoji:"ð³ï¸âð"},{value:"photography",label:"Great for photography",emoji:"ð·"}]},shared_notes:{id:"shared_notes",question:"Anything else the Genie should know?",subtitle:"Optional â the more you share, the better your wishes.",kind:"terminal",placeholder:"Celebrating an anniversary, need wheelchair accessibility, allergic to seafood, obsessed with coffee culture, want to practice my Spanishâ¦"}},m=(0,s.forwardRef)(function({onComplete:e,onBack:a,onProgressPct:n},i){let[o,m]=(0,s.useState)("root"),[p,g]=(0,s.useState)([]),[f,b]=(0,s.useState)([]),[w,v]=(0,s.useState)([]),[y,_]=(0,s.useState)(""),[j,x]=(0,s.useState)(()=>new Date().getFullYear()),k=(0,s.useMemo)(()=>{let e=h[o];if(!e)return;if("shared_scenes"!==o)return e;let l=Object.fromEntries(p.map(e=>[e.nodeId,e])),a=function(e){let l=e.filter(e=>e in d);if(0===l.length)return[];let a=u(l.flatMap(e=>d[e]??[]));return a.length<=8?a:u(l.map(e=>(d[e]??[]).slice(0,3)).flat()).slice(0,8)}((l.shared_setting?.values??[]).slice(0,3));return{...e,options:a,maxSelect:Math.min(8,Math.max(1,a.length))}},[o,p]),S=Math.min(97,(p.length+1)/16*100);(0,s.useEffect)(()=>{n?.(S)},[S,n]);let N=(0,s.useCallback)((e,l)=>{let a=e.options??[];return l.map(e=>a.find(l=>l.value===e)?.label??e)},[]),C=(0,s.useCallback)((e,l)=>{let a=e.minSelect??1,t=e.maxSelect??99;"single_select"===e.kind?v([l]):v(n=>{let i=n.includes(l),s=i?n.filter(e=>e!==l):[...n,l];return("root"===o&&b(e=>i?e.filter(e=>e!==l):e.includes(l)?e:[...e,l]),!i&&s.length>t||("multi_select"===e.kind||"visual_picker"===e.kind)&&i&&s.length<a)?n:s})},[o]),I=(0,s.useCallback)(()=>{if(!p.length)return void a();let e=p[p.length-1];g(e=>e.slice(0,-1)),m(e.nodeId),v(e.values),"root"===e.nodeId&&b(e.values),"shared_notes"===e.nodeId&&_(e.labels[0]??"")},[p,a]);(0,s.useImperativeHandle)(i,()=>({back:I}),[I]);let $=(0,s.useCallback)(()=>{if(!k)return;if("terminal"===k.kind){var l;let a,t,n,i,s,o,r,c,d,u,h,m,g,f,b,w,v,_,x;e((n=(t=(a=Object.fromEntries(p.map(e=>[e.nodeId,e]))).root)?function(e){let l={recharge:"recharge",explore_new:"explore",food_drink:"eat_drink",adrenaline:"adventure",history_culture:"culture",celebrate:"celebrate"},a=[];for(let t of e){let e=l[t];e&&!a.includes(e)&&a.push(e)}return a.length?a:["explore"]}(t.values):["explore"],i="greatest_hits"===(l=a.shared_destination_kind?.values[0]??"surprise_me")||"hidden_gems"===l||"surprise_me"===l?l:"surprise_me",s=a.shared_setting?.values??[],o=a.shared_scenes?.values??[],r=a.shared_when?.values?.length&&a.shared_when.values.every(e=>/^\d+$/.test(e))?{kind:"months",year:j,months:a.shared_when.values.map(e=>Number(e))}:{kind:"months",year:j,months:[new Date().getMonth()]},d=(c=a.shared_duration?.values[0])?"weekend"===c?"weekend":"five_seven"===c?"1week":"eight_fourteen"===c?"2weeks":"open":"1week",h=(u=a.shared_companion?.values[0])?"solo"===u?"solo":"partner"===u?"partner":"friends"===u?"friends":"family_no_kids"===u?"family_no_kids":"family_kids":"partner",g=(m=a.shared_budget?.values[0])?function(e){if("luxury_300plus"===e||"comfortable_150_300"===e||"smart_80_150"===e||"affordable_under_80"===e)return e}(m):void 0,f=a.shared_avoid?.values??[],b=(a.shared_soft?.values??[]).filter(e=>["near_water","reliable_wifi","walkable_no_car","direct_flights_home","english_spoken","safe_solo_night","lgbtq_friendly","photography"].includes(e)),w=p.map(e=>`${e.question} â ${e.labels.join("; ")}`),v=`Branching wish path: 2${w.join("\n")}`+(y.trim()?` 3 4Personal notes: ${y.trim()}`:""),_=[],(s.includes("setting_ancient")||o.some(e=>e.startsWith("scene_underground")||e.startsWith("scene_cobblestone")||e.startsWith("scene_ruins")||e.startsWith("scene_monasteries")))&&_.push("walkable_history"),(s.includes("setting_cities")||o.some(e=>["scene_markets"].includes(e)))&&_.push("food_scene"),(s.some(e=>["setting_coast","setting_mountains","setting_nature","setting_desert"].includes(e))||o.some(e=>
4["scene_secret_coves","scene_clifftop","scene_island_hop","scene_alpine","scene_ridge_trails","scene_hot_springs","scene_waterfalls","scene_forest_silence","scene_wildlife","scene_road_trips","scene_stargazing","scene_canyons","scene_oasis"].includes(e)))&&_.push("natural_scenery"),s.includes("setting_cities")&&o.includes("scene_design")&&_.push("architecture_design"),o.includes("scene_rooftops")&&_.push("nightlife_social"),(o.includes("scene_nomadic")||o.includes("scene_stargazing")||o.includes("scene_forest_silence"))&&_.push("off_grid_untouched"),o.includes("scene_traditions")&&_.push("arts_music"),0===_.length&&_.push("natural_scenery","food_scene","welcoming_locals"),{moods:n,discoveryStyle:i,when:r,duration:d,comforts:["comfortable","boutique"],dreamDayRhythms:["wander_no_plan"],vibes:Array.from(new Set([...s,...o])).slice(0,16),destinationValues:_.slice(0,3),dealbreakers:f,softPreferences:b,companion:h,budgetComfortZone:g,genieNotes:y.trim()||void 0,followUpSummary:v}),(x=p.map(e=>{let l=e.question.trim(),a=e.labels.join("; ");return`Q: ${l} 5A: ${a}`}),y?.trim()&&x.push(`Q: Anything else? 6A: ${y.trim()}`),x.join("\n\n")));return}let a=k.minSelect??1,t=k.maxSelect??99;if(w.length<a||w.length>t)return;let n=[...p,{nodeId:k.id,question:k.question,labels:N(k,w),values:[...w]}],i="root"===o?f[0]??w[0]??null:null,s=function(e,l){if("root"===e){let e=l?.trim();return e?r[e]??null:null}return c[e]??null}(o,i);s&&(g(n),m(s),v([]))},[k,w,p,o,f,y,j,N,e]),D=(0,s.useMemo)(()=>{if(!k)return!1;if("terminal"===k.kind)return!0;let e=k.minSelect??1,l=k.maxSelect??99;return w.length>=e&&w.length<=l},[k,w]);return k?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"plan-flow-step",children:["shared_when"===o?(0,l.jsx)("div",{className:"plan-flow-year plan-flow-year--inline",children:(0,l.jsxs)("label",{children:["Year"," ",(0,l.jsx)("select",{className:"f-input plan-flow-select",value:j,onChange:e=>x(Number(e.target.value)),children:[0,1,2].map(e=>{let a=new Date().getFullYear()+e;return(0,l.jsx)("option",{value:a,children:a},a)})})]})}):null,(0,l.jsx)("h2",{className:"plan-flow-q",children:k.question}),k.subtitle?(0,l.jsx)("p",{className:"plan-flow-hint plan-flow-hint--multi",children:k.subtitle}):null,"terminal"===k.kind?(0,l.jsx)("label",{className:"plan-flow-free-label",children:(0,l.jsx)("textarea",{className:"f-input plan-flow-textarea",rows:4,"aria-label":"Anything the Genie should know",placeholder:k.placeholder??"",value:y,onChange:e=>_(e.target.value)})}):null,"single_select"===k.kind||"multi_select"===k.kind?(0,l.jsx)("div",{className:"plan-flow-grid "+("multi_select"===k.kind?"plan-flow-grid--mood":"plan-flow-grid--style"),children:(k.options??[]).map(e=>(0,l.jsxs)("button",{type:"button","aria-pressed":w.includes(e.value),className:"plan-flow-opt"+(w.includes(e.value)?" is-on":""),onClick:()=>C(k,e.value),children:[e.emoji?(0,l.jsx)("span",{className:"plan-flow-opt-ico","aria-hidden":!0,children:e.emoji}):null,(0,l.jsx)("span",{className:"plan-flow-opt-title",children:e.label})]},e.value))}):null,"visual_picker"===k.kind?(0,l.jsx)("div",{className:"plan-flow-grid "+("shared_setting"===o?"plan-flow-grid--setting":"plan-flow-grid--scene"),children:(k.options??[]).map(e=>(0,l.jsx)("button",{type:"button","aria-pressed":w.includes(e.value),className:("shared_setting"===o?"plan-flow-setting":"plan-flow-scene")+(w.includes(e.value)?" is-on":""),onClick:()=>C(k,e.value),children:"shared_setting"===o?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"plan-flow-setting-emoji",children:(0,l.jsx)(t.Icon,{name:(0,t.emojiIconName)(e.emoji),tone:"gold",size:18})}),(0,l.jsx)("span",{className:"plan-flow-setting-label",children:e.label})]}):(0,l.jsx)("span",{className:"plan-flow-scene-label",children:e.label})},e.value))}):null]}),(0,l.jsx)("div",{className:"plan-flow-footer",children:(0,l.jsx)("button",{type:"button",className:"btn-generate plan-flow-next",disabled:!D,onClick:$,children:"terminal"===k.kind?"Reveal my wishes":"Continue"})})]}):(0,l.jsxs)("div",{className:"plan-flow-error",role:"alert",children:["Missing question."," ",(0,l.jsx)("button",{type:"button",className:"plan-flow-back",onClick:a,children:"Go back"})]})});function p({dest:e,wishIndex:a,discoveryStyle:t,onPeek:n,onGrant:i}){let s=e.gems.slice(0,3);return(0,l.jsxs)("article",{className:"plan-flow-dest-card plan-flow-dest-card--summary "+(1===a?"wish-grad--teal":2===a?"wish-grad--gold":"wish-grad--cream"),children:[(0,l.jsx)("div",{className:"wish-grad-top",children:(0,l.jsxs)("span",{className:"plan-flow-wish-pill",children:["Wish ",a]})}),(0,l.jsxs)("div",{className:"plan-flow-card-body plan-flow-card-body--summary",children:[(0,l.jsxs)("div",{className:"plan-flow-card-title-row",children:[(0,l.jsxs)("h3",{children:[e.city,(0,l.jsxs)("span",{className:"plan-flow-dest-cc",children:[e.country,e.regi
6on?` \xb7 ${e.region}`:""]})]}),(0,l.jsx)("span",{className:"plan-flow-style-badge",children:"hidden_gems"===t?"Hidden Gem":"greatest_hits"===t?"Classic":"Mix"})]}),(0,l.jsx)("p",{className:"plan-flow-hook",children:e.hook}),s.length?(0,l.jsx)("div",{className:"plan-flow-gems",children:s.map(e=>{var a;return(0,l.jsxs)("a",{className:"plan-flow-gem-pill plan-flow-gem-pill--link",href:(a=e.mapsQuery,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a)}`),target:"_blank",rel:"noreferrer",title:`Open in Google Maps: ${e.mapsQuery}`,children:[e.emoji," ",e.label," ",(0,l.jsx)("span",{"aria-hidden":!0,children:"â"})]},`${e.emoji}-${e.label}`)})}):null,(0,l.jsxs)("div",{className:"plan-flow-card-actions",children:[(0,l.jsx)("button",{type:"button",className:"btn-sm plan-flow-peek-btn",onClick:n,children:"Peek Inside"}),(0,l.jsx)("button",{type:"button",className:"btn-generate plan-flow-plan-btn plan-flow-plan-btn--primary",onClick:i,children:"Grant This Wish â"})]})]})]})}var g=e.i(174080);function f({open:e,dest:a,discoveryStyle:n,onClose:i,onGrant:o}){let r=(0,s.useMemo)(()=>"hidden_gems"===n?"Hidden Gem":"greatest_hits"===n?"Classic":"Mix",[n]),c=(0,s.useRef)(null);if((0,s.useEffect)(()=>{if(!e)return;let l=e=>{"Escape"===e.key&&i()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,i]),(0,s.useEffect)(()=>{if(!e)return;let l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=l}},[e]),(0,s.useEffect)(()=>{if(!e)return;let l=c.current;l&&(l.scrollTop=0,requestAnimationFrame(()=>{c.current&&(c.current.scrollTop=0)}))},[e,a?.city]),!e||!a)return null;let d=a.discoveryNote?.trim(),u=(0,l.jsx)("div",{className:"wish-sheet-backdrop",role:"dialog","aria-modal":"true","aria-label":`Wish details for ${a.city}`,onClick:e=>{e.target===e.currentTarget&&i()},children:(0,l.jsxs)("div",{className:"wish-sheet",children:[(0,l.jsxs)("div",{className:"wish-sheet-header",children:[(0,l.jsx)("div",{className:"wish-sheet-handle","aria-hidden":!0}),(0,l.jsx)("button",{type:"button",className:"wish-sheet-x",onClick:i,"aria-label":"Close",children:"Ã"})]}),(0,l.jsxs)("div",{ref:c,className:"wish-sheet-body",children:[(0,l.jsxs)("div",{className:"wish-sheet-title-row",children:[(0,l.jsxs)("h2",{className:"wish-sheet-h2",children:[a.city," ",(0,l.jsx)("span",{className:"wish-sheet-badge",children:r})]}),(0,l.jsxs)("p",{className:"wish-sheet-cc",children:[a.country,a.region?` \xb7 ${a.region}`:""]})]}),(0,l.jsx)("p",{className:"wish-sheet-hook",children:a.hook}),(0,l.jsx)("p",{className:"wish-sheet-vibe",children:a.vibe}),(0,l.jsxs)("div",{className:"wish-sheet-section",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.Icon,{name:"hidden-gems",tone:"gold"})," What makes it special"]}),(0,l.jsx)("div",{className:"wish-sheet-gems",children:a.gems.map(e=>{var a;return(0,l.jsxs)("a",{className:"wish-sheet-gem",href:(a=e.mapsQuery,`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(a)}`),target:"_blank",rel:"noreferrer",title:`Open in Google Maps: ${e.mapsQuery}`,children:[e.emoji," ",e.label," ",(0,l.jsx)("span",{"aria-hidden":!0,children:"â"})]},`${e.emoji}-${e.label}`)})})]}),(0,l.jsxs)("div",{className:"wish-sheet-section",children:[(0,l.jsx)("h3",{children:"Why the Genie picked this for you"}),(0,l.jsx)("ul",{className:"wish-sheet-reasons",children:a.reasons.map(e=>(0,l.jsx)("li",{children:e},e))})]}),(0,l.jsxs)("div",{className:"wish-sheet-meta",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"wish-sheet-meta-label",children:"Best months"}),(0,l.jsx)("span",{className:"wish-sheet-meta-value",children:a.bestMonths})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"wish-sheet-meta-label",children:"Daily budget"}),(0,l.jsx)("span",{className:"wish-sheet-meta-value",children:a.dailyBudget})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"wish-sheet-meta-label",children:"Weather"}),(0,l.jsx)("span",{className:"wish-sheet-meta-value",children:a.weatherNote})]})]}),d?(0,l.jsx)("p",{className:"wish-sheet-discovery",children:(0,l.jsx)("em",{children:d})}):null]}),(0,l.jsxs)("div",{className:"wish-sheet-footer",role:"group","aria-label":"Wish actions",children:[(0,l.jsx)("button",{type:"button",className:"btn-generate wish-sheet-grant",onClick:o,children:"Grant This Wish â"}),(0,l.jsx)("button",{type:"button",className:"wish-sheet-close",onClick:i,children:"Close"})]})]})});return(0,g.createPortal)(u,document.body)}var b=e.i(286623),w=e.i(768684),v=e.i(184260);let y="The Genie couldn't finish that wish. Try again in a moment.";async function _(e,l){var a;let t,n,i,s,o=await fetch("/api/discovery/recommend",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({answers:e,alternateBatch:l?.alternateBatch,excludeCities:l?.excludeCities,excludeCountries:l?.excludeCountries,previousWishesSummary:l?.previousWishesSummary,wishAnswerPathText:l?.wishAnswerPathText})}),r=await o.text();try{t=JSON.parse(r)}catch{throw console.error("[wishes] unparseable response",o.status,r.slice(0,200)),Error(y)}if(!o.ok){let e=t.error;throw Error("string"==typeof e&&e?e:y)}let c=(n=String((a=t).travelerType??a.traveler_type??"").trim(),i=String(a.tagline??"").trim(),{travelerType:n,tagline:i,wishes:(Array.isArray(s=a.wishes??a.destinations)?s:[]).map(e=>(function(e){let l=e.reasons,a=Array.isArray(l)?l.map(e=>
6String(e)).filter(Boolean):[],t=e.gems,n=Array.isArray(t)?t.map(e=>"object"==typeof e&&null!==e?e:null).filter(e=>!!e).map(e=>({emoji:String(e.emoji??"").trim(),label:String(e.label??"").trim(),mapsQuery:String(e.mapsQuery??e.maps_query??"").trim()})).filter(e=>e.emoji&&e.label&&e.mapsQuery):[],i=String(e.vibe??"").trim();if(!i)throw Error(y);let s=a.slice(0,3);if(3!==s.length)throw Error(y);let o=n.slice(0,5);if(5!==o.length)throw Error(y);return{city:String(e.city??"").trim(),country:String(e.country??"").trim(),region:String(e.region??"").trim(),hook:String(e.hook??"").trim(),vibe:i,gems:o,reasons:s,bestMonths:String(e.bestMonths??"").trim(),dailyBudget:String(e.dailyBudget??"").trim(),safetyNote:String(e.safetyNote??e.safety_note??"").trim(),weatherNote:String(e.weatherNote??e.weather_note??"").trim(),discoveryNote:String(e.discoveryNote??e.discovery_note??"").trim()||void 0}})("object"==typeof e&&null!==e?e:{}))});if(!c.wishes||3!==c.wishes.length)throw Error(y);return c}var j=e.i(907851);let x=["eat_drink","adventure","culture","celebrate","recharge","explore"];function k(e){return String(e).padStart(2,"0")}function S(e){return`${e.getFullYear()}-${k(e.getMonth()+1)}-${k(e.getDate())}`}function N(e){let l=function(e){if(!e.length)return"explore";for(let l of x)if(e.includes(l))return l;return e[0]}(e.moods),a=[];if("eat_drink"===l&&e.followUpFood?.length){let l={fine:"Prefers fine dining and chef-led tables",markets:"Loves street food, markets, and holes-in-the-wall",mix:"Wants a mix of casual and special meals",wine_focus:"Wine, pairings, and terroir matter",local_classics:"Wants authentic local signature dishes"};for(let t of e.followUpFood)a.push(l[t]||t)}else if("adventure"===l&&e.followUpAdventure?.length){let l={easy:"Light activity â walks, easy day trips",moderate:"Happy with full days and some challenging hikes",push_limits:"Wants high-intensity activities and big days"};for(let t of e.followUpAdventure)a.push(l[t]||t)}else if("culture"===l&&e.followUpCulture?.length){let l={museums:"Museums & curated exhibits first",living_traditions:"Living culture â neighborhoods, rituals, locals",architecture:"Architecture & design-forward spaces",performing_arts:"Theatre, music, and nightlife culture"};for(let t of e.followUpCulture)a.push(l[t]||t)}else if("recharge"===l&&e.followUpRecharge?.length){let l={beach:"Recharge setting: ocean & beach",mountains:"Recharge setting: mountains & crisp air",countryside:"Recharge setting: countryside & slow villages",spa:"Recharge setting: spa/wellness-led retreat"};for(let t of e.followUpRecharge)a.push(l[t]||t)}else if("explore"===l&&e.followUpExplore?.length){let l={hidden_cities:"Exploration style: walkable cities & hidden corners",nature:"Exploration style: nature-forward regions",coast:"Exploration style: coastal towns & drives",road_trip:"Exploration style: multi-stop road-trip energy"};for(let t of e.followUpExplore)a.push(l[t]||t)}return a.join(" ")}function C(e,l,a){var t,n;let i,s,o=[function(e,l){let{startISO:a,endISO:t,nights:n}=function(e){let l=new Date,a=l.getFullYear(),t=l.getMonth();if("months"===e.when.kind){let l=e.when.months;a=e.when.year,t=l.length>0?Math.min(...l):new Date().getMonth()}else{let l={winter:0,spring:3,summer:6,fall:9};a=e.when.year;let n=e.when.seasons.map(e=>l[e]);t=n.length>0?Math.min(...n):new Date().getMonth()}let n=7;n="weekend"===e.duration?3:"1week"===e.duration?7:"2weeks"===e.duration?14:10;let i=new Date(a,t,15),s=new Date(i);s.setDate(s.getDate()+n-1);let o=Math.max(1,n-1);return{startISO:S(i),endISO:S(s),nights:o}}(l),i=(0,j.citySearch)(e.city),s=i.find(l=>l.c.toLowerCase()===e.country.toLowerCase())||i.find(l=>e.country.toLowerCase().includes(l.c.toLowerCase()))||i[0],o=s?.f||"âï¸",r=s?.c||e.country;return{name:e.city,flag:o,country:r,startDate:a,endDate:t,nights:n}}(e,l)],r="solo"===(t=l.companion)?"solo":"partner"===t?"couple":"friends"===t?"friends":"family",c=0===(i=[...new Set(l.comforts)]).length?"midrange":i.length>1?"mixed":"luxury"===(n=i[0])?"luxury":"boutique"===n?"boutique":"budget"===n?"budget":"midrange",d=l.vibes.join(", "),u=l.dealbreakers.length?l.dealbreakers.join(", "):"none noted",h=l.followUpSummary?.trim()||N(l),m=l.moods.length>0?l.moods.join(", "):"not set",p=l.comforts.length>0?l.comforts.join(", "):"not set",g=l.dreamDayRhythms?.length?l.dreamDayRhythms.join(", "):"not set",f=l.destinationValues?.length?l.destinationValues.join(", "):"not set",b=l.softPreferences?.length?l.softPreferences.join(", "):"none",w=l.budgetComfortZone??"not set",v=l.genieNotes?.trim()?l.genieNotes.trim():"",y=`Discovery profile: moods [${m}]; style [${l.discoveryStyle}];
6 comfort [${p}]; dream day [${g}]; vibes: ${d}; destination values [${f}]; avoid: ${u}; soft prefs [${b}]; budget zone: ${w}.`+(h?` Follow-up: ${h}`:"")+(v?` Personal notes: ${v}`:""),_=(s=e.dailyBudget.replace(/per night/gi,"").trim().match(/\$?\s*(\d+)\s*[-ââ]\s*\$?\s*(\d+)/))?{min:s[1],max:s[2]}:null,x=l.budgetComfortZone?function(e){switch(e){case"luxury_300plus":return{min:"500",max:"850"};case"comfortable_150_300":return{min:"150",max:"300"};case"smart_80_150":return{min:"80",max:"150"};case"affordable_under_80":return{min:"35",max:"80"}}}(l.budgetComfortZone):null;return{token:a,cities:o,who:r,accomStyle:c,foodVibes:function(e){if(!e.moods.includes("eat_drink")||!e.followUpFood?.length)return[];let l={fine:"ð½ï¸ Fine Dining",markets:"ð® Street Food & Markets",mix:"ð Local Classics",wine_focus:"ð· Wine & Cheese",local_classics:"ð Local Classics"},a=[];for(let t of e.followUpFood){let e=l[t];e&&!a.includes(e)&&a.push(e)}return a}(l),interests:function(e){let l=[],a=e=>{e&&!l.includes(e)&&l.push(e)};if(e.moods.includes("culture")&&e.followUpCulture?.length){let l={museums:"ð¨ Art & Museums",living_traditions:"ðï¸ History & Culture",architecture:"ð Architecture",performing_arts:"ð Nightlife & Music"};for(let t of e.followUpCulture){let e=l[t];e&&a(e)}}if(e.moods.includes("recharge")&&e.followUpRecharge?.length){let l={beach:"ðï¸ Beach & Water",mountains:"ðï¸ Hiking & Adventure",countryside:"ð¿ Nature & Parks",spa:"ð§ Wellness & Spas"};for(let t of e.followUpRecharge){let e=l[t];e&&a(e)}}if(e.moods.includes("explore")&&e.followUpExplore?.length){let l={hidden_cities:"⨠Iconic Landmarks & Viewpoints",nature:"ð¿ Nature & Parks",coast:"ðï¸ Beach & Water",road_trip:"ð¸ Photography"};for(let t of e.followUpExplore){let e=l[t];e&&a(e)}}return l}(l),budgetMin:_?.min??x?.min,budgetMax:_?.max??x?.max,extraNotes:y}}function I(e){if(!e.startDate)return{kind:"undated"};let[l,a,t]=e.startDate.split("-").map(e=>parseInt(e,10));if(!l||!a||!t)return{kind:"undated"};let n=new Date(l,a-1,t),i=new Date,s=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()),o=Math.round((s(n).getTime()-s(i).getTime())/864e5),r=Math.max(e.numDays||1,1);if(o>0)return{kind:"soon",daysUntil:o};let c=1-o;return c<=r?{kind:"live",dayNum:c}:{kind:"past"}}function $(){let e;return{moods:[],discoveryStyle:"surprise_me",when:{kind:"months",year:(e=new Date).getFullYear(),months:[e.getMonth()]},duration:"1week",comforts:[],dreamDayRhythms:[],vibes:[],destinationValues:[],dealbreakers:[],softPreferences:[],companion:"partner"}}e.s(["PlanFlow",0,function({startWithWishes:e=!1}){let r,c,d,u=(0,o.useRouter)(),[h,g]=(0,s.useState)([]),y=(0,o.usePathname)(),j=(0,o.useSearchParams)(),{userId:x}=(0,i.useAuth)();(0,s.useEffect)(()=>{if(!x)return void g([]);let e=!1;return(async()=>{try{let l=await fetch("/api/me/trips",{credentials:"include"});if(!l.ok)return;let a=await l.json().catch(()=>({}));!e&&Array.isArray(a.trips)&&g(a.trips.slice(0,7))}catch{}})(),()=>{e=!0}},[x]);let[k,S]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(!x)return;let e=!1;return(async()=>{try{let l=await fetch("/api/preview/claim",{credentials:"include"});if(!l.ok)return;let a=await l.json().catch(()=>({}));!e&&a.pending?.preview&&S(a.pending)}catch{}})(),()=>{e=!0}},[x]);let D=(0,s.useCallback)(async()=>{if(!k?.preview)return;S(null);try{await fetch("/api/preview/claim",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:k.id})})}catch{}let e=new Date(k.preview.suggestedStartDate?`${k.preview.suggestedStartDate}T12:00:00`:Date.now()+2592e6),l=Math.max(k.preview.suggestedDays-1,1),a=new Date(e.getTime()+864e5*l),t=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`;ea({token:++ee.current,cities:[{name:k.preview.city,country:k.preview.country||"",flag:"",startDate:t(e),endDate:t(a),nights:l}],who:"couple",accomStyle:"boutique",extraNotes:k.dream||""}),F(!1),U("planner")},[k]),W=(0,s.useMemo)(()=>{let e=j.toString(),l=y||"/plan";return e?`${l}?${e}`:l}
6,[y,j]),T=(0,v.useTripStore)(e=>e.trip),M=(0,v.useTripStore)(e=>e.id),A=(0,v.useTripStore)(e=>e.source),[q,U]=(0,s.useState)(null),[P,R]=(0,s.useState)(!1),[E,F]=(0,s.useState)(!1),[G,L]=(0,s.useState)(()=>$()),[B,O]=(0,s.useState)(""),[H,z]=(0,s.useState)(14),Y=(0,s.useRef)(null),[J,Q]=(0,s.useState)(null),[V,Z]=(0,s.useState)([]),[K,X]=(0,s.useState)(null),ee=(0,s.useRef)(0),[el,ea]=(0,s.useState)(null),[et,en]=(0,s.useState)(null),[ei,es]=(0,s.useState)(!1),[eo,er]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(null),eu=(0,s.useRef)(0),eh=(0,s.useCallback)(()=>{eu.current++,L($()),O(""),z(14),X(null),Q(null),Z([]),er(!1),ed(null)},[]),em=(0,s.useCallback)(async()=>{if(!x)return void en(null);try{let e=await fetch("/api/wishes/check",{credentials:"include"});if(!e.ok)return void en(null);let l=await e.json();en({allowed:l.allowed,remaining:l.remaining,unlimited:null===l.remaining&&l.allowed})}catch{en(null)}},[x]);(0,s.useEffect)(()=>{em()},[em]);let ep=(0,s.useRef)(!1);(0,s.useEffect)(()=>{if(x&&!ep.current)try{let e=localStorage.getItem("wg_discovery_handoff");if(!e)return;let l=JSON.parse(e);if(!l.answers||!l.dest)return;ep.current=!0,localStorage.removeItem("wg_discovery_handoff");let a=++ee.current;L(l.answers),ea(C(l.dest,l.answers,a)),U("planner")}catch{}},[x]);let eg=(0,s.useRef)(null);eg.current=q,(0,s.useEffect)(()=>{let l="1"===j.get("edit");if("1"===j.get("new")&&(T||M))return void v.useTripStore.getState().clear();if(T&&M&&"saved"===A&&!l)return void u.replace(`/trip?id=${encodeURIComponent(M)}`);if("planner"!==eg.current){if(e){eh(),U("wishes");return}(0,w.loadDraft)().then(e=>{let a=!!e?.meta?.cityObjs?.length;R(a),a&&(l||"1"===j.get("form"))?U("planner"):U("choose")})}},[T,M,A,u,e,eh,j]);let ef=(0,s.useCallback)(async(e,l)=>{let a={...e,followUpSummary:e.followUpSummary?.trim()||N(e)};if(L(a),O(l),X(null),!x)return void es(!0);try{let e=await fetch("/api/wishes/check",{credentials:"include"});if(!e.ok)return void X("Could not verify wish quota. Try again in a moment.");let l=await e.json();if(!l.allowed)return void X(l.reason??"The Genie needs to recharge this month. Purchase any trip to unlock unlimited wishes.")}catch{X("Couldn't reach the genie â check your connection and try again.");return}let t=++eu.current;U("revealLoading");try{let e=await _(a,{wishAnswerPathText:l||void 0});if(t!==eu.current)return;Q(e),Z(e.wishes),U("reveal"),await em()}catch(e){if(t!==eu.current)return;X(e instanceof Error?e.message:"Something went wrong."),U("wishes")}},[x,em]),eb=(0,s.useCallback)(()=>{"wishes"===q&&Y.current?Y.current.back():(eh(),U("choose"))},[q,eh]),ew=(0,s.useCallback)(async()=>{if(!x)return void es(!0);try{let e=await fetch("/api/wishes/check",{credentials:"include"});if(!e.ok)return void X("Could not verify wish quota. Try again in a moment.");let l=await e.json();if(!l.allowed){X(l.reason??"The Genie needs to recharge. Purchase any trip to unlock unlimited wishes."),await em();return}}catch{X("Couldn't reach the genie â check your connection and try again.");return}let e={...G,followUpSummary:G.followUpSummary??N(G)};L(e),X(null);let l=++eu.current;U("revealLoading");try{let a=await _(e,{alternateBatch:!0,excludeCities:V.map(e=>e.city),excludeCountries:[...new Set(V.map(e=>e.country.trim()))],previousWishesSummary:JSON.stringify(V.map(e=>({city:e.city,country:e.country,hook:e.hook})),null,2),wishAnswerPathText:B||void 0});if(l!==eu.current)return;Q(a),Z(a.wishes),U("reveal"),await em()}catch(e){if(l!==eu.current)return;X(e instanceof Error?e.message:"Could not load alternatives."),U("reveal")}},[G,V,x,em,B]),ev=(0,s.useCallback)(e=>{if(!x){try{let l={...G,followUpSummary:G.followUpSummary??N(G)};localStorage.setItem("wg_discovery_handoff",JSON.stringify({answers:l,dest:e,savedAt:Date.now()}))}catch{}es(!0);return}let l=++ee.current,a={...G,followUpSummary:G.followUpSummary??N(G)};L(a),ea(C(e,a,l)),U("planner")},[G,x]),ey=(0,s.useCallback)(()=>{ea(null)},[]);return"planner"===q?(0,l.jsx)("div",{className:"planner-form-column",children:(0,l.jsx)(b.PlannerForm,{discoveryPrefill:el,onDiscoveryPrefillConsumed:ey,autoOpenGenie:E})}
6):T&&M&&"saved"===A?null:null===q?(0,l.jsx)("div",{className:"plan-flow plan-flow--boot","aria-busy":"true",children:(0,l.jsx)("div",{className:"plan-flow-boot-inner",children:(0,l.jsx)("div",{className:"load-ring","aria-hidden":!0})})}):(0,l.jsxs)("div",{className:"plan-flow",children:["choose"===q?(0,l.jsxs)("div",{className:"plan-flow-panel plan-flow-panel--choose",children:[(0,l.jsx)("div",{className:"plan-flow-topline",children:(0,l.jsxs)("div",{className:"logo plan-flow-logo",children:["Wander",(0,l.jsx)("em",{children:"genie"}),".ai"]})}),(0,l.jsxs)("h1",{className:"plan-flow-hero",children:["Design your next journey,",(0,l.jsx)("br",{}),(0,l.jsx)("em",{className:"plan-flow-hero-accent",children:"granted by AI."})]}),(0,l.jsx)("p",{className:"plan-flow-hero-sub",children:"Pick cities, set dates, drop in your tickets â get a polished day-by-day itinerary with hotel picks, food tips, and hidden gems."}),(0,l.jsxs)("div",{className:"plan-flow-ctas",children:[(0,l.jsxs)("button",{type:"button",className:"plan-flow-cta-gold",onClick:()=>{F(!1),(0,w.clearDraft)().finally(()=>U("planner"))},children:[(0,l.jsx)(t.Icon,{name:"new-trip",tone:"navy"})," Start planning"]}),(0,l.jsxs)("button",{type:"button",className:"plan-flow-cta-line",onClick:()=>{F(!0),U("planner")},children:[(0,l.jsx)(t.Icon,{name:"mic",tone:"gold"})," Talk to the genie â plan by voice"]}),(0,l.jsxs)("button",{type:"button",className:"plan-flow-cta-line",onClick:()=>{eh(),U("wishes")},children:[(0,l.jsx)(t.Icon,{name:"wand",tone:"gold"})," Not sure where? Make three wishes"]})]}),k?.preview?(0,l.jsxs)("button",{type:"button",className:"plan-flow-pending",onClick:()=>void D(),children:[(0,l.jsxs)("span",{className:"plan-flow-pending-kicker",children:[(0,l.jsx)(t.Icon,{name:"genie",tone:"gold"})," Your trip is waiting"]}),(0,l.jsx)("span",{className:"plan-flow-pending-title",children:k.preview.tripTitle}),(0,l.jsxs)("span",{className:"plan-flow-pending-sub",children:["You started this before signing up â pick up right where you left off, no retyping. ",(0,l.jsx)("strong",{children:"Build it now â"})]})]}):null,P?(0,l.jsxs)("button",{type:"button",className:"plan-flow-resume",onClick:()=>{F(!1),U("planner")},children:[(0,l.jsx)(t.Icon,{name:"edit",tone:"gold"})," Resume the trip you were planning â"]}):null,h.length>0?(0,l.jsxs)(l.Fragment,{children:[(d="live"===(c=I(r=h[0])).kind?"Traveling now":"soon"===c.kind?"Your next trip":"Your latest trip",(0,l.jsxs)("button",{type:"button",className:`plan-flow-latest${"live"===c.kind?" is-live":""}`,onClick:()=>u.push(`/trip?id=${encodeURIComponent(r.id)}`),children:[(0,l.jsxs)("span",{className:"plan-flow-latest-kicker",children:["live"===c.kind?(0,l.jsx)("span",{className:"plan-flow-live-dot","aria-hidden":!0}):null,d]}),(0,l.jsx)("span",{className:"plan-flow-latest-title",children:r.title}),"live"===c.kind?(0,l.jsxs)("span",{className:"plan-flow-countdown is-live",children:[(0,l.jsx)(t.Icon,{name:"place",size:13})," Day ",c.dayNum," of ",r.numDays||c.dayNum]}):"soon"===c.kind?(0,l.jsx)("span",{className:"plan-flow-countdown",children:1===c.daysUntil?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.Icon,{name:"flight",size:13})," Tomorrow!"]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.Icon,{name:"flight",size:13})," In ",c.daysUntil," days"]})}):null,(0,l.jsxs)("span",{className:"plan-flow-latest-meta",children:[r.drLabel?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(t.Icon,{name:"days",size:13})," ",r.drLabel," ·"," "]}):null,(0,l.jsx)(t.Icon,{name:"sun",size:13})," ",(0,a.countLabel)(r.numDays||0,"day"),r.cities?.[0]?(0,l.jsxs)(l.Fragment,{children:[" ","· ",(0,l.jsx)(t.Icon,{name:"place",size:13})," ",r.cities[0]]}):null]})]})),h.length>1?(0,l.jsxs)("div",{className:"plan-flow-recent",children:[(0,l.jsx)("h2",{className:"plan-flow-recent-heading",children:"Your other trips"}),(0,l.jsx)("div",{className:"plan-flow-recent-row",children:h.slice(1).map(e=>{let n=I(e);return(0,l.jsxs)("button",{type:"button",className:"plan-flow-recent-card",onClick:()=>u.push(`/trip?id=${encodeURIComponent(e.id)}`),children:[(0,l.jsx)("span",{className:"plan-flow-recent-plane","aria-hidden":!0,
6children:(0,l.jsx)(t.Icon,{name:"past"===n.kind?"past-trip":"departure",tone:"gold",size:15})}),(0,l.jsx)("span",{className:"plan-flow-recent-name",children:e.title}),(0,l.jsx)("span",{className:"plan-flow-recent-days",children:"live"===n.kind?`Day ${n.dayNum} of ${e.numDays||n.dayNum}`:"soon"===n.kind?1===n.daysUntil?"Tomorrow":`In ${(0,a.countLabel)(n.daysUntil??0,"day")}`:(0,a.countLabel)(e.numDays||0,"day")})]},e.id)})})]}):null]}):null]}):null,"wishes"===q||"revealLoading"===q?(0,l.jsxs)("div",{className:"plan-flow-panel plan-flow-panel--wishes",children:[(0,l.jsx)("div",{className:"plan-flow-progress-track","aria-hidden":!0,children:(0,l.jsx)("div",{className:"plan-flow-progress-fill",style:{width:`${"revealLoading"===q?100:H}%`}})}),(0,l.jsx)("button",{type:"button",className:"plan-flow-back",onClick:eb,children:"â Back"}),x&&et&&!et.unlimited?(0,l.jsx)("p",{className:"plan-flow-wishes-remaining","aria-live":"polite",children:et.allowed&&"number"==typeof et.remaining&&et.remaining>0?`${et.remaining} ${1===et.remaining?"wish":"wishes"} remaining this month`:"The Genie needs to recharge â purchase any trip to unlock unlimited wishes."}):null,K?(0,l.jsx)("div",{className:"plan-flow-error",role:"alert",children:K}):null,"wishes"===q?(0,l.jsx)(m,{ref:Y,onProgressPct:z,onComplete:(e,l)=>{ef(e,l)},onBack:()=>{eh(),U("choose")}}):(0,l.jsxs)("div",{className:"plan-flow-reveal-loading plan-flow-reveal-loading--genie",role:"status",children:[(0,l.jsxs)("div",{className:"plan-flow-lamp-wrap","aria-hidden":!0,children:[(0,l.jsx)("span",{className:"plan-flow-lamp",children:(0,l.jsx)(t.Icon,{name:"genie",tone:"gold",size:26})}),(0,l.jsx)("span",{className:"plan-flow-lamp-glow"})]}),(0,l.jsx)("p",{className:"plan-flow-loading-title",children:"The Genie is reading your wishesâ¦"})]})]}):null,"reveal"===q&&J?(0,l.jsxs)("div",{className:"plan-flow-panel plan-flow-panel--reveal",children:[(0,l.jsx)("button",{type:"button",className:"plan-flow-back",onClick:()=>{U("wishes")},children:"â Refine your wishes"}),(0,l.jsx)("div",{className:"plan-flow-reveal-hero",children:(0,l.jsx)("h2",{className:"plan-flow-reveal-title",children:"The Genie has granted your Three Wishes"})}),(0,l.jsxs)("div",{className:"plan-flow-reveal-head",children:[(0,l.jsx)("p",{className:"plan-flow-badge",children:J.travelerType}),(0,l.jsx)("p",{className:"plan-flow-tagline",children:J.tagline})]}),(0,l.jsx)("div",{className:"plan-flow-dest-grid plan-flow-dest-grid--mag",children:V.map((e,a)=>(0,l.jsx)(p,{dest:e,wishIndex:a+1,discoveryStyle:G.discoveryStyle,onPeek:()=>{ed(e),er(!0)},onGrant:()=>ev(e)},`${e.city}-${e.country}-${a}`))}),x&&et&&!et.unlimited&&(!et.allowed||"number"==typeof et.remaining&&et.remaining<=0)?(0,l.jsxs)("p",{className:"plan-flow-wishes-recharge",role:"status",children:[(0,l.jsx)(t.Icon,{name:"hidden-gems",tone:"gold"})," The Genie needs to recharge. Purchase any trip to unlock unlimited wishes."]}):(0,l.jsxs)("button",{type:"button",className:"plan-flow-more btn-sm",onClick:()=>void ew(),children:[(0,l.jsx)(t.Icon,{name:"hidden-gems",tone:"gold"})," Three More Wishes"]}),(0,l.jsx)("button",{type:"button",className:"plan-flow-start-over",onClick:()=>{eh(),U("choose")},children:"Start over"}),K?(0,l.jsx)("div",{className:"plan-flow-error",role:"alert",children:K}):null]}):null,(0,l.jsx)(f,{open:eo,dest:ec,discoveryStyle:G.discoveryStyle,onClose:()=>er(!1),onGrant:()=>{ec&&ev(ec),er(!1)}}),ei?(0,l.jsx)("div",{className:"plan-flow-modal-backdrop",role:"dialog","aria-modal":"true","aria-labelledby":"plan-flow-signup-title",onClick:e=>{e.target===e.currentTarget&&es(!1)},children:(0,l.jsxs)("div",{className:"plan-flow-modal",children:[(0,l.jsx)("h2",{id:"plan-flow-signup-title",className:"plan-flow-modal-title",children:"Create a free account to keep exploring"}),(0,l.jsx)("p",{className:"plan-flow-modal-copy",children:"Your Three Wishes stay right here â sign up in a moment and you won't redo the questionnaire."}),(0,l.jsxs)("div",{className:"plan-flow-modal-actions",children:[(0,l.jsx)(n.SignUpButton,{mode:"modal",forceRedirectUrl:W,children:(0,l.jsx)("button",{type:"button",className:"btn-generate plan-flow-modal-primary",children:"Continue"})}),(0,l.jsx)("button",{type:"button",className:"plan-flow-modal-dismiss",onClick:()=>es(!1),children:"Not now"})]})]})}):null]})}],864476)}]);
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.