1import{a8 as Wo,_ as Go,a1 as nt,a3 as Ko,Y as st,af as Ho,c as Be}from"./vue-sonner-DDsQ13aw.js";import{n as Ze,b as at,e as Qo,l as V}from"./site-B5BZOBvc.js";import{r as F,a as Xo,d as Fe,b as me,n as $,i as O,Q as v,U as le,H as q,V as je,x as X,G as ye,u as b,R as ie,F as Y,q as te,o as Ut,a7 as Yo,z as ot,a8 as Nt,g as Ue,j as Ne,p as Ve}from"./tailwind-zaRMLzvT.js";import{S as Jo,L as en}from"./search-C3qcYn1f.js";import{r as tn}from"./index-1OfOZwAP.js";import{X as rn}from"./x-CE-ELC_A.js";import"./vue.esm-bundler-BQEhA1XK.js";import"./compiler-dom.esm-bundler-CuYavsf8.js";import"./PopoverTrigger-BaEuxe5d.js";import"./PopperArrow-Bu4UFnR3.js";import"./money-CAlUuNCF.js";import"./TabsTrigger-CGV7yd66.js";import"./check-BSANhuA6.js";import"./index.esm-C5Q4iU_x.js";import"./pencil-lWNaaoFU.js";import"./circle-check-yge9GZGF.js";import"./DialogTitle-u17PkhKS.js";import"./DialogDescription-CxqFoTgs.js";import"./DialogTrigger-qerA61Q7.js";import"./mitt-DJ65BbbF.js";const De=Wo("location",()=>{const L=Go(),k=Ze(),w=at(),a=F([]),N=5,M=F(0),T=F(!1),C=F("basis"),E=F(""),z=F(0),K=F(0),j=F("list"),S=Xo({timeout:null,abort:null}),P=()=>K.value>=N,H=async(I=!1)=>new Promise((xe,ge)=>{S.abort!==null&&S.abort.abort(),S.abort=new AbortController;try{const Q=w.toUrlString(null,!1,!0);Qo().post(`/site/locations/search/${Q}`,{lang:L.currentIso(),all:T.value},{signal:S.abort.signal}).then(re=>{var Pe;D(re.data.data),k.setLatLon(re.data.lat,re.data.lon),M.value=re.data.total_count,xe(re.data.data),I&&((Pe=document.getElementById("locaties"))==null||Pe.scrollIntoView({behavior:"smooth"}))})}catch(Q){ge(Q)}}),D=I=>{a.value=I};return{layout:j,locations:a,initialCount:N,totalCount:M,toggleAll:T,toggleRecurringModules:C,selectedCategory:E,collapsedLocationId:z,setCollapsedLocationId:I=>{z.value=I},setRecurringModules:I=>{C.value=I,w.setFilterValue("variant",I,!0)},setSelectedCategory:I=>{E.value=I,w.setFilterValue("cursus",E.value,!0)},setLayout:I=>{j.value=I,T.value=j.value==="map",H()},hasMoreResults:P,getLocations:H,setLocations:D,setCount:I=>{K.value=I},getProductSlugForOverview:(I,xe)=>{const ge=w.toUrlString(null,!1,!1),Q=new URLSearchParams;return ge.length===0?(Q.set("plaats",xe),Q.set("straal",w.defaultRadius),`/${I.full_slug}/?${Q.toString()}#beschikbare-data`):`/${I.full_slug}/${ge}#beschikbare-data`}}}),on={class:"rounded-md border border-gray-200 bg-white"},nn={class:"flex flex-row gap-0 lg:gap-4"},sn={class:"w-28 shrink-0 sm:w-36 lg:w-3/12 hidden md:block"},an=["src","alt"],ln={class:"flex flex-1 items-center justify-between gap-4 p-4 lg:justify-center lg:p-5"},un={class:"min-w-0 lg:w-full"},cn={class:"flex w-fit flex-row items-center gap-3"},dn={class:"text-lg font-extrabold leading-7"},pn=["innerHTML"],mn={class:"flex w-fit flex-col gap-1 lg:flex-row lg:items-center lg:gap-6"},fn={class:"mt-2 min-w-inherit lg:min-w-50 flex items-center gap-2 text-sm lg:text-base font-semibold"},hn=["aria-expanded"],gn={class:"grid gap-0 bg-white lg:grid-cols-4 lg:gap-8 px-4 lg:px-0"},vn={class:"py-5 px-2 lg:p-6"},yn={class:"mb-1 block font-extrabold"},bn={class:"text-gray-700"},wn={class:"grid gap-5 px-2 py-5 border-t border-gray-300 lg:col-span-3 lg:ml-7 lg:mr-7 lg:grid-cols-3 lg:gap-2 lg:px-0 lg:px-6 lg:py-6"},xn=["textContent"],kn={class:"space-y-1"},Cn=["href","textContent"],_n=Fe({__name:"Location",props:{courseLocation:{},showDistance:{type:Boolean},categories:{}},setup(L){const k=L,w=De();at();const a=T=>{var C;return st.filter((C=k.courseLocation)==null?void 0:C.products,E=>E.category_id===T)},N=me(()=>k.categories.filter(T=>a(T.id).length>0)),M=me({get:()=>w.collapsedLocationId,set:T=>w.setCollapsedLocationId(T)});return(T,C)=>(O(),$("article",on,[v("div",nn,[v("div",sn,[v("img",{src:L.courseLocation.image_url,class:"h-full min-h-28 w-full object-cover lg:h-full",alt:L.courseLocation.name},null,8,an)]),v("div",ln,[v("div",un,[v("div",cn,[v("div",dn,q(L.courseLocation.name),1),le(v("span",{class:"hidden rounded-full bg-gray-100 px-3 py-0.5 text-center text-xs font-semibold lg:inline-block"},q(L.courseLocation.distance)+" KM ",513),[[je,L.courseLocation.distance>0&&L.showDistance]])]),v("div",{class:"mt-2 mb-2 hidden text-gray-700 lg:block",innerHTML:L.courseLocation.description_overview},null,8,pn),v("div",mn,[v("div",fn,[X(b(nt),{class:"h-5 w-5 text-primary"}),ye(" "+q(L.courseLocation.city),1)]),M.value===L.courseLocation.id?(O(),$("button",{key:0,onClick:C[0]||(C[0]=E=>M.value=0),class:"mt-3 hidden items-center gap-2 rounded-md border border-primary bg-transparent px-5 py-2 font-semibold text-primary transition hover:bg-primary hover:text-white lg:inline-flex"},q(b(V)("site.location.hide_courses")),1)):(O(),$("button",{key:1,onClick:C[1]||(C[1]=E=>M.value=L.courseLocation.id),class:"mt-3 hidden items-center gap-2 rounded-md bg-primary px-5 py-2 font-semibold text-white transition hover:bg-primary-400 lg:inline-flex"},q(b(V)("site.location.show_courses")),1))])]),v("button",{type:"button",onClick:C[2]||(C[2]=E=>M.value=M.value===L.courseLocation.id?0:L.courseLocation.id),class:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-gray-100 transition hover:bg-gray-200 lg:hidden","aria-expanded":M.value===L.courseLocation.id},[X(b(Ko),{class:ie(["h-5 w-5 transition-transform duration-200",{"rotate-180":M.value===L.courseLocation.id}])},null,8,["class"])],8,hn)])]),le(v("div",gn,[v("div",vn,[v("span",yn,q(b(V)("site.location.address")),1),v("p",bn,[ye(q(L.courseLocation.address),1),C[3]||(C[3]=v("br",null,null,-1)),ye(" "+q(L.courseLocation.postal)+" "+q(L.courseLocation.city),1)])]),v("div",wn,[(O(!0),$(Y,null,te(N.value,E=>(O(),$("div",{key:E.id},[v("h4",{class:"mb-2 font-extrabold",textContent:q(E.title)},null,8,xn),v("ul",kn,[(O(!0),$(Y,null,te(a(E.id),z=>(O(),$("li",{key:z.id},[v("a",{href:b(w).getProductSlugForOverview(z,L.courseLocation.city),class:"text-gray-700 no-underline transition hover:text-primary",textContent:q(z.name)},null,8,Cn)]))),128))])]))),128))])],512),[[je,M.value===L.courseLocation.id]])]))}}),Mn={class:"flex flex-wrap items-center gap-3"},Ln={class:"relative w-full lg:w-auto"}
1,Sn=["placeholder"],En=["onClick"],On={value:"0"},jn=["value"],Pn={value:""},qn=["value","textContent"],$n={class:"flex items-center overflow-hidden gap-3"},Tn={class:"flex items-center gap-3 ml-auto"},An=Fe({__name:"LocationFilter",props:{categories:{},filters:{}},setup(L){const k=L,w=De(),a=Ze();at();const N=me({get:()=>a.searchQuery,set:j=>{z.value=!0,a.setSearchQuery(j,!0)}}),M=me({get:()=>a.radius,set:j=>a.setRadius(j)}),T=me({get:()=>w.selectedCategory,set:j=>w.setSelectedCategory(j)}),C=me({get:()=>w.toggleRecurringModules,set:j=>w.setRecurringModules(j)}),E=()=>{a.resetFilters(),w.getLocations()};Ut(()=>{Object.keys(k.filters).length>0?(Object.hasOwn(k.filters,"plaats")&&a.initLocationFromQuery(k.filters.plaats),Object.hasOwn(k.filters,"straal")&&a.setRadius(k.filters.straal,!1),Object.hasOwn(k.filters,"cursus")&&(T.value=k.filters.cursus),Object.hasOwn(k.filters,"variant")&&(C.value=k.filters.variant)):a.setStorageFilters()});const z=F(!1),K=F(null);return Ho(K,j=>{z.value=!1}),(j,S)=>(O(),$("div",Mn,[v("div",Ln,[X(b(nt),{class:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),le(v("input",{type:"text","onUpdate:modelValue":S[0]||(S[0]=P=>N.value=P),placeholder:b(V)("site.location.filter.city"),class:"h-10 rounded-md border border-gray-300 pl-9 pr-4 w-full lg:w-64 text-sm focus:border-primary focus:ring-primary"},null,8,Sn),[[Yo,N.value]]),le(v("div",{class:"w-full absolute bg-gray-50 shadow-xl rounded-xl",ref_key:"target",ref:K},[(O(!0),$(Y,null,te(b(a).locationPredictions,P=>(O(),$("div",{class:"w-full py-2 px-4 border-t border-gray-200 bg-gray-100 cursor-pointer",onClick:ot(H=>{b(a).selectLocation(P)},["prevent"])},q(P.location),9,En))),256))],512),[[je,z.value]])]),le(v("select",{"onUpdate:modelValue":S[1]||(S[1]=P=>M.value=P),class:"h-10 w-full lg:w-40 rounded-md text-gray-600 border border-gray-300 px-4 pr-10 text-sm focus:border-primary focus:ring-primary"},[v("option",On,q(b(V)("site.location.filter.radius")),1),(O(!0),$(Y,null,te(b(a).radiusOptions,(P,H)=>(O(),$("option",{value:H},q(P),9,jn))),256))],512),[[Nt,M.value]]),le(v("select",{class:"h-10 w-full lg:w-50 rounded-md border border-gray-300 text-gray-600 px-4 pr-10 text-sm focus:border-primary focus:ring-primary","onUpdate:modelValue":S[2]||(S[2]=P=>T.value=P)},[v("option",Pn,q(b(V)("site.location.filter.type")),1),(O(!0),$(Y,null,te(L.categories,P=>(O(),$("option",{key:P.slug,value:P.slug,textContent:q(P.title)},null,8,qn))),128))],512),[[Nt,T.value]]),v("div",$n,[v("button",{class:ie(["lg:h-10 h-10 px-3 lg:md-6 text-xs lg:text-sm font-semibold transition rounded-md",{"bg-primary text-white":C.value==="basis","bg-gray-50 hover:bg-gray-100":C.value!=="basis"}]),onClick:S[3]||(S[3]=P=>{C.value="basis"})},q(b(V)("site.product.overview.filter.basic")),3),v("button",{class:ie(["lg:h-10 h-10 px-3 lg:md-6 text-xs lg:text-sm font-semibold transition rounded-md",{"bg-primary text-white":C.value==="herhaling","bg-gray-50 hover:bg-gray-100":C.value!=="herhaling"}]),onClick:S[4]||(S[4]=P=>{C.value="herhaling"})},q(b(V)("site.product.overview.filter.group")),3)]),v("button",{onClick:S[5]||(S[5]=ot(P=>b(w).getLocations(!0),["prevent"])),class:"flex h-10 w-10 items-center justify-center rounded-md border border-primary text-primary hover:bg-primary hover:text-white transition"},[X(b(Jo),{class:"h-4 w-4"})]),v("div",Tn,[v("button",{onClick:S[6]||(S[6]=ot(P=>E(),["prevent"])),class:"h-10 rounded-md border border-gray-300 px-2 text-xs font-semibold text-gray-700 hover:bg-gray-100 transition"},q(b(V)("site.location.filter.reset")),1)])]))}}),In="/build/assets/maps-icon-BpCpzB5s.svg";var Oe={exports:{}},Rn=Oe.exports,zt;function Bn(){return zt||(zt=1,(function(L,k){(function(){var w;try{if(typeof document<"u"){var a=document.createElement("style");a.nonce=(w=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:w.content,a.appendChild(document.createTextNode(".mapdiv[data-v-c6aa3e71]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ae91c15f]{display:none}.mapdiv .custom-control-wrapper[data-v-ae91c15f]{display:inline-block}.info-window-wrapper[data-v-5660e752]{display:none}.mapdiv .info-window-wrapper[data-v-5660e752]{display:inline-block}.custom-marker-wrapper[data-v-90fe8380]{display:none}.mapdiv .custom-marker-wrapper[data-v-90fe8380]{display:inline-block}")),document.head.appendChild(a)}}catch(N){console.error("vite-plugin-css-injected-by-js",N)}})(),(function(w,a){a(k,tn())})(Rn,function(w,a){var N=Object.defineProperty,M=(t,e,r)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,T=(t,e,r)=>(M(t,typeof e!="symbol"?e+"":e,r),r);const C=Symbol("map"),E=Symbol("api"),z=Symbol("marker"),K=Symbol("markerCluster"),j=Symbol("CustomMarker"),S=Symbol("mapTilesLoaded"),P=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function H(t,e){t.src=e}const D=t=>{var e,r,o,n="The Google Maps JavaScript API",s="google",l="importLibrary",u="__ib__",i=document,d=window,m=d[s]||(d[s]={}),c=m.maps||(m.maps={}),f=new Set,p=new URLSearchParams,g=()=>e||(e=new Promise(async(h,y)=>{var x;await(r=i.createElement("script")),p.set("libraries",[...f]+"");for(o in t)p.set(o.replace(/[A-Z]/g,_=>"_"+_[0].toLowerCase()),t[o]);p.set("callback",s+".maps."+u),H(r,"https://maps.googleapis.com/ma
1ps/api/js?"+p),c[u]=h,r.onerror=()=>e=y(Error(n+" could not load.")),r.nonce=((x=i.querySelector("script[nonce]"))==null?void 0:x.nonce)||"",i.head.append(r)}));c[l]?console.warn(n+" only loads once. Ignoring:",t):c[l]=(h,...y)=>f.add(h)&&g().then(()=>c[l](h,...y))},ue=t=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(t)}) will be ignored.`,fe=t=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(t)}) will be ignored.`,be=()=>{},we=()=>{};let he=!1;function J(t){if(he){be(ue(t));return}xe(t),he=!0}async function I(t){var e,r;if(!((r=(e=window==null?void 0:window.google)==null?void 0:e.maps)!=null&&r.importLibrary))throw new Error("google.maps.importLibrary is not installed.");return await google.maps.importLibrary(t)}function xe(t){var e,r;const o=!!((r=(e=window.google)==null?void 0:e.maps)!=null&&r.importLibrary);o&&we(fe(t)),o||D(t)}function ge(t){return class extends t.OverlayView{constructor(e){super(),T(this,"element"),T(this,"opts");const{element:r,...o}=e;this.element=r,this.opts=o,this.opts.map&&this.setMap(this.opts.map)}getPosition(){return this.opts.position?this.opts.position instanceof t.LatLng?this.opts.position:new t.LatLng(this.opts.position):null}getVisible(){if(!this.element)return!1;const e=this.element;return e.style.display!=="none"&&e.style.visibility!=="hidden"&&(e.style.opacity===""||Number(e.style.opacity)>.01)}onAdd(){if(!this.element)return;const e=this.getPanes();e&&e.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const e=this.getProjection(),r=e==null?void 0:e.fromLatLngToDivPixel(this.getPosition());if(r){this.element.style.position="absolute";let o,n;switch(this.opts.anchorPoint){case"TOP_CENTER":o="-50%",n="-100%";break;case"BOTTOM_CENTER":o="-50%",n="0";break;case"LEFT_CENTER":o="-100%",n="-50%";break;case"RIGHT_CENTER":o="0",n="-50%";break;case"TOP_LEFT":o="-100%",n="-100%";break;case"TOP_RIGHT":o="0",n="-100%";break;case"BOTTOM_LEFT":o="-100%",n="0";break;case"BOTTOM_RIGHT":o="0",n="0";break;default:o="-50%",n="-50%"}const s=r.x+(this.opts.offsetX||0)+"px",l=r.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${o}) translateX(${s}) translateY(${n}) translateY(${l})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(e){const{element:r,...o}=e;this.element=r,this.opts=o,this.draw()}}}let Q=!1;const re=["bounds_changed","center_changed","click","contextmenu","dblclick","drag","dragend","dragstart","heading_changed","idle","isfractionalzoomenabled_changed","mapcapabilities_changed","maptypeid_changed","mousemove","mouseout","mouseover","projection_changed","renderingtype_changed","rightclick","tilesloaded","tilt_changed","zoom_changed"],Pe=a.defineComponent({props:{apiPromise:{type:Promise},apiKey:{type:String,default:""},version:{type:String,default:"weekly"},libraries:{type:Array,default:()=>["places","marker"]},region:{type:String,required:!1},language:{type:String,required:!1},backgroundColor:{type:String,required:!1},center:{type:Object,default:()=>({lat:0,lng:0})},clickableIcons:{type:Boolean,required:!1,default:void 0},colorScheme:{type:String,required:!1},controlSize:{type:Number,required:!1},disableDefaultUi:{type:Boolean,required:!1,default:void 0},disableDoubleClickZoom:{type:Boolean,required:!1,default:void 0},draggable:{type:Boolean,required:!1,default:void 0},draggableCursor:{type:String,required:!1},draggingCursor:{type:String,required:!1},fullscreenControl:{type:Boolean,required:!1,default:void 0},fullscreenControlPosition:{type:String,required:!1},gestureHandling:{type:String,required:!1},heading:{type:Number,required:!1},isFractionalZoomEnabled:{type:Boolean,required:!1,default:void 0},keyboardShortcuts:{type:Boolean,required:!1,default:void 0},mapTypeControl:{type:Boolean,required:!1,default:void 0},mapTypeControlOptions:{type:Object,required:!1},mapTypeId:{type:[Number,String],required:!1},mapId:{type:String,required:!1},maxZoom:{type:Number,required:!1},minZoom:{type:Number,required:!1},noClear:{type:Boolean,required:!1,default:void 0},panControl:{type:Boolean,required:!1,default:void 0},panControlPosition:{type:String,required:!1},restriction:{type:Object,required:!1},rotateControl:{type:Boolean,required:!1,default:void 0},rotateControlPosition:{type:String,required:!1},scaleControl:{type:Boolean,required:!1,default:void 0},scaleControlStyle:{type:Number,required:!1},scrollwheel:{type:Boolean,required:!1,default:void 0},streetView:{type:Object,required:!1},streetViewControl:{type:Boolean,required:!1,default:void 0},streetViewControlPosition:{type:String,required:!1},styles:{type:Array,required:!1},tilt:{type:Number,required:!1},zoom:{type:Number,required:!1},zoomControl:{type:Boolean,required:!1,default:void 0},zoomControlPosition:{type:String,required:!1},cameraControl:{type:Boolean,required:!1,default:void 0},cameraControlPosition:{type:String,required:!1}},emits:re,setup(t,{emit:e}){const r=a.ref(),o=a.ref(!1),n=a.ref(),s=a.ref(),l=a.ref(!1);a.provide(C,n),a.provide(E,s),a.provide(S,l);const u=()=>{const c={...t};
1Object.keys(c).forEach(g=>{c[g]===void 0&&delete c[g]});const f=g=>{var h;return g?{position:(h=s.value)==null?void 0:h.ControlPosition[g]}:{}},p={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:f(t.panControlPosition),zoomControlOptions:f(t.zoomControlPosition),rotateControlOptions:f(t.rotateControlPosition),streetViewControlOptions:f(t.streetViewControlPosition),fullscreenControlOptions:f(t.fullscreenControlPosition),cameraControlOptions:f(t.cameraControlPosition),disableDefaultUI:t.disableDefaultUi};return{...c,...p}},i=a.watch([s,n],([c,f])=>{const p=c,g=f;p&&g&&(p.event.addListenerOnce(g,"tilesloaded",()=>{l.value=!0}),setTimeout(i,0))},{immediate:!0}),d=()=>{const{apiKey:c,region:f,version:p,language:g,libraries:h}=t;J({key:c,region:f,v:p,language:g,libraries:h})},m=c=>{const f=c?c.maps:google.maps;s.value=a.markRaw(f),n.value=a.markRaw(new f.Map(r.value,u()));const p=ge(s.value);s.value[j]=p,re.forEach(h=>{var y;(y=n.value)==null||y.addListener(h,x=>e(h,x))}),o.value=!0;const g=Object.keys(t).filter(h=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(h)).map(h=>a.toRef(t,h));a.watch([()=>t.center,()=>t.zoom,...g],([h,y],[x,_])=>{var B,W,Z;const{center:A,zoom:R,...G}=u();(B=n.value)==null||B.setOptions(G),y!==void 0&&y!==_&&((W=n.value)==null||W.setZoom(y));const pe=!x||h.lng!==x.lng||h.lat!==x.lat;h&&pe&&((Z=n.value)==null||Z.panTo(h))})};return a.onMounted(()=>{if(t.apiPromise&&t.apiPromise instanceof Promise)t.apiPromise.then(m);else{Q||(d(),Q=!0);const c=t.libraries&&t.libraries.length>0?t.libraries:["maps","marker"];Promise.all(c.map(f=>I(f))).then(()=>m())}}),a.onBeforeUnmount(()=>{var c;l.value=!1,n.value&&((c=s.value)==null||c.event.clearInstanceListeners(n.value))}),{mapRef:r,ready:o,map:n,api:s,mapTilesLoaded:l}}}),ke=(t,e)=>{const r=t.__vccOpts||t;for(const[o,n]of e)r[o]=n;return r},Vt={ref:"mapRef",class:"mapdiv"};function Zt(t,e,r,o,n,s){return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",Vt,null,512),a.renderSlot(t.$slots,"default",a.normalizeProps(a.guardReactiveProps({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0,!0)])}const Ft=ke(Pe,[["render",Zt],["__scopeId","data-v-c6aa3e71"]]);function Dt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wt=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,n,s;if(Array.isArray(e)){if(o=e.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),o=s.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[n]))return!1;for(n=o;n--!==0;){var l=s[n];if(!t(e[l],r[l]))return!1}return!0}return e!==e&&r!==r};const Ce=Dt(Wt),it=["click","drag","dragend","dragstart","gmp-click"],Gt=a.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:it,setup(t,{emit:e,expose:r,slots:o}){const n=a.ref(),s=a.computed(()=>{var p;return(p=o.content)==null?void 0:p.call(o).some(g=>g.type!==a.Comment)}),l=a.toRef(t,"options"),u=a.toRef(t,"pinOptions"),i=a.ref(),d=a.inject(C,a.ref()),m=a.inject(E,a.ref()),c=a.inject(K,a.ref()),f=a.computed(()=>!!(c.value&&m.value&&i.value instanceof google.maps.marker.AdvancedMarkerElement));return a.watch([d,l,u,n],async(p,[g,h,y,x])=>{var _,B,W;const Z=!Ce(l.value,h)||!Ce(u.value,y),A=n.value!==x,R=Z||A||d.value!==g;if(!d.value||!m.value||!R||s.value&&!n.value)return;const{AdvancedMarkerElement:G,PinElement:pe}=m.value.marker;if(i.value){const{map:tt,content:Re,...rt}=l.value;Object.assign(i.value,{content:s.value?n.value:u.value?new pe(u.value).element:Re,...rt}),f.value&&((_=c.value)==null||_.removeMarker(i.value),(B=c.value)==null||B.addMarker(i.value))}else s.value?l.value.content=n.value:u.value&&(l.value.content=new pe(u.value).element),i.value=a.markRaw(new G(l.value)),f.value?(W=c.value)==null||W.addMarker(i.value):i.value.map=d.value,it.forEach(tt=>{var Re;(Re=i.value)==null||Re.addListener(tt,rt=>e(tt,rt))})},{immediate:!0,flush:"post"}),a.onBeforeUnmount(()=>{var p,g;i.value&&((p=m.value)==null||p.event.clearInstanceListeners(i.value),f.value?(g=c.value)==null||g.removeMarker(i.value):i.value.map=null)}),a.provide(z,i),r({marker:i}
1),{hasCustomSlotContent:s,markerRef:n}}}),Kt={key:0,class:"advanced-marker-wrapper"};function Ht(t,e,r,o,n,s){return a.openBlock(),a.createElementBlock(a.Fragment,null,[t.hasCustomSlotContent?(a.openBlock(),a.createElementBlock("div",Kt,[a.createElementVNode("div",a.mergeProps({ref:"markerRef"},t.$attrs),[a.renderSlot(t.$slots,"content")],16)])):a.createCommentVNode("v-if",!0),a.renderSlot(t.$slots,"default")],64)}const Qt=ke(Gt,[["render",Ht]]),lt=t=>t==="Marker",ut=t=>t===j,ve=(t,e,r,o)=>{const n=a.ref(),s=a.inject(C,a.ref()),l=a.inject(E,a.ref()),u=a.inject(K,a.ref()),i=a.computed(()=>!!(u.value&&l.value&&(n.value instanceof l.value.Marker||n.value instanceof l.value[j])));return a.watch([s,r],(d,[m,c])=>{var f,p,g;const h=!Ce(r.value,c)||s.value!==m;if(!(!s.value||!l.value||!h))if(n.value)n.value.setOptions(r.value),i.value&&((f=u.value)==null||f.removeMarker(n.value),(p=u.value)==null||p.addMarker(n.value));else{if(lt(t))n.value=a.markRaw(new l.value[t](r.value));else if(ut(t)){const y=r.value;y.element&&(n.value=a.markRaw(new l.value[t](y)))}else n.value=a.markRaw(new l.value[t]({...r.value,map:s.value}));n.value&&(i.value?(g=u.value)==null||g.addMarker(n.value):(lt(t)||ut(t))&&n.value.setMap(s.value)),e.forEach(y=>{var x;(x=n.value)==null||x.addListener(y,_=>o(y,_))})}},{immediate:!0,flush:"post"}),a.onBeforeUnmount(()=>{var d,m;n.value&&((d=l.value)==null||d.event.clearInstanceListeners(n.value),i.value?(m=u.value)==null||m.removeMarker(n.value):n.value.setMap(null))}),n},ct=["animation_changed","click","dblclick","rightclick","dragstart","dragend","drag","mouseover","mousedown","mouseout","mouseup","draggable_changed","clickable_changed","contextmenu","cursor_changed","flat_changed","zindex_changed","icon_changed","position_changed","shape_changed","title_changed","visible_changed"],Xt=a.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ct,setup(t,{emit:e,expose:r,slots:o}){const n=a.toRef(t,"options"),s=ve("Marker",ct,n,e);return a.provide(z,s),r({marker:s}),()=>{var l;return(l=o.default)==null?void 0:l.call(o)}}}),Yt=a.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:P,setup(t,{emit:e}){const r=a.toRef(t,"options");return{polyline:ve("Polyline",P,r,e)}},render:()=>null}),Jt=a.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:P,setup(t,{emit:e}){const r=a.toRef(t,"options");return{polygon:ve("Polygon",P,r,e)}},render:()=>null}),dt=P.concat(["bounds_changed"]),er=a.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:dt,setup(t,{emit:e}){const r=a.toRef(t,"options");return{rectangle:ve("Rectangle",dt,r,e)}},render:()=>null}),pt=P.concat(["center_changed","radius_changed"]),tr=a.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:pt,setup(t,{emit:e}){const r=a.toRef(t,"options");return{circle:ve("Circle",pt,r,e)}},render:()=>null}),rr=a.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(t,{emit:e}){const r=a.ref(null),o=a.inject(C,a.ref()),n=a.inject(E,a.ref()),s=a.inject(S,a.ref(!1)),l=a.watch([s,n,r],([d,m,c])=>{m&&d&&c&&(u(t.position),e("content:loaded"),setTimeout(l,0))},{immediate:!0}),u=d=>{if(o.value&&n.value&&r.value){const m=n.value.ControlPosition[d];r.value.index=t.index,o.value.controls[m].push(r.value)}},i=d=>
1{if(o.value&&n.value){let m=null;const c=n.value.ControlPosition[d];o.value.controls[c].forEach((f,p)=>{f===r.value&&(m=p)}),m!==null&&o.value.controls[c].removeAt(m)}};return a.onBeforeUnmount(()=>i(t.position)),a.watch(()=>t.position,(d,m)=>{i(m),u(d)}),a.watch(()=>t.index,d=>{r.value&&(r.value.index=d)}),{controlRef:r}}}),or={ref:"controlRef",class:"custom-control-wrapper"};function nr(t,e,r,o,n,s){return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createCommentVNode(` 2 v-show must be used instead of v-if otherwise there 3 would be no rendered content pushed to the map controls 4 `),a.createElementVNode("div",or,[a.renderSlot(t.$slots,"default",{},void 0,!0)],512)],2112)}const sr=ke(rr,[["render",nr],["__scopeId","data-v-ae91c15f"]]),mt=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],ar=a.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...mt,"update:modelValue"],setup(t,{slots:e,emit:r,expose:o}){const n=a.ref(),s=a.ref(),l=a.inject(C,a.ref()),u=a.inject(E,a.ref()),i=a.inject(z,a.ref());let d,m=t.modelValue;const c=a.computed(()=>{var h;return(h=e.default)==null?void 0:h.call(e).some(y=>y.type!==a.Comment)}),f=h=>{m=h,r("update:modelValue",h)},p=h=>{n.value&&(n.value.open({map:l.value,anchor:i.value,...h}),f(!0))},g=()=>{n.value&&(n.value.close(),f(!1))};return a.onMounted(()=>{a.watch([l,()=>t.options],([h,y],[x,_])=>{var B;const W=!Ce(y,_)||l.value!==x;l.value&&u.value&&W&&(n.value?(n.value.setOptions({...y,content:c.value?s.value:y.content}),i.value||p()):(n.value=a.markRaw(new u.value.InfoWindow({...y,content:c.value?s.value:y.content})),i.value&&(d=i.value.addListener("click",()=>p())),(!i.value||m)&&p(),mt.forEach(Z=>{var A;(A=n.value)==null||A.addListener(Z,R=>r(Z,R))}),(B=n.value)==null||B.addListener("closeclick",()=>f(!1))))},{immediate:!0,flush:"post"}),a.watch(i,(h,y)=>{!n.value||h===y||(d&&(d.remove(),d=void 0),h&&(d=h.addListener("click",()=>p())))},{flush:"post"}),a.watch(()=>t.modelValue,h=>{h!==m&&(h?p():g())})}),a.onBeforeUnmount(()=>{var h;d&&d.remove(),n.value&&((h=u.value)==null||h.event.clearInstanceListeners(n.value),g())}),o({infoWindow:n,open:p,close:g}),{infoWindow:n,infoWindowRef:s,hasSlotContent:c,open:p,close:g}}}),ir={key:0,class:"info-window-wrapper"};function lr(t,e,r,o,n,s){return t.hasSlotContent?(a.openBlock(),a.createElementBlock("div",ir,[a.createElementVNode("div",a.mergeProps({ref:"infoWindowRef"},t.$attrs),[a.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):a.createCommentVNode("v-if",!0)}const ur=ke(ar,[["render",lr],["__scopeId","data-v-5660e752"]]);var cr=Object.getOwnPropertyNames,dr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty;function ft(t,e){return function(r,o,n){return t(r,o,n)&&e(r,o,n)}}function qe(t){return function(e,r,o){if(!e||!r||typeof e!="object"||typeof r!="object")return t(e,r,o);var n=o.cache,s=n.get(e),l=n.get(r);if(s&&l)return s===r&&l===e;n.set(e,r),n.set(r,e);var u=t(e,r,o);return n.delete(e),n.delete(r),u}}function ht(t){return cr(t).concat(dr(t))}var mr=Object.hasOwn||function(t,e){return pr.call(t,e)};function ce(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var fr="__v",hr="__o",gr="_owner",gt=Object.getOwnPropertyDescriptor,vt=Object.keys;function vr(t,e,r){var o=t.length;if(e.length!==o)return!1;for(;o-- >0;)if(!r.equals(t[o],e[o],o,o,t,e,r))return!1;return!0}function yr(t,e){return ce(t.getTime(),e.getTime())}function br(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function wr(t,e){return t===e}function yt(t,e,r){var o=t.size;if(o!==e.size)return!1;if(!o)return!0;for(var n=new Array(o),s=t.entries(),l,u,i=0;(l=s.next())&&!l.done;){for(var d=e.entries(),m=!1,c=0;(u=d.next())&&!u.done;){if(n[c]){c++;continue}var f=l.value,p=u.value;if(r.equals(f[0],p[0],i,c,t,e,r)&&r.equals(f[1],p[1],f[0],p[0],t,e,r)){m=n[c]=!0;break}c++}if(!m)return!1;i++}return!0}var xr=ce;function kr(t,e,r){var o=vt(t),n=o.length;if(vt(e).length!==n)return!1;for(;n-- >0;)if(!wt(t,e,r,o[n]))return!1;return!0}function _e(t,e,r){var o=ht(t),n=o.length;if(ht(e).length!==n)return!1;for(var s,l,u;n-- >0;)if(s=o[n],!wt(t,e,r,s)||(l=gt(t,s),u=gt(e,s),(l||u)&&(!l||!u||l.configurable!==u.configurable||l.enumerable!==u.enumerable||l.writable!==u.writable)))return!1;return!0}function Cr(t,e){return ce(t.valueOf(),e.valueOf())}function _r(t,e){return t.source===e.source&&t.flags===e.flags}function bt(t,e,r){var o=t.size;if(o!==e.size)return!1;if(!o)return!0;for(var n=new Array(o),s=t.values(),l,u;(l=s.next())&&!l.done;){for(var i=e.values(),d=!1,m=0;(u=i.next())&&!u.done;){if(!n[m]&&r.equals(l.value,u.value,l.value,u.value,t,e,r)){d=n[m]=!0;break}m++}if(!d)return!1}return!0}function Mr(t,e){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function Lr(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function wt(t,e,r,o){return(o===gr||o===hr||o===fr)&&(t.$$typeof||e.$$typeof)?!0:mr(e,o)&&r.equals(t[o],e[o],o,o,t,e,r)}var Sr="[object Arguments]",Er="[object Boolean]",Or="[object Date]",jr="[object Error]",Pr="[object Map]",qr="[object Number]",$r="[object Object]",Tr="[object RegExp]",Ar="[object Set]",Ir="[object String]",Rr="[object URL]",Br=Array.isArray,xt=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,kt=Object.assign,Nr=Object.prototype.toString.call.bind(Object.prototype.toString);function zr(t){var e=t.areArraysEqual,r=t.areDatesEqual,o=t.areErrorsEqual,n=t.areFunctionsEqual,s=t.areMapsEqual,l=t.areNumbersEqual,u=t.areObjectsEqual,i=t.arePrimitiveWrappersEqual,d=t.areRegExpsEqual,m=t.areSetsEqual,c=t.areTypedArraysEqual,f=t.areUrlsEqual;return function(p,g,h){if(p===g)return!0;
4if(p==null||g==null)return!1;var y=typeof p;if(y!==typeof g)return!1;if(y!=="object")return y==="number"?l(p,g,h):y==="function"?n(p,g,h):!1;var x=p.constructor;if(x!==g.constructor)return!1;if(x===Object)return u(p,g,h);if(Br(p))return e(p,g,h);if(xt!=null&&xt(p))return c(p,g,h);if(x===Date)return r(p,g,h);if(x===RegExp)return d(p,g,h);if(x===Map)return s(p,g,h);if(x===Set)return m(p,g,h);var _=Nr(p);return _===Or?r(p,g,h):_===Tr?d(p,g,h):_===Pr?s(p,g,h):_===Ar?m(p,g,h):_===$r?typeof p.then!="function"&&typeof g.then!="function"&&u(p,g,h):_===Rr?f(p,g,h):_===jr?o(p,g,h):_===Sr?u(p,g,h):_===Er||_===qr||_===Ir?i(p,g,h):!1}}function Ur(t){var e=t.circular,r=t.createCustomConfig,o=t.strict,n={areArraysEqual:o?_e:vr,areDatesEqual:yr,areErrorsEqual:br,areFunctionsEqual:wr,areMapsEqual:o?ft(yt,_e):yt,areNumbersEqual:xr,areObjectsEqual:o?_e:kr,arePrimitiveWrappersEqual:Cr,areRegExpsEqual:_r,areSetsEqual:o?ft(bt,_e):bt,areTypedArraysEqual:o?_e:Mr,areUrlsEqual:Lr};if(r&&(n=kt({},n,r(n))),e){var s=qe(n.areArraysEqual),l=qe(n.areMapsEqual),u=qe(n.areObjectsEqual),i=qe(n.areSetsEqual);n=kt({},n,{areArraysEqual:s,areMapsEqual:l,areObjectsEqual:u,areSetsEqual:i})}return n}function Vr(t){return function(e,r,o,n,s,l,u){return t(e,r,u)}}function Zr(t){var e=t.circular,r=t.comparator,o=t.createState,n=t.equals,s=t.strict;if(o)return function(u,i){var d=o(),m=d.cache,c=m===void 0?e?new WeakMap:void 0:m,f=d.meta;return r(u,i,{cache:c,equals:n,meta:f,strict:s})};if(e)return function(u,i){return r(u,i,{cache:new WeakMap,equals:n,meta:void 0,strict:s})};var l={cache:void 0,equals:n,meta:void 0,strict:s};return function(u,i){return r(u,i,l)}}var $e=oe();oe({strict:!0}),oe({circular:!0}),oe({circular:!0,strict:!0}),oe({createInternalComparator:function(){return ce}}),oe({strict:!0,createInternalComparator:function(){return ce}}),oe({circular:!0,createInternalComparator:function(){return ce}}),oe({circular:!0,createInternalComparator:function(){return ce},strict:!0});function oe(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,o=t.createInternalComparator,n=t.createState,s=t.strict,l=s===void 0?!1:s,u=Ur(t),i=zr(u),d=o?o(i):Vr(i);return Zr({circular:r,comparator:i,createState:n,equals:d,strict:l})}const Ct=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],We=1,Me=8;class Ge{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,o]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const n=o>>4;if(n!==We)throw new Error(`Got v${n} data when expected v${We}.`);const s=Ct[o&15];if(!s)throw new Error("Unrecognized array type.");const[l]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new Ge(u,l,s,e)}constructor(e,r=64,o=Float64Array,n){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=o,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=Ct.indexOf(this.ArrayType),l=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,i=(8-u%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${o}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,Me,e),this.coords=new this.ArrayType(this.data,Me+u+i,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Me+l+u+i),this.ids=new this.IndexArrayType(this.data,Me,e),this.coords=new this.ArrayType(this.data,Me+u+i,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(We<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=e,this.coords[this._pos++]=r,o}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ke(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,o,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:l,nodeSize:u}=this,i=[0,s.length-1,0],d=[];for(;i.length;){const m=i.pop()||0,c=i.pop()||0,f=i.pop()||0;if(c-f<=u){for(let y=f;y<=c;y++){const x=l[2*y],_=l[2*y+1];x>=e&&x<=o&&_>=r&&_<=n&&d.push(s[y])}continue}const p=f+c>>1,g=l[2*p],h=l[2*p+1];g>=e&&g<=o&&h>=r&&h<=n&&d.push(s[p]),(m===0?e<=g:r<=h)&&(i.push(f),i.push(p-1),i.push(1-m)),(m===0?o>=g:n>=h)&&(i.push(p+1),i.push(c),i.push(1-m))}return d}within(e,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:s,nodeSize:l}=this,u=[0,n.length-1,0],i=[],d=o*o;for(;u.length;){const m=u.pop()||0,c=u.pop()||0,f=u.pop()||0;if(c-f<=l){for(let y=f;y<=c;y++)Mt(s[2*y],s[2*y+1],e,r)<=d&&i.push(n[y]);continue}const p=f+c>>1,g=s[2*p],h=s[2*p+1];
4Mt(g,h,e,r)<=d&&i.push(n[p]),(m===0?e-o<=g:r-o<=h)&&(u.push(f),u.push(p-1),u.push(1-m)),(m===0?e+o>=g:r+o>=h)&&(u.push(p+1),u.push(c),u.push(1-m))}return i}}function Ke(t,e,r,o,n,s){if(n-o<=r)return;const l=o+n>>1;_t(t,e,l,o,n,s),Ke(t,e,r,o,l-1,1-s),Ke(t,e,r,l+1,n,1-s)}function _t(t,e,r,o,n,s){for(;n>o;){if(n-o>600){const d=n-o+1,m=r-o+1,c=Math.log(d),f=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*f*(d-f)/d)*(m-d/2<0?-1:1),g=Math.max(o,Math.floor(r-m*f/d+p)),h=Math.min(n,Math.floor(r+(d-m)*f/d+p));_t(t,e,r,g,h,s)}const l=e[2*r+s];let u=o,i=n;for(Le(t,e,o,r),e[2*n+s]>l&&Le(t,e,o,n);u<i;){for(Le(t,e,u,i),u++,i--;e[2*u+s]<l;)u++;for(;e[2*i+s]>l;)i--}e[2*o+s]===l?Le(t,e,o,i):(i++,Le(t,e,i,n)),i<=r&&(o=i+1),r<=i&&(n=i-1)}}function Le(t,e,r,o){He(t,r,o),He(e,2*r,2*o),He(e,2*r+1,2*o+1)}function He(t,e,r){const o=t[e];t[e]=t[r],t[r]=o}function Mt(t,e,r,o){const n=t-r,s=e-o;return n*n+s*s}const Fr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Lt=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),de=2,ne=3,Qe=4,se=5,St=6;class Et{constructor(e){this.options=Object.assign(Object.create(Fr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:r,minZoom:o,maxZoom:n}=this.options;r&&console.time("total time");const s=`prepare ${e.length} points`;r&&console.time(s),this.points=e;const l=[];for(let i=0;i<e.length;i++){const d=e[i];if(!d.geometry)continue;const[m,c]=d.geometry.coordinates,f=Lt(Te(m)),p=Lt(Ae(c));l.push(f,p,1/0,i,-1,1),this.options.reduce&&l.push(0)}let u=this.trees[n+1]=this._createTree(l);r&&console.timeEnd(s);for(let i=n;i>=o;i--){const d=+Date.now();u=this.trees[i]=this._createTree(this._cluster(u,i)),r&&console.log("z%d: %d clusters in %dms",i,u.numItems,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let o=((e[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const l=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)o=-180,s=180;else if(o>s){const c=this.getClusters([o,n,180,l],r),f=this.getClusters([-180,n,s,l],r);return c.concat(f)}const u=this.trees[this._limitZoom(r)],i=u.range(Te(o),Ae(l),Te(s),Ae(n)),d=u.data,m=[];for(const c of i){const f=this.stride*c;m.push(d[f+se]>1?Ot(d,f,this.clusterProps):this.points[d[f+ne]])}return m}getChildren(e){const r=this._getOriginId(e),o=this._getOriginZoom(e),n="No cluster with the specified id.",s=this.trees[o];if(!s)throw new Error(n);const l=s.data;if(r*this.stride>=l.length)throw new Error(n);const u=this.options.radius/(this.options.extent*Math.pow(2,o-1)),i=l[r*this.stride],d=l[r*this.stride+1],m=s.within(i,d,u),c=[];for(const f of m){const p=f*this.stride;l[p+Qe]===e&&c.push(l[p+se]>1?Ot(l,p,this.clusterProps):this.points[l[p+ne]])}if(c.length===0)throw new Error(n);return c}getLeaves(e,r,o){r=r||10,o=o||0;const n=[];return this._appendLeaves(n,e,r,o,0),n}getTile(e,r,o){const n=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:l,radius:u}=this.options,i=u/l,d=(o-i)/s,m=(o+1+i)/s,c={features:[]};return this._addTileFeatures(n.range((r-i)/s,d,(r+1+i)/s,m),n.data,r,o,s,c),r===0&&this._addTileFeatures(n.range(1-i/s,d,1,m),n.data,s,o,s,c),r===s-1&&this._addTileFeatures(n.range(0,d,i/s,m),n.data,-1,o,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const o=this.getChildren(e);if(r++,o.length!==1)break;e=o[0].properties.cluster_id}return r}_appendLeaves(e,r,o,n,s){const l=this.getChildren(r);for(const u of l){const i=u.properties;if(i&&i.cluster?s+i.point_count<=n?s+=i.point_count:s=this._appendLeaves(e,i.cluster_id,o,n,s):s<n?s++:e.push(u),e.length===o)break}return s}_createTree(e){const r=new Ge(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let o=0;o<e.length;o+=this.stride)r.add(e[o],e[o+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,o,n,s,l){for(const u of e){const i=u*this.stride,d=r[i+se]>1;let m,c,f;if(d)m=jt(r,i,this.clusterProps),c=r[i],f=r[i+1];else{const h=this.points[r[i+ne]];m=h.properties;const[y,x]=h.geometry.coordinates;c=Te(y),f=Ae(x)}const p={type:1,geometry:[[Math.round(this.options.extent*(c*s-o)),Math.round(this.options.extent*(f*s-n))]],tags:m};let g;d||this.options.generateId?g=r[i+ne]:g=this.points[r[i+ne]].id,g!==void 0&&(p.id=g),l.features.push(p)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:o,extent:n,reduce:s,minPoints:l}=this.options,u=o/(n*Math.pow(2,r)),i=e.data,d=[],m=this.stride;for(let c=0;c<i.length;c+=m){if(i[c+de]<=r)continue;i[c+de]=r;const f=i[c],p=i[c+1],g=e.within(i[c],i[c+1],u),h=i[c+se];let y=h;for(const x of g){const _=x*m;
4i[_+de]>r&&(y+=i[_+se])}if(y>h&&y>=l){let x=f*h,_=p*h,B,W=-1;const Z=((c/m|0)<<5)+(r+1)+this.points.length;for(const A of g){const R=A*m;if(i[R+de]<=r)continue;i[R+de]=r;const G=i[R+se];x+=i[R]*G,_+=i[R+1]*G,i[R+Qe]=Z,s&&(B||(B=this._map(i,c,!0),W=this.clusterProps.length,this.clusterProps.push(B)),s(B,this._map(i,R)))}i[c+Qe]=Z,d.push(x/y,_/y,1/0,Z,-1,y),s&&d.push(W)}else{for(let x=0;x<m;x++)d.push(i[c+x]);if(y>1)for(const x of g){const _=x*m;if(!(i[_+de]<=r)){i[_+de]=r;for(let B=0;B<m;B++)d.push(i[_+B])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,o){if(e[r+se]>1){const l=this.clusterProps[e[r+St]];return o?Object.assign({},l):l}const n=this.points[e[r+ne]].properties,s=this.options.map(n);return o&&s===n?Object.assign({},s):s}}function Ot(t,e,r){return{type:"Feature",id:t[e+ne],properties:jt(t,e,r),geometry:{type:"Point",coordinates:[Dr(t[e]),Wr(t[e+1])]}}}function jt(t,e,r){const o=t[e+se],n=o>=1e4?`${Math.round(o/1e3)}k`:o>=1e3?`${Math.round(o/100)/10}k`:o,s=t[e+St],l=s===-1?{}:Object.assign({},r[s]);return Object.assign(l,{cluster:!0,cluster_id:t[e+ne],point_count:o,point_count_abbreviated:n})}function Te(t){return t/360+.5}function Ae(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Dr(t){return(t-.5)*360}function Wr(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function Xe(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(r[o[n]]=t[o[n]]);return r}typeof SuppressedError=="function"&&SuppressedError;class U{static isAdvancedMarkerAvailable(e){return google.maps.marker&&e.getMapCapabilities().isAdvancedMarkersAvailable===!0}static isAdvancedMarker(e){return google.maps.marker&&e instanceof google.maps.marker.AdvancedMarkerElement}static setMap(e,r){this.isAdvancedMarker(e)?e.map=r:e.setMap(r)}static getPosition(e){if(this.isAdvancedMarker(e)){if(e.position){if(e.position instanceof google.maps.LatLng)return e.position;if(Number.isFinite(e.position.lat)&&Number.isFinite(e.position.lng))return new google.maps.LatLng(e.position.lat,e.position.lng)}return new google.maps.LatLng(null)}return e.getPosition()}static getVisible(e){return this.isAdvancedMarker(e)?!0:e.getVisible()}}class Se{constructor({markers:e,position:r}){this.markers=[],e&&(this.markers=e),r&&(r instanceof google.maps.LatLng?this._position=r:this._position=new google.maps.LatLng(r))}get bounds(){if(this.markers.length===0&&!this._position)return;const e=new google.maps.LatLngBounds(this._position,this._position);for(const r of this.markers)e.extend(U.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>U.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(U.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function ee(t,e="assertion failed"){if(t==null)throw Error(e)}const Gr=(t,e,r,o)=>{const n=t.getBounds();ee(n);const s=Pt(n,e,o);return r.filter(l=>s.contains(U.getPosition(l)))},Pt=(t,e,r)=>{const{northEast:o,southWest:n}=Hr(t,e),s=Qr({northEast:o,southWest:n},r);return Xr(s,e)},Kr=(t,e,r)=>
4{const o=Pt(t,e,r),n=o.getNorthEast(),s=o.getSouthWest();return[s.lng(),s.lat(),n.lng(),n.lat()]},Hr=(t,e)=>{const r=e.fromLatLngToDivPixel(t.getNorthEast()),o=e.fromLatLngToDivPixel(t.getSouthWest());return ee(r),ee(o),{northEast:r,southWest:o}},Qr=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),Xr=({northEast:t,southWest:e},r)=>{const o=r.fromDivPixelToLatLng(e),n=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(o,n)};class qt{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Jr(e)}}class Yr extends qt{constructor(e){var{viewportPadding:r=60}=e,o=Xe(e,["viewportPadding"]);super(o),this.viewportPadding=60,this.viewportPadding=r}calculate({markers:e,map:r,mapCanvasProjection:o}){const n=r.getZoom();return ee(n),n>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:Gr(r,o,e,this.viewportPadding),map:r,mapCanvasProjection:o})}}}const Jr=t=>t.map(e=>new Se({position:U.getPosition(e),markers:[e]}));class eo extends qt{constructor(e){var{maxZoom:r,radius:o=60}=e,n=Xe(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Et(Object.assign({maxZoom:this.maxZoom,radius:o},n))}calculate(e){let r=!1,o=e.map.getZoom();ee(o),o=Math.round(o);const n={zoom:o};if(!$e(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(l=>{const u=U.getPosition(l);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:l}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(r=!$e(this.state,n)),this.state=n,e.markers.length===0?(this.cluster
4s=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return ee(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(o=>this.transformCluster(o))}transformCluster({geometry:{coordinates:[e,r]},properties:o}){if(o.cluster)return new Se({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const n=o.marker;return new Se({markers:[n],position:U.getPosition(n)})}}class to extends Yr{constructor(e){var{maxZoom:r,radius:o=60,viewportPadding:n=60}=e,s=Xe(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:r,viewportPadding:n}),this.markers=[],this.clusters=[],this.superCluster=new Et(Object.assign({maxZoom:this.maxZoom,radius:o},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const r=this.getViewportState(e);let o=!$e(this.state,r);if(!$e(e.markers,this.markers)){o=!0,this.markers=[...e.markers];const n=this.markers.map(s=>{const l=U.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[l.lng(),l.lat()]},properties:{marker:s}}});this.superCluster.load(n)}
4return o&&(this.clusters=this.cluster(e),this.state=r),{clusters:this.clusters,changed:o}}cluster(e){const r=this.getViewportState(e);return this.superCluster.getClusters(r.view,r.zoom).map(o=>this.transformCluster(o))}transformCluster({geometry:{coordinates:[e,r]},properties:o}){if(o.cluster)return new Se({markers:this.superCluster.getLeaves(o.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const n=o.marker;return new Se({markers:[n],position:U.getPosition(n)})}getViewportState(e){const r=e.map.getZoom(),o=e.map.getBounds();return ee(r),ee(o),{zoom:Math.round(r),view:Kr(o,e.mapCanvasProjection,this.viewportPadding)}}}class ro{constructor(e,r){this.markers={sum:e.length};const o=r.map(s=>s.count),n=o.reduce((s,l)=>s+l,0);this.clusters={count:r.length,markers:{mean:n/r.length,sum:n,min:Math.min(...o),max:Math.max(...o)}}}}class oo{render({count:e,position:r},o,n){const s=`<svg fill="${e>Math.max(10,o.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50"> 5<circle cx="120" cy="120" opacity=".6" r="70" /> 6<circle cx="120" cy="120" opacity=".3" r="90" /> 7<circle cx="120" cy="120" opacity=".2" r="110" /> 8<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${e}</text> 9</svg>`,l=`Cluster of ${e} markers`,u=Number(google.maps.Marker.MAX_ZINDEX)+e;if(U.isAdvancedMarkerAvailable(n)){const d=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;d.setAttribute("transform","translate(0 25)");const m={map:n,position:r,zIndex:u,title:l,content:d};return new google.maps.marker.AdvancedMarkerElement(m)}const i={position:r,zIndex:u,title:l,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(i)}}function no(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class Ye{constructor(){no(Ye,google.maps.OverlayView)}}var ae;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(ae||(ae={}));const so=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class ao extends Ye{constructor({map:e,markers:r=[],algorithmOptions:o={},algorithm:n=new eo(o),renderer:s=new oo,onClusterClick:l=so}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=l,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(o=>{this.addMarker(o,!0)}),r||this.render()}removeMarker(e,r){const o=this.markers.indexOf(e);return o===-1?!1:(U.setMap(e,null),this.markers.splice(o,1),r||this.render(),!0)}removeMarkers(e,r){let o=!1;return e.forEach(n=>{o=this.removeMarker(n,!0)||o}),o&&!r&&this.render(),o}clearMarkers(e){this.markers.length=0,e||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,ae.CLUSTERING_BEGIN,this);const{clusters:r,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||o==null){const n=new Set;for(const l of r)l.markers.length==1&&n.add(l.markers[0]);const s=[];for(const l of this.clusters)l.marker!=null&&(l.markers.length==1?n.has(l.marker)||U.setMap(l.marker,null):s.push(l.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>s.forEach(l=>U.setMap(l,null)))}google.maps.event.trigger(this,ae.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();ee(e),this.idleListener=e.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(e=>U.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new ro(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(o=>
9{if(o.markers.length===1)o.marker=o.markers[0];else if(o.marker=this.renderer.render(o,e,r),o.markers.forEach(n=>U.setMap(n,null)),this.onClusterClick){const n=U.isAdvancedMarker(o.marker)?ae.GMP_CLICK:ae.CLUSTER_CLICK;o.marker.addListener(n,s=>{google.maps.event.trigger(this,ae.CLUSTER_CLICK,o),this.onClusterClick(s,o,r)})}U.setMap(o.marker,r)})}}function Je(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var io=typeof Be=="object"&&Be&&Be.Object===Object&&Be;const lo=io;var uo=typeof self=="object"&&self&&self.Object===Object&&self,co=lo||uo||Function("return this")();const $t=co;var po=function(){return $t.Date.now()};const et=po;var mo=/\s/;function fo(t){for(var e=t.length;e--&&mo.test(t.charAt(e)););return e}var ho=/^\s+/;function go(t){return t&&t.slice(0,fo(t)+1).replace(ho,"")}var vo=$t.Symbol;const Ie=vo;var Tt=Object.prototype,yo=Tt.hasOwnProperty,bo=Tt.toString,Ee=Ie?Ie.toStringTag:void 0;function wo(t){var e=yo.call(t,Ee),r=t[Ee];try{t[Ee]=void 0;var o=!0}catch{}var n=bo.call(t);return o&&(e?t[Ee]=r:delete t[Ee]),n}var xo=Object.prototype,ko=xo.toString;function Co(t){return ko.call(t)}var _o="[object Null]",Mo="[object Undefined]",At=Ie?Ie.toStringTag:void 0;function Lo(t){return t==null?t===void 0?Mo:_o:At&&At in Object(t)?wo(t):Co(t)}function So(t){return t!=null&&typeof t=="object"}var Eo="[object Symbol]";function Oo(t){return typeof t=="symbol"||So(t)&&Lo(t)==Eo}var It=NaN,jo=/^[-+]0x[0-9a-f]+$/i,Po=/^0b[01]+$/i,qo=/^0o[0-7]+$/i,$o=parseInt;function Rt(t){if(typeof t=="number")return t;if(Oo(t))return It;if(Je(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Je(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=go(t);var r=Po.test(t);return r||qo.test(t)?$o(t.slice(2),r?2:8):jo.test(t)?It:+t}var To="Expected a function",Ao=Math.max,Io=Math.min;function Ro(t,e,r){var o,n,s,l,u,i,d=0,m=!1,c=!1,f=!0;if(typeof t!="function")throw new TypeError(To);e=Rt(e)||0,Je(r)&&(m=!0,c="maxWait"in r,s=c?Ao(Rt(r.maxWait)||0,e):s,f="trailing"in r?!0:f);function p(A){var R=o,G=n;return o=n=void 0,d=A,l=t.apply(G,R),l}function g(A){return d=A,u=setTimeout(x,e),m?p(A):l}function h(A){var R=A-i,G=A-d,pe=e-R;return c?Io(pe,s-G):pe}function y(A){var R=A-i,G=A-d;return i===void 0||R>=e||R<0||c&&G>=s}function x(){var A=et();if(y(A))return _(A);u=setTimeout(x,h(A))}function _(A){return u=void 0,f&&o?p(A):(o=n=void 0,l)}function B(){u!==void 0&&clearTimeout(u),d=0,o=i=n=u=void 0}function W(){return u===void 0?l:_(et())}function Z(){var A=et(),R=y(A);if(o=arguments,n=this,i=A,R){if(u===void 0)return g(i);if(c)return clearTimeout(u),u=setTimeout(x,e),p(i)}return u===void 0&&(u=setTimeout(x,e)),l}return Z.cancel=B,Z.flush=W,Z}class Bo extends ao{constructor(e,r=10){super(e),T(this,"debouncedRender"),this.debouncedRender=Ro(()=>{super.render()},r,{leading:!0,trailing:!0})}addMarker(e,r){super.addMarker(e,!0),r||this.debouncedRender()}removeMarker(e,r){const o=super.removeMarker(e,!0);return r||this.debouncedRender(),o}addMarkers(e,r){super.addMarkers(e,!0),r||this.debouncedRender()}removeMarkers(e,r){const o=super.removeMarkers(e,!0);return r||this.debouncedRender(),o}clearMarkers(e){super.clearMarkers(!0),e||this.debouncedRender()}render(){this.debouncedRender.cancel(),super.render()}destroy(){this.debouncedRender.cancel()}}class No extends to{calculate(e){return e.markers.length===0?{clusters:[],changed:!0}:super.calculate(e)}}const Bt=Object.values(ae),zo=a.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})},renderDebounceDelay:{type:Number,default:10}},emits:Bt,setup(t,{emit:e,expose:r,slots:o}){const n=a.ref(),s=a.inject(C,a.ref()),l=a.inject(E,a.ref());return a.provide(K,n),a.watch(s,()=>{s.value&&(n.value=a.markRaw(new Bo({map:s.value,algorithm:new No(t.options.algorithmOptions??{}),...t.options},t.renderDebounceDelay)),Bt.forEach(u=>{var i;(i=n.value)==null||i.addListener(u,d=>e(u,d))}))},{immediate:!0}),a.onBeforeUnmount(()=>{var u;n.value&&((u=l.value)==null||u.event.clearInstanceListeners(n.value),n.value.clearMarkers(!0),n.value.setMap(null),n.value.destroy())}),r({markerCluster:n}),()=>{var u;return(u=o.default)==null?void 0:u.call(o)}}}),Uo=a.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(t,{slots:e,emit:r,expose:o}){const n=a.ref(),s=a.computed(()=>{var i;return(i=e.default)==null?void 0:i.call(e).some(d=>d.type!==a.Comment)}),l=a.computed(()=>({...t.options,element:n.value})),u=ve(j,[],l,r);return o({customMarker:u}),{customMarkerRef:n,customMarker:u,hasSlotContent:s}}}),Vo={key:0,class:"custom-marker-wrapper"};function Zo(t,e,r,o,n,s){return t.hasSlotContent?(a.openBlock(),a.createElementBlock("div",Vo,[a.createElementVNode("div",a.mergeProps({ref:"customMarkerRef",style:{cursor:t.$attrs.onClick?"pointer":void 0}},t.$attrs),[a.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):a.createCommentVNode("v-if",!0)}const Fo=ke(Uo,[["render",Zo],["__scopeId","data-v-90fe8380"]]),Do=a.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(t){const e=a.ref(),r=a.inject(C,a.ref()),o=a.inject(E,a.ref());return a.watch([r,()=>t.options],([n,s],[l,u])=>{const i=!Ce(s,u)||r.value!==l;if(r.value&&o.value&&i){let d;if(s.data&&!(s.data instanceof o.value.MVCArray)){const m=o.value.LatLng,c=s.data.map(f=>f instanceof m||"location"in f&&(f.location instanceof m||f.location===null)?f:"location"in f?{...f,location:new m(f.location)}:new m(f));d={...s,data:c}}else d=s;e.value?e.value.setOptions(d):e.value=a.markRaw(new o.value.visualization.HeatmapLayer({...d,map:r.value}))}},{immediate:!0}),a.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});w.AdvancedMarker=Qt,w.Circle=tr,w.CustomControl=sr,w.CustomMarker=Fo,w.GoogleMap=Ft,w.HeatmapLayer=Do,w.InfoWindow=ur,w.Marker=Xt,w.MarkerCluster
9=zo,w.Polygon=Jt,w.Polyline=Yt,w.Rectangle=er,w.apiSymbol=E,w.mapSymbol=C,w.mapTilesLoadedSymbol=S,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})})})(Oe,Oe.exports)),Oe.exports}var ze=Bn();const Nn=["alt","src"],zn={class:"rounded-lg border-none bg-white md:w-[600px]"},Un={class:"flex flex-col gap-0 lg:gap-2 lg:flex-row"},Vn={class:"lg:w-4/12"},Zn=["src"],Fn={class:"flex flex-1 flex-col p-3 md:p-5 items-center justify-center"},Dn={class:"w-full"},Wn={class:"flex w-fit flex-row items-center gap-3"},Gn=["textContent"],Kn=["innerHTML"],Hn={class:"flex w-fit flex-col md:flex-row md:items-center gap-1 md:gap-6"},Qn={class:"mt-2 flex items-center gap-2 text-base font-semibold"},Xn={class:"w-full flex"},Yn={class:"w-full flex"},Jn={class:"grid lg:grid-cols-2 col-span-2 border-t border-gray-300 py-3 w-full gap-2 p-4 shrink"},es={key:0},ts=["textContent"],rs={class:"space-y-1"},os=["href","textContent"],ns=Fe({__name:"LocationMap",props:{apiKey:{},showDistance:{type:Boolean},categories:{}},setup(L){const k=L,w=De(),a=Ze(),N=F({lat:a.getSearchLat(),lng:a.getSearchLon()}),M=F(null),T=j=>{M.value=j,M.collapsed=!1},C=F(null);a.events.on("updatedSearch",j=>{var S;(S=C==null?void 0:C.value)==null||S.map.panTo({lat:j.lat,lng:j.lon})});const E=j=>st.filter(M==null?void 0:M.value.products,S=>S.category_id===j),z=me(()=>k.categories.filter(j=>E(j.id).length>0)),K=j=>{j.collapsed=!j.collapsed};return(j,S)=>(O(),Ue(b(ze.GoogleMap),{ref_key:"mapContainer",ref:C,"map-id":"test","api-key":L.apiKey,style:{width:"100%",height:"700px"},center:N.value,zoom:10},{default:Ne(()=>{var P,H;return[X(b(ze.MarkerCluster),null,{default:Ne(()=>[(O(!0),$(Y,null,te(b(w).locations,(D,ue)=>(O(),Ue(b(ze.CustomMarker),{key:ue,options:{position:{lat:D.lat,lng:D.lon}},onClick:fe=>T(D)},{default:Ne(()=>[v("img",{alt:D.name,src:b(In)},null,8,Nn)]),_:2},1032,["options","onClick"]))),128))]),_:1}),M.value!==null?(O(),Ue(b(ze.InfoWindow),{key:0,class:"p-0",options:{headerDisabled:!0,position:{lat:(P=M.value)==null?void 0:P.lat,lng:(H=M.value)==null?void 0:H.lon}}},{default:Ne(()=>{var D,ue,fe,be,we,he;return[v("article",zn,[v("div",Un,[v("div",Vn,[v("img",{src:(D=M.value)==null?void 0:D.image_url,class:"min-h-40 h-40 lg:h-full w-full object-cover rounded-l-lg",alt:""},null,8,Zn)]),v("div",Fn,[v("div",Dn,[v("div",Wn,[v("h3",{class:"text-lg font-extrabold",textContent:q((ue=M.value)==null?void 0:ue.name)},null,8,Gn),le(v("span",{class:"rounded-xl bg-gray-100 px-3 py-1 text-xs font-semibold text-center"},q((fe=M.value)==null?void 0:fe.distance)+" KM ",513),[[je,M.value.distance>0&&L.showDistance]]),v("button",{class:"absolute right-1 top-1",onClick:S[0]||(S[0]=J=>{M.value=null})},[X(b(rn))])]),v("div",{class:"mt-2 text-gray-700",innerHTML:(be=M.value)==null?void 0:be.description_overview},null,8,Kn),v("div",Hn,[v("div",Qn,[S[2]||(S[2]=v("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-map-pin-icon lucide-map-pin h-5 w-5 text-primary"},[v("path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),v("circle",{cx:"12",cy:"10",r:"3"})],-1)),ye(" "+q((we=M.value)==null?void 0:we.city),1)]),v("div",Xn,[v("button",{onClick:S[1]||(S[1]=J=>K(M.value)),class:"mt-3 inline-flex items-center gap-2 px-5 py-2 font-semibold rounded-md transition bg-primary text-white hover:bg-primary-400"},q(M.value.collapsed?b(V)("site.location.hide_courses"):b(V)("site.location.show_courses")),1)])])])])]),le(v("div",Yn,[v("div",Jn,[(O(!0),$(Y,null,te(z.value,J=>(O(),$("div",{key:J.id},[E(J.id).length>0?(O(),$("div",es,[v("h4",{class:"font-extrabold text-sm",textContent:q(J.title)},null,8,ts),v("ul",rs,[(O(!0),$(Y,null,te(E(J.id),I=>(O(),$("li",null,[v("a",{href:b(w).getProductSlugForOverview(I,M.value.city),class:"text-gray-700 no-underline hover:text-primary transition",textContent:q(I.name)},null,8,os)]))),256))])])):Ve("",!0)]))),128))])],512),[[je,(he=M.value)==null?void 0:he.collapsed]])])]}),_:1},8,["options"])):Ve("",!0)]}),_:1},8,["api-key","center"]))}}),ss={class:"bg-white py-6 lg:py-12"},as={class:"container mx-auto px-4"},is={class:"w-full pb-5"},ls={class:"w-full py-4 lg:py-5 px-4 lg:px-8 bg-gray-100 rounded-lg"},us={class:"flex gap-4 lg:flex-row flex-col items-start lg:items-center justify-between mb-4"},cs={class:"text-xl lg:text-2xl font-extrabold w-full"},ds={key:0},ps={key:1},ms={class:"flex bg-gray-50 rounded-full p-1 w-fit border-gray-200 border"},fs={key:0,id:"locatie-overzicht",class:"space-y-4"}
9,hs={key:0},gs={key:2,class:"my-10 flex justify-center"},vs=["disabled"],Bs=Fe({__name:"LocationOverview",props:{apiKey:{},categories:{},filters:{}},setup(L){const k=De(),w=Ze(),a=F(!0);Ut(()=>{N()});const N=()=>{k.getLocations().then(()=>{a.value=!1,k.setCollapsedLocationId(st.first(k.locations).id)}).catch(console.error)};return w.events.on("radiusChanged",()=>{N()}),w.events.on("locationChanged",()=>{N()}),(M,T)=>{var C;return O(),$("section",ss,[v("div",as,[v("div",is,[X(An,{categories:L.categories,filters:L.filters},null,8,["categories","filters"])]),v("div",ls,[v("div",us,[v("h2",cs,[b(w).selectedLocation.label?(O(),$("span",ds,q(b(V)("site.location_overview.locations-found-search",{count:b(k).totalCount,search:b(w).selectedLocation.label})),1)):(O(),$("span",ps,q(b(V)("site.location_overview.locations-found",{count:b(k).totalCount})),1))]),v("div",ms,[v("button",{class:ie(["px-3 py-1 rounded-full text-sm font-medium transition flex gap-2 items-center",b(k).layout==="list"?"bg-primary text-white":"text-black"]),onClick:T[0]||(T[0]=E=>b(k).setLayout("list"))},[X(b(en),{class:ie(["h-5 w-5",b(k).layout==="list"?"text-white":"text-primary"])},null,8,["class"]),ye(" "+q(b(V)("site.location.list")),1)],2),v("button",{class:ie(["px-3 py-1 rounded-full text-sm font-medium transition flex gap-2 items-center",b(k).layout==="map"?"bg-primary text-white":"text-black"]),onClick:T[1]||(T[1]=E=>b(k).setLayout("map"))},[X(b(nt),{class:ie(["h-5 w-5",b(k).layout==="map"?"text-white":"text-primary"])},null,8,["class"]),ye(" "+q(b(V)("site.location.map")),1)],2)])]),b(k).layout==="list"?(O(),$("div",fs,[(O(!0),$(Y,null,te(b(k).locations,(E,z)=>(O(),Ue(_n,{"course-location":E,key:E.id,"show-distance":b(w).search!=="",categories:L.categories,collapsed:z===0},null,8,["course-location","show-distance","categories","collapsed"]))),128))])):(O(),$(Y,{key:1},[a.value?Ve("",!0):(O(),$("div",hs,[X(ns,{categories:L.categories,"api-key":L.apiKey,"show-distance":b(w).search!==""},null,8,["categories","api-key","show-distance"])]))],64)),b(k).layout==="list"&&b(k).totalCount>((C=b(k).locations)==null?void 0:C.length)?(O(),$("div",gs,[v("button",{class:ie(["rounded-md bg-white border px-6 py-3 font-semibold transition",b(k).toggleAll?"cursor-default border-gray-300 text-gray-400":"border-primary text-primary hover:bg-primary hover:text-white"]),disabled:b(k).toggleAll,onClick:T[2]||(T[2]=E=>{b(k).toggleAll=!0,N()})},q(b(k).toggleAll?b(V)("site.location_overview.locations-loaded"):b(V)("site.location_overview.show-all-locations",{count:b(k).totalCount})),11,vs)])):Ve("",!0)])])])}}});export{Bs as default}; 10//# sourceMappingURL=LocationOverview-CDmiil0x.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.