vue3-google-map 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-d182c1f9]{display:none}.mapdiv .info-window-wrapper[data-v-d182c1f9]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
- "use strict";var Xe=Object.defineProperty;var Ye=(t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var W=(t,e,r)=>(Ye(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),L=Symbol("map"),x=Symbol("api"),ue=Symbol("marker"),ce=Symbol("markerCluster"),Q=Symbol("CustomMarker"),de=Symbol("mapTilesLoaded"),N=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Je(t,e){t.src=e}const Qe=t=>{var e,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",u="__ib__",a=document,d=window,p=d[s]||(d[s]={}),c=p.maps||(p.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(f,v)=>{var y;await(r=a.createElement("script")),h.set("libraries",[...m]+"");for(n in t)h.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),t[n]);h.set("callback",s+".maps."+u),Je(r,"https://maps.googleapis.com/maps/api/js?"+h),c[u]=f,r.onerror=()=>e=v(Error(o+" could not load.")),r.nonce=((y=a.querySelector("script[nonce]"))==null?void 0:y.nonce)||"",a.head.append(r)}));c[i]?console.warn(o+" only loads once. Ignoring:",t):c[i]=(f,...v)=>m.add(f)&&g().then(()=>c[i](f,...v))},et=t=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(t)}) will be ignored.`,tt=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.`,rt="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",nt="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",fe=process.env.NODE_ENV!=="production"?t=>{console.warn(`[@googlemaps/js-api-loader] ${t}`)}:()=>{},ot=process.env.NODE_ENV!=="production"?t=>{console.info(`[@googlemaps/js-api-loader] ${t}`)}:()=>{};let ae=!1;function st(t){if(ae){fe(et(t));return}it(t),ae=!0}async function at(t){var e,r;if(ae||fe(rt),!((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 it(t){var r,n;const e=!!((n=(r=window.google)==null?void 0:r.maps)!=null&&n.importLibrary);e?ot(tt(t)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&fe(nt),e||Qe(t)}function lt(t){return class extends t.OverlayView{constructor(n){super();W(this,"element");W(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,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 n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const u=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${u}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let ge=!1;const ve=["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"],ut=l.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:ve,setup(t,{emit:e}){const r=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(L,o),l.provide(x,s),l.provide(de,i);const u=()=>{const c={...t};Object.keys(c).forEach(f=>{c[f]===void 0&&delete c[f]});const h=f=>{var v;return f?{position:(v=s.value)==null?void 0:v.ControlPosition[f]}:{}},g={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:h(t.panControlPosition),zoomControlOptions:h(t.zoomControlPosition),rotateControlOptions:h(t.rotateControlPosition),streetViewControlOptions:h(t.streetViewControlPosition),fullscreenControlOptions:h(t.fullscreenControlPosition),cameraControlOptions:h(t.cameraControlPosition),disableDefaultUI:t.disableDefaultUi};return{...c,...g}},a=l.watch([s,o],([c,m])=>{const h=c,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:c,region:m,version:h,language:g,libraries:f}=t;st({key:c,region:m,v:h,language:g,libraries:f})},p=c=>{const m=c?c.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(r.value,u()));const h=lt(s.value);s.value[Q]=h,ve.forEach(f=>{var v;(v=o.value)==null||v.addListener(f,y=>e(f,y))}),n.value=!0;const g=Object.keys(t).filter(f=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(f)).map(f=>l.toRef(t,f));l.watch([()=>t.center,()=>t.zoom,...g],([f,v],[y,w])=>{var _,M,T;const{center:k,zoom:O,...b}=u();(_=o.value)==null||_.setOptions(b),v!==void 0&&v!==w&&((M=o.value)==null||M.setZoom(v));const E=!y||f.lng!==y.lng||f.lat!==y.lat;f&&E&&((T=o.value)==null||T.panTo(f))})};return l.onMounted(()=>{if(t.apiPromise&&t.apiPromise instanceof Promise)t.apiPromise.then(p);else{ge||(d(),ge=!0);const c=t.libraries&&t.libraries.length>0?t.libraries:["maps","marker"];Promise.all(c.map(m=>at(m))).then(()=>p())}}),l.onBeforeUnmount(()=>{var c;i.value=!1,o.value&&((c=s.value)==null||c.event.clearInstanceListeners(o.value))}),{mapRef:r,ready:n,map:o,api:s,mapTilesLoaded:i}}});const F=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},ct={ref:"mapRef",class:"mapdiv"};function dt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",ct,null,512),l.renderSlot(t.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0,!0)])}const ft=F(ut,[["render",dt],["__scopeId","data-v-c63ff230"]]);function pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mt=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 n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))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),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r};const V=pt(mt),ye=["click","drag","dragend","dragstart","gmp-click"],ht=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ye,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.computed(()=>{var h;return(h=n.content)==null?void 0:h.call(n).some(g=>g.type!==l.Comment)}),i=l.toRef(t,"options"),u=l.toRef(t,"pinOptions"),a=l.ref(),d=l.inject(L,l.ref()),p=l.inject(x,l.ref()),c=l.inject(ce,l.ref()),m=l.computed(()=>!!(c.value&&p.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,u,o],async(h,[g,f,v,y])=>{var _,M,T;const w=!V(i.value,f)||!V(u.value,v),k=o.value!==y,O=w||k||d.value!==g;if(!d.value||!p.value||!O||s.value&&!o.value)return;const{AdvancedMarkerElement:b,PinElement:E}=p.value.marker;if(a.value){const{map:ee,content:z,...te}=i.value;Object.assign(a.value,{content:s.value?o.value:u.value?new E(u.value).element:z,...te}),m.value&&((_=c.value)==null||_.removeMarker(a.value),(M=c.value)==null||M.addMarker(a.value))}else s.value?i.value.content=o.value:u.value&&(i.value.content=new E(u.value).element),a.value=l.markRaw(new b(i.value)),m.value?(T=c.value)==null||T.addMarker(a.value):a.value.map=d.value,ye.forEach(ee=>{var z;(z=a.value)==null||z.addListener(ee,te=>e(ee,te))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var h,g;a.value&&((h=p.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=c.value)==null||g.removeMarker(a.value):a.value.map=null)}),l.provide(ue,a),r({marker:a}),{hasCustomSlotContent:s,markerRef:o}}});const gt={key:0,class:"advanced-marker-wrapper"};function vt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[t.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",gt,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},t.$attrs),[l.renderSlot(t.$slots,"content")],16)])):l.createCommentVNode("",!0),l.renderSlot(t.$slots,"default")],64)}const yt=F(ht,[["render",vt]]),we=t=>t==="Marker",Ee=t=>t===Q,B=(t,e,r,n)=>{const o=l.ref(),s=l.inject(L,l.ref()),i=l.inject(x,l.ref()),u=l.inject(ce,l.ref()),a=l.computed(()=>!!(u.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[Q])));return l.watch([s,r],(d,[p,c])=>{var h,g,f;const m=!V(r.value,c)||s.value!==p;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(r.value),a.value&&((h=u.value)==null||h.removeMarker(o.value),(g=u.value)==null||g.addMarker(o.value));else{if(we(t))o.value=l.markRaw(new i.value[t](r.value));else if(Ee(t)){const v=r.value;v.element&&(o.value=l.markRaw(new i.value[t](v)))}else o.value=l.markRaw(new i.value[t]({...r.value,map:s.value}));o.value&&(a.value?(f=u.value)==null||f.addMarker(o.value):(we(t)||Ee(t))&&o.value.setMap(s.value)),e.forEach(v=>{var y;(y=o.value)==null||y.addListener(v,w=>n(v,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,p;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(p=u.value)==null||p.removeMarker(o.value):o.value.setMap(null))}),o},ke=["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"],wt=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:ke,setup(t,{emit:e,expose:r,slots:n}){const o=l.toRef(t,"options"),s=B("Marker",ke,o,e);return l.provide(ue,s),r({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),Et=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:N,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polyline:B("Polyline",N,r,e)}},render:()=>null}),kt=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:N,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polygon:B("Polygon",N,r,e)}},render:()=>null}),_e=N.concat(["bounds_changed"]),_t=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:_e,setup(t,{emit:e}){const r=l.toRef(t,"options");return{rectangle:B("Rectangle",_e,r,e)}},render:()=>null}),Ce=N.concat(["center_changed","radius_changed"]),Ct=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:Ce,setup(t,{emit:e}){const r=l.toRef(t,"options");return{circle:B("Circle",Ce,r,e)}},render:()=>null}),bt=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(t,{emit:e}){const r=l.ref(null),n=l.inject(L,l.ref()),o=l.inject(x,l.ref()),s=l.inject(de,l.ref(!1)),i=l.watch([s,o,r],([d,p,c])=>{p&&d&&c&&(u(t.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),u=d=>{if(n.value&&o.value&&r.value){const p=o.value.ControlPosition[d];r.value.index=t.index,n.value.controls[p].push(r.value)}},a=d=>{if(n.value&&o.value){let p=null;const c=o.value.ControlPosition[d];n.value.controls[c].forEach((m,h)=>{m===r.value&&(p=h)}),p!==null&&n.value.controls[c].removeAt(p)}};return l.onBeforeUnmount(()=>a(t.position)),l.watch(()=>t.position,(d,p)=>{a(p),u(d)}),l.watch(()=>t.index,d=>{r.value&&(r.value.index=d)}),{controlRef:r}}});const Mt={ref:"controlRef",class:"custom-control-wrapper"};function Ot(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",Mt,[l.renderSlot(t.$slots,"default",{},void 0,!0)],512)}const St=F(bt,[["render",Ot],["__scopeId","data-v-ab9120cd"]]),be=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Tt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...be,"update:modelValue"],setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(L,l.ref()),u=l.inject(x,l.ref()),a=l.inject(ue,l.ref());let d,p=t.modelValue;const c=l.computed(()=>{var f;return(f=e.default)==null?void 0:f.call(e).some(v=>v.type!==l.Comment)}),m=f=>{p=f,r("update:modelValue",f)},h=f=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...f}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>t.options],([f,v],[y,w])=>{var O;const k=!V(v,w)||i.value!==y;i.value&&u.value&&k&&(o.value?(o.value.setOptions({...v,content:c.value?s.value:v.content}),a.value||h()):(o.value=l.markRaw(new u.value.InfoWindow({...v,content:c.value?s.value:v.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||p)&&h(),be.forEach(b=>{var E;(E=o.value)==null||E.addListener(b,_=>r(b,_))}),(O=o.value)==null||O.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(a,(f,v)=>{!o.value||f===v||(d&&(d.remove(),d=void 0),f&&(d=f.addListener("click",()=>h())))},{flush:"post"}),l.watch(()=>t.modelValue,f=>{f!==p&&(f?h():g())})}),l.onBeforeUnmount(()=>{var f;d&&d.remove(),o.value&&((f=u.value)==null||f.event.clearInstanceListeners(o.value),g())}),n({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:c,open:h,close:g}}});const Pt={key:0,class:"info-window-wrapper"};function At(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Pt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const qt=F(Tt,[["render",At],["__scopeId","data-v-d182c1f9"]]);var Lt=Object.getOwnPropertyNames,xt=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty;function Me(t,e){return function(n,o,s){return t(n,o,s)&&e(n,o,s)}}function H(t){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,o);var s=o.cache,i=s.get(r),u=s.get(n);if(i&&u)return i===n&&u===r;s.set(r,n),s.set(n,r);var a=t(r,n,o);return s.delete(r),s.delete(n),a}}function Oe(t){return Lt(t).concat(xt(t))}var Rt=Object.hasOwn||function(t,e){return jt.call(t,e)};function I(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var It="__v",Nt="__o",Bt="_owner",Se=Object.getOwnPropertyDescriptor,Te=Object.keys;function $t(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function Dt(t,e){return I(t.getTime(),e.getTime())}function Ut(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Zt(t,e){return t===e}function Pe(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.entries(),i,u,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),p=!1,c=0;(u=d.next())&&!u.done;){if(o[c]){c++;continue}var m=i.value,h=u.value;if(r.equals(m[0],h[0],a,c,t,e,r)&&r.equals(m[1],h[1],m[0],h[0],t,e,r)){p=o[c]=!0;break}c++}if(!p)return!1;a++}return!0}var Vt=I;function Gt(t,e,r){var n=Te(t),o=n.length;if(Te(e).length!==o)return!1;for(;o-- >0;)if(!Ue(t,e,r,n[o]))return!1;return!0}function $(t,e,r){var n=Oe(t),o=n.length;if(Oe(e).length!==o)return!1;for(var s,i,u;o-- >0;)if(s=n[o],!Ue(t,e,r,s)||(i=Se(t,s),u=Se(e,s),(i||u)&&(!i||!u||i.configurable!==u.configurable||i.enumerable!==u.enumerable||i.writable!==u.writable)))return!1;return!0}function Ft(t,e){return I(t.valueOf(),e.valueOf())}function zt(t,e){return t.source===e.source&&t.flags===e.flags}function Ae(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.values(),i,u;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,p=0;(u=a.next())&&!u.done;){if(!o[p]&&r.equals(i.value,u.value,i.value,u.value,t,e,r)){d=o[p]=!0;break}p++}if(!d)return!1}return!0}function Wt(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 Ht(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 Ue(t,e,r,n){return(n===Bt||n===Nt||n===It)&&(t.$$typeof||e.$$typeof)?!0:Rt(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var Kt="[object Arguments]",Xt="[object Boolean]",Yt="[object Date]",Jt="[object Error]",Qt="[object Map]",er="[object Number]",tr="[object Object]",rr="[object RegExp]",nr="[object Set]",or="[object String]",sr="[object URL]",ar=Array.isArray,qe=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Le=Object.assign,ir=Object.prototype.toString.call.bind(Object.prototype.toString);function lr(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,o=t.areFunctionsEqual,s=t.areMapsEqual,i=t.areNumbersEqual,u=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,d=t.areRegExpsEqual,p=t.areSetsEqual,c=t.areTypedArraysEqual,m=t.areUrlsEqual;return function(g,f,v){if(g===f)return!0;if(g==null||f==null)return!1;var y=typeof g;if(y!==typeof f)return!1;if(y!=="object")return y==="number"?i(g,f,v):y==="function"?o(g,f,v):!1;var w=g.constructor;if(w!==f.constructor)return!1;if(w===Object)return u(g,f,v);if(ar(g))return e(g,f,v);if(qe!=null&&qe(g))return c(g,f,v);if(w===Date)return r(g,f,v);if(w===RegExp)return d(g,f,v);if(w===Map)return s(g,f,v);if(w===Set)return p(g,f,v);var k=ir(g);return k===Yt?r(g,f,v):k===rr?d(g,f,v):k===Qt?s(g,f,v):k===nr?p(g,f,v):k===tr?typeof g.then!="function"&&typeof f.then!="function"&&u(g,f,v):k===sr?m(g,f,v):k===Jt?n(g,f,v):k===Kt?u(g,f,v):k===Xt||k===er||k===or?a(g,f,v):!1}}function ur(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,o={areArraysEqual:n?$:$t,areDatesEqual:Dt,areErrorsEqual:Ut,areFunctionsEqual:Zt,areMapsEqual:n?Me(Pe,$):Pe,areNumbersEqual:Vt,areObjectsEqual:n?$:Gt,arePrimitiveWrappersEqual:Ft,areRegExpsEqual:zt,areSetsEqual:n?Me(Ae,$):Ae,areTypedArraysEqual:n?$:Wt,areUrlsEqual:Ht};if(r&&(o=Le({},o,r(o))),e){var s=H(o.areArraysEqual),i=H(o.areMapsEqual),u=H(o.areObjectsEqual),a=H(o.areSetsEqual);o=Le({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:u,areSetsEqual:a})}return o}function cr(t){return function(e,r,n,o,s,i,u){return t(e,r,u)}}function dr(t){var e=t.circular,r=t.comparator,n=t.createState,o=t.equals,s=t.strict;if(n)return function(a,d){var p=n(),c=p.cache,m=c===void 0?e?new WeakMap:void 0:c,h=p.meta;return r(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return r(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return r(a,d,i)}}var Y=j();j({strict:!0});j({circular:!0});j({circular:!0,strict:!0});j({createInternalComparator:function(){return I}});j({strict:!0,createInternalComparator:function(){return I}});j({circular:!0,createInternalComparator:function(){return I}});j({circular:!0,createInternalComparator:function(){return I},strict:!0});function j(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,o=t.createState,s=t.strict,i=s===void 0?!1:s,u=ur(t),a=lr(u),d=n?n(a):cr(a);return dr({circular:r,comparator:a,createState:o,equals:d,strict:i})}const xe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],re=1,D=8;class pe{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==re)throw new Error(`Got v${o} data when expected v${re}.`);const s=xe[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new pe(u,i,s,e)}constructor(e,r=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=xe.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-u%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(D+i+u+a),this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(re<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ie(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:u}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const p=a.pop()||0,c=a.pop()||0,m=a.pop()||0;if(c-m<=u){for(let v=m;v<=c;v++){const y=i[2*v],w=i[2*v+1];y>=e&&y<=n&&w>=r&&w<=o&&d.push(s[v])}continue}const h=m+c>>1,g=i[2*h],f=i[2*h+1];g>=e&&g<=n&&f>=r&&f<=o&&d.push(s[h]),(p===0?e<=g:r<=f)&&(a.push(m),a.push(h-1),a.push(1-p)),(p===0?n>=g:o>=f)&&(a.push(h+1),a.push(c),a.push(1-p))}return d}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,u=[0,o.length-1,0],a=[],d=n*n;for(;u.length;){const p=u.pop()||0,c=u.pop()||0,m=u.pop()||0;if(c-m<=i){for(let v=m;v<=c;v++)je(s[2*v],s[2*v+1],e,r)<=d&&a.push(o[v]);continue}const h=m+c>>1,g=s[2*h],f=s[2*h+1];je(g,f,e,r)<=d&&a.push(o[h]),(p===0?e-n<=g:r-n<=f)&&(u.push(m),u.push(h-1),u.push(1-p)),(p===0?e+n>=g:r+n>=f)&&(u.push(h+1),u.push(c),u.push(1-p))}return a}}function ie(t,e,r,n,o,s){if(o-n<=r)return;const i=n+o>>1;Ze(t,e,i,n,o,s),ie(t,e,r,n,i-1,1-s),ie(t,e,r,i+1,o,1-s)}function Ze(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const d=o-n+1,p=r-n+1,c=Math.log(d),m=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*m*(d-m)/d)*(p-d/2<0?-1:1),g=Math.max(n,Math.floor(r-p*m/d+h)),f=Math.min(o,Math.floor(r+(d-p)*m/d+h));Ze(t,e,r,g,f,s)}const i=e[2*r+s];let u=n,a=o;for(U(t,e,n,r),e[2*o+s]>i&&U(t,e,n,o);u<a;){for(U(t,e,u,a),u++,a--;e[2*u+s]<i;)u++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?U(t,e,n,a):(a++,U(t,e,a,o)),a<=r&&(n=a+1),r<=a&&(o=a-1)}}function U(t,e,r,n){ne(t,r,n),ne(e,2*r,2*n),ne(e,2*r+1,2*n+1)}function ne(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function je(t,e,r,n){const o=t-r,s=e-n;return o*o+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},Re=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),R=2,A=3,oe=4,P=5,Ve=6;class Ge{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:n,maxZoom:o}=this.options;r&&console.time("total time");const s=`prepare ${e.length} points`;r&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[p,c]=d.geometry.coordinates,m=Re(K(p)),h=Re(X(c));i.push(m,h,1/0,a,-1,1),this.options.reduce&&i.push(0)}let u=this.trees[o+1]=this._createTree(i);r&&console.timeEnd(s);for(let a=o;a>=n;a--){const d=+Date.now();u=this.trees[a]=this._createTree(this._cluster(u,a)),r&&console.log("z%d: %d clusters in %dms",a,u.numItems,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const c=this.getClusters([n,o,180,i],r),m=this.getClusters([-180,o,s,i],r);return c.concat(m)}const u=this.trees[this._limitZoom(r)],a=u.range(K(n),X(i),K(s),X(o)),d=u.data,p=[];for(const c of a){const m=this.stride*c;p.push(d[m+P]>1?Ie(d,m,this.clusterProps):this.points[d[m+A]])}return p}getChildren(e){const r=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(r*this.stride>=i.length)throw new Error(o);const u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[r*this.stride],d=i[r*this.stride+1],p=s.within(a,d,u),c=[];for(const m of p){const h=m*this.stride;i[h+oe]===e&&c.push(i[h+P]>1?Ie(i,h,this.clusterProps):this.points[i[h+A]])}if(c.length===0)throw new Error(o);return c}getLeaves(e,r,n){r=r||10,n=n||0;const o=[];return this._appendLeaves(o,e,r,n,0),o}getTile(e,r,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:u}=this.options,a=u/i,d=(n-a)/s,p=(n+1+a)/s,c={features:[]};return this._addTileFeatures(o.range((r-a)/s,d,(r+1+a)/s,p),o.data,r,n,s,c),r===0&&this._addTileFeatures(o.range(1-a/s,d,1,p),o.data,s,n,s,c),r===s-1&&this._addTileFeatures(o.range(0,d,a/s,p),o.data,-1,n,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,o,s){const i=this.getChildren(r);for(const u of i){const a=u.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(u),e.length===n)break}return s}_createTree(e){const r=new pe(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,o,s,i){for(const u of e){const a=u*this.stride,d=r[a+P]>1;let p,c,m;if(d)p=Fe(r,a,this.clusterProps),c=r[a],m=r[a+1];else{const f=this.points[r[a+A]];p=f.properties;const[v,y]=f.geometry.coordinates;c=K(v),m=X(y)}const h={type:1,geometry:[[Math.round(this.options.extent*(c*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:p};let g;d||this.options.generateId?g=r[a+A]:g=this.points[r[a+A]].id,g!==void 0&&(h.id=g),i.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,u=n/(o*Math.pow(2,r)),a=e.data,d=[],p=this.stride;for(let c=0;c<a.length;c+=p){if(a[c+R]<=r)continue;a[c+R]=r;const m=a[c],h=a[c+1],g=e.within(a[c],a[c+1],u),f=a[c+P];let v=f;for(const y of g){const w=y*p;a[w+R]>r&&(v+=a[w+P])}if(v>f&&v>=i){let y=m*f,w=h*f,k,O=-1;const b=((c/p|0)<<5)+(r+1)+this.points.length;for(const E of g){const _=E*p;if(a[_+R]<=r)continue;a[_+R]=r;const M=a[_+P];y+=a[_]*M,w+=a[_+1]*M,a[_+oe]=b,s&&(k||(k=this._map(a,c,!0),O=this.clusterProps.length,this.clusterProps.push(k)),s(k,this._map(a,_)))}a[c+oe]=b,d.push(y/v,w/v,1/0,b,-1,v),s&&d.push(O)}else{for(let y=0;y<p;y++)d.push(a[c+y]);if(v>1)for(const y of g){const w=y*p;if(!(a[w+R]<=r)){a[w+R]=r;for(let k=0;k<p;k++)d.push(a[w+k])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+P]>1){const i=this.clusterProps[e[r+Ve]];return n?Object.assign({},i):i}const o=this.points[e[r+A]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Ie(t,e,r){return{type:"Feature",id:t[e+A],properties:Fe(t,e,r),geometry:{type:"Point",coordinates:[pr(t[e]),mr(t[e+1])]}}}function Fe(t,e,r){const n=t[e+P],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=t[e+Ve],i=s===-1?{}:Object.assign({},r[s]);return Object.assign(i,{cluster:!0,cluster_id:t[e+A],point_count:n,point_count_abbreviated:o})}function K(t){return t/360+.5}function X(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 pr(t){return(t-.5)*360}function mr(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function me(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}class C{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 G{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(C.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>C.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(C.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function S(t,e="assertion failed"){if(t==null)throw Error(e)}const hr=(t,e,r,n)=>{const o=t.getBounds();S(o);const s=ze(o,e,n);return r.filter(i=>s.contains(C.getPosition(i)))},ze=(t,e,r)=>{const{northEast:n,southWest:o}=vr(t,e),s=yr({northEast:n,southWest:o},r);return wr(s,e)},gr=(t,e,r)=>{const n=ze(t,e,r),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},vr=(t,e)=>{const r=e.fromLatLngToDivPixel(t.getNorthEast()),n=e.fromLatLngToDivPixel(t.getSouthWest());return S(r),S(n),{northEast:r,southWest:n}},yr=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),wr=({northEast:t,southWest:e},r)=>{const n=r.fromDivPixelToLatLng(e),o=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(n,o)};class We{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return kr(e)}}class Er extends We{constructor(e){var{viewportPadding:r=60}=e,n=me(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=r}calculate({markers:e,map:r,mapCanvasProjection:n}){const o=r.getZoom();return S(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:hr(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}const kr=t=>t.map(r=>new G({position:C.getPosition(r),markers:[r]}));class _r extends We{constructor(e){var{maxZoom:r,radius:n=60}=e,o=me(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Ge(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let r=!1,n=e.map.getZoom();S(n),n=Math.round(n);const o={zoom:n};if(!Y(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const u=C.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!Y(this.state,o)),this.state=o,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return S(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new G({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new G({markers:[o],position:C.getPosition(o)})}}class Cr extends Er{constructor(e){var{maxZoom:r,radius:n=60,viewportPadding:o=60}=e,s=me(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:r,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Ge(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const r=this.getViewportState(e);let n=!Y(this.state,r);if(!Y(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=C.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=r),{clusters:this.clusters,changed:n}}cluster(e){const r=this.getViewportState(e);return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new G({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new G({markers:[o],position:C.getPosition(o)})}getViewportState(e){const r=e.map.getZoom(),n=e.map.getBounds();return S(r),S(n),{zoom:Math.round(r),view:gr(n,e.mapCanvasProjection,this.viewportPadding)}}}class br{constructor(e,r){this.markers={sum:e.length};const n=r.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:r.length,markers:{mean:o/r.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class Mr{render({count:e,position:r},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
1
+ (function(){var e;"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-fe75431f]{display:none}.mapdiv .info-window-wrapper[data-v-fe75431f]{display:inline-block}.custom-marker-wrapper[data-v-574a274a]{display:none}.mapdiv .custom-marker-wrapper[data-v-574a274a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
+ "use strict";var Xe=Object.defineProperty;var Ye=(t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var W=(t,e,r)=>(Ye(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),L=Symbol("map"),x=Symbol("api"),ue=Symbol("marker"),ce=Symbol("markerCluster"),Q=Symbol("CustomMarker"),de=Symbol("mapTilesLoaded"),N=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Je(t,e){t.src=e}const Qe=t=>{var e,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",u="__ib__",a=document,d=window,p=d[s]||(d[s]={}),c=p.maps||(p.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(f,v)=>{var y;await(r=a.createElement("script")),h.set("libraries",[...m]+"");for(n in t)h.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),t[n]);h.set("callback",s+".maps."+u),Je(r,"https://maps.googleapis.com/maps/api/js?"+h),c[u]=f,r.onerror=()=>e=v(Error(o+" could not load.")),r.nonce=((y=a.querySelector("script[nonce]"))==null?void 0:y.nonce)||"",a.head.append(r)}));c[i]?console.warn(o+" only loads once. Ignoring:",t):c[i]=(f,...v)=>m.add(f)&&g().then(()=>c[i](f,...v))},et=t=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(t)}) will be ignored.`,tt=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.`,rt="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",nt="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",fe=process.env.NODE_ENV!=="production"?t=>{console.warn(`[@googlemaps/js-api-loader] ${t}`)}:()=>{},ot=process.env.NODE_ENV!=="production"?t=>{console.info(`[@googlemaps/js-api-loader] ${t}`)}:()=>{};let ae=!1;function st(t){if(ae){fe(et(t));return}it(t),ae=!0}async function at(t){var e,r;if(ae||fe(rt),!((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 it(t){var r,n;const e=!!((n=(r=window.google)==null?void 0:r.maps)!=null&&n.importLibrary);e?ot(tt(t)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&fe(nt),e||Qe(t)}function lt(t){return class extends t.OverlayView{constructor(n){super();W(this,"element");W(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,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 n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const u=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${u}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let ge=!1;const ve=["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"],ut=l.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:ve,setup(t,{emit:e}){const r=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(L,o),l.provide(x,s),l.provide(de,i);const u=()=>{const c={...t};Object.keys(c).forEach(f=>{c[f]===void 0&&delete c[f]});const h=f=>{var v;return f?{position:(v=s.value)==null?void 0:v.ControlPosition[f]}:{}},g={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:h(t.panControlPosition),zoomControlOptions:h(t.zoomControlPosition),rotateControlOptions:h(t.rotateControlPosition),streetViewControlOptions:h(t.streetViewControlPosition),fullscreenControlOptions:h(t.fullscreenControlPosition),cameraControlOptions:h(t.cameraControlPosition),disableDefaultUI:t.disableDefaultUi};return{...c,...g}},a=l.watch([s,o],([c,m])=>{const h=c,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:c,region:m,version:h,language:g,libraries:f}=t;st({key:c,region:m,v:h,language:g,libraries:f})},p=c=>{const m=c?c.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(r.value,u()));const h=lt(s.value);s.value[Q]=h,ve.forEach(f=>{var v;(v=o.value)==null||v.addListener(f,y=>e(f,y))}),n.value=!0;const g=Object.keys(t).filter(f=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(f)).map(f=>l.toRef(t,f));l.watch([()=>t.center,()=>t.zoom,...g],([f,v],[y,w])=>{var _,M,T;const{center:E,zoom:O,...b}=u();(_=o.value)==null||_.setOptions(b),v!==void 0&&v!==w&&((M=o.value)==null||M.setZoom(v));const k=!y||f.lng!==y.lng||f.lat!==y.lat;f&&k&&((T=o.value)==null||T.panTo(f))})};return l.onMounted(()=>{if(t.apiPromise&&t.apiPromise instanceof Promise)t.apiPromise.then(p);else{ge||(d(),ge=!0);const c=t.libraries&&t.libraries.length>0?t.libraries:["maps","marker"];Promise.all(c.map(m=>at(m))).then(()=>p())}}),l.onBeforeUnmount(()=>{var c;i.value=!1,o.value&&((c=s.value)==null||c.event.clearInstanceListeners(o.value))}),{mapRef:r,ready:n,map:o,api:s,mapTilesLoaded:i}}});const F=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},ct={ref:"mapRef",class:"mapdiv"};function dt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",ct,null,512),l.renderSlot(t.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0,!0)])}const ft=F(ut,[["render",dt],["__scopeId","data-v-c63ff230"]]);function pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mt=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 n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))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),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r};const V=pt(mt),ye=["click","drag","dragend","dragstart","gmp-click"],ht=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:ye,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.computed(()=>{var h;return(h=n.content)==null?void 0:h.call(n).some(g=>g.type!==l.Comment)}),i=l.toRef(t,"options"),u=l.toRef(t,"pinOptions"),a=l.ref(),d=l.inject(L,l.ref()),p=l.inject(x,l.ref()),c=l.inject(ce,l.ref()),m=l.computed(()=>!!(c.value&&p.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,u,o],async(h,[g,f,v,y])=>{var _,M,T;const w=!V(i.value,f)||!V(u.value,v),E=o.value!==y,O=w||E||d.value!==g;if(!d.value||!p.value||!O||s.value&&!o.value)return;const{AdvancedMarkerElement:b,PinElement:k}=p.value.marker;if(a.value){const{map:ee,content:z,...te}=i.value;Object.assign(a.value,{content:s.value?o.value:u.value?new k(u.value).element:z,...te}),m.value&&((_=c.value)==null||_.removeMarker(a.value),(M=c.value)==null||M.addMarker(a.value))}else s.value?i.value.content=o.value:u.value&&(i.value.content=new k(u.value).element),a.value=l.markRaw(new b(i.value)),m.value?(T=c.value)==null||T.addMarker(a.value):a.value.map=d.value,ye.forEach(ee=>{var z;(z=a.value)==null||z.addListener(ee,te=>e(ee,te))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var h,g;a.value&&((h=p.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=c.value)==null||g.removeMarker(a.value):a.value.map=null)}),l.provide(ue,a),r({marker:a}),{hasCustomSlotContent:s,markerRef:o}}});const gt={key:0,class:"advanced-marker-wrapper"};function vt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[t.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",gt,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},t.$attrs),[l.renderSlot(t.$slots,"content")],16)])):l.createCommentVNode("",!0),l.renderSlot(t.$slots,"default")],64)}const yt=F(ht,[["render",vt]]),we=t=>t==="Marker",ke=t=>t===Q,B=(t,e,r,n)=>{const o=l.ref(),s=l.inject(L,l.ref()),i=l.inject(x,l.ref()),u=l.inject(ce,l.ref()),a=l.computed(()=>!!(u.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[Q])));return l.watch([s,r],(d,[p,c])=>{var h,g,f;const m=!V(r.value,c)||s.value!==p;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(r.value),a.value&&((h=u.value)==null||h.removeMarker(o.value),(g=u.value)==null||g.addMarker(o.value));else{if(we(t))o.value=l.markRaw(new i.value[t](r.value));else if(ke(t)){const v=r.value;v.element&&(o.value=l.markRaw(new i.value[t](v)))}else o.value=l.markRaw(new i.value[t]({...r.value,map:s.value}));o.value&&(a.value?(f=u.value)==null||f.addMarker(o.value):(we(t)||ke(t))&&o.value.setMap(s.value)),e.forEach(v=>{var y;(y=o.value)==null||y.addListener(v,w=>n(v,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,p;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(p=u.value)==null||p.removeMarker(o.value):o.value.setMap(null))}),o},Ee=["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"],wt=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:Ee,setup(t,{emit:e,expose:r,slots:n}){const o=l.toRef(t,"options"),s=B("Marker",Ee,o,e);return l.provide(ue,s),r({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),kt=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:N,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polyline:B("Polyline",N,r,e)}},render:()=>null}),Et=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:N,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polygon:B("Polygon",N,r,e)}},render:()=>null}),_e=N.concat(["bounds_changed"]),_t=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:_e,setup(t,{emit:e}){const r=l.toRef(t,"options");return{rectangle:B("Rectangle",_e,r,e)}},render:()=>null}),Ce=N.concat(["center_changed","radius_changed"]),Ct=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:Ce,setup(t,{emit:e}){const r=l.toRef(t,"options");return{circle:B("Circle",Ce,r,e)}},render:()=>null}),bt=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(t,{emit:e}){const r=l.ref(null),n=l.inject(L,l.ref()),o=l.inject(x,l.ref()),s=l.inject(de,l.ref(!1)),i=l.watch([s,o,r],([d,p,c])=>{p&&d&&c&&(u(t.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),u=d=>{if(n.value&&o.value&&r.value){const p=o.value.ControlPosition[d];r.value.index=t.index,n.value.controls[p].push(r.value)}},a=d=>{if(n.value&&o.value){let p=null;const c=o.value.ControlPosition[d];n.value.controls[c].forEach((m,h)=>{m===r.value&&(p=h)}),p!==null&&n.value.controls[c].removeAt(p)}};return l.onBeforeUnmount(()=>a(t.position)),l.watch(()=>t.position,(d,p)=>{a(p),u(d)}),l.watch(()=>t.index,d=>{r.value&&(r.value.index=d)}),{controlRef:r}}});const Mt={ref:"controlRef",class:"custom-control-wrapper"};function Ot(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",Mt,[l.renderSlot(t.$slots,"default",{},void 0,!0)],512)}const St=F(bt,[["render",Ot],["__scopeId","data-v-ab9120cd"]]),be=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],Tt=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...be,"update:modelValue"],setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(L,l.ref()),u=l.inject(x,l.ref()),a=l.inject(ue,l.ref());let d,p=t.modelValue;const c=l.computed(()=>{var f;return(f=e.default)==null?void 0:f.call(e).some(v=>v.type!==l.Comment)}),m=f=>{p=f,r("update:modelValue",f)},h=f=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...f}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>t.options],([f,v],[y,w])=>{var O;const E=!V(v,w)||i.value!==y;i.value&&u.value&&E&&(o.value?(o.value.setOptions({...v,content:c.value?s.value:v.content}),a.value||h()):(o.value=l.markRaw(new u.value.InfoWindow({...v,content:c.value?s.value:v.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||p)&&h(),be.forEach(b=>{var k;(k=o.value)==null||k.addListener(b,_=>r(b,_))}),(O=o.value)==null||O.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(a,(f,v)=>{!o.value||f===v||(d&&(d.remove(),d=void 0),f&&(d=f.addListener("click",()=>h())))},{flush:"post"}),l.watch(()=>t.modelValue,f=>{f!==p&&(f?h():g())})}),l.onBeforeUnmount(()=>{var f;d&&d.remove(),o.value&&((f=u.value)==null||f.event.clearInstanceListeners(o.value),g())}),n({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:c,open:h,close:g}}});const Pt={key:0,class:"info-window-wrapper"};function At(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Pt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const qt=F(Tt,[["render",At],["__scopeId","data-v-fe75431f"]]);var Lt=Object.getOwnPropertyNames,xt=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty;function Me(t,e){return function(n,o,s){return t(n,o,s)&&e(n,o,s)}}function H(t){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,o);var s=o.cache,i=s.get(r),u=s.get(n);if(i&&u)return i===n&&u===r;s.set(r,n),s.set(n,r);var a=t(r,n,o);return s.delete(r),s.delete(n),a}}function Oe(t){return Lt(t).concat(xt(t))}var Rt=Object.hasOwn||function(t,e){return jt.call(t,e)};function I(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var It="__v",Nt="__o",Bt="_owner",Se=Object.getOwnPropertyDescriptor,Te=Object.keys;function $t(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function Dt(t,e){return I(t.getTime(),e.getTime())}function Ut(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Zt(t,e){return t===e}function Pe(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.entries(),i,u,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),p=!1,c=0;(u=d.next())&&!u.done;){if(o[c]){c++;continue}var m=i.value,h=u.value;if(r.equals(m[0],h[0],a,c,t,e,r)&&r.equals(m[1],h[1],m[0],h[0],t,e,r)){p=o[c]=!0;break}c++}if(!p)return!1;a++}return!0}var Vt=I;function Gt(t,e,r){var n=Te(t),o=n.length;if(Te(e).length!==o)return!1;for(;o-- >0;)if(!Ue(t,e,r,n[o]))return!1;return!0}function $(t,e,r){var n=Oe(t),o=n.length;if(Oe(e).length!==o)return!1;for(var s,i,u;o-- >0;)if(s=n[o],!Ue(t,e,r,s)||(i=Se(t,s),u=Se(e,s),(i||u)&&(!i||!u||i.configurable!==u.configurable||i.enumerable!==u.enumerable||i.writable!==u.writable)))return!1;return!0}function Ft(t,e){return I(t.valueOf(),e.valueOf())}function zt(t,e){return t.source===e.source&&t.flags===e.flags}function Ae(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.values(),i,u;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,p=0;(u=a.next())&&!u.done;){if(!o[p]&&r.equals(i.value,u.value,i.value,u.value,t,e,r)){d=o[p]=!0;break}p++}if(!d)return!1}return!0}function Wt(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 Ht(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 Ue(t,e,r,n){return(n===Bt||n===Nt||n===It)&&(t.$$typeof||e.$$typeof)?!0:Rt(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var Kt="[object Arguments]",Xt="[object Boolean]",Yt="[object Date]",Jt="[object Error]",Qt="[object Map]",er="[object Number]",tr="[object Object]",rr="[object RegExp]",nr="[object Set]",or="[object String]",sr="[object URL]",ar=Array.isArray,qe=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Le=Object.assign,ir=Object.prototype.toString.call.bind(Object.prototype.toString);function lr(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,o=t.areFunctionsEqual,s=t.areMapsEqual,i=t.areNumbersEqual,u=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,d=t.areRegExpsEqual,p=t.areSetsEqual,c=t.areTypedArraysEqual,m=t.areUrlsEqual;return function(g,f,v){if(g===f)return!0;if(g==null||f==null)return!1;var y=typeof g;if(y!==typeof f)return!1;if(y!=="object")return y==="number"?i(g,f,v):y==="function"?o(g,f,v):!1;var w=g.constructor;if(w!==f.constructor)return!1;if(w===Object)return u(g,f,v);if(ar(g))return e(g,f,v);if(qe!=null&&qe(g))return c(g,f,v);if(w===Date)return r(g,f,v);if(w===RegExp)return d(g,f,v);if(w===Map)return s(g,f,v);if(w===Set)return p(g,f,v);var E=ir(g);return E===Yt?r(g,f,v):E===rr?d(g,f,v):E===Qt?s(g,f,v):E===nr?p(g,f,v):E===tr?typeof g.then!="function"&&typeof f.then!="function"&&u(g,f,v):E===sr?m(g,f,v):E===Jt?n(g,f,v):E===Kt?u(g,f,v):E===Xt||E===er||E===or?a(g,f,v):!1}}function ur(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,o={areArraysEqual:n?$:$t,areDatesEqual:Dt,areErrorsEqual:Ut,areFunctionsEqual:Zt,areMapsEqual:n?Me(Pe,$):Pe,areNumbersEqual:Vt,areObjectsEqual:n?$:Gt,arePrimitiveWrappersEqual:Ft,areRegExpsEqual:zt,areSetsEqual:n?Me(Ae,$):Ae,areTypedArraysEqual:n?$:Wt,areUrlsEqual:Ht};if(r&&(o=Le({},o,r(o))),e){var s=H(o.areArraysEqual),i=H(o.areMapsEqual),u=H(o.areObjectsEqual),a=H(o.areSetsEqual);o=Le({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:u,areSetsEqual:a})}return o}function cr(t){return function(e,r,n,o,s,i,u){return t(e,r,u)}}function dr(t){var e=t.circular,r=t.comparator,n=t.createState,o=t.equals,s=t.strict;if(n)return function(a,d){var p=n(),c=p.cache,m=c===void 0?e?new WeakMap:void 0:c,h=p.meta;return r(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return r(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return r(a,d,i)}}var Y=j();j({strict:!0});j({circular:!0});j({circular:!0,strict:!0});j({createInternalComparator:function(){return I}});j({strict:!0,createInternalComparator:function(){return I}});j({circular:!0,createInternalComparator:function(){return I}});j({circular:!0,createInternalComparator:function(){return I},strict:!0});function j(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,o=t.createState,s=t.strict,i=s===void 0?!1:s,u=ur(t),a=lr(u),d=n?n(a):cr(a);return dr({circular:r,comparator:a,createState:o,equals:d,strict:i})}const xe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],re=1,D=8;class pe{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==re)throw new Error(`Got v${o} data when expected v${re}.`);const s=xe[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[u]=new Uint32Array(e,4,1);return new pe(u,i,s,e)}constructor(e,r=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=xe.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,u=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-u%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(D+i+u+a),this.ids=new this.IndexArrayType(this.data,D,e),this.coords=new this.ArrayType(this.data,D+u+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(re<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ie(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:u}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const p=a.pop()||0,c=a.pop()||0,m=a.pop()||0;if(c-m<=u){for(let v=m;v<=c;v++){const y=i[2*v],w=i[2*v+1];y>=e&&y<=n&&w>=r&&w<=o&&d.push(s[v])}continue}const h=m+c>>1,g=i[2*h],f=i[2*h+1];g>=e&&g<=n&&f>=r&&f<=o&&d.push(s[h]),(p===0?e<=g:r<=f)&&(a.push(m),a.push(h-1),a.push(1-p)),(p===0?n>=g:o>=f)&&(a.push(h+1),a.push(c),a.push(1-p))}return d}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,u=[0,o.length-1,0],a=[],d=n*n;for(;u.length;){const p=u.pop()||0,c=u.pop()||0,m=u.pop()||0;if(c-m<=i){for(let v=m;v<=c;v++)je(s[2*v],s[2*v+1],e,r)<=d&&a.push(o[v]);continue}const h=m+c>>1,g=s[2*h],f=s[2*h+1];je(g,f,e,r)<=d&&a.push(o[h]),(p===0?e-n<=g:r-n<=f)&&(u.push(m),u.push(h-1),u.push(1-p)),(p===0?e+n>=g:r+n>=f)&&(u.push(h+1),u.push(c),u.push(1-p))}return a}}function ie(t,e,r,n,o,s){if(o-n<=r)return;const i=n+o>>1;Ze(t,e,i,n,o,s),ie(t,e,r,n,i-1,1-s),ie(t,e,r,i+1,o,1-s)}function Ze(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const d=o-n+1,p=r-n+1,c=Math.log(d),m=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*m*(d-m)/d)*(p-d/2<0?-1:1),g=Math.max(n,Math.floor(r-p*m/d+h)),f=Math.min(o,Math.floor(r+(d-p)*m/d+h));Ze(t,e,r,g,f,s)}const i=e[2*r+s];let u=n,a=o;for(U(t,e,n,r),e[2*o+s]>i&&U(t,e,n,o);u<a;){for(U(t,e,u,a),u++,a--;e[2*u+s]<i;)u++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?U(t,e,n,a):(a++,U(t,e,a,o)),a<=r&&(n=a+1),r<=a&&(o=a-1)}}function U(t,e,r,n){ne(t,r,n),ne(e,2*r,2*n),ne(e,2*r+1,2*n+1)}function ne(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function je(t,e,r,n){const o=t-r,s=e-n;return o*o+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},Re=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),R=2,A=3,oe=4,P=5,Ve=6;class Ge{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:n,maxZoom:o}=this.options;r&&console.time("total time");const s=`prepare ${e.length} points`;r&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[p,c]=d.geometry.coordinates,m=Re(K(p)),h=Re(X(c));i.push(m,h,1/0,a,-1,1),this.options.reduce&&i.push(0)}let u=this.trees[o+1]=this._createTree(i);r&&console.timeEnd(s);for(let a=o;a>=n;a--){const d=+Date.now();u=this.trees[a]=this._createTree(this._cluster(u,a)),r&&console.log("z%d: %d clusters in %dms",a,u.numItems,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const c=this.getClusters([n,o,180,i],r),m=this.getClusters([-180,o,s,i],r);return c.concat(m)}const u=this.trees[this._limitZoom(r)],a=u.range(K(n),X(i),K(s),X(o)),d=u.data,p=[];for(const c of a){const m=this.stride*c;p.push(d[m+P]>1?Ie(d,m,this.clusterProps):this.points[d[m+A]])}return p}getChildren(e){const r=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(r*this.stride>=i.length)throw new Error(o);const u=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[r*this.stride],d=i[r*this.stride+1],p=s.within(a,d,u),c=[];for(const m of p){const h=m*this.stride;i[h+oe]===e&&c.push(i[h+P]>1?Ie(i,h,this.clusterProps):this.points[i[h+A]])}if(c.length===0)throw new Error(o);return c}getLeaves(e,r,n){r=r||10,n=n||0;const o=[];return this._appendLeaves(o,e,r,n,0),o}getTile(e,r,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:u}=this.options,a=u/i,d=(n-a)/s,p=(n+1+a)/s,c={features:[]};return this._addTileFeatures(o.range((r-a)/s,d,(r+1+a)/s,p),o.data,r,n,s,c),r===0&&this._addTileFeatures(o.range(1-a/s,d,1,p),o.data,s,n,s,c),r===s-1&&this._addTileFeatures(o.range(0,d,a/s,p),o.data,-1,n,s,c),c.features.length?c:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,o,s){const i=this.getChildren(r);for(const u of i){const a=u.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(u),e.length===n)break}return s}_createTree(e){const r=new pe(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,o,s,i){for(const u of e){const a=u*this.stride,d=r[a+P]>1;let p,c,m;if(d)p=Fe(r,a,this.clusterProps),c=r[a],m=r[a+1];else{const f=this.points[r[a+A]];p=f.properties;const[v,y]=f.geometry.coordinates;c=K(v),m=X(y)}const h={type:1,geometry:[[Math.round(this.options.extent*(c*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:p};let g;d||this.options.generateId?g=r[a+A]:g=this.points[r[a+A]].id,g!==void 0&&(h.id=g),i.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,u=n/(o*Math.pow(2,r)),a=e.data,d=[],p=this.stride;for(let c=0;c<a.length;c+=p){if(a[c+R]<=r)continue;a[c+R]=r;const m=a[c],h=a[c+1],g=e.within(a[c],a[c+1],u),f=a[c+P];let v=f;for(const y of g){const w=y*p;a[w+R]>r&&(v+=a[w+P])}if(v>f&&v>=i){let y=m*f,w=h*f,E,O=-1;const b=((c/p|0)<<5)+(r+1)+this.points.length;for(const k of g){const _=k*p;if(a[_+R]<=r)continue;a[_+R]=r;const M=a[_+P];y+=a[_]*M,w+=a[_+1]*M,a[_+oe]=b,s&&(E||(E=this._map(a,c,!0),O=this.clusterProps.length,this.clusterProps.push(E)),s(E,this._map(a,_)))}a[c+oe]=b,d.push(y/v,w/v,1/0,b,-1,v),s&&d.push(O)}else{for(let y=0;y<p;y++)d.push(a[c+y]);if(v>1)for(const y of g){const w=y*p;if(!(a[w+R]<=r)){a[w+R]=r;for(let E=0;E<p;E++)d.push(a[w+E])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+P]>1){const i=this.clusterProps[e[r+Ve]];return n?Object.assign({},i):i}const o=this.points[e[r+A]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Ie(t,e,r){return{type:"Feature",id:t[e+A],properties:Fe(t,e,r),geometry:{type:"Point",coordinates:[pr(t[e]),mr(t[e+1])]}}}function Fe(t,e,r){const n=t[e+P],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=t[e+Ve],i=s===-1?{}:Object.assign({},r[s]);return Object.assign(i,{cluster:!0,cluster_id:t[e+A],point_count:n,point_count_abbreviated:o})}function K(t){return t/360+.5}function X(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 pr(t){return(t-.5)*360}function mr(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function me(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}class C{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 G{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(C.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>C.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(C.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function S(t,e="assertion failed"){if(t==null)throw Error(e)}const hr=(t,e,r,n)=>{const o=t.getBounds();S(o);const s=ze(o,e,n);return r.filter(i=>s.contains(C.getPosition(i)))},ze=(t,e,r)=>{const{northEast:n,southWest:o}=vr(t,e),s=yr({northEast:n,southWest:o},r);return wr(s,e)},gr=(t,e,r)=>{const n=ze(t,e,r),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},vr=(t,e)=>{const r=e.fromLatLngToDivPixel(t.getNorthEast()),n=e.fromLatLngToDivPixel(t.getSouthWest());return S(r),S(n),{northEast:r,southWest:n}},yr=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),wr=({northEast:t,southWest:e},r)=>{const n=r.fromDivPixelToLatLng(e),o=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(n,o)};class We{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Er(e)}}class kr extends We{constructor(e){var{viewportPadding:r=60}=e,n=me(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=r}calculate({markers:e,map:r,mapCanvasProjection:n}){const o=r.getZoom();return S(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:hr(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}const Er=t=>t.map(r=>new G({position:C.getPosition(r),markers:[r]}));class _r extends We{constructor(e){var{maxZoom:r,radius:n=60}=e,o=me(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new Ge(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let r=!1,n=e.map.getZoom();S(n),n=Math.round(n);const o={zoom:n};if(!Y(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const u=C.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[u.lng(),u.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!Y(this.state,o)),this.state=o,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return S(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new G({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new G({markers:[o],position:C.getPosition(o)})}}class Cr extends kr{constructor(e){var{maxZoom:r,radius:n=60,viewportPadding:o=60}=e,s=me(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:r,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new Ge(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const r=this.getViewportState(e);let n=!Y(this.state,r);if(!Y(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=C.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=r),{clusters:this.clusters,changed:n}}cluster(e){const r=this.getViewportState(e);return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new G({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new G({markers:[o],position:C.getPosition(o)})}getViewportState(e){const r=e.map.getZoom(),n=e.map.getBounds();return S(r),S(n),{zoom:Math.round(r),view:gr(n,e.mapCanvasProjection,this.viewportPadding)}}}class br{constructor(e,r){this.markers={sum:e.length};const n=r.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:r.length,markers:{mean:o/r.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class Mr{render({count:e,position:r},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
3
3
  <circle cx="120" cy="120" opacity=".6" r="70" />
4
4
  <circle cx="120" cy="120" opacity=".3" r="90" />
5
5
  <circle cx="120" cy="120" opacity=".2" r="110" />
6
6
  <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>
7
- </svg>`,u=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(C.isAdvancedMarkerAvailable(o)){const c=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");const m={map:o,position:r,zIndex:a,title:u,content:c};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:r,zIndex:a,title:u,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function Or(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class he{constructor(){Or(he,google.maps.OverlayView)}}var q;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(q||(q={}));const Sr=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class Tr extends he{constructor({map:e,markers:r=[],algorithmOptions:n={},algorithm:o=new _r(n),renderer:s=new Mr,onClusterClick:i=Sr}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){const n=this.markers.indexOf(e);return n===-1?!1:(C.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){let n=!1;return e.forEach(o=>{n=this.removeMarker(o,!0)||n}),n&&!r&&this.render(),n}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,q.CLUSTERING_BEGIN,this);const{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const o=new Set;for(const i of r)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||C.setMap(i.marker,null):s.push(i.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>C.setMap(i,null)))}google.maps.event.trigger(this,q.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();S(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=>C.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new br(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{if(n.markers.length===1)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,r),n.markers.forEach(o=>C.setMap(o,null)),this.onClusterClick){const o=C.isAdvancedMarker(n.marker)?q.GMP_CLICK:q.CLUSTER_CLICK;n.marker.addListener(o,s=>{google.maps.event.trigger(this,q.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})}C.setMap(n.marker,r)})}}function le(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pr=typeof global=="object"&&global&&global.Object===Object&&global;const Ar=Pr;var qr=typeof self=="object"&&self&&self.Object===Object&&self,Lr=Ar||qr||Function("return this")();const He=Lr;var xr=function(){return He.Date.now()};const se=xr;var jr=/\s/;function Rr(t){for(var e=t.length;e--&&jr.test(t.charAt(e)););return e}var Ir=/^\s+/;function Nr(t){return t&&t.slice(0,Rr(t)+1).replace(Ir,"")}var Br=He.Symbol;const J=Br;var Ke=Object.prototype,$r=Ke.hasOwnProperty,Dr=Ke.toString,Z=J?J.toStringTag:void 0;function Ur(t){var e=$r.call(t,Z),r=t[Z];try{t[Z]=void 0;var n=!0}catch{}var o=Dr.call(t);return n&&(e?t[Z]=r:delete t[Z]),o}var Zr=Object.prototype,Vr=Zr.toString;function Gr(t){return Vr.call(t)}var Fr="[object Null]",zr="[object Undefined]",Ne=J?J.toStringTag:void 0;function Wr(t){return t==null?t===void 0?zr:Fr:Ne&&Ne in Object(t)?Ur(t):Gr(t)}function Hr(t){return t!=null&&typeof t=="object"}var Kr="[object Symbol]";function Xr(t){return typeof t=="symbol"||Hr(t)&&Wr(t)==Kr}var Be=0/0,Yr=/^[-+]0x[0-9a-f]+$/i,Jr=/^0b[01]+$/i,Qr=/^0o[0-7]+$/i,en=parseInt;function $e(t){if(typeof t=="number")return t;if(Xr(t))return Be;if(le(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=le(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Nr(t);var r=Jr.test(t);return r||Qr.test(t)?en(t.slice(2),r?2:8):Yr.test(t)?Be:+t}var tn="Expected a function",rn=Math.max,nn=Math.min;function on(t,e,r){var n,o,s,i,u,a,d=0,p=!1,c=!1,m=!0;if(typeof t!="function")throw new TypeError(tn);e=$e(e)||0,le(r)&&(p=!!r.leading,c="maxWait"in r,s=c?rn($e(r.maxWait)||0,e):s,m="trailing"in r?!!r.trailing:m);function h(E){var _=n,M=o;return n=o=void 0,d=E,i=t.apply(M,_),i}function g(E){return d=E,u=setTimeout(y,e),p?h(E):i}function f(E){var _=E-a,M=E-d,T=e-_;return c?nn(T,s-M):T}function v(E){var _=E-a,M=E-d;return a===void 0||_>=e||_<0||c&&M>=s}function y(){var E=se();if(v(E))return w(E);u=setTimeout(y,f(E))}function w(E){return u=void 0,m&&n?h(E):(n=o=void 0,i)}function k(){u!==void 0&&clearTimeout(u),d=0,n=a=o=u=void 0}function O(){return u===void 0?i:w(se())}function b(){var E=se(),_=v(E);if(n=arguments,o=this,a=E,_){if(u===void 0)return g(a);if(c)return clearTimeout(u),u=setTimeout(y,e),h(a)}return u===void 0&&(u=setTimeout(y,e)),i}return b.cancel=k,b.flush=O,b}class sn extends Tr{constructor(r,n=10){super(r);W(this,"debouncedRender");this.debouncedRender=on(()=>{super.render()},n,{leading:!0,trailing:!0})}addMarker(r,n){super.addMarker(r,!0),n||this.debouncedRender()}removeMarker(r,n){const o=super.removeMarker(r,!0);return n||this.debouncedRender(),o}addMarkers(r,n){super.addMarkers(r,!0),n||this.debouncedRender()}removeMarkers(r,n){const o=super.removeMarkers(r,!0);return n||this.debouncedRender(),o}clearMarkers(r){super.clearMarkers(!0),r||this.debouncedRender()}render(){this.debouncedRender.cancel(),super.render()}destroy(){this.debouncedRender.cancel()}}const De=Object.values(q),an=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})},renderDebounceDelay:{type:Number,default:10}},emits:De,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.inject(L,l.ref()),i=l.inject(x,l.ref());return l.provide(ce,o),l.watch(s,()=>{s.value&&(o.value=l.markRaw(new sn({map:s.value,algorithm:new Cr(t.options.algorithmOptions??{}),...t.options},t.renderDebounceDelay)),De.forEach(u=>{var a;(a=o.value)==null||a.addListener(u,d=>e(u,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var u;o.value&&((u=i.value)==null||u.event.clearInstanceListeners(o.value),o.value.clearMarkers(!0),o.value.setMap(null),o.value.destroy())}),r({markerCluster:o}),()=>{var u;return(u=n.default)==null?void 0:u.call(n)}}}),ln=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...t.options,element:o.value})),u=B(Q,[],i,r);return n({customMarker:u}),{customMarkerRef:o,customMarker:u,hasSlotContent:s}}});const un={key:0,class:"custom-marker-wrapper"};function cn(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",un,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:t.$attrs.onClick?"pointer":void 0}},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const dn=F(ln,[["render",cn],["__scopeId","data-v-2d2d343a"]]),fn=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(t){const e=l.ref(),r=l.inject(L,l.ref()),n=l.inject(x,l.ref());return l.watch([r,()=>t.options],([o,s],[i,u])=>{const a=!V(s,u)||r.value!==i;if(r.value&&n.value&&a){let d;if(s.data&&!(s.data instanceof n.value.MVCArray)){const p=n.value.LatLng,c=s.data.map(m=>m instanceof p||"location"in m&&(m.location instanceof p||m.location===null)?m:"location"in m?{...m,location:new p(m.location)}:new p(m));d={...s,data:c}}else d=s;e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:r.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=yt;exports.Circle=Ct;exports.CustomControl=St;exports.CustomMarker=dn;exports.GoogleMap=ft;exports.HeatmapLayer=fn;exports.InfoWindow=qt;exports.Marker=wt;exports.MarkerCluster=an;exports.Polygon=kt;exports.Polyline=Et;exports.Rectangle=_t;exports.apiSymbol=x;exports.mapSymbol=L;exports.mapTilesLoadedSymbol=de;
7
+ </svg>`,u=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(C.isAdvancedMarkerAvailable(o)){const c=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;c.setAttribute("transform","translate(0 25)");const m={map:o,position:r,zIndex:a,title:u,content:c};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:r,zIndex:a,title:u,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function Or(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class he{constructor(){Or(he,google.maps.OverlayView)}}var q;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(q||(q={}));const Sr=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class Tr extends he{constructor({map:e,markers:r=[],algorithmOptions:n={},algorithm:o=new _r(n),renderer:s=new Mr,onClusterClick:i=Sr}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){const n=this.markers.indexOf(e);return n===-1?!1:(C.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){let n=!1;return e.forEach(o=>{n=this.removeMarker(o,!0)||n}),n&&!r&&this.render(),n}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,q.CLUSTERING_BEGIN,this);const{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const o=new Set;for(const i of r)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||C.setMap(i.marker,null):s.push(i.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>C.setMap(i,null)))}google.maps.event.trigger(this,q.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();S(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=>C.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new br(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{if(n.markers.length===1)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,r),n.markers.forEach(o=>C.setMap(o,null)),this.onClusterClick){const o=C.isAdvancedMarker(n.marker)?q.GMP_CLICK:q.CLUSTER_CLICK;n.marker.addListener(o,s=>{google.maps.event.trigger(this,q.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})}C.setMap(n.marker,r)})}}function le(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pr=typeof global=="object"&&global&&global.Object===Object&&global;const Ar=Pr;var qr=typeof self=="object"&&self&&self.Object===Object&&self,Lr=Ar||qr||Function("return this")();const He=Lr;var xr=function(){return He.Date.now()};const se=xr;var jr=/\s/;function Rr(t){for(var e=t.length;e--&&jr.test(t.charAt(e)););return e}var Ir=/^\s+/;function Nr(t){return t&&t.slice(0,Rr(t)+1).replace(Ir,"")}var Br=He.Symbol;const J=Br;var Ke=Object.prototype,$r=Ke.hasOwnProperty,Dr=Ke.toString,Z=J?J.toStringTag:void 0;function Ur(t){var e=$r.call(t,Z),r=t[Z];try{t[Z]=void 0;var n=!0}catch{}var o=Dr.call(t);return n&&(e?t[Z]=r:delete t[Z]),o}var Zr=Object.prototype,Vr=Zr.toString;function Gr(t){return Vr.call(t)}var Fr="[object Null]",zr="[object Undefined]",Ne=J?J.toStringTag:void 0;function Wr(t){return t==null?t===void 0?zr:Fr:Ne&&Ne in Object(t)?Ur(t):Gr(t)}function Hr(t){return t!=null&&typeof t=="object"}var Kr="[object Symbol]";function Xr(t){return typeof t=="symbol"||Hr(t)&&Wr(t)==Kr}var Be=0/0,Yr=/^[-+]0x[0-9a-f]+$/i,Jr=/^0b[01]+$/i,Qr=/^0o[0-7]+$/i,en=parseInt;function $e(t){if(typeof t=="number")return t;if(Xr(t))return Be;if(le(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=le(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Nr(t);var r=Jr.test(t);return r||Qr.test(t)?en(t.slice(2),r?2:8):Yr.test(t)?Be:+t}var tn="Expected a function",rn=Math.max,nn=Math.min;function on(t,e,r){var n,o,s,i,u,a,d=0,p=!1,c=!1,m=!0;if(typeof t!="function")throw new TypeError(tn);e=$e(e)||0,le(r)&&(p=!!r.leading,c="maxWait"in r,s=c?rn($e(r.maxWait)||0,e):s,m="trailing"in r?!!r.trailing:m);function h(k){var _=n,M=o;return n=o=void 0,d=k,i=t.apply(M,_),i}function g(k){return d=k,u=setTimeout(y,e),p?h(k):i}function f(k){var _=k-a,M=k-d,T=e-_;return c?nn(T,s-M):T}function v(k){var _=k-a,M=k-d;return a===void 0||_>=e||_<0||c&&M>=s}function y(){var k=se();if(v(k))return w(k);u=setTimeout(y,f(k))}function w(k){return u=void 0,m&&n?h(k):(n=o=void 0,i)}function E(){u!==void 0&&clearTimeout(u),d=0,n=a=o=u=void 0}function O(){return u===void 0?i:w(se())}function b(){var k=se(),_=v(k);if(n=arguments,o=this,a=k,_){if(u===void 0)return g(a);if(c)return clearTimeout(u),u=setTimeout(y,e),h(a)}return u===void 0&&(u=setTimeout(y,e)),i}return b.cancel=E,b.flush=O,b}class sn extends Tr{constructor(r,n=10){super(r);W(this,"debouncedRender");this.debouncedRender=on(()=>{super.render()},n,{leading:!0,trailing:!0})}addMarker(r,n){super.addMarker(r,!0),n||this.debouncedRender()}removeMarker(r,n){const o=super.removeMarker(r,!0);return n||this.debouncedRender(),o}addMarkers(r,n){super.addMarkers(r,!0),n||this.debouncedRender()}removeMarkers(r,n){const o=super.removeMarkers(r,!0);return n||this.debouncedRender(),o}clearMarkers(r){super.clearMarkers(!0),r||this.debouncedRender()}render(){this.debouncedRender.cancel(),super.render()}destroy(){this.debouncedRender.cancel()}}class an extends Cr{calculate(e){return e.markers.length===0?{clusters:[],changed:!0}:super.calculate(e)}}const De=Object.values(q),ln=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})},renderDebounceDelay:{type:Number,default:10}},emits:De,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.inject(L,l.ref()),i=l.inject(x,l.ref());return l.provide(ce,o),l.watch(s,()=>{s.value&&(o.value=l.markRaw(new sn({map:s.value,algorithm:new an(t.options.algorithmOptions??{}),...t.options},t.renderDebounceDelay)),De.forEach(u=>{var a;(a=o.value)==null||a.addListener(u,d=>e(u,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var u;o.value&&((u=i.value)==null||u.event.clearInstanceListeners(o.value),o.value.clearMarkers(!0),o.value.setMap(null),o.value.destroy())}),r({markerCluster:o}),()=>{var u;return(u=n.default)==null?void 0:u.call(n)}}}),un=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...t.options,element:o.value})),u=B(Q,[],i,r);return n({customMarker:u}),{customMarkerRef:o,customMarker:u,hasSlotContent:s}}});const cn={key:0,class:"custom-marker-wrapper"};function dn(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",cn,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:t.$attrs.onClick?"pointer":void 0}},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("",!0)}const fn=F(un,[["render",dn],["__scopeId","data-v-574a274a"]]),pn=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(t){const e=l.ref(),r=l.inject(L,l.ref()),n=l.inject(x,l.ref());return l.watch([r,()=>t.options],([o,s],[i,u])=>{const a=!V(s,u)||r.value!==i;if(r.value&&n.value&&a){let d;if(s.data&&!(s.data instanceof n.value.MVCArray)){const p=n.value.LatLng,c=s.data.map(m=>m instanceof p||"location"in m&&(m.location instanceof p||m.location===null)?m:"location"in m?{...m,location:new p(m.location)}:new p(m));d={...s,data:c}}else d=s;e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:r.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});exports.AdvancedMarker=yt;exports.Circle=Ct;exports.CustomControl=St;exports.CustomMarker=fn;exports.GoogleMap=ft;exports.HeatmapLayer=pn;exports.InfoWindow=qt;exports.Marker=wt;exports.MarkerCluster=ln;exports.Polygon=Et;exports.Polyline=kt;exports.Rectangle=_t;exports.apiSymbol=x;exports.mapSymbol=L;exports.mapTilesLoadedSymbol=de;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-d182c1f9]{display:none}.mapdiv .info-window-wrapper[data-v-d182c1f9]{display:inline-block}.custom-marker-wrapper[data-v-2d2d343a]{display:none}.mapdiv .custom-marker-wrapper[data-v-2d2d343a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
1
+ (function(){var e;"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.nonce=(e=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:e.content,a.appendChild(document.createTextNode(".mapdiv[data-v-c63ff230]{width:100%;height:100%}.advanced-marker-wrapper{display:none}.mapdiv .advanced-marker-wrapper{display:inline-block}.custom-control-wrapper[data-v-ab9120cd]{display:none}.mapdiv .custom-control-wrapper[data-v-ab9120cd]{display:inline-block}.info-window-wrapper[data-v-fe75431f]{display:none}.mapdiv .info-window-wrapper[data-v-fe75431f]{display:inline-block}.custom-marker-wrapper[data-v-574a274a]{display:none}.mapdiv .custom-marker-wrapper[data-v-574a274a]{display:inline-block}")),document.head.appendChild(a)}}catch(d){console.error("vite-plugin-css-injected-by-js",d)}})();
2
2
  var pt = Object.defineProperty;
3
3
  var ft = (t, e, r) => e in t ? pt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
4
4
  var se = (t, e, r) => (ft(t, typeof e != "symbol" ? e + "" : e, r), r);
@@ -442,7 +442,7 @@ function At(t, e, r, n, s, o) {
442
442
  z(t.$slots, "default", mt(ht({ ready: t.ready, map: t.map, api: t.api, mapTilesLoaded: t.mapTilesLoaded })), void 0, !0)
443
443
  ]);
444
444
  }
445
- const bn = /* @__PURE__ */ re(Tt, [["render", At], ["__scopeId", "data-v-c63ff230"]]);
445
+ const Cn = /* @__PURE__ */ re(Tt, [["render", At], ["__scopeId", "data-v-c63ff230"]]);
446
446
  function qt(t) {
447
447
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
448
448
  }
@@ -546,7 +546,7 @@ function It(t, e, r, n, s, o) {
546
546
  z(t.$slots, "default")
547
547
  ], 64);
548
548
  }
549
- const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker", je = (t) => t === de, K = (t, e, r, n) => {
549
+ const On = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker", je = (t) => t === de, K = (t, e, r, n) => {
550
550
  const s = _(), o = C(D, _()), i = C(Z, _()), l = C(Oe, _()), a = W(
551
551
  () => !!(l.value && i.value && (s.value instanceof i.value.Marker || s.value instanceof i.value[de]))
552
552
  );
@@ -610,7 +610,7 @@ const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker",
610
610
  "shape_changed",
611
611
  "title_changed",
612
612
  "visible_changed"
613
- ], On = T({
613
+ ], Mn = T({
614
614
  name: "Marker",
615
615
  props: {
616
616
  options: {
@@ -626,7 +626,7 @@ const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker",
626
626
  return (i = n.default) == null ? void 0 : i.call(n);
627
627
  };
628
628
  }
629
- }), Mn = T({
629
+ }), Sn = T({
630
630
  name: "Polyline",
631
631
  props: {
632
632
  options: {
@@ -640,7 +640,7 @@ const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker",
640
640
  return { polyline: K("Polyline", H, r, e) };
641
641
  },
642
642
  render: () => null
643
- }), Sn = T({
643
+ }), Tn = T({
644
644
  name: "Polygon",
645
645
  props: {
646
646
  options: {
@@ -654,7 +654,7 @@ const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker",
654
654
  return { polygon: K("Polygon", H, r, e) };
655
655
  },
656
656
  render: () => null
657
- }), Re = H.concat(["bounds_changed"]), Tn = T({
657
+ }), Re = H.concat(["bounds_changed"]), Pn = T({
658
658
  name: "Rectangle",
659
659
  props: {
660
660
  options: {
@@ -668,7 +668,7 @@ const Cn = /* @__PURE__ */ re(xt, [["render", It]]), xe = (t) => t === "Marker",
668
668
  return { rectangle: K("Rectangle", Re, r, e) };
669
669
  },
670
670
  render: () => null
671
- }), $e = H.concat(["center_changed", "radius_changed"]), Pn = T({
671
+ }), $e = H.concat(["center_changed", "radius_changed"]), An = T({
672
672
  name: "Circle",
673
673
  props: {
674
674
  options: {
@@ -737,7 +737,7 @@ function Nt(t, e, r, n, s, o) {
737
737
  z(t.$slots, "default", {}, void 0, !0)
738
738
  ], 512);
739
739
  }
740
- const An = /* @__PURE__ */ re(Rt, [["render", Nt], ["__scopeId", "data-v-ab9120cd"]]), Ne = [
740
+ const qn = /* @__PURE__ */ re(Rt, [["render", Nt], ["__scopeId", "data-v-ab9120cd"]]), Ne = [
741
741
  "closeclick",
742
742
  "content_changed",
743
743
  "domready",
@@ -823,7 +823,7 @@ function Zt(t, e, r, n, s, o) {
823
823
  ], 16)
824
824
  ])) : be("", !0);
825
825
  }
826
- const qn = /* @__PURE__ */ re(Bt, [["render", Zt], ["__scopeId", "data-v-d182c1f9"]]);
826
+ const Ln = /* @__PURE__ */ re(Bt, [["render", Zt], ["__scopeId", "data-v-fe75431f"]]);
827
827
  var Gt = Object.getOwnPropertyNames, Ut = Object.getOwnPropertySymbols, Ft = Object.prototype.hasOwnProperty;
828
828
  function Be(t, e) {
829
829
  return function(n, s, o) {
@@ -2061,7 +2061,12 @@ class gn extends Nr {
2061
2061
  this.debouncedRender.cancel();
2062
2062
  }
2063
2063
  }
2064
- const et = Object.values(I), Ln = T({
2064
+ class vn extends xr {
2065
+ calculate(e) {
2066
+ return e.markers.length === 0 ? { clusters: [], changed: !0 } : super.calculate(e);
2067
+ }
2068
+ }
2069
+ const et = Object.values(I), xn = T({
2065
2070
  name: "MarkerCluster",
2066
2071
  props: {
2067
2072
  options: {
@@ -2085,7 +2090,7 @@ const et = Object.values(I), Ln = T({
2085
2090
  map: o.value,
2086
2091
  // Better perf than the default `SuperClusterAlgorithm`. See:
2087
2092
  // https://github.com/googlemaps/js-markerclusterer/pull/640
2088
- algorithm: new xr(t.options.algorithmOptions ?? {}),
2093
+ algorithm: new vn(t.options.algorithmOptions ?? {}),
2089
2094
  ...t.options
2090
2095
  },
2091
2096
  t.renderDebounceDelay
@@ -2106,7 +2111,7 @@ const et = Object.values(I), Ln = T({
2106
2111
  return (l = n.default) == null ? void 0 : l.call(n);
2107
2112
  };
2108
2113
  }
2109
- }), vn = T({
2114
+ }), yn = T({
2110
2115
  inheritAttrs: !1,
2111
2116
  props: {
2112
2117
  options: {
@@ -2127,12 +2132,12 @@ const et = Object.values(I), Ln = T({
2127
2132
  }), { customMarkerRef: s, customMarker: l, hasSlotContent: o };
2128
2133
  }
2129
2134
  });
2130
- const yn = {
2135
+ const _n = {
2131
2136
  key: 0,
2132
2137
  class: "custom-marker-wrapper"
2133
2138
  };
2134
- function _n(t, e, r, n, s, o) {
2135
- return t.hasSlotContent ? (F(), V("div", yn, [
2139
+ function En(t, e, r, n, s, o) {
2140
+ return t.hasSlotContent ? (F(), V("div", _n, [
2136
2141
  ce("div", ke({
2137
2142
  ref: "customMarkerRef",
2138
2143
  style: { cursor: t.$attrs.onClick ? "pointer" : void 0 }
@@ -2141,7 +2146,7 @@ function _n(t, e, r, n, s, o) {
2141
2146
  ], 16)
2142
2147
  ])) : be("", !0);
2143
2148
  }
2144
- const xn = /* @__PURE__ */ re(vn, [["render", _n], ["__scopeId", "data-v-2d2d343a"]]), jn = T({
2149
+ const jn = /* @__PURE__ */ re(yn, [["render", En], ["__scopeId", "data-v-574a274a"]]), In = T({
2145
2150
  name: "HeatmapLayer",
2146
2151
  props: {
2147
2152
  options: {
@@ -2181,18 +2186,18 @@ const xn = /* @__PURE__ */ re(vn, [["render", _n], ["__scopeId", "data-v-2d2d343
2181
2186
  render: () => null
2182
2187
  });
2183
2188
  export {
2184
- Cn as AdvancedMarker,
2185
- Pn as Circle,
2186
- An as CustomControl,
2187
- xn as CustomMarker,
2188
- bn as GoogleMap,
2189
- jn as HeatmapLayer,
2190
- qn as InfoWindow,
2191
- On as Marker,
2192
- Ln as MarkerCluster,
2193
- Sn as Polygon,
2194
- Mn as Polyline,
2195
- Tn as Rectangle,
2189
+ On as AdvancedMarker,
2190
+ An as Circle,
2191
+ qn as CustomControl,
2192
+ jn as CustomMarker,
2193
+ Cn as GoogleMap,
2194
+ In as HeatmapLayer,
2195
+ Ln as InfoWindow,
2196
+ Mn as Marker,
2197
+ xn as MarkerCluster,
2198
+ Tn as Polygon,
2199
+ Sn as Polyline,
2200
+ Pn as Rectangle,
2196
2201
  Z as apiSymbol,
2197
2202
  D as mapSymbol,
2198
2203
  rt as mapTilesLoadedSymbol
package/dist/index.umd.js CHANGED
@@ -1,10 +1,10 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");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-cd53e37a]{display:none}.mapdiv .info-window-wrapper[data-v-cd53e37a]{display:inline-block}.custom-marker-wrapper[data-v-4b2eafc1]{display:none}.mapdiv .custom-marker-wrapper[data-v-4b2eafc1]{display:inline-block}")),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- (function(k,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(k=typeof globalThis<"u"?globalThis:k||self,l(k.Vue3GoogleMap={},k.Vue))})(this,function(k,l){"use strict";var fn=Object.defineProperty;var pn=(k,l,M)=>l in k?fn(k,l,{enumerable:!0,configurable:!0,writable:!0,value:M}):k[l]=M;var ee=(k,l,M)=>(pn(k,typeof l!="symbol"?l+"":l,M),M);const M=Symbol("map"),A=Symbol("api"),te=Symbol("marker"),re=Symbol("markerCluster"),W=Symbol("CustomMarker"),ne=Symbol("mapTilesLoaded"),B=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ye(t,e){t.src=e}const Je=t=>{var e,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",c="__ib__",a=document,d=window,p=d[s]||(d[s]={}),u=p.maps||(p.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(f,y)=>{var v;await(r=a.createElement("script")),h.set("libraries",[...m]+"");for(n in t)h.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),t[n]);h.set("callback",s+".maps."+c),Ye(r,"https://maps.googleapis.com/maps/api/js?"+h),u[c]=f,r.onerror=()=>e=y(Error(o+" could not load.")),r.nonce=((v=a.querySelector("script[nonce]"))==null?void 0:v.nonce)||"",a.head.append(r)}));u[i]?console.warn(o+" only loads once. Ignoring:",t):u[i]=(f,...y)=>m.add(f)&&g().then(()=>u[i](f,...y))},Qe=t=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(t)}) will be ignored.`,et=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.`,tt="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",rt="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",oe=process.env.NODE_ENV!=="production"?t=>{console.warn(`[@googlemaps/js-api-loader] ${t}`)}:()=>{},nt=process.env.NODE_ENV!=="production"?t=>{console.info(`[@googlemaps/js-api-loader] ${t}`)}:()=>{};let se=!1;function ot(t){if(se){oe(Qe(t));return}at(t),se=!0}async function st(t){var e,r;if(se||oe(tt),!((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 at(t){var r,n;const e=!!((n=(r=window.google)==null?void 0:r.maps)!=null&&n.importLibrary);e?nt(et(t)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&oe(rt),e||Je(t)}function it(t){return class extends t.OverlayView{constructor(n){super();ee(this,"element");ee(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,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 n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const c=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${c}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let ye=!1;const ve=["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"],lt=l.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:ve,setup(t,{emit:e}){const r=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(M,o),l.provide(A,s),l.provide(ne,i);const c=()=>{const u={...t};Object.keys(u).forEach(f=>{u[f]===void 0&&delete u[f]});const h=f=>{var y;return f?{position:(y=s.value)==null?void 0:y.ControlPosition[f]}:{}},g={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:h(t.panControlPosition),zoomControlOptions:h(t.zoomControlPosition),rotateControlOptions:h(t.rotateControlPosition),streetViewControlOptions:h(t.streetViewControlPosition),fullscreenControlOptions:h(t.fullscreenControlPosition),cameraControlOptions:h(t.cameraControlPosition),disableDefaultUI:t.disableDefaultUi};return{...u,...g}},a=l.watch([s,o],([u,m])=>{const h=u,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:u,region:m,version:h,language:g,libraries:f}=t;ot({key:u,region:m,v:h,language:g,libraries:f})},p=u=>{const m=u?u.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(r.value,c()));const h=it(s.value);s.value[W]=h,ve.forEach(f=>{var y;(y=o.value)==null||y.addListener(f,v=>e(f,v))}),n.value=!0;const g=Object.keys(t).filter(f=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(f)).map(f=>l.toRef(t,f));l.watch([()=>t.center,()=>t.zoom,...g],([f,y],[v,w])=>{var C,S,x;const{center:_,zoom:T,...O}=c();(C=o.value)==null||C.setOptions(O),y!==void 0&&y!==w&&((S=o.value)==null||S.setZoom(y));const E=!v||f.lng!==v.lng||f.lat!==v.lat;f&&E&&((x=o.value)==null||x.panTo(f))})};return l.onMounted(()=>{if(t.apiPromise&&t.apiPromise instanceof Promise)t.apiPromise.then(p);else{ye||(d(),ye=!0);const u=t.libraries&&t.libraries.length>0?t.libraries:["maps","marker"];Promise.all(u.map(m=>st(m))).then(()=>p())}}),l.onBeforeUnmount(()=>{var u;i.value=!1,o.value&&((u=s.value)==null||u.event.clearInstanceListeners(o.value))}),{mapRef:r,ready:n,map:o,api:s,mapTilesLoaded:i}}}),mn="",D=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},ct={ref:"mapRef",class:"mapdiv"};function ut(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",ct,null,512),l.renderSlot(t.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0,!0)])}const dt=D(lt,[["render",ut],["__scopeId","data-v-c6aa3e71"]]);function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pt=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 n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))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),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r};const U=ft(pt),we=["click","drag","dragend","dragstart","gmp-click"],mt=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:we,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.computed(()=>{var h;return(h=n.content)==null?void 0:h.call(n).some(g=>g.type!==l.Comment)}),i=l.toRef(t,"options"),c=l.toRef(t,"pinOptions"),a=l.ref(),d=l.inject(M,l.ref()),p=l.inject(A,l.ref()),u=l.inject(re,l.ref()),m=l.computed(()=>!!(u.value&&p.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,c,o],async(h,[g,f,y,v])=>{var C,S,x;const w=!U(i.value,f)||!U(c.value,y),_=o.value!==v,T=w||_||d.value!==g;if(!d.value||!p.value||!T||s.value&&!o.value)return;const{AdvancedMarkerElement:O,PinElement:E}=p.value.marker;if(a.value){const{map:he,content:Q,...ge}=i.value;Object.assign(a.value,{content:s.value?o.value:c.value?new E(c.value).element:Q,...ge}),m.value&&((C=u.value)==null||C.removeMarker(a.value),(S=u.value)==null||S.addMarker(a.value))}else s.value?i.value.content=o.value:c.value&&(i.value.content=new E(c.value).element),a.value=l.markRaw(new O(i.value)),m.value?(x=u.value)==null||x.addMarker(a.value):a.value.map=d.value,we.forEach(he=>{var Q;(Q=a.value)==null||Q.addListener(he,ge=>e(he,ge))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var h,g;a.value&&((h=p.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=u.value)==null||g.removeMarker(a.value):a.value.map=null)}),l.provide(te,a),r({marker:a}),{hasCustomSlotContent:s,markerRef:o}}}),hn="",ht={key:0,class:"advanced-marker-wrapper"};function gt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[t.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",ht,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},t.$attrs),[l.renderSlot(t.$slots,"content")],16)])):l.createCommentVNode("v-if",!0),l.renderSlot(t.$slots,"default")],64)}const yt=D(mt,[["render",gt]]),Ee=t=>t==="Marker",ke=t=>t===W,$=(t,e,r,n)=>{const o=l.ref(),s=l.inject(M,l.ref()),i=l.inject(A,l.ref()),c=l.inject(re,l.ref()),a=l.computed(()=>!!(c.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[W])));return l.watch([s,r],(d,[p,u])=>{var h,g,f;const m=!U(r.value,u)||s.value!==p;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(r.value),a.value&&((h=c.value)==null||h.removeMarker(o.value),(g=c.value)==null||g.addMarker(o.value));else{if(Ee(t))o.value=l.markRaw(new i.value[t](r.value));else if(ke(t)){const y=r.value;y.element&&(o.value=l.markRaw(new i.value[t](y)))}else o.value=l.markRaw(new i.value[t]({...r.value,map:s.value}));o.value&&(a.value?(f=c.value)==null||f.addMarker(o.value):(Ee(t)||ke(t))&&o.value.setMap(s.value)),e.forEach(y=>{var v;(v=o.value)==null||v.addListener(y,w=>n(y,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,p;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(p=c.value)==null||p.removeMarker(o.value):o.value.setMap(null))}),o},_e=["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"],vt=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:_e,setup(t,{emit:e,expose:r,slots:n}){const o=l.toRef(t,"options"),s=$("Marker",_e,o,e);return l.provide(te,s),r({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),wt=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:B,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polyline:$("Polyline",B,r,e)}},render:()=>null}),Et=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:B,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polygon:$("Polygon",B,r,e)}},render:()=>null}),Ce=B.concat(["bounds_changed"]),kt=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:Ce,setup(t,{emit:e}){const r=l.toRef(t,"options");return{rectangle:$("Rectangle",Ce,r,e)}},render:()=>null}),be=B.concat(["center_changed","radius_changed"]),_t=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:be,setup(t,{emit:e}){const r=l.toRef(t,"options");return{circle:$("Circle",be,r,e)}},render:()=>null}),Ct=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(t,{emit:e}){const r=l.ref(null),n=l.inject(M,l.ref()),o=l.inject(A,l.ref()),s=l.inject(ne,l.ref(!1)),i=l.watch([s,o,r],([d,p,u])=>{p&&d&&u&&(c(t.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),c=d=>{if(n.value&&o.value&&r.value){const p=o.value.ControlPosition[d];r.value.index=t.index,n.value.controls[p].push(r.value)}},a=d=>{if(n.value&&o.value){let p=null;const u=o.value.ControlPosition[d];n.value.controls[u].forEach((m,h)=>{m===r.value&&(p=h)}),p!==null&&n.value.controls[u].removeAt(p)}};return l.onBeforeUnmount(()=>a(t.position)),l.watch(()=>t.position,(d,p)=>{a(p),c(d)}),l.watch(()=>t.index,d=>{r.value&&(r.value.index=d)}),{controlRef:r}}}),gn="",bt={ref:"controlRef",class:"custom-control-wrapper"};function Mt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createCommentVNode(`
1
+ (function(){var a;"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.nonce=(a=document.head.querySelector("meta[property=csp-nonce]"))==null?void 0:a.content,e.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(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
+ (function(k,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(k=typeof globalThis<"u"?globalThis:k||self,l(k.Vue3GoogleMap={},k.Vue))})(this,function(k,l){"use strict";var pn=Object.defineProperty;var mn=(k,l,M)=>l in k?pn(k,l,{enumerable:!0,configurable:!0,writable:!0,value:M}):k[l]=M;var ee=(k,l,M)=>(mn(k,typeof l!="symbol"?l+"":l,M),M);const M=Symbol("map"),A=Symbol("api"),te=Symbol("marker"),re=Symbol("markerCluster"),W=Symbol("CustomMarker"),ne=Symbol("mapTilesLoaded"),B=["click","dblclick","drag","dragend","dragstart","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];function Ye(t,e){t.src=e}const Je=t=>{var e,r,n,o="The Google Maps JavaScript API",s="google",i="importLibrary",c="__ib__",a=document,d=window,p=d[s]||(d[s]={}),u=p.maps||(p.maps={}),m=new Set,h=new URLSearchParams,g=()=>e||(e=new Promise(async(f,y)=>{var v;await(r=a.createElement("script")),h.set("libraries",[...m]+"");for(n in t)h.set(n.replace(/[A-Z]/g,w=>"_"+w[0].toLowerCase()),t[n]);h.set("callback",s+".maps."+c),Ye(r,"https://maps.googleapis.com/maps/api/js?"+h),u[c]=f,r.onerror=()=>e=y(Error(o+" could not load.")),r.nonce=((v=a.querySelector("script[nonce]"))==null?void 0:v.nonce)||"",a.head.append(r)}));u[i]?console.warn(o+" only loads once. Ignoring:",t):u[i]=(f,...y)=>m.add(f)&&g().then(()=>u[i](f,...y))},Qe=t=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(t)}) will be ignored.`,et=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.`,tt="No options were set before calling importLibrary. Make sure to configure the loader using setOptions().",rt="There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.",oe=process.env.NODE_ENV!=="production"?t=>{console.warn(`[@googlemaps/js-api-loader] ${t}`)}:()=>{},nt=process.env.NODE_ENV!=="production"?t=>{console.info(`[@googlemaps/js-api-loader] ${t}`)}:()=>{};let se=!1;function ot(t){if(se){oe(Qe(t));return}at(t),se=!0}async function st(t){var e,r;if(se||oe(tt),!((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 at(t){var r,n;const e=!!((n=(r=window.google)==null?void 0:r.maps)!=null&&n.importLibrary);e?nt(et(t)):process.env.NODE_ENV!=="production"&&document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')&&oe(rt),e||Je(t)}function it(t){return class extends t.OverlayView{constructor(n){super();ee(this,"element");ee(this,"opts");const{element:o,...s}=n;this.element=o,this.opts=s,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 n=this.element;return n.style.display!=="none"&&n.style.visibility!=="hidden"&&(n.style.opacity===""||Number(n.style.opacity)>.01)}onAdd(){if(!this.element)return;const n=this.getPanes();n&&n.overlayMouseTarget.appendChild(this.element)}draw(){if(!this.element)return;const n=this.getProjection(),o=n==null?void 0:n.fromLatLngToDivPixel(this.getPosition());if(o){this.element.style.position="absolute";let s,i;switch(this.opts.anchorPoint){case"TOP_CENTER":s="-50%",i="-100%";break;case"BOTTOM_CENTER":s="-50%",i="0";break;case"LEFT_CENTER":s="-100%",i="-50%";break;case"RIGHT_CENTER":s="0",i="-50%";break;case"TOP_LEFT":s="-100%",i="-100%";break;case"TOP_RIGHT":s="0",i="-100%";break;case"BOTTOM_LEFT":s="-100%",i="0";break;case"BOTTOM_RIGHT":s="0",i="0";break;default:s="-50%",i="-50%"}const c=o.x+(this.opts.offsetX||0)+"px",a=o.y+(this.opts.offsetY||0)+"px";this.element.style.transform=`translateX(${s}) translateX(${c}) translateY(${i}) translateY(${a})`,this.opts.zIndex&&(this.element.style.zIndex=this.opts.zIndex.toString())}}onRemove(){this.element&&this.element.remove()}setOptions(n){const{element:o,...s}=n;this.element=o,this.opts=s,this.draw()}}}let ye=!1;const ve=["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"],lt=l.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:ve,setup(t,{emit:e}){const r=l.ref(),n=l.ref(!1),o=l.ref(),s=l.ref(),i=l.ref(!1);l.provide(M,o),l.provide(A,s),l.provide(ne,i);const c=()=>{const u={...t};Object.keys(u).forEach(f=>{u[f]===void 0&&delete u[f]});const h=f=>{var y;return f?{position:(y=s.value)==null?void 0:y.ControlPosition[f]}:{}},g={scaleControlOptions:t.scaleControlStyle?{style:t.scaleControlStyle}:{},panControlOptions:h(t.panControlPosition),zoomControlOptions:h(t.zoomControlPosition),rotateControlOptions:h(t.rotateControlPosition),streetViewControlOptions:h(t.streetViewControlPosition),fullscreenControlOptions:h(t.fullscreenControlPosition),cameraControlOptions:h(t.cameraControlPosition),disableDefaultUI:t.disableDefaultUi};return{...u,...g}},a=l.watch([s,o],([u,m])=>{const h=u,g=m;h&&g&&(h.event.addListenerOnce(g,"tilesloaded",()=>{i.value=!0}),setTimeout(a,0))},{immediate:!0}),d=()=>{const{apiKey:u,region:m,version:h,language:g,libraries:f}=t;ot({key:u,region:m,v:h,language:g,libraries:f})},p=u=>{const m=u?u.maps:google.maps;s.value=l.markRaw(m),o.value=l.markRaw(new m.Map(r.value,c()));const h=it(s.value);s.value[W]=h,ve.forEach(f=>{var y;(y=o.value)==null||y.addListener(f,v=>e(f,v))}),n.value=!0;const g=Object.keys(t).filter(f=>!["apiPromise","apiKey","version","libraries","region","language","center","zoom"].includes(f)).map(f=>l.toRef(t,f));l.watch([()=>t.center,()=>t.zoom,...g],([f,y],[v,w])=>{var C,S,x;const{center:_,zoom:T,...O}=c();(C=o.value)==null||C.setOptions(O),y!==void 0&&y!==w&&((S=o.value)==null||S.setZoom(y));const E=!v||f.lng!==v.lng||f.lat!==v.lat;f&&E&&((x=o.value)==null||x.panTo(f))})};return l.onMounted(()=>{if(t.apiPromise&&t.apiPromise instanceof Promise)t.apiPromise.then(p);else{ye||(d(),ye=!0);const u=t.libraries&&t.libraries.length>0?t.libraries:["maps","marker"];Promise.all(u.map(m=>st(m))).then(()=>p())}}),l.onBeforeUnmount(()=>{var u;i.value=!1,o.value&&((u=s.value)==null||u.event.clearInstanceListeners(o.value))}),{mapRef:r,ready:n,map:o,api:s,mapTilesLoaded:i}}}),hn="",D=(t,e)=>{const r=t.__vccOpts||t;for(const[n,o]of e)r[n]=o;return r},ct={ref:"mapRef",class:"mapdiv"};function ut(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",ct,null,512),l.renderSlot(t.$slots,"default",l.normalizeProps(l.guardReactiveProps({ready:t.ready,map:t.map,api:t.api,mapTilesLoaded:t.mapTilesLoaded})),void 0,!0)])}const dt=D(lt,[["render",ut],["__scopeId","data-v-c6aa3e71"]]);function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pt=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 n,o,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!t(e[o],r[o]))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),n=s.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=n;o--!==0;){var i=s[o];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r};const V=ft(pt),we=["click","drag","dragend","dragstart","gmp-click"],mt=l.defineComponent({name:"AdvancedMarker",props:{options:{type:Object,required:!0},pinOptions:{type:Object,required:!1}},emits:we,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.computed(()=>{var h;return(h=n.content)==null?void 0:h.call(n).some(g=>g.type!==l.Comment)}),i=l.toRef(t,"options"),c=l.toRef(t,"pinOptions"),a=l.ref(),d=l.inject(M,l.ref()),p=l.inject(A,l.ref()),u=l.inject(re,l.ref()),m=l.computed(()=>!!(u.value&&p.value&&a.value instanceof google.maps.marker.AdvancedMarkerElement));return l.watch([d,i,c,o],async(h,[g,f,y,v])=>{var C,S,x;const w=!V(i.value,f)||!V(c.value,y),_=o.value!==v,T=w||_||d.value!==g;if(!d.value||!p.value||!T||s.value&&!o.value)return;const{AdvancedMarkerElement:O,PinElement:E}=p.value.marker;if(a.value){const{map:he,content:Q,...ge}=i.value;Object.assign(a.value,{content:s.value?o.value:c.value?new E(c.value).element:Q,...ge}),m.value&&((C=u.value)==null||C.removeMarker(a.value),(S=u.value)==null||S.addMarker(a.value))}else s.value?i.value.content=o.value:c.value&&(i.value.content=new E(c.value).element),a.value=l.markRaw(new O(i.value)),m.value?(x=u.value)==null||x.addMarker(a.value):a.value.map=d.value,we.forEach(he=>{var Q;(Q=a.value)==null||Q.addListener(he,ge=>e(he,ge))})},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var h,g;a.value&&((h=p.value)==null||h.event.clearInstanceListeners(a.value),m.value?(g=u.value)==null||g.removeMarker(a.value):a.value.map=null)}),l.provide(te,a),r({marker:a}),{hasCustomSlotContent:s,markerRef:o}}}),gn="",ht={key:0,class:"advanced-marker-wrapper"};function gt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[t.hasCustomSlotContent?(l.openBlock(),l.createElementBlock("div",ht,[l.createElementVNode("div",l.mergeProps({ref:"markerRef"},t.$attrs),[l.renderSlot(t.$slots,"content")],16)])):l.createCommentVNode("v-if",!0),l.renderSlot(t.$slots,"default")],64)}const yt=D(mt,[["render",gt]]),Ee=t=>t==="Marker",ke=t=>t===W,$=(t,e,r,n)=>{const o=l.ref(),s=l.inject(M,l.ref()),i=l.inject(A,l.ref()),c=l.inject(re,l.ref()),a=l.computed(()=>!!(c.value&&i.value&&(o.value instanceof i.value.Marker||o.value instanceof i.value[W])));return l.watch([s,r],(d,[p,u])=>{var h,g,f;const m=!V(r.value,u)||s.value!==p;if(!(!s.value||!i.value||!m))if(o.value)o.value.setOptions(r.value),a.value&&((h=c.value)==null||h.removeMarker(o.value),(g=c.value)==null||g.addMarker(o.value));else{if(Ee(t))o.value=l.markRaw(new i.value[t](r.value));else if(ke(t)){const y=r.value;y.element&&(o.value=l.markRaw(new i.value[t](y)))}else o.value=l.markRaw(new i.value[t]({...r.value,map:s.value}));o.value&&(a.value?(f=c.value)==null||f.addMarker(o.value):(Ee(t)||ke(t))&&o.value.setMap(s.value)),e.forEach(y=>{var v;(v=o.value)==null||v.addListener(y,w=>n(y,w))})}},{immediate:!0,flush:"post"}),l.onBeforeUnmount(()=>{var d,p;o.value&&((d=i.value)==null||d.event.clearInstanceListeners(o.value),a.value?(p=c.value)==null||p.removeMarker(o.value):o.value.setMap(null))}),o},_e=["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"],vt=l.defineComponent({name:"Marker",props:{options:{type:Object,required:!0}},emits:_e,setup(t,{emit:e,expose:r,slots:n}){const o=l.toRef(t,"options"),s=$("Marker",_e,o,e);return l.provide(te,s),r({marker:s}),()=>{var i;return(i=n.default)==null?void 0:i.call(n)}}}),wt=l.defineComponent({name:"Polyline",props:{options:{type:Object,required:!0}},emits:B,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polyline:$("Polyline",B,r,e)}},render:()=>null}),Et=l.defineComponent({name:"Polygon",props:{options:{type:Object,required:!0}},emits:B,setup(t,{emit:e}){const r=l.toRef(t,"options");return{polygon:$("Polygon",B,r,e)}},render:()=>null}),Ce=B.concat(["bounds_changed"]),kt=l.defineComponent({name:"Rectangle",props:{options:{type:Object,required:!0}},emits:Ce,setup(t,{emit:e}){const r=l.toRef(t,"options");return{rectangle:$("Rectangle",Ce,r,e)}},render:()=>null}),be=B.concat(["center_changed","radius_changed"]),_t=l.defineComponent({name:"Circle",props:{options:{type:Object,required:!0}},emits:be,setup(t,{emit:e}){const r=l.toRef(t,"options");return{circle:$("Circle",be,r,e)}},render:()=>null}),Ct=l.defineComponent({props:{position:{type:String,required:!0},index:{type:Number,default:1}},emits:["content:loaded"],setup(t,{emit:e}){const r=l.ref(null),n=l.inject(M,l.ref()),o=l.inject(A,l.ref()),s=l.inject(ne,l.ref(!1)),i=l.watch([s,o,r],([d,p,u])=>{p&&d&&u&&(c(t.position),e("content:loaded"),setTimeout(i,0))},{immediate:!0}),c=d=>{if(n.value&&o.value&&r.value){const p=o.value.ControlPosition[d];r.value.index=t.index,n.value.controls[p].push(r.value)}},a=d=>{if(n.value&&o.value){let p=null;const u=o.value.ControlPosition[d];n.value.controls[u].forEach((m,h)=>{m===r.value&&(p=h)}),p!==null&&n.value.controls[u].removeAt(p)}};return l.onBeforeUnmount(()=>a(t.position)),l.watch(()=>t.position,(d,p)=>{a(p),c(d)}),l.watch(()=>t.index,d=>{r.value&&(r.value.index=d)}),{controlRef:r}}}),yn="",bt={ref:"controlRef",class:"custom-control-wrapper"};function Mt(t,e,r,n,o,s){return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createCommentVNode(`
3
3
  v-show must be used instead of v-if otherwise there
4
4
  would be no rendered content pushed to the map controls
5
- `),l.createElementVNode("div",bt,[l.renderSlot(t.$slots,"default",{},void 0,!0)],512)],2112)}const Ot=D(Ct,[["render",Mt],["__scopeId","data-v-ae91c15f"]]),Me=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],St=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...Me,"update:modelValue"],setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(M,l.ref()),c=l.inject(A,l.ref()),a=l.inject(te,l.ref());let d,p=t.modelValue;const u=l.computed(()=>{var f;return(f=e.default)==null?void 0:f.call(e).some(y=>y.type!==l.Comment)}),m=f=>{p=f,r("update:modelValue",f)},h=f=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...f}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>t.options],([f,y],[v,w])=>{var T;const _=!U(y,w)||i.value!==v;i.value&&c.value&&_&&(o.value?(o.value.setOptions({...y,content:u.value?s.value:y.content}),a.value||h()):(o.value=l.markRaw(new c.value.InfoWindow({...y,content:u.value?s.value:y.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||p)&&h(),Me.forEach(O=>{var E;(E=o.value)==null||E.addListener(O,C=>r(O,C))}),(T=o.value)==null||T.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(a,(f,y)=>{!o.value||f===y||(d&&(d.remove(),d=void 0),f&&(d=f.addListener("click",()=>h())))},{flush:"post"}),l.watch(()=>t.modelValue,f=>{f!==p&&(f?h():g())})}),l.onBeforeUnmount(()=>{var f;d&&d.remove(),o.value&&((f=c.value)==null||f.event.clearInstanceListeners(o.value),g())}),n({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:u,open:h,close:g}}}),yn="",Tt={key:0,class:"info-window-wrapper"};function Pt(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Tt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("v-if",!0)}const At=D(St,[["render",Pt],["__scopeId","data-v-cd53e37a"]]);var qt=Object.getOwnPropertyNames,Lt=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty;function Oe(t,e){return function(n,o,s){return t(n,o,s)&&e(n,o,s)}}function H(t){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,o);var s=o.cache,i=s.get(r),c=s.get(n);if(i&&c)return i===n&&c===r;s.set(r,n),s.set(n,r);var a=t(r,n,o);return s.delete(r),s.delete(n),a}}function Se(t){return qt(t).concat(Lt(t))}var Rt=Object.hasOwn||function(t,e){return jt.call(t,e)};function I(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var xt="__v",It="__o",Nt="_owner",Te=Object.getOwnPropertyDescriptor,Pe=Object.keys;function Bt(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function $t(t,e){return I(t.getTime(),e.getTime())}function Dt(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Ut(t,e){return t===e}function Ae(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.entries(),i,c,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),p=!1,u=0;(c=d.next())&&!c.done;){if(o[u]){u++;continue}var m=i.value,h=c.value;if(r.equals(m[0],h[0],a,u,t,e,r)&&r.equals(m[1],h[1],m[0],h[0],t,e,r)){p=o[u]=!0;break}u++}if(!p)return!1;a++}return!0}var Vt=I;function Zt(t,e,r){var n=Pe(t),o=n.length;if(Pe(e).length!==o)return!1;for(;o-- >0;)if(!Le(t,e,r,n[o]))return!1;return!0}function V(t,e,r){var n=Se(t),o=n.length;if(Se(e).length!==o)return!1;for(var s,i,c;o-- >0;)if(s=n[o],!Le(t,e,r,s)||(i=Te(t,s),c=Te(e,s),(i||c)&&(!i||!c||i.configurable!==c.configurable||i.enumerable!==c.enumerable||i.writable!==c.writable)))return!1;return!0}function Gt(t,e){return I(t.valueOf(),e.valueOf())}function Ft(t,e){return t.source===e.source&&t.flags===e.flags}function qe(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.values(),i,c;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,p=0;(c=a.next())&&!c.done;){if(!o[p]&&r.equals(i.value,c.value,i.value,c.value,t,e,r)){d=o[p]=!0;break}p++}if(!d)return!1}return!0}function zt(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 Wt(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 Le(t,e,r,n){return(n===Nt||n===It||n===xt)&&(t.$$typeof||e.$$typeof)?!0:Rt(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var Ht="[object Arguments]",Kt="[object Boolean]",Xt="[object Date]",Yt="[object Error]",Jt="[object Map]",Qt="[object Number]",er="[object Object]",tr="[object RegExp]",rr="[object Set]",nr="[object String]",or="[object URL]",sr=Array.isArray,je=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Re=Object.assign,ar=Object.prototype.toString.call.bind(Object.prototype.toString);function ir(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,o=t.areFunctionsEqual,s=t.areMapsEqual,i=t.areNumbersEqual,c=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,d=t.areRegExpsEqual,p=t.areSetsEqual,u=t.areTypedArraysEqual,m=t.areUrlsEqual;return function(g,f,y){if(g===f)return!0;if(g==null||f==null)return!1;var v=typeof g;if(v!==typeof f)return!1;if(v!=="object")return v==="number"?i(g,f,y):v==="function"?o(g,f,y):!1;var w=g.constructor;if(w!==f.constructor)return!1;if(w===Object)return c(g,f,y);if(sr(g))return e(g,f,y);if(je!=null&&je(g))return u(g,f,y);if(w===Date)return r(g,f,y);if(w===RegExp)return d(g,f,y);if(w===Map)return s(g,f,y);if(w===Set)return p(g,f,y);var _=ar(g);return _===Xt?r(g,f,y):_===tr?d(g,f,y):_===Jt?s(g,f,y):_===rr?p(g,f,y):_===er?typeof g.then!="function"&&typeof f.then!="function"&&c(g,f,y):_===or?m(g,f,y):_===Yt?n(g,f,y):_===Ht?c(g,f,y):_===Kt||_===Qt||_===nr?a(g,f,y):!1}}function lr(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,o={areArraysEqual:n?V:Bt,areDatesEqual:$t,areErrorsEqual:Dt,areFunctionsEqual:Ut,areMapsEqual:n?Oe(Ae,V):Ae,areNumbersEqual:Vt,areObjectsEqual:n?V:Zt,arePrimitiveWrappersEqual:Gt,areRegExpsEqual:Ft,areSetsEqual:n?Oe(qe,V):qe,areTypedArraysEqual:n?V:zt,areUrlsEqual:Wt};if(r&&(o=Re({},o,r(o))),e){var s=H(o.areArraysEqual),i=H(o.areMapsEqual),c=H(o.areObjectsEqual),a=H(o.areSetsEqual);o=Re({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:c,areSetsEqual:a})}return o}function cr(t){return function(e,r,n,o,s,i,c){return t(e,r,c)}}function ur(t){var e=t.circular,r=t.comparator,n=t.createState,o=t.equals,s=t.strict;if(n)return function(a,d){var p=n(),u=p.cache,m=u===void 0?e?new WeakMap:void 0:u,h=p.meta;return r(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return r(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return r(a,d,i)}}var K=q();q({strict:!0}),q({circular:!0}),q({circular:!0,strict:!0}),q({createInternalComparator:function(){return I}}),q({strict:!0,createInternalComparator:function(){return I}}),q({circular:!0,createInternalComparator:function(){return I}}),q({circular:!0,createInternalComparator:function(){return I},strict:!0});function q(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,o=t.createState,s=t.strict,i=s===void 0?!1:s,c=lr(t),a=ir(c),d=n?n(a):cr(a);return ur({circular:r,comparator:a,createState:o,equals:d,strict:i})}const xe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ae=1,Z=8;class ie{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==ae)throw new Error(`Got v${o} data when expected v${ae}.`);const s=xe[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new ie(c,i,s,e)}constructor(e,r=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=xe.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Z,e),this.coords=new this.ArrayType(this.data,Z+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Z+i+c+a),this.ids=new this.IndexArrayType(this.data,Z,e),this.coords=new this.ArrayType(this.data,Z+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ae<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return le(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:c}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const p=a.pop()||0,u=a.pop()||0,m=a.pop()||0;if(u-m<=c){for(let y=m;y<=u;y++){const v=i[2*y],w=i[2*y+1];v>=e&&v<=n&&w>=r&&w<=o&&d.push(s[y])}continue}const h=m+u>>1,g=i[2*h],f=i[2*h+1];g>=e&&g<=n&&f>=r&&f<=o&&d.push(s[h]),(p===0?e<=g:r<=f)&&(a.push(m),a.push(h-1),a.push(1-p)),(p===0?n>=g:o>=f)&&(a.push(h+1),a.push(u),a.push(1-p))}return d}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,c=[0,o.length-1,0],a=[],d=n*n;for(;c.length;){const p=c.pop()||0,u=c.pop()||0,m=c.pop()||0;if(u-m<=i){for(let y=m;y<=u;y++)Ne(s[2*y],s[2*y+1],e,r)<=d&&a.push(o[y]);continue}const h=m+u>>1,g=s[2*h],f=s[2*h+1];Ne(g,f,e,r)<=d&&a.push(o[h]),(p===0?e-n<=g:r-n<=f)&&(c.push(m),c.push(h-1),c.push(1-p)),(p===0?e+n>=g:r+n>=f)&&(c.push(h+1),c.push(u),c.push(1-p))}return a}}function le(t,e,r,n,o,s){if(o-n<=r)return;const i=n+o>>1;Ie(t,e,i,n,o,s),le(t,e,r,n,i-1,1-s),le(t,e,r,i+1,o,1-s)}function Ie(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const d=o-n+1,p=r-n+1,u=Math.log(d),m=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*m*(d-m)/d)*(p-d/2<0?-1:1),g=Math.max(n,Math.floor(r-p*m/d+h)),f=Math.min(o,Math.floor(r+(d-p)*m/d+h));Ie(t,e,r,g,f,s)}const i=e[2*r+s];let c=n,a=o;for(G(t,e,n,r),e[2*o+s]>i&&G(t,e,n,o);c<a;){for(G(t,e,c,a),c++,a--;e[2*c+s]<i;)c++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?G(t,e,n,a):(a++,G(t,e,a,o)),a<=r&&(n=a+1),r<=a&&(o=a-1)}}function G(t,e,r,n){ce(t,r,n),ce(e,2*r,2*n),ce(e,2*r+1,2*n+1)}function ce(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function Ne(t,e,r,n){const o=t-r,s=e-n;return o*o+s*s}const dr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Be=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),N=2,L=3,ue=4,j=5,$e=6;class De{constructor(e){this.options=Object.assign(Object.create(dr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:r,minZoom:n,maxZoom:o}=this.options;r&&console.time("total time");const s=`prepare ${e.length} points`;r&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[p,u]=d.geometry.coordinates,m=Be(X(p)),h=Be(Y(u));i.push(m,h,1/0,a,-1,1),this.options.reduce&&i.push(0)}let c=this.trees[o+1]=this._createTree(i);r&&console.timeEnd(s);for(let a=o;a>=n;a--){const d=+Date.now();c=this.trees[a]=this._createTree(this._cluster(c,a)),r&&console.log("z%d: %d clusters in %dms",a,c.numItems,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const u=this.getClusters([n,o,180,i],r),m=this.getClusters([-180,o,s,i],r);return u.concat(m)}const c=this.trees[this._limitZoom(r)],a=c.range(X(n),Y(i),X(s),Y(o)),d=c.data,p=[];for(const u of a){const m=this.stride*u;p.push(d[m+j]>1?Ue(d,m,this.clusterProps):this.points[d[m+L]])}return p}getChildren(e){const r=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(r*this.stride>=i.length)throw new Error(o);const c=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[r*this.stride],d=i[r*this.stride+1],p=s.within(a,d,c),u=[];for(const m of p){const h=m*this.stride;i[h+ue]===e&&u.push(i[h+j]>1?Ue(i,h,this.clusterProps):this.points[i[h+L]])}if(u.length===0)throw new Error(o);return u}getLeaves(e,r,n){r=r||10,n=n||0;const o=[];return this._appendLeaves(o,e,r,n,0),o}getTile(e,r,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:c}=this.options,a=c/i,d=(n-a)/s,p=(n+1+a)/s,u={features:[]};return this._addTileFeatures(o.range((r-a)/s,d,(r+1+a)/s,p),o.data,r,n,s,u),r===0&&this._addTileFeatures(o.range(1-a/s,d,1,p),o.data,s,n,s,u),r===s-1&&this._addTileFeatures(o.range(0,d,a/s,p),o.data,-1,n,s,u),u.features.length?u:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,o,s){const i=this.getChildren(r);for(const c of i){const a=c.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(c),e.length===n)break}return s}_createTree(e){const r=new ie(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,o,s,i){for(const c of e){const a=c*this.stride,d=r[a+j]>1;let p,u,m;if(d)p=Ve(r,a,this.clusterProps),u=r[a],m=r[a+1];else{const f=this.points[r[a+L]];p=f.properties;const[y,v]=f.geometry.coordinates;u=X(y),m=Y(v)}const h={type:1,geometry:[[Math.round(this.options.extent*(u*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:p};let g;d||this.options.generateId?g=r[a+L]:g=this.points[r[a+L]].id,g!==void 0&&(h.id=g),i.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,c=n/(o*Math.pow(2,r)),a=e.data,d=[],p=this.stride;for(let u=0;u<a.length;u+=p){if(a[u+N]<=r)continue;a[u+N]=r;const m=a[u],h=a[u+1],g=e.within(a[u],a[u+1],c),f=a[u+j];let y=f;for(const v of g){const w=v*p;a[w+N]>r&&(y+=a[w+j])}if(y>f&&y>=i){let v=m*f,w=h*f,_,T=-1;const O=((u/p|0)<<5)+(r+1)+this.points.length;for(const E of g){const C=E*p;if(a[C+N]<=r)continue;a[C+N]=r;const S=a[C+j];v+=a[C]*S,w+=a[C+1]*S,a[C+ue]=O,s&&(_||(_=this._map(a,u,!0),T=this.clusterProps.length,this.clusterProps.push(_)),s(_,this._map(a,C)))}a[u+ue]=O,d.push(v/y,w/y,1/0,O,-1,y),s&&d.push(T)}else{for(let v=0;v<p;v++)d.push(a[u+v]);if(y>1)for(const v of g){const w=v*p;if(!(a[w+N]<=r)){a[w+N]=r;for(let _=0;_<p;_++)d.push(a[w+_])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+j]>1){const i=this.clusterProps[e[r+$e]];return n?Object.assign({},i):i}const o=this.points[e[r+L]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Ue(t,e,r){return{type:"Feature",id:t[e+L],properties:Ve(t,e,r),geometry:{type:"Point",coordinates:[fr(t[e]),pr(t[e+1])]}}}function Ve(t,e,r){const n=t[e+j],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=t[e+$e],i=s===-1?{}:Object.assign({},r[s]);return Object.assign(i,{cluster:!0,cluster_id:t[e+L],point_count:n,point_count_abbreviated:o})}function X(t){return t/360+.5}function Y(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 fr(t){return(t-.5)*360}function pr(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function de(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}typeof SuppressedError=="function"&&SuppressedError;class b{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 F{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(b.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>b.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(b.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function P(t,e="assertion failed"){if(t==null)throw Error(e)}const mr=(t,e,r,n)=>{const o=t.getBounds();P(o);const s=Ze(o,e,n);return r.filter(i=>s.contains(b.getPosition(i)))},Ze=(t,e,r)=>{const{northEast:n,southWest:o}=gr(t,e),s=yr({northEast:n,southWest:o},r);return vr(s,e)},hr=(t,e,r)=>{const n=Ze(t,e,r),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},gr=(t,e)=>{const r=e.fromLatLngToDivPixel(t.getNorthEast()),n=e.fromLatLngToDivPixel(t.getSouthWest());return P(r),P(n),{northEast:r,southWest:n}},yr=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),vr=({northEast:t,southWest:e},r)=>{const n=r.fromDivPixelToLatLng(e),o=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(n,o)};class Ge{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Er(e)}}class wr extends Ge{constructor(e){var{viewportPadding:r=60}=e,n=de(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=r}calculate({markers:e,map:r,mapCanvasProjection:n}){const o=r.getZoom();return P(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:mr(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}const Er=t=>t.map(r=>new F({position:b.getPosition(r),markers:[r]}));class kr extends Ge{constructor(e){var{maxZoom:r,radius:n=60}=e,o=de(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let r=!1,n=e.map.getZoom();P(n),n=Math.round(n);const o={zoom:n};if(!K(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const c=b.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[c.lng(),c.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!K(this.state,o)),this.state=o,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return P(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new F({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new F({markers:[o],position:b.getPosition(o)})}}class _r extends wr{constructor(e){var{maxZoom:r,radius:n=60,viewportPadding:o=60}=e,s=de(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:r,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const r=this.getViewportState(e);let n=!K(this.state,r);if(!K(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=b.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=r),{clusters:this.clusters,changed:n}}cluster(e){const r=this.getViewportState(e);return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new F({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new F({markers:[o],position:b.getPosition(o)})}getViewportState(e){const r=e.map.getZoom(),n=e.map.getBounds();return P(r),P(n),{zoom:Math.round(r),view:hr(n,e.mapCanvasProjection,this.viewportPadding)}}}class Cr{constructor(e,r){this.markers={sum:e.length};const n=r.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:r.length,markers:{mean:o/r.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class br{render({count:e,position:r},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
5
+ `),l.createElementVNode("div",bt,[l.renderSlot(t.$slots,"default",{},void 0,!0)],512)],2112)}const Ot=D(Ct,[["render",Mt],["__scopeId","data-v-ae91c15f"]]),Me=["closeclick","content_changed","domready","position_changed","visible","zindex_changed"],St=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,default:()=>({})},modelValue:{type:Boolean}},emits:[...Me,"update:modelValue"],setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.ref(),i=l.inject(M,l.ref()),c=l.inject(A,l.ref()),a=l.inject(te,l.ref());let d,p=t.modelValue;const u=l.computed(()=>{var f;return(f=e.default)==null?void 0:f.call(e).some(y=>y.type!==l.Comment)}),m=f=>{p=f,r("update:modelValue",f)},h=f=>{o.value&&(o.value.open({map:i.value,anchor:a.value,...f}),m(!0))},g=()=>{o.value&&(o.value.close(),m(!1))};return l.onMounted(()=>{l.watch([i,()=>t.options],([f,y],[v,w])=>{var T;const _=!V(y,w)||i.value!==v;i.value&&c.value&&_&&(o.value?(o.value.setOptions({...y,content:u.value?s.value:y.content}),a.value||h()):(o.value=l.markRaw(new c.value.InfoWindow({...y,content:u.value?s.value:y.content})),a.value&&(d=a.value.addListener("click",()=>h())),(!a.value||p)&&h(),Me.forEach(O=>{var E;(E=o.value)==null||E.addListener(O,C=>r(O,C))}),(T=o.value)==null||T.addListener("closeclick",()=>m(!1))))},{immediate:!0,flush:"post"}),l.watch(a,(f,y)=>{!o.value||f===y||(d&&(d.remove(),d=void 0),f&&(d=f.addListener("click",()=>h())))},{flush:"post"}),l.watch(()=>t.modelValue,f=>{f!==p&&(f?h():g())})}),l.onBeforeUnmount(()=>{var f;d&&d.remove(),o.value&&((f=c.value)==null||f.event.clearInstanceListeners(o.value),g())}),n({infoWindow:o,open:h,close:g}),{infoWindow:o,infoWindowRef:s,hasSlotContent:u,open:h,close:g}}}),vn="",Tt={key:0,class:"info-window-wrapper"};function Pt(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",Tt,[l.createElementVNode("div",l.mergeProps({ref:"infoWindowRef"},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("v-if",!0)}const At=D(St,[["render",Pt],["__scopeId","data-v-5660e752"]]);var qt=Object.getOwnPropertyNames,Lt=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty;function Oe(t,e){return function(n,o,s){return t(n,o,s)&&e(n,o,s)}}function H(t){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return t(r,n,o);var s=o.cache,i=s.get(r),c=s.get(n);if(i&&c)return i===n&&c===r;s.set(r,n),s.set(n,r);var a=t(r,n,o);return s.delete(r),s.delete(n),a}}function Se(t){return qt(t).concat(Lt(t))}var Rt=Object.hasOwn||function(t,e){return jt.call(t,e)};function I(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var xt="__v",It="__o",Nt="_owner",Te=Object.getOwnPropertyDescriptor,Pe=Object.keys;function Bt(t,e,r){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function $t(t,e){return I(t.getTime(),e.getTime())}function Dt(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Vt(t,e){return t===e}function Ae(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.entries(),i,c,a=0;(i=s.next())&&!i.done;){for(var d=e.entries(),p=!1,u=0;(c=d.next())&&!c.done;){if(o[u]){u++;continue}var m=i.value,h=c.value;if(r.equals(m[0],h[0],a,u,t,e,r)&&r.equals(m[1],h[1],m[0],h[0],t,e,r)){p=o[u]=!0;break}u++}if(!p)return!1;a++}return!0}var Ut=I;function Zt(t,e,r){var n=Pe(t),o=n.length;if(Pe(e).length!==o)return!1;for(;o-- >0;)if(!Le(t,e,r,n[o]))return!1;return!0}function U(t,e,r){var n=Se(t),o=n.length;if(Se(e).length!==o)return!1;for(var s,i,c;o-- >0;)if(s=n[o],!Le(t,e,r,s)||(i=Te(t,s),c=Te(e,s),(i||c)&&(!i||!c||i.configurable!==c.configurable||i.enumerable!==c.enumerable||i.writable!==c.writable)))return!1;return!0}function Gt(t,e){return I(t.valueOf(),e.valueOf())}function Ft(t,e){return t.source===e.source&&t.flags===e.flags}function qe(t,e,r){var n=t.size;if(n!==e.size)return!1;if(!n)return!0;for(var o=new Array(n),s=t.values(),i,c;(i=s.next())&&!i.done;){for(var a=e.values(),d=!1,p=0;(c=a.next())&&!c.done;){if(!o[p]&&r.equals(i.value,c.value,i.value,c.value,t,e,r)){d=o[p]=!0;break}p++}if(!d)return!1}return!0}function zt(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 Wt(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 Le(t,e,r,n){return(n===Nt||n===It||n===xt)&&(t.$$typeof||e.$$typeof)?!0:Rt(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var Ht="[object Arguments]",Kt="[object Boolean]",Xt="[object Date]",Yt="[object Error]",Jt="[object Map]",Qt="[object Number]",er="[object Object]",tr="[object RegExp]",rr="[object Set]",nr="[object String]",or="[object URL]",sr=Array.isArray,je=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Re=Object.assign,ar=Object.prototype.toString.call.bind(Object.prototype.toString);function ir(t){var e=t.areArraysEqual,r=t.areDatesEqual,n=t.areErrorsEqual,o=t.areFunctionsEqual,s=t.areMapsEqual,i=t.areNumbersEqual,c=t.areObjectsEqual,a=t.arePrimitiveWrappersEqual,d=t.areRegExpsEqual,p=t.areSetsEqual,u=t.areTypedArraysEqual,m=t.areUrlsEqual;return function(g,f,y){if(g===f)return!0;if(g==null||f==null)return!1;var v=typeof g;if(v!==typeof f)return!1;if(v!=="object")return v==="number"?i(g,f,y):v==="function"?o(g,f,y):!1;var w=g.constructor;if(w!==f.constructor)return!1;if(w===Object)return c(g,f,y);if(sr(g))return e(g,f,y);if(je!=null&&je(g))return u(g,f,y);if(w===Date)return r(g,f,y);if(w===RegExp)return d(g,f,y);if(w===Map)return s(g,f,y);if(w===Set)return p(g,f,y);var _=ar(g);return _===Xt?r(g,f,y):_===tr?d(g,f,y):_===Jt?s(g,f,y):_===rr?p(g,f,y):_===er?typeof g.then!="function"&&typeof f.then!="function"&&c(g,f,y):_===or?m(g,f,y):_===Yt?n(g,f,y):_===Ht?c(g,f,y):_===Kt||_===Qt||_===nr?a(g,f,y):!1}}function lr(t){var e=t.circular,r=t.createCustomConfig,n=t.strict,o={areArraysEqual:n?U:Bt,areDatesEqual:$t,areErrorsEqual:Dt,areFunctionsEqual:Vt,areMapsEqual:n?Oe(Ae,U):Ae,areNumbersEqual:Ut,areObjectsEqual:n?U:Zt,arePrimitiveWrappersEqual:Gt,areRegExpsEqual:Ft,areSetsEqual:n?Oe(qe,U):qe,areTypedArraysEqual:n?U:zt,areUrlsEqual:Wt};if(r&&(o=Re({},o,r(o))),e){var s=H(o.areArraysEqual),i=H(o.areMapsEqual),c=H(o.areObjectsEqual),a=H(o.areSetsEqual);o=Re({},o,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:c,areSetsEqual:a})}return o}function cr(t){return function(e,r,n,o,s,i,c){return t(e,r,c)}}function ur(t){var e=t.circular,r=t.comparator,n=t.createState,o=t.equals,s=t.strict;if(n)return function(a,d){var p=n(),u=p.cache,m=u===void 0?e?new WeakMap:void 0:u,h=p.meta;return r(a,d,{cache:m,equals:o,meta:h,strict:s})};if(e)return function(a,d){return r(a,d,{cache:new WeakMap,equals:o,meta:void 0,strict:s})};var i={cache:void 0,equals:o,meta:void 0,strict:s};return function(a,d){return r(a,d,i)}}var K=q();q({strict:!0}),q({circular:!0}),q({circular:!0,strict:!0}),q({createInternalComparator:function(){return I}}),q({strict:!0,createInternalComparator:function(){return I}}),q({circular:!0,createInternalComparator:function(){return I}}),q({circular:!0,createInternalComparator:function(){return I},strict:!0});function q(t){t===void 0&&(t={});var e=t.circular,r=e===void 0?!1:e,n=t.createInternalComparator,o=t.createState,s=t.strict,i=s===void 0?!1:s,c=lr(t),a=ir(c),d=n?n(a):cr(a);return ur({circular:r,comparator:a,createState:o,equals:d,strict:i})}const xe=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ae=1,Z=8;class ie{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(r!==219)throw new Error("Data does not appear to be in a KDBush format.");const o=n>>4;if(o!==ae)throw new Error(`Got v${o} data when expected v${ae}.`);const s=xe[n&15];if(!s)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[c]=new Uint32Array(e,4,1);return new ie(c,i,s,e)}constructor(e,r=64,n=Float64Array,o){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=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=xe.indexOf(this.ArrayType),i=e*2*this.ArrayType.BYTES_PER_ELEMENT,c=e*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-c%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${n}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,Z,e),this.coords=new this.ArrayType(this.data,Z+c+a,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Z+i+c+a),this.ids=new this.IndexArrayType(this.data,Z,e),this.coords=new this.ArrayType(this.data,Z+c+a,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ae<<4)+s]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=r,n}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return le(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,n,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:i,nodeSize:c}=this,a=[0,s.length-1,0],d=[];for(;a.length;){const p=a.pop()||0,u=a.pop()||0,m=a.pop()||0;if(u-m<=c){for(let y=m;y<=u;y++){const v=i[2*y],w=i[2*y+1];v>=e&&v<=n&&w>=r&&w<=o&&d.push(s[y])}continue}const h=m+u>>1,g=i[2*h],f=i[2*h+1];g>=e&&g<=n&&f>=r&&f<=o&&d.push(s[h]),(p===0?e<=g:r<=f)&&(a.push(m),a.push(h-1),a.push(1-p)),(p===0?n>=g:o>=f)&&(a.push(h+1),a.push(u),a.push(1-p))}return d}within(e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:s,nodeSize:i}=this,c=[0,o.length-1,0],a=[],d=n*n;for(;c.length;){const p=c.pop()||0,u=c.pop()||0,m=c.pop()||0;if(u-m<=i){for(let y=m;y<=u;y++)Ne(s[2*y],s[2*y+1],e,r)<=d&&a.push(o[y]);continue}const h=m+u>>1,g=s[2*h],f=s[2*h+1];Ne(g,f,e,r)<=d&&a.push(o[h]),(p===0?e-n<=g:r-n<=f)&&(c.push(m),c.push(h-1),c.push(1-p)),(p===0?e+n>=g:r+n>=f)&&(c.push(h+1),c.push(u),c.push(1-p))}return a}}function le(t,e,r,n,o,s){if(o-n<=r)return;const i=n+o>>1;Ie(t,e,i,n,o,s),le(t,e,r,n,i-1,1-s),le(t,e,r,i+1,o,1-s)}function Ie(t,e,r,n,o,s){for(;o>n;){if(o-n>600){const d=o-n+1,p=r-n+1,u=Math.log(d),m=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*m*(d-m)/d)*(p-d/2<0?-1:1),g=Math.max(n,Math.floor(r-p*m/d+h)),f=Math.min(o,Math.floor(r+(d-p)*m/d+h));Ie(t,e,r,g,f,s)}const i=e[2*r+s];let c=n,a=o;for(G(t,e,n,r),e[2*o+s]>i&&G(t,e,n,o);c<a;){for(G(t,e,c,a),c++,a--;e[2*c+s]<i;)c++;for(;e[2*a+s]>i;)a--}e[2*n+s]===i?G(t,e,n,a):(a++,G(t,e,a,o)),a<=r&&(n=a+1),r<=a&&(o=a-1)}}function G(t,e,r,n){ce(t,r,n),ce(e,2*r,2*n),ce(e,2*r+1,2*n+1)}function ce(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function Ne(t,e,r,n){const o=t-r,s=e-n;return o*o+s*s}const dr={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},Be=Math.fround||(t=>e=>(t[0]=+e,t[0]))(new Float32Array(1)),N=2,L=3,ue=4,j=5,$e=6;class De{constructor(e){this.options=Object.assign(Object.create(dr),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){const{log:r,minZoom:n,maxZoom:o}=this.options;r&&console.time("total time");const s=`prepare ${e.length} points`;r&&console.time(s),this.points=e;const i=[];for(let a=0;a<e.length;a++){const d=e[a];if(!d.geometry)continue;const[p,u]=d.geometry.coordinates,m=Be(X(p)),h=Be(Y(u));i.push(m,h,1/0,a,-1,1),this.options.reduce&&i.push(0)}let c=this.trees[o+1]=this._createTree(i);r&&console.timeEnd(s);for(let a=o;a>=n;a--){const d=+Date.now();c=this.trees[a]=this._createTree(this._cluster(c,a)),r&&console.log("z%d: %d clusters in %dms",a,c.numItems,+Date.now()-d)}return r&&console.timeEnd("total time"),this}getClusters(e,r){let n=((e[0]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,e[1]));let s=e[2]===180?180:((e[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,s=180;else if(n>s){const u=this.getClusters([n,o,180,i],r),m=this.getClusters([-180,o,s,i],r);return u.concat(m)}const c=this.trees[this._limitZoom(r)],a=c.range(X(n),Y(i),X(s),Y(o)),d=c.data,p=[];for(const u of a){const m=this.stride*u;p.push(d[m+j]>1?Ve(d,m,this.clusterProps):this.points[d[m+L]])}return p}getChildren(e){const r=this._getOriginId(e),n=this._getOriginZoom(e),o="No cluster with the specified id.",s=this.trees[n];if(!s)throw new Error(o);const i=s.data;if(r*this.stride>=i.length)throw new Error(o);const c=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=i[r*this.stride],d=i[r*this.stride+1],p=s.within(a,d,c),u=[];for(const m of p){const h=m*this.stride;i[h+ue]===e&&u.push(i[h+j]>1?Ve(i,h,this.clusterProps):this.points[i[h+L]])}if(u.length===0)throw new Error(o);return u}getLeaves(e,r,n){r=r||10,n=n||0;const o=[];return this._appendLeaves(o,e,r,n,0),o}getTile(e,r,n){const o=this.trees[this._limitZoom(e)],s=Math.pow(2,e),{extent:i,radius:c}=this.options,a=c/i,d=(n-a)/s,p=(n+1+a)/s,u={features:[]};return this._addTileFeatures(o.range((r-a)/s,d,(r+1+a)/s,p),o.data,r,n,s,u),r===0&&this._addTileFeatures(o.range(1-a/s,d,1,p),o.data,s,n,s,u),r===s-1&&this._addTileFeatures(o.range(0,d,a/s,p),o.data,-1,n,s,u),u.features.length?u:null}getClusterExpansionZoom(e){let r=this._getOriginZoom(e)-1;for(;r<=this.options.maxZoom;){const n=this.getChildren(e);if(r++,n.length!==1)break;e=n[0].properties.cluster_id}return r}_appendLeaves(e,r,n,o,s){const i=this.getChildren(r);for(const c of i){const a=c.properties;if(a&&a.cluster?s+a.point_count<=o?s+=a.point_count:s=this._appendLeaves(e,a.cluster_id,n,o,s):s<o?s++:e.push(c),e.length===n)break}return s}_createTree(e){const r=new ie(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let n=0;n<e.length;n+=this.stride)r.add(e[n],e[n+1]);return r.finish(),r.data=e,r}_addTileFeatures(e,r,n,o,s,i){for(const c of e){const a=c*this.stride,d=r[a+j]>1;let p,u,m;if(d)p=Ue(r,a,this.clusterProps),u=r[a],m=r[a+1];else{const f=this.points[r[a+L]];p=f.properties;const[y,v]=f.geometry.coordinates;u=X(y),m=Y(v)}const h={type:1,geometry:[[Math.round(this.options.extent*(u*s-n)),Math.round(this.options.extent*(m*s-o))]],tags:p};let g;d||this.options.generateId?g=r[a+L]:g=this.points[r[a+L]].id,g!==void 0&&(h.id=g),i.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,r){const{radius:n,extent:o,reduce:s,minPoints:i}=this.options,c=n/(o*Math.pow(2,r)),a=e.data,d=[],p=this.stride;for(let u=0;u<a.length;u+=p){if(a[u+N]<=r)continue;a[u+N]=r;const m=a[u],h=a[u+1],g=e.within(a[u],a[u+1],c),f=a[u+j];let y=f;for(const v of g){const w=v*p;a[w+N]>r&&(y+=a[w+j])}if(y>f&&y>=i){let v=m*f,w=h*f,_,T=-1;const O=((u/p|0)<<5)+(r+1)+this.points.length;for(const E of g){const C=E*p;if(a[C+N]<=r)continue;a[C+N]=r;const S=a[C+j];v+=a[C]*S,w+=a[C+1]*S,a[C+ue]=O,s&&(_||(_=this._map(a,u,!0),T=this.clusterProps.length,this.clusterProps.push(_)),s(_,this._map(a,C)))}a[u+ue]=O,d.push(v/y,w/y,1/0,O,-1,y),s&&d.push(T)}else{for(let v=0;v<p;v++)d.push(a[u+v]);if(y>1)for(const v of g){const w=v*p;if(!(a[w+N]<=r)){a[w+N]=r;for(let _=0;_<p;_++)d.push(a[w+_])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,r,n){if(e[r+j]>1){const i=this.clusterProps[e[r+$e]];return n?Object.assign({},i):i}const o=this.points[e[r+L]].properties,s=this.options.map(o);return n&&s===o?Object.assign({},s):s}}function Ve(t,e,r){return{type:"Feature",id:t[e+L],properties:Ue(t,e,r),geometry:{type:"Point",coordinates:[fr(t[e]),pr(t[e+1])]}}}function Ue(t,e,r){const n=t[e+j],o=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?`${Math.round(n/100)/10}k`:n,s=t[e+$e],i=s===-1?{}:Object.assign({},r[s]);return Object.assign(i,{cluster:!0,cluster_id:t[e+L],point_count:n,point_count_abbreviated:o})}function X(t){return t/360+.5}function Y(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 fr(t){return(t-.5)*360}function pr(t){const e=(180-t*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function de(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}typeof SuppressedError=="function"&&SuppressedError;class b{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 F{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(b.getPosition(r));return e}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(e=>b.getVisible(e)).length}push(e){this.markers.push(e)}delete(){this.marker&&(b.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}function P(t,e="assertion failed"){if(t==null)throw Error(e)}const mr=(t,e,r,n)=>{const o=t.getBounds();P(o);const s=Ze(o,e,n);return r.filter(i=>s.contains(b.getPosition(i)))},Ze=(t,e,r)=>{const{northEast:n,southWest:o}=gr(t,e),s=yr({northEast:n,southWest:o},r);return vr(s,e)},hr=(t,e,r)=>{const n=Ze(t,e,r),o=n.getNorthEast(),s=n.getSouthWest();return[s.lng(),s.lat(),o.lng(),o.lat()]},gr=(t,e)=>{const r=e.fromLatLngToDivPixel(t.getNorthEast()),n=e.fromLatLngToDivPixel(t.getSouthWest());return P(r),P(n),{northEast:r,southWest:n}},yr=({northEast:t,southWest:e},r)=>(t.x+=r,t.y-=r,e.x-=r,e.y+=r,{northEast:t,southWest:e}),vr=({northEast:t,southWest:e},r)=>{const n=r.fromDivPixelToLatLng(e),o=r.fromDivPixelToLatLng(t);return new google.maps.LatLngBounds(n,o)};class Ge{constructor({maxZoom:e=16}){this.maxZoom=e}noop({markers:e}){return Er(e)}}class wr extends Ge{constructor(e){var{viewportPadding:r=60}=e,n=de(e,["viewportPadding"]);super(n),this.viewportPadding=60,this.viewportPadding=r}calculate({markers:e,map:r,mapCanvasProjection:n}){const o=r.getZoom();return P(o),o>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:mr(r,n,e,this.viewportPadding),map:r,mapCanvasProjection:n})}}}const Er=t=>t.map(r=>new F({position:b.getPosition(r),markers:[r]}));class kr extends Ge{constructor(e){var{maxZoom:r,radius:n=60}=e,o=de(e,["maxZoom","radius"]);super({maxZoom:r}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:n},o))}calculate(e){let r=!1,n=e.map.getZoom();P(n),n=Math.round(n);const o={zoom:n};if(!K(e.markers,this.markers)){r=!0,this.markers=[...e.markers];const s=this.markers.map(i=>{const c=b.getPosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[c.lng(),c.lat()]},properties:{marker:i}}});this.superCluster.load(s)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!K(this.state,o)),this.state=o,e.markers.length===0?(this.clusters=[],{clusters:this.clusters,changed:r}):(r&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:r})}cluster({map:e}){const r=e.getZoom();return P(r),this.superCluster.getClusters([-180,-90,180,90],Math.round(r)).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new F({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new F({markers:[o],position:b.getPosition(o)})}}class _r extends wr{constructor(e){var{maxZoom:r,radius:n=60,viewportPadding:o=60}=e,s=de(e,["maxZoom","radius","viewportPadding"]);super({maxZoom:r,viewportPadding:o}),this.markers=[],this.clusters=[],this.superCluster=new De(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(e){const r=this.getViewportState(e);let n=!K(this.state,r);if(!K(e.markers,this.markers)){n=!0,this.markers=[...e.markers];const o=this.markers.map(s=>{const i=b.getPosition(s);return{type:"Feature",geometry:{type:"Point",coordinates:[i.lng(),i.lat()]},properties:{marker:s}}});this.superCluster.load(o)}return n&&(this.clusters=this.cluster(e),this.state=r),{clusters:this.clusters,changed:n}}cluster(e){const r=this.getViewportState(e);return this.superCluster.getClusters(r.view,r.zoom).map(n=>this.transformCluster(n))}transformCluster({geometry:{coordinates:[e,r]},properties:n}){if(n.cluster)return new F({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:{lat:r,lng:e}});const o=n.marker;return new F({markers:[o],position:b.getPosition(o)})}getViewportState(e){const r=e.map.getZoom(),n=e.map.getBounds();return P(r),P(n),{zoom:Math.round(r),view:hr(n,e.mapCanvasProjection,this.viewportPadding)}}}class Cr{constructor(e,r){this.markers={sum:e.length};const n=r.map(s=>s.count),o=n.reduce((s,i)=>s+i,0);this.clusters={count:r.length,markers:{mean:o/r.length,sum:o,min:Math.min(...n),max:Math.max(...n)}}}}class br{render({count:e,position:r},n,o){const i=`<svg fill="${e>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">
6
6
  <circle cx="120" cy="120" opacity=".6" r="70" />
7
7
  <circle cx="120" cy="120" opacity=".3" r="90" />
8
8
  <circle cx="120" cy="120" opacity=".2" r="110" />
9
9
  <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>
10
- </svg>`,c=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(b.isAdvancedMarkerAvailable(o)){const u=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");const m={map:o,position:r,zIndex:a,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:r,zIndex:a,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function Mr(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class fe{constructor(){Mr(fe,google.maps.OverlayView)}}var R;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(R||(R={}));const Or=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class Sr extends fe{constructor({map:e,markers:r=[],algorithmOptions:n={},algorithm:o=new kr(n),renderer:s=new br,onClusterClick:i=Or}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){const n=this.markers.indexOf(e);return n===-1?!1:(b.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){let n=!1;return e.forEach(o=>{n=this.removeMarker(o,!0)||n}),n&&!r&&this.render(),n}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,R.CLUSTERING_BEGIN,this);const{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const o=new Set;for(const i of r)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||b.setMap(i.marker,null):s.push(i.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>b.setMap(i,null)))}google.maps.event.trigger(this,R.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();P(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=>b.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Cr(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{if(n.markers.length===1)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,r),n.markers.forEach(o=>b.setMap(o,null)),this.onClusterClick){const o=b.isAdvancedMarker(n.marker)?R.GMP_CLICK:R.CLUSTER_CLICK;n.marker.addListener(o,s=>{google.maps.event.trigger(this,R.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})}b.setMap(n.marker,r)})}}function pe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tr=typeof global=="object"&&global&&global.Object===Object&&global;const Pr=Tr;var Ar=typeof self=="object"&&self&&self.Object===Object&&self,qr=Pr||Ar||Function("return this")();const Fe=qr;var Lr=function(){return Fe.Date.now()};const me=Lr;var jr=/\s/;function Rr(t){for(var e=t.length;e--&&jr.test(t.charAt(e)););return e}var xr=/^\s+/;function Ir(t){return t&&t.slice(0,Rr(t)+1).replace(xr,"")}var Nr=Fe.Symbol;const J=Nr;var ze=Object.prototype,Br=ze.hasOwnProperty,$r=ze.toString,z=J?J.toStringTag:void 0;function Dr(t){var e=Br.call(t,z),r=t[z];try{t[z]=void 0;var n=!0}catch{}var o=$r.call(t);return n&&(e?t[z]=r:delete t[z]),o}var Ur=Object.prototype,Vr=Ur.toString;function Zr(t){return Vr.call(t)}var Gr="[object Null]",Fr="[object Undefined]",We=J?J.toStringTag:void 0;function zr(t){return t==null?t===void 0?Fr:Gr:We&&We in Object(t)?Dr(t):Zr(t)}function Wr(t){return t!=null&&typeof t=="object"}var Hr="[object Symbol]";function Kr(t){return typeof t=="symbol"||Wr(t)&&zr(t)==Hr}var He=0/0,Xr=/^[-+]0x[0-9a-f]+$/i,Yr=/^0b[01]+$/i,Jr=/^0o[0-7]+$/i,Qr=parseInt;function Ke(t){if(typeof t=="number")return t;if(Kr(t))return He;if(pe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ir(t);var r=Yr.test(t);return r||Jr.test(t)?Qr(t.slice(2),r?2:8):Xr.test(t)?He:+t}var en="Expected a function",tn=Math.max,rn=Math.min;function nn(t,e,r){var n,o,s,i,c,a,d=0,p=!1,u=!1,m=!0;if(typeof t!="function")throw new TypeError(en);e=Ke(e)||0,pe(r)&&(p=!!r.leading,u="maxWait"in r,s=u?tn(Ke(r.maxWait)||0,e):s,m="trailing"in r?!!r.trailing:m);function h(E){var C=n,S=o;return n=o=void 0,d=E,i=t.apply(S,C),i}function g(E){return d=E,c=setTimeout(v,e),p?h(E):i}function f(E){var C=E-a,S=E-d,x=e-C;return u?rn(x,s-S):x}function y(E){var C=E-a,S=E-d;return a===void 0||C>=e||C<0||u&&S>=s}function v(){var E=me();if(y(E))return w(E);c=setTimeout(v,f(E))}function w(E){return c=void 0,m&&n?h(E):(n=o=void 0,i)}function _(){c!==void 0&&clearTimeout(c),d=0,n=a=o=c=void 0}function T(){return c===void 0?i:w(me())}function O(){var E=me(),C=y(E);if(n=arguments,o=this,a=E,C){if(c===void 0)return g(a);if(u)return clearTimeout(c),c=setTimeout(v,e),h(a)}return c===void 0&&(c=setTimeout(v,e)),i}return O.cancel=_,O.flush=T,O}class on extends Sr{constructor(r,n=10){super(r);ee(this,"debouncedRender");this.debouncedRender=nn(()=>{super.render()},n,{leading:!0,trailing:!0})}addMarker(r,n){super.addMarker(r,!0),n||this.debouncedRender()}removeMarker(r,n){const o=super.removeMarker(r,!0);return n||this.debouncedRender(),o}addMarkers(r,n){super.addMarkers(r,!0),n||this.debouncedRender()}removeMarkers(r,n){const o=super.removeMarkers(r,!0);return n||this.debouncedRender(),o}clearMarkers(r){super.clearMarkers(!0),r||this.debouncedRender()}render(){this.debouncedRender.cancel(),super.render()}destroy(){this.debouncedRender.cancel()}}const Xe=Object.values(R),sn=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})},renderDebounceDelay:{type:Number,default:10}},emits:Xe,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.inject(M,l.ref()),i=l.inject(A,l.ref());return l.provide(re,o),l.watch(s,()=>{s.value&&(o.value=l.markRaw(new on({map:s.value,algorithm:new _r(t.options.algorithmOptions??{}),...t.options},t.renderDebounceDelay)),Xe.forEach(c=>{var a;(a=o.value)==null||a.addListener(c,d=>e(c,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var c;o.value&&((c=i.value)==null||c.event.clearInstanceListeners(o.value),o.value.clearMarkers(!0),o.value.setMap(null),o.value.destroy())}),r({markerCluster:o}),()=>{var c;return(c=n.default)==null?void 0:c.call(n)}}}),an=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...t.options,element:o.value})),c=$(W,[],i,r);return n({customMarker:c}),{customMarkerRef:o,customMarker:c,hasSlotContent:s}}}),vn="",ln={key:0,class:"custom-marker-wrapper"};function cn(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",ln,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:t.$attrs.onClick?"pointer":void 0}},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("v-if",!0)}const un=D(an,[["render",cn],["__scopeId","data-v-4b2eafc1"]]),dn=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(t){const e=l.ref(),r=l.inject(M,l.ref()),n=l.inject(A,l.ref());return l.watch([r,()=>t.options],([o,s],[i,c])=>{const a=!U(s,c)||r.value!==i;if(r.value&&n.value&&a){let d;if(s.data&&!(s.data instanceof n.value.MVCArray)){const p=n.value.LatLng,u=s.data.map(m=>m instanceof p||"location"in m&&(m.location instanceof p||m.location===null)?m:"location"in m?{...m,location:new p(m.location)}:new p(m));d={...s,data:u}}else d=s;e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:r.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});k.AdvancedMarker=yt,k.Circle=_t,k.CustomControl=Ot,k.CustomMarker=un,k.GoogleMap=dt,k.HeatmapLayer=dn,k.InfoWindow=At,k.Marker=vt,k.MarkerCluster=sn,k.Polygon=Et,k.Polyline=wt,k.Rectangle=kt,k.apiSymbol=A,k.mapSymbol=M,k.mapTilesLoadedSymbol=ne,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
10
+ </svg>`,c=`Cluster of ${e} markers`,a=Number(google.maps.Marker.MAX_ZINDEX)+e;if(b.isAdvancedMarkerAvailable(o)){const u=new DOMParser().parseFromString(i,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");const m={map:o,position:r,zIndex:a,title:c,content:u};return new google.maps.marker.AdvancedMarkerElement(m)}const d={position:r,zIndex:a,title:c,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}function Mr(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}class fe{constructor(){Mr(fe,google.maps.OverlayView)}}var R;(function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"})(R||(R={}));const Or=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)};class Sr extends fe{constructor({map:e,markers:r=[],algorithmOptions:n={},algorithm:o=new kr(n),renderer:s=new br,onClusterClick:i=Or}){super(),this.map=null,this.idleListener=null,this.markers=[...r],this.clusters=[],this.algorithm=o,this.renderer=s,this.onClusterClick=i,e&&this.setMap(e)}addMarker(e,r){this.markers.includes(e)||(this.markers.push(e),r||this.render())}addMarkers(e,r){e.forEach(n=>{this.addMarker(n,!0)}),r||this.render()}removeMarker(e,r){const n=this.markers.indexOf(e);return n===-1?!1:(b.setMap(e,null),this.markers.splice(n,1),r||this.render(),!0)}removeMarkers(e,r){let n=!1;return e.forEach(o=>{n=this.removeMarker(o,!0)||n}),n&&!r&&this.render(),n}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,R.CLUSTERING_BEGIN,this);const{clusters:r,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||n==null){const o=new Set;for(const i of r)i.markers.length==1&&o.add(i.markers[0]);const s=[];for(const i of this.clusters)i.marker!=null&&(i.markers.length==1?o.has(i.marker)||b.setMap(i.marker,null):s.push(i.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame(()=>s.forEach(i=>b.setMap(i,null)))}google.maps.event.trigger(this,R.CLUSTERING_END,this)}}onAdd(){const e=this.getMap();P(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=>b.setMap(e,null)),this.clusters.forEach(e=>e.delete()),this.clusters=[]}renderClusters(){const e=new Cr(this.markers,this.clusters),r=this.getMap();this.clusters.forEach(n=>{if(n.markers.length===1)n.marker=n.markers[0];else if(n.marker=this.renderer.render(n,e,r),n.markers.forEach(o=>b.setMap(o,null)),this.onClusterClick){const o=b.isAdvancedMarker(n.marker)?R.GMP_CLICK:R.CLUSTER_CLICK;n.marker.addListener(o,s=>{google.maps.event.trigger(this,R.CLUSTER_CLICK,n),this.onClusterClick(s,n,r)})}b.setMap(n.marker,r)})}}function pe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Tr=typeof global=="object"&&global&&global.Object===Object&&global;const Pr=Tr;var Ar=typeof self=="object"&&self&&self.Object===Object&&self,qr=Pr||Ar||Function("return this")();const Fe=qr;var Lr=function(){return Fe.Date.now()};const me=Lr;var jr=/\s/;function Rr(t){for(var e=t.length;e--&&jr.test(t.charAt(e)););return e}var xr=/^\s+/;function Ir(t){return t&&t.slice(0,Rr(t)+1).replace(xr,"")}var Nr=Fe.Symbol;const J=Nr;var ze=Object.prototype,Br=ze.hasOwnProperty,$r=ze.toString,z=J?J.toStringTag:void 0;function Dr(t){var e=Br.call(t,z),r=t[z];try{t[z]=void 0;var n=!0}catch{}var o=$r.call(t);return n&&(e?t[z]=r:delete t[z]),o}var Vr=Object.prototype,Ur=Vr.toString;function Zr(t){return Ur.call(t)}var Gr="[object Null]",Fr="[object Undefined]",We=J?J.toStringTag:void 0;function zr(t){return t==null?t===void 0?Fr:Gr:We&&We in Object(t)?Dr(t):Zr(t)}function Wr(t){return t!=null&&typeof t=="object"}var Hr="[object Symbol]";function Kr(t){return typeof t=="symbol"||Wr(t)&&zr(t)==Hr}var He=0/0,Xr=/^[-+]0x[0-9a-f]+$/i,Yr=/^0b[01]+$/i,Jr=/^0o[0-7]+$/i,Qr=parseInt;function Ke(t){if(typeof t=="number")return t;if(Kr(t))return He;if(pe(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pe(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ir(t);var r=Yr.test(t);return r||Jr.test(t)?Qr(t.slice(2),r?2:8):Xr.test(t)?He:+t}var en="Expected a function",tn=Math.max,rn=Math.min;function nn(t,e,r){var n,o,s,i,c,a,d=0,p=!1,u=!1,m=!0;if(typeof t!="function")throw new TypeError(en);e=Ke(e)||0,pe(r)&&(p=!!r.leading,u="maxWait"in r,s=u?tn(Ke(r.maxWait)||0,e):s,m="trailing"in r?!!r.trailing:m);function h(E){var C=n,S=o;return n=o=void 0,d=E,i=t.apply(S,C),i}function g(E){return d=E,c=setTimeout(v,e),p?h(E):i}function f(E){var C=E-a,S=E-d,x=e-C;return u?rn(x,s-S):x}function y(E){var C=E-a,S=E-d;return a===void 0||C>=e||C<0||u&&S>=s}function v(){var E=me();if(y(E))return w(E);c=setTimeout(v,f(E))}function w(E){return c=void 0,m&&n?h(E):(n=o=void 0,i)}function _(){c!==void 0&&clearTimeout(c),d=0,n=a=o=c=void 0}function T(){return c===void 0?i:w(me())}function O(){var E=me(),C=y(E);if(n=arguments,o=this,a=E,C){if(c===void 0)return g(a);if(u)return clearTimeout(c),c=setTimeout(v,e),h(a)}return c===void 0&&(c=setTimeout(v,e)),i}return O.cancel=_,O.flush=T,O}class on extends Sr{constructor(r,n=10){super(r);ee(this,"debouncedRender");this.debouncedRender=nn(()=>{super.render()},n,{leading:!0,trailing:!0})}addMarker(r,n){super.addMarker(r,!0),n||this.debouncedRender()}removeMarker(r,n){const o=super.removeMarker(r,!0);return n||this.debouncedRender(),o}addMarkers(r,n){super.addMarkers(r,!0),n||this.debouncedRender()}removeMarkers(r,n){const o=super.removeMarkers(r,!0);return n||this.debouncedRender(),o}clearMarkers(r){super.clearMarkers(!0),r||this.debouncedRender()}render(){this.debouncedRender.cancel(),super.render()}destroy(){this.debouncedRender.cancel()}}class sn extends _r{calculate(e){return e.markers.length===0?{clusters:[],changed:!0}:super.calculate(e)}}const Xe=Object.values(R),an=l.defineComponent({name:"MarkerCluster",props:{options:{type:Object,default:()=>({})},renderDebounceDelay:{type:Number,default:10}},emits:Xe,setup(t,{emit:e,expose:r,slots:n}){const o=l.ref(),s=l.inject(M,l.ref()),i=l.inject(A,l.ref());return l.provide(re,o),l.watch(s,()=>{s.value&&(o.value=l.markRaw(new on({map:s.value,algorithm:new sn(t.options.algorithmOptions??{}),...t.options},t.renderDebounceDelay)),Xe.forEach(c=>{var a;(a=o.value)==null||a.addListener(c,d=>e(c,d))}))},{immediate:!0}),l.onBeforeUnmount(()=>{var c;o.value&&((c=i.value)==null||c.event.clearInstanceListeners(o.value),o.value.clearMarkers(!0),o.value.setMap(null),o.value.destroy())}),r({markerCluster:o}),()=>{var c;return(c=n.default)==null?void 0:c.call(n)}}}),ln=l.defineComponent({inheritAttrs:!1,props:{options:{type:Object,required:!0}},setup(t,{slots:e,emit:r,expose:n}){const o=l.ref(),s=l.computed(()=>{var a;return(a=e.default)==null?void 0:a.call(e).some(d=>d.type!==l.Comment)}),i=l.computed(()=>({...t.options,element:o.value})),c=$(W,[],i,r);return n({customMarker:c}),{customMarkerRef:o,customMarker:c,hasSlotContent:s}}}),wn="",cn={key:0,class:"custom-marker-wrapper"};function un(t,e,r,n,o,s){return t.hasSlotContent?(l.openBlock(),l.createElementBlock("div",cn,[l.createElementVNode("div",l.mergeProps({ref:"customMarkerRef",style:{cursor:t.$attrs.onClick?"pointer":void 0}},t.$attrs),[l.renderSlot(t.$slots,"default",{},void 0,!0)],16)])):l.createCommentVNode("v-if",!0)}const dn=D(ln,[["render",un],["__scopeId","data-v-90fe8380"]]),fn=l.defineComponent({name:"HeatmapLayer",props:{options:{type:Object,default:()=>({})}},setup(t){const e=l.ref(),r=l.inject(M,l.ref()),n=l.inject(A,l.ref());return l.watch([r,()=>t.options],([o,s],[i,c])=>{const a=!V(s,c)||r.value!==i;if(r.value&&n.value&&a){let d;if(s.data&&!(s.data instanceof n.value.MVCArray)){const p=n.value.LatLng,u=s.data.map(m=>m instanceof p||"location"in m&&(m.location instanceof p||m.location===null)?m:"location"in m?{...m,location:new p(m.location)}:new p(m));d={...s,data:u}}else d=s;e.value?e.value.setOptions(d):e.value=l.markRaw(new n.value.visualization.HeatmapLayer({...d,map:r.value}))}},{immediate:!0}),l.onBeforeUnmount(()=>{e.value&&e.value.setMap(null)}),{heatmapLayer:e}},render:()=>null});k.AdvancedMarker=yt,k.Circle=_t,k.CustomControl=Ot,k.CustomMarker=dn,k.GoogleMap=dt,k.HeatmapLayer=fn,k.InfoWindow=At,k.Marker=vt,k.MarkerCluster=an,k.Polygon=Et,k.Polyline=wt,k.Rectangle=kt,k.apiSymbol=A,k.mapSymbol=M,k.mapTilesLoadedSymbol=ne,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
@@ -1,3 +1,11 @@
1
1
  import * as themes from "../themes/index";
2
2
  export type IControlPosition = keyof typeof google.maps.ControlPosition;
3
3
  export type ITheme = keyof typeof themes;
4
+ export interface ICustomMarkerOptions {
5
+ position?: google.maps.MarkerOptions["position"];
6
+ map?: google.maps.Map | google.maps.StreetViewPanorama | null;
7
+ anchorPoint?: "CENTER" | "TOP_CENTER" | "BOTTOM_CENTER" | "LEFT_CENTER" | "RIGHT_CENTER" | "TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT";
8
+ offsetX?: number;
9
+ offsetY?: number;
10
+ zIndex?: number | null;
11
+ }
@@ -1,12 +1,15 @@
1
- import { PropType } from "vue";
1
+ import { PropType, type Ref } from "vue";
2
+ export interface ICustomMarkerExposed {
3
+ customMarker: Ref<InstanceType<typeof google.maps.CustomMarker> | undefined>;
4
+ }
2
5
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
6
  options: {
4
7
  type: PropType<google.maps.CustomMarkerOptions>;
5
8
  required: true;
6
9
  };
7
10
  }>, {
8
- customMarkerRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
9
- customMarker: import("vue").Ref<(google.maps.OverlayView & {
11
+ customMarkerRef: Ref<HTMLElement | undefined, HTMLElement | undefined>;
12
+ customMarker: Ref<(google.maps.OverlayView & {
10
13
  getPosition(): google.maps.LatLng | null;
11
14
  getVisible(): boolean;
12
15
  setOptions(options: google.maps.CustomMarkerOptions): void;
@@ -1,4 +1,9 @@
1
- import { PropType } from "vue";
1
+ import { PropType, type Ref } from "vue";
2
+ export interface IInfoWindowExposed {
3
+ infoWindow: Ref<google.maps.InfoWindow | undefined>;
4
+ open: (opts?: google.maps.InfoWindowOpenOptions) => void;
5
+ close: () => void;
6
+ }
2
7
  export declare const infoWindowEvents: string[];
3
8
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
9
  options: {
@@ -9,8 +14,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
9
14
  type: BooleanConstructor;
10
15
  };
11
16
  }>, {
12
- infoWindow: import("vue").Ref<google.maps.InfoWindow | undefined, google.maps.InfoWindow | undefined>;
13
- infoWindowRef: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
17
+ infoWindow: Ref<google.maps.InfoWindow | undefined, google.maps.InfoWindow | undefined>;
18
+ infoWindowRef: Ref<HTMLElement | undefined, HTMLElement | undefined>;
14
19
  hasSlotContent: import("vue").ComputedRef<boolean | undefined>;
15
20
  open: (opts?: google.maps.InfoWindowOpenOptions) => void;
16
21
  close: () => void;
@@ -0,0 +1,16 @@
1
+ import { SuperClusterViewportAlgorithm, type AlgorithmInput, type AlgorithmOutput } from "@googlemaps/markerclusterer";
2
+ /**
3
+ * Wrapper around SuperClusterViewportAlgorithm that handles empty marker arrays.
4
+ *
5
+ * Stopgap for upstream issue googlemaps/js-markerclusterer#1129.
6
+ * The fix from PR #1014 was only applied to SuperClusterAlgorithm, not
7
+ * SuperClusterViewportAlgorithm. This wrapper adds the same empty markers check.
8
+ *
9
+ * @see https://github.com/googlemaps/js-markerclusterer/issues/1129
10
+ * @see https://github.com/googlemaps/js-markerclusterer/pull/1130
11
+ *
12
+ * TODO: Remove once upstream PR #1130 is released.
13
+ */
14
+ export declare class SafeSuperClusterViewportAlgorithm extends SuperClusterViewportAlgorithm {
15
+ calculate(input: AlgorithmInput): AlgorithmOutput;
16
+ }
@@ -1,12 +1,12 @@
1
1
  export { default as GoogleMap } from "./GoogleMap.vue";
2
- export { default as AdvancedMarker } from "./AdvancedMarker.vue";
3
- export { default as Marker } from "./Marker";
2
+ export { default as AdvancedMarker, type IAdvancedMarkerExposed as AdvancedMarkerExposed } from "./AdvancedMarker.vue";
3
+ export { default as Marker, type IMarkerExposed as MarkerExposed } from "./Marker";
4
4
  export { default as Polyline } from "./Polyline";
5
5
  export { default as Polygon } from "./Polygon";
6
6
  export { default as Rectangle } from "./Rectangle";
7
7
  export { default as Circle } from "./Circle";
8
8
  export { default as CustomControl } from "./CustomControl.vue";
9
- export { default as InfoWindow } from "./InfoWindow.vue";
10
- export { default as MarkerCluster } from "./MarkerCluster";
11
- export { default as CustomMarker } from "./CustomMarker.vue";
9
+ export { default as InfoWindow, type IInfoWindowExposed as InfoWindowExposed } from "./InfoWindow.vue";
10
+ export { default as MarkerCluster, type IMarkerClusterExposed as MarkerClusterExposed } from "./MarkerCluster";
11
+ export { default as CustomMarker, type ICustomMarkerExposed as CustomMarkerExposed } from "./CustomMarker.vue";
12
12
  export { default as HeatmapLayer } from "./HeatmapLayer";
@@ -1,2 +1,3 @@
1
1
  export * from "./components/index";
2
2
  export { mapSymbol, apiSymbol, mapTilesLoadedSymbol } from "./shared/index";
3
+ export type { ICustomMarkerOptions as CustomMarkerOptions } from "./@types/index";
@@ -1,13 +1,8 @@
1
1
  import { createCustomMarkerClass } from "./utils";
2
+ import type { ICustomMarkerOptions } from "./@types/index";
2
3
  declare global {
3
4
  namespace google.maps {
4
- interface CustomMarkerOptions {
5
- position?: google.maps.MarkerOptions["position"];
6
- map?: google.maps.Map | google.maps.StreetViewPanorama | null;
7
- anchorPoint?: "CENTER" | "TOP_CENTER" | "BOTTOM_CENTER" | "LEFT_CENTER" | "RIGHT_CENTER" | "TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT";
8
- offsetX?: number;
9
- offsetY?: number;
10
- zIndex?: number | null;
5
+ interface CustomMarkerOptions extends ICustomMarkerOptions {
11
6
  }
12
7
  let CustomMarker: ReturnType<typeof createCustomMarkerClass>;
13
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue3-google-map",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,6 +17,7 @@
17
17
  ],
18
18
  "exports": {
19
19
  ".": {
20
+ "browser": "./dist/index.umd.js",
20
21
  "import": "./dist/index.mjs",
21
22
  "require": "./dist/index.cjs",
22
23
  "types": "./dist/types/index.d.ts"