vendor: 10,860 bytes, line 1
1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["vendors-node_modules_googlemaps_markerclusterer_dist_index_esm_js"],{111:function(t,e,s){s.d(e,{w1:function(){return T}});var r=s(32017),o=s.n(r);const n=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class i{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,s]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const r=s>>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const o=n[15&s];if(!o)throw new Error("Unrecognized array type.");const[a]=new Uint16Array(t,2,1),[h]=new Uint32Array(t,4,1);return new i(h,a,o,t)}constructor(t,e=64,s=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=n.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,a=t*this.IndexArrayType.BYTES_PER_ELEMENT,h=(8-a%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${s}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+h,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+a+h),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+a+h,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=e,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return a(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,s,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:n,nodeSize:i}=this,a=[0,o.length-1,0],h=[];for(;a.length;){const c=a.pop()||0,l=a.pop()||0,u=a.pop()||0;if(l-u<=i){for(let i=u;i<=l;i++){const a=n[2*i],c=n[2*i+1];a>=t&&a<=s&&c>=e&&c<=r&&h.push(o[i])}continue}const p=u+l>>1,m=n[2*p],d=n[2*p+1];m>=t&&m<=s&&d>=e&&d<=r&&h.push(o[p]),(0===c?t<=m:e<=d)&&(a.push(u),a.push(p-1),a.push(1-c)),(0===c?s>=m:r>=d)&&(a.push(p+1),a.push(l),a.push(1-c))}return h}within(t,e,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:n}=this,i=[0,r.length-1,0],a=[],h=s*s;for(;i.length;){const c=i.pop()||0,l=i.pop()||0,p=i.pop()||0;if(l-p<=n){for(let s=p;s<=l;s++)u(o[2*s],o[2*s+1],t,e)<=h&&a.push(r[s]);continue}const m=p+l>>1,d=o[2*m],g=o[2*m+1];u(d,g,t,e)<=h&&a.push(r[m]),(0===c?t-s<=d:e-s<=g)&&(i.push(p),i.push(m-1),i.push(1-c)),(0===c?t+s>=d:e+s>=g)&&(i.push(m+1),i.push(l),i.push(1-c))}return a}}function a(t,e,s,r,o,n){if(o-r<=s)return;const i=r+o>>1;h(t,e,i,r,o,n),a(t,e,s,r,i-1,1-n),a(t,e,s,i+1,o,1-n)}function h(t,e,s,r,o,n){for(;o>r;){if(o-r>600){const i=o-r+1,a=s-r+1,c=Math.log(i),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(i-l)/i)*(a-i/2<0?-1:1);h(t,e,s,Math.max(r,Math.floor(s-a*l/i+u)),Math.min(o,Math.floor(s+(i-a)*l/i+u)),n)}const i=e[2*s+n];let a=r,l=o;for(c(t,e,r,s),e[2*o+n]>i&&c(t,e,r,o);a<l;){for(c(t,e,a,l),a++,l--;e[2*a+n]<i;)a++;for(;e[2*l+n]>i;)l--}e[2*r+n]===i?c(t,e,r,l):(l++,c(t,e,l,o)),l<=s&&(r=l+1),s<=l&&(o=l-1)}}function c(t,e,s,r){l(t,s,r),l(e,2*s,2*r),l(e,2*s+1,2*r+1)}function l(t,e,s){const r=t[e];t[e]=t[s],t[s]=r}function u(t,e,s,r){const o=t-s,n=e-r;return o*o+n*n}const p={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},m=Math.fround||(d=new Float32Array(1),t=>(d[0]=+t,d[0]));var d;class g{constructor(t){this.options=Object.assign(Object.create(p),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:s,maxZoom:r}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const n=[];for(let e=0;e<t.length;e++){const s=t[e];if(!s.geometry)continue;const[r,o]=s.geometry.coordinates,i=m(k(r)),a=m(w(o));n.push(i,a,1/0,e,-1,1),this.options.reduce&&n.push(0)}let i=this.trees[r+1]=this._createTree(n);e&&console.timeEnd(o);for(let t=r;t>=s;t--){const s=+Date.now();i=this.trees[t]=this._createTree(this._cluster(i,t)),e&&console.log("z%d: %d clusters in %dms",t,i.numItems,+Date.now()-s)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,o=180;else if(s>o){const t=this.getClusters([s,r,180,n],e),i=this.getClusters([-180,r,o,n],e);return t.concat(i)}const i=this.trees[this._limitZoom(e)],a=i.range(k(s),w(n),k(o),w(r)),h=i.data,c=[];for(const t of a){const e=this.stride*t;c.push(h[e+5]>1?f(h,e,this.clusterProps):this.points[h[e+3]])}return c}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),r="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(r);const n=o.data;if(e*this.stride>=n.length)throw new Error(r);const i=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=n[e*this.stride],h=n[e*this.stride+1],c=o.within(a,h,i),l=[];for(const e of c){const s=e*this.stride;n[s+4]===t&&l.push(n[s+5]>1?f(n,s,this.clusterProps):this.points[n[s+3]])}if(0===l.length)throw new Error(r);return l}getLeaves(t,e,s){e=e||10,s=s||0;const r=[];return this._appendLeaves(r,t,e,s,0),r}getTile(t,e,s){const r=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:n,radius:i}=this.options,a=i/n,h=(s-a)/o,c=(s+1+a)/o,l={features:[]};return this._addTileFeatures(r.range((e-a)/o,h,(e+1+a)/o,c),r.data,e,s,o,l),0===e&&this._addTileFeatures(r.range(1-a/o,h,1,c),r.data,o,s,o,l),e===o-1&&this._addTileFeatures(r.range(0,h,a/o,c),r.data,-1,s,o,l),l.features.length?l:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,r,o){const n=this.getChildren(e);for(const e of n){const n=e.properties;if(n&&n.cluster?o+n.point_count<=r?o+=n.point_count:o=this._appendLeaves(t,n.cluster_id,s,r,o):o<r?o++:t.push(e),t.length===s)break}return o}_createTree(t){const e=new i(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<t.length;s+=this.stride)e.add(t[s],t[s+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,s,r,o,n){for(const i of t){const t=i*this.stride,a=e[t+5]>1;let h,c,l;if(a)h=y(e,t,this.clusterProps),c=e[t],l=e[t+1];else{const s=this.points[e[t+3]];h=s.properties;const[r,o]=s.geometry.coordinates;c=k(r),l=w(o)}const u={type:1,geometry:[[Math.round(this.options.extent*(c*o-s)),Math.round(this.options.extent*(l*o-r))]],tags:h};let p;p=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(u.id=p),n.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:s,extent:r,reduce:o,minPoints:n}=this.options,i=s/(r*Math.pow(2,e)),a=t.data,h=[],c=this.stride;for(let s=0;s<a.length;s+=c){if(a[s+2]<=e)continue;a[s+2]=e;const r=a[s],l=a[s+1],u=t.within(a[s],a[s+1],i),p=a[s+5];let m=p;for(const t of u){const s=t*c;a[s+2]>e&&(m+=a[s+5])}if(m>p&&m>=n){let t,n=r*p,i=l*p,d=-1;const g=(s/c<<5)+(e+1)+this.points.length;for(const r of u){const h=r*c;if(a[h+2]<=e)continue;a[h+2]=e;const l=a[h+5];n+=a[h]*l,i+=a[h+1]*l,a[h+4]=g,o&&(t||(t=this._map(a,s,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,h)))}a[s+4]=g,h.push(n/m,i/m,1/0,g,-1,m),o&&h.push(d)}else{for(let t=0;t<c;t++)h.push(a[s+t]);if(m>1)for(const t of u){const s=t*c;if(!(a[s+2]<=e)){a[s+2]=e;for(let t=0;t<c;t++)h.push(a[s+t])}}}}return h}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,s){if(t[e+5]>1){const r=this.clusterProps[t[e+6]];return s?Object.assign({},r):r}const r=this.points[t[e+3]].properties,o=this.options.map(r);return s&&o===r?Object.assign({},o):o}}function f(t,e,s){return{type:"Feature",id:t[e+3],properties:y(t,e,s),geometry:{type:"Point",coordinates:[(r=t[e],360*(r-.5)),M(t[e+1])]}};var r}function y(t,e,s){const r=t[e+5],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,n=t[e+6],i=-1===n?{}:Object.assign({},s[n]);return Object.assign(i,{cluster:!0,cluster_id:t[e+3],point_count:r,point_count_abbreviated:o})}function k(t){return t/360+.5}function w(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function M(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}function _(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(s[r[o]]=t[r[o]])}return s}class x{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class v{constructor({markers:t,position:e}){this.markers=t,e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(x.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>x.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(x.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class A{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return E(t)}}const E=t=>t.map(t=>new v({position:x.getPosition(t),markers:[t]}));class b extends A{constructor(t){var{maxZoom:e,radius:s=60}=t,r=_(t,["maxZoom","radius"]);super({maxZoom:e}),this.state={zoom:-1}
vendor: 4,051 bytes, line 1
1,this.superCluster=new g(Object.assign({maxZoom:this.maxZoom,radius:s},r))}calculate(t){let e=!1;const s={zoom:t.map.getZoom()};if(!o()(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const s=this.markers.map(t=>{const e=x.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(s)}return e||(this.state.zoom<=this.maxZoom||s.zoom<=this.maxZoom)&&(e=!o()(this.state,s)),this.state=s,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(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:s}){if(s.cluster)return new v({markers:this.superCluster.getLeaves(s.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});const r=s.marker;return new v({markers:[r],position:x.getPosition(r)})}}class C{constructor(t,e){this.markers={sum:t.length};const s=e.map(t=>t.count),r=s.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:r/e.length,sum:r,min:Math.min(...s),max:Math.max(...s)}}}}class O{render({count:t,position:e},s,r){const o=`<svg fill="${t>Math.max(10,s.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\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<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,n=`Cluster of ${t} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+t;if(x.isAdvancedMarkerAvailable(r)){const t=(new DOMParser).parseFromString(o,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const s={map:r,position:e,zIndex:i,title:n,content:t};return new google.maps.marker.AdvancedMarkerElement(s)}const a={position:e,zIndex:i,title:n,icon:{url:`data:image/svg+xml;base64,${btoa(o)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}class I{constructor(){!function(t,e){for(let s in e.prototype)t.prototype[s]=e.prototype[s]}(I,google.maps.OverlayView)}}var L;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(L||(L={}));const P=(t,e,s)=>{s.fitBounds(e.bounds)};class T extends I{constructor({map:t,markers:e=[],algorithmOptions:s={},algorithm:r=new b(s),renderer:o=new O,onClusterClick:n=P}){super(),this.markers=[...e],this.clusters=[],this.algorithm=r,this.renderer=o,this.onClusterClick=n,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(t=>{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){const s=this.markers.indexOf(t);return-1!==s&&(x.setMap(t,null),this.markers.splice(s,1),e||this.render(),!0)}removeMarkers(t,e){let s=!1;return t.forEach(t=>{s=this.removeMarker(t,!0)||s}),s&&!e&&this.render(),s}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,L.CLUSTERING_BEGIN,this);const{clusters:e,changed:s}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(s||null==s){const t=new Set;for(const s of e)1==s.markers.length&&t.add(s.markers[0]);const s=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||x.setMap(e.marker,null):s.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>s.forEach(t=>x.setMap(t,null)))}google.maps.event.trigger(this,L.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=>x.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}
1renderClusters(){const t=new C(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(s=>{1===s.markers.length?s.marker=s.markers[0]:(s.marker=this.renderer.render(s,t,e),s.markers.forEach(t=>x.setMap(t,null)),this.onClusterClick&&s.marker.addListener("click",t=>{google.maps.event.trigger(this,L.CLUSTER_CLICK,s),this.onClusterClick(t,s,e)})),x.setMap(s.marker,e)})}}},32017:function(t){t.exports=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var r,o,n;if(Array.isArray(e)){if((r=e.length)!=s.length)return!1;for(o=r;0!==o--;)if(!t(e[o],s[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((r=(n=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(s,n[o]))return!1;for(o=r;0!==o--;){var i=n[o];if(!t(e[i],s[i]))return!1}return!0}return e!=e&&s!=s}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.