MapPress Easy Google Maps - Version 2.59

Version Description

  • Fixed: JS files were not compiling for IE11
  • Fixed: Leaflet icons were not setting scale properly, interfering with marker spiderfier
  • Fixed: error when saving map center of 0,0
  • Added: new marker class to enable effects
  • Added: map data can be recovered after deletion
  • Added: highlighting on mouse over for list and marker hover
  • Added: better z-indexing for hovered marker
Download this release

Release Info

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

Code changes from version 2.58 to 2.59

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.iw=null,this.tt=null,this.opened=null,this.places=null,this.selected=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;!0===this.sanity()&&(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.tt=e('<div class="'+o+'">').appendTo(this.div.canvas),this.tt=new i.Infobox(this.map_,{className:"mapp-ib-tooltip",clip:!0,pan:!1}),this.tt.setContent(this.div.tt.get(0)),this.tt&&(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.select(null),e(this).triggerHandler("mapp.close")},poiCloseTooltip:function(){var t=mappl10n.options.debugTooltips;this.tt&&!t&&this.tt.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.poiCloseTooltip(),this.select(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.tt.html(t.render("tooltip"));var e=this.clusterGetLatLng(t),i=e||t.getPosition();this.tt.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})},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="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.selected=t},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}}},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){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"}},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=t&&t.name?t.name.trim():t.trim()),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(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 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(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.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)})),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)})();
1
+ !function(){var t={854:function(){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.hovered=null,this.iw=null,this.mapdata=t,this.places=null,this.selected=null,this.settings=e||{},this.templates=null,this.tooltip=null,this.clusterer=null,this.dir_=null,this.div={},this.layers_={},this.map_=null,this.pois_=[],this.xhr_,_.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},i.Map.prototype={display:function(){var t=this;!0===this.sanity()&&(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())})),this.div.list.on("mouseenter","[data-mapp-poi]",(function(i){var o=e(this).attr("data-mapp-poi");t.poiHover(t.pois_[o])})),this.div.list.on("mouseleave","[data-mapp-poi]",(function(e){t.poiHover(null)})))},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)))},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],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"];for(var u in h&&"object"==t(p[h])&&this.map_.setOptions({styles:p[h]}),p)this.map_.mapTypes.set(u,new google.maps.StyledMapType(p[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",maxZoom:21}))},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.selected&&this.toggleHighlight(this.selected,!1),this.selected=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(),e(this).triggerHandler("mapp.close")},poiInsert:function(t){var e=this;this.pois_.unshift(t),t.setMap(this),setTimeout((function(){return e.renderList()}),500),this.set({dirty:!0})},poiOpen:function(t,i){var o=null;if(this.poiClose(),this.toggleTooltip(null),this.selected=t,this.toggleHighlight(t,!0),"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)}},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})},poiHover:function(t){t&&this.hovered==t||(this.hovered&&this.hovered!=this.selected&&(this.toggleTooltip(null),this.toggleHighlight(this.hovered,!1),this.hovered=null),t&&t!=this.selected&&(this.toggleTooltip(t),this.toggleHighlight(t,!0),this.hovered=t))},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.hasOwnProperty("lat")&&this.center.hasOwnProperty("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.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)}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()},toggleHighlight:function(t,i){if(mappl10n.options.highlight){t.highlight(i);var o=e.inArray(t,this.pois_);e('[data-mapp-poi="'+o+'"]',this.div.list).toggleClass("mapp-selected",i)}},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)},toggleTooltip:function(t){if(this.tooltip)if(t){if(this.div.layout.hasClass("mapp-view-mini")&&this.div.layout.hasClass("mapp-list-open"))return;if(this.selected)return;this.div.tooltip.html(t.render("tooltip"));var e=this.clusterGetLatLng(t),i=e||t.getPosition();this.tooltip.open({position:i,anchorPoint:t.getAnchorPoint()})}else{var o=mappl10n.options.debugTooltips;this.tooltip&&!o&&this.tooltip.close()}},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:function(){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:function(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:function(){var t=window.mapp||{};t.Icons={},t.Icons.get=function(e){var i=t.Icons.getUrl(e);return"leaflet"==mappl10n.options.engine?L.icon({iconUrl:i,iconAnchor:[16,32],iconSize:[32,32],popupAnchor:[0,-32]}):{url:i}},t.Icons.getUrl=function(t){return"https://maps.google.com/intl/en_us/mapfiles/ms/micons/red-dot.png"}},689:function(){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(),r=this.node.outerHeight();if(this.opts.pan){var p={x:o.x,y:o.y};o.x+l/2+i.x>n?p.x=Math.max(n-l/2-i.x,n/2-i.x):o.x-l/2+i.x<0&&(p.x=Math.min(l/2+i.x,n/2-i.x)),o.y+i.y-r<0&&(p.y=Math.min(r-i.y,r-i.y)),p.y>=s&&(p.y=s-1),"leaflet"==mappl10n.options.engine?this.map.panBy([o.x-p.x,o.y-p.y]):this.map.panBy(o.x-p.x,o.y-p.y),o=p}var h=o.y-r+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}),r=this.node.outerHeight(),h=o.y-r+i.y,this.node.removeClass("mapp-ib-flip"),this.opts.clip&&!this.opts.pan&&h<0&&h<s-(o.y+r)&&(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:function(){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)},uniqid:function(){return void 0===e.lib.uniqidCounter?e.lib.uniqidCounter=0:e.lib.uniqidCounter++,e.lib.uniqidCounter}},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:function(){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()},436:function(){var t;t=jQuery,mapp.Marker=function(t){var e=this;this.anchorPoint=null,this.div=null,this.draggable=null,this.icon=null,this.map=null,this.position=null,this.visible=null,this.zIndex=0,this.setValues(t),this.overlayView=new google.maps.OverlayView,this.overlayView.draw=function(){return e.draw()},this.overlayView.onAdd=function(){return e.onAdd()},this.overlayView.onRemove=function(){return e.onRemove()}},mapp.Marker.prototype={draw:function(){if(this.div&&this.icon){var e=this.overlayView.getProjection().fromLatLngToDivPixel(this.position),i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};t(this.div).css({left:e.x-i.width/2,top:e.y-i.height})}},getDiv:function(){return this.div},getDraggable:function(){return this.draggable},getMap:function(){return this.map},getPosition:function(){return this.position},getVisible:function(){return this.visible},handleEvent:function(t){var e="on"+t.type[0].toUpperCase()+t.type.slice(1);this[e]&&this[e](t)},onAdd:function(){var e=this,i=this.overlayView.getPanes();this.div=t('<div class="mapp-marker">'),this.div.appendTo(i.overlayMouseTarget),this.icon&&this.setIcon(),google.maps.OverlayView.preventMapHitsAndGesturesFrom(this.div.get(0)),this.div.get(0).addEventListener("click",(function(){(!e.dragging||e.dragging&&!e.dragging.moved)&&mapp.event.trigger(e,"click"),e.dragging=null})),this.div.get(0).addEventListener("mouseenter",this),this.div.get(0).addEventListener("mouseleave",this),this.setDraggable(this.draggable)},onMouseenter:function(t){mapp.event.trigger(this,"mouseover")},onMouseleave:function(t){mapp.event.trigger(this,"mouseout")},onPointerdown:function(t){var e=this.map.getDiv().getBoundingClientRect(),i=this.overlayView.getProjection().fromLatLngToContainerPixel(this.position);this.dragging={moved:!1,startPixel:{x:t.clientX,y:t.clientY},offset:{x:i.x-(t.clientX-e.left),y:i.y-(t.clientY-e.top)}},this.toggleDragEvents(!0)},onPointermove:function(t){if(!(Math.abs(t.clientX-this.dragging.startPixel.x)+Math.abs(t.clientY-this.dragging.startPixel.y)<3)){var e=this.map.getDiv().getBoundingClientRect(),i={x:t.clientX-e.left+this.dragging.offset.x,y:t.clientY-e.top+this.dragging.offset.y};this.setPosition(this.overlayView.getProjection().fromContainerPixelToLatLng(i)),this.draw(),this.dragging.moved=!0,mapp.event.trigger(this,"dragstart")}},onPointercancel:function(t){this.onPointerup(t)},onPointerup:function(t){this.dragging&&this.dragging.moved&&mapp.event.trigger(this,"dragend"),this.toggleDragEvents(!1)},onRemove:function(){this.div&&(this.toggleDragEvents(!1),this.div.remove(),this.div=null)},set:function(t,e){var i="set"+t[0].toUpperCase()+t.slice(1);this[i]&&this[i](e)},setDraggable:function(t){this.draggable=t,this.map&&(this.div.get(0).removeEventListener("pointerdown",this,{passive:!0}),t&&this.div.get(0).addEventListener("pointerdown",this,{passive:!0}))},setIcon:function(t){if(void 0!==t&&(this.icon=t),this.icon&&this.div){var e='<img draggable="false" src="'+this.icon.url+'">';this.div.html(e);var i=this.icon.scaledSize?this.icon.scaledSize:{width:32,height:32};this.div.css({width:i.width,height:i.height}),this.setZIndex()}},setMap:function(t){this.map=t,this.overlayView.setMap(t)},setPosition:function(t){this.position=t},setValues:function(t){for(key in t)this.set(key,t[key])},setVisible:function(t){this.visible=t,this.div&&this.div.css("visibility",t?"visibile":"hidden")},setZIndex:function(t){this.zIndex=void 0!==t?t:this.zIndex,this.div&&this.div.css("z-index",t)},toggleDragEvents:function(t){document.removeEventListener("pointermove",this,{passive:!0}),document.removeEventListener("pointerup",this,{passive:!0}),document.removeEventListener("pointercancel",this,{passive:!0}),t&&(document.addEventListener("pointermove",this,{passive:!0}),document.addEventListener("pointerup",this,{passive:!0}),document.addEventListener("pointercancel",this,{passive:!0}))}}},510:function(){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.hasOwnProperty("lat")&&t.hasOwnProperty("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:function(){var t,e=window.mapp||{};t=jQuery,e.Poi=function(i){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,i),i&&i.correctedAddress&&(this.address=i.correctedAddress),"leaflet"==mappl10n.options.engine&&this.isPoly()&&(this.type=null),i.viewport&&i.viewport.sw&&i.viewport.ne&&i.viewport.sw.lat){var o=i.viewport.sw,n=i.viewport.ne;"leaflet"==mappl10n.options.engine?this.viewport=new L.LatLngBounds(L.latLng(o.lat,o.lng),L.latLng(n.lat,n.lng)):this.viewport=new google.maps.LatLngBounds(new google.maps.LatLng(o.lat,o.lng),new google.maps.LatLng(n.lat,n.lng))}var s=[],a=[];if(!i.overlay)switch(this.type){case"polygon":if(i.poly&&i.poly.paths)for(var l=0;l<i.poly.paths.length;l++){s=[];for(var r=0;r<i.poly.paths[l].length;r++)s.push(new google.maps.LatLng(i.poly.paths[l][r].lat,i.poly.paths[l][r].lng));a.push(new google.maps.MVCArray(s))}this.overlay=new google.maps.Polygon({paths:new google.maps.MVCArray(a)}),this.setColors(i.poly);break;case"polyline":if(i.poly&&i.poly.path)for(l=0;l<i.poly.path.length;l++)s.push(new google.maps.LatLng(i.poly.path[l].lat,i.poly.path[l].lng));this.overlay=new google.maps.Polyline({path:new google.maps.MVCArray(s)}),this.setColors(i.poly);break;case"circle":var p=new google.maps.LatLng(i.point.lat,i.point.lng);this.overlay=new google.maps.Circle({center:p,radius:parseFloat(i.poly.radius)}),this.setColors(i.poly);break;case"rectangle":this.overlay=new google.maps.Rectangle({bounds:this.viewport}),this.setColors(i.poly);break;case"kml":var h=i.kml&&i.kml.url?i.kml.url:"";this.overlay="leaflet"==mappl10n.options.engine?omnivore.kml(h):new google.maps.KmlLayer({url:h,preserveViewport:!0,suppressInfoWindows:!0});break;case"":default:"leaflet"==mappl10n.options.engine?this.overlay=L.marker([i.point.lat,i.point.lng]):this.overlay=new e.Marker({position:new google.maps.LatLng(i.point.lat,i.point.lng)})}i.type||this.set({iconid:i.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?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}},highlight:function(i){if(!this.type){var o="leaflet"==mappl10n.options.engine?t(this.overlay._icon):this.overlay.getDiv();if(o){var n=this.editable?"circle":mappl10n.options.highlight;switch(n){case"circle":o.toggleClass("mapp-marker-circle",i);break;case"icon":var s=i?e.Icons.get(mappl10n.options.highlightIcon):e.Icons.get(this.iconid);if("leaflet"==mappl10n.options.engine&&this.overlay.getIcon().options.iconUrl==s.options.iconUrl)return;this.overlay.setIcon(s);break;case"scale":this.map.editable||("leaflet"!=mappl10n.options.engine&&(o=o.parent()),o.addClass("mapp-marker"),o.toggleClass("mapp-marker-scale",i))}this.setZIndex(i?1e4:0)}}},isPoly:function(){return-1!=jQuery.inArray(this.type,["polyline","polygon","circle","rectangle"])},open:function(t){this.map.poiOpen(this,t)},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||(this.iconid=i,this.overlay.setIcon(e.Icons.get(i)));break;default:this[att]=i}}this.map&&"undefined"!=typeof dirty&&this.map.set({dirty: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)})))),this.setEditable(this.map.editable),!this.type&&this.map.clusterer||("leaflet"==mappl10n.options.engine?this.overlay.addTo(t.getMap()):this.overlay.setMap(t.getMap())),e.event.addListener(this.overlay,"click",(function(t){i.open(t)})),e.event.addListener(this.overlay,"mouseover",(function(t){i.map.poiHover(i)})),e.event.addListener(this.overlay,"mouseout",(function(t){i.map.poiHover(null)}))):"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:function(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:function(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:function(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,v=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},f=v.postcode,y=v.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:y},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:f,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:function(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=function(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(436),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,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)})();
1
+ !function(){var t={215:function(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?(this.map.poiHover(null),"marker"==t.type?(i=new o.Poi({body:"",iconid:null,overlay:null,point:t.overlay.getPosition().toJSON(),title:t.overlay.getPosition().toUrlValue(6),type:null}),t.overlay.setMap(null)):i=new o.Poi({body:"",iconid:null,overlay:t.overlay,title:mappl10n.shape,type: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:"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:function(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:function(){return 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,layout:"left",mapOpts:{mapTypeControl:!0,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:function(t,e,n){"use strict";n.r(e);var i=n(926),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:function(t,e,n){"use strict";n.r(e);var i=n(429),o=n(218),a=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 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),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(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 M(){if(C.isEditorOpen)return d(r.default,{mapid:C.editMapid,onAction:E})}function x(){if(C.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&&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(h,null,_(),function(){if(!C.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:C.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(),M()):d(h,null,d(h,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:function(t,e,n){"use strict";n.r(e);n(429);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.CheckboxControl,o.Panel,o.PanelBody,o.PanelRow,o.Spinner,o.TextControl;n(308);window.mapp,wp.element.createElement;var a=wp.element,r=(a.Fragment,a.useEffect,a.useLayoutEffect,a.useRef,a.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:function(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:function(){return 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")))}},926:function(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:function(){return U}});var s=wp.element.createElement,l=wp.url.addQueryArgs,c=wp.element,u=c.useCallback,m=c.useEffect,d=c.useState,f=wp.components,h=f.Button,g=f.Dropdown,b=f.Spinner,y=f.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 a(t){i((function(e){return o(o({},e),t)}))}m((function(){wp.apiFetch({path:l("/wp/v2/search",{search:n.search,per_page:20})}).then((function(t){a({results:t})}))}),[n.search]);var p=u(_.debounce((function(t){a({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){a({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(h,{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 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 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],o=I(null),a=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)),o.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:o,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,o,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")),o=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?a: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"},o),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(){o.current&&o.current.focus(),S.store.fetchItems({})}),[]),A((function(){a.current&&S.lib.scrollTo(jQuery(".mapp-pick-items"),jQuery(a.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:function(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:function(){return 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"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=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))),"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}),a(f,{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",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(){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()}})},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,o=t.failure,r=void 0===o?function(){}:o,p=this;this.state.isSavingMap=!0,this.saveItem(e),this.publish(),a.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,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.mapid=void 0!==n.mapid?n.mapid:o.mapid,o.map_title=void 0!==n.title?n.title:o.map_title,o.postid=void 0!==n.postid?n.postid:o.postid,o.post_title=void 0!==n.post_title?n.post_title:o.post_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},50:function(){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",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(),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(".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:function(){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:function(){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:function(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=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(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=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(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
@@ -98,7 +98,6 @@ a.leaflet-control-zoom-in, .leaflet-control-zoom-out {
98
  text-decoration: none !important;
99
  }
100
 
101
-
102
  @media only screen and (min--moz-device-pixel-ratio: 2),
103
  only screen and (-o-min-device-pixel-ratio: 2/1),
104
  only screen and (-webkit-min-device-pixel-ratio: 2),
@@ -639,6 +638,17 @@ only screen and (min-device-pixel-ratio: 2) {
639
  padding: 10px;
640
  }
641
 
 
 
 
 
 
 
 
 
 
 
 
642
  /*
643
  -----------------------------------------------------------------------------------
644
  Tooltips
@@ -780,6 +790,64 @@ only screen and (min-device-pixel-ratio: 2) {
780
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-list"] { display: none; }
781
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-map"] { display: block; }
782
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
783
  /*
784
  -----------------------------------------------------------------------------------
785
  Directions
98
  text-decoration: none !important;
99
  }
100
 
 
101
  @media only screen and (min--moz-device-pixel-ratio: 2),
102
  only screen and (-o-min-device-pixel-ratio: 2/1),
103
  only screen and (-webkit-min-device-pixel-ratio: 2),
638
  padding: 10px;
639
  }
640
 
641
+ /* Workarounds for IE, which doesn't like flex */
642
+ .mapp-ie .mapp-body {
643
+ flex: none;
644
+ overflow: none;
645
+ }
646
+
647
+ .mapp-ie .mapp-iw {
648
+ display: block;
649
+ overflow: auto;
650
+ }
651
+
652
  /*
653
  -----------------------------------------------------------------------------------
654
  Tooltips
790
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-list"] { display: none; }
791
  .mapp-view-mini.mapp-list-open .mapp-footer [data-mapp-action="view-map"] { display: block; }
792
 
793
+ /*
794
+ -----------------------------------------------------------------------------------
795
+ Markers
796
+ -----------------------------------------------------------------------------------
797
+ */
798
+
799
+ .mapp-marker {
800
+ cursor: pointer;
801
+ position: absolute;
802
+ touch-action: none; /* For dragdrop */
803
+ }
804
+
805
+ /* Label */
806
+ .mapp-marker img:nth-child(2) {
807
+ height: 50%;
808
+ position: absolute;
809
+ top: 50%; left: 50%;
810
+ transform: translate(-50%, -50%);
811
+ width: 50%;
812
+ }
813
+
814
+ /* Image transforms base */
815
+ .mapp-marker img {
816
+ transform-origin: 50% 100%;
817
+ transition: transform .2s;
818
+ width: 100%;
819
+ }
820
+
821
+ /* Scale image */
822
+ .mapp-marker-scale img {
823
+ transform-origin: 50% 100%;
824
+ transform: scale(1.5);
825
+ perspective: 1001px;
826
+ }
827
+
828
+ /* Scale label - combine transforms */
829
+ .mapp-marker-scale img:nth-child(2) {
830
+ transform: translate(-50%, -50%) scale(1.5);
831
+ }
832
+
833
+ .mapp-marker-circle {
834
+ overflow: visible !important;
835
+ }
836
+
837
+ .mapp-marker-circle::before {
838
+ background-color: rgba(255,255,255,0.7);
839
+ border: 3px solid white;
840
+ border-radius: 50%;
841
+ box-sizing: border-box;
842
+ content: "";
843
+ left: -25%;
844
+ top: -25%;
845
+ width: 150%;
846
+ height: 150%;
847
+ position: absolute;
848
+ z-index: -1;
849
+ }
850
+
851
  /*
852
  -----------------------------------------------------------------------------------
853
  Directions
css/mappress_admin.css CHANGED
@@ -830,7 +830,7 @@ button.mapp-query-refresh {
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;
@@ -838,20 +838,18 @@ button.mapp-query-refresh {
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
 
830
  white-space: nowrap;
831
  }
832
 
833
+ .mapp-settings-header {
834
  align-items: baseline;
835
  background-color: #f0f0f0;
836
  border-bottom: 1px solid gray;
838
  justify-content: space-between;
839
  top: 30px;
840
  padding: 0px 10px 10px 10px;
 
 
841
  }
842
 
843
+ .mapp-settings-header-version {
844
  display: flex;
845
  align-items: baseline;
846
  }
847
 
848
+ .mapp-settings-header-version h1 {
849
  margin-right: 10px;
850
  }
851
 
852
+ .mapp-settings-header-links a {
853
  margin: 0 5px;
854
  }
855
 
languages/mappress-google-maps-for-wordpress.pot CHANGED
@@ -1,15 +1,15 @@
1
- # Copyright (C) 2020 Chris Richardson
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\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-19T03:53:19+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,154 +33,162 @@ msgstr ""
33
  msgid "https://www.mappresspro.com/chris-contact"
34
  msgstr ""
35
 
36
- #: mappress.php:171
37
- #: mappress.php:690
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:462
 
 
 
 
 
 
 
 
86
  msgid "Please enter your MapPress license key to enable plugin updates"
87
  msgstr ""
88
 
89
- #: mappress.php:466
90
  msgid "MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor."
91
  msgstr ""
92
 
93
- #: mappress.php:470
94
  msgid "MapPress has many new features! Please take a moment to learn %s."
95
  msgstr ""
96
 
97
- #: mappress.php:470
98
  msgid "what's new"
99
  msgstr ""
100
 
101
- #: mappress.php:476
102
  msgid "The MapPress map editor has moved!"
103
  msgstr ""
104
 
105
- #: mappress.php:477
106
  msgid "Use this button to open the new popup editor where you can easily create, edit and insert maps."
107
  msgstr ""
108
 
109
- #: mappress.php:523
110
  msgid "Are you sure you want to delete?"
111
  msgstr ""
112
 
113
- #: mappress.php:524
114
  msgid "Permanently delete this map from the map library?"
115
  msgstr ""
116
 
117
- #: mappress.php:525
118
  msgid "Error reading KML file"
119
  msgstr ""
120
 
121
- #: mappress.php:526
122
  msgid "URL for KML file"
123
  msgstr ""
124
 
125
- #: mappress.php:527
126
  msgid "Loading"
127
  msgstr ""
128
 
129
- #: mappress.php:528
130
  msgid "Please select a classic editor block to insert into."
131
  msgstr ""
132
 
133
- #: mappress.php:529
134
  msgid "Unable to get your location"
135
  msgstr ""
136
 
137
- #: mappress.php:530
138
  msgid "No results"
139
  msgstr ""
140
 
141
- #: mappress.php:531
142
  msgid "Save changes?"
143
  msgstr ""
144
 
145
- #: mappress.php:532
146
  msgid "Shape"
147
  msgstr ""
148
 
149
- #: mappress.php:561
150
  msgid "Improve this map"
151
  msgstr ""
152
 
153
- #: mappress.php:577
154
- #: mappress.php:596
155
  msgid "Streets"
156
  msgstr ""
157
 
158
- #: mappress.php:578
159
  msgid "Outdoors"
160
  msgstr ""
161
 
162
- #: mappress.php:579
163
  msgid "Light"
164
  msgstr ""
165
 
166
- #: mappress.php:580
167
  msgid "Dark"
168
  msgstr ""
169
 
170
- #: mappress.php:581
171
  msgid "Satellite"
172
  msgstr ""
173
 
174
- #: mappress.php:582
175
  msgid "Satellite Streets"
176
  msgstr ""
177
 
178
- #: mappress.php:691
179
- #: mappress_settings.php:335
180
  msgid "What's new"
181
  msgstr ""
182
 
183
- #: mappress.php:922
184
  msgid "Version"
185
  msgstr ""
186
 
@@ -197,7 +205,7 @@ msgid "Delete"
197
  msgstr ""
198
 
199
  #: mappress_map.php:86
200
- #: mappress_settings.php:330
201
  msgid "MapPress"
202
  msgstr ""
203
 
@@ -216,261 +224,262 @@ msgstr ""
216
  msgid "Map not found"
217
  msgstr ""
218
 
219
- #: mappress_settings.php:87
220
  msgid "Sample Map"
221
  msgstr ""
222
 
223
- #: mappress_settings.php:89
224
  msgid "Basic Settings"
225
  msgstr ""
226
 
227
- #: mappress_settings.php:90
228
  msgid "Mapping API"
229
  msgstr ""
230
 
231
- #: mappress_settings.php:93
232
  msgid "Google API key"
233
  msgstr ""
234
 
235
- #: mappress_settings.php:96
236
  msgid "Mapbox access token"
237
  msgstr ""
238
 
239
- #: mappress_settings.php:100
240
  msgid "License"
241
  msgstr ""
242
 
243
- #: mappress_settings.php:102
244
  msgid "Map Settings"
245
  msgstr ""
246
 
247
- #: mappress_settings.php:103
248
  msgid "Post types"
249
  msgstr ""
250
 
251
- #: mappress_settings.php:104
252
  msgid "Automatic display"
253
  msgstr ""
254
 
255
- #: mappress_settings.php:105
256
  msgid "Map alignment"
257
  msgstr ""
258
 
259
- #: mappress_settings.php:106
260
  #: templates/map-popup.php:3
261
  #: templates/mashup-popup.php:6
262
  msgid "Directions"
263
  msgstr ""
264
 
265
- #: mappress_settings.php:109
266
  msgid "POI Settings"
267
  msgstr ""
268
 
269
- #: mappress_settings.php:110
270
  msgid "Default zoom"
271
  msgstr ""
272
 
273
- #: mappress_settings.php:111
274
- #: mappress_settings.php:240
275
  msgid "Open first POI"
276
  msgstr ""
277
 
278
- #: mappress_settings.php:115
279
  msgid "Mashups"
280
  msgstr ""
281
 
282
- #: mappress_settings.php:116
283
  msgid "Icons"
284
  msgstr ""
285
 
286
- #: mappress_settings.php:117
287
  msgid "Styled Maps"
288
  msgstr ""
289
 
290
- #: mappress_settings.php:118
291
  msgid "Geocoding"
292
  msgstr ""
293
 
294
- #: mappress_settings.php:119
295
  msgid "Templates"
296
  msgstr ""
297
 
298
- #: mappress_settings.php:122
299
  msgid "Localization"
300
  msgstr ""
301
 
302
- #: mappress_settings.php:123
303
  msgid "Search language"
304
  msgstr ""
305
 
306
- #: mappress_settings.php:124
307
  msgid "Search country"
308
  msgstr ""
309
 
310
- #: mappress_settings.php:125
311
  msgid "Directions server"
312
  msgstr ""
313
 
314
- #: mappress_settings.php:127
315
  msgid "Miscellaneous"
316
  msgstr ""
317
 
318
- #: mappress_settings.php:128
319
  msgid "Map sizes"
320
  msgstr ""
321
 
322
- #: mappress_settings.php:129
323
  msgid "Scripts"
324
  msgstr ""
325
 
326
- #: mappress_settings.php:133
327
  msgid "Compatiblity"
328
  msgstr ""
329
 
330
- #: mappress_settings.php:177
331
- #: mappress_settings.php:246
332
- #: pro/mappress_pro_settings.php:233
333
  #: templates_admin/widgets.php:78
334
  msgid "Default"
335
  msgstr ""
336
 
337
- #: mappress_settings.php:178
338
  msgid "Center"
339
  msgstr ""
340
 
341
- #: mappress_settings.php:179
342
  msgid "Left"
343
  msgstr ""
344
 
345
- #: mappress_settings.php:180
346
  msgid "Right"
347
  msgstr ""
348
 
349
- #: mappress_settings.php:192
 
350
  msgid "None"
351
  msgstr ""
352
 
353
- #: mappress_settings.php:193
354
  msgid "Top of post"
355
  msgstr ""
356
 
357
- #: mappress_settings.php:194
358
  msgid "Bottom of post"
359
  msgstr ""
360
 
361
- #: mappress_settings.php:201
362
- #: mappress_settings.php:245
363
  msgid "(list)"
364
  msgstr ""
365
 
366
- #: mappress_settings.php:206
367
  msgid "Country code for searches"
368
  msgstr ""
369
 
370
- #: mappress_settings.php:210
371
  msgid "Prevent other plugins/themes from loading the Google Maps API"
372
  msgstr ""
373
 
374
- #: mappress_settings.php:214
375
- #: mappress_settings.php:223
376
- #: pro/mappress_pro_settings.php:231
377
  msgid "Google"
378
  msgstr ""
379
 
380
- #: mappress_settings.php:214
381
  msgid "Inline"
382
  msgstr ""
383
 
384
- #: mappress_settings.php:223
385
  msgid "Leaflet"
386
  msgstr ""
387
 
388
- #: mappress_settings.php:225
389
  msgid "Leaflet is free and requires no API key. Google requires an API key and has strict usage limits."
390
  msgstr ""
391
 
392
- #: mappress_settings.php:231
393
- #: mappress_settings.php:234
394
  msgid "Output scripts in footer"
395
  msgstr ""
396
 
397
- #: mappress_settings.php:232
398
  msgid "Disabled because Jetpack Infinite Scroll is active"
399
  msgstr ""
400
 
401
- #: mappress_settings.php:235
402
  msgid "disable if maps are output using AJAX"
403
  msgstr ""
404
 
405
- #: mappress_settings.php:248
406
  msgid "Language for searches and Google map controls"
407
  msgstr ""
408
 
409
- #: mappress_settings.php:252
410
  msgid "Enter token to use Mapbox map tiles"
411
  msgstr ""
412
 
413
- #: mappress_settings.php:259
414
- #: mappress_settings.php:264
415
  msgid "Map type control"
416
  msgstr ""
417
 
418
- #: mappress_settings.php:260
419
  msgid "Street view control"
420
  msgstr ""
421
 
422
- #: mappress_settings.php:261
423
- #: mappress_settings.php:265
424
  msgid "Zoom control"
425
  msgstr ""
426
 
427
- #: mappress_settings.php:280
428
  msgid "Default zoom when displaying a single POI"
429
  msgstr ""
430
 
431
- #: mappress_settings.php:293
432
  msgid "Easy Google Maps"
433
  msgstr ""
434
 
435
- #: mappress_settings.php:301
436
  msgid "Width (px, %, vh, vw)"
437
  msgstr ""
438
 
439
- #: mappress_settings.php:301
440
  msgid "Height (px, %, vh, vw)"
441
  msgstr ""
442
 
443
- #: mappress_settings.php:301
444
  msgid "Default size"
445
  msgstr ""
446
 
447
- #: mappress_settings.php:316
448
  msgid "Show a tooltip when mouse is over a POI"
449
  msgstr ""
450
 
451
- #: mappress_settings.php:321
452
  msgid "Copy maps when overwriting a translation"
453
  msgstr ""
454
 
455
- #: mappress_settings.php:334
456
  msgid "Get help"
457
  msgstr ""
458
 
459
- #: mappress_settings.php:337
460
  msgid "Your account"
461
  msgstr ""
462
 
463
- #: mappress_settings.php:339
464
  msgid "Upgrade to MapPress Pro"
465
  msgstr ""
466
 
467
- #: mappress_settings.php:346
468
- #: mappress_settings.php:354
469
  msgid "Save Changes"
470
  msgstr ""
471
 
472
- #: mappress_settings.php:347
473
- #: mappress_settings.php:355
474
  msgid "Reset Defaults"
475
  msgstr ""
476
 
@@ -479,13 +488,14 @@ msgid "Address"
479
  msgstr ""
480
 
481
  #: mappress_template.php:35
482
- #: pro/mappress_pro_settings.php:337
483
  msgid "Body"
484
  msgstr ""
485
 
486
  #: mappress_template.php:36
487
- #: pro/mappress_pro_settings.php:173
488
- #: pro/mappress_pro_settings.php:337
 
489
  msgid "Icon"
490
  msgstr ""
491
 
@@ -494,7 +504,7 @@ msgid "Thumbnail"
494
  msgstr ""
495
 
496
  #: mappress_template.php:38
497
- #: pro/mappress_pro_settings.php:337
498
  msgid "Title"
499
  msgstr ""
500
 
@@ -504,13 +514,13 @@ msgstr ""
504
 
505
  #: mappress_template.php:40
506
  #: pro/mappress_filter.php:120
507
- #: pro/mappress_pro_settings.php:342
508
  msgid "Custom Field"
509
  msgstr ""
510
 
511
  #: pro/mappress_filter.php:84
512
  #: pro/mappress_filter.php:133
513
- #: pro/mappress_pro_settings.php:166
514
  msgid "Post type"
515
  msgstr ""
516
 
@@ -610,286 +620,294 @@ msgid "Custom icons"
610
  msgstr ""
611
 
612
  #: pro/mappress_pro_settings.php:34
 
 
 
 
613
  msgid "Icon scaling"
614
  msgstr ""
615
 
616
- #: pro/mappress_pro_settings.php:35
617
  msgid "Automatic icons"
618
  msgstr ""
619
 
620
- #: pro/mappress_pro_settings.php:37
621
- #: templates/map.php:49
622
  #: templates_admin/mce.php:12
623
  msgid "Search"
624
  msgstr ""
625
 
626
- #: pro/mappress_pro_settings.php:39
627
- #: templates/map.php:56
628
  msgid "Filter"
629
  msgstr ""
630
 
631
- #: pro/mappress_pro_settings.php:40
632
  msgid "POI content"
633
  msgstr ""
634
 
635
- #: pro/mappress_pro_settings.php:41
636
  msgid "POI click"
637
  msgstr ""
638
 
639
- #: pro/mappress_pro_settings.php:42
640
  msgid "KMLs"
641
  msgstr ""
642
 
643
- #: pro/mappress_pro_settings.php:43
644
  msgid "Thumbnails"
645
  msgstr ""
646
 
647
- #: pro/mappress_pro_settings.php:44
648
  msgid "Thumbnail size"
649
  msgstr ""
650
 
651
- #: pro/mappress_pro_settings.php:47
652
  #: pro/mappress_pro_settings.php:49
 
653
  msgid "Styled maps"
654
  msgstr ""
655
 
656
- #: pro/mappress_pro_settings.php:50
657
  msgid "Default style"
658
  msgstr ""
659
 
660
- #: pro/mappress_pro_settings.php:53
661
  msgid "Geocoding fields"
662
  msgstr ""
663
 
664
- #: pro/mappress_pro_settings.php:54
665
  msgid "Overwrite"
666
  msgstr ""
667
 
668
- #: pro/mappress_pro_settings.php:55
669
  msgid "Geocoding errors"
670
  msgstr ""
671
 
672
- #: pro/mappress_pro_settings.php:58
673
  msgid "Google Server API key"
674
  msgstr ""
675
 
676
- #: pro/mappress_pro_settings.php:60
677
  msgid "Custom templates"
678
  msgstr ""
679
 
680
- #: pro/mappress_pro_settings.php:61
681
- #: pro/mappress_pro_settings.php:226
682
  msgid "Force resize"
683
  msgstr ""
684
 
685
- #: pro/mappress_pro_settings.php:153
686
  msgid "more info"
687
  msgstr ""
688
 
689
- #: pro/mappress_pro_settings.php:154
690
  msgid "API key secured by IP address for geocoding (optional)"
691
  msgstr ""
692
 
693
- #: pro/mappress_pro_settings.php:173
694
  msgid "Value"
695
  msgstr ""
696
 
697
- #: pro/mappress_pro_settings.php:188
698
  msgid "Enable updates for beta versions"
699
  msgstr ""
700
 
701
- #: pro/mappress_pro_settings.php:192
702
  msgid "Enable marker clustering"
703
  msgstr ""
704
 
705
- #: pro/mappress_pro_settings.php:201
706
  msgid "Checkboxes"
707
  msgstr ""
708
 
709
- #: pro/mappress_pro_settings.php:201
710
  msgid "Select"
711
  msgstr ""
712
 
713
- #: pro/mappress_pro_settings.php:208
714
  msgid "Key"
715
  msgstr ""
716
 
717
- #: pro/mappress_pro_settings.php:208
718
  msgid "Format"
719
  msgstr ""
720
 
721
- #: pro/mappress_pro_settings.php:223
722
  msgid "Permanently resize existing maps (classic editor only)"
723
  msgstr ""
724
 
725
- #: pro/mappress_pro_settings.php:225
726
  msgid "from %s to %s"
727
  msgstr ""
728
 
729
- #: pro/mappress_pro_settings.php:233
730
  msgid "Algolia"
731
  msgstr ""
732
 
733
- #: pro/mappress_pro_settings.php:234
734
  msgid "Nominatim"
735
  msgstr ""
736
 
737
- #: pro/mappress_pro_settings.php:235
738
  msgid "MapBox"
739
  msgstr ""
740
 
741
- #: pro/mappress_pro_settings.php:245
 
 
 
 
742
  #: templates_admin/widgets.php:68
743
  msgid "Edit"
744
  msgstr ""
745
 
746
- #: pro/mappress_pro_settings.php:259
747
  msgid "Standard"
748
  msgstr ""
749
 
750
- #: pro/mappress_pro_settings.php:260
751
  msgid "InfoBox"
752
  msgstr ""
753
 
754
- #: pro/mappress_pro_settings.php:267
755
  msgid "Left of map"
756
  msgstr ""
757
 
758
- #: pro/mappress_pro_settings.php:268
759
  msgid "Below map"
760
  msgstr ""
761
 
762
- #: pro/mappress_pro_settings.php:274
763
  msgid "Get license"
764
  msgstr ""
765
 
766
- #: pro/mappress_pro_settings.php:275
767
  msgid "Enter license to enable automatic updates"
768
  msgstr ""
769
 
770
- #: pro/mappress_pro_settings.php:288
771
  msgid "Active"
772
  msgstr ""
773
 
774
- #: pro/mappress_pro_settings.php:293
775
  msgid "Check now"
776
  msgstr ""
777
 
778
- #: pro/mappress_pro_settings.php:298
779
  #: pro/mappress_updater.php:116
780
  msgid "Communication error, please try again later"
781
  msgstr ""
782
 
783
- #: pro/mappress_pro_settings.php:300
784
  msgid "License is invalid or expired"
785
  msgstr ""
786
 
787
- #: pro/mappress_pro_settings.php:304
788
  msgid "POI title + POI body"
789
  msgstr ""
790
 
791
- #: pro/mappress_pro_settings.php:304
792
  msgid "Post title + post excerpt"
793
  msgstr ""
794
 
795
- #: pro/mappress_pro_settings.php:309
796
  msgid "Open POI"
797
  msgstr ""
798
 
799
- #: pro/mappress_pro_settings.php:309
800
  msgid "Open post"
801
  msgstr ""
802
 
803
- #: pro/mappress_pro_settings.php:309
804
  msgid "Open post in new tab"
805
  msgstr ""
806
 
807
- #: pro/mappress_pro_settings.php:314
808
  msgid "Include KML POIs in mashups"
809
  msgstr ""
810
 
811
- #: pro/mappress_pro_settings.php:326
812
  msgid "%d Errors"
813
  msgstr ""
814
 
815
- #: pro/mappress_pro_settings.php:336
816
  msgid "Address line "
817
  msgstr ""
818
 
819
- #: pro/mappress_pro_settings.php:337
820
  msgid "Latitude"
821
  msgstr ""
822
 
823
- #: pro/mappress_pro_settings.php:337
824
  msgid "Longitude"
825
  msgstr ""
826
 
827
- #: pro/mappress_pro_settings.php:337
828
  msgid "Zoom"
829
  msgstr ""
830
 
831
- #: pro/mappress_pro_settings.php:342
832
  msgid "Map Field"
833
  msgstr ""
834
 
835
- #: pro/mappress_pro_settings.php:355
836
  msgid "Overwrite maps when posts are saved"
837
  msgstr ""
838
 
839
- #: pro/mappress_pro_settings.php:360
840
  msgid "Width (px) at which to collapse the left POI list"
841
  msgstr ""
842
 
843
- #: pro/mappress_pro_settings.php:364
844
  msgid "Show a list of POIs with each map"
845
  msgstr ""
846
 
847
- #: pro/mappress_pro_settings.php:372
848
  msgid "Enable search"
849
  msgstr ""
850
 
851
- #: pro/mappress_pro_settings.php:376
852
  msgid "Sort POI list by title"
853
  msgstr ""
854
 
855
- #: pro/mappress_pro_settings.php:382
856
  msgid "No styles have been defined yet"
857
  msgstr ""
858
 
859
- #: pro/mappress_pro_settings.php:391
860
  msgid "Snazzy Maps"
861
  msgstr ""
862
 
863
- #: pro/mappress_pro_settings.php:392
864
  msgid "Enter JSON from %s"
865
  msgstr ""
866
 
867
- #: pro/mappress_pro_settings.php:396
868
- #: pro/mappress_pro_settings.php:412
869
  msgid "Style name"
870
  msgstr ""
871
 
872
- #: pro/mappress_pro_settings.php:408
873
  msgid "Mapbox Studio"
874
  msgstr ""
875
 
876
- #: pro/mappress_pro_settings.php:409
877
  msgid "Enter styles from %s"
878
  msgstr ""
879
 
880
- #: pro/mappress_pro_settings.php:427
881
  msgid "Only admins or multisite super-admins can edit templates"
882
  msgstr ""
883
 
884
- #: pro/mappress_pro_settings.php:432
885
  msgid "WordPress 4.9 or higher is needed to use the template editor."
886
  msgstr ""
887
 
888
- #: pro/mappress_pro_settings.php:446
889
  msgid "or "
890
  msgstr ""
891
 
892
- #: pro/mappress_pro_settings.php:454
893
  msgid "Show featured image thumbnails in mashup POIs"
894
  msgstr ""
895
 
@@ -972,35 +990,35 @@ msgstr ""
972
  msgid "Results"
973
  msgstr ""
974
 
975
- #: templates/map.php:51
976
  msgid "Your Location"
977
  msgstr ""
978
 
979
- #: templates/map.php:65
980
  msgid "Menu"
981
  msgstr ""
982
 
983
- #: templates/map.php:67
984
  msgid "Center map"
985
  msgstr ""
986
 
987
- #: templates/map.php:70
988
  msgid "Traffic"
989
  msgstr ""
990
 
991
- #: templates/map.php:71
992
  msgid "Bicycling"
993
  msgstr ""
994
 
995
- #: templates/map.php:72
996
  msgid "Transit"
997
  msgstr ""
998
 
999
- #: templates/map.php:82
1000
  msgid "Show List"
1001
  msgstr ""
1002
 
1003
- #: templates/map.php:83
1004
  msgid "Show Map"
1005
  msgstr ""
1006
 
1
+ # Copyright (C) 2021 Chris Richardson
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.59\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: 2021-01-16T04:09:41+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:732
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:600
158
  msgid "Improve this map"
159
  msgstr ""
160
 
161
+ #: mappress.php:616
162
+ #: mappress.php:635
163
  msgid "Streets"
164
  msgstr ""
165
 
166
+ #: mappress.php:617
167
  msgid "Outdoors"
168
  msgstr ""
169
 
170
+ #: mappress.php:618
171
  msgid "Light"
172
  msgstr ""
173
 
174
+ #: mappress.php:619
175
  msgid "Dark"
176
  msgstr ""
177
 
178
+ #: mappress.php:620
179
  msgid "Satellite"
180
  msgstr ""
181
 
182
+ #: mappress.php:621
183
  msgid "Satellite Streets"
184
  msgstr ""
185
 
186
+ #: mappress.php:733
187
+ #: mappress_settings.php:338
188
  msgid "What's new"
189
  msgstr ""
190
 
191
+ #: mappress.php:964
192
  msgid "Version"
193
  msgstr ""
194
 
205
  msgstr ""
206
 
207
  #: mappress_map.php:86
208
+ #: mappress_settings.php:333
209
  msgid "MapPress"
210
  msgstr ""
211
 
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:244
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:346
492
  msgid "Body"
493
  msgstr ""
494
 
495
  #: mappress_template.php:36
496
+ #: pro/mappress_pro_settings.php:175
497
+ #: pro/mappress_pro_settings.php:244
498
+ #: pro/mappress_pro_settings.php:346
499
  msgid "Icon"
500
  msgstr ""
501
 
504
  msgstr ""
505
 
506
  #: mappress_template.php:38
507
+ #: pro/mappress_pro_settings.php:346
508
  msgid "Title"
509
  msgstr ""
510
 
514
 
515
  #: mappress_template.php:40
516
  #: pro/mappress_filter.php:120
517
+ #: pro/mappress_pro_settings.php:351
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
 
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:51
636
  #: templates_admin/mce.php:12
637
  msgid "Search"
638
  msgstr ""
639
 
640
+ #: pro/mappress_pro_settings.php:41
641
+ #: templates/map.php:58
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:244
756
+ msgid "Circle"
757
+ msgstr ""
758
+
759
+ #: pro/mappress_pro_settings.php:254
760
  #: templates_admin/widgets.php:68
761
  msgid "Edit"
762
  msgstr ""
763
 
764
+ #: pro/mappress_pro_settings.php:268
765
  msgid "Standard"
766
  msgstr ""
767
 
768
+ #: pro/mappress_pro_settings.php:269
769
  msgid "InfoBox"
770
  msgstr ""
771
 
772
+ #: pro/mappress_pro_settings.php:276
773
  msgid "Left of map"
774
  msgstr ""
775
 
776
+ #: pro/mappress_pro_settings.php:277
777
  msgid "Below map"
778
  msgstr ""
779
 
780
+ #: pro/mappress_pro_settings.php:283
781
  msgid "Get license"
782
  msgstr ""
783
 
784
+ #: pro/mappress_pro_settings.php:284
785
  msgid "Enter license to enable automatic updates"
786
  msgstr ""
787
 
788
+ #: pro/mappress_pro_settings.php:297
789
  msgid "Active"
790
  msgstr ""
791
 
792
+ #: pro/mappress_pro_settings.php:302
793
  msgid "Check now"
794
  msgstr ""
795
 
796
+ #: pro/mappress_pro_settings.php:307
797
  #: pro/mappress_updater.php:116
798
  msgid "Communication error, please try again later"
799
  msgstr ""
800
 
801
+ #: pro/mappress_pro_settings.php:309
802
  msgid "License is invalid or expired"
803
  msgstr ""
804
 
805
+ #: pro/mappress_pro_settings.php:313
806
  msgid "POI title + POI body"
807
  msgstr ""
808
 
809
+ #: pro/mappress_pro_settings.php:313
810
  msgid "Post title + post excerpt"
811
  msgstr ""
812
 
813
+ #: pro/mappress_pro_settings.php:318
814
  msgid "Open POI"
815
  msgstr ""
816
 
817
+ #: pro/mappress_pro_settings.php:318
818
  msgid "Open post"
819
  msgstr ""
820
 
821
+ #: pro/mappress_pro_settings.php:318
822
  msgid "Open post in new tab"
823
  msgstr ""
824
 
825
+ #: pro/mappress_pro_settings.php:323
826
  msgid "Include KML POIs in mashups"
827
  msgstr ""
828
 
829
+ #: pro/mappress_pro_settings.php:335
830
  msgid "%d Errors"
831
  msgstr ""
832
 
833
+ #: pro/mappress_pro_settings.php:345
834
  msgid "Address line "
835
  msgstr ""
836
 
837
+ #: pro/mappress_pro_settings.php:346
838
  msgid "Latitude"
839
  msgstr ""
840
 
841
+ #: pro/mappress_pro_settings.php:346
842
  msgid "Longitude"
843
  msgstr ""
844
 
845
+ #: pro/mappress_pro_settings.php:346
846
  msgid "Zoom"
847
  msgstr ""
848
 
849
+ #: pro/mappress_pro_settings.php:351
850
  msgid "Map Field"
851
  msgstr ""
852
 
853
+ #: pro/mappress_pro_settings.php:364
854
  msgid "Overwrite maps when posts are saved"
855
  msgstr ""
856
 
857
+ #: pro/mappress_pro_settings.php:369
858
  msgid "Width (px) at which to collapse the left POI list"
859
  msgstr ""
860
 
861
+ #: pro/mappress_pro_settings.php:373
862
  msgid "Show a list of POIs with each map"
863
  msgstr ""
864
 
865
+ #: pro/mappress_pro_settings.php:381
866
  msgid "Enable search"
867
  msgstr ""
868
 
869
+ #: pro/mappress_pro_settings.php:385
870
  msgid "Sort POI list by title"
871
  msgstr ""
872
 
873
+ #: pro/mappress_pro_settings.php:391
874
  msgid "No styles have been defined yet"
875
  msgstr ""
876
 
877
+ #: pro/mappress_pro_settings.php:400
878
  msgid "Snazzy Maps"
879
  msgstr ""
880
 
881
+ #: pro/mappress_pro_settings.php:401
882
  msgid "Enter JSON from %s"
883
  msgstr ""
884
 
885
+ #: pro/mappress_pro_settings.php:405
886
+ #: pro/mappress_pro_settings.php:421
887
  msgid "Style name"
888
  msgstr ""
889
 
890
+ #: pro/mappress_pro_settings.php:417
891
  msgid "Mapbox Studio"
892
  msgstr ""
893
 
894
+ #: pro/mappress_pro_settings.php:418
895
  msgid "Enter styles from %s"
896
  msgstr ""
897
 
898
+ #: pro/mappress_pro_settings.php:436
899
  msgid "Only admins or multisite super-admins can edit templates"
900
  msgstr ""
901
 
902
+ #: pro/mappress_pro_settings.php:441
903
  msgid "WordPress 4.9 or higher is needed to use the template editor."
904
  msgstr ""
905
 
906
+ #: pro/mappress_pro_settings.php:455
907
  msgid "or "
908
  msgstr ""
909
 
910
+ #: pro/mappress_pro_settings.php:463
911
  msgid "Show featured image thumbnails in mashup POIs"
912
  msgstr ""
913
 
990
  msgid "Results"
991
  msgstr ""
992
 
993
+ #: templates/map.php:53
994
  msgid "Your Location"
995
  msgstr ""
996
 
997
+ #: templates/map.php:67
998
  msgid "Menu"
999
  msgstr ""
1000
 
1001
+ #: templates/map.php:69
1002
  msgid "Center map"
1003
  msgstr ""
1004
 
1005
+ #: templates/map.php:72
1006
  msgid "Traffic"
1007
  msgstr ""
1008
 
1009
+ #: templates/map.php:73
1010
  msgid "Bicycling"
1011
  msgstr ""
1012
 
1013
+ #: templates/map.php:74
1014
  msgid "Transit"
1015
  msgstr ""
1016
 
1017
+ #: templates/map.php:84
1018
  msgid "Show List"
1019
  msgstr ""
1020
 
1021
+ #: templates/map.php:85
1022
  msgid "Show Map"
1023
  msgstr ""
1024
 
languages/texts.php CHANGED
@@ -12,10 +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
  __("Please enter your MapPress license key to enable plugin updates");
20
  __("MapPress Gutenberg blocks require WordPress 5.3 or the latest Gutenberg Plugin. Please update if using the block editor.");
21
  __("MapPress has many new features! Please take a moment to learn %s.");
@@ -139,6 +141,7 @@ __("Popup type");
139
  __("Default icon");
140
  __("Icon directory");
141
  __("Custom icons");
 
142
  __("Icon scaling");
143
  __("Automatic icons");
144
  __("Search");
@@ -170,6 +173,7 @@ __("from %s to %s");
170
  __("Algolia");
171
  __("Nominatim");
172
  __("MapBox");
 
173
  __("Edit");
174
  __("Standard");
175
  __("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.");
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.58
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.58';
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>";
@@ -457,6 +480,21 @@ class Mappress {
457
  Mappress::$options->save();
458
  }
459
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  // Missing license
461
  if (self::$pro && !trim(self::$options->license) && (!is_multisite() || (is_super_admin() && is_main_site())))
462
  self::$notices['nolicense'] = array('warning', __('Please enter your MapPress license key to enable plugin updates', 'mappress-google-maps-for-wordpress'));
@@ -517,7 +555,7 @@ class Mappress {
517
  }
518
 
519
  static function l10n() {
520
- global $post;
521
 
522
  $l10n = array(
523
  'delete_prompt' => __('Are you sure you want to delete?', 'mappress-google-maps-for-wordpress'),
@@ -540,6 +578,7 @@ class Mappress {
540
  'debug' => self::$debug,
541
  'editurl' => admin_url('post.php'),
542
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
 
543
  'language' => self::get_language(),
544
  'mapbox' => self::get_api_keys()->mapbox,
545
  'nonce' => wp_create_nonce('mappress'),
@@ -605,7 +644,10 @@ class Mappress {
605
  }
606
 
607
  // Global settings
608
- $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer', 'engine', 'filter', 'geocoder', 'iconScale', 'initialOpenInfo', 'iwType', 'layout', 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style', 'tooltips');
 
 
 
609
  foreach($options as $option) {
610
  if (isset(self::$options->$option)) {
611
  $l10n['options'][$option] = self::$options->$option;
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.59
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.59';
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>";
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'));
555
  }
556
 
557
  static function l10n() {
558
+ global $post, $is_IE;
559
 
560
  $l10n = array(
561
  'delete_prompt' => __('Are you sure you want to delete?', 'mappress-google-maps-for-wordpress'),
578
  'debug' => self::$debug,
579
  'editurl' => admin_url('post.php'),
580
  'iconsUrl' => (self::$pro) ? Mappress_Icons::$icons_url : null,
581
+ 'isIE' => $is_IE,
582
  'language' => self::get_language(),
583
  'mapbox' => self::get_api_keys()->mapbox,
584
  'nonce' => wp_create_nonce('mappress'),
644
  }
645
 
646
  // Global settings
647
+ $options = array('alignment', 'clustering', 'country', 'defaultIcon', 'directions', 'directionsServer',
648
+ 'engine', 'filter', 'geocoder', 'highlight', 'highlightIcon', 'iconScale', 'initialOpenInfo', 'iwType', 'layout',
649
+ 'mashupClick', 'mini', 'poiList', 'poiZoom', 'radius', 'search', 'size', 'sizes', 'style', 'tooltips');
650
+
651
  foreach($options as $option) {
652
  if (isset(self::$options->$option)) {
653
  $l10n['options'][$option] = self::$options->$option;
mappress_map.php CHANGED
@@ -304,9 +304,10 @@ class Mappress_Map extends Mappress_Obj {
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;
304
  if ($result === false)
305
  return false;
306
 
307
+ // Don't delete the actual map data
308
+ // $result = $wpdb->query($wpdb->prepare("DELETE FROM $maps_table WHERE mapid = %d", $mapid));
309
+ // if ($result === false)
310
+ // return false;
311
 
312
  $wpdb->query("COMMIT");
313
  return true;
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',
@@ -325,12 +327,13 @@ class Mappress_Settings {
325
  function options_page() {
326
  ?>
327
  <div class="wrap mapp-settings-screen">
328
- <div class='mapp-settings-toolbar-top'>
329
- <div class='mapp-settings-toolbar-top-header'>
330
- <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
 
331
  <?php echo Mappress::$version; ?>
332
  </div>
333
- <div class='mapp-settings-toolbar-top-links'>
334
  <a target='_blank' href='https://mappresspro.com/mappress/mappress-documentation'><?php _e('Get help', 'mappress-google-maps-for-wordpress');?></a>
335
  <a target='_blank' href='https://mappresspro.com/whats-new/'><?php _e("What's new", 'mappress-google-maps-for-wordpress');?></a>
336
  <?php if (Mappress::$pro) { ?>
21
  $filter,
22
  $footer = true,
23
  $geocoder,
24
+ $highlight,
25
+ $highlightIcon,
26
  $iconScale,
27
  $initialOpenInfo,
28
  $iwType = 'iw',
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-header'>
332
+ <div class='mapp-settings-header-version'>
333
+ <h1><?php _e('MapPress', 'mappress-google-maps-for-wordpress'); ?></h1>
334
  <?php echo Mappress::$version; ?>
335
  </div>
336
+ <div class='mapp-settings-header-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) { ?>
readme.txt CHANGED
@@ -1,16 +1,16 @@
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, leaflet maps, map plugin, directions, google map plugin, leaflet 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.58
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 locations as Gutenberg blocks - or use the classic editor. Both are fully supported, and 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
 
@@ -28,19 +28,21 @@ Upgrade to [MapPress Pro](https://mappresspro.com/mappress) for even more featur
28
  5. POI with YouTube video
29
 
30
  = Key Features =
 
31
  * Add unlimited maps and markers to any post, page or custom post type
 
32
  * Locations can be added by address, place, or latitude/longitude, or dragged into position
33
  * Markers support custom text and HTML including photos, images, and links
34
  * Google street view and overlays (traffic, bicycling and transit)
35
- * Markers link to Google maps for detailed turn-by-turn directins
36
  * Maps can be generated using PHP for use in themes and templates
37
 
38
  = Pro Version Features =
39
  * Get [MapPress Pro](https://mappresspro.com/mappress) for additional functionality
40
  * Custom marker icons, or upload your own - 100 standard icons included
41
- * Combine maps and locations into a searchable "mashup" map
42
  * Filter locations by by taxonomy, tag or category
43
- * Map and mashup widgets
44
  * Marker clustering for both Leaflet and Google
45
  * Multiple geocoders including Google, Nominatim, Algolia and MapBox
46
  * Customizable marker and list templates
@@ -82,6 +84,29 @@ Please see the plugin documentation pages:
82
 
83
  == Changelog ==
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  = 2.58 =
86
  * Added: new infobox with better panning and sizing
87
  * Added: infobox can now be used with Leaflet, in addition to Google
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.59
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
 
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.59 =
88
+ * Fixed: JS files were not compiling for IE11
89
+ * Fixed: Leaflet icons were not setting scale properly, interfering with marker spiderfier
90
+ * Fixed: error when saving map center of 0,0
91
+ * Added: new marker class to enable effects
92
+ * Added: map data can be recovered after deletion
93
+ * Added: highlighting on mouse over for list and marker hover
94
+ * Added: better z-indexing for hovered marker
95
+
96
+ = 2.58.3 =
97
+ * Added: selected icon can now be highlighted with a special icon or a circle
98
+ * Fixed: error preventing KML files from being added to map
99
+
100
+ = 2.58.2 =
101
+ * Fixed: jQuery warning was causing maps to not display in older WP versions
102
+
103
+ = 2.58.1 =
104
+ * Fixed: places strim trim() not working for maps with center specified by lat/lng
105
+ * Fixed: better error message for sites with obsolete jQuery and jQuery UI
106
+ * Fixed: admin notices not showing correctly on settings page
107
+ * Fixed: added warning for expired license
108
+ * Fixed: errors for invalid KML files were not displaying
109
+
110
  = 2.58 =
111
  * Added: new infobox with better panning and sizing
112
  * Added: infobox can now be used with Leaflet, in addition to Google
templates/map.php CHANGED
@@ -10,6 +10,8 @@
10
  let alignment = (map.alignment) ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
 
 
13
  // Gutenberg additional classes https://core.trac.wordpress.org/ticket/45882
14
  classes += (map.classname) ? ' ' + map.classname : '';
15
  #>
10
  let alignment = (map.alignment) ? map.alignment : mappl10n.options.alignment;
11
  classes += (alignment) ? ' mapp-align-' + alignment : '';
12
 
13
+ classes += (mappl10n.options.isIE) ? ' mapp-ie' : '';
14
+
15
  // Gutenberg additional classes https://core.trac.wordpress.org/ticket/45882
16
  classes += (map.classname) ? ' ' + map.classname : '';
17
  #>
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>