(self.webpackChunklib=self.webpackChunklib||[]).push([[9079],{3483:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>r});var i=o(4027),l=o(3614),n=o(2553);class r{constructor(){this.init()}init(){if(travel.options.clickTrip&&"0"===travel.options.availableParams.use){var t=(0,i.Z)({label_type:"bckbtn"});((t,e)=>{if("1"!==localStorage.getItem("successBack")){var o=document.title,i=window.location.href;history.replaceState({},"","#bkl"),history.pushState({},o,i),window.addEventListener("popstate",(()=>{"1"!==localStorage.getItem("successBack")&&window.location.href.includes("#bkl")&&(e&&e(),localStorage.setItem("successBack","1"),location.href=t)}))}})(t,(()=>{(0,n.sendClickStats)({category:"clickunder",action:"open",id:travel.options.logId,h:travel.options.hotelExtId,labelData:(0,l.Z)({type:"bclick-clicktrip"},t)})}))}}}},4027:(t,e,o)=>{"use strict";o.d(e,{Z:()=>a});var i=o(8488);function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function n(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};try{var o,l,r,a,c,d,s,v,u,p,b,h,f,y;t={dest_type:(null===(o=travel.options)||void 0===o||null===(l=o.clickTrip)||void 0===l?void 0:l.hotelBookingDestinationType)||(null===(r=travel.options)||void 0===r||null===(a=r.clickTrip)||void 0===a?void 0:a.destinationType),city_id:null===(c=travel.options)||void 0===c||null===(d=c.clickTrip)||void 0===d?void 0:d.hotelBookingCityId,hotel_id:(null===(s=travel.options)||void 0===s||null===(v=s.clickTrip)||void 0===v?void 0:v.hotelBookingId)||"",date_from:null===(u=travel.options)||void 0===u||null===(p=u.availableParams)||void 0===p?void 0:p.dataFrom,date_to:null===(b=travel.options)||void 0===b||null===(h=b.availableParams)||void 0===h?void 0:h.dataTo,adults:2,children:[],isMobile:travel.isMobile(),subacc:null===(f=travel.options)||void 0===f||null===(y=f.clickTrip)||void 0===y?void 0:y.subAccount,label_type:"",additional_label_data:[],aid:"1549630"}}catch(t){throw new Error("Fail to create defaultOptions: wrong global object params",t)}var g=n(n({},t),e),w=(0,i.n)(g);if(!w.success)throw new Error("Fail to validate object. Invalid keys: ".concat(w.inValidKeys.join(", ")));var O,_="";("countryEmptyBcomID"==g.dest_type?_="https://www.booking.com/country/".concat(g.city_id,".html?"):(_="https://www.booking.com/searchresults.html?",_+="&dest_type=".concat(g.dest_type),_+="&dest_id=".concat(g.city_id)),_+="&aid=".concat(g.aid),_+="&checkin=".concat(g.date_from,"&checkout=").concat(g.date_to),_+="&group_adults="+g.adults,_+="&group_children="+g.children.length,g.children.forEach((t=>_+="&age=".concat(t))),g.hotel_id&&(_+="&highlighted_hotels=".concat(g.hotel_id)),g.subacc)&&(_+="&label=".concat(g.label_type?g.label_type+"-":"").concat(g.subacc),g.isMobile&&(_+="-mob"),null!==(O=g.additional_label_data)&&void 0!==O&&O.length&&(_+="-".concat(g.additional_label_data.join("-"))));return _}},3614:(t,e,o)=>{"use strict";o.d(e,{Z:()=>d});var i=o(8488);function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}function n(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hotel",r="hotel"===l?a:c;try{var d,s,v,u,p,b,h,f,y,g;t={type:"clicktrip",device:null===(d=travel.options)||void 0===d?void 0:d.device,btest:null!==(s=travel.options)&&void 0!==s&&s.btest?null===(v=travel.options)||void 0===v?void 0:v.btest.id:!(null===(u=travel.options)||void 0===u||!u.btest),langid:null===(p=travel.options)||void 0===p?void 0:p.languageId,city_id:(null===(b=travel.options)||void 0===b?void 0:b.hotelDestinationId)||null,hotel_id:(null===(h=travel.options)||void 0===h?void 0:h.hotelExtId)||null,site_id:(null===(f=travel.options)||void 0===f?void 0:f.siteId)||null,wsl:null===(y=travel.options)||void 0===y?void 0:y.track,affid:null===(g=travel.options)||void 0===g?void 0:g.nid,href:encodeURIComponent(o)}}catch(t){throw new Error("Fail to create defaultOptions: wrong global object params",t)}var w=n(n({},t),e),O=(0,i.n)(w);if(!O.success)throw new Error("Fail to validate object. Invalid keys: ".concat(O.inValidKeys.join(", ")));return Object.entries(w).forEach((t=>{var[e,o]=t;return r=r.replace("[".concat(e,"]"),o)})),r}},8488:(t,e,o)=>{"use strict";o.d(e,{n:()=>i});var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o={success:!0,inValidKeys:[]};for(var i in t)t[i]===e&&(o.success=!1,o.inValidKeys.push(i));return o}}}]);