1"use strict";(self.webpackChunklib=self.webpackChunklib||[]).push([[6564],{16564(e,t,a){a.r(t),a.d(t,{default:()=>n});var r=a(60842),i=a.n(r),s=a(54888),o=a(74692);class n{constructor(){this.thGroup=Math.floor(travel.opts.theme/100),this.maps={},this.hotelCoordinates={lat:parseFloat(travel.opts.map_params.lat),lng:parseFloat(travel.opts.map_params.long)},this.init()}init(){this.maps.destinationSmallMap=this.getMap({container:"destination-small-map",interactive:!1})}generateFakeMarkers(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15,t=.06,a=this.hotelCoordinates.lat+t,r=this.hotelCoordinates.lng+t,o=this.hotelCoordinates.lat-t,n=this.hotelCoordinates.lng-t,l=(0,s.W)("mini-marker"),m=0;m<e;m++){var c=Math.random()*(a-o)+o,h=Math.random()*(r-n)+n;new(i().Marker)(l.cloneNode(!0)).setLngLat([h,c]).addTo(this.maps.destinationSmallMap)}}getMap(e){e||(e={});var t={container:"mapbox",zoom:10,minZoom:5,maxZoom:20,center:[this.hotelCoordinates.lng,this.hotelCoordinates.lat],customAttribution:['<a href="https://www.openmaptiles.org/" target="_blank">© OpenMapTiles</a>'],style:"/map-styles/"+this.thGroup+"/map-style.json",pitch:10,bearing:0,transformRequest:function(e,t){var a=e;return"Tile"===t&&-1!==e.indexOf("/tiles-data/map3/")?a=location.origin+e:"SpriteJSON"!==t&&"SpriteImage"!==t||-1===e.indexOf("/maps-data/mapboxgl/sprite")||(a=e.replace("https://",location.origin+"/")),{url:a}}},a=o.extend(t,e),r=new(i().Map)(a);return r.on("load",()=>{o(".mapboxgl-ctrl-logo").remove(),this.generateFakeMarkers()}),r}}},54888(e,t,a){a.d(t,{E:()=>r,W:()=>s});var r=function(){function e(e){void 0===e&&(e={}),this.config=e,this.map=this.initMap(),this.mapContainer=document.getElementById(this.config.provider.mapParams.container),this.markers=[],this.markersSizeZoom=12,this.notAvailMarker=null,this.listeners={_markerMouseEnter:this._markerMouseEnter.bind(this),_markerMouseLeave:this._markerMouseLeave.bind(this)},this.callbacks={markerEnter:[],markerLeave:[],markerLockMobile:[],markerLockMobileNotAvail:[],markerLockDesktop:[],markerUnlock:[],init:[]}}var t=e.prototype;return t.initMap=function(){if(!this.config.provider)throw new Error("Map option Provider is required");var e=this.config.provider.init(),t=this;return e.on("click",function(e){t.resetActivePlaces();var a=e.originalEvent.target.closest(".marker");if(a){var r=a.dataset.id;t.activateHotel(r)}}),e.on("load",function(){t._doCallbacks("init")}),e},t.addListener=function(e,t){this.callbacks[e].push(t)},t._markerMouseEnter=function(e){var t=e.target.closest(".marker");t&&(t.classList.add("marker--active"),travel.isSmallTablet()||this._doCallbacks("markerEnter",t.dataset.id))},t._markerMouseLeave=function(e){var t=e.target.closest(".marker");t&&(t.classList.remove("marker--active"),travel.isSmallTablet()||this._doCallbacks("markerLeave"))},t.getBounds=function(){return this.map.getBounds()},t.setBounds=function(e,t){return this.map.fitBounds(e,Object.assign({animate:!1},t))},t.viewportСhanged=function(e){this.map.on("moveend",e)},t.showPlaceGroup=function(e){var t=this,a={type:"FeatureCollection",features:e.filter(function(e){var a=!0;return t.markers.forEach(function(t){t.getElement().dataset.id==="hotel-"+e.HotelID&&(a=!1)}),a}).map(i)},r=this.config.provider.addMarkers(a,s(this.map.getZoom()<this.markersSizeZoom?"marker--small":""));r.forEach(function(e){e.getElement().addEventListener("mouseenter",t.listeners._markerMouseEnter),e.getElement().addEventListener("mouseleave",t.listeners._markerMouseLeave)}),this.markers=this.markers.concat(r)},t.removePlaceGroup=function(e){var t=[];this.markers.filter(function(a){if(!e)return!0;var r=!0;return e.forEach(function(e){"hotel-"+e===a.getElement().dataset.id&&(r=!1)}),r||t.push(a),r}).forEach(this._removeMarker.bind(this)),this.markers=t},t.updateMarkersSize=function(){var e=this;this.markers.forEach(function(t){var a=t.getElement();e.map.getZoom()<e.markersSizeZoom?a.classList.add("marker--small"):a.classList.remove("marker--small")})},t._removeMarker=function(e){e.getElement().removeEventListener("mouseenter",this.listeners._markerMouseEnter),e.getElement().removeEventListener("mouseleave",this.listeners._markerMouseLeave),e.remove()}
1,t.resetActivePlaces=function(){this.markers.forEach(function(e){var t=e.getElement();t.classList.remove("marker--active"),t.classList.remove("marker--lock")}),this.notAvailMarker&&(this.notAvailMarker.getElement().classList.remove("marker--active"),this.notAvailMarker.getElement().classList.remove("marker--lock")),this._doCallbacks("markerUnlock")},t.activatePlace=function(e){var t="hotel-"+e;this.resetActivePlaces(),this.markers.forEach(function(e){var a=e.getElement();a.dataset.id===t&&a.classList.add("marker--active")})},t.activateHotel=function(e){var t=this.mapContainer.querySelectorAll(".marker"),a=Array.prototype.slice.call(t).find(t=>t.dataset.id===e),r=a.classList.contains("js-marker-not-avail");travel.isSmallTablet()?r?this._doCallbacks("markerLockMobileNotAvail",a.dataset.id):this._doCallbacks("markerLockMobile",a.dataset.id):this._doCallbacks("markerLockDesktop",a.dataset.id),a.classList.add("marker--lock")},t.addNotAvailMarker=function(e){this.notAvailMarker=this.config.provider.addMarker(i(e),s("marker--not_avail js-marker-not-avail")),this.notAvailMarker.getElement().addEventListener("mouseenter",this.listeners._markerMouseEnter),this.notAvailMarker.getElement().addEventListener("mouseleave",this.listeners._markerMouseLeave)},t.flyTo=function(e){this.config.provider.flyTo(e)},t._doCallbacks=function(e,t){var a=this.callbacks[e];a&&a.forEach(function(e){e(t)})},e}();function i(e,t){return{type:"Feature",geometry:{type:"Point",coordinates:[e.Longitude,e.Latitude]},properties:Object.assign(Object.assign({},t),{},{id:"hotel-"+e.HotelID,mr:e.mr})}}function s(e){e=e||"";var t=document.createElement("div"),a=document.createElement("div");a.className="marker-inner",t.className="marker "+e,t.appendChild(a);return a.innerHTML='<svg class=\'marker__icon\' xmlns="http://www.w3.org/2000/svg" width="23" height="31" viewBox="0 0 23 31">\n\t\t<path id="circle" fill="transparent" d="M10.725.75C4.811.75 0 5.678 0 11.734c0 7.588 9.617 17.55 10.027 17.97.183.189.435.296.698.296.263 0 .515-.107.698-.294.41-.422 10.027-10.384 10.027-17.972C21.45 5.678 16.64.75 10.725.75z" transform="translate(.5)"/>\n\t\t<path id="marker" fill="currentColor" stroke="transparent" d="M10.725.75C4.811.75 0 5.678 0 11.734c0 7.588 9.617 17.55 10.027 17.97.183.189.435.296.698.296.263 0 .515-.107.698-.294.41-.422 10.027-10.384 10.027-17.972C21.45 5.678 16.64.75 10.725.75zm0 15.6c-2.687 0-4.875-2.188-4.875-4.875S8.038 6.6 10.725 6.6 15.6 8.788 15.6 11.475s-2.188 4.875-4.875 4.875z" transform="translate(.5)"/>\n\t</svg>',t}}}]);
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.