Deltacms/core/vendor/geolocation/leaflet/leaflet-ui.js

40 lines
134 KiB
JavaScript
Raw Normal View History

2023-11-04 10:30:31 +01:00
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";!function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),void 0!==e&&e.L&&t(e.L)}((function(t){return t.locales={},t.locale=null,t.registerLocale=function(e,i){t.locales[e]=t.Util.extend({},t.locales[e],i)},t.setLocale=function(e){t.locale=e},t.i18n=t._=function(e,i){t.locale&&t.locales[t.locale]&&t.locales[t.locale][e]&&(e=t.locales[t.locale][e]);try{e=t.Util.template(e,i)}catch(t){}return e}}),window);const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(e,i,o,n,s){var a=i||new L.Point(0,0);if(!n)return i=a._round(),t.setTransform.call(this,e,i,o);a=a.rotateFrom(n,s),e.style[L.DomUtil.TRANSFORM]="translate3d("+a.x+"px,"+a.y+"px,0)"+(o?" scale("+o+")":"")+" rotate("+n+"rad)"},setPosition:function(e,i,o,n){if(!o)return t.setPosition.call(this,e,i);e._leaflet_pos=i,L.Browser.any3d?L.DomUtil.setTransform(e,i,void 0,o,n):(e.style.left=i.x+"px",e.style.top=i.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({updateMapBearing:function(t){this._mapBearing=t}}),L.extend(L.Point.prototype,{rotate:function(t){if(!t)return this;var e=Math.sin(t),i=Math.cos(t);return new L.Point(this.x*i-this.y*e,this.x*e+this.y*i)},rotateFrom:function(t,e){if(!t)return this;var i=Math.sin(t),o=Math.cos(t),n=e.x,s=e.y,a=this.x-n,r=this.y-s;return new L.Point(a*o-r*i+n,a*i+r*o+s)}});const e=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(e.getEvents.call(this),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=L.point(this.options.offset),i=this._getAnchor();this._zoomAnimated?(this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),L.DomUtil.setPosition(this._container,t.add(i))):e=e.add(t).add(i);var o=this._containerBottom=-e.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=o+"px",this._container.style.left=n+"px"}}});const i=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(t){this._map._rotate||i._animateZoom.call(this,t);var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),o=this._getAnchor();e=this._map.rotatedPointToMapPanePoint(e),L.DomUtil.setPosition(this._container,e.add(o))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(L.DomUtil.getStyle(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));var s=n._add(this._map._getMapPanePos()),a=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||a),l=L.point(this.options.autoPanPaddingBottomRight||a),h=t.getSize(),c=0,p=0;s.x+o+l.x>h.x&&(c=s.x+o-h.x+l.x),s.x-c-r.x<0&&(c=s.x-r.x),s.y+i+l.y>h.y&&(p=s.y+i-h.y+l.y),s.y-p-r.y<0&&(p=s.y-r.y),(c||p)&&t.fire("autopanstart").panBy([c,p])}}});const o=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_updatePosition:function(){if(!this._map._rotate)return o._updatePosition.call(this);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)},_animateZoom:function(t){if(!this._map._rotate)return o._animateZoom.call(this,t);var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);e=this._map.rotatedPointToMapPanePoint(e),this._setPosition(e)}});L.extend({},L.Icon.prototype);var n;L.Icon.include({_setIconStyles:function(t,e){var i=this.options,o=i[e+"Size"];"number"==typeof o&&(o=[o,o]);var n=L.point(o),s=L.point("shadow"===e&&i.shadowAnchor||i.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=s.x+"px "+s.y+"px 0px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")}});var s={_onDr
/*!
* Based on package 'screenfull'
* v5.2.0 - 2021-11-03
* (c) Sindre Sorhus; MIT License
* Added definition for using screenfull as an amd module
* Must be placed before the definition of leaflet.fullscreen
* as it is required by that
*/var d,u;L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(t,e){e.rotate&&(this._rotate=!0,this._bearing=0),p.initialize.call(this,t,e),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):p.containerPointToLayerPoint.call(this,t)},getBounds:function(){if(!this._rotate)return p.getBounds.call(this);var t=this.getSize(),e=this.layerPointToLatLng(this.containerPointToLayerPoint([0,0])),i=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,0])),o=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,t.y])),n=this.layerPointToLatLng(this.containerPointToLayerPoint([0,t.y]));return new L.LatLngBounds([e,i,o,n])},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):p.layerPointToContainerPoint.call(this,t)},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var e=this._getRotatePanePos(),i=this.getSize().divideBy(2);this._pivot=this._getMapPanePos().clone().multiplyBy(-1).add(i),e=e.rotateFrom(-this._bearing,this._pivot),this._bearing=t*L.DomUtil.DEG_TO_RAD,this._rotatePanePos=e.rotateFrom(this._bearing,this._pivot),L.DomUtil.setPosition(this._rotatePane,e,this._bearing,this._pivot),this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var 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),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||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},_getCenterOffset:function(t){var e=p._getCenterOffset.call(this,t);return this._rotate&&(e=e.rotate(this._bearing)),e},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this._rotate||p._getNewPixelOrigin.call(this,t,e),this.project(t,e).rotate(this._bearing)._subtract(i)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,o=t.coords.heading,n=new L.LatLng(e,i),s=n.toBounds(t.coords.accuracy),a=this._locateOptions;if(a.setView){var r=this.getBoundsZoom(s);this.setView(n,a.maxZoom?Math.min(r,a.maxZoom):r)}var l={latlng:n,bounds:s,timestamp:t.timestamp,heading:o};for(var h in t.coords)"number"==typeof t.coords[h]&&(l[h]=t.coords[h]);this.fire("locationfound",l)}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){window.DeviceOrientationEvent?(this._capable=!0,this._map=t,this._throttled=L.Util.throttle(this._onDeviceOrientation,1e3,this)):this._capable=!1},addHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.on(window,"deviceorientation",this._throttled,this)},removeHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.off(window,"deviceorientation",this._throttled,this)},_onDeviceOrientation:function(t){null!==
/*!
Copyright (c) 2016 Dominik Moritz
This file is part of the leaflet locate control. It is licensed under the MIT license.
You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
*/
function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(void 0!==e&&e.L?module.exports=t(L):module.exports=t(require("leaflet"))),void 0!==e&&e.L&&(e.L.Control.Locate=t(L))}((function(t){const e=(e,i,o)=>{(o=o.split(" ")).forEach((function(o){t.DomUtil[e].call(this,i,o)}))},i=(t,i)=>e("addClass",t,i),o=(t,i)=>e("removeClass",t,i),n=t.Marker.extend({initialize(e,i){t.Util.setOptions(this,i),this._latlng=e,this.createIcon()},createIcon(){const e=this.options;let i="";void 0!==e.color&&(i+=`stroke:${e.color};`),void 0!==e.weight&&(i+=`stroke-width:${e.weight};`),void 0!==e.fillColor&&(i+=`fill:${e.fillColor};`),void 0!==e.fillOpacity&&(i+=`fill-opacity:${e.fillOpacity};`),void 0!==e.opacity&&(i+=`opacity:${e.opacity};`);const o=this._getIconSVG(e,i);this._locationIcon=t.divIcon({className:o.className,html:o.svg,iconSize:[o.w,o.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,e){const i=t.radius,o=i+t.weight,n=2*o;return{className:"leaflet-control-locate-location",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}" version="1.1" viewBox="-${o} -${o} ${n} ${n}"><circle r="`+i+'" style="'+e+'" /></svg>',w:n,h:n}},setStyle(e){t.Util.setOptions(this,e),this.createIcon()}}),s=n.extend({initialize(e,i,o){t.Util.setOptions(this,o),this._latlng=e,this._heading=i,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,e){const i=t.radius,o=t.width+t.weight,n=2*(i+t.depth+t.weight),s=`M0,0 l${t.width/2},${t.depth} l-${o},0 z`;return{className:"leaflet-control-locate-heading",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${n}" version="1.1" viewBox="-${o/2} 0 ${o} ${n}" style="${`transform: rotate(${this._heading}deg)`}"><path d="`+s+'" style="'+e+'" /></svg>',w:o,h:n}}}),a=t.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds:t=>t.bounds,flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:n,compassClass:s,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:!0,createButtonCallback(e,i){const o=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);o.title=i.strings.title,o.href="#",o.setAttribute("role","button");const n=t.DomUtil.create(i.iconElementTag,i.icon,o);if(void 0!==i.strings.text){t.DomUtil.create(i.textElementTag,"leaflet-locate-text",o).textContent=i.strings.text,o.classList.add("leaflet-locate-text-active"),o.parentNode.style.display="flex",i.icon.length>0&&n.classList.add("leaflet-locate-icon")}return{link:o,icon:n}},onLocationError(t,e){alert(t.message)},onLocationOutsideMapBounds(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize(e){for(const i in e)"object"==typeof this.options[i]?t.extend(this.options[i],e[i]):this.options[i]=e[i];this.options.followMarkerStyle=t.extend({},this.options.markerStyle,this.options.followMarkerStyle),this.options.followCircleStyle=t.extend({},this.options.circleStyle,this.options.followCircleStyle),this.options.followCompassStyle=t.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd(e){const i=t.DomUtil.create("div","leaflet-control-locate leafl
/*!
* leaflet.fullscreen
*/
function(t,e){"function"==typeof define&&define.amd?define("leafletFullScreen",["leaflet","screenfull"],e):"object"==typeof module&&module.exports?module.exports=e(require("leaflet"),require("screenfull")):e(t.L,t.screenfull)}("undefined"!=typeof self?self:window,(function(t,e){return t.Control.FullScreen=t.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:e,onAdd:function(e){var i,o="leaflet-control-zoom-fullscreen",n="";return i=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:t.DomUtil.create("div","leaflet-bar"),this.options.content?n=this.options.content:o+=" fullscreen-icon",this._createButton(this.options.title,o,n,i,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),i},onRemove:function(){t.DomEvent.off(this.link,"click",t.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(t.DomEvent.off(this._container,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(this._container,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this),t.DomEvent.off(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this))},_createButton:function(e,i,o,n,s,a){return this.link=t.DomUtil.create("a",i,n),this.link.href="#",this.link.title=e,this.link.innerHTML=o,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",e),L.DomEvent.disableClickPropagation(n),t.DomEvent.on(this.link,"click",t.DomEvent.stop).on(this.link,"click",s,a),this._screenfull.isEnabled&&(t.DomEvent.on(n,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(n,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a),t.DomEvent.on(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a)),this.link},toggleFullScreen:function(){var e=this._map;e._exitFired=!1,e._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit():(t.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.invalidateSize()),e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:e._container):(t.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.invalidateSize()),e.fire("enterFullscreen"),e._isFullscreen=!0)},_toggleState:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange:function(){var t=this._map;t.invalidateSize(),this._screenfull.isFullscreen||t._exitFired||(t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1)}}),t.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),t.Map.addInitHook((function(){this.options.fullscreenControl&&this.addControl(t.control.fullscreen(this.options.fullscreenControlOptions))})),t.control.fullscreen=function(e){return new t.Control.FullScreen(e)},{leaflet:t,screenfull:e}})),
/**
* leaflet-pegman
*
* @author Raruto
* @license GPL-3.0+
* @link https://github.com/Raruto/leaflet-pegman
* @desc Leaflet plugin that allows an easy integration with the Google StreetView Service API
*/
L.Control.Pegman=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:{position:"bottomright",theme:"leaflet-pegman-v3-default",debug:!1,apiKey:"",libraries:"",mutant:{attribution:'Map data: &copy; <a href="https://www.google.com/intl/en/help/terms_maps.html">Google</a>',pane:"overlayPane",type:null},pano:{enableCloseButton:!0,fullscreenControl:!1,imageDateControl:!0},marker:{draggable:!0,icon:L.icon({className:"pegman-marker",iconSize:[52,52],iconAnchor:[24,33],iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAFElEQVR4XgXAAQ0AAABAMP1L30IDCPwC/o5WcS4AAAAASUVORK5CYII="})}},__interactURL:"https://unpkg.com/interactjs@1.2.9/dist/interact.min.js",__gmapsURL:"https://maps.googleapis.com/maps/api/js?v=3",__mutantURL:"https://unpkg.com/leaflet.gridlayer.googlemutant@0.10.0/Leaflet.GoogleMutant.js",initialize:function(t){void 0!==t.logging&&(t.debug=t.logging),L.Util.setOptions(this,t),this._mousePos={direction:{},old:{}},this._pegmanMarkerCoords=null,this._streetViewCoords=null,this._streetViewLayerEnabled=!1,this._dropzoneMapOpts={accept:".draggable",overlap:.75,ondropactivate:L.bind(this.onDropZoneActivated,this),ondragenter:L.bind(this.onDropZoneDragEntered,this),ondragleave:L.bind(this.onDropZoneDragLeaved,this),ondrop:L.bind(this.onDropZoneDropped,this),ondropdeactivate:L.bind(this.onDropZoneDeactivated,this)},this._draggableMarkerOpts={inertia:!1,onmove:L.bind(this.onDraggableMove,this),onend:L.bind(this.onDraggableEnd,this)},this._lazyLoaderAdded=!1},onAdd:function(t){return this._map=t,this._container=L.DomUtil.create("div","leaflet-pegman pegman-control leaflet-bar"),this._pegman=L.DomUtil.create("div","pegman draggable drag-drop",this._container),this._pegmanButton=L.DomUtil.create("div","pegman-button",this._container),this._pegmanMarker=L.marker([0,0],this.options.marker),this._panoDiv=this.options.panoDiv?document.querySelector(this.options.panoDiv):L.DomUtil.create("div","",this._map._container),L.DomUtil.addClass(this._panoDiv,"pano-canvas"),L.DomUtil.addClass(this._map._container,this.options.theme),L.DomEvent.disableClickPropagation(this._panoDiv),L.DomEvent.on(this._container,"click mousedown dblclick",this._disableClickPropagation,this),this._container.addEventListener("touchstart",this._loadScripts.bind(this,!L.Browser.touch),{once:!0}),this._container.addEventListener("mousedown",this._loadScripts.bind(this,!0),{once:!0}),this._container.addEventListener("mouseover",this._loadScripts.bind(this,!1),{once:!0}),this._loadInteractHandlers(),this._loadGoogleHandlers(),L.DomEvent.on(document,"mousemove",this.mouseMoveTracking,this),L.DomEvent.on(document,"keyup",this.keyUpTracking,this),this._pegmanMarker.on("dragend",this.onPegmanMarkerDragged,this),this._map.on("click",this.onMapClick,this),this._map.on("layeradd",this.onMapLayerAdd,this),this._container},onRemove:function(t){this._googleStreetViewLayer&&this._googleStreetViewLayer.remove(),this._pegmanMarker&&this._pegmanMarker.remove(),L.DomUtil.remove(this._panoDiv),L.DomEvent.off(document,"mousemove",this.mouseMoveTracking,this),L.DomEvent.off(document,"keyup",this.keyUpTracking,this),t.off("mousemove",this._setMouseCursor,this)},_log:function(t){this.options.debug&&console.log(t)},_addClasses:function(t,e){for(var i in e=e.split(" "))L.DomUtil.addClass(t,e[i])},_removeClasses:function(t,e){for(var i in e=e.split(" "))L.DomUtil.removeClass(t,e[i])},_removeAttributes:function(t,e){for(var i in e)t.removeAttribute(e[i])},_insertAfter:function(t,e){t.parentNode.insertBefore(e,t.nextSibling)},_translateElement:function(t,e,i){!1===e&&!1===i&&this._removeAttributes(this._pegman,["style","data-x","data-y"]);var o=(parseFloat(t.getAttribute("data-x"))||0)+e,n=(parseFloat(t.getAttribute("data-y"))||0)+i;t.style.webkitTransform=t.style.transform="translate("+o+"px, "+n+"px)",t.setAttribute("data-x",o),t.setAttribute("data-y",n)},_updateClasses:function(t){switch(t){case"pegman-dragging":this._removeClasses(this._pegman,"dropped"),this._addClasses(this._container,"dragging");break;case"pegman-dragged":this._rem
/**
* leaflet-control-layers-inline
*
* @author Raruto
* @license GPL-3.0+
* @link https://github.com/Raruto/leaflet-control-layers-inline
* @desc Leaflet plugin that allows to display inline layers control
*/
_=L.Control.Layers.prototype,f=_.initialize,y=_.onAdd,_.options.inline=!1,L.Control.Layers.include({initialize:function(t,e,i){i.inline&&(i.collapsed=!1),f.call(this,t,e,i)},onAdd:function(t){return y.call(this,t),this.options.inline&&(this.options.collapsed=!1,L.DomUtil.addClass(this._container,"leaflet-control-layers-inline")),this.options.className&&L.DomUtil.addClass(this._container,this.options.className),this._container}}),function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),void 0!==e&&e.L&&(e.L.Control.MiniMap=t(L),e.L.control.minimap=function(t,i){return new e.L.Control.MiniMap(t,i)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,i){t.Util.setOptions(this,i),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var i={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return i=t.Util.extend(this.options.mapOptions,i),this._miniMap=new t.Map(this._container,i),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var i=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(i,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hid
//# sourceMappingURL=leaflet-ui.js.map