1import{b2 as r,I as l,bW as d,G as c,O as m,M as p,_ as u,bE as h}from"./yzds40HC.js";import{m as a,M as i,S as f}from"./DhlRdtTC.js";import{a as y}from"./CqawAVUb.js";import"./BgqE2USM.js";import"./Dz0mkqCC.js";import"./CbO2Rjsj.js";import"./C8Dppsyt.js";import"./DkpuU7u1.js";import"./DtS_aP2E.js";const w={name:"MapRenderer",props:{data:{type:Object,required:!0},showMap:{type:Boolean,default:!1}},data(){return{map:null,coords:[],accessToken:"pk.eyJ1IjoiZ3JlYmUxOTkxIiwiYSI6ImNrcjF3MDl0ejI1bm4ycW82dHM1Mzl1cmMifQ.bdG78NAiFuxu2omfuTyouQ"}},mounted(){this.showMap&&this.getUserLocation(!1)},methods:{async getUserLocation(t=!1){if(await this.$nextTick(),this.data.markers&&this.data.markers.length){this.coords=[this.data.markers[0].lng,this.data.markers[0].lat],await this.createMap(t);return}const e={enableHighAccuracy:!0,timeout:5e3,maximumAge:0};navigator.geolocation.getCurrentPosition(o=>{const s=o.coords;this.coords=[s.longitude,s.latitude],this.createMap(t)},()=>{this.data.markers&&this.data.markers.length&&(this.coords=[this.data.markers[0].lng,this.data.markers[0].lat],this.createMap(t))},e)},async createMap(){if(!a.supported()){const{$errorAlert:t}=h();await t("Browserul dumneavoastra nu suporta functionalitatile necesare pentru randarea hÄrÈii");return}a.accessToken=this.accessToken,this.map=new a.Map({accessToken:"pk.eyJ1IjoiZ3JlYmUxOTkxIiwiYSI6ImNrcjF3MDl0ejI1bm4ycW82dHM1Mzl1cmMifQ.bdG78NAiFuxu2omfuTyouQ",container:"map",style:"mapbox://styles/mapbox/streets-v11?optimize=true",zoom:11,scrollZoom:!1,center:this.coords}),this.map.addControl(new a.FullscreenControl),this.map.addControl(new a.NavigationControl),this.map.addControl(new this.$stylesControl({styles:[{label:"Satellite",styleName:"Satellite",styleUrl:"mapbox://styles/mapbox/satellite-v9?optimize=true"},{label:"Outdoors",styleName:"Outdoors",styleUrl:"mapbox://styles/mapbox/outdoors-v11?optimize=true"}]}),"top-left"),this.map.on("load",()=>{this.data.markers.forEach(o=>this.addNewMarker(o));const t=i.modes;t.static=f;const e=new i({displayControlsDefault:!1,modes:t});this.map.addControl(e,"top-left"),this.data.draw&&this.data.draw.type&&e.add(this.data.draw),e.changeMode("static")})},addNewMarker(t){const e=new a.Popup({offset:25,closeButton:!1,closeOnClick:!1}).setText(t.text);new a.Marker({draggable:!1}).setLngLat([t.lng,t.lat]).addTo(this.map).setPopup(e)}}},x={class:"relative"},k={key:0,id:"map",style:{height:"600px",width:"100%"}};function M(t,e,o,s,b,g){const n=u;return r(),l(n,null,{default:d(()=>[c("div",x,[o.showMap?(r(),m("div",k)):p("",!0)])]),_:1})}const z=y(w,[["render",M]]);export{z as default};
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.