function InfoBubble(a){this.extend(InfoBubble,google.maps.OverlayView),this.tabs_=[],this.activeTab_=null,this.baseZIndex_=100,this.isOpen_=!1;var b=a||{};void 0==b.backgroundColor&&(b.backgroundColor=this.BACKGROUND_COLOR_),void 0==b.borderColor&&(b.borderColor=this.BORDER_COLOR_),void 0==b.borderRadius&&(b.borderRadius=this.BORDER_RADIUS_),void 0==b.borderWidth&&(b.borderWidth=this.BORDER_WIDTH_),void 0==b.padding&&(b.padding=this.PADDING_),void 0==b.arrowPosition&&(b.arrowPosition=this.ARROW_POSITION_),void 0==b.disableAutoPan&&(b.disableAutoPan=!1),void 0==b.disableAnimation&&(b.disableAnimation=!1),void 0==b.minWidth&&(b.minWidth=this.MIN_WIDTH_),void 0==b.shadowStyle&&(b.shadowStyle=this.SHADOW_STYLE_),void 0==b.arrowSize&&(b.arrowSize=this.ARROW_SIZE_),void 0==b.arrowStyle&&(b.arrowStyle=this.ARROW_STYLE_),this.buildDom_(),this.setValues(b)}function RichMarker(a){var b=a||{};this.ready_=!1,this.dragging_=!1,void 0==a.visible&&(a.visible=!0),void 0==a.shadow&&(a.shadow="7px -3px 5px rgba(88,88,88,0.7)"),void 0==a.anchor&&(a.anchor=RichMarkerPosition.BOTTOM),this.setValues(b)}function MarkerClusterer(a,b,c){this.extend(MarkerClusterer,google.maps.OverlayView),this.map_=a,this.markers_=[],this.clusters_=[],this.markersCluster_={},this.markersUniqueID=1,this.sizes=[53,56,66,78,90],this.styles_=[],this.cssClass_="",this.cssDefaultClass_="cluster",this.setIndex_=0,this.ready_=!1;var d=c||{};this.gridSize_=void 0!==d.gridSize?d.gridSize:60,this.minClusterSize_=d.minimumClusterSize||2,this.ignoreHiddenMarkers_=d.ignoreHiddenMarkers||!1,this.maxZoom_=d.maxZoom||null,this.styles_=d.styles||[],this.cssClass_=d.cssClass||null,this.imagePath_=d.imagePath||this.MARKER_CLUSTER_IMAGE_PATH_,this.imageExtension_=d.imageExtension||this.MARKER_CLUSTER_IMAGE_EXTENSION_,this.zoomOnClick_=!0,void 0!=d.zoomOnClick&&(this.zoomOnClick_=d.zoomOnClick),this.averageCenter_=!1,void 0!=d.averageCenter&&(this.averageCenter_=d.averageCenter),this.onMouseoverCluster_=d.onMouseoverCluster,this.onMouseoutCluster_=d.onMouseoutCluster,this.setupStyles_(),this.setMap(a),this.prevZoom_=this.map_.getZoom();var e=this;google.maps.event.addListener(this.map_,"zoom_changed",function(){var a=e.map_.getZoom();e.prevZoom_!=a&&(e.prevZoom_=a,e.resetViewport())}),google.maps.event.addListener(this.map_,"idle",function(){e.redraw()}),b&&b.length&&this.addMarkers(b,!1)}function Cluster(a){this.markerClusterer_=a,this.map_=a.getMap(),this.gridSize_=a.getGridSize(),this.minClusterSize_=a.getMinClusterSize(),this.averageCenter_=a.isAverageCenter(),this.center_=null,this.markers_=[],this.bounds_=null,this.clusterIcon_=new ClusterIcon(this,a.getStyles(),a.getGridSize())}function ClusterIcon(a,b,c){a.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView),this.styles_=b,this.padding_=c||0,this.cluster_=a,this.center_=null,this.map_=a.getMap(),this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(this.map_)}window.InfoBubble=InfoBubble,InfoBubble.prototype.ARROW_SIZE_=15,InfoBubble.prototype.ARROW_STYLE_=0,InfoBubble.prototype.SHADOW_STYLE_=1,InfoBubble.prototype.MIN_WIDTH_=50,InfoBubble.prototype.ARROW_POSITION_=50,InfoBubble.prototype.PADDING_=10,InfoBubble.prototype.BORDER_WIDTH_=1,InfoBubble.prototype.BORDER_COLOR_="#ccc",InfoBubble.prototype.BORDER_RADIUS_=10,InfoBubble.prototype.BACKGROUND_COLOR_="#fff",InfoBubble.prototype.extend=function(a,b){return function(a){for(var b in a.prototype)this.prototype[b]=a.prototype[b];return this}.apply(a,[b])},InfoBubble.prototype.buildDom_=function(){var a=this.bubble_=document.createElement("DIV");a.style.position="absolute",a.style.zIndex=this.baseZIndex_,(this.tabsContainer_=document.createElement("DIV")).style.position="relative";var b=this.close_=document.createElement("IMG");b.style.position="absolute",b.style.width=this.px(12),b.style.height=this.px(12),b.style.border=0,b.style.zIndex=this.baseZIndex_+1,b.style.cursor="pointer",b.src="https://maps.gstatic.com/intl/en_us/mapfiles/iw_close.gif";var c=this;google.maps.event.addDomListener(b,"click",function(){c.close(),google.maps.event.trigger(c,"closeclick")});var d=this.contentContainer_=document.createElement("DIV");d.style.overflowX="auto",d.style.overflowY="auto",d.style.cursor="default",d.style.clear="both",d.style.position="relative";var e=this.content_=document.createElement("DIV");d.appendChild(e);var f=this.arrow_=document.createElement("DIV");f.style.position="relative";var g=this.arrowOuter_=document.createElement("DIV"),h=this.arrowInner_=document.createElement("DIV"),i=this.getArrowSize_();g.style.position=h.style.position="absolute",g.style.left=h.style.left="50%",g.style.height=h.style.height="0",g.style.width=h.style.width="0",g.style.marginLeft=this.px(-i),g.style.borderWidth=this.px(i),g.style.borderBottomWidth=0;var j=this.bubbleShadow_=document.createElement("DIV");j.style.position="absolute",a.style.display=j.style.display="none",a.appendChild(this.tabsContainer_),a.appendChild(b),a.appendChild(d),f.appendChild(g),f.appendChild(h),a.appendChild(f);var k=document.createElement("style");k.setAttribute("type","text/css"),this.animationName_="_ibani_"+Math.round(1e4*Math.random());var l="."+this.animationName_+"{-webkit-animation-name:"+this.animationName_+";-webkit-animation-duration:0.5s;-webkit-animation-iteration-count:1;}@-webkit-keyframes "+this.animationName_+" {from {-webkit-transform: scale(0)}50% {-webkit-transform: scale(1.2)}90% {-webkit-transform: scale(0.95)}to {-webkit-transform: scale(1)}}";k.textContent=l,document.getElementsByTagName("head")[0].appendChild(k)},InfoBubble.prototype.setBackgroundClassName=function(a){this.set("backgroundClassName",a)},InfoBubble.prototype.setBackgroundClassName=InfoBubble.prototype.setBackgroundClassName,InfoBubble.prototype.backgroundClassName_changed=function(){this.content_.className=this.get("backgroundClassName")},InfoBubble.prototype.backgroundClassName_changed=InfoBubble.prototype.backgroundClassName_changed,InfoBubble.prototype.setTabClassName=function(a){this.set("tabClassName",a)},InfoBubble.prototype.setTabClassName=InfoBubble.prototype.setTabClassName,InfoBubble.prototype.tabClassName_changed=function(){this.updateTabStyles_()},InfoBubble.prototype.tabClassName_changed=InfoBubble.prototype.tabClassName_changed,InfoBubble.prototype.getArrowStyle_=function(){return parseInt(this.get("arrowStyle"),10)||0},InfoBubble.prototype.setArrowStyle=function(a){this.set("arrowStyle",a)},InfoBubble.prototype.setArrowStyle=InfoBubble.prototype.setArrowStyle,InfoBubble.prototype.arrowStyle_changed=function(){this.arrowSize_changed()},InfoBubble.prototype.arrowStyle_changed=InfoBubble.prototype.arrowStyle_changed,InfoBubble.prototype.getArrowSize_=function(){return parseInt(this.get("arrowSize"),10)||0},InfoBubble.prototype.setArrowSize=function(a){this.set("arrowSize",a)},InfoBubble.prototype.setArrowSize=InfoBubble.prototype.setArrowSize,InfoBubble.prototype.arrowSize_changed=function(){this.borderWidth_changed()},InfoBubble.prototype.arrowSize_changed=InfoBubble.prototype.arrowSize_changed,InfoBubble.prototype.setArrowPosition=function(a){this.set("arrowPosition",a)},InfoBubble.prototype.setArrowPosition=InfoBubble.prototype.setArrowPosition,InfoBubble.prototype.getArrowPosition_=function(){return parseInt(this.get("arrowPosition"),10)||0},InfoBubble.prototype.arrowPosition_changed=function(){var a=this.getArrowPosition_();this.arrowOuter_.style.left=this.arrowInner_.style.left=a+"%",this.redraw_()},InfoBubble.prototype.arrowPosition_changed=InfoBubble.prototype.arrowPosition_changed,InfoBubble.prototype.setZIndex=function(a){this.set("zIndex",a)},InfoBubble.prototype.setZIndex=InfoBubble.prototype.setZIndex,InfoBubble.prototype.getZIndex=function(){return parseInt(this.get("zIndex"),10)||this.baseZIndex_},InfoBubble.prototype.zIndex_changed=function(){var a=this.getZIndex();this.bubble_.style.zIndex=this.baseZIndex_=a,this.close_.style.zIndex=a+1},InfoBubble.prototype.zIndex_changed=InfoBubble.prototype.zIndex_changed,InfoBubble.prototype.setShadowStyle=function(a){this.set("shadowStyle",a)},InfoBubble.prototype.setShadowStyle=InfoBubble.prototype.setShadowStyle,InfoBubble.prototype.getShadowStyle_=function(){return parseInt(this.get("shadowStyle"),10)||0},InfoBubble.prototype.shadowStyle_changed=function(){var a=this.getShadowStyle_(),b="",c="",d="";switch(a){case 0:b="none";break;case 1:c="40px 15px 10px rgba(33,33,33,0.3)",d="transparent";break;case 2:c="0 0 2px rgba(33,33,33,0.3)",d="rgba(33,33,33,0.35)"}this.bubbleShadow_.style.boxShadow=this.bubbleShadow_.style.webkitBoxShadow=this.bubbleShadow_.style.MozBoxShadow=c,this.bubbleShadow_.style.backgroundColor=d,this.isOpen_&&(this.bubbleShadow_.style.display=b,this.draw())},InfoBubble.prototype.shadowStyle_changed=InfoBubble.prototype.shadowStyle_changed,InfoBubble.prototype.showCloseButton=function(){this.set("hideCloseButton",!1)},InfoBubble.prototype.showCloseButton=InfoBubble.prototype.showCloseButton,InfoBubble.prototype.hideCloseButton=function(){this.set("hideCloseButton",!0)},InfoBubble.prototype.hideCloseButton=InfoBubble.prototype.hideCloseButton,InfoBubble.prototype.hideCloseButton_changed=function(){this.close_.style.display=this.get("hideCloseButton")?"none":""},InfoBubble.prototype.hideCloseButton_changed=InfoBubble.prototype.hideCloseButton_changed,InfoBubble.prototype.setBackgroundColor=function(a){a&&this.set("backgroundColor",a)},InfoBubble.prototype.setBackgroundColor=InfoBubble.prototype.setBackgroundColor,InfoBubble.prototype.backgroundColor_changed=function(){var a=this.get("backgroundColor");this.contentContainer_.style.backgroundColor=a,this.arrowInner_.style.borderColor=a+" transparent transparent",this.updateTabStyles_()},InfoBubble.prototype.backgroundColor_changed=InfoBubble.prototype.backgroundColor_changed,InfoBubble.prototype.setBorderColor=function(a){a&&this.set("borderColor",a)},InfoBubble.prototype.setBorderColor=InfoBubble.prototype.setBorderColor,InfoBubble.prototype.borderColor_changed=function(){var a=this.get("borderColor"),b=this.contentContainer_,c=this.arrowOuter_;b.style.borderColor=a,c.style.borderColor=a+" transparent transparent",b.style.borderStyle=c.style.borderStyle=this.arrowInner_.style.borderStyle="solid",this.updateTabStyles_()},InfoBubble.prototype.borderColor_changed=InfoBubble.prototype.borderColor_changed,InfoBubble.prototype.setBorderRadius=function(a){this.set("borderRadius",a)},InfoBubble.prototype.setBorderRadius=InfoBubble.prototype.setBorderRadius,InfoBubble.prototype.getBorderRadius_=function(){return parseInt(this.get("borderRadius"),10)||0},InfoBubble.prototype.borderRadius_changed=function(){var a=this.getBorderRadius_(),b=this.getBorderWidth_();this.contentContainer_.style.borderRadius=this.contentContainer_.style.MozBorderRadius=this.contentContainer_.style.webkitBorderRadius=this.bubbleShadow_.style.borderRadius=this.bubbleShadow_.style.MozBorderRadius=this.bubbleShadow_.style.webkitBorderRadius=this.px(a),this.tabsContainer_.style.paddingLeft=this.tabsContainer_.style.paddingRight=this.px(a+b),this.redraw_()},InfoBubble.prototype.borderRadius_changed=InfoBubble.prototype.borderRadius_changed,InfoBubble.prototype.getBorderWidth_=function(){return parseInt(this.get("borderWidth"),10)||0},InfoBubble.prototype.setBorderWidth=function(a){this.set("borderWidth",a)},InfoBubble.prototype.setBorderWidth=InfoBubble.prototype.setBorderWidth,InfoBubble.prototype.borderWidth_changed=function(){var a=this.getBorderWidth_();this.contentContainer_.style.borderWidth=this.px(a),this.tabsContainer_.style.top=this.px(a),this.updateArrowStyle_(),this.updateTabStyles_(),this.borderRadius_changed(),this.redraw_()},InfoBubble.prototype.borderWidth_changed=InfoBubble.prototype.borderWidth_changed,InfoBubble.prototype.updateArrowStyle_=function(){var a=this.getBorderWidth_(),b=this.getArrowSize_(),c=this.getArrowStyle_(),d=this.px(b),e=this.px(Math.max(0,b-a)),f=this.arrowOuter_,g=this.arrowInner_;this.arrow_.style.marginTop=this.px(-a),f.style.borderTopWidth=d,g.style.borderTopWidth=e,0==c||1==c?(f.style.borderLeftWidth=d,g.style.borderLeftWidth=e):f.style.borderLeftWidth=g.style.borderLeftWidth=0,0==c||2==c?(f.style.borderRightWidth=d,g.style.borderRightWidth=e):f.style.borderRightWidth=g.style.borderRightWidth=0,c<2?(f.style.marginLeft=this.px(-b),g.style.marginLeft=this.px(-(b-a))):f.style.marginLeft=g.style.marginLeft=0,f.style.display=0==a?"none":""},InfoBubble.prototype.setPadding=function(a){this.set("padding",a)},InfoBubble.prototype.setPadding=InfoBubble.prototype.setPadding,InfoBubble.prototype.getPadding_=function(){return parseInt(this.get("padding"),10)||0},InfoBubble.prototype.padding_changed=function(){var a=this.getPadding_();this.contentContainer_.style.padding=this.px(a),this.updateTabStyles_(),this.redraw_()},InfoBubble.prototype.padding_changed=InfoBubble.prototype.padding_changed,InfoBubble.prototype.px=function(a){return a?a+"px":a},InfoBubble.prototype.addEvents_=function(){var a=["mousedown","mousemove","mouseover","mouseout","mouseup","mousewheel","DOMMouseScroll","touchstart","touchend","touchmove","dblclick","contextmenu","click"],b=this.bubble_;this.listeners_=[];for(var c,d=0;c=a[d];d++)this.listeners_.push(google.maps.event.addDomListener(b,c,function(a){a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation()}))},InfoBubble.prototype.onAdd=function(){this.bubble_||this.buildDom_(),this.addEvents_();var a=this.getPanes();a&&(a.floatPane.appendChild(this.bubble_),a.floatShadow.appendChild(this.bubbleShadow_))},InfoBubble.prototype.onAdd=InfoBubble.prototype.onAdd,InfoBubble.prototype.draw=function(){var a=this.getProjection();if(a){var b=this.get("position");if(!b)return void this.close();var c=0;this.activeTab_&&(c=this.activeTab_.offsetHeight);var d=this.getAnchorHeight_(),e=this.getArrowSize_(),f=this.getArrowPosition_();f/=100;var g=a.fromLatLngToDivPixel(b),h=this.contentContainer_.offsetWidth,i=this.bubble_.offsetHeight;if(h){var j=g.y-(i+e);d&&(j-=d);var k=g.x-h*f;this.bubble_.style.top=this.px(j),this.bubble_.style.left=this.px(k);switch(parseInt(this.get("shadowStyle"),10)){case 1:this.bubbleShadow_.style.top=this.px(j+c-1),this.bubbleShadow_.style.left=this.px(k),this.bubbleShadow_.style.width=this.px(h),this.bubbleShadow_.style.height=this.px(this.contentContainer_.offsetHeight-e);break;case 2:h*=.8,this.bubbleShadow_.style.top=d?this.px(g.y):this.px(g.y+e),this.bubbleShadow_.style.left=this.px(g.x-h*f),this.bubbleShadow_.style.width=this.px(h),this.bubbleShadow_.style.height=this.px(2)}}}},InfoBubble.prototype.draw=InfoBubble.prototype.draw,InfoBubble.prototype.onRemove=function(){this.bubble_&&this.bubble_.parentNode&&this.bubble_.parentNode.removeChild(this.bubble_),this.bubbleShadow_&&this.bubbleShadow_.parentNode&&this.bubbleShadow_.parentNode.removeChild(this.bubbleShadow_);for(var a,b=0;a=this.listeners_[b];b++)google.maps.event.removeListener(a)},InfoBubble.prototype.onRemove=InfoBubble.prototype.onRemove,InfoBubble.prototype.isOpen=function(){return this.isOpen_},InfoBubble.prototype.isOpen=InfoBubble.prototype.isOpen,InfoBubble.prototype.close=function(){this.bubble_&&(this.bubble_.style.display="none",this.bubble_.className=this.bubble_.className.replace(this.animationName_,"")),this.bubbleShadow_&&(this.bubbleShadow_.style.display="none",this.bubbleShadow_.className=this.bubbleShadow_.className.replace(this.animationName_,"")),this.isOpen_=!1},InfoBubble.prototype.close=InfoBubble.prototype.close,InfoBubble.prototype.open=function(a,b){var c=this;window.setTimeout(function(){c.open_(a,b)},0)},InfoBubble.prototype.open_=function(a,b){if(this.updateContent_(),a&&this.setMap(a),b&&(this.set("anchor",b),this.bindTo("anchorPoint",b),this.bindTo("position",b)),this.bubble_.style.display=this.bubbleShadow_.style.display="",!this.get("disableAnimation")&&(this.bubble_.className+=" "+this.animationName_,this.bubbleShadow_.className+=" "+this.animationName_),this.redraw_(),this.isOpen_=!0,!this.get("disableAutoPan")){var c=this;window.setTimeout(function(){c.panToView()},200)}},InfoBubble.prototype.open=InfoBubble.prototype.open,InfoBubble.prototype.setPosition=function(a){a&&this.set("position",a)},InfoBubble.prototype.setPosition=InfoBubble.prototype.setPosition,InfoBubble.prototype.getPosition=function(){return this.get("position")},InfoBubble.prototype.getPosition=InfoBubble.prototype.getPosition,InfoBubble.prototype.position_changed=function(){this.draw()},InfoBubble.prototype.position_changed=InfoBubble.prototype.position_changed,InfoBubble.prototype.panToView=function(){var a=this.getProjection();if(a&&this.bubble_){var b=this.getAnchorHeight_(),c=this.bubble_.offsetHeight+b,d=this.get("map"),e=d.getDiv(),f=e.offsetHeight,g=this.getPosition(),h=a.fromLatLngToContainerPixel(d.getCenter()),i=a.fromLatLngToContainerPixel(g),j=h.y-c,k=f-h.y,l=j<0,m=0;l&&(j*=-1,m=(j+k)/2),i.y-=m,g=a.fromContainerPixelToLatLng(i),d.getCenter()!=g&&d.panTo(g)}},InfoBubble.prototype.panToView=InfoBubble.prototype.panToView,InfoBubble.prototype.htmlToDocumentFragment_=function(a){a=a.replace(/^\s*([\S\s]*)\b\s*$/,"$1");var b=document.createElement("DIV");if(b.innerHTML=a,1==b.childNodes.length)return b.removeChild(b.firstChild);for(var c=document.createDocumentFragment();b.firstChild;)c.appendChild(b.firstChild);return c},InfoBubble.prototype.removeChildren_=function(a){if(a)for(var b;b=a.firstChild;)a.removeChild(b)},InfoBubble.prototype.setContent=function(a){this.set("content",a)},InfoBubble.prototype.setContent=InfoBubble.prototype.setContent,InfoBubble.prototype.getContent=function(){return this.get("content")},InfoBubble.prototype.getContent=InfoBubble.prototype.getContent,InfoBubble.prototype.updateContent_=function(){if(this.content_){this.removeChildren_(this.content_);var a=this.getContent();if(a){"string"==typeof a&&(a=this.htmlToDocumentFragment_(a)),this.content_.appendChild(a);for(var b,c=this,d=this.content_.getElementsByTagName("IMG"),e=0;b=d[e];e++)google.maps.event.addDomListener(b,"load",function(){c.imageLoaded_()});google.maps.event.trigger(this,"domready")}this.redraw_()}},InfoBubble.prototype.imageLoaded_=function(){var a=!this.get("disableAutoPan");this.redraw_(),!a||0!=this.tabs_.length&&0!=this.activeTab_.index||this.panToView()},InfoBubble.prototype.updateTabStyles_=function(){if(this.tabs_&&this.tabs_.length){for(var a,b=0;a=this.tabs_[b];b++)this.setTabStyle_(a.tab);this.activeTab_.style.zIndex=this.baseZIndex_;var c=this.getBorderWidth_(),d=this.getPadding_()/2;this.activeTab_.style.borderBottomWidth=0,this.activeTab_.style.paddingBottom=this.px(d+c)}},InfoBubble.prototype.setTabStyle_=function(a){var b=this.get("backgroundColor"),c=this.get("borderColor"),d=this.getBorderRadius_(),e=this.getBorderWidth_(),f=this.getPadding_(),g=this.px(-Math.max(f,d)),h=this.px(d),i=this.baseZIndex_;a.index&&(i-=a.index);var j={cssFloat:"left",position:"relative",cursor:"pointer",backgroundColor:b,border:this.px(e)+" solid "+c,padding:this.px(f/2)+" "+this.px(f),marginRight:g,whiteSpace:"nowrap",borderRadiusTopLeft:h,MozBorderRadiusTopleft:h,webkitBorderTopLeftRadius:h,borderRadiusTopRight:h,MozBorderRadiusTopright:h,webkitBorderTopRightRadius:h,zIndex:i,display:"inline"};for(var k in j)a.style[k]=j[k];var l=this.get("tabClassName");void 0!=l&&(a.className+=" "+l)},InfoBubble.prototype.addTabActions_=function(a){var b=this;a.listener_=google.maps.event.addDomListener(a,"click",function(){b.setTabActive_(this)})},InfoBubble.prototype.setTabActive=function(a){var b=this.tabs_[a-1];b&&this.setTabActive_(b.tab)},InfoBubble.prototype.setTabActive=InfoBubble.prototype.setTabActive,InfoBubble.prototype.setTabActive_=function(a){if(!a)return this.setContent(""),void this.updateContent_();var b=this.getPadding_()/2,c=this.getBorderWidth_();if(this.activeTab_){var d=this.activeTab_;d.style.zIndex=this.baseZIndex_-d.index,d.style.paddingBottom=this.px(b),d.style.borderBottomWidth=this.px(c)}a.style.zIndex=this.baseZIndex_,a.style.borderBottomWidth=0,a.style.marginBottomWidth="-10px",a.style.paddingBottom=this.px(b+c),this.setContent(this.tabs_[a.index].content),this.updateContent_(),this.activeTab_=a,this.redraw_()},InfoBubble.prototype.setMaxWidth=function(a){this.set("maxWidth",a)},InfoBubble.prototype.setMaxWidth=InfoBubble.prototype.setMaxWidth,InfoBubble.prototype.maxWidth_changed=function(){this.redraw_()},InfoBubble.prototype.maxWidth_changed=InfoBubble.prototype.maxWidth_changed,InfoBubble.prototype.setMaxHeight=function(a){this.set("maxHeight",a)},InfoBubble.prototype.setMaxHeight=InfoBubble.prototype.setMaxHeight,InfoBubble.prototype.maxHeight_changed=function(){this.redraw_()},InfoBubble.prototype.maxHeight_changed=InfoBubble.prototype.maxHeight_changed,InfoBubble.prototype.setMinWidth=function(a){this.set("minWidth",a)},InfoBubble.prototype.setMinWidth=InfoBubble.prototype.setMinWidth,InfoBubble.prototype.minWidth_changed=function(){this.redraw_()},InfoBubble.prototype.minWidth_changed=InfoBubble.prototype.minWidth_changed,InfoBubble.prototype.setMinHeight=function(a){this.set("minHeight",a)},InfoBubble.prototype.setMinHeight=InfoBubble.prototype.setMinHeight,InfoBubble.prototype.minHeight_changed=function(){this.redraw_()},InfoBubble.prototype.minHeight_changed=InfoBubble.prototype.minHeight_changed,InfoBubble.prototype.addTab=function(a,b){var c=document.createElement("DIV");c.innerHTML=a,this.setTabStyle_(c),this.addTabActions_(c),this.tabsContainer_.appendChild(c),this.tabs_.push({label:a,content:b,tab:c}),c.index=this.tabs_.length-1,c.style.zIndex=this.baseZIndex_-c.index,this.activeTab_||this.setTabActive_(c),c.className=c.className+" "+this.animationName_,this.redraw_()},InfoBubble.prototype.addTab=InfoBubble.prototype.addTab,InfoBubble.prototype.updateTab=function(a,b,c){if(!(!this.tabs_.length||a<0||a>=this.tabs_.length)){var d=this.tabs_[a];void 0!=b&&(d.tab.innerHTML=d.label=b),void 0!=c&&(d.content=c),this.activeTab_==d.tab&&(this.setContent(d.content),this.updateContent_()),this.redraw_()}},InfoBubble.prototype.updateTab=InfoBubble.prototype.updateTab,InfoBubble.prototype.removeTab=function(a){if(!(!this.tabs_.length||a<0||a>=this.tabs_.length)){var b=this.tabs_[a];b.tab.parentNode.removeChild(b.tab),google.maps.event.removeListener(b.tab.listener_),this.tabs_.splice(a,1),delete b;for(var c,d=0;c=this.tabs_[d];d++)c.tab.index=d;b.tab==this.activeTab_&&(this.tabs_[a]?this.activeTab_=this.tabs_[a].tab:this.tabs_[a-1]?this.activeTab_=this.tabs_[a-1].tab:this.activeTab_=void 0,this.setTabActive_(this.activeTab_)),this.redraw_()}},InfoBubble.prototype.removeTab=InfoBubble.prototype.removeTab,InfoBubble.prototype.getElementSize_=function(a,b,c){var d=document.createElement("DIV");d.style.display="inline",d.style.position="absolute",d.style.visibility="hidden","string"==typeof a?d.innerHTML=a:d.appendChild(a.cloneNode(!0)),document.body.appendChild(d);var e=new google.maps.Size(d.offsetWidth,d.offsetHeight);return b&&e.width>b&&(d.style.width=this.px(b),e=new google.maps.Size(d.offsetWidth,d.offsetHeight)),c&&e.height>c&&(d.style.height=this.px(c),e=new google.maps.Size(d.offsetWidth,d.offsetHeight)),document.body.removeChild(d),delete d,e},InfoBubble.prototype.redraw_=function(){this.figureOutSize_(),this.positionCloseButton_(),this.draw()},InfoBubble.prototype.figureOutSize_=function(){var a=this.get("map");if(a){var b=this.getPadding_(),c=(this.getBorderWidth_(),this.getBorderRadius_(),this.getArrowSize_()),d=a.getDiv(),e=2*c,f=d.offsetWidth-e,g=d.offsetHeight-e-this.getAnchorHeight_(),h=0,i=this.get("minWidth")||0,j=this.get("minHeight")||0,k=this.get("maxWidth")||0,l=this.get("maxHeight")||0;k=Math.min(f,k),l=Math.min(g,l);var m=0;if(this.tabs_.length)for(var n,o=0;n=this.tabs_[o];o++){var p=this.getElementSize_(n.tab,k,l),q=this.getElementSize_(n.content,k,l);i