PageSourceSearch

https://travelscanner.ai/assets/Hotels-y5OrU2Cg.js

js travelscanner.ai collected 2026-10-05 14:06:35 UTC 101,385 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MapAside-7UuH3ite.js","assets/main-kBzK4eIG.js","assets/vendor-primevue-CeEACqX_.js","assets/vendor-primevue-z0I5QTct.css","assets/vendor-fontawesome-CHTXNQM2.js","assets/vendor-luxon-D-syak89.js","assets/vendor-i18n-G4dYfk6F.js","assets/vendor-pako-DwGzBETv.js","assets/vendor-posthog-B2YXpdD_.js","assets/vendor-query-B7KhvNMU.js","assets/main-x_rp7B12.css","assets/vendor-mapbox-BajM9YZy.js","assets/vendor-mapbox-Bjlwf8hR.css","assets/bunny-BFgfExvG.js","assets/index-QyT8flm0.js","assets/NewHotelCard-DiSQ_Wka.js","assets/ImageWithFallback-raoQ1sx0.js","assets/ImageWithFallback-CllQnTmb.css","assets/rateLabels-BuXyiow2.js","assets/HotelCardImage-DEtelr5M.js","assets/NoHotelImage-Bo4zjMQU.js","assets/HotelCardImage-2hfM1_bi.css","assets/AlternativeRoomDates-Bs7qvvqB.js","assets/AlternativeRoomDates-kH8Se71-.css","assets/PerksSection-C3ODrFYJ.js","assets/PerksSection-km3LqWze.css","assets/LoyaltyLabelBanner-b4_DrhEs.js","assets/LoyaltyLabelBanner-4gHgBHln.css","assets/chevron-right-6aEiQEcc.js","assets/utensils-BqRf34se.js","assets/NewHotelCard-BKKKW4I9.css","assets/MapAside-C2Ub915m.css"])))=>i.map(i=>d[i]);
2import{v as Ae,di as rs,dj as El,h as F,T as ws,dk as Ol,p as Al,dl as Vt,f as jl,b6 as Nl,dm as Cl,dn as Ml,dp as Ul,c4 as wl,bd as It,cj as el,dq as nl,dr as rl,e as ye,t as Tl,af as zl,ds as Ke,dt as Ql,du as Wl,dv as Wt,P as os,dw as ul,dx as cl,cQ as St,bf as Qt,dy as dl,d1 as Gl,m as ns,dz as Kl,dA as Jl,dB as pl,ck as Yl,c3 as hl,n as Zs,I as Hl,dC as mt,dD as Zl,ak as Xl,ab as ea,dE as ta,dF as sa,dG as vl,dH as la,dI as Ks,dJ as aa,at as ia,aE as oa,ac as na,_ as ra,dK as ua,bj as ca,bC as da}from"./main-kBzK4eIG.js";import{d as Ce,c as ee,z as u,F as G,V as ve,f as T,u as e,Z,C as n,A as i,r as c,w as X,E as L,O as S,au as Ll,K as Ye,b as tl,Q as pa,H as ha,aa as va,o as sl,N as K,G as ue,S as ne,L as qe,D as ge,a4 as fa,ab as Xs,P as xl,n as Je,av as ma,U as ga,a9 as Fs,aj as ya,i as As,W as Ut,M as fl,R as ba,a7 as _a}from"./vendor-primevue-CeEACqX_.js";import{u as De}from"./vendor-i18n-G4dYfk6F.js";import{S as ka}from"./SliderInput-CPn03W9v.js";import{s as Ia}from"./urgencyMessageUtils-BpdTDxvy.js";import{D as kt}from"./vendor-luxon-D-syak89.js";import{c as ml,S as gl,g as yl,m as Sa,u as Fa,i as Aa,a as bl,N as Ca}from"./NewHotelCard-DiSQ_Wka.js";import{s as Re}from"./socket-D7UBviuq.js";import"./vendor-posthog-B2YXpdD_.js";import"./ImageWithFallback-raoQ1sx0.js";import"./HotelCardImage-DEtelr5M.js";import{g as Ma}from"./AlternativeRoomDates-Bs7qvvqB.js";import"./PerksSection-C3ODrFYJ.js";import"./LoyaltyLabelBanner-b4_DrhEs.js";import{u as wa,M as Ta}from"./usePaymentBottomSheet-DyS6bAyk.js";import Ha from"./HotelAiSearch-DOwGCn-r.js";import{j as La}from"./vendor-query-B7KhvNMU.js";import"./vendor-fontawesome-CHTXNQM2.js";import"./vendor-pako-DwGzBETv.js";import"./rateLabels-BuXyiow2.js";import"./NoHotelImage-Bo4zjMQU.js";import"./chevron-right-6aEiQEcc.js";import"./utensils-BqRf34se.js";import"./vendor-socket-YTJ-CyAn.js";import"./bunny-BFgfExvG.js";const xa={class:"filters-skeleton-container"},$a={class:"filter-skeleton-items"},Ra=Ce({__name:"FiltersSkeleton",props:{filterCount:{default:6},itemsPerFilter:{default:4}},setup(g){const R=g,y=(v,b)=>`${Math.floor(Math.random()*(b-v+1))+v}%`,r=ee(()=>Array.from({length:R.filterCount},()=>({titleWidth:y(20,40),items:Array.from({length:R.itemsPerFilter},()=>({labelWidth:y(30,80)}))})));return(v,b)=>(i(),u("div",xa,[(i(!0),u(G,null,ve(r.value,(m,C)=>(i(),u("div",{key:C,class:"filter-skeleton-group"},[T(e(Z),{width:m.titleWidth,height:"18px",class:"filter-skeleton-title"},null,8,["width"]),n("div",$a,[(i(!0),u(G,null,ve(m.items,(x,q)=>(i(),u("div",{key:q,class:"filter-skeleton-item"},[T(e(Z),{width:"20px",height:"20px",borderRadius:"4px",class:"filter-skeleton-checkbox"}),T(e(Z),{width:x.labelWidth,height:"16px",class:"filter-skeleton-label"},null,8,["width"])]))),128))])]))),128))]))}}),_l=Ae(Ra,[["__scopeId","data-v-b652ee4d"],["__file","FiltersSkeleton.vue"]]),Va={key:0,class:"flex select-none flex-grow-1 flex-column checkbox-title p-filters"},Pa={class:"label"},qa={key:0,class:"flex checkbox p-filters"},Da=["for","data-testid"],Ba=Ce({__name:"CheckboxInput",props:{name:{},filterData:{},attribute:{},sourceId:{},disabled:{type:Boolean,default:!1},translateLabel:{type:Boolean,default:!0},dataTestId:{}},emits:["change"],setup(g,{emit:R}){const{t:y}=De(),r=R,v=g,b=ee({get:()=>v.attribute?.value||v.attribute||[],set:H=>{r("change",H)}}),m=v.filterData,C=c(9),x=c(m.values&&m.values.length>C.value),q=c(!1),M=()=>m.name&&!m.name.includes("filters.")?m.name:y(`filters.${m.query}.label`);return X(()=>m.values,()=>{x.value=m.values&&m.values.length>C.value}),(H,k)=>(i(),u(G,null,[e(m).values&&e(m).values.length?(i(),u("div",Va,[n("span",Pa,[n("b",null,L(M()),1)])])):S("",!0),(i(!0),u(G,null,ve(e(m).values,(_,J)=>(i(),u(G,{key:_.value},[C.value>J||q.value||_.checked?(i(),u("div",qa,[T(e(Ll),{modelValue:b.value,"onUpdate:modelValue":k[0]||(k[0]=W=>b.value=W),inputId:v.sourceId+v.name+J,name:String(_.value),value:_.value,checked:_.checked,disabled:H.disabled},null,8,["modelValue","inputId","name","value","checked","disabled"]),n("label",{for:v.sourceId+v.name+J,class:"checkbox-label","data-testid":H.dataTestId},L(H.translateLabel?e(y)(`filters.${e(m).query}.values.${_.label}`):_.label),9,Da)])):S("",!0)],64))),128)),x.value?(i(),u("a",{key:1,class:"show-all",onClick:k[1]||(k[1]=Ye(_=>q.value=!q.value,["prevent"])),href:"#"},L(q.value?e(y)(`filters.${e(m).query}.showLess`):e(y)(`filters.${e(m).query}.showAllNumber`,{number:e(m).values?.length})),1)):S("",!0)],64))}}),Ms=Ae(Ba,[["__scopeId","data-v-1a67662c"],["__file","CheckboxInput.vue"]]),Ea={class:"flex flex-grow-1 flex-column select-none input-label"},Oa={class:"label"},ja={class:"flex align-names-center inputtext"},Na=Ce({__name:"TextBoxInput",props:{name:{},filterData:{},attribute:{},sourceId:{}
2,preserveDuringLoading:{type:Boolean,default:!0},filtersLoading:{type:Boolean,default:!1},dataTestId:{}},emits:["change"],setup(g,{expose:R,emit:y}){const{t:r}=De(),v=y,b=g,m=c(b.attribute||""),C=b.filterData;let x,q;X(()=>b.attribute,k=>{b.preserveDuringLoading&&b.filtersLoading&&m.value&&!k||(m.value=k||"",q=void 0)});const M=k=>{m.value=k||"",q=k,clearTimeout(x),x=setTimeout(()=>{v("change",k),q=void 0},800)},H=()=>{m.value="",q=void 0,clearTimeout(x)};return tl(()=>{q!==void 0&&v("change",q),clearTimeout(x)}),R({clear:H}),(k,_)=>(i(),u(G,null,[n("div",Ea,[n("span",Oa,[n("b",null,L(e(r)(`filters.${e(C).query}.label`)),1)])]),n("div",ja,[T(e(pa),{modelValue:m.value,"onUpdate:modelValue":[_[0]||(_[0]=J=>m.value=J),M],placeholder:e(r)(`filters.${e(C).query}.placeholder`),class:"inputtext-box","data-testid":k.dataTestId},null,8,["modelValue","placeholder","data-testid"])])],64))}}),Ua=Ae(Na,[["__scopeId","data-v-3216f5fb"],["__file","TextBoxInput.vue"]]),za={class:"flex flex-grow-1 flex-column select-none input-label"},Qa={class:"label"},Wa={class:"flex align-names-center inputtext"},Ga=Ce({__name:"AutoCompleteInput",props:{name:{type:String,required:!0},filterData:{type:Object,required:!0},attribute:{type:String},sourceId:{type:String},names:{type:Array,required:!0},placeholder:{type:String},disabled:{type:Boolean,default:!1}},emits:["change"],setup(g,{expose:R,emit:y}){const{t:r}=De(),v=y,b=g,m=c(b.attribute||""),C=b.filterData,x=c(b.names||[]),q=c(b.disabled||!1);X(()=>b.disabled,_=>{q.value=_}),X(()=>b.attribute,()=>{m.value=b.attribute||""});const M=_=>{setTimeout(()=>{_.query.trim().length?x.value=b.names.filter(J=>J.toLowerCase().includes(_.query.toLowerCase())):x.value=[...b.names]},250)},H=_=>{m.value=_?.value||"",v("change",m.value)},k=()=>{m.value="",v("change",m.value)};return R({clear:k}),(_,J)=>(i(),u(G,null,[n("div",za,[n("span",Qa,[n("b",null,L(e(r)(`filters.${e(C).query}.label`)),1)])]),n("div",Wa,[T(e(ha),{modelValue:m.value,"onUpdate:modelValue":J[0]||(J[0]=W=>m.value=W),suggestions:x.value,onComplete:M,placeholder:g.placeholder,onItemSelect:H,onClear:k,forceSelection:!0,class:"inputtext-box",disabled:q.value,appendTo:"body",ref:"autoComplete"},null,8,["modelValue","suggestions","placeholder","disabled"])])],64))}}),Ka=Ae(Ga,[["__scopeId","data-v-05e7a346"],["__file","AutoCompleteInput.vue"]]),Ja={class:"flex flex-grow-1 flex-column select-none"},Ya={class:"label"},Za=["for"],Xa=Ce({inheritAttrs:!1,__name:"RadioInput",props:{name:{type:String,required:!0},filterData:{type:Object,required:!0},attribute:{type:Object},sourceId:{type:String},disabled:{type:Boolean,default:!1}},emits:["change"],setup(g,{emit:R}){const{t:y}=De(),r=R,v=g,b=c(v.attribute||1),m=v.filterData,C=c(v.disabled||!1);return X(()=>v.disabled,x=>{C.value=x}),X(()=>b.value,()=>{r("change",b.value)}),(x,q)=>(i(),u(G,null,[n("div",Ja,[n("span",Ya,[n("b",null,L(e(y)(`filters.${e(m).query}.label`)),1)])]),(i(!0),u(G,null,ve(e(m).values,(M,H)=>(i(),u("div",{key:M.value,class:"flex align-items-center radio"},[T(e(va),{modelValue:b.value,"onUpdate:modelValue":q[0]||(q[0]=k=>b.value=k),inputId:v.sourceId+v.name+H,name:e(m).name,value:M.value,onChange:q[1]||(q[1]=k=>r("change",b.value)),disabled:C.value},null,8,["modelValue","inputId","name","value","disabled"]),n("label",{for:v.sourceId+v.name+H,class:"radio-label"},L(e(y)(`filters.${e(m).query}.values.${M.label}`)),9,Za)]))),128))],64))}}),ei=Ae(Xa,[["__scopeId","data-v-3a01db60"],["__file","RadioInput.vue"]]),ti={key:1},si={key:0,class:"clear-filters"},li={key:1,style:{"margin-bottom":"10px",padding:"10px",background:"#f0f0f0","font-size":"12px"}},ai={key:2,class:"filters-loading","data-testid":"dynamic-filters-loading"},ii={class:"filters-loading-skeleton"},oi=Ce({__name:"NewFilters",props:{place:{},source:{},facilities:{},chains:{},hotelTypes:{},suburbs:{},roomAmenities:{},filtersLoading:{type:Boolean},sliderPriceRange:{}},emits:["change","reset"],setup(g,{emit:R}){const{t:y}=De(),r=ws(),v=c(!1),{visibleFilters:b,updateFilter:m,resetFilters:C,getFilterValue:x,getFilterDefinition:q,stars:M,price:H,hotelName:k,facilities:_,roomAmenities:J,chains:W,hotelTypes:fe,suburbs:B,mealPlans:V,ratings:se,popularFilters:ie,freeCancellation:Y,distance:Me}=rs(),$=g,_e=R,Qe=c(!1),Be=c(""),Ee=c([]),Ie=c(0),ce=c(!1),be=c(null);X(()=>$.filtersLoading,P=>{P?(ce.value=!0,je()):(ce.value=!1,be.value&&clearTimeout(be.value),be.value=setTimeout(()=>{Ze(),Ie.value++},100))}),X(()=>[$.facilities,$.chains,$.hotelTypes,$.suburbs,$.roomAmenities],()=>{!ce.value&&!$.filtersLoading&&(be.value&&clearTimeout(be.value),be.value=setTimeout(()=>{Ze(),Ie.value++},50))},{deep:!0}),X(()=>[$.place?.place_id,r.query.placeId,r.query.checkin,r.query.checkout],(P,A)=>{if(P[0]!==A?.[0]){ce.value=!0;const I=x("hotelName");je(),me(),I&&m("hotelName",I)}},{deep:!1});const je=()=>{["facilities","chains","hotelTypes","suburbs","roomAmenities"].forEach(A=>{const I=q(A);I&&(I.values=[])})},Ze=()=>{["facilities","chains","hotelTypes","suburbs","roomAmenities"].forEach(A=>{const I=q(A),U=$[A];
2if(I&&Array.isArray(U)){const we=U.filter(Ne=>Ne.count>0).map(Ne=>({value:Ne.id||Ne.name,label:`${Ne.name} (${Ne.count})`,checked:!1}));I.values=we}})},He=ee(()=>ce.value||$.filtersLoading?b.value.filter(P=>!["facilities","chains","hotelTypes","suburbs","roomAmenities"].includes(P.id)):b.value.filter(P=>{if(P.id==="chains"){const A=El("chain-filter"),I=$.chains&&$.chains.length>0,U=O(P),we=U.values&&U.values.length>0;return A||I||we}if(P.id==="suburbs"){const A=$.suburbs&&$.suburbs.length>0,I=O(P),U=I.values&&I.values.length>0;return A||U}if(["facilities","roomAmenities","hotelTypes"].includes(P.id)){const A=$[P.id];if(Array.isArray(A)&&A.length===0)return!1}return!0})),w=P=>({facilities:_,roomAmenities:J,chains:W,hotelTypes:fe,suburbs:B,mealPlans:V,ratings:se,popularFilters:ie,freeCancellation:Y,distance:Me})[P]||c([]),E=c(new Map),le=P=>{if(!P||!Array.isArray(P))return[];const A=[];for(const I of P)I.count>0&&A.push({value:I.id||I.name,label:`${I.name} (${I.count})`,checked:!1});return A},O=P=>{let A=P.values||[],I=P.name;if(P.query==="distance"){const we=$.place?.structured_formatting?.main_text||$.place?.formatted_address?.split(",")[0]?.trim()||$.place?.description?.split(",")[0]?.trim();we&&(I=y("filters.distance.label",{cityName:we}))}const U=`${P.id}-${Ie.value}`;if(E.value.has(U)){const we=E.value.get(U);return{...P,name:I,values:we}}return P.id==="facilities"&&$.facilities?A=le($.facilities):P.id==="chains"&&$.chains?A=le($.chains):P.id==="hotelTypes"&&$.hotelTypes?A=le($.hotelTypes):P.id==="suburbs"&&$.suburbs?A=le($.suburbs):P.id==="roomAmenities"&&$.roomAmenities&&(A=le($.roomAmenities)),E.value.set(U,A),{...P,name:I,values:A}},re=P=>!["facilities","chains","hotelTypes","suburbs","roomAmenities"].includes(P),oe=ee(()=>He.value.reduce((P,A)=>{const I=x(A.id);return Array.isArray(I)?P+I.length:P+(I?1:0)},0)),me=async()=>{try{const P={placeId:$.place?.place_id||r.query.placeId||"",checkin:r.query.checkin||"",checkout:r.query.checkout||"",rooms:parseInt(r.query.rooms)||1,adults:parseInt(r.query.adults)||2,children:r.query.children||""},A=await Ol(P);Qe.value=!0,A.forEach(I=>{const U=q(I.query);U&&I.values&&(U.values=I.values)}),$.filtersLoading||(Ze(),ce.value=!1)}catch(P){Be.value=P.response?.data?.error||P.message,Qe.value=!0,ce.value=!1,console.error("Error loading filters:",P)}},Se=(P,A)=>{let I=A?.value!==void 0?A.value:A;Array.isArray(I)&&(I=[...I]),m(P,I);const U={[P]:I};Al(`search_filter_applied_${$.source||"hotels"}`,U),_e("change",{[P]:I})},Ve=()=>{C(),_e("reset")};return X(()=>Ie.value,()=>{E.value.clear()}),sl(()=>{me(),Ze()}),tl(()=>{be.value&&clearTimeout(be.value),E.value.clear()}),(P,A)=>!Qe.value&&!Be.value?(i(),K(_l,{key:0})):Qe.value&&!Be.value?(i(),u("div",ti,[!He.value.length&&($.filtersLoading||ce.value)?(i(),K(_l,{key:0})):He.value.length||$.filtersLoading?(i(),u(G,{key:1},[e(F).isMobile?S("",!0):(i(),u("div",si,[T(e(qe),{disabled:oe.value<1,severity:"secondary",onClick:Ye(Ve,["prevent"])},{default:ue(()=>[A[3]||(A[3]=n("i",{class:"pi pi-trash"},null,-1)),ne(" "+L(e(y)("filters.clear")),1)]),_:1},8,["disabled"])])),v.value?(i(),u("div",li,[A[4]||(A[4]=n("strong",null,"Debug Info:",-1)),A[5]||(A[5]=n("br",null,null,-1)),ne(" Place: "+L($.place?.description||"N/A"),1),A[6]||(A[6]=n("br",null,null,-1)),ne(" Visible Filters: "+L(He.value.map(I=>I.id).join(", ")),1),A[7]||(A[7]=n("br",null,null,-1)),ne(" Loading Dynamic: "+L(ce.value),1),A[8]||(A[8]=n("br",null,null,-1)),ne(" Props Loading: "+L($.filtersLoading),1),A[9]||(A[9]=n("br",null,null,-1)),ne(" Chains Data: "+L($.chains?.length||0)+" items",1),A[10]||(A[10]=n("br",null,null,-1)),ne(" Suburbs Data: "+L($.suburbs?.length||0)+" items",1),A[11]||(A[11]=n("br",null,null,-1)),ne(" Facilities Data: "+L($.facilities?.length||0)+" items",1),A[12]||(A[12]=n("br",null,null,-1)),ne(" Key: "+L(Ie.value),1)])):S("",!0),(i(!0),u(G,null,ve(He.value,I=>(i(),u("div",{key:["textbox","autoCompleteText"].includes(I.type)?I.id:`${I.id}-${Ie.value}`,class:"filter","data-testid":"filter-item"},[I.type==="checkbox"&&I.id==="stars"?(i(),K(Ms,{key:0,name:I.query,filterData:O(I),attribute:e(M),sourceId:$.source,dataTestId:"hotel-start-filter",onChange:A[0]||(A[0]=U=>Se("stars",U))},null,8,["name","filterData","attribute","sourceId"])):I.type==="slider"&&I.id==="price"?(i(),K(ka,{key:1,filterData:O(I),attribute:e(H),priceRange:$.sliderPriceRange,dataTestId:"price-filter",onChange:A[1]||(A[1]=U=>Se("price",U))},null,8,["filterData","attribute","priceRange"])):I.type==="textbox"&&I.id==="hotelName"?(i(),K(Ua,{key:2,name:I.query,filterData:O(I),attribute:e(k),sourceId:$.source,filtersLoading:$.filtersLoading||ce.value,dataTestId:"hotel-name-filter",onChange:A[2]||(A[2]=U=>Se("hotelName",U))},null,8,["name","filterData","attribute","sourceId","filtersLoading"])):I.type==="autoCompleteText"?(i(),K(Ka,{key:3,name:I.query,filterData:O(I),attribute:w(I.id),sourceId:$.source,placeholder:I.placeholder,names:Ee.value,onChange:U=>Se(I.id,U)},null,8,["name","filterData","attribute","sourceId","placeholder","names","onChange"])):I.type==="radio"?(i(),K(ei,{key:4,name:I.query,filterData:O(I),attribute:w(I.id),sourceId:$.source,onCh
2ange:U=>Se(I.id,U)},null,8,["name","filterData","attribute","sourceId","onChange"])):I.type==="checkbox"?(i(),K(Ms,{key:5,name:I.query,filterData:O(I),attribute:w(I.id),sourceId:$.source,translateLabel:re(I.id),onChange:U=>Se(I.id,U),dataTestId:"checkbox-input"},null,8,["name","filterData","attribute","sourceId","translateLabel","onChange"])):S("",!0)]))),128)),$.filtersLoading||ce.value?(i(),u("div",ai,[A[13]||(A[13]=n("h2",{class:"filters-loading-title"},"Loading more filters...",-1)),n("div",ii,[(i(),u(G,null,ve(5,I=>n("div",{key:I,class:"skeleton-row"},[T(e(Z),{shape:"rectangle",size:"20px",class:"skeleton-icon"}),T(e(Z),{width:"8rem",height:"20px",class:"skeleton-bar"})])),64))])])):S("",!0)],64)):S("",!0)])):S("",!0)}}),kl=Ae(oi,[["__scopeId","data-v-65a12842"],["__file","NewFilters.vue"]]),ni={class:"StickyPopularFilters__Content"},ri=["onClick"],ui={class:"StickyPopularFilters__Text"},ci=Ce({__name:"StickyPopularFilters",props:{loadResults:{},appliedFiltersCount:{default:0},onResetFilters:{},isVisible:{type:Boolean,default:!1}},setup(g){const R=g,{t:y}=De(),{popularFilters:r,updateFilter:v,filters:b}=rs(),m=c(0),C=ee(()=>{const q=r.value||[],M=b,H=["freeCancellation","parking","breakfastIncluded","swimmingPool","fitnessCenter","hotels","apartments"];return Vt.filter(k=>H.includes(k.popularFilterValue)).sort((k,_)=>{const J=H.indexOf(k.popularFilterValue),W=H.indexOf(_.popularFilterValue);return J-W}).map(k=>{const _=q.includes(k.popularFilterValue);let J=!1;const W=M[k.targetFilter];return Array.isArray(W)?Array.isArray(k.targetValue)?J=k.targetValue.some(fe=>W.includes(fe)):J=W.includes(k.targetValue):W===k.targetValue&&(J=!0),{filter:k.popularFilterValue,label:k.label,isActive:_||J,targetFilter:k.targetFilter,facilityId:k.targetFilter==="facilities"?k.targetValue:void 0}})});X(()=>r.value,()=>{m.value++},{deep:!0,immediate:!0});const x=async q=>{const M=r.value||[],H=M.includes(q);let k;H?k=M.filter(_=>_!==q):k=[...M,q],v("popularFilters",k),R.loadResults(),window.scrollTo({top:0,behavior:"smooth"})};return(q,M)=>(i(),u("div",{class:ge(["StickyPopularFilters",{"StickyPopularFilters--visible":q.isVisible}]),key:m.value},[M[0]||(M[0]=n("div",{class:"StickyPopularFilters__Header"},[n("h4",null,"Popular filters")],-1)),n("div",ni,[(i(!0),u(G,null,ve(C.value,H=>(i(),u("div",{key:`${H.label}-${H.isActive}`,class:"StickyPopularFilters__FilterItem"},[T(e(Ll),{"model-value":H.isActive,"onUpdate:modelValue":k=>x(H.filter),binary:!0,class:"StickyPopularFilters__Checkbox"},null,8,["model-value","onUpdate:modelValue"]),n("label",{class:"StickyPopularFilters__Label",onClick:k=>x(H.filter)},[n("span",ui,L(e(y)(`filters.popularFilters.values.${H.label}`)||H.label),1)],8,ri)]))),128))])],2))}}),di=Ae(ci,[["__scopeId","data-v-def7dfbc"],["__file","StickyPopularFilters.vue"]]),pi=async(g,R)=>{if(!g.length)return new Map;const{data:y}=await jl.post("/affiliate-offers",{ids:g,...R}),r=new Map;for(const v of y.offers??[])r.set(v.id,{url:v.url,currency:v.currency,total:v.total,provider:v.provider});return r},hi="SEARCH_TOO_BROAD",vi=(g,R)=>{g.value=R.errorCode===hi},Cs=(g,R)=>{g.value=!1,R()},fi=g=>g<=0?null:g>=1e4?"10000+":g,mi=async(g,R=Nl)=>{try{const r=(await R(g))?.[0];return r?.place_id?{placeId:r.place_id,name:r.structured_formatting?.main_text||r.description||g}:null}catch{return null}},gi=["checkin","checkout","rooms","adults","children","occupancies","currency"],yi=(g,R)=>{const y={};return gi.forEach(r=>{g[r]!==void 0&&(y[r]=g[r])}),{...y,placeId:R.placeId,name:R.name}},bi={class:"flex select-none flex-grow-1 flex-column sort-section",style:{height:"0rem"}},_i={class:"label"},ki={class:"flex align-items-center dropdown"},Ii={key:0,class:"flex align-items-baseline justify-content-center w-full"},Si={key:0,class:"label"},Fi={key:1,class:"label"},Ai={key:1},Ci={key:0,class:"pi pi-check"},Mi=Ce({__name:"DropdownInput",props:{name:{type:String},filterData:{type:Object,required:!0},attribute:{type:Number},sourceId:{type:String},distanceDescription:{type:String,required:!1,default:""}},emits:["change"],setup(g,{emit:R}){const{t:y}=De(),r=R,v=g,b=ee(()=>v.filterData.values?.map(M=>({...M,label:y(`sort.filters.${M.label}`)}))||[]),m=ee(()=>v.distanceDescription==="center"?b.value:v.distanceDescription?b.value.map(M=>M.value===6?{...M,label:y("sort.filters.distanceFrom",{location:v.distanceDescription})}:M):b.value),C=ee(()=>({...v.filterData,values:m.value})),x=c(v.attribute||1),q=M=>{const H=m.value.find(k=>k.value===M);return H?H.label:""};return X(()=>x.value,()=>{r("change",x.value)}),X(()=>v.attribute,()=>{x.value=v.attribute||1}),(M,H)=>(i(),u(G,null,[n("div",bi,[n("span",_i,L(C.value.name),1)]),n("div",ki,[T(e(fa),{modelValue:x.value,"onUpdate:modelValue":H[0]||(H[0]=k=>x.value=k),options:C.value.values,optionValue:"value",optionLabel:"label",placeholder:e(y)("sort.placeholder"),class:"dropdown-box sort-dropdown-custom",pt:{panel:{class:"sort-dropdown-panel-custom"}}},{value:ue(k=>[k.value?(i(),u("div",Ii,[H[1]||(H[1]=n("i",{class:"mr-2 pi pi-sort-alt"},null,-1)),e(F).isMobile?(i(),u("p",Fi,L(e(y)("sort.labelShort")),1)):(i(),u("p",Si,L(e(y)("sort.label"))+": "+L(e(y)(q(k.value))),1))])):(i(),u("span",Ai,L(k.placeholder),1))]),option:ue(k=>[n("div",{class:ge(["dropdown-item",{selected:k.option.value===x.value}])},[n("span",null,L(k.option.label),1),k.option.value===x.value?(i(),u("i",Ci)):S("",!0)],2)]),_:1},8,["modelValue","options","placeholder"])])],64))}}),Il=Ae(Mi,[["__scopeId","data-v-a7b3c0c7"],["__file","DropdownInput.vue"]]),wi={class:"group"},Ti=Ce({__name:"ActionButtons",props:{buttons:{type:Array},loading:{type:Boolean,default:!1},loadingLabel:{type:String,default:"Loading..."}},setup(g){const R=g,y=r=>{R.loading||r()};return(r,v)=>(i(),u("div",wi,[(i(!0),u(G,null,ve(R.buttons,b=>(i(),K(e(qe),{key:b.label,label:b.label,disabled:R.loading,onClick:m=>y(b.click),class:ge(["btn",{"btn-loading":R.loading}])},{default:ue(()=>[R.loading?(i(),u(G,{key:0},[v[0]||(v[0]=n("i",{class:"pi pi-spinner pi-spin"}
2,null,-1)),ne(" "+L(g.loadingLabel),1)],64)):(i(),u(G,{key:1},[n("i",{class:ge(`pi pi-${b.icon}`)},null,2),ne(" "+L(b.label),1)],64))]),_:2},1032,["label","disabled","onClick","class"]))),128))]))}}),Hi=Ae(Ti,[["__scopeId","data-v-0816fbbb"],["__file","ActionButtons.vue"]]),Li=Ce({__name:"CustomToggle",props:{modelValue:{type:Boolean},options:{}},emits:["update:modelValue"],setup(g,{emit:R}){const y=g,r=R;function v(m){r("update:modelValue",m)}const b=()=>{y.modelValue?v(!1):v(!0)};return(m,C)=>(i(),u("div",{class:"CustomToggle",onClick:b,"data-testid":"toggle-button"},[(i(!0),u(G,null,ve(m.options,x=>(i(),u("div",{key:String(x.value),class:ge(["CustomToggle__Btn",{"CustomToggle__Btn--active":m.modelValue===x.value}])},[x.icon?(i(),K(Xs(x.icon),{key:0,class:"CustomToggle__Icon"})):S("",!0),n("span",null,L(x.label),1)],2))),128))]))}}),$l=Ae(Li,[["__scopeId","data-v-cc50d04e"],["__file","CustomToggle.vue"]]),xi={key:0,class:"filters-list--toggle flex align-items-center justify-content-center ml-4"},$i=Ce({__name:"LayoutToggle",props:{modelValue:{type:Boolean,default:!1},hideInMapView:{type:Boolean,default:!1},isMapView:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(g,{emit:R}){const y=g,r=R,{t:v}=De(),b=c(y.modelValue),m=ee(()=>v("layout.list")),C=ee(()=>v("layout.map")),x=[{value:!1,label:m,icon:Cl},{value:!0,label:C,icon:Ml}],q=M=>{b.value=M,r("update:modelValue",M)};return X(b,M=>{r("update:modelValue",M)}),X(()=>y.modelValue,M=>{b.value=M}),(M,H)=>!M.hideInMapView||!M.isMapView?(i(),u("div",xi,[T($l,{modelValue:b.value,"onUpdate:modelValue":[H[0]||(H[0]=k=>b.value=k),q],options:x},null,8,["modelValue"])])):S("",!0)}}),Ri=Ae($i,[["__file","LayoutToggle.vue"]]),Vi={class:"PopularFilters__Inner"},Pi=["aria-label","onClick"],qi={key:6,class:"PopularFilters__BtnCross"},Di=["aria-label"],Bi=Ce({__name:"PopularFilters",props:{loadResults:{},appliedFiltersCount:{default:0},onResetFilters:{}},setup(g){const R=g,{t:y}=De(),{popularFilters:r,updateFilter:v,filters:b}=rs(),m=c(0),C=ee(()=>{const M=r.value||[],H=b,k=["fourToFiveStars","freeCancellation","parking","breakfastIncluded","swimmingPool","fitnessCenter","hotels","apartments"];return Vt.filter(_=>k.includes(_.popularFilterValue)).sort((_,J)=>{const W=k.indexOf(_.popularFilterValue),fe=k.indexOf(J.popularFilterValue);return W-fe}).map(_=>{const J=M.includes(_.popularFilterValue);let W=!1;const fe=H[_.targetFilter];return Array.isArray(fe)?Array.isArray(_.targetValue)?W=_.targetValue.some(B=>fe.includes(B)):W=fe.includes(_.targetValue):fe===_.targetValue&&(W=!0),{filter:_.popularFilterValue,label:_.label,isActive:J||W,targetFilter:_.targetFilter,facilityId:_.targetFilter==="facilities"?_.targetValue:void 0}})});X(()=>r.value,()=>{m.value++},{deep:!0,immediate:!0});const x=async M=>{const H=r.value||[],k=H.includes(M);let _;k?_=H.filter(J=>J!==M):_=[...H,M],v("popularFilters",_),R.loadResults()},q=()=>{R.onResetFilters&&R.onResetFilters()};return(M,H)=>{const k=xl("font-awesome-icon");return i(),u("div",{class:"PopularFilters",key:m.value},[n("div",Vi,[(i(!0),u(G,null,ve(C.value,_=>(i(),u("div",{key:`${_.label}-${_.isActive}`,class:ge(["PopularFilters__Btn",{"PopularFilters__Btn--active":_.isActive}]),"aria-label":_.label,onClick:J=>x(_.filter)},[_.filter==="fourToFiveStars"?(i(),K(Ul,{key:0,class:"PopularFilters__BtnIcon"})):S("",!0),_.facilityId&&_.targetFilter==="facilities"?(i(),K(k,{key:1,icon:e(Ma)(_.facilityId),class:"PopularFilters__BtnIcon"},null,8,["icon"])):S("",!0),_.filter==="freeCancellation"?(i(),K(k,{key:2,icon:["fal","undo"],class:"PopularFilters__BtnIcon"})):S("",!0),_.filter==="breakfastIncluded"?(i(),K(k,{key:3,icon:["fal","coffee"],class:"PopularFilters__BtnIcon"})):S("",!0),_.filter==="hotels"?(i(),K(k,{key:4,icon:["fal","building"],class:"PopularFilters__BtnIcon"})):S("",!0),_.filter==="apartments"?(i(),K(k,{key:5,icon:["fal","home"],class:"PopularFilters__BtnIcon"})):S("",!0),n("span",null,L(e(y)(`filters.popularFilters.values.${_.label}`)),1),_.isActive?(i(),u("span",qi)):S("",!0)],10,Pi))),128)),M.appliedFiltersCount>0?(i(),u("div",{key:0,class:"PopularFilters__Btn PopularFilters__Btn--clear",onClick:q,"aria-label":e(y)("filters.clear")},[H[0]||(H[0]=n("i",{class:"pi pi-trash"},null,-1)),n("span",null,L(e(y)("filters.clear")),1)],8,Di)):S("",!0)])])}}}),Ei=Ae(Bi,[["__scopeId","data-v-957308a2"],["__file","PopularFilters.vue"]]),Oi=[{key:"paris",query:"Paris"},{key:"london",query:"London"},{key:"rome",query:"Rome"},{key:"barcelona",query:"Barcelona"},{key:"amsterdam",query:"Amsterdam"}],ji={class:"search-too-broad"},Ni={class:"content"},Ui={class:"suggestions-label"},zi={class:"chips"},Qi=["disabled","aria-busy","onClick"],Wi={key:0,class:"pi pi-spin pi-spinner","aria-hidden":"true"},Gi={key:0,class:"lookup-error",role:"alert"},Ki=Ce({__name:"SearchTooBroad",props:{pendingQuery:{},lookupFailed:{type:Boolean}},emits:["select"],setup(g,{emit:R}){const{t:y}=De(),r=R;return(v,b)=>(i(),u("div",ji,[b[0]||(b[0]=n("div",{class:"image-container"},[n("img",{src:wl,alt:""})],-1)),n("div",Ni,[n("h5",null,L(e(y)("hotels.searchTooBroadTitle")),1),n("p",null,L(e(y)("hotels.searchTooBroadMessage")),1),n("span",Ui,L(e(y)("hotels.searchTooBroadSuggestionsLabel")),1),n("div",zi,[(i(!0),u(G,null,ve(e(Oi),m=>(i(),u("button",{key:m.key,type:"button",class:"chip",disabled:!!v.pendingQuery,"aria-busy":v.pendingQuery===m.query,onClick:C=>r("select",m.query)},[v.pendingQuery===m.query?(i(),u("i",Wi)):S("",!0),ne(" "+L(e(y)(`hotels.suggestedCities.${m.key}`)),1)],8,Qi))),128))]),v.lookupFailed?(i(),u("p",Gi,L(e(y)("hotels.searchTooBroadLookupFailed")),1)):S("",!0)])]))}}),Ji=Ae(Ki,[["__scopeId","data-v-b21d8510"],["__file","SearchTooBroad.vue"]]),zt=(g,R)=>{const y=R?.find(r=>String(r.id)===String(g));return y?y.name:"Unknown"},Js=(g,R,y)=>{if(g.includes("filters.price.values.")&&(g=g.replaceAll("filters.price.values.","")),g.includes("filters.facilities.values.")){const r=g.replace("filters.facilities.values.",""),v=parseInt(r,10),b=Vt.find(m=>m.targetFilter==="facilities"&&m.targetValue===v);if(b){const m=`filters.popularFilters.values.${b.label}`,C=R(m);
2g=C!==m?C:zt(v,y.data.facilities)}else g=zt(v,y.data.facilities)}if(g.includes("filters.chains.values.")){const r=g.replace("filters.chains.values.","");g=zt(parseInt(r),y.data.chains)}if(g.includes("filters.hotelTypes.values.")){const r=g.replace("filters.hotelTypes.values.",""),v=parseInt(r),b=Vt.find(m=>m.targetFilter==="hotelTypes"&&m.targetValue===v);b?g=R(`filters.popularFilters.values.${b.label}`):g=zt(v,y.data.hotelTypes)}if(g.includes("filters.suburbs.values.")){const r=g.replace("filters.suburbs.values.","");g=zt(r,y.data.suburbs)}if(g.includes("filters.roomAmenities.values.")){const r=g.replace("filters.roomAmenities.values.","");g=zt(parseInt(r),y.data.roomAmenities)}if(g.includes("filters.hotelName.values.")&&(g=g.replace("filters.hotelName.values.","")),g.includes("filters.distance.values.")){const r=g.replace("filters.distance.values.",""),v=parseInt(r);switch(v){case 1:g=R("filters.distance.values.lessThan1km");break;case 3:g=R("filters.distance.values.lessThan3km");break;case 5:g=R("filters.distance.values.lessThan5km");break;default:g=`Less than ${v} km`}}if(g.includes("filters.popularFilters.values.")){const r=g.replace("filters.popularFilters.values.",""),v=Vt.find(b=>b.popularFilterValue===r);v&&(g=R(`filters.popularFilters.values.${v.label}`))}if(g.includes("filters.mealPlans.values.")){const r=g.replace("filters.mealPlans.values.",""),v=Vt.find(b=>b.targetFilter==="mealPlans"&&b.targetValue===r);v&&(g=R(`filters.popularFilters.values.${v.label}`))}if(g.includes("filters.freeCancellation.values.")){const r=g.replace("filters.freeCancellation.values.",""),v=parseInt(r),b=Vt.find(m=>m.targetFilter==="freeCancellation"&&m.targetValue===v);b&&(g=R(`filters.popularFilters.values.${b.label}`))}return g};function Yi(g={listStabilityTopCount:10,listStabilityConsecutiveBatches:3}){const{listStabilityTopCount:R,listStabilityConsecutiveBatches:y}=g,r=It(),v=el(),{t:b}=De(),m=c(!1),C=ws(),x=ee(()=>C.query),q=nl(x.value),M=c(q.sessionId||q.trackingId||rl()||void 0);X(x,t=>{const f=nl(t);M.value=f.sessionId||f.trackingId||rl()||void 0},{deep:!0});const H=c(),k=c(""),_=c(""),J=c(!1),W=c(""),fe=c([]),V=c([]),se=c([]),ie=t=>({id:t.id,latitude:t.latitude,longitude:t.longitude,name:t.name,price:t.price,stars:t.stars,currency:t.currency}),Y=c(!1),Me=c(!1),$=c(hl.PRICE_ASC),_e=c(""),Qe=ye.project.settings?.enableAffiliateLinks===!0,Be=c(new Set),Ee=c(new Set);let Ie=null;const ce=c(0),be=c(null),je=c(null),Ze=3e4,He=c([]),w=c([]);let E=bl();const le=30,O=c(!1),re=c(!1);let oe="";const me=new Set(["requestId","sessionId","trackingId","adults","rooms"]),Se=t=>JSON.stringify(t,(f,p)=>me.has(f)||p==null||p===""||Array.isArray(p)&&!p.length?void 0:p);let Ve=null;X(re,t=>{Ve&&clearTimeout(Ve),t&&(Ve=setTimeout(()=>{P.value&&!O.value&&(O.value=!0)},8e3))});const P=c(!1),A=c(!1),I=c(!1),U=c(!1),we=c(null),Ne=c(!1),Pt=10,at=c(Pt),Le=c(0),ae=c(""),Xe=c(""),qt=c(1),it=c([]),Ft=Tl(),Gt=c([]),ot=c([]),pe=c(void 0),Ts=c(0),At=c(0),nt=c([]),gt=c({}),Ct=c([]),Kt=c([]),te=c([]),us=c(0),We=c(""),rt=c(),yt=c(null),N=c(!1),Dt=c(!0),et=c(!1),Mt=c({}),ut=c(!1),{appliedFilters:ct,removeFilter:Hs,activeFiltersCount:Bt,resetFilters:Jt,updateFilter:wt}=rs(),he=c([]),Pe=c(!1),Oe=ee(()=>F.isMobile?he.value:ct.value),Ls=ee(()=>F.isMobile?he.value.length:ct.value.length),Tt=[{id:[47,107,775],name:"WiFi available"},{id:[2,2083,2493,2742,46,52,161,184,180,181,162],name:"Parking"},{id:[301,104,120,194,103,197,193,196,192,122,832,830,835,833,837,631,630,941,781],name:"Swimming pool"},{id:[54,1814,236,244],name:"Spa/wellness center"},{id:[3],name:"Restaurant"},{id:[11,1725,757,492,942,723],name:"Fitness Center"},{id:[4,218],name:"Pets allowed"},{id:[149],name:"Adult only"}],cs=new Map,ds=(t,f)=>{if(!t||typeof t!="string"&&typeof t!="number")return console.warn("Invalid hotelId:",t),[];
2if(!Array.isArray(f))return console.warn("Invalid hotelFacilities:",f),[];const p=new Map;for(const h of Tt){if(!h||!h.name||h.id==null)continue;const D=Array.isArray(h.id)?h.id:[h.id];for(const Q of D)typeof Q=="number"&&p.set(Q,h.name)}const a=[],s=new Set;for(const h of f){if(!h||typeof h.id!="number")continue;const D=p.get(h.id);D&&!s.has(D)&&(a.push({id:h.id,name:D}),s.add(D))}if(a.length===0)return[];if(a.length<=2)return a;const l=[];for(let h=0;h<a.length;h++)for(let D=h+1;D<a.length;D++)l.push([a[h],a[D]]);const o=cs.get(t),d=l.filter(([h,D])=>{if(!o)return!0;const[Q,ke]=o;return!(h.name===Q.name&&D.name===ke.name||h.name===ke.name&&D.name===Q.name)}),j=d.length>0?d[Math.floor(Math.random()*d.length)]:l[Math.floor(Math.random()*l.length)];return cs.set(t,j),j},Te=ee(()=>{const t=fi(At.value);return t!==null?b("hotels.gettingBestDeals",{count:t.toLocaleString(F.language)}):b("hotels.gettingBestDealsNoCount")}),Ue=t=>{P.value=t},xe=()=>{be.value!==null&&(clearTimeout(be.value),be.value=null),je.value=null},Et=()=>{xe(),be.value=window.setTimeout(()=>{console.warn(`[HotelsList] Timeout: "complete" event not received for request ${_e.value} after ${Ze}ms since last rate. Auto-completing request.`),Ot(),xe()},Ze)},Ot=()=>{xe(),ce.value=Math.max(0,ce.value-1),ce.value===0&&Je(()=>{Ue(!1)})},dt=c(Array.isArray(C.query.name)?C.query.name[0]||"":C.query.name||""),Ge=ee(()=>ae.value?kt.fromJSDate(new Date(ae.value)).toFormat("LLL d"):""),pt=ee(()=>Xe.value?kt.fromJSDate(new Date(Xe.value)).toFormat("LLL d"):""),Ht=ee(()=>{const t=C.query.rooms,f=Array.isArray(t)?t[0]:t,p=parseInt(f,10)||zl.rooms;return`${p} ${p>1?b("occupancy.rooms"):b("occupancy.room")}`}),jt=(t,f=!1,p={})=>{p.suppressScroll&&(yt.value=t,N.value=!0,setTimeout(()=>{N.value=!1},100)),(p.isMapClick||f)&&(window._isMapSelectionInProgress=!0,setTimeout(()=>{window._isMapSelectionInProgress=!1},500));const a=yt.value!==null&&yt.value===t;We.value=t,rt.value=V.value.find(l=>l.id===t);const s=p.suppressScroll===!0||N.value;if(!a)if(f&&!F.isMobile&&!s){const l=V.value.findIndex(o=>o.id===t);if(l>0){const o=V.value[l];V.value.splice(l,1),V.value.unshift(o)}Je(()=>{St()})}else!f&&!F.isMobile&&Je(()=>{const l=document.querySelector(`#listcard-${t}`);l?l.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"}):ps(t)});a&&setTimeout(()=>{yt.value===t&&(yt.value=null)},0)},ps=t=>{const f=V.value.find(p=>p.id===t);if(f){const p=V.value.findIndex(a=>a.id===t);p>=at.value&&(at.value=Math.max(at.value,p+1),We.value=t,rt.value=f,Je(()=>{const a=document.querySelector(`#listcard-${t}`);a&&a.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}))}else{const p={id:t,name:`Hotel ${t}`,hotelDescription:"Virtual hotel from map",city:"Unknown",country:"Unknown",address:"Location from map",addressSuburb:"",latitude:0,longitude:0,zip:"",stars:0,main_photo:"",thumbnail:"",video:"",price:0,currency:"USD",ranking:0,checkinCheckoutTimes:{checkin:"15:00",checkout:"11:00"},hotelFacilities:[],distance:0,hasFreeCancellation:!1,bestSeller:!1,rating:0,reviewsCount:0,reviewSentiment:{pros:[],cons:[],categories:[]},soldOut:!1,score:0,suggestedSellingPrice:0,discount:0,mealPlans:[],mapped:!0,"accessibility.visuallyImpaired":!1,"accessibility.hearingImpaired":!1,"accessibility.manualWheelchair":!1,"accessibility.electricWheelchair":!1,"accessibility.wheelchairOrScooterImpaired":!1,"accessibility.crouchesCaneImpaired":!1,"accessibility.elderlyImpaired":!1,"accessibility.totalDisabilityScore":"0",topHotelFacilities:[],memberSavings:0,memberPrice:0,guestPrice:0};V.value.unshift(p),se.value.unshift(ie(p)),We.value=t,rt.value=p,Je(()=>{const a=document.querySelector(`#listcard-${t}`);a&&a.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})})}},xs=()=>{},$s=()=>{},$e=async(t,f=!1)=>{z.value=null,t=t||C.query;const p=t.placeId;C.query.placeId!==p&&(C.query.placeId=p),ae.value=t.checkin,Xe.value=t.checkout,qt.value=kt.fromISO(Xe.value).diff(kt.fromISO(ae.value),"days").days||1,it.value=Gl(ns(t.occupancies||""),t.children);const a=Fe=>Array.isArray(Fe)?Fe[0]||"":Fe||"",s=Fe=>{const lt=a(Fe);return lt?parseInt(lt,10):void 0},l=Wt.getAllFilters(),o=Kl.find(Fe=>Fe.code===F.currency),d=o?.min_price||0,j=o?.max_price||1e3,h=Array.isArray(l.price)&&l.price.length===0,D=h?void 0:l.price?.[0]!==void 0&&l.price[0]!==d?l.price[0]:s(t.min_price),Q=h?void 0:l.price?.[1]!==void 0&&l.price[1]!==j?l.price[1]:s(t.max_price),ke=l.ratings?.length>0?l.ratings.join(","):"",vt=l.mealPlans?.length>0?l.mealPlans.join(","):"",Ss=l.facilities?.length>0?l.facilities.join(","):"",ll=l.roomAmenities?.length>0?l.roomAmenities.join(","):"",Rl=l.chains?.length>0?l.chains.join(","):"",Vl=l.hotelTypes?.length>0?l.hotelTypes.join(","):"",Pl=l.suburbs?.length>0?l.suburbs.join(","):"",ql=l.stars?.length>0?l.stars.join(","):"",Dl=l.distance?.length>0?l.distance.join(","):"";$.value=v.sorting||s(t.sorting)||1,W.value=v.hotelName||l.hotelName||"",k.value=a(t.searchHotelName);const Bl=c(0);if(!p&&t.pool!=="nearby"){const Fe=ye?.project?.settings||{};if(Fe.hideHomePage)if(Fe.presetBundle==="voucherBudgetFocusMode"){_.value="Please provide a voucher co
2de to search for hotels.";return}else{const lt={...t,pool:"nearby",name:"Nearby"};"placeId"in lt&&delete lt.placeId,$e(lt);return}else{Ft.push({name:"home"});return}}const al=`Hotels${t.name?` in ${t.name}`:""} between ${kt.fromISO(ae.value).toFormat("dd MMM yyyy")} - ${kt.fromISO(Xe.value).toFormat("dd MMM yyyy")}`;dl(al,al),Bl.value=0;const de=es({query:t});W.value&&W.value!==""?(de.hotelName=W.value,delete de.highlightHotelId,delete de.searchHotelName,delete de.placeTypes,delete de.city):(de.stars=ql,de.distance=Dl,de.minPrice=D,de.maxPrice=Q,de.currencyMaxPrice=o?.max_price,de.ratings=ke,de.facilities=Ss,de.roomAmenities=ll,de.chains=Rl,de.hotelTypes=Vl,de.suburbs=Pl,de.mealPlans=vt,l.popularFilters?.length>0&&(de.popularFilters=l.popularFilters.join(",")),de.searchHotelName=k.value);const il=Se(de);if(P.value&&il===oe)return;oe=il,xe(),_e.value=Math.random().toString(36).substring(7),de.requestId=_e.value,Ue(!0),f&&(Dt.value=!0),_.value="",Nt.value=!1,E=bl(),O.value=!1,re.value=!1,at.value=Pt,xt(),await Je();const ol=W.value&&W.value!=="";let ft=t.highlightHotelId;if(!ft||ft.startsWith("google_")){const lt=It()?.highlightHotelId;lt&&!lt.startsWith("google_")&&!ol?ft=lt:ft=ol?null:t.bestMatchHotelId||null}if(ft){const Fe=It();Fe.highlightHotelId=ft,z.value=ft}else{const Fe=It();Fe&&(Fe.highlightHotelId=null)}if(ft){const Fe={...de,hotelId:ft,limit:1};ce.value=2,Cs(J,()=>Re.emit("hotels:fetch-rates",Fe))}else ce.value=1;Cs(J,()=>Re.emit("hotels:fetch-rates",de)),Jl(de)},Rs=t=>{t.requestId===_e.value&&(xe(),t&&t.errorCode==="INVALID_PLACE"&&Ql(),vi(J,t||{}),_.value=J.value?"":t.error||t.message||"An error occurred",Ue(!1),Ot())},Yt=t=>{t.requestId===_e.value&&(t.facilities&&(Ct.value=t.facilities,v.data.facilities=t.facilities),t.roomAmenities&&(Kt.value=t.roomAmenities,v.data.roomAmenities=t.roomAmenities),t.chains&&(te.value=t.chains,v.data.chains=t.chains),t.hotelTypes&&(Gt.value=t.hotelTypes,v.data.hotelTypes=t.hotelTypes),t.suburbs&&(ot.value=t.suburbs,v.data.suburbs=t.suburbs.map(f=>({id:f.id,name:f.name,count:f.count||0}))),Dt.value=!1,Ne.value=!0)},Zt=t=>{if(t.requestId!==_e.value)return;xe(),Ue(!0),He.value=t.priceRange;const f=C.query.name===b("search.mapAreaLabel")&&r.hasDraggedMap,p=!!W?.value,a=!!k?.value,s=V.value.length>0;if(f||s){if(s&&!f){const l=t.bestMatchHotelId&&typeof t.bestMatchHotelId=="string"&&t.bestMatchHotelId.trim().length>0?t.bestMatchHotelId:null;if(!z.value&&l&&(z.value=l),z.value)if(p){const o=w.value.find(d=>d.id===z.value);o&&(o.isListHighlighted=!0)}else a&&Rt();if(ye.project.settings.highlightHotels||ye.project.settings.highlightHotelsPerks){const o=[],d=[];w.value.forEach(j=>{Qt(String(j.id),j?.perks)?o.push(j):d.push(j)}),o.length>0&&(w.value=[...o,...d])}st(),se.value=V.value.map(ie)}Mt.value=t.searchMetadata||{},ut.value=!1,Ot();return}if(V.value=[],se.value=[],w.value=[],Le.value=0,t.nearbyHotels&&t.nearbyHotels.length>0&&t.searchMetadata?.expandedSearchPerformed){const l=t.nearbyHotels,o=t.bestMatchHotelId&&typeof t.bestMatchHotelId=="string"&&t.bestMatchHotelId.trim().length>0?t.bestMatchHotelId:null;if(!z.value&&o&&(z.value=o),l.forEach(d=>ze(d,p)),p&&z.value){const d=w.value.find(j=>j.id===z.value);d&&(d.isListHighlighted=!0)}else a&&z.value&&Rt();if(ye.project.settings.highlightHotels||ye.project.settings.highlightHotelsPerks){const d=[],j=[];w.value.forEach(h=>{Qt(String(h.id),h?.perks)?d.push(h):j.push(h)}),d.length>0&&(w.value=[...d,...j])}st(),se.value=V.value.map(ie),Mt.value=t.searchMetadata,ut.value=!0}else if(t.compiledRateData&&t.compiledRateData.length>0){const l=t.compiledRateData,o=t.bestMatchHotelId&&typeof t.bestMatchHotelId=="string"&&t.bestMatchHotelId.trim().length>0?t.bestMatchHotelId:null;!z.value&&o&&(z.value=o);const d=z.value||o,j=d?l.find(h=>h.id===d):null;if(p?l.forEach(h=>ze(h,p)):j&&a?(ze(j,!1),l.forEach(h=>{h.id!==d&&ze(h,!1)})):l.forEach(h=>ze(h,p)),p&&z.value){const h=w.value.find(D=>D.id===z.value);h&&(h.isListHighlighted=!0)}else a&&z.value&&Rt();if(ye.project.settings.highlightHotels||ye.project.settings.highlightHotelsPerks){const h=[],D=[];w.value.forEach(Q=>
2{Qt(String(Q.id),Q?.perks)?h.push(Q):D.push(Q)}),h.length>0&&(w.value=[...h,...D])}st(),se.value=V.value.map(ie),ut.value=!1,Mt.value={}}else V.value=[],se.value=[],w.value=[],ut.value=!0,Mt.value=t.searchMetadata||{};Dt.value=!1,Ot()},Vs=()=>{Ft.replace({query:{...C.query,hotelName:W.value}})},Ps=()=>{if(!W.value||W.value===""){fe.value=[];return}fe.value=V.value.filter(t=>t.name.toLowerCase().includes(W.value.toLowerCase())),fe.value.length?Y.value=!0:Y.value=!1},qs=()=>{Jt(),F.isMobile&&(he.value=[],Pe.value=!0),$e()},Ds=()=>{he.value=[...ct.value],Pe.value=!1,$e()},Bs=()=>{F.isMobile&&he.value.length===0&&ct.value.length>0&&(he.value=[...ct.value])},Xt={mealPlans:{type:"string",prefix:"filters.mealPlans.values."},stars:{type:"string",prefix:"filters.stars.values."},suburbs:{type:"string",prefix:"filters.suburbs.values."},facilities:{type:"number",prefix:"filters.facilities.values."},hotelTypes:{type:"number",prefix:"filters.hotelTypes.values."},chains:{type:"number",prefix:"filters.chains.values."},roomAmenities:{type:"number",prefix:"filters.roomAmenities.values."},distance:{type:"number",prefix:"filters.distance.values."}},Lt=()=>{if(F.isMobile&&he.value.length>0){const t={};he.value.forEach(f=>{const p=Object.entries(Xt).find(([,a])=>f.includes(a.prefix));if(p){const[a,s]=p,l=f.replace(s.prefix,"");t[a]||(t[a]=[]);const o=s.type==="number"?parseInt(l):l;t[a].push(o)}}),Object.keys(t).forEach(f=>{wt(f,t[f])})}},Es=()=>{const{...t}=C.query;delete t.min_price,delete t.max_price,F.currency&&(t.currency=F.currency),Ft.replace({query:t}),Wt.updateFilter("price",[],"system")},es=({limit:t,viewport:f,timeout:p,clustering:a=!1,query:s=x.value}={})=>{const l=ys(v.$state),o=bs(Ke),d=It();return{requestId:_e.value?_e.value:Math.random().toString(36).substring(7),placeId:f?void 0:s.placeId,placeTypes:s.placeTypes,pool:s.pool,checkin:s.checkin,checkout:s.checkout,rooms:s.rooms,adults:s.adults,children:s.children,currency:F.currency,guestNationality:F.guestNationality,domain:ye.project.domain,occupancies:it.value?.length?it.value:ns(s.occupancies),limit:t??null,isGuestUser:F.isGuestUser,searchHotelName:s.searchHotelName,viewport:f,clustering:a,timeout:p,highlightHotelId:z.value||d.highlightHotelId||s.highlightHotelId||void 0,...l,...o,city:typeof s.name=="string"&&s.name.length>0?s.name.split(",")[0].trim():void 0,...Yl()}},z=c(null),xt=()=>{V.value=[],se.value=[],w.value=[],Le.value=0,z.value=null;try{const t=It();t&&(t.highlightHotelId=null)}catch{}Be.value=new Set,Ee.value=new Set,Ie&&(clearTimeout(Ie),Ie=null)},Os=t=>typeof t=="string"&&/^lp/i.test(t)&&!t.startsWith("google_"),js=t=>{for(const f of V.value){const p=t.get(f.id);p&&(f.affiliateOffer=p)}for(const f of w.value){const p=t.get(f.id);p&&(f.affiliateOffer=p)}},Ns=t=>{if(!Qe)return;const f=t.filter(p=>Os(p)&&!Be.value.has(p)&&!Ee.value.has(p));f.length&&(f.forEach(p=>Ee.value.add(p)),Ie&&clearTimeout(Ie),Ie=setTimeout(async()=>{Ie=null;const p=Array.from(Ee.value).filter(d=>!Be.value.has(d));if(!p.length)return;const a=x.value.checkin,s=x.value.checkout;if(typeof a!="string"||typeof s!="string"||!a||!s){p.forEach(d=>Ee.value.delete(d));return}const l=x.value.occupancies,o=it.value?.length?it.value:typeof l=="string"?ns(l):[];if(!o.length){p.forEach(d=>Ee.value.delete(d));return}try{const d=await pi(p,{checkin:a,checkout:s,occupancies:o,currency:F.currency,language:F.language,country:F.guestNationality});await Je(),js(d),p.forEach(j=>Be.value.add(j))}catch{}finally{p.forEach(d=>Ee.value.delete(d))}},300))},tt=async t=>{if(t.sorting!==void 0&&($.value=t.sorting||pl),t.hotelName!==void 0&&(W.value=t.hotelName||"",v.updateFilters({hotelName:t.hotelName||""})),t.sorting!==void 0&&v.updateFilters({sorting:t.sorting||pl}),t.hotelName!==void 0&&t.hotelName!==""){const f={...C.query};let p=!1;f.searchHotelName!==void 0&&(delete f.searchHotelName,p=!0),f.placeTypes!==void 0&&(delete f.placeTypes,p=!0),f.highlightHotelId!==void 0&&(delete f.highlightHotelId,p=!0),p&&await Ft.replace({query:f});const a=It();a.highlightHotelId=null,z.value=null}$e(void 0,!1),St()},hs=t=>{Ke.receptionAndRestaurant=t.receptionAndRestaurant,Ke.elevator=t.elevator,Ke.room=t.room,Ke.bathroom=t.bathroom,Ke.stairs=t.stairs,Ke.poolAndSpa=t.poolAndSpa,Ke.parking=t.parking,Ke.publicToilets=t.publicToilets,Ke.accessibilityCategories=t.accessibilityCategories,Ne.value=!0,v.updateFilters({receptionAndRestaurant:t.receptionAndRestaurant,elevator:t.elevator,room:t.room,bathroom:t.bathroom,stairs:t.stairs,poolAndSpa:t.poolAndSpa,parking:t.parking,publicToilets:t.publicToilets,accessibilityCategories:t.accessibilityCategories});const f=ul(v.$state);cl(f),$e(void 0,!1),St()},Us=t=>{W.value=t,Wt.updateFilter("hotelName",t,"user"),Vs(),W.value&&W.value!==""?Ps():fe.value=[],St()},zs=t=>{$.value=t,v.updateFilters({sorting:t});const f=ul(v.$state);if(cl(f),V.value.length>0){const p=()=>
2{if(w.value=$t([...V.value]),ye.project.settings.highlightHotels||ye.project.settings.highlightHotelsPerks){const a=[],s=[];w.value.forEach(l=>{Qt(String(l.id),l?.perks)?a.push(l):s.push(l)}),a.length>0&&(w.value=[...a,...s])}st(!0),se.value=V.value.map(ie)};typeof requestIdleCallback<"u"?requestIdleCallback(p,{timeout:100}):setTimeout(p,0)}},ts=t=>{if(t.requestId===_e.value&&(pe.value=t.geometry,Ts.value=t.hotelsCount,At.value=t.totalHotelsCount??t.hotelsCount,nt.value=t.nameMatchHotelIds||[],gt.value=t.place,r.place=gt.value,r.geometry=pe.value,dt.value=t?.place?.structured_formatting?.main_text||t?.place?.address_components?.find(f=>f.types.includes("locality"))?.short_name||t?.place?.formatted_address||dt.value,dt.value&&dt.value!=="")){const f=`Hotels in ${dt.value} between ${kt.fromISO(ae.value).toFormat("dd MMM yyyy")} - ${kt.fromISO(Xe.value).toFormat("dd MMM yyyy")}`;dl(f,f)}},Qs=(t,f,p,a)=>{let s=p,l=t.length;for(;s<l;){const o=s+l>>>1;a(t[o],f)>0?l=o:s=o+1}return s},$t=t=>{const f=z.value,p=C.query.placeTypes,a=yl(f,$.value,p),s=[...t];return s.sort(a),s},st=(t=!1)=>{if(t||!O.value){V.value=[...w.value];return}const f=new Set(V.value.map(a=>String(a.id))),p=w.value.filter(a=>!f.has(String(a.id)));p.length&&(V.value=[...V.value,...p])},Ws=t=>{const f=z.value===t.id;if(t.soldOut&&!f){w.value.push(t);return}if(f){t.soldOut?w.value.push(t):w.value.unshift(t);return}const a=w.value.length>0&&w.value[0].id===z.value?1:0,s=C.query.placeTypes,l=yl(z.value,$.value,s),o=Qs(w.value,t,a,l);w.value.splice(o,0,t)},ss=(t,f)=>{us.value=Math.round(100*t/f)},ze=(t,f)=>{if(!t)return;const p=String(t.id),a=V.value.find(o=>String(o.id)===p),s=!a&&w.value.find(o=>String(o.id)===p),l=a||s;if(l){const o=!l.price&&!l.soldOut,d=t.price>0;o&&d&&(Object.assign(l,t),l.customPointsEstimated=!1);return}if(!Sa(w.value,t,o=>z.value===o.id)){if(Object.prototype.hasOwnProperty.call(t,"isListHighlighted"),t.isListHighlighted=!1,t.score=ml(t,gl,qt.value),t.topHotelFacilities=ds(t.id,t.facilities),t.soldOut||(Le.value+=1),et.value){const o=z.value===t.id;if(f&&t.soldOut&&!o)return;V.value.push(t),se.value.push(ie(t)),w.value.push(t);return}if(!V.value.length)V.value.push(t),se.value.push(ie(t)),w.value.push(t);else if(f){const o=z.value===t.id;if(t.soldOut&&!o)return;if(o&&!t.soldOut)V.value.unshift(t),se.value.unshift(ie(t));else if(o&&t.soldOut)V.value.push(t),se.value.push(ie(t));else{const j=V.value.length>0&&V.value[0].id===z.value?1:0,h=V.value.findIndex((D,Q)=>Q>=j&&D.soldOut);h!==-1?(V.value.splice(h,0,t),se.value.splice(h,0,ie(t))):(V.value.push(t),se.value.push(ie(t)))}if(o&&!t.soldOut)w.value.unshift(t);else if(o&&t.soldOut)w.value.push(t);else{const d=(t.hotelType||"").toLowerCase(),j=d==="hotels"||d==="hotel",D=w.value.length>0&&w.value[0].id===z.value?1:0;let Q=-1;for(let ke=D;ke<w.value.length;ke++){const vt=w.value[ke];if(vt.soldOut){Q=ke;break}const Ss=(vt.hotelType||"").toLowerCase();if(j&&!(Ss==="hotels"||Ss==="hotel")){Q=ke;break}}Q===-1?w.value.push(t):w.value.splice(Q,0,t)}}else Ws(t)}},Rt=()=>{const t=z.value;if(!t)return;const f=w.value.find(p=>p.id===t);f&&(w.value.forEach(p=>{p.isListHighlighted=!1}),w.value=w.value.filter(p=>p.id!==t&&!p.soldOut),f.isListHighlighted=!0,w.value.unshift(f))},Nt=c(!1),vs=t=>{const f=Array.isArray(C.query.currentHotelId)?C.query.currentHotelId[0]:C.query.currentHotelId;if(!f||Nt.value)return;const p=t.find(s=>
2s.id===f)||w.value.find(s=>s.id===f);if(!p)return;const{filteredHotels:a}=w.value.reduce((s,l)=>(l.isListHighlighted=!1,l.id!==f&&!l.soldOut&&s.filteredHotels.push(l),s),{filteredHotels:[]});p.isListHighlighted=!0,w.value=a,w.value.unshift(p),Nt.value=!0},ht=()=>{O.value=Fa(E,w.value,{topCount:R,consecutiveBatches:y,minTopPicks:$.value===hl.RANKING_DESC&&!Aa(C.query.placeTypes)?le:void 0})},ls=t=>{if(t.requestId!==_e.value)return;je.value=Date.now(),Et(),Ue(!0),ss(t.completed,t.total);const f=!!W?.value,p=!!k?.value,s=!!(Array.isArray(C.query.currentHotelId)?C.query.currentHotelId[0]:C.query.currentHotelId),l=C.query.name===b("search.mapAreaLabel")&&r.hasDraggedMap;if(Array.isArray(t.result)){const o=t.bestMatchHotelId&&typeof t.bestMatchHotelId=="string"&&t.bestMatchHotelId.trim().length>0?t.bestMatchHotelId:null;!z.value&&o&&(z.value=o);const d=z.value||o,j=t.result.filter(h=>h?h.soldOut?h.id===d:!0:!1);if(l)j.forEach(h=>{if(!h)return;const D=String(h.id),Q=V.value.find(ke=>String(ke.id)===D);if(Q){!Q.price&&!Q.soldOut&&h.price>0&&Object.assign(Q,h);return}Object.prototype.hasOwnProperty.call(h,"isListHighlighted")||(h.isListHighlighted=!1),h.score=ml(h,["hotelTypeId",...gl],qt.value),h.topHotelFacilities=ds(h.id,h.facilities),h.soldOut||(Le.value+=1),V.value.push(h),se.value.push(ie(h)),w.value.push(h)});else if(f)j.forEach(h=>ze(h,f));else if(p){!z.value&&t.bestMatchHotelId&&(z.value=t.bestMatchHotelId);const h=z.value;if(h){const D=h,Q=j.find(ke=>ke.id===D);if(Q){Q.isListHighlighted=!0,ze(Q,!1);const ke=V.value.findIndex(vt=>vt.id===D);if(ke>0){const[vt]=V.value.splice(ke,1);vt.isListHighlighted=!0,V.value.unshift(vt)}}}j.forEach(D=>{D.id!==h&&ze(D,!1)})}else j.forEach(h=>ze(h,f));if(et.value){if(f){if(z.value){const h=w.value.find(D=>D.id===z.value);h&&(h.isListHighlighted=!0)}}else if(p&&z.value){const h=w.value.findIndex(D=>D.id===z.value);h>=0&&(w.value[h].isListHighlighted=!0)}st(),se.value=V.value.map(ie),ht(),!re.value&&w.value.length>=10&&(re.value=!0)}else{if(f){if(z.value){const h=w.value.find(D=>D.id===z.value);h&&(h.isListHighlighted=!0)}}else if(p){if(z.value){const h=w.value.findIndex(D=>D.id===z.value);if(h>0){const[D]=w.value.splice(h,1);D.isListHighlighted=!0,w.value.unshift(D)}else h===0&&(w.value[0].isListHighlighted=!0)}}else s&&vs(w.value);if(ye.project.settings.highlightHotels||ye.project.settings.highlightHotelsPerks){const h=[],D=[];w.value.forEach(Q=>{Qt(String(Q.id),Q?.perks)?h.push(Q):D.push(Q)}),h.length>0&&(w.value=[...h,...D])}st(),se.value=V.value.map(ie),ht(),!re.value&&w.value.length>=10&&(re.value=!0)}Ns(j.map(h=>h.id))}},bt=()=>{if(V.value.length<at.value)return;const t=window.scrollY+window.innerHeight,f=document.body.scrollHeight;t>=f-250&&fs()},fs=t=>{at.value+=t||Pt},as=()=>{window.scrollTo({top:0,behavior:"smooth"})},_t=async(t,f,p)=>{const a={viewport:f};p==="map"&&(a.limit=300,a.clustering=!0,a.timeout=3);const s=t.includes("hotelName");if(Hs(t),s){W.value="",z.value=null,r.highlightHotelId=null,F.isMobile&&(he.value=he.value.filter(l=>l!==t)),$e();return}F.isMobile?(he.value=he.value.filter(l=>l!==t),$e()):p!=="map"&&(ce.value=1,Cs(J,()=>Re.emit("hotels:fetch-rates",es(a))))},ms=()=>{W.value="",Wt.updateFilter("hotelName","","user"),H.value&&H.value.resetHotelName(),Me.value=!0,$e()},gs=(t=null)=>{pe.value&&(Lt(),U.value=!0,r.isMapLayout=!0,document.querySelector(".v-hotelsList")?.classList.add("v-hotelsList--MapLayout"),document.body.classList.add("MapLayout"),F.isMobile&&(document.body.style.overflow="hidden"),os.set("mapLayout","true"),t&&Je(()=>{We.value=t.id}))},ys=t=>({stars:t.stars.join(","),distance:t.distance.join(","),freeCancellation:t.freeCancellation.length>0?t.freeCancellation[0]:1,hotelName:t.hotelName,minPrice:t.price[0],maxPrice:t.price[1],ratings:t.ratings.join(","),facilities:t.facilities.join(","),roomAmenities:t.roomAmenities.join(","),mealPlans:t.mealPlans.join(","),chains:t.chains.join(","),hotelTypes:t.hotelTypes.join(","),suburbs:t.suburbs.join(","),popularFilters:t.popularFilters.join(",")}),bs=t=>({receptionAndRestaurant:t.receptionAndRestaurant,elevator:t.elevator,room:t.room,bathroom:t.bathroom,stairs:t.stairs,poolAndSpa:t.poolAndSpa,parking:t.parking,publicToilets:t.publicToilets,accessibilityCategories:t.accessibilityCategories}),_s=async t=>{const f=es();return ce.value=1,Cs(J,()=>Re.emit("hotels:fetch-rates",f)),Wl({viewport:t}).then(p=>{p.forEach(a=>{a.soldOut||!a.price||(V.value.push(a),se.value.push(ie(a)))})}).then(()=>{V.value.push(rt.value),se.value.push(ie(rt.value))})},is=()=>{const t=C.query.map==="1"||C.query.map==="true";(os.get("mapLayout")==="true"||t)&&(U.value=!0,r.isMapLayout=!0,document.querySelector(".v-hotelsList")?.classList.add("v-hotelsList--MapLayout"),document.body.classList.add("MapLayout"))},ks=()=>
2{if(!window._isMapSelectionInProgress&&U.value&&We.value&&we.value&&we.value.selectAndFlyToHotel){const t=V.value.find(f=>f.id===We.value);t&&Je(()=>{we.value.selectAndFlyToHotel(t,!1,!1,{suppressEmit:!0})})}},Gs=()=>{if(!F.isMobile)return;et.value=!1;const t=!!W?.value,f=a=>z.value===a.id;let p=[...V.value];if(t){p=p.filter(s=>!s.soldOut||f(s));const a=p.findIndex(s=>f(s)&&s.soldOut);if(a!==-1){const[s]=p.splice(a,1);p.push(s)}V.value=p,se.value=V.value.map(ie)}w.value=$t(p),st(),se.value=V.value.map(ie)},Is=()=>{xe(),ce.value=0,Ue(!1)};return X(()=>F.agentMargin,(t,f)=>{f!==void 0&&Zs&&F.guest?.isAgent&&!U.value&&$e()}),{resetFilters:qs,applyMobileFilters:Ds,initializeMobileFilters:Bs,syncMobileToCentralized:Lt,onFilterChange:tt,onAccessibilityFilterChange:hs,onLocalFilterChange:Us,onAllRatesReceived:Zt,onEntitiesReceived:Yt,loadResults:$e,onInfoReceived:ts,onRateReceived:ls,removeFilter:_t,handleSelectHotelId:jt,createVirtualHotelCard:ps,removeVirtualHotelCard:xs,loadHotelDetails:$s,removeMinMaxPriceFromQuery:Es,onSortingChange:zs,showMap:gs,initializeMapLayout:is,syncHotelSelectionWithMap:ks,sortHotelsAfterMapClose:Gs,clearHotelName:ms,handleSearchViewport:_s,onScroll:bt,addToPageSize:fs,goUp:as,error:_,searchTooBroad:J,activeFilters:Bt,activeFiltersCount:Ls,showFiltersModal:A,showAccessibilityFiltersModal:I,accessibilityFiltersLoaded:Ne,facilities:Ct,roomAmenities:Kt,chains:te,hotelTypes:Gt,suburbs:ot,appliedFilters:Oe,mobileAppliedFilters:he,hotels:V,mapHotels:se,selectedHotelId:We,selectedHotel:rt,pageSize:at,occupancies:it,checkin:ae,checkout:Xe,place:gt,requestId:_e,geometry:pe,loading:P,bestDealLoadingLabel:Te,placeValue:dt,hotelName:W,nameMatchHotelIds:nt,filtersElement:H,sorting:$,isMapOpen:m,showMapLayout:U,mapAsideRef:we,checkInDescription:Ge,checkOutDescription:pt,roomsDescription:Ht,sliderPriceRange:He,accessibilityFilters:Ke,onRateErrorReceived:Rs,trackingId:M,filtersLoading:Dt,searchMetadata:Mt,showingNearbyResults:ut,nearbyHotels:V,shouldDeferSorting:et,isListStable:O,listPainted:re,cleanup:Is}}const Zi={class:"flex flex-column gap-1 accessibility-categories"},Xi={class:"label"},eo={class:"accessibility-button-container"},to={class:"block items-center shadow-none accessibility-button-content"},so={class:"label-text"},lo=Ce({__name:"SelectButtonInput",props:{filterData:{type:Object,required:!0},attribute:{type:Object},sourceId:{type:String},disabled:{type:Boolean,default:!1},translateLabel:{type:Boolean,default:!0}},emits:["change"],setup(g,{emit:R}){const{t:y}=De(),r=g,v=x=>({visuallyImpaired:"visually-impaired",crouchesCaneImpaired:"mobility",hearingImpaired:"hearing-impaired",elderlyImpaired:"elderly-impaired",electricWheelchair:"electric-wheelchair",manualWheelchair:"manual-wheelchair",wheelchairOrScooterImpaired:"wheelchair-scooter-impaired"})[x]??"warning",b=c([]),m=R;X(()=>r.attribute?.value,x=>{b.value=x||[]},{immediate:!0});const C=x=>{const q=x.map(M=>typeof M=="object"?M.value:M);b.value=q,m("change",q)};return(x,q)=>(i(),u("div",Zi,[n("span",Xi,[n("b",null,L(e(y)("filters.accessibilityCategories.label")),1)]),T(e(ma),{modelValue:b.value,"onUpdate:modelValue":[q[0]||(q[0]=M=>b.value=M),C],options:r.filterData.values,optionLabel:"label",optionValue:"value",multiple:!0,disabled:g.disabled,class:"accessibility-categories"},{option:ue(({option:M})=>
2[n("div",eo,[n("div",to,[T(Hl,{name:v(M.value),class:"w-12 h-12 md:w-20 md:h-20"},null,8,["name"]),n("span",so,L(M.label),1)])])]),_:1},8,["modelValue","options","disabled"])]))}}),Sl=Ae(lo,[["__scopeId","data-v-f3d666db"],["__file","SelectButtonInput.vue"]]),ao={key:0,class:"p-accessibility-filters accordion"},io={class:"accordion-item"},oo={key:0,class:"pi pi-chevron-up"},no={key:1,class:"pi pi-chevron-down"},ro={key:0,class:"accordion-content"},uo={class:"clear-filters"},co={key:1},po={class:"accordion-content"},ho=Ce({__name:"AccessibilityFilters",props:{source:{},sync:{type:Boolean},filtersVisible:{type:Boolean},showAccessibilityFiltersModal:{type:Boolean}},emits:["change","change-local","handle-sync"],setup(g,{expose:R,emit:y}){const r=el(),{t:v}=De(),m=c([]);let C=c(!1);const x=c(""),q=c(!1),M=y,H=g,k=c([]),_=c([]),J=c([]),W=c([]),fe=c([]),B=c([]),V=c([]),se=c([]),ie=c([]),Y={accessibilityCategories:ie,receptionAndRestaurant:k,elevator:_,room:J,bathroom:W,stairs:fe,poolAndSpa:B,parking:V,publicToilets:se},Me=ws(),$=()=>Object.keys(Y).reduce((E,le)=>(E[le]=Y[le].value,E),{}),_e=ee(()=>Y.receptionAndRestaurant.value.length+Y.elevator.value.length+Y.room.value.length+Y.bathroom.value.length+Y.stairs.value.length+Y.poolAndSpa.value.length+Y.parking.value.length+Y.publicToilets.value.length+Y.accessibilityCategories.value.length>1),Qe=E=>(E=E||Me.query,{placeId:E.placeId,checkin:E.checkin,checkout:E.checkout,rooms:E.rooms,adults:E.adults,children:E.children||""}),Be=E=>{x.value="";const le=Qe(E);le&&Zl(le).then(O=>{C.value=!0,m.value=O.accessibilityFilters}).catch(O=>{C.value=!0,x.value=O.response?.data?.error||O.message,console.error("Error loading accessibility filters:",O)})};sl(()=>{Be(),Ee()}),X(()=>H.showAccessibilityFiltersModal,E=>{E&&!C.value&&Be()});const Ee=()=>{const E=mt(Me.query.receptionAndRestaurant),le=mt(Me.query.elevator),O=mt(Me.query.room),re=mt(Me.query.bathroom),oe=mt(Me.query.stairs),me=mt(Me.query.poolAndSpa),Se=mt(Me.query.parking),Ve=mt(Me.query.publicToilets),P=mt(Me.query.accessibilityCategories);Y.receptionAndRestaurant.value=E,Y.elevator.value=le,Y.room.value=O,Y.bathroom.value=re,Y.stairs.value=oe,Y.poolAndSpa.value=me,Y.parking.value=Se,Y.publicToilets.value=Ve,Y.accessibilityCategories.value=P;const I={...r.$state,receptionAndRestaurant:E,elevator:le,room:O,bathroom:re,stairs:oe,poolAndSpa:me,parking:Se,publicToilets:Ve,accessibilityCategories:P};r.updateFilters(I)},Ie=(E,le)=>{const re=["receptionAndRestaurant","elevator","room","bathroom","stairs","poolAndSpa","parking","publicToilets"].includes(le)?Y[le].value:[];return!re||!Array.isArray(re)||re.length===0?E:E.sort((oe,me)=>{const Se=re.includes(oe.value),Ve=re.includes(me.value);return Se&&!Ve?-1:!Se&&Ve?1:0})},ce=()=>{m.value.forEach(E=>{E.values&&E.type==="checkbox"&&(E.values=Ie(E.values,E.query))})},be=(E,le)=>{Object.prototype.hasOwnProperty.call(Y,E)&&(Y[E].value=le),ce();const O=$();Al(`search_filter_applied_${H.source}`,O),M("change",O)},je=()=>{q.value=!1,k.value=[],_.value=[],ie.value=[],J.value=[],W.value=[],fe.value=[],B.value=[],V.value=[],se.value=[],Y.accessibilityCategories.value=[],Y.receptionAndRestaurant.value=[],Y.elevator.value=[],Y.room.value=[],Y.bathroom.value=[],Y.stairs.value=[],Y.poolAndSpa.value=[],Y.parking.value=[],Y.publicToilets.value=[],M("change",$())};R({resetFilters:je,resetHotelName:()=>{q.value=!1,M("change",$())}});const He=E=>({receptionAndRestaurant:k,elevator:_,room:J,bathroom:W,stairs:fe,poolAndSpa:B,parking:V,publicToilets:se,accessibilityCategories:ie})[E],w=()=>{const E=H.filtersVisible?!1:H.filtersVisible;M("handle-sync",!H.sync,E)};return(E,le)=>e(C)&&!x.value?(i(),u(G,{key:0},[m.value.length?(i(),u(G,{key:0},[E.showAccessibilityFiltersModal?(i(),u("div",co,[n("div",po,[(i(!0),u(G,null,ve(m.value,(O,re)=>(i(),u("div",{key:re,class:"filter"},[O.type==="selectButton"?(i(),K(Sl,{key:0,filterData:O,attribute:He(O.query),onChange:oe=>be(O.query,oe),disabled:q.value},null,8,["filterData","attribute","onChange","disabled"])):S("",!0),O.type==="checkbox"?(i(),K(Ms,{key:1,name:O.query,filterData:O,sourceId:E.source,attribute:He(O.query),onChange:oe=>be(O.query,oe),translateLabel:!1,disabled:q.value},null,8,["name","filterData","sourceId","attribute","onChange","disabled"])):S("",!0)]))),128))])])):(i(),u("div",ao,[n("div",io,[n("div",{class:"accordion-title",onClick:w},[n("h3",null,L(e(v)("filters.properties-filter.label")),1),E.sync?(i(),u("i",oo)):(i(),u("i",no))]),E.sync?(i(),u("div",ro,[n("div",uo,[T(e(qe),{disabled:!_e.value,severity:"secondary",onClick:le[0]||(le[0]=Ye(O=>je(),["prevent"]))},{default:ue(()=>[le[1]||(le[1]=n("i",{class:"pi pi-trash"},null,-1)),ne(" "+L(e(v)("filters.clear")),1)]),_:1},8,["disabled"])]),(i(!0),u(G,null,ve(m.value,(O,re)=>(i(),u("div",{key:re,class:"filter"},[O.type==="selectButton"?(i(),K(Sl,{key:0,filterData:O,attribute:He(O.query),onChange:oe=>be(O.query,oe),disabled:q.value},null,8,["filterData","attribute","onChange","disabled"])):S("",!0),O.type==="checkbox"?(i(),K(Ms,{key:1,name:O.query,filterData:O,sourceId:E.source,attribute:He(O.query),onChange:oe=>be(O.query,oe),translateLabel:!1,disabled:q.value},null,8,["name","filterData","sourceId","attribute","onChange","disabled"])):S("",!0)]))),128))])):S("",!0)])]))],64)):S("",!0)],64)):S("",!0)}}),Ys=Ae(ho,[["__scopeId","data-v-3e04af7a"],["__file","AccessibilityFilters.vue"]]),vo=["data-testid"],fo=["data-testid","onClick"],mo=Ce({__name:"ActiveFiltersBadges",props:{badges:{},clearAllLabel:{},scroll:{type:Boolean,default:!1},showClearAll:{type:Boolean,default:void 0},rootTestId:{default:void 0},badgeTestId:{default:void 0},clearAllTestId:{default:void 0}},emits:["remove","clearAll"],setup(g,{emit:R}){const y=g,r=R,v=()=>typeof y.showClearAll=="boolean"?y.showClearAll:y.badges.length>1;return(b,m)=>(i(),u("div",{class:ge(["active-filters-badges",{"active-filters-badges--scroll":y.scroll}]),"data-testid":y.rootTestId},[(i(!0),u(G,null,ve(y.badges,C=>(i(),u("span",{key:C.key,class:"filter-badge radius_md","data-testid":y.badgeTestId,onClick:x=>r("remove",C.key)},[ne(L(C.label)+" ",1),m[1]||(m[1]=n("i",{class:"pi pi-times"},null,-1))],8,fo))),128)),v()?(i(),K(e(qe),{key:0,class:"clear-all-btn radiu
2s_md","data-testid":y.clearAllTestId,onClick:m[0]||(m[0]=C=>r("clearAll")),text:"",size:"small"},{default:ue(()=>[m[2]||(m[2]=n("i",{class:"pi pi-trash"},null,-1)),n("span",null,L(y.clearAllLabel),1)]),_:1},8,["data-testid"])):S("",!0)],10,vo))}}),go=Ae(mo,[["__scopeId","data-v-87185563"],["__file","ActiveFiltersBadges.vue"]]),yo={class:"heading"},bo={class:"filters mobile","data-testid":"filters-container"},_o={class:"filters-footer"},ko={key:0,class:"clear-filters"},Io={class:"heading"},So={class:"filters mobile"},Fo={class:"filters-footer"},Ao={class:"clear-filters"},Co={class:"heading"},Mo={class:"sorting-options"},wo=["onClick"],To={class:"sorting-option-content"},Ho={class:"sorting-option-label"},Lo={key:0,class:"pi pi-check"},xo={class:"l-hotelslist-list base-container"},$o={key:0,class:"filters-list--button--count"},Ro={key:0},Vo={key:1,class:"filters-list--button--count"},Po=["onClick"],qo={key:0,class:"filters-list--appliedFilters"},Do=["onClick"],Bo={key:0,class:"mobile-fullscreen-map"},Eo={class:"search-hero-with-back"},Oo={class:"search-wrapper-flex"},jo={key:1,class:"MapLayout__Filters flex align-items-center","data-testid":"header-filter"},No={key:0,class:"filters-list--button--count"},Uo={key:0,class:"filters-list--button--count"},zo={key:2,class:"flex-grow-1"},Qo={key:2,class:"grid"},Wo={key:0,class:"md:col-3 sm:col-12"},Go={class:"heading"},Ko={key:0,class:"pi pi-chevron-up"},Jo={key:1,class:"pi pi-chevron-down"},Yo={key:0,class:"no-rates-banner"},Zo={class:"banner-content"},Xo={class:"banner-title"},en={class:"banner-subtitle"},tn={class:"hotels-results-container"},sn={class:"w-full results flex justify-content-between flex-row align-items-center"},ln={key:0,class:"results-sort"},an={key:0,class:"searchResult","data-testid":"hotel-search-result"},on={class:"result-text"},nn={key:0,class:"flex align-items-center"},rn={key:1,class:"flex justify-content-end align-items-center"},un={class:"filters-list--sort-dropdown ml-2"},cn={key:2,class:"filters-list--toggle flex align-items-center justify-content-center ml-4"},dn={class:"md:w-full sm:col-12"},pn={key:2,class:"empty-hotels"},hn={key:3,class:"grid hotels-list flex-column"},vn=["data-index"],fn={key:0,class:"w-full v-hotelList__cards__hotel",style:{"padding-bottom":"12px"}},mn={key:1,class:"other-hotels-banner",style:{"padding-bottom":"12px"}},gn={key:1,class:"flex w-full gap-3 mx-auto flex-column"},yn={key:0,class:"hc-skeleton hc-skeleton--stacked"},bn={class:"hc-skeleton__body"},_n={class:"hc-skeleton__info"},kn={class:"hc-skeleton__stars"},In={class:"hc-skeleton__pills"},Sn={class:"hc-skeleton__aside hc-skeleton__aside--row"},Fn={class:"hc-skeleton__meta"},An={key:1,class:"hc-skeleton hc-skeleton--row"},Cn={class:"hc-skeleton__body"},Mn={class:"hc-skeleton__info"},wn={class:"hc-skeleton__stars"},Tn={class:"hc-skeleton__pills"},Hn={class:"hc-skeleton__aside"},Ln={class:"hc-skeleton__rating"},xn={class:"hc-skeleton__rating-text"},$n={class:"hc-skeleton__price"},Rn={key:0,class:"flex flex-row gap-3 p-1 mx-auto overflow-hidden skeleton-card radius_lg justify-content-between"},Vn={class:"flex py-2 pr-2 skeleton-content flex-column justify-content-between"},Pn={class:"flex gap-2 flex-column"},qn={class:"flex flex-row gap-1 justify-content-start"},Dn={class:"flex flex-row w-full justify-content-end h-fit align-items-end"},Bn={key:1,class:"flex flex-row p-1 skeleton-card radius_lg justify-content-start"},En={class:"flex flex-row p-2 skeleton-content justify-content-between"},On={class:"flex h-full skeleton-content-left w-9 flex-column justify-content-between"},jn={class:"flex gap-2 flex-column justify-content-start"},Nn={class:"flex flex-row gap-1 justify-content-start"},Un={class:"flex w-3 gap-2 skeleton-content-right flex-column justify-content-end"},zn=10,Qn=3,Wn=5,Fl=50,Gn=Ce({__name:"HotelsListLayoutList",emits:["update:layout"],setup(g,{emit:R}){const y=It(),r=ws(),v=Tl(),b=el(),m=c(!1),C=c(!0),x=c(null),q=c(!1),M=c(null),H=c(null),k=(a,s)=>{if(!a.latitude||!a.longitude||!s)return!0;let l,o,d,j;s.northeast&&s.southwest?(l=s.northeast.lat,o=s.southwest.lat,d=s.northeast.lng,j=s.southwest.lng):{north:l,south:o,east:d,west:j}=s;const h=Number(a.latitude),D=Number(a.longitude);return h<=l&&h>=o&&D<=d&&D>=j},_=ee(()=>{if(y.hasDraggedMap&&x.value){const l=ae.value.find(j=>j.isListHighlighted||y.highlightHotelId===j.id),o=[];ae.value.forEach(j=>{l&&j.id===l.id||k(j,x.value)&&o.push(j)});const d=[];return l&&d.push(l),d.push(...o),d}const s=new Set;return ae.value.filter(l=>{const o=String(l.id);return s.has(o)?!1:(s.add(o),!0)})}),J=ee(()=>{if(!nt.value||!gt.value.length)return-1;const a=new Set(gt.value);let s=-1;for(let l=0;l<_.value.length;l++)a.has(_.value[l].id)&&(s=l);return s}),W=ee(()=>{if(!nt.value||!gt.value.length)return ae.value;const a=new Set(gt.value);return ae.value.filter(s=>a.has(s.id))}),fe=_a(()=>ra(()=>import("./MapAside-7UuH3ite.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))),{t:B}=De(),{onFilterChange:V,onAccessibilityFilterChange:se,onLocalFilterChange:ie,onAllRatesReceived:Y,onEntitiesReceived:Me,loadResults:$,onInfoReceived:_e,onRateReceived:Qe,removeMinMaxPriceFromQuery:Be,showMap:Ee,initializeMapLayout:Ie,syncHotelSelectionWithMap:ce,sortHotelsAfterMapClose
2:be,removeFilter:je,onSortingChange:Ze,resetFilters:He,applyMobileFilters:w,initializeMobileFilters:E,handleSelectHotelId:le,error:O,searchTooBroad:re,showFiltersModal:oe,showAccessibilityFiltersModal:me,accessibilityFiltersLoaded:Se,occupancies:Ve,checkin:P,checkout:A,selectedHotelId:I,appliedFilters:U,activeFiltersCount:we,mobileAppliedFilters:Ne,syncMobileToCentralized:Pt,requestId:at,place:Le,hotels:ae,chains:Xe,facilities:qt,hotelTypes:it,suburbs:Ft,roomAmenities:Gt,geometry:ot,loading:pe,bestDealLoadingLabel:Ts,placeValue:At,hotelName:nt,nameMatchHotelIds:gt,sorting:Ct,sliderPriceRange:Kt,accessibilityFilters:te,onRateErrorReceived:us,trackingId:We,filtersLoading:rt,showingNearbyResults:yt,showMapLayout:N,shouldDeferSorting:Dt,isListStable:et,cleanup:Mt}=Yi({listStabilityTopCount:zn,listStabilityConsecutiveBatches:Qn}),ut=c(null),ct=c(!1),Hs=async a=>{ct.value=!1,ut.value=a;const s=await mi(a);if(ut.value=null,!s){ct.value=!0;return}v.push({path:"/hotels",query:yi(r.query,s)})},Bt=ee(()=>{const a=[];return _.value.forEach((s,l)=>{a.push({type:"hotel",hotel:s,hotelIdx:l}),l===J.value&&l<_.value.length-1&&a.push({type:"banner"})}),a}),Jt=c(null),wt=La(ee(()=>({count:Bt.value.length,estimateSize:()=>F.isMobile?192:172,overscan:10,scrollMargin:Jt.value?Jt.value.getBoundingClientRect().top+window.scrollY:0}))),he=a=>{const s=Bt.value[a];return s?.type==="hotel"?s.hotel:null},Pe=c(!0),Oe=ye.project.settings.accessibilityEnabled,Ls=ee(()=>ye.project.settings?.useHotelCardRedesign===!0),{isGrabPreset:Tt}=Xl(),{paymentBottomSheetProps:cs,isBottomSheet:ds}=wa(),Te=c(!(Oe&&!F.isMobile)),Ue=c(!1),xe=c(0),Et=c(!1),Ot=ee(()=>[{value:0,name:B("sorting.recommended")},{value:1,name:B("sorting.priceHighToLow")},{value:2,name:B("sorting.priceLowToHigh")},{value:3,name:B("sorting.starRating")},{value:4,name:B("sorting.distance")},{value:5,name:B("sorting.guestRating")}]),dt=ee(()=>{const a=wt.value.getVirtualItems();if(!a.length)return _.value.slice(0,11);const s=[];for(const l of a){const o=Bt.value[l.index];o?.type==="hotel"&&s.push(o.hotel)}return s}),Ge=new Set,pt=c([]),Ht=c(0);X(at,()=>{Ge.clear(),pt.value=[],Ht.value=0});async function jt(a){const s=new Set(pt.value),l=a.filter(d=>d.id&&!s.has(d.id));if(l.length===0)return;const o=l.map(d=>d.id);pt.value=[...pt.value,...o],await ca(l,F.currency),l.forEach(d=>{d.id&&Ge.add(d.id)}),ae.value=[...ae.value],pt.value=pt.value.filter(d=>!o.includes(d))}X(ae,a=>{if(a.length===0)return;const s=[];a.forEach(l=>{l.id&&Ge.has(l.id)&&(l.customPointsEstimated?l.customPointsEstimated=!0:(Ge.delete(l.id),s.push(l)))}),s.length>0&&jt(s)},{flush:"sync"}),X(et,async a=>{if(!a)return;const s=dt.value.filter(l=>l.id&&!Ge.has(l.id));s.length>0&&await jt(s)}),X(pe,async a=>{if(a)return;const s=_.value;if(s.length===0)return;const l=s.slice(0,Fl);Ht.value=l.length;const o=l.filter(d=>d.id&&!Ge.has(d.id));o.length>0&&await jt(o)}),X(dt,async a=>{if(Ht.value===0)return;const s=_.value;if(!a.some(Q=>Q.id&&!Ge.has(Q.id)))return;const o=Ht.value,d=o<s.length?s.slice(o,o+Fl):[];d.length>0&&(Ht.value=o+d.length);const j=s.slice(0,o).filter(Q=>Q.id&&!Ge.has(Q.id)),h=new Set,D=[...j,...d].filter(Q=>!Q.id||Ge.has(Q.id)||h.has(Q.id)?!1:(h.add(Q.id),!0));D.length>0&&await jt(D)}),X(N,(a,s)=>{window.dispatchEvent(new CustomEvent(a?"map:open":"map:close")),a&&!s&&F.isMobile?(y.isMapLayout=!0,Dt.value=!0,document.querySelector(".v-hotelsList")?.classList.add("v-hotelsList--MapLayout"),document.body.classList.add("MapLayout"),document.body.style.overflow="hidden"):s&&!a&&F.isMobile&&(y.isMapLayout=!1,document.querySelector(".v-hotelsList")?.classList.remove("v-hotelsList--MapLayout"),document.body.classList.remove("MapLayout"),document.body.style.overflow="",os.remove("mapLayout"),be())});const ps=ee(()=>B("layout.list")),xs=ee(()=>B("layout.map")),$s=[{value:!1,label:ps,icon:Cl},{value:!0,label:xs,icon:Ml}],$e=c(F.isAuthenticated),Rs=ee(()=>Le.value.types?.includes("lodging")||!1),Yt=ee(()=>Le.value.address_components?.find(a=>a.types.includes("locality"))?.short_name||Le.value.address_components?.find(a=>a.types.includes("administrative_area_level_1"))?.short_name||null),Zt=ee(()=>{if((r.query.name===B("search.mapAreaLabel")||y.name===B("search.mapAreaLabel"))&&y.hasDraggedMap)return B("search.mapAreaLabel");if(r.query.searchHotelName){const a=Yt.value||ae.value[0]?.city;return a||(ae.value.length>0?At.value:"")}return(Rs.value||nt.value&&nt.value!=="")&&(Yt.value||ae.value[0]?.city)||At.value}),Vs=a=>Ia(a),Ps=ee(()=>pe.value&&ae.value.length===0),qs=()=>{Pe.value&&(Pe.value=!1),Te.value=!Te.value},Ds=()=>{Re.on("hotels:fetch-rates:complete",Y),Re.on("hotels:fetch-rates:rate",Qe),Re.on("hotels:fetch-rates:info",_e),Re.on("hotels:fetch-rates:error",us),Re.on("hotels:fetch-rates:entities",Me)},Bs=()=>{Re.off("hotels:fetch-rates:rate",Qe),Re.off("hotels:fetch-rates:complete",Y),Re.off("hotels:fetch-rates:info",_e),Re.off("hotels:fetch-rates:error",us),Re.off("hotels:fetch-rates:entities",Me)},Xt=ee(()=>ea(F.currency||"USD")),Lt=c(null),Es=ee(()=>!ot.value||!Lt.value?"":`url(https://api.mapbox.com/styles/v1/mapbox/streets-v12/static/${ot.value.location.lng},${ot.value.location.lat},11,0,60/${Lt.value.offsetWidth*2}x${Lt.value.offsetHeight*2+100}
2?access_token=${ye.tokens.mapboxAccessToken})`),es=()=>{F.isMobile&&tt.value&&(Object.keys(tt.value).forEach(a=>{Wt.updateFilter(a,tt.value[a])}),tt.value=null),oe.value=!1,xt(!1)},z=()=>{es()},xt=a=>{a?document.body.classList.add("overflow--hidden"):Je(()=>{!oe.value&&!me.value&&document.body.classList.remove("overflow--hidden")})},Os=xt,js=xt,Ns=()=>{w(),St(),tt.value=null,oe.value=!1,xt(!1)},tt=c(null),hs=()=>{if(F.isMobile&&!tt.value){Pt();const a=Wt.getAllFilters();tt.value=JSON.parse(JSON.stringify(a))}},Us=()=>{for(const a in te)Array.isArray(te[a])&&(te[a]=[]);se(te)},zs=()=>{r.query.name===B("search.mapAreaLabel")&&(y.hasDraggedMap=!0),y.placeId=r.query.placeId,y.name=r.query.name,y.checkin=r.query.checkin,y.checkout=r.query.checkout,y.occupancies=ns(r.query.occupancies)},ts=c(""),Qs=()=>{Le.value&&(ts.value=da(Le.value,r.query.name))},$t=c({}),st=a=>{a&&a.id?$t.value=a:$t.value={}},Ws=a=>{H.value!==null&&clearTimeout(H.value),le(a,!1,{suppressScroll:!0}),ce(),H.value=window.setTimeout(()=>{H.value=null},4e3)},ss=()=>{Pt(),N.value=!0,y.isMapLayout=!0,document.querySelector(".v-hotelsList")?.classList.add("v-hotelsList--MapLayout"),document.body.classList.add("MapLayout"),os.set("mapLayout","true"),v.replace({path:r.path,query:{...r.query,map:"1"}})},ze=()=>{if(!M.value&&!N.value&&(M.value=document.querySelector(".MapLayout__Filters")||document.querySelector(".filters.desktop")),M.value){const a=M.value.getBoundingClientRect();q.value=a.bottom<100}else N.value&&(q.value=window.scrollY>100)},Rt=()=>{N.value=!1,y.isMapLayout=!1,document.querySelector(".v-hotelsList")?.classList.remove("v-hotelsList--MapLayout"),document.body.classList.remove("MapLayout"),os.remove("mapLayout");const{map:a,...s}=r.query;v.replace({path:r.path,query:s})},Nt=a=>{a?ss():Rt()};X(()=>r.query.map,a=>{a==="1"||a==="true"?N.value||ss():N.value&&Rt()});const vs=na(()=>{if(window.innerWidth<1080){Ue.value=!1;const a=document.querySelector(".p-search--modal")!==null,s=document.querySelector(".drawer-wrapper")!==null,l=ua();N.value&&!l&&!a&&!s&&Rt()}else Ue.value=!0},200),ht=()=>{tt.value=null,He()},ls=c([]),bt=c(!1),fs=ee(()=>_t.value?300:150),as=(a,s=[""],l=6,o=!1)=>{o||(bt.value=!0);const d=Math.random().toString(36).substring(7);Re.emit("hotels:fetch-rates",{requestId:d,viewport:a,placeTypes:r.query.placeTypes,checkin:P.value,checkout:A.value,occupancies:ns(JSON.stringify(Ve.value)),currency:Xt,guestNationality:"US",limit:fs.value*20,domain:ye.project.domain,timeout:l,roomMapping:!1,clustering:!0,excludeHotelIds:s})},_t=c(!1),ms=()=>{_t.value=!_t.value},gs=a=>{C.value=a},ys=a=>{},bs=a=>{H.value===null&&(x.value=a,St())};X(()=>F.agentMargin,(a,s)=>{s!==void 0&&Zs&&F.guest?.isAgent&&N.value&&x.value&&as(x.value)});const _s=()=>{H.value!==null&&(clearTimeout(H.value),H.value=null)},is=a=>{Ze(a)},ks=()=>{hs(),document.body.classList.add("overflow--hidden"),oe.value=!0},Gs=()=>{document.body.classList.add("overflow--hidden"),me.value=!0},Is=()=>{me.value=!1,xt(!1)};X(()=>pe.value,a=>{a?!oe.value&&!me.value&&document.body.classList.remove("overflow--hidden"):(Qs(),bt.value=!1,N.value&&St())},{immediate:!0}),X(Pe,a=>{a?Te.value=!1:Te.value=!0}),X(Te,a=>{a?Pe.value=!1:Pe.value=!0}),X(()=>F.guest,()=>{$e.value=F.isAuthenticated,$()}),X(()=>ae.value.length,(a,s)=>{s===0&&a>0&&Je(()=>{!oe.value&&!me.value&&document.body.classList.remove("overflow--hidden")})}),X(()=>F.currency||F.guestNationality,()=>{Be(),$()});const{appliedFilters:t}=rs();X(()=>[r.query.placeId,r.query.checkin,r.query.checkout,r.query.occupancies,r.query.highlightHotelId],(a,s)=>{const l=!a[4]&&!!s?.[4],o=a[0]===s?.[0]&&a[1]===s?.[1]&&a[2]===s?.[2]&&a[3]===s?.[3];l&&o||(F.isMobile&&a[0]!==s?.[0]&&(Ne.value=[...t.value]),$(void 0,!0))}),ta((a,s,l)=>{l()});const f=sa();ga(()=>{window.innerWidth>1080&&(Ue.value=!0),Ie()}),sl(()=>{if(St(),E(),Ds(),zs(),window.addEventListener("resize",vs),Te.value=!0,["stars","facilities","chains","hotelTypes","suburbs","roomAmenities","mealPlans","ratings","freeCancellation","popularFilters","hotelName","min_price","max_price","sorting","receptionAndRestaurant","elevator","room","bathroom","stairs","poolAndSpa","parking","publicToilets","accessibilityCategories"].some(l=>{const o=r.query[l];return o!=null&&o!==""})){const l=vl(r.query);if(l.popularFilters&&l.popularFilters.length>0){const o=la(l.popularFilters);
2if(Object.entries(o).forEach(([d,j])=>{if(j&&Array.isArray(j)&&j.length>0){const h=l[d],D=[...new Set([...h||[],...j])];l[d]=D}}),l.popularFilters.includes("fourToFiveStars")){const d=l.stars||[];if(!(d.includes(4)&&d.includes(5))){const h=[...new Set([...d,4,5])];l.stars=h}}if(l.popularFilters.includes("freeCancellation")){const d=l.freeCancellation||[];if(!d.includes(2)){const h=[...new Set([...d,2])];l.freeCancellation=h}}if(l.freeCancellation&&l.freeCancellation.includes(2)){const d=l.popularFilters||[];d.includes("freeCancellation")||(l.popularFilters=[...d,"freeCancellation"])}}b.updateFilters(l),(l.receptionAndRestaurant||l.elevator||l.room||l.bathroom||l.stairs||l.poolAndSpa||l.parking||l.publicToilets||l.accessibilityCategories)&&(te.receptionAndRestaurant=l.receptionAndRestaurant||[],te.elevator=l.elevator||[],te.room=l.room||[],te.bathroom=l.bathroom||[],te.stairs=l.stairs||[],te.poolAndSpa=l.poolAndSpa||[],te.parking=l.parking||[],te.publicToilets=l.publicToilets||[],te.accessibilityCategories=l.accessibilityCategories||[],b.updateFilters({receptionAndRestaurant:l.receptionAndRestaurant||[],elevator:l.elevator||[],room:l.room||[],bathroom:l.bathroom||[],stairs:l.stairs||[],poolAndSpa:l.poolAndSpa||[],parking:l.parking||[],publicToilets:l.publicToilets||[],accessibilityCategories:l.accessibilityCategories||[]}),Se.value=!0)}$(),m.value=!0,window.addEventListener("scroll",ze,{passive:!0})}),X(()=>N.value,(a,s)=>{s===!0&&a===!1&&(xe.value++,F.isMobile&&E(),setTimeout(()=>{const l=vl(r.query);(l.receptionAndRestaurant||l.elevator||l.room||l.bathroom||l.stairs||l.poolAndSpa||l.parking||l.publicToilets||l.accessibilityCategories)&&(te.receptionAndRestaurant=l.receptionAndRestaurant||[],te.elevator=l.elevator||[],te.room=l.room||[],te.bathroom=l.bathroom||[],te.stairs=l.stairs||[],te.poolAndSpa=l.poolAndSpa||[],te.parking=l.parking||[],te.publicToilets=l.publicToilets||[],te.accessibilityCategories=l.accessibilityCategories||[],Se.value=!0)},100))});const p=()=>{const a=r.query.name,s=B("search.mapAreaLabel");if((a==="Map area"||a===s||a?.toLowerCase().includes("map area")||s?.toLowerCase().includes("map area"))&&(y.hasDraggedMap||r.query.placeId?.includes(","))&&!x.value){const d=r.query.placeId;if(d&&d.includes(",")){const[j,h]=d.split(","),D=parseFloat(j),Q=parseFloat(h);if(!isNaN(D)&&!isNaN(Q)){const ke={northeast:{lat:D+.1,lng:Q+.1},southwest:{lat:D-.1,lng:Q-.1}};x.value=ke;return}}}};return X(()=>ae.value.length,a=>{a>0&&p()},{immediate:!0}),X(()=>pe.value,a=>{a||(bt.value=!1,p())},{immediate:!0}),tl(()=>{Bs(),window.removeEventListener("resize",vs),window.removeEventListener("scroll",ze),Mt(),document.body.classList.remove("MapLayout"),document.body.classList.remove("overflow--hidden"),document.body.style.overflow=""}),(a,s)=>{const l=xl("font-awesome-icon");return i(),u(G,null,[e(N)?S("",!0):(i(),K(Hi,{key:0,class:"map-view",buttons:[{label:e(B)("map.mapView"),icon:"map",click:function(){e(Ee)()}}],loading:Ps.value,loadingLabel:e(B)("hotels.loadingState")},null,8,["buttons","loading","loadingLabel"])),e(F).isMobile||e(N)?(i(),K(e(Fs),ya({key:1,visible:e(oe),"onUpdate:visible":s[1]||(s[1]=o=>As(oe)?oe.value=o:null)},e(cs),{modal:"",closable:!1,"show-header":!0,"dismissable-mask":!0,draggable:!1,style:{width:e(F).isMobile?"100%":"25rem",margin:e(F).isMobile?"0":"auto",overflow:"hidden",maxHeight:"100%"},class:"filters-mobile FilterModal",breakpoints:{"575px":"100%"},"onUpdate:visible":e(Os)}),{header:ue(()=>[n("div",yo,[n("h3",null,L(e(B)("filters.label")),1),n("div",{onClick:Ye(z,["prevent"]),"aria-label":"Close Filters Modal",class:"FilterModal__CloseBtn"},[n("i",{class:ge(e(ds)?"pi pi-chevron-down":"pi pi-times")},null,2)])])]),footer:ue(()=>[n("div",_o,[e(F).isMobile||e(N)?(i(),u("div",ko,[T(e(qe),{disabled:e(we)<1,severity:"secondary",class:"btn-outline radius_sm",onClick:s[0]||(s[0]=Ye(o=>ht(),["prevent"]))},{default:ue(()=>[s[26]||(s[26]=n("i",{class:"pi pi-trash"},null,-1)),e(Tt)?S("",!0):(i(),u(G,{key:0},[ne(L(e(B)("filters.clear")),1)],64))]),_:1},8,["disabled"])])):S("",!0),T(e(qe),{label:e(B)("map.showResults"),class:"btn-filled radius_sm",onClick:Ns},null,8,["label"])])]),default:ue(()=>[n("div",bo,[(i(),K(kl,{key:xe.value,ref:"filtersElement",source:e(N)?"map":"hotels",sliderPriceRange:e(Kt),facilities:e(qt),chains:e(Xe),hotelTypes:e(it),suburbs:e(Ft),place:e(Le),roomAmenities:e(Gt),"filters-loading":e(rt),onChange:e(V),onReset:ht},null,8,["source","sliderPriceRange","facilities","chains","hotelTypes","suburbs","place","roomAmenities","filters-loading","onChange"]))])]),_:1},16,["visible","style","onUpdate:visible"])):S("",!0),e(F).isMobile||e(N)?(i(),u(G,{key:2},[T(e(Fs),{visible:e(me),"onUpdate:visible":[s[4]||(s[4]=o=>As(me)?me.value=o:null),e(js)],modal:"",closable:!1,"show-header":!0,"dismissable-mask":!0,style:Ut({width:"25rem",margin:e(F).isMobile?"0":"auto",overflow:"hidden",maxHeight:"100%"}),class:"filters-mobile FilterModal",position:"bottom",breakpoints:{"575px":"100%"}},{header:ue(()=>[n("div",Io,[n("h3",null,L(e(B)("filters.properties-filter.label")),1),n("div",{onClick:Ye(Is,["prevent"]),"aria-label":"Close Filters Modal",class:"FilterModal__CloseBtn"},s[27]||(s[27]=[n("i",{class:"pi pi-times"},null,-1)]))])]),footer:ue(()=>[n("div",Fo,[n("div",Ao,[T(e(qe),{disabled:!Object.keys(e(te)).some(o=>e(te)[o].length>0),severity:"secondary",onClick:s[3]||(s[3]=Ye(()=>{Us(),ht()},["prevent"])),class:"btn-outline radius_sm"},{default:ue(()=>[s[28]||(s[28]=n("i",{class:"pi pi-trash"},null,-1)),e(Tt)?S("",!0):(i(),u(G,{key:0},[ne(L(e(B)("filters.clear")),1)],64))]),_:1},8,["disabled"])]),T(e(qe),{label:e(B)("map.showResults"),class:"btn-filled radius_sm",onClick:Is},null,8,["label"])])]),default:ue(()=>[n("div",So,[e(Oe)?(i(),K(Ys,{key:xe.value,sync:Pe.value,filtersVisible:Te.value,showAccessibilityFiltersModal:e(me),source:e(N)?"map":"hotels",onChange:e(se),onChangeLocal:e(ie),onHandleSync:s[2]||(s[2]=(o,d)=>{Pe.value=o,Te.value=d})},null,8,["sync","filtersVisible","showAccessibilityFiltersModal","source","onChange","onChangeLocal"])):S("",!0)])]),_:1},8,["visible","style","onUpdate:visible"]),T(e(Fs),{visible:Et.value,"onUpdate:visible":s[6]||(s[6]=o=>Et.value=o),modal:"",closable:!1,"show-header":!0,"dismissable-mask":!0,draggable:!1,style:Ut({width:e(F).isMobile?"100%":"25rem",margin:e(F).isMobile?"0":"auto",overflow:"hidden",maxHeight:"100%"}),class:"sorting-mobile",position:"bottom",breakpoints:{"575px":"100%"}},{header:ue(()=>[n("div",Co,[n("h3",null,L(e(B)("sorting.label")),1),n("div",{onClick:s[5
2]||(s[5]=Ye(o=>Et.value=!1,["prevent"])),"aria-label":"Close Sorting Modal",class:"FilterModal__CloseBtn"},s[29]||(s[29]=[n("i",{class:"pi pi-times"},null,-1)]))])]),default:ue(()=>[n("div",Mo,[(i(!0),u(G,null,ve(Ot.value,o=>(i(),u("div",{key:o.value,class:ge(["sorting-option",{active:e(Ct)===o.value}]),onClick:d=>{is(o.value),Et.value=!1}},[n("div",To,[n("div",Ho,L(o.name),1),e(Ct)===o.value?(i(),u("i",Lo)):S("",!0)])],10,wo))),128))])]),_:1},8,["visible","style"])],64)):S("",!0),e(ye).project.settings?.enableAiHotelSearch===!0?(i(),K(e(Fs),{key:3,visible:e(F).isAiSearchDialogVisible,"onUpdate:visible":s[8]||(s[8]=o=>e(F).isAiSearchDialogVisible=o),modal:"",closable:!0,"show-header":!0,"dismissable-mask":!0,draggable:!1,style:Ut({width:e(F).isMobile?"100%":"36rem",margin:e(F).isMobile?"0":"auto"}),header:e(B)("hotelsPage.aiSearch.tabAi"),position:e(F).isMobile?"top":"center",breakpoints:{"575px":"100%"}},{default:ue(()=>[T(Ha,{contextual:"",onSearch:s[7]||(s[7]=o=>e(F).isAiSearchDialogVisible=!1)})]),_:1},8,["visible","style","header","position"])):S("",!0),n("div",xo,[e(F).isMobile?(i(),u(G,{key:0},[n("div",{class:ge(["filters-list",{"filters-list--with-accessibility":e(Oe),"filters-list--overlay":e(N)}])},[n("div",{class:ge(["filters-list--buttons",{radius_md:e(Tt)}])},[T(e(qe),{class:ge(["filters-list--button",{radius_md:e(Tt)}]),"data-testid":"mobile-filters-button",onClick:s[9]||(s[9]=()=>{hs(),oe.value=!0})},{default:ue(()=>[s[30]||(s[30]=n("i",{class:"pi pi-sliders-h mr-2"},null,-1)),n("span",null,L(e(B)("filters.label")),1),e(we)>0?(i(),u("span",$o,L(e(we)),1)):S("",!0)]),_:1},8,["class"]),e(Oe)?(i(),K(e(qe),{key:0,class:ge(["filters-list--button",{"filters-list--button-icon-only":e(N)}]),onClick:s[10]||(s[10]=()=>me.value=!0)},{default:ue(()=>[n("i",{class:ge(["pi pi-wheelchair",{"mr-2":!e(N)}])},null,2),e(N)?S("",!0):(i(),u("span",Ro,L(e(B)("filters.properties-filter.label")),1)),Object.keys(e(te)).some(o=>e(te)[o].length>0)?(i(),u("span",Vo,L(Object.keys(e(te)).filter(o=>e(te)[o].length>0).length),1)):S("",!0)]),_:1},8,["class"])):S("",!0),e(N)&&e(U)&&e(U).length?(i(!0),u(G,{key:1},ve(e(U),o=>(i(),u("span",{key:o,class:"filters-list__applied-filter radius_sm",onClick:d=>e(je)(o)},[ne(L(e(Js)(e(B)(o),e(B),e(b)))+" ",1),s[31]||(s[31]=n("i",{class:"pi pi-times"},null,-1))],8,Po))),128)):S("",!0)],2),e(N)?S("",!0):(i(),u("div",{key:0,class:ge(["filters-list--sort-dropdown",{"full-width":e(Oe),radius_md:e(Tt)}])},[T(Il,{name:e(Ks).name,filterData:e(f),sourceId:"hotels",attribute:e(Ct),onChange:is,distanceDescription:ts.value},null,8,["name","filterData","attribute","distanceDescription"])],2))],2),e(Oe)&&!e(F).isMobile?(i(),K(Ys,{key:xe.value,sync:Pe.value,filtersVisible:Te.value,showAccessibilityFiltersModal:e(me),source:e(N)?"map":"hotels",onChange:e(se),onChangeLocal:e(ie),onHandleSync:s[11]||(s[11]=(o,d)=>{Pe.value=o,Te.value=d})},null,8,["sync","filtersVisible","showAccessibilityFiltersModal","source","onChange","onChangeLocal"])):S("",!0)],64)):S("",!0),e(U)&&e(U).length&&!e(N)?(i(),u(G,{key:1},[e(F).isMobile?(i(),u("span",qo,[(i(!0),u(G,null,ve(e(U),o=>(i(),u("span",{key:o,class:"filters-list__applied-filter radius_sm",onClick:d=>e(je)(o)},[ne(L(e(Js)(e(B)(o),e(B),e(b)))+" ",1),s[32]||(s[32]=n("i",{class:"pi pi-times"},null,-1))],8,Do))),128))])):S("",!0)],64)):S("",!0),n("div",{class:ge(["grid-container",`${e(N)&&!e(F).isMobile?"MapLayout":e(N)&&e(F).isMobile?"MobileMapFullScreen":""}`])},[e(N)&&e(F).isMobile?(i(),u("div",Bo,[(i(),K(Xs(e(fe)),{ref:"mapAsideRef",hotels:W.value,enableClustering:C.value,refreshedHotels:ls.value,place:e(Le),geometry:e(ot),currencySymbol:Xt.value,checkin:e(P),checkout:e(A),hoveredHotel:$t.value,occupancies:Array.isArray(e(r).query.occupancies)?e(r).query.occupancies[0]:e(r).query.occupancies||void 0,rooms:Array.isArray(e(r).query.rooms)?String(e(r).query.rooms[0]):e(r).query.rooms?String(e(r).query.rooms):void 0,isLoadingHotels:e(pe),isMapFullScreen:!0,trackingId:e(We),accessibilityEnabled:e(Oe),isGuestUser:$e.value,onRefreshHotelList:as,onMapFullScreen:ms,"onToggle:clustering":gs,onVisiblePopupsIds:ys,"onViewport:change":bs,"onMap:userInteraction":_s,"onClick:hotel":s[12]||(s[12]=(o,d)=>e(le)(o.id,d,{isMapClick:!0}))},null,40,["hotels","enableClustering","refreshedHotels","place","geometry","currencySymbol","checkin","checkout","hoveredH
2otel","occupancies","rooms","isLoadingHotels","trackingId","accessibilityEnabled","isGuestUser"])),n("div",{class:"mobile-map-search-hero",onClick:s[14]||(s[14]=Ye(()=>{},["stop"]))},[n("div",Eo,[n("div",Oo,[T(e(qe),{onClick:s[13]||(s[13]=Ye(o=>N.value=!1,["stop"])),class:"filters-list--back-button",severity:"secondary",text:""},{default:ue(()=>[T(Hl,{name:"chevron-left"})]),_:1}),T(aa,{inline:!0,isLabel:!1,source:"hotels"})])])])])):S("",!0),e(N)&&!e(F).isMobile?(i(),u("div",jo,[T(e(qe),{class:"filters-list--button mr-4",onClick:ks},{default:ue(()=>[s[33]||(s[33]=n("i",{class:"pi pi-sliders-h mr-1"},null,-1)),ne(" "+L(e(B)("filters.label"))+" ",1),e(U).length>0?(i(),u("span",No,L(e(U).length),1)):S("",!0)]),_:1}),e(Oe)&&e(Se)&&(e(ae).length>0||e(pe))?(i(),K(e(qe),{key:0,class:"filters-list--button mr-4",onClick:Gs},{default:ue(()=>[s[34]||(s[34]=n("i",{class:"pi pi-sliders-h mr-1"},null,-1)),ne(" "+L(e(B)("filters.properties-filter.label"))+" ",1),Object.keys(e(te)).some(o=>e(te)[o].length>0)?(i(),u("span",Uo,L(Object.keys(e(te)).filter(o=>e(te)[o].length>0).length),1)):S("",!0)]),_:1})):S("",!0),e(ae).length>0||e(pe)?(i(),K(Ei,{key:xe.value,"load-results":e($),"applied-filters-count":e(U).length,"on-reset-filters":ht,class:"flex-grow-1"},null,8,["load-results","applied-filters-count"])):S("",!0),e(ae).length>0||e(pe)?S("",!0):(i(),u("div",zo)),e(N)?(i(),K(Ri,{key:3,modelValue:e(N),"onUpdate:modelValue":[s[15]||(s[15]=o=>As(N)?N.value=o:null),Nt],"hide-in-map-view":!1,"is-map-view":!0},null,8,["modelValue"])):S("",!0)])):S("",!0),e(N)&&e(F).isMobile?S("",!0):(i(),u("div",Qo,[e(N)?S("",!0):(i(),u("div",Wo,[Ue.value?(i(),u("div",{key:0,ref_key:"mapElement",ref:Lt,class:ge(["open-map radius_md",{loading:!e(ot)}]),onClick:s[16]||(s[16]=Ye(o=>ss(),["prevent"])),style:Ut({backgroundImage:Es.value})},[T(l,{class:"icon",icon:"fa-solid fa-location-dot"}),T(e(qe),{class:"flex flex-row gap-2 p-button-rounded p-button-text btn radius_sm"},{default:ue(()=>[ne(L(e(B)("map.showOnMap")),1)]),_:1})],6)):S("",!0),e(Oe)&&!e(F).isMobile?(i(),K(Ys,{key:xe.value,sync:Pe.value,filtersVisible:Te.value,showAccessibilityFiltersModal:e(me),source:e(N)?"map":"hotels",onChange:e(se),onChangeLocal:e(ie),onHandleSync:s[17]||(s[17]=(o,d)=>{Pe.value=o,Te.value=d})},null,8,["sync","filtersVisible","showAccessibilityFiltersModal","source","onChange","onChangeLocal"])):S("",!0),e(F).isMobile?S("",!0):(i(),u("div",{key:2,class:ge(["filters desktop radius_md",{visible:Te.value}]),"data-testid":"filters-container"},[n("div",Go,[n("h3",null,L(e(B)("filters.label")),1),n("div",{onClick:qs,class:"close-filters"},[Te.value?(i(),u("i",Ko)):(i(),u("i",Jo))])]),n("div",{class:ge(["filters-content",{"filters-content--visible":Te.value}])},[(i(),K(kl,{key:xe.value,ref:"filtersElement",source:e(N)?"map":"hotels",sliderPriceRange:e(Kt),facilities:e(qt),chains:e(Xe),hotelTypes:e(it),suburbs:e(Ft),place:e(Le),roomAmenities:e(Gt),"filters-loading":e(rt),onChange:e(V),onReset:ht},null,8,["source","sliderPriceRange","facilities","chains","hotelTypes","suburbs","place","roomAmenities","filters-loading","onChange"]))],2)],2)),e(F).isMobile?S("",!0):(i(),K(di,{key:3,"is-visible":q.value&&(e(ae).length>0||e(pe)),"load-results":e($),"applied-filters-count":e(U).length,"on-reset-filters":ht,onOpenFilters:ks},null,8,["is-visible","load-results","applied-filters-count"]))])),n("div",{class:ge(["HotelList col-12",`${e(N)?`${_t.value||e(F).isMobile?"hidden":"md:col-8 lg:col-7"}`:"md:col-9"}`])},[e(yt)&&!e(pe)&&e(ae).length>0?(i(),u("div",Yo,[s[36]||(s[36]=n("i",{class:"pi pi-info-circle"},null,-1)),n("div",Zo,[n("span",Xo,L(e(B)("hotels.noHotelsInArea")),1),n("span",en,L(e(B)("hotels.noMatches")),1)]),n("button",{class:"banner-close-btn",onClick:s[18]||(s[18]=o=>yt.value=!1)},s[35]||(s[35]=[n("i",{class:"pi pi-times"},null,-1)]))])):S("",!0),n("div",tn,[e(U)&&e(U).length&&!e(F).isMobile&&!e(N)?(i(),K(go,{key:0,badges:e(U).map(o=>({key:o,label:e(Js)(e(B)(o),e(B),e(b))})),"clear-all-label":e(B)("filters.clearAll"),"badge-test-id":"applied-filter",onRemove:s[19]||(s[19]=o=>e(je)(o)),onClearAll:s[20]||(s[20]=o=>e(He)())},null,8,["badges","clear-all-label"])):S("",!0),n("div",sn,[(!e(pe)||e(et))&&!e(O)&&!e(re)?(i(),u("div",ln,[e(ye).project.settings?.hideHotelResultCount?S("",!0):(i(),u("div",an,[e(nt)&&e(nt)!==""?(i(),u(G,{key:0},[ne(L(e(B)("hotels.hotelMatchResults",{number:e(ae).length,place:Zt.value})),1)],64)):(i(),u(G,{key:1},[ne(L(e(B)("hotels.resultsIn",{place:Zt.value})),1)],64))]))])):S("",!0),n("div",on,[e(pe)&&!e(et)?(i(),u(G,{key:0},[e(ye).project.settings?.showAvailableHotelsCount?(i(),u("span",{key:1,class:ge(["flex",`${e(N)?"align-items-start":"align-items-center"}`])},[T(e(fl),{class:"w-1rem h-1rem pr-4"}),ne(" "+L(e(Ts)),1)],2)):(i(),u("span",nn,[T(e(fl),{class:"w-1rem h-1rem pr-4"}),ne(" "+L(e(B)("map.gettingBestDeals")),1)]))],64)):S("",!0)]),e(F).isMobile?S("",!0):(i(),u("div",rn,[e(Zs)&&e(F).canManageMargin?(i(),K(Ta,{key:0,value:e(F).agentMargin,bordered:"",background:""},null,8,["value"])):S("",!0),e(ye).project.settings?.enableAiHotelSearch===!0?(i(),u("button",{key:1,class:"hotel-ai-search-trigger",onClick:s[21]||(s[21]=o=>e(F).isAiSearchDialogVisible=!0)},[s[37]||(s[37]=n("span",{class:"pi pi-sparkles","aria-hidden":"true"},null,-1)),ne(" "+L(e(B)("hotelsPage.aiSearch.tabAi")),1)])):S("",!0),n("div",un,[T(Il,{name:e(Ks).query,filterData:e(Ks),sourceId:"hotels",attribute:e(Ct),onChange:is,distanceDescription:ts.value},null,8,["name","filterData","attribute","distanceDescription"])]),e(N)?S("",!0):(i(),u("div",cn,[Ue.value?(i(),K($l,{key:0,modelValue:e(N),"onUpdate:modelValue":[s[22]||(s[22]=o=>As(N)?N.value=o:null),Nt],options:$s},null,8,["modelValue"])):S("",!0)]))]))]),n("div",dn,[e(O)?(i(),K(e(ba),{key:0,severity:"error"},{default:ue(()=>
2[ne(L(e(O)),1)]),_:1})):S("",!0),e(re)&&!e(pe)&&!bt.value?(i(),K(Ji,{key:1,"pending-query":ut.value,"lookup-failed":ct.value,onSelect:Hs},null,8,["pending-query","lookup-failed"])):!e(ae).length&&!e(pe)&&!bt.value?(i(),u("div",pn,[s[38]||(s[38]=n("div",{class:"image-container"},[n("img",{src:wl})],-1)),n("div",null,[n("h5",null,L(e(B)("hotels.noHotelsFound")),1),n("p",null,L(e(B)("hotels.noMatches")),1)])])):S("",!0),e(pe)||e(ae)&&e(ae).length>0?(i(),u("div",hn,[_.value&&_.value.length>0&&(e(et)||!e(pe))?(i(),u("div",{key:0,ref_key:"parentRef",ref:Jt,style:Ut({height:`${e(wt).getTotalSize()}px`,position:"relative",width:"100%"})},[(i(!0),u(G,null,ve(e(wt).getVirtualItems(),o=>(i(),u("div",{key:String(o.key),"data-index":o.index,ref_for:!0,ref:d=>{d&&e(wt).measureElement(d)},style:Ut([{position:"absolute",top:"0",left:"0",width:"100%"},{transform:`translateY(${o.start-e(wt).options.scrollMargin}px)`}])},[Bt.value[o.index]?.type==="hotel"?(i(),u("div",fn,[T(Ca,{hotel:he(o.index),mini:e(F).isMobile,occupancies:e(Ve),"has-likes":!e(oa)&&e(F).showLoginButton,checkin:e(P),checkout:e(A),"is-liked":e(ia)(he(o.index).id),"is-highlighted":e(Qt)(he(o.index).id,he(o.index).perks),place:e(Le),source:"hotels","tracking-id":e(We),selected:he(o.index).id===e(I),layoutVariant:"list",accessibilityEnabled:e(Oe),isGuestUser:$e.value,id:`listcard-${he(o.index).id}`,showUrgencyMessage:Vs(he(o.index)),"is-loyalty-loading":he(o.index).id?pt.value.includes(he(o.index).id):!1,"onHover:hotel":s[23]||(s[23]=d=>st(d)),"onUnhover:hotel":s[24]||(s[24]=d=>st(null)),onHandleHotelSelection:Ws,showMapLayout:e(N)},null,8,["hotel","mini","occupancies","has-likes","checkin","checkout","is-liked","is-highlighted","place","tracking-id","selected","accessibilityEnabled","isGuestUser","id","showUrgencyMessage","is-loyalty-loading","showMapLayout"])])):(i(),u("div",mn,L(e(B)("hotels.otherHotelsIn",{city:Zt.value})),1))],12,vn))),128))],4)):S("",!0),e(pe)&&!e(et)&&!ls.value.length||bt.value?(i(),u("div",gn,[(i(),u(G,null,ve(Wn,o=>n("div",{class:"w-full",key:o},[Ls.value?(i(),u(G,{key:0},[e(F).isMobile?(i(),u("div",yn,[T(e(Z),{class:"hc-skeleton__media"}),n("div",bn,[n("div",_n,[n("div",kn,[(i(),u(G,null,ve(4,d=>T(e(Z),{key:d,width:"14px",height:"14px"})),64))]),T(e(Z),{width:"85%",height:"1.5rem"}),T(e(Z),{width:"60%",height:"0.9rem"}),n("div",In,[T(e(Z),{width:"92px",height:"1.4rem",borderRadius:"8px"}),T(e(Z),{width:"72px",height:"1.4rem",borderRadius:"8px"})])]),n("div",Sn,[T(e(Z),{width:"40%",height:"1.7rem"}),n("div",Fn,[T(e(Z),{width:"72px",height:"0.8rem"}),T(e(Z),{width:"96px",height:"0.7rem"})])])])])):(i(),u("div",An,[T(e(Z),{class:"hc-skeleton__media"}),n("div",Cn,[n("div",Mn,[n("div",wn,[(i(),u(G,null,ve(4,d=>T(e(Z),{key:d,width:"14px",height:"14px"})),64))]),T(e(Z),{width:"80%",height:"1.6rem"}),T(e(Z),{width:"55%",height:"0.9rem"}),n("div",Tn,[T(e(Z),{width:"96px",height:"1.5rem",borderRadius:"8px"}),T(e(Z),{width:"76px",height:"1.5rem",borderRadius:"8px"})]),T(e(Z),{width:"40%",height:"1.5rem"})]),n("div",Hn,[n("div",Ln,[n("div",xn,[T(e(Z),{width:"68px",height:"0.8rem"}),T(e(Z),{width:"48px",height:"0.7rem"})]),T(e(Z),{width:"34px",height:"34px",borderRadius:"8px"})]),n("div",$n,[T(e(Z),{width:"80%",height:"1.6rem"}),T(e(Z),{width:"55%",height:"0.8rem"}),T(e(Z),{width:"100%",height:"2.5rem",borderRadius:"10px"})])])])]))],64)):(i(),u(G,{key:1},[e(F).isMobile?(i(),u("div",Rn,[T(e(Z),{class:"skeleton-img radius_md",style:{"min-width":"160px","max-height":"100%","aspect-ratio":"9/16",height:"100%",width:"auto"}}),n("div",Vn,[n("div",Pn,[n("div",qn,[(i(),u(G,null,ve(5,d=>
2T(e(Z),{key:d,width:"1rem",height:"1rem"})),64))]),T(e(Z),{width:"80%",height:"1.75rem"}),T(e(Z),{width:"2rem",height:"2rem",shape:"circle"})]),n("div",Dn,[T(e(Z),{width:"40%",height:"4rem"})])])])):(i(),u("div",Bn,[T(e(Z),{class:"skeleton-img radius_md",width:"220px",height:"220px",style:{"min-width":"220px"}}),n("div",En,[n("div",On,[n("div",jn,[n("div",Nn,[(i(),u(G,null,ve(5,d=>T(e(Z),{key:d,width:"1rem",height:"1rem"})),64))]),T(e(Z),{width:"80%",height:"1.75rem"}),T(e(Z),{width:"70%",height:"1rem"}),T(e(Z),{width:"35%",height:"1.5rem"})]),T(e(Z),{width:"2rem",height:"2rem",shape:"circle"})]),n("div",Un,[T(e(Z),{width:"100%",height:"4rem"})])])]))],64))])),64))])):S("",!0)])):S("",!0)])])],2),e(N)&&!e(F).isMobile?(i(),u("div",{key:1,class:ge(["MapLayout__Map",`${_t.value?"w-full":"md:col-4 lg:col-5"}`])},[(i(),K(Xs(e(fe)),{ref:"mapAsideRef",hotels:W.value,enableClustering:C.value,refreshedHotels:ls.value,place:e(Le),geometry:e(ot),currencySymbol:Xt.value,checkin:e(P),checkout:e(A),hoveredHotel:$t.value,occupancies:Array.isArray(e(r).query.occupancies)?e(r).query.occupancies[0]:e(r).query.occupancies||void 0,rooms:Array.isArray(e(r).query.rooms)?String(e(r).query.rooms[0]):e(r).query.rooms?String(e(r).query.rooms):void 0,isLoadingHotels:e(pe),isMapFullScreen:_t.value,trackingId:e(We),accessibilityEnabled:e(Oe),isGuestUser:$e.value,onRefreshHotelList:as,onMapFullScreen:ms,"onToggle:clustering":gs,onVisiblePopupsIds:ys,"onViewport:change":bs,"onMap:userInteraction":_s,"onClick:hotel":s[25]||(s[25]=(o,d)=>e(le)(o.id,d))},null,40,["hotels","enableClustering","refreshedHotels","place","geometry","currencySymbol","checkin","checkout","hoveredHotel","occupancies","rooms","isLoadingHotels","isMapFullScreen","trackingId","accessibilityEnabled","isGuestUser"]))],2)):S("",!0)]))],2)])],64)}}}),Kn=Ae(Gn,[["__scopeId","data-v-4b206493"],["__file","HotelsListLayoutList.vue"]]),Jn=Ce({__name:"Hotels",setup(g){return(R,y)=>(i(),K(Kn))}}),Ir=Ae(Jn,[["__scopeId","data-v-b0ffa516"],["__file","Hotels.vue"]]);export{Ir as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.