leaflet-rotate 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var leafletRotate=(()=>{var y=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var k=(t,e)=>{for(var i in e)y(t,i,{get:e[i],enumerable:!0})},C=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of O(e))!E.call(t,n)&&n!==i&&y(t,n,{get:()=>e[n],enumerable:!(o=z(e,n))||o.enumerable});return t};var Z=t=>C(y({},"__esModule",{value:!0}),t);var R={};k(R,{toPoint:()=>d});var v=Object.assign({},L.DomUtil);Object.assign(L.DomUtil,{setTransform(t,e,i,o,n){let s=e||new L.Point(0,0);if(!o)return v.setTransform(t,s._round(),i);s=s.rotateFrom(o,n),t.style.transform="translate3d("+s.x+"px,"+s.y+"px,0)"+(i?" scale("+i+")":"")+" rotate("+o+"rad)"},setPosition(t,e,i,o,n){if(!i)return v.setPosition(t,e);t._leaflet_pos=e,L.DomUtil.setTransform(t,e,n,i,o)},getPosition(t){return t._leaflet_pos||v.getPosition(t)}});L.Draggable.include({});Object.assign(L.Point.prototype,{rotate(t){return this.rotateFrom(t,new L.Point(0,0))},rotateFrom(t,e){if(!t)return this;let i=Math.sin(t),o=Math.cos(t),n=e.x,s=e.y,r=this.x-n,_=this.y-s;return new L.Point(r*o-_*i+n,r*i+_*o+s)}});function d(t){return t==null||t instanceof L.Point?t:Array.isArray(t)?new L.Point(t[0],t[1]):new L.Point(t.x,t.y)}var M=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.DivOverlay.prototype));L.DivOverlay.include({getEvents(){let t=Object.assign(M.getEvents.apply(this,arguments),{rotate:this._updatePosition,pitch:this._updatePitchEvents});return this._map&&this._map._pitch&&(t.move=this._updatePosition),t},_updatePitchEvents(){this._map._pitch?this._map.on("move",this._updatePosition,this):this._map.off("move",this._updatePosition,this)},_updatePosition(){if(this._map){if(M._updatePosition.apply(this,arguments),this._map._rotate&&this._zoomAnimated){let t=this._getAnchor(),e=L.DomUtil.getPosition(this._container).subtract(t);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(e).add(t))}else if(this._map._rotate){let t=this._map.rotatedPointToMapPanePoint(this._map.latLngToLayerPoint(this._latlng)),e=d(this.options.offset||[0,0]),i=this._getAnchor();this._containerLeft=-Math.round(this._containerWidth/2)+t.x+e.x+i.x,this._containerBottom=-(t.y+e.y+i.y),this._container.style.left=this._containerLeft+"px",this._container.style.bottom=this._containerBottom+"px",this._container.style.top="",L.DomUtil.setPosition(this._container,new L.Point(0,0)),this._container.style.transform=""}}}});var A=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Popup.prototype));L.Popup.include({_animateZoom(t){if(A._animateZoom.apply(this,arguments),this._map&&this._map._rotate){let e=this._getAnchor(),i=L.DomUtil.getPosition(this._container).subtract(e);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(i).add(e))}},_adjustPan(){if(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)return;if(this._autopanning){this._autopanning=!1;return}let t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,i=this._container.offsetHeight+e,o=this._containerWidth,n=new L.Point(this._containerLeft,-i-this._containerBottom);n._add(L.DomUtil.getPosition(this._container));let s=n._add(this._map._getMapPanePos()),r=d(this.options.autoPanPadding||[0,0]),_=d(this.options.autoPanPaddingTopLeft||r),a=d(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,p=0;s.x+o+a.x>h.x&&(c=s.x+o-h.x+a.x),s.x-c-_.x<0&&(c=s.x-_.x),s.y+i+a.y>h.y&&(p=s.y+i-h.y+a.y),s.y-p-_.y<0&&(p=s.y-_.y),(c||p)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,p]))}});var B=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Tooltip.prototype));L.Tooltip.include({_animateZoom(t){if(!this._map._rotate)return B._animateZoom.apply(this,arguments);let e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)},_updatePosition(){if(!this._map._rotate)return B._updatePosition.apply(this,arguments);let t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)}});var Y=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Icon.prototype));L.Icon.include({_setIconStyles(t,e){let i=this.options,o=i[e+"Size"];typeof o=="number"&&(o=[o,o]);let n=o?new L.Point(...Array.isArray(o)?o:[o.x,o.y]):null,s=e==="shadow"&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0),r=s?new L.Point(...Array.isArray(s)?s:[s.x,s.y]):null;t.className="leaflet-marker-"+e+" "+(i.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px",t.style.transformOrigin=r.x+"px "+r.y+"px 0px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")}});var w=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Marker.prototype));L.Marker.mergeOptions({rotation:0,rotateWithView:!1,keepUpright:!1,scale:void 0});var x,T={_onDrag(t){let e=this._marker,i=e.options.rotation||e.options.rotateWithView,o=e._shadow,n=L.DomUtil.getPosition(e._icon);!i&&o&&L.DomUtil.setPosition(o,n),e._map._rotate&&(n=e._map.mapPanePointToRotatedPoint(n));let s=e._map.layerPointToLatLng(n);e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i?e.setLatLng(s):e.fire("move",t),e.fire("drag",t)},_onDragEnd(t){this._marker._map._rotate&&this._marker.update(),x._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents(){let t=Object.assign(w.getEvents.apply(this,arguments),{rotate:this.update,pitch:this._updatePitchEvents});return this._map&&this._map._pitch&&(t.move=this.update),t},_updatePitchEvents(){this._map._pitch?this._map.on("move",this.update,this):this._map.off("move",this.update,this)},_initInteraction(){let t=w._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(x=x||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:T._onDrag.bind(this.dragging),_onDragEnd:T._onDragEnd.bind(this.dragging)}),this.dragging.enable()),t},_setPos(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));let e=this.options.rotation||0;this.options.rotateWithView&&(e+=this._map._bearing),this.options.keepUpright&&(e=(e%(2*Math.PI)+2*Math.PI)%(2*Math.PI),e>Math.PI/2&&e<3*Math.PI/2&&(e+=Math.PI),e%=2*Math.PI),this._icon&&L.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},setRotation(t){this.options.rotation=t,this.update()}});var D=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.GridLayer.prototype));L.GridLayer.include({getEvents(){let t=D.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotateEvent),t},_onRotateEvent(){let t=this._map;if(!t)return;let e=t.getPixelOrigin();this._rotateOrigin&&!this._rotateOrigin.equals(e)&&!t._animatingZoom&&this._levels&&this._setZoomTransforms(t.getCenter(),t.getZoom()),this._rotateOrigin=e,this._onRotate()},_getTiledPixelBounds(t){return this._map._rotate?this._map._getNewPixelBounds(t,this._tileZoom):D._getTiledPixelBounds.apply(this,arguments)}});var g=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Renderer.prototype)),P=Object.getPrototypeOf(L.Renderer.prototype),S=g.getEvents||P.getEvents,I=g._onMoveEnd||P._onMoveEnd;L.Renderer.include({getEvents(){let t=S.apply(this,arguments);return Object.assign(t,{rotate:this._onRotate})},_onRotate(){if(!this._map._rotate)return;let t=this._map.getPixelOrigin();if(!this._rotateOrigin||!this._rotateOrigin.equals(t)){this._rotateOrigin=t,clearTimeout(this._rotateTimer),this._onZoomEnd(),this._updateAfterRotate();return}if(this._bounds&&this._bounds.contains(this._map._getPaddedPixelBounds(0)))return;clearTimeout(this._rotateTimer);let e=(this._lastRotateUpdate||0)+100-performance.now();e>0?this._rotateTimer=setTimeout(()=>this._map&&this._updateAfterRotate(),e):this._updateAfterRotate()},_updateAfterRotate(){this._lastRotateUpdate=performance.now(),L.version.startsWith("2.")?this._onMoveEnd():this._update()},onAdd(){g.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform(t,e){let i=L.version.startsWith("2.");if(!this._map._rotate)return(i?P:g)._updateTransform.apply(this,arguments);if(!i&&e===this._zoom)return;let o=this._map.getZoomScale(e,this._zoom),n=this._topLeftPoint.multiplyBy(o).subtract(this._map._getNewPixelOrigin(t,e));L.DomUtil.setTransform(this._container,n,o)},_onMoveEnd(t){if(!L.version.startsWith("2.")||!this._map._rotate)return I.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._topLeftPoint=this._map._getNewPixelOrigin(this._center,this._zoom).add(this._bounds.min),this._updateTransform(this._center,this._zoom),this._resizeContainer(),this._onSettled(t)},_resizeContainer(){if(!L.version.startsWith("2.")||!this._map._rotate||!this._bounds)return P._resizeContainer.apply(this,arguments);let t=this._bounds.getSize();return this._container.style.width=t.x+"px",this._container.style.height=t.y+"px",t},_update(){if(!this._map._rotate)return g._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._topLeftPoint=this._map._getNewPixelOrigin(this._center,this._zoom).add(this._bounds.min)}});var m=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Map.prototype));L.Map.mergeOptions({rotate:!1,bearing:0,pitch:0,pitchMaxDistance:3});L.Map.include({_animateZoomNoDelay(t,e){this._mapPane&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._move(t,e,void 0,!0),this._onZoomTransitionEnd())},initialize(t,e){e.rotate&&(this._rotate=!0,this._bearing=0,this._pitch=0),m.initialize.apply(this,arguments),this.options.rotate&&(this.on("resize",this._updatePitchTransform,this),this.on("movestart dragstart",this._startPitchPan,this),this.on("move",this._updatePitchPan,this),this.on("moveend",this._endPitchPan,this),this.on("move",this._updatePitchSky,this),this.setBearing(this.options.bearing),this.setPitch(this.options.pitch))},containerPointToLayerPoint(t){return this._rotate?this._pitch?this._transformPitchPoint(d(t).subtract(this._getMapPanePos()),this._pitchInverseTransform):d(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):m.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint(t){return this._rotate?this._pitch?this._transformPitchPoint(t,this._pitchTransform).add(this._getMapPanePos()):d(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):m.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint(t){return this._pitch?this._transformPitchPoint(t,this._pitchTransform):d(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint(t){return this._pitch?this._transformPitchPoint(t,this._pitchInverseTransform):d(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds(t){if(!this._rotate&&m.mapBoundsToContainerBounds)return m.mapBoundsToContainerBounds.apply(this,arguments);let e=this.getPixelOrigin(),i=this.layerPointToContainerPoint(this.project(t.getNorthWest())._subtract(e)),o=this.layerPointToContainerPoint(this.project(t.getNorthEast())._subtract(e)),n=this.layerPointToContainerPoint(this.project(t.getSouthWest())._subtract(e)),s=this.layerPointToContainerPoint(this.project(t.getSouthEast())._subtract(e));return new L.Bounds([new L.Point(Math.min(i.x,o.x,s.x,n.x),Math.min(i.y,o.y,s.y,n.y)),new L.Point(Math.max(i.x,o.x,s.x,n.x),Math.max(i.y,o.y,s.y,n.y))])},getBounds(){if(!this._rotate)return m.getBounds.apply(this,arguments);let[t,e]=this._getPitchedContainerBounds(0);return new L.LatLngBounds([this.containerPointToLatLng([t.x,t.y]),this.containerPointToLatLng([e.x,t.y]),this.containerPointToLatLng([e.x,e.y]),this.containerPointToLatLng([t.x,e.y])])},_getPitchedContainerBounds(t){let e=this.getSize(),i=e.multiplyBy(-t),o=e.multiplyBy(1+t);return this._pitch&&(i.y=Math.min(Math.max(i.y,this._getPitchFarY()),o.y)),[i,o]},_getPitchFarY(){let t=this.getSize(),e=this._pitchInverseTransform,i=this._getMapPanePos(),o=t.x/2-i.x,n=t.y/2-i.y,s=this.options.pitchMaxDistance*t.y,r=l=>e.g*o+e.h*l+e.i,_=r(n),a=this._transformPitchPoint([o,n],e),h=l=>r(l)*_>0&&this._transformPitchPoint([o,l],e).distanceTo(a)<=s,c=-t.y-i.y,p=n;if(h(c))return-1/0;for(let l=0;l<20;l++){let u=(c+p)/2;h(u)?p=u:c=u}return p+i.y},setBearing(t,e){if(this._rotate){if(e&&e.animate){this._animatePitchBearing(this.getPitch(),t,e);return}this._stopPitchBearingAnimation(),this._setBearing(t)}},_animatePitchBearing(t,e,i){this._stopPitchBearingAnimation();let o=this._bearingAnimationId,n=this.getBearing(),s=this.getPitch(),r=L.Util.wrapNum(e,[0,360]),_=Math.max(0,Math.min(t,85)),a=(r-n+540)%360-180,h=Math.max(0,i.duration==null?.25:i.duration)*1e3,c=Math.max(i.easeLinearity||.5,.2),p=performance.now(),l=function(){if(!this._mapPane||this._bearingAnimationId!==o)return;let u=h?Math.min((performance.now()-p)/h,1):1,b=1-Math.pow(1-u,1/c);u<1?this._bearingAnimationFrame=requestAnimationFrame(l.bind(this)):delete this._bearingAnimationFrame,this._setPitchAndBearing(u===1?_:s+(_-s)*b,u===1?r:n+a*b)};this._bearingAnimationFrame=requestAnimationFrame(l.bind(this))},_stopPitchBearingAnimation(){this._bearingAnimationId=(this._bearingAnimationId||0)+1,this._bearingAnimationFrame&&(cancelAnimationFrame(this._bearingAnimationFrame),delete this._bearingAnimationFrame)},resetNorth(t){return t=Object.assign({animate:!0,duration:.5},t),t.animate?this._animatePitchBearing(this.getPitch(),0,t):this.setBearing(0),this},resetNorthPitch(t){return t=Object.assign({animate:!0,duration:.5},t),t.animate?this._animatePitchBearing(0,0,t):(this._stopPitchBearingAnimation(),this._setPitchAndBearing(0,0)),this},_setBearing(t,e){!e&&this._loaded&&(e=this.getCenter());let i=L.Util.wrapNum(t,[0,360])*(Math.PI/180),o=this._getPixelCenter(),n=this._getRotatePanePos().rotateFrom(-this._bearing,o),s=n.rotateFrom(i,o);this._pivot=o,this._bearing=i,this._rotatePanePos=s,this._pitch?(this._rotatePane._leaflet_pos=n,this._updatePitchTransform()):L.DomUtil.setPosition(this._rotatePane,n,i,o),e&&(this._pixelOrigin=this.project(e,this._zoom).subtract(this.containerPointToLayerPoint(this.getSize().divideBy(2))),delete this._lastCenter,this.fire("move")),this.fire("rotate")},_transformPitchPoint(t,e){if(t=d(t),!(e instanceof DOMMatrix)){let o=e.g*t.x+e.h*t.y+e.i;return new L.Point((e.a*t.x+e.b*t.y+e.c)/o,(e.d*t.x+e.e*t.y+e.f)/o)}let i=new DOMPoint(t.x,t.y).matrixTransform(e);return new L.Point(i.x/i.w,i.y/i.w)},_updatePitchTransform(){if(!this._pitch||!this._rotatePane)return;let t=this._getPixelCenter(),e=this.getSize(),i=Math.max(1,e.y*1.5),o=this._rotatePane._leaflet_pos||new L.Point(0,0),n=`translate3d(${t.x}px,${t.y}px,0) perspective(${i}px) rotateX(${this.getPitch()}deg) rotateZ(${this.getBearing()}deg) translate3d(${o.x-t.x}px,${o.y-t.y}px,0)`;this._setPitchTransform(n)},_setPitchTransform(t){this._rotatePane.style.transformOrigin="0 0",this._rotatePane.style.transform=t;let e=this._pitchTransform=new DOMMatrix(t),i=e.m11,o=e.m21,n=e.m41,s=e.m12,r=e.m22,_=e.m42,a=e.m14,h=e.m24,c=e.m44,p=i*(r*c-_*h)-o*(s*c-_*a)+n*(s*h-r*a);this._pitchInverseTransform={a:(r*c-_*h)/p,b:(n*h-o*c)/p,c:(o*_-n*r)/p,d:(_*a-s*c)/p,e:(i*c-n*a)/p,f:(n*s-i*_)/p,g:(s*h-r*a)/p,h:(o*a-i*h)/p,i:(i*r-o*s)/p},this._updatePitchSky()},_startPitchPan(t){if(!this._pitch||!this._loaded)return;let e=this.dragging&&this.dragging._draggable,i=t.type==="dragstart"&&e?(this.pointerEventToContainerPoint||this.mouseEventToContainerPoint).call(this,{clientX:e._startPoint.x,clientY:e._startPoint.y}):this.getSize().divideBy(2),o=this._getMapPanePos().clone();this._pitchPan={anchor:i,panePos:o,lastPanePos:o,matrix:this._pitchTransform,inverse:this._pitchInverseTransform,layerAnchor:this.containerPointToLayerPoint(i),zoom:this._zoom}},_updatePitchPan(){let t=this._pitchPan;if(!this._pitch||!t||this._animatingZoom||this._zoom!==t.zoom)return;let e=this._getMapPanePos();if(e.equals(t.lastPanePos))return;let i=e.subtract(t.panePos),o=this._transformPitchPoint(t.anchor.add(i).subtract(t.panePos),t.inverse),n=o.subtract(t.layerAnchor),s=new DOMMatrix().translate(-i.x,-i.y).multiply(t.matrix).translate(n.x,n.y);this._setPitchTransform(s.toString()),t.lastPanePos=e.clone(),delete this._lastCenter},_endPitchPan(){delete this._pitchPan},_updatePitchSky(){let t=this._pitch&&this._pitchInverseTransform?this._getPitchFarY():-1/0;if(t<=0){this._pitchSky&&(this._pitchSky.style.display="none");return}this._pitchSky||(this._pitchSky=L.DomUtil.create("div","leaflet-pitch-sky",this._container),Object.assign(this._pitchSky.style,{position:"absolute",left:0,top:0,width:"100%",zIndex:0,pointerEvents:"none",background:"linear-gradient(#9ec5e8, #dfe9f0)"})),this._pitchSky.style.display="",this._pitchSky.style.height=`${Math.ceil(t)+1}px`},setPitch(t,e){return e&&e.animate?(this._animatePitchBearing(t,this.getBearing(),e),this):(this._stopPitchBearingAnimation(),this._setPitchAndBearing(t,this.getBearing()),this)},_setPitchAndBearing(t,e){if(!this._rotate)return;let i=Math.max(0,Math.min(t,85))*(Math.PI/180),o=L.Util.wrapNum(e,[0,360])*(Math.PI/180),n=i!==this._pitch;if(!n&&o===this._bearing)return;let s=this._loaded?this.getCenter():void 0;n&&(this._pitch=i,this._rotatePane.style.transformOrigin=L.version.startsWith("2.")?"0 0":""),this._setBearing(e,s),n&&(this._pitch||this._updatePitchSky(),this.fire("pitch"))},getPitch(){return(this._pitch||0)*(180/Math.PI)},setZoomAround(t,e,i){if(!this._pitch)return m.setZoomAround.apply(this,arguments);let o=this.getZoomScale(e),n=this.getSize(),s=this.containerPointToLayerPoint(n.divideBy(2)),r=t instanceof L.Point?t:this.latLngToContainerPoint(t),_=this.containerPointToLayerPoint(r),a=this.layerPointToLatLng(s.add(_.subtract(s).multiplyBy(1-1/o)));return i=Object.assign({},i),i.animate===void 0&&new L.Bounds(new L.Point(0,0),n).contains(r)&&(i.animate=!0),this.setView(a,e,{zoom:i})},getBearing(){return this._bearing*(180/Math.PI)},_initPanes(){let t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),L.version.startsWith("2.")&&(this._rotatePane.style.transformOrigin="0 0"),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))},panInside(t,e){if(!this._rotate||!this._pitch&&Math.abs(this._bearing).toFixed(1)<.1)return m.panInside.apply(this,arguments);e=e||{};let i=d(e.paddingTopLeft||e.padding||[0,0]),o=d(e.paddingBottomRight||e.padding||[0,0]),n=this.latLngToContainerPoint(t),s=new L.Bounds([new L.Point(0,0),this.getSize()]),r=s.getCenter(),_=new L.Bounds([s.min.add(i),s.max.subtract(o)]),a=_.getSize();if(!_.contains(n)){this._enforcingBounds=!0;let h=n.subtract(_.getCenter()),c=_.extend(n).getSize().subtract(a);r.x+=h.x<0?-c.x:c.x,r.y+=h.y<0?-c.y:c.y,this.panTo(this.containerPointToLatLng(r),e),this._enforcingBounds=!1}return this},getBoundsZoom(t,e,i){if(!this._rotate||!this._pitch&&Math.abs(this._bearing).toFixed(1)<.1)return m.getBoundsZoom.apply(this,arguments);t=t instanceof L.LatLngBounds?t:new L.LatLngBounds(t),i=d(i||[0,0]);let o=this.getZoom()||0,n=this.getMinZoom(),s=this.getMaxZoom(),r=this.getSize().subtract(i),_=this.mapBoundsToContainerBounds(t).getSize(),a=this.options.zoomSnap,h=r.x/_.x,c=r.y/_.y,p=e?Math.max(h,c):Math.min(h,c);return o=this.getScaleZoom(p,o),a&&(o=Math.round(o/(a/100))*(a/100),o=e?Math.ceil(o/a)*a:Math.floor(o/a)*a),Math.max(n,Math.min(s,o))},_getCenterOffset(t){if(!this._rotate)return m._getCenterOffset.apply(this,arguments);if(this._pitch){let e=this.getSize().divideBy(2),i=this.containerPointToLayerPoint(e),o=i.multiplyBy(2).subtract(this.project(t).subtract(this._pixelOrigin));return e.subtract(this.layerPointToContainerPoint(o))}return this.latLngToContainerPoint(t)._subtract(this.getSize()._divideBy(2))},_getRotatePanePos(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin(t,e){return this._rotate?this.project(t,e)._subtract(this.containerPointToLayerPoint(this.getSize()._divideBy(2)))._round():m._getNewPixelOrigin.apply(this,arguments)},_getNewPixelBounds(t,e){if(t=t||this.getCenter(),e=e||this.getZoom(),!this._rotate&&m._getNewPixelBounds)return m._getNewPixelBounds.apply(this,arguments);let i=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),o=this.getZoomScale(i,e),n=this.project(t,e).floor(),[s,r]=this._getPitchedContainerBounds(0),_=[[s.x,s.y],[r.x,s.y],[s.x,r.y],[r.x,r.y]].map(h=>this.containerPointToLayerPoint(h));if(this._pitch){let h=this.containerPointToLayerPoint(this.getSize()._divideBy(2));return new L.Bounds(_.map(c=>n.add(c.subtract(h).divideBy(o))))}let a=new L.Bounds(_.map(h=>h.floor())).getSize().divideBy(o*2);return new L.Bounds(n.subtract(a),n.add(a))},_getPixelCenter(){return!this._rotate&&m._getPixelCenter?m._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds(t){if(!this._rotate&&m._getPaddedPixelBounds)return m._getPaddedPixelBounds.apply(this,arguments);let[e,i]=this._getPitchedContainerBounds(t);return new L.Bounds([this.containerPointToLayerPoint([e.x,e.y]).floor(),this.containerPointToLayerPoint([e.x,i.y]).floor(),this.containerPointToLayerPoint([i.x,e.y]).floor(),this.containerPointToLayerPoint([i.x,i.y]).floor()])},_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;let e=t.coords.latitude,i=t.coords.longitude,o=t.coords.heading,n=new L.LatLng(e,i),s=n.toBounds(t.coords.accuracy),r=this._locateOptions;if(r.setView){let a=this.getBoundsZoom(s);this.setView(n,r.maxZoom?Math.min(a,r.maxZoom):a)}let _={latlng:n,bounds:s,timestamp:t.timestamp,heading:o};for(let a in t.coords)typeof t.coords[a]=="number"&&(_[a]=t.coords[a]);this.fire("locationfound",_)}});L.Map.CompassBearing=L.Handler.extend({initialize(t){this._map=t,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks(){if(this._map._rotate&&this.__deviceOrientationEvent){L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this);let t=window.DeviceOrientationEvent;t&&t.requestPermission&&t.requestPermission().then(e=>e==="denied"&&this.enabled()&&this.disable()).catch(()=>{})}else this.disable()},removeHooks(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation(t){let e=t.webkitCompassHeading!=null?t.webkitCompassHeading:t.alpha,i=0;Number.isFinite(e)&&(!t.absolute&&t.webkitCompassHeading&&(e=360-e),!t.absolute&&typeof window.orientation<"u"&&(i=window.orientation),this._map.setBearing(e-i))}});L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing);L.Map.mergeOptions({trackContainerMutation:!1});L.Map.ContainerMutation=L.Handler.extend({addHooks(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks(){this._observer.disconnect()}});L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation);function f(t,e){let i=t.getContainer(),o=i.getBoundingClientRect();return new L.Point(e.clientX-o.left-i.clientLeft,e.clientY-o.top-i.clientTop)}L.Map.mergeOptions({bounceAtZoomLimits:!0});L.Map.TouchGestures=L.Handler.extend({initialize(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom,this.pitch=!!this._map.options.touchPitch},addHooks(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart(t){let e=this._map;if(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming||this._rotating||this._gesture)return;let i=f(e,t.touches[0]),o=f(e,t.touches[1]),n=i.subtract(o),s=this.pitch&&e._rotate&&Math.abs(n.x)>Math.abs(n.y);!s&&!this.zoom&&!this.rotate||(this._gesture=s?"pending":"pinch",this._startP1=i,this._startP2=o,e._stopPitchBearingAnimation(),this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),this.zoom?(e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(o)._divideBy(2))),this._startDist=i.distanceTo(o),this._startZoom=e.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(n.x/n.y),this._startBearing=e.getBearing(),n.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,e._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(t))},_onTouchMove(t){if(!t.touches||t.touches.length!==2||!this._gesture)return;let e=this._map,i=f(e,t.touches[0]),o=f(e,t.touches[1]),n=i.subtract(o),s=i.distanceTo(o)/this._startDist,r;if(this._gesture==="pending"){let a=i.subtract(this._startP1),h=o.subtract(this._startP2);if(Math.max(a.x*a.x+a.y*a.y,h.x*h.x+h.y*h.y)<25){L.DomEvent.preventDefault(t);return}let c=p=>Math.abs(p.y)>Math.abs(p.x);c(a)&&c(h)&&Math.sign(a.y)===Math.sign(h.y)?(this._gesture="pitch",this._lastPitchY=(this._startP1.y+this._startP2.y)/2,this._zooming=this._rotating=!1):this._gesture="pinch"}if(this._gesture==="pitch"){let a=(i.y+o.y)/2;e._setPitchAndBearing(e.getPitch()-(a-this._lastPitchY)*.5,e.getBearing()),this._lastPitchY=a,L.DomEvent.preventDefault(t);return}if(!(this._zooming||this._rotating))return;if(this._rotating){let h=(Math.atan(n.x/n.y)-this._startTheta)*(180/Math.PI);n.y<0&&(h+=180),h&&e.setBearing(this._startBearing-h)}if(this._zooming)if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,s===1)return}else{if(r=i._add(o)._divideBy(2)._subtract(this._centerPoint),s===1&&r.x===0&&r.y===0)return;let a=e._pitch?e.containerPointToLayerPoint(this._centerPoint.add(r)).subtract(e.containerPointToLayerPoint(this._centerPoint)):r.rotate(-e.getBearing()*(Math.PI/180));this._center=e.unproject(e.project(this._pinchStartLatLng).subtract(a))}this._moved||(e._moveStart(!0,!1),this._moved=!0),e._move.bind(e,this._center,this._zoom,{pinch:!0,round:!1},void 0)(),this.zoom&&(e.options.zoomAnimation?e._animateZoomNoDelay(this._center,e._limitZoom(this._zoom)):e._resetView(this._center,e._limitZoom(this._zoom))),L.DomEvent.preventDefault(t)},_onTouchEnd(){let t=this._gesture;if(delete this._gesture,t==="pitch"||t==="pending"||!this._moved||!(this._zooming||this._rotating)){this._zooming=!1,this._rotating=!1,L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this);return}this._zooming=!1,this._rotating=!1,L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))}});L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures);L.Map.mergeOptions({touchRotate:!1});L.Map.TouchRotate=L.Handler.extend({addHooks(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks(){this._map.touchGestures.rotate=!1}});L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate);L.Map.mergeOptions({touchPitch:!1});L.Map.TouchPitch=L.Handler.extend({addHooks(){this._map.touchGestures.enable(),this._map.touchGestures.pitch=!0},removeHooks(){this._map.touchGestures.pitch=!1}});L.Map.addInitHook("addHandler","touchPitch",L.Map.TouchPitch);L.Map.mergeOptions({shiftKeyRotate:!0,pitchDrag:!0});L.Map.ShiftKeyRotate=L.Handler.extend({initialize(t){this._map=t,this._onMouseDownBound=this._onMouseDown.bind(this),this._onMouseMoveBound=this._onMouseMove.bind(this),this._onMouseUpBound=this._onMouseUp.bind(this),this._onContextMenuBound=this._onContextMenu.bind(this),this._applyBound=this._apply.bind(this)},addHooks(){this._map.options.shiftKeyRotate&&L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.options.pitchDrag&&this.addPitchHooks()},removeHooks(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this.removePitchHooks()},addPitchHooks(){this._pitchHooksAdded||(this._pitchEvents=L.version.startsWith("2.")?["pointerdown","pointermove","pointerup pointercancel"]:["mousedown","mousemove","mouseup"],this._map._container.addEventListener(this._pitchEvents[0],this._onMouseDownBound,!0),this._map._container.addEventListener("contextmenu",this._onContextMenuBound,!0),this._pitchHooksAdded=!0)},removePitchHooks(){this._pitchHooksAdded&&(this._map._container.removeEventListener(this._pitchEvents[0],this._onMouseDownBound,!0),this._map._container.removeEventListener("contextmenu",this._onContextMenuBound,!0),this._onMouseUp(),delete this._pitchEvents,this._pitchHooksAdded=!1)},_handleShiftScroll(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map.getBearing()+Math.sign(t.deltaY)*5)):this._map.scrollWheelZoom.enable()},_onMouseDown(t){if(this._dragging||(this._moved=!1,!this._map._rotate||!this._map.options.pitchDrag||!(t.button===2||t.ctrlKey&&t.button===0)))return;let e=this._map.scrollWheelZoom;e&&e._timer&&(clearTimeout(e._timer),e._timer=null,e._delta=0,e._startTime=null),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._map._stopPitchBearingAnimation(),this._dragging=!0,this._lastX=t.clientX,this._lastY=t.clientY,this._pitchDelta=this._bearingDelta=0,document.addEventListener(this._pitchEvents[1],this._onMouseMoveBound);for(let i of this._pitchEvents[2].split(" "))document.addEventListener(i,this._onMouseUpBound)},_onMouseMove(t){let e=this._map._container.getBoundingClientRect(),i=e.left+e.width/2,o=e.top+e.height/2,n=t.clientX,s=t.clientY;this._pitchDelta+=(this._lastY-s)*.5,this._bearingDelta+=Math.abs(o-this._lastY)>100?(Math.atan2(s-o,n-i)-Math.atan2(s-o,this._lastX-i))*(180/Math.PI):(n-this._lastX)*.8*(s<o?1:-1),this._lastX=n,this._lastY=s,this._moved=!0,this._frame||(this._frame=requestAnimationFrame(this._applyBound)),t.preventDefault()},_apply(){this._frame=null,!(!this._pitchDelta&&!this._bearingDelta)&&(this._map._setPitchAndBearing(this._map.getPitch()+this._pitchDelta,this._map.getBearing()+this._bearingDelta),this._pitchDelta=this._bearingDelta=0)},_onContextMenu(t){(this._dragging||this._moved)&&(t.preventDefault(),t.stopPropagation())},_onMouseUp(){if(!(!this._pitchEvents||!this._dragging)){document.removeEventListener(this._pitchEvents[1],this._onMouseMoveBound);for(let t of this._pitchEvents[2].split(" "))document.removeEventListener(t,this._onMouseUpBound);cancelAnimationFrame(this._frame),this._map._mapPane&&this._apply(),this._frame=null,this._dragging=!1,delete this._lastX,delete this._lastY}}});L.Map.addInitHook(function(){this.options.shiftKeyRotate?(this.shiftKeyRotate=new L.Map.ShiftKeyRotate(this),this.shiftKeyRotate.enable()):this.options.pitchDrag&&(this.shiftKeyRotate=new L.Map.ShiftKeyRotate(this),this.shiftKeyRotate.addPitchHooks(),this.on("unload",this.shiftKeyRotate.removePitchHooks,this.shiftKeyRotate)),this.scrollWheelZoom.enabled()&&this.options.shiftKeyRotate&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())});L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1});L.Map.TouchZoom=L.Handler.extend({addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}});L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom);L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0,visualizePitch:!0},onAdd(t){let e=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),i=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");i.style.backgroundImage=`url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`,i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="50%",i.style.pointerEvents="none";let o=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",e);return o.appendChild(i),o.href="#",o.title=this.options.visualizePitch?"Reset bearing and pitch":"Reset bearing to north",o.setAttribute("role","button"),o.setAttribute("aria-label",o.title),o.style.cursor="grab",o.style.touchAction="none",this._onPointerMoveBound=this._onPointerMove.bind(this),this._onPointerUpBound=this._onPointerUp.bind(this),L.DomEvent.on(o,"dblclick contextmenu",L.DomEvent.stop).on(o,"click",L.DomEvent.stop).on(o,"click",this._onClick,this).on(o,"click",this._refocusOnMap,this),o.addEventListener("pointerdown",this._onPointerDown.bind(this)),t.on("rotate pitch",this._restyle,this),this._map=t,this._restyle(),e},onRemove(t){this._onPointerUp(),t.off("rotate pitch",this._restyle,this)},_onClick(){if(this._moved){this._moved=!1;return}!this._map||!this._map._rotate||(this.options.visualizePitch?this._map.resetNorthPitch():this._map.resetNorth())},_onPointerDown(t){!this._map||!this._map._rotate||t.button>0||this._pointerId!=null||(t.preventDefault(),t.stopPropagation(),this._pointerId=t.pointerId,this._startX=this._lastX=t.clientX,this._startY=this._lastY=t.clientY,this._moved=!1,this._link.style.cursor="grabbing",document.addEventListener("pointermove",this._onPointerMoveBound),document.addEventListener("pointerup",this._onPointerUpBound),document.addEventListener("pointercancel",this._onPointerUpBound))},_onPointerMove(t){if(t.pointerId!==this._pointerId||(t.preventDefault(),!this._moved&&Math.hypot(t.clientX-this._startX,t.clientY-this._startY)<3))return;this._moved||(this._moved=!0,this._map._stopPitchBearingAnimation());let e=this._map,i=this.options.visualizePitch?e.getPitch()+(this._lastY-t.clientY)*.5:e.getPitch();e._setPitchAndBearing(i,e.getBearing()+(t.clientX-this._lastX)*.8),this._lastX=t.clientX,this._lastY=t.clientY},_onPointerUp(t){t&&t.pointerId!==this._pointerId||(document.removeEventListener("pointermove",this._onPointerMoveBound),document.removeEventListener("pointerup",this._onPointerUpBound),document.removeEventListener("pointercancel",this._onPointerUpBound),t&&this._moved&&!this._link.contains(t.target)&&(this._moved=!1),delete this._pointerId,this._link&&(this._link.style.cursor="grab",this._restyle()))},_restyle(){let t=this._map;if(!t)return;if(!t.options.rotate){this._link.classList.add("leaflet-disabled");return}let e=t.getBearing(),i=t.getPitch();if(this._arrow.style.transform=this.options.visualizePitch&&i?`scale(${1/Math.sqrt(Math.cos(i*Math.PI/180))}) rotateX(${i}deg) rotate(${e}deg)`:`rotate(${e}deg)`,this.options.closeOnZeroBearing){let o=!e&&!(this.options.visualizePitch&&i)&&this._pointerId==null;this._container.style.display=o?"none":"block"}}});L.control&&(L.control.rotate=t=>new L.Control.Rotate(t));L.Map.mergeOptions({rotateControl:!0});L.Map.addInitHook(function(){if(this.options.rotateControl){let t=typeof this.options.rotateControl=="object"?this.options.rotateControl:{};this.rotateControl=new L.Control.Rotate(t),this.addControl(this.rotateControl)}});return Z(R);})();
1
+ var leafletRotate=(()=>{var y=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var k=(t,e)=>{for(var i in e)y(t,i,{get:e[i],enumerable:!0})},A=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of C(e))!E.call(t,o)&&o!==i&&y(t,o,{get:()=>e[o],enumerable:!(n=z(e,o))||n.enumerable});return t};var S=t=>A(y({},"__esModule",{value:!0}),t);var H={};k(H,{toPoint:()=>m});var v=Object.assign({},L.DomUtil);Object.assign(L.DomUtil,{setTransform(t,e,i,n,o){let s=e||new L.Point(0,0);if(!n)return v.setTransform(t,s._round(),i);s=s.rotateFrom(n,o),t.style.transform="translate3d("+s.x+"px,"+s.y+"px,0)"+(i?" scale("+i+")":"")+" rotate("+n+"rad)"},setPosition(t,e,i,n,o){if(!i)return v.setPosition(t,e);t._leaflet_pos=e,L.DomUtil.setTransform(t,e,o,i,n)},getPosition(t){return t._leaflet_pos||v.getPosition(t)}});var I=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Draggable.prototype));L.Draggable.include({_onMove(t){let e=t.touches?t.touches[0]:t;if(this._enabled&&this._moving&&(!t.touches||t.touches.length===1)){let i=new L.Point(e.clientX,e.clientY).subtract(this._startPoint);if(!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance){L.DomEvent.preventDefault(t),this._newPos=this._startPos.add(new L.Point(i.x/this._parentScale.x,i.y/this._parentScale.y)),this._lastEvent=t,this._updatePosition();return}}return I._onMove.apply(this,arguments)}});Object.assign(L.Point.prototype,{rotate(t){return this.rotateFrom(t,new L.Point(0,0))},rotateFrom(t,e){if(!t)return this;let i=Math.sin(t),n=Math.cos(t),o=e.x,s=e.y,a=this.x-o,h=this.y-s;return new L.Point(a*n-h*i+o,a*i+h*n+s)}});function m(t){return t==null||t instanceof L.Point?t:Array.isArray(t)?new L.Point(t[0],t[1]):new L.Point(t.x,t.y)}var B=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.DivOverlay.prototype));L.DivOverlay.include({getEvents(){let t=Object.assign(B.getEvents.apply(this,arguments),{rotate:this._updatePosition,pitch:this._updatePitchEvents});return this._map&&this._map._pitch&&(t.move=this._updatePosition),t},_updatePitchEvents(){this._map._pitch?this._map.on("move",this._updatePosition,this):this._map.off("move",this._updatePosition,this)},_updatePosition(){if(this._map){if(B._updatePosition.apply(this,arguments),this._map._rotate&&this._zoomAnimated){let t=this._getAnchor(),e=L.DomUtil.getPosition(this._container).subtract(t);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(e).add(t))}else if(this._map._rotate){let t=this._map.rotatedPointToMapPanePoint(this._map.latLngToLayerPoint(this._latlng)),e=m(this.options.offset||[0,0]),i=this._getAnchor();this._containerLeft=-Math.round(this._containerWidth/2)+t.x+e.x+i.x,this._containerBottom=-(t.y+e.y+i.y),this._container.style.left=this._containerLeft+"px",this._container.style.bottom=this._containerBottom+"px",this._container.style.top="",L.DomUtil.setPosition(this._container,new L.Point(0,0)),this._container.style.transform=""}}}});var Z=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Popup.prototype));L.Popup.include({_animateZoom(t){if(Z._animateZoom.apply(this,arguments),this._map&&this._map._rotate){let e=this._getAnchor(),i=L.DomUtil.getPosition(this._container).subtract(e);L.DomUtil.setPosition(this._container,this._map.rotatedPointToMapPanePoint(i).add(e))}},_adjustPan(){if(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)return;if(this._autopanning){this._autopanning=!1;return}let t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new L.Point(this._containerLeft,-i-this._containerBottom);o._add(L.DomUtil.getPosition(this._container));let s=o._add(this._map._getMapPanePos()),a=m(this.options.autoPanPadding||[0,0]),h=m(this.options.autoPanPaddingTopLeft||a),r=m(this.options.autoPanPaddingBottomRight||a),_=t.getSize(),c=0,p=0;s.x+n+r.x>_.x&&(c=s.x+n-_.x+r.x),s.x-c-h.x<0&&(c=s.x-h.x),s.y+i+r.y>_.y&&(p=s.y+i-_.y+r.y),s.y-p-h.y<0&&(p=s.y-h.y),(c||p)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,p]))}});var w=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Tooltip.prototype));L.Tooltip.include({_animateZoom(t){if(!this._map._rotate)return w._animateZoom.apply(this,arguments);let e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)},_updatePosition(){if(!this._map._rotate)return w._updatePosition.apply(this,arguments);let t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)}});var N=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Icon.prototype));L.Icon.include({_setIconStyles(t,e){let i=this.options,n=i[e+"Size"];typeof n=="number"&&(n=[n,n]);let o=n?new L.Point(...Array.isArray(n)?n:[n.x,n.y]):null,s=e==="shadow"&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0),a=s?new L.Point(...Array.isArray(s)?s:[s.x,s.y]):null;t.className="leaflet-marker-"+e+" "+(i.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px",t.style.transformOrigin=a.x+"px "+a.y+"px 0px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")}});var T=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Marker.prototype));L.Marker.mergeOptions({rotation:0,rotateWithView:!1,keepUpright:!1,scale:void 0});var b,D={_onDrag(t){let e=this._marker,i=e.options.rotation||e.options.rotateWithView,n=e._shadow,o=L.DomUtil.getPosition(e._icon);!i&&n&&L.DomUtil.setPosition(n,o),e._map._rotate&&(o=e._map.mapPanePointToRotatedPoint(o));let s=e._map.layerPointToLatLng(o);e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i?e.setLatLng(s):e.fire("move",t),e.fire("drag",t)},_onDragEnd(t){this._marker._map._rotate&&this._marker.update(),b._onDragEnd.apply(this,arguments)}};L.Marker.include({getEvents(){let t=Object.assign(T.getEvents.apply(this,arguments),{rotate:this.update,pitch:this._updatePitchEvents});return this._map&&this._map._pitch&&(t.move=this.update),t},_updatePitchEvents(){this._map._pitch?this._map.on("move",this.update,this):this._map.off("move",this.update,this)},_initInteraction(){let t=T._initInteraction.apply(this,arguments);return this.dragging&&this.dragging.enabled()&&this._map&&this._map._rotate&&(b=b||Object.getPrototypeOf(this.dragging),this.dragging.disable(),Object.assign(this.dragging,{_onDrag:D._onDrag.bind(this.dragging),_onDragEnd:D._onDragEnd.bind(this.dragging)}),this.dragging.enable()),t},_setPos(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));let e=this._getIconBearing();this._icon&&L.DomUtil.setPosition(this._icon,t,e,t,this.options.scale),this._shadow&&L.DomUtil.setPosition(this._shadow,t,e,t,this.options.scale),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_getIconBearing(){let t=this.options.rotation||0;return this.options.rotateWithView&&(t+=this._map._bearing),this.options.keepUpright&&(t=(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI),t>Math.PI/2&&t<3*Math.PI/2&&(t+=Math.PI),t%=2*Math.PI),t},setRotation(t){this.options.rotation=t,this.update()}});var x=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.GridLayer.prototype));L.GridLayer.include({getEvents(){let t=x.getEvents.apply(this,arguments);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotateEvent),t},_initContainer(){if(x._initContainer.apply(this,arguments),!(!this._map._rotate||!this._container))for(let t=this._container;t&&t!==this._map._rotatePane;t=t.parentElement)t.style.transformStyle="preserve-3d"},_onRotateEvent(){let t=this._map;if(!t)return;let e=t.getPixelOrigin();(!this._rotateOrigin||!this._rotateOrigin.equals(e))&&!t._animatingZoom&&this._levels&&this._setZoomTransforms(t.getCenter(),t.getZoom()),this._rotateOrigin=e,this._onRotate()},_getTiledPixelBounds(t){return this._map._rotate?this._map._getNewPixelBounds(t,this._tileZoom):x._getTiledPixelBounds.apply(this,arguments)}});var g=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Renderer.prototype)),P=Object.getPrototypeOf(L.Renderer.prototype),R=g.getEvents||P.getEvents,j=g._onMoveEnd||P._onMoveEnd;L.Renderer.include({getEvents(){let t=R.apply(this,arguments);return Object.assign(t,{rotate:this._onRotate})},_onRotate(){if(!this._map._rotate)return;let t=this._map.getPixelOrigin();if(!this._rotateOrigin||!this._rotateOrigin.equals(t)){this._rotateOrigin=t,clearTimeout(this._rotateTimer),this._onZoomEnd(),this._updateAfterRotate();return}if(this._bounds&&this._bounds.contains(this._map._getPaddedPixelBounds(0)))return;clearTimeout(this._rotateTimer);let e=(this._lastRotateUpdate||0)+100-performance.now();e>0?this._rotateTimer=setTimeout(()=>this._map&&this._updateAfterRotate(),e):this._updateAfterRotate()},_updateAfterRotate(){this._lastRotateUpdate=performance.now(),L.version.startsWith("2.")?this._onMoveEnd():this._update()},onAdd(){g.onAdd.apply(this,arguments),L.version<="1.9.3"&&this._container.classList.add("leaflet-zoom-animated")},_updateTransform(t,e){let i=L.version.startsWith("2.");if(!this._map._rotate)return(i?P:g)._updateTransform.apply(this,arguments);if(!i&&e===this._zoom)return;let n=this._map.getZoomScale(e,this._zoom),o=this._topLeftPoint.multiplyBy(n).subtract(this._map._getNewPixelOrigin(t,e));L.DomUtil.setTransform(this._container,o,n)},_onMoveEnd(t){if(!L.version.startsWith("2.")||!this._map._rotate)return j.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._topLeftPoint=this._map._getNewPixelOrigin(this._center,this._zoom).add(this._bounds.min),this._updateTransform(this._center,this._zoom),this._resizeContainer(),this._onSettled(t)},_resizeContainer(){if(!L.version.startsWith("2.")||!this._map._rotate||!this._bounds)return P._resizeContainer.apply(this,arguments);let t=this._bounds.getSize();return this._container.style.width=t.x+"px",this._container.style.height=t.y+"px",t},_update(){if(!this._map._rotate)return g._update.apply(this,arguments);this._bounds=this._map._getPaddedPixelBounds(this.options.padding),this._topLeft=this._map.layerPointToLatLng(this._bounds.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._topLeftPoint=this._map._getNewPixelOrigin(this._center,this._zoom).add(this._bounds.min)}});var d=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Map.prototype));L.Map.mergeOptions({rotate:!1,bearing:0,pitch:0,pitchMaxDistance:3});L.Map.include({_resetView(){return this._pitch&&(delete this._pitchPan,L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._updatePitchTransform(),arguments[0]=this._limitCenter(arguments[0],arguments[1],this.options.maxBounds)),d._resetView.apply(this,arguments)},_animateZoomNoDelay(t,e){this._mapPane&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._move(t,e,void 0,!0),this._onZoomTransitionEnd())},initialize(t,e){e.rotate&&(this._rotate=!0,this._bearing=0,this._pitch=0),d.initialize.apply(this,arguments),this.options.rotate&&(this.on("resize",this._updatePitchTransform,this),this.on("movestart dragstart",this._startPitchPan,this),this.on("move",this._updatePitchPan,this),this.on("moveend",this._endPitchPan,this),this.on("move",this._updatePitchSky,this),this.on("rotate",this._panInsideMaxBounds,this),this.setBearing(this.options.bearing),this.setPitch(this.options.pitch))},containerPointToLayerPoint(t){return this._rotate?this._pitch?this._transformPitchPoint(m(t).subtract(this._getMapPanePos()),this._pitchInverseTransform):m(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):d.containerPointToLayerPoint.apply(this,arguments)},layerPointToContainerPoint(t){return this._rotate?this._pitch?this._transformPitchPoint(t,this._pitchTransform).add(this._getMapPanePos()):m(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):d.layerPointToContainerPoint.apply(this,arguments)},rotatedPointToMapPanePoint(t){return this._pitch?this._transformPitchPoint(t,this._pitchTransform):m(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint(t){return this._pitch?this._transformPitchPoint(t,this._pitchInverseTransform):m(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},mapBoundsToContainerBounds(t){if(!this._rotate&&d.mapBoundsToContainerBounds)return d.mapBoundsToContainerBounds.apply(this,arguments);let e=this.getPixelOrigin(),i=this.layerPointToContainerPoint(this.project(t.getNorthWest())._subtract(e)),n=this.layerPointToContainerPoint(this.project(t.getNorthEast())._subtract(e)),o=this.layerPointToContainerPoint(this.project(t.getSouthWest())._subtract(e)),s=this.layerPointToContainerPoint(this.project(t.getSouthEast())._subtract(e));return new L.Bounds([new L.Point(Math.min(i.x,n.x,s.x,o.x),Math.min(i.y,n.y,s.y,o.y)),new L.Point(Math.max(i.x,n.x,s.x,o.x),Math.max(i.y,n.y,s.y,o.y))])},getBounds(){if(!this._rotate)return d.getBounds.apply(this,arguments);let[t,e]=this._getPitchedContainerBounds(0);return new L.LatLngBounds([this.containerPointToLatLng([t.x,t.y]),this.containerPointToLatLng([e.x,t.y]),this.containerPointToLatLng([e.x,e.y]),this.containerPointToLatLng([t.x,e.y])])},_getPitchedContainerBounds(t){let e=this.getSize(),i=e.multiplyBy(-t),n=e.multiplyBy(1+t);return this._pitch&&(i.y=Math.min(Math.max(i.y,this._getPitchFarY()),n.y)),[i,n]},_getPitchFarY(){let t=this.getSize(),e=this._pitchInverseTransform,i=this._getMapPanePos(),n=t.x/2-i.x,o=t.y/2-i.y,s=this.options.pitchMaxDistance*t.y,a=l=>e.g*n+e.h*l+e.i,h=a(o),r=this._transformPitchPoint([n,o],e),_=l=>a(l)*h>0&&this._transformPitchPoint([n,l],e).distanceTo(r)<=s,c=-t.y-i.y,p=o;if(_(c))return-1/0;for(let l=0;l<20;l++){let u=(c+p)/2;_(u)?p=u:c=u}return p+i.y},setBearing(t,e){if(this._rotate){if(e&&e.animate){this._animatePitchBearing(this.getPitch(),t,e);return}this._stopPitchBearingAnimation(),this._setBearing(t)}},_animatePitchBearing(t,e,i){this._stopPitchBearingAnimation();let n=this._bearingAnimationId,o=this.getBearing(),s=this.getPitch(),a=L.Util.wrapNum(e,[0,360]),h=Math.max(0,Math.min(t,85)),r=(a-o+540)%360-180,_=Math.max(0,i.duration==null?.25:i.duration)*1e3,c=Math.max(i.easeLinearity||.5,.2),p=performance.now(),l=function(){if(!this._mapPane||this._bearingAnimationId!==n)return;let u=_?Math.min((performance.now()-p)/_,1):1,M=1-Math.pow(1-u,1/c);u<1?this._bearingAnimationFrame=requestAnimationFrame(l.bind(this)):delete this._bearingAnimationFrame,this._setPitchAndBearing(u===1?h:s+(h-s)*M,u===1?a:o+r*M)};this._bearingAnimationFrame=requestAnimationFrame(l.bind(this))},_stopPitchBearingAnimation(){this._bearingAnimationId=(this._bearingAnimationId||0)+1,this._bearingAnimationFrame&&(cancelAnimationFrame(this._bearingAnimationFrame),delete this._bearingAnimationFrame)},resetNorth(t){return t=Object.assign({animate:!0,duration:.5},t),t.animate?this._animatePitchBearing(this.getPitch(),0,t):this.setBearing(0),this},resetNorthPitch(t){return t=Object.assign({animate:!0,duration:.5},t),t.animate?this._animatePitchBearing(0,0,t):(this._stopPitchBearingAnimation(),this._setPitchAndBearing(0,0)),this},_setBearing(t,e){!e&&this._loaded&&(e=this.getCenter());let i=L.Util.wrapNum(t,[0,360])*(Math.PI/180),n=this._getPixelCenter(),o=this._getRotatePanePos().rotateFrom(-this._bearing,n),s=o.rotateFrom(i,n);this._pivot=n,this._bearing=i,this._rotatePanePos=s,this._pitch?(this._rotatePane._leaflet_pos=o,this._updatePitchTransform()):L.DomUtil.setPosition(this._rotatePane,o,i,n),e&&(this._pixelOrigin=this.project(e,this._zoom).subtract(this.containerPointToLayerPoint(this.getSize().divideBy(2))),delete this._lastCenter,this.fire("move")),this.fire("rotate")},_transformPitchPoint(t,e,i){if(t=m(t),!(e instanceof DOMMatrix)){if(i){let s=e.g*i.x+e.h*i.y+e.i,a=e.g*t.x+e.h*t.y+e.i;a*s<=0&&(t=i.add(t.subtract(i).multiplyBy(s/(s-a)*(1-1e-6))))}let o=e.g*t.x+e.h*t.y+e.i;return new L.Point((e.a*t.x+e.b*t.y+e.c)/o,(e.d*t.x+e.e*t.y+e.f)/o)}let n=e.m14*t.x+e.m24*t.y+e.m44;return new L.Point((e.m11*t.x+e.m21*t.y+e.m41)/n,(e.m12*t.x+e.m22*t.y+e.m42)/n)},_updatePitchTransform(){if(!this._pitch||!this._rotatePane)return;let t=this._getPixelCenter(),e=this.getSize(),i=Math.max(1,e.y*1.5),n=this._rotatePane._leaflet_pos||new L.Point(0,0),o=`translate3d(${t.x}px,${t.y}px,0) perspective(${i}px) rotateX(${this.getPitch()}deg) rotateZ(${this.getBearing()}deg) translate3d(${n.x-t.x}px,${n.y-t.y}px,0)`;this._setPitchTransform(o)},_setPitchTransform(t){this._rotatePane.style.transformOrigin="0 0";let e=this._pitchTransform=new DOMMatrix(t),i=e.m11,n=e.m21,o=e.m41,s=e.m12,a=e.m22,h=e.m42,r=e.m14,_=e.m24,c=e.m44,p=i*(a*c-h*_)-n*(s*c-h*r)+o*(s*_-a*r),l=DOMMatrix.fromMatrix(e);l.m13=l.m23=l.m43=0,this._rotatePane.style.transform=`matrix3d(${Array.from(l.toFloat64Array(),u=>u*1e3).join(",")})`,this._pitchInverseTransform={a:(a*c-h*_)/p,b:(o*_-n*c)/p,c:(n*h-o*a)/p,d:(h*r-s*c)/p,e:(i*c-o*r)/p,f:(o*s-i*h)/p,g:(s*_-a*r)/p,h:(n*r-i*_)/p,i:(i*a-n*s)/p},this._updatePitchSky()},_startPitchPan(t){if(!this._pitch||!this._loaded)return;let e=this.dragging&&this.dragging._draggable,i=t.type==="dragstart"&&e?(this.pointerEventToContainerPoint||this.mouseEventToContainerPoint).call(this,{clientX:e._startPoint.x,clientY:e._startPoint.y}):this.getSize().divideBy(2),n=this._getMapPanePos().clone();this._pitchPan={anchor:i,panePos:n,lastPanePos:n,matrix:this._pitchTransform,inverse:this._pitchInverseTransform,layerAnchor:this.containerPointToLayerPoint(i),zoom:this._zoom}},_updatePitchPan(){let t=this._pitchPan;if(!this._pitch||!t||this._animatingZoom||this._zoom!==t.zoom)return;let e=this._getMapPanePos();if(e.equals(t.lastPanePos))return;let i=e.subtract(t.panePos),n=this._transformPitchPoint(t.anchor.add(i).subtract(t.panePos),t.inverse),o=n.subtract(t.layerAnchor),s=new DOMMatrix().translate(-i.x,-i.y).multiply(t.matrix).translate(o.x,o.y);this._setPitchTransform(s.toString()),t.lastPanePos=e.clone(),delete this._lastCenter},_endPitchPan(){delete this._pitchPan},_updatePitchSky(){let t=this._pitch&&this._pitchInverseTransform?this._getPitchFarY():-1/0;if(t<=0){this._pitchSky&&(this._pitchSky.style.display="none");return}this._pitchSky||(this._pitchSky=L.DomUtil.create("div","leaflet-pitch-sky",this._container),Object.assign(this._pitchSky.style,{position:"absolute",left:0,top:0,width:"100%",zIndex:0,pointerEvents:"none",background:"var(--leaflet-sky-background, linear-gradient(#9ec5e8, #dfe9f0))"})),this._pitchSky.style.display="",this._pitchSky.style.height=`${Math.ceil(t)+1}px`},setPitch(t,e){return e&&e.animate?(this._animatePitchBearing(t,this.getBearing(),e),this):(this._stopPitchBearingAnimation(),this._setPitchAndBearing(t,this.getBearing()),this)},_setPitchAndBearing(t,e){if(!this._rotate)return;let i=Math.max(0,Math.min(t,85))*(Math.PI/180),n=L.Util.wrapNum(e,[0,360])*(Math.PI/180),o=i!==this._pitch;if(!o&&n===this._bearing)return;let s=this._loaded?this.getCenter():void 0;o&&(this._pitch=i,this._rotatePane.style.transformOrigin=L.version.startsWith("2.")?"0 0":""),this._setBearing(e,s),o&&(this._pitch||this._updatePitchSky(),this.fire("pitch"))},getPitch(){return(this._pitch||0)*(180/Math.PI)},setZoomAround(t,e,i){if(!this._pitch)return d.setZoomAround.apply(this,arguments);let n=this.getZoomScale(e),o=this.getSize(),s=this.containerPointToLayerPoint(o.divideBy(2)),a=t instanceof L.Point?t:this.latLngToContainerPoint(t),h=this.containerPointToLayerPoint(a),r=this.layerPointToLatLng(s.add(h.subtract(s).multiplyBy(1-1/n)));return i=Object.assign({},i),i.animate===void 0&&new L.Bounds(new L.Point(0,0),o).contains(a)&&(i.animate=!0),this.setView(r,e,{zoom:i})},getBearing(){return this._bearing*(180/Math.PI)},_initPanes(){let t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._mapPane.style.transformStyle=this._rotatePane.style.transformStyle="preserve-3d",this._norotatePane=this.createPane("norotatePane",this._mapPane),L.version.startsWith("2.")&&(this._rotatePane.style.transformOrigin="0 0"),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))},panInside(t,e){if(!this._rotate)return d.panInside.apply(this,arguments);e=e||{};let i=m(e.paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.latLngToContainerPoint(t),s=new L.Bounds([new L.Point(0,0),this.getSize()]),a=s.getCenter(),h=new L.Bounds([s.min.add(i),s.max.subtract(n)]),r=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;let _=o.subtract(h.getCenter()),c=h.extend(o).getSize().subtract(r);a.x+=_.x<0?-c.x:c.x,a.y+=_.y<0?-c.y:c.y,this.panTo(this.containerPointToLatLng(a),e),this._enforcingBounds=!1}return this},_limitCenter(t,e,i){if(!this._rotate||!i)return d._limitCenter.apply(this,arguments);let n=this.project(t,e),o=this.containerPointToLayerPoint(this.getSize().divideBy(2)),s=this._getPaddedPixelBounds(0,!1),a=new L.Bounds(n.add(s.min.subtract(o)),n.add(s.max.subtract(o))),h=this._getBoundsOffset(a,i,e);return Math.abs(h.x)<=1&&Math.abs(h.y)<=1?t:this.unproject(n.add(h),e)},_panInsideMaxBounds(){if(this.options.maxBounds)return d._panInsideMaxBounds.apply(this,arguments)},panInsideBounds(t,e){if(this._rotate){t=t instanceof L.LatLngBounds?t:new L.LatLngBounds(t);let i=this.getCenter(),n=this._limitCenter(i,this._zoom,t),o=this._getCenterOffset(n);if(!i.equals(n)&&Math.abs(o.x)<=1&&Math.abs(o.y)<=1)return this._enforcingBounds=!0,this.setView(n,this._zoom,{reset:!0}),this._enforcingBounds=!1,this}return d.panInsideBounds.apply(this,arguments)},_limitOffset(t,e){if(!this._rotate||!e)return d._limitOffset.apply(this,arguments);let i=this._pitchPan,n=i?i.anchor.add(this._getMapPanePos().subtract(i.panePos)):this.getSize().divideBy(2),o=this.containerPointToLayerPoint(n),s=this._getMapPanePos(),a=n.subtract(t).subtract(s),h=(this._pitch?this._transformPitchPoint(a,this._pitchInverseTransform,n.subtract(s)):this.containerPointToLayerPoint(n.subtract(t))).subtract(o),r=this._getPaddedPixelBounds(0,!1),_=this.getPixelOrigin().subtract(h),c=this._getBoundsOffset(new L.Bounds(r.min.add(_),r.max.add(_)),e);return n.subtract(this.layerPointToContainerPoint(o.add(h).subtract(c)))},panBy(t,e){if(t=m(t),this._rotate&&this._loaded&&!this.getSize().contains(t)&&!(e&&e.animate)){let i=this.getSize().divideBy(2),n=this._getMapPanePos(),o=this.containerPointToLayerPoint(i),s=i.subtract(t).subtract(n),a=(this._pitch?this._transformPitchPoint(s,this._pitchInverseTransform,i.subtract(n)):this.containerPointToLayerPoint(i.subtract(t))).subtract(o),h=this.unproject(this.project(this.getCenter()).subtract(a));return this._resetView(this._limitCenter(h,this._zoom,this.options.maxBounds),this._zoom),this}return d.panBy.call(this,t,e)},getBoundsZoom(t,e,i){if(!this._rotate||!this._pitch&&Math.abs(this._bearing).toFixed(1)<.1)return d.getBoundsZoom.apply(this,arguments);t=t instanceof L.LatLngBounds?t:new L.LatLngBounds(t),i=m(i||[0,0]);let n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),a=this.getSize().subtract(i),h=this.mapBoundsToContainerBounds(t).getSize(),r=this.options.zoomSnap,_=a.x/h.x,c=a.y/h.y,p=e?Math.max(_,c):Math.min(_,c);return n=this.getScaleZoom(p,n),r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},_getCenterOffset(t){if(!this._rotate)return d._getCenterOffset.apply(this,arguments);if(this._pitch){let e=this.getSize().divideBy(2),i=this.containerPointToLayerPoint(e),n=i.multiplyBy(2).subtract(this.project(t).subtract(this._pixelOrigin));return e.subtract(this.layerPointToContainerPoint(n))}return this.layerPointToContainerPoint(this.project(t).subtract(this._pixelOrigin))._subtract(this.getSize()._divideBy(2))},_getRotatePanePos(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin(t,e){return this._rotate?this.project(t,e)._subtract(this.containerPointToLayerPoint(this.getSize()._divideBy(2))):d._getNewPixelOrigin.apply(this,arguments)},_getNewPixelBounds(t,e){if(t=t||this.getCenter(),e=e||this.getZoom(),!this._rotate&&d._getNewPixelBounds)return d._getNewPixelBounds.apply(this,arguments);let i=this._animatingZoom?Math.max(this._animateToZoom,this.getZoom()):this.getZoom(),n=this.getZoomScale(i,e),o=this.project(t,e).floor(),[s,a]=this._getPitchedContainerBounds(0),h=[[s.x,s.y],[a.x,s.y],[s.x,a.y],[a.x,a.y]].map(_=>this.containerPointToLayerPoint(_));if(this._pitch){let _=this.containerPointToLayerPoint(this.getSize()._divideBy(2));return new L.Bounds(h.map(c=>o.add(c.subtract(_).divideBy(n))))}let r=new L.Bounds(h.map(_=>_.floor())).getSize().divideBy(n*2);return new L.Bounds(o.subtract(r),o.add(r))},_getPixelCenter(){return!this._rotate&&d._getPixelCenter?d._getPixelCenter.apply(this,arguments):this.getSize()._divideBy(2)._subtract(this._getMapPanePos())},_getPaddedPixelBounds(t,e=!0){if(!this._rotate&&d._getPaddedPixelBounds)return d._getPaddedPixelBounds.apply(this,arguments);let[i,n]=this._getPitchedContainerBounds(t);return new L.Bounds([[i.x,i.y],[i.x,n.y],[n.x,i.y],[n.x,n.y]].map(o=>{let s=this.containerPointToLayerPoint(o);return e?s.floor():s}))},_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;let e=t.coords.latitude,i=t.coords.longitude,n=t.coords.heading,o=new L.LatLng(e,i),s=o.toBounds(t.coords.accuracy),a=this._locateOptions;if(a.setView){let r=this.getBoundsZoom(s);this.setView(o,a.maxZoom?Math.min(r,a.maxZoom):r)}let h={latlng:o,bounds:s,timestamp:t.timestamp,heading:n};for(let r in t.coords)typeof t.coords[r]=="number"&&(h[r]=t.coords[r]);this.fire("locationfound",h)}});L.Map.CompassBearing=L.Handler.extend({initialize(t){this._map=t,"ondeviceorientationabsolute"in window?this.__deviceOrientationEvent="deviceorientationabsolute":"ondeviceorientation"in window&&(this.__deviceOrientationEvent="deviceorientation"),this._throttled=L.Util.throttle(this._onDeviceOrientation,100,this)},addHooks(){if(this._map._rotate&&this.__deviceOrientationEvent){L.DomEvent.on(window,this.__deviceOrientationEvent,this._throttled,this);let t=window.DeviceOrientationEvent;t&&t.requestPermission&&t.requestPermission().then(e=>e==="denied"&&this.enabled()&&this.disable()).catch(()=>{})}else this.disable()},removeHooks(){this._map._rotate&&this.__deviceOrientationEvent&&L.DomEvent.off(window,this.__deviceOrientationEvent,this._throttled,this)},_onDeviceOrientation(t){let e=t.webkitCompassHeading!=null?t.webkitCompassHeading:t.alpha,i=0;Number.isFinite(e)&&(!t.absolute&&t.webkitCompassHeading&&(e=360-e),!t.absolute&&typeof window.orientation<"u"&&(i=window.orientation),this._map.setBearing(e-i))}});L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing);L.Map.mergeOptions({trackContainerMutation:!1});L.Map.ContainerMutation=L.Handler.extend({addHooks(){this._observer||(this._observer=new MutationObserver(L.Util.bind(this._map.invalidateSize,this._map))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]})},removeHooks(){this._observer.disconnect()}});L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation);var O=Object.defineProperties({},Object.getOwnPropertyDescriptors(L.Map.Drag.prototype));L.Map.Drag.include({_onDragStart(){O._onDragStart.apply(this,arguments);let t=this._map;if(this._rotateLimit=null,!t._rotate||!t.options.maxBounds||!t.options.maxBoundsViscosity)return;let e=(t.pointerEventToContainerPoint||t.mouseEventToContainerPoint).call(t,{clientX:this._draggable._startPoint.x,clientY:this._draggable._startPoint.y}),i=t._getPaddedPixelBounds(0,!1),n=t.getPixelOrigin();this._rotateLimit={anchor:e,layerAnchor:t.containerPointToLayerPoint(e),panePos:t._getMapPanePos().clone(),footprint:new L.Bounds(i.min.add(n),i.max.add(n)),matrix:t._pitch?t._pitchTransform:null,inverse:t._pitchInverseTransform,bearing:t._bearing}},_onPreDragLimit(){let t=this._rotateLimit;if(!this._map._rotate||!t)return O._onPreDragLimit.apply(this,arguments);let e=this._map,i=this._draggable,n=i._newPos.subtract(i._startPos),o=t.matrix?e._transformPitchPoint(t.anchor.add(n).subtract(t.panePos),t.inverse,t.anchor.subtract(t.panePos)).subtract(t.layerAnchor):n.rotate(-t.bearing),s=e._getBoundsOffset(new L.Bounds(t.footprint.min.subtract(o),t.footprint.max.subtract(o)),e.options.maxBounds);o._subtract(s.multiplyBy(this._viscosity));let a=t.matrix?e._transformPitchPoint(t.layerAnchor.add(o),t.matrix).add(t.panePos).subtract(t.anchor):o.rotate(t.bearing);i._newPos=i._startPos.add(a)}});function f(t,e){let i=t.getContainer(),n=i.getBoundingClientRect();return new L.Point(e.clientX-n.left-i.clientLeft,e.clientY-n.top-i.clientTop)}L.Map.mergeOptions({bounceAtZoomLimits:!0});L.Map.TouchGestures=L.Handler.extend({initialize(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom,this.pitch=!!this._map.options.touchPitch},addHooks(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart(t){let e=this._map;if(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming||this._rotating||this._gesture)return;let i=f(e,t.touches[0]),n=f(e,t.touches[1]),o=i.subtract(n),s=this.pitch&&e._rotate&&Math.abs(o.x)>Math.abs(o.y);!s&&!this.zoom&&!this.rotate||(this._gesture=s?"pending":"pinch",this._startP1=i,this._startP2=n,e._stopPitchBearingAnimation(),this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),this.zoom?(e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(o.x/o.y),this._startBearing=e.getBearing(),o.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,e._stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend touchcancel",this._onTouchEnd,this),L.DomEvent.preventDefault(t))},_onTouchMove(t){if(!t.touches||t.touches.length!==2||!this._gesture)return;let e=this._map,i=f(e,t.touches[0]),n=f(e,t.touches[1]),o=i.subtract(n),s=i.distanceTo(n)/this._startDist,a;if(this._gesture==="pending"){let r=i.subtract(this._startP1),_=n.subtract(this._startP2);if(Math.max(r.x*r.x+r.y*r.y,_.x*_.x+_.y*_.y)<25){L.DomEvent.preventDefault(t);return}let c=p=>Math.abs(p.y)>Math.abs(p.x);c(r)&&c(_)&&Math.sign(r.y)===Math.sign(_.y)?(this._gesture="pitch",this._lastPitchY=(this._startP1.y+this._startP2.y)/2,this._zooming=this._rotating=!1):this._gesture="pinch"}if(this._gesture==="pitch"){let r=(i.y+n.y)/2;e._setPitchAndBearing(e.getPitch()-(r-this._lastPitchY)*.5,e.getBearing()),this._lastPitchY=r,L.DomEvent.preventDefault(t);return}if(!(this._zooming||this._rotating))return;if(this._rotating){let _=(Math.atan(o.x/o.y)-this._startTheta)*(180/Math.PI);o.y<0&&(_+=180),_&&e.setBearing(this._startBearing-_)}if(this._zooming)if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,s===1)return}else{if(a=i._add(n)._divideBy(2)._subtract(this._centerPoint),s===1&&a.x===0&&a.y===0)return;let r=e._pitch?e.containerPointToLayerPoint(this._centerPoint.add(a)).subtract(e.containerPointToLayerPoint(this._centerPoint)):a.rotate(-e.getBearing()*(Math.PI/180));this._center=e.unproject(e.project(this._pinchStartLatLng).subtract(r))}this._moved||(e._moveStart(!0,!1),this._moved=!0),e._move.bind(e,this._center,this._zoom,{pinch:!0,round:!1},void 0)(),this.zoom&&(e.options.zoomAnimation?e._animateZoomNoDelay(this._center,e._limitZoom(this._zoom)):e._resetView(this._center,e._limitZoom(this._zoom))),L.DomEvent.preventDefault(t)},_onTouchEnd(){let t=this._gesture;if(delete this._gesture,t==="pitch"||t==="pending"||!this._moved||!(this._zooming||this._rotating)){this._zooming=!1,this._rotating=!1,L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this);return}this._zooming=!1,this._rotating=!1,L.DomEvent.off(document,"touchmove",this._onTouchMove,this).off(document,"touchend touchcancel",this._onTouchEnd,this),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))}});L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures);L.Map.mergeOptions({touchRotate:!1});L.Map.TouchRotate=L.Handler.extend({addHooks(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks(){this._map.touchGestures.rotate=!1}});L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate);L.Map.mergeOptions({touchPitch:!1});L.Map.TouchPitch=L.Handler.extend({addHooks(){this._map.touchGestures.enable(),this._map.touchGestures.pitch=!0},removeHooks(){this._map.touchGestures.pitch=!1}});L.Map.addInitHook("addHandler","touchPitch",L.Map.TouchPitch);L.Map.mergeOptions({shiftKeyRotate:!0,pitchDrag:!0});L.Map.ShiftKeyRotate=L.Handler.extend({initialize(t){this._map=t,this._onMouseDownBound=this._onMouseDown.bind(this),this._onMouseMoveBound=this._onMouseMove.bind(this),this._onMouseUpBound=this._onMouseUp.bind(this),this._onContextMenuBound=this._onContextMenu.bind(this),this._applyBound=this._apply.bind(this)},addHooks(){this._map.options.shiftKeyRotate&&L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.options.pitchDrag&&this.addPitchHooks()},removeHooks(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this.removePitchHooks()},addPitchHooks(){this._pitchHooksAdded||(this._pitchEvents=L.version.startsWith("2.")?["pointerdown","pointermove","pointerup pointercancel"]:["mousedown","mousemove","mouseup"],this._map._container.addEventListener(this._pitchEvents[0],this._onMouseDownBound,!0),this._map._container.addEventListener("contextmenu",this._onContextMenuBound,!0),this._pitchHooksAdded=!0)},removePitchHooks(){this._pitchHooksAdded&&(this._map._container.removeEventListener(this._pitchEvents[0],this._onMouseDownBound,!0),this._map._container.removeEventListener("contextmenu",this._onContextMenuBound,!0),this._onMouseUp(),delete this._pitchEvents,this._pitchHooksAdded=!1)},_handleShiftScroll(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map.getBearing()+Math.sign(t.deltaY)*5)):this._map.scrollWheelZoom.enable()},_onMouseDown(t){if(this._dragging||(this._moved=!1,!this._map._rotate||!this._map.options.pitchDrag||!(t.button===2||t.ctrlKey&&t.button===0)))return;let e=this._map.scrollWheelZoom;e&&e._timer&&(clearTimeout(e._timer),e._timer=null,e._delta=0,e._startTime=null),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this._map._stopPitchBearingAnimation(),this._dragging=!0,this._lastX=t.clientX,this._lastY=t.clientY,this._pitchDelta=this._bearingDelta=0,document.addEventListener(this._pitchEvents[1],this._onMouseMoveBound);for(let i of this._pitchEvents[2].split(" "))document.addEventListener(i,this._onMouseUpBound)},_onMouseMove(t){let e=this._map._container.getBoundingClientRect(),i=e.left+e.width/2,n=e.top+e.height/2,o=t.clientX,s=t.clientY;this._pitchDelta+=(this._lastY-s)*.5,this._bearingDelta+=Math.abs(n-this._lastY)>100?(Math.atan2(s-n,o-i)-Math.atan2(s-n,this._lastX-i))*(180/Math.PI):(o-this._lastX)*.8*(s<n?1:-1),this._lastX=o,this._lastY=s,this._moved=!0,this._frame||(this._frame=requestAnimationFrame(this._applyBound)),t.preventDefault()},_apply(){this._frame=null,!(!this._pitchDelta&&!this._bearingDelta)&&(this._map._setPitchAndBearing(this._map.getPitch()+this._pitchDelta,this._map.getBearing()+this._bearingDelta),this._pitchDelta=this._bearingDelta=0)},_onContextMenu(t){(this._dragging||this._moved)&&(t.preventDefault(),t.stopPropagation())},_onMouseUp(){if(!(!this._pitchEvents||!this._dragging)){document.removeEventListener(this._pitchEvents[1],this._onMouseMoveBound);for(let t of this._pitchEvents[2].split(" "))document.removeEventListener(t,this._onMouseUpBound);cancelAnimationFrame(this._frame),this._map._mapPane&&this._apply(),this._frame=null,this._dragging=!1,delete this._lastX,delete this._lastY}}});L.Map.addInitHook(function(){this.options.shiftKeyRotate?(this.shiftKeyRotate=new L.Map.ShiftKeyRotate(this),this.shiftKeyRotate.enable()):this.options.pitchDrag&&(this.shiftKeyRotate=new L.Map.ShiftKeyRotate(this),this.shiftKeyRotate.addPitchHooks(),this.on("unload",this.shiftKeyRotate.removePitchHooks,this.shiftKeyRotate)),this.scrollWheelZoom.enabled()&&this.options.shiftKeyRotate&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())});L.Map.mergeOptions({touchZoom:L.Browser.touch,bounceAtZoomLimits:!1});L.Map.TouchZoom=L.Handler.extend({addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}});L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom);L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0,visualizePitch:!0},onAdd(t){let e=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),i=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");i.style.backgroundImage=`url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E")`,i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.backgroundRepeat="no-repeat",i.style.backgroundPosition="50%",i.style.pointerEvents="none";let n=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",e);return n.appendChild(i),n.href="#",n.title=this.options.visualizePitch?"Reset bearing and pitch":"Reset bearing to north",n.setAttribute("role","button"),n.setAttribute("aria-label",n.title),n.style.cursor="grab",n.style.touchAction="none",this._onPointerMoveBound=this._onPointerMove.bind(this),this._onPointerUpBound=this._onPointerUp.bind(this),L.DomEvent.on(n,"dblclick contextmenu",L.DomEvent.stop).on(n,"click",L.DomEvent.stop).on(n,"click",this._onClick,this).on(n,"click",this._refocusOnMap,this),n.addEventListener("pointerdown",this._onPointerDown.bind(this)),t.on("rotate pitch",this._restyle,this),this._map=t,this._restyle(),e},onRemove(t){this._onPointerUp(),t.off("rotate pitch",this._restyle,this)},_onClick(){if(this._moved){this._moved=!1;return}!this._map||!this._map._rotate||(this.options.visualizePitch?this._map.resetNorthPitch():this._map.resetNorth())},_onPointerDown(t){!this._map||!this._map._rotate||t.button>0||this._pointerId!=null||(t.preventDefault(),t.stopPropagation(),this._pointerId=t.pointerId,this._startX=this._lastX=t.clientX,this._startY=this._lastY=t.clientY,this._moved=!1,this._link.style.cursor="grabbing",document.addEventListener("pointermove",this._onPointerMoveBound),document.addEventListener("pointerup",this._onPointerUpBound),document.addEventListener("pointercancel",this._onPointerUpBound))},_onPointerMove(t){if(t.pointerId!==this._pointerId||(t.preventDefault(),!this._moved&&Math.hypot(t.clientX-this._startX,t.clientY-this._startY)<3))return;this._moved||(this._moved=!0,this._map._stopPitchBearingAnimation());let e=this._map,i=this.options.visualizePitch?e.getPitch()+(this._lastY-t.clientY)*.5:e.getPitch();e._setPitchAndBearing(i,e.getBearing()+(t.clientX-this._lastX)*.8),this._lastX=t.clientX,this._lastY=t.clientY},_onPointerUp(t){t&&t.pointerId!==this._pointerId||(document.removeEventListener("pointermove",this._onPointerMoveBound),document.removeEventListener("pointerup",this._onPointerUpBound),document.removeEventListener("pointercancel",this._onPointerUpBound),t&&this._moved&&!this._link.contains(t.target)&&(this._moved=!1),delete this._pointerId,this._link&&(this._link.style.cursor="grab",this._restyle()))},_restyle(){let t=this._map;if(!t)return;if(!t.options.rotate){this._link.classList.add("leaflet-disabled");return}let e=t.getBearing(),i=t.getPitch();if(this._arrow.style.transform=this.options.visualizePitch&&i?`scale(${1/Math.sqrt(Math.cos(i*Math.PI/180))}) rotateX(${i}deg) rotate(${e}deg)`:`rotate(${e}deg)`,this.options.closeOnZeroBearing){let n=!e&&!(this.options.visualizePitch&&i)&&this._pointerId==null;this._container.style.display=n?"none":"block"}}});L.control&&(L.control.rotate=t=>new L.Control.Rotate(t));L.Map.mergeOptions({rotateControl:!0});L.Map.addInitHook(function(){if(this.options.rotateControl){let t=typeof this.options.rotateControl=="object"?this.options.rotateControl:{};this.rotateControl=new L.Control.Rotate(t),this.addControl(this.rotateControl)}});return S(H);})();
2
2
  //# sourceMappingURL=leaflet-rotate.js.map