文件操作 - map.min.js
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/stanleysteamer/public_html/wp-content/themes/bricks/assets/js/elements/map.min.js
编辑文件内容
function _createForOfIteratorHelper(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(l)throw a}}}}function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return _arrayLikeToArray(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,r,t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function a(t,n,o,a){var c=n&&n.prototype instanceof l?n:l,s=Object.create(c.prototype);return _regeneratorDefine2(s,"_invoke",function(t,n,o){var a,l,c,s=0,d=o||[],u=!1,p={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(r,t){return a=r,l=0,c=e,p.n=t,i}};function f(t,n){for(l=t,c=n,r=0;!u&&s&&!o&&r<d.length;r++){var o,a=d[r],f=p.p,v=a[2];t>3?(o=v===n)&&(c=a[(l=a[4])?5:(l=3,3)],a[4]=a[5]=e):a[0]<=f&&((o=t<2&&f<a[1])?(l=0,p.v=n,p.n=a[1]):f<v&&(o=t<3||a[0]>n||n>v)&&(a[4]=t,a[5]=n,p.n=v,l=0))}if(o||t>1)return i;throw u=!0,n}return function(o,d,v){if(s>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,v),l=d,c=v;(r=l<2?e:c)||!u;){a||(l?l<3?(l>1&&(p.n=-1),f(l,c)):p.n=c:p.v=c);try{if(s=2,a){if(l||(o="next"),r=a[o]){if(!(r=r.call(a,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,l<2&&(l=0)}else 1===l&&(r=a.return)&&r.call(a),l<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),l=1);a=e}else if((r=(u=p.n<0)?c:t.call(n,p))!==i)break}catch(r){a=e,l=1,c=r}finally{s=1}}return{value:r,done:u}}}(t,o,a),!0),s}var i={};function l(){}function c(){}function s(){}r=Object.getPrototypeOf;var d=[][n]?r(r([][n]())):(_regeneratorDefine2(r={},n,function(){return this}),r),u=s.prototype=l.prototype=Object.create(d);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return c.prototype=s,_regeneratorDefine2(u,"constructor",s),_regeneratorDefine2(s,"constructor",c),c.displayName="GeneratorFunction",_regeneratorDefine2(s,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:p}})()}function _regeneratorDefine2(e,r,t,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_regeneratorDefine2=function(e,r,t,n){function a(r,t){_regeneratorDefine2(e,r,function(e){return this._invoke(r,t,e)})}r?o?o(e,r,{value:t,enumerable:!n,configurable:!n,writable:!n}):e[r]=t:(a("next",0),a("throw",1),a("return",2))},_regeneratorDefine2(e,r,t,n)}function asyncGeneratorStep(e,r,t,n,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void t(e)}l.done?r(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var a=e.apply(r,t);function i(e){asyncGeneratorStep(a,n,o,i,l,"next",e)}function l(e){asyncGeneratorStep(a,n,o,i,l,"throw",e)}i(void 0)})}}var bricksMapFn=new BricksFunction({parentNode:document,selector:".brxe-map[data-bricks-map-options]",eachElement:function(){var e=_asyncToGenerator(_regenerator().m(function e(r,t){var n,o,a,i,l,c,s,d,u,p,f,v,g,m,b,k,x;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:n=!document.body.classList.contains("bricks-is-frontend"),o='<span class="close-infobox" tabindex="0" role="button">×</span>',a=function(e,r){if(e&&!e.dataset.bricksMapCloseInfoboxBound){e.dataset.bricksMapCloseInfoboxBound="true";var t=function(){google.maps.event.trigger(r,"closeclick"),r.close()};e.addEventListener("click",function(){t()}),e.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())})}},i=function(){var e=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){r.geocode({address:t},function(r,t){"OK"===t?e(r):n(t)})}))},e)}));return function(r,t){return e.apply(this,arguments)}}(),l=function(e,r){var t,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if((null===(t=window.bricksData.googleMapInstances)||void 0===t?void 0:t[r])&&null!=e&&e.marker){var o=n?null==e?void 0:e.customMarkerActive:null==e?void 0:e.customMarker;e.marker.setContent(o||null)}},c=function(e,r){if(!e)return"";var t=e.infoTitle,n=void 0!==t&&t,a=e.infoSubtitle,i=void 0!==a&&a,l=e.infoOpeningHours,c=void 0!==l&&l,s=e.infoImages,d=void 0===s?{}:s,u=e.infoBoxSelector,p=void 0!==u&&u,f=e.popupNode,v=void 0!==f&&f,g=e.isAjaxPopup,m="";if(p){if(v)if(void 0!==g&&g)m='<div class="brx-infobox-content brx-popup-content"></div>';else{var b=v.querySelector(".brx-popup-content");if(b){for(var k=document.createDocumentFragment();b.firstChild;)k.appendChild(b.firstChild);var x=document.createElement("div");x.className="brx-infobox-content brx-popup-content",x.appendChild(k),e.popupContentNode=x,m='<div class="brx-infobox-content brx-popup-content"></div>',x.querySelector('[data-interactions*=\'"action":"closeAddress"\']')||(m+=o)}}}else{if(n&&(m+='<h3 class="title">'.concat(n,"</h3>")),i&&(m+='<p class="subtitle">'.concat(i,"</p>")),c){var M=c.split("\n").map(function(e){return"<li>".concat(e,"</li>")}).join("");m+='<ul class="content">'.concat(M,"</ul>")}var y=Array.isArray(d)?d:(null==d?void 0:d.images)||[];if(y.length){var I=y.map(function(r){return r.thumbnail&&r.src?'\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\tdata-pswp-src="'.concat(r.src,'"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-pswp-width="').concat((null==r?void 0:r.width)||376,'"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-pswp-height="').concat((null==r?void 0:r.height)||376,'"\n\t\t\t\t\t\t\t\t\t\t\t\tdata-pswp-id="').concat(e.id,'">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src="').concat(r.thumbnail,'" />\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>'):""}).join("");m+='<ul class="images bricks-lightbox">'.concat(I,"</ul>")}m&&(m+=o)}return m},s=function(e,r){var t=window.bricksData.googleMapInstances[r]||!1;if(!t)return!1;var i=t.locations.find(function(r){return r.id===e.id});if(!i)return!1;if(i.infoBox)return i.infoBox;var s=c(e);if(!s)return!1;var p=parseInt(null==e?void 0:e.infoWidth)||300,f={content:s,disableAutoPan:!0,pixelOffset:new google.maps.Size(0,0),alignBottom:!1,infoBoxClearance:new google.maps.Size(20,20),enableEventPropagation:!1,zIndex:1001,boxStyle:{opacity:1,zIndex:999,top:0,left:0,width:"".concat(p,"px"),minWidth:"".concat(p,"px")},closeBoxURL:"",addressId:e.id,mapElId:r,interactionSelector:(null==e?void 0:e.infoBoxSelector)||!1};"sync"!==t.mapMode||n||(f.boxClass="brx-infobox-popup brx-popup brxe-".concat(t.syncQuery),null!=e&&e.popupTemplatId&&(f.boxClass+=" brxe-popup-".concat(e.popupTemplatId))),"query"===t.mapMode&&e.infoBoxSelector&&!n&&(f.boxClass="brx-infobox-popup brx-popup brxe-".concat(r),null!=e&&e.popupTemplatId&&(f.boxClass+=" brxe-popup-".concat(e.popupTemplatId)));var v=new InfoBox(f),g=(null==e?void 0:e.popupNode)&&(null==e?void 0:e.isAjaxPopup),m=(null==e?void 0:e.popupTemplatId)||!1,b=function(){if(v.div_){var e=v.div_.offsetHeight,n=t.map.getProjection().fromLatLngToPoint(i.marker.position),o=t.map.getProjection().fromPointToLatLng(new google.maps.Point(n.x,n.y-e*u(r)/2));t.map.panTo(o)}};return google.maps.event.addListener(v,"domready",function(r){if(!g&&e.popupContentNode&&v.div_){var t=v.div_.querySelector(".brx-popup-content");t&&t.parentNode.replaceChild(e.popupContentNode,t)}if(g&&v.div_){var n=v.div_,i=e.popupNode;Array.from(i.attributes).forEach(function(e){(e.name.startsWith("data-brx")||e.name.startsWith("data-popup"))&&n.setAttribute(e.name,e.value)});var l={},c=v.div_.getAttribute("data-interaction-loop-id")||!1;c&&(l.loopId=c),bricksOpenPopup(n,0,l),m&&document.addEventListener("bricks/ajax/popup/loaded",function(e){var r;(null===(r=e.detail)||void 0===r?void 0:r.popupId)===m&&(b(),k(),n.querySelector('[data-interactions*=\'"action":"closeAddress"\']')||(n.innerHTML+=o,a(n.querySelector(".close-infobox"),v)))},{once:!0})}g||(k(),bricksRunAllFunctions()),b();var s=(null==v?void 0:v.div_)&&(null==v?void 0:v.div_.querySelector(".close-infobox"));s&&a(s,v)}),google.maps.event.addListener(v,"closeclick",function(){l(i,r,!1),d(r,i,"closeInfobox")}),v.addressId&&v.mapElId&&(google.maps.event.addListener(v,"infobox_opened",function(){x("open",v.addressId,v.mapElId)}),google.maps.event.addListener(v,"infobox_closed",function(){x("close",v.addressId,v.mapElId)})),i.infoBox=v,v},d=function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default",n=window.bricksData.googleMapInstances[e]||!1;if(n){var o=n.map,a=n.bounds,i=n.locations;"closeInfobox"!==t?i.length>0&&(r&&r.position&&a.extend(r.position),i.length>1?(o.fitBounds(a),o.panToBounds(a)):1===i.length&&o.panTo(i[0].position)):o.panTo(r.position)}},u=function(e){var r,t=(null===(r=window.bricksData.googleMapInstances[e])||void 0===r?void 0:r.map)||!1;if(t){var n=t.getCenter(),o=t.getZoom(),a=t.getProjection().fromLatLngToPoint(new google.maps.LatLng(n.lat()-1/Math.pow(2,o),n.lng()-1/Math.pow(2,o))),i=t.getProjection().fromLatLngToPoint(new google.maps.LatLng(n.lat()+1/Math.pow(2,o),n.lng()+1/Math.pow(2,o)));return Math.abs(i.x-a.x)}},p=function(e,r){var t,o,a,i,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=function(){return Math.random().toString(36).substring(2,8)};if(n)return[{address:null==l?void 0:l.address,latitude:null==l?void 0:l.lat,longitude:null==l?void 0:l.lng,id:c(),infoTitle:(null===(o=window.bricksData)||void 0===o||null===(o=o.i18n)||void 0===o?void 0:o.locationTitle)||"Location Title",infoSubtitle:(null===(a=window.bricksData)||void 0===a||null===(a=a.i18n)||void 0===a?void 0:a.locationSubtitle)||"Location Subtitle",infoOpeningHours:(null===(i=window.bricksData)||void 0===i||null===(i=i.i18n)||void 0===i?void 0:i.locationContent)||"Location Content"}];var s=(null===(t=window)||void 0===t||null===(t=t.bricksData)||void 0===t?void 0:t.queryLoopInstances[e])||!1;if(!s)return[];var d=s.resultsContainer.querySelectorAll(".brxe-map-connector[data-brx-latitude][data-brx-longitude], [data-brx-address]");return Array.from(d).map(function(t){var n=c(),o={latitude:t.getAttribute("data-brx-latitude"),longitude:t.getAttribute("data-brx-longitude"),address:t.getAttribute("data-brx-address"),id:n,infoBoxSelector:t.getAttribute("data-brx-infobox-selector"),infoWidth:300,popupNode:null,isAjaxPopup:!1,popupTemplatId:t.getAttribute("data-brx-infobox-template"),markerAriaLabel:"",markerText:"",markerTextActive:"",marker:{},markerActive:{}},a=t.getAttribute("data-brx-marker-data")||"{}";try{var i=JSON.parse(a);o.markerAriaLabel=i.markerAriaLabel||o.markerAriaLabel,o.markerText=i.markerText||o.markerText,o.markerTextActive=i.markerTextActive||o.markerTextActive,o.marker=i.marker||o.marker,o.markerActive=i.markerActive||o.markerActive}catch(e){console.error("Bricks: Invalid JSON data for marker",e)}if(o.infoBoxSelector){var l=document.querySelector('[data-popup-loop-id="'.concat(o.infoBoxSelector,'"]'))||document.querySelector(".brx-popup.brxe-".concat(e,'[data-popup-ajax="1"]'));l&&(o.popupNode=l,o.isAjaxPopup=l.hasAttribute("data-popup-ajax"),o.infoWidth=parseInt(l.getAttribute("data-brx-infobox-width"))||o.infoWidth)}return t.setAttribute("data-brx-address-id",n),t.setAttribute("data-brx-sync-map-id",r),o})},f=function(e,r){var t=Array.isArray(e.addresses)?e.addresses:[];return Array.from(t).map(function(e){var t={latitude:e.latitude,longitude:e.longitude,address:e.address,id:e.id,infoTitle:e.infoTitle,infoSubtitle:e.infoSubtitle,infoOpeningHours:e.infoOpeningHours,infoImages:e.infoImages,infoBoxSelector:e.infoBoxSelector,infoWidth:e.infoWidth||300,popupNode:null,isAjaxPopup:!1,popupTemplatId:e.popupTemplatId,markerAriaLabel:e.markerAriaLabel||"",markerText:e.markerText||"",markerTextActive:e.markerTextActive||"",marker:e.marker||{},markerActive:e.markerActive||{}};if(t.infoBoxSelector){var n=document.querySelector('[data-popup-loop-id="'.concat(t.infoBoxSelector,'"]'))||document.querySelector(".brx-popup.brxe-".concat(r,'[data-popup-ajax="1"]'));n&&(t.popupNode=n,t.isAjaxPopup=n.hasAttribute("data-popup-ajax"),t.infoWidth=parseInt(n.getAttribute("data-brx-infobox-width"))||t.infoWidth)}return t})},v=function(e,r){var t,n,o=window.bricksData.googleMapInstances[r]||!1,a=(null===(t=window.bricksData.googleMapInstances[r])||void 0===t?void 0:t.map)||!1;if(a&&o){var i=(null===(n=window.bricksData.googleMapInstances[r])||void 0===n?void 0:n.locations)||[],c=i.find(function(r){return r.id===e.id});i.forEach(function(e){var t;null===(t=e.infoBox)||void 0===t||t.close(),l(e,r,!1)}),l(c,r,!0);var d=s(e,r);d?d.open(a,c.marker):a.panTo(c.position)}},g=function(e){var r=e.type,t=e.url,n=e.width,o=e.height,a=e.text,i=e.extraClassName;if("text"===r){var l=document.createElement("div");return l.className="brx-marker-text ".concat(i||""),l.innerHTML=a||"Marker",l}var c=document.createElement("img");return c.src=t||"data:image/svg+xml;base64,CgkJCQk8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI2cHgiIGhlaWdodD0iMzhweCIgdmlld0JveD0iMCAwIDI2IDM3IiBmaWxsPSJub25lIj4KCQkJCQk8Zz4KCQkJCQkJPHBhdGggZD0iTTEzIDBDNS44MTc1IDAgMCA1Ljc3MzI4IDAgMTIuOTE4MUMwIDIwLjU3MzMgNS41OSAyMy40NDQgOS41NTQ5OSAzMC4wNzg0QzEyLjA5IDM0LjMyMDcgMTEuMzQyNSAzNyAxMyAzN0MxNC43MjI1IDM3IDEzLjk3NSAzNC4yNTY5IDE2LjQ0NSAzMC4xNDIyQzIwLjA4NSAyMy44NTg2IDI2IDIwLjYwNTIgMjYgMTIuOTE4MUMyNiA1Ljc3MzI4IDIwLjE4MjUgMCAxMyAwWiIgZmlsbD0iI0M1MjIxRiIvPgoJCQkJCQk8cGF0aCBkPSJNMTMuMDE2NyAzNUMxMi43ODM2IDM1IDEyLjcxNzEgMzQuOTM0NiAxMi4zMTc2IDMzLjcyNUMxMS45ODQ4IDMyLjY3ODkgMTEuNDg1NCAzMS4wNzY5IDEwLjE4NzMgMjkuMTE1NEM4LjkyMjMzIDI3LjE4NjYgNy41OTA4NSAyNS42MTczIDYuMzI1OTQgMjQuMTEzNUMzLjM2MzM5IDIwLjUxNzQgMSAxNy43MDU3IDEgMTIuNjM4NUMxLjAzMzI5IDYuMTk4MDggNi4zOTI1MSAxIDEzLjAxNjcgMUMxOS42NDA4IDEgMjUgNi4yMzA3OCAyNSAxMi42Mzg1QzI1IDE3LjcwNTcgMjIuNjY5OSAyMC41NSAxOS42NzQxIDI0LjE0NjJDMTguNDQyNSAyNS42NSAxNy4xNDQzIDI3LjIxOTMgMTUuODc5MyAyOS4xMTU0QzE0LjYxNDQgMzEuMDQ0MiAxNC4wODE4IDMyLjYxMzUgMTMuNzQ5IDMzLjY1OTZDMTMuMzQ5NSAzNC45MzQ2IDEzLjI0OTcgMzUgMTMuMDE2NyAzNVoiIGZpbGw9IiNFQTQzMzUiLz4KCQkJCQkJPHBhdGggZD0iTTEzIDE4QzE1Ljc2MTQgMTggMTggMTUuNzYxNCAxOCAxM0MxOCAxMC4yMzg2IDE1Ljc2MTQgOCAxMyA4QzEwLjIzODYgOCA4IDEwLjIzODYgOCAxM0M4IDE1Ljc2MTQgMTAuMjM4NiAxOCAxMyAxOFoiIGZpbGw9IiNCMzE0MTIiLz4KCQkJCQk8L2c+CgkJCQk8L3N2Zz4=",c.className=t?"brx-marker-img ".concat(i||""):"brx-marker-img default ".concat(i||""),c.alt="Map marker",n&&(c.style.width=n+"px"),o&&(c.style.height=o+"px"),c},m=function(e,r,t){var n,o,a=window.bricksData.googleMapInstances[t]||!1,i=(null===(n=window.bricksData.googleMapInstances[t])||void 0===n?void 0:n.map)||!1,l=(null==a?void 0:a.settings)||!1;if(i&&a&&e&&r&&l){var c={id:e.id,infoTitle:e.infoTitle,address:e,position:r,customMarker:!1,customMarkerActive:!1,marker:!1},s=function(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("text"===e){var o,a,i,l=n?(null==t||null===(o=t.address)||void 0===o?void 0:o.markerTextActive)||(null==t||null===(a=t.address)||void 0===a?void 0:a.markerText)||(null==r?void 0:r.markerTextActive)||(null==r?void 0:r.markerText)||"Marker":(null==t||null===(i=t.address)||void 0===i?void 0:i.markerText)||(null==r?void 0:r.markerText)||"Marker";return g({type:"text",text:l,extraClassName:n?"active":""})}var c,s,d,u,p,f,v,m,b,k=n?(null==t||null===(c=t.address)||void 0===c||null===(c=c.markerActive)||void 0===c?void 0:c.url)||(null==t||null===(s=t.address)||void 0===s||null===(s=s.marker)||void 0===s?void 0:s.url)||(null==r?void 0:r.markerActive)||(null==r?void 0:r.marker)||"":(null==t||null===(d=t.address)||void 0===d||null===(d=d.marker)||void 0===d?void 0:d.url)||(null==r?void 0:r.marker)||"",x=n?(null==t||null===(u=t.address)||void 0===u||null===(u=u.markerActive)||void 0===u?void 0:u.width)||(null==t||null===(p=t.address)||void 0===p?void 0:p.markerWidth)||(null==r?void 0:r.markerActiveWidth)||(null==r?void 0:r.markerWidth)||"40":(null==t||null===(f=t.address)||void 0===f?void 0:f.markerWidth)||(null==r?void 0:r.markerWidth)||"40",M=n?(null==t||null===(v=t.address)||void 0===v||null===(v=v.markerActive)||void 0===v?void 0:v.height)||(null==t||null===(m=t.address)||void 0===m?void 0:m.markerHeight)||(null==r?void 0:r.markerActiveHeight)||(null==r?void 0:r.markerHeight)||"40":(null==t||null===(b=t.address)||void 0===b?void 0:b.markerHeight)||(null==r?void 0:r.markerHeight)||"40";return g({type:"image",url:k,width:x,height:M,extraClassName:n?"active":""})};c.customMarker=s(l.markerType,l,c),c.customMarkerActive=s(l.markerType,l,c,!0),c.marker=new BricksGoogleMarker({position:r,content:c.customMarker,map:i,title:(null==e?void 0:e.markerAriaLabel)||(null==e?void 0:e.infoTitle)||(null==a||null===(o=a.settings)||void 0===o?void 0:o.markerAriaLabel)||(null==e?void 0:e.id)||"",clickable:!0,markerData:{addressObj:e,locationInfo:c}}),c.marker&&(a.locations.push(c),c.marker.setMap(i),google.maps.event.addListener(c.marker,"click",function(){v(e,t)}))}},b=function(){var e=_asyncToGenerator(_regenerator().m(function e(r,t){var n,o,a,l,c,s,d=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return c=function(e,r){var t=window.bricksData.googleMapInstances[e]||!1;if(t){var n=t.map,o=t.mapOptions,a=t.locations;if("syncQuery"!==r||t.fitMapOnMarkersChange)if(a.length<1)n.setZoom(o.zoom),n.panTo(o.center);else if(1===a.length&&"pageLoad"===r){var i=a[0];i.position&&n.panTo(i.position);var l=google.maps.event.addListener(n,"idle",function(){n.setZoom(o.zoom),google.maps.event.removeListener(l)})}else if(t.bounds=new google.maps.LatLngBounds,a.forEach(function(e){e.position&&e.position.lat&&e.position.lng&&t.bounds.extend(e.position)}),n.fitBounds(t.bounds),n.panToBounds(t.bounds),1===a.length)var c=google.maps.event.addListener(n,"idle",function(){n.setZoom(o.zoom),google.maps.event.removeListener(c)})}},l=function(e){document.dispatchEvent(new CustomEvent("bricks/map/markers/rendered/".concat(e)))},a=function(){return a=_asyncToGenerator(_regenerator().m(function e(r,t){var n,o,a,l,c,s,d,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:n=new google.maps.Geocoder,o=_createForOfIteratorHelper(t),e.p=1,o.s();case 2:if((a=o.n()).done){e.n=9;break}if(l=a.value,e.p=3,null==l||!l.latitude||null==l||!l.longitude){e.n=4;break}m(l,{lat:parseFloat(l.latitude),lng:parseFloat(l.longitude)},r),e.n=6;break;case 4:if(null==l||!l.address){e.n=6;break}return e.n=5,i(n,l.address);case 5:(c=e.v)&&(s=c[0].geometry.location,m(l,s,r));case 6:e.n=8;break;case 7:e.p=7,d=e.v,console.warn("Geocode error:",d);case 8:e.n=2;break;case 9:e.n=11;break;case 10:e.p=10,u=e.v,o.e(u);case 11:return e.p=11,o.f(),e.f(11);case 12:return e.a(2)}},e,null,[[3,7],[1,10,11,12]])})),a.apply(this,arguments)},o=function(e,r){return a.apply(this,arguments)},n=d.length>2&&void 0!==d[2]?d[2]:"pageLoad",e.p=1,e.n=2,o(r,t);case 2:l(r),c(r,n),e.n=4;break;case 3:throw e.p=3,s=e.v,console.error("Error rendering map markers:",s),s;case 4:return e.a(2)}},e,null,[[1,3]])}));return function(r,t){return e.apply(this,arguments)}}(),k=function(){var e=document.querySelectorAll('[data-interactions*="openAddress"], [data-interactions*="closeAddress"]');e.length<1||e.forEach(function(e){var r,t,n;e.closest(".brx-infobox-popup[data-interaction-loop-id]")&&e.closest('.brx-popup[data-popup-ajax="1"]')?(r=e.closest(".brx-infobox-popup[data-interaction-loop-id]").dataset.interactionLoopId,t=document.querySelector('.brxe-map-connector[data-brx-infobox-selector="'.concat(r,'"]'))):(r=null===(n=e.dataset)||void 0===n?void 0:n.interactionLoopId,t=document.querySelector('.brxe-map-connector[data-brx-infobox-selector="'.concat(r,'"]')));if(t||(t=e.closest("[data-brx-address-id][data-brx-sync-map-id")),t&&r){var o=t.dataset,a=o.brxAddressId,i=o.brxSyncMapId;a&&i&&(e.setAttribute("data-brx-infobox-open",a),e.setAttribute("data-brx-infobox-map-id",i))}})},x=function(e,r,t){if(r&&t){var n=document.querySelectorAll('[data-brx-infobox-open="'.concat(r,'"][data-brx-infobox-map-id="').concat(t,'"]'));n.length<1||n.forEach(function(r){"open"===e?r.classList.add("infobox-opened"):"close"===e&&r.classList.remove("infobox-opened")})}},setTimeout(_asyncToGenerator(_regenerator().m(function e(){var t,n,o,a,l,c,s,d,u,v,g,m,x,M,y,I,w,h,A,T;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=function(){var e=r.dataset.bricksMapOptions;if(!e)return!1;try{return JSON.parse(e)}catch(e){return!1}}(),o=r.dataset.scriptId||!1,n&&o){e.n=1;break}return e.a(2);case 1:if(window.bricksData.googleMapInstances||(window.bricksData.googleMapInstances={}),null!==(t=window.bricksData.googleMapInstances)&&void 0!==t&&t[o]&&(window.bricksData.googleMapInstances[o].nodesAddedEvent&&document.removeEventListener("bricks/ajax/nodes_added",window.bricksData.googleMapInstances[o].nodesAddedEvent),window.bricksData.googleMapInstances[o].markersRenderedEvent&&document.removeEventListener("bricks/map/markers/rendered/".concat(o),window.bricksData.googleMapInstances[o].markersRenderedEvent),window.bricksData.googleMapInstances[o].clustererInstance&&window.bricksData.googleMapInstances[o].clustererInstance.clearMarkers(),delete window.bricksData.googleMapInstances[o]),r.removeAttribute("data-bricks-map-options"),n.disableDefaultUI&&Object.assign(n,{fullscreenControl:!1,mapTypeControl:!1,streetViewControl:!1,zoomControl:!1}),a={mapTypeId:(null==n?void 0:n.type)||"ROADMAP",zoom:n.zoom?parseInt(n.zoom):12,gestureHandling:function(){return n.draggable?n.scrollwheel&&n.draggable?"cooperative":!n.scrollwheel&&n.draggable?"greedy":"auto":"none"}(),fullscreenControl:n.fullscreenControl,mapTypeControl:n.mapTypeControl,streetViewControl:n.streetViewControl,zoomControl:n.zoomControl,disableDefaultUI:n.disableDefaultUI,clickableIcons:null==n?void 0:n.clickableIcons},l=(null==n?void 0:n.googleMapId)||!1,c=(null==n?void 0:n.markerCluster)||!1,s=(null==n?void 0:n.mapMode)||"static",d=(null==n?void 0:n.syncQuery)||!1,u=(null==n?void 0:n.noLocationsText)||window.bricksData.i18n.noLocationsFound||!1,v=(null==n?void 0:n.markerType)||"image",g=(null==n?void 0:n.fitMapOnMarkersChange)||!1,l&&(a.mapId=l),null!=n&&n.styles&&!l)try{a.styles=JSON.parse(n.styles)}catch(e){console.error("Error parsing map styles:",e)}if(n.zoomControl&&(null!=n&&n.maxZoom&&(a.maxZoom=parseInt(n.maxZoom)),null!=n&&n.minZoom&&(a.minZoom=parseInt(n.minZoom))),m=new google.maps.LatLngBounds,null==n||!n.center){e.n=4;break}if(null==n||null===(x=n.center)||void 0===x||!x.address){e.n=3;break}return I=new google.maps.Geocoder,e.n=2,i(I,n.center.address);case 2:(w=e.v)&&(a.center={lat:w[0].geometry.location.lat(),lng:w[0].geometry.location.lng()}),e.n=4;break;case 3:null!=n&&null!==(M=n.center)&&void 0!==M&&M.latitude&&null!=n&&null!==(y=n.center)&&void 0!==y&&y.longitude?a.center={lat:parseFloat(n.center.latitude),lng:parseFloat(n.center.longitude)}:a.center={lat:52.5164154966524,lng:13.377643715349544};case 4:h=[],T=s,e.n="sync"===T?5:"query"===T?6:"static"===T?7:8;break;case 5:return h=p(d,o,a.center),e.a(3,8);case 6:return h=f(n,o),e.a(3,8);case 7:return h=Array.isArray(null==n?void 0:n.addresses)?n.addresses:[{address:a.center}],e.a(3,8);case 8:return A=new google.maps.Map(r,a),window.bricksData.googleMapInstances[o]={map:A,mapMode:s,mapOptions:a,mapId:l,bounds:m,settings:n,locations:[],useMarkerClusterer:c,clustererInstance:!1,syncQuery:d,noLocationsText:u,markerType:v,nodesAddedEvent:!1,markersRenderedEvent:!1,fitMapOnMarkersChange:g},d&&(window.bricksData.googleMapInstances[o].nodesAddedEvent=function(){var e=_asyncToGenerator(_regenerator().m(function e(r){var t,n,a,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=(null==r||null===(t=r.detail)||void 0===t?void 0:t.queryId)||!1,a=window.bricksData.googleMapInstances[o]||!1,n&&n===d&&a){e.n=1;break}return e.a(2);case 1:return a.locations.forEach(function(e){var r,t,n,o,a;if(null===(r=e.infoBox)||void 0===r||r.close(),null===(t=e.marker)||void 0===t||t.setMap(null),(null==e||null===(n=e.address)||void 0===n||!n.isAjaxPopup)&&null!=e&&null!==(o=e.address)&&void 0!==o&&o.popupNode&&null!=e&&null!==(a=e.address)&&void 0!==a&&a.popupContentNode){var i=e.address.popupNode.querySelector(".brx-popup-content");i&&i.parentNode.replaceChild(e.address.popupContentNode,i)}}),a.locations=[],a.useMarkerClusterer&&a.clustererInstance&&a.clustererInstance.clearMarkers(),i=p(d,o),e.n=2,b(o,i,"syncQuery");case 2:return e.a(2)}},e)}));return function(r){return e.apply(this,arguments)}}(),document.addEventListener("bricks/ajax/nodes_added",window.bricksData.googleMapInstances[o].nodesAddedEvent)),window.bricksData.googleMapInstances[o].markersRenderedEvent=function(){var e=window.bricksData.googleMapInstances[o]||!1;if(e){var t=e.locations.map(function(e){return e.marker}),n=r.querySelector(".brx-map-no-results");if(t.length<1&&e.noLocationsText){if(!n){var a=document.createElement("div");a.classList.add("brx-map-no-results"),a.innerHTML=e.noLocationsText,r.appendChild(a)}}else null==n||n.remove();if(e.useMarkerClusterer){var i={map:e.map,markers:t,algorithmOptions:{maxZoom:16,radius:60}};i.renderer={render:function(e,r){var t=e.count,n=e.position;return new BricksGoogleMarker({position:n,content:'<svg class="brx-map-cluster" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="60" height="60"><circle cx="120" cy="120" opacity=".6" r="70"></circle><circle cx="120" cy="120" opacity=".4" r="90"></circle><circle cx="120" cy="120" opacity=".2" r="110"></circle><text x="50%" y="50%" text-anchor="middle" font-size="60" font-weight="600" font-family="roboto,arial,sans-serif" dominant-baseline="middle">'.concat(t,"</text></svg>"),title:"Cluster of ".concat(t," markers"),clickable:!0,zIndex:Number(google.maps.Marker.MAX_ZINDEX)+t})}},e.clustererInstance=new markerClusterer.MarkerClusterer(i)}k()}},document.addEventListener("bricks/map/markers/rendered/".concat(o),window.bricksData.googleMapInstances[o].markersRenderedEvent),e.n=9,b(o,h,"pageLoad");case 9:return e.a(2)}},e)})),1e3*t);case 1:return e.a(2)}},e)}));return function(r,t){return e.apply(this,arguments)}}()});function bricksMap(){return _bricksMap.apply(this,arguments)}function _bricksMap(){return(_bricksMap=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=function(){return new Promise(function(e,r){var t,n,o;if("undefined"!=typeof InfoBox&&"undefined"!=typeof markerClusterer&&"undefined"!=typeof BricksGoogleMarker)return e();var a=(null===(t=window)||void 0===t||null===(t=t.bricksData)||void 0===t?void 0:t.infoboxScript)||!1;if(!a)return console.error("InfoBox library URL not found"),r(new Error("InfoBox library URL not found"));var i=function(e,r){return new Promise(function(t,n){var o,a=document.createElement("script");!bricksIsFrontend&&null!==(o=window.bricksData)&&void 0!==o&&o.builderCloudflareRocketLoader&&a.setAttribute("data-cfasync","false"),a.src=e,a.async=!0,a.defer=!0,a.id=r,a.onload=function(){return t()},a.onerror=function(e){return n(e)},document.body.appendChild(a)})},l=(null===(n=window)||void 0===n||null===(n=n.bricksData)||void 0===n?void 0:n.markerClustererScript)||!1;if(!l)return console.error("MarkerClusterer library URL not found"),r(new Error("MarkerClusterer library URL not found"));var c=(null===(o=window)||void 0===o||null===(o=o.bricksData)||void 0===o?void 0:o.bricksGoogleMarkerScript)||!1;if(!c)return console.error("Bricks Google Marker library URL not found"),r(new Error("Bricks Google Marker library URL not found"));Promise.all([i(a,"bricks-google-maps-infobox"),i(c,"bricks-google-marker"),i(l,"bricks-google-maps-markerclusterer")]).then(function(){e()}).catch(function(e){console.error("Error loading library",e),r(e)})})},e.n=1,google.maps.importLibrary("marker");case 1:return e.n=2,r();case 2:bricksMapFn.run();case 3:return e.a(2)}},e)}))).apply(this,arguments)}
修改文件时间
将文件时间修改为当前时间的前一年
删除文件