2025-02-28 08:42:11 +01:00
|
|
|
(()=>{var t={82063:(t,i,e)=>{"use strict";function o(t,i){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[t][i?"details":"no_details"]}e.d(i,{o:()=>o})},16815:(t,i,e)=>{"use strict";e.d(i,{BY:()=>r,ES:()=>s,_t:()=>n,iU:()=>a,jF:()=>o});const o=t=>Object.hasOwn(t,"lat")&&Object.hasOwn(t,"lng")?t:{lat:t.latitude||0,lng:t.longitude||0};function s(t,i){const e=new t.LngLatBounds;return i.forEach((t=>{e.extend([t.coordinates.longitude,t.coordinates.latitude])})),e}function n(t,i){t.fitBounds(i,{padding:{top:80,bottom:80,left:40,right:40}})}function a(t,i){t.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${i}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function r(t){return new t.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},42470:(t,i,e)=>{"use strict";e.d(i,{IR:()=>c,Yc:()=>r,c6:()=>a});var o=e(34377);const s=6371e3;function n(t){return Math.abs(s*Math.cos(t*Math.PI/180)*2*Math.PI/256)}function a(t,i){return 512/Math.pow(2,t)*.5*n(i)}function r(t,i){return new Promise((e=>{if(i.mapkitScriptIsLoading)(0,o.Cu)(i,"mapkit").then((t=>{e(t)}));else{i.mapkitScriptIsLoading=!0;const s=t.createElement("script");s.addEventListener("load",(async()=>{const t=await(0,o.Cu)(i,"mapkit");i.mapkitScriptIsLoading=!1,e(t)}),{once:!0}),s.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",s.crossOrigin="anonymous",t.head.appendChild(s)}}))}function c(t,i,e){return new Promise(((i,o)=>{e.mapkitIsInitialized?i():e.mapkitIsInitializing?function(t){return new Promise(((i,e)=>{const o=()=>{void 0===t.mapkitIsInitializing?e():!1===t.mapkitIsInitializing?i():t.requestAnimationFrame(o)};o()}))}(e).then((()=>{i()})):(e.mapkitIsInitializing=!0,e.mapkitIsInitialized=!1,t.init({authorizationCallback:async t=>{try{const s=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===s.status){t((await s.json()).wpcom_mapkit_access_token)}else o();e.mapkitIsInitializing=!1,e.mapkitIsInitialized=!0,i()}catch{o()}}}))}))}},91844:(t,i,e)=>{"use strict";e.d(i,{A:()=>o});const o=(t,i=null)=>{if(i)t.style.height=i+"px";else{const i=t.offsetWidth,e=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,o=Math.min(i*(3/4),e);t.style.height=o+"px"}}},18109:(t,i,e)=>{"use strict";e.d(i,{i:()=>s.A,p:()=>o.A});var o=e(2370),s=e(56955)},2370:(t,i,e)=>{"use strict";e.d(i,{A:()=>l});var o=e(34377),s=e(71738),n=e(55740),a=e(82063),r=e(16815),c=e(91844);const l=class{constructor(t,i=()=>{}){this.root=t;const{currentDoc:e,currentWindow:s}=(0,o.sG)(this.root);this.document=e,this.window=s,this.onError=i,this.mapStyle=this.root.getAttribute("data-map-style")||"default",this.mapDetails="true"===this.root.getAttribute("data-map-details"),this.apiKey=this.root.getAttribute("data-api-key")||null,this.scrollToZoom="true"===this.root.getAttribute("data-scroll-to-zoom"),this.showFullscreenButton="true"===this.root.getAttribute("data-show-fullscreen-button"),this.points=JSON.parse(this.root.getAttribute("data-points")||"[]"),this.mapCenter=JSON.parse(this.root.getAttribute("data-map-center")||"{}"),this.mapHeight=this.root.getAttribute("data-map-height")||null,this.markerColor=this.root.getAttribute("data-marker-color")||"red";const n=this.root.getAttribute("data-zoom");this.zoom=n&&n.length?parseInt(this.root.getAttribute("data-zoom"),10):13,
|