!function(e){function t(t){for(var r,o,a=t[0],c=t[1],l=t[2],d=0,h=[];d1&&t%2==0})(r,t.value)||r.parentNode.insertBefore(r,e[n-1]),t.value+=i(r)}return{layout:function(){var e=Array.prototype.forEach;e.call(this.slides,(function(t){var i=t.querySelectorAll(".tile");e.call(i,r.bind(null,i,{value:0}))}))},extractRecentBookings:function(i){var r=document.querySelector("#recent-bookings-extraction-area");e=t.parentNode,r.appendChild(t),i.options.limit=1},restoreRecentBookings:function(i){e.insertBefore(t,e.firstChild),i.options.limit=4}}}.apply(t,[]))||(e.exports=r)},218:function(e,t,i){var r,n;r=[i(0),i(6),i(8),i(103),i(25)],void 0===(n=function(e,t,i,r,n){"use strict";var s="priceAlertData";function o(){this.message=null,this.cookie=n}return o.prototype={init:function(){if(this.priceAlertsData=JSON.parse(this.cookie.load(s)),this.priceAlertsData)if(n.clean(s),"error"!==this.priceAlertsData.status)switch(this.priceAlertsData.action){case"subscribe":this.showSubscribeConfirmMessage();break;case"unsubscribe":this.showUnsubscribeConfirmMessage(this.priceAlertsData.data);break;case"unsubscribe_all":this.showUnsubscribeAllConfirmMessage(this.priceAlertsData.data)}else"Price_alert_already_activated"===this.priceAlertsData.data.message?this.showAlreadyActivatedMessage():"Price_alert_not_found"===this.priceAlertsData.data.message?this.showNotFoundMessage():"Converter_error"===this.priceAlertsData.data.message?this.showConverterErrorMessage():this.showErrorMessage()},openMessage:function(t){var i=this;this.message=new r({forceRWD:!0}),this.message.setState(t.state),this.message.setHeader(t.header,!0),this.message.setDescription(t.description,!0),t.cancelLabel&&this.message.setCancelLabel(t.cancelLabel,!0),t.buttonLabel&&t.confirm&&(this.message.setButtonLabel(t.buttonLabel,!0),this.message.setButtonAction((function(){e.ajax({url:t.confirm.requestUrl,type:t.confirm.requestMethod,success:function(e){"object"==typeof e&&e.status===t.confirm.expectedStatus?(i.message.close(),t.confirm.successAction.bind(i)()):i.showErrorMessage()},error:i.showErrorMessage})}))),this.message.open()},showNotFoundMessage:function(){this.openMessage({state:"info",header:i.translate("price-alerts.Not_found_header"),description:i.translate("price-alerts.Not_found_description")})},showConverterErrorMessage:function(){this.openMessage({state:"error",header:i.translate("price-alerts.Converter_error_header"),description:i.translate("price-alerts.Converter_error_description")})},showErrorMessage:function(){this.openMessage({state:"error",header:i.translate("price-alerts.Subscribe_failed_header"),description:i.translate("price-alerts.Subscribe_failed_description")})},showAlreadyActivatedMessage:function(){this.openMessage({state:"info",header:i.translate("price-alerts.Already_activated_header"),description:i.translate("price-alerts.Already_activated_description")})},showUnsubscribeConfirmMessage:function(e){var t=[e.priceAlert.departurePlaceName.split("+").join(" "),e.priceAlert.arrivalPlaceName.split("+").join(" "),e.priceAlert.maxPriceAmount,e.priceAlert.maxPriceCurrency];this.openMessage({state:"info",header:i.translate("price-alerts.Unsubscribe_single_message_header"),description:i.translate("price-alerts.Unsubscribe_single_message_description",t),buttonLabel:i.translate("price-alerts.Unsubscribe_button_confirm"),cancelLabel:i.translate("price-alerts.Unsubscribe_button_cancel"),confirm:{requestUrl:e.url,requestMethod:"DELETE",expectedStatus:"Price_alert_removed",successAction:this.showUnsubscribedMessage}})},showUnsubscribedMessage:function(){this.openMessage({state:"success",header:i.translate("price-alerts.Unsubscribed_message_header"),description:i.translate("price-alerts.Unsubscribed_message_description")})},showUnsubscribedAllMessage:function(){this.openMessage({state:"success",header:i.translate("price-alerts.Unsubscribed_all_message_header"),description:i.translate("price-alerts.Unsubscribed_message_description")})},showUnsubscribeAllConfirmMessage:function(e){this.openMessage({state:"info",header:i.translate("price-alerts.Unsubscribe_all_message_header"),description:i.translate("price-alerts.Unsubscribe_all_message_description"),buttonLabel:i.translate("price-alerts.Unsubscribe_button_confirm"),cancelLabel:i.translate("price-alerts.Unsubscribe_button_cancel"),confirm:{requestUrl:e.url,requestMethod:"DELETE",expectedStatus:"Price_alerts_removed",successAction:this.showUnsubscribedAllMessage}})},showSubscribeConfirmMessage:function(){this.openMessage({state:"success",header:i.translate("price-alerts.Email_confirmed"),description:i.translate("price-alerts.Email_confirmed_description")})}},o}.apply(t,r))||(e.exports=n)},52:function(e,t,i){var r;void 0===(r=function(){"use strict";function e(){this.timeout=10}return e.prototype.constructor=e,e.prototype.waitForRoute=function(e){var t=this;try{window.Routing.generate("dbr_landing_pages_airport_country_list_json")&&e()}catch(i){setTimeout((function(){t.waitForRoute(e)}),this.timeout)}},new e}.call(t,i,t,e))||(e.exports=r)},85:function(e,t,i){"use strict";i.d(t,"a",(function(){return v}));var r=i(0),n=i(6),s=i(5),o=i(25),a=i(12),c="bot",l="users-country",u="disable_redirect",d="hide_redirect_info",h="redirect-from",p="locale-from",f="disable-redirect",m=".icon-close",g=".site-redirect-info",b="click.closeRedirectInfo",y=n.config.countryRedirectMapPerMarket,v=function(){function e(){var t=this;this.usersCountryCookie=e.loadCookie(l),this.isBot="true"===e.loadCookie(c),this.disableRedirect="true"===e.loadCookie(u),this.hideRedirectInfo="true"===e.loadCookie(d),this.redirectedFrom=e.getQueryParam(h)||"",this.localeFrom=e.getQueryParam(p)||"",this.disableRedirectQuery=e.getQueryParam(f),this.$siteRedirectInfo=r(g),this.disableRedirectQuery&&(e.saveCookie(u,!0),this.disableRedirect=!0),this.shouldShowInfoComponent()&&this.$siteRedirectInfo.removeClass("hidden").on(b,m,(function(){t.closeRedirectInfo()})),this.redirectionIsEnabled()&&(this.usersCountryCookie?e.findAndRedirect(this.usersCountryCookie,this.isBot):r.ajax(n.routes.localizationData).done((function(t){e.saveCookie(l,t.countryCode,"1d"),e.saveCookie(c,String(t.isBot),"1d"),e.findAndRedirect(t.countryCode,t.isBot)})).fail((function(e){s.warn("Localization check error: "+e)})))}return e.loadCookie=function(e){return o.load(e)},e.saveCookie=function(e,t,i){o.save(e,t,i)},e.getQueryParam=function(e){return a.getQueryParam(e)},e.updateQueryParameter=function(e,t,i){return a.updateQueryParameter(e,t,i)},e.redirectTo=function(e){window.location.href=e},e.findAndRedirect=function(t,i){if(!i)for(var r in y)if(y.hasOwnProperty(r)&&r===t){var s=y[r];return s=e.updateQueryParameter(s,h,window.location.hostname),s=e.updateQueryParameter(s,p,n.config.locale),void e.redirectTo(s)}},e.prototype.redirectionIsEnabled=function(){return Boolean(y&&Object.keys(y).length&&!this.disableRedirect)},e.prototype.shouldShowInfoComponent=function(){return Boolean(this.redirectedFrom&&!this.hideRedirectInfo&&this.$siteRedirectInfo.length)},e.prototype.closeRedirectInfo=function(){this.$siteRedirectInfo.off(b).remove(),o.save(d,!0)},e}()},855:function(e,t,i){e.exports=i(916)},856:function(e,t,i){var r,n,s;!function(o){"use strict";n=[i(0),i(6),i(5),i(8),i(15),i(857),i(858),i(42)],void 0===(s="function"==typeof(r=function(e,t,i,r,n,s,o){var a={requestInterval:6e4,updateInterval:5e3,limit:4,maxVisibleItems:4,itemClass:"item",timeSelector:".time",timeFormat:"DD/MM/YYYY HH:mm:ss"};function c(t,r){var n;t&&i.error("An error occurred while rendering the RecentlyBookedItem template!",t),(n=e(r)).prependTo(this.$itemsHolder),this.$itemsHolder.get(0).offsetLeft,n.addClass("expanded")}function l(t,i){if(void 0===t)throw new Error("Element is undefined");if(void 0===i.dataSourceUrl)throw new Error("Data source is undefined");this.options=e.extend(!0,{},a,i),this.$itemsHolder=e(t),this.handledItemsIds=[],this.bookings=[],this.timeParam=this.$itemsHolder.attr("data-init-time"),this.itemRenderingCallback=c.bind(this),this.getLastBookings(),this.sendEvent("dbr_deals.recent_bookings_prepared"),this.bindEvents()}return l.prototype={constructor:l,removeInvisibleItems:function(){this.$itemsHolder.find(".item:gt("+(this.options.maxVisibleItems-1)+")").remove()},updateTimeDifferences:function(){var t=this;this.$itemsHolder.find("."+this.options.itemClass).each((function(){var i=e(this),r=new n.DateTime(i.attr("data-time"),t.options.timeFormat).fromNow();i.find(t.options.timeSelector).text(r)}))},updateBookings:function(){var t,i,s=(new n.DateTime).format(this.options.timeFormat),a=(new n.DateTime).fromNow();this.$newItem=e(),(i=this.bookings.shift())&&(t={passenger:r.translate("recently-booked-item.From",[i.personName,i.personCountryName,a]),destination:r.translate("recently-booked-item.Bought_a_flight_from",[i.fromCityName,i.toCityName]),toCityCode:i.toCityCode,toCityUrl:this.options.dealsUrlTemplate.replace("arrival",i.toCityCode)+"?icn=rb&ici="+i.toCityCode,photoUrl:i.photoUrl,itemClass:this.options.itemClass,time:s},o(t,this.itemRenderingCallback),this.updateTimeDifferences(),"function"==typeof this.options.newItemsCallback&&this.options.newItemsCallback.call(this),this.$itemsHolder.find("."+this.options.itemClass).length
'+e.passenger+'
'+e.destination+"
"};r.includes=[],e.exports=new(i(9))(r,"recently-booked-item")},916:function(e,t,i){"use strict";i.r(t);var r=i(28),n=i(85),s=i(0),o=i(12),a=i(71),c=i(8),l=i(57),u=i(52);var d,h=i(137),p=i(99),f=i(0),m=i(6),g=i(71),b=i(856),y=i(218),v=(i(217),i(42),i(12)),C=!1,w=1,_=4,k=".recently-booked-item > .items-holder",A=document.querySelector("#smart-carousel"),I=document.querySelector("#smart-carousel-inspirations"),M=f(k),D=(f("#recent-bookings-tile"),v.isSmallView()),O=!1;function R(){M.length>0&&(O=!0,new b(M[0],{dataSourceUrl:m.config.recentlyBookingsUrl,limit:D?w:_,newItemsCallback:function(){d&&(d.innerHTML=this.$itemsHolder.html())},dealsUrlTemplate:m.routes.dealsSpecifyAnywhereToAirport,trackingUrl:m.routes.tracking}))}var U=Object(h.a)(window.location),x={tripChangeAction:function(e){var t=f(".mainpage-icons");e?t.removeClass("hidden"):t.addClass("hidden"),U.defaultTripType&&history.replaceState(null,document.title,location.pathname+location.search)}},T=f.extend(!0,{},x,U),S=Object(r.a)({flights:T,insurances:{initCustomSelect:!0}});A&&new g(A,{duration:500,infinite:!0,notReadyClass:"hidden",greyOutLeft:!0,greyOutRight:!0,initCallback:function(){d=this.wrapper.querySelector(".cloned "+k),!1===D&&R()},windowResizeCallback:function(){!1===v.isSmallView()&&0===M.children().length&&!1===O&&R()}}),I&&function(e,t){var i="hidden",r=s(e),n=r.find(".slide"),d=!t||void 0===t.enableInspirationPrices||t.enableInspirationPrices;if(0!==n.length){var h=[];new a(document.querySelector("#smart-carousel-inspirations"),{bulletsHolder:document.querySelector(".bullets"),duration:200,greyOutLeft:!0,greyOutRight:!0}),n.each((function(e,t){var i=s(t),r=i.find(".inspirations-dialog");h.push({type:i.data("place-type"),code:i.data("place-code")}),r.dialog({closable:["BACKGROUND"],forceRWD:!0,mobileAnimation:!0,type:"NAVY",useMaxHeight:530,width:600}),r.find(".custom-dialog-close").on("click",(function(){r.dialog("close")})),i.on("click",(function(){o.isSmallView()&&r.dialog("open")}))})),d&&u.waitForRoute((function(){s.ajax({url:l.generateUrl("dbr_mainpage_get_inspiration_prices_ajax"),data:JSON.stringify(h),type:"post",dataType:"json"}).done((function(e){e.forEach((function(e){var t=n.filter((function(){return s(this).data("place-code")===e.code})),r=s('.inspirations-dialog[data-place-code="'+e.code+'"]');t.add(r).find(".flight-price").removeClass(i).text(e.prices.flight.price+" "+e.prices.flight.currency).end().find(".hotel-price").removeClass(i).text(e.prices.hotel.price+" "+e.prices.hotel.currency+" / "+c.translate("inspirations.Day"))}))}))})),r.find(".strip").on("transitionend",(function(){}))}}("#smart-carousel-inspirations",{enableInspirationPrices:m.config.enableInspirationPrices}),(new y).init(),Object(p.openHotelUrl)(S,m,f),new n.a},99:function(e,t,i){"use strict";i.r(t),i.d(t,"openHotelUrl",(function(){return o}));var r=i(15),n=i(6),s=function(){function e(e){this.options=n.config.hotelsSearchInNewTab,this.qsfAnalitics=e.analytics,this.$qsfForm=e.$form}return e.prototype.getUrl=function(e){void 0===e&&(e="");var t=window.location.origin+"/hotels/search?",i=this.getCity(),r=this.qsfAnalitics.getData().CheckInDate,n=this.getCheckOutDate(),s="RN[0][RGA]="+this.getAdultsCount();if(this.getCity()){var o=t+"C="+i+"&CID="+r+"&COD="+n+"&"+s;return e.length&&(o+="&ctags="+e),o}return null},e.prototype.isValidate=function(){return Boolean(this.getUrl())&&this.isEnabled()&&this.isValidCheckOutDateRange()&&this.isValidMaxAdultsCount()},e.prototype.getCity=function(){var e=this.$qsfForm.find("#arrivalRoundtrip0");this.isOneWay()&&(e=this.$qsfForm.find(this.options.useDepartureForOneWay?"#departureOneway":"#arrivalOneway"));var t=e.data("cityWithCountry");return void 0!==t?t:null},e.prototype.getCheckOutDate=function(){return this.isOneWay()?new r.DateTime(this.qsfAnalitics.getCheckInDate()).add(this.options.maxLengthOfDaysForOneWay,"day").format(n.config.formatDate):this.qsfAnalitics.getCheckOutDate()},e.prototype.getAdultsCount=function(){return this.qsfAnalitics.getPaxConfiguration().split("|",1)[0]},e.prototype.isOneWay=function(){return"OneWay"===this.qsfAnalitics.getTripType()},e.prototype.isRoundTrip=function(){return"Roundtrip"===this.qsfAnalitics.getTripType()},e.prototype.isValidCheckOutDateRange=function(){if(this.isRoundTrip()){var e=new r.DateTime(this.qsfAnalitics.getCheckInDate()),t=new r.DateTime(this.qsfAnalitics.getCheckOutDate()).diff(e,{unit:"days"}).days;return this.options.maxLengthOfStayForRoundTrip>=t}return!0},e.prototype.isValidMaxAdultsCount=function(){return this.options.maxAdults>=this.getAdultsCount()},e.prototype.isEnabled=function(){return this.isOneWay()?this.options.isEnabled&&this.options.isEnabledForOneWay:!!this.isRoundTrip()&&(this.options.isEnabled&&this.options.isEnabledForRoundTrip)},e}();function o(e,t,i){!window.fullScreen&&t.config.hotelsSearchInNewTab.isEnabled&&i("#multiQsf").on("click",".trip-search",(function(){var t=new s(e.flights);if(e.flights.validateForm()&&t.isValidate()){var r=t.getUrl("source:fsr");r&&(i(".flights-qsf").attr("target","_blank"),setTimeout((function(){window.location.href=r}),500))}}))}}});