MapPress Easy Google Maps - Version 2.58.3

Version Description

  • Added: selected icon can now be highlighted with a special icon or a circle
  • Fixed: error preventing KML files from being added to map
Download this release

Release Info

Developer chrisvrichardson
Plugin Icon 128x128 MapPress Easy Google Maps
Version 2.58.3
Comparing to
See all releases

Code changes from version 2.57.3 to 2.58.3

build/index_mappress.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={854:()=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.highlight=null,this.iw=null,this.places=null,this.poi=null,this.settings=e||{},this.templates=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.xhr_,this.zindex_=0,_.extend(this,this.defaults,t,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.poiList=this.poiList?this.poiList:mappl10n.options.poiList,this.postid=this.postid?this.postid:mappl10n.options.postid},i.Map.prototype={display:function(){var t=this;if(!0===this.sanity()){var o;this.render(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup"},"leaflet"==mappl10n.options.engine?((o=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts)).minZoom=isNaN(parseInt(o.minZoom))?0:parseInt(o.minZoom),this.map_=new L.Map(this.div.canvas.get(0),o),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_),this.iw=L.popup(),this.iw.setContent(this.div.iw.get(0))):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),(o=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.editable&&!this.query},this.mapOpts)).minZoom=isNaN(parseInt(o.minZoom))?0:parseInt(o.minZoom),this.map_.setOptions(o),this.iw="ib"==mappl10n.options.iwType||this.editable?new i.InfoBox(this):new google.maps.InfoWindow,this.iw.setContent(this.div.iw.get(0)),this.addLayers()),this.addStyles(),this.addMenu(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)}));var n=this.clusterer?"click drag zoom_changed zoomstart":"click drag";this.addEvents(n,(function(){t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).resize((function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())}))}},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.poi);break;case"dir-from":this.directionsOpen(this.poi,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=e.trim(t[i]),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.editable){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],r=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,r),r.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var p=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];if(h&&"object"==t(p[h])&&this.map_.setOptions({styles:p[h]}),this.editable){for(var u in p)this.map_.mapTypes.set(u,new google.maps.StyledMapType(p[u],{name:u})),c.push(u);this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}})}else this.mapTypeId&&"object"==t(p[this.mapTypeId])&&this.map_.setOptions({styles:p[this.mapTypeId]});i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?t.open():e&&e.open(),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){"leaflet"==mappl10n.options.engine?this.map_.closePopup():this.iw.close(),this.dir_&&this.dir_.close(),this.select(null),e(this).triggerHandler("mapp.close")},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.select(t),this.set({dirty:!0})},poiOpen:function(t,i){var o=null;if(this.poiClose(),this.select(t),"poi"!=mappl10n.options.mashupClick&&t.postid&&t.url)"post"==mappl10n.options.mashupClick?window.location.assign(t.url):window.open(t.url);else{this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),i&&i.featureData?o=i.featureData:i&&i.propagatedFrom&&i.propagatedFrom.feature&&i.propagatedFrom.feature.properties&&(o=i.propagatedFrom.feature.properties),this.div.iw.html(t.render("popup",o));var n=this.clusterGetLatLng(t),s=n||t.getPosition(i);if(this.poiSetMaxSize(t),"leaflet"==mappl10n.options.engine)this.iw.setLatLng(s),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw);else{var a=new google.maps.MVCObject;a.setValues({position:s,anchorPoint:t.getAnchorPoint(i)}),this.iw.open(this.map_,a)}e(this).triggerHandler("mapp.open",t)}},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},poiSetMaxSize:function(t){var e="ib"==mappl10n.options.iwType||"leaflet"==mappl10n.options.engine?100:170,i=t.getAnchorPoint();this.editable&&(e=80),i="leaflet"==mappl10n.options.engine?{x:i[0],y:i[1]}:i;var o=this.div.canvas.height()+i.y-e,n=this.div.canvas.width()-i.x-e;this.div.iw.css({"max-height":o}),this.div.iw.css({"max-width":n})},recenter:function(){var t=this.center&&this.center.lat&&this.center.lng?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(this.pois_[o].getPosition())}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=i.lib.template("map",{map:this});if(this.sel?(this.sel.html(o),this.div.layout=e(".mapp-layout",this.sel)):(e("#"+this.name+"-layout").replaceWith(o),this.div.layout=e("#"+this.name+"-layout")),!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","iw","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.editable&&(this.div.iw=e(".mapp-iw-edit",this.div.layout)),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible="kml"!=this.pois_[s].type,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),this.editable&&e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})},renderMenu:function(){for(layer in this.layers_)e('[data-mapp-layer="'+layer+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[layer].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.zindex_=0,this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){if("undefined"==typeof _)return i.lib.alert("ERROR: underscore.js not loaded. Check cacheing / optimizing plugins.");if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("ERROR: Unable to load Leaflet")}else{if("undefined"==typeof google)return i.lib.alert("ERROR: Google Maps API not loaded");e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("ERROR: Google Maps API key loaded multiple times, please see MapPress FAQ.")}))}return!0},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},select:function(t){if(e(".mapp-item",this.div.list).removeClass("mapp-selected"),t){var o=e.inArray(t,this.pois_),n=e('[data-mapp-poi="'+o+'"]',this.div.list);i.lib.scrollTo(this.div.list,n),t.setZIndex(++this.zindex_),n.addClass("mapp-selected")}this.poi=t},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setHighlight:function(t){this.highlight&&("leaflet"==mappl10n.options.engine?this.highlight.remove():this.highlight.setMap(null)),t&&("leaflet"==mappl10n.options.engine?this.highlight=new L.Marker(t.getPosition()).addTo(this.map_):(this.highlight=new google.maps.Marker({position:t.getPosition()}),this.highlight.setMap(this.map_)))},setMapTypeId:function(i){var o=this;if("leaflet"==mappl10n.options.engine){this.map_.eachLayer((function(t){o.map_.removeLayer(t)})),i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var n=0;n<mappl10n.options.baseLayers.length;n++){var s=mappl10n.options.baseLayers[n],a=mappl10n.options.providers[s.provider];if(s.name==i){var l=e.extend({},a,s);L.tileLayer(l.url,l).addTo(this.map_)}}}else{var r=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"]);i=this.editable?r||"object"==t(mappl10n.options.styles[i])?i:"roadmap":r?i:"roadmap",this.map_.setMapTypeId(i)}},setPois:function(t){if(this.resetPois(),t){for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this),o.setZIndex(this.zindex_+t.length-1-e)}this.zindex_+=t.length-1}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}},ajaxSave:function(t){var e=this;this.postid&&"0"!=this.postid||(this.postid=mappl10n.options.postid),i.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(this),nonce:mappl10n.options.nonce},callback:function(i){i&&"OK"==i.status&&(e.mapid||(e.mapid=i.data.mapid),t&&t())}})}},i.Map.ajaxGet=function(t,e){i.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){"OK"==t.status&&e(t.data)}})},i.Map.ajaxDelete=function(t,e){i.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&e&&e()}})}},397:()=>{var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-addr",this.sel).removeClass("mapp-error"),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en",o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=t.map((function(t){return t.value=t.description,t})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:()=>{var t=window.mapp||{};t.Icons={},t.Icons.get=function(t){var e="https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png";return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:e,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:e}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:()=>{var t,e=window.mapp||{};t=jQuery,e.InfoBox=function(e,i){var o,n=t.extend({border:20},i),s=null,a=null,l=this;a=t('<div class="mapp-ib-wrapper"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div></div>').appendTo(e.getMap().getDiv()),jQuery(window).resize((function(){l.close()})),a.on("keydown",(function(t){27==t.which&&(l.close(),t.stopImmediatePropagation(),t.preventDefault())})),a.on("click",".mapp-close",(function(){l.close()})),this.getContent=function(){return t(".mapp-ib",a)},this.setContent=function(e){t(".mapp-ib",a).empty().append(e)},this.open=function(t,e){s=e,this.setMap(t)},this.onAdd=function(){o=!1;var e=t(":input",a);a.addClass("mapp-open"),e.length?e.first().focus():a.focus(),google.maps.event.trigger(l,"domready")},this.draw=function(){var e=this.getMap(),i=(t(".mapp-ib-body",a),this.getProjection().fromLatLngToContainerPixel(s.position)),l=i.x,r=i.y,p={width:t(":first-child",e.getDiv()).width(),height:t(":first-child",e.getDiv()).height()},h=a.outerWidth(!0),c=a.outerHeight(!0);o||(l+h/2>p.width&&(l=p.width-h/2),l-h/2<0&&(l=h/2),r-c+s.anchorPoint.y<n.border&&(r=c-s.anchorPoint.y+n.border),r>p.height&&(r=p.height),(i.x-l||i.y-r)&&e.panBy(i.x-l,i.y-r)),a.css({left:l-h/2,bottom:p.height-r-s.anchorPoint.y}),o=!0},this.close=function(){a.is(":visible")&&(this.setMap(null),google.maps.event.trigger(this,"closed"))},this.onRemove=function(){a.removeClass("mapp-open")}},"leaflet"!=mappl10n.options.engine&&(e.InfoBox.prototype=new google.maps.OverlayView)},628:()=>{var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"OK"!=t.status&&console.log(t.status),t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}}},692:()=>{jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},510:()=>{var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.Places.prototype={parse:function(e,i){var o=e&&e.name?t.trim(e.name):t.trim(e);if(o)if("user"!=o)if(e&&e.geometry)i(e);else{var n=this.parseLatLng(e);n?i(n):this.geocoder.getFirstPrediction(e,(function(t){i(t)}))}else this.geolocate((function(t){i(t)}));else i(null)},parseLatLng:function(e){var i;if(e.lat&&e.lng)i=e;else{var o=(e&&e.name?t.trim(e.name):t.trim(e)).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(i={lat:n,lng:s})}}return i?{name:i.lat+", "+i.lng,geometry:{location:i}}:null},geolocate:function(t){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}})}}},548:()=>{var t,e=window.mapp||{};t=jQuery,e.Poi=function(e){if(this.defaults={address:null,body:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,e),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),e.viewport&&e.viewport.sw&&e.viewport.ne&&e.viewport.sw.lat){var i=e.viewport.sw,o=e.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(i.lat,i.lng),L.latLng(o.lat,o.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(i.lat,i.lng),new google.maps.LatLng(o.lat,o.lng))}var n=[],s=[];if(!e.overlay)switch(this.type){case"polygon":if(e.poly&&e.poly.paths)for(var a=0;a<e.poly.paths.length;a++){n=[];for(var l=0;l<e.poly.paths[a].length;l++)n.push(new google.maps.LatLng(e.poly.paths[a][l].lat,e.poly.paths[a][l].lng));s.push(new google.maps.MVCArray(n))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)}),this.setColors(e.poly);break;case"polyline":if(e.poly&&e.poly.path)for(a=0;a<e.poly.path.length;a++)n.push(new google.maps.LatLng(e.poly.path[a].lat,e.poly.path[a].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(n)}),this.setColors(e.poly);break;case"circle":var r=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:r,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(e.poly);break;case"kml":var p=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(p):new google.maps.KmlLayer(p,{preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng],{title:e.title}):this.overlay=new google.maps.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng),title:e.title})}e.type||this.setIcon(e.iconid)},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return"leaflet"==mappl10n.options.engine?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:void 0!==this.overlay.anchorPoint?this.overlay.anchorPoint:new google.maps.Point(0,-32)}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},open:function(t){this.map.poiOpen(this,t)},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(att in t){var e=t[att];switch(att){case"dirty":this.map.set({dirty:e});break;case"iconid":this.setIcon(e);break;default:this[att]=e}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setIcon:function(t){this.type||void 0===e.Icons||(this.iconid=t,"leaflet"==mappl10n.options.engine||this.overlay.setIcon(null),this.overlay.setIcon(e.Icons.get(t)))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&mappl10n.ajaxErrors&&alert(mappl10n.kml_error+":"+t)})))),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t,e,i){var o="polyline"==this.type?{strokeColor:t,strokeOpacity:e/100,strokeWeight:i}:{fillColor:t,fillOpacity:e/100,strokeColor:t,strokeWeight:i,strokeOpacity:1};this.setColors(o)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,r=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,g=i.city&&i.city[0]!==h?i.city[0]:void 0,d=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,f=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},y=f.postcode,v=f.highlightedPostcode,w={name:p(i._highlightResult.locale_names),city:g?p(i._highlightResult.city):void 0,administrative:u?p(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:d?p(i._highlightResult.suburb):void 0,county:m?p(i._highlightResult.county):void 0,postcode:v},b={name:h,administrative:u,county:m,city:g,suburb:d,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:y,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:r,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function p(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(510),i(548),i(692)})();
1
+ (()=>{var t={854:()=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e,i=window.mapp||{};e=jQuery,i.Map=function(t,e){this.defaults={alignment:null,center:null,classname:null,editable:null,embed:null,height:null,initialOpenDirections:null,initialOpenInfo:null,layers:null,layout:null,mapid:null,mapTypeId:null,metaKey:null,mapOpts:null,name:null,poiList:null,pois:null,postid:null,query:null,sel:null,title:null,width:null,zoom:null},this.dirty=!1,this.iw=null,this.highlighted=null,this.highlight=null,this.mapdata=t,this.opened=null,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.tooltip=null,this.zindex=0,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.xhr_},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(_.extend(this,this.defaults,this.mapdata,this.settings),this.layout=this.layout?this.layout:mappl10n.options.layout,this.poiList=this.poiList?this.poiList:mappl10n.options.poiList,this.postid=this.postid?this.postid:mappl10n.options.postid,this.render(),this.editable?this.templates={loop:"edit-loop",item:"edit-item",popup:"edit-popup"}:this.query?this.templates={loop:"map-loop",item:"mashup-item",popup:"mashup-popup",tooltip:"mashup-tooltip"}:this.templates={loop:"map-loop",item:"map-item",popup:"map-popup",tooltip:"map-tooltip"},"leaflet"==mappl10n.options.engine?this.mapOpts=_.extend({attribution:'Map data <a href="https://openstreetmap.org">OpenStreetMap</a>',minZoom:0,worldCopyJump:!0,zoomControl:null},this.mapOpts):this.mapOpts=_.extend({backgroundColor:"transparent",clickableIcons:!1,fullscreenControl:!1,mapTypeControl:!1,mapTypeControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},minZoom:0,scaleControl:!0,streetViewControl:!this.query},this.mapOpts),this.mapOpts.minZoom=isNaN(parseInt(this.mapOpts.minZoom))?0:parseInt(this.mapOpts.minZoom),"leaflet"==mappl10n.options.engine?(this.map_=new L.Map(this.div.canvas.get(0),this.mapOpts),L.control.zoom({position:"bottomright",zoomInTitle:"",zoomOutTitle:""}).addTo(this.map_)):(this.map_=new google.maps.Map(this.div.canvas.get(0),{mapTypeId:"roadmap",zoom:1}),this.map_.setOptions(this.mapOpts),this.addLayers()),this.addStyles(),this.addMenu(),this.addPopup(),this.setMapTypeId(this.mapTypeId),this.clustering(),this.places=new i.Places(e(".mapp-places",this.div.search),{map:t}),this.editable&&this.places.sel.focus(),e(this.places).on("search.mapp",(function(e,i){t.search(i)})),this.addEvents("click dragstart zoom_changed zoomstart",(function(e){"leaflet"==mappl10n.options.engine&&"click"==e.type&&e.originalEvent&&!e.originalEvent.target.matches(".mapp-canvas")||t.poiClose()})),this.div.layout.on("click","[data-mapp-action]",(function(i){var o=e(this).attr("data-mapp-action");i.preventDefault(),t.action(o,e(this).attr("data-mapp-"+o),e(this))})),this.div.filters.on("change",(function(){t.ajaxQuery()})),e(window).resize((function(){t.toggleView("mini"),t.poiClose(),t.resize()})),i.event.addListener(t.map_,"maptypeid_changed baselayerchange",(function(){t.set({dirty:!0})})),this.places.parse(this.center,(function(e){e&&e.geometry&&e.geometry.location?t.center={lat:e.geometry.location.lat,lng:e.geometry.location.lng}:t.center=null,t.query?t.ajaxQuery((function(){t.initCenter()})):(t.setPois(t.pois),t.initCenter())})))},initCenter:function(){var t=this;this.recenter(),this.renderList(),this.query&&mappl10n.options.search&&!this.editable&&this.addSearchMove(),"leaflet"==mappl10n.options.engine?this.initOpen():i.event.addListenerOnce(t.map_,"idle",(function(){t.initOpen()}))},initOpen:function(){var t=this.pois_.length?this.pois_[0]:null,e=null!=this.initialOpenInfo?this.initialOpenInfo:mappl10n.options.initialOpenInfo;this.initialOpenDirections?this.directionsOpen(null,t):t&&e&&t.open()},action:function(t,i,o){var n=this;switch(t){case"center":this.toggleView("menu",!1),this.poiClose(),this.recenter();break;case"dir":this.directionsOpen(null,this.selected);break;case"dir-from":this.directionsOpen(this.selected,null);break;case"filters-reset":this.div.filters.find(":input").each((function(){"checkbox"==this.type||"radio"==this.type?e(this).prop("checked",!1):e(this).val("")})),this.ajaxQuery();break;case"filters-toggle":this.toggleView("filters");break;case"geolocate":this.places.geolocate((function(t){n.search(t)}));break;case"layer":this.toggleLayer(i),this.toggleView("menu",!1);break;case"list-toggle":this.togglePoiListOpen();break;case"menu-toggle":this.toggleView("menu");break;case"open":var s=o.attr("data-mapp-poi");this.poiOpen(this.pois_[s]);break;case"view-map":this.togglePoiListOpen(!1);break;case"view-list":this.togglePoiListOpen(!0);break;default:return!0}},addEvents:function(t,e){t=t.split(" ");for(var o=0;o<t.length;o++)i.event.addListener(this.map_,t[o],e)},addLayers:function(){this.layers_={traffic:new google.maps.TrafficLayer,bicycling:new google.maps.BicyclingLayer,transit:new google.maps.TransitLayer};for(var t=e.makeArray(this.layers),i=0;i<t.length;i++){var o=t[i].trim(),n=o.split(".").pop();this.layers_[o]?this.toggleLayer(o):"kml"==n||"kmz"==n?this.layers_[o]=new google.maps.KmlLayer({map:this.map_,preserveViewport:!0,url:o}):"json"==n&&(this.layers_[o]=new google.maps.Data({map:this.map_}).loadGeoJson(o))}},addMenu:function(){var t=this;e("body").on("click",(function(i){var o=e(i.target),n=o.attr("data-mapp-action");o==t.div.filters||"filters-toggle"==n||o.closest(t.div.filters).length||t.toggleView("filters",!1),o==t.div.menu||"menu-toggle"==n||o.closest(t.div.menu).length||t.toggleView("menu",!1)}))},addPopup:function(){var t=this,o=this.editable?"mapp-iw-edit":"mapp-iw";if(o+=" mapp-"+this.templates.popup,this.div.iw=e('<div class="'+o+'">').appendTo(this.div.canvas),"ib"==mappl10n.options.iwType||this.editable){var n=this.editable?"mapp-ib-popup mapp-ib-edit":"mapp-ib-popup";this.iw=new i.Infobox(this.map_,{className:n,clip:!0,pan:!0})}else this.iw="leaflet"==mappl10n.options.engine?L.popup({maxWidth:"auto"}):new google.maps.InfoWindow;this.iw.setContent(this.div.iw.get(0)),this.div.iw.on("click",".mapp-close",(function(){t.poiClose()})),e(window).resize((function(){t.poiClose()})),mappl10n.options.tooltips&&!this.editable&&(o="mapp-iw mapp-"+this.templates.popup,this.div.tooltip=e('<div class="'+o+'">').appendTo(this.div.canvas),this.tooltip=new i.Infobox(this.map_,{className:"mapp-ib-tooltip",clip:!0,pan:!1}),this.tooltip.setContent(this.div.tooltip.get(0)),this.tooltip&&(this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");o&&t.poiOpenTooltip(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiCloseTooltip()}))))},addSearchMove:function(){},addStyles:function(){var o=this;if("leaflet"==mappl10n.options.engine){if(this.mapOpts.mapTypeControl){for(var n=L.control.layers(),s=0;s<mappl10n.options.baseLayers.length;s++){var a=mappl10n.options.baseLayers[s],l=mappl10n.options.providers[a.provider],p=e.extend({},l,a);n.addBaseLayer(L.tileLayer(l.url,p),p.label)}mappl10n.options.baseLayers.length>1&&n.addTo(this.map_)}this.map_.on("baselayerchange",(function(t){o.mapTypeId=t.layer.options.name}))}else{var r=mappl10n.options.styles?mappl10n.options.styles:[],h=mappl10n.options.style,c=["roadmap","satellite","terrain","hybrid"];for(var u in h&&"object"==t(r[h])&&this.map_.setOptions({styles:r[h]}),r)this.map_.mapTypes.set(u,new google.maps.StyledMapType(r[u],{name:u})),c.push(u);this.mapOpts.mapTypeControl&&this.map_.setOptions({mapTypeControl:!0,mapTypeControlOptions:{mapTypeIds:c,position:google.maps.ControlPosition.TOP_RIGHT,style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}}),i.event.addListener(this.map_,"maptypeid_changed",(function(){o.mapTypeId=o.map_.getMapTypeId()}))}},ajaxQuery:function(t){},clusterGetLatLng:function(t){if(this.clusterer){if("leaflet"==mappl10n.options.engine){var e=this.clusterer.getVisibleParent(t.overlay);return e?e.getLatLng():null}for(var i=this.clusterer.getClusters(),o=0;o<i.length;o++){var n=i[o].markers_;if(n.length>1)for(var s=0;s<n.length;s++)if(n[s]==t.overlay)return i[o].center_}}},clustering:function(){mappl10n.options.clustering&&!this.editable&&("leaflet"==mappl10n.options.engine?this.clusterer=L.markerClusterGroup():this.clusterer=new MarkerClusterer(this.map_,[],{imagePath:mappl10n.options.baseurl+"/lib/js-markerclustererplus-main/images/m"}))},clustersReset:function(){this.clusterer&&("leaflet"==mappl10n.options.engine?this.clusterer.clearLayers():this.clusterer.clearMarkers())},clustersSet:function(){if(this.clusterer){for(var t=[],e=0;e<this.pois_.length;e++)this.pois_[e].type||t.push(this.pois_[e].overlay);"leaflet"==mappl10n.options.engine?(this.clusterer.addLayers(t),this.map_.addLayer(this.clusterer)):this.clusterer.addMarkers(t)}},dialog:function(t,e){var i=this;t?(this.div.dialog.html(t),this.div.dialog.show(),e&&(clearTimeout(this.dialog.fade),this.dialog.fade=setTimeout((function(){i.dialog(null)}),4e3))):this.div.dialog.hide()},directionsOpen:function(t,e){var o=t?t.getAddress():"",n=e?e.getAddress():"";t?t.open():e&&e.open(),this.dir_||(this.dir_=new i.Directions(this.div.directions,this)),this.dir_.open(o,n)},fitBounds:function(t,e){return e="leaflet"==mappl10n.options.engine&&e?{paddingTopLeft:[e.left,e.top],paddingBottomRight:[e.right,e.bottom]}:e,this.map_.fitBounds(t,e)},getBounds:function(){try{return this.map_.getBounds()}catch(t){return null}},getCenter:function(){try{return this.map_.getCenter()}catch(t){return null}},getMapTypeId:function(t){return"leaflet"==mappl10n.options.engine?"roadmap":this.map_.getMapTypeId(t)},getMap:function(){return this.map_},getPois:function(){return this.pois_},getZoom:function(){try{return this.map_.getZoom()}catch(t){return null}},poiClose:function(){this.opened=null,"ib"==mappl10n.options.iwType||this.editable?this.iw.close():"leaflet"==mappl10n.options.engine?this.map_.closePopup():this.iw.close(),this.dir_&&this.dir_.close(),this.poiSelect(null),e(this).triggerHandler("mapp.close")},poiCloseTooltip:function(){var t=mappl10n.options.debugTooltips;this.tooltip&&!t&&this.tooltip.close()},poiHighlight:function(t,e){if(mappl10n.options.highlight&&"kml"!=t.type&&!t.isPoly())switch(mappl10n.options.highlight){case"circle":if(e){var o=i.Icons.getSVG("circle"),n=t.getPosition(),s=++this.zindex;"leaflet"==mappl10n.options.engine?this.highlight=L.marker([n.lat,n.lng],{icon:o,zIndexOffset:s}).addTo(this.map_):this.highlight=new google.maps.Marker({map:this.map_,position:t.getPosition(),icon:o,zIndex:s})}else this.highlight&&("leaflet"==mappl10n.options.engine?this.highlight.remove():this.highlight.setMap(null));t.setZIndex(++this.zindex);break;case"icon":e?(o=i.Icons.get(mappl10n.options.highlightIcon),t.overlay.setIcon(o),t.setZIndex(++this.zindex)):t.overlay.setIcon(i.Icons.get(t.iconid))}},poiInsert:function(t){this.pois_.unshift(t),t.setMap(this),this.renderList(),this.poiSelect(t),this.set({dirty:!0})},poiOpen:function(t,i){var o=null;if(this.poiClose(),this.poiCloseTooltip(),this.poiSelect(t),this.opened=t,"poi"!=mappl10n.options.mashupClick&&t.postid&&t.url)"post"==mappl10n.options.mashupClick?window.location.assign(t.url):window.open(t.url);else{this.div.layout.hasClass("mapp-view-mini")&&this.togglePoiListOpen(!1),i&&i.featureData?o=i.featureData:i&&i.propagatedFrom&&i.propagatedFrom.feature&&i.propagatedFrom.feature.properties&&(o=i.propagatedFrom.feature.properties),this.poiSetMaxSize(t),this.div.iw.html(t.render("popup",o));var n=this.clusterGetLatLng(t),s=n||t.getPosition(i);if("ib"==mappl10n.options.iwType||this.editable)this.iw.open({position:s,anchorPoint:t.getAnchorPoint(i)});else if("leaflet"==mappl10n.options.engine)this.iw.setLatLng(s),this.iw.options.offset=t.getAnchorPoint(),this.map_.openPopup(this.iw);else{var a=new google.maps.MVCObject;a.setValues({position:s,anchorPoint:t.getAnchorPoint(i)}),this.iw.open(this.map_,a)}e(this).triggerHandler("mapp.open",t)}},poiOpenTooltip:function(t){if(!(this.div.layout.hasClass("mapp-view-mini")&&this.div.layout.hasClass("mapp-list-open")||this.opened)){this.div.tooltip.html(t.render("tooltip"));var e=this.clusterGetLatLng(t),i=e||t.getPosition();this.tooltip.open({position:i,anchorPoint:t.getAnchorPoint()})}},poiRemove:function(t){var i=e.inArray(t,this.pois_);-1!=i&&(this.pois_[i].setMap(null),this.pois_.splice(i,1),this.renderList()),this.set({dirty:!0})},poiSelect:function(t){if(e(".mapp-item",this.div.list).removeClass("mapp-selected"),this.selected&&this.poiHighlight(this.selected,!1),t){var o=e.inArray(t,this.pois_),n=e('[data-mapp-poi="'+o+'"]',this.div.list);i.lib.scrollTo(this.div.list,n),n.addClass("mapp-selected")}this.selected=t,t&&this.poiHighlight(t,!0)},poiSetMaxSize:function(t){if("ib"!=mappl10n.options.iwType&&"leaflet"==mappl10n.options.engine){var e=t.getAnchorPoint();this.div.iw.css({"max-height":this.div.canvas.height()+e[1]-50,"max-width":this.div.canvas.width()-e[0]-50})}},recenter:function(){var t=this.center&&this.center.lat&&this.center.lng?this.center:null,e=this.zoom&&parseInt(this.zoom)?parseInt(this.zoom):null;if(t&&!e&&this.query)this.search({geometry:{location:{lat:t.lat,lng:t.lng}}});else if(t)this.setView(t,e||1);else if(0!=this.pois_.length)if(1!=this.pois_.length){for(var i="leaflet"==mappl10n.options.engine?new L.LatLngBounds:new google.maps.LatLngBounds,o=0;o<this.pois_.length;o++){var n=this.pois_[o].getBounds(),s=this.pois_[o].getPosition();i=n?"leaflet"==mappl10n.options.engine?i.extend(n):i.union(n):i.extend(s)}e?this.setView(i.getCenter().toJSON(),e):this.fitBounds(i)}else this.pois_[0].center(e);else this.setView({lat:0,lng:0},e||1)},render:function(){var t=this,o=i.lib.template("map",{map:this});if(this.sel?(this.sel.html(o),this.div.layout=e(".mapp-layout",this.sel)):(e("#"+this.name+"-layout").replaceWith(o),this.div.layout=e("#"+this.name+"-layout")),!this.div.layout.length)return i.lib.log("MapPress: Missing map name or container for map: "+this.name);e.each(["canvas","controls","dialog","directions","filters","list","menu","wrapper","search"],(function(i,o){t.div[o]=e(".mapp-"+o,t.div.layout)})),this.setSize({width:this.width,height:this.height}),this.set({poiList:this.poiList})},renderList:function(){var t=this.getBounds(),o=0,n=this;if(!this.editable)for(var s=0;s<this.pois_.length;s++)this.pois_[s].visible=!0,this.query&&t&&!t.contains(this.pois_[s].getPosition())&&(this.pois_[s].visible=!1),o+=this.pois_[s].visible;this.div.list.html(i.lib.template(this.templates.loop,{map:this,pois:this.pois_,count:o})),this.editable&&e(".mapp-items",this.div.list).sortable({axis:"y",cursor:"move",delay:200,update:function(){n.sortPois(e(this).sortable("toArray",{attribute:"data-mapp-poi"}))}})},renderMenu:function(){for(layer in this.layers_)e('[data-mapp-layer="'+layer+'"]',this.div.layout).toggleClass("mapp-active",null!=this.layers_[layer].getMap())},resetPois:function(){for(var t=0;t<this.pois_.length;t++)this.pois_[t].setMap(null);this.pois_=[],this.zindex=0,this.clustersReset()},resize:function(){this.map_&&("leaflet"==mappl10n.options.engine?this.map_.invalidateSize():i.event.trigger(this.map_,"resize"),this.toggleView("mini"))},sanity:function(){var t="Please see the MapPress FAQ Troubleshooting section to resolve.";if("leaflet"==mappl10n.options.engine){if("undefined"==typeof L)return i.lib.alert("MAPPRESS ERROR: Unable to load Leaflet. "+t),!1}else{if("undefined"==typeof google)return i.lib.alert("MAPPRESS ERROR: Google Maps API not loaded. "+t),!1;e(document).ready((function(){e('script[src*="https://maps.googleapis.com/maps/api/js?v=3"]').length>1&&i.lib.alert("MAPPRESS ERROR: Google Maps API key loaded multiple times. "+t)}))}return"undefined"==typeof _?(i.lib.log("MAPPRESS ERROR: plugin conflict, underscore.js not loaded. "+t),!1):!(void 0===jQuery.ui||jQuery.ui.version<"1.12")||(i.lib.log("MAPPRESS WARNING: plugin conflict, Outdated jQuery version: "+jQuery.ui.version+" should be >= 1.12 "+t),!0)},search:function(t){if(t&&t.geometry){var e=t.geometry.location?t.geometry.location:null,i=t.geometry.viewport?t.geometry.viewport:null;if("leaflet"==mappl10n.options.engine)var o=new L.LatLng(e.lat,e.lng),n=i?new L.LatLngBounds(new L.LatLng(i.sw.lat,i.sw.lng),new L.LatLng(i.ne.lat,i.ne.lng)):o.toBounds(1e3*mappl10n.options.radius);else{var s=new google.maps.Circle({center:e,radius:1e3*mappl10n.options.radius});n=i?new google.maps.LatLngBounds(new google.maps.LatLng(i.sw.lat,i.sw.lng),new google.maps.LatLng(i.ne.lat,i.ne.lng)).union(s.getBounds()):s.getBounds()}n&&this.fitBounds(n),this.setView(e)}},set:function(t){for(var e in t){var i=t[e];switch(e){case"dirty":this.dirty=i;break;case"mapTypeId":this.mapTypeId=i,this.setMapTypeId(i);break;case"poiList":this.poiList=null==i?mappl10n.options.poiList:i,this.div.layout.toggleClass("mapp-has-list",this.poiList),this.togglePoiListOpen(this.poiList),this.toggleView("mini");break;case"title":this.title=i;break;default:this[e]=i}}},setMapTypeId:function(i){if("leaflet"==mappl10n.options.engine){i=!this.editable&&mappl10n.options.style&&"streets"==i?mappl10n.options.style:i,i=_.findIndex(mappl10n.options.baseLayers,{name:i})>=0?i:mappl10n.options.baseLayers[0].name;for(var o=0;o<mappl10n.options.baseLayers.length;o++){var n=mappl10n.options.baseLayers[o],s=mappl10n.options.providers[n.provider];if(n.name==i){var a=e.extend({},s,n);L.tileLayer(a.url,a).addTo(this.map_)}}}else i=-1!=e.inArray(i,["roadmap","satellite","terrain","hybrid"])||"object"==t(mappl10n.options.styles[i])?i:"roadmap",this.map_.setMapTypeId(i)},setPois:function(t){if(this.resetPois(),t){for(var e=0;e<t.length;e++){var o=new i.Poi(t[e]);this.pois_.push(o),o.id=this.pois_.length-1,o.setMap(this),o.setZIndex(this.zindex+t.length-1-e)}this.zindex+=t.length-1}this.clustersSet()},setSize:function(t){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0];if(this.embed)return this.div.layout.css({height:"100%"}),void this.div.wrapper.css({"padding-bottom":0,height:"100%"});if(t&&t.hasOwnProperty("width")){var i=t.width?t.width:e.width;this.div.layout.css("width",i)}if(t&&t.hasOwnProperty("height")){var o=t.height?t.height:e.height;"string"==typeof o&&o.includes("%")?this.div.wrapper.css({"padding-bottom":o,height:"auto"}):this.div.wrapper.css({"padding-bottom":0,height:o})}this.resize()},setView:function(t,e,i){"leaflet"==mappl10n.options.engine?(null==e&&(e=this.map_.getZoom()?this.map_.getZoom():0),this.map_.setView(t,e,i)):(t=t&&!t.toJSON?{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}:t,e=e?parseInt(e):null,t&&this.map_.setCenter(t),e&&this.map_.setZoom(e))},sortPois:function(t){var e=Array();this.set({dirty:!0});for(var i=0;i<t.length;i++){var o=parseInt(t[i]);if(isNaN(o))return!1;e.push(this.pois_[o])}if(e.length!=this.pois_.length)return!1;this.pois_=e,this.renderList()},toggleLayer:function(t,i){var o=this;i=void 0!==i?i:null==this.layers_[t].getMap(),e.each(["traffic","bicycling","transit"],(function(t,e){o.layers_[e].setMap(null)})),i&&this.layers_[t].setMap(this.map_)},togglePoiListOpen:function(t){var e=this;this.div.layout.toggleClass("mapp-list-open",t),setTimeout((function(){return e.resize()}),100)},togglePois:function(t){t=!!t;for(var e=0;e<this.pois_.length;e++)this.pois_[e].setVisible(t)},toggleView:function(t,e){if("mini"==t){var i=this.div.layout.hasClass("mapp-view-mini"),o=!("inline"==this.layout||!this.poiList)&&this.div.layout.width()<mappl10n.options.mini;return this.div.layout.toggleClass("mapp-view-mini",o),void(o!=i&&this.togglePoiListOpen(!o))}e=void 0===e?!this.div.layout.hasClass("mapp-view-"+t):e,this.div.layout.toggleClass("mapp-view-"+t,e),"list"==t&&e&&this.renderList(),"menu"==t&&e&&this.renderMenu(),"directions"==t&&this.resize()},toJSON:function(){this.pois=[];for(var t=0;t<this.pois_.length;t++)this.pois.push(this.pois_[t].toJSON());return{center:this.center,height:this.height,mapid:this.mapid,mapTypeId:this.mapTypeId,metaKey:this.metaKey,pois:this.pois,postid:this.postid,title:this.title,width:this.width,zoom:this.zoom}},ajaxSave:function(t){var e=this;this.postid&&"0"!=this.postid||(this.postid=mappl10n.options.postid),i.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(this),nonce:mappl10n.options.nonce},callback:function(i){i&&"OK"==i.status&&(e.mapid||(e.mapid=i.data.mapid),t&&t())}})}},i.Map.ajaxGet=function(t,e){i.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){"OK"==t.status&&e(t.data)}})},i.Map.ajaxDelete=function(t,e){i.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&e&&e()}})}},397:()=>{var t,e=window.mapp||{};t=jQuery,e.Directions=function(e,i){this.sel=t(e),this.map=i;var o=this;this.sel.on("keydown",(function(t){13==t.which?(o.getDirections(),t.preventDefault()):27==t.which&&o.close()})),this.sel.on("click","[data-mapp-action]",(function(e){var i=t(this).attr("data-mapp-action"),n=t(".mapp-dir-daddr",o.sel).val(),s=t(".mapp-dir-saddr",o.sel).val();switch(e.preventDefault(),i){case"dir-cancel":o.close();break;case"dir-get":o.getDirections();break;case"dir-swap":t(".mapp-dir-saddr",o.sel).val(n),t(".mapp-dir-daddr",o.sel).val(s)}})),this.open=function(e,i){"google"!=mappl10n.options.directions?(this.map.toggleView("directions",!0),t(".mapp-dir-addr",this.sel).removeClass("mapp-error"),t(".mapp-dir-saddr",this.sel).val(e),t(".mapp-dir-daddr",this.sel).val(i)):this.openGoogle(e,i)},this.close=function(){this.map.toggleView("directions",!1)},this.getDirections=function(){var e=t(".mapp-dir-saddr",this.sel).val().trim(),i=t(".mapp-dir-daddr",this.sel).val().trim();this.map.poiClose(),this.openGoogle(e,i)},this.openGoogle=function(t,e){var i=mappl10n.options.directionsServer;-1==i.toLowerCase().indexOf("http")&&(i="https://"+i),i+="/maps/dir/?api=1&origin="+encodeURIComponent(t)+"&destination="+encodeURIComponent(e),window.open(i)}}},442:(t,e,i)=>{"use strict";i.r(e);var o,n=i(991),s=i(574),a=window.mapp||{};a.geocoders={},o=jQuery,a.geocoders.algolia=function(t){this.map=t},a.geocoders.algolia.prototype={getDetails:function(t,e){e({formatted_address:t.value,name:t.name,geometry:{location:t.latlng}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(t,e){var i="https://places-dsn.algolia.net/1/places/query?query="+encodeURIComponent(t)+"&hitsPerPage=5";i=mappl10n.options.country?i+"&countries="+mappl10n.options.country.toLowerCase():i,i=mappl10n.options.language?i+"&language="+mappl10n.options.language.toLowerCase():i+"&language=en",o.getJSON(i,(function(i){if(i&&i.hits&&i.hits.length>0){var o=i.hits.map((function(e,o){return(0,n.Z)({formatInputValue:s.Z,hit:e,hitIndex:o,query:t,rawAnswer:i})}));e(o)}else e(null)}))}},function(t){a.geocoders.google=function(e){this.map=e,this.token=null;var i=t('<div style="display:none">').appendTo("body");this.placesService=new google.maps.places.PlacesService(i.get(0)),this.autocompleteService=new google.maps.places.AutocompleteService,i.remove()},a.geocoders.google.prototype={getDetails:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken,this.token=null;var i={placeId:t.place_id,sessionToken:this.token};this.placesService.getDetails(i,(function(t,i){if("OK"==i&&t&&t.geometry){if(t.geometry.location&&(t.geometry.location=t.geometry.location.toJSON()),t.geometry.viewport){var o=t.geometry.viewport.toJSON();t.geometry.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}e(t)}else e(null)}))},getFirstPrediction:function(e,i){var o=this;this.getPredictions(e,(function(e){e&&t.isArray(e)?o.getDetails(e[0],(function(t){return i(t)})):i(null)}))},getPredictions:function(t,e){this.token=this.token?this.token:new google.maps.places.AutocompleteSessionToken;var i=this.map.getMap().getBounds();"leaflet"==mappl10n.options.engine&&(i=new google.maps.LatLngBounds(new google.maps.LatLng(i.getSouthWest().lat,i.getSouthWest().lng),new google.maps.LatLng(i.getNorthEast().lat,i.getNorthEast().lng)));var o={input:t,bounds:i=i||new google.maps.LatLngBounds(new google.maps.LatLng(85,-180),new google.maps.LatLng(-85,180)),sessionToken:this.token,types:this.map.editable?null:["geocode"]};this.autocompleteService.getPlacePredictions(o,(function(t,i){"OK"==i&&t&&t.length?(t=t.map((function(t){return t.value=t.description,t})),e(t)):(i==google.maps.places.PlacesServiceStatus.REQUEST_DENIED?alert("Google Maps API Key error: please enable the Places API in the Google Developer Console."):i==google.maps.places.PlacesServiceStatus.OVER_QUERY_LIMIT&&alert("Google Maps API Key has exceeded its query limit"),e(null))}))}}}(jQuery),function(t){a.geocoders.mapbox=function(t){this.map=t},a.geocoders.mapbox.prototype={getDetails:function(t,e){var i=t.bbox&&4==t.bbox.length?{sw:{lat:t.bbox[1],lng:t.bbox[0]},ne:{lat:t.bbox[3],lng:t.bbox[2]}}:null;e({formatted_address:t.place_name,name:t.name,geometry:{location:{lat:t.center[1],lng:t.center[0]},viewport:i}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://api.mapbox.com/geocoding/v5/mapbox.places/"+e+".json?access_token="+mappl10n.options.mapbox;o=mappl10n.options.country?o+"&country="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.features&&t.features.length>0?(t.features=t.features.map((function(t){return t.value=t.label=t.place_name,t})),i(t.features)):i(null)}))}}}(jQuery),function(t){a.geocoders.nominatim=function(t){this.map=t},a.geocoders.nominatim.prototype={getDetails:function(t,e){var i=t.display_name,o=i.indexOf(","),n=i.indexOf(",",o+1);o>0&&(i=parseInt(i.substr(0,o))?i.substr(0,n).replace(",",""):i.substr(0,o));var s=t.boundingbox&&4==t.boundingbox.length?{sw:{lat:t.boundingbox[0],lng:t.boundingbox[2]},ne:{lat:t.boundingbox[1],lng:t.boundingbox[3]}}:null;e({formatted_address:t.display_name,name:i,geometry:{location:{lat:t.lat,lng:t.lon},viewport:s}})},getFirstPrediction:function(t,e){var i=this;this.getPredictions(t,(function(t){t&&t.length?i.getDetails(t[0],(function(t){return e(t)})):e(null)}))},getPredictions:function(e,i){var o="https://nominatim.openstreetmap.org/search?format=json&dedupe=1&limit=5&q="+encodeURIComponent(e);o=mappl10n.options.country?o+"&countrycodes="+mappl10n.options.country.toLowerCase():o,o=mappl10n.options.language?o+"&accept-language="+mappl10n.options.language.toLowerCase():o,t.getJSON(o,(function(t){t&&t.length?(t=t.map((function(t){return t.value=t.display_name,t})),i(t)):i(null)}))}}}(jQuery)},282:()=>{var t=window.mapp||{};t.Icons={},t.Icons.get=function(t){var e="https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png";return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:e,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:e}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"},t.Icons.getSVG=function(t,e){if("leaflet"==mappl10n.options.engine)switch(t){case"circle":return L.divIcon({className:"leaflet-data-marker ",html:L.Util.template('<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" version="1.1" viewBox="-24 -24 48 48">\n\t\t\t\t\t\t <path d="M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0" stroke="{strokeColor}" stroke-width="{strokeWeight}" fill="{fillColor}" fill-opacity="{fillOpacity}"/>\n\t\t\t\t\t\t</svg>',{strokeColor:"white",strokeWeight:3,fillColor:"white",fillOpacity:.7}),iconAnchor:[25,40]})}else switch(t){case"circle":return{path:"M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0",scale:1,anchor:{x:.5,y:16},fillColor:"white",fillOpacity:.5,strokeColor:"white",strokeWeight:3};default:return null}}},689:()=>{var t,e=window.mapp||{};t=jQuery,e.Infobox=function(e,i){this.map=e,this.isOpen=!1,this.mapDiv="leaflet"==mappl10n.options.engine?e.getContainer():e.getDiv(),this.node=null,this.opts=_.extend({clip:!0,pan:!0},i),this.overlayView=null,"leaflet"!=mappl10n.options.engine&&(this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){},this.overlayView.setMap(this.map));var o='<div class="mapp-ib-wrapper" tabindex="0"><div class="mapp-ib" tabindex="0"></div><div class="mapp-ib-tip"></div>';this.node=this.opts.clip?t(o).appendTo(this.mapDiv):t(o).appendTo("body"),this.node.addClass(i.className)},e.Infobox.prototype={close:function(){this.isOpen=!1,this.node.removeClass("mapp-open")},getCanvasOffset:function(){if(this.opts.clip)return{x:0,y:0};var t=this.mapDiv.getBoundingClientRect();return t.x+=window.scrollX,t.y+=window.scrollY,{x:t.x,y:t.y}},getContent:function(){return t(".mapp-ib",this.node)},getOverlayXY:function(t){if("leaflet"==mappl10n.options.engine)return this.map.latLngToContainerPoint(t);var e=this.overlayView.getProjection();return e?e.fromLatLngToContainerPixel(t):null},open:function(e){var i=e.anchorPoint,o=this.getOverlayXY(e.position),n=t(this.mapDiv).width(),s=t(this.mapDiv).height(),a=this.getCanvasOffset();if(null!==o){"leaflet"==mappl10n.options.engine&&(i={x:e.anchorPoint[0],y:e.anchorPoint[1]-10}),this.node.addClass("mapp-open"),this.node.css({left:0,top:0});var l=this.node.outerWidth(),p=this.node.outerHeight();if(this.opts.pan){var r={x:o.x,y:o.y};o.x+l/2+i.x>n?r.x=Math.max(n-l/2-i.x,n/2-i.x):o.x-l/2+i.x<0&&(r.x=Math.min(l/2+i.x,n/2-i.x)),o.y+i.y-p<0&&(r.y=Math.min(p-i.y,p-i.y)),r.y>=s&&(r.y=s-1),"leaflet"==mappl10n.options.engine?this.map.panBy([o.x-r.x,o.y-r.y]):this.map.panBy(o.x-r.x,o.y-r.y),o=r}var h=o.y-p+i.y,c=o.x-l/2+i.x;this.opts.clip||(h+=a.y,c+=a.x);var u=this.opts.clip?n:document.body.clientWidth;c+l>u&&(c=u-l),c<0&&(c=0),this.node.css({left:c}),p=this.node.outerHeight(),h=o.y-p+i.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&h<0&&h<s-(o.y+p)&&(h=o.y,this.node.addClass("mapp-ib-flip")),this.node.css({top:h});var g=t(".mapp-ib-tip",this.node),d=parseInt(window.getComputedStyle(document.querySelector(".mapp-ib-tip"),":before").getPropertyValue("width")),m=o.x-c+a.x;m<d/2&&(m=d/2),g.css({left:m}),this.isOpen=!0}},setContent:function(e){t(".mapp-ib",this.node).empty().append(e)}}},628:()=>{var t,e=window.mapp||{};t=jQuery,e.lib={ajax:function(e){var i=this,o={callback:null,data:null,silent:!1,type:"GET",url:mappl10n.options.ajaxurl,success:function(t,o,n){"OK"!=t.status&&console.log(t.status),t.output?i.alert("AJAX Invalid Output\r\n"+t.output):e.callback&&e.callback(t,n)},error:function(t,o,n){"cancel"!=o&&(void 0!==n&&""!=n&&i.alert("AJAX ERROR\r\nTextStatus="+o+"\r\nError="+n+"\r\nResponseText="+t.responseText),e.callback&&e.callback(null))}};return e=t.extend(o,e),t.ajax(e)},alert:function(t){function e(_x){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){mappl10n.options.admin||mappl10n.options.debug?alert(t):window.console&&console.error(t)})),jqVersionCheck:function(e){if(void 0===t||void 0===e)return!1;e=e.split("."),v=t.fn.jquery.split(".");for(var i=0;i<e.length;i++){var o=parseInt(e[i]),n=void 0!==v[i]?parseInt(v[i]):0;if(n!=o)return n>o}return!0},log:function(t){window.console&&console.error(t)},scrollTo:function(t,e,i){if(t&&e&&t.length&&e.length){var o=t.height(),n=e.outerHeight(!0),s=t.scrollTop(),a=s+e.position().top,l=a+n;a=a-o/2-n/2,i&&(a-=i.outerHeight(!0)),(a<s||l>s+o)&&t.scrollTop(a)}},template:function(i,o){if(e.lib.templates=e.lib.templates?e.lib.templates:{},!e.lib.templates[i]){var n=mappl10n.options.templates?mappl10n.options.template[i]:t("#mapp-tmpl-"+i).html();if(!n)return"";e.lib.templates[i]=_.template(n.replace(/[\n\r\t]/g,""),null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g})}return e.lib.templates[i](o)}},e.lib.jqVersionCheck("1.7")||e.lib.alert("jQuery version is too old: "+t.fn.jquery),t("body").on("tabsactivate tabsshow",(function(e,i){var o=i.newPanel?i.newPanel:i.panel;o&&t(".mapp-layout",o).each((function(){var e=t(this).find(".mapp-canvas").attr("id"),i=window[e];i.resize(),i.recenter()}))})),jQuery,"leaflet"==mappl10n.options.engine&&(L.LatLng.prototype.toJSON=function(){return{lat:this.lat,lng:this.lng}},L.LatLngBounds.prototype.toJSON=function(){return{south:this.getSouth(),west:this.getWest(),north:this.getNorth(),east:this.getEast()}},L.LatLng.prototype.toUrlValue=function(){return Math.round(1e6*this.lat)/1e6+", "+Math.round(1e6*this.lng)/1e6}),e.event={addListener:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.on(e[o],i):google.maps.event.addListener(t,e[o],i)},addListenerOnce:function(t,e,i){e=e.split(" ");for(var o=0;o<e.length;o++)"leaflet"==mappl10n.options.engine?t.once(e[o],i):google.maps.event.addListenerOnce(t,e[o],i)},clearInstanceListeners:function(t){"leaflet"==mappl10n.options.engine?t.off():google.maps.event.clearInstanceListeners(t)},clearListeners:function(t,e){e=e.split(" ");for(var i=0;i<e.length;i++)"leaflet"==mappl10n.options.engine?t.off(e[i]):google.maps.event.clearListeners(t,e[i])},trigger:function(t,e,i){"leaflet"==mappl10n.options.engine?t.fire(e,i):google.maps.event.trigger(t,e,i)}}},692:()=>{jQuery,mapp.load=function(){if("undefined"!=typeof mapp&&mapp.data)for(;mapp.data.length;){var t=mapp.data.pop();window[t.name]=new mapp.Map(t),window[t.name].display()}},mapp.load()},510:()=>{var t,e=window.mapp||{};t=jQuery,e.Places=function(i,o){var n=this;this.sel=t(i),this.opts=t.extend({map:null},o);var s="";s="leaflet"!=mappl10n.options.engine?"google":mappl10n.options.geocoder?mappl10n.options.geocoder:"algolia",this.geocoder=new e.geocoders[s](this.opts.map),this.sel.on("keydown",(function(e){if(13==e.which){e.preventDefault();var i=n.parseLatLng(n.sel.val());i&&(t(n).triggerHandler("search.mapp",i),n.sel.autocomplete("close"),e.stopImmediatePropagation()),"http"==n.sel.val().substring(0,4)&&(t(n).triggerHandler("search.mapp",n.sel.val()),n.sel.autocomplete("close"),e.stopImmediatePropagation()),!1===mappl10n.options.autocomplete&&(n.sel.autocomplete("option","disabled",!1),n.sel.autocomplete("search"))}else!1===mappl10n.options.autocomplete&&n.sel.autocomplete("option","disabled",!0),n.sel.autocomplete("close")})),this.initAutocomplete()},e.Places.prototype={parse:function(t,e){var i="";if(t&&(i="string"==typeof(i=t&&t.name?t.name:t)?i.trim():i),i)if("user"!=i)if(t&&t.geometry)e(t);else{var o=this.parseLatLng(t);o?e(o):this.geocoder.getFirstPrediction(t,(function(t){e(t)}))}else this.geolocate((function(t){e(t)}));else e(null)},parseLatLng:function(t){var e;if(t.lat&&t.lng)e=t;else{var i=t&&t.name?t.name:t,o=(i="string"==typeof i?i.trim():i).split(",");if(2==o.length){var n=parseFloat(o[0]),s=parseFloat(o[1]);isNaN(n)||isNaN(s)||(e={lat:n,lng:s})}}return e?{name:e.lat+", "+e.lng,geometry:{location:e}}:null},geolocate:function(t){var e=this;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition((function(i){var o={lat:i.coords.latitude,lng:i.coords.longitude};t({name:o.lat+", "+o.lng,geometry:{location:o}}),e.sel.val("")}),(function(e){var i=e&&e.message?" : "+e.message:"";alert(mappl10n.no_geolocate+i),t(null)}),{timeout:15e3,enableHighAccuracy:!0,maximumAge:3e4}):alert(mappl10n.no_geolocate)},initAutocomplete:function(){var e=this;this.sel&&this.sel.length&&(this.sel.on("autocompleteselect",(function(i,o){e.geocoder.getDetails(o.item,(function(i){e.parse(i,(function(i){i&&t(e).triggerHandler("search.mapp",i)}))}))})),this.sel.autocomplete({appendTo:this.sel.parent(),autoFocus:!0,minLength:1,delay:"nominatim"===mappl10n.options.geocoder?500:300,disabled:!1===mappl10n.options.autocomplete,source:function(t,i){e.geocoder.getPredictions(t.term,(function(t){i(t)}))}}))}}},548:()=>{var t,e=window.mapp||{};t=jQuery,e.Poi=function(e){if(this.defaults={address:null,body:null,iconid:null,kml:null,map:null,overlay:null,postid:null,props:null,title:"",url:null,type:null,viewport:null},t.extend(this,this.defaults,e),e&&e.correctedAddress&&(this.address=e.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),e.viewport&&e.viewport.sw&&e.viewport.ne&&e.viewport.sw.lat){var i=e.viewport.sw,o=e.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(i.lat,i.lng),L.latLng(o.lat,o.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(i.lat,i.lng),new google.maps.LatLng(o.lat,o.lng))}var n=[],s=[];if(!e.overlay)switch(this.type){case"polygon":if(e.poly&&e.poly.paths)for(var a=0;a<e.poly.paths.length;a++){n=[];for(var l=0;l<e.poly.paths[a].length;l++)n.push(new google.maps.LatLng(e.poly.paths[a][l].lat,e.poly.paths[a][l].lng));s.push(new google.maps.MVCArray(n))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(s)}),this.setColors(e.poly);break;case"polyline":if(e.poly&&e.poly.path)for(a=0;a<e.poly.path.length;a++)n.push(new google.maps.LatLng(e.poly.path[a].lat,e.poly.path[a].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(n)}),this.setColors(e.poly);break;case"circle":var p=new google.maps.LatLng(e.point.lat,e.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(e.poly.radius)}),this.setColors(e.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(e.poly);break;case"kml":var r=e.kml&&e.kml.url?e.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(r):new google.maps.KmlLayer({url:r,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([e.point.lat,e.point.lng]):this.overlay=new google.maps.Marker({position:new google.maps.LatLng(e.point.lat,e.point.lng)})}e.type||this.set({iconid:e.iconid})},e.Poi.prototype={center:function(t){var e=this.getBounds();if("number"!=typeof t)if(e){var i=e.getNorthEast().toJSON().lng-e.getSouthWest().toJSON().lng;i<0&&(i+=360),t=Math.round(Math.log(360*this.map.div.canvas.width()/i/256)/Math.LN2),this.map.setView(this.getPosition(),t,{animate:!1})}else this.map.setView(this.getPosition(),parseInt(mappl10n.options.poiZoom));else this.map.setView(this.getPosition(),t)},getAddress:function(){return this.address?this.address:this.getPosition().toUrlValue()},getAnchorPoint:function(t){switch(this.isPoly()?"poly":this.type){case"kml":return"leaflet"==mappl10n.options.engine?[0,0]:t&&t.pixelOffset?new google.maps.Point(t.pixelOffset.width,t.pixelOffset.height):new google.maps.Point(0,0);case"poly":return"leaflet"==mappl10n.options.engine?[0,0]:new google.maps.Point(0,0);default:return"leaflet"==mappl10n.options.engine?this.overlay.options.icon.options.popupAnchor?this.overlay.options.icon.options.popupAnchor:[0,-32]:void 0!==this.overlay.anchorPoint?this.overlay.anchorPoint:new google.maps.Point(0,-32)}},getBounds:function(){var t;switch(this.type){case"polyline":t=new google.maps.LatLngBounds,this.overlay.getPath().forEach((function(e){t.extend(e)}));break;case"polygon":t=new google.maps.LatLngBounds,this.overlay.getPaths().forEach((function(e){e.forEach((function(e){t.extend(e)}))}));break;case"rectangle":case"circle":t=this.overlay.getBounds();break;case"kml":t=(t="leaflet"==mappl10n.options.engine?this.overlay.getBounds().isValid()?this.overlay.getBounds():null:this.overlay.getDefaultViewport())||this.viewport;break;default:return this.viewport}return t},getColors:function(){var t={};for(var e in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})void 0!==this.overlay[e]&&(t[e]=this.overlay[e]);return t},getPosition:function(t){if(!this.type)return"leaflet"==mappl10n.options.engine?this.overlay.getLatLng():this.overlay.getPosition();if("kml"==this.type&&t&&t.latLng)return t.latLng;var e=this.getBounds();return e?e.getCenter():"leaflet"==mappl10n.options.engine?new L.latLng(0,0):new google.maps.LatLng(0,0)},getTemplateColors:function(){var t=this.getColors();return"polyline"==this.type?{color:t.strokeColor,opacity:100*t.strokeOpacity,weight:t.strokeWeight}:{color:t.fillColor,opacity:100*t.fillOpacity,weight:t.strokeWeight}},open:function(t){this.map.poiOpen(this,t)},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},render:function(t,i){var o=_.extend(this,{icon:e.Icons.getUrl(this.iconid)});return i&&(o.body=i.description,o.title=i.name),e.lib.template(this.map.templates[t],{poi:o,colors:this.getTemplateColors()})},set:function(t){for(att in t){var i=t[att];switch(att){case"dirty":this.map.set({dirty:i});break;case"iconid":this.type||void 0===e.Icons||(this.iconid=i,this.overlay.setIcon(e.Icons.get(i)));break;default:this[att]=i}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty})},setColors:function(t){var e={};for(var i in{strokeColor:"",strokeOpacity:"",strokeWeight:"",fillColor:"",fillOpacity:""})t&&void 0!==t[i]&&(e[i]=t[i]);this.overlay.setOptions(e)},setEditable:function(t){var i=this;"kml"!=this.type&&("leaflet"==mappl10n.options.engine?this.overlay.options.draggable=t:this.overlay.setDraggable(t),this.isPoly()&&this.overlay.setEditable(t),e.event.clearListeners(this.overlay,"rightclick"),e.event.clearListeners(this.overlay,"dragstart"),t&&(e.event.addListener(this.overlay,"dragstart",(function(){i.viewport=null,i.map.poiClose()})),e.event.addListener(this.overlay,"dragend",(function(){i.map.set({dirty:!0})})),"polygon"!=this.type&&"polyline"!=this.type||"leaflet"!=mappl10n.options.engine&&(e.event.addListener(this.overlay,"rightclick",(function(t){null!=t.vertex&&i.overlay.getPath().getLength()>2&&i.overlay.getPath().removeAt(t.vertex)})),e.event.clearListeners(this.overlay.getPath(),"insert_at remove_at set_at"),e.event.addListener(this.overlay.getPath(),"insert_at remove_at set_at",(function(){i.map.set({dirty:!0})})))))},setMap:function(t){var i=this;this.map=t,e.event.clearInstanceListeners(this.overlay),null!=t?("kml"==this.type&&("leaflet"==mappl10n.options.engine?(e.event.addListenerOnce(this.overlay,"ready",(function(){i.viewport=i.overlay.getBounds()})),e.event.addListenerOnce(this.overlay,"error",(function(){alert(mappl10n.kml_error)}))):(e.event.addListener(this.overlay,"defaultviewport_changed",(function(){i.viewport=i.overlay.getDefaultViewport()})),e.event.addListener(this.overlay,"status_changed",(function(){var t=i.overlay.getStatus();"OK"!=t&&alert(mappl10n.kml_error+":"+t)})))),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),mappl10n.options.tooltips&&!this.map.editable&&(e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiOpenTooltip(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiCloseTooltip()}))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap()))):"leaflet"==mappl10n.options.engine?this.overlay.remove():this.overlay.setMap(null)},setTemplateColors:function(t,e,i){var o="polyline"==this.type?{strokeColor:t,strokeOpacity:e/100,strokeWeight:i}:{fillColor:t,fillOpacity:e/100,strokeColor:t,strokeWeight:i,strokeOpacity:1};this.setColors(o)},setVisible:function(t){void 0!==this.overlay.setVisible&&this.overlay.setVisible(t)},setZIndex:function(t){"leaflet"==mappl10n.options.engine?this.type||this.overlay.setZIndexOffset(t):this.overlay.set("zIndex",t)},toJSON:function(){var t={address:this.address,body:this.body,iconid:this.iconid,point:null,poly:null,title:this.title,type:this.type,viewport:null},e=this.getPosition();t.point=e.toJSON();var i=this.viewport?this.viewport:this.getBounds();if(i){var o=i.toJSON();t.viewport={sw:{lat:o.south,lng:o.west},ne:{lat:o.north,lng:o.east}}}if("kml"==this.type&&(t.kml=this.kml),this.isPoly())switch(t.poly=this.getColors(),this.type){case"circle":t.poly.radius=this.overlay.getRadius();break;case"polyline":t.poly.path=[],this.overlay.getPath().forEach((function(e){t.poly.path.push(e.toJSON())}));break;case"polygon":t.poly.paths=[],this.overlay.getPaths().forEach((function(e){var i=[];e.forEach((function(t){i.push(t.toJSON())})),t.poly.paths.push(i)}));break;case"rectangle":var n=this.overlay.getBounds();t.viewport={sw:n.getSouthWest().toJSON(),ne:n.getNorthEast().toJSON()}}return t}}},675:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0;e<t.length;e++){var i=t[e].match(/country\/(.*)?/);if(i)return i[1]}return}},892:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e={country:"country",city:"city","amenity/bus_station":"busStop","amenity/townhall":"townhall","railway/station":"trainStation","aeroway/aerodrome":"airport","aeroway/terminal":"airport","aeroway/gate":"airport"};for(var i in e)if(-1!==t.indexOf(i))return e[i];return"address"}},991:(t,e,i)=>{"use strict";e.Z=function(t){var e=t.formatInputValue,i=t.hit,s=t.hitIndex,a=t.query,p=t.rawAnswer;try{var h=i.locale_names[0],c=i.country,u=i.administrative&&i.administrative[0]!==h?i.administrative[0]:void 0,g=i.city&&i.city[0]!==h?i.city[0]:void 0,d=i.suburb&&i.suburb[0]!==h?i.suburb[0]:void 0,m=i.county&&i.county[0]!==h?i.county[0]:void 0,f=i.postcode&&i.postcode.length?function(t,e){for(var i=e[0].value,o=[],n=1;n<e.length;++n)"none"!==e[n].matchLevel&&o.push({index:n,words:e[n].matchedWords});if(0===o.length)return{postcode:t[0],highlightedPostcode:i};return o.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),{postcode:t[o[0].index],highlightedPostcode:e[o[0].index].value}}(i.postcode,i._highlightResult.postcode):{postcode:void 0,highlightedPostcode:void 0},y=f.postcode,v=f.highlightedPostcode,w={name:r(i._highlightResult.locale_names),city:g?r(i._highlightResult.city):void 0,administrative:u?r(i._highlightResult.administrative):void 0,country:c?i._highlightResult.country.value:void 0,suburb:d?r(i._highlightResult.suburb):void 0,county:m?r(i._highlightResult.county):void 0,postcode:v},b={name:h,administrative:u,county:m,city:g,suburb:d,country:c,countryCode:(0,o.default)(i._tags),type:(0,n.default)(i._tags),latlng:{lat:i._geoloc.lat,lng:i._geoloc.lng},postcode:y,postcodes:i.postcode&&i.postcode.length?i.postcode:void 0},L=e(b);return l(l({},b),{},{highlight:w,hit:i,hitIndex:s,query:a,rawAnswer:p,value:L})}catch(t){return console.error("Could not parse object",i),console.error(t),{value:"Could not parse object"}}};var o=s(i(675)),n=s(i(892));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){p(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function p(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t){for(var e=t[0].value,i=[],o=1;o<t.length;++o)"none"!==t[o].matchLevel&&i.push({index:o,words:t[o].matchedWords});return 0===i.length?e:(i.sort((function(t,e){return t.words>e.words?-1:t.words<e.words?1:t.index-e.index})),0===i[0].index?"".concat(e," (").concat(t[i[1].index].value,")"):"".concat(t[i[0].index].value," (").concat(e,")"))}},574:(t,e)=>{"use strict";e.Z=function(t){var e=t.administrative,i=t.city,o=t.country,n=t.name,s=t.type;return"".concat(n).concat("country"!==s&&void 0!==o?",":"","\n ").concat(i?"".concat(i,","):"","\n ").concat(e?"".concat(e,","):"","\n ").concat(o||"").replace(/\s*\n\s*/g," ").trim()}}},e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={exports:{}};return t[o](n,n.exports,i),n.exports}i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(628),i(854),i(397),i(442),i(282),i(689),i(510),i(548),i(692)})();
build/index_mappress_admin.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t={215:(t,e,n)=>{"use strict";n.r(e);n(278);var i,o=window.mapp||{};i=jQuery,o.Editor=function(t){this.drawingManager=null,this.map=t,this.poiEditor=null;var e=this;this.initialize=function(){this.map.display(),this.poiEditor=new o.PoiEditor(this.map),this.initDrawingManager(),i(this.map.places).off("search.mapp"),i(this.map.places).on("search.mapp",(function(t,n){e.insert(n)}))},this.insert=function(t){if(t)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),t.geometry){var e=t.formatted_address?t.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,n=t.name==e?"":e,i=new o.Poi({address:e,body:n,iconid:this.poiEditor.lastIcon,point:t.geometry.location,title:t.name,viewport:t.geometry.viewport?t.geometry.viewport:null});this.map.poiInsert(i),i.center()}else t.overlay?(i=new o.Poi({body:"",iconid:"marker"==t.type?null:"poly",overlay:t.overlay,title:"marker"==t.type?t.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:"marker"==t.type?null:t.type}),this.map.poiInsert(i)):"string"==typeof t&&t.substring(0,4)},this.initDrawingManager=function(){},this.initialize.apply(this)},o.PoiEditor=function(t){this.map=t,this.poi=null,this.sel=null,this.lastIcon=null;var e=this;this.initialize=function(){this.sel=i(this.map.iw.getContent()),i(this.map).on("mapp.open",(function(t,n){e.render(n)})),i(this.map).on("mapp.close",(function(){e.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(t){t.preventDefault();var n=i(this).attr("data-mapp-poi");e[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(t){var n=i(this).hasClass("mapp-poi-visual");e.mce(n)})),this.sel.on("keydown",(function(t){13==t.which&&"mapp-poi-body"!=t.target.id&&(t.preventDefault(),e.save())})),this.sel.on("change","[data-mapp-iconpicker]",(function(){e.poi.set({dirty:!0,iconid:i("[data-mapp-iconpicker]").attr("data-mapp-iconid")}),e.lastIcon=e.poi.iconid,e.map.renderList()})),this.sel.on("change","[data-mapp-colorpicker]",(function(){e.poi.setTemplateColors(i("[data-mapp-colorpicker]").attr("data-mapp-color"),i("[data-mapp-colorpicker]").attr("data-mapp-opacity"),i("[data-mapp-colorpicker]").attr("data-mapp-weight")),e.map.renderList()}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var t="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var e=window.tinyMCEPreInit.mceInit.content;t=void 0!==e.language?e.language:"en"}var n={mode:"none",height:"100%",convert_urls:!1,language:t,menubar:!1,plugins:"wordpress,paste,wplink,textcolor,image",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(n),this.mce(!0)}},this.mce=function(t){var n=t?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!1,"mapp-poi-body"),i(".mapp-poi-visual, .mapp-poi-html",e.sel).removeClass("mapp-active"),t?i(".mapp-poi-visual",e.sel).addClass("mapp-active"):i(".mapp-poi-html",e.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(t){this.poi=t,i("[data-mapp-iconpicker]").trigger("refresh"),i("[data-mapp-colorpicker]").trigger("refresh"),this.initMCE()},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:i(".mapp-poi-title").val(),body:i(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},999:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect),m=(c.useLayoutEffect,c.useRef),d=c.useState,f=wp.components,h=f.Button,g=f.Modal,b=(f.Popover,f.Spinner,f.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(d({isFetchingMap:!!t.mapid,isSavingMap:!1,map:null}),2),n=e[0],i=e[1],a=m(null);function p(t){i((function(e){return o(o({},e),t)}))}function c(e,i){switch(e){case"change-title":n.map.set({dirty:!0,title:i}),p({map:n.map});break;case"close":t.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(s.store.destroyMap({mapid:t.mapid}),t.onAction("edit-destroy"));break;case"save":s.store.saveMap({mapdata:n.map.toJSON(),success:function(e){n.map.set({dirty:!1}),t.onAction("edit-save",e.mapid)}})}}return u((function(){var e=function(e){p({mapdata:e.maps[t.mapid],isFetchingMap:e.isFetchingMap,isSavingMap:e.isSavingMap})};return s.store.subscribe(e),function(){return s.store.unsubscribe(e)}})),u((function(){t.mapid&&s.store.fetchMap({mapid:t.mapid})}),[]),u((function(){n.isFetchingMap||function(t){var e=new s.Map(t,{center:null,editable:!0,embed:!0,iwType:"ib",layout:"left",mapOpts:{streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(a.current),zoom:null});new s.Editor(e);p({map:e})}(n.mapdata)}),[n.mapdata]),l(g,{className:"mapp-edit-modal",focusOnMount:!0,isDismissible:!1,title:function(){if(n.map&&!n.isFetchingMap){var t=n.map.title?n.map.title:"";return l(b,{className:"mapp-edit-title",placeholder:__("Untitled"),value:t,onChange:function(t){return c("change-title",t)}})}}(),shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,onRequestClose:function(){c("close")}},l("div",{className:"mapp-edit",ref:a,onKeyDown:function(t){return t.stopPropagation()},tabIndex:-1}),l("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(t){return t.stopPropagation()}},l(h,{isPrimary:!0,isBusy:n.isSavingMap,onClick:function(){return c("save")}},__("Save")),l(h,{disabled:n.isSavingMap,onClick:function(){return c("close")}},__("Cancel")),l(h,{disabled:!t.mapid||n.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return c("destroy")}},__("Delete"))))}},938:(t,e,n)=>{"use strict";n.r(e);var i=n(453),o=n(999);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}window.mapp;var c=wp.element.createElement,u=wp.element,m=u.Fragment,d=u.render,f=u.useEffect,h=(u.useLayoutEffect,u.useRef,u.useState),g=wp.components,b=g.Button,__=(g.Modal,function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")});document.getElementById("mapp-library")&&(mappl10n.options.postid=0,d(c((function(t){var e=s(h({mode:"list",mapid:null,scrollTop:null}),2),n=e[0],a=e[1];function p(t){a((function(e){return r(r({},e),t)}))}function l(t,e){switch(t){case"add-new":p({mode:"edit",mapid:null});break;case"edit-close":p({mode:"list"});break;case"edit-destroy":p({mode:"list",mapid:null});break;case"edit-save":p({mode:"list"});break;case"list-select":p({mode:"edit",mapid:e,scrollTop:jQuery(".mapp-pick-items").scrollTop()})}}return f((function(){}),[]),c(m,null,c("div",{className:"wrap"},c("div",null,c("h1",null,__("Map Library")),c(b,{className:"button button-default",onClick:function(){return l("add-new")}},__("Add New"))),c("div",{className:"mapp-library-wrapper"},c(i.default,{context:"library",mapid:n.mapid,onAction:l,scrollTop:n.scrollTop}))),"edit"==n.mode&&c(o.default,{context:"library",mapid:n.mapid,onAction:l}))}),null),document.getElementById("mapp-library")))},816:(t,e,n)=>{"use strict";n.r(e);var i=n(429),o=n(218),a=n(453),r=n(999);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var m=window.mapp||{},d=wp.element.createElement,f=wp.element,h=f.Fragment,g=f.useEffect,b=(f.useLayoutEffect,f.useRef),y=f.useState,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e=wp.components,n=(e.BaseControl,e.Button),p=(e.ButtonGroup,e.CheckboxControl,e.Dropdown,e.Modal,e.Panel,e.PanelBody),l=(e.PanelRow,e.Placeholder),u=(e.RadioControl,e.SelectControl,e.TextControl,e.ToggleControl,e.Toolbar),f=e.ToolbarButton,v=(e.ToolbarGroup,wp.blockEditor),w=v.BlockControls,O=v.InspectorControls,k=c(y({editMapid:null,isListOpen:!1,isEditorOpen:!1,map:null,mapdata:null}),2),j=k[0],C=k[1],S=b(null);function P(t){C((function(e){return s(s({},e),t)}))}function E(e,n){switch(e){case"add":P({isEditorOpen:!0,editMapid:null});break;case"change-settings":t.setAttributes(n);break;case"edit":P({isEditorOpen:!0,editMapid:t.attributes.mapid});break;case"edit-close":P({isEditorOpen:!1,editMapid:null});break;case"edit-destroy":case"list-destroy":t.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),P({isEditorOpen:!1,isListOpen:!1});break;case"edit-save":P({isEditorOpen:!1,editMapid:null}),t.setAttributes({mapid:n});break;case"list-close":P({isListOpen:!1});break;case"list-select":n!=t.attributes.mapid&&t.setAttributes({center:void 0,mapid:n,zoom:void 0}),E("list-close");break;case"open-list":P({isListOpen:!0})}}function M(){var e=void 0!==e?e:u,n=mappl10n.options.block?null:d(f,{icon:"portfolio",label:__("Map Library"),onClick:function(){return E("open-list")}});return d(w,null,d(e,null,d(f,{icon:"insert",label:__("New map"),onClick:function(){return E("add")}}),t.attributes.mapid&&d(f,{icon:"edit",label:__("Edit map"),onClick:function(){return E("edit")}}),n))}function _(){if(j.isEditorOpen)return d(r.default,{mapid:j.editMapid,onAction:E})}function x(){if(j.isListOpen)return d(a.default,{mapid:t.attributes.mapid,onAction:E})}return g((function(){var e=function(e){var n=e.maps[t.attributes.mapid];n&&P({mapdata:n})};return m.store.subscribe(e),function(){return m.store.unsubscribe(e)}})),g((function(){t.attributes.mapid&&m.store.fetchMap({mapid:t.attributes.mapid,failure:function(){return P({mapdata:void 0})}})}),[t.attributes.mapid]),g((function(){var e;t.attributes.mapid&&S.current&&j.mapdata&&((e=new m.Map(j.mapdata,{center:t.attributes.center,height:t.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:t.attributes.poiList,sel:jQuery(S.current),width:t.attributes.width,zoom:t.attributes.zoom})).display(),P({map:e}))}),[j.mapdata]),t.attributes.preview?d("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):t.attributes.mapid&&void 0!==j.mapdata?d(h,null,M(),function(){if(!j.map)return null;var e,a;mappl10n.options.block&&(a=d("div",null,d("p",null,__("Like the block? Upgrade to the free plugin or MapPress Pro for more features!")),d("div",null,d(n,{isPrimary:!0,target:"_blank",href:"https://mappresspro.com"},__("MapPress Pro")),d(n,{isSecondary:!0,href:"https://wordpress.org/plugins/mappress-google-maps-for-wordpress"},__("Free plugin")))),e=d(p,{title:__("MapPress options"),initialOpen:!1},d(o.MappOptions,{onAction:E})));var r=t.attributes,s=r.center,l=r.height,c=r.poiList,u=r.width,m=r.zoom;return d(O,null,d("div",{className:"mapp-gt-inspector"},d(p,{title:__("Map settings")},d(i.MappSettings,{map:j.map,context:"map",onAction:E,center:s,height:l,poiList:c,width:u,zoom:m}),a),e))}(),d("div",{className:"mapp-gt",ref:S}),x(),_()):d(h,null,d(h,null,M(),d(l,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Create a new map or choose one from the map library.")},d(n,{icon:"insert",isSecondary:!0,onClick:function(){return E("add")}},__("New map")),!mappl10n.options.block&&d(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return E("open-list")}},__("Map Library")))),x(),_())}wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:"mappress",attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["left","center","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:function(t){return t.named.center}},height:{type:"string",shortcode:function(t){return t.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(t){return"true"==t.named.initialOpenDirections||"true"==t.named.initialopendirections}},mapid:{type:"string",shortcode:function(t){return t.named.mapid}},poiList:{type:"boolean",shortcode:function(t){return"true"==t.named.poiList||"true"==t.named.poilist}},width:{type:"string",shortcode:function(t){return t.named.width}},zoom:{type:"number",shortcode:function(t){return parseInt(t.named.zoom)?parseInt(t.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(t){var e=t.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(e)},transform:function(t){var e=t.text;return wp.blocks.rawHandler({HTML:"<p>"+e+"</p>",mode:"BLOCKS"})}}]},edit:function(t){return d(v,t)},save:function(t){return t},example:{attributes:{preview:!0}}})},378:(t,e,n)=>{"use strict";n.r(e);n(429),n(138),n(308);window.mapp,wp.element.createElement;var i=wp.element,o=(i.Fragment,i.useEffect,i.useLayoutEffect,i.useRef,i.useState,wp.components);o.BaseControl,o.Button,o.ButtonGroup,o.Card,o.CardBody,o.CardFooter,o.CardHeader,o.CheckboxControl,o.ExternalLink,o.HorizontalRule,o.Panel,o.PanelBody,o.PanelRow,o.Placeholder,o.RadioControl,o.SelectControl,o.TabPanel,o.TextControl,o.TextareaControl,o.ToggleControl,o.Toolbar,wp.data.useSelect},218:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappOptions:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect,c.useLayoutEffect,c.useRef,c.useState),m=wp.components,d=m.BaseControl,f=m.Button,h=m.ButtonGroup,g=(m.Dashicon,m.Dropdown,m.ExternalLink,m.Panel,m.PanelBody,m.PanelRow),b=(m.RadioControl,m.SelectControl,m.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(u({apiKey:mappl10n.options.apiKey,engine:mappl10n.options.engine}),2),n=e[0],i=e[1];function a(t){i((function(e){return o(o({},e),t)}))}function p(t,e){switch(t){case"apikey":a({apiKey:e});break;case"engine":a({engine:e});break;case"save":s.lib.ajax({type:"POST",data:{action:"mapp_options_save",apiKey:n.apiKey,engine:n.engine,nonce:mappl10n.options.nonce},callback:function(t){wp.data.dispatch("core/notices").createNotice("success",__("Options saved."),{type:"snackbar",isDismissible:!0,actions:[{url:window.location,label:"Refresh page"}]})}})}}return l("div",{className:"mapp-options"},null,l(g,null,l(d,{label:__("Mapping Engine")}),l(d,null,l(h,null,l(f,{onClick:function(){return p("engine","leaflet")},isPressed:"google"!=n.engine,isSmall:!0},__("Leaflet")),l(f,{onClick:function(){return p("engine","google")},isPressed:"google"==n.engine,isSmall:!0},__("Google"))))),"google"!=n.engine?null:l(b,{className:"mapp-settings-apikey",label:l("a",{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"},__("Google API key")),onChange:function(t){return p("apikey",t)},value:n.apiKey}),l(f,{onClick:function(){return p("save")},isPrimary:!0},__("Save options")))}},453:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>k});var s=window.mapp||{},l=wp.element.createElement,c=wp.data.select,u=wp.element,m=u.Fragment,d=u.useEffect,f=(u.useLayoutEffect,u.useRef),h=u.useState,g=wp.components,b=(g.BaseControl,g.Button),y=(g.Dashicon,g.Modal),v=(g.PanelBody,g.RadioControl),w=g.Spinner,O=g.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function k(t){var e=r(h({isFetchingItems:!0,items:null,search:"",type:"all"}),2),n=e[0],i=e[1],a=f(null),p=f(null);function u(t){i((function(e){return o(o({},e),t)}))}function g(t){if("post"==n.type&&t.postid!=mappl10n.options.postid)return!1;var e=n.search.toLowerCase();return!e||(t.mapid.indexOf(e)>=0||(!!(t.post_title&&t.post_title.toLowerCase().indexOf(e)>=0)||!!(t.map_title&&t.map_title.toLowerCase().indexOf(e)>=0)))}function k(e,n){switch(e){case"close":t.onAction("list-close");break;case"duplicate":s.store.duplicateMap({mapid:n,success:function(e){wp.data.dispatch("core/notices").createNotice("success",__("Map copied"),{type:"snackbar",isDismissible:!0}),t.onAction("list-select",e.mapid)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(s.store.destroyMap({mapid:n}),n==t.mapid&&t.onAction("list-destroy",n)),a.current.focus();break;case"select":t.onAction("list-select",n);break;case"shortcode":var i=jQuery("<input>");jQuery("body").append(i),i.val('[mappress mapid="'+n+'"]').select(),document.execCommand("copy"),i.remove(),alert(__("Shortcode copied"))}}function j(){var e="library"==t.context?null:l(v,{className:"mapp-pick-type",options:[{label:__("All maps"),value:"all"},{label:__("Attached to this post"),value:"post"}],onChange:function(t){return u({type:t})},selected:n.type});return l("div",{className:"mapp-pick-filter"},n.isFetchingItems&&l(w,null),l(O,{ref:a,className:"mapp-pick-search",tabIndex:1,label:__("Search"),placeholder:__("post title, map title, or map id"),onChange:function(t){return u({search:t})}}),e)}function C(){var t=_.filter(n.items,g);return n.isFetchingItems?null:t.length?l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-header"},l("div",{className:"mapp-pick-col-map-title"},__("Map title")),l("div",{className:"mapp-pick-col-mapid"},__("Map ID")),l("div",{className:"mapp-pick-col-post-title"},__("Attached to")),l("div",{className:"mapp-pick-col-actions"},__("Action"))),_.map(t,S)):void l("div",{className:"mapp-pick-items"},l("div",{className:"mapp-pick-message"},__("No maps found")))}function S(e){var i,o,a,r=e.mapid==t.mapid;o=e.postid==mappl10n.options.postid?c("core/editor").getEditedPostAttribute("title"):e.post_title,i=e.map_title?e.map_title:__("Untitled"),o=o||__("Untitled"),e.postid>0&&e.postid==mappl10n.options.postid&&"all"==n.type&&(o+=" ("+__("current post")+")"),a=e.postid>0?e.postid==mappl10n.options.postid?o:l("a",{onClick:function(t){return t.stopPropagation()},href:mappl10n.options.editurl+"?post="+e.postid+"&action=edit",target:"_blank",title:__("Edit post")},o):__("Unattached");var s=l("div",{className:"mapp-pick-col-actions"},l(b,{onClick:function(t){t.stopPropagation(),k("duplicate",e.mapid)},title:__("Copy"),icon:"admin-page"}),"library"==t.context&&l(b,{onClick:function(t){t.stopPropagation(),k("shortcode",e.mapid)},title:__("Shortcode"),icon:"shortcode"}),l(b,{onClick:function(t){t.stopPropagation(),k("destroy",e.mapid)},title:__("Delete map"),icon:"trash"}));"library"==t.context&&e.mapid;return l("div",{className:"mapp-pick-item"+(r?" mapp-selected":""),ref:r?p:null,key:e.mapid+"|"+e.postid,onClick:function(){return k("select",e.mapid)}},l("div",{className:"mapp-pick-col-map-title"},i),l("div",{className:"mapp-pick-col-mapid"},e.mapid),l("div",{className:"mapp-pick-col-post-title"},a),s)}return d((function(){var t=function(t){u({isFetchingItems:t.isFetchingItems,items:t.items})};return s.store.subscribe(t),function(){return s.store.unsubscribe(t)}})),d((function(){a.current&&a.current.focus(),s.store.fetchItems({})}),[]),d((function(){n.items&&p.current&&s.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(p.current))}),[n.items]),"library"==t.context?l(m,null,j(),C()):l(y,{className:"mapp-pick-modal",title:__("Select a map"),onRequestClose:function(){return k("close")}},j(),C())}},429:(t,e,n)=>{"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappSettings:()=>g});window.mapp;var a=wp.element.createElement,r=wp.element,p=r.Fragment,s=(r.useEffect,r.useLayoutEffect,r.useRef,r.useState),l=wp.components,c=l.BaseControl,u=l.Button,m=l.ButtonGroup,d=(l.Dashicon,l.Dropdown,l.ExternalLink,l.Panel,l.PanelBody,l.PanelRow),f=(l.RadioControl,l.SelectControl),h=l.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function g(t){var e,n=i(s({}),2);n[0],n[1];function o(t){if(!t||"string"!=typeof t)return t;var e={px:2048,vw:100,vh:100,"%":100},n=parseInt(t),i=2048,o="";for(var a in e)t.includes(a)&&(o=a,i=e[a]);return n>i?i+o:t}function r(e,n){var i=null;switch(e){case"poiList":t.map.set({poiList:n}),i={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=o(n.height)),n.hasOwnProperty("width")&&(n.width=o(n.width)),t.map.setSize(n),i=n;break;case"viewport-reset":t.map.center=t.map.zoom=null,t.map.recenter(),i={center:void 0,zoom:void 0};break;case"viewport-save":var a=t.map.getCenter().toJSON();i={center:a.lat+","+a.lng,zoom:t.map.getZoom()},wp.data.dispatch("core/notices").createNotice("success",__("Viewport saved"),{type:"snackbar",isDismissible:!0})}i&&t.onAction("change-settings",i)}return a("div",{className:"mapp-settings"},null,"mashup"!=t.context&&(e=t.map.title?t.map.title:__("Untitled"),a(d,null,a(c,{className:"mapp-settings-title"},e),a(c,{className:"mapp-settings-id",label:__("Map ID")},t.map.mapid))),function(){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(t,e){return{label:t.width+"x"+t.height,height:t.height,width:t.width,value:e+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var i="custom",o=0;o<n.length-1;o++)n[o].width==t.width&&n[o].height==t.height&&(i=o);return a(p,null,a(f,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:i,options:n,onChange:function(t){return r("size",{width:n[t].width,height:n[t].height})}}),a(d,null,a(h,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(t){return r("size",{width:t})},placeholder:e.width,value:t.width}),a(h,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(t){return r("size",{height:t})},placeholder:e.height,value:t.height})))}(),(t.center&&(t.center.lat,t.center.lng,__("Zoom"),t.zoom),a(d,null,a(c,{label:__("Center/Zoom")}),a(c,null,a(m,null,a(u,{onClick:function(){return r("viewport-reset")},isPressed:!t.center,isSmall:!0},__("Automatic")),a(u,{onClick:function(){return r("viewport-save")},isPressed:t.center,isSmall:!0},__("Save")))))))}},787:()=>{function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var a=window.mapp||{};a.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,maps:{},items:[]}},a.Store.prototype={createMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,o=t.failure,r=void 0===o?function(){}:o,p=this;a.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(delete p.state.maps[e],p.destroyItem(e),i(e)):r(),p.publish()}})},duplicateMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,o=t.failure,r=void 0===o?function(){}:o,p=this;this.state.isSavingMap=!0,this.publish(),a.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:e,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},fetchMap:function(t){var e=t.mapid,n=t.success,i=void 0===n?function(){}:n,o=t.failure,r=void 0===o?function(){}:o,p=this;if(void 0!==this.state.maps[e])return p.publish(),void i(this.state.maps[e]);this.state.isFetchingMap=!0,p.publish(),a.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(p.state.maps[e]=t.data,i(t.data)):r(),p.state.isFetchingMap=!1,p.publish()}})},saveMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapdata,n=t.success,i=void 0===n?function(){}:n,o=t.failure,r=void 0===o?function(){}:o,p=this;this.state.isSavingMap=!0,this.publish(),a.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(e),nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},destroyItem:function(t){var e=this.state.items?this.state.items:[],i=_.findIndex(e,{mapid:t});i>-1&&e.splice(i,1),this.state.items=n(e),this.publish()},fetchItems:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e,i=t.failure,o=void 0===i?function(){}:i,r=this;if(this.state.itemsFetched)return n(this.state.items),void r.publish();this.state.isFetchingItems=!0,r.publish(),a.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(r.state.items=t.data,r.sortItems(),n(r.state.items),r.state.itemsFetched=!0):o(),r.state.isFetchingItems=!1,r.sortItems(),r.publish()}})},saveItem:function(n){var i=this.state.items?this.state.items:[],o=_.findWhere(i,{mapid:n.mapid});o?(o.map_title=n.title,o=function(n){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(o,t))}))}return n}({},o)):(o={mapid:n.mapid,map_title:n.title,postid:mappl10n.options.postid,post_title:null},i.unshift(o))},sortItems:function(){var t,e=(t="Untitled",wp.i18n.__(t,"mappress-google-maps-for-wordpress"));this.state.items=_.sortBy(this.state.items,(function(t){return parseInt(t.mapid)})),this.state.items=_.sortBy(this.state.items,(function(t){return t.map_title?t.map_title:e}))},subscribe:function(t){this.subs.add(t)},unsubscribe:function(t){this.subs.delete(t)},publish:function(){var t,e=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(_e){throw _e},f:a}}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 r,p=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return p=t.done,t},e:function(t){s=!0,r=t},f:function(){try{p||null==n.return||n.return()}finally{if(s)throw r}}}}(n(this.subs));try{for(e.s();!(t=e.n()).done;){(0,t.value)(this.state)}}catch(t){e.e(t)}finally{e.f()}}},a.store=new a.Store},138:(t,e,n)=>{"use strict";function i(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var o,a=t[Symbol.iterator]();!(_n=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==a.return||a.return()}finally{if(i)throw _e}}return n}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappMultiSelect:()=>v});var c=wp.element.createElement,u=wp.element,m=(u.Fragment,u.useEffect),d=(u.useLayoutEffect,u.useRef),f=u.useState,h=wp.components,g=h.BaseControl,b=(h.Button,h.CheckboxControl),y=(h.Panel,h.PanelBody,h.PanelRow,h.Spinner,h.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e,n=d(null),o=d(null),r=p(f({isOpen:!1,filter:"",filteredOptions:[]}),2),s=r[0],l=r[1];function u(t){l((function(e){return a(a({},e),t)}))}function h(e){var n=_.findWhere(t.options,{value:e});return n?n.label:e}function v(){var e;return t.values instanceof Array?e=i(t.values):t.values&&(e=[t.values]),e||[]}function w(e,n){var i=v(),o=i.indexOf(e);(n=void 0!==n?n:-1==o)?i.push(e):i.splice(o,1),t.onChange(i)}function O(){return s.isOpen?c("div",{className:"mapp-select-dropdown-wrapper"},c("div",{className:"mapp-select-dropdown"},!s.isOpen||!t.options||t.options.length<10?null:c("div",{className:"mapp-select-filter",ref:o},c(y,{autocomplete:"off",placeholder:__("Search"),value:s.filter,onChange:function(t){return u({filter:t})}})),c("div",{className:"mapp-select-dropdown-list"},(e=v(),0==s.filteredOptions.length?c("div",{className:"mapp-select-dropdown-item"},__("No results")):s.filteredOptions.map((function(t){return c(b,{className:"mapp-select-dropdown-item",checked:e.includes(t.value),onChange:function(e){return w(t.value,e)},label:t.label})})))))):null;var e}return m((function(){if(t.options)if(s.filter){var e=s.filter.toUpperCase();u({filteredOptions:t.options.filter((function(t){return 0==t.label.toUpperCase().indexOf(e)}))})}else u({filteredOptions:t.options})}),[t.options,s.filter]),m((function(){s.isOpen&&o.current&&(jQuery("input",jQuery(o.current)).focus(),u({filter:""}))}),[s.isOpen]),c(g,{className:"mapp-select",label:t.label},c("div",{ref:n,tabIndex:0,onBlur:function(t){return function(t){event.relatedTarget||document.activeElement,n.current.contains(t.relatedTarget)||u({isOpen:!1})}(t)}},((e=v())instanceof Array&&e.map((function(t){return h(t)})),void 0===t.options?c("div",{className:"mapp-select-input"},c("div",{className:"mapp-select-tokens"}),c("span",{className:"dashicons dashicons-arrow-down-alt2"})):c("div",{className:"mapp-select-input",onClick:function(){return u({isOpen:!s.isOpen})}},c("div",{className:"mapp-select-tokens"},e.map((function(t){return c("span",{className:"mapp-select-token",onClick:function(e){e.stopPropagation(),w(t,!1)}},h(t))}))),c("span",{className:"dashicons "+(s.isOpen?"dashicons-arrow-up-alt2":"dashicons-arrow-down-alt2")}))),O()))}},50:()=>{var t,e=window.mapp||{};t=jQuery,e.Media=function(){this.editor=null,this.map=null,this.sel=null,this.selected=null,this.items=null,this.popup=null;var n=this;this.initialize=function(){t(".mapp-media-button").length<=0||(jQuery(document).ready((function(){_.each(mappl10n.options.pointers,(function(e,n){t(".mapp-media-button").pointer({content:e,close:function(){t.post(ajaxurl,{action:"mapp_dismiss",key:n})}}).pointer("open")}))})),this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0,closeOnEsc:!1,max:!0}),this.popup.setContent(e.lib.template("mce")),this.sel=this.popup.el,t(".mapp-media-button").on("click",(function(){n.popup.open()})),this.find(),this.sel.on("change",'input[name="mapp-mce-list-type"]',(function(){t(this).val(),t(".mapp-mce-search").val(""),n.find()})),this.sel.on("keydown",".mapp-mce-search",(function(t){if(13==t.which)return!1})),this.sel.on("input",".mapp-mce-search",(function(t){n.find()})),this.sel.on("click","[data-mapp-mce]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce");n[i]()})),this.sel.on("click",".mapp-mce-item",(function(){t(".mapp-mce-list .mapp-mce-item",this.sel).removeClass("mapp-selected"),t(this).addClass("mapp-selected"),n.selected=t(this).attr("data-mapp-mapid")})),this.sel.on("click",".mapp-mce-list [data-mapp-mce-list]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce-list"),o=t(this).closest(".mapp-mce-item").attr("data-mapp-mapid");return n[i](o),!1})),this.sel.on("click",".mapp-mce-list a",(function(t){t.stopPropagation()})),this.sel.on("change",".mapp-mce-viewport",(function(){t(this).is(":checked")||(n.map.center=n.map.zoom=null,n.map.recenter())})),this.sel.on("click",".mapp-mce-size",(function(e){var n=t(this).data("width"),i=t(this).data("height");t(".mapp-mce-width").val(n),t(".mapp-mce-height").val(i),e.preventDefault()})),this.sel.on("keydown",".mapp-mce-title",(function(t){13==t.which&&(t.preventDefault(),n.save())})))},this.add=function(){this.open(null)},this.cancel=function(){this.closeEditor()},this.close=function(){this.popup.close()},this.closeEditor=function(){this.map.poiClose(),this.map=null,this.editor=null,t(".mapp-mce-edit-panel").removeClass("mapp-open"),t(".mapp-mce-list-panel").addClass("mapp-open")},this.edit=function(t){e.Map.ajaxGet(t,(function(t){n.open(t)}))},this.find=function(){var n=this;null!==this.items?this.renderList():(t(".spinner",this.sel).show(),e.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&(t(".spinner",n.sel).hide(),n.items=_.sortBy(e.data,"post_title"),n.renderList())}}))},this.insert=function(t){var e='[mappress mapid="'+(t=t||this.map.mapid)+'"]';"undefined"==typeof wpActiveEditor?alert(mappl10n.need_classic):send_to_editor(e),this.popup.close()},this.open=function(n){this.map=new e.Map(n,{editable:!0,embed:!0,height:n&&n.height?n.height:mappl10n.options.sizes[mappl10n.options.size].height,layout:"left",poiList:!0,sel:t(".mapp-edit"),width:n&&n.width?n.width:mappl10n.options.sizes[mappl10n.options.size].width});var i=this.map.mapid;i?t(".mapp-mce-mapid").text(i):t(".mapp-mce-mapid").text(""),t(".mapp-mce-title").val(this.map.title),t(".mapp-mce-width").val(this.map.width),t(".mapp-mce-height").val(this.map.height),t(".mapp-mce-viewport").prop("checked",!(!this.map.center||!this.map.zoom)),t(".mapp-mce-edit-panel").addClass("mapp-open"),t(".mapp-mce-list-panel").removeClass("mapp-open"),this.editor=new e.Editor(this.map)},this.remove=function(t){if(confirm(mappl10n.delete_map_prompt)){this.selected=null;var n=_.findIndex(this.items,{mapid:t});n>-1&&(this.items.splice(n,1),e.Map.ajaxDelete(t),this.renderList())}},this.renderList=function(){var n=null,i=t('input[name="mapp-mce-list-type"]:checked',this.sel).val(),o=t(".mapp-mce-search",this.sel).val().toLowerCase();n="all"==i?_.filter(this.items,(function(t){return t.post_title&&-1!=t.post_title.toLowerCase().indexOf(o)||t.map_title&&-1!=t.map_title.toLowerCase().indexOf(o)})):_.filter(this.items,(function(t){return t.postid==mappl10n.options.postid})),t(".mapp-mce-list",this.sel).html(e.lib.template("mce-list",{items:n,selected:this.selected,type:i}))},this.save=function(){var e=this;this.map&&(this.map.title=t.trim(t(".mapp-mce-title").val()),this.map.width=t(".mapp-mce-width").val(),this.map.height=t(".mapp-mce-height").val(),t(".mapp-mce-viewport").prop("checked")?(this.map.center=this.map.getMap().getCenter().toJSON(),this.map.zoom=this.map.getMap().getZoom()):(this.map.center=null,this.map.zoom=null),this.map.ajaxSave((function(){var n=e.map.mapid?e.map.mapid.toString():null,i=_.findIndex(e.items,(function(t){return t.mapid==n}));-1==i?e.items.unshift({mapid:n,map_title:e.map.title,postid:mappl10n.options.postid,post_title:t("#title").val()||t("#post-title-0").val()}):e.items[i].map_title=e.map.title,e.renderList(),e.closeEditor()})))},this.initialize.apply(this)},e.media=new e.Media},305:()=>{var t;(t=jQuery)(document).ready((function(){t('input[name="mappress_options[engine]"]').on("change",(function(){t('input[name="save"]').click()})),t('input[name="mappress_options[geocoder]"]').on("change",(function(){t('input[name="save"]').click()})),t("[data-mapp-grid]").each((function(t,e){new mapp.widgets.Grid(e)})),t(document).on("focus",".mapp-expand",(function(){t(this).parent().width("100%"),t(this).attr("rows",20)})),t(document).on("blur",".mapp-expand",(function(){t(this).parent().width("auto"),t(this).attr("rows",1)})),t(".mapp-autoicons").on("change","#mapp-autoicons-key",(function(e){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:t(this).val()},callback:function(e){e&&e.status&&(t(".mapp-autoicons").html(e.data),new mapp.widgets.Grid(t("[data-mapp-grid]",".mapp-autoicons")))}})})),t("#mapp-filters tbody").sortable({handle:".mapp-handle"}),t(".mapp-confirm").on("change",(function(){var e=t(".mapp-confirm").is(":checked");t(".mapp-import").prop("disabled",!e)}))}))},278:()=>{var t,e=window.mapp||{};e.widgets={},t=jQuery,e.widgets.ColorPicker=function(){var n=this;this.popup=null,this.toggle=null,this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-colorpicker]"}),n.popup.setContent(e.lib.template("color-picker")),t(document).on("refresh","[data-mapp-colorpicker]",(function(e){var n=t(this),i=n.attr("data-mapp-color")?n.attr("data-mapp-color"):"#000000";n.css({"background-color":i,opacity:n.attr("data-mapp-opacity")/100,"border: ":"1px solid "+i})})),this.popup.el.on("click","[data-mapp-color]",(function(e){n.toggle.attr("data-mapp-color",t(this).attr("data-mapp-color")),n.toggle.trigger("refresh"),n.toggle.trigger("change")})),this.popup.el.on("change",".mapp-opacity, .mapp-weight",(function(e){t(this).hasClass("mapp-opacity")?n.toggle.attr("data-mapp-opacity",t(this).val()):n.toggle.attr("data-mapp-weight",t(this).val()),n.toggle.trigger("change"),n.toggle.trigger("refresh")})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,t('[data-mapp-color="'+n.toggle.attr("data-mapp-color")+'"]',n.popup.el).addClass("mapp-selected"),t(".mapp-opacity",n.popup.el).val(n.toggle.attr("data-mapp-opacity")),t(".mapp-weight",n.popup.el).val(n.toggle.attr("data-mapp-weight"))}))},t((function(){new e.widgets.ColorPicker})),function(t){e.widgets.Grid=function(e,n){this.el=t(e),this.options=jQuery.extend({action:null,sortable:!1},n);var i=this;this.table=t("table",this.el),this.template=t("script",this.el).html().replace(new RegExp("'","g"),'"'),this.el.on("click",(function(e){var n=t(e.target).attr("data-mapp-action");n&&(i[n](e),e.preventDefault())}))},e.widgets.Grid.prototype={add:function(){this.table.show();var e=t(this.template).appendTo(this.table);t(":input:eq(0)",e).focus()},remove:function(e){t(e.target).closest("tr").remove();t("tbody > tr",this.table).length||this.table.hide()}}}(jQuery),function(t){e.widgets.IconEditor=function(n,i){this.popup=null;var o=this;this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0}),this.render(i),t(".mapp-icon-editor-open").on("click",(function(t){return o.popup.open(),!1})),this.popup.el.on("click","[data-mapp-action]",(function(e){var n=t(this).attr("data-mapp-action"),i=t(this).closest("[data-mapp-iconid]"),a=i?i.attr("data-mapp-iconid"):null;switch(e.preventDefault(),e.stopPropagation(),n){case"add":o.add();break;case"delete":o.destroy(a)}}))},e.widgets.IconEditor.prototype={add:function(){for(var n=t(".mapp-icon-files").prop("files"),i=new FormData,o=this,a=0;a<n.length;a++){var r=n[a];if(!r.type.match("image.*"))return void alert("File "+r.name+" is not an image.");i.append("icons[]",r)}i.append("action","mapp_icon_save"),i.append("nonce",mappl10n.options.nonce),e.lib.ajax({type:"POST",contentType:!1,processData:!1,data:i,success:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,o.render()):alert("Upload error: "+t.status)}})},destroy:function(t){var n=this;t&&confirm(mappl10n.delete_prompt)&&e.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,n.render()):alert("Upload error: "+t.status)}})},render:function(){this.popup.setContent(e.lib.template("icon-editor"))}}}(jQuery),function(t){e.widgets.IconPicker=function(){var n=this;this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-iconpicker]"}),this.toggle=null,t(document).on("refresh","[data-mapp-iconpicker]",(function(n){t(this).attr("src",e.Icons.getUrl(t(this).attr("data-mapp-iconid")))})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,n.popup.setContent(e.lib.template("icon-picker")),t("[data-mapp-iconid]",n.popup.el).removeClass("mapp-selected"),t('[data-mapp-iconid="'+n.toggle.attr("data-mapp-iconid")+'"]',n.popup.el).addClass("mapp-selected")})),this.popup.el.on("click","[data-mapp-iconid]",(function(e){var i=t(this).attr("data-mapp-iconid");n.toggle.attr("data-mapp-iconid",i),n.toggle.next('input[type="hidden"]').val(i),n.popup.close(),n.toggle.next('input[name="mappress_options[defaultIcon]"]').length?(mappl10n.options.defaultIcon=t(this).attr("data-mapp-iconid"),t("[data-mapp-iconpicker]").trigger("refresh")):n.toggle.trigger("refresh"),n.toggle.trigger("change")}))},t((function(){new e.widgets.IconPicker,t("[data-mapp-iconpicker]").trigger("refresh")}))}(jQuery),function(t){e.widgets.Popup=function(e,n){this.activeToggle=null,this.backdrop=null,this.content=t(e),this.el=null;var i=this;return this.options=t.extend({closeButton:!1,closeOnEsc:!0,max:!1,modal:!1,onRequestClose:null,position:null,toggle:null},n),this.el=t('<div class="mapp-popup">'),this.setContent(e),this.el.attr("tabindex",0),this.options.max&&this.el.addClass("mapp-popup-max"),this.el.hide(),this.options.toggle&&t(document).on("click",this.options.toggle,(function(e){i.activeToggle=t(this),i.open(),e.stopPropagation()})),this.options.modal?(this.el.addClass("mapp-popup-modal"),this.backdrop=t('<div class="mapp-popup-backdrop"></div>'),t("body").append(this.backdrop),this.options.closeOnEsc&&t(this.backdrop).on("click",(function(){i.requestClose()}))):t(document).on("click",(function(t){i.el.has(t.target).length||i.el.get(0)==t.target||i.requestClose()})),this.el.on("click",".mapp-close",(function(){i.requestClose()})),this.el.on("keydown",(function(t){27==t.which&&i.options.closeOnEsc&&i.requestClose()})),this},e.widgets.Popup.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),this.options.modal&&(this.backdrop.hide(),t("body").removeClass("mapp-popup-noscroll")),this.activeToggle&&this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),this.el.trigger("open.mapp.popup"),this.options.modal?(this.backdrop.show(),t("body").addClass("mapp-popup-noscroll")):this.el.position(t.extend({my:"center top",at:"center bottom + 5",of:this.activeToggle,collision:"flipfit"},this.options.position)),this.el.focus()},requestClose:function(){this.options.onRequestClose?this.options.onRequestClose():this.close()},setContent:function(t){this.el.empty(),this.options.closeButton&&this.el.append('<span class="mapp-close">'),this.el.append(t)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery),function(t){e.widgets.TemplateEditor=function(n,i){this.sel=t(n),this.codeStandard=null,this.codeEditor=null,this.model=null,this.popup=null,this.tokens=i;var o=this;this.sel.html(e.lib.template("tp-master")),this.popup=new e.widgets.Popup("",{modal:!0}),this.sel.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return o[n](i),!1})),this.popup.el.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return o[n](i),!1})),this.popup.el.on("click",".mapp-tab-label",(function(){return t(".mapp-tab-label",this.sel).removeClass("mapp-active"),t(this).addClass("mapp-active"),t(".mapp-tab",o.popup.el).removeClass("mapp-active"),t(".mapp-tab:eq("+t(this).index()+")",o.popup.sel).addClass("mapp-active"),o.codeStandard.codemirror.refresh(),o.codeEditor.codemirror.refresh(),!1}))},e.widgets.TemplateEditor.prototype={cancel:function(){this.popup.close()},destroy:function(){confirm(mappl10n.delete_prompt)&&(e.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:this.model.name,nonce:mappl10n.options.nonce}}),this.popup.close())},edit:function(n){var i=this;n=t(".mapp-tp-select").val();e.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:n,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&(i.model=t.data,i.renderDetail())}})},insert:function(t){var e=this.codeEditor.codemirror.getDoc(),n=e.getCursor();e.replaceRange("{{{poi."+t+"}}}",n)},renderDetail:function(){this.popup.open(),this.popup.el.html(e.lib.template("tp-detail",{model:this.model,tokens:this.tokens})),this.codeEditor=wp.codeEditor.initialize(t(".mapp-tp-content",this.popup.el)),this.codeStandard=wp.codeEditor.initialize(t(".mapp-tp-standard",this.popup.el)),this.codeStandard.codemirror.setOption("readOnly",!0),this.codeEditor.codemirror.setSize("auto","auto"),this.codeStandard.codemirror.setSize("auto","auto")},save:function(){var t=this;e.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:this.codeEditor.codemirror.getValue(),name:this.model.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&t.popup.close()}})}}}(jQuery)},308:(t,e,n)=>{"use strict";t.exports=function(t,e){var i,o,a,r,p,s,l,c,u,m,d,f,h,g=String(t).replace(/^&/,"").replace(/&$/,"").split("&"),b=g.length,y=function(t){return decodeURIComponent(t.replace(/\+/g,"%20"))},v="undefined"!=typeof window?window:n.g;v.$locutus=v.$locutus||{};var w=v.$locutus;for(w.php=w.php||{},e||(e=v),i=0;i<b&&(u=y((c=g[i].split("="))[0]),m=c.length<2?"":y(c[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));i++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(f=[],d=0,o=0;o<u.length;o++)if("["!==u.charAt(o)||d){if("]"===u.charAt(o)&&d&&(f.length||f.push(u.slice(0,d-1)),f.push(u.substr(d,o-d)),d=0,"["!==u.charAt(o+1)))break}else d=o+1;for(f.length||(f=[u]),o=0;o<f[0].length&&(" "!==(l=f[0].charAt(o))&&"."!==l&&"["!==l||(f[0]=f[0].substr(0,o)+"_"+f[0].substr(o+1)),"["!==l);o++);for(s=e,o=0,h=f.length;o<h;o++){if(p=s,(""===(u=f[o].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==o){for(r in a=-1,s)s.hasOwnProperty(r)&&+r>a&&r.match(/^\d+$/g)&&(a=+r);u=a+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}p[u]=m}}}}},e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={exports:{}};return t[i](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 i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(999),n(938),n(816),n(378),n(218),n(453),n(429),n(787),n(138),n(215),n(50),n(305)})();
1
+ (()=>{var t={215:(t,e,n)=>{"use strict";n.r(e);n(278);var i,a=window.mapp||{};i=jQuery,a.Editor=function(t){this.drawingManager=null,this.map=t,this.poiEditor=null;var e=this;this.initialize=function(){this.map.display(),this.poiEditor=new a.PoiEditor(this.map),this.initDrawingManager(),i(this.map.places).off("search.mapp"),i(this.map.places).on("search.mapp",(function(t,n){e.insert(n)}))},this.insert=function(t){if(t)if(this.drawingManager&&this.drawingManager.setDrawingMode(null),this.map.poiClose(),t.geometry){var e=t.formatted_address?t.formatted_address.replace(/, United States of America/i,"").replace(/, United States/i,"").replace(/, USA/i,""):null,n=t.name==e?"":e,i=new a.Poi({address:e,body:n,iconid:this.poiEditor.lastIcon,point:t.geometry.location,title:t.name,viewport:t.geometry.viewport?t.geometry.viewport:null});this.map.poiInsert(i),i.center()}else t.overlay?(i=new a.Poi({body:"",iconid:"marker"==t.type?null:"poly",overlay:t.overlay,title:"marker"==t.type?t.overlay.getPosition().toUrlValue(6):mappl10n.shape,type:"marker"==t.type?null:t.type}),this.map.poiInsert(i)):"string"==typeof t&&t.substring(0,4)},this.initDrawingManager=function(){},this.initialize.apply(this)},a.PoiEditor=function(t){this.map=t,this.poi=null,this.sel=null,this.lastIcon=null;var e=this;this.initialize=function(){this.sel=i(this.map.iw.getContent()),i(this.map).on("mapp.open",(function(t,n){e.render(n)})),i(this.map).on("mapp.close",(function(){e.mce(!1)})),this.sel.on("click","[data-mapp-poi]",(function(t){t.preventDefault();var n=i(this).attr("data-mapp-poi");e[n]()})),this.sel.on("click",".mapp-poi-visual, .mapp-poi-html",(function(t){var n=i(this).hasClass("mapp-poi-visual");e.mce(n)})),this.sel.on("keydown",(function(t){13==t.which&&"mapp-poi-body"!=t.target.id&&(t.preventDefault(),e.save())})),this.sel.on("change","[data-mapp-iconpicker]",(function(){e.poi.set({dirty:!0,iconid:i("[data-mapp-iconpicker]").attr("data-mapp-iconid")}),e.lastIcon=e.poi.iconid,e.map.renderList()})),this.sel.on("change","[data-mapp-colorpicker]",(function(){e.poi.setTemplateColors(i("[data-mapp-colorpicker]").attr("data-mapp-color"),i("[data-mapp-colorpicker]").attr("data-mapp-opacity"),i("[data-mapp-colorpicker]").attr("data-mapp-weight")),e.map.renderList()}))},this.cancel=function(){this.map.poiClose()},this.initMCE=function(){if("undefined"!=typeof tinyMCE&&void 0!==tinyMCE.init){var t="en";if(void 0!==window.tinyMCEPreInit&&void 0!==window.tinyMCEPreInit.mceInit&&void 0!==window.tinyMCEPreInit.mceInit.content){var e=window.tinyMCEPreInit.mceInit.content;t=void 0!==e.language?e.language:"en"}var n={mode:"none",height:"100%",convert_urls:!1,language:t,menubar:!1,plugins:"image,paste,textcolor,wordpress,wpeditimage,wplink,wpview",relative_urls:!1,remove_script_host:!1,statusbar:!1,theme:"modern",toolbar1:"bold,italic,link",toolbar2:"",toolbar3:"",toolbar4:""};tinyMCE.init(n),this.mce(!0)}},this.mce=function(t){var n=t?"mceAddEditor":"mceRemoveEditor";"undefined"!=typeof tinyMCE&&tinyMCE.execCommand(n,!1,"mapp-poi-body"),i(".mapp-poi-visual, .mapp-poi-html",e.sel).removeClass("mapp-active"),t?i(".mapp-poi-visual",e.sel).addClass("mapp-active"):i(".mapp-poi-html",e.sel).addClass("mapp-active")},this.remove=function(){confirm(mappl10n.delete_prompt)&&(this.map.poiClose(),this.map.poiRemove(this.poi))},this.render=function(t){this.poi=t,i("[data-mapp-iconpicker]").trigger("refresh"),i("[data-mapp-colorpicker]").trigger("refresh"),this.initMCE()},this.save=function(){"undefined"!=typeof tinyMCE&&tinyMCE.get("mapp-poi-body")&&tinyMCE.get("mapp-poi-body").save(),this.poi.set({dirty:!0,title:i(".mapp-poi-title").val(),body:i(".mapp-poi-body").val()}),this.map.renderList(),this.map.poiClose()},this.initialize.apply(this)}},999:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect),m=(c.useLayoutEffect,c.useRef),d=c.useState,h=wp.components,f=h.Button,g=h.Modal,b=(h.Popover,h.Spinner,h.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(d({isFetchingMap:!!t.mapid,isSavingMap:!1,map:null}),2),n=e[0],i=e[1],o=m(null);function p(t){i((function(e){return a(a({},e),t)}))}function c(e,i){switch(e){case"change-title":n.map.set({dirty:!0,title:i}),p({map:n.map});break;case"close":t.onAction("edit-close");break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(s.store.destroyMap({mapid:t.mapid}),t.onAction("edit-destroy"));break;case"save":s.store.saveMap({mapdata:n.map.toJSON(),success:function(e){n.map.set({dirty:!1}),t.onAction("edit-save",e.mapid)}})}}return u((function(){var e=function(e){p({mapdata:e.maps[t.mapid],isFetchingMap:e.isFetchingMap,isSavingMap:e.isSavingMap})};return s.store.subscribe(e),function(){return s.store.unsubscribe(e)}})),u((function(){t.mapid&&s.store.fetchMap({mapid:t.mapid})}),[]),u((function(){n.isFetchingMap||function(t){var e=new s.Map(t,{center:null,editable:!0,embed:!0,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},menu:!1,name:"media-map",poiList:!0,sel:jQuery(o.current),zoom:null});new s.Editor(e);p({map:e})}(n.mapdata)}),[n.mapdata]),l(g,{className:"mapp-edit-modal",focusOnMount:!0,isDismissible:!1,title:function(){if(n.map&&!n.isFetchingMap){var t=n.map.title?n.map.title:"";return l(b,{className:"mapp-edit-title",placeholder:__("Untitled"),value:t,onChange:function(t){return c("change-title",t)}})}}(),shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,onRequestClose:function(){c("close")}},l("div",{className:"mapp-edit",ref:o,onKeyDown:function(t){return t.stopPropagation()},tabIndex:-1}),l("div",{className:"mapp-edit-toolbar",tabIndex:-1,onKeyDown:function(t){return t.stopPropagation()}},l(f,{isPrimary:!0,isBusy:n.isSavingMap,onClick:function(){return c("save")}},__("Save")),l(f,{disabled:n.isSavingMap,onClick:function(){return c("close")}},__("Cancel")),l(f,{disabled:!t.mapid||n.isSavingMap,isDestructive:!0,className:"mapp-edit-delete",onClick:function(){return c("destroy")}},__("Delete"))))}},938:(t,e,n)=>{"use strict";n.r(e);var i=n(926),a=n(999);function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}window.mapp;var c=wp.element.createElement,u=wp.element,m=u.Fragment,d=u.render,h=u.useEffect,f=(u.useLayoutEffect,u.useRef,u.useState),g=wp.components,b=g.Button,__=(g.Modal,function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")});document.getElementById("mapp-library")&&(mappl10n.options.postid=0,d(c((function(t){var e=s(f({mode:"list",mapid:null,scrollTop:null}),2),n=e[0],o=e[1];function p(t){o((function(e){return r(r({},e),t)}))}function l(t,e){switch(t){case"add-new":p({mode:"edit",mapid:null});break;case"edit-close":p({mode:"list"});break;case"edit-destroy":p({mode:"list",mapid:null});break;case"edit-save":p({mode:"list"});break;case"list-select":p({mode:"edit",mapid:e,scrollTop:jQuery(".mapp-pick-items").scrollTop()})}}return h((function(){}),[]),c(m,null,c("div",{className:"wrap"},c("div",null,c("h1",null,__("Map Library")),c(b,{className:"button button-default",onClick:function(){return l("add-new")}},__("Add New"))),c("div",{className:"mapp-library-wrapper"},c(i.default,{context:"library",mapid:n.mapid,onAction:l,scrollTop:n.scrollTop}))),"edit"==n.mode&&c(a.default,{context:"library",mapid:n.mapid,onAction:l}))}),null),document.getElementById("mapp-library")))},816:(t,e,n)=>{"use strict";n.r(e);var i=n(429),a=n(218),o=n(926),r=n(999);function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var m=window.mapp||{},d=wp.element.createElement,h=wp.element,f=h.Fragment,g=h.useEffect,b=(h.useLayoutEffect,h.useRef),y=h.useState,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e=wp.components,n=(e.BaseControl,e.Button),p=(e.ButtonGroup,e.CheckboxControl,e.Dropdown,e.Modal,e.Panel,e.PanelBody),l=(e.PanelRow,e.Placeholder),u=(e.RadioControl,e.SelectControl,e.TextControl,e.ToggleControl,e.Toolbar),h=e.ToolbarButton,v=(e.ToolbarGroup,wp.blockEditor),w=v.BlockControls,O=v.InspectorControls,k=c(y({editMapid:null,isListOpen:!1,isEditorOpen:!1,map:null,mapdata:null}),2),C=k[0],j=k[1],S=b(null);function P(t){j((function(e){return s(s({},e),t)}))}function E(e,n){switch(e){case"add":P({isEditorOpen:!0,editMapid:null});break;case"change-settings":t.setAttributes(n);break;case"edit":P({isEditorOpen:!0,editMapid:t.attributes.mapid});break;case"edit-close":P({isEditorOpen:!1,editMapid:null});break;case"edit-destroy":case"list-destroy":t.setAttributes({mapid:void 0,center:void 0,zoom:void 0,width:void 0,height:void 0}),P({isEditorOpen:!1,isListOpen:!1});break;case"edit-save":P({isEditorOpen:!1,editMapid:null}),t.setAttributes({mapid:n});break;case"list-close":P({isListOpen:!1});break;case"list-select":n!=t.attributes.mapid&&t.setAttributes({center:void 0,mapid:n,zoom:void 0}),E("list-close");break;case"open-list":P({isListOpen:!0})}}function _(){var e=void 0!==e?e:u,n=mappl10n.options.block?null:d(h,{icon:"portfolio",label:__("Map Library"),onClick:function(){return E("open-list")}});return d(w,null,d(e,null,d(h,{icon:"insert",label:__("New map"),onClick:function(){return E("add")}}),t.attributes.mapid&&d(h,{icon:"edit",label:__("Edit map"),onClick:function(){return E("edit")}}),n))}function M(){if(C.isEditorOpen)return d(r.default,{mapid:C.editMapid,onAction:E})}function x(){if(C.isListOpen)return d(o.default,{mapid:t.attributes.mapid,onAction:E})}return g((function(){var e=function(e){var n=e.maps[t.attributes.mapid];n&&P({mapdata:n})};return m.store.subscribe(e),function(){return m.store.unsubscribe(e)}})),g((function(){t.attributes.mapid&&m.store.fetchMap({mapid:t.attributes.mapid,failure:function(){return P({mapdata:void 0})}})}),[t.attributes.mapid]),g((function(){var e;t.attributes.mapid&&S.current&&C.mapdata&&((e=new m.Map(C.mapdata,{center:t.attributes.center,height:t.attributes.height,mapOpts:{mapTypeControl:!1,streetViewControl:!1},poiList:t.attributes.poiList,sel:jQuery(S.current),width:t.attributes.width,zoom:t.attributes.zoom})).display(),P({map:e}))}),[C.mapdata]),t.attributes.preview?d("img",{className:"mapp-gt-preview",src:mappl10n.options.baseurl+"/images/preview.png",width:"100%"}):t.attributes.mapid&&void 0!==C.mapdata?d(f,null,_(),function(){if(!C.map)return null;var e,o;mappl10n.options.block&&(o=d("div",null,d("p",null,__("Like the block? Upgrade to the free plugin or MapPress Pro for more features!")),d("div",null,d(n,{isPrimary:!0,target:"_blank",href:"https://mappresspro.com"},__("MapPress Pro")),d(n,{isSecondary:!0,href:"https://wordpress.org/plugins/mappress-google-maps-for-wordpress"},__("Free plugin")))),e=d(p,{title:__("MapPress options"),initialOpen:!1},d(a.MappOptions,{onAction:E})));var r=t.attributes,s=r.center,l=r.height,c=r.poiList,u=r.width,m=r.zoom;return d(O,null,d("div",{className:"mapp-gt-inspector"},d(p,{title:__("Map settings")},d(i.MappSettings,{map:C.map,context:"map",onAction:E,center:s,height:l,poiList:c,width:u,zoom:m}),o),e))}(),d("div",{className:"mapp-gt",ref:S}),x(),M()):d(f,null,d(f,null,_(),d(l,{className:"mapp-gt-placeholder",icon:"location",label:__("MapPress Map"),instructions:__("Create a new map or choose one from the map library.")},d(n,{icon:"insert",isSecondary:!0,onClick:function(){return E("add")}},__("New map")),!mappl10n.options.block&&d(n,{icon:"portfolio",isSecondary:!0,onClick:function(){return E("open-list")}},__("Map Library")))),x(),M())}wp.blocks.registerBlockType("mappress/map",{title:__("MapPress Map"),icon:"location",description:__("Insert a map"),category:"mappress",attributes:{center:{type:"string"},height:{type:"string",default:""},initialOpenDirections:{type:"boolean"},mapid:{type:"string"},mapOpts:{type:"object"},poiList:{type:"boolean"},preview:{type:"boolean",default:!1},width:{type:"string",default:""},zoom:{type:"number"}},supports:{align:["left","center","right"]},transforms:{from:[{type:"shortcode",tag:"mappress",attributes:{center:{type:"string",shortcode:function(t){return t.named.center}},height:{type:"string",shortcode:function(t){return t.named.height}},initialOpenDirections:{type:"boolean",shortcode:function(t){return"true"==t.named.initialOpenDirections||"true"==t.named.initialopendirections}},mapid:{type:"string",shortcode:function(t){return t.named.mapid}},poiList:{type:"boolean",shortcode:function(t){return"true"==t.named.poiList||"true"==t.named.poilist}},width:{type:"string",shortcode:function(t){return t.named.width}},zoom:{type:"number",shortcode:function(t){return parseInt(t.named.zoom)?parseInt(t.named.zoom):null}}}},{type:"block",blocks:["core/shortcode"],isMatch:function(t){var e=t.text,n=wp.shortcode.regexp("mappress");return n.lastIndex=0,n.test(e)},transform:function(t){var e=t.text;return wp.blocks.rawHandler({HTML:"<p>"+e+"</p>",mode:"BLOCKS"})}}]},edit:function(t){return d(v,t)},save:function(t){return t},example:{attributes:{preview:!0}}})},186:(t,e,n)=>{"use strict";n.r(e);n(429);wp.element.createElement;var i=wp.element,a=(i.Fragment,i.useEffect,i.useLayoutEffect,i.useRef,i.useState,wp.components);a.BaseControl,a.Button,a.CheckboxControl,a.Panel,a.PanelBody,a.PanelRow,a.Spinner,a.TextControl;n(308);window.mapp,wp.element.createElement;var o=wp.element,r=(o.Fragment,o.useEffect,o.useLayoutEffect,o.useRef,o.useState,wp.components);r.BaseControl,r.Button,r.ButtonGroup,r.Card,r.CardBody,r.CardFooter,r.CardHeader,r.CheckboxControl,r.ExternalLink,r.HorizontalRule,r.Panel,r.PanelBody,r.PanelRow,r.Placeholder,r.RadioControl,r.SelectControl,r.TabPanel,r.TextControl,r.TextareaControl,r.ToggleControl,r.Toolbar,wp.data.useSelect},218:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappOptions:()=>y});var s=window.mapp||{},l=wp.element.createElement,c=wp.element,u=(c.Fragment,c.useEffect,c.useLayoutEffect,c.useRef,c.useState),m=wp.components,d=m.BaseControl,h=m.Button,f=m.ButtonGroup,g=(m.Dashicon,m.Dropdown,m.ExternalLink,m.Panel,m.PanelBody,m.PanelRow),b=(m.RadioControl,m.SelectControl,m.TextControl),__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function y(t){var e=r(u({apiKey:mappl10n.options.apiKey,engine:mappl10n.options.engine}),2),n=e[0],i=e[1];function o(t){i((function(e){return a(a({},e),t)}))}function p(t,e){switch(t){case"apikey":o({apiKey:e});break;case"engine":o({engine:e});break;case"save":s.lib.ajax({type:"POST",data:{action:"mapp_options_save",apiKey:n.apiKey,engine:n.engine,nonce:mappl10n.options.nonce},callback:function(t){wp.data.dispatch("core/notices").createNotice("success",__("Options saved."),{type:"snackbar",isDismissible:!0,actions:[{url:window.location,label:"Refresh page"}]})}})}}return l("div",{className:"mapp-options"},null,l(g,null,l(d,{label:__("Mapping Engine")}),l(d,null,l(f,null,l(h,{onClick:function(){return p("engine","leaflet")},isPressed:"google"!=n.engine,isSmall:!0},__("Leaflet")),l(h,{onClick:function(){return p("engine","google")},isPressed:"google"==n.engine,isSmall:!0},__("Google"))))),"google"!=n.engine?null:l(b,{className:"mapp-settings-apikey",label:l("a",{href:"https://mappresspro.com/mappress-faq/#toc-google-maps-api-keys"},__("Google API key")),onChange:function(t){return p("apikey",t)},value:n.apiKey}),l(h,{onClick:function(){return p("save")},isPrimary:!0},__("Save options")))}},926:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{default:()=>U});var s=wp.element.createElement,l=wp.url.addQueryArgs,c=wp.element,u=c.useCallback,m=c.useEffect,d=c.useState,h=wp.components,f=h.Button,g=h.Dropdown,b=h.Spinner,y=h.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function v(t){var e=r(d({results:[],search:"",searchTerm:""}),2),n=e[0],i=e[1];function o(t){i((function(e){return a(a({},e),t)}))}m((function(){wp.apiFetch({path:l("/wp/v2/search",{search:n.search,per_page:20})}).then((function(t){o({results:t})}))}),[n.search]);var p=u(_.debounce((function(t){o({search:t})}),1e3),[]);function c(e,i){return s("div",{className:"mapp-attach-control"},s("div",{className:"mapp-attach-control-toolbar"},s(y,{autoComplete:"false",value:n.searchTerm,onChange:function(t){o({searchTerm:t}),p(t)},placeholder:__("Search")})),n.results?n.results.length?s("div",{className:"mapp-attach-items"},n.results.map((function(e){return s("div",{key:e.id,className:"mapp-attach-item",onClick:function(){t.onChange(e.id,e.title)}},s("div",{className:"mapp-attach-item-title"},e.title?e.title:__("Untitled")),s("div",{className:"mapp-attach-item-type"},e.type))}))):s("div",{},__("No posts found")):s(b,null))}return s("div",{onClick:function(t){return t.stopPropagation()}},s(g,{renderToggle:function(e){e.isOpen;var n=e.onToggle;return s(f,{icon:t.icon?t.icon:"admin-links",onClick:n,title:t.title})},renderContent:function(t){t.isOpen,t.onToggle;return c()}}))}function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return j(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var S=window.mapp||{},P=wp.element.createElement,E=wp.data.select,M=wp.element,x=M.Fragment,A=M.useEffect,I=(M.useLayoutEffect,M.useRef),T=M.useState,D=wp.components,N=(D.BaseControl,D.Button),L=(D.Dashicon,D.Modal),z=(D.PanelBody,D.RadioControl),B=D.Spinner,F=D.TextControl,R=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function U(t){var e=C(T({isFetchingItems:!0,items:null,search:"",type:"library"==t.context?"all":"post"}),2),n=e[0],i=e[1],a=I(null),o=I(null);function r(t){i((function(e){return O(O({},e),t)}))}function p(t){if("post"==n.type&&t.postid!=mappl10n.options.postid)return!1;var e=n.search.toLowerCase();return!e||(t.mapid.indexOf(e)>=0||(!!(t.post_title&&t.post_title.toLowerCase().indexOf(e)>=0)||!!(t.map_title&&t.map_title.toLowerCase().indexOf(e)>=0)))}function s(e,n){switch(e){case"attach":S.store.mutateMap({mapdata:n});break;case"close":t.onAction("list-close");break;case"duplicate":S.store.duplicateMap({mapid:n,success:function(e){wp.data.dispatch("core/notices").createNotice("success",R("Map copied"),{type:"snackbar",isDismissible:!0}),t.onAction("list-select",e.mapid)}});break;case"destroy":confirm(mappl10n.delete_map_prompt)&&(S.store.destroyMap({mapid:n}),n==t.mapid&&t.onAction("list-destroy",n)),a.current.focus();break;case"select":t.onAction("list-select",n);break;case"shortcode":var i=jQuery("<input>");jQuery("body").append(i),i.val('[mappress mapid="'+n+'"]').select(),document.execCommand("copy"),i.remove(),alert(R("Shortcode copied"))}}function l(){var e="library"==t.context?null:P(z,{className:"mapp-pick-type",options:[{label:R("Attached to this post"),value:"post"},{label:R("All maps"),value:"all"}],onChange:function(t){return r({type:t})},selected:n.type}),i=n.isFetchingItems||n.isAttaching&&"library"!=t.context;return P("div",{className:"mapp-pick-filter"},i&&P(B,null),P(F,{ref:a,className:"mapp-pick-search",tabIndex:1,label:R("Search"),placeholder:R("post title, map title, or map id"),onChange:function(t){return r({search:t})}}),e)}function c(){var t=_.filter(n.items,p);return n.isFetchingItems?null:t.length?P("div",{className:"mapp-pick-items"},P("div",{className:"mapp-pick-header"},P("div",{className:"mapp-pick-col-map-title"},R("Map title")),P("div",{className:"mapp-pick-col-mapid"},R("Map ID")),P("div",{className:"mapp-pick-col-post-title"},R("Attached to")),P("div",{className:"mapp-pick-col-actions"},R("Action"))),_.map(t,u)):P("div",{className:"mapp-pick-items"},P("div",{className:"mapp-pick-message"},R("No maps found")))}function u(e){var n,i,a,r=e.mapid==t.mapid;i=e.postid==mappl10n.options.postid?E("core/editor").getEditedPostAttribute("title"):e.post_title,n=e.map_title?e.map_title:R("Untitled"),i=i||R("Untitled"),e.postid>0&&e.postid==mappl10n.options.postid&&(i=R("Current post")),a=e.postid>0?e.postid==mappl10n.options.postid?i:P("a",{onClick:function(t){return t.stopPropagation()},href:mappl10n.options.editurl+"?post="+e.postid+"&action=edit",target:"_blank",title:R("Edit post")},i):R("Unattached");var p=null;if(e.postid>0){var l=R("Detach map from post");p=P(N,{onClick:function(){return s("attach",{mapid:e.mapid,postid:0})},title:l,icon:"editor-unlink"})}else{var c=R("Attach map to a post");p="library"==t.context?P(v,{onChange:function(t,n){return s("attach",{mapid:e.mapid,postid:t,post_title:n})},title:c}):P(N,{onClick:function(){return s("attach",{mapid:e.mapid,postid:mappl10n.options.postid,post_title:null})},title:c,icon:"admin-links"})}var u=P("div",{className:"mapp-pick-col-actions",onClick:function(t){return t.stopPropagation()}},p,P(N,{onClick:function(t){t.stopPropagation(),s("duplicate",e.mapid)},title:R("Copy"),icon:"admin-page"}),"library"==t.context&&P(N,{onClick:function(t){t.stopPropagation(),s("shortcode",e.mapid)},title:R("Shortcode"),icon:"shortcode"}),P(N,{onClick:function(t){t.stopPropagation(),s("destroy",e.mapid)},title:R("Delete map"),icon:"trash"}));"library"==t.context&&e.mapid;return P("div",{className:"mapp-pick-item"+(r?" mapp-selected":""),ref:r?o:null,key:e.mapid+"|"+e.postid,onClick:function(t){return s("select",e.mapid)}},P("div",{className:"mapp-pick-col-map-title"},n),P("div",{className:"mapp-pick-col-mapid"},e.mapid),P("div",{className:"mapp-pick-col-post-title"},a),u)}return A((function(){var t=function(t){r({isFetchingItems:t.isFetchingItems,items:t.items})};return S.store.subscribe(t),function(){return S.store.unsubscribe(t)}})),A((function(){a.current&&a.current.focus(),S.store.fetchItems({})}),[]),A((function(){o.current&&S.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(o.current))}),[n.type]),"library"==t.context?P(x,null,l(),c()):P(L,{className:"mapp-pick-modal",title:R("Select a map"),onRequestClose:function(){return s("close")}},l(),c())}},429:(t,e,n)=>{"use strict";function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],_n=!0,i=!1,_e=void 0;try{for(var a,o=t[Symbol.iterator]();!(_n=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);_n=!0);}catch(t){i=!0,_e=t}finally{try{_n||null==o.return||o.return()}finally{if(i)throw _e}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}n.r(e),n.d(e,{MappSettings:()=>g});window.mapp;var o=wp.element.createElement,r=wp.element,p=r.Fragment,s=(r.useEffect,r.useLayoutEffect,r.useRef,r.useState),l=wp.components,c=l.BaseControl,u=l.Button,m=l.ButtonGroup,d=(l.Dashicon,l.Dropdown,l.ExternalLink,l.Panel,l.PanelBody,l.PanelRow),h=(l.RadioControl,l.SelectControl),f=l.TextControl,__=function(t){return wp.i18n.__(t,"mappress-google-maps-for-wordpress")};function g(t){var e,n=i(s({}),2);n[0],n[1];function a(t){if(!t||"string"!=typeof t)return t;var e={px:2048,vw:100,vh:100,"%":100},n=parseInt(t),i=2048,a="";for(var o in e)t.includes(o)&&(a=o,i=e[o]);return n>i?i+a:t}function r(e,n){var i=null;switch(e){case"mapTypeId":t.map.set({mapTypeId:n}),i={mapTypeId:n};break;case"poiList":t.map.set({poiList:n}),i={poiList:n};break;case"size":n.hasOwnProperty("height")&&(n.height=a(n.height)),n.hasOwnProperty("width")&&(n.width=a(n.width)),t.map.setSize(n),i=n;break;case"viewport-reset":t.map.center=t.map.zoom=null,t.map.recenter(),i={center:void 0,zoom:void 0};break;case"viewport-save":var o=t.map.getCenter().toJSON();i={center:o.lat+","+o.lng,zoom:t.map.getZoom()},wp.data.dispatch("core/notices").createNotice("success",__("Viewport saved"),{type:"snackbar",isDismissible:!0})}i&&t.onAction("change-settings",i)}return o("div",{className:"mapp-settings"},null,"mashup"!=t.context&&(e=t.map.title?t.map.title:__("Untitled"),o(d,null,o(c,{className:"mapp-settings-title"},e),o(c,{className:"mapp-settings-id",label:__("Map ID")},t.map.mapid))),"mashup"==t.context&&function(){var e=[];if("leaflet"==mappl10n.options.engine)e=mappl10n.options.baseLayers.map((function(t){return{label:t.label,value:t.name}}));else{var n=mappl10n.options.styles?_.keys(mappl10n.options.styles):[];e=["roadmap","satellite","terrain","hybrid"].concat(n).map((function(t){return{label:t.charAt(0).toUpperCase()+t.slice(1),value:t}}))}return e.unshift({label:__("Default"),value:null}),o(h,{className:"mapp-settings-type",help:"",label:__("Map type"),value:t.map.mapTypeId,options:e,onChange:function(t){return r("mapTypeId",t)}})}(),function(){var e=mappl10n.options.sizes[mappl10n.options.size]?mappl10n.options.sizes[mappl10n.options.size]:mappl10n.options.sizes[0],n=mappl10n.options.sizes.map((function(t,e){return{label:t.width+"x"+t.height,height:t.height,width:t.width,value:e+1}}));n.unshift({height:"",label:__("Default"),value:0,width:""}),n.push({label:__("Custom"),value:"custom",disabled:!0});for(var i="custom",a=0;a<n.length-1;a++)n[a].width==t.width&&n[a].height==t.height&&(i=a);return o(p,null,o(h,{className:"mapp-settings-dims-select",help:"",label:__("Size"),value:i,options:n,onChange:function(t){return r("size",{width:n[t].width,height:n[t].height})}}),o(d,null,o(f,{className:"mapp-settings-dims-custom",help:__("px, %, vw"),label:__("Width"),onChange:function(t){return r("size",{width:t})},placeholder:e.width,value:t.width}),o(f,{className:"mapp-settings-dims-custom",help:__("px, %, vh"),label:__("Height"),onChange:function(t){return r("size",{height:t})},placeholder:e.height,value:t.height})))}(),(t.center&&(t.center.lat,t.center.lng,__("Zoom"),t.zoom),o(d,null,o(c,{label:__("Center/Zoom")}),o(c,null,o(m,null,o(u,{onClick:function(){return r("viewport-reset")},isPressed:!t.center,isSmall:!0},__("Automatic")),o(u,{onClick:function(){return r("viewport-save")},isPressed:t.center,isSmall:!0},__("Save")))))))}},787:()=>{function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var o=window.mapp||{};o.Store=function(){this.subs=new Set,this.state={isFetchingMap:!1,isFetchingItems:!1,isSavingMap:!1,itemsFetched:!1,maps:{},items:[]}},o.Store.prototype={createMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e;this.state.isFetchingMap=!1,this.publish(),n()},destroyMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;o.lib.ajax({type:"POST",data:{action:"mapp_delete",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(delete p.state.maps[e],p.destroyItem(e),i(e)):r(),p.publish()}})},duplicateMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_duplicate",mapid:e,postid:mappl10n.options.postid,nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},fetchMap:function(t){var e=t.mapid,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;if(void 0!==this.state.maps[e])return p.publish(),void i(this.state.maps[e]);this.state.isFetchingMap=!0,p.publish(),o.lib.ajax({type:"GET",data:{action:"mapp_get",mapid:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(p.state.maps[e]=t.data,i(t.data)):r(),p.state.isFetchingMap=!1,p.publish()}})},mutateMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapdata,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.saveItem(e),this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_mutate",mapdata:e,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(p.state.maps[t.data.mapid]=t.data,i(e)):r(),p.state.isSavingMap=!1,p.publish()}})},saveMap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.mapdata,n=t.success,i=void 0===n?function(){}:n,a=t.failure,r=void 0===a?function(){}:a,p=this;this.state.isSavingMap=!0,this.publish(),o.lib.ajax({type:"POST",data:{action:"mapp_save",mapdata:JSON.stringify(e),nonce:mappl10n.options.nonce},callback:function(t){if(t&&"OK"==t.status){var e=t.data,n=e.mapid;p.state.maps[n]=e,p.saveItem(e),i(e)}else r();p.state.isSavingMap=!1,p.publish()}})},destroyItem:function(t){var e=this.state.items?this.state.items:[],i=_.findIndex(e,{mapid:t});i>-1&&e.splice(i,1),this.state.items=n(e),this.publish()},fetchItems:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.success,n=void 0===e?function(){}:e,i=t.failure,a=void 0===i?function(){}:i,r=this;if(this.state.itemsFetched)return n(this.state.items),void r.publish();this.state.isFetchingItems=!0,r.publish(),o.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(r.state.items=t.data,r.sortItems(),n(r.state.items),r.state.itemsFetched=!0):a(),r.state.isFetchingItems=!1,r.sortItems(),r.publish()}})},saveItem:function(n){var i=this.state.items?this.state.items:[],a=_.findWhere(i,{mapid:n.mapid});a?(a.mapid=void 0!==n.mapid?n.mapid:a.mapid,a.map_title=void 0!==n.title?n.title:a.map_title,a.postid=void 0!==n.postid?n.postid:a.postid,a.post_title=void 0!==n.post_title?n.post_title:a.post_title,a=function(n){for(var i=1;i<arguments.length;i++){var a=null!=arguments[i]?arguments[i]:{};i%2?t(Object(a),!0).forEach((function(t){e(n,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(a,t))}))}return n}({},a)):(a={mapid:n.mapid,map_title:n.title,postid:mappl10n.options.postid,post_title:null},i.unshift(a))},sortItems:function(){var t,e=(t="Untitled",wp.i18n.__(t,"mappress-google-maps-for-wordpress"));this.state.items=_.sortBy(this.state.items,(function(t){return parseInt(t.mapid)})),this.state.items=_.sortBy(this.state.items,(function(t){return t.map_title?t.map_title:e}))},subscribe:function(t){this.subs.add(t)},unsubscribe:function(t){this.subs.delete(t)},publish:function(){var t,e=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=i(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var a=0,o=function(){};return{s:o,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},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 r,p=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return p=t.done,t},e:function(t){s=!0,r=t},f:function(){try{p||null==n.return||n.return()}finally{if(s)throw r}}}}(n(this.subs));try{for(e.s();!(t=e.n()).done;){(0,t.value)(this.state)}}catch(t){e.e(t)}finally{e.f()}}},o.store=new o.Store},50:()=>{var t,e=window.mapp||{};t=jQuery,e.Media=function(){this.editor=null,this.map=null,this.sel=null,this.selected=null,this.items=null,this.popup=null;var n=this;this.initialize=function(){t(".mapp-media-button").length<=0||(jQuery(document).ready((function(){_.each(mappl10n.options.pointers,(function(e,n){t(".mapp-media-button").pointer({content:e,close:function(){t.post(ajaxurl,{action:"mapp_dismiss",key:n})}}).pointer("open")}))})),this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0,closeOnEsc:!1,max:!0}),this.popup.setContent(e.lib.template("mce")),this.sel=this.popup.el,t(".mapp-media-button").on("click",(function(){n.popup.open()})),this.find(),this.sel.on("change",'input[name="mapp-mce-list-type"]',(function(){t(this).val(),t(".mapp-mce-search").val(""),n.find()})),this.sel.on("keydown",".mapp-mce-search",(function(t){if(13==t.which)return!1})),this.sel.on("input",".mapp-mce-search",(function(t){n.find()})),this.sel.on("click","[data-mapp-mce]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce");n[i]()})),this.sel.on("click",".mapp-mce-item",(function(){t(".mapp-mce-list .mapp-mce-item",this.sel).removeClass("mapp-selected"),t(this).addClass("mapp-selected"),n.selected=t(this).attr("data-mapp-mapid")})),this.sel.on("click",".mapp-mce-list [data-mapp-mce-list]",(function(e){e.preventDefault();var i=t(this).attr("data-mapp-mce-list"),a=t(this).closest(".mapp-mce-item").attr("data-mapp-mapid");return n[i](a),!1})),this.sel.on("click",".mapp-mce-list a",(function(t){t.stopPropagation()})),this.sel.on("change",".mapp-mce-viewport",(function(){t(this).is(":checked")||(n.map.center=n.map.zoom=null,n.map.recenter())})),this.sel.on("click",".mapp-mce-size",(function(e){var n=t(this).data("width"),i=t(this).data("height");t(".mapp-mce-width").val(n),t(".mapp-mce-height").val(i),e.preventDefault()})),this.sel.on("keydown",".mapp-mce-title",(function(t){13==t.which&&(t.preventDefault(),n.save())})))},this.add=function(){this.open(null)},this.cancel=function(){this.closeEditor()},this.close=function(){this.popup.close()},this.closeEditor=function(){this.map.poiClose(),this.map=null,this.editor=null,t(".mapp-mce-edit-panel").removeClass("mapp-open"),t(".mapp-mce-list-panel").addClass("mapp-open")},this.edit=function(t){e.Map.ajaxGet(t,(function(t){n.open(t)}))},this.find=function(){var n=this;null!==this.items?this.renderList():(t(".spinner",this.sel).show(),e.lib.ajax({type:"GET",data:{action:"mapp_find",nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&(t(".spinner",n.sel).hide(),n.items=_.sortBy(e.data,"post_title"),n.renderList())}}))},this.insert=function(t){var e='[mappress mapid="'+(t=t||this.map.mapid)+'"]';"undefined"==typeof wpActiveEditor?alert(mappl10n.need_classic):send_to_editor(e),this.popup.close()},this.open=function(n){this.map=new e.Map(n,{editable:!0,embed:!0,height:n&&n.height?n.height:mappl10n.options.sizes[mappl10n.options.size].height,layout:"left",mapOpts:{mapTypeControl:!0,streetViewControl:!1},poiList:!0,sel:t(".mapp-edit"),width:n&&n.width?n.width:mappl10n.options.sizes[mappl10n.options.size].width});var i=this.map.mapid;i?t(".mapp-mce-mapid").text(i):t(".mapp-mce-mapid").text(""),t(".mapp-mce-title").val(this.map.title),t(".mapp-mce-width").val(this.map.width),t(".mapp-mce-height").val(this.map.height),t(".mapp-mce-viewport").prop("checked",!(!this.map.center||!this.map.zoom)),t(".mapp-mce-edit-panel").addClass("mapp-open"),t(".mapp-mce-list-panel").removeClass("mapp-open"),this.editor=new e.Editor(this.map)},this.remove=function(t){if(confirm(mappl10n.delete_map_prompt)){this.selected=null;var n=_.findIndex(this.items,{mapid:t});n>-1&&(this.items.splice(n,1),e.Map.ajaxDelete(t),this.renderList())}},this.renderList=function(){var n=null,i=t('input[name="mapp-mce-list-type"]:checked',this.sel).val(),a=t(".mapp-mce-search",this.sel).val().toLowerCase();n="all"==i?_.filter(this.items,(function(t){return t.post_title&&-1!=t.post_title.toLowerCase().indexOf(a)||t.map_title&&-1!=t.map_title.toLowerCase().indexOf(a)})):_.filter(this.items,(function(t){return t.postid==mappl10n.options.postid})),t(".mapp-mce-list",this.sel).html(e.lib.template("mce-list",{items:n,selected:this.selected,type:i}))},this.save=function(){var e=this;this.map&&(this.map.title=t(".mapp-mce-title").val().trim(),this.map.width=t(".mapp-mce-width").val(),this.map.height=t(".mapp-mce-height").val(),t(".mapp-mce-viewport").prop("checked")?(this.map.center=this.map.getMap().getCenter().toJSON(),this.map.zoom=this.map.getMap().getZoom()):(this.map.center=null,this.map.zoom=null),this.map.ajaxSave((function(){var n=e.map.mapid?e.map.mapid.toString():null,i=_.findIndex(e.items,(function(t){return t.mapid==n}));-1==i?e.items.unshift({mapid:n,map_title:e.map.title,postid:mappl10n.options.postid,post_title:t("#title").val()||t("#post-title-0").val()}):e.items[i].map_title=e.map.title,e.renderList(),e.closeEditor()})))},this.initialize.apply(this)},e.media=new e.Media},305:()=>{var t;(t=jQuery)(document).ready((function(){t('input[name="mappress_options[engine]"]').on("change",(function(){t('input[name="save"]').click()})),t('input[name="mappress_options[geocoder]"]').on("change",(function(){t('input[name="save"]').click()})),t("[data-mapp-grid]").each((function(t,e){new mapp.widgets.Grid(e)})),t(document).on("focus",".mapp-expand",(function(){t(this).parent().width("100%"),t(this).attr("rows",20)})),t(document).on("blur",".mapp-expand",(function(){t(this).parent().width("auto"),t(this).attr("rows",1)})),t(".mapp-autoicons").on("change","#mapp-autoicons-key",(function(e){mapp.lib.ajax({data:{action:"mapp_autoicons_form",key:t(this).val()},callback:function(e){e&&e.status&&(t(".mapp-autoicons").html(e.data),new mapp.widgets.Grid(t("[data-mapp-grid]",".mapp-autoicons")))}})})),t("#mapp-filters tbody").sortable({handle:".mapp-handle"}),t(".mapp-confirm").on("change",(function(){var e=t(".mapp-confirm").is(":checked");t(".mapp-import").prop("disabled",!e)}))}))},278:()=>{var t,e=window.mapp||{};e.widgets={},t=jQuery,e.widgets.ColorPicker=function(){var n=this;this.popup=null,this.toggle=null,this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-colorpicker]"}),n.popup.setContent(e.lib.template("color-picker")),t(document).on("refresh","[data-mapp-colorpicker]",(function(e){var n=t(this),i=n.attr("data-mapp-color")?n.attr("data-mapp-color"):"#000000";n.css({"background-color":i,opacity:n.attr("data-mapp-opacity")/100,"border: ":"1px solid "+i})})),this.popup.el.on("click","[data-mapp-color]",(function(e){n.toggle.attr("data-mapp-color",t(this).attr("data-mapp-color")),n.toggle.trigger("refresh"),n.toggle.trigger("change")})),this.popup.el.on("change",".mapp-opacity, .mapp-weight",(function(e){t(this).hasClass("mapp-opacity")?n.toggle.attr("data-mapp-opacity",t(this).val()):n.toggle.attr("data-mapp-weight",t(this).val()),n.toggle.trigger("change"),n.toggle.trigger("refresh")})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,t('[data-mapp-color="'+n.toggle.attr("data-mapp-color")+'"]',n.popup.el).addClass("mapp-selected"),t(".mapp-opacity",n.popup.el).val(n.toggle.attr("data-mapp-opacity")),t(".mapp-weight",n.popup.el).val(n.toggle.attr("data-mapp-weight"))}))},t((function(){new e.widgets.ColorPicker})),function(t){e.widgets.Grid=function(e,n){this.el=t(e),this.options=jQuery.extend({action:null,sortable:!1},n);var i=this;this.table=t("table",this.el),this.template=t("script",this.el).html().replace(new RegExp("'","g"),'"'),this.el.on("click",(function(e){var n=t(e.target).attr("data-mapp-action");n&&(i[n](e),e.preventDefault())}))},e.widgets.Grid.prototype={add:function(){this.table.show();var e=t(this.template).appendTo(this.table);t(":input:eq(0)",e).focus()},remove:function(e){t(e.target).closest("tr").remove();t("tbody > tr",this.table).length||this.table.hide()}}}(jQuery),function(t){e.widgets.IconEditor=function(n,i){this.popup=null;var a=this;this.popup=new e.widgets.Popup("",{modal:!0,closeButton:!0}),this.render(i),t(".mapp-icon-editor-open").on("click",(function(t){return a.popup.open(),!1})),this.popup.el.on("click","[data-mapp-action]",(function(e){var n=t(this).attr("data-mapp-action"),i=t(this).closest("[data-mapp-iconid]"),o=i?i.attr("data-mapp-iconid"):null;switch(e.preventDefault(),e.stopPropagation(),n){case"add":a.add();break;case"delete":a.destroy(o)}}))},e.widgets.IconEditor.prototype={add:function(){for(var n=t(".mapp-icon-files").prop("files"),i=new FormData,a=this,o=0;o<n.length;o++){var r=n[o];if(!r.type.match("image.*"))return void alert("File "+r.name+" is not an image.");i.append("icons[]",r)}i.append("action","mapp_icon_save"),i.append("nonce",mappl10n.options.nonce),e.lib.ajax({type:"POST",contentType:!1,processData:!1,data:i,success:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,a.render()):alert("Upload error: "+t.status)}})},destroy:function(t){var n=this;t&&confirm(mappl10n.delete_prompt)&&e.lib.ajax({type:"POST",data:{action:"mapp_icon_delete",iconid:t,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status?(mappl10n.options.userIcons=t.data,n.render()):alert("Upload error: "+t.status)}})},render:function(){this.popup.setContent(e.lib.template("icon-editor"))}}}(jQuery),function(t){e.widgets.IconPicker=function(){var n=this;this.popup=new e.widgets.Popup("",{toggle:"[data-mapp-iconpicker]"}),this.toggle=null,t(document).on("refresh","[data-mapp-iconpicker]",(function(n){t(this).attr("src",e.Icons.getUrl(t(this).attr("data-mapp-iconid")))})),this.popup.el.on("open.mapp.popup",(function(){n.toggle=n.popup.activeToggle,n.popup.setContent(e.lib.template("icon-picker")),t("[data-mapp-iconid]",n.popup.el).removeClass("mapp-selected"),t('[data-mapp-iconid="'+n.toggle.attr("data-mapp-iconid")+'"]',n.popup.el).addClass("mapp-selected")})),this.popup.el.on("click","[data-mapp-iconid]",(function(e){var i=t(this).attr("data-mapp-iconid");n.toggle.attr("data-mapp-iconid",i),n.toggle.next('input[type="hidden"]').val(i),n.popup.close(),n.toggle.next('input[name="mappress_options[defaultIcon]"]').length?(mappl10n.options.defaultIcon=t(this).attr("data-mapp-iconid"),t("[data-mapp-iconpicker]").trigger("refresh")):n.toggle.trigger("refresh"),n.toggle.trigger("change")}))},t((function(){new e.widgets.IconPicker,t("[data-mapp-iconpicker]").trigger("refresh")}))}(jQuery),function(t){e.widgets.Popup=function(e,n){this.activeToggle=null,this.backdrop=null,this.content=t(e),this.el=null;var i=this;return this.options=t.extend({closeButton:!1,closeOnEsc:!0,max:!1,modal:!1,onRequestClose:null,position:null,toggle:null},n),this.el=t('<div class="mapp-popup">'),this.setContent(e),this.el.attr("tabindex",0),this.options.max&&this.el.addClass("mapp-popup-max"),this.el.hide(),this.options.toggle&&t(document).on("click",this.options.toggle,(function(e){i.activeToggle=t(this),i.open(),e.stopPropagation()})),this.options.modal?(this.el.addClass("mapp-popup-modal"),this.backdrop=t('<div class="mapp-popup-backdrop"></div>'),t("body").append(this.backdrop),this.options.closeOnEsc&&t(this.backdrop).on("click",(function(){i.requestClose()}))):t(document).on("click",(function(t){i.el.has(t.target).length||i.el.get(0)==t.target||i.requestClose()})),this.el.on("click",".mapp-close",(function(){i.requestClose()})),this.el.on("keydown",(function(t){27==t.which&&i.options.closeOnEsc&&i.requestClose()})),this},e.widgets.Popup.prototype={close:function(){this.el&&this.el.is(":visible")&&(this.el.hide(),this.options.modal&&(this.backdrop.hide(),t("body").removeClass("mapp-popup-noscroll")),this.activeToggle&&this.activeToggle.focus(),this.el.trigger("closed.mapp.popup"))},open:function(){this.el.parent().length||this.el.appendTo("body"),this.el.show(),this.el.trigger("open.mapp.popup"),this.options.modal?(this.backdrop.show(),t("body").addClass("mapp-popup-noscroll")):this.el.position(t.extend({my:"center top",at:"center bottom + 5",of:this.activeToggle,collision:"flipfit"},this.options.position)),this.el.focus()},requestClose:function(){this.options.onRequestClose?this.options.onRequestClose():this.close()},setContent:function(t){this.el.empty(),this.options.closeButton&&this.el.append('<span class="mapp-close">'),this.el.append(t)},toggle:function(){this.el.is(":visible")?this.close():this.open()}}}(jQuery),function(t){e.widgets.TemplateEditor=function(n,i){this.sel=t(n),this.codeStandard=null,this.codeEditor=null,this.model=null,this.popup=null,this.tokens=i;var a=this;this.sel.html(e.lib.template("tp-master")),this.popup=new e.widgets.Popup("",{modal:!0}),this.sel.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return a[n](i),!1})),this.popup.el.on("click","[data-mapp-action]",(function(){var e=t(this),n=e.attr("data-mapp-action"),i=e.attr("data-mapp-"+n);return a[n](i),!1})),this.popup.el.on("click",".mapp-tab-label",(function(){return t(".mapp-tab-label",this.sel).removeClass("mapp-active"),t(this).addClass("mapp-active"),t(".mapp-tab",a.popup.el).removeClass("mapp-active"),t(".mapp-tab:eq("+t(this).index()+")",a.popup.sel).addClass("mapp-active"),a.codeStandard.codemirror.refresh(),a.codeEditor.codemirror.refresh(),!1}))},e.widgets.TemplateEditor.prototype={cancel:function(){this.popup.close()},destroy:function(){confirm(mappl10n.delete_prompt)&&(e.lib.ajax({type:"POST",data:{action:"mapp_tpl_delete",name:this.model.name,nonce:mappl10n.options.nonce}}),this.popup.close())},edit:function(n){var i=this;n=t(".mapp-tp-select").val();e.lib.ajax({type:"GET",data:{action:"mapp_tpl_get",name:n,nonce:mappl10n.options.nonce},callback:function(t){t&&"OK"==t.status&&(i.model=t.data,i.renderDetail())}})},insert:function(t){var e=this.codeEditor.codemirror.getDoc(),n=e.getCursor();e.replaceRange("{{{poi."+t+"}}}",n)},renderDetail:function(){this.popup.open(),this.popup.el.html(e.lib.template("tp-detail",{model:this.model,tokens:this.tokens})),this.codeEditor=wp.codeEditor.initialize(t(".mapp-tp-content",this.popup.el)),this.codeStandard=wp.codeEditor.initialize(t(".mapp-tp-standard",this.popup.el)),this.codeStandard.codemirror.setOption("readOnly",!0),this.codeEditor.codemirror.setSize("auto","auto"),this.codeStandard.codemirror.setSize("auto","auto")},save:function(){var t=this;e.lib.ajax({type:"POST",data:{action:"mapp_tpl_save",content:this.codeEditor.codemirror.getValue(),name:this.model.name,nonce:mappl10n.options.nonce},callback:function(e){e&&"OK"==e.status&&t.popup.close()}})}}}(jQuery)},308:(t,e,n)=>{"use strict";t.exports=function(t,e){var i,a,o,r,p,s,l,c,u,m,d,h,f,g=String(t).replace(/^&/,"").replace(/&$/,"").split("&"),b=g.length,y=function(t){return decodeURIComponent(t.replace(/\+/g,"%20"))},v="undefined"!=typeof window?window:n.g;v.$locutus=v.$locutus||{};var w=v.$locutus;for(w.php=w.php||{},e||(e=v),i=0;i<b&&(u=y((c=g[i].split("="))[0]),m=c.length<2?"":y(c[1]),!(u.includes("__proto__")||u.includes("constructor")||u.includes("prototype")));i++){for(;" "===u.charAt(0);)u=u.slice(1);if(u.indexOf("\0")>-1&&(u=u.slice(0,u.indexOf("\0"))),u&&"["!==u.charAt(0)){for(h=[],d=0,a=0;a<u.length;a++)if("["!==u.charAt(a)||d){if("]"===u.charAt(a)&&d&&(h.length||h.push(u.slice(0,d-1)),h.push(u.substr(d,a-d)),d=0,"["!==u.charAt(a+1)))break}else d=a+1;for(h.length||(h=[u]),a=0;a<h[0].length&&(" "!==(l=h[0].charAt(a))&&"."!==l&&"["!==l||(h[0]=h[0].substr(0,a)+"_"+h[0].substr(a+1)),"["!==l);a++);for(s=e,a=0,f=h.length;a<f;a++){if(p=s,(""===(u=h[a].replace(/^['"]/,"").replace(/['"]$/,""))||" "===u)&&0!==a){for(r in o=-1,s)s.hasOwnProperty(r)&&+r>o&&r.match(/^\d+$/g)&&(o=+r);u=o+1}Object(s[u])!==s[u]&&(s[u]={}),s=s[u]}p[u]=m}}}}},e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.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 i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(999),n(938),n(816),n(186),n(218),n(926),n(429),n(787),n(215),n(50),n(305)})();
css/mappress.css CHANGED
@@ -411,19 +411,159 @@ only screen and (min-device-pixel-ratio: 2) {
411
  }
412
 
413
  /*
414
- -----------------------------------------------------------------------------------
415
- InfoWindow / Popup
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
- The map popup inherits some styling from the blog.
418
- Minimal styling is applied below.
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  -----------------------------------------------------------------------------------
420
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
 
422
- .mapp-layout .leaflet-popup-content {
423
- height: auto !important;
424
- width: auto !important;
 
 
 
 
 
425
  }
426
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  .mapp-iw {
428
  display: flex;
429
  flex-direction: column;
@@ -431,16 +571,31 @@ only screen and (min-device-pixel-ratio: 2) {
431
  overflow: hidden;
432
  }
433
 
434
- /* Important is used to override common theme / user agent styles that interfere */
 
 
 
 
 
 
 
 
 
435
  .mapp-layout .mapp-iw * {
436
  color: black;
437
- line-height: normal; /* To support wpautop */
438
  margin: 0;
439
  padding: 0;
440
  }
441
 
 
 
 
 
 
 
442
  .mapp-iw p {
443
- margin: 5px 0 5px 0 !important; /* To support wpautop */
444
  }
445
 
446
  .mapp-iw .mapp-body {
@@ -451,14 +606,15 @@ only screen and (min-device-pixel-ratio: 2) {
451
 
452
  .mapp-iw .mapp-title {
453
  font-weight: bold;
 
454
  }
455
 
456
  /* Thumbnails */
457
  .mapp-iw .mapp-body .wp-post-image {
458
- padding-right: 10px !important; /* important is used here because otherwise .mapp-canvas img setting will take priority */
459
  vertical-align: top;
460
  float: left;
461
  margin: 3px 3px 3px 0px;
 
462
  width: 32px;
463
  height: 32px;
464
  }
@@ -478,61 +634,54 @@ only screen and (min-device-pixel-ratio: 2) {
478
  text-decoration: none !important;
479
  }
480
 
 
 
 
 
 
481
  /*
482
  -----------------------------------------------------------------------------------
483
- Infobox
484
  -----------------------------------------------------------------------------------
485
  */
486
 
487
- .mapp-ib-wrapper {
488
- display: none;
489
- position: absolute;
490
- z-index: 100;
491
  }
492
 
493
- .mapp-ib-wrapper.mapp-open {
494
- display: flex;
495
- flex-direction: column;
 
496
  }
497
 
498
- /* In fullscreen Google sets map z-index very high */
499
- :fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
500
- :-webkit-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
501
- :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
502
- :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
503
 
504
- .mapp-ib {
505
- background-color: white;
506
- border: 1px solid lightgray;
507
- box-sizing: border-box;
508
- outline: none;
509
- overflow: hidden;
510
- padding: 10px;
 
 
511
  }
512
 
513
- /* Triangular tip */
514
- .mapp-ib-tip {
515
- height: 10px;
516
- z-index: 1;
517
  }
518
 
519
- .mapp-ib-tip:after {
520
- border-top: 10px solid white;
521
- border-left: 10px solid transparent;
522
- border-right: 10px solid transparent;
523
- border-bottom: none;
524
- content: "";
525
- width: 0;
526
- height: 0;
527
- /* ie6 height fix */
528
- font-size: 0;
529
- left: 50%;
530
- line-height: 0;
531
- margin-left: -10px;
532
- margin-top: -1px;
533
- position: absolute;
534
  }
535
 
 
536
  /*
537
  -----------------------------------------------------------------------------------
538
  Layouts
@@ -642,6 +791,7 @@ only screen and (min-device-pixel-ratio: 2) {
642
  display: none;
643
  padding: 10px;
644
  position: relative;
 
645
  overflow: auto;
646
  width: 250px;
647
  }
@@ -738,7 +888,7 @@ only screen and (min-device-pixel-ratio: 2) {
738
  position: absolute;
739
  top: 0; left: 0; bottom: 0;
740
  width: 150px;
741
- z-index: 1001;
742
  }
743
 
744
  .mapp-menu-item {
@@ -863,4 +1013,4 @@ img.mapp-icon, .mapp-icon img {
863
 
864
  .mapp-button-submit {
865
  color: #4285F4;
866
- }
411
  }
412
 
413
  /*
414
+ ------------------------------------------------------------------------------------------------------------
415
+ Infobox
416
+
417
+ - This applies only to Infoboxes! Google standard infoWindow / Leaflet popup use class .mapp-iw instead
418
+
419
+ mapp-ib-wrapper - wrapper around box + tip, used for sizing
420
+ mapp-ib - box only, with border
421
+ .mapp-iw | .mapp-iw-edit - infowindow (popup) or tooltip content
422
+ mapp-ib-tip - triangle tip
423
+
424
+ Classses applied to mapp-ib-wrapper:
425
+ type .mapp-ib-popup | .mapp-ib-tooltip | .mapp-ib-edit | .mapp-open
426
+
427
+ Classes applied to mapp-iw:
428
+ template name .mapp-map-popup | .mapp-map-tooltip | .mapp-mashup-popup | .mapp-mashup-tooltip
429
+ -----------------------------------------------------------------------------------------------------------
430
+ */
431
+
432
+ /* IB wrapper. Line-height is critical for tip position. Z-index places IB above menu icon, but below menu */
433
+ .mapp-ib-wrapper {
434
+ display: none;
435
+ flex-direction: column;
436
+ line-height: 0;
437
+ max-height: calc(100% - 50px);
438
+ max-width: calc(100% - 50px);
439
+ position: absolute;
440
+ z-index: 1005;
441
+ }
442
+
443
+ .mapp-ib-wrapper.mapp-open {
444
+ display: flex;
445
+ }
446
+
447
+ .mapp-ib-wrapper.mapp-ib-flip {
448
+ flex-direction: column-reverse;
449
+ }
450
+
451
+ /* In fullscreen Google sets map z-index very high */
452
+ :fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
453
+ :-webkit-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
454
+ :-moz-full-screen ~ .mapp-ib-wrapper { z-index: 10000000000; }
455
+ :-ms-fullscreen ~ .mapp-ib-wrapper { z-index: 10000000000; }
456
+
457
+
458
+ .mapp-ib {
459
+ background-color: white;
460
+ border: 1px solid lightgray;
461
+ box-sizing: border-box;
462
+ display: flex;
463
+ flex-direction: column;
464
+ line-height: normal;
465
+ outline: none;
466
+ overflow: hidden;
467
+ }
468
+
469
+ .mapp-ib-tip {
470
+ display: flex;
471
+ flex: 0 0 auto;
472
+ position: relative;
473
+ width: 0;
474
+ }
475
+
476
+ .mapp-ib-tip:before {
477
+ border: 10px solid transparent;
478
+ content: "";
479
+ }
480
 
481
+ .mapp-ib-tip:before {
482
+ border-top: 10px solid white;
483
+ border-bottom: none;
484
+ left: -10px;
485
+ position: relative;
486
+ width: 0;
487
+ }
488
+
489
+ .mapp-ib-flip .mapp-ib-tip {
490
+ transform: rotate(180deg);
491
+ }
492
+
493
+ /*
494
+ -----------------------------------------------------------------------------------
495
+ IB Styles
496
  -----------------------------------------------------------------------------------
497
  */
498
+ .mapp-ib-dark .mapp-ib {
499
+ background-color: black;
500
+ border: 5px solid white;
501
+ color: white;
502
+ }
503
+
504
+ .mapp-ib-dark .mapp-ib-tip {
505
+ height: 10px;
506
+ }
507
+
508
+ .mapp-ib-dark .mapp-ib-tip:before, .mapp-ib-dark .mapp-ib-tip:after {
509
+ border: 15px solid transparent;
510
+ }
511
+
512
+ .mapp-ib-dark .mapp-ib-tip:before {
513
+ border-top: 15px solid white;
514
+ border-bottom: none;
515
+ left: -15px;
516
+ top: -4px;
517
+ }
518
 
519
+ .mapp-ib-dark .mapp-ib-tip:after {
520
+ border: 10px solid transparent;
521
+ border-top: 10px solid black;
522
+ border-bottom: none;
523
+ content: "";
524
+ left: -10px;
525
+ position: absolute;
526
+ top: -6px
527
  }
528
 
529
+ .mapp-ib-light .mapp-ib {
530
+ background-color: white;
531
+ box-shadow: 10px 10px 0px rgb(0 0 0 / 40%);
532
+ border: 5px solid black;
533
+ color: black;
534
+ }
535
+
536
+ .mapp-ib-light .mapp-ib-tip {
537
+ height: 10px;
538
+ }
539
+
540
+ .mapp-ib-light .mapp-ib-tip:before, .mapp-ib-light .mapp-ib-tip:after {
541
+ border: 15px solid transparent;
542
+ }
543
+
544
+ .mapp-ib-light .mapp-ib-tip:before {
545
+ border-top: 15px solid black;
546
+ border-bottom: none;
547
+ left: -15px;
548
+ top: -4px;
549
+ }
550
+
551
+ .mapp-ib-light .mapp-ib-tip:after {
552
+ border: 10px solid transparent;
553
+ border-top: 10px solid white;
554
+ border-bottom: none;
555
+ content: "";
556
+ left: -10px;
557
+ position: absolute;
558
+ top: -6px
559
+ }
560
+
561
+ /*
562
+ -----------------------------------------------------------------------------------
563
+ Popup
564
+ -----------------------------------------------------------------------------------
565
+ */
566
+
567
  .mapp-iw {
568
  display: flex;
569
  flex-direction: column;
571
  overflow: hidden;
572
  }
573
 
574
+ .mapp-iw * {
575
+ font-size: 13px;
576
+ }
577
+
578
+ /* Gutenberg messes up IW fonts */
579
+ .block-editor-page .mapp-iw * {
580
+ font-size: 13px !important;
581
+ }
582
+
583
+ /* Override common theme / user agent styles that interfere */
584
  .mapp-layout .mapp-iw * {
585
  color: black;
586
+ line-height: normal;
587
  margin: 0;
588
  padding: 0;
589
  }
590
 
591
+ /* Try to constrain oembeds to container */
592
+ .mapp-iw iframe {
593
+ max-height: 100%;
594
+ max-width: 100%;
595
+ }
596
+
597
  .mapp-iw p {
598
+ margin: 5px 0 5px 0 !important;
599
  }
600
 
601
  .mapp-iw .mapp-body {
606
 
607
  .mapp-iw .mapp-title {
608
  font-weight: bold;
609
+ padding-bottom: 10px;
610
  }
611
 
612
  /* Thumbnails */
613
  .mapp-iw .mapp-body .wp-post-image {
 
614
  vertical-align: top;
615
  float: left;
616
  margin: 3px 3px 3px 0px;
617
+ padding: 0;
618
  width: 32px;
619
  height: 32px;
620
  }
634
  text-decoration: none !important;
635
  }
636
 
637
+ /* Add padding for IB, IW/Leaflet do it by default */
638
+ .mapp-ib .mapp-iw {
639
+ padding: 10px;
640
+ }
641
+
642
  /*
643
  -----------------------------------------------------------------------------------
644
+ Tooltips
645
  -----------------------------------------------------------------------------------
646
  */
647
 
648
+ /* Always make tooltip <= 50% height, since they need room to flip */
649
+ .mapp-ib-tooltip {
650
+ max-height: 50%;
 
651
  }
652
 
653
+ /* No point having scrollbar on a tooltip */
654
+ .mapp-ib-tooltip .mapp-iw {
655
+ overflow: hidden;
656
+ padding: 10px;
657
  }
658
 
 
 
 
 
 
659
 
660
+ /*
661
+ -----------------------------------------------------------------------------------
662
+ IB Animations
663
+ -----------------------------------------------------------------------------------
664
+ */
665
+
666
+ @keyframes floatdown {
667
+ from { margin-top: 0 }
668
+ to { margin-top: 5px }
669
  }
670
 
671
+ @keyframes floatup {
672
+ from { margin-top: 0 }
673
+ to { margin-top: -5px }
 
674
  }
675
 
676
+ .mapp-ib-wrapper.mapp-ib-float {
677
+ animation: floatup 0.4s forwards;
678
+ }
679
+
680
+ .mapp-ib-wrapper.mapp-ib-flip.mapp-ib-float {
681
+ animation: floatdown 0.4s forwards;
 
 
 
 
 
 
 
 
 
682
  }
683
 
684
+
685
  /*
686
  -----------------------------------------------------------------------------------
687
  Layouts
791
  display: none;
792
  padding: 10px;
793
  position: relative;
794
+ max-width: 45%;
795
  overflow: auto;
796
  width: 250px;
797
  }
888
  position: absolute;
889
  top: 0; left: 0; bottom: 0;
890
  width: 150px;
891
+ z-index: 1010;
892
  }
893
 
894
  .mapp-menu-item {
1013
 
1014
  .mapp-button-submit {
1015
  color: #4285F4;
1016
+ }
css/mappress_admin.css CHANGED
@@ -24,6 +24,11 @@
24
  border: 1px solid black;
25
  }
26
 
 
 
 
 
 
27
  /*
28
  -----------------------------------------------------------------------------------
29
  Map library
@@ -202,17 +207,17 @@
202
  background-color: #f6f6f6;
203
  }
204
 
205
- .mapp-pick-col-map-title {
206
  overflow: hidden;
207
  text-overflow: ellipsis;
208
  white-space: nowrap;
 
 
 
209
  width: 35%;
210
  }
211
 
212
  .mapp-pick-col-post-title {
213
- overflow: hidden;
214
- text-overflow: ellipsis;
215
- white-space: nowrap;
216
  width: 35%;
217
  }
218
 
@@ -227,6 +232,7 @@
227
  }
228
 
229
  .mapp-pick-col-actions {
 
230
  font-weight: normal;
231
  white-space: nowrap;
232
  width: 100px;
@@ -258,6 +264,7 @@
258
  display: flex;
259
  flex-direction: column;
260
  flex: 1;
 
261
  }
262
 
263
  .mapp-edit .mapp-gt {
@@ -274,7 +281,7 @@
274
 
275
  .mapp-edit .mapp-wrapper {
276
  height: 100% !important;
277
- padding-bottom: none;
278
  }
279
 
280
  .mapp-edit-title input {
@@ -712,12 +719,22 @@ button.mapp-query-refresh {
712
  -----------------------------------------------------------------------------------
713
  */
714
 
 
 
 
 
 
 
 
 
 
 
715
  .mapp-iw-edit {
716
  display: flex;
 
717
  flex-direction: column;
718
- height: 350px;
719
  overflow: auto;
720
- width: 400px;
721
  }
722
 
723
  .mapp-poi-header {
@@ -813,8 +830,37 @@ button.mapp-query-refresh {
813
  white-space: nowrap;
814
  }
815
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
  .mapp-settings-toolbar {
817
- margin-top: 10px;
 
 
 
 
818
  }
819
 
820
  /* Hidden submit buttons to use as form default */
@@ -1014,6 +1060,41 @@ a.mapp-check-account {
1014
  padding: 5px;
1015
  }
1016
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1017
 
1018
  /*
1019
  -----------------------------------------------------------------------------------
@@ -1047,7 +1128,9 @@ a.mapp-check-account {
1047
  }
1048
 
1049
  .mapp-tp-detail .mapp-tp-toolbar {
 
1050
  border-top: 1px solid lightgray;
 
1051
  margin-top: 5px;
1052
  padding: 5px;
1053
  }
24
  border: 1px solid black;
25
  }
26
 
27
+ /* GT editor interferes with Leaflet controls */
28
+ .leaflet-control-layers label {
29
+ font-weight: normal;
30
+ }
31
+
32
  /*
33
  -----------------------------------------------------------------------------------
34
  Map library
207
  background-color: #f6f6f6;
208
  }
209
 
210
+ .mapp-pick-col-map-title, .mapp-pick-col-post-title, .mapp-pick-col-mapid {
211
  overflow: hidden;
212
  text-overflow: ellipsis;
213
  white-space: nowrap;
214
+ }
215
+
216
+ .mapp-pick-col-map-title {
217
  width: 35%;
218
  }
219
 
220
  .mapp-pick-col-post-title {
 
 
 
221
  width: 35%;
222
  }
223
 
232
  }
233
 
234
  .mapp-pick-col-actions {
235
+ display: flex;
236
  font-weight: normal;
237
  white-space: nowrap;
238
  width: 100px;
264
  display: flex;
265
  flex-direction: column;
266
  flex: 1;
267
+ overflow: hidden;
268
  }
269
 
270
  .mapp-edit .mapp-gt {
281
 
282
  .mapp-edit .mapp-wrapper {
283
  height: 100% !important;
284
+ padding-bottom: 0px;
285
  }
286
 
287
  .mapp-edit-title input {
719
  -----------------------------------------------------------------------------------
720
  */
721
 
722
+ .mapp-ib-wrapper.mapp-ib-edit {
723
+ height: 100%;
724
+ max-width: 550px;
725
+ width: 100%;
726
+ }
727
+
728
+ .mapp-ib-wrapper.mapp-ib-edit .mapp-ib {
729
+ flex: 1;
730
+ }
731
+
732
  .mapp-iw-edit {
733
  display: flex;
734
+ flex: 1;
735
  flex-direction: column;
 
736
  overflow: auto;
737
+ padding: 10px;
738
  }
739
 
740
  .mapp-poi-header {
830
  white-space: nowrap;
831
  }
832
 
833
+ .mapp-settings-toolbar-top {
834
+ align-items: baseline;
835
+ background-color: #f0f0f0;
836
+ border-bottom: 1px solid gray;
837
+ display: flex;
838
+ justify-content: space-between;
839
+ top: 30px;
840
+ padding: 0px 10px 10px 10px;
841
+ position: sticky;
842
+ z-index: 10000;
843
+ }
844
+
845
+ .mapp-settings-toolbar-top-header {
846
+ display: flex;
847
+ align-items: baseline;
848
+ }
849
+
850
+ .mapp-settings-toolbar-top-header h1 {
851
+ margin-right: 10px;
852
+ }
853
+
854
+ .mapp-settings-toolbar-top-links a {
855
+ margin: 0 5px;
856
+ }
857
+
858
  .mapp-settings-toolbar {
859
+ background-color: #f0f0f0;
860
+ border-top: 1px solid gray;
861
+ bottom: 0;
862
+ padding: 10px;
863
+ position: sticky;
864
  }
865
 
866
  /* Hidden submit buttons to use as form default */
1060
  padding: 5px;
1061
  }
1062
 
1063
+ /*
1064
+ -----------------------------------------------------------------------------------
1065
+ Post attachment control + popup
1066
+ -----------------------------------------------------------------------------------
1067
+ */
1068
+
1069
+ .mapp-attach-control {
1070
+ max-width: 360px;
1071
+ width: 90vw;
1072
+ }
1073
+
1074
+ .mapp-attach-items {
1075
+ max-height: 200px;
1076
+ overflow: auto;
1077
+ }
1078
+
1079
+ .mapp-attach-item {
1080
+ display: flex;
1081
+ flex-direction: row;
1082
+ padding: 10px;
1083
+ }
1084
+
1085
+ .mapp-attach-item:hover {
1086
+ background-color: #ddd;
1087
+ }
1088
+
1089
+ .mapp-attach-item-title {
1090
+ flex: 1;
1091
+ }
1092
+
1093
+ .mapp-attach-item-type {
1094
+ background-color: #f0f0f0;
1095
+ padding: 3px 8px;
1096
+ }
1097
+
1098
 
1099
  /*
1100
  -----------------------------------------------------------------------------------
1128
  }
1129
 
1130
  .mapp-tp-detail .mapp-tp-toolbar {
1131
+ align-items: center;
1132
  border-top: 1px solid lightgray;
1133
+ display: flex;
1134
  margin-top: 5px;
1135
  padding: 5px;
1136
  }
languages/mappress-google-maps-for-wordpress.mo DELETED
Binary file
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: MapPress Maps for WordPress 2.57.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-12-17T16:35:51+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
@@ -33,161 +33,165 @@ msgstr ""
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
- #: mappress.php:171
37
- #: mappress.php:701
38
  msgid "Settings"
39
  msgstr ""
40
 
41
- #: mappress.php:172
42
  msgid "Map Library"
43
  msgstr ""
44
 
45
- #: mappress.php:183
46
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
47
  msgstr ""
48
 
49
- #: mappress.php:188
50
  msgid "A Google Maps API key is required"
51
  msgstr ""
52
 
53
- #: mappress.php:188
54
  msgid "Please update your"
55
  msgstr ""
56
 
57
- #: mappress.php:188
58
  msgid "MapPress Settings"
59
  msgstr ""
60
 
61
- #: mappress.php:280
62
  msgid "OK, you deserve it!"
63
  msgstr ""
64
 
65
- #: mappress.php:281
66
  msgid "Nope, maybe later"
67
  msgstr ""
68
 
69
- #: mappress.php:282
70
- msgid "I neeed some help"
71
  msgstr ""
72
 
73
- #: mappress.php:284
74
  msgid "Please Help Spread the Word"
75
  msgstr ""
76
 
77
- #: mappress.php:285
78
  msgid "If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!"
79
  msgstr ""
80
 
81
- #: mappress.php:286
82
  msgid "If you have any issues or suggestions, please let me know. I'll be happy to help!"
83
  msgstr ""
84
 
85
- #: mappress.php:402
86
- #: mappress.php:931
87
- msgid "Version"
88
- msgstr ""
89
-
90
- #: mappress.php:404
91
- msgid "Help"
92
  msgstr ""
93
 
94
- #: mappress.php:406
95
- msgid "Upgrade to MapPress Pro"
96
  msgstr ""
97
 
98
- #: mappress.php:473
99
  msgid "Please enter your MapPress license key to enable plugin updates"
100
  msgstr ""
101
 
102
- #: mappress.php:477
103
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
104
  msgstr ""
105
 
106
- #: mappress.php:481
107
  msgid "MapPress has many new features! Please take a moment to learn %s."
108
  msgstr ""
109
 
110
- #: mappress.php:481
111
  msgid "what's new"
112
  msgstr ""
113
 
114
- #: mappress.php:487
115
  msgid "The MapPress map editor has moved!"
116
  msgstr ""
117
 
118
- #: mappress.php:488
119
  msgid "Use this button to open the new popup editor where you can easily create, edit and insert maps."
120
  msgstr ""
121
 
122
- #: mappress.php:534
123
  msgid "Are you sure you want to delete?"
124
  msgstr ""
125
 
126
- #: mappress.php:535
127
  msgid "Permanently delete this map from the map library?"
128
  msgstr ""
129
 
130
- #: mappress.php:536
131
  msgid "Error reading KML file"
132
  msgstr ""
133
 
134
- #: mappress.php:537
135
  msgid "URL for KML file"
136
  msgstr ""
137
 
138
- #: mappress.php:538
139
  msgid "Loading"
140
  msgstr ""
141
 
142
- #: mappress.php:539
143
  msgid "Please select a classic editor block to insert into."
144
  msgstr ""
145
 
146
- #: mappress.php:540
147
  msgid "Unable to get your location"
148
  msgstr ""
149
 
150
- #: mappress.php:541
151
  msgid "No results"
152
  msgstr ""
153
 
154
- #: mappress.php:542
155
  msgid "Save changes?"
156
  msgstr ""
157
 
158
- #: mappress.php:543
159
  msgid "Shape"
160
  msgstr ""
161
 
162
- #: mappress.php:572
163
  msgid "Improve this map"
164
  msgstr ""
165
 
166
- #: mappress.php:588
167
- #: mappress.php:607
168
  msgid "Streets"
169
  msgstr ""
170
 
171
- #: mappress.php:589
172
  msgid "Outdoors"
173
  msgstr ""
174
 
175
- #: mappress.php:590
176
  msgid "Light"
177
  msgstr ""
178
 
179
- #: mappress.php:591
180
  msgid "Dark"
181
  msgstr ""
182
 
183
- #: mappress.php:592
184
  msgid "Satellite"
185
  msgstr ""
186
 
187
- #: mappress.php:593
188
  msgid "Satellite Streets"
189
  msgstr ""
190
 
 
 
 
 
 
 
 
 
 
191
  #: mappress_controls.php:93
192
  #: templates_admin/widgets.php:42
193
  msgid "Add"
@@ -195,274 +199,287 @@ msgstr ""
195
 
196
  #: mappress_controls.php:102
197
  #: templates_admin/editor.php:47
198
- #: templates_admin/mce.php:100
199
  #: templates_admin/widgets.php:94
200
  msgid "Delete"
201
  msgstr ""
202
 
203
- #: mappress_map.php:85
204
- #: mappress_settings.php:321
205
- #: templates/mappress_map.php:85
206
  msgid "MapPress"
207
  msgstr ""
208
 
209
- #: mappress_map.php:94
210
- #: templates/mappress_map.php:94
211
- #: templates_admin/mce.php:30
212
- #: templates_admin/mce.php:80
213
- #: templates_admin/mce.php:86
214
  msgid "Untitled"
215
  msgstr ""
216
 
217
- #: mappress_map.php:95
218
- #: templates/mappress_map.php:95
219
  msgid "Copy of %s"
220
  msgstr ""
221
 
222
- #: mappress_map.php:199
223
- #: templates/mappress_map.php:199
224
  msgid "Map not found"
225
  msgstr ""
226
 
227
- #: mappress_settings.php:86
228
  msgid "Sample Map"
229
  msgstr ""
230
 
231
- #: mappress_settings.php:88
232
  msgid "Basic Settings"
233
  msgstr ""
234
 
235
- #: mappress_settings.php:89
236
  msgid "Mapping API"
237
  msgstr ""
238
 
239
- #: mappress_settings.php:92
240
  msgid "Google API key"
241
  msgstr ""
242
 
243
- #: mappress_settings.php:95
244
  msgid "Mapbox access token"
245
  msgstr ""
246
 
247
- #: mappress_settings.php:99
248
  msgid "License"
249
  msgstr ""
250
 
251
- #: mappress_settings.php:101
252
  msgid "Map Settings"
253
  msgstr ""
254
 
255
- #: mappress_settings.php:102
256
  msgid "Post types"
257
  msgstr ""
258
 
259
- #: mappress_settings.php:103
260
  msgid "Automatic display"
261
  msgstr ""
262
 
263
- #: mappress_settings.php:104
264
  msgid "Map alignment"
265
  msgstr ""
266
 
267
- #: mappress_settings.php:105
268
  #: templates/map-popup.php:3
269
  #: templates/mashup-popup.php:6
270
  msgid "Directions"
271
  msgstr ""
272
 
273
- #: mappress_settings.php:108
274
  msgid "POI Settings"
275
  msgstr ""
276
 
277
- #: mappress_settings.php:109
278
  msgid "Default zoom"
279
  msgstr ""
280
 
281
- #: mappress_settings.php:110
282
- #: mappress_settings.php:238
283
  msgid "Open first POI"
284
  msgstr ""
285
 
286
- #: mappress_settings.php:113
287
  msgid "Mashups"
288
  msgstr ""
289
 
290
- #: mappress_settings.php:114
291
  msgid "Icons"
292
  msgstr ""
293
 
294
- #: mappress_settings.php:115
295
  msgid "Styled Maps"
296
  msgstr ""
297
 
298
- #: mappress_settings.php:116
299
  msgid "Geocoding"
300
  msgstr ""
301
 
302
- #: mappress_settings.php:117
303
  msgid "Templates"
304
  msgstr ""
305
 
306
- #: mappress_settings.php:120
307
  msgid "Localization"
308
  msgstr ""
309
 
310
- #: mappress_settings.php:121
311
  msgid "Search language"
312
  msgstr ""
313
 
314
- #: mappress_settings.php:122
315
  msgid "Search country"
316
  msgstr ""
317
 
318
- #: mappress_settings.php:123
319
  msgid "Directions server"
320
  msgstr ""
321
 
322
- #: mappress_settings.php:125
323
  msgid "Miscellaneous"
324
  msgstr ""
325
 
326
- #: mappress_settings.php:126
327
  msgid "Map sizes"
328
  msgstr ""
329
 
330
- #: mappress_settings.php:127
331
  msgid "Scripts"
332
  msgstr ""
333
 
334
- #: mappress_settings.php:131
335
  msgid "Compatiblity"
336
  msgstr ""
337
 
338
- #: mappress_settings.php:175
339
- #: mappress_settings.php:244
340
- #: pro/mappress_pro_settings.php:234
341
  #: templates_admin/widgets.php:78
342
  msgid "Default"
343
  msgstr ""
344
 
345
- #: mappress_settings.php:176
346
  msgid "Center"
347
  msgstr ""
348
 
349
- #: mappress_settings.php:177
350
  msgid "Left"
351
  msgstr ""
352
 
353
- #: mappress_settings.php:178
354
  msgid "Right"
355
  msgstr ""
356
 
357
- #: mappress_settings.php:190
 
358
  msgid "None"
359
  msgstr ""
360
 
361
- #: mappress_settings.php:191
362
  msgid "Top of post"
363
  msgstr ""
364
 
365
- #: mappress_settings.php:192
366
  msgid "Bottom of post"
367
  msgstr ""
368
 
369
- #: mappress_settings.php:199
370
- #: mappress_settings.php:243
371
  msgid "(list)"
372
  msgstr ""
373
 
374
- #: mappress_settings.php:204
375
  msgid "Country code for searches"
376
  msgstr ""
377
 
378
- #: mappress_settings.php:208
379
  msgid "Prevent other plugins/themes from loading the Google Maps API"
380
  msgstr ""
381
 
382
- #: mappress_settings.php:212
383
- #: mappress_settings.php:221
384
- #: pro/mappress_pro_settings.php:232
385
  msgid "Google"
386
  msgstr ""
387
 
388
- #: mappress_settings.php:212
389
  msgid "Inline"
390
  msgstr ""
391
 
392
- #: mappress_settings.php:221
393
  msgid "Leaflet"
394
  msgstr ""
395
 
396
- #: mappress_settings.php:223
397
  msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
398
  msgstr ""
399
 
400
- #: mappress_settings.php:229
401
- #: mappress_settings.php:232
402
  msgid "Output scripts in footer"
403
  msgstr ""
404
 
405
- #: mappress_settings.php:230
406
  msgid "Disabled because Jetpack Infinite Scroll is active"
407
  msgstr ""
408
 
409
- #: mappress_settings.php:233
410
  msgid "disable if maps are output using AJAX"
411
  msgstr ""
412
 
413
- #: mappress_settings.php:246
414
  msgid "Language for searches and Google map controls"
415
  msgstr ""
416
 
417
- #: mappress_settings.php:250
418
  msgid "Enter token to use Mapbox map tiles"
419
  msgstr ""
420
 
421
- #: mappress_settings.php:257
422
- #: mappress_settings.php:262
423
  msgid "Map type control"
424
  msgstr ""
425
 
426
- #: mappress_settings.php:258
427
  msgid "Street view control"
428
  msgstr ""
429
 
430
- #: mappress_settings.php:259
431
  #: mappress_settings.php:263
 
432
  msgid "Zoom control"
433
  msgstr ""
434
 
435
- #: mappress_settings.php:278
436
  msgid "Default zoom when displaying a single POI"
437
  msgstr ""
438
 
439
- #: mappress_settings.php:291
440
  msgid "Easy Google Maps"
441
  msgstr ""
442
 
443
- #: mappress_settings.php:299
444
  msgid "Width (px, %, vh, vw)"
445
  msgstr ""
446
 
447
- #: mappress_settings.php:299
448
  msgid "Height (px, %, vh, vw)"
449
  msgstr ""
450
 
451
- #: mappress_settings.php:299
452
  msgid "Default size"
453
  msgstr ""
454
 
455
- #: mappress_settings.php:314
 
 
 
 
456
  msgid "Copy maps when overwriting a translation"
457
  msgstr ""
458
 
459
- #: mappress_settings.php:326
460
- #: mappress_settings.php:334
 
 
 
 
 
 
 
 
 
 
 
 
461
  msgid "Save Changes"
462
  msgstr ""
463
 
464
- #: mappress_settings.php:327
465
- #: mappress_settings.php:335
466
  msgid "Reset Defaults"
467
  msgstr ""
468
 
@@ -471,13 +488,14 @@ msgid "Address"
471
  msgstr ""
472
 
473
  #: mappress_template.php:35
474
- #: pro/mappress_pro_settings.php:338
475
  msgid "Body"
476
  msgstr ""
477
 
478
  #: mappress_template.php:36
479
- #: pro/mappress_pro_settings.php:174
480
- #: pro/mappress_pro_settings.php:338
 
481
  msgid "Icon"
482
  msgstr ""
483
 
@@ -486,7 +504,7 @@ msgid "Thumbnail"
486
  msgstr ""
487
 
488
  #: mappress_template.php:38
489
- #: pro/mappress_pro_settings.php:338
490
  msgid "Title"
491
  msgstr ""
492
 
@@ -496,13 +514,13 @@ msgstr ""
496
 
497
  #: mappress_template.php:40
498
  #: pro/mappress_filter.php:120
499
- #: pro/mappress_pro_settings.php:343
500
  msgid "Custom Field"
501
  msgstr ""
502
 
503
  #: pro/mappress_filter.php:84
504
  #: pro/mappress_filter.php:133
505
- #: pro/mappress_pro_settings.php:167
506
  msgid "Post type"
507
  msgstr ""
508
 
@@ -585,303 +603,311 @@ msgstr ""
585
  msgid "Clustering"
586
  msgstr ""
587
 
588
- #: pro/mappress_pro_settings.php:30
589
  msgid "Popup type"
590
  msgstr ""
591
 
592
- #: pro/mappress_pro_settings.php:32
593
  msgid "Default icon"
594
  msgstr ""
595
 
596
- #: pro/mappress_pro_settings.php:33
597
  msgid "Icon directory"
598
  msgstr ""
599
 
600
- #: pro/mappress_pro_settings.php:34
601
  msgid "Custom icons"
602
  msgstr ""
603
 
604
- #: pro/mappress_pro_settings.php:35
605
- msgid "Icon scaling"
606
  msgstr ""
607
 
608
  #: pro/mappress_pro_settings.php:36
 
 
 
 
609
  msgid "Automatic icons"
610
  msgstr ""
611
 
612
- #: pro/mappress_pro_settings.php:38
613
- #: templates/map.php:51
614
- #: templates_admin/mce.php:13
615
  msgid "Search"
616
  msgstr ""
617
 
618
- #: pro/mappress_pro_settings.php:40
619
- #: templates/map.php:58
620
  msgid "Filter"
621
  msgstr ""
622
 
623
- #: pro/mappress_pro_settings.php:41
624
  msgid "POI content"
625
  msgstr ""
626
 
627
- #: pro/mappress_pro_settings.php:42
628
  msgid "POI click"
629
  msgstr ""
630
 
631
- #: pro/mappress_pro_settings.php:43
632
  msgid "KMLs"
633
  msgstr ""
634
 
635
- #: pro/mappress_pro_settings.php:44
636
  msgid "Thumbnails"
637
  msgstr ""
638
 
639
- #: pro/mappress_pro_settings.php:45
640
  msgid "Thumbnail size"
641
  msgstr ""
642
 
643
- #: pro/mappress_pro_settings.php:48
644
- #: pro/mappress_pro_settings.php:50
645
  msgid "Styled maps"
646
  msgstr ""
647
 
648
- #: pro/mappress_pro_settings.php:51
649
  msgid "Default style"
650
  msgstr ""
651
 
652
- #: pro/mappress_pro_settings.php:54
653
  msgid "Geocoding fields"
654
  msgstr ""
655
 
656
- #: pro/mappress_pro_settings.php:55
657
  msgid "Overwrite"
658
  msgstr ""
659
 
660
- #: pro/mappress_pro_settings.php:56
661
  msgid "Geocoding errors"
662
  msgstr ""
663
 
664
- #: pro/mappress_pro_settings.php:59
665
  msgid "Google Server API key"
666
  msgstr ""
667
 
668
- #: pro/mappress_pro_settings.php:61
669
  msgid "Custom templates"
670
  msgstr ""
671
 
672
- #: pro/mappress_pro_settings.php:62
673
- #: pro/mappress_pro_settings.php:227
674
  msgid "Force resize"
675
  msgstr ""
676
 
677
- #: pro/mappress_pro_settings.php:154
678
  msgid "more info"
679
  msgstr ""
680
 
681
- #: pro/mappress_pro_settings.php:155
682
  msgid "API key secured by IP address for geocoding (optional)"
683
  msgstr ""
684
 
685
- #: pro/mappress_pro_settings.php:174
686
  msgid "Value"
687
  msgstr ""
688
 
689
- #: pro/mappress_pro_settings.php:189
690
  msgid "Enable updates for beta versions"
691
  msgstr ""
692
 
693
- #: pro/mappress_pro_settings.php:193
694
  msgid "Enable marker clustering"
695
  msgstr ""
696
 
697
- #: pro/mappress_pro_settings.php:202
698
  msgid "Checkboxes"
699
  msgstr ""
700
 
701
- #: pro/mappress_pro_settings.php:202
702
  msgid "Select"
703
  msgstr ""
704
 
705
- #: pro/mappress_pro_settings.php:209
706
  msgid "Key"
707
  msgstr ""
708
 
709
- #: pro/mappress_pro_settings.php:209
710
  msgid "Format"
711
  msgstr ""
712
 
713
- #: pro/mappress_pro_settings.php:224
714
  msgid "Permanently resize existing maps (classic editor only)"
715
  msgstr ""
716
 
717
- #: pro/mappress_pro_settings.php:226
718
  msgid "from %s to %s"
719
  msgstr ""
720
 
721
- #: pro/mappress_pro_settings.php:234
722
  msgid "Algolia"
723
  msgstr ""
724
 
725
- #: pro/mappress_pro_settings.php:235
726
  msgid "Nominatim"
727
  msgstr ""
728
 
729
- #: pro/mappress_pro_settings.php:236
730
  msgid "MapBox"
731
  msgstr ""
732
 
733
- #: pro/mappress_pro_settings.php:246
 
 
 
 
734
  #: templates_admin/widgets.php:68
735
  msgid "Edit"
736
  msgstr ""
737
 
738
- #: pro/mappress_pro_settings.php:260
739
  msgid "Standard"
740
  msgstr ""
741
 
742
- #: pro/mappress_pro_settings.php:261
743
  msgid "InfoBox"
744
  msgstr ""
745
 
746
- #: pro/mappress_pro_settings.php:268
747
  msgid "Left of map"
748
  msgstr ""
749
 
750
- #: pro/mappress_pro_settings.php:269
751
  msgid "Below map"
752
  msgstr ""
753
 
754
- #: pro/mappress_pro_settings.php:275
755
  msgid "Get license"
756
  msgstr ""
757
 
758
- #: pro/mappress_pro_settings.php:276
759
  msgid "Enter license to enable automatic updates"
760
  msgstr ""
761
 
762
- #: pro/mappress_pro_settings.php:289
763
  msgid "Active"
764
  msgstr ""
765
 
766
- #: pro/mappress_pro_settings.php:294
767
  msgid "Check now"
768
  msgstr ""
769
 
770
- #: pro/mappress_pro_settings.php:299
771
  #: pro/mappress_updater.php:116
772
  msgid "Communication error, please try again later"
773
  msgstr ""
774
 
775
- #: pro/mappress_pro_settings.php:301
776
  msgid "License is invalid or expired"
777
  msgstr ""
778
 
779
- #: pro/mappress_pro_settings.php:305
780
  msgid "POI title + POI body"
781
  msgstr ""
782
 
783
- #: pro/mappress_pro_settings.php:305
784
  msgid "Post title + post excerpt"
785
  msgstr ""
786
 
787
- #: pro/mappress_pro_settings.php:310
788
  msgid "Open POI"
789
  msgstr ""
790
 
791
- #: pro/mappress_pro_settings.php:310
792
  msgid "Open post"
793
  msgstr ""
794
 
795
- #: pro/mappress_pro_settings.php:310
796
  msgid "Open post in new tab"
797
  msgstr ""
798
 
799
- #: pro/mappress_pro_settings.php:315
800
  msgid "Include KML POIs in mashups"
801
  msgstr ""
802
 
803
- #: pro/mappress_pro_settings.php:327
804
  msgid "%d Errors"
805
  msgstr ""
806
 
807
- #: pro/mappress_pro_settings.php:337
808
  msgid "Address line "
809
  msgstr ""
810
 
811
- #: pro/mappress_pro_settings.php:338
812
  msgid "Latitude"
813
  msgstr ""
814
 
815
- #: pro/mappress_pro_settings.php:338
816
  msgid "Longitude"
817
  msgstr ""
818
 
819
- #: pro/mappress_pro_settings.php:338
820
  msgid "Zoom"
821
  msgstr ""
822
 
823
- #: pro/mappress_pro_settings.php:343
824
  msgid "Map Field"
825
  msgstr ""
826
 
827
- #: pro/mappress_pro_settings.php:356
828
  msgid "Overwrite maps when posts are saved"
829
  msgstr ""
830
 
831
- #: pro/mappress_pro_settings.php:361
832
  msgid "Width (px) at which to collapse the left POI list"
833
  msgstr ""
834
 
835
- #: pro/mappress_pro_settings.php:365
836
  msgid "Show a list of POIs with each map"
837
  msgstr ""
838
 
839
- #: pro/mappress_pro_settings.php:373
840
  msgid "Enable search"
841
  msgstr ""
842
 
843
- #: pro/mappress_pro_settings.php:377
844
  msgid "Sort POI list by title"
845
  msgstr ""
846
 
847
- #: pro/mappress_pro_settings.php:383
848
  msgid "No styles have been defined yet"
849
  msgstr ""
850
 
851
- #: pro/mappress_pro_settings.php:392
852
  msgid "Snazzy Maps"
853
  msgstr ""
854
 
855
- #: pro/mappress_pro_settings.php:393
856
  msgid "Enter JSON from %s"
857
  msgstr ""
858
 
859
- #: pro/mappress_pro_settings.php:397
860
- #: pro/mappress_pro_settings.php:413
861
  msgid "Style name"
862
  msgstr ""
863
 
864
- #: pro/mappress_pro_settings.php:409
865
  msgid "Mapbox Studio"
866
  msgstr ""
867
 
868
- #: pro/mappress_pro_settings.php:410
869
  msgid "Enter styles from %s"
870
  msgstr ""
871
 
872
- #: pro/mappress_pro_settings.php:428
873
  msgid "Only admins or multisite super-admins can edit templates"
874
  msgstr ""
875
 
876
- #: pro/mappress_pro_settings.php:433
877
  msgid "WordPress 4.9 or higher is needed to use the template editor."
878
  msgstr ""
879
 
880
- #: pro/mappress_pro_settings.php:447
881
  msgid "or "
882
  msgstr ""
883
 
884
- #: pro/mappress_pro_settings.php:455
885
  msgid "Show featured image thumbnails in mashup POIs"
886
  msgstr ""
887
 
@@ -939,8 +965,8 @@ msgid "Example: initialopeninfo=\"true\""
939
  msgstr ""
940
 
941
  #: pro/mappress_widget_map.php:61
942
- #: templates_admin/mce.php:49
943
- #: templates_admin/mce.php:69
944
  msgid "Map ID"
945
  msgstr ""
946
 
@@ -964,35 +990,35 @@ msgstr ""
964
  msgid "Results"
965
  msgstr ""
966
 
967
- #: templates/map.php:53
968
  msgid "Your Location"
969
  msgstr ""
970
 
971
- #: templates/map.php:67
972
  msgid "Menu"
973
  msgstr ""
974
 
975
- #: templates/map.php:69
976
  msgid "Center map"
977
  msgstr ""
978
 
979
- #: templates/map.php:72
980
  msgid "Traffic"
981
  msgstr ""
982
 
983
- #: templates/map.php:73
984
  msgid "Bicycling"
985
  msgstr ""
986
 
987
- #: templates/map.php:74
988
  msgid "Transit"
989
  msgstr ""
990
 
991
- #: templates/map.php:84
992
  msgid "Show List"
993
  msgstr ""
994
 
995
- #: templates/map.php:85
996
  msgid "Show Map"
997
  msgstr ""
998
 
@@ -1009,13 +1035,13 @@ msgid "Add Media"
1009
  msgstr ""
1010
 
1011
  #: templates_admin/editor.php:45
1012
- #: templates_admin/mce.php:55
1013
  #: templates_admin/widgets.php:91
1014
  msgid "Save"
1015
  msgstr ""
1016
 
1017
  #: templates_admin/editor.php:46
1018
- #: templates_admin/mce.php:56
1019
  #: templates_admin/widgets.php:92
1020
  msgid "Cancel"
1021
  msgstr ""
@@ -1028,55 +1054,55 @@ msgstr ""
1028
  msgid "Add New"
1029
  msgstr ""
1030
 
1031
- #: templates_admin/mce.php:14
1032
  msgid "post title"
1033
  msgstr ""
1034
 
1035
- #: templates_admin/mce.php:18
1036
  msgid "Attached to this post"
1037
  msgstr ""
1038
 
1039
- #: templates_admin/mce.php:19
1040
  msgid "All maps"
1041
  msgstr ""
1042
 
1043
- #: templates_admin/mce.php:24
1044
  msgid "Close"
1045
  msgstr ""
1046
 
1047
- #: templates_admin/mce.php:35
1048
  msgid "Size"
1049
  msgstr ""
1050
 
1051
- #: templates_admin/mce.php:59
1052
  msgid "Save center / zoom"
1053
  msgstr ""
1054
 
1055
- #: templates_admin/mce.php:68
1056
  msgid "Map title"
1057
  msgstr ""
1058
 
1059
- #: templates_admin/mce.php:71
1060
  msgid "Attached to"
1061
  msgstr ""
1062
 
1063
- #: templates_admin/mce.php:73
1064
  msgid "Action"
1065
  msgstr ""
1066
 
1067
- #: templates_admin/mce.php:87
1068
  msgid "Current post"
1069
  msgstr ""
1070
 
1071
- #: templates_admin/mce.php:92
1072
  msgid "Unattached"
1073
  msgstr ""
1074
 
1075
- #: templates_admin/mce.php:99
1076
  msgid "Insert into post"
1077
  msgstr ""
1078
 
1079
- #: templates_admin/mce.php:107
1080
  msgid "No maps found"
1081
  msgstr ""
1082
 
2
  # This file is distributed under the same license as the MapPress Maps for WordPress plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: MapPress Maps for WordPress 2.58.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/mappress-google-maps-for-wordpress\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-12-24T22:24:45+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.4.0\n"
15
 
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
+ #: mappress.php:181
37
+ #: mappress.php:731
38
  msgid "Settings"
39
  msgstr ""
40
 
41
+ #: mappress.php:182
42
  msgid "Map Library"
43
  msgstr ""
44
 
45
+ #: mappress.php:193
46
  msgid "MapPress database tables are missing. Please deactivate the plugin and activate it again to fix this."
47
  msgstr ""
48
 
49
+ #: mappress.php:198
50
  msgid "A Google Maps API key is required"
51
  msgstr ""
52
 
53
+ #: mappress.php:198
54
  msgid "Please update your"
55
  msgstr ""
56
 
57
+ #: mappress.php:198
58
  msgid "MapPress Settings"
59
  msgstr ""
60
 
61
+ #: mappress.php:303
62
  msgid "OK, you deserve it!"
63
  msgstr ""
64
 
65
+ #: mappress.php:304
66
  msgid "Nope, maybe later"
67
  msgstr ""
68
 
69
+ #: mappress.php:305
70
+ msgid "I need some help!"
71
  msgstr ""
72
 
73
+ #: mappress.php:307
74
  msgid "Please Help Spread the Word"
75
  msgstr ""
76
 
77
+ #: mappress.php:308
78
  msgid "If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!"
79
  msgstr ""
80
 
81
+ #: mappress.php:309
82
  msgid "If you have any issues or suggestions, please let me know. I'll be happy to help!"
83
  msgstr ""
84
 
85
+ #: mappress.php:490
86
+ msgid "renew your license"
 
 
 
 
 
87
  msgstr ""
88
 
89
+ #: mappress.php:491
90
+ msgid "Your MapPress license has expired. Please %s to get the latest updates and prevent errors."
91
  msgstr ""
92
 
93
+ #: mappress.php:500
94
  msgid "Please enter your MapPress license key to enable plugin updates"
95
  msgstr ""
96
 
97
+ #: mappress.php:504
98
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
99
  msgstr ""
100
 
101
+ #: mappress.php:508
102
  msgid "MapPress has many new features! Please take a moment to learn %s."
103
  msgstr ""
104
 
105
+ #: mappress.php:508
106
  msgid "what's new"
107
  msgstr ""
108
 
109
+ #: mappress.php:514
110
  msgid "The MapPress map editor has moved!"
111
  msgstr ""
112
 
113
+ #: mappress.php:515
114
  msgid "Use this button to open the new popup editor where you can easily create, edit and insert maps."
115
  msgstr ""
116
 
117
+ #: mappress.php:561
118
  msgid "Are you sure you want to delete?"
119
  msgstr ""
120
 
121
+ #: mappress.php:562
122
  msgid "Permanently delete this map from the map library?"
123
  msgstr ""
124
 
125
+ #: mappress.php:563
126
  msgid "Error reading KML file"
127
  msgstr ""
128
 
129
+ #: mappress.php:564
130
  msgid "URL for KML file"
131
  msgstr ""
132
 
133
+ #: mappress.php:565
134
  msgid "Loading"
135
  msgstr ""
136
 
137
+ #: mappress.php:566
138
  msgid "Please select a classic editor block to insert into."
139
  msgstr ""
140
 
141
+ #: mappress.php:567
142
  msgid "Unable to get your location"
143
  msgstr ""
144
 
145
+ #: mappress.php:568
146
  msgid "No results"
147
  msgstr ""
148
 
149
+ #: mappress.php:569
150
  msgid "Save changes?"
151
  msgstr ""
152
 
153
+ #: mappress.php:570
154
  msgid "Shape"
155
  msgstr ""
156
 
157
+ #: mappress.php:599
158
  msgid "Improve this map"
159
  msgstr ""
160
 
161
+ #: mappress.php:615
162
+ #: mappress.php:634
163
  msgid "Streets"
164
  msgstr ""
165
 
166
+ #: mappress.php:616
167
  msgid "Outdoors"
168
  msgstr ""
169
 
170
+ #: mappress.php:617
171
  msgid "Light"
172
  msgstr ""
173
 
174
+ #: mappress.php:618
175
  msgid "Dark"
176
  msgstr ""
177
 
178
+ #: mappress.php:619
179
  msgid "Satellite"
180
  msgstr ""
181
 
182
+ #: mappress.php:620
183
  msgid "Satellite Streets"
184
  msgstr ""
185
 
186
+ #: mappress.php:732
187
+ #: mappress_settings.php:338
188
+ msgid "What's new"
189
+ msgstr ""
190
+
191
+ #: mappress.php:963
192
+ msgid "Version"
193
+ msgstr ""
194
+
195
  #: mappress_controls.php:93
196
  #: templates_admin/widgets.php:42
197
  msgid "Add"
199
 
200
  #: mappress_controls.php:102
201
  #: templates_admin/editor.php:47
202
+ #: templates_admin/mce.php:98
203
  #: templates_admin/widgets.php:94
204
  msgid "Delete"
205
  msgstr ""
206
 
207
+ #: mappress_map.php:86
208
+ #: mappress_settings.php:333
 
209
  msgid "MapPress"
210
  msgstr ""
211
 
212
+ #: mappress_map.php:95
213
+ #: templates_admin/mce.php:29
214
+ #: templates_admin/mce.php:78
215
+ #: templates_admin/mce.php:84
 
216
  msgid "Untitled"
217
  msgstr ""
218
 
219
+ #: mappress_map.php:96
 
220
  msgid "Copy of %s"
221
  msgstr ""
222
 
223
+ #: mappress_map.php:200
 
224
  msgid "Map not found"
225
  msgstr ""
226
 
227
+ #: mappress_settings.php:89
228
  msgid "Sample Map"
229
  msgstr ""
230
 
231
+ #: mappress_settings.php:91
232
  msgid "Basic Settings"
233
  msgstr ""
234
 
235
+ #: mappress_settings.php:92
236
  msgid "Mapping API"
237
  msgstr ""
238
 
239
+ #: mappress_settings.php:95
240
  msgid "Google API key"
241
  msgstr ""
242
 
243
+ #: mappress_settings.php:98
244
  msgid "Mapbox access token"
245
  msgstr ""
246
 
247
+ #: mappress_settings.php:102
248
  msgid "License"
249
  msgstr ""
250
 
251
+ #: mappress_settings.php:104
252
  msgid "Map Settings"
253
  msgstr ""
254
 
255
+ #: mappress_settings.php:105
256
  msgid "Post types"
257
  msgstr ""
258
 
259
+ #: mappress_settings.php:106
260
  msgid "Automatic display"
261
  msgstr ""
262
 
263
+ #: mappress_settings.php:107
264
  msgid "Map alignment"
265
  msgstr ""
266
 
267
+ #: mappress_settings.php:108
268
  #: templates/map-popup.php:3
269
  #: templates/mashup-popup.php:6
270
  msgid "Directions"
271
  msgstr ""
272
 
273
+ #: mappress_settings.php:111
274
  msgid "POI Settings"
275
  msgstr ""
276
 
277
+ #: mappress_settings.php:112
278
  msgid "Default zoom"
279
  msgstr ""
280
 
281
+ #: mappress_settings.php:113
282
+ #: mappress_settings.php:242
283
  msgid "Open first POI"
284
  msgstr ""
285
 
286
+ #: mappress_settings.php:117
287
  msgid "Mashups"
288
  msgstr ""
289
 
290
+ #: mappress_settings.php:118
291
  msgid "Icons"
292
  msgstr ""
293
 
294
+ #: mappress_settings.php:119
295
  msgid "Styled Maps"
296
  msgstr ""
297
 
298
+ #: mappress_settings.php:120
299
  msgid "Geocoding"
300
  msgstr ""
301
 
302
+ #: mappress_settings.php:121
303
  msgid "Templates"
304
  msgstr ""
305
 
306
+ #: mappress_settings.php:124
307
  msgid "Localization"
308
  msgstr ""
309
 
310
+ #: mappress_settings.php:125
311
  msgid "Search language"
312
  msgstr ""
313
 
314
+ #: mappress_settings.php:126
315
  msgid "Search country"
316
  msgstr ""
317
 
318
+ #: mappress_settings.php:127
319
  msgid "Directions server"
320
  msgstr ""
321
 
322
+ #: mappress_settings.php:129
323
  msgid "Miscellaneous"
324
  msgstr ""
325
 
326
+ #: mappress_settings.php:130
327
  msgid "Map sizes"
328
  msgstr ""
329
 
330
+ #: mappress_settings.php:131
331
  msgid "Scripts"
332
  msgstr ""
333
 
334
+ #: mappress_settings.php:135
335
  msgid "Compatiblity"
336
  msgstr ""
337
 
338
+ #: mappress_settings.php:179
339
+ #: mappress_settings.php:248
340
+ #: pro/mappress_pro_settings.php:235
341
  #: templates_admin/widgets.php:78
342
  msgid "Default"
343
  msgstr ""
344
 
345
+ #: mappress_settings.php:180
346
  msgid "Center"
347
  msgstr ""
348
 
349
+ #: mappress_settings.php:181
350
  msgid "Left"
351
  msgstr ""
352
 
353
+ #: mappress_settings.php:182
354
  msgid "Right"
355
  msgstr ""
356
 
357
+ #: mappress_settings.php:194
358
+ #: pro/mappress_pro_settings.php:243
359
  msgid "None"
360
  msgstr ""
361
 
362
+ #: mappress_settings.php:195
363
  msgid "Top of post"
364
  msgstr ""
365
 
366
+ #: mappress_settings.php:196
367
  msgid "Bottom of post"
368
  msgstr ""
369
 
370
+ #: mappress_settings.php:203
371
+ #: mappress_settings.php:247
372
  msgid "(list)"
373
  msgstr ""
374
 
375
+ #: mappress_settings.php:208
376
  msgid "Country code for searches"
377
  msgstr ""
378
 
379
+ #: mappress_settings.php:212
380
  msgid "Prevent other plugins/themes from loading the Google Maps API"
381
  msgstr ""
382
 
383
+ #: mappress_settings.php:216
384
+ #: mappress_settings.php:225
385
+ #: pro/mappress_pro_settings.php:233
386
  msgid "Google"
387
  msgstr ""
388
 
389
+ #: mappress_settings.php:216
390
  msgid "Inline"
391
  msgstr ""
392
 
393
+ #: mappress_settings.php:225
394
  msgid "Leaflet"
395
  msgstr ""
396
 
397
+ #: mappress_settings.php:227
398
  msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
399
  msgstr ""
400
 
401
+ #: mappress_settings.php:233
402
+ #: mappress_settings.php:236
403
  msgid "Output scripts in footer"
404
  msgstr ""
405
 
406
+ #: mappress_settings.php:234
407
  msgid "Disabled because Jetpack Infinite Scroll is active"
408
  msgstr ""
409
 
410
+ #: mappress_settings.php:237
411
  msgid "disable if maps are output using AJAX"
412
  msgstr ""
413
 
414
+ #: mappress_settings.php:250
415
  msgid "Language for searches and Google map controls"
416
  msgstr ""
417
 
418
+ #: mappress_settings.php:254
419
  msgid "Enter token to use Mapbox map tiles"
420
  msgstr ""
421
 
422
+ #: mappress_settings.php:261
423
+ #: mappress_settings.php:266
424
  msgid "Map type control"
425
  msgstr ""
426
 
427
+ #: mappress_settings.php:262
428
  msgid "Street view control"
429
  msgstr ""
430
 
 
431
  #: mappress_settings.php:263
432
+ #: mappress_settings.php:267
433
  msgid "Zoom control"
434
  msgstr ""
435
 
436
+ #: mappress_settings.php:282
437
  msgid "Default zoom when displaying a single POI"
438
  msgstr ""
439
 
440
+ #: mappress_settings.php:295
441
  msgid "Easy Google Maps"
442
  msgstr ""
443
 
444
+ #: mappress_settings.php:303
445
  msgid "Width (px, %, vh, vw)"
446
  msgstr ""
447
 
448
+ #: mappress_settings.php:303
449
  msgid "Height (px, %, vh, vw)"
450
  msgstr ""
451
 
452
+ #: mappress_settings.php:303
453
  msgid "Default size"
454
  msgstr ""
455
 
456
+ #: mappress_settings.php:318
457
+ msgid "Show a tooltip when mouse is over a POI"
458
+ msgstr ""
459
+
460
+ #: mappress_settings.php:323
461
  msgid "Copy maps when overwriting a translation"
462
  msgstr ""
463
 
464
+ #: mappress_settings.php:337
465
+ msgid "Get help"
466
+ msgstr ""
467
+
468
+ #: mappress_settings.php:340
469
+ msgid "Your account"
470
+ msgstr ""
471
+
472
+ #: mappress_settings.php:342
473
+ msgid "Upgrade to MapPress Pro"
474
+ msgstr ""
475
+
476
+ #: mappress_settings.php:349
477
+ #: mappress_settings.php:357
478
  msgid "Save Changes"
479
  msgstr ""
480
 
481
+ #: mappress_settings.php:350
482
+ #: mappress_settings.php:358
483
  msgid "Reset Defaults"
484
  msgstr ""
485
 
488
  msgstr ""
489
 
490
  #: mappress_template.php:35
491
+ #: pro/mappress_pro_settings.php:345
492
  msgid "Body"
493
  msgstr ""
494
 
495
  #: mappress_template.php:36
496
+ #: pro/mappress_pro_settings.php:175
497
+ #: pro/mappress_pro_settings.php:243
498
+ #: pro/mappress_pro_settings.php:345
499
  msgid "Icon"
500
  msgstr ""
501
 
504
  msgstr ""
505
 
506
  #: mappress_template.php:38
507
+ #: pro/mappress_pro_settings.php:345
508
  msgid "Title"
509
  msgstr ""
510
 
514
 
515
  #: mappress_template.php:40
516
  #: pro/mappress_filter.php:120
517
+ #: pro/mappress_pro_settings.php:350
518
  msgid "Custom Field"
519
  msgstr ""
520
 
521
  #: pro/mappress_filter.php:84
522
  #: pro/mappress_filter.php:133
523
+ #: pro/mappress_pro_settings.php:168
524
  msgid "Post type"
525
  msgstr ""
526
 
603
  msgid "Clustering"
604
  msgstr ""
605
 
606
+ #: pro/mappress_pro_settings.php:29
607
  msgid "Popup type"
608
  msgstr ""
609
 
610
+ #: pro/mappress_pro_settings.php:31
611
  msgid "Default icon"
612
  msgstr ""
613
 
614
+ #: pro/mappress_pro_settings.php:32
615
  msgid "Icon directory"
616
  msgstr ""
617
 
618
+ #: pro/mappress_pro_settings.php:33
619
  msgid "Custom icons"
620
  msgstr ""
621
 
622
+ #: pro/mappress_pro_settings.php:34
623
+ msgid "Highlight selected POI"
624
  msgstr ""
625
 
626
  #: pro/mappress_pro_settings.php:36
627
+ msgid "Icon scaling"
628
+ msgstr ""
629
+
630
+ #: pro/mappress_pro_settings.php:37
631
  msgid "Automatic icons"
632
  msgstr ""
633
 
634
+ #: pro/mappress_pro_settings.php:39
635
+ #: templates/map.php:49
636
+ #: templates_admin/mce.php:12
637
  msgid "Search"
638
  msgstr ""
639
 
640
+ #: pro/mappress_pro_settings.php:41
641
+ #: templates/map.php:56
642
  msgid "Filter"
643
  msgstr ""
644
 
645
+ #: pro/mappress_pro_settings.php:42
646
  msgid "POI content"
647
  msgstr ""
648
 
649
+ #: pro/mappress_pro_settings.php:43
650
  msgid "POI click"
651
  msgstr ""
652
 
653
+ #: pro/mappress_pro_settings.php:44
654
  msgid "KMLs"
655
  msgstr ""
656
 
657
+ #: pro/mappress_pro_settings.php:45
658
  msgid "Thumbnails"
659
  msgstr ""
660
 
661
+ #: pro/mappress_pro_settings.php:46
662
  msgid "Thumbnail size"
663
  msgstr ""
664
 
665
+ #: pro/mappress_pro_settings.php:49
666
+ #: pro/mappress_pro_settings.php:51
667
  msgid "Styled maps"
668
  msgstr ""
669
 
670
+ #: pro/mappress_pro_settings.php:52
671
  msgid "Default style"
672
  msgstr ""
673
 
674
+ #: pro/mappress_pro_settings.php:55
675
  msgid "Geocoding fields"
676
  msgstr ""
677
 
678
+ #: pro/mappress_pro_settings.php:56
679
  msgid "Overwrite"
680
  msgstr ""
681
 
682
+ #: pro/mappress_pro_settings.php:57
683
  msgid "Geocoding errors"
684
  msgstr ""
685
 
686
+ #: pro/mappress_pro_settings.php:60
687
  msgid "Google Server API key"
688
  msgstr ""
689
 
690
+ #: pro/mappress_pro_settings.php:62
691
  msgid "Custom templates"
692
  msgstr ""
693
 
694
+ #: pro/mappress_pro_settings.php:63
695
+ #: pro/mappress_pro_settings.php:228
696
  msgid "Force resize"
697
  msgstr ""
698
 
699
+ #: pro/mappress_pro_settings.php:155
700
  msgid "more info"
701
  msgstr ""
702
 
703
+ #: pro/mappress_pro_settings.php:156
704
  msgid "API key secured by IP address for geocoding (optional)"
705
  msgstr ""
706
 
707
+ #: pro/mappress_pro_settings.php:175
708
  msgid "Value"
709
  msgstr ""
710
 
711
+ #: pro/mappress_pro_settings.php:190
712
  msgid "Enable updates for beta versions"
713
  msgstr ""
714
 
715
+ #: pro/mappress_pro_settings.php:194
716
  msgid "Enable marker clustering"
717
  msgstr ""
718
 
719
+ #: pro/mappress_pro_settings.php:203
720
  msgid "Checkboxes"
721
  msgstr ""
722
 
723
+ #: pro/mappress_pro_settings.php:203
724
  msgid "Select"
725
  msgstr ""
726
 
727
+ #: pro/mappress_pro_settings.php:210
728
  msgid "Key"
729
  msgstr ""
730
 
731
+ #: pro/mappress_pro_settings.php:210
732
  msgid "Format"
733
  msgstr ""
734
 
735
+ #: pro/mappress_pro_settings.php:225
736
  msgid "Permanently resize existing maps (classic editor only)"
737
  msgstr ""
738
 
739
+ #: pro/mappress_pro_settings.php:227
740
  msgid "from %s to %s"
741
  msgstr ""
742
 
743
+ #: pro/mappress_pro_settings.php:235
744
  msgid "Algolia"
745
  msgstr ""
746
 
747
+ #: pro/mappress_pro_settings.php:236
748
  msgid "Nominatim"
749
  msgstr ""
750
 
751
+ #: pro/mappress_pro_settings.php:237
752
  msgid "MapBox"
753
  msgstr ""
754
 
755
+ #: pro/mappress_pro_settings.php:243
756
+ msgid "Circle"
757
+ msgstr ""
758
+
759
+ #: pro/mappress_pro_settings.php:253
760
  #: templates_admin/widgets.php:68
761
  msgid "Edit"
762
  msgstr ""
763
 
764
+ #: pro/mappress_pro_settings.php:267
765
  msgid "Standard"
766
  msgstr ""
767
 
768
+ #: pro/mappress_pro_settings.php:268
769
  msgid "InfoBox"
770
  msgstr ""
771
 
772
+ #: pro/mappress_pro_settings.php:275
773
  msgid "Left of map"
774
  msgstr ""
775
 
776
+ #: pro/mappress_pro_settings.php:276
777
  msgid "Below map"
778
  msgstr ""
779
 
780
+ #: pro/mappress_pro_settings.php:282
781
  msgid "Get license"
782
  msgstr ""
783
 
784
+ #: pro/mappress_pro_settings.php:283
785
  msgid "Enter license to enable automatic updates"
786
  msgstr ""
787
 
788
+ #: pro/mappress_pro_settings.php:296
789
  msgid "Active"
790
  msgstr ""
791
 
792
+ #: pro/mappress_pro_settings.php:301
793
  msgid "Check now"
794
  msgstr ""
795
 
796
+ #: pro/mappress_pro_settings.php:306
797
  #: pro/mappress_updater.php:116
798
  msgid "Communication error, please try again later"
799
  msgstr ""
800
 
801
+ #: pro/mappress_pro_settings.php:308
802
  msgid "License is invalid or expired"
803
  msgstr ""
804
 
805
+ #: pro/mappress_pro_settings.php:312
806
  msgid "POI title + POI body"
807
  msgstr ""
808
 
809
+ #: pro/mappress_pro_settings.php:312
810
  msgid "Post title + post excerpt"
811
  msgstr ""
812
 
813
+ #: pro/mappress_pro_settings.php:317
814
  msgid "Open POI"
815
  msgstr ""
816
 
817
+ #: pro/mappress_pro_settings.php:317
818
  msgid "Open post"
819
  msgstr ""
820
 
821
+ #: pro/mappress_pro_settings.php:317
822
  msgid "Open post in new tab"
823
  msgstr ""
824
 
825
+ #: pro/mappress_pro_settings.php:322
826
  msgid "Include KML POIs in mashups"
827
  msgstr ""
828
 
829
+ #: pro/mappress_pro_settings.php:334
830
  msgid "%d Errors"
831
  msgstr ""
832
 
833
+ #: pro/mappress_pro_settings.php:344
834
  msgid "Address line "
835
  msgstr ""
836
 
837
+ #: pro/mappress_pro_settings.php:345
838
  msgid "Latitude"
839
  msgstr ""
840
 
841
+ #: pro/mappress_pro_settings.php:345
842
  msgid "Longitude"
843
  msgstr ""
844
 
845
+ #: pro/mappress_pro_settings.php:345
846
  msgid "Zoom"
847
  msgstr ""
848
 
849
+ #: pro/mappress_pro_settings.php:350
850
  msgid "Map Field"
851
  msgstr ""
852
 
853
+ #: pro/mappress_pro_settings.php:363
854
  msgid "Overwrite maps when posts are saved"
855
  msgstr ""
856
 
857
+ #: pro/mappress_pro_settings.php:368
858
  msgid "Width (px) at which to collapse the left POI list"
859
  msgstr ""
860
 
861
+ #: pro/mappress_pro_settings.php:372
862
  msgid "Show a list of POIs with each map"
863
  msgstr ""
864
 
865
+ #: pro/mappress_pro_settings.php:380
866
  msgid "Enable search"
867
  msgstr ""
868
 
869
+ #: pro/mappress_pro_settings.php:384
870
  msgid "Sort POI list by title"
871
  msgstr ""
872
 
873
+ #: pro/mappress_pro_settings.php:390
874
  msgid "No styles have been defined yet"
875
  msgstr ""
876
 
877
+ #: pro/mappress_pro_settings.php:399
878
  msgid "Snazzy Maps"
879
  msgstr ""
880
 
881
+ #: pro/mappress_pro_settings.php:400
882
  msgid "Enter JSON from %s"
883
  msgstr ""
884
 
885
+ #: pro/mappress_pro_settings.php:404
886
+ #: pro/mappress_pro_settings.php:420
887
  msgid "Style name"
888
  msgstr ""
889
 
890
+ #: pro/mappress_pro_settings.php:416
891
  msgid "Mapbox Studio"
892
  msgstr ""
893
 
894
+ #: pro/mappress_pro_settings.php:417
895
  msgid "Enter styles from %s"
896
  msgstr ""
897
 
898
+ #: pro/mappress_pro_settings.php:435
899
  msgid "Only admins or multisite super-admins can edit templates"
900
  msgstr ""
901
 
902
+ #: pro/mappress_pro_settings.php:440
903
  msgid "WordPress 4.9 or higher is needed to use the template editor."
904
  msgstr ""
905
 
906
+ #: pro/mappress_pro_settings.php:454
907
  msgid "or "
908
  msgstr ""
909
 
910
+ #: pro/mappress_pro_settings.php:462
911
  msgid "Show featured image thumbnails in mashup POIs"
912
  msgstr ""
913
 
965
  msgstr ""
966
 
967
  #: pro/mappress_widget_map.php:61
968
+ #: templates_admin/mce.php:47
969
+ #: templates_admin/mce.php:67
970
  msgid "Map ID"
971
  msgstr ""
972
 
990
  msgid "Results"
991
  msgstr ""
992
 
993
+ #: templates/map.php:51
994
  msgid "Your Location"
995
  msgstr ""
996
 
997
+ #: templates/map.php:65
998
  msgid "Menu"
999
  msgstr ""
1000
 
1001
+ #: templates/map.php:67
1002
  msgid "Center map"
1003
  msgstr ""
1004
 
1005
+ #: templates/map.php:70
1006
  msgid "Traffic"
1007
  msgstr ""
1008
 
1009
+ #: templates/map.php:71
1010
  msgid "Bicycling"
1011
  msgstr ""
1012
 
1013
+ #: templates/map.php:72
1014
  msgid "Transit"
1015
  msgstr ""
1016
 
1017
+ #: templates/map.php:82
1018
  msgid "Show List"
1019
  msgstr ""
1020
 
1021
+ #: templates/map.php:83
1022
  msgid "Show Map"
1023
  msgstr ""
1024
 
1035
  msgstr ""
1036
 
1037
  #: templates_admin/editor.php:45
1038
+ #: templates_admin/mce.php:53
1039
  #: templates_admin/widgets.php:91
1040
  msgid "Save"
1041
  msgstr ""
1042
 
1043
  #: templates_admin/editor.php:46
1044
+ #: templates_admin/mce.php:54
1045
  #: templates_admin/widgets.php:92
1046
  msgid "Cancel"
1047
  msgstr ""
1054
  msgid "Add New"
1055
  msgstr ""
1056
 
1057
+ #: templates_admin/mce.php:13
1058
  msgid "post title"
1059
  msgstr ""
1060
 
1061
+ #: templates_admin/mce.php:17
1062
  msgid "Attached to this post"
1063
  msgstr ""
1064
 
1065
+ #: templates_admin/mce.php:18
1066
  msgid "All maps"
1067
  msgstr ""
1068
 
1069
+ #: templates_admin/mce.php:23
1070
  msgid "Close"
1071
  msgstr ""
1072
 
1073
+ #: templates_admin/mce.php:33
1074
  msgid "Size"
1075
  msgstr ""
1076
 
1077
+ #: templates_admin/mce.php:57
1078
  msgid "Save center / zoom"
1079
  msgstr ""
1080
 
1081
+ #: templates_admin/mce.php:66
1082
  msgid "Map title"
1083
  msgstr ""
1084
 
1085
+ #: templates_admin/mce.php:69
1086
  msgid "Attached to"
1087
  msgstr ""
1088
 
1089
+ #: templates_admin/mce.php:71
1090
  msgid "Action"
1091
  msgstr ""
1092
 
1093
+ #: templates_admin/mce.php:85
1094
  msgid "Current post"
1095
  msgstr ""
1096
 
1097
+ #: templates_admin/mce.php:90
1098
  msgid "Unattached"
1099
  msgstr ""
1100
 
1101
+ #: templates_admin/mce.php:97
1102
  msgid "Insert into post"
1103
  msgstr ""
1104
 
1105
+ #: templates_admin/mce.php:105
1106
  msgid "No maps found"
1107
  msgstr ""
1108
 
languages/texts.php CHANGED
@@ -12,13 +12,12 @@ __("Please update your");
12
  __("MapPress Settings");
13
  __("OK, you deserve it!");
14
  __("Nope, maybe later");
15
- __("I neeed some help");
16
  __("Please Help Spread the Word");
17
  __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!");
18
  __("If you have any issues or suggestions, please let me know. I'll be happy to help!");
19
- __("Version");
20
- __("Help");
21
- __("Upgrade to MapPress Pro");
22
  __("Please enter your MapPress license key to enable plugin updates");
23
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
24
  __("MapPress has many new features! Please take a moment to learn %s.");
@@ -42,6 +41,8 @@ __("Light");
42
  __("Dark");
43
  __("Satellite");
44
  __("Satellite Streets");
 
 
45
  __("Add");
46
  __("Delete");
47
  __("MapPress");
@@ -102,7 +103,11 @@ __("Easy Google Maps");
102
  __("Width (px, %, vh, vw)");
103
  __("Height (px, %, vh, vw)");
104
  __("Default size");
 
105
  __("Copy maps when overwriting a translation");
 
 
 
106
  __("Save Changes");
107
  __("Reset Defaults");
108
  __("Address");
@@ -136,6 +141,7 @@ __("Popup type");
136
  __("Default icon");
137
  __("Icon directory");
138
  __("Custom icons");
 
139
  __("Icon scaling");
140
  __("Automatic icons");
141
  __("Search");
@@ -167,6 +173,7 @@ __("from %s to %s");
167
  __("Algolia");
168
  __("Nominatim");
169
  __("MapBox");
 
170
  __("Edit");
171
  __("Standard");
172
  __("InfoBox");
12
  __("MapPress Settings");
13
  __("OK, you deserve it!");
14
  __("Nope, maybe later");
15
+ __("I need some help!");
16
  __("Please Help Spread the Word");
17
  __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!");
18
  __("If you have any issues or suggestions, please let me know. I'll be happy to help!");
19
+ __("renew your license");
20
+ __("Your MapPress license has expired. Please %s to get the latest updates and prevent errors.");
 
21
  __("Please enter your MapPress license key to enable plugin updates");
22
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
23
  __("MapPress has many new features! Please take a moment to learn %s.");
41
  __("Dark");
42
  __("Satellite");
43
  __("Satellite Streets");
44
+ __("What's new");
45
+ __("Version");
46
  __("Add");
47
  __("Delete");
48
  __("MapPress");
103
  __("Width (px, %, vh, vw)");
104
  __("Height (px, %, vh, vw)");
105
  __("Default size");
106
+ __("Show a tooltip when mouse is over a POI");
107
  __("Copy maps when overwriting a translation");
108
+ __("Get help");
109
+ __("Your account");
110
+ __("Upgrade to MapPress Pro");
111
  __("Save Changes");
112
  __("Reset Defaults");
113
  __("Address");
141
  __("Default icon");
142
  __("Icon directory");
143
  __("Custom icons");
144
+ __("Highlight selected POI");
145
  __("Icon scaling");
146
  __("Automatic icons");
147
  __("Search");
173
  __("Algolia");
174
  __("Nominatim");
175
  __("MapBox");
176
+ __("Circle");
177
  __("Edit");
178
  __("Standard");
179
  __("InfoBox");
mappress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: MapPress Maps for WordPress
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
- Version: 2.57.3
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
@@ -37,7 +37,7 @@ if (is_dir(dirname( __FILE__ ) . '/pro')) {
37
  }
38
 
39
  class Mappress {
40
- const VERSION = '2.57.3';
41
 
42
  static
43
  $baseurl,
@@ -115,6 +115,16 @@ class Mappress {
115
 
116
  add_filter('autoptimize_filter_js_exclude', array(__CLASS__, 'autoptimize_filter_js_exclude'), 10, 2);
117
  add_filter('autoptimize_filter_css_exclude', array(__CLASS__, 'autoptimize_filter_css_exclude'), 10, 2);
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
  // Scripts & styles for admin
@@ -190,6 +200,7 @@ class Mappress {
190
  // Dismissibles
191
  if (is_super_admin()) {
192
  $content = "<div class='notice notice-%s is-dismissible' data-mapp-dismiss='%s'><p>%s</p></div>";
 
193
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
194
  $notices = (self::$notices) ? array_diff_key(self::$notices, array_flip($dismissed)) : array();
195
 
@@ -206,15 +217,26 @@ class Mappress {
206
  }
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  static function ajax_dismiss() {
210
  $key = isset($_POST['key']) ? $_POST['key'] : null;
211
 
212
  if (!$key || sanitize_key( $key) != $key)
213
  wp_die( 0 );
214
-
215
- $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
216
- $dismissed[] = $key;
217
- update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
218
  self::ajax_response('OK');
219
  }
220
 
@@ -263,8 +285,9 @@ class Mappress {
263
  }
264
 
265
  static function current_screen($screen) {
266
- if ($screen && self::$pages && $screen->id == self::$pages[0] && !self::$pro) {
267
  $first_time = get_option('mappress_review');
 
268
  if (!$first_time) {
269
  update_option('mappress_review', time());
270
  return;
@@ -274,12 +297,12 @@ class Mappress {
274
  return;
275
 
276
  $ids = Mappress_Map::get_list(null, 'ids');
277
- if (count($ids) < 3)
278
  return;
279
 
280
  $review_link = sprintf("<a class='button button-primary mapp-dismiss' href='https://wordpress.org/support/view/plugin-reviews/mappress-google-maps-for-wordpress?filter=5' target='_blank'>%s</a>", __('OK, you deserve it!', 'mappress-google-maps-for-wordpress'));
281
  $no_link = sprintf("<a class='button mapp-dismiss' href='#'>%s</a>", __('Nope, maybe later', 'mappress-google-maps-for-wordpress'));
282
- $help_link = sprintf("<a class='mapp-dismiss' href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>", __('I neeed some help', 'mappress-google-maps-for-wordpress'));
283
  $body = "<div class='mapp-review'>";
284
  $body .= "<h3>" . __("Please Help Spread the Word", 'mappress-google-maps-for-wordpress') . "</h3>";
285
  $body .= "<p>" . __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!", 'mappress-google-maps-for-wordpress') . "</p>";
@@ -397,17 +420,6 @@ class Mappress {
397
  return $mashup->display();
398
  }
399
 
400
- static function get_support_links() {
401
- $html = "<div class='mapp-support'>";
402
- $html .= __('Version', 'mappress-google-maps-for-wordpress') . ' ';
403
- $html .= self::$version;
404
- $html .= " | <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'>" . __('Help', 'mappress-google-maps-for-wordpress') . "</a>";
405
- if (!self::$pro)
406
- $html .= "<a class='button button-primary' href='https://mappresspro.com/mappress' target='_blank'>" . __('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress') . "</a>";
407
- $html .= "</div>";
408
- echo $html;
409
- }
410
-
411
  static function heartbeat_settings( $settings ) {
412
  $settings['minimalInterval'] = 600;
413
  return $settings;
@@ -468,6 +480,21 @@ class Mappress {
468
  Mappress::$options->save();
469
  }
470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
471
  // Missing license
472
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
473
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
@@ -616,7 +643,10 @@ class Mappress {
616
  }
617
 
618
  // Global settings
619
- $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer', 'engine', 'filter', 'geocoder', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style');
 
 
 
620
  foreach($options as $option) {
621
  if (isset(self::$options->$option)) {
622
  $l10n['options'][$option] = self::$options->$option;
@@ -699,7 +729,9 @@ class Mappress {
699
 
700
  static function plugin_action_links($links, $file) {
701
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
702
- array_unshift( $links, $settings_link );
 
 
703
  return $links;
704
  }
705
 
4
  Plugin URI: https://www.mappresspro.com/mappress
5
  Author URI: https://www.mappresspro.com/chris-contact
6
  Description: MapPress makes it easy to add Google and Leaflet Maps to WordPress
7
+ Version: 2.58.3
8
  Author: Chris Richardson
9
  Text Domain: mappress-google-maps-for-wordpress
10
  Thanks to all the translators and to Matthias Stasiak for his wonderful icons (http://code.google.com/p/google-maps-icons/)
37
  }
38
 
39
  class Mappress {
40
+ const VERSION = '2.58.3';
41
 
42
  static
43
  $baseurl,
115
 
116
  add_filter('autoptimize_filter_js_exclude', array(__CLASS__, 'autoptimize_filter_js_exclude'), 10, 2);
117
  add_filter('autoptimize_filter_css_exclude', array(__CLASS__, 'autoptimize_filter_css_exclude'), 10, 2);
118
+
119
+ // Add KML/KMZ as valid mime types
120
+ add_filter('mime_types', array(__CLASS__, 'mime_types'));
121
+ }
122
+
123
+ static function mime_types($mimes) {
124
+ // Additional entries must match WP, which use finfo_file(), e.g. KML => text/xml
125
+ $mimes['kml'] = 'text/xml'; // Real type: 'application/vnd.google-earth.kml+xml';
126
+ $mimes['kmz'] = 'application/zip'; // Real type: 'application/vnd.google-earth.kmz';
127
+ return $mimes;
128
  }
129
 
130
  // Scripts & styles for admin
200
  // Dismissibles
201
  if (is_super_admin()) {
202
  $content = "<div class='notice notice-%s is-dismissible' data-mapp-dismiss='%s'><p>%s</p></div>";
203
+
204
  $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
205
  $notices = (self::$notices) ? array_diff_key(self::$notices, array_flip($dismissed)) : array();
206
 
217
  }
218
  }
219
 
220
+ static function admin_notices_dismiss($key, $dismiss) {
221
+ if (!$key)
222
+ return;
223
+
224
+ $dismissed = array_filter( explode( ',', (string) get_user_meta( get_current_user_id(), 'mappress_dismissed', true ) ) );
225
+
226
+ if ($dismiss)
227
+ $dismissed[] = $key;
228
+ else
229
+ unset($dismissed[$key]);
230
+
231
+ update_user_meta( get_current_user_id(), 'mappress_dismissed', implode( ',', $dismissed ));
232
+ }
233
+
234
  static function ajax_dismiss() {
235
  $key = isset($_POST['key']) ? $_POST['key'] : null;
236
 
237
  if (!$key || sanitize_key( $key) != $key)
238
  wp_die( 0 );
239
+ self::admin_notices_dismiss($key, true);
 
 
 
240
  self::ajax_response('OK');
241
  }
242
 
285
  }
286
 
287
  static function current_screen($screen) {
288
+ if ($screen && self::$pages && $screen->id == self::$pages[0]) {
289
  $first_time = get_option('mappress_review');
290
+
291
  if (!$first_time) {
292
  update_option('mappress_review', time());
293
  return;
297
  return;
298
 
299
  $ids = Mappress_Map::get_list(null, 'ids');
300
+ if (count($ids) < 1)
301
  return;
302
 
303
  $review_link = sprintf("<a class='button button-primary mapp-dismiss' href='https://wordpress.org/support/view/plugin-reviews/mappress-google-maps-for-wordpress?filter=5' target='_blank'>%s</a>", __('OK, you deserve it!', 'mappress-google-maps-for-wordpress'));
304
  $no_link = sprintf("<a class='button mapp-dismiss' href='#'>%s</a>", __('Nope, maybe later', 'mappress-google-maps-for-wordpress'));
305
+ $help_link = sprintf("<a class='mapp-dismiss' href='https://mappresspro.com/chris-contact' target='_blank'>%s</a>", __('I need some help!', 'mappress-google-maps-for-wordpress'));
306
  $body = "<div class='mapp-review'>";
307
  $body .= "<h3>" . __("Please Help Spread the Word", 'mappress-google-maps-for-wordpress') . "</h3>";
308
  $body .= "<p>" . __("If you're enjoying MapPress, would you mind taking a moment to write a brief review? It would mean the world to me!", 'mappress-google-maps-for-wordpress') . "</p>";
420
  return $mashup->display();
421
  }
422
 
 
 
 
 
 
 
 
 
 
 
 
423
  static function heartbeat_settings( $settings ) {
424
  $settings['minimalInterval'] = 600;
425
  return $settings;
480
  Mappress::$options->save();
481
  }
482
 
483
+ // Check for license expired
484
+ if (self::$pro && self::$options->license) {
485
+ $last_check = get_option('mappress_license_check');
486
+ if (!$last_check || time() > $last_check + (60 * 60 * 24 * 30)) {
487
+ $status = Mappress::$updater->get_status();
488
+ if ($status != 'active') {
489
+ self::admin_notices_dismiss('license_expired', false);
490
+ $renew_link = sprintf("<a target='_blank' href='http://mappresspro.com/account'>%s</a>", __('renew your license', 'mappress-google-maps-for-wordpress'));
491
+ self::$notices['expiredlicense'] = array('warning', sprintf(__('Your MapPress license has expired. Please %s to get the latest updates and prevent errors.', 'mappress-google-maps-for-wordpress'), $renew_link));
492
+ }
493
+ update_option('mappress_license_check', time());
494
+ return;
495
+ }
496
+ }
497
+
498
  // Missing license
499
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
500
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
643
  }
644
 
645
  // Global settings
646
+ $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer',
647
+ 'engine', 'filter', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'iwType', 'layout',
648
+ 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style', 'tooltips');
649
+
650
  foreach($options as $option) {
651
  if (isset(self::$options->$option)) {
652
  $l10n['options'][$option] = self::$options->$option;
729
 
730
  static function plugin_action_links($links, $file) {
731
  $settings_link = "<a href='" . admin_url("admin.php?page=mappress") . "'>" . __('Settings', 'mappress-google-maps-for-wordpress') . "</a>";
732
+ $whatsnew_link = "<a href='https://mappresspro.com/whats-new/' target='_blank'>" . __("What's new", 'mappress-google-maps-for-wordpress') . "</a>";
733
+ array_unshift( $links, $whatsnew_link );
734
+ array_unshift( $links, $settings_link);
735
  return $links;
736
  }
737
 
mappress_map.php CHANGED
@@ -49,6 +49,7 @@ class Mappress_Map extends Mappress_Obj {
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
 
52
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
53
 
54
  add_action('media_buttons', array(__CLASS__, 'media_buttons'));
@@ -254,7 +255,6 @@ class Mappress_Map extends Mappress_Obj {
254
  if ($result === false || !$this->mapid)
255
  return false;
256
 
257
- // Update posts
258
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
259
  $this->postid, $this->mapid));
260
 
@@ -329,6 +329,42 @@ class Mappress_Map extends Mappress_Obj {
329
  Mappress::ajax_response('OK');
330
  }
331
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  /**
333
  * Delete a map assignment(s) for a post
334
  * If $mapid is null, then ALL maps will be removed from the post
@@ -403,7 +439,7 @@ class Mappress_Map extends Mappress_Obj {
403
  *
404
  */
405
  function prepare() {
406
- global $post;
407
 
408
  // Sort the pois
409
  if (Mappress::$options->sort && !isset($this->query['orderby']))
@@ -417,8 +453,11 @@ class Mappress_Map extends Mappress_Obj {
417
  $postid = ($post) ? $post->ID : null;
418
  $poi->props = apply_filters('mappress_poi_props', $poi->props, $postid, $poi);
419
 
420
- // Process oembeds
421
- // $poi->body = $wp_embed->autoembed($poi->body);
 
 
 
422
  }
423
 
424
  // Autoicons
49
  add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
  add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
  add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
52
+ add_action('wp_ajax_mapp_mutate', array(__CLASS__, 'ajax_mutate'));
53
  add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
54
 
55
  add_action('media_buttons', array(__CLASS__, 'media_buttons'));
255
  if ($result === false || !$this->mapid)
256
  return false;
257
 
 
258
  $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
259
  $this->postid, $this->mapid));
260
 
329
  Mappress::ajax_response('OK');
330
  }
331
 
332
+ static function ajax_mutate() {
333
+ global $wpdb;
334
+ $posts_table = $wpdb->prefix . 'mappress_posts';
335
+
336
+ check_ajax_referer('mappress', 'nonce');
337
+
338
+ if (!current_user_can('edit_posts'))
339
+ Mappress::ajax_response('Not authorized');
340
+
341
+ ob_start();
342
+ $mapdata = (isset($_POST['mapdata'])) ? $_POST['mapdata'] : null;
343
+ $mapid = (isset($mapdata['mapid'])) ? $mapdata['mapid'] : null;
344
+
345
+ if (!$mapid || !$mapdata)
346
+ Mappress::ajax_response('Internal error, your data has not been saved!');
347
+
348
+ $map = self::get($mapid);
349
+ if (!$map)
350
+ Mappress::ajax_response('Error, map not found!');
351
+
352
+ $map->update($mapdata);
353
+
354
+ // Current save() allows multiple attachments, so delete existing attachments first
355
+ $result = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $map->mapid));
356
+ if (!$result)
357
+ Mappress::ajax_response('Internal error in posts table, your data has not been saved!');
358
+
359
+ $result = $map->save();
360
+
361
+ if (!$result)
362
+ Mappress::ajax_response('Internal errorsaving, your data has not been saved!');
363
+
364
+ // Return update map
365
+ Mappress::ajax_response('OK', $map);
366
+ }
367
+
368
  /**
369
  * Delete a map assignment(s) for a post
370
  * If $mapid is null, then ALL maps will be removed from the post
439
  *
440
  */
441
  function prepare() {
442
+ global $post, $wp_embed;
443
 
444
  // Sort the pois
445
  if (Mappress::$options->sort && !isset($this->query['orderby']))
453
  $postid = ($post) ? $post->ID : null;
454
  $poi->props = apply_filters('mappress_poi_props', $poi->props, $postid, $poi);
455
 
456
+ // Oembeds
457
+ $poi->body = $wp_embed->autoembed($poi->body);
458
+
459
+ // Embed shortcodes ([embed], etc):
460
+ $poi->body = $wp_embed->run_shortcode($poi->body);
461
  }
462
 
463
  // Autoicons
mappress_poi.php CHANGED
@@ -64,17 +64,18 @@ class Mappress_Poi extends Mappress_Obj {
64
  */
65
  function get_post_excerpt($post) {
66
  // Fast excerpts: similar to wp_trim_excerpt() in formatting.php, but without (slow) call to get_the_content()
67
- $text = ($post->post_excerpt) ? $post->post_excerpt : $post->post_content;
68
- $text = strip_shortcodes($text);
69
  $excerpt_length = 55;
70
  $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
71
- return wp_trim_words( $text, $excerpt_length, $excerpt_more );
 
72
  }
73
 
74
  function get_thumbnail($post) {
75
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
76
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
77
- return get_the_post_thumbnail($post, $size, array('style' => $style)); // Slow due to get_post_thumbnail_id()
78
  }
79
  }
80
  ?>
64
  */
65
  function get_post_excerpt($post) {
66
  // Fast excerpts: similar to wp_trim_excerpt() in formatting.php, but without (slow) call to get_the_content()
67
+ $raw = ($post->post_excerpt) ? $post->post_excerpt : $post->post_content;
68
+ $text = strip_shortcodes($raw);
69
  $excerpt_length = 55;
70
  $excerpt_more = apply_filters( 'excerpt_more', ' ' . '[&hellip;]' );
71
+ $excerpt = wp_trim_words( $text, $excerpt_length, $excerpt_more );
72
+ return apply_filters('mappress_poi_excerpt', $excerpt, $raw);
73
  }
74
 
75
  function get_thumbnail($post) {
76
  $size = (Mappress::$options->thumbSize) ? Mappress::$options->thumbSize : null;
77
  $style = (Mappress::$options->thumbWidth && Mappress::$options->thumbHeight) ? sprintf("width: %spx; height : %spx;", Mappress::$options->thumbWidth, Mappress::$options->thumbHeight) : null;
78
+ return get_the_post_thumbnail($post, $size, array('style' => $style));
79
  }
80
  }
81
  ?>
mappress_settings.php CHANGED
@@ -21,6 +21,8 @@ class Mappress_Options extends Mappress_Obj {
21
  $filter,
22
  $footer = true,
23
  $geocoder,
 
 
24
  $iconScale,
25
  $initialOpenInfo,
26
  $iwType = 'iw',
@@ -49,6 +51,7 @@ class Mappress_Options extends Mappress_Obj {
49
  $thumbSize,
50
  $thumbWidth = 64,
51
  $thumbHeight = 64,
 
52
  $wpml = true
53
  ;
54
 
@@ -108,6 +111,7 @@ class Mappress_Settings {
108
  $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
109
  $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
110
  $this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
 
111
 
112
  if (Mappress::$pro) {
113
  $this->add_section('mashups', __('Mashups', 'mappress-google-maps-for-wordpress'));
@@ -310,6 +314,11 @@ class Mappress_Settings {
310
  echo Mappress_Controls::table($headers, $rows);
311
  }
312
 
 
 
 
 
 
313
  function set_wpml($name) {
314
  echo Mappress_Controls::checkmark($name, $this->options->wpml, __("Copy maps when overwriting a translation", 'mappress-google-maps-for-wordpress'));
315
  echo Mappress_Controls::help(null, 'https://mappresspro.com/mappress-documentation#wpml');
@@ -318,8 +327,22 @@ class Mappress_Settings {
318
  function options_page() {
319
  ?>
320
  <div class="wrap mapp-settings-screen">
321
- <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
322
- <?php echo Mappress::get_support_links(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  <form action="options.php" method="post">
324
  <?php // Force default submit button ?>
325
  <div class='mapp-settings-hidden-toolbar'>
21
  $filter,
22
  $footer = true,
23
  $geocoder,
24
+ $highlight,
25
+ $highlightIcon,
26
  $iconScale,
27
  $initialOpenInfo,
28
  $iwType = 'iw',
51
  $thumbSize,
52
  $thumbWidth = 64,
53
  $thumbHeight = 64,
54
+ $tooltips = false,
55
  $wpml = true
56
  ;
57
 
111
  $this->add_section('pois', __('POI Settings', 'mappress-google-maps-for-wordpress'));
112
  $this->add_field('poiZoom', __('Default zoom', 'mappress-google-maps-for-wordpress'), 'pois');
113
  $this->add_field('initialOpenInfo', __('Open first POI', 'mappress-google-maps-for-wordpress'), 'pois');
114
+ // TBD $this->add_field('tooltips', __('Tooltips'), 'pois');
115
 
116
  if (Mappress::$pro) {
117
  $this->add_section('mashups', __('Mashups', 'mappress-google-maps-for-wordpress'));
314
  echo Mappress_Controls::table($headers, $rows);
315
  }
316
 
317
+ function set_tooltips($name) {
318
+ echo Mappress_Controls::checkmark($name, $this->options->tooltips, __('Show a tooltip when mouse is over a POI', 'mappress-google-maps-for-wordpress'));
319
+ }
320
+
321
+
322
  function set_wpml($name) {
323
  echo Mappress_Controls::checkmark($name, $this->options->wpml, __("Copy maps when overwriting a translation", 'mappress-google-maps-for-wordpress'));
324
  echo Mappress_Controls::help(null, 'https://mappresspro.com/mappress-documentation#wpml');
327
  function options_page() {
328
  ?>
329
  <div class="wrap mapp-settings-screen">
330
+ <h1></h1><!-- dummy h1 because wP will attach admin notices to the first h1 on the page -->
331
+ <div class='mapp-settings-toolbar-top'>
332
+ <div class='mapp-settings-toolbar-top-header'>
333
+ <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
334
+ <?php echo Mappress::$version; ?>
335
+ </div>
336
+ <div class='mapp-settings-toolbar-top-links'>
337
+ <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'><?php _e('Get help', 'mappress-google-maps-for-wordpress');?></a>
338
+ <a target='_blank' href='https://mappresspro.com/whats-new/'><?php _e("What's new", 'mappress-google-maps-for-wordpress');?></a>
339
+ <?php if (Mappress::$pro) { ?>
340
+ <a target='_blank' href='https://mappresspro.com/account/' target='_blank'><?php _e("Your account", 'mappress-google-maps-for-wordpress');?></a>
341
+ <?php } else { ?>
342
+ <a class='button button-primary' href='https://mappresspro.com/mappress' target='_blank'><?php _e('Upgrade to MapPress Pro', 'mappress-google-maps-for-wordpress');?></a>
343
+ <?php } ?>
344
+ </div>
345
+ </div>
346
  <form action="options.php" method="post">
347
  <?php // Force default submit button ?>
348
  <div class='mapp-settings-hidden-toolbar'>
mappress_template.php CHANGED
@@ -110,7 +110,7 @@ class Mappress_Template extends Mappress_Obj {
110
  static function locate_template($template_name) {
111
  $template_name .= ".php";
112
  $template_file = locate_template($template_name, false);
113
- if (!Mappress::$pro || is_admin() || empty($template_file))
114
  $template_file = Mappress::$basedir . "/templates/$template_name";
115
 
116
  // Template exists, return it
110
  static function locate_template($template_name) {
111
  $template_name .= ".php";
112
  $template_file = locate_template($template_name, false);
113
+ if (!Mappress::$pro || empty($template_file))
114
  $template_file = Mappress::$basedir . "/templates/$template_name";
115
 
116
  // Template exists, return it
readme.txt CHANGED
@@ -1,38 +1,48 @@
1
  === MapPress Maps for WordPress ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
- Tags: maps, map, google maps, leaflet maps, leaflet map plugin, map plugin, directions, google map plugin, map widget, mapbox, mapping
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.6
8
- Stable tag: 2.57.3
9
 
10
  == Description ==
11
- MapPress adds beautiful interfactive Google and Leaflet maps to WordPress.
12
 
13
- Easily create unlimited maps and locations using the Gutenberg block editor, classic editor or shortcodes.
14
 
15
- Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for custom markers, searchable mashups, clustering, and much more. See it in action on the [MapPress Home Page](https://mappresspro.com/mappress) or test it yourself with a [Free Demo Site](https://mappresspro.com/demo)!
16
 
17
  [Home Page](https://mappresspro.com/mappress)
18
- [Documentation](https://mappresspro.com/mappress-beta)
 
19
  [FAQ](https://mappresspro.com/mappress-faq)
20
  [Support](https://mappresspro.com/mappress-faq)
21
 
 
 
 
 
 
 
 
22
  = Key Features =
 
23
  * Add unlimited maps and markers to any post, page or custom post type
 
24
  * Locations can be added by address, place, or latitude/longitude, or dragged into position
25
  * Markers support custom text and HTML including photos, images, and links
26
  * Google street view and overlays (traffic, bicycling and transit)
27
- * Markers link to Google maps for detailed turn-by-turn directins
28
  * Maps can be generated using PHP for use in themes and templates
29
 
30
  = Pro Version Features =
31
  * Get [MapPress Pro](https://mappresspro.com/mappress) for additional functionality
32
  * Custom marker icons, or upload your own - 100 standard icons included
33
- * Combine maps and locations into a searchable "mashup" map
34
  * Filter locations by by taxonomy, tag or category
35
- * Map and mashup widgets
36
  * Marker clustering for both Leaflet and Google
37
  * Multiple geocoders including Google, Nominatim, Algolia and MapBox
38
  * Customizable marker and list templates
@@ -74,9 +84,32 @@ Please see the plugin documentation pages:
74
 
75
  == Changelog ==
76
 
77
- = 2.57.3 =
78
- * Fixed: notice in multisite admin
79
- * Fixed: add missing textdomains
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  = 2.57.2 =
82
  * Fixed: remove extra translation json file
1
  === MapPress Maps for WordPress ===
2
  Contributors: chrisvrichardson
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4339298
4
+ Tags: maps, google maps, map, map markers, google map, leaflet maps, leaflet map plugin, google maps plugin, wp google maps, wp google map, map plugin, store locator, google map plugin, map widget,
5
  Requires at least: 5.3
6
  Requires PHP: 5.6
7
  Tested up to: 5.6
8
+ Stable tag: 2.58.3
9
 
10
  == Description ==
11
+ MapPress is the easiest way to add beautiful interfactive Google and Leaflet maps to WordPress.
12
 
13
+ Create unlimited maps and map markers using Gutenberg blocks or the classic editor. The popup map editor makes creating and editing maps easy!
14
 
15
+ Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more features, including custom markers, searchable mashups, clustering, and much more. See it in action on the [MapPress Home Page](https://mappresspro.com/mappress) or test it yourself with a [Free Demo Site](https://mappresspro.com/demo)!
16
 
17
  [Home Page](https://mappresspro.com/mappress)
18
+ [What's New](https://mappresspro.com/whats-new)
19
+ [Documentation](https://mappresspro.com/mappress-documentation)
20
  [FAQ](https://mappresspro.com/mappress-faq)
21
  [Support](https://mappresspro.com/mappress-faq)
22
 
23
+ == Screenshots ==
24
+ 1. MapPress settings page
25
+ 2. Map Library in Gutenberg
26
+ 3. Creating a map
27
+ 4. Creating a mashup
28
+ 5. POI with YouTube video
29
+
30
  = Key Features =
31
+ * The only full-featured google map plugin and leaflet map plugin that is compatible with the Gutenberg editor
32
  * Add unlimited maps and markers to any post, page or custom post type
33
+ * Maps are fully responsive, and can be sized by pixels, viewport units, percents or aspect ratios
34
  * Locations can be added by address, place, or latitude/longitude, or dragged into position
35
  * Markers support custom text and HTML including photos, images, and links
36
  * Google street view and overlays (traffic, bicycling and transit)
37
+ * Markers link the Google map site for detailed turn-by-turn directins
38
  * Maps can be generated using PHP for use in themes and templates
39
 
40
  = Pro Version Features =
41
  * Get [MapPress Pro](https://mappresspro.com/mappress) for additional functionality
42
  * Custom marker icons, or upload your own - 100 standard icons included
43
+ * Use a Gutenberg "mashup" block to create a searchable map, great for a local directory site or store locator
44
  * Filter locations by by taxonomy, tag or category
45
+ * Map widget and mashup widget are included
46
  * Marker clustering for both Leaflet and Google
47
  * Multiple geocoders including Google, Nominatim, Algolia and MapBox
48
  * Customizable marker and list templates
84
 
85
  == Changelog ==
86
 
87
+ = 2.58.3 =
88
+ * Added: selected icon can now be highlighted with a special icon or a circle
89
+ * Fixed: error preventing KML files from being added to map
90
+
91
+ = 2.58.2 =
92
+ * Fixed: jQuery warning was causing maps to not display in older WP versions
93
+
94
+ = 2.58.1 =
95
+ * Fixed: places strim trim() not working for maps with center specified by lat/lng
96
+ * Fixed: better error message for sites with obsolete jQuery and jQuery UI
97
+ * Fixed: admin notices not showing correctly on settings page
98
+ * Fixed: added warning for expired license
99
+ * Fixed: errors for invalid KML files were not displaying
100
+
101
+ = 2.58 =
102
+ * Added: new infobox with better panning and sizing
103
+ * Added: infobox can now be used with Leaflet, in addition to Google
104
+ * Added: standard Leaflet popups now fit to the map dimensions
105
+ * Added: oembed has been enabled for popups, POIs can now include Youtube videos, music, etc
106
+ * Added: maps can be attached/detached from posts in the map list and map library
107
+ * Added: query by specific post IDs added for Gutenberg mashup blocks
108
+ * Added: map type (style) added to the settings for Gutenberg mashup blocks
109
+ * Added: filter 'mappress_poi_excerpt' can be used to control excerpts in map POIs
110
+ * Changed: bigger popups for POI editor
111
+ * Fixed: warning message for mashup widget in new widget editor
112
+ * Fixed: Gutenberg plugin caused blank taxonomy names in mashup blocks
113
 
114
  = 2.57.2 =
115
  * Fixed: remove extra translation json file
templates/map-loop.php CHANGED
@@ -11,7 +11,7 @@
11
  <div class="mapp-items">
12
  <# _.forEach(pois, function(poi, i) { #>
13
  <# if (!poi.visible) { return; } #>
14
- <div class="mapp-item {{ (map.poi==poi) ? 'mapp-selected' : ''}}" data-mapp-action="open" data-mapp-poi="{{{i}}}">
15
  <# print(poi.render('item')); #>
16
  </div>
17
  <# }); #>
11
  <div class="mapp-items">
12
  <# _.forEach(pois, function(poi, i) { #>
13
  <# if (!poi.visible) { return; } #>
14
+ <div class="mapp-item {{ (map.selected==poi) ? 'mapp-selected' : ''}}" data-mapp-action="open" data-mapp-poi="{{{i}}}">
15
  <# print(poi.render('item')); #>
16
  </div>
17
  <# }); #>
templates/map.php CHANGED
@@ -27,8 +27,6 @@
27
  <div class='mapp-canvas-panel'>
28
  <div class='mapp-canvas'></div>
29
  <# print(mapp.lib.template('map-menu', { map : map })); #>
30
- <# var iwClass = (map.editable) ? 'mapp-iw-edit' : 'mapp-iw'; #>
31
- <div class='{{{iwClass}}}'></div>
32
  <div class='mapp-dialog'></div>
33
  </div>
34
  </div>
27
  <div class='mapp-canvas-panel'>
28
  <div class='mapp-canvas'></div>
29
  <# print(mapp.lib.template('map-menu', { map : map })); #>
 
 
30
  <div class='mapp-dialog'></div>
31
  </div>
32
  </div>
templates/mappress_map.php DELETED
@@ -1,491 +0,0 @@
1
- <?php
2
- class Mappress_Map extends Mappress_Obj {
3
- var $alignment,
4
- $center,
5
- $classname,
6
- $editable,
7
- $embed,
8
- $height,
9
- $hideEmpty,
10
- $initialOpenDirections,
11
- $initialOpenInfo,
12
- $layers,
13
- $layout,
14
- $mapid,
15
- $mapTypeId,
16
- $metaKey,
17
- $mapOpts,
18
- $name,
19
- $poiList,
20
- $postid,
21
- $query,
22
- $title,
23
- $width,
24
- $zoom
25
- ;
26
-
27
- var $pois = array();
28
-
29
- function __sleep() {
30
- return array('mapid', 'center', 'height', 'mapTypeId', 'metaKey', 'pois', 'title', 'width', 'zoom');
31
- }
32
-
33
- function __construct($atts = null) {
34
- $this->update($atts);
35
-
36
- // Convert POIs from arrays to objects if needed
37
- foreach((array)$this->pois as $index => $poi) {
38
- if (is_array($poi))
39
- $this->pois[$index] = new Mappress_Poi($poi);
40
- }
41
- }
42
-
43
- static function register() {
44
- global $wpdb;
45
-
46
- add_action('deleted_post', array(__CLASS__, 'delete_post_map'));
47
-
48
- add_action('wp_ajax_mapp_delete', array(__CLASS__, 'ajax_delete'));
49
- add_action('wp_ajax_mapp_duplicate', array(__CLASS__, 'ajax_duplicate'));
50
- add_action('wp_ajax_mapp_find', array(__CLASS__, 'ajax_find'));
51
- add_action('wp_ajax_mapp_get', array(__CLASS__, 'ajax_get'));
52
- add_action('wp_ajax_mapp_save', array(__CLASS__, 'ajax_save'));
53
-
54
- add_action('media_buttons', array(__CLASS__, 'media_buttons'));
55
-
56
- // Tables
57
- $maps_table = $wpdb->prefix . 'mappress_maps';
58
- $posts_table = $wpdb->prefix . 'mappress_posts';
59
-
60
- $wpdb->show_errors(true);
61
-
62
- $exists = $wpdb->get_var("show tables like '$maps_table'");
63
- if (!$exists) {
64
- $result = $wpdb->query ("CREATE TABLE $maps_table (
65
- mapid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
66
- obj LONGTEXT)
67
- CHARACTER SET utf8;");
68
- }
69
-
70
- $exists = $wpdb->get_var("show tables like '$posts_table'");
71
- if (!$exists) {
72
- $result = $wpdb->query ("CREATE TABLE $posts_table (
73
- postid INT,
74
- mapid INT,
75
- PRIMARY KEY (postid, mapid) )
76
- CHARACTER SET utf8;");
77
- }
78
-
79
- $wpdb->show_errors(false);
80
- }
81
-
82
- static function media_buttons($editor_id) {
83
- if ($editor_id == 'content') {
84
- echo '<button type="button" class="button mapp-media-button">';
85
- echo '<span class="wp-media-buttons-icon dashicons dashicons-location"></span> ' . __('MapPress', 'mappress-google-maps-for-wordpress') . '</button>';
86
- }
87
- }
88
-
89
- static function duplicate($mapid, $postid) {
90
- $map = self::get($mapid);
91
- if (!$map)
92
- return null;
93
-
94
- $title = ($map->title) ? $map->title : __('Untitled', 'mappress-google-maps-for-wordpress');
95
- $map->title = sprintf(__('Copy of %s', 'mappress-google-maps-for-wordpress'), $title);
96
-
97
- $map->postid = $postid;
98
- $map->mapid = null;
99
- $map->metaKey = null; // Map is no longer automatic
100
-
101
- $result = $map->save();
102
- if (!$result)
103
- return null;
104
-
105
- return $map;
106
- }
107
-
108
- static function ajax_duplicate() {
109
- check_ajax_referer('mappress', 'nonce');
110
-
111
- if (!current_user_can('edit_posts'))
112
- Mappress::ajax_response('Not authorized');
113
-
114
- ob_start();
115
-
116
- $mapid = (isset($_POST['mapid'])) ? $_POST['mapid'] : null;
117
- $postid = (isset($_POST['postid'])) ? $_POST['postid'] : null;
118
-
119
- if (!$mapid)
120
- Mappress::ajax_response('Internal error, your data has not been saved!');
121
-
122
- $map = self::duplicate($mapid, $postid);
123
- if ($map)
124
- Mappress::ajax_response('OK', $map);
125
- else
126
- Mappress::ajax_response('Internal error when copying');
127
- }
128
-
129
- static function find($args) {
130
- global $wpdb;
131
-
132
- $maps_table = $wpdb->prefix . 'mappress_maps';
133
- $posts_table = $wpdb->prefix . 'mappress_posts';
134
-
135
- $sql = "SELECT SQL_CALC_FOUND_ROWS $maps_table.mapid, $maps_table.obj, $posts_table.postid, $wpdb->posts.post_status, $wpdb->posts.post_title "
136
- . " FROM $maps_table "
137
- . " INNER JOIN $posts_table ON ($posts_table.mapid = $maps_table.mapid)"
138
- . " LEFT OUTER JOIN $wpdb->posts ON ($wpdb->posts.ID = $posts_table.postid)"
139
- ;
140
- $results = $wpdb->get_results($sql);
141
-
142
- $items = array();
143
- foreach($results as $result) {
144
-
145
- // Only check if map is attached to a post (postid > 0)
146
- if ($result->postid) {
147
- if (!current_user_can('edit_post', $result->postid))
148
- continue;
149
- if (in_array($result->post_status, array('trash', 'auto-draft', 'inherit')))
150
- continue;
151
- }
152
-
153
- $mapdata = unserialize($result->obj);
154
- $items[] = array(
155
- 'mapid' => $result->mapid,
156
- 'map_title' => $mapdata->title,
157
- 'postid' => $result->postid,
158
- 'post_title' => $result->post_title
159
- );
160
- }
161
-
162
- return $items;
163
- }
164
-
165
- static function ajax_find() {
166
- check_ajax_referer('mappress', 'nonce');
167
- if (!current_user_can('edit_posts'))
168
- Mappress::ajax_response('Not authorized');
169
- Mappress::ajax_response('OK', self::find($_GET));
170
- }
171
-
172
- /**
173
- * Get a map. Output is 'raw' or 'object'
174
- */
175
- static function get($mapid) {
176
- global $wpdb;
177
- $maps_table = $wpdb->prefix . 'mappress_maps';
178
- $posts_table = $wpdb->prefix . 'mappress_posts';
179
-
180
- $sql = "SELECT $posts_table.postid, $maps_table.mapid, $maps_table.obj FROM $posts_table INNER JOIN $maps_table ON ($maps_table.mapid = $posts_table.mapid) WHERE $maps_table.mapid = %d";
181
- $result = $wpdb->get_row($wpdb->prepare($sql, $mapid));
182
-
183
- if (!$result)
184
- return false;
185
-
186
- // Read the map data and construct a new map from it
187
- $mapdata = unserialize($result->obj);
188
- $mapdata->postid = $result->postid;
189
- $mapdata->mapid = $result->mapid;
190
- return new Mappress_Map($mapdata);
191
- }
192
-
193
- static function ajax_get() {
194
- check_ajax_referer('mappress', 'nonce');
195
- ob_start();
196
- $mapid = (isset($_GET['mapid'])) ? $_GET['mapid'] : null;
197
- $map = ($mapid) ? self::get($mapid) : null;
198
- if (!$map)
199
- Mappress::ajax_response(sprintf(__('Map not found', 'mappress-google-maps-for-wordpress'), $mapid));
200
- else
201
- Mappress::ajax_response('OK', $map);
202
- }
203
-
204
- /**
205
- * Get list of mapids for a post or all maps
206
- *
207
- * @return array of mapids | empty array
208
- *
209
- */
210
- static function get_list($postid = null, $output = 'objects') {
211
- global $wpdb;
212
- $posts_table = $wpdb->prefix . 'mappress_posts';
213
-
214
- $where = ($postid) ? $wpdb->prepare("WHERE postid = %d", $postid) : '';
215
-
216
- $mapids = $wpdb->get_col("SELECT mapid FROM $posts_table $where");
217
- if (!$mapids)
218
- return array();
219
-
220
- if ($output == 'ids') {
221
- return $mapids;
222
- } else {
223
- $maps = array();
224
- foreach($mapids as $mapid) {
225
- $map = Mappress_Map::get($mapid);
226
- if ($map)
227
- $maps[] = $map;
228
- }
229
- return $maps;
230
- }
231
- }
232
-
233
- function save() {
234
- global $wpdb;
235
- $maps_table = $wpdb->prefix . 'mappress_maps';
236
- $posts_table = $wpdb->prefix . 'mappress_posts';
237
-
238
- // Apply wpautop to POI bodies
239
- foreach($this->pois as &$poi)
240
- $poi->body = wpautop($poi->body);
241
-
242
- $map = serialize($this);
243
-
244
- // Update map
245
- if (!$this->mapid) {
246
- // If no ID then autonumber
247
- $result = $wpdb->query($wpdb->prepare("INSERT INTO $maps_table (obj) VALUES(%s)", $map));
248
- $this->mapid = $wpdb->get_var("SELECT LAST_INSERT_ID()");
249
- } else {
250
- // Id provided, so insert or update
251
- $result = $wpdb->query($wpdb->prepare("INSERT INTO $maps_table (mapid, obj) VALUES(%d, '%s') ON DUPLICATE KEY UPDATE obj = %s", $this->mapid, $map, $map));
252
- }
253
-
254
- if ($result === false || !$this->mapid)
255
- return false;
256
-
257
- // Update posts
258
- $result = $wpdb->query($wpdb->prepare("INSERT INTO $posts_table (postid, mapid) VALUES(%d, %d) ON DUPLICATE KEY UPDATE postid = %d, mapid = %d", $this->postid, $this->mapid,
259
- $this->postid, $this->mapid));
260
-
261
- if ($result === false)
262
- return false;
263
-
264
- $wpdb->query("COMMIT");
265
- return true;
266
- }
267
-
268
- static function ajax_save() {
269
- check_ajax_referer('mappress', 'nonce');
270
-
271
- if (!current_user_can('edit_posts'))
272
- Mappress::ajax_response('Not authorized');
273
-
274
- ob_start();
275
- $mapdata = (isset($_POST['mapdata'])) ? json_decode(stripslashes($_POST['mapdata']), true) : null;
276
-
277
- if (!$mapdata)
278
- Mappress::ajax_response('Internal error, your data has not been saved!');
279
-
280
- $map = new Mappress_Map($mapdata);
281
- $result = $map->save();
282
-
283
- if (!$result)
284
- Mappress::ajax_response('Internal error, your data has not been saved!');
285
-
286
- do_action('mappress_map_save', $map); // Use for your own developments
287
-
288
- // Return saved mapid
289
- Mappress::ajax_response('OK', $map);
290
- }
291
-
292
- /**
293
- * Delete a map and all of its post assignments
294
- *
295
- * @param mixed $mapid
296
- */
297
- static function delete($mapid) {
298
- global $wpdb;
299
- $maps_table = $wpdb->prefix . 'mappress_maps';
300
- $posts_table = $wpdb->prefix . 'mappress_posts';
301
-
302
- // Delete from posts table
303
- $result = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE mapid = %d", $mapid));
304
- if ($result === false)
305
- return false;
306
-
307
- $result = $wpdb->query($wpdb->prepare("DELETE FROM $maps_table WHERE mapid = %d", $mapid));
308
- if ($result === false)
309
- return false;
310
-
311
- $wpdb->query("COMMIT");
312
- return true;
313
- }
314
-
315
- static function ajax_delete() {
316
- check_ajax_referer('mappress', 'nonce');
317
-
318
- if (!current_user_can('edit_posts'))
319
- Mappress::ajax_response('Not authorized');
320
-
321
- ob_start();
322
- $mapid = (isset($_POST['mapid'])) ? $_POST['mapid'] : null;
323
- $result = Mappress_Map::delete($mapid);
324
-
325
- if (!$result)
326
- Mappress::ajax_response("Internal error when deleting map ID '$mapid'!");
327
-
328
- do_action('mappress_map_delete', $mapid); // Use for your own developments
329
- Mappress::ajax_response('OK');
330
- }
331
-
332
- /**
333
- * Delete a map assignment(s) for a post
334
- * If $mapid is null, then ALL maps will be removed from the post
335
- * Maps are not deleted, only the post_table entry is removed
336
- *
337
- * @param int $mapid Map to remove
338
- * @param int $postid Post to remove from
339
- * @return TRUE if map has been removed, FALSE if map wasn't assigned to the post
340
- */
341
- static function delete_post_map($postid, $mapid=null) {
342
- global $wpdb;
343
- $posts_table = $wpdb->prefix . 'mappress_posts';
344
-
345
- if (!$postid)
346
- return true;
347
-
348
- if ($mapid)
349
- $results = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE postid = %d AND mapid = %d", $postid, $mapid));
350
- else
351
- $results = $wpdb->query($wpdb->prepare("DELETE FROM $posts_table WHERE postid = %d", $postid));
352
-
353
- $wpdb->query("COMMIT");
354
-
355
- if ($results === false)
356
- return false;
357
-
358
- return true;
359
- }
360
-
361
- /**
362
- * Display a map
363
- *
364
- * @param mixed $atts - override attributes. Attributes applied from options -> map -> $atts
365
- */
366
- function display($atts = null) {
367
- static $div = 0;
368
-
369
- $this->update($atts);
370
-
371
- // Assign a map name, if none was provided. Uniqid is used for for ajax to prevent repeating ids
372
- if (empty($this->name)) {
373
- $this->name = (defined('DOING_AJAX') && DOING_AJAX) ? "mapp" . uniqid() : "mapp$div";
374
- $div++;
375
- }
376
-
377
- // Prepare POIs for maps
378
- if (empty($this->query))
379
- $this->prepare();
380
-
381
- // Last chance to alter map before display
382
- do_action('mappress_map_display', $this);
383
-
384
- // Empty container to prevent pop-ins
385
- $id = $this->name . '-layout';
386
- $html = "<div class='mapp-layout' id='$id'></div>";
387
-
388
- // Dynamically enqueue scripts
389
- Mappress::scripts_enqueue();
390
- $script = "mapp.data.push( " . json_encode($this) . " ); \r\nif (typeof mapp.load != 'undefined') { mapp.load(); };";
391
-
392
- // Use inline scripts for XHTML and some themes which match tags (incorrectly) in the content
393
- if (function_exists('wp_add_inline_script') && Mappress::$options->footer && (!defined('DOING_AJAX') || !DOING_AJAX))
394
- wp_add_inline_script('mappress', "//<![CDATA[\r\n" . $script . "\r\n//]]>");
395
- else
396
- $html .= Mappress::script($script);
397
-
398
- return $html;
399
- }
400
-
401
- /**
402
- * Prepare map for output
403
- *
404
- */
405
- function prepare() {
406
- global $post;
407
-
408
- // Sort the pois
409
- if (Mappress::$options->sort && !isset($this->query['orderby']))
410
- $this->sort_pois();
411
-
412
- // Set properties (mashups and maps)
413
- foreach($this->pois as $poi) {
414
- if ($poi->postid)
415
- $postid = $poi->postid;
416
- else
417
- $postid = ($post) ? $post->ID : null;
418
- $poi->props = apply_filters('mappress_poi_props', $poi->props, $postid, $poi);
419
-
420
- // Process oembeds
421
- // $poi->body = $wp_embed->autoembed($poi->body);
422
- }
423
-
424
- // Autoicons
425
- $this->autoicons();
426
- }
427
-
428
- /**
429
- * Autoicons
430
- */
431
- function autoicons() {
432
- global $post;
433
-
434
- // Only 1 rule allowed
435
- $rule = (object) wp_parse_args(Mappress::$options->autoicons, array('key' => null, 'values' => array()));
436
-
437
- foreach($rule->values as $value => $iconid) {
438
- // Get all post IDs that match the current key & value
439
- if ($rule->key == 'post_type') {
440
- $wpq = new WP_Query(array('post_type' => $value, 'fields' => 'ids', 'posts_per_page' => -1));
441
- $postids = $wpq->posts;
442
- } else {
443
- $term = get_term_by('slug', $value, $rule->key);
444
- if (!is_object($term))
445
- continue;
446
-
447
- $objects = get_objects_in_term($term->term_id, $rule->key);
448
- if (!is_array($objects))
449
- continue;
450
-
451
- $postids = array_keys(array_flip($objects));
452
- }
453
-
454
- // Check each post ID to see if it's in the map's POIs, if so set iconid
455
- $current_post = ($post) ? $post->ID : null;
456
- foreach($this->pois as &$poi) {
457
- $postid = ($poi->postid) ? $poi->postid : $current_post;
458
- if (in_array($postid, $postids))
459
- $poi->iconid = $iconid;
460
- }
461
- }
462
-
463
- // Filter
464
- foreach($this->pois as &$poi)
465
- $poi->iconid = apply_filters('mappress_poi_iconid', $poi->iconid, $poi);
466
- }
467
-
468
- /**
469
- * Default action to sort the map
470
- *
471
- * @param mixed $map
472
- */
473
- function sort_pois() {
474
- usort($this->pois, array(__CLASS__, 'compare_title'));
475
- do_action('mappress_sort_pois', $this);
476
- }
477
-
478
- /**
479
- * Compare two POIs by title
480
- * HTML tags are stripped - until URL is separated from title this is the only way to
481
- * sort titles with HTML
482
- *
483
- * @param mixed $a
484
- * @param mixed $b
485
- * @return mixed
486
- */
487
- static function compare_title($a, $b) {
488
- return strcasecmp(strip_tags($a->title), strip_tags($b->title));
489
- }
490
- }
491
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates_admin/editor.php CHANGED
@@ -23,13 +23,13 @@
23
  <# } #>
24
  </div>
25
 
26
- <div class='mapp-poi-editor-toolbar'>
27
  <# if (poi.type == 'kml') { #>
28
  <div class='mapp-poi-kml'>
29
  <input class='mapp-poi-url' type='text' readonly='readonly' value='<# print( (poi.kml) ? poi.kml.url : '' );#>'/>
30
  </div>
31
  <# } #>
32
 
 
33
  <div class='mapp-poi-editor-tabs'>
34
  <a class='mapp-poi-visual'><?php _e('Visual', 'mappress-google-maps-for-wordpress'); ?></a> | <a class='mapp-poi-html'><?php _e('HTML', 'mappress-google-maps-for-wordpress');?></a>
35
  </div>
23
  <# } #>
24
  </div>
25
 
 
26
  <# if (poi.type == 'kml') { #>
27
  <div class='mapp-poi-kml'>
28
  <input class='mapp-poi-url' type='text' readonly='readonly' value='<# print( (poi.kml) ? poi.kml.url : '' );#>'/>
29
  </div>
30
  <# } #>
31
 
32
+ <div class='mapp-poi-editor-toolbar'>
33
  <div class='mapp-poi-editor-tabs'>
34
  <a class='mapp-poi-visual'><?php _e('Visual', 'mappress-google-maps-for-wordpress'); ?></a> | <a class='mapp-poi-html'><?php _e('HTML', 'mappress-google-maps-for-wordpress');?></a>
35
  </div>
templates_admin/mce.php CHANGED
@@ -6,7 +6,6 @@
6
  <h1><?php _e('Select a map', 'mappress-google-maps-for-wordpress');?></h1>
7
  <input data-mapp-mce='add' class='button' type='button' value='<?php esc_attr_e('Add New', 'mappress-google-maps-for-wordpress')?>' />
8
  </div>
9
- <?php echo Mappress::get_support_links(); ?>
10
  </div>
11
  <div class='mapp-mce-filter-block'>
12
  <div class='mapp-mce-search-block'>
@@ -28,7 +27,6 @@
28
  <div class='mapp-mce-edit-panel'>
29
  <div class='mapp-mce-header'>
30
  <input class='mapp-mce-title' type='text' placeholder='<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>' />
31
- <?php echo Mappress::get_support_links(); ?>
32
  </div>
33
  <div class='mapp-mce-settings'>
34
  <div class='mapp-mce-setting'>
6
  <h1><?php _e('Select a map', 'mappress-google-maps-for-wordpress');?></h1>
7
  <input data-mapp-mce='add' class='button' type='button' value='<?php esc_attr_e('Add New', 'mappress-google-maps-for-wordpress')?>' />
8
  </div>
 
9
  </div>
10
  <div class='mapp-mce-filter-block'>
11
  <div class='mapp-mce-search-block'>
27
  <div class='mapp-mce-edit-panel'>
28
  <div class='mapp-mce-header'>
29
  <input class='mapp-mce-title' type='text' placeholder='<?php _e('Untitled', 'mappress-google-maps-for-wordpress');?>' />
 
30
  </div>
31
  <div class='mapp-mce-settings'>
32
  <div class='mapp-mce-setting'>