1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[118],{"20a2":function(e,t,r){e.exports=r("nOHt")},JNdi:function(e,t,r){"use strict";r.r(t);var n=r("H+61"),o=r("+Css"),a=r("UlJF"),c=r("7LId"),i=r("VIvw"),s=r("iHvq"),u=r("z7pX"),l=r("vJKn"),f=r.n(l),d=r("cpVT"),m=r("rg98"),p=r("q1tI"),h=r.n(p),g=r("wd/R"),y=r.n(g),b=r("vcXL"),v=r.n(b),C=r("Vvt1"),O=r.n(C),R=r("mOvS"),j=r.n(R),w=r("20a2"),S=r.n(w),D=r("P41N"),k=r("9NWV"),P=r("p3Xs"),x=r("cixp"),U=r("xn66"),T=r("YSmr"),A=r("b1/w"),E=h.a.createElement;function I(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Object(s.a)(e);if(t){var o=Object(s.a)(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Object(i.a)(this,r)}}function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){Object(d.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Y=j()().publicRuntimeConfig,_=Y.rateDataUrl,M=Y.currencyConverterUrl,$={C3T01:O()((function(){return Promise.all([r.e(1),r.e(0),r.e(3),r.e(4),r.e(73)]).then(r.bind(null,"gEPA"))}),{loadableGenerated:{webpack:function(){return["gEPA"]},modules:["rooms.js -> ../templates/C3T01/pages/Rooms"]}}),C3T02:O()((function(){return Promise.all([r.e(1),r.e(0),r.e(3),r.e(4),r.e(74)]).then(r.bind(null,"pIhY"))}),{loadableGenerated:{webpack:function(){return["pIhY"]},modules:["rooms.js -> ../templates/C3T02/pages/Rooms"]}})},L={fromRateAsc:function(e,t){if("undefined"==typeof e.fields.minRate)return"undefined"!=typeof t.fields.minRate?1:0;if("undefined"==typeof t.fields.minRate)return-1;var r=parseFloat(e.fields.minRate)-parseFloat(t.fields.minRate);return 0===r?e.fields.name.localeCompare(t.fields.name):r},fromRateDesc:function(e,t){if("undefined"==typeof e.fields.minRate)return"undefined"!=typeof t.fields.minRate?1:0;if("undefined"==typeof t.fields.minRate)return-1;var r=parseFloat(t.fields.minRate)-parseFloat(e.fields.minRate);return 0===r?e.fields.name.localeCompare(t.fields.name):r},name:function(e,t){return e.fields.name.localeCompare(t.fields.name)}},J=function(e,t,r){var n=Object.values(e).join(",");return new Promise((function(o,a){var c="".concat(M,"convertcurrency/").concat(n,"/").concat(t,"/").concat(r);v()(c.replace(/\/$/,"")).then((function(e){if(!e.ok)throw"Currency Converter service unavailable.";return e})).then((function(e){return e.json()})).then((function(t){if(t.length>0){var r={};return t.forEach((function(t){Object.keys(e).forEach((function(n){Number(e[n])===Number(t.amount)&&(r[n]=t.result)}))})),void o(r)}o(null)})).catch((function(e){a(e),console.log(e)}))}))},V=function(e){Object(c.a)(r,e);var t=I(r);function r(e){var a,c;Object(n.a)(this,r),c=t.call(this,e),Object(d.a)(Object(o.a)(c),"addCategories",(function(){var e=c.props.pageData,t=(e=void 0===e?{}:e).fields,r=(t=void 0===t?{}:t).display,n=(r=void 0===r?{}:r).roomCategories;(void 0===n?[]:n).forEach((function(e){c.state.rooms.forEach((function(t){var r=t.fields,n=(r=void 0===r?{}:r).categories;(void 0===n?[]:n).forEach((function(t){e!=t.id||c.categories[t.pageUrl]||(c.categories[t.pageUrl]=t)}))}))}))})),Object(d.a)(Object(o.a)(c),"handleRoomCompareToggleClick",(function(e){var t=Object(u.a)(c.state.comparingRooms),r=t.indexOf(e);-1!==r?(t.splice(r,1),c.setState({comparingRooms:t})):t.length<c.props.compareLimit&&c.setState({comparingRooms:[].concat(Object(u.a)(t),[e])})})),Object(d.a)(Object(o.a)(c),"handleCompareClick",(function(){var e=c.state.comparingRooms,t=void 0===e?[]:e,r="undefined"!=typeof t[0]?c.state.rooms[t[0]].pageUrl:null,n="undefined"!=typeof t[1]?c.state.rooms[t[1]].pageUrl:null,o="undefined"!=typeof t[2]?c.state.rooms[t[2]].pageUrl:null,a="/rooms?room1Pu=".concat(r),i="/rooms/compare/".concat(r);n&&(a+="&room2Pu=".concat(n),i+="/".concat(n)),o&&(a+="&room3Pu=".concat(o),i+="/".concat(o)),S.a.push(a,i,{shallow:!0}),c.setState({comparing:!0})}
1)),Object(d.a)(Object(o.a)(c),"handleCancelCompareClick",(function(){c.setState({comparingRooms:[]})})),Object(d.a)(Object(o.a)(c),"handleCloseCompareModal",(function(){var e=c.getSelectedCategoryRoutingUrls(c.state.selectedCategory),t=e.newUrl,r=e.newAsUrl;S.a.push(t,r,{shallow:!0}),c.setState({comparing:!1})})),Object(d.a)(Object(o.a)(c),"getSelectedCategoryRoutingUrls",(function(e){var t=c.props.siteData.languages,r=t.current,n=r!=t.default?"/".concat(r):"";return{newUrl:"/rooms"+(e!=T.T?"?categoryPu=".concat(e):""),newAsUrl:"".concat(n,"/rooms")+(e!=T.T?"/category/".concat(e):"")}})),Object(d.a)(Object(o.a)(c),"handleChangeSelectedCategory",(function(e){var t=c.getSelectedCategoryRoutingUrls(e),r=t.newUrl,n=t.newAsUrl;S.a.push(r,n,{shallow:!0}),c.setState({selectedCategory:e})}));var i=c.props,s=i.siteData.currencies.supported,l=i.selectedCurrency,f=i.comparing,m=i.roomsData,p=e.t,h=e.filterCategoryPu,g=(s.find((function(e){return e.code===l}))||{}).symbol||"$";return"CAD"===l&&(g="CAD $"),c.state=(a={comparingRooms:[],comparing:f,selectedCategory:h,roomsRate:null,currencySymbol:g,changedCurrency:!1,roomsRateOri:null},Object(d.a)(a,"roomsRate",null),Object(d.a)(a,"clientCurrency",null),Object(d.a)(a,"rooms",m),a),c.categories=Object(d.a)({},T.T,{name:p("rooms:view-all"),pageUrl:""}),c.addCategories(),c}return Object(a.a)(r,null,[{key:"getInitialProps",value:function(){var e=Object(m.a)(f.a.mark((function e(t){var r,n,o,a,c,i,s,l,d,m,p,h,g,y,b,v,C,O,R,j,w,S,D,k,E,I,F,N,Y,_,M,$,L,J,V,X,q;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.req,n=t.siteData,o=t.hotel,a=void 0===o?{}:o,c=t.query,i=n.host,s=n.siteId,l=n.languages,d=(l=void 0===l?{}:l).current,m=n.personalization,p=void 0===m?{}:m,h=n.country,g=c.draft,y=c.room1Pu,b=c.room2Pu,v=c.room3Pu,C=c.roomCategoryPu,O=void 0===C?"":C,R=a.booking,e.next=8,Object(P.a)(i,d,"rooms",s,!!g);case 8:if(((j=e.sent)||{}).active){e.next=11;break}return e.abrupt("return",{statusCode:404});case 11:return e.next=13,Object(x.a)(i,s,d);case 13:if(w=(w=e.sent)&&w.length>0?w.filter((function(e){return e.active})):w,D=(S=j||{}).title,k=S.metaDescription,E=S.ogDescription,I=S.ogImage,F=S.pageSharing,N=S.noIndex,Y=S.noFollow,_=S.alternatePages,O&&O!=T.T&&_&&Object.keys(_).map((function(e){return _[e]+="/category/".concat(O)})),M=p.recentlyViewed,$=(M=void 0===M?{}:M).active,L=M.rooms,J=null,!p||!$||"both"!=L&&"overview"!=L){e.next=27;break}return V=A.a(r,d,"rooms",s),e.next=25,Object(x.a)(i,s,d,V);case 25:(X=e.sent)&&(J=Object(u.a)(X).sort((function(e,t){return V.indexOf(e.fields.id.toString())-V.indexOf(t.fields.id.toString())})));case 27:if(q=null,-1===i.indexOf("zemibeach")){e.next=32;break}return e.next=31,Object(U.a)(i,s,d,"",p,h);case 31:q=e.sent;case 32:return e.abrupt("return",{roomsData:w,hotel:a,pageData:j,pageTitle:D,pageDescription:k,ogDescription:E,ogImage:I,pageSharing:F,noIndex:!!g||N,noFollow:!!g||Y,alternatePages:_,pageType:T.J,filterCategoryPu:O||T.T,comparing:!!y&&!!b,bookingSettings:R,recentlyViewedRooms:J,roomComparePu:[y,b,v],offersData:q});case 33:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),Object(a.a)(r,[{key:"updateRoomRates",value:function(){var e=this,t=this.props,r=t.siteData.currencies.supported,n=t.selectedCurrency,o=t.hotel.propertyId,a=t.selectedRateCountry,c=(r.find((function(e){return e.code===n}))||{}).symbol;(function(e,t,r,n){return new Promise(function(){var o=Object(m.a)(f.a.mark((function o(a,c){var i,s,u,l,m,p;return f.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:o.t0="livecms",o.next="livecms"===o.t0?3:"rateservice"===o.t0?8:13;break;case 3:return i=[],e.forEach((function(e){if(e.fields.ratesFrom.value){var t=[];t[""+e.fields.id]=e.fields.ratesFrom.value,e.fields.ratesFrom.currency.code!=n?i.push(J(t,e.fields.ratesFrom.currency.code,n)):i.push(new Promise((function(e,r){return e(t)})))}}),{}),Promise.all(i).then((function(e){var t={};e.map((function(e){Object.keys(e).map((function(r){t=N(N({},t),Object(d.a)({},r,e[r]))}))})),a({rates:t,currency:n})})),o.abrupt("break",13);case 8:s=[y()().add(1,"M").format("YYYYMMDD"),y()().add(3,"M").format("YYYYMMDD")],u=s[0],l=s[1],m=e.reduce((function(e,t){var r=t.fields,n=(r=void 0===r?{}:r).id,o=r.roomTypeId;return n&&o&&o.trim().length>0&&e.push(Number(n)),e}),[]).join(","),(p="".concat(_,"lowerroomprice/").concat(t,"/").concat(m,"/").concat(u,"/").concat(l,"/1/").concat(r)).replace(/\/$/,""),v()(p).then((function(e){if(!e.ok)throw"RateData service unavailable.";return e})).then((function(e){return e.json()})).then((function(e){if(e.result.length>0){var t=e.result.reduce((function(e,t){if(t)return N(N({},e),{},Object(d.a)({},t.roomid,t["minrate"+r]))}),{});a({rates:t,currency:e.result[0].currency})}a({})})).catch((function(e){c(e)}));case 13:case"end":return o.stop()}}),o)})));return function(e,t){return o.apply(this,arguments)}}())})(this.state.rooms,o,a,n).then((function(t){var r=t.currency,o=t.rates,a=r,i=N({},o),s=c||"$";"CAD"===n&&(s="CAD $"),r!==n?J(o,r,n).then((function(t){e.setState({roomsRate:N({},t),roomsRateOri:i,currencySymbol:s,changedCurrency:!0,clientCurrency:a})})):e.setState({roomsRateOri:i,roomsRate:N({},o),clientCurrency:a,currencySymbol:s}),e.updateRoomSort()})),this.categories[this.state.selectedCategory]||this.handleChangeSelectedCategory(T.T)}},{key:"updateRoomSort",value:function(){var e=this,t=function(e,t,r){var n=e||{},o=n.active,a=n.fields;if(!o)return t;var c=(a||{}).display||{},i=c.orderBy,s=c.roomsListOrder,l=Object.keys(L).includes(i)?i:"name",f=t.map((function(e){var t=(e.fields||{}).id;return t&&r&&r[t]&&(e.fields.minRate=r[t]),e}));return"custom"===i?Object(u.a)(f).sort((function(e,t){return s.indexOf(e.fields.id.toString())-s.indexOf(t.fields.id.toString())})):Object(u.a)(f).sort(L[l])}(this.props.pageData,this.state.rooms,this.state.roomsRate),r=[];t.map((function(t,n){var o=t.pageUrl;e.props.roomComparePu.indexOf(o)>-1&&r.push(n)})),this.setState({rooms:t,comparingRooms:r})}},{key:"componentDidMount",value:function(){this.updateRoomSort(),this.updateRoomRates()}},{key:"convertCurrencyWhenChanged",value:function(){var e=Object(m.a)(f.a.mark((function e(t,r,n){var o,a,c,i,s,u,l,d=this;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=this.props,a=o.siteData.currencies.supported,c=o.selectedCurrency,i=N({},t),s=a.find((function(e){return e.code===c}))||{},u=s.symbol,l=u||"$","CAD"===r&&(l="CAD $"),c!==this.state.clientCurrency?J(i,n,r).then((function(e){d.setState({roomsRate:N({},e),currencySymbol:l,changedCurrency:!0})})):this.setState({roomsRate:this.state.roomsRateOri,roomsRateOri:i,currencySymbol:l});case 6:case"end":return e.stop()}}),e,this)})));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.siteData.currencies.supported,n=t.selectedCurrency,o=t.selectedRateCountry,a=(r.find((function(e){return e.code===n}))||{}).symbol||"$";"CAD"===n&&(a="CAD $"),e.selectedRateCountry!==o&&this.updateRoomRates(),n!==e.selectedCurrency&&(n!==this.state.clientCurrency?this.convertCurrencyWhenChanged(this.state.roomsRateOri,n,this.state.clientCurrency):this.setState({roomsRate:this.state.roomsRateOri,currencySymbol:a}))}},{key:"render",value:function(){var e=this.props,t=e.t,r=e.pageData,n=e.siteData,o=n.template,a=n.languages.current,c=e.hotel,i=e.compareLimit,s=e.recentlyViewedRooms,u=e.offersData;return E($[o],{t:t,pageData:r,rooms:this.state.rooms,categories:this.categories,roomsRate:this.state.roomsRate,currencySymbol:this.state.currencySymbol,selectedCategory:this.state.selectedCategory,handleChangeSelectedCategory:this.handleChangeSelectedCategory,hotel:c,comparingRooms:this.state.comparingRooms,compareLimit:i,comparing:this.state.comparing,handleCloseCompareModal:this.handleCloseCompareModal,handleRoomCompareToggleClick:this.handleRoomCompareToggleClick,handleCancelCompareClick:this.handleCancelCompareClick,handleCompareClick:this.handleCompareClick,currentLanguage:a,recentlyViewedRooms:s,offers:u})}}]),r}(p.Component);V.defaultProps={compareLimit:3},t.default=Object(k.a)(["common","rooms","offers"])(Object(D.a)(V))},sfIF:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rooms",function(){return r("JNdi")}])},xn66:function(e,t,r){"use strict";var n=r("vJKn"),o=r.n(n),a=r("rg98"),c=r("vcXL"),i=r.n(c),s=r("mOvS"),u=r.n(s),l=r("YSmr"),f=u()().publicRuntimeConfig.pageFeederUrl,d=function(){var e=Object(a.a)(o.a.mark((function e(t,r,n){var a,c,s,u,d,m,p,h,g,y,b=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=b.length>3&&void 0!==b[3]?b[3]:null,c=b.length>4&&void 0!==b[4]?b[4]:{},s=b.length>5&&void 0!==b[5]?b[5]:null,u=b.length>6&&void 0!==b[6]?b[6]:null,d="".concat(f).concat(t,"/").concat(r,"/").concat(n,"/offers"),m={},a&&a!==l.t&&(m.category=a),p=c.isMobile,m.device=p?"mobile":"desktop",s&&
1(m.countryCode=s),u&&Array.isArray(u)&&(m.ids=u.toString()),Object.keys(m).length>0&&(d+="?"+Object.keys(m).map((function(e){return"".concat(e,"=").concat(m[e])})).join("&")),e.next=14,i()(d.replace(/\/$/,""),{headers:{Accept:"application/json"}});case 14:return h=e.sent,e.next=17,h.json();case 17:return g=e.sent,y=g.data,e.abrupt("return",y);case 20:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();t.a=d}},[["sfIF",2,1,0,6,14]]]);
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.