(()=>{"use strict";var t={6042:t=>{t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){if(e.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(e)){if((r=e.length)!=n.length)return!1;for(i=r;0!=i--;)if(!t(e[i],n[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if((r=(o=Object.keys(e)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;0!=i--;){var s=o[i];if(!t(e[s],n[s]))return!1}return!0}return e!=e&&n!=n}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?1:0)-(t<0?1:0)||+t}function m(t){var e=t.getBoundingClientRect();return{height:s(e.height,t.offsetHeight),width:s(e.width,t.offsetWidth)}}function g(t,e,n,r){var i=t&&t[e];return null==i?n:r&&"function"==typeof i?i():i}function v(t){return Math.round(1e6*t)/1e6}function y(t){var e,n,r,o,s,c,l,u,d,h,m,y,w,k,b=1/0,x=[],_=null,M=0;function E(t){j(M+t)}function A(t){var e=I(M+t).abs;return S(e)?e:null}function I(t){var e=Math.floor(Math.abs(v(t/n))),r=v((t%n+n)%n);r===n&&(r=0);var o=f(t),s=l.indexOf(i([],l,!0).reduce((function(t,e){return Math.abs(e-r)0?1:-1),{abs:a+e*c*o,origin:s,rel:a}}function L(t,e,n){var r;if(e||!T())return C(t,n);if(!S(t))return null;var i=I(null!=n?n:M),o=i.abs,s=t-i.rel,a=o+s;r=C(a);var l=C(a-c*f(s));return(null!==l&&Math.abs(l)6&&(x=x.slice(-6)),M=v(e);var r=z().abs;if(r!==_){var i=null!==_;_=r,i&&t.emit("slideChanged")}}function z(i){var a=i?null:function(){if(c){var t=T(),e=t?(M%n+n)%n:M,i=(t?M%n:M)-s[0][2],a=0-(i<0&&t?n-Math.abs(i):i),l=0,u=I(M),p=u.abs,g=u.rel,v=s[g][2],b=s.map((function(e,r){var i=a+l;(i<0-e[0]||i>1)&&(i+=(Math.abs(i)>n-1&&t?n:0)*f(-i));var s=r-g,u=f(s),d=s+p;t&&(-1===u&&i>v&&(d+=c),1===u&&iy&&(i-=n));var h=i+e[0]+e[1],w=Math.max(i>=0&&h<=1?1:h<0||i>1?0:i<0?Math.min(1,(e[0]+i)/e[0]):(1-i)/e[0],0);return l+=e[0]+e[1],{abs:d,distance:o.rtl?-1*i+1-e[0]:i,portion:w,size:e[0]}}));return p=O(p),g=P(p),{abs:O(p),length:r,max:k,maxIdx:h,min:w,minIdx:d,position:M,progress:t?e/n:M/r,rel:g,slides:b,slidesLength:n}}}();return e.details=a,t.emit("detailsChanged"),a}return e={absToRel:P,add:E,details:null,distToIdx:A,idxToDist:L,init:function(e){if(function(){if(o=t.options,s=(o.trackConfig||[]).map((function(t){return[g(t,"size",1),g(t,"spacing",0),g(t,"origin",0)]})),c=s.length){n=v(s.reduce((function(t,e){return t+e[0]+e[1]}),0));var e,i=c-1;r=v(n+s[0][2]-s[i][0]-s[i][2]-s[i][1]),l=s.reduce((function(t,n){if(!t)return[0];var r=s[t.length-1],i=t[t.length-1]+(r[0]+r[2])+r[1];return i-=n[2],t[t.length-1]>i&&(i=t[t.length-1]),i=v(i),t.push(i),(!e||e200||(f(r)!==f(e.distance)&&e.distance&&(e={distance:0,lastTimestamp:0,time:0}),e.time&&(e.distance+=r),e.lastTimestamp&&(e.time+=i-e.lastTimestamp),e.lastTimestamp=i),e}),{distance:0,lastTimestamp:0,time:0});return e.distance/e.time||0}}}function w(t){var e,n,r,i,o,s,a,c;function l(t){return 2*t}function u(t){return p(t,a,c)}function d(t){return 1-Math.pow(1-t,3)}function h(){return r?t.track.velocity():0}function m(t,e){void 0===e&&(e=1e3);var n=147e-9+(t=Math.abs(t))/e;return{dist:Math.pow(t,2)/n,dur:t/n}}function g(){var e=t.track.details;e&&(o=e.min,s=e.max,a=e.minIdx,c=e.maxIdx)}function v(){t.animator.stop()}t.on("updated",g),t.on("optionsChanged",g),t.on("created",g),t.on("dragStarted",(function(){r=!1,v(),e=n=t.track.details.abs})),t.on("dragChecked",(function(){r=!0})),t.on("dragEnded",(function(){var r=t.options.mode;"snap"===r&&function(){var r=t.track,i=t.track.details,a=i.position,c=f(h());(a>s||as){var x=b=_)return e;if(a<_&&n>0||a>M&&n<0)return e;var l=(a<_?a-_:a-M)/s,u=i*s,d=Math.abs(l*u),h=Math.max(0,1-d/o*2);return h*h*e}(a(g-l)/i*r);n=f(h);var w=t.track.details.position;(w>_&&w0||w===M&&n<0)&&d(e),v+=h,!y&&Math.abs(v*i)>5&&(y=!0),t.track.add(h),g=l,t.emit("dragged")}}function I(e){!s&&t.track.details&&t.track.details.length&&(v=0,s=!0,y=!1,m=!0,c=e.id,C(e),g=S(e),t.emit("dragStarted"))}function L(e){s&&c===e.idChanged&&(s=!1,t.emit("dragEnded"))}function C(t){var e=O(),n=e?t.y:t.x,r=e?t.x:t.y,i=void 0!==w&&void 0!==k&&Math.abs(k-r)<=Math.abs(w-n);return w=n,k=r,i}function S(t){return O()?t.y:t.x}function O(){return t.options.vertical}function T(){i=t.size,o=O()?window.innerHeight:window.innerWidth;var e=t.track.details;e&&(_=e.min,M=e.max)}function P(t){y&&(d(t),u(t))}function j(){if(E.purge(),t.options.drag&&!t.options.disabled){var n;n=t.options.dragSpeed||1,a="function"==typeof n?n:function(t){return t*n},r=t.options.rtl?-1:1,T(),e=t.container,function(){var t="data-keen-slider-clickable";l("[".concat(t,"]:not([").concat(t,"=false])"),e).map((function(t){E.add(t,"dragstart",d),E.add(t,"mousedown",d),E.add(t,"touchstart",d)}))}(),E.add(e,"dragstart",(function(t){u(t)})),E.add(e,"click",P,{capture:!0}),E.input(e,"ksDragStart",I),E.input(e,"ksDrag",A),E.input(e,"ksDragEnd",L),E.input(e,"mousedown",I),E.input(e,"mousemove",A),E.input(e,"mouseleave",L),E.input(e,"mouseup",L),E.input(e,"touchstart",I,{passive:!0}),E.input(e,"touchmove",A,{passive:!1}),E.input(e,"touchend",L),E.input(e,"touchcancel",L),E.add(window,"wheel",(function(t){s&&u(t)}));var i="data-keen-slider-scrollable";l("[".concat(i,"]:not([").concat(i,"=false])"),t.container).map((function(t){return function(t){var e;E.input(t,"touchstart",(function(t){e=S(t),x=!0,b=!0}),{passive:!0}),E.input(t,"touchmove",(function(n){var r=O(),i=r?t.scrollHeight-t.clientHeight:t.scrollWidth-t.clientWidth,o=e-S(n),s=r?t.scrollTop:t.scrollLeft,a=r&&"scroll"===t.style.overflowY||!r&&"scroll"===t.style.overflowX;if(e=S(n),(o<0&&s>0||o>0&&s=1||(t.origin=1-e-(u>1?0:1-u)),t}))}n.options.trackConfig=o}function E(){I();var t=n.size;n.options.disabled||t===o||(o=t,_())}function A(){E(),setTimeout(E,500),setTimeout(E,2e3)}function I(){var t=m(n.container);n.size=(n.options.vertical?t.height:t.width)||1}function L(){n.slides=l(n.options.selector,n.container)}n.container=(u=l(t,document)).length?u[0]:null,n.destroy=function(){d.purge(),n.emit("destroyed"),p(!0)},n.prev=function(){n.moveToIdx(n.track.details.abs-1,!0)},n.next=function(){n.moveToIdx(n.track.details.abs+1,!0)},n.update=_,k(n.options)}}var _=function(t,e,n){try{return function(t,e){var n,r={};return n={emit:function(t){r[t]&&r[t].forEach((function(t){t(n)}));var e=n.options&&n.options[t];e&&e(n)},moveToIdx:function(t,e,r){var i=n.track.idxToDist(t,e);if(i){var o=n.options.defaultAnimation;n.animator.start([{distance:i,duration:g(r||o,"duration",500),easing:g(r||o,"easing",(function(t){return 1+--t*t*t*t*t}))}])}},on:function(t,e,n){void 0===n&&(n=!1),r[t]||(r[t]=[]);var i=r[t].indexOf(e);i>-1?n&&delete r[t][i]:n||r[t].push(e)},options:t},function(){if(n.track=y(n),n.animator=function(t){var e,n,r,i,o,s;function a(e){s||(s=e),c(!0);var o=e-s;o>r&&(o=r);var d=i[n];if(d[3]=this.retries+1}createUrl(){let t=this.url;return t+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(t+=`&key=${this.apiKey}`),this.channel&&(t+=`&channel=${this.channel}`),this.client&&(t+=`&client=${this.client}`),this.libraries.length>0&&(t+=`&libraries=${this.libraries.join(",")}`),this.language&&(t+=`&language=${this.language}`),this.region&&(t+=`®ion=${this.region}`),this.version&&(t+=`&v=${this.version}`),this.mapIds&&(t+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(t+=`&auth_referrer_policy=${this.authReferrerPolicy}`),t}deleteScript(){const t=document.getElementById(this.id);t&&t.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((t,e)=>{this.loadCallback((n=>{n?e(n.error):t(window.google)}))}))}importLibrary(t){return this.execute(),google.maps.importLibrary(t)}loadCallback(t){this.callbacks.push(t),this.execute()}setScript(){var t,e;if(document.getElementById(this.id))return void this.callback();const n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((t=>!n[t]&&delete n[t])),(null===(e=null===(t=null===window||void 0===window?void 0:window.google)||void 0===t?void 0:t.maps)||void 0===e?void 0:e.importLibrary)||(t=>{let e,n,r,i="The Google Maps JavaScript API",o="google",s="importLibrary",a="__ib__",c=document,l=window;l=l[o]||(l[o]={});const u=l.maps||(l.maps={}),d=new Set,h=new URLSearchParams,p=()=>e||(e=new Promise(((s,l)=>{return p=this,f=void 0,g=function*(){var p;for(r in yield n=c.createElement("script"),n.id=this.id,h.set("libraries",[...d]+""),t)h.set(r.replace(/[A-Z]/g,(t=>"_"+t[0].toLowerCase())),t[r]);h.set("callback",o+".maps."+a),n.src=this.url+"?"+h,u[a]=s,n.onerror=()=>e=l(Error(i+" could not load.")),n.nonce=this.nonce||(null===(p=c.querySelector("script[nonce]"))||void 0===p?void 0:p.nonce)||"",c.head.append(n)},new((m=void 0)||(m=Promise))((function(t,e){function n(t){try{i(g.next(t))}catch(t){e(t)}}function r(t){try{i(g.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):(i=e.value,i instanceof m?i:new m((function(t){t(i)}))).then(n,r)}i((g=g.apply(p,f||[])).next())}));var p,f,m,g})));u[s]?console.warn(i+" only loads once. Ignoring:",t):u[s]=(t,...e)=>d.add(t)&&p().then((()=>u[s](t,...e)))})(n);const r=this.libraries.map((t=>this.importLibrary(t)));r.length||r.push(this.importLibrary("core")),Promise.all(r).then((()=>this.callback()),(t=>{const e=new ErrorEvent("error",{error:t});this.loadErrorCallback(e)}))}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(t){if(this.errors.push(t),this.errors.length<=this.retries){const t=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${t} ms.`),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=t,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((t=>{t(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var S=n(6042),O=n.n(S);const T=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class P{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,n]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const r=n>>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const i=T[15&n];if(!i)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new P(s,o,i,t)}constructor(t,e=64,n=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=n,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const i=T.indexOf(this.ArrayType),o=2*t*this.ArrayType.BYTES_PER_ELEMENT,s=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-s%8)%8;if(i<0)throw new Error(`Unexpected typed array class: ${n}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+o+s+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+s+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=t,this.coords[this._pos++]=e,n}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return j(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:o,nodeSize:s}=this,a=[0,i.length-1,0],c=[];for(;a.length;){const l=a.pop()||0,u=a.pop()||0,d=a.pop()||0;if(u-d<=s){for(let s=d;s<=u;s++){const a=o[2*s],l=o[2*s+1];a>=t&&a<=n&&l>=e&&l<=r&&c.push(i[s])}continue}const h=d+u>>1,p=o[2*h],f=o[2*h+1];p>=t&&p<=n&&f>=e&&f<=r&&c.push(i[h]),(0===l?t<=p:e<=f)&&(a.push(d),a.push(h-1),a.push(1-l)),(0===l?n>=p:r>=f)&&(a.push(h+1),a.push(u),a.push(1-l))}return c}within(t,e,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:i,nodeSize:o}=this,s=[0,r.length-1,0],a=[],c=n*n;for(;s.length;){const l=s.pop()||0,u=s.pop()||0,d=s.pop()||0;if(u-d<=o){for(let n=d;n<=u;n++)D(i[2*n],i[2*n+1],t,e)<=c&&a.push(r[n]);continue}const h=d+u>>1,p=i[2*h],f=i[2*h+1];D(p,f,t,e)<=c&&a.push(r[h]),(0===l?t-n<=p:e-n<=f)&&(s.push(d),s.push(h-1),s.push(1-l)),(0===l?t+n>=p:e+n>=f)&&(s.push(h+1),s.push(u),s.push(1-l))}return a}}function j(t,e,n,r,i,o){if(i-r<=n)return;const s=r+i>>1;z(t,e,s,r,i,o),j(t,e,n,r,s-1,1-o),j(t,e,n,s+1,i,1-o)}function z(t,e,n,r,i,o){for(;i>r;){if(i-r>600){const s=i-r+1,a=n-r+1,c=Math.log(s),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(s-l)/s)*(a-s/2<0?-1:1);z(t,e,n,Math.max(r,Math.floor(n-a*l/s+u)),Math.min(i,Math.floor(n+(s-a)*l/s+u)),o)}const s=e[2*n+o];let a=r,c=i;for(Z(t,e,r,n),e[2*i+o]>s&&Z(t,e,r,i);as;)c--}e[2*r+o]===s?Z(t,e,r,c):(c++,Z(t,e,c,i)),c<=n&&(r=c+1),n<=c&&(i=c-1)}}function Z(t,e,n,r){$(t,n,r),$(e,2*n,2*r),$(e,2*n+1,2*r+1)}function $(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function D(t,e,n,r){const i=t-n,o=e-r;return i*i+o*o}const U={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},N=Math.fround||(R=new Float32Array(1),t=>(R[0]=+t,R[0]));var R;class q{constructor(t){this.options=Object.assign(Object.create(U),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:n,maxZoom:r}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;const o=[];for(let e=0;e=n;t--){const n=+Date.now();s=this.trees[t]=this._createTree(this._cluster(s,t)),e&&console.log("z%d: %d clusters in %dms",t,s.numItems,+Date.now()-n)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let n=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)n=-180,i=180;else if(n>i){const t=this.getClusters([n,r,180,o],e),s=this.getClusters([-180,r,i,o],e);return t.concat(s)}const s=this.trees[this._limitZoom(e)],a=s.range(B(n),K(o),B(i),K(r)),c=s.data,l=[];for(const t of a){const e=this.stride*t;l.push(c[e+5]>1?F(c,e,this.clusterProps):this.points[c[e+3]])}return l}getChildren(t){const e=this._getOriginId(t),n=this._getOriginZoom(t),r="No cluster with the specified id.",i=this.trees[n];if(!i)throw new Error(r);const o=i.data;if(e*this.stride>=o.length)throw new Error(r);const s=this.options.radius/(this.options.extent*Math.pow(2,n-1)),a=o[e*this.stride],c=o[e*this.stride+1],l=i.within(a,c,s),u=[];for(const e of l){const n=e*this.stride;o[n+4]===t&&u.push(o[n+5]>1?F(o,n,this.clusterProps):this.points[o[n+3]])}if(0===u.length)throw new Error(r);return u}getLeaves(t,e,n){e=e||10,n=n||0;const r=[];return this._appendLeaves(r,t,e,n,0),r}getTile(t,e,n){const r=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:s}=this.options,a=s/o,c=(n-a)/i,l=(n+1+a)/i,u={features:[]};return this._addTileFeatures(r.range((e-a)/i,c,(e+1+a)/i,l),r.data,e,n,i,u),0===e&&this._addTileFeatures(r.range(1-a/i,c,1,l),r.data,i,n,i,u),e===i-1&&this._addTileFeatures(r.range(0,c,a/i,l),r.data,-1,n,i,u),u.features.length?u: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,r,i){const o=this.getChildren(e);for(const e of o){const o=e.properties;if(o&&o.cluster?i+o.point_count<=r?i+=o.point_count:i=this._appendLeaves(t,o.cluster_id,n,r,i):i1;let c,l,u;if(a)c=G(e,t,this.clusterProps),l=e[t],u=e[t+1];else{const n=this.points[e[t+3]];c=n.properties;const[r,i]=n.geometry.coordinates;l=B(r),u=K(i)}const d={type:1,geometry:[[Math.round(this.options.extent*(l*i-n)),Math.round(this.options.extent*(u*i-r))]],tags:c};let h;h=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==h&&(d.id=h),o.features.push(d)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:n,extent:r,reduce:i,minPoints:o}=this.options,s=n/(r*Math.pow(2,e)),a=t.data,c=[],l=this.stride;for(let n=0;ne&&(p+=a[n+5])}if(p>h&&p>=o){let t,o=r*h,s=u*h,f=-1;const m=(n/l<<5)+(e+1)+this.points.length;for(const r of d){const c=r*l;if(a[c+2]<=e)continue;a[c+2]=e;const u=a[c+5];o+=a[c]*u,s+=a[c+1]*u,a[c+4]=m,i&&(t||(t=this._map(a,n,!0),f=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(a,c)))}a[n+4]=m,c.push(o/p,s/p,1/0,m,-1,p),i&&c.push(f)}else{for(let t=0;t1)for(const t of d){const n=t*l;if(!(a[n+2]<=e)){a[n+2]=e;for(let t=0;t>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,n){if(t[e+5]>1){const r=this.clusterProps[t[e+6]];return n?Object.assign({},r):r}const r=this.points[t[e+3]].properties,i=this.options.map(r);return n&&i===r?Object.assign({},i):i}}function F(t,e,n){return{type:"Feature",id:t[e+3],properties:G(t,e,n),geometry:{type:"Point",coordinates:[H(t[e]),V(t[e+1])]}}}function G(t,e,n){const r=t[e+5],i=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,o=t[e+6],s=-1===o?{}:Object.assign({},n[o]);return Object.assign(s,{cluster:!0,cluster_id:t[e+3],point_count:r,point_count_abbreviated:i})}function B(t){return t/360+.5}function K(t){const e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function H(t){return 360*(t-.5)}function V(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}class W{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 X{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(W.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>W.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(W.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}class Y{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return J(t)}}const J=t=>t.map((t=>new X({position:W.getPosition(t),markers:[t]})));class Q extends Y{constructor(t){var{maxZoom:e,radius:n=60}=t,r=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i{const e=W.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(n)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!O()(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((t=>this.transformCluster(t)))}transformCluster({geometry:{coordinates:[t,e]},properties:n}){if(n.cluster)return new X({markers:this.superCluster.getLeaves(n.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:e,lng:t}});const r=n.marker;return new X({markers:[r],position:W.getPosition(r)})}}class tt{constructor(t,e){this.markers={sum:t.length};const n=e.map((t=>t.count)),r=n.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:r/e.length,sum:r,min:Math.min(...n),max:Math.max(...n)}}}}class et{render({count:t,position:e},n,r){const i=`\n\n\n\n${t}\n`,o=`Cluster of ${t} markers`,s=Number(google.maps.Marker.MAX_ZINDEX)+t;if(W.isAdvancedMarkerAvailable(r)){const t=(new DOMParser).parseFromString(i,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const n={map:r,position:e,zIndex:s,title:o,content:t};return new google.maps.marker.AdvancedMarkerElement(n)}const a={position:e,zIndex:s,title:o,icon:{url:`data:image/svg+xml;base64,${btoa(i)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}}class nt{constructor(){!function(t,e){for(let n in e.prototype)t.prototype[n]=e.prototype[n]}(nt,google.maps.OverlayView)}}var rt;!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(rt||(rt={}));const it=(t,e,n)=>{n.fitBounds(e.bounds)};class ot extends nt{constructor({map:t,markers:e=[],algorithmOptions:n={},algorithm:r=new Q(n),renderer:i=new et,onClusterClick:o=it}){super(),this.markers=[...e],this.clusters=[],this.algorithm=r,this.renderer=i,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((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const n=this.markers.indexOf(t);return-1!==n&&(W.setMap(t,null),this.markers.splice(n,1),e||this.render(),!0)}removeMarkers(t,e){let n=!1;return t.forEach((t=>{n=this.removeMarker(t,!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&&t.getProjection()){google.maps.event.trigger(this,rt.CLUSTERING_BEGIN,this);const{clusters:e,changed:n}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(n||null==n){const t=new Set;for(const n of e)1==n.markers.length&&t.add(n.markers[0]);const n=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||W.setMap(e.marker,null):n.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame((()=>n.forEach((t=>W.setMap(t,null)))))}google.maps.event.trigger(this,rt.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=>W.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const t=new tt(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,e),n.markers.forEach((t=>W.setMap(t,null))),this.onClusterClick&&n.marker.addListener("click",(t=>{google.maps.event.trigger(this,rt.CLUSTER_CLICK,n),this.onClusterClick(t,n,e)}))),W.setMap(n.marker,e)}))}}document.addEventListener("DOMContentLoaded",(function(){const t=document.querySelector(".gym-details__map__container");if(null===t)return;const e={lat:parseFloat(t.getAttribute("data-map-lat")),lng:parseFloat(t.getAttribute("data-map-lng"))};new C({apiKey:`${GG_BlOCK_CONFIGS.googleMapApiKey}`,version:"weekly",libraries:["marker"]}).load().then((()=>{const n={center:e,zoom:15,minZoom:10,maxZoom:19,mapId:`${GG_BlOCK_CONFIGS.googleMapIdClosestGym}`},r=new google.maps.Map(t,n),i=document.createElement("div");i.classList.add("map-marker"),i.style.width="60px",i.style.height="60px";const o=new google.maps.marker.AdvancedMarkerElement({map:r,position:e,content:i,title:"Gold's Gym"});new ot({map:r,markers:[o]})}));const n=document.querySelector(".opening-hours"),r=document.querySelector(".special-days__overlay"),i=document.querySelector(".opening-hours__switch");i&&i.querySelectorAll("span").forEach((t=>{t.addEventListener("click",(function(){this.classList.contains("toggled")||(i.querySelector(".toggled").classList.remove("toggled"),this.classList.add("toggled"),"kids club"===this.textContent.trim().toLowerCase()?(n.classList.add("kids-club"),r.classList.add("kids-club"),l(!0)):(n.classList.remove("kids-club"),r.classList.remove("kids-club"),l()))}))}));const o=document.querySelector(".nearby-gyms__list");let s=null;function a(){window.innerWidth<1600?s||(s=new _(o,{loop:!1,slides:{perView:1.55,spacing:32},breakpoints:{"(min-width: 576px)":{slides:{perView:2.4,spacing:24}},"(min-width: 1280px)":{slides:{perView:3.1,spacing:24}},"(min-width: 1440px)":{slides:{perView:3.5,spacing:24}}}})):s&&(s.destroy(),s=null)}function c(){if(window.innerWidth>=1280){const t=document.querySelector(".opening-hours"),e=document.querySelector(".gym-details__map__information"),n=document.querySelector(".gym-details__map__container");if(t&&e&&n){const r=t.offsetHeight-e.offsetHeight;n.style.height=`${r}px`}}else{const t=document.querySelector(".gym-details__map__container");t&&(t.style.height="")}}function l(t=!1){const e=t?".opening-hours__week-days--kids":".opening-hours__week-days--gym",n=document.querySelector(e);if(!n)return;if(!n.querySelector(".days span"))return;const r=n.querySelectorAll(".days span");if(!r)return;const i=n.querySelectorAll(".hours > span");r.forEach((t=>t.style.height="")),i.forEach((t=>t.style.height="")),i.forEach(((t,e)=>{r[e].style.height=`${t.offsetHeight}px`}))}function u(){const t=document.querySelector(".gym-details__map"),e=document.querySelector(".opening-hours");if(t&&e)if(window.innerWidth>=1024&&window.innerWidth<1280){const n=t.offsetHeight;e.style.minHeight=`${n}px`}else e.style.minHeight=""}a(),window.addEventListener("resize",a),document.getElementById("local-gym-map-description")&&document.querySelectorAll('a[href="#local-gym-map-description"]').forEach((t=>{const e=t.parentElement;e.classList.contains("hidden")&&e.classList.remove("hidden")})),c(),l(),window.addEventListener("resize",(()=>{l(),l(!0),c()})),u(),window.addEventListener("resize",u);const d=document.querySelector(".special-days__link"),h=document.querySelector(".special-days__overlay"),p=h.querySelector(".special-days__close");d&&d.addEventListener("click",(function(){h.classList.remove("hidden"),document.body.classList.add("scroll-stop")})),p&&p.addEventListener("click",(function(){h.classList.add("hidden"),document.body.classList.remove("scroll-stop")})),document.getElementById("reveal-email").addEventListener("click",(function(t){t.preventDefault();const e=`/wp-json/gg-gym-data/gyms/${this.getAttribute("data-id")}`;this.textContent="Loading email",fetch(e).then((t=>{if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.json()})).then((t=>{if(t&&t.contact_email){const e=document.createElement("a");e.id="revealed-email",e.href=`mailto:${t.contact_email}`,e.textContent=t.contact_email,this.replaceWith(e)}}))}))}))})();