PageSourceSearch

https://ostrava.cz/++webresource++f1d8e050-964b-5294-aeea-8994c27d…/chunks/245.58b068f60be98c365c7c.min.js

js ostrava.cz collected 2026-09-24 09:10:47 UTC 13,009 bytes, 8 lines download raw bytes

1(self.webpackChunkplone_formwidget_geolocation=self.webpackChunkplone_formwidget_geolocation||[]).push([[245],{245:(t,i,s)=>{var o,e,n;
2/*!
3Copyright (c) 2016 Dominik Moritz
4
5This file is part of the leaflet locate control. It is licensed under the MIT license.
6You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
7*/!function(a,l){e=[s(3481)],void 0===(n="function"==typeof(o=a)?o.apply(i,e):o)||(t.exports=n),void 0!==l&&l.L&&(l.L.Control.Locate=a(L))}((function(t){const i=(i,s,o)=>{(o=o.split(" ")).forEach((function(o){t.DomUtil[i].call(this,s,o)}))},s=(t,s)=>i("addClass",t,s),o=(t,s)=>i("removeClass",t,s),e=t.Marker.extend({initialize(i,s){t.Util.setOptions(this,s),this._latlng=i,this.createIcon()},createIcon(){const i=this.options;let s="";void 0!==i.color&&(s+=`stroke:${i.color};`),void 0!==i.weight&&(s+=`stroke-width:${i.weight};`),void 0!==i.fillColor&&(s+=`fill:${i.fillColor};`),void 0!==i.fillOpacity&&(s+=`fill-opacity:${i.fillOpacity};`),void 0!==i.opacity&&(s+=`opacity:${i.opacity};`);const o=this._getIconSVG(i,s);this._locationIcon=t.divIcon({className:o.className,html:o.svg,iconSize:[o.w,o.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,i){const s=t.radius,o=s+t.weight,e=2*o;return{className:"leaflet-control-locate-location",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${e}" version="1.1" viewBox="-${o} -${o} ${e} ${e}"><circle r="`+s+'" style="'+i+'" /></svg>',w:e,h:e}},setStyle(i){t.Util.setOptions(this,i),this.createIcon()}}),n=e.extend({initialize(i,s,o){t.Util.setOptions(this,o),this._latlng=i,this._heading=s,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,i){const s=t.radius,o=t.width+t.weight,e=2*(s+t.depth+t.weight),n=`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="${e}" version="1.1" viewBox="-${o/2} 0 ${o} ${e}" style="${`transform: rotate(${this._heading}deg)`}"><path d="`+n+'" style="'+i+'" /></svg>',w:o,h:e}}}),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:e,compassClass:n,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(i,s){const o=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",i);o.title=s.strings.title,o.href="#",o.setAttribute("role","button");const e=t.DomUtil.create(s.iconElementTag,s.icon,o);if(void 0!==s.strings.text){t.DomUtil.create(s.textElementTag,"leaflet-locate-text",o).textContent=s.strings.text,o.classList.add("leaflet-locate-text-active"),o.parentNode.style.display="flex",s.icon.length>0&&e.classList.add("leaflet-locate-icon")}return{link:o,icon:e}},onLocationError(t,i){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(i){for(const s in i)"object"==typeof this.options[s]?t.extend(this.options[s],i[s]):this.options[s]=i[s];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(i){const s=t.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=s,this._map=i,this._layer=this.options.layer||new t.LayerGroup,this._layer.addTo(i),this._event=void 0,this._compassHeading=null,this._prevBounds=null;const o=this.options.createButtonCallback(s,this.options);return this._link=o.link,this._icon=o.icon,t.DomEvent.on(this._link,"click",(function(i){t.DomEvent.stopPropagation(i),t.DomEvent.preventDefault(i),this._onClick()}),this).on(this._link,"dblclick",t.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),s},_onClick(){this._justClicked=!0;const t=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active){const i=this.options.clickBehavior;let s=i.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(s=t?i.inView:i.inViewNotFollowing),i[s]&&(s=i[s]),s){case"setView":this.setView();break;case"stop":if(this.stop(),this.options.returnToPrevBounds){(this.options.flyTo?this._map.flyToBounds:this._map.fitBounds).bind(this._map)(this._prevBounds)}}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()}
7,stop(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate(){if(!this._active&&this._map&&(this._map.locate(this.options.locateOptions),this._map.fire("locateactivate",this),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this.options.showCompass)){const i="ondeviceorientationabsolute"in window;if(i||"ondeviceorientation"in window){const s=this,o=function(){t.DomEvent.on(window,i?"deviceorientationabsolute":"deviceorientation",s._onDeviceOrientation,s)};DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then((function(t){"granted"===t&&o()})):o()}}},_deactivate(){this._active&&this._map&&(this._map.stopLocate(),this._map.fire("locatedeactivate",this),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this.options.showCompass&&(this._compassHeading=null,"ondeviceorientationabsolute"in window?t.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&t.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this)))},setView(){if(this._drawMarker(),this._isOutsideMapBounds())this._event=void 0,this.options.onLocationOutsideMapBounds(this);else if(this._justClicked&&!1!==this.options.initialZoomLevel)(i=this.options.flyTo?this._map.flyTo:this._map.setVie
7w).bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel);else if(this.options.keepCurrentZoomLevel){(i=this.options.flyTo?this._map.flyTo:this._map.panTo).bind(this._map)([this._event.latitude,this._event.longitude])}else{var i=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;this._ignoreEvent=!0,i.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.initialZoomLevel||this.options.locateOptions.maxZoom}),t.Util.requestAnimFrame((function(){this._ignoreEvent=!1}),this)}},_drawCompass(){if(!this._event)return;const t=this._event.latlng;if(this.options.showCompass&&t&&null!==this._compassHeading){const i=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(i)):this._compass=new this.options.compassClass(t,this._compassHeading,i).addTo(this._layer)}!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null)},_drawMarker(){void 0===this._event.accuracy&&(this._event.accuracy=0);const i=this._event.accuracy,s=this._event.latlng;if(this.options.drawCircle){const o=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;this._circle?this._circle.setLatLng(s).setRadius(i).setStyle(o):this._circle=t.circle(s,i,o).addTo(this._layer)}let o,e;if(this.options.metric?(o=i.toFixed(0),e=this.options.strings.metersUnit):(o=(3.2808399*i).toFixed(0),e=this.options.strings.feetUnit),this.options.drawMarker){const t=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;this._marker?(this._marker.setLatLng(s),this._marker.setStyle&&this._marker.setStyle(t)):this._marker=new this.options.markerClass(s,t).addTo(this._layer)}this._drawCompass();const n=this.options.strings.popup;function a(){return"string"==typeof n?t.Util.template(n,{distance:o,unit:e}):"function"==typeof n?n({distance:o,unit:e}):n}this.options.showPopup&&n&&this._marker&&this._marker.bindPopup(a())._popup.setLatLng(s),this.options.showPopup&&n&&this._compass&&this._compass.bindPopup(a())._popup.setLatLng(s)},_removeMarker(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload(){this.stop(),this._map&&this._map.off("unload",this._unload,this)},_setCompassHeading(i){!isNaN(parseFloat(i))&&isFinite(i)?(i=Math.round(i),this._compassHeading=i,t.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration(){this._setCompassHeading()},_onDeviceOrientation(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound(t){if((!this._event||this._event.latlng.lat!==t.latlng.lat||this._event.latlng.lng!==t.latlng.lng||this._event.accuracy!==t.accuracy)&&this._active){switch(this._event=t,this._drawMarker(),this._updateContainerStyle(),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds(){return void 0!==this._event&&(this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng))},_updateContainerStyle(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasse
7s())},_setClasses(t){"requesting"==t?(o(this._container,"active following"),s(this._container,"requesting"),o(this._icon,this.options.icon),s(this._icon,this.options.iconLoading)):"active"==t?(o(this._container,"requesting following"),s(this._container,"active"),o(this._icon,this.options.iconLoading),s(this._icon,this.options.icon)):"following"==t&&(o(this._container,"requesting"),s(this._container,"active following"),o(this._icon,this.options.iconLoading),s(this._icon,this.options.icon))},_cleanClasses(){t.DomUtil.removeClass(this._container,"requesting"),t.DomUtil.removeClass(this._container,"active"),t.DomUtil.removeClass(this._container,"following"),o(this._icon,this.options.iconLoading),s(this._icon,this.options.icon)},_resetVariables(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return t.control.locate=i=>new t.Control.Locate(i),a}),window)}}]);
8//# sourceMappingURL=245.58b068f60be98c365c7c.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.