1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11928],{1375:(e,t,o)=>{"use strict";o.d(t,{G:()=>r,j:()=>s});var l=o(9966);let r=l.d4.withTypes(),s=l.wA.withTypes()},8875:(e,t,o)=>{"use strict";o.d(t,{A:()=>R});var l=o(54568),r=o(64889),s=o(1375),a=o(23117),n=o(48954),i=o(54683),c=o(75087),d=o(80237),u=o(13671),m=o(7620),h=o(9966),g=o(85378);let p={MAX_ROOMS:9,MAX_ADULTS_PER_ROOM:2,MAX_CHILDREN_PER_ROOM:2,MAX_CHILD_AGE:17,EXTRA_BED_REQUIRED_AGE:12},R=e=>{let{open:t,hideTrigger:o,panelAnchorElementId:R,centered:S=!1,layoutOverride:f,onOpenChange:b}=e,{t:x}=(0,r.useTranslation)("home"),A=(0,n.x)(),E=f?"mobile"===f:A.isMobile,v=f?"tablet"===f:A.isTablet,w=(0,s.j)(),[y,C]=(0,m.useState)(!1),[O,T]=(0,m.useState)([]),P=(0,h.d4)(e=>e.searchBox.rooms),N=(0,m.useMemo)(()=>(0,g.oW)(P),[P]),_=(0,m.useCallback)(e=>{let t=(0,g.wE)(e);w((0,a.n)(t))},[w]),I=(0,m.useCallback)(()=>{T((0,g.oW)(P)),C(!0)},[P]),B=(0,m.useCallback)(()=>{w((0,a.n)((0,g.wE)(O))),C(!1),null==b||b(!1,"more-options")},[O,w,b]),L=(0,m.useCallback)(()=>{C(!1),null==b||b(!1,"dismiss")},[b]),j=(0,m.useMemo)(()=>({heading:x("PersonsRoomsSelector.Rooms"),roomTitle:x("PersonsRoomsSelector.Room"),adults:x("PersonsRoomsSelector.Adult"),children:x("PersonsRoomsSelector.Children"),accommodation:x("PersonsRoomsSelector.Accommodation"),singleRoom:x("PersonsRoomsSelector.SingleRoom"),doubleRoom:x("PersonsRoomsSelector.DoubleRoom"),inExtraBed:x("PersonsRoomsSelector.ChildAccomodationType.ExtraBed"),extraBedError:x("PersonsRoomsSelector.ValidationResult.PleaseSelectOneExtraBed"),extraBedAgeError:x("PersonsRoomsSelector.ValidationResult.PleaseAdjustAccomodationToMatchAge"),addRoom:x("PersonsRoomsSelector.AddRoom"),room:[x("Search.RoomSingular"),x("Search.RoomPlural")],adult:[x("PersonsRoomsSelector.Adult"),x("PersonsRoomsSelector.Adults")],child:[x("PersonsRoomsSelector.Child"),x("PersonsRoomsSelector.Children")],childAge:e=>0===e?x("PersonsRoomsSelector.AgeChild1"):1===e?x("PersonsRoomsSelector.AgeChild2"):x("PersonsRoomsSelector.AgeChildWithIndex",{index:e+1}),removeRoom:e=>x("PersonsRoomsSelector.RemoveRoom",{roomNumber:e}),removeChild:(e,t)=>x("PersonsRoomsSelector.RemoveChild",{roomNumber:e,childIndex:t+1}),decreaseAdults:x("AccessibilityText.SearchBox.DecreaseAdult"),increaseAdults:x("AccessibilityText.SearchBox.IncreaseAdult"),decreaseChildren:x("AccessibilityText.SearchBox.DecreaseChildren"),increaseChildren:x("AccessibilityText.SearchBox.IncreaseChildren"),decreaseChildAge:x("AccessibilityText.SearchBox.DecreaseChildAge"),increaseChildAge:x("AccessibilityText.SearchBox.IncreaseChildAge")}),[x]),M=(0,m.useMemo)(()=>(0,i.Qu)(O,p.EXTRA_BED_REQUIRED_AGE),[O]),D=(0,m.useMemo)(()=>({heading:x("Search.NumberOfPersonsAndRooms"),moreOptions:x("Search.MoreOptions"),close:x("Search.Close"),person:[x("Search.PersonSingular"),x("Search.PersonPlural")],room:[x("Search.RoomSingular"),x("Search.RoomPlural")]}),[x]),k=()=>({adults:1,type:"single",children:[]}),G=[{label:x("Search.OneAdultOneSingleRoom"),rooms:[k()]},{label:x("Search.TwoAdultsTwoSingleRooms"),rooms:[k(),k()]},{label:x("Search.OneAdultOneDoubleRoom"),rooms:[{adults:1,type:"double",children:[]}]},{label:x("Search.TwoAdultsOneDoubleRoom"),rooms:[{adults:2,type:"double",children:[]}]}];return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.Ay,{value:N,presets:G,onValueChange:_,onMoreOptions:I,labels:D,open:!y&&t,hideTrigger:o,panelAnchorElementId:R,panelAnchorEdge:"top",onOpenChange:(e,t)=>
1{"more-options"!==t&&(null==b||b(e,t))},useAnchoredOverlay:!1,useDropdownInsideBackdrop:E||v,triggerClassName:"w-[352px] px-0! py-[16px]!",dropdownClassName:"desktop"===f?"absolute! inset-x-auto! bottom-auto! left-0! top-0! w-[352px]! translate-x-0! translate-y-0! rounded-12!":S?"md:fixed! md:left-1/2! md:top-1/2! md:-translate-x-1/2! md:-translate-y-1/2!":"lg:left-0! lg:top-0!"}),(0,l.jsx)(u.a,{open:y,onClose:L,title:x("Search.NumberOfPersonsAndRooms"),width:"lg",centerTitle:!0,scrollable:!0,actions:(0,l.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-end gap-8",children:[(0,l.jsx)("div",{className:"flex-1"}),(0,l.jsx)(c.R,{variant:"secondary",size:"sm",onClick:L,"aria-label":x("PersonsRoomsSelector.CancelButton"),children:x("PersonsRoomsSelector.CancelButton")}),(0,l.jsx)(c.R,{variant:"primary",size:"sm",onClick:B,disabled:M,"aria-label":x("PersonsRoomsSelector.SearchButton"),children:x("PersonsRoomsSelector.SearchButton")})]}),children:(0,l.jsxs)("div",{children:[(0,l.jsx)(i.Ay,{value:O,onValueChange:T,labels:j,maxRooms:p.MAX_ROOMS,maxAdultsPerRoom:p.MAX_ADULTS_PER_ROOM,maxChildrenPerRoom:p.MAX_CHILDREN_PER_ROOM,maxChildAge:p.MAX_CHILD_AGE,extraBedRequiredAge:p.EXTRA_BED_REQUIRED_AGE}),(0,l.jsx)(c.R,{variant:"link",size:"sm",href:x("common:Menu.Links.BookGroupTravel"),as:"a",target:"_blank",rel:"noopener noreferrer","aria-label":x("PersonsRoomsSelector.BookGroupLink"),children:x("PersonsRoomsSelector.BookGroupLink")})]})})]})}},11928:(e,t,o)=>{"use strict";o.d(t,{default:()=>f});var l=o(54568),r=o(92508),s=o(14765),a=o(96442),n=o(7620),i=o(9966),c=o(70487),d=o(36544),u=o(8875),m=o(35891),h=o.n(m),g=o(68392);let p=(0,a.default)(()=>Promise.all([o.e(78236),o.e(64445),o.e(34381),o.e(44020)]).then(o.bind(o,44020)),{loadableGenerated:{webpack:()=>[44020]}}),R=(0,a.default)(()=>Promise.all([o.e(78236),o.e(64445),o.e(61063),o.e(19074)]).then(o.bind(o,19074)),{loadableGenerated:{webpack:()=>[19074]}}),S=(0,a.default)(()=>Promise.all([o.e(78236),o.e(17995),o.e(18950)]).then(o.bind(o,18950)),{loadableGenerated:{webpack:()=>[18950]}}),f=(0,i.Ng)(e=>{let{searchBox:t}=e;return{arrivalHotel:t.arrival,departureHotel:t.departure}},{setDateRange:s.I})(e=>{let[t,o]=(0,n.useState)(),[s,a]=(0,n.useState)(),[i,m]=(0,n.use
1State)(!1),f=e.showFiltersButton,b=(0,n.useRef)(null),x=(0,r.YA)();(0,n.useEffect)(()=>{o(e.arrivalHotel),a(e.departureHotel)},[e.arrivalHotel,e.departureHotel]);let A=(t,o)=>{e.setDateRange(t,o),setTimeout(()=>{var e;null==(e=b.current)||e.focus()},0)},E=e.useNewCalendarWrapper?(0,l.jsx)(R,{arrival:t,departure:s,setDateRange:A,setShowDatePicker:m,layoutOverride:"mobile"===x?"bottom-sheet":"modal-compact",centered:"tablet"===x}):(0,l.jsx)(p,{arrival:t,departure:s,setDateRange:A,setShowDatePicker:m});return(0,l.jsx)("div",{className:e.className,children:(0,l.jsxs)("div",{className:h().searchinput,children:[!e.hideDestinationSearch&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:h().inputField,children:(0,l.jsx)(d.A,{})}),(0,l.jsx)("div",{className:h().separator})]}),(0,l.jsxs)("div",{className:h().inputField,children:[(0,l.jsx)(c.A,{ref:b,arrival:t,departure:s,setShowDatePicker:m}),i&&(0,l.jsx)(n.Suspense,{children:E})]}),(0,l.jsx)("div",{className:h().separator}),(0,l.jsx)("div",{className:h().inputField,children:(0,l.jsx)(u.A,{})}),f?(0,l.jsx)(S,{className:h().filtersButton}):(0,l.jsx)("div",{className:h().filtersPlaceholder}),!e.hideSearchButton&&(0,l.jsx)("div",{children:(0,l.jsx)(g.A,{forceHotelListView:!0,doNotDisableButton:e.doNotDisableButton})})]})})})},35891:e=>{e.exports={searchinput:"SearchBox_searchinput__qNHit",inputField:"SearchBox_inputField__DPp5n",separator:"SearchBox_separator__82tU_",filtersPlaceholder:"SearchBox_filtersPlaceholder__nudG7",filtersButton:"SearchBox_filtersButton__4jQ9M"}},36544:(e,t,o)=>{"use strict";o.d(t,{A:()=>P});var l=o(54568),r=o(48954),s=o(69975),a=o(76906),n=o.n(a),i=o(7620),c=o(9966),d=o(23134),u=o(16752),m=o(64889),h=o(69406),g=o(40169),p=o(2739),R=o(77462),S=o(59545),f=o(37151),b=o(32016),x=o(26215),A=o(92919),E=o(11509),v=o(28828);let w=["LOCATION","HOTEL","AIRPORT_TRAINSTATION","POI","EXTERNAL_POI"],y={LOCATION:{id:"location",label:e=>e.location,column:1,icon:(0,l.jsx)(S.P,{})},HOTEL:{id:"hotel",label:e=>e.hotel,column:2,icon:(0,l.jsx)(f.q,{})},AIRPORT_TRAINSTATION:{id:"transit",label:e=>e.transit,column:1,icon:(0,l.jsx)(b.u,{})},POI:{id:"poi",label:e=>e.poi,column:2,icon:(0,l.jsx)(x.g,{})},EXTERNAL_POI:{id:"additional",label:e=>e.additional,column:2,icon:(0,l.jsx)(A.K,{})}},C={id:"recommendation",label:e=>e.recommendation,column:1,icon:(0,l.jsx)(E.r,{})};function O(e,t){var o,l,r,s,a,n,i;let c=null!=(i=null!=(n=null!=(a=null!=(s=null==(o=e.hotelId)?void 0:o.toString())?s:null==(l=e.locationId)?void 0:l.toString())?a:null==(r=e.poiId)?void 0:r.toString())?n:e.externalId)?i:"u";return"".concat(e.group,"-").concat(c,"-").concat(t)}let T=e=>e?e.additionalName?"".concat(e.suggestion,", ").concat(e.additionalName):e.suggestion:"",P=(0,c.Ng)(e=>{let{searchBox:t}=e;return{destinations:t.searchResults.destinations,searchResults:t.searchResults,isSearchInputValid:t.isSearchInputValid,selectedResult:t.selectedResult}},{fetchResults:g.Jf,selectResult:g.wf})(e=>{var t,o,a,c;let{t:g,i18n:S}=(0,m.useTranslation)(["home","common"]),f=(0,r.x)(),b=e.layoutOverride?"mobile"===e.layoutOverride:f.isMobile,x=e.layoutOverride?"tablet"===e.layoutOverride:f.isTablet,A=u.T.featureFlags.activateNewBenefitsCommunication?g("Search.SearchTitleNew"):g("Search.SearchTitle"),E=u.T.featureFlags.activateNewBenefitsCommunication?g("Search.SearchDefaultTextNew"):g("Search.SearchDefaultText"),P=T(e.selectedResult),[N,_]=(0,i.useState)(()=>P),[I,B]=(0,i.useState)(void 0);(0,i.useEffect)(()=>{e.selectedResult?_(T(e.selectedResult)):_("")},[e.selectedResult]);let L=(0,i.useMemo)(()=>({location:g("Search.Location"),hotel:g("Search.Hotel"),transit:g("Search.TrainstationAirport"),poi:g("Search.PointOfInterest"),additional:g("Search.Address"),recommendation:g("Search.Recommendation")}),[g]),j=(0,i.useMemo)(()=>(function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",l=new Map;e.forEach(e=>{let t="HKEY"===e.group?"HOTEL":e.group,o=l.get(t);o?o.push(e):l.set(t,[e])});let r=[],s=new Map;if(o.trim().length>=2){let l=e.filter(e=>e.suggestion.toLowerCase().includes(o.toLowerCase()));if(l.length>0&&l.length<=3){let e=l.map((e,t)=>{let o="recommendation-".concat(O(e,t));return s.set(o,e),{id:o,name:e.suggestion,secondary:e.additionalName}});r.push({id:C.id,label:C.label(t),column:C.column,icon:C.icon,items:e})}}
1return w.forEach(e=>{let o=l.get(e);if(!o||0===o.length)return;let a=y[e],n=o.map((e,t)=>{let o=O(e,t);return s.set(o,e),{id:o,name:e.suggestion,secondary:e.additionalName}});r.push({id:a.id,label:a.label(t),column:a.column,icon:a.icon,items:n})}),{sections:r,itemToResultMap:s}})(e.destinations,L,e.searchResults.query),[e.destinations,e.searchResults.query,L]),M=(0,i.useMemo)(()=>(function(e){let t=(0,v.s)(),o=new Map;if(0===t.length)return{sections:[],itemToResultMap:o};let l=y.LOCATION,r=t.map((e,t)=>{let l=O(e,t);return o.set(l,e),{id:l,name:e.suggestion,secondary:e.additionalName}});return{sections:[{id:l.id,label:l.label(e),column:l.column,icon:l.icon,items:r}],itemToResultMap:o}})(L),[L]),D=e.searchResults.query.length>1,k=e.destinations.length>0||D?j.sections:M.sections,G=(0,i.useMemo)(()=>{let e=new Map;return j.itemToResultMap.forEach((t,o)=>{e.set(o,t)}),M.itemToResultMap.forEach((t,o)=>{e.set(o,t)}),e},[j.itemToResultMap,M.itemToResultMap]),H=(0,i.useCallback)(async t=>{if(!t.id)return;let o=G.get(t.id);if(o)if(_(o.additionalName&&o.suggestion.includes(o.additionalName)?o.suggestion:o.additionalName?"".concat(o.suggestion,", ").concat(o.additionalName):o.suggestion),!o.externalId||o.latitude||o.longitude)e.selectResult(o);else{let t=await p.N.getGoogleDetailSuggestion(o.externalId,S.language);if(t&&t.latitude&&t.longitude){let l={...o,latitude:t.latitude,longitude:t.longitude};e.selectResult(l),h.Vy.log({message:"google detail request successful",source:h._q.DestinationList,selectedResult:o,latitude:t.latitude,longitude:t.longitude})}else h.Vy.error("google detail request failed",{source:h._q.DestinationList,selectedResult:o})}},[G,S.language,e]),q=(0,i.useCallback)(n()(async t=>{if(t.startsWith("#")){let o=+t.replaceAll("#","");if(o>0){let l={suggestion:t,hotelId:o,additionalName:"search by hotel id",group:"HKEY"};l.locationId=await R.V.getLocationForHotelId(o),e.selectResult(l)}return}e.fetchResults(t)},200),[]);(0,i.useEffect)(()=>()=>q.cancel(),[q]);let F=(0,i.useCallback)(t=>{if(_(t),!t){q.cancel(),e.fetchResults("");return}q(t)},[q,e]),X=(0,i.useCallback)(t=>{let{destinations:o,query:l}=e.searchResults,r=o.filter(e=>e.suggestion.toLowerCase().includes(l.toLowerCase())),s=r.length>0&&r.length<=3?r[0]:o.find(e=>"LOCATION"===e.group);if(s)return t.find(e=>e.id&&G.get(e.id)===s)},[G,e.searchResults]),V=(0,i.useCallback)(()=>"undefined"!=typeof navigator&&"geolocation"in navigator?(B(void 0),new Promise(t=>{navigator.geolocation.getCurrentPosition(o=>{let l=g("Search.SearchByGeolocation"),r={suggestion:l,group:"LOCATION",latitude:o.coords.latitude,longitude:o.coords.longitude};_(l),e.selectResult(r),t(l)},e=>{e.code===e.PERMISSION_DENIED?B(g("Search.GeoPositionPermissionDenied")):(e.code===e.POSITION_UNAVAILABLE||e.code===e.TIMEOUT)&&(B(g("Search.GeoPositionUnavailable")),h.Vy.error(e.message,{code:e.code,source:h._q.DestinationList})),t(void 0)})})):Promise.resolve(void 0),[g,e]),U=e.selectedResult?"".concat(e.selectedResult.suggestion,"-").concat(e.selectedResult.additionalName||""):"no-selection";return(0,l.jsxs)("div",{className:"w-full",children:[(0,l.jsx)(s.P,{sections:k,suggestions:M.sections,onSelect:H,waitForSelectionBeforeClose:null==(a=e.waitForSelectionBeforeClose)||a,getAutoSelectItem:X,onQueryChange:F,filter:!1,showCurrentLocation:b||x,currentLocationLabel:g("Search.SearchByGeolocation"),onUseCurrentLocation:V,errorText:I,label:A,mobileTitle:g("Search.SearchTitle"),resultsLabel:g("Search.SearchTitle"),placeholder:E,defaultQuery:e.selectedResult?P:N,defaultSelectedLabel:null!=(c=null==(t=e.selectedResult)?void 0:t.suggestion)?c:N,defaultSelectedSecondaryLabel:null==(o=e.selectedResult)?void 0:o.additionalName,open:e.open,hideTrigger:e.hideTrigger,lockScroll:e.lockScroll,panelAnchorElementId:e.panelAnchorElementId,layoutOverride:e.layoutOverride,panelAnchorEdge:"bottom",wrapperClassName:e.wrapperClassName,onOpenChange:e.onOpenChange,renderSelectedItem:e=>(0,l.jsxs)("span",{className:"block w-full truncate whitespace-nowrap text-subheading-sm-semibold text-default",children:[e.name,e.secondary?(0,l.jsxs)(l.Fragment,{children:[", ",(0,l.jsx)("span",{className:"text-caption-md-semibold",children:e.secondary})]}):null]})},U),!e.hideTrigger&&!e.isSearchInputValid&&(0,l.jsx)("div",{className:"mt-2",children:(0,l.jsx)(d.A,{variant:"body2",colors:"status-error-light-500",role:"alert",style:{margin:0},children:g("Search.MissingDestinationError")})})]})})},85378:(e,t,o)=>{"use strict";o.d(t,{oW:()=>n,wE:()=>i});var l=o(19458),r=o(79342);function s(e){if(!e)throw TypeError("room is required");return{adults:e.numberOfAdults,type:e.type===l.C.SINGLEROOM?"single":"double",children:(e.children||[]).map(e=>({age:e.age,extraBed:e.type===r.A.ExtraBed}))}}function a(e){if(!e)throw TypeError("occupancy is required");if(!["single","double"].includes(e.type))throw Error("invalid room type: ".concat(e.type));return{numberOfAdults:e.adults,type:"single"===e.type?l.C.SINGLEROOM:l.C.DOUBLEROOM,children:(e.children||[]).map(e=>({age:e.age,type:e.extraBed?r.A.ExtraBed:r.A.ParentsBed}))}}function n(e){if(!e)throw TypeError("rooms is required");return e.map(s)}function i(e){if(!e)throw TypeError("occupancies is required");return e.map(a)}},92508:(e,t,o)=>{"use strict";o.d(t,{GY:()=>s,YA:()=>i,bK:()=>c,oK:()=>n});var l=o(54568),r=o(7620);let s=-50;function a(e){let[t,o]=(0,r.useState)("mobile");return(0,r.useLayoutEffect)(()=>{let t=()=>{let t=window.innerWidth;o(t>=e?"desktop":t>=768?"tablet":"mobile")};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]),t}function n(){return a(1216)}function i(){return a(992)}let c=e=>{let{id:t,segment:o,verticalSegment:s,anchorKey:a,searchBoxRootId:n="SEARCHBOX_ROOT_ID",surface:i="searchbox",anchorX:c="left",anchorY:d="center",offsetX:u=0,offsetY:m=0,children:h}=e,[g,p]=(0,r.useState)(null);return((0,r.useLayoutEffect)(()=>
1{if(null===a||"undefined"==typeof document)return;let e=document.getElementById(n);if(!e)return;let t="searchbar"===i?"data-searchbar-segment":"data-searchbox-segment",l=()=>{let l=Array.from(e.querySelectorAll("[".concat(t,"='").concat(o,"']"))).find(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0});if(!l)return;let r=l.getBoundingClientRect(),a="right"===c?r.right:r.left,n=s?Array.from(e.querySelectorAll("[".concat(t,"='").concat(s,"']"))).find(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0}):l;if(!n)return;let i=n.getBoundingClientRect();p({left:a+u,top:("bottom"===d?i.bottom:i.top+i.height/2)+m})};l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,!0);let r=new ResizeObserver(l);return r.observe(e),()=>{r.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,!0)}},[a,o,s,n,i,c,d,u,m]),g)?(0,l.jsx)("div",{id:t,"data-btc-picker-anchor":o,className:"fixed h-0 w-0",style:{left:g.left,top:g.top,zIndex:9999},children:h}):null};c.displayName="BtcPickerAnchor"}}]);
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.