Files
andronevskaya/site/assets/0442b891-d679-4ed9-a9e8-82abf86b4cd8-DVS_gNES.js
2026-02-18 15:43:09 +03:00

5 lines
22 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as J,c as x,o as M,a as z,b as l,t as y,F as ae,r as re,n as ie,d as u,e as g,f as N,w as I,g as ce,h as m}from"./main-D6qyxymd.js";import{e as le}from"./wwElement-CIffNYMW.js";import{e as se,a as ue,b as de,c as pe,d as ve,f as ge,g as me}from"./wwElement-DQHs103p.js";import{e as fe}from"./wwElement-exvplXEl.js";import{e as he}from"./wwElement-DWiiT5l6.js";import{e as be}from"./wwElement-BEVi-Tbw.js";import{L as h}from"./leaflet-src-BRgqcJ1x.js";/* empty css */import{s as Se}from"./wwSection-CQpGyXbr.js";const ye={props:{content:{type:Object,required:!0},uid:{type:String,required:!0}},emits:["trigger-event"],setup(t,{emit:i}){const S=u(()=>!1),e=g(null),d=g(!1),b=g(!1),p=g(!1),_=g({name:null,payload:null}),D=g("N/A"),F=g("N/A"),k=g({}),T=g({}),E=g({}),B=()=>typeof window<"u"&&window.Telegram&&window.Telegram.WebApp?(e.value=window.Telegram.WebApp,L(),!0):!1,q=()=>{if(b.value||d.value)return;const c=wwLib.getFrontDocument(),o=c.createElement("script");o.src="https://telegram.org/js/telegram-web-app.js",o.async=!0,o.onload=()=>{b.value=!0,typeof window<"u"&&window.Telegram&&window.Telegram.WebApp?(e.value=window.Telegram.WebApp,L()):(console.error("Telegram WebApp failed to load properly"),i("trigger-event",{name:"error",event:{error:"Telegram WebApp failed to load"}}))},o.onerror=()=>{console.error("Failed to load Telegram WebApp script"),i("trigger-event",{name:"error",event:{error:"Failed to load Telegram WebApp script"}})},c.head.appendChild(o)},L=()=>{if(!(!e.value||d.value))try{if(D.value=e.value.version||"N/A",F.value=e.value.platform||"N/A",e.value.themeParams&&(k.value={...e.value.themeParams}),e.value.initData)try{if(typeof e.value.initData=="string"&&e.value.initData){const c={};e.value.initData.split("&").forEach(o=>{const[f,A]=o.split("=");f&&A&&(c[f]=decodeURIComponent(A))}),T.value=c}else T.value=e.value.initDataUnsafe||{}}catch(c){console.error("Error parsing initData",c),T.value={}}R(),P(),e.value.ready&&e.value.ready(),d.value=!0,i("trigger-event",{name:"onLoad",event:{version:D.value,platform:F.value}})}catch(c){console.error("Error initializing Telegram WebApp:",c),i("trigger-event",{name:"error",event:{error:c.message||"Unknown error initializing Telegram WebApp"}})}},R=()=>{if(!e.value)return;const c={isVersionAtLeast:typeof e.value.isVersionAtLeast=="function",expand:typeof e.value.expand=="function",close:typeof e.value.close=="function",requestFullscreen:typeof e.value.requestFullscreen=="function",exitFullscreen:typeof e.value.exitFullscreen=="function",lockOrientation:typeof e.value.lockOrientation=="function",unlockOrientation:typeof e.value.unlockOrientation=="function",openLink:typeof e.value.openLink=="function",openTelegramLink:typeof e.value.openTelegramLink=="function",switchInlineQuery:typeof e.value.switchInlineQuery=="function",disableVerticalSwipes:typeof e.value.disableVerticalSwipes=="function",enableVerticalSwipes:typeof e.value.enableVerticalSwipes=="function",enableClosingConfirmation:typeof e.value.enableClosingConfirmation=="function",disableClosingConfirmation:typeof e.value.disableClosingConfirmation=="function",setHeaderColor:typeof e.value.setHeaderColor=="function",setBackgroundColor:typeof e.value.setBackgroundColor=="function",setBottomBarColor:typeof e.value.setBottomBarColor=="function",showAlert:typeof e.value.showAlert=="function",showConfirm:typeof e.value.showConfirm=="function",showPopup:typeof e.value.showPopup=="function",showScanQrPopup:typeof e.value.showScanQrPopup=="function",closeScanQrPopup:typeof e.value.closeScanQrPopup=="function",openInvoice:typeof e.value.openInvoice=="function",shareMessage:typeof e.value.shareMessage=="function",shareToStory:typeof e.value.shareToStory=="function",downloadFile:typeof e.value.downloadFile=="function",readTextFromClipboard:typeof e.value.readTextFromClipboard=="function",requestWriteAccess:typeof e.value.requestWriteAccess=="function",requestContact:typeof e.value.requestContact=="function",hideKeyboard:typeof e.value.hideKeyboard=="function",CloudStorage:!!e.value.CloudStorage,DeviceStorage:!!e.value.DeviceStorage,SecureStorage:!!e.value.SecureStorage,Accelerometer:!!e.value.Accelerometer,DeviceOrientation:!!e.value.DeviceOrientation,Gyroscope:!!e.value.Gyroscope,LocationManager:!!e.value.LocationManager,BiometricManager:!!e.value.BiometricManager,HapticFeedback:!!e.value.HapticFeedback,EmojiStatus:!!e.value.EmojiStatus,HomeScreen:!!e.value.HomeScreen};E.value=c},P=()=>{if(!e.value)return;const c={backButtonClicked:()=>r("backButtonClicked"),settingsButtonClicked:()=>r("settingsButtonClicked"),bottomButtonClicked:()=>r("bottomButtonClicked"),secondaryButtonClicked:()=>r("secondaryButtonClicked"),popupClosed:o=>r("popupClosed",o),qrTextReceived:o=>r("qrTextReceived",{text:o}),scanQrPopupClosed:()=>r("scanQrPopupClosed"),clipboardTextReceived:o=>r("clipboardTextReceived",{text:o}),shareMessageSent:()=>r("shareMessageSent"),shareMessageFailed:()=>r("shareMessageFailed"),fileDownloadRequested:o=>r("fileDownloadRequested",o),invoiceClosed:o=>r("invoiceClosed",{status:o}),writeAccessRequested:o=>r("writeAccessRequested",{result:o}),contactRequested:o=>r("contactRequested",{result:o}),fullscreenChanged:o=>r("fullscreenChanged",{isFullscreen:o}),fullscreenFailed:()=>r("fullscreenFailed"),safeAreaChanged:o=>r("safeAreaChanged",o),contentSafeAreaChanged:o=>r("contentSafeAreaChanged",o),viewportChanged:o=>r("viewportChanged",o),payment_form_submit:o=>r("payment_form_submit",o),share_score:()=>r("share_score"),share_game:()=>r("share_game"),web_app_close:()=>r("web_app_close"),addToHomeScreenRequested:o=>r("addToHomeScreenRequested",{result:o})};e.value.onEvent&&Object.entries(c).forEach(([o,f])=>{e.value.onEvent(o,f)}),e.value.Accelerometer&&(e.value.Accelerometer.onChanged=o=>r("accelerometer_changed",o),e.value.Accelerometer.onFailed=o=>r("accelerometer_failed",{error:o}),e.value.Accelerometer.onStarted=()=>r("accelerometer_started"),e.value.Accelerometer.onStopped=()=>r("accelerometer_stopped")),e.value.DeviceOrientation&&(e.value.DeviceOrientation.onChanged=o=>r("deviceOrientationChanged",o),e.value.DeviceOrientation.onFailed=o=>r("deviceOrientationFailed",{error:o}),e.value.DeviceOrientation.onStarted=()=>r("deviceOrientationStarted"),e.value.DeviceOrientation.onStopped=()=>r("deviceOrientationStopped")),e.value.Gyroscope&&(e.value.Gyroscope.onChanged=o=>r("gyroscopeChanged",o),e.value.Gyroscope.onFailed=o=>r("gyroscopeFailed",{error:o}),e.value.Gyroscope.onStarted=()=>r("gyroscopeStarted"),e.value.Gyroscope.onStopped=()=>r("gyroscopeStopped")),e.value.LocationManager&&(e.value.LocationManager.onUpdated=o=>r("locationManagerUpdated",o),e.value.LocationManager.onRequested=o=>r("locationRequested",{result:o})),e.value.BiometricManager&&(e.value.BiometricManager.onInfoReceived=o=>r("biometry_info_received",o),e.value.BiometricManager.onAuthRequested=o=>r("biometry_auth_requested",{result:o}),e.value.BiometricManager.onTokenUpdated=o=>r("biometry_token_updated",{token:o})),e.value.EmojiStatus&&(e.value.EmojiStatus.onSet=o=>r("emojiStatusSet",{result:o}),e.value.EmojiStatus.onAccessRequested=o=>r("emojiStatusAccessRequested",{result:o})),e.value.HomeScreen&&(e.value.HomeScreen.onAdded=o=>r("homeScreenAdded",{result:o}),e.value.HomeScreen.onChecked=o=>r("homeScreenChecked",{result:o}))},r=(c,o=null)=>{S.value||(_.value={name:c,payload:o},i("trigger-event",{name:c,event:o||{}}))},j=()=>{S.value||(p.value=!p.value)};return N(()=>{B()||q()}),I(()=>t.content.devMode,c=>{c||(p.value=!1)}),{webApp:e,isInitialized:d,showDebugPanel:p,lastEvent:_,webAppVersion:D,platform:F,themeData:k,initData:T,availableFeatures:E,toggleDebugPanel:j,executeAction:(c,...o)=>{if(!e.value||!d.value)return console.error(`Cannot execute action ${c}: Telegram WebApp not initialized`),null;try{if(typeof e.value[c]=="function")return e.value[c](...o);const[f,A]=c.split(".");return e.value[f]&&typeof e.value[f][A]=="function"?e.value[f][A](...o):(console.error(`Action ${c} not found in Telegram WebApp`),null)}catch(f){return console.error(`Error executing action ${c}:`,f),null}}}},methods:{ready(){return this.executeAction("ready")},isVersionAtLeast(t){return this.executeAction("isVersionAtLeast",t)},expand(){return this.executeAction("expand")},close(){return this.executeAction("close")},requestFullscreen(){return this.executeAction("requestFullscreen")},exitFullscreen(){return this.executeAction("exitFullscreen")},lockOrientation(t){return this.executeAction("lockOrientation",t)},unlockOrientation(){return this.executeAction("unlockOrientation")},openLink(t){return this.executeAction("openLink",t)},openTelegramLink(t){return this.executeAction("openTelegramLink",t)},switchInlineQuery(t,i){return this.executeAction("switchInlineQuery",t,i)},disableVerticalSwipes(){return this.executeAction("disableVerticalSwipes")},enableVerticalSwipes(){return this.executeAction("enableVerticalSwipes")},enableClosingConfirmation(){return this.executeAction("enableClosingConfirmation")},disableClosingConfirmation(){return this.executeAction("disableClosingConfirmation")},setHeaderColor(t){return this.executeAction("setHeaderColor",t)},setBackgroundColor(t){return this.executeAction("setBackgroundColor",t)},setBottomBarColor(t){return this.executeAction("setBottomBarColor",t)},showAlert(t,i){return this.executeAction("showAlert",t,i)},showConfirm(t,i){return this.executeAction("showConfirm",t,i)},showPopup(t,i){return this.executeAction("showPopup",t,i)},showScanQrPopup(t){return this.executeAction("showScanQrPopup",t)},closeScanQrPopup(){return this.executeAction("closeScanQrPopup")},openInvoice(t,i){return this.executeAction("openInvoice",t,i)},shareMessage(t){return this.executeAction("shareMessage",t)},shareToStory(t){return this.executeAction("shareToStory",t)},downloadFile(t){return this.executeAction("downloadFile",t)},readTextFromClipboard(t){return this.executeAction("readTextFromClipboard",t)},requestWriteAccess(t){return this.executeAction("requestWriteAccess",t)},requestContact(t){return this.executeAction("requestContact",t)},hideKeyboard(){return this.executeAction("hideKeyboard")},cloudStorageSetItem(t,i){return this.executeAction("CloudStorage.setItem",t,i)},cloudStorageGetItem(t){return this.executeAction("CloudStorage.getItem",t)},cloudStorageRemoveItem(t){return this.executeAction("CloudStorage.removeItem",t)},cloudStorageGetItems(t){return this.executeAction("CloudStorage.getItems",t)},cloudStorageGetKeys(){return this.executeAction("CloudStorage.getKeys")},deviceStorageSetItem(t,i){return this.executeAction("DeviceStorage.setItem",t,i)},deviceStorageGetItem(t){return this.executeAction("DeviceStorage.getItem",t)},deviceStorageRemoveItem(t){return this.executeAction("DeviceStorage.removeItem",t)},deviceStorageClear(){return this.executeAction("DeviceStorage.clear")},secureStorageSetItem(t,i){return this.executeAction("SecureStorage.setItem",t,i)},secureStorageGetItem(t){return this.executeAction("SecureStorage.getItem",t)},secureStorageRestoreItem(t){return this.executeAction("SecureStorage.restoreItem",t)},secureStorageRemoveItem(t){return this.executeAction("SecureStorage.removeItem",t)},secureStorageClear(){return this.executeAction("SecureStorage.clear")},accelerometerStart(){return this.executeAction("Accelerometer.start")},accelerometerStop(){return this.executeAction("Accelerometer.stop")},deviceOrientationStart(){return this.executeAction("DeviceOrientation.start")},deviceOrientationStop(){return this.executeAction("DeviceOrientation.stop")},gyroscopeStart(){return this.executeAction("Gyroscope.start")},gyroscopeStop(){return this.executeAction("Gyroscope.stop")},locationManagerInit(){return this.executeAction("LocationManager.init")},locationManagerGetLocation(){return this.executeAction("LocationManager.getLocation")},locationManagerOpenSettings(){return this.executeAction("LocationManager.openSettings")},biometricManagerInit(){return this.executeAction("BiometricManager.init")},biometricManagerRequestAccess(){return this.executeAction("BiometricManager.requestAccess")},biometricManagerAuthenticate(){return this.executeAction("BiometricManager.authenticate")},biometricManagerUpdateToken(t){return this.executeAction("BiometricManager.updateToken",t)},biometricManagerOpenSettings(){return this.executeAction("BiometricManager.openSettings")},hapticImpactOccurred(t){return this.executeAction("HapticFeedback.impactOccurred",t)},hapticNotificationOccurred(t){return this.executeAction("HapticFeedback.notificationOccurred",t)},hapticSelectionChanged(){return this.executeAction("HapticFeedback.selectionChanged")},emojiStatusSet(t){return this.executeAction("EmojiStatus.set",t)},emojiStatusRequestAccess(){return this.executeAction("EmojiStatus.requestAccess")},homeScreenAddShortcut(t){return this.executeAction("HomeScreen.addShortcut",t)},homeScreenCheckShortcutStatus(){return this.executeAction("HomeScreen.checkShortcutStatus")}}},Ae={class:"telegram-handler"},we={key:0,class:"debug-panel"},_e={class:"debug-header"},Ce={class:"debug-content"},xe={class:"debug-section"},Me={class:"debug-section"},Te={class:"features-grid"},Le={class:"debug-section"},Oe={class:"last-event"},Ie={key:0},De={class:"debug-section"},Fe={class:"debug-section"},Be={key:1,class:"debug-toggle"};function qe(t,i,S,e,d,b){return M(),x("div",Ae,[e.showDebugPanel&&S.content.devMode?(M(),x("div",we,[l("div",_e,[i[2]||(i[2]=l("h3",null,"Telegram WebApp Debug Panel",-1)),l("button",{class:"close-btn",onClick:i[0]||(i[0]=(...p)=>e.toggleDebugPanel&&e.toggleDebugPanel(...p))},"×")]),l("div",Ce,[l("div",xe,[i[3]||(i[3]=l("h4",null,"Status",-1)),l("p",null,"Initialized: "+y(e.isInitialized?"✅":"❌"),1),l("p",null,"Version: "+y(e.webAppVersion),1),l("p",null,"Platform: "+y(e.platform),1)]),l("div",Me,[i[4]||(i[4]=l("h4",null,"Features Available",-1)),l("div",Te,[(M(!0),x(ae,null,re(e.availableFeatures,(p,_)=>(M(),x("div",{key:_,class:"feature-item"},[l("span",null,y(_)+":",1),l("span",{class:ie(p?"available":"unavailable")},y(p?"✅":"❌"),3)]))),128))])]),l("div",Le,[i[6]||(i[6]=l("h4",null,"Last Event",-1)),l("div",Oe,[l("p",null,"Name: "+y(e.lastEvent.name||"None"),1),e.lastEvent.payload?(M(),x("div",Ie,[i[5]||(i[5]=l("p",null,"Payload:",-1)),l("pre",null,y(JSON.stringify(e.lastEvent.payload,null,2)),1)])):z("",!0)])]),l("div",De,[i[7]||(i[7]=l("h4",null,"Theme Data",-1)),l("pre",null,y(JSON.stringify(e.themeData,null,2)),1)]),l("div",Fe,[i[8]||(i[8]=l("h4",null,"Init Data",-1)),l("pre",null,y(JSON.stringify(e.initData,null,2)),1)])])])):z("",!0),S.content.devMode&&!e.showDebugPanel?(M(),x("div",Be,[l("button",{onClick:i[1]||(i[1]=(...p)=>e.toggleDebugPanel&&e.toggleDebugPanel(...p))},"Show Telegram Debug Panel")])):z("",!0)])}const Pe=J(ye,[["render",qe],["__scopeId","data-v-782252f1"]]),ke={name:"LeafletMap",props:{content:{type:Object,required:!0},uid:{type:String,required:!0}},emits:["trigger-event"],setup(t,{emit:i}){const S=g(null),e=g(null),d=g(null),b=g(null),p=u(()=>!1),{value:_,setValue:D}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"selectedMarker",type:"object",defaultValue:null}),{value:F,setValue:k}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"mapCenter",type:"object",defaultValue:u(()=>{var n,a;return{lat:((n=t.content)==null?void 0:n.centerLat)||0,lng:((a=t.content)==null?void 0:a.centerLng)||0}})}),{value:T,setValue:E}=wwLib.wwVariable.useComponentVariable({uid:t.uid,name:"mapZoom",type:"number",defaultValue:u(()=>{var n;return((n=t.content)==null?void 0:n.zoom)||13})}),B=u(()=>{var n;return((n=t.content)==null?void 0:n.centerLat)??48.8566}),q=u(()=>{var n;return((n=t.content)==null?void 0:n.centerLng)??2.3522}),L=u(()=>{var n;return((n=t.content)==null?void 0:n.zoom)??13}),R=u(()=>{var n;return((n=t.content)==null?void 0:n.minZoom)??1}),P=u(()=>{var n;return((n=t.content)==null?void 0:n.maxZoom)??18}),r=u(()=>{var n;return((n=t.content)==null?void 0:n.tileProvider)||"openstreetmap"}),j=u(()=>{var n;return((n=t.content)==null?void 0:n.markers)||[]}),G=u(()=>{var n;return(n=t.content)==null?void 0:n.geoJsonData}),c=u(()=>{var n;return((n=t.content)==null?void 0:n.pathColor)||"#3388ff"}),o=u(()=>{var n;return((n=t.content)==null?void 0:n.pathWeight)??3}),f=u(()=>{var n;return((n=t.content)==null?void 0:n.pathOpacity)??.7}),A=u(()=>{var n;return((n=t.content)==null?void 0:n.pathFillColor)||"#3388ff"}),Z=u(()=>{var n;return((n=t.content)==null?void 0:n.pathFillOpacity)??.2}),H=n=>{const a={openstreetmap:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attribution:"&copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"},terrain:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",attribution:'Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a>'},dark:{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'},light:{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'}};return a[n]||a.openstreetmap},K=()=>{if(!S.value||e.value)return;const n=H(r.value);e.value=h.map(S.value,{center:[B.value,q.value],zoom:L.value,minZoom:R.value,maxZoom:P.value,zoomControl:!0,attributionControl:!0}),h.tileLayer(n.url,{attribution:n.attribution,maxZoom:P.value}).addTo(e.value),d.value=h.layerGroup().addTo(e.value),b.value=h.layerGroup().addTo(e.value),e.value.on("moveend",()=>{if(!e.value)return;const a=e.value.getCenter();k({lat:a.lat,lng:a.lng})}),e.value.on("zoomend",()=>{e.value&&E(e.value.getZoom())}),U(),Q()},$=(n,a,s)=>{if(!n)return h.icon({iconUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",iconRetinaUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png",shadowUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});const v=a||[25,41],w=s||[12,41];return h.icon({iconUrl:n,iconSize:v,iconAnchor:w,popupAnchor:[1,-34]})},U=()=>{if(!d.value)return;d.value.clearLayers(),(j.value||[]).forEach((a,s)=>{const v=(a==null?void 0:a.lat)??(a==null?void 0:a.latitude),w=(a==null?void 0:a.lng)??(a==null?void 0:a.longitude);if(v==null||w==null)return;const V=$(a==null?void 0:a.iconUrl,a==null?void 0:a.iconSize,a==null?void 0:a.iconAnchor),C=h.marker([v,w],{icon:V}),O=(a==null?void 0:a.title)||"",W=(a==null?void 0:a.details)||"";if(O||W){const ne=`
${O?`<div style="font-weight: bold; margin-bottom: 4px;">${O}</div>`:""}
${W?`<div>${W}</div>`:""}
`;C.bindPopup(ne)}C.on("click",()=>{p.value||(D(a),i("trigger-event",{name:"markerClick",event:{value:a,index:s,lat:v,lng:w}}))}),C.addTo(d.value)})},Q=()=>{if(!b.value)return;b.value.clearLayers();const n=G.value;if(n)try{let a=n;typeof n=="string"&&(a=JSON.parse(n));const s={style:{color:c.value,weight:o.value,opacity:f.value,fillColor:A.value,fillOpacity:Z.value},onEachFeature:(v,w)=>{if(v.properties){const V=v.properties;let C="";Object.keys(V).forEach(O=>{C+=`<div><strong>${O}:</strong> ${V[O]}</div>`}),C&&w.bindPopup(C)}w.on("click",()=>{p.value||i("trigger-event",{name:"pathClick",event:{value:v,properties:v.properties||{}}})})}};h.geoJSON(a,s).addTo(b.value)}catch(a){console.error("Error parsing GeoJSON:",a)}},X=()=>{if(!e.value)return;e.value.eachLayer(a=>{a instanceof h.TileLayer&&e.value.removeLayer(a)});const n=H(r.value);h.tileLayer(n.url,{attribution:n.attribution,maxZoom:P.value}).addTo(e.value)},Y=(n,a,s=null)=>{if(!e.value)return;const v=s!==null?s:e.value.getZoom();e.value.setView([n,a],v)},ee=n=>{e.value&&e.value.setZoom(n)},te=()=>{if(!e.value)return;const n=h.latLngBounds([]);let a=!1;d.value&&d.value.eachLayer(s=>{s instanceof h.Marker&&(n.extend(s.getLatLng()),a=!0)}),b.value&&b.value.eachLayer(s=>{s.getBounds&&(n.extend(s.getBounds()),a=!0)}),a&&e.value.fitBounds(n,{padding:[50,50]})},oe=(n,a,s=null)=>{if(!e.value)return;const v=s!==null?s:e.value.getZoom();e.value.flyTo([n,a],v,{duration:1.5})};return I([B,q],()=>{e.value&&e.value.setView([B.value,q.value],e.value.getZoom())}),I(L,()=>{e.value&&e.value.setZoom(L.value)}),I(r,()=>{X()}),I(j,()=>{U()},{deep:!0}),I([G,c,o,f,A,Z],()=>{Q()},{deep:!0}),N(()=>{setTimeout(()=>{K()},100)}),ce(()=>{e.value&&(e.value.remove(),e.value=null)}),{mapContainer:S,selectedMarker:_,mapCenter:F,mapZoom:T,setCenter:Y,setZoom:ee,fitBounds:te,flyTo:oe}}},Ee={class:"leaflet-map-container"},je={ref:"mapContainer",class:"map-element"};function Ve(t,i,S,e,d,b){return M(),x("div",Ee,[l("div",je,null,512)])}const Re=J(ke,[["render",Ve],["__scopeId","data-v-41567664"]]);m.component("wwobject-09576109-3662-4091-91f7-3e5466277049",Pe);m.component("wwobject-14723a21-0178-4d92-a7e9-d1dfeaec29a7",le);m.component("wwobject-1b1e2173-9b78-42cc-a8ee-a6167caea340",se);m.component("wwobject-1ba25bdf-dee9-4e0e-a0b8-b3f3128c3b65",fe);m.component("wwobject-3a7d6379-12d3-4387-98ff-b332bb492a63",he);m.component("wwobject-4ec75f01-3e03-4d63-afe6-ec83bc966298",be);m.component("wwobject-59dca300-db78-42e4-a7a6-0cbf22d3cc82",ue);m.component("wwobject-82374601-4666-40c0-b21e-b78c4d0aa2bc",Re);m.component("wwobject-b783dc65-d528-4f74-8c14-e27c934c39b1",de);m.component("wwobject-bf59c8e7-14c9-4c03-a739-8bd7d14031a4",pe);m.component("wwobject-c6c0c00e-49fd-4cb9-bd78-5bc09945721e",ve);m.component("wwobject-d7904e9d-fc9a-4d80-9e32-728e097879ad",ge);m.component("wwobject-deb10a01-5eef-4aa1-9017-1b51c2ad6fd0",me);m.component("section-99586bd3-2b15-4d6b-a025-6a50d07ca845",Se);