PageSourceSearch

https://wayly.ai/_next/static/chunks/9136-80f1c069329b97ab.js

js wayly.ai collected 2026-10-05 14:01:52 UTC 76,158 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9136],{63:(e,t,r)=>{"use strict";var n=r(7260);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},4488:(e,t,r)=>{"use strict";r.d(t,{AA:()=>o,CO:()=>l,Kw:()=>s,q7:()=>c,ve:()=>a});let n="wayly_token",i="wayly_refresh_token";function s(){let e=localStorage.getItem(n);if(!e)return null;let t=e.trim();return t&&"null"!==t&&"undefined"!==t&&3===t.split(".").length?t:(localStorage.removeItem(n),null)}function l(){return null!==s()}function a(){return localStorage.getItem(i)||null}function o(e){localStorage.setItem(n,e.access_token),e.refresh_token?localStorage.setItem(i,e.refresh_token):localStorage.removeItem(i)}function c(){localStorage.removeItem(n),localStorage.removeItem(i)}},5494:(e,t,r)=>{"use strict";r.d(t,{K:()=>c,L:()=>l});var n=r(1659),i=r(4488);let s="https://api.wayly.ai",l=n.A.create({baseURL:s,timeout:3e4,headers:{"Content-Type":"application/json"}});l.interceptors.request.use(e=>{{let t=(0,i.Kw)();t&&(e.headers.Authorization="Bearer ".concat(t))}return e});let a=null;async function o(){let e=(0,i.ve)();if(!e)return null;try{let t=(await n.A.post("".concat(s,"/api/auth/refresh"),{refresh_token:e},{timeout:15e3,headers:{"Content-Type":"application/json"}})).data;if(!t.access_token)return(0,i.q7)(),null;if((0,i.ve)()!==e)return t.refresh_token&&n.A.post("".concat(s,"/api/auth/logout"),{refresh_token:t.refresh_token},{timeout:15e3,headers:{"Content-Type":"application/json"}}).catch(()=>{}),null;return(0,i.AA)({access_token:t.access_token,refresh_token:t.refresh_token}),t.access_token}catch(e){return(0,i.q7)(),null}}function c(e,t){var r,n;let i=null==(n=e.response)||null==(r=n.data)?void 0:r.detail;if("string"==typeof i)return i;if(Array.isArray(i)){let e=i[0];if(e&&"object"==typeof e&&"string"==typeof e.msg)return e.msg}return e.message?e.message:t}l.interceptors.response.use(e=>e,async e=>{var t,r;let n=e.config;if((null==(t=e.response)?void 0:t.status)===401&&n&&!n._retried&&(0,i.ve)()){n._retried=!0,null!=a||(a=o().finally(()=>{a=null}));let e=await a;if(e)return n.headers={...n.headers,Authorization:"Bearer ".concat(e)},l(n)}return(null==(r=e.response)?void 0:r.status)===401&&(0,i.q7)(),Promise.reject(e)})},6729:(e,t,r)=>{"use strict";r.d(t,{default:()=>es});var n=r(5155),i=r(63),s=r(2115),l=r(5494);let a={transportDatesBatch:e=>l.L.post("/api/search/transport-dates-batch",e).then(e=>e.data)};var o=r(4488);async function c(e,t,r){var n,i,s,l,a,c;let d={"Content-Type":"application/json"},u=(0,o.Kw)();u&&(d.Authorization="Bearer ".concat(u));let p=await fetch("".concat("https://api.wayly.ai","/api/search/smart/stream"),{method:"POST",headers:d,body:JSON.stringify(e),signal:r});if(!p.ok){let e="Search failed (".concat(p.status,")");try{let t=await p.json();t.detail&&(e=t.detail)}catch(e){}throw null==(i=t.onError)||i.call(t,e),Error(e)}let h=null==(n=p.body)?void 0:n.getReader();if(!h)throw Error("Streaming not supported");let x=new TextDecoder,m="",f=null;for(;;){let{done:e,value:r}=await h.read();if(e)break;let n=(m+=x.decode(r,{stream:!0})).split("\n\n");for(let e of(m=n.pop()||"",n)){let r=function(e){let t="message",r=[];for(let n of e.split("\n"))n.startsWith("event:")&&(t=n.slice(6).trim()),n.startsWith("data:")&&r.push(n.slice(5).trim());return r.length?{event:t,data:r.join("\n")}:null}(e.trim());if(!r)continue;let n={};try{n=JSON.parse(r.data)}catch(e){continue}if("meta"===r.event)null==(s=t.onMeta)||s.call(t,n);else if("results"===r.event)null==(l=t.onResults)||l.call(t,n);else if("done"===r.event)f=n,null==(a=t.onDone)||a.call(t,f);else if("error"===r.event){let e=String(n.detail||"Search stream error");throw null==(c=t.onError)||c.call(t,e),Error(e)}}}if(!f)throw Error("Search stream ended without results");return f}let d=["ld-a","ld-b","ld-c"];function u(e){let{size:t=26}=e;return(0,n.jsx)("div",{className:"mt-[3px] flex shrink-0 items-center justify-center rounded-full bg-ink text-white",style:{width:t,height:t},children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7.5"}),(0,n.jsx)("path",{d:"m20 20-4-4",strokeLinecap:"round"})]})})}function p(e){let{messages:t,clarifyText:r,onClarifyAnswer:i,loading:s}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-4 flex flex-col",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"user"===e.kind?"mb-4 flex justify-end":"mb-1 flex items-start gap-2.5",children:["assistant"===e.kind&&(0,n.jsx)(u,{}),(0,n.jsx)("div",{className:"user"===e.kind?"max-w-[80%] rounded-[20px_20px_4px_20px] bg-ink px-[18px] py-3 text-sm font-light leading-[1.55] text-white shadow-[0_2px_12px_rgba(0,0,0,.12)] max-[520px]:max-w-[90%]":"rounded-[4px_18px_18px_18px] border border-i08 bg-white px-4 py-[11px] text-sm font-light leading-[1.65] text-ink shadow-[0_1px_4px_rgba(0,0,0,.04)] [&_b]:font-medium",children:function(e){let t=[],r=0;for(let s of e.matchAll(/<b>(.*?)<\/b>/g)){var i;let l=null!=(i=s.index)?i:0;l>r&&t.push(e.slice(r,l)),t.push((0,n.jsx)("b",{children:s[1]},"b-".concat(l))),r=l+s[0].length}return r<e.length&&t.push(e.slice(r)),t}(e.text)})]},"".concat(e.kind,"-").concat(t)))}),null!==r&&(0,n.jsxs)("fieldset",{className:"mb-3.5 rounded-md border border-i15 bg-white px-[18px] py-4 [min-inline-size:auto]","aria-label":"Passenger age clarification",children:[(0,n.jsx)("p",{className:"mb-3 text-sm leading-[1.45] text-ink",children:r}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",className:"rounded-full border border-ink bg-ink px-3.5 py-2 text-xs font-medium text-white",onClick:()=>i("yes"),children:"Yes — 2 years or older (child)"}),(0,n.jsx)("button",{type:"button",className:"rounded-full border border-i15 bg-white px-3.5 py-2 text-xs font-medium text-ink transition-colors hover:border-ink",onClick:()=>i("no"),children:"No — under 2 (lap infant)"})]})]}),s&&(0,n.jsxs)("div",{className:"mb-1.5 flex flex-col gap-2.5","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 text-sm text-i50",children:[(0,n.jsx)("div",{className:"h-[9px] w-[9px] animate-pulse rounded-full bg-ink"}),(0,n.jsx)("span",{children:"Searching live availability..."})]}),d.map(e=>(0,n.jsxs)("div",{className:"rounded-md border border-i08 bg-white p-[18px]",children:[(0,n.jsx)("div",{className:"h-3 w-[24%] animate-shimmer rounded-full bg-[linear-gradient(90deg,var(--i08)_25%,#f4f3f0_50%,var(--i08)_75%)] bg-[length:200%_100%]"}),(0,n.jsx)("div",{className:"mt-2.5 h-[18px] w-[78%] animate-shimmer rounded-full bg-[linear-gradient(90deg,var(--i08)_25%,#f4f3f0_50%,var(--i08)_75%)] bg-[length:200%_100%]"}),(0,n.jsx)("div",{className:"mt-2.5 h-3 w-[52%] animate-shimmer rounded-full bg-[linear-gradient(90deg,var(--i08)_25%,#f4f3f0_50%,var(--i08)_75%)] bg-[length:200%_100%]"})]},e))]})]})}let h="Describe your trip in the search bar below to see live availability.",x={flights:"Flights",trains:"Trains",buses:"Buses",hotels:"Hotels",yachts:"Yachts",events:"Events",experiences:"Experiences"},m={flights:{q:"Flights New York → Paris, tomorrow, 2 pax, business",chips:["All","Direct only","Morning dep.","Evening arr.","Under $900"],ph:"e.g. 'Air France only' or 'arrive before noon'"},trains:{q:"Trains London → Paris, Friday morning",chips:["All","Direct","Morning","Afternoon","1st class"],ph:"e.g. 'direct only' or 'arrive before 2pm'"},buses:{q:"Buses London → Amsterdam, this Saturday",chips:["All","Direct","With WiFi","Night bus","Under \xa330"],ph:"e.g. 'FlixBus only' or 'overnight'"},hotels:{q:"Hotels Amalfi Coast — 5 nights, 2 adults, boutique or 5★",chips:["All","Sea view","Pool","Breakfast incl.","Boutique","5-star"],ph:"e.g. 'with infinity pool' or 'in Positano'"},yachts:{q:"Yacht rental Amalfi Coast — 3 days, 8 guests",chips:["All","Crewed","Catamaran","Motor yacht","Sailing","Under €1,200/day"],ph:"e.g. 'with captain' or 'at least 40ft'"},events:{q:"Events in Barcelona this weekend",chips:["All","Concerts","Sports","Theatre","Nightlife","Free"],ph:"e.g. 'only concerts' or 'free events'"},experiences:{q:"Experiences near Amalfi Coast — 1–3 days",chips:["All","Boat tours","Hiking","Food & wine","Cultural","Adventure"],ph:"e.g. 'boat tour' or 'cooking class'"}},f={flights:[{kind:"sort",title:"Sort by",options:["Best value","Cheapest first","Fastest route","Earliest dep."]},{kind:"options",title:"Stops",options:[{label:"Direct",count:"3",checked:!0},{label:"1 stop",count:"7",checked:!0},{label:"2+ stops",count:"2"}]},{kind:"range",title:"Price per person",minLabel:"$0",display:"$1,200",min:0,max:2e3,value:1200,prefix:"$"},{kind:"options",title:"Departure",options:[{label:"Morning (6–12)",checked:!0},{label:"Afternoon (12–18)",checked:!0},{label:"Evening (18–24)",checked:!0}]},{kind:"options",title:"Cabin class",options:[{label:"Economy",checked:!0},{label:"Premium Eco",checked:!0},{label:"Business",checked:!0},{label:"First class"}]},{kind:"options",title:"Airlines",options:[{label:"Air France",checked:!0},{label:"British Airways",checked:!0},{label:"Lufthansa",checked:!0},{label:"Delta",checked:!0},{label:"United",checked:!0}]},{kind:"options",title:"Baggage",options:[{label:"Carry-on included",checked:!0},{label:"Checked bag included",checked:!0}]}],trains:[{kind:"sort",title:"Sort by",options:["Best value","Cheapest first","Fastest route","Earliest dep."]},{kind:"options",title:"Stops",options:[{label:"Direct",count:"3",checked:!0},{label:"1 stop",count:"2",checked:!0},{label:"2+ stops",count:"0"}]},{kind:"range",title:"Price per person",minLabel:"\xa30",display:"\xa3220",min:0,max:300,value:220,prefix:"\xa3"},{kind:"options",title:"Departure",options:[{label:"Morning (6–12)",checked:!0},{label:"Afternoon (12–18)",checked:!0}]},{kind:"options",title:"Cabin class",options:[{label:"Standard",checked:!0},{label:"Standard Premier",checked:!0},{label:"Business Premier"}]}],buses:[{kind:"sort",title:"Sort by",options:["Best value","Cheapest first","Fastest route","Earliest dep."]},{kind:"options",title:"Stops",options:[{label:"Direct",count:"6",checked:!0},{label:"1 stop",count:"5",checked:!0}]},{kind:"range",title:"Price",minLabel:"\xa30",display:"\xa380",min:0,max:150,value:80,prefix:"\xa3"},{kind:"options",title:"Departure",options:[{label:"Morning (6–12)",checked:!0},{label:"Afternoon (12–18)",checked:!0},{label:"Night (18–06)",checked:!0}]},{kind:"options",title:"Amenities",options:[{label:"WiFi on board",checked:!0},{label:"Power outlets",checked:!0},{label:"Toilet on board"}]},{kind:"options",title:"Operator",options:[{label:"FlixBus",count:"7",checked:!0},{label:"Eurolines",count:"3",checked:!0},{label:"National Express",count:"1",checked:!0}]}],hotels:[{kind:"sort",title:"Sort by",options:["Top rated","Lowest price","Best match"]},{kind:"range",title:"Price / night",minLabel:"€0",display:"€800",min:0,max:1500,value:800,prefix:"€"},{kind:"options",title:"Property type",options:[{label:"Hotel",count:"14",checked:!0},{label:"Villa",count:"6",checked:!0},{label:"Boutique",count:"8",checked:!0}]},{kind:"options",title:"Amenities",options:[{label:"Sea view",checked:!0},{label:"Pool",checked:!0},{label:"Spa"},{label:"Breakfast incl.",checked:!0},{label:"Airport transfer"},{label:"Free cancellation"},{label:"Adults only"},{label:"Pet friendly"}]},{kind:"options",title:"Star rating",options:[{label:"5 stars",checked:!0},{label:"4 stars",checked:!0},{label:"3 stars"}]},{kind:"options",title:"Guest rating",options:[{label:"9+ Exceptional",checked:!0},{label:"8+ Very good",checked:!0}]}],yachts:[{kind:"sort",title:"Sort by",options:["Best match","Price: low–high","Highest rated"]},{kind:"range",title:"Price per day",minLabel:"€0",display:"€5,000",min:0,max:1e4,value:5e3,prefix:"€"},{kind:"options",title:"Vessel type",options:[{label:"Motor yacht",count:"8",checked:!0},{label:"Catamaran",count:"5",checked:!0},{label:"Sailboat",count:"4",checked:!0},{label:"Day boat",count:"3",checked:!0}]},{kind:"options",title:"Crew",options:[{label:"Crew included",checked:!0},{label:"Skipper available",checked:!0},{label:"Chef on board"}]},{kind:"range",title:"Length (ft)",minLabel:"20ft",display:"80ft",min:20,max:120,value:80,suffix:"ft"},{kind:"options",title:"Max guests",options:[{label:"Up to 6",checked:!0},{label:"Up to 10",checked:!0},{label:"10+"}]}],events:[{kind:"sort",title:"Sort by",options:["Popular first","Lowest price","Best match"]},{kind:"range",title:"Price",minLabel:"€0",display:"€150",min:0,max:250,value:150,prefix:"€"},{kind:"options",title:"Event type",options:[{label:"Concert",checked:!0},{label:"Sports",checked:!0},{label:"Theatre",checked:!0},{label:"Nightlife",checked:!0}]},{kind:"options",title:"Price type",options:[{label:"Paid",checked:!0},{label:"Free",checked:!0}]}],experiences:[{kind:"sort",title:"Sort by",options:["Top rated","Lowest price","Best match"]},{kind:"range",title:"Price",minLabel:"€0",display:"€300",min:0,max:500,value:300,prefix:"€"},{kind:"options",title:"Activity type",options:[{label:"Boat tours",checked:!0},{label:"Hiking",checked:!0},{label:"Food & wine",checked:!0},{label:"Cultural",checked:!0},{label:"Adventure",checked:!0}]},{kind:"options",title:"Guest rating",options:[{label:"9+ Exceptional",checked:!0},{label:"8+ Very good",checked:!0}]}]},b={AF:"#002157",BA:"#075AAA",UA:"#003087",DL:"#003366",LH:"#05164d",ES:"#002B5C",FR:"#003580",W6:"#ff6600",IB:"#d30000",AY:"#003580",FB:"#10b981",EL:"#475569",IC:"#0f766e",TH:"#b91c1c"},g=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],v=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function k(e){return(e||"").toLowerCase().trim()}function y(e){return e?"flight"===e?"flights":"hotel"===e?"hotels":"train"===e?"trains":"bus"===e?"buses":"experience"===e?"experiences":"event"===e?"events":"yacht"===e?"yachts":e in m?e:null:null}function w(e,t){let r=k(e);return t.some(e=>r.includes(k(e)))}function j(e){if(!e)return -1;let t=e.match(/(\d{1,2}):(\d{2})/);return t?60*Number(t[1])+Number(t[2]):-1}function N(e){if(!e)return 0;let t=Number.parseFloat(e.replace(/[^0-9.,]/g,"").replace(",","."));return Number.isFinite(t)?t:0}function _(e){if(!e)return Number.MAX_SAFE_INTEGER;let t=e.match(/(\d+)\s*h|(\d+)\s*ч/i),r=e.match(/(\d+)\s*m|(\d+)\s*м/i);return 60*Number((null==t?void 0:t[1])||(null==t?void 0:t[2])||0)+Number((null==r?void 0:r[1])||(null==r?void 0:r[2])||0)}function S(e,t){let r=k(t),n=k(e);return"premium eco"===n?r.includes("premium"):"first class"===n?r.includes("first"):r.includes(n)}function C(e){return{sortIndex:e.reduce((e,t)=>
1("sort"===t.kind&&(e[t.title]=0),e),{}),optionState:e.reduce((e,t)=>("options"===t.kind&&(e[t.title]=t.options.map(e=>!!e.checked)),e),{}),rangeState:e.reduce((e,t)=>("range"===t.kind&&(e[t.title]=t.value),e),{})}}function M(e){if(!e)return"--:--";let t=e.replace("T"," ");return t.length>=16?t.slice(11,16):t}function A(e){return e?"premium_economy"===e?"Premium Eco":e.charAt(0).toUpperCase()+e.slice(1).replace("_"," "):"Economy"}function L(e){return"business"===e?"business":"first"===e?"first":"premium"===e||"premium_economy"===e?"premium":"economy"}function E(e){let t=e.trim().toLowerCase();return"economy"===t?"economy":"premium eco"===t||"premium economy"===t?"premium":"business"===t?"business":"first class"===t||"first class"===t||"first"===t?"first":null}function B(e,t){return"".concat("GBP"===t?"\xa3":"USD"===t?"$":"€").concat(Math.round(e||0))}function q(e){return e?"https://images.kiwi.com/airlines/64/".concat(e.toUpperCase(),".png"):""}function P(e){let t=Number(null==e?void 0:e.passengers)||1,r=Number(null==e?void 0:e.children)||0,n=Number(null==e?void 0:e.infants)||0,i=Array.isArray(null==e?void 0:e.child_ages)?e.child_ages.length:0;if((i>0?t+i:t+r+n)<=1)return"total \xb7 1 traveller";let s=["".concat(t," adt")];return r&&s.push("".concat(r," chd")),n&&s.push("".concat(n," inf")),"total \xb7 ".concat(s.join(" + "))}function F(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function D(e){if(!e)return null;let t=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(!t)return null;let r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}function I(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(r,"-").concat(n)}function U(){return I(F(new Date))}function W(e,t){let r=new Date(e);return r.setDate(r.getDate()+t),r}function H(e,t,r){let n=String(e.origin||"").trim(),i=String(e.destination||"").trim(),s=(null==r?void 0:r.date)||String(e.date||"").trim(),l=(null==r?void 0:r.pax)||{adults:Number(e.passengers)||1,children:Number(e.children)||0,infants:Number(e.infants)||0};if(!n||!i)return t.trim();let a=["".concat(n," to ").concat(i)];return s&&a.push("on ".concat(s)),l.adults>0&&a.push("".concat(l.adults," adult").concat(1===l.adults?"":"s")),l.children>0&&a.push("".concat(l.children," child").concat(1===l.children?"":"ren")),l.infants>0&&a.push("".concat(l.infants," infant").concat(1===l.infants?"":"s")),a.join(" ")}function T(e,t){let r=W(e,5*t-2);return Array.from({length:5},(e,t)=>I(W(r,t)))}function R(e){let{baseDate:t,offsetPages:r,minOffsetPages:i,todayIsoStr:s,activeIndex:l,pricesByDate:a,loading:o,currency:c,onPrev:d,onNext:u,onSelect:p}=e,h=W(t,5*r-2),x=Array.from({length:5},(e,t)=>W(h,t)),m=x.map(e=>{let t=a[I(e)];return"number"==typeof t&&t>0?t:null}),f=m.filter(e=>null!==e),b=f.length?Math.min(...f):null,k=c||"EUR",y="flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-i08 bg-white text-i50 transition-[border-color,box-shadow] hover:border-i30 hover:text-ink hover:shadow-[0_2px_8px_rgba(0,0,0,.06)] disabled:cursor-not-allowed disabled:opacity-30";return(0,n.jsxs)("div",{className:"flex items-center gap-1.5 overflow-hidden pb-1 pt-3",children:[(0,n.jsx)("button",{type:"button",className:y,disabled:!(r>i),onClick:d,"aria-label":"Previous dates",children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,n.jsx)("div",{className:"flex flex-1 gap-[5px] overflow-hidden",children:x.map((e,t)=>{let r=t===l,i=m[t],a=null!==i&&null!==b&&i===b,c=I(e),d=c<s;return(0,n.jsxs)("button",{type:"button",disabled:d,className:"flex min-w-0 flex-1 flex-col items-center gap-[3px] rounded-[10px] border-[1.5px] px-1 py-[9px] transition-colors ".concat(r?"border-[#0ea5e9] bg-[#f0f9ff]":a?"border-ok bg-white hover:bg-bg":"border-i08 bg-white hover:border-i30 hover:bg-bg"," ").concat(d?r?"pointer-events-none opacity-[.55]":"pointer-events-none opacity-[.42]":"cursor-pointer"),onClick:()=>{d||p(t,c)},children:[(0,n.jsx)("span",{className:"text-[0.6rem] font-semibold uppercase tracking-wide ".concat(r?"text-[#0369a1]":"text-i50"),children:v[e.getDay()]}),(0,n.jsxs)("span",{className:"whitespace-nowrap text-xs ".concat(r?"font-bold text-[#0369a1]":"font-medium text-ink"),children:[e.getDate()," ",g[e.getMonth()]]}),null!==i?(0,n.jsxs)("span",{className:"text-[0.68rem] font-medium ".concat(r?"text-[#0ea5e9]":a?"text-ok":"text-i50"),children:[Math.round(i)," ",k]}):o?(0,n.jsx)("span",{className:"text-[0.6rem] text-i30",children:"…"}):(0,n.jsx)("span",{className:"text-[0.6rem] text-i30",children:"—"})]},c)})}),(0,n.jsx)("button",{type:"button",className:y,onClick:u,"aria-label":"Next dates",children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M9 18l6-6-6-6",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}let V="flex h-[22px] w-[22px] items-center justify-center rounded-full border border-i15 bg-white text-sm leading-none text-ink transition-colors hover:border-i30 hover:bg-i08 disabled:cursor-not-allowed disabled:opacity-30";function O(e){let{pax:t,onChange:r}=e,i=(e,n)=>{let i=t[e]+n;"adults"===e&&i<1||"adults"!==e&&i<0||"infants"===e&&i>t.adults||r({...t,[e]:i})};return(0,n.jsxs)("div",{className:"mb-[26px]",children:[(0,n.jsx)("p",{className:"mb-2.5 text-[0.66rem] font-medium uppercase tracking-[.09em] text-i30",children:"Passengers"}),(0,n.jsx)("div",{className:"flex flex-col gap-1",children:[{key:"adults",label:"Adults",desc:"Age 12+"},{key:"children",label:"Children",desc:"Age 2–11"},{key:"infants",label:"Infants",desc:"Under 2"}].map(e=>(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-i08 py-2 last:border-b-0",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-ink",children:e.label}),(0,n.jsx)("div",{className:"mt-px text-[0.62rem] text-i30",children:e.desc})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("button",{type:"button",className:V,disabled:"adults"===e.key?t.adults<=1:t[e.key]<=0,onClick:()=>i(e.key,-1),children:"−"}),(0,n.jsx)("span",{className:"min-w-[14px] text-center text-sm font-medium text-ink",children:t[e.key]}),(0,n.jsx)("button",{type:"button",className:V,onClick:()=>i(e.key,1),children:"+"})]})]},e.key))})]})}function z(e){let{sections:t,sortIndex:r,optionState:i,rangeState:s,onSortChange:l,onOptionToggle:a,onRangeChange:o,selectedCabin:c,onCabinChange:d,showPassengers:u,sidebarPax:p,onSidebarPaxChange:h}=e;return(0,n.jsxs)(n.Fragment,{children:[u&&p&&h&&(0,n.jsx)(O,{pax:p,onChange:h}),t.map(e=>{var t,u;return(0,n.jsxs)("div",{className:"mb-[26px]",children:[(0,n.jsx)("p",{className:"mb-2.5 text-[0.66rem] font-medium uppercase tracking-[.09em] text-i30",children:e.title}),"sort"===e.kind&&(0,n.jsx)("div",{className:"flex flex-col gap-0.5",children:e.options.map((t,i)=>(0,n.jsx)("button",{type:"button",className:"rounded-xs px-2.5 py-1.5 text-left text-sm transition-colors ".concat(r[e.title]===i?"bg-ink text-white":"text-i50 hover:bg-bg hover:text-ink"),onClick:()=>l(e.title,i),children:t},t))}),"options"===e.kind&&e.options.map((t,r)=>{var s;let l="Cabin class"===e.title&&c&&d?E(t.label)===c:!!(null==(s=i[e.title])?void 0:s[r]);return(0,n.jsxs)("button",{type:"button",className:"flex w-full cursor-pointer select-none items-center justify-between py-[5px] text-left",onClick:()=>{let n="Cabin class"===e.title&&c&&d?E(t.label):null;if(n&&n!==c&&d)return void d(n);a(e.title,r)},children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("div",{className:"relative h-4 w-4 shrink-0 rounded-xs border transition-colors ".concat(l?"border-ink bg-ink after:absolute after:left-[3px] after:top-px after:h-[5px] after:w-2 after:-rotate-45 after:border-b-[1.5px] after:border-l-[1.5px] after:border-white after:content-['']":"border-i08 bg-white")}),(0,n.jsx)("span",{className:"text-sm text-ink",children:t.label})]}),t.count&&(0,n.jsx)("span",{className:"text-xs text-i30",children:t.count})]},"".concat(e.title,"-").concat(t.label))}),"range"===e.kind&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-2 flex justify-between text-xs text-ink",children:[(0,n.jsx)("span",{children:e.minLabel}),(0,n.jsxs)("span",{children:[e.prefix,null!=(t=s[e.title])?t:e.value,e.suffix]})]}),(0,n.jsx)("input",{type:"range",min:e.min,max:e.max,value:null!=(u=s[e.title])?u:e.value,onChange:t=>o(e.title,Number(t.target.value)),className:"h-[3px] w-full cursor-pointer appearance-none rounded-sm bg-i08 outline-none [&::-webkit-slider-thumb]:h-3.5 [&::-webkit-slider-thumb]:w-3.5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-white [&::-webkit-slider-thumb]:bg-ink [&::-webkit-slider-thumb]:shadow-[0_0_0_1.5px_var(--ink)]"})]})]},e.title)})]})}function Y(e){let{open:t,onClose:r,children:s}=e,l=(0,i.useRouter)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button","aria-label":"Close menu",className:"fixed inset-0 z-[400] bg-black/40 backdrop-blur-[2px] transition-opacity duration-[280ms] ".concat(t?"opacity-100":"pointer-events-none opacity-0"),onClick:r}),(0,n.jsxs)("div",{className:"fixed bottom-0 left-0 top-0 z-[500] flex w-[320px] max-w-[88vw] flex-col bg-white shadow-[4px_0_32px_rgba(0,0,0,.12)] transition-transform duration-300 ease-[
1cubic-bezier(.4,0,.2,1)] ".concat(t?"translate-x-0":"-translate-x-full"),children:[(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-between px-5 pt-5",children:[(0,n.jsx)("span",{className:"font-serif text-[1.15rem] tracking-tight text-ink",children:"Wayly"}),(0,n.jsx)("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-sm border border-i08 text-i50",onClick:r,children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M18 6L6 18M6 6l12 12",strokeLinecap:"round"})})})]}),(0,n.jsx)("div",{className:"shrink-0 px-5 pb-3 pt-5",children:(0,n.jsx)("p",{className:"mb-2.5 text-[0.66rem] font-medium uppercase tracking-[.09em] text-i30",children:"Filters"})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-5 pb-5 [scrollbar-width:none] [&::-webkit-scrollbar]:w-0",children:s}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 border-t border-i08 px-5 py-4",children:[(0,n.jsx)("button",{type:"button",className:"flex-1 rounded-sm border border-i08 py-2 text-sm text-i50 transition-colors hover:border-i30 hover:text-ink",onClick:()=>l.push("/auth/login"),children:"Sign in"}),(0,n.jsx)("button",{type:"button",className:"flex-1 rounded-sm bg-ink py-2 text-sm font-medium text-white transition-opacity hover:opacity-75",onClick:()=>l.push("/auth/register"),children:"Join Wayly"})]})]})]})}function G(e){let{size:t=13}=e;return(0,n.jsxs)("svg",{"aria-hidden":"true",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7.5"}),(0,n.jsx)("path",{d:"m20 20-4-4",strokeLinecap:"round"})]})}function J(e){let{query:t,onOpenDrawer:r}=e,s=(0,i.useRouter)(),l=!!t.trim(),a="Search flights, hotels, experiences…";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("nav",{className:"fixed inset-x-0 top-0 z-[300] hidden h-[58px] items-center gap-4 border-b border-i08 bg-[rgba(248,247,245,.94)] px-10 backdrop-blur-xl desk:flex",children:[(0,n.jsx)("a",{href:"/",className:"shrink-0 font-serif text-[1.2rem] tracking-tight text-ink",children:"Wayly"}),(0,n.jsxs)("div",{className:"flex max-w-[560px] flex-1 cursor-pointer items-center gap-2 rounded-sm border border-i08 bg-white py-[7px] pl-3.5 pr-2 transition-colors hover:border-i30",children:[(0,n.jsx)(G,{}),(0,n.jsx)("span",{className:"flex-1 truncate text-sm font-light ".concat(l?"text-ink":"text-i30"),children:l?t:a}),(0,n.jsx)("button",{type:"button",className:"shrink-0 whitespace-nowrap rounded-xs bg-bg px-2.5 py-1 text-xs text-i50 hover:text-ink",children:"Edit"})]}),(0,n.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:[(0,n.jsx)("button",{type:"button",className:"rounded-sm px-3.5 py-1.5 text-sm text-i50 transition-colors hover:bg-i08 hover:text-ink",onClick:()=>s.push("/auth/login"),children:"Sign in"}),(0,n.jsx)("button",{type:"button",className:"whitespace-nowrap rounded-sm bg-ink px-4 py-[7px] text-sm font-medium text-white transition-opacity hover:opacity-75",onClick:()=>s.push("/auth/register"),children:"Join Wayly"})]})]}),(0,n.jsxs)("div",{className:"fixed inset-x-0 top-0 z-[300] flex h-[58px] items-center gap-2.5 border-b border-i08 bg-[rgba(248,247,245,.94)] px-4 backdrop-blur-xl desk:hidden",children:[(0,n.jsxs)("button",{type:"button",className:"flex h-9 w-9 shrink-0 flex-col items-center justify-center gap-1 rounded-sm",onClick:r,"aria-label":"Menu",children:[(0,n.jsx)("span",{className:"block h-[1.5px] w-[18px] rounded-sm bg-ink"}),(0,n.jsx)("span",{className:"block h-[1.5px] w-[18px] rounded-sm bg-ink"}),(0,n.jsx)("span",{className:"block h-[1.5px] w-[18px] rounded-sm bg-ink"})]}),(0,n.jsxs)("div",{className:"flex flex-1 items-center gap-[7px] overflow-hidden rounded-sm border border-i08 bg-white py-2 pl-3 pr-2.5 text-i30",children:[(0,n.jsx)(G,{}),(0,n.jsx)("span",{className:"flex-1 truncate text-sm font-light ".concat(l?"text-ink":"text-i30"),children:l?t:a})]}),(0,n.jsx)("button",{type:"button",className:"relative flex h-9 w-9 shrink-0 items-center justify-center rounded-sm border border-i08 bg-white text-ink after:absolute after:right-1.5 after:top-1.5 after:h-[7px] after:w-[7px] after:rounded-full after:border-[1.5px] after:border-bg after:bg-ink after:content-['']","aria-label":"Filters",onClick:r,children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M4 6h16M7 12h10M10 18h4",strokeLinecap:"round"})})})]})]})}
1function $(e){let{code:t,name:r,src:i}=e,l=b[t]||"#333",[a,o]=(0,s.useState)(!1);return(0,n.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-xs border border-i08 bg-white",children:i&&!a?(0,n.jsx)("img",{src:i,alt:r||t,loading:"lazy",className:"h-full w-full bg-white object-contain",onError:()=>o(!0)}):(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center rounded-[3px] text-center text-[0.6rem] font-bold leading-none tracking-wide text-white",style:{background:l},children:t})})}function K(e){let{ticket:t,onClose:r,onCreateProfile:i,onBookManually:s}=e;return(0,n.jsx)("div",{className:"fixed inset-0 z-[500] flex items-end justify-center bg-black/[.38] backdrop-blur transition-opacity duration-[240ms] ".concat(t?"opacity-100":"pointer-events-none opacity-0"),onClick:e=>{e.target===e.currentTarget&&r()},onKeyDown:e=>{"Escape"===e.key&&r()},children:(0,n.jsxs)("div",{className:"w-full max-w-[640px] overflow-hidden rounded-t-[20px] bg-white transition-transform duration-300 ease-[cubic-bezier(.4,0,.2,1)] ".concat(t?"translate-y-0":"translate-y-10"),children:[(0,n.jsx)("div",{className:"mx-auto mt-3 h-1 w-9 rounded-sm bg-i08"}),(0,n.jsxs)("div",{className:"flex items-center gap-4 border-b border-i08 bg-bg px-6 py-5",children:[(0,n.jsx)("div",{className:"shrink-0",children:(0,n.jsx)($,{code:(null==t?void 0:t.co)||"FL",name:null==t?void 0:t.carrierName,src:q(null==t?void 0:t.co)})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"mb-0.5 text-sm font-semibold text-ink",children:(null==t?void 0:t.carrierName)||(null==t?void 0:t.st)}),(0,n.jsxs)("div",{className:"text-sm font-medium tracking-tight text-ink",children:[null==t?void 0:t.dep," → ",null==t?void 0:t.arr," \xb7 ",null==t?void 0:t.dc," – ",null==t?void 0:t.ac]}),(0,n.jsxs)("div",{className:"mt-0.5 text-xs text-i50",children:[null==t?void 0:t.dur," \xb7 ",null==t?void 0:t.st," \xb7 ",null==t?void 0:t.cl]})]}),(0,n.jsx)("div",{className:"shrink-0 font-serif text-[1.3rem] tracking-tight text-ink",children:null==t?void 0:t.pr})]}),(0,n.jsxs)("div",{className:"px-6 pb-8 pt-6",children:[(0,n.jsxs)("div",{className:"mb-6 flex items-start gap-2.5",children:[(0,n.jsx)("div",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-ink text-white",children:(0,n.jsxs)("svg",{"aria-hidden":"true",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7.5"}),(0,n.jsx)("path",{d:"m20 20-4-4",strokeLinecap:"round"})]})}),(0,n.jsxs)("div",{className:"rounded-[4px_16px_16px_16px] bg-white px-[18px] py-3.5 text-sm font-light leading-relaxed text-ink [&_b]:font-medium",children:["Great choice. Before I fill in your details —"," ",(0,n.jsx)("b",{children:"want me to remember your travel profile for next time?"}),(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Create a free account and I'll autofill your passport, contacts and preferences on every future booking. Takes 60 seconds."]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2.5 pl-[38px]",children:[(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center justify-center gap-2 rounded-sm bg-ink py-[13px] text-sm font-medium text-white transition-opacity hover:opacity-[.78]",onClick:i,children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),(0,n.jsx)("circle",{cx:"12",cy:"7",r:"4"})]}),"Create account & save my profile"]}),(0,n.jsx)("button",{type:"button",className:"py-1.5 text-center text-sm text-i50 transition-colors hover:text-ink",onClick:s,children:"No thanks, I'll enter details manually →"})]})]})]})})}let X=["sk-a","sk-b","sk-c","sk-d","sk-e","sk-f"],Q="animate-shimmer bg-[linear-gradient(90deg,var(--i08)_25%,#f0f0f0_50%,var(--i08)_75%)] bg-[length:200%_100%]";function Z(){return(0,n.jsx)("div",{className:"flex flex-col gap-1.5","aria-hidden":!0,
1children:X.map(e=>(0,n.jsxs)("div",{className:"pointer-events-none grid min-h-[88px] grid-cols-[56px_1fr_88px] items-center gap-3 rounded-md border border-i08 bg-white px-4 py-3.5",children:[(0,n.jsx)("div",{className:"h-9 w-9 rounded-xs ".concat(Q)}),(0,n.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,n.jsx)("div",{className:"h-2.5 w-[72%] rounded-xs ".concat(Q)}),(0,n.jsx)("div",{className:"h-2.5 rounded-xs ".concat(Q)})]}),(0,n.jsx)("div",{className:"ml-auto h-[22px] w-14 rounded-sm ".concat(Q)})]},e))})}function ee(e){let{cardId:t,stops:r}=e;return(0,n.jsx)("div",{className:"overflow-hidden rounded-b-md border border-t-0 border-i08 bg-white",children:(0,n.jsx)("div",{className:"px-4",children:r.map(e=>{let r=e.wait.includes("h")||Number.parseInt(e.wait,10)>90;return(0,n.jsxs)("div",{className:"grid grid-cols-[28px_1fr_auto] items-stretch gap-x-3 border-i08 py-3.5 [&+&]:border-t",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center pt-[3px]",children:[(0,n.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-full border-2 border-ink"}),(0,n.jsx)("div",{className:"my-[3px] w-px flex-1 bg-i08"}),(0,n.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-full border-2 border-i30"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-[0.8125rem] font-semibold tracking-wide text-ink",children:e.code}),(0,n.jsx)("span",{className:"text-[0.625rem] text-i50",children:e.name})]}),(0,n.jsxs)("div",{className:"text-[0.8125rem] font-light text-i50",children:["Arrives ",(0,n.jsx)("span",{className:"font-normal text-ink",children:e.arr||"--:--"})," \xb7 Departs ",(0,n.jsx)("span",{className:"font-normal text-ink",children:e.dep||"--:--"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-[5px] self-center whitespace-nowrap rounded-full px-2.5 py-1 text-[0.625rem] font-medium ".concat(r?"bg-err-bg text-err":"bg-i08 text-i50"),children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"10",height:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("path",{d:"M12 7v5l3 3",strokeLinecap:"round"})]}),e.wait||"Layover"]})]},"".concat(t,"-").concat(e.code,"-").concat(e.arr))})})})}function et(e){let{cardId:t,result:r,stopsOpen:i,onToggleStops:s,onSelect:l}=e,a=r.stops.length>0;return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"relative grid cursor-pointer grid-cols-[52px_1fr_130px_100px] items-center gap-x-4 border border-i08 bg-white px-[18px] py-3.5 transition-[border-color,box-shadow,transform] duration-150 hover:-translate-y-px hover:border-i15 hover:shadow-[0_4px_20px_rgba(0,0,0,.07)] max-[520px]:px-3.5 ".concat(i&&a?"rounded-t-md border-b-0":"rounded-md"," ").concat(r.best?"before:absolute before:-top-2 before:left-4 before:rounded-full before:bg-ink before:px-2 before:py-0.5 before:text-[0.6rem] before:font-semibold before:uppercase before:tracking-wider before:text-white before:content-['Best']":""),children:[(0,n.jsxs)("div",{className:"flex w-12 shrink-0 flex-col items-center gap-[3px]",children:[(0,n.jsx)($,{code:r.co,name:r.name,src:r.logoSrc}),(0,n.jsx)("div",{className:"whitespace-nowrap text-center text-[0.625rem] font-medium tracking-wide text-i50",children:r.fn})]}),(0,n.jsxs)("div",{className:"grid min-w-0 grid-cols-[56px_minmax(0,1fr)_56px] items-center gap-x-2",children:[(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"whitespace-nowrap font-serif text-xl leading-none tracking-tight text-ink",children:r.dep}),(0,n.jsx)("div",{className:"mt-0.5 text-[0.68rem] uppercase tracking-wide text-i50",children:r.dc}),r.departureHint&&(0,n.jsx)("div",{className:"mt-1 max-w-[92px] text-[0.6rem] font-medium leading-tight text-ok",children:r.departureHint})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,n.jsx)("div",{className:"whitespace-nowrap text-[0.68rem] text-i50",children:r.dur}),(0,n.jsx)("div",{className:"relative h-px w-full bg-i08 after:absolute after:-right-[3px] after:-top-[3px] after:h-1.5 after:w-1.5 after:rounded-full after:bg-i15 after:content-['']"}),(0,n.jsx)("div",{className:"whitespace-nowrap text-[0.68rem] text-i50",children:a?(0,n.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 text-[0.625rem] font-medium text-i50 transition-colors hover:text-ink",onClick:s,children:[r.stops.length," stop",r.stops.length>
11?"s":"",(0,n.jsx)("svg",{"aria-hidden":"true",width:"10",height:"10",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"transition-transform duration-200 ".concat(i?"rotate-180":""),children:(0,n.jsx)("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}):(0,n.jsx)("span",{className:"font-medium text-ok",children:"Direct"})})]}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"whitespace-nowrap font-serif text-xl leading-none tracking-tight text-ink",children:r.arr}),(0,n.jsx)("div",{className:"mt-0.5 text-[0.68rem] uppercase tracking-wide text-i50",children:r.ac}),r.arrivalHint&&(0,n.jsx)("div",{className:"mt-1 max-w-[92px] text-[0.6rem] font-medium leading-tight text-ok",children:r.arrivalHint})]})]}),(0,n.jsxs)("div",{className:"flex flex-col items-end gap-0.5",children:[(0,n.jsx)("span",{className:"whitespace-nowrap rounded-full border border-i08 bg-bg px-2 py-0.5 text-[0.65rem] tracking-wide text-i50",children:r.cl}),(0,n.jsx)("div",{className:"mt-0.5 font-serif text-xl leading-none tracking-tight text-ink",children:r.pr}),(0,n.jsx)("div",{className:"text-[0.65rem] text-i50",children:r.pp})]}),(0,n.jsx)("button",{type:"button",className:"h-9 w-full whitespace-nowrap rounded-sm bg-ink px-4 text-sm font-medium text-white transition-opacity hover:opacity-75 max-[520px]:mt-2 max-[520px]:text-center",onClick:()=>l({co:r.co,carrierName:r.name,dep:r.dep,arr:r.arr,dc:r.dc,ac:r.ac,dur:r.dur,st:r.name,cl:r.cl,pr:r.pr,pp:r.pp,bookingHref:r.bookingHref,priceValue:r.priceValue}),children:"Select"})]}),a&&i&&(0,n.jsx)(ee,{cardId:t,stops:r.stops})]})}function er(e){let{mode:t,results:r,totalCount:i,loadMoreLabel:s,onLoadMore:l,openStops:a,onToggleStops:o,onSelect:c}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"flex flex-col gap-1.5",children:r.map((e,r)=>{let i="".concat(t,"-").concat(e.bookingHref||e.fn||r);return(0,n.jsx)(et,{cardId:i,result:e,stopsOpen:!!a[i],onToggleStops:()=>o(i),onSelect:c},i)})}),i>r.length&&(0,n.jsx)("div",{className:"mt-6 flex justify-center",children:(0,n.jsx)("button",{type:"button",className:"rounded-full border border-i08 bg-white px-6 py-[9px] text-sm text-i50 transition-colors hover:border-i30 hover:text-ink",onClick:l,children:s})})]})}function en(e){let{results:t,onDetails:r,onBook:i}=e;return(0,n.jsx)("div",{className:"flex flex-col gap-2",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"group grid h-[184px] cursor-pointer grid-cols-[220px_1fr] overflow-hidden rounded-md border border-i08 bg-white transition-[border-color,box-shadow,transform] duration-200 hover:-translate-y-px hover:border-i15 hover:shadow-[0_4px_20px_rgba(0,0,0,.08)] max-desk:h-auto max-desk:grid-cols-1",children:[(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden max-desk:h-[180px]",children:[(0,n.jsx)("img",{src:e.img,alt:e.nm,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-[1.04]"}),e.bdg&&(0,n.jsx)("span",{className:"absolute left-2.5 top-2.5 rounded-full bg-[rgba(10,10,10,.78)] px-2 py-[3px] text-[0.6rem] font-semibold uppercase tracking-wide text-white backdrop-blur-sm",children:e.bdg}),(0,n.jsx)("button",{type:"button",className:"absolute right-2.5 top-2.5 flex h-7 w-7 items-center justify-center rounded-full bg-white/90 text-i50 backdrop-blur-sm transition-transform duration-150 hover:scale-110",onClick:e=>e.stopPropagation(),children:(0,n.jsx)("svg",{"aria-hidden":"true",width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})})]}),(0,n.jsxs)("div",{className:"flex h-full min-w-0 flex-col overflow-hidden px-[18px] py-3.5 max-desk:min-h-[140px]",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-1 flex items-start justify-between gap-2.5",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"mb-[3px] text-[0.6rem] font-medium uppercase tracking-[.09em] text-i30",children:e.type}),(0,n.jsx)("h3",{className:"mb-0.5 truncate font-serif leading-tight tracking-tight text-ink ".concat(0===t?"text-base":"text-[0.9rem]"),children:e.nm}),(0,n.jsxs)("p",{className:"mb-1.5 flex items-center gap-[3px] text-[0.68rem] text-i50",children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",className:"shrink-0 text-i15",children:[(0,n.jsx)("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),(0,n.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),e.loc]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-[3px] whitespace-nowrap text-xs font-medium text-ink",children:[(0,n.jsx)("svg",{"aria-hidden":"true",width:"11",height:"11",viewBox:"0 0 24 24",fill:"
1currentColor",className:"text-[#f59e0b]",children:(0,n.jsx)("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})}),e.rt]})]}),(0,n.jsx)("p",{className:"mb-2 line-clamp-2 text-xs font-light leading-relaxed text-i50",children:e.dc}),(0,n.jsx)("div",{className:"mt-1.5 flex flex-1 flex-nowrap gap-1 overflow-hidden",children:e.tags.map(e=>(0,n.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-full border border-i08 bg-bg px-[7px] py-0.5 text-[0.62rem] text-i50",children:e},e))})]}),(0,n.jsxs)("div",{className:"mt-auto flex min-h-[38px] shrink-0 items-center justify-between gap-2 border-t border-i08 pt-2",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-px",children:[(0,n.jsx)("div",{className:"text-[0.625rem] uppercase tracking-wide text-i50",children:"from"}),(0,n.jsxs)("div",{className:"flex items-baseline gap-[3px] font-serif text-[1.2rem] leading-none tracking-tight text-ink",children:[e.pr,(0,n.jsx)("span",{className:"font-sans text-[0.625rem] tracking-wide text-i50",children:e.un})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,n.jsx)("button",{type:"button",className:"h-[30px] whitespace-nowrap rounded-sm border border-i08 px-3 text-xs text-i50 transition-colors hover:border-i30 hover:text-ink",onClick:t=>{t.stopPropagation(),r(e)},children:"Details"}),(0,n.jsx)("button",{type:"button",className:"h-[30px] shrink-0 whitespace-nowrap rounded-sm bg-ink px-3.5 text-xs font-medium text-white transition-opacity hover:opacity-75",onClick:t=>{t.stopPropagation(),i(e)},children:"Book"})]})]})]})]},e.nm))})}function ei(e,t,r){let n=e.find(e=>"options"===e.kind&&e.title===r);if(!n)return null;let i=n.options.filter((e,n)=>{var i;return null==(i=t[r])?void 0:i[n]}).map(e=>e.label);return{total:n.options.length,selected:i}}function es(e){var t,r,l;let{initialMode:o="flights",initialQuery:d="",initialCabin:u="economy"}=e,b=(0,i.useRouter)(),[g,v]=(0,s.useState)(o),[E,I]=(0,s.useState)(!1),[W,V]=(0,s.useState)(""),[O,G]=(0,s.useState)([]),[$,X]=(0,s.useState)(0),[Q,ee]=(0,s.useState)(null),[et,es]=(0,s.useState)({}),[el,ea]=(0,s.useState)(null),[eo,ec]=(0,s.useState)(null),[ed,eu]=(0,s.useState)(!!d.trim()),[ep,eh]=(0,s.use
1State)(""),[ex,em]=(0,s.useState)(null),[ef,eb]=(0,s.useState)(d),[eg,ev]=(0,s.useState)(L(u)),[ek,ey]=(0,s.useState)({adults:1,children:0,infants:0}),[ew,ej]=(0,s.useState)({}),[eN,e_]=(0,s.useState)(0),[eS,eC]=(0,s.useState)(2),[eM,eA]=(0,s.useState)({}),[eL,eE]=(0,s.useState)(!1),eB=(0,s.useRef)(0),eq=(0,s.useRef)(null),[eP,eF]=(0,s.useState)(!1),[eD,eI]=(0,s.useState)(null),[eU,eW]=(0,s.useState)(25),[eH,eT]=(0,s.useState)(""),[eR,eV]=(0,s.useState)(()=>({flights:C(f.flights),trains:C(f.trains),buses:C(f.buses),hotels:C(f.hotels),yachts:C(f.yachts),events:C(f.events),experiences:C(f.experiences)})),eO=(0,s.useCallback)(async function(e){var t,r,n,i,s,l,a,o,d,u,p;let h=!(arguments.length>1)||void 0===arguments[1]||arguments[1],x=arguments.length>2?arguments[2]:void 0,m=arguments.length>3?arguments[3]:void 0,f=e.trim();if(!f&&!m)return;let g=x||eg;eb(f||String((null==m||null==(t=m.parsed)?void 0:t._raw_query)||"")),eu(!0),eh(""),eA({}),ej({}),eF(!0),eI(null),eW(25),null==(r=eq.current)||r.abort();let k=new AbortController;eq.current=k,h&&f&&b.replace("/search?q=".concat(encodeURIComponent(f),"&cabin=").concat(encodeURIComponent(g)));try{let e=await c({query:f||String((null==m||null==(n=m.parsed)?void 0:n._raw_query)||""),limit:80,cabin:g,clarify_answer:null==m?void 0:m.answer,parsed_context:null==m?void 0:m.parsed},{onMeta:e=>{e.cached_at&&eI(e.cached_at),e.from_cache&&eF(!1)},onResults:e=>{eu(!1),e.mode_payloads&&ec(e.mode_payloads),ea(t=>{var r;let n=e.parsed||(null==t?void 0:t.parsed)||{},i=e.mode||(null==t?void 0:t.mode)||"flights";return{status:"ok",query:f||String((null==m||null==(r=m.parsed)?void 0:r._raw_query)||(null==t?void 0:t.query)||""),parsed:n,suggested_modes:e.suggested_modes||(null==t?void 0:t.suggested_modes),mode:i,assistant_reply:e.assistant_reply||(null==t?void 0:t.assistant_reply)||"",meta:e.meta||(null==t?void 0:t.meta)||"",results:e.results||(null==t?void 0:t.results)||[],mode_payloads:e.mode_payloads||(null==t?void 0:t.mode_payloads)}})},onDone:e=>{e.cached_at&&eI(e.cached_at),eF(!1)}},k.signal);if("clarify"===e.status){em({query:e.query,parsed:e.parsed}),ea(e),ec(null);let t=y(e.mode);"flights"===t||"trains"===t?v("trains"===t?"trains":"flights"):t&&v(t);return}if(em(null),ea(e),ec(e.mode_payloads||null),e.cached_at&&eI(e.cached_at),ev(L("string"==typeof(null==(i=e.parsed)?void 0:i.cabin)?e.parsed.cabin:g)),"flights"===e.mode&&(null==(s=e.parsed)?void 0:s.date)){let t=String(e.parsed.date),r=(null==(a=e.mode_payloads)||null==(l=a.flights)?void 0:l.results)||e.results;r.length&&ej(e=>({...e,[t]:r}))}if(e.mode_payloads){let t=y(e.mode);v("trains"===t||"buses"===t?t:"flights")}else"flights"===e.mode||"trains"===e.mode?v("trains"===e.mode?"trains":"flights"):"buses"===e.mode?v("buses"):"hotels"===e.mode?v("hotels"):"experiences"===e.mode?v("experiences"):"events"===e.mode?v("events"):"yachts"===e.mode&&v("yachts")}catch(t){let e="object"==typeof t&&t&&"response"in t&&(null==(d=t.response)||null==(o=d.data)?void 0:o.detail)?(null==(p=t.response)||null==(u=p.data)?void 0:u.detail)||"Could not complete live search":t instanceof Error?t.message:"Could not complete live search";ea(null),ec(null),eh(e)}finally{eu(!1),eF(!1)}},[b,eg]),ez=(0,s.useMemo)(()=>{if(eP)return"Prices live";var e=null!=eD?eD:null==el?void 0:el.cached_at;if(!e)return"Prices live";let t=Math.max(0,Math.floor((Date.now()-1e3*e)/6e4));if(t<1)return"Обновлено только что";if(1===t)return"Обновлено 1 мин назад";if(t<60)return"Обновлено ".concat(t," мин назад");let r=Math.floor(t/60);return 1===r?"Обновлено 1 ч назад":"Обновлено ".concat(r," ч назад")},[null==el?void 0:el.cached_at,eD,eP]);(0,s.useEffect)(()=>{let e=d.trim();e&&(null==el?void 0:el.query)!==e&&eO(e,!1,L(u))},[u,d,null==el?void 0:el.query,eO]),(0,s.useEffect)(()=>{let e=document.body.style.overflow,t=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",()=>{document.documentElement.style.overflow=t,document.body.style.overflow=e}},[]),(0,s.useEffect)(()=>{(null==el?void 0:el.parsed)&&(ey({adults:Number(el.parsed.passengers)||1,children:Number(el.parsed.children)||0,infants:Number(el.parsed.infants)||0}),D(String(el.parsed.date||""))&&(e_(0),eC(2)))},[null==el?void 0:el.parsed]);let eY=(0,s.useMemo)(()=>{var e,t,r,n;let i="string"==typeof(null==el||null==(e=el.parsed)?void 0:e.date)?el.parsed.date:"";return r=(i?ew[i]:void 0)||(null==eo||null==(t=eo.flights)?void 0:t.results)||(null==el?void 0:el.results)||[],n=null==el?void 0:el.parsed,r.filter(e=>{let t=e.offer_id||e.id||"";return""!==t&&(t.startsWith("mfy_")||"mystifly"===e.source)}).map((e,t)=>{var r,i;let s=e.offer_id||e.id||"",l=(e.stop_details||[]).length?e.stop_details||[]:(e.stops||0)>0?[{code:"LAY",name:"Connection details unavailable",arr:"",dep:"",wait:"".concat(e.stops," stop").concat(1===e.stops?"":"s")}]:[],a=e.baggages||[],o=a.some(e=>k(e.type).includes("carry")),c=a.some(e=>k(e.type).includes("checked"));return{best:+(0===t),co:e.airline_code||(null==(r=e.airline)?void 0:r.slice(0,2).toUpperCase())||"FL",name:e.airline||"Flight",logoSrc:q(e.airline_code||(null==(i=e.airline)?void 0:i.slice(0,2).toUpperCase())||"FL"),fn:e.flight_number||"",dep:M(e.departure),arr:M(e.arr
1ival),dc:e.origin_code||"---",ac:e.destination_code||"---",dur:e.duration||"",stops:l,pr:B(e.price,e.currency),pp:P(n),cl:A(eg||e.cabin),bookingHref:"/booking/flight/".concat(encodeURIComponent(s)),priceValue:e.price||0,durationMinutes:"number"==typeof e.duration_minutes?e.duration_minutes:_(e.duration||""),departureMinutes:j(M(e.departure)),arrivalMinutes:j(M(e.arrival)),carryOnIncluded:o,checkedBagIncluded:c,departureHint:function(e,t){let r=(e.origin_code||"").toUpperCase(),n=(e.requested_origin||("string"==typeof(null==t?void 0:t.origin_iata)?t.origin_iata:"")||"").toUpperCase();if(e.alternate_departure||r&&n&&r!==n)return e.departure_airport_label?"Аэропорт рядом \xb7 ".concat(e.departure_airport_label):"Аэропорт рядом \xb7 ".concat(r)}(e,n),arrivalHint:function(e,t){let r=(e.destination_code||"").toUpperCase(),n=(e.requested_destination||("string"==typeof(null==t?void 0:t.destination_iata)?t.destination_iata:"")||"").toUpperCase();if(e.alternate_arrival||r&&n&&r!==n)return e.arrival_airport_label?"Аэропорт рядом \xb7 ".concat(e.arrival_airport_label):"Аэропорт рядом \xb7 ".concat(r)}(e,n)}})},[ew,null==el?void 0:el.parsed,null==el?void 0:el.results,null==eo||null==(t=eo.flights)?void 0:t.results,eg]),eG=(0,s.useMemo)(()=>((null==el?void 0:el.results)||[]).filter(e=>!!e.id).map((e,t)=>({feat:+(0===t),type:e.stars?"".concat(e.stars,"★ Hotel"):"Hotel",nm:e.name||"Hotel",loc:e.location||"",dc:e.cancellation||"Live hotel availability",tags:[e.meal&&"nomeal"!==e.meal?e.meal:"",e.stars?"".concat(e.stars," stars"):"","Live rate"].filter(Boolean),pr:B(e.price,e.currency),un:"/stay",rt:((e.stars&&e.stars>0?e.stars:e.rating)||0).toFixed(1),img:e.image||"",bdg:0===t?"Live":"",detailHref:"/hotel/".concat(encodeURIComponent(e.id)),bookingHref:"/booking/hotel/".concat(encodeURIComponent(e.id)),priceValue:e.price||0,ratingValue:(e.stars&&e.stars>0?e.stars:e.rating)||0,starValue:e.stars||0})),[null==el?void 0:el.results]),eJ="string"==typeof(null==el||null==(r=el.parsed)?void 0:r.date)?el.parsed.date:"",e$=Number(null==el||null==(l=el.parsed)?void 0:l.passengers)||1,eK=(0,s.useMemo)(()=>{var e;return e=(null==el?void 0:el.results)||[],e.filter(e=>!!e.product_code).map((e,t)=>({feat:+(0===t),type:e.confirmation_type||"Experience",nm:e.title||"Experience",loc:"Bookable activity",dc:e.description||"Live experience availability",tags:[e.duration_minutes?"".concat(e.duration_minutes," min"):"",...(e.flags||[]).slice(0,2)].filter(Boolean),pr:B(e.price,e.currency),un:"/option",rt:(e.rating||0).toFixed(1),img:e.image||"",bdg:0===t?"Live":"",detailHref:"/experience/".concat(encodeURIComponent(e.product_code)),bookingHref:"/booking/experience/".concat(encodeURIComponent(e.product_code),"?date=").concat(encodeURIComponent(eJ),"&passengers=").concat(e$),priceValue:e.price||0,ratingValue:e.rating||0}))},[null==el?void 0:el.results,eJ,e$]),eX=!!(ef.trim()||d.trim()||el),eQ=ed&&!el&&eX,eZ="hotels"===g||"yachts"===g||"events"===g||"experiences"===g,e0="flights"===g||"trains"===g||"buses"===g,e1=function(e){if(!e)return!1;if(e.transport_context||e.mode_payloads)return!0;let t=e.suggested_modes||[];return t.includes("flights")&&t.includes("trains")&&t.includes("buses")}(el),e2=(0,s.useMemo)(()=>e0&&(null==eo?void 0:eo[g])||null,[g,eo,e0]),e5=(0,s.useMemo)(()=>{var e;if(ed&&eX)return{...m[g],q:ef||(null==el?void 0:el.query)||d||m[g].q,ai:"Updating live results…",meta:"Loading live inventory…"};if(ep&&eX)return{...m[g],q:(null==el?void 0:el.query)||ef||d,ai:ep,meta:"Live search error"};if(!el)return{...m[g],q:"",ai:h,meta:""};if("clarify"===el.status)return{...m[y(el.mode)||g],q:el.query||ef||d,ai:el.assistant_reply,meta:el.meta};if(e1&&e2)return{...m[g],q:el.query,ai:e2.assistant_reply,meta:e2.meta};let t=y(el.mode)||el.mode;if(g===t)return{...m[g],q:el.query,ai:el.assistant_reply,meta:el.meta};if(null==(e=el.suggested_modes)?void 0:e.includes(g)){if("experiences"===t&&"events"===g)return{...m.events,q:el.query,ai:"This request sounds like planning leisure in the city, so events are also relevant here. Live event inventory is not connected yet, so experiences are shown as the primary live feed.",meta:"Events \xb7 API coming soon"};if("events"===t&&"experiences"===g)return{...m.experiences,q:el.query,ai:"This request also fits bookable city experiences and tours. Experiences are shown as a related category for this leisure query.",meta:"Experiences \xb7 related category"}}return{...m[g],q:el.query||"",ai:"",meta:""}},[e2,eX,d,e1,ep,ed,el,g,ef]),e3=(0,s.useMemo)(()=>{var e;if(!el)return Object.keys(m);if(e1)return["flights","trains","buses"];
1if(null==(e=el.suggested_modes)?void 0:e.length)return el.suggested_modes;let t=y(el.mode);return"flights"===t||"trains"===t?["flights","trains","buses"]:"buses"===t?["buses","flights","trains"]:"hotels"===t?["hotels"]:"experiences"===t?["experiences"]:"events"===t?["events"]:"yachts"===t?["yachts"]:Object.keys(m)},[e1,el]),e8=f[g],e4=eR[g],e6=(0,s.useCallback)(e=>{eV(t=>({...t,[g]:e(t[g])}))},[g]),e7=(0,s.useCallback)((e,t)=>{e6(r=>({...r,sortIndex:{...r.sortIndex,[e]:t}}))},[e6]),e9=(0,s.useCallback)((e,t)=>{e6(r=>({...r,optionState:{...r.optionState,[e]:(r.optionState[e]||[]).map((e,r)=>r===t?!e:e)}}))},[e6]),te=(0,s.useCallback)((e,t)=>{e6(r=>({...r,rangeState:{...r.rangeState,[e]:t}}))},[e6]),tt=e5.chips[$]||"All",tr=(0,s.useMemo)(()=>{if(!e0||eQ||(null==el?void 0:el.status)==="clarify")return[];if(e2){var e,t;return"flights"===g?eY:(e=e2.results,t=null==el?void 0:el.parsed,e.map((e,r)=>{var n,i;let s=e.stop_details||[],l=Number(null!=(i=null!=(n=e.stops)?n:s.length)?i:0),a=s.length>0?s:l>0?[{code:"LAY",name:"Connection",arr:"",dep:"",wait:"".concat(l," stop").concat(1===l?"":"s")}]:[];return{best:+(0===r),co:String(e.airline_code||e.carrier_code||e.co||"TR").slice(0,3).toUpperCase(),name:String(e.airline||e.carrier||e.operator||"Carrier"),logoSrc:q(String(e.airline_code||e.carrier_code||"")),fn:String(e.flight_number||e.train_number||e.fn||""),dep:M(String(e.departure||e.dep||"")),arr:M(String(e.arrival||e.arr||"")),dc:String(e.origin_code||e.origin||"
1---"),ac:String(e.destination_code||e.destination||"---"),dur:String(e.duration||e.dur||""),stops:a,pr:B(Number(e.price)||0,String(e.currency||"EUR")),pp:P(t),cl:A(eg||String(e.cabin||e.fare_type||e.cl||"standard")),bookingHref:void 0,priceValue:Number(e.price)||0,durationMinutes:"number"==typeof e.duration_minutes?Number(e.duration_minutes):_(String(e.duration||"")),departureMinutes:j(M(String(e.departure||""))),arrivalMinutes:j(M(String(e.arrival||""))),carryOnIncluded:!0,checkedBagIncluded:!0}}))}return[]},[e2,eQ,eY,el,g,eg,e0]),tn=(0,s.useMemo)(()=>e0?function(e,t){let{mode:r,activeChipLabel:n,sections:i,filterState:s,selectedCabin:l}=t,a=e=>ei(i,s.optionState,e),o=e.filter(e=>{var t,i,o,c,d;let u=null!=(t=e.priceValue)?t:N(e.pr),p=null!=(i=e.departureMinutes)?i:j(e.dep),h=null!=(o=e.arrivalMinutes)?o:j(e.arr),x=e.stops.length,m=null==(c=e.carryOnIncluded)||c,f=null==(d=e.checkedBagIncluded)||d,b=[e.name,e.cl,e.fn,e.co,...e.amenities||[]].join(" "),g=a("Stops");if(g&&g.selected.length!==g.total&&(0===g.selected.length||!g.selected.some(e=>"Direct"===e?0===x:"1 stop"===e?1===x:"2+ stops"===e&&x>=2)))return!1;let v="buses"===r?"Price":"Price per person";if(void 0!==s.rangeState[v]&&u>s.rangeState[v])return!1;let k=a("Departure");if(k&&k.selected.length!==k.total&&(0===k.selected.length||!k.selected.some(e=>e.includes("Morning")?p>=360&&p<720:e.includes("Afternoon")?p>=720&&p<1080:e.includes("Evening")?p>=1080:!e.includes("Night")||p>=1080||p<360))||"flights"===r&&!S(e.cl,l))return!1;if("trains"===r){let t=a("Cabin class");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.some(t=>S(e.cl,t))))return!1}if("flights"===r){let t=a("Airlines");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.some(t=>w(e.name,[t]))))return!1;let r=a("Baggage");if(r&&r.selected.length!==r.total&&(0===r.selected.length||!r.selected.every(e=>"Carry-on included"===e?m:"Checked bag included"!==e||f)))return!1}if("buses"===r){let t=a("Amenities");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.every(e=>w(b,[e,e.replace(" on board","")]))))return!1;let r=a("Operator");if(r&&r.selected.length!==r.total&&(0===r.selected.length||!r.selected.some(t=>w(e.name,[t]))))return!1}if("All"!==n&&("flights"===r&&("Direct only"===n&&0!==x||"Morning dep."===n&&!(p>=360&&p<720)||"Evening arr."===n&&h<1080||"Under $900"===n&&u>900)||"trains"===r&&("Direct"===n&&0!==x||"Morning"===n&&!(p>=360&&p<720)||"Afternoon"===n&&!(p>=720&&p<1080)||"1st class"===n&&!w(e.cl,["premier","business","first"]))||"buses"===r&&("Direct"===n&&0!==x||"With WiFi"===n&&!w(b,["wifi"])||"Night bus"===n&&!(p>=1080||p<360)||"Under \xa330"===n&&u>30)))return!1;return!0}),c=s.sortIndex["Sort by"]||0;return[...o].sort((e,t)=>{var r,n,i,s,l,a;let o=null!=(r=e.priceValue)?r:N(e.pr),d=null!=(n=t.priceValue)?n:N(t.pr),u=null!=(i=e.durationMinutes)?i:_(e.dur),p=null!=(s=t.durationMinutes)?s:_(t.dur),h=null!=(l=e.departureMinutes)?l:j(e.dep),x=null!=(a=t.departureMinutes)?a:j(t.dep);return 1===c?o-d:2===c?u-p:3===c?h-x:(e.best?-1e3:0)+o+u+120*e.stops.length-((t.best?-1e3:0)+d+p+120*t.stops.length)})}(tr,{mode:g,activeChipLabel:tt,sections:e8,filterState:e4,selectedCabin:eg}):[],[tt,e4,g,tr,eg,e8,e0]);(0,s.useEffect)(()=>{eW(25)},[$,e4,g,eg]),(0,s.useEffect)(()=>{if(!e0)return;let e=Math.max(0,tn.length-eU);e>0?eT("Показать ещё (".concat(e,")")):eT("")},[e0,tn.length,eU]);let ti=(0,s.useMemo)(()=>D(eJ)||new Date,[eJ]),ts=(0,s.useMemo)(()=>(function(e){let t=F(new Date),r=F(e);return Math.ceil((Math.round((t.getTime()-r.getTime())/864e5)+2)/5)})(ti),[ti]);(0,s.useEffect)(()=>{e_(e=>Math.max(e,ts))},[ts]);let tl=(0,s.useMemo)(()=>tn.slice(0,eU),[tn,eU]),ta=(0,s.useMemo)(()=>{let e=tn.map(e=>{var t;return null!=(t=e.priceValue)?t:N(e.pr)}).filter(e=>e>0);return e.length?Math.min(...e):null},[tn]),to=e0&&!!(eJ||eX),tc=(0,s.useCallback)(async()=>{if(!e0||"flights"!==g)return;let e=null==el?void 0:el.parsed;if(!(null==e?void 0:e.origin)||!(null==e?void 0:e.destination))return;let t=D(String(e.date||""))||new Date,r=Math.max(eN,ts),n=U(),i=T(t,r).filter(e=>e>=n),s=String(e.date||""),l=++eB.current;eE(!0);try{let t=await a.transportDatesBatch({parsed:{...e,cabin:eg},dates:i,skip_dates:s?[s]:[],limit:80});if(l!==eB.current)return;let r={...t.prices},n={};for(let[e,i]of Object.entries(t.dates)){let t=i.results||[];n[e]=t,r[e]="number"==typeof i.price&&i.price>0?i.price:null}eA(e=>({...e,...r})),Object.keys(n).length&&ej(e=>({...e,...n}))}catch(e){if(l!==eB.current)return}finally{l===eB.current&&eE(!1)}},[eN,ts,null==el?void 0:el.parsed,g,eg,e0]);(0,s.useEffect)(()=>{to&&(null==el?void 0:el.status)==="ok"&&tc()},[null==el?void 0:el.status,tc,to]),(0,s.useEffect)(()=>{eJ&&null!=ta&&eA(e=>({...e,[eJ]:ta}))},[eJ,ta]),(0,s.useEffect)(()=>
1{if(!eJ)return;let e=D(eJ);if(!e)return;let t=T(e,Math.max(eN,ts)).indexOf(eJ);t>=0&&eC(t)},[eJ,eN,ts]);let td=(0,s.useMemo)(()=>!eZ||eQ?[]:(null==el?void 0:el.mode)==="hotels"&&"hotels"===g?eG:(null==el?void 0:el.mode)==="experiences"&&"experiences"===g?eK:[],[eQ,eK,eG,null==el?void 0:el.mode,g,eZ]),tu=(0,s.useMemo)(()=>eZ?function(e,t){let{mode:r,activeChipLabel:n,sections:i,filterState:s}=t,l=e=>ei(i,s.optionState,e),a=e.filter(e=>{var t,i,a,o,c,d;let u=null!=(t=e.priceValue)?t:N(e.pr),p=null!=(i=e.ratingValue)?i:Number.parseFloat(e.rt||"0")||0,h=e.starValue||(w(e.type,["5★","5 star"])?5:w(e.type,["4★","4 star"])?4:p>=9.4?5:p>=8.8?4:3),x=[e.type,e.nm,e.loc,e.dc,...e.tags||[]].join(" "),m=null!=(o=null!=(a=e.guestCapacity)?a:function(e){let t=e.match(/(\d+)\s*guests?/);return t?Number(t[1]):null}(x))?o:0,f=null!=(d=null!=(c=e.lengthFeet)?c:function(e){let t=e.match(/(\d+)\s*(?:ft|foot)/i);if(t)return Number(t[1]);let r=e.match(/(\d+)\s*m\b/i);if(r)return Math.round(3.281*Number(r[1]));let n=e.match(/\b(\d{2,3})\b/);return n?Number(n[1]):null}("".concat(e.nm," ").concat(e.dc)))?d:0,b="hotels"===r?"Price / night":"yachts"===r?"Price per day":"Price";if(void 0!==s.rangeState[b]&&u>s.rangeState[b])return!1;if("hotels"===r){let e=l("Property type");if(e&&e.selected.length!==e.total&&(0===e.selected.length||!e.selected.some(e=>w(x,[e]))))return!1;let t=l("Amenities");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.every(e=>w(x,[e]))))return!1;let r=l("Star rating");if(r&&r.selected.length!==r.total&&(0===r.selected.length||!r.selected.some(e=>e.startsWith(String(h)))))return!1;let n=l("Guest rating");if(n&&n.selected.length!==n.total&&(0===n.selected.length||!n.selected.some(e=>e.startsWith("9")&&p>=9||e.startsWith("8")&&p>=8)))return!1}if("yachts"===r){let e=l("Vessel type");if(e&&e.selected.length!==e.total&&(0===e.selected.length||!e.selected.some(e=>w(x,[e]))))return!1;let t=l("Crew");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.every(e=>w(x,[e,e.replace(" included",""),e.replace(" available","")])))||void 0!==s.rangeState["Length (ft)"]&&f>s.rangeState["Length (ft)"])return!1;let r=l("Max guests");if(r&&r.selected.length!==r.total&&(0===r.selected.length||!r.selected.some(e=>"Up to 6"===e?m>0&&m<=6:"Up to 10"===e?m>0&&m<=10:"10+"!==e||m>=10)))return!1}if("events"===r){let e=l("Event type");if(e&&e.selected.length!==e.total&&(0===e.selected.length||!e.selected.some(e=>w(x,[e]))))return!1;let t=l("Price type");if(t&&t.selected.length!==t.total){if(0===t.selected.length)return!1;let e=u<=0||w(x,["free"]);if(!t.selected.some(t=>"Free"===t?e:!e))return!1}}if("experiences"===r){let e=l("Activity type");if(e&&e.selected.length!==e.total&&(0===e.selected.length||!e.selected.some(e=>w(x,[e]))))return!1;let t=l("Guest rating");if(t&&t.selected.length!==t.total&&(0===t.selected.length||!t.selected.some(e=>e.startsWith("9")&&p>=9||e.startsWith("8")&&p>=8)))return!1}if("All"!==n&&("hotels"===r&&!w(x,[n.replace("5-star","5")])&&!("5-star"===n&&h>=5)||"yachts"===r&&("Under €1,200/day"===n&&u>1200||!["All","Under €1,200/day"].includes(n)&&!w(x,[n]))||"events"===r&&("Free"===n&&!(u<=0||w(x,["free"]))||!["All","Free"].includes(n)&&!w(x,[n.slice(0,-1),n]))||"experiences"===r&&!w(x,[n])))return!1;return!0}),o=s.sortIndex["Sort by"]||0;return[...a].sort((e,t)=>{var n,i,s,l;let a=null!=(n=e.priceValue)?n:N(e.pr),c=null!=(i=t.priceValue)?i:N(t.pr),d=null!=(s=e.ratingValue)?s:Number.parseFloat(e.rt||"0")||0,u=null!=(l=t.ratingValue)?l:Number.parseFloat(t.rt||"0")||0;if("hotels"===r){if(0===o)return u-d;if(1===o)return a-c}else if("yachts"===r){if(1===o)return a-c;if(2===o)return u-d}else if("events"===r){if(1===o)return a-c}else if("experiences"===r){if(0===o)return u-d;if(1===o)return a-c}return t.feat-e.feat||u-d||a-c})}(td,{mode:g,activeChipLabel:tt,sections:e8,filterState:e4}):[],[tt,e4,g,td,e8,eZ]),tp=(0,s.useMemo)(()=>{if(!eX)return h;if(e0){if((null==e2?void 0:e2.assistant_reply)&&0===tr.length)return e2.assistant_reply.replace(/<[^>]+>/g,"");if(tr.length>0&&0===tn.length)return"No results match the current filters.";if(e1&&0===tr.length)return"No live results for this transport mode on this route yet."}if(eZ){if((null==el?void 0:el.mode)==="experiences"&&"events"===g)return"This leisure query also maps to events, but the live events provider is not connected yet.";if(td.length>0&&0===tu.length)return"No results match the current filters.";if((null==el?void 0:el.mode)===g&&0===td.length)return"No live results were found for this request."}return""},[null==e2?void 0:e2.assistant_reply,eX,e1,null==el?void 0:el.mode,g,tr.length,td.length,e0,tn.length,eZ,tu.length]);(0,s.useEffect)(()=>{G(eX?[{kind:"user",text:e5.q},{kind:"assistant",text:e5.ai}]:[{kind:"assistant",text:e5.ai}]),X(0),es({})},[e5.ai,e5.q,g,eX]),(0,s.useEffect)(()=>(document.body.style.overflow=E||Q?"hidden":"",()=>{document.body.style.overflow=""}),[E,Q]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&I(!1),"Enter"===e.key&&document.activeElement===document.getElementById("fuIn")&&th()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)});let th=()=>{let e=W.trim();e&&(V(""),eO(e))},tx=e=>{ev(e);let t=((null==el?void 0:el.query)||ef||d).trim();t&&eO(t,!0,e)},tm=(0,s.useCallback)((e,t)=>{let r=null==el?void 0:el.parsed,n=new URLSearchParams;r&&(n.set("adults",String(Number(r.passengers)||1)),n.set("children",String(Number(r.children)||0)),n.set("infants",String(Number(r.infants)||0))),t&&t.price>0&&n.set("lp",String(t.price));let i=n.toString();b.push(i?"".concat(e,"?").concat(i):e)},[null==el?void 0:el.parsed,b]),tf=(0,s.useCallback)((e,t)=>{if(e<U())return;ej(r=>({...r,[e]:t})),ea(r=>{var n;if(!r)return r;let i=null==(n=(r.meta||"").split("\xb7").slice(-1)[0])?void 0:n.trim(),s=t.some(e=>e.alternate_departure||e.alternate_arrival),l=t.length?"".concat(t.length," flights").concat(s?" \xb7 nearby airports":"").concat(i?" \xb7 ".concat(i):""):r.meta,a={...r.parsed,date:e},o=r.mode_payloads?{...r.mode_payloads,flights:{...r.mode_payloads.flights||{mode:"flights",assistant_reply:r.assistant_reply,meta:l,results:[]},results:t,meta:l}}:r.mode_payloads;return{...r,parsed:a,results:t,meta:l,mode_payloads:o}});let r=t.map(e=>e.price||0).filter(e=>e>0);r.length&&eA(t=>({...t,[e]:Math.min(...r)}))},[]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(J,{query:e5.q,onOpenDrawer:()=>I(!0)}),(0,n.jsx)(Y,{open:E,onClose:()=>I(!1),children:(0,n.jsx)(z,{sections:e8,sortIndex:e4.sortIndex,optionState:e4.optionState,rangeState:e4.rangeState,onSortChange:e7,onOptionToggle:e9,onRangeChange:te,selectedCabin:"flights"===g?eg:void 0,onCabinChange:"flights"===g?tx:void 0,showPassengers:e0,sidebarPax:ek,onSidebarPaxChange:e
1y})}),(0,n.jsxs)("div",{className:"fixed inset-x-0 bottom-0 top-[58px] flex",children:[(0,n.jsxs)("aside",{className:"hidden h-full w-[272px] shrink-0 flex-col overflow-hidden border-r border-i08 bg-white desk:flex",children:[(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-5 pt-6 [&::-webkit-scrollbar-thumb]:rounded-xs [&::-webkit-scrollbar-thumb]:bg-i08 [&::-webkit-scrollbar]:w-[3px]",children:(0,n.jsx)(z,{sections:e8,sortIndex:e4.sortIndex,optionState:e4.optionState,rangeState:e4.rangeState,onSortChange:e7,onOptionToggle:e9,onRangeChange:te,selectedCabin:"flights"===g?eg:void 0,onCabinChange:"flights"===g?tx:void 0,showPassengers:e0,sidebarPax:ek,onSidebarPaxChange:ey})}),(0,n.jsxs)("div",{className:"flex shrink-0 flex-col gap-2.5 border-t border-i08 bg-white px-4 py-3.5",children:[(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center justify-center gap-[7px] rounded-sm bg-ink p-2.5 text-sm font-medium text-white transition-opacity hover:opacity-75",onClick:()=>{var e;if(I(!1),null==(e=document.querySelector(".main"))||e.scrollTo({top:0,behavior:"smooth"}),e0&&(null==el?void 0:el.parsed)){let e=el.parsed,t={adults:Number(e.passengers)||1,children:Number(e.children)||0,infants:Number(e.infants)||0};(ek.adults!==t.adults||ek.children!==t.children||ek.infants!==t.infants)&&eO(H(e,el.query||ef||d,{pax:ek}),!0,eg)}},children:[(0,n.jsx)("svg",{"aria-hidden":"true",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round"})}),"Apply filters"]}),(0,n.jsx)("button",{type:"button",className:"w-full rounded-sm border border-i08 p-[7px] text-xs text-i50 transition-colors hover:border-i30 hover:text-ink",onClick:()=>{if(X(0),eW(25),eV(e=>({...e,[g]:C(f[g])})),"flights"===g){ev("economy");let e=((null==el?void 0:el.query)||ef||d).trim();e&&eO(e,!0,"economy")}},children:"Reset all"}),(0,n.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,n.jsx)("a",{href:"/",className:"font-serif text-[0.95rem] tracking-tight text-ink opacity-55 transition-opacity hover:opacity-100",children:"Wayly"}),(0,n.jsxs)("button",{type:"button",className:"group relative flex h-[30px] w-[30px] items-center justify-center rounded-full border border-i08 bg-white text-i50 transition-[border-color,color,box-shadow] hover:border-i30 hover:text-ink hover:shadow-[0_2px_8px_rgba(0,0,0,.07)]","aria-label":"Support",children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,n.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",strokeLinecap:"round"}),(0,n.jsx)("circle",{cx:"12",cy:"17",r:".5",fill:"currentColor",stroke:"none"})]}),(0,n.jsx)("span",{className:"pointer-events-none absolute bottom-[calc(100%+7px)] right-0 translate-y-[3px] whitespace-nowrap rounded-sm bg-ink px-[9px] py-1 font-sans text-[0.66rem] text-white opacity-0 transition-[opacity,transform] duration-150 after:absolute after:right-2.5 after:top-full after:border-4 after:border-transparent after:border-t-ink after:content-[''] group-hover:translate-y-0 group-hover:opacity-100",children:"Contact support"})]})]})]})]}),(0,n.jsxs)("main",{className:"flex h-full min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden bg-bg",children:[(0,n.jsxs)("div",{className:"mx-auto w-full max-w-[720px] flex-1 px-6 pb-4 pt-8 max-desk:px-4 max-desk:pb-3 max-desk:pt-5",children:[(0,n.jsx)(p,{messages:O,clarifyText:ex&&(null==el?void 0:el.status)==="clarify"?el.assistant_reply.replace(/\*\*/g,""):null,onClarifyAnswer:e=>{ex&&eO(ex.query,!1,eg,{answer:e,parsed:ex.parsed})},loading:eQ}),!eQ&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-4 flex gap-1.5 overflow-x-auto py-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:e3.map(e=>(0,n.jsx)("button",{type:"button",className:"shrink-0 whitespace-nowrap rounded-full border px-3.5 py-[5px] text-xs transition-colors ".concat(e===g?"border-ink bg-ink text-white":"border-i08 bg-white text-i50 shadow-[0_1px_3px_rgba(0,0,0,.04)] hover:border-i30 hover:text-ink"),onClick:()=>v(e),children:x[e]},e))}),(0,n.jsx)("div",{className:"mb-3.5 flex gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:e5.chips.map((e,t)=>(0,n.jsx)("button",{type:"button",className:"inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-full border px-3 py-1 text-xs transition-colors ".concat($===t?"border-ink bg-ink text-white":"border-i08 bg-white text-ink shadow-[0_1px_3px_rgba(0,0,0,.04)] hover:border-i30"),onClick:()=>X(t),children:e},e))}),to&&(0,n.jsx)("div",{className:"mb-1",children:(0,n.jsx)(R,{baseDate:ti,offsetPages:eN,minOffsetPages:ts,todayIsoStr:U(),activeIndex:eS,pricesByDate:eM,loading:eL,currency:"EUR",onPrev:()=>e_(e=>Math.max(ts,e-1)),onNext:()=>e_(e=>e+1),onSelect:(e,t)=>
1{if(!(t<U())){if(eC(e),(null==el?void 0:el.parsed)&&String(el.parsed.date||"")!==t){if(Object.prototype.hasOwnProperty.call(ew,t))return void tf(t,ew[t]||[]);eO(H(el.parsed,el.query||ef||d,{date:t,pax:ek}),!0,eg)}}}})}),(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between px-0.5 text-xs text-i50",children:[(0,n.jsx)("span",{children:e5.meta}),(0,n.jsx)("span",{className:"text-[0.72rem] ".concat(eP?"text-ok":"text-i30"),children:ez})]}),e0&&eP&&0===tn.length&&(0,n.jsx)(Z,{}),e0&&(tn.length>0?(0,n.jsx)(er,{mode:g,results:tl,totalCount:tn.length,loadMoreLabel:eH,onLoadMore:()=>eW(e=>Math.min(e+25,tn.length)),openStops:et,onToggleStops:e=>es(t=>({...t,[e]:!t[e]})),onSelect:e=>{ee(e)}}):(0,n.jsx)("div",{className:"rounded-md border border-i08 bg-white px-5 py-[22px] text-sm font-light leading-relaxed text-i50",children:tp||"No results in this category yet."})),eZ&&(tu.length>0?(0,n.jsx)(en,{results:tu,onDetails:e=>{e.detailHref&&b.push(e.detailHref)},onBook:e=>{if(e.bookingHref){if(e.bookingHref.includes("/booking/flight/mfy_"))return void tm(e.bookingHref,{price:e.priceValue||0,currency:"EUR"});b.push(e.bookingHref)}}}):(0,n.jsx)("div",{className:"rounded-md border border-i08 bg-white px-5 py-[22px] text-sm font-light leading-relaxed text-i50",children:tp||"No results in this category yet."}))]})]}),(0,n.jsx)("div",{className:"sticky bottom-0 mx-auto w-full max-w-[720px] self-center bg-gradient-to-t from-bg from-70% to-transparent px-6 py-5 max-desk:px-4 max-desk:pb-4 max-desk:pt-3",children:(0,n.jsxs)("div",{className:"flex items-center gap-2.5 rounded-[14px] border border-i15 bg-white py-2.5 pl-[18px] pr-2.5 shadow-[0_2px_16px_rgba(0,0,0,.07),0_8px_32px_rgba(0,0,0,.05)] transition-[border-color,box-shadow] focus-within:border-i30 focus-within:shadow-[0_4px_24px_rgba(0,0,0,.1),0_1px_4px_rgba(0,0,0,.04)]",children:[(0,n.jsxs)("svg",{"aria-hidden":"true",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",className:"shrink-0 text-i30",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7.5"}),(0,n.jsx)("path",{d:"m20 20-4-4",strokeLinecap:"round"})]}),(0,n.jsx)("input",{id:"fuIn",className:"min-w-0 flex-1 border-none bg-transparent text-sm font-light text-ink outline-none placeholder:text-i30",value:W,onChange:e=>V(e.target.value),placeholder:e5.ph}),(0,n.jsxs)("button",{type:"button",className:"flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-[10px] bg-ink px-[18px] py-2.5 text-[0.8rem] font-medium text-white transition-opacity hover:opacity-75",onClick:th,children:["Search",(0,n.jsx)("svg",{"aria-hidden":"true",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M5 12h14M13 6l6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})})]})]}),(0,n.jsx)(K,{ticket:Q,onClose:()=>ee(null),onCreateProfile:()=>{ee(null),b.push("/auth/register")},onBookManually:()=>{let e=null==Q?void 0:Q.bookingHref;if(ee(null),e){if("flights"===g&&e.includes("/booking/flight/mfy_"))return void tm(e,{price:(null==Q?void 0:Q.priceValue)||0,currency:"EUR"});b.push(e)}}})]})}},9136:(e,t,r)=>{Promise.resolve().then(r.bind(r,6729))}}]);

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.