const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DhqJskmm.js","./CmKmn20f.js","./entry.DwJGqJ0y.css"])))=>i.map(i=>d[i]); import{X as Ze,o as R,E as oe,K as ae,a as Le,d as D,j as h,al as M,ac as F,ag as B,eq as Z,a$ as I,bC as G,b0 as qe,p as P,f as z,ad as ne,m as le,a5 as se,et as We,e as Ge,dx as He,F as Q,y as W,x as b,n as $,J as Je,S as me,ai as fe,ae as ve,M as Ke,b5 as Xe}from"./CmKmn20f.js";import{_ as Ye}from"./BK-FDvGT.js";import{u as Qe}from"./CuLMW2x7.js";import{u as et}from"./Dp3q5zSP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cf583ef3-b7d3-45bb-b111-c99abd1dd193",e._sentryDebugIdIdentifier="sentry-dbid-cf583ef3-b7d3-45bb-b111-c99abd1dd193")}catch{}})();const tt={},ot={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},at=ae("path",{d:"M11.3141 18.5377C11.3599 18.5889 11.416 18.6298 11.4788 18.6579C11.5415 18.6859 11.6094 18.7004 11.6781 18.7004C11.7468 18.7004 11.8147 18.6859 11.8775 18.6579C11.9402 18.6298 11.9963 18.5889 12.0421 18.5377C12.3008 18.2407 18.3836 11.1713 18.3836 7.20546C18.3836 5.42706 17.6771 3.7215 16.4196 2.46398C15.1621 1.20647 13.4565 0.5 11.6781 0.5C9.89972 0.5 8.19416 1.20647 6.93664 2.46398C5.67912 3.7215 4.97266 5.42706 4.97266 7.20546C4.97266 11.1713 11.0555 18.2407 11.3141 18.5377ZM9.28331 7.20546C9.28331 6.73181 9.42376 6.2688 9.6869 5.87497C9.95005 5.48115 10.3241 5.1742 10.7617 4.99294C11.1993 4.81169 11.6808 4.76426 12.1453 4.85667C12.6099 4.94907 13.0366 5.17715 13.3715 5.51207C13.7064 5.84699 13.9345 6.27371 14.0269 6.73825C14.1193 7.2028 14.0719 7.68432 13.8906 8.12191C13.7094 8.5595 13.4024 8.93352 13.0086 9.19666C12.6148 9.45981 12.1518 9.60026 11.6781 9.60026C11.043 9.60026 10.4338 9.34795 9.98473 8.89884C9.53562 8.44973 9.28331 7.8406 9.28331 7.20546V7.20546Z",fill:"currentColor"},null,-1),lt=ae("path",{d:"M18.1824 22.5732L15.6822 21.8068C15.6324 21.7923 15.5887 21.7621 15.5577 21.7206C15.5266 21.6792 15.5098 21.6287 15.5098 21.5769C15.5098 21.5251 15.5266 21.4747 15.5577 21.4332C15.5887 21.3918 15.6324 21.3615 15.6822 21.347L18.1824 20.5807C18.3031 20.5442 18.4155 20.4843 18.5131 20.4044C18.6107 20.3245 18.6917 20.2261 18.7513 20.1149C18.8109 20.0037 18.848 19.8819 18.8605 19.7564C18.873 19.6308 18.8606 19.5041 18.8242 19.3833C18.7877 19.2625 18.7278 19.1501 18.6479 19.0525C18.5679 18.9549 18.4696 18.874 18.3584 18.8144C18.2472 18.7548 18.1254 18.7177 17.9998 18.7052C17.8743 18.6927 17.7475 18.705 17.6268 18.7415L11.7451 20.552C11.724 20.5615 11.7012 20.5664 11.6781 20.5664C11.6549 20.5664 11.6321 20.5615 11.611 20.552L5.72937 18.7415C5.47531 18.6678 5.20239 18.6981 4.97065 18.8256C4.73891 18.9532 4.56732 19.1676 4.49365 19.4216C4.41997 19.6757 4.45024 19.9486 4.57778 20.1803C4.70533 20.4121 4.91972 20.5837 5.17377 20.6573L7.67395 21.4237C7.72369 21.4382 7.76739 21.4684 7.79848 21.5099C7.82957 21.5513 7.84638 21.6018 7.84638 21.6536C7.84638 21.7054 7.82957 21.7558 7.79848 21.7973C7.76739 21.8387 7.72369 21.869 7.67395 21.8835L5.17377 22.5732C4.91972 22.61 4.6907 22.7463 4.5371 22.952C4.3835 23.1577 4.31791 23.4159 4.35475 23.67C4.39159 23.9241 4.52784 24.1531 4.73353 24.3067C4.93923 24.4603 5.19751 24.5259 5.45157 24.489C5.54359 24.5037 5.63735 24.5037 5.72937 24.489L11.611 22.6785C11.6321 22.669 11.6549 22.6641 11.6781 22.6641C11.7012 22.6641 11.724 22.669 11.7451 22.6785L17.6268 24.489C17.7188 24.5037 17.8125 24.5037 17.9046 24.489C18.1586 24.5259 18.4169 24.4603 18.6226 24.3067C18.8283 24.1531 18.9645 23.9241 19.0014 23.67C19.0382 23.4159 18.9726 23.1577 18.819 22.952C18.6654 22.7463 18.4364 22.61 18.1824 22.5732V22.5732Z",fill:"currentColor"},null,-1),nt=[at,lt];function rt(e,t){return R(),oe("svg",ot,nt)}const it=Ze(tt,[["render",rt]]),st=()=>{const{n:e}=Le(),{map:t}=et("currency");return{getSearchCamperDisplayPrice:o=>{if(o.final_booking_price)return e(o.final_booking_price,{...t.value[o.final_booking_price_currency],minimumFractionDigits:0,maximumFractionDigits:0});if(o.original_booking_price)return e(o.original_booking_price,{...t.value[o.original_booking_price_currency],minimumFractionDigits:0,maximumFractionDigits:0});if(o.price_per_day)return e(o.price_per_day,{...t.value[o.price_per_day_currency],minimumFractionDigits:0,maximumFractionDigits:0})}}},be=(e,t)=>{for(const a of Object.keys(t))e.on(a,t[a])},Oe=e=>{for(const t of Object.keys(e)){const a=e[t];a&&N(a.cancel)&&a.cancel()}},ut=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),N=e=>typeof e=="function",V=(e,t,a)=>{for(const o in a){const n="set"+ut(o);e[n]?le(()=>a[o],(l,s)=>{e[n](l,s)}):t[n]&&le(()=>a[o],l=>{t[n](l)})}},T=(e,t,a={})=>{const o={...a};for(const n in e){const l=t[n],s=e[n];l&&(l&&l.custom===!0||s!==void 0&&(o[n]=s))}return o},H=e=>{const t={},a={};for(const o in e)if(o.startsWith("on")&&!o.startsWith("onUpdate")&&o!=="onReady"){const n=o.slice(2).toLocaleLowerCase();t[n]=e[o]}else a[o]=e[o];return{listeners:t,attrs:a}},dt=async e=>{const t=await Promise.all([B(()=>import("./LgyxrkTj.js"),[],import.meta.url),B(()=>import("./Db-zmGTI.js"),[],import.meta.url),B(()=>import("./KTL7tNOP.js"),[],import.meta.url)]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},ee=e=>{const t=h((...o)=>console.warn(`Method ${e} has been invoked without being replaced`)),a=(...o)=>t.value(...o);return a.wrapped=t,P(e,a),a},te=(e,t)=>e.wrapped.value=t,j=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,w=e=>{const t=M(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},U=Symbol("useGlobalLeaflet"),J=Symbol("addLayer"),ue=Symbol("removeLayer"),Be=Symbol("registerControl"),we=Symbol("registerLayerControl"),Te=Symbol("canSetParentHtml"),ke=Symbol("setParentHtml"),Re=Symbol("setIcon"),ct=Symbol("bindPopup"),pt=Symbol("bindTooltip"),yt=Symbol("unbindPopup"),mt=Symbol("unbindTooltip"),Y={options:{type:Object,default:()=>({}),custom:!0}},re=e=>({options:e.options,methods:{}}),K={...Y,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},de=(e,t,a)=>{const o=w(J),n=w(ue),{options:l,methods:s}=re(e),i=T(e,K,l),r=()=>o({leafletObject:t.value}),p=()=>n({leafletObject:t.value}),y={...s,setAttribution(c){p(),t.value.options.attribution=c,e.visible&&r()},setName(){p(),e.visible&&r()},setLayerType(){p(),e.visible&&r()},setVisible(c){t.value&&(c?r():p())},bindPopup(c){if(!t.value||!N(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(c)},bindTooltip(c){if(!t.value||!N(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(c)},unbindTooltip(){t.value&&(N(t.value.closeTooltip)&&t.value.closeTooltip(),N(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(N(t.value.closePopup)&&t.value.closePopup(),N(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(c){a.emit("update:visible",c)}};return P(ct,y.bindPopup),P(pt,y.bindTooltip),P(yt,y.unbindPopup),P(mt,y.unbindTooltip),se(()=>{y.unbindPopup(),y.unbindTooltip(),p()}),{options:i,methods:y}},je=(e,t)=>{if(e&&t.default)return G("div",{style:{display:"none"}},t.default())},Ae={...K,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},ft=(e,t,a)=>{const{options:o,methods:n}=de(e,t,a);return{options:T(e,Ae,o),methods:n}},ce={...Ae,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},vt=(e,t,a)=>{const{options:o,methods:n}=ft(e,t,a),l=T(e,ce,o),s=w(ue),i={...n,setStroke(r){t.value.setStyle({stroke:r})},setColor(r){t.value.setStyle({color:r})},setWeight(r){t.value.setStyle({weight:r})},setOpacity(r){t.value.setStyle({opacity:r})},setLineCap(r){t.value.setStyle({lineCap:r})},setLineJoin(r){t.value.setStyle({lineJoin:r})},setDashArray(r){t.value.setStyle({dashArray:r})},setDashOffset(r){t.value.setStyle({dashOffset:r})},setFill(r){t.value.setStyle({fill:r})},setFillColor(r){t.value.setStyle({fillColor:r})},setFillOpacity(r){t.value.setStyle({fillOpacity:r})},setFillRule(r){t.value.setStyle({fillRule:r})},setClassName(r){t.value.setStyle({className:r})}};return ne(()=>{s({leafletObject:t.value})}),{options:l,methods:i}},Pe={...ce,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}},bt=(e,t,a)=>{const{options:o,methods:n}=vt(e,t,a),l=T(e,Pe,o),s={...n,setRadius(i){t.value.setRadius(i)},setLatLng(i){t.value.setLatLng(i)}};return{options:l,methods:s}},Ie={...Pe,radius:{type:Number}},gt=(e,t,a)=>{const{options:o,methods:n}=bt(e,t,a),l=T(e,Ie,o),s={...n};return{options:l,methods:s}},ht=D({name:"LCircle",props:Ie,setup(e,t){const a=h(),o=h(!1),n=M(U),l=w(J),{options:s,methods:i}=gt(e,a,t);return F(async()=>{const{circle:r}=n?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);a.value=Z(r(e.latLng,s));const{listeners:p}=H(t.attrs);a.value.on(p),V(i,a.value,e),l({...e,...i,leafletObject:a.value}),o.value=!0,I(()=>t.emit("ready",a.value))}),{ready:o,leafletObject:a}},render(){return je(this.ready,this.$slots)}}),X={...Y,position:{type:String}},De=(e,t)=>{const{options:a,methods:o}=re(e),n=T(e,X,a),l={...o,setPosition(s){t.value&&t.value.setPosition(s)}};return se(()=>{t.value&&t.value.remove()}),{options:n,methods:l}},_t=e=>e.default?G("div",{ref:"root"},e.default()):null;D({name:"LControl",props:{...X,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const a=h(),o=h(),n=M(U),l=w(Be),{options:s,methods:i}=De(e,a);return F(async()=>{const{Control:r,DomEvent:p}=n?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url),y=r.extend({onAdd(){return o.value}});a.value=Z(new y(s)),V(i,a.value,e),l({leafletObject:a.value}),e.disableClickPropagation&&o.value&&p.disableClickPropagation(o.value),e.disableScrollPropagation&&o.value&&p.disableScrollPropagation(o.value),I(()=>t.emit("ready",a.value))}),{root:o,leafletObject:a}},render(){return _t(this.$slots)}});({...X});const xe={...X,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},Ct=(e,t)=>{const{options:a}=De(e,t);return{options:T(e,xe,a),methods:{addLayer(o){o.layerType==="base"?t.value.addBaseLayer(o.leafletObject,o.name):o.layerType==="overlay"&&t.value.addOverlay(o.leafletObject,o.name)},removeLayer(o){t.value.removeLayer(o.leafletObject)}}}},St=D({name:"LControlLayers",props:xe,setup(e,t){const a=h(),o=M(U),n=w(we),{options:l,methods:s}=Ct(e,a);return F(async()=>{const{control:i}=o?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);a.value=Z(i.layers(void 0,void 0,l)),V(s,a.value,e),n({...e,...s,leafletObject:a.value}),I(()=>t.emit("ready",a.value))}),{leafletObject:a}},render(){return null}});({...X});({...X});const Ee={...K};({...Ee});({...Ee});const pe={...K,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},Ne=(e,t,a)=>{const{options:o,methods:n}=de(e,t,a),l=T(e,pe,o),s={...n,setTileComponent(){var i;(i=t.value)==null||i.redraw()}};return se(()=>{t.value.off()}),{options:l,methods:s}},Lt=(e,t,a,o)=>e.extend({initialize(n){this.tileComponents={},this.on("tileunload",this._unloadTile),a.setOptions(this,n)},createTile(n){const l=this._tileCoordsToKey(n);this.tileComponents[l]=t.create("div");const s=G({setup:o,props:["coords"]},{coords:n});return We(s,this.tileComponents[l]),this.tileComponents[l]},_unloadTile(n){const l=this._tileCoordsToKey(n.coords);this.tileComponents[l]&&(this.tileComponents[l].innerHTML="",this.tileComponents[l]=void 0)}});D({props:{...pe,childRender:{type:Function,required:!0}},setup(e,t){const a=h(),o=h(null),n=h(!1),l=M(U),s=w(J),{options:i,methods:r}=Ne(e,a,t);return F(async()=>{const{GridLayer:p,DomUtil:y,Util:c}=l?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url),m=Lt(p,y,c,e.childRender);a.value=Z(new m(i));const{listeners:f}=H(t.attrs);a.value.on(f),V(r,a.value,e),s({...e,...r,leafletObject:a.value}),n.value=!0,I(()=>t.emit("ready",a.value))}),{root:o,ready:n,leafletObject:a}},render(){return this.ready?G("div",{style:{display:"none"},ref:"root"}):null}});const ge={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},he=D({name:"LIcon",props:{...ge,...Y},setup(e,t){const a=h(),o=M(U),n=w(Te),l=w(ke),s=w(Re);let i,r,p,y,c;const m=(O,v,g)=>{const _=O&&O.innerHTML;if(!v){g&&c&&n()&&l(_);return}const{listeners:k}=H(t.attrs);c&&r(c,k);const{options:q}=re(e),S=T(e,ge,q);_&&(S.html=_),c=S.html?p(S):y(S),i(c,k),s(c)},f=()=>{I(()=>m(a.value,!0,!1))},L=()=>{I(()=>m(a.value,!1,!0))},A={setIconUrl:f,setIconRetinaUrl:f,setIconSize:f,setIconAnchor:f,setPopupAnchor:f,setTooltipAnchor:f,setShadowUrl:f,setShadowRetinaUrl:f,setShadowAnchor:f,setBgPos:f,setClassName:f,setHtml:f};return F(async()=>{const{DomEvent:O,divIcon:v,icon:g}=o?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);i=O.on,r=O.off,p=v,y=g,V(A,{},e),new MutationObserver(L).observe(a.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),f()}),{root:a}},render(){const e=this.$slots.default?this.$slots.default():void 0;return G("div",{ref:"root"},e)}});({...K});function ze(e,t,a){var o,n,l;t===void 0&&(t=50),a===void 0&&(a={});var s=(o=a.isImmediate)!=null&&o,i=(n=a.callback)!=null&&n,r=a.maxWait,p=Date.now(),y=[];function c(){if(r!==void 0){var f=Date.now()-p;if(f+t>=r)return r-f}return t}var m=function(){var f=[].slice.call(arguments),L=this;return new Promise(function(A,O){var v=s&&l===void 0;if(l!==void 0&&clearTimeout(l),l=setTimeout(function(){if(l=void 0,p=Date.now(),!s){var _=e.apply(L,f);i&&i(_),y.forEach(function(k){return(0,k.resolve)(_)}),y=[]}},c()),v){var g=e.apply(L,f);return i&&i(g),A(g)}y.push({resolve:A,reject:O})})};return m.cancel=function(f){l!==void 0&&clearTimeout(l),y.forEach(function(L){return(0,L.reject)(f)}),y=[]},m}const _e={...Y,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},Ot=D({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:_e,setup(e,t){const a=h(),o=qe({ready:!1,layersToAdd:[],layersInControl:[]}),{options:n}=re(e),l=T(e,_e,n),{listeners:s,attrs:i}=H(t.attrs),r=ee(J),p=ee(ue),y=ee(Be),c=ee(we);P(U,e.useGlobalLeaflet);const m=z(()=>{const v={};return e.noBlockingAnimations&&(v.animate=!1),v}),f=z(()=>{const v=m.value;return e.padding&&(v.padding=e.padding),e.paddingTopLeft&&(v.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(v.paddingBottomRight=e.paddingBottomRight),v}),L={moveend:ze(v=>{o.leafletRef&&(t.emit("update:zoom",o.leafletRef.getZoom()),t.emit("update:center",o.leafletRef.getCenter()),t.emit("update:bounds",o.leafletRef.getBounds()))}),overlayadd(v){const g=o.layersInControl.find(_=>_.name===v.name);g&&g.updateVisibleProp(!0)},overlayremove(v){const g=o.layersInControl.find(_=>_.name===v.name);g&&g.updateVisibleProp(!1)}};F(async()=>{e.useGlobalLeaflet&&(j.L=j.L||await B(()=>import("./DhqJskmm.js").then(d=>d.l),__vite__mapDeps([0,1,2]),import.meta.url));const{map:v,CRS:g,Icon:_,latLngBounds:k,latLng:q,stamp:S}=e.useGlobalLeaflet?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);try{l.beforeMapMount&&await l.beforeMapMount()}catch(d){console.error(`The following error occurred running the provided beforeMapMount hook ${d.message}`)}await dt(_);const ie=typeof l.crs=="string"?g[l.crs]:l.crs;l.crs=ie||g.EPSG3857;const x={addLayer(d){d.layerType!==void 0&&(o.layerControl===void 0?o.layersToAdd.push(d):o.layersInControl.find(u=>S(u.leafletObject)===S(d.leafletObject))||(o.layerControl.addLayer(d),o.layersInControl.push(d))),d.visible!==!1&&o.leafletRef.addLayer(d.leafletObject)},removeLayer(d){d.layerType!==void 0&&(o.layerControl===void 0?o.layersToAdd=o.layersToAdd.filter(u=>u.name!==d.name):(o.layerControl.removeLayer(d.leafletObject),o.layersInControl=o.layersInControl.filter(u=>S(u.leafletObject)!==S(d.leafletObject)))),o.leafletRef.removeLayer(d.leafletObject)},registerLayerControl(d){o.layerControl=d,o.layersToAdd.forEach(u=>{o.layerControl.addLayer(u)}),o.layersToAdd=[],y(d)},registerControl(d){o.leafletRef.addControl(d.leafletObject)},setZoom(d){const u=o.leafletRef.getZoom();d!==u&&o.leafletRef.setZoom(d,m.value)},setCrs(d){const u=o.leafletRef.getBounds();o.leafletRef.options.crs=d,o.leafletRef.fitBounds(u,{animate:!1,padding:[0,0]})},fitBounds(d){o.leafletRef.fitBounds(d,f.value)},setBounds(d){if(!d)return;const u=k(d);u.isValid()&&!(o.lastSetBounds||o.leafletRef.getBounds()).equals(u,0)&&(o.lastSetBounds=u,o.leafletRef.fitBounds(u))},setCenter(d){if(d==null)return;const u=q(d),E=o.lastSetCenter||o.leafletRef.getCenter();(E.lat!==u.lat||E.lng!==u.lng)&&(o.lastSetCenter=u,o.leafletRef.panTo(u,m.value))}};te(r,x.addLayer),te(p,x.removeLayer),te(y,x.registerControl),te(c,x.registerLayerControl),o.leafletRef=Z(v(a.value,l)),V(x,o.leafletRef,e),be(o.leafletRef,L),be(o.leafletRef,s),o.ready=!0,I(()=>t.emit("ready",o.leafletRef))}),ne(()=>{Oe(L),o.leafletRef&&(o.leafletRef.off(),o.leafletRef.remove())});const A=z(()=>o.leafletRef),O=z(()=>o.ready);return{root:a,ready:O,leafletObject:A,attrs:i}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),G("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),Bt=["Symbol(Comment)","Symbol(Text)"],wt=["LTooltip","LPopup"],Me={...K,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},Tt=(e,t,a)=>{const{options:o,methods:n}=de(e,t,a),l=T(e,Me,o),s={...n,setDraggable(i){t.value.dragging&&(i?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(i){a.emit("update:latLng",i.latlng),a.emit("update:lat-lng",i.latlng)},setLatLng(i){if(i!=null&&t.value){const r=t.value.getLatLng();(!r||!r.equals(i))&&t.value.setLatLng(i)}}};return{options:l,methods:s}},kt=(e,t)=>{const a=t.slots.default&&t.slots.default();return a&&a.length&&a.some(Rt)};function Rt(e){return!(Bt.includes(e.type.toString())||wt.includes(e.type.name))}const Ce=D({name:"LMarker",props:Me,setup(e,t){const a=h(),o=h(!1),n=M(U),l=w(J);P(Te,()=>{var p;return!!((p=a.value)!=null&&p.getElement())}),P(ke,p=>{var y,c;const m=N((y=a.value)==null?void 0:y.getElement)&&((c=a.value)==null?void 0:c.getElement());m&&(m.innerHTML=p)}),P(Re,p=>{var y;return((y=a.value)==null?void 0:y.setIcon)&&a.value.setIcon(p)});const{options:s,methods:i}=Tt(e,a,t),r={moveHandler:ze(i.latLngSync)};return F(async()=>{const{marker:p,divIcon:y}=n?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);kt(s,t)&&(s.icon=y({className:""})),a.value=Z(p(e.latLng,s));const{listeners:c}=H(t.attrs);a.value.on(c),a.value.on("move",r.moveHandler),V(i,a.value,e),l({...e,...i,leafletObject:a.value}),o.value=!0,I(()=>t.emit("ready",a.value))}),ne(()=>Oe(r)),{ready:o,leafletObject:a}},render(){return je(this.ready,this.$slots)}}),jt={...ce,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},Se={...jt},Fe={...Y,content:{type:String,default:null}};({...Fe});({...Se,latLngs:{...Se.latLngs}});const ye={...pe,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},At=(e,t,a)=>{const{options:o,methods:n}=Ne(e,t,a),l=T(e,ye,o),s={...n};return{options:l,methods:s}},Pt=D({props:ye,setup(e,t){const a=h(),o=M(U),n=w(J),{options:l,methods:s}=At(e,a,t);return F(async()=>{const{tileLayer:i}=o?j.L:await B(()=>import("./CH66TyPC.js"),[],import.meta.url);a.value=Z(i(e.url,l));const{listeners:r}=H(t.attrs);a.value.on(r),V(s,a.value,e),n({...e,...s,leafletObject:a.value}),I(()=>t.emit("ready",a.value))}),{leafletObject:a}},render(){return null}});({...Fe});({...ye});const It={class:"absolute top-0 h-full w-full"},Mt=D({__name:"YscMap",props:{value:{default:void 0},aspect:{default:"aspect-square"},products:{default:()=>[]},isUndetailed:{type:Boolean,default:!1},isDraggable:{type:Boolean,default:!1},showSatellite:{type:Boolean,default:!0},skipFitBounds:{type:Boolean,default:!1},skipWatchFitBounds:{type:Boolean,default:!1},isFakeStatic:{type:Boolean,default:!1}},emits:["input","marker-click"],setup(e,{emit:t}){const a=e,o=t,{t:n}=Le(),{markedItemId:l,hoveredItemId:s}=Ge(Qe()),i=h({lat:null,lng:null}),{getSearchCamperDisplayPrice:r}=st(),p=h(a.isFakeStatic?13:7),y=a.isFakeStatic?{zoomControl:!1,attributionControl:!1,scrollWheelZoom:!1,dragging:!1}:void 0,c=h(),m=z(()=>c.value?c.value.leafletObject:null),{pixelRatio:f}=He(),L=z(()=>f.value>1?"@2x":""),A=z(()=>i.value.lat!==null&&i.value.lng!==null),O=z(()=>{const u={attribution:'© <a href="https://stadiamaps.com/">Stadia Maps</a>',tileSize:256},E=[{name:n("components.ysc_map.street"),visible:!0,url:`https://tiles-eu.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}${L.value}.png`,options:u}];return a.showSatellite&&E.push({name:n("components.ysc_map.street"),visible:!1,url:`https://tiles-eu.stadiamaps.com/tiles/alidade_satellite/{z}/{x}/{y}${L.value}.png`,options:u}),E}),v=()=>{if(a.isDraggable&&m.value&&(m.value.on("drag",q),m.value.on("dragend",S),m.value.on("zoomend",d),m.value.on("click",x)),!a.skipFitBounds&&m.value){if(a.value){g([a.value]);return}if(a.products.length){_();return}m.value.fitWorld()}k()},g=u=>{m.value&&m.value.fitBounds(u)},_=()=>{m.value&&g(a.products.map(u=>[u.vehicle_location_latitude,u.vehicle_location_longitude]))},k=()=>{a.value&&m.value&&(i.value=m.value.getCenter())},q=()=>{k()},S=()=>{const E=c.value.leafletObject.getBounds().getNorthEast().distanceTo(c.value.leafletObject.getCenter());o("input",{cords:i.value,radius:E,center:c.value.leafletObject.getCenter()})},ie=u=>{o("marker-click",u)},x=()=>{a.products.length&&(l.value=null)},d=()=>{k(),S()};return ne(()=>{a.isDraggable&&m.value&&(m.value.off("drag",q),m.value.off("dragend",S),m.value.off("zoomend",d),m.value.off("click",x))}),le(()=>a.value,u=>{u&&(a.skipWatchFitBounds||g([u]),k())}),le(()=>a.products,()=>{a.products.length&&_()}),(u,E)=>{const Ve=it,Ue=Ye,$e=Xe;return R(),oe("div",{class:ve(["ysc-map relative w-full",u.aspect])},[ae("div",It,[Q($e,null,{default:W(()=>[Q(b(Ot),{ref_key:"map",ref:c,"min-zoom":3,zoom:b(p),"max-zoom":u.isUndetailed?13:18,center:u.value||[0,0],options:b(y),"use-global-leaflet":!1,onReady:v},{default:W(()=>[b(O).length>1?(R(),$(b(St),{key:0,position:"bottomleft"})):Je("",!0),(R(!0),oe(me,null,fe(b(O),C=>(R(),$(b(Pt),{key:C.name,name:C.name,visible:C.visible,options:C.options,url:C.url,attribution:C.options.attribution,"tile-size":C.options.tileSize,"layer-type":"base"},null,8,["name","visible","options","url","attribution","tile-size"]))),128)),b(A)&&u.isUndetailed?(R(),$(b(ht),{key:1,ref:"circle","lat-lng":b(i),radius:750,options:{className:"text-pink-500 fill-current stroke-current stroke-1",interactive:!1}},null,8,["lat-lng"])):b(A)&&!u.products.length?(R(),$(b(Ce),{key:2,"lat-lng":b(i),options:{interactive:!1}},{default:W(()=>[Q(b(he),{"icon-size":[32,32],"icon-anchor":[16,32]},{default:W(()=>[u.isDraggable?(R(),$(Ve,{key:0,class:"h-full w-full text-black"})):(R(),$(Ue,{key:1,class:"h-full w-full text-pink-500"}))]),_:1})]),_:1},8,["lat-lng"])):(R(!0),oe(me,{key:3},fe(u.products,C=>(R(),$(b(Ce),{key:`product-${C.id}`,"lat-lng":[C.vehicle_location_latitude,C.vehicle_location_longitude],onClick:Dt=>ie(C)},{default:W(()=>[Q(b(he),{"icon-size":[53,33],"icon-anchor":[0,16]},{default:W(()=>[ae("span",{class:ve(["search-marker relative whitespace-nowrap rounded border border-gray-300 bg-white font-semibold text-black transition-all hover:bg-black hover:text-white",{"marked-item":b(l)===C.id||b(s)===C.id,"px-2.5 py-1.5 text-base":b(p)>=8,"px-1.5 py-1 text-sm":b(p)<8}])},Ke(b(r)(C)),3)]),_:2},1024)]),_:2},1032,["lat-lng","onClick"]))),128))]),_:1},8,["zoom","max-zoom","center","options"])]),_:1})])],2)}}});export{Mt as _}; //# sourceMappingURL=D8mWcmYR.js.map