1(self.webpackChunklib=self.webpackChunklib||[]).push([[6148],{6148:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>P});const r=e=>{var t={};for(var[i,r]of e)t[i]=r;return t};var o=i(8488),n=e=>{var t=travel.options.bcomAID;return e||t||1549630},c=i(9785),a=i(3614),l=function(){var e,t,i,{labelType:r="",subAccount:o=(null===(e=travel.options)||void 0===e||null===(t=e.clickTrip)||void 0===t?void 0:t.subAccount),gdid:n=(null===(i=travel.options)||void 0===i?void 0:i.gdid),eventId:c=(0,a.Mx)(),isMobile:l=travel.isMobile(),additionalLabelData:d=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!o)return"";var s="".concat(r?"".concat(r,"-"):"").concat(o,"-gdid").concat(n);return c&&(s+="-eid".concat(c)),l&&(s+="-mob"),d.length&&(s+="-".concat(d.join("-"))),s};function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function s(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach((function(t){v(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function v(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var u="www",h=[u,"sp"],p=e=>Object.keys(e).filter((e=>e.startsWith("childAge"))).map((t=>e[t]));const b=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var i,r,a,d,v,p,b,y,f,g,m,O,w,j,_;e={subdomain:u,dest_type:(null===(i=travel.options)||void 0===i||null===(r=i.clickTrip)||void 0===r?void 0:r.hotelBookingDestinationType)||(null===(a=travel.options)||void 0===a||null===(d=a.clickTrip)||void 0===d?void 0:d.destinationType),city_id:null===(v=travel.options)||void 0===v||null===(p=v.clickTrip)||void 0===p?void 0:p.hotelBookingCityId,hotel_id:(null===(b=travel.options)||void 0===b||null===(y=b.clickTrip)||void 0===y?void 0:y.hotelBookingId)||"",gdid:(null===(f=travel.options)||void 0===f?void 0:f.gdid)||null,date_from:null===(g=travel.options)||void 0===g||null===(m=g.availableParams)||void 0===m?void 0:m.dataFrom,date_to:null===(O=travel.options)||void 0===O||null===(w=O.availableParams)||void 0===w?void 0:w.dataTo,adults:2,children:[],isMobile:travel.isMobile(),subacc:null===(j=travel.options)||void 0===j||null===(_=j.clickTrip)||void 0===_?void 0:_.subAccount,label_type:"",additional_label_data:[],aid:n(),event_id:null}}catch(e){throw new Error("Fail to create defaultOptions: wrong global object params",e)}var k=s(s({},e),t);h.includes(k.subdomain)||((0,c.O)('Critical: invalid bcom subdomain â "'.concat(k.subdomain,'"')),k.subdomain=u);var P=(0,o.n)(k);if(!P.success)throw new Error("Critical: Fail to validate object. Invalid keys: ".concat(P.inValidKeys.join(", ")));var E="";return"countryEmptyBcomID"==k.dest_type?E="https://".concat(k.subdomain,".booking.com/country/").concat(k.city_id,".html?"):(E="https://".concat(k.subdomain,".booking.com/searchresults.html?"),E+="&dest_type=".concat(k.dest_type),E+="&dest_id=".concat(k.city_id)),E+="&aid=".concat(k.aid),E+="&checkin=".concat(k.date_from,"&checkout=").concat(k.date_to),E+="&group_adults="+k.adults,E+="&group_children="+k.children.length,k.children.forEach((e=>E+="&age=".concat(e))),k.no_rooms&&(E+="&no_rooms=".concat(k.no_rooms)),k.hotel_id&&(E+="&highlighted_hotels=".concat(k.hotel_id)),k.subacc&&(E+="&label=".concat(l({labelType:k.label_type,subAccount:k.subacc,gdid:k.gdid,eventId:k.event_id,isMobile:k.isMobile,additionalLabelData:k.additional_label_data}))),E};var y,f,g=i(8492),m=("".concat(window.location.protocol,"//").concat(window.location.host,"/"),i(4670));null!==(y=travel.events)&&void 0!==y&&y.clirder||(f=new m.Z({category:"clickunder",linear:!1,events:[{name:"open",once:!1}],providers:["stats","postHog"]}),travel.events.clirder=f);function O(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function w(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};
1t%2?O(Object(i),!0).forEach((function(t){j(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function j(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var _=(e,t)=>{if("1"===(0,g.ej)("click-trip"))return!0;var i=(0,a.Mx)();e.event_id=i;var r=b(e),o=new URL(t,window.location.origin),n=null==o?void 0:o.searchParams.get("cityID");try{var l,d,s=(0,a.kH)({href:encodeURIComponent(r),event_id:i,adults:e.adults?e.adults:"2",children:null!==(l=e.children)&&void 0!==l&&l.length?e.children.length:"0",c_id:(null===(d=travel.options)||void 0===d?void 0:d.hotelDestinationId)||travel.options.cityID||travel.options.c_id||n||null});(e=>{try{var t;if(null===(t=travel.events)||void 0===t||!t.clirder)return void(0,c.O)("Error level: URGENT. Clirder eventsSender is not set.");travel.events.clirder.send("open",e)}catch(e){(0,c.O)("Error level: URGENT. Failed to send clirder open event. Error: ".concat(e))}})(w({h:travel.options.hotelExtId,labelData:(0,a.ZP)({type:"dest-clicktrip",city_id:e.city_id},r,"destination")},s))}catch(e){console.error("Error level: URGENT. dest-licktrip",e)}(0,g.d8)("click-trip","1"),1===travel.options.device||2===travel.options.device?((0,g.d8)("hotelName",travel.options.siteDomain||""),(0,g.d8)("connectUrl",r),(0,g.d8)("sourceUrl",document.location.origin+t),window.open("".concat(window.location.protocol,"//").concat(travel.options.siteDomain,"/connect/")),location.href=t):setTimeout((()=>{window.open(t),location.href=r}),100)},k=i(9755);class P{constructor(e){this.options=e||{},this.cache={},this.init()}init(){this.initializeCache(),this.initializeEvents()}initializeCache(){this.cache.body=k("body"),this.cache.form=".js-avail-form",this.cache.citySelect="select.js-city-select",this.cache.cityError=".js-city-error",this.cache.childrenError=".js-children-error",this.cache.childrenErrorOne=".js-children-error-one",this.cache.childrenErrorPlural=".js-children-error-plural"}initializeEvents(){this.initCheckAvail()}initCheckAvail(){this.cache.body.on("submit",this.cache.form,(e=>{var t,i,o,c=e.target,a=k(c),l=r(new FormData(c)),d=(null===(t=c.cityID)||void 0===t||null===(i=t.querySelector("option:checked"))||void 0===i?void 0:i.dataset.bcityId)||(null===(o=travel.options.clickTrip)||void 0===o?void 0:o.cityId),s=k("#form_preferences").serialize();if(s&&a.attr("action",a.attr("action")+"?"+s),!this.cityValidation()||!this.childrenValidation()||this.dateRangeValidation(l.from,l.to))return!1;if(travel.events.fixedCheckAvailStats.send("check-avail-after-click"),"1"!==(0,g.ej)("click-trip")&&d){var v=s?"".concat(a.attr("action"),"&").concat(a.serialize(),"&clirder=1"):"".concat(a.attr("action"),"?").concat(a.serialize(),"&clirder=1"),u={date_from:l.from,date_to:l.to,adults:l.adults,city_id:d,affid:n(),children:p(l)};return _(u,v),!1}}))}dateRangeValidation(e,t){var i=new Date(e).getTime();return(new Date(t).getTime()-i)/24/60/60/1e3>30}cityValidation(){return k(this.cache.cityError).hide(),""==k(this.cache.citySelect).val()?(k(this.cache.cityError).show(),!1):(k(this.cache.cityError).hide(),!0)}childrenValidation(){k(this.cache.childrenError).hide();var e=k("select.js-children-select"),t=0;return e.each((function(){""==k(this).val()&&t++})),1===t?(k(this.cache.childrenErrorOne).show(),!1):t>1?(k(this.cache.childrenErrorPlural).show(),!1):(k(this.cache.childrenError).hide(),!0)}}},8492:(e,t,i)=>{"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function o(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){n(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{ej:()=>c,d8:()=>a});var c=e=>{var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):void 0},a=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(i=o({path:"/"},i)).expires instanceof Date&&(i.expires=i.expires.toUTCString());var r=encodeURIComponent(e)+"="+encodeURIComponent(t);for(var n in i){r+="; "+n;var c=i[n];!0!==c&&(r+="="+c)}document.cookie=r}}}]);
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.