')},e.prototype.useStyle=function(t){this.sums_=t;var e=Math.max(0,t.index-1);e=Math.min(this.styles_.length-1,e),this.style=this.sums_.url?n(n({},this.styles_[e]),{url:this.sums_.url}):this.styles_[e],this.anchorText_=this.style.anchorText||[0,0],this.anchorIcon_=this.style.anchorIcon||[Math.floor(this.style.height/2),Math.floor(this.style.width/2)],this.className_=this.cluster_.getMarkerClusterer().getClusterClass()+" "+(this.style.className||"cluster-"+e)},e.prototype.setCenter=function(t){this.center_=t},e.prototype.createCss_=function(t){return a({"z-index":"".concat(this.cluster_.getMarkerClusterer().getZIndex()),top:l(t.y),left:l(t.x),width:l(this.style.width),height:l(this.style.height),cursor:"pointer",position:"absolute","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-o-user-select":"none","user-select":"none"})},e.prototype.getPosFromLatLng_=function(t){var e=this.getProjection().fromLatLngToDivPixel(t);return e.x=Math.floor(e.x-this.anchorIcon_[1]),e.y=Math.floor(e.y-this.anchorIcon_[0]),e},e}(r),p=function(){function t(t){this.markerClusterer_=t,this.map_=this.markerClusterer_.getMap(),this.minClusterSize_=this.markerClusterer_.getMinimumClusterSize(),this.averageCenter_=this.markerClusterer_.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new h(this,this.markerClusterer_.getStyles())}return t.prototype.getSize=function(){return this.markers_.length},t.prototype.getMarkers=function(){return this.markers_},t.prototype.getCenter=function(){return this.center_},t.prototype.getMap=function(){return this.map_},t.prototype.getMarkerClusterer=function(){return this.markerClusterer_},t.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),e=this.getMarkers(),i=0;in)t.getMap()!==this.map_&&t.setMap(this.map_);else if(oe)this.clusterIcon_.hide();else if(t0))for(var t=0;t{function e(t){t=t||{},google.maps.OverlayView.apply(this,arguments),this.content_=t.content||"",this.disableAutoPan_=t.disableAutoPan||!1,this.maxWidth_=t.maxWidth||0,this.pixelOffset_=t.pixelOffset||new google.maps.Size(0,0),this.position_=t.position||new google.maps.LatLng(0,0),this.zIndex_=t.zIndex||null,this.boxClass_=t.boxClass||"infoBox",this.boxStyle_=t.boxStyle||{},this.closeBoxMargin_=t.closeBoxMargin||"2px",this.closeBoxURL_=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL_=""),this.infoBoxClearance_=t.infoBoxClearance||new google.maps.Size(1,1),void 0===t.visible&&(void 0===t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden_=!t.visible,this.alignBottom_=t.alignBottom||!1,this.pane_=t.pane||"floatPane",this.enableEventPropagation_=t.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.mapListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null}e.prototype=new google.maps.OverlayView,e.prototype.createInfoBoxDiv_=function(){var t,e,i,s=this,o=function(t){t.cancelBubble=!0,t.stopPropagation&&t.stopPropagation()};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),void 0===this.content_.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:0!==this.maxWidth_&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.fixedWidthSet_=!0):(i=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-i.left-i.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],e=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],t=0;t"),t},e.prototype.addClickHandler_=function(){var t;""!==this.closeBoxURL_?(t=this.div_.firstChild,this.closeListener_=google.maps.event.addDomListener(t,"click",this.getCloseClickHandler_())):this.closeListener_=null},e.prototype.getCloseClickHandler_=function(){var t=this;return function(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation(),google.maps.event.trigger(t,"closeclick"),t.close()}},e.prototype.panBox_=function(t){var e,i=0,s=0;if(!t&&(e=this.getMap())instanceof google.maps.Map){e.getBounds().contains(this.position_)||e.setCenter(this.position_),e.getBounds();var o=e.getDiv(),n=o.offsetWidth,r=o.offsetHeight,a=this.pixelOffset_.width,l=this.pixelOffset_.height,h=this.div_.offsetWidth,p=this.div_.offsetHeight,d=this.infoBoxClearance_.width,c=this.infoBoxClearance_.height,u=this.getProjection().fromLatLngToContainerPixel(this.position_);if(u.x<-a+d?i=u.x+a-d:u.x+h+a+d>n&&(i=u.x+h+a+d-n),this.alignBottom_?u.y<-l+c+p?s=u.y+l-c-p:u.y+l+c>r&&(s=u.y+l+c-r):u.y<-l+c?s=u.y+l-c:u.y+p+l+c>r&&(s=u.y+p+l+c-r),0!==i||0!==s){e.getCenter();e.panBy(i,s)}}},e.prototype.setBoxStyle_=function(){var t,e;if(this.div_){for(t in this.div_.className=this.boxClass_,this.div_.style.cssText="",e=this.boxStyle_)e.hasOwnProperty(t)&&(this.div_.style[t]=e[t]);this.div_.style.WebkitTransform="translateZ(0)",void 0!==this.div_.style.opacity&&""!==this.div_.style.opacity&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*this.div_.style.opacity+')"',this.div_.style.filter="alpha(opacity="+100*this.div_.style.opacity+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",null!==this.zIndex_&&(this.div_.style.zIndex=this.zIndex_),this.div_.style.overflow||(this.div_.style.overflow="auto")}},e.prototype.getBoxWidths_=function(){var t,e={top:0,bottom:0,left:0,right:0},i=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(t=i.ownerDocument.defaultView.getComputedStyle(i,""))&&(e.top=parseInt(t.borderTopWidth,10)||0,e.bottom=parseInt(t.borderBottomWidth,10)||0,e.left=parseInt(t.borderLeftWidth,10)||0,e.right=parseInt(t.borderRightWidth,10)||0):document.documentElement.currentStyle&&i.currentStyle&&(e.top=parseInt(i.currentStyle.borderTopWidth,10)||0,e.bottom=parseInt(i.currentStyle.borderBottomWidth,10)||0,e.left=parseInt(i.currentStyle.borderLeftWidth,10)||0,e.right=parseInt(i.currentStyle.borderRightWidth,10)||0),e},e.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},e.prototype.draw=function(){this.createInfoBoxDiv_();var t=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=t.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(t.y+this.pixelOffset_.height)+"px":this.div_.style.top=t.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},e.prototype.setOptions=function(t){void 0!==t.boxClass&&(this.boxClass_=t.boxClass,this.setBoxStyle_()),void 0!==t.boxStyle&&(this.boxStyle_=t.boxStyle,this.setBoxStyle_()),void 0!==t.content&&this.setContent(t.content),void 0!==t.disableAutoPan&&(this.disableAutoPan_=t.disableAutoPan),void 0!==t.maxWidth&&(this.maxWidth_=t.maxWidth),void 0!==t.pixelOffset&&(this.pixelOffset_=t.pixelOffset),void 0!==t.alignBottom&&(this.alignBottom_=t.alignBottom),void 0!==t.position&&this.setPosition(t.position),void 0!==t.zIndex&&this.setZIndex(t.zIndex),void 0!==t.closeBoxMargin&&(this.closeBoxMargin_=t.closeBoxMargin),void 0!==t.closeBoxURL&&(this.closeBoxURL_=t.closeBoxURL),void 0!==t.infoBoxClearance&&(this.infoBoxClearance_=t.infoBoxClearance),void 0!==t.isHidden&&(this.isHidden_=t.isHidden),void 0!==t.visible&&(this.isHidden_=!t.visible),void 0!==t.enableEventPropagation&&(this.enableEventPropagation_=t.enableEventPropagation),this.div_&&this.draw()},e.prototype.setContent=function(t){this.content_=t,this.div_&&(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),void 0===t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px",void 0===t.nodeType?this.div_.innerHTML=this.getCloseBoxImg_()+t:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(t))),this.addClickHandler_()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(t){this.position_=t,this.div_&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setZIndex=function(t){this.zIndex_=t,this.div_&&(this.div_.style.zIndex=t),google.maps.event.trigger(this,"zindex_changed")},e.prototype.setVisible=function(t){this.isHidden_=!t,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},e.prototype.getContent=function(){return this.content_},e.prototype.getPosition=function(){return this.position_},e.prototype.getZIndex=function(){return this.zIndex_},e.prototype.getVisible=function(){return void 0!==this.getMap()&&null!==this.getMap()&&!this.isHidden_},e.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},e.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},e.prototype.open=function(t,e){var i=this;e&&(this.position_=e.getPosition(),this.moveListener_=google.maps.event.addListener(e,"position_changed",(function(){i.setPosition(this.getPosition())})),this.mapListener_=google.maps.event.addListener(e,"map_changed",(function(){i.setMap(this.map)}))),this.setMap(t),this.div_&&this.panBox_()},e.prototype.close=function(){var t;if(this.closeListener_&&(google.maps.event.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(t=0;t{"use strict";i.r(e),i.d(e,{Loader:()=>s.a});var s=i(304),o=i(288),n={};for(const t in o)["default","Loader"].indexOf(t)<0&&(n[t]=()=>o[t]);i.d(e,n)},304:(t,e,i)=>{"use strict";i.d(e,{a:()=>s});class s{constructor(t=null,e={}){if(this.apiKey=t,this.options=e,"undefined"==typeof window)throw new Error("google-maps is supported only in browser environment")}load(){return void 0!==this.api?Promise.resolve(this.api):void 0!==this.loader?this.loader:(window[s.CALLBACK_NAME]=()=>{if(this.api=window.google,void 0===this.resolve)throw new Error("Should not happen");this.resolve(this.api)},window.gm_authFailure=()=>{if(void 0===this.reject)throw new Error("Should not happen");this.reject(new Error("google-maps: authentication error"))},this.loader=new Promise(((t,e)=>{this.resolve=t,this.reject=e;const i=document.createElement("script");i.src=this.createUrl(),i.async=!0,i.onerror=t=>e(t),document.head.appendChild(i)})))}createUrl(){const t=[`callback=${s.CALLBACK_NAME}`];this.apiKey&&t.push(`key=${this.apiKey}`);for(let e in this.options)if(this.options.hasOwnProperty(e)){let i=this.options[e];"version"===e&&(e="v"),"libraries"===e&&(i=i.join(",")),t.push(`${e}=${i}`)}return`https://maps.googleapis.com/maps/api/js?${t.join("&")}`}}s.CALLBACK_NAME="_dk_google_maps_loader_cb"},288:()=>{},153:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>y});var s=/iPhone/i,o=/iPod/i,n=/iPad/i,r=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,l=/Android/i,h=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,p=/Silk/i,d=/Windows Phone/i,c=/\bWindows(?:.+)ARM\b/i,u=/BlackBerry/i,g=/BB10/i,_=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,f=/Mobile(?:.+)Firefox\b/i,v=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};function y(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var i=e.userAgent,y=i.split("[FBAN");void 0!==y[1]&&(i=y[0]),void 0!==(y=i.split("Twitter"))[1]&&(i=y[0]);var x=function(t){return function(e){return e.test(t)}}(i),M={apple:{phone:x(s)&&!x(d),ipod:x(o),tablet:!x(s)&&(x(n)||v(e))&&!x(d),universal:x(r),device:(x(s)||x(o)||x(n)||x(r)||v(e))&&!x(d)},amazon:{phone:x(h),tablet:!x(h)&&x(p),device:x(h)||x(p)},android:{phone:!x(d)&&x(h)||!x(d)&&x(a),tablet:!x(d)&&!x(h)&&!x(a)&&(x(p)||x(l)),device:!x(d)&&(x(h)||x(p)||x(a)||x(l))||x(/\bokhttp\b/i)},windows:{phone:x(d),tablet:x(c),device:x(d)||x(c)},other:{blackberry:x(u),blackberry10:x(g),opera:x(_),firefox:x(f),chrome:x(m),device:x(u)||x(g)||x(_)||x(f)||x(m)},any:!1,phone:!1,tablet:!1};return M.any=M.apple.device||M.android.device||M.windows.device||M.other.device,M.phone=M.apple.phone||M.android.phone||M.windows.phone,M.tablet=M.apple.tablet||M.android.tablet||M.windows.tablet,M}},853:function(t,e,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,e,i,s){void 0===s&&(s=i);var o=Object.getOwnPropertyDescriptor(e,i);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[i]}}),Object.defineProperty(t,s,o)}:function(t,e,i,s){void 0===s&&(s=i),t[s]=e[i]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&s(e,t,i);return o(e,t),e},r=this&&this.__awaiter||function(t,e,i,s){return new(i||(i=Promise))((function(o,n){function r(t){try{l(s.next(t))}catch(t){n(t)}}function a(t){try{l(s.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(r,a)}l((s=s.apply(t,e||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.MapProvider=void 0;const l=a(i(916)),h=n(i(371)),p=i(890),d=a(i(153)),c=i(874),u=i(925);class g{}class _ extends h.Plugins.Plugin{init(){return r(this,void 0,void 0,(function*(){this.generalOptions.apiKey?this.initMap():console.warn("Google maps API key is missing")}))}constructor(t){super(t),this.defaults={apiKey:"",zoom:13,defaultMarkerIcon:new u.MapMarkerIconData(h.Support.StringHelpers.trimTrailingSlash(window.HotelwizeApp.Configuration.publishUrl)+"/assets/img/marker-icon-2x.png",50,82),defaultCloseIcon:new u.MapMarkerIconData(h.Support.StringHelpers.trimTrailingSlash(window.HotelwizeApp.Configuration.publishUrl)+"/assets/img/close-popup.png",13,13),defaultClusterIcon:new u.MapMarkerIconData(h.Support.StringHelpers.trimTrailingSlash(window.HotelwizeApp.Configuration.publishUrl)+"/assets/img/marker-cluster.png",40,40),mapStyles:[],infoboxWidth:260,displayDirections:!1,directionStrokeColor:"#000000",displayClusters:!0,clusterTextColor:"#fff",clusterTextSize:12},this.generalOptions=Object.assign(Object.assign(Object.assign({},this.defaults),window.map_theme_options),this.configuration),this.map=null,this.google=null,this.directionsDisplay=null,this.directionsDisplayOptions={suppressMarkers:!0,preserveViewport:!0,polylineOptions:{strokeColor:this.generalOptions.directionStrokeColor}},this.mapMarkers=[],this.mapInfoBoxes=[],this.clusterer=null}getMap(){return this.map}getMapOptions(){return this.generalOptions}initMap(){if(this.mapContainer=document.querySelectorAll("[data-map-container]").item(0),this.mapContainer){new p.Loader(this.generalOptions.apiKey).load().then((t=>{this.google=t,window.google=t,this.generalOptions.displayDirections&&(this.directionsDisplay=new this.google.maps.DirectionsRenderer(this.directionsDisplayOptions)),this.map=new t.maps.Map(this.mapContainer,{zoom:this.generalOptions.zoom,mapTypeId:t.maps.MapTypeId.ROADMAP,streetViewControl:!1,mapTypeControl:!1,gestureHandling:"cooperative",styles:this.generalOptions.mapStyles,fullscreenControlOptions:{position:t.maps.ControlPosition.LEFT_BOTTOM}}),window.map_locations.forEach((t=>{let e=new c.MapMarker;e.parseData(t),null==e.icon&&(e.icon=new u.MapMarkerIcon(this.generalOptions.defaultMarkerIcon.url,this.generalOptions.defaultMarkerIcon.width,this.generalOptions.defaultMarkerIcon.height)),this.addMarker(e)})),this.centerMap(),this.generalOptions.displayClusters&&this.addClusterer(),this.initEvents()}))}}initEvents(){var t;if(this.map){const e=document.querySelectorAll("[data-marker-id]");this.generalOptions.displayDirections?(null===(t=this.directionsDisplay)||void 0===t||t.setMap(this.map),e.forEach((t=>{t.addEventListener("click",(t=>{var e,i;if(t.preventDefault(),this.google&&this.map)try{const s=t.currentTarget.getAttribute("data-marker-id"),o=this.mapMarkers.filter((t=>t.id===s)),n=this.mapMarkers.filter((t=>"main"===t.id));if(o[0]&&n[0])if((0,d.default)(window.navigator).any)$.each(this.mapInfoBoxes,((t,e)=>{var i;return null===(i=e.infobox)||void 0===i?void 0:i.close()})),this.map.panTo(null===(e=o[0].gmMarker)||void 0===e?void 0:e.getPosition());else if("main"!==s&&o[0].enableDirections)this.centerToMarkers([n[0],o[0]]),this.directions(n[0],o[0]);else{let t=null===(i=n[0].gmMarker)||void 0===i?void 0:i.getPosition();t&&this.map.panTo(t)}}catch(t){}}))}))):e.forEach((t=>{t.addEventListener("click",(t=>{var e,i,s;if(t.preventDefault(),this.google&&this.map){const o=t.currentTarget.getAttribute("data-marker-id"),n=this.mapMarkers.filter((t=>t.id===o));if(1===n.length){this.map.panTo(null===(e=n[0].gmMarker)||void 0===e?void 0:e.getPosition());const t=this.mapInfoBoxes.filter((t=>t.id===o))[0];this.mapInfoBoxes.forEach((e=>{var i;t!==e&&(null===(i=e.infobox)||void 0===i||i.close())})),(null===(i=t.infobox)||void 0===i?void 0:i.getContent())&&(null===(s=t.infobox)||void 0===s||s.open(this.map,n[0].gmMarker))}}}))}))}}addMarker(t){var e;if(null!=this.google){void 0===this.InfoBox&&(this.InfoBox=i(837).InfoBox),t.gmMarker=new this.google.maps.Marker({map:this.map,position:t.getPosition(),visible:!0,icon:t.icon?this.getMarkerIcon(t.icon):void 0}),this.mapMarkers.push(t);const s=new g;s.id=t.id,s.infobox=new this.InfoBox({alignBottom:!0,boxClass:"location-infobox",enableEventPropagation:!0,pixelOffset:new this.google.maps.Size(-this.generalOptions.infoboxWidth/2,this.popupPosition(t.icon)),infoBoxClearance:new this.google.maps.Size(1,1),content:this.getPopupContent(t.id),maxWidth:0,boxStyle:{width:`${this.generalOptions.infoboxWidth}px`},closeBoxURL:this.generalOptions.defaultCloseIcon.url}),this.mapInfoBoxes.push(s),null===(e=this.google)||void 0===e||e.maps.event.addListener(t.gmMarker,"click",(()=>{var e,i;if(this.map){try{this.resetDirections()}catch(t){}let o=t.gmMarker,n=o.getPosition();this.map.panTo(n),this.mapInfoBoxes.forEach((t=>{var e;s!==t&&(null===(e=t.infobox)||void 0===e||e.close())})),(null===(e=s.infobox)||void 0===e?void 0:e.getContent())&&(null===(i=s.infobox)||void 0===i||i.open(this.map,o)),document.querySelectorAll("[data-marker-id]").forEach((t=>{t.classList.remove("active")})),document.querySelectorAll(`[data-marker-id='${t.id}']`).forEach((t=>{t.classList.add("active")}))}}))}}popupPosition(t){let e=0,i=0;return null!=t&&t.isValid()||(t=new u.MapMarkerIcon(this.generalOptions.defaultMarkerIcon.url,this.generalOptions.defaultMarkerIcon.width,this.generalOptions.defaultMarkerIcon.height)),e=t.getWidth(),i=t.getHeight(),e===i?-(i/2+10):-(i+10)}getPopupContent(t){let e="";const i=this.mapMarkers.filter((e=>e.id===t));return 0===i.length?e:(i[0].hasContent()&&(e=i[0].content),this.htmlDecode(e))}htmlDecode(t){const e=document.createElement("textarea");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}centerMap(){if(this.google&&this.map){const t=new this.google.maps.LatLngBounds;for(const e in this.mapMarkers)if(this.mapMarkers.hasOwnProperty(e)){const i=new this.google.maps.LatLng(this.mapMarkers[e].getLat(),this.mapMarkers[e].getLng());t.extend(i)}if(1===this.mapMarkers.length)this.map.setCenter(t.getCenter()),this.map.setZoom(this.generalOptions.zoom);else{this.map.fitBounds(t);const e=this.google.maps.event.addListener(this.map,"idle",(()=>{if(this.google&&this.map){const t=this.map.getZoom();this.map.setZoom(t-1),this.google.maps.event.removeListener(e)}}))}}}centerToMarkers(t){var e,i;if(this.google&&this.map){const s=new this.google.maps.LatLngBounds;for(const e in t)if(t.hasOwnProperty(e)){const i=new this.google.maps.LatLng(t[e].getLat(),t[e].getLng());s.extend(i)}this.map.fitBounds(s);const o=this.mapInfoBoxes.filter((e=>e.id===t[1].id));if(o.length){const s=o[0],n=null===(e=s.infobox)||void 0===e?void 0:e.getContent();$.each(this.mapInfoBoxes,((t,e)=>{var i;s!==e&&(null===(i=e.infobox)||void 0===i||i.close())})),n&&(null===(i=s.infobox)||void 0===i||i.open(this.map,t[1].gmMarker))}}}getMarkerIcon(t){if(this.google){let e="",i=0,s=0;null!=t&&t.isValid()||(t=new u.MapMarkerIcon(this.generalOptions.defaultMarkerIcon.url,this.generalOptions.defaultMarkerIcon.width,this.generalOptions.defaultMarkerIcon.height)),e=t.getUrl(),i=t.getWidth(),s=t.getHeight();let o=s;return i===s&&(o=s/2),{url:e,size:new this.google.maps.Size(i,s),scaledSize:new this.google.maps.Size(i,s),anchor:new this.google.maps.Point(i/2,o)}}}resetDirections(){null!==this.directionsDisplay&&this.directionsDisplay.setMap(null)}directions(t,e){if(this.generalOptions.displayDirections&&this.google){this.resetDirections(),this.directionsDisplay=new this.google.maps.DirectionsRenderer(this.directionsDisplayOptions),this.directionsDisplay.setMap(this.map);const i=new this.google.maps.DirectionsService,s={latLng:new this.google.maps.LatLng(t.getLat(),t.getLng())},o={latLng:new this.google.maps.LatLng(e.getLat(),e.getLng())},n={origin:s.latLng,destination:o.latLng,travelMode:this.google.maps.TravelMode.DRIVING};setTimeout((()=>{i.route(n,((t,e)=>{this.google&&this.directionsDisplay&&this.map&&e===this.google.maps.DirectionsStatus.OK&&(this.directionsDisplay.setDirections(t),this.map.setZoom(this.map.getZoom()-1))}))}),200)}}addClusterer(){if(this.google&&this.map){const t=this.mapMarkers.filter((t=>!1===t.excludeFromCluster)),e=[];t.forEach((t=>{e.push(t.gmMarker)}));const i=new u.MapMarkerIcon(this.generalOptions.defaultClusterIcon.url,this.generalOptions.defaultClusterIcon.width,this.generalOptions.defaultClusterIcon.height);this.clusterer=new l.default(this.map,e,{styles:[l.default.withDefaultStyle({url:i.getUrl(),width:i.getWidth(),height:i.getHeight(),textColor:this.generalOptions.clusterTextColor,textSize:this.generalOptions.clusterTextSize,className:"hw-cluster-icon"})]}),this.clusterer.setIgnoreHidden(!0)}}}e.MapProvider=_},925:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MapMarkerIcon=e.MapMarkerIconData=void 0;e.MapMarkerIconData=class{constructor(t,e,i){this.url=t,this.width=e,this.height=i}};e.MapMarkerIcon=class{getUrl(){return this.url||""}setUrl(t){this.url=t}getWidth(){return"string"==typeof this.width?parseInt(this.width,10):this.width||0}getHeight(){return"string"==typeof this.height?parseInt(this.height,10):this.height||0}setWidth(t){this.width=t}setHeight(t){this.height=t}isValid(){var t=this.getWidth(),e=this.getHeight(),i=this.getUrl();return null!=i&&""!==i&&t>0&&e>0}constructor(t,e,i){this.url="",this.width=0,this.height=0,this.setUrl(t),this.setWidth(e),this.setHeight(i)}}},874:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MapMarker=e.MapMarkerData=void 0;const s=i(925);e.MapMarkerData=class{constructor(){this.lat=0,this.lng=0,this.content="",this.url="",this.enableDirections=!0,this.excludeFromCluster=!1}};e.MapMarker=class{constructor(t=0,e=0){this.content="",this.url="",this.icon=null,this.enableDirections=!0,this.excludeFromCluster=!1,this._latitude=0,this._longitude=0,this.setLat(t),this.setLng(e)}setLat(t){this._latitude=("string"==typeof t?parseFloat(t):t)||0}setLng(t){this._longitude=("string"==typeof t?parseFloat(t):t)||0}getLat(){return this._latitude}getLng(){return this._longitude}parseData(t){this.id=t.id,this.content=t.content,this.url=t.url,this.setLat(t.lat),this.setLng(t.lng),this.enableDirections=void 0===t.enableDirections||t.enableDirections,this.excludeFromCluster=void 0!==t.excludeFromCluster&&t.excludeFromCluster;let e=t.icon;e&&(this.icon=new s.MapMarkerIcon(e.url,e.width,e.height))}hasContent(){return void 0!==this.content&&null!=this.content&&this.content.length>0}getPosition(){return new google.maps.LatLng(this._latitude,this._longitude)}}},371:t=>{"use strict";t.exports=window.Hotelwize}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var n=e[s]={exports:{}};return t[s].call(n.exports,n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s=i(853);self["Hotelwize.Plugins.MapProvider"]=s})(); let mapProvider = new globalThis['Hotelwize.Plugins.MapProvider'].MapProvider({ "id": 36, "instanceId": "18ff8045-2517-4829-8863-ab660ad952b6", "instanceOrder": 0, "type": "mapProvider", "isTypeDefault": false, "name": "Google Maps", "assemblyName": "Hotelwize.Plugins.MapProvider.GoogleMaps", "assemblyVersion": "1.2.0.0", "configuration": { "localeCode": "en-US", "apiKey": "AIzaSyDehbERj6dIRg7cBUf09f_q4MoIYHOtak8", "defaultMarkerIcon": { "url": "https://assets.builderassets.com/site-media/252/image-1.png?format=png", "width": 64, "height": 64 }, "defaultClusterIcon": { "url": "https://assets.builderassets.com/site-media/252/image-5.png?format=png", "width": 64, "height": 64 }, "displayClusters": true, "clusterTextColor": "#e6d0d0", "clusterTextSize": 12, "displayDirections": true, "directionStrokeColor": "#000000", "mapStyles": [ { "featureType": "administrative", "elementType": "labels.text.fill", "stylers": [ { "color": "#444444" } ] }, { "featureType": "landscape", "elementType": "all", "stylers": [ { "color": "#f2f2f2" } ] }, { "featureType": "poi", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "poi.business", "elementType": "geometry.fill", "stylers": [ { "visibility": "on" } ] }, { "featureType": "road", "elementType": "all", "stylers": [ { "saturation": -100 }, { "lightness": 45 } ] }, { "featureType": "road.highway", "elementType": "all", "stylers": [ { "visibility": "simplified" } ] }, { "featureType": "road.arterial", "elementType": "labels.icon", "stylers": [ { "visibility": "off" } ] }, { "featureType": "transit", "elementType": "all", "stylers": [ { "visibility": "off" } ] }, { "featureType": "water", "elementType": "all", "stylers": [ { "color": "#b4d4e1" }, { "visibility": "on" } ] } ] }, "trackers": [], "clientSettings": [], "clientSettingsLifetime": 2592000, "cookies": [] }); HotelwizeApp.registerPlugin(mapProvider, true); } Close We use cookies to provide the services offered on our website to improve our user experience. Allow all Customize Disable all