PageSourceSearch

https://invitedhome.com/_nuxt/YHL2eT3h.js

js invitedhome.com collected 2026-09-26 04:15:30 UTC 7,088 bytes, 1 lines download raw bytes

1import{e as W}from"./BMEOSp_Q.js";import{e as E,f,r as F,j as U,Q as Y,c as v,o as h,g as B,h as t,_ as O,s as G,x as M,a as r,b as _,w as g,t as m,D as j,p as q,n as J}from"./Otvr6JEh.js";import{u as K,r as X,_ as Z,a as ee,b as te,c as oe}from"./rAMrkqeV.js";import{_ as se}from"./DmUTN6yz.js";import{u as ae}from"./BpOkoZr_.js";import{e as Q}from"./CPXNqRXO.js";import{u as N}from"./BAXrNrVU.js";import{_ as ne,a as re}from"./DlluXj5P.js";import{u as ce}from"./DlkUXkUn.js";const ie={class:"video-background"},le=["src"],ue=["src"],de=E({__name:"VideoBackground",props:{provider:{},value:{}},setup(C){const o=C,u=f(()=>{var c;return((c=W(o.value))==null?void 0:c.id)??o.value}),s=F(null),l=()=>{if(!s.value)return;const c=16/9;window.innerWidth/window.innerHeight>c?(s.value.style.width="100%",s.value.style.height=`${window.innerWidth/c}px`):(s.value.style.height="100%",s.value.style.width=`${window.innerHeight*c}px`)};return U(()=>{l(),window.addEventListener("resize",l)}),Y(()=>{window.removeEventListener("resize",l)}),(c,d)=>(h(),v("div",ie,[c.provider==="youtube"?(h(),v("iframe",{key:0,ref_key:"videoIframe",ref:s,src:`https://www.youtube.com/embed/${t(u)}?autoplay=1&controls=0&disablekb=1&loop=1&modestbranding=1&playsinline=1&color=white&mute=1&playlist=${t(u)}`,frameborder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:""},null,8,le)):c.provider==="vimeo"?(h(),v("iframe",{key:1,ref_key:"videoIframe",ref:s,src:`https://player.vimeo.com/video/${t(u)}?autoplay=1&controls=0&muted=1&loop=1`,frameborder:"0",referrerpolicy:"strict-origin-when-cross-origin",allow:"autoplay; fullscreen; clipboard-write; encrypted-media; web-share",allowfullscreen:""},null,8,ue)):B("",!0)]))}}),_e=O(de,[["__scopeId","data-v-e068d2cf"]]),he={class:"search-bar-segment"},pe={class:"search-bar-trigger"},me={class:"search-bar-trigger-label"},ve={class:"search-bar-trigger-value"},fe={class:"search-bar-segment"},ge={class:"search-bar-trigger"},we={class:"search-bar-trigger-label"},be={class:"search-bar-trigger-value"},ye={class:"search-bar-segment"},ke={class:"search-bar-trigger"},$e={class:"search-bar-trigger-label"},xe={class:"search-bar-trigger-value"},Se=48,Be=E({__name:"SearchBar",setup(C){const o=ae().getTranslation("search-hero"),u=Q(),s=K(),{activeQuery:l,townsList:c}=G(u),{localeProperties:d}=M(),{guestsBedrooms:z,filterCalendarFlexibleTypes:A}=X(),I=N(),{desktop:P}=G(I),$=F(null),w=f(()=>{const i=l.value.towns||"";if(!i)return null;const e=i.split(","),n=(c.value||[]).filter(a=>e.includes(a.slug)).map(a=>a.name);return n.length?n.join(", "):null}),D=f(()=>{var p;const i=l.value.check_in||null,e=l.value.check_out||null;if(i&&e){const b=new Date(i.replace(/-/g,"/")),y=new Date(e.replace(/-/g,"/")),k={month:"short",day:"numeric"};return`${b.toLocaleDateString(d.value.iso,k)} - ${y.toLocaleDateString(d.value.iso,k)}`}const n=l.value.flex_period||null,a=l.value.flex_months||null;if(n&&a){const b=a.split(","),y={month:"short"},k=b.map(S=>new Date(`${S.replace(/-/g,"/")}/01`).toLocaleDateString(d.value.iso,y));return`${(p=A.value.find(S=>S.slug===n))==null?void 0:p.title} · ${k.join(", ")}`}return null}),L=f(()=>{const i=l.value.guests??"0",e=l.value.bedrooms??"0";return i!=="0"||e!=="0"?z(i,e):null}),x=()=>new Promise(i=>{if(!$.value)return i();const e=$.value.getBoundingClientRect().top+window.scrollY-Se-20;window.scrollTo({top:e,behavior:"smooth"}),setTimeout(i,400)}),T=f(()=>w.value?o.searchButton??"Search":o.searchAllButton??"Search All"),R=async()=>{s.setOpened(""),await u.goToResults()};return(i,e)=>{const n=ee,a=Z,p=te,b=oe,y=se;return h(),v("div",{ref_key:"searchBarRoot",ref:$,class:"search-bar"},[r("div",he,[_(a,{name:"hero-destination",title:t(o).destinationLabel??"Destination",horizontal:"left","z-index":2,"before-open":x},{trigger:g(()=>[r("div",pe,[r("span",me,m(t(o).destinationLabel??"Destination"),1),r("span",ve,m(t(w)||(t(o).destinationPlaceholder??"Choose a mountain town")),1)])]),default:g(()=>[_(n)]),_:1},8,["title"])]),r("div",fe,[_(a,{name:"hero-calendar",horizontal:t(P)?"center":"left",title:t(o).datesLabel??"Check In | Check Out","z-index":2,"before-open":x},{trigger:g(()=>[r("div",ge,[r("span",we,m(t(o).datesLabel??"Check In | Check Out"),1),r("span",be,m(t(D)||(t(o).datesPlaceholder??"Add dates")),1)])]),default:g(()=>[_(p,{"check-initial":!0,"close-on-search":!0,"auto-apply":!0})]),_:1},8,["horizontal","title"])]),r("div",ye,[_(a,{title:t(o).guestsLabel??"Guests | Bedrooms",name:"hero-guests","z-index":2,"before-open":x},{trigger:g(()=>[r("div",ke,[r("span",$e,m(t(o).guestsLabel??"Guests | Bedrooms"),1),r("span",xe,m(t(L)||(t(o).guestsPlaceholder??"Add guests")),1)])]),default:g(()=>[_(b)]),_:1},8,["title"])]),_(y,{class:"search-bar-submit",text:t(T),onClick:R},null,8,["text"])],512)}}}
1),De=O(Be,[["__scopeId","data-v-03a0a93e"]]),Ce={key:0,class:"search-hero__wrapper"},Ie={key:1,class:"search-hero-image"},Le=["src","alt"],Te={class:"search-hero-content"},Re={key:0,class:"search-hero-eyebrow"},ze={key:1,class:"search-hero-title"},Ae={key:2,class:"search-hero-subtitle"},Pe=E({__name:"SearchHero",props:{data:{default:void 0}},async setup(C){var L,x,T,R,i;let o,u;const s=C,l=N(),{desktop:c}=G(l),d=Q(),{locale:z,localeProperties:A}=M(),I=f(()=>{var e;return((e=s.data)==null?void 0:e.alignment)??"left"}),P=f(()=>I.value==="left"&&c.value?1:0),$=f(()=>{var n,a,p;return(c.value?(n=s.data)==null?void 0:n.desktopVideo:((a=s.data)==null?void 0:a.mobileVideo)||((p=s.data)==null?void 0:p.desktopVideo))||null}),w=f(()=>{var e,n,a;return c.value?(e=s.data)==null?void 0:e.desktopImage:((n=s.data)==null?void 0:n.mobileImage)||((a=s.data)==null?void 0:a.desktopImage)}),{data:D}=([o,u]=j(()=>ce(`${z.value}__home-search-hero`,()=>$fetch(`/api/search?locale=${A.value.iso}`))),o=await o,u(),o);return d.setTownsList((L=D.value)==null?void 0:L.towns),d.setMaxBedrooms({list:(x=D.value)==null?void 0:x.units}),d.setMaxGuests({list:(T=D.value)==null?void 0:T.units}),!d.activeQuery.towns&&((i=(R=s.data)==null?void 0:R.defaultDestinations)!=null&&i.length)&&([o,u]=j(()=>d.filterTowns(s.data.defaultDestinations.map(e=>e.slug).join(","))),await o,u()),(e,n)=>{var k;const a=_e,p=De,b=re,y=ne;return e.data?(h(),v("div",Ce,[t($)?(h(),q(a,{key:0,provider:((k=e.data)==null?void 0:k.videoProvider)??"youtube",value:t($)},null,8,["provider","value"])):t(w)?(h(),v("div",Ie,[r("img",{class:"search-hero-image-element",src:t(w).url,alt:t(w).alt||t(w).title||"",fetchpriority:"high"},null,8,Le)])):B("",!0),n[0]||(n[0]=r("div",{class:"search-hero-overlay"},null,-1)),r("div",Te,[_(y,{push:t(P)},{default:g(()=>[_(b,{size:"11"},{default:g(()=>{var V,S,H;return[r("div",{class:J(["search-hero-inner",`search-hero-inner--${t(I)}`])},[(V=e.data)!=null&&V.eyebrow?(h(),v("p",Re,m(e.data.eyebrow),1)):B("",!0),(S=e.data)!=null&&S.title?(h(),v("h1",ze,m(e.data.title),1)):B("",!0),(H=e.data)!=null&&H.subtitle?(h(),v("p",Ae,m(e.data.subtitle),1)):B("",!0),_(p)],2)]}),_:1})]),_:1},8,["push"])])])):B("",!0)}}}),Ne=O(Pe,[["__scopeId","data-v-9e9ff63f"]]);export{Ne as _};

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.