1function JetGMInfoBox(opt_opts){opt_opts=opt_opts||{};google.maps.OverlayView.apply(this,arguments);this.content_=opt_opts.content||"";this.disableAutoPan_=opt_opts.disableAutoPan||!1;this.maxWidth_=opt_opts.maxWidth||0;this.pixelOffset_=opt_opts.pixelOffset||new google.maps.Size(0,0);this.position_=opt_opts.position||new google.maps.LatLng(0,0);this.zIndex_=opt_opts.zIndex||null;this.boxClass_=opt_opts.boxClass||"infoBox";this.boxStyle_=opt_opts.boxStyle||{};this.closeBoxMargin_=opt_opts.closeBoxMargin||"2px";this.closeBoxURL_=opt_opts.closeBoxURL||"//www.google.com/intl/en_us/mapfiles/close.gif";if(opt_opts.closeBoxURL===""){this.closeBoxURL_=""} 2this.closeBoxTitle_=opt_opts.closeBoxTitle||" Close ";this.infoBoxClearance_=opt_opts.infoBoxClearance||new google.maps.Size(1,1);if(typeof opt_opts.visible==="undefined"){if(typeof opt_opts.isHidden==="undefined"){opt_opts.visible=!0}else{opt_opts.visible=!opt_opts.isHidden}} 3this.isHidden_=!opt_opts.visible;this.alignBottom_=opt_opts.alignBottom||!1;this.pane_=opt_opts.pane||"floatPane";this.enableEventPropagation_=opt_opts.enableEventPropagation||!1;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null} 4JetGMInfoBox.prototype=new google.maps.OverlayView();JetGMInfoBox.prototype.addEventListener=function(target,type,handler,useCapture){useCapture=useCapture||!1;target.addEventListener(type,handler,useCapture);return{target:target,type:type,handler:handler,useCapture:useCapture,}} 5JetGMInfoBox.prototype.removeEventListener=function(listener){listener.target.removeEventListener(listener.type,listener.handler,listener.useCapture)} 6JetGMInfoBox.prototype.createJetGMInfoBoxDiv_=function(){var i;var events;var bw;var me=this;var cancelHandler=function(e){var hasListingOverlay='click'===e.type&&e.currentTarget.querySelector('.jet-engine-listing-overlay-wrap');if(hasListingOverlay){return} 7e.cancelBubble=!0;if(e.stopPropagation){e.stopPropagation()}};var ignoreHandler=function(e){e.returnValue=!1;if(e.preventDefault){e.preventDefault()} 8if(!me.enableEventPropagation_){cancelHandler(e)}};if(!this.div_){this.div_=document.createElement("div");this.setBoxStyle_();if(typeof this.content_.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+this.content_}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(this.content_)} 9this.getPanes()[this.pane_].appendChild(this.div_);this.addClickHandler_();if(this.div_.style.width){this.fixedWidthSet_=!0}else{if(this.maxWidth_!==0){this.div_.style.width=this.maxWidth_+'px';this.fixedWidthSet_=!0}else{bw=this.getBoxWidths_();this.div_.style.width=(this.div_.offsetWidth-bw.left-bw.right)+"px";this.fixedWidthSet_=!1}} 10this.panBox_(this.disableAutoPan_);if(!this.enableEventPropagation_){this.eventListeners_=[];events=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];for(i=0;i<events.length;i++){this.eventListeners_.push(this.addEventListener(this.div_,events[i],cancelHandler))} 11this.eventListeners_.push(this.addEventListener(this.div_,"mouseover",function(e){this.style.cursor="default"}))} 12this.contextListener_=this.addEventListener(this.div_,"contextmenu",ignoreHandler);google.maps.event.trigger(this,"domready")}};JetGMInfoBox.prototype.getCloseBoxImg_=function(){var img="";if(this.closeBoxURL_!==""){img="<img";img+=" src='"+this.closeBoxURL_+"'";img+=" align=right";img+=" title='"+this.closeBoxTitle_+"'";img+=" class='jet-map-close'";img+=" style='";img+=" margin: "+this.closeBoxMargin_+";";img+="'>"} 13return img};JetGMInfoBox.prototype.addClickHandler_=function(){var closeBox;if(this.closeBoxURL_!==""){closeBox=this.div_.firstChild;this.closeListener_=this.addEventListener(closeBox,"click",this.getCloseClickHandler_())}else{this.closeListener_=null}};JetGMInfoBox.prototype.getCloseClickHandler_=function(){var me=this;return function(e){e.cancelBubble=!0;if(e.stopPropagation){e.stopPropagation()} 14google.maps.event.trigger(me,"closeclick");me.close()}};JetGMInfoBox.prototype.panBox_=function(disablePan){var map;var bounds;var xOffset=0,yOffset=0;if(!disablePan){map=this.getMap();if(map instanceof google.maps.Map){if(!map.getBounds().contains(this.position_)){map.setCenter(this.position_)} 15var iwOffsetX=this.pixelOffset_.width;var iwOffsetY=this.pixelOffset_.height;var iwWidth=this.div_.offsetWidth;var iwHeight=this.div_.offsetHeight;var padX=this.infoBoxClearance_.width;var padY=this.infoBoxClearance_.height;if(map.panToBounds.length==2){var padding={left:0,right:0,top:0,bottom:0};padding.left=-iwOffsetX+padX;padding.right=iwOffsetX+iwWidth+padX;if(this.alignBottom_){padding.top=-iwOffsetY+padY+iwHeight;padding.bottom=iwOffsetY+padY}else{padding.top=-iwOffsetY+padY;padding.bottom=iwOffsetY+iwHeight+padY} 16map.panToBounds(new google.maps.LatLngBounds(this.position_),padding)}else{var mapDiv=map.getDiv();var mapWidth=mapDiv.offsetWidth;var mapHeight=mapDiv.offsetHeight;var pixPosition=this.getProjection().fromLatLngToContainerPixel(this.position_);if(pixPosition.x<(-iwOffsetX+padX)){xOffset=pixPosition.x+iwOffsetX-padX}else if((pixPosition.x+iwWidth+iwOffsetX+padX)>
16mapWidth){xOffset=pixPosition.x+iwWidth+iwOffsetX+padX-mapWidth} 17if(this.alignBottom_){if(pixPosition.y<(-iwOffsetY+padY+iwHeight)){yOffset=pixPosition.y+iwOffsetY-padY-iwHeight}else if((pixPosition.y+iwOffsetY+padY)>mapHeight){yOffset=pixPosition.y+iwOffsetY+padY-mapHeight}}else{if(pixPosition.y<(-iwOffsetY+padY)){yOffset=pixPosition.y+iwOffsetY-padY}else if((pixPosition.y+iwHeight+iwOffsetY+padY)>mapHeight){yOffset=pixPosition.y+iwHeight+iwOffsetY+padY-mapHeight}} 18if(!(xOffset===0&&yOffset===0)){var c=map.getCenter();map.panBy(xOffset,yOffset)}}}}};JetGMInfoBox.prototype.setBoxStyle_=function(){var i,boxStyle;if(this.div_){this.div_.className=this.boxClass_;this.div_.style.cssText="";boxStyle=this.boxStyle_;for(i in boxStyle){if(boxStyle.hasOwnProperty(i)){this.div_.style[i]=boxStyle[i]}} 19if((typeof this.div_.style.WebkitTransform==="undefined")||(this.div_.style.WebkitTransform.indexOf("translateZ")===-1&&this.div_.style.WebkitTransform.indexOf("matrix")===-1)){this.div_.style.WebkitTransform="translateZ(0)"} 20if(typeof this.div_.style.opacity!=="undefined"&&this.div_.style.opacity!==""){this.div_.style.MsFilter="\"progid:DXImageTransform.Microsoft.Alpha(Opacity="+(this.div_.style.opacity*100)+")\"";this.div_.style.filter="alpha(opacity="+(this.div_.style.opacity*100)+")"} 21this.div_.style.position="absolute";this.div_.style.visibility='hidden';if(this.zIndex_!==null){this.div_.style.zIndex=this.zIndex_}}};JetGMInfoBox.prototype.getBoxWidths_=function(){var computedStyle;var bw={top:0,bottom:0,left:0,right:0};var box=this.div_;if(document.defaultView&&document.defaultView.getComputedStyle){computedStyle=box.ownerDocument.defaultView.getComputedStyle(box,"");if(computedStyle){bw.top=parseInt(computedStyle.borderTopWidth,10)||0;bw.bottom=parseInt(computedStyle.borderBottomWidth,10)||0;bw.left=parseInt(computedStyle.borderLeftWidth,10)||0;bw.right=parseInt(computedStyle.borderRightWidth,10)||0}}else if(document.documentElement.currentStyle){if(box.currentStyle){bw.top=parseInt(box.currentStyle.borderTopWidth,10)||0;bw.bottom=parseInt(box.currentStyle.borderBottomWidth,10)||0;bw.left=parseInt(box.currentStyle.borderLeftWidth,10)||0;bw.right=parseInt(box.currentStyle.borderRightWidth,10)||0}} 22return bw};JetGMInfoBox.prototype.onRemove=function(){if(this.div_){this.div_.parentNode.removeChild(this.div_);this.div_=null}};JetGMInfoBox.prototype.draw=function(){this.createJetGMInfoBoxDiv_();var pixPosition=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=(pixPosition.x+this.pixelOffset_.width)+"px";if(this.alignBottom_){this.div_.style.bottom=-(pixPosition.y+this.pixelOffset_.height)+"px"}else{this.div_.style.top=(pixPosition.y+this.pixelOffset_.height)+"px"} 23if(this.isHidden_){this.div_.style.visibility="hidden"}else{this.div_.style.visibility="visible"}};
23JetGMInfoBox.prototype.setOptions=function(opt_opts){if(typeof opt_opts.boxClass!=="undefined"){this.boxClass_=opt_opts.boxClass;this.setBoxStyle_()} 24if(typeof opt_opts.boxStyle!=="undefined"){this.boxStyle_=opt_opts.boxStyle;this.setBoxStyle_()} 25if(typeof opt_opts.content!=="undefined"){this.setContent(opt_opts.content)} 26if(typeof opt_opts.disableAutoPan!=="undefined"){this.disableAutoPan_=opt_opts.disableAutoPan} 27if(typeof opt_opts.maxWidth!=="undefined"){this.maxWidth_=opt_opts.maxWidth} 28if(typeof opt_opts.pixelOffset!=="undefined"){this.pixelOffset_=opt_opts.pixelOffset} 29if(typeof opt_opts.alignBottom!=="undefined"){this.alignBottom_=opt_opts.alignBottom} 30if(typeof opt_opts.position!=="undefined"){this.setPosition(opt_opts.position)} 31if(typeof opt_opts.zIndex!=="undefined"){this.setZIndex(opt_opts.zIndex)} 32if(typeof opt_opts.closeBoxMargin!=="undefined"){this.closeBoxMargin_=opt_opts.closeBoxMargin} 33if(typeof opt_opts.closeBoxURL!=="undefined"){this.closeBoxURL_=opt_opts.closeBoxURL} 34if(typeof opt_opts.closeBoxTitle!=="undefined"){this.closeBoxTitle_=opt_opts.closeBoxTitle} 35if(typeof opt_opts.infoBoxClearance!=="undefined"){this.infoBoxClearance_=opt_opts.infoBoxClearance} 36if(typeof opt_opts.isHidden!=="undefined"){this.isHidden_=opt_opts.isHidden} 37if(typeof opt_opts.visible!=="undefined"){this.isHidden_=!opt_opts.visible} 38if(typeof opt_opts.enableEventPropagation!=="undefined"){this.enableEventPropagation_=opt_opts.enableEventPropagation} 39if(this.div_){this.draw()}};JetGMInfoBox.prototype.contentIsSet=function(){return""!==this.content_};JetGMInfoBox.prototype.setContent=function(content){if(typeof content.nodeType==='undefined'){let contentHtml=document.createElement('div');contentHtml.innerHTML=content;content=contentHtml} 40this.content_=content;if(this.div_){if(this.closeListener_){this.removeEventListener(this.closeListener_);this.closeListener_=null} 41if(!this.fixedWidthSet_){this.div_.style.width=""} 42if(typeof content.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+content}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(content)} 43if(!this.fixedWidthSet_){this.div_.style.width=this.div_.offsetWidth+"px";if(typeof content.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+content}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(content)}} 44this.addClickHandler_()} 45google.maps.event.trigger(this,"content_changed")};JetGMInfoBox.prototype.setPosition=function(latlng){this.position_=latlng;if(this.div_){this.draw()} 46google.maps.event.trigger(this,"position_changed")};JetGMInfoBox.prototype.setZIndex=function(index){this.zIndex_=index;if(this.div_){this.div_.style.zIndex=index} 47google.maps.event.trigger(this,"zindex_changed")};JetGMInfoBox.prototype.setVisible=function(isVisible){this.isHidden_=!isVisible;if(this.div_){this.div_.style.visibility=(this.isHidden_?"hidden":"visible")}};JetGMInfoBox.prototype.getContent=function(){return this.content_};JetGMInfoBox.prototype.getPosition=function(){return this.position_};JetGMInfoBox.prototype.getZIndex=function(){return this.zIndex_};JetGMInfoBox.prototype.getVisible=function(){var isVisible;if((typeof this.getMap()==="undefined")||(this.getMap()===null)){isVisible=!1}else{isVisible=!this.isHidden_} 48return isVisible};JetGMInfoBox.prototype.getWidth=function(){var width=null;if(this.div_){width=this.div_.offsetWidth} 49return width};JetGMInfoBox.prototype.getHeight=function(){var height=null;if(this.div_){height=this.div_.offsetHeight} 50return height};JetGMInfoBox.prototype.show=function(){this.isHidden_=!1;if(this.div_){this.div_.style.visibility="visible"}};JetGMInfoBox.prototype.hide=function(){this.isHidden_=!0;if(this.div_){this.div_.style.visibility="hidden"}};JetGMInfoBox.prototype.open=function(map,anchor){var me=this;if(anchor){this.setPosition(anchor.getPosition());this.moveListener_=google.maps.event.addListener(anchor,"position_changed",function(){me.setPosition(this.getPosition())})} 51this.setMap(map);if(this.div_){this.panBox_(this.disableAutoPan_)}};JetGMInfoBox.prototype.close=function(){var i;if(this.closeListener_){this.removeEventListener(this.closeListener_);this.closeListener_=null} 52if(this.eventListeners_){for(i=0;i<this.eventListeners_.length;i++){this.removeEventListener(this.eventListeners_[i])} 53this.eventListeners_=null} 54if(this.moveListener_){google.maps.event.removeListener(this.moveListener_);this.moveListener_=null} 55if(this.contextListener_){this.removeEventListener(this.contextListener_);this.contextListener_=null} 56this.setMap(null)};(function(){function t(t){var r=t||{};this.ready_=!1,this.dragging_=!1,null==t.visible&&(t.visible=!0),null==t.shadow&&(t.shadow="7px -3px 5px rgba(88,88,88,0.7)"),null==t.anchor&&(t.anchor=e.BOTTOM),this.setValues(r)}t.prototype=new google.maps.OverlayView,window.RichMarker=t,t.prototype.getVisible=function(){return this.get("visible")},t.prototype.getVisible=t.prototype.getVisible,t.prototype.setVisible=function(t){this.set("visible",t)},t.prototype.setVisible=t.prototype.setVisible,t.prototype.visible_changed=function(){this.ready_&&(this.markerWrapper_.style.display=this.getVisible()?"":"none",this.draw())},t.prototype.visible_changed=t.prototype.visible_changed,t.prototype.setFlat=function(t){this.set("flat",!!t)},t.prototype.setFlat=t.prototype.setFlat,t.prototype.getFlat=function(){return this.get("flat")},t.prototype.getFlat=t.prototype.getFlat,t.prototype.getWidth=function(){return this.get("width")},t.prototype.getWidth=t.prototype.getWidth,t.prototype.getHeight=function(){return this.get("height")},t.prototype.getHeight=t.prototype.getHeight,t.prototype.setShadow=function(t){this.set("shadow",t),this.flat_changed()},t.prototype.setShadow=t.prototype.setShadow,t.prototype.getShadow=function(){return this.get("shadow")},t.prototype.getShadow=t.prototype.getShadow,t.prototype.flat_changed=function(){this.ready_&&(this.markerWrapper_.style.boxShadow=this.markerWrapper_.style.webkitBoxShadow=this.markerWrapper_.style.MozBoxShadow=this.getFlat()?"":this.getShadow())},t.prototype.flat_changed=t.prototype.flat_changed,t.prototype.setZIndex=function(t){this.set("zIndex",t)},t.prototype.setZIndex=t.prototype.setZIndex,t.prototype.getZIndex=function(){return this.get("zIndex")},t.prototype.getZIndex=t.prototype.getZIndex,t.prototype.zIndex_changed=function(){this.getZIndex()&&this.ready_&&(this.markerWrapper_.style.zIndex=this.getZIndex())},t.prototype.zIndex_changed=t.prototype.zIndex_changed,t.prototype.getDraggable=function(){return this.get("draggable")},t.prototype.getDraggable=t.prototype.getDraggable,t.prototype.setDraggable=function(t){this.set("draggable",!!t)},t.prototype.setDraggable=t.prototype.setDraggable,t.prototype.draggable_changed=function(){this.ready_&&(this.getDraggable()?this.addDragging_(this.markerWrapper_):this.removeDragListeners_())},t.prototype.draggable_changed=t.prototype.draggable_changed,t.prototype.getPosition=function(){return this.get("position")},t.prototype.getPosition=t.prototype.getPosition,t.prototype.setPosition=function(t){this.set("position",t)},t.prototype.setPosition=t.prototype.setPosition,t.prototype.position_changed=function(){this.draw()},t.prototype.position_changed=t.prototype.position_changed,t.prototype.getAnchor=function(){return this.get("anchor")},t.prototype.getAnchor=t.prototype.getAnchor,t.prototype.setAnchor=function(t){this.set("anchor",t)},t.prototype.setAnchor=t.prototype.setAnchor,t.prototype.anchor_changed=function(){this.draw()},t.prototype.anchor_changed=t.prototype.anchor_changed,t.prototype.htmlToDocumentFragment_=function(t){var e=document.createElement("DIV");if(e.innerHTML=t,1==e.childNodes.length)return e.removeChild(e.firstChild);for(var r=document.createDocumentFragment();e.firstChild;)r.appendChild(e.firstChild);return r},t.prototype.removeChildren_=function(t){if(t)for(var e;e=t.firstChild;)t.removeChild(e)},t.prototype.setContent=function(t){this.set("content",t)},t.prototype.setContent=t.prototype.setContent,t.prototype.getContent=function(){return this.get("content")},t.prototype.getContent=t.prototype.getContent,t.prototype.addEventListener=function(t,e,r,o){return o=o||!1,t.addEventListener(e,r,o),{target:t,type:e,handler:r,useCapture:o}},t.prototype.removeEventListener=function(t){t.target.removeEventListener(t.type,t.handler,t.useCapture)},t.prototype.content_changed=function(){if(this.markerContent_){this.removeChildren_(this.markerContent_);var t=this.getContent();if(t){"string"==typeof t&&(t=t.replace(/^\s*([\S\s]*)\b\s*$/,"$1"),t=this.htmlToDocumentFragment_(t)),this.markerContent_.appendChild(t);for(var e,r=this,o=this.markerContent_.getElementsByTagName("IMG"),i=0;e=o[i];i++)this.addEventListener(e,"mousedown",(function(t){r.getDraggable()&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1,console.log("image mousedown"))})),this.addEventListener(e,"load",(function(){r.draw(),console.log("image load")}));google.maps.event.trigger(this,"domready")}this.ready_&&this.draw()}},t.prototype.content_changed=t.prototype.content_changed,t.prototype.setCursor_=function(t){if(this.ready_){var e="";-1!==navigator.userAgent.indexOf("Gecko/")?("dragging"==t&&(e="-moz-grabbing"),"dragready"==t&&(e="-moz-grab"),"draggable"==t&&(e="pointer")):("dragging"!=t&&"dragready"!=t||(e="move"),"draggable"==t&&(e="pointer")),this.markerWrapper_.style.cursor!=e&&(this.markerWrapper_.style.cursor=e)}},t.prototype.startDrag=function(t){if(this.getDraggable()&&!this.dragging_){this.dragging_=!0;var e=this.getMap();this.mapDraggable_=e.get("draggable"),e.set("draggable",!1),this.mouseX_=t.clientX,this.mouseY_=t.clientY,this.setCursor_("dragready"),this.markerWrapper_.style.MozUserSelect="none",this.markerWrapper_.style.KhtmlUserSelect="none",this.markerWrapper_.style.WebkitUserSelect="none",this.markerWrapper_.unselectable="on",this.markerWrapper_.onselectstart=function(){return!1},this.addDraggingListeners_(),google.maps.event.trigger(this,"dragstart")}},t.prototype.stopDrag=function(){this.getDraggable()&&this.dragging_&&(this.dragging_=!1,this.getMap().set("draggable",this.mapDraggable_),this.mouseX_=this.mouseY_=this.mapDraggable_=null,this.markerWrapper_.style.MozUserSelect="",this.markerWrapper_.style.KhtmlUserSelect="",this.markerWrapper_.style.WebkitUserSelect="",this.markerWrapper_.unselectable="off",this.markerWrapper_.onselectstart=function(){},this.removeDraggingListeners_(),this.setCursor_("draggable"),google.maps.event.trigger(this,"dragend"),this.draw())},t.prototype.drag=function(t){if(this.getDraggable()&&this.dragging_){var e=this.mouseX_-t.clientX,r=this.mouseY_-t.clientY;this.mouseX_=t.clientX,this.mouseY_=t.clientY;var o=parseInt(this.markerWrapper_.style.left,10)-e,i=parseInt(this.markerWrapper_.style.top,10)-r;this.markerWrapper_.style.left=o+"px",this.markerWrapper_.style.top=i+"px";var s=this.getOffset_(),n=new google.maps.Point(o-s.width,i-s.height),a=this.getProjection();this.setPosition(a.fromDivPixelToLatLng(n)),this.setCursor_("dragging"),google.maps.event.trigger(this,"drag")}
56else this.stopDrag()},t.prototype.removeDragListeners_=function(){this.draggableListener_&&(this.removeEventListener(this.draggableListener_),delete this.draggableListener_),this.setCursor_("")},t.prototype.addDragging_=function(t){if(t){var e=this;this.draggableListener_=this.addEventListener(t,"mousedown",(function(t){e.startDrag(t),console.log("node mousedown")})),this.setCursor_("draggable")}},t.prototype.addDraggingListeners_=function(){var t=this;this.markerWrapper_.setCapture?(this.markerWrapper_.setCapture(!0),this.draggingListeners_=[this.addEventListener(this.markerWrapper_,"mousemove",(function(e){t.drag(e)}),!0),this.addEventListener(this.markerWrapper_,"mouseup",(function(){t.stopDrag(),t.markerWrapper_.releaseCapture()}),!0)]):this.draggingListeners_=[this.addEventListener(window,"mousemove",(function(e){t.drag(e)}),!0),this.addEventListener(window,"mouseup",(function(){t.stopDrag()}),!0)]},t.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var t,e=0;t=this.draggingListeners_[e];e++)this.removeEventListener(t);this.draggingListeners_.length=0}},t.prototype.getOffset_=function(){var t=this.getAnchor();if("object"==typeof t)return t;var r=new google.maps.Size(0,0);if(!this.markerContent_)return r;var o=this.markerContent_.offsetWidth,i=this.markerContent_.offsetHeight;switch(t){case e.TOP_LEFT:break;case e.TOP:r.width=-o/2;break;case e.TOP_RIGHT:r.width=-o;break;case e.LEFT:r.height=-i/2;break;case e.MIDDLE:r.width=-o/2,r.height=-i/2;break;case e.RIGHT:r.width=-o,r.height=-i/2;break;case e.BOTTOM_LEFT:r.height=-i;break;case e.BOTTOM:r.width=-o/2,r.height=-i;break;case e.BOTTOM_RIGHT:r.width=-o,r.height=-i}return r},t.prototype.onAdd=function(){if(this.markerWrapper_||(this.markerWrapper_=document.createElement("DIV"),this.markerWrapper_.style.position="absolute"),this.getZIndex()&&(this.markerWrapper_.style.zIndex=this.getZIndex()),this.markerWrapper_.style.display=this.getVisible()?"":"none",!this.markerContent_){this.markerContent_=document.createElement("DIV"),this.markerWrapper_.appendChild(this.markerContent_);var t=this;this.addEventListener(this.markerContent_,"click",(function(e){google.maps.event.trigger(t,"click",e)})),this.addEventListener(this.markerContent_,"mouseover",(function(e){google.maps.event.trigger(t,"mouseover",e)})),this.addEventListener(this.markerContent_,"mouseout",(function(e){google.maps.event.trigger(t,"mouseout",e)}))}this.ready_=!0,this.content_changed(),this.flat_changed(),this.draggable_changed();var e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.markerWrapper_),google.maps.event.trigger(this,"ready")},t.prototype.onAdd=t.prototype.onAdd,t.prototype.draw=function(){if(this.ready_&&!this.dragging_){var t=this.getProjection();if(t){var e=this.get("position"),r=t.fromLatLngToDivPixel(e),o=this.getOffset_();this.markerWrapper_.style.top=r.y+o.height+"px",this.markerWrapper_.style.left=r.x+o.width+"px";var i=this.markerContent_.offsetHeight,s=this.markerContent_.offsetWidth;s!=this.get("width")&&this.set("width",s),i!=this.get("height")&&this.set("height",i)}}},t.prototype.draw=t.prototype.draw,t.prototype.onRemove=function(){this.markerWrapper_&&this.markerWrapper_.parentNode&&this.markerWrapper_.parentNode.removeChild(this.markerWrapper_),this.removeDragListeners_()},t.prototype.onRemove=t.prototype.onRemove;var e={TOP_LEFT:1,TOP:2,TOP_RIGHT:3,LEFT:4,MIDDLE:5,RIGHT:6,BOTTOM_LEFT:7,BOTTOM:8,BOTTOM_RIGHT:9};window.RichMarkerPosition=e})();window.JetEngineMapsProvider=function(){this.getId=function(){return'google'} 57this.initMap=function(container,settings){settings=settings||{};if(!settings.mapTypeId){settings.mapTypeId=google.maps.MapTypeId.ROADMAP} 58let map=new google.maps.Map(container,settings);return map} 59this.initBounds=function(){return new google.maps.LatLngBounds()} 60this.fitMapBounds=function(data,callback){var self=this;data.map.fitBounds(data.bounds);var listener=google.maps.event.addListener(data.map,'idle',function(){if(!data.marker.getMap()){self.fitMapToMarker(data.marker,data.markersClusterer)}else if(callback){callback()} 61google.maps.event.removeListener(listener)})} 62this.addMarker=function(data){data.position=new google.maps.LatLng(data.position.lat,data.position.lng);return new RichMarker(data)} 63this.removeMarker=function(marker){marker.setMap(null)} 64this.addPopup=function(data){return new JetGMInfoBox({position:new google.maps.LatLng(data.position.lat,data.position.lng),maxWidth:data.width,boxClass:"jet-map-box",zIndex:null,pixelOffset:new google.maps.Size(0-data.width/2,0-data.offset),alignBottom:!0,infoBoxClearance:new google.maps.Size(10,10),pane:"floatPane",enableEventPropagation:!1,})} 65this.markerOnClick=function(map,data,callback){data=data||{};data.map=map;data.shadow=!1;google.maps.event.addListener(map,"click",(event)=>{data.position={lat:event.latLng.lat(),lng:event.latLng.lng(),};if(callback){callback(this.addMarker(data))}})} 66this.closePopup=function(infoBox,callback){google.maps.event.addListener(infoBox,'closeclick',callback)} 67this.openPopup=function(trigger,callback,infobox,map,openOn){google.maps.event.addListener(trigger,'click',callback);if('hover'===openOn){google.maps.event.addListener(trigger,'mouseover',callback)}} 68this.triggerOpenPopup=function(trigger){google.maps.event.trigger(trigger,'click')} 69this.getMarkerPosition=function(marker,toJSON){toJSON=toJSON||!1;if(toJSON){return marker.position.toJSON()}else{return marker.position}}
70this.getMarkerCluster=function(data){return new MarkerClusterer(data.map,data.markers,{imagePath:data.clustererImg})} 71this.addMarkers=function(markerCluster,markers){markerCluster.addMarkers(markers)} 72this.removeMarkers=function(markerCluster,markers){markerCluster.removeMarkers(markers)} 73this.setCenterByPosition=function(data){data.map.setCenter(data.position);data.map.setZoom(data.zoom)} 74this.setAutoCenter=function(data){data.map.fitBounds(data.bounds);if(data.settings.maxZoom){var listener=google.maps.event.addListener(data.map,'idle',function(){if(data.map.getZoom()>data.settings.maxZoom){data.map.setZoom(data.settings.maxZoom)} 75google.maps.event.removeListener(listener)})}} 76this.getMarkerMap=function(marker){return marker.getMap()} 77this.fitMapToMarker=function(marker,markersClusterer,zoom){var cluster=this._findClusterByMarker(markersClusterer,marker),bounds,map;if(!cluster){return} 78map=markersClusterer.getMap();bounds=cluster.getBounds();this.fitMapBounds({map:map,bounds:bounds,marker:marker,markersClusterer:markersClusterer,},()=>{this.panTo({map:map,position:this.getMarkerPosition(marker),zoom:zoom})})};this.panTo=function(data){data.map.panTo(data.position);if(data.zoom&&data.zoom>data.map.getZoom()){data.map.setZoom(data.zoom)}} 79this._findClusterByMarker=function(markersClusterer,marker){var clusters=markersClusterer.getClusters(),result;if(!clusters.length){return} 80for(var i=0;i<clusters.length;i++){var markers=clusters[i].getMarkers();for(var j=0;j<markers.length;j++){if(markers[j]===marker&&markers.length>1){result=clusters[i];break}}} 81return result}}
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.