File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/www/3629.0ac19dd1bf9d5e22.js
"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3629],{33629:(R,P,p)=>{p.r(P),p.d(P,{CapacitorGoogleMapsWeb:()=>vt});var u=p(73308),w=p(22126),M=p(47413),L=p.n(M);function x(i,t,e,n,s,o){if(s-n<=e)return;const r=n+s>>1;F(i,t,r,n,s,o%2),x(i,t,e,n,r-1,o+1),x(i,t,e,r+1,s,o+1)}function F(i,t,e,n,s,o){for(;s>n;){if(s-n>600){const c=s-n+1,d=e-n+1,h=Math.log(c),m=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*m*(c-m)/c)*(d-c/2<0?-1:1);F(i,t,e,Math.max(n,Math.floor(e-d*m/c+y)),Math.min(s,Math.floor(e+(c-d)*m/c+y)),o)}const r=t[2*e+o];let l=n,a=s;for(I(i,t,n,e),t[2*s+o]>r&&I(i,t,n,s);l<a;){for(I(i,t,l,a),l++,a--;t[2*l+o]<r;)l++;for(;t[2*a+o]>r;)a--}t[2*n+o]===r?I(i,t,n,a):(a++,I(i,t,a,s)),a<=e&&(n=a+1),e<=a&&(s=a-1)}}function I(i,t,e,n){z(i,e,n),z(t,2*e,2*n),z(t,2*e+1,2*n+1)}function z(i,t,e){const n=i[t];i[t]=i[e],i[e]=n}function _(i,t,e,n){const s=i-e,o=t-n;return s*s+o*o}const q=i=>i[0],tt=i=>i[1];class U{constructor(t,e=q,n=tt,s=64,o=Float64Array){this.nodeSize=s,this.points=t;const r=t.length<65536?Uint16Array:Uint32Array,l=this.ids=new r(t.length),a=this.coords=new o(2*t.length);for(let c=0;c<t.length;c++)l[c]=c,a[2*c]=e(t[c]),a[2*c+1]=n(t[c]);x(l,a,s,0,l.length-1,0)}range(t,e,n,s){return function Q(i,t,e,n,s,o,r){const l=[0,i.length-1,0],a=[];let c,d;for(;l.length;){const h=l.pop(),m=l.pop(),y=l.pop();if(m-y<=r){for(let f=y;f<=m;f++)c=t[2*f],d=t[2*f+1],c>=e&&c<=s&&d>=n&&d<=o&&a.push(i[f]);continue}const g=Math.floor((y+m)/2);c=t[2*g],d=t[2*g+1],c>=e&&c<=s&&d>=n&&d<=o&&a.push(i[g]);const v=(h+1)%2;(0===h?e<=c:n<=d)&&(l.push(y),l.push(g-1),l.push(v)),(0===h?s>=c:o>=d)&&(l.push(g+1),l.push(m),l.push(v))}return a}(this.ids,this.coords,t,e,n,s,this.nodeSize)}within(t,e,n){return function Y(i,t,e,n,s,o){const r=[0,i.length-1,0],l=[],a=s*s;for(;r.length;){const c=r.pop(),d=r.pop(),h=r.pop();if(d-h<=o){for(let f=h;f<=d;f++)_(t[2*f],t[2*f+1],e,n)<=a&&l.push(i[f]);continue}const m=Math.floor((h+d)/2),y=t[2*m],g=t[2*m+1];_(y,g,e,n)<=a&&l.push(i[m]);const v=(c+1)%2;(0===c?e-s<=y:n-s<=g)&&(r.push(h),r.push(m-1),r.push(v)),(0===c?e+s>=y:n+s>=g)&&(r.push(m+1),r.push(d),r.push(v))}return l}(this.ids,this.coords,t,e,n,this.nodeSize)}}const et={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:i=>i},b=Math.fround||(i=new Float32Array(1),t=>(i[0]=+t,i[0]));var i;class nt{constructor(t){this.options=k(Object.create(et),t),this.trees=new Array(this.options.maxZoom+1)}load(t){const{log:e,minZoom:n,maxZoom:s,nodeSize:o}=this.options;e&&console.time("total time");const r=`prepare ${t.length} points`;e&&console.time(r),this.points=t;let l=[];for(let a=0;a<t.length;a++)t[a].geometry&&l.push(ot(t[a],a));this.trees[s+1]=new U(l,j,W,o,Float32Array),e&&console.timeEnd(r);for(let a=s;a>=n;a--){const c=+Date.now();l=this._cluster(l,a),this.trees[a]=new U(l,j,W,o,Float32Array),e&&console.log("z%d: %d clusters in %dms",a,l.length,+Date.now()-c)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const s=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,o=180;else if(n>o){const d=this.getClusters([n,s,180,r],e),h=this.getClusters([-180,s,o,r],e);return d.concat(h)}const l=this.trees[this._limitZoom(e)],a=l.range(A(n),O(r),A(o),O(s)),c=[];for(const d of a){const h=l.points[d];c.push(h.numPoints?H(h):this.points[h.index])}return c}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),s="No cluster with the specified id.",o=this.trees[n];if(!o)throw new Error(s);const r=o.points[e];if(!r)throw new Error(s);const l=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=o.within(r.x,r.y,l),c=[];for(const d of a){const h=o.points[d];h.parentId===t&&c.push(h.numPoints?H(h):this.points[h.index])}if(0===c.length)throw new Error(s);return c}getLeaves(t,e,n){const s=[];return this._appendLeaves(s,t,e=e||10,n=n||0,0),s}getTile(t,e,n){const s=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:r,radius:l}=this.options,a=l/r,c=(n-a)/o,d=(n+1+a)/o,h={features:[]};return this._addTileFeatures(s.range((e-a)/o,c,(e+1+a)/o,d),s.points,e,n,o,h),0===e&&this._addTileFeatures(s.range(1-a/o,c,1,d),s.points,o,n,o,h),e===o-1&&this._addTileFeatures(s.range(0,c,a/o,d),s.points,-1,n,o,h),h.features.length?h:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const n=this.getChildren(t);if(e++,1!==n.length)break;t=n[0].properties.cluster_id}return e}_appendLeaves(t,e,n,s,o){const r=this.getChildren(e);for(const l of r){const a=l.properties;if(a&&a.cluster?o+a.point_count<=s?o+=a.point_count:o=this._appendLeaves(t,a.cluster_id,n,s,o):o<s?o++:t.push(l),t.length===n)break}return o}_addTileFeatures(t,e,n,s,o,r){for(const l of t){const a=e[l],c=a.numPoints;let d,h,m;if(c)d=$(a),h=a.x,m=a.y;else{const v=this.points[a.index];d=v.properties,h=A(v.geometry.coordinates[0]),m=O(v.geometry.coordinates[1])}const y={type:1,geometry:[[Math.round(this.options.extent*(h*o-n)),Math.round(this.options.extent*(m*o-s))]],tags:d};let g;c?g=a.id:this.options.generateId?g=a.index:this.points[a.index].id&&(g=this.points[a.index].id),void 0!==g&&(y.id=g),r.features.push(y)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const n=[],{radius:s,extent:o,reduce:r,minPoints:l}=this.options,a=s/(o*Math.pow(2,e));for(let c=0;c<t.length;c++){const d=t[c];if(d.zoom<=e)continue;d.zoom=e;const h=this.trees[e+1],m=h.within(d.x,d.y,a),y=d.numPoints||1;let g=y;for(const v of m){const f=h.points[v];f.zoom>e&&(g+=f.numPoints||1)}if(g>y&&g>=l){let v=d.x*y,f=d.y*y,B=r&&y>1?this._map(d,!0):null;const G=(c<<5)+(e+1)+this.points.length;for(const Mt of m){const C=h.points[Mt];if(C.zoom<=e)continue;C.zoom=e;const X=C.numPoints||1;v+=C.x*X,f+=C.y*X,C.parentId=G,r&&(B||(B=this._map(d,!0)),r(B,this._map(C)))}d.parentId=G,n.push(st(v/g,f/g,G,g,B))}else if(n.push(d),g>1)for(const v of m){const f=h.points[v];f.zoom<=e||(f.zoom=e,n.push(f))}}return n}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e){if(t.numPoints)return e?k({},t.properties):t.properties;const n=this.points[t.index].properties,s=this.options.map(n);return e&&s===n?k({},s):s}}function st(i,t,e,n,s){return{x:b(i),y:b(t),zoom:1/0,id:e,parentId:-1,numPoints:n,properties:s}}function ot(i,t){const[e,n]=i.geometry.coordinates;return{x:b(A(e)),y:b(O(n)),zoom:1/0,index:t,parentId:-1}}function H(i){return{type:"Feature",id:i.id,properties:$(i),geometry:{type:"Point",coordinates:[it(i.x),rt(i.y)]}}}function $(i){const t=i.numPoints,e=t>=1e4?`${Math.round(t/1e3)}k`:t>=1e3?Math.round(t/100)/10+"k":t;return k(k({},i.properties),{cluster:!0,cluster_id:i.id,point_count:t,point_count_abbreviated:e})}function A(i){return i/360+.5}function O(i){const t=Math.sin(i*Math.PI/180),e=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return e<0?0:e>1?1:e}function it(i){return 360*(i-.5)}function rt(i){const t=(180-360*i)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function k(i,t){for(const e in t)i[e]=t[e];return i}function j(i){return i.x}function W(i){return i.y}class S{constructor({markers:t,position:e}){this.markers=t,e&&(this._position=e instanceof google.maps.LatLng?e:new google.maps.LatLng(e))}get bounds(){if(0!==this.markers.length||this._position)return this.markers.reduce((t,e)=>t.extend(e.getPosition()),new google.maps.LatLngBounds(this._position,this._position))}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>t.getVisible()).length}push(t){this.markers.push(t)}delete(){this.marker&&(this.marker.setMap(null),delete this.marker),this.markers.length=0}}class N{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return ht(t)}}const ht=i=>i.map(e=>new S({position:e.getPosition(),markers:[e]}));class J extends N{constructor(t){var{maxZoom:e,radius:n=60}=t,s=function E(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(i);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(i,n[s])&&(e[n[s]]=i[n[s]])}return e}(t,["maxZoom","radius"]);super({maxZoom:e}),this.superCluster=new nt(Object.assign({maxZoom:this.maxZoom,radius:n},s)),this.state={zoom:null}}calculate(t){let e=!1;if(!L()(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const s=this.markers.map(o=>({type:"Feature",geometry:{type:"Point",coordinates:[o.getPosition().lng(),o.getPosition().lat()]},properties:{marker:o}}));this.superCluster.load(s)}const n={zoom:t.map.getZoom()};return e||this.state.zoom>this.maxZoom&&n.zoom>this.maxZoom||(e=e||!L()(this.state,n)),this.state=n,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster({map:t}){return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map(this.transformCluster.bind(this))}transformCluster({geometry:{coordinates:[t,e]},properties:n}){if(n.cluster)return new S({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map(s=>s.properties.marker),position:new google.maps.LatLng({lat:e,lng:t})});{const s=n.marker;return new S({markers:[s],position:s.getPosition()})}}}class pt{constructor(t,e){this.markers={sum:t.length};const n=e.map(o=>o.count),s=n.reduce((o,r)=>o+r,0);this.clusters={count:e.length,markers:{mean:s/e.length,sum:s,min:Math.min(...n),max:Math.max(...n)}}}}class gt{render({count:t,position:e},n){const s=t>Math.max(10,n.clusters.markers.mean)?"#ff0000":"#0000ff",o=window.btoa(`\n <svg fill="${s}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240">\n <circle cx="120" cy="120" opacity=".6" r="70" />\n <circle cx="120" cy="120" opacity=".3" r="90" />\n <circle cx="120" cy="120" opacity=".2" r="110" />\n </svg>`);return new google.maps.Marker({position:e,icon:{url:`data:image/svg+xml;base64,${o}`,scaledSize:new google.maps.Size(45,45)},label:{text:String(t),color:"rgba(255,255,255,0.9)",fontSize:"12px"},title:`Cluster of ${t} markers`,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+t})}}class D{constructor(){!function mt(i,t){for(let e in t.prototype)i.prototype[e]=t.prototype[e]}(D,google.maps.OverlayView)}}var T=function(i){return i.CLUSTERING_BEGIN="clusteringbegin",i.CLUSTERING_END="clusteringend",i.CLUSTER_CLICK="click",i}(T||{});const ft=(i,t,e)=>{e.fitBounds(t.bounds)};class yt extends D{constructor({map:t,markers:e=[],algorithm:n=new J({}),renderer:s=new gt,onClusterClick:o=ft}){super(),this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(n=>{this.addMarker(n,!0)}),e||this.render()}removeMarker(t,e){const n=this.markers.indexOf(t);return-1!==n&&(t.setMap(null),this.markers.splice(n,1),e||this.render(),!0)}removeMarkers(t,e){let n=!1;return t.forEach(s=>{n=this.removeMarker(s,!0)||n}),n&&!e&&this.render(),n}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&this.getProjection()){google.maps.event.trigger(this,T.CLUSTERING_BEGIN,this);const{clusters:e,changed:n}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});(n||null==n)&&(this.reset(),this.clusters=e,this.renderClusters()),google.maps.event.trigger(this,T.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>t.setMap(null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new pt(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,t),this.onClusterClick&&n.marker.addListener("click",s=>{google.maps.event.trigger(this,T.CLUSTER_CLICK,n),this.onClusterClick(s,n,e)})),n.marker.setMap(e)})}}var Z=p(4154);class vt extends w.E_{constructor(){super(...arguments),this.gMapsRef=void 0,this.maps={},this.currMarkerId=0,this.currPolygonId=0,this.currCircleId=0,this.currPolylineId=0,this.onClusterClickHandler=(t,e,n)=>{var s,o;const r=this.getIdFromMap(n),l=[];if(null!=e.markers)for(const a of e.markers){const c=this.getIdFromMarker(r,a);l.push({markerId:c,latitude:null===(s=a.getPosition())||void 0===s?void 0:s.lat(),longitude:null===(o=a.getPosition())||void 0===o?void 0:o.lng(),title:a.getTitle(),snippet:""})}this.notifyListeners("onClusterClick",{mapId:r,latitude:e.position.lat(),longitude:e.position.lng(),size:e.count,items:l})}}getIdFromMap(t){for(const e in this.maps)if(this.maps[e].map==t)return e;return""}getIdFromMarker(t,e){for(const n in this.maps[t].markers)if(this.maps[t].markers[n]==e)return n;return""}importGoogleLib(t,e,n){var s=this;return(0,u.A)(function*(){if(void 0===s.gMapsRef){const o=yield p.e(8030).then(p.bind(p,8030)),l=yield new o.Loader({apiKey:t??"",version:"weekly",libraries:["places"],language:n,region:e}).load();s.gMapsRef=l.maps,console.log("Loaded google maps API")}})()}enableTouch(t){var e=this;return(0,u.A)(function*(){e.maps[t.id].map.setOptions({gestureHandling:"auto"})})()}disableTouch(t){var e=this;return(0,u.A)(function*(){e.maps[t.id].map.setOptions({gestureHandling:"none"})})()}setCamera(t){var e=this;return(0,u.A)(function*(){e.maps[t.id].map.moveCamera({center:t.config.coordinate,heading:t.config.bearing,tilt:t.config.angle,zoom:t.config.zoom})})()}getMapType(t){var e=this;return(0,u.A)(function*(){let n=e.maps[t.id].map.getMapTypeId();if(void 0!==n)return"roadmap"===n&&(n=Z.N.Normal),{type:`${n.charAt(0).toUpperCase()}${n.slice(1)}`};throw new Error("Map type is undefined")})()}setMapType(t){var e=this;return(0,u.A)(function*(){let n=t.mapType.toLowerCase();t.mapType===Z.N.Normal&&(n="roadmap"),e.maps[t.id].map.setMapTypeId(n)})()}enableIndoorMaps(){return(0,u.A)(function*(){throw new Error("Method not supported on web.")})()}enableTrafficLayer(t){var e=this;return(0,u.A)(function*(){var n;const s=null!==(n=e.maps[t.id].trafficLayer)&&void 0!==n?n:new google.maps.TrafficLayer;t.enabled?(s.setMap(e.maps[t.id].map),e.maps[t.id].trafficLayer=s):e.maps[t.id].trafficLayer&&(s.setMap(null),e.maps[t.id].trafficLayer=void 0)})()}enableAccessibilityElements(){return(0,u.A)(function*(){throw new Error("Method not supported on web.")})()}dispatchMapEvent(){throw new Error("Method not supported on web.")}enableCurrentLocation(t){var e=this;return(0,u.A)(function*(){if(t.enabled){if(!navigator.geolocation)throw new Error("Geolocation not supported on web browser.");navigator.geolocation.getCurrentPosition(n=>{e.maps[t.id].map.setCenter({lat:n.coords.latitude,lng:n.coords.longitude}),e.notifyListeners("onMyLocationButtonClick",{}),e.notifyListeners("onMyLocationClick",{})},()=>{throw new Error("Geolocation not supported on web browser.")})}})()}setPadding(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id].map.getBounds();void 0!==n&&e.maps[t.id].map.fitBounds(n,t.padding)})()}getMapBounds(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id].map.getBounds();if(!n)throw new Error("Google Map Bounds could not be found.");return new Z.q({southwest:{lat:n.getSouthWest().lat(),lng:n.getSouthWest().lng()},center:{lat:n.getCenter().lat(),lng:n.getCenter().lng()},northeast:{lat:n.getNorthEast().lat(),lng:n.getNorthEast().lng()}})})()}fitBounds(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id].map,s=e.getLatLngBounds(t.bounds);n.fitBounds(s,t.padding)})()}addMarkers(t){var e=this;return(0,u.A)(function*(){const n=[],s=e.maps[t.id];for(const o of t.markers){const r=e.buildMarkerOpts(o,s.map),l=new google.maps.Marker(r),a=""+e.currMarkerId;s.markers[a]=l,e.setMarkerListeners(t.id,a,l),n.push(a),e.currMarkerId++}return{ids:n}})()}addMarker(t){var e=this;return(0,u.A)(function*(){const n=e.buildMarkerOpts(t.marker,e.maps[t.id].map),s=new google.maps.Marker(n),o=""+e.currMarkerId;return e.maps[t.id].markers[o]=s,e.setMarkerListeners(t.id,o,s),e.currMarkerId++,{id:o}})()}removeMarkers(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id];for(const s of t.markerIds)n.markers[s].setMap(null),delete n.markers[s]})()}removeMarker(t){var e=this;return(0,u.A)(function*(){e.maps[t.id].markers[t.markerId].setMap(null),delete e.maps[t.id].markers[t.markerId]})()}addPolygons(t){var e=this;return(0,u.A)(function*(){const n=[],s=e.maps[t.id];for(const o of t.polygons){const r=new google.maps.Polygon(o);r.setMap(s.map);const l=""+e.currPolygonId;e.maps[t.id].polygons[l]=r,e.setPolygonListeners(t.id,l,r),n.push(l),e.currPolygonId++}return{ids:n}})()}removePolygons(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id];for(const s of t.polygonIds)n.polygons[s].setMap(null),delete n.polygons[s]})()}addCircles(t){var e=this;return(0,u.A)(function*(){const n=[],s=e.maps[t.id];for(const o of t.circles){const r=new google.maps.Circle(o);r.setMap(s.map);const l=""+e.currCircleId;e.maps[t.id].circles[l]=r,e.setCircleListeners(t.id,l,r),n.push(l),e.currCircleId++}return{ids:n}})()}removeCircles(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id];for(const s of t.circleIds)n.circles[s].setMap(null),delete n.circles[s]})()}addPolylines(t){var e=this;return(0,u.A)(function*(){const n=[],s=e.maps[t.id];for(const o of t.polylines){const r=new google.maps.Polyline(o);r.set("tag",o.tag),r.setMap(s.map);const l=""+e.currPolylineId;e.maps[t.id].polylines[l]=r,e.setPolylineListeners(t.id,l,r),n.push(l),e.currPolylineId++}return{ids:n}})()}removePolylines(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t.id];for(const s of t.polylineIds)n.polylines[s].setMap(null),delete n.polylines[s]})()}enableClustering(t){var e=this;return(0,u.A)(function*(){var n;const s=[];for(const o in e.maps[t.id].markers)s.push(e.maps[t.id].markers[o]);e.maps[t.id].markerClusterer=new yt({map:e.maps[t.id].map,markers:s,algorithm:new J({minPoints:null!==(n=t.minClusterSize)&&void 0!==n?n:4}),onClusterClick:e.onClusterClickHandler})})()}disableClustering(t){var e=this;return(0,u.A)(function*(){var n;null===(n=e.maps[t.id].markerClusterer)||void 0===n||n.setMap(null),e.maps[t.id].markerClusterer=void 0})()}onScroll(){return(0,u.A)(function*(){throw new Error("Method not supported on web.")})()}onResize(){return(0,u.A)(function*(){throw new Error("Method not supported on web.")})()}onDisplay(){return(0,u.A)(function*(){throw new Error("Method not supported on web.")})()}create(t){var e=this;return(0,u.A)(function*(){console.log(`Create map: ${t.id}`),yield e.importGoogleLib(t.apiKey,t.region,t.language),e.maps[t.id]={map:new window.google.maps.Map(t.element,Object.assign({},t.config)),element:t.element,markers:{},polygons:{},circles:{},polylines:{}},e.setMapListeners(t.id)})()}destroy(t){var e=this;return(0,u.A)(function*(){console.log(`Destroy map: ${t.id}`);const n=e.maps[t.id];n.element.innerHTML="",n.map.unbindAll(),delete e.maps[t.id]})()}mapBoundsContains(t){var e=this;return(0,u.A)(function*(){const n=e.getLatLngBounds(t.bounds),s=new google.maps.LatLng(t.point.lat,t.point.lng);return{contains:n.contains(s)}})()}mapBoundsExtend(t){var e=this;return(0,u.A)(function*(){const n=e.getLatLngBounds(t.bounds),s=new google.maps.LatLng(t.point.lat,t.point.lng);return n.extend(s),{bounds:new Z.q({southwest:{lat:n.getSouthWest().lat(),lng:n.getSouthWest().lng()},center:{lat:n.getCenter().lat(),lng:n.getCenter().lng()},northeast:{lat:n.getNorthEast().lat(),lng:n.getNorthEast().lng()}})}})()}getLatLngBounds(t){return new google.maps.LatLngBounds(new google.maps.LatLng(t.southwest.lat,t.southwest.lng),new google.maps.LatLng(t.northeast.lat,t.northeast.lng))}setCircleListeners(t,e,n){var s=this;return(0,u.A)(function*(){n.addListener("click",()=>{s.notifyListeners("onCircleClick",{mapId:t,circleId:e,tag:n.get("tag")})})})()}setPolygonListeners(t,e,n){var s=this;return(0,u.A)(function*(){n.addListener("click",()=>{s.notifyListeners("onPolygonClick",{mapId:t,polygonId:e,tag:n.get("tag")})})})()}setPolylineListeners(t,e,n){var s=this;return(0,u.A)(function*(){n.addListener("click",()=>{s.notifyListeners("onPolylineClick",{mapId:t,polylineId:e,tag:n.get("tag")})})})()}setMarkerListeners(t,e,n){var s=this;return(0,u.A)(function*(){n.addListener("click",()=>{var o,r;s.notifyListeners("onMarkerClick",{mapId:t,markerId:e,latitude:null===(o=n.getPosition())||void 0===o?void 0:o.lat(),longitude:null===(r=n.getPosition())||void 0===r?void 0:r.lng(),title:n.getTitle(),snippet:""})}),n.addListener("dragstart",()=>{var o,r;s.notifyListeners("onMarkerDragStart",{mapId:t,markerId:e,latitude:null===(o=n.getPosition())||void 0===o?void 0:o.lat(),longitude:null===(r=n.getPosition())||void 0===r?void 0:r.lng(),title:n.getTitle(),snippet:""})}),n.addListener("drag",()=>{var o,r;s.notifyListeners("onMarkerDrag",{mapId:t,markerId:e,latitude:null===(o=n.getPosition())||void 0===o?void 0:o.lat(),longitude:null===(r=n.getPosition())||void 0===r?void 0:r.lng(),title:n.getTitle(),snippet:""})}),n.addListener("dragend",()=>{var o,r;s.notifyListeners("onMarkerDragEnd",{mapId:t,markerId:e,latitude:null===(o=n.getPosition())||void 0===o?void 0:o.lat(),longitude:null===(r=n.getPosition())||void 0===r?void 0:r.lng(),title:n.getTitle(),snippet:""})})})()}setMapListeners(t){var e=this;return(0,u.A)(function*(){const n=e.maps[t].map;n.addListener("idle",(0,u.A)(function*(){var s,o;const r=yield e.getMapBounds({id:t});e.notifyListeners("onCameraIdle",{mapId:t,bearing:n.getHeading(),bounds:r,latitude:null===(s=n.getCenter())||void 0===s?void 0:s.lat(),longitude:null===(o=n.getCenter())||void 0===o?void 0:o.lng(),tilt:n.getTilt(),zoom:n.getZoom()})})),n.addListener("center_changed",()=>{e.notifyListeners("onCameraMoveStarted",{mapId:t,isGesture:!0})}),n.addListener("bounds_changed",(0,u.A)(function*(){var s,o;const r=yield e.getMapBounds({id:t});e.notifyListeners("onBoundsChanged",{mapId:t,bearing:n.getHeading(),bounds:r,latitude:null===(s=n.getCenter())||void 0===s?void 0:s.lat(),longitude:null===(o=n.getCenter())||void 0===o?void 0:o.lng(),tilt:n.getTilt(),zoom:n.getZoom()})})),n.addListener("click",s=>{var o,r;e.notifyListeners("onMapClick",{mapId:t,latitude:null===(o=s.latLng)||void 0===o?void 0:o.lat(),longitude:null===(r=s.latLng)||void 0===r?void 0:r.lng()})}),e.notifyListeners("onMapReady",{mapId:t})})()}buildMarkerOpts(t,e){var n;let s;return t.iconUrl&&(s={url:t.iconUrl,scaledSize:t.iconSize?new google.maps.Size(t.iconSize.width,t.iconSize.height):null,anchor:t.iconAnchor?new google.maps.Point(t.iconAnchor.x,t.iconAnchor.y):new google.maps.Point(0,0),origin:t.iconOrigin?new google.maps.Point(t.iconOrigin.x,t.iconOrigin.y):new google.maps.Point(0,0)}),{position:t.coordinate,map:e,opacity:t.opacity,title:t.title,icon:s,draggable:t.draggable,zIndex:null!==(n=t.zIndex)&&void 0!==n?n:0}}}},47413:R=>{R.exports=function P(p,u){if(p===u)return!0;if(p&&u&&"object"==typeof p&&"object"==typeof u){if(p.constructor!==u.constructor)return!1;var w,M,L;if(Array.isArray(p)){if((w=p.length)!=u.length)return!1;for(M=w;0!=M--;)if(!P(p[M],u[M]))return!1;return!0}if(p.constructor===RegExp)return p.source===u.source&&p.flags===u.flags;if(p.valueOf!==Object.prototype.valueOf)return p.valueOf()===u.valueOf();if(p.toString!==Object.prototype.toString)return p.toString()===u.toString();if((w=(L=Object.keys(p)).length)!==Object.keys(u).length)return!1;for(M=w;0!=M--;)if(!Object.prototype.hasOwnProperty.call(u,L[M]))return!1;for(M=w;0!=M--;){var x=L[M];if(!P(p[x],u[x]))return!1}return!0}return p!=p&&u!=u}}}]);